From 6c40867e742ca2392fbc14e1bcfd4ca412518695 Mon Sep 17 00:00:00 2001 From: John Mertic Date: Wed, 24 Aug 2011 15:33:02 -0400 Subject: [PATCH] Release 6.2.2 --- README | 1 - cron.php | 4 +- custom/.gitignore | 5 - data/SugarBean.php | 13 +- files.md5 | 3791 ++- include/Dashlets/DashletGenericDisplay.tpl | 2 +- include/JSON.js | 44 - include/JSON.php | 25 +- include/ListView/ListViewDCMenu.tpl | 2 +- include/ListView/ListViewGeneric.tpl | 2 +- include/ListView/ListViewNoMassUpdate.tpl | 2 +- include/MVC/SugarApplication.php | 2 +- include/MVC/View/SugarView.php | 14 +- include/MVC/View/views/view.popup.php | 1 + include/MySugar/javascript/MySugar.js | 10 +- include/MySugar/tpls/MySugar.tpl | 1 - include/Popups/tpls/footer.tpl | 14 +- include/Popups/tpls/header.tpl | 6 +- include/QuickSearchDefaults.php | 34 +- include/SearchForm/SearchForm.php | 4 +- include/SearchForm/SearchForm2.php | 4 +- .../Smarty/plugins/function.sugar_button.php | 6 +- include/SubPanel/SubPanelDefinitions.php | 8 +- include/SubPanel/SubPanelTiles.js | 2 +- .../SugarCharts/Jit/FlashCanvas/canvas2png.js | 2 +- .../Jit/FlashCanvas/flashcanvas.js | 2 +- include/SugarCharts/Jit/js/Jit/jit.js | 164 +- include/SugarCharts/Jit/js/mySugarCharts.js | 2 +- include/SugarCharts/Jit/js/sugarCharts.js | 2 +- .../javascript/SugarDependentDropdown.js | 2 +- .../SugarEmailAddress/SugarEmailAddress.js | 2 +- .../Fields/Address/SugarFieldAddress.js | 2 +- .../Fields/Collection/CollectionEditView.tpl | 1 - .../Fields/Collection/DetailView.tpl | 1 - .../Fields/Collection/EditView.tpl | 1 - .../Fields/Collection/SugarFieldCollection.js | 6 +- .../Collection/ViewSugarFieldCollection.php | 11 +- .../Fields/Datetimecombo/Datetimecombo.js | 2 +- .../SugarFields/Fields/File/SugarFieldFile.js | 4 +- .../SugarFields/Fields/Relate/EditView.tpl | 4 +- .../Fields/Relate/SugarFieldRelate.php | 17 +- .../templates/file/metadata/editviewdefs.php | 2 - .../file/metadata/quickcreatedefs.php | 2 - .../SugarObjects/templates/person/Person.php | 1 + include/SugarTinyMCE.php | 9 +- include/Sugarpdf/Sugarpdf.php | 46 +- include/TemplateHandler/TemplateHandler.php | 35 +- include/VarDefHandler/vardef_meta_arrays.php | 138 +- .../formatters/default/company_detail.js | 2 +- include/database/MssqlManager.php | 7 +- .../SugarWidgets/SugarWidgetFieldcurrency.php | 2 +- .../SugarWidgetFielddatetimecombo.php | 59 - ...ugarWidgetSubPanelTopButtonQuickCreate.php | 8 +- ...WidgetSubPanelTopScheduleMeetingButton.php | 4 +- include/javascript/calendar.js | 7 +- include/javascript/cookie.js | 2 +- include/javascript/dashlets.js | 2 +- include/javascript/getYUIComboFile.php | 8 +- include/javascript/include.js | 2 +- include/javascript/iscroll.js | 16 +- include/javascript/jsclass_async.js | 32 +- include/javascript/jsclass_base.js | 116 +- include/javascript/menu.js | 2 +- include/javascript/overlibmws.js | 4 +- include/javascript/overlibmws_iframe.js | 2 +- include/javascript/popup_helper.js | 3 +- include/javascript/popup_parent_helper.js | 2 +- include/javascript/quickCompose.js | 2 +- include/javascript/quicksearch.js | 2 +- include/javascript/report_additionals.js | 12 +- include/javascript/sugar_3.js | 30 +- .../sugar_connection_event_listener.js | 2 +- include/javascript/sugar_grp1.js | 64 +- include/javascript/sugar_grp1_yui.js | 638 +- include/javascript/sugar_grp_emails.js | 1225 +- include/javascript/sugar_grp_overlib.js | 8 +- include/javascript/sugar_grp_quickcomp.js | 197 +- include/javascript/sugar_grp_yui2.js | 46 +- include/javascript/sugar_grp_yui_widgets.css | 50 +- include/javascript/sugar_grp_yui_widgets.js | 188 +- include/javascript/sugar_yui_overrides.js | 42 + .../javascript/sugarwidgets/SugarYUILoader.js | 2 +- .../sugarwidgets/SugarYUIWidgets.js | 3 +- include/javascript/swfobject.js | 2 +- .../tiny_mce/classes/AddOnManager.js | 305 + .../tiny_mce/classes/ControlManager.js | 519 + include/javascript/tiny_mce/classes/Editor.js | 3295 +++ .../tiny_mce/classes/EditorCommands.js | 573 + .../tiny_mce/classes/EditorManager.js | 503 + .../tiny_mce/classes/ForceBlocks.js | 720 + .../javascript/tiny_mce/classes/Formatter.js | 1704 ++ .../tiny_mce/classes/LegacyInput.js | 66 + include/javascript/tiny_mce/classes/Popup.js | 456 + .../tiny_mce/classes/UndoManager.js | 198 + .../tiny_mce/classes/WindowManager.js | 231 + .../classes/adapter/jquery/adapter.js | 336 + .../classes/adapter/jquery/jquery.tinymce.js | 336 + .../classes/adapter/prototype/adapter.js | 39 + .../tiny_mce/classes/dom/DOMUtils.js | 1864 ++ .../tiny_mce/classes/dom/Element.js | 195 + .../tiny_mce/classes/dom/EventUtils.js | 381 + .../javascript/tiny_mce/classes/dom/Range.js | 687 + .../tiny_mce/classes/dom/RangeUtils.js | 228 + .../tiny_mce/classes/dom/ScriptLoader.js | 285 + .../tiny_mce/classes/dom/Selection.js | 1003 + .../tiny_mce/classes/dom/Serializer.js | 379 + .../javascript/tiny_mce/classes/dom/Sizzle.js | 1072 + .../tiny_mce/classes/dom/TreeWalker.js | 64 + .../tiny_mce/classes/dom/TridentSelection.js | 240 + .../tiny_mce/classes/firebug/FIREBUG.LICENSE | 30 + .../tiny_mce/classes/firebug/firebug-lite.js | 2518 ++ .../tiny_mce/classes/html/DomParser.js | 537 + .../tiny_mce/classes/html/Entities.js | 253 + .../javascript/tiny_mce/classes/html/Node.js | 463 + .../tiny_mce/classes/html/SaxParser.js | 335 + .../tiny_mce/classes/html/Schema.js | 639 + .../tiny_mce/classes/html/Serializer.js | 152 + .../tiny_mce/classes/html/Styles.js | 279 + .../tiny_mce/classes/html/Writer.js | 186 + .../javascript/tiny_mce/classes/tinymce.js | 833 + .../javascript/tiny_mce/classes/ui/Button.js | 74 + .../tiny_mce/classes/ui/ColorSplitButton.js | 284 + .../tiny_mce/classes/ui/Container.js | 66 + .../javascript/tiny_mce/classes/ui/Control.js | 198 + .../tiny_mce/classes/ui/DropMenu.js | 432 + .../tiny_mce/classes/ui/KeyboardNavigation.js | 183 + .../javascript/tiny_mce/classes/ui/ListBox.js | 424 + .../javascript/tiny_mce/classes/ui/Menu.js | 186 + .../tiny_mce/classes/ui/MenuButton.js | 176 + .../tiny_mce/classes/ui/MenuItem.js | 74 + .../tiny_mce/classes/ui/NativeListBox.js | 212 + .../tiny_mce/classes/ui/Separator.js | 42 + .../tiny_mce/classes/ui/SplitButton.js | 154 + .../javascript/tiny_mce/classes/ui/Toolbar.js | 89 + .../tiny_mce/classes/ui/ToolbarGroup.js | 76 + .../tiny_mce/classes/util/Cookie.js | 138 + .../tiny_mce/classes/util/Dispatcher.js | 112 + .../javascript/tiny_mce/classes/util/JSON.js | 100 + .../javascript/tiny_mce/classes/util/JSONP.js | 28 + .../tiny_mce/classes/util/JSONRequest.js | 112 + .../javascript/tiny_mce/classes/util/URI.js | 309 + .../javascript/tiny_mce/classes/util/XHR.js | 88 + include/javascript/tiny_mce/jquery.tinymce.js | 1 + include/javascript/tiny_mce/langs/en.js | 79 +- .../tiny_mce/plugins/advhr/editor_plugin.js | 2 +- .../plugins/advhr/editor_plugin_src.js | 9 +- .../tiny_mce/plugins/advhr/langs/en_dlg.js | 2 + .../tiny_mce/plugins/advhr/rule.htm | 69 +- .../plugins/advimage/editor_plugin.js | 2 +- .../plugins/advimage/editor_plugin_src.js | 9 +- .../tiny_mce/plugins/advimage/image.htm | 85 +- .../tiny_mce/plugins/advimage/js/image.js | 29 +- .../tiny_mce/plugins/advimage/langs/en_dlg.js | 2 + .../tiny_mce/plugins/advlink/editor_plugin.js | 2 +- .../plugins/advlink/editor_plugin_src.js | 9 +- .../tiny_mce/plugins/advlink/js/advlink.js | 43 +- .../tiny_mce/plugins/advlink/langs/en_dlg.js | 6 +- .../tiny_mce/plugins/advlink/link.htm | 109 +- .../tiny_mce/plugins/advlist/editor_plugin.js | 1 + .../plugins/advlist/editor_plugin_src.js | 161 + .../plugins/autolink/editor_plugin.js | 1 + .../plugins/autolink/editor_plugin_src.js | 169 + .../plugins/autoresize/editor_plugin.js | 1 + .../plugins/autoresize/editor_plugin_src.js | 128 + .../plugins/autosave/editor_plugin.js | 2 +- .../plugins/autosave/editor_plugin_src.js | 414 +- .../tiny_mce/plugins/autosave/langs/en.js | 4 + .../tiny_mce/plugins/bbcode/editor_plugin.js | 2 +- .../plugins/bbcode/editor_plugin_src.js | 11 +- .../plugins/compat2x/editor_plugin.js | 1 - .../plugins/compat2x/editor_plugin_src.js | 616 - .../plugins/contextmenu/editor_plugin.js | 2 +- .../plugins/contextmenu/editor_plugin_src.js | 92 +- .../plugins/directionality/editor_plugin.js | 2 +- .../directionality/editor_plugin_src.js | 9 +- .../plugins/emotions/editor_plugin.js | 2 +- .../plugins/emotions/editor_plugin_src.js | 13 +- .../tiny_mce/plugins/emotions/emotions.htm | 32 +- .../tiny_mce/plugins/example/dialog.htm | 9 +- .../tiny_mce/plugins/example/editor_plugin.js | 2 +- .../plugins/example/editor_plugin_src.js | 9 +- .../plugins/fullpage/css/fullpage.css | 45 +- .../plugins/fullpage/editor_plugin.js | 2 +- .../plugins/fullpage/editor_plugin_src.js | 387 +- .../tiny_mce/plugins/fullpage/fullpage.htm | 374 +- .../tiny_mce/plugins/fullpage/js/fullpage.js | 647 +- .../plugins/fullscreen/editor_plugin.js | 2 +- .../plugins/fullscreen/editor_plugin_src.js | 30 +- .../plugins/fullscreen/fullscreen.htm | 2 - .../tiny_mce/plugins/iespell/editor_plugin.js | 2 +- .../plugins/iespell/editor_plugin_src.js | 9 +- .../plugins/inlinepopups/editor_plugin.js | 2 +- .../plugins/inlinepopups/editor_plugin_src.js | 106 +- .../inlinepopups/skins/clearlooks2/window.css | 2 +- .../plugins/insertdatetime/editor_plugin.js | 2 +- .../insertdatetime/editor_plugin_src.js | 9 +- .../tiny_mce/plugins/layer/editor_plugin.js | 2 +- .../plugins/layer/editor_plugin_src.js | 11 +- .../plugins/legacyoutput/editor_plugin.js | 1 + .../plugins/legacyoutput/editor_plugin_src.js | 139 + .../tiny_mce/plugins/lists/editor_plugin.js | 1 + .../plugins/lists/editor_plugin_src.js | 617 + .../tiny_mce/plugins/media/css/content.css | 6 - .../tiny_mce/plugins/media/css/media.css | 9 +- .../tiny_mce/plugins/media/editor_plugin.js | 2 +- .../plugins/media/editor_plugin_src.js | 950 +- .../tiny_mce/plugins/media/img/flv_player.swf | Bin 11668 -> 0 bytes .../tiny_mce/plugins/media/js/media.js | 930 +- .../tiny_mce/plugins/media/langs/en_dlg.js | 10 +- .../tiny_mce/plugins/media/media.htm | 584 +- .../tiny_mce/plugins/media/moxieplayer.swf | Bin 0 -> 33931 bytes .../plugins/nonbreaking/editor_plugin.js | 2 +- .../plugins/nonbreaking/editor_plugin_src.js | 11 +- .../plugins/noneditable/editor_plugin.js | 2 +- .../plugins/noneditable/editor_plugin_src.js | 11 +- .../plugins/pagebreak/css/content.css | 1 - .../plugins/pagebreak/editor_plugin.js | 2 +- .../plugins/pagebreak/editor_plugin_src.js | 14 +- .../tiny_mce/plugins/pagebreak/img/trans.gif | Bin 43 -> 0 bytes .../tiny_mce/plugins/paste/blank.htm | 22 - .../tiny_mce/plugins/paste/css/blank.css | 14 - .../tiny_mce/plugins/paste/css/pasteword.css | 3 - .../tiny_mce/plugins/paste/editor_plugin.js | 2 +- .../plugins/paste/editor_plugin_src.js | 1135 +- .../tiny_mce/plugins/paste/js/pastetext.js | 62 +- .../tiny_mce/plugins/paste/js/pasteword.js | 91 +- .../tiny_mce/plugins/paste/pastetext.htm | 29 +- .../tiny_mce/plugins/paste/pasteword.htm | 16 +- .../tiny_mce/plugins/preview/editor_plugin.js | 2 +- .../plugins/preview/editor_plugin_src.js | 11 +- .../tiny_mce/plugins/preview/preview.html | 16 +- .../tiny_mce/plugins/print/editor_plugin.js | 2 +- .../plugins/print/editor_plugin_src.js | 9 +- .../tiny_mce/plugins/safari/blank.htm | 1 - .../tiny_mce/plugins/safari/editor_plugin.js | 1 - .../plugins/safari/editor_plugin_src.js | 514 - .../tiny_mce/plugins/save/editor_plugin.js | 2 +- .../plugins/save/editor_plugin_src.js | 9 +- .../plugins/searchreplace/editor_plugin.js | 2 +- .../searchreplace/editor_plugin_src.js | 15 +- .../plugins/searchreplace/js/searchreplace.js | 28 +- .../plugins/searchreplace/searchreplace.htm | 47 +- .../plugins/spellchecker/editor_plugin.js | 2 +- .../plugins/spellchecker/editor_plugin_src.js | 225 +- .../tiny_mce/plugins/style/editor_plugin.js | 2 +- .../plugins/style/editor_plugin_src.js | 9 +- .../tiny_mce/plugins/style/js/props.js | 24 +- .../tiny_mce/plugins/style/langs/en_dlg.js | 9 +- .../tiny_mce/plugins/style/props.htm | 925 +- .../plugins/tabfocus/editor_plugin.js | 1 + .../plugins/tabfocus/editor_plugin_src.js | 114 + .../tiny_mce/plugins/table/cell.htm | 34 +- .../tiny_mce/plugins/table/editor_plugin.js | 2 +- .../plugins/table/editor_plugin_src.js | 1894 +- .../tiny_mce/plugins/table/js/cell.js | 83 +- .../tiny_mce/plugins/table/js/merge_cells.js | 38 +- .../tiny_mce/plugins/table/js/row.js | 100 +- .../tiny_mce/plugins/table/js/table.js | 71 +- .../tiny_mce/plugins/table/langs/en_dlg.js | 2 +- .../tiny_mce/plugins/table/merge_cells.htm | 34 +- .../javascript/tiny_mce/plugins/table/row.htm | 30 +- .../tiny_mce/plugins/table/table.htm | 121 +- .../plugins/template/editor_plugin.js | 2 +- .../plugins/template/editor_plugin_src.js | 17 +- .../tiny_mce/plugins/template/js/template.js | 2 +- .../tiny_mce/plugins/template/template.htm | 12 +- .../plugins/visualchars/editor_plugin.js | 2 +- .../plugins/visualchars/editor_plugin_src.js | 42 +- .../plugins/wordcount/editor_plugin.js | 1 + .../plugins/wordcount/editor_plugin_src.js | 114 + .../tiny_mce/plugins/xhtmlxtras/abbr.htm | 25 +- .../tiny_mce/plugins/xhtmlxtras/acronym.htm | 25 +- .../plugins/xhtmlxtras/attributes.htm | 25 +- .../tiny_mce/plugins/xhtmlxtras/cite.htm | 23 +- .../tiny_mce/plugins/xhtmlxtras/del.htm | 32 +- .../plugins/xhtmlxtras/editor_plugin.js | 2 +- .../plugins/xhtmlxtras/editor_plugin_src.js | 38 +- .../tiny_mce/plugins/xhtmlxtras/ins.htm | 36 +- .../tiny_mce/plugins/xhtmlxtras/js/abbr.js | 13 +- .../tiny_mce/plugins/xhtmlxtras/js/acronym.js | 11 +- .../plugins/xhtmlxtras/js/attributes.js | 28 +- .../tiny_mce/plugins/xhtmlxtras/js/cite.js | 11 +- .../tiny_mce/plugins/xhtmlxtras/js/del.js | 25 +- .../plugins/xhtmlxtras/js/element_common.js | 26 +- .../tiny_mce/plugins/xhtmlxtras/js/ins.js | 28 +- .../tiny_mce/themes/advanced/about.htm | 14 +- .../tiny_mce/themes/advanced/anchor.htm | 20 +- .../tiny_mce/themes/advanced/charmap.htm | 83 +- .../tiny_mce/themes/advanced/color_picker.htm | 26 +- .../themes/advanced/editor_template.js | 2 +- .../themes/advanced/editor_template_src.js | 655 +- .../tiny_mce/themes/advanced/image.htm | 112 +- .../media => themes/advanced}/img/flash.gif | Bin .../tiny_mce/themes/advanced/img/icons.gif | Bin 11505 -> 11794 bytes .../tiny_mce/themes/advanced/img/iframe.gif | Bin 0 -> 600 bytes .../advanced}/img/pagebreak.gif | Bin .../advanced}/img/quicktime.gif | Bin .../advanced}/img/realmedia.gif | Bin .../advanced}/img/shockwave.gif | Bin .../media => themes/advanced}/img/trans.gif | Bin .../tiny_mce/themes/advanced/img/video.gif | Bin 0 -> 597 bytes .../advanced}/img/windowsmedia.gif | Bin .../tiny_mce/themes/advanced/js/about.js | 1 + .../tiny_mce/themes/advanced/js/anchor.js | 19 +- .../tiny_mce/themes/advanced/js/charmap.js | 42 +- .../themes/advanced/js/color_picker.js | 140 +- .../tiny_mce/themes/advanced/js/image.js | 8 +- .../tiny_mce/themes/advanced/js/link.js | 22 +- .../themes/advanced/js/source_editor.js | 22 +- .../tiny_mce/themes/advanced/langs/en.js | 10 +- .../tiny_mce/themes/advanced/langs/en_dlg.js | 9 +- .../tiny_mce/themes/advanced/link.htm | 65 +- .../tiny_mce/themes/advanced/shortcuts.htm | 47 + .../themes/advanced/skins/default/content.css | 21 +- .../themes/advanced/skins/default/dialog.css | 9 +- .../themes/advanced/skins/default/ui.css | 17 +- .../advanced/skins/highcontrast/content.css | 23 + .../advanced/skins/highcontrast/dialog.css | 105 + .../themes/advanced/skins/highcontrast/ui.css | 101 + .../themes/advanced/skins/o2k7/content.css | 20 +- .../themes/advanced/skins/o2k7/dialog.css | 8 +- .../themes/advanced/skins/o2k7/ui.css | 17 +- .../themes/advanced/skins/o2k7/ui_black.css | 2 +- .../themes/advanced/skins/o2k7/ui_silver.css | 2 +- .../themes/advanced/source_editor.htm | 13 +- .../tiny_mce/themes/simple/editor_template.js | 2 +- .../themes/simple/editor_template_src.js | 13 +- include/javascript/tiny_mce/tiny_mce.js | 2 +- include/javascript/tiny_mce/tiny_mce_dev.js | 130 + .../javascript/tiny_mce/tiny_mce_jquery.js | 1 + .../tiny_mce/tiny_mce_jquery_src.js | 14988 +++++++++++ include/javascript/tiny_mce/tiny_mce_popup.js | 295 +- .../javascript/tiny_mce/tiny_mce_prototype.js | 1 + .../tiny_mce/tiny_mce_prototype_src.js | 15839 ++++++++++++ include/javascript/tiny_mce/tiny_mce_src.js | 20915 ++++++++++------ .../tiny_mce/utils/editable_selects.js | 9 +- .../javascript/tiny_mce/utils/form_utils.js | 31 +- include/javascript/tiny_mce/utils/mctabs.js | 114 +- include/javascript/tiny_mce/utils/validate.js | 47 +- .../yui/build/animation/animation-min.js | 16 +- .../yui/build/animation/animation.js | 79 +- .../build/assets/skins/sam/autocomplete.css | 8 +- .../yui/build/assets/skins/sam/button.css | 6 +- .../yui/build/assets/skins/sam/calendar.css | 10 +- .../yui/build/assets/skins/sam/carousel.css | 6 +- .../build/assets/skins/sam/colorpicker.css | 8 +- .../yui/build/assets/skins/sam/container.css | 8 +- .../yui/build/assets/skins/sam/datatable.css | 10 +- .../yui/build/assets/skins/sam/editor.css | 6 +- .../build/assets/skins/sam/imagecropper.css | 6 +- .../yui/build/assets/skins/sam/layout.css | 6 +- .../yui/build/assets/skins/sam/logger.css | 8 +- .../yui/build/assets/skins/sam/menu.css | 6 +- .../yui/build/assets/skins/sam/paginator.css | 8 +- .../build/assets/skins/sam/profilerviewer.css | 8 +- .../build/assets/skins/sam/progressbar.css | 8 +- .../yui/build/assets/skins/sam/resize.css | 6 +- .../build/assets/skins/sam/simpleeditor.css | 8 +- .../yui/build/assets/skins/sam/skin.css | 37 +- .../yui/build/assets/skins/sam/slider.css | 6 +- .../yui/build/assets/skins/sam/tabview.css | 10 +- .../yui/build/assets/skins/sam/treeview.css | 8 +- .../yui/build/assets/skins/sam/yuitest.css | 6 +- .../autocomplete/assets/autocomplete-core.css | 6 +- .../assets/skins/sam/autocomplete-skin.css | 6 +- .../assets/skins/sam/autocomplete.css | 8 +- .../build/autocomplete/autocomplete-min.js | 18 +- .../yui/build/autocomplete/autocomplete.js | 173 +- .../javascript/yui/build/base/base-min.css | 8 +- include/javascript/yui/build/base/base.css | 20 +- .../yui/build/button/assets/button-core.css | 6 +- .../button/assets/skins/sam/button-skin.css | 8 +- .../build/button/assets/skins/sam/button.css | 6 +- .../javascript/yui/build/button/button-min.js | 16 +- include/javascript/yui/build/button/button.js | 83 +- .../build/calendar/assets/calendar-core.css | 6 +- .../yui/build/calendar/assets/calendar.css | 11 +- .../assets/skins/sam/calendar-skin.css | 13 +- .../calendar/assets/skins/sam/calendar.css | 10 +- .../yui/build/calendar/calendar-min.js | 30 +- .../javascript/yui/build/calendar/calendar.js | 418 +- .../build/carousel/assets/carousel-core.css | 20 +- .../assets/skins/sam/carousel-skin.css | 48 +- .../carousel/assets/skins/sam/carousel.css | 6 +- .../yui/build/carousel/carousel-min.js | 18 +- .../javascript/yui/build/carousel/carousel.js | 439 +- .../yui/build/charts/assets/charts.swf | Bin 81768 -> 81764 bytes .../javascript/yui/build/charts/charts-min.js | 12 +- include/javascript/yui/build/charts/charts.js | 42 +- .../colorpicker/assets/colorpicker-core.css | 6 +- .../assets/skins/sam/colorpicker-skin.css | 8 +- .../assets/skins/sam/colorpicker.css | 8 +- .../yui/build/colorpicker/colorpicker-min.js | 12 +- .../yui/build/colorpicker/colorpicker.js | 13 +- .../yui/build/connection/connection-min.js | 12 +- .../yui/build/connection/connection.js | 1133 +- .../build/connection/connection_core-debug.js | 980 - .../build/connection/connection_core-min.js | 10 +- .../yui/build/connection/connection_core.js | 1084 +- .../build/container/assets/container-core.css | 6 +- .../yui/build/container/assets/container.css | 6 +- .../assets/skins/sam/container-skin.css | 6 +- .../container/assets/skins/sam/container.css | 8 +- .../yui/build/container/container-min.js | 32 +- .../yui/build/container/container.js | 604 +- .../yui/build/container/container_core-min.js | 22 +- .../yui/build/container/container_core.js | 5200 ++++ .../javascript/yui/build/cookie/cookie-min.js | 8 +- include/javascript/yui/build/cookie/cookie.js | 8 +- .../yui/build/datasource/datasource-min.js | 18 +- .../yui/build/datasource/datasource.js | 233 +- .../build/datatable/assets/datatable-core.css | 8 +- .../yui/build/datatable/assets/datatable.css | 6 +- .../assets/skins/sam/datatable-skin.css | 6 +- .../datatable/assets/skins/sam/datatable.css | 10 +- .../yui/build/datatable/datatable-min.js | 56 +- .../yui/build/datatable/datatable.js | 3268 ++- .../yui/build/datemath/datemath-debug.js | 408 - .../yui/build/datemath/datemath-min.js | 8 +- .../javascript/yui/build/datemath/datemath.js | 8 +- include/javascript/yui/build/dom/dom-min.js | 12 +- include/javascript/yui/build/dom/dom.js | 400 +- .../yui/build/dragdrop/dragdrop-min.js | 14 +- .../javascript/yui/build/dragdrop/dragdrop.js | 28 +- .../yui/build/editor/assets/editor-core.css | 6 +- .../build/editor/assets/simpleeditor-core.css | 6 +- .../editor/assets/skins/sam/editor-skin.css | 6 +- .../build/editor/assets/skins/sam/editor.css | 6 +- .../assets/skins/sam/simpleeditor-skin.css | 6 +- .../editor/assets/skins/sam/simpleeditor.css | 8 +- .../javascript/yui/build/editor/editor-min.js | 36 +- include/javascript/yui/build/editor/editor.js | 35 +- .../yui/build/editor/simpleeditor-min.js | 30 +- .../yui/build/editor/simpleeditor.js | 34 +- .../element-delegate-debug.js | 141 - .../element-delegate/element-delegate-min.js | 8 +- .../element-delegate/element-delegate.js | 8 +- .../yui/build/element/element-min.js | 10 +- .../javascript/yui/build/element/element.js | 29 +- .../event-delegate/event-delegate-debug.js | 283 - .../event-delegate/event-delegate-min.js | 8 +- .../build/event-delegate/event-delegate.js | 8 +- .../event-mouseenter-debug.js | 219 - .../event-mouseenter/event-mouseenter-min.js | 8 +- .../event-mouseenter/event-mouseenter.js | 311 +- .../event-simulate/event-simulate-debug.js | 622 - .../event-simulate/event-simulate-min.js | 8 +- .../build/event-simulate/event-simulate.js | 174 +- .../javascript/yui/build/event/event-min.js | 16 +- include/javascript/yui/build/event/event.js | 473 +- .../javascript/yui/build/fonts/fonts-min.css | 8 +- include/javascript/yui/build/fonts/fonts.css | 7 +- include/javascript/yui/build/get/get-min.js | 8 +- include/javascript/yui/build/get/get.js | 333 +- .../javascript/yui/build/grids/grids-min.css | 8 +- include/javascript/yui/build/grids/grids.css | 16 +- .../yui/build/history/history-min.js | 8 +- .../javascript/yui/build/history/history.js | 128 +- .../imagecropper/assets/imagecropper-core.css | 6 +- .../assets/skins/sam/imagecropper-skin.css | 6 +- .../assets/skins/sam/imagecropper.css | 6 +- .../build/imagecropper/imagecropper-min.js | 8 +- .../yui/build/imagecropper/imagecropper.js | 12 +- .../yui/build/imageloader/imageloader-min.js | 8 +- .../yui/build/imageloader/imageloader.js | 54 +- include/javascript/yui/build/json/json-min.js | 8 +- include/javascript/yui/build/json/json.js | 18 +- .../yui/build/layout/assets/layout-core.css | 6 +- .../layout/assets/skins/sam/layout-skin.css | 6 +- .../build/layout/assets/skins/sam/layout.css | 6 +- .../javascript/yui/build/layout/layout-min.js | 14 +- include/javascript/yui/build/layout/layout.js | 41 +- .../yui/build/logger/assets/logger-core.css | 6 +- .../yui/build/logger/assets/logger.css | 6 +- .../logger/assets/skins/sam/logger-skin.css | 6 +- .../build/logger/assets/skins/sam/logger.css | 8 +- .../javascript/yui/build/logger/logger-min.js | 12 +- include/javascript/yui/build/logger/logger.js | 45 +- .../yui/build/menu/assets/menu-core.css | 6 +- .../javascript/yui/build/menu/assets/menu.css | 6 +- .../build/menu/assets/skins/sam/menu-skin.css | 6 +- .../yui/build/menu/assets/skins/sam/menu.css | 6 +- include/javascript/yui/build/menu/menu-min.js | 26 +- include/javascript/yui/build/menu/menu.js | 4174 ++- .../build/paginator/assets/paginator-core.css | 6 +- .../assets/skins/sam/paginator-skin.css | 6 +- .../paginator/assets/skins/sam/paginator.css | 8 +- .../yui/build/paginator/paginator-min.js | 15 +- .../yui/build/paginator/paginator.js | 321 +- .../yui/build/profiler/profiler-min.js | 8 +- .../javascript/yui/build/profiler/profiler.js | 8 +- .../assets/profilerviewer-core.css | 6 +- .../assets/skins/sam/profilerviewer-skin.css | 8 +- .../assets/skins/sam/profilerviewer.css | 8 +- .../profilerviewer/profilerviewer-min.js | 10 +- .../build/profilerviewer/profilerviewer.js | 20 +- .../progressbar/assets/progressbar-core.css | 6 +- .../assets/skins/sam/progressbar-skin.css | 6 +- .../assets/skins/sam/progressbar.css | 8 +- .../build/progressbar/progressbar-debug.js | 691 - .../yui/build/progressbar/progressbar-min.js | 10 +- .../yui/build/progressbar/progressbar.js | 219 +- .../reset-fonts-grids/reset-fonts-grids.css | 8 +- .../yui/build/reset-fonts/reset-fonts.css | 8 +- .../javascript/yui/build/reset/reset-min.css | 8 +- include/javascript/yui/build/reset/reset.css | 43 +- .../yui/build/resize/assets/resize-core.css | 6 +- .../resize/assets/skins/sam/resize-skin.css | 6 +- .../build/resize/assets/skins/sam/resize.css | 6 +- .../javascript/yui/build/resize/resize-min.js | 8 +- include/javascript/yui/build/resize/resize.js | 26 +- .../yui/build/selector/selector-min.js | 10 +- .../javascript/yui/build/selector/selector.js | 1350 +- .../slider/assets/skins/sam/slider-skin.css | 6 +- .../build/slider/assets/skins/sam/slider.css | 6 +- .../yui/build/slider/assets/slider-core.css | 6 +- .../yui/build/slider/assets/slider-skin.css | 6 +- .../javascript/yui/build/slider/slider-min.js | 8 +- include/javascript/yui/build/slider/slider.js | 8 +- .../yui/build/storage/storage-debug.js | 1185 - .../yui/build/storage/storage-min.js | 10 +- .../javascript/yui/build/storage/storage.js | 1004 +- .../yui/build/stylesheet/stylesheet-debug.js | 648 - .../yui/build/stylesheet/stylesheet-min.js | 8 +- .../yui/build/stylesheet/stylesheet.js | 35 +- include/javascript/yui/build/swf/swf-debug.js | 269 - include/javascript/yui/build/swf/swf-min.js | 8 +- include/javascript/yui/build/swf/swf.js | 51 +- .../yui/build/swfdetect/swfdetect-debug.js | 93 - .../yui/build/swfdetect/swfdetect-min.js | 8 +- .../yui/build/swfdetect/swfdetect.js | 30 +- include/javascript/yui/build/swfstore/swf.js | 238 - .../yui/build/swfstore/swfstore-debug.js | 470 - .../yui/build/swfstore/swfstore-min.js | 8 +- .../javascript/yui/build/swfstore/swfstore.js | 19 +- .../yui/build/swfstore/swfstore.swf | Bin 4819 -> 4897 bytes .../yui/build/tabview/assets/border_tabs.css | 6 +- .../yui/build/tabview/assets/skin-sam.css | 6 +- .../tabview/assets/skins/sam/tabview-skin.css | 7 +- .../tabview/assets/skins/sam/tabview.css | 10 +- .../yui/build/tabview/assets/tabview-core.css | 6 +- .../yui/build/tabview/assets/tabview.css | 6 +- .../yui/build/tabview/tabview-min.js | 10 +- .../javascript/yui/build/tabview/tabview.js | 73 +- .../assets/skins/sam/treeview-skin.css | 6 +- .../treeview/assets/skins/sam/treeview.css | 8 +- .../build/treeview/assets/treeview-core.css | 6 +- .../yui/build/treeview/treeview-min.js | 18 +- .../javascript/yui/build/treeview/treeview.js | 1048 +- .../yui/build/uploader/assets/uploader.swf | Bin 7098 -> 7175 bytes .../yui/build/uploader/uploader-min.js | 12 +- .../javascript/yui/build/uploader/uploader.js | 26 +- .../yui/build/utilities/utilities.js | 48 +- .../build/yahoo-dom-event/yahoo-dom-event.js | 22 +- .../javascript/yui/build/yahoo/yahoo-min.js | 9 +- include/javascript/yui/build/yahoo/yahoo.js | 430 +- .../yuiloader-dom-event.js | 28 +- .../yui/build/yuiloader/yuiloader-min.js | 15 +- .../yui/build/yuiloader/yuiloader.js | 1152 +- .../yuitest/assets/skins/sam/yuitest-skin.css | 6 +- .../yuitest/assets/skins/sam/yuitest.css | 6 +- .../yui/build/yuitest/assets/testlogger.css | 8 +- .../yui/build/yuitest/assets/yuitest-core.css | 6 +- .../yui/build/yuitest/yuitest-min.js | 15 +- .../javascript/yui/build/yuitest/yuitest.js | 529 +- .../yui/build/yuitest/yuitest_core-min.js | 12 +- .../yui/build/yuitest/yuitest_core.js | 236 +- include/javascript/yui/index.html | 37 +- .../yui3/assets/dpSyntaxHighlighter.js | 2 +- include/javascript/yui3/assets/syntax.js | 4 +- .../yui3/build/anim/anim-base-min.js | 10 +- .../javascript/yui3/build/anim/anim-base.js | 30 +- .../yui3/build/anim/anim-color-min.js | 10 +- .../javascript/yui3/build/anim/anim-color.js | 10 +- .../yui3/build/anim/anim-curve-min.js | 10 +- .../javascript/yui3/build/anim/anim-curve.js | 12 +- .../yui3/build/anim/anim-easing-min.js | 10 +- .../javascript/yui3/build/anim/anim-easing.js | 22 +- .../javascript/yui3/build/anim/anim-min.js | 10 +- .../yui3/build/anim/anim-node-plugin-min.js | 10 +- .../yui3/build/anim/anim-node-plugin.js | 10 +- .../yui3/build/anim/anim-scroll-min.js | 10 +- .../javascript/yui3/build/anim/anim-scroll.js | 10 +- .../javascript/yui3/build/anim/anim-xy-min.js | 10 +- include/javascript/yui3/build/anim/anim-xy.js | 10 +- include/javascript/yui3/build/anim/anim.js | 48 +- .../yui3/build/arraysort/arraysort-min.js | 8 + .../yui3/build/arraysort/arraysort.js | 15 + .../yui3/build/assets/skins/sam/arrows.png | Bin 0 -> 1293 bytes .../assets/skins/sam/autocomplete-list.css | 8 + .../build/assets/skins/sam/autocomplete.css | 8 + .../assets/skins/sam/console-filters.css | 10 +- .../yui3/build/assets/skins/sam/console.css | 10 +- .../build/assets/skins/sam/datatable-base.css | 9 + .../yui3/build/assets/skins/sam/datatable.css | 10 + .../yui3/build/assets/skins/sam/dial.css | 8 + .../build/assets/skins/sam/dt-arrow-dn.png | Bin 0 -> 116 bytes .../build/assets/skins/sam/dt-arrow-up.png | Bin 0 -> 116 bytes .../build/assets/skins/sam/node-flick.css | 8 + .../build/assets/skins/sam/node-menunav.css | 10 +- .../yui3/build/assets/skins/sam/overlay.css | 13 +- .../build/assets/skins/sam/rail-x-lines.png | Bin 0 -> 3656 bytes .../yui3/build/assets/skins/sam/rail-x.png | Bin 0 -> 3639 bytes .../build/assets/skins/sam/rail-y-lines.png | Bin 0 -> 3642 bytes .../yui3/build/assets/skins/sam/rail-y.png | Bin 0 -> 3629 bytes .../build/assets/skins/sam/resize-base.css | 8 + .../yui3/build/assets/skins/sam/resize.css | 8 + .../assets/skins/sam/scrollview-base.css | 8 + .../assets/skins/sam/scrollview-paginator.css | 8 + .../skins/sam/scrollview-scrollbars.css | 8 + .../yui3/build/assets/skins/sam/skin.css | 40 +- .../build/assets/skins/sam/slider-base.css | 8 + .../yui3/build/assets/skins/sam/slider.css | 10 +- .../yui3/build/assets/skins/sam/tabview.css | 8 + .../yui3/build/assets/skins/sam/test.css | 8 + .../yui3/build/assets/skins/sam/thumb-x.png | Bin 0 -> 3873 bytes .../yui3/build/assets/skins/sam/thumb-y.png | Bin 0 -> 3860 bytes .../yui3/build/assets/skins/sam/tmp.txt | 471 + .../build/assets/skins/sam/widget-base.css | 8 + .../build/assets/skins/sam/widget-stack.css | 10 +- .../yui3/build/assets/skins/sam/widget.css | 10 +- .../yui3/build/async-queue/async-queue-min.js | 10 +- .../yui3/build/async-queue/async-queue.js | 12 +- .../build/attribute/attribute-base-min.js | 10 +- .../yui3/build/attribute/attribute-base.js | 31 +- .../build/attribute/attribute-complex-min.js | 10 +- .../yui3/build/attribute/attribute-complex.js | 14 +- .../yui3/build/attribute/attribute-min.js | 10 +- .../yui3/build/attribute/attribute.js | 37 +- .../assets/autocomplete-list-core.css | 32 + .../skins/sam/autocomplete-list-skin.css | 24 + .../assets/skins/sam/autocomplete-list.css | 8 + .../assets/skins/sam/autocomplete.css | 8 + .../autocomplete/autocomplete-base-min.js | 8 + .../build/autocomplete/autocomplete-base.js | 43 + .../autocomplete-filters-accentfold-min.js | 8 + .../autocomplete-filters-accentfold.js | 8 + .../autocomplete/autocomplete-filters-min.js | 8 + .../autocomplete/autocomplete-filters.js | 11 + ...utocomplete-highlighters-accentfold-min.js | 8 + .../autocomplete-highlighters-accentfold.js | 8 + .../autocomplete-highlighters-min.js | 8 + .../autocomplete/autocomplete-highlighters.js | 8 + .../autocomplete-list-keys-min.js | 8 + .../autocomplete/autocomplete-list-keys.js | 11 + .../autocomplete/autocomplete-list-min.js | 8 + .../build/autocomplete/autocomplete-list.js | 19 + .../build/autocomplete/autocomplete-min.js | 8 + .../autocomplete/autocomplete-plugin-min.js | 8 + .../build/autocomplete/autocomplete-plugin.js | 10 + .../autocomplete/autocomplete-sources-min.js | 8 + .../autocomplete/autocomplete-sources.js | 17 + .../yui3/build/autocomplete/autocomplete.js | 65 + .../autocomplete/lang/autocomplete-list.js | 8 + .../autocomplete/lang/autocomplete-list_en.js | 8 + .../build/autocomplete/lang/autocomplete.js | 8 + .../autocomplete/lang/autocomplete_en.js | 8 + .../yui3/build/base/base-base-min.js | 10 +- .../javascript/yui3/build/base/base-base.js | 20 +- .../yui3/build/base/base-build-min.js | 10 +- .../javascript/yui3/build/base/base-build.js | 33 +- .../javascript/yui3/build/base/base-min.js | 10 +- .../yui3/build/base/base-pluginhost-min.js | 10 +- .../yui3/build/base/base-pluginhost.js | 10 +- include/javascript/yui3/build/base/base.js | 43 +- .../yui3/build/cache/cache-base-min.js | 8 + .../javascript/yui3/build/cache/cache-base.js | 16 + .../javascript/yui3/build/cache/cache-min.js | 10 +- .../yui3/build/cache/cache-offline-min.js | 8 + .../yui3/build/cache/cache-offline.js | 20 + .../yui3/build/cache/cache-plugin-min.js | 8 + .../yui3/build/cache/cache-plugin.js | 9 + include/javascript/yui3/build/cache/cache.js | 36 +- .../yui3/build/charts/charts-min.js | 8 + .../javascript/yui3/build/charts/charts.js | 2077 ++ .../classnamemanager/classnamemanager-min.js | 10 +- .../classnamemanager/classnamemanager.js | 12 +- .../yui3/build/collection/array-extras-min.js | 8 + .../yui3/build/collection/array-extras.js | 18 + .../yui3/build/collection/array-invoke-min.js | 8 + .../yui3/build/collection/array-invoke.js | 8 + .../build/collection/arraylist-add-min.js | 8 + .../yui3/build/collection/arraylist-add.js | 11 + .../build/collection/arraylist-filter-min.js | 8 + .../yui3/build/collection/arraylist-filter.js | 8 + .../yui3/build/collection/arraylist-min.js | 8 + .../yui3/build/collection/arraylist.js | 9 + .../yui3/build/collection/collection-min.js | 10 +- .../yui3/build/collection/collection.js | 30 +- .../yui3/build/compat/compat-min.js | 10 +- .../javascript/yui3/build/compat/compat.js | 35 +- .../build/console/assets/console-core.css | 8 +- .../console/assets/console-filters-core.css | 8 +- .../assets/skins/sam/console-filters-skin.css | 18 +- .../assets/skins/sam/console-filters.css | 10 +- .../console/assets/skins/sam/console-skin.css | 84 +- .../console/assets/skins/sam/console.css | 10 +- .../yui3/build/console/console-filters-min.js | 10 +- .../yui3/build/console/console-filters.js | 22 +- .../yui3/build/console/console-min.js | 10 +- .../javascript/yui3/build/console/console.js | 30 +- .../yui3/build/console/lang/console.js | 8 + .../yui3/build/console/lang/console_en.js | 8 + .../yui3/build/console/lang/console_es.js | 8 + .../yui3/build/cookie/cookie-min.js | 10 +- .../javascript/yui3/build/cookie/cookie.js | 12 +- .../yui3/build/cssbase/base-context-min.css | 10 +- .../yui3/build/cssbase/base-context.css | 42 +- .../yui3/build/cssbase/base-min.css | 8 +- .../javascript/yui3/build/cssbase/base.css | 8 +- .../yui3/build/cssfonts/fonts-context-min.css | 10 +- .../yui3/build/cssfonts/fonts-context.css | 30 +- .../yui3/build/cssfonts/fonts-min.css | 8 +- .../javascript/yui3/build/cssfonts/fonts.css | 8 +- .../cssgrids-deprecated/grids-context-min.css | 9 + .../cssgrids-deprecated/grids-context.css | 491 + .../build/cssgrids-deprecated/grids-min.css | 8 + .../yui3/build/cssgrids-deprecated/grids.css | 481 + .../yui3/build/cssgrids/grids-context-min.css | 8 - .../yui3/build/cssgrids/grids-context.css | 491 - .../yui3/build/cssgrids/grids-min.css | 10 +- .../javascript/yui3/build/cssgrids/grids.css | 517 +- .../yui3/build/cssreset/reset-context-min.css | 10 +- .../yui3/build/cssreset/reset-context.css | 128 +- .../yui3/build/cssreset/reset-min.css | 8 +- .../javascript/yui3/build/cssreset/reset.css | 8 +- .../build/dataschema/dataschema-array-min.js | 10 +- .../yui3/build/dataschema/dataschema-array.js | 14 +- .../build/dataschema/dataschema-base-min.js | 10 +- .../yui3/build/dataschema/dataschema-base.js | 10 +- .../build/dataschema/dataschema-json-min.js | 10 +- .../yui3/build/dataschema/dataschema-json.js | 25 +- .../yui3/build/dataschema/dataschema-min.js | 10 +- .../build/dataschema/dataschema-text-min.js | 10 +- .../yui3/build/dataschema/dataschema-text.js | 14 +- .../build/dataschema/dataschema-xml-min.js | 10 +- .../yui3/build/dataschema/dataschema-xml.js | 38 +- .../yui3/build/dataschema/dataschema.js | 63 +- .../datasource/datasource-arrayschema-min.js | 10 +- .../datasource/datasource-arrayschema.js | 12 +- .../build/datasource/datasource-cache-min.js | 10 +- .../yui3/build/datasource/datasource-cache.js | 11 +- .../datasource/datasource-function-min.js | 10 +- .../build/datasource/datasource-function.js | 14 +- .../build/datasource/datasource-get-min.js | 10 +- .../yui3/build/datasource/datasource-get.js | 12 +- .../build/datasource/datasource-io-min.js | 10 +- .../yui3/build/datasource/datasource-io.js | 12 +- .../datasource/datasource-jsonschema-min.js | 10 +- .../build/datasource/datasource-jsonschema.js | 12 +- .../build/datasource/datasource-local-min.js | 10 +- .../yui3/build/datasource/datasource-local.js | 14 +- .../yui3/build/datasource/datasource-min.js | 10 +- .../datasource/datasource-polling-min.js | 10 +- .../build/datasource/datasource-polling.js | 11 +- .../datasource/datasource-textschema-min.js | 10 +- .../build/datasource/datasource-textschema.js | 12 +- .../datasource/datasource-xmlschema-min.js | 10 +- .../build/datasource/datasource-xmlschema.js | 12 +- .../yui3/build/datasource/datasource.js | 34 +- .../datatable/assets/datatable-base-core.css | 94 + .../build/datatable/assets/datatable-core.css | 94 + .../assets/skins/sam/datatable-base-skin.css | 244 + .../assets/skins/sam/datatable-base.css | 9 + .../datatable/assets/skins/sam/datatable.css | 10 + .../assets/skins/sam/dt-arrow-dn.png | Bin 0 -> 116 bytes .../assets/skins/sam/dt-arrow-up.png | Bin 0 -> 116 bytes .../build/datatable/assets/skins/sam/tmp.txt | 471 + .../build/datatable/datatable-base-min.js | 8 + .../yui3/build/datatable/datatable-base.js | 46 + .../datatable/datatable-datasource-min.js | 8 + .../build/datatable/datatable-datasource.js | 9 + .../yui3/build/datatable/datatable-min.js | 8 + .../build/datatable/datatable-scroll-min.js | 8 + .../yui3/build/datatable/datatable-scroll.js | 25 + .../build/datatable/datatable-sort-min.js | 8 + .../yui3/build/datatable/datatable-sort.js | 15 + .../yui3/build/datatable/datatable.js | 71 + .../build/datatable/lang/datatable-base.js | 8 + .../build/datatable/lang/datatable-base_en.js | 8 + .../build/datatable/lang/datatable-sort.js | 8 + .../build/datatable/lang/datatable-sort_en.js | 8 + .../yui3/build/datatable/lang/datatable.js | 8 + .../yui3/build/datatable/lang/datatable_en.js | 8 + .../datatype/datatype-date-format-min.js | 10 +- .../build/datatype/datatype-date-format.js | 20 +- .../yui3/build/datatype/datatype-date-min.js | 10 +- .../build/datatype/datatype-date-parse-min.js | 10 +- .../build/datatype/datatype-date-parse.js | 10 +- .../yui3/build/datatype/datatype-date.js | 22 +- .../yui3/build/datatype/datatype-min.js | 10 +- .../datatype/datatype-number-format-min.js | 10 +- .../build/datatype/datatype-number-format.js | 10 +- .../build/datatype/datatype-number-min.js | 10 +- .../datatype/datatype-number-parse-min.js | 10 +- .../build/datatype/datatype-number-parse.js | 10 +- .../yui3/build/datatype/datatype-number.js | 12 +- .../build/datatype/datatype-xml-format-min.js | 10 +- .../build/datatype/datatype-xml-format.js | 10 +- .../yui3/build/datatype/datatype-xml-min.js | 10 +- .../build/datatype/datatype-xml-parse-min.js | 10 +- .../yui3/build/datatype/datatype-xml-parse.js | 16 +- .../yui3/build/datatype/datatype-xml.js | 18 +- .../yui3/build/datatype/datatype.js | 34 +- .../datatype/lang/datatype-date-format.js | 8 + .../lang/datatype-date-format_ar-JO.js | 8 + .../datatype/lang/datatype-date-format_ar.js | 8 + .../lang/datatype-date-format_ca-ES.js | 8 + .../datatype/lang/datatype-date-format_ca.js | 8 + .../lang/datatype-date-format_da-DK.js | 8 + .../datatype/lang/datatype-date-format_da.js | 8 + .../lang/datatype-date-format_de-AT.js | 8 + .../lang/datatype-date-format_de-DE.js | 8 + .../datatype/lang/datatype-date-format_de.js | 8 + .../lang/datatype-date-format_el-GR.js | 8 + .../datatype/lang/datatype-date-format_el.js | 8 + .../lang/datatype-date-format_en-AU.js | 8 + .../lang/datatype-date-format_en-CA.js | 8 + .../lang/datatype-date-format_en-GB.js | 8 + .../lang/datatype-date-format_en-IE.js | 8 + .../lang/datatype-date-format_en-IN.js | 8 + .../lang/datatype-date-format_en-JO.js | 8 + .../lang/datatype-date-format_en-MY.js | 8 + .../lang/datatype-date-format_en-NZ.js | 8 + .../lang/datatype-date-format_en-PH.js | 8 + .../lang/datatype-date-format_en-SG.js | 8 + .../lang/datatype-date-format_en-US.js | 8 + .../datatype/lang/datatype-date-format_en.js | 8 + .../lang/datatype-date-format_es-AR.js | 8 + .../lang/datatype-date-format_es-BO.js | 8 + .../lang/datatype-date-format_es-CL.js | 8 + .../lang/datatype-date-format_es-CO.js | 8 + .../lang/datatype-date-format_es-EC.js | 8 + .../lang/datatype-date-format_es-ES.js | 8 + .../lang/datatype-date-format_es-MX.js | 8 + .../lang/datatype-date-format_es-PE.js | 8 + .../lang/datatype-date-format_es-PY.js | 8 + .../lang/datatype-date-format_es-US.js | 8 + .../lang/datatype-date-format_es-UY.js | 8 + .../lang/datatype-date-format_es-VE.js | 8 + .../datatype/lang/datatype-date-format_es.js | 8 + .../lang/datatype-date-format_fi-FI.js | 8 + .../datatype/lang/datatype-date-format_fi.js | 8 + .../lang/datatype-date-format_fr-BE.js | 8 + .../lang/datatype-date-format_fr-CA.js | 8 + .../lang/datatype-date-format_fr-FR.js | 8 + .../datatype/lang/datatype-date-format_fr.js | 8 + .../lang/datatype-date-format_hi-IN.js | 8 + .../datatype/lang/datatype-date-format_hi.js | 8 + .../lang/datatype-date-format_id-ID.js | 8 + .../datatype/lang/datatype-date-format_id.js | 8 + .../lang/datatype-date-format_it-IT.js | 8 + .../datatype/lang/datatype-date-format_it.js | 8 + .../lang/datatype-date-format_ja-JP.js | 8 + .../datatype/lang/datatype-date-format_ja.js | 8 + .../lang/datatype-date-format_ko-KR.js | 8 + .../datatype/lang/datatype-date-format_ko.js | 8 + .../lang/datatype-date-format_ms-MY.js | 8 + .../datatype/lang/datatype-date-format_ms.js | 8 + .../lang/datatype-date-format_nb-NO.js | 8 + .../datatype/lang/datatype-date-format_nb.js | 8 + .../lang/datatype-date-format_nl-BE.js | 8 + .../lang/datatype-date-format_nl-NL.js | 8 + .../datatype/lang/datatype-date-format_nl.js | 8 + .../lang/datatype-date-format_pl-PL.js | 8 + .../datatype/lang/datatype-date-format_pl.js | 8 + .../lang/datatype-date-format_pt-BR.js | 8 + .../datatype/lang/datatype-date-format_pt.js | 8 + .../lang/datatype-date-format_ro-RO.js | 8 + .../datatype/lang/datatype-date-format_ro.js | 8 + .../lang/datatype-date-format_ru-RU.js | 8 + .../datatype/lang/datatype-date-format_ru.js | 8 + .../lang/datatype-date-format_sv-SE.js | 8 + .../datatype/lang/datatype-date-format_sv.js | 8 + .../lang/datatype-date-format_th-TH.js | 8 + .../datatype/lang/datatype-date-format_th.js | 8 + .../lang/datatype-date-format_tr-TR.js | 8 + .../datatype/lang/datatype-date-format_tr.js | 8 + .../lang/datatype-date-format_vi-VN.js | 8 + .../datatype/lang/datatype-date-format_vi.js | 8 + .../lang/datatype-date-format_zh-Hans-CN.js | 8 + .../lang/datatype-date-format_zh-Hans.js | 8 + .../lang/datatype-date-format_zh-Hant-HK.js | 8 + .../lang/datatype-date-format_zh-Hant-TW.js | 8 + .../lang/datatype-date-format_zh-Hant.js | 8 + .../yui3/build/datatype/lang/datatype-date.js | 8 + .../datatype/lang/datatype-date_ar-JO.js | 8 + .../build/datatype/lang/datatype-date_ar.js | 8 + .../datatype/lang/datatype-date_ca-ES.js | 8 + .../build/datatype/lang/datatype-date_ca.js | 8 + .../datatype/lang/datatype-date_da-DK.js | 8 + .../build/datatype/lang/datatype-date_da.js | 8 + .../datatype/lang/datatype-date_de-AT.js | 8 + .../datatype/lang/datatype-date_de-DE.js | 8 + .../build/datatype/lang/datatype-date_de.js | 8 + .../datatype/lang/datatype-date_el-GR.js | 8 + .../build/datatype/lang/datatype-date_el.js | 8 + .../datatype/lang/datatype-date_en-AU.js | 8 + .../datatype/lang/datatype-date_en-CA.js | 8 + .../datatype/lang/datatype-date_en-GB.js | 8 + .../datatype/lang/datatype-date_en-IE.js | 8 + .../datatype/lang/datatype-date_en-IN.js | 8 + .../datatype/lang/datatype-date_en-JO.js | 8 + .../datatype/lang/datatype-date_en-MY.js | 8 + .../datatype/lang/datatype-date_en-NZ.js | 8 + .../datatype/lang/datatype-date_en-PH.js | 8 + .../datatype/lang/datatype-date_en-SG.js | 8 + .../datatype/lang/datatype-date_en-US.js | 8 + .../build/datatype/lang/datatype-date_en.js | 8 + .../datatype/lang/datatype-date_es-AR.js | 8 + .../datatype/lang/datatype-date_es-BO.js | 8 + .../datatype/lang/datatype-date_es-CL.js | 8 + .../datatype/lang/datatype-date_es-CO.js | 8 + .../datatype/lang/datatype-date_es-EC.js | 8 + .../datatype/lang/datatype-date_es-ES.js | 8 + .../datatype/lang/datatype-date_es-MX.js | 8 + .../datatype/lang/datatype-date_es-PE.js | 8 + .../datatype/lang/datatype-date_es-PY.js | 8 + .../datatype/lang/datatype-date_es-US.js | 8 + .../datatype/lang/datatype-date_es-UY.js | 8 + .../datatype/lang/datatype-date_es-VE.js | 8 + .../build/datatype/lang/datatype-date_es.js | 8 + .../datatype/lang/datatype-date_fi-FI.js | 8 + .../build/datatype/lang/datatype-date_fi.js | 8 + .../datatype/lang/datatype-date_fr-BE.js | 8 + .../datatype/lang/datatype-date_fr-CA.js | 8 + .../datatype/lang/datatype-date_fr-FR.js | 8 + .../build/datatype/lang/datatype-date_fr.js | 8 + .../datatype/lang/datatype-date_hi-IN.js | 8 + .../build/datatype/lang/datatype-date_hi.js | 8 + .../datatype/lang/datatype-date_id-ID.js | 8 + .../build/datatype/lang/datatype-date_id.js | 8 + .../datatype/lang/datatype-date_it-IT.js | 8 + .../build/datatype/lang/datatype-date_it.js | 8 + .../datatype/lang/datatype-date_ja-JP.js | 8 + .../build/datatype/lang/datatype-date_ja.js | 8 + .../datatype/lang/datatype-date_ko-KR.js | 8 + .../build/datatype/lang/datatype-date_ko.js | 8 + .../datatype/lang/datatype-date_ms-MY.js | 8 + .../build/datatype/lang/datatype-date_ms.js | 8 + .../datatype/lang/datatype-date_nb-NO.js | 8 + .../build/datatype/lang/datatype-date_nb.js | 8 + .../datatype/lang/datatype-date_nl-BE.js | 8 + .../datatype/lang/datatype-date_nl-NL.js | 8 + .../build/datatype/lang/datatype-date_nl.js | 8 + .../datatype/lang/datatype-date_pl-PL.js | 8 + .../build/datatype/lang/datatype-date_pl.js | 8 + .../datatype/lang/datatype-date_pt-BR.js | 8 + .../build/datatype/lang/datatype-date_pt.js | 8 + .../datatype/lang/datatype-date_ro-RO.js | 8 + .../build/datatype/lang/datatype-date_ro.js | 8 + .../datatype/lang/datatype-date_ru-RU.js | 8 + .../build/datatype/lang/datatype-date_ru.js | 8 + .../datatype/lang/datatype-date_sv-SE.js | 8 + .../build/datatype/lang/datatype-date_sv.js | 8 + .../datatype/lang/datatype-date_th-TH.js | 8 + .../build/datatype/lang/datatype-date_th.js | 8 + .../datatype/lang/datatype-date_tr-TR.js | 8 + .../build/datatype/lang/datatype-date_tr.js | 8 + .../datatype/lang/datatype-date_vi-VN.js | 8 + .../build/datatype/lang/datatype-date_vi.js | 8 + .../datatype/lang/datatype-date_zh-Hans-CN.js | 8 + .../datatype/lang/datatype-date_zh-Hans.js | 8 + .../datatype/lang/datatype-date_zh-Hant-HK.js | 8 + .../datatype/lang/datatype-date_zh-Hant-TW.js | 8 + .../datatype/lang/datatype-date_zh-Hant.js | 8 + .../yui3/build/datatype/lang/datatype.js | 8 + .../build/datatype/lang/datatype_ar-JO.js | 8 + .../yui3/build/datatype/lang/datatype_ar.js | 8 + .../build/datatype/lang/datatype_ca-ES.js | 8 + .../yui3/build/datatype/lang/datatype_ca.js | 8 + .../build/datatype/lang/datatype_da-DK.js | 8 + .../yui3/build/datatype/lang/datatype_da.js | 8 + .../build/datatype/lang/datatype_de-AT.js | 8 + .../build/datatype/lang/datatype_de-DE.js | 8 + .../yui3/build/datatype/lang/datatype_de.js | 8 + .../build/datatype/lang/datatype_el-GR.js | 8 + .../yui3/build/datatype/lang/datatype_el.js | 8 + .../build/datatype/lang/datatype_en-AU.js | 8 + .../build/datatype/lang/datatype_en-CA.js | 8 + .../build/datatype/lang/datatype_en-GB.js | 8 + .../build/datatype/lang/datatype_en-IE.js | 8 + .../build/datatype/lang/datatype_en-IN.js | 8 + .../build/datatype/lang/datatype_en-JO.js | 8 + .../build/datatype/lang/datatype_en-MY.js | 8 + .../build/datatype/lang/datatype_en-NZ.js | 8 + .../build/datatype/lang/datatype_en-PH.js | 8 + .../build/datatype/lang/datatype_en-SG.js | 8 + .../build/datatype/lang/datatype_en-US.js | 8 + .../yui3/build/datatype/lang/datatype_en.js | 8 + .../build/datatype/lang/datatype_es-AR.js | 8 + .../build/datatype/lang/datatype_es-BO.js | 8 + .../build/datatype/lang/datatype_es-CL.js | 8 + .../build/datatype/lang/datatype_es-CO.js | 8 + .../build/datatype/lang/datatype_es-EC.js | 8 + .../build/datatype/lang/datatype_es-ES.js | 8 + .../build/datatype/lang/datatype_es-MX.js | 8 + .../build/datatype/lang/datatype_es-PE.js | 8 + .../build/datatype/lang/datatype_es-PY.js | 8 + .../build/datatype/lang/datatype_es-US.js | 8 + .../build/datatype/lang/datatype_es-UY.js | 8 + .../build/datatype/lang/datatype_es-VE.js | 8 + .../yui3/build/datatype/lang/datatype_es.js | 8 + .../build/datatype/lang/datatype_fi-FI.js | 8 + .../yui3/build/datatype/lang/datatype_fi.js | 8 + .../build/datatype/lang/datatype_fr-BE.js | 8 + .../build/datatype/lang/datatype_fr-CA.js | 8 + .../build/datatype/lang/datatype_fr-FR.js | 8 + .../yui3/build/datatype/lang/datatype_fr.js | 8 + .../build/datatype/lang/datatype_hi-IN.js | 8 + .../yui3/build/datatype/lang/datatype_hi.js | 8 + .../build/datatype/lang/datatype_id-ID.js | 8 + .../yui3/build/datatype/lang/datatype_id.js | 8 + .../build/datatype/lang/datatype_it-IT.js | 8 + .../yui3/build/datatype/lang/datatype_it.js | 8 + .../build/datatype/lang/datatype_ja-JP.js | 8 + .../yui3/build/datatype/lang/datatype_ja.js | 8 + .../build/datatype/lang/datatype_ko-KR.js | 8 + .../yui3/build/datatype/lang/datatype_ko.js | 8 + .../build/datatype/lang/datatype_ms-MY.js | 8 + .../yui3/build/datatype/lang/datatype_ms.js | 8 + .../build/datatype/lang/datatype_nb-NO.js | 8 + .../yui3/build/datatype/lang/datatype_nb.js | 8 + .../build/datatype/lang/datatype_nl-BE.js | 8 + .../build/datatype/lang/datatype_nl-NL.js | 8 + .../yui3/build/datatype/lang/datatype_nl.js | 8 + .../build/datatype/lang/datatype_pl-PL.js | 8 + .../yui3/build/datatype/lang/datatype_pl.js | 8 + .../build/datatype/lang/datatype_pt-BR.js | 8 + .../yui3/build/datatype/lang/datatype_pt.js | 8 + .../build/datatype/lang/datatype_ro-RO.js | 8 + .../yui3/build/datatype/lang/datatype_ro.js | 8 + .../build/datatype/lang/datatype_ru-RU.js | 8 + .../yui3/build/datatype/lang/datatype_ru.js | 8 + .../build/datatype/lang/datatype_sv-SE.js | 8 + .../yui3/build/datatype/lang/datatype_sv.js | 8 + .../build/datatype/lang/datatype_th-TH.js | 8 + .../yui3/build/datatype/lang/datatype_th.js | 8 + .../build/datatype/lang/datatype_tr-TR.js | 8 + .../yui3/build/datatype/lang/datatype_tr.js | 8 + .../build/datatype/lang/datatype_vi-VN.js | 8 + .../yui3/build/datatype/lang/datatype_vi.js | 8 + .../datatype/lang/datatype_zh-Hans-CN.js | 8 + .../build/datatype/lang/datatype_zh-Hans.js | 8 + .../datatype/lang/datatype_zh-Hant-HK.js | 8 + .../datatype/lang/datatype_zh-Hant-TW.js | 8 + .../build/datatype/lang/datatype_zh-Hant.js | 8 + .../yui3/build/dd/dd-constrain-min.js | 10 +- .../javascript/yui3/build/dd/dd-constrain.js | 28 +- .../yui3/build/dd/dd-ddm-base-min.js | 10 +- .../javascript/yui3/build/dd/dd-ddm-base.js | 20 +- .../yui3/build/dd/dd-ddm-drop-min.js | 10 +- .../javascript/yui3/build/dd/dd-ddm-drop.js | 19 +- .../javascript/yui3/build/dd/dd-ddm-min.js | 10 +- include/javascript/yui3/build/dd/dd-ddm.js | 13 +- .../yui3/build/dd/dd-delegate-min.js | 8 + .../javascript/yui3/build/dd/dd-delegate.js | 16 + .../javascript/yui3/build/dd/dd-drag-min.js | 10 +- include/javascript/yui3/build/dd/dd-drag.js | 48 +- .../javascript/yui3/build/dd/dd-drop-min.js | 10 +- .../yui3/build/dd/dd-drop-plugin-min.js | 10 +- .../yui3/build/dd/dd-drop-plugin.js | 10 +- include/javascript/yui3/build/dd/dd-drop.js | 28 +- .../yui3/build/dd/dd-gestures-min.js | 8 + .../javascript/yui3/build/dd/dd-gestures.js | 8 + include/javascript/yui3/build/dd/dd-min.js | 10 +- .../javascript/yui3/build/dd/dd-plugin-min.js | 10 +- include/javascript/yui3/build/dd/dd-plugin.js | 10 +- .../javascript/yui3/build/dd/dd-proxy-min.js | 10 +- include/javascript/yui3/build/dd/dd-proxy.js | 22 +- .../javascript/yui3/build/dd/dd-scroll-min.js | 10 +- include/javascript/yui3/build/dd/dd-scroll.js | 18 +- include/javascript/yui3/build/dd/dd.js | 136 +- .../yui3/build/dial/assets/dial-core.css | 45 + .../build/dial/assets/skins/sam/dial-skin.css | 115 + .../yui3/build/dial/assets/skins/sam/dial.css | 8 + .../javascript/yui3/build/dial/dial-min.js | 8 + include/javascript/yui3/build/dial/dial.js | 26 + .../javascript/yui3/build/dial/lang/dial.js | 8 + .../yui3/build/dial/lang/dial_en.js | 8 + .../yui3/build/dial/lang/dial_es.js | 8 + .../javascript/yui3/build/dom/dom-base-min.js | 10 +- include/javascript/yui3/build/dom/dom-base.js | 80 +- .../yui3/build/dom/dom-deprecated-min.js | 8 + .../yui3/build/dom/dom-deprecated.js | 10 + include/javascript/yui3/build/dom/dom-min.js | 10 +- .../yui3/build/dom/dom-screen-min.js | 10 +- .../javascript/yui3/build/dom/dom-screen.js | 34 +- .../yui3/build/dom/dom-style-ie-min.js | 8 + .../javascript/yui3/build/dom/dom-style-ie.js | 22 + .../yui3/build/dom/dom-style-min.js | 10 +- .../javascript/yui3/build/dom/dom-style.js | 49 +- include/javascript/yui3/build/dom/dom.js | 178 +- .../yui3/build/dom/selector-css2-min.js | 10 +- .../yui3/build/dom/selector-css2.js | 27 +- .../yui3/build/dom/selector-css3-min.js | 10 +- .../yui3/build/dom/selector-css3.js | 10 +- .../javascript/yui3/build/dom/selector-min.js | 10 +- .../yui3/build/dom/selector-native-min.js | 10 +- .../yui3/build/dom/selector-native.js | 28 +- include/javascript/yui3/build/dom/selector.js | 45 +- .../javascript/yui3/build/dump/dump-min.js | 10 +- include/javascript/yui3/build/dump/dump.js | 18 +- .../yui3/build/editor/createlink-base-min.js | 8 + .../yui3/build/editor/createlink-base.js | 10 + .../yui3/build/editor/editor-base-min.js | 8 + .../yui3/build/editor/editor-base.js | 52 + .../yui3/build/editor/editor-bidi-min.js | 8 + .../yui3/build/editor/editor-bidi.js | 16 + .../yui3/build/editor/editor-br-min.js | 8 + .../javascript/yui3/build/editor/editor-br.js | 11 + .../yui3/build/editor/editor-lists-min.js | 8 + .../yui3/build/editor/editor-lists.js | 15 + .../yui3/build/editor/editor-min.js | 8 + .../yui3/build/editor/editor-para-min.js | 8 + .../yui3/build/editor/editor-para.js | 33 + .../yui3/build/editor/editor-tab-min.js | 8 + .../yui3/build/editor/editor-tab.js | 9 + .../javascript/yui3/build/editor/editor.js | 185 + .../yui3/build/editor/exec-command-min.js | 8 + .../yui3/build/editor/exec-command.js | 22 + .../javascript/yui3/build/editor/frame-min.js | 8 + include/javascript/yui3/build/editor/frame.js | 42 + .../yui3/build/editor/selection-min.js | 8 + .../javascript/yui3/build/editor/selection.js | 47 + .../yui3/build/escape/escape-min.js | 8 + .../javascript/yui3/build/escape/escape.js | 8 + .../event-custom/event-custom-base-min.js | 10 +- .../build/event-custom/event-custom-base.js | 87 +- .../event-custom/event-custom-complex-min.js | 10 +- .../event-custom/event-custom-complex.js | 46 +- .../build/event-custom/event-custom-min.js | 10 +- .../yui3/build/event-custom/event-custom.js | 123 +- .../build/event-gestures/event-flick-min.js | 8 + .../yui3/build/event-gestures/event-flick.js | 18 + .../event-gestures/event-gestures-min.js | 8 + .../build/event-gestures/event-gestures.js | 31 + .../build/event-gestures/event-move-min.js | 8 + .../yui3/build/event-gestures/event-move.js | 21 + .../event-simulate/event-simulate-min.js | 10 +- .../build/event-simulate/event-simulate.js | 22 +- .../event-valuechange-min.js | 8 + .../event-valuechange/event-valuechange.js | 14 + .../yui3/build/event/event-base-ie-min.js | 8 + .../yui3/build/event/event-base-ie.js | 11 + .../yui3/build/event/event-base-min.js | 10 +- .../javascript/yui3/build/event/event-base.js | 74 +- .../yui3/build/event/event-delegate-min.js | 10 +- .../yui3/build/event/event-delegate.js | 42 +- .../yui3/build/event/event-focus-min.js | 10 +- .../yui3/build/event/event-focus.js | 17 +- .../yui3/build/event/event-hover-min.js | 8 + .../yui3/build/event/event-hover.js | 8 + .../yui3/build/event/event-key-min.js | 10 +- .../javascript/yui3/build/event/event-key.js | 10 +- .../javascript/yui3/build/event/event-min.js | 10 +- .../yui3/build/event/event-mouseenter-min.js | 10 +- .../yui3/build/event/event-mouseenter.js | 13 +- .../yui3/build/event/event-mousewheel-min.js | 10 +- .../yui3/build/event/event-mousewheel.js | 10 +- .../yui3/build/event/event-resize-min.js | 10 +- .../yui3/build/event/event-resize.js | 10 +- .../yui3/build/event/event-synthetic-min.js | 8 + .../yui3/build/event/event-synthetic.js | 20 + .../yui3/build/event/event-touch-min.js | 8 + .../yui3/build/event/event-touch.js | 13 + include/javascript/yui3/build/event/event.js | 134 +- include/javascript/yui3/build/get/get-min.js | 8 - include/javascript/yui3/build/get/get.js | 33 - .../highlight/highlight-accentfold-min.js | 8 + .../build/highlight/highlight-accentfold.js | 12 + .../build/highlight/highlight-base-min.js | 8 + .../yui3/build/highlight/highlight-base.js | 12 + .../yui3/build/highlight/highlight-min.js | 8 + .../yui3/build/highlight/highlight.js | 16 + .../history-deprecated-min.js | 8 + .../history-deprecated/history-deprecated.js | 39 + .../yui3/build/history/history-base-min.js | 8 + .../yui3/build/history/history-base.js | 15 + .../yui3/build/history/history-hash-ie-min.js | 8 + .../yui3/build/history/history-hash-ie.js | 10 + .../yui3/build/history/history-hash-min.js | 8 + .../yui3/build/history/history-hash.js | 16 + .../yui3/build/history/history-html5-min.js | 8 + .../yui3/build/history/history-html5.js | 12 + .../yui3/build/history/history-min.js | 10 +- .../javascript/yui3/build/history/history.js | 62 +- .../yui3/build/imageloader/imageloader-min.js | 10 +- .../yui3/build/imageloader/imageloader.js | 14 +- .../javascript/yui3/build/intl/intl-min.js | 8 + include/javascript/yui3/build/intl/intl.js | 10 + .../javascript/yui3/build/io/io-base-min.js | 10 +- include/javascript/yui3/build/io/io-base.js | 100 +- .../javascript/yui3/build/io/io-form-min.js | 10 +- include/javascript/yui3/build/io/io-form.js | 16 +- include/javascript/yui3/build/io/io-min.js | 10 +- .../javascript/yui3/build/io/io-queue-min.js | 10 +- include/javascript/yui3/build/io/io-queue.js | 18 +- .../yui3/build/io/io-upload-iframe-min.js | 10 +- .../yui3/build/io/io-upload-iframe.js | 29 +- .../javascript/yui3/build/io/io-xdr-min.js | 10 +- include/javascript/yui3/build/io/io-xdr.js | 35 +- include/javascript/yui3/build/io/io.js | 158 +- include/javascript/yui3/build/io/io.swf | Bin 2829 -> 2259 bytes .../javascript/yui3/build/json/json-min.js | 10 +- .../yui3/build/json/json-parse-min.js | 10 +- .../javascript/yui3/build/json/json-parse.js | 19 +- .../yui3/build/json/json-stringify-min.js | 10 +- .../yui3/build/json/json-stringify.js | 15 +- include/javascript/yui3/build/json/json.js | 24 +- .../javascript/yui3/build/jsonp/jsonp-min.js | 8 + .../yui3/build/jsonp/jsonp-url-min.js | 8 + .../javascript/yui3/build/jsonp/jsonp-url.js | 11 + include/javascript/yui3/build/jsonp/jsonp.js | 14 + .../yui3/build/loader/loader-base-min.js | 8 + .../yui3/build/loader/loader-base.js | 107 + .../yui3/build/loader/loader-min.js | 10 +- .../yui3/build/loader/loader-rollup-min.js | 8 + .../yui3/build/loader/loader-rollup.js | 13 + .../yui3/build/loader/loader-yui3-min.js | 8 + .../yui3/build/loader/loader-yui3.js | 8 + .../javascript/yui3/build/loader/loader.js | 162 +- .../node-flick/assets/node-flick-core.css | 15 + .../assets/skins/sam/node-flick-skin.css | 8 + .../assets/skins/sam/node-flick.css | 8 + .../yui3/build/node-flick/node-flick-min.js | 8 + .../yui3/build/node-flick/node-flick.js | 22 + .../node-focusmanager-min.js | 10 +- .../node-focusmanager/node-focusmanager.js | 29 +- .../node-menunav/assets/node-menunav-core.css | 48 +- .../assets/skins/sam/node-menunav-skin.css | 124 +- .../assets/skins/sam/node-menunav.css | 10 +- .../build/node-menunav/node-menunav-min.js | 10 +- .../yui3/build/node-menunav/node-menunav.js | 24 +- .../yui3/build/node/align-plugin-min.js | 8 + .../yui3/build/node/align-plugin.js | 17 + .../yui3/build/node/node-aria-min.js | 8 - .../javascript/yui3/build/node/node-aria.js | 9 - .../yui3/build/node/node-base-min.js | 10 +- .../javascript/yui3/build/node/node-base.js | 103 +- .../yui3/build/node/node-deprecated-min.js | 8 + .../yui3/build/node/node-deprecated.js | 8 + .../build/node/node-event-delegate-min.js | 10 +- .../yui3/build/node/node-event-delegate.js | 10 +- .../yui3/build/node/node-event-html5-min.js | 8 + .../yui3/build/node/node-event-html5.js | 8 + .../build/node/node-event-simulate-min.js | 10 +- .../yui3/build/node/node-event-simulate.js | 10 +- .../yui3/build/node/node-load-min.js | 8 + .../javascript/yui3/build/node/node-load.js | 11 + .../javascript/yui3/build/node/node-min.js | 10 +- .../yui3/build/node/node-pluginhost-min.js | 10 +- .../yui3/build/node/node-pluginhost.js | 10 +- .../yui3/build/node/node-screen-min.js | 10 +- .../javascript/yui3/build/node/node-screen.js | 17 +- .../yui3/build/node/node-style-min.js | 10 +- .../javascript/yui3/build/node/node-style.js | 10 +- include/javascript/yui3/build/node/node.js | 110 +- .../yui3/build/node/shim-plugin-min.js | 8 + .../javascript/yui3/build/node/shim-plugin.js | 10 + include/javascript/yui3/build/oop/oop-min.js | 10 +- include/javascript/yui3/build/oop/oop.js | 23 +- .../build/overlay/assets/overlay-core.css | 20 +- .../overlay/assets/skins/sam/overlay-skin.css | 8 +- .../overlay/assets/skins/sam/overlay.css | 13 +- .../yui3/build/overlay/overlay-min.js | 10 +- .../javascript/yui3/build/overlay/overlay.js | 10 +- .../yui3/build/plugin/plugin-min.js | 10 +- .../javascript/yui3/build/plugin/plugin.js | 16 +- .../build/pluginhost/pluginhost-base-min.js | 8 + .../yui3/build/pluginhost/pluginhost-base.js | 14 + .../build/pluginhost/pluginhost-config-min.js | 8 + .../build/pluginhost/pluginhost-config.js | 14 + .../yui3/build/pluginhost/pluginhost-min.js | 10 +- .../yui3/build/pluginhost/pluginhost.js | 25 +- .../yui3/build/profiler/profiler-min.js | 10 +- .../yui3/build/profiler/profiler.js | 10 +- .../yui3/build/querystring/querystring-min.js | 8 + .../querystring/querystring-parse-min.js | 8 + .../querystring-parse-simple-min.js | 8 + .../querystring/querystring-parse-simple.js | 9 + .../build/querystring/querystring-parse.js | 14 + .../querystring/querystring-stringify-min.js | 8 + .../querystring-stringify-simple-min.js | 8 + .../querystring-stringify-simple.js | 10 + .../querystring/querystring-stringify.js | 16 + .../yui3/build/querystring/querystring.js | 22 + .../build/queue-promote/queue-promote-min.js | 10 +- .../yui3/build/queue-promote/queue-promote.js | 10 +- .../build/recordset/recordset-base-min.js | 8 + .../yui3/build/recordset/recordset-base.js | 30 + .../build/recordset/recordset-filter-min.js | 8 + .../yui3/build/recordset/recordset-filter.js | 11 + .../build/recordset/recordset-indexer-min.js | 8 + .../yui3/build/recordset/recordset-indexer.js | 10 + .../yui3/build/recordset/recordset-min.js | 8 + .../build/recordset/recordset-sort-min.js | 8 + .../yui3/build/recordset/recordset-sort.js | 11 + .../yui3/build/recordset/recordset.js | 38 + .../build/resize/assets/resize-base-core.css | 130 + .../build/resize/assets/skins/sam/arrows.png | Bin 0 -> 1293 bytes .../assets/skins/sam/resize-base-skin.css | 53 + .../resize/assets/skins/sam/resize-base.css | 8 + .../build/resize/assets/skins/sam/resize.css | 8 + .../yui3/build/resize/resize-base-min.js | 8 + .../yui3/build/resize/resize-base.js | 28 + .../yui3/build/resize/resize-constrain-min.js | 8 + .../yui3/build/resize/resize-constrain.js | 25 + .../yui3/build/resize/resize-min.js | 8 + .../yui3/build/resize/resize-proxy-min.js | 8 + .../yui3/build/resize/resize-proxy.js | 9 + .../javascript/yui3/build/resize/resize.js | 46 + .../assets/scrollview-base-core.css | 21 + .../assets/scrollview-paginator-core.css | 18 + .../assets/scrollview-scrollbars-core.css | 102 + .../assets/skins/sam/scrollview-base-skin.css | 10 + .../assets/skins/sam/scrollview-base.css | 8 + .../skins/sam/scrollview-paginator-skin.css | 23 + .../assets/skins/sam/scrollview-paginator.css | 8 + .../skins/sam/scrollview-scrollbars-skin.css | 96 + .../skins/sam/scrollview-scrollbars.css | 8 + .../scrollview/scrollview-base-ie-min.js | 8 + .../build/scrollview/scrollview-base-ie.js | 8 + .../build/scrollview/scrollview-base-min.js | 8 + .../yui3/build/scrollview/scrollview-base.js | 41 + .../yui3/build/scrollview/scrollview-min.js | 8 + .../scrollview/scrollview-paginator-min.js | 8 + .../build/scrollview/scrollview-paginator.js | 11 + .../scrollview/scrollview-scrollbars-min.js | 8 + .../build/scrollview/scrollview-scrollbars.js | 26 + .../yui3/build/scrollview/scrollview.js | 8 + .../yui3/build/simpleyui/simpleyui-min.js | 8 + .../yui3/build/simpleyui/simpleyui.js | 610 + .../assets/skins/audio-light/rail-x.png | Bin 0 -> 3668 bytes .../assets/skins/audio-light/rail-y.png | Bin 0 -> 3664 bytes .../skins/audio-light/slider-base-skin.css | 98 + .../assets/skins/audio-light/slider-base.css | 8 + .../assets/skins/audio-light/slider-skin.css | 98 + .../assets/skins/audio-light/slider.css | 8 + .../assets/skins/audio-light/thumb-x.png | Bin 0 -> 400 bytes .../assets/skins/audio-light/thumb-y.png | Bin 0 -> 503 bytes .../slider/assets/skins/audio/rail-x.png | Bin 0 -> 3662 bytes .../slider/assets/skins/audio/rail-y.png | Bin 0 -> 3660 bytes .../assets/skins/audio/slider-base-skin.css | 98 + .../slider/assets/skins/audio/slider-base.css | 8 + .../slider/assets/skins/audio/slider-skin.css | 98 + .../slider/assets/skins/audio/slider.css | 8 + .../slider/assets/skins/audio/thumb-x.png | Bin 0 -> 3742 bytes .../slider/assets/skins/audio/thumb-y.png | Bin 0 -> 414 bytes .../assets/skins/capsule-dark/rail-x-dots.png | Bin 0 -> 3651 bytes .../skins/capsule-dark/rail-x-lines.png | Bin 0 -> 3673 bytes .../assets/skins/capsule-dark/rail-x.png | Bin 0 -> 3710 bytes .../assets/skins/capsule-dark/rail-y-dots.png | Bin 0 -> 3642 bytes .../skins/capsule-dark/rail-y-lines.png | Bin 0 -> 3667 bytes .../assets/skins/capsule-dark/rail-y.png | Bin 0 -> 3673 bytes .../skins/capsule-dark/slider-base-skin.css | 98 + .../assets/skins/capsule-dark/slider-base.css | 8 + .../assets/skins/capsule-dark/slider-skin.css | 98 + .../assets/skins/capsule-dark/slider.css | 8 + .../skins/capsule-dark/thumb-x-line.png | Bin 0 -> 3845 bytes .../assets/skins/capsule-dark/thumb-x.png | Bin 0 -> 4166 bytes .../skins/capsule-dark/thumb-y-line.png | Bin 0 -> 518 bytes .../assets/skins/capsule-dark/thumb-y.png | Bin 0 -> 685 bytes .../assets/skins/capsule/rail-x-dots.png | Bin 0 -> 3655 bytes .../assets/skins/capsule/rail-x-lines.png | Bin 0 -> 3669 bytes .../slider/assets/skins/capsule/rail-x.png | Bin 0 -> 3701 bytes .../assets/skins/capsule/rail-y-dots.png | Bin 0 -> 3643 bytes .../assets/skins/capsule/rail-y-lines.png | Bin 0 -> 3643 bytes .../slider/assets/skins/capsule/rail-y.png | Bin 0 -> 3689 bytes .../assets/skins/capsule/slider-base-skin.css | 100 + .../assets/skins/capsule/slider-base.css | 8 + .../assets/skins/capsule/slider-skin.css | 100 + .../slider/assets/skins/capsule/slider.css | 8 + .../assets/skins/capsule/thumb-x-line.png | Bin 0 -> 828 bytes .../slider/assets/skins/capsule/thumb-x.png | Bin 0 -> 768 bytes .../assets/skins/capsule/thumb-y-line.png | Bin 0 -> 669 bytes .../assets/skins/capsule/thumb-y-lines.png | Bin 0 -> 3665 bytes .../slider/assets/skins/capsule/thumb-y.png | Bin 0 -> 541 bytes .../slider/assets/skins/round-dark/rail-x.png | Bin 0 -> 3637 bytes .../slider/assets/skins/round-dark/rail-y.png | Bin 0 -> 3635 bytes .../skins/round-dark/slider-base-skin.css | 96 + .../assets/skins/round-dark/slider-base.css | 8 + .../assets/skins/round-dark/slider-skin.css | 96 + .../slider/assets/skins/round-dark/slider.css | 8 + .../assets/skins/round-dark/thumb-x-grip.png | Bin 0 -> 4365 bytes .../assets/skins/round-dark/thumb-x.png | Bin 0 -> 4333 bytes .../assets/skins/round-dark/thumb-y-grip.png | Bin 0 -> 648 bytes .../assets/skins/round-dark/thumb-y.png | Bin 0 -> 835 bytes .../slider/assets/skins/round/rail-x.png | Bin 0 -> 3642 bytes .../slider/assets/skins/round/rail-y.png | Bin 0 -> 3637 bytes .../assets/skins/round/slider-base-skin.css | 96 + .../slider/assets/skins/round/slider-base.css | 8 + .../slider/assets/skins/round/slider-skin.css | 96 + .../slider/assets/skins/round/slider.css | 8 + .../assets/skins/round/thumb-x-grip.png | Bin 0 -> 692 bytes .../slider/assets/skins/round/thumb-x.png | Bin 0 -> 4143 bytes .../assets/skins/round/thumb-y-grip.png | Bin 0 -> 731 bytes .../slider/assets/skins/round/thumb-y.png | Bin 0 -> 890 bytes .../assets/skins/sam-dark/rail-x-lines.png | Bin 0 -> 3647 bytes .../slider/assets/skins/sam-dark/rail-x.png | Bin 0 -> 3635 bytes .../assets/skins/sam-dark/rail-y-lines.png | Bin 0 -> 3640 bytes .../slider/assets/skins/sam-dark/rail-y.png | Bin 0 -> 3628 bytes .../skins/sam-dark/slider-base-skin.css | 94 + .../assets/skins/sam-dark/slider-base.css | 8 + .../assets/skins/sam-dark/slider-skin.css | 94 + .../slider/assets/skins/sam-dark/slider.css | 8 + .../slider/assets/skins/sam-dark/thumb-x.png | Bin 0 -> 3853 bytes .../slider/assets/skins/sam-dark/thumb-y.png | Bin 0 -> 602 bytes .../slider/assets/skins/sam/rail-x-lines.png | Bin 0 -> 3656 bytes .../build/slider/assets/skins/sam/rail-x.png | Bin 0 -> 3639 bytes .../slider/assets/skins/sam/rail-y-lines.png | Bin 0 -> 3642 bytes .../build/slider/assets/skins/sam/rail-y.png | Bin 0 -> 3629 bytes .../assets/skins/sam/slider-base-skin.css | 94 + .../slider/assets/skins/sam/slider-base.css | 8 + .../slider/assets/skins/sam/slider-skin.css | 100 +- .../build/slider/assets/skins/sam/slider.css | 10 +- .../build/slider/assets/skins/sam/thumb-x.png | Bin 0 -> 3873 bytes .../build/slider/assets/skins/sam/thumb-y.png | Bin 0 -> 3860 bytes .../build/slider/assets/slider-base-core.css | 38 + .../yui3/build/slider/assets/slider-core.css | 38 +- .../yui3/build/slider/clickable-rail-min.js | 8 + .../yui3/build/slider/clickable-rail.js | 9 + .../yui3/build/slider/range-slider-min.js | 8 + .../yui3/build/slider/range-slider.js | 8 + .../yui3/build/slider/slider-base-min.js | 8 + .../yui3/build/slider/slider-base.js | 11 + .../yui3/build/slider/slider-min.js | 10 +- .../build/slider/slider-value-range-min.js | 8 + .../yui3/build/slider/slider-value-range.js | 9 + .../javascript/yui3/build/slider/slider.js | 30 +- .../yui3/build/sortable/sortable-min.js | 8 + .../build/sortable/sortable-scroll-min.js | 8 + .../yui3/build/sortable/sortable-scroll.js | 8 + .../yui3/build/sortable/sortable.js | 25 + .../yui3/build/stylesheet/stylesheet-min.js | 10 +- .../yui3/build/stylesheet/stylesheet.js | 21 +- .../yui3/build/substitute/substitute-min.js | 10 +- .../yui3/build/substitute/substitute.js | 23 +- include/javascript/yui3/build/swf/swf-min.js | 8 + include/javascript/yui3/build/swf/swf.js | 23 + .../yui3/build/swfdetect/swfdetect-min.js | 8 + .../yui3/build/swfdetect/swfdetect.js | 22 + .../tabview/assets/skins/sam/tabview-skin.css | 65 + .../tabview/assets/skins/sam/tabview.css | 8 + .../build/tabview/assets/tabview-core.css | 49 + .../yui3/build/tabview/assets/tabview.css | 29 + .../yui3/build/tabview/tabview-base-min.js | 8 + .../yui3/build/tabview/tabview-base.js | 12 + .../yui3/build/tabview/tabview-min.js | 8 + .../yui3/build/tabview/tabview-plugin-min.js | 8 + .../yui3/build/tabview/tabview-plugin.js | 8 + .../javascript/yui3/build/tabview/tabview.js | 17 + .../build/test/assets/skins/sam/test-skin.css | 20 + .../yui3/build/test/assets/skins/sam/test.css | 8 + .../yui3/build/test/assets/test-console.css | 34 +- .../javascript/yui3/build/test/test-min.js | 10 +- include/javascript/yui3/build/test/test.js | 54 +- .../yui3/build/text/text-accentfold-min.js | 8 + .../yui3/build/text/text-accentfold.js | 10 + .../build/text/text-data-accentfold-min.js | 8 + .../yui3/build/text/text-data-accentfold.js | 8 + .../build/text/text-data-wordbreak-min.js | 8 + .../yui3/build/text/text-data-wordbreak.js | 8 + .../javascript/yui3/build/text/text-min.js | 8 + .../yui3/build/text/text-wordbreak-min.js | 8 + .../yui3/build/text/text-wordbreak.js | 28 + include/javascript/yui3/build/text/text.js | 30 + .../yui3/build/transition/transition-min.js | 8 + .../build/transition/transition-native-min.js | 8 + .../build/transition/transition-native.js | 40 + .../build/transition/transition-timer-min.js | 8 + .../yui3/build/transition/transition-timer.js | 14 + .../yui3/build/transition/transition.js | 46 + .../yui3/build/uploader/assets/uploader.swf | Bin 0 -> 6671 bytes .../yui3/build/uploader/uploader-min.js | 8 + .../yui3/build/uploader/uploader.js | 12 + .../yui3/build/widget-anim/widget-anim-min.js | 8 + .../yui3/build/widget-anim/widget-anim.js | 11 + .../assets/skins/sam/widget-base-skin.css | 7 + .../widget/assets/skins/sam/widget-base.css | 8 + .../widget/assets/skins/sam/widget-skin.css | 7 - .../assets/skins/sam/widget-stack-skin.css | 8 +- .../widget/assets/skins/sam/widget-stack.css | 10 +- .../build/widget/assets/skins/sam/widget.css | 10 +- .../build/widget/assets/widget-base-core.css | 27 + .../yui3/build/widget/assets/widget-core.css | 10 - .../build/widget/assets/widget-stack-core.css | 10 +- .../yui3/build/widget/widget-base-ie-min.js | 8 + .../yui3/build/widget/widget-base-ie.js | 10 + .../yui3/build/widget/widget-base-min.js | 8 + .../yui3/build/widget/widget-base.js | 21 + .../yui3/build/widget/widget-child-min.js | 8 + .../yui3/build/widget/widget-child.js | 22 + .../build/widget/widget-htmlparser-min.js | 8 + .../yui3/build/widget/widget-htmlparser.js | 11 + .../yui3/build/widget/widget-locale-min.js | 8 + .../yui3/build/widget/widget-locale.js | 13 + .../yui3/build/widget/widget-min.js | 10 +- .../yui3/build/widget/widget-parent-min.js | 8 + .../yui3/build/widget/widget-parent.js | 30 + .../build/widget/widget-position-align-min.js | 8 + .../build/widget/widget-position-align.js | 15 + .../widget/widget-position-constrain-min.js | 8 + .../build/widget/widget-position-constrain.js | 15 + .../build/widget/widget-position-ext-min.js | 8 - .../yui3/build/widget/widget-position-ext.js | 15 - .../yui3/build/widget/widget-position-min.js | 10 +- .../yui3/build/widget/widget-position.js | 13 +- .../yui3/build/widget/widget-skin-min.js | 8 + .../yui3/build/widget/widget-skin.js | 9 + .../yui3/build/widget/widget-stack-min.js | 10 +- .../yui3/build/widget/widget-stack.js | 10 +- .../yui3/build/widget/widget-stdmod-min.js | 10 +- .../yui3/build/widget/widget-stdmod.js | 41 +- .../yui3/build/widget/widget-uievents-min.js | 8 + .../yui3/build/widget/widget-uievents.js | 12 + .../javascript/yui3/build/widget/widget.js | 57 +- include/javascript/yui3/build/yql/yql-min.js | 8 + include/javascript/yui3/build/yql/yql.js | 14 + .../yui3/build/yui-base/yui-base-min.js | 8 - .../yui3/build/yui-base/yui-base.js | 65 - .../javascript/yui3/build/yui/features-min.js | 8 + include/javascript/yui3/build/yui/features.js | 13 + include/javascript/yui3/build/yui/get-min.js | 10 +- include/javascript/yui3/build/yui/get.js | 43 +- .../yui3/build/yui/intl-base-min.js | 8 + .../javascript/yui3/build/yui/intl-base.js | 12 + include/javascript/yui3/build/yui/rls-min.js | 8 + include/javascript/yui3/build/yui/rls.js | 9 + .../javascript/yui3/build/yui/yui-base-min.js | 10 +- include/javascript/yui3/build/yui/yui-base.js | 132 +- .../yui3/build/yui/yui-later-min.js | 10 +- .../javascript/yui3/build/yui/yui-later.js | 13 +- .../javascript/yui3/build/yui/yui-log-min.js | 10 +- include/javascript/yui3/build/yui/yui-log.js | 18 +- include/javascript/yui3/build/yui/yui-min.js | 10 +- .../yui3/build/yui/yui-throttle-min.js | 8 + .../javascript/yui3/build/yui/yui-throttle.js | 9 + include/javascript/yui3/build/yui/yui.js | 187 +- include/javascript/yui3/index.html | 253 +- include/jsolait/LICENSE | 504 - include/jsolait/copying.txt | 504 - include/jsolait/init.js | 101 - include/jsolait/lib/codecs.js | 38 - include/jsolait/lib/crypto.js | 37 - include/jsolait/lib/jsonrpc.js | 112 - include/jsolait/lib/jsonrpclite.js | 96 - include/jsolait/lib/lang.js | 75 - include/jsolait/lib/langlite.js | 49 - include/jsolait/lib/urllib.js | 45 - include/jsolait/lib/xml.js | 37 - include/jsolait/lib/xmlrpc.js | 98 - include/jsolait/missingmixin.js | 46 - include/tcpdf/tcpdf.php | 130 +- include/utils.php | 37 +- include/utils/db_utils.php | 33 +- include/utils/mvc_utils.php | 2 +- include/vCard.php | 6 +- include/ytree/Tree.php | 13 +- include/ytree/TreeView/HTMLNode.js | 2 +- include/ytree/TreeView/MenuNode.js | 2 +- include/ytree/TreeView/Node.js | 2 +- include/ytree/TreeView/RootNode.js | 2 +- include/ytree/TreeView/TaskNode.js | 2 +- include/ytree/TreeView/TextNode.js | 2 +- include/ytree/TreeView/TreeView.js | 2 +- include/ytree/TreeView/anim/TVAnim.js | 2 +- include/ytree/TreeView/anim/TVFadeIn.js | 2 +- include/ytree/TreeView/anim/TVFadeOut.js | 2 +- include/ytree/TreeView/css/check/tree.css | 2 +- include/ytree/treeutil.js | 4 +- install.php | 3 +- install/checkDBSettings.php | 27 +- install/confirmSettings.php | 8 +- install/dbConfig.js | 2 +- install/dbConfig_a.php | 8 +- install/download_modules.php | 5 +- install/download_patches.php | 4 +- install/installCommon.js | 2 +- install/installSystemCheck.php | 2 +- install/installType.php | 2 +- install/language/en_us.lang.php | 4 +- install/license.js | 2 +- install/license.php | 8 +- install/oc_convert.js | 2 +- install/oc_install.js | 2 +- install/performSetup.php | 6 +- install/populateSeedData.php | 5 +- install/ready.php | 4 +- install/register.js | 2 +- install/register.php | 4 +- install/siteConfig.js | 2 +- install/siteConfig_a.php | 8 +- install/siteConfig_b.php | 6 +- install/systemOptions.php | 6 +- install/welcome.php | 4 +- jssource/JSGroupings.php | 5 +- jssource/jsmin.php | 553 +- jssource/minify.php | 2 +- jssource/src_files/include/JSON.js | 217 - .../include/MySugar/javascript/MySugar.js | 15 +- .../Fields/Collection/SugarFieldCollection.js | 160 +- .../SugarFields/Fields/File/SugarFieldFile.js | 2 +- .../src_files/include/javascript/calendar.js | 10 +- .../include/javascript/jsclass_async.js | 235 +- .../include/javascript/jsclass_base.js | 830 +- .../include/javascript/popup_helper.js | 10 + .../include/javascript/quickCompose.js | 9 +- .../include/javascript/report_additionals.js | 2 +- .../src_files/include/javascript/sugar_3.js | 73 +- .../include/javascript/sugar_yui_overrides.js | 127 + .../sugarwidgets/SugarYUIWidgets.js | 35 +- .../include/javascript/yui3/assets/syntax.js | 2 +- .../yui3/build/anim/anim-base-min.js | 10 +- .../javascript/yui3/build/anim/anim-base.js | 151 +- .../yui3/build/anim/anim-color-min.js | 10 +- .../javascript/yui3/build/anim/anim-color.js | 10 +- .../yui3/build/anim/anim-curve-min.js | 10 +- .../javascript/yui3/build/anim/anim-curve.js | 10 +- .../yui3/build/anim/anim-easing-min.js | 10 +- .../javascript/yui3/build/anim/anim-easing.js | 14 +- .../javascript/yui3/build/anim/anim-min.js | 12 +- .../yui3/build/anim/anim-node-plugin-min.js | 10 +- .../yui3/build/anim/anim-node-plugin.js | 10 +- .../yui3/build/anim/anim-scroll-min.js | 10 +- .../javascript/yui3/build/anim/anim-scroll.js | 10 +- .../javascript/yui3/build/anim/anim-xy-min.js | 10 +- .../javascript/yui3/build/anim/anim-xy.js | 10 +- .../javascript/yui3/build/anim/anim.js | 169 +- .../yui3/build/arraysort/arraysort-min.js | 8 + .../yui3/build/arraysort/arraysort.js | 59 + .../yui3/build/async-queue/async-queue-min.js | 10 +- .../yui3/build/async-queue/async-queue.js | 27 +- .../build/attribute/attribute-base-min.js | 10 +- .../yui3/build/attribute/attribute-base.js | 194 +- .../build/attribute/attribute-complex-min.js | 10 +- .../yui3/build/attribute/attribute-complex.js | 22 +- .../yui3/build/attribute/attribute-min.js | 12 +- .../yui3/build/attribute/attribute.js | 214 +- .../autocomplete/autocomplete-base-min.js | 9 + .../build/autocomplete/autocomplete-base.js | 1525 ++ .../autocomplete-filters-accentfold-min.js | 8 + .../autocomplete-filters-accentfold.js | 117 + .../autocomplete/autocomplete-filters-min.js | 8 + .../autocomplete/autocomplete-filters.js | 185 + ...utocomplete-highlighters-accentfold-min.js | 8 + .../autocomplete-highlighters-accentfold.js | 101 + .../autocomplete-highlighters-min.js | 8 + .../autocomplete/autocomplete-highlighters.js | 167 + .../autocomplete-list-keys-min.js | 8 + .../autocomplete/autocomplete-list-keys.js | 195 + .../autocomplete/autocomplete-list-min.js | 8 + .../build/autocomplete/autocomplete-list.js | 792 + .../build/autocomplete/autocomplete-min.js | 10 + .../autocomplete/autocomplete-plugin-min.js | 8 + .../build/autocomplete/autocomplete-plugin.js | 61 + .../autocomplete/autocomplete-sources-min.js | 8 + .../autocomplete/autocomplete-sources.js | 401 + .../yui3/build/autocomplete/autocomplete.js | 2762 ++ .../autocomplete/lang/autocomplete-list.js | 8 + .../autocomplete/lang/autocomplete-list_en.js | 8 + .../build/autocomplete/lang/autocomplete.js | 8 + .../autocomplete/lang/autocomplete_en.js | 8 + .../yui3/build/base/base-base-min.js | 10 +- .../javascript/yui3/build/base/base-base.js | 108 +- .../yui3/build/base/base-build-min.js | 10 +- .../javascript/yui3/build/base/base-build.js | 332 +- .../javascript/yui3/build/base/base-min.js | 10 +- .../yui3/build/base/base-pluginhost-min.js | 10 +- .../yui3/build/base/base-pluginhost.js | 10 +- .../javascript/yui3/build/base/base.js | 436 +- .../yui3/build/cache/cache-base-min.js | 8 + .../javascript/yui3/build/cache/cache-base.js | 387 + .../javascript/yui3/build/cache/cache-min.js | 10 +- .../yui3/build/cache/cache-offline-min.js | 8 + .../yui3/build/cache/cache-offline.js | 334 + .../yui3/build/cache/cache-plugin-min.js | 8 + .../yui3/build/cache/cache-plugin.js | 54 + .../javascript/yui3/build/cache/cache.js | 573 +- .../yui3/build/charts/charts-min.js | 30 + .../javascript/yui3/build/charts/charts.js | 15215 +++++++++++ .../classnamemanager/classnamemanager-min.js | 10 +- .../classnamemanager/classnamemanager.js | 30 +- .../yui3/build/collection/array-extras-min.js | 8 + .../yui3/build/collection/array-extras.js | 356 + .../yui3/build/collection/array-invoke-min.js | 8 + .../yui3/build/collection/array-invoke.js | 51 + .../build/collection/arraylist-add-min.js | 8 + .../yui3/build/collection/arraylist-add.js | 88 + .../build/collection/arraylist-filter-min.js | 8 + .../yui3/build/collection/arraylist-filter.js | 50 + .../yui3/build/collection/arraylist-min.js | 8 + .../yui3/build/collection/arraylist.js | 214 + .../yui3/build/collection/collection-min.js | 10 +- .../yui3/build/collection/collection.js | 665 +- .../yui3/build/compat/compat-min.js | 12 +- .../javascript/yui3/build/compat/compat.js | 178 +- .../yui3/build/console/console-filters-min.js | 10 +- .../yui3/build/console/console-filters.js | 370 +- .../yui3/build/console/console-min.js | 12 +- .../javascript/yui3/build/console/console.js | 1613 +- .../yui3/build/console/lang/console.js | 8 + .../yui3/build/console/lang/console_en.js | 8 + .../yui3/build/console/lang/console_es.js | 8 + .../yui3/build/cookie/cookie-min.js | 10 +- .../javascript/yui3/build/cookie/cookie.js | 26 +- .../build/dataschema/dataschema-array-min.js | 10 +- .../yui3/build/dataschema/dataschema-array.js | 14 +- .../build/dataschema/dataschema-base-min.js | 10 +- .../yui3/build/dataschema/dataschema-base.js | 10 +- .../build/dataschema/dataschema-json-min.js | 10 +- .../yui3/build/dataschema/dataschema-json.js | 40 +- .../yui3/build/dataschema/dataschema-min.js | 11 +- .../build/dataschema/dataschema-text-min.js | 10 +- .../yui3/build/dataschema/dataschema-text.js | 14 +- .../build/dataschema/dataschema-xml-min.js | 10 +- .../yui3/build/dataschema/dataschema-xml.js | 210 +- .../yui3/build/dataschema/dataschema.js | 256 +- .../datasource/datasource-arrayschema-min.js | 10 +- .../datasource/datasource-arrayschema.js | 12 +- .../build/datasource/datasource-cache-min.js | 10 +- .../yui3/build/datasource/datasource-cache.js | 97 +- .../datasource/datasource-function-min.js | 10 +- .../build/datasource/datasource-function.js | 14 +- .../build/datasource/datasource-get-min.js | 10 +- .../yui3/build/datasource/datasource-get.js | 296 +- .../build/datasource/datasource-io-min.js | 10 +- .../yui3/build/datasource/datasource-io.js | 86 +- .../datasource/datasource-jsonschema-min.js | 10 +- .../build/datasource/datasource-jsonschema.js | 18 +- .../build/datasource/datasource-local-min.js | 10 +- .../yui3/build/datasource/datasource-local.js | 70 +- .../yui3/build/datasource/datasource-min.js | 12 +- .../datasource/datasource-polling-min.js | 10 +- .../build/datasource/datasource-polling.js | 50 +- .../datasource/datasource-textschema-min.js | 10 +- .../build/datasource/datasource-textschema.js | 12 +- .../datasource/datasource-xmlschema-min.js | 10 +- .../build/datasource/datasource-xmlschema.js | 12 +- .../yui3/build/datasource/datasource.js | 597 +- .../build/datatable/datatable-base-min.js | 9 + .../yui3/build/datatable/datatable-base.js | 1643 ++ .../datatable/datatable-datasource-min.js | 8 + .../build/datatable/datatable-datasource.js | 189 + .../yui3/build/datatable/datatable-min.js | 11 + .../build/datatable/datatable-scroll-min.js | 9 + .../yui3/build/datatable/datatable-scroll.js | 697 + .../build/datatable/datatable-sort-min.js | 8 + .../yui3/build/datatable/datatable-sort.js | 321 + .../yui3/build/datatable/datatable.js | 2837 +++ .../build/datatable/lang/datatable-base.js | 8 + .../build/datatable/lang/datatable-base_en.js | 8 + .../build/datatable/lang/datatable-sort.js | 8 + .../build/datatable/lang/datatable-sort_en.js | 8 + .../yui3/build/datatable/lang/datatable.js | 8 + .../yui3/build/datatable/lang/datatable_en.js | 8 + .../datatype/datatype-date-format-min.js | 10 +- .../build/datatype/datatype-date-format.js | 96 +- .../yui3/build/datatype/datatype-date-min.js | 10 +- .../build/datatype/datatype-date-parse-min.js | 10 +- .../build/datatype/datatype-date-parse.js | 11 +- .../yui3/build/datatype/datatype-date.js | 103 +- .../yui3/build/datatype/datatype-min.js | 12 +- .../datatype/datatype-number-format-min.js | 10 +- .../build/datatype/datatype-number-format.js | 11 +- .../build/datatype/datatype-number-min.js | 10 +- .../datatype/datatype-number-parse-min.js | 10 +- .../build/datatype/datatype-number-parse.js | 11 +- .../yui3/build/datatype/datatype-number.js | 18 +- .../build/datatype/datatype-xml-format-min.js | 10 +- .../build/datatype/datatype-xml-format.js | 11 +- .../yui3/build/datatype/datatype-xml-min.js | 10 +- .../build/datatype/datatype-xml-parse-min.js | 10 +- .../yui3/build/datatype/datatype-xml-parse.js | 27 +- .../yui3/build/datatype/datatype-xml.js | 34 +- .../yui3/build/datatype/datatype.js | 144 +- .../datatype/lang/datatype-date-format.js | 8 + .../lang/datatype-date-format_ar-JO.js | 8 + .../datatype/lang/datatype-date-format_ar.js | 8 + .../lang/datatype-date-format_ca-ES.js | 8 + .../datatype/lang/datatype-date-format_ca.js | 8 + .../lang/datatype-date-format_da-DK.js | 8 + .../datatype/lang/datatype-date-format_da.js | 8 + .../lang/datatype-date-format_de-AT.js | 8 + .../lang/datatype-date-format_de-DE.js | 8 + .../datatype/lang/datatype-date-format_de.js | 8 + .../lang/datatype-date-format_el-GR.js | 8 + .../datatype/lang/datatype-date-format_el.js | 8 + .../lang/datatype-date-format_en-AU.js | 8 + .../lang/datatype-date-format_en-CA.js | 8 + .../lang/datatype-date-format_en-GB.js | 8 + .../lang/datatype-date-format_en-IE.js | 8 + .../lang/datatype-date-format_en-IN.js | 8 + .../lang/datatype-date-format_en-JO.js | 8 + .../lang/datatype-date-format_en-MY.js | 8 + .../lang/datatype-date-format_en-NZ.js | 8 + .../lang/datatype-date-format_en-PH.js | 8 + .../lang/datatype-date-format_en-SG.js | 8 + .../lang/datatype-date-format_en-US.js | 8 + .../datatype/lang/datatype-date-format_en.js | 8 + .../lang/datatype-date-format_es-AR.js | 8 + .../lang/datatype-date-format_es-BO.js | 8 + .../lang/datatype-date-format_es-CL.js | 8 + .../lang/datatype-date-format_es-CO.js | 8 + .../lang/datatype-date-format_es-EC.js | 8 + .../lang/datatype-date-format_es-ES.js | 8 + .../lang/datatype-date-format_es-MX.js | 8 + .../lang/datatype-date-format_es-PE.js | 8 + .../lang/datatype-date-format_es-PY.js | 8 + .../lang/datatype-date-format_es-US.js | 8 + .../lang/datatype-date-format_es-UY.js | 8 + .../lang/datatype-date-format_es-VE.js | 8 + .../datatype/lang/datatype-date-format_es.js | 8 + .../lang/datatype-date-format_fi-FI.js | 8 + .../datatype/lang/datatype-date-format_fi.js | 8 + .../lang/datatype-date-format_fr-BE.js | 8 + .../lang/datatype-date-format_fr-CA.js | 8 + .../lang/datatype-date-format_fr-FR.js | 8 + .../datatype/lang/datatype-date-format_fr.js | 8 + .../lang/datatype-date-format_hi-IN.js | 8 + .../datatype/lang/datatype-date-format_hi.js | 8 + .../lang/datatype-date-format_id-ID.js | 8 + .../datatype/lang/datatype-date-format_id.js | 8 + .../lang/datatype-date-format_it-IT.js | 8 + .../datatype/lang/datatype-date-format_it.js | 8 + .../lang/datatype-date-format_ja-JP.js | 8 + .../datatype/lang/datatype-date-format_ja.js | 8 + .../lang/datatype-date-format_ko-KR.js | 8 + .../datatype/lang/datatype-date-format_ko.js | 8 + .../lang/datatype-date-format_ms-MY.js | 8 + .../datatype/lang/datatype-date-format_ms.js | 8 + .../lang/datatype-date-format_nb-NO.js | 8 + .../datatype/lang/datatype-date-format_nb.js | 8 + .../lang/datatype-date-format_nl-BE.js | 8 + .../lang/datatype-date-format_nl-NL.js | 8 + .../datatype/lang/datatype-date-format_nl.js | 8 + .../lang/datatype-date-format_pl-PL.js | 8 + .../datatype/lang/datatype-date-format_pl.js | 8 + .../lang/datatype-date-format_pt-BR.js | 8 + .../datatype/lang/datatype-date-format_pt.js | 8 + .../lang/datatype-date-format_ro-RO.js | 8 + .../datatype/lang/datatype-date-format_ro.js | 8 + .../lang/datatype-date-format_ru-RU.js | 8 + .../datatype/lang/datatype-date-format_ru.js | 8 + .../lang/datatype-date-format_sv-SE.js | 8 + .../datatype/lang/datatype-date-format_sv.js | 8 + .../lang/datatype-date-format_th-TH.js | 8 + .../datatype/lang/datatype-date-format_th.js | 8 + .../lang/datatype-date-format_tr-TR.js | 8 + .../datatype/lang/datatype-date-format_tr.js | 8 + .../lang/datatype-date-format_vi-VN.js | 8 + .../datatype/lang/datatype-date-format_vi.js | 8 + .../lang/datatype-date-format_zh-Hans-CN.js | 8 + .../lang/datatype-date-format_zh-Hans.js | 8 + .../lang/datatype-date-format_zh-Hant-HK.js | 8 + .../lang/datatype-date-format_zh-Hant-TW.js | 8 + .../lang/datatype-date-format_zh-Hant.js | 8 + .../yui3/build/datatype/lang/datatype-date.js | 8 + .../datatype/lang/datatype-date_ar-JO.js | 8 + .../build/datatype/lang/datatype-date_ar.js | 8 + .../datatype/lang/datatype-date_ca-ES.js | 8 + .../build/datatype/lang/datatype-date_ca.js | 8 + .../datatype/lang/datatype-date_da-DK.js | 8 + .../build/datatype/lang/datatype-date_da.js | 8 + .../datatype/lang/datatype-date_de-AT.js | 8 + .../datatype/lang/datatype-date_de-DE.js | 8 + .../build/datatype/lang/datatype-date_de.js | 8 + .../datatype/lang/datatype-date_el-GR.js | 8 + .../build/datatype/lang/datatype-date_el.js | 8 + .../datatype/lang/datatype-date_en-AU.js | 8 + .../datatype/lang/datatype-date_en-CA.js | 8 + .../datatype/lang/datatype-date_en-GB.js | 8 + .../datatype/lang/datatype-date_en-IE.js | 8 + .../datatype/lang/datatype-date_en-IN.js | 8 + .../datatype/lang/datatype-date_en-JO.js | 8 + .../datatype/lang/datatype-date_en-MY.js | 8 + .../datatype/lang/datatype-date_en-NZ.js | 8 + .../datatype/lang/datatype-date_en-PH.js | 8 + .../datatype/lang/datatype-date_en-SG.js | 8 + .../datatype/lang/datatype-date_en-US.js | 8 + .../build/datatype/lang/datatype-date_en.js | 8 + .../datatype/lang/datatype-date_es-AR.js | 8 + .../datatype/lang/datatype-date_es-BO.js | 8 + .../datatype/lang/datatype-date_es-CL.js | 8 + .../datatype/lang/datatype-date_es-CO.js | 8 + .../datatype/lang/datatype-date_es-EC.js | 8 + .../datatype/lang/datatype-date_es-ES.js | 8 + .../datatype/lang/datatype-date_es-MX.js | 8 + .../datatype/lang/datatype-date_es-PE.js | 8 + .../datatype/lang/datatype-date_es-PY.js | 8 + .../datatype/lang/datatype-date_es-US.js | 8 + .../datatype/lang/datatype-date_es-UY.js | 8 + .../datatype/lang/datatype-date_es-VE.js | 8 + .../build/datatype/lang/datatype-date_es.js | 8 + .../datatype/lang/datatype-date_fi-FI.js | 8 + .../build/datatype/lang/datatype-date_fi.js | 8 + .../datatype/lang/datatype-date_fr-BE.js | 8 + .../datatype/lang/datatype-date_fr-CA.js | 8 + .../datatype/lang/datatype-date_fr-FR.js | 8 + .../build/datatype/lang/datatype-date_fr.js | 8 + .../datatype/lang/datatype-date_hi-IN.js | 8 + .../build/datatype/lang/datatype-date_hi.js | 8 + .../datatype/lang/datatype-date_id-ID.js | 8 + .../build/datatype/lang/datatype-date_id.js | 8 + .../datatype/lang/datatype-date_it-IT.js | 8 + .../build/datatype/lang/datatype-date_it.js | 8 + .../datatype/lang/datatype-date_ja-JP.js | 8 + .../build/datatype/lang/datatype-date_ja.js | 8 + .../datatype/lang/datatype-date_ko-KR.js | 8 + .../build/datatype/lang/datatype-date_ko.js | 8 + .../datatype/lang/datatype-date_ms-MY.js | 8 + .../build/datatype/lang/datatype-date_ms.js | 8 + .../datatype/lang/datatype-date_nb-NO.js | 8 + .../build/datatype/lang/datatype-date_nb.js | 8 + .../datatype/lang/datatype-date_nl-BE.js | 8 + .../datatype/lang/datatype-date_nl-NL.js | 8 + .../build/datatype/lang/datatype-date_nl.js | 8 + .../datatype/lang/datatype-date_pl-PL.js | 8 + .../build/datatype/lang/datatype-date_pl.js | 8 + .../datatype/lang/datatype-date_pt-BR.js | 8 + .../build/datatype/lang/datatype-date_pt.js | 8 + .../datatype/lang/datatype-date_ro-RO.js | 8 + .../build/datatype/lang/datatype-date_ro.js | 8 + .../datatype/lang/datatype-date_ru-RU.js | 8 + .../build/datatype/lang/datatype-date_ru.js | 8 + .../datatype/lang/datatype-date_sv-SE.js | 8 + .../build/datatype/lang/datatype-date_sv.js | 8 + .../datatype/lang/datatype-date_th-TH.js | 8 + .../build/datatype/lang/datatype-date_th.js | 8 + .../datatype/lang/datatype-date_tr-TR.js | 8 + .../build/datatype/lang/datatype-date_tr.js | 8 + .../datatype/lang/datatype-date_vi-VN.js | 8 + .../build/datatype/lang/datatype-date_vi.js | 8 + .../datatype/lang/datatype-date_zh-Hans-CN.js | 8 + .../datatype/lang/datatype-date_zh-Hans.js | 8 + .../datatype/lang/datatype-date_zh-Hant-HK.js | 8 + .../datatype/lang/datatype-date_zh-Hant-TW.js | 8 + .../datatype/lang/datatype-date_zh-Hant.js | 8 + .../yui3/build/datatype/lang/datatype.js | 8 + .../build/datatype/lang/datatype_ar-JO.js | 8 + .../yui3/build/datatype/lang/datatype_ar.js | 8 + .../build/datatype/lang/datatype_ca-ES.js | 8 + .../yui3/build/datatype/lang/datatype_ca.js | 8 + .../build/datatype/lang/datatype_da-DK.js | 8 + .../yui3/build/datatype/lang/datatype_da.js | 8 + .../build/datatype/lang/datatype_de-AT.js | 8 + .../build/datatype/lang/datatype_de-DE.js | 8 + .../yui3/build/datatype/lang/datatype_de.js | 8 + .../build/datatype/lang/datatype_el-GR.js | 8 + .../yui3/build/datatype/lang/datatype_el.js | 8 + .../build/datatype/lang/datatype_en-AU.js | 8 + .../build/datatype/lang/datatype_en-CA.js | 8 + .../build/datatype/lang/datatype_en-GB.js | 8 + .../build/datatype/lang/datatype_en-IE.js | 8 + .../build/datatype/lang/datatype_en-IN.js | 8 + .../build/datatype/lang/datatype_en-JO.js | 8 + .../build/datatype/lang/datatype_en-MY.js | 8 + .../build/datatype/lang/datatype_en-NZ.js | 8 + .../build/datatype/lang/datatype_en-PH.js | 8 + .../build/datatype/lang/datatype_en-SG.js | 8 + .../build/datatype/lang/datatype_en-US.js | 8 + .../yui3/build/datatype/lang/datatype_en.js | 8 + .../build/datatype/lang/datatype_es-AR.js | 8 + .../build/datatype/lang/datatype_es-BO.js | 8 + .../build/datatype/lang/datatype_es-CL.js | 8 + .../build/datatype/lang/datatype_es-CO.js | 8 + .../build/datatype/lang/datatype_es-EC.js | 8 + .../build/datatype/lang/datatype_es-ES.js | 8 + .../build/datatype/lang/datatype_es-MX.js | 8 + .../build/datatype/lang/datatype_es-PE.js | 8 + .../build/datatype/lang/datatype_es-PY.js | 8 + .../build/datatype/lang/datatype_es-US.js | 8 + .../build/datatype/lang/datatype_es-UY.js | 8 + .../build/datatype/lang/datatype_es-VE.js | 8 + .../yui3/build/datatype/lang/datatype_es.js | 8 + .../build/datatype/lang/datatype_fi-FI.js | 8 + .../yui3/build/datatype/lang/datatype_fi.js | 8 + .../build/datatype/lang/datatype_fr-BE.js | 8 + .../build/datatype/lang/datatype_fr-CA.js | 8 + .../build/datatype/lang/datatype_fr-FR.js | 8 + .../yui3/build/datatype/lang/datatype_fr.js | 8 + .../build/datatype/lang/datatype_hi-IN.js | 8 + .../yui3/build/datatype/lang/datatype_hi.js | 8 + .../build/datatype/lang/datatype_id-ID.js | 8 + .../yui3/build/datatype/lang/datatype_id.js | 8 + .../build/datatype/lang/datatype_it-IT.js | 8 + .../yui3/build/datatype/lang/datatype_it.js | 8 + .../build/datatype/lang/datatype_ja-JP.js | 8 + .../yui3/build/datatype/lang/datatype_ja.js | 8 + .../build/datatype/lang/datatype_ko-KR.js | 8 + .../yui3/build/datatype/lang/datatype_ko.js | 8 + .../build/datatype/lang/datatype_ms-MY.js | 8 + .../yui3/build/datatype/lang/datatype_ms.js | 8 + .../build/datatype/lang/datatype_nb-NO.js | 8 + .../yui3/build/datatype/lang/datatype_nb.js | 8 + .../build/datatype/lang/datatype_nl-BE.js | 8 + .../build/datatype/lang/datatype_nl-NL.js | 8 + .../yui3/build/datatype/lang/datatype_nl.js | 8 + .../build/datatype/lang/datatype_pl-PL.js | 8 + .../yui3/build/datatype/lang/datatype_pl.js | 8 + .../build/datatype/lang/datatype_pt-BR.js | 8 + .../yui3/build/datatype/lang/datatype_pt.js | 8 + .../build/datatype/lang/datatype_ro-RO.js | 8 + .../yui3/build/datatype/lang/datatype_ro.js | 8 + .../build/datatype/lang/datatype_ru-RU.js | 8 + .../yui3/build/datatype/lang/datatype_ru.js | 8 + .../build/datatype/lang/datatype_sv-SE.js | 8 + .../yui3/build/datatype/lang/datatype_sv.js | 8 + .../build/datatype/lang/datatype_th-TH.js | 8 + .../yui3/build/datatype/lang/datatype_th.js | 8 + .../build/datatype/lang/datatype_tr-TR.js | 8 + .../yui3/build/datatype/lang/datatype_tr.js | 8 + .../build/datatype/lang/datatype_vi-VN.js | 8 + .../yui3/build/datatype/lang/datatype_vi.js | 8 + .../datatype/lang/datatype_zh-Hans-CN.js | 8 + .../build/datatype/lang/datatype_zh-Hans.js | 8 + .../datatype/lang/datatype_zh-Hant-HK.js | 8 + .../datatype/lang/datatype_zh-Hant-TW.js | 8 + .../build/datatype/lang/datatype_zh-Hant.js | 8 + .../yui3/build/dd/dd-constrain-min.js | 10 +- .../javascript/yui3/build/dd/dd-constrain.js | 963 +- .../yui3/build/dd/dd-ddm-base-min.js | 10 +- .../javascript/yui3/build/dd/dd-ddm-base.js | 89 +- .../yui3/build/dd/dd-ddm-drop-min.js | 10 +- .../javascript/yui3/build/dd/dd-ddm-drop.js | 31 +- .../javascript/yui3/build/dd/dd-ddm-min.js | 10 +- .../javascript/yui3/build/dd/dd-ddm.js | 33 +- .../yui3/build/dd/dd-delegate-min.js | 8 + .../javascript/yui3/build/dd/dd-delegate.js | 340 + .../javascript/yui3/build/dd/dd-drag-min.js | 12 +- .../javascript/yui3/build/dd/dd-drag.js | 240 +- .../javascript/yui3/build/dd/dd-drop-min.js | 10 +- .../yui3/build/dd/dd-drop-plugin-min.js | 10 +- .../yui3/build/dd/dd-drop-plugin.js | 14 +- .../javascript/yui3/build/dd/dd-drop.js | 186 +- .../yui3/build/dd/dd-gestures-min.js | 8 + .../javascript/yui3/build/dd/dd-gestures.js | 45 + .../javascript/yui3/build/dd/dd-min.js | 19 +- .../javascript/yui3/build/dd/dd-plugin-min.js | 10 +- .../javascript/yui3/build/dd/dd-plugin.js | 16 +- .../javascript/yui3/build/dd/dd-proxy-min.js | 10 +- .../javascript/yui3/build/dd/dd-proxy.js | 82 +- .../javascript/yui3/build/dd/dd-scroll-min.js | 10 +- .../javascript/yui3/build/dd/dd-scroll.js | 96 +- .../include/javascript/yui3/build/dd/dd.js | 2060 +- .../javascript/yui3/build/dial/dial-min.js | 10 + .../javascript/yui3/build/dial/dial.js | 986 + .../javascript/yui3/build/dial/lang/dial.js | 8 + .../yui3/build/dial/lang/dial_en.js | 8 + .../yui3/build/dial/lang/dial_es.js | 8 + .../javascript/yui3/build/dom/dom-base-min.js | 12 +- .../javascript/yui3/build/dom/dom-base.js | 642 +- .../yui3/build/dom/dom-deprecated-min.js | 8 + .../yui3/build/dom/dom-deprecated.js | 68 + .../javascript/yui3/build/dom/dom-min.js | 16 +- .../yui3/build/dom/dom-screen-min.js | 10 +- .../javascript/yui3/build/dom/dom-screen.js | 209 +- .../yui3/build/dom/dom-style-ie-min.js | 8 + .../javascript/yui3/build/dom/dom-style-ie.js | 310 + .../yui3/build/dom/dom-style-min.js | 10 +- .../javascript/yui3/build/dom/dom-style.js | 408 +- .../include/javascript/yui3/build/dom/dom.js | 1390 +- .../yui3/build/dom/selector-css2-min.js | 10 +- .../yui3/build/dom/selector-css2.js | 79 +- .../yui3/build/dom/selector-css3-min.js | 10 +- .../yui3/build/dom/selector-css3.js | 20 +- .../javascript/yui3/build/dom/selector-min.js | 12 +- .../yui3/build/dom/selector-native-min.js | 10 +- .../yui3/build/dom/selector-native.js | 80 +- .../javascript/yui3/build/dom/selector.js | 153 +- .../javascript/yui3/build/dump/dump-min.js | 10 +- .../javascript/yui3/build/dump/dump.js | 55 +- .../yui3/build/editor/createlink-base-min.js | 8 + .../yui3/build/editor/createlink-base.js | 92 + .../yui3/build/editor/editor-base-min.js | 9 + .../yui3/build/editor/editor-base.js | 862 + .../yui3/build/editor/editor-bidi-min.js | 8 + .../yui3/build/editor/editor-bidi.js | 295 + .../yui3/build/editor/editor-br-min.js | 8 + .../javascript/yui3/build/editor/editor-br.js | 142 + .../yui3/build/editor/editor-lists-min.js | 8 + .../yui3/build/editor/editor-lists.js | 175 + .../yui3/build/editor/editor-min.js | 15 + .../yui3/build/editor/editor-para-min.js | 8 + .../yui3/build/editor/editor-para.js | 343 + .../yui3/build/editor/editor-tab-min.js | 8 + .../yui3/build/editor/editor-tab.js | 77 + .../javascript/yui3/build/editor/editor.js | 4226 ++++ .../yui3/build/editor/exec-command-min.js | 8 + .../yui3/build/editor/exec-command.js | 432 + .../javascript/yui3/build/editor/frame-min.js | 9 + .../javascript/yui3/build/editor/frame.js | 916 + .../yui3/build/editor/selection-min.js | 9 + .../javascript/yui3/build/editor/selection.js | 951 + .../yui3/build/escape/escape-min.js | 8 + .../javascript/yui3/build/escape/escape.js | 94 + .../event-custom/event-custom-base-min.js | 12 +- .../build/event-custom/event-custom-base.js | 808 +- .../event-custom/event-custom-complex-min.js | 10 +- .../event-custom/event-custom-complex.js | 339 +- .../build/event-custom/event-custom-min.js | 14 +- .../yui3/build/event-custom/event-custom.js | 1141 +- .../build/event-gestures/event-flick-min.js | 8 + .../yui3/build/event-gestures/event-flick.js | 251 + .../event-gestures/event-gestures-min.js | 8 + .../build/event-gestures/event-gestures.js | 762 + .../build/event-gestures/event-move-min.js | 8 + .../yui3/build/event-gestures/event-move.js | 514 + .../event-simulate/event-simulate-min.js | 10 +- .../build/event-simulate/event-simulate.js | 280 +- .../event-valuechange-min.js | 8 + .../event-valuechange/event-valuechange.js | 392 + .../yui3/build/event/event-base-ie-min.js | 10 + .../yui3/build/event/event-base-ie.js | 150 + .../yui3/build/event/event-base-min.js | 14 +- .../javascript/yui3/build/event/event-base.js | 716 +- .../yui3/build/event/event-delegate-min.js | 10 +- .../yui3/build/event/event-delegate.js | 564 +- .../yui3/build/event/event-focus-min.js | 10 +- .../yui3/build/event/event-focus.js | 225 +- .../yui3/build/event/event-hover-min.js | 8 + .../yui3/build/event/event-hover.js | 62 + .../yui3/build/event/event-key-min.js | 10 +- .../javascript/yui3/build/event/event-key.js | 10 +- .../javascript/yui3/build/event/event-min.js | 16 +- .../yui3/build/event/event-mouseenter-min.js | 10 +- .../yui3/build/event/event-mouseenter.js | 224 +- .../yui3/build/event/event-mousewheel-min.js | 10 +- .../yui3/build/event/event-mousewheel.js | 10 +- .../yui3/build/event/event-resize-min.js | 10 +- .../yui3/build/event/event-resize.js | 10 +- .../yui3/build/event/event-synthetic-min.js | 8 + .../yui3/build/event/event-synthetic.js | 758 + .../yui3/build/event/event-touch-min.js | 8 + .../yui3/build/event/event-touch.js | 98 + .../javascript/yui3/build/event/event.js | 2453 +- .../javascript/yui3/build/get/get-min.js | 8 - .../include/javascript/yui3/build/get/get.js | 734 - .../highlight/highlight-accentfold-min.js | 8 + .../build/highlight/highlight-accentfold.js | 142 + .../build/highlight/highlight-base-min.js | 8 + .../yui3/build/highlight/highlight-base.js | 351 + .../yui3/build/highlight/highlight-min.js | 8 + .../yui3/build/highlight/highlight.js | 490 + .../history-deprecated-min.js | 8 + .../history-deprecated/history-deprecated.js | 682 + .../yui3/build/history/history-base-min.js | 8 + .../yui3/build/history/history-base.js | 634 + .../yui3/build/history/history-hash-ie-min.js | 8 + .../yui3/build/history/history-hash-ie.js | 142 + .../yui3/build/history/history-hash-min.js | 8 + .../yui3/build/history/history-hash.js | 486 + .../yui3/build/history/history-html5-min.js | 8 + .../yui3/build/history/history-html5.js | 257 + .../yui3/build/history/history-min.js | 11 +- .../javascript/yui3/build/history/history.js | 1868 +- .../yui3/build/imageloader/imageloader-min.js | 10 +- .../yui3/build/imageloader/imageloader.js | 16 +- .../javascript/yui3/build/intl/intl-min.js | 8 + .../javascript/yui3/build/intl/intl.js | 157 + .../javascript/yui3/build/io/io-base-min.js | 10 +- .../javascript/yui3/build/io/io-base.js | 1403 +- .../javascript/yui3/build/io/io-form-min.js | 10 +- .../javascript/yui3/build/io/io-form.js | 45 +- .../javascript/yui3/build/io/io-min.js | 12 +- .../javascript/yui3/build/io/io-queue-min.js | 10 +- .../javascript/yui3/build/io/io-queue.js | 346 +- .../yui3/build/io/io-upload-iframe-min.js | 10 +- .../yui3/build/io/io-upload-iframe.js | 475 +- .../javascript/yui3/build/io/io-xdr-min.js | 10 +- .../javascript/yui3/build/io/io-xdr.js | 492 +- .../include/javascript/yui3/build/io/io.js | 2883 ++- .../javascript/yui3/build/json/json-min.js | 10 +- .../yui3/build/json/json-parse-min.js | 10 +- .../javascript/yui3/build/json/json-parse.js | 71 +- .../yui3/build/json/json-stringify-min.js | 10 +- .../yui3/build/json/json-stringify.js | 28 +- .../javascript/yui3/build/json/json.js | 93 +- .../javascript/yui3/build/jsonp/jsonp-min.js | 8 + .../yui3/build/jsonp/jsonp-url-min.js | 8 + .../javascript/yui3/build/jsonp/jsonp-url.js | 133 + .../javascript/yui3/build/jsonp/jsonp.js | 209 + .../yui3/build/loader/loader-base-min.js | 10 + .../yui3/build/loader/loader-base.js | 2153 ++ .../yui3/build/loader/loader-min.js | 16 +- .../yui3/build/loader/loader-rollup-min.js | 8 + .../yui3/build/loader/loader-rollup.js | 109 + .../yui3/build/loader/loader-yui3-min.js | 10 + .../yui3/build/loader/loader-yui3.js | 1703 ++ .../javascript/yui3/build/loader/loader.js | 4231 +++- .../yui3/build/node-flick/node-flick-min.js | 8 + .../yui3/build/node-flick/node-flick.js | 525 + .../node-focusmanager-min.js | 10 +- .../node-focusmanager/node-focusmanager.js | 530 +- .../build/node-menunav/node-menunav-min.js | 14 +- .../yui3/build/node-menunav/node-menunav.js | 88 +- .../yui3/build/node/align-plugin-min.js | 8 + .../yui3/build/node/align-plugin.js | 200 + .../yui3/build/node/node-aria-min.js | 8 - .../javascript/yui3/build/node/node-aria.js | 32 - .../yui3/build/node/node-base-min.js | 13 +- .../javascript/yui3/build/node/node-base.js | 1407 +- .../yui3/build/node/node-deprecated-min.js | 8 + .../yui3/build/node/node-deprecated.js | 107 + .../build/node/node-event-delegate-min.js | 10 +- .../yui3/build/node/node-event-delegate.js | 54 +- .../yui3/build/node/node-event-html5-min.js | 8 + .../yui3/build/node/node-event-html5.js | 52 + .../build/node/node-event-simulate-min.js | 10 +- .../yui3/build/node/node-event-simulate.js | 17 +- .../yui3/build/node/node-load-min.js | 8 + .../javascript/yui3/build/node/node-load.js | 73 + .../javascript/yui3/build/node/node-min.js | 14 +- .../yui3/build/node/node-pluginhost-min.js | 10 +- .../yui3/build/node/node-pluginhost.js | 10 +- .../yui3/build/node/node-screen-min.js | 10 +- .../javascript/yui3/build/node/node-screen.js | 63 +- .../yui3/build/node/node-style-min.js | 10 +- .../javascript/yui3/build/node/node-style.js | 10 +- .../javascript/yui3/build/node/node.js | 1514 +- .../yui3/build/node/shim-plugin-min.js | 8 + .../javascript/yui3/build/node/shim-plugin.js | 113 + .../javascript/yui3/build/oop/oop-min.js | 10 +- .../include/javascript/yui3/build/oop/oop.js | 312 +- .../yui3/build/overlay/overlay-min.js | 10 +- .../javascript/yui3/build/overlay/overlay.js | 20 +- .../yui3/build/plugin/plugin-min.js | 10 +- .../javascript/yui3/build/plugin/plugin.js | 116 +- .../build/pluginhost/pluginhost-base-min.js | 8 + .../yui3/build/pluginhost/pluginhost-base.js | 184 + .../build/pluginhost/pluginhost-config-min.js | 8 + .../build/pluginhost/pluginhost-config.js | 128 + .../yui3/build/pluginhost/pluginhost-min.js | 10 +- .../yui3/build/pluginhost/pluginhost.js | 221 +- .../yui3/build/profiler/profiler-min.js | 10 +- .../yui3/build/profiler/profiler.js | 10 +- .../yui3/build/querystring/querystring-min.js | 8 + .../querystring/querystring-parse-min.js | 8 + .../querystring-parse-simple-min.js | 8 + .../querystring/querystring-parse-simple.js | 88 + .../build/querystring/querystring-parse.js | 162 + .../querystring/querystring-stringify-min.js | 8 + .../querystring-stringify-simple-min.js | 8 + .../querystring-stringify-simple.js | 69 + .../querystring/querystring-stringify.js | 115 + .../yui3/build/querystring/querystring.js | 276 + .../build/queue-promote/queue-promote-min.js | 10 +- .../yui3/build/queue-promote/queue-promote.js | 10 +- .../build/recordset/recordset-base-min.js | 8 + .../yui3/build/recordset/recordset-base.js | 652 + .../build/recordset/recordset-filter-min.js | 8 + .../yui3/build/recordset/recordset-filter.js | 121 + .../build/recordset/recordset-indexer-min.js | 8 + .../yui3/build/recordset/recordset-indexer.js | 235 + .../yui3/build/recordset/recordset-min.js | 9 + .../build/recordset/recordset-sort-min.js | 8 + .../yui3/build/recordset/recordset-sort.js | 213 + .../yui3/build/recordset/recordset.js | 1208 + .../yui3/build/resize/resize-base-min.js | 9 + .../yui3/build/resize/resize-base.js | 1605 ++ .../yui3/build/resize/resize-constrain-min.js | 8 + .../yui3/build/resize/resize-constrain.js | 451 + .../yui3/build/resize/resize-min.js | 10 + .../yui3/build/resize/resize-proxy-min.js | 8 + .../yui3/build/resize/resize-proxy.js | 153 + .../javascript/yui3/build/resize/resize.js | 2199 ++ .../scrollview/scrollview-base-ie-min.js | 8 + .../build/scrollview/scrollview-base-ie.js | 62 + .../build/scrollview/scrollview-base-min.js | 8 + .../yui3/build/scrollview/scrollview-base.js | 955 + .../yui3/build/scrollview/scrollview-min.js | 8 + .../scrollview/scrollview-paginator-min.js | 8 + .../build/scrollview/scrollview-paginator.js | 303 + .../scrollview/scrollview-scrollbars-min.js | 8 + .../build/scrollview/scrollview-scrollbars.js | 570 + .../yui3/build/scrollview/scrollview.js | 28 + .../yui3/build/simpleyui/simpleyui-min.js | 30 + .../yui3/build/simpleyui/simpleyui.js | 16372 ++++++++++++ .../yui3/build/slider/clickable-rail-min.js | 8 + .../yui3/build/slider/clickable-rail.js | 218 + .../yui3/build/slider/range-slider-min.js | 8 + .../yui3/build/slider/range-slider.js | 34 + .../yui3/build/slider/slider-base-min.js | 8 + .../yui3/build/slider/slider-base.js | 572 + .../yui3/build/slider/slider-min.js | 12 +- .../build/slider/slider-value-range-min.js | 8 + .../yui3/build/slider/slider-value-range.js | 398 + .../javascript/yui3/build/slider/slider.js | 2155 +- .../yui3/build/sortable/sortable-min.js | 8 + .../build/sortable/sortable-scroll-min.js | 8 + .../yui3/build/sortable/sortable-scroll.js | 74 + .../yui3/build/sortable/sortable.js | 516 + .../yui3/build/stylesheet/stylesheet-min.js | 10 +- .../yui3/build/stylesheet/stylesheet.js | 46 +- .../yui3/build/substitute/substitute-min.js | 10 +- .../yui3/build/substitute/substitute.js | 66 +- .../javascript/yui3/build/swf/swf-min.js | 8 + .../include/javascript/yui3/build/swf/swf.js | 213 + .../yui3/build/swfdetect/swfdetect-min.js | 8 + .../yui3/build/swfdetect/swfdetect.js | 114 + .../yui3/build/tabview/tabview-base-min.js | 8 + .../yui3/build/tabview/tabview-base.js | 151 + .../yui3/build/tabview/tabview-min.js | 8 + .../yui3/build/tabview/tabview-plugin-min.js | 8 + .../yui3/build/tabview/tabview-plugin.js | 23 + .../javascript/yui3/build/tabview/tabview.js | 404 + .../javascript/yui3/build/test/test-min.js | 18 +- .../javascript/yui3/build/test/test.js | 561 +- .../yui3/build/text/text-accentfold-min.js | 8 + .../yui3/build/text/text-accentfold.js | 169 + .../build/text/text-data-accentfold-min.js | 8 + .../yui3/build/text/text-data-accentfold.js | 53 + .../build/text/text-data-wordbreak-min.js | 8 + .../yui3/build/text/text-data-wordbreak.js | 35 + .../javascript/yui3/build/text/text-min.js | 9 + .../yui3/build/text/text-wordbreak-min.js | 8 + .../yui3/build/text/text-wordbreak.js | 369 + .../javascript/yui3/build/text/text.js | 609 + .../yui3/build/transition/transition-min.js | 9 + .../build/transition/transition-native-min.js | 9 + .../build/transition/transition-native.js | 675 + .../build/transition/transition-timer-min.js | 8 + .../yui3/build/transition/transition-timer.js | 348 + .../yui3/build/transition/transition.js | 1020 + .../yui3/build/uploader/uploader-min.js | 8 + .../yui3/build/uploader/uploader.js | 551 + .../yui3/build/widget-anim/widget-anim-min.js | 8 + .../yui3/build/widget-anim/widget-anim.js | 264 + .../yui3/build/widget/widget-base-ie-min.js | 8 + .../yui3/build/widget/widget-base-ie.js | 56 + .../yui3/build/widget/widget-base-min.js | 8 + .../yui3/build/widget/widget-base.js | 1136 + .../yui3/build/widget/widget-child-min.js | 8 + .../yui3/build/widget/widget-child.js | 380 + .../build/widget/widget-htmlparser-min.js | 8 + .../yui3/build/widget/widget-htmlparser.js | 170 + .../yui3/build/widget/widget-locale-min.js | 8 + .../yui3/build/widget/widget-locale.js | 176 + .../yui3/build/widget/widget-min.js | 12 +- .../yui3/build/widget/widget-parent-min.js | 8 + .../yui3/build/widget/widget-parent.js | 851 + .../build/widget/widget-position-align-min.js | 8 + ...sition-ext.js => widget-position-align.js} | 168 +- .../widget/widget-position-constrain-min.js | 8 + .../build/widget/widget-position-constrain.js | 352 + .../build/widget/widget-position-ext-min.js | 8 - .../yui3/build/widget/widget-position-min.js | 10 +- .../yui3/build/widget/widget-position.js | 27 +- .../yui3/build/widget/widget-skin-min.js | 8 + .../yui3/build/widget/widget-skin.js | 50 + .../yui3/build/widget/widget-stack-min.js | 10 +- .../yui3/build/widget/widget-stack.js | 10 +- .../yui3/build/widget/widget-stdmod-min.js | 10 +- .../yui3/build/widget/widget-stdmod.js | 233 +- .../yui3/build/widget/widget-uievents-min.js | 8 + .../yui3/build/widget/widget-uievents.js | 201 + .../javascript/yui3/build/widget/widget.js | 1771 +- .../javascript/yui3/build/yql/yql-min.js | 8 + .../include/javascript/yui3/build/yql/yql.js | 142 + .../yui3/build/yui-base/yui-base-min.js | 9 - .../yui3/build/yui-base/yui-base.js | 2136 -- .../javascript/yui3/build/yui/features-min.js | 8 + .../javascript/yui3/build/yui/features.js | 153 + .../javascript/yui3/build/yui/get-min.js | 10 +- .../include/javascript/yui3/build/yui/get.js | 443 +- .../yui3/build/yui/intl-base-min.js | 8 + .../javascript/yui3/build/yui/intl-base.js | 95 + .../javascript/yui3/build/yui/rls-min.js | 8 + .../include/javascript/yui3/build/yui/rls.js | 68 + .../javascript/yui3/build/yui/yui-base-min.js | 13 +- .../javascript/yui3/build/yui/yui-base.js | 2634 +- .../yui3/build/yui/yui-later-min.js | 10 +- .../javascript/yui3/build/yui/yui-later.js | 103 +- .../javascript/yui3/build/yui/yui-log-min.js | 10 +- .../javascript/yui3/build/yui/yui-log.js | 69 +- .../javascript/yui3/build/yui/yui-min.js | 17 +- .../yui3/build/yui/yui-throttle-min.js | 10 + .../javascript/yui3/build/yui/yui-throttle.js | 49 + .../include/javascript/yui3/build/yui/yui.js | 3564 ++- jssource/src_files/include/jsolait/init.js | 755 - .../src_files/include/jsolait/lib/codecs.js | 191 - .../src_files/include/jsolait/lib/crypto.js | 172 - .../src_files/include/jsolait/lib/jsonrpc.js | 462 - .../include/jsolait/lib/jsonrpclite.js | 451 - .../src_files/include/jsolait/lib/lang.js | 508 - .../src_files/include/jsolait/lib/langlite.js | 167 - .../src_files/include/jsolait/lib/urllib.js | 335 - jssource/src_files/include/jsolait/lib/xml.js | 270 - .../src_files/include/jsolait/lib/xmlrpc.js | 854 - .../src_files/include/jsolait/missingmixin.js | 174 - jssource/src_files/include/ytree/treeutil.js | 2 +- jssource/src_files/install/installCommon.js | 2 +- .../javascript/Administration.js | 2 +- .../Administration/javascript/Async.js | 4 +- .../src_files/modules/Documents/documents.js | 13 +- .../modules/Studio/studiotabgroups.js | 2 +- modules/ACLRoles/ACLRoles.js | 2 +- modules/ACLRoles/Popup_picker.html | 16 +- modules/ACLRoles/popup.tpl | 1 - modules/Accounts/Account.js | 2 +- modules/Accounts/Popup_picker.html | 14 +- modules/Activities/OpenListView.html | 117 - modules/Activities/OpenListView.php | 328 - .../javascript/Administration.js | 4 +- modules/Administration/javascript/Async.js | 4 +- .../Administration/templates/RepairXSS.tpl | 1 - modules/Calls/Call.php | 2 + modules/Calls/metadata/editviewdefs.php | 5 +- modules/Calls/metadata/quickcreatedefs.php | 3 +- modules/CampaignLog/Popup_picker.html | 11 - modules/Campaigns/Campaign.php | 10 + modules/Campaigns/DetailView.js | 2 +- modules/Campaigns/GenerateWebToLeadForm.php | 4 +- modules/Campaigns/Popup_picker.html | 14 +- modules/Campaigns/RoiDetailView.php | 2 + modules/Campaigns/WebToLead.js | 6 +- modules/Campaigns/WebToLeadCreation.html | 2 - modules/Campaigns/WebToLeadDownloadForm.html | 1 - modules/Campaigns/WebToLeadForm.html | 1 - modules/Campaigns/WizardEmailSetup.php | 6 +- modules/Campaigns/wizard.js | 2 +- modules/Cases/metadata/SearchFields.php | 10 +- modules/Configurator/LogView.php | 3 +- modules/Configurator/language/en_us.lang.php | 2 +- modules/Configurator/tpls/adminwizard.tpl | 16 +- modules/Connectors/Connector.js | 2 +- .../rest/insideview/InsideViewLogicHook.php | 22 +- .../rest/insideview/language/en_us.lang.php | 57 + .../InsideView.tpl} | 10 +- modules/Contacts/AcceptDecline.php | 2 +- modules/Contacts/Contact.js | 2 +- modules/Contacts/Email_picker.html | 11 +- modules/Contacts/MailMergePicker.html | 9 +- modules/Currencies/EditView.js | 2 +- .../metadata/editviewdefs.php | 3 - modules/Documents/Document.php | 5 + modules/Documents/Popup_picker.html | 12 +- modules/Documents/documents.js | 8 +- modules/Documents/metadata/detailviewdefs.php | 8 +- modules/Documents/metadata/editviewdefs.php | 3 - .../Documents/metadata/quickcreatedefs.php | 2 - modules/DynamicFields/DynamicField.php | 23 +- .../templates/Fields/TemplateRange.php | 1 + modules/EAPM/EAPMEdit.js | 2 +- modules/EmailMan/EmailMan.php | 9 +- modules/EmailMan/tpls/config.tpl | 2 +- modules/EmailTemplates/EditView.html | 5 +- modules/EmailTemplates/EditView.php | 37 +- modules/EmailTemplates/EditViewMain.html | 3 - modules/EmailTemplates/EmailTemplate.js | 2 +- .../PopupDocumentsCampaignTemplate.html | 1 + modules/EmailTemplates/vardefs.php | 1 + modules/Emails/EditView.html | 1 - modules/Emails/EditViewArchive.html | 2 +- modules/Emails/EmailUIAjax.php | 8 +- modules/Emails/PopupDocuments.html | 2 +- modules/Emails/Popup_picker.html | 12 +- modules/Emails/javascript/Email.js | 205 +- modules/Emails/javascript/EmailUI.js | 22 +- modules/Emails/javascript/EmailUICompose.js | 48 +- modules/Emails/javascript/ajax.js | 140 +- modules/Emails/javascript/complexLayout.js | 2 +- modules/Emails/javascript/init.js | 13 +- modules/Employees/Popup_picker.html | 15 +- modules/Employees/Save.php | 13 + modules/Employees/views/view.detail.php | 51 + modules/Employees/views/view.list.php | 51 + modules/Home/About.php | 4 - .../JotPadDashlet/JotPadDashletScript.tpl | 2 +- modules/Home/Home.tpl | 1 - modules/Home/about.js | 2 +- modules/Home/language/en_us.lang.php | 4 - modules/Home/quicksearchQuery.php | 64 +- modules/Import/views/view.step4.php | 1 + modules/InboundEmail/InboundEmail.js | 2 +- modules/InboundEmail/InboundEmail.php | 10 + modules/Leads/Lead.js | 2 +- modules/Leads/Popup_picker.html | 15 +- modules/MailMerge/Step1.html | 2 - modules/MailMerge/Step2.html | 2 - modules/Meetings/Meeting.php | 3 + modules/Meetings/jsclass_scheduler.js | 2 +- modules/Meetings/metadata/editviewdefs.php | 7 +- modules/Meetings/metadata/quickcreatedefs.php | 3 +- modules/MergeRecords/Merge.js | 2 +- modules/MergeRecords/MergeField.html | 2 +- modules/MergeRecords/SearchForm.html | 4 +- modules/ModuleBuilder/MB/MBModule.php | 41 +- modules/ModuleBuilder/controller.php | 110 +- .../ModuleBuilder/javascript/SimpleList.js | 20 +- .../javascript/studiotabgroups.js | 2 +- .../ModuleBuilder/parsers/parser.dropdown.php | 11 +- .../ModuleBuilder/parsers/parser.label.php | 3 +- .../relationships/ActivitiesRelationship.php | 1 + .../views/GridLayoutMetaDataParser.php | 7 + .../views/ListLayoutMetaDataParser.php | 2 +- .../parsers/views/SubpanelMetaDataParser.php | 33 +- .../ModuleBuilder/tpls/MBModule/dropdown.tpl | 1 + modules/ModuleBuilder/tpls/MBModule/field.tpl | 2 +- modules/ModuleBuilder/tpls/editProperty.tpl | 2 +- modules/ModuleBuilder/tpls/layoutView.tpl | 7 +- modules/ModuleBuilder/tpls/wizard.tpl | 2 +- modules/ModuleBuilder/views/view.dropdown.php | 10 +- .../ModuleBuilder/views/view.modulefield.php | 15 +- modules/ModuleBuilder/views/view.package.php | 1 + modules/Notes/metadata/quickcreatedefs.php | 4 +- modules/Project/Project.js | 2 +- modules/ProjectTask/Popup.html | 2 +- modules/ProjectTask/Popup_picker.html | 13 +- modules/ProjectTask/ProjectTask.js | 2 +- modules/ProspectLists/Popup_picker.html | 15 +- modules/ProspectLists/ProspectList.php | 20 +- modules/Prospects/Popup_picker.html | 11 - modules/Releases/Popup_picker.html | 16 +- modules/SavedSearch/SavedSearch.php | 5 +- modules/Schedulers/Save.php | 9 +- modules/Schedulers/Scheduler.php | 8 +- modules/Studio/DropDowns/EditView.tpl | 6 +- modules/Studio/JSTransaction.js | 2 +- modules/Studio/TabGroups/TabGroupHelper.php | 2 +- modules/Studio/studio.js | 4 +- modules/Studio/studiodd.js | 2 +- modules/Studio/studiotabgroups.js | 4 +- modules/Studio/ygDDListStudio.js | 4 +- modules/Tasks/vardefs.php | 2 + modules/UpgradeWizard/UpgradeRemoval.php | 127 + modules/UpgradeWizard/upgradeWizard.js | 2 +- modules/UpgradeWizard/upload.php | 3 +- modules/UpgradeWizard/uw_utils.php | 95 +- modules/Users/DetailView.js | 2 +- modules/Users/GeneratePassword.php | 1 - modules/Users/PasswordRequirementBox.js | 2 +- modules/Users/Popup_picker.html | 15 +- modules/Users/User.js | 2 +- .../SAMLAuthenticate/settings.php | 2 +- modules/Users/login.js | 2 +- modules/Users/tpls/wizard.tpl | 22 +- service/core/SoapHelperWebService.php | 47 +- service/utils/SugarRest.js | 2 +- soap/SoapDeprecated.php | 4 + soap/SoapHelperFunctions.php | 34 +- sugar_version.php | 8 +- tests/include/JSONTest.php | 25 - .../Fields/Relate/Bug43770Test.php | 69 + tests/include/SugarObjects/Bug32797Test.php | 36 + tests/include/ValidDBNameTest.php | 51 + .../generic/SugarWidgets/Bug44272Test.php | 81 + tests/include/utils/XssTest.php | 6 + tests/modules/DynamicFields/Bug40658Test.php | 163 + tests/modules/Employees/Bug45714Test.php | 96 + tests/modules/Home/Bug43395Test.php | 36 + tests/modules/Import/Bug39756Test.php | 97 + tests/modules/ModuleBuilder/Bug45573Test.php | 151 + .../modules/ModuleBuilder/MB/Bug38281Test.php | 69 + .../ModuleBuilder/parsers/Bug44712Test.php | 58 + .../parsers/views/Bug45767Test.php | 62 + .../ModuleBuilder/views/Bug45683Test.php | 61 + tests/modules/Opportunities/Bug42727.php | 84 + tests/modules/ProspectLists/Bug36422Test.php | 154 + tests/modules/SavedSearch/Bug42378Test.php | 6 +- tests/modules/UpgradeWizard/Bug46027Test.php | 110 + .../Documents/metadata/editviewdefs.php | 1 - .../Documents/metadata/editviewdefs.php | 1 - .../Documents/metadata/editviewdefs.php | 1 - .../modules/Cases/metadata/editviewdefs.php | 36 + tests/service/Bug31003Test.php | 72 + tests/service/Bug44280Test.php | 237 + themes/Sugar5/css/style.css | 1 + themes/Sugar5/js/style.js | 6 +- themes/Sugar5/tpls/_globalLinks.tpl | 8 +- themes/Sugar5/tpls/_welcome.tpl | 2 +- themes/default/css/style.css | 3 + themes/default/js/style.js | 2 +- vcal_server.php | 1 + 2574 files changed, 243831 insertions(+), 68347 deletions(-) delete mode 100644 README delete mode 100644 custom/.gitignore delete mode 100644 include/JSON.js create mode 100644 include/javascript/sugar_yui_overrides.js create mode 100644 include/javascript/tiny_mce/classes/AddOnManager.js create mode 100644 include/javascript/tiny_mce/classes/ControlManager.js create mode 100644 include/javascript/tiny_mce/classes/Editor.js create mode 100644 include/javascript/tiny_mce/classes/EditorCommands.js create mode 100644 include/javascript/tiny_mce/classes/EditorManager.js create mode 100644 include/javascript/tiny_mce/classes/ForceBlocks.js create mode 100644 include/javascript/tiny_mce/classes/Formatter.js create mode 100644 include/javascript/tiny_mce/classes/LegacyInput.js create mode 100644 include/javascript/tiny_mce/classes/Popup.js create mode 100644 include/javascript/tiny_mce/classes/UndoManager.js create mode 100644 include/javascript/tiny_mce/classes/WindowManager.js create mode 100644 include/javascript/tiny_mce/classes/adapter/jquery/adapter.js create mode 100644 include/javascript/tiny_mce/classes/adapter/jquery/jquery.tinymce.js create mode 100644 include/javascript/tiny_mce/classes/adapter/prototype/adapter.js create mode 100644 include/javascript/tiny_mce/classes/dom/DOMUtils.js create mode 100644 include/javascript/tiny_mce/classes/dom/Element.js create mode 100644 include/javascript/tiny_mce/classes/dom/EventUtils.js create mode 100644 include/javascript/tiny_mce/classes/dom/Range.js create mode 100644 include/javascript/tiny_mce/classes/dom/RangeUtils.js create mode 100644 include/javascript/tiny_mce/classes/dom/ScriptLoader.js create mode 100644 include/javascript/tiny_mce/classes/dom/Selection.js create mode 100644 include/javascript/tiny_mce/classes/dom/Serializer.js create mode 100644 include/javascript/tiny_mce/classes/dom/Sizzle.js create mode 100644 include/javascript/tiny_mce/classes/dom/TreeWalker.js create mode 100644 include/javascript/tiny_mce/classes/dom/TridentSelection.js create mode 100644 include/javascript/tiny_mce/classes/firebug/FIREBUG.LICENSE create mode 100644 include/javascript/tiny_mce/classes/firebug/firebug-lite.js create mode 100644 include/javascript/tiny_mce/classes/html/DomParser.js create mode 100644 include/javascript/tiny_mce/classes/html/Entities.js create mode 100644 include/javascript/tiny_mce/classes/html/Node.js create mode 100644 include/javascript/tiny_mce/classes/html/SaxParser.js create mode 100644 include/javascript/tiny_mce/classes/html/Schema.js create mode 100644 include/javascript/tiny_mce/classes/html/Serializer.js create mode 100644 include/javascript/tiny_mce/classes/html/Styles.js create mode 100644 include/javascript/tiny_mce/classes/html/Writer.js create mode 100644 include/javascript/tiny_mce/classes/tinymce.js create mode 100644 include/javascript/tiny_mce/classes/ui/Button.js create mode 100644 include/javascript/tiny_mce/classes/ui/ColorSplitButton.js create mode 100644 include/javascript/tiny_mce/classes/ui/Container.js create mode 100644 include/javascript/tiny_mce/classes/ui/Control.js create mode 100644 include/javascript/tiny_mce/classes/ui/DropMenu.js create mode 100644 include/javascript/tiny_mce/classes/ui/KeyboardNavigation.js create mode 100644 include/javascript/tiny_mce/classes/ui/ListBox.js create mode 100644 include/javascript/tiny_mce/classes/ui/Menu.js create mode 100644 include/javascript/tiny_mce/classes/ui/MenuButton.js create mode 100644 include/javascript/tiny_mce/classes/ui/MenuItem.js create mode 100644 include/javascript/tiny_mce/classes/ui/NativeListBox.js create mode 100644 include/javascript/tiny_mce/classes/ui/Separator.js create mode 100644 include/javascript/tiny_mce/classes/ui/SplitButton.js create mode 100644 include/javascript/tiny_mce/classes/ui/Toolbar.js create mode 100644 include/javascript/tiny_mce/classes/ui/ToolbarGroup.js create mode 100644 include/javascript/tiny_mce/classes/util/Cookie.js create mode 100644 include/javascript/tiny_mce/classes/util/Dispatcher.js create mode 100644 include/javascript/tiny_mce/classes/util/JSON.js create mode 100644 include/javascript/tiny_mce/classes/util/JSONP.js create mode 100644 include/javascript/tiny_mce/classes/util/JSONRequest.js create mode 100644 include/javascript/tiny_mce/classes/util/URI.js create mode 100644 include/javascript/tiny_mce/classes/util/XHR.js create mode 100644 include/javascript/tiny_mce/jquery.tinymce.js create mode 100644 include/javascript/tiny_mce/plugins/advlist/editor_plugin.js create mode 100644 include/javascript/tiny_mce/plugins/advlist/editor_plugin_src.js create mode 100644 include/javascript/tiny_mce/plugins/autolink/editor_plugin.js create mode 100644 include/javascript/tiny_mce/plugins/autolink/editor_plugin_src.js create mode 100644 include/javascript/tiny_mce/plugins/autoresize/editor_plugin.js create mode 100644 include/javascript/tiny_mce/plugins/autoresize/editor_plugin_src.js create mode 100644 include/javascript/tiny_mce/plugins/autosave/langs/en.js delete mode 100644 include/javascript/tiny_mce/plugins/compat2x/editor_plugin.js delete mode 100644 include/javascript/tiny_mce/plugins/compat2x/editor_plugin_src.js create mode 100644 include/javascript/tiny_mce/plugins/legacyoutput/editor_plugin.js create mode 100644 include/javascript/tiny_mce/plugins/legacyoutput/editor_plugin_src.js create mode 100644 include/javascript/tiny_mce/plugins/lists/editor_plugin.js create mode 100644 include/javascript/tiny_mce/plugins/lists/editor_plugin_src.js delete mode 100644 include/javascript/tiny_mce/plugins/media/css/content.css delete mode 100644 include/javascript/tiny_mce/plugins/media/img/flv_player.swf create mode 100644 include/javascript/tiny_mce/plugins/media/moxieplayer.swf delete mode 100644 include/javascript/tiny_mce/plugins/pagebreak/css/content.css delete mode 100644 include/javascript/tiny_mce/plugins/pagebreak/img/trans.gif delete mode 100644 include/javascript/tiny_mce/plugins/paste/blank.htm delete mode 100644 include/javascript/tiny_mce/plugins/paste/css/blank.css delete mode 100644 include/javascript/tiny_mce/plugins/paste/css/pasteword.css delete mode 100644 include/javascript/tiny_mce/plugins/safari/blank.htm delete mode 100644 include/javascript/tiny_mce/plugins/safari/editor_plugin.js delete mode 100644 include/javascript/tiny_mce/plugins/safari/editor_plugin_src.js create mode 100644 include/javascript/tiny_mce/plugins/tabfocus/editor_plugin.js create mode 100644 include/javascript/tiny_mce/plugins/tabfocus/editor_plugin_src.js create mode 100644 include/javascript/tiny_mce/plugins/wordcount/editor_plugin.js create mode 100644 include/javascript/tiny_mce/plugins/wordcount/editor_plugin_src.js rename include/javascript/tiny_mce/{plugins/media => themes/advanced}/img/flash.gif (100%) create mode 100644 include/javascript/tiny_mce/themes/advanced/img/iframe.gif rename include/javascript/tiny_mce/{plugins/pagebreak => themes/advanced}/img/pagebreak.gif (100%) rename include/javascript/tiny_mce/{plugins/media => themes/advanced}/img/quicktime.gif (100%) rename include/javascript/tiny_mce/{plugins/media => themes/advanced}/img/realmedia.gif (100%) rename include/javascript/tiny_mce/{plugins/media => themes/advanced}/img/shockwave.gif (100%) rename include/javascript/tiny_mce/{plugins/media => themes/advanced}/img/trans.gif (100%) create mode 100644 include/javascript/tiny_mce/themes/advanced/img/video.gif rename include/javascript/tiny_mce/{plugins/media => themes/advanced}/img/windowsmedia.gif (100%) create mode 100644 include/javascript/tiny_mce/themes/advanced/shortcuts.htm create mode 100644 include/javascript/tiny_mce/themes/advanced/skins/highcontrast/content.css create mode 100644 include/javascript/tiny_mce/themes/advanced/skins/highcontrast/dialog.css create mode 100644 include/javascript/tiny_mce/themes/advanced/skins/highcontrast/ui.css create mode 100644 include/javascript/tiny_mce/tiny_mce_dev.js create mode 100644 include/javascript/tiny_mce/tiny_mce_jquery.js create mode 100644 include/javascript/tiny_mce/tiny_mce_jquery_src.js create mode 100644 include/javascript/tiny_mce/tiny_mce_prototype.js create mode 100644 include/javascript/tiny_mce/tiny_mce_prototype_src.js delete mode 100644 include/javascript/yui/build/connection/connection_core-debug.js create mode 100644 include/javascript/yui/build/container/container_core.js delete mode 100644 include/javascript/yui/build/datemath/datemath-debug.js delete mode 100644 include/javascript/yui/build/element-delegate/element-delegate-debug.js delete mode 100644 include/javascript/yui/build/event-delegate/event-delegate-debug.js delete mode 100644 include/javascript/yui/build/event-mouseenter/event-mouseenter-debug.js delete mode 100644 include/javascript/yui/build/event-simulate/event-simulate-debug.js delete mode 100644 include/javascript/yui/build/progressbar/progressbar-debug.js delete mode 100644 include/javascript/yui/build/storage/storage-debug.js delete mode 100644 include/javascript/yui/build/stylesheet/stylesheet-debug.js delete mode 100644 include/javascript/yui/build/swf/swf-debug.js delete mode 100644 include/javascript/yui/build/swfdetect/swfdetect-debug.js delete mode 100644 include/javascript/yui/build/swfstore/swf.js delete mode 100644 include/javascript/yui/build/swfstore/swfstore-debug.js create mode 100644 include/javascript/yui3/build/arraysort/arraysort-min.js create mode 100644 include/javascript/yui3/build/arraysort/arraysort.js create mode 100644 include/javascript/yui3/build/assets/skins/sam/arrows.png create mode 100644 include/javascript/yui3/build/assets/skins/sam/autocomplete-list.css create mode 100644 include/javascript/yui3/build/assets/skins/sam/autocomplete.css create mode 100644 include/javascript/yui3/build/assets/skins/sam/datatable-base.css create mode 100644 include/javascript/yui3/build/assets/skins/sam/datatable.css create mode 100644 include/javascript/yui3/build/assets/skins/sam/dial.css create mode 100644 include/javascript/yui3/build/assets/skins/sam/dt-arrow-dn.png create mode 100644 include/javascript/yui3/build/assets/skins/sam/dt-arrow-up.png create mode 100644 include/javascript/yui3/build/assets/skins/sam/node-flick.css create mode 100644 include/javascript/yui3/build/assets/skins/sam/rail-x-lines.png create mode 100644 include/javascript/yui3/build/assets/skins/sam/rail-x.png create mode 100644 include/javascript/yui3/build/assets/skins/sam/rail-y-lines.png create mode 100644 include/javascript/yui3/build/assets/skins/sam/rail-y.png create mode 100644 include/javascript/yui3/build/assets/skins/sam/resize-base.css create mode 100644 include/javascript/yui3/build/assets/skins/sam/resize.css create mode 100644 include/javascript/yui3/build/assets/skins/sam/scrollview-base.css create mode 100644 include/javascript/yui3/build/assets/skins/sam/scrollview-paginator.css create mode 100644 include/javascript/yui3/build/assets/skins/sam/scrollview-scrollbars.css create mode 100644 include/javascript/yui3/build/assets/skins/sam/slider-base.css create mode 100644 include/javascript/yui3/build/assets/skins/sam/tabview.css create mode 100644 include/javascript/yui3/build/assets/skins/sam/test.css create mode 100644 include/javascript/yui3/build/assets/skins/sam/thumb-x.png create mode 100644 include/javascript/yui3/build/assets/skins/sam/thumb-y.png create mode 100644 include/javascript/yui3/build/assets/skins/sam/tmp.txt create mode 100644 include/javascript/yui3/build/assets/skins/sam/widget-base.css create mode 100644 include/javascript/yui3/build/autocomplete/assets/autocomplete-list-core.css create mode 100644 include/javascript/yui3/build/autocomplete/assets/skins/sam/autocomplete-list-skin.css create mode 100644 include/javascript/yui3/build/autocomplete/assets/skins/sam/autocomplete-list.css create mode 100644 include/javascript/yui3/build/autocomplete/assets/skins/sam/autocomplete.css create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete-base-min.js create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete-base.js create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete-filters-accentfold-min.js create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete-filters-accentfold.js create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete-filters-min.js create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete-filters.js create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete-highlighters-accentfold-min.js create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete-highlighters-accentfold.js create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete-highlighters-min.js create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete-highlighters.js create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete-list-keys-min.js create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete-list-keys.js create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete-list-min.js create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete-list.js create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete-min.js create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete-plugin-min.js create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete-plugin.js create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete-sources-min.js create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete-sources.js create mode 100644 include/javascript/yui3/build/autocomplete/autocomplete.js create mode 100644 include/javascript/yui3/build/autocomplete/lang/autocomplete-list.js create mode 100644 include/javascript/yui3/build/autocomplete/lang/autocomplete-list_en.js create mode 100644 include/javascript/yui3/build/autocomplete/lang/autocomplete.js create mode 100644 include/javascript/yui3/build/autocomplete/lang/autocomplete_en.js create mode 100644 include/javascript/yui3/build/cache/cache-base-min.js create mode 100644 include/javascript/yui3/build/cache/cache-base.js create mode 100644 include/javascript/yui3/build/cache/cache-offline-min.js create mode 100644 include/javascript/yui3/build/cache/cache-offline.js create mode 100644 include/javascript/yui3/build/cache/cache-plugin-min.js create mode 100644 include/javascript/yui3/build/cache/cache-plugin.js create mode 100644 include/javascript/yui3/build/charts/charts-min.js create mode 100644 include/javascript/yui3/build/charts/charts.js create mode 100644 include/javascript/yui3/build/collection/array-extras-min.js create mode 100644 include/javascript/yui3/build/collection/array-extras.js create mode 100644 include/javascript/yui3/build/collection/array-invoke-min.js create mode 100644 include/javascript/yui3/build/collection/array-invoke.js create mode 100644 include/javascript/yui3/build/collection/arraylist-add-min.js create mode 100644 include/javascript/yui3/build/collection/arraylist-add.js create mode 100644 include/javascript/yui3/build/collection/arraylist-filter-min.js create mode 100644 include/javascript/yui3/build/collection/arraylist-filter.js create mode 100644 include/javascript/yui3/build/collection/arraylist-min.js create mode 100644 include/javascript/yui3/build/collection/arraylist.js create mode 100644 include/javascript/yui3/build/console/lang/console.js create mode 100644 include/javascript/yui3/build/console/lang/console_en.js create mode 100644 include/javascript/yui3/build/console/lang/console_es.js create mode 100644 include/javascript/yui3/build/cssgrids-deprecated/grids-context-min.css create mode 100644 include/javascript/yui3/build/cssgrids-deprecated/grids-context.css create mode 100644 include/javascript/yui3/build/cssgrids-deprecated/grids-min.css create mode 100644 include/javascript/yui3/build/cssgrids-deprecated/grids.css delete mode 100644 include/javascript/yui3/build/cssgrids/grids-context-min.css delete mode 100644 include/javascript/yui3/build/cssgrids/grids-context.css create mode 100644 include/javascript/yui3/build/datatable/assets/datatable-base-core.css create mode 100644 include/javascript/yui3/build/datatable/assets/datatable-core.css create mode 100644 include/javascript/yui3/build/datatable/assets/skins/sam/datatable-base-skin.css create mode 100644 include/javascript/yui3/build/datatable/assets/skins/sam/datatable-base.css create mode 100644 include/javascript/yui3/build/datatable/assets/skins/sam/datatable.css create mode 100644 include/javascript/yui3/build/datatable/assets/skins/sam/dt-arrow-dn.png create mode 100644 include/javascript/yui3/build/datatable/assets/skins/sam/dt-arrow-up.png create mode 100644 include/javascript/yui3/build/datatable/assets/skins/sam/tmp.txt create mode 100644 include/javascript/yui3/build/datatable/datatable-base-min.js create mode 100644 include/javascript/yui3/build/datatable/datatable-base.js create mode 100644 include/javascript/yui3/build/datatable/datatable-datasource-min.js create mode 100644 include/javascript/yui3/build/datatable/datatable-datasource.js create mode 100644 include/javascript/yui3/build/datatable/datatable-min.js create mode 100644 include/javascript/yui3/build/datatable/datatable-scroll-min.js create mode 100644 include/javascript/yui3/build/datatable/datatable-scroll.js create mode 100644 include/javascript/yui3/build/datatable/datatable-sort-min.js create mode 100644 include/javascript/yui3/build/datatable/datatable-sort.js create mode 100644 include/javascript/yui3/build/datatable/datatable.js create mode 100644 include/javascript/yui3/build/datatable/lang/datatable-base.js create mode 100644 include/javascript/yui3/build/datatable/lang/datatable-base_en.js create mode 100644 include/javascript/yui3/build/datatable/lang/datatable-sort.js create mode 100644 include/javascript/yui3/build/datatable/lang/datatable-sort_en.js create mode 100644 include/javascript/yui3/build/datatable/lang/datatable.js create mode 100644 include/javascript/yui3/build/datatable/lang/datatable_en.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_ar-JO.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_ar.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_ca-ES.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_ca.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_da-DK.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_da.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_de-AT.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_de-DE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_de.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_el-GR.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_el.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_en-AU.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_en-CA.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_en-GB.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_en-IE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_en-IN.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_en-JO.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_en-MY.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_en-NZ.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_en-PH.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_en-SG.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_en-US.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_en.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_es-AR.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_es-BO.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_es-CL.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_es-CO.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_es-EC.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_es-ES.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_es-MX.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_es-PE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_es-PY.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_es-US.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_es-UY.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_es-VE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_es.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_fi-FI.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_fi.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_fr-BE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_fr-CA.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_fr-FR.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_fr.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_hi-IN.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_hi.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_id-ID.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_id.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_it-IT.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_it.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_ja-JP.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_ja.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_ko-KR.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_ko.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_ms-MY.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_ms.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_nb-NO.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_nb.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_nl-BE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_nl-NL.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_nl.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_pl-PL.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_pl.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_pt-BR.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_pt.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_ro-RO.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_ro.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_ru-RU.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_ru.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_sv-SE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_sv.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_th-TH.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_th.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_tr-TR.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_tr.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_vi-VN.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_vi.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hans-CN.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hans.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hant-HK.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hant-TW.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hant.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_ar-JO.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_ar.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_ca-ES.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_ca.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_da-DK.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_da.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_de-AT.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_de-DE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_de.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_el-GR.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_el.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_en-AU.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_en-CA.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_en-GB.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_en-IE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_en-IN.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_en-JO.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_en-MY.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_en-NZ.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_en-PH.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_en-SG.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_en-US.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_en.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_es-AR.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_es-BO.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_es-CL.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_es-CO.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_es-EC.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_es-ES.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_es-MX.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_es-PE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_es-PY.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_es-US.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_es-UY.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_es-VE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_es.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_fi-FI.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_fi.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_fr-BE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_fr-CA.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_fr-FR.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_fr.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_hi-IN.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_hi.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_id-ID.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_id.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_it-IT.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_it.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_ja-JP.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_ja.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_ko-KR.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_ko.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_ms-MY.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_ms.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_nb-NO.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_nb.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_nl-BE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_nl-NL.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_nl.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_pl-PL.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_pl.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_pt-BR.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_pt.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_ro-RO.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_ro.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_ru-RU.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_ru.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_sv-SE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_sv.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_th-TH.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_th.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_tr-TR.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_tr.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_vi-VN.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_vi.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hans-CN.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hans.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hant-HK.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hant-TW.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hant.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_ar-JO.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_ar.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_ca-ES.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_ca.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_da-DK.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_da.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_de-AT.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_de-DE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_de.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_el-GR.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_el.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_en-AU.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_en-CA.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_en-GB.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_en-IE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_en-IN.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_en-JO.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_en-MY.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_en-NZ.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_en-PH.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_en-SG.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_en-US.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_en.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_es-AR.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_es-BO.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_es-CL.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_es-CO.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_es-EC.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_es-ES.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_es-MX.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_es-PE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_es-PY.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_es-US.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_es-UY.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_es-VE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_es.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_fi-FI.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_fi.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_fr-BE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_fr-CA.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_fr-FR.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_fr.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_hi-IN.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_hi.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_id-ID.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_id.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_it-IT.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_it.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_ja-JP.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_ja.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_ko-KR.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_ko.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_ms-MY.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_ms.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_nb-NO.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_nb.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_nl-BE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_nl-NL.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_nl.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_pl-PL.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_pl.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_pt-BR.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_pt.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_ro-RO.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_ro.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_ru-RU.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_ru.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_sv-SE.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_sv.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_th-TH.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_th.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_tr-TR.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_tr.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_vi-VN.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_vi.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_zh-Hans-CN.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_zh-Hans.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_zh-Hant-HK.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_zh-Hant-TW.js create mode 100644 include/javascript/yui3/build/datatype/lang/datatype_zh-Hant.js create mode 100644 include/javascript/yui3/build/dd/dd-delegate-min.js create mode 100644 include/javascript/yui3/build/dd/dd-delegate.js create mode 100644 include/javascript/yui3/build/dd/dd-gestures-min.js create mode 100644 include/javascript/yui3/build/dd/dd-gestures.js create mode 100644 include/javascript/yui3/build/dial/assets/dial-core.css create mode 100644 include/javascript/yui3/build/dial/assets/skins/sam/dial-skin.css create mode 100644 include/javascript/yui3/build/dial/assets/skins/sam/dial.css create mode 100644 include/javascript/yui3/build/dial/dial-min.js create mode 100644 include/javascript/yui3/build/dial/dial.js create mode 100644 include/javascript/yui3/build/dial/lang/dial.js create mode 100644 include/javascript/yui3/build/dial/lang/dial_en.js create mode 100644 include/javascript/yui3/build/dial/lang/dial_es.js create mode 100644 include/javascript/yui3/build/dom/dom-deprecated-min.js create mode 100644 include/javascript/yui3/build/dom/dom-deprecated.js create mode 100644 include/javascript/yui3/build/dom/dom-style-ie-min.js create mode 100644 include/javascript/yui3/build/dom/dom-style-ie.js create mode 100644 include/javascript/yui3/build/editor/createlink-base-min.js create mode 100644 include/javascript/yui3/build/editor/createlink-base.js create mode 100644 include/javascript/yui3/build/editor/editor-base-min.js create mode 100644 include/javascript/yui3/build/editor/editor-base.js create mode 100644 include/javascript/yui3/build/editor/editor-bidi-min.js create mode 100644 include/javascript/yui3/build/editor/editor-bidi.js create mode 100644 include/javascript/yui3/build/editor/editor-br-min.js create mode 100644 include/javascript/yui3/build/editor/editor-br.js create mode 100644 include/javascript/yui3/build/editor/editor-lists-min.js create mode 100644 include/javascript/yui3/build/editor/editor-lists.js create mode 100644 include/javascript/yui3/build/editor/editor-min.js create mode 100644 include/javascript/yui3/build/editor/editor-para-min.js create mode 100644 include/javascript/yui3/build/editor/editor-para.js create mode 100644 include/javascript/yui3/build/editor/editor-tab-min.js create mode 100644 include/javascript/yui3/build/editor/editor-tab.js create mode 100644 include/javascript/yui3/build/editor/editor.js create mode 100644 include/javascript/yui3/build/editor/exec-command-min.js create mode 100644 include/javascript/yui3/build/editor/exec-command.js create mode 100644 include/javascript/yui3/build/editor/frame-min.js create mode 100644 include/javascript/yui3/build/editor/frame.js create mode 100644 include/javascript/yui3/build/editor/selection-min.js create mode 100644 include/javascript/yui3/build/editor/selection.js create mode 100644 include/javascript/yui3/build/escape/escape-min.js create mode 100644 include/javascript/yui3/build/escape/escape.js create mode 100644 include/javascript/yui3/build/event-gestures/event-flick-min.js create mode 100644 include/javascript/yui3/build/event-gestures/event-flick.js create mode 100644 include/javascript/yui3/build/event-gestures/event-gestures-min.js create mode 100644 include/javascript/yui3/build/event-gestures/event-gestures.js create mode 100644 include/javascript/yui3/build/event-gestures/event-move-min.js create mode 100644 include/javascript/yui3/build/event-gestures/event-move.js create mode 100644 include/javascript/yui3/build/event-valuechange/event-valuechange-min.js create mode 100644 include/javascript/yui3/build/event-valuechange/event-valuechange.js create mode 100644 include/javascript/yui3/build/event/event-base-ie-min.js create mode 100644 include/javascript/yui3/build/event/event-base-ie.js create mode 100644 include/javascript/yui3/build/event/event-hover-min.js create mode 100644 include/javascript/yui3/build/event/event-hover.js create mode 100644 include/javascript/yui3/build/event/event-synthetic-min.js create mode 100644 include/javascript/yui3/build/event/event-synthetic.js create mode 100644 include/javascript/yui3/build/event/event-touch-min.js create mode 100644 include/javascript/yui3/build/event/event-touch.js delete mode 100644 include/javascript/yui3/build/get/get-min.js delete mode 100644 include/javascript/yui3/build/get/get.js create mode 100644 include/javascript/yui3/build/highlight/highlight-accentfold-min.js create mode 100644 include/javascript/yui3/build/highlight/highlight-accentfold.js create mode 100644 include/javascript/yui3/build/highlight/highlight-base-min.js create mode 100644 include/javascript/yui3/build/highlight/highlight-base.js create mode 100644 include/javascript/yui3/build/highlight/highlight-min.js create mode 100644 include/javascript/yui3/build/highlight/highlight.js create mode 100644 include/javascript/yui3/build/history-deprecated/history-deprecated-min.js create mode 100644 include/javascript/yui3/build/history-deprecated/history-deprecated.js create mode 100644 include/javascript/yui3/build/history/history-base-min.js create mode 100644 include/javascript/yui3/build/history/history-base.js create mode 100644 include/javascript/yui3/build/history/history-hash-ie-min.js create mode 100644 include/javascript/yui3/build/history/history-hash-ie.js create mode 100644 include/javascript/yui3/build/history/history-hash-min.js create mode 100644 include/javascript/yui3/build/history/history-hash.js create mode 100644 include/javascript/yui3/build/history/history-html5-min.js create mode 100644 include/javascript/yui3/build/history/history-html5.js create mode 100644 include/javascript/yui3/build/intl/intl-min.js create mode 100644 include/javascript/yui3/build/intl/intl.js create mode 100644 include/javascript/yui3/build/jsonp/jsonp-min.js create mode 100644 include/javascript/yui3/build/jsonp/jsonp-url-min.js create mode 100644 include/javascript/yui3/build/jsonp/jsonp-url.js create mode 100644 include/javascript/yui3/build/jsonp/jsonp.js create mode 100644 include/javascript/yui3/build/loader/loader-base-min.js create mode 100644 include/javascript/yui3/build/loader/loader-base.js create mode 100644 include/javascript/yui3/build/loader/loader-rollup-min.js create mode 100644 include/javascript/yui3/build/loader/loader-rollup.js create mode 100644 include/javascript/yui3/build/loader/loader-yui3-min.js create mode 100644 include/javascript/yui3/build/loader/loader-yui3.js create mode 100644 include/javascript/yui3/build/node-flick/assets/node-flick-core.css create mode 100644 include/javascript/yui3/build/node-flick/assets/skins/sam/node-flick-skin.css create mode 100644 include/javascript/yui3/build/node-flick/assets/skins/sam/node-flick.css create mode 100644 include/javascript/yui3/build/node-flick/node-flick-min.js create mode 100644 include/javascript/yui3/build/node-flick/node-flick.js create mode 100644 include/javascript/yui3/build/node/align-plugin-min.js create mode 100644 include/javascript/yui3/build/node/align-plugin.js delete mode 100644 include/javascript/yui3/build/node/node-aria-min.js delete mode 100644 include/javascript/yui3/build/node/node-aria.js create mode 100644 include/javascript/yui3/build/node/node-deprecated-min.js create mode 100644 include/javascript/yui3/build/node/node-deprecated.js create mode 100644 include/javascript/yui3/build/node/node-event-html5-min.js create mode 100644 include/javascript/yui3/build/node/node-event-html5.js create mode 100644 include/javascript/yui3/build/node/node-load-min.js create mode 100644 include/javascript/yui3/build/node/node-load.js create mode 100644 include/javascript/yui3/build/node/shim-plugin-min.js create mode 100644 include/javascript/yui3/build/node/shim-plugin.js create mode 100644 include/javascript/yui3/build/pluginhost/pluginhost-base-min.js create mode 100644 include/javascript/yui3/build/pluginhost/pluginhost-base.js create mode 100644 include/javascript/yui3/build/pluginhost/pluginhost-config-min.js create mode 100644 include/javascript/yui3/build/pluginhost/pluginhost-config.js create mode 100644 include/javascript/yui3/build/querystring/querystring-min.js create mode 100644 include/javascript/yui3/build/querystring/querystring-parse-min.js create mode 100644 include/javascript/yui3/build/querystring/querystring-parse-simple-min.js create mode 100644 include/javascript/yui3/build/querystring/querystring-parse-simple.js create mode 100644 include/javascript/yui3/build/querystring/querystring-parse.js create mode 100644 include/javascript/yui3/build/querystring/querystring-stringify-min.js create mode 100644 include/javascript/yui3/build/querystring/querystring-stringify-simple-min.js create mode 100644 include/javascript/yui3/build/querystring/querystring-stringify-simple.js create mode 100644 include/javascript/yui3/build/querystring/querystring-stringify.js create mode 100644 include/javascript/yui3/build/querystring/querystring.js create mode 100644 include/javascript/yui3/build/recordset/recordset-base-min.js create mode 100644 include/javascript/yui3/build/recordset/recordset-base.js create mode 100644 include/javascript/yui3/build/recordset/recordset-filter-min.js create mode 100644 include/javascript/yui3/build/recordset/recordset-filter.js create mode 100644 include/javascript/yui3/build/recordset/recordset-indexer-min.js create mode 100644 include/javascript/yui3/build/recordset/recordset-indexer.js create mode 100644 include/javascript/yui3/build/recordset/recordset-min.js create mode 100644 include/javascript/yui3/build/recordset/recordset-sort-min.js create mode 100644 include/javascript/yui3/build/recordset/recordset-sort.js create mode 100644 include/javascript/yui3/build/recordset/recordset.js create mode 100644 include/javascript/yui3/build/resize/assets/resize-base-core.css create mode 100644 include/javascript/yui3/build/resize/assets/skins/sam/arrows.png create mode 100644 include/javascript/yui3/build/resize/assets/skins/sam/resize-base-skin.css create mode 100644 include/javascript/yui3/build/resize/assets/skins/sam/resize-base.css create mode 100644 include/javascript/yui3/build/resize/assets/skins/sam/resize.css create mode 100644 include/javascript/yui3/build/resize/resize-base-min.js create mode 100644 include/javascript/yui3/build/resize/resize-base.js create mode 100644 include/javascript/yui3/build/resize/resize-constrain-min.js create mode 100644 include/javascript/yui3/build/resize/resize-constrain.js create mode 100644 include/javascript/yui3/build/resize/resize-min.js create mode 100644 include/javascript/yui3/build/resize/resize-proxy-min.js create mode 100644 include/javascript/yui3/build/resize/resize-proxy.js create mode 100644 include/javascript/yui3/build/resize/resize.js create mode 100644 include/javascript/yui3/build/scrollview/assets/scrollview-base-core.css create mode 100644 include/javascript/yui3/build/scrollview/assets/scrollview-paginator-core.css create mode 100644 include/javascript/yui3/build/scrollview/assets/scrollview-scrollbars-core.css create mode 100644 include/javascript/yui3/build/scrollview/assets/skins/sam/scrollview-base-skin.css create mode 100644 include/javascript/yui3/build/scrollview/assets/skins/sam/scrollview-base.css create mode 100644 include/javascript/yui3/build/scrollview/assets/skins/sam/scrollview-paginator-skin.css create mode 100644 include/javascript/yui3/build/scrollview/assets/skins/sam/scrollview-paginator.css create mode 100644 include/javascript/yui3/build/scrollview/assets/skins/sam/scrollview-scrollbars-skin.css create mode 100644 include/javascript/yui3/build/scrollview/assets/skins/sam/scrollview-scrollbars.css create mode 100644 include/javascript/yui3/build/scrollview/scrollview-base-ie-min.js create mode 100644 include/javascript/yui3/build/scrollview/scrollview-base-ie.js create mode 100644 include/javascript/yui3/build/scrollview/scrollview-base-min.js create mode 100644 include/javascript/yui3/build/scrollview/scrollview-base.js create mode 100644 include/javascript/yui3/build/scrollview/scrollview-min.js create mode 100644 include/javascript/yui3/build/scrollview/scrollview-paginator-min.js create mode 100644 include/javascript/yui3/build/scrollview/scrollview-paginator.js create mode 100644 include/javascript/yui3/build/scrollview/scrollview-scrollbars-min.js create mode 100644 include/javascript/yui3/build/scrollview/scrollview-scrollbars.js create mode 100644 include/javascript/yui3/build/scrollview/scrollview.js create mode 100644 include/javascript/yui3/build/simpleyui/simpleyui-min.js create mode 100644 include/javascript/yui3/build/simpleyui/simpleyui.js create mode 100644 include/javascript/yui3/build/slider/assets/skins/audio-light/rail-x.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/audio-light/rail-y.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/audio-light/slider-base-skin.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/audio-light/slider-base.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/audio-light/slider-skin.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/audio-light/slider.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/audio-light/thumb-x.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/audio-light/thumb-y.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/audio/rail-x.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/audio/rail-y.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/audio/slider-base-skin.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/audio/slider-base.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/audio/slider-skin.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/audio/slider.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/audio/thumb-x.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/audio/thumb-y.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-x-dots.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-x-lines.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-x.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-y-dots.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-y-lines.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-y.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider-base-skin.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider-base.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider-skin.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule-dark/thumb-x-line.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule-dark/thumb-x.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule-dark/thumb-y-line.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule-dark/thumb-y.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule/rail-x-dots.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule/rail-x-lines.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule/rail-x.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule/rail-y-dots.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule/rail-y-lines.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule/rail-y.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule/slider-base-skin.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule/slider-base.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule/slider-skin.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule/slider.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule/thumb-x-line.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule/thumb-x.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule/thumb-y-line.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule/thumb-y-lines.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/capsule/thumb-y.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/round-dark/rail-x.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/round-dark/rail-y.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/round-dark/slider-base-skin.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/round-dark/slider-base.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/round-dark/slider-skin.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/round-dark/slider.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/round-dark/thumb-x-grip.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/round-dark/thumb-x.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/round-dark/thumb-y-grip.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/round-dark/thumb-y.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/round/rail-x.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/round/rail-y.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/round/slider-base-skin.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/round/slider-base.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/round/slider-skin.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/round/slider.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/round/thumb-x-grip.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/round/thumb-x.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/round/thumb-y-grip.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/round/thumb-y.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/sam-dark/rail-x-lines.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/sam-dark/rail-x.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/sam-dark/rail-y-lines.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/sam-dark/rail-y.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/sam-dark/slider-base-skin.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/sam-dark/slider-base.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/sam-dark/slider-skin.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/sam-dark/slider.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/sam-dark/thumb-x.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/sam-dark/thumb-y.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/sam/rail-x-lines.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/sam/rail-x.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/sam/rail-y-lines.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/sam/rail-y.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/sam/slider-base-skin.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/sam/slider-base.css create mode 100644 include/javascript/yui3/build/slider/assets/skins/sam/thumb-x.png create mode 100644 include/javascript/yui3/build/slider/assets/skins/sam/thumb-y.png create mode 100644 include/javascript/yui3/build/slider/assets/slider-base-core.css create mode 100644 include/javascript/yui3/build/slider/clickable-rail-min.js create mode 100644 include/javascript/yui3/build/slider/clickable-rail.js create mode 100644 include/javascript/yui3/build/slider/range-slider-min.js create mode 100644 include/javascript/yui3/build/slider/range-slider.js create mode 100644 include/javascript/yui3/build/slider/slider-base-min.js create mode 100644 include/javascript/yui3/build/slider/slider-base.js create mode 100644 include/javascript/yui3/build/slider/slider-value-range-min.js create mode 100644 include/javascript/yui3/build/slider/slider-value-range.js create mode 100644 include/javascript/yui3/build/sortable/sortable-min.js create mode 100644 include/javascript/yui3/build/sortable/sortable-scroll-min.js create mode 100644 include/javascript/yui3/build/sortable/sortable-scroll.js create mode 100644 include/javascript/yui3/build/sortable/sortable.js create mode 100644 include/javascript/yui3/build/swf/swf-min.js create mode 100644 include/javascript/yui3/build/swf/swf.js create mode 100644 include/javascript/yui3/build/swfdetect/swfdetect-min.js create mode 100644 include/javascript/yui3/build/swfdetect/swfdetect.js create mode 100644 include/javascript/yui3/build/tabview/assets/skins/sam/tabview-skin.css create mode 100644 include/javascript/yui3/build/tabview/assets/skins/sam/tabview.css create mode 100644 include/javascript/yui3/build/tabview/assets/tabview-core.css create mode 100644 include/javascript/yui3/build/tabview/assets/tabview.css create mode 100644 include/javascript/yui3/build/tabview/tabview-base-min.js create mode 100644 include/javascript/yui3/build/tabview/tabview-base.js create mode 100644 include/javascript/yui3/build/tabview/tabview-min.js create mode 100644 include/javascript/yui3/build/tabview/tabview-plugin-min.js create mode 100644 include/javascript/yui3/build/tabview/tabview-plugin.js create mode 100644 include/javascript/yui3/build/tabview/tabview.js create mode 100644 include/javascript/yui3/build/test/assets/skins/sam/test-skin.css create mode 100644 include/javascript/yui3/build/test/assets/skins/sam/test.css create mode 100644 include/javascript/yui3/build/text/text-accentfold-min.js create mode 100644 include/javascript/yui3/build/text/text-accentfold.js create mode 100644 include/javascript/yui3/build/text/text-data-accentfold-min.js create mode 100644 include/javascript/yui3/build/text/text-data-accentfold.js create mode 100644 include/javascript/yui3/build/text/text-data-wordbreak-min.js create mode 100644 include/javascript/yui3/build/text/text-data-wordbreak.js create mode 100644 include/javascript/yui3/build/text/text-min.js create mode 100644 include/javascript/yui3/build/text/text-wordbreak-min.js create mode 100644 include/javascript/yui3/build/text/text-wordbreak.js create mode 100644 include/javascript/yui3/build/text/text.js create mode 100644 include/javascript/yui3/build/transition/transition-min.js create mode 100644 include/javascript/yui3/build/transition/transition-native-min.js create mode 100644 include/javascript/yui3/build/transition/transition-native.js create mode 100644 include/javascript/yui3/build/transition/transition-timer-min.js create mode 100644 include/javascript/yui3/build/transition/transition-timer.js create mode 100644 include/javascript/yui3/build/transition/transition.js create mode 100644 include/javascript/yui3/build/uploader/assets/uploader.swf create mode 100644 include/javascript/yui3/build/uploader/uploader-min.js create mode 100644 include/javascript/yui3/build/uploader/uploader.js create mode 100644 include/javascript/yui3/build/widget-anim/widget-anim-min.js create mode 100644 include/javascript/yui3/build/widget-anim/widget-anim.js create mode 100644 include/javascript/yui3/build/widget/assets/skins/sam/widget-base-skin.css create mode 100644 include/javascript/yui3/build/widget/assets/skins/sam/widget-base.css delete mode 100644 include/javascript/yui3/build/widget/assets/skins/sam/widget-skin.css create mode 100644 include/javascript/yui3/build/widget/assets/widget-base-core.css delete mode 100644 include/javascript/yui3/build/widget/assets/widget-core.css create mode 100644 include/javascript/yui3/build/widget/widget-base-ie-min.js create mode 100644 include/javascript/yui3/build/widget/widget-base-ie.js create mode 100644 include/javascript/yui3/build/widget/widget-base-min.js create mode 100644 include/javascript/yui3/build/widget/widget-base.js create mode 100644 include/javascript/yui3/build/widget/widget-child-min.js create mode 100644 include/javascript/yui3/build/widget/widget-child.js create mode 100644 include/javascript/yui3/build/widget/widget-htmlparser-min.js create mode 100644 include/javascript/yui3/build/widget/widget-htmlparser.js create mode 100644 include/javascript/yui3/build/widget/widget-locale-min.js create mode 100644 include/javascript/yui3/build/widget/widget-locale.js create mode 100644 include/javascript/yui3/build/widget/widget-parent-min.js create mode 100644 include/javascript/yui3/build/widget/widget-parent.js create mode 100644 include/javascript/yui3/build/widget/widget-position-align-min.js create mode 100644 include/javascript/yui3/build/widget/widget-position-align.js create mode 100644 include/javascript/yui3/build/widget/widget-position-constrain-min.js create mode 100644 include/javascript/yui3/build/widget/widget-position-constrain.js delete mode 100644 include/javascript/yui3/build/widget/widget-position-ext-min.js delete mode 100644 include/javascript/yui3/build/widget/widget-position-ext.js create mode 100644 include/javascript/yui3/build/widget/widget-skin-min.js create mode 100644 include/javascript/yui3/build/widget/widget-skin.js create mode 100644 include/javascript/yui3/build/widget/widget-uievents-min.js create mode 100644 include/javascript/yui3/build/widget/widget-uievents.js create mode 100644 include/javascript/yui3/build/yql/yql-min.js create mode 100644 include/javascript/yui3/build/yql/yql.js delete mode 100644 include/javascript/yui3/build/yui-base/yui-base-min.js delete mode 100644 include/javascript/yui3/build/yui-base/yui-base.js create mode 100644 include/javascript/yui3/build/yui/features-min.js create mode 100644 include/javascript/yui3/build/yui/features.js create mode 100644 include/javascript/yui3/build/yui/intl-base-min.js create mode 100644 include/javascript/yui3/build/yui/intl-base.js create mode 100644 include/javascript/yui3/build/yui/rls-min.js create mode 100644 include/javascript/yui3/build/yui/rls.js create mode 100644 include/javascript/yui3/build/yui/yui-throttle-min.js create mode 100644 include/javascript/yui3/build/yui/yui-throttle.js delete mode 100644 include/jsolait/LICENSE delete mode 100644 include/jsolait/copying.txt delete mode 100644 include/jsolait/init.js delete mode 100644 include/jsolait/lib/codecs.js delete mode 100644 include/jsolait/lib/crypto.js delete mode 100644 include/jsolait/lib/jsonrpc.js delete mode 100644 include/jsolait/lib/jsonrpclite.js delete mode 100644 include/jsolait/lib/lang.js delete mode 100644 include/jsolait/lib/langlite.js delete mode 100644 include/jsolait/lib/urllib.js delete mode 100644 include/jsolait/lib/xml.js delete mode 100644 include/jsolait/lib/xmlrpc.js delete mode 100644 include/jsolait/missingmixin.js delete mode 100644 jssource/src_files/include/JSON.js create mode 100644 jssource/src_files/include/javascript/sugar_yui_overrides.js create mode 100644 jssource/src_files/include/javascript/yui3/build/arraysort/arraysort-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/arraysort/arraysort.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-base-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-base.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-filters-accentfold-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-filters-accentfold.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-filters-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-filters.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-highlighters-accentfold-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-highlighters-accentfold.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-highlighters-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-highlighters.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-list-keys-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-list-keys.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-list-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-list.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-plugin-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-plugin.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-sources-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-sources.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/lang/autocomplete-list.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/lang/autocomplete-list_en.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/lang/autocomplete.js create mode 100644 jssource/src_files/include/javascript/yui3/build/autocomplete/lang/autocomplete_en.js create mode 100644 jssource/src_files/include/javascript/yui3/build/cache/cache-base-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/cache/cache-base.js create mode 100644 jssource/src_files/include/javascript/yui3/build/cache/cache-offline-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/cache/cache-offline.js create mode 100644 jssource/src_files/include/javascript/yui3/build/cache/cache-plugin-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/cache/cache-plugin.js create mode 100644 jssource/src_files/include/javascript/yui3/build/charts/charts-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/charts/charts.js create mode 100644 jssource/src_files/include/javascript/yui3/build/collection/array-extras-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/collection/array-extras.js create mode 100644 jssource/src_files/include/javascript/yui3/build/collection/array-invoke-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/collection/array-invoke.js create mode 100644 jssource/src_files/include/javascript/yui3/build/collection/arraylist-add-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/collection/arraylist-add.js create mode 100644 jssource/src_files/include/javascript/yui3/build/collection/arraylist-filter-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/collection/arraylist-filter.js create mode 100644 jssource/src_files/include/javascript/yui3/build/collection/arraylist-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/collection/arraylist.js create mode 100644 jssource/src_files/include/javascript/yui3/build/console/lang/console.js create mode 100644 jssource/src_files/include/javascript/yui3/build/console/lang/console_en.js create mode 100644 jssource/src_files/include/javascript/yui3/build/console/lang/console_es.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatable/datatable-base-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatable/datatable-base.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatable/datatable-datasource-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatable/datatable-datasource.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatable/datatable-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatable/datatable-scroll-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatable/datatable-scroll.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatable/datatable-sort-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatable/datatable-sort.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatable/datatable.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatable/lang/datatable-base.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatable/lang/datatable-base_en.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatable/lang/datatable-sort.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatable/lang/datatable-sort_en.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatable/lang/datatable.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatable/lang/datatable_en.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ar-JO.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ar.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ca-ES.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ca.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_da-DK.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_da.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_de-AT.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_de-DE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_de.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_el-GR.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_el.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-AU.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-CA.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-GB.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-IE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-IN.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-JO.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-MY.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-NZ.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-PH.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-SG.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-US.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-AR.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-BO.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-CL.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-CO.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-EC.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-ES.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-MX.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-PE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-PY.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-US.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-UY.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-VE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_fi-FI.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_fi.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_fr-BE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_fr-CA.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_fr-FR.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_fr.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_hi-IN.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_hi.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_id-ID.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_id.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_it-IT.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_it.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ja-JP.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ja.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ko-KR.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ko.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ms-MY.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ms.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_nb-NO.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_nb.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_nl-BE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_nl-NL.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_nl.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_pl-PL.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_pl.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_pt-BR.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_pt.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ro-RO.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ro.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ru-RU.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ru.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_sv-SE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_sv.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_th-TH.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_th.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_tr-TR.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_tr.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_vi-VN.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_vi.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hans-CN.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hans.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hant-HK.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hant-TW.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hant.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ar-JO.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ar.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ca-ES.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ca.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_da-DK.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_da.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_de-AT.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_de-DE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_de.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_el-GR.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_el.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-AU.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-CA.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-GB.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-IE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-IN.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-JO.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-MY.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-NZ.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-PH.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-SG.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-US.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-AR.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-BO.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-CL.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-CO.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-EC.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-ES.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-MX.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-PE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-PY.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-US.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-UY.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-VE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_fi-FI.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_fi.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_fr-BE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_fr-CA.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_fr-FR.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_fr.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_hi-IN.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_hi.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_id-ID.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_id.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_it-IT.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_it.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ja-JP.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ja.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ko-KR.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ko.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ms-MY.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ms.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_nb-NO.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_nb.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_nl-BE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_nl-NL.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_nl.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_pl-PL.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_pl.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_pt-BR.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_pt.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ro-RO.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ro.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ru-RU.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ru.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_sv-SE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_sv.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_th-TH.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_th.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_tr-TR.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_tr.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_vi-VN.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_vi.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hans-CN.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hans.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hant-HK.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hant-TW.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hant.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ar-JO.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ar.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ca-ES.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ca.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_da-DK.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_da.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_de-AT.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_de-DE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_de.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_el-GR.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_el.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-AU.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-CA.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-GB.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-IE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-IN.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-JO.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-MY.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-NZ.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-PH.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-SG.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-US.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-AR.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-BO.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-CL.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-CO.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-EC.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-ES.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-MX.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-PE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-PY.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-US.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-UY.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-VE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_fi-FI.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_fi.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_fr-BE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_fr-CA.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_fr-FR.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_fr.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_hi-IN.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_hi.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_id-ID.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_id.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_it-IT.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_it.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ja-JP.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ja.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ko-KR.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ko.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ms-MY.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ms.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_nb-NO.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_nb.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_nl-BE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_nl-NL.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_nl.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_pl-PL.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_pl.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_pt-BR.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_pt.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ro-RO.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ro.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ru-RU.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ru.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_sv-SE.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_sv.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_th-TH.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_th.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_tr-TR.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_tr.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_vi-VN.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_vi.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_zh-Hans-CN.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_zh-Hans.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_zh-Hant-HK.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_zh-Hant-TW.js create mode 100644 jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_zh-Hant.js create mode 100644 jssource/src_files/include/javascript/yui3/build/dd/dd-delegate-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/dd/dd-delegate.js create mode 100644 jssource/src_files/include/javascript/yui3/build/dd/dd-gestures-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/dd/dd-gestures.js create mode 100644 jssource/src_files/include/javascript/yui3/build/dial/dial-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/dial/dial.js create mode 100644 jssource/src_files/include/javascript/yui3/build/dial/lang/dial.js create mode 100644 jssource/src_files/include/javascript/yui3/build/dial/lang/dial_en.js create mode 100644 jssource/src_files/include/javascript/yui3/build/dial/lang/dial_es.js create mode 100644 jssource/src_files/include/javascript/yui3/build/dom/dom-deprecated-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/dom/dom-deprecated.js create mode 100644 jssource/src_files/include/javascript/yui3/build/dom/dom-style-ie-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/dom/dom-style-ie.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/createlink-base-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/createlink-base.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/editor-base-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/editor-base.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/editor-bidi-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/editor-bidi.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/editor-br-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/editor-br.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/editor-lists-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/editor-lists.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/editor-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/editor-para-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/editor-para.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/editor-tab-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/editor-tab.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/editor.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/exec-command-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/exec-command.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/frame-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/frame.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/selection-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/editor/selection.js create mode 100644 jssource/src_files/include/javascript/yui3/build/escape/escape-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/escape/escape.js create mode 100644 jssource/src_files/include/javascript/yui3/build/event-gestures/event-flick-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/event-gestures/event-flick.js create mode 100644 jssource/src_files/include/javascript/yui3/build/event-gestures/event-gestures-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/event-gestures/event-gestures.js create mode 100644 jssource/src_files/include/javascript/yui3/build/event-gestures/event-move-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/event-gestures/event-move.js create mode 100644 jssource/src_files/include/javascript/yui3/build/event-valuechange/event-valuechange-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/event-valuechange/event-valuechange.js create mode 100644 jssource/src_files/include/javascript/yui3/build/event/event-base-ie-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/event/event-base-ie.js create mode 100644 jssource/src_files/include/javascript/yui3/build/event/event-hover-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/event/event-hover.js create mode 100644 jssource/src_files/include/javascript/yui3/build/event/event-synthetic-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/event/event-synthetic.js create mode 100644 jssource/src_files/include/javascript/yui3/build/event/event-touch-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/event/event-touch.js delete mode 100644 jssource/src_files/include/javascript/yui3/build/get/get-min.js delete mode 100644 jssource/src_files/include/javascript/yui3/build/get/get.js create mode 100644 jssource/src_files/include/javascript/yui3/build/highlight/highlight-accentfold-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/highlight/highlight-accentfold.js create mode 100644 jssource/src_files/include/javascript/yui3/build/highlight/highlight-base-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/highlight/highlight-base.js create mode 100644 jssource/src_files/include/javascript/yui3/build/highlight/highlight-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/highlight/highlight.js create mode 100644 jssource/src_files/include/javascript/yui3/build/history-deprecated/history-deprecated-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/history-deprecated/history-deprecated.js create mode 100644 jssource/src_files/include/javascript/yui3/build/history/history-base-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/history/history-base.js create mode 100644 jssource/src_files/include/javascript/yui3/build/history/history-hash-ie-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/history/history-hash-ie.js create mode 100644 jssource/src_files/include/javascript/yui3/build/history/history-hash-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/history/history-hash.js create mode 100644 jssource/src_files/include/javascript/yui3/build/history/history-html5-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/history/history-html5.js create mode 100644 jssource/src_files/include/javascript/yui3/build/intl/intl-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/intl/intl.js create mode 100644 jssource/src_files/include/javascript/yui3/build/jsonp/jsonp-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/jsonp/jsonp-url-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/jsonp/jsonp-url.js create mode 100644 jssource/src_files/include/javascript/yui3/build/jsonp/jsonp.js create mode 100644 jssource/src_files/include/javascript/yui3/build/loader/loader-base-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/loader/loader-base.js create mode 100644 jssource/src_files/include/javascript/yui3/build/loader/loader-rollup-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/loader/loader-rollup.js create mode 100644 jssource/src_files/include/javascript/yui3/build/loader/loader-yui3-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/loader/loader-yui3.js create mode 100644 jssource/src_files/include/javascript/yui3/build/node-flick/node-flick-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/node-flick/node-flick.js create mode 100644 jssource/src_files/include/javascript/yui3/build/node/align-plugin-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/node/align-plugin.js delete mode 100644 jssource/src_files/include/javascript/yui3/build/node/node-aria-min.js delete mode 100644 jssource/src_files/include/javascript/yui3/build/node/node-aria.js create mode 100644 jssource/src_files/include/javascript/yui3/build/node/node-deprecated-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/node/node-deprecated.js create mode 100644 jssource/src_files/include/javascript/yui3/build/node/node-event-html5-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/node/node-event-html5.js create mode 100644 jssource/src_files/include/javascript/yui3/build/node/node-load-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/node/node-load.js create mode 100644 jssource/src_files/include/javascript/yui3/build/node/shim-plugin-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/node/shim-plugin.js create mode 100644 jssource/src_files/include/javascript/yui3/build/pluginhost/pluginhost-base-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/pluginhost/pluginhost-base.js create mode 100644 jssource/src_files/include/javascript/yui3/build/pluginhost/pluginhost-config-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/pluginhost/pluginhost-config.js create mode 100644 jssource/src_files/include/javascript/yui3/build/querystring/querystring-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse-simple-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse-simple.js create mode 100644 jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse.js create mode 100644 jssource/src_files/include/javascript/yui3/build/querystring/querystring-stringify-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/querystring/querystring-stringify-simple-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/querystring/querystring-stringify-simple.js create mode 100644 jssource/src_files/include/javascript/yui3/build/querystring/querystring-stringify.js create mode 100644 jssource/src_files/include/javascript/yui3/build/querystring/querystring.js create mode 100644 jssource/src_files/include/javascript/yui3/build/recordset/recordset-base-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/recordset/recordset-base.js create mode 100644 jssource/src_files/include/javascript/yui3/build/recordset/recordset-filter-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/recordset/recordset-filter.js create mode 100644 jssource/src_files/include/javascript/yui3/build/recordset/recordset-indexer-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/recordset/recordset-indexer.js create mode 100644 jssource/src_files/include/javascript/yui3/build/recordset/recordset-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/recordset/recordset-sort-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/recordset/recordset-sort.js create mode 100644 jssource/src_files/include/javascript/yui3/build/recordset/recordset.js create mode 100644 jssource/src_files/include/javascript/yui3/build/resize/resize-base-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/resize/resize-base.js create mode 100644 jssource/src_files/include/javascript/yui3/build/resize/resize-constrain-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/resize/resize-constrain.js create mode 100644 jssource/src_files/include/javascript/yui3/build/resize/resize-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/resize/resize-proxy-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/resize/resize-proxy.js create mode 100644 jssource/src_files/include/javascript/yui3/build/resize/resize.js create mode 100644 jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base-ie-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base-ie.js create mode 100644 jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base.js create mode 100644 jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-paginator-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-paginator.js create mode 100644 jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-scrollbars-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-scrollbars.js create mode 100644 jssource/src_files/include/javascript/yui3/build/scrollview/scrollview.js create mode 100644 jssource/src_files/include/javascript/yui3/build/simpleyui/simpleyui-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/simpleyui/simpleyui.js create mode 100644 jssource/src_files/include/javascript/yui3/build/slider/clickable-rail-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/slider/clickable-rail.js create mode 100644 jssource/src_files/include/javascript/yui3/build/slider/range-slider-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/slider/range-slider.js create mode 100644 jssource/src_files/include/javascript/yui3/build/slider/slider-base-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/slider/slider-base.js create mode 100644 jssource/src_files/include/javascript/yui3/build/slider/slider-value-range-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/slider/slider-value-range.js create mode 100644 jssource/src_files/include/javascript/yui3/build/sortable/sortable-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/sortable/sortable-scroll-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/sortable/sortable-scroll.js create mode 100644 jssource/src_files/include/javascript/yui3/build/sortable/sortable.js create mode 100644 jssource/src_files/include/javascript/yui3/build/swf/swf-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/swf/swf.js create mode 100644 jssource/src_files/include/javascript/yui3/build/swfdetect/swfdetect-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/swfdetect/swfdetect.js create mode 100644 jssource/src_files/include/javascript/yui3/build/tabview/tabview-base-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/tabview/tabview-base.js create mode 100644 jssource/src_files/include/javascript/yui3/build/tabview/tabview-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/tabview/tabview-plugin-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/tabview/tabview-plugin.js create mode 100644 jssource/src_files/include/javascript/yui3/build/tabview/tabview.js create mode 100644 jssource/src_files/include/javascript/yui3/build/text/text-accentfold-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/text/text-accentfold.js create mode 100644 jssource/src_files/include/javascript/yui3/build/text/text-data-accentfold-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/text/text-data-accentfold.js create mode 100644 jssource/src_files/include/javascript/yui3/build/text/text-data-wordbreak-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/text/text-data-wordbreak.js create mode 100644 jssource/src_files/include/javascript/yui3/build/text/text-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/text/text-wordbreak-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/text/text-wordbreak.js create mode 100644 jssource/src_files/include/javascript/yui3/build/text/text.js create mode 100644 jssource/src_files/include/javascript/yui3/build/transition/transition-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/transition/transition-native-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/transition/transition-native.js create mode 100644 jssource/src_files/include/javascript/yui3/build/transition/transition-timer-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/transition/transition-timer.js create mode 100644 jssource/src_files/include/javascript/yui3/build/transition/transition.js create mode 100644 jssource/src_files/include/javascript/yui3/build/uploader/uploader-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/uploader/uploader.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget-anim/widget-anim-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget-anim/widget-anim.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-base-ie-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-base-ie.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-base-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-base.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-child-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-child.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-htmlparser-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-htmlparser.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-locale-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-locale.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-parent-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-parent.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-position-align-min.js rename jssource/src_files/include/javascript/yui3/build/widget/{widget-position-ext.js => widget-position-align.js} (78%) create mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-position-constrain-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-position-constrain.js delete mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-position-ext-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-skin-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-skin.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-uievents-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/widget/widget-uievents.js create mode 100644 jssource/src_files/include/javascript/yui3/build/yql/yql-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/yql/yql.js delete mode 100644 jssource/src_files/include/javascript/yui3/build/yui-base/yui-base-min.js delete mode 100644 jssource/src_files/include/javascript/yui3/build/yui-base/yui-base.js create mode 100644 jssource/src_files/include/javascript/yui3/build/yui/features-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/yui/features.js create mode 100644 jssource/src_files/include/javascript/yui3/build/yui/intl-base-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/yui/intl-base.js create mode 100644 jssource/src_files/include/javascript/yui3/build/yui/rls-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/yui/rls.js create mode 100644 jssource/src_files/include/javascript/yui3/build/yui/yui-throttle-min.js create mode 100644 jssource/src_files/include/javascript/yui3/build/yui/yui-throttle.js delete mode 100644 jssource/src_files/include/jsolait/init.js delete mode 100644 jssource/src_files/include/jsolait/lib/codecs.js delete mode 100644 jssource/src_files/include/jsolait/lib/crypto.js delete mode 100644 jssource/src_files/include/jsolait/lib/jsonrpc.js delete mode 100644 jssource/src_files/include/jsolait/lib/jsonrpclite.js delete mode 100644 jssource/src_files/include/jsolait/lib/lang.js delete mode 100644 jssource/src_files/include/jsolait/lib/langlite.js delete mode 100644 jssource/src_files/include/jsolait/lib/urllib.js delete mode 100644 jssource/src_files/include/jsolait/lib/xml.js delete mode 100644 jssource/src_files/include/jsolait/lib/xmlrpc.js delete mode 100644 jssource/src_files/include/jsolait/missingmixin.js delete mode 100644 modules/Activities/OpenListView.html delete mode 100644 modules/Activities/OpenListView.php create mode 100644 modules/Connectors/connectors/sources/ext/rest/insideview/language/en_us.lang.php rename modules/Connectors/connectors/sources/ext/rest/insideview/{InsideView.en_us.tpl => tpls/InsideView.tpl} (89%) create mode 100644 modules/UpgradeWizard/UpgradeRemoval.php create mode 100755 tests/include/SugarFields/Fields/Relate/Bug43770Test.php create mode 100755 tests/include/generic/SugarWidgets/Bug44272Test.php create mode 100755 tests/modules/DynamicFields/Bug40658Test.php create mode 100755 tests/modules/Employees/Bug45714Test.php create mode 100755 tests/modules/Import/Bug39756Test.php create mode 100755 tests/modules/ModuleBuilder/Bug45573Test.php create mode 100755 tests/modules/ModuleBuilder/MB/Bug38281Test.php create mode 100755 tests/modules/ModuleBuilder/parsers/Bug44712Test.php create mode 100755 tests/modules/ModuleBuilder/parsers/views/Bug45767Test.php create mode 100755 tests/modules/ModuleBuilder/views/Bug45683Test.php create mode 100755 tests/modules/Opportunities/Bug42727.php create mode 100755 tests/modules/ProspectLists/Bug36422Test.php create mode 100755 tests/modules/UpgradeWizard/Bug46027Test.php create mode 100755 tests/service/Bug31003Test.php create mode 100755 tests/service/Bug44280Test.php diff --git a/README b/README deleted file mode 100644 index b1effb42..00000000 --- a/README +++ /dev/null @@ -1 +0,0 @@ -This repository represents the Sugar CE source code from the latest stable version of SugarCRM. Check out the SugarCRM Dev wiki at https://github.com/sugarcrm/sugarcrm_dev/wiki for more details on how to fork this repository and submit pull requests to SugarCRM. diff --git a/cron.php b/cron.php index 4cb4b6d9..8f3e8a21 100644 --- a/cron.php +++ b/cron.php @@ -93,7 +93,9 @@ if(!is_file($cachePath.'/'.$pid)) { /////////////////////////////////////////////////////////////////////////////// //// EXECUTE IF VALID TIME (NOT DDOS) -if($timestamp[0] < strtotime(date('H:i'))) { +// mjamil | bug # 45229 - schedulers not able to run due to current time being equal to +// $timestamp[0] +if($timestamp[0] <= strtotime(date('H:i'))) { if(is_writable($cachePath.'/'.$pid)) { write_array_to_file('timestamp', array(strtotime(date('H:i'))) , $cachePath.'/'.$pid); require('modules/Schedulers/Scheduler.php'); diff --git a/custom/.gitignore b/custom/.gitignore deleted file mode 100644 index 255e2d3f..00000000 --- a/custom/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.ext.php -*MetaData.php -history/** -modulebuilder/** -working/** diff --git a/data/SugarBean.php b/data/SugarBean.php index 3622d45d..20dbeb50 100644 --- a/data/SugarBean.php +++ b/data/SugarBean.php @@ -1770,8 +1770,9 @@ function save_relationship_changes($is_update, $exclude=array()) { $new_rel_id = false; $new_rel_link = false; + //this allows us to dynamically relate modules without adding it to the relationship_fields array - if(!empty($_REQUEST['relate_id']) && !in_array($_REQUEST['relate_to'], $exclude) && $_REQUEST['relate_id'] != $this->id){ + if(!empty($_REQUEST['relate_id']) && !empty($_REQUEST['relate_to']) && !in_array($_REQUEST['relate_to'], $exclude) && $_REQUEST['relate_id'] != $this->id){ $new_rel_id = $_REQUEST['relate_id']; $new_rel_relname = $_REQUEST['relate_to']; if(!empty($this->in_workflow) && !empty($this->not_use_rel_in_req)) { @@ -1787,6 +1788,7 @@ function save_relationship_changes($is_update, $exclude=array()) } } } + // First we handle the preset fields listed in the fixed relationship_fields array hardcoded into the OOB beans // TODO: remove this mechanism and replace with mechanism exclusively based on the vardefs @@ -3954,6 +3956,7 @@ function save_relationship_changes($is_update, $exclude=array()) if(!empty($sugar_config['disable_count_query']) && !empty($limit)) { $rows_found = $row_offset + count($list); + if(count($list) >= $limit) { array_pop($list); @@ -4312,8 +4315,9 @@ function save_relationship_changes($is_update, $exclude=array()) $this->modified_user_id = 1; } $query = "UPDATE $this->table_name set deleted=1 , date_modified = '$date_modified', modified_user_id = '$this->modified_user_id' where id='$id'"; - } else + } else { $query = "UPDATE $this->table_name set deleted=1 , date_modified = '$date_modified' where id='$id'"; + } $this->db->query($query, true,"Error marking record deleted: "); $this->deleted = 1; $this->mark_relationships_deleted($id); @@ -5335,8 +5339,9 @@ function save_relationship_changes($is_update, $exclude=array()) * Send assignment notifications and invites for meetings and calls */ private function _sendNotifications($check_notify){ - if($check_notify || (isset($this->notify_inworkflow) && $this->notify_inworkflow == true)){ // cn: bug 5795 - no invites sent to Contacts, and also bug 25995, in workflow, it will set the notify_on_save=true. - + if($check_notify || (isset($this->notify_inworkflow) && $this->notify_inworkflow == true) // cn: bug 5795 - no invites sent to Contacts, and also bug 25995, in workflow, it will set the notify_on_save=true. + && !$this->isOwner($this->created_by) ) // cn: bug 42727 no need to send email to owner (within workflow) + { $admin = new Administration(); $admin->retrieveSettings(); $sendNotifications = false; diff --git a/files.md5 b/files.md5 index bba37b51..84847d99 100644 --- a/files.md5 +++ b/files.md5 @@ -1,11 +1,11 @@ 'd3f150e4a5bed444763ebe8a81742a95', './.htaccess' => 'd41d8cd98f00b204e9800998ecf8427e', './config.php' => 'd41d8cd98f00b204e9800998ecf8427e', './vCard.php' => '32f72a62ace4e8d01456a7792ac554c3', - './themes/default/js/style.js' => 'bba8e2c3565583b6d038349560659797', + './themes/default/js/style.js' => '81a245d0d6647daad6c687941f1c6926', './themes/default/images/start_meeting_inline.png' => '64eff1bab8d34659c583ca84ce36dd2a', './themes/default/images/plug-in_Lotus.png' => '8ba415f9e8ea352c76ed7deddbc1a653', './themes/default/images/join_meeting_inline.png' => 'edf7837b58451bbfb4e9e827d9a13a22', @@ -584,23 +584,23 @@ $md5_string = array ( './themes/default/images/ActivitiesReports.gif' => 'ad890a0190fedffa6bcb73557060fa9b', './themes/default/images/Accounts.gif' => 'e081de07d0263b270d0d306642375901', './themes/default/css/wizard.css' => '4f828507b4421149a80bfc89ed818753', - './themes/default/css/style.css' => 'd41d8cd98f00b204e9800998ecf8427e', + './themes/default/css/style.css' => '47a12cae4fc92e9991341df7da4b4366', './themes/default/css/print.css' => '166d6dff04138c56325ff31e7eeecab0', './themes/default/css/deprecated.css' => '872d2ee2f45eb595825646cb39a82fab', './themes/default/css/chart.css' => '493edb0e181f685fd595c483d09012fb', './themes/Sugar5/tpls/header.tpl' => '26699f278acc189db3a348b939a97d24', './themes/Sugar5/tpls/footer.tpl' => '0b9de57442d5ad234afaea7a2129ee6b', - './themes/Sugar5/tpls/_welcome.tpl' => '0a2f1634ea418eba24daa0003702f9fb', + './themes/Sugar5/tpls/_welcome.tpl' => 'c9adf92eb78e5268a40390531cd44249', './themes/Sugar5/tpls/_headerShortcuts.tpl' => '8eae0ef23647e74007306f10a4698e32', './themes/Sugar5/tpls/_headerSearch.tpl' => '7547626048dd04c24f45768fc234a9f2', './themes/Sugar5/tpls/_headerModuleList.tpl' => '25a5b4a62638870961c36d2ddf036a48', './themes/Sugar5/tpls/_headerLastViewed.tpl' => '4395b403630b8edfe43d7c9520ea15c4', './themes/Sugar5/tpls/_head.tpl' => 'fed3dfa48b0b41cb5bae6f7a42931145', - './themes/Sugar5/tpls/_globalLinks.tpl' => 'a5d4833f032bbc847c09814ba9c2cc99', + './themes/Sugar5/tpls/_globalLinks.tpl' => '2c745010b1b0dc4abc5541786d313020', './themes/Sugar5/tpls/_companyLogo.tpl' => '216c1a750c55e225350c3bae1b39ec33', './themes/Sugar5/themedef.php' => '05894346d1ea22a59e5460af6a2637e9', './themes/Sugar5/layout_utils.php' => '8e961e445d63291e47305819f8464a8c', - './themes/Sugar5/js/style.js' => '039a68a974189e9d6369e11c8962eb61', + './themes/Sugar5/js/style.js' => '55be46c0d4afbf13dbf150da9083854b', './themes/Sugar5/images/yes.gif' => '5d3f887e0dbcd70a4708534be3bfa41a', './themes/Sugar5/images/yellow_camp.gif' => '593075b0d0f3dca3343e500f0bc1b4f7', './themes/Sugar5/images/xls_image_inline.gif' => 'e68c72edc63f0f8ab22a9b2cd49909c4', @@ -1165,21 +1165,21 @@ $md5_string = array ( './themes/Sugar5/images/ACLRoles.gif' => 'dcbf376b885458b1fc8c21de7884284e', './themes/Sugar5/css/yui.css' => 'ea8b1a1a36b7aaba0484e4dacb328ce4', './themes/Sugar5/css/wizard.css' => 'fedb96794c66f593b8cc30f3ae409f08', - './themes/Sugar5/css/style.css' => '0bb15268702a0a3db5fe8d3fa61036d8', + './themes/Sugar5/css/style.css' => '69b721a579625713bcc0a7b95a42a015', './themes/Sugar5/css/print.css' => '041ba7c460d78a693301c7061139af89', './themes/Sugar5/css/deprecated.css' => '872d2ee2f45eb595825646cb39a82fab', './themes/Sugar5/css/chart.css' => '493edb0e181f685fd595c483d09012fb', - './sugar_version.php' => 'e0f4077bbaa29cf439bd27bc79fd7c4c', + './sugar_version.php' => 'b9f7fcb9d344440a1cdb08bb387d72ce', './soap/SoapTypes.php' => 'f38a0ac79874c8a3e126d728bd05e00a', './soap/SoapSugarUsers.php' => 'aec5ba181325721fa9e6da7e6a787687', './soap/SoapStudio.php' => '2f424bab502055acae4131df64465e0c', './soap/SoapRelationshipHelper.php' => '4d84e017ea0ebe080809c9099ab5ec30', './soap/SoapPortalUsers.php' => 'e333fe9ad228db47711d1f506b69f079', './soap/SoapPortalHelper.php' => '75ee76c6f6663e49b5c9a029412f7bed', - './soap/SoapHelperFunctions.php' => 'ecd540f7321209bf5ef7615fdf3277e5', + './soap/SoapHelperFunctions.php' => '1e1d36a8c69f227dbfa1f304ebeaeaf7', './soap/SoapErrorDefinitions.php' => '33fda5814773de4025739ab9024f063a', './soap/SoapError.php' => 'b2759317cb609e41ffca9da3274b8142', - './soap/SoapDeprecated.php' => '70d81bfc3a075073bf8a409d08e86f62', + './soap/SoapDeprecated.php' => '20cfa68a1138e39de3a3c210df7909eb', './soap/SoapData.php' => 'b94467bbc4cf4e39796998403768979b', './soap.php' => '6310c23c2df726585787a2fc3593ddd8', './service/v4/soap.php' => '6c5a4f021b7b8769d9f6e1f1171412e4', @@ -1205,7 +1205,7 @@ $md5_string = array ( './service/v2/rest.php' => 'fe39556dc4a3f2c3b5da38fc91020673', './service/v2/registry.php' => '50fd3376413d08184d49173999d8f2cb', './service/v2/SugarSoapService2.php' => '84688d3552f24a100743d6e66f16fd05', - './service/utils/SugarRest.js' => '8ca84c0a5256e9eb63a48bb3ab02a921', + './service/utils/SugarRest.js' => '113523ce0ffc6d37d277c7cd63619b32', './service/example/test.html' => '246f909ed8e9d7767943b8385cb6b70c', './service/example/example.html' => '7f52c3e2a89236447f60fbabfb71a74d', './service/example/Rest_Proxy.php' => 'f8873a8fe88e4a7be8576f379e4963bc', @@ -1217,19 +1217,19 @@ $md5_string = array ( './service/core/SugarRestUtils.php' => 'ddebba71abb25182a7769061862797ae', './service/core/SugarRestServiceImpl.php' => '18ab35c13544baa4fe716711cc541f62', './service/core/SugarRestService.php' => '5fc2c42a483676e6afc251174485f0c2', - './service/core/SoapHelperWebService.php' => 'dda7e9ac436128329710c83179a1d375', + './service/core/SoapHelperWebService.php' => '76dbd6bb240fb8b5bb2e749f0979f549', './service/core/REST/SugarRestSerialize.php' => 'f80614ee5bc7e2f4a23460bbcc8c3eb8', './service/core/REST/SugarRestRSS.php' => 'eabfddaa4a65c3643f65ecab9f23c4bd', './service/core/REST/SugarRestJSON.php' => 'b3750c1987e8071bb3ad8296d9b4d5fa', './service/core/REST/SugarRest.php' => '7d4f007d66668ca9377fce1f34f94d27', './service/core/PHP5Soap.php' => '598eeeefcc5ed1276020bfe6fa7c4451', './service/core/NusoapSoap.php' => 'e533d700071eafffd2ebfd1e28b2b735', - './vcal_server.php' => 'c472160ffe5a5ef1e7059e936376c096', + './vcal_server.php' => '0451673dbbdf49126114fd314ef2a894', './robots.txt' => 'f71d20196d4caf35b6a670db8c70b03d', './removeme.php' => '750092ac2fec3ba2f04f0bff27bec33d', './pdf.php' => 'cc6788d5e02f50b1812ddb2ff3eb3703', './crossdomain.xml' => 'f35e9d412587c466e3f240f71fa12040', - './modules/EAPM/EAPMEdit.js' => '0f22ed0181e5ccb0dffa986aa3da336f', + './modules/EAPM/EAPMEdit.js' => '5d9c244a0fde31b7a287f3d5294655f2', './modules/EAPM/views/view.edit.php' => '7545cbbf67a11557a2e21481d46b0051', './modules/EAPM/views/view.detail.php' => 'aae5c942090aae0a47451d0552da15a4', './modules/EAPM/vardefs.php' => '52ef1650cfb9a14662033502dfea3b57', @@ -1264,14 +1264,14 @@ $md5_string = array ( './modules/Versions/ExpectedVersions.php' => 'e1b17b084b33a4bc421296bb8bafbf99', './modules/Versions/DefaultVersions.php' => 'aa4505b6e3ce4310323d3901f26940d9', './modules/Versions/CheckVersions.php' => '0681c9c991cd914d7b10d00f46e939ff', - './modules/Users/DetailView.js' => '532480eb46b90744c3979e9370e629f1', - './modules/Users/PasswordRequirementBox.js' => '649a86d55e79d2d51ed509f58e906d0e', - './modules/Users/User.js' => '241f1d3d0135f7ca698b062e0f13c2b8', - './modules/Users/login.js' => 'ea80d72447ec3975a9e6d291d4a812cc', + './modules/Users/DetailView.js' => '92c8b4bd685347fdbe810d93844dddb3', + './modules/Users/PasswordRequirementBox.js' => '3cfa4025dc373a7e065cf8a11ab812a0', + './modules/Users/User.js' => '6b09906cad1a804cb6969e553c2bc4ff', + './modules/Users/login.js' => '7a504860a02eaebfdf1a9a7f9578dcc7', './modules/Users/views/view.wizard.php' => '835338a6bbf0fd03bd9827492cf19337', './modules/Users/views/view.list.php' => '8bc5a879644c94372a52d240cb7ecb03', './modules/Users/vardefs.php' => 'fb892f832936653d5321bedcfb653507', - './modules/Users/tpls/wizard.tpl' => 'd6c63ab8f30ad8c28b8b0ddbb0777803', + './modules/Users/tpls/wizard.tpl' => '32bdfbbd3953c7841f9067ad4bbd0e08', './modules/Users/reassignUserRecords.php' => 'cd6548bd2a6d23217f065a4223071983', './modules/Users/password_utils.php' => '614d9ea87a83d7c210bbfe585908b870', './modules/Users/metadata/subpanels/default.php' => '8ccd5a2436c48f152588bd59e6c6bcb0', @@ -1294,7 +1294,7 @@ $md5_string = array ( './modules/Users/controller.php' => '80b928a09b15d4c9df8904317880974f', './modules/Users/authentication/SugarAuthenticate/SugarAuthenticateUser.php' => '406f625eb707435e7710880c7aec779e', './modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php' => '5b0f31fa450a1be1a031902b60e0641d', - './modules/Users/authentication/SAMLAuthenticate/settings.php' => '59100a0b5557c457b5b317014090086b', + './modules/Users/authentication/SAMLAuthenticate/settings.php' => 'aac61ea76cd0f3d13cdfcfc5e83d18b1', './modules/Users/authentication/SAMLAuthenticate/lib/xmlseclibs/xmlseclibs.php' => '76623791faf895bcbbd016d9945e8c48', './modules/Users/authentication/SAMLAuthenticate/lib/xmlseclibs/CHANGELOG.txt' => '113d14ef4333039359236ffed624fb85', './modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml/xmlsec.php' => '0804d079f7dd5b88a810d3b2f13b54a1', @@ -1319,7 +1319,7 @@ $md5_string = array ( './modules/Users/SaveTimezone.php' => 'c12559f852fb8d89a269814e808dadc5', './modules/Users/SaveSignature.php' => '2f8bfdb6f88dce867100a761366d0391', './modules/Users/Save.php' => '0bce18dac108a3aa3518f5fcae8b9d0a', - './modules/Users/Popup_picker.html' => '9726cf3ff17bd5765191666f6460dfa1', + './modules/Users/Popup_picker.html' => '1160ad9218e2e8933b49f4ac1b695261', './modules/Users/Popup_Users_picker.html' => '67411ba406dc06c63dc1b9eca6e55eca', './modules/Users/PopupUsers.php' => '5da32a565d9639eb42ab47e2d3330c08', './modules/Users/PopupSignature.php' => 'd9c4749eea3254af4bbef1d83736309c', @@ -1328,7 +1328,7 @@ $md5_string = array ( './modules/Users/Logout.php' => '5c819754b90e62e2f1739971144b01a6', './modules/Users/Login.php' => '18a89cfecf8e050a14f2586b05081548', './modules/Users/ListRoles.php' => '9833b76bd6bd4889285b4b4a6b933849', - './modules/Users/GeneratePassword.php' => 'c4cb127355f481546965b868e2b3b003', + './modules/Users/GeneratePassword.php' => 'cd550ab172dc3dcbb715221ec97469a0', './modules/Users/Forms.php' => '90b591c94157299485166b686f6a977d', './modules/Users/Error.php' => '62f9d5788e4663b84e030c4eaba3e8b3', './modules/Users/EditView.tpl' => '3f17c8379f1dedbd64b32e481cd56b9f', @@ -1345,13 +1345,13 @@ $md5_string = array ( './modules/UserPreferences/field_arrays.php' => 'd109e5473ca3fe844fcc8787c47b3561', './modules/UserPreferences/controller.php' => '6022bf66d58876257bf96523b5c01953', './modules/UserPreferences/UserPreference.php' => '28ada4d1638677de694ec517fde20791', - './modules/UpgradeWizard/upgradeWizard.js' => 'e2a4a2d4eec48a78c4c497e95d3b391b', - './modules/UpgradeWizard/uw_utils.php' => 'c5ab7f8e6169c1f1d7a515a51932c8fa', + './modules/UpgradeWizard/upgradeWizard.js' => '3ca941da793c30a8a4e913624071166e', + './modules/UpgradeWizard/UpgradeRemoval.php' => 'f8f4d6102a0cdc17d48444372a6ed2d8', './modules/UpgradeWizard/uw_main.tpl' => '898039c49451aefbef0bfdece6c43f3b', - './modules/UpgradeWizard/uw_files.php' => '0b16b9d7181ac363d19aa43b8c50090b', + './modules/UpgradeWizard/uw_utils.php' => 'cd2a82e832e636cd3d713d2224240bdf', './modules/UpgradeWizard/uw_emptyFunctions.php' => 'fc09ce5db1b1aacd792140ceadc9ccd2', - './modules/UpgradeWizard/uw_ajax.php' => '42d0d5ef097da1a377b3da9be9cb3dd1', - './modules/UpgradeWizard/upload.php' => '2de18c386f2640e6dbac06f92bbf6e7e', + './modules/UpgradeWizard/uw_files.php' => '0b16b9d7181ac363d19aa43b8c50090b', + './modules/UpgradeWizard/upload.php' => 'dcc4f893338f9ad97e236b7b39bd28cc', './modules/UpgradeWizard/upgradeTimeCounter.php' => 'dfbb504c1b59c828e829d834217948de', './modules/UpgradeWizard/upgradeMetaHelper.php' => '57e1c7d457e04befaec1d71c181ee01a', './modules/UpgradeWizard/tpls/layoutsMerge.tpl' => '75dfece651174368682294e51609d4c6', @@ -1369,10 +1369,11 @@ $md5_string = array ( './modules/UpgradeWizard/populateColumns.php' => '7c58ba862c5391857d059e75051b5cec', './modules/UpgradeWizard/layouts.php' => '8b414946612a3ac003e246c5356d1e44', './modules/UpgradeWizard/language/en_us.lang.php' => 'e7d9e12a3a829548a3c1ed260bb14624', - './modules/UpgradeWizard/index.php' => '0732f50b02de0f8f9cb0cf0893c4bf5a', - './modules/UpgradeWizard/end.php' => '7650857e626b6fba0afd8114b5c46b2c', + './modules/UpgradeWizard/uw_ajax.php' => '42d0d5ef097da1a377b3da9be9cb3dd1', './modules/UpgradeWizard/deleteCache.php' => '2243700008a8b513b69f009e8c6dbcf8', + './modules/UpgradeWizard/index.php' => '0732f50b02de0f8f9cb0cf0893c4bf5a', './modules/UpgradeWizard/commitJson.php' => '3ac93b7343984a726d004499c53b315b', + './modules/UpgradeWizard/end.php' => '7650857e626b6fba0afd8114b5c46b2c', './modules/UpgradeWizard/commit.php' => 'b12af2d5c23fdf23379af2032a37a065', './modules/UpgradeWizard/cancel.php' => 'e0b5196ee60b18d6a2876b96f16eda74', './modules/UpgradeWizard/UploadFileCheck.php' => 'd4a88e3b6923cf3365fedbf501116dd6', @@ -1403,7 +1404,7 @@ $md5_string = array ( './modules/Trackers/Metric.php' => 'b2fe3a0da872c9b6b22c208f356dc6f7', './modules/Trackers/BreadCrumbStack.php' => '7358bcb903cd158938ddce8d855c748a', './modules/Tasks/views/view.edit.php' => 'ec70c3c2704d619c7e1307f36aaf846e', - './modules/Tasks/vardefs.php' => 'a601bec95bded225e716bab27a050025', + './modules/Tasks/vardefs.php' => '6f0cb409e3724a6ecdb1ab8e78502eb8', './modules/Tasks/tpls/QuickCreate.tpl' => 'cc473787ebe1f4c7dfba17268bd2e1e1', './modules/Tasks/metadata/subpanels/default.php' => '6aa5aad5295409fc898bae85d5c501d0', './modules/Tasks/metadata/subpanels/ForHistory.php' => 'ae1db4f5b75711e1ed1668b1c726380b', @@ -1457,11 +1458,11 @@ $md5_string = array ( './modules/SugarFeed/Dashlets/SugarFeedDashlet/Options.tpl' => '6d29b70f748200a3f7aa9b86dbddd14f', './modules/SugarFeed/SugarFeed.php' => '74c08d6b75e5be2bd36bbf63827f00bc', './modules/SugarFeed/AdminSettings.php' => '85297b7a6a71ffdb9adfb5a2468d1018', - './modules/Studio/JSTransaction.js' => 'a82574884e32b127c21be3c529f22230', - './modules/Studio/studio.js' => 'd07b17436cd4afac962e257c1da3b166', - './modules/Studio/studiodd.js' => '40e5d66b805d53e112db7df5dee99dcd', - './modules/Studio/studiotabgroups.js' => '22a3114b240710a122d3bf1ec73ebd16', - './modules/Studio/ygDDListStudio.js' => 'e8beff5a384517494b6840b5afac0b64', + './modules/Studio/JSTransaction.js' => 'ddc1671e785fd003c42414b14b8a746e', + './modules/Studio/studio.js' => '9e6ed22dc09eaf0c6a7f131c474d14a0', + './modules/Studio/studiodd.js' => '6122b82ee5480cb0c105ae13ed2d2b3e', + './modules/Studio/studiotabgroups.js' => '0914ad3b4384826e6a49bf231b2e4495', + './modules/Studio/ygDDListStudio.js' => '2d3316c51f34ee87cc887b41e6d3539f', './modules/Studio/wizards/StudioWizard.php' => '35b096e82adffc3f73d81ae407ff968b', './modules/Studio/wizards/EditDropDownWizard.php' => '47997b18f2d0eed6613e4e8ee3bec245', './modules/Studio/wizard.php' => '1eb1fe073c5a846796636d94ce0a246c', @@ -1469,13 +1470,13 @@ $md5_string = array ( './modules/Studio/language/en_us.lang.php' => '8481dff368a6bf290f374b9106a7928c', './modules/Studio/language/en_us.Portal.html' => '01a47f295a288ac42c5d346253609e15', './modules/Studio/config.php' => '3dfa02691501162caf33bb620c4134ad', - './modules/Studio/TabGroups/TabGroupHelper.php' => '4f5c6fea9037860622e79bf85cee102d', + './modules/Studio/TabGroups/TabGroupHelper.php' => '2c9be0d1eb4b5892aa5b90bca254f370', './modules/Studio/TabGroups/EditViewTabs.tpl' => '560fdd921b4fc7aa502bce3ea22b83a7', './modules/Studio/TabGroups/EditViewTabs.php' => '58ff2f987093b74810debde076111185', './modules/Studio/TabGroups.php' => '028fd651b7e45ce986fb653eeff5cd88', './modules/Studio/SaveTabs.php' => 'f70c1415779c3d9745151aedb3b63c72', './modules/Studio/Forms.php' => '643a41668f378fdfcf340eacff957880', - './modules/Studio/DropDowns/EditView.tpl' => '493d98da287b2b8343cb92e0c5d6ba1b', + './modules/Studio/DropDowns/EditView.tpl' => 'ddcdaab3f4908ef226f9fb914b06536d', './modules/Studio/DropDowns/EditView.php' => 'cfa36bf9fb56414ee9706fe4be586ce2', './modules/Studio/DropDowns/DropDownHelper.php' => '9ffefd795d77aa2d4e8651ac0998aa13', './modules/SchedulersJobs/vardefs.php' => 'a01a32929146b1fcffc1f344cac76b65', @@ -1491,10 +1492,10 @@ $md5_string = array ( './modules/Schedulers/field_arrays.php' => 'd4dd0e9a487e50cc1e3937edf28d4851', './modules/Schedulers/_AddJobsHere.php' => 'deb98781e316c0883b0e1cc6813cd5e3', './modules/Schedulers/SchedulerDaemon.php' => '0fe85dd3ab4b9dc4132e0ae782ebce90', - './modules/Schedulers/Scheduler.php' => 'd3607017de153188d44643471c166c15', + './modules/Schedulers/Scheduler.php' => '3a49be1be9cf2f1fb9a09045b53593c8', './modules/Schedulers/Scheduled.php' => 'a4f070fb20dde6617eb49fceefbb195f', './modules/Schedulers/Scheduled.html' => '998aaba0c83416168b78a2cc0124d678', - './modules/Schedulers/Save.php' => 'cf45d69838f7b029499d28f60ad231b0', + './modules/Schedulers/Save.php' => '9ae861c83f40d3ac45083f796b2ac97c', './modules/Schedulers/Menu.php' => '84ca8d44cb639d9764e4eb2d077a76fc', './modules/Schedulers/ListView.php' => 'a607b7e478b8f1773519c931a2dfcb9e', './modules/Schedulers/ListView.html' => 'b57105bde008da002110cf0649e838cd', @@ -1514,7 +1515,7 @@ $md5_string = array ( './modules/SavedSearch/SearchForm.html' => 'b459847986a5a78033744d2ac2fd83b8', './modules/SavedSearch/SavedSearchSelects.tpl' => 'c39f005f3f1456d0c403e7b1b5c29aec', './modules/SavedSearch/SavedSearchForm.tpl' => 'e1b30f7f970a53e8fbdf59c56594992a', - './modules/SavedSearch/SavedSearch.php' => '3c9f173dd0744e0b74115bb547f62dca', + './modules/SavedSearch/SavedSearch.php' => '32a5293b4fa7b75a8a7fe72c4e9978af', './modules/SavedSearch/Menu.php' => 'dc4c7a6e251fafed9e02fdedeadb6de1', './modules/SavedSearch/ListView.php' => '2a0fb2b9472a48ec7562f72d423ae925', './modules/Roles/views/view.list.php' => '1fa66e2cc62b833309892227d4cd64bb', @@ -1546,7 +1547,7 @@ $md5_string = array ( './modules/Releases/Save.php' => 'd4538a63668de45b78e2c50d0bb439fd', './modules/Releases/Release.php' => 'caadc18344ee3f42aac6ad3d88443a69', './modules/Releases/Popup_picker.php' => '32ff87cdb28e6d2e8e0ba0f9af851181', - './modules/Releases/Popup_picker.html' => '95ac3a01ea96f0ae98b726ea465695c7', + './modules/Releases/Popup_picker.html' => '7affc732a8a34b283efe2647eaa37677', './modules/Releases/Menu.php' => '0b3a53fae5e4b347bca159314dd62ab6', './modules/Releases/ListView.html' => 'aa7f3d10e5f55e28038fd178d8dccca1', './modules/Releases/EditView.php' => '616e428f094a7f196d260a93d7218872', @@ -1577,7 +1578,7 @@ $md5_string = array ( './modules/Prospects/Save.php' => '94ea92c9bdbc15f131ea76deb1f5c05d', './modules/Prospects/ProspectFormBase.php' => '72b52d25d6cec57f62aeb5b22a2f1d11', './modules/Prospects/Prospect.php' => '82e124f5609d2e95675b5e7abcbd3d93', - './modules/Prospects/Popup_picker.html' => '0595f82f557502878ce1de67bef83a43', + './modules/Prospects/Popup_picker.html' => '95a7cb67f4ab07776998dfa256006f63', './modules/Prospects/Menu.php' => '954ee473c71bac08d294415f04816411', './modules/Prospects/Import.php' => '41811673320c34629e81991794d41215', './modules/Prospects/Delete.php' => '73e1368420f1c644eb309e81c24bc17d', @@ -1597,16 +1598,17 @@ $md5_string = array ( './modules/ProspectLists/SubPanelView.html' => '0f85fa011831af642f37e9229361e8c1', './modules/ProspectLists/Save.php' => '6a5af39415534fb72207662a54f8e591', './modules/ProspectLists/ProspectListFormBase.php' => 'c233f6c49c1ab9f5108eb9d2ebb4cea3', - './modules/ProspectLists/ProspectList.php' => 'a72c4322295f941cc1ad783e7f11c248', - './modules/ProspectLists/Popup_picker.html' => '2ffeea1df227722b5087cd2c0d4e013c', + './modules/ProspectLists/ProspectList.php' => '32ea7fb83a6a11ce86cb0c3b2815fa6b', + './modules/ProspectLists/Popup_picker.html' => '19f9f5f32facaf5e8919535e6d84a7d5', './modules/ProspectLists/Menu.php' => '8fec51700001baa9b7c8c774c69186c1', './modules/ProspectLists/Forms.php' => '9b5c7ac088edd7441f51b9b0bb41a41f', './modules/ProspectLists/Forms.html' => 'af9ce51c2eefcf7762844a80319940a6', './modules/ProspectLists/Duplicate.php' => '2b274f8567f9699b49c702e490ba54ea', './modules/ProspectLists/Delete.php' => '1f2697eaad06aabc4f7090442266a9b8', - './modules/ProjectTask/ProjectTask.js' => 'b405cd9481f73146b75fb0bd12a118dd', + './modules/ProjectTask/ProjectTask.js' => '38dcec6935963b0a4a6e41068e2f25c6', + './modules/ProjectTask/Popup.php' => '0f2d23669aeb979a3b8c109bea942fe9', './modules/ProjectTask/views/view.list.php' => '900cee4d5274c9c79b4ffddbc42144fe', - './modules/ProjectTask/vardefs.php' => '92f0ea64819212605e6d2ffa7ef95b27', + './modules/ProjectTask/Popup.html' => 'ec4956dfe4adc6be2ede8cba165ffb66', './modules/ProjectTask/tpls/QuickCreate.tpl' => 'f48d8bfc531c4019d545bc7f239e6fbf', './modules/ProjectTask/metadata/subpanels/default.php' => '9f31af58ab7169184e5b689aed416acc', './modules/ProjectTask/metadata/subpaneldefs.php' => 'ed31b5f838b6ab8135ac1f3916a663fd', @@ -1625,10 +1627,9 @@ $md5_string = array ( './modules/ProjectTask/SubPanelView.html' => '84d7ce8ba30294bc0e158e9bb0ff6731', './modules/ProjectTask/Save.php' => 'd1a87b0fbe38bcd6c3024871b61d3251', './modules/ProjectTask/ProjectTaskQuickCreate.php' => '9e22afc763a7461aae6ac12f0da9672d', + './modules/ProjectTask/vardefs.php' => '92f0ea64819212605e6d2ffa7ef95b27', './modules/ProjectTask/ProjectTask.php' => 'ca22d8b4bc4dc6566d8e850ea087b9ea', - './modules/ProjectTask/Popup_picker.html' => '393f40c5c2ecf15af3ab98d190563042', - './modules/ProjectTask/Popup.php' => '0f2d23669aeb979a3b8c109bea942fe9', - './modules/ProjectTask/Popup.html' => '615967546af6b7bac0c22eced80eacbf', + './modules/ProjectTask/Popup_picker.html' => '361f855dacedadd41f50b2305ef63ef9', './modules/ProjectTask/MyProjectTasks.php' => 'beb50630e8c111fc22db6c99bc24e7cb', './modules/ProjectTask/MyProjectTasks.html' => 'ffd4e103720ddbbc0841c63fdc16128f', './modules/ProjectTask/Menu.php' => 'e1a531d93b093a259b243d69581afb82', @@ -1637,7 +1638,7 @@ $md5_string = array ( './modules/ProjectTask/Dashlets/MyProjectTaskDashlet/MyProjectTaskDashlet.php' => '68dcd5e5b634768f8dae3fad6aaa9102', './modules/ProjectTask/Dashlets/MyProjectTaskDashlet/MyProjectTaskDashlet.meta.php' => '2b29bb6785ded41dd2363a70570d80fb', './modules/ProjectTask/Dashlets/MyProjectTaskDashlet/MyProjectTaskDashlet.data.php' => 'b3f7f25834cc1a15c35a730c36adfc2e', - './modules/Project/Project.js' => '5c75f62df43dc292a8006b8e3d622053', + './modules/Project/Project.js' => 'a6d204b0afbb113e4ab19448204aed07', './modules/Project/views/view.templatesedit.php' => '751e5952518fe4e3dc24571aad2f4278', './modules/Project/views/view.templatesdetail.php' => '311eaf39518ba87ba447feebe0d93dea', './modules/Project/views/view.list.php' => '243927d29b3b1ba6f4d60412af94e4e2', @@ -1726,7 +1727,7 @@ $md5_string = array ( './modules/Notes/metadata/subpanels/ForHistory.php' => 'dad1addf6074a5e893cb6e425fbc31c4', './modules/Notes/metadata/studio.php' => '97fb182348172339a2e6c240dcf1e604', './modules/Notes/metadata/searchdefs.php' => '261de884a79200bd98731c5f540eca03', - './modules/Notes/metadata/quickcreatedefs.php' => '3ce09a93c5a80bb40156e3723b6a2d5c', + './modules/Notes/metadata/quickcreatedefs.php' => '582fd06449e85aa8cda3f0c9a13536f5', './modules/Notes/metadata/listviewdefs.php' => '34550d6fffdc0f5767404e1583b006d3', './modules/Notes/metadata/editviewdefs.php' => '4199826de1152224e850269887796e35', './modules/Notes/metadata/detailviewdefs.php' => 'c9991544e69bc5369b9771a432354a4c', @@ -1753,10 +1754,10 @@ $md5_string = array ( './modules/ModuleBuilder/views/view.relationship.php' => 'a7212851e32d946cb202def8622f7a64', './modules/ModuleBuilder/views/view.property.php' => 'ada60407ef07a2779f954f9b7837f591', './modules/ModuleBuilder/views/view.popupview.php' => '3acdfeeaa6ec776168cea15cb46425a2', - './modules/ModuleBuilder/views/view.package.php' => 'a9379092526c7f53b95290712153d32e', + './modules/ModuleBuilder/views/view.package.php' => '94886f989c71b501e16733aa6f635ab7', './modules/ModuleBuilder/views/view.modulelabels.php' => '946ac2cafcfcac5d20265ffab8f0805a', './modules/ModuleBuilder/views/view.modulefields.php' => '13771ba7d654c9e7ad9c38e85235a562', - './modules/ModuleBuilder/views/view.modulefield.php' => '6849d83c2f8a07a30c6bc2f6a79aefcf', + './modules/ModuleBuilder/views/view.modulefield.php' => '7b5961de975c17b6bb296660a490f47e', './modules/ModuleBuilder/views/view.module.php' => 'e87f77f4bb936006ad94103cd0f1c453', './modules/ModuleBuilder/views/view.main.php' => '88123a5ca806fadac53f609b09959e25', './modules/ModuleBuilder/views/view.listview.php' => 'dc91490cc2381300c65ec6cc6f45e2b6', @@ -1766,26 +1767,26 @@ $md5_string = array ( './modules/ModuleBuilder/views/view.history.php' => '4acec9d2c0348a65ab937e98569d5f41', './modules/ModuleBuilder/views/view.exportcustomizations.php' => 'd3549b1d669a65d83e56bfaa2ba36b40', './modules/ModuleBuilder/views/view.dropdowns.php' => '03af97d6859d8c55c022c73a28a0d245', - './modules/ModuleBuilder/views/view.dropdown.php' => '9b1b2f832356a52ec896c82852ef4bb8', + './modules/ModuleBuilder/views/view.dropdown.php' => 'f908c135780a672a41c3de88ba44a463', './modules/ModuleBuilder/views/view.displaydeployresult.php' => '5ff19a90f22526f716b3d04786866df3', './modules/ModuleBuilder/views/view.displaydeploy.php' => '8332a24883139fea55d72d31946f06ff', './modules/ModuleBuilder/views/view.deletepackage.php' => 'b7f1f95e796e255ed58da1721d6366ff', './modules/ModuleBuilder/views/view.deletemodule.php' => '84319596f5efed276de970b67f9fcafc', './modules/ModuleBuilder/views/view.dashlet.php' => 'f1fb8f8adf0796283bc83899a4d19a75', - './modules/ModuleBuilder/tpls/wizard.tpl' => '27d2ef7d3fc5ebba96957b76a59c2b61', + './modules/ModuleBuilder/tpls/wizard.tpl' => '79c92f3359236d7f573d50984efaeeec', './modules/ModuleBuilder/tpls/tabBG.png' => '8e2561b0bba66f327d602e6c5f06aa08', './modules/ModuleBuilder/tpls/studioRelationships.tpl' => '239057e161d861f22fc5147a7234bdbb', './modules/ModuleBuilder/tpls/studioRelationship.tpl' => 'fae1108003263300d4442ee5c8b30ef6', './modules/ModuleBuilder/tpls/resetModule.tpl' => '61597ccd042c1e6ff988fc904e6519ed', './modules/ModuleBuilder/tpls/main.tpl' => '8862d14b4c6989a99013640a9a1f4c02', './modules/ModuleBuilder/tpls/listView.tpl' => '7ca848e3ae581e3c293883dbec267751', - './modules/ModuleBuilder/tpls/layoutView.tpl' => '2d9ce0eb871c8ecd7665a3c3580db17b', + './modules/ModuleBuilder/tpls/layoutView.tpl' => '7f4500a6dcc10110b1d79dca9255ca1b', './modules/ModuleBuilder/tpls/labels.tpl' => 'd5108823a1248fbf1e52c770f00e332e', './modules/ModuleBuilder/tpls/index.tpl' => '74b88786aaa5254e0ef3ef98ec2a727d', './modules/ModuleBuilder/tpls/includes.tpl' => '308f7703d505391d03d58b592c919152', './modules/ModuleBuilder/tpls/history.tpl' => '39442d3ac52f747e0b6773e7e6dc72f3', './modules/ModuleBuilder/tpls/exportcustomizations.tpl' => '2dde77f71b619c7843dfdc4170f93c91', - './modules/ModuleBuilder/tpls/editProperty.tpl' => 'aea87bad9704c38ea60c582de3ce2dd3', + './modules/ModuleBuilder/tpls/editProperty.tpl' => 'af1bbf8eadaecd07967e0e3814d6138d', './modules/ModuleBuilder/tpls/assistantJavascript.tpl' => '62a402e5a5b27917742ab3ad4145a5f8', './modules/ModuleBuilder/tpls/Preview/listView.tpl' => '3add2c0f2cc966e8dc0f1df4db386915', './modules/ModuleBuilder/tpls/Preview/layoutView.tpl' => '139a8b098b3969bfb0dbe1627dce2387', @@ -1798,9 +1799,9 @@ $md5_string = array ( './modules/ModuleBuilder/tpls/MBModule/language.tpl' => '2f33bb024e8b1c83a986c32400846192', './modules/ModuleBuilder/tpls/MBModule/form.tpl' => 'd41d8cd98f00b204e9800998ecf8427e', './modules/ModuleBuilder/tpls/MBModule/fields.tpl' => '621f333eda513a6eecc82683318fcfb5', - './modules/ModuleBuilder/tpls/MBModule/field.tpl' => '8681180f86251e1df510f20d5465b45d', + './modules/ModuleBuilder/tpls/MBModule/field.tpl' => 'a4c3c6dd716e828df4e7a4c0faa7528f', './modules/ModuleBuilder/tpls/MBModule/dropdowns.tpl' => '85df013133007c4ba1c9b729d5fedaa8', - './modules/ModuleBuilder/tpls/MBModule/dropdown.tpl' => 'ea6d331daaa8a7f722a1ff0765d701c3', + './modules/ModuleBuilder/tpls/MBModule/dropdown.tpl' => 'ab700d554f3cc79ad5a70365f4ec26bb', './modules/ModuleBuilder/tpls/MBModule/dropdown.css' => '81912532da99fd1480fd72e7326bef6a', './modules/ModuleBuilder/tpls/MBModule/Studio.tpl' => '443a93ba34b0eaa946d342e618c9e6e7', './modules/ModuleBuilder/tpls/MBModule/Menu.tpl' => 'fd135ae7421be28ee6bc26501605c331', @@ -1811,15 +1812,15 @@ $md5_string = array ( './modules/ModuleBuilder/tpls/LayoutEditor.css' => 'e732c3d8df29cc2833514ed5db878684', './modules/ModuleBuilder/parsers/views/UndeployedSubpanelImplementation.php' => 'c1f61c27c48ed83a04231cacf2cbadfd', './modules/ModuleBuilder/parsers/views/UndeployedMetaDataImplementation.php' => '87c39c5818423ac119f20c9f44b11de8', - './modules/ModuleBuilder/parsers/views/SubpanelMetaDataParser.php' => 'd3980af109673d6eda887f67d19879f4', + './modules/ModuleBuilder/parsers/views/SubpanelMetaDataParser.php' => '5306a647fd32a766d36bd6cf634c063f', './modules/ModuleBuilder/parsers/views/SearchViewMetaDataParser.php' => '1d264a211116114f0adfd780b9ae9872', './modules/ModuleBuilder/parsers/views/PopupMetaDataParser.php' => '7e61b8b2042be68aa084f97950140e18', './modules/ModuleBuilder/parsers/views/MetaDataParserInterface.php' => '64976a9f4a851bbb2e597e8a9cbb68b6', './modules/ModuleBuilder/parsers/views/MetaDataImplementationInterface.php' => '3bb6fa231da65dbb1369b536858818f1', - './modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php' => '1c0552d44bffa17c0dc37d9897e9bd62', + './modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php' => 'b26b1bea6e30e122ab919c9ed1e48ea9', './modules/ModuleBuilder/parsers/views/HistoryInterface.php' => 'c1583f28fddb4c33c920f92a20e2c935', './modules/ModuleBuilder/parsers/views/History.php' => 'cb762b148ad023d6ec3ba6440ea9df5e', - './modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php' => '3132af27973d07af8f85b471b216769c', + './modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php' => 'be7da1b4e7452c73003a7e2f9c9c0df5', './modules/ModuleBuilder/parsers/views/DeployedSubpanelImplementation.php' => '24a957dc22e693e21dd18541e3584807', './modules/ModuleBuilder/parsers/views/DeployedMetaDataImplementation.php' => 'f038a0d67cfb341d627e5a1c9e8607c3', './modules/ModuleBuilder/parsers/views/DashletMetaDataParser.php' => '8fca44b08dc035a1d23463b26344df72', @@ -1833,30 +1834,30 @@ $md5_string = array ( './modules/ModuleBuilder/parsers/relationships/ManyToOneRelationship.php' => '7e1ada555d2dc725e4ce9ec4f6f6ae62', './modules/ModuleBuilder/parsers/relationships/ManyToManyRelationship.php' => 'e6c965fda838b822992cf59433fce6e2', './modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php' => 'b6a10c0d7f07a62b99671d98a8d37644', - './modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php' => 'd478536f9d79c1e1cb16c558c23ff98e', + './modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php' => 'e54641d4126d374f494a6f7f76c2176b', './modules/ModuleBuilder/parsers/relationships/AbstractRelationships.php' => 'ba07848ec2625ba93c007bdd16d7f69b', './modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php' => '262e161681a68ca60608289573ea187f', './modules/ModuleBuilder/parsers/parser.modifysubpanel.php' => 'b26c368fe0ded3b67f1d83f33795454b', './modules/ModuleBuilder/parsers/parser.modifylistview.php' => '313ad7db0d401aac07bf5428975a6e65', './modules/ModuleBuilder/parsers/parser.modifylayoutview.php' => 'd5383c342e65fcde7a628c339d0d6502', - './modules/ModuleBuilder/parsers/parser.label.php' => 'f7be08af46974b1f7a56907f33c5bee8', - './modules/ModuleBuilder/parsers/parser.dropdown.php' => '91c4825c86ea34fc80b437877b97f210', + './modules/ModuleBuilder/parsers/parser.label.php' => '9985c9d1016f9d16e1cb1a3b81b3ccc4', + './modules/ModuleBuilder/parsers/parser.dropdown.php' => '2c15e411a528ae234414bc49f70d5277', './modules/ModuleBuilder/parsers/constants.php' => '0d876db28d336cabe3c44a06b8a8f780', './modules/ModuleBuilder/parsers/StandardField.php' => 'de8b8168336744386faa4fcd8eb3a8fa', './modules/ModuleBuilder/parsers/ParserFactory.php' => 'f0fad2af770157777e4088e174233de0', './modules/ModuleBuilder/parsers/ModuleBuilderParser.php' => 'ddd1051f921589202f29110c732e60c9', './modules/ModuleBuilder/language/en_us.lang.php' => 'dee13af8e6772d0c43b365011230f434', './modules/ModuleBuilder/javascript/wizardTemplate.js' => 'df71a4a5eaf77a126a7eaef07287c511', - './modules/ModuleBuilder/javascript/studiotabgroups.js' => 'ae5991387773fd603c35516c6cb34a57', + './modules/ModuleBuilder/javascript/studiotabgroups.js' => 'ea1fb38daeb99b01ba07c9904e2b4f2c', './modules/ModuleBuilder/javascript/studio2RowDD.js' => 'e29e6fc44695cbd29d8d88eef513f6f1', './modules/ModuleBuilder/javascript/studio2PanelDD.js' => '4fda42cbfe44390b3a9f646fce1604ad', './modules/ModuleBuilder/javascript/studio2ListDD.js' => '36cb4715391ded751fd2f30ab41b76e5', './modules/ModuleBuilder/javascript/studio2FieldDD.js' => 'd776d412e631abf40c5b9227989669a7', './modules/ModuleBuilder/javascript/studio2.js' => 'a3d19505c924a863ab7656b50d9bb466', - './modules/ModuleBuilder/javascript/SimpleList.js' => 'd9d7ce9e36b6c72800a0e35bd2b65c2d', + './modules/ModuleBuilder/javascript/SimpleList.js' => '2e347d21f35b115b36469b3cda00d930', './modules/ModuleBuilder/javascript/ModuleBuilder.js' => '2edabc112129c6a57b8f2a550ab847c5', './modules/ModuleBuilder/javascript/JSTransaction.js' => '2f20a4a72eaa8cbdf3053e24c5772ee5', - './modules/ModuleBuilder/controller.php' => '515759fb7c30a70b5f1250ba1eea4e1b', + './modules/ModuleBuilder/controller.php' => 'eb76b36d095cc5b801991769b0036f42', './modules/ModuleBuilder/action_view_map.php' => 'fd1e0b87f5d325f06b2b743afa057999', './modules/ModuleBuilder/Module/StudioTree.php' => 'e29fed9b1f81766bda975d938eecd3ec', './modules/ModuleBuilder/Module/StudioModuleFactory.php' => '5860a0e60d39a69303a39df4ea188336', @@ -1871,12 +1872,12 @@ $md5_string = array ( './modules/ModuleBuilder/MB/MBRelationship.php' => 'bc5653efb1243f8c7f37ab28a6c1cfa0', './modules/ModuleBuilder/MB/MBPackageTree.php' => '4f7961d0ec0fb7aeb5fed050d88af8a3', './modules/ModuleBuilder/MB/MBPackage.php' => '7c24d275756cb113f3e234ff9e9ecbf0', - './modules/ModuleBuilder/MB/MBModule.php' => 'b2b9f6a82b9ff9e5dd15d2a6e2cf057e', + './modules/ModuleBuilder/MB/MBModule.php' => '7f883828316cb5f5f9078d05c057e649', './modules/ModuleBuilder/MB/MBLanguage.php' => 'a202b7685d69a11e650c3f4e9aa863b6', './modules/ModuleBuilder/MB/MBField.php' => '2e3561d71f00c42e88f323c0fff72a4b', './modules/ModuleBuilder/MB/AjaxCompose.php' => 'ca3deaa4d15341b882af6cc33f6cc962', './modules/ModuleBuilder/Forms.php' => '2a94c4a8f697121796f53413911131f6', - './modules/MergeRecords/Merge.js' => 'b6d29cacc0d3d3db254e25336028587c', + './modules/MergeRecords/Merge.js' => '9c69a0e20eaa52c04ea1579bf974f7a6', './modules/MergeRecords/vardefs.php' => '4bf0082f891310f8f92c07c1e0570719', './modules/MergeRecords/language/en_us.lang.php' => '2d003fb1bfa29f7e7ca28534f03ae620', './modules/MergeRecords/index.php' => '15415c84a0f71513508796d3c9b647e3', @@ -1887,12 +1888,12 @@ $md5_string = array ( './modules/MergeRecords/Step2.html' => '3aaf16054c16cd602b5307556ef4bba4', './modules/MergeRecords/Step1.php' => '8af484acb42f60d45c49e536975133dd', './modules/MergeRecords/Step1.html' => 'f03881270ee14fbcded722a641b05c86', - './modules/MergeRecords/SearchForm.html' => '54cb8d217ee4a64b4df550f3d1be7313', + './modules/MergeRecords/SearchForm.html' => '939e7b5a111ac0f99950f0ca1c019b64', './modules/MergeRecords/SaveMerge.php' => '88236bdafc6373b8d0a8602e149441c2', './modules/MergeRecords/MergeRecord.php' => '64858899ce7a7cf98f387caa3c26ccd3', - './modules/MergeRecords/MergeField.html' => 'e4f82c53c70eb0b5a4cbb473e6f68f0a', + './modules/MergeRecords/MergeField.html' => 'a13ad4e3f3ab1e65050987e622859f30', './modules/MergeRecords/Menu.php' => '281930dcf94a918eb64f8435ad77f248', - './modules/Meetings/jsclass_scheduler.js' => 'd35e529e3e91a841bdd786f072067d15', + './modules/Meetings/jsclass_scheduler.js' => 'f793692ff2ac0242ad9e15833cfe2bf1', './modules/Meetings/action_view_map.php' => 'c175716cf3541179db17bc6b8c2723f0', './modules/Meetings/JoinExternalMeeting.php' => '8da73502e2d825ec2b10ede8ccf6ba61', './modules/Meetings/views/view.listbytype.php' => '1edb3e6eaf3e66aac1101d02b946e9c7', @@ -1909,9 +1910,9 @@ $md5_string = array ( './modules/Meetings/metadata/subpaneldefs.php' => '0c0c904e87130730c0757e495ecf2ea8', './modules/Meetings/metadata/studio.php' => '9597aef6f1a776f39e0515231425a883', './modules/Meetings/metadata/searchdefs.php' => '2bc913f3f67b7fa29cdab7e2623de325', - './modules/Meetings/metadata/quickcreatedefs.php' => '2321600f0873ae7de1ad62b360ed2359', + './modules/Meetings/metadata/quickcreatedefs.php' => 'a88880e2e8f010ce030a947aaa33db30', './modules/Meetings/metadata/listviewdefs.php' => '5973b2f25ca38dba5645037276ee0b9d', - './modules/Meetings/metadata/editviewdefs.php' => 'e03c0a71ee204f206e87f8794d8589c9', + './modules/Meetings/metadata/editviewdefs.php' => 'a44a2094c78b2d9c05538ca37e441766', './modules/Meetings/metadata/detailviewdefs.php' => '7b516d8760f5116e112601c34b6a0e66', './modules/Meetings/metadata/additionalDetails.php' => 'b2b466a61eef5f8369d9587631399b3c', './modules/Meetings/metadata/SearchFields.php' => '8fb6299f50de078c3578938a29e6fc57', @@ -1923,7 +1924,7 @@ $md5_string = array ( './modules/Meetings/Menu.php' => 'c02aa7c2c0f7c80a3cd7ead56ca1fcfc', './modules/Meetings/MeetingsQuickCreate.php' => '818e55e261c5e74cb385f835311944fa', './modules/Meetings/MeetingFormBase.php' => '3d15b0c970848917b794542f6b460aa6', - './modules/Meetings/Meeting.php' => '5d8581ab071e22f772ccaa82c10429ab', + './modules/Meetings/Meeting.php' => '390b291d07b1009d49f883ad2029bb03', './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php' => 'b8aaf79cc25c1230c20e1bbfbcb656d1', './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.meta.php' => 'e47f5ffe63b5a0fa7d7de49e41602428', './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.data.php' => 'da144e46c3f9a91f6bf149ebdf644e94', @@ -1938,9 +1939,9 @@ $md5_string = array ( './modules/MailMerge/Step3.php' => 'bfbc79b0927f0b615963d1118b96ddba', './modules/MailMerge/Step3.html' => '24d26c3c8eb46ded0f2adad4da479fea', './modules/MailMerge/Step2.php' => '7b1174b7a6c4c4ddc4ce71b0e2520091', - './modules/MailMerge/Step2.html' => '4219e6c50d29fd16bf02c7f1d2517930', + './modules/MailMerge/Step2.html' => '9dc2da5d59037c09d9ca4c40ca624dd4', './modules/MailMerge/Step1.php' => 'f6ddfe7ec04be708a4b6251c25b1bd95', - './modules/MailMerge/Step1.html' => 'be8feee344f39ce71d674539af555794', + './modules/MailMerge/Step1.html' => 'e47775cad8089fafc1ff8102632c9ab8', './modules/MailMerge/Save.php' => '6d3ccf9c3fc315c2001314975d9718fb', './modules/MailMerge/Merge.php' => '07e613e34ed6d04437345d6c8149f2b3', './modules/MailMerge/Merge.html' => 'd0b6e8bea8311647f1ec88b7da4e9309', @@ -1948,7 +1949,7 @@ $md5_string = array ( './modules/MailMerge/MailMerge.php' => 'ea350f20dab04579eaa0c671c2b7a100', './modules/MailMerge/EditView.php' => 'dd630d1aa3339b1de1195c96b2132c0a', './modules/MailMerge/DetailView.php' => '9657298f898e97dbc221c34f861a0f98', - './modules/Leads/Lead.js' => 'd55d73914466a3323d39a1a0a88a29ce', + './modules/Leads/Lead.js' => '63dad96eb6c7c57fbb34dda409f790ce', './modules/Leads/views/view.list.php' => 'd716f0c0d6e4bb6118c811c0bbcd903c', './modules/Leads/views/view.convertlead.php' => '54bb3e560ccb555186e7aa13aee3c49c', './modules/Leads/vardefs.php' => '24b064d465c8e10f58f37c73655ca718', @@ -1980,7 +1981,7 @@ $md5_string = array ( './modules/Leads/SubPanelView.php' => '95991bf83f707fec0c1828c44e5d4b3a', './modules/Leads/SubPanelView.html' => '94449c2bf94e6cf35540ad3574079089', './modules/Leads/Save.php' => '2e63b66499c78dfb5b73732b9c73be38', - './modules/Leads/Popup_picker.html' => 'c638af236edfc8849f0a71c573bcee59', + './modules/Leads/Popup_picker.html' => '5d8aea39ecdb32f2feb627da18c6d1af', './modules/Leads/MyLeads.php' => '69dbcc67a3b97979bf63a7897db3d74e', './modules/Leads/MyLeads.html' => '4405e61344262cb85243c148d748a465', './modules/Leads/Menu.php' => '80008b8d1fbe777e77848179b9b3dea0', @@ -1998,7 +1999,7 @@ $md5_string = array ( './modules/LabelEditor/Forms.php' => 'f7df0073958376f96b903e32125b7747', './modules/LabelEditor/EditView.php' => '327786b586c72cad50de7ca19361b2d7', './modules/LabelEditor/EditView.html' => '5c869e234bee20cc12984742cdea69c3', - './modules/InboundEmail/InboundEmail.js' => 'd24d7238fd7f1c7f2f41b25480d09f2e', + './modules/InboundEmail/InboundEmail.js' => '529ec88f22944d28f4d31a011ccc0c23', './modules/InboundEmail/vardefs.php' => 'f7aa1b4be9efb3918e9565b85f8ee55c', './modules/InboundEmail/language/en_us.lang.php' => '39b2d83673f787eb77be842dd8d972b4', './modules/InboundEmail/index.php' => '1aa418a33d81f3df849d7d7234438c2a', @@ -2012,7 +2013,7 @@ $md5_string = array ( './modules/InboundEmail/ListView.php' => 'c610da376126d3bb44f7dc780a6d13d7', './modules/InboundEmail/ListView.html' => '7e5d8d426d0a6833fe5caa3fb3ccc471', './modules/InboundEmail/InboundEmailTest.php' => '702038f3171c1bb612d4fff7cf0f765e', - './modules/InboundEmail/InboundEmail.php' => '963ae74afe37e2eed60fc957de7d5a1a', + './modules/InboundEmail/InboundEmail.php' => 'a483b157dc3b54bb407faf510d9a0868', './modules/InboundEmail/EditView.php' => 'aef594532aa6ab776c4b3cc30b20a04d', './modules/InboundEmail/EditView.html' => '7252f37c5372a5dd9989c212728cca98', './modules/InboundEmail/EditGroupFolder.php' => '6c6ba0d835901e8e9a8e87056d0479b6', @@ -2021,7 +2022,7 @@ $md5_string = array ( './modules/InboundEmail/Delete.php' => '682ed772ec388482dbe7a599e9e56104', './modules/Import/ImportMapTab.php' => 'd179a9e67a3bbc6e8b408efd2e37252a', './modules/Import/views/view.undo.php' => 'f3eed66ae73427bab843bc3c4d429db0', - './modules/Import/views/view.step4.php' => 'a5f6fd30495e02bfdbd000c2abfe5062', + './modules/Import/views/view.step4.php' => '28f9c6e10e08dbd858e9e8c092f26326', './modules/Import/views/view.step3.php' => '37847270b3445e2254096b3e4c9385fb', './modules/Import/views/view.step2.php' => '1836dd43ff036bf2396110df4a50eac2', './modules/Import/views/view.step1.php' => '997520f56e4ce49a625771a5d9a40ba2', @@ -2050,15 +2051,15 @@ $md5_string = array ( './modules/Import/ImportDuplicateCheck.php' => '5c5903744d183926748fac59ca5a8e90', './modules/Import/ImportCacheFiles.php' => 'c575f0ecbcbc98bd46ea8a10f6ee6c8a', './modules/Import/Forms.php' => '5fc35f1ae98fff8224af294bfb562a69', - './modules/Home/about.js' => '51ed3540ee26927fdad5a9ce8464d9dd', + './modules/Home/about.js' => 'af9365ee4df93485a1e9cb89752d4e85', './modules/Home/action_view_map.php' => '7562b37c19b699d7cd79efaa6ef17205', './modules/Home/views/view.additionaldetailsretrieve.php' => '7890a0201c58b736b64d8e8ef5be3437', './modules/Home/views/view.modulelistmenu.php' => '799bca31c2b99c8be86c3c53712c802a', './modules/Home/views/view.list.php' => 'b1213448edbef90a40061dbdfb6e432c', './modules/Home/sitemap.tpl' => 'a0145732b2b2154506eae54e3b66b851', './modules/Home/sitemap.php' => '85d1da921c719667f1e1be77993101d6', - './modules/Home/quicksearchQuery.php' => 'f6ecc927b4122a53ac3a4bcf12c033ee', - './modules/Home/language/en_us.lang.php' => '22af00cddc27f7519807f2222d9d8232', + './modules/Home/quicksearchQuery.php' => '7d3cb9dc5943ee286ea33ee90c335227', + './modules/Home/language/en_us.lang.php' => '2940f2ec09ebc0e1405843f0ea58ea5c', './modules/Home/dashlets.php' => 'a88f1d512af748e1a4aa34bfdb34f883', './modules/Home/UnifiedSearchAdvancedResults.tpl' => '65b6695a4b79dff0c7564665ac45355f', './modules/Home/UnifiedSearchAdvancedForm.tpl' => '69e1fc48e68332a049be43ba4d09eec1', @@ -2072,7 +2073,7 @@ $md5_string = array ( './modules/Home/PopupSugar.php' => 'f518518f3eb867cac97239a499fbe8a0', './modules/Home/Menu.php' => '5e30f2e18e40be505bd8ffa10ef26a62', './modules/Home/LastViewed.php' => 'dd4b5eea00e258ba7e13e71ee9b787cd', - './modules/Home/Home.tpl' => 'd9456b30fdfd73e9bc341afddda8a9e6', + './modules/Home/Home.tpl' => '2950d6ac0e01e3788e39f43cf0f78190', './modules/Home/Home.html' => 'e6427d0908ad7f2cdc736aef2126109a', './modules/Home/DynamicAction.php' => '93d422d2e2c365c2d33a9bc71f5aedc6', './modules/Home/Dashlets/iFrameDashlet/iFrameDashlet.php' => '059ba3d196ed8e0148297aff12a2b1f7', @@ -2087,7 +2088,7 @@ $md5_string = array ( './modules/Home/Dashlets/RSSDashlet/RSSDashlet.meta.php' => 'c672276452d6933a03be9006411602a8', './modules/Home/Dashlets/RSSDashlet/RSSDashlet.icon.jpg' => '7b0cb2ec97ce8e71d74d60a0da81ba53', './modules/Home/Dashlets/RSSDashlet/RSSDashlet.en_us.lang.php' => 'f47426bff171e5bf35c16c995002ded0', - './modules/Home/Dashlets/JotPadDashlet/JotPadDashletScript.tpl' => 'bcf20b584a7d41f185436e76fe1dd2c0', + './modules/Home/Dashlets/JotPadDashlet/JotPadDashletScript.tpl' => '78ff0af17c6befa0f936c7bc76e1361e', './modules/Home/Dashlets/JotPadDashlet/JotPadDashletOptions.tpl' => '72f26375195c45bdf9badd8ccaf90b5f', './modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.tpl' => '6d1d69a3d52f1e9caef4bcc77da5d92f', './modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.php' => 'df3e485642a9ae6b4d3e122cb29c5b8e', @@ -2110,7 +2111,7 @@ $md5_string = array ( './modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.en_us.lang.php' => '862477d3835816ea73a5b0b245f500fb', './modules/Home/SubpanelCreates.php' => '984eeda3c3ce4863795a21b6d4f2fe90', './modules/Home/AddToFavorites.php' => '36f3b6729a6c08afa63d7614e68f23ef', - './modules/Home/About.php' => '6f0cf84a910f04e8f7841623855d2625', + './modules/Home/About.php' => '858f6f1d26ff200447dcc5631d012993', './modules/History/metadata/subpaneldefs.php' => 'd25da6b3dc2a98b53fe168e5805fe262', './modules/History/language/en_us.lang.php' => '6e03640c59ea6846c934446ec6782318', './modules/Help/language/en_us.lang.php' => 'c8f73ef5b95d898669cb8d465a0d9bd3', @@ -2131,9 +2132,9 @@ $md5_string = array ( './modules/Groups/DetailView.html' => '0c0c957f384c3a1f30f52922afd517bd', './modules/Groups/Delete.php' => '62a025db67afb0688f26ac1dd2e6b855', './modules/Employees/EmployeeStatus.php' => 'e15246545f162fbb5ea4126eae907d7f', - './modules/Employees/views/view.list.php' => 'bdd83c70f40f420ab30a782cbcc627c3', + './modules/Employees/views/view.list.php' => '3971f6b0047923b2b1a49f6af37c58f2', './modules/Employees/views/view.edit.php' => 'a5838c257968be170c2bf2e26990adde', - './modules/Employees/views/view.detail.php' => 'b24de9fc3e8af418f83e058cec016959', + './modules/Employees/views/view.detail.php' => 'f4debcac776d253b840ab0737fb1527e', './modules/Employees/vardefs.php' => 'fbc0faa3310c46fda6e9022793b4173d', './modules/Employees/metadata/searchdefs.php' => 'b88ed48339d529934d31e521577a3995', './modules/Employees/metadata/listviewdefs.php' => 'ebe83948298f79b75a68b6c39b013ff6', @@ -2146,11 +2147,11 @@ $md5_string = array ( './modules/Employees/WapMenu.php' => '6ef9a223b1a105fa943802999a172ecb', './modules/Employees/WapAuthenticate.php' => '08d96a367d015300294ea70bd459b6a3', './modules/Employees/Popup_picker.php' => '8997f25d9d63236bb09e2fa58dcbca4e', - './modules/Employees/Popup_picker.html' => 'ce3703fbebadf3aeac43e157441d8f09', + './modules/Employees/Popup_picker.html' => '95e238ce7ac2d37010c07c9d4f2335e1', './modules/Employees/Menu.php' => 'd243cd0453202d101d515f3337d786e3', './modules/Employees/Forms.php' => 'dcb0eca9d5e3c8d92c17b66976ddcf13', './modules/Employees/Error.php' => 'ce78eb822cb1508b923493e55f053122', - './modules/Employees/Save.php' => 'c40cd43574e4999569ab04c5c1ba2434', + './modules/Employees/Save.php' => '0a02115ace66b8d69960b0d4660fdfa3', './modules/Employees/Employee.php' => '19d7b5023b16ca97b1f4f3dde4b485b7', './modules/Emails/views/view.quickcreate.php' => '1baef44186ab0bc84e3d575c5537ccb5', './modules/Emails/views/view.modulelistmenu.php' => '647ceefc2936595192f0683ff27ce3d2', @@ -2198,17 +2199,17 @@ $md5_string = array ( './modules/Emails/language/en_us.lang.php' => '7af039b5ba0e2346f71522e21515b406', './modules/Emails/javascript/viewPrintable.js' => '1bdda43134bb2d9af593440981a353d1', './modules/Emails/javascript/vars.js' => 'd50d29d7a0083c3cc915440de136ecbf', - './modules/Emails/javascript/init.js' => 'c8fbd8ef05172dc36b95f669dcfe72b7', + './modules/Emails/javascript/init.js' => '00e6d04a2905243df25b58bc861ade03', './modules/Emails/javascript/grid.js' => 'd0ec9cb5dd72f846ead99fcf1206d4c5', './modules/Emails/javascript/email_popup_helper.js' => 'c43121fb00da2c9599a63c21ba0d82c0', './modules/Emails/javascript/displayOneEmailTemplate.js' => '2674507d7e9e7486d73c8706916ff1d0', './modules/Emails/javascript/composeEmailTemplate.js' => 'ea1469e2026811ebf263d49063971fc8', - './modules/Emails/javascript/complexLayout.js' => '686078a962969f7f0b1dc653e41cd73d', - './modules/Emails/javascript/ajax.js' => '55076a47d45b7226691cd30c9699c011', + './modules/Emails/javascript/complexLayout.js' => 'fbcdb2d153ed8d495d095067ac792a47', + './modules/Emails/javascript/ajax.js' => '62f8c69d48c09895c5b2f84f10279751', './modules/Emails/javascript/EmailUIShared.js' => 'e29adedf1480382aacc62d8aa7cebbca', - './modules/Emails/javascript/EmailUICompose.js' => 'd85df5476d19c20d3b54f7fe2d2be109', - './modules/Emails/javascript/EmailUI.js' => '201451d2bc39757ca21b948c7f94b821', - './modules/Emails/javascript/Email.js' => '791b8c83e887f1f43c43afb955b28d7d', + './modules/Emails/javascript/EmailUICompose.js' => '9a99014ca67c7ad59e63275732190baa', + './modules/Emails/javascript/EmailUI.js' => '1fb6751344ba44c13a4207aeac09006b', + './modules/Emails/javascript/Email.js' => '0171973017954855cacf4d6131e3cb34', './modules/Emails/index.php' => '6aff206a9821e1259275602982d900b8', './modules/Emails/images/sugarGroup.gif' => 'ad21210176b6a2a10a7a9b8f876ad83b', './modules/Emails/images/sugarDynamic.gif' => '82285d963771975b2def7f19e6438a8c', @@ -2233,9 +2234,9 @@ $md5_string = array ( './modules/Emails/SearchForm.html' => '60561bf737698077131d1adc93936b01', './modules/Emails/Save.php' => '55f862acdd9d69b3a9d37d2d2c4cb02b', './modules/Emails/Popup_picker.php' => '0a565ac706b2a2adba1a92e451e2861b', - './modules/Emails/Popup_picker.html' => '5077d6396767f50801009d7c61b8b57d', + './modules/Emails/Popup_picker.html' => 'e1007fcf6df3f84a04b243925f2ab397', './modules/Emails/PopupDocuments.php' => '620740641da9b96fb68e4331a89d7072', - './modules/Emails/PopupDocuments.html' => '777ff206e55ed885a6253c9038ed5523', + './modules/Emails/PopupDocuments.html' => '3112fc4e221bba9a2955ada07302e700', './modules/Emails/Popup.php' => 'cc5dfd33a264f0c3d9a7fa13d43dae21', './modules/Emails/PessimisticLock.php' => 'b44033581341d7717b234a4f5863acee', './modules/Emails/Menu.php' => 'b5d34f9ee2064e224bb912649dafce8c', @@ -2249,13 +2250,13 @@ $md5_string = array ( './modules/Emails/ListViewDrafts.html' => 'f2596e8874ce149f0849ba620a47059e', './modules/Emails/Grab.php' => '1a2ae928706722eb9f4c7ffb4d975d88', './modules/Emails/GenerateQuickComposeFrame.php' => '9fa2162d2750f8dbc20a705909c353b3', - './modules/Emails/EmailUIAjax.php' => '430e12675d05a6bb49a4111378dad759', + './modules/Emails/EmailUIAjax.php' => '4bf08e94d91b5efa0c944027dbc0b4c5', './modules/Emails/EmailUI.php' => '4a84724f5f101fcd4e9f2e5a4ba360e5', './modules/Emails/EmailUI.css' => '6f93388627148bdc54c9458c434d7ec1', './modules/Emails/Email.php' => 'f5d67b0049592d97428c75cc6f9d6ecd', - './modules/Emails/EditViewArchive.html' => '9e4738577440967b28e60bb2d35b625a', + './modules/Emails/EditViewArchive.html' => '4542138077a248dc2c1bf1a48d0f283a', './modules/Emails/EditView.php' => 'bbf3c6d659a6cb696cabe233db2bd313', - './modules/Emails/EditView.html' => '795941fb0790758de1ed74c3fa973d06', + './modules/Emails/EditView.html' => '0610849d790684a1035c35fd8f48733f', './modules/Emails/DetailViewSent.html' => '7b12fdf44a8a0acde69e36fa0341e149', './modules/Emails/DetailView.php' => 'a6ca96cb85ff388b617d17c23f4dc777', './modules/Emails/DetailView.html' => 'ec09f0f79d1361e5c6a372551ae55a9e', @@ -2265,8 +2266,8 @@ $md5_string = array ( './modules/Emails/Dashlets/MyEmailsDashlet/MyEmailsDashlet.data.php' => '463a1b0f5afd1ac1f358c45beb534d06', './modules/Emails/Compose.php' => 'bd217590204924b4d032e7c3ca964068', './modules/Emails/Check.php' => '33a78ae06bc9dc1c8d8300a524c6c3e6', - './modules/EmailTemplates/EmailTemplate.js' => '9ce7a96cd9702babbf0f52dd69701349', - './modules/EmailTemplates/vardefs.php' => '7cdf5aecbecfbfad6651fe309b91aadc', + './modules/EmailTemplates/EmailTemplate.js' => '471649a4c7c0dc3156fe79d5c0064f1f', + './modules/EmailTemplates/vardefs.php' => '16e28969a8ce39a104a909ba577986df', './modules/EmailTemplates/metadata/searchdefs.php' => '18c73002b206d36572baabb7f987314a', './modules/EmailTemplates/metadata/listviewdefs.php' => 'a8b0313e2e211e473be0f383c5358d46', './modules/EmailTemplates/metadata/SearchFields.php' => '105fa4840d4292ae01d9c5dc398fb5ba', @@ -2274,13 +2275,13 @@ $md5_string = array ( './modules/EmailTemplates/field_arrays.php' => '8abd7a27162510ce083f17e3e4d06125', './modules/EmailTemplates/Save.php' => '9ce3021887d68e2fe0b8a785752c1ec0', './modules/EmailTemplates/PopupDocumentsCampaignTemplate.php' => '106659a099ce46c133d59e0c89a5119d', - './modules/EmailTemplates/PopupDocumentsCampaignTemplate.html' => '2130709145cf1fd96ac3ceb5ad40ed66', + './modules/EmailTemplates/PopupDocumentsCampaignTemplate.html' => '8efe463d65710e6c6b5439235fd0b2c3', './modules/EmailTemplates/Menu.php' => '4edf25b2e9851ed5f2e8e44bb69b6863', './modules/EmailTemplates/EmailTemplateFormBase.php' => 'ffc958e5b7d90e6b5d80b1775973ad9a', './modules/EmailTemplates/EmailTemplate.php' => 'a1b2da557cb1680e5386da341ab42cbb', - './modules/EmailTemplates/EditViewMain.html' => '2b5a3babb47125ad0f889a689c4d96ed', - './modules/EmailTemplates/EditView.php' => '1a1bea636cfd2d0d60db24f4cbcde8b2', - './modules/EmailTemplates/EditView.html' => '7a4dfb4cecefc696c1790390bdbeef4c', + './modules/EmailTemplates/EditViewMain.html' => '2524b1d15a0f49b2ae59a068ae0e49af', + './modules/EmailTemplates/EditView.php' => '22465c185f440ae7e4c2bf4591eb997e', + './modules/EmailTemplates/EditView.html' => '1fc9440b3824a5b62b989e1ef1e7e524', './modules/EmailTemplates/DetailView.php' => 'eb2765b757394ff6383ab60e4161c35b', './modules/EmailTemplates/DetailView.html' => '45aae47f2d182de3335e72abe975e7f2', './modules/EmailTemplates/Delete.php' => 'be4a379f832093ad36ce54cd95553ac1', @@ -2308,7 +2309,7 @@ $md5_string = array ( './modules/EmailMan/views/view.config.php' => '57b38635350c47bd0fe995348d940c9b', './modules/EmailMan/views/view.campaignconfig.php' => '929db4bba124ff947bc67ee3599341c6', './modules/EmailMan/vardefs.php' => '3eda37221e3162a777a73f1186af76b0', - './modules/EmailMan/tpls/config.tpl' => '84790c383c6d7365a8033199bb21d8c5', + './modules/EmailMan/tpls/config.tpl' => 'd0f4df4f302917bb56b5ecd09540bcd4', './modules/EmailMan/tpls/campaignconfig.tpl' => '44623eab12e9006cae2d08f74f3394f9', './modules/EmailMan/testOutboundEmail.php' => '41174af3752e344ce9be8185ab406115', './modules/EmailMan/subpanels/default.php' => '38725d5f2e105fd9167b6395d81d23d4', @@ -2323,14 +2324,14 @@ $md5_string = array ( './modules/EmailMan/Menu.php' => '0c6088479556b57257a7dcf8cd439940', './modules/EmailMan/Forms.php' => '82708d6c997b31f39fd29e2083af8624', './modules/EmailMan/EmailManDelivery.php' => 'e82ffdebd5c4b09155d318af0d7502ec', - './modules/EmailMan/EmailMan.php' => 'd4a272850e0165b1af6e232cae1a97c3', + './modules/EmailMan/EmailMan.php' => '12fbff7e02401ea17c978f1294c0f944', './modules/EmailAddresses/vardefs.php' => '465f3658bdc23c92e57c76217e5bb4eb', './modules/EmailAddresses/language/en_us.lang.php' => 'db372ac43705b32cb262af2e0ba5277d', './modules/EmailAddresses/EmailAddress.php' => 'b1e77ecbdc87dc5efd9bf41390f0245a', './modules/DynamicFields/vardefs.php' => '139b05edc224061f98edfb6eae65402a', './modules/DynamicFields/templates/Files/EditView.php' => 'e733670aec23098c6d482eb1a0b65de3', './modules/DynamicFields/templates/Files/DetailView.php' => '3448ebfd05eaae96f9ccda08eb30c00d', - './modules/DynamicFields/templates/Fields/TemplateRange.php' => 'f176c7790a4c2888a8ed22c4995762da', + './modules/DynamicFields/templates/Fields/TemplateRange.php' => '352d48a341a2e4f81992b694c3344f1b', './modules/DynamicFields/templates/Fields/TemplateURL.php' => 'a34e2c6efd0bf39fe80209181e045172', './modules/DynamicFields/templates/Fields/TemplateTextArea.php' => 'cbd2f74d74bf8b8f086a17fcd5738093', './modules/DynamicFields/templates/Fields/TemplateText.php' => '60f8153acf442941c27c34b5050f194d', @@ -2398,8 +2399,8 @@ $md5_string = array ( './modules/DynamicFields/FieldsMetaData.php' => '31881094e9dfef9a0579622e0768d69f', './modules/DynamicFields/FieldViewer.php' => '53f662eab9401fd5a0b9f90c035fb13a', './modules/DynamicFields/FieldCases.php' => '7e9c75d4fcefca29f24033a0e8687f3c', - './modules/DynamicFields/DynamicField.php' => 'bfda5665bdc3c864673509536b548611', - './modules/Documents/documents.js' => 'bd75e795c1821436c484e01ac09a95d1', + './modules/DynamicFields/DynamicField.php' => '140c9f4cbbd8b9c7654c5bf7fabe334a', + './modules/Documents/documents.js' => '27b2aedb1597d9f13ee4410d295e45bd', './modules/Documents/tpls/view.extdoc.tpl' => '5566d78f1a66a4a38d1d3dc93ece9c01', './modules/Documents/action_view_map.php' => '0994fe5e38b73c985fff200f9edb2129', './modules/Documents/DocumentExternalApiDropDown.php' => '05c03dc10f85d98ddc4c512d809f886a', @@ -2415,24 +2416,24 @@ $md5_string = array ( './modules/Documents/metadata/subpaneldefs.php' => '70dd233ce8f24edeb4b54a39185d5562', './modules/Documents/metadata/studio.php' => '1f3e1f9c3a457e502635fd5a1d53861d', './modules/Documents/metadata/searchdefs.php' => 'd344cdfeb46470a1575e7a0fa752eef9', - './modules/Documents/metadata/quickcreatedefs.php' => '17cece103153f45406f91958ba35e2e0', + './modules/Documents/metadata/quickcreatedefs.php' => '532f31110e9f13e775f3f50609bdc715', './modules/Documents/metadata/listviewdefs.php' => '219bcfc1e773eedfd3675265ef002ff3', - './modules/Documents/metadata/editviewdefs.php' => '86e5ba21f1c722fcebfbd750b73f0585', - './modules/Documents/metadata/detailviewdefs.php' => 'ad459bee317068a5dbef0d59d26d25e9', + './modules/Documents/metadata/editviewdefs.php' => '0c4330ed8c2c1fea7ca45aa7b3554df9', + './modules/Documents/metadata/detailviewdefs.php' => '1f005a55b5bce7e42d4f5598b2ff06f2', './modules/Documents/metadata/SearchFields.php' => '95cb40df371368c17f84dc3d08e37b98', './modules/Documents/language/en_us.lang.php' => 'abd885ea32769e2435afdd6ee53077aa', './modules/Documents/field_arrays.php' => 'ce02f4e3f1c5718d952ed0327c57fc21', './modules/Documents/TreeData.php' => '389a7fd896fc0224c75f0479007548ae', './modules/Documents/Popup_picker.php' => '81628e6d81835408a4f694996d5b7e9b', - './modules/Documents/Popup_picker.html' => 'dc5f3f8a9fbf414c4843401b76697153', + './modules/Documents/Popup_picker.html' => 'a4cec71922d63e456bf0a6be6ac220f7', './modules/Documents/Popup.php' => 'c17db324b0da1f3dd63d0061db0ad0a7', './modules/Documents/Menu.php' => 'd0c29949cf8e50922b32b92a424cb3dc', './modules/Documents/GetLatestRevision.php' => '8f75739c607a8958d54b65e91b1e6167', './modules/Documents/DocumentSoap.php' => '1f20ba3768c0a063f3edd2f1ba95d347', - './modules/Documents/Document.php' => '91dfccdbfb1e2a46e70c9cabdbfb0b88', + './modules/Documents/Document.php' => 'ded7c825a3e454f865347cf5ff242f3f', './modules/Documents/Delete.php' => 'fe07bfd994a8d39da43f79fbf4aac64e', './modules/DocumentRevisions/subpanels/default.php' => 'c2961928cfb28cd4b9336444ea7843d3', - './modules/DocumentRevisions/metadata/editviewdefs.php' => '85ba2308e62a6457fe15314d300f43e3', + './modules/DocumentRevisions/metadata/editviewdefs.php' => '38b36f4bf7e06b78187659f9fa1b9b9c', './modules/DocumentRevisions/metadata/detailviewdefs.php' => '702fffdd1d9996b91d6f3edd67e9e99f', './modules/DocumentRevisions/metadata/subpanels/default.php' => '927bbe4743f41507c513e1f112ffc99b', './modules/DocumentRevisions/language/en_us.lang.php' => '8f7a15a66ab78f53dd433ba59fea7fa0', @@ -2442,7 +2443,7 @@ $md5_string = array ( './modules/DocumentRevisions/Forms.php' => 'f6929823124ed72ab9efffee6045ec59', './modules/DocumentRevisions/vardefs.php' => '768076d07181c7f6d858f5df55c3b866', './modules/DocumentRevisions/DocumentRevision.php' => '823de083e083a0c71a9ba89c7847a50c', - './modules/Currencies/EditView.js' => '65722b940a65da3639d5333527b50f4e', + './modules/Currencies/EditView.js' => '516498fa162c404dc7fab9b81daf7646', './modules/Currencies/vardefs.php' => '0ce10b7e0591156683403e7ed0c80e58', './modules/Currencies/language/en_us.lang.php' => '7102fe56247147831725579daf8f52ff', './modules/Currencies/iso4217.php' => '0bf2db83a37a37a231e4a7ab688b8843', @@ -2455,7 +2456,7 @@ $md5_string = array ( './modules/Currencies/EditView.tpl' => '509a24e75df8bc565847458bf541f7fa', './modules/Currencies/EditCurrency.php' => 'dfe9ae276fb02bdae956146ee96edca0', './modules/Currencies/Currency.php' => '4338c4bc0160d6c22eb25b6896ab76c6', - './modules/Contacts/Contact.js' => '879639da8445181e7309da522b36641e', + './modules/Contacts/Contact.js' => 'e503be995847cfaa74b80ec64deea115', './modules/Contacts/views/view.list.php' => 'd5a51ad95c221ddaaaaca33c9b3acd1a', './modules/Contacts/views/view.validportalusername.php' => 'b85ab0a2b014d20d69c3c57c415148c4', './modules/Contacts/views/view.retrieveemail.php' => '6f810a4e68ef0c84d31aa433a03929a7', @@ -2497,8 +2498,8 @@ $md5_string = array ( './modules/Contacts/Save.php' => '8463ae2addbf510c8e055b0ad11ec8c7', './modules/Contacts/Popup_picker.php' => '45b6af1ceb2c9e4383a66c3c92f58549', './modules/Contacts/Menu.php' => 'f36572cacfa49684129a128ccea372d9', - './modules/Contacts/MailMergePicker.html' => '05f120965c360074ad4db9b544c52b70', - './modules/Contacts/Email_picker.html' => '8643e263812065d87fd09eae91e99712', + './modules/Contacts/MailMergePicker.html' => '0484e414fff4e7622b030c06e48fbf84', + './modules/Contacts/Email_picker.html' => 'f1a7b2c80f2b56d01ec37ce3a2630200', './modules/Contacts/Dashlets/MyContactsDashlet/MyContactsDashlet.php' => 'ee47daa1a82e817d76c33c43b05fd883', './modules/Contacts/Dashlets/MyContactsDashlet/MyContactsDashlet.meta.php' => 'd728897d859d3ca88cdeb06a1774dcb4', './modules/Contacts/Dashlets/MyContactsDashlet/MyContactsDashlet.data.php' => '9ef4bcfedfa8109cb64ccb69b56f57a9', @@ -2511,8 +2512,8 @@ $md5_string = array ( './modules/Contacts/BusinessCard.php' => '6791cfe02546533166a04d27d143eb49', './modules/Contacts/BusinessCard.html' => '2ad1f1578e7c6f85791f97656576a3a8', './modules/Contacts/Address_picker.html' => '7d072ff9f9bc06d2373ba2dee5a7086c', - './modules/Contacts/AcceptDecline.php' => '49bda2227d2df35eea928fec625894d6', - './modules/Connectors/Connector.js' => '41a0de3b7ffd5ab14b582a387a91d709', + './modules/Contacts/AcceptDecline.php' => '85fc8211788b54db3754cfb50f3f6aa3', + './modules/Connectors/Connector.js' => 'a46f07c2e592f0921202fe6b172cd255', './modules/Connectors/views/view.sourceproperties.php' => '7997c47e9b4b16a4110d74cefd49e876', './modules/Connectors/views/view.searchproperties.php' => '5babafe11d6938e40743e8309949bc9b', './modules/Connectors/views/view.modifysearch.php' => '6d780a252feacfec34763b6aa82023a7', @@ -2537,7 +2538,9 @@ $md5_string = array ( './modules/Connectors/metadata/searchdefs.php' => '0a7b0c3175045ed95ffba4266f5aa88c', './modules/Connectors/language/en_us.lang.php' => '7a098f6e82147b7f1b78548c73e6396d', './modules/Connectors/controller.php' => '6a2d3a3e77f9ea5215c829be7d293c3e', + './modules/Connectors/connectors/sources/ext/rest/insideview/tpls/InsideView.tpl' => '7ff192cb71e188978fce2086db10d904', './modules/Connectors/connectors/sources/ext/rest/insideview/mapping.php' => '0a0fac88d087b82df90c60abc0945819', + './modules/Connectors/connectors/sources/ext/rest/insideview/language/en_us.lang.php' => '197f5401eda3284469c56a4daf6d6570', './modules/Connectors/connectors/sources/ext/rest/insideview/insideview.php' => 'a0707499398c3cf58c9fbaa45a93e85d', './modules/Connectors/connectors/sources/ext/rest/insideview/images/video.png' => '78914852af51eb8eb694fdcf518b6752', './modules/Connectors/connectors/sources/ext/rest/insideview/images/insideview_expanded.png' => 'db7e5e84b7891adaed90dfd211338959', @@ -2545,8 +2548,7 @@ $md5_string = array ( './modules/Connectors/connectors/sources/ext/rest/insideview/images/insideview.png' => 'b94d9483f486e0f53b3d98c6d04bd9f6', './modules/Connectors/connectors/sources/ext/rest/insideview/images/close.png' => 'a0d9ad4fc0c4a58ebaa7823216f6cc98', './modules/Connectors/connectors/sources/ext/rest/insideview/config.php' => 'a5d091ae0399b08a109fb26ec6d602f7', - './modules/Connectors/connectors/sources/ext/rest/insideview/InsideViewLogicHook.php' => '6897ce047b1ce6d1a163cb6845e3a106', - './modules/Connectors/connectors/sources/ext/rest/insideview/InsideView.en_us.tpl' => '7dfe61487b357f007a1792b541def89b', + './modules/Connectors/connectors/sources/ext/rest/insideview/InsideViewLogicHook.php' => '5842bef34a886c6412af2f5df6915feb', './modules/Connectors/connectors/sources/ext/rest/linkedin/vardefs.php' => '975b74882adf5d355985d903f60fc160', './modules/Connectors/connectors/sources/ext/rest/linkedin/mapping.php' => '03dbda444c28146c4def211d46778dbc', './modules/Connectors/connectors/sources/ext/rest/linkedin/linkedin.php' => 'd5da6d5b0b11082807ee53fd3eafbed3', @@ -2568,19 +2570,19 @@ $md5_string = array ( './modules/Configurator/views/view.addfontview.php' => '32bb28602335b418eafcd8bafb5e6fa9', './modules/Configurator/views/view.addfontresult.php' => '70babb45791ab15c7e7395aaa0ac8494', './modules/Configurator/tpls/fontmanager.tpl' => '748bd026b6862c287e0c4a6dd50e2e56', - './modules/Configurator/tpls/adminwizard.tpl' => '3cfd3fbfb6014c69b009e14b781e69a9', + './modules/Configurator/tpls/adminwizard.tpl' => 'a9e9c1302164f31afe482f341f75fac7', './modules/Configurator/tpls/addFontView.tpl' => '5da526b1ed5a0b3fc57caa4161d47b6d', './modules/Configurator/tpls/addFontResult.tpl' => '1e1475a7d057504ba22a4a30b65b6c36', './modules/Configurator/tpls/SugarpdfSettingsFields.tpl' => '80235a1d08cf36c5dfbd79c7de7152e8', './modules/Configurator/tpls/SugarpdfSettings.tpl' => 'd283c244e66075367faef6cbc01f3459', './modules/Configurator/tpls/EditView.tpl' => '219835b6a9d2ac602d92b7233c44f381', './modules/Configurator/metadata/SugarpdfSettingsdefs.php' => 'df5f687816312360b828d6d9efab2b71', - './modules/Configurator/language/en_us.lang.php' => '521be76fba5b22a437f70cf500a97980', + './modules/Configurator/language/en_us.lang.php' => '5f8de482b351b8762d48a1204b4cbb1d', './modules/Configurator/controller.php' => '4161172c9a598fde3a057a880d4e4ff0', './modules/Configurator/UploadFileCheck.php' => 'a3d6615e316e2b631b800c68c066d608', './modules/Configurator/action_view_map.php' => 'ba2dd628e87ce08422e8854993f3fb5c', './modules/Configurator/Menu.php' => 'a32579287c11a74aaf0d25ebb862edec', - './modules/Configurator/LogView.php' => '1f0a28d4684fe0e14e17589c4e74390a', + './modules/Configurator/LogView.php' => '844564b1cf42741fd2ff476265d69d1c', './modules/Configurator/Forms.php' => '75933ff8b509353c7f2a709c45dced5e', './modules/Configurator/Configurator.php' => '3654a163efa26db0b027e26f03eeb079', './modules/Charts/DynamicAction.php' => '9b4c878a367fa8304cec90ad9f621d11', @@ -2639,7 +2641,7 @@ $md5_string = array ( './modules/Cases/metadata/detailviewdefs.php' => 'a3dab719fc6651f514e388d057dd5257', './modules/Cases/metadata/additionalDetails.php' => '107c548cb270f3c6a9d49656ad565cbe', './modules/Cases/metadata/accountsquickcreatedefs.php' => '5ba216fa356f7f0c0a50f2a434140889', - './modules/Cases/metadata/SearchFields.php' => 'a15ff296456da7bd8405da4b15f33d3f', + './modules/Cases/metadata/SearchFields.php' => 'fc5fbc25e3083d4ee141c349d0a21537', './modules/Cases/language/en_us.lang.php' => '0347ef9fabbf625681d87ed59c03c42c', './modules/Cases/field_arrays.php' => 'f47f31e031a2337b3275c52d40be0a96', './modules/Cases/SugarFeeds/CaseFeed.php' => '054fc387ac7b6a62d8b867404d72858e', @@ -2649,9 +2651,9 @@ $md5_string = array ( './modules/Cases/Dashlets/MyCasesDashlet/MyCasesDashlet.data.php' => 'd76f38fe107de337969f7fa008222cb7', './modules/Cases/CasesQuickCreate.php' => 'f4388c89d3fdc373b844741303fa3f35', './modules/Cases/Case.php' => 'dcf507ff89d22df6b643485b9950111d', - './modules/Campaigns/DetailView.js' => 'ddce02d7247d2dc31848a266a0c6798e', - './modules/Campaigns/WebToLead.js' => '394928e661f5132ca4d1d3d1f30f701d', - './modules/Campaigns/wizard.js' => '163f4c2befc46b18e4ba923aa2a1baab', + './modules/Campaigns/DetailView.js' => 'd99f7c99ca8a7886d311b9131616513b', + './modules/Campaigns/WebToLead.js' => '079c6e0a443138ff2203ca331e4b55e9', + './modules/Campaigns/wizard.js' => '62f337f78016b8ca743aa61489863ad9', './modules/Campaigns/views/view.newsletterlist.php' => '6f52d2669b3d7afb03d6066d14d7631a', './modules/Campaigns/views/view.modulelistmenu.php' => '5a4ababf139b00c95705cfeba8abda74', './modules/Campaigns/views/view.detail.php' => 'c00b5e16a5c761196bd4762f3b2f0389', @@ -2691,13 +2693,13 @@ $md5_string = array ( './modules/Campaigns/WizardHome.php' => '43bd2fbd7b3521a76132d9dda1f29133', './modules/Campaigns/WizardHome.html' => '498f6846c3e963ec60ca0fd9cd7b496b', './modules/Campaigns/WizardEmailSetupSave.php' => 'e58eb32256b562aa5d9a4dda9173cb6c', - './modules/Campaigns/WizardEmailSetup.php' => '91e2ca90dbb2d27b1ff15b16b685327b', + './modules/Campaigns/WizardEmailSetup.php' => 'a599a67497a6d6b00b96a2880645d149', './modules/Campaigns/WizardEmailSetup.html' => '9919b165f864ac7962ddf9744699193b', './modules/Campaigns/WebToLeadFormSave.php' => 'cc3995d510522a4826fd8a53965cdc1f', - './modules/Campaigns/WebToLeadForm.html' => 'f8489c22156cf743dbf4d17221abcf1d', - './modules/Campaigns/WebToLeadDownloadForm.html' => '9a6d7a0de412c281d00e23e0c32824a4', + './modules/Campaigns/WebToLeadForm.html' => 'b5ad601bb0f41c4ff1fce3fbc0ce582d', + './modules/Campaigns/WebToLeadDownloadForm.html' => '1828aed589b952ab4c93e21d9d9f5cd8', './modules/Campaigns/WebToLeadCreation.php' => 'aa38c4cc3449e5e277566bf5c553aa38', - './modules/Campaigns/WebToLeadCreation.html' => '9bd082ef08ad1c2c3dca0ee9536940e6', + './modules/Campaigns/WebToLeadCreation.html' => '16c5523189e636ba3e2647c81b4678d7', './modules/Campaigns/WebToLeadCapture.php' => '78cdb91e816e94b1d7b4eeba8e3fcf78', './modules/Campaigns/Tracker.php' => '726e6fc5b58f58cd4b330b61a12d7d21', './modules/Campaigns/TrackDetailView.tpl' => '3187e57b3476ef4387e76b385893027d', @@ -2711,17 +2713,17 @@ $md5_string = array ( './modules/Campaigns/Schedule.html' => '915b5758057b0e585f19c8d587093673', './modules/Campaigns/Save.php' => 'bc087316c52c6f114fc1c8d15f3b7598', './modules/Campaigns/RoiDetailView.tpl' => '37196dd6f4253e25d2e12751900bdd8d', - './modules/Campaigns/RoiDetailView.php' => '0abc005c9db4cbce4b02348fdfe2167a', + './modules/Campaigns/RoiDetailView.php' => 'dc249ef1ba62b68f627d9ff9fe5ad590', './modules/Campaigns/RemoveMe.php' => 'e4791a0df39d1ad2f6ed7d869f74ada7', './modules/Campaigns/QueueCampaign.php' => 'd775a610cffcb3dc55bf7fa655e46508', './modules/Campaigns/ProcessBouncedEmails.php' => 'f70fe8581c52f77511468e1a3127505c', './modules/Campaigns/Popup_picker.php' => '63d15be295e712fbdf47512181df64d1', - './modules/Campaigns/Popup_picker.html' => 'e54e3fa13b7b2e3e01ed49c56cac9aac', + './modules/Campaigns/Popup_picker.html' => '2fa42a81ae29c5b7aaac35fbfe38e8e3', './modules/Campaigns/PopupCampaignRoi.php' => '447405579e61b3607e8bb99a9ab42956', './modules/Campaigns/PopupCampaignRoi.html' => '0e91e877876feab8957cec5827247816', './modules/Campaigns/Menu.php' => '83af5f3dc4b71a10fd25f11f6dc907c4', './modules/Campaigns/MailMerge.php' => 'b635266e87c4a14f7930e1e988a7e7d0', - './modules/Campaigns/GenerateWebToLeadForm.php' => 'cba44c20454212f98559e918b453c170', + './modules/Campaigns/GenerateWebToLeadForm.php' => '859d24d36df8de8d6d2cfd14f581915f', './modules/Campaigns/EmailQueue.php' => '1635f40ea97a9cb22f922d6ee0d94652', './modules/Campaigns/Delete.php' => '453d68affba5006c3fbec936394e632c', './modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashletConfigure.tpl' => '612ad35fc9906cb2bda949756465b375', @@ -2733,7 +2735,7 @@ $md5_string = array ( './modules/Campaigns/CaptchaValidate.php' => '0329a3f4efd52fe128507f4d2c64c60f', './modules/Campaigns/CampaignDiagnostic.php' => '55b8c25896e40a7ff3316ff046b99c08', './modules/Campaigns/CampaignDiagnostic.html' => 'a001a2abe39b1cacd656dd4bc386afbb', - './modules/Campaigns/Campaign.php' => '2c414c5ae1a5142bd2a54b67c9b31573', + './modules/Campaigns/Campaign.php' => '92ff3d212bf6703173911c52d12ac8c9', './modules/CampaignTrackers/vardefs.php' => '2b1e5526138d9ce5fd9dc3c52d048608', './modules/CampaignTrackers/metadata/subpanels/default.php' => '7ff4226afd7940a03aa66fc25d043520', './modules/CampaignTrackers/language/en_us.lang.php' => 'c3822f18555758addc6e33731be2ef6e', @@ -2751,7 +2753,7 @@ $md5_string = array ( './modules/CampaignLog/metadata/subpanels/ForTargets.php' => '7139b427cd0a42ea7b42bc1b8b86d24b', './modules/CampaignLog/language/en_us.lang.php' => '42b51c8253d2fdb5ca3c43b95d54a83b', './modules/CampaignLog/Popup_picker.php' => '5cfbc593eb62651c9b5fddbb2e365093', - './modules/CampaignLog/Popup_picker.html' => 'ea28f438224d7f1d959d57d75796d68a', + './modules/CampaignLog/Popup_picker.html' => '5352231f402a624f048d9bfa812fa3d7', './modules/CampaignLog/Menu.php' => '9a144af6bd83a06aee1415594bd13e35', './modules/CampaignLog/CampaignLog.php' => '3a17faa3d29a69fb19cc00a381008238', './modules/Calls/views/view.edit.php' => '0074a5ec03aea28d0059f1120b385ee6', @@ -2764,9 +2766,9 @@ $md5_string = array ( './modules/Calls/metadata/subpaneldefs.php' => '2aad1276c69546b6c22fc59e6b8328ae', './modules/Calls/metadata/studio.php' => '7442f22126f5bb99ab4f3386b2f25f3b', './modules/Calls/metadata/searchdefs.php' => '3a33005e5c90d47224d270ffdde6cb19', - './modules/Calls/metadata/quickcreatedefs.php' => '686baa980b30a2d5fa0cf2375a234203', + './modules/Calls/metadata/quickcreatedefs.php' => '2cb0e91f4b9258052b62cd1d02cd6452', './modules/Calls/metadata/listviewdefs.php' => '83718f5d2b52beb50b9eed6b87a635b9', - './modules/Calls/metadata/editviewdefs.php' => '689bae306d15d7e6c30d62336afe7553', + './modules/Calls/metadata/editviewdefs.php' => 'ea00b929359955f8def9c63ff02a8b18', './modules/Calls/metadata/detailviewdefs.php' => '61fa590b05d978a15d6bc867d223b4c9', './modules/Calls/metadata/additionalDetails.php' => '9f9022d29091a594b1723cf72c905724', './modules/Calls/metadata/SearchFields.php' => 'dd426ac2a74e3235b37ce31501179359', @@ -2782,7 +2784,7 @@ $md5_string = array ( './modules/Calls/CallsQuickCreate.php' => '1a526db285df01bcdda25ef861e25323', './modules/Calls/CallHelper.php' => '821c104aef4b2d64666fa94bb7cf7d88', './modules/Calls/CallFormBase.php' => 'be71a4f2de40b336544e559bcab7678c', - './modules/Calls/Call.php' => 'a806ae306c553871698911e976f8a946', + './modules/Calls/Call.php' => 'ccbaa320b0cf524fb41196a5af954b73', './modules/Calendar/views/view.list.php' => 'e8dd64409e0ac2eacd506fcb7bb81fd9', './modules/Calendar/templates/templates_calendar.php' => '065f96f74236c7dc02b019dea7ffbbad', './modules/Calendar/templates/template_shared_calendar.php' => 'b851af6632f3a7af5c5923bb561b6124', @@ -2835,7 +2837,6 @@ $md5_string = array ( './modules/Administration/views/view.themesettings.php' => '9ffaa92e78814164cedc2e3ad6e41bd1', './modules/Administration/views/view.repair.php' => '394bba2767cd1ed68095430d77a2aace', './modules/Administration/views/view.configuretabs.php' => 'f7b417a6012a5fb0c21cbe46b45787e9', - './modules/Administration/vardefs.php' => '6a950e59140f943747c0ef6a5ce13733', './modules/Administration/upgrade_custom_relationships.php' => 'd544dadb11c056c9db5073304632947c', './modules/Administration/updateclass.php' => '7b94b3e2fc1954869567c1b5cba55b9f', './modules/Administration/updateTimezonePrefs.php' => 'd92d79ea87037aa27234679895ab124a', @@ -2844,41 +2845,42 @@ $md5_string = array ( './modules/Administration/templates/GlobalSearchSettings.tpl' => '7872194b872c6bf46965e7c7b006e52e', './modules/Administration/templates/themeSettings.tpl' => '80eef5be21cbff2a9e80e1bd33cd7d02', './modules/Administration/templates/ShortcutBar.tpl' => '0d2c2e9b5e15a1528e97fad95cace190', - './modules/Administration/templates/RepairXSS.tpl' => 'b5a38c8546bd4872d57a0b1a75c61ac0', + './modules/Administration/templates/RepairXSS.tpl' => 'cbf0b5ede9e0f8ff598cf3e9c3dbef9b', './modules/Administration/templates/RepairDatabase.tpl' => 'f09b873b05ef2d1ad35faf58de1bfef5', './modules/Administration/templates/QuickRepairAndRebuild.tpl' => 'df2bd8253f8e7e1da13aefcb54d4d39b', './modules/Administration/templates/ConfigureTabs.tpl' => 'ef345ff226a317b2c66027d1d5e78e2d', - './modules/Administration/repairUniSearch.php' => 'e25cdf52b928d0ea05e4a2b25acf8a66', './modules/Administration/repairSelectModule.php' => 'a7af51a5f7f6e5002f4963b80504c0d8', './modules/Administration/ncc_config.php' => '6fcf1f7bd93acbf9b0c7b3a890bdab9d', './modules/Administration/metadata/adminpaneldefs.php' => 'ad3965327909144539e30ab90a646daa', './modules/Administration/metadata/SearchFields.php' => '6968a40d78da694e44829ec8d00645e8', './modules/Administration/language/en_us.lang.php' => '8bfda44a508c4eaa535372244f152343', - './modules/Administration/javascript/Administration.js' => '17c40b0cafc373733b54c61945796313', - './modules/Administration/javascript/Async.js' => '73af9e38ad61890989ab698e3298f2e9', - './modules/Administration/index.tpl' => '3855c92a682bda5946fc7bf6ff775f39', + './modules/Administration/javascript/Administration.js' => '5c983c8146d2f8e537f0f826d0239834', + './modules/Administration/javascript/Async.js' => '6201560d3cc38a32a3300606bce92541', './modules/Administration/index.html' => '2cc05387b7f392ee9891f97ff24e8f66', - './modules/Administration/clear_chart_cache.php' => '95585a99d6928cc158475308324e8270', + './modules/Administration/Diagnostic.tpl' => 'a46eed78fd43c51c6df8e3e6a0e7ae86', + './modules/Administration/repairUniSearch.php' => 'e25cdf52b928d0ea05e4a2b25acf8a66', './modules/Administration/callJSRepair.php' => '097ad94cdd7cddd45fe0f247df360f26', + './modules/Administration/index.tpl' => '3855c92a682bda5946fc7bf6ff775f39', + './modules/Administration/clear_chart_cache.php' => '95585a99d6928cc158475308324e8270', './modules/Administration/UpgradeWizard_prepare.php' => 'fcd2cd294ca89b83d07b6ab1320be5e8', './modules/Administration/UpgradeWizard_commit.php' => '79b11156566b725fcfc3ef0a6e654e23', './modules/Administration/UpgradeWizard.php' => '84fba3fca2c46fd23c0fd2fbc63aec78', './modules/Administration/UpgradeIISAccess.php' => '06edbb4c220390310e11109e8f3385a7', + './modules/Administration/vardefs.php' => '6a950e59140f943747c0ef6a5ce13733', './modules/Administration/updater_utils.php' => '4cc174956a5791243e839c6b74e148cb', './modules/Administration/UpgradeFields.php' => '6ec4328aa4888703fc800ed61dcf56de', './modules/Administration/UpgradeAccess.php' => 'd5b662f01ae6c5a8ec6ef7f7cfa6e4cd', - './modules/Administration/index.php' => 'c376fc0c269ebccf75b73f3e391a1259', './modules/Administration/expandDatabase.php' => 'db6782337c424a5aea39932c6c74b52a', './modules/Administration/UpgradeWizardCommon.php' => 'd6c694064904b67eaefdef81b4912b97', './modules/Administration/SupportPortal.tpl' => 'ca19a599f5e708f2ab909b9b34317ff2', - './modules/Administration/Diagnostic.tpl' => 'a46eed78fd43c51c6df8e3e6a0e7ae86', + './modules/Administration/DstFix.php' => '3c1cfac3316ffc8ebfd4ecda81ca40f0', './modules/Administration/repairDatabase.php' => '8de7ecd350e5516b099fa6dd0f0bfecd', './modules/Administration/Save.php' => '4152bf2003831091369d76b24495386f', - './modules/Administration/RepairXSS.php' => '2d56fb5ebf47019f684ddc0329d4ffa5', + './modules/Administration/index.php' => 'c376fc0c269ebccf75b73f3e391a1259', './modules/Administration/controller.php' => '83da0c6bf53f19c7347e656188f1db7d', './modules/Administration/RepairSeedUsers.php' => 'b9c8937676633e2860b38b3c5ab77f0c', './modules/Administration/RepairJSFile.php' => '43ac52009b5ee4364b2194b7d672d740', - './modules/Administration/RepairIndex.php' => 'cdc4da4fec0cef9a351dec1e7aa75f33', + './modules/Administration/RepairXSS.php' => '2d56fb5ebf47019f684ddc0329d4ffa5', './modules/Administration/RepairIE.php' => '4d2065ceb6ff00779c187de7a38b93b1', './modules/Administration/action_view_map.php' => 'a35695d1f72f0a3750618341ea6f9edb', './modules/Administration/UpgradeHistory.php' => 'c8ad1608fb9e6d3cf345145bf6710cd1', @@ -2897,14 +2899,14 @@ $md5_string = array ( './modules/Administration/Updater.php' => '6245521e1b0c45638d1fd5cfc3fea19b', './modules/Administration/SupportPortal.php' => '03f335144dd32334518d3f0ebf58adbf', './modules/Administration/Menu.php' => '96b575a9cdd9b92b4411aa316f57d1a3', - './modules/Administration/Locale.tpl' => '5c7bf9be0bc69970c4349f57559f086a', + './modules/Administration/RepairIndex.php' => 'cdc4da4fec0cef9a351dec1e7aa75f33', './modules/Administration/RepairFieldCasing.php' => '9ef826eb314c0086f7bb43b40a82276f', './modules/Administration/RepairActivities.php' => '779ab387800bd2acc2fe93a3d0b25e18', './modules/Administration/PasswordManager.php' => '6e3ca5f53adbb0144bf4f053671cf45d', './modules/Administration/ImportCustomFieldStructure.php' => '8f483d883bfa449cce0ca0afe782b6cc', './modules/Administration/Forms.php' => 'fb76fa135d6210b0e25abf6b2f10376d', + './modules/Administration/Locale.tpl' => '5c7bf9be0bc69970c4349f57559f086a', './modules/Administration/ExportCustomFieldStructure.php' => '6f55e973d20ab72b29f0fc74d793ad5b', - './modules/Administration/DstFix.php' => '3c1cfac3316ffc8ebfd4ecda81ca40f0', './modules/Administration/DisplayWarnings.php' => '70d6a5d17f5690de605ec1b11bf75781', './modules/Administration/DiagnosticRun.php' => '9d199a55c9c8a35648c56dfa40dca063', './modules/Administration/DiagnosticDownload.php' => '6e63012b71b1c10d5df812ca6db7d024', @@ -2923,16 +2925,14 @@ $md5_string = array ( './modules/Activities/language/en_us.lang.php' => 'f0765264ac37daf5be6f3097d60831b0', './modules/Activities/config.php' => '050beee64ce92e9d876008db23dcd926', './modules/Activities/SubPanelViewContacts.html' => 'e26da877fe82aac32526eff3bf5e77b7', - './modules/Activities/SubPanelView.php' => '7b656bdde855f8032edcfb640677d7a9', './modules/Activities/SubPanelView.html' => '74afed37ca1d19a2a67307e063b52c4e', './modules/Activities/SetAcceptStatus.php' => '42fcffc8717e7b1cb10001b137400d9e', - './modules/Activities/OpenListView.php' => '7e4b120b80f5d4dcc461ca1bc2e8fc54', - './modules/Activities/OpenListView.html' => '1983c915fc02a41b01459b6923d7a0a5', + './modules/Activities/SubPanelView.php' => '7b656bdde855f8032edcfb640677d7a9', './modules/Activities/Popup_picker.php' => 'c21ed67459a62113293a71f7b6c43611', './modules/Activities/Popup_picker.html' => '82fca068e687dbca227b0b4c8fc69b76', './modules/Activities/Menu.php' => '50ace4d08c7af062a3da92e52e6ebffc', './modules/Activities/Forms.php' => 'd7472639650199c74c40ba981f008c2c', - './modules/Accounts/Account.js' => 'f36d341901d749c3e43e334d5a550f01', + './modules/Accounts/Account.js' => '8a37b6ec182cc03449e40766e763214e', './modules/Accounts/views/view.list.php' => '4feca8fc6bb33f26c90360a36aa0e45f', './modules/Accounts/views/view.detail.php' => 'f9ae2b995b3658a78a2ce5db2135c66b', './modules/Accounts/vardefs.php' => '369286f1a75e7b5e8c3c6afd9e150416', @@ -2958,7 +2958,7 @@ $md5_string = array ( './modules/Accounts/ShowDuplicates.php' => '44ca2d50d7f42db81e0440f17007c376', './modules/Accounts/ShowDuplicates.html' => '1d1e527082993b904ae3debeccb48785', './modules/Accounts/Save.php' => '79d53f9dc54e5481ac25f57e651d0366', - './modules/Accounts/Popup_picker.html' => '40908e43b183e0c27c79e3460eea3f9f', + './modules/Accounts/Popup_picker.html' => 'cebb804e8edd4b8b33a88fa52f7914ab', './modules/Accounts/Menu.php' => '89f567a768fd2d26f5314fc314f4e95e', './modules/Accounts/Dashlets/MyAccountsDashlet/MyAccountsDashlet.php' => '521daaeaa445d3c13900572d4d6b2986', './modules/Accounts/Dashlets/MyAccountsDashlet/MyAccountsDashlet.meta.php' => 'a4224d52da04efaf1c80bf0db8b0ca04', @@ -2966,10 +2966,10 @@ $md5_string = array ( './modules/Accounts/AccountsQuickCreate.php' => 'fbb9c86de48897e1e95aae6201f52941', './modules/Accounts/AccountFormBase.php' => 'a80b0c9ebadf92b1451b2e90fe4d3146', './modules/Accounts/Account.php' => '685f3b6d7de771f7966ff99b40687d67', - './modules/ACLRoles/ACLRoles.js' => '5366ba5c2f0203a5b212682a644020d2', + './modules/ACLRoles/ACLRoles.js' => '2b2b8c4517f3d6a27b71f22d8b37b285', './modules/ACLRoles/views/view.list.php' => 'e40ad40a14a03cf692dd279b9616329a', './modules/ACLRoles/vardefs.php' => 'f500232770683374295c4d6d721dd54c', - './modules/ACLRoles/popup.tpl' => 'c76696fa8c1a9e0a18bfd95964bd34e7', + './modules/ACLRoles/popup.tpl' => '03df13bcc231cac6edde4666779ed34b', './modules/ACLRoles/metadata/subpanels/default.php' => 'ae62c499811f290b3afd519359cb1e84', './modules/ACLRoles/metadata/subpanels/admin.php' => '0bb9a5b1de02786ed38c109b46bfe219', './modules/ACLRoles/metadata/subpaneldefs.php' => 'e77c49ae4040760e69fa70facd3b7990', @@ -2980,7 +2980,7 @@ $md5_string = array ( './modules/ACLRoles/language/en_us.lang.php' => 'd82477be89e3f92da44c614b2b3f6762', './modules/ACLRoles/Save.php' => '499d091264e3f141c1550e168e885f01', './modules/ACLRoles/Popup_picker.php' => '40caf8381d5895522cc4498241e463d9', - './modules/ACLRoles/Popup_picker.html' => '97ba9cc4e5d8112f4b34560ed80af8d7', + './modules/ACLRoles/Popup_picker.html' => '5bfa7c8c179700da0e0e8b80e49fc348', './modules/ACLRoles/Menu.php' => 'aff1c642bf608488e3212b1822e6b464', './modules/ACLRoles/ListUsers.php' => 'c56917db3d56b5500e3610907daa8cd5', './modules/ACLRoles/Forms.php' => 'd41d8cd98f00b204e9800998ecf8427e', @@ -3079,8 +3079,7 @@ $md5_string = array ( './log_file_restricted.html' => 'f20a0bfe3ac44ba88f520fb8203a70e4', './log4php/LoggerManager.php' => 'fa34194306cd50c01b71d8d5060ee362', './leadCapture.php' => '39f9c34cbfb01f585a6c04227823c65f', - './jssource/src_files/include/JSON.js' => '513eb0113124c215e17c1495f8a202dd', - './jssource/src_files/include/MySugar/javascript/MySugar.js' => '3605b4d6038f7de984bd5c21bab6b738', + './jssource/src_files/include/MySugar/javascript/MySugar.js' => '6b09da2f9e4d14e2cd01e93247af99ed', './jssource/src_files/include/SubPanel/SubPanelTiles.js' => 'b65c9d967a27614395b6857edce04539', './jssource/src_files/include/SugarCharts/Jit/FlashCanvas/canvas2png.js' => '4c95a8c2071e0d5b4ae1531a790f1492', './jssource/src_files/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js' => 'c06bd0d01f1daa8ee7c54b83fe33f03a', @@ -3090,295 +3089,792 @@ $md5_string = array ( './jssource/src_files/include/SugarDependentDropdown/javascript/SugarDependentDropdown.js' => '82905de42674faa12e819f99d3db0610', './jssource/src_files/include/SugarEmailAddress/SugarEmailAddress.js' => '80df53c11d7653e87488d48ce49e2b76', './jssource/src_files/include/SugarFields/Fields/Address/SugarFieldAddress.js' => '2e39ad35e6759c407fae5b35b230d34b', - './jssource/src_files/include/SugarFields/Fields/Collection/SugarFieldCollection.js' => '46177c45fd308532d832212baaa64cd3', + './jssource/src_files/include/SugarFields/Fields/Collection/SugarFieldCollection.js' => '99af73a152a0cc58ac14e895ba569fa6', './jssource/src_files/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js' => '7f93acedc02d390800eaad0e5fc22cae', - './jssource/src_files/include/SugarFields/Fields/File/SugarFieldFile.js' => '15df601d523b6e06f6b71220c7ff12bd', + './jssource/src_files/include/SugarFields/Fields/File/SugarFieldFile.js' => '11edcc9ea0960ae5e5e4e1ef20a94ab0', './jssource/src_files/include/connectors/formatters/default/company_detail.js' => 'ac718b13fd22689d7da786dcb0b0380c', './jssource/src_files/include/javascript/cookie.js' => '4edb43519c5ac8c3d9b1b73b9ddf87fb', './jssource/src_files/include/javascript/dashlets.js' => 'c85774c7bcc3568d50e71448dbb371af', './jssource/src_files/include/javascript/include.js' => '4fd5d7da5c00e4c0a9a83b4b65a493f1', - './jssource/src_files/include/javascript/jsclass_async.js' => '0632a49c59876373965538ad59e13c29', - './jssource/src_files/include/javascript/jsclass_base.js' => 'e82c02c75affd50c04a694bed52b239f', + './jssource/src_files/include/javascript/jsclass_async.js' => 'a7c6d57a4fbb59c5ba052d969518e594', + './jssource/src_files/include/javascript/jsclass_base.js' => '73f529e1ed6a9a38d432e30816f87e02', './jssource/src_files/include/javascript/menu.js' => 'a12b42e2406a9b192609258884536efd', './jssource/src_files/include/javascript/overlibmws.js' => '9fb2df046948fb09baf9bf62cf8d7877', './jssource/src_files/include/javascript/overlibmws_iframe.js' => '3714ae1a5be03f1470b30e8920386d14', - './jssource/src_files/include/javascript/popup_helper.js' => '8ddb5ebf0a86ec927be22a8fd9a5568a', + './jssource/src_files/include/javascript/popup_helper.js' => '6f89a69a9d38d451a1d104973785f2ff', './jssource/src_files/include/javascript/popup_parent_helper.js' => 'e7daf641d1691db7dfa7464efab1a706', - './jssource/src_files/include/javascript/quickCompose.js' => 'c87742cdae04b75afc7e59c9e9440d39', + './jssource/src_files/include/javascript/quickCompose.js' => '2ae2e20213ad5341de324c92bb5035d3', './jssource/src_files/include/javascript/quicksearch.js' => '751e98b3b4c21b2585d3d706249c800b', - './jssource/src_files/include/javascript/report_additionals.js' => '3f42310a202ae3779225ff29be91ea3b', - './jssource/src_files/include/javascript/sugar_3.js' => 'ad171414b5b0c2fe2f04dce74e527657', + './jssource/src_files/include/javascript/report_additionals.js' => '134d3cd895ad1e0470f9dd07c7b34ad1', + './jssource/src_files/include/javascript/sugar_3.js' => '34519764fd69c94b894020b8ca32ef75', './jssource/src_files/include/javascript/sugar_connection_event_listener.js' => 'd13aa0b553050db12f7bd6cd5b7b98f9', './jssource/src_files/include/javascript/sugarwidgets/SugarYUILoader.js' => '9237f12850b7ce5c27669480f71152be', - './jssource/src_files/include/javascript/sugarwidgets/SugarYUIWidgets.js' => '7ebb592aa4b8c948b288d85de464ec7e', + './jssource/src_files/include/javascript/sugarwidgets/SugarYUIWidgets.js' => 'eb797deed072e18109821ab136366c49', './jssource/src_files/include/javascript/swfobject.js' => 'a7dc61c4ada3b828e0e09e51f943c6db', './jssource/src_files/include/javascript/yui3/assets/dpSyntaxHighlighter.js' => '9f8e259fd1682f21971db93c2465812a', - './jssource/src_files/include/javascript/yui3/assets/syntax.js' => '3dcb7c2cccb0b8d6eaa0bf2700a14645', - './jssource/src_files/include/javascript/yui3/build/anim/anim-base-min.js' => '5cd35b730551e2f143f8b2aeb3dc43f0', - './jssource/src_files/include/javascript/yui3/build/anim/anim-base.js' => '18155aa48babf0db52f49ef2df3fa355', - './jssource/src_files/include/javascript/yui3/build/anim/anim-color-min.js' => 'faec1c0ed471704a006e95b4865f2a61', - './jssource/src_files/include/javascript/yui3/build/anim/anim-color.js' => 'dbfbd467f74fd9706942a4dcc1798508', - './jssource/src_files/include/javascript/yui3/build/anim/anim-curve-min.js' => '1867dfb160e262228341cc1a7da74d3f', - './jssource/src_files/include/javascript/yui3/build/anim/anim-curve.js' => 'a8fa1f8d3176b2b77228d7324d7e28cc', - './jssource/src_files/include/javascript/yui3/build/anim/anim-easing-min.js' => '3b25c5521f9a0eba5c761b42f1d7c90a', - './jssource/src_files/include/javascript/yui3/build/anim/anim-easing.js' => '1936ddcbb402ea9772b9bffa41e1d85b', - './jssource/src_files/include/javascript/yui3/build/anim/anim-min.js' => '6d754f4c4fee88a77c5939babc20b08d', - './jssource/src_files/include/javascript/yui3/build/anim/anim-node-plugin-min.js' => 'b74864d9fe6ce5bb68002950abb7f4d9', - './jssource/src_files/include/javascript/yui3/build/anim/anim-node-plugin.js' => '0e8bb8913787d98c7dbd6842a783b068', - './jssource/src_files/include/javascript/yui3/build/anim/anim-scroll-min.js' => 'c2e2f8abedb377ad656bf4cb79600a6d', - './jssource/src_files/include/javascript/yui3/build/anim/anim-scroll.js' => '64f2edf606cbd8bdf2763b6321e28801', - './jssource/src_files/include/javascript/yui3/build/anim/anim-xy-min.js' => '6850aba5ef84ad2912ed491e2eae46ce', - './jssource/src_files/include/javascript/yui3/build/anim/anim-xy.js' => '78ca48b8bbe8b917e818def37804b9aa', - './jssource/src_files/include/javascript/yui3/build/anim/anim.js' => '58e7b584e85972b486c9e1d3f0647428', - './jssource/src_files/include/javascript/yui3/build/async-queue/async-queue-min.js' => 'ffd73da1dcddab565bbd50c16873581d', - './jssource/src_files/include/javascript/yui3/build/async-queue/async-queue.js' => '04d2c0f553fff5b53f4b239662c99806', - './jssource/src_files/include/javascript/yui3/build/attribute/attribute-base-min.js' => 'f62e92ea97016fe0125d224eb5ff8272', - './jssource/src_files/include/javascript/yui3/build/attribute/attribute-base.js' => 'd88e857d7401b689cedc605f290d9f96', - './jssource/src_files/include/javascript/yui3/build/attribute/attribute-complex-min.js' => 'ca78452cabfa8a6d001ccb05aa442bf3', - './jssource/src_files/include/javascript/yui3/build/attribute/attribute-complex.js' => '87957b017c75b79ecd9c1f586ab3b621', - './jssource/src_files/include/javascript/yui3/build/attribute/attribute-min.js' => '4b846745a8c917c6885c7c75ce630c45', - './jssource/src_files/include/javascript/yui3/build/attribute/attribute.js' => '39d35aa02bb83866ea2efbfcbeaa3631', - './jssource/src_files/include/javascript/yui3/build/base/base-base-min.js' => 'd3574e77aedcb6d77fe42f65ba82d90c', - './jssource/src_files/include/javascript/yui3/build/base/base-base.js' => '0f3295ad24f08dc27a7774af785a65b8', - './jssource/src_files/include/javascript/yui3/build/base/base-build-min.js' => '477ad185b0b7d00376a84a20b4e8845b', - './jssource/src_files/include/javascript/yui3/build/base/base-build.js' => 'c8dc5087a3d3fb24af6a83efe1ac4a27', - './jssource/src_files/include/javascript/yui3/build/base/base-min.js' => 'ec3f0972e25534ac6d174100f64a9463', - './jssource/src_files/include/javascript/yui3/build/base/base-pluginhost-min.js' => 'c7fece0a58c7e24a82df90083af76d55', - './jssource/src_files/include/javascript/yui3/build/base/base-pluginhost.js' => '3555cba0946209ec58d6c7fa298083eb', - './jssource/src_files/include/javascript/yui3/build/base/base.js' => 'a0726f5ded064913b374a218d52fadb0', - './jssource/src_files/include/javascript/yui3/build/cache/cache-min.js' => '3d336358405079ad391fd1f456239a88', - './jssource/src_files/include/javascript/yui3/build/cache/cache.js' => 'd3ffbda96ddeb5b2eb1643dda354b5cc', - './jssource/src_files/include/javascript/yui3/build/classnamemanager/classnamemanager-min.js' => '9618fe08329cb8ab8858db0457bc7beb', - './jssource/src_files/include/javascript/yui3/build/classnamemanager/classnamemanager.js' => '0d314e7fb9508e153dcddbb6790585f3', - './jssource/src_files/include/javascript/yui3/build/collection/collection-min.js' => 'a42ba321627b043c58d75996416af1d1', - './jssource/src_files/include/javascript/yui3/build/collection/collection.js' => '19c11e1ef14f56a57e32fbd4cd14035c', - './jssource/src_files/include/javascript/yui3/build/compat/compat-min.js' => '8c2cd1bbe7e4641a318f534180683b9f', - './jssource/src_files/include/javascript/yui3/build/compat/compat.js' => '4dab80fb6d64ac22fa3b1ddc7d829970', - './jssource/src_files/include/javascript/yui3/build/console/console-filters-min.js' => '6f81e8637d5241e3859a3843a73de5f7', - './jssource/src_files/include/javascript/yui3/build/console/console-filters.js' => 'bbffa94dca8a3f0bd780537db226438e', - './jssource/src_files/include/javascript/yui3/build/console/console-min.js' => '909d1783e8842e0dcd45e6623066cc66', - './jssource/src_files/include/javascript/yui3/build/console/console.js' => '8ac45ef6432e7d80506570ecbe7aff59', - './jssource/src_files/include/javascript/yui3/build/cookie/cookie-min.js' => '138949f035bc27916e29082e0388d187', - './jssource/src_files/include/javascript/yui3/build/cookie/cookie.js' => '3344f4c1cab1d944cc0d480fd2d06b7c', - './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-array-min.js' => '69031268bd2e02eb1a580107d6e4fa3f', - './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-array.js' => '6f50a80e0a683c75a4eb8bd14771ef5f', - './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-base-min.js' => '1c98550b0a52d7523b8d8a4793a8b8b6', - './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-base.js' => '93a950bbb44e09ad53eca42a0b925872', - './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-json-min.js' => 'a779e5c234d4642ec8edf66ed15ccd34', - './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-json.js' => '14578f749fdffa3242912b0b60c58edd', - './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-min.js' => '9678fbae88ef1ab62804a6dfd1b7735c', - './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-text-min.js' => 'f2a605ce4c79fcfd4c17776a65ffb6e4', - './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-text.js' => '35c103827e2aa0c7c2449300c9153c4c', - './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-xml-min.js' => '8be1c2da27fee8c14f9a727e83365252', - './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-xml.js' => 'd32406b650edfb570bdf9e7f9207bc57', - './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema.js' => 'fb1cf323354ac9963cec4dc7b38c9051', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-arrayschema-min.js' => 'f1f52de48b844a3bb82b2599beb32a9e', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-arrayschema.js' => 'd1b1d57aeabf70cf99f55c7c5a1660a8', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-cache-min.js' => '2aaf531204f8be7cd34254f79979b522', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-cache.js' => '137a174c1d2a2aa30eead39bfed62303', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-function-min.js' => 'ca1c83fd7d2878cfc403571e4900b66f', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-function.js' => '0b3c1a9cf7fa787752b6e127aa7b54e0', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-get-min.js' => '0bd20dcfc0b4cda1b603f64d48a393ac', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-get.js' => 'b55289d7ffc274e4a8186b60fcf29df1', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-io-min.js' => '32d0bd2aa6343f731573ae3dc7f27216', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-io.js' => '1eb4521e16ed47a09f4b1b09f39aee5f', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-jsonschema-min.js' => '128f90bd4e596a1684555d1efef42206', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-jsonschema.js' => 'cf391fbe5cb2f7045b181dae657e80cc', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-local-min.js' => '92065f142e10742bac58ef4e7e2bff81', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-local.js' => 'dce1f44b2c2b6956749fe77e03d7fc95', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-min.js' => 'c7cbbcb655a90fbc60cb37963e30d1d8', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-polling-min.js' => '7190cb146692fd7dcfab60e9dd741964', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-polling.js' => '5b564a1d5b9c1d32a8da581083ad48ae', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-textschema-min.js' => '88f44a6a3e9a27abb14e15c30f2f87af', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-textschema.js' => '625a4210d8f4a98dcfe4925acfb7a476', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-xmlschema-min.js' => '79d203f0961fba519b55abb1c25643ad', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource-xmlschema.js' => '400580b0f55aeeb56b68901a3ef74db5', - './jssource/src_files/include/javascript/yui3/build/datasource/datasource.js' => '643d0b46d35a2c005c65f416adce84ad', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype-date-format-min.js' => 'd3fe986624bef00a9a86b4ebe3edacd9', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype-date-format.js' => '4ada5cec6d940400dc29c9314154fa39', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype-date-min.js' => '1cb868ef524784e77410177dedd757d4', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype-date-parse-min.js' => 'f63578c4a13a7d84f67a205e0e1f99cb', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype-date-parse.js' => '0e5e71d81afa0ca4d2f4bd85a28464b0', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype-date.js' => 'fa2fecc54e9316cbc6a4963cccd1d2fc', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype-min.js' => '75f35499ef8780e116e938d20c2e9079', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype-number-format-min.js' => 'e49e62c36cbdc8b8c72a69c01ac48a12', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype-number-format.js' => 'c53b2d6afcb2b8c6f2f756cc5e9f7078', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype-number-min.js' => 'dfe5cb43cf7af2029d7d505829fd84d4', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype-number-parse-min.js' => '186fe53982cf5aba044c145d80c2867e', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype-number-parse.js' => 'e08c5f42a825d5da46e0d9f81afe078b', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype-number.js' => '02638e9474f696e9ce67be34df9916ea', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype-xml-format-min.js' => 'f4169b2bfb1999706dcf27a318e37724', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype-xml-format.js' => '8fb5d6f4700e05ed35f1f0adae94f59c', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype-xml-min.js' => '86b666d7dba4c6e507737619f40a1e84', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype-xml-parse-min.js' => '15ff7616eee27f39f16c442bafc797cf', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype-xml-parse.js' => 'e381b39554519005af7735336711fd6c', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype-xml.js' => '9f973a51339581182cf415a43dc0bd8e', - './jssource/src_files/include/javascript/yui3/build/datatype/datatype.js' => 'd6b74d0063e70bd61f94ebc5e88a9cfe', - './jssource/src_files/include/javascript/yui3/build/dd/dd-constrain-min.js' => '16c59fa7174b49d467bdb9258e6abc45', - './jssource/src_files/include/javascript/yui3/build/dd/dd-constrain.js' => '55f2690d7ad3cd4887efc7603d1ed871', - './jssource/src_files/include/javascript/yui3/build/dd/dd-ddm-base-min.js' => '7415c15fa8289ca08efd42c7befc2b2d', - './jssource/src_files/include/javascript/yui3/build/dd/dd-ddm-base.js' => '6affa269ba6a632a0de33e2b0f165786', - './jssource/src_files/include/javascript/yui3/build/dd/dd-ddm-drop-min.js' => '7a396b76f4ad26c47ce7043f03cd09f1', - './jssource/src_files/include/javascript/yui3/build/dd/dd-ddm-drop.js' => '6da4459840d66f7a800b981531d398fa', - './jssource/src_files/include/javascript/yui3/build/dd/dd-ddm-min.js' => 'e26291c55920472473f007de55414040', - './jssource/src_files/include/javascript/yui3/build/dd/dd-ddm.js' => '14f5bb96096d9cae1aae54e12ce9bc9c', - './jssource/src_files/include/javascript/yui3/build/dd/dd-drag-min.js' => '3a69676605e4b1ca934bef31c0e2a1a0', - './jssource/src_files/include/javascript/yui3/build/dd/dd-drag.js' => 'c13d52831074aa270dfb2568bceb64f2', - './jssource/src_files/include/javascript/yui3/build/dd/dd-drop-min.js' => '1c6f5bff30addd2fdd52453887710d5e', - './jssource/src_files/include/javascript/yui3/build/dd/dd-drop-plugin-min.js' => '37ee9d8832740430d8a59c3c9580c36f', - './jssource/src_files/include/javascript/yui3/build/dd/dd-drop-plugin.js' => 'df088492b3aa8526f836f4fabd5e8886', - './jssource/src_files/include/javascript/yui3/build/dd/dd-drop.js' => 'c9cf6631655ffd33a0f4f799dfcec08d', - './jssource/src_files/include/javascript/yui3/build/dd/dd-min.js' => '4928b5e84cdb8cb9e4db74242536de93', - './jssource/src_files/include/javascript/yui3/build/dd/dd-plugin-min.js' => '8a6843fc23fb0236c7bc149da7cd4a7e', - './jssource/src_files/include/javascript/yui3/build/dd/dd-plugin.js' => '3e377fe4cdcfba84863246ec64eead6a', - './jssource/src_files/include/javascript/yui3/build/dd/dd-proxy-min.js' => '58718da0577fbaac45f29bc1dc5598fe', - './jssource/src_files/include/javascript/yui3/build/dd/dd-proxy.js' => '08d6db9329dc183e9ab3862eef222cff', - './jssource/src_files/include/javascript/yui3/build/dd/dd-scroll-min.js' => '8b090928f1a78df880fa07be309f06b4', - './jssource/src_files/include/javascript/yui3/build/dd/dd-scroll.js' => '511f2cfccf52fb287f3d77b860f86a4e', - './jssource/src_files/include/javascript/yui3/build/dd/dd.js' => '98b8dc6b71ab1ecf70d178408c838339', - './jssource/src_files/include/javascript/yui3/build/dom/dom-base-min.js' => 'af6d5a8b6932e73a1898b46e9a49c34e', - './jssource/src_files/include/javascript/yui3/build/dom/dom-base.js' => 'ff2ddc03dfca759433dab25e52dcc756', - './jssource/src_files/include/javascript/yui3/build/dom/dom-min.js' => 'ac34ca5cb5df6256359b5e8c96bc3d35', - './jssource/src_files/include/javascript/yui3/build/dom/dom.js' => '973e38e8aa8d341262f11170fd71c572', - './jssource/src_files/include/javascript/yui3/build/dom/dom-screen-min.js' => 'd48e1e218269e223538aa6c55213449e', - './jssource/src_files/include/javascript/yui3/build/dom/dom-screen.js' => 'ad227284062ab1ff108be855dc9dd92d', - './jssource/src_files/include/javascript/yui3/build/dom/dom-style-min.js' => 'b2d4524328a6fe2c92447902e7245854', - './jssource/src_files/include/javascript/yui3/build/dom/dom-style.js' => '46499a455dcab9bfe96b744e72a05a36', - './jssource/src_files/include/javascript/yui3/build/dom/selector.js' => '46e7510a714f115ae38df8acf5afd8e2', - './jssource/src_files/include/javascript/yui3/build/dom/selector-css2-min.js' => 'ecfafbd6551dafd6889d74270e09cc15', - './jssource/src_files/include/javascript/yui3/build/dom/selector-css2.js' => '15cb5d0f8af3670c6d9fa52dbc0394b3', - './jssource/src_files/include/javascript/yui3/build/dom/selector-css3-min.js' => '1636b87c8be9baa58b3e29fcf911f8f3', - './jssource/src_files/include/javascript/yui3/build/dom/selector-css3.js' => '8aa951fc273ef8cf3559d5ff23aec74d', - './jssource/src_files/include/javascript/yui3/build/dom/selector-min.js' => 'd985864d04368bf3a0a2ab926d7cc6e5', - './jssource/src_files/include/javascript/yui3/build/dom/selector-native-min.js' => 'f2c02fb0e7bc3aef48dbd38618a1296f', - './jssource/src_files/include/javascript/yui3/build/dom/selector-native.js' => '2f48d39b9cfbcc94a152493c95d691e7', - './jssource/src_files/include/javascript/yui3/build/dump/dump-min.js' => '8931348bb06babc4b466c52053f20763', - './jssource/src_files/include/javascript/yui3/build/dump/dump.js' => '1ffbaba6c42a7d8051c419e5304c2248', - './jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-base-min.js' => '409f4cf4d5ea4881f88228715de9e1a4', - './jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-base.js' => '0d5d16aeba48c23e7c5986fab181761f', - './jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-complex-min.js' => '6d360c63f782bf22e97025ffc8bb4e50', - './jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-complex.js' => 'e14a79e33d4d78bb00c6d7bac0bc20df', - './jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-min.js' => 'd86742304c0b2c5d551cc30a2f30def4', - './jssource/src_files/include/javascript/yui3/build/event-custom/event-custom.js' => '65f477457358d76b42bb7463357d42d4', - './jssource/src_files/include/javascript/yui3/build/event-simulate/event-simulate-min.js' => 'f1b5f16529537e2931e95e0d6dfa5e1e', - './jssource/src_files/include/javascript/yui3/build/event-simulate/event-simulate.js' => '3bafb16813ddf414f80fc898dfb0cfc1', - './jssource/src_files/include/javascript/yui3/build/event/event-base-min.js' => '52c133eedcd782428299dd98b96850b6', - './jssource/src_files/include/javascript/yui3/build/event/event-base.js' => '98952d7c2486e19f428bdd35922886ec', - './jssource/src_files/include/javascript/yui3/build/event/event-delegate-min.js' => 'e775d7a6ce602d63537a6492f7c9639b', - './jssource/src_files/include/javascript/yui3/build/event/event-delegate.js' => '633b634152c8e0017109ef8070aa321d', - './jssource/src_files/include/javascript/yui3/build/event/event-focus-min.js' => 'd421b02d12c98a5ece975dcec6bc5673', - './jssource/src_files/include/javascript/yui3/build/event/event-focus.js' => '1b2e6919bf0d0c7f73952898baf1db5f', - './jssource/src_files/include/javascript/yui3/build/event/event-key-min.js' => '14b3c30e812ba583952da0f54fa0a72a', - './jssource/src_files/include/javascript/yui3/build/event/event-key.js' => '5b11552a5699e40a7ea7a26ad6153a34', - './jssource/src_files/include/javascript/yui3/build/event/event-min.js' => 'bf7dd7b1b59bf79616197332a24e10b9', - './jssource/src_files/include/javascript/yui3/build/event/event-mouseenter-min.js' => '8c0a6e0e9d7990792faefbf1792fb26f', - './jssource/src_files/include/javascript/yui3/build/event/event-mouseenter.js' => 'a9efbd15212583e8c493f746e3d8b7fb', - './jssource/src_files/include/javascript/yui3/build/event/event-mousewheel-min.js' => 'a905b66143ea8ff6a40fce21415ca815', - './jssource/src_files/include/javascript/yui3/build/event/event-mousewheel.js' => '7ae089ca40cd2a2fc2896a99b9448e79', - './jssource/src_files/include/javascript/yui3/build/event/event-resize-min.js' => '35ac1a26f54703c42b3a5f2a941064a6', - './jssource/src_files/include/javascript/yui3/build/event/event-resize.js' => '8169feb99c34ee02acaf40539ca6e34c', - './jssource/src_files/include/javascript/yui3/build/event/event.js' => 'eee21c85b735076d77f7c1cdbdae6f9d', - './jssource/src_files/include/javascript/yui3/build/get/get-min.js' => 'f34507a2bb860f2e50526f9ccbd4bb7a', - './jssource/src_files/include/javascript/yui3/build/get/get.js' => 'e4816a57e845571bb96178b460a7f45f', - './jssource/src_files/include/javascript/yui3/build/history/history-min.js' => '15c4fc68c7b3a987e08a0bd904aef254', - './jssource/src_files/include/javascript/yui3/build/history/history.js' => '8e279fc9ba70f25d70dd9e44745fcf81', - './jssource/src_files/include/javascript/yui3/build/imageloader/imageloader-min.js' => '8b012dc064ae76119d25c564df0368ab', - './jssource/src_files/include/javascript/yui3/build/imageloader/imageloader.js' => '542f1e7f66cf56b09eb1e64dbfdeb2fe', - './jssource/src_files/include/javascript/yui3/build/io/io-base-min.js' => 'd38b67f618736d205f44482a661dfa2b', - './jssource/src_files/include/javascript/yui3/build/io/io-base.js' => '6df56770995472c20366072e46b3afe6', - './jssource/src_files/include/javascript/yui3/build/io/io-form-min.js' => 'ab2cdbf1e0939a0cb137aac241e44914', - './jssource/src_files/include/javascript/yui3/build/io/io-form.js' => 'ec9e4743ddb4c80070960e00c03d56bb', - './jssource/src_files/include/javascript/yui3/build/io/io-min.js' => '9ebc7d9ae14077fd9fe272cca55a7f04', - './jssource/src_files/include/javascript/yui3/build/io/io-queue-min.js' => '793809982910a9f006317dec0d77b0a9', - './jssource/src_files/include/javascript/yui3/build/io/io-queue.js' => '3f932ebb72f8c3988385a8474b6dd71a', - './jssource/src_files/include/javascript/yui3/build/io/io-upload-iframe-min.js' => 'd74e63c9dca71dd9122bc24e56e62147', - './jssource/src_files/include/javascript/yui3/build/io/io-upload-iframe.js' => 'fd4cdaf2809d13ddd336e83cef2de7b1', - './jssource/src_files/include/javascript/yui3/build/io/io-xdr-min.js' => 'cf66f503d2555d8aafaff5f22a932e4b', - './jssource/src_files/include/javascript/yui3/build/io/io-xdr.js' => 'f5e4471349f4015e9a7d93a7352950aa', - './jssource/src_files/include/javascript/yui3/build/io/io.js' => '60422e16edb10cc8f6eea0f50a658637', - './jssource/src_files/include/javascript/yui3/build/json/json-min.js' => 'c629bd6ed7f71360a35926dcc5ae45f3', - './jssource/src_files/include/javascript/yui3/build/json/json-parse-min.js' => 'f9742cbeb6728545f0ff1eb5dd044a32', - './jssource/src_files/include/javascript/yui3/build/json/json-parse.js' => '0968fe85a68300b8aae1268028f561f1', - './jssource/src_files/include/javascript/yui3/build/json/json-stringify-min.js' => 'a81e72a3b3da8187c23a5960e67ec482', - './jssource/src_files/include/javascript/yui3/build/json/json-stringify.js' => '8c292082b315d80fed6a77be57f64371', - './jssource/src_files/include/javascript/yui3/build/json/json.js' => 'ac0fd97c8584d1f0c10114bb4657a58c', - './jssource/src_files/include/javascript/yui3/build/loader/loader-min.js' => 'e2ecdba3f8f4db3029edbbea9cb1ef14', - './jssource/src_files/include/javascript/yui3/build/loader/loader.js' => '70918ebfcfb2489d0e6ce7f9c2efa8a4', - './jssource/src_files/include/javascript/yui3/build/node-focusmanager/node-focusmanager-min.js' => '5828f08b2bce3e1349333d5669ba7484', - './jssource/src_files/include/javascript/yui3/build/node-focusmanager/node-focusmanager.js' => '5e753c5afea81d073780dce8c63efa3c', - './jssource/src_files/include/javascript/yui3/build/node-menunav/node-menunav-min.js' => '5201169bdaf00dce96a2ecf52c3b9bf9', - './jssource/src_files/include/javascript/yui3/build/node-menunav/node-menunav.js' => 'f6bd7cdac5f5b3bb9c7fa3712ad180a7', - './jssource/src_files/include/javascript/yui3/build/node/node-aria-min.js' => '8c0d9db1e9928a89b162e19b44355257', - './jssource/src_files/include/javascript/yui3/build/node/node-base-min.js' => '573bf8f8667da0182b4a16b585086d12', - './jssource/src_files/include/javascript/yui3/build/node/node-base.js' => '510f173b3b7800a5b49b2fc0a2c3cbdf', - './jssource/src_files/include/javascript/yui3/build/node/node-event-delegate-min.js' => '3a77c1605b375845f04fd06d9ad0d90e', - './jssource/src_files/include/javascript/yui3/build/node/node-event-delegate.js' => '6c4f82d611504925defcc97c9abeff52', - './jssource/src_files/include/javascript/yui3/build/node/node-aria.js' => 'f180186d04eb58df60bc72fac66a86cd', - './jssource/src_files/include/javascript/yui3/build/node/node.js' => '5e613289d3bff3db17fb7407e48110bb', - './jssource/src_files/include/javascript/yui3/build/node/node-event-simulate-min.js' => 'c303f12d80efb16c109031b9518117ab', - './jssource/src_files/include/javascript/yui3/build/node/node-event-simulate.js' => '4aaeff9a2f60add686bd4a377fc1cc69', - './jssource/src_files/include/javascript/yui3/build/node/node-min.js' => 'ab40f9701022b3c69a536398278873d8', - './jssource/src_files/include/javascript/yui3/build/node/node-pluginhost-min.js' => '783096e27985e7a9ba27fce6542bb2f4', - './jssource/src_files/include/javascript/yui3/build/node/node-pluginhost.js' => '70466040ac0f1d2e555b39159bac0ac0', - './jssource/src_files/include/javascript/yui3/build/node/node-screen-min.js' => 'f20aee7885b1d94e3365b8da1c5d13d1', - './jssource/src_files/include/javascript/yui3/build/node/node-screen.js' => '471e3f6ca4e99a5f40c7b4b170fbc42e', - './jssource/src_files/include/javascript/yui3/build/node/node-style-min.js' => 'fdcab2a7ec731d1a4696ea4a6a80041f', - './jssource/src_files/include/javascript/yui3/build/node/node-style.js' => '14ad213d86f086af91f3fc1c04b8958e', - './jssource/src_files/include/javascript/yui3/build/oop/oop-min.js' => '1cd195757d9bdf889ba954efb0e9dc60', - './jssource/src_files/include/javascript/yui3/build/oop/oop.js' => 'db6972479283899df4a6a069dd02f331', - './jssource/src_files/include/javascript/yui3/build/overlay/overlay-min.js' => '338aa25cc08c1810f943caa1fdee0b78', - './jssource/src_files/include/javascript/yui3/build/overlay/overlay.js' => 'd7ff4cda4b1ccd4218717d7cd53972be', - './jssource/src_files/include/javascript/yui3/build/plugin/plugin-min.js' => '69f7fea872c4a77090b92ca3356300c6', - './jssource/src_files/include/javascript/yui3/build/plugin/plugin.js' => '7840fcc0b1e5d47f9e8251388ddf8b7c', - './jssource/src_files/include/javascript/yui3/build/pluginhost/pluginhost-min.js' => '35b7c91eb9020cae7792aed0eb9f2830', - './jssource/src_files/include/javascript/yui3/build/pluginhost/pluginhost.js' => '5ae0acc449941efdfc3737a533221077', - './jssource/src_files/include/javascript/yui3/build/profiler/profiler-min.js' => '2f479e3c711a7481fccd7acda1fa1291', - './jssource/src_files/include/javascript/yui3/build/profiler/profiler.js' => '4ef3fe8390933622310743dad9a2e08f', - './jssource/src_files/include/javascript/yui3/build/queue-promote/queue-promote-min.js' => '0461b7b91829eb19e16737b6459f63f2', - './jssource/src_files/include/javascript/yui3/build/queue-promote/queue-promote.js' => '89593256adf72d55aaaf1b035b43ef27', - './jssource/src_files/include/javascript/yui3/build/slider/slider-min.js' => 'cf1e617aaa120f8bf3104d523986b516', - './jssource/src_files/include/javascript/yui3/build/slider/slider.js' => '520f158df9280140d44a644612c5fcd6', - './jssource/src_files/include/javascript/yui3/build/stylesheet/stylesheet-min.js' => '9d6162ed02bd3a25321f4423faaad1ae', - './jssource/src_files/include/javascript/yui3/build/stylesheet/stylesheet.js' => '77929f4ace234fbfa1f5af5b73b1a5d3', - './jssource/src_files/include/javascript/yui3/build/substitute/substitute-min.js' => 'b4373237b784afac69d9b3cd5d5876f5', - './jssource/src_files/include/javascript/yui3/build/substitute/substitute.js' => '8d218c1788e5aa21cad2b17ce2f2c222', - './jssource/src_files/include/javascript/yui3/build/test/test-min.js' => 'a4a4307e711084d0ec4da53f415e3a29', - './jssource/src_files/include/javascript/yui3/build/test/test.js' => '0d4ba61680d004993d270cf7722435b2', - './jssource/src_files/include/javascript/yui3/build/widget/widget-min.js' => 'b47d518383d791d39fba9b113fa253de', - './jssource/src_files/include/javascript/yui3/build/widget/widget-position-min.js' => '18248af08d2b1d68ddcc17efe70db0a4', - './jssource/src_files/include/javascript/yui3/build/widget/widget-position.js' => '4f26a65e718507a95947ff9dc5972001', - './jssource/src_files/include/javascript/yui3/build/widget/widget-stack-min.js' => '3ca2decac01d64839c3d37f0897baacd', - './jssource/src_files/include/javascript/yui3/build/widget/widget.js' => '20fc302af794947681dc47bebfb8ec36', - './jssource/src_files/include/javascript/yui3/build/widget/widget-stack.js' => 'c43e23543ef86e1e664dfa0963ee1559', - './jssource/src_files/include/javascript/yui3/build/widget/widget-stdmod-min.js' => 'ccd562ecdaea4be08befaaa7c0c2f907', - './jssource/src_files/include/javascript/yui3/build/widget/widget-stdmod.js' => '888c93b81457f03144ea8f74bfba4c2b', - './jssource/src_files/include/javascript/yui3/build/widget/widget-position-ext-min.js' => '52ab08bb21e9455cafbc4d3b9ff80c64', - './jssource/src_files/include/javascript/yui3/build/widget/widget-position-ext.js' => '16dadc8a3116d32fc08d6adf1363c4e9', - './jssource/src_files/include/javascript/yui3/build/yui-base/yui-base-min.js' => '4019801f562a2a976013c444c30b0875', - './jssource/src_files/include/javascript/yui3/build/yui-base/yui-base.js' => 'cb71cfade0802cf74b6dd1a6d8c4b5a7', - './jssource/src_files/include/javascript/yui3/build/yui/get-min.js' => 'f34507a2bb860f2e50526f9ccbd4bb7a', - './jssource/src_files/include/javascript/yui3/build/yui/get.js' => 'e4816a57e845571bb96178b460a7f45f', - './jssource/src_files/include/javascript/yui3/build/yui/yui-base-min.js' => 'd7bfae9ab4e40960f9c0c59b1ab9fc6f', - './jssource/src_files/include/javascript/yui3/build/yui/yui-base.js' => '4dda10770e6c51f085198b811bbdb9d5', - './jssource/src_files/include/javascript/yui3/build/yui/yui-later-min.js' => '752d639c7bcbdcb75804d739fab44d38', - './jssource/src_files/include/javascript/yui3/build/yui/yui-later.js' => '0c95fe70b5182558001aaa0c60404960', - './jssource/src_files/include/javascript/yui3/build/yui/yui-log-min.js' => '9ff98f2c7ba8d79c8abf702a36191e24', - './jssource/src_files/include/javascript/yui3/build/yui/yui-log.js' => '22c5382de3ed58bda76dccc819529f0e', - './jssource/src_files/include/javascript/yui3/build/yui/yui-min.js' => '79d543e9fe1ef95df39f721d4a1d23a9', - './jssource/src_files/include/javascript/yui3/build/yui/yui.js' => '934ea2f120407922bc5631d51f90120c', - './jssource/src_files/include/javascript/calendar.js' => 'c719be14d8dc12825387daa6d1dc0836', + './jssource/src_files/include/javascript/yui3/assets/syntax.js' => '4099ad678b4ce516afa04ba6b112a568', + './jssource/src_files/include/javascript/yui3/build/anim/anim-base-min.js' => '6d538bd720e4e2fd02c88cd3e4d40b80', + './jssource/src_files/include/javascript/yui3/build/anim/anim-base.js' => 'a6319cdb21d974f12ef244452cec18f0', + './jssource/src_files/include/javascript/yui3/build/anim/anim-color-min.js' => '06e7a9c83049f81368d0951e5004984a', + './jssource/src_files/include/javascript/yui3/build/anim/anim-color.js' => '5a6e208ff417cd8bacb93e85ec16e3c8', + './jssource/src_files/include/javascript/yui3/build/anim/anim-curve-min.js' => '785aa518fd40b7ff4d8ebf3c560e7039', + './jssource/src_files/include/javascript/yui3/build/anim/anim-curve.js' => '0402ef0ca751daa33c197f0e981b7cd3', + './jssource/src_files/include/javascript/yui3/build/anim/anim-easing-min.js' => '78f26f6ff0edee16a3f05627f26dd3b2', + './jssource/src_files/include/javascript/yui3/build/anim/anim-easing.js' => '063cde92f4962676221f61e05a53c6ab', + './jssource/src_files/include/javascript/yui3/build/anim/anim-min.js' => 'fbdae4820bfd06a1e125a725d9e2f942', + './jssource/src_files/include/javascript/yui3/build/anim/anim-node-plugin-min.js' => 'c065d200653551c2faaceb45bc6cbcb7', + './jssource/src_files/include/javascript/yui3/build/anim/anim-node-plugin.js' => '6226934aefb6aa6379f8676e6236067e', + './jssource/src_files/include/javascript/yui3/build/anim/anim-scroll-min.js' => 'ff35774cc2072ac72bc33f540ed140af', + './jssource/src_files/include/javascript/yui3/build/anim/anim-scroll.js' => '8e5779f9a083b3849d589d59c76c73e3', + './jssource/src_files/include/javascript/yui3/build/anim/anim-xy-min.js' => '31bf621d3c06ba1a9e19675bdad8bce8', + './jssource/src_files/include/javascript/yui3/build/anim/anim-xy.js' => '2a4dcea5f37ddf237d70de1b45e3aa99', + './jssource/src_files/include/javascript/yui3/build/anim/anim.js' => 'ea89def18c5a203b0e5156083286183e', + './jssource/src_files/include/javascript/yui3/build/async-queue/async-queue-min.js' => '007c65e9287b5f2bda1f77e2cebac811', + './jssource/src_files/include/javascript/yui3/build/async-queue/async-queue.js' => '083276f1cf7f2cd17954f5483f34f22e', + './jssource/src_files/include/javascript/yui3/build/attribute/attribute-base-min.js' => '5ee324344152811f842656eda212b9ed', + './jssource/src_files/include/javascript/yui3/build/attribute/attribute-base.js' => 'a7d42b722c23b62e40d6f85ee8eea947', + './jssource/src_files/include/javascript/yui3/build/attribute/attribute-complex-min.js' => '2b99c0a44c88e756f5500ce0f19e3205', + './jssource/src_files/include/javascript/yui3/build/attribute/attribute-complex.js' => '4a51849ad529006434f8d3e98e07f72b', + './jssource/src_files/include/javascript/yui3/build/attribute/attribute-min.js' => '12f13ca2c3ef2def0f743302a15cbf0d', + './jssource/src_files/include/javascript/yui3/build/attribute/attribute.js' => 'f1f3acb15e7621b7ed44e5290032618a', + './jssource/src_files/include/javascript/yui3/build/base/base-base-min.js' => 'a80675429dd63e2c896942d001a3dd33', + './jssource/src_files/include/javascript/yui3/build/base/base-base.js' => 'bbfd291f0a56c99d2c0550d706bfb17e', + './jssource/src_files/include/javascript/yui3/build/base/base-build-min.js' => '7bc5a461febbf1d01bc706043ff212a3', + './jssource/src_files/include/javascript/yui3/build/base/base-build.js' => '9dc877585177e7d59b0f5efeea9b08de', + './jssource/src_files/include/javascript/yui3/build/base/base-min.js' => 'f1db86a2ba7165ef33dc50494113e56f', + './jssource/src_files/include/javascript/yui3/build/base/base-pluginhost-min.js' => 'bcd7599885a824abe828881b29d2935c', + './jssource/src_files/include/javascript/yui3/build/base/base-pluginhost.js' => 'c9f59b75fb1576a3e86601a54ab15642', + './jssource/src_files/include/javascript/yui3/build/base/base.js' => 'ab1582245082cf35eb9d0f877a8e9b6b', + './jssource/src_files/include/javascript/yui3/build/cache/cache-base.js' => '7faf53cec8e389f3571e30ff4bbae9a7', + './jssource/src_files/include/javascript/yui3/build/cache/cache-min.js' => '14f90925601a9b1ffa466eafff99396a', + './jssource/src_files/include/javascript/yui3/build/cache/cache.js' => '1245952f5374f16fa549c8030396eb77', + './jssource/src_files/include/javascript/yui3/build/cache/cache-base-min.js' => '9a8eb55f3e3c0150f7147bad373376f8', + './jssource/src_files/include/javascript/yui3/build/cache/cache-offline-min.js' => '16bd241fafab343271a95fdf3a7d62df', + './jssource/src_files/include/javascript/yui3/build/cache/cache-offline.js' => '78fcdbf0ba33885ad2d337977662f564', + './jssource/src_files/include/javascript/yui3/build/cache/cache-plugin-min.js' => '50f99bd0b987cdd5019451f4d403ef05', + './jssource/src_files/include/javascript/yui3/build/cache/cache-plugin.js' => 'aa17ce6345b3f2878573224e16b58d9d', + './jssource/src_files/include/javascript/yui3/build/classnamemanager/classnamemanager-min.js' => '90144a76a64db3afdd78427931d666b6', + './jssource/src_files/include/javascript/yui3/build/classnamemanager/classnamemanager.js' => 'b205d87cc557b170385c518be61da6af', + './jssource/src_files/include/javascript/yui3/build/collection/array-extras-min.js' => '44b583a8d42ad775d40ad69f98a777f3', + './jssource/src_files/include/javascript/yui3/build/collection/collection-min.js' => 'b5853da0d9c8703e67d9a383df145e9f', + './jssource/src_files/include/javascript/yui3/build/collection/collection.js' => '0cc0e96623dda96495247fcd929c41e8', + './jssource/src_files/include/javascript/yui3/build/collection/array-extras.js' => '9f4b94a30f13e1e66ae5946e3130a010', + './jssource/src_files/include/javascript/yui3/build/collection/array-invoke-min.js' => 'cac6be5169366ddd3feecdf13bd4e5e4', + './jssource/src_files/include/javascript/yui3/build/collection/array-invoke.js' => '71ec41f6e62a820fe798b80066684e0c', + './jssource/src_files/include/javascript/yui3/build/collection/arraylist-add-min.js' => '876710c87b5de8282b52d0857b6fab3e', + './jssource/src_files/include/javascript/yui3/build/collection/arraylist-add.js' => '2fb48f38f793d7ac1f7a465ce0f44384', + './jssource/src_files/include/javascript/yui3/build/collection/arraylist-filter-min.js' => 'a5e26ccc0a9fe07caf872aa8f75f8811', + './jssource/src_files/include/javascript/yui3/build/collection/arraylist-filter.js' => 'bf8272aa2e796724b967cd20f74570a7', + './jssource/src_files/include/javascript/yui3/build/collection/arraylist-min.js' => 'd8f2f98ca8b25f79f42ad6598bfe0fac', + './jssource/src_files/include/javascript/yui3/build/collection/arraylist.js' => '72c9aeb75571d85a64a42a958acdc1b9', + './jssource/src_files/include/javascript/yui3/build/compat/compat-min.js' => '0443aba1561892ff8ba427d027191490', + './jssource/src_files/include/javascript/yui3/build/compat/compat.js' => '56740dbbc3f6bef79ce19dfa699f616e', + './jssource/src_files/include/javascript/yui3/build/console/console-filters-min.js' => 'f83377570bdf4b8064277f581ee499e4', + './jssource/src_files/include/javascript/yui3/build/console/console-filters.js' => '03767844f7e304c78d5959b966e4be6f', + './jssource/src_files/include/javascript/yui3/build/console/console-min.js' => '02f6064e78653c05ce2a3d4bcd4d1b98', + './jssource/src_files/include/javascript/yui3/build/console/console.js' => 'a316713ba413711c9db8b9f2f6c5a750', + './jssource/src_files/include/javascript/yui3/build/console/lang/console.js' => 'aa41a9cdf3aa11826c637d0e76638989', + './jssource/src_files/include/javascript/yui3/build/console/lang/console_en.js' => '3b06a24f583170224ced0d0ce8a09d90', + './jssource/src_files/include/javascript/yui3/build/console/lang/console_es.js' => '4edd4eba382ec8733ca4349ac523c5a2', + './jssource/src_files/include/javascript/yui3/build/cookie/cookie-min.js' => '463b9e173a386ba693a54ea9ddf57dac', + './jssource/src_files/include/javascript/yui3/build/cookie/cookie.js' => '5cc670450f369472f8f48db2a9b473ae', + './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-array-min.js' => '313570e9688b05154ecd8457b311aae9', + './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-array.js' => '4c690f317f72e1425a0ff07bd6cc6247', + './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-base-min.js' => 'e4da60bab3515781e0295ab94baf5bf8', + './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-base.js' => '1e413a035051a6b497c4f33e2eb5e264', + './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-json-min.js' => '26b2574116e7f6f9e105927bef5fc9b3', + './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-json.js' => '873ec13ee54becbcce1bfee6a70dae21', + './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-min.js' => '8a5e9317dc48c11f4cf93e21210452a5', + './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-text-min.js' => '174e5569a17675116e35e067748359b9', + './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-text.js' => 'ed8edc4a289b03a1b85a20e75e3ae95f', + './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-xml-min.js' => '44cfa168fc617846f26bcdddd79c3b75', + './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema-xml.js' => '300a4d650df436d6bb9dc078e85d9389', + './jssource/src_files/include/javascript/yui3/build/dataschema/dataschema.js' => 'e830c3566de444c39e17a14e0e833747', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-arrayschema-min.js' => '90bb6d463f75967b4d53def71e42b228', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-arrayschema.js' => '59ecf34837925e893d00ab44a2b9ec31', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-cache-min.js' => '54fcf09d6da1e8c075f5aebd6c2022c8', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-cache.js' => '8ac62fe46996cb6bb65a0229b9728d5b', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-function-min.js' => 'd916d4999245dd37619905fcc5579312', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-function.js' => '5bdf8301b711ae6a2282f34a4d3ae9b8', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-get-min.js' => 'ff7050aafdb2e508a87c6a4b97bfb47a', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-get.js' => '3076bf4eb92d694fd611569aaa3b48cc', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-io-min.js' => '673bb160c000fc44ed5d74c2c68c4ec9', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-io.js' => 'bc5537bb8f6b4af3c1cadbe7b2c76a40', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-jsonschema-min.js' => '3d014c703783bf9bddf5b8536da51b16', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-jsonschema.js' => 'cfa4a055c4a4718f8627c33206abd2cc', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-local-min.js' => 'c7d7fac69be58a308a1974aaeb8c3332', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-local.js' => 'd93d4df3f64d6decef29e02b1438ecf9', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-min.js' => '7c6d093e64abccd1f2056c59ffa346d2', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-polling-min.js' => 'b3e59e37018ef2612eda7e37f5293f1c', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-polling.js' => '37f2b9b3084a62cbca1a65c1b15fa04c', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-textschema-min.js' => '67f47d2a6bfbfb8d8ab0a4e41320a05a', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-textschema.js' => '9a4bdcac8472939cb86d202b01478e0e', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-xmlschema-min.js' => '1ae58bcc8d038f2f60b1fabcd3363bba', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource-xmlschema.js' => '4a9f283a6fd461205094f5e76de444ba', + './jssource/src_files/include/javascript/yui3/build/datasource/datasource.js' => 'f86a985943ba567fbc7b55c2ed0ef92e', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype-date-format-min.js' => '836d9e73907ef7d37facd2c3a65f5448', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype-date-format.js' => '6a24c2df18e00088c2c23035525cf01c', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype-date-min.js' => 'ab5c24b52e8ff04ac33e22134b70061e', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype-date-parse-min.js' => '8bf5a689a5161a5852ae46cc5372a133', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype-date-parse.js' => 'fe6aabfb63f2ba7d360e101ad3152664', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype-date.js' => 'a55690788ff9071c691ea8e26a9d1dbd', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype-min.js' => '88b793519f7b170cac88949edee1e07c', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype-number-format-min.js' => '3897f6dd46e162b7793494481ff5e4c0', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype-number-format.js' => 'fb10208e69a137d78b7daf87129f1100', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype-number-min.js' => '274872ae9283044848e475e0ab16e8ff', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype-number-parse-min.js' => '34972c4fc8cf60e5afd02a1d1b4824ef', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype-number-parse.js' => '97e786013ec9d06a3bd6f492da8340c9', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype-number.js' => '58ad76e180506fd0e45e16c9db82d6a0', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype-xml-format-min.js' => '586b8373b725f918d1a8ebe4866100e3', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype-xml-format.js' => '088a14a6822f583187dac408cf6d43bd', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype-xml-min.js' => '82ccff56ec50d62eae5f1f2f575cc21a', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype-xml-parse-min.js' => 'dc8acb509892209cb1b1e97833adfe37', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype-xml-parse.js' => '43a3da4c1d9d56bb0d0524dedd48ae1c', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype-xml.js' => 'cc6d5ce5203d3bc3f1582be86fc6d231', + './jssource/src_files/include/javascript/yui3/build/datatype/datatype.js' => 'b7be9675c189562090beff961ead0b04', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format.js' => 'b7d9de56dce94834c7d1b660245762f3', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ar-JO.js' => '07899c395963f175afd30efc08dae0d9', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ar.js' => '169da6f44ce529233423d9698ab7270d', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ca-ES.js' => 'cef6a2d6cf3ee67a4ddd2e4e6199dc7f', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ca.js' => '254fee1565bd1e8b2fcb515bb1f16c23', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_da-DK.js' => 'e01eb0fcb33575acd7657176cb736c91', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_da.js' => 'f6c9b5f06abbf0fa5493694aa59f6712', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_de-AT.js' => '200957c7eedc8a04d00e41614a0dfa9c', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_de-DE.js' => '997070c293d2317d27ab0931a81582e5', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_de.js' => '4f7169e8718436dcd6f10c4e33bdeae2', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_el-GR.js' => '282cec1db186a509993b99a9bc2080bf', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_el.js' => 'f9ab929a3cbbc316b6a8806d852301c8', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-AU.js' => '96e6d776b73b404f044bcc2b2e69bce5', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-CA.js' => 'b6f75c0e6ad1625286721319bf8a9fc2', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-GB.js' => 'dba815173101e766b3d0280948d55141', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-IE.js' => 'bad9dc8d4fab5dcd3439e8ec7d1fa8df', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-IN.js' => '94a8261d20f4822e1992ac989ac31127', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-JO.js' => '2645daae552ee8fc89a5d0aa4835ef40', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-MY.js' => 'e78c650df3f9ecff657997c499589bb2', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-NZ.js' => 'a49681a233be9c0000d439d9b51f4bbf', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-PH.js' => '581ad7b668e20facf35a0da943237b8b', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-SG.js' => '896d590f72bdab697f0e7e5710af103d', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en-US.js' => '2a71843e54324bcda1e427976dec1187', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_en.js' => '366e712b933f384da6883f234e17bb68', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-AR.js' => '646a6bf96ae1c743db3fc2c6aac9e681', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-BO.js' => '810615712ffbf8c0e1b71b390635642b', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-CL.js' => '274ea665dabc76dae9e2c316c68d51f2', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-CO.js' => '43ebcaf8bbf857d2da85230af382c875', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-EC.js' => '4b83a8b29005fb3b89364b06606bc6fd', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-ES.js' => '870158104f7a4ac3186f7f7f413d1780', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-MX.js' => '7a6c7ed03c3a8560902e578aefde34ee', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-PE.js' => '5717b69c01c20c5ece3f662b0a84422d', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-PY.js' => '6598157b990c0329cdc86f29e28daa3f', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-US.js' => '8d1029dc94965b05cca280f1f37ea565', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-UY.js' => '0e42f6203287ab14de80e786f60d0ef7', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es-VE.js' => '6d68aea4e4186b75969d24fa0941310a', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_es.js' => '02a6eac61ae7f8328d9c78563446fd78', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_fi-FI.js' => 'd8f7cbd18b466d1a0161b05f64c54f8b', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_fi.js' => 'de9174f95602689b474f2d7ee3cf084c', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_fr-BE.js' => '52d04d8cf53c50f2f6892d1e419cf19a', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_fr-CA.js' => '80d2aa0b6c11ccfb3de1bd87dadf4c0b', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_fr-FR.js' => 'c362934816adbc8be8447f320c71a7e8', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_fr.js' => 'cc66bb7e485d983c8abd55e0e3128cd6', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_hi-IN.js' => '6ba62822377b773e7d6b55cc43722982', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_hi.js' => '2bd6ec5fa5a150d64c9a57b533e6fd46', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_id-ID.js' => '95d7e9d985475e7c9618d5b88b6f29dd', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_id.js' => '91fc4f4f0739e0e62230bacd65496ce0', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_it-IT.js' => '0fcebbb3a8a5997d19cd59e9e748c287', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_it.js' => 'f1a886bdfc2872ac17939922455f79d4', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ja-JP.js' => 'dd81508ea3f2e837a438c87617464130', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ja.js' => '5e0030c66ad5d229ad9eadb7c9ec6e66', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ko-KR.js' => 'f63c7ba94538d80453d82d8f05387ae1', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ko.js' => 'd67714dcda8c1500587a775283e76ff9', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ms-MY.js' => '26e19bfb16ab9ea4b4e32b93b6a4e38a', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ms.js' => '44509e38bc2fd540caaab40cfcdbf989', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_nb-NO.js' => '071a1a488d93357e8e6700dfce9044a6', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_nb.js' => 'e07b8917acfa36924397135e2c976929', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_nl-BE.js' => 'bc947dc80295031fbd51ca7da9f23807', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_nl-NL.js' => '97653e6c492dfffc41eac2dd20bfb07f', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_nl.js' => '38ecbdd765de4c02ecb61dbab8154910', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_pl-PL.js' => '2363b64db193d692f442270c4b3d370f', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_pl.js' => '37106ef755481b2da420b8a7705b7b13', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_pt-BR.js' => 'aab611961de099af8859c95550ad7e36', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_pt.js' => 'eebe23868e2fdcef7117d0fff9fa7736', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ro-RO.js' => 'e532a87eed0e4d4de65cf4d076744df5', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ro.js' => 'cd0cc7b8de7dfee4dc8da5e2c7c8959e', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ru-RU.js' => '2d4688c0f13e035437275be015d0c5fc', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_ru.js' => '57466cdaa6d59283e259ed5dbd5f099b', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_sv-SE.js' => 'acb0e79d654acdf3ef296b307b743d0d', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_sv.js' => '919728894a8ff305127242d42d6d7f0f', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_th-TH.js' => '4134577b14cbe0264a517657158c23d6', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_th.js' => 'd141c9326c5904db65d3f71665f6983d', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_tr-TR.js' => 'b28273c6347004320adc1c129d864799', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_tr.js' => '32ef35af90e9979d0375a890a1b07322', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_vi-VN.js' => '9a272fc92a284ce4138643cd8856eb0b', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_vi.js' => 'd185e6a31ffae20da86c276b15e3785f', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hans-CN.js' => 'e4555c5394dbeb426d3574db580051f4', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hans.js' => '4a6720a372515d654cf25424d59026d2', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hant-HK.js' => '1fd94ee61501da23849e2ae4f81c69aa', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hant-TW.js' => '5a778e48ced04c80cab07ef4b1290521', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hant.js' => 'c222e27f9a61d4d0b8771b1d89dae40a', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date.js' => 'd8fd2f43aec20bf2327ecf3154ed92ab', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ar-JO.js' => '4aa57e6d14db6e1c211b06103e6a30c0', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ar.js' => '49083b2960acbc4bba3e1caddf4aee78', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ca-ES.js' => '54b6137d2bc7934f22df25ccbeef537e', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ca.js' => '0981744f325b029a98946f848e524e37', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_da-DK.js' => '114229a2a5a702c813d529d9c0d6a6ea', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_da.js' => '9277227348cfe58c213e4e527df7f5bc', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_de-AT.js' => '3d71a93386aa8bd1447d036c3069e51a', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_de-DE.js' => 'b84389375f04f66d1814271c159ac39a', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_de.js' => 'e139f2d4e3c1279dd780fefe37a0fc0b', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_el-GR.js' => 'c1799aa503b8784eb721df0420ea37d7', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_el.js' => '72c2048ef8a2fb8a8fbb99d3106e42fd', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-AU.js' => '21c638e192d6a59e8c1c074c8781b150', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-CA.js' => 'a4110769bdaf9c65fd4cc31a0546c417', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-GB.js' => 'fb93c90f2fd7a692a14402b1977ef4a3', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-IE.js' => '35efbdf46019fb050bff9c8678ecbce7', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-IN.js' => '4b8cdd5c59f90e46eab59188461b83a7', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-JO.js' => '50d69b8d43612d7c49c8169235335bf4', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-MY.js' => '28fcaacd5674b9aed590ce865d014438', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-NZ.js' => '2096a0e071d4dbc126d8bf686bb30d41', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-PH.js' => '47ef232349e5a959072d588875d39557', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-SG.js' => '25310831aef7215fcbeb21831fedcd14', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en-US.js' => 'c7a532061d03aa3f2db8eb8e06c7732a', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_en.js' => '3224b049a8704c9a309144ba0c976636', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-AR.js' => '45d72d142d8683a0d0e0a36028259194', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-BO.js' => '84e1ba9463f313f15108679e1e3ee32e', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-CL.js' => '5fc6a06d04bc7324f0b11f32e2b9b7c6', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-CO.js' => 'a83ce276958b72e5351adb3fa4c67cd1', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-EC.js' => 'a86a3a93e6aec89c56ab7bcbb65c8033', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-ES.js' => 'f54647615d34b4c8bb753d54e02de72f', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-MX.js' => 'f42667046b65936a145e5c3c08050dd5', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-PE.js' => '7e830579e4bfc9dbfddacef19a4d0a99', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-PY.js' => '891d02505f42bc6b06860d5f5940be7d', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-US.js' => '7237c4c482c02e2c2d38b40de595391b', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-UY.js' => '42a5c48a186e907bc87b8804b961d0d0', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es-VE.js' => 'f36cc7d1c8f0c1a92580fdffdbef6c37', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_es.js' => '5ee85920dfbd62343bf60c19f84f4d54', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_fi-FI.js' => '33b781ffbdf38953b6314a0bfcdde153', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_fi.js' => '940315698c6d32d179cf83f4ab711dde', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_fr-BE.js' => 'd35ea9baa6834d3adcaa5548f3c9a206', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_fr-CA.js' => '93736777bf2f463c1cd627bc47d02cd8', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_fr-FR.js' => '46f3f4e53f307e4c4e16a47159510649', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_fr.js' => '3f693fffff2a79c11a0ece139fc8744a', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_hi-IN.js' => 'b23af73f6db6adbb3426de1a79e4301b', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_hi.js' => '9027f708d88e6bf1a1da4e9178f3593a', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_id-ID.js' => '80ec14e8b1c16808d4e2244e3d5b6ea4', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_id.js' => 'c50f63a6a3fba8c9d615629e117222fc', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_it-IT.js' => 'e24f0be8d5f80a30b00d6e2658bbfa6d', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_it.js' => 'a8fb7763eacfa1390dba19df93fa7c57', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ja-JP.js' => '9596fce5251b32d85b0b29103cf1ba5d', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ja.js' => '3f2d980dda7a722be5d63f5e755653f3', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ko-KR.js' => 'a4dc53350f1b71189b7c573ea7d2821a', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ko.js' => '7f110769a02932334443cfb79a9a4dfd', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ms-MY.js' => '6f776415734a8eb10c639aa0f420082f', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ms.js' => 'a4e438bf7cb550e1d7342aefa1003b17', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_nb-NO.js' => '70d6f033bd9d8c06e7e94d01b5d326db', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_nb.js' => '6801bf5843e7e6252e7056b9422253f5', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_nl-BE.js' => '87cd696b61146273be3c4d4982f5d33d', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_nl-NL.js' => 'b35e168992953f1358745b3e73fd7176', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_nl.js' => 'a466a94d5a0e5f928f0e4025121bd5c2', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_pl-PL.js' => '5878cfaf25b84a16793161ac0e9ffa44', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_pl.js' => '904c22a4893c7c5310d907081396706c', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_pt-BR.js' => 'f9bcdf32c0074f05336ef410fc68a794', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_pt.js' => '8f1b06c00c1f4ecc5040d989a5ecd06b', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ro-RO.js' => '714377ad1aad2ae1249b226d251b9973', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ro.js' => '1b96321f71a343d72f6bd7756a5ac5fa', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ru-RU.js' => '1ed0b903c51141e64246f7fe38e7b97b', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_ru.js' => '32c58fde050520ad3010f7024caf927f', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_sv-SE.js' => 'dc002ea320997eda3c393e67c680672d', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_sv.js' => '015f066e6989e8e3b6a2b7a579eef33a', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_th-TH.js' => '2e74cea19c197e2126cecf55f8437096', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_th.js' => '420f05f9e0bd8444b86ab22c3cae3c3c', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_tr-TR.js' => '0d2ceec2a039888765b355fb84f030e5', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_tr.js' => '29924b2214550273e3ba5477797baf70', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_vi-VN.js' => '4fe46df735777db9a95908a896053b85', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_vi.js' => '5ef99ca7260a076b73391ffe28307a36', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hans-CN.js' => '04916ca1592194a96cfdb3c294427340', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hans.js' => '20c122ed28ebebb60361fd084a4d393d', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hant-HK.js' => 'c84fc2ac4695a4c39c6ff5adc289f8f6', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hant-TW.js' => '810a2cd7245786c8b07c7141cb6ba2c2', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hant.js' => '2b516a2136ad19e7f8fc7ce858133fdc', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype.js' => '7efc534c807e0f8e51ead1ef4b0855fb', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ar-JO.js' => 'b0a0b727167abc00d2c94e142c008626', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ar.js' => '02cb0bc4bb56299a89eab94b88b0119c', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ca-ES.js' => 'da9b884df6a88ecbd54e4385c6fd54a4', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ca.js' => '4831bf5a77627fe0a58b7198ccea90ce', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_da-DK.js' => '6a16604e9289280331e6e62ba29dd11e', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_da.js' => 'a183a068b717aa71188618708f8a2ab4', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_de-AT.js' => '0ba07059cda8a0ae66e994f1050c4974', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_de-DE.js' => '0c577d7b913cd7e4181ae8d9f5a4b09b', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_de.js' => '02998d30e1b56da2066402b7bac8f92a', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_el-GR.js' => '3d9010da24343015105ca0c652a70221', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_el.js' => '7b6658cb28aa47c8c6b6da544787f0ba', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-AU.js' => 'ddd4dd90e259a04d4704352fd504307e', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-CA.js' => '2471f72548244fb485446f1f3df535c0', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-GB.js' => '97cffb0aafaf5e5e2cc417c204147532', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-IE.js' => '2a7335dd04308558b0bd9be521b35002', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-IN.js' => 'a9e6e4ae2268a4e30d032855d5158371', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-JO.js' => '2bf558ddc0c00f36c6a8992ce4a2bc93', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-MY.js' => 'fab89fe7500a01003afb6441f7944b05', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-NZ.js' => '26684ec54fbe6a66d039b1520d4febc2', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-PH.js' => 'f22595048c5085db2ae0e172e562abc7', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-SG.js' => 'd7ddd92e94149135833e59cda319c715', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en-US.js' => '9bac72881d60a04eaf394f2f3352f981', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_en.js' => '5b0ea65ca9479736a52c1c0ea00da8e5', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-AR.js' => '43ba2713faeab5e15d357bdaf46bd049', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-BO.js' => '16a87086a49dc9c541abad3f035bef9f', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-CL.js' => '1ef70de43dd87a5eff02053a1366dc6e', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-CO.js' => 'fe1230ff8cdc43f4e9d8f2498eb80db0', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-EC.js' => '56dc3b2602b296575366b019cfa2b47e', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-ES.js' => 'd324dd8c15fcaa3d9ceb103c71a02e29', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-MX.js' => '1cacdc1d96bc302c1432a268a790af55', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-PE.js' => 'ddd0d22ff289e65df90cbc59da2355ff', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-PY.js' => '5042d551abd33ca4f84ccb45f301d539', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-US.js' => 'f3055fb84a3fc6251fc0febc3e0ebc4f', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-UY.js' => 'd52852411fecf5640c7de40d7e03fa9c', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es-VE.js' => '2849a5128b8c6c39d4f0b39421938309', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_es.js' => '8086142ed99165ff3dcc8c8489acdd15', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_fi-FI.js' => '4924c6fc3df00c1fa96019b2bef90b01', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_fi.js' => '9059502ffa2d326c31e3a94dba9a0de5', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_fr-BE.js' => 'a7ffc44fded77afaef50f7ff14a1a875', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_fr-CA.js' => 'b16d3bf4a5332caa68a984ad70d6b9bd', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_fr-FR.js' => '49da16bee9addd302ce218421f128545', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_fr.js' => '1be9878ee571cb38c090312b9ffdbead', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_hi-IN.js' => '737e53999cd48ff5c3f5d5a9631d2c19', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_hi.js' => '0b6a8daa898b6d2159cb25cfe6432f14', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_id-ID.js' => '0512aa9298f419e99ba73242fba34c43', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_id.js' => '385f72a22e05c0a6a4d6a2ae82ca8aad', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_it-IT.js' => '5a8a42af4b240592e50397b9648746eb', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_it.js' => '9e64902dc01a3ae113f8e375cff3962d', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ja-JP.js' => '63aee8c6bff1b9b65ea883e9c7742bb6', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ja.js' => '01110a4de0cdaa5bb2e2bee5752e395f', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ko-KR.js' => 'c515424832a9aea1004f8f5c27122ae1', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ko.js' => 'b28559f32fa4f595b3fc6e37ad3d3214', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ms-MY.js' => 'e55e45a14f773cb1dcf47e3f4b0fd39b', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ms.js' => 'b104b0397df99ccc5a70addfcbcf297b', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_nb-NO.js' => '901a3e43ab57f8f9a371cdcae25374d4', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_nb.js' => 'd03a41c36ca606e60d14d75f7ad4c2b0', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_nl-BE.js' => '45fe89eb4ae6eef1bc4b48c2ffc32057', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_nl-NL.js' => '8d24dbcf576fa7b26692ba4526362425', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_nl.js' => '4671ae08bd40cd7e2e2c020782b9cf10', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_pl-PL.js' => 'd2976b322e0f6f31679ee840edb2562d', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_pl.js' => 'fdc3a007c5beb9b6730d95a7a44e335c', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_pt-BR.js' => '5de0a0a07be21ad63fac59f8ac135058', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_pt.js' => '3f881624d4ce292160eb4c8f85d3ea01', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ro-RO.js' => '6c9c0284d30dd51fcdc2a0fb5a5b9ab0', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ro.js' => 'd774c148fa8208062afb1da9515ef0e7', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ru-RU.js' => '7c51d7b2efdf21c94b6da574ddf529ec', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_ru.js' => 'd3342c0c8d9cad200fb205017524f044', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_sv-SE.js' => '7056a9d7c93474acff5dfd23a78594b6', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_sv.js' => '721a878b59f41023db9e77e8deaa3cd7', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_th-TH.js' => '3490e8b7235d5a6561698b8542dc4c13', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_th.js' => '4a7b8ced99f731089230a597672c80a5', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_tr-TR.js' => '96e24f0a2a0b151d3c618b594be2c9be', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_tr.js' => 'd9740c47399f4c442af1254f2579d849', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_vi-VN.js' => 'ba0cc1cda4425e4670e723623ccc874e', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_vi.js' => '2e4f44e9f5d0dde853438074e0a5758c', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_zh-Hans-CN.js' => 'd9ded4a557099cbb29b513dd1e2cf5df', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_zh-Hans.js' => '3d292983e12f9deaf068cc8ecc8111d9', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_zh-Hant-HK.js' => 'fccf087cc0db6a165b9a3078f27375d9', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_zh-Hant-TW.js' => '178769ab0f5542465898f7d6cfd53d29', + './jssource/src_files/include/javascript/yui3/build/datatype/lang/datatype_zh-Hant.js' => 'f3791630248466db8b5fffc11e86ba16', + './jssource/src_files/include/javascript/yui3/build/dd/dd-constrain-min.js' => '3d902627262890f2dd934f840af19cdb', + './jssource/src_files/include/javascript/yui3/build/dd/dd-constrain.js' => 'e71f45803ba475e7de902f67ab5b690b', + './jssource/src_files/include/javascript/yui3/build/dd/dd-ddm-base-min.js' => '340989b645ddde12aa9fac2d4fcbdd79', + './jssource/src_files/include/javascript/yui3/build/dd/dd-ddm-base.js' => '19b772e92320059bb32c133d4d1bfc3d', + './jssource/src_files/include/javascript/yui3/build/dd/dd-ddm-drop-min.js' => '2b2796c09da9170ba6d9c7ee6e945ca2', + './jssource/src_files/include/javascript/yui3/build/dd/dd-ddm-drop.js' => 'e6814cd1145a4689b4d67e445a5ffced', + './jssource/src_files/include/javascript/yui3/build/dd/dd-ddm-min.js' => 'f34d871d842d325309f97cc6fb0b2f28', + './jssource/src_files/include/javascript/yui3/build/dd/dd-ddm.js' => '7011622eafe713dc5b34705d301c7330', + './jssource/src_files/include/javascript/yui3/build/dd/dd-delegate-min.js' => '0edc38e7203c681236655bb677f106cb', + './jssource/src_files/include/javascript/yui3/build/dd/dd-delegate.js' => '29d95c720aca0d1c0ad89c7edc0ac751', + './jssource/src_files/include/javascript/yui3/build/dd/dd-drag-min.js' => 'f774912a989caf91019980eb5ed6f8d0', + './jssource/src_files/include/javascript/yui3/build/dd/dd-drag.js' => 'fb32af90eff8e2c5bd7b2f3639bb0d60', + './jssource/src_files/include/javascript/yui3/build/dd/dd-drop-min.js' => '2f51a4ed0bc4f56f53a53eca0de17987', + './jssource/src_files/include/javascript/yui3/build/dd/dd-drop-plugin-min.js' => '9dbdf28e2b6c0cd397094d8a315c6edd', + './jssource/src_files/include/javascript/yui3/build/dd/dd-drop-plugin.js' => '3e7547c269074363b071feb46b298182', + './jssource/src_files/include/javascript/yui3/build/dd/dd-drop.js' => '1d66534b5eef459a0b3b159eb82e8901', + './jssource/src_files/include/javascript/yui3/build/dd/dd-gestures-min.js' => '4d404dda35b21528d510655a57d476bb', + './jssource/src_files/include/javascript/yui3/build/dd/dd-gestures.js' => 'c44b3dbec9142f4b2866473f8697604b', + './jssource/src_files/include/javascript/yui3/build/dd/dd-min.js' => '281d57c711b45dc6c859a8f6a8eede0a', + './jssource/src_files/include/javascript/yui3/build/dd/dd-plugin-min.js' => 'df632a66d719c7975636c8bd70a63d88', + './jssource/src_files/include/javascript/yui3/build/dd/dd-plugin.js' => 'a23a5ab90dcc6648a7592c3322e79bf6', + './jssource/src_files/include/javascript/yui3/build/dd/dd-proxy-min.js' => 'cc8de1d0399d2b9c50812c974395f653', + './jssource/src_files/include/javascript/yui3/build/dd/dd-proxy.js' => '75040bfb359a7974541a20f5f7d3462c', + './jssource/src_files/include/javascript/yui3/build/dd/dd-scroll-min.js' => 'd8f4132fe3dfdcf7ac9ae09880f8d24c', + './jssource/src_files/include/javascript/yui3/build/dd/dd-scroll.js' => '112370cfd4d1045f76964b460d2367aa', + './jssource/src_files/include/javascript/yui3/build/dd/dd.js' => 'ad894fde9d8c490fe5017bccea095e39', + './jssource/src_files/include/javascript/yui3/build/dom/dom-base-min.js' => 'e8f8280bc1a35ff148f2b18686fd6a59', + './jssource/src_files/include/javascript/yui3/build/dom/dom-base.js' => 'cd630cc625a36e3ac530f65cb75e4d7b', + './jssource/src_files/include/javascript/yui3/build/dom/dom-deprecated.js' => '2e7460803431c2cbeec7832fbc4056dc', + './jssource/src_files/include/javascript/yui3/build/dom/dom-min.js' => 'eb5b664b51d795da4767d9374f41b9cc', + './jssource/src_files/include/javascript/yui3/build/dom/dom.js' => 'cdf0e2784596d944fb7ea2ae6aba6604', + './jssource/src_files/include/javascript/yui3/build/dom/dom-screen-min.js' => '5ef89414eb42817eae9392ef6e1a78f4', + './jssource/src_files/include/javascript/yui3/build/dom/dom-screen.js' => '53727f121a5077e611d6cae9d75399e7', + './jssource/src_files/include/javascript/yui3/build/dom/dom-style-min.js' => '35831b30546e61a92a65b333a85a49db', + './jssource/src_files/include/javascript/yui3/build/dom/dom-style.js' => 'ac70b82ef943ba297f297711d5e8c9c6', + './jssource/src_files/include/javascript/yui3/build/dom/selector.js' => 'd9a3102d0fd3d7c2ada3edd7dfb3d662', + './jssource/src_files/include/javascript/yui3/build/dom/selector-css2-min.js' => '5bd64838b5d5b68f448c50726d80f3b7', + './jssource/src_files/include/javascript/yui3/build/dom/selector-css2.js' => 'fdcc60edaafb138e1f89d213ea5cc944', + './jssource/src_files/include/javascript/yui3/build/dom/selector-css3-min.js' => '89088a4e2e04305a15d33298ff429cd7', + './jssource/src_files/include/javascript/yui3/build/dom/selector-css3.js' => 'c35b5d6a2651f46ee1fe59ebb00c077b', + './jssource/src_files/include/javascript/yui3/build/dom/selector-min.js' => '5518623ec25933ee22d56485d9135c16', + './jssource/src_files/include/javascript/yui3/build/dom/selector-native-min.js' => 'ff1c4bfbcc38791bdc13dc8c7d3c6519', + './jssource/src_files/include/javascript/yui3/build/dom/selector-native.js' => '5c9448b627027615bb6a55aa64b027ab', + './jssource/src_files/include/javascript/yui3/build/dom/dom-deprecated-min.js' => 'ecb9bf9d33cbaa2188ab144569c42315', + './jssource/src_files/include/javascript/yui3/build/dom/dom-style-ie-min.js' => 'f7f7311b649322c7ba9adaef514cf974', + './jssource/src_files/include/javascript/yui3/build/dom/dom-style-ie.js' => '171a5b66b0c34434cbcd6879e2c2ffca', + './jssource/src_files/include/javascript/yui3/build/dump/dump-min.js' => 'b57b2c5e3b247b6a861dd6da224be234', + './jssource/src_files/include/javascript/yui3/build/dump/dump.js' => '37ee18f1f968c1bd72e580099e933f75', + './jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-base-min.js' => '50c6e8959b98d7b41f8ee8e923702c42', + './jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-base.js' => 'fc30b775e1255a7777bffe30d781446a', + './jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-complex-min.js' => 'bd321769905d49983f9ffcb0f2b2beaa', + './jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-complex.js' => '8a130836a53013d0e70cc7a280d1a59e', + './jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-min.js' => '6c9bf45da13c32ed4477160ba6c415f3', + './jssource/src_files/include/javascript/yui3/build/event-custom/event-custom.js' => '1dc7d11fa054a35c919fbb8f08d43938', + './jssource/src_files/include/javascript/yui3/build/event-simulate/event-simulate-min.js' => '94ca01b7dc8c725e24cb9af0515d1c27', + './jssource/src_files/include/javascript/yui3/build/event-simulate/event-simulate.js' => '82a9e48fe11d2bee96d65e5839497cdb', + './jssource/src_files/include/javascript/yui3/build/event/event-base-ie-min.js' => '6058faf73f90dd4f3e26ab8d6f0b5695', + './jssource/src_files/include/javascript/yui3/build/event/event-base-min.js' => 'cccb97f8ab2f4ef1de132ab3ae6f3692', + './jssource/src_files/include/javascript/yui3/build/event/event-base.js' => 'a70764677cc94a55329e513e2b5ab9e5', + './jssource/src_files/include/javascript/yui3/build/event/event-base-ie.js' => '3e038b0f3a234b1b57290d20b98badc5', + './jssource/src_files/include/javascript/yui3/build/event/event-delegate-min.js' => '8bcf7ec5805faa24617104c1c4cc7176', + './jssource/src_files/include/javascript/yui3/build/event/event-delegate.js' => '7747e11d4abee85b487ef69eff5a2c32', + './jssource/src_files/include/javascript/yui3/build/event/event-focus-min.js' => '5d2dae82c681315c7c581c26ddf29c51', + './jssource/src_files/include/javascript/yui3/build/event/event-focus.js' => '30a404af43e99928fee10be2d5ab0ee5', + './jssource/src_files/include/javascript/yui3/build/event/event-hover-min.js' => '282221b0b22cd481c33dde90d66d2533', + './jssource/src_files/include/javascript/yui3/build/event/event-key-min.js' => 'b384bd345c20d1f744b8ce9647f296dc', + './jssource/src_files/include/javascript/yui3/build/event/event-key.js' => '354c77643752dc6eb78688c2df5be77c', + './jssource/src_files/include/javascript/yui3/build/event/event-min.js' => '811e4280c8dc36ba2935fef6e62f7a0e', + './jssource/src_files/include/javascript/yui3/build/event/event-mouseenter-min.js' => '943502b345b05d7b1351be7b7f89f14a', + './jssource/src_files/include/javascript/yui3/build/event/event-mouseenter.js' => '5625e71659244453a85f76e04d56d75b', + './jssource/src_files/include/javascript/yui3/build/event/event-mousewheel-min.js' => 'f5163665dadbe39df35bab57d1f5b70a', + './jssource/src_files/include/javascript/yui3/build/event/event-mousewheel.js' => '13bf322df8b1264daaa44aca827134bd', + './jssource/src_files/include/javascript/yui3/build/event/event-resize-min.js' => '550682444ad9c89d1d04e555bc11202f', + './jssource/src_files/include/javascript/yui3/build/event/event-resize.js' => '04d3b3ba90b0d8df7576ef9cfeec27c5', + './jssource/src_files/include/javascript/yui3/build/event/event.js' => 'a7a3fd8d55b9ed5439362c14cf579803', + './jssource/src_files/include/javascript/yui3/build/event/event-hover.js' => '5ce02e08344cee7bed32d277b1bd6112', + './jssource/src_files/include/javascript/yui3/build/event/event-synthetic-min.js' => '727e8fc8053397b5afb9efc1f98d764b', + './jssource/src_files/include/javascript/yui3/build/event/event-synthetic.js' => '3bba116a41caa0eb90ab81d704bbdcb7', + './jssource/src_files/include/javascript/yui3/build/event/event-touch-min.js' => 'f724214c47168519e06e4773df3f0304', + './jssource/src_files/include/javascript/yui3/build/event/event-touch.js' => '69ecc066b3d8aca89b31a1353147b746', + './jssource/src_files/include/javascript/yui3/build/dial/dial-min.js' => 'b05c74b91499525987eb6695428d1d27', + './jssource/src_files/include/javascript/yui3/build/dial/dial.js' => '5055d2987f9c503bb9dc79f6c4df2988', + './jssource/src_files/include/javascript/yui3/build/dial/lang/dial.js' => 'cbe8b5a9a00724add59410bf7765821e', + './jssource/src_files/include/javascript/yui3/build/dial/lang/dial_en.js' => '28ffd7caacb26a272e456c035abf6a8e', + './jssource/src_files/include/javascript/yui3/build/dial/lang/dial_es.js' => 'b32ce378b2880c5c2037f07511419e91', + './jssource/src_files/include/javascript/yui3/build/history/history-base.js' => '4c34ebcdd0ee42226b4050bfe01ec7b5', + './jssource/src_files/include/javascript/yui3/build/history/history-min.js' => 'ca5b768a19401dda5ca10547df939bf3', + './jssource/src_files/include/javascript/yui3/build/history/history.js' => '8bb73a765e9bea1fa29776e0d73eec1a', + './jssource/src_files/include/javascript/yui3/build/history/history-base-min.js' => '6eebd06843cc4bfe1059f3f4e64ea718', + './jssource/src_files/include/javascript/yui3/build/history/history-hash-ie-min.js' => '966d4639358db9422ae4bb7346cbf6e7', + './jssource/src_files/include/javascript/yui3/build/history/history-hash-ie.js' => '3bd7e5ced58e6aa6715198da3d323ee6', + './jssource/src_files/include/javascript/yui3/build/history/history-hash-min.js' => 'eedb52dd7b38eea2d5a5ebe8d46db420', + './jssource/src_files/include/javascript/yui3/build/history/history-hash.js' => '3ea79949203e55204ff9f0af717cb203', + './jssource/src_files/include/javascript/yui3/build/history/history-html5-min.js' => '4f1cb61bf85f008c4275f1a5082858c9', + './jssource/src_files/include/javascript/yui3/build/history/history-html5.js' => '7e13367319240e490222daf0cc23bc16', + './jssource/src_files/include/javascript/yui3/build/imageloader/imageloader-min.js' => '5dcffdbd0d8e3e56a2f05f8968c901e0', + './jssource/src_files/include/javascript/yui3/build/imageloader/imageloader.js' => 'bb1e0120d7b3d0da7be38e191b38f047', + './jssource/src_files/include/javascript/yui3/build/io/io-base-min.js' => 'f6a5a65d2e9e0dbe8d9c5956495290f5', + './jssource/src_files/include/javascript/yui3/build/io/io-base.js' => '3a84b319c49bd881b17fd48caf267192', + './jssource/src_files/include/javascript/yui3/build/io/io-form-min.js' => 'e013f9a4286c48923ad4ac57739d3330', + './jssource/src_files/include/javascript/yui3/build/io/io-form.js' => 'e56cffaffaa3b266f5a9b0de3800715d', + './jssource/src_files/include/javascript/yui3/build/io/io-min.js' => '764fc8ea23559eef3d1e5d803fafc3c1', + './jssource/src_files/include/javascript/yui3/build/io/io-queue-min.js' => '042ab905ea11a92430b02d3bfc2c5371', + './jssource/src_files/include/javascript/yui3/build/io/io-queue.js' => 'cb877fdc3805349e0a2bdb044efbfa2a', + './jssource/src_files/include/javascript/yui3/build/io/io-upload-iframe-min.js' => 'a59be4ac59f8f395e60e4f000582f57b', + './jssource/src_files/include/javascript/yui3/build/io/io-upload-iframe.js' => 'ffe476fd588d34aa32b0d9b281569c05', + './jssource/src_files/include/javascript/yui3/build/io/io-xdr-min.js' => 'd61b2880288291ea79c6a5c326e1abe5', + './jssource/src_files/include/javascript/yui3/build/io/io-xdr.js' => '11474eed744f3aad9b98cbba0473ff2b', + './jssource/src_files/include/javascript/yui3/build/io/io.js' => '445f1d433a6ac5f7809c895d021f4c9f', + './jssource/src_files/include/javascript/yui3/build/json/json-min.js' => 'ceb9b6d97d7759acb14aa2e8f7bad95a', + './jssource/src_files/include/javascript/yui3/build/json/json-parse-min.js' => 'c458c0ea0aa7dd399272d663e8a3ee62', + './jssource/src_files/include/javascript/yui3/build/json/json-parse.js' => '378323ad6edb99009fa934a4e3985812', + './jssource/src_files/include/javascript/yui3/build/json/json-stringify-min.js' => '09dd6e9cac517906e881d9d086f2ca5c', + './jssource/src_files/include/javascript/yui3/build/json/json-stringify.js' => 'e49af1a434e2dbe8cba309668fa32baa', + './jssource/src_files/include/javascript/yui3/build/json/json.js' => '25c9537873b157feaa9f404d63d07bf6', + './jssource/src_files/include/javascript/yui3/build/loader/loader-base.js' => '8edc7b6778ede2dc84b4a071ed34eda3', + './jssource/src_files/include/javascript/yui3/build/loader/loader-min.js' => '0d9e052161a86a0774356ff7ff691d3f', + './jssource/src_files/include/javascript/yui3/build/loader/loader.js' => '5deff9e2eb44f592d41e5b5ba0d2a0b8', + './jssource/src_files/include/javascript/yui3/build/loader/loader-base-min.js' => '523f297f74a43f03bfa1c2c8a3969c37', + './jssource/src_files/include/javascript/yui3/build/loader/loader-rollup-min.js' => 'e08234a4c4cba9bdaef5d464909c3ca5', + './jssource/src_files/include/javascript/yui3/build/loader/loader-rollup.js' => '621ffdca48af20fc9209e347fe3756c0', + './jssource/src_files/include/javascript/yui3/build/loader/loader-yui3-min.js' => 'b72e779b6ae138a88f2dd543c111551e', + './jssource/src_files/include/javascript/yui3/build/loader/loader-yui3.js' => '231d3f7831f488d406950ad94c41e5c2', + './jssource/src_files/include/javascript/yui3/build/node-focusmanager/node-focusmanager-min.js' => '772fe30d5159da154bc70f66e52688a3', + './jssource/src_files/include/javascript/yui3/build/node-focusmanager/node-focusmanager.js' => '9d038b508069554da8d65ce52620b349', + './jssource/src_files/include/javascript/yui3/build/node-menunav/node-menunav-min.js' => '2bc2b9eebe9400acc4f7e090d11913a6', + './jssource/src_files/include/javascript/yui3/build/node-menunav/node-menunav.js' => '46d001d1391e0140a8a7b085c63b3dd6', + './jssource/src_files/include/javascript/yui3/build/node/align-plugin-min.js' => 'a973573ec8d24bde09b4d472d61fb783', + './jssource/src_files/include/javascript/yui3/build/node/align-plugin.js' => 'ab87f30aa1cb6a0a72a3720f658174d3', + './jssource/src_files/include/javascript/yui3/build/node/node-base-min.js' => '8a0901d4b2cddbead0e4ba71cf8b4fa9', + './jssource/src_files/include/javascript/yui3/build/node/node-base.js' => '97b14f82d34eb09d6f4b8adaaf04d8d6', + './jssource/src_files/include/javascript/yui3/build/node/node-event-delegate-min.js' => '4623a79a5bdd8740abb2f7165dc818ed', + './jssource/src_files/include/javascript/yui3/build/node/node-event-delegate.js' => 'daf25338e25d9403ffc91d7585119dc8', + './jssource/src_files/include/javascript/yui3/build/node/node-load.js' => 'f27f5771a9b0b363c1934b9468ccc6cc', + './jssource/src_files/include/javascript/yui3/build/node/node.js' => 'f728b45f9cff558b4ba228dfad423a62', + './jssource/src_files/include/javascript/yui3/build/node/node-deprecated.js' => '5e12769af1207a00b70ba8d62f05a8f4', + './jssource/src_files/include/javascript/yui3/build/node/node-event-simulate-min.js' => 'a8e2742cfe946fd0a5fca4d739dc001a', + './jssource/src_files/include/javascript/yui3/build/node/node-event-simulate.js' => '9b557bef809496e454da02bda870b1a0', + './jssource/src_files/include/javascript/yui3/build/node/node-min.js' => '399bb252059f3b901b98ead510334634', + './jssource/src_files/include/javascript/yui3/build/node/node-load-min.js' => '52cf8822b11ccb82c3bdfa06018ad117', + './jssource/src_files/include/javascript/yui3/build/node/node-pluginhost-min.js' => '39ac48fd4e41bcf520857e865b92247d', + './jssource/src_files/include/javascript/yui3/build/node/node-pluginhost.js' => '1b63f5ced72b191b731fc8c12333529c', + './jssource/src_files/include/javascript/yui3/build/node/node-screen-min.js' => 'a8409ddf603896c5b8f0c6ade48ee51b', + './jssource/src_files/include/javascript/yui3/build/node/node-screen.js' => 'ea325161aab4efd439c708c9de647076', + './jssource/src_files/include/javascript/yui3/build/node/node-style-min.js' => 'b2e315a8ba125ea192c8dd244b116da7', + './jssource/src_files/include/javascript/yui3/build/node/node-style.js' => '79e0819a46def78da9b2339bde63c23e', + './jssource/src_files/include/javascript/yui3/build/node/node-deprecated-min.js' => 'cd2be43e9de7c39b12115c847ac73293', + './jssource/src_files/include/javascript/yui3/build/node/node-event-html5-min.js' => 'a0b70eb00f0014fa7655563142da1f52', + './jssource/src_files/include/javascript/yui3/build/node/node-event-html5.js' => '76ba62b7ef15c39473f992a2045208dd', + './jssource/src_files/include/javascript/yui3/build/node/shim-plugin-min.js' => '27155c30875b6eea4ba1bae1b1a0e7ca', + './jssource/src_files/include/javascript/yui3/build/node/shim-plugin.js' => '6ecddf69b9cc1f7a82ac3c74373b33b9', + './jssource/src_files/include/javascript/yui3/build/oop/oop-min.js' => '18d01168cdb05e6b8787e0274dd59568', + './jssource/src_files/include/javascript/yui3/build/oop/oop.js' => '1f014de559d4f43068dfd1355dea640e', + './jssource/src_files/include/javascript/yui3/build/overlay/overlay-min.js' => '8988e0cf030dcfb1b16fd7a09bbbd31b', + './jssource/src_files/include/javascript/yui3/build/overlay/overlay.js' => '9077589375f60d618c7b2d25a03c9692', + './jssource/src_files/include/javascript/yui3/build/plugin/plugin-min.js' => '8e4c8059a0995c5e95ef70a98187e757', + './jssource/src_files/include/javascript/yui3/build/plugin/plugin.js' => '84440fe8ec274ae42da7b76b3a1d2aa2', + './jssource/src_files/include/javascript/yui3/build/pluginhost/pluginhost-base.js' => 'c190eb3b0a8a63b3e46976e1c64b6a36', + './jssource/src_files/include/javascript/yui3/build/pluginhost/pluginhost-min.js' => 'a48942b391889afb732550e63cc2510f', + './jssource/src_files/include/javascript/yui3/build/pluginhost/pluginhost.js' => '8bf9c833f0f00c814254ba614436d4d4', + './jssource/src_files/include/javascript/yui3/build/pluginhost/pluginhost-base-min.js' => '60f7bd83bf00c8c72b7a9a166d75419a', + './jssource/src_files/include/javascript/yui3/build/pluginhost/pluginhost-config-min.js' => '12d5f2c74c2a4a97da39fc747e04e899', + './jssource/src_files/include/javascript/yui3/build/pluginhost/pluginhost-config.js' => '2e1989f96e84196e27156afc42a788ea', + './jssource/src_files/include/javascript/yui3/build/profiler/profiler-min.js' => '868b87d8388991b2f4d2729aa2b4913b', + './jssource/src_files/include/javascript/yui3/build/profiler/profiler.js' => '2e18579d5addc106aa072a6a76844afa', + './jssource/src_files/include/javascript/yui3/build/queue-promote/queue-promote-min.js' => '1b4921ed60918b28ca584431dbfff929', + './jssource/src_files/include/javascript/yui3/build/queue-promote/queue-promote.js' => '9528f9c913ba542e9c863f5f4aee36de', + './jssource/src_files/include/javascript/yui3/build/slider/range-slider.js' => '60f8c54a68aa36235c2c425d61da13eb', + './jssource/src_files/include/javascript/yui3/build/slider/slider-min.js' => 'c837e59fe02b33eaecf9b3820d3e2df5', + './jssource/src_files/include/javascript/yui3/build/slider/slider.js' => '3862cdfa21c8b1f362d8852f17d39983', + './jssource/src_files/include/javascript/yui3/build/slider/clickable-rail-min.js' => 'f83ea026f047df0fd557ddf4f6d71f55', + './jssource/src_files/include/javascript/yui3/build/slider/clickable-rail.js' => '175427ee3f67309ce8c649acee837d14', + './jssource/src_files/include/javascript/yui3/build/slider/range-slider-min.js' => 'f769dec8c94d618ed7c1cf88e3c34f36', + './jssource/src_files/include/javascript/yui3/build/slider/slider-base-min.js' => 'a140b90e528f960d7da7a2284ce4f565', + './jssource/src_files/include/javascript/yui3/build/slider/slider-base.js' => '0bbe4b9f263d9b7e832d9c103f0e949d', + './jssource/src_files/include/javascript/yui3/build/slider/slider-value-range-min.js' => '6804500b388b392d0207bbe0c97899f4', + './jssource/src_files/include/javascript/yui3/build/slider/slider-value-range.js' => '0f1fc2337592f510ef0f632f49388c0c', + './jssource/src_files/include/javascript/yui3/build/stylesheet/stylesheet-min.js' => '75bd882fb0e8921fa84a7ec0f7b25644', + './jssource/src_files/include/javascript/yui3/build/stylesheet/stylesheet.js' => '852609145db7129db43c8a5040d6769c', + './jssource/src_files/include/javascript/yui3/build/substitute/substitute-min.js' => '0350a8d123a9ab3e0a8420fcd405e678', + './jssource/src_files/include/javascript/yui3/build/substitute/substitute.js' => '97c010ea257ab138e0a85f524cc0bf59', + './jssource/src_files/include/javascript/yui3/build/test/test-min.js' => '9fa467c8112cf63e88eedb53e7a26641', + './jssource/src_files/include/javascript/yui3/build/test/test.js' => 'a630d9d8ff554b2efe6f94d325ef4d2a', + './jssource/src_files/include/javascript/yui3/build/widget/widget-base.js' => 'b25d8120b7ad2da944430b39a06dd128', + './jssource/src_files/include/javascript/yui3/build/widget/widget-min.js' => '646afcd712e522ead314175d4e90074c', + './jssource/src_files/include/javascript/yui3/build/widget/widget-base-ie-min.js' => 'bc5bb16c80f45ec90859aa9c1c3f86bc', + './jssource/src_files/include/javascript/yui3/build/widget/widget-position-min.js' => '93f1b2f2bada8b5321f50ac62d213723', + './jssource/src_files/include/javascript/yui3/build/widget/widget-position.js' => 'f59a013d8dc45c952cd9e8e587fb77e9', + './jssource/src_files/include/javascript/yui3/build/widget/widget-stack-min.js' => '00ca05aa57fdac980f4a4e58c1b7cb48', + './jssource/src_files/include/javascript/yui3/build/widget/widget.js' => '198de37804e4b98b996971c36af87e5f', + './jssource/src_files/include/javascript/yui3/build/widget/widget-stack.js' => '917d2d506444a7f3cca870bbd9d063bc', + './jssource/src_files/include/javascript/yui3/build/widget/widget-stdmod-min.js' => 'e20960c6b2b37b7833e5b19a9aa5e965', + './jssource/src_files/include/javascript/yui3/build/widget/widget-stdmod.js' => '3940092d8875ef7d66e1e8f2d46a083e', + './jssource/src_files/include/javascript/yui3/build/widget/widget-base-ie.js' => '41b95e8554c987cbc443cedf8cd5d5dd', + './jssource/src_files/include/javascript/yui3/build/widget/widget-base-min.js' => 'cf04b8dd2941b241b4a05ce8010be382', + './jssource/src_files/include/javascript/yui3/build/widget/widget-child-min.js' => '7a2b405326d6ffa9101fb8a891fec230', + './jssource/src_files/include/javascript/yui3/build/widget/widget-child.js' => '0e217343ad0a47946425c5698dc81aaf', + './jssource/src_files/include/javascript/yui3/build/widget/widget-htmlparser-min.js' => '66fae03911b2a222969bf07e889ceea5', + './jssource/src_files/include/javascript/yui3/build/widget/widget-htmlparser.js' => '4aa0cd54d306cb0c5ab696b481ecb70b', + './jssource/src_files/include/javascript/yui3/build/widget/widget-locale-min.js' => 'b3843ca7928d10b0b2e69fe89a14cde8', + './jssource/src_files/include/javascript/yui3/build/widget/widget-locale.js' => '4d789d4154ea6d2736d6240f472b34df', + './jssource/src_files/include/javascript/yui3/build/widget/widget-parent-min.js' => 'f9a9b33269a97ebea683f651464a2b65', + './jssource/src_files/include/javascript/yui3/build/widget/widget-parent.js' => 'c36ba51326a206d75578d84a6c6dc090', + './jssource/src_files/include/javascript/yui3/build/widget/widget-position-align-min.js' => '21057e6280358b723eddbf79ddf2eddb', + './jssource/src_files/include/javascript/yui3/build/widget/widget-position-align.js' => 'be329611e1b98baa17ff6fb87063a6aa', + './jssource/src_files/include/javascript/yui3/build/widget/widget-position-constrain-min.js' => '12c8f9f3b4b7ea6392eb13ec9fe21b19', + './jssource/src_files/include/javascript/yui3/build/widget/widget-position-constrain.js' => '9d048655b5ab9eb2c0e79891373363e2', + './jssource/src_files/include/javascript/yui3/build/widget/widget-skin-min.js' => '18207ae006d86e7e8e50b81415813beb', + './jssource/src_files/include/javascript/yui3/build/widget/widget-skin.js' => 'dc03d1ec00ce76d09c575b9b0c71dc78', + './jssource/src_files/include/javascript/yui3/build/widget/widget-uievents-min.js' => '993befcb1f0aed9f3f2f8602196d3baa', + './jssource/src_files/include/javascript/yui3/build/widget/widget-uievents.js' => '9135aae388f56b21d562f6260457c06d', + './jssource/src_files/include/javascript/yui3/build/charts/charts-min.js' => '6759db92d8e0f45997da06f25a778763', + './jssource/src_files/include/javascript/yui3/build/charts/charts.js' => 'e95b6d02b54b01caaa3af8cf373bfa5d', + './jssource/src_files/include/javascript/yui3/build/yui/features.js' => 'bd1324e52139381cf41648ba44166935', + './jssource/src_files/include/javascript/yui3/build/yui/get-min.js' => 'f2662733b6be93b413604d8ac6834f84', + './jssource/src_files/include/javascript/yui3/build/yui/get.js' => '3d940b74f8a5b1a438d960ea6c1374e0', + './jssource/src_files/include/javascript/yui3/build/yui/yui-base-min.js' => 'cbf67dcbfd7b733fcaabb463146325ee', + './jssource/src_files/include/javascript/yui3/build/yui/yui-base.js' => 'a4463771815df2fe8809b39a24d52258', + './jssource/src_files/include/javascript/yui3/build/yui/features-min.js' => '5b237066ddb6bc0b45cfd1d9e6bff81e', + './jssource/src_files/include/javascript/yui3/build/yui/intl-base-min.js' => '78f18e1b00eefb45c40e10aa0cc05817', + './jssource/src_files/include/javascript/yui3/build/yui/yui-later-min.js' => '3f199976e4f1dceec75f1e4d5331e0b6', + './jssource/src_files/include/javascript/yui3/build/yui/yui-later.js' => 'bbd62f4d6e1f84872b9a587f8e50e4e1', + './jssource/src_files/include/javascript/yui3/build/yui/yui-log-min.js' => '10d676ab6383e9180fafa3c6d859ee09', + './jssource/src_files/include/javascript/yui3/build/yui/yui-log.js' => 'cd958fcf243f06e64f3a5a2208ba9a11', + './jssource/src_files/include/javascript/yui3/build/yui/yui-min.js' => '8bb7e692facb28d1d9ed44df49884104', + './jssource/src_files/include/javascript/yui3/build/yui/yui.js' => 'c195c23bd0541d89514ac7912fa99aa1', + './jssource/src_files/include/javascript/yui3/build/yui/intl-base.js' => '4eb1b052e01545e6ab76f09cd91b8ecb', + './jssource/src_files/include/javascript/yui3/build/yui/rls-min.js' => 'a1393dae8c3a60a1368e84cec6170bc9', + './jssource/src_files/include/javascript/yui3/build/yui/rls.js' => '65ab2ec233568be44da335686752e4da', + './jssource/src_files/include/javascript/yui3/build/yui/yui-throttle-min.js' => '7f0de24c35cdfdb1126b4424219b9ac8', + './jssource/src_files/include/javascript/yui3/build/yui/yui-throttle.js' => 'e330a608bd5840f2c1cfbe3b2471ff46', + './jssource/src_files/include/javascript/yui3/build/arraysort/arraysort-min.js' => 'd597233edde976f92c436dcb3f2283a9', + './jssource/src_files/include/javascript/yui3/build/arraysort/arraysort.js' => '3bf9c3de2c85b7dc77c147014368f5ce', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-base-min.js' => '143c718d71a588368ebbece96db011d4', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-base.js' => '9d79e5bf583132dc3cbd43d26ca0693e', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-filters-accentfold-min.js' => '2448eb6df96dce41568ae89771e129b4', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-filters-accentfold.js' => '0b9117bca4b93e58c9f4b3d92546d551', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-filters-min.js' => '5f3306a6487333f7d781f8c2a3bb32c6', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-filters.js' => 'b69c5f9cf92a954fef4ae4e5e26ea9b1', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-highlighters-accentfold-min.js' => '6ea578e426aeb25d0364dd577baeb32e', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-highlighters-accentfold.js' => 'df993e9ae95faf8feee674517ea705cc', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-highlighters-min.js' => '9fe8fba84f40c442efd1f177de5d2cbf', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-highlighters.js' => '0f982c57865af61535b943e26e5abf61', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-list-keys-min.js' => 'a7fb300aec56c61edec10857ec1c7951', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-list-keys.js' => '8a604f75e909367faee9861f0aaa5149', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-list-min.js' => '228056d0dabc3d59ca229c7f81dd2966', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-list.js' => '29b8137ee9ca6e514ab9ac005c98aa4c', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-min.js' => 'b676862ab4a27baa9de57343c0153df3', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-plugin-min.js' => '6a0fdd74ae11d1c079a1d987a1e71fe4', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-plugin.js' => '8fddb09580fbe57520f3ec2fd2d21806', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-sources-min.js' => '6e058efba9307ac27628b4d276c21641', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete-sources.js' => '3bd9de7e3a1afd958bd3f97c5c3fe52b', + './jssource/src_files/include/javascript/yui3/build/autocomplete/autocomplete.js' => 'a0d16e6fe3533101a2477b356f0851b6', + './jssource/src_files/include/javascript/yui3/build/autocomplete/lang/autocomplete-list.js' => 'ed5030d8ac9bdcf54b7b98f432766487', + './jssource/src_files/include/javascript/yui3/build/autocomplete/lang/autocomplete-list_en.js' => 'c045db0a0f123c257eb004c2ee5b3c9d', + './jssource/src_files/include/javascript/yui3/build/autocomplete/lang/autocomplete.js' => '84a359c5142e74d4f13c884d4361c8fc', + './jssource/src_files/include/javascript/yui3/build/autocomplete/lang/autocomplete_en.js' => '7d6c448ae3a48356d8180182b37e2c91', + './jssource/src_files/include/javascript/yui3/build/datatable/datatable-base-min.js' => 'a659906c603c5a084a088d21db3b83fb', + './jssource/src_files/include/javascript/yui3/build/datatable/datatable-base.js' => 'ca96a033d3e6b40640785c55bec5b0a2', + './jssource/src_files/include/javascript/yui3/build/datatable/datatable-datasource-min.js' => '2c488b996036a6a1219d34666d7c5a55', + './jssource/src_files/include/javascript/yui3/build/datatable/datatable-datasource.js' => '0446f0ded967a91dda3042eb82118ce1', + './jssource/src_files/include/javascript/yui3/build/datatable/datatable-min.js' => '23b021c332464234fa798a4a8573102c', + './jssource/src_files/include/javascript/yui3/build/datatable/datatable-scroll-min.js' => 'e39afcc12f9d416bd62c35a963e053c6', + './jssource/src_files/include/javascript/yui3/build/datatable/datatable-scroll.js' => 'f9258cbf39703655d0299ed413be8c4a', + './jssource/src_files/include/javascript/yui3/build/datatable/datatable-sort-min.js' => '7367c32378870fb0ab84ceeee9865214', + './jssource/src_files/include/javascript/yui3/build/datatable/datatable-sort.js' => '67e113300f03aca3f08be5247f9fa716', + './jssource/src_files/include/javascript/yui3/build/datatable/datatable.js' => '293dd9fbb14d1be6a2ee6ef7af1e915e', + './jssource/src_files/include/javascript/yui3/build/datatable/lang/datatable-base.js' => 'a14e3b9ab1c10be41f14be092acdb3df', + './jssource/src_files/include/javascript/yui3/build/datatable/lang/datatable-base_en.js' => '0a42055849ae36d672a02dac7859e43a', + './jssource/src_files/include/javascript/yui3/build/datatable/lang/datatable-sort.js' => 'ec0c7ca5ed943c5e1c22f1bed9de35a7', + './jssource/src_files/include/javascript/yui3/build/datatable/lang/datatable-sort_en.js' => '245f3c1e70eff71b8201d087731385dd', + './jssource/src_files/include/javascript/yui3/build/datatable/lang/datatable.js' => 'e72e2dd6fc04b61ac8bb8f509b3c4c7b', + './jssource/src_files/include/javascript/yui3/build/datatable/lang/datatable_en.js' => '1d6b8e5105e491744f751265cd8e2b3d', + './jssource/src_files/include/javascript/yui3/build/editor/createlink-base-min.js' => '34dba90b52c233a86f3c8da9f508c072', + './jssource/src_files/include/javascript/yui3/build/editor/createlink-base.js' => 'e9babe85a72d4edc31370ac56179fab0', + './jssource/src_files/include/javascript/yui3/build/editor/editor-base-min.js' => 'fe87102ce584de764aa146dea54062c3', + './jssource/src_files/include/javascript/yui3/build/editor/editor-base.js' => 'cc4fef2f75b4bad38388347f16a3602b', + './jssource/src_files/include/javascript/yui3/build/editor/editor-bidi-min.js' => 'e631aed7efb9b78d4a5a5119d2969f33', + './jssource/src_files/include/javascript/yui3/build/editor/editor-bidi.js' => '3e270080851c6e1c7ca1c5cfc5245934', + './jssource/src_files/include/javascript/yui3/build/editor/editor-br-min.js' => '6ac02b6453195521d8d843d0dfb45cfd', + './jssource/src_files/include/javascript/yui3/build/editor/editor-br.js' => '9079dd86c1ade92a83854885f60caa14', + './jssource/src_files/include/javascript/yui3/build/editor/editor-lists-min.js' => '5e1b76ecbee92cd5a4e0c4a4df5924c0', + './jssource/src_files/include/javascript/yui3/build/editor/editor-lists.js' => '8d4373d30ff9b930a8ab225e96321c54', + './jssource/src_files/include/javascript/yui3/build/editor/editor-min.js' => '77200e3a0b3f5f37325552f6a6650d49', + './jssource/src_files/include/javascript/yui3/build/editor/editor-para-min.js' => '84ba9c53f2ba4c7ef5baae340fec77f4', + './jssource/src_files/include/javascript/yui3/build/editor/editor-para.js' => '85d5bafe11574c8b270aeb669e7f0361', + './jssource/src_files/include/javascript/yui3/build/editor/editor-tab-min.js' => '86df1915091a454487f7ef611a9344f1', + './jssource/src_files/include/javascript/yui3/build/editor/editor-tab.js' => '674623a8bf7b74382da07f6c27db57f0', + './jssource/src_files/include/javascript/yui3/build/editor/editor.js' => 'e12f4bf5281933f612fd5109cade9445', + './jssource/src_files/include/javascript/yui3/build/editor/exec-command-min.js' => 'aef642efb4a068222940268f6758af18', + './jssource/src_files/include/javascript/yui3/build/editor/exec-command.js' => 'ceb795ed9ed024786e56e4d87ee5924b', + './jssource/src_files/include/javascript/yui3/build/editor/frame-min.js' => '31bb0404b2e4a1f597329761acf4b6fd', + './jssource/src_files/include/javascript/yui3/build/editor/frame.js' => 'c69c1d05ce014c6883b8fb0ec6318aff', + './jssource/src_files/include/javascript/yui3/build/editor/selection-min.js' => 'c3767abe503720467b67e9c76d2b287b', + './jssource/src_files/include/javascript/yui3/build/editor/selection.js' => '4ebbaba6e83932cd7f2d214cec88da19', + './jssource/src_files/include/javascript/yui3/build/escape/escape-min.js' => '648b749dea6f1a94c5bfb2be805ac45d', + './jssource/src_files/include/javascript/yui3/build/escape/escape.js' => '73d6f7b50a316da1ae1dbfb3d5a4dfa0', + './jssource/src_files/include/javascript/yui3/build/event-gestures/event-flick-min.js' => '9581488baee1a123a5b25e79de22305e', + './jssource/src_files/include/javascript/yui3/build/event-gestures/event-flick.js' => '1c72e7cfe79211737663c3f2dca247c8', + './jssource/src_files/include/javascript/yui3/build/event-gestures/event-gestures-min.js' => '6626cd618e69a4cc4245167931164824', + './jssource/src_files/include/javascript/yui3/build/event-gestures/event-gestures.js' => 'e7a1db23996649effc19bb46a3eda7fb', + './jssource/src_files/include/javascript/yui3/build/event-gestures/event-move-min.js' => '8ee9714794c20f5955a160baa1c1a69e', + './jssource/src_files/include/javascript/yui3/build/event-gestures/event-move.js' => 'e1603f4e9cec7845db995ec06b7e655e', + './jssource/src_files/include/javascript/yui3/build/event-valuechange/event-valuechange-min.js' => '58ac8760264fa4d19ad586771e6c6a2d', + './jssource/src_files/include/javascript/yui3/build/event-valuechange/event-valuechange.js' => 'ce3787ce0803f9f1d672363949350f62', + './jssource/src_files/include/javascript/yui3/build/highlight/highlight-accentfold-min.js' => '28454ba5e1d439a705beb5e5dfcf572c', + './jssource/src_files/include/javascript/yui3/build/highlight/highlight-accentfold.js' => '8017c32672c391165a974c329f0b95b7', + './jssource/src_files/include/javascript/yui3/build/highlight/highlight-base-min.js' => '3c3f83d8b1baa815acff33388f428eaa', + './jssource/src_files/include/javascript/yui3/build/highlight/highlight-base.js' => 'ad63aaf5077cc39aaac135c270c466b6', + './jssource/src_files/include/javascript/yui3/build/highlight/highlight-min.js' => 'c586752ed1aea837601c0481809899b2', + './jssource/src_files/include/javascript/yui3/build/highlight/highlight.js' => '823d9e34927727ff56e5c8edcc44fe70', + './jssource/src_files/include/javascript/yui3/build/history-deprecated/history-deprecated-min.js' => '7b14ca4ff0f28b18d9055ecb27e3d5ae', + './jssource/src_files/include/javascript/yui3/build/history-deprecated/history-deprecated.js' => '20f8506b329ae67a7696c85d3043936b', + './jssource/src_files/include/javascript/yui3/build/intl/intl-min.js' => 'b9fb0949754b6d42796eda6e2101c917', + './jssource/src_files/include/javascript/yui3/build/intl/intl.js' => 'aa53761301220afbfb099b014ac7acde', + './jssource/src_files/include/javascript/yui3/build/jsonp/jsonp-min.js' => '47958e8b0dfdddcf4a901330eb68cb4d', + './jssource/src_files/include/javascript/yui3/build/jsonp/jsonp-url-min.js' => '048e1524434dd1c0f811a5fc7fb617b6', + './jssource/src_files/include/javascript/yui3/build/jsonp/jsonp-url.js' => '204b708475770d6221a0d655ad249133', + './jssource/src_files/include/javascript/yui3/build/jsonp/jsonp.js' => 'b5de6c7103ae45ab9bd04175a1f10069', + './jssource/src_files/include/javascript/yui3/build/node-flick/node-flick-min.js' => 'f9dd98e7bacb7c109a575a9c8a332a2a', + './jssource/src_files/include/javascript/yui3/build/node-flick/node-flick.js' => 'c6348f1b394685679056906ce9914412', + './jssource/src_files/include/javascript/yui3/build/querystring/querystring-min.js' => '12829bdaf3f1dc8f5265b57c2a5185d4', + './jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse-min.js' => 'b6020463c2cb2e16ffd6c6e12dec8f25', + './jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse-simple-min.js' => '81faec510734d4c0bf074898c0f54b02', + './jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse-simple.js' => '88e8d0d0ea7883a1fa12d621784755e0', + './jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse.js' => '2db46961a52fffecef9822e8b8aee81c', + './jssource/src_files/include/javascript/yui3/build/querystring/querystring-stringify-min.js' => '7966fb5c6e2dd42332dbd115c4480c58', + './jssource/src_files/include/javascript/yui3/build/querystring/querystring-stringify-simple-min.js' => '86427d3c4892b066a6144cce53739af4', + './jssource/src_files/include/javascript/yui3/build/querystring/querystring-stringify-simple.js' => 'e08018ad3356ca76288f46d1d1b992f1', + './jssource/src_files/include/javascript/yui3/build/querystring/querystring-stringify.js' => '1f8d2a5c3eb8232c3de1979c8bf1e2c5', + './jssource/src_files/include/javascript/yui3/build/querystring/querystring.js' => 'fa8eec1ab28304fcb0cef5caedb1a52b', + './jssource/src_files/include/javascript/yui3/build/recordset/recordset-base-min.js' => '74ec1d34d1ba86eb52aa558ed45ea73b', + './jssource/src_files/include/javascript/yui3/build/recordset/recordset-base.js' => 'a8374e201044484652a25fd9f0e96d97', + './jssource/src_files/include/javascript/yui3/build/recordset/recordset-filter-min.js' => '83bc157e818482fe597a3193cbd02661', + './jssource/src_files/include/javascript/yui3/build/recordset/recordset-filter.js' => '44f03acf4d72c8948d11d04081510b72', + './jssource/src_files/include/javascript/yui3/build/recordset/recordset-indexer-min.js' => 'd9de0db06d0d4b6c36ad6e3cde71f539', + './jssource/src_files/include/javascript/yui3/build/recordset/recordset-indexer.js' => '050a6678ab890d337be5f76d89b97637', + './jssource/src_files/include/javascript/yui3/build/recordset/recordset-min.js' => 'e9c21cd68355622dd89fcb311edf6934', + './jssource/src_files/include/javascript/yui3/build/recordset/recordset-sort-min.js' => 'fd4f2bf381c08df914983e8965e6b075', + './jssource/src_files/include/javascript/yui3/build/recordset/recordset-sort.js' => '38519135ab86332ad4aa0ed49927baf1', + './jssource/src_files/include/javascript/yui3/build/recordset/recordset.js' => '9da3a2ffba4225bde02cbc0b926c9eba', + './jssource/src_files/include/javascript/yui3/build/resize/resize-base-min.js' => 'cf7c0583336eb58aa1ba79b89312902c', + './jssource/src_files/include/javascript/yui3/build/resize/resize-base.js' => '982bd87bef4c067380afbd49d3d387aa', + './jssource/src_files/include/javascript/yui3/build/resize/resize-constrain-min.js' => 'bfcab641062ee2356165f1eb55385eb1', + './jssource/src_files/include/javascript/yui3/build/resize/resize-constrain.js' => '8bce8eb3205eb9074909c08712e2fd95', + './jssource/src_files/include/javascript/yui3/build/resize/resize-min.js' => '4f5815065a4823a09e91802de1a393ad', + './jssource/src_files/include/javascript/yui3/build/resize/resize-proxy-min.js' => '2c334a50aa9a10fe0b27888c28241fc6', + './jssource/src_files/include/javascript/yui3/build/resize/resize-proxy.js' => '80387392665490c6ba3f883d8d75b6f9', + './jssource/src_files/include/javascript/yui3/build/resize/resize.js' => '1aea530b19606193f0c261b3675a9c41', + './jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base-ie-min.js' => '424f255d7ab85eec702384bd8c388f11', + './jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base-ie.js' => '470edbbd6e793a60b37538153215f449', + './jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base-min.js' => '21a1e680d2c962a37147e802348525c6', + './jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base.js' => 'dbb3a1096b1f7f07bcc6fdc01d5c8bc9', + './jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-min.js' => '5b05416884cb82a059e30894eecadf77', + './jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-paginator-min.js' => '1f111c74c51b2b160bd4332244227ff1', + './jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-paginator.js' => '0e9e0019fd0fecd758f6bdf9d4fc7718', + './jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-scrollbars-min.js' => 'e052dad6ef919607584c43ee7b5aa42e', + './jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-scrollbars.js' => 'bfe24a6252027d6953fc15a4a8a8dd0b', + './jssource/src_files/include/javascript/yui3/build/scrollview/scrollview.js' => 'c056719501e6210b9f5d90c6722d1ec8', + './jssource/src_files/include/javascript/yui3/build/simpleyui/simpleyui-min.js' => '916692c640440f8a86336cf07c1f7301', + './jssource/src_files/include/javascript/yui3/build/simpleyui/simpleyui.js' => '941c0a3585a42c8d40dfe90fa047c2e3', + './jssource/src_files/include/javascript/yui3/build/sortable/sortable-min.js' => '588b4e43059da1e189c74dd0e304ad55', + './jssource/src_files/include/javascript/yui3/build/sortable/sortable-scroll-min.js' => '245753ed909c62be0db3feb398b4a6fd', + './jssource/src_files/include/javascript/yui3/build/sortable/sortable-scroll.js' => '51671f07af14a8cc03d5abce2ff44606', + './jssource/src_files/include/javascript/yui3/build/sortable/sortable.js' => '2c0a56110b0544bbdbb5589c74405ac7', + './jssource/src_files/include/javascript/yui3/build/swf/swf-min.js' => 'fd6ebecf52004e6de8ca687ac3bac3df', + './jssource/src_files/include/javascript/yui3/build/swf/swf.js' => 'b4d5adec07cdada5b3decf5eafc6a73c', + './jssource/src_files/include/javascript/yui3/build/swfdetect/swfdetect-min.js' => 'aa13411de0eca62acad7b492179c80e2', + './jssource/src_files/include/javascript/yui3/build/swfdetect/swfdetect.js' => '974f6328eb05cc24c379ed7942256950', + './jssource/src_files/include/javascript/yui3/build/tabview/tabview-base-min.js' => 'fcf32dcf4ed65e212cdd0abc2cc1179d', + './jssource/src_files/include/javascript/yui3/build/tabview/tabview-base.js' => '4e31a6b91b90619ba3a7679483ee7a0c', + './jssource/src_files/include/javascript/yui3/build/tabview/tabview-min.js' => '9a5557c0efd4c2e39e06c58918e24c58', + './jssource/src_files/include/javascript/yui3/build/tabview/tabview-plugin-min.js' => 'df91287276470a1dbc09c7176a304bce', + './jssource/src_files/include/javascript/yui3/build/tabview/tabview-plugin.js' => '5b4ba0408731a329963c11b0b41e89c9', + './jssource/src_files/include/javascript/yui3/build/tabview/tabview.js' => '71bfaae3677aa7e54c306d4b2e67a539', + './jssource/src_files/include/javascript/yui3/build/text/text-accentfold-min.js' => '97247aa969dd37f885261b28bfcb4f59', + './jssource/src_files/include/javascript/yui3/build/text/text-accentfold.js' => 'd020d799c3c93e04349a1d435ae223ad', + './jssource/src_files/include/javascript/yui3/build/text/text-data-accentfold-min.js' => '771aa204add3f5a9075c5282ffa9cdb8', + './jssource/src_files/include/javascript/yui3/build/text/text-data-accentfold.js' => 'cfd9a36cd686d07b65c8c8483b2ebf57', + './jssource/src_files/include/javascript/yui3/build/text/text-data-wordbreak-min.js' => 'db5129bc3898b7c2eb184961b2a05c4b', + './jssource/src_files/include/javascript/yui3/build/text/text-data-wordbreak.js' => '11789b43509530874a37925950fe8ca5', + './jssource/src_files/include/javascript/yui3/build/text/text-min.js' => '5e390e370ecde6714ccad212c29974af', + './jssource/src_files/include/javascript/yui3/build/text/text-wordbreak-min.js' => '6f30c7cc463ec3a07d1ad1eb46343769', + './jssource/src_files/include/javascript/yui3/build/text/text-wordbreak.js' => '1e40b5d45368b320917a071dc8a79dcb', + './jssource/src_files/include/javascript/yui3/build/text/text.js' => 'b425c59ea8b13f2170cb753e439bc3f7', + './jssource/src_files/include/javascript/yui3/build/transition/transition-min.js' => '9b760c34ed1c786b98a68c5adf2964e5', + './jssource/src_files/include/javascript/yui3/build/transition/transition-native-min.js' => 'a3d282fad6dca511268d207c4415dacb', + './jssource/src_files/include/javascript/yui3/build/transition/transition-native.js' => 'd5da7d3a8acf2bc43d803f52290dcf01', + './jssource/src_files/include/javascript/yui3/build/transition/transition-timer-min.js' => '0ff28b903c7f8c38ece81e14a983d344', + './jssource/src_files/include/javascript/yui3/build/transition/transition-timer.js' => '3bd2a6587f476f26d32a52e7d0af9a07', + './jssource/src_files/include/javascript/yui3/build/transition/transition.js' => '07924491be0c6fa4e3c2ba04895ba745', + './jssource/src_files/include/javascript/yui3/build/uploader/uploader-min.js' => '99a4a3405bea10740a53b2920a98ba90', + './jssource/src_files/include/javascript/yui3/build/uploader/uploader.js' => '5a0ffdbda22649b381291d23de53ea52', + './jssource/src_files/include/javascript/yui3/build/widget-anim/widget-anim-min.js' => '659d52dbdd59ab073398ab0b66b0b4e9', + './jssource/src_files/include/javascript/yui3/build/widget-anim/widget-anim.js' => '73dda979e61a729d65d9fde370194b70', + './jssource/src_files/include/javascript/yui3/build/yql/yql-min.js' => '9d94bc7ae9cf56021a5dc3f454a5b8bb', + './jssource/src_files/include/javascript/yui3/build/yql/yql.js' => 'e1a2b802089686337415bcbdc54c23f6', + './jssource/src_files/include/javascript/calendar.js' => '79f84bdbff22bf026d5c83325db18d82', './jssource/src_files/include/javascript/iscroll.js' => 'b6c232e3c54b2a1320b22c7ad920c842', - './jssource/src_files/include/jsolait/init.js' => '8523493b1d0ccfc3ed8110a093672ebf', - './jssource/src_files/include/jsolait/lib/codecs.js' => 'd3d41752845b924a0f69e1b3d0ad6c3e', - './jssource/src_files/include/jsolait/lib/crypto.js' => '2b012a4eccd9ba700d54bb843b4728d5', - './jssource/src_files/include/jsolait/lib/jsonrpc.js' => '86989d622fc00dd19a08e91e97080a19', - './jssource/src_files/include/jsolait/lib/jsonrpclite.js' => '0f2c76b00723aad1651180e9abb1333c', - './jssource/src_files/include/jsolait/lib/lang.js' => 'a229cd0758f3c58cb246ec0179ff870a', - './jssource/src_files/include/jsolait/lib/langlite.js' => '2823f3cf579b60fc8846d1a64fcdeee4', - './jssource/src_files/include/jsolait/lib/urllib.js' => '4c55cf9f1a01aa0979ef43ea7f268c51', - './jssource/src_files/include/jsolait/lib/xml.js' => 'e1559fd5cd5d259f2a8f7fd07a2d2b51', - './jssource/src_files/include/jsolait/lib/xmlrpc.js' => 'fb50af7f64c53c58d1f700c63c9823b9', - './jssource/src_files/include/jsolait/missingmixin.js' => 'b07c5d5a0215126b989a6756c96a59c9', + './jssource/src_files/include/javascript/sugar_yui_overrides.js' => '1638a8c085f483f30b52b83dd4fa6c03', './jssource/src_files/include/ytree/TreeView/HTMLNode.js' => '80d3d7b998e77999da2cd4fb0168ab68', './jssource/src_files/include/ytree/TreeView/MenuNode.js' => '78c155839f99bc3564183e1557d15d3f', './jssource/src_files/include/ytree/TreeView/Node.js' => '5558862b65a50dcfb297660196998435', @@ -3389,9 +3885,9 @@ $md5_string = array ( './jssource/src_files/include/ytree/TreeView/anim/TVAnim.js' => '1b2f5f2dfb95977adf382b57d61e8ee5', './jssource/src_files/include/ytree/TreeView/anim/TVFadeIn.js' => '036c5e47e6c096f468fa30288b9c18fb', './jssource/src_files/include/ytree/TreeView/anim/TVFadeOut.js' => '7bda0243ee0f0ae64829c57e387145f3', - './jssource/src_files/include/ytree/treeutil.js' => '1492cfbc8c36f9ccb0979d774a35ccf9', + './jssource/src_files/include/ytree/treeutil.js' => '49217b9609a131b42ad254d4975a1495', './jssource/src_files/install/dbConfig.js' => '0d1057ce97a0b3bceba85e5a60cc8962', - './jssource/src_files/install/installCommon.js' => 'd43d3636938297cb05601bcb5be9b9ca', + './jssource/src_files/install/installCommon.js' => '5fe5f2a0e30e16633b2f4632433d1aff', './jssource/src_files/install/license.js' => '52cdf49c190da2ac0281fb2321226569', './jssource/src_files/install/oc_convert.js' => '60918d1d5efb235678aad4b9496a979d', './jssource/src_files/install/oc_install.js' => '6778569a33cc4f9d998a68ac26bdadb0', @@ -3399,15 +3895,15 @@ $md5_string = array ( './jssource/src_files/install/siteConfig.js' => '8f1cb3569d65528020a372c455d6c5c4', './jssource/src_files/modules/ACLRoles/ACLRoles.js' => 'f908813757df44d7f7da3476ed5c8989', './jssource/src_files/modules/Accounts/Account.js' => '308daee2babb408bd0d4b818751fb23c', - './jssource/src_files/modules/Administration/javascript/Administration.js' => '10340e9de261979bff94638b189f855a', - './jssource/src_files/modules/Administration/javascript/Async.js' => '45cf7ef9d27c26e6eb05d568249439cf', + './jssource/src_files/modules/Administration/javascript/Administration.js' => '32125a210f0e4d4e2e3e5107a84c4f50', + './jssource/src_files/modules/Administration/javascript/Async.js' => '80e1e8c3e125c766da2a307079353f8e', './jssource/src_files/modules/Campaigns/DetailView.js' => 'c40d345f5f7fd992f12e418d07ec9fe3', './jssource/src_files/modules/Campaigns/WebToLead.js' => '684a5a3db8bf3d60f1135a971f6c5989', './jssource/src_files/modules/Campaigns/wizard.js' => 'e6d189c923944e10fa3049be5696b6e9', './jssource/src_files/modules/Connectors/Connector.js' => '8a297fca0ea108c6a5edb100eafd8432', './jssource/src_files/modules/Contacts/Contact.js' => 'f66093ba1e4899fe3daf18956d8b5e38', './jssource/src_files/modules/Currencies/EditView.js' => '22d07408e9aa6d940e0783147859b013', - './jssource/src_files/modules/Documents/documents.js' => '7f367a6449ffbd36ca66911e92345247', + './jssource/src_files/modules/Documents/documents.js' => 'ff0093f68d68b7cc0e864e28b6aac4c7', './jssource/src_files/modules/EmailTemplates/EmailTemplate.js' => 'b7a20a46340cb552cb0600dc4bc37f23', './jssource/src_files/modules/Home/about.js' => '3c3184898479de9affd42a03e8db87a3', './jssource/src_files/modules/InboundEmail/InboundEmail.js' => '3853f33e9a0a903d50e2c110be0c9f25', @@ -3419,7 +3915,7 @@ $md5_string = array ( './jssource/src_files/modules/Studio/JSTransaction.js' => '2f20a4a72eaa8cbdf3053e24c5772ee5', './jssource/src_files/modules/Studio/studio.js' => '65a10d40fee3188acc67a42e3fe9ca23', './jssource/src_files/modules/Studio/studiodd.js' => '454916d3c66c5379b4ec689943210e02', - './jssource/src_files/modules/Studio/studiotabgroups.js' => '99a6a9a9acdb2d03dc0c03f64c7ea5f1', + './jssource/src_files/modules/Studio/studiotabgroups.js' => '2941525a8832b5ac29990c649df21787', './jssource/src_files/modules/Studio/ygDDListStudio.js' => 'c89afaff39a354e78d231062bd2bfba0', './jssource/src_files/modules/UpgradeWizard/upgradeWizard.js' => '28a6c6e1d7f9da738e52268688536f6b', './jssource/src_files/modules/Users/DetailView.js' => '94d103ae46b3f10c2422315916b3f1fb', @@ -3431,50 +3927,49 @@ $md5_string = array ( './jssource/src_files/themes/Sugar5/js/style.js' => 'c8620b080d12b33473d62a201cf04187', './jssource/src_files/themes/default/js/style.js' => '65a0e333fd3833dbd11d61859546e2da', './jssource/minify_utils.php' => 'fafc5475a1d95f6b80f8c24459918094', - './jssource/minify.php' => 'b8960cda18806ed133dc05159c7f6bc9', - './jssource/jsmin.php' => '1a523af482b74cfb955570e7473c0bf1', - './jssource/JSGroupings.php' => '57ccc6edc58d4e9211c3d9b6dc7ce937', + './jssource/minify.php' => '219023f793e8ed83e536771bffcd988c', + './jssource/jsmin.php' => '70558acc143de9506c866b0056dcf416', + './jssource/JSGroupings.php' => '49859729343ee71f88e7ee045e90097c', './json.php' => '7c4686a02553172c041fb5f48152ed51', - './install/dbConfig.js' => '69bca766120dc4fc1250126d4bb33db6', - './install/installCommon.js' => '86b435083d11a2780ac1189b7d77c161', - './install/license.js' => '9b2da6eb1ddb4ff94e62ef2e86c068ea', - './install/oc_convert.js' => '0a83c4c475299c64b765e9b89de4a8a3', - './install/oc_install.js' => 'e1505d50e04198eebda7badc9cbb7ee2', - './install/register.js' => '5b971c7ca11ce58bc2a86a84fed318fe', - './install/siteConfig.js' => 'fa917a71f41c5333c0719c87946cb21f', - './install/welcome.php' => '1221f23fe55218b6a8669e617e8304da', - './install/systemOptions.php' => 'c804b898a9ca443863e2d56976cc987d', - './install/siteConfig_b.php' => 'b9711106eae66a85ab759a600966b1f8', - './install/siteConfig_a.php' => 'a034ed0f9fd806525b5de2eea409450c', + './install/dbConfig.js' => '34408e61d47a775a3cb67971bb710522', + './install/installCommon.js' => '9177e605553bb2a6619179d0e5dffc57', + './install/license.js' => '7e1c720dd7e26e4e844cd21d704f9ddd', + './install/oc_convert.js' => '73dbf87826eae6f405cd6f7f248c58f4', + './install/oc_install.js' => '5ad862913581aef4737edf1ec304a6e4', + './install/register.js' => '86ad6bdefa9d52530ad4d62256418ace', + './install/siteConfig.js' => 'aa25c40743a5d6db10fcf6c1705d86c9', + './install/welcome.php' => '1558a629544fe9d28bdff39fdc391198', + './install/siteConfig_b.php' => 'dd1f0da3a2277e722b34ada391943671', './install/seed_data/quotes_SeedData.php' => '98c856046f80ae8a4e4ed1b8243524fb', './install/seed_data/Advanced_Password_SeedData.php' => '10904eeddf5374e25ea86b043c1f8059', - './install/register.php' => 'ab3e8d3fa27294a08f3367a26480cdff', - './install/ready.php' => '3d072b5174a222e11a36a7bd33aa863c', + './install/register.php' => '4319442daa45bdad0af953e18944a92e', + './install/ready.php' => '4e9f9c7d9c3a454de6ecf16af5f36b71', './install/processing.gif' => 'd7c43fc19181ee59862601bfce100b41', + './install/systemOptions.php' => '051e53df4f09fc4210bb6768a7847542', + './install/siteConfig_a.php' => '17e8c6a41d5f4d3469e123ee98f93f7d', './install/licensePrint.php' => 'f569be1d51e52d0067ec1b2845a4c9b1', - './install/license.php' => 'b77114912cbd2dcb2ed7bd79364a2bcb', - './install/language/en_us.lang.php' => '323d1171ae5e00d8abea20f864d80901', - './install/performSetup.php' => 'fa88a490b6344e1c93748a082dc9e3dc', + './install/license.php' => '6739f461680a5a40971d83bc7b66b7ef', + './install/language/en_us.lang.php' => 'd2f2498a4b73469abe33a89f3bd61440', + './install/performSetup.php' => '4b55e2fef4f08b9b586556ee7537c56f', './install/install_defaults.php' => '3c67b082c1709e909dd1aaf051e9c589', - './install/installType.php' => '610e49880f0277ce2f7d4f92f43a5188', - './install/installSystemCheck.php' => '5a838d917ba5bce6796a1650621bf936', + './install/installType.php' => 'cc447dd870b6eb51027abeb4d4674087', + './install/installSystemCheck.php' => 'd8b035f439553f09bb2a03a66fd36e4a', './install/installHelp.php' => '778245d44eb05d830a28ecc56135e98c', './install/installDisabled.php' => '99893d6cd92bef3120ccfe5d3dab127c', './install/install.css' => '862e23df1815d0138cf0a367d92a372d', - './install/download_patches.php' => '5e368942a39067c98762efa043f3e30f', - './install/download_modules.php' => '6d02fd07cfa964f47204b8f4b69efdd7', + './install/download_patches.php' => 'c1942d9e73b9ce80eb645e4ec925a5e0', + './install/download_modules.php' => '021ce0af2484d89e13474a9b5cef7039', './install/install_utils.php' => '458c1122a57a0b8bf56188844bef7567', - './install/populateSeedData.php' => 'eff9d58196b49139ad94a4f79af810ab', + './install/populateSeedData.php' => '8867869db5ca3f45cef110ec4515152d', './install/demoData.en_us.php' => 'ab6d0dc87a9f421e843ac454aec4546a', - './install/dbConfig_a.php' => '2e20033c538c76a54f2aaeed13c42118', + './install/dbConfig_a.php' => 'ea11513c27fe2c5cdc0241a1fe744cfb', './install/data/disc_client.php' => 'e4574285e612f49e6a5b002e3bf0b6c9', - './install/confirmSettings.php' => 'd1f527ff141c6ad3ae301a79d9ff1aec', - './install/checkDBSettings.php' => 'ed512c139b8959d465850b1ac6df724f', + './install/confirmSettings.php' => 'a04b54ee667cd223b473ce970297b9b2', + './install/checkDBSettings.php' => '5b5e8721730cd6f5b1097869a6dc9541', './install/UserDemoData.php' => '50640057634782bb6f0cf4e34313346c', './install/UploadLangFileCheck.php' => '011b7ae7a9711e6eb231155e24c66e63', './install/TeamDemoData.php' => '1cf512bcb6834cdac2c154b2f42d14cd', './index.php' => '85d2f32e8b794128592f116a91fcef72', - './include/JSON.js' => '603ba7c5edab1ce11d7d1ab3fd98e808', './include/externalAPI/ExternalAPIFactory.php' => 'b94ed8c1a24578abe4e5b30f484ccfbe', './include/externalAPI/Base/WebMeeting.php' => '53cbdd0ac77fde2542711093c64f83b9', './include/externalAPI/Base/WebFeed.php' => '6ce8b5213a9f52991c30a9597686aa9a', @@ -3485,14 +3980,14 @@ $md5_string = array ( './include/externalAPI/Base/ExternalAPIBase.php' => '1cf9620929e1bee7faf4b0983b82acb2', './include/SugarOauth.php' => 'd24af34a6a5ae0b8e6a1be649e84acf7', './include/SugarDateTime.php' => '518a6813da5d0c6cdba79864ff6be772', - './include/ytree/treeutil.js' => '207ba84cc64d01b55a483124152dddc2', - './include/ytree/TreeView/HTMLNode.js' => '84858f719e9b3740d1c58991b0f50d44', - './include/ytree/TreeView/MenuNode.js' => '8d001c1014dc6755f150cd83c1dfe07b', - './include/ytree/TreeView/Node.js' => '3932d3c94081e6b06eca764d715d8336', - './include/ytree/TreeView/RootNode.js' => 'd69d0bab9738e0772368d8a4cd65d031', - './include/ytree/TreeView/TaskNode.js' => '705d97683a5d0f9ed47ec82a5b3f94e6', - './include/ytree/TreeView/TextNode.js' => '736fa145ec95723013aaf44d3f17fdbb', - './include/ytree/TreeView/TreeView.js' => '938b1c6bf4d2fedd1811eadaa7036801', + './include/ytree/treeutil.js' => '5b4d6de1dc71dc826bc04337b8d7a466', + './include/ytree/TreeView/HTMLNode.js' => 'f73d59166b242b7a8d43a4c597d96f80', + './include/ytree/TreeView/MenuNode.js' => 'b80e41c7de13feb9a995dc8e4a57a21f', + './include/ytree/TreeView/Node.js' => '94179d8f07c8367d27215a59eaa77e3c', + './include/ytree/TreeView/RootNode.js' => 'd5adcf7f2d7d7cd32fd3981ec20c7d21', + './include/ytree/TreeView/TaskNode.js' => '9b9072cf72b3c4bcd6957d38c4d48c3d', + './include/ytree/TreeView/TextNode.js' => '48a0d37313cd79e95322ef7903196349', + './include/ytree/TreeView/TreeView.js' => '42bde0a9fd8b37b156b060a4e62552df', './include/ytree/TreeView/license.txt' => 'a49b2f02abb652b7d30356b10661c18d', './include/ytree/TreeView/img/qtop.png' => '6c5cfe5abcdd98f795456d6c4b07dcef', './include/ytree/TreeView/img/qmiddle.png' => '37835a6f515fd99bf5f8db07e53c9152', @@ -3547,14 +4042,14 @@ $md5_string = array ( './include/ytree/TreeView/css/forecasts/tree.css' => '59797a1f43dc5602932f826d687d398f', './include/ytree/TreeView/css/folders/tree.css' => '59797a1f43dc5602932f826d687d398f', './include/ytree/TreeView/css/default/tree.css' => '20814fc9a87f0aa930984569bd77fd2c', - './include/ytree/TreeView/css/check/tree.css' => '724cc963f0904fe2ed1f443cef791197', - './include/ytree/TreeView/anim/TVAnim.js' => 'cf0ce06993b1e732fb7626c429b5dd9d', - './include/ytree/TreeView/anim/TVFadeIn.js' => 'a49bd8604c75d29778602f346001a761', - './include/ytree/TreeView/anim/TVFadeOut.js' => 'd1fc4b1340b7430688b0866493d11685', - './include/ytree/Tree.php' => '0b56d45a461aa2035559e6e83b3b95d9', + './include/ytree/TreeView/css/check/tree.css' => '0eb57b9c70f75ca706fbab4e29ac2ad7', + './include/ytree/TreeView/anim/TVAnim.js' => 'b276fcda3727554bec9152c673c9dfa2', + './include/ytree/TreeView/anim/TVFadeIn.js' => '4a6f136f571ebde58a432165777aa91c', + './include/ytree/TreeView/anim/TVFadeOut.js' => '9880440dcd3f13cabda60bf3b0123fcb', + './include/ytree/Tree.php' => '9a55f8e48383e926804d684cba925d18', './include/ytree/Node.php' => '537ea99369cc451f6d02e6ccd33c4eec', './include/ytree/ExtNode.php' => 'f4bcdda0640f5ad72e95835419b59435', - './include/vCard.php' => '96cca0a297a8ecce67e0894b072b0793', + './include/vCard.php' => '3cb853936dcf59576fcf7043e7ab0061', './include/utils/php_zip_utils.php' => '776cdb257fd48ca212940f60687cd149', './include/utils/sugar_file_utils.php' => '5dbecfc86fec0dcd5c15d69c9c68758e', './include/utils/security_utils.php' => '5848837442f97823077e87a384e7e691', @@ -3564,21 +4059,21 @@ $md5_string = array ( './include/utils/layout_utils.php' => 'e7b465492ed76893b109e2baa31cabea', './include/utils/file_utils.php' => 'cd7b33adab01fd36d0953e40a336dffd', './include/utils/external_cache.php' => '4138cf307fea4ca68817b4c80250cab0', - './include/utils/mvc_utils.php' => '9176cc44c66e70eb43af3134a4393fd2', + './include/utils/mvc_utils.php' => 'bf0021ce03ee55d732bcee4fa792b5e0', './include/utils/encryption_utils.php' => '060b4fa727c1d48fa8ec2809e2fb58cf', - './include/utils/db_utils.php' => '6c76995e0c7bfb05066e4e58a88e412a', + './include/utils/db_utils.php' => '9b3d1516d07438b8cac025baf539fcc0', './include/utils/autoloader.php' => '76818f941992acf4caa205cc6f2aa0c9', './include/utils/array_utils.php' => '4a63065e0ab62bfc33b9429f886ed7ec', './include/utils/activity_utils.php' => '96a8bd8977d5e7532e3b7d8ca3a583ee', './include/utils/LogicHook.php' => '3d65be3d74e10ecdf5aee20b2efceee6', - './include/utils.php' => '39ee0df9dd7a821e0b018a926e53f450', + './include/utils.php' => 'e2809b9a9a72c05fc36d95b2474db9cf', './include/upload_file.php' => '177f5eb2032e0c7797e11f93efb759f3', './include/timezone/timezones.php' => '0b0ffe9ce81f1652daec48cf2fbdd688', './include/templates/TemplateGroupChooser.php' => '111b7db20ad8143651bc7bba835894df', './include/templates/TemplateDragDropChooser.php' => '1fd1388bfd445beeb715a78cf5fbafe5', './include/templates/Template.php' => '5b1709f5a4cf514bfe1f05f074340640', './include/tcpdf/unicode_data.php' => 'd20008bba6110e94611ac0939a92913b', - './include/tcpdf/tcpdf.php' => '2d63d36838205a8d52725d0c888bbab5', + './include/tcpdf/tcpdf.php' => '4decba8197a91edb47e45f95da9cfc0b', './include/tcpdf/htmlcolors.php' => '0015bab537767d694b0304d91a87c5f1', './include/tcpdf/fonts/utils/makefont.php' => '07068b0cd9415eaa2c4165f0bc980e7d', './include/tcpdf/fonts/utils/enc/koi8-u.map' => '9046b7222af56cb6bbc349cac9dbabdf', @@ -3670,368 +4165,1014 @@ $md5_string = array ( './include/language/jsLanguage.php' => 'f39b23266c5f25d253082afb6a210fe2', './include/language/en_us.notify_template.html' => '4e90b0343ac29bf12687dddb15afea7d', './include/language/en_us.lang.php' => '73f8214fa78457568c881183534d1911', - './include/jsolait/init.js' => '15b8d113066ad400aa80d9dfc35b544b', - './include/jsolait/missingmixin.js' => 'e87a7ee61bd9e134791325d98ca72d9b', - './include/jsolait/lib/codecs.js' => 'c3e9eb73b3187f1b69e33bde1a635712', - './include/jsolait/lib/crypto.js' => '3f96a9c701df13c7e3439dc66ac9cc83', - './include/jsolait/lib/jsonrpc.js' => '1dc4f35a1cc650dceae36463fc421751', - './include/jsolait/lib/jsonrpclite.js' => '087168595f8d7d4633b0d5ebc5efa0ad', - './include/jsolait/lib/lang.js' => '4680e079a4114db6ef54d0ced899547f', - './include/jsolait/lib/langlite.js' => 'd76525f7eeffc76252d0be3cb72081bb', - './include/jsolait/lib/urllib.js' => '7dfb28b9ac9435bee4a1d1aa8721050b', - './include/jsolait/lib/xml.js' => '778da59ff6d89d7c6cde9814db71f63e', - './include/jsolait/lib/xmlrpc.js' => '561bc3aca65261c577ab56b9908d6b78', - './include/jsolait/copying.txt' => '7fbc338309ac38fefcd64b04bb903e34', - './include/jsolait/LICENSE' => '7fbc338309ac38fefcd64b04bb903e34', './include/json_config.php' => '73219c3de81147aa2e18580b497353e6', - './include/javascript/sugar_grp_quickcomp.js' => 'c7cea14477c8fc57e010fd2f76076826', - './include/javascript/sugar_grp_emails.js' => 'b55feea4d5ebe84a6f904a75950d3414', - './include/javascript/sugar_grp_overlib.js' => '697dc29858751a3a9848ded2d5cc9638', - './include/javascript/sugar_grp_yui2.js' => '810b0d52b0d73ca309673fa8c88f7275', - './include/javascript/sugar_grp_yui_widgets.css' => '9fead3f803643c74f997b323e0a7b4e7', - './include/javascript/sugar_grp_yui_widgets.js' => 'e4c888613deed6eeb327917a5f6f0c9c', - './include/javascript/sugar_grp1_yui.js' => 'ca0556ee4f9844174000e6822ef46fc4', - './include/javascript/sugar_grp1.js' => '8136c11805a4e526a32413cd5d7eb52a', - './include/javascript/cookie.js' => 'c17e3c176f5bb5b2683718f5b7d275a9', - './include/javascript/dashlets.js' => '1e9808c9ce91257c101d96d4f947fdb3', - './include/javascript/include.js' => '111549b33d8ca4011ca99a23105050fe', - './include/javascript/jsclass_async.js' => 'da23227b11a7c39836e5263cadb1420a', - './include/javascript/jsclass_base.js' => '385bf139034e634a19bfce54ef6f2d38', - './include/javascript/menu.js' => '59893066f0c2f0e361bbcafc77b3fea7', - './include/javascript/overlibmws.js' => 'f4bac256b9f8dc64ba4b22a8e1259ea2', - './include/javascript/overlibmws_iframe.js' => 'e3c045ac5f7b73aeb761395339d82f30', - './include/javascript/popup_helper.js' => 'af57458c77592551b0f5b8760e16ca6f', - './include/javascript/popup_parent_helper.js' => '95546571e45d486a2bfb5ae4d23478b0', - './include/javascript/quickCompose.js' => '8702e1904189f22c31f88b05e22398e7', - './include/javascript/quicksearch.js' => '0aa69ecc998c49edc302d388da955bac', - './include/javascript/report_additionals.js' => 'e5f134ab662aefa681dc3c001b361730', - './include/javascript/sugar_3.js' => '49558dcafccb84e6ac9df6afe2fef82f', - './include/javascript/sugar_connection_event_listener.js' => '6c40c4c05f7be79d30ce642029720cac', - './include/javascript/swfobject.js' => 'be72d27dc0b8bf006dcb764e41153465', - './include/javascript/calendar.js' => 'ee7be017a1f096bb94f425bdbe241dd4', - './include/javascript/iscroll.js' => '0b9c55c0f6a677ef7ca628f156527456', - './include/javascript/yui3/index.html' => '9ff89ada5571d6d03eccc45dad57bb16', - './include/javascript/yui3/build/yui/get-min.js' => '1ef08bacb464ead1fbdb74d45addca6f', - './include/javascript/yui3/build/yui/get.js' => '1b0ea131a29adf2a1957ad11be4547ff', - './include/javascript/yui3/build/yui/yui-base-min.js' => 'de6b8b73e1c8e76f133d11558e7c4bc1', - './include/javascript/yui3/build/yui/yui-base.js' => '29bd3f7d9d24e14f1466ca6cf3af0621', - './include/javascript/yui3/build/yui/yui-later-min.js' => 'de7018bad67d935f79056f53c4b9bae8', - './include/javascript/yui3/build/yui/yui-later.js' => '07f60f940e65cba323f7d1ea7770d6c4', - './include/javascript/yui3/build/yui/yui-log-min.js' => 'dcf94ddce82e2f7cfab2fd161cd1aa00', - './include/javascript/yui3/build/yui/yui-log.js' => '7c3b34cc3d8859dd9e02de454ba709bd', - './include/javascript/yui3/build/yui/yui-min.js' => '0ca4f321bfeed095cb08925a08b114cf', - './include/javascript/yui3/build/yui/yui.js' => '634b41d7fe986424d3e7763f1b18e9b2', - './include/javascript/yui3/build/yui-base/yui-base-min.js' => 'a20b8b96c0821cce4cc20ab3b99878dd', - './include/javascript/yui3/build/yui-base/yui-base.js' => '3a83e55089053158f8ec7423e2eeff57', - './include/javascript/yui3/build/widget/widget-min.js' => '24928861ac270e600b2ea3277612c5f1', - './include/javascript/yui3/build/widget/widget-position-min.js' => '3391301b7af5dea8c5163d0ddc63b480', - './include/javascript/yui3/build/widget/widget-position.js' => 'dfcee3d06222c8fc165b3627fed4502d', - './include/javascript/yui3/build/widget/widget-stack-min.js' => '4a4ab3267d670687cd8e815fb078d72c', - './include/javascript/yui3/build/widget/widget.js' => '8679113a40a66836f11ce5599a12466a', - './include/javascript/yui3/build/widget/widget-stack.js' => 'cd97ea674bbe04b6a407d41df4f9c227', - './include/javascript/yui3/build/widget/widget-stdmod-min.js' => 'a846de3ea9c28347e820e1d89e2a6e8d', - './include/javascript/yui3/build/widget/widget-stdmod.js' => '7c224c854eee925dfcafe3721b4097e8', - './include/javascript/yui3/build/widget/widget-position-ext-min.js' => '416976f75c79b425008d728aa253db16', - './include/javascript/yui3/build/widget/widget-position-ext.js' => 'afb3f01c231512ef5a280dda464dd5e1', - './include/javascript/yui3/build/widget/assets/widget-core.css' => 'b5179c8ccb369156c4f06f95a0b8e990', - './include/javascript/yui3/build/widget/assets/widget-stack-core.css' => 'a919053fece78808dea8cf75726a2538', - './include/javascript/yui3/build/widget/assets/skins/sam/widget.css' => 'decf1eca11ec8631869f28489f971cdb', - './include/javascript/yui3/build/widget/assets/skins/sam/widget-stack.css' => '49c59b028955c4d2636b68b2611fffc9', - './include/javascript/yui3/build/widget/assets/skins/sam/widget-stack-skin.css' => '59812846f1a49258858027fdff6fbaf3', - './include/javascript/yui3/build/widget/assets/skins/sam/widget-skin.css' => '59812846f1a49258858027fdff6fbaf3', - './include/javascript/yui3/build/test/test-min.js' => '033ba1b211a9e4d70660aa05826991de', - './include/javascript/yui3/build/test/test.js' => 'f50abfdd993e09d5da39e7ce7d50a18c', - './include/javascript/yui3/build/test/assets/test-console.css' => 'b0ea686a876f14fce6954adf5d36529f', - './include/javascript/yui3/build/substitute/substitute-min.js' => 'fc6b84ff1528df7994ed6356bf01f86e', - './include/javascript/yui3/build/substitute/substitute.js' => 'ab69725d254c9f349e344ac960172dab', - './include/javascript/yui3/build/stylesheet/stylesheet-min.js' => '2a4cdbf63bc1ca5dda092977b190a1ae', - './include/javascript/yui3/build/stylesheet/stylesheet.js' => 'f0d67c55d1fd7da85968ed7c2b9262ba', - './include/javascript/yui3/build/slider/slider-min.js' => 'e303db37ce46472d8f55e34d54a04137', - './include/javascript/yui3/build/slider/slider.js' => '540f11a0718a9a074b87f3430a509ae9', - './include/javascript/yui3/build/slider/assets/slider-core.css' => '9885637b85e819c60399de5f884077a0', + './include/javascript/sugar_grp_quickcomp.js' => 'fa9afd6c1945da32fa0d19b10fdad7a3', + './include/javascript/sugar_grp_emails.js' => 'e19ec1a275b5e11233c46e1f24c1aba1', + './include/javascript/sugar_grp_overlib.js' => '1ae8c7614a7ed6e6b21806f191bb2ae2', + './include/javascript/sugar_grp_yui2.js' => '613bb6a5e0e5e934a88293f6ae2ffa43', + './include/javascript/sugar_grp_yui_widgets.css' => '87d9287720879ff935fa2b80690ede5e', + './include/javascript/sugar_grp_yui_widgets.js' => '7cc525f73e9a0e49bbbb06363813c84b', + './include/javascript/sugar_grp1_yui.js' => '2e8034083b6cf4f72bd45ca10aff5a34', + './include/javascript/sugar_grp1.js' => '977e83a63830e8de3fcfeef7c2782b0d', + './include/javascript/cookie.js' => '4f95a2872a549573149d035633086662', + './include/javascript/dashlets.js' => '208d5f32d367390faadda8e899f99b77', + './include/javascript/include.js' => '1b6f04c9cdbc1f25b3c4de8e049a2433', + './include/javascript/jsclass_async.js' => 'e3b7af84fca3494ffaf12eea764078e5', + './include/javascript/jsclass_base.js' => '848b03e3cf892fe9ba21e85df0e25848', + './include/javascript/menu.js' => 'bab1eb80c6cf5cb048efc10e9eec8aaf', + './include/javascript/overlibmws.js' => '5e18c62656d6c7fd4db7b220508a2df7', + './include/javascript/overlibmws_iframe.js' => '1106371e305114a18d5a5186cf24343e', + './include/javascript/popup_helper.js' => '7a767b94d23b9beb4f3fbd8c7b6454c5', + './include/javascript/popup_parent_helper.js' => '2549c3668f01e9b28eff1a62418d35c6', + './include/javascript/quickCompose.js' => '8fbd8976c73311dfe73d4124949b8118', + './include/javascript/quicksearch.js' => '1bf7a688b074ca65f2d2f499ebb844b8', + './include/javascript/report_additionals.js' => '6edec1a89ec68998008c4469f2d00e13', + './include/javascript/sugar_3.js' => 'c57b99fc67805d877d1dd5d09a670b2b', + './include/javascript/sugar_connection_event_listener.js' => '4a3c4a128bbbcd0817a07cb0e7423d92', + './include/javascript/swfobject.js' => 'e83d1ca12de8ee2787c9189119cbd959', + './include/javascript/calendar.js' => '74e959df9c5364713a6b3bca6ea926ad', + './include/javascript/iscroll.js' => 'f2f4abe47439bfe02f0001e51dcbd0cd', + './include/javascript/sugar_yui_overrides.js' => '8b8fb375212373da32e94c349c101a31', + './include/javascript/yui3/index.html' => '34db637b1b8f7789823bda3e0da02864', + './include/javascript/yui3/build/yql/yql-min.js' => 'e3582bda8b9a7f16f6528d760b738e5a', + './include/javascript/yui3/build/yql/yql.js' => '3073cfe7d59ad9fb70d82c847d618a3d', + './include/javascript/yui3/build/widget-anim/widget-anim-min.js' => 'f795a9534d013dedadee7bc698642325', + './include/javascript/yui3/build/widget-anim/widget-anim.js' => '5e9c4633f38dae7d0e0fbc04a83e3749', + './include/javascript/yui3/build/uploader/uploader-min.js' => '2907e2bb03dfa556fbe6dce549300ffb', + './include/javascript/yui3/build/uploader/uploader.js' => 'c8151fe91da8da493203d7273cc57621', + './include/javascript/yui3/build/uploader/assets/uploader.swf' => '7efdb06c1b588ed4878d7f24b366fac4', + './include/javascript/yui3/build/transition/transition-min.js' => '2196c21292698f2868e50b98a3bb79b3', + './include/javascript/yui3/build/transition/transition-native-min.js' => '0ef20ee2fdb73d57670fd9193c102b43', + './include/javascript/yui3/build/transition/transition-native.js' => 'dfdd8b6cbe5d078a3afe61b372eeaeeb', + './include/javascript/yui3/build/transition/transition-timer-min.js' => 'cfab874fc6d5bd2afe0716f10e3d4015', + './include/javascript/yui3/build/transition/transition-timer.js' => '0b775882e1719343f86e14a69f1fd006', + './include/javascript/yui3/build/transition/transition.js' => '1c65cc6ed051c9c687652ca7dd8945e1', + './include/javascript/yui3/build/text/text-accentfold-min.js' => 'e56132b53f6d39ee26160c4fcdc12064', + './include/javascript/yui3/build/text/text-accentfold.js' => 'e955a8ec31728a8d1f576a38e1b140d3', + './include/javascript/yui3/build/text/text-data-accentfold-min.js' => 'e3671dec63a6813b5e7d8888f51638e8', + './include/javascript/yui3/build/text/text-data-accentfold.js' => 'f432b1ffd9576dc9a564450e8d50d9db', + './include/javascript/yui3/build/text/text-data-wordbreak-min.js' => '5853b7e2da3350eab4590f85ea3378d7', + './include/javascript/yui3/build/text/text-data-wordbreak.js' => '5b261002fd2c23f4a3a91cf7dd5c4f73', + './include/javascript/yui3/build/text/text-min.js' => 'ba4d1c3b194fe0189ddcea0f172a8a17', + './include/javascript/yui3/build/text/text-wordbreak-min.js' => 'bd871e7999ddcc60549f4ade5dc012e3', + './include/javascript/yui3/build/text/text-wordbreak.js' => 'e04cf8cbc6ab83135956cfd59f1232f4', + './include/javascript/yui3/build/text/text.js' => 'aa5090d8fb5d1e2e19c43632a0f7761a', + './include/javascript/yui3/build/tabview/tabview-base-min.js' => '2514d9a9d51c45d086d0a0ac3e4a04a0', + './include/javascript/yui3/build/tabview/tabview-base.js' => '82991881c3ba7209355d12ed355547c3', + './include/javascript/yui3/build/tabview/tabview-min.js' => 'ef86854631f5cf07eee1f47789630539', + './include/javascript/yui3/build/tabview/tabview-plugin-min.js' => '7c0b109641eaf236909d1added62b5a1', + './include/javascript/yui3/build/tabview/tabview-plugin.js' => '45d62d0c1957cb09c1d39755a6d38235', + './include/javascript/yui3/build/tabview/tabview.js' => '5f48b1a7a30403177b90cb54350081c5', + './include/javascript/yui3/build/tabview/assets/tabview.css' => '3223ed763c7484f6fe42eee48c39a3fe', + './include/javascript/yui3/build/tabview/assets/tabview-core.css' => 'b85403a80074100429f6d2c8ce608f5a', + './include/javascript/yui3/build/tabview/assets/skins/sam/tabview.css' => '81cd6485b9347baf77ded7fed990eaf7', + './include/javascript/yui3/build/tabview/assets/skins/sam/tabview-skin.css' => '07f76bf8e00895eb80e022c7ba46a411', + './include/javascript/yui3/build/swfdetect/swfdetect-min.js' => '96ae1de597d6a8acd2864281c09d60d9', + './include/javascript/yui3/build/swfdetect/swfdetect.js' => 'de87d3d7fca2f2126dd5be4b7d32445e', + './include/javascript/yui3/build/swf/swf-min.js' => '24d439b05d097193468426782b8fd9cf', + './include/javascript/yui3/build/swf/swf.js' => '21f1ca4810b4d5b8d0a45a9b8d195ca4', + './include/javascript/yui3/build/sortable/sortable-min.js' => '6f5c5e9236bb75abbc457f088145c96e', + './include/javascript/yui3/build/sortable/sortable-scroll-min.js' => '878545847df6df53c3d3611a26f32224', + './include/javascript/yui3/build/sortable/sortable-scroll.js' => '2e9ad5c4773a8e27ad62477874e39f05', + './include/javascript/yui3/build/sortable/sortable.js' => 'f4e5b5628d5861f249c0beb8281ea84f', + './include/javascript/yui3/build/simpleyui/simpleyui-min.js' => 'edc084a1cbea212c03429528ab0f0191', + './include/javascript/yui3/build/simpleyui/simpleyui.js' => '1c91b125de3a4c2ad48ca738845f7ca5', + './include/javascript/yui3/build/scrollview/scrollview-base-ie-min.js' => 'f4e3c3425e72b0a95b0ba1029043b088', + './include/javascript/yui3/build/scrollview/scrollview-base-ie.js' => '6e89ae7d8c4a628f5e909e08f891e297', + './include/javascript/yui3/build/scrollview/scrollview-base-min.js' => '5c021b3de0ff07161787f3c83cac41bb', + './include/javascript/yui3/build/scrollview/scrollview-base.js' => '3ed1cef71c32904002b6cdf84c98e093', + './include/javascript/yui3/build/scrollview/scrollview-min.js' => 'a8a0c5053657acb21df89140787d0e18', + './include/javascript/yui3/build/scrollview/scrollview-paginator-min.js' => 'b686305a0f3a2e885ac6b3248c529adf', + './include/javascript/yui3/build/scrollview/scrollview-paginator.js' => '5c37f389d7e2201ffad5c9fdbac91f76', + './include/javascript/yui3/build/scrollview/scrollview-scrollbars-min.js' => '51193b7c92cd70865da9f495a707ec49', + './include/javascript/yui3/build/scrollview/scrollview-scrollbars.js' => '8f889cf568d8f2c961d19646d8c2debd', + './include/javascript/yui3/build/scrollview/scrollview.js' => '18456cc81381910b6943f44b83c80011', + './include/javascript/yui3/build/scrollview/assets/skins/sam/scrollview-scrollbars.css' => 'bd94405f2aa046e1ca1b53834381cdd1', + './include/javascript/yui3/build/scrollview/assets/skins/sam/scrollview-scrollbars-skin.css' => 'd812c67f16aefb7ab4bc8b39aa6ab151', + './include/javascript/yui3/build/scrollview/assets/skins/sam/scrollview-paginator.css' => 'a9bbc9a40805d229a1d8f504c6736ef6', + './include/javascript/yui3/build/scrollview/assets/skins/sam/scrollview-paginator-skin.css' => 'c72e1916028b9e33825c6bbc59faadcb', + './include/javascript/yui3/build/scrollview/assets/skins/sam/scrollview-base.css' => '561c7ebc7da9a44594e2e7667c4ddbc2', + './include/javascript/yui3/build/scrollview/assets/skins/sam/scrollview-base-skin.css' => '0b158c95be2b2c9618663e8587e6f68a', + './include/javascript/yui3/build/scrollview/assets/scrollview-scrollbars-core.css' => '073ff93310393ae11a81fb28c095706d', + './include/javascript/yui3/build/scrollview/assets/scrollview-paginator-core.css' => 'a0ed11356da8c12daca562d3d9392e82', + './include/javascript/yui3/build/scrollview/assets/scrollview-base-core.css' => '3ba03495b54c0abaa776c5a1a7313352', + './include/javascript/yui3/build/resize/resize-base-min.js' => '1d0bdfbb8e4eda9b95deda4b4c3d2094', + './include/javascript/yui3/build/resize/resize-base.js' => '4e2d339894f3d05f45cd7ac2183897e6', + './include/javascript/yui3/build/resize/resize-constrain-min.js' => '6dbfa32608d7009adb56dbe9f94985da', + './include/javascript/yui3/build/resize/resize-constrain.js' => '27e81bd7e4f9b633f8d0de3ec0f19af4', + './include/javascript/yui3/build/resize/resize-min.js' => '77bd6a7e3a039a175778e932d6af9eda', + './include/javascript/yui3/build/resize/resize-proxy-min.js' => 'be9aa6ed9e0d5eac723a3d87b99605e5', + './include/javascript/yui3/build/resize/resize-proxy.js' => '517267afcbebe69e9de715482a357db2', + './include/javascript/yui3/build/resize/resize.js' => '0dcd8146110d02924566ff25bfda0ccf', + './include/javascript/yui3/build/resize/assets/skins/sam/resize.css' => 'fd129042d834d2bbe7d68df87d32e21a', + './include/javascript/yui3/build/resize/assets/skins/sam/resize-base.css' => 'fd129042d834d2bbe7d68df87d32e21a', + './include/javascript/yui3/build/resize/assets/skins/sam/resize-base-skin.css' => '4950bd0d27e7a7fb22d76c0bf4584aba', + './include/javascript/yui3/build/resize/assets/skins/sam/arrows.png' => '9148676baacd454969d9acd70b279de6', + './include/javascript/yui3/build/resize/assets/resize-base-core.css' => '877291e031af73460fcd9a0daf738d3b', + './include/javascript/yui3/build/recordset/recordset-base-min.js' => '67e80f1eeae05310deb27865215dea7f', + './include/javascript/yui3/build/recordset/recordset-base.js' => 'cf656d9d0db777e56c0340d4771f3cfe', + './include/javascript/yui3/build/recordset/recordset-filter-min.js' => '2291d08d8a7e9d43eb5a53c79dc90771', + './include/javascript/yui3/build/recordset/recordset-filter.js' => 'dad8e6883903de6b84c4ea0724c8570e', + './include/javascript/yui3/build/recordset/recordset-indexer-min.js' => '50df49c99247b80d59ea045105a95e31', + './include/javascript/yui3/build/recordset/recordset-indexer.js' => 'aaf28c5aeeed8d70863f7cd31bb36ae4', + './include/javascript/yui3/build/recordset/recordset-min.js' => '382143969c06896d07e3b87a8b9dcf9f', + './include/javascript/yui3/build/recordset/recordset-sort-min.js' => 'e87dbb3b1038fc410447f4235f5a936f', + './include/javascript/yui3/build/recordset/recordset-sort.js' => 'db3358e3556b25b5a79303b1906c83c2', + './include/javascript/yui3/build/recordset/recordset.js' => '3fce30e08c632acae8cbb7dcfc85804c', + './include/javascript/yui3/build/querystring/querystring-min.js' => '87c994da8e4cedc81e190537018a86b6', + './include/javascript/yui3/build/querystring/querystring-parse-min.js' => 'd6daaea3750451e945eaa6e6634609a2', + './include/javascript/yui3/build/querystring/querystring-parse-simple-min.js' => 'cf31878160f32eb97268e9e4bcd02e5c', + './include/javascript/yui3/build/querystring/querystring-parse-simple.js' => '321b1066d0d75bc976793175d7e245a2', + './include/javascript/yui3/build/querystring/querystring-parse.js' => '44da9503d463930dac2b312b05eef379', + './include/javascript/yui3/build/querystring/querystring-stringify-min.js' => '819a5f844c1c56e6e571ed1100ec7bc8', + './include/javascript/yui3/build/querystring/querystring-stringify-simple-min.js' => '667498d7bd995cc2548ee6fbde702abf', + './include/javascript/yui3/build/querystring/querystring-stringify-simple.js' => '95e126e0de6989a2ae80515d546fb70d', + './include/javascript/yui3/build/querystring/querystring-stringify.js' => 'd20869a7f478fc8499bcba93838c0281', + './include/javascript/yui3/build/querystring/querystring.js' => 'c0100715267e2858744b1bc55ef517a7', + './include/javascript/yui3/build/node-flick/node-flick-min.js' => '2f00f992ef75c1520343b51a2e1579c0', + './include/javascript/yui3/build/node-flick/node-flick.js' => 'f2113d522690df01e4b0ebd3f048fbea', + './include/javascript/yui3/build/node-flick/assets/skins/sam/node-flick.css' => '50589007ee62c2e83a3f5b411dfb4094', + './include/javascript/yui3/build/node-flick/assets/skins/sam/node-flick-skin.css' => 'dcc591181ff65e308463ffb30f69a54c', + './include/javascript/yui3/build/node-flick/assets/node-flick-core.css' => '19070f5985c8285d3695ca195b480165', + './include/javascript/yui3/build/jsonp/jsonp-min.js' => '735e7019aeb2b5d597014c729123e6cf', + './include/javascript/yui3/build/jsonp/jsonp-url-min.js' => 'ef30e9d0787071fdd4a2d680a34ffd09', + './include/javascript/yui3/build/jsonp/jsonp-url.js' => '2afadc225ed5ca3e9116fc276b5d0e34', + './include/javascript/yui3/build/jsonp/jsonp.js' => '6fc88e0ccd50c241804e3c396a11b857', + './include/javascript/yui3/build/intl/intl-min.js' => 'da563f6a7a81e77a8b8e222c49a95c6b', + './include/javascript/yui3/build/intl/intl.js' => '2168a7b9844d74aac305535ce00e7917', + './include/javascript/yui3/build/history-deprecated/history-deprecated-min.js' => '450da7a8d57e3062903e9ba43ba2552e', + './include/javascript/yui3/build/history-deprecated/history-deprecated.js' => '3b776d9322f886503c3d7676c467b765', + './include/javascript/yui3/build/highlight/highlight-accentfold-min.js' => '0b9a3dd7e50670ffacb4e129249fc013', + './include/javascript/yui3/build/highlight/highlight-accentfold.js' => '7cac86b8722f19aafd566686923bd6bc', + './include/javascript/yui3/build/highlight/highlight-base-min.js' => 'f1c74dab0fcef9cf8b57c8ae8f437a40', + './include/javascript/yui3/build/highlight/highlight-base.js' => 'a97b3f1d864e14c02bf763cf65ed41ae', + './include/javascript/yui3/build/highlight/highlight-min.js' => 'c48fcedec32bc38c24edcbaa3ae4d055', + './include/javascript/yui3/build/highlight/highlight.js' => 'caf65dc5b6ab8cf4ad82534b6678fff1', + './include/javascript/yui3/build/event-valuechange/event-valuechange-min.js' => '3e3f32bf94b1da7040c90932aa6f3cc0', + './include/javascript/yui3/build/event-valuechange/event-valuechange.js' => '74f36b51f1179c308cd3136ce369833c', + './include/javascript/yui3/build/event-gestures/event-flick-min.js' => 'a81277bcdc297372a1173ecec8fb8759', + './include/javascript/yui3/build/event-gestures/event-flick.js' => '28f3dfacb5ad78583f0cec58af113efb', + './include/javascript/yui3/build/event-gestures/event-gestures-min.js' => 'a03cf774bc6831774080f1a308ee800b', + './include/javascript/yui3/build/event-gestures/event-gestures.js' => '060c71417360a5629f773ac34090fc7b', + './include/javascript/yui3/build/event-gestures/event-move-min.js' => '3f53593952cb0ff8b0bc654ee0ef98c1', + './include/javascript/yui3/build/event-gestures/event-move.js' => '12397aa1a90ff56aa873720657b04af7', + './include/javascript/yui3/build/escape/escape-min.js' => 'f883d539be42624fbb28e08e6635d420', + './include/javascript/yui3/build/escape/escape.js' => 'd4afc6a33286262bf93a1696982c82b0', + './include/javascript/yui3/build/editor/createlink-base-min.js' => '126d3f965d633b0d596a44acc91cdf6a', + './include/javascript/yui3/build/editor/createlink-base.js' => 'e136c8dfd4ee64991f185b10c304989d', + './include/javascript/yui3/build/editor/editor-base-min.js' => '806a12f255b9327ded01ad8870539047', + './include/javascript/yui3/build/editor/editor-base.js' => '21761f7739bf00ac676d76311e5751d0', + './include/javascript/yui3/build/editor/editor-bidi-min.js' => '2a891c62b193475ad0422980a266fe7a', + './include/javascript/yui3/build/editor/editor-bidi.js' => 'e52601be1b0c40a59657fc9e293376a8', + './include/javascript/yui3/build/editor/editor-br-min.js' => 'a7cb5e6011d3b9f23f8cd7734fe477bd', + './include/javascript/yui3/build/editor/editor-br.js' => 'd9bd3254ff035a66106043d26896f595', + './include/javascript/yui3/build/editor/editor-lists-min.js' => '72a55ca3198a847b4a40ae1de7a5440d', + './include/javascript/yui3/build/editor/editor-lists.js' => '6e8dd93fa778b8cd85b8cd0e53260a89', + './include/javascript/yui3/build/editor/editor-min.js' => 'a4cfe40a5a8d505ff766bffc308c4353', + './include/javascript/yui3/build/editor/editor-para-min.js' => 'f6453bf6fc7fea99a5a2f5008e5cb136', + './include/javascript/yui3/build/editor/editor-para.js' => '45552d327135846c9cf29eee853213ab', + './include/javascript/yui3/build/editor/editor-tab-min.js' => '9a6f1169bea92fd641d86e5f971bcf06', + './include/javascript/yui3/build/editor/editor-tab.js' => '6da812bf8b4ee9c1c58b096050fef43e', + './include/javascript/yui3/build/editor/editor.js' => 'fe408b5af85b472ac226e86140ea38b6', + './include/javascript/yui3/build/editor/exec-command-min.js' => '89cd38a60d403c08f16bdef035253b04', + './include/javascript/yui3/build/editor/exec-command.js' => '3ac781e2aa4f21c41d64ea77c60bdb2f', + './include/javascript/yui3/build/editor/frame-min.js' => '9d01df7bac0b13b2a96e65fb81f53095', + './include/javascript/yui3/build/editor/frame.js' => '420076576c130d618f4adb049320f003', + './include/javascript/yui3/build/editor/selection-min.js' => 'b2972538c4c205563bcd25281927053e', + './include/javascript/yui3/build/editor/selection.js' => '0f638fbab949dbc589715c353926c6f0', + './include/javascript/yui3/build/datatable/datatable-base-min.js' => 'd7320625cfb00a0f7a5040ca66e43edb', + './include/javascript/yui3/build/datatable/datatable-base.js' => '29a0c85abe1da6fd36b42aa8664ea627', + './include/javascript/yui3/build/datatable/datatable-datasource-min.js' => '84de447e1ba651ebbe14a2678031e12d', + './include/javascript/yui3/build/datatable/datatable-datasource.js' => 'cfe3f0274f1fe2eca24e358f121ca9ec', + './include/javascript/yui3/build/datatable/datatable-min.js' => 'e3c08104447d669d352c493a5668021e', + './include/javascript/yui3/build/datatable/datatable-scroll-min.js' => '10b9f6e11000e431c2b212cff7d72729', + './include/javascript/yui3/build/datatable/datatable-scroll.js' => 'ff6b237e8bedcfc6b2e297dea985323f', + './include/javascript/yui3/build/datatable/datatable-sort-min.js' => '5d41c721f5fa0e336196aba7d0d4b736', + './include/javascript/yui3/build/datatable/datatable-sort.js' => '84a9877f63949698c6a6f12b31dbaba7', + './include/javascript/yui3/build/datatable/datatable.js' => '1d1c516d571bf27a31c6459863d6f8de', + './include/javascript/yui3/build/datatable/lang/datatable-base.js' => 'b4d19a050dbfffbf3b9bf9949c916e5d', + './include/javascript/yui3/build/datatable/lang/datatable-base_en.js' => '327355ae54a5a2e5a1a94a713c2974f1', + './include/javascript/yui3/build/datatable/lang/datatable-sort.js' => 'f64fbf78b4e2efc482cdb2833d5d42a8', + './include/javascript/yui3/build/datatable/lang/datatable-sort_en.js' => '66832c2ce38e572fb6b12ddbc7e2f3d3', + './include/javascript/yui3/build/datatable/lang/datatable.js' => 'ab6fd82578f3e3c4ebc983732df20460', + './include/javascript/yui3/build/datatable/lang/datatable_en.js' => '6247cf46d14a49d34d7d1d5db4b8c99c', + './include/javascript/yui3/build/datatable/assets/skins/sam/tmp.txt' => 'c21071571ed755716456e2f92e63007c', + './include/javascript/yui3/build/datatable/assets/skins/sam/dt-arrow-up.png' => '27498450164be1b258cae9dfdd534b69', + './include/javascript/yui3/build/datatable/assets/skins/sam/dt-arrow-dn.png' => 'ee0dd66007d4f34b5e6660b4abbb5a65', + './include/javascript/yui3/build/datatable/assets/skins/sam/datatable.css' => 'd62f43d19f7ba4700f96e7b9a5c53a60', + './include/javascript/yui3/build/datatable/assets/skins/sam/datatable-base.css' => '07ba3e04e9b0add01b5a4ec2a8eb2a6f', + './include/javascript/yui3/build/datatable/assets/skins/sam/datatable-base-skin.css' => 'cdade6fda48f4c23e9475339a84afa8e', + './include/javascript/yui3/build/datatable/assets/datatable-core.css' => '1427c6c074b3dcc4283ae487305d63b8', + './include/javascript/yui3/build/datatable/assets/datatable-base-core.css' => 'a4565d7b0473a00602f7d6d2b603581b', + './include/javascript/yui3/build/cssgrids-deprecated/grids.css' => 'c9b50edf263a03c39d5f47c3d04d6c96', + './include/javascript/yui3/build/cssgrids-deprecated/grids-min.css' => '7f8644eb528c3f19eff580860fb7bbe6', + './include/javascript/yui3/build/cssgrids-deprecated/grids-context.css' => '1ffeda5449f044aa4d7cad9cafda8199', + './include/javascript/yui3/build/cssgrids-deprecated/grids-context-min.css' => 'd9f2d5af4aec61c4178886021ec0a718', + './include/javascript/yui3/build/autocomplete/autocomplete-base-min.js' => '65e995e86eeca7a63ca055299be09245', + './include/javascript/yui3/build/autocomplete/autocomplete-base.js' => 'b24283ac2a3d439a735dedd564a99783', + './include/javascript/yui3/build/autocomplete/autocomplete-filters-accentfold-min.js' => '6642fe9ba25e6acd3c4b4b78ba4103fe', + './include/javascript/yui3/build/autocomplete/autocomplete-filters-accentfold.js' => '22f8a4099f3b793d36fe44d46706b7f5', + './include/javascript/yui3/build/autocomplete/autocomplete-filters-min.js' => '658671d73008742c5928f7fb255b630d', + './include/javascript/yui3/build/autocomplete/autocomplete-filters.js' => '19e495fe2062d66a1d2ddf63bf969cbd', + './include/javascript/yui3/build/autocomplete/autocomplete-highlighters-accentfold-min.js' => '0229804c92ea1d28b24d231636e7039c', + './include/javascript/yui3/build/autocomplete/autocomplete-highlighters-accentfold.js' => 'b71005b5aa9dcb0842a07a67d56ed496', + './include/javascript/yui3/build/autocomplete/autocomplete-highlighters-min.js' => '3a7a5e7e62c67b763705dde5b88dfbc6', + './include/javascript/yui3/build/autocomplete/autocomplete-highlighters.js' => '79018043a3153a92754870d603e8e7db', + './include/javascript/yui3/build/autocomplete/autocomplete-list-keys-min.js' => '19333969fde227f1b862518939433d68', + './include/javascript/yui3/build/autocomplete/autocomplete-list-keys.js' => '047b154fab3e564939d5401540569315', + './include/javascript/yui3/build/autocomplete/autocomplete-list-min.js' => 'f3adb443b2fe1a2eae7af1e9f5116c52', + './include/javascript/yui3/build/autocomplete/autocomplete-list.js' => 'a3a07272f1b569d196a155d9d6efccc3', + './include/javascript/yui3/build/autocomplete/autocomplete-min.js' => 'ae95e5a287f8aa14d16590666d7a6143', + './include/javascript/yui3/build/autocomplete/autocomplete-plugin-min.js' => 'f47ae3b3cec43e3b26ca2a7c15dfd0a5', + './include/javascript/yui3/build/autocomplete/autocomplete-plugin.js' => '784afae64285f0a46a973bfa03f7a822', + './include/javascript/yui3/build/autocomplete/autocomplete-sources-min.js' => 'cfeee2031d41e16b7ed653bc61db5354', + './include/javascript/yui3/build/autocomplete/autocomplete-sources.js' => '3c09d3313972b1c8fcb6d71a63fc2e95', + './include/javascript/yui3/build/autocomplete/autocomplete.js' => '47f31d01c50c58969d398723bb877815', + './include/javascript/yui3/build/autocomplete/lang/autocomplete-list.js' => '66d1aae8c274af38ffb2f756bcdbebe1', + './include/javascript/yui3/build/autocomplete/lang/autocomplete-list_en.js' => '34eee5c2fbfa938f53282e75ed058188', + './include/javascript/yui3/build/autocomplete/lang/autocomplete.js' => '60921586edc208dec318e22446058b47', + './include/javascript/yui3/build/autocomplete/lang/autocomplete_en.js' => '13d26e11545af07d0ea544a2ec5ab38d', + './include/javascript/yui3/build/autocomplete/assets/skins/sam/autocomplete.css' => 'e81752e4c894357d5607272a5984ae72', + './include/javascript/yui3/build/autocomplete/assets/skins/sam/autocomplete-list.css' => 'e81752e4c894357d5607272a5984ae72', + './include/javascript/yui3/build/autocomplete/assets/skins/sam/autocomplete-list-skin.css' => '6bfc1a1f63ba8b2272c72375421481f4', + './include/javascript/yui3/build/autocomplete/assets/autocomplete-list-core.css' => 'f24068030ef8fe63a7fbfbf4907e0e4b', + './include/javascript/yui3/build/arraysort/arraysort-min.js' => '7595261fb36006720858e388ba3fbcf8', + './include/javascript/yui3/build/arraysort/arraysort.js' => '555bab1df16c3ddebf89e0fec8f3348a', + './include/javascript/yui3/build/yui/features.js' => '88ab0b0c088040327ce721c4f50c81b1', + './include/javascript/yui3/build/yui/get-min.js' => 'ae1745e7b3a5b87d07008f5955cfec27', + './include/javascript/yui3/build/yui/get.js' => 'd4ed9053932ba68c09795d41e813c0dd', + './include/javascript/yui3/build/yui/yui-base-min.js' => '7422435d94de8e4e01de52a7e0980dbb', + './include/javascript/yui3/build/yui/yui-base.js' => 'f6ed943f9ccbddd886cb17a10b3caa59', + './include/javascript/yui3/build/yui/features-min.js' => '733c06e5cc7f533949d2229d61f565f7', + './include/javascript/yui3/build/yui/intl-base-min.js' => '732030e8035d31de5798cdc7cf78c7ef', + './include/javascript/yui3/build/yui/yui-later-min.js' => 'bfee5b520473ea9195285d5eec8177c2', + './include/javascript/yui3/build/yui/yui-later.js' => '176e3101535435acec1a7e99dfee188c', + './include/javascript/yui3/build/yui/yui-log-min.js' => '503048b3c69be41279d6e13cc59ec305', + './include/javascript/yui3/build/yui/yui-log.js' => 'a9ac6ecb5910ebae67c1596746c78bad', + './include/javascript/yui3/build/yui/yui-min.js' => '01fb05b5ac2ae267855597ef82044e24', + './include/javascript/yui3/build/yui/yui.js' => 'aceb32e4bb42943a9eca88cf976a604e', + './include/javascript/yui3/build/yui/intl-base.js' => '8d614eecd921bfc49089e38fb5be3364', + './include/javascript/yui3/build/yui/rls-min.js' => '0fa05768774a5daefcf7e49f3256b65c', + './include/javascript/yui3/build/yui/rls.js' => '7c0d5f981f7837a98c56d0122d328237', + './include/javascript/yui3/build/yui/yui-throttle-min.js' => '8454834db4bccf9515ca1dfb09856479', + './include/javascript/yui3/build/yui/yui-throttle.js' => 'a7f961f761e98b5b5deb0e13a6b4fe7c', + './include/javascript/yui3/build/charts/charts-min.js' => 'a1be84f7ebff6161ed4a65f7570ad0e1', + './include/javascript/yui3/build/charts/charts.js' => '3e544fd114163950ac149bf5620dd281', + './include/javascript/yui3/build/widget/widget-base.js' => '64398f87ed3bf31930a0bceda3762f4f', + './include/javascript/yui3/build/widget/widget-min.js' => 'c0831d431d2f738846468d4d09296a45', + './include/javascript/yui3/build/widget/widget-base-ie-min.js' => '8b0171c757e7bc2a19e30b8da46ce6ca', + './include/javascript/yui3/build/widget/widget-position-min.js' => 'a21ef354b8c9c4c66f87cc4dc805d5cf', + './include/javascript/yui3/build/widget/widget-position.js' => 'ed0ae8cda114a9712282fbb3252eb744', + './include/javascript/yui3/build/widget/widget-stack-min.js' => '6abca8120b4facc6973abc5c75370989', + './include/javascript/yui3/build/widget/widget.js' => 'adbcbea08a01cf0b0f175f94ec1334f2', + './include/javascript/yui3/build/widget/widget-stack.js' => 'bda123edebe216ddac260133c066680a', + './include/javascript/yui3/build/widget/widget-stdmod-min.js' => '5dd5df257bcd8de54e7b873cd8eeed9c', + './include/javascript/yui3/build/widget/widget-stdmod.js' => 'a04c47465af942e2cba4192e6f0489f7', + './include/javascript/yui3/build/widget/widget-base-ie.js' => '127f4812792459aebd4e10469d625f80', + './include/javascript/yui3/build/widget/widget-base-min.js' => 'f2a0a47136c68b553032ba1508603a7d', + './include/javascript/yui3/build/widget/widget-child-min.js' => '2ea5ffd6f3e63437e9b2521240d3a31d', + './include/javascript/yui3/build/widget/widget-child.js' => '69d942e22bbc798b447fc3c834231fda', + './include/javascript/yui3/build/widget/widget-htmlparser-min.js' => '81f181890a89351815dc59087c741b18', + './include/javascript/yui3/build/widget/widget-htmlparser.js' => '1dca5438cea386553d227d2c30f89942', + './include/javascript/yui3/build/widget/widget-locale-min.js' => '18de3c57fad150b09af59361ea1c2eb9', + './include/javascript/yui3/build/widget/widget-locale.js' => '86a5f89754ee6f11fff560786b96a3a9', + './include/javascript/yui3/build/widget/widget-parent-min.js' => '113ccf560d2fb3878273f4c467052ef6', + './include/javascript/yui3/build/widget/widget-parent.js' => '8c93f48983fd1e43e02af1a64547dba5', + './include/javascript/yui3/build/widget/widget-position-align-min.js' => '6ed745735ae70bcd495d7bbcc8ab6304', + './include/javascript/yui3/build/widget/widget-position-align.js' => 'ae6f25557f4ad38f71e3280093a1f0c3', + './include/javascript/yui3/build/widget/widget-position-constrain-min.js' => 'b2c9286b07b8e4a5036d0d71c1b1cea8', + './include/javascript/yui3/build/widget/widget-position-constrain.js' => '0b3e3714dd1931cd736b00243ef68566', + './include/javascript/yui3/build/widget/widget-skin-min.js' => 'e4cb43d5a20be5f634e8c4a1b0c84311', + './include/javascript/yui3/build/widget/widget-skin.js' => '303d106b145da71b6e2f175a7606dcf0', + './include/javascript/yui3/build/widget/widget-uievents-min.js' => 'b79c69adbb1e6fffab33c30f213b5340', + './include/javascript/yui3/build/widget/widget-uievents.js' => '2ebd03fad1a9594d1a83920667a4b889', + './include/javascript/yui3/build/widget/assets/widget-base-core.css' => '0c0894016f3116bb13d3d550e96c0a2f', + './include/javascript/yui3/build/widget/assets/widget-stack-core.css' => '1776333a1f3cc43d3b469ea853eb63ba', + './include/javascript/yui3/build/widget/assets/skins/sam/widget-base-skin.css' => '854f801d56bf486d7775e692a967950a', + './include/javascript/yui3/build/widget/assets/skins/sam/widget.css' => '9c9995536d026df7a25ce0735bbd930e', + './include/javascript/yui3/build/widget/assets/skins/sam/widget-stack.css' => 'fe4d110773af154ffa08fdca4976b311', + './include/javascript/yui3/build/widget/assets/skins/sam/widget-stack-skin.css' => '854f801d56bf486d7775e692a967950a', + './include/javascript/yui3/build/widget/assets/skins/sam/widget-base.css' => '9c9995536d026df7a25ce0735bbd930e', + './include/javascript/yui3/build/test/test-min.js' => 'e1bcd1822cce889e0f8141940699861c', + './include/javascript/yui3/build/test/test.js' => '4e3e6c5d701c51d39ffdb17b20bfb774', + './include/javascript/yui3/build/test/assets/skins/sam/test.css' => 'f8f84968e300208fc7207ae8c7844a55', + './include/javascript/yui3/build/test/assets/skins/sam/test-skin.css' => 'e3ed47a58a6b0b8df8d19fc8a5e715ce', + './include/javascript/yui3/build/test/assets/test-console.css' => 'ac5dccbf1a6bd42027d64c5daf3904a7', + './include/javascript/yui3/build/substitute/substitute-min.js' => 'eadf33b0ce61d878c63afbf6f73b0fff', + './include/javascript/yui3/build/substitute/substitute.js' => '5a8bc5a6e81af5ba08088dd44f5dc52a', + './include/javascript/yui3/build/stylesheet/stylesheet-min.js' => '0d894186f20989af8ec08463cde0fbd4', + './include/javascript/yui3/build/stylesheet/stylesheet.js' => 'b205aa47d6560489c656b45793249dfc', + './include/javascript/yui3/build/slider/range-slider.js' => 'e6c204fe4b5ebfa1ede270dff55f6573', + './include/javascript/yui3/build/slider/slider-min.js' => 'b3d2b28980a55bd596dbaffd2ccfbfd7', + './include/javascript/yui3/build/slider/slider.js' => '6d76c4ebc5a187ccb3afaf84ec76230f', + './include/javascript/yui3/build/slider/clickable-rail-min.js' => 'c6139c1e5cdf2127b004f84885ba2b18', + './include/javascript/yui3/build/slider/clickable-rail.js' => '1f7ca8a7bda78b616fdc128c770c576d', + './include/javascript/yui3/build/slider/range-slider-min.js' => '8192c00504fc46eb92b0426e05937770', + './include/javascript/yui3/build/slider/slider-base-min.js' => 'ba9bb4b74deccdedb27c1f85dd49549c', + './include/javascript/yui3/build/slider/slider-base.js' => '723aeeeccea2b3d151c96eee8aff7c15', + './include/javascript/yui3/build/slider/slider-value-range-min.js' => '28654ca94cb0ec5a2569a4379e8bcf30', + './include/javascript/yui3/build/slider/slider-value-range.js' => '7444104bd22be08fda1991a9bea8c8b3', + './include/javascript/yui3/build/slider/assets/slider-base-core.css' => '938288a28db8b17c36cdd18ad2a288f4', + './include/javascript/yui3/build/slider/assets/slider-core.css' => '938288a28db8b17c36cdd18ad2a288f4', + './include/javascript/yui3/build/slider/assets/skins/sam-dark/thumb-y.png' => 'd22f6e1ed8334a5c949c5f3691a0d26e', + './include/javascript/yui3/build/slider/assets/skins/sam-dark/thumb-x.png' => 'bbf85371a64215e1e47ec2a554c26c90', + './include/javascript/yui3/build/slider/assets/skins/sam-dark/slider.css' => 'a474954e8dc3c362df2db52a19ffc735', + './include/javascript/yui3/build/slider/assets/skins/sam-dark/slider-skin.css' => 'f48472ea441001fd98492eee611926cf', + './include/javascript/yui3/build/slider/assets/skins/sam-dark/slider-base.css' => 'a474954e8dc3c362df2db52a19ffc735', + './include/javascript/yui3/build/slider/assets/skins/sam-dark/slider-base-skin.css' => 'f48472ea441001fd98492eee611926cf', + './include/javascript/yui3/build/slider/assets/skins/sam-dark/rail-y.png' => '982ea62c542d8221bf0a6646c6a228a5', + './include/javascript/yui3/build/slider/assets/skins/sam-dark/rail-y-lines.png' => '519d37cf47a961db7d75c9c8e49dbb88', + './include/javascript/yui3/build/slider/assets/skins/sam-dark/rail-x.png' => 'c4c06f73c05735c1eb873375f15cc4b5', + './include/javascript/yui3/build/slider/assets/skins/sam-dark/rail-x-lines.png' => '02cc6dfb3ed51b292c1db075954d7730', + './include/javascript/yui3/build/slider/assets/skins/round/thumb-y.png' => 'ee6c568ea9fb540c0220dbf7831edf8c', + './include/javascript/yui3/build/slider/assets/skins/round/thumb-y-grip.png' => '2dea4aa5c570225e3b4efc9a93935723', + './include/javascript/yui3/build/slider/assets/skins/round/thumb-x.png' => '4ff9ccc87b6a1c1558f1ae37033c3703', + './include/javascript/yui3/build/slider/assets/skins/round/thumb-x-grip.png' => 'e725751f4dffd26fc459f885cf17e315', + './include/javascript/yui3/build/slider/assets/skins/round/slider.css' => '6d77b82e4a8a87fd748fd78ac3020966', + './include/javascript/yui3/build/slider/assets/skins/round/slider-skin.css' => 'fccfcf8f1433e3bd63c2e4f3675742b8', + './include/javascript/yui3/build/slider/assets/skins/round/slider-base.css' => '6d77b82e4a8a87fd748fd78ac3020966', + './include/javascript/yui3/build/slider/assets/skins/round/slider-base-skin.css' => 'fccfcf8f1433e3bd63c2e4f3675742b8', + './include/javascript/yui3/build/slider/assets/skins/round/rail-y.png' => 'fd8444a926b5ff58b1ffb1956d377426', + './include/javascript/yui3/build/slider/assets/skins/round/rail-x.png' => '3b1ba4400d1e6aefd4fc705096e063c9', + './include/javascript/yui3/build/slider/assets/skins/round-dark/thumb-y.png' => '629439a287741a996c60312ea7af874d', + './include/javascript/yui3/build/slider/assets/skins/round-dark/thumb-y-grip.png' => '435b45767efa634e8fb0affc59e739d9', + './include/javascript/yui3/build/slider/assets/skins/round-dark/thumb-x.png' => 'dde90034db6e17171129425ad24f34e5', + './include/javascript/yui3/build/slider/assets/skins/round-dark/thumb-x-grip.png' => '29f9e14b2aed957ade2c2b8a8ff2a439', + './include/javascript/yui3/build/slider/assets/skins/round-dark/slider.css' => 'a804c1681a625893f6105f51b1c53209', + './include/javascript/yui3/build/slider/assets/skins/round-dark/slider-skin.css' => '64b0b80bc2e92980fe103f5ead10169c', + './include/javascript/yui3/build/slider/assets/skins/round-dark/slider-base.css' => 'a804c1681a625893f6105f51b1c53209', + './include/javascript/yui3/build/slider/assets/skins/round-dark/slider-base-skin.css' => '64b0b80bc2e92980fe103f5ead10169c', + './include/javascript/yui3/build/slider/assets/skins/round-dark/rail-y.png' => '99c8c933affdfb6c211ff3cafefb9d73', + './include/javascript/yui3/build/slider/assets/skins/round-dark/rail-x.png' => 'c5b98fd5f6a2ff35dd8dc01f7520e145', + './include/javascript/yui3/build/slider/assets/skins/capsule/thumb-y.png' => 'add29412d72f2042a8c37ae8d2c3b064', + './include/javascript/yui3/build/slider/assets/skins/capsule/thumb-y-lines.png' => 'cd021f14a9122b70a399ac9e926371ef', + './include/javascript/yui3/build/slider/assets/skins/capsule/thumb-y-line.png' => '8efdaa0268700b5e64331044345a5bdf', + './include/javascript/yui3/build/slider/assets/skins/capsule/thumb-x.png' => 'e67874c84261a0ff254de299e1d230a2', + './include/javascript/yui3/build/slider/assets/skins/capsule/thumb-x-line.png' => '62e6451524d3440ec3518603bd505365', + './include/javascript/yui3/build/slider/assets/skins/capsule/slider.css' => '406cebc825a16c69627709cebd9741f3', + './include/javascript/yui3/build/slider/assets/skins/capsule/slider-skin.css' => 'fc8ea538941ba2743987cb3204792d73', + './include/javascript/yui3/build/slider/assets/skins/capsule/slider-base.css' => '406cebc825a16c69627709cebd9741f3', + './include/javascript/yui3/build/slider/assets/skins/capsule/slider-base-skin.css' => 'fc8ea538941ba2743987cb3204792d73', + './include/javascript/yui3/build/slider/assets/skins/capsule/rail-y.png' => '50282fcfc7f26ffa09202df287c39f9e', + './include/javascript/yui3/build/slider/assets/skins/capsule/rail-y-lines.png' => 'd4649e3f1e1a88477df1d29942bb17f5', + './include/javascript/yui3/build/slider/assets/skins/capsule/rail-y-dots.png' => 'd4649e3f1e1a88477df1d29942bb17f5', + './include/javascript/yui3/build/slider/assets/skins/capsule/rail-x.png' => '98ec9856b2900f6911562b623532f351', + './include/javascript/yui3/build/slider/assets/skins/capsule/rail-x-lines.png' => '6ae6295f46b8899ebcf8e8dfbfe83fcb', + './include/javascript/yui3/build/slider/assets/skins/capsule/rail-x-dots.png' => '0dfbac4f97f4e036bd80a4a782de54d7', + './include/javascript/yui3/build/slider/assets/skins/capsule-dark/thumb-y.png' => 'd18fd48545fa759076351d82e794095e', + './include/javascript/yui3/build/slider/assets/skins/capsule-dark/thumb-y-line.png' => 'd022e2097c129fe4d1df7393afd37468', + './include/javascript/yui3/build/slider/assets/skins/capsule-dark/thumb-x.png' => '8e3b1fc54f94fd0c994c3129799afba9', + './include/javascript/yui3/build/slider/assets/skins/capsule-dark/thumb-x-line.png' => '6128da6833a1eabc7cf129d250012543', + './include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider.css' => '755d35c718580eaf85cd0a430de0b73e', + './include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider-skin.css' => 'f3ec5f0303b9abf5812783f095b8d30d', + './include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider-base.css' => '755d35c718580eaf85cd0a430de0b73e', + './include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider-base-skin.css' => 'f3ec5f0303b9abf5812783f095b8d30d', + './include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-y.png' => '046900c590f53c5759dcdf894a909f21', + './include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-y-lines.png' => '21de29a4dfd6cdfe2071fed2bc7a356b', + './include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-y-dots.png' => '7f0f2004814f4e7e741fc3c31e7828dd', + './include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-x.png' => '42d35fd17b4950ee946140fcf49075a8', + './include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-x-lines.png' => 'e0c3122691a70fe3381a244d4e9d5aed', + './include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-x-dots.png' => 'a2488d50c0d08f3f365bc6c72a7e9e46', + './include/javascript/yui3/build/slider/assets/skins/audio/thumb-y.png' => 'ec66482fc716b239b797fac9bbd1c091', + './include/javascript/yui3/build/slider/assets/skins/audio/thumb-x.png' => '3ece9383220b2c18a6ffe40623c60284', + './include/javascript/yui3/build/slider/assets/skins/audio/slider.css' => '9241fa973ab601e47d2455bc0c0d8d3b', + './include/javascript/yui3/build/slider/assets/skins/audio/slider-skin.css' => '0801dc24d5d180aed7cc70f7a110250c', + './include/javascript/yui3/build/slider/assets/skins/audio/slider-base.css' => '9241fa973ab601e47d2455bc0c0d8d3b', + './include/javascript/yui3/build/slider/assets/skins/audio/slider-base-skin.css' => '0801dc24d5d180aed7cc70f7a110250c', + './include/javascript/yui3/build/slider/assets/skins/audio/rail-y.png' => 'bfdc06ac4c6e231f24ff4fe3cca76812', + './include/javascript/yui3/build/slider/assets/skins/audio/rail-x.png' => '87a6e9a679ed3d8b77c0abc26d386f22', + './include/javascript/yui3/build/slider/assets/skins/audio-light/thumb-y.png' => '1c1295299e68b5a44460df326f03fb14', + './include/javascript/yui3/build/slider/assets/skins/audio-light/thumb-x.png' => 'c398ddfe8bc1d11a83685571d1fb8c1e', + './include/javascript/yui3/build/slider/assets/skins/audio-light/slider.css' => 'c605aecca3fefa443d6145925baa8de4', + './include/javascript/yui3/build/slider/assets/skins/audio-light/slider-skin.css' => '08495ad425aba2a2bff78728ec6242e7', + './include/javascript/yui3/build/slider/assets/skins/audio-light/slider-base.css' => 'c605aecca3fefa443d6145925baa8de4', + './include/javascript/yui3/build/slider/assets/skins/audio-light/slider-base-skin.css' => '08495ad425aba2a2bff78728ec6242e7', + './include/javascript/yui3/build/slider/assets/skins/audio-light/rail-y.png' => '5a800bdfd73ac8d4b4ce205940191271', + './include/javascript/yui3/build/slider/assets/skins/audio-light/rail-x.png' => '2d63ec10d42bd49a8af4241bac354fd7', + './include/javascript/yui3/build/slider/assets/skins/sam/thumb-y.png' => '4e9c5a913e538f6c9bdba6e2b707d038', + './include/javascript/yui3/build/slider/assets/skins/sam/thumb-x.png' => 'b4caced4133745a62e29bfa786b07ae7', + './include/javascript/yui3/build/slider/assets/skins/sam/slider-base.css' => 'deb51bb480ef96bfdbfe8165d63a2800', + './include/javascript/yui3/build/slider/assets/skins/sam/slider-base-skin.css' => '0f4fa427f9235f26b116cd55b5475c97', + './include/javascript/yui3/build/slider/assets/skins/sam/rail-y.png' => '82b36d1830a8a55a17da1113f09fc141', + './include/javascript/yui3/build/slider/assets/skins/sam/rail-y-lines.png' => '484ed23b601e7876c3d9279324c75ae1', + './include/javascript/yui3/build/slider/assets/skins/sam/rail-x.png' => '6470b1b6f7995df07bde65c7ba9e2aee', + './include/javascript/yui3/build/slider/assets/skins/sam/rail-x-lines.png' => '86604c0d5312c6248a79219583d5c275', './include/javascript/yui3/build/slider/assets/skins/sam/thumb-classic-y.png' => 'e6e4114cf7d61a20a5dbd4c76a5be209', './include/javascript/yui3/build/slider/assets/skins/sam/thumb-classic-x.png' => 'deb8a33ec9ce90048552b7e5a1037e7d', - './include/javascript/yui3/build/slider/assets/skins/sam/slider.css' => '326cae4687cb2c94162dee17c396bc93', - './include/javascript/yui3/build/slider/assets/skins/sam/slider-skin.css' => '9c8fb03e5edee0a7bd72977c65cfcecd', + './include/javascript/yui3/build/slider/assets/skins/sam/slider.css' => 'deb51bb480ef96bfdbfe8165d63a2800', + './include/javascript/yui3/build/slider/assets/skins/sam/slider-skin.css' => '0f4fa427f9235f26b116cd55b5475c97', './include/javascript/yui3/build/slider/assets/skins/sam/rail-classic-y.png' => '3a6d3464ade27ee27bda07164ea29522', './include/javascript/yui3/build/slider/assets/skins/sam/rail-classic-x.png' => '0e63959f97250c7508a51156d6b14485', - './include/javascript/yui3/build/queue-promote/queue-promote-min.js' => '5325cd2a3927bc2604d215bda814086b', - './include/javascript/yui3/build/queue-promote/queue-promote.js' => 'c638f4003c43efd4e7a0514efb800a29', - './include/javascript/yui3/build/profiler/profiler-min.js' => 'f2edfec26e251a0c0e8ab2a60d8ae1d1', - './include/javascript/yui3/build/profiler/profiler.js' => '76c49beb7cbb35b363926fb62caf369c', - './include/javascript/yui3/build/pluginhost/pluginhost-min.js' => '1b6d52125e55f93b4d838d6f10bd07fb', - './include/javascript/yui3/build/pluginhost/pluginhost.js' => '8f9921dd73f6d2b3aca74cd0bcc378a3', - './include/javascript/yui3/build/plugin/plugin-min.js' => '9a6f05085e5789cc81b7bdf7f4416a86', - './include/javascript/yui3/build/plugin/plugin.js' => 'e874af2b2ce922f57d54decbc7e4a1d1', - './include/javascript/yui3/build/overlay/overlay-min.js' => 'b4436b95349403bef12b7a487abda44d', - './include/javascript/yui3/build/overlay/overlay.js' => '0ffa172f3345c7272130a8641a865879', - './include/javascript/yui3/build/overlay/assets/skins/sam/overlay.css' => '219eebcee501b42ad383b829b2769f04', - './include/javascript/yui3/build/overlay/assets/skins/sam/overlay-skin.css' => '59812846f1a49258858027fdff6fbaf3', - './include/javascript/yui3/build/overlay/assets/overlay-core.css' => 'ff18ef1ceac2fc47dc0a920ca0c6d5bd', - './include/javascript/yui3/build/oop/oop-min.js' => '94e8be1ddfeb4e286058df79e159b989', - './include/javascript/yui3/build/oop/oop.js' => '89ce994a0c43467881bf18a64b5001c0', - './include/javascript/yui3/build/node/node-aria-min.js' => '07baaf24f1a0b26bb8937d79f2012d83', - './include/javascript/yui3/build/node/node-base-min.js' => '16c579707a142ca35e59a415be9909d1', - './include/javascript/yui3/build/node/node-base.js' => '975e3f3e54f6c690d5995929dd283b24', - './include/javascript/yui3/build/node/node-event-delegate-min.js' => 'a2a8d53ca7b2393dc6d05da83ecfaf64', - './include/javascript/yui3/build/node/node-event-delegate.js' => '13125b0d67d12074bc6a9269c116c021', - './include/javascript/yui3/build/node/node-aria.js' => 'a14fb15d9ce6b7bde2a0df7c70d5a2b5', - './include/javascript/yui3/build/node/node.js' => 'f3a1b3164d28dbce4a782bd411d37ffe', - './include/javascript/yui3/build/node/node-event-simulate-min.js' => '1de193e0c6ea9165fe0138c2d1efb1eb', - './include/javascript/yui3/build/node/node-event-simulate.js' => '8e03b149d0194d62b216a3f223b1cf22', - './include/javascript/yui3/build/node/node-min.js' => 'aa20c92139c922aa82c04e3f64405ee9', - './include/javascript/yui3/build/node/node-pluginhost-min.js' => '618bbd8e8143f23e519aade581751a93', - './include/javascript/yui3/build/node/node-pluginhost.js' => 'e367d2d1cb5a0b61213eacd6f2a2c7b6', - './include/javascript/yui3/build/node/node-screen-min.js' => '5e5e2b782c37dd0d55dfeb48d9d103f7', - './include/javascript/yui3/build/node/node-screen.js' => 'bb21fc6905894c310cc6e0f06b416ada', - './include/javascript/yui3/build/node/node-style-min.js' => 'c152d2219859cb6b990d528dd6b2dd7d', - './include/javascript/yui3/build/node/node-style.js' => 'af32e340c2380c0bbb5d8bc1ea651913', - './include/javascript/yui3/build/node-menunav/node-menunav-min.js' => '47cb82e5f624fce3a7ba0ad0271f881e', - './include/javascript/yui3/build/node-menunav/node-menunav.js' => '18138e58f4fe46fef9dfa837aef72951', + './include/javascript/yui3/build/queue-promote/queue-promote-min.js' => 'b3c2ba562777bf496f2a4c56eda7482c', + './include/javascript/yui3/build/queue-promote/queue-promote.js' => '96c023cb468edd356775341be505660a', + './include/javascript/yui3/build/profiler/profiler-min.js' => 'd71fbfe12664414c0314a1e623245aa3', + './include/javascript/yui3/build/profiler/profiler.js' => '59accf255997a58762bc633aeeb6fb1d', + './include/javascript/yui3/build/pluginhost/pluginhost-base.js' => '758f160cae41154c5651c614720e0259', + './include/javascript/yui3/build/pluginhost/pluginhost-min.js' => '5936acda726b74605cd0537631b93f92', + './include/javascript/yui3/build/pluginhost/pluginhost.js' => '92f52a457faa5ebdae7ae689970567a1', + './include/javascript/yui3/build/pluginhost/pluginhost-base-min.js' => '733168ba56c02c4b69a4de08382b93cc', + './include/javascript/yui3/build/pluginhost/pluginhost-config-min.js' => 'd7d8ad4f4529af19d944acbf5a8d3ed9', + './include/javascript/yui3/build/pluginhost/pluginhost-config.js' => 'd75a894e989fdf5335896287843b35c2', + './include/javascript/yui3/build/plugin/plugin-min.js' => '8c924384c0d61ad383f610a54bb94df0', + './include/javascript/yui3/build/plugin/plugin.js' => 'ad16fc08c0694e5f19b7805968b4ccdd', + './include/javascript/yui3/build/overlay/overlay-min.js' => '6a8772461f1c4cdba2484323895e7c28', + './include/javascript/yui3/build/overlay/overlay.js' => '1761593dde95a9218506e62370243488', + './include/javascript/yui3/build/overlay/assets/skins/sam/overlay.css' => '2c7923100b081b0aa0d7a5881ce33c0a', + './include/javascript/yui3/build/overlay/assets/skins/sam/overlay-skin.css' => '854f801d56bf486d7775e692a967950a', + './include/javascript/yui3/build/overlay/assets/overlay-core.css' => '377a25d8420ab90c29edc8483c803466', + './include/javascript/yui3/build/oop/oop-min.js' => '86b1b29e638e3909697b21819f36999d', + './include/javascript/yui3/build/oop/oop.js' => 'af7a60fd9ccaea1eaeb4b0c139e98f53', + './include/javascript/yui3/build/node/align-plugin-min.js' => 'df62c5a4d7618941e068b60435b099bf', + './include/javascript/yui3/build/node/align-plugin.js' => 'e8d4d36d9c3906a709c7c85a4588915d', + './include/javascript/yui3/build/node/node-base-min.js' => '9e2d593e554b6f345a2483c5625134dd', + './include/javascript/yui3/build/node/node-base.js' => 'da51497be669ea637864115f1df2e86d', + './include/javascript/yui3/build/node/node-event-delegate-min.js' => 'a933a144389470d8614aa3bb6a51e8c6', + './include/javascript/yui3/build/node/node-event-delegate.js' => '9fa8a59e1c93fd551bdefeb9d9018788', + './include/javascript/yui3/build/node/node-load.js' => '51dce17ce5fbdb32a4b1e46054dfbaa0', + './include/javascript/yui3/build/node/node.js' => 'dc6c49b2daad4b4958365bb4a384fee7', + './include/javascript/yui3/build/node/node-deprecated.js' => '27e5d60c2ec63e5acebec9e5fb57bede', + './include/javascript/yui3/build/node/node-event-simulate-min.js' => '814ce9d7a4e98f353c7451fe1a743cde', + './include/javascript/yui3/build/node/node-event-simulate.js' => '2b13656d78623ada90204ff18cf72b17', + './include/javascript/yui3/build/node/node-min.js' => 'dff96d55ebce3bd5375846160e4f300c', + './include/javascript/yui3/build/node/node-load-min.js' => 'aa37ddef9625aa88d32de4598a6e4b5f', + './include/javascript/yui3/build/node/node-pluginhost-min.js' => '124ba73b687143d2e88d3a1c75f0f17b', + './include/javascript/yui3/build/node/node-pluginhost.js' => '63a022bd1ef098b3fda14efa34118ec4', + './include/javascript/yui3/build/node/node-screen-min.js' => '0bc1581da47ea04b0e82da472c59874e', + './include/javascript/yui3/build/node/node-screen.js' => 'd582a72199b1d885e456447e9b59b396', + './include/javascript/yui3/build/node/node-style-min.js' => '8dc766405ada9859fbe92287b72052fe', + './include/javascript/yui3/build/node/node-style.js' => 'a6272ee714738063fd60f475b1170b1a', + './include/javascript/yui3/build/node/node-deprecated-min.js' => '4d6422f822b443d31ebac0f8fbb154bd', + './include/javascript/yui3/build/node/node-event-html5-min.js' => '118dbc516d393d1255e4ad669f08fc8c', + './include/javascript/yui3/build/node/node-event-html5.js' => '4afea20280f98523c28933b4505f18cc', + './include/javascript/yui3/build/node/shim-plugin-min.js' => '49f8e4c9dc23879349841da2bcfa0ba5', + './include/javascript/yui3/build/node/shim-plugin.js' => 'f62e597c73c619ea9450c305f2514a08', + './include/javascript/yui3/build/node-menunav/node-menunav-min.js' => '4295b8b99eb45922507e2b623dca8e30', + './include/javascript/yui3/build/node-menunav/node-menunav.js' => 'e7291f390fe268a493889df729a6f3fa', './include/javascript/yui3/build/node-menunav/assets/skins/sam/vertical-menu-submenu-indicator.png' => '87184ef3556eee00e54a1f851c12207f', - './include/javascript/yui3/build/node-menunav/assets/skins/sam/node-menunav.css' => '341ba353588269be14ed6d93c46ca237', - './include/javascript/yui3/build/node-menunav/assets/skins/sam/node-menunav-skin.css' => 'a66ff1364052f54d7572d85dfe8661c7', + './include/javascript/yui3/build/node-menunav/assets/skins/sam/node-menunav.css' => '3fc57d895aa3047c9c86551b701f5a01', + './include/javascript/yui3/build/node-menunav/assets/skins/sam/node-menunav-skin.css' => '301288b94b9d6c0fdfa262c10b1486a5', './include/javascript/yui3/build/node-menunav/assets/skins/sam/horizontal-menu-submenu-toggle.png' => 'e1b5111045cdbae5f59e6df43a2bcafd', './include/javascript/yui3/build/node-menunav/assets/skins/sam/horizontal-menu-submenu-indicator.png' => '62b769d3a600489aea50fb253739d7f5', - './include/javascript/yui3/build/node-menunav/assets/node-menunav-core.css' => '9b56a6d04e68a3e5f1687245a6084a7e', - './include/javascript/yui3/build/node-focusmanager/node-focusmanager-min.js' => '1ca23d0d868386205fdb5acacdc4cddb', - './include/javascript/yui3/build/node-focusmanager/node-focusmanager.js' => '00faeecf0efad5efdf4b56ea6d31a28b', - './include/javascript/yui3/build/loader/loader-min.js' => 'f943f3e274fddf2e937a7bab9bc70323', - './include/javascript/yui3/build/loader/loader.js' => 'd82357d912f5af368f970c11eb0c1618', - './include/javascript/yui3/build/json/json-min.js' => 'bd246199d39cab10193ccabf17452fcc', - './include/javascript/yui3/build/json/json-parse-min.js' => '443cd2c26a853b2263b712c1b0ed91a2', - './include/javascript/yui3/build/json/json-parse.js' => '6b19d09358150539ab07206e67806693', - './include/javascript/yui3/build/json/json-stringify-min.js' => '1891fce482a008b15809fbd87e27e64f', - './include/javascript/yui3/build/json/json-stringify.js' => 'bc92bf8e7f328098af98dc56a5c66628', - './include/javascript/yui3/build/json/json.js' => 'e717d955bf0c1984683ea676806b418c', - './include/javascript/yui3/build/io/io-base-min.js' => 'ad093d327db9acd44e96c7bec01834c2', - './include/javascript/yui3/build/io/io-base.js' => '3c2749e169c78fd48f454bcb1296eac9', - './include/javascript/yui3/build/io/io-form-min.js' => 'd4c1b128c4b17011dfa59b7090a065a1', - './include/javascript/yui3/build/io/io-form.js' => 'f8ef8a53c0bb9eb7911ec2c26f17f331', - './include/javascript/yui3/build/io/io-min.js' => 'cb6737d563147a205a22c71e869e52f4', - './include/javascript/yui3/build/io/io-queue-min.js' => 'c004a8cfff9e76fa239812993e7e526b', - './include/javascript/yui3/build/io/io-queue.js' => 'c3833ccde8ad3aca5a4a862d131c10d9', - './include/javascript/yui3/build/io/io-upload-iframe-min.js' => 'efe6317a865d54dc3897825311ac5a56', - './include/javascript/yui3/build/io/io-upload-iframe.js' => '2f289cab687bd8637766064f1aea23b1', - './include/javascript/yui3/build/io/io-xdr-min.js' => '1dcd16c0c601c972c41579c7051a2a13', - './include/javascript/yui3/build/io/io-xdr.js' => '25dda989d81d33b916cb5a5f2bcf284d', - './include/javascript/yui3/build/io/io.js' => '1f71b1743c41fa870c0626b8bfd82341', - './include/javascript/yui3/build/io/io.swf' => '7f22020ec768608f2620681547e5cfbc', - './include/javascript/yui3/build/imageloader/imageloader-min.js' => '0dd73afb8af9fa4c103a5de38bbec440', - './include/javascript/yui3/build/imageloader/imageloader.js' => 'eb1dccf51b62a4c59b3da3a5b2ffee14', - './include/javascript/yui3/build/history/history-min.js' => '22140bf6f377d6b725937e900e68dab4', - './include/javascript/yui3/build/history/history.js' => '5a8a024b8e896200e698ae241fe4c707', - './include/javascript/yui3/build/get/get-min.js' => '1ef08bacb464ead1fbdb74d45addca6f', - './include/javascript/yui3/build/get/get.js' => '1b0ea131a29adf2a1957ad11be4547ff', - './include/javascript/yui3/build/event/event-base-min.js' => 'bd248be116bba85823265a8206cbe36d', - './include/javascript/yui3/build/event/event-base.js' => '92ccc471cdee58198eab607943360562', - './include/javascript/yui3/build/event/event-delegate-min.js' => '428983af53d0b8b858fb46c13f516e1c', - './include/javascript/yui3/build/event/event-delegate.js' => 'eb1d77f335a5b34fe73a0c94b414ada6', - './include/javascript/yui3/build/event/event-focus-min.js' => 'ec401fcab4159c03540d063bef4d9b22', - './include/javascript/yui3/build/event/event-focus.js' => 'ff7884f68c5470538f166cbe52d5e55d', - './include/javascript/yui3/build/event/event-key-min.js' => '821d19630010257815fb0b44b3aadfe9', - './include/javascript/yui3/build/event/event-key.js' => 'b3416de8b050f1abe6bb3cea6e523ad3', - './include/javascript/yui3/build/event/event-min.js' => 'a315bf56377bccb7ac2b43331a4b1cd8', - './include/javascript/yui3/build/event/event-mouseenter-min.js' => '85690f5f025129474a8e06aa70625b89', - './include/javascript/yui3/build/event/event-mouseenter.js' => 'c2e50e17beaaa3e5b0d4eb182fd294f8', - './include/javascript/yui3/build/event/event-mousewheel-min.js' => '2121a34c9a737efbf048f8616a8e1369', - './include/javascript/yui3/build/event/event-mousewheel.js' => '2e25fb70f46d98b7e96782f8251fad2d', - './include/javascript/yui3/build/event/event-resize-min.js' => '3bd4f239792c2098d5b8f66dbc1a7ad1', - './include/javascript/yui3/build/event/event-resize.js' => '48e0b8e089fc4fc81f7ea5da8b16dc0e', - './include/javascript/yui3/build/event/event.js' => '04a6c39b6b5e65fcf9668a8d86b7cbd7', - './include/javascript/yui3/build/event-simulate/event-simulate-min.js' => '7818508cf6a0e25499c24688b2b20406', - './include/javascript/yui3/build/event-simulate/event-simulate.js' => '6f662a708dc2340ca13036fda5bab4f3', - './include/javascript/yui3/build/event-custom/event-custom-base-min.js' => '4b625cecad442abbb569a0cdd0887493', - './include/javascript/yui3/build/event-custom/event-custom-base.js' => '1a5dd6bf38d5c749fead00d2e553bddd', - './include/javascript/yui3/build/event-custom/event-custom-complex-min.js' => '1e6c6cf8ea2edee2a161a718dccc2837', - './include/javascript/yui3/build/event-custom/event-custom-complex.js' => '180cac471b923c24a13f78844f019d83', - './include/javascript/yui3/build/event-custom/event-custom-min.js' => 'dea28503b25756864b17e10eda54d61c', - './include/javascript/yui3/build/event-custom/event-custom.js' => 'c668094f09a9b0bc5578791e47fd2893', - './include/javascript/yui3/build/dump/dump-min.js' => '068e9eea50bfb83a9c12afe83cf499b7', - './include/javascript/yui3/build/dump/dump.js' => '91be1ba2820235cf17e38bcb605f8b78', - './include/javascript/yui3/build/dom/dom-base-min.js' => '9c3ad02ffbb1f3db1be7da64f8623c9e', - './include/javascript/yui3/build/dom/dom-base.js' => 'd76d66b67ec8e36fe28592b4c6c5a30f', - './include/javascript/yui3/build/dom/dom-min.js' => '37e86bf4f93713df95b9b938567334d7', - './include/javascript/yui3/build/dom/dom.js' => '70c65fddd32a406f977fdb42a7e9ff68', - './include/javascript/yui3/build/dom/dom-screen-min.js' => '08251d3308d9b44f1dde4acf1e15d633', - './include/javascript/yui3/build/dom/dom-screen.js' => 'd0bc1069b22426d73d10462d7776cd89', - './include/javascript/yui3/build/dom/dom-style-min.js' => 'e4d4f74b8c5732a916dcfba24273c591', - './include/javascript/yui3/build/dom/dom-style.js' => '1dbebcf7708ba19422ba4f5620a692a9', - './include/javascript/yui3/build/dom/selector.js' => '18548cdecaf34f0de097c010263f580c', - './include/javascript/yui3/build/dom/selector-css2-min.js' => '86238f9e2e3f3f90b263232fd974d4b3', - './include/javascript/yui3/build/dom/selector-css2.js' => 'c21d5d8d7a4e62e845ce6a447fedbb12', - './include/javascript/yui3/build/dom/selector-css3-min.js' => '1503711971a495b7d46978d189cf7007', - './include/javascript/yui3/build/dom/selector-css3.js' => '8b54097671f146aded273102d54cb4b5', - './include/javascript/yui3/build/dom/selector-min.js' => 'b5de0d7b3c29ece2f52cd9ef6ba88301', - './include/javascript/yui3/build/dom/selector-native-min.js' => 'd2197f895ad4fc7b5145f75c84944fc7', - './include/javascript/yui3/build/dom/selector-native.js' => '75083100c6ba1c87cc3c06ffa226f062', - './include/javascript/yui3/build/dd/dd-constrain-min.js' => '6290d829f810688e2739af1c6ce6272d', - './include/javascript/yui3/build/dd/dd-constrain.js' => '038557ace27eec892e0d9daf918b4fb9', - './include/javascript/yui3/build/dd/dd-ddm-base-min.js' => '079b40427f308dc212255df488856794', - './include/javascript/yui3/build/dd/dd-ddm-base.js' => '65c29a76aa5ef5e81707a7c3c7b9f809', - './include/javascript/yui3/build/dd/dd-ddm-drop-min.js' => 'bba8ae8124f7ec4e68ed6a8e55161700', - './include/javascript/yui3/build/dd/dd-ddm-drop.js' => 'd4a35881e54a4b7f28a5ba85fa7895c2', - './include/javascript/yui3/build/dd/dd-ddm-min.js' => '3ddfd9710761a3064531718cebf95187', - './include/javascript/yui3/build/dd/dd-ddm.js' => '5083a97504632d87cd5e740730ac532a', - './include/javascript/yui3/build/dd/dd-drag-min.js' => '1bdc422b1923a0bc4d0c99a8851b6d1c', - './include/javascript/yui3/build/dd/dd-drag.js' => '70341cc3db548498ba8f7c047abc1616', - './include/javascript/yui3/build/dd/dd-drop-min.js' => '691d9acd4f668984dbae5d0fb856cbcd', - './include/javascript/yui3/build/dd/dd-drop-plugin-min.js' => '1b0846bca964a4e99693647acce1beaa', - './include/javascript/yui3/build/dd/dd-drop-plugin.js' => 'a8207858c656cd4ebb0a2f5412fb826a', - './include/javascript/yui3/build/dd/dd-drop.js' => '8e0e0340d4be9da07a30b9e6666066f4', - './include/javascript/yui3/build/dd/dd-min.js' => '8c2fd5421915946f56b6132c5bfe4f9f', - './include/javascript/yui3/build/dd/dd-plugin-min.js' => '73a8bf0154c958a356c1c12e3c48060f', - './include/javascript/yui3/build/dd/dd-plugin.js' => '2d4a2f2dc320427c83cf36990e201316', - './include/javascript/yui3/build/dd/dd-proxy-min.js' => 'ee714c93f2f6f64f64bc60cb5bdf6018', - './include/javascript/yui3/build/dd/dd-proxy.js' => '9d077cc1499ab15ffee62053d9307745', - './include/javascript/yui3/build/dd/dd-scroll-min.js' => '177a1ca26fa69cc996e05996af597271', - './include/javascript/yui3/build/dd/dd-scroll.js' => '17a73b129856a743aa67394ae9f9ff57', - './include/javascript/yui3/build/dd/dd.js' => '094be9ccf4245a1fcf6d6f1509aa2fb3', - './include/javascript/yui3/build/datatype/datatype-date-format-min.js' => 'c4a90c61683379637587b76b7a3eda5b', - './include/javascript/yui3/build/datatype/datatype-date-format.js' => '059876d6b1d1ba2258baf9573199c815', - './include/javascript/yui3/build/datatype/datatype-date-min.js' => '67ef0b57f36f1c082dde681b5dc4cac9', - './include/javascript/yui3/build/datatype/datatype-date-parse-min.js' => '83d946fd571f24dab5eef8e275e5a88a', - './include/javascript/yui3/build/datatype/datatype-date-parse.js' => '01774df34d3d1c1e0e5fdbe89d279eef', - './include/javascript/yui3/build/datatype/datatype-date.js' => '8aa84c5fd30a42fc87fbfdf5c7e8b18c', - './include/javascript/yui3/build/datatype/datatype-min.js' => '5ad6a4a794cc685364ed914001ea4963', - './include/javascript/yui3/build/datatype/datatype-number-format-min.js' => 'e7dc0ee322c84b81280456a23970661e', - './include/javascript/yui3/build/datatype/datatype-number-format.js' => '98a41dcf87ed49b4542153e4f9948ecf', - './include/javascript/yui3/build/datatype/datatype-number-min.js' => '5b8d7927725ed27e1a9941f2a2dc3476', - './include/javascript/yui3/build/datatype/datatype-number-parse-min.js' => 'ea00cc89968546a56296e36a13a83fca', - './include/javascript/yui3/build/datatype/datatype-number-parse.js' => 'e11fd0bfdd7f84d167fa81df7ad06e02', - './include/javascript/yui3/build/datatype/datatype-number.js' => '5267cfb4bbdcf58ca3a1cc1e976c23d0', - './include/javascript/yui3/build/datatype/datatype-xml-format-min.js' => 'c5ed66f244249172c501fd4365ca723c', - './include/javascript/yui3/build/datatype/datatype-xml-format.js' => 'c3630d07c01dcf68a0506a49645273f7', - './include/javascript/yui3/build/datatype/datatype-xml-min.js' => '372e21766c256f78afd4e93402084176', - './include/javascript/yui3/build/datatype/datatype-xml-parse-min.js' => '78ddb4361d34fa01f71ea6b22cf5fc67', - './include/javascript/yui3/build/datatype/datatype-xml-parse.js' => '41b61808a06550c0d6b4015ae0757cba', - './include/javascript/yui3/build/datatype/datatype-xml.js' => '4eb36e4855f607d4d1223116a60c6d96', - './include/javascript/yui3/build/datatype/datatype.js' => 'bbb56fb027edbd2bd83d4c7bb0cdb492', - './include/javascript/yui3/build/datasource/datasource-arrayschema-min.js' => '54a3f31550dfc779bdf7ff3badfb0b42', - './include/javascript/yui3/build/datasource/datasource-arrayschema.js' => '0d50e9272104d7c7c95ee777558aa943', - './include/javascript/yui3/build/datasource/datasource-cache-min.js' => 'd8084fda943fab9ce469dda2c4e2457d', - './include/javascript/yui3/build/datasource/datasource-cache.js' => 'c93d1b23e37c2305c48db36537075a67', - './include/javascript/yui3/build/datasource/datasource-function-min.js' => '093a0fa4464a0c80b79252ae24d5c5b6', - './include/javascript/yui3/build/datasource/datasource-function.js' => 'd7cdd6bfa8a846a3dbaf01af8a77efd3', - './include/javascript/yui3/build/datasource/datasource-get-min.js' => 'e89e61c3ab703c0820917c6cdc99ff03', - './include/javascript/yui3/build/datasource/datasource-get.js' => '47560101c731893a1bbf083f1084083a', - './include/javascript/yui3/build/datasource/datasource-io-min.js' => 'f6232b38432e577ea1a030a479b5467e', - './include/javascript/yui3/build/datasource/datasource-io.js' => '73d1888f5c2264b1808347e113aeb01a', - './include/javascript/yui3/build/datasource/datasource-jsonschema-min.js' => '6c0a0b15fc15bb76b7295997b18b9c99', - './include/javascript/yui3/build/datasource/datasource-jsonschema.js' => '3afaf4b857ae45b972adcdd7186a4a44', - './include/javascript/yui3/build/datasource/datasource-local-min.js' => '66895699cf49802a7f1a0420160a1632', - './include/javascript/yui3/build/datasource/datasource-local.js' => '2adc1e3db8e2629e55d2c14cf929cc6f', - './include/javascript/yui3/build/datasource/datasource-min.js' => '904efd35e9081b5f6df7e7dcf823b57d', - './include/javascript/yui3/build/datasource/datasource-polling-min.js' => '74d4d6dc75a9fc21377a27b55b4db1e4', - './include/javascript/yui3/build/datasource/datasource-polling.js' => '974f135f59c95b9c432f85d2dbe402a3', - './include/javascript/yui3/build/datasource/datasource-textschema-min.js' => 'aacfb74656f75d1ec557b8369e84b825', - './include/javascript/yui3/build/datasource/datasource-textschema.js' => '9d06a4ea4ea528cb81d14018dcada0d7', - './include/javascript/yui3/build/datasource/datasource-xmlschema-min.js' => 'f6c390a5e74debc110ce87ef24b9ed8a', - './include/javascript/yui3/build/datasource/datasource-xmlschema.js' => 'f486482e659d075719ad32d65019d06c', - './include/javascript/yui3/build/datasource/datasource.js' => 'ec2844604a261f1d9ae7a239817a6f03', - './include/javascript/yui3/build/dataschema/dataschema-array-min.js' => '1da125ea08ae73cb62231e1b510c4ea5', - './include/javascript/yui3/build/dataschema/dataschema-array.js' => '832de48fde2a6dfd8a1646a674751a7b', - './include/javascript/yui3/build/dataschema/dataschema-base-min.js' => '41aa325522c432a9ae37d25aae6f0831', - './include/javascript/yui3/build/dataschema/dataschema-base.js' => '4d81eca661f31765fb7cb150227a584e', - './include/javascript/yui3/build/dataschema/dataschema-json-min.js' => '4b463cd540353e1444926ee4e4c9a6e5', - './include/javascript/yui3/build/dataschema/dataschema-json.js' => 'ab616e53d0b4e9676a573eec0a38e5c2', - './include/javascript/yui3/build/dataschema/dataschema-min.js' => '0753babed0c9001e18d5b099e1cd1633', - './include/javascript/yui3/build/dataschema/dataschema-text-min.js' => '5c8f1fc336008532beabfcd0f479a864', - './include/javascript/yui3/build/dataschema/dataschema-text.js' => 'c990b48e76d4406b717442fc6c696b42', - './include/javascript/yui3/build/dataschema/dataschema-xml-min.js' => '8b717693f65c950faaaf848a30fc98f2', - './include/javascript/yui3/build/dataschema/dataschema-xml.js' => '990766bdcf296cd54ae928cbeb62e207', - './include/javascript/yui3/build/dataschema/dataschema.js' => '596041b46c646351a5a490d4124ee2dc', - './include/javascript/yui3/build/cssreset/reset.css' => '4620c834f141d4527d38f470c855b964', - './include/javascript/yui3/build/cssreset/reset-min.css' => '0fc84044bc23bb989184e82f3989dc65', - './include/javascript/yui3/build/cssreset/reset-context.css' => 'aac508dbeb6503ca26b2b4434bba4ce1', - './include/javascript/yui3/build/cssreset/reset-context-min.css' => '9b934f6839f956fcafff6bfb4466f848', - './include/javascript/yui3/build/cssgrids/grids-context.css' => 'f22f5c7c935d3e399cf8159a1fe0dc36', - './include/javascript/yui3/build/cssgrids/grids-context-min.css' => '4350943c5368220f078c7921781bb704', - './include/javascript/yui3/build/cssgrids/grids.css' => '5fac4246059e2bd304fe401603491a36', - './include/javascript/yui3/build/cssgrids/grids-min.css' => 'd3915ec4650723a7deefcc135709d431', - './include/javascript/yui3/build/cssfonts/fonts.css' => '8a50b73116a8af42861533a78632a72d', - './include/javascript/yui3/build/cssfonts/fonts-min.css' => '67f666465e2ddaea2843e62ebca3cc9e', - './include/javascript/yui3/build/cssfonts/fonts-context.css' => 'b2027737dec2b597295f0b3d5b3aac17', - './include/javascript/yui3/build/cssfonts/fonts-context-min.css' => '25aeaa650efa70be99939f484aca165d', - './include/javascript/yui3/build/cssbase/base.css' => '49460517794eb5d71e4965caac8e3ac0', - './include/javascript/yui3/build/cssbase/base-min.css' => 'c93f66a2750f6402a620ae0ba9784928', - './include/javascript/yui3/build/cssbase/base-context.css' => '592d9bc8b4188e02313de63db250780a', - './include/javascript/yui3/build/cssbase/base-context-min.css' => '771b3d5f2384525a3c8b887d7ddd40ce', - './include/javascript/yui3/build/cookie/cookie-min.js' => 'be1afb25070e3a5eddc0b20e44fe2097', - './include/javascript/yui3/build/cookie/cookie.js' => '7656833d613e0137f4ebb8a43587d440', - './include/javascript/yui3/build/console/console-filters-min.js' => 'ad8e6eaa1c01016556ac5cba11092467', - './include/javascript/yui3/build/console/console-filters.js' => '65ee22b67d6c4272e144dbdc067dac8e', - './include/javascript/yui3/build/console/console-min.js' => 'cd61cb88ce9857df6e48d1a4f1b3ecb8', - './include/javascript/yui3/build/console/console.js' => '2be4b0cf026e8beee786a1f19c0a5a75', + './include/javascript/yui3/build/node-menunav/assets/node-menunav-core.css' => '647920f9c759a8aad9e3913776cb8cdb', + './include/javascript/yui3/build/node-focusmanager/node-focusmanager-min.js' => '7d1d27efa23f40bd9e6ebb4fabb9ce88', + './include/javascript/yui3/build/node-focusmanager/node-focusmanager.js' => '1fc118302cc0a4d41766437c525afe11', + './include/javascript/yui3/build/loader/loader-base.js' => 'd188ddd8691d3854205d81e9f34ce2e9', + './include/javascript/yui3/build/loader/loader-min.js' => '058e6918816b5686caa3d7f0b0e9f0bb', + './include/javascript/yui3/build/loader/loader.js' => '5e405ed25b704cd5a9d49377f5bf78f0', + './include/javascript/yui3/build/loader/loader-base-min.js' => 'b998a7ec39799e7d3992c46d5abaca77', + './include/javascript/yui3/build/loader/loader-rollup-min.js' => '8c9912bc58bfb38bc1e695eed7156a01', + './include/javascript/yui3/build/loader/loader-rollup.js' => '5b62ea984e0cd798246e33a4d5e5b981', + './include/javascript/yui3/build/loader/loader-yui3-min.js' => '1212c625423373b263ec09c1f3673c90', + './include/javascript/yui3/build/loader/loader-yui3.js' => '8379161bec73fd1af3cb8752140011e5', + './include/javascript/yui3/build/json/json-min.js' => '6ad60113f364baea9417085d6b000c0c', + './include/javascript/yui3/build/json/json-parse-min.js' => '58b775cd8b27e1457f6aedd319e092c1', + './include/javascript/yui3/build/json/json-parse.js' => '05abd5d6b789f7fb7d33016c007e7552', + './include/javascript/yui3/build/json/json-stringify-min.js' => 'bba8e06aa0da62192ddebe377eb087b9', + './include/javascript/yui3/build/json/json-stringify.js' => '79916235023cbab00d73e44f4c81c092', + './include/javascript/yui3/build/json/json.js' => '65ce29e8aab1c8f17a99ef3d93c3e10c', + './include/javascript/yui3/build/io/io-base-min.js' => 'b7e5cecbaa432223ecc799449f72b206', + './include/javascript/yui3/build/io/io-base.js' => 'a416d5d0df7506731b74bc0b0947807e', + './include/javascript/yui3/build/io/io-form-min.js' => '41dacc1413aee5b1e16f7645597814c0', + './include/javascript/yui3/build/io/io-form.js' => 'f5ecb36951a86090d394b6569536949a', + './include/javascript/yui3/build/io/io-min.js' => '745f76f3d0774d55b2282e849802353f', + './include/javascript/yui3/build/io/io-queue-min.js' => '74a7f2a0a378b9a67e4b348a03cfff0e', + './include/javascript/yui3/build/io/io-queue.js' => 'e73b2d99fbbadfadd599c5a5e198282b', + './include/javascript/yui3/build/io/io-upload-iframe-min.js' => 'db97db3b090797f598f2f920841114f7', + './include/javascript/yui3/build/io/io-upload-iframe.js' => '9857fa7617cb0e5685177e1dd2e23c3f', + './include/javascript/yui3/build/io/io-xdr-min.js' => 'eea152569f839084427fddda1216da8f', + './include/javascript/yui3/build/io/io-xdr.js' => '09ca3bded0e8f32621f0d236d2c39adc', + './include/javascript/yui3/build/io/io.js' => '4172653addb83784b897e6f8694560cb', + './include/javascript/yui3/build/io/io.swf' => 'c3491bb3c6863c5b05f5168adfd064d7', + './include/javascript/yui3/build/imageloader/imageloader-min.js' => 'c50064bbccb10a3b61e751c0427e34ce', + './include/javascript/yui3/build/imageloader/imageloader.js' => '489f048fa7811fd0834d717923164c1f', + './include/javascript/yui3/build/history/history-base.js' => 'db1fbe108dd27203190d554abaa8a058', + './include/javascript/yui3/build/history/history-min.js' => 'a636ee1700f6d0e3b9db7539ad1b0725', + './include/javascript/yui3/build/history/history.js' => 'b86bf1d17ebec4146e6078d42908c994', + './include/javascript/yui3/build/history/history-base-min.js' => '8138f1e85f04c701985ce6a764deb10a', + './include/javascript/yui3/build/history/history-hash-ie-min.js' => 'a4534af612907e548d9818b5bff13945', + './include/javascript/yui3/build/history/history-hash-ie.js' => '4e6bc84e0d0c6ccc49106462c60842e8', + './include/javascript/yui3/build/history/history-hash-min.js' => 'a6349e54582ee538b10c4e8166a450dd', + './include/javascript/yui3/build/history/history-hash.js' => 'e688dc99386fbc65a0ecf3f7e47cfa56', + './include/javascript/yui3/build/history/history-html5-min.js' => 'ef9c3b70f9c4d78a3c0831773df5bcdb', + './include/javascript/yui3/build/history/history-html5.js' => 'eb1602eefa5a6c94d615af954e199859', + './include/javascript/yui3/build/dial/dial-min.js' => '25974046a8bc3541695491abd43649ad', + './include/javascript/yui3/build/dial/dial.js' => 'd2ce56a5c5c7723b7aa58111f47a0e3e', + './include/javascript/yui3/build/dial/lang/dial.js' => '87b370989253230f0789cdd3995fecc0', + './include/javascript/yui3/build/dial/lang/dial_en.js' => '3a6f2ce152be0e5e9b2721d2548dc427', + './include/javascript/yui3/build/dial/lang/dial_es.js' => '28a7c6a09928fc2a61a377db49532400', + './include/javascript/yui3/build/dial/assets/skins/sam/dial.css' => '926d384648d93074352cb4785584252b', + './include/javascript/yui3/build/dial/assets/skins/sam/dial-skin.css' => '4b22c78a88dd9a2d3d3c222b9ce05f27', + './include/javascript/yui3/build/dial/assets/dial-core.css' => '5e668e815b53bc29b8928b3675a4ab07', + './include/javascript/yui3/build/event/event-base-ie-min.js' => '9e04120ef6728eb5d5053851dbbb3f8a', + './include/javascript/yui3/build/event/event-base-min.js' => 'eaf9152132b393b695c81e05c9549a5e', + './include/javascript/yui3/build/event/event-base.js' => '8742a06ef950c9855759c07900881019', + './include/javascript/yui3/build/event/event-base-ie.js' => '4c0dcf33d84a162c16fa64f86adb8f0a', + './include/javascript/yui3/build/event/event-delegate-min.js' => 'ae85eeb37c24a4f4b12be7501a1e2e6d', + './include/javascript/yui3/build/event/event-delegate.js' => '2d92d1ceaff013bcaa6faa9ae21755de', + './include/javascript/yui3/build/event/event-focus-min.js' => 'ce9871dea5cca402ac65a3a497df0175', + './include/javascript/yui3/build/event/event-focus.js' => '71a5053631036d30de53efbd8f232b09', + './include/javascript/yui3/build/event/event-hover-min.js' => '510c1a4d5b5c734d036145162a77a6e1', + './include/javascript/yui3/build/event/event-key-min.js' => '1907815626858be6f0044ae69a4d3fd2', + './include/javascript/yui3/build/event/event-key.js' => '80c243abd4f440ba529b898d77633888', + './include/javascript/yui3/build/event/event-min.js' => 'de2d4cd30f1dd2c74dd97986d6719bad', + './include/javascript/yui3/build/event/event-mouseenter-min.js' => 'dfceef08f8810b6ae041db2ef70e4e61', + './include/javascript/yui3/build/event/event-mouseenter.js' => '53c1039165e783a79bfb5947276490c6', + './include/javascript/yui3/build/event/event-mousewheel-min.js' => 'c58bd68f04cb27fa33b251f05bcb9050', + './include/javascript/yui3/build/event/event-mousewheel.js' => 'b0d52d17f3542e925168a6234be6e95c', + './include/javascript/yui3/build/event/event-resize-min.js' => 'b34131645abb16b2e29787dbbb66e2cc', + './include/javascript/yui3/build/event/event-resize.js' => '79638841eebd5479f568fbe9be790ce6', + './include/javascript/yui3/build/event/event.js' => 'cf99f8148cfc0fb34446a63a2406c617', + './include/javascript/yui3/build/event/event-hover.js' => '77fc18d2aa12cec4582e142c63d70e19', + './include/javascript/yui3/build/event/event-synthetic-min.js' => '4de61180c7a80b97c351d62b222e67e5', + './include/javascript/yui3/build/event/event-synthetic.js' => '3328f8da74d577fe568d663e471154cc', + './include/javascript/yui3/build/event/event-touch-min.js' => '943e4d14447a0d7b9306235feb09aac8', + './include/javascript/yui3/build/event/event-touch.js' => '2a7b74ef911dd7435b6cc385183febca', + './include/javascript/yui3/build/event-simulate/event-simulate-min.js' => 'd4a363c5845f2b5b71ef579df348e93f', + './include/javascript/yui3/build/event-simulate/event-simulate.js' => 'b24ea25b782c7edd5e49b31ca8d42df3', + './include/javascript/yui3/build/event-custom/event-custom-base-min.js' => '263985a2ee8a8f22e301ad4dfc72d868', + './include/javascript/yui3/build/event-custom/event-custom-base.js' => 'de40be4a7f4d878dbf73bd28a3f184ed', + './include/javascript/yui3/build/event-custom/event-custom-complex-min.js' => 'f84626bac686714053db3da6b2ba6211', + './include/javascript/yui3/build/event-custom/event-custom-complex.js' => 'a139a2710f4d8f7736859fff90ef48f0', + './include/javascript/yui3/build/event-custom/event-custom-min.js' => '653d1c49647737daa88bb277d64fb80d', + './include/javascript/yui3/build/event-custom/event-custom.js' => '531ecbea18475d89a4397197c27c4033', + './include/javascript/yui3/build/dump/dump-min.js' => '307e8a37710b864f363efecbd490651c', + './include/javascript/yui3/build/dump/dump.js' => '17e5b72ea5e529f7d66aa35af72eabfd', + './include/javascript/yui3/build/dom/dom-base-min.js' => 'c6bbee14ff84b8b96a6b09b10e3fe25e', + './include/javascript/yui3/build/dom/dom-base.js' => 'f4d70ac0d4b1bb6f646b7b15690bf225', + './include/javascript/yui3/build/dom/dom-deprecated.js' => '76e13080334ac522f2c4995c42fff293', + './include/javascript/yui3/build/dom/dom-min.js' => 'f5ea9d970d1048cf0bfae6e06eabc905', + './include/javascript/yui3/build/dom/dom.js' => 'ea3c68e2d146da88425286ef398199ef', + './include/javascript/yui3/build/dom/dom-screen-min.js' => '1ca65f5a668c8c8d255d8da2e9131082', + './include/javascript/yui3/build/dom/dom-screen.js' => 'f6262116ff4ce733854ef326e6c1225b', + './include/javascript/yui3/build/dom/dom-style-min.js' => 'ce4611e6835bcf9bc09ccbcc9f07e13f', + './include/javascript/yui3/build/dom/dom-style.js' => 'b4f96210fc41e3fdcd1e72cce355e231', + './include/javascript/yui3/build/dom/selector.js' => 'f032b53694332cef60289e2afbf1110b', + './include/javascript/yui3/build/dom/selector-css2-min.js' => '1c67d4d3bb786369186cc681e4515b8b', + './include/javascript/yui3/build/dom/selector-css2.js' => 'b39f80ca61d25fafa824962e5c2296fd', + './include/javascript/yui3/build/dom/selector-css3-min.js' => 'e34476f2f26fd9abf8e6c26e6ac3498f', + './include/javascript/yui3/build/dom/selector-css3.js' => 'eff66ec9f0b62fd56a401e76a7ab8c61', + './include/javascript/yui3/build/dom/selector-min.js' => 'cee0a014be99b517dce6182f8a0ef243', + './include/javascript/yui3/build/dom/selector-native-min.js' => '8bc4852a4b21758da9ffc98317a043c6', + './include/javascript/yui3/build/dom/selector-native.js' => 'fa51875b62db9184967c3540e3df7d60', + './include/javascript/yui3/build/dom/dom-deprecated-min.js' => '738fe8863987fcc28e36d8b92f02efa2', + './include/javascript/yui3/build/dom/dom-style-ie-min.js' => '25dff19fb68bf44f7fdf8dc32d934006', + './include/javascript/yui3/build/dom/dom-style-ie.js' => 'e52460d80475340dfb411b734b48b0f0', + './include/javascript/yui3/build/dd/dd-constrain-min.js' => '029494853ac0d413133985c4729c3710', + './include/javascript/yui3/build/dd/dd-constrain.js' => '57b37bf4668e95424f593589aef44e4e', + './include/javascript/yui3/build/dd/dd-ddm-base-min.js' => '1f5d9ca951f1ba3b7e0e0cfb6a3c08f8', + './include/javascript/yui3/build/dd/dd-ddm-base.js' => '78aa4685a15d8389f17f8ba61931a334', + './include/javascript/yui3/build/dd/dd-ddm-drop-min.js' => '73467d71caccf87ca877013bef1cc2a0', + './include/javascript/yui3/build/dd/dd-ddm-drop.js' => '5b39cd65a616a2acb234f310c563728c', + './include/javascript/yui3/build/dd/dd-ddm-min.js' => '7eb7067804b39af6afa08bccfe367b8d', + './include/javascript/yui3/build/dd/dd-ddm.js' => 'c045dd97d222757974fe2fdea4dc9c1d', + './include/javascript/yui3/build/dd/dd-delegate-min.js' => 'df957111a3687f3c529226c050d832d4', + './include/javascript/yui3/build/dd/dd-delegate.js' => '79ac2932197ee9b3a50c2e78bf57aa75', + './include/javascript/yui3/build/dd/dd-drag-min.js' => '7985529a7887b1ad4ba55ed9a7739c50', + './include/javascript/yui3/build/dd/dd-drag.js' => '2290e17db6c929dd48298547dca75305', + './include/javascript/yui3/build/dd/dd-drop-min.js' => 'b7b830551e9ea9f40e09921503280434', + './include/javascript/yui3/build/dd/dd-drop-plugin-min.js' => '1c2564727a0f7b9ffa51448864c0265d', + './include/javascript/yui3/build/dd/dd-drop-plugin.js' => '260f94631989ae90a7fc94a59d3eaf9b', + './include/javascript/yui3/build/dd/dd-drop.js' => 'a527d3d95e50d4ee579501a82db1d924', + './include/javascript/yui3/build/dd/dd-gestures-min.js' => '09aeac69d8ebf7c8c6e138493eed7365', + './include/javascript/yui3/build/dd/dd-gestures.js' => '26820135f886b0f8b7b35893567fa1de', + './include/javascript/yui3/build/dd/dd-min.js' => 'b957157c4ac429d9730452daf47892fb', + './include/javascript/yui3/build/dd/dd-plugin-min.js' => '3a8bdc5011f0b43c1755920adb797ab8', + './include/javascript/yui3/build/dd/dd-plugin.js' => 'a9048c1f392392ccc7494fe25c2b7373', + './include/javascript/yui3/build/dd/dd-proxy-min.js' => '21fea7be716d094d8ade8745ed6ab9da', + './include/javascript/yui3/build/dd/dd-proxy.js' => '49b42093baa2e3c7af06a6a8988f7704', + './include/javascript/yui3/build/dd/dd-scroll-min.js' => 'a500ae272b5f50647dd6dc678f3959db', + './include/javascript/yui3/build/dd/dd-scroll.js' => '3277354f92b0b5b78f21aa4666a554bb', + './include/javascript/yui3/build/dd/dd.js' => 'dbebcabadabf28019341f42884934d67', + './include/javascript/yui3/build/datatype/datatype-date-format-min.js' => '7e64688c75526ca3ef60866e56125e69', + './include/javascript/yui3/build/datatype/datatype-date-format.js' => '04a0feaea211114807a4e8bee5b2b386', + './include/javascript/yui3/build/datatype/datatype-date-min.js' => 'da129b133a8901bf8faa43fc7b0fb2e9', + './include/javascript/yui3/build/datatype/datatype-date-parse-min.js' => 'a827dcf0830857a0c4cc16fc3d77fd78', + './include/javascript/yui3/build/datatype/datatype-date-parse.js' => '4d681a0577b2d953b6898efe88afcc82', + './include/javascript/yui3/build/datatype/datatype-date.js' => 'b8821cb49b32ee47375dc319fe7b5b42', + './include/javascript/yui3/build/datatype/datatype-min.js' => '282206343e917ee9edaf4f107472d9a9', + './include/javascript/yui3/build/datatype/datatype-number-format-min.js' => '278052e0bee705b77a8ac13dfc5ab512', + './include/javascript/yui3/build/datatype/datatype-number-format.js' => 'ea2b13c06adf201fba84a569875c4769', + './include/javascript/yui3/build/datatype/datatype-number-min.js' => '5c947433b835206d6a5e8330db69146a', + './include/javascript/yui3/build/datatype/datatype-number-parse-min.js' => 'dc565861ac8d5b6464e12b08307e534c', + './include/javascript/yui3/build/datatype/datatype-number-parse.js' => '394d1dc2e612f42d5e509d2dc17a8b66', + './include/javascript/yui3/build/datatype/datatype-number.js' => 'ef3dbf5b36c83d11ab4317f03ca4d96e', + './include/javascript/yui3/build/datatype/datatype-xml-format-min.js' => '3ff066fa2c72439760ea8c8e7e5dc0ae', + './include/javascript/yui3/build/datatype/datatype-xml-format.js' => '6aa97f924d22da360f0153892abcb0c9', + './include/javascript/yui3/build/datatype/datatype-xml-min.js' => '91fa1d512e053efa814036441dc26743', + './include/javascript/yui3/build/datatype/datatype-xml-parse-min.js' => '5802434540da098b92ababc8a3a2a5f5', + './include/javascript/yui3/build/datatype/datatype-xml-parse.js' => '884cf9fce90fa0b65f7f8e0bcc36795b', + './include/javascript/yui3/build/datatype/datatype-xml.js' => '3db17df1fa4997eac46f090dad920d07', + './include/javascript/yui3/build/datatype/datatype.js' => '10403c5c49e2e7554f2cc33f0592fda4', + './include/javascript/yui3/build/datatype/lang/datatype-date-format.js' => '7a9c765710e20e10d4fce70823ea5883', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_ar-JO.js' => 'd2e031bab6c2eadce20e33a45b03ec8b', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_ar.js' => '08f43c672dc499caf02b9e5ca5ce4b56', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_ca-ES.js' => '3fe36b32f2fd70669d9c5d3609c9852a', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_ca.js' => '9bccd9c3345a9c4fb0514f72dfd70444', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_da-DK.js' => 'b6cee4a277489b5f298c418f9386fab4', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_da.js' => '646d624aa86addbfd18e99bf9a8770ed', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_de-AT.js' => '739d278d97bae2f71c4babeecbd6d814', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_de-DE.js' => 'b3cb7bcc2a7de444c05732eb61eee0cd', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_de.js' => 'ef8367ef10f05f49300d7e1556321d38', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_el-GR.js' => 'a2571ecbfbd5f68ae739e1ed5ebcb2c2', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_el.js' => '8ed375214c9a21153e819b127e35e2e7', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_en-AU.js' => 'ef5c28b27adae2bbdfda34ee42854051', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_en-CA.js' => '094423005bc236702def041824c62989', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_en-GB.js' => 'ce11654acc1bc7b5743bef7b97c794fc', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_en-IE.js' => 'ddb8e33b83965ed8e92aedeba3480dc1', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_en-IN.js' => 'c933155b9bdc13d568c5d825726cd9ef', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_en-JO.js' => '3c12b6c0370751c8557290cb0c875e1e', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_en-MY.js' => 'f0d8539762994d9ddf79041ef3083338', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_en-NZ.js' => '6f182a7831ccb03d587d400c68ffea7e', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_en-PH.js' => 'a4c74e8f4962dd4b0b1f466941809a1b', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_en-SG.js' => 'e9be1341e67bbf6de2e20a7ab3c545aa', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_en-US.js' => 'c2b9840787590231bc71f79ed58083d2', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_en.js' => '0b24374c8b82bbf13e36b3ac5ef403d7', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_es-AR.js' => '514d25ecaad93b5d79064461fb4ec85f', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_es-BO.js' => 'bb0bcd7859f7ce7e0264eef3caf9c8df', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_es-CL.js' => '890f4dc86d18c85db36631ddd527e8c8', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_es-CO.js' => 'a806728c5546058ed621b932d4437f2e', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_es-EC.js' => 'e8ac9b6a391111436b37d6f255fb6218', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_es-ES.js' => '22d7961030a68eeb7cb7a27b27f4fbf0', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_es-MX.js' => '72900a24b11a23efe3f96c776a034587', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_es-PE.js' => 'e2055d96d1c23dbc37acd7228bb56e16', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_es-PY.js' => 'b6bfb35807c527b0278d1011c524c9d4', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_es-US.js' => '8f7906b340c574c8d6e5f19c69a31a01', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_es-UY.js' => '613a43bbe9958b12e674c805efc16771', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_es-VE.js' => '181ea9eb15d62c3231fe9ae7253285b3', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_es.js' => 'b53bea3e3ff14d7192c1e00e31cb40c1', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_fi-FI.js' => 'de0920fb40621159b2eba811caadc628', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_fi.js' => '2ad87c94cfbff87db6c0a640c0db3d4e', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_fr-BE.js' => '46d3061829d7d5d7bb08f1f85df78af7', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_fr-CA.js' => '7234f4c190591b80c8f2e288e18b2e11', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_fr-FR.js' => '36462fe8c895827ee267af51ce6440cd', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_fr.js' => '73b877e12edfe2553fe70053f96c693d', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_hi-IN.js' => 'ef4701cbb0ec5e586d488b776325a90f', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_hi.js' => '1caa8de7ecdeb9f6dfa40209dc27bd68', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_id-ID.js' => 'b9b383b365e772ecd7aef65b7d400193', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_id.js' => 'db6386aed1fdd479e9c7e07a9bc46caf', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_it-IT.js' => '5336fe667425a1f469e516be2021f8c9', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_it.js' => '855707c2205ff0e85490bb5cac8fe508', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_ja-JP.js' => '6fabb76c9ce1a58354c4aca8bba380bb', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_ja.js' => '29768d2004f14957facdd778095c276e', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_ko-KR.js' => 'd8783e6eb27375568033dfbf63d62b59', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_ko.js' => 'de8246f10498454fcbd45ec2706b302e', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_ms-MY.js' => '5e4782db4f5f0df683d24afb286edf17', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_ms.js' => '73d22c3a320acf1ca369f76eb797a689', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_nb-NO.js' => '66bab9e449c7a634f677c764ebc4a7c0', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_nb.js' => '97d00c1e57b2b442780153435d666d76', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_nl-BE.js' => '60e404eb1d93159bfb816ccd17340cf7', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_nl-NL.js' => '174d5599c1a275ef285e1546a6bcb634', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_nl.js' => '1caab97306e592dcb96d7d62d0597414', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_pl-PL.js' => 'ac7cbf510a252d9ac331ea49df0a19e5', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_pl.js' => '423af232ea692a8b839a8ba4a3295499', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_pt-BR.js' => 'cc97895680b1318738f48f28eb86b5c2', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_pt.js' => '222c4e6115340d7754b71071f35d73af', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_ro-RO.js' => 'd4944efe7552b6c8350ba8a2b15663a6', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_ro.js' => '3ce214a3368718aee230aa9aae7f8eab', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_ru-RU.js' => 'e07ef28d5386cd283e9fc5f9a36db0a8', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_ru.js' => 'abe79decee753f0591eb3738afcbc5a5', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_sv-SE.js' => 'eccc0315ebb012784bd49c7ae1f3d271', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_sv.js' => '96157712eb9664d44158229da662b3dd', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_th-TH.js' => '6825e421d9b922eb02e2c4f0897f1963', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_th.js' => '178ab09a601359a567c7a84b3b0dacca', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_tr-TR.js' => 'ff0f587b583cfeb0864e40ac397773c6', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_tr.js' => '42b085dae516d2859905bddade813932', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_vi-VN.js' => '8311434fb64e104298825ca4c888e169', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_vi.js' => '08e61775577c637369a390a4fbc02e6c', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hans-CN.js' => '2bea9904b2a359fc4b76e932eb5213d9', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hans.js' => '69f3e7d42ec9341e9c0fd75a4f0fea5a', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hant-HK.js' => '4db61f51c5fec6ee8502587ffd40368b', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hant-TW.js' => 'd4524304b2bae46cc200691e104549fa', + './include/javascript/yui3/build/datatype/lang/datatype-date-format_zh-Hant.js' => 'd73db7419faf465915fda28c5e39e8f9', + './include/javascript/yui3/build/datatype/lang/datatype-date.js' => '386ebd3abc1511e97c8b0ddb6624d038', + './include/javascript/yui3/build/datatype/lang/datatype-date_ar-JO.js' => '804444f46c9330bdfee2f5f718358ee3', + './include/javascript/yui3/build/datatype/lang/datatype-date_ar.js' => '871d97abf3009ccec6f71204f54a9e20', + './include/javascript/yui3/build/datatype/lang/datatype-date_ca-ES.js' => '47e71c838ca43500c2d83d0deaa1b34c', + './include/javascript/yui3/build/datatype/lang/datatype-date_ca.js' => 'ad569ef7ae091a959ebc79f24d0079dc', + './include/javascript/yui3/build/datatype/lang/datatype-date_da-DK.js' => 'c6e3a579a9f0db11ab72aa8990720230', + './include/javascript/yui3/build/datatype/lang/datatype-date_da.js' => '7642e2b9ceb48a668e2777d7fb34f859', + './include/javascript/yui3/build/datatype/lang/datatype-date_de-AT.js' => '7a6317790369dfcf9c1640548854dfd3', + './include/javascript/yui3/build/datatype/lang/datatype-date_de-DE.js' => '8e3f55965a665457c61bc75a576ca3a6', + './include/javascript/yui3/build/datatype/lang/datatype-date_de.js' => 'cf93e893d5578826fcccb53d5a3540a9', + './include/javascript/yui3/build/datatype/lang/datatype-date_el-GR.js' => 'a77f38cea4efeff8164082761aa72086', + './include/javascript/yui3/build/datatype/lang/datatype-date_el.js' => '2acef2f19a71821f9c17255c3e3921b0', + './include/javascript/yui3/build/datatype/lang/datatype-date_en-AU.js' => '31abda5315dcde04cccdedbc466c05dc', + './include/javascript/yui3/build/datatype/lang/datatype-date_en-CA.js' => '0728435f1ae7b58bde07a65aa3cfcd77', + './include/javascript/yui3/build/datatype/lang/datatype-date_en-GB.js' => '92719b0d70fa2ff78399affff2611c3e', + './include/javascript/yui3/build/datatype/lang/datatype-date_en-IE.js' => '7f8eecd8fb6d0ef4af8dce90164d828c', + './include/javascript/yui3/build/datatype/lang/datatype-date_en-IN.js' => '22031f3e3d8e6ee74f38e892db838beb', + './include/javascript/yui3/build/datatype/lang/datatype-date_en-JO.js' => '390577962129269b45acd0712fac85c2', + './include/javascript/yui3/build/datatype/lang/datatype-date_en-MY.js' => '67bdfb95d9f0f8ea60ae3aa7f9732b67', + './include/javascript/yui3/build/datatype/lang/datatype-date_en-NZ.js' => 'f333936e2d9334e3d75cb06cf56fd300', + './include/javascript/yui3/build/datatype/lang/datatype-date_en-PH.js' => 'ec48ef97bdc26aad459defb8f0fe65d1', + './include/javascript/yui3/build/datatype/lang/datatype-date_en-SG.js' => 'f9ebba9ccc7dea38a770629042a6dba6', + './include/javascript/yui3/build/datatype/lang/datatype-date_en-US.js' => '7bb491f77b5948b4e5199637b7e37f99', + './include/javascript/yui3/build/datatype/lang/datatype-date_en.js' => '763935da09b635ebb56642824f1ecc01', + './include/javascript/yui3/build/datatype/lang/datatype-date_es-AR.js' => '55b2f94642b8fea3b83c10cca502fb5b', + './include/javascript/yui3/build/datatype/lang/datatype-date_es-BO.js' => '0d086a1605c85182d12a802ca46938ac', + './include/javascript/yui3/build/datatype/lang/datatype-date_es-CL.js' => 'c30e51df1ab12989de369f54558bcfbc', + './include/javascript/yui3/build/datatype/lang/datatype-date_es-CO.js' => '1ea9b059335dc9eaa246c168a710f684', + './include/javascript/yui3/build/datatype/lang/datatype-date_es-EC.js' => '0858ba6920ecc731758fb31f9412c80d', + './include/javascript/yui3/build/datatype/lang/datatype-date_es-ES.js' => 'ce3b4aaa463b9234fb984a8d4ed1d971', + './include/javascript/yui3/build/datatype/lang/datatype-date_es-MX.js' => '36bb4f66cc062b13d105291dde463594', + './include/javascript/yui3/build/datatype/lang/datatype-date_es-PE.js' => '2a860c9f1696023972f4be1ac37942ae', + './include/javascript/yui3/build/datatype/lang/datatype-date_es-PY.js' => '05910e329951cadf0fbaad68963114a4', + './include/javascript/yui3/build/datatype/lang/datatype-date_es-US.js' => '5404ee5ce7a8e6b4947d67c5154581e8', + './include/javascript/yui3/build/datatype/lang/datatype-date_es-UY.js' => 'dfeb8958fa3377e4beb205ad3a1b46f6', + './include/javascript/yui3/build/datatype/lang/datatype-date_es-VE.js' => 'dce33fefb8f47915c1bb954653e6dc7e', + './include/javascript/yui3/build/datatype/lang/datatype-date_es.js' => 'd8a0384a140b25ec54ab2cadf08cdf34', + './include/javascript/yui3/build/datatype/lang/datatype-date_fi-FI.js' => '5a8bfa671940be3d3b4f00f422b20bbf', + './include/javascript/yui3/build/datatype/lang/datatype-date_fi.js' => 'b2887953e1828a75963a0fefa3f9cc22', + './include/javascript/yui3/build/datatype/lang/datatype-date_fr-BE.js' => 'fd4d47825fd879990fc89b2ca8672f63', + './include/javascript/yui3/build/datatype/lang/datatype-date_fr-CA.js' => '79d383f6309e901f7f1cc7a8e3668e6d', + './include/javascript/yui3/build/datatype/lang/datatype-date_fr-FR.js' => 'c87ed51b6ab55e06e9335586f0ddb3b9', + './include/javascript/yui3/build/datatype/lang/datatype-date_fr.js' => 'cadc0aa3c519e04cc18ae55ccf6fc2f7', + './include/javascript/yui3/build/datatype/lang/datatype-date_hi-IN.js' => '309b14d40bd3147b3c198a20fc5dbc26', + './include/javascript/yui3/build/datatype/lang/datatype-date_hi.js' => '9ee4790fcbb3d506c6c3d91778a81289', + './include/javascript/yui3/build/datatype/lang/datatype-date_id-ID.js' => '1c347774f57c0bdb26d3c1517c0d5b6f', + './include/javascript/yui3/build/datatype/lang/datatype-date_id.js' => '8d8e117cc772bd344244f7d3d393dc78', + './include/javascript/yui3/build/datatype/lang/datatype-date_it-IT.js' => 'dd596783cc1f10e73406f93526c0d867', + './include/javascript/yui3/build/datatype/lang/datatype-date_it.js' => 'd317b732171a661f83b7eeb53443bff9', + './include/javascript/yui3/build/datatype/lang/datatype-date_ja-JP.js' => '391f1ca42a821f444140470336a2abc5', + './include/javascript/yui3/build/datatype/lang/datatype-date_ja.js' => '862aef400cf8d654e9ee716f2920a60e', + './include/javascript/yui3/build/datatype/lang/datatype-date_ko-KR.js' => '75c3b0f2c9603c556e9a9ab12497685e', + './include/javascript/yui3/build/datatype/lang/datatype-date_ko.js' => 'c839f653c4acecfd00ae85abea60dfd0', + './include/javascript/yui3/build/datatype/lang/datatype-date_ms-MY.js' => '70048d46403260de4c17424e53391c13', + './include/javascript/yui3/build/datatype/lang/datatype-date_ms.js' => '40a39f402681a06ca752742b2dae0816', + './include/javascript/yui3/build/datatype/lang/datatype-date_nb-NO.js' => 'de9f8e824de4f94a8c11525665b65fa7', + './include/javascript/yui3/build/datatype/lang/datatype-date_nb.js' => '9e80a0e30503bc9f2eeafc97576a12ee', + './include/javascript/yui3/build/datatype/lang/datatype-date_nl-BE.js' => 'dad59a352eb5b56bd13f29f75a047d85', + './include/javascript/yui3/build/datatype/lang/datatype-date_nl-NL.js' => '20c4ad6c69579ee614266d7e7a8c6a1a', + './include/javascript/yui3/build/datatype/lang/datatype-date_nl.js' => 'd80423a555798e872b17150ea10e7f37', + './include/javascript/yui3/build/datatype/lang/datatype-date_pl-PL.js' => '205b4bd0c8d278e2dba17b463ab4d86a', + './include/javascript/yui3/build/datatype/lang/datatype-date_pl.js' => 'aa7247636ef1a2b83063571cd36d59cf', + './include/javascript/yui3/build/datatype/lang/datatype-date_pt-BR.js' => '7f101c3e11430f92214c3ad2bba4c983', + './include/javascript/yui3/build/datatype/lang/datatype-date_pt.js' => '6dcc34ad2cdeede06e0f885dd2bc649d', + './include/javascript/yui3/build/datatype/lang/datatype-date_ro-RO.js' => 'b6d4d1d466c3d246092dc8f660a38c82', + './include/javascript/yui3/build/datatype/lang/datatype-date_ro.js' => '8818b38a2d57afaeb4b1973ff13ea618', + './include/javascript/yui3/build/datatype/lang/datatype-date_ru-RU.js' => '9e0f23d50ad53ce17a3c8ecef9433e11', + './include/javascript/yui3/build/datatype/lang/datatype-date_ru.js' => '8a98a19e9224039f20d59c9d4fc33931', + './include/javascript/yui3/build/datatype/lang/datatype-date_sv-SE.js' => '28324e58d801134bf66fff3d25593986', + './include/javascript/yui3/build/datatype/lang/datatype-date_sv.js' => '7514053d6a291563adc13dff7824ae62', + './include/javascript/yui3/build/datatype/lang/datatype-date_th-TH.js' => '1dcd98fdec1c18f8ce02c5a584760ab8', + './include/javascript/yui3/build/datatype/lang/datatype-date_th.js' => '648d8034d1dea5f1de0f8d001c17183e', + './include/javascript/yui3/build/datatype/lang/datatype-date_tr-TR.js' => '41b2d262753a7d3cd9b40610553ec0d0', + './include/javascript/yui3/build/datatype/lang/datatype-date_tr.js' => 'ec2fa8c3d4df51a34fe02a9396ed9cc5', + './include/javascript/yui3/build/datatype/lang/datatype-date_vi-VN.js' => '17730b99dc7c552b7c79e9c7588a214e', + './include/javascript/yui3/build/datatype/lang/datatype-date_vi.js' => '2c7d0e55a0e8cdc2e49f95536cb5e045', + './include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hans-CN.js' => 'fc380b90bd0567d0bb9ef838f1845aac', + './include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hans.js' => '552c2d46e12f230576f9c7caa8156f95', + './include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hant-HK.js' => 'f8d56c8432e40edb9e7f6c276de9ae3e', + './include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hant-TW.js' => '8a5d3ea97fb5f485da579f9a3df3a183', + './include/javascript/yui3/build/datatype/lang/datatype-date_zh-Hant.js' => '8d27a3bb123d81c33d0e768e9f60a9ab', + './include/javascript/yui3/build/datatype/lang/datatype.js' => '5797f77ddba5e7f45545a1c38594bb32', + './include/javascript/yui3/build/datatype/lang/datatype_ar-JO.js' => 'd0350b47172313371aea5d9bdbf63e29', + './include/javascript/yui3/build/datatype/lang/datatype_ar.js' => '662b6008d3bf7211297b5bb6d685c9df', + './include/javascript/yui3/build/datatype/lang/datatype_ca-ES.js' => 'e16cad90a8259aa1af07ffb4e176883c', + './include/javascript/yui3/build/datatype/lang/datatype_ca.js' => '782bfddd1ca1d861900e4de2221c242d', + './include/javascript/yui3/build/datatype/lang/datatype_da-DK.js' => 'd15a69e4183559fe92f685bcfaca43ad', + './include/javascript/yui3/build/datatype/lang/datatype_da.js' => '8c05e0e8a5dbc8f81bd8b4f671471953', + './include/javascript/yui3/build/datatype/lang/datatype_de-AT.js' => 'b58f586e44a42f3d97df3b9d37c995e8', + './include/javascript/yui3/build/datatype/lang/datatype_de-DE.js' => '882a1cd6de4e0942dab6810afa44ecc6', + './include/javascript/yui3/build/datatype/lang/datatype_de.js' => 'c1d8a812e29f3432950ba61f22024bfa', + './include/javascript/yui3/build/datatype/lang/datatype_el-GR.js' => '2deddea491693c6286f4ab09b9e1f61e', + './include/javascript/yui3/build/datatype/lang/datatype_el.js' => '35ea7bde49ee7d70002b942a604197b6', + './include/javascript/yui3/build/datatype/lang/datatype_en-AU.js' => '6db2b5855d17c3429507a43e7ee33793', + './include/javascript/yui3/build/datatype/lang/datatype_en-CA.js' => 'dd931cbb2c696162ec7e3a222b2e586f', + './include/javascript/yui3/build/datatype/lang/datatype_en-GB.js' => '006d2118873c504badda1f28f3d9c4e8', + './include/javascript/yui3/build/datatype/lang/datatype_en-IE.js' => '0d37a9a52d35fd0cbd8c4a3457c7b00b', + './include/javascript/yui3/build/datatype/lang/datatype_en-IN.js' => 'b8798a8fa64ef3beefb64d751c105b2f', + './include/javascript/yui3/build/datatype/lang/datatype_en-JO.js' => 'b060a3e8f6576e49fd09337167b023fd', + './include/javascript/yui3/build/datatype/lang/datatype_en-MY.js' => 'a913de394b78c660dc9e53e2852f0bde', + './include/javascript/yui3/build/datatype/lang/datatype_en-NZ.js' => '5eb791a511a4236fe0e50ae0d5b48a10', + './include/javascript/yui3/build/datatype/lang/datatype_en-PH.js' => 'd6f98f4f121c7d3087856bc7eb22b3ad', + './include/javascript/yui3/build/datatype/lang/datatype_en-SG.js' => '693bc6517f348327e4928d71f651dfef', + './include/javascript/yui3/build/datatype/lang/datatype_en-US.js' => '320931c1a8ad3dda170b66168ee7e277', + './include/javascript/yui3/build/datatype/lang/datatype_en.js' => 'a89987946b13c81c4a78a1322df9d9a1', + './include/javascript/yui3/build/datatype/lang/datatype_es-AR.js' => '36c632d473843a468aee79d80a5d4fe0', + './include/javascript/yui3/build/datatype/lang/datatype_es-BO.js' => '7f5dc3e9d2ce32f6809f65f21292e885', + './include/javascript/yui3/build/datatype/lang/datatype_es-CL.js' => '2fc72247b6e3eb854a1bc106178a5327', + './include/javascript/yui3/build/datatype/lang/datatype_es-CO.js' => 'bc0909e843414a5c5750ac765b2bed0f', + './include/javascript/yui3/build/datatype/lang/datatype_es-EC.js' => '1da85503e3c8591ec91b99ab30b750a8', + './include/javascript/yui3/build/datatype/lang/datatype_es-ES.js' => '33f224235c28ece830ba0fa573b664f7', + './include/javascript/yui3/build/datatype/lang/datatype_es-MX.js' => 'e5b686662c932440430142f563b49024', + './include/javascript/yui3/build/datatype/lang/datatype_es-PE.js' => 'd1146e60022355d76c1702eab2cd878c', + './include/javascript/yui3/build/datatype/lang/datatype_es-PY.js' => '016b0ab56439d1b02ebdf99723c64e5a', + './include/javascript/yui3/build/datatype/lang/datatype_es-US.js' => '495001fc754ac4e92f8d42c860da7600', + './include/javascript/yui3/build/datatype/lang/datatype_es-UY.js' => 'c5b89d4d476cd0d5de01259dbdb47add', + './include/javascript/yui3/build/datatype/lang/datatype_es-VE.js' => '17b42a2bbb4872efcd5748c08e740522', + './include/javascript/yui3/build/datatype/lang/datatype_es.js' => '175a52448db7e8cb9bee6e552419b828', + './include/javascript/yui3/build/datatype/lang/datatype_fi-FI.js' => '2872b9665888f493d25e256edac2ea9c', + './include/javascript/yui3/build/datatype/lang/datatype_fi.js' => 'de721dd60ba60d6c02842bcbee29a7c5', + './include/javascript/yui3/build/datatype/lang/datatype_fr-BE.js' => 'ca8e4081552088d950b28c7647c4e966', + './include/javascript/yui3/build/datatype/lang/datatype_fr-CA.js' => '09f8a96cc6fea7bf0d4d1931d705f45a', + './include/javascript/yui3/build/datatype/lang/datatype_fr-FR.js' => 'e6d1e2dc5a11f9f3f187db84935cf373', + './include/javascript/yui3/build/datatype/lang/datatype_fr.js' => '1dae2a5f0b47e7a34bb85733a81a1882', + './include/javascript/yui3/build/datatype/lang/datatype_hi-IN.js' => '79c7070a24ccef88b899331a020175fa', + './include/javascript/yui3/build/datatype/lang/datatype_hi.js' => '3c667ee9ed89b4ced28f95d326362150', + './include/javascript/yui3/build/datatype/lang/datatype_id-ID.js' => '329fb69ec6b2e69ac5e569f77d497bbb', + './include/javascript/yui3/build/datatype/lang/datatype_id.js' => 'bf39cee0732ff88b4a5332f7423a401e', + './include/javascript/yui3/build/datatype/lang/datatype_it-IT.js' => '616d9f3ab3d913f2cd4cc80a01e37705', + './include/javascript/yui3/build/datatype/lang/datatype_it.js' => '07003e82cff2093114a40349961529d8', + './include/javascript/yui3/build/datatype/lang/datatype_ja-JP.js' => '87bf4516601d043ec1ec7c3a519ec132', + './include/javascript/yui3/build/datatype/lang/datatype_ja.js' => '8aacd8d582323ceeeb61bdd021c9030b', + './include/javascript/yui3/build/datatype/lang/datatype_ko-KR.js' => '1a0244502128012cdf983493fc5c928e', + './include/javascript/yui3/build/datatype/lang/datatype_ko.js' => '39d7d9e35aa02939aa7434dfdc31d341', + './include/javascript/yui3/build/datatype/lang/datatype_ms-MY.js' => '40d34ce66f97daac5bea36570874132d', + './include/javascript/yui3/build/datatype/lang/datatype_ms.js' => '2c6d465f1c661bc38d1a58368bcdd5c1', + './include/javascript/yui3/build/datatype/lang/datatype_nb-NO.js' => '7153901f5d7231163ee4ef4056615833', + './include/javascript/yui3/build/datatype/lang/datatype_nb.js' => '248dd93781fd0e2c2e6715ccbf20549d', + './include/javascript/yui3/build/datatype/lang/datatype_nl-BE.js' => 'ba08479b166e8ef03689c53bcafad68d', + './include/javascript/yui3/build/datatype/lang/datatype_nl-NL.js' => '8e86acb44d3bbe49948cddcd05e05a35', + './include/javascript/yui3/build/datatype/lang/datatype_nl.js' => '63d16fe83c6e394727bb27fef2790092', + './include/javascript/yui3/build/datatype/lang/datatype_pl-PL.js' => '4967824caf3f5714078579feb90fbb4b', + './include/javascript/yui3/build/datatype/lang/datatype_pl.js' => '33bc67ffd637b6a88971944981828bd1', + './include/javascript/yui3/build/datatype/lang/datatype_pt-BR.js' => 'bd36aaed17f9628401e2e803d6179523', + './include/javascript/yui3/build/datatype/lang/datatype_pt.js' => 'd3f8cd8fb26fc6a6582f141b5d513add', + './include/javascript/yui3/build/datatype/lang/datatype_ro-RO.js' => 'c1026b86dfa06d833658fd47dc82a435', + './include/javascript/yui3/build/datatype/lang/datatype_ro.js' => 'dc3956cb24d0200541e1d3c6c484e898', + './include/javascript/yui3/build/datatype/lang/datatype_ru-RU.js' => 'b289f2bacb4e53581488796b31301054', + './include/javascript/yui3/build/datatype/lang/datatype_ru.js' => '93f69ff1324a3e5c7f1740d14aa06e58', + './include/javascript/yui3/build/datatype/lang/datatype_sv-SE.js' => '5566241099e009f6da7b623873f2ab94', + './include/javascript/yui3/build/datatype/lang/datatype_sv.js' => '1657d8c2c6724fa928e755a4b12a3d8c', + './include/javascript/yui3/build/datatype/lang/datatype_th-TH.js' => '74564c4bafd6a3352f538992637a489f', + './include/javascript/yui3/build/datatype/lang/datatype_th.js' => '7c78c8f05db3d2d26da13541851fd7ef', + './include/javascript/yui3/build/datatype/lang/datatype_tr-TR.js' => '4ae00baa19914f60f6f2261e43f5ebcf', + './include/javascript/yui3/build/datatype/lang/datatype_tr.js' => '34e27e310000fabeef02ea74ec2e8ad2', + './include/javascript/yui3/build/datatype/lang/datatype_vi-VN.js' => '9b35cd9bf49a8f305bc35d5ec6c8f4d4', + './include/javascript/yui3/build/datatype/lang/datatype_vi.js' => 'b24533b58c7d7fa5f052b366e3724cb7', + './include/javascript/yui3/build/datatype/lang/datatype_zh-Hans-CN.js' => 'd7c6a8267072e45ffd53b14cafd0c568', + './include/javascript/yui3/build/datatype/lang/datatype_zh-Hans.js' => '811212aed8c3e886800232f7b8a22451', + './include/javascript/yui3/build/datatype/lang/datatype_zh-Hant-HK.js' => 'eae47176be9b1a292d27b1d30c79d882', + './include/javascript/yui3/build/datatype/lang/datatype_zh-Hant-TW.js' => '6e6a8f61d39572fccd7e2d64ddb2e48d', + './include/javascript/yui3/build/datatype/lang/datatype_zh-Hant.js' => 'eab08124389c40eabf53a31d22f95c4f', + './include/javascript/yui3/build/datasource/datasource-arrayschema-min.js' => '5a781b9d08ad1d22a9c26452e1e9fce8', + './include/javascript/yui3/build/datasource/datasource-arrayschema.js' => '3ca59185afb79f6c52bebc353a43af91', + './include/javascript/yui3/build/datasource/datasource-cache-min.js' => '0658e94836da7811d60f7795f7597504', + './include/javascript/yui3/build/datasource/datasource-cache.js' => '7fec4f2efc9cd0cb8bc53f0c272bcbf8', + './include/javascript/yui3/build/datasource/datasource-function-min.js' => 'd5fef15bf739cd4cecac5e15c6d41be7', + './include/javascript/yui3/build/datasource/datasource-function.js' => '12422a9ce66114add19d046a1cd136c3', + './include/javascript/yui3/build/datasource/datasource-get-min.js' => 'b334937e9f31b6482eea0bea53d679a0', + './include/javascript/yui3/build/datasource/datasource-get.js' => '3ff899ffcad4dd6f5fea6b4a00db965f', + './include/javascript/yui3/build/datasource/datasource-io-min.js' => '2f6f5cd39b0bd46cd30d9065c6807d33', + './include/javascript/yui3/build/datasource/datasource-io.js' => 'a1182b50b3200e759d80b700eeb64f61', + './include/javascript/yui3/build/datasource/datasource-jsonschema-min.js' => '4c2bc81c2f8f7d907fce05ee7d55bdf9', + './include/javascript/yui3/build/datasource/datasource-jsonschema.js' => 'b014e1578ae414bf0da765b752cfaf7d', + './include/javascript/yui3/build/datasource/datasource-local-min.js' => '879288cc0ccab34e3c08b5d58b05b134', + './include/javascript/yui3/build/datasource/datasource-local.js' => 'd98d0c1bd305e07815184b7351d719a6', + './include/javascript/yui3/build/datasource/datasource-min.js' => 'fa9d964659eebbc13b5dfb0a9addedf6', + './include/javascript/yui3/build/datasource/datasource-polling-min.js' => '2d144391249693d84976c66b8960d2dd', + './include/javascript/yui3/build/datasource/datasource-polling.js' => 'f0416d5db50035470fa22727ffd78efd', + './include/javascript/yui3/build/datasource/datasource-textschema-min.js' => '3822acb6c91eef2af0bd805c52f815a0', + './include/javascript/yui3/build/datasource/datasource-textschema.js' => 'fc5d0e1819811dad3bcc9b34ccd6e900', + './include/javascript/yui3/build/datasource/datasource-xmlschema-min.js' => 'b9330e1d8c32d059f0c156803e82c05d', + './include/javascript/yui3/build/datasource/datasource-xmlschema.js' => '530da68768fe5fb6dbd659f7c0701f8e', + './include/javascript/yui3/build/datasource/datasource.js' => '87199f4d03e9bf97a94f9ebaee40eb7e', + './include/javascript/yui3/build/dataschema/dataschema-array-min.js' => '0b328ab3252875d21691a35ed9c08c72', + './include/javascript/yui3/build/dataschema/dataschema-array.js' => 'e020521de011f681244b1b31aad11f63', + './include/javascript/yui3/build/dataschema/dataschema-base-min.js' => '349c9818a7f45da8bb5a532486ae5dc8', + './include/javascript/yui3/build/dataschema/dataschema-base.js' => '4d59b0f7a66f4eae95a75a0e7f17b01b', + './include/javascript/yui3/build/dataschema/dataschema-json-min.js' => '415abf13b3fde5366b1bb633b4939390', + './include/javascript/yui3/build/dataschema/dataschema-json.js' => '3cf6cfc573dd7352d9a57707192351f6', + './include/javascript/yui3/build/dataschema/dataschema-min.js' => 'f555e22968297ba7e995cd4b23340c66', + './include/javascript/yui3/build/dataschema/dataschema-text-min.js' => 'bb2f028bf37869cf94eb68fd69afd3fb', + './include/javascript/yui3/build/dataschema/dataschema-text.js' => '0a530a9f88ee705dc5bdcbd8522334c7', + './include/javascript/yui3/build/dataschema/dataschema-xml-min.js' => '62c30151323b83cca86f8a5f1d69c156', + './include/javascript/yui3/build/dataschema/dataschema-xml.js' => '1a0d465ea4e832f4fdf903afae0a6bee', + './include/javascript/yui3/build/dataschema/dataschema.js' => '59ebe94647f735cc94a77b389cd7207b', + './include/javascript/yui3/build/cssreset/reset.css' => '057ef91d28ad5da0facf78fb5ccefe70', + './include/javascript/yui3/build/cssreset/reset-min.css' => 'cabb4f371ed40e7ecc63a6cd032fdb90', + './include/javascript/yui3/build/cssreset/reset-context.css' => 'd17928577e71c37fdd01f4c07f9fe027', + './include/javascript/yui3/build/cssreset/reset-context-min.css' => '109f073860a8c79677e0b3c6be1e7780', + './include/javascript/yui3/build/cssgrids/grids.css' => 'd6433cb57eb6bde776312b4f054735b6', + './include/javascript/yui3/build/cssgrids/grids-min.css' => 'f16811e59c65f46beb3b9e51d0daa08a', + './include/javascript/yui3/build/cssfonts/fonts.css' => 'f8ceb3a6d463b27b39d3f0e63c5ae5e9', + './include/javascript/yui3/build/cssfonts/fonts-min.css' => 'd21d56ce38d4fd86343b2ce2e4c07eb2', + './include/javascript/yui3/build/cssfonts/fonts-context.css' => 'de9b6e3ef11022cd82ea91e933708db1', + './include/javascript/yui3/build/cssfonts/fonts-context-min.css' => '1887bffcd5bf1c5c8ef922a7c6e5693a', + './include/javascript/yui3/build/cssbase/base.css' => '3444a7f50460da90b4732daea60acec6', + './include/javascript/yui3/build/cssbase/base-min.css' => 'd6e7b2d963cce1af871286040b73d54d', + './include/javascript/yui3/build/cssbase/base-context.css' => '7d6b7664d2544cfd4ed01dddc00ba25a', + './include/javascript/yui3/build/cssbase/base-context-min.css' => '19feadccd0f48ccad13dfe38936b5a29', + './include/javascript/yui3/build/cookie/cookie-min.js' => 'b5e8316f6cf862d1de4d591bd5812695', + './include/javascript/yui3/build/cookie/cookie.js' => '76117154ca598559110dabc275f413aa', + './include/javascript/yui3/build/console/console-filters-min.js' => '602d04f1519cdd208a675997ab82d79f', + './include/javascript/yui3/build/console/console-filters.js' => '94faac63ab6d2c183cc98cfa29c55cc6', + './include/javascript/yui3/build/console/console-min.js' => '660a7e9aad879962ad341e91e81fe939', + './include/javascript/yui3/build/console/console.js' => 'f51357485e10215e599e19fbe47d11b4', + './include/javascript/yui3/build/console/lang/console.js' => 'ce2b4671ddace8ee3bb07f527a9aa2b6', + './include/javascript/yui3/build/console/lang/console_en.js' => '9a9b14d552f4c48402e853f34f085a6d', + './include/javascript/yui3/build/console/lang/console_es.js' => '031274247d1dcdaaccfbe0b5d5a8b392', './include/javascript/yui3/build/console/assets/warn_error.png' => 'e01a08081fe9a53ae4a2c7a5b60a1a48', './include/javascript/yui3/build/console/assets/skins/sam/warn_error.png' => 'e01a08081fe9a53ae4a2c7a5b60a1a48', - './include/javascript/yui3/build/console/assets/skins/sam/console.css' => '4bf25a1e6d77ae224a609ebfd6d7a016', - './include/javascript/yui3/build/console/assets/skins/sam/console-skin.css' => '5bf304893499dcd980e53b6a003b0f47', - './include/javascript/yui3/build/console/assets/skins/sam/console-filters.css' => '9f9fa29cde9bce61394823a8a643c7f7', - './include/javascript/yui3/build/console/assets/skins/sam/console-filters-skin.css' => '89a1200557889da682fa346bdb484f4e', + './include/javascript/yui3/build/console/assets/skins/sam/console.css' => 'dc285bb51ab8e82e6e6436c6626a246b', + './include/javascript/yui3/build/console/assets/skins/sam/console-skin.css' => 'a70b0425a32d92f8be81226beff07263', + './include/javascript/yui3/build/console/assets/skins/sam/console-filters.css' => '4dfc0c7f0d5d4f964960d42903f311f3', + './include/javascript/yui3/build/console/assets/skins/sam/console-filters-skin.css' => '16ce6f83ee0f2e63892fb265c831eb33', './include/javascript/yui3/build/console/assets/skins/sam/bg.png' => 'f6e5fc4c034f96c68f446745a2881982', - './include/javascript/yui3/build/console/assets/console-filters-core.css' => '59812846f1a49258858027fdff6fbaf3', - './include/javascript/yui3/build/console/assets/console-core.css' => '59812846f1a49258858027fdff6fbaf3', - './include/javascript/yui3/build/compat/compat-min.js' => '3a7288f0d4b97257340f7dce096dd790', - './include/javascript/yui3/build/compat/compat.js' => '0361cb333f0c10fc16aa6330883d8cb6', - './include/javascript/yui3/build/collection/collection-min.js' => '27507198b7648cb044051b5dadd32790', - './include/javascript/yui3/build/collection/collection.js' => '3f0f937772af5258120d9bcaf1d8fab0', - './include/javascript/yui3/build/classnamemanager/classnamemanager-min.js' => '3e4b3d6d44863d14d50308c5b3604aa5', - './include/javascript/yui3/build/classnamemanager/classnamemanager.js' => '6460e339c1c7d3b03af1064e65def703', - './include/javascript/yui3/build/cache/cache-min.js' => 'b964ef4fc9869e1e536073226037ba7b', - './include/javascript/yui3/build/cache/cache.js' => '1e45c8d426e20b6ff7dcca6e9e5448bb', - './include/javascript/yui3/build/base/base-base-min.js' => '0b99f4c71261bec9d2118f55444deb8f', - './include/javascript/yui3/build/base/base-base.js' => 'a1d66a494770906742d50510eef34af2', - './include/javascript/yui3/build/base/base-build-min.js' => 'be15f4401563fc297401a7df32cde00f', - './include/javascript/yui3/build/base/base-build.js' => 'cf23c606697a7bb9dac1adfbc0e35e7c', - './include/javascript/yui3/build/base/base-min.js' => '470bdcf6dd32055f9589b59209482c39', - './include/javascript/yui3/build/base/base-pluginhost-min.js' => '109d2f7c66169ba3d95fdc7fded3823b', - './include/javascript/yui3/build/base/base-pluginhost.js' => '39a9d89846690bdb56044b4f92bc3971', - './include/javascript/yui3/build/base/base.js' => '2ebc14e446712d22b646fe6921227c99', - './include/javascript/yui3/build/attribute/attribute-base-min.js' => '1f598cd27c3d1eadc991f18c83627894', - './include/javascript/yui3/build/attribute/attribute-base.js' => '61c540b1f48a5d21982b1d9a58b40f90', - './include/javascript/yui3/build/attribute/attribute-complex-min.js' => 'e74ae70bc5491c792d83e195ee440a99', - './include/javascript/yui3/build/attribute/attribute-complex.js' => '741e91761924be8142dfd7d7e42422e9', - './include/javascript/yui3/build/attribute/attribute-min.js' => 'fc92d332455940e09fca12659987ebb1', - './include/javascript/yui3/build/attribute/attribute.js' => '2f2c9f75435f80ed9124db3aadc98f1a', - './include/javascript/yui3/build/async-queue/async-queue-min.js' => '38c208830472dd9fa0e0080be1d30304', - './include/javascript/yui3/build/async-queue/async-queue.js' => 'c036daac1a6511659ccf63eae26ab85d', - './include/javascript/yui3/build/assets/skins/sam/widget.css' => 'decf1eca11ec8631869f28489f971cdb', - './include/javascript/yui3/build/assets/skins/sam/widget-stack.css' => '49c59b028955c4d2636b68b2611fffc9', + './include/javascript/yui3/build/console/assets/console-filters-core.css' => '854f801d56bf486d7775e692a967950a', + './include/javascript/yui3/build/console/assets/console-core.css' => '854f801d56bf486d7775e692a967950a', + './include/javascript/yui3/build/compat/compat-min.js' => 'a9b01ceea9f6f106eb8203c8e8916ff0', + './include/javascript/yui3/build/compat/compat.js' => '529949775d7db9996848551a154e69c6', + './include/javascript/yui3/build/collection/array-extras-min.js' => '9d1a39503efa57a251c7b12ecc24c8a9', + './include/javascript/yui3/build/collection/collection-min.js' => 'de6661f9f58cd7d55048a807300cbd0d', + './include/javascript/yui3/build/collection/collection.js' => '784ce01d9e12ebf8557459a33b8cd241', + './include/javascript/yui3/build/collection/array-extras.js' => '1a2429b54d4678354bb6b31046a30359', + './include/javascript/yui3/build/collection/array-invoke-min.js' => '23518ad7052f6835ff548572c5758e56', + './include/javascript/yui3/build/collection/array-invoke.js' => '0879e7f291599fb5652894c234d49a03', + './include/javascript/yui3/build/collection/arraylist-add-min.js' => 'fdb1633b45a992671d1c620c0b462aa3', + './include/javascript/yui3/build/collection/arraylist-add.js' => '8a7415a5a863e5ca7ea5c911f1959c30', + './include/javascript/yui3/build/collection/arraylist-filter-min.js' => 'fcd5f5372018a959a9c862d50b2b57d6', + './include/javascript/yui3/build/collection/arraylist-filter.js' => '9e224de1c0128280c15b390b2229586d', + './include/javascript/yui3/build/collection/arraylist-min.js' => 'c7a36258c84b0b285f9f4efd940bea28', + './include/javascript/yui3/build/collection/arraylist.js' => '773f67ca0cd86c6007c99e843f3bf2a7', + './include/javascript/yui3/build/classnamemanager/classnamemanager-min.js' => 'aab2fdc94f66761836f41f7ec93992b7', + './include/javascript/yui3/build/classnamemanager/classnamemanager.js' => 'f18682e859289590158eb25916ebd72d', + './include/javascript/yui3/build/cache/cache-base.js' => 'f67a23e557bf424fd101ac73930123d5', + './include/javascript/yui3/build/cache/cache-min.js' => '45c92d30d0bcbedf10a41b6aeaf684c8', + './include/javascript/yui3/build/cache/cache.js' => 'a07cb897bdbd2e858c81f6d8ebd8a49d', + './include/javascript/yui3/build/cache/cache-base-min.js' => '0cbb8322ac2cab7fdae2ce9539c8dd2e', + './include/javascript/yui3/build/cache/cache-offline-min.js' => 'abb05e73ae1d25b46e220d02a05402d2', + './include/javascript/yui3/build/cache/cache-offline.js' => 'a205900099bb12e287db8c2cf377fb5b', + './include/javascript/yui3/build/cache/cache-plugin-min.js' => '07646cb42a7b3ca36ddc2d26a3facdb9', + './include/javascript/yui3/build/cache/cache-plugin.js' => '82624411e5a8520d438348984598607b', + './include/javascript/yui3/build/base/base-base-min.js' => 'ee40e9bd4d8abcbb92470cd5c9eeedc8', + './include/javascript/yui3/build/base/base-base.js' => 'cf14563041eff7ef4101dcdcd301c6ae', + './include/javascript/yui3/build/base/base-build-min.js' => '7700202e5de6bbed0383220519ab4eb3', + './include/javascript/yui3/build/base/base-build.js' => '5f82d152faaf56a532b40b76b246341f', + './include/javascript/yui3/build/base/base-min.js' => 'a5c3f33b0301e6f6c2cb28f758ccbe4a', + './include/javascript/yui3/build/base/base-pluginhost-min.js' => '27f23838a586211ad501a0a48eb21089', + './include/javascript/yui3/build/base/base-pluginhost.js' => '5421c8795311c918f098631f42e54620', + './include/javascript/yui3/build/base/base.js' => '5081a5ec8b96609d376daae25f8a53fa', + './include/javascript/yui3/build/attribute/attribute-base-min.js' => '55e9a78cb4f11af3e28470d32e3a4b55', + './include/javascript/yui3/build/attribute/attribute-base.js' => 'bf0dc647195b70441c87dad84f508fd8', + './include/javascript/yui3/build/attribute/attribute-complex-min.js' => '21ad0c7954bcbee5aa28a9d9e037a375', + './include/javascript/yui3/build/attribute/attribute-complex.js' => 'd970c7cddd8fcceea632b17eda5a1393', + './include/javascript/yui3/build/attribute/attribute-min.js' => 'd1f74a01e16981970251357024c723ee', + './include/javascript/yui3/build/attribute/attribute.js' => '3379ed5924cfa7d6b2a6ff46b02b1b9b', + './include/javascript/yui3/build/async-queue/async-queue-min.js' => '2dc59a0e8c5675c12b187a3672c30cb4', + './include/javascript/yui3/build/async-queue/async-queue.js' => '38cbd076015dd06b3ebbfe93f7dfbc8d', + './include/javascript/yui3/build/assets/skins/sam/widget-base.css' => '9c9995536d026df7a25ce0735bbd930e', + './include/javascript/yui3/build/assets/skins/sam/tmp.txt' => 'c21071571ed755716456e2f92e63007c', + './include/javascript/yui3/build/assets/skins/sam/thumb-y.png' => '4e9c5a913e538f6c9bdba6e2b707d038', + './include/javascript/yui3/build/assets/skins/sam/thumb-x.png' => 'b4caced4133745a62e29bfa786b07ae7', + './include/javascript/yui3/build/assets/skins/sam/test.css' => 'f8f84968e300208fc7207ae8c7844a55', + './include/javascript/yui3/build/assets/skins/sam/tabview.css' => '379c1f58741121d6761fe5216fffb1ce', + './include/javascript/yui3/build/assets/skins/sam/slider-base.css' => 'deb51bb480ef96bfdbfe8165d63a2800', + './include/javascript/yui3/build/assets/skins/sam/scrollview-scrollbars.css' => 'bd94405f2aa046e1ca1b53834381cdd1', + './include/javascript/yui3/build/assets/skins/sam/scrollview-paginator.css' => 'a9bbc9a40805d229a1d8f504c6736ef6', + './include/javascript/yui3/build/assets/skins/sam/scrollview-base.css' => '561c7ebc7da9a44594e2e7667c4ddbc2', + './include/javascript/yui3/build/assets/skins/sam/resize.css' => 'fd129042d834d2bbe7d68df87d32e21a', + './include/javascript/yui3/build/assets/skins/sam/resize-base.css' => 'fd129042d834d2bbe7d68df87d32e21a', + './include/javascript/yui3/build/assets/skins/sam/rail-y.png' => '82b36d1830a8a55a17da1113f09fc141', + './include/javascript/yui3/build/assets/skins/sam/rail-y-lines.png' => '484ed23b601e7876c3d9279324c75ae1', + './include/javascript/yui3/build/assets/skins/sam/rail-x.png' => '6470b1b6f7995df07bde65c7ba9e2aee', + './include/javascript/yui3/build/assets/skins/sam/rail-x-lines.png' => '86604c0d5312c6248a79219583d5c275', + './include/javascript/yui3/build/assets/skins/sam/node-flick.css' => '50589007ee62c2e83a3f5b411dfb4094', + './include/javascript/yui3/build/assets/skins/sam/dt-arrow-up.png' => '27498450164be1b258cae9dfdd534b69', + './include/javascript/yui3/build/assets/skins/sam/dt-arrow-dn.png' => 'ee0dd66007d4f34b5e6660b4abbb5a65', + './include/javascript/yui3/build/assets/skins/sam/dial.css' => '926d384648d93074352cb4785584252b', + './include/javascript/yui3/build/assets/skins/sam/datatable.css' => '1db34a2d8438ce7d86500e37bab63983', + './include/javascript/yui3/build/assets/skins/sam/datatable-base.css' => '469de3d3074bd629cc5d04af8ddf73db', + './include/javascript/yui3/build/assets/skins/sam/autocomplete.css' => 'e81752e4c894357d5607272a5984ae72', + './include/javascript/yui3/build/assets/skins/sam/autocomplete-list.css' => 'e81752e4c894357d5607272a5984ae72', + './include/javascript/yui3/build/assets/skins/sam/arrows.png' => '9148676baacd454969d9acd70b279de6', + './include/javascript/yui3/build/assets/skins/sam/widget.css' => '9c9995536d026df7a25ce0735bbd930e', + './include/javascript/yui3/build/assets/skins/sam/widget-stack.css' => 'fe4d110773af154ffa08fdca4976b311', './include/javascript/yui3/build/assets/skins/sam/warn_error.png' => 'e01a08081fe9a53ae4a2c7a5b60a1a48', './include/javascript/yui3/build/assets/skins/sam/vertical-menu-submenu-indicator.png' => '87184ef3556eee00e54a1f851c12207f', './include/javascript/yui3/build/assets/skins/sam/thumb-classic-y.png' => 'e6e4114cf7d61a20a5dbd4c76a5be209', './include/javascript/yui3/build/assets/skins/sam/thumb-classic-x.png' => 'deb8a33ec9ce90048552b7e5a1037e7d', './include/javascript/yui3/build/assets/skins/sam/sprite.png' => '4ea9c76ddccae0835ba727ee902809f3', - './include/javascript/yui3/build/assets/skins/sam/slider.css' => '326cae4687cb2c94162dee17c396bc93', - './include/javascript/yui3/build/assets/skins/sam/skin.css' => '8d5469df09b7b6a9bad72751ed4e4b0f', + './include/javascript/yui3/build/assets/skins/sam/slider.css' => 'deb51bb480ef96bfdbfe8165d63a2800', + './include/javascript/yui3/build/assets/skins/sam/skin.css' => '9697510d64bd95f1314b38ed8f57aa17', './include/javascript/yui3/build/assets/skins/sam/rail-classic-y.png' => '3a6d3464ade27ee27bda07164ea29522', './include/javascript/yui3/build/assets/skins/sam/rail-classic-x.png' => '0e63959f97250c7508a51156d6b14485', - './include/javascript/yui3/build/assets/skins/sam/overlay.css' => '219eebcee501b42ad383b829b2769f04', - './include/javascript/yui3/build/assets/skins/sam/node-menunav.css' => '6de96ec7ff0f35f61bc93064a020c5ff', + './include/javascript/yui3/build/assets/skins/sam/overlay.css' => '2c7923100b081b0aa0d7a5881ce33c0a', + './include/javascript/yui3/build/assets/skins/sam/node-menunav.css' => '6ef093ed468e36893eaf01cee6793ab1', './include/javascript/yui3/build/assets/skins/sam/horizontal-menu-submenu-toggle.png' => 'e1b5111045cdbae5f59e6df43a2bcafd', './include/javascript/yui3/build/assets/skins/sam/horizontal-menu-submenu-indicator.png' => '62b769d3a600489aea50fb253739d7f5', - './include/javascript/yui3/build/assets/skins/sam/console.css' => '4bf25a1e6d77ae224a609ebfd6d7a016', - './include/javascript/yui3/build/assets/skins/sam/console-filters.css' => '9f9fa29cde9bce61394823a8a643c7f7', + './include/javascript/yui3/build/assets/skins/sam/console.css' => 'dc285bb51ab8e82e6e6436c6626a246b', + './include/javascript/yui3/build/assets/skins/sam/console-filters.css' => '4dfc0c7f0d5d4f964960d42903f311f3', './include/javascript/yui3/build/assets/skins/sam/bg.png' => 'f6e5fc4c034f96c68f446745a2881982', - './include/javascript/yui3/build/anim/anim-base-min.js' => '91662c77dfa4ad009efee3489a246d01', - './include/javascript/yui3/build/anim/anim-base.js' => 'cac937b2ca252c6266279899a5de0bc0', - './include/javascript/yui3/build/anim/anim-color-min.js' => 'a41b18d7cd6bff118bd78941fa198e61', - './include/javascript/yui3/build/anim/anim-color.js' => 'f7185fad505c2b57342a399d8bac4cd7', - './include/javascript/yui3/build/anim/anim-curve-min.js' => '3a384e737322f61804e34c54393b4809', - './include/javascript/yui3/build/anim/anim-curve.js' => 'de090c4d26560e406a8b5c56c4bb6543', - './include/javascript/yui3/build/anim/anim-easing-min.js' => '7900d73784f5affdfa8862f1720820dd', - './include/javascript/yui3/build/anim/anim-easing.js' => '9982c65fb7258854b26a10c8e97e4cb6', - './include/javascript/yui3/build/anim/anim-min.js' => '76ce9b1c0457bdd6da70a09ab4c41419', - './include/javascript/yui3/build/anim/anim-node-plugin-min.js' => '0cb4158426369fc59a33ea477e29b28e', - './include/javascript/yui3/build/anim/anim-node-plugin.js' => '211a2225128f134bdebe7fde816351f1', - './include/javascript/yui3/build/anim/anim-scroll-min.js' => '41ef20a94de29f1cad55965d3d795f71', - './include/javascript/yui3/build/anim/anim-scroll.js' => 'b3dddd491c08d1e2cfae861f825f6508', - './include/javascript/yui3/build/anim/anim-xy-min.js' => '2643b18f3ee1bcc09bc8a12ceec10606', - './include/javascript/yui3/build/anim/anim-xy.js' => '38dea1e654a4e335118deaa246bbfe58', - './include/javascript/yui3/build/anim/anim.js' => 'fd0530bc935a92dd7ec1d8d9729b6574', - './include/javascript/yui3/assets/dpSyntaxHighlighter.js' => '0bfd5d587be32798fe8bd154a1841741', - './include/javascript/yui3/assets/syntax.js' => '8c29456f20e51920755725052aedb62e', + './include/javascript/yui3/build/anim/anim-base-min.js' => 'efc4c7f3159a1038caccab2a56cb123c', + './include/javascript/yui3/build/anim/anim-base.js' => 'c8dd85a5c1c78877190b695f117b8d4e', + './include/javascript/yui3/build/anim/anim-color-min.js' => 'f3b123d2d0fca491eb3593e6d46950c7', + './include/javascript/yui3/build/anim/anim-color.js' => 'bc2b5c8f4f571909d3bf1164743dab13', + './include/javascript/yui3/build/anim/anim-curve-min.js' => 'acba68536e17b20fa6b5059feadf5bdb', + './include/javascript/yui3/build/anim/anim-curve.js' => '67a1d0858c7d0d37a42a7b7fc07230e4', + './include/javascript/yui3/build/anim/anim-easing-min.js' => '7996233b64689ebaba8b9741b39a4d7c', + './include/javascript/yui3/build/anim/anim-easing.js' => 'b1d725ccfbb94b5db6834d3a71bfeb67', + './include/javascript/yui3/build/anim/anim-min.js' => 'cb10367284d9056077212a6d73d1eee8', + './include/javascript/yui3/build/anim/anim-node-plugin-min.js' => 'aa3f20d56cb4791228e321af106ee388', + './include/javascript/yui3/build/anim/anim-node-plugin.js' => '53dd2be31e2d057a1ae3bea0d57641a8', + './include/javascript/yui3/build/anim/anim-scroll-min.js' => 'eb691ee8abc89c2796be791d273cfe1e', + './include/javascript/yui3/build/anim/anim-scroll.js' => 'e32959d191be24b4ea7092ca20ee0b28', + './include/javascript/yui3/build/anim/anim-xy-min.js' => '234f5c22c8a1ee3198043083f2a8da23', + './include/javascript/yui3/build/anim/anim-xy.js' => '130d1b60fd00056ab2ef9641a703a7fd', + './include/javascript/yui3/build/anim/anim.js' => '7d1f31b56e814cd70318ae3ea59e0cd1', + './include/javascript/yui3/assets/dpSyntaxHighlighter.js' => '358e7d6c785af9a5e8cd35415f823323', + './include/javascript/yui3/assets/syntax.js' => 'e9addce0900bc304d999857d91bb9ffa', './include/javascript/yui3/assets/yuiDistribution.css' => 'd41d8cd98f00b204e9800998ecf8427e', './include/javascript/yui3/assets/yui.gif' => '8ba75836301307e25bf940af92414d20', './include/javascript/yui3/assets/yui.css' => '17630f5861c6e063db0f7f193f96aff4', @@ -4051,75 +5192,69 @@ $md5_string = array ( './include/javascript/yui3/assets/bg_hd.gif' => '0a295c3fab0790f5c65a806c56dc2836', './include/javascript/yui3/README' => 'b3cd942e83fcdbdc12917233609b4edf', './include/javascript/yui/ygDDList.js' => '863df2609cd089430316027e7238561f', - './include/javascript/yui/index.html' => 'e42f1c8fdae8ca33f4816e5305997dbe', + './include/javascript/yui/index.html' => '531829138be04bbc075d33c37b9a530f', './include/javascript/yui/ext/yui-ext.js' => '942c45c9f9f78724af53b364a3b9d361', - './include/javascript/yui/build/yuitest/yuitest_core.js' => 'd666571a5c06fd516f5d7fb637955253', - './include/javascript/yui/build/yuitest/yuitest_core-min.js' => 'c2fb5eef18d517e9f02e91de6c1340dc', - './include/javascript/yui/build/yuitest/yuitest.js' => '72d90cd6eb9c201aaabca4f30f5f1bae', - './include/javascript/yui/build/yuitest/yuitest-min.js' => '4cf56a06375f215cbb77bc4bf2013e93', - './include/javascript/yui/build/yuitest/assets/yuitest-core.css' => '793339721d8f8dea54c60348fe4a853e', - './include/javascript/yui/build/yuitest/assets/testlogger.css' => 'bbcd5b021e71b0c9d7f5c0c751294e78', - './include/javascript/yui/build/yuitest/assets/skins/sam/yuitest.css' => '793339721d8f8dea54c60348fe4a853e', - './include/javascript/yui/build/yuitest/assets/skins/sam/yuitest-skin.css' => '793339721d8f8dea54c60348fe4a853e', - './include/javascript/yui/build/yuiloader/yuiloader.js' => '5ecccf3367864d9d150a33432eae7d60', - './include/javascript/yui/build/yuiloader/yuiloader-min.js' => '11ea66c5bc6689358864d4c6207a03ba', - './include/javascript/yui/build/yuiloader-dom-event/yuiloader-dom-event.js' => '4c647048cabe1cb781c8f322b0981ba7', - './include/javascript/yui/build/yahoo/yahoo.js' => '486529fd3525b9bcbaaca728b5fe1172', - './include/javascript/yui/build/yahoo/yahoo-min.js' => '77aaedc174f0cbc57a706c09b2342a90', - './include/javascript/yui/build/yahoo-dom-event/yahoo-dom-event.js' => '3ae37167c141a29c1c11f254de0d7abf', - './include/javascript/yui/build/utilities/utilities.js' => '54daab1bb64dbe576b51e12ad9a63658', - './include/javascript/yui/build/uploader/uploader.js' => '16e1ad4f188237681ad726573ddaf52d', - './include/javascript/yui/build/uploader/uploader-min.js' => '8f09d6ce891046f386a5e86309d08614', - './include/javascript/yui/build/uploader/assets/uploader.swf' => '52f36a13ac4ee2743531de3e29c0b55c', - './include/javascript/yui/build/treeview/treeview.js' => '2678dd6d0fba93e223c33738a8ab2e45', - './include/javascript/yui/build/treeview/treeview-min.js' => '0b3fe246a06eac9a57f1a0dbade36245', - './include/javascript/yui/build/treeview/assets/treeview-core.css' => '9f1c2687bab335e4a0f822734461bf66', - './include/javascript/yui/build/treeview/assets/skins/sam/treeview.css' => 'cf472192f2e3c5e89098f9d83732c746', + './include/javascript/yui/build/yuitest/yuitest_core.js' => 'e7e66f08682ab60ffd53fc8cbfd7933e', + './include/javascript/yui/build/yuitest/yuitest_core-min.js' => 'a6023df24fb560d2a285d258710d8a37', + './include/javascript/yui/build/yuitest/yuitest.js' => '02a5f699b5ee8f2f58ef00e8fc819cf4', + './include/javascript/yui/build/yuitest/yuitest-min.js' => '9661219f8944c04afa94ee780d2c1268', + './include/javascript/yui/build/yuitest/assets/yuitest-core.css' => '2d0cb73a1778f5526e1d2150a03b1c44', + './include/javascript/yui/build/yuitest/assets/testlogger.css' => 'da1ca96214443825e18423ebaaf5d805', + './include/javascript/yui/build/yuitest/assets/skins/sam/yuitest.css' => '2d0cb73a1778f5526e1d2150a03b1c44', + './include/javascript/yui/build/yuitest/assets/skins/sam/yuitest-skin.css' => '2d0cb73a1778f5526e1d2150a03b1c44', + './include/javascript/yui/build/yuiloader/yuiloader.js' => 'a70eb17fe09953eda0484aceabeb66f7', + './include/javascript/yui/build/yuiloader/yuiloader-min.js' => '9908fffd66ae6e2b6efd1a15c9f398c9', + './include/javascript/yui/build/yuiloader-dom-event/yuiloader-dom-event.js' => '0061011aa28e2472d07d7bc7e0f179bd', + './include/javascript/yui/build/yahoo/yahoo.js' => '11eb78726f1b7cf857e0fdb098b98438', + './include/javascript/yui/build/yahoo/yahoo-min.js' => '839e18c2abe9817eb0b63acb4f014aa4', + './include/javascript/yui/build/yahoo-dom-event/yahoo-dom-event.js' => '366eac96e298168d2c923fcb556fa259', + './include/javascript/yui/build/utilities/utilities.js' => 'a0d17d24ac687e5b017abb7dcc745d09', + './include/javascript/yui/build/uploader/uploader.js' => 'f7c7235775f007582ce8015f57e4814f', + './include/javascript/yui/build/uploader/uploader-min.js' => '71d02cac4ba3a11ca92d2542f3e23a42', + './include/javascript/yui/build/uploader/assets/uploader.swf' => '646e1dfba0801ec88039409da9fb35ad', + './include/javascript/yui/build/treeview/treeview.js' => '82e385da272d9fc4718568899aab9577', + './include/javascript/yui/build/treeview/treeview-min.js' => '48d8e3d6e37a3bfcf8eedc71679fb267', + './include/javascript/yui/build/treeview/assets/treeview-core.css' => 'd13375280041c299b365991367d63db5', + './include/javascript/yui/build/treeview/assets/skins/sam/treeview.css' => 'c3c40657a28275b8fdbd22836aa171c4', './include/javascript/yui/build/treeview/assets/skins/sam/treeview-sprite.gif' => '115a1070e1398629700a11d4f5d546bb', - './include/javascript/yui/build/treeview/assets/skins/sam/treeview-skin.css' => '89d70f2c42ecca5633a2df7bce2698f4', + './include/javascript/yui/build/treeview/assets/skins/sam/treeview-skin.css' => '52f94d391b5d19fd6372ca70d84948f0', './include/javascript/yui/build/treeview/assets/skins/sam/treeview-loading.gif' => '8f1310bf9e7aa892d2dc09c4058c7bd3', './include/javascript/yui/build/treeview/assets/skins/sam/loading.gif' => '8f1310bf9e7aa892d2dc09c4058c7bd3', './include/javascript/yui/build/treeview/assets/skins/sam/check2.gif' => '3544088604d6d6e519a3a392db89c38d', './include/javascript/yui/build/treeview/assets/skins/sam/check1.gif' => '691389bb26f429e79666599992a384b3', './include/javascript/yui/build/treeview/assets/skins/sam/check0.gif' => 'd3e7d474e008b8cb585eb05c5baafe5a', - './include/javascript/yui/build/tabview/tabview.js' => 'c83792b51d4bd8ec2fc8994da1e8a118', - './include/javascript/yui/build/tabview/tabview-min.js' => '43be75d958658b98fc5cffc3e65716a2', - './include/javascript/yui/build/tabview/assets/tabview.css' => 'b94fe6019b5dec4aa7aa1f6b959f5b31', - './include/javascript/yui/build/tabview/assets/tabview-core.css' => '44c5638a67a0ca601474358c472022c1', - './include/javascript/yui/build/tabview/assets/skins/sam/tabview.css' => '3f056254db4fa5cf31fd90b2e5565fd8', - './include/javascript/yui/build/tabview/assets/skins/sam/tabview-skin.css' => '238f3ee3362c44a0c0394030346c6340', - './include/javascript/yui/build/tabview/assets/skin-sam.css' => 'f6fac582b70ad0d67e8956b1ec2623f3', + './include/javascript/yui/build/tabview/tabview.js' => '86a208edbb36a6b75caed1dc5f59852c', + './include/javascript/yui/build/tabview/tabview-min.js' => 'd726a6427cb3755a201619e9736d0028', + './include/javascript/yui/build/tabview/assets/tabview.css' => '2bb651eed0d6d5d79fcd4fea1cdada95', + './include/javascript/yui/build/tabview/assets/tabview-core.css' => '041b337fea881b9a5ebcf86309225ee3', + './include/javascript/yui/build/tabview/assets/skins/sam/tabview.css' => '65356805a197702e898249143db853eb', + './include/javascript/yui/build/tabview/assets/skins/sam/tabview-skin.css' => 'f2cff7e927be0eba135c9a399603901a', + './include/javascript/yui/build/tabview/assets/skin-sam.css' => '3c3b8bc848becaa10a7da7d2cec46d50', './include/javascript/yui/build/tabview/assets/loading.gif' => 'c8ad9845c9414424cb5854238af212b0', - './include/javascript/yui/build/tabview/assets/border_tabs.css' => 'dce2811d325e5a856321732e0440afcd', - './include/javascript/yui/build/swfstore/swfstore-debug.js' => 'd66fda76f6a7d9a1c90e30db0659b0f3', - './include/javascript/yui/build/swfstore/swf.js' => 'be78c3c95997313d704c49b97e788b35', - './include/javascript/yui/build/swfstore/swfstore.swf' => 'f619420748b08a2d453c049ef190e2f3', - './include/javascript/yui/build/swfstore/swfstore.js' => 'ac89b5a9745250c94cbcc68b618f85ce', - './include/javascript/yui/build/swfstore/swfstore-min.js' => 'ca4adbcee388561e209433449009b1da', - './include/javascript/yui/build/swfdetect/swfdetect-debug.js' => 'ebeaad88ce7a268f1772f0b4e7418831', - './include/javascript/yui/build/swfdetect/swfdetect.js' => 'ebeaad88ce7a268f1772f0b4e7418831', - './include/javascript/yui/build/swfdetect/swfdetect-min.js' => '0af595e80b22026d746c9cdfbb0ffaef', - './include/javascript/yui/build/swf/swf-debug.js' => '70ca534287813be497d683055270289d', - './include/javascript/yui/build/swf/swf.js' => 'bd21dfaf72392b5d80cd3c73e4f896b4', - './include/javascript/yui/build/swf/swf-min.js' => '13ba9a2beb92c3d7cc2c08e2ca2507a0', - './include/javascript/yui/build/stylesheet/stylesheet-debug.js' => 'd8eb31878d3759f1005b9227ff390669', - './include/javascript/yui/build/stylesheet/stylesheet.js' => 'a32f1772028a92d37c44c155b2f538fe', - './include/javascript/yui/build/stylesheet/stylesheet-min.js' => 'ea1f7d01349ca0b84c34d9140424231d', - './include/javascript/yui/build/storage/storage-debug.js' => 'a5af17949aa0532435f13a70b27201da', - './include/javascript/yui/build/storage/storage.js' => 'e80f2b4ed0ac24f1c9af0f034f2362a6', - './include/javascript/yui/build/storage/storage-min.js' => '75d3116953b72bfcaf5941d3e1e7a103', - './include/javascript/yui/build/slider/slider.js' => 'c924262c640f884f7d6a1f3deec8a93a', - './include/javascript/yui/build/slider/slider-min.js' => '27e7e4aeacd791f08c90568f4e79b43e', + './include/javascript/yui/build/tabview/assets/border_tabs.css' => 'ea054c6237d737f466554ae46c287419', + './include/javascript/yui/build/swfstore/swfstore.swf' => '844a3718c5f8c04ece6a86065a658a07', + './include/javascript/yui/build/swfstore/swfstore.js' => '22f6080cdfa06a62e487af3631dd1a24', + './include/javascript/yui/build/swfstore/swfstore-min.js' => '46144e2938e221ad741753ede03e2f3c', + './include/javascript/yui/build/swfdetect/swfdetect.js' => '9bff612cf4409c4647783a48436ea316', + './include/javascript/yui/build/swfdetect/swfdetect-min.js' => '2b4b38ccb1d4c9d78b4ff2f46224bbe7', + './include/javascript/yui/build/swf/swf.js' => '6ab7c83977680ed21326808a1eda8874', + './include/javascript/yui/build/swf/swf-min.js' => 'e5a25675fee9a2d610f515c3d857a01d', + './include/javascript/yui/build/stylesheet/stylesheet.js' => '1291047dd0202a042443ba1c53d5fe8c', + './include/javascript/yui/build/stylesheet/stylesheet-min.js' => '1b5e9f73dd2f97519dc1bddf93080edf', + './include/javascript/yui/build/storage/storage.js' => 'b7f06de61ad71f58e18ae7909bd13e79', + './include/javascript/yui/build/storage/storage-min.js' => '896f4543edb73d83ff11ac2ce209bddf', + './include/javascript/yui/build/slider/slider.js' => 'eec05da8d858ee3991d40aa49fa5a402', + './include/javascript/yui/build/slider/slider-min.js' => '9a190bd770d695cd077da3ff33d24704', './include/javascript/yui/build/slider/assets/thumb-w.gif' => 'f1af28a0a7a0b4b76e973e7988d20dea', './include/javascript/yui/build/slider/assets/thumb-s.gif' => '60824e3c3c961ca92fd80dc1d55e4243', './include/javascript/yui/build/slider/assets/thumb-n.gif' => '449f6baf5f9377f95653d5c076efb659', './include/javascript/yui/build/slider/assets/thumb-fader.gif' => '0267805612e4e9fed7ccaa3da9fc0f2a', './include/javascript/yui/build/slider/assets/thumb-e.gif' => '3d879ac8ed946408795c33c20e32577f', './include/javascript/yui/build/slider/assets/thumb-bar.gif' => 'e0575ef16dce100560ba893ff4723916', - './include/javascript/yui/build/slider/assets/slider-skin.css' => '6c05532041c0ba689947ebf10c4ec0b0', - './include/javascript/yui/build/slider/assets/slider-core.css' => '929d2b3257800724e51bbfa109081d30', - './include/javascript/yui/build/slider/assets/skins/sam/slider.css' => '71f7bccc93416362d854d66c50383d3d', - './include/javascript/yui/build/slider/assets/skins/sam/slider-skin.css' => 'ce979fdbee3ed431bc82e068c540ef92', + './include/javascript/yui/build/slider/assets/slider-skin.css' => '777b5b97badbc6a64b5337278e1c8939', + './include/javascript/yui/build/slider/assets/slider-core.css' => '502bba4a75ae96d26a6da725195c0ae8', + './include/javascript/yui/build/slider/assets/skins/sam/slider.css' => '90c2200aaaf0e06632ca1b4024bdf844', + './include/javascript/yui/build/slider/assets/skins/sam/slider-skin.css' => '584a7281a5f67bf6c4737a0b5a80259d', './include/javascript/yui/build/slider/assets/skins/sam/bg-v.gif' => '220b443b77004914d4293a655299e2ce', './include/javascript/yui/build/slider/assets/skins/sam/bg-h.gif' => '4d4b3a56c225f8f21f7d839ba2b03823', './include/javascript/yui/build/slider/assets/right-thumb.png' => 'fe58c629da3f86f895948ec31b0dbfbc', @@ -4128,54 +5263,53 @@ $md5_string = array ( './include/javascript/yui/build/slider/assets/bg-v-e.gif' => '73d2cdb479eb4707285df7c2dbb28062', './include/javascript/yui/build/slider/assets/bg-h.gif' => '4d4b3a56c225f8f21f7d839ba2b03823', './include/javascript/yui/build/slider/assets/bg-fader.gif' => '0c9eb4a1518994aa9786ff6f81a74cec', - './include/javascript/yui/build/selector/selector.js' => '8571aa5258087bb561f328fc31ecc843', - './include/javascript/yui/build/selector/selector-min.js' => '49bd722cb23d1c2db6fd7bb2e0183b4c', - './include/javascript/yui/build/resize/resize.js' => '610bdd65b4fe6370cdd1c802e467311e', - './include/javascript/yui/build/resize/resize-min.js' => 'c45230b8375ab231ffbb9a284d378a21', - './include/javascript/yui/build/resize/assets/skins/sam/resize.css' => '9c978b19e16ad208645904c9323d5a31', - './include/javascript/yui/build/resize/assets/skins/sam/resize-skin.css' => '46eb43f9766fd1dc7ae2d9d61d4d6401', + './include/javascript/yui/build/selector/selector.js' => '8795d543de5b357869554313ae85607c', + './include/javascript/yui/build/selector/selector-min.js' => '30b2885e01bce8bdf413d8e1e0842697', + './include/javascript/yui/build/resize/resize.js' => 'f854d2433be9c750ff6a2139aec2e609', + './include/javascript/yui/build/resize/resize-min.js' => '6e75b01192d052b2c613aa4100caef0c', + './include/javascript/yui/build/resize/assets/skins/sam/resize.css' => '73ea10823217fbacd668ea3a4ac3b897', + './include/javascript/yui/build/resize/assets/skins/sam/resize-skin.css' => '2bf29df50396039b48bfce7667e8e84c', './include/javascript/yui/build/resize/assets/skins/sam/layout_sprite.png' => '0f5a66998a0b88cabfe0489a6a11e28a', - './include/javascript/yui/build/resize/assets/resize-core.css' => 'af00fd53873d777cb499ae008f9e0d20', - './include/javascript/yui/build/reset/reset.css' => '87c995762e9c3571fab20d3d66d65cd5', - './include/javascript/yui/build/reset/reset-min.css' => '7064a8abc350d6dba25c20d076f7dd27', - './include/javascript/yui/build/reset-fonts/reset-fonts.css' => '318520f77ef065ae80c2b86959d4e18f', - './include/javascript/yui/build/reset-fonts-grids/reset-fonts-grids.css' => '2162df6e1ab29d6d2e5cc3748dac9bcc', - './include/javascript/yui/build/progressbar/progressbar-debug.js' => '47f02484fcc5b33634045afa77a1fb22', - './include/javascript/yui/build/progressbar/progressbar.js' => 'b655118de0fd819c39726a71e32a2558', - './include/javascript/yui/build/progressbar/progressbar-min.js' => '08a63d34f5fbae4661fd4c5a7ca1dea1', - './include/javascript/yui/build/progressbar/assets/skins/sam/progressbar.css' => 'f39fc4327836dbf61b7e433f6246e0ab', - './include/javascript/yui/build/progressbar/assets/skins/sam/progressbar-skin.css' => '5f51c6363ad92b2d5128989b8c8deea0', + './include/javascript/yui/build/resize/assets/resize-core.css' => '491cb48b2596e678615eb91b1f45b1d6', + './include/javascript/yui/build/reset/reset.css' => '2aad3a715275a3aa231100d64804c0ae', + './include/javascript/yui/build/reset/reset-min.css' => '947543235d9d8e541fa3b4b9029069e6', + './include/javascript/yui/build/reset-fonts/reset-fonts.css' => 'c0d907335087e403131b7182d95a7bcd', + './include/javascript/yui/build/reset-fonts-grids/reset-fonts-grids.css' => '6c40b36dfe0fe4eec3aada251809140b', + './include/javascript/yui/build/progressbar/progressbar.js' => '21f68881ce01ffdc4680cbe775d8afd6', + './include/javascript/yui/build/progressbar/progressbar-min.js' => '3eaabc5388211b03d2cb680c171f7d0a', + './include/javascript/yui/build/progressbar/assets/skins/sam/progressbar.css' => '469857201ff73897690c217998a2778d', + './include/javascript/yui/build/progressbar/assets/skins/sam/progressbar-skin.css' => '6e5bc02a88d4ad22d7494340a329834f', './include/javascript/yui/build/progressbar/assets/skins/sam/bar-v.png' => '54cd63ec61c91525f081428bc784021c', './include/javascript/yui/build/progressbar/assets/skins/sam/bar-h.png' => 'a4182c879e01c66bfaf9c188202c326b', './include/javascript/yui/build/progressbar/assets/skins/sam/back-v.png' => 'f0179d9bbb6e6f7796caed9d1b0b9795', './include/javascript/yui/build/progressbar/assets/skins/sam/back-h.png' => '972e692bc2c40a33fa30f3333c5e5821', - './include/javascript/yui/build/progressbar/assets/progressbar-core.css' => '2c9f30552602be5e6daf29344a99de86', - './include/javascript/yui/build/profilerviewer/profilerviewer.js' => 'f0a5893b36d97f98888ade53e1ddd4c9', - './include/javascript/yui/build/profilerviewer/profilerviewer-min.js' => 'da0e88a3081b58466c732a17678ebfb0', + './include/javascript/yui/build/progressbar/assets/progressbar-core.css' => 'a2c34fe39e42d41618cb2c0fe7e671ec', + './include/javascript/yui/build/profilerviewer/profilerviewer.js' => 'a89e221e98601e5d71bfc9bffa4a3f3c', + './include/javascript/yui/build/profilerviewer/profilerviewer-min.js' => '6aea294797b41232c7d14ee56081bf2e', './include/javascript/yui/build/profilerviewer/assets/skins/sam/wait.gif' => 'b0cd5a5dc070c705ebf8814a909802c3', - './include/javascript/yui/build/profilerviewer/assets/skins/sam/profilerviewer.css' => 'e07d72c12fc6c0028b89d88da7ec53d2', - './include/javascript/yui/build/profilerviewer/assets/skins/sam/profilerviewer-skin.css' => '2bc47f550e74e5d9b9ef651cbcc22a7b', + './include/javascript/yui/build/profilerviewer/assets/skins/sam/profilerviewer.css' => '1d49b6afb187cdbe8ffa51dfc5c76f67', + './include/javascript/yui/build/profilerviewer/assets/skins/sam/profilerviewer-skin.css' => 'dd9f960deb941256e7a5c23c7e8464c4', './include/javascript/yui/build/profilerviewer/assets/skins/sam/header_background.png' => '412285f6b44f1d7757fc005680c2ecf5', './include/javascript/yui/build/profilerviewer/assets/skins/sam/desc.gif' => '4708d3f08d550225360a43cd8ca2fab4', './include/javascript/yui/build/profilerviewer/assets/skins/sam/asc.gif' => '7053becd07a62f576bb8767a5d9875f0', - './include/javascript/yui/build/profilerviewer/assets/profilerviewer-core.css' => '9f1c2687bab335e4a0f822734461bf66', - './include/javascript/yui/build/profiler/profiler.js' => 'dd7475150e312ac555719de0878b53f3', - './include/javascript/yui/build/profiler/profiler-min.js' => 'ee66b42f20934e38d037b2071a915e14', - './include/javascript/yui/build/paginator/paginator.js' => '68bffc0ceb2284e0dd8c9cd3d4df51ee', - './include/javascript/yui/build/paginator/paginator-min.js' => '36567e4352247721e1290389ba0dd63e', - './include/javascript/yui/build/paginator/assets/skins/sam/paginator.css' => '2bb7f5bf775e4770dd2b6f9e36611b92', - './include/javascript/yui/build/paginator/assets/skins/sam/paginator-skin.css' => '7c8c3b867d33822a9611d625cc74145c', - './include/javascript/yui/build/paginator/assets/paginator-core.css' => '9f1c2687bab335e4a0f822734461bf66', - './include/javascript/yui/build/menu/menu.js' => 'a752c70e244872c18a5af5c85027f7f9', - './include/javascript/yui/build/menu/menu-min.js' => 'b5f52e06eb6ab1b34810aa301608b830', + './include/javascript/yui/build/profilerviewer/assets/profilerviewer-core.css' => 'd13375280041c299b365991367d63db5', + './include/javascript/yui/build/profiler/profiler.js' => '04739371725e37922a446b6d587e069b', + './include/javascript/yui/build/profiler/profiler-min.js' => '85f206f317997d4f487a57511a72739a', + './include/javascript/yui/build/paginator/paginator.js' => 'e7d18fe1bbf6f5231166f1ec9bb6416d', + './include/javascript/yui/build/paginator/paginator-min.js' => 'c2e0fa46bc14662193df6358d440e90c', + './include/javascript/yui/build/paginator/assets/skins/sam/paginator.css' => 'cd555d47d10366590a92ae8554f8c62d', + './include/javascript/yui/build/paginator/assets/skins/sam/paginator-skin.css' => '903bccbab88cfb13bf8d9ed2d3bbdd76', + './include/javascript/yui/build/paginator/assets/paginator-core.css' => 'd13375280041c299b365991367d63db5', + './include/javascript/yui/build/menu/menu.js' => 'c2541c200ec01c245cd07e99acb1795a', + './include/javascript/yui/build/menu/menu-min.js' => 'b40c5eda3a99903e74eae7bd212933c4', './include/javascript/yui/build/menu/assets/skins/sam/menuitem_submenuindicator_disabled.png' => '42a8a785ecb430826ebd4748fc77ebc0', './include/javascript/yui/build/menu/assets/skins/sam/menuitem_submenuindicator.png' => '10f0de223bc3688a8986c23f71f081f1', './include/javascript/yui/build/menu/assets/skins/sam/menuitem_checkbox_disabled.png' => '6d9c1ef2cc0823c45226e43f9ef0e3dd', './include/javascript/yui/build/menu/assets/skins/sam/menuitem_checkbox.png' => '01d544275d0ee95fae025242d1eab1d5', './include/javascript/yui/build/menu/assets/skins/sam/menubaritem_submenuindicator_disabled.png' => 'd8c20340be4484d2153ecd1a8b21f57f', './include/javascript/yui/build/menu/assets/skins/sam/menubaritem_submenuindicator.png' => '1424f886ef59424f1aa19fa94771fb3f', - './include/javascript/yui/build/menu/assets/skins/sam/menu.css' => '6ed5f2e057f115daa8bb71bfd0c643ce', - './include/javascript/yui/build/menu/assets/skins/sam/menu-skin.css' => '21ae432798614782779386aa734ff2f3', + './include/javascript/yui/build/menu/assets/skins/sam/menu.css' => '3268feab383f2d26d4aab13a7411eb2e', + './include/javascript/yui/build/menu/assets/skins/sam/menu-skin.css' => '1b3364d20d0c5fe1664725d797f50ec9', './include/javascript/yui/build/menu/assets/menuitem_submenuindicator_selected.png' => '13fbc56317c32fb2373241d25e46ad87', './include/javascript/yui/build/menu/assets/menuitem_submenuindicator_disabled.png' => '52394cd1c23abd1dab175b16b286497b', './include/javascript/yui/build/menu/assets/menuitem_submenuindicator.png' => '4a40c951dbf145003d19187e8b9944d0', @@ -4189,139 +5323,134 @@ $md5_string = array ( './include/javascript/yui/build/menu/assets/menu_up_arrow.png' => 'dc52888b3dcb56f0860d78175bf4dd4f', './include/javascript/yui/build/menu/assets/menu_down_arrow_disabled.png' => '22ac9a93738dffb391180047c187a182', './include/javascript/yui/build/menu/assets/menu_down_arrow.png' => 'c61639e305e930102297f479ef1f84c7', - './include/javascript/yui/build/menu/assets/menu.css' => '64a6367a10897df76ffc68f817be4b2f', - './include/javascript/yui/build/menu/assets/menu-core.css' => 'a42bb56e4386a4d0c696d8b8622a2b43', - './include/javascript/yui/build/logger/logger.js' => '19e92542b867cda010214412d85f4102', - './include/javascript/yui/build/logger/logger-min.js' => '6179587106331f50b94963768b59a9af', - './include/javascript/yui/build/logger/assets/skins/sam/logger.css' => '34c9d2d0dc2dfecd76703d3ac210088a', - './include/javascript/yui/build/logger/assets/skins/sam/logger-skin.css' => '0f5a4c1fbca60b78976a41591cabd31e', - './include/javascript/yui/build/logger/assets/logger.css' => '94a94bbe5199376f2df542be57a2820c', - './include/javascript/yui/build/logger/assets/logger-core.css' => '02f2ac7e6bf5753422fbddab521c7d19', - './include/javascript/yui/build/layout/layout.js' => 'fe1bd86243ec2910f0cf2b9a3866132a', - './include/javascript/yui/build/layout/layout-min.js' => '788b7a42e45df3c4c385e559bd4e6d99', + './include/javascript/yui/build/menu/assets/menu.css' => 'b9bfa30653eeb55ed0351014a5616efd', + './include/javascript/yui/build/menu/assets/menu-core.css' => '3c5f562bfc5ad9311aca1fceede24596', + './include/javascript/yui/build/logger/logger.js' => '46928d74c8fc2d1f19d79626c778df2c', + './include/javascript/yui/build/logger/logger-min.js' => 'adb2940db08dd957716439cf811eee7f', + './include/javascript/yui/build/logger/assets/skins/sam/logger.css' => '2de907567e163a6073bc6eeeea8d1b16', + './include/javascript/yui/build/logger/assets/skins/sam/logger-skin.css' => 'cba2a53e292a98def01c3bb0c3c40b03', + './include/javascript/yui/build/logger/assets/logger.css' => '36dad64dae25da009eb5dd0f7b9d5f25', + './include/javascript/yui/build/logger/assets/logger-core.css' => 'b09284cd2791f418737d12655d348c52', + './include/javascript/yui/build/layout/layout.js' => '3cc0cb8a7936d90074cb4a693da46fa1', + './include/javascript/yui/build/layout/layout-min.js' => '8586f41a0d8ce653d8708a38c0df67fb', './include/javascript/yui/build/layout/assets/skins/sam/layout_sprite.png' => '0f5a66998a0b88cabfe0489a6a11e28a', - './include/javascript/yui/build/layout/assets/skins/sam/layout.css' => '795b3d611aa7b6a06687f6b400b7e5fe', - './include/javascript/yui/build/layout/assets/skins/sam/layout-skin.css' => 'a329332ae9d0f5f7b57298e95e7b3aaf', - './include/javascript/yui/build/layout/assets/layout-core.css' => '20d7cb32c0585bbdf2ecc47927a91335', - './include/javascript/yui/build/json/json.js' => 'a31d483a89e83e72cbb3c42d2f5fdd4e', - './include/javascript/yui/build/json/json-min.js' => '595bc1f3b948cbcb9a7d5b934dbdb107', - './include/javascript/yui/build/imageloader/imageloader.js' => 'e6eecb6483d125156c77c4cee74412a1', - './include/javascript/yui/build/imageloader/imageloader-min.js' => '41f7ad72e42fb68f20e951d305c12347', - './include/javascript/yui/build/imagecropper/imagecropper.js' => '82022d024606947e9d12976b657e4783', - './include/javascript/yui/build/imagecropper/imagecropper-min.js' => '8a39f3974407001667353cecfcf3b660', - './include/javascript/yui/build/imagecropper/assets/skins/sam/imagecropper.css' => '14b933dace6b55ff4bd29dfa532049e9', - './include/javascript/yui/build/imagecropper/assets/skins/sam/imagecropper-skin.css' => '9b492c16276e1d6e41057538cfa2276a', - './include/javascript/yui/build/imagecropper/assets/imagecropper-core.css' => 'f7fc7105b9b60f4f66954eb22fe1461e', - './include/javascript/yui/build/history/history.js' => '594d929e9baf0354bdf6c9207ee5d88e', - './include/javascript/yui/build/history/history-min.js' => '6dc74b45c3844bec37992f8b56c911b3', + './include/javascript/yui/build/layout/assets/skins/sam/layout.css' => '1ba5115fdaaf02a15c30cde3a9f9e9f7', + './include/javascript/yui/build/layout/assets/skins/sam/layout-skin.css' => 'ea12e91ea54da93e01a45bd467e556df', + './include/javascript/yui/build/layout/assets/layout-core.css' => '941aea53eca26b2a8c246fd217c4a488', + './include/javascript/yui/build/json/json.js' => '9c90a2fa80e032806180eeb0428349c4', + './include/javascript/yui/build/json/json-min.js' => '59d3be5741942c7fca3daff0b2d977ef', + './include/javascript/yui/build/imageloader/imageloader.js' => '84f586902f448208eb767e8f8e4a7df2', + './include/javascript/yui/build/imageloader/imageloader-min.js' => 'e0eca242adf2b8a28acc33e8680f82bd', + './include/javascript/yui/build/imagecropper/imagecropper.js' => 'f07862ef97f7497f8c45d502d030b2af', + './include/javascript/yui/build/imagecropper/imagecropper-min.js' => '6ef7180cf3915a6670e7926d2c4481d2', + './include/javascript/yui/build/imagecropper/assets/skins/sam/imagecropper.css' => '5de53b0a1a47a6b2250f7cc6972a86f2', + './include/javascript/yui/build/imagecropper/assets/skins/sam/imagecropper-skin.css' => '1f3838eedef14fa839b840953da16a78', + './include/javascript/yui/build/imagecropper/assets/imagecropper-core.css' => '887496d65004d5f3f639ec6fc7f3664c', + './include/javascript/yui/build/history/history.js' => 'a093f4f1ecf18c040c0007aaf4a4b681', + './include/javascript/yui/build/history/history-min.js' => '543b42a00a378f4d4b6e70c81d915b0a', './include/javascript/yui/build/history/assets/blank.html' => '09773fd08c1f040b898ee77b06a2bf59', - './include/javascript/yui/build/grids/grids.css' => '878da0a5fa669f9f9f1b59409358340b', - './include/javascript/yui/build/grids/grids-min.css' => '8939896c332468eceefba2a9fda6e037', - './include/javascript/yui/build/get/get.js' => 'd653c2732adee0eedf7cd78a1ee2e5c5', - './include/javascript/yui/build/get/get-min.js' => '1c0629c2127a03dfd7e3ba0429efbe78', - './include/javascript/yui/build/fonts/fonts.css' => '7b0bb1861e071b874d5716b73936a6e7', - './include/javascript/yui/build/fonts/fonts-min.css' => 'd05af6e8046cc0253b910915db60d914', - './include/javascript/yui/build/event/event.js' => '81f1e87eef011560419df89386589fe8', - './include/javascript/yui/build/event/event-min.js' => 'f88a53dea300de8b15a062b0bfd18d7c', - './include/javascript/yui/build/event-simulate/event-simulate-debug.js' => 'efb152b50f9c402d144262307a8f1b4d', - './include/javascript/yui/build/event-simulate/event-simulate.js' => 'efb152b50f9c402d144262307a8f1b4d', - './include/javascript/yui/build/event-simulate/event-simulate-min.js' => '20714ece167eec20224e4b7113d83d19', - './include/javascript/yui/build/event-mouseenter/event-mouseenter-debug.js' => 'e6fd23465f95c297f0ec01779f33903d', - './include/javascript/yui/build/event-mouseenter/event-mouseenter.js' => 'e6fd23465f95c297f0ec01779f33903d', - './include/javascript/yui/build/event-mouseenter/event-mouseenter-min.js' => 'a6785052ee0782fec75d1ceeec60b837', - './include/javascript/yui/build/event-delegate/event-delegate-debug.js' => '2fa529a1c98f5fa12e69cdd317bc525e', - './include/javascript/yui/build/event-delegate/event-delegate.js' => 'eef0bf026f2a9646e0696f7cc8f1d442', - './include/javascript/yui/build/event-delegate/event-delegate-min.js' => '9ee8bb35a45bc8b7aee4508a1c89fdac', - './include/javascript/yui/build/element/element.js' => '0516e4cd68b5f4206ecaa2c7389ca32a', - './include/javascript/yui/build/element/element-min.js' => '7bbdd2ed1c177b4ce569a2e6ebf3cbec', - './include/javascript/yui/build/element-delegate/element-delegate-debug.js' => '2e65e0cbbb2aff875c31da05623195ea', - './include/javascript/yui/build/element-delegate/element-delegate.js' => '3c91b3c19d07c72ceb96ab21c0b07694', - './include/javascript/yui/build/element-delegate/element-delegate-min.js' => '9a4bc305125538fcb01f1fc7ee9b3007', - './include/javascript/yui/build/editor/simpleeditor.js' => '17876a6c67ac89b184a7f10b72e23e17', - './include/javascript/yui/build/editor/simpleeditor-min.js' => '7af8a4b28a5e3b011b3c00c5623e5130', - './include/javascript/yui/build/editor/editor.js' => 'd44b945458f40c48424ed286c4bee3be', - './include/javascript/yui/build/editor/editor-min.js' => '8e882e7b303dfc66d558751ace1e20fe', - './include/javascript/yui/build/editor/assets/skins/sam/simpleeditor.css' => 'b3ed43c0ca0bbd76103ecf20bb7ec7c4', - './include/javascript/yui/build/editor/assets/skins/sam/simpleeditor-skin.css' => '1db14802c579aa8624bc1d5e223a8630', - './include/javascript/yui/build/editor/assets/skins/sam/editor.css' => 'b3ed43c0ca0bbd76103ecf20bb7ec7c4', + './include/javascript/yui/build/grids/grids.css' => '0a46f502c427dd0a69ce8661fb693ba0', + './include/javascript/yui/build/grids/grids-min.css' => '9a3f144bc3961e3d0dc85400ccd65f09', + './include/javascript/yui/build/get/get.js' => '4b9feac7c1cf938fe81cba66436fff63', + './include/javascript/yui/build/get/get-min.js' => 'e88f7625b7a7ac3abec7f8f0bb567f70', + './include/javascript/yui/build/fonts/fonts.css' => '9d86334ed201d5e837f52c826732fc5e', + './include/javascript/yui/build/fonts/fonts-min.css' => 'b6fc6593322727fc65622c1edf73635b', + './include/javascript/yui/build/event/event.js' => 'c1ddef062c503ec33b21611f62bd55de', + './include/javascript/yui/build/event/event-min.js' => 'b1ae2a2c366e02383e9afae30caaf4bc', + './include/javascript/yui/build/event-simulate/event-simulate.js' => '4d1e0c2c4a75e14f225e9592a24912cc', + './include/javascript/yui/build/event-simulate/event-simulate-min.js' => '970c0383e0532dad0824e7fe47b13654', + './include/javascript/yui/build/event-mouseenter/event-mouseenter.js' => 'b56679d9e34e5252cfd7b0e6b2aa8a35', + './include/javascript/yui/build/event-mouseenter/event-mouseenter-min.js' => '392a9c1f603107466201a277d5d323e4', + './include/javascript/yui/build/event-delegate/event-delegate.js' => 'b13d4b19de027015344102ceef33bc10', + './include/javascript/yui/build/event-delegate/event-delegate-min.js' => 'f68779179954765b5164491f331c1d79', + './include/javascript/yui/build/element/element.js' => 'de2f5701ee1a3819b2987b6b5ffeb4d6', + './include/javascript/yui/build/element/element-min.js' => 'ea186bc8dd4cefd44ed463cb03e4cc7c', + './include/javascript/yui/build/element-delegate/element-delegate.js' => '5abc37b914ac7988766819f261481d4f', + './include/javascript/yui/build/element-delegate/element-delegate-min.js' => '93f42f0bdc232edcd615426d3aa58fee', + './include/javascript/yui/build/editor/simpleeditor.js' => '94d9c6f1f7e811a3d407a90e2e4d3b0e', + './include/javascript/yui/build/editor/simpleeditor-min.js' => '8cdc4a7f130902f58ebbce3e74800ab8', + './include/javascript/yui/build/editor/editor.js' => 'd5d02fefffb6be044612ab3c34efd46f', + './include/javascript/yui/build/editor/editor-min.js' => 'ad31e132ba7b76b905e0d221af8cf196', + './include/javascript/yui/build/editor/assets/skins/sam/simpleeditor.css' => 'dded5e8d9e72af4e3bd6c91024dee7ac', + './include/javascript/yui/build/editor/assets/skins/sam/simpleeditor-skin.css' => '31038e6cae1f238612f8f5da9f76a94a', + './include/javascript/yui/build/editor/assets/skins/sam/editor.css' => 'ba9f43ce9f63a5349e68553cb0d8ffbf', './include/javascript/yui/build/editor/assets/skins/sam/editor-sprite.gif' => 'b72bb0d8d92b3a946cb6be25d2c885fa', './include/javascript/yui/build/editor/assets/skins/sam/editor-sprite-active.gif' => 'e7a74b72201d29021d6d04d85f86f0c9', - './include/javascript/yui/build/editor/assets/skins/sam/editor-skin.css' => '1db14802c579aa8624bc1d5e223a8630', + './include/javascript/yui/build/editor/assets/skins/sam/editor-skin.css' => '31038e6cae1f238612f8f5da9f76a94a', './include/javascript/yui/build/editor/assets/skins/sam/editor-knob.gif' => '43c236afae83c3032ca8da61d3a021b6', './include/javascript/yui/build/editor/assets/skins/sam/blankimage.png' => '91c1defa5830c414bd5d43fb63d30101', - './include/javascript/yui/build/editor/assets/simpleeditor-core.css' => 'a2db28ddf0c13e2af9d03208aca9a3e2', - './include/javascript/yui/build/editor/assets/editor-core.css' => 'a2db28ddf0c13e2af9d03208aca9a3e2', - './include/javascript/yui/build/dragdrop/dragdrop.js' => 'f9773ee345b034e09b8fefda2eb7bac5', - './include/javascript/yui/build/dragdrop/dragdrop-min.js' => '0ae226bcb211ae563e67ff3cd97c4548', - './include/javascript/yui/build/dom/dom.js' => '69d95eb94e21d1a11da374bd1026b14c', - './include/javascript/yui/build/dom/dom-min.js' => 'aa706bc9d70ae282bae9f9ea9a1f60d0', - './include/javascript/yui/build/datemath/datemath-debug.js' => 'd4ca29daf116014dba21a7d44e2c7814', - './include/javascript/yui/build/datemath/datemath.js' => 'd4ca29daf116014dba21a7d44e2c7814', - './include/javascript/yui/build/datemath/datemath-min.js' => 'e432af5fe30c1ddd7aa0fe84f02a995d', - './include/javascript/yui/build/datatable/datatable.js' => '26bcff411750ea512e59a3d9400c3b86', - './include/javascript/yui/build/datatable/datatable-min.js' => '4fc2bf26c727937a77e0183bffcdac4a', + './include/javascript/yui/build/editor/assets/simpleeditor-core.css' => '782f831bb13bdb39aed3a0e556230f71', + './include/javascript/yui/build/editor/assets/editor-core.css' => '782f831bb13bdb39aed3a0e556230f71', + './include/javascript/yui/build/dragdrop/dragdrop.js' => '3ecef7b1a267fb06a734f6272ed8ac88', + './include/javascript/yui/build/dragdrop/dragdrop-min.js' => 'e583a3c734fecc0e5051e16db03080b3', + './include/javascript/yui/build/dom/dom.js' => 'cbc11f70c62285bcb55ed4dc9d3e6735', + './include/javascript/yui/build/dom/dom-min.js' => '4c0fd9fe7500255ae347610e31de4449', + './include/javascript/yui/build/datemath/datemath.js' => 'a94ea0d1dceb5c04a16da86a11632200', + './include/javascript/yui/build/datemath/datemath-min.js' => '5cb1bb0564dfee5ca146b2101b75bf22', + './include/javascript/yui/build/datatable/datatable.js' => '39fcbbfba6a4954bca0f6ee4c844264a', + './include/javascript/yui/build/datatable/datatable-min.js' => '72bd52c4c20ae376c7a5029ce3382ccc', './include/javascript/yui/build/datatable/assets/skins/sam/dt-arrow-up.png' => '27498450164be1b258cae9dfdd534b69', './include/javascript/yui/build/datatable/assets/skins/sam/dt-arrow-dn.png' => 'ee0dd66007d4f34b5e6660b4abbb5a65', - './include/javascript/yui/build/datatable/assets/skins/sam/datatable.css' => 'e04ce2e139377129b079205ceba06aaf', - './include/javascript/yui/build/datatable/assets/skins/sam/datatable-skin.css' => '559062062b6bc27a055ba2a18f8b1b7f', - './include/javascript/yui/build/datatable/assets/datatable.css' => '51d6b383f8719cfc553db8bfc474f03e', - './include/javascript/yui/build/datatable/assets/datatable-core.css' => 'e752ddeddca76df907de990f85416eda', - './include/javascript/yui/build/datasource/datasource.js' => '354713e9ed0a1d2760cd15ea48675837', - './include/javascript/yui/build/datasource/datasource-min.js' => '3f8c54286dc2c062186d92333bb0533f', - './include/javascript/yui/build/cookie/cookie.js' => '8c27ac9e9c9e6d113ac2d743875d8c25', - './include/javascript/yui/build/cookie/cookie-min.js' => 'd1fc139547c85105a0e55f04878deffd', - './include/javascript/yui/build/container/container_core-min.js' => 'ddde4174c11b3c7a41bb650190bcf951', - './include/javascript/yui/build/container/container.js' => '46d95c9cb3d54a3edb859c7542fac680', - './include/javascript/yui/build/container/container-min.js' => 'cac1924c31ce2ac5ec14a0a95583696f', + './include/javascript/yui/build/datatable/assets/skins/sam/datatable.css' => 'bbe4b3783b67fa34ee37517bee52d14d', + './include/javascript/yui/build/datatable/assets/skins/sam/datatable-skin.css' => 'a9d87407d983d056c5828b214f075498', + './include/javascript/yui/build/datatable/assets/datatable.css' => 'd1fbd476430fab9dda1dc24e2f819156', + './include/javascript/yui/build/datatable/assets/datatable-core.css' => 'a5279ec1ae496610f84d0ff290ffdb1f', + './include/javascript/yui/build/datasource/datasource.js' => 'fbc4d52f48f2eb59dc46de8d19e48522', + './include/javascript/yui/build/datasource/datasource-min.js' => '15ed786423ad99e59746cf7368a55b45', + './include/javascript/yui/build/cookie/cookie.js' => '2127ec3263664e6bad3444aaac7c0896', + './include/javascript/yui/build/cookie/cookie-min.js' => 'b0058ed1330069cb8510e5d054681b1a', + './include/javascript/yui/build/container/container_core.js' => '479831c020ed14fdbd7b4fa4909dae63', + './include/javascript/yui/build/container/container_core-min.js' => '5bf155a377e70c282eda1d96aaabdb37', + './include/javascript/yui/build/container/container.js' => '740dc78060cc7ac248d727e58369306b', + './include/javascript/yui/build/container/container-min.js' => '5511b676a4961a0dfb52e1f64ce65a7a', './include/javascript/yui/build/container/assets/warn16_1.gif' => 'ba0ca370e1f04a406b8188d3ab892b7b', './include/javascript/yui/build/container/assets/tip16_1.gif' => '0b540d1e06e818d180ca0534be963159', - './include/javascript/yui/build/container/assets/skins/sam/container.css' => '8cdcbf8555a601d011c96a9053c40c88', - './include/javascript/yui/build/container/assets/skins/sam/container-skin.css' => '116e9cc3499f508b04f79c1794802fc2', + './include/javascript/yui/build/container/assets/skins/sam/container.css' => '45db076f544bf547abb62bf4cfa93b31', + './include/javascript/yui/build/container/assets/skins/sam/container-skin.css' => 'd61e8d86ce324d407a29212a6964a54e', './include/javascript/yui/build/container/assets/info16_1.gif' => '38d37e309cca60bfac2ad2881f7fe58e', './include/javascript/yui/build/container/assets/hlp16_1.gif' => 'b593fbd4d06a98522efa285e1709aa36', - './include/javascript/yui/build/container/assets/container.css' => '30d926224d525d460a79e393b2eac872', - './include/javascript/yui/build/container/assets/container-core.css' => '0b777a30b4f40eafe30a76399f151afa', + './include/javascript/yui/build/container/assets/container.css' => 'cde0967237c3e7a18d04b8002b8b1a26', + './include/javascript/yui/build/container/assets/container-core.css' => '5f4ce0c9ba57dcd009021f4515b57a14', './include/javascript/yui/build/container/assets/close12_1.gif' => '770d9c592b4300457ae025448c4c6816', './include/javascript/yui/build/container/assets/blck16_1.gif' => 'b9aeaed783a1c845f699daf2c6ee563a', './include/javascript/yui/build/container/assets/alrt16_1.gif' => '7764b275c2e10a40bff0061f94e9b8e9', - './include/javascript/yui/build/connection/connection_core-debug.js' => '2b5180cc72b9050d21a658a8bf38833c', - './include/javascript/yui/build/connection/connection_core-min.js' => '4b494585224308f921d115f17e21b426', + './include/javascript/yui/build/connection/connection_core-min.js' => '1cdaa3d0261967f8da27944de798b182', './include/javascript/yui/build/connection/connection.swf' => 'b4f652fc6f38593551ab5298b1077901', - './include/javascript/yui/build/connection/connection_core.js' => '4be1743c83638c7cc479799f4fb7ddb1', - './include/javascript/yui/build/connection/connection.js' => '1f5039e1aad61c3db45dc48097188b96', - './include/javascript/yui/build/connection/connection-min.js' => '6ae7d4c034ce5f44c66fc116a3504511', - './include/javascript/yui/build/colorpicker/colorpicker.js' => 'b32bc4124e866857485f3d9b074b93b2', - './include/javascript/yui/build/colorpicker/colorpicker-min.js' => '36de5bb3a2e4a172bc26d7125bfce5f0', + './include/javascript/yui/build/connection/connection_core.js' => '12614cc8983cf4703650f25b4003d4f5', + './include/javascript/yui/build/connection/connection.js' => '461e2e55bfe253b164d155b194821fc8', + './include/javascript/yui/build/connection/connection-min.js' => '16109de6692eedf52681b60313226a22', + './include/javascript/yui/build/colorpicker/colorpicker.js' => '8141c139ebdff3a34a09854d804b7682', + './include/javascript/yui/build/colorpicker/colorpicker-min.js' => 'daefbea74350afe3ebc4ca71eb0537b4', './include/javascript/yui/build/colorpicker/assets/skins/sam/picker_mask.png' => 'a4d3b14fbcc5b8f112d3635f981d6a1c', './include/javascript/yui/build/colorpicker/assets/skins/sam/hue_bg.png' => '73ae3465d3dcbd95ebb4165760fac8e8', - './include/javascript/yui/build/colorpicker/assets/skins/sam/colorpicker.css' => '21eaa2969dd55fe80afc1928fd37e7b5', - './include/javascript/yui/build/colorpicker/assets/skins/sam/colorpicker-skin.css' => '18cc2d8bac896cc6e95a222ee217c4eb', + './include/javascript/yui/build/colorpicker/assets/skins/sam/colorpicker.css' => '818638f9de888dca2c49f4463a8a38fe', + './include/javascript/yui/build/colorpicker/assets/skins/sam/colorpicker-skin.css' => '81e29627720796bda4c1631b66b93c7a', './include/javascript/yui/build/colorpicker/assets/picker_thumb.png' => '96aa37e578d0428346e4c7170ac9a230', './include/javascript/yui/build/colorpicker/assets/picker_mask.png' => 'a4d3b14fbcc5b8f112d3635f981d6a1c', './include/javascript/yui/build/colorpicker/assets/hue_thumb.png' => 'b1a887427b558af46f17262784da3583', - './include/javascript/yui/build/colorpicker/assets/colorpicker-core.css' => '9f1c2687bab335e4a0f822734461bf66', - './include/javascript/yui/build/charts/charts.js' => '09127fabb0fcfc57ce3d15ff2d569533', - './include/javascript/yui/build/charts/charts-min.js' => '392da34fb5198a77e25a3442e4b42a03', - './include/javascript/yui/build/charts/assets/charts.swf' => '59c6e2c9ae7de87f11dd3db3336de8b6', - './include/javascript/yui/build/carousel/carousel.js' => '604b54e0dd9cde8344e2828d51cb331f', - './include/javascript/yui/build/carousel/carousel-min.js' => 'da0d2e1b6b141c02c83328b61ccd23df', - './include/javascript/yui/build/carousel/assets/skins/sam/carousel.css' => '0d1ed494db742ffbfd471f41eaee1840', - './include/javascript/yui/build/carousel/assets/skins/sam/carousel-skin.css' => '06ad5ed644ae41fd61603890a29cf3a1', + './include/javascript/yui/build/colorpicker/assets/colorpicker-core.css' => 'd13375280041c299b365991367d63db5', + './include/javascript/yui/build/charts/charts.js' => '6990fffbb8345654c5b50f2fb2332b94', + './include/javascript/yui/build/charts/charts-min.js' => '10ede5fa4e1f47b5d3219e6df451fde9', + './include/javascript/yui/build/charts/assets/charts.swf' => '15d4718264765f3b01014fb466281fe0', + './include/javascript/yui/build/carousel/carousel.js' => '660db4405beb3935aeb3637fb3216915', + './include/javascript/yui/build/carousel/carousel-min.js' => '694fc1b99f0b5823a304f36cb403c1ef', + './include/javascript/yui/build/carousel/assets/skins/sam/carousel.css' => '492cf6815b49617466347b1568e5e278', + './include/javascript/yui/build/carousel/assets/skins/sam/carousel-skin.css' => '689d98c0a92e112068c1a89f3ebb472c', './include/javascript/yui/build/carousel/assets/skins/sam/ajax-loader.gif' => '734023ef4fd81fb5638c9d5c3d6a8fdf', - './include/javascript/yui/build/carousel/assets/carousel-core.css' => '32accad6ca1819bf19da7c546b8aae88', + './include/javascript/yui/build/carousel/assets/carousel-core.css' => 'e46475c2977bbe23e7bc28ef3a14454e', './include/javascript/yui/build/carousel/assets/ajax-loader.gif' => '734023ef4fd81fb5638c9d5c3d6a8fdf', - './include/javascript/yui/build/calendar/calendar.js' => '3fa723bf49850ee19651ccac34d0ac2e', - './include/javascript/yui/build/calendar/calendar-min.js' => '852c2c3bc8c283b712d99c6c24e510ed', - './include/javascript/yui/build/calendar/assets/skins/sam/calendar.css' => 'ad3ccb220f106da477a25f9a637f5053', - './include/javascript/yui/build/calendar/assets/skins/sam/calendar-skin.css' => '215ba5a2c5a1dbd219db05a58f13b60c', + './include/javascript/yui/build/calendar/calendar.js' => 'f5bba267a1b5d3c493b6b8d2aa5ff633', + './include/javascript/yui/build/calendar/calendar-min.js' => '5988804cd764aebe858556484bc2abda', + './include/javascript/yui/build/calendar/assets/skins/sam/calendar.css' => '6bc97680058123754e7519423b0a8c63', + './include/javascript/yui/build/calendar/assets/skins/sam/calendar-skin.css' => '30ae42f971af0479b5ae8de3e280f768', './include/javascript/yui/build/calendar/assets/calx.gif' => 'acc1427b926515c1ec846e04e3b635cd', './include/javascript/yui/build/calendar/assets/calrt.gif' => 'ba0b2098813b15aa3cc655e881c92d0a', './include/javascript/yui/build/calendar/assets/callt.gif' => '0718c393fbd4095b219803cb6b7bcbf8', './include/javascript/yui/build/calendar/assets/calgrad.png' => 'd028abaadeebb310606448cfc7ba2bfe', - './include/javascript/yui/build/calendar/assets/calendar.css' => 'cdee21e708db89a3f21611de213b4d9f', - './include/javascript/yui/build/calendar/assets/calendar-core.css' => 'be61597ae2a5d6745f4295f4e281a211', - './include/javascript/yui/build/button/button.js' => '5513a50284659e706665a98f9b23835e', - './include/javascript/yui/build/button/button-min.js' => '3442458b76b17709d00135e8e9c8ddc1', + './include/javascript/yui/build/calendar/assets/calendar.css' => '1436e42e92bbd8df7c44468df31f8864', + './include/javascript/yui/build/calendar/assets/calendar-core.css' => '6e97e4f279c7a242afae283ee60079f5', + './include/javascript/yui/build/button/button.js' => '1408f5dca32da4ed1de72b48a574edbd', + './include/javascript/yui/build/button/button-min.js' => '19c64b59b4eec374ab75a99d5aefca65', './include/javascript/yui/build/button/assets/skins/sam/split-button-arrow.png' => 'ced974d5c685e5dfa0a37b824a6b5d48', './include/javascript/yui/build/button/assets/skins/sam/split-button-arrow-hover.png' => '36e66540d2feba76b8991e18b76fe93b', './include/javascript/yui/build/button/assets/skins/sam/split-button-arrow-focus.png' => '36e66540d2feba76b8991e18b76fe93b', @@ -4329,22 +5458,22 @@ $md5_string = array ( './include/javascript/yui/build/button/assets/skins/sam/split-button-arrow-active.png' => '890272b241c1d8a0db3ce5680b71fab0', './include/javascript/yui/build/button/assets/skins/sam/menu-button-arrow.png' => '6305efb37fa05af65c79b58b9d4c1b03', './include/javascript/yui/build/button/assets/skins/sam/menu-button-arrow-disabled.png' => '4df7235ca027f2546b2a216e59f81fb0', - './include/javascript/yui/build/button/assets/skins/sam/button.css' => '8dd40560e2b5695c02d91e59f2e787c9', - './include/javascript/yui/build/button/assets/skins/sam/button-skin.css' => 'a3c353c70c804be0a38d441251be4c8a', - './include/javascript/yui/build/button/assets/button-core.css' => 'ef05faed4ff9d4dd92815da7a8485718', - './include/javascript/yui/build/base/base.css' => 'f8e14c2b50188a4bd7553863579cd965', - './include/javascript/yui/build/base/base-min.css' => '2ba459363a0b19b112ad16be03da005f', - './include/javascript/yui/build/autocomplete/autocomplete.js' => '82e7b838b2a4ac953d218d4369fdcc2e', - './include/javascript/yui/build/autocomplete/autocomplete-min.js' => 'd87853c9b79ab88bff32909fa686e76c', - './include/javascript/yui/build/autocomplete/assets/skins/sam/autocomplete.css' => 'df782e1c9722d460b294cf30d536143c', - './include/javascript/yui/build/autocomplete/assets/skins/sam/autocomplete-skin.css' => 'd11e8caba6ebc10943fa7d5b0c592406', - './include/javascript/yui/build/autocomplete/assets/autocomplete-core.css' => '02f2ac7e6bf5753422fbddab521c7d19', - './include/javascript/yui/build/assets/skins/sam/yuitest.css' => '793339721d8f8dea54c60348fe4a853e', + './include/javascript/yui/build/button/assets/skins/sam/button.css' => '778412280f9d1d137c70d9bfbc3e9229', + './include/javascript/yui/build/button/assets/skins/sam/button-skin.css' => '7c1dcd2e51aab54a37b9093a0262fd34', + './include/javascript/yui/build/button/assets/button-core.css' => '40455cfcbc3b919f0e09aa892c619057', + './include/javascript/yui/build/base/base.css' => 'e417d0c7ad275e74fb919cb37e26c600', + './include/javascript/yui/build/base/base-min.css' => '4259eb7874971d95de6b481cb9371bca', + './include/javascript/yui/build/autocomplete/autocomplete.js' => 'c27bc6a9802f09626fde9528900635ac', + './include/javascript/yui/build/autocomplete/autocomplete-min.js' => '74029a4662a0a3cd3491b670c63b8166', + './include/javascript/yui/build/autocomplete/assets/skins/sam/autocomplete.css' => '5cc33eb610a2cb2cba75fc6491b836ac', + './include/javascript/yui/build/autocomplete/assets/skins/sam/autocomplete-skin.css' => 'c42871721c3ddc9a1ff2f9d5ae0cfe96', + './include/javascript/yui/build/autocomplete/assets/autocomplete-core.css' => 'b09284cd2791f418737d12655d348c52', + './include/javascript/yui/build/assets/skins/sam/yuitest.css' => '2d0cb73a1778f5526e1d2150a03b1c44', './include/javascript/yui/build/assets/skins/sam/wait.gif' => 'b0cd5a5dc070c705ebf8814a909802c3', - './include/javascript/yui/build/assets/skins/sam/treeview.css' => 'cf472192f2e3c5e89098f9d83732c746', + './include/javascript/yui/build/assets/skins/sam/treeview.css' => 'c3c40657a28275b8fdbd22836aa171c4', './include/javascript/yui/build/assets/skins/sam/treeview-sprite.gif' => '115a1070e1398629700a11d4f5d546bb', './include/javascript/yui/build/assets/skins/sam/treeview-loading.gif' => '8f1310bf9e7aa892d2dc09c4058c7bd3', - './include/javascript/yui/build/assets/skins/sam/tabview.css' => 'a87041d15dbd06a27f7d8b94100bafae', + './include/javascript/yui/build/assets/skins/sam/tabview.css' => '20b9b0856bdbae3906284bf76dfb571d', './include/javascript/yui/build/assets/skins/sam/sprite.psd' => '1c35d9ed1d8f86b406b376c66e41ef01', './include/javascript/yui/build/assets/skins/sam/sprite.png' => '96b257a32a932f7739d7dab52b38ee8f', './include/javascript/yui/build/assets/skins/sam/split-button-arrow.png' => 'ced974d5c685e5dfa0a37b824a6b5d48', @@ -4352,46 +5481,46 @@ $md5_string = array ( './include/javascript/yui/build/assets/skins/sam/split-button-arrow-focus.png' => '36e66540d2feba76b8991e18b76fe93b', './include/javascript/yui/build/assets/skins/sam/split-button-arrow-disabled.png' => 'db73dce6da2f5c5f02399c93488ce69e', './include/javascript/yui/build/assets/skins/sam/split-button-arrow-active.png' => '890272b241c1d8a0db3ce5680b71fab0', - './include/javascript/yui/build/assets/skins/sam/slider.css' => '71f7bccc93416362d854d66c50383d3d', - './include/javascript/yui/build/assets/skins/sam/skin.css' => '3767651bc262bb1f86042a3f47213e95', - './include/javascript/yui/build/assets/skins/sam/simpleeditor.css' => '1ccd68dda0b071fa28dc70b2f154cb4c', - './include/javascript/yui/build/assets/skins/sam/resize.css' => '9c978b19e16ad208645904c9323d5a31', - './include/javascript/yui/build/assets/skins/sam/progressbar.css' => 'f39fc4327836dbf61b7e433f6246e0ab', - './include/javascript/yui/build/assets/skins/sam/profilerviewer.css' => 'e07d72c12fc6c0028b89d88da7ec53d2', + './include/javascript/yui/build/assets/skins/sam/slider.css' => '90c2200aaaf0e06632ca1b4024bdf844', + './include/javascript/yui/build/assets/skins/sam/skin.css' => '367ca4c6c39f75ef1e2b3ed5dae2c329', + './include/javascript/yui/build/assets/skins/sam/simpleeditor.css' => '044cd7035069d497da625ea6974bd45d', + './include/javascript/yui/build/assets/skins/sam/resize.css' => '73ea10823217fbacd668ea3a4ac3b897', + './include/javascript/yui/build/assets/skins/sam/progressbar.css' => '469857201ff73897690c217998a2778d', + './include/javascript/yui/build/assets/skins/sam/profilerviewer.css' => '1d49b6afb187cdbe8ffa51dfc5c76f67', './include/javascript/yui/build/assets/skins/sam/picker_mask.png' => 'a4d3b14fbcc5b8f112d3635f981d6a1c', - './include/javascript/yui/build/assets/skins/sam/paginator.css' => '2bb7f5bf775e4770dd2b6f9e36611b92', + './include/javascript/yui/build/assets/skins/sam/paginator.css' => 'cd555d47d10366590a92ae8554f8c62d', './include/javascript/yui/build/assets/skins/sam/menuitem_submenuindicator_disabled.png' => '42a8a785ecb430826ebd4748fc77ebc0', './include/javascript/yui/build/assets/skins/sam/menuitem_submenuindicator.png' => '10f0de223bc3688a8986c23f71f081f1', './include/javascript/yui/build/assets/skins/sam/menuitem_checkbox_disabled.png' => '6d9c1ef2cc0823c45226e43f9ef0e3dd', './include/javascript/yui/build/assets/skins/sam/menuitem_checkbox.png' => '01d544275d0ee95fae025242d1eab1d5', './include/javascript/yui/build/assets/skins/sam/menubaritem_submenuindicator_disabled.png' => 'd8c20340be4484d2153ecd1a8b21f57f', './include/javascript/yui/build/assets/skins/sam/menubaritem_submenuindicator.png' => '1424f886ef59424f1aa19fa94771fb3f', - './include/javascript/yui/build/assets/skins/sam/menu.css' => '6f10107d3d986fdad286d5f6d5e5002f', + './include/javascript/yui/build/assets/skins/sam/menu.css' => '3fdefb674912ef34e60f2281d9ef0395', './include/javascript/yui/build/assets/skins/sam/menu-button-arrow.png' => '6305efb37fa05af65c79b58b9d4c1b03', './include/javascript/yui/build/assets/skins/sam/menu-button-arrow-disabled.png' => '4df7235ca027f2546b2a216e59f81fb0', - './include/javascript/yui/build/assets/skins/sam/logger.css' => '34c9d2d0dc2dfecd76703d3ac210088a', + './include/javascript/yui/build/assets/skins/sam/logger.css' => '2de907567e163a6073bc6eeeea8d1b16', './include/javascript/yui/build/assets/skins/sam/loading.gif' => '8f1310bf9e7aa892d2dc09c4058c7bd3', './include/javascript/yui/build/assets/skins/sam/layout_sprite.png' => '0f5a66998a0b88cabfe0489a6a11e28a', - './include/javascript/yui/build/assets/skins/sam/layout.css' => '65d50fedbdcb941e774d8ed0bfdce3c7', - './include/javascript/yui/build/assets/skins/sam/imagecropper.css' => '14b933dace6b55ff4bd29dfa532049e9', + './include/javascript/yui/build/assets/skins/sam/layout.css' => 'ee3ed7a0668698cd1b75c5c6b35d24ca', + './include/javascript/yui/build/assets/skins/sam/imagecropper.css' => '5de53b0a1a47a6b2250f7cc6972a86f2', './include/javascript/yui/build/assets/skins/sam/hue_bg.png' => '73ae3465d3dcbd95ebb4165760fac8e8', './include/javascript/yui/build/assets/skins/sam/header_background.png' => '412285f6b44f1d7757fc005680c2ecf5', - './include/javascript/yui/build/assets/skins/sam/editor.css' => '1ccd68dda0b071fa28dc70b2f154cb4c', + './include/javascript/yui/build/assets/skins/sam/editor.css' => '0de2764eabf61d6e16e25fed36a7678e', './include/javascript/yui/build/assets/skins/sam/editor-sprite.gif' => 'b72bb0d8d92b3a946cb6be25d2c885fa', './include/javascript/yui/build/assets/skins/sam/editor-sprite-active.gif' => 'e7a74b72201d29021d6d04d85f86f0c9', './include/javascript/yui/build/assets/skins/sam/editor-knob.gif' => '43c236afae83c3032ca8da61d3a021b6', './include/javascript/yui/build/assets/skins/sam/dt-arrow-up.png' => '27498450164be1b258cae9dfdd534b69', './include/javascript/yui/build/assets/skins/sam/dt-arrow-dn.png' => 'ee0dd66007d4f34b5e6660b4abbb5a65', './include/javascript/yui/build/assets/skins/sam/desc.gif' => '4708d3f08d550225360a43cd8ca2fab4', - './include/javascript/yui/build/assets/skins/sam/datatable.css' => 'd2398264754747241f8eebdcd18d69d2', - './include/javascript/yui/build/assets/skins/sam/container.css' => 'e436622acdb4bc6986de749c426f1c04', - './include/javascript/yui/build/assets/skins/sam/colorpicker.css' => '21eaa2969dd55fe80afc1928fd37e7b5', + './include/javascript/yui/build/assets/skins/sam/datatable.css' => '967fa68ad97a89484a7def13ce09b156', + './include/javascript/yui/build/assets/skins/sam/container.css' => '83c67d7f4fcfed83588f7cfc3aa16f25', + './include/javascript/yui/build/assets/skins/sam/colorpicker.css' => '818638f9de888dca2c49f4463a8a38fe', './include/javascript/yui/build/assets/skins/sam/check2.gif' => '3544088604d6d6e519a3a392db89c38d', './include/javascript/yui/build/assets/skins/sam/check1.gif' => '691389bb26f429e79666599992a384b3', './include/javascript/yui/build/assets/skins/sam/check0.gif' => 'd3e7d474e008b8cb585eb05c5baafe5a', - './include/javascript/yui/build/assets/skins/sam/carousel.css' => '71339651dc17bd504e1865b38de5acff', - './include/javascript/yui/build/assets/skins/sam/calendar.css' => '98bc5824a4a03d18bba4b8f145092b79', - './include/javascript/yui/build/assets/skins/sam/button.css' => '44e8590c6db616e71956614da45a13a3', + './include/javascript/yui/build/assets/skins/sam/carousel.css' => 'e313789f1b901385d80fc389a384979f', + './include/javascript/yui/build/assets/skins/sam/calendar.css' => 'a2d37aea2d9e920c6c3cddbac0fe27a8', + './include/javascript/yui/build/assets/skins/sam/button.css' => '482cb45560a75058feae458dc50f8fee', './include/javascript/yui/build/assets/skins/sam/blankimage.png' => '91c1defa5830c414bd5d43fb63d30101', './include/javascript/yui/build/assets/skins/sam/bg-v.gif' => '220b443b77004914d4293a655299e2ce', './include/javascript/yui/build/assets/skins/sam/bg-h.gif' => '4d4b3a56c225f8f21f7d839ba2b03823', @@ -4399,20 +5528,84 @@ $md5_string = array ( './include/javascript/yui/build/assets/skins/sam/bar-h.png' => 'a4182c879e01c66bfaf9c188202c326b', './include/javascript/yui/build/assets/skins/sam/back-v.png' => 'f0179d9bbb6e6f7796caed9d1b0b9795', './include/javascript/yui/build/assets/skins/sam/back-h.png' => '972e692bc2c40a33fa30f3333c5e5821', - './include/javascript/yui/build/assets/skins/sam/autocomplete.css' => 'df782e1c9722d460b294cf30d536143c', + './include/javascript/yui/build/assets/skins/sam/autocomplete.css' => '5cc33eb610a2cb2cba75fc6491b836ac', './include/javascript/yui/build/assets/skins/sam/asc.gif' => '7053becd07a62f576bb8767a5d9875f0', './include/javascript/yui/build/assets/skins/sam/ajax-loader.gif' => '734023ef4fd81fb5638c9d5c3d6a8fdf', - './include/javascript/yui/build/animation/animation.js' => '1dd52b9ff5b763668113153d3c26c3df', - './include/javascript/yui/build/animation/animation-min.js' => '87ab37459d9aed17838e38af78fee22d', + './include/javascript/yui/build/animation/animation.js' => 'e802ef4f267270728f9e3d63691f3f78', + './include/javascript/yui/build/animation/animation-min.js' => 'aa8aedcf06eeea23d975b99cec53ad18', './include/javascript/yui/README' => '4dc7cd50545b8e539199a9d582f711ed', './include/javascript/yui/LICENSE.txt' => '8836083506dadbf2735da1d444429ede', - './include/javascript/tiny_mce/utils/validate.js' => 'fe7d3b49f9c3587e40a9e29cd1ad9550', - './include/javascript/tiny_mce/utils/mctabs.js' => '0d310e7ec0cc85e584ef4bc456735b35', - './include/javascript/tiny_mce/utils/form_utils.js' => '7f898490f1e26b91192ebde3791b7e28', - './include/javascript/tiny_mce/utils/editable_selects.js' => 'a67bc4b79368958a0b8e8bd6e9c0d751', - './include/javascript/tiny_mce/tiny_mce_src.js' => '484235a72704170be94e2a5ba59e2285', - './include/javascript/tiny_mce/tiny_mce_popup.js' => 'c51f86c7aad0344e8c6b15e5edb67106', - './include/javascript/tiny_mce/tiny_mce.js' => '2ed1dddf27f0dc995e2c369c4b6fcc77', + './include/javascript/tiny_mce/tiny_mce_prototype_src.js' => '8c8c8274addb9796be8fe139188b0025', + './include/javascript/tiny_mce/tiny_mce_prototype.js' => '7d3facc430342e716ef2e94b9db1dd44', + './include/javascript/tiny_mce/tiny_mce_jquery_src.js' => '46a751d313683090fd495c54dbaaf6c5', + './include/javascript/tiny_mce/tiny_mce_jquery.js' => 'b3623f4b230b37d41ab2f51879491675', + './include/javascript/tiny_mce/tiny_mce_dev.js' => '84dd88f808b9c5398502c5ee6c6d8701', + './include/javascript/tiny_mce/jquery.tinymce.js' => 'e53609994194e3105622a23808ef8567', + './include/javascript/tiny_mce/classes/util/XHR.js' => 'f65a7353df4da79723d9df5eebd05768', + './include/javascript/tiny_mce/classes/util/URI.js' => 'd73bfb53334432f23db01c0dcf1fc530', + './include/javascript/tiny_mce/classes/util/JSONRequest.js' => '6b4a819455904314a3f8f054996271b2', + './include/javascript/tiny_mce/classes/util/JSONP.js' => 'f800725ddac0a6dbe32f4aeccd0d4f13', + './include/javascript/tiny_mce/classes/util/JSON.js' => '51dd985ab57af52430b80cd591b658de', + './include/javascript/tiny_mce/classes/util/Dispatcher.js' => 'bdf797e914d8caccdcb1701458c5fc61', + './include/javascript/tiny_mce/classes/util/Cookie.js' => 'e068483c7149050c70335b31dcb8bf06', + './include/javascript/tiny_mce/classes/ui/ToolbarGroup.js' => 'b8a9e05805ed11b656b4ea6cb18a850b', + './include/javascript/tiny_mce/classes/ui/Toolbar.js' => '1041bce0e498189c529a882301be8e25', + './include/javascript/tiny_mce/classes/ui/SplitButton.js' => 'c0ee32e64a1f39382998b4de77becb73', + './include/javascript/tiny_mce/classes/ui/Separator.js' => '0371c1899f8915ff8adc9f691bc26652', + './include/javascript/tiny_mce/classes/ui/NativeListBox.js' => 'f6ea4963c8df3e96d2d8f6295eb3c949', + './include/javascript/tiny_mce/classes/ui/MenuItem.js' => 'e140678108b5aca1219ce35a8d92ff46', + './include/javascript/tiny_mce/classes/ui/MenuButton.js' => '36e39a3eb857ab134e4c5b635bfbe812', + './include/javascript/tiny_mce/classes/ui/Menu.js' => '0684729e7a372c3fbf08e2f853401b54', + './include/javascript/tiny_mce/classes/ui/ListBox.js' => 'cb0ab4d20633d73d8dcbeca04386f1ff', + './include/javascript/tiny_mce/classes/ui/KeyboardNavigation.js' => 'b67a93720665e424b8f1907caf288efe', + './include/javascript/tiny_mce/classes/ui/DropMenu.js' => 'dfd266c37d75325c108941e2b02c1808', + './include/javascript/tiny_mce/classes/ui/Control.js' => '82b0501e8674d94347de9fc8d591b43a', + './include/javascript/tiny_mce/classes/ui/Container.js' => '013c80ec3368034dfc3c0078bfa7638c', + './include/javascript/tiny_mce/classes/ui/ColorSplitButton.js' => '81a446a22da165f8f194b97f725a6025', + './include/javascript/tiny_mce/classes/ui/Button.js' => 'f97448d4104362d190e39fc06fbcb350', + './include/javascript/tiny_mce/classes/tinymce.js' => 'f48783f544f12b3f22e78cea12138745', + './include/javascript/tiny_mce/classes/html/Writer.js' => '9831ca7a112896f3cc0bd456387cccdb', + './include/javascript/tiny_mce/classes/html/Styles.js' => '65e7b83454437113797807be35349b93', + './include/javascript/tiny_mce/classes/html/Serializer.js' => 'cb959e403e3ae30c74f7f944a44d7bc9', + './include/javascript/tiny_mce/classes/html/Schema.js' => 'e19239cd3c11d93360b166d7d921b368', + './include/javascript/tiny_mce/classes/html/SaxParser.js' => '9ae6aead263422c2c217f5ba9659a641', + './include/javascript/tiny_mce/classes/html/Node.js' => '645deabc6022b8150fd08575d9a2d69e', + './include/javascript/tiny_mce/classes/html/Entities.js' => '9220768d03e7942db529e51fa92bc775', + './include/javascript/tiny_mce/classes/html/DomParser.js' => '1aee817715e06f215ba05240fd0a6367', + './include/javascript/tiny_mce/classes/firebug/firebug-lite.js' => '1c9c10926be94a61564ad0541a50624f', + './include/javascript/tiny_mce/classes/firebug/FIREBUG.LICENSE' => '3b402ea96cec202bac23ea7144653cfa', + './include/javascript/tiny_mce/classes/dom/TridentSelection.js' => '7c15541f8ee7ce3b7f0a06eda13a5624', + './include/javascript/tiny_mce/classes/dom/TreeWalker.js' => '661a5409f646940492523ed62f6a3f64', + './include/javascript/tiny_mce/classes/dom/Sizzle.js' => '43535dc856e00e734a0b9a9148962ef3', + './include/javascript/tiny_mce/classes/dom/Serializer.js' => '164cb45626dae2ca5ef872458dbe9878', + './include/javascript/tiny_mce/classes/dom/Selection.js' => '0ec3adf3689791c4d64cdeea13a6e888', + './include/javascript/tiny_mce/classes/dom/ScriptLoader.js' => '355a293bf1dc42a97cf475b8220c11c3', + './include/javascript/tiny_mce/classes/dom/RangeUtils.js' => '8f1613a50adae5ac058c319b6542a2f8', + './include/javascript/tiny_mce/classes/dom/Range.js' => '4dfaa199c1194452aa51ef6b99749ed2', + './include/javascript/tiny_mce/classes/dom/EventUtils.js' => '3d0069655775ca39fc9f709f14da7e01', + './include/javascript/tiny_mce/classes/dom/Element.js' => 'd7e14ecb7ab535b9f2179fd1a78a6ed1', + './include/javascript/tiny_mce/classes/dom/DOMUtils.js' => 'de0be75cbe0eea8966e003b5711743c6', + './include/javascript/tiny_mce/classes/adapter/prototype/adapter.js' => '1dcad348dc02cd993b563b141dc42dd2', + './include/javascript/tiny_mce/classes/adapter/jquery/jquery.tinymce.js' => '7f5d7a560ef76f500591b7f35cdc99b6', + './include/javascript/tiny_mce/classes/adapter/jquery/adapter.js' => 'b23cd6eca698fa050d99f5d57cebfa54', + './include/javascript/tiny_mce/classes/WindowManager.js' => 'd15ae6f4216b37db65e7bc144677d80a', + './include/javascript/tiny_mce/classes/UndoManager.js' => '9c59d0d752a5c47584e8e874ac9260ca', + './include/javascript/tiny_mce/classes/Popup.js' => '76a61fccfcb72e752e25dfbe4dc3f9d5', + './include/javascript/tiny_mce/classes/LegacyInput.js' => '4fb393411046268e06c48d7801ddd5ef', + './include/javascript/tiny_mce/classes/Formatter.js' => 'cba818e7f68f97ae0662c5087cb51f8a', + './include/javascript/tiny_mce/classes/ForceBlocks.js' => 'ede99c38fe7d64da0812ce10ce5f0e37', + './include/javascript/tiny_mce/classes/EditorManager.js' => 'b091f25d2543c61126e0b9b1011db9cf', + './include/javascript/tiny_mce/classes/EditorCommands.js' => '674846c41e1d0199b614cbe0f8e9099c', + './include/javascript/tiny_mce/classes/Editor.js' => '4d58cafcd74995442c3d3e138310fc2a', + './include/javascript/tiny_mce/classes/ControlManager.js' => '75d0c8fa915796ad6fc3652008e492b3', + './include/javascript/tiny_mce/classes/AddOnManager.js' => '656a19b1fa7d4e7ad5f35fc7073e3d7e', + './include/javascript/tiny_mce/utils/validate.js' => '2d73c0757ea622f65738ea71433ca8e4', + './include/javascript/tiny_mce/utils/mctabs.js' => 'bd062418b6a7e5007649421815021565', + './include/javascript/tiny_mce/utils/form_utils.js' => '337d7e2efe224c1c7da72d40b612d0a6', + './include/javascript/tiny_mce/utils/editable_selects.js' => 'eae99e787007eaee6a7919bc2417f63a', + './include/javascript/tiny_mce/tiny_mce_src.js' => 'cab7130d2889fd860995e9244c73e753', + './include/javascript/tiny_mce/tiny_mce_popup.js' => '9a9c125814b9715982d246a1ee78084f', + './include/javascript/tiny_mce/tiny_mce.js' => '048a6a57718e56a7844b6291052b7f67', './include/javascript/tiny_mce/themes/simple/skins/o2k7/ui.css' => '6649913256b2a0e48a1337d1c73d31d1', './include/javascript/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png' => '405ca3d63b48667ef485553192507f59', './include/javascript/tiny_mce/themes/simple/skins/o2k7/content.css' => 'db914acf7c5b603d641bca3ef9141a7e', @@ -4420,154 +5613,163 @@ $md5_string = array ( './include/javascript/tiny_mce/themes/simple/skins/default/content.css' => '3b5ee10accbe8f436bd551b7bb7067b0', './include/javascript/tiny_mce/themes/simple/langs/en.js' => '38c39321c50f9c8e58b757618399043a', './include/javascript/tiny_mce/themes/simple/img/icons.gif' => '749151955998f915596270f8c452af6e', - './include/javascript/tiny_mce/themes/simple/editor_template_src.js' => 'f4b951c7a3b88dcb16718661362baf73', - './include/javascript/tiny_mce/themes/simple/editor_template.js' => '45f4d2bf0007e3f8fef1e8bdccff214c', - './include/javascript/tiny_mce/themes/advanced/source_editor.htm' => 'ad4599870c78219ce16abd5dc75159dc', - './include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css' => '623a420867f1da38168b5ab0eac1afcc', - './include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_black.css' => 'dd03578fd4e33798de6d86c4564e4c66', - './include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui.css' => 'b9db394d414b1d2f0d8930522e676c5d', + './include/javascript/tiny_mce/themes/simple/editor_template_src.js' => '95f31d4238d5ea2e17001288c3aae536', + './include/javascript/tiny_mce/themes/simple/editor_template.js' => '3ac3fd3129ee9605052b8470f8d58538', + './include/javascript/tiny_mce/themes/advanced/shortcuts.htm' => 'f407f34a95b1d5ee2824f3799542e74f', + './include/javascript/tiny_mce/themes/advanced/source_editor.htm' => '9d9faa47c3862ae3614d9f949d9b6f62', + './include/javascript/tiny_mce/themes/advanced/skins/highcontrast/ui.css' => '68151de213c5a93151398138c4c88ef3', + './include/javascript/tiny_mce/themes/advanced/skins/highcontrast/dialog.css' => 'b8df654e244dce02616deee320db0a88', + './include/javascript/tiny_mce/themes/advanced/skins/highcontrast/content.css' => '719a5228674fb83e322f29efa90b950e', + './include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css' => 'f66b026fe40921b62c0b77798876760a', + './include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_black.css' => '02a164ba69ca7d9182047b24944e1d69', + './include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui.css' => 'c483637b2a5e889bed54a3891035f6e6', './include/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png' => '5690ef573f4dc74ec3eb4d101806976e', './include/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png' => 'a5ad448e9c25120cb7e05fffe4a6234f', './include/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png' => '8c9b1f0ee9deb6374983650edbd6ddfc', - './include/javascript/tiny_mce/themes/advanced/skins/o2k7/dialog.css' => '32d8369bcd5f49067b6c0905b2bb6971', - './include/javascript/tiny_mce/themes/advanced/skins/o2k7/content.css' => '4a0a94603795b7bfc41ff76ea8889db7', - './include/javascript/tiny_mce/themes/advanced/skins/default/ui.css' => '95f5bbc6ea992fcb641f0275025dc438', + './include/javascript/tiny_mce/themes/advanced/skins/o2k7/dialog.css' => 'b6ccc7c5502dae22838aa47a0e2267a0', + './include/javascript/tiny_mce/themes/advanced/skins/o2k7/content.css' => '1b6df3b8b3edd3090ef2011ced0f9ac7', + './include/javascript/tiny_mce/themes/advanced/skins/default/ui.css' => '720a1323be729253347e733580622e36', './include/javascript/tiny_mce/themes/advanced/skins/default/img/tabs.gif' => '93f97588a35da1f45fdcb975d4380913', './include/javascript/tiny_mce/themes/advanced/skins/default/img/progress.gif' => '50c5e3e79b276c92df6cc52caeb464f0', './include/javascript/tiny_mce/themes/advanced/skins/default/img/menu_check.gif' => 'c7d003885737f94768eecae49dcbca63', './include/javascript/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif' => 'e21752451a9d80e276fef7b602bdbdba', './include/javascript/tiny_mce/themes/advanced/skins/default/img/items.gif' => '5cb42865ce70a58d420786854fed4ae1', './include/javascript/tiny_mce/themes/advanced/skins/default/img/buttons.png' => '1e0acdc2135897e6a95bb40cfde2fbc6', - './include/javascript/tiny_mce/themes/advanced/skins/default/dialog.css' => '2c50db59d058317010775677fee63ac3', - './include/javascript/tiny_mce/themes/advanced/skins/default/content.css' => '2f921f2c07fa24953530b23bf2000e0a', - './include/javascript/tiny_mce/themes/advanced/link.htm' => '2951c33235fe77a9b2d20b50ade5bdfd', - './include/javascript/tiny_mce/themes/advanced/langs/en_dlg.js' => '9a83ef13d214953214b354ca5b657867', - './include/javascript/tiny_mce/themes/advanced/langs/en.js' => '6cfaa5303f0e96e2fbe1ff210ba1f65b', - './include/javascript/tiny_mce/themes/advanced/js/source_editor.js' => '4b3abeb1908bef7872238e184a5a40d9', - './include/javascript/tiny_mce/themes/advanced/js/link.js' => 'e4eaaa5fcee50264e9b24370cc802b76', - './include/javascript/tiny_mce/themes/advanced/js/image.js' => 'fd66296c6168ac8b5bd72cf2b027c3d4', - './include/javascript/tiny_mce/themes/advanced/js/color_picker.js' => '2ce934aa3086cba10c51c6d055177f8f', - './include/javascript/tiny_mce/themes/advanced/js/charmap.js' => '27f30d99721bd0ff665a443c49a22702', - './include/javascript/tiny_mce/themes/advanced/js/anchor.js' => '8988b8d83a5d753ddcb3600b976780fd', - './include/javascript/tiny_mce/themes/advanced/js/about.js' => 'cd4f25e57d9c7c3c5eaed2b4234c8787', - './include/javascript/tiny_mce/themes/advanced/img/icons.gif' => 'e893a1f9e0c9c6240ba28756cf838f5f', + './include/javascript/tiny_mce/themes/advanced/skins/default/dialog.css' => '56b99f4e744b576fc0b79da0a997f328', + './include/javascript/tiny_mce/themes/advanced/skins/default/content.css' => '39a1f5027797e7dd27e2d91d26238fde', + './include/javascript/tiny_mce/themes/advanced/link.htm' => '31c00824645414efa6c8273606a052ab', + './include/javascript/tiny_mce/themes/advanced/langs/en_dlg.js' => 'b262065c76cbb67cdee211ed114da06b', + './include/javascript/tiny_mce/themes/advanced/langs/en.js' => 'dd0cd0967efc81bcead2393257fddee7', + './include/javascript/tiny_mce/themes/advanced/js/source_editor.js' => 'f1199e7f280cb16315ce96b57c132b46', + './include/javascript/tiny_mce/themes/advanced/js/link.js' => 'b9afd9f4addc771dd657b10e003ab3fd', + './include/javascript/tiny_mce/themes/advanced/js/image.js' => '21fd9f89227231e5b940d6ae2aeca576', + './include/javascript/tiny_mce/themes/advanced/js/color_picker.js' => 'f2be5a5b4fa75f5024b4da7c48b6220a', + './include/javascript/tiny_mce/themes/advanced/js/charmap.js' => 'dd98a4a6232979fcc260e47ca0dc831c', + './include/javascript/tiny_mce/themes/advanced/js/anchor.js' => '7da0063f892dbbfe65fce99c5a31092a', + './include/javascript/tiny_mce/themes/advanced/js/about.js' => '4ae895d8be28f8b94dd4f5d206cd7d59', + './include/javascript/tiny_mce/themes/advanced/img/windowsmedia.gif' => 'c327cd167b3a7bc263d908b0d0154ead', + './include/javascript/tiny_mce/themes/advanced/img/video.gif' => 'f85c56813ea016a75e496bba50d66ab4', + './include/javascript/tiny_mce/themes/advanced/img/trans.gif' => '12bf9e19374920de3146a64775f46a5e', + './include/javascript/tiny_mce/themes/advanced/img/shockwave.gif' => 'baa643b587565755157618032dc93e3c', + './include/javascript/tiny_mce/themes/advanced/img/realmedia.gif' => 'b9734ee16d790e67bea01046feba28b7', + './include/javascript/tiny_mce/themes/advanced/img/quicktime.gif' => '9a6a9fdead205b125c07ea37e71ed4f1', + './include/javascript/tiny_mce/themes/advanced/img/pagebreak.gif' => '48872075f721bf57a517e3275d61c0ba', + './include/javascript/tiny_mce/themes/advanced/img/iframe.gif' => 'a1af02e9ba370f64297087b46e80591e', + './include/javascript/tiny_mce/themes/advanced/img/flash.gif' => '6c69b02015d09280332ff8b07e4ea2f3', + './include/javascript/tiny_mce/themes/advanced/img/icons.gif' => '092b023d8d0073b8f651a92a1f711ccd', './include/javascript/tiny_mce/themes/advanced/img/colorpicker.jpg' => '02ae48639aa5729e6a40fb64455c32a2', - './include/javascript/tiny_mce/themes/advanced/image.htm' => '8008302022a40226c46f87fceac11f62', - './include/javascript/tiny_mce/themes/advanced/editor_template_src.js' => 'c6ca13b7383944ab9dca14b27f2a8240', - './include/javascript/tiny_mce/themes/advanced/editor_template.js' => 'ed03663b2f2feeca90dc23e6add11eef', - './include/javascript/tiny_mce/themes/advanced/color_picker.htm' => '01474b7f41da7d851c5a7f27aa2f2ff0', - './include/javascript/tiny_mce/themes/advanced/charmap.htm' => 'b3f3e37cff43d90e2fec656b52f1b67a', - './include/javascript/tiny_mce/themes/advanced/anchor.htm' => 'fece56d073731444af6747bf65fbb257', - './include/javascript/tiny_mce/themes/advanced/about.htm' => '2102cad8b48c2e05fa8ec2fd6be6c7e9', + './include/javascript/tiny_mce/themes/advanced/image.htm' => '465650fb56e2fa41f237f1815ae0f29a', + './include/javascript/tiny_mce/themes/advanced/editor_template_src.js' => '77fae43090e12c3b9eafcf6a96fe7b86', + './include/javascript/tiny_mce/themes/advanced/editor_template.js' => '53051500ea1cae4d71a092378ae1726b', + './include/javascript/tiny_mce/themes/advanced/color_picker.htm' => '55b0a0c12a4273a5b837a7ce1d049146', + './include/javascript/tiny_mce/themes/advanced/charmap.htm' => '9be95718217bb601e7e61f4da3dafe98', + './include/javascript/tiny_mce/themes/advanced/anchor.htm' => 'a7de241afefdba1786c08e1e31432f69', + './include/javascript/tiny_mce/themes/advanced/about.htm' => 'fd88ed023c04c4cc97c5cb33f8480e0c', + './include/javascript/tiny_mce/plugins/wordcount/editor_plugin_src.js' => 'c0629aeec21c81d063d5aad767ddfd80', + './include/javascript/tiny_mce/plugins/wordcount/editor_plugin.js' => 'cb60cda80c8bca8a9fb112dbb80bbf17', + './include/javascript/tiny_mce/plugins/tabfocus/editor_plugin_src.js' => '43fec55efeb77367d28e4b228f63d740', + './include/javascript/tiny_mce/plugins/tabfocus/editor_plugin.js' => '2993514e91cbf86c13ba3ca12b7a19e0', + './include/javascript/tiny_mce/plugins/lists/editor_plugin_src.js' => 'edc0da367d1727798e66dc962f2566a2', + './include/javascript/tiny_mce/plugins/lists/editor_plugin.js' => 'fae367e3d43402980fdbb9e56a6e4547', + './include/javascript/tiny_mce/plugins/legacyoutput/editor_plugin_src.js' => 'd4f2c98d311711838fd89e080d80e8bc', + './include/javascript/tiny_mce/plugins/legacyoutput/editor_plugin.js' => '3e3a7b70e8fc43b4b6f2901f73d0b01c', + './include/javascript/tiny_mce/plugins/autoresize/editor_plugin_src.js' => '78ef2226065916566e091ec0b5b6d127', + './include/javascript/tiny_mce/plugins/autoresize/editor_plugin.js' => '6f6986264b59fcb7e7b2761c36efecec', './include/javascript/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js' => 'e845f30954520a5113ca623b017fb723', - './include/javascript/tiny_mce/plugins/xhtmlxtras/js/ins.js' => 'ced8412e867557ead95fb2146e73dab1', - './include/javascript/tiny_mce/plugins/xhtmlxtras/js/element_common.js' => 'f8e0a80427f8bac56c369cd8b43e12dd', - './include/javascript/tiny_mce/plugins/xhtmlxtras/js/del.js' => 'e2c424ec61e25750fabd5bb0c8de74d7', - './include/javascript/tiny_mce/plugins/xhtmlxtras/js/cite.js' => 'b493826c114ded7a7c950d42bedc6192', - './include/javascript/tiny_mce/plugins/xhtmlxtras/js/attributes.js' => '9a57a3801c04bb20eb79b47a6ac9a9d2', - './include/javascript/tiny_mce/plugins/xhtmlxtras/js/acronym.js' => 'aee35e665ca5cbe78baef305ba9dfd0a', - './include/javascript/tiny_mce/plugins/xhtmlxtras/js/abbr.js' => '76f004b5aea36c9471e7612f4560a286', - './include/javascript/tiny_mce/plugins/xhtmlxtras/ins.htm' => '513ab8c5155b01f641be6a7e5dbf06a3', - './include/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js' => '9cdc869de54673668f57743e32012133', - './include/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin.js' => '6c2389c55cc2d835a14d181554fe23fb', - './include/javascript/tiny_mce/plugins/xhtmlxtras/del.htm' => '90ca26878395f58b40a728c3f3613c8d', + './include/javascript/tiny_mce/plugins/xhtmlxtras/js/ins.js' => 'f659a3cf2fca7086e37718beb9dd2ff9', + './include/javascript/tiny_mce/plugins/xhtmlxtras/js/element_common.js' => '7821e436f23c6f22f171c1c857e5f70b', + './include/javascript/tiny_mce/plugins/xhtmlxtras/js/del.js' => 'fcfa58f9928d42abbf5bdb5cdb002dfb', + './include/javascript/tiny_mce/plugins/xhtmlxtras/js/cite.js' => '0a4c237a7bf3e54d8c08d1e912e199be', + './include/javascript/tiny_mce/plugins/xhtmlxtras/js/attributes.js' => 'fe87f2428a30ad779c364042335c9284', + './include/javascript/tiny_mce/plugins/xhtmlxtras/js/acronym.js' => '1e8cb09189f3b81274ddea6fb5021525', + './include/javascript/tiny_mce/plugins/xhtmlxtras/js/abbr.js' => '0262d05e0ddec030f92818d28ccdbea4', + './include/javascript/tiny_mce/plugins/xhtmlxtras/ins.htm' => 'b938131530437ffe16686cd9a760d7b7', + './include/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js' => '028a4008975327acdc186d4c83645225', + './include/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin.js' => 'c9f91af5f1b8a1ba7a1e4ccf53fc7790', + './include/javascript/tiny_mce/plugins/xhtmlxtras/del.htm' => 'c57c83164aed2eba2fd4b48da428d742', './include/javascript/tiny_mce/plugins/xhtmlxtras/css/popup.css' => '80b339ec8c041f8adc5aecb03c7d6f99', './include/javascript/tiny_mce/plugins/xhtmlxtras/css/attributes.css' => '289bd1e4958e04caf7fac5e4613732fd', - './include/javascript/tiny_mce/plugins/xhtmlxtras/cite.htm' => '8e546c512946df4e064cd93ae89154d9', - './include/javascript/tiny_mce/plugins/xhtmlxtras/attributes.htm' => '66f06ee6805756a2ede60121a9aac0b1', - './include/javascript/tiny_mce/plugins/xhtmlxtras/acronym.htm' => '90610e1e803e4a2c70283fe54ead82d7', - './include/javascript/tiny_mce/plugins/xhtmlxtras/abbr.htm' => '6902034abc4b6cef1bc1b0ef66407403', - './include/javascript/tiny_mce/plugins/visualchars/editor_plugin_src.js' => 'b6e6e4adbc2a55c1cdfdeae004aa4da1', - './include/javascript/tiny_mce/plugins/visualchars/editor_plugin.js' => '8fec0ef8561966c627ef5997a4b76ce6', - './include/javascript/tiny_mce/plugins/template/template.htm' => 'd69375f0253c27fbe1f600eb8b3f3890', + './include/javascript/tiny_mce/plugins/xhtmlxtras/cite.htm' => '93c40151cf29187b2bde06a6be3e37c0', + './include/javascript/tiny_mce/plugins/xhtmlxtras/attributes.htm' => 'aef108c8e26b6cbe7c1942abf3e99dc7', + './include/javascript/tiny_mce/plugins/xhtmlxtras/acronym.htm' => '2771d6a713047965e2b287c29b249e7a', + './include/javascript/tiny_mce/plugins/xhtmlxtras/abbr.htm' => '4389f92a10a62c08ee2e07ceb3e89374', + './include/javascript/tiny_mce/plugins/visualchars/editor_plugin_src.js' => 'd7fc4d8abe66664834d9277dba356777', + './include/javascript/tiny_mce/plugins/visualchars/editor_plugin.js' => 'e494d07c71e24040a407b20017ca63e3', + './include/javascript/tiny_mce/plugins/template/template.htm' => 'db11b816cfdd77ce3215d98b454e122b', './include/javascript/tiny_mce/plugins/template/langs/en_dlg.js' => 'e672f0d31c3cf67114d1ad72bd1d1147', - './include/javascript/tiny_mce/plugins/template/js/template.js' => 'e65e4c8007b1528670790af8c48e07dc', - './include/javascript/tiny_mce/plugins/template/editor_plugin_src.js' => '9abd7e5d1f38a52bf1f15bb1baf43f6f', - './include/javascript/tiny_mce/plugins/template/editor_plugin.js' => '345d085ce78d9bb1e14ab6fe4f151e44', + './include/javascript/tiny_mce/plugins/template/js/template.js' => '59345ca93da3763e7063ff40eeaa6bf3', + './include/javascript/tiny_mce/plugins/template/editor_plugin_src.js' => '659f6b605beb1072a368fcaf36654161', + './include/javascript/tiny_mce/plugins/template/editor_plugin.js' => '70cb20c4e287110ae8aeed999893c532', './include/javascript/tiny_mce/plugins/template/css/template.css' => '6cc98d131d493071f2b14dac07f2cdbd', './include/javascript/tiny_mce/plugins/template/blank.htm' => '9089127d1ef7411473edea629d4be1ce', - './include/javascript/tiny_mce/plugins/table/table.htm' => 'c655392d87b67af8331c7d2a8cdda4b5', - './include/javascript/tiny_mce/plugins/table/row.htm' => '3a44d6da2354b63f96ce6fc1ebb9ce25', - './include/javascript/tiny_mce/plugins/table/merge_cells.htm' => '031d824351b82c36fba89fadabb38951', - './include/javascript/tiny_mce/plugins/table/langs/en_dlg.js' => '15e65841dce0729b82812f84753fb529', - './include/javascript/tiny_mce/plugins/table/js/table.js' => '449a03ea6b9b5a738c294665fdd3a85e', - './include/javascript/tiny_mce/plugins/table/js/row.js' => '727574d09d5158bcccada83601bd4e46', - './include/javascript/tiny_mce/plugins/table/js/merge_cells.js' => 'a1c44cc854082e3d4f4824ff06cee170', - './include/javascript/tiny_mce/plugins/table/js/cell.js' => 'bad736ef8478a61a6e1b5316b4bd561e', - './include/javascript/tiny_mce/plugins/table/editor_plugin_src.js' => '72247df7a8c8b4ce6ad4797c0d5e3d30', - './include/javascript/tiny_mce/plugins/table/editor_plugin.js' => 'aa25f98e7fc772c84c3a5e822417c781', + './include/javascript/tiny_mce/plugins/table/table.htm' => 'e68e146f8a82860f6c2ffd2b819ff558', + './include/javascript/tiny_mce/plugins/table/row.htm' => 'de747b50d5ff435e55edd22d5797cf6b', + './include/javascript/tiny_mce/plugins/table/merge_cells.htm' => 'dc31115bca49b510776c1a0c0d5360d1', + './include/javascript/tiny_mce/plugins/table/langs/en_dlg.js' => 'c4ffe3b0c872faab1502455cae552c31', + './include/javascript/tiny_mce/plugins/table/js/table.js' => 'c8310fd7ec9a8f6d1d9ec1405e5876b5', + './include/javascript/tiny_mce/plugins/table/js/row.js' => '40aa38fa924e98c03bab1660a115996c', + './include/javascript/tiny_mce/plugins/table/js/merge_cells.js' => '7f9655fcf059c80b83f62569a97b3d79', + './include/javascript/tiny_mce/plugins/table/js/cell.js' => '06c2099baa7ba9f4c79b2df60a9716be', + './include/javascript/tiny_mce/plugins/table/editor_plugin_src.js' => '289f0d9c3b4a62d8b4c3b97f1b51efcf', + './include/javascript/tiny_mce/plugins/table/editor_plugin.js' => '11ada8e59950533b386f5bd8f01c94c6', './include/javascript/tiny_mce/plugins/table/css/table.css' => '541baebf7d11536dd4d31d6383e2d22d', './include/javascript/tiny_mce/plugins/table/css/row.css' => 'fcb6c71f2226f482a0ac9e48494ca87b', './include/javascript/tiny_mce/plugins/table/css/cell.css' => '4662497b8afb4b1c32eae399d37073e8', - './include/javascript/tiny_mce/plugins/table/cell.htm' => '31736b89077edd83afd52ffab4a8a83a', - './include/javascript/tiny_mce/plugins/style/props.htm' => 'd4e3d92f757881513ad4200472b1e87c', - './include/javascript/tiny_mce/plugins/style/langs/en_dlg.js' => '62b2b463ed9cf072aa8e7d09428287aa', - './include/javascript/tiny_mce/plugins/style/js/props.js' => '98186487c1acc6febb4fb0cb76bb9bfa', - './include/javascript/tiny_mce/plugins/style/editor_plugin_src.js' => '6a030e35ef8b6409ceb92c38556152db', - './include/javascript/tiny_mce/plugins/style/editor_plugin.js' => 'a33cf070cce70e0aaa4dd395366d9911', + './include/javascript/tiny_mce/plugins/table/cell.htm' => 'bcbb2c7f052d57c09de52cdd2ea54f26', + './include/javascript/tiny_mce/plugins/style/props.htm' => '95402f155b275eff21e943d6c458f80a', + './include/javascript/tiny_mce/plugins/style/langs/en_dlg.js' => 'e5f56dfa82012be44d30960f8184f29f', + './include/javascript/tiny_mce/plugins/style/js/props.js' => '57a87b76e6f964abd3834b8004776726', + './include/javascript/tiny_mce/plugins/style/editor_plugin_src.js' => '29ccef7224dc5208ebb456b426717a4a', + './include/javascript/tiny_mce/plugins/style/editor_plugin.js' => 'ac96cb192e649f92a42b9ce339092008', './include/javascript/tiny_mce/plugins/style/css/props.css' => 'd1a2f4faed2da4947a309f32d912968a', './include/javascript/tiny_mce/plugins/spellchecker/img/wline.gif' => 'c136c9f8e00718a98947a21d8adbcc56', - './include/javascript/tiny_mce/plugins/spellchecker/editor_plugin_src.js' => '849d4a2113fdecc2685fb896d65dcdca', - './include/javascript/tiny_mce/plugins/spellchecker/editor_plugin.js' => 'aed898ab6ffa523d8967696445630198', + './include/javascript/tiny_mce/plugins/spellchecker/editor_plugin_src.js' => 'adc3232ee6b50543563afda8aaa4a3d1', + './include/javascript/tiny_mce/plugins/spellchecker/editor_plugin.js' => '97e2cf10a3e4e3fe74f9aaf06d62eb8d', './include/javascript/tiny_mce/plugins/spellchecker/css/content.css' => 'd236d4333281b4eae7a1e2b514b691f4', - './include/javascript/tiny_mce/plugins/searchreplace/searchreplace.htm' => 'ae3fd1271c4d96722acbe34a10e43dc2', + './include/javascript/tiny_mce/plugins/searchreplace/searchreplace.htm' => '5dfa098e68c1da6de9bedcb817322c58', './include/javascript/tiny_mce/plugins/searchreplace/langs/en_dlg.js' => '8d4507bdc22c3d39fa0b1537172c8af3', - './include/javascript/tiny_mce/plugins/searchreplace/js/searchreplace.js' => '6fbb74616637579241653a12e3a9219f', - './include/javascript/tiny_mce/plugins/searchreplace/editor_plugin_src.js' => '5275f11680d34249afb562eb123c3957', - './include/javascript/tiny_mce/plugins/searchreplace/editor_plugin.js' => '3154c3cb319e9dd9c5994ae7125ad4f2', + './include/javascript/tiny_mce/plugins/searchreplace/js/searchreplace.js' => '1f9ff132fca28efda7cadb6e81ad2e94', + './include/javascript/tiny_mce/plugins/searchreplace/editor_plugin_src.js' => '878114df719bb15ab36e7a9e9d460410', + './include/javascript/tiny_mce/plugins/searchreplace/editor_plugin.js' => 'ed4f1fa6e12844b533c86258647a298f', './include/javascript/tiny_mce/plugins/searchreplace/css/searchreplace.css' => 'd4f8026713b4f1394d9977196a9de1bd', - './include/javascript/tiny_mce/plugins/save/editor_plugin_src.js' => 'd6f8bb16c56f49e1dfb5b711b10fc7df', - './include/javascript/tiny_mce/plugins/save/editor_plugin.js' => 'b9cc817b9e834924aca4af95b3d0c1bf', - './include/javascript/tiny_mce/plugins/safari/editor_plugin_src.js' => 'd203cbb96fd7eee16254a2997efd67c9', - './include/javascript/tiny_mce/plugins/safari/editor_plugin.js' => '9d7a37a26a6773ae236ed7a75f4617da', - './include/javascript/tiny_mce/plugins/safari/blank.htm' => 'c9a4909a579f24cd23fc0ae847e06241', - './include/javascript/tiny_mce/plugins/print/editor_plugin_src.js' => '2891244215e0e9229d0286308408f50b', - './include/javascript/tiny_mce/plugins/print/editor_plugin.js' => '6557fd2bd935aefa392ba71679edbebe', - './include/javascript/tiny_mce/plugins/preview/preview.html' => '1ee9766ccdeb6a63dc55ff3b6b53186a', + './include/javascript/tiny_mce/plugins/save/editor_plugin_src.js' => '54c757ce6c730afc71d6ac0ecd76e6dd', + './include/javascript/tiny_mce/plugins/save/editor_plugin.js' => '307a0743c68c4e4aff005f13027f296f', + './include/javascript/tiny_mce/plugins/autolink/editor_plugin_src.js' => 'cd5b1a8d13d1daaf3851288972ed5ae6', + './include/javascript/tiny_mce/plugins/autolink/editor_plugin.js' => '0da6035373d2c056b5a4d79cfd40ab62', + './include/javascript/tiny_mce/plugins/print/editor_plugin_src.js' => '076722d31a5b000bac61bceaed6e5a66', + './include/javascript/tiny_mce/plugins/print/editor_plugin.js' => '53eb1da78f727ee8337671fb86354c17', + './include/javascript/tiny_mce/plugins/preview/preview.html' => 'bdf3f8f72e85d64bf8bb98d37435aaab', './include/javascript/tiny_mce/plugins/preview/jscripts/embed.js' => '5df3783492b848adde42124a1e9cf383', './include/javascript/tiny_mce/plugins/preview/example.html' => 'f6ae5a579ef4ef3b8648329395e6d0de', - './include/javascript/tiny_mce/plugins/preview/editor_plugin_src.js' => '825fe1643314038a2c3a2c0518a2898d', - './include/javascript/tiny_mce/plugins/preview/editor_plugin.js' => '7bcbf12854d82cd45f7b4a9ec17f7391', - './include/javascript/tiny_mce/plugins/paste/css/pasteword.css' => '2042313f6628ef2b742c74aba0fd9b60', - './include/javascript/tiny_mce/plugins/paste/css/blank.css' => 'c15c875a4c54efa8554bca63aee6ecb9', - './include/javascript/tiny_mce/plugins/paste/blank.htm' => '88783f6e539184616896268bca04c25e', - './include/javascript/tiny_mce/plugins/paste/pasteword.htm' => 'ce42817c01ddd922c3f1c5c9701c0036', + './include/javascript/tiny_mce/plugins/preview/editor_plugin_src.js' => '6f9c3234dfdc0f62b713e8771f4ca5dc', + './include/javascript/tiny_mce/plugins/preview/editor_plugin.js' => '925216b63aabd5adc67d642ca2d04b4a', + './include/javascript/tiny_mce/plugins/paste/pasteword.htm' => '152c6cb86eb58abecb6c9e4ba099cfc1', './include/javascript/tiny_mce/plugins/paste/langs/en_dlg.js' => 'e5cf25d2ec374f911c7d009a19fa5474', - './include/javascript/tiny_mce/plugins/paste/js/pasteword.js' => '7f69babced989fb799e0f7a617441c71', - './include/javascript/tiny_mce/plugins/paste/js/pastetext.js' => '05482c276313c900e2a2b55508712b13', - './include/javascript/tiny_mce/plugins/paste/pastetext.htm' => 'a83b2f9eb0861b1bd5db22e57da4280d', - './include/javascript/tiny_mce/plugins/paste/editor_plugin_src.js' => '7744bd032e98df4fe576a68418241008', - './include/javascript/tiny_mce/plugins/paste/editor_plugin.js' => '5b145b1c56b55c90b4aea900fce25880', - './include/javascript/tiny_mce/plugins/pagebreak/img/trans.gif' => '12bf9e19374920de3146a64775f46a5e', - './include/javascript/tiny_mce/plugins/pagebreak/img/pagebreak.gif' => '48872075f721bf57a517e3275d61c0ba', - './include/javascript/tiny_mce/plugins/pagebreak/css/content.css' => 'd9664762a610f2b5f7b10b5781f3299a', - './include/javascript/tiny_mce/plugins/pagebreak/editor_plugin_src.js' => '8df9dc2e60f32b9429b592d3545f9bf5', - './include/javascript/tiny_mce/plugins/pagebreak/editor_plugin.js' => 'a1c5a59a36f772bc526411a9c8e74c63', - './include/javascript/tiny_mce/plugins/noneditable/editor_plugin_src.js' => '62077ede3d5f9a404297ef3f73e0a4a5', - './include/javascript/tiny_mce/plugins/noneditable/editor_plugin.js' => 'f305bdb3dbef3b880e69c48dfa4e40f4', - './include/javascript/tiny_mce/plugins/nonbreaking/editor_plugin_src.js' => 'c15a04691f8463cb0232e23f317a6b82', - './include/javascript/tiny_mce/plugins/nonbreaking/editor_plugin.js' => '9374e65064dfda87e93cd0163f236e5e', - './include/javascript/tiny_mce/plugins/media/media.htm' => '1f101c10c8c369f4466e95724148d454', - './include/javascript/tiny_mce/plugins/media/langs/en_dlg.js' => '26a49066e61ae69b5f837505afdea871', - './include/javascript/tiny_mce/plugins/media/js/media.js' => '1e782a443c073b57897597a0720e2a82', + './include/javascript/tiny_mce/plugins/paste/js/pasteword.js' => '10f73efbf570633989e2801d0b10de4f', + './include/javascript/tiny_mce/plugins/paste/js/pastetext.js' => '69ba0c60f23785b0c60e56b1919e53fa', + './include/javascript/tiny_mce/plugins/paste/pastetext.htm' => '9b66a9a84428df3ebe11f5755b2420a1', + './include/javascript/tiny_mce/plugins/paste/editor_plugin_src.js' => '71e111576b9a1ca629007d5193b420e9', + './include/javascript/tiny_mce/plugins/paste/editor_plugin.js' => '55ff6649d76ef9f00ab07bd042c04080', + './include/javascript/tiny_mce/plugins/pagebreak/editor_plugin_src.js' => 'cbf8613d428981a4e4cee9bb9f86d53f', + './include/javascript/tiny_mce/plugins/pagebreak/editor_plugin.js' => '8be3376740c886fa2842d2f4eb282bbc', + './include/javascript/tiny_mce/plugins/noneditable/editor_plugin_src.js' => '62e42788368a2d10016568d51ee7f6cd', + './include/javascript/tiny_mce/plugins/noneditable/editor_plugin.js' => '612e691643a885cfe3d8d94fe0a85a63', + './include/javascript/tiny_mce/plugins/nonbreaking/editor_plugin_src.js' => 'ae653dd9e575fe8ded21c95b91119e08', + './include/javascript/tiny_mce/plugins/nonbreaking/editor_plugin.js' => '3d86f6d2f8a9d5322c81ac6cfaccd379', + './include/javascript/tiny_mce/plugins/media/moxieplayer.swf' => '534258f2d5d40b3b683940d19f585695', + './include/javascript/tiny_mce/plugins/media/media.htm' => 'fa045b93b608e4c4ee04ede933d21585', + './include/javascript/tiny_mce/plugins/media/langs/en_dlg.js' => 'e7a1f144f398ce2d0e7eff680b8013e2', + './include/javascript/tiny_mce/plugins/media/js/media.js' => 'ebb309bfaa19a8b3c0e9051cc3e73df9', './include/javascript/tiny_mce/plugins/media/js/embed.js' => '5df3783492b848adde42124a1e9cf383', - './include/javascript/tiny_mce/plugins/media/img/windowsmedia.gif' => 'c327cd167b3a7bc263d908b0d0154ead', - './include/javascript/tiny_mce/plugins/media/img/trans.gif' => '12bf9e19374920de3146a64775f46a5e', - './include/javascript/tiny_mce/plugins/media/img/shockwave.gif' => 'baa643b587565755157618032dc93e3c', - './include/javascript/tiny_mce/plugins/media/img/realmedia.gif' => 'b9734ee16d790e67bea01046feba28b7', - './include/javascript/tiny_mce/plugins/media/img/quicktime.gif' => '9a6a9fdead205b125c07ea37e71ed4f1', - './include/javascript/tiny_mce/plugins/media/img/flv_player.swf' => 'fe011e9725b2722b59bb8ef4991bf6bb', - './include/javascript/tiny_mce/plugins/media/img/flash.gif' => '6c69b02015d09280332ff8b07e4ea2f3', - './include/javascript/tiny_mce/plugins/media/editor_plugin_src.js' => 'ce9e21974624ae9aab32d2e3778bb443', - './include/javascript/tiny_mce/plugins/media/editor_plugin.js' => '9beecec5d5cbdc86bee17eadc0f5a545', - './include/javascript/tiny_mce/plugins/media/css/content.css' => 'ebcad73e7f6785a308328129aa90d5cb', - './include/javascript/tiny_mce/plugins/media/css/media.css' => '51795abbefc981b9f77083afd672a495', - './include/javascript/tiny_mce/plugins/layer/editor_plugin_src.js' => '5bf57b578756d293cf9be7845264158c', - './include/javascript/tiny_mce/plugins/layer/editor_plugin.js' => '67ea96e3d63b98215b64435bb9ea06d9', - './include/javascript/tiny_mce/plugins/insertdatetime/editor_plugin_src.js' => 'cee2d9a9ed09e51627350510b4f59b92', - './include/javascript/tiny_mce/plugins/insertdatetime/editor_plugin.js' => '0fba6e5bec7725b88b910721f1ba17a7', + './include/javascript/tiny_mce/plugins/media/editor_plugin_src.js' => '6c5ce5ddb573c9e2bc14748f593a818b', + './include/javascript/tiny_mce/plugins/media/editor_plugin.js' => 'cc97fbc2bc892884a3fc3e3cab3b9aba', + './include/javascript/tiny_mce/plugins/media/css/media.css' => '4e29dd1bf318a62f0b5d39dc610e5f82', + './include/javascript/tiny_mce/plugins/layer/editor_plugin_src.js' => 'a9375294cf08b14bc2c15ef2665b7f89', + './include/javascript/tiny_mce/plugins/layer/editor_plugin.js' => 'aa18f0b94f95a1ec29d86f6578ad4e4b', + './include/javascript/tiny_mce/plugins/insertdatetime/editor_plugin_src.js' => '5168ca34206e986ba5508ea07d109e1e', + './include/javascript/tiny_mce/plugins/insertdatetime/editor_plugin.js' => 'd99072498466cdb2f53ed7c02da85982', './include/javascript/tiny_mce/plugins/inlinepopups/template.htm' => 'c01f15cd357d8dba4610c3eae6321930', - './include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css' => '5e33280ecbcbc97d23f44ba1d23b578a', + './include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css' => 'f715affab9da63bc26f8c6362a989395', './include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif' => '193884a332e91059643448ed4bde2e04', './include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif' => '0365e75dd4a9ad61dc98dcb641207c21', './include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif' => '2e89a17a473f0e488f3e789ce998f064', @@ -4575,26 +5777,26 @@ $md5_string = array ( './include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif' => '1743ac9f7f2267a6edafefc536a2265d', './include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif' => '9e911a2c3cb4720d44844ef2d1832a51', './include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif' => '56646a5e811547c8bc3d1b9790496b89', - './include/javascript/tiny_mce/plugins/inlinepopups/editor_plugin_src.js' => '8b90c63f48655787e47151ec44be119a', - './include/javascript/tiny_mce/plugins/inlinepopups/editor_plugin.js' => 'a7b58f0ddb0e55f591c00f06e21ada67', - './include/javascript/tiny_mce/plugins/iespell/editor_plugin_src.js' => 'bd46ad6daae27f6c9e7e7921386e1945', - './include/javascript/tiny_mce/plugins/iespell/editor_plugin.js' => 'e4e460c920b31b94153caacbf170851d', - './include/javascript/tiny_mce/plugins/fullscreen/fullscreen.htm' => '109958d17d54b93b827796c1a3bf0629', - './include/javascript/tiny_mce/plugins/fullscreen/editor_plugin_src.js' => 'e14f7ae502989882514d6c95fcb3c733', - './include/javascript/tiny_mce/plugins/fullscreen/editor_plugin.js' => 'd1ef8dc9ab08b7a58c5d96a56145ab4e', + './include/javascript/tiny_mce/plugins/inlinepopups/editor_plugin_src.js' => '2d2a2d837d41a86d0fd9bcd311611da4', + './include/javascript/tiny_mce/plugins/inlinepopups/editor_plugin.js' => '89c9d4511cd7b90c00fdd9aa30c3bc18', + './include/javascript/tiny_mce/plugins/iespell/editor_plugin_src.js' => '6197421bd9a75291fa89a245fdca5f47', + './include/javascript/tiny_mce/plugins/iespell/editor_plugin.js' => '22526393cacb6447a0e3bfff2fb47773', + './include/javascript/tiny_mce/plugins/fullscreen/fullscreen.htm' => '1d600fb6d9d3861a71fc80cf75797d35', + './include/javascript/tiny_mce/plugins/fullscreen/editor_plugin_src.js' => '62ef6c2178089a60c44ba35d4954ce4e', + './include/javascript/tiny_mce/plugins/fullscreen/editor_plugin.js' => '850959bac9b9257f66817c94fa35df27', './include/javascript/tiny_mce/plugins/fullpage/langs/en_dlg.js' => '785c97d3367c6d1e38ef0992b1353bdf', - './include/javascript/tiny_mce/plugins/fullpage/js/fullpage.js' => 'e8068fa9708f9457d4d1ee62ae7b13dc', - './include/javascript/tiny_mce/plugins/fullpage/fullpage.htm' => 'a035917ad7ab45825b1aa44ceebc084c', - './include/javascript/tiny_mce/plugins/fullpage/editor_plugin_src.js' => '3da0187e0e166ffd1cee9d09c3449fbb', - './include/javascript/tiny_mce/plugins/fullpage/editor_plugin.js' => '91acc45c66aaf73e58318072ff1bc7cd', - './include/javascript/tiny_mce/plugins/fullpage/css/fullpage.css' => '5aacff00f15c644c2edda317d39d480e', + './include/javascript/tiny_mce/plugins/fullpage/js/fullpage.js' => '5f153cfd56cf1d8cab34d65660da2f57', + './include/javascript/tiny_mce/plugins/fullpage/fullpage.htm' => '6ec39dccdd79c8b88dd1fa1ee295dbc3', + './include/javascript/tiny_mce/plugins/fullpage/editor_plugin_src.js' => '4e5a388ca0b5eb2a7f500c8cff80a17c', + './include/javascript/tiny_mce/plugins/fullpage/editor_plugin.js' => '76e777c5688d6b81dbf3000768d59a28', + './include/javascript/tiny_mce/plugins/fullpage/css/fullpage.css' => 'dc1d6d399407d4331fb0f8ad4a18dbcd', './include/javascript/tiny_mce/plugins/example/langs/en_dlg.js' => '1edfe310d7cc45357de7093b47c863fd', './include/javascript/tiny_mce/plugins/example/langs/en.js' => 'e3c958c51f74663e53d1fb5fe90c979f', './include/javascript/tiny_mce/plugins/example/js/dialog.js' => 'ff7c6a3db0d905ae655a273b87d42c78', './include/javascript/tiny_mce/plugins/example/img/example.gif' => '6036655a01df362267183a8b23fead10', - './include/javascript/tiny_mce/plugins/example/editor_plugin_src.js' => '6c83458b6d2857adf8855fd24e123195', - './include/javascript/tiny_mce/plugins/example/editor_plugin.js' => '82586c79393ca177140794c465f3719f', - './include/javascript/tiny_mce/plugins/example/dialog.htm' => '2790971b13eb7487d45504f98e574e27', + './include/javascript/tiny_mce/plugins/example/editor_plugin_src.js' => '599a672b9b7832bd9c28ccee2a248f04', + './include/javascript/tiny_mce/plugins/example/editor_plugin.js' => 'e0a175dca3d5e437657ccd5d548ff409', + './include/javascript/tiny_mce/plugins/example/dialog.htm' => '04d219b16b8647710b6769434c3d93a8', './include/javascript/tiny_mce/plugins/emotions/langs/en_dlg.js' => 'f6f80d840918e4bab3cb68fa135bb51b', './include/javascript/tiny_mce/plugins/emotions/js/emotions.js' => '768ed76617dbe7fca0e7394c0f208681', './include/javascript/tiny_mce/plugins/emotions/img/smiley-yell.gif' => '19bb8ebfe3c2f5ef3ffb9aa4a027900d', @@ -4613,45 +5815,46 @@ $md5_string = array ( './include/javascript/tiny_mce/plugins/emotions/img/smiley-embarassed.gif' => 'd59171236e6b0b96091eeda1f7b57ce3', './include/javascript/tiny_mce/plugins/emotions/img/smiley-cry.gif' => 'e72bf995ceca9230273ed9909c5db9c8', './include/javascript/tiny_mce/plugins/emotions/img/smiley-cool.gif' => 'e26e97a318f82ec144b0818e5a8f8edb', - './include/javascript/tiny_mce/plugins/emotions/emotions.htm' => 'df4b3424e331c7146510f61892ca6fa9', - './include/javascript/tiny_mce/plugins/emotions/editor_plugin_src.js' => 'b03aacb7f6d0010ba11cbcf8433327e7', - './include/javascript/tiny_mce/plugins/emotions/editor_plugin.js' => 'fc11ff82324f77c41e1a44c1044d79ff', - './include/javascript/tiny_mce/plugins/directionality/editor_plugin_src.js' => '62860b40fe8fc26a6ba2a6d8777bd3b3', - './include/javascript/tiny_mce/plugins/directionality/editor_plugin.js' => '7713d6e3e2531ea5047b4e2532448d43', - './include/javascript/tiny_mce/plugins/contextmenu/editor_plugin_src.js' => '79844351ba38362467267631cad31e30', - './include/javascript/tiny_mce/plugins/contextmenu/editor_plugin.js' => '47f5b7af1ec73bf958d29045b968cea2', - './include/javascript/tiny_mce/plugins/compat2x/editor_plugin_src.js' => '3f7fe550b6d08203ef20f7f9b75f4493', - './include/javascript/tiny_mce/plugins/compat2x/editor_plugin.js' => 'c3d0aefeb6c5853d66654cc63e7cd3d9', - './include/javascript/tiny_mce/plugins/bbcode/editor_plugin_src.js' => '8ec9b5c2ff78959fa189ebe54376ba78', - './include/javascript/tiny_mce/plugins/bbcode/editor_plugin.js' => '19384072defc93532c0ecb7da2cf8f80', - './include/javascript/tiny_mce/plugins/autosave/editor_plugin_src.js' => '1badd9a8ebfeeeaa4293fac97be6bb66', - './include/javascript/tiny_mce/plugins/autosave/editor_plugin.js' => 'f54e4df3a63237afd7471c95d8484f6e', - './include/javascript/tiny_mce/plugins/advlink/link.htm' => '28b4e8b3b295a9aad181667a71ad5a5a', - './include/javascript/tiny_mce/plugins/advlink/langs/en_dlg.js' => 'a8f914a5c88714aee11eda0d75c98e71', - './include/javascript/tiny_mce/plugins/advlink/js/advlink.js' => 'd27775961d02693ef20d36dd8206c95a', - './include/javascript/tiny_mce/plugins/advlink/editor_plugin_src.js' => '565fc5493ec00039570ac605e3b5f01c', - './include/javascript/tiny_mce/plugins/advlink/editor_plugin.js' => '519f312b12dbc801f5d199f19ea650bb', + './include/javascript/tiny_mce/plugins/emotions/emotions.htm' => '2f2da7994c66bcac7937c7e2b4d98701', + './include/javascript/tiny_mce/plugins/emotions/editor_plugin_src.js' => '11848fa746a3fa7390731389d25c79bb', + './include/javascript/tiny_mce/plugins/emotions/editor_plugin.js' => '98cba02e33fc108024f3e993be0b0b62', + './include/javascript/tiny_mce/plugins/directionality/editor_plugin_src.js' => '7a8992f2005bd63d97c151edb2d67ce9', + './include/javascript/tiny_mce/plugins/directionality/editor_plugin.js' => '653c3a89058b610fd12242faf4f01cdf', + './include/javascript/tiny_mce/plugins/contextmenu/editor_plugin_src.js' => 'e673ce66cc132b08130297b43a0a9e36', + './include/javascript/tiny_mce/plugins/contextmenu/editor_plugin.js' => 'fa1ecaf721b8b15f262c77c9d2f29d44', + './include/javascript/tiny_mce/plugins/advlist/editor_plugin_src.js' => '73ad9780debff16d2f5a3294ca58143b', + './include/javascript/tiny_mce/plugins/advlist/editor_plugin.js' => '480b356c256060464502f0623d00d7cc', + './include/javascript/tiny_mce/plugins/bbcode/editor_plugin_src.js' => 'f0cfc36c75dd1980661319a6a3ffbd41', + './include/javascript/tiny_mce/plugins/bbcode/editor_plugin.js' => '31748a6cc57a13da54a0243c3301f3e6', + './include/javascript/tiny_mce/plugins/autosave/langs/en.js' => '2afbb334b74594f116bbc1d08e7217ba', + './include/javascript/tiny_mce/plugins/autosave/editor_plugin_src.js' => 'e680312cd7d38e17f9844f153746daa6', + './include/javascript/tiny_mce/plugins/autosave/editor_plugin.js' => '8c05a71f06e93cdc4a0b71737160ddaa', + './include/javascript/tiny_mce/plugins/advlink/link.htm' => '5e2308512539037d484d5428082a4589', + './include/javascript/tiny_mce/plugins/advlink/langs/en_dlg.js' => '86025c6595fb49b3cc6f34408baf588d', + './include/javascript/tiny_mce/plugins/advlink/js/advlink.js' => 'c07cda9283ed3186f22a3161193fde2c', + './include/javascript/tiny_mce/plugins/advlink/editor_plugin_src.js' => '879025e024380947a404ae3523347c24', + './include/javascript/tiny_mce/plugins/advlink/editor_plugin.js' => '5e440c6bcb7fd94e7fd597f8a183e16f', './include/javascript/tiny_mce/plugins/advlink/css/advlink.css' => '19558f5e2b7a7d11968aacdc37e6e436', - './include/javascript/tiny_mce/plugins/advimage/langs/en_dlg.js' => '11192eee56b945762dd843279ba34b81', - './include/javascript/tiny_mce/plugins/advimage/js/image.js' => '5d1229957e7e297beb11e5cc931bd636', + './include/javascript/tiny_mce/plugins/advimage/langs/en_dlg.js' => 'da974094779f1ac765c18a11c4d712e4', + './include/javascript/tiny_mce/plugins/advimage/js/image.js' => 'dc0a67431bd013f8c3f70808e3c2ba26', './include/javascript/tiny_mce/plugins/advimage/img/sample.gif' => 'b9c7057c46716340e8967340ad11766e', - './include/javascript/tiny_mce/plugins/advimage/image.htm' => '9c047eccb30c3073ebdf58abb7239a35', - './include/javascript/tiny_mce/plugins/advimage/editor_plugin_src.js' => '83575eef2712b169d8ca3548dc9a7efd', - './include/javascript/tiny_mce/plugins/advimage/editor_plugin.js' => '848ad22a9baff75c57d0d7f645f361ba', + './include/javascript/tiny_mce/plugins/advimage/image.htm' => '7850fe11dac0773c0e2197e0fb87de83', + './include/javascript/tiny_mce/plugins/advimage/editor_plugin_src.js' => 'fad031c4e7c3d5ebe2d326ce9312a37d', + './include/javascript/tiny_mce/plugins/advimage/editor_plugin.js' => '6634dc710b837855baff6d4d3a4f290e', './include/javascript/tiny_mce/plugins/advimage/css/advimage.css' => 'cce2bc7334ac52894124133d62c8d09c', - './include/javascript/tiny_mce/plugins/advhr/rule.htm' => 'c7f2e7569234a4ee4650ecde6d5053ac', - './include/javascript/tiny_mce/plugins/advhr/langs/en_dlg.js' => 'ba874544a2e8a6c07c476a25c48deb16', + './include/javascript/tiny_mce/plugins/advhr/rule.htm' => '2f9aa46095b089e2f6ebad2ffc0a91fd', + './include/javascript/tiny_mce/plugins/advhr/langs/en_dlg.js' => 'e391a69cc61c4e4b53a4d9d5bd802762', './include/javascript/tiny_mce/plugins/advhr/js/rule.js' => '2fa441f1684a33d3ea89bb31cdea1ba5', - './include/javascript/tiny_mce/plugins/advhr/editor_plugin_src.js' => 'e2e474ebf2f1351c85f249fd5c948183', - './include/javascript/tiny_mce/plugins/advhr/editor_plugin.js' => '713492f5963523fcc075d873cccfdacf', + './include/javascript/tiny_mce/plugins/advhr/editor_plugin_src.js' => '985d4e4b24ee2905f89ac670979d9816', + './include/javascript/tiny_mce/plugins/advhr/editor_plugin.js' => 'd0a03059205455e5c19cf3a845a0ebde', './include/javascript/tiny_mce/plugins/advhr/css/advhr.css' => '2d33b4333e29436b2102747f2ee2f395', './include/javascript/tiny_mce/license.txt' => '045d04e17422d99e338da75b9c749b7c', - './include/javascript/tiny_mce/langs/en.js' => '5a1cd3c93501e4f7c75267d5617e7c9a', - './include/javascript/sugarwidgets/SugarYUILoader.js' => 'ed977c9de54032868742930b36ba732f', - './include/javascript/sugarwidgets/SugarYUIWidgets.js' => '771344e3ef80042d0a6fcc069cbd10c8', + './include/javascript/tiny_mce/langs/en.js' => 'df79faa676ad0876ad07b3618ef468a9', + './include/javascript/sugarwidgets/SugarYUILoader.js' => '03e5f141de87cd45e0e44ffc4fc60e78', + './include/javascript/sugarwidgets/SugarYUIWidgets.js' => '75fcc837e971488cb623d134e4a585a2', './include/javascript/jsAlerts.php' => '50f47b26a05a3e41a209691bbc204d30', './include/javascript/javascript.php' => '5e45d53f3ac5326a86042efc38acb999', - './include/javascript/getYUIComboFile.php' => '00a28e99d5fb265903b099df8bfcc45f', + './include/javascript/getYUIComboFile.php' => 'd961ed2c8a1692920b1bf9bbe6cc9884', './include/images/seed_will_id.gif' => '2f106be21d1591fcb91636594eeb1689', './include/images/seed_sarah_id.gif' => 'e2f269d97a3a3f500dff75b770d6c6b1', './include/images/seed_sally_id.gif' => 'cf29cdbd09b88a5f0f8f038b5f6b1db6', @@ -4690,7 +5893,7 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectUsersButton.php' => '5e1402674ccb9c3db535a3627f45836f', './include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectContactsButton.php' => 'b4863f588fa57d44d48bb3226aa62ec0', './include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectButton.php' => '7b5a0c19b6b163427de41b1cb31a6982', - './include/generic/SugarWidgets/SugarWidgetSubPanelTopScheduleMeetingButton.php' => '76da113885b066bd88a707c1099582d6', + './include/generic/SugarWidgets/SugarWidgetSubPanelTopScheduleMeetingButton.php' => '3f0fb7d6136ab89f3b2bdaea84603212', './include/generic/SugarWidgets/SugarWidgetSubPanelTopScheduleCallButton.php' => '2b706da6c89cb59c509f74547a5494dc', './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateTaskButton.php' => 'e6eca9b6c3307b3f1b9398efe4a8ffd2', './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateNoteButton.php' => '0af6c5516be4b0426bc43098dfd5ff4a', @@ -4698,7 +5901,7 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateCampaignLogEntryButton.php' => 'd26f66486c121b664a807625689b9337', './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateAccountNameButton.php' => 'c0e334312940ac4df14233c337ce2249', './include/generic/SugarWidgets/SugarWidgetSubPanelTopComposeEmailButton.php' => 'aedcca5671c18f0bd81a58b3fbddf655', - './include/generic/SugarWidgets/SugarWidgetSubPanelTopButtonQuickCreate.php' => 'e2c00950544c1f49c1a0a1c32ce9bb5f', + './include/generic/SugarWidgets/SugarWidgetSubPanelTopButtonQuickCreate.php' => 'f851bb2972ae86b210ae24d47f7e1e60', './include/generic/SugarWidgets/SugarWidgetSubPanelTopButton.php' => '01ef3b0c348eeaf1b16d0ab294680ff6', './include/generic/SugarWidgets/SugarWidgetSubPanelTopArchiveEmailButton.php' => '39e39d2fe63a6a1f9c726e44d8c76d52', './include/generic/SugarWidgets/SugarWidgetSubPanelRemoveButtonProjects.php' => '747eefd9e49f8bbf00d0b017f397d7d5', @@ -4738,11 +5941,11 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetFieldemail.php' => 'c0f3220ad4123ae1d8307f08a476ee84', './include/generic/SugarWidgets/SugarWidgetFielddouble.php' => '78b80591d1f30667c3ae4ec25711b3e7', './include/generic/SugarWidgets/SugarWidgetFielddecimal.php' => 'a3578ea81adeb5ba4e39998e300753cd', - './include/generic/SugarWidgets/SugarWidgetFielddatetimecombo.php' => '2a164b002b748ecac390b4057c6bc328', + './include/generic/SugarWidgets/SugarWidgetFielddatetimecombo.php' => 'bdb2e2a0a7defcd305f1a09c062f37fa', './include/generic/SugarWidgets/SugarWidgetFielddatetime.php' => '3f38fd47b01da7d82094fea7f3be3a8c', './include/generic/SugarWidgets/SugarWidgetFielddatepicker.php' => '086e5a71312fe06f267e43d37145bf46', './include/generic/SugarWidgets/SugarWidgetFielddate.php' => '64acd7916910cf52758d351e07312353', - './include/generic/SugarWidgets/SugarWidgetFieldcurrency.php' => '9b3eba4c6a33b4753225680a78d3224a', + './include/generic/SugarWidgets/SugarWidgetFieldcurrency.php' => '7a1225b8ab164fc8a2f3a8fffea8abea', './include/generic/SugarWidgets/SugarWidgetFieldchar.php' => '28923530c61913c4a4c9a0f9e3820a54', './include/generic/SugarWidgets/SugarWidgetFieldbool.php' => 'f204856e09e4559462cafd9db01846cc', './include/generic/SugarWidgets/SugarWidgetField.php' => '606c1ac30b3a5f786c4d7c8d3e0e374f', @@ -4767,20 +5970,20 @@ $md5_string = array ( './include/export_utils.php' => '306312d45892f75122cd5965876d0254', './include/entryPoint.php' => 'e25fe49080602ee59180d4ea18e4424f', './include/dir_inc.php' => '7fa525a179288303fb0cc34b89371b62', - './include/database/SqlsrvManager.php' => '659363159024ac1885d50f8a8e3c31e3', './include/database/SqlsrvHelper.php' => '6cf5af120c1644866c0687ba1773d69e', './include/database/PearDatabase.php' => '029e54b3c4a2c9da75bdab75b906232e', - './include/database/MysqliManager.php' => '4b7748362a9ffbd38288cbd8619c0f89', './include/database/MysqliHelper.php' => '8824aa4be4b5946c8a6ad53d55d43adc', - './include/database/MysqlManager.php' => '2fb21197c234df9ffca41ff9ab486a8a', './include/database/MysqlHelper.php' => 'da8cdfc7ed211c2efe150076a5c97f92', - './include/database/MssqlManager.php' => '290f9ae80085ae0ee7c1226316f085c2', './include/database/MssqlHelper.php' => '727598ad9e35def5757640a2818c3c77', - './include/database/FreeTDSManager.php' => '72cca97832b03356146faa2d49a2cbed', './include/database/FreeTDSHelper.php' => '9ae636614787b3c3b81fcaa7a2657c4b', + './include/database/DBHelper.php' => '5156f8c5e4e26056eedbddfd17fdb74b', + './include/database/SqlsrvManager.php' => '659363159024ac1885d50f8a8e3c31e3', + './include/database/MysqliManager.php' => '4b7748362a9ffbd38288cbd8619c0f89', + './include/database/MysqlManager.php' => '2fb21197c234df9ffca41ff9ab486a8a', + './include/database/MssqlManager.php' => '8bb36894e819615ac08d9ea42ae6f713', + './include/database/FreeTDSManager.php' => '72cca97832b03356146faa2d49a2cbed', './include/database/DBManagerFactory.php' => 'dbea844f739891e4bc59806f29775819', './include/database/DBManager.php' => 'e5856bae54b077021258ed8825d3ad72', - './include/database/DBHelper.php' => '5156f8c5e4e26056eedbddfd17fdb74b', './include/controller/Controller.php' => '154eadef52691f5edbbd7b17eb72b406', './include/contextMenus/menuDefs/sugarPerson.php' => '1978579cd6c1b4b54e070f81ddc7a166', './include/contextMenus/menuDefs/sugarObject.php' => 'c89b133cb16a4a1ea664ea79785331c4', @@ -4794,27 +5997,27 @@ $md5_string = array ( './include/connectors/sources/SourceFactory.php' => '8e2a76bda89e905821aee0568cb65fed', './include/connectors/formatters/ext/soap/tpls/default.tpl' => '30ac6e34be2b90079b7fa67e9916439b', './include/connectors/formatters/ext/rest/tpls/default.tpl' => 'a775bb54d09a292b0c3940f30758199a', - './include/connectors/formatters/default/company_detail.js' => '62c406026212be2938803c054d2ef463', + './include/connectors/formatters/default/company_detail.js' => '4f86258219ce39153e74bfc251d841e1', './include/connectors/formatters/default/formatter.php' => '2582c32e38c40c1b478eaeb9c5d92d9d', './include/connectors/formatters/FormatterFactory.php' => '1c5731cea14091e1fbe228d2e475e5fd', './include/connectors/filters/default/filter.php' => 'dc92e54823ec24830c1de4b5140a0c98', './include/connectors/filters/FilterFactory.php' => 'd53cd8955943d64505bb4ecdc91a566a', './include/connectors/component.php' => 'fadbde05bb43c748780f2d435bf506dc', './include/connectors/ConnectorFactory.php' => '2d0e0081aefc3f1f68bd386ef6c525fc', - './include/VarDefHandler/vardef_meta_arrays.php' => '8c8b26f31acce4c2998b9941dcec34e4', + './include/VarDefHandler/vardef_meta_arrays.php' => '72c7c2d7a7f384b8f9c0c8bdc5dad8bc', './include/VarDefHandler/listvardefoverride.php' => '9e156066bd3f24d00b62844589162ab1', './include/VarDefHandler/VarDefHandler.php' => 'ed481a168b11ed8306efdce0725e7b1f', './include/TimeDate.php' => '2bfe3be6536522e4e4a749efe3fda4ac', - './include/TemplateHandler/TemplateHandler.php' => '05efe77a92e9c7faf765ea99bf86f607', + './include/TemplateHandler/TemplateHandler.php' => '9e4ebefacb3c26d214b7d101ed3d5b16', './include/Sugarpdf/sugarpdf_default.php' => '4e61fe9d5cd31ac41acc315423348ff7', './include/Sugarpdf/sugarpdf_config.php' => 'ecd77816c5def7f50b83d7c2336e7adf', './include/Sugarpdf/sugarpdf/sugarpdf.smarty.php' => 'dbe537b77ec1eb13e564269becaae15e', './include/Sugarpdf/SugarpdfHelper.php' => '6b7795bd3c6794e1095cdebe71861927', './include/Sugarpdf/SugarpdfFactory.php' => '0afbd14636df2b285ec74c8852d836ce', - './include/Sugarpdf/Sugarpdf.php' => '399f2890fc07b21019e9352a1a79623a', + './include/Sugarpdf/Sugarpdf.php' => 'bb65ce6b8e936d7cbd10b2f66bcd0ab4', './include/Sugarpdf/FontManager.php' => '2d3b8e82caaa71e278519755dacadc9f', './include/Sugar_Smarty.php' => '7318c3410d439cf41bc59faae6cce89a', - './include/SugarTinyMCE.php' => 'd7c113e189d234a0e76b0b184463476b', + './include/SugarTinyMCE.php' => '2cf04b4dca0e7c5f258f0b9d6745a0fb', './include/SugarTheme/getImage.php' => '7c0d2c11813933c7d51de8032cbed53f', './include/SugarTheme/cssmin.php' => '05384ba957435def09368425e4480688', './include/SugarTheme/SugarTheme.php' => '462c527cd74ba2195704743ef8387859', @@ -4868,7 +6071,7 @@ $md5_string = array ( './include/SugarObjects/templates/person/icons/person.gif' => 'ea5e2b2022166291d01ccedaf24b4e33', './include/SugarObjects/templates/person/icons/Createperson.gif' => '2e20692d501b15729294b80f4f311d77', './include/SugarObjects/templates/person/config.php' => 'ade871c96f0a91be8b4b27a06c280d33', - './include/SugarObjects/templates/person/Person.php' => '526febbc58f7ba18ddee8130925ea508', + './include/SugarObjects/templates/person/Person.php' => 'abe4936804e3a8a7a83cebb32e7c828a', './include/SugarObjects/templates/issue/vardefs.php' => '9bd9c6c69cd4833ce5bb3713e0eb7d0b', './include/SugarObjects/templates/issue/metadata/subpanels/default.php' => 'c4ad08eb6c1a932e1a26fc844def6b5e', './include/SugarObjects/templates/issue/metadata/searchdefs.php' => '8b387defff2b8da8873d8201281a7357', @@ -4891,10 +6094,10 @@ $md5_string = array ( './include/SugarObjects/templates/file/vardefs.php' => 'e84fc8b69f07435478228715a06a5cba', './include/SugarObjects/templates/file/metadata/subpanels/default.php' => 'dd9fa46c03bcd7e6b11fd34e08d6e462', './include/SugarObjects/templates/file/metadata/searchdefs.php' => '7160ba30d43ad69e3ffbcae530ef3fba', - './include/SugarObjects/templates/file/metadata/quickcreatedefs.php' => '3b8a2aedace4f3f94faa1752f4e4115f', + './include/SugarObjects/templates/file/metadata/quickcreatedefs.php' => 'a9bfc0f4a6b648ff7b67131337d2869a', './include/SugarObjects/templates/file/metadata/metafiles.php' => '17dbfa2325155639daf1d28a1852eaf0', './include/SugarObjects/templates/file/metadata/listviewdefs.php' => 'b2280ffff29fff1b7f98abbb0cf2a3a2', - './include/SugarObjects/templates/file/metadata/editviewdefs.php' => '36d1bf47ceb3bb9727be61a0576b79f0', + './include/SugarObjects/templates/file/metadata/editviewdefs.php' => '5460e696f459cb4acc996d4270364c8d', './include/SugarObjects/templates/file/metadata/detailviewdefs.php' => '20ee6b33b104fefab4616e438e2e5484', './include/SugarObjects/templates/file/metadata/dashletviewdefs.php' => '8a986c14d5e1bd2c2d07f8ab68f3e421', './include/SugarObjects/templates/file/metadata/SearchFields.php' => '5df61e336c1474863ceae4e28e83f52c', @@ -4992,9 +6195,9 @@ $md5_string = array ( './include/SugarFields/Fields/Text/EditView.tpl' => '54cc0715c3b0814a92a04d6c86f1602c', './include/SugarFields/Fields/Text/DetailView.tpl' => 'd068de082c81d4fef6801093e3365de9', './include/SugarFields/Fields/Text/ClassicEditView.tpl' => '6ddfbc834a3962bdf07a328b2eba147a', - './include/SugarFields/Fields/Relate/SugarFieldRelate.php' => 'b3cc6acbe2f233643afe5f0d05e08f5f', + './include/SugarFields/Fields/Relate/SugarFieldRelate.php' => '73fb031df1ccbef0c583a9ddd7e8276c', './include/SugarFields/Fields/Relate/SearchView.tpl' => 'ad010432f43f13ad201639cb6f8fb338', - './include/SugarFields/Fields/Relate/EditView.tpl' => '73b4f38dda5e849c6a77315657b40dc9', + './include/SugarFields/Fields/Relate/EditView.tpl' => '1b169d23d4be3ec144dea0ad642dd9be', './include/SugarFields/Fields/Relate/DetailView.tpl' => 'e4853db1a2b8b80081d27a26e4e4a39f', './include/SugarFields/Fields/Readonly/SugarFieldReadonly.php' => '15cc02846154744f83908e9c141e284f', './include/SugarFields/Fields/Radioenum/EditView.tpl' => '3a702fdbbae1aadccf766091ec8fc15e', @@ -5032,7 +6235,7 @@ $md5_string = array ( './include/SugarFields/Fields/Float/SugarFieldFloat.php' => '2e986db8221d8381094a0cfc55b37c3f', './include/SugarFields/Fields/Float/EditView.tpl' => '2d68a06fdf2c1e032fc144905af33437', './include/SugarFields/Fields/Float/DetailView.tpl' => '82f280a7d4e3f74d2ab0cd481021fe3d', - './include/SugarFields/Fields/File/SugarFieldFile.js' => 'b35d39bce43f628045258360754a7911', + './include/SugarFields/Fields/File/SugarFieldFile.js' => '5c9fa7cb03a5604274afb542df08ae5b', './include/SugarFields/Fields/File/SearchView.tpl' => '3caa8a3b0a97a20169c404260788879f', './include/SugarFields/Fields/File/ListView.tpl' => 'd747a01d5b25abb348c51f7bd0154403', './include/SugarFields/Fields/File/SugarFieldFile.php' => 'f6bc4adb18ef8b53f4361f366dc7fb33', @@ -5046,7 +6249,7 @@ $md5_string = array ( './include/SugarFields/Fields/Enum/DetailView.tpl' => 'fd55bc8637d079f14265f306b67a33ec', './include/SugarFields/Fields/Download/SugarFieldDownload.php' => '907d0ca6f2c055bf2149e47fbf9f83b4', './include/SugarFields/Fields/Download/DetailView.tpl' => '44c0836bf7b5773eafa4589e3fae2efa', - './include/SugarFields/Fields/Datetimecombo/Datetimecombo.js' => '35c592e6d9b005a72c1c8e843b91af64', + './include/SugarFields/Fields/Datetimecombo/Datetimecombo.js' => '398f36efbd6f4845fe9e07dab6f1e92b', './include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl' => '0edf06f50d83a4d226a897d25a1de4ce', './include/SugarFields/Fields/Datetimecombo/SugarFieldDatetimecombo.php' => 'cb5c2d07cddab8ba2afc1bad8f0de12a', './include/SugarFields/Fields/Datetimecombo/SearchView.tpl' => '22ec532f10029bdce93941b602c8b4f0', @@ -5057,14 +6260,14 @@ $md5_string = array ( './include/SugarFields/Fields/Currency/ListView.tpl' => 'c62e2997785bf58a314576d5a69fb6f9', './include/SugarFields/Fields/Currency/EditView.tpl' => 'df0a9a55388c72e731733fa6744569f9', './include/SugarFields/Fields/Currency/DetailView.tpl' => '07b10accc2d817376b207b935182c60b', - './include/SugarFields/Fields/Collection/SugarFieldCollection.js' => '2af30a1d9152c09b47c7549f817d98be', + './include/SugarFields/Fields/Collection/SugarFieldCollection.js' => '5ffc9d59b804433cc7eb773ccb74c2de', './include/SugarFields/Fields/Collection/view.sugarfieldcollection.php' => '626c0b184463b413735031b6c051db97', - './include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php' => 'e8aba5a28ed899deff195b0f1d7b413f', + './include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php' => '56b0ef3f9afff5f97e31d3b897bbe681', './include/SugarFields/Fields/Collection/SugarFieldCollection.php' => 'bd1b5641e51667726ff658a4c7833732', - './include/SugarFields/Fields/Collection/EditView.tpl' => '45349bf1c932fce030a1324a087ab949', - './include/SugarFields/Fields/Collection/DetailView.tpl' => '61608ee9c8fb18e5d0d7d4b4c4eb1208', + './include/SugarFields/Fields/Collection/EditView.tpl' => '1ca2398320a3fe8f51d974019df19ed2', + './include/SugarFields/Fields/Collection/DetailView.tpl' => 'fa2784ef38833e7e6acf31343b585fd9', './include/SugarFields/Fields/Collection/CollectionEditViewRow.tpl' => '34312f762b8a8f6be6ad22a65a728a16', - './include/SugarFields/Fields/Collection/CollectionEditView.tpl' => '63219868d64f925e9dfe00d8ebe3bdc1', + './include/SugarFields/Fields/Collection/CollectionEditView.tpl' => '2990c6d504dd9b1a83959f37628ccd63', './include/SugarFields/Fields/Collection/CollectionDetailView.tpl' => '524e804644d30f07a97a7e62cabe3ed4', './include/SugarFields/Fields/Bool/SugarFieldBool.php' => '195dc6056fe92ab757b9828d0d273bcd', './include/SugarFields/Fields/Bool/SearchView.tpl' => 'ff86c0b0a77e58931d2d90d2ccb0bd1c', @@ -5086,20 +6289,20 @@ $md5_string = array ( './include/SugarFields/Fields/Assigned_user_name/EditViewFunction.tpl' => '0243dbbc42d8cf8658348a75c5984455', './include/SugarFields/Fields/Assigned_user_name/SugarFieldAssigned_user_name.php' => '8ea7a5b1140ad70dab428554a7e81687', './include/SugarFields/Fields/Assigned_user_name/SearchView.tpl' => '2218c7abf088c72b38cdf7c5904392b4', - './include/SugarFields/Fields/Address/SugarFieldAddress.js' => 'fcf375f143e2a6695148611895b55bfd', + './include/SugarFields/Fields/Address/SugarFieldAddress.js' => 'b2ee11d877f46a9daf5853f7296afe6e', './include/SugarFields/Fields/Address/en_us.EditView.tpl' => '40eaefd79f8905ebdf00a50c70ba584d', './include/SugarFields/Fields/Address/en_us.DetailView.tpl' => '180780c24b5be8a4fa53253ef6235d5e', './include/SugarFields/Fields/Address/SugarFieldAddress.php' => '7e7b54a4d6e4b3ba10fb8815b7d9c9d6', './include/SugarFields/Fields/Address/EditView.tpl' => '40eaefd79f8905ebdf00a50c70ba584d', './include/SugarFields/Fields/Address/DetailView.tpl' => 'c988796dbaedffe8575a131f74564857', - './include/SugarEmailAddress/SugarEmailAddress.js' => '5a816d7a2ec4deb972e7264e6851a0d7', + './include/SugarEmailAddress/SugarEmailAddress.js' => '0f23e3cb81fd179a58808f826ab0290f', './include/SugarEmailAddress/templates/forWideFormBodyView.tpl' => 'efe15e918b67fd104ecd8fd0c2f73d51', './include/SugarEmailAddress/templates/forEditView.tpl' => 'eb5333b8735f14017df0d04ded51a009', './include/SugarEmailAddress/templates/forDuplicatesView.tpl' => '48529a015533cdd2ce8db08a826dd09c', './include/SugarEmailAddress/templates/forDetailView.tpl' => '75be62dc812205b17178d2aebecd2f19', './include/SugarEmailAddress/SugarEmailAddress.php' => '41a1050b9e16c0bd648fe322c3912b53', './include/SugarDependentDropdown/metadata/dependentDropdown.php' => 'ef0d061a5bfb5641e65f55560213e209', - './include/SugarDependentDropdown/javascript/SugarDependentDropdown.js' => '7da3a3617d9a8a841f15089b80d92a9d', + './include/SugarDependentDropdown/javascript/SugarDependentDropdown.js' => '480bc0db43abac0ec4ddcde0db5f1014', './include/SugarDependentDropdown/SugarDependentDropdown.php' => 'c27f9273801a6686f233b4ed1100b369', './include/SugarCharts/swf/barChart.swf' => 'e024c31bfcaa90fa3a54809a8c65861c', './include/SugarCharts/swf/chart.swf' => 'afda6fe91342c4864d1991d3c1ccbfff', @@ -5113,19 +6316,19 @@ $md5_string = array ( './include/SugarCharts/JsChart.php' => '05f53698530fa26980b46fcf38ea39e0', './include/SugarCharts/Jit/tpls/chart.tpl' => 'e224555cacd075ed49e115b7b6d0049e', './include/SugarCharts/Jit/tpls/DashletGenericChartScript.tpl' => '5197cef3a47d67ee627e15446d287a46', - './include/SugarCharts/Jit/js/mySugarCharts.js' => '180f2b7c4859432a426a2be5629fd985', - './include/SugarCharts/Jit/js/sugarCharts.js' => '121053f6b356fb4c63e13f0e3c971416', - './include/SugarCharts/Jit/js/Jit/jit.js' => 'd326f248c3c5023fa760af94674a4d6f', + './include/SugarCharts/Jit/js/mySugarCharts.js' => 'b92c7d2fe293381b04c894fcd7e66803', + './include/SugarCharts/Jit/js/sugarCharts.js' => 'bdbe8bcc33b0571424c2dccac218fff5', + './include/SugarCharts/Jit/js/Jit/jit.js' => 'f9974c8073e97bfd567ef06da4d498cb', './include/SugarCharts/Jit/css/base.css' => '775352bc541e0480ba0c5c03f0c4c56a', './include/SugarCharts/Jit/JitReports.php' => '4578c83c6260d80a1f9e641b48501625', './include/SugarCharts/Jit/Jit.php' => '38d283b800042e0764f930ce43e8879d', - './include/SugarCharts/Jit/FlashCanvas/canvas2png.js' => '71a23466955e17ab3094233fee8db708', - './include/SugarCharts/Jit/FlashCanvas/flashcanvas.js' => '8bc523ae2dce6eb2d191cbb561a218b5', + './include/SugarCharts/Jit/FlashCanvas/canvas2png.js' => '798a1cd52de13f7a2efc0e341aa75ab3', + './include/SugarCharts/Jit/FlashCanvas/flashcanvas.js' => 'b18d4e7c945e2d63ae1045a2739f20e8', './include/SugarCharts/Jit/FlashCanvas/save.php' => 'b128689255043db993d1cc2f4bc484bc', './include/SugarCharts/Jit/FlashCanvas/proxy.php' => '82ccbc7400b0bda3a33316920de41e60', './include/SugarCharts/Jit/FlashCanvas/flashcanvas.swf' => '528d82bb81799f23d4def3425badf913', './include/SugarCharts/SugarChart.php' => 'be5b1aa1f8caa8fa0e41f4bcd06ead77', - './include/SubPanel/SubPanelTiles.js' => 'a46e8353fbe1101c1264f5b34671415d', + './include/SubPanel/SubPanelTiles.js' => '50e304ca37344ff17a4a07100aaa0b34', './include/SubPanel/tpls/singletabmenu.tpl' => '61d073f56fa3fbee90daa84950fb60a3', './include/SubPanel/subpanels.txt' => '8b89c0ee2426d40916d98a646ec26e7a', './include/SubPanel/registered_layout_defs.php' => 'b0f5b089cf2f88536e2f04ef254a6193', @@ -5134,7 +6337,7 @@ $md5_string = array ( './include/SubPanel/SubPanelTilesTabs.php' => '1cb4c27d253c46049261c2468f7135bc', './include/SubPanel/SubPanelTiles.php' => '93eadec16e9185ec3db437dd0e8b9a28', './include/SubPanel/SubPanelDynamic.html' => 'f50e7154970810e879e6711d74e1c33c', - './include/SubPanel/SubPanelDefinitions.php' => '5c174194670e06117b8db97e6a9878f4', + './include/SubPanel/SubPanelDefinitions.php' => 'fbb751b4996caed6034ceeb36edf7ccd', './include/SubPanel/SubPanel.php' => '903b340cbcbd48face10f17625b57b41', './include/Smarty/plugins/shared.make_timestamp.php' => '2d98e1b8ae60c93316d90bf152d3f5a5', './include/Smarty/plugins/shared.escape_special_chars.php' => '1a8d89273862e174b64f683d42feb198', @@ -5187,7 +6390,7 @@ $md5_string = array ( './include/Smarty/plugins/function.sugar_currency_format.php' => '328379f1c05a4e8e60d640ce4fc8cb15', './include/Smarty/plugins/function.sugar_connector_display.php' => 'e3b0ed819e977806f10e946bd7b9152a', './include/Smarty/plugins/function.sugar_button_slider.php' => '6152ab8014fecf6fa1b6af75c28af497', - './include/Smarty/plugins/function.sugar_button.php' => '04e4e9f30503a9b62ba91c505c2620ca', + './include/Smarty/plugins/function.sugar_button.php' => '0901a18a575bb79f8e002cf1575125d6', './include/Smarty/plugins/function.popup_init.php' => 'bbf08a63f3a1ae2679b324d23cfce520', './include/Smarty/plugins/function.popup.php' => 'cf231d09647d1b1cf0adf5904b66b6a6', './include/Smarty/plugins/function.overlib_includes.php' => 'a9ebdebac2bff90663da6090767b3f39', @@ -5245,11 +6448,11 @@ $md5_string = array ( './include/SearchForm/tpls/SearchFormGenericAdvanced.tpl' => '6c503de6635ffff0d7a3cf913add9a70', './include/SearchForm/tpls/SearchFormGeneric.tpl' => '6bd324f8c9145e9a100aa6f99efc5a20', './include/SearchForm/SugarSpot.php' => '0536606cc025c51415010ff7ea4c307b', - './include/SearchForm/SearchForm2.php' => '1ffbb26f8443233eb18e509b521333e3', - './include/SearchForm/SearchForm.php' => 'b05b4a135d0d1074a0529e4e248541c3', - './include/QuickSearchDefaults.php' => 'e3fa93b16371d241f92647ac0ffec396', - './include/Popups/tpls/header.tpl' => '165bcfc57f5f9defc594f76debf796af', - './include/Popups/tpls/footer.tpl' => '772a43d16594a76e89c5a7249e5d23b6', + './include/SearchForm/SearchForm2.php' => '4688db6c2a243ef6a03c6f8f2e772783', + './include/SearchForm/SearchForm.php' => '021ef820b8e6de5685cce6e79cdb1648', + './include/QuickSearchDefaults.php' => '3f9a7c6b166894971f7cc0b4cf5b19c7', + './include/Popups/tpls/header.tpl' => '87575a24e2cb8d828fc1eae2a7378952', + './include/Popups/tpls/footer.tpl' => '0a34f3223e0e1b88cf09b3a657b61924', './include/Popups/tpls/PopupGeneric.tpl' => '99507106e55ee28bcd652882b188b236', './include/Popups/Popup_picker.php' => '2b2071f0293ba8a28f95dd657598910d', './include/Popups/PopupSmarty.php' => 'dae7bea856d81605c7dd0b73c8d2e6ed', @@ -5268,8 +6471,8 @@ $md5_string = array ( './include/MySugar/tpls/dashletsSearchResults.tpl' => '7bf094ad0bb191aa01959486e7cd6444', './include/MySugar/tpls/chartDashletsSearchResults.tpl' => '025432deb422b2675876a8c4d27cb15c', './include/MySugar/tpls/addDashletsDialog.tpl' => '6c91f3cefcd2a8e9997631bc2cbb4c65', - './include/MySugar/tpls/MySugar.tpl' => '73ba7e01e4a8a193297d3625ac9fbfe6', - './include/MySugar/javascript/MySugar.js' => 'f2469a918adaf694736ef8087c9864a5', + './include/MySugar/tpls/MySugar.tpl' => '10c556f20699f03dcbb213e5c629e877', + './include/MySugar/javascript/MySugar.js' => '0b016da5053fc36e5ee7ae05c74ae04e', './include/MySugar/MySugar.php' => '49a8305a2193bbe445ac092d22ff854d', './include/MySugar/DashletsDialog/DashletsDialog.php' => 'e16fcfab4cb76f1cbfb4d8d4fb53100a', './include/MassUpdate.php' => 'c3f2e6188f5b6afff2958a08ac95afcb', @@ -5280,7 +6483,7 @@ $md5_string = array ( './include/MVC/View/views/view.serialized.php' => '6746e128e8dacee78ecbf70ea3559cbb', './include/MVC/View/views/view.quickcreate.php' => 'b5d1b6e53d0aee0462eef68463a8a333', './include/MVC/View/views/view.quick.php' => '9a1fa9ad8fce5230124ee320fcc42266', - './include/MVC/View/views/view.popup.php' => '7b8043992e9113658223bcb0c501465a', + './include/MVC/View/views/view.popup.php' => '840037771e14e3a828783d8ac486c725', './include/MVC/View/views/view.noaccess.php' => '1cab33d38afb080ca5dbfaa70a05e69a', './include/MVC/View/views/view.multiedit.php' => 'b727fe11b404c9cbfb80b23cbbd13a4c', './include/MVC/View/views/view.modulelistmenu.php' => 'd1f9e8f7977602eab7faf6cb9ece2144', @@ -5299,9 +6502,9 @@ $md5_string = array ( './include/MVC/View/tpls/modulelistmenu.tpl' => '796ce676d310cf69a84618aa0c85082e', './include/MVC/View/tpls/Importvcard.tpl' => 'aa5117be30dc5b8c1fc726ba44a3eb00', './include/MVC/View/ViewFactory.php' => '822d3723675b0edcaf1f7b5cb65fb3c2', - './include/MVC/View/SugarView.php' => '44c4ee4ba90c61f6fa74b2c0423efb0f', + './include/MVC/View/SugarView.php' => 'b3336f1025dd8fd68964dd95447fba08', './include/MVC/SugarModule.php' => 'ce58476e24ad1717fe30192d10e28adc', - './include/MVC/SugarApplication.php' => 'c0ee7ebcacd32a865b10e3d4144519af', + './include/MVC/SugarApplication.php' => 'aa5f4873f931f586d311810e180e11e3', './include/MVC/Controller/file_access_control_map.php' => 'c94a1a349da51c17f5758d5f1ad6a364', './include/MVC/Controller/entry_point_registry.php' => '0b6daeee64e3648e297811bbcd297717', './include/MVC/Controller/action_view_map.php' => 'b5a22402b8cd64eb8971a99a14a99c03', @@ -5309,17 +6512,17 @@ $md5_string = array ( './include/MVC/Controller/SugarController.php' => 'b5282938e4490ca8d23b6193094f8194', './include/MVC/Controller/ControllerFactory.php' => '52b59a09b463a19eff7f34203b425447', './include/Localization/Localization.php' => 'de0035fc0f86167c97302fd381e0fcca', - './include/ListView/ListViewDCMenu.tpl' => '996e1ff91b59dc978c3f59bf36b55599', + './include/ListView/ListViewDCMenu.tpl' => '106226bf74c3da2aab933ae8869b69bd', './include/ListView/ListViewXTPL.php' => 'e70a4929a6e81eb2f63d60a5302c0780', './include/ListView/ListViewSmarty.php' => 'dc37b331de2c2423b6b001f3f3c6eec5', './include/ListView/ListViewPagination.tpl' => 'bcb4adbaea266d27495ac72fa7a4721d', - './include/ListView/ListViewNoMassUpdate.tpl' => 'a5f2bfb2b49fd004a9dd1263bb74c5b7', - './include/ListView/ListViewGeneric.tpl' => 'a9d91145abddf09489f6b39b10469714', + './include/ListView/ListViewNoMassUpdate.tpl' => 'b67e393107c9d80223e4abb21eec261a', + './include/ListView/ListViewGeneric.tpl' => '21ea92d29f7096ef2e3e47e4fb6e90c3', './include/ListView/ListViewFacade.php' => 'eca289f7cf40a7e503255644bec57716', './include/ListView/ListViewDisplay.php' => 'f043bb8443a23bc1bf14114ba1ee3200', './include/ListView/ListViewData.php' => '57d87d2efe1c5d174c015147058be1ce', './include/ListView/ListView.php' => '6ee1ea0c48f42256d43a41e79ecbfb53', - './include/JSON.php' => 'e0ecefd25cc14c34175fbc925286b08d', + './include/JSON.php' => '419327255daae457ef1765ec305148f3', './include/HTTP_WebDAV_Server/license.txt' => 'a45bb1bbeed9e26b26c5763df1d3913d', './include/HTTP_WebDAV_Server/dav.txt' => 'c5235ed64efa685da638c6dcdb6a9708', './include/HTTP_WebDAV_Server/Tools/_parse_proppatch.php' => '70971e2e4a07137ef26d6f4777194a9c', @@ -5344,7 +6547,7 @@ $md5_string = array ( './include/DetailView/DetailView.tpl' => '1058c91ce17689ca96031d2167be971e', './include/DetailView/DetailView.php' => '35d047b596e7d3c9e122703c9c0c9c2b', './include/Dashlets/DashletGenericAutoRefreshDynamic.tpl' => 'f769c32f17ac26313b340fec2861112e', - './include/Dashlets/DashletGenericDisplay.tpl' => '810e79d4d561f4f54d0c533777baa9d6', + './include/Dashlets/DashletGenericDisplay.tpl' => 'd6afdb7417234d0bb5e82388d3b69c84', './include/Dashlets/DashletGenericConfigure.tpl' => '9c9bdb6f6d6a79b2ac325fc40790b695', './include/Dashlets/DashletGenericAutoRefresh.tpl' => '6142a7f53bcf1b5b45414ef2aa415639', './include/Dashlets/DashletGenericChartConfigure.tpl' => 'db96a4bcb690f325cfb41e60ab4b4791', @@ -5753,14 +6956,14 @@ $md5_string = array ( './Zend/Crypt/DiffieHellman/Exception.php' => '767330f408c58b089aa082d990b73099', './Zend/Crypt/DiffieHellman.php' => 'ec0a4f522b732f7fcbb9c4ab94d926e1', './Zend/Crypt.php' => '0e72fd104506094fd2c7682b0b924542', - './install.php' => 'edf4759074cef0561d70d742bd5ea089', + './install.php' => '969b88bd1db96c2193cd8e37d96dee5c', './export.php' => '44550cd8bb3c34fc7b8dac67b549b6db', './data/upload/index.html' => '9cd784063d39b18d308932c28c385853', './data/Tracker.php' => '5dfc3f390ecccd8cbb1229e01f878593', - './data/SugarBean.php' => 'b49ca9de8ca26a94bba549c835ee80a2', + './data/SugarBean.php' => '4d0d8806c36883c851878736d984413f', './data/Link.php' => '0eb776610e6f09640760c67412d69184', './custom/index.html' => 'b0070a296647b6026d1800db14510e3c', - './cron.php' => '99055ca0a11c9810e9d3d655c4fb32d2', + './cron.php' => '3d65f5cc08d20790387c79a761c776f7', './campaign_trackerv2.php' => '66ca6f16d0d670bcaf528f4b9d95494b', './campaign_tracker.php' => 'e0f56c0cc526128e1b931f120b00460a', './cache/xml/index.html' => '9cd784063d39b18d308932c28c385853', diff --git a/include/Dashlets/DashletGenericDisplay.tpl b/include/Dashlets/DashletGenericDisplay.tpl index 2a184001..88d8c224 100644 --- a/include/Dashlets/DashletGenericDisplay.tpl +++ b/include/Dashlets/DashletGenericDisplay.tpl @@ -173,7 +173,7 @@ {if !empty($quickViewLinks)} {if $pageData.access.edit} - + {/if} {if $pageData.access.view} diff --git a/include/JSON.js b/include/JSON.js deleted file mode 100644 index ccb8d254..00000000 --- a/include/JSON.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (c) 2005 JSON.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The Software shall be used for Good, not Evil. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - - json.js - - The global object JSON contains two methods. - - JSON.stringify(value) takes a JavaScript value and produces a JSON text. - The value must not be cyclical. - - JSON.parse(text) takes a JSON text and produces a JavaScript value. It will - return false if there is an error. - - 2008-10-10: New regular expressions copied in from the new json2.js file on http://json.org (released into the public domain), work better on Safari and IE for more complicated datasets - */ -var JSON=function(){var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},s={array:function(x){var a=['['],b,f,i,l=x.length,v;for(i=0;ifatal("*** SECURITY: received asynchronous call with invalid ['asychronous_key'] value. Possible CSRF attack."); - return ''; - } - - return $meta['jsonObject']; - } - return json_decode($string,$assoc); } diff --git a/include/ListView/ListViewDCMenu.tpl b/include/ListView/ListViewDCMenu.tpl index a0a1cf5b..2495cdc4 100644 --- a/include/ListView/ListViewDCMenu.tpl +++ b/include/ListView/ListViewDCMenu.tpl @@ -154,7 +154,7 @@ YAHOO.util.Connect.asyncRequest('POST', 'index.php', callback, "module=Meetings& {$rowData.star} {/if} {if !empty($quickViewLinks)} - {if $pageData.access.edit}{/if} + {if $pageData.access.edit}{/if} {/if} {counter start=0 name="colCounter" print=false assign="colCounter"} {foreach from=$displayColumns key=col item=params} diff --git a/include/ListView/ListViewGeneric.tpl b/include/ListView/ListViewGeneric.tpl index 9100b76e..a19efd0c 100644 --- a/include/ListView/ListViewGeneric.tpl +++ b/include/ListView/ListViewGeneric.tpl @@ -123,7 +123,7 @@ {/if} {if !empty($quickViewLinks)} - {if $pageData.rowAccess[$id].edit}{/if} + {if $pageData.rowAccess[$id].edit}{/if} {/if} {counter start=0 name="colCounter" print=false assign="colCounter"} {foreach from=$displayColumns key=col item=params} diff --git a/include/ListView/ListViewNoMassUpdate.tpl b/include/ListView/ListViewNoMassUpdate.tpl index 924f3611..efec1b61 100644 --- a/include/ListView/ListViewNoMassUpdate.tpl +++ b/include/ListView/ListViewNoMassUpdate.tpl @@ -90,7 +90,7 @@ {if !empty($quickViewLinks)} {if $pageData.access.edit && $pageData.bean.moduleDir != "Employees"} - + {/if} {/if} diff --git a/include/MVC/SugarApplication.php b/include/MVC/SugarApplication.php index 9314a4d3..ce9fc43c 100644 --- a/include/MVC/SugarApplication.php +++ b/include/MVC/SugarApplication.php @@ -510,7 +510,7 @@ class SugarApplication protected function checkHTTPReferer($dieIfInvalid = true) { global $sugar_config; - $whiteListActions = (!empty($sugar_config['http_referer']['actions']))?$sugar_config['http_referer']['actions']:array('index', 'ListView', 'DetailView', 'EditView','oauth', 'Authenticate', 'Login'); + $whiteListActions = (!empty($sugar_config['http_referer']['actions']))?$sugar_config['http_referer']['actions']:array('index', 'ListView', 'DetailView', 'EditView','oauth', 'Authenticate', 'Login', 'SupportPortal'); $strong = empty($sugar_config['http_referer']['weak']); diff --git a/include/MVC/View/SugarView.php b/include/MVC/View/SugarView.php index 1893fd28..32373fd2 100644 --- a/include/MVC/View/SugarView.php +++ b/include/MVC/View/SugarView.php @@ -717,13 +717,10 @@ EOHTML; if ( isset($sugar_config['quicksearch_querydelay']) ) { echo ""; } - // cn: bug 12274 - prepare secret guid for asynchronous calls - if (!isset($_SESSION['asynchronous_key']) || empty($_SESSION['asynchronous_key'])) { - $_SESSION['asynchronous_key'] = create_guid(); - } + $image_server = (defined('TEMPLATE_URL'))?TEMPLATE_URL . '/':''; - echo ''; // cn: bug 12274 - create session-stored key to defend against CSRF - echo ''; + echo ''; // cn: bug 12274 - create session-stored key to defend against CSRF + echo ''; echo self::getJavascriptValidation(); if (!is_file($GLOBALS['sugar_config']['cache_dir'] . 'jsLanguage/' . $GLOBALS['current_language'] . '.js')) { require_once ('include/language/jsLanguage.php'); @@ -737,12 +734,7 @@ EOHTML; echo ''; if(isset( $sugar_config['disc_client']) && $sugar_config['disc_client']) echo ''; - echo ''; - } - if (isset($_REQUEST['popup']) && !empty($_REQUEST['popup'])) { - // cn: bug 12274 - add security metadata envelope for async calls in popups - echo ''; // cn: bug 12274 - create session-stored key to defend against CSRF } } diff --git a/include/MVC/View/views/view.popup.php b/include/MVC/View/views/view.popup.php index 988a2194..64ab7a0d 100644 --- a/include/MVC/View/views/view.popup.php +++ b/include/MVC/View/views/view.popup.php @@ -47,6 +47,7 @@ class ViewPopup extends SugarView{ ACLController::displayNoAccess(); sugar_cleanup(true); } + if(isset($_REQUEST['metadata']) && strpos($_REQUEST['metadata'], "..") !== false) die("Directory navigation attack denied."); diff --git a/include/MySugar/javascript/MySugar.js b/include/MySugar/javascript/MySugar.js index 09873a55..61c8520a 100644 --- a/include/MySugar/javascript/MySugar.js +++ b/include/MySugar/javascript/MySugar.js @@ -32,7 +32,7 @@ * technical reasons, the Appropriate Legal Notices must display the words * "Powered by SugarCRM". ********************************************************************************/ -SUGAR.mySugar=function(){var originalLayout=null;var configureDashletId=null;var currentDashlet=null;var leftColumnInnerHTML=null;var leftColObj=null;var maxCount;var warningLang;var activeTab=activePage;var current_user=current_user_id;var module=moduleName;var charts=new Object();if(module=='Dashboard'){cookiePageIndex=current_user+"_activeDashboardPage";} +SUGAR.mySugar=function(){var originalLayout=null;var configureDashletId=null;var currentDashlet=null;var leftColumnInnerHTML=null;var leftColObj=null;var maxCount;var warningLang;var closeDashletsDialogTimer=null;var activeTab=activePage;var current_user=current_user_id;var module=moduleName;var charts=new Object();if(module=='Dashboard'){cookiePageIndex=current_user+"_activeDashboardPage";} else{cookiePageIndex=current_user+"_activePage";} var homepage_dd;return{getLayout:function(asString){columns=new Array();for(je=0;je<3;je++){dashlets=document.getElementById('col_'+activeTab+'_'+je);if(dashlets!=null){dashletIds=new Array();for(wp=0;wp=SUGAR.mySugar.maxCount){alert(SUGAR.language.get('app_strings','LBL_MAX_DASHLETS_REACHED'));return;} ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_LOADING'));var success=function(data){eval(data.responseText);dashletsListDiv=document.getElementById('dashletsList');dashletsListDiv.innerHTML=response['html'];document.getElementById('dashletsDialog_c').style.display='';SUGAR.mySugar.dashletsDialog.show();eval(response['script']);ajaxStatus.hideStatus();} -var cObj=YAHOO.util.Connect.asyncRequest('GET','index.php?to_pdf=true&module='+module+'&action=DynamicAction&DynamicAction=dashletsDialog',{success:success,failure:success});return false;},closeDashletsDialog:function(){SUGAR.mySugar.dashletsDialog.hide();window.setTimeout("document.getElementById('dashletsDialog_c').style.display = 'none';",2000);},toggleDashletCategories:function(category){document.getElementById('search_string').value='';document.getElementById('searchResults').innerHTML='';var moduleTab=document.getElementById('moduleCategory');var moduleTabAnchor=document.getElementById('moduleCategoryAnchor');var moduleListDiv=document.getElementById('moduleDashlets');var chartTab=document.getElementById('chartCategory');var chartTabAnchor=document.getElementById('chartCategoryAnchor');var chartListDiv=document.getElementById('chartDashlets');var toolsTab=document.getElementById('toolsCategory');var toolsTabAnchor=document.getElementById('toolsCategoryAnchor');var toolsListDiv=document.getElementById('toolsDashlets');var webTab=document.getElementById('webCategory');var webTabAnchor=document.getElementById('webCategoryAnchor');var webListDiv=document.getElementById('webDashlets');switch(category){case'module':moduleTab.className='active';moduleTabAnchor.className='current';moduleListDiv.style.display='';chartTab.className='';chartTabAnchor.className='';chartListDiv.style.display='none';toolsTab.className='';toolsTabAnchor.className='';toolsListDiv.style.display='none';webTab.className='';webTabAnchor.className='';webListDiv.style.display='none';break;case'chart':moduleTab.className='';moduleTabAnchor.className='';moduleListDiv.style.display='none';chartTab.className='active';chartTabAnchor.className='current';chartListDiv.style.display='';toolsTab.className='';toolsTabAnchor.className='';toolsListDiv.style.display='none';webTab.className='';webTabAnchor.className='';webListDiv.style.display='none';break;case'tools':moduleTab.className='';moduleTabAnchor.className='';moduleListDiv.style.display='none';chartTab.className='';chartTabAnchor.className='';chartListDiv.style.display='none';toolsTab.className='active';toolsTabAnchor.className='current';toolsListDiv.style.display='';webTab.className='';webTabAnchor.className='';webListDiv.style.display='none';break;case'web':moduleTab.className='';moduleTabAnchor.className='';moduleListDiv.style.display='none';chartTab.className='';chartTabAnchor.className='';chartListDiv.style.display='none';toolsTab.className='';toolsTabAnchor.className='';toolsListDiv.style.display='none';webTab.className='active';webTabAnchor.className='current';webListDiv.style.display='';break;default:break;} +var cObj=YAHOO.util.Connect.asyncRequest('GET','index.php?to_pdf=true&module='+module+'&action=DynamicAction&DynamicAction=dashletsDialog',{success:success,failure:success});return false;},closeDashletsDialog:function(){SUGAR.mySugar.dashletsDialog.hide();if(this.closeDashletsDialogTimer!=null){window.clearTimeout(this.closeDashletsDialogTimer);} +this.closeDashletsDialogTimer=window.setTimeout("document.getElementById('dashletsDialog_c').style.display = 'none';",2000);},toggleDashletCategories:function(category){document.getElementById('search_string').value='';document.getElementById('searchResults').innerHTML='';var moduleTab=document.getElementById('moduleCategory');var moduleTabAnchor=document.getElementById('moduleCategoryAnchor');var moduleListDiv=document.getElementById('moduleDashlets');var chartTab=document.getElementById('chartCategory');var chartTabAnchor=document.getElementById('chartCategoryAnchor');var chartListDiv=document.getElementById('chartDashlets');var toolsTab=document.getElementById('toolsCategory');var toolsTabAnchor=document.getElementById('toolsCategoryAnchor');var toolsListDiv=document.getElementById('toolsDashlets');var webTab=document.getElementById('webCategory');var webTabAnchor=document.getElementById('webCategoryAnchor');var webListDiv=document.getElementById('webDashlets');switch(category){case'module':moduleTab.className='active';moduleTabAnchor.className='current';moduleListDiv.style.display='';chartTab.className='';chartTabAnchor.className='';chartListDiv.style.display='none';toolsTab.className='';toolsTabAnchor.className='';toolsListDiv.style.display='none';webTab.className='';webTabAnchor.className='';webListDiv.style.display='none';break;case'chart':moduleTab.className='';moduleTabAnchor.className='';moduleListDiv.style.display='none';chartTab.className='active';chartTabAnchor.className='current';chartListDiv.style.display='';toolsTab.className='';toolsTabAnchor.className='';toolsListDiv.style.display='none';webTab.className='';webTabAnchor.className='';webListDiv.style.display='none';break;case'tools':moduleTab.className='';moduleTabAnchor.className='';moduleListDiv.style.display='none';chartTab.className='';chartTabAnchor.className='';chartListDiv.style.display='none';toolsTab.className='active';toolsTabAnchor.className='current';toolsListDiv.style.display='';webTab.className='';webTabAnchor.className='';webListDiv.style.display='none';break;case'web':moduleTab.className='';moduleTabAnchor.className='';moduleListDiv.style.display='none';chartTab.className='';chartTabAnchor.className='';chartListDiv.style.display='none';toolsTab.className='';toolsTabAnchor.className='';toolsListDiv.style.display='none';webTab.className='active';webTabAnchor.className='current';webListDiv.style.display='';break;default:break;} document.getElementById('search_category').value=category;},searchDashlets:function(searchStr,searchCategory){var moduleTab=document.getElementById('moduleCategory');var moduleTabAnchor=document.getElementById('moduleCategoryAnchor');var moduleListDiv=document.getElementById('moduleDashlets');var chartTab=document.getElementById('chartCategory');var chartTabAnchor=document.getElementById('chartCategoryAnchor');var chartListDiv=document.getElementById('chartDashlets');var toolsTab=document.getElementById('toolsCategory');var toolsTabAnchor=document.getElementById('toolsCategoryAnchor');var toolsListDiv=document.getElementById('toolsDashlets');if(moduleTab!=null&&chartTab!=null&&toolsTab!=null){moduleListDiv.style.display='none';chartListDiv.style.display='none';toolsListDiv.style.display='none';} else{chartListDiv.style.display='none';} var searchResultsDiv=document.getElementById('searchResults');searchResultsDiv.style.display='';var success=function(data){eval(data.responseText);searchResultsDiv.innerHTML=response['html'];} var cObj=YAHOO.util.Connect.asyncRequest('GET','index.php?to_pdf=true&module='+module+'&action=DynamicAction&DynamicAction=searchDashlets&search='+searchStr+'&category='+searchCategory,{success:success,failure:success});return false;},collapseList:function(chartList){document.getElementById(chartList+'List').style.display='none';document.getElementById(chartList+'ExpCol').innerHTML='';},expandList:function(chartList){document.getElementById(chartList+'List').style.display='';document.getElementById(chartList+'ExpCol').innerHTML='';},collapseReportList:function(reportChartList){document.getElementById(reportChartList+'ReportsChartDashletsList').style.display='none';document.getElementById(reportChartList+'ExpCol').innerHTML='';},expandReportList:function(reportChartList){document.getElementById(reportChartList+'ReportsChartDashletsList').style.display='';document.getElementById(reportChartList+'ExpCol').innerHTML='';},clearSearch:function(){document.getElementById('search_string').value='';var moduleTab=document.getElementById('moduleCategory');var moduleTabAnchor=document.getElementById('moduleCategoryAnchor');var moduleListDiv=document.getElementById('moduleDashlets');document.getElementById('searchResults').innerHTML='';if(moduleTab!=null){SUGAR.mySugar.toggleDashletCategories('module');} -else{document.getElementById('searchResults').style.display='none';document.getElementById('chartDashlets').style.display='';}},doneAddDashlets:function(){SUGAR.mySugar.dashletsDialog.hide();return false;},renderDashletsDialog:function(){SUGAR.mySugar.dashletsDialog=new YAHOO.widget.Dialog("dashletsDialog",{width:"480px",height:"520px",fixedcenter:true,draggable:false,visible:false,modal:true,close:false});var listeners=new YAHOO.util.KeyListener(document,{keys:27},{fn:function(){SUGAR.mySugar.closeDashletsDialog();}});SUGAR.mySugar.dashletsDialog.cfg.queueProperty("keylisteners",listeners);document.getElementById('dashletsDialog').style.display='';SUGAR.mySugar.dashletsDialog.render();document.getElementById('dashletsDialog_c').style.display='none';}};}(); \ No newline at end of file +else{document.getElementById('searchResults').style.display='none';document.getElementById('chartDashlets').style.display='';}},doneAddDashlets:function(){SUGAR.mySugar.dashletsDialog.hide();return false;},renderDashletsDialog:function(){SUGAR.mySugar.dashletsDialog=new YAHOO.widget.Dialog("dashletsDialog",{width:"480px",height:"520px",fixedcenter:true,draggable:false,visible:false,modal:true,close:false});var listeners=new YAHOO.util.KeyListener(document,{keys:27},{fn:function(){SUGAR.mySugar.closeDashletsDialog();}});SUGAR.mySugar.dashletsDialog.cfg.queueProperty("keylisteners",listeners);document.getElementById('dashletsDialog').style.display='';SUGAR.mySugar.dashletsDialog.render();document.getElementById('dashletsDialog_c').style.display='none';}};}(); diff --git a/include/MySugar/tpls/MySugar.tpl b/include/MySugar/tpls/MySugar.tpl index 9b2a4600..3e2a6eba 100644 --- a/include/MySugar/tpls/MySugar.tpl +++ b/include/MySugar/tpls/MySugar.tpl @@ -77,7 +77,6 @@ document.body.setAttribute("class", "yui-skin-sam"); - diff --git a/include/Popups/tpls/footer.tpl b/include/Popups/tpls/footer.tpl index 08a4dbe0..dac9a82f 100644 --- a/include/Popups/tpls/footer.tpl +++ b/include/Popups/tpls/footer.tpl @@ -37,16 +37,4 @@ *} {{if $prerow}} - {{/if}} -{literal} - -{/literal} \ No newline at end of file +{{/if}} \ No newline at end of file diff --git a/include/Popups/tpls/header.tpl b/include/Popups/tpls/header.tpl index 80cc5cbf..c22128d2 100644 --- a/include/Popups/tpls/header.tpl +++ b/include/Popups/tpls/header.tpl @@ -36,8 +36,6 @@ *} - - - + $qsScripts = ' '; return $qsScripts; } @@ -168,4 +196,4 @@ class QuickSearchDefaults { // END QuickSearch functions for 4.5.x backwards compatibility support } -?> \ No newline at end of file +?> diff --git a/include/SearchForm/SearchForm.php b/include/SearchForm/SearchForm.php index e16dff79..9db4a118 100644 --- a/include/SearchForm/SearchForm.php +++ b/include/SearchForm/SearchForm.php @@ -676,8 +676,8 @@ class SearchForm { $SAVED_SEARCHES_OPTIONS = ''; $savedSearch = new SavedSearch(); $SAVED_SEARCHES_OPTIONS = $savedSearch->getSelect($this->module); - $str = " "; - $str .= ""; + $str = " "; + $str .= ""; if(!empty($SAVED_SEARCHES_OPTIONS) && $this->showSavedSearchOptions){ $str .= " diff --git a/include/SearchForm/SearchForm2.php b/include/SearchForm/SearchForm2.php index 027e574b..fe8a7a37 100644 --- a/include/SearchForm/SearchForm2.php +++ b/include/SearchForm/SearchForm2.php @@ -447,8 +447,8 @@ require_once('include/EditView/EditView2.php'); } }else if(!empty($array[$name]) && !$fromMergeRecords && !$this->isEmptyDropdownField($name, $array[$name])) { //basic $this->searchFields[$name]['value'] = $array[$name]; - if(empty($this->fieldDefs[$name]['value'])) { - $this->fieldDefs[$name]['value'] = $array[$name]; + if(empty($this->fieldDefs[$long_name]['value'])) { + $this->fieldDefs[$long_name]['value'] = $array[$name]; } } diff --git a/include/Smarty/plugins/function.sugar_button.php b/include/Smarty/plugins/function.sugar_button.php index 9ef9b4e0..c1973313 100644 --- a/include/Smarty/plugins/function.sugar_button.php +++ b/include/Smarty/plugins/function.sugar_button.php @@ -307,7 +307,7 @@ function smarty_function_sugar_button($params, &$smarty) break; case "DELETE": - return '{if $bean->aclAccess("delete")}{/if} '; + return '{if $bean->aclAccess("delete")}{/if} '; break; case "DUPLICATE": @@ -319,7 +319,7 @@ function smarty_function_sugar_button($params, &$smarty) break; case "FIND_DUPLICATES": - return '{if $bean->aclAccess("edit") && $bean->aclAccess("delete")}{/if} '; + return '{if $bean->aclAccess("edit") && $bean->aclAccess("delete")}{/if} '; break; case "SAVE": @@ -369,7 +369,7 @@ function smarty_function_sugar_button($params, &$smarty) require_once('include/SugarFields/Parsers/MetaParser.php'); $encoded_popup_request_data = MetaParser::parseDelimiters($json->encode($popup_request_data)); - $audit_link = ''; + $audit_link = ''; $view = '{if $bean->aclAccess("detail")}{if !empty($fields.id.value) && $isAuditEnabled}'.$audit_link.'{/if}{/if}'; return $view; diff --git a/include/SubPanel/SubPanelDefinitions.php b/include/SubPanel/SubPanelDefinitions.php index 5d685198..7596ddba 100644 --- a/include/SubPanel/SubPanelDefinitions.php +++ b/include/SubPanel/SubPanelDefinitions.php @@ -163,7 +163,7 @@ class aSubPanel //only email is being tested becuase other submodules in activites/history such as notes, tasks, meetings and calls cannot be disabled. //as of today these are the only 2 sub-panels that use the union clause. $mod_name = $this->get_module_name () ; - if ($mod_name == 'Activities' or $mod_name = 'History') + if ($mod_name == 'Activities' || $mod_name == 'History') { global $modListHeader ; global $modules_exempt_from_availability_check ; @@ -173,7 +173,7 @@ class aSubPanel { foreach ( $button as $property => $value ) { - if ($value == 'SubPanelTopComposeEmailButton' or $value == 'SubPanelTopArchiveEmailButton') + if ($value === 'SubPanelTopComposeEmailButton' || $value === 'SubPanelTopArchiveEmailButton') { //remove this button from the array. unset ( $buttons [ $key ] ) ; @@ -267,7 +267,7 @@ class aSubPanel { $field = $def['name']; $list_key = isset($listFieldMap[$key][$field]) ? $listFieldMap[$key][$field] : $field; - + if (isset($subpanel->panel_definition['list_fields'][$field])) { $list_fields[$field] = $subpanel->panel_definition['list_fields'][$field]; @@ -275,7 +275,7 @@ class aSubPanel else if ($list_key != $field && isset($subpanel->panel_definition['list_fields'][$list_key])) { $list_fields[$list_key] = $subpanel->panel_definition['list_fields'][$list_key]; - + } else { $list_fields[$field] = $display_fields[$vname]; diff --git a/include/SubPanel/SubPanelTiles.js b/include/SubPanel/SubPanelTiles.js index 2c5a69de..e0d833ea 100644 --- a/include/SubPanel/SubPanelTiles.js +++ b/include/SubPanel/SubPanelTiles.js @@ -121,4 +121,4 @@ SUGAR.subpanelUtils.menu.spPopupMenu(id,menu,top,left,leftOffset);},spPopupMenu: left+=parseInt(leftOffset);} if(top==""){var top=0;p=menuHandle;top+=p.offsetHeight;while(p&&p.tagName.toUpperCase()!='BODY'){top+=p.offsetTop;p=p.offsetParent;}} if(left+menuWidth>bw){left=left-menuWidth+imgWidth;} -setMenuVisible(menu,left,top,false);}}};}(); \ No newline at end of file +setMenuVisible(menu,left,top,false);}}};}(); diff --git a/include/SugarCharts/Jit/FlashCanvas/canvas2png.js b/include/SugarCharts/Jit/FlashCanvas/canvas2png.js index f4cb2507..dd05b65a 100644 --- a/include/SugarCharts/Jit/FlashCanvas/canvas2png.js +++ b/include/SugarCharts/Jit/FlashCanvas/canvas2png.js @@ -6,4 +6,4 @@ * http://flashcanvas.net/ */ (function(doc){var scripts=doc.getElementsByTagName("script");var script=scripts[scripts.length-1];var url=script.getAttribute("src").replace(/[^\/]+$/,"save.php");window.canvas2png=function(canvas){var tagName=canvas.tagName.toLowerCase();if(tagName!=="canvas"){return;} -if(typeof FlashCanvas!=="undefined"){FlashCanvas.saveImage(canvas);}else{var form=doc.createElement("form");var input=doc.createElement("input");form.setAttribute("action",url);form.setAttribute("method","post");input.setAttribute("type","hidden");input.setAttribute("name","dataurl");input.setAttribute("value",canvas.toDataURL());doc.body.appendChild(form);form.appendChild(input);form.submit();form.removeChild(input);doc.body.removeChild(form);}}})(document); \ No newline at end of file +if(typeof FlashCanvas!=="undefined"){FlashCanvas.saveImage(canvas);}else{var form=doc.createElement("form");var input=doc.createElement("input");form.setAttribute("action",url);form.setAttribute("method","post");input.setAttribute("type","hidden");input.setAttribute("name","dataurl");input.setAttribute("value",canvas.toDataURL());doc.body.appendChild(form);form.appendChild(input);form.submit();form.removeChild(input);doc.body.removeChild(form);}}})(document); diff --git a/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js b/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js index 2ecd5479..02d8f557 100644 --- a/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js +++ b/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js @@ -5,4 +5,4 @@ * Copyright (c) 2009-2011 FlashCanvas Project * Released under the MIT/X License */ -window.ActiveXObject&&!window.CanvasRenderingContext2D&&function(h,j){function D(a){this.code=a;this.message=T[a]}function U(a){this.width=a}function E(a){this.id=a.C++}function t(a){this.G=a;this.id=a.C++}function u(a,b){this.canvas=a;this.B=b;this.d=a.uniqueID;this.D();this.C=0;this.t="";var c=this;setInterval(function(){n[c.d]===0&&c.e()},30)}function A(){if(j.readyState==="complete"){j.detachEvent(F,A);for(var a=j.getElementsByTagName(r),b=0,c=a.length;b=8?a.src:a.getAttribute("src",4)}function v(a){return(""+a).replace(/&/g,"&").replace(/0)return eval(this.B.CallFunction(''+a.join("�")+""))},I:function(a,b){this.e();this.D();if(a>0)this.B.width=a;if(b>0)this.B.height=b;this.a.push(e.resize,a,b)}};t.prototype={addColorStop:function(a,b){if(isNaN(a)||a<0||a>1)i(1);this.G.a.push(e.addColorStop,this.id,a,b)}};D.prototype=Error();var T={1:"INDEX_SIZE_ERR",9:"NOT_SUPPORTED_ERR",11:"INVALID_STATE_ERR",12:"SYNTAX_ERR",17:"TYPE_MISMATCH_ERR",18:"SECURITY_ERR"},B={initElement:function(a){if(a.getContext)return a;var b=a.uniqueID,c="external"+b;x[b]=false;n[b]=1;Q(a);a.innerHTML='';s[b]=a;var d=a.firstChild;y[b]=a.lastChild;var f=j.body.contains;if(f(a))d.movie=w;else var g=setInterval(function(){if(f(a)){clearInterval(g);d.movie=w}},0);if(j.compatMode==="BackCompat"||!h.XMLHttpRequest)y[b].style.overflow="hidden";var o=new u(a,d);a.getContext=function(l){return l==="2d"?o:k};a.toDataURL=function(l,z){(""+l).replace(/[A-Z]+/g,W)==="image/jpeg"?o.a.push(e.toDataURL,l,typeof z==="number"?z:""):o.a.push(e.toDataURL,l);return o.e()};d.attachEvent(K,G);return a},saveImage:function(a){a.firstChild.saveImage()},setOptions:function(){},trigger:function(a,b){s[a].fireEvent("on"+b)},unlock:function(a,b){n[a]&&--n[a];if(b){var c=s[a],d=c.firstChild,f,g;Q(c);f=c.width;g=c.height;c.style.width=f+"px";c.style.height=g+"px";if(f>0)d.width=f;if(g>0)d.height=g;d.resize(f,g);c.attachEvent(L,H);x[a]=true}}};j.createElement(r);j.createStyleSheet().cssText=r+"{display:inline-block;overflow:hidden;width:300px;height:150px}";j.readyState==="complete"?A():j.attachEvent(F,A);h.attachEvent(J,I);if(w.indexOf(location.protocol+"//"+location.host+"/")===0){var S=new ActiveXObject("Microsoft.XMLHTTP");S.open("GET",w,false);S.send(k)}h[M]=u;h[N]=t;h[O]=E;h[C]=B;h[P]={init:function(){},init_:function(){},initElement:B.initElement};keep=u.measureText}(window,document); \ No newline at end of file +window.ActiveXObject&&!window.CanvasRenderingContext2D&&function(h,j){function D(a){this.code=a;this.message=T[a]}function U(a){this.width=a}function E(a){this.id=a.C++}function t(a){this.G=a;this.id=a.C++}function u(a,b){this.canvas=a;this.B=b;this.d=a.uniqueID;this.D();this.C=0;this.t="";var c=this;setInterval(function(){n[c.d]===0&&c.e()},30)}function A(){if(j.readyState==="complete"){j.detachEvent(F,A);for(var a=j.getElementsByTagName(r),b=0,c=a.length;b=8?a.src:a.getAttribute("src",4)}function v(a){return(""+a).replace(/&/g,"&").replace(/0)return eval(this.B.CallFunction(''+a.join("�")+""))},I:function(a,b){this.e();this.D();if(a>0)this.B.width=a;if(b>0)this.B.height=b;this.a.push(e.resize,a,b)}};t.prototype={addColorStop:function(a,b){if(isNaN(a)||a<0||a>1)i(1);this.G.a.push(e.addColorStop,this.id,a,b)}};D.prototype=Error();var T={1:"INDEX_SIZE_ERR",9:"NOT_SUPPORTED_ERR",11:"INVALID_STATE_ERR",12:"SYNTAX_ERR",17:"TYPE_MISMATCH_ERR",18:"SECURITY_ERR"},B={initElement:function(a){if(a.getContext)return a;var b=a.uniqueID,c="external"+b;x[b]=false;n[b]=1;Q(a);a.innerHTML='';s[b]=a;var d=a.firstChild;y[b]=a.lastChild;var f=j.body.contains;if(f(a))d.movie=w;else var g=setInterval(function(){if(f(a)){clearInterval(g);d.movie=w}},0);if(j.compatMode==="BackCompat"||!h.XMLHttpRequest)y[b].style.overflow="hidden";var o=new u(a,d);a.getContext=function(l){return l==="2d"?o:k};a.toDataURL=function(l,z){(""+l).replace(/[A-Z]+/g,W)==="image/jpeg"?o.a.push(e.toDataURL,l,typeof z==="number"?z:""):o.a.push(e.toDataURL,l);return o.e()};d.attachEvent(K,G);return a},saveImage:function(a){a.firstChild.saveImage()},setOptions:function(){},trigger:function(a,b){s[a].fireEvent("on"+b)},unlock:function(a,b){n[a]&&--n[a];if(b){var c=s[a],d=c.firstChild,f,g;Q(c);f=c.width;g=c.height;c.style.width=f+"px";c.style.height=g+"px";if(f>0)d.width=f;if(g>0)d.height=g;d.resize(f,g);c.attachEvent(L,H);x[a]=true}}};j.createElement(r);j.createStyleSheet().cssText=r+"{display:inline-block;overflow:hidden;width:300px;height:150px}";j.readyState==="complete"?A():j.attachEvent(F,A);h.attachEvent(J,I);if(w.indexOf(location.protocol+"//"+location.host+"/")===0){var S=new ActiveXObject("Microsoft.XMLHTTP");S.open("GET",w,false);S.send(k)}h[M]=u;h[N]=t;h[O]=E;h[C]=B;h[P]={init:function(){},init_:function(){},initElement:B.initElement};keep=u.measureText}(window,document); diff --git a/include/SugarCharts/Jit/js/Jit/jit.js b/include/SugarCharts/Jit/js/Jit/jit.js index 0d3b11d7..fa4f1ab9 100644 --- a/include/SugarCharts/Jit/js/Jit/jit.js +++ b/include/SugarCharts/Jit/js/Jit/jit.js @@ -63,7 +63,7 @@ obj.className=(obj.className+" "+klass);};$.removeClass=function(obj,klass){obj. return position;} function getScrolls(elem){var position={x:0,y:0};while(elem&&!isBody(elem)){position.x+=elem.scrollLeft;position.y+=elem.scrollTop;elem=elem.parentNode;} return position;} -function isBody(element){return(/^(?:body|html)$/i).test(element.tagName);}};$.event={get:function(e,win){win=win||window;return e||win.event;},getWheel:function(e){return e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;},isRightClick:function(e){return(e.which==3||e.button==2);},getPos:function(e,win){win=win||window;e=e||win.event;var doc=win.document;doc=doc.documentElement||doc.body;if(e.touches&&e.touches.length){e=e.touches[0];} +function isBody(element){return(/^(?:body|html)$/i).test(element.tagName);}};$.event={get:function(e,win){win=win||window;return e||win.event;},getWheel:function(e){return e.wheelDelta?e.wheelDelta / 120:-(e.detail||0)/ 3;},isRightClick:function(e){return(e.which==3||e.button==2);},getPos:function(e,win){win=win||window;e=e||win.event;var doc=win.document;doc=doc.documentElement||doc.body;if(e.touches&&e.touches.length){e=e.touches[0];} var page={x:e.pageX||(e.clientX+doc.scrollLeft),y:e.pageY||(e.clientY+doc.scrollTop)};return page;},stop:function(e){if(e.stopPropagation)e.stopPropagation();e.cancelBubble=true;if(e.preventDefault)e.preventDefault();else e.returnValue=false;}};$jit.util=$jit.id=$;var Class=function(properties){properties=properties||{};var klass=function(){for(var key in this){if(typeof this[key]!='function') this[key]=$.unlink(this[key]);} this.constructor=klass;if(Class.prototyping) @@ -79,10 +79,10 @@ return ans;}}} return false;},getSubtree:function(tree,id){if(tree.id==id) return tree;for(var i=0,ch=tree.children;i=(7-4*a)/11){value=b*b-Math.pow((11-6*a-11*p)/4,2);break;}} -return value;},Elastic:function(p,x){return Math.pow(2,10*--p)*Math.cos(20*p*Math.PI*(x[0]||1)/3);}};$.each(transitions,function(val,key){Trans[key]=makeTrans(val);});$.each(['Quad','Cubic','Quart','Quint'],function(elem,i){Trans[elem]=makeTrans(function(p){return Math.pow(p,[i+2]);});});})();var Animation=new Class({initialize:function(options){this.setOptions(options);},setOptions:function(options){var opt={duration:2500,fps:40,transition:Trans.Quart.easeInOut,compute:$.empty,complete:$.empty,link:'ignore'};this.opt=$.merge(opt,options||{});return this;},step:function(){var time=$.time(),opt=this.opt;if(time=(7-4*a)/ 11){value=b*b-Math.pow((11-6*a-11*p)/ 4,2);break;}} +return value;},Elastic:function(p,x){return Math.pow(2,10*--p)*Math.cos(20*p*Math.PI*(x[0]||1)/ 3);}};$.each(transitions,function(val,key){Trans[key]=makeTrans(val);});$.each(['Quad','Cubic','Quart','Quint'],function(elem,i){Trans[elem]=makeTrans(function(p){return Math.pow(p,[i+2]);});});})();var Animation=new Class({initialize:function(options){this.setOptions(options);},setOptions:function(options){var opt={duration:2500,fps:40,transition:Trans.Quart.easeInOut,compute:$.empty,complete:$.empty,link:'ignore'};this.opt=$.merge(opt,options||{});return this;},step:function(){var time=$.time(),opt=this.opt;if(timeet){sum=ch((et+((tt-pi2)-et)*delta));}else{sum=ch((et-pi2+(tt-(et))*delta));}}else if(diff>=pi){if(tt>et){sum=ch((et+((tt-pi2)-et)*delta));}else{sum=ch((et-pi2+(tt-(et-pi2))*delta));}}else{sum=ch((et+(tt-et)*delta));} -var r=(this.rho-elem.rho)*delta+elem.rho;return{'theta':sum,'rho':r};}};var $P=function(a,b){return new Polar(a,b);};Polar.KER=$P(0,0);var Complex=function(x,y){this.x=x;this.y=y;};$jit.Complex=Complex;Complex.prototype={getc:function(){return this;},getp:function(simple){return this.toPolar(simple);},set:function(c){c=c.getc(true);this.x=c.x;this.y=c.y;},setc:function(x,y){this.x=x;this.y=y;},setp:function(theta,rho){this.x=Math.cos(theta)*rho;this.y=Math.sin(theta)*rho;},clone:function(){return new Complex(this.x,this.y);},toPolar:function(simple){var rho=this.norm();var atan=Math.atan2(this.y,this.x);if(atan<0)atan+=Math.PI*2;if(simple)return{'theta':atan,'rho':rho};return new Polar(atan,rho);},norm:function(){return Math.sqrt(this.squaredNorm());},squaredNorm:function(){return this.x*this.x+this.y*this.y;},add:function(pos){return new Complex(this.x+pos.x,this.y+pos.y);},prod:function(pos){return new Complex(this.x*pos.x-this.y*pos.y,this.y*pos.x+this.x*pos.y);},conjugate:function(){return new Complex(this.x,-this.y);},scale:function(factor){return new Complex(this.x*factor,this.y*factor);},equals:function(c){return this.x==c.x&&this.y==c.y;},$add:function(pos){this.x+=pos.x;this.y+=pos.y;return this;},$prod:function(pos){var x=this.x,y=this.y;this.x=x*pos.x-y*pos.y;this.y=y*pos.x+x*pos.y;return this;},$conjugate:function(){this.y=-this.y;return this;},$scale:function(factor){this.x*=factor;this.y*=factor;return this;},$div:function(pos){var x=this.x,y=this.y;var sq=pos.squaredNorm();this.x=x*pos.x+y*pos.y;this.y=y*pos.x-x*pos.y;return this.$scale(1/sq);}};var $C=function(a,b){return new Complex(a,b);};Complex.KER=$C(0,0);$jit.Graph=new Class({initialize:function(opt,Node,Edge,Label){var innerOptions={'complex':false,'Node':{}};this.Node=Node;this.Edge=Edge;this.Label=Label;this.opt=$.merge(innerOptions,opt||{});this.nodes={};this.edges={};var that=this;this.nodeList={};for(var p in Accessors){that.nodeList[p]=(function(p){return function(){var args=Array.prototype.slice.call(arguments);that.eachNode(function(n){n[p].apply(n,args);});};})(p);}},getNode:function(id){if(this.hasNode(id))return this.nodes[id];return false;},getByName:function(name){for(var id in this.nodes){var n=this.nodes[id];if(n.name==name)return n;} +return this.ctx=this.canvas.getContext('2d');return this.ctx;},getSize:function(){if(this.size)return this.size;var canvas=this.canvas;return this.size={width:canvas.width,height:canvas.height};},translateToCenter:function(ps){var size=this.getSize(),width=ps?(size.width-ps.width-this.translateOffsetX*2):size.width;height=ps?(size.height-ps.height-this.translateOffsetY*2):size.height;var ctx=this.getCtx();ps&&ctx.scale(1/this.scaleOffsetX,1/this.scaleOffsetY);ctx.translate(width/2,height/2);},resize:function(width,height){var size=this.getSize(),canvas=this.canvas,styles=canvas.style;this.size=false;canvas.width=width;canvas.height=height;styles.width=width+"px";styles.height=height+"px";this.translateToCenter();this.translateOffsetX=this.translateOffsetY=0;this.scaleOffsetX=this.scaleOffsetY=1;this.clear();this.viz.resize(width,height,this);},translate:function(x,y,disablePlot){var sx=this.scaleOffsetX,sy=this.scaleOffsetY;this.translateOffsetX+=x*sx;this.translateOffsetY+=y*sy;this.getCtx().translate(x,y);!disablePlot&&this.plot();},scale:function(x,y,disablePlot){this.scaleOffsetX*=x;this.scaleOffsetY*=y;this.getCtx().scale(x,y);!disablePlot&&this.plot();},clear:function(){var size=this.getSize(),ox=this.translateOffsetX,oy=this.translateOffsetY,sx=this.scaleOffsetX,sy=this.scaleOffsetY;this.getCtx().clearRect((-size.width / 2-ox)*1/sx,(-size.height / 2-oy)*1/sy,size.width*1/sx,size.height*1/sy);},plot:function(){this.clear();this.viz.plot(this);}});Canvas.Background={};Canvas.Background.Circles=new Class({initialize:function(viz,options){this.viz=viz;this.config=$.merge({idSuffix:'-bkcanvas',levelDistance:100,numberOfCircles:6,CanvasStyles:{},offset:0},options);},resize:function(width,height,base){this.plot(base);},plot:function(base){var canvas=base.canvas,ctx=base.getCtx(),conf=this.config,styles=conf.CanvasStyles;for(var s in styles)ctx[s]=styles[s];var n=conf.numberOfCircles,rho=conf.levelDistance;for(var i=1;i<=n;i++){ctx.beginPath();ctx.arc(0,0,rho*i,0,2*Math.PI,false);ctx.stroke();ctx.closePath();}}});Canvas.Background.Fade=new Class({initialize:function(viz,options){this.viz=viz;this.config=$.merge({idSuffix:'-bkcanvas',CanvasStyles:{},offset:0},options);},resize:function(width,height,base){this.plot(base);},plot:function(base){var canvas=base.canvas,ctx=base.getCtx(),conf=this.config,styles=conf.CanvasStyles,size=base.getSize();ctx.fillStyle='rgb(255,255,255)';ctx.fillRect(-size.width/2,-size.height/2,size.width,size.height);}});})();var Polar=function(theta,rho){this.theta=theta;this.rho=rho;};$jit.Polar=Polar;Polar.prototype={getc:function(simple){return this.toComplex(simple);},getp:function(){return this;},set:function(v){v=v.getp();this.theta=v.theta;this.rho=v.rho;},setc:function(x,y){this.rho=Math.sqrt(x*x+y*y);this.theta=Math.atan2(y,x);if(this.theta<0)this.theta+=Math.PI*2;},setp:function(theta,rho){this.theta=theta;this.rho=rho;},clone:function(){return new Polar(this.theta,this.rho);},toComplex:function(simple){var x=Math.cos(this.theta)*this.rho;var y=Math.sin(this.theta)*this.rho;if(simple)return{'x':x,'y':y};return new Complex(x,y);},add:function(polar){return new Polar(this.theta+polar.theta,this.rho+polar.rho);},scale:function(number){return new Polar(this.theta,this.rho*number);},equals:function(c){return this.theta==c.theta&&this.rho==c.rho;},$add:function(polar){this.theta=this.theta+polar.theta;this.rho+=polar.rho;return this;},$madd:function(polar){this.theta=(this.theta+polar.theta)%(Math.PI*2);this.rho+=polar.rho;return this;},$scale:function(number){this.rho*=number;return this;},interpolate:function(elem,delta){var pi=Math.PI,pi2=pi*2;var ch=function(t){var a=(t<0)?(t%pi2)+pi2:t%pi2;return a;};var tt=this.theta,et=elem.theta;var sum,diff=Math.abs(tt-et);if(diff==pi){if(tt>et){sum=ch((et+((tt-pi2)-et)*delta));}else{sum=ch((et-pi2+(tt-(et))*delta));}}else if(diff>=pi){if(tt>et){sum=ch((et+((tt-pi2)-et)*delta));}else{sum=ch((et-pi2+(tt-(et-pi2))*delta));}}else{sum=ch((et+(tt-et)*delta));} +var r=(this.rho-elem.rho)*delta+elem.rho;return{'theta':sum,'rho':r};}};var $P=function(a,b){return new Polar(a,b);};Polar.KER=$P(0,0);var Complex=function(x,y){this.x=x;this.y=y;};$jit.Complex=Complex;Complex.prototype={getc:function(){return this;},getp:function(simple){return this.toPolar(simple);},set:function(c){c=c.getc(true);this.x=c.x;this.y=c.y;},setc:function(x,y){this.x=x;this.y=y;},setp:function(theta,rho){this.x=Math.cos(theta)*rho;this.y=Math.sin(theta)*rho;},clone:function(){return new Complex(this.x,this.y);},toPolar:function(simple){var rho=this.norm();var atan=Math.atan2(this.y,this.x);if(atan<0)atan+=Math.PI*2;if(simple)return{'theta':atan,'rho':rho};return new Polar(atan,rho);},norm:function(){return Math.sqrt(this.squaredNorm());},squaredNorm:function(){return this.x*this.x+this.y*this.y;},add:function(pos){return new Complex(this.x+pos.x,this.y+pos.y);},prod:function(pos){return new Complex(this.x*pos.x-this.y*pos.y,this.y*pos.x+this.x*pos.y);},conjugate:function(){return new Complex(this.x,-this.y);},scale:function(factor){return new Complex(this.x*factor,this.y*factor);},equals:function(c){return this.x==c.x&&this.y==c.y;},$add:function(pos){this.x+=pos.x;this.y+=pos.y;return this;},$prod:function(pos){var x=this.x,y=this.y;this.x=x*pos.x-y*pos.y;this.y=y*pos.x+x*pos.y;return this;},$conjugate:function(){this.y=-this.y;return this;},$scale:function(factor){this.x*=factor;this.y*=factor;return this;},$div:function(pos){var x=this.x,y=this.y;var sq=pos.squaredNorm();this.x=x*pos.x+y*pos.y;this.y=y*pos.x-x*pos.y;return this.$scale(1 / sq);}};var $C=function(a,b){return new Complex(a,b);};Complex.KER=$C(0,0);$jit.Graph=new Class({initialize:function(opt,Node,Edge,Label){var innerOptions={'complex':false,'Node':{}};this.Node=Node;this.Edge=Edge;this.Label=Label;this.opt=$.merge(innerOptions,opt||{});this.nodes={};this.edges={};var that=this;this.nodeList={};for(var p in Accessors){that.nodeList[p]=(function(p){return function(){var args=Array.prototype.slice.call(arguments);that.eachNode(function(n){n[p].apply(n,args);});};})(p);}},getNode:function(id){if(this.hasNode(id))return this.nodes[id];return false;},getByName:function(name){for(var id in this.nodes){var n=this.nodes[id];if(n.name==name)return n;} return false;},getAdjacence:function(id,id2){if(id in this.edges){return this.edges[id][id2];} return false;},addNode:function(obj){if(!this.nodes[obj.id]){var edges=this.edges[obj.id]={};this.nodes[obj.id]=new Graph.Node($.extend({'id':obj.id,'name':obj.name,'data':$.merge(obj.data||{},{}),'adjacencies':edges},this.opt.Node),this.opt.complex,this.Node,this.Edge,this.Label);} return this.nodes[obj.id];},addAdjacence:function(obj,obj2,data){if(!this.hasNode(obj.id)){this.addNode(obj);} @@ -146,21 +146,21 @@ action(a,id);}}},computeLevels:function(graph,id,startDepth,flags){startDepth=st this.eachLevel(node,levelStart,levelEnd,function(n){ans.push(n);},flags);return ans;},getParents:function(node){var ans=[];this.eachAdjacency(node,function(adj){var n=adj.nodeTo;if(n._depth-1)){elem.endData[prop]=graphNodeData[prop];}else{elem.data[prop]=graphNodeData[prop];}}}});viz.graph.eachNode(function(elem){if(elem.ignore)return;elem.eachAdjacency(function(adj){if(adj.nodeFrom.ignore||adj.nodeTo.ignore)return;var nodeFrom=graph.getNode(adj.nodeFrom.id);var nodeTo=graph.getNode(adj.nodeTo.id);if(!nodeFrom.adjacentTo(nodeTo)){var adj=viz.graph.getAdjacence(nodeFrom.id,nodeTo.id);fadeEdges=true;adj.setData('alpha',1);adj.setData('alpha',1,'start');adj.setData('alpha',0,'end');}});});var fadeEdges=this.preprocessSum(graph);var modes=!fadeEdges?['node-property:alpha']:['node-property:alpha','edge-property:alpha'];modes[0]=modes[0]+((extraModes&&('node-property'in extraModes))?(':'+$.splat(extraModes['node-property']).join(':')):'');modes[1]=(modes[1]||'edge-property:alpha')+((extraModes&&('edge-property'in extraModes))?(':'+$.splat(extraModes['edge-property']).join(':')):'');if(extraModes&&('label-property'in extraModes)){modes.push('label-property:'+$.splat(extraModes['label-property']).join(':'))} viz.reposition();viz.graph.eachNode(function(elem){if(elem.id!=root&&elem.pos.getp().equals(Polar.KER)){elem.pos.set(elem.endPos);elem.startPos.set(elem.endPos);}});viz.fx.animate($.merge(options,{modes:['polar'].concat(modes),onComplete:function(){viz.graph.eachNode(function(elem){if(elem.ignore)viz.graph.removeNode(elem.id);});viz.graph.eachNode(function(elem){elem.eachAdjacency(function(adj){if(adj.ignore)viz.graph.removeAdjacence(adj.nodeFrom.id,adj.nodeTo.id);});});options.onComplete();}}));break;default:;}},contract:function(node,opt){var viz=this.viz;if(node.collapsed||!node.anySubnode($.lambda(true)))return;opt=$.merge(this.options,viz.config,opt||{},{'modes':['node-property:alpha:span','linear']});node.collapsed=true;(function subn(n){n.eachSubnode(function(ch){ch.ignore=true;ch.setData('alpha',0,opt.type=='animate'?'end':'current');subn(ch);});})(node);if(opt.type=='animate'){viz.compute('end');if(viz.rotated){viz.rotate(viz.rotated,'none',{'property':'end'});} (function subn(n){n.eachSubnode(function(ch){ch.setPos(node.getPos('end'),'end');subn(ch);});})(node);viz.fx.animate(opt);}else if(opt.type=='replot'){viz.refresh();}},expand:function(node,opt){if(!('collapsed'in node))return;var viz=this.viz;opt=$.merge(this.options,viz.config,opt||{},{'modes':['node-property:alpha:span','linear']});delete node.collapsed;(function subn(n){n.eachSubnode(function(ch){delete ch.ignore;ch.setData('alpha',1,opt.type=='animate'?'end':'current');subn(ch);});})(node);if(opt.type=='animate'){viz.compute('end');if(viz.rotated){viz.rotate(viz.rotated,'none',{'property':'end'});} -viz.fx.animate(opt);}else if(opt.type=='replot'){viz.refresh();}},preprocessSum:function(graph){var viz=this.viz;graph.eachNode(function(elem){if(!viz.graph.hasNode(elem.id)){viz.graph.addNode(elem);var n=viz.graph.getNode(elem.id);n.setData('alpha',0);n.setData('alpha',0,'start');n.setData('alpha',1,'end');}});var fadeEdges=false;graph.eachNode(function(elem){elem.eachAdjacency(function(adj){var nodeFrom=viz.graph.getNode(adj.nodeFrom.id);var nodeTo=viz.graph.getNode(adj.nodeTo.id);if(!nodeFrom.adjacentTo(nodeTo)){var adj=viz.graph.addAdjacence(nodeFrom,nodeTo,adj.data);if(nodeFrom.startAlpha==nodeFrom.endAlpha&&nodeTo.startAlpha==nodeTo.endAlpha){fadeEdges=true;adj.setData('alpha',0);adj.setData('alpha',0,'start');adj.setData('alpha',1,'end');}}});});return fadeEdges;}};var NodeHelper={'none':{'render':$.empty,'contains':$.lambda(false)},'circle':{'render':function(type,pos,radius,canvas){var ctx=canvas.getCtx();ctx.beginPath();ctx.arc(pos.x,pos.y,radius,0,Math.PI*2,true);ctx.closePath();ctx[type]();},'contains':function(npos,pos,radius){var diffx=npos.x-pos.x,diffy=npos.y-pos.y,diff=diffx*diffx+diffy*diffy;return diff<=radius*radius;}},'ellipse':{'render':function(type,pos,width,height,canvas){var ctx=canvas.getCtx();height/=2;width/=2;ctx.save();ctx.scale(width/height,height/width);ctx.beginPath();ctx.arc(pos.x*(height/width),pos.y*(width/height),height,0,Math.PI*2,true);ctx.closePath();ctx[type]();ctx.restore();},'contains':function(npos,pos,width,height){width/=2;height/=2;var dist=(width+height)/2,diffx=npos.x-pos.x,diffy=npos.y-pos.y,diff=diffx*diffx+diffy*diffy;return diff<=dist*dist;}},'square':{'render':function(type,pos,dim,canvas){canvas.getCtx()[type+"Rect"](pos.x-dim,pos.y-dim,2*dim,2*dim);},'contains':function(npos,pos,dim){return Math.abs(pos.x-npos.x)<=dim&&Math.abs(pos.y-npos.y)<=dim;}},'rectangle':{'render':function(type,pos,width,height,canvas){canvas.getCtx()[type+"Rect"](pos.x-width/2,pos.y-height/2,width,height);},'contains':function(npos,pos,width,height){return Math.abs(pos.x-npos.x)<=width/2&&Math.abs(pos.y-npos.y)<=height/2;}},'triangle':{'render':function(type,pos,dim,canvas){var ctx=canvas.getCtx(),c1x=pos.x,c1y=pos.y-dim,c2x=c1x-dim,c2y=pos.y+dim,c3x=c1x+dim,c3y=c2y;ctx.beginPath();ctx.moveTo(c1x,c1y);ctx.lineTo(c2x,c2y);ctx.lineTo(c3x,c3y);ctx.closePath();ctx[type]();},'contains':function(npos,pos,dim){return NodeHelper.circle.contains(npos,pos,dim);}},'star':{'render':function(type,pos,dim,canvas){var ctx=canvas.getCtx(),pi5=Math.PI/5;ctx.save();ctx.translate(pos.x,pos.y);ctx.beginPath();ctx.moveTo(dim,0);for(var i=0;i<9;i++){ctx.rotate(pi5);if(i%2==0){ctx.lineTo((dim/0.525731)*0.200811,0);}else{ctx.lineTo(dim,0);}} +viz.fx.animate(opt);}else if(opt.type=='replot'){viz.refresh();}},preprocessSum:function(graph){var viz=this.viz;graph.eachNode(function(elem){if(!viz.graph.hasNode(elem.id)){viz.graph.addNode(elem);var n=viz.graph.getNode(elem.id);n.setData('alpha',0);n.setData('alpha',0,'start');n.setData('alpha',1,'end');}});var fadeEdges=false;graph.eachNode(function(elem){elem.eachAdjacency(function(adj){var nodeFrom=viz.graph.getNode(adj.nodeFrom.id);var nodeTo=viz.graph.getNode(adj.nodeTo.id);if(!nodeFrom.adjacentTo(nodeTo)){var adj=viz.graph.addAdjacence(nodeFrom,nodeTo,adj.data);if(nodeFrom.startAlpha==nodeFrom.endAlpha&&nodeTo.startAlpha==nodeTo.endAlpha){fadeEdges=true;adj.setData('alpha',0);adj.setData('alpha',0,'start');adj.setData('alpha',1,'end');}}});});return fadeEdges;}};var NodeHelper={'none':{'render':$.empty,'contains':$.lambda(false)},'circle':{'render':function(type,pos,radius,canvas){var ctx=canvas.getCtx();ctx.beginPath();ctx.arc(pos.x,pos.y,radius,0,Math.PI*2,true);ctx.closePath();ctx[type]();},'contains':function(npos,pos,radius){var diffx=npos.x-pos.x,diffy=npos.y-pos.y,diff=diffx*diffx+diffy*diffy;return diff<=radius*radius;}},'ellipse':{'render':function(type,pos,width,height,canvas){var ctx=canvas.getCtx();height /=2;width /=2;ctx.save();ctx.scale(width / height,height / width);ctx.beginPath();ctx.arc(pos.x*(height / width),pos.y*(width / height),height,0,Math.PI*2,true);ctx.closePath();ctx[type]();ctx.restore();},'contains':function(npos,pos,width,height){width /=2;height /=2;var dist=(width+height)/ 2,diffx=npos.x-pos.x,diffy=npos.y-pos.y,diff=diffx*diffx+diffy*diffy;return diff<=dist*dist;}},'square':{'render':function(type,pos,dim,canvas){canvas.getCtx()[type+"Rect"](pos.x-dim,pos.y-dim,2*dim,2*dim);},'contains':function(npos,pos,dim){return Math.abs(pos.x-npos.x)<=dim&&Math.abs(pos.y-npos.y)<=dim;}},'rectangle':{'render':function(type,pos,width,height,canvas){canvas.getCtx()[type+"Rect"](pos.x-width / 2,pos.y-height / 2,width,height);},'contains':function(npos,pos,width,height){return Math.abs(pos.x-npos.x)<=width / 2&&Math.abs(pos.y-npos.y)<=height / 2;}},'triangle':{'render':function(type,pos,dim,canvas){var ctx=canvas.getCtx(),c1x=pos.x,c1y=pos.y-dim,c2x=c1x-dim,c2y=pos.y+dim,c3x=c1x+dim,c3y=c2y;ctx.beginPath();ctx.moveTo(c1x,c1y);ctx.lineTo(c2x,c2y);ctx.lineTo(c3x,c3y);ctx.closePath();ctx[type]();},'contains':function(npos,pos,dim){return NodeHelper.circle.contains(npos,pos,dim);}},'star':{'render':function(type,pos,dim,canvas){var ctx=canvas.getCtx(),pi5=Math.PI / 5;ctx.save();ctx.translate(pos.x,pos.y);ctx.beginPath();ctx.moveTo(dim,0);for(var i=0;i<9;i++){ctx.rotate(pi5);if(i%2==0){ctx.lineTo((dim / 0.525731)*0.200811,0);}else{ctx.lineTo(dim,0);}} ctx.closePath();ctx[type]();ctx.restore();},'contains':function(npos,pos,dim){return NodeHelper.circle.contains(npos,pos,dim);}}};var EdgeHelper={'line':{'render':function(from,to,canvas){var ctx=canvas.getCtx();ctx.beginPath();ctx.moveTo(from.x,from.y);ctx.lineTo(to.x,to.y);ctx.stroke();},'contains':function(posFrom,posTo,pos,epsilon){var min=Math.min,max=Math.max,minPosX=min(posFrom.x,posTo.x),maxPosX=max(posFrom.x,posTo.x),minPosY=min(posFrom.y,posTo.y),maxPosY=max(posFrom.y,posTo.y);if(pos.x>=minPosX&&pos.x<=maxPosX&&pos.y>=minPosY&&pos.y<=maxPosY){if(Math.abs(posTo.x-posFrom.x)<=epsilon){return true;} var dist=(posTo.y-posFrom.y)/(posTo.x-posFrom.x)*(pos.x-posFrom.x)+posFrom.y;return Math.abs(dist-pos.y)<=epsilon;} return false;}},'arrow':{'render':function(from,to,dim,swap,canvas){var ctx=canvas.getCtx();if(swap){var tmp=from;from=to;to=tmp;} -var vect=new Complex(to.x-from.x,to.y-from.y);vect.$scale(dim/vect.norm());var intermediatePoint=new Complex(to.x-vect.x,to.y-vect.y),normal=new Complex(-vect.y/2,vect.x/2),v1=intermediatePoint.add(normal),v2=intermediatePoint.$add(normal.$scale(-1));ctx.beginPath();ctx.moveTo(from.x,from.y);ctx.lineTo(to.x,to.y);ctx.stroke();ctx.beginPath();ctx.moveTo(v1.x,v1.y);ctx.lineTo(v2.x,v2.y);ctx.lineTo(to.x,to.y);ctx.closePath();ctx.fill();},'contains':function(posFrom,posTo,pos,epsilon){return EdgeHelper.line.contains(posFrom,posTo,pos,epsilon);}},'hyperline':{'render':function(from,to,r,canvas){var ctx=canvas.getCtx();var centerOfCircle=computeArcThroughTwoPoints(from,to);if(centerOfCircle.a>1000||centerOfCircle.b>1000||centerOfCircle.ratio<0){ctx.beginPath();ctx.moveTo(from.x*r,from.y*r);ctx.lineTo(to.x*r,to.y*r);ctx.stroke();}else{var angleBegin=Math.atan2(to.y-centerOfCircle.y,to.x +var vect=new Complex(to.x-from.x,to.y-from.y);vect.$scale(dim / vect.norm());var intermediatePoint=new Complex(to.x-vect.x,to.y-vect.y),normal=new Complex(-vect.y / 2,vect.x / 2),v1=intermediatePoint.add(normal),v2=intermediatePoint.$add(normal.$scale(-1));ctx.beginPath();ctx.moveTo(from.x,from.y);ctx.lineTo(to.x,to.y);ctx.stroke();ctx.beginPath();ctx.moveTo(v1.x,v1.y);ctx.lineTo(v2.x,v2.y);ctx.lineTo(to.x,to.y);ctx.closePath();ctx.fill();},'contains':function(posFrom,posTo,pos,epsilon){return EdgeHelper.line.contains(posFrom,posTo,pos,epsilon);}},'hyperline':{'render':function(from,to,r,canvas){var ctx=canvas.getCtx();var centerOfCircle=computeArcThroughTwoPoints(from,to);if(centerOfCircle.a>1000||centerOfCircle.b>1000||centerOfCircle.ratio<0){ctx.beginPath();ctx.moveTo(from.x*r,from.y*r);ctx.lineTo(to.x*r,to.y*r);ctx.stroke();}else{var angleBegin=Math.atan2(to.y-centerOfCircle.y,to.x -centerOfCircle.x);var angleEnd=Math.atan2(from.y-centerOfCircle.y,from.x -centerOfCircle.x);var sense=sense(angleBegin,angleEnd);ctx.beginPath();ctx.arc(centerOfCircle.x*r,centerOfCircle.y*r,centerOfCircle.ratio*r,angleBegin,angleEnd,sense);ctx.stroke();} function computeArcThroughTwoPoints(p1,p2){var aDen=(p1.x*p2.y-p1.y*p2.x),bDen=aDen;var sq1=p1.squaredNorm(),sq2=p2.squaredNorm();if(aDen==0) -return{x:0,y:0,ratio:-1};var a=(p1.y*sq2-p2.y*sq1+p1.y-p2.y)/aDen;var b=(p2.x*sq1-p1.x*sq2+p2.x-p1.x)/bDen;var x=-a/2;var y=-b/2;var squaredRatio=(a*a+b*b)/4-1;if(squaredRatio<0) +return{x:0,y:0,ratio:-1};var a=(p1.y*sq2-p2.y*sq1+p1.y-p2.y)/ aDen;var b=(p2.x*sq1-p1.x*sq2+p2.x-p1.x)/ bDen;var x=-a / 2;var y=-b / 2;var squaredRatio=(a*a+b*b)/ 4-1;if(squaredRatio<0) return{x:0,y:0,ratio:-1};var ratio=Math.sqrt(squaredRatio);var out={x:x,y:y,ratio:ratio>1000?-1:ratio,a:a,b:b};return out;} function sense(angleBegin,angleEnd){return(angleBeginangleEnd)?false:true):((angleEnd+Math.PI>angleBegin)?true:false);}},'contains':$.lambda(false)}};Graph.Plot={initialize:function(viz,klass){this.viz=viz;this.config=viz.config;this.node=viz.config.Node;this.edge=viz.config.Edge;this.animation=new Animation;this.nodeTypes=new klass.Plot.NodeTypes;this.edgeTypes=new klass.Plot.EdgeTypes;this.labels=viz.labels;},nodeHelper:NodeHelper,edgeHelper:EdgeHelper,Interpolator:{'map':{'border':'color','color':'color','width':'number','height':'number','dim':'number','alpha':'number','lineWidth':'number','angularWidth':'number','span':'number','valueArray':'array-number','dimArray':'array-number'},'canvas':{'globalAlpha':'number','fillStyle':'color','strokeStyle':'color','lineWidth':'number','shadowBlur':'number','shadowColor':'color','shadowOffsetX':'number','shadowOffsetY':'number','miterLimit':'number'},'label':{'size':'number','color':'color'},'compute':function(from,to,delta){return from+(to-from)*delta;},'moebius':function(elem,props,delta,vector){var v=vector.scale(-delta);if(v.norm()<1){var x=v.x,y=v.y;var ans=elem.startPos.getc().moebiusTransformation(v);elem.pos.setc(ans.x,ans.y);v.x=x;v.y=y;}},'linear':function(elem,props,delta){var from=elem.startPos.getc(true);var to=elem.endPos.getc(true);elem.pos.setc(this.compute(from.x,to.x,delta),this.compute(from.y,to.y,delta));},'polar':function(elem,props,delta){var from=elem.startPos.getp(true);var to=elem.endPos.getp();var ans=to.interpolate(from,delta);elem.pos.setp(ans.theta,ans.rho);},'number':function(elem,prop,delta,getter,setter){var from=elem[getter](prop,'start');var to=elem[getter](prop,'end');elem[setter](prop,this.compute(from,to,delta));},'color':function(elem,prop,delta,getter,setter){var from=$.hexToRgb(elem[getter](prop,'start'));var to=$.hexToRgb(elem[getter](prop,'end'));var comp=this.compute;var val=$.rgbToHex([parseInt(comp(from[0],to[0],delta)),parseInt(comp(from[1],to[1],delta)),parseInt(comp(from[2],to[2],delta))]);elem[setter](prop,val);},'array-number':function(elem,prop,delta,getter,setter){var from=elem[getter](prop,'start'),to=elem[getter](prop,'end'),cur=[];for(var i=0,l=from.length;i=size.width||pos.x<0||pos.y>=size.height||pos.y<0)return false;return true;}});Graph.Label.HTML=new Class({Implements:Graph.Label.DOM,plotLabel:function(canvas,node,controller){var id=node.id,tag=this.getLabel(id);if(!tag&&!(tag=document.getElementById(id))){tag=document.createElement('div');var container=this.getLabelContainer();tag.id=id;tag.className='node';tag.style.position='absolute';controller.onCreateLabel(tag,node);container.appendChild(tag);this.labels[node.id]=tag;} this.placeLabel(tag,node,controller);}});Graph.Label.SVG=new Class({Implements:Graph.Label.DOM,plotLabel:function(canvas,node,controller){var id=node.id,tag=this.getLabel(id);if(!tag&&!(tag=document.getElementById(id))){var ns='http://www.w3.org/2000/svg';tag=document.createElementNS(ns,'svg:text');var tspan=document.createElementNS(ns,'svg:tspan');tag.appendChild(tspan);var container=this.getLabelContainer();tag.setAttribute('id',id);tag.setAttribute('class','node');container.appendChild(tag);controller.onCreateLabel(tag,node);this.labels[node.id]=tag;} @@ -202,11 +202,11 @@ function fitlistr(es,subtreeOffset,siblingOffset){function $fitlistr(acc,es,i){i return[];var e=es[i],ans=-fit(e,acc,subtreeOffset,siblingOffset,0);return[ans].concat($fitlistr(merge(moveextent(e,ans),acc),es,++i));};es=slice.call(es);var ans=$fitlistr([],es.reverse(),0);return ans.reverse();} function fitlist(es,subtreeOffset,siblingOffset,align){var esl=fitlistl(es,subtreeOffset,siblingOffset),esr=fitlistr(es,subtreeOffset,siblingOffset);if(align=="left") esr=esl;else if(align=="right") -esl=esr;for(var i=0,ans=[];i0)viz.fx.plot();for(i in nds){$.each(nds[i],function(n){n.drawn= for(i=0;ibaseHeight?size:baseHeight)+this.config.subtreeOffset;},getEdge:function(node,type,s){var $C=function(a,b){return function(){return node.pos.add(new Complex(a,b));};};var dim=this.node;var w=node.getData('width');var h=node.getData('height');if(type=='begin'){if(dim.align=="center"){return this.dispatch(s,$C(0,h/2),$C(-w/2,0),$C(0,-h/2),$C(w/2,0));}else if(dim.align=="left"){return this.dispatch(s,$C(0,h),$C(0,0),$C(0,0),$C(w,0));}else if(dim.align=="right"){return this.dispatch(s,$C(0,0),$C(-w,0),$C(0,-h),$C(0,0));}else throw"align: not implemented";}else if(type=='end'){if(dim.align=="center"){return this.dispatch(s,$C(0,-h/2),$C(w/2,0),$C(0,h/2),$C(-w/2,0));}else if(dim.align=="left"){return this.dispatch(s,$C(0,0),$C(w,0),$C(0,h),$C(0,0));}else if(dim.align=="right"){return this.dispatch(s,$C(0,-h),$C(0,0),$C(0,0),$C(-w,0));}else throw"align: not implemented";}},getScaledTreePosition:function(node,scale){var dim=this.node;var w=node.getData('width');var h=node.getData('height');var s=(this.config.multitree&&('$orn'in node.data)&&node.data.$orn)||this.config.orientation;var $C=function(a,b){return function(){return node.pos.add(new Complex(a,b)).$scale(1-scale);};};if(dim.align=="left"){return this.dispatch(s,$C(0,h),$C(0,0),$C(0,0),$C(w,0));}else if(dim.align=="center"){return this.dispatch(s,$C(0,h/2),$C(-w/2,0),$C(0,-h/2),$C(w/2,0));}else if(dim.align=="right"){return this.dispatch(s,$C(0,0),$C(-w,0),$C(0,-h),$C(0,0));}else throw"align: not implemented";},treeFitsInCanvas:function(node,canvas,level){var csize=canvas.getSize();var s=(this.config.multitree&&('$orn'in node.data)&&node.data.$orn)||this.config.orientation;var size=this.dispatch(s,csize.width,csize.height);var baseSize=this.getTreeBaseSize(node,level,function(level,node){return level===0||!node.anySubnode();});return(baseSize=0){node.drawn=false;var ctx=canvas.getCtx();var diff=viz.geom.getScaledTreePosition(node,scale);ctx.translate(diff.x,diff.y);ctx.scale(scale,scale);} -this.plotTree(node,$.merge(opt,{'withLabels':true,'hideLabels':!!scale,'plotSubtree':function(n,ch){var root=config.multitree&&!('$orn'in node.data);var orns=root&&node.getData('orns');return!root||orns.indexOf(elem.getData('orn'))>-1;}}),animating);if(scale>=0)node.drawn=true;},getAlignedPos:function(pos,width,height){var nconfig=this.node;var square,orn;if(nconfig.align=="center"){square={x:pos.x-width/2,y:pos.y-height/2};}else if(nconfig.align=="left"){orn=this.config.orientation;if(orn=="bottom"||orn=="top"){square={x:pos.x-width/2,y:pos.y};}else{square={x:pos.x,y:pos.y-height/2};}}else if(nconfig.align=="right"){orn=this.config.orientation;if(orn=="bottom"||orn=="top"){square={x:pos.x-width/2,y:pos.y-height};}else{square={x:pos.x-width,y:pos.y-height/2};}}else throw"align: not implemented";return square;},getOrientation:function(adj){var config=this.config;var orn=config.orientation;if(config.multitree){var nodeFrom=adj.nodeFrom;var nodeTo=adj.nodeTo;orn=(('$orn'in nodeFrom.data)&&nodeFrom.data.$orn)||(('$orn'in nodeTo.data)&&nodeTo.data.$orn);} -return orn;}});$jit.ST.Label={};$jit.ST.Label.Native=new Class({Implements:Graph.Label.Native,renderLabel:function(canvas,node,controller){var ctx=canvas.getCtx();var coord=node.pos.getc(true);ctx.fillText(node.name,coord.x,coord.y);}});$jit.ST.Label.DOM=new Class({Implements:Graph.Label.DOM,placeLabel:function(tag,node,controller){var pos=node.pos.getc(true),config=this.viz.config,dim=config.Node,canvas=this.viz.canvas,w=node.getData('width'),h=node.getData('height'),radius=canvas.getSize(),labelPos,orn;var ox=canvas.translateOffsetX,oy=canvas.translateOffsetY,sx=canvas.scaleOffsetX,sy=canvas.scaleOffsetY,posx=pos.x*sx+ox,posy=pos.y*sy+oy;if(dim.align=="center"){labelPos={x:Math.round(posx-w/2+radius.width/2),y:Math.round(posy-h/2+radius.height/2)};}else if(dim.align=="left"){orn=config.orientation;if(orn=="bottom"||orn=="top"){labelPos={x:Math.round(posx-w/2+radius.width/2),y:Math.round(posy+radius.height/2)};}else{labelPos={x:Math.round(posx+radius.width/2),y:Math.round(posy-h/2+radius.height/2)};}}else if(dim.align=="right"){orn=config.orientation;if(orn=="bottom"||orn=="top"){labelPos={x:Math.round(posx-w/2+radius.width/2),y:Math.round(posy-h+radius.height/2)};}else{labelPos={x:Math.round(posx-w+radius.width/2),y:Math.round(posy-h/2+radius.height/2)};}}else throw"align: not implemented";var style=tag.style;style.left=labelPos.x+'px';style.top=labelPos.y+'px';style.display=this.fitsInCanvas(labelPos,canvas)?'':'none';controller.onPlaceLabel(tag,node);}});$jit.ST.Label.SVG=new Class({Implements:[$jit.ST.Label.DOM,Graph.Label.SVG],initialize:function(viz){this.viz=viz;}});$jit.ST.Label.HTML=new Class({Implements:[$jit.ST.Label.DOM,Graph.Label.HTML],initialize:function(viz){this.viz=viz;}});$jit.ST.Plot.NodeTypes=new Class({'none':{'render':$.empty,'contains':$.lambda(false)},'circle':{'render':function(node,canvas){var dim=node.getData('dim'),pos=this.getAlignedPos(node.pos.getc(true),dim,dim),dim2=dim/2;this.nodeHelper.circle.render('fill',{x:pos.x+dim2,y:pos.y+dim2},dim2,canvas);},'contains':function(node,pos){var dim=node.getData('dim'),npos=this.getAlignedPos(node.pos.getc(true),dim,dim),dim2=dim/2;this.nodeHelper.circle.contains({x:npos.x+dim2,y:npos.y+dim2},dim2);}},'square':{'render':function(node,canvas){var dim=node.getData('dim'),dim2=dim/2,pos=this.getAlignedPos(node.pos.getc(true),dim,dim);this.nodeHelper.square.render('fill',{x:pos.x+dim2,y:pos.y+dim2},dim2,canvas);},'contains':function(node,pos){var dim=node.getData('dim'),npos=this.getAlignedPos(node.pos.getc(true),dim,dim),dim2=dim/2;this.nodeHelper.square.contains({x:npos.x+dim2,y:npos.y+dim2},dim2);}},'ellipse':{'render':function(node,canvas){var width=node.getData('width'),height=node.getData('height'),pos=this.getAlignedPos(node.pos.getc(true),width,height);this.nodeHelper.ellipse.render('fill',{x:pos.x+width/2,y:pos.y+height/2},width,height,canvas);},'contains':function(node,pos){var width=node.getData('width'),height=node.getData('height'),npos=this.getAlignedPos(node.pos.getc(true),width,height);this.nodeHelper.ellipse.contains({x:npos.x+width/2,y:npos.y+height/2},width,height,canvas);}},'rectangle':{'render':function(node,canvas){var width=node.getData('width'),height=node.getData('height'),pos=this.getAlignedPos(node.pos.getc(true),width,height);this.nodeHelper.rectangle.render('fill',{x:pos.x+width/2,y:pos.y+height/2},width,height,canvas);},'contains':function(node,pos){var width=node.getData('width'),height=node.getData('height'),npos=this.getAlignedPos(node.pos.getc(true),width,height);this.nodeHelper.rectangle.contains({x:npos.x+width/2,y:npos.y+height/2},width,height,canvas);}}});$jit.ST.Plot.EdgeTypes=new Class({'none':$.empty,'line':{'render':function(adj,canvas){var orn=this.getOrientation(adj),nodeFrom=adj.nodeFrom,nodeTo=adj.nodeTo,rel=nodeFrom._depth1&&direction[0]!=node.id);this.edgeHelper.arrow.render(from,to,dim,inv,canvas);},'contains':function(adj,pos){var orn=this.getOrientation(adj),nodeFrom=adj.nodeFrom,nodeTo=adj.nodeTo,rel=nodeFrom._depthbaseHeight?size:baseHeight)+this.config.subtreeOffset;},getEdge:function(node,type,s){var $C=function(a,b){return function(){return node.pos.add(new Complex(a,b));};};var dim=this.node;var w=node.getData('width');var h=node.getData('height');if(type=='begin'){if(dim.align=="center"){return this.dispatch(s,$C(0,h/2),$C(-w/2,0),$C(0,-h/2),$C(w/2,0));}else if(dim.align=="left"){return this.dispatch(s,$C(0,h),$C(0,0),$C(0,0),$C(w,0));}else if(dim.align=="right"){return this.dispatch(s,$C(0,0),$C(-w,0),$C(0,-h),$C(0,0));}else throw"align: not implemented";}else if(type=='end'){if(dim.align=="center"){return this.dispatch(s,$C(0,-h/2),$C(w/2,0),$C(0,h/2),$C(-w/2,0));}else if(dim.align=="left"){return this.dispatch(s,$C(0,0),$C(w,0),$C(0,h),$C(0,0));}else if(dim.align=="right"){return this.dispatch(s,$C(0,-h),$C(0,0),$C(0,0),$C(-w,0));}else throw"align: not implemented";}},getScaledTreePosition:function(node,scale){var dim=this.node;var w=node.getData('width');var h=node.getData('height');var s=(this.config.multitree&&('$orn'in node.data)&&node.data.$orn)||this.config.orientation;var $C=function(a,b){return function(){return node.pos.add(new Complex(a,b)).$scale(1-scale);};};if(dim.align=="left"){return this.dispatch(s,$C(0,h),$C(0,0),$C(0,0),$C(w,0));}else if(dim.align=="center"){return this.dispatch(s,$C(0,h / 2),$C(-w / 2,0),$C(0,-h / 2),$C(w / 2,0));}else if(dim.align=="right"){return this.dispatch(s,$C(0,0),$C(-w,0),$C(0,-h),$C(0,0));}else throw"align: not implemented";},treeFitsInCanvas:function(node,canvas,level){var csize=canvas.getSize();var s=(this.config.multitree&&('$orn'in node.data)&&node.data.$orn)||this.config.orientation;var size=this.dispatch(s,csize.width,csize.height);var baseSize=this.getTreeBaseSize(node,level,function(level,node){return level===0||!node.anySubnode();});return(baseSize=0){node.drawn=false;var ctx=canvas.getCtx();var diff=viz.geom.getScaledTreePosition(node,scale);ctx.translate(diff.x,diff.y);ctx.scale(scale,scale);} +this.plotTree(node,$.merge(opt,{'withLabels':true,'hideLabels':!!scale,'plotSubtree':function(n,ch){var root=config.multitree&&!('$orn'in node.data);var orns=root&&node.getData('orns');return!root||orns.indexOf(elem.getData('orn'))>-1;}}),animating);if(scale>=0)node.drawn=true;},getAlignedPos:function(pos,width,height){var nconfig=this.node;var square,orn;if(nconfig.align=="center"){square={x:pos.x-width / 2,y:pos.y-height / 2};}else if(nconfig.align=="left"){orn=this.config.orientation;if(orn=="bottom"||orn=="top"){square={x:pos.x-width / 2,y:pos.y};}else{square={x:pos.x,y:pos.y-height / 2};}}else if(nconfig.align=="right"){orn=this.config.orientation;if(orn=="bottom"||orn=="top"){square={x:pos.x-width / 2,y:pos.y-height};}else{square={x:pos.x-width,y:pos.y-height / 2};}}else throw"align: not implemented";return square;},getOrientation:function(adj){var config=this.config;var orn=config.orientation;if(config.multitree){var nodeFrom=adj.nodeFrom;var nodeTo=adj.nodeTo;orn=(('$orn'in nodeFrom.data)&&nodeFrom.data.$orn)||(('$orn'in nodeTo.data)&&nodeTo.data.$orn);} +return orn;}});$jit.ST.Label={};$jit.ST.Label.Native=new Class({Implements:Graph.Label.Native,renderLabel:function(canvas,node,controller){var ctx=canvas.getCtx();var coord=node.pos.getc(true);ctx.fillText(node.name,coord.x,coord.y);}});$jit.ST.Label.DOM=new Class({Implements:Graph.Label.DOM,placeLabel:function(tag,node,controller){var pos=node.pos.getc(true),config=this.viz.config,dim=config.Node,canvas=this.viz.canvas,w=node.getData('width'),h=node.getData('height'),radius=canvas.getSize(),labelPos,orn;var ox=canvas.translateOffsetX,oy=canvas.translateOffsetY,sx=canvas.scaleOffsetX,sy=canvas.scaleOffsetY,posx=pos.x*sx+ox,posy=pos.y*sy+oy;if(dim.align=="center"){labelPos={x:Math.round(posx-w / 2+radius.width/2),y:Math.round(posy-h / 2+radius.height/2)};}else if(dim.align=="left"){orn=config.orientation;if(orn=="bottom"||orn=="top"){labelPos={x:Math.round(posx-w / 2+radius.width/2),y:Math.round(posy+radius.height/2)};}else{labelPos={x:Math.round(posx+radius.width/2),y:Math.round(posy-h / 2+radius.height/2)};}}else if(dim.align=="right"){orn=config.orientation;if(orn=="bottom"||orn=="top"){labelPos={x:Math.round(posx-w / 2+radius.width/2),y:Math.round(posy-h+radius.height/2)};}else{labelPos={x:Math.round(posx-w+radius.width/2),y:Math.round(posy-h / 2+radius.height/2)};}}else throw"align: not implemented";var style=tag.style;style.left=labelPos.x+'px';style.top=labelPos.y+'px';style.display=this.fitsInCanvas(labelPos,canvas)?'':'none';controller.onPlaceLabel(tag,node);}});$jit.ST.Label.SVG=new Class({Implements:[$jit.ST.Label.DOM,Graph.Label.SVG],initialize:function(viz){this.viz=viz;}});$jit.ST.Label.HTML=new Class({Implements:[$jit.ST.Label.DOM,Graph.Label.HTML],initialize:function(viz){this.viz=viz;}});$jit.ST.Plot.NodeTypes=new Class({'none':{'render':$.empty,'contains':$.lambda(false)},'circle':{'render':function(node,canvas){var dim=node.getData('dim'),pos=this.getAlignedPos(node.pos.getc(true),dim,dim),dim2=dim/2;this.nodeHelper.circle.render('fill',{x:pos.x+dim2,y:pos.y+dim2},dim2,canvas);},'contains':function(node,pos){var dim=node.getData('dim'),npos=this.getAlignedPos(node.pos.getc(true),dim,dim),dim2=dim/2;this.nodeHelper.circle.contains({x:npos.x+dim2,y:npos.y+dim2},dim2);}},'square':{'render':function(node,canvas){var dim=node.getData('dim'),dim2=dim/2,pos=this.getAlignedPos(node.pos.getc(true),dim,dim);this.nodeHelper.square.render('fill',{x:pos.x+dim2,y:pos.y+dim2},dim2,canvas);},'contains':function(node,pos){var dim=node.getData('dim'),npos=this.getAlignedPos(node.pos.getc(true),dim,dim),dim2=dim/2;this.nodeHelper.square.contains({x:npos.x+dim2,y:npos.y+dim2},dim2);}},'ellipse':{'render':function(node,canvas){var width=node.getData('width'),height=node.getData('height'),pos=this.getAlignedPos(node.pos.getc(true),width,height);this.nodeHelper.ellipse.render('fill',{x:pos.x+width/2,y:pos.y+height/2},width,height,canvas);},'contains':function(node,pos){var width=node.getData('width'),height=node.getData('height'),npos=this.getAlignedPos(node.pos.getc(true),width,height);this.nodeHelper.ellipse.contains({x:npos.x+width/2,y:npos.y+height/2},width,height,canvas);}},'rectangle':{'render':function(node,canvas){var width=node.getData('width'),height=node.getData('height'),pos=this.getAlignedPos(node.pos.getc(true),width,height);this.nodeHelper.rectangle.render('fill',{x:pos.x+width/2,y:pos.y+height/2},width,height,canvas);},'contains':function(node,pos){var width=node.getData('width'),height=node.getData('height'),npos=this.getAlignedPos(node.pos.getc(true),width,height);this.nodeHelper.rectangle.contains({x:npos.x+width/2,y:npos.y+height/2},width,height,canvas);}}});$jit.ST.Plot.EdgeTypes=new Class({'none':$.empty,'line':{'render':function(adj,canvas){var orn=this.getOrientation(adj),nodeFrom=adj.nodeFrom,nodeTo=adj.nodeTo,rel=nodeFrom._depth1&&direction[0]!=node.id);this.edgeHelper.arrow.render(from,to,dim,inv,canvas);},'contains':function(adj,pos){var orn=this.getOrientation(adj),nodeFrom=adj.nodeFrom,nodeTo=adj.nodeTo,rel=nodeFrom._depth0){acum+=valArray[i][0];leftAcum+=dimArray[i][0];}} aggregateStyle.top=(-font-config.labelOffset)+'px';labelStyle.top=(config.labelOffset+leftAcum)+'px';domElement.style.top=parseInt(domElement.style.top,10)-leftAcum+'px';domElement.style.height=wrapperStyle.height=leftAcum+'px';labels.aggregate.innerHTML=acum;}}});var size=st.canvas.getSize(),margin=config.Margin;st.config.offsetY=-size.height/2+margin.bottom +(config.showLabels&&(config.labelOffset+config.Label.size));st.config.offsetX=(margin.right-margin.left-config.labelOffset-config.Label.size)/2;this.st=st;this.canvas=this.st.canvas;},renderTitle:function(){var canvas=this.canvas,size=canvas.getSize(),config=this.config,margin=config.Margin,label=config.Label,title=config.Title;ctx=canvas.getCtx();ctx.fillStyle=title.color;ctx.textAlign='left';ctx.textBaseline='top';ctx.font=label.style+' bold '+' '+title.size+'px '+label.family;if(label.type=='Native'){ctx.fillText(title.text,-size.width/2+margin.left,-size.height/2+margin.top);}},renderTicks:function(){var canvas=this.canvas,size=canvas.getSize(),config=this.config,margin=config.Margin,ticks=config.Ticks,title=config.Title,subtitle=config.Subtitle,label=config.Label,maxValue=this.maxValue,maxTickValue=Math.ceil(maxValue*.1)*10;if(maxTickValue==maxValue){var length=maxTickValue.toString().length;maxTickValue=maxTickValue+parseInt(pad(1,length));} -labelValue=0,labelIncrement=maxTickValue/ticks.segments,ctx=canvas.getCtx();ctx.strokeStyle=ticks.color;ctx.font=label.style+' '+label.size+'px '+label.family;ctx.textAlign='center';ctx.textBaseline='middle';idLabel=canvas.id+"-label";labelDim=100;container=document.getElementById(idLabel);var axis=(size.height/2)-(margin.bottom+config.labelOffset+label.size+(subtitle.text?subtitle.size+subtitle.offset:0)),htmlOrigin=size.height-(margin.bottom+config.labelOffset+label.size+(subtitle.text?subtitle.size+subtitle.offset:0)),grid=-size.height+(margin.bottom+config.labelOffset+label.size+margin.top+(title.text?title.size+title.offset:0)+(subtitle.text?subtitle.size+subtitle.offset:0)),segmentLength=grid/ticks.segments;ctx.fillStyle=ticks.color;ctx.fillRect(-(size.width/2)+margin.left+config.labelOffset+label.size-1,-(size.height/2)+margin.top+(title.text?title.size+title.offset:0),1,size.height-margin.top-margin.bottom-label.size-config.labelOffset-(title.text?title.size+title.offset:0)-(subtitle.text?subtitle.size+subtitle.offset:0));while(axis>=grid){ctx.save();ctx.translate(-(size.width/2)+margin.left,Math.round(axis));ctx.rotate(Math.PI/2);ctx.fillStyle=label.color;if(config.showLabels){if(label.type=='Native'){ctx.fillText(labelValue,0,0);}else{labelDiv=document.createElement('div');labelDiv.innerHTML=labelValue;labelDiv.className="rotatedLabel";labelDiv.style.top=(htmlOrigin-(labelDim/2))+"px";labelDiv.style.left=margin.left+"px";labelDiv.style.width=labelDim+"px";labelDiv.style.height=labelDim+"px";labelDiv.style.textAlign="center";labelDiv.style.verticalAlign="middle";labelDiv.style.position="absolute";container.appendChild(labelDiv);}} +labelValue=0,labelIncrement=maxTickValue/ticks.segments,ctx=canvas.getCtx();ctx.strokeStyle=ticks.color;ctx.font=label.style+' '+label.size+'px '+label.family;ctx.textAlign='center';ctx.textBaseline='middle';idLabel=canvas.id+"-label";labelDim=100;container=document.getElementById(idLabel);var axis=(size.height/2)-(margin.bottom+config.labelOffset+label.size+(subtitle.text?subtitle.size+subtitle.offset:0)),htmlOrigin=size.height-(margin.bottom+config.labelOffset+label.size+(subtitle.text?subtitle.size+subtitle.offset:0)),grid=-size.height+(margin.bottom+config.labelOffset+label.size+margin.top+(title.text?title.size+title.offset:0)+(subtitle.text?subtitle.size+subtitle.offset:0)),segmentLength=grid/ticks.segments;ctx.fillStyle=ticks.color;ctx.fillRect(-(size.width/2)+margin.left+config.labelOffset+label.size-1,-(size.height/2)+margin.top+(title.text?title.size+title.offset:0),1,size.height-margin.top-margin.bottom-label.size-config.labelOffset-(title.text?title.size+title.offset:0)-(subtitle.text?subtitle.size+subtitle.offset:0));while(axis>=grid){ctx.save();ctx.translate(-(size.width/2)+margin.left,Math.round(axis));ctx.rotate(Math.PI / 2);ctx.fillStyle=label.color;if(config.showLabels){if(label.type=='Native'){ctx.fillText(labelValue,0,0);}else{labelDiv=document.createElement('div');labelDiv.innerHTML=labelValue;labelDiv.className="rotatedLabel";labelDiv.style.top=(htmlOrigin-(labelDim/2))+"px";labelDiv.style.left=margin.left+"px";labelDiv.style.width=labelDim+"px";labelDiv.style.height=labelDim+"px";labelDiv.style.textAlign="center";labelDiv.style.verticalAlign="middle";labelDiv.style.position="absolute";container.appendChild(labelDiv);}} ctx.restore();ctx.fillStyle=ticks.color;ctx.fillRect(-(size.width/2)+margin.left+config.labelOffset+label.size,Math.round(axis),size.width-margin.right-margin.left-config.labelOffset-label.size,1);htmlOrigin+=segmentLength;axis+=segmentLength;labelValue+=labelIncrement;}},renderBackground:function(){var canvas=this.canvas,config=this.config,backgroundColor=config.backgroundColor,size=canvas.getSize(),ctx=canvas.getCtx();ctx.fillStyle=backgroundColor;ctx.fillRect(-size.width/2,-size.height/2,size.width,size.height);},clear:function(){var canvas=this.canvas;var ctx=canvas.getCtx(),size=canvas.getSize();ctx.fillStyle="rgba(255,255,255,0)";ctx.fillRect(-size.width/2,-size.height/2,size.width,size.height);ctx.clearRect(-size.width/2,-size.height/2,size.width,size.height);},resizeGraph:function(json,orgWindowWidth,orgContainerDivWidth,cols){var canvas=this.canvas,size=canvas.getSize(),config=this.config,orgHeight=size.height,margin=config.Margin,st=this.st,horz=config.orientation=='horizontal';var newWindowWidth=document.body.offsetWidth;var diff=newWindowWidth-orgWindowWidth;var newWidth=orgContainerDivWidth+(diff/cols);canvas.resize(newWidth,orgHeight);if(typeof FlashCanvas=="undefined"){canvas.clear();}else{this.clear();} this.loadJSON(json);},loadJSON:function(json){var prefix=$.time(),ch=[],st=this.st,name=$.splat(json.label),color=$.splat(json.color||this.colors),config=this.config,ticks=config.Ticks,renderBackground=config.renderBackground,gradient=!!config.type.split(":")[1],animate=config.animate,title=config.Title,groupTotalValue=0;var valArrayAll=new Array();for(var i=0,values=json.values,l=values.length;i-1)?d:[0,0];}),'end');});this.st.fx.animate({modes:['node-property:dimArray'],duration:1500,onComplete:function(){that.busy=false;}});},restore:function(){if(this.busy)return;this.busy=true;if(this.config.Tips.enable)this.st.tips.hide();this.select(false,false,false);this.normalizeDims();var that=this;this.st.fx.animate({modes:['node-property:height:dimArray'],duration:1500,onComplete:function(){that.busy=false;}});},select:function(id,name,index){if(!this.config.selectOnHover)return;var s=this.selected;if(s.id!=id||s.name!=name||s.index!=index){s.id=id;s.name=name;s.index=index;this.st.graph.eachNode(function(n){n.setData('border',false);});if(id){var n=this.st.graph.getNode(id);n.setData('border',s);var link=index===0?'prev':'next';link=n.getData(link);if(link){n=this.st.graph.getByName(link);if(n){n.setData('border',{name:name,index:1-index});}}} this.st.plot();}},getLegend:function(){var legend=new Array();var name=new Array();var color=new Array();var n;this.st.graph.getNode(this.st.root).eachAdjacency(function(adj){n=adj.nodeTo;});var colors=n.getData('colorArray'),len=colors.length;$.each(n.getData('stringArray'),function(s,i){color[i]=colors[i%len];name[i]=s;});legend['name']=name;legend['color']=color;return legend;},normalizeDims:function(){var root=this.st.graph.getNode(this.st.root),l=0;root.eachAdjacency(function(){l++;});var maxValue=this.maxValue||1,size=this.st.canvas.getSize(),config=this.config,margin=config.Margin,labelOffset=config.labelOffset+config.Label.size,fixedDim=(size.width-(margin.left+margin.right+labelOffset))/(l-1),animate=config.animate,ticks=config.Ticks,height=size.height-(margin.top+margin.bottom)-(config.showAggregates&&labelOffset) -(config.showLabels&&labelOffset);var maxTickValue=Math.ceil(maxValue*.1)*10;if(maxTickValue==maxValue){var length=maxTickValue.toString().length;maxTickValue=maxTickValue+parseInt(pad(1,length));} -this.st.graph.eachNode(function(n){var acumLeft=0,acumRight=0,animateValue=[];$.each(n.getData('valueArray'),function(v){acumLeft+=+v[0];acumRight+=+v[1];animateValue.push([0,0]);});var acum=acumRight>acumLeft?acumRight:acumLeft;n.setData('width',fixedDim);if(animate){n.setData('height',acum*height/maxValue,'end');n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return[n[0]*height/maxValue,n[1]*height/maxValue];}),'end');var dimArray=n.getData('dimArray');if(!dimArray){n.setData('dimArray',animateValue);}}else{if(ticks.enable){n.setData('height',acum*height/maxValue);n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return[n[0]*height/maxTickValue,n[1]*height/maxTickValue];}));}else{n.setData('height',acum*height/maxValue);n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return[n[0]*height/maxValue,n[1]*height/maxValue];}));}}});}});$jit.ST.Plot.NodeTypes.implement({'areachart-stacked':{'render':function(node,canvas){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,stringArray=node.getData('stringArray'),dimArray=node.getData('dimArray'),valArray=node.getData('valueArray'),valLeft=$.reduce(valArray,function(x,y){return x+y[0];},0),valRight=$.reduce(valArray,function(x,y){return x+y[1];},0),colorArray=node.getData('colorArray'),colorLength=colorArray.length,config=node.getData('config'),gradient=node.getData('gradient'),showLabels=config.showLabels,aggregates=config.showAggregates,label=config.Label,prev=node.getData('prev');var ctx=canvas.getCtx(),border=node.getData('border');if(colorArray&&dimArray&&stringArray){for(var i=0,l=dimArray.length,acumLeft=0,acumRight=0,valAcum=0;i0||dimArray[i][1]>0)){var h1=acumLeft+dimArray[i][0],h2=acumRight+dimArray[i][1],alpha=Math.atan((h2-h1)/width),delta=55;var linear=ctx.createLinearGradient(x+width/2,y-(h1+h2)/2,x+width/2+delta*Math.sin(alpha),y-(h1+h2)/2+delta*Math.cos(alpha));var color=$.rgbToHex($.map($.hexToRgb(colorArray[i%colorLength].slice(1)),function(v){return(v*0.85)>>0;}));linear.addColorStop(0,colorArray[i%colorLength]);linear.addColorStop(1,color);ctx.fillStyle=linear;} +this.st.graph.eachNode(function(n){var acumLeft=0,acumRight=0,animateValue=[];$.each(n.getData('valueArray'),function(v){acumLeft+=+v[0];acumRight+=+v[1];animateValue.push([0,0]);});var acum=acumRight>acumLeft?acumRight:acumLeft;n.setData('width',fixedDim);if(animate){n.setData('height',acum*height / maxValue,'end');n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return[n[0]*height / maxValue,n[1]*height / maxValue];}),'end');var dimArray=n.getData('dimArray');if(!dimArray){n.setData('dimArray',animateValue);}}else{if(ticks.enable){n.setData('height',acum*height / maxValue);n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return[n[0]*height / maxTickValue,n[1]*height / maxTickValue];}));}else{n.setData('height',acum*height / maxValue);n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return[n[0]*height / maxValue,n[1]*height / maxValue];}));}}});}});$jit.ST.Plot.NodeTypes.implement({'areachart-stacked':{'render':function(node,canvas){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,stringArray=node.getData('stringArray'),dimArray=node.getData('dimArray'),valArray=node.getData('valueArray'),valLeft=$.reduce(valArray,function(x,y){return x+y[0];},0),valRight=$.reduce(valArray,function(x,y){return x+y[1];},0),colorArray=node.getData('colorArray'),colorLength=colorArray.length,config=node.getData('config'),gradient=node.getData('gradient'),showLabels=config.showLabels,aggregates=config.showAggregates,label=config.Label,prev=node.getData('prev');var ctx=canvas.getCtx(),border=node.getData('border');if(colorArray&&dimArray&&stringArray){for(var i=0,l=dimArray.length,acumLeft=0,acumRight=0,valAcum=0;i0||dimArray[i][1]>0)){var h1=acumLeft+dimArray[i][0],h2=acumRight+dimArray[i][1],alpha=Math.atan((h2-h1)/ width),delta=55;var linear=ctx.createLinearGradient(x+width/2,y-(h1+h2)/2,x+width/2+delta*Math.sin(alpha),y-(h1+h2)/2+delta*Math.cos(alpha));var color=$.rgbToHex($.map($.hexToRgb(colorArray[i%colorLength].slice(1)),function(v){return(v*0.85)>>0;}));linear.addColorStop(0,colorArray[i%colorLength]);linear.addColorStop(1,color);ctx.fillStyle=linear;} ctx.beginPath();ctx.moveTo(x,y-acumLeft);ctx.lineTo(x+width,y-acumRight);ctx.lineTo(x+width,y-acumRight-dimArray[i][1]);ctx.lineTo(x,y-acumLeft-dimArray[i][0]);ctx.lineTo(x,y-acumLeft);ctx.fill();ctx.restore();if(border){var strong=border.name==stringArray[i];var perc=strong?0.7:0.8;var color=$.rgbToHex($.map($.hexToRgb(colorArray[i%colorLength].slice(1)),function(v){return(v*perc)>>0;}));ctx.strokeStyle=color;ctx.lineWidth=strong?4:1;ctx.save();ctx.beginPath();if(border.index===0){ctx.moveTo(x,y-acumLeft);ctx.lineTo(x,y-acumLeft-dimArray[i][0]);}else{ctx.moveTo(x+width,y-acumRight);ctx.lineTo(x+width,y-acumRight-dimArray[i][1]);} ctx.stroke();ctx.restore();} acumLeft+=(dimArray[i][0]||0);acumRight+=(dimArray[i][1]||0);if(dimArray[i][0]>0) @@ -268,7 +268,7 @@ valAcum+=(valArray[i][0]||0);} if(prev&&label.type=='Native'){ctx.save();ctx.beginPath();ctx.fillStyle=ctx.strokeStyle=label.color;ctx.font=label.style+' '+label.size+'px '+label.family;ctx.textAlign='center';ctx.textBaseline='middle';if(aggregates(node.name,valLeft,valRight,node)){ctx.fillText(valAcum,x,y-acumLeft-config.labelOffset-label.size/2,width);} if(showLabels(node.name,valLeft,valRight,node)){ctx.fillText(node.name,x,y+label.size/2+config.labelOffset);} ctx.restore();}}},'contains':function(node,mpos){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),rx=mpos.x-x;if(mpos.xx+width||mpos.y>y||mpos.y=intersec){var index=+(rx>width/2);return{'name':node.getData('stringArray')[i],'color':node.getData('colorArray')[i],'value':node.getData('valueArray')[i][index],'index':index};}} +for(var i=0,l=dimArray.length,lAcum=y,rAcum=y;i=intersec){var index=+(rx>width/2);return{'name':node.getData('stringArray')[i],'color':node.getData('colorArray')[i],'value':node.getData('valueArray')[i][index],'index':index};}} return false;}}});$jit.AreaChart=new Class({st:null,colors:["#416D9C","#70A35E","#EBB056","#C74243","#83548B","#909291","#557EAA"],selected:{},busy:false,initialize:function(opt){this.controller=this.config=$.merge(Options("Canvas","Margin","Label","AreaChart"),{Label:{type:'Native'}},opt);var showLabels=this.config.showLabels,typeLabels=$.type(showLabels),showAggregates=this.config.showAggregates,typeAggregates=$.type(showAggregates);this.config.showLabels=typeLabels=='function'?showLabels:$.lambda(showLabels);this.config.showAggregates=typeAggregates=='function'?showAggregates:$.lambda(showAggregates);this.initializeViz();},initializeViz:function(){var config=this.config,that=this,nodeType=config.type.split(":")[0],nodeLabels={};var st=new $jit.ST({injectInto:config.injectInto,orientation:"bottom",levelDistance:0,siblingOffset:0,subtreeOffset:0,withLabels:config.Label.type!='Native',useCanvas:config.useCanvas,Label:{type:config.Label.type},Node:{overridable:true,type:'areachart-'+nodeType,align:'left',width:1,height:1},Edge:{type:'none'},Tips:{enable:config.Tips.enable,type:'Native',force:true,onShow:function(tip,node,contains){var elem=contains;config.Tips.onShow(tip,elem,node);}},Events:{enable:true,type:'Native',onClick:function(node,eventInfo,evt){if(!config.filterOnClick&&!config.Events.enable)return;var elem=eventInfo.getContains();if(elem)config.filterOnClick&&that.filter(elem.name);config.Events.enable&&config.Events.onClick(elem,eventInfo,evt);},onRightClick:function(node,eventInfo,evt){if(!config.restoreOnRightClick)return;that.restore();},onMouseMove:function(node,eventInfo,evt){if(!config.selectOnHover)return;if(node){var elem=eventInfo.getContains();that.select(node.id,elem.name,elem.index);}else{that.select(false,false,false);}}},onCreateLabel:function(domElement,node){var labelConf=config.Label,valueArray=node.getData('valueArray'),acumLeft=$.reduce(valueArray,function(x,y){return x+y[0];},0),acumRight=$.reduce(valueArray,function(x,y){return x+y[1];},0);if(node.getData('prev')){var nlbs={wrapper:document.createElement('div'),aggregate:document.createElement('div'),label:document.createElement('div')};var wrapper=nlbs.wrapper,label=nlbs.label,aggregate=nlbs.aggregate,wrapperStyle=wrapper.style,labelStyle=label.style,aggregateStyle=aggregate.style;nodeLabels[node.id]=nlbs;wrapper.appendChild(label);wrapper.appendChild(aggregate);if(!config.showLabels(node.name,acumLeft,acumRight,node)){label.style.display='none';} if(!config.showAggregates(node.name,acumLeft,acumRight,node)){aggregate.style.display='none';} wrapperStyle.position='relative';wrapperStyle.overflow='visible';wrapperStyle.fontSize=labelConf.size+'px';wrapperStyle.fontFamily=labelConf.family;wrapperStyle.color=labelConf.color;wrapperStyle.textAlign='center';aggregateStyle.position=labelStyle.position='absolute';domElement.style.width=node.getData('width')+'px';domElement.style.height=node.getData('height')+'px';label.innerHTML=node.name;domElement.appendChild(wrapper);}},onPlaceLabel:function(domElement,node){if(!node.getData('prev'))return;var labels=nodeLabels[node.id],wrapperStyle=labels.wrapper.style,labelStyle=labels.label.style,aggregateStyle=labels.aggregate.style,width=node.getData('width'),height=node.getData('height'),dimArray=node.getData('dimArray'),valArray=node.getData('valueArray'),acumLeft=$.reduce(valArray,function(x,y){return x+y[0];},0),acumRight=$.reduce(valArray,function(x,y){return x+y[1];},0),font=parseInt(wrapperStyle.fontSize,10),domStyle=domElement.style;if(dimArray&&valArray){if(config.showLabels(node.name,acumLeft,acumRight,node)){labelStyle.display='';}else{labelStyle.display='none';} @@ -278,8 +278,8 @@ aggregateStyle.top=(-font-config.labelOffset)+'px';labelStyle.top=(config.labelO +(config.showLabels&&(config.labelOffset+config.Label.size));st.config.offsetX=(margin.right-margin.left)/2;this.st=st;this.canvas=this.st.canvas;},loadJSON:function(json){var prefix=$.time(),ch=[],st=this.st,name=$.splat(json.label),color=$.splat(json.color||this.colors),config=this.config,gradient=!!config.type.split(":")[1],animate=config.animate;for(var i=0,values=json.values,l=values.length;i-1)?d:[0,0];}),'end');});this.st.fx.animate({modes:['node-property:dimArray'],duration:1500,onComplete:function(){that.busy=false;}});},restore:function(){if(this.busy)return;this.busy=true;if(this.config.Tips.enable)this.st.tips.hide();this.select(false,false,false);this.normalizeDims();var that=this;this.st.fx.animate({modes:['node-property:height:dimArray'],duration:1500,onComplete:function(){that.busy=false;}});},select:function(id,name,index){if(!this.config.selectOnHover)return;var s=this.selected;if(s.id!=id||s.name!=name||s.index!=index){s.id=id;s.name=name;s.index=index;this.st.graph.eachNode(function(n){n.setData('border',false);});if(id){var n=this.st.graph.getNode(id);n.setData('border',s);var link=index===0?'prev':'next';link=n.getData(link);if(link){n=this.st.graph.getByName(link);if(n){n.setData('border',{name:name,index:1-index});}}} -this.st.plot();}},getLegend:function(){var legend={};var n;this.st.graph.getNode(this.st.root).eachAdjacency(function(adj){n=adj.nodeTo;});var colors=n.getData('colorArray'),len=colors.length;$.each(n.getData('stringArray'),function(s,i){legend[s]=colors[i%len];});return legend;},getMaxValue:function(){var maxValue=0;this.st.graph.eachNode(function(n){var valArray=n.getData('valueArray'),acumLeft=0,acumRight=0;$.each(valArray,function(v){acumLeft+=+v[0];acumRight+=+v[1];});var acum=acumRight>acumLeft?acumRight:acumLeft;maxValue=maxValue>acum?maxValue:acum;});return maxValue;},normalizeDims:function(){var root=this.st.graph.getNode(this.st.root),l=0;root.eachAdjacency(function(){l++;});var maxValue=this.getMaxValue()||1,size=this.st.canvas.getSize(),config=this.config,margin=config.Margin,labelOffset=config.labelOffset+config.Label.size,fixedDim=(size.width-(margin.left+margin.right))/l,animate=config.animate,height=size.height-(margin.top+margin.bottom)-(config.showAggregates&&labelOffset) --(config.showLabels&&labelOffset);this.st.graph.eachNode(function(n){var acumLeft=0,acumRight=0,animateValue=[];$.each(n.getData('valueArray'),function(v){acumLeft+=+v[0];acumRight+=+v[1];animateValue.push([0,0]);});var acum=acumRight>acumLeft?acumRight:acumLeft;n.setData('width',fixedDim);if(animate){n.setData('height',acum*height/maxValue,'end');n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return[n[0]*height/maxValue,n[1]*height/maxValue];}),'end');var dimArray=n.getData('dimArray');if(!dimArray){n.setData('dimArray',animateValue);}}else{n.setData('height',acum*height/maxValue);n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return[n[0]*height/maxValue,n[1]*height/maxValue];}));}});}});Options.BarChart={$extend:true,animate:true,type:'stacked',labelOffset:3,barsOffset:0,nodeCount:0,hoveredColor:'#9fd4ff',background:false,renderBackground:false,orientation:'horizontal',showAggregates:true,showLabels:true,Ticks:{enable:false,segments:4,color:'#000000'},Tips:{enable:false,onShow:$.empty,onHide:$.empty},Events:{enable:false,onClick:$.empty}};$jit.ST.Plot.NodeTypes.implement({'barchart-stacked':{'render':function(node,canvas){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),valueArray=node.getData('valueArray'),stringArray=node.getData('stringArray'),linkArray=node.getData('linkArray'),gvl=node.getData('gvl'),colorArray=node.getData('colorArray'),colorLength=colorArray.length,nodeCount=node.getData('nodeCount');var ctx=canvas.getCtx(),canvasSize=canvas.getSize(),opt={},border=node.getData('border'),gradient=node.getData('gradient'),config=node.getData('config'),horz=config.orientation=='horizontal',aggregates=config.showAggregates,showLabels=config.showLabels,label=config.Label,margin=config.Margin;if(colorArray&&dimArray&&stringArray){for(var i=0,l=dimArray.length,acum=0,valAcum=0;iacumLeft?acumRight:acumLeft;maxValue=maxValue>acum?maxValue:acum;});return maxValue;},normalizeDims:function(){var root=this.st.graph.getNode(this.st.root),l=0;root.eachAdjacency(function(){l++;});var maxValue=this.getMaxValue()||1,size=this.st.canvas.getSize(),config=this.config,margin=config.Margin,labelOffset=config.labelOffset+config.Label.size,fixedDim=(size.width-(margin.left+margin.right))/ l,animate=config.animate,height=size.height-(margin.top+margin.bottom)-(config.showAggregates&&labelOffset) +-(config.showLabels&&labelOffset);this.st.graph.eachNode(function(n){var acumLeft=0,acumRight=0,animateValue=[];$.each(n.getData('valueArray'),function(v){acumLeft+=+v[0];acumRight+=+v[1];animateValue.push([0,0]);});var acum=acumRight>acumLeft?acumRight:acumLeft;n.setData('width',fixedDim);if(animate){n.setData('height',acum*height / maxValue,'end');n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return[n[0]*height / maxValue,n[1]*height / maxValue];}),'end');var dimArray=n.getData('dimArray');if(!dimArray){n.setData('dimArray',animateValue);}}else{n.setData('height',acum*height / maxValue);n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return[n[0]*height / maxValue,n[1]*height / maxValue];}));}});}});Options.BarChart={$extend:true,animate:true,type:'stacked',labelOffset:3,barsOffset:0,nodeCount:0,hoveredColor:'#9fd4ff',background:false,renderBackground:false,orientation:'horizontal',showAggregates:true,showLabels:true,Ticks:{enable:false,segments:4,color:'#000000'},Tips:{enable:false,onShow:$.empty,onHide:$.empty},Events:{enable:false,onClick:$.empty}};$jit.ST.Plot.NodeTypes.implement({'barchart-stacked':{'render':function(node,canvas){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),valueArray=node.getData('valueArray'),stringArray=node.getData('stringArray'),linkArray=node.getData('linkArray'),gvl=node.getData('gvl'),colorArray=node.getData('colorArray'),colorLength=colorArray.length,nodeCount=node.getData('nodeCount');var ctx=canvas.getCtx(),canvasSize=canvas.getSize(),opt={},border=node.getData('border'),gradient=node.getData('gradient'),config=node.getData('config'),horz=config.orientation=='horizontal',aggregates=config.showAggregates,showLabels=config.showLabels,label=config.Label,margin=config.Margin;if(colorArray&&dimArray&&stringArray){for(var i=0,l=dimArray.length,acum=0,valAcum=0;i>0;}));linear.addColorStop(0,color);linear.addColorStop(0.3,colorArray[i%colorLength]);linear.addColorStop(0.7,colorArray[i%colorLength]);linear.addColorStop(1,color);ctx.fillStyle=linear;} @@ -292,14 +292,14 @@ if(label.type=='Native'){ctx.save();ctx.fillStyle=ctx.strokeStyle=label.color;ct if(aggregates(node.name,valAcum)){if(!horz){ctx.textAlign='center';ctx.font=label.style+' '+label.size+'px '+label.family;ctx.save();gridHeight=canvasSize.height-(margin.top+margin.bottom+(config.Title.text?config.Title.size+config.Title.offset:0)+ (config.Subtitle.text?config.Subtitle.size+config.Subtitle.offset:0)+ (label?label.size+config.labelOffset:0));mtxt=ctx.measureText(acumValueLabel);boxWidth=mtxt.width+10;inset=10;boxHeight=label.size+6;if(boxHeight+acum+config.labelOffset>gridHeight){bottomPadding=acum-config.labelOffset-boxHeight;}else{bottomPadding=acum+config.labelOffset+inset;} -ctx.translate(x+width/2-(mtxt.width/2),y-bottomPadding);cornerRadius=4;boxX=-inset/2;boxY=-boxHeight/2;ctx.rotate(0*Math.PI/180);ctx.fillStyle="rgba(255,255,255,.8)";if(boxHeight+acum+config.labelOffset>gridHeight){$.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"fill");} +ctx.translate(x+width/2-(mtxt.width/2),y-bottomPadding);cornerRadius=4;boxX=-inset/2;boxY=-boxHeight/2;ctx.rotate(0*Math.PI / 180);ctx.fillStyle="rgba(255,255,255,.8)";if(boxHeight+acum+config.labelOffset>gridHeight){$.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"fill");} ctx.fillStyle=ctx.strokeStyle=label.color;ctx.fillText(acumValueLabel,mtxt.width/2,0);ctx.restore();}} if(showLabels(node.name,valAcum,node)){if(horz){ctx.font=label.style+' '+label.size+'px '+label.family;inset=10;gridWidth=canvasSize.width-(config.Margin.left+config.Margin.right);mtxt=ctx.measureText(node.name+": "+acumValueLabel);boxWidth=mtxt.width+10;inset=10;if(acum+boxWidth+config.labelOffset+inset>gridWidth){leftPadding=acum-config.labelOffset-boxWidth-inset;}else{leftPadding=acum+config.labelOffset;} ctx.textAlign='left';ctx.translate(x+inset+leftPadding,y+height/2);boxHeight=label.size+6;boxX=-inset/2;boxY=-boxHeight/2;ctx.fillStyle="rgba(255,255,255,.8)";cornerRadius=4;if(acum+boxWidth+config.labelOffset+inset>gridWidth){$.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"fill");} -ctx.fillStyle=label.color;ctx.rotate(0*Math.PI/180);ctx.fillText(node.name+": "+acumValueLabel,0,0);}else{if(nodeCount>8){ctx.textAlign='left';ctx.translate(x+width/2,y+label.size/2+config.labelOffset);ctx.rotate(45*Math.PI/180);ctx.fillText(node.name,0,0);}else{ctx.textAlign='center';ctx.fillText(node.name,x+width/2,y+label.size/2+config.labelOffset);}}} +ctx.fillStyle=label.color;ctx.rotate(0*Math.PI / 180);ctx.fillText(node.name+": "+acumValueLabel,0,0);}else{if(nodeCount>8){ctx.textAlign='left';ctx.translate(x+width/2,y+label.size/2+config.labelOffset);ctx.rotate(45*Math.PI / 180);ctx.fillText(node.name,0,0);}else{ctx.textAlign='center';ctx.fillText(node.name,x+width/2,y+label.size/2+config.labelOffset);}}} ctx.restore();}}},'contains':function(node,mpos){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),config=node.getData('config'),rx=mpos.x-x,horz=config.orientation=='horizontal';if(horz){if(mpos.xx+width||mpos.y>y+height||mpos.yx+width||mpos.y>y||mpos.y=intersec){return{'name':node.getData('stringArray')[i],'color':node.getData('colorArray')[i],'value':node.getData('valueArray')[i],'valuelabel':node.getData('valuelabelArray')[i],'percentage':((node.getData('valueArray')[i]/node.getData('barTotalValue'))*100).toFixed(1),'link':url,'label':node.name};}}} -return false;}},'barchart-grouped':{'render':function(node,canvas){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),valueArray=node.getData('valueArray'),valuelabelArray=node.getData('valuelabelArray'),linkArray=node.getData('linkArray'),valueLength=valueArray.length,colorArray=node.getData('colorArray'),colorLength=colorArray.length,stringArray=node.getData('stringArray');var ctx=canvas.getCtx(),canvasSize=canvas.getSize(),opt={},border=node.getData('border'),gradient=node.getData('gradient'),config=node.getData('config'),horz=config.orientation=='horizontal',aggregates=config.showAggregates,showLabels=config.showLabels,label=config.Label,shadow=config.shadow,margin=config.Margin,fixedDim=(horz?height:width)/valueLength;maxValue=Math.max.apply(null,dimArray);ctx.fillStyle="rgba(0,0,0,.2)";if(colorArray&&dimArray&&stringArray&&shadow.enable){shadowThickness=shadow.size;for(var i=0,l=valueLength,acum=0,valAcum=0;idimArray[i]){ctx.fillRect((x-shadowThickness)+fixedDim*i,y-dimArray[i]-shadowThickness,fixedDim,dimArray[i]+shadowThickness);}else if(nextBar&&nextBar0&&idimArray[i]){ctx.fillRect((x-((prevBardimArray[i]){ctx.fillRect((x-shadowThickness)+fixedDim*i,y-dimArray[i]-shadowThickness,fixedDim,dimArray[i]+shadowThickness);}else if(nextBar&&nextBar0&&idimArray[i]){ctx.fillRect((x-((prevBar>0;}));linear.addColorStop(0,color);linear.addColorStop(0.3,colorArray[i%colorLength]);linear.addColorStop(0.7,colorArray[i%colorLength]);linear.addColorStop(1,color);ctx.fillStyle=linear;} if(horz){ctx.fillRect(x,y+fixedDim*i,dimArray[i],fixedDim);}else{ctx.fillRect(x+fixedDim*i,y-dimArray[i],fixedDim,dimArray[i]);} @@ -314,10 +314,10 @@ ctx.translate(x+(i*fixedDim)+(fixedDim/2),y-bottomPadding);boxX=-boxWidth/2;boxY ctx.fillStyle=ctx.strokeStyle=label.color;ctx.fillText(acumValueLabel,0,0);ctx.restore();}}} if(border){ctx.save();ctx.lineWidth=2;ctx.strokeStyle=border.color;if(horz){ctx.strokeRect(x+1,y+opt.acum+1,opt.dimValue-2,fixedDim-2);}else{ctx.strokeRect(x+opt.acum+1,y-opt.dimValue+1,fixedDim-2,opt.dimValue-2);} ctx.restore();} -if(label.type=='Native'){ctx.save();ctx.fillStyle=ctx.strokeStyle=label.color;ctx.font=label.style+' '+label.size+'px '+label.family;ctx.textBaseline='middle';if(showLabels(node.name,valAcum,node)){if(horz){ctx.textAlign='center';ctx.translate(x-config.labelOffset-label.size/2,y+height/2);ctx.rotate(Math.PI/2);ctx.fillText(node.name,0,0);}else{ctx.textAlign='center';ctx.fillText(node.name,x+width/2,y+label.size/2+config.labelOffset);}} -ctx.restore();}}},'contains':function(node,mpos){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),len=dimArray.length,config=node.getData('config'),rx=mpos.x-x,horz=config.orientation=='horizontal',fixedDim=(horz?height:width)/len;if(horz){if(mpos.xx+width||mpos.y>y+height||mpos.yx+width||mpos.y>y||mpos.yx+width||mpos.y>y+height||mpos.yx+width||mpos.y>y||mpos.y=limit&&mpos.y<=limit+fixedDim){return{'name':node.getData('stringArray')[i],'color':node.getData('colorArray')[i],'value':node.getData('valueArray')[i],'valuelabel':node.getData('valuelabelArray')[i],'title':node.getData('titleArray')[i],'percentage':((node.getData('valueArray')[i]/node.getData('barTotalValue'))*100).toFixed(1),'link':url,'label':node.name};}}else{var limit=x+fixedDim*i;if(mpos.x>=limit&&mpos.x<=limit+fixedDim&&mpos.y>=y-dimi){return{'name':node.getData('stringArray')[i],'color':node.getData('colorArray')[i],'value':node.getData('valueArray')[i],'valuelabel':node.getData('valuelabelArray')[i],'title':node.getData('titleArray')[i],'percentage':((node.getData('valueArray')[i]/node.getData('barTotalValue'))*100).toFixed(1),'link':url,'label':node.name};}}} -return false;}},'barchart-basic':{'render':function(node,canvas){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),valueArray=node.getData('valueArray'),valuelabelArray=node.getData('valuelabelArray'),linkArray=node.getData('linkArray'),valueLength=valueArray.length,colorArray=node.getData('colorMono'),colorLength=colorArray.length,stringArray=node.getData('stringArray');var ctx=canvas.getCtx(),canvasSize=canvas.getSize(),opt={},border=node.getData('border'),gradient=node.getData('gradient'),config=node.getData('config'),horz=config.orientation=='horizontal',aggregates=config.showAggregates,showLabels=config.showLabels,label=config.Label,fixedDim=(horz?height:width)/valueLength,margin=config.Margin;if(colorArray&&dimArray&&stringArray){for(var i=0,l=valueLength,acum=0,valAcum=0;i>0;}));linear.addColorStop(0,color);linear.addColorStop(0.3,colorArray[i%colorLength]);linear.addColorStop(0.7,colorArray[i%colorLength]);linear.addColorStop(1,color);ctx.fillStyle=linear;} if(horz){ctx.fillRect(x,y+fixedDim*i,dimArray[i],fixedDim);}else{ctx.fillRect(x+fixedDim*i,y-dimArray[i],fixedDim,dimArray[i]);} @@ -332,22 +332,22 @@ if(border){ctx.save();ctx.lineWidth=2;ctx.strokeStyle=border.color;if(horz){ctx. ctx.restore();} if(label.type=='Native'){ctx.save();ctx.fillStyle=ctx.strokeStyle=label.color;ctx.font=label.style+' '+label.size+'px '+label.family;ctx.textBaseline='middle';if(showLabels(node.name,valAcum,node)){if(horz){gridWidth=canvasSize.width-(config.Margin.left+config.Margin.right);mtxt=ctx.measureText(node.name+": "+valAcum);boxWidth=mtxt.width+10;inset=10;if(acum+boxWidth+config.labelOffset+inset>gridWidth){leftPadding=acum-config.labelOffset-boxWidth-inset;}else{leftPadding=acum+config.labelOffset;} ctx.textAlign='left';ctx.translate(x+inset+leftPadding,y+height/2);boxHeight=label.size+6;boxX=-inset/2;boxY=-boxHeight/2;ctx.fillStyle="rgba(255,255,255,.8)";cornerRadius=4;if(acum+boxWidth+config.labelOffset+inset>gridWidth){$.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"fill");} -ctx.fillStyle=label.color;ctx.fillText(node.name+": "+valAcum,0,0);}else{if(stringArray.length>8){ctx.textAlign='left';ctx.translate(x+width/2,y+label.size/2+config.labelOffset);ctx.rotate(45*Math.PI/180);ctx.fillText(node.name,0,0);}else{ctx.textAlign='center';ctx.fillText(node.name,x+width/2,y+label.size/2+config.labelOffset);}}} -ctx.restore();}}},'contains':function(node,mpos){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),config=node.getData('config'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),len=dimArray.length,rx=mpos.x-x,horz=config.orientation=='horizontal',fixedDim=(horz?height:width)/len;if(horz){if(mpos.xx+width||mpos.y>y+height||mpos.yx+width||mpos.y>y||mpos.y8){ctx.textAlign='left';ctx.translate(x+width/2,y+label.size/2+config.labelOffset);ctx.rotate(45*Math.PI / 180);ctx.fillText(node.name,0,0);}else{ctx.textAlign='center';ctx.fillText(node.name,x+width/2,y+label.size/2+config.labelOffset);}}} +ctx.restore();}}},'contains':function(node,mpos){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),config=node.getData('config'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),len=dimArray.length,rx=mpos.x-x,horz=config.orientation=='horizontal',fixedDim=(horz?height:width)/ len;if(horz){if(mpos.xx+width||mpos.y>y+height||mpos.yx+width||mpos.y>y||mpos.y=limit&&mpos.y<=limit+fixedDim){return{'name':node.getData('stringArray')[i],'color':node.getData('colorArray')[i],'value':node.getData('valueArray')[i],'valuelabel':node.getData('valuelabelArray')[i],'percentage':((node.getData('valueArray')[i]/node.getData('groupTotalValue'))*100).toFixed(1),'link':url,'label':node.name};}}else{var limit=x+fixedDim*i;if(mpos.x>=limit&&mpos.x<=limit+fixedDim&&mpos.y>=y-dimi){return{'name':node.getData('stringArray')[i],'color':node.getData('colorArray')[i],'value':node.getData('valueArray')[i],'valuelabel':node.getData('valuelabelArray')[i],'percentage':((node.getData('valueArray')[i]/node.getData('groupTotalValue'))*100).toFixed(1),'link':url,'label':node.name};}}} return false;}}});$jit.BarChart=new Class({st:null,colors:["#004b9c","#9c0079","#9c0033","#28009c","#9c0000","#7d009c","#001a9c","#00809c","#009c80","#009c42","#009c07","#469c00","#799c00","#9c9600","#9c5c00"],selected:{},busy:false,initialize:function(opt){this.controller=this.config=$.merge(Options("Canvas","Margin","Label","BarChart"),{Label:{type:'Native'}},opt);var showLabels=this.config.showLabels,typeLabels=$.type(showLabels),showAggregates=this.config.showAggregates,typeAggregates=$.type(showAggregates);this.config.showLabels=typeLabels=='function'?showLabels:$.lambda(showLabels);this.config.showAggregates=typeAggregates=='function'?showAggregates:$.lambda(showAggregates);Options.Fx.clearCanvas=false;this.initializeViz();},initializeViz:function(){var config=this.config,that=this;var nodeType=config.type.split(":")[0],horz=config.orientation=='horizontal',nodeLabels={};var st=new $jit.ST({injectInto:config.injectInto,orientation:horz?'left':'bottom',background:config.background,renderBackground:config.renderBackground,backgroundColor:config.backgroundColor,colorStop1:config.colorStop1,colorStop2:config.colorStop2,levelDistance:0,nodeCount:config.nodeCount,siblingOffset:config.barsOffset,subtreeOffset:0,withLabels:config.Label.type!='Native',useCanvas:config.useCanvas,Label:{type:config.Label.type},Node:{overridable:true,type:'barchart-'+nodeType,align:'left',width:1,height:1},Edge:{type:'none'},Tips:{enable:config.Tips.enable,type:'Native',force:true,onShow:function(tip,node,contains){var elem=contains;config.Tips.onShow(tip,elem,node);if(elem.link!='undefined'&&elem.link!=''){document.body.style.cursor='pointer';}},onHide:function(call){document.body.style.cursor='default';}},Events:{enable:true,type:'Native',onClick:function(node,eventInfo,evt){if(!config.Events.enable)return;var elem=eventInfo.getContains();config.Events.onClick(elem,eventInfo,evt);},onMouseMove:function(node,eventInfo,evt){if(!config.hoveredColor)return;if(node){var elem=eventInfo.getContains();that.select(node.id,elem.name,elem.index);}else{that.select(false,false,false);}}},onCreateLabel:function(domElement,node){var labelConf=config.Label,valueArray=node.getData('valueArray'),acum=$.reduce(valueArray,function(x,y){return x+y;},0),grouped=config.type.split(':')[0]=='grouped',horz=config.orientation=='horizontal';var nlbs={wrapper:document.createElement('div'),aggregate:document.createElement('div'),label:document.createElement('div')};var wrapper=nlbs.wrapper,label=nlbs.label,aggregate=nlbs.aggregate,wrapperStyle=wrapper.style,labelStyle=label.style,aggregateStyle=aggregate.style;nodeLabels[node.id]=nlbs;wrapper.appendChild(label);wrapper.appendChild(aggregate);if(!config.showLabels(node.name,acum,node)){labelStyle.display='none';} if(!config.showAggregates(node.name,acum,node)){aggregateStyle.display='none';} -wrapperStyle.position='relative';wrapperStyle.overflow='visible';wrapperStyle.fontSize=labelConf.size+'px';wrapperStyle.fontFamily=labelConf.family;wrapperStyle.color=labelConf.color;wrapperStyle.textAlign='center';aggregateStyle.position=labelStyle.position='absolute';domElement.style.width=node.getData('width')+'px';domElement.style.height=node.getData('height')+'px';aggregateStyle.left="0px";labelStyle.left=config.labelOffset+'px';labelStyle.whiteSpace="nowrap";label.innerHTML=node.name;domElement.appendChild(wrapper);},onPlaceLabel:function(domElement,node){if(!nodeLabels[node.id])return;var labels=nodeLabels[node.id],wrapperStyle=labels.wrapper.style,labelStyle=labels.label.style,aggregateStyle=labels.aggregate.style,grouped=config.type.split(':')[0]=='grouped',horz=config.orientation=='horizontal',dimArray=node.getData('dimArray'),valArray=node.getData('valueArray'),nodeCount=node.getData('nodeCount'),valueLength=valArray.length;valuelabelArray=node.getData('valuelabelArray'),stringArray=node.getData('stringArray'),width=(grouped&&horz)?Math.max.apply(null,dimArray):node.getData('width'),height=(grouped&&!horz)?Math.max.apply(null,dimArray):node.getData('height'),font=parseInt(wrapperStyle.fontSize,10),domStyle=domElement.style,fixedDim=(horz?height:width)/valueLength;if(dimArray&&valArray){wrapperStyle.width=aggregateStyle.width=labelStyle.width=domElement.style.width=width+'px';aggregateStyle.width=width-config.labelOffset+"px";for(var i=0,l=valArray.length,acum=0;i0){acum+=valArray[i];}} +wrapperStyle.position='relative';wrapperStyle.overflow='visible';wrapperStyle.fontSize=labelConf.size+'px';wrapperStyle.fontFamily=labelConf.family;wrapperStyle.color=labelConf.color;wrapperStyle.textAlign='center';aggregateStyle.position=labelStyle.position='absolute';domElement.style.width=node.getData('width')+'px';domElement.style.height=node.getData('height')+'px';aggregateStyle.left="0px";labelStyle.left=config.labelOffset+'px';labelStyle.whiteSpace="nowrap";label.innerHTML=node.name;domElement.appendChild(wrapper);},onPlaceLabel:function(domElement,node){if(!nodeLabels[node.id])return;var labels=nodeLabels[node.id],wrapperStyle=labels.wrapper.style,labelStyle=labels.label.style,aggregateStyle=labels.aggregate.style,grouped=config.type.split(':')[0]=='grouped',horz=config.orientation=='horizontal',dimArray=node.getData('dimArray'),valArray=node.getData('valueArray'),nodeCount=node.getData('nodeCount'),valueLength=valArray.length;valuelabelArray=node.getData('valuelabelArray'),stringArray=node.getData('stringArray'),width=(grouped&&horz)?Math.max.apply(null,dimArray):node.getData('width'),height=(grouped&&!horz)?Math.max.apply(null,dimArray):node.getData('height'),font=parseInt(wrapperStyle.fontSize,10),domStyle=domElement.style,fixedDim=(horz?height:width)/ valueLength;if(dimArray&&valArray){wrapperStyle.width=aggregateStyle.width=labelStyle.width=domElement.style.width=width+'px';aggregateStyle.width=width-config.labelOffset+"px";for(var i=0,l=valArray.length,acum=0;i0){acum+=valArray[i];}} if(config.showLabels(node.name,acum,node)){labelStyle.display='';}else{labelStyle.display='none';} if(config.showAggregates(node.name,acum,node)){aggregateStyle.display='';}else{aggregateStyle.display='none';} if(config.orientation=='horizontal'){aggregateStyle.textAlign='right';labelStyle.textAlign='left';labelStyle.textIndex=aggregateStyle.textIndent=config.labelOffset+'px';aggregateStyle.top=labelStyle.top=(height-font)/2+'px';domElement.style.height=wrapperStyle.height=height+'px';}else{aggregateStyle.top=(-font-config.labelOffset)+'px';labelStyle.top=(config.labelOffset+height)+'px';domElement.style.top=parseInt(domElement.style.top,10)-height+'px';domElement.style.height=wrapperStyle.height=height+'px';if(stringArray.length>8){labels.label.className="rotatedLabelReverse";labelStyle.textAlign="left";labelStyle.top=config.labelOffset+height+width/2+"px";}} -if(horz){labels.label.innerHTML=labels.label.innerHTML+": "+acum;labels.aggregate.innerHTML="";}else{if(grouped){maxValue=Math.max.apply(null,dimArray);for(var i=0,l=valArray.length,acum=0,valAcum=0;i40)?40:fixedDim;whiteSpace=size.width-(marginWidth+(fixedDim*l));if(!horz&&typeof FlashCanvas!="undefined"&&size.width<250) +if(horz){labels.label.innerHTML=labels.label.innerHTML+": "+acum;labels.aggregate.innerHTML="";}else{if(grouped){maxValue=Math.max.apply(null,dimArray);for(var i=0,l=valArray.length,acum=0,valAcum=0;i40)?40:fixedDim;whiteSpace=size.width-(marginWidth+(fixedDim*l));if(!horz&&typeof FlashCanvas!="undefined"&&size.width<250) location.reload();if(!grouped&&!horz){st.config.siblingOffset=whiteSpace/(l+1);} if(horz){st.config.offsetX=size.width/2-margin.left-(grouped&&config.Label?config.labelOffset+config.Label.size:0);if(config.Ticks.enable){st.config.offsetY=((margin.bottom+config.Label.size+config.labelOffset+(subtitle.text?subtitle.size+subtitle.offset:0))-(margin.top+(title.text?title.size+title.offset:0)))/2;}else{st.config.offsetY=(margin.bottom-margin.top-(title.text?title.size+title.offset:0)-(subtitle.text?subtitle.size+subtitle.offset:0))/2;}}else{st.config.offsetY=-size.height/2+margin.bottom +(config.showLabels&&(config.labelOffset+config.Label.size))+(subtitle.text?subtitle.size+subtitle.offset:0);if(config.Ticks.enable){st.config.offsetX=((margin.right-config.Label.size-config.labelOffset)-margin.left)/2;}else{st.config.offsetX=(margin.right-margin.left)/2;}} this.st=st;this.canvas=this.st.canvas;},renderTitle:function(){var canvas=this.canvas,size=canvas.getSize(),config=this.config,margin=config.Margin,label=config.Label,title=config.Title;ctx=canvas.getCtx();ctx.fillStyle=title.color;ctx.textAlign='left';ctx.font=label.style+' bold '+' '+title.size+'px '+label.family;if(label.type=='Native'){ctx.fillText(title.text,-size.width/2+margin.left,-size.height/2+margin.top);}},renderSubtitle:function(){var canvas=this.canvas,size=canvas.getSize(),config=this.config,margin=config.Margin,label=config.Label,subtitle=config.Subtitle,nodeCount=config.nodeCount,horz=config.orientation=='horizontal'?true:false,ctx=canvas.getCtx();ctx.fillStyle=title.color;ctx.textAlign='left';ctx.font=label.style+' '+subtitle.size+'px '+label.family;if(label.type=='Native'){ctx.fillText(subtitle.text,-size.width/2+margin.left,size.height/2-(!horz&&nodeCount>8?20:margin.bottom)-subtitle.size);}},renderScrollNote:function(){var canvas=this.canvas,size=canvas.getSize(),config=this.config,margin=config.Margin,label=config.Label,note=config.ScrollNote;ctx=canvas.getCtx();ctx.fillStyle=title.color;title=config.Title;ctx.textAlign='center';ctx.font=label.style+' bold '+' '+note.size+'px '+label.family;if(label.type=='Native'){ctx.fillText(note.text,0,-size.height/2+margin.top+title.size);}},renderTicks:function(){var canvas=this.canvas,size=canvas.getSize(),config=this.config,margin=config.Margin,ticks=config.Ticks,title=config.Title,subtitle=config.Subtitle,label=config.Label,shadow=config.shadow;horz=config.orientation=='horizontal',maxValue=this.getMaxValue(),maxTickValue=Math.ceil(maxValue*.1)*10;if(maxTickValue==maxValue){var length=maxTickValue.toString().length;maxTickValue=maxTickValue+parseInt(pad(1,length));} grouped=config.type.split(':')[0]=='grouped',labelValue=0,labelIncrement=maxTickValue/ticks.segments,ctx=canvas.getCtx();ctx.strokeStyle=ticks.color;ctx.font=label.style+' '+label.size+'px '+label.family;ctx.textAlign='center';ctx.textBaseline='middle';idLabel=canvas.id+"-label";labelDim=100;container=document.getElementById(idLabel);if(horz){var axis=-(size.width/2)+margin.left+(grouped&&config.Label?config.labelOffset+label.size:0),grid=size.width-(margin.left+margin.right+(grouped&&config.Label?config.labelOffset+label.size:0)),segmentLength=grid/ticks.segments;ctx.fillStyle=ticks.color;ctx.fillRect(axis,(size.height/2)-margin.bottom-config.labelOffset-label.size-(subtitle.text?subtitle.size+subtitle.offset:0)+(shadow.enable?shadow.size:0),size.width-margin.left-margin.right-(grouped&&config.Label?config.labelOffset+label.size:0),1);while(axis<=grid){ctx.fillStyle=ticks.color;lineHeight=size.height-margin.bottom-margin.top-config.labelOffset-label.size-(title.text?title.size+title.offset:0)-(subtitle.text?subtitle.size+subtitle.offset:0);ctx.fillRect(Math.round(axis),-(size.height/2)+margin.top+(title.text?title.size+title.offset:0)-(shadow.enable?shadow.size:0),1,lineHeight+(shadow.enable?shadow.size*2:0));ctx.fillStyle=label.color;if(label.type=='Native'&&config.showLabels){ctx.fillText(labelValue,Math.round(axis),-(size.height/2)+margin.top+(title.text?title.size+title.offset:0)+config.labelOffset+lineHeight+label.size);} -axis+=segmentLength;labelValue+=labelIncrement;}}else{var axis=(size.height/2)-(margin.bottom+config.labelOffset+label.size+(subtitle.text?subtitle.size+subtitle.offset:0)),htmlOrigin=size.height-(margin.bottom+config.labelOffset+label.size+(subtitle.text?subtitle.size+subtitle.offset:0)),grid=-size.height+(margin.bottom+config.labelOffset+label.size+margin.top+(title.text?title.size+title.offset:0)+(subtitle.text?subtitle.size+subtitle.offset:0)),segmentLength=grid/ticks.segments;ctx.fillStyle=ticks.color;ctx.fillRect(-(size.width/2)+margin.left+config.labelOffset+label.size-1,-(size.height/2)+margin.top+(title.text?title.size+title.offset:0),1,size.height-margin.top-margin.bottom-label.size-config.labelOffset-(title.text?title.size+title.offset:0)-(subtitle.text?subtitle.size+subtitle.offset:0));while(axis>=grid){ctx.save();ctx.translate(-(size.width/2)+margin.left,Math.round(axis));ctx.rotate(0*Math.PI/180);ctx.fillStyle=label.color;if(config.showLabels){if(label.type=='Native'){ctx.fillText(labelValue,0,0);}else{labelDiv=document.createElement('div');labelDiv.innerHTML=labelValue;labelDiv.className="rotatedLabel";labelDiv.style.top=(htmlOrigin-(labelDim/2))+"px";labelDiv.style.left=margin.left+"px";labelDiv.style.width=labelDim+"px";labelDiv.style.height=labelDim+"px";labelDiv.style.textAlign="center";labelDiv.style.verticalAlign="middle";labelDiv.style.position="absolute";container.appendChild(labelDiv);}} +axis+=segmentLength;labelValue+=labelIncrement;}}else{var axis=(size.height/2)-(margin.bottom+config.labelOffset+label.size+(subtitle.text?subtitle.size+subtitle.offset:0)),htmlOrigin=size.height-(margin.bottom+config.labelOffset+label.size+(subtitle.text?subtitle.size+subtitle.offset:0)),grid=-size.height+(margin.bottom+config.labelOffset+label.size+margin.top+(title.text?title.size+title.offset:0)+(subtitle.text?subtitle.size+subtitle.offset:0)),segmentLength=grid/ticks.segments;ctx.fillStyle=ticks.color;ctx.fillRect(-(size.width/2)+margin.left+config.labelOffset+label.size-1,-(size.height/2)+margin.top+(title.text?title.size+title.offset:0),1,size.height-margin.top-margin.bottom-label.size-config.labelOffset-(title.text?title.size+title.offset:0)-(subtitle.text?subtitle.size+subtitle.offset:0));while(axis>=grid){ctx.save();ctx.translate(-(size.width/2)+margin.left,Math.round(axis));ctx.rotate(0*Math.PI / 180);ctx.fillStyle=label.color;if(config.showLabels){if(label.type=='Native'){ctx.fillText(labelValue,0,0);}else{labelDiv=document.createElement('div');labelDiv.innerHTML=labelValue;labelDiv.className="rotatedLabel";labelDiv.style.top=(htmlOrigin-(labelDim/2))+"px";labelDiv.style.left=margin.left+"px";labelDiv.style.width=labelDim+"px";labelDiv.style.height=labelDim+"px";labelDiv.style.textAlign="center";labelDiv.style.verticalAlign="middle";labelDiv.style.position="absolute";container.appendChild(labelDiv);}} ctx.restore();ctx.fillStyle=ticks.color;ctx.fillRect(-(size.width/2)+margin.left+config.labelOffset+label.size,Math.round(axis),size.width-margin.right-margin.left-config.labelOffset-label.size,1);htmlOrigin+=segmentLength;axis+=segmentLength;labelValue+=labelIncrement;}}},renderBackground:function(){var canvas=this.canvas,config=this.config,backgroundColor=config.backgroundColor,size=canvas.getSize(),ctx=canvas.getCtx();ctx.fillStyle=backgroundColor;ctx.fillRect(-size.width/2,-size.height/2,size.width,size.height);},clear:function(){var canvas=this.canvas;var ctx=canvas.getCtx(),size=canvas.getSize();ctx.fillStyle="rgba(255,255,255,0)";ctx.fillRect(-size.width/2,-size.height/2,size.width,size.height);ctx.clearRect(-size.width/2,-size.height/2,size.width,size.height);},resizeGraph:function(json,orgWindowWidth,orgContainerDivWidth,cols){var canvas=this.canvas,size=canvas.getSize(),config=this.config,orgHeight=size.height,margin=config.Margin,st=this.st,grouped=config.type.split(':')[0]=='grouped',horz=config.orientation=='horizontal',ctx=canvas.getCtx();var newWindowWidth=document.body.offsetWidth;var diff=newWindowWidth-orgWindowWidth;var newWidth=orgContainerDivWidth+(diff/cols);var scale=newWidth/orgContainerDivWidth;canvas.resize(newWidth,orgHeight);if(typeof FlashCanvas=="undefined"){canvas.clear();}else{this.clear();} if(horz){st.config.offsetX=size.width/2-margin.left-(grouped&&config.Label?config.labelOffset+config.Label.size:0);} this.loadJSON(json);},loadJSON:function(json){if(this.busy)return;this.busy=true;var prefix=$.time(),ch=[],st=this.st,name=$.splat(json.label),color=$.splat(json.color||this.colors),config=this.config,gradient=!!config.type.split(":")[1],renderBackground=config.renderBackground,animate=config.animate,ticks=config.Ticks,title=config.Title,note=config.ScrollNote,subtitle=config.Subtitle,horz=config.orientation=='horizontal',that=this,colorLength=color.length,nameLength=name.length;groupTotalValue=0;for(var i=0,values=json.values,l=values.length;iacum?maxValue:acum;});return maxValue;},setBarType:function(type){this.config.type=type;this.st.config.Node.type='barchart-'+type.split(':')[0];},normalizeDims:function(){var root=this.st.graph.getNode(this.st.root),l=0;root.eachAdjacency(function(){l++;});var maxValue=this.getMaxValue()||1,size=this.st.canvas.getSize(),config=this.config,margin=config.Margin,ticks=config.Ticks,title=config.Title,subtitle=config.Subtitle,grouped=config.type.split(':')[0]=='grouped',marginWidth=margin.left+margin.right+(config.Label&&grouped?config.Label.size+config.labelOffset:0),marginHeight=(title.text?title.size+title.offset:0)+(subtitle.text?subtitle.size+subtitle.offset:0)+margin.top+margin.bottom,horz=config.orientation=='horizontal',fixedDim=(size[horz?'height':'width']-(horz?marginHeight:marginWidth)-(ticks.enable?config.Label.size+config.labelOffset:0)-(l-1)*config.barsOffset)/l,animate=config.animate,height=size[horz?'width':'height']-(horz?marginWidth:marginHeight) +maxValue=maxValue>acum?maxValue:acum;});return maxValue;},setBarType:function(type){this.config.type=type;this.st.config.Node.type='barchart-'+type.split(':')[0];},normalizeDims:function(){var root=this.st.graph.getNode(this.st.root),l=0;root.eachAdjacency(function(){l++;});var maxValue=this.getMaxValue()||1,size=this.st.canvas.getSize(),config=this.config,margin=config.Margin,ticks=config.Ticks,title=config.Title,subtitle=config.Subtitle,grouped=config.type.split(':')[0]=='grouped',marginWidth=margin.left+margin.right+(config.Label&&grouped?config.Label.size+config.labelOffset:0),marginHeight=(title.text?title.size+title.offset:0)+(subtitle.text?subtitle.size+subtitle.offset:0)+margin.top+margin.bottom,horz=config.orientation=='horizontal',fixedDim=(size[horz?'height':'width']-(horz?marginHeight:marginWidth)-(ticks.enable?config.Label.size+config.labelOffset:0)-(l-1)*config.barsOffset)/ l,animate=config.animate,height=size[horz?'width':'height']-(horz?marginWidth:marginHeight) -((config.showLabels&&!horz)?(config.Label.size+config.labelOffset):0),dim1=horz?'height':'width',dim2=horz?'width':'height',basic=config.type.split(':')[0]=='basic';var maxTickValue=Math.ceil(maxValue*.1)*10;if(maxTickValue==maxValue){var length=maxTickValue.toString().length;maxTickValue=maxTickValue+parseInt(pad(1,length));} fixedDim=fixedDim>40?40:fixedDim;this.st.graph.eachNode(function(n){var acum=0,animateValue=[];$.each(n.getData('valueArray'),function(v){acum+=+v;animateValue.push(0);});if(grouped){fixedDim=animateValue.length*40;} -n.setData(dim1,fixedDim);if(animate){n.setData(dim2,acum*height/maxValue,'end');n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return n*height/maxValue;}),'end');var dimArray=n.getData('dimArray');if(!dimArray){n.setData('dimArray',animateValue);}}else{if(ticks.enable){n.setData(dim2,acum*height/maxTickValue);n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return n*height/maxTickValue;}));}else{n.setData(dim2,acum*height/maxValue);n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return n*height/maxValue;}));}}});}});Options.FunnelChart={$extend:true,animate:true,type:'stacked',labelOffset:3,barsOffset:0,hoveredColor:'#9fd4ff',orientation:'vertical',showAggregates:true,showLabels:true,Tips:{enable:false,onShow:$.empty,onHide:$.empty},Events:{enable:false,onClick:$.empty}};$jit.ST.Plot.NodeTypes.implement({'funnelchart-basic':{'render':function(node,canvas){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),valueArray=node.getData('valueArray'),valuelabelArray=node.getData('valuelabelArray'),linkArray=node.getData('linkArray'),colorArray=node.getData('colorArray'),colorLength=colorArray.length,stringArray=node.getData('stringArray');var ctx=canvas.getCtx(),opt={},border=node.getData('border'),gradient=node.getData('gradient'),config=node.getData('config'),horz=config.orientation=='horizontal',aggregates=config.showAggregates,showLabels=config.showLabels,label=config.Label,size=canvas.getSize(),labelOffset=config.labelOffset+10;minWidth=width*.25;ratio=.65;if(colorArray&&dimArray&&stringArray){for(var i=0,l=dimArray.length,acum=0,valAcum=0;i0)?dimArray[i-1]:100;var labelOffsetHeight=(previousElementHeight0)?((dimArray[i]>label.size)?(dimArray[i]/2)-(label.size/2):label.size):0;var topWidth=minWidth+((acum+dimArray[i])*ratio);var bottomWidth=minWidth+((acum)*ratio);var bottomWidthLabel=minWidth+((acum+labelOffsetHeight)*ratio);var labelOffsetRight=(previousElementHeight0)?((i%2!=0&&dimArray[i]0)?((i%2!=0&&dimArray[i]0)?dimArray[i-1]:100;var labelOffsetHeight=(previousElementHeight0)?((dimArray[i]>label.size)?(dimArray[i]/2)-(label.size/2):label.size):0;var topWidth=minWidth+((acum+dimArray[i])*ratio);var bottomWidth=minWidth+((acum)*ratio);var bottomWidthLabel=minWidth+((acum+labelOffsetHeight)*ratio);var labelOffsetRight=(previousElementHeight0)?((i%2!=0&&dimArray[i]0)?((i%2!=0&&dimArray[i]0)?dimArray[i-1]:100;var labelOffsetHeight=(previousElementHeight0)?((dimArray[i]>label.size)?(dimArray[i]/2)-(label.size/2):label.size):0;var labelOffsetRight=(previousElementHeight0)?((i%2!=0&&dimArray[i]0)?((i%2!=0&&dimArray[i]>0;});linear.addColorStop(0,'rgba('+color+',1)');linear.addColorStop(0.5,'rgba('+colorRgb+',1)');linear.addColorStop(1,'rgba('+color+',1)');ctx.fillStyle=linear;} @@ -384,90 +384,90 @@ if(!animate&&subtitle.text){this.renderSubtitle();} if(typeof FlashCanvas=="undefined"){this.renderDropShadow();} st.compute();st.select(st.root);if(animate){if(horz){st.fx.animate({modes:['node-property:width:dimArray'],duration:1500,onComplete:function(){that.busy=false;}});}else{st.fx.animate({modes:['node-property:height:dimArray'],duration:1500,onComplete:function(){that.busy=false;}});}}else{this.busy=false;}},updateJSON:function(json,onComplete){if(this.busy)return;this.busy=true;var st=this.st;var graph=st.graph;var values=json.values;var animate=this.config.animate;var that=this;var horz=this.config.orientation=='horizontal';$.each(values,function(v){var n=graph.getByName(v.label);if(n){n.setData('valueArray',$.splat(v.values));if(json.label){n.setData('stringArray',$.splat(json.label));}}});this.normalizeDims();st.compute();st.select(st.root);if(animate){if(horz){st.fx.animate({modes:['node-property:width:dimArray'],duration:1500,onComplete:function(){that.busy=false;onComplete&&onComplete.onComplete();}});}else{st.fx.animate({modes:['node-property:height:dimArray'],duration:1500,onComplete:function(){that.busy=false;onComplete&&onComplete.onComplete();}});}}},select:function(id,name){if(!this.config.hoveredColor)return;var s=this.selected;if(s.id!=id||s.name!=name){s.id=id;s.name=name;s.color=this.config.hoveredColor;this.st.graph.eachNode(function(n){if(id==n.id){n.setData('border',s);}else{n.setData('border',false);}});this.st.plot();}},getLegend:function(){var legend=new Array();var name=new Array();var color=new Array();var n;this.st.graph.getNode(this.st.root).eachAdjacency(function(adj){n=adj.nodeTo;});var colors=n.getData('colorArray'),len=colors.length;$.each(n.getData('stringArray'),function(s,i){color[i]=colors[i%len];name[i]=s;});legend['name']=name;legend['color']=color;return legend;},getMaxValue:function(){var maxValue=0,stacked=true;this.st.graph.eachNode(function(n){var valArray=n.getData('valueArray'),acum=0;if(!valArray)return;if(stacked){$.each(valArray,function(v){acum+=+v;});}else{acum=Math.max.apply(null,valArray);} maxValue=maxValue>acum?maxValue:acum;});return maxValue;},setBarType:function(type){this.config.type=type;this.st.config.Node.type='funnelchart-'+type.split(':')[0];},normalizeDims:function(){var root=this.st.graph.getNode(this.st.root),l=0;root.eachAdjacency(function(){l++;});var maxValue=this.getMaxValue()||1,size=this.st.canvas.getSize(),config=this.config,margin=config.Margin,title=config.Title,subtitle=config.Subtitle,marginWidth=margin.left+margin.right,marginHeight=(title.text?title.size+title.offset:0)+(subtitle.text?subtitle.size+subtitle.offset:0)+margin.top+margin.bottom,horz=config.orientation=='horizontal',animate=config.animate,height=size[horz?'width':'height']-(horz?marginWidth:marginHeight) --(config.showLabels&&(config.Label.size+config.labelOffset)),dim1=horz?'height':'width',dim2=horz?'width':'height';minWidth=size.width/8;this.st.graph.eachNode(function(n){var acum=0,animateValue=[];$.each(n.getData('valueArray'),function(v){acum+=+v;animateValue.push(0);});n.setData(dim1,minWidth);if(animate){n.setData(dim2,acum*height/maxValue,'end');n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return n*height/maxValue;}),'end');var dimArray=n.getData('dimArray');if(!dimArray){n.setData('dimArray',animateValue);}}else{n.setData(dim2,acum*height/maxValue);n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return n*height/maxValue;}));}});}});Options.PieChart={$extend:true,animate:true,offset:25,sliceOffset:0,labelOffset:3,type:'stacked',labelType:'name',hoveredColor:'#9fd4ff',Events:{enable:false,onClick:$.empty},Tips:{enable:false,onShow:$.empty,onHide:$.empty},showLabels:true,resizeLabels:false,updateHeights:false};Layouts.Radial=new Class({compute:function(property){var prop=$.splat(property||['current','start','end']);NodeDim.compute(this.graph,prop,this.config);this.graph.computeLevels(this.root,0,"ignore");var lengthFunc=this.createLevelDistanceFunc();this.computeAngularWidths(prop);this.computePositions(prop,lengthFunc);},computePositions:function(property,getLength){var propArray=property;var graph=this.graph;var root=graph.getNode(this.root);var parent=this.parent;var config=this.config;for(var i=0,l=propArray.length;imaxDim[pi]?dim:maxDim[pi]):dim;} subnodes.push(sib);},"ignore");if(parent&&parent.id==elem.id&&subnodes.length>0&&subnodes[0].dist){subnodes.sort(function(a,b){return(a.dist>=b.dist)-(a.dist<=b.dist);});} -for(var k=0,ls=subnodes.length;kpi/2&&p.theta<3*pi/2);var thetap=cond?p.theta+pi:p.theta;if(cond){x-=Math.abs(Math.cos(p.theta)*measure.width);y+=Math.sin(p.theta)*measure.width;}else if(node.id==this.viz.root){x-=measure.width/2;}} -ctx.save();ctx.translate(x,y);ctx.rotate(thetap);ctx.fillText(node.name,0,0);ctx.restore();}});Sunburst.Label.SVG=new Class({Implements:Graph.Label.SVG,initialize:function(viz){this.viz=viz;},placeLabel:function(tag,node,controller){var pos=node.pos.getc(true),viz=this.viz,canvas=this.viz.canvas;var radius=canvas.getSize();var labelPos={x:Math.round(pos.x+radius.width/2),y:Math.round(pos.y+radius.height/2)};tag.setAttribute('x',labelPos.x);tag.setAttribute('y',labelPos.y);var bb=tag.getBBox();if(bb){var x=tag.getAttribute('x');var y=tag.getAttribute('y');var p=node.pos.getp(true);var pi=Math.PI;var cond=(p.theta>pi/2&&p.theta<3*pi/2);if(cond){tag.setAttribute('x',x-bb.width);tag.setAttribute('y',y-bb.height);}else if(node.id==viz.root){tag.setAttribute('x',x-bb.width/2);} +this.graph.eachNode(function(n){var p=n.getPos(prop);p.theta+=theta;if(p.theta<0){p.theta+=Math.PI*2;}});if(method=='animate'){this.fx.animate(options);}else if(method=='replot'){this.fx.plot();this.busy=false;}},plot:function(){this.fx.plot();}});$jit.Sunburst.$extend=true;(function(Sunburst){Sunburst.Op=new Class({Implements:Graph.Op});Sunburst.Plot=new Class({Implements:Graph.Plot});Sunburst.Label={};Sunburst.Label.Native=new Class({Implements:Graph.Label.Native,initialize:function(viz){this.viz=viz;this.label=viz.config.Label;this.config=viz.config;},renderLabel:function(canvas,node,controller){var span=node.getData('span');if(spanpi / 2&&p.theta<3*pi / 2);var thetap=cond?p.theta+pi:p.theta;if(cond){x-=Math.abs(Math.cos(p.theta)*measure.width);y+=Math.sin(p.theta)*measure.width;}else if(node.id==this.viz.root){x-=measure.width / 2;}} +ctx.save();ctx.translate(x,y);ctx.rotate(thetap);ctx.fillText(node.name,0,0);ctx.restore();}});Sunburst.Label.SVG=new Class({Implements:Graph.Label.SVG,initialize:function(viz){this.viz=viz;},placeLabel:function(tag,node,controller){var pos=node.pos.getc(true),viz=this.viz,canvas=this.viz.canvas;var radius=canvas.getSize();var labelPos={x:Math.round(pos.x+radius.width / 2),y:Math.round(pos.y+radius.height / 2)};tag.setAttribute('x',labelPos.x);tag.setAttribute('y',labelPos.y);var bb=tag.getBBox();if(bb){var x=tag.getAttribute('x');var y=tag.getAttribute('y');var p=node.pos.getp(true);var pi=Math.PI;var cond=(p.theta>pi / 2&&p.theta<3*pi / 2);if(cond){tag.setAttribute('x',x-bb.width);tag.setAttribute('y',y-bb.height);}else if(node.id==viz.root){tag.setAttribute('x',x-bb.width / 2);} var thetap=cond?p.theta+pi:p.theta;if(node._depth) -tag.setAttribute('transform','rotate('+thetap*360/(2*pi)+' '+x +tag.setAttribute('transform','rotate('+thetap*360 /(2*pi)+' '+x +' '+y+')');} -controller.onPlaceLabel(tag,node);}});Sunburst.Label.HTML=new Class({Implements:Graph.Label.HTML,initialize:function(viz){this.viz=viz;},placeLabel:function(tag,node,controller){var pos=node.pos.clone(),canvas=this.viz.canvas,height=node.getData('height'),ldist=((height||node._depth==0)?height:this.viz.config.levelDistance)/2,radius=canvas.getSize();pos.rho+=ldist;pos=pos.getc(true);var labelPos={x:Math.round(pos.x+radius.width/2),y:Math.round(pos.y+radius.height/2)};var style=tag.style;style.left=labelPos.x+'px';style.top=labelPos.y+'px';style.display=this.fitsInCanvas(labelPos,canvas)?'':'none';controller.onPlaceLabel(tag,node);}});Sunburst.Plot.NodeTypes=new Class({'none':{'render':$.empty,'contains':$.lambda(false),'anglecontains':function(node,pos){var span=node.getData('span')/2,theta=node.pos.theta;var begin=theta-span,end=theta+span;if(begin<0) +controller.onPlaceLabel(tag,node);}});Sunburst.Label.HTML=new Class({Implements:Graph.Label.HTML,initialize:function(viz){this.viz=viz;},placeLabel:function(tag,node,controller){var pos=node.pos.clone(),canvas=this.viz.canvas,height=node.getData('height'),ldist=((height||node._depth==0)?height:this.viz.config.levelDistance)/2,radius=canvas.getSize();pos.rho+=ldist;pos=pos.getc(true);var labelPos={x:Math.round(pos.x+radius.width / 2),y:Math.round(pos.y+radius.height / 2)};var style=tag.style;style.left=labelPos.x+'px';style.top=labelPos.y+'px';style.display=this.fitsInCanvas(labelPos,canvas)?'':'none';controller.onPlaceLabel(tag,node);}});Sunburst.Plot.NodeTypes=new Class({'none':{'render':$.empty,'contains':$.lambda(false),'anglecontains':function(node,pos){var span=node.getData('span')/ 2,theta=node.pos.theta;var begin=theta-span,end=theta+span;if(begin<0) begin+=Math.PI*2;var atan=Math.atan2(pos.y,pos.x);if(atan<0) -atan+=Math.PI*2;if(begin>end){return(atan>begin&&atan<=Math.PI*2)||atanbegin&&atanend){return(atan>begin&&atan<=Math.PI*2)||atanbegin&&atanend){return(atan>begin&&atan<=Math.PI*2)||atanbegin&&atan=ld*d)&&(rho<=(ld*d+ldist));} -return false;}},'gradient-multipie':{'render':function(node,canvas){var ctx=canvas.getCtx();var height=node.getData('height');var ldist=height?height:this.config.levelDistance;var radialGradient=ctx.createRadialGradient(0,0,node.getPos().rho,0,0,node.getPos().rho+ldist);var colorArray=$.hexToRgb(node.getData('color')),ans=[];$.each(colorArray,function(i){ans.push(parseInt(i*0.5,10));});var endColor=$.rgbToHex(ans);radialGradient.addColorStop(0,endColor);radialGradient.addColorStop(1,node.getData('color'));ctx.fillStyle=radialGradient;this.nodeTypes['multipie'].render.call(this,node,canvas);},'contains':function(node,pos){return this.nodeTypes['multipie'].contains.call(this,node,pos);}},'gradient-pie':{'render':function(node,canvas){var ctx=canvas.getCtx();var radialGradient=ctx.createRadialGradient(0,0,0,0,0,node.getPos().rho);var colorArray=$.hexToRgb(node.getData('color')),ans=[];$.each(colorArray,function(i){ans.push(parseInt(i*0.5,10));});var endColor=$.rgbToHex(ans);radialGradient.addColorStop(1,endColor);radialGradient.addColorStop(0,node.getData('color'));ctx.fillStyle=radialGradient;this.nodeTypes['pie'].render.call(this,node,canvas);},'contains':function(node,pos){return this.nodeTypes['pie'].contains.call(this,node,pos);}}});Sunburst.Plot.EdgeTypes=new Class({'none':$.empty,'line':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true);this.edgeHelper.line.render(from,to,canvas);},'contains':function(adj,pos){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true);return this.edgeHelper.line.contains(from,to,pos,this.edge.epsilon);}},'arrow':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true),dim=adj.getData('dim'),direction=adj.data.$direction,inv=(direction&&direction.length>1&&direction[0]!=adj.nodeFrom.id);this.edgeHelper.arrow.render(from,to,dim,inv,canvas);},'contains':function(adj,pos){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true);return this.edgeHelper.arrow.contains(from,to,pos,this.edge.epsilon);}},'hyperline':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(),to=adj.nodeTo.pos.getc(),dim=Math.max(from.norm(),to.norm());this.edgeHelper.hyperline.render(from.$scale(1/dim),to.$scale(1/dim),dim,canvas);},'contains':$.lambda(false)}});})($jit.Sunburst);$jit.Sunburst.Plot.NodeTypes.implement({'piechart-stacked':{'render':function(node,canvas){var pos=node.pos.getp(true),dimArray=node.getData('dimArray'),valueArray=node.getData('valueArray'),colorArray=node.getData('colorArray'),colorLength=colorArray.length,stringArray=node.getData('stringArray'),span=node.getData('span')/2,theta=node.pos.theta,begin=theta-span,end=theta+span,polar=new Polar;var ctx=canvas.getCtx(),opt={},gradient=node.getData('gradient'),border=node.getData('border'),config=node.getData('config'),showLabels=config.showLabels,resizeLabels=config.resizeLabels,label=config.Label;var xpos=config.sliceOffset*Math.cos((begin+end)/2);var ypos=config.sliceOffset*Math.sin((begin+end)/2);if(colorArray&&dimArray&&stringArray){for(var i=0,l=dimArray.length,acum=0,valAcum=0;i>0;}),endColor=$.rgbToHex(ans);radialGradient.addColorStop(0,colori);radialGradient.addColorStop(0.5,colori);radialGradient.addColorStop(1,endColor);ctx.fillStyle=radialGradient;} +atan+=Math.PI*2;if(begin>end){return(atan>begin&&atan<=Math.PI*2)||atanbegin&&atan=ld*d)&&(rho<=(ld*d+ldist));} +return false;}},'gradient-multipie':{'render':function(node,canvas){var ctx=canvas.getCtx();var height=node.getData('height');var ldist=height?height:this.config.levelDistance;var radialGradient=ctx.createRadialGradient(0,0,node.getPos().rho,0,0,node.getPos().rho+ldist);var colorArray=$.hexToRgb(node.getData('color')),ans=[];$.each(colorArray,function(i){ans.push(parseInt(i*0.5,10));});var endColor=$.rgbToHex(ans);radialGradient.addColorStop(0,endColor);radialGradient.addColorStop(1,node.getData('color'));ctx.fillStyle=radialGradient;this.nodeTypes['multipie'].render.call(this,node,canvas);},'contains':function(node,pos){return this.nodeTypes['multipie'].contains.call(this,node,pos);}},'gradient-pie':{'render':function(node,canvas){var ctx=canvas.getCtx();var radialGradient=ctx.createRadialGradient(0,0,0,0,0,node.getPos().rho);var colorArray=$.hexToRgb(node.getData('color')),ans=[];$.each(colorArray,function(i){ans.push(parseInt(i*0.5,10));});var endColor=$.rgbToHex(ans);radialGradient.addColorStop(1,endColor);radialGradient.addColorStop(0,node.getData('color'));ctx.fillStyle=radialGradient;this.nodeTypes['pie'].render.call(this,node,canvas);},'contains':function(node,pos){return this.nodeTypes['pie'].contains.call(this,node,pos);}}});Sunburst.Plot.EdgeTypes=new Class({'none':$.empty,'line':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true);this.edgeHelper.line.render(from,to,canvas);},'contains':function(adj,pos){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true);return this.edgeHelper.line.contains(from,to,pos,this.edge.epsilon);}},'arrow':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true),dim=adj.getData('dim'),direction=adj.data.$direction,inv=(direction&&direction.length>1&&direction[0]!=adj.nodeFrom.id);this.edgeHelper.arrow.render(from,to,dim,inv,canvas);},'contains':function(adj,pos){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true);return this.edgeHelper.arrow.contains(from,to,pos,this.edge.epsilon);}},'hyperline':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(),to=adj.nodeTo.pos.getc(),dim=Math.max(from.norm(),to.norm());this.edgeHelper.hyperline.render(from.$scale(1/dim),to.$scale(1/dim),dim,canvas);},'contains':$.lambda(false)}});})($jit.Sunburst);$jit.Sunburst.Plot.NodeTypes.implement({'piechart-stacked':{'render':function(node,canvas){var pos=node.pos.getp(true),dimArray=node.getData('dimArray'),valueArray=node.getData('valueArray'),colorArray=node.getData('colorArray'),colorLength=colorArray.length,stringArray=node.getData('stringArray'),span=node.getData('span')/ 2,theta=node.pos.theta,begin=theta-span,end=theta+span,polar=new Polar;var ctx=canvas.getCtx(),opt={},gradient=node.getData('gradient'),border=node.getData('border'),config=node.getData('config'),showLabels=config.showLabels,resizeLabels=config.resizeLabels,label=config.Label;var xpos=config.sliceOffset*Math.cos((begin+end)/2);var ypos=config.sliceOffset*Math.sin((begin+end)/2);if(colorArray&&dimArray&&stringArray){for(var i=0,l=dimArray.length,acum=0,valAcum=0;i>0;}),endColor=$.rgbToHex(ans);radialGradient.addColorStop(0,colori);radialGradient.addColorStop(0.5,colori);radialGradient.addColorStop(1,endColor);ctx.fillStyle=radialGradient;} polar.rho=acum+config.sliceOffset;polar.theta=begin;var p1coord=polar.getc(true);polar.theta=end;var p2coord=polar.getc(true);polar.rho+=dimi;var p3coord=polar.getc(true);polar.theta=begin;var p4coord=polar.getc(true);ctx.beginPath();ctx.arc(xpos,ypos,acum+.01,begin,end,false);ctx.arc(xpos,ypos,acum+dimi+.01,end,begin,true);ctx.fill();if(border&&border.name==stringArray[i]){opt.acum=acum;opt.dimValue=dimArray[i];opt.begin=begin;opt.end=end;} acum+=(dimi||0);valAcum+=(valueArray[i]||0);} if(border){ctx.save();ctx.globalCompositeOperation="source-over";ctx.lineWidth=2;ctx.strokeStyle=border.color;var s=begin>0;fontSize=fontSize<+resizeLabels?+resizeLabels:fontSize;ctx.font=label.style+' '+fontSize+'px '+label.family;ctx.textBaseline='middle';ctx.textAlign='center';polar.rho=acum+config.labelOffset+config.sliceOffset;polar.theta=node.pos.theta;var cart=polar.getc(true);ctx.fillText(node.name,cart.x,cart.y);ctx.restore();}}},'contains':function(node,pos){if(this.nodeTypes['none'].anglecontains.call(this,node,pos)){var rho=Math.sqrt(pos.x*pos.x+pos.y*pos.y);var ld=this.config.levelDistance,d=node._depth;var config=node.getData('config');if(rho<=ld*d+config.sliceOffset){var dimArray=node.getData('dimArray');for(var i=0,l=dimArray.length,acum=config.sliceOffset;i=acum&&rho<=acum+dimi){return{name:node.getData('stringArray')[i],color:node.getData('colorArray')[i],value:node.getData('valueArray')[i],label:node.name};} acum+=dimi;}} return false;} -return false;}},'piechart-basic':{'render':function(node,canvas){var pos=node.pos.getp(true),dimArray=node.getData('dimArray'),valueArray=node.getData('valueArray'),colorArray=node.getData('colorMono'),colorLength=colorArray.length,stringArray=node.getData('stringArray'),percentage=node.getData('percentage'),iteration=node.getData('iteration'),span=node.getData('span')/2,theta=node.pos.theta,begin=theta-span,end=theta+span,polar=new Polar;var ctx=canvas.getCtx(),opt={},gradient=node.getData('gradient'),border=node.getData('border'),config=node.getData('config'),renderSubtitle=node.getData('renderSubtitle'),renderBackground=config.renderBackground,showLabels=config.showLabels,resizeLabels=config.resizeLabels,label=config.Label;var xpos=config.sliceOffset*Math.cos((begin+end)/2);var ypos=config.sliceOffset*Math.sin((begin+end)/2);if(iteration==0&&typeof FlashCanvas!="undefined"&&renderBackground){backgroundColor=config.backgroundColor,size=canvas.getSize();ctx.save();ctx.fillStyle=backgroundColor;ctx.fillRect(-size.width/2,-size.height/2,size.width,size.height);var margin=config.Margin,title=config.Title,subtitle=config.Subtitle;ctx.fillStyle=title.color;ctx.textAlign='left';if(title.text!=""){ctx.font=label.style+' bold '+' '+title.size+'px '+label.family;ctx.moveTo(0,0);if(label.type=='Native'){ctx.fillText(title.text,-size.width/2+margin.left,-size.height/2+margin.top);}} +return false;}},'piechart-basic':{'render':function(node,canvas){var pos=node.pos.getp(true),dimArray=node.getData('dimArray'),valueArray=node.getData('valueArray'),colorArray=node.getData('colorMono'),colorLength=colorArray.length,stringArray=node.getData('stringArray'),percentage=node.getData('percentage'),iteration=node.getData('iteration'),span=node.getData('span')/ 2,theta=node.pos.theta,begin=theta-span,end=theta+span,polar=new Polar;var ctx=canvas.getCtx(),opt={},gradient=node.getData('gradient'),border=node.getData('border'),config=node.getData('config'),renderSubtitle=node.getData('renderSubtitle'),renderBackground=config.renderBackground,showLabels=config.showLabels,resizeLabels=config.resizeLabels,label=config.Label;var xpos=config.sliceOffset*Math.cos((begin+end)/2);var ypos=config.sliceOffset*Math.sin((begin+end)/2);if(iteration==0&&typeof FlashCanvas!="undefined"&&renderBackground){backgroundColor=config.backgroundColor,size=canvas.getSize();ctx.save();ctx.fillStyle=backgroundColor;ctx.fillRect(-size.width/2,-size.height/2,size.width,size.height);var margin=config.Margin,title=config.Title,subtitle=config.Subtitle;ctx.fillStyle=title.color;ctx.textAlign='left';if(title.text!=""){ctx.font=label.style+' bold '+' '+title.size+'px '+label.family;ctx.moveTo(0,0);if(label.type=='Native'){ctx.fillText(title.text,-size.width/2+margin.left,-size.height/2+margin.top);}} if(subtitle.text!=""){ctx.font=label.style+' '+subtitle.size+'px '+label.family;if(label.type=='Native'){ctx.fillText(subtitle.text,-size.width/2+margin.left,size.height/2-margin.bottom);}} ctx.restore();} if(colorArray&&dimArray&&stringArray){for(var i=0,l=dimArray.length,acum=0,valAcum=0;i>0;}),endColor2=$.map(colorRgb,function(i){return(i*0.7)>>0;});radialGradient.addColorStop(0,'rgba('+colorRgb+',1)');radialGradient.addColorStop(.7,'rgba('+colorRgb+',1)');radialGradient.addColorStop(.98,'rgba('+endColor+',1)');radialGradient.addColorStop(1,'rgba('+endColor2+',1)');ctx.fillStyle=radialGradient;}} ctx.beginPath();ctx.arc(xpos,ypos,acum+.01,begin,end,false);ctx.arc(xpos,ypos,acum+dimi+.01,end,begin,true);ctx.fill();if(border&&border.name==stringArray[i]){opt.acum=acum;opt.dimValue=dimArray[i];opt.begin=begin;opt.end=end;opt.sliceValue=valueArray[i];} acum+=(dimi||0);valAcum+=(valueArray[i]||0);} if(border){ctx.save();ctx.globalCompositeOperation="source-over";ctx.lineWidth=2;ctx.strokeStyle=border.color;var s=begin>0;fontSize=fontSize<+resizeLabels?+resizeLabels:fontSize;ctx.font=label.style+' '+fontSize+'px '+label.family;ctx.textBaseline='middle';ctx.textAlign='center';pi=Math.PI;angle=theta*360/(2*pi);polar.rho=acum+config.labelOffset+config.sliceOffset;polar.theta=node.pos.theta;var cart=polar.getc(true);if(((angle>=225&&angle<=315)||(angle<=135&&angle>=45))&&percentage<=5){}else{if(config.labelType=='name'){ctx.fillText(node.name,cart.x,cart.y);}else{ctx.fillText(node.data.valuelabel,cart.x,cart.y);}} +if(showLabels&&label.type=='Native'){ctx.save();ctx.fillStyle=ctx.strokeStyle=label.color;var scale=resizeLabels?node.getData('normalizedDim'):1,fontSize=(label.size*scale)>>0;fontSize=fontSize<+resizeLabels?+resizeLabels:fontSize;ctx.font=label.style+' '+fontSize+'px '+label.family;ctx.textBaseline='middle';ctx.textAlign='center';pi=Math.PI;angle=theta*360 /(2*pi);polar.rho=acum+config.labelOffset+config.sliceOffset;polar.theta=node.pos.theta;var cart=polar.getc(true);if(((angle>=225&&angle<=315)||(angle<=135&&angle>=45))&&percentage<=5){}else{if(config.labelType=='name'){ctx.fillText(node.name,cart.x,cart.y);}else{ctx.fillText(node.data.valuelabel,cart.x,cart.y);}} ctx.restore();}}},'contains':function(node,pos){if(this.nodeTypes['none'].anglecontains.call(this,node,pos)){var rho=Math.sqrt(pos.x*pos.x+pos.y*pos.y);var ld=this.config.levelDistance,d=node._depth;var config=node.getData('config');if(rho<=ld*d+config.sliceOffset){var dimArray=node.getData('dimArray');for(var i=0,l=dimArray.length,acum=config.sliceOffset;i=acum&&rho<=acum+dimi){var url=Url.decode(node.getData('linkArray')[i]);return{name:node.getData('stringArray')[i],link:url,color:node.getData('colorArray')[i],value:node.getData('valueArray')[i],percentage:node.getData('percentage'),valuelabel:node.getData('valuelabelsArray')[i],label:node.name};} acum+=dimi;}} return false;} return false;}}});$jit.PieChart=new Class({sb:null,colors:["#416D9C","#70A35E","#EBB056","#C74243","#83548B","#909291","#557EAA"],selected:{},busy:false,initialize:function(opt){this.controller=this.config=$.merge(Options("Canvas","PieChart","Label"),{Label:{type:'Native'}},opt);this.initializeViz();},initializeViz:function(){var config=this.config,that=this;var nodeType=config.type.split(":")[0];var sb=new $jit.Sunburst({injectInto:config.injectInto,useCanvas:config.useCanvas,withLabels:config.Label.type!='Native',background:config.background,renderBackground:config.renderBackground,backgroundColor:config.backgroundColor,colorStop1:config.colorStop1,colorStop2:config.colorStop2,Label:{type:config.Label.type},Node:{overridable:true,type:'piechart-'+nodeType,width:1,height:1},Edge:{type:'none'},Tips:{enable:config.Tips.enable,type:'Native',force:true,onShow:function(tip,node,contains){var elem=contains;config.Tips.onShow(tip,elem,node);if(elem.link!='undefined'&&elem.link!=''){document.body.style.cursor='pointer';}},onHide:function(){document.body.style.cursor='default';}},Events:{enable:true,type:'Native',onClick:function(node,eventInfo,evt){if(!config.Events.enable)return;var elem=eventInfo.getContains();config.Events.onClick(elem,eventInfo,evt);},onMouseMove:function(node,eventInfo,evt){if(!config.hoveredColor)return;if(node){var elem=eventInfo.getContains();that.select(node.id,elem.name,elem.index);}else{that.select(false,false,false);}}},onCreateLabel:function(domElement,node){var labelConf=config.Label;if(config.showLabels){var style=domElement.style;style.fontSize=labelConf.size+'px';style.fontFamily=labelConf.family;style.color=labelConf.color;style.textAlign='center';if(config.labelType=='name'){domElement.innerHTML=node.name;}else{domElement.innerHTML=(node.data.valuelabel!=undefined)?node.data.valuelabel:"";} -domElement.style.width='400px';}},onPlaceLabel:function(domElement,node){if(!config.showLabels)return;var pos=node.pos.getp(true),dimArray=node.getData('dimArray'),span=node.getData('span')/2,theta=node.pos.theta,begin=theta-span,end=theta+span,polar=new Polar;var showLabels=config.showLabels,resizeLabels=config.resizeLabels,label=config.Label;if(dimArray){for(var i=0,l=dimArray.length,acum=0;i>0;fontSize=fontSize<+resizeLabels?+resizeLabels:fontSize;domElement.style.fontSize=fontSize+'px';polar.rho=acum+config.labelOffset+config.sliceOffset;polar.theta=(begin+end)/2;var pos=polar.getc(true);var radius=that.canvas.getSize();var labelPos={x:Math.round(pos.x+radius.width/2),y:Math.round(pos.y+radius.height/2)};domElement.style.left=(labelPos.x-200)+'px';domElement.style.top=labelPos.y+'px';}}});var size=sb.canvas.getSize(),min=Math.min;sb.config.levelDistance=min(size.width,size.height)/2 +domElement.style.width='400px';}},onPlaceLabel:function(domElement,node){if(!config.showLabels)return;var pos=node.pos.getp(true),dimArray=node.getData('dimArray'),span=node.getData('span')/ 2,theta=node.pos.theta,begin=theta-span,end=theta+span,polar=new Polar;var showLabels=config.showLabels,resizeLabels=config.resizeLabels,label=config.Label;if(dimArray){for(var i=0,l=dimArray.length,acum=0;i>0;fontSize=fontSize<+resizeLabels?+resizeLabels:fontSize;domElement.style.fontSize=fontSize+'px';polar.rho=acum+config.labelOffset+config.sliceOffset;polar.theta=(begin+end)/ 2;var pos=polar.getc(true);var radius=that.canvas.getSize();var labelPos={x:Math.round(pos.x+radius.width / 2),y:Math.round(pos.y+radius.height / 2)};domElement.style.left=(labelPos.x-200)+'px';domElement.style.top=labelPos.y+'px';}}});var size=sb.canvas.getSize(),min=Math.min;sb.config.levelDistance=min(size.width,size.height)/2 -config.offset-config.sliceOffset;this.sb=sb;this.canvas=this.sb.canvas;this.canvas.getCtx().globalCompositeOperation='lighter';},renderBackground:function(){var canvas=this.canvas,config=this.config,backgroundColor=config.backgroundColor,size=canvas.getSize(),ctx=canvas.getCtx();ctx.globalCompositeOperation="destination-over";ctx.fillStyle=backgroundColor;ctx.fillRect(-size.width/2,-size.height/2,size.width,size.height);},renderTitle:function(){var canvas=this.canvas,size=canvas.getSize(),config=this.config,margin=config.Margin,radius=this.sb.config.levelDistance,title=config.Title,label=config.Label,subtitle=config.Subtitle;ctx=canvas.getCtx();ctx.fillStyle=title.color;ctx.textAlign='left';ctx.font=label.style+' bold '+' '+title.size+'px '+label.family;ctx.moveTo(0,0);if(label.type=='Native'){ctx.fillText(title.text,-size.width/2+margin.left,-size.height/2+margin.top);}},renderSubtitle:function(){var canvas=this.canvas,size=canvas.getSize(),config=this.config,margin=config.Margin,radius=this.sb.config.levelDistance,title=config.Title,label=config.Label,subtitle=config.Subtitle;ctx=canvas.getCtx();ctx.fillStyle=title.color;ctx.textAlign='left';ctx.font=label.style+' '+subtitle.size+'px '+label.family;ctx.moveTo(0,0);if(label.type=='Native'){ctx.fillText(subtitle.text,-size.width/2+margin.left,size.height/2-margin.bottom);}},clear:function(){var canvas=this.canvas;var ctx=canvas.getCtx(),size=canvas.getSize();ctx.fillStyle="rgba(255,255,255,0)";ctx.fillRect(-size.width/2,-size.height/2,size.width,size.height);ctx.clearRect(-size.width/2,-size.height/2,size.width,size.height);},resizeGraph:function(json,orgWindowWidth,orgContainerDivWidth,cols){var canvas=this.canvas,size=canvas.getSize(),config=this.config,orgHeight=size.height,margin=config.Margin,st=this.st,horz=config.orientation=='horizontal';var newWindowWidth=document.body.offsetWidth;var diff=newWindowWidth-orgWindowWidth;var newWidth=orgContainerDivWidth+(diff/cols);var scale=newWidth/orgContainerDivWidth;canvas.resize(newWidth,orgHeight);if(typeof FlashCanvas=="undefined"){canvas.clear();}else{this.clear();} this.loadJSON(json);},loadJSON:function(json){var prefix=$.time(),ch=[],sb=this.sb,name=$.splat(json.label),nameLength=name.length,color=$.splat(json.color||this.colors),colorLength=color.length,config=this.config,renderBackground=config.renderBackground,title=config.Title,subtitle=config.Subtitle,gradient=!!config.type.split(":")[1],animate=config.animate,mono=nameLength==1;totalValue=0;for(var i=0,values=json.values,l=values.length;iacum?maxValue:acum;});return maxValue;},normalizeDims:function(){var root=this.sb.graph.getNode(this.sb.root),l=0;root.eachAdjacency(function(){l++;});var maxValue=this.getMaxValue()||1,config=this.config,animate=config.animate,rho=this.sb.config.levelDistance;this.sb.graph.eachNode(function(n){var acum=0,animateValue=[];$.each(n.getData('valueArray'),function(v){acum+=+v;animateValue.push(1);});var stat=(animateValue.length==1)&&!config.updateHeights;if(animate){n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return stat?rho:(n*rho/maxValue);}),'end');var dimArray=n.getData('dimArray');if(!dimArray){n.setData('dimArray',animateValue);}}else{n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return stat?rho:(n*rho/maxValue);}));} -n.setData('normalizedDim',acum/maxValue);});}});Options.GaugeChart={$extend:true,animate:true,offset:25,sliceOffset:0,labelOffset:3,type:'stacked',labelType:'name',hoveredColor:'#9fd4ff',Events:{enable:false,onClick:$.empty},Tips:{enable:false,onShow:$.empty,onHide:$.empty},showLabels:true,resizeLabels:false,updateHeights:false};$jit.Sunburst.Plot.NodeTypes.implement({'gaugechart-basic':{'render':function(node,canvas){var pos=node.pos.getp(true),dimArray=node.getData('dimArray'),valueArray=node.getData('valueArray'),valuelabelsArray=node.getData('valuelabelsArray'),gaugeTarget=node.getData('gaugeTarget'),nodeIteration=node.getData('nodeIteration'),nodeLength=node.getData('nodeLength'),colorArray=node.getData('colorMono'),colorLength=colorArray.length,stringArray=node.getData('stringArray'),span=node.getData('span')/2,theta=node.pos.theta,begin=((theta-span)/2)+Math.PI,end=((theta+span)/2)+Math.PI,polar=new Polar;var ctx=canvas.getCtx(),opt={},gradient=node.getData('gradient'),border=node.getData('border'),config=node.getData('config'),showLabels=config.showLabels,resizeLabels=config.resizeLabels,label=config.Label;var xpos=Math.cos((begin+end)/2);var ypos=Math.sin((begin+end)/2);if(colorArray&&dimArray&&stringArray&&gaugeTarget!=0){for(var i=0,l=dimArray.length,acum=0,valAcum=0;i>0;}),endColor=$.rgbToHex(ans);radialGradient.addColorStop(0,'rgba('+colorRgb+',1)');radialGradient.addColorStop(0.1,'rgba('+colorRgb+',1)');radialGradient.addColorStop(0.85,'rgba('+colorRgb+',1)');radialGradient.addColorStop(1,'rgba('+ans+',1)');ctx.fillStyle=radialGradient;} +if(animate){sb.fx.animate({modes:['node-property:dimArray'],duration:1500});}},updateJSON:function(json,onComplete){if(this.busy)return;this.busy=true;var sb=this.sb;var graph=sb.graph;var values=json.values;var animate=this.config.animate;var that=this;$.each(values,function(v){var n=graph.getByName(v.label),vals=$.splat(v.values);if(n){n.setData('valueArray',vals);n.setData('angularWidth',$.reduce(vals,function(x,y){return x+y;}));if(json.label){n.setData('stringArray',$.splat(json.label));}}});this.normalizeDims();if(animate){sb.compute('end');sb.fx.animate({modes:['node-property:dimArray:span','linear'],duration:1500,onComplete:function(){that.busy=false;onComplete&&onComplete.onComplete();}});}else{sb.refresh();}},select:function(id,name){if(!this.config.hoveredColor)return;var s=this.selected;if(s.id!=id||s.name!=name){s.id=id;s.name=name;s.color=this.config.hoveredColor;this.sb.graph.eachNode(function(n){if(id==n.id){n.setData('border',s);}else{n.setData('border',false);}});this.sb.plot();}},getLegend:function(){var legend=new Array();var name=new Array();var color=new Array();var n;this.sb.graph.getNode(this.sb.root).eachAdjacency(function(adj){n=adj.nodeTo;});var colors=n.getData('colorArray'),len=colors.length;$.each(n.getData('stringArray'),function(s,i){color[i]=colors[i%len];name[i]=s;});legend['name']=name;legend['color']=color;return legend;},getMaxValue:function(){var maxValue=0;this.sb.graph.eachNode(function(n){var valArray=n.getData('valueArray'),acum=0;$.each(valArray,function(v){acum+=+v;});maxValue=maxValue>acum?maxValue:acum;});return maxValue;},normalizeDims:function(){var root=this.sb.graph.getNode(this.sb.root),l=0;root.eachAdjacency(function(){l++;});var maxValue=this.getMaxValue()||1,config=this.config,animate=config.animate,rho=this.sb.config.levelDistance;this.sb.graph.eachNode(function(n){var acum=0,animateValue=[];$.each(n.getData('valueArray'),function(v){acum+=+v;animateValue.push(1);});var stat=(animateValue.length==1)&&!config.updateHeights;if(animate){n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return stat?rho:(n*rho / maxValue);}),'end');var dimArray=n.getData('dimArray');if(!dimArray){n.setData('dimArray',animateValue);}}else{n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return stat?rho:(n*rho / maxValue);}));} +n.setData('normalizedDim',acum / maxValue);});}});Options.GaugeChart={$extend:true,animate:true,offset:25,sliceOffset:0,labelOffset:3,type:'stacked',labelType:'name',hoveredColor:'#9fd4ff',Events:{enable:false,onClick:$.empty},Tips:{enable:false,onShow:$.empty,onHide:$.empty},showLabels:true,resizeLabels:false,updateHeights:false};$jit.Sunburst.Plot.NodeTypes.implement({'gaugechart-basic':{'render':function(node,canvas){var pos=node.pos.getp(true),dimArray=node.getData('dimArray'),valueArray=node.getData('valueArray'),valuelabelsArray=node.getData('valuelabelsArray'),gaugeTarget=node.getData('gaugeTarget'),nodeIteration=node.getData('nodeIteration'),nodeLength=node.getData('nodeLength'),colorArray=node.getData('colorMono'),colorLength=colorArray.length,stringArray=node.getData('stringArray'),span=node.getData('span')/ 2,theta=node.pos.theta,begin=((theta-span)/2)+Math.PI,end=((theta+span)/2)+Math.PI,polar=new Polar;var ctx=canvas.getCtx(),opt={},gradient=node.getData('gradient'),border=node.getData('border'),config=node.getData('config'),showLabels=config.showLabels,resizeLabels=config.resizeLabels,label=config.Label;var xpos=Math.cos((begin+end)/2);var ypos=Math.sin((begin+end)/2);if(colorArray&&dimArray&&stringArray&&gaugeTarget!=0){for(var i=0,l=dimArray.length,acum=0,valAcum=0;i>0;}),endColor=$.rgbToHex(ans);radialGradient.addColorStop(0,'rgba('+colorRgb+',1)');radialGradient.addColorStop(0.1,'rgba('+colorRgb+',1)');radialGradient.addColorStop(0.85,'rgba('+colorRgb+',1)');radialGradient.addColorStop(1,'rgba('+ans+',1)');ctx.fillStyle=radialGradient;} polar.rho=acum;polar.theta=begin;var p1coord=polar.getc(true);polar.theta=end;var p2coord=polar.getc(true);polar.rho+=dimi;var p3coord=polar.getc(true);polar.theta=begin;var p4coord=polar.getc(true);ctx.beginPath();ctx.arc(xpos,(ypos+dimi/2),(acum+dimi+.01)*.8,begin,end,false);ctx.arc(xpos,(ypos+dimi/2),(acum+dimi+.01),end,begin,true);ctx.fill();acum+=(dimi||0);valAcum+=(valueArray[i]||0);} -if(showLabels&&label.type=='Native'){ctx.save();ctx.fillStyle=ctx.strokeStyle=label.color;ctx.font=label.style+' '+label.size+'px '+label.family;ctx.textBaseline='bottom';ctx.textAlign='center';polar.rho=acum*.65;polar.theta=begin;var cart=polar.getc(true);if(nodeIteration==1){textY=cart.y-(label.size/2)+acum/2;}else{textY=cart.y+acum/2;} +if(showLabels&&label.type=='Native'){ctx.save();ctx.fillStyle=ctx.strokeStyle=label.color;ctx.font=label.style+' '+label.size+'px '+label.family;ctx.textBaseline='bottom';ctx.textAlign='center';polar.rho=acum*.65;polar.theta=begin;var cart=polar.getc(true);if(nodeIteration==1){textY=cart.y-(label.size/2)+acum /2;}else{textY=cart.y+acum/2;} if(config.labelType=='name'){ctx.fillText(node.name,cart.x,textY);}else{ctx.fillText(valuelabelsArray[0],cart.x,textY);} if(nodeIteration==nodeLength){polar.theta=end;var cart=polar.getc(true);if(config.labelType=='name'){ctx.fillText(node.name,cart.x,cart.x,cart.y-(label.size/2)+acum/2);}else{ctx.fillText(valuelabelsArray[1],cart.x,cart.y-(label.size/2)+acum/2);}} ctx.restore();}}},'contains':function(node,pos){if(this.nodeTypes['none'].anglecontainsgauge.call(this,node,pos)){var config=node.getData('config');var ld=this.config.levelDistance,d=node._depth;var yOffset=pos.y-(ld/2);var xOffset=pos.x;var rho=Math.sqrt(xOffset*xOffset+yOffset*yOffset);if(rho<=parseInt(ld*d)){var dimArray=node.getData('dimArray');for(var i=0,l=dimArray.length,acum=config.sliceOffset;i=ld*.8&&rho<=acum+dimi){var url=Url.decode(node.getData('linkArray')[i]);return{name:node.getData('stringArray')[i],link:url,color:node.getData('colorArray')[i],value:node.getData('valueArray')[i],valuelabel:node.getData('valuelabelsArray')[0]+" - "+node.getData('valuelabelsArray')[1],label:node.name};} acum+=dimi;}} return false;} return false;}}});$jit.GaugeChart=new Class({sb:null,colors:["#416D9C","#70A35E","#EBB056","#C74243","#83548B","#909291","#557EAA"],selected:{},busy:false,initialize:function(opt){this.controller=this.config=$.merge(Options("Canvas","GaugeChart","Label"),{Label:{type:'Native'}},opt);this.initializeViz();},initializeViz:function(){var config=this.config,that=this;var nodeType=config.type.split(":")[0];var sb=new $jit.Sunburst({injectInto:config.injectInto,useCanvas:config.useCanvas,withLabels:config.Label.type!='Native',background:config.background,renderBackground:config.renderBackground,backgroundColor:config.backgroundColor,colorStop1:config.colorStop1,colorStop2:config.colorStop2,Label:{type:config.Label.type},Node:{overridable:true,type:'gaugechart-'+nodeType,width:1,height:1},Edge:{type:'none'},Tips:{enable:config.Tips.enable,type:'Native',force:true,onShow:function(tip,node,contains){var elem=contains;config.Tips.onShow(tip,elem,node);if(elem.link!='undefined'&&elem.link!=''){document.body.style.cursor='pointer';}},onHide:function(){document.body.style.cursor='default';}},Events:{enable:true,type:'Native',onClick:function(node,eventInfo,evt){if(!config.Events.enable)return;var elem=eventInfo.getContains();config.Events.onClick(elem,eventInfo,evt);}},onCreateLabel:function(domElement,node){var labelConf=config.Label;if(config.showLabels){var style=domElement.style;style.fontSize=labelConf.size+'px';style.fontFamily=labelConf.family;style.color=labelConf.color;style.textAlign='center';valuelabelsArray=node.getData('valuelabelsArray'),nodeIteration=node.getData('nodeIteration'),nodeLength=node.getData('nodeLength'),canvas=sb.canvas,prefix=$.time();if(config.labelType=='name'){domElement.innerHTML=node.name;}else{domElement.innerHTML=(valuelabelsArray[0]!=undefined)?valuelabelsArray[0]:"";} -domElement.style.width='400px';if(nodeIteration==nodeLength&&nodeLength!=0){idLabel=canvas.id+"-label";container=document.getElementById(idLabel);finalLabel=document.createElement('div');finalLabelStyle=finalLabel.style;finalLabel.id=prefix+"finalLabel";finalLabelStyle.position="absolute";finalLabelStyle.width="400px";finalLabelStyle.left="0px";container.appendChild(finalLabel);if(config.labelType=='name'){finalLabel.innerHTML=node.name;}else{finalLabel.innerHTML=(valuelabelsArray[1]!=undefined)?valuelabelsArray[1]:"";}}}},onPlaceLabel:function(domElement,node){if(!config.showLabels)return;var pos=node.pos.getp(true),dimArray=node.getData('dimArray'),nodeIteration=node.getData('nodeIteration'),nodeLength=node.getData('nodeLength'),span=node.getData('span')/2,theta=node.pos.theta,begin=((theta-span)/2)+Math.PI,end=((theta+span)/2)+Math.PI,polar=new Polar;var showLabels=config.showLabels,resizeLabels=config.resizeLabels,label=config.Label,radiusOffset=sb.config.levelDistance;if(dimArray){for(var i=0,l=dimArray.length,acum=0;i>0;fontSize=fontSize<+resizeLabels?+resizeLabels:fontSize;domElement.style.fontSize=fontSize+'px';polar.rho=acum*.65;polar.theta=begin;var pos=polar.getc(true);var radius=that.canvas.getSize();var labelPos={x:Math.round(pos.x+radius.width/2),y:Math.round(pos.y+(radius.height/2)+radiusOffset/2)};domElement.style.left=(labelPos.x-200)+'px';domElement.style.top=labelPos.y+'px';if(nodeIteration==1){domElement.style.top=labelPos.y-label.size+'px';} -if(nodeIteration==nodeLength&&nodeLength!=0){polar.theta=end;var final=polar.getc(true);var finalPos={x:Math.round(final.x+radius.width/2),y:Math.round(final.y+(radius.height/2)+radiusOffset/2)};finalLabel.style.left=(finalPos.x-200)+"px";finalLabel.style.top=finalPos.y-label.size+"px";}}}});this.sb=sb;this.canvas=this.sb.canvas;var size=sb.canvas.getSize(),min=Math.min;sb.config.levelDistance=min(size.width,size.height)/2 --config.offset-config.sliceOffset;},renderBackground:function(){var canvas=this.sb.canvas,config=this.config,style=config.gaugeStyle,ctx=canvas.getCtx(),size=canvas.getSize(),radius=this.sb.config.levelDistance,startAngle=(Math.PI/180)*1,endAngle=(Math.PI/180)*179;ctx.fillStyle=style.borderColor;ctx.beginPath();ctx.arc(0,radius/2,radius+4,startAngle,endAngle,true);ctx.fill();var radialGradient=ctx.createRadialGradient(0,radius/2,0,0,radius/2,radius);radialGradient.addColorStop(0,'#ffffff');radialGradient.addColorStop(0.3,style.backgroundColor);radialGradient.addColorStop(0.6,style.backgroundColor);radialGradient.addColorStop(1,'#FFFFFF');ctx.fillStyle=radialGradient;startAngle=(Math.PI/180)*0;endAngle=(Math.PI/180)*180;ctx.beginPath();ctx.arc(0,radius/2,radius,startAngle,endAngle,true);ctx.fill();},renderNeedle:function(gaugePosition,target){var canvas=this.sb.canvas,config=this.config,style=config.gaugeStyle,ctx=canvas.getCtx(),size=canvas.getSize(),radius=this.sb.config.levelDistance;gaugeCenter=(radius/2);startAngle=0;endAngle=(Math.PI/180)*180;ctx.fillStyle=style.needleColor;var segments=180/target;needleAngle=gaugePosition*segments;ctx.translate(0,gaugeCenter);ctx.save();ctx.rotate(needleAngle*Math.PI/180);ctx.beginPath();ctx.moveTo(0,0);ctx.lineTo(0,-4);ctx.lineTo(-radius*.9,-1);ctx.lineTo(-radius*.9,1);ctx.lineTo(0,4);ctx.lineTo(0,0);ctx.closePath();ctx.fill();ctx.restore();ctx.lineWidth=1;ctx.strokeStyle='#aa0000';ctx.save();ctx.rotate(needleAngle*Math.PI/180);ctx.beginPath();ctx.moveTo(0,0);ctx.lineTo(0,-4);ctx.lineTo(-radius*.8,-1);ctx.lineTo(-radius*.8,1);ctx.lineTo(0,4);ctx.lineTo(0,0);ctx.closePath();ctx.stroke();ctx.restore();ctx.fillStyle="#000000";ctx.lineWidth=style.borderSize;ctx.strokeStyle=style.borderColor;var radialGradient=ctx.createRadialGradient(0,style.borderSize,0,0,style.borderSize,radius*.2);radialGradient.addColorStop(0,'#666666');radialGradient.addColorStop(0.8,'#444444');radialGradient.addColorStop(1,'rgba(0,0,0,0)');ctx.fillStyle=radialGradient;ctx.translate(0,5);ctx.save();ctx.beginPath();ctx.arc(0,0,radius*.2,startAngle,endAngle,true);ctx.fill();ctx.restore();},renderTicks:function(values){var canvas=this.sb.canvas,config=this.config,style=config.gaugeStyle,ctx=canvas.getCtx(),size=canvas.getSize(),radius=this.sb.config.levelDistance,gaugeCenter=(radius/2);ctx.strokeStyle=style.borderColor;ctx.lineWidth=5;ctx.lineCap="round";for(var i=0,total=0,l=values.length;i>0;fontSize=fontSize<+resizeLabels?+resizeLabels:fontSize;domElement.style.fontSize=fontSize+'px';polar.rho=acum*.65;polar.theta=begin;var pos=polar.getc(true);var radius=that.canvas.getSize();var labelPos={x:Math.round(pos.x+radius.width / 2),y:Math.round(pos.y+(radius.height / 2)+radiusOffset/2)};domElement.style.left=(labelPos.x-200)+'px';domElement.style.top=labelPos.y+'px';if(nodeIteration==1){domElement.style.top=labelPos.y-label.size+'px';} +if(nodeIteration==nodeLength&&nodeLength!=0){polar.theta=end;var final=polar.getc(true);var finalPos={x:Math.round(final.x+radius.width / 2),y:Math.round(final.y+(radius.height / 2)+radiusOffset/2)};finalLabel.style.left=(finalPos.x-200)+"px";finalLabel.style.top=finalPos.y-label.size+"px";}}}});this.sb=sb;this.canvas=this.sb.canvas;var size=sb.canvas.getSize(),min=Math.min;sb.config.levelDistance=min(size.width,size.height)/2 +-config.offset-config.sliceOffset;},renderBackground:function(){var canvas=this.sb.canvas,config=this.config,style=config.gaugeStyle,ctx=canvas.getCtx(),size=canvas.getSize(),radius=this.sb.config.levelDistance,startAngle=(Math.PI/180)*1,endAngle=(Math.PI/180)*179;ctx.fillStyle=style.borderColor;ctx.beginPath();ctx.arc(0,radius/2,radius+4,startAngle,endAngle,true);ctx.fill();var radialGradient=ctx.createRadialGradient(0,radius/2,0,0,radius/2,radius);radialGradient.addColorStop(0,'#ffffff');radialGradient.addColorStop(0.3,style.backgroundColor);radialGradient.addColorStop(0.6,style.backgroundColor);radialGradient.addColorStop(1,'#FFFFFF');ctx.fillStyle=radialGradient;startAngle=(Math.PI/180)*0;endAngle=(Math.PI/180)*180;ctx.beginPath();ctx.arc(0,radius/2,radius,startAngle,endAngle,true);ctx.fill();},renderNeedle:function(gaugePosition,target){var canvas=this.sb.canvas,config=this.config,style=config.gaugeStyle,ctx=canvas.getCtx(),size=canvas.getSize(),radius=this.sb.config.levelDistance;gaugeCenter=(radius/2);startAngle=0;endAngle=(Math.PI/180)*180;ctx.fillStyle=style.needleColor;var segments=180/target;needleAngle=gaugePosition*segments;ctx.translate(0,gaugeCenter);ctx.save();ctx.rotate(needleAngle*Math.PI / 180);ctx.beginPath();ctx.moveTo(0,0);ctx.lineTo(0,-4);ctx.lineTo(-radius*.9,-1);ctx.lineTo(-radius*.9,1);ctx.lineTo(0,4);ctx.lineTo(0,0);ctx.closePath();ctx.fill();ctx.restore();ctx.lineWidth=1;ctx.strokeStyle='#aa0000';ctx.save();ctx.rotate(needleAngle*Math.PI / 180);ctx.beginPath();ctx.moveTo(0,0);ctx.lineTo(0,-4);ctx.lineTo(-radius*.8,-1);ctx.lineTo(-radius*.8,1);ctx.lineTo(0,4);ctx.lineTo(0,0);ctx.closePath();ctx.stroke();ctx.restore();ctx.fillStyle="#000000";ctx.lineWidth=style.borderSize;ctx.strokeStyle=style.borderColor;var radialGradient=ctx.createRadialGradient(0,style.borderSize,0,0,style.borderSize,radius*.2);radialGradient.addColorStop(0,'#666666');radialGradient.addColorStop(0.8,'#444444');radialGradient.addColorStop(1,'rgba(0,0,0,0)');ctx.fillStyle=radialGradient;ctx.translate(0,5);ctx.save();ctx.beginPath();ctx.arc(0,0,radius*.2,startAngle,endAngle,true);ctx.fill();ctx.restore();},renderTicks:function(values){var canvas=this.sb.canvas,config=this.config,style=config.gaugeStyle,ctx=canvas.getCtx(),size=canvas.getSize(),radius=this.sb.config.levelDistance,gaugeCenter=(radius/2);ctx.strokeStyle=style.borderColor;ctx.lineWidth=5;ctx.lineCap="round";for(var i=0,total=0,l=values.length;iacum?maxValue:acum;});return maxValue;},normalizeDims:function(){var root=this.sb.graph.getNode(this.sb.root),l=0;root.eachAdjacency(function(){l++;});var maxValue=this.getMaxValue()||1,config=this.config,animate=config.animate,rho=this.sb.config.levelDistance;this.sb.graph.eachNode(function(n){var acum=0,animateValue=[];$.each(n.getData('valueArray'),function(v){acum+=+v;animateValue.push(1);});var stat=(animateValue.length==1)&&!config.updateHeights;if(animate){n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return stat?rho:(n*rho/maxValue);}),'end');var dimArray=n.getData('dimArray');if(!dimArray){n.setData('dimArray',animateValue);}}else{n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return stat?rho:(n*rho/maxValue);}));} -n.setData('normalizedDim',acum/maxValue);});}});Layouts.TM={};Layouts.TM.SliceAndDice=new Class({compute:function(prop){var root=this.graph.getNode(this.clickedNode&&this.clickedNode.id||this.root);this.controller.onBeforeCompute(root);var size=this.canvas.getSize(),config=this.config,width=size.width,height=size.height;this.graph.computeLevels(this.root,0,"ignore");root.getPos(prop).setc(-width/2,-height/2);root.setData('width',width,prop);root.setData('height',height+config.titleHeight,prop);this.computePositions(root,root,this.layout.orientation,prop);this.controller.onAfterCompute(root);},computePositions:function(par,ch,orn,prop){var totalArea=0;par.eachSubnode(function(n){totalArea+=n.getData('area',prop);});var config=this.config,offst=config.offset,width=par.getData('width',prop),height=par.getData('height',prop)-config.titleHeight,fact=par==ch?1:(ch.getData('area',prop)/totalArea);var otherSize,size,dim,pos,pos2,posth,pos2th;var horizontal=(orn=="h");if(horizontal){orn='v';otherSize=height;size=width*fact;dim='height';pos='y';pos2='x';posth=config.titleHeight;pos2th=0;}else{orn='h';otherSize=height*fact;size=width;dim='width';pos='x';pos2='y';posth=0;pos2th=config.titleHeight;} +this.renderPositionLabel(gaugePositionLabel);if(props['gaugeTarget']!=0){this.renderTicks(json.values);this.renderNeedle(gaugePosition,props['gaugeTarget']);}},updateJSON:function(json,onComplete){if(this.busy)return;this.busy=true;var sb=this.sb;var graph=sb.graph;var values=json.values;var animate=this.config.animate;var that=this;$.each(values,function(v){var n=graph.getByName(v.label),vals=$.splat(v.values);if(n){n.setData('valueArray',vals);n.setData('angularWidth',$.reduce(vals,function(x,y){return x+y;}));if(json.label){n.setData('stringArray',$.splat(json.label));}}});this.normalizeDims();if(animate){sb.compute('end');sb.fx.animate({modes:['node-property:dimArray:span','linear'],duration:1500,onComplete:function(){that.busy=false;onComplete&&onComplete.onComplete();}});}else{sb.refresh();}},select:function(id,name){if(!this.config.hoveredColor)return;var s=this.selected;if(s.id!=id||s.name!=name){s.id=id;s.name=name;s.color=this.config.hoveredColor;this.sb.graph.eachNode(function(n){if(id==n.id){n.setData('border',s);}else{n.setData('border',false);}});this.sb.plot();}},getLegend:function(){var legend=new Array();var name=new Array();var color=new Array();var n;this.sb.graph.getNode(this.sb.root).eachAdjacency(function(adj){n=adj.nodeTo;});var colors=n.getData('colorArray'),len=colors.length;$.each(n.getData('stringArray'),function(s,i){color[i]=colors[i%len];name[i]=s;});legend['name']=name;legend['color']=color;return legend;},getMaxValue:function(){var maxValue=0;this.sb.graph.eachNode(function(n){var valArray=n.getData('valueArray'),acum=0;$.each(valArray,function(v){acum+=+v;});maxValue=maxValue>acum?maxValue:acum;});return maxValue;},normalizeDims:function(){var root=this.sb.graph.getNode(this.sb.root),l=0;root.eachAdjacency(function(){l++;});var maxValue=this.getMaxValue()||1,config=this.config,animate=config.animate,rho=this.sb.config.levelDistance;this.sb.graph.eachNode(function(n){var acum=0,animateValue=[];$.each(n.getData('valueArray'),function(v){acum+=+v;animateValue.push(1);});var stat=(animateValue.length==1)&&!config.updateHeights;if(animate){n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return stat?rho:(n*rho / maxValue);}),'end');var dimArray=n.getData('dimArray');if(!dimArray){n.setData('dimArray',animateValue);}}else{n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return stat?rho:(n*rho / maxValue);}));} +n.setData('normalizedDim',acum / maxValue);});}});Layouts.TM={};Layouts.TM.SliceAndDice=new Class({compute:function(prop){var root=this.graph.getNode(this.clickedNode&&this.clickedNode.id||this.root);this.controller.onBeforeCompute(root);var size=this.canvas.getSize(),config=this.config,width=size.width,height=size.height;this.graph.computeLevels(this.root,0,"ignore");root.getPos(prop).setc(-width/2,-height/2);root.setData('width',width,prop);root.setData('height',height+config.titleHeight,prop);this.computePositions(root,root,this.layout.orientation,prop);this.controller.onAfterCompute(root);},computePositions:function(par,ch,orn,prop){var totalArea=0;par.eachSubnode(function(n){totalArea+=n.getData('area',prop);});var config=this.config,offst=config.offset,width=par.getData('width',prop),height=par.getData('height',prop)-config.titleHeight,fact=par==ch?1:(ch.getData('area',prop)/ totalArea);var otherSize,size,dim,pos,pos2,posth,pos2th;var horizontal=(orn=="h");if(horizontal){orn='v';otherSize=height;size=width*fact;dim='height';pos='y';pos2='x';posth=config.titleHeight;pos2th=0;}else{orn='h';otherSize=height*fact;size=width;dim='width';pos='x';pos2='y';posth=0;pos2th=config.titleHeight;} var cpos=ch.getPos(prop);ch.setData('width',size,prop);ch.setData('height',otherSize,prop);var offsetSize=0,tm=this;ch.eachSubnode(function(n){var p=n.getPos(prop);p[pos]=offsetSize+cpos[pos]+posth;p[pos2]=cpos[pos2]+pos2th;tm.computePositions(ch,n,orn,prop);offsetSize+=n.getData(dim,prop);});}});Layouts.TM.Area={compute:function(prop){prop=prop||"current";var root=this.graph.getNode(this.clickedNode&&this.clickedNode.id||this.root);this.controller.onBeforeCompute(root);var config=this.config,size=this.canvas.getSize(),width=size.width,height=size.height,offst=config.offset,offwdth=width-offst,offhght=height-offst;this.graph.computeLevels(this.root,0,"ignore");root.getPos(prop).setc(-width/2,-height/2);root.setData('width',width,prop);root.setData('height',height,prop);var coord={'top':-height/2+config.titleHeight,'left':-width/2,'width':offwdth,'height':offhght-config.titleHeight};this.computePositions(root,coord,prop);this.controller.onAfterCompute(root);},computeDim:function(tail,initElem,w,coord,comp,prop){if(tail.length+initElem.length==1){var l=(tail.length==1)?tail:initElem;this.layoutLast(l,w,coord,prop);return;} if(tail.length>=2&&initElem.length==0){initElem=[tail.shift()];} if(tail.length==0){if(initElem.length>0)this.layoutRow(initElem,w,coord,prop);return;} var c=tail[0];if(comp(initElem,w)>=comp([c].concat(initElem),w)){this.computeDim(tail.slice(1),initElem.concat([c]),w,coord,comp,prop);}else{var newCoords=this.layoutRow(initElem,w,coord,prop);this.computeDim(tail,[],newCoords.dim,newCoords,comp,prop);}},worstAspectRatio:function(ch,w){if(!ch||ch.length==0)return Number.MAX_VALUE;var areaSum=0,maxArea=0,minArea=Number.MAX_VALUE;for(var i=0,l=ch.length;iarea?maxArea:area;} -var sqw=w*w,sqAreaSum=areaSum*areaSum;return Math.max(sqw*maxArea/sqAreaSum,sqAreaSum/(sqw*minArea));},avgAspectRatio:function(ch,w){if(!ch||ch.length==0)return Number.MAX_VALUE;var arSum=0;for(var i=0,l=ch.length;ih?w/h:h/w;} -return arSum/l;},layoutLast:function(ch,w,coord,prop){var child=ch[0];child.getPos(prop).setc(coord.left,coord.top);child.setData('width',coord.width,prop);child.setData('height',coord.height,prop);}};Layouts.TM.Squarified=new Class({Implements:Layouts.TM.Area,computePositions:function(node,coord,prop){var config=this.config;if(coord.width>=coord.height) +var sqw=w*w,sqAreaSum=areaSum*areaSum;return Math.max(sqw*maxArea / sqAreaSum,sqAreaSum /(sqw*minArea));},avgAspectRatio:function(ch,w){if(!ch||ch.length==0)return Number.MAX_VALUE;var arSum=0;for(var i=0,l=ch.length;ih?w / h:h / w;} +return arSum / l;},layoutLast:function(ch,w,coord,prop){var child=ch[0];child.getPos(prop).setc(coord.left,coord.top);child.setData('width',coord.width,prop);child.setData('height',coord.height,prop);}};Layouts.TM.Squarified=new Class({Implements:Layouts.TM.Area,computePositions:function(node,coord,prop){var config=this.config;if(coord.width>=coord.height) this.layout.orientation='h';else this.layout.orientation='v';var ch=node.getSubnodes([1,1],"ignore");if(ch.length>0){this.processChildrenLayout(node,ch,coord,prop);for(var i=0,l=ch.length;i0){this.processChildrenLayout(node,ch,coord,prop);for(var i=0,l=ch.length;itreeDepth)treeDepth=d;});var startNode=this.graph.getNode(this.clickedNode&&this.clickedNode.id||root.id);var maxDepth=Math.min(treeDepth,levelsToShow-1);var initialDepth=startNode._depth;if(this.layout.horizontal()){this.computeSubtree(startNode,-width/2,-height/2,width/(maxDepth+1),height,initialDepth,maxDepth,posType);}else{this.computeSubtree(startNode,-width/2,-height/2,width,height/(maxDepth+1),initialDepth,maxDepth,posType);}},computeSubtree:function(root,x,y,width,height,initialDepth,maxDepth,posType){root.getPos(posType).setc(x,y);root.setData('width',width,posType);root.setData('height',height,posType);var nodeLength,prevNodeLength=0,totalDim=0;var children=Graph.Util.getSubnodes(root,[1,1]);if(!children.length) -return;$.each(children,function(e){totalDim+=e.getData('dim');});for(var i=0,l=children.length;i>0;}));lg.addColorStop(0,color);lg.addColorStop(1,colorGrad);ctx.fillStyle=lg;} +return;var pos=node.pos.getc(true);ctx.fillText(node.name,pos.x+width / 2,pos.y+height / 2);}});$jit.Icicle.Label.SVG=new Class({Implements:Graph.Label.SVG,initialize:function(viz){this.viz=viz;},placeLabel:function(tag,node,controller){var pos=node.pos.getc(true),canvas=this.viz.canvas;var radius=canvas.getSize();var labelPos={x:Math.round(pos.x+radius.width / 2),y:Math.round(pos.y+radius.height / 2)};tag.setAttribute('x',labelPos.x);tag.setAttribute('y',labelPos.y);controller.onPlaceLabel(tag,node);}});$jit.Icicle.Label.HTML=new Class({Implements:Graph.Label.HTML,initialize:function(viz){this.viz=viz;},placeLabel:function(tag,node,controller){var pos=node.pos.getc(true),canvas=this.viz.canvas;var radius=canvas.getSize();var labelPos={x:Math.round(pos.x+radius.width / 2),y:Math.round(pos.y+radius.height / 2)};var style=tag.style;style.left=labelPos.x+'px';style.top=labelPos.y+'px';style.display='';controller.onPlaceLabel(tag,node);}});$jit.Icicle.Plot.NodeTypes=new Class({'none':{'render':$.empty},'rectangle':{'render':function(node,canvas,animating){var config=this.viz.config;var offset=config.offset;var width=node.getData('width');var height=node.getData('height');var border=node.getData('border');var pos=node.pos.getc(true);var posx=pos.x+offset / 2,posy=pos.y+offset / 2;var ctx=canvas.getCtx();if(width-offset<2||height-offset<2)return;if(config.cushion){var color=node.getData('color');var lg=ctx.createRadialGradient(posx+(width-offset)/2,posy+(height-offset)/2,1,posx+(width-offset)/2,posy+(height-offset)/2,width>0;}));lg.addColorStop(0,color);lg.addColorStop(1,colorGrad);ctx.fillStyle=lg;} if(border){ctx.strokeStyle=border;ctx.lineWidth=3;} -ctx.fillRect(posx,posy,Math.max(0,width-offset),Math.max(0,height-offset));border&&ctx.strokeRect(pos.x,pos.y,width,height);},'contains':function(node,pos){if(this.viz.clickedNode&&!$jit.Graph.Util.isDescendantOf(node,this.viz.clickedNode.id))return false;var npos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height');return this.nodeHelper.rectangle.contains({x:npos.x+width/2,y:npos.y+height/2},pos,width,height);}}});$jit.Icicle.Plot.EdgeTypes=new Class({'none':$.empty});Layouts.ForceDirected=new Class({getOptions:function(random){var s=this.canvas.getSize();var w=s.width,h=s.height;var count=0;this.graph.eachNode(function(n){count++;});var k2=w*h/count,k=Math.sqrt(k2);var l=this.config.levelDistance;return{width:w,height:h,tstart:w*0.1,nodef:function(x){return k2/(x||1);},edgef:function(x){return k*(x-l);}};},compute:function(property,incremental){var prop=$.splat(property||['current','start','end']);var opt=this.getOptions();NodeDim.compute(this.graph,prop,this.config);this.graph.computeLevels(this.root,0,"ignore");this.graph.eachNode(function(n){$.each(prop,function(p){var pos=n.getPos(p);if(pos.equals(Complex.KER)){pos.x=opt.width/5*(Math.random()-0.5);pos.y=opt.height/5*(Math.random()-0.5);} +ctx.fillRect(posx,posy,Math.max(0,width-offset),Math.max(0,height-offset));border&&ctx.strokeRect(pos.x,pos.y,width,height);},'contains':function(node,pos){if(this.viz.clickedNode&&!$jit.Graph.Util.isDescendantOf(node,this.viz.clickedNode.id))return false;var npos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height');return this.nodeHelper.rectangle.contains({x:npos.x+width/2,y:npos.y+height/2},pos,width,height);}}});$jit.Icicle.Plot.EdgeTypes=new Class({'none':$.empty});Layouts.ForceDirected=new Class({getOptions:function(random){var s=this.canvas.getSize();var w=s.width,h=s.height;var count=0;this.graph.eachNode(function(n){count++;});var k2=w*h / count,k=Math.sqrt(k2);var l=this.config.levelDistance;return{width:w,height:h,tstart:w*0.1,nodef:function(x){return k2 /(x||1);},edgef:function(x){returnk*(x-l);}};},compute:function(property,incremental){var prop=$.splat(property||['current','start','end']);var opt=this.getOptions();NodeDim.compute(this.graph,prop,this.config);this.graph.computeLevels(this.root,0,"ignore");this.graph.eachNode(function(n){$.each(prop,function(p){var pos=n.getPos(p);if(pos.equals(Complex.KER)){pos.x=opt.width/5*(Math.random()-0.5);pos.y=opt.height/5*(Math.random()-0.5);} n.disp={};$.each(prop,function(p){n.disp[p]=$C(0,0);});});});this.computePositions(prop,opt,incremental);},computePositions:function(property,opt,incremental){var times=this.config.iterations,i=0,that=this;if(incremental){(function iter(){for(var total=incremental.iter,j=0;j=times){incremental.onComplete();return;}} -incremental.onStep(Math.round(i/(times-1)*100));setTimeout(iter,1);})();}else{for(;i1&&direction[0]!=adj.nodeFrom.id);this.edgeHelper.arrow.render(from,to,dim,inv,canvas);},'contains':function(adj,pos){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true);return this.edgeHelper.arrow.contains(from,to,pos,this.edge.epsilon);}}});})($jit.ForceDirected);$jit.TM={};var TM=$jit.TM;$jit.TM.$extend=true;TM.Base={layout:{orientation:"h",vertical:function(){return this.orientation=="v";},horizontal:function(){return this.orientation=="h";},change:function(){this.orientation=this.vertical()?"h":"v";}},initialize:function(controller){var config={orientation:"h",titleHeight:13,offset:2,levelsToShow:0,constrained:false,animate:false,Node:{type:'rectangle',overridable:true,width:3,height:3,color:'#444'},Label:{textAlign:'center',textBaseline:'top'},Edge:{type:'none'},duration:700,fps:45};this.controller=this.config=$.merge(Options("Canvas","Node","Edge","Fx","Controller","Tips","NodeStyles","Events","Navigation","Label"),config,controller);this.layout.orientation=this.config.orientation;var canvasConfig=this.config;if(canvasConfig.useCanvas){this.canvas=canvasConfig.useCanvas;this.config.labelContainer=this.canvas.id+'-label';}else{if(canvasConfig.background){canvasConfig.background=$.merge({type:'Circles'},canvasConfig.background);} +this.graphOptions={'complex':true,'Node':{'selected':false,'exist':true,'drawn':true}};this.graph=new Graph(this.graphOptions,this.config.Node,this.config.Edge);this.labels=new $ForceDirected.Label[canvasConfig.Label.type](this);this.fx=new $ForceDirected.Plot(this,$ForceDirected);this.op=new $ForceDirected.Op(this);this.json=null;this.busy=false;this.initializeExtras();},refresh:function(){this.compute();this.plot();},reposition:function(){this.compute('end');},computeIncremental:function(opt){opt=$.merge({iter:20,property:'end',onStep:$.empty,onComplete:$.empty},opt||{});this.config.onBeforeCompute(this.graph.getNode(this.root));this.compute(opt.property,opt);},plot:function(){this.fx.plot();},animate:function(opt){this.fx.animate($.merge({modes:['linear']},opt||{}));}});$jit.ForceDirected.$extend=true;(function(ForceDirected){ForceDirected.Op=new Class({Implements:Graph.Op});ForceDirected.Plot=new Class({Implements:Graph.Plot});ForceDirected.Label={};ForceDirected.Label.Native=new Class({Implements:Graph.Label.Native});ForceDirected.Label.SVG=new Class({Implements:Graph.Label.SVG,initialize:function(viz){this.viz=viz;},placeLabel:function(tag,node,controller){var pos=node.pos.getc(true),canvas=this.viz.canvas,ox=canvas.translateOffsetX,oy=canvas.translateOffsetY,sx=canvas.scaleOffsetX,sy=canvas.scaleOffsetY,radius=canvas.getSize();var labelPos={x:Math.round(pos.x*sx+ox+radius.width / 2),y:Math.round(pos.y*sy+oy+radius.height / 2)};tag.setAttribute('x',labelPos.x);tag.setAttribute('y',labelPos.y);controller.onPlaceLabel(tag,node);}});ForceDirected.Label.HTML=new Class({Implements:Graph.Label.HTML,initialize:function(viz){this.viz=viz;},placeLabel:function(tag,node,controller){var pos=node.pos.getc(true),canvas=this.viz.canvas,ox=canvas.translateOffsetX,oy=canvas.translateOffsetY,sx=canvas.scaleOffsetX,sy=canvas.scaleOffsetY,radius=canvas.getSize();var labelPos={x:Math.round(pos.x*sx+ox+radius.width / 2),y:Math.round(pos.y*sy+oy+radius.height / 2)};var style=tag.style;style.left=labelPos.x+'px';style.top=labelPos.y+'px';style.display=this.fitsInCanvas(labelPos,canvas)?'':'none';controller.onPlaceLabel(tag,node);}});ForceDirected.Plot.NodeTypes=new Class({'none':{'render':$.empty,'contains':$.lambda(false)},'circle':{'render':function(node,canvas){var pos=node.pos.getc(true),dim=node.getData('dim');this.nodeHelper.circle.render('fill',pos,dim,canvas);},'contains':function(node,pos){var npos=node.pos.getc(true),dim=node.getData('dim');return this.nodeHelper.circle.contains(npos,pos,dim);}},'ellipse':{'render':function(node,canvas){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height');this.nodeHelper.ellipse.render('fill',pos,width,height,canvas);},'contains':function(node,pos){var npos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height');return this.nodeHelper.ellipse.contains(npos,pos,width,height);}},'square':{'render':function(node,canvas){var pos=node.pos.getc(true),dim=node.getData('dim');this.nodeHelper.square.render('fill',pos,dim,canvas);},'contains':function(node,pos){var npos=node.pos.getc(true),dim=node.getData('dim');return this.nodeHelper.square.contains(npos,pos,dim);}},'rectangle':{'render':function(node,canvas){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height');this.nodeHelper.rectangle.render('fill',pos,width,height,canvas);},'contains':function(node,pos){var npos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height');return this.nodeHelper.rectangle.contains(npos,pos,width,height);}},'triangle':{'render':function(node,canvas){var pos=node.pos.getc(true),dim=node.getData('dim');this.nodeHelper.triangle.render('fill',pos,dim,canvas);},'contains':function(node,pos){var npos=node.pos.getc(true),dim=node.getData('dim');return this.nodeHelper.triangle.contains(npos,pos,dim);}},'star':{'render':function(node,canvas){var pos=node.pos.getc(true),dim=node.getData('dim');this.nodeHelper.star.render('fill',pos,dim,canvas);},'contains':function(node,pos){var npos=node.pos.getc(true),dim=node.getData('dim');return this.nodeHelper.star.contains(npos,pos,dim);}}});ForceDirected.Plot.EdgeTypes=new Class({'none':$.empty,'line':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true);this.edgeHelper.line.render(from,to,canvas);},'contains':function(adj,pos){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true);return this.edgeHelper.line.contains(from,to,pos,this.edge.epsilon);}},'arrow':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true),dim=adj.getData('dim'),direction=adj.data.$direction,inv=(direction&&direction.length>1&&direction[0]!=adj.nodeFrom.id);this.edgeHelper.arrow.render(from,to,dim,inv,canvas);},'contains':function(adj,pos){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true);return this.edgeHelper.arrow.contains(from,to,pos,this.edge.epsilon);}}});})($jit.ForceDirected);$jit.TM={};var TM=$jit.TM;$jit.TM.$extend=true;TM.Base={layout:{orientation:"h",vertical:function(){return this.orientation=="v";},horizontal:function(){return this.orientation=="h";},change:function(){this.orientation=this.vertical()?"h":"v";}},initialize:function(controller){var config={orientation:"h",titleHeight:13,offset:2,levelsToShow:0,constrained:false,animate:false,Node:{type:'rectangle',overridable:true,width:3,height:3,color:'#444'},Label:{textAlign:'center',textBaseline:'top'},Edge:{type:'none'},duration:700,fps:45};this.controller=this.config=$.merge(Options("Canvas","Node","Edge","Fx","Controller","Tips","NodeStyles","Events","Navigation","Label"),config,controller);this.layout.orientation=this.config.orientation;var canvasConfig=this.config;if(canvasConfig.useCanvas){this.canvas=canvasConfig.useCanvas;this.config.labelContainer=this.canvas.id+'-label';}else{if(canvasConfig.background){canvasConfig.background=$.merge({type:'Circles'},canvasConfig.background);} this.canvas=new Canvas(this,canvasConfig);this.config.labelContainer=(typeof canvasConfig.injectInto=='string'?canvasConfig.injectInto:canvasConfig.injectInto.id)+'-label';} this.graphOptions={'complex':true,'Node':{'selected':false,'exist':true,'drawn':true}};this.graph=new Graph(this.graphOptions,this.config.Node,this.config.Edge);this.labels=new TM.Label[canvasConfig.Label.type](this);this.fx=new TM.Plot(this);this.op=new TM.Op(this);this.group=new TM.Group(this);this.geom=new TM.Geom(this);this.clickedNode=null;this.busy=false;this.initializeExtras();},refresh:function(){if(this.busy)return;this.busy=true;var that=this;if(this.config.animate){this.compute('end');this.config.levelsToShow>0&&this.geom.setRightLevelToShow(this.graph.getNode(this.clickedNode&&this.clickedNode.id||this.root));this.fx.animate($.merge(this.config,{modes:['linear','node-property:width:height'],onComplete:function(){that.busy=false;}}));}else{var labelType=this.config.Label.type;if(labelType!='Native'){var that=this;this.graph.eachNode(function(n){that.labels.hideLabel(n,false);});} this.busy=false;this.compute();this.config.levelsToShow>0&&this.geom.setRightLevelToShow(this.graph.getNode(this.clickedNode&&this.clickedNode.id||this.root));this.plot();}},plot:function(){this.fx.plot();},leaf:function(n){return n.getSubnodes([1,1],"ignore").length==0;},enter:function(n){if(this.busy)return;this.busy=true;var that=this,config=this.config,graph=this.graph,clickedNode=n,previousClickedNode=this.clickedNode;var callback={onComplete:function(){if(config.levelsToShow>0){that.geom.setRightLevelToShow(n);} @@ -491,17 +491,17 @@ if(config.levelsToShow>0||config.request)that.compute();if(config.animate){graph callback={onComplete:function(){that.clickedNode=parent;if(config.request){that.requestNodes(parent,{onComplete:function(){that.compute();that.plot();that.busy=false;}});}else{that.compute();that.plot();that.busy=false;}}};if(config.levelsToShow>0) this.geom.setRightLevelToShow(parent);if(config.animate){this.clickedNode=clickedNode;this.compute('end');this.clickedNode=previousClickedNode;this.fx.animate({modes:['linear','node-property:width:height'],duration:1000,onComplete:function(){that.clickedNode=clickedNode;graph.eachNode(function(n){n.setDataset(['current','end'],{'alpha':[0,1]});},"ignore");previousClickedNode.eachSubgraph(function(node){node.setData('alpha',1);},"ignore");that.fx.animate({duration:500,modes:['node-property:alpha'],onComplete:function(){callback.onComplete();}});}});}else{callback.onComplete();}},requestNodes:function(node,onComplete){var handler=$.merge(this.controller,onComplete),lev=this.config.levelsToShow;if(handler.request){var leaves=[],d=node._depth;node.eachLevel(0,lev,function(n){var nodeLevel=lev-(n._depth-d);if(n.drawn&&!n.anySubnode()&&nodeLevel>0){leaves.push(n);n._level=nodeLevel;}});this.group.requestNodes(leaves,handler);}else{handler.onComplete();}}};TM.Op=new Class({Implements:Graph.Op,initialize:function(viz){this.viz=viz;}});TM.Geom=new Class({Implements:Graph.Geom,getRightLevelToShow:function(){return this.viz.config.levelsToShow;},setRightLevelToShow:function(node){var level=this.getRightLevelToShow(),fx=this.viz.labels;node.eachLevel(0,level+1,function(n){var d=n._depth-node._depth;if(d>level){n.drawn=false;n.exist=false;n.ignore=true;fx.hideLabel(n,false);}else{n.drawn=true;n.exist=true;delete n.ignore;}});node.drawn=true;delete node.ignore;}});TM.Group=new Class({initialize:function(viz){this.viz=viz;this.canvas=viz.canvas;this.config=viz.config;},requestNodes:function(nodes,controller){var counter=0,len=nodes.length,nodeSelected={};var complete=function(){controller.onComplete();};var viz=this.viz;if(len==0) complete();for(var i=0;i>0;}));lg.addColorStop(0,color);lg.addColorStop(1,colorGrad);ctx.fillStyle=lg;} -ctx.fillRect(posx,posy,width-offst,height-offst);if(border){ctx.save();ctx.strokeStyle=border;ctx.strokeRect(posx,posy,width-offst,height-offst);ctx.restore();}}else if(titleHeight>0){ctx.fillRect(pos.x+offst/2,pos.y+offst/2,width-offst,titleHeight-offst);if(border){ctx.save();ctx.strokeStyle=border;ctx.strokeRect(pos.x+offst/2,pos.y+offst/2,width-offst,height-offst);ctx.restore();}}},'contains':function(node,pos){if(this.viz.clickedNode&&!node.isDescendantOf(this.viz.clickedNode.id)||node.ignore)return false;var npos=node.pos.getc(true),width=node.getData('width'),leaf=this.viz.leaf(node),height=leaf?node.getData('height'):this.config.titleHeight;return this.nodeHelper.rectangle.contains({x:npos.x+width/2,y:npos.y+height/2},pos,width,height);}}});TM.Plot.EdgeTypes=new Class({'none':$.empty});TM.SliceAndDice=new Class({Implements:[Loader,Extras,TM.Base,Layouts.TM.SliceAndDice]});TM.Squarified=new Class({Implements:[Loader,Extras,TM.Base,Layouts.TM.Squarified]});TM.Strip=new Class({Implements:[Loader,Extras,TM.Base,Layouts.TM.Strip]});$jit.RGraph=new Class({Implements:[Loader,Extras,Layouts.Radial],initialize:function(controller){var $RGraph=$jit.RGraph;var config={interpolation:'linear',levelDistance:100};this.controller=this.config=$.merge(Options("Canvas","Node","Edge","Fx","Controller","Tips","NodeStyles","Events","Navigation","Label"),config,controller);var canvasConfig=this.config;if(canvasConfig.useCanvas){this.canvas=canvasConfig.useCanvas;this.config.labelContainer=this.canvas.id+'-label';}else{if(canvasConfig.background){canvasConfig.background=$.merge({type:'Circles'},canvasConfig.background);} +if(++counter==len){viz.graph.computeLevels(viz.root,0);complete();}}});}}});TM.Plot=new Class({Implements:Graph.Plot,initialize:function(viz){this.viz=viz;this.config=viz.config;this.node=this.config.Node;this.edge=this.config.Edge;this.animation=new Animation;this.nodeTypes=new TM.Plot.NodeTypes;this.edgeTypes=new TM.Plot.EdgeTypes;this.labels=viz.labels;},plot:function(opt,animating){var viz=this.viz,graph=viz.graph;viz.canvas.clear();this.plotTree(graph.getNode(viz.clickedNode&&viz.clickedNode.id||viz.root),$.merge(viz.config,opt||{},{'withLabels':true,'hideLabels':false,'plotSubtree':function(n,ch){return n.anySubnode("exist");}}),animating);}});TM.Label={};TM.Label.Native=new Class({Implements:Graph.Label.Native,initialize:function(viz){this.config=viz.config;this.leaf=viz.leaf;},renderLabel:function(canvas,node,controller){if(!this.leaf(node)&&!this.config.titleHeight)return;var pos=node.pos.getc(true),ctx=canvas.getCtx(),width=node.getData('width'),height=node.getData('height'),x=pos.x+width/2,y=pos.y;ctx.fillText(node.name,x,y,width);}});TM.Label.SVG=new Class({Implements:Graph.Label.SVG,initialize:function(viz){this.viz=viz;this.leaf=viz.leaf;this.config=viz.config;},placeLabel:function(tag,node,controller){var pos=node.pos.getc(true),canvas=this.viz.canvas,ox=canvas.translateOffsetX,oy=canvas.translateOffsetY,sx=canvas.scaleOffsetX,sy=canvas.scaleOffsetY,radius=canvas.getSize();var labelPos={x:Math.round(pos.x*sx+ox+radius.width / 2),y:Math.round(pos.y*sy+oy+radius.height / 2)};tag.setAttribute('x',labelPos.x);tag.setAttribute('y',labelPos.y);if(!this.leaf(node)&&!this.config.titleHeight){tag.style.display='none';} +controller.onPlaceLabel(tag,node);}});TM.Label.HTML=new Class({Implements:Graph.Label.HTML,initialize:function(viz){this.viz=viz;this.leaf=viz.leaf;this.config=viz.config;},placeLabel:function(tag,node,controller){var pos=node.pos.getc(true),canvas=this.viz.canvas,ox=canvas.translateOffsetX,oy=canvas.translateOffsetY,sx=canvas.scaleOffsetX,sy=canvas.scaleOffsetY,radius=canvas.getSize();var labelPos={x:Math.round(pos.x*sx+ox+radius.width / 2),y:Math.round(pos.y*sy+oy+radius.height / 2)};var style=tag.style;style.left=labelPos.x+'px';style.top=labelPos.y+'px';style.width=node.getData('width')*sx+'px';style.height=node.getData('height')*sy+'px';style.zIndex=node._depth*100;style.display='';if(!this.leaf(node)&&!this.config.titleHeight){tag.style.display='none';} +controller.onPlaceLabel(tag,node);}});TM.Plot.NodeTypes=new Class({'none':{'render':$.empty},'rectangle':{'render':function(node,canvas,animating){var leaf=this.viz.leaf(node),config=this.config,offst=config.offset,titleHeight=config.titleHeight,pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),border=node.getData('border'),ctx=canvas.getCtx(),posx=pos.x+offst / 2,posy=pos.y+offst / 2;if(width<=offst||height<=offst)return;if(leaf){if(config.cushion){var lg=ctx.createRadialGradient(posx+(width-offst)/2,posy+(height-offst)/2,1,posx+(width-offst)/2,posy+(height-offst)/2,width>0;}));lg.addColorStop(0,color);lg.addColorStop(1,colorGrad);ctx.fillStyle=lg;} +ctx.fillRect(posx,posy,width-offst,height-offst);if(border){ctx.save();ctx.strokeStyle=border;ctx.strokeRect(posx,posy,width-offst,height-offst);ctx.restore();}}else if(titleHeight>0){ctx.fillRect(pos.x+offst / 2,pos.y+offst / 2,width-offst,titleHeight-offst);if(border){ctx.save();ctx.strokeStyle=border;ctx.strokeRect(pos.x+offst / 2,pos.y+offst / 2,width-offst,height-offst);ctx.restore();}}},'contains':function(node,pos){if(this.viz.clickedNode&&!node.isDescendantOf(this.viz.clickedNode.id)||node.ignore)return false;var npos=node.pos.getc(true),width=node.getData('width'),leaf=this.viz.leaf(node),height=leaf?node.getData('height'):this.config.titleHeight;return this.nodeHelper.rectangle.contains({x:npos.x+width/2,y:npos.y+height/2},pos,width,height);}}});TM.Plot.EdgeTypes=new Class({'none':$.empty});TM.SliceAndDice=new Class({Implements:[Loader,Extras,TM.Base,Layouts.TM.SliceAndDice]});TM.Squarified=new Class({Implements:[Loader,Extras,TM.Base,Layouts.TM.Squarified]});TM.Strip=new Class({Implements:[Loader,Extras,TM.Base,Layouts.TM.Strip]});$jit.RGraph=new Class({Implements:[Loader,Extras,Layouts.Radial],initialize:function(controller){var $RGraph=$jit.RGraph;var config={interpolation:'linear',levelDistance:100};this.controller=this.config=$.merge(Options("Canvas","Node","Edge","Fx","Controller","Tips","NodeStyles","Events","Navigation","Label"),config,controller);var canvasConfig=this.config;if(canvasConfig.useCanvas){this.canvas=canvasConfig.useCanvas;this.config.labelContainer=this.canvas.id+'-label';}else{if(canvasConfig.background){canvasConfig.background=$.merge({type:'Circles'},canvasConfig.background);} this.canvas=new Canvas(this,canvasConfig);this.config.labelContainer=(typeof canvasConfig.injectInto=='string'?canvasConfig.injectInto:canvasConfig.injectInto.id)+'-label';} this.graphOptions={'complex':false,'Node':{'selected':false,'exist':true,'drawn':true}};this.graph=new Graph(this.graphOptions,this.config.Node,this.config.Edge);this.labels=new $RGraph.Label[canvasConfig.Label.type](this);this.fx=new $RGraph.Plot(this,$RGraph);this.op=new $RGraph.Op(this);this.json=null;this.root=null;this.busy=false;this.parent=false;this.initializeExtras();},createLevelDistanceFunc:function(){var ld=this.config.levelDistance;return function(elem){return(elem._depth+1)*ld;};},refresh:function(){this.compute();this.plot();},reposition:function(){this.compute('end');},plot:function(){this.fx.plot();},getNodeAndParentAngle:function(id){var theta=false;var n=this.graph.getNode(id);var ps=n.getParents();var p=(ps.length>0)?ps[0]:false;if(p){var posParent=p.pos.getc(),posChild=n.pos.getc();var newPos=posParent.add(posChild.scale(-1));theta=Math.atan2(newPos.y,newPos.x);if(theta<0) theta+=2*Math.PI;} -return{parent:p,theta:theta};},tagChildren:function(par,id){if(par.angleSpan){var adjs=[];par.eachAdjacency(function(elem){adjs.push(elem.nodeTo);},"ignore");var len=adjs.length;for(var i=0;i1&&direction[0]!=adj.nodeFrom.id);this.edgeHelper.arrow.render(from,to,dim,inv,canvas);},'contains':function(adj,pos){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true);return this.edgeHelper.arrow.contains(from,to,pos,this.edge.epsilon);}}});})($jit.RGraph);Complex.prototype.moebiusTransformation=function(c){var num=this.add(c);var den=c.$conjugate().$prod(this);den.x++;return num.$div(den);};Graph.Util.moebiusTransformation=function(graph,pos,prop,startPos,flags){this.eachNode(graph,function(elem){for(var i=0;i1&&direction[0]!=adj.nodeFrom.id);this.edgeHelper.arrow.render(from,to,dim,inv,canvas);},'contains':function(adj,pos){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true);return this.edgeHelper.arrow.contains(from,to,pos,this.edge.epsilon);}}});})($jit.RGraph);Complex.prototype.moebiusTransformation=function(c){var num=this.add(c);var den=c.$conjugate().$prod(this);den.x++;return num.$div(den);};Graph.Util.moebiusTransformation=function(graph,pos,prop,startPos,flags){this.eachNode(graph,function(elem){for(var i=0;i=2){return genDistFunc(i-0.01);}} return genDistFunc(0.75);},getRadius:function(){var rad=this.config.radius;if(rad!=="auto"){return rad;} -var s=this.canvas.getSize();return Math.min(s.width,s.height)/2;},refresh:function(reposition){if(reposition){this.reposition();this.graph.eachNode(function(node){node.startPos.rho=node.pos.rho=node.endPos.rho;node.startPos.theta=node.pos.theta=node.endPos.theta;});}else{this.compute();} -this.plot();},reposition:function(){this.compute('end');var vector=this.graph.getNode(this.root).pos.getc().scale(-1);Graph.Util.moebiusTransformation(this.graph,[vector],['end'],'end',"ignore");this.graph.eachNode(function(node){if(node.ignore){node.endPos.rho=node.pos.rho;node.endPos.theta=node.pos.theta;}});},plot:function(){this.fx.plot();},onClick:function(id,opt){var pos=this.graph.getNode(id).pos.getc(true);this.move(pos,opt);},move:function(pos,opt){var versor=$C(pos.x,pos.y);if(this.busy===false&&versor.norm()<1){this.busy=true;var root=this.graph.getClosestNodeToPos(versor),that=this;this.graph.computeLevels(root.id,0);this.controller.onBeforeCompute(root);opt=$.merge({onComplete:$.empty},opt||{});this.fx.animate($.merge({modes:['moebius'],hideLabels:true},opt,{onComplete:function(){that.busy=false;opt.onComplete();}}),versor);}}});$jit.Hypertree.$extend=true;(function(Hypertree){Hypertree.Op=new Class({Implements:Graph.Op});Hypertree.Plot=new Class({Implements:Graph.Plot});Hypertree.Label={};Hypertree.Label.Native=new Class({Implements:Graph.Label.Native,initialize:function(viz){this.viz=viz;},renderLabel:function(canvas,node,controller){var ctx=canvas.getCtx();var coord=node.pos.getc(true);var s=this.viz.getRadius();ctx.fillText(node.name,coord.x*s,coord.y*s);}});Hypertree.Label.SVG=new Class({Implements:Graph.Label.SVG,initialize:function(viz){this.viz=viz;},placeLabel:function(tag,node,controller){var pos=node.pos.getc(true),canvas=this.viz.canvas,ox=canvas.translateOffsetX,oy=canvas.translateOffsetY,sx=canvas.scaleOffsetX,sy=canvas.scaleOffsetY,radius=canvas.getSize(),r=this.viz.getRadius();var labelPos={x:Math.round((pos.x*sx)*r+ox+radius.width/2),y:Math.round((pos.y*sy)*r+oy+radius.height/2)};tag.setAttribute('x',labelPos.x);tag.setAttribute('y',labelPos.y);controller.onPlaceLabel(tag,node);}});Hypertree.Label.HTML=new Class({Implements:Graph.Label.HTML,initialize:function(viz){this.viz=viz;},placeLabel:function(tag,node,controller){var pos=node.pos.getc(true),canvas=this.viz.canvas,ox=canvas.translateOffsetX,oy=canvas.translateOffsetY,sx=canvas.scaleOffsetX,sy=canvas.scaleOffsetY,radius=canvas.getSize(),r=this.viz.getRadius();var labelPos={x:Math.round((pos.x*sx)*r+ox+radius.width/2),y:Math.round((pos.y*sy)*r+oy+radius.height/2)};var style=tag.style;style.left=labelPos.x+'px';style.top=labelPos.y+'px';style.display=this.fitsInCanvas(labelPos,canvas)?'':'none';controller.onPlaceLabel(tag,node);}});Hypertree.Plot.NodeTypes=new Class({'none':{'render':$.empty,'contains':$.lambda(false)},'circle':{'render':function(node,canvas){var nconfig=this.node,dim=node.getData('dim'),p=node.pos.getc();dim=nconfig.transform?dim*(1-p.squaredNorm()):dim;p.$scale(node.scale);if(dim>0.2){this.nodeHelper.circle.render('fill',p,dim,canvas);}},'contains':function(node,pos){var dim=node.getData('dim'),npos=node.pos.getc().$scale(node.scale);return this.nodeHelper.circle.contains(npos,pos,dim);}},'ellipse':{'render':function(node,canvas){var pos=node.pos.getc().$scale(node.scale),width=node.getData('width'),height=node.getData('height');this.nodeHelper.ellipse.render('fill',pos,width,height,canvas);},'contains':function(node,pos){var width=node.getData('width'),height=node.getData('height'),npos=node.pos.getc().$scale(node.scale);return this.nodeHelper.circle.contains(npos,pos,width,height);}},'square':{'render':function(node,canvas){var nconfig=this.node,dim=node.getData('dim'),p=node.pos.getc();dim=nconfig.transform?dim*(1-p.squaredNorm()):dim;p.$scale(node.scale);if(dim>0.2){this.nodeHelper.square.render('fill',p,dim,canvas);}},'contains':function(node,pos){var dim=node.getData('dim'),npos=node.pos.getc().$scale(node.scale);return this.nodeHelper.square.contains(npos,pos,dim);}},'rectangle':{'render':function(node,canvas){var nconfig=this.node,width=node.getData('width'),height=node.getData('height'),pos=node.pos.getc();width=nconfig.transform?width*(1-pos.squaredNorm()):width;height=nconfig.transform?height*(1-pos.squaredNorm()):height;pos.$scale(node.scale);if(width>0.2&&height>0.2){this.nodeHelper.rectangle.render('fill',pos,width,height,canvas);}},'contains':function(node,pos){var width=node.getData('width'),height=node.getData('height'),npos=node.pos.getc().$scale(node.scale);return this.nodeHelper.square.contains(npos,pos,width,height);}},'triangle':{'render':function(node,canvas){var nconfig=this.node,dim=node.getData('dim'),p=node.pos.getc();dim=nconfig.transform?dim*(1-p.squaredNorm()):dim;p.$scale(node.scale);if(dim>0.2){this.nodeHelper.triangle.render('fill',p,dim,canvas);}},'contains':function(node,pos){var dim=node.getData('dim'),npos=node.pos.getc().$scale(node.scale);return this.nodeHelper.triangle.contains(npos,pos,dim);}},'star':{'render':function(node,canvas){var nconfig=this.node,dim=node.getData('dim'),p=node.pos.getc();dim=nconfig.transform?dim*(1-p.squaredNorm()):dim;p.$scale(node.scale);if(dim>0.2){this.nodeHelper.star.render('fill',p,dim,canvas);}},'contains':function(node,pos){var dim=node.getData('dim'),npos=node.pos.getc().$scale(node.scale);return this.nodeHelper.star.contains(npos,pos,dim);}}});Hypertree.Plot.EdgeTypes=new Class({'none':$.empty,'line':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true),r=adj.nodeFrom.scale;this.edgeHelper.line.render({x:from.x*r,y:from.y*r},{x:to.x*r,y:to.y*r},canvas);},'contains':function(adj,pos){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true),r=adj.nodeFrom.scale;this.edgeHelper.line.contains({x:from.x*r,y:from.y*r},{x:to.x*r,y:to.y*r},pos,this.edge.epsilon);}},'arrow':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true),r=adj.nodeFrom.scale,dim=adj.getData('dim'),direction=adj.data.$direction,inv=(direction&&direction.length>1&&direction[0]!=adj.nodeFrom.id);this.edgeHelper.arrow.render({x:from.x*r,y:from.y*r},{x:to.x*r,y:to.y*r},dim,inv,canvas);},'contains':function(adj,pos){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true),r=adj.nodeFrom.scale;this.edgeHelper.arrow.contains({x:from.x*r,y:from.y*r},{x:to.x*r,y:to.y*r},pos,this.edge.epsilon);}},'hyperline':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(),to=adj.nodeTo.pos.getc(),dim=this.viz.getRadius();this.edgeHelper.hyperline.render(from,to,dim,canvas);},'contains':$.lambda(false)}});})($jit.Hypertree);})(); \ No newline at end of file +var s=this.canvas.getSize();return Math.min(s.width,s.height)/ 2;},refresh:function(reposition){if(reposition){this.reposition();this.graph.eachNode(function(node){node.startPos.rho=node.pos.rho=node.endPos.rho;node.startPos.theta=node.pos.theta=node.endPos.theta;});}else{this.compute();} +this.plot();},reposition:function(){this.compute('end');var vector=this.graph.getNode(this.root).pos.getc().scale(-1);Graph.Util.moebiusTransformation(this.graph,[vector],['end'],'end',"ignore");this.graph.eachNode(function(node){if(node.ignore){node.endPos.rho=node.pos.rho;node.endPos.theta=node.pos.theta;}});},plot:function(){this.fx.plot();},onClick:function(id,opt){var pos=this.graph.getNode(id).pos.getc(true);this.move(pos,opt);},move:function(pos,opt){var versor=$C(pos.x,pos.y);if(this.busy===false&&versor.norm()<1){this.busy=true;var root=this.graph.getClosestNodeToPos(versor),that=this;this.graph.computeLevels(root.id,0);this.controller.onBeforeCompute(root);opt=$.merge({onComplete:$.empty},opt||{});this.fx.animate($.merge({modes:['moebius'],hideLabels:true},opt,{onComplete:function(){that.busy=false;opt.onComplete();}}),versor);}}});$jit.Hypertree.$extend=true;(function(Hypertree){Hypertree.Op=new Class({Implements:Graph.Op});Hypertree.Plot=new Class({Implements:Graph.Plot});Hypertree.Label={};Hypertree.Label.Native=new Class({Implements:Graph.Label.Native,initialize:function(viz){this.viz=viz;},renderLabel:function(canvas,node,controller){var ctx=canvas.getCtx();var coord=node.pos.getc(true);var s=this.viz.getRadius();ctx.fillText(node.name,coord.x*s,coord.y*s);}});Hypertree.Label.SVG=new Class({Implements:Graph.Label.SVG,initialize:function(viz){this.viz=viz;},placeLabel:function(tag,node,controller){var pos=node.pos.getc(true),canvas=this.viz.canvas,ox=canvas.translateOffsetX,oy=canvas.translateOffsetY,sx=canvas.scaleOffsetX,sy=canvas.scaleOffsetY,radius=canvas.getSize(),r=this.viz.getRadius();var labelPos={x:Math.round((pos.x*sx)*r+ox+radius.width / 2),y:Math.round((pos.y*sy)*r+oy+radius.height / 2)};tag.setAttribute('x',labelPos.x);tag.setAttribute('y',labelPos.y);controller.onPlaceLabel(tag,node);}});Hypertree.Label.HTML=new Class({Implements:Graph.Label.HTML,initialize:function(viz){this.viz=viz;},placeLabel:function(tag,node,controller){var pos=node.pos.getc(true),canvas=this.viz.canvas,ox=canvas.translateOffsetX,oy=canvas.translateOffsetY,sx=canvas.scaleOffsetX,sy=canvas.scaleOffsetY,radius=canvas.getSize(),r=this.viz.getRadius();var labelPos={x:Math.round((pos.x*sx)*r+ox+radius.width / 2),y:Math.round((pos.y*sy)*r+oy+radius.height / 2)};var style=tag.style;style.left=labelPos.x+'px';style.top=labelPos.y+'px';style.display=this.fitsInCanvas(labelPos,canvas)?'':'none';controller.onPlaceLabel(tag,node);}});Hypertree.Plot.NodeTypes=new Class({'none':{'render':$.empty,'contains':$.lambda(false)},'circle':{'render':function(node,canvas){var nconfig=this.node,dim=node.getData('dim'),p=node.pos.getc();dim=nconfig.transform?dim*(1-p.squaredNorm()):dim;p.$scale(node.scale);if(dim>0.2){this.nodeHelper.circle.render('fill',p,dim,canvas);}},'contains':function(node,pos){var dim=node.getData('dim'),npos=node.pos.getc().$scale(node.scale);return this.nodeHelper.circle.contains(npos,pos,dim);}},'ellipse':{'render':function(node,canvas){var pos=node.pos.getc().$scale(node.scale),width=node.getData('width'),height=node.getData('height');this.nodeHelper.ellipse.render('fill',pos,width,height,canvas);},'contains':function(node,pos){var width=node.getData('width'),height=node.getData('height'),npos=node.pos.getc().$scale(node.scale);return this.nodeHelper.circle.contains(npos,pos,width,height);}},'square':{'render':function(node,canvas){var nconfig=this.node,dim=node.getData('dim'),p=node.pos.getc();dim=nconfig.transform?dim*(1-p.squaredNorm()):dim;p.$scale(node.scale);if(dim>0.2){this.nodeHelper.square.render('fill',p,dim,canvas);}},'contains':function(node,pos){var dim=node.getData('dim'),npos=node.pos.getc().$scale(node.scale);return this.nodeHelper.square.contains(npos,pos,dim);}},'rectangle':{'render':function(node,canvas){var nconfig=this.node,width=node.getData('width'),height=node.getData('height'),pos=node.pos.getc();width=nconfig.transform?width*(1-pos.squaredNorm()):width;height=nconfig.transform?height*(1-pos.squaredNorm()):height;pos.$scale(node.scale);if(width>0.2&&height>0.2){this.nodeHelper.rectangle.render('fill',pos,width,height,canvas);}},'contains':function(node,pos){var width=node.getData('width'),height=node.getData('height'),npos=node.pos.getc().$scale(node.scale);return this.nodeHelper.square.contains(npos,pos,width,height);}},'triangle':{'render':function(node,canvas){var nconfig=this.node,dim=node.getData('dim'),p=node.pos.getc();dim=nconfig.transform?dim*(1-p.squaredNorm()):dim;p.$scale(node.scale);if(dim>0.2){this.nodeHelper.triangle.render('fill',p,dim,canvas);}},'contains':function(node,pos){var dim=node.getData('dim'),npos=node.pos.getc().$scale(node.scale);return this.nodeHelper.triangle.contains(npos,pos,dim);}},'star':{'render':function(node,canvas){var nconfig=this.node,dim=node.getData('dim'),p=node.pos.getc();dim=nconfig.transform?dim*(1-p.squaredNorm()):dim;p.$scale(node.scale);if(dim>0.2){this.nodeHelper.star.render('fill',p,dim,canvas);}},'contains':function(node,pos){var dim=node.getData('dim'),npos=node.pos.getc().$scale(node.scale);return this.nodeHelper.star.contains(npos,pos,dim);}}});Hypertree.Plot.EdgeTypes=new Class({'none':$.empty,'line':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true),r=adj.nodeFrom.scale;this.edgeHelper.line.render({x:from.x*r,y:from.y*r},{x:to.x*r,y:to.y*r},canvas);},'contains':function(adj,pos){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true),r=adj.nodeFrom.scale;this.edgeHelper.line.contains({x:from.x*r,y:from.y*r},{x:to.x*r,y:to.y*r},pos,this.edge.epsilon);}},'arrow':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true),r=adj.nodeFrom.scale,dim=adj.getData('dim'),direction=adj.data.$direction,inv=(direction&&direction.length>1&&direction[0]!=adj.nodeFrom.id);this.edgeHelper.arrow.render({x:from.x*r,y:from.y*r},{x:to.x*r,y:to.y*r},dim,inv,canvas);},'contains':function(adj,pos){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true),r=adj.nodeFrom.scale;this.edgeHelper.arrow.contains({x:from.x*r,y:from.y*r},{x:to.x*r,y:to.y*r},pos,this.edge.epsilon);}},'hyperline':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(),to=adj.nodeTo.pos.getc(),dim=this.viz.getRadius();this.edgeHelper.hyperline.render(from,to,dim,canvas);},'contains':$.lambda(false)}});})($jit.Hypertree);})(); diff --git a/include/SugarCharts/Jit/js/mySugarCharts.js b/include/SugarCharts/Jit/js/mySugarCharts.js index 0e1176e9..27a4ce77 100644 --- a/include/SugarCharts/Jit/js/mySugarCharts.js +++ b/include/SugarCharts/Jit/js/mySugarCharts.js @@ -36,4 +36,4 @@ SUGAR.mySugar.sugarCharts=function(){var activeTab=activePage,charts=new Object( {var numCols=2;} for(id in charts[activeTab]){if(id!='undefined'){chartFound=true;loadSugarChart(charts[activeTab][id]['chartId'],charts[activeTab][id]['jsonFilename'],charts[activeTab][id]['css'],charts[activeTab][id]['chartConfig'],numCols);}} charts=new Object();},addToChartsArrayJson:function(json,activeTab){for(id in json){if(json[id]['supported']=="true"){SUGAR.mySugar.sugarCharts.addToChartsArray(json[id]['chartId'],json[id]['filename'],json[id]['css'],json[id]['chartConfig'],activeTab);}}},addToChartsArray:function(chartId,jsonFilename,css,chartConfig,activeTab){if(charts[activeTab]==null){charts[activeTab]=new Object();} -charts[activeTab][chartId]=new Object();charts[activeTab][chartId]['chartId']=chartId;charts[activeTab][chartId]['jsonFilename']=jsonFilename;charts[activeTab][chartId]['css']=css;charts[activeTab][chartId]['chartConfig']=chartConfig;}}}(); \ No newline at end of file +charts[activeTab][chartId]=new Object();charts[activeTab][chartId]['chartId']=chartId;charts[activeTab][chartId]['jsonFilename']=jsonFilename;charts[activeTab][chartId]['css']=css;charts[activeTab][chartId]['chartConfig']=chartConfig;}}}(); diff --git a/include/SugarCharts/Jit/js/sugarCharts.js b/include/SugarCharts/Jit/js/sugarCharts.js index 6d3a93d9..0f39af69 100644 --- a/include/SugarCharts/Jit/js/sugarCharts.js +++ b/include/SugarCharts/Jit/js/sugarCharts.js @@ -93,4 +93,4 @@ table+="";list.innerHTML=table;$jit.util.saveImageTest(chartId,jsonFilen firstLoad=false;} var doRefresh=function(){setTimeout(function(){refreshGraph()},delay);} YAHOO.util.Event.addListener(window,'resize',function(){doRefresh()});}} -var callback={success:handleSuccess,failure:handleFailure,argument:{foo:'foo',bar:''}};var request=YAHOO.util.Connect.asyncRequest('GET',jsonFilename+"?r="+new Date().getTime(),callback);break;}} \ No newline at end of file +var callback={success:handleSuccess,failure:handleFailure,argument:{foo:'foo',bar:''}};var request=YAHOO.util.Connect.asyncRequest('GET',jsonFilename+"?r="+new Date().getTime(),callback);break;}} diff --git a/include/SugarDependentDropdown/javascript/SugarDependentDropdown.js b/include/SugarDependentDropdown/javascript/SugarDependentDropdown.js index eb066fbf..5ddffb13 100644 --- a/include/SugarDependentDropdown/javascript/SugarDependentDropdown.js +++ b/include/SugarDependentDropdown/javascript/SugarDependentDropdown.js @@ -49,4 +49,4 @@ try{newElement.onchange();}catch(e){if(SUGAR.dependentDropdown.dropdowns.debugMo SUGAR.dependentDropdown.utils={generateElementContainer:function(focusElement,elementRow,index,elementIndex){var oldElement=document.getElementById('elementContainer'+focusElement.grouping+"::"+index+":::"+elementIndex);if(oldElement){SUGAR.dependentDropdown.utils.removeChildren(oldElement);} var tmp=YAHOO.ext.DomHelper.append(elementRow,{tag:'span',id:'elementContainer'+focusElement.grouping+"::"+index+":::"+elementIndex},true);return tmp.dom;},getPreselectKey:function(elementName){try{if(SUGAR.dependentDropdown.currentAction.action[elementName]){return SUGAR.dependentDropdown.currentAction.action[elementName];}else{return'';}}catch(e){if(SUGAR.dependentDropdown.dropdowns.debugMode){} return'';}},debugStack:function(func){if(!SUGAR.dependentDropdown._stack){SUGAR.dependentDropdown._stack=new Array();} -SUGAR.dependentDropdown._stack.push(func);},removeChildren:function(el){for(i=el.childNodes.length-1;i>=0;i--){if(el.childNodes[i]){el.removeChild(el.childNodes[i]);}}}} \ No newline at end of file +SUGAR.dependentDropdown._stack.push(func);},removeChildren:function(el){for(i=el.childNodes.length-1;i>=0;i--){if(el.childNodes[i]){el.removeChild(el.childNodes[i]);}}}} diff --git a/include/SugarEmailAddress/SugarEmailAddress.js b/include/SugarEmailAddress/SugarEmailAddress.js index 2d04f7e4..64035ee6 100644 --- a/include/SugarEmailAddress/SugarEmailAddress.js +++ b/include/SugarEmailAddress/SugarEmailAddress.js @@ -66,4 +66,4 @@ if(!primaryFound){Dom.get(this.id+'emailAddressPrimaryFlag0').checked=true;Dom.g {var form=document.forms[this.emailView];if(!form){form=document.forms['editContactForm'];} if(SUGAR.isIE){for(i=0;i - -
-
{/literal}"; + $this->displayParams['collection_field_list'][$name]['field'] .= "document.getElementById('update_fields_{$this->vardef['name']}_collection').value = YAHOO.lang.JSON.stringify(collection['{$this->vardef['name']}'].update_fields);\" + oldonchange + \"};\");{/literal}"; //we need to get rid of the old value; unset($this->displayParams['collection_field_list'][$k]); } @@ -390,9 +390,12 @@ FRA; $shippingKey = isset($this->displayParams['shippingKey']) ? $this->displayParams['shippingKey'] : null; $additionalFields = isset($this->displayParams['additionalFields']) ? $this->displayParams['additionalFields'] : null; $sqs_objects[$name1] = $qsd->getQSAccount($nameKey, $idKey, $billingKey, $shippingKey, $additionalFields); - } - - $temp_array = array('field_list'=>array(),'populate_list'=>array()); + } else if($matches[0] == 'Contacts'){ + $sqs_objects[$name1] = $qsd->getQSContact($name1, "id_".$name1); + } + + + $temp_array = array('field_list'=>array(),'populate_list'=>array()); foreach($sqs_objects[$name1]['field_list'] as $k=>$v){ if(!in_array($v, array('name','id'))){ $sqs_objects[$name1]['primary_field_list'][]=$v; diff --git a/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js b/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js index 4a5e5e90..e6716c5e 100644 --- a/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js +++ b/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js @@ -51,4 +51,4 @@ updateListeners=true;var d=window.document.getElementById(this.fieldname+'_date' var newdate=d.value+' '+h.value+this.timeseparator+m.value;if(this.hasMeridiem){ampm=document.getElementById(this.fieldname+"_meridiem").value;newdate+=ampm;} if(trim(newdate)==""+this.timeseparator+""){newdate='';} document.getElementById(this.fieldname).value=newdate;if(updateListeners) -SUGAR.util.callOnChangeListers(this.fieldname);if(this.showCheckbox){flag=this.fieldname+'_flag';date=this.fieldname+'_date';hours=this.fieldname+'_hours';mins=this.fieldname+'_minutes';if(document.getElementById(flag).checked){document.getElementById(flag).value=1;document.getElementById(this.fieldname).value='';document.getElementById(date).disabled=true;document.getElementById(hours).disabled=true;document.getElementById(mins).disabled=true;}else{document.getElementById(flag).value=0;document.getElementById(date).disabled=false;document.getElementById(hours).disabled=false;document.getElementById(mins).disabled=false;}}}; \ No newline at end of file +SUGAR.util.callOnChangeListers(this.fieldname);if(this.showCheckbox){flag=this.fieldname+'_flag';date=this.fieldname+'_date';hours=this.fieldname+'_hours';mins=this.fieldname+'_minutes';if(document.getElementById(flag).checked){document.getElementById(flag).value=1;document.getElementById(this.fieldname).value='';document.getElementById(date).disabled=true;document.getElementById(hours).disabled=true;document.getElementById(mins).disabled=true;}else{document.getElementById(flag).value=0;document.getElementById(date).disabled=false;document.getElementById(hours).disabled=false;document.getElementById(mins).disabled=false;}}}; diff --git a/include/SugarFields/Fields/File/SugarFieldFile.js b/include/SugarFields/Fields/File/SugarFieldFile.js index cf39aa02..6813dde6 100644 --- a/include/SugarFields/Fields/File/SugarFieldFile.js +++ b/include/SugarFields/Fields/File/SugarFieldFile.js @@ -35,7 +35,7 @@ if(typeof(SUGAR.field)=='undefined'){SUGAR.field=new Object();} if(typeof(SUGAR.field.file)=='undefined'){SUGAR.field.file={deleteAttachment:function(elemBaseName,docTypeName,elem){ajaxStatus.showStatus(SUGAR.language.get("app_strings","LBL_REMOVING_ATTACHMENT"));elem.form.deleteAttachment.value=1;elem.form.action.value="EditView";var callback=SUGAR.field.file.deleteAttachmentCallbackGen(elemBaseName,docTypeName);var success=function(data){if(data){callback(data.responseText);}} YAHOO.util.Connect.setForm(elem.form);var cObj=YAHOO.util.Connect.asyncRequest('POST','index.php',{success:success,failure:success});elem.form.deleteAttachment.value=0;elem.form.action.value="";},deleteAttachmentCallbackGen:function(elemBaseName,docTypeName){return function(text){if(text=='true'){document.getElementById(elemBaseName+'_new').style.display='';ajaxStatus.hideStatus();document.getElementById(elemBaseName+'_old').innerHTML='';if(docTypeName){document.getElementById(docTypeName).disabled=false;} -document.getElementById(elemBaseName).value='';}else{document.getElementById(elemBaseName+'_new').style.display='none';ajaxStatus.flashStatus(SUGAR.language.get('app_strings','ERR_REMOVING_ATTACHMENT'),2000);}}},checkEapiLogin:function(res){var failedLogins=JSON.parse(res.responseText);if(failedLogins.length==0){return;} +document.getElementById(elemBaseName).value='';}else{document.getElementById(elemBaseName+'_new').style.display='none';ajaxStatus.flashStatus(SUGAR.language.get('app_strings','ERR_REMOVING_ATTACHMENT'),2000);}}},checkEapiLogin:function(res){var failedLogins=YAHOO.lang.JSON.parse(res.responseText);if(failedLogins.length==0){return;} for(var idx in failedLogins){if(confirm(failedLogins[idx].label)){window.open(failedLogins[idx].checkURL,'EAPM_CHECK_'+idx);}else{document.getElementById(res.argument.docTypeName).value='Sugar';document.getElementById(res.argument.docTypeName).onchange();}}},setupEapiShowHide:function(elemBaseName,docTypeName,formName){var externalSearchToggle=function(){var moreElem=document.getElementById(elemBaseName+"_more");var hideMore=(moreElem.style.display=='none');if(hideMore){moreElem.style.display='';document.getElementById(elemBaseName+'_less').style.display='none';document.getElementById(elemBaseName+'_remoteNameSpan').style.display='none';document.getElementById(elemBaseName+'_file').disabled=false;}else{moreElem.style.display='none';document.getElementById(elemBaseName+'_less').style.display='';document.getElementById(elemBaseName+'_remoteNameSpan').style.display='';document.getElementById(elemBaseName+'_file').disabled=true;}} var showHideFunc=function(){var docShowHideElem=document.getElementById(elemBaseName+"_externalApiSelector");var dropdownValue=document.getElementById(docTypeName).value;if(typeof(SUGAR.eapm)!='undefined'&&typeof(SUGAR.eapm[dropdownValue])!='undefined'&&typeof(SUGAR.eapm[dropdownValue].docSearch)!='undefined'&&SUGAR.eapm[dropdownValue].docSearch){docShowHideElem.style.display='';YAHOO.util.Connect.asyncRequest('GET','index.php?module=EAPM&action=CheckLogins&to_pdf=1&api='+dropdownValue,{success:SUGAR.field.file.checkEapiLogin,argument:{'elemBaseName':elemBaseName,'docTypeName':docTypeName}});YAHOO.util.Connect.asyncRequest('GET','index.php?module=EAPM&action=flushFileCache&to_pdf=1&api='+dropdownValue,{});}else{docShowHideElem.style.display='none';document.getElementById(elemBaseName+'_file').disabled=false;} sqs_objects[formName+"_"+elemBaseName+"_remoteName"].api=dropdownValue;var secLevelBoxElem=document.getElementById(elemBaseName+'_securityLevelBox');var secLevelElem=document.getElementById(elemBaseName+'_securityLevel');secLevelElem.options.length=0;if(SUGAR.eapm[dropdownValue]&&SUGAR.eapm[dropdownValue].sharingOptions){var opts=SUGAR.eapm[dropdownValue].sharingOptions;var i=0;for(idx in opts){secLevelElem.options[i]=new Option(SUGAR.language.get('app_strings',opts[idx]),idx,false,false);i++;} @@ -44,4 +44,4 @@ document.getElementById(docTypeName).onchange=showHideFunc;document.getElementBy return'';else return fileName.substr(++lastindex);},isFileExtensionValid:function(fileName){var docType=document.getElementById('doc_type').value;var fileExtension=this.getFileExtension(fileName);if(typeof(SUGAR.eapm[docType])=='undefined'||!SUGAR.eapm[docType].restrictUploadsByExtension){return true;} var whiteSuffixlist=SUGAR.eapm[docType]['restrictUploadsByExtension'];if(whiteSuffixlist.constructor==Array){var results=false;for(var i=0;i - {{if empty($displayParams.hideButtons) }} diff --git a/include/SugarFields/Fields/Relate/SugarFieldRelate.php b/include/SugarFields/Fields/Relate/SugarFieldRelate.php index 8826ec56..e3622a47 100644 --- a/include/SugarFields/Fields/Relate/SugarFieldRelate.php +++ b/include/SugarFields/Fields/Relate/SugarFieldRelate.php @@ -49,7 +49,11 @@ class SugarFieldRelate extends SugarFieldBase { return $this->fetch($this->findTemplate('DetailView')); } - function getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { + /** + * @see SugarFieldBase::getEditViewSmarty() + */ + public function getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) + { if(!empty($vardef['function']['returns']) && $vardef['function']['returns'] == 'html'){ return parent::getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex); } @@ -62,7 +66,12 @@ class SugarFieldRelate extends SugarFieldBase { if(isset($displayParams['formName'])) { $form_name = $displayParams['formName']; } - + + if (isset($displayParams['idName'])) + { + $rpos = strrpos($displayParams['idName'], $vardef['name']); + $displayParams['idNameHidden'] = substr($displayParams['idName'], 0, $rpos); + } //Special Case for accounts; use the displayParams array and retrieve //the key and copy indexes. 'key' is the suffix of the field we are searching //the Account's address with. 'copy' is the suffix we are copying the addresses @@ -121,7 +130,9 @@ class SugarFieldRelate extends SugarFieldBase { 'call_back_function' => $call_back_function, 'form_name' => $form_name, 'field_to_name_array' => array( - 'id' => (empty($displayParams['idName']) ? $vardef['id_name'] : ($displayParams['idName'] . '_' . $vardef['id_name'])) , + //'id' => (empty($displayParams['idName']) ? $vardef['id_name'] : ($displayParams['idName'] . '_' . $vardef['id_name'])) , + //bug 43770: Assigned to value could not be saved during lead conversion + 'id' => (empty($displayParams['idNameHidden']) ? $vardef['id_name'] : ($displayParams['idNameHidden'] . $vardef['id_name'])) , ((empty($vardef['rname'])) ? 'name' : $vardef['rname']) => (empty($displayParams['idName']) ? $vardef['name'] : $displayParams['idName']), ), ); diff --git a/include/SugarObjects/templates/file/metadata/editviewdefs.php b/include/SugarObjects/templates/file/metadata/editviewdefs.php index f28a22cf..a9a49835 100644 --- a/include/SugarObjects/templates/file/metadata/editviewdefs.php +++ b/include/SugarObjects/templates/file/metadata/editviewdefs.php @@ -55,8 +55,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ), 'javascript' => ' - - ', diff --git a/include/SugarObjects/templates/file/metadata/quickcreatedefs.php b/include/SugarObjects/templates/file/metadata/quickcreatedefs.php index 7c52f350..5cb92213 100644 --- a/include/SugarObjects/templates/file/metadata/quickcreatedefs.php +++ b/include/SugarObjects/templates/file/metadata/quickcreatedefs.php @@ -55,8 +55,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ), 'javascript' => ' - - ', diff --git a/include/SugarObjects/templates/person/Person.php b/include/SugarObjects/templates/person/Person.php index e39b7fcf..36843685 100644 --- a/include/SugarObjects/templates/person/Person.php +++ b/include/SugarObjects/templates/person/Person.php @@ -42,6 +42,7 @@ require_once('include/SugarObjects/templates/basic/Basic.php'); class Person extends Basic { var $picture; + //Variable to control whether or not to invoke the getLocalFormatttedName method with title and salutation var $createLocaleFormattedName = true; function Person(){ diff --git a/include/SugarTinyMCE.php b/include/SugarTinyMCE.php index 376e3a57..05e974b6 100644 --- a/include/SugarTinyMCE.php +++ b/include/SugarTinyMCE.php @@ -115,11 +115,18 @@ class SugarTinyMCE { } $config = $this->defaultConfig; + //include tinymce lang file + $lang = substr($GLOBALS['current_language'], 0, 2); + if(file_exists('include/javascript/tiny_mce/langs/'.$lang.'.js')) + { + $config['language'] = $lang; + } $config['directionality'] = SugarThemeRegistry::current()->directionality; $config['elements'] = $targets; $config['theme_advanced_buttons1'] = $this->buttonConfigs['default']['buttonConfig']; $config['theme_advanced_buttons2'] = $this->buttonConfigs['default']['buttonConfig2']; - $config['theme_advanced_buttons3'] = $this->buttonConfigs['default']['buttonConfig3']; + $config['theme_advanced_buttons3'] = $this->buttonConfigs['default']['buttonConfig3']; + $jsConfig = $json->encode($config); $instantiateCall = ''; diff --git a/include/Sugarpdf/Sugarpdf.php b/include/Sugarpdf/Sugarpdf.php index d47f9cdb..c4c6ebbe 100644 --- a/include/Sugarpdf/Sugarpdf.php +++ b/include/Sugarpdf/Sugarpdf.php @@ -48,6 +48,14 @@ require_once('include/Sugarpdf/SugarpdfHelper.php'); class Sugarpdf extends TCPDF { + /** + * Stretch options constants + */ + const STRETCH_NONE = 0; + const STRETCH_SCALE = 1; + const STRETCH_SCALE_FORCED = 2; + const STRETCH_SPACING = 3; + const STRETCH_SPACING_FORCED = 4; /** * This array is meant to hold an objects/data that we would like to pass between @@ -310,10 +318,11 @@ class Sugarpdf extends TCPDF * @param $item Array[line number (0 to x)][cell header] = Cell content OR * Array[line number (0 to x)][cell header]['value'] = Cell content AND * Array[line number (0 to x)][cell header]['options'] = Array[cell properties] = values - * @param $options Array which can contain : width (array 'column name'=>'width value + % OR nothing'), isheader (bool), header (array), fill (string: HTML color), ishtml (bool) default: false, border (0: no border (defaul), 1: frame or all of the following characters: L ,T ,R ,B), align (L: left align, C: center, R: right align, J: justification) + * @param $options Array which can contain : width (array 'column name'=>'width value + % OR nothing'), isheader (bool), header (array), fill (string: HTML color), ishtml (bool) default: false, border (0: no border (defaul), 1: frame or all of the following characters: L ,T ,R ,B), align (L: left align, C: center, R: right align, J: justification), stretch (array 'column name'=>stretch type) * @see MultiCell() */ - public function writeCellTable($item, $options=NULL){ + public function writeCellTable($item, $options=NULL) + { // Save initial font values $fontFamily = $this->getFontFamily(); $fontSize = $this->getFontSizePt(); @@ -332,9 +341,8 @@ class Sugarpdf extends TCPDF $header[$k]=$k; } $h = $this->getLineHeightFromArray($header, $options["width"]); - foreach($header as $v){ - $this->MultiCell($options["width"][$v],$h,$v,$headerOptions['border'],$headerOptions['align'],$headerOptions['fillstate'],0,'','',true,0,$headerOptions['ishtml']); - } + foreach ($header as $v) + $this->MultiCell($options["width"][$v],$h,$v,$headerOptions['border'],$headerOptions['align'],$headerOptions['fillstate'],0,'','',true, $options['stretch'][$v], $headerOptions['ishtml']); $this->SetFillColorArray($this->convertHTMLColorToDec($options['fill'])); $this->Ln(); } @@ -344,10 +352,18 @@ class Sugarpdf extends TCPDF $this->SetFont($fontFamily,$fontStyle,$fontSize); $this->SetTextColor(0, 0, 0); $even=true; + $firstrow = true; // LINES foreach($item as $k=>$line){ $even=!$even; $h = $this->getLineHeightFromArray($line, $options["width"]); + // in the case when cell height is greater than page height + // need to adjust the current page number + // so the following output will not overlap the previous output + if ($this->getNumPages() != $this->getPage()) { + $this->setPage($this->getNumPages()); + } + $firstcell = true; //CELLS foreach($line as $kk=>$cell){ $cellOptions = $options; @@ -367,12 +383,23 @@ class Sugarpdf extends TCPDF $this->SetFillColorArray($this->convertHTMLColorToDec($options['oddcolor'])); $cellOptions['fillstate']=1; } - - $this->MultiCell($options["width"][$kk],$h,$value,$cellOptions['border'],$cellOptions['align'],$cellOptions['fillstate'],0,'','',true,0,$cellOptions['ishtml']); + + if ($firstrow) { + $this->MultiCell($options["width"][$kk],$h,$value,$cellOptions['border'],$cellOptions['align'],$cellOptions['fillstate'],0,'','',true, $options['stretch'][$kk], $cellOptions['ishtml'], true, 0, false); + } else { + if ($firstcell) { + // add page only once (for the first cell) + $this->MultiCell($options["width"][$kk],$h,$value,$cellOptions['border'],$cellOptions['align'],$cellOptions['fillstate'],0,'','',true,0,$cellOptions['ishtml'], true, 0, true); + $firstcell = false; + } else { + $this->MultiCell($options["width"][$kk],$h,$value,$cellOptions['border'],$cellOptions['align'],$cellOptions['fillstate'],0,'','',true,0,$cellOptions['ishtml'], true, 0, false); + } + } $this->SetFillColorArray($this->convertHTMLColorToDec($options['fill'])); } $this->Ln(); + $firstrow = false; } $this->SetFont($fontFamily,$fontStyle,$fontSize); $this->SetTextColor(0, 0, 0); @@ -522,7 +549,10 @@ class Sugarpdf extends TCPDF if(empty($options['border'])){ $options['border'] = 0; } - + foreach($item[0] as $k => $v) + if (empty($options['stretch'][$k])) + $options['stretch'][$k] = self::STRETCH_NONE; + if(!empty($options['fill'])){ $this->SetFillColorArray($this->convertHTMLColorToDec($options['fill'])); $options['fillstate']=1; diff --git a/include/TemplateHandler/TemplateHandler.php b/include/TemplateHandler/TemplateHandler.php index 6b15bf0a..5d6cac10 100644 --- a/include/TemplateHandler/TemplateHandler.php +++ b/include/TemplateHandler/TemplateHandler.php @@ -320,8 +320,9 @@ class TemplateHandler { foreach($defs as $f) { $field = $f; $name = $qsd->form_name . '_' . $field['name']; + if($field['type'] == 'relate' && isset($field['module']) && preg_match('/_name$|_c$/si',$name)) { - if(preg_match('/^(Campaigns|Teams|Users|Accounts)$/si', $field['module'], $matches)) { + if(preg_match('/^(Campaigns|Teams|Users|Contacts|Accounts)$/si', $field['module'], $matches)) { if($matches[0] == 'Campaigns') { $sqs_objects[$name.'_'.$parsedView] = $qsd->getQSCampaigns(); @@ -348,6 +349,8 @@ class TemplateHandler { $shippingKey = isset($f['displayParams']['shippingKey']) ? $f['displayParams']['shippingKey'] : null; $additionalFields = isset($f['displayParams']['additionalFields']) ? $f['displayParams']['additionalFields'] : null; $sqs_objects[$name.'_'.$parsedView] = $qsd->getQSAccount($nameKey, $idKey, $billingKey, $shippingKey, $additionalFields); + } else if($matches[0] == 'Contacts'){ + $sqs_objects[$name.'_'.$parsedView] = $qsd->getQSContact($field['name'], $field['id_name']); } } else { $sqs_objects[$name.'_'.$parsedView] = $qsd->getQSParent($field['module']); @@ -380,26 +383,23 @@ class TemplateHandler { $field['id_name'] = $field['name'] . "_" . $field['id_name']; } $name = $qsd->form_name . '_' . $field['name']; - + if($field['type'] == 'relate' && isset($field['module']) && (preg_match('/_name$|_c$/si',$name) || !empty($field['quicksearch']))) { - if(!preg_match('/_c$/si',$name) && preg_match('/^(Campaigns|Teams|Users|Accounts)$/si', $field['module'], $matches)) { + if(!preg_match('/_c$/si',$name) && preg_match('/^(Campaigns|Teams|Users|Contacts|Accounts)$/si', $field['module'], $matches)) { if($matches[0] == 'Campaigns') { $sqs_objects[$name] = $qsd->getQSCampaigns(); } else if($matches[0] == 'Users'){ - if($field['name'] == 'reports_to_name') { + if($field['name'] == 'reports_to_name') $sqs_objects[$name] = $qsd->getQSUser('reports_to_name','reports_to_id'); - } - // Bug 34643 - Default what the options should be for the assigned_user_name field - // and then pass thru the fields to be used in the fielddefs. - elseif($field['name'] == 'assigned_user_name') { - $sqs_objects[$name] = $qsd->getQSUser('assigned_user_name','assigned_user_id'); - } else { - $sqs_objects[$name] = $qsd->getQSUser($field['name'], $field['id_name']); - } + if ($view == "ConvertLead") + $sqs_objects[$name] = $qsd->getQSUser($field['name'], $field['id_name']); + else + $sqs_objects[$name] = $qsd->getQSUser(); + } } else if($matches[0] == 'Campaigns') { $sqs_objects[$name] = $qsd->getQSCampaigns(); } else if($matches[0] == 'Accounts') { @@ -415,6 +415,11 @@ class TemplateHandler { $shippingKey = SugarArray::staticGet($f, 'displayParams.shippingKey'); $additionalFields = SugarArray::staticGet($f, 'displayParams.additionalFields'); $sqs_objects[$name] = $qsd->getQSAccount($nameKey, $idKey, $billingKey, $shippingKey, $additionalFields); + } else if($matches[0] == 'Contacts'){ + $sqs_objects[$name] = $qsd->getQSContact($field['name'], $field['id_name']); + if(preg_match('/_c$/si',$name) || !empty($field['quicksearch'])){ + $sqs_objects[$name]['field_list'] = array('salutation', 'first_name', 'last_name', 'id'); + } } } else { $sqs_objects[$name] = $qsd->getQSParent($field['module']); @@ -434,10 +439,12 @@ class TemplateHandler { $sqs_objects[$name]['field_list'] = $field['populate_list']; } } + } else if($field['type'] == 'parent') { + $sqs_objects[$name] = $qsd->getQSParent(); } //if-else } //foreach } - + //Implement QuickSearch for the field if(!empty($sqs_objects) && count($sqs_objects) > 0) { $quicksearch_js = ''."\n"; - $button .=''."\n"; $button .=''."\n"; $button .=''."\n"; $button .=''."\n"; @@ -161,5 +160,4 @@ class SugarWidgetSubPanelTopScheduleMeetingButton extends SugarWidgetSubPanelTop return parent::display($defines, $additionalFormFields); } -} -?> +} \ No newline at end of file diff --git a/include/javascript/calendar.js b/include/javascript/calendar.js index ed27fbe9..794d4d7e 100644 --- a/include/javascript/calendar.js +++ b/include/javascript/calendar.js @@ -39,7 +39,7 @@ Calendar=function(){};Calendar.getHighestZIndex=function(containerEl) return(highestIndex==Number.MAX_VALUE)?Number.MAX_VALUE:highestIndex+1;};Calendar.setup=function(params){YAHOO.util.Event.onDOMReady(function(){var Event=YAHOO.util.Event;var Dom=YAHOO.util.Dom;var dialog;var calendar;var showButton=params.button?params.button:params.buttonObj;var userDateFormat=params.ifFormat?params.ifFormat:(params.daFormat?params.daFormat:"m/d/Y");var inputField=params.inputField?params.inputField:params.inputFieldObj;var dateFormat=userDateFormat.substr(0,10);var date_field_delimiter=/([-.\\/])/.exec(dateFormat)[0];dateFormat=dateFormat.replace(/[^a-zA-Z]/g,'');var monthPos=dateFormat.search(/m/);var dayPos=dateFormat.search(/d/);var yearPos=dateFormat.search(/Y/);Event.on(Dom.get(showButton),"click",function(){if(!dialog){dialog=new YAHOO.widget.SimpleDialog("container_"+showButton,{visible:false,context:[showButton,"tl","bl"],buttons:[],draggable:false,close:true,zIndex:Calendar.getHighestZIndex(document.body)});dialog.setHeader(SUGAR.language.get('app_strings','LBL_MASSUPDATE_DATE'));var dialogBody='

'+SUGAR.language.get('app_strings','LBL_EMAIL_DATE_TODAY')+'

';dialog.setBody(dialogBody);dialog.render(document.body);Dom.addClass("container_"+showButton,"cal_panel");Event.addListener("callnav_today","click",function(){calendar.clear();var now=new Date();Dom.get(inputField).value=formatSelectedDate(now);var cellIndex=calendar.getCellIndex(now);if(cellIndex>-1) {var cell=calendar.cells[cellIndex];Dom.addClass(cell,calendar.Style.CSS_CELL_SELECTED);}});dialog.showEvent.subscribe(function(){if(YAHOO.env.ua.ie){dialog.fireEvent("changeContent");}});Event.on(document,"click",function(e){if(!dialog) {return;} -var el=Event.getTarget(e);var dialogEl=dialog.element;if(el!=dialogEl&&!Dom.isAncestor(dialogEl,el)&&el!=Dom.get(showButton)&&!Dom.isAncestor(Dom.get(showButton),el)){dialog.hide();calendar=null;dialog=null;}});} +var el=Event.getTarget(e);var dialogEl=dialog.element;if(el!=dialogEl&&!Dom.isAncestor(dialogEl,el)&&el!=Dom.get(showButton)&&!Dom.isAncestor(Dom.get(showButton),el)){dialog.hide();}});} if(!calendar){var navConfig={strings:{month:SUGAR.language.get('app_strings','LBL_CHOOSE_MONTH'),year:SUGAR.language.get('app_strings','LBL_ENTER_YEAR'),submit:SUGAR.language.get('app_strings','LBL_EMAIL_OK'),cancel:SUGAR.language.get('app_strings','LBL_CANCEL_BUTTON_LABEL'),invalidYear:SUGAR.language.get('app_strings','LBL_ENTER_VALID_YEAR')},monthFormat:YAHOO.widget.Calendar.SHORT,initialFocus:"year"};calendar=new YAHOO.widget.Calendar(showButton+'_div',{iframe:false,hide_blank_weeks:true,navigator:navConfig});calendar.cfg.setProperty('DATE_FIELD_DELIMITER',date_field_delimiter);calendar.cfg.setProperty('MDY_DAY_POSITION',dayPos+1);calendar.cfg.setProperty('MDY_MONTH_POSITION',monthPos+1);calendar.cfg.setProperty('MDY_YEAR_POSITION',yearPos+1);if(typeof SUGAR.language.languages['app_list_strings']!='undefined'&&SUGAR.language.languages['app_list_strings']['dom_cal_month_long']!='undefined') {if(SUGAR.language.languages['app_list_strings']['dom_cal_month_long'].length==13) {SUGAR.language.languages['app_list_strings']['dom_cal_month_long'].shift();} @@ -73,7 +73,8 @@ else {selDate+=date_field_delimiter+yearVal;} return selDate;};calendar.selectEvent.subscribe(function(){var input=Dom.get(inputField);if(calendar.getSelectedDates().length>0){input.value=formatSelectedDate(calendar.getSelectedDates()[0]);if(params.comboObject) {params.comboObject.update();}}else{input.value="";} -dialog.hide();SUGAR.util.callOnChangeListers(input);});calendar.renderEvent.subscribe(function(){dialog.fireEvent("changeContent");});} +if(input.onchange) +input.onchange();dialog.hide();SUGAR.util.callOnChangeListers(input);});calendar.renderEvent.subscribe(function(){dialog.fireEvent("changeContent");});} var seldate=calendar.getSelectedDates();if(Dom.get(inputField).value.length>0){val=new Date(Dom.get(inputField).value);if(!isNaN(val.getTime())) {calendar.cfg.setProperty("selected",Dom.get(inputField).value);seldate=Dom.get(inputField).value.split(date_field_delimiter);calendar.cfg.setProperty("pagedate",seldate[monthPos]+calendar.cfg.getProperty("DATE_FIELD_DELIMITER")+seldate[yearPos]);}}else if(seldate.length>0){calendar.cfg.setProperty("selected",seldate[0]);var month=seldate[0].getMonth()+1;var year=seldate[0].getFullYear();calendar.cfg.setProperty("pagedate",month+calendar.cfg.getProperty("DATE_FIELD_DELIMITER")+year);} -calendar.render();dialog.show();});});}; \ No newline at end of file +calendar.render();dialog.show();});});}; diff --git a/include/javascript/cookie.js b/include/javascript/cookie.js index 2ea5ab21..f82911b2 100644 --- a/include/javascript/cookie.js +++ b/include/javascript/cookie.js @@ -53,4 +53,4 @@ while(end>-1){var cur=cookie.substring(0,end);cookie=cookie.substring(end+1,cook return cookies;} function subs_to_cookie(cookies){var cookie='';for(var i in cookies) {if(typeof(cookies[i])!="function"){cookie+=i+'='+cookies[i]+'#';}} -return cookie;} \ No newline at end of file +return cookie;} diff --git a/include/javascript/dashlets.js b/include/javascript/dashlets.js index 97bc18a3..ce362e90 100644 --- a/include/javascript/dashlets.js +++ b/include/javascript/dashlets.js @@ -35,4 +35,4 @@ SUGAR.dashlets=function(){return{postForm:function(theForm,callback){var success=function(data){if(data){callback(data.responseText);}} YAHOO.util.Connect.setForm(theForm);var cObj=YAHOO.util.Connect.asyncRequest('POST','index.php',{success:success,failure:success});return false;},callMethod:function(dashletId,methodName,postData,refreshAfter,callback){ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_SAVING'));response=function(data){ajaxStatus.hideStatus();if(refreshAfter)SUGAR.mySugar.retrieveDashlet(dashletId);if(callback){callback(data.responseText);}} post='to_pdf=1&module=Home&action=CallMethodDashlet&method='+methodName+'&id='+dashletId+'&'+postData;var cObj=YAHOO.util.Connect.asyncRequest('POST','index.php',{success:response,failure:response},post);}};}();if(SUGAR.util.isTouchScreen()&&typeof iScroll=='undefined'){with(document.getElementsByTagName("head")[0].appendChild(document.createElement("script"))) -{setAttribute("id","newScript",0);setAttribute("type","text/javascript",0);setAttribute("src","include/javascript/iscroll.js",0);}} \ No newline at end of file +{setAttribute("id","newScript",0);setAttribute("type","text/javascript",0);setAttribute("src","include/javascript/iscroll.js",0);}} diff --git a/include/javascript/getYUIComboFile.php b/include/javascript/getYUIComboFile.php index 85fe17cf..4cd85d21 100644 --- a/include/javascript/getYUIComboFile.php +++ b/include/javascript/getYUIComboFile.php @@ -38,10 +38,10 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); if (empty($_REQUEST)) die(); $yui_path = array( - "2.7.0" => "include/javascript/yui", - "2_7_0" => "include/javascript/yui", - "3.0.0" => "include/javascript/yui3", - "3_0_0" => "include/javascript/yui3" + "2.9.0" => "include/javascript/yui", + "2_9_0" => "include/javascript/yui", + "3.3.0" => "include/javascript/yui3", + "3_3_0" => "include/javascript/yui3" ); $types = array( "js" => "application/x-javascript", diff --git a/include/javascript/include.js b/include/javascript/include.js index 846fe293..2c7ce1e3 100644 --- a/include/javascript/include.js +++ b/include/javascript/include.js @@ -15,4 +15,4 @@ YAHOO.SUGAR.DragDropTable.groups={defGroup:[]} YAHOO.extend(YAHOO.SUGAR.DragDropTable,YAHOO.widget.ScrollingDataTable,{sugarfunc:function(){console.log("at sugar func")},addRowAt:function(record,index){console.log(record);},_addTrEl:function(oRecord){var elTr=YAHOO.SUGAR.DragDropTable.superclass._addTrEl.call(this,oRecord);var _rowDD=new YAHOO.SUGAR.RowDD(this,oRecord,elTr);return elTr;},getGroup:function(){return YAHOO.SUGAR.DragDropTable.groups[this.DDGroup];}});YAHOO.SUGAR.RowDD=function(oDataTable,oRecord,elTr){if(oDataTable&&oRecord&&elTr){this.ddtable=oDataTable;this.table=oDataTable.getTableEl();this.row=oRecord;this.rowEl=elTr;this.newIndex=null;this.init(elTr);this.initFrame();this.invalidHandleTypes={};}};YAHOO.extend(YAHOO.SUGAR.RowDD,YAHOO.util.DDProxy,{_resizeProxy:function(){this.constructor.superclass._resizeProxy.apply(this,arguments);var dragEl=this.getDragEl(),el=this.getEl();YAHOO.util.Dom.setStyle(this.pointer,'height',(this.rowEl.offsetHeight+5)+'px');YAHOO.util.Dom.setStyle(this.pointer,'display','block');var xy=YAHOO.util.Dom.getXY(el);YAHOO.util.Dom.setXY(this.pointer,[xy[0],(xy[1]-5)]);YAHOO.util.Dom.setStyle(dragEl,'height',this.rowEl.offsetHeight+"px");YAHOO.util.Dom.setStyle(dragEl,'width',(parseInt(YAHOO.util.Dom.getStyle(dragEl,'width'),10)+4)+'px');YAHOO.util.Dom.setXY(this.dragEl,xy);},startDrag:function(x,y){var Dom=YAHOO.util.Dom;var dragEl=this.getDragEl();var clickEl=this.getEl();Dom.setStyle(clickEl,"opacity","0.25");dragEl.innerHTML=clickEl.innerHTML;Dom.addClass(dragEl,"yui-dt-liner");Dom.setStyle(dragEl,"height",(clickEl.clientHeight-2)+"px");Dom.setStyle(dragEl,"backgroundColor",Dom.getStyle(clickEl,"backgroundColor"));Dom.setStyle(dragEl,"border","2px solid gray");},onMouseDown:function(){this.resetConstraints();},clickValidator:function(e){if(this.row.getData()[0]==" ") return false;var target=YAHOO.util.Event.getTarget(e);return(this.isValidHandleChild(target)&&(this.id==this.handleElId||this.DDM.handleWasClicked(target,this.id)));},onDragOver:function(ev,id){var groupTables=this.ddtable.getGroup();for(i in groupTables){var targetTable=groupTables[i];var targetRow=targetTable.getRecord(id);if(targetRow!=null){var destEl=YAHOO.util.Dom.get(id);destEl.parentNode.insertBefore(this.getEl(),destEl);this.newTable=targetTable;this.newIndex=targetTable.getRecordIndex(targetRow);}}},onDragDrop:function(){},endDrag:function(){if(this.newTable!=null&&this.newIndex!=null){this.getEl().style.display="none";this.table.appendChild(this.getEl());this.newTable.addRow(this.row.getData(),this.newIndex);this.ddtable.deleteRow(this.row);this.ddtable.render();} this.newTable=this.newIndex=null -YAHOO.util.Dom.setStyle(this.pointer,'display','none');var clickEl=this.getEl();YAHOO.util.Dom.setStyle(clickEl,"opacity","");}}); \ No newline at end of file +YAHOO.util.Dom.setStyle(this.pointer,'display','none');var clickEl=this.getEl();YAHOO.util.Dom.setStyle(clickEl,"opacity","");}}); diff --git a/include/javascript/iscroll.js b/include/javascript/iscroll.js index 9ebe0ca8..51153981 100644 --- a/include/javascript/iscroll.js +++ b/include/javascript/iscroll.js @@ -25,8 +25,8 @@ if(that.scrollBarY){that.scrollBarY.setPosition(that.y);}}},setTransitionTime:fu if(that.scrollBarY){that.scrollBarY.bar.style.webkitTransitionDuration=time;that.scrollBarY.wrapper.style.webkitTransitionDuration=has3d&&that.options.fadeScrollbar?'300ms':'0';}},touchStart:function(e){var that=this,matrix;if(!that.enabled){return;} e.preventDefault();e.stopPropagation();that.scrolling=true;that.moved=false;that.distX=0;that.distY=0;that.setTransitionTime('0');if(that.options.momentum||that.options.snap){matrix=new WebKitCSSMatrix(window.getComputedStyle(that.element).webkitTransform);if(matrix.e!=that.x||matrix.f!=that.y){document.removeEventListener('webkitTransitionEnd',that,false);that.setPosition(matrix.e,matrix.f);that.moved=true;}} that.touchStartX=isTouch?e.changedTouches[0].pageX:e.pageX;that.scrollStartX=that.x;that.touchStartY=isTouch?e.changedTouches[0].pageY:e.pageY;that.scrollStartY=that.y;that.scrollStartTime=e.timeStamp;that.directionX=0;that.directionY=0;},touchMove:function(e){if(!this.scrolling){return;} -var that=this,pageX=isTouch?e.changedTouches[0].pageX:e.pageX,pageY=isTouch?e.changedTouches[0].pageY:e.pageY,leftDelta=that.scrollX?pageX-that.touchStartX:0,topDelta=that.scrollY?pageY-that.touchStartY:0,newX=that.x+leftDelta,newY=that.y+topDelta;e.stopPropagation();that.touchStartX=pageX;that.touchStartY=pageY;if(newX>=0||newX=0||that.maxScrollX>=0)?0:that.maxScrollX;} -if(newY>=0||newY=0||that.maxScrollY>=0)?0:that.maxScrollY;} +var that=this,pageX=isTouch?e.changedTouches[0].pageX:e.pageX,pageY=isTouch?e.changedTouches[0].pageY:e.pageY,leftDelta=that.scrollX?pageX-that.touchStartX:0,topDelta=that.scrollY?pageY-that.touchStartY:0,newX=that.x+leftDelta,newY=that.y+topDelta;e.stopPropagation();that.touchStartX=pageX;that.touchStartY=pageY;if(newX>=0||newX=0||that.maxScrollX>=0)?0:that.maxScrollX;} +if(newY>=0||newY=0||that.maxScrollY>=0)?0:that.maxScrollY;} if(that.distX+that.distY>5){if(that.distX-3>that.distY){newY=that.y;topDelta=0;}else if(that.distY-3>that.distX){newX=that.x;leftDelta=0;} that.setPosition(newX,newY);that.moved=true;that.directionX=leftDelta>0?-1:1;that.directionY=topDelta>0?-1:1;}else{that.distX+=Math.abs(leftDelta);that.distY+=Math.abs(topDelta);}},touchEnd:function(e){if(!this.scrolling){return;} var that=this,time=e.timeStamp-that.scrollStartTime,point=isTouch?e.changedTouches[0]:e,target,ev,momentumX,momentumY,newDuration=0,newPositionX=that.x,newPositionY=that.y,snap;that.scrolling=false;if(!that.moved){that.resetPosition();if(isTouch){target=point.target;while(target.nodeType!=1){target=target.parentNode;} @@ -43,15 +43,15 @@ if(that.scrollBarY){that.scrollBarY.hide();}}},snap:function(x,y){var that=this, that.pageX=-x;x=x*that.scrollWidth;if(x>0){x=that.pageX=0;}else if(x0){y=Math.floor(y/that.scrollHeight);}else if(that.directionY<0){y=Math.ceil(y/that.scrollHeight);}else{y=Math.round(y/that.scrollHeight);} that.pageY=-y;y=y*that.scrollHeight;if(y>0){y=that.pageY=0;}else if(y=0){x=0;}else if(x=0){y=0;}else if(y0&&newDist>maxDistUpper){speed=speed*maxDistUpper/newDist/friction;newDist=maxDistUpper;}else if(dist<0&&newDist>maxDistLower){speed=speed*maxDistLower/newDist/friction;newDist=maxDistLower;} -newDist=newDist*(dist<0?-1:1);newTime=speed/deceleration;return{dist:Math.round(newDist),time:Math.round(newTime)};},destroy:function(full){var that=this;window.removeEventListener('onorientationchange'in window?'orientationchange':'resize',that,false);that.element.removeEventListener(START_EVENT,that,false);that.element.removeEventListener(MOVE_EVENT,that,false);that.element.removeEventListener(END_EVENT,that,false);document.removeEventListener('webkitTransitionEnd',that,false);if(that.options.checkDOMChanges){that.element.removeEventListener('DOMSubtreeModified',that,false);} +that.scrollTo(x,y,runtime);},momentum:function(dist,time,maxDistUpper,maxDistLower){var friction=2.5,deceleration=1.2,speed=Math.abs(dist)/ time*1000,newDist=speed*speed / friction / 1000,newTime=0;if(dist>0&&newDist>maxDistUpper){speed=speed*maxDistUpper / newDist / friction;newDist=maxDistUpper;}else if(dist<0&&newDist>maxDistLower){speed=speed*maxDistLower / newDist / friction;newDist=maxDistLower;} +newDist=newDist*(dist<0?-1:1);newTime=speed / deceleration;return{dist:Math.round(newDist),time:Math.round(newTime)};},destroy:function(full){var that=this;window.removeEventListener('onorientationchange'in window?'orientationchange':'resize',that,false);that.element.removeEventListener(START_EVENT,that,false);that.element.removeEventListener(MOVE_EVENT,that,false);that.element.removeEventListener(END_EVENT,that,false);document.removeEventListener('webkitTransitionEnd',that,false);if(that.options.checkDOMChanges){that.element.removeEventListener('DOMSubtreeModified',that,false);} if(that.scrollBarX){that.scrollBarX=that.scrollBarX.remove();} if(that.scrollBarY){that.scrollBarY=that.scrollBarY.remove();} if(full){that.wrapper.parentNode.removeChild(that.wrapper);} @@ -59,8 +59,8 @@ return null;}};function scrollbar(dir,wrapper,fade,shrink,color){var that=this,d (dir=='horizontal'?'-webkit-border-radius:3px 2px;min-width:6px;min-height:5px':'-webkit-border-radius:2px 3px;min-width:5px;min-height:6px');that.wrapper=doc.createElement('div');that.wrapper.style.cssText='-webkit-mask:-webkit-canvas(scrollbar'+that.uid+that.dir+');position:absolute;z-index:10;pointer-events:none;overflow:hidden;opacity:0;-webkit-transition-duration:'+(fade?'300ms':'0')+';-webkit-transition-delay:0;-webkit-transition-property:opacity;'+ (that.dir=='horizontal'?'bottom:2px;left:2px;right:7px;height:5px':'top:2px;right:2px;bottom:7px;width:5px;');that.wrapper.appendChild(that.bar);wrapper.appendChild(that.wrapper);} scrollbar.prototype={init:function(scroll,size){var that=this,doc=document,pi=Math.PI,ctx;if(that.dir=='horizontal'){if(that.maxSize!=that.wrapper.offsetWidth){that.maxSize=that.wrapper.offsetWidth;ctx=doc.getCSSCanvasContext("2d","scrollbar"+that.uid+that.dir,that.maxSize,5);ctx.fillStyle="rgb(0,0,0)";ctx.beginPath();ctx.arc(2.5,2.5,2.5,pi/2,-pi/2,false);ctx.lineTo(that.maxSize-2.5,0);ctx.arc(that.maxSize-2.5,2.5,2.5,-pi/2,pi/2,false);ctx.closePath();ctx.fill();}}else{if(that.maxSize!=that.wrapper.offsetHeight){that.maxSize=that.wrapper.offsetHeight;ctx=doc.getCSSCanvasContext("2d","scrollbar"+that.uid+that.dir,5,that.maxSize);ctx.fillStyle="rgb(0,0,0)";ctx.beginPath();ctx.arc(2.5,2.5,2.5,pi,0,false);ctx.lineTo(5,that.maxSize-2.5);ctx.arc(2.5,that.maxSize-2.5,2.5,0,pi,false);ctx.closePath();ctx.fill();}} -that.size=Math.max(Math.round(that.maxSize*that.maxSize/size),6);that.maxScroll=that.maxSize-that.size;that.toWrapperProp=that.maxScroll/(scroll-size);that.bar.style[that.dir=='horizontal'?'width':'height']=that.size+'px';},setPosition:function(pos){var that=this;if(that.wrapper.style.opacity!='1'){that.show();} +that.size=Math.max(Math.round(that.maxSize*that.maxSize / size),6);that.maxScroll=that.maxSize-that.size;that.toWrapperProp=that.maxScroll /(scroll-size);that.bar.style[that.dir=='horizontal'?'width':'height']=that.size+'px';},setPosition:function(pos){var that=this;if(that.wrapper.style.opacity!='1'){that.show();} pos=Math.round(that.toWrapperProp*pos);if(pos<0){pos=that.shrink?pos+pos*3:0;if(that.size+pos<7){pos=-that.size+6;}}else if(pos>that.maxScroll){pos=that.shrink?pos+(pos-that.maxScroll)*3:that.maxScroll;if(that.size+that.maxScroll-pos<7){pos=that.size+that.maxScroll-6;}} pos=that.dir=='horizontal'?translateOpen+pos+'px,0'+translateClose:translateOpen+'0,'+pos+'px'+translateClose;that.bar.style.webkitTransform=pos;},show:function(){if(has3d){this.wrapper.style.webkitTransitionDelay='0';} this.wrapper.style.opacity='1';},hide:function(){if(has3d){this.wrapper.style.webkitTransitionDelay='350ms';} -this.wrapper.style.opacity='0';},remove:function(){this.wrapper.parentNode.removeChild(this.wrapper);return null;}};var has3d=('WebKitCSSMatrix'in window&&'m11'in new WebKitCSSMatrix()),isIthing=(/iphone|ipad/gi).test(navigator.appVersion),isTouch=('ontouchstart'in window),START_EVENT=isTouch?'touchstart':'mousedown',MOVE_EVENT=isTouch?'touchmove':'mousemove',END_EVENT=isTouch?'touchend':'mouseup',translateOpen='translate'+(has3d?'3d(':'('),translateClose=has3d?',0)':')',uid=0;window.iScroll=iScroll;})(); \ No newline at end of file +this.wrapper.style.opacity='0';},remove:function(){this.wrapper.parentNode.removeChild(this.wrapper);return null;}};var has3d=('WebKitCSSMatrix'in window&&'m11'in new WebKitCSSMatrix()),isIthing=(/iphone|ipad/gi).test(navigator.appVersion),isTouch=('ontouchstart'in window),START_EVENT=isTouch?'touchstart':'mousedown',MOVE_EVENT=isTouch?'touchmove':'mousemove',END_EVENT=isTouch?'touchend':'mouseup',translateOpen='translate'+(has3d?'3d(':'('),translateClose=has3d?',0)':')',uid=0;window.iScroll=iScroll;})(); diff --git a/include/javascript/jsclass_async.js b/include/javascript/jsclass_async.js index 882f5a00..562d2cd6 100644 --- a/include/javascript/jsclass_async.js +++ b/include/javascript/jsclass_async.js @@ -32,37 +32,29 @@ * technical reasons, the Appropriate Legal Notices must display the words * "Powered by SugarCRM". ********************************************************************************/ -function method_callback(request_id,rslt,e){if(rslt==null){return;} -if(typeof(global_request_registry[request_id])!='undefined'){widget=global_request_registry[request_id][0];method_name=global_request_registry[request_id][1];widget[method_name](rslt);}} +function method_callback(o){var resp=YAHOO.lang.JSON.parse(o.responseText),request_id=o.tId,result=resp.result;if(result==null){return;} +reqid=global_request_registry[request_id];if(typeof(reqid)!='undefined'){widget=global_request_registry[request_id][0];method_name=global_request_registry[request_id][1];widget[method_name](result);}} SugarClass.inherit("SugarVCalClient","SugarClass");function SugarVCalClient(){this.init();} SugarVCalClient.prototype.init=function(){} -SugarVCalClient.prototype.load=function(user_id,request_id){this.user_id=user_id;urllib.getURL('./vcal_server.php?type=vfb&source=outlook&user_id='+user_id,[["Content-Type","text/plain"]],function(result){if(typeof GLOBAL_REGISTRY.freebusy=='undefined') -{GLOBAL_REGISTRY.freebusy=new Object();} -if(typeof GLOBAL_REGISTRY.freebusy_adjusted=='undefined') -{GLOBAL_REGISTRY.freebusy_adjusted=new Object();} -GLOBAL_REGISTRY.freebusy[user_id]=SugarVCalClient.parseResults(result.responseText,false);GLOBAL_REGISTRY.freebusy_adjusted[user_id]=SugarVCalClient.parseResults(result.responseText,true);global_request_registry[request_id][0].display();})} +SugarVCalClient.prototype.load=function(user_id,request_id){this.user_id=user_id;YAHOO.util.Connect.asyncRequest('GET','./vcal_server.php?type=vfb&source=outlook&user_id='+user_id,{success:function(result){if(typeof GLOBAL_REGISTRY.freebusy=='undefined'){GLOBAL_REGISTRY.freebusy=new Object();} +if(typeof GLOBAL_REGISTRY.freebusy_adjusted=='undefined'){GLOBAL_REGISTRY.freebusy_adjusted=new Object();} +GLOBAL_REGISTRY.freebusy[user_id]=SugarVCalClient.parseResults(result.responseText,false);GLOBAL_REGISTRY.freebusy_adjusted[user_id]=SugarVCalClient.parseResults(result.responseText,true);global_request_registry[request_id][0].display();},failure:function(result){this.success(result);},argument:{result:result}});} SugarVCalClient.prototype.parseResults=function(textResult,adjusted){var match=/FREEBUSY.*?\:([\w]+)\/([\w]+)/g;var result;var timehash=new Object();var dst_start;var dst_end;if(GLOBAL_REGISTRY.current_user.fields.dst_start==null) dst_start='19700101T000000Z';else dst_start=GLOBAL_REGISTRY.current_user.fields.dst_start.replace(/ /gi,'T').replace(/:/gi,'').replace(/-/gi,'')+'Z';if(GLOBAL_REGISTRY.current_user.fields.dst_end==null) dst_end='19700101T000000Z';else -dst_end=GLOBAL_REGISTRY.current_user.fields.dst_end.replace(/ /gi,'T').replace(/:/gi,'').replace(/-/gi,'')+'Z';gmt_offset_secs=GLOBAL_REGISTRY.current_user.fields.gmt_offset*60;while(((result=match.exec(textResult)))!=null) -{var startdate;var enddate;if(adjusted){startdate=SugarDateTime.parseAdjustedDate(result[1],dst_start,dst_end,gmt_offset_secs);enddate=SugarDateTime.parseAdjustedDate(result[2],dst_start,dst_end,gmt_offset_secs);} +dst_end=GLOBAL_REGISTRY.current_user.fields.dst_end.replace(/ /gi,'T').replace(/:/gi,'').replace(/-/gi,'')+'Z';gmt_offset_secs=GLOBAL_REGISTRY.current_user.fields.gmt_offset*60;while(((result=match.exec(textResult)))!=null){var startdate;var enddate;if(adjusted){startdate=SugarDateTime.parseAdjustedDate(result[1],dst_start,dst_end,gmt_offset_secs);enddate=SugarDateTime.parseAdjustedDate(result[2],dst_start,dst_end,gmt_offset_secs);} else{startdate=SugarDateTime.parseUTCDate(result[1]);enddate=SugarDateTime.parseUTCDate(result[2]);} var startmins=startdate.getUTCMinutes();if(startmins>=0&&startmins<15){startdate.setUTCMinutes(0);} else if(startmins>=15&&startmins<30){startdate.setUTCMinutes(15);} else if(startmins>=30&&startmins<45){startdate.setUTCMinutes(30);} else{startdate.setUTCMinutes(45);} -for(var i=0;i<100;i++) -{if(startdate.valueOf()12) -{hour-=12;am_pm='PM';} -else if(hour==12) -{am_pm='PM';} -else if(hour==0) -{hour=12;} +SugarDateTime.getFormattedDOW=SugarDateTime.prototype.getFormattedDOW;SugarDateTime.getAMPM=function(date_obj){var hour=date_obj.getHour();var am_pm='AM';if(hour>12){hour-=12;am_pm='PM';} +else if(hour==12){am_pm='PM';} +else if(hour==0){hour=12;} return am_pm;} -SugarDateTime.getFormattedHour=SugarDateTime.prototype.getFormattedHour;SugarDateTime.prototype.parseUTCDate=function(date_string){var match=/(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z/;if(((result=match.exec(date_string)))!=null) -{var new_date=new Date(Date.UTC(result[1],result[2]-1,result[3],result[4],result[5],parseInt(result[6])+time_offset));return new_date;}} -SugarDateTime.parseUTCDate=SugarDateTime.prototype.parseUTCDate;SugarDateTime.prototype.parseAdjustedDate=function(date_string,dst_start,dst_end,gmt_offset_secs){var match=/(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z/;dst_start_parse=match.exec(dst_start);dst_end_parse=match.exec(dst_end);if(dst_start_parse==null||dst_end_parse==null){var new_date=new Date(result[1],result[2]-1,result[3],result[4],result[5],parseInt(result[6]));new_date=new Date(new_date.getTime()+gmt_offset_secs*1000);}else{dst_start_obj=new Date(dst_start_parse[1],dst_start_parse[2]-1,dst_start_parse[3],dst_start_parse[4],dst_start_parse[5],parseInt(dst_start_parse[6]));dst_end_obj=new Date(dst_end_parse[1],dst_end_parse[2]-1,dst_end_parse[3],dst_end_parse[4],dst_end_parse[5],parseInt(dst_end_parse[6]));if(((result=match.exec(date_string)))!=null) -{var new_date=new Date(result[1],result[2]-1,result[3],result[4],result[5],parseInt(result[6]));var event_ts=new_date.getTime();var dst_start_ts=dst_start_obj.getTime();var dst_end_ts=dst_end_obj.getTime();if(((event_ts>=dst_start_ts||event_tsdst_end_ts)||(event_ts>=dst_start_ts&&event_ts=dst_start_ts||event_tsdst_end_ts)||(event_ts>=dst_start_ts&&event_ts(objLeft+obj.offsetWidth)||objLeft>(x+w));else if(objTop>h) function Is(){var agt=navigator.userAgent.toLowerCase();this.major=parseInt(navigator.appVersion);this.minor=parseFloat(navigator.appVersion);this.nav=((agt.indexOf('mozilla')!=-1)&&(agt.indexOf('spoofer')==-1)&&(agt.indexOf('compatible')==-1)&&(agt.indexOf('opera')==-1)&&(agt.indexOf('webtv')==-1)&&(agt.indexOf('hotjava')==-1));this.nav2=(this.nav&&(this.major==2));this.nav3=(this.nav&&(this.major==3));this.nav4=(this.nav&&(this.major==4));this.nav4up=(this.nav&&(this.major>=4));this.navonly=(this.nav&&((agt.indexOf(";nav")!=-1)||(agt.indexOf("; nav")!=-1)));this.nav6=(this.nav&&(this.major==5));this.nav6up=(this.nav&&(this.major>=5));this.gecko=(agt.indexOf('gecko')!=-1);this.nav7=(this.gecko&&(this.major>=5)&&(agt.indexOf('netscape/7')!=-1));this.moz1=false;this.moz1up=false;this.moz1_1=false;this.moz1_1up=false;if(this.nav6up){myRegEx=new RegExp("rv:\\d*.\\d*.\\d*");myFind=myRegEx.exec(agt);if(myFind!=null){var strVersion=myFind.toString();strVersion=strVersion.replace(/rv:/,'');var arrVersion=strVersion.split('.');var major=parseInt(arrVersion[0]);var minor=parseInt(arrVersion[1]);if(arrVersion[2])var revision=parseInt(arrVersion[2]);this.moz1=((major==1)&&(minor==0));this.moz1up=((major==1)&&(minor>=0));this.moz1_1=((major==1)&&(minor==1));this.moz1_1up=((major==1)&&(minor>=1));}} this.ie=((agt.indexOf("msie")!=-1)&&(agt.indexOf("opera")==-1));this.ie3=(this.ie&&(this.major<4));this.ie4=(this.ie&&(this.major==4)&&(agt.indexOf("msie 4")!=-1));this.ie4up=(this.ie&&(this.major>=4));this.ie5=(this.ie&&(this.major==4)&&(agt.indexOf("msie 5.0")!=-1));this.ie5_5=(this.ie&&(this.major==4)&&(agt.indexOf("msie 5.5")!=-1));this.ie5up=(this.ie&&!this.ie3&&!this.ie4);this.ie5_5up=(this.ie&&!this.ie3&&!this.ie4&&!this.ie5);this.ie6=(this.ie&&(this.major==4)&&(agt.indexOf("msie 6.")!=-1));this.ie6up=(this.ie&&!this.ie3&&!this.ie4&&!this.ie5&&!this.ie5_5);this.mac=(agt.indexOf("mac")!=-1);} function runPageLoadItems(){var myVar;checkBrowserWidth();} -var is=new Is();if(is.ie){document.write('');} \ No newline at end of file +var is=new Is();if(is.ie){document.write('');} diff --git a/include/javascript/overlibmws.js b/include/javascript/overlibmws.js index fa82579e..86017c9b 100644 --- a/include/javascript/overlibmws.js +++ b/include/javascript/overlibmws.js @@ -262,7 +262,7 @@ function OLpar(a,v){eval(v+'='+a);} function OLparQuo(a,v){eval(v+"='"+OLescSglQt(a)+"'");} function OLescSglQt(s){return s.toString().replace(/'/g,"\\'");} function OLtoggle(a,v){eval(v+'=('+v+'==0&&'+a+'>=0)?1:0');} -function OLhasDims(s){return/[%\-a-z]+$/.test(s);} +function OLhasDims(s){return /[%\-a-z]+$/.test(s);} function OLfontSize(){var i;if(OLhasDims(o3_textsize)){if(OLns4)o3_textsize="2";}else if(!OLns4){i=parseInt(o3_textsize);o3_textsize=(i>0&&i<8)?OLpct[i]:OLpct[0];} if(OLhasDims(o3_captionsize)){if(OLns4)o3_captionsize="2";}else @@ -286,4 +286,4 @@ return i;} function OLregCmds(c){if(typeof c!='string')return;var pM=c.split(',');pMtr=pMtr.concat(pM);for(var i=0;i0){var data=[];for(var key in this.qs_obj.field_list){data[data.length]=args[2][0][this.qs_obj.field_list[key]];} this.getInputEl().value=data[this.key];this.itemSelectEvent.fire(this,"",data);}});search.typeAheadEvent.subscribe(function(e,args){this.getInputEl().value=this.getInputEl().value.replace(/&/gi,'&').replace(/</gi,'<').replace(/>/gi,'>').replace(/'/gi,'\'').replace(/"/gi,'"');});if(typeof QSFieldsArray[combo_id]=='undefined'&&qsFields[qsField].id){QSFieldsArray[combo_id]=search;}}}}});} function registerSingleSmartInputListener(input){if((c=input.className)&&(c.indexOf("sqsEnabled")!=-1)){enableQS(true);}} -if(typeof QSFieldsArray=='undefined'){QSFieldsArray=new Array();QSProcessedFieldsArray=new Array();} \ No newline at end of file +if(typeof QSFieldsArray=='undefined'){QSFieldsArray=new Array();QSProcessedFieldsArray=new Array();} diff --git a/include/javascript/report_additionals.js b/include/javascript/report_additionals.js index 9b1966a6..9a6fefec 100644 --- a/include/javascript/report_additionals.js +++ b/include/javascript/report_additionals.js @@ -81,7 +81,7 @@ else{selected=false;} var option_info=new Object();option_info['value']=i;var label=linked_field['label'];if(i!='self'){label=full_table_list[full_table_list[i].parent].label+' > '+label;} option_info['text']=label;option_info['selected']=selected;options[options.length]=option_info;} select_html_info['options']=options;cell.innerHTML=buildSelectHTML(select_html_info);filters_arr[filters_count_map[current_filter_id]].module_select=cell.getElementsByTagName('select')[0];} -function addModuleSelectGroup(cell,filter){var select_html_info=new Object();var options=new Array();var select_info=new Object();select_info['name']='group';select_info['onchange']='moduleSelectChangedGroup('+current_group_id+');';select_html_info['select']=select_info;var link_defs=getSelectedLinkDefs();var option_info=new Object();option_info['value']='self';option_info['text']=module_defs[current_module].label;option_info['selected']=selected;options[options.length]=option_info;var parts=filter.column_name.split(':');var selected_link_name=parts[0];for(var i in link_defs){var linked_field=link_defs[i];var selected=false;if(i==selected_link_name){selected=true;} +function addModuleSelectGroup(cell,filter){var select_html_info=new Object();var options=new Array();var select_info=new Object();select_info['name']='group';select_info['onchange']='moduleSelectChangedGroup('+current_group_id+');';select_html_info['select']=select_info;var link_defs=getSelectedLinkDefs();var option_info=new Object();option_info['value']='self';option_info['text']=module_defs[current_module].label;option_info['selected']=selected;options[options.length]=option_info;var parts=filter.column_name.split(':');var selected_link_name=parts[0];for(var i inlink_defs){var linked_field=link_defs[i];var selected=false;if(i==selected_link_name){selected=true;} else{selected=false;} var option_info=new Object();option_info['value']=i;var label=linked_field['label'];if(i!='self'){label=full_table_list[full_table_list[i].parent].label+' > '+label;} option_info['text']=label;option_info['selected']=selected;options[options.length]=option_info;} @@ -234,7 +234,7 @@ if(typeof(summary_column_map[group_key])=='undefined'){report_def.summary_column else{summary_column_map[group_key].is_group_by='visible';} group_defs.push(group_by_def);}} report_def.group_defs=group_defs;var links=getSelectedLinks();var links_def=new Array();for(var i in links){links_def.push(links[i]);} -var link_joins=getSelectedLinkJoins(links_def);report_def.full_table_list=full_table_list;report_def.module=current_module;report_def.report_name=document.EditView.save_report_as.value;report_def.chart_type=document.EditView.chart_type.value;report_def.chart_description=document.EditView.chart_description.value;report_def.numerical_chart_column=document.EditView.numerical_chart_column.value;global_report_def=report_def;report_def.assigned_user_id=document.EditView.assigned_user_id.value;report_def_str=JSON.stringifyNoSecurity(report_def);form_obj.report_def.value=report_def_str;return true;} +var link_joins=getSelectedLinkJoins(links_def);report_def.full_table_list=full_table_list;report_def.module=current_module;report_def.report_name=document.EditView.save_report_as.value;report_def.chart_type=document.EditView.chart_type.value;report_def.chart_description=document.EditView.chart_description.value;report_def.numerical_chart_column=document.EditView.numerical_chart_column.value;global_report_def=report_def;report_def.assigned_user_id=document.EditView.assigned_user_id.value;report_def_str=YAHOO.lang.JSON.stringify(report_def);form_obj.report_def.value=report_def_str;return true;} function do_export(){if(fill_form('export')==true){document.EditView.submit();}} function set_sort(column_name,source){if(source=='undefined'){source='columns';} var sort_by='sort_by';var sort_dir='sort_dir';if(source=='summary'){sort_by='summary_sort_by';sort_dir='summary_sort_dir';} @@ -285,8 +285,8 @@ buildOuterJoinHTML(select_html_info)+'
=5.5&&version<9){return true;}else{return false;}}} +var secondsSinceLoad=0;var inputsWithErrors=new Array();var tabsWithErrors=new Array();var lastSubmitTime=0;var alertList=new Array();var oldStartsWith='';function isSupportedIE(){var userAgent=navigator.userAgent.toLowerCase();if(userAgent.indexOf("msie")!=-1&&userAgent.indexOf("mac")==-1&&userAgent.indexOf("opera")==-1){var version=navigator.appVersion.match(/MSIE (.\..)/)[1];if(version>=5.5&&version<10){return true;}else{return false;}}} SUGAR.isIE=isSupportedIE();SUGAR.isIE7=(navigator.userAgent.toLowerCase().indexOf('msie 7')!=-1);var isSafari=(navigator.userAgent.toLowerCase().indexOf('safari')!=-1);RegExp.escape=function(text){if(!arguments.callee.sRE){var specials=['/','.','*','+','?','|','(',')','[',']','{','}','\\'];arguments.callee.sRE=new RegExp('(\\'+specials.join('|\\')+')','g');} return text.replace(arguments.callee.sRE,'\\$1');} function addAlert(type,name,subtitle,description,time,redirect){var addIndex=alertList.length;alertList[addIndex]=new Array();alertList[addIndex]['name']=name;alertList[addIndex]['type']=type;alertList[addIndex]['subtitle']=subtitle;alertList[addIndex]['description']=description.replace(/
/gi,"\n").replace(/&/gi,'&').replace(/</gi,'<').replace(/>/gi,'>').replace(/'/gi,'\'').replace(/"/gi,'"');alertList[addIndex]['time']=time;alertList[addIndex]['done']=0;alertList[addIndex]['redirect']=redirect;} @@ -122,7 +122,7 @@ return false return true} function isFloat(floatStr){if(floatStr.length==0){return true;} if(!(typeof(num_grp_sep)=='undefined'||typeof(dec_sep)=='undefined')){floatStr=unformatNumberNoParse(floatStr,num_grp_sep,dec_sep).toString();} -return/^(-)?[0-9\.]+$/.test(floatStr);} +return /^(-)?[0-9\.]+$/.test(floatStr);} function isDBName(str){if(str.length==0){return true;} if(!/^[a-zA-Z][a-zA-Z\_0-9]*$/.test(str)) return false @@ -143,7 +143,7 @@ return false;return validate_form(formname,'');} function add_error_style(formname,input,txt,flash){if(typeof flash=="undefined") flash=true;try{inputHandle=typeof input=="object"?input:document.forms[formname][input];style=get_current_bgcolor(inputHandle);if(txt.substring(txt.length-1)==':') txt=txt.substring(0,txt.length-1) -requiredTxt=SUGAR.language.get('app_strings','ERR_MISSING_REQUIRED_FIELDS');invalidTxt=SUGAR.language.get('app_strings','ERR_INVALID_VALUE');nomatchTxt=SUGAR.language.get('app_strings','ERR_SQS_NO_MATCH_FIELD');matchTxt=txt.replace(requiredTxt,'').replace(invalidTxt,'').replace(nomatchTxt,'');if(inputHandle.parentNode.innerHTML.search(matchTxt)==-1){errorTextNode=document.createElement('span');errorTextNode.className='required';errorTextNode.innerHTML='
'+txt;if(inputHandle.parentNode.className.indexOf('x-form-field-wrap')!=-1){inputHandle.parentNode.parentNode.appendChild(errorTextNode);} +requiredTxt=SUGAR.language.get('app_strings','ERR_MISSING_REQUIRED_FIELDS');invalidTxt=SUGAR.language.get('app_strings','ERR_INVALID_VALUE');nomatchTxt=SUGAR.language.get('app_strings','ERR_SQS_NO_MATCH_FIELD');matchTxt=txt.replace(requiredTxt,'').replace(invalidTxt,'').replace(nomatchTxt,'');if(inputHandle.parentNode.innerHTML.search(matchTxt)==-1){errorTextNode=document.createElement('div');errorTextNode.className='required';errorTextNode.innerHTML=txt;if(inputHandle.parentNode.className.indexOf('x-form-field-wrap')!=-1){inputHandle.parentNode.parentNode.appendChild(errorTextNode);} else{inputHandle.parentNode.appendChild(errorTextNode);} if(flash) inputHandle.style.backgroundColor="#FF0000";inputsWithErrors.push(inputHandle);} @@ -152,7 +152,7 @@ if(flash) if(typeof(window[formname+"_tabs"])!="undefined"){var tabView=window[formname+"_tabs"];var parentDiv=YAHOO.util.Dom.getAncestorByTagName(inputHandle,"div");if(tabView.get){var tabs=tabView.get("tabs");for(var i in tabs){if(tabs[i].get("contentEl")==parentDiv||YAHOO.util.Dom.isAncestor(tabs[i].get("contentEl"),inputHandle)) {tabs[i].get("labelEl").style.color="red";if(inputsWithErrors.length==1) tabView.selectTab(i);}}}} -window.setTimeout("inputsWithErrors["+(inputsWithErrors.length-1)+"].style.backgroundColor = null;",2000);}}catch(e){}} +window.setTimeout("inputsWithErrors["+(inputsWithErrors.length-1)+"].style.backgroundColor = '';",2000);}}catch(e){}} function clear_all_errors(){for(var wp=0;wp>4]+hexDigit[dec&15]);} -function fade_error_style(normalStyle,percent){errorStyle='c60c30';var r1=hex2dec(errorStyle.slice(0,2));var g1=hex2dec(errorStyle.slice(2,4));var b1=hex2dec(errorStyle.slice(4,6));var r2=hex2dec(normalStyle.slice(0,2));var g2=hex2dec(normalStyle.slice(2,4));var b2=hex2dec(normalStyle.slice(4,6));var pc=percent/100;r=Math.floor(r1+(pc*(r2-r1))+.5);g=Math.floor(g1+(pc*(g2-g1))+.5);b=Math.floor(b1+(pc*(b2-b1))+.5);for(var wp=0;wp2)return n.join('.');if(typeof round!='undefined'){if(round>0&&n.length>1){n[1]=parseFloat('0.'+n[1]);n[1]=Math.round(n[1]*Math.pow(10,round))/Math.pow(10,round);n[1]=n[1].toString().split('.')[1];} -if(round<=0){n[0]=Math.round(parseInt(n[0],10)*Math.pow(10,round))/Math.pow(10,round);n[1]='';}} +function formatNumber(n,num_grp_sep,dec_sep,round,precision){if(typeof num_grp_sep=='undefined'||typeof dec_sep=='undefined')return n;n=n?n.toString():'';if(n.split)n=n.split('.');else return n;if(n.length>2)return n.join('.');if(typeof round!='undefined'){if(round>0&&n.length>1){n[1]=parseFloat('0.'+n[1]);n[1]=Math.round(n[1]*Math.pow(10,round))/ Math.pow(10,round);n[1]=n[1].toString().split('.')[1];} +if(round<=0){n[0]=Math.round(parseInt(n[0],10)*Math.pow(10,round))/ Math.pow(10,round);n[1]='';}} if(typeof precision!='undefined'&&precision>=0){if(n.length>1&&typeof n[1]!='undefined')n[1]=n[1].substring(0,precision);else n[1]='';if(n[1].length1&&n[1]!=''?dec_sep+n[1]:'');} -SUGAR.ajaxStatusClass=function(){};SUGAR.ajaxStatusClass.prototype.statusDiv=null;SUGAR.ajaxStatusClass.prototype.oldOnScroll=null;SUGAR.ajaxStatusClass.prototype.shown=false;SUGAR.ajaxStatusClass.prototype.positionStatus=function(){this.statusDiv.style.top=document.body.scrollTop+8+'px';statusDivRegion=YAHOO.util.Dom.getRegion(this.statusDiv);statusDivWidth=statusDivRegion.right-statusDivRegion.left;this.statusDiv.style.left=YAHOO.util.Dom.getViewportWidth()/2-statusDivWidth/2+'px';} +SUGAR.ajaxStatusClass=function(){};SUGAR.ajaxStatusClass.prototype.statusDiv=null;SUGAR.ajaxStatusClass.prototype.oldOnScroll=null;SUGAR.ajaxStatusClass.prototype.shown=false;SUGAR.ajaxStatusClass.prototype.positionStatus=function(){this.statusDiv.style.top=document.body.scrollTop+8+'px';statusDivRegion=YAHOO.util.Dom.getRegion(this.statusDiv);statusDivWidth=statusDivRegion.right-statusDivRegion.left;this.statusDiv.style.left=YAHOO.util.Dom.getViewportWidth()/ 2-statusDivWidth / 2+'px';} SUGAR.ajaxStatusClass.prototype.createStatus=function(text){statusDiv=document.createElement('div');statusDiv.className='dataLabel';statusDiv.style.background='#ffffff';statusDiv.style.color='#c60c30';statusDiv.style.position='absolute';statusDiv.style.opacity=.8;statusDiv.style.filter='alpha(opacity=80)';statusDiv.id='ajaxStatusDiv';document.body.appendChild(statusDiv);this.statusDiv=document.getElementById('ajaxStatusDiv');} SUGAR.ajaxStatusClass.prototype.showStatus=function(text){if(!this.statusDiv){this.createStatus(text);} else{this.statusDiv.style.display='';} @@ -607,6 +607,8 @@ SUGAR.util.callOnChangeListers=function(field){var listeners=YAHOO.util.Event.ge SUGAR.util.closeActivityPanel={show:function(module,id,new_status,viewType,parentContainerId){if(SUGAR.util.closeActivityPanel.panel) SUGAR.util.closeActivityPanel.panel.destroy();var singleModule=SUGAR.language.get("app_list_strings","moduleListSingular")[module];singleModule=typeof(singleModule!='undefined')?singleModule.toLowerCase():'';var closeText=SUGAR.language.get("app_strings","LBL_CLOSE_ACTIVITY_CONFIRM").replace("#module#",singleModule);SUGAR.util.closeActivityPanel.panel=new YAHOO.widget.SimpleDialog("closeActivityDialog",{width:"300px",fixedcenter:true,visible:false,draggable:false,close:true,text:closeText,constraintoviewport:true,buttons:[{text:SUGAR.language.get("app_strings","LBL_EMAIL_OK"),handler:function(){if(SUGAR.util.closeActivityPanel.panel) SUGAR.util.closeActivityPanel.panel.hide();ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_SAVING'));var args="action=save&id="+id+"&record="+id+"&status="+new_status+"&module="+module;var callback={success:function(o) -{window.location.reload(true);},argument:{'parentContainerId':parentContainerId}};YAHOO.util.Connect.asyncRequest('POST','index.php',callback,args);},isDefault:true},{text:SUGAR.language.get("app_strings","LBL_EMAIL_CANCEL"),handler:function(){SUGAR.util.closeActivityPanel.panel.hide();}}]});SUGAR.util.closeActivityPanel.panel.setHeader(SUGAR.language.get("app_strings","LBL_CLOSE_ACTIVITY_HEADER"));SUGAR.util.closeActivityPanel.panel.render(document.body);SUGAR.util.closeActivityPanel.panel.show();}} +{window.setTimeout("window.location.reload(true);",0);},argument:{'parentContainerId':parentContainerId}};YAHOO.util.Connect.asyncRequest('POST','index.php',callback,args);},isDefault:true},{text:SUGAR.language.get("app_strings","LBL_EMAIL_CANCEL"),handler:function(){SUGAR.util.closeActivityPanel.panel.hide();}}]});SUGAR.util.closeActivityPanel.panel.setHeader(SUGAR.language.get("app_strings","LBL_CLOSE_ACTIVITY_HEADER"));SUGAR.util.closeActivityPanel.panel.render(document.body);SUGAR.util.closeActivityPanel.panel.show();}} SUGAR.util.setEmailPasswordDisplay=function(id,exists){link=document.getElementById(id+'_link');pwd=document.getElementById(id);if(!pwd||!link)return;if(exists){pwd.style.display='none';link.style.display='';}else{pwd.style.display='';link.style.display='none';}} -SUGAR.util.setEmailPasswordEdit=function(id){link=document.getElementById(id+'_link');pwd=document.getElementById(id);if(!pwd||!link)return;pwd.style.display='';link.style.display='none';} \ No newline at end of file +SUGAR.util.setEmailPasswordEdit=function(id){link=document.getElementById(id+'_link');pwd=document.getElementById(id);if(!pwd||!link)return;pwd.style.display='';link.style.display='none';} +SUGAR.util.validateFileExt=function(fileName,allowedTypes){var ext=fileName.split('.').pop();for(var i=allowedTypes.length;i>0;i--){if(ext===allowedTypes[i]){return true;}} +return false;} diff --git a/include/javascript/sugar_connection_event_listener.js b/include/javascript/sugar_connection_event_listener.js index 20fe9ef9..2780a7c9 100644 --- a/include/javascript/sugar_connection_event_listener.js +++ b/include/javascript/sugar_connection_event_listener.js @@ -34,4 +34,4 @@ ********************************************************************************/ SUGAR_callsInProgress=0;YAHOO.util.Connect.completeEvent.subscribe(function(event,data){SUGAR_callsInProgress--;if(SUGAR.util.isLoginPage(data[0].conn.responseText)) return false;});YAHOO.util.Connect.startEvent.subscribe(function(event,data) -{SUGAR_callsInProgress++;}); \ No newline at end of file +{SUGAR_callsInProgress++;}); diff --git a/include/javascript/sugar_grp1.js b/include/javascript/sugar_grp1.js index c2747888..6652c04a 100644 --- a/include/javascript/sugar_grp1.js +++ b/include/javascript/sugar_grp1.js @@ -34,7 +34,7 @@ ********************************************************************************/ if(typeof(SUGAR)=="undefined")SUGAR={};if(typeof(SUGAR.themes)=="undefined")SUGAR.themes={};SUGAR.sugarHome={};SUGAR.subpanelUtils={};SUGAR.ajaxStatusClass={};SUGAR.tabChooser={};SUGAR.util={};SUGAR.savedViews={};SUGAR.dashlets={};SUGAR.unifiedSearchAdvanced={};SUGAR.searchForm={};SUGAR.language={};SUGAR.Studio={};SUGAR.contextMenu={};SUGAR.config={};var nameIndex=0;var typeIndex=1;var requiredIndex=2;var msgIndex=3;var jstypeIndex=5;var minIndex=10;var maxIndex=11;var altMsgIndex=15;var compareToIndex=7;var arrIndex=12;var operatorIndex=13;var allowblank=8;var validate=new Array();var maxHours=24;var requiredTxt='Missing Required Field:' var invalidTxt='Invalid Value:' -var secondsSinceLoad=0;var inputsWithErrors=new Array();var tabsWithErrors=new Array();var lastSubmitTime=0;var alertList=new Array();var oldStartsWith='';function isSupportedIE(){var userAgent=navigator.userAgent.toLowerCase();if(userAgent.indexOf("msie")!=-1&&userAgent.indexOf("mac")==-1&&userAgent.indexOf("opera")==-1){var version=navigator.appVersion.match(/MSIE (.\..)/)[1];if(version>=5.5&&version<9){return true;}else{return false;}}} +var secondsSinceLoad=0;var inputsWithErrors=new Array();var tabsWithErrors=new Array();var lastSubmitTime=0;var alertList=new Array();var oldStartsWith='';function isSupportedIE(){var userAgent=navigator.userAgent.toLowerCase();if(userAgent.indexOf("msie")!=-1&&userAgent.indexOf("mac")==-1&&userAgent.indexOf("opera")==-1){var version=navigator.appVersion.match(/MSIE (.\..)/)[1];if(version>=5.5&&version<10){return true;}else{return false;}}} SUGAR.isIE=isSupportedIE();SUGAR.isIE7=(navigator.userAgent.toLowerCase().indexOf('msie 7')!=-1);var isSafari=(navigator.userAgent.toLowerCase().indexOf('safari')!=-1);RegExp.escape=function(text){if(!arguments.callee.sRE){var specials=['/','.','*','+','?','|','(',')','[',']','{','}','\\'];arguments.callee.sRE=new RegExp('(\\'+specials.join('|\\')+')','g');} return text.replace(arguments.callee.sRE,'\\$1');} function addAlert(type,name,subtitle,description,time,redirect){var addIndex=alertList.length;alertList[addIndex]=new Array();alertList[addIndex]['name']=name;alertList[addIndex]['type']=type;alertList[addIndex]['subtitle']=subtitle;alertList[addIndex]['description']=description.replace(/
/gi,"\n").replace(/&/gi,'&').replace(/</gi,'<').replace(/>/gi,'>').replace(/'/gi,'\'').replace(/"/gi,'"');alertList[addIndex]['time']=time;alertList[addIndex]['done']=0;alertList[addIndex]['redirect']=redirect;} @@ -122,7 +122,7 @@ return false return true} function isFloat(floatStr){if(floatStr.length==0){return true;} if(!(typeof(num_grp_sep)=='undefined'||typeof(dec_sep)=='undefined')){floatStr=unformatNumberNoParse(floatStr,num_grp_sep,dec_sep).toString();} -return/^(-)?[0-9\.]+$/.test(floatStr);} +return /^(-)?[0-9\.]+$/.test(floatStr);} function isDBName(str){if(str.length==0){return true;} if(!/^[a-zA-Z][a-zA-Z\_0-9]*$/.test(str)) return false @@ -143,7 +143,7 @@ return false;return validate_form(formname,'');} function add_error_style(formname,input,txt,flash){if(typeof flash=="undefined") flash=true;try{inputHandle=typeof input=="object"?input:document.forms[formname][input];style=get_current_bgcolor(inputHandle);if(txt.substring(txt.length-1)==':') txt=txt.substring(0,txt.length-1) -requiredTxt=SUGAR.language.get('app_strings','ERR_MISSING_REQUIRED_FIELDS');invalidTxt=SUGAR.language.get('app_strings','ERR_INVALID_VALUE');nomatchTxt=SUGAR.language.get('app_strings','ERR_SQS_NO_MATCH_FIELD');matchTxt=txt.replace(requiredTxt,'').replace(invalidTxt,'').replace(nomatchTxt,'');if(inputHandle.parentNode.innerHTML.search(matchTxt)==-1){errorTextNode=document.createElement('span');errorTextNode.className='required';errorTextNode.innerHTML='
'+txt;if(inputHandle.parentNode.className.indexOf('x-form-field-wrap')!=-1){inputHandle.parentNode.parentNode.appendChild(errorTextNode);} +requiredTxt=SUGAR.language.get('app_strings','ERR_MISSING_REQUIRED_FIELDS');invalidTxt=SUGAR.language.get('app_strings','ERR_INVALID_VALUE');nomatchTxt=SUGAR.language.get('app_strings','ERR_SQS_NO_MATCH_FIELD');matchTxt=txt.replace(requiredTxt,'').replace(invalidTxt,'').replace(nomatchTxt,'');if(inputHandle.parentNode.innerHTML.search(matchTxt)==-1){errorTextNode=document.createElement('div');errorTextNode.className='required';errorTextNode.innerHTML=txt;if(inputHandle.parentNode.className.indexOf('x-form-field-wrap')!=-1){inputHandle.parentNode.parentNode.appendChild(errorTextNode);} else{inputHandle.parentNode.appendChild(errorTextNode);} if(flash) inputHandle.style.backgroundColor="#FF0000";inputsWithErrors.push(inputHandle);} @@ -152,7 +152,7 @@ if(flash) if(typeof(window[formname+"_tabs"])!="undefined"){var tabView=window[formname+"_tabs"];var parentDiv=YAHOO.util.Dom.getAncestorByTagName(inputHandle,"div");if(tabView.get){var tabs=tabView.get("tabs");for(var i in tabs){if(tabs[i].get("contentEl")==parentDiv||YAHOO.util.Dom.isAncestor(tabs[i].get("contentEl"),inputHandle)) {tabs[i].get("labelEl").style.color="red";if(inputsWithErrors.length==1) tabView.selectTab(i);}}}} -window.setTimeout("inputsWithErrors["+(inputsWithErrors.length-1)+"].style.backgroundColor = null;",2000);}}catch(e){}} +window.setTimeout("inputsWithErrors["+(inputsWithErrors.length-1)+"].style.backgroundColor = '';",2000);}}catch(e){}} function clear_all_errors(){for(var wp=0;wp>4]+hexDigit[dec&15]);} -function fade_error_style(normalStyle,percent){errorStyle='c60c30';var r1=hex2dec(errorStyle.slice(0,2));var g1=hex2dec(errorStyle.slice(2,4));var b1=hex2dec(errorStyle.slice(4,6));var r2=hex2dec(normalStyle.slice(0,2));var g2=hex2dec(normalStyle.slice(2,4));var b2=hex2dec(normalStyle.slice(4,6));var pc=percent/100;r=Math.floor(r1+(pc*(r2-r1))+.5);g=Math.floor(g1+(pc*(g2-g1))+.5);b=Math.floor(b1+(pc*(b2-b1))+.5);for(var wp=0;wp2)return n.join('.');if(typeof round!='undefined'){if(round>0&&n.length>1){n[1]=parseFloat('0.'+n[1]);n[1]=Math.round(n[1]*Math.pow(10,round))/Math.pow(10,round);n[1]=n[1].toString().split('.')[1];} -if(round<=0){n[0]=Math.round(parseInt(n[0],10)*Math.pow(10,round))/Math.pow(10,round);n[1]='';}} +function formatNumber(n,num_grp_sep,dec_sep,round,precision){if(typeof num_grp_sep=='undefined'||typeof dec_sep=='undefined')return n;n=n?n.toString():'';if(n.split)n=n.split('.');else return n;if(n.length>2)return n.join('.');if(typeof round!='undefined'){if(round>0&&n.length>1){n[1]=parseFloat('0.'+n[1]);n[1]=Math.round(n[1]*Math.pow(10,round))/ Math.pow(10,round);n[1]=n[1].toString().split('.')[1];} +if(round<=0){n[0]=Math.round(parseInt(n[0],10)*Math.pow(10,round))/ Math.pow(10,round);n[1]='';}} if(typeof precision!='undefined'&&precision>=0){if(n.length>1&&typeof n[1]!='undefined')n[1]=n[1].substring(0,precision);else n[1]='';if(n[1].length1&&n[1]!=''?dec_sep+n[1]:'');} -SUGAR.ajaxStatusClass=function(){};SUGAR.ajaxStatusClass.prototype.statusDiv=null;SUGAR.ajaxStatusClass.prototype.oldOnScroll=null;SUGAR.ajaxStatusClass.prototype.shown=false;SUGAR.ajaxStatusClass.prototype.positionStatus=function(){this.statusDiv.style.top=document.body.scrollTop+8+'px';statusDivRegion=YAHOO.util.Dom.getRegion(this.statusDiv);statusDivWidth=statusDivRegion.right-statusDivRegion.left;this.statusDiv.style.left=YAHOO.util.Dom.getViewportWidth()/2-statusDivWidth/2+'px';} +SUGAR.ajaxStatusClass=function(){};SUGAR.ajaxStatusClass.prototype.statusDiv=null;SUGAR.ajaxStatusClass.prototype.oldOnScroll=null;SUGAR.ajaxStatusClass.prototype.shown=false;SUGAR.ajaxStatusClass.prototype.positionStatus=function(){this.statusDiv.style.top=document.body.scrollTop+8+'px';statusDivRegion=YAHOO.util.Dom.getRegion(this.statusDiv);statusDivWidth=statusDivRegion.right-statusDivRegion.left;this.statusDiv.style.left=YAHOO.util.Dom.getViewportWidth()/ 2-statusDivWidth / 2+'px';} SUGAR.ajaxStatusClass.prototype.createStatus=function(text){statusDiv=document.createElement('div');statusDiv.className='dataLabel';statusDiv.style.background='#ffffff';statusDiv.style.color='#c60c30';statusDiv.style.position='absolute';statusDiv.style.opacity=.8;statusDiv.style.filter='alpha(opacity=80)';statusDiv.id='ajaxStatusDiv';document.body.appendChild(statusDiv);this.statusDiv=document.getElementById('ajaxStatusDiv');} SUGAR.ajaxStatusClass.prototype.showStatus=function(text){if(!this.statusDiv){this.createStatus(text);} else{this.statusDiv.style.display='';} @@ -607,9 +607,12 @@ SUGAR.util.callOnChangeListers=function(field){var listeners=YAHOO.util.Event.ge SUGAR.util.closeActivityPanel={show:function(module,id,new_status,viewType,parentContainerId){if(SUGAR.util.closeActivityPanel.panel) SUGAR.util.closeActivityPanel.panel.destroy();var singleModule=SUGAR.language.get("app_list_strings","moduleListSingular")[module];singleModule=typeof(singleModule!='undefined')?singleModule.toLowerCase():'';var closeText=SUGAR.language.get("app_strings","LBL_CLOSE_ACTIVITY_CONFIRM").replace("#module#",singleModule);SUGAR.util.closeActivityPanel.panel=new YAHOO.widget.SimpleDialog("closeActivityDialog",{width:"300px",fixedcenter:true,visible:false,draggable:false,close:true,text:closeText,constraintoviewport:true,buttons:[{text:SUGAR.language.get("app_strings","LBL_EMAIL_OK"),handler:function(){if(SUGAR.util.closeActivityPanel.panel) SUGAR.util.closeActivityPanel.panel.hide();ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_SAVING'));var args="action=save&id="+id+"&record="+id+"&status="+new_status+"&module="+module;var callback={success:function(o) -{window.location.reload(true);},argument:{'parentContainerId':parentContainerId}};YAHOO.util.Connect.asyncRequest('POST','index.php',callback,args);},isDefault:true},{text:SUGAR.language.get("app_strings","LBL_EMAIL_CANCEL"),handler:function(){SUGAR.util.closeActivityPanel.panel.hide();}}]});SUGAR.util.closeActivityPanel.panel.setHeader(SUGAR.language.get("app_strings","LBL_CLOSE_ACTIVITY_HEADER"));SUGAR.util.closeActivityPanel.panel.render(document.body);SUGAR.util.closeActivityPanel.panel.show();}} +{window.setTimeout("window.location.reload(true);",0);},argument:{'parentContainerId':parentContainerId}};YAHOO.util.Connect.asyncRequest('POST','index.php',callback,args);},isDefault:true},{text:SUGAR.language.get("app_strings","LBL_EMAIL_CANCEL"),handler:function(){SUGAR.util.closeActivityPanel.panel.hide();}}]});SUGAR.util.closeActivityPanel.panel.setHeader(SUGAR.language.get("app_strings","LBL_CLOSE_ACTIVITY_HEADER"));SUGAR.util.closeActivityPanel.panel.render(document.body);SUGAR.util.closeActivityPanel.panel.show();}} SUGAR.util.setEmailPasswordDisplay=function(id,exists){link=document.getElementById(id+'_link');pwd=document.getElementById(id);if(!pwd||!link)return;if(exists){pwd.style.display='none';link.style.display='';}else{pwd.style.display='';link.style.display='none';}} -SUGAR.util.setEmailPasswordEdit=function(id){link=document.getElementById(id+'_link');pwd=document.getElementById(id);if(!pwd||!link)return;pwd.style.display='';link.style.display='none';}// End of File include/javascript/sugar_3.js +SUGAR.util.setEmailPasswordEdit=function(id){link=document.getElementById(id+'_link');pwd=document.getElementById(id);if(!pwd||!link)return;pwd.style.display='';link.style.display='none';} +SUGAR.util.validateFileExt=function(fileName,allowedTypes){var ext=fileName.split('.').pop();for(var i=allowedTypes.length;i>0;i--){if(ext===allowedTypes[i]){return true;}} +return false;} +// End of File include/javascript/sugar_3.js /********************************************************************************* * SugarCRM Community Edition is a customer relationship management program developed by @@ -666,7 +669,8 @@ while(end>-1){var cur=cookie.substring(0,end);cookie=cookie.substring(end+1,cook return cookies;} function subs_to_cookie(cookies){var cookie='';for(var i in cookies) {if(typeof(cookies[i])!="function"){cookie+=i+'='+cookies[i]+'#';}} -return cookie;}// End of File include/javascript/cookie.js +return cookie;} +// End of File include/javascript/cookie.js /********************************************************************************* * SugarCRM Community Edition is a customer relationship management program developed by @@ -752,7 +756,8 @@ objTop=objTop-y;if(x>(objLeft+obj.offsetWidth)||objLeft>(x+w));else if(objTop>h) function Is(){var agt=navigator.userAgent.toLowerCase();this.major=parseInt(navigator.appVersion);this.minor=parseFloat(navigator.appVersion);this.nav=((agt.indexOf('mozilla')!=-1)&&(agt.indexOf('spoofer')==-1)&&(agt.indexOf('compatible')==-1)&&(agt.indexOf('opera')==-1)&&(agt.indexOf('webtv')==-1)&&(agt.indexOf('hotjava')==-1));this.nav2=(this.nav&&(this.major==2));this.nav3=(this.nav&&(this.major==3));this.nav4=(this.nav&&(this.major==4));this.nav4up=(this.nav&&(this.major>=4));this.navonly=(this.nav&&((agt.indexOf(";nav")!=-1)||(agt.indexOf("; nav")!=-1)));this.nav6=(this.nav&&(this.major==5));this.nav6up=(this.nav&&(this.major>=5));this.gecko=(agt.indexOf('gecko')!=-1);this.nav7=(this.gecko&&(this.major>=5)&&(agt.indexOf('netscape/7')!=-1));this.moz1=false;this.moz1up=false;this.moz1_1=false;this.moz1_1up=false;if(this.nav6up){myRegEx=new RegExp("rv:\\d*.\\d*.\\d*");myFind=myRegEx.exec(agt);if(myFind!=null){var strVersion=myFind.toString();strVersion=strVersion.replace(/rv:/,'');var arrVersion=strVersion.split('.');var major=parseInt(arrVersion[0]);var minor=parseInt(arrVersion[1]);if(arrVersion[2])var revision=parseInt(arrVersion[2]);this.moz1=((major==1)&&(minor==0));this.moz1up=((major==1)&&(minor>=0));this.moz1_1=((major==1)&&(minor==1));this.moz1_1up=((major==1)&&(minor>=1));}} this.ie=((agt.indexOf("msie")!=-1)&&(agt.indexOf("opera")==-1));this.ie3=(this.ie&&(this.major<4));this.ie4=(this.ie&&(this.major==4)&&(agt.indexOf("msie 4")!=-1));this.ie4up=(this.ie&&(this.major>=4));this.ie5=(this.ie&&(this.major==4)&&(agt.indexOf("msie 5.0")!=-1));this.ie5_5=(this.ie&&(this.major==4)&&(agt.indexOf("msie 5.5")!=-1));this.ie5up=(this.ie&&!this.ie3&&!this.ie4);this.ie5_5up=(this.ie&&!this.ie3&&!this.ie4&&!this.ie5);this.ie6=(this.ie&&(this.major==4)&&(agt.indexOf("msie 6.")!=-1));this.ie6up=(this.ie&&!this.ie3&&!this.ie4&&!this.ie5&&!this.ie5_5);this.mac=(agt.indexOf("mac")!=-1);} function runPageLoadItems(){var myVar;checkBrowserWidth();} -var is=new Is();if(is.ie){document.write('');}// End of File include/javascript/menu.js +var is=new Is();if(is.ie){document.write('');} +// End of File include/javascript/menu.js /********************************************************************************* * SugarCRM Community Edition is a customer relationship management program developed by @@ -795,7 +800,7 @@ Calendar=function(){};Calendar.getHighestZIndex=function(containerEl) return(highestIndex==Number.MAX_VALUE)?Number.MAX_VALUE:highestIndex+1;};Calendar.setup=function(params){YAHOO.util.Event.onDOMReady(function(){var Event=YAHOO.util.Event;var Dom=YAHOO.util.Dom;var dialog;var calendar;var showButton=params.button?params.button:params.buttonObj;var userDateFormat=params.ifFormat?params.ifFormat:(params.daFormat?params.daFormat:"m/d/Y");var inputField=params.inputField?params.inputField:params.inputFieldObj;var dateFormat=userDateFormat.substr(0,10);var date_field_delimiter=/([-.\\/])/.exec(dateFormat)[0];dateFormat=dateFormat.replace(/[^a-zA-Z]/g,'');var monthPos=dateFormat.search(/m/);var dayPos=dateFormat.search(/d/);var yearPos=dateFormat.search(/Y/);Event.on(Dom.get(showButton),"click",function(){if(!dialog){dialog=new YAHOO.widget.SimpleDialog("container_"+showButton,{visible:false,context:[showButton,"tl","bl"],buttons:[],draggable:false,close:true,zIndex:Calendar.getHighestZIndex(document.body)});dialog.setHeader(SUGAR.language.get('app_strings','LBL_MASSUPDATE_DATE'));var dialogBody='

'+SUGAR.language.get('app_strings','LBL_EMAIL_DATE_TODAY')+'

';dialog.setBody(dialogBody);dialog.render(document.body);Dom.addClass("container_"+showButton,"cal_panel");Event.addListener("callnav_today","click",function(){calendar.clear();var now=new Date();Dom.get(inputField).value=formatSelectedDate(now);var cellIndex=calendar.getCellIndex(now);if(cellIndex>-1) {var cell=calendar.cells[cellIndex];Dom.addClass(cell,calendar.Style.CSS_CELL_SELECTED);}});dialog.showEvent.subscribe(function(){if(YAHOO.env.ua.ie){dialog.fireEvent("changeContent");}});Event.on(document,"click",function(e){if(!dialog) {return;} -var el=Event.getTarget(e);var dialogEl=dialog.element;if(el!=dialogEl&&!Dom.isAncestor(dialogEl,el)&&el!=Dom.get(showButton)&&!Dom.isAncestor(Dom.get(showButton),el)){dialog.hide();calendar=null;dialog=null;}});} +var el=Event.getTarget(e);var dialogEl=dialog.element;if(el!=dialogEl&&!Dom.isAncestor(dialogEl,el)&&el!=Dom.get(showButton)&&!Dom.isAncestor(Dom.get(showButton),el)){dialog.hide();}});} if(!calendar){var navConfig={strings:{month:SUGAR.language.get('app_strings','LBL_CHOOSE_MONTH'),year:SUGAR.language.get('app_strings','LBL_ENTER_YEAR'),submit:SUGAR.language.get('app_strings','LBL_EMAIL_OK'),cancel:SUGAR.language.get('app_strings','LBL_CANCEL_BUTTON_LABEL'),invalidYear:SUGAR.language.get('app_strings','LBL_ENTER_VALID_YEAR')},monthFormat:YAHOO.widget.Calendar.SHORT,initialFocus:"year"};calendar=new YAHOO.widget.Calendar(showButton+'_div',{iframe:false,hide_blank_weeks:true,navigator:navConfig});calendar.cfg.setProperty('DATE_FIELD_DELIMITER',date_field_delimiter);calendar.cfg.setProperty('MDY_DAY_POSITION',dayPos+1);calendar.cfg.setProperty('MDY_MONTH_POSITION',monthPos+1);calendar.cfg.setProperty('MDY_YEAR_POSITION',yearPos+1);if(typeof SUGAR.language.languages['app_list_strings']!='undefined'&&SUGAR.language.languages['app_list_strings']['dom_cal_month_long']!='undefined') {if(SUGAR.language.languages['app_list_strings']['dom_cal_month_long'].length==13) {SUGAR.language.languages['app_list_strings']['dom_cal_month_long'].shift();} @@ -829,10 +834,12 @@ else {selDate+=date_field_delimiter+yearVal;} return selDate;};calendar.selectEvent.subscribe(function(){var input=Dom.get(inputField);if(calendar.getSelectedDates().length>0){input.value=formatSelectedDate(calendar.getSelectedDates()[0]);if(params.comboObject) {params.comboObject.update();}}else{input.value="";} -dialog.hide();SUGAR.util.callOnChangeListers(input);});calendar.renderEvent.subscribe(function(){dialog.fireEvent("changeContent");});} +if(input.onchange) +input.onchange();dialog.hide();SUGAR.util.callOnChangeListers(input);});calendar.renderEvent.subscribe(function(){dialog.fireEvent("changeContent");});} var seldate=calendar.getSelectedDates();if(Dom.get(inputField).value.length>0){val=new Date(Dom.get(inputField).value);if(!isNaN(val.getTime())) {calendar.cfg.setProperty("selected",Dom.get(inputField).value);seldate=Dom.get(inputField).value.split(date_field_delimiter);calendar.cfg.setProperty("pagedate",seldate[monthPos]+calendar.cfg.getProperty("DATE_FIELD_DELIMITER")+seldate[yearPos]);}}else if(seldate.length>0){calendar.cfg.setProperty("selected",seldate[0]);var month=seldate[0].getMonth()+1;var year=seldate[0].getFullYear();calendar.cfg.setProperty("pagedate",month+calendar.cfg.getProperty("DATE_FIELD_DELIMITER")+year);} -calendar.render();dialog.show();});});};// End of File include/javascript/calendar.js +calendar.render();dialog.show();});});}; +// End of File include/javascript/calendar.js JSON=YAHOO.lang.JSON;SUGAR.quickCompose={};SUGAR.quickCompose=function(){return{parentPanel:null,dceMenuPanel:null,options:null,loadingMessgPanl:null,frameLoaded:false,resourcesLoaded:false,tinyLoaded:false,initComposePackage:function(c) @@ -855,17 +862,18 @@ if(!dce_mode){SQ.parentPanel.center();}},init:function(o){if(typeof o.menu_id!=' loadingMessgPanl=new YAHOO.widget.SimpleDialog('loading',{width:'200px',close:true,modal:true,visible:true,fixedcenter:true,constraintoviewport:true,draggable:false});loadingMessgPanl.setHeader(SUGAR.language.get('app_strings','LBL_EMAIL_PERFORMING_TASK'));loadingMessgPanl.setBody(SUGAR.language.get('app_strings','LBL_EMAIL_ONE_MOMENT'));loadingMessgPanl.render(document.body);loadingMessgPanl.show();if(!SUGAR.quickCompose.resourcesLoaded) this.loadResources(o);else this.initUI(o);},loadResources:function(o) -{window.skipTinyMCEInitPhase=true;var require=["layout","element","tabview","menu","cookie","tinymce","securejson","sugarwidgets","sugarquickcompose","sugarquickcomposecss"];var loader=new YAHOO.util.YUILoader({require:require,loadOptional:true,skin:{base:'blank',defaultSkin:''},data:o,onSuccess:this.initComposePackage,allowRollup:true,base:"include/javascript/yui/build/"});loader.addModule({name:"tinymce",type:"js",varName:"TinyMCE",fullpath:"include/javascript/tiny_mce/tiny_mce.js"});loader.addModule({name:"securejson",type:"js",varName:"JSON",fullpath:"include/JSON.js"});loader.addModule({name:"sugarwidgets",type:"js",fullpath:"include/javascript/sugarwidgets/SugarYUIWidgets.js",varName:"YAHOO.SUGAR",requires:["datatable","dragdrop","treeview","tabview"]});loader.addModule({name:"sugarquickcompose",type:"js",varName:"SUGAR.email2.complexLayout",requires:["layout","sugarwidgets","tinymce"],fullpath:"include/javascript/sugar_grp_quickcomp.js"});loader.addModule({name:"sugarquickcomposecss",type:"css",fullpath:"modules/Emails/EmailUI.css"});loader.insert();}};}();// End of File include/javascript/quickCompose.js +{window.skipTinyMCEInitPhase=true;var require=["layout","element","tabview","menu","cookie","tinymce","sugarwidgets","sugarquickcompose","sugarquickcomposecss"];var loader=new YAHOO.util.YUILoader({require:require,loadOptional:true,skin:{base:'blank',defaultSkin:''},data:o,onSuccess:this.initComposePackage,allowRollup:true,base:"include/javascript/yui/build/"});loader.addModule({name:"tinymce",type:"js",varName:"TinyMCE",fullpath:"include/javascript/tiny_mce/tiny_mce.js"});loader.addModule({name:"sugarwidgets",type:"js",fullpath:"include/javascript/sugarwidgets/SugarYUIWidgets.js",varName:"YAHOO.SUGAR",requires:["datatable","dragdrop","treeview","tabview"]});loader.addModule({name:"sugarquickcompose",type:"js",varName:"SUGAR.email2.complexLayout",requires:["layout","sugarwidgets","tinymce"],fullpath:"include/javascript/sugar_grp_quickcomp.js"});loader.addModule({name:"sugarquickcomposecss",type:"css",fullpath:"modules/Emails/EmailUI.css"});loader.insert();}};}(); +// End of File include/javascript/quickCompose.js /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C0)?B.dump(I[K],N-1):Q);}else{P.push(I[K]);}P.push(O);}if(P.length>1){P.pop();}P.push("]");}else{P.push("{");for(K in I){if(B.hasOwnProperty(I,K)){P.push(K+L);if(B.isObject(I[K])){P.push((N>0)?B.dump(I[K],N-1):Q);}else{P.push(I[K]);}P.push(O);}}if(P.length>1){P.pop();}P.push("}");}return P.join("");},substitute:function(Y,J,R){var N,M,L,U,V,X,T=[],K,O="dump",S=" ",I="{",W="}",Q,P;for(;;){N=Y.lastIndexOf(I);if(N<0){break;}M=Y.indexOf(W,N);if(N+1>=M){break;}K=Y.substring(N+1,M);U=K;X=null;L=U.indexOf(S);if(L>-1){X=U.substring(L+1);U=U.substring(0,L);}V=J[U];if(R){V=R(U,V,X);}if(B.isObject(V)){if(B.isArray(V)){V=B.dump(V,parseInt(X,10));}else{X=X||"";Q=X.indexOf(O);if(Q>-1){X=X.substring(4);}P=V.toString();if(P===G||Q>-1){V=B.dump(V,parseInt(X,10));}else{V=P;}}}else{if(!B.isString(V)&&!B.isNumber(V)){V="~-"+T.length+"-~";T[T.length]=K;}}Y=Y.substring(0,N)+V+Y.substring(M+1);}for(N=T.length-1;N>=0;N=N-1){Y=Y.replace(new RegExp("~-"+N+"-~"),"{"+T[N]+"}","g");}return Y;},trim:function(I){try{return I.replace(/^\s+|\s+$/g,"");}catch(J){return I;}},merge:function(){var L={},J=arguments,I=J.length,K;for(K=0;K=420){X.addEventListener("load",function(){a(W,U);});}else{var T=M[W];if(T.varName){var V=YAHOO.util.Get.POLL_FREQ;T.maxattempts=YAHOO.util.Get.TIMEOUT/V;T.attempts=0;T._cache=T.varName[0].split(".");T.timer=S.later(V,T,function(j){var f=this._cache,e=f.length,d=this.win,g;for(g=0;gthis.maxattempts){var h="Over retry limit, giving up";T.timer.cancel();Q(W,h);}else{}return;}}T.timer.cancel();a(W,U);},null,true);}else{S.later(YAHOO.util.Get.POLL_FREQ,null,a,[W,U]);}}}}else{X.onload=function(){a(W,U);};}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(T){S.later(0,null,C,T);},abort:function(U){var V=(S.isString(U))?U:U.tId;var T=M[V];if(T){T.aborted=true;}},script:function(T,U){return H("script",T,U);},css:function(T,U){return H("css",T,U);}};}();YAHOO.register("get",YAHOO.util.Get,{version:"2.8.0r4",build:"2449"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env,PROV="_provides",SUPER="_supersedes",REQ="expanded",AFTER="_after";var YUI={dupsAllowed:{"yahoo":true,"get":true},info:{"root":"2.8.0r4/build/","base":"http://yui.yahooapis.com/2.8.0r4/build/","comboBase":"http://yui.yahooapis.com/combo?","skin":{"defaultSkin":"sam","base":"assets/skins/","path":"skin.css","after":["reset","fonts","grids","base"],"rollup":3},dupsAllowed:["yahoo","get"],"moduleInfo":{"animation":{"type":"js","path":"animation/animation-min.js","requires":["dom","event"]},"autocomplete":{"type":"js","path":"autocomplete/autocomplete-min.js","requires":["dom","event","datasource"],"optional":["connection","animation"],"skinnable":true},"base":{"type":"css","path":"base/base-min.css","after":["reset","fonts","grids"]},"button":{"type":"js","path":"button/button-min.js","requires":["element"],"optional":["menu"],"skinnable":true},"calendar":{"type":"js","path":"calendar/calendar-min.js","requires":["event","dom"],supersedes:["datemeth"],"skinnable":true},"carousel":{"type":"js","path":"carousel/carousel-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"charts":{"type":"js","path":"charts/charts-min.js","requires":["element","json","datasource","swf"]},"colorpicker":{"type":"js","path":"colorpicker/colorpicker-min.js","requires":["slider","element"],"optional":["animation"],"skinnable":true},"connection":{"type":"js","path":"connection/connection-min.js","requires":["event"],"supersedes":["connectioncore"]},"connectioncore":{"type":"js","path":"connection/connection_core-min.js","requires":["event"],"pkg":"connection"},"container":{"type":"js","path":"container/container-min.js","requires":["dom","event"],"optional":["dragdrop","animation","connection"],"supersedes":["containercore"],"skinnable":true},"containercore":{"type":"js","path":"container/container_core-min.js","requires":["dom","event"],"pkg":"container"},"cookie":{"type":"js","path":"cookie/cookie-min.js","requires":["yahoo"]},"datasource":{"type":"js","path":"datasource/datasource-min.js","requires":["event"],"optional":["connection"]},"datatable":{"type":"js","path":"datatable/datatable-min.js","requires":["element","datasource"],"optional":["calendar","dragdrop","paginator"],"skinnable":true},datemath:{"type":"js","path":"datemath/datemath-min.js","requires":["yahoo"]},"dom":{"type":"js","path":"dom/dom-min.js","requires":["yahoo"]},"dragdrop":{"type":"js","path":"dragdrop/dragdrop-min.js","requires":["dom","event"]},"editor":{"type":"js","path":"editor/editor-min.js","requires":["menu","element","button"],"optional":["animation","dragdrop"],"supersedes":["simpleeditor"],"skinnable":true},"element":{"type":"js","path":"element/element-min.js","requires":["dom","event"],"optional":["event-mouseenter","event-delegate"]},"element-delegate":{"type":"js","path":"element-delegate/element-delegate-min.js","requires":["element"]},"event":{"type":"js","path":"event/event-min.js","requires":["yahoo"]},"event-simulate":{"type":"js","path":"event-simulate/event-simulate-min.js","requires":["event"]},"event-delegate":{"type":"js","path":"event-delegate/event-delegate-min.js","requires":["event"],"optional":["selector"]},"event-mouseenter":{"type":"js","path":"event-mouseenter/event-mouseenter-min.js","requires":["dom","event"]},"fonts":{"type":"css","path":"fonts/fonts-min.css"},"get":{"type":"js","path":"get/get-min.js","requires":["yahoo"]},"grids":{"type":"css","path":"grids/grids-min.css","requires":["fonts"],"optional":["reset"]},"history":{"type":"js","path":"history/history-min.js","requires":["event"]},"imagecropper":{"type":"js","path":"imagecropper/imagecropper-min.js","requires":["dragdrop","element","resize"],"skinnable":true},"imageloader":{"type":"js","path":"imageloader/imageloader-min.js","requires":["event","dom"]},"json":{"type":"js","path":"json/json-min.js","requires":["yahoo"]},"layout":{"type":"js","path":"layout/layout-min.js","requires":["element"],"optional":["animation","dragdrop","resize","selector"],"skinnable":true},"logger":{"type":"js","path":"logger/logger-min.js","requires":["event","dom"],"optional":["dragdrop"],"skinnable":true},"menu":{"type":"js","path":"menu/menu-min.js","requires":["containercore"],"skinnable":true},"paginator":{"type":"js","path":"paginator/paginator-min.js","requires":["element"],"skinnable":true},"profiler":{"type":"js","path":"profiler/profiler-min.js","requires":["yahoo"]},"profilerviewer":{"type":"js","path":"profilerviewer/profilerviewer-min.js","requires":["profiler","yuiloader","element"],"skinnable":true},"progressbar":{"type":"js","path":"progressbar/progressbar-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"reset":{"type":"css","path":"reset/reset-min.css"},"reset-fonts-grids":{"type":"css","path":"reset-fonts-grids/reset-fonts-grids.css","supersedes":["reset","fonts","grids","reset-fonts"],"rollup":4},"reset-fonts":{"type":"css","path":"reset-fonts/reset-fonts.css","supersedes":["reset","fonts"],"rollup":2},"resize":{"type":"js","path":"resize/resize-min.js","requires":["dragdrop","element"],"optional":["animation"],"skinnable":true},"selector":{"type":"js","path":"selector/selector-min.js","requires":["yahoo","dom"]},"simpleeditor":{"type":"js","path":"editor/simpleeditor-min.js","requires":["element"],"optional":["containercore","menu","button","animation","dragdrop"],"skinnable":true,"pkg":"editor"},"slider":{"type":"js","path":"slider/slider-min.js","requires":["dragdrop"],"optional":["animation"],"skinnable":true},"storage":{"type":"js","path":"storage/storage-min.js","requires":["yahoo","event","cookie"],"optional":["swfstore"]},"stylesheet":{"type":"js","path":"stylesheet/stylesheet-min.js","requires":["yahoo"]},"swf":{"type":"js","path":"swf/swf-min.js","requires":["element"],"supersedes":["swfdetect"]},"swfdetect":{"type":"js","path":"swfdetect/swfdetect-min.js","requires":["yahoo"]},"swfstore":{"type":"js","path":"swfstore/swfstore-min.js","requires":["element","cookie","swf"]},"tabview":{"type":"js","path":"tabview/tabview-min.js","requires":["element"],"optional":["connection"],"skinnable":true},"treeview":{"type":"js","path":"treeview/treeview-min.js","requires":["event","dom"],"optional":["json","animation","calendar"],"skinnable":true},"uploader":{"type":"js","path":"uploader/uploader-min.js","requires":["element"]},"utilities":{"type":"js","path":"utilities/utilities.js","supersedes":["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event","get","yuiloader","yuiloader-dom-event"],"rollup":8},"yahoo":{"type":"js","path":"yahoo/yahoo-min.js"},"yahoo-dom-event":{"type":"js","path":"yahoo-dom-event/yahoo-dom-event.js","supersedes":["yahoo","event","dom"],"rollup":3},"yuiloader":{"type":"js","path":"yuiloader/yuiloader-min.js","supersedes":["yahoo","get"]},"yuiloader-dom-event":{"type":"js","path":"yuiloader-dom-event/yuiloader-dom-event.js","supersedes":["yahoo","dom","event","get","yuiloader","yahoo-dom-event"],"rollup":5},"yuitest":{"type":"js","path":"yuitest/yuitest-min.js","requires":["logger"],"optional":["event-simulate"],"skinnable":true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0; -i=m.rollup);if(roll){break;}}}}}else{for(j=0;j=m.rollup);if(roll){break;}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m);}}}if(!rolled){break;}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i];}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(lang.hasOwnProperty(r,j)){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j];}}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j-1){return true;}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true;}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true;}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;iistartLen){YAHOO.util.Get.script(self._filter(js),{data:self._loading,onSuccess:callback,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,timeout:self.timeout,scope:self});}};if(css.length>startLen){YAHOO.util.Get.css(this._filter(css),{data:this._loading,onSuccess:loadScript,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,scope:self});}else{loadScript();}return;}else{this.loadNext(this._loading);}},insert:function(o,type){this.calculate(o);this._loading=true;this.loadType=type;if(this.combine){return this._combine();}if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js");};this.insert(null,"css");return;}this.loadNext();},sandbox:function(o,type){this._config(o);if(!this.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox");}this._sandbox=true;var self=this;if(!type||type!=="js"){this._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js");};this.insert(null,"css");return;}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:this.base,filter:this.filter,require:"connection",insertBefore:this.insertBefore,charset:this.charset,onSuccess:function(){this.sandbox(null,"js");},scope:this},"js");return;}this._scriptText=[];this._loadCount=0;this._stopCount=this.sorted.length;this._xhr=[];this.calculate();var s=this.sorted,l=s.length,i,m,url;for(i=0;i=this._stopCount){var v=this.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+this._scriptText.join("\n")+b);this._pushEvents(ref);if(ref){this.onSuccess.call(this.scope,{reference:ref,data:this.data});}else{this._onFailure.call(this.varName+" reference failure");}}},failure:function(o){this.onFailure.call(this.scope,{msg:"XHR failure",xhrResponse:o,data:this.data});},scope:this,argument:[i,url,s[i]]};this._xhr.push(util.Connect.asyncRequest("GET",url,xhrData));}},loadNext:function(mname){if(!this._loading){return;}if(mname){if(mname!==this._loading){return;}this.inserted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data});}}var s=this.sorted,len=s.length,i,m;for(i=0;i":">",'"':""","'":"'","/":"/","`":"`"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j; +}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m=420){z.addEventListener("load",function(){YAHOO.log(x+" DOM2 onload "+u,"info","Get");F(x,u);});}else{t=m[x];if(t.varName){v=YAHOO.util.Get.POLL_FREQ;YAHOO.log("Polling for "+t.varName[0]);t.maxattempts=YAHOO.util.Get.TIMEOUT/v;t.attempts=0;t._cache=t.varName[0].split(".");t.timer=s.later(v,t,function(w){I=this._cache;A=I.length;J=this.win;for(C=0;Cthis.maxattempts){y="Over retry limit, giving up";t.timer.cancel();q(x,y);}else{YAHOO.log(I[C]+" failed, retrying");}return;}}YAHOO.log("Safari poll complete");t.timer.cancel();F(x,u);},null,true);}else{s.later(YAHOO.util.Get.POLL_FREQ,null,F,[x,u]);}}}}else{z.onload=function(){YAHOO.log(x+" onload "+u,"info","Get");F(x,u);};}}};q=function(w,v){YAHOO.log("get failure: "+v,"warn","Get");var u=m[w],t;if(u.onFailure){t=u.scope||u.win;u.onFailure.call(t,a(u,v));}};d=function(z){if(m[z]){var t=m[z],u=t.nodes,x=u.length,C=t.win.document,A=C.getElementsByTagName("head")[0],v,y,w,B;if(t.insertBefore){v=b(t.insertBefore,z);if(v){A=v.parentNode;}}for(y=0;y=m.rollup);if(roll){break;}}}}}else{for(j=0;j=m.rollup);if(roll){break;}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m);}}}if(!rolled){break;}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i];}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(lang.hasOwnProperty(r,j)){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j];}}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j-1){return true;}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true;}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true;}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;iistartLen){YAHOO.util.Get.script(self._filter(js),{data:self._loading,onSuccess:callback,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,timeout:self.timeout,scope:self});}else{this.loadNext();}};if(css.length>startLen){YAHOO.util.Get.css(this._filter(css),{data:this._loading,onSuccess:loadScript,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,scope:self});}else{loadScript();}return;}else{this.loadNext(this._loading);}},insert:function(o,type){this.calculate(o);this._loading=true;this.loadType=type;if(this.combine){return this._combine();}if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js");};this.insert(null,"css");return;}this.loadNext();},sandbox:function(o,type){var self=this,success=function(o){var idx=o.argument[0],name=o.argument[2];self._scriptText[idx]=o.responseText;if(self.onProgress){self.onProgress.call(self.scope,{name:name,scriptText:o.responseText,xhrResponse:o,data:self.data});}self._loadCount++;if(self._loadCount>=self._stopCount){var v=self.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+self._scriptText.join("\n")+b);self._pushEvents(ref);if(ref){self.onSuccess.call(self.scope,{reference:ref,data:self.data});}else{self._onFailure.call(self.varName+" reference failure");}}},failure=function(o){self.onFailure.call(self.scope,{msg:"XHR failure",xhrResponse:o,data:self.data});};self._config(o);if(!self.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox");}self._sandbox=true;if(!type||type!=="js"){self._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js");};self.insert(null,"css");return;}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:self.base,filter:self.filter,require:"connection",insertBefore:self.insertBefore,charset:self.charset,onSuccess:function(){self.sandbox(null,"js");},scope:self},"js");return;}self._scriptText=[];self._loadCount=0;self._stopCount=self.sorted.length;self._xhr=[];self.calculate();var s=self.sorted,l=s.length,i,m,url;for(i=0;i-1){q="3.2.0";}p={applyConfig:function(D){D=D||l;var y,A,z=this.config,B=z.modules,x=z.groups,C=z.rls,w=this.Env._loader;for(A in D){if(D.hasOwnProperty(A)){y=D[A];if(B&&A=="modules"){o(B,y);}else{if(x&&A=="groups"){o(x,y);}else{if(C&&A=="rls"){o(C,y);}else{if(A=="win"){z[A]=y.contentWindow||y;z.doc=z[A].document;}else{if(A=="_yuid"){}else{z[A]=y;}}}}}}}if(w){w._config(D);}},_config:function(w){this.applyConfig(w);},_init:function(){var y,z=this,w=YUI.Env,x=z.Env,A;z.version=q;if(!x){z.Env={mods:{},versions:{},base:n,cdn:n+q+"/build/",_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_guidp:"y",_loaded:{},serviced:{},getBase:w&&w.getBase||function(G,F){var B,C,E,H,D;C=(v&&v.getElementsByTagName("script"))||[];for(E=0;E-1){y=y.substr(0,D);}}D=H.match(F);if(D&&D[3]){B=D[1]+D[3];}break;}}}return B||x.cdn;}};x=z.Env;x._loaded[q]={};if(w&&z!==YUI){x._yidx=++w._yidx;x._guidp=("yui_"+q+"_"+x._yidx+"_"+i).replace(/\./g,"_");}else{if(YUI._YUI){w=YUI._YUI.Env;x._yidx+=w._yidx;x._uidx+=w._uidx;for(A in w){if(!(A in x)){x[A]=w[A];}}delete YUI._YUI;}}z.id=z.stamp(z);c[z.id]=z;}z.constructor=YUI;z.config=z.config||{win:e,doc:v,debug:true,useBrowserConsole:true,throwFail:true,bootstrap:true,cacheUse:true,fetchCSS:true};z.config.base=YUI.config.base||z.Env.getBase(/^(.*)yui\/yui([\.\-].*)js(\?.*)?$/,/^(.*\?)(.*\&)(.*)yui\/yui[\.\-].*js(\?.*)?$/);if(!y||(!("-min.-debug.").indexOf(y))){y="-min.";}z.config.loaderPath=YUI.config.loaderPath||"loader/loader"+(y||"-min.")+"js";},_setup:function(B){var x,A=this,w=[],z=YUI.Env.mods,y=A.config.core||["get","rls","intl-base","loader","yui-log","yui-later","yui-throttle"];for(x=0;xH)?F[H]:true;}return J;};l.indexOf=(u.indexOf)?function(E,F){return u.indexOf.call(E,F);}:function(E,G){for(var F=0;F1)?Array.prototype.join.call(arguments,o):I;if(!(H in E)||(F&&E[H]==F)){E[H]=G.apply(G,arguments);}return E[H];};};var q=function(){},h=function(E){q.prototype=E;return new q();},j=function(F,E){return F&&F.hasOwnProperty&&F.hasOwnProperty(E);},v,d=function(I,H){var G=(H===2),E=(G)?0:[],F;for(F in I){if(j(I,F)){if(G){E++;}else{E.push((H)?I[F]:F);}}}return E;};c.Object=h;h.keys=function(E){return d(E);};h.values=function(E){return d(E,1);};h.size=Object.size||function(E){return d(E,2);};h.hasKey=j;h.hasValue=function(F,E){return(c.Array.indexOf(h.values(F),E)>-1);};h.owns=j;h.each=function(I,H,J,G){var F=J||c,E;for(E in I){if(G||j(I,E)){H.call(F,I[E],E,I);}}return c;};h.some=function(I,H,J,G){var F=J||c,E;for(E in I){if(G||j(I,E)){if(H.call(F,I[E],E,I)){return true;}}}return false;};h.getValue=function(I,H){if(!c.Lang.isObject(I)){return v;}var F,G=c.Array(H),E=G.length;for(F=0;I!==v&&F=0){for(E=0;F!==v&&E0){c=d(j);if(c){return c;}else{e=j.lastIndexOf("-");if(e>=0){j=j.substring(0,e);if(e>=2&&j.charAt(e-2)==="-"){j=j.substring(0,e-2);}}else{break;}}}}return"";}});},"3.3.0",{requires:["yui-base"]});YUI.add("yui-log",function(d){var c=d,e="yui:log",a="undefined",b={debug:1,info:1,warn:1,error:1};c.log=function(j,s,g,q){var l,p,n,k,o,i=c,r=i.config,h=(i.fire)?i:YUI.Env.globalEvents;if(r.debug){if(g){p=r.logExclude;n=r.logInclude;if(n&&!(g in n)){l=1;}else{if(p&&(g in p)){l=1;}}}if(!l){if(r.useBrowserConsole){k=(g)?g+": "+j:j;if(i.Lang.isFunction(r.logFn)){r.logFn.call(i,j,s,g);}else{if(typeof console!=a&&console.log){o=(s&&console[s]&&(s in b))?s:"log";console[o](k);}else{if(typeof opera!=a){opera.postError(k);}}}}if(h&&!q){if(h==i&&(!h.getEvent(e))){h.publish(e,{broadcast:2});}h.fire(e,{msg:j,cat:s,src:g});}}}return i;};c.message=function(){return c.log.apply(c,arguments);};},"3.3.0",{requires:["yui-base"]});YUI.add("yui-later",function(a){a.later=function(c,i,d,h,g){c=c||0;var b=d,e,j;if(i&&a.Lang.isString(d)){b=i[d];}e=!a.Lang.isUndefined(h)?function(){b.apply(i,a.Array(h));}:function(){b.call(i);};j=(g)?setInterval(e,c):setTimeout(e,c);return{id:j,interval:g,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};};a.Lang.later=a.later;},"3.3.0",{requires:["yui-base"]});YUI.add("yui-throttle",function(a){a.throttle=function(c,b){b=(b)?b:(a.config.throttleTime||150);if(b===-1){return(function(){c.apply(null,arguments);});}var d=a.Lang.now();return(function(){var e=a.Lang.now();if(e-d>b){d=e;c.apply(null,arguments);}});};},"3.3.0",{requires:["yui-base"]});YUI.add("yui",function(a){},"3.3.0",{use:["yui-base","get","features","rls","intl-base","yui-log","yui-later","yui-throttle"]}); +// End of File include/javascript/yui3/build/yui/yui-min.js + +/* +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C0)?B.dump(I[K],N-1):Q);}else{P.push(I[K]);}P.push(O);}if(P.length>1){P.pop();}P.push("]");}else{P.push("{");for(K in I){if(B.hasOwnProperty(I,K)){P.push(K+L);if(B.isObject(I[K])){P.push((N>0)?B.dump(I[K],N-1):Q);}else{P.push(I[K]);}P.push(O);}}if(P.length>1){P.pop();}P.push("}");}return P.join("");},substitute:function(Y,J,R){var N,M,L,U,V,X,T=[],K,O="dump",S=" ",I="{",W="}",Q,P;for(;;){N=Y.lastIndexOf(I);if(N<0){break;}M=Y.indexOf(W,N);if(N+1>=M){break;}K=Y.substring(N+1,M);U=K;X=null;L=U.indexOf(S);if(L>-1){X=U.substring(L+1);U=U.substring(0,L);}V=J[U];if(R){V=R(U,V,X);}if(B.isObject(V)){if(B.isArray(V)){V=B.dump(V,parseInt(X,10));}else{X=X||"";Q=X.indexOf(O);if(Q>-1){X=X.substring(4);}P=V.toString();if(P===G||Q>-1){V=B.dump(V,parseInt(X,10));}else{V=P;}}}else{if(!B.isString(V)&&!B.isNumber(V)){V="~-"+T.length+"-~";T[T.length]=K;}}Y=Y.substring(0,N)+V+Y.substring(M+1);}for(N=T.length-1;N>=0;N=N-1){Y=Y.replace(new RegExp("~-"+N+"-~"),"{"+T[N]+"}","g");}return Y;},trim:function(I){try{return I.replace(/^\s+|\s+$/g,"");}catch(J){return I;}},merge:function(){var L={},J=arguments,I=J.length,K;for(K=0;K":">",'"':""","'":"'","/":"/","`":"`"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j; +}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m519)?true:false);while((G=G[u])){z[0]+=G[b];z[1]+=G[P];if(AC){z=E.Dom._calcBorders(G,z);}}if(E.Dom._getStyle(y,p)!==f){G=y;while((G=G[Z])&&G[C]){AA=G[i];AB=G[O];if(H&&(E.Dom._getStyle(G,"overflow")!=="visible")){z=E.Dom._calcBorders(G,z);}if(AA||AB){z[0]-=AB;z[1]-=AA;}}z[0]+=x;z[1]+=Y;}else{if(D){z[0]-=x;z[1]-=Y;}else{if(I||H){z[0]+=x;z[1]+=Y;}}}z[0]=Math.floor(z[0]);z[1]=Math.floor(z[1]);}else{}return z;};}}(),getX:function(G){var Y=function(x){return E.Dom.getXY(x)[0];};return E.Dom.batch(G,Y,E.Dom,true);},getY:function(G){var Y=function(x){return E.Dom.getXY(x)[1];};return E.Dom.batch(G,Y,E.Dom,true);},setXY:function(G,x,Y){E.Dom.batch(G,E.Dom._setXY,{pos:x,noRetry:Y});},_setXY:function(G,z){var AA=E.Dom._getStyle(G,p),y=E.Dom.setStyle,AD=z.pos,Y=z.noRetry,AB=[parseInt(E.Dom.getComputedStyle(G,j),10),parseInt(E.Dom.getComputedStyle(G,o),10)],AC,x;if(AA=="static"){AA=V;y(G,p,AA);}AC=E.Dom._getXY(G);if(!AD||AC===false){return false;}if(isNaN(AB[0])){AB[0]=(AA==V)?0:G[b];}if(isNaN(AB[1])){AB[1]=(AA==V)?0:G[P];}if(AD[0]!==null){y(G,j,AD[0]-AC[0]+AB[0]+"px");}if(AD[1]!==null){y(G,o,AD[1]-AC[1]+AB[1]+"px");}if(!Y){x=E.Dom._getXY(G);if((AD[0]!==null&&x[0]!=AD[0])||(AD[1]!==null&&x[1]!=AD[1])){E.Dom._setXY(G,{pos:AD,noRetry:true});}}},setX:function(Y,G){E.Dom.setXY(Y,[G,null]);},setY:function(G,Y){E.Dom.setXY(G,[null,Y]);},getRegion:function(G){var Y=function(x){var y=false;if(E.Dom._canPosition(x)){y=E.Region.getRegion(x);}else{}return y;};return E.Dom.batch(G,Y,E.Dom,true);},getClientWidth:function(){return E.Dom.getViewportWidth();},getClientHeight:function(){return E.Dom.getViewportHeight();},getElementsByClassName:function(AB,AF,AC,AE,x,AD){AF=AF||"*";AC=(AC)?E.Dom.get(AC):null||K;if(!AC){return[];}var Y=[],G=AC.getElementsByTagName(AF),z=E.Dom.hasClass;for(var y=0,AA=G.length;y-1;}}else{}return G;},addClass:function(Y,G){return E.Dom.batch(Y,E.Dom._addClass,G);},_addClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom._getAttribute(x,F)||J;if(!E.Dom._hasClass(x,Y)){E.Dom.setAttribute(x,F,A(y+B+Y));G=true;}}else{}return G;},removeClass:function(Y,G){return E.Dom.batch(Y,E.Dom._removeClass,G);},_removeClass:function(y,x){var Y=false,AA,z,G;if(y&&x){AA=E.Dom._getAttribute(y,F)||J;E.Dom.setAttribute(y,F,AA.replace(E.Dom._getClassRegex(x),J));z=E.Dom._getAttribute(y,F);if(AA!==z){E.Dom.setAttribute(y,F,A(z));Y=true;if(E.Dom._getAttribute(y,F)===""){G=(y.hasAttribute&&y.hasAttribute(g))?g:F; -y.removeAttribute(G);}}}else{}return Y;},replaceClass:function(x,Y,G){return E.Dom.batch(x,E.Dom._replaceClass,{from:Y,to:G});},_replaceClass:function(y,x){var Y,AB,AA,G=false,z;if(y&&x){AB=x.from;AA=x.to;if(!AA){G=false;}else{if(!AB){G=E.Dom._addClass(y,x.to);}else{if(AB!==AA){z=E.Dom._getAttribute(y,F)||J;Y=(B+z.replace(E.Dom._getClassRegex(AB),B+AA)).split(E.Dom._getClassRegex(AA));Y.splice(1,0,B+AA);E.Dom.setAttribute(y,F,A(Y.join(J)));G=true;}}}}else{}return G;},generateId:function(G,x){x=x||"yui-gen";var Y=function(y){if(y&&y.id){return y.id;}var z=x+YAHOO.env._id_counter++;if(y){if(y[e]&&y[e].getElementById(z)){return E.Dom.generateId(y,z+x);}y.id=z;}return z;};return E.Dom.batch(G,Y,E.Dom,true)||Y.apply(E.Dom,arguments);},isAncestor:function(Y,x){Y=E.Dom.get(Y);x=E.Dom.get(x);var G=false;if((Y&&x)&&(Y[l]&&x[l])){if(Y.contains&&Y!==x){G=Y.contains(x);}else{if(Y.compareDocumentPosition){G=!!(Y.compareDocumentPosition(x)&16);}}}else{}return G;},inDocument:function(G,Y){return E.Dom._inDoc(E.Dom.get(G),Y);},_inDoc:function(Y,x){var G=false;if(Y&&Y[C]){x=x||Y[e];G=E.Dom.isAncestor(x[v],Y);}else{}return G;},getElementsBy:function(Y,AF,AB,AD,y,AC,AE){AF=AF||"*";AB=(AB)?E.Dom.get(AB):null||K;if(!AB){return[];}var x=[],G=AB.getElementsByTagName(AF);for(var z=0,AA=G.length;z=8&&K.documentElement.hasAttribute){E.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this.y=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this.x=B;this[0]=B; -this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top),D=Math.min(this.right,E.right),A=Math.min(this.bottom,E.bottom),B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top),D=Math.max(this.right,E.right),A=Math.max(this.bottom,E.bottom),B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offsetHeight,B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}YAHOO.util.Point.superclass.constructor.call(this,B,A,B,A);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var B=YAHOO.util,A="clientTop",F="clientLeft",J="parentNode",K="right",W="hasLayout",I="px",U="opacity",L="auto",D="borderLeftWidth",G="borderTopWidth",P="borderRightWidth",V="borderBottomWidth",S="visible",Q="transparent",N="height",E="width",H="style",T="currentStyle",R=/^width|height$/,O=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,M={get:function(X,Z){var Y="",a=X[T][Z];if(Z===U){Y=B.Dom.getStyle(X,U);}else{if(!a||(a.indexOf&&a.indexOf(I)>-1)){Y=a;}else{if(B.Dom.IE_COMPUTED[Z]){Y=B.Dom.IE_COMPUTED[Z](X,Z);}else{if(O.test(a)){Y=B.Dom.IE.ComputedStyle.getPixel(X,Z);}else{Y=a;}}}}return Y;},getOffset:function(Z,e){var b=Z[T][e],X=e.charAt(0).toUpperCase()+e.substr(1),c="offset"+X,Y="pixel"+X,a="",d;if(b==L){d=Z[c];if(d===undefined){a=0;}a=d;if(R.test(e)){Z[H][e]=d;if(Z[c]>d){a=d-(Z[c]-d);}Z[H][e]=L;}}else{if(!Z[H][Y]&&!Z[H][e]){Z[H][e]=b;}a=Z[H][Y];}return a+I;},getBorderWidth:function(X,Z){var Y=null;if(!X[T][W]){X[H].zoom=1;}switch(Z){case G:Y=X[A];break;case V:Y=X.offsetHeight-X.clientHeight-X[A];break;case D:Y=X[F];break;case P:Y=X.offsetWidth-X.clientWidth-X[F];break;}return Y+I;},getPixel:function(Y,X){var a=null,b=Y[T][K],Z=Y[T][X];Y[H][K]=Z;a=Y[H].pixelRight;Y[H][K]=b;return a+I;},getMargin:function(Y,X){var Z;if(Y[T][X]==L){Z=0+I;}else{Z=B.Dom.IE.ComputedStyle.getPixel(Y,X);}return Z;},getVisibility:function(Y,X){var Z;while((Z=Y[T])&&Z[X]=="inherit"){Y=Y[J];}return(Z)?Z[X]:S;},getColor:function(Y,X){return B.Dom.Color.toRGB(Y[T][X])||Q;},getBorderColor:function(Y,X){var Z=Y[T],a=Z[X]||Z.color;return B.Dom.Color.toRGB(B.Dom.Color.toHex(a));}},C={};C.top=C.right=C.bottom=C.left=C[E]=C[N]=M.getOffset;C.color=M.getColor;C[G]=C[P]=C[V]=C[D]=M.getBorderWidth;C.marginTop=C.marginRight=C.marginBottom=C.marginLeft=M.getMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRightColor=C.borderBottomColor=C.borderLeftColor=M.getBorderColor;B.Dom.IE_COMPUTED=C;B.Dom.IE_ComputedStyle=M;})();(function(){var C="toString",A=parseInt,B=RegExp,D=YAHOO.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Dom.Color.re_RGB.test(E)){E=D.Dom.Color.toHex(E);}if(D.Dom.Color.re_hex.exec(E)){E="rgb("+[A(B.$1,16),A(B.$2,16),A(B.$3,16)].join(", ")+")";}return E;},toHex:function(H){H=D.Dom.Color.KEYWORDS[H]||H;if(D.Dom.Color.re_RGB.exec(H)){var G=(B.$1.length===1)?"0"+B.$1:Number(B.$1),F=(B.$2.length===1)?"0"+B.$2:Number(B.$2),E=(B.$3.length===1)?"0"+B.$3:Number(B.$3);H=[G[C](16),F[C](16),E[C](16)].join("");}if(H.length<6){H=H.replace(D.Dom.Color.re_hex3,"$1$1");}if(H!=="transparent"&&H.indexOf("#")<0){H="#"+H;}return H.toLowerCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.8.0r4",build:"2449"});// End of File include/javascript/yui/build/dom/dom-min.js +(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++; +if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left); +if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e0){H=C[0];}try{B=F.fn.call(E,H,F.obj);}catch(G){this.lastError=G;if(A){throw G;}}}else{try{B=F.fn.call(E,this.type,C,F.obj);}catch(D){this.lastError=D;if(A){throw D;}}}return B;},unsubscribeAll:function(){var A=this.subscribers.length,B;for(B=A-1;B>-1;B--){this._delete(B);}this.subscribers=[];return A;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(A,B,C){this.fn=A;this.obj=YAHOO.lang.isUndefined(B)?null:B;this.overrideContext=C;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var G=false,H=[],J=[],A=0,E=[],B=0,C={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},D=YAHOO.env.ua.ie,F="focusin",I="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:D,_interval:null,_dri:null,_specialTypes:{focusin:(D?"focusin":"focus"),focusout:(D?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(Q,M,O,P,N){var K=(YAHOO.lang.isString(Q))?[Q]:Q;for(var L=0;L-1;M--){S=(this.removeListener(L[M],K,R)&&S);}return S;}}if(!R||!R.call){return this.purgeElement(L,false,K);}if("unload"==K){for(M=J.length-1;M>-1;M--){U=J[M];if(U&&U[0]==L&&U[1]==K&&U[2]==R){J.splice(M,1);return true;}}return false;}var N=null;var O=arguments[3];if("undefined"===typeof O){O=this._getCacheIndex(H,L,K,R);}if(O>=0){N=H[O];}if(!L||!N){return false;}var T=N[this.CAPTURE]===true?true:false;try{this._simpleRemove(L,K,N[this.WFN],T);}catch(Q){this.lastError=Q;return false;}delete H[O][this.WFN];delete H[O][this.FN];H.splice(O,1);return true;},getTarget:function(M,L){var K=M.target||M.srcElement;return this.resolveTextNode(K);},resolveTextNode:function(L){try{if(L&&3==L.nodeType){return L.parentNode;}}catch(K){}return L;},getPageX:function(L){var K=L.pageX;if(!K&&0!==K){K=L.clientX||0;if(this.isIE){K+=this._getScrollLeft();}}return K;},getPageY:function(K){var L=K.pageY;if(!L&&0!==L){L=K.clientY||0;if(this.isIE){L+=this._getScrollTop();}}return L;},getXY:function(K){return[this.getPageX(K),this.getPageY(K)];},getRelatedTarget:function(L){var K=L.relatedTarget;if(!K){if(L.type=="mouseout"){K=L.toElement; -}else{if(L.type=="mouseover"){K=L.fromElement;}}}return this.resolveTextNode(K);},getTime:function(M){if(!M.time){var L=new Date().getTime();try{M.time=L;}catch(K){this.lastError=K;return L;}}return M.time;},stopEvent:function(K){this.stopPropagation(K);this.preventDefault(K);},stopPropagation:function(K){if(K.stopPropagation){K.stopPropagation();}else{K.cancelBubble=true;}},preventDefault:function(K){if(K.preventDefault){K.preventDefault();}else{K.returnValue=false;}},getEvent:function(M,K){var L=M||window.event;if(!L){var N=this.getEvent.caller;while(N){L=N.arguments[0];if(L&&Event==L.constructor){break;}N=N.caller;}}return L;},getCharCode:function(L){var K=L.keyCode||L.charCode||0;if(YAHOO.env.ua.webkit&&(K in C)){K=C[K];}return K;},_getCacheIndex:function(M,P,Q,O){for(var N=0,L=M.length;N0&&E.length>0);}var P=[];var R=function(T,U){var S=T;if(U.overrideContext){if(U.overrideContext===true){S=U.obj;}else{S=U.overrideContext;}}U.fn.call(S,U.obj);};var L,K,O,N,M=[];for(L=0,K=E.length;L-1;L--){O=E[L];if(!O||!O.id){E.splice(L,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(O,P,R){var M=(YAHOO.lang.isString(O))?this.getEl(O):O;var Q=this.getListeners(M,R),N,K;if(Q){for(N=Q.length-1;N>-1;N--){var L=Q[N];this.removeListener(M,L.type,L.fn);}}if(P&&M&&M.childNodes){for(N=0,K=M.childNodes.length;N-1;N--){M=H[N];if(M){L.removeListener(M[L.EL],M[L.TYPE],M[L.FN],N);}}M=null;}L._simpleRemove(window,"unload",L._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var K=document.documentElement,L=document.body;if(K&&(K.scrollTop||K.scrollLeft)){return[K.scrollTop,K.scrollLeft];}else{if(L){return[L.scrollTop,L.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(M,N,L,K){M.addEventListener(N,L,(K));};}else{if(window.attachEvent){return function(M,N,L,K){M.attachEvent("on"+N,L);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(M,N,L,K){M.removeEventListener(N,L,(K));};}else{if(window.detachEvent){return function(L,M,K){L.detachEvent("on"+M,K);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.onFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener; -/* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */ -if(EU.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;EU._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,overrideContext:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A); -},createEvent:function(B,G){this.__yui_events=this.__yui_events||{};var E=G||{},D=this.__yui_events,F;if(D[B]){}else{F=new YAHOO.util.CustomEvent(B,E.scope||this,E.silent,YAHOO.util.CustomEvent.FLAT,E.fireOnce);D[B]=F;if(E.onSubscribeCallback){F.subscribeEvent.subscribe(E.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var A=this.__yui_subscribers[B];if(A){for(var C=0;C0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget; +if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener; +/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */ +if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g); +}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c0){C=G.substring(0,D);A=G.substring(D,G.length);}else{C=G;}if(this._isNewSource(C)){this._createNewSource(C);}}var H=new Date();var J=new YAHOO.widget.LogMsg({msg:B,time:H,category:F,source:C,sourceDetail:A});var I=this._stack;var E=this.maxStackEntries;if(E&&!isNaN(E)&&(I.length>=E)){I.shift();}I.push(J);this.newLogEvent.fire(J);if(this._browserConsoleEnabled){this._printToBrowserConsole(J);}return true;}else{return false;}};YAHOO.widget.Logger.reset=function(){this._stack=[];this._startTime=new Date().getTime();this.loggerEnabled=true;this.log("Logger reset");this.logResetEvent.fire();};YAHOO.widget.Logger.getStack=function(){return this._stack;};YAHOO.widget.Logger.getStartTime=function(){return this._startTime;};YAHOO.widget.Logger.disableBrowserConsole=function(){YAHOO.log("Logger output to the function console.log() has been disabled.");this._browserConsoleEnabled=false;};YAHOO.widget.Logger.enableBrowserConsole=function(){this._browserConsoleEnabled=true;YAHOO.log("Logger output to the function console.log() has been enabled.");};YAHOO.widget.Logger.handleWindowErrors=function(){if(!YAHOO.widget.Logger._windowErrorsHandled){if(window.error){YAHOO.widget.Logger._origOnWindowError=window.onerror;}window.onerror=YAHOO.widget.Logger._onWindowError;YAHOO.widget.Logger._windowErrorsHandled=true;YAHOO.log("Logger handling of window.onerror has been enabled.");}else{YAHOO.log("Logger handling of window.onerror had already been enabled.");}};YAHOO.widget.Logger.unhandleWindowErrors=function(){if(YAHOO.widget.Logger._windowErrorsHandled){if(YAHOO.widget.Logger._origOnWindowError){window.onerror=YAHOO.widget.Logger._origOnWindowError;YAHOO.widget.Logger._origOnWindowError=null;}else{window.onerror=null;}YAHOO.widget.Logger._windowErrorsHandled=false;YAHOO.log("Logger handling of window.onerror has been disabled.");}else{YAHOO.log("Logger handling of window.onerror had already been disabled.");}};YAHOO.widget.Logger.categoryCreateEvent=new YAHOO.util.CustomEvent("categoryCreate",this,true);YAHOO.widget.Logger.sourceCreateEvent=new YAHOO.util.CustomEvent("sourceCreate",this,true);YAHOO.widget.Logger.newLogEvent=new YAHOO.util.CustomEvent("newLog",this,true);YAHOO.widget.Logger.logResetEvent=new YAHOO.util.CustomEvent("logReset",this,true);YAHOO.widget.Logger._createNewCategory=function(A){this.categories.push(A);this.categoryCreateEvent.fire(A);};YAHOO.widget.Logger._isNewCategory=function(B){for(var A=0;A{label} {totalTime}ms (+{elapsedTime}) {localTime}:

{sourceAndDetail}

{message}

",BASIC_TEMPLATE:"

{label} {totalTime}ms (+{elapsedTime}) {localTime}: {sourceAndDetail}: {message}

"});F.prototype={logReaderEnabled:true,width:null,height:null,top:null,left:null,right:null,bottom:null,fontSize:null,footerEnabled:true,verboseOutput:true,entryFormat:null,newestOnTop:true,outputBuffer:100,thresholdMax:500,thresholdMin:100,isCollapsed:false,isPaused:false,draggable:true,toString:function(){return"LogReader instance"+this._sName;},pause:function(){this.isPaused=true;this._timeout=null;this.logReaderEnabled=false;if(this._btnPause){this._btnPause.value="Resume"; -}},resume:function(){this.isPaused=false;this.logReaderEnabled=true;this._printBuffer();if(this._btnPause){this._btnPause.value="Pause";}},render:function(){if(this.rendered){return;}this._initContainerEl();this._initHeaderEl();this._initConsoleEl();this._initFooterEl();this._initCategories();this._initSources();this._initDragDrop();C.newLogEvent.subscribe(this._onNewLog,this);C.logResetEvent.subscribe(this._onReset,this);C.categoryCreateEvent.subscribe(this._onCategoryCreate,this);C.sourceCreateEvent.subscribe(this._onSourceCreate,this);this.rendered=true;this._filterLogs();},destroy:function(){A.purgeElement(this._elContainer,true);this._elContainer.innerHTML="";this._elContainer.parentNode.removeChild(this._elContainer);this.rendered=false;},hide:function(){this._elContainer.style.display="none";},show:function(){this._elContainer.style.display="block";},collapse:function(){this._elConsole.style.display="none";if(this._elFt){this._elFt.style.display="none";}this._btnCollapse.value="Expand";this.isCollapsed=true;},expand:function(){this._elConsole.style.display="block";if(this._elFt){this._elFt.style.display="block";}this._btnCollapse.value="Collapse";this.isCollapsed=false;},getCheckbox:function(H){return this._filterCheckboxes[H];},getCategories:function(){return this._categoryFilters;},showCategory:function(I){var K=this._categoryFilters;if(K.indexOf){if(K.indexOf(I)>-1){return;}}else{for(var H=0;H-1){return;}}else{for(var I=0;I/g,">");}return"";},_sName:null,_buffer:null,_consoleMsgCount:0,_lastTime:null,_timeout:null,_filterCheckboxes:null,_categoryFilters:null,_sourceFilters:null,_elContainer:null,_elHd:null,_elCollapse:null,_btnCollapse:null,_title:null,_elConsole:null,_elFt:null,_elBtns:null,_elCategoryFilters:null,_elSourceFilters:null,_btnPause:null,_btnClear:null,_init:function(H,I){this._buffer=[];this._filterCheckboxes={};this._lastTime=C.getStartTime();if(I&&(I.constructor==Object)){for(var J in I){if(I.hasOwnProperty(J)){this[J]=I[J];}}}this._elContainer=E.get(H);YAHOO.log("LogReader initialized",null,this.toString());},_initContainerEl:function(){if(!this._elContainer||!/div$/i.test(this._elContainer.tagName)){this._elContainer=G.body.insertBefore(B("div"),G.body.firstChild);E.addClass(this._elContainer,"yui-log-container");}E.addClass(this._elContainer,"yui-log");var J=this._elContainer.style,H=["width","right","top","fontSize"],K,I;for(I=H.length-1;I>=0;--I){K=H[I];if(this[K]){J[K]=this[K];}}if(this.left){J.left=this.left;J.right="auto";}if(this.bottom){J.bottom=this.bottom;J.top="auto";}if(YAHOO.env.ua.opera){G.body.style+="";}},_initHeaderEl:function(){if(this._elHd){A.purgeElement(this._elHd,true);this._elHd.innerHTML="";}this._elHd=B("div",{id:"yui-log-hd"+this._sName,className:"yui-log-hd"});this._elCollapse=B("div",{className:"yui-log-btns"});this._btnCollapse=B("input",{type:"button",className:"yui-log-button",value:"Collapse"});A.on(this._btnCollapse,"click",this._onClickCollapseBtn,this);this._title=B("h4",{innerHTML:"Logger Console"});this._elCollapse.appendChild(this._btnCollapse);this._elHd.appendChild(this._elCollapse);this._elHd.appendChild(this._title);this._elContainer.appendChild(this._elHd);},_initConsoleEl:function(){if(this._elConsole){A.purgeElement(this._elConsole,true);this._elConsole.innerHTML="";}this._elConsole=B("div",{className:"yui-log-bd"});if(this.height){this._elConsole.style.height=this.height;}this._elContainer.appendChild(this._elConsole);},_initFooterEl:function(){if(this.footerEnabled){if(this._elFt){A.purgeElement(this._elFt,true);this._elFt.innerHTML="";}this._elFt=B("div",{className:"yui-log-ft"});this._elBtns=B("div",{className:"yui-log-btns"});this._btnPause=B("input",{type:"button",className:"yui-log-button",value:"Pause"});A.on(this._btnPause,"click",this._onClickPauseBtn,this);this._btnClear=B("input",{type:"button",className:"yui-log-button",value:"Clear"});A.on(this._btnClear,"click",this._onClickClearBtn,this);this._elCategoryFilters=B("div",{className:"yui-log-categoryfilters"});this._elSourceFilters=B("div",{className:"yui-log-sourcefilters"});this._elBtns.appendChild(this._btnPause);this._elBtns.appendChild(this._btnClear);this._elFt.appendChild(this._elBtns);this._elFt.appendChild(this._elCategoryFilters); -this._elFt.appendChild(this._elSourceFilters);this._elContainer.appendChild(this._elFt);}},_initDragDrop:function(){if(D.DD&&this.draggable&&this._elHd){var H=new D.DD(this._elContainer);H.setHandleElId(this._elHd.id);this._elHd.style.cursor="move";}},_initCategories:function(){this._categoryFilters=[];var J=C.categories;for(var H=0;Hthis.thresholdMax)){X=0;}R=(I>X)?(I-X):0;for(O=R;O0){c=g.substring(0,d);a=g.substring(d,g.length);}else{c=g;}if(this._isNewSource(c)){this._createNewSource(c);}}var h=new Date();var j=new YAHOO.widget.LogMsg({msg:b,time:h,category:f,source:c,sourceDetail:a});var i=this._stack;var e=this.maxStackEntries;if(e&&!isNaN(e)&&(i.length>=e)){i.shift();}i.push(j);this.newLogEvent.fire(j);if(this._browserConsoleEnabled){this._printToBrowserConsole(j);}return true;}else{return false;}};YAHOO.widget.Logger.reset=function(){this._stack=[];this._startTime=new Date().getTime();this.loggerEnabled=true;this.log("Logger reset");this.logResetEvent.fire();};YAHOO.widget.Logger.getStack=function(){return this._stack;};YAHOO.widget.Logger.getStartTime=function(){return this._startTime;};YAHOO.widget.Logger.disableBrowserConsole=function(){YAHOO.log("Logger output to the function console.log() has been disabled.");this._browserConsoleEnabled=false;};YAHOO.widget.Logger.enableBrowserConsole=function(){this._browserConsoleEnabled=true;YAHOO.log("Logger output to the function console.log() has been enabled.");};YAHOO.widget.Logger.handleWindowErrors=function(){if(!YAHOO.widget.Logger._windowErrorsHandled){if(window.error){YAHOO.widget.Logger._origOnWindowError=window.onerror;}window.onerror=YAHOO.widget.Logger._onWindowError;YAHOO.widget.Logger._windowErrorsHandled=true;YAHOO.log("Logger handling of window.onerror has been enabled.");}else{YAHOO.log("Logger handling of window.onerror had already been enabled.");}};YAHOO.widget.Logger.unhandleWindowErrors=function(){if(YAHOO.widget.Logger._windowErrorsHandled){if(YAHOO.widget.Logger._origOnWindowError){window.onerror=YAHOO.widget.Logger._origOnWindowError;YAHOO.widget.Logger._origOnWindowError=null;}else{window.onerror=null;}YAHOO.widget.Logger._windowErrorsHandled=false;YAHOO.log("Logger handling of window.onerror has been disabled.");}else{YAHOO.log("Logger handling of window.onerror had already been disabled.");}};YAHOO.widget.Logger.categoryCreateEvent=new YAHOO.util.CustomEvent("categoryCreate",this,true);YAHOO.widget.Logger.sourceCreateEvent=new YAHOO.util.CustomEvent("sourceCreate",this,true);YAHOO.widget.Logger.newLogEvent=new YAHOO.util.CustomEvent("newLog",this,true);YAHOO.widget.Logger.logResetEvent=new YAHOO.util.CustomEvent("logReset",this,true);YAHOO.widget.Logger._createNewCategory=function(a){this.categories.push(a);this.categoryCreateEvent.fire(a);};YAHOO.widget.Logger._isNewCategory=function(b){for(var a=0;a{label} {totalTime}ms (+{elapsedTime}) {localTime}:

{sourceAndDetail}

{message}

",BASIC_TEMPLATE:"

{label} {totalTime}ms (+{elapsedTime}) {localTime}: {sourceAndDetail}: {message}

"});g.prototype={logReaderEnabled:true,width:null,height:null,top:null,left:null,right:null,bottom:null,fontSize:null,footerEnabled:true,verboseOutput:true,entryFormat:null,newestOnTop:true,outputBuffer:100,thresholdMax:500,thresholdMin:100,isCollapsed:false,isPaused:false,draggable:true,toString:function(){return"LogReader instance"+this._sName;},pause:function(){this.isPaused=true;this._timeout=null; +this.logReaderEnabled=false;if(this._btnPause){this._btnPause.value="Resume";}},resume:function(){this.isPaused=false;this.logReaderEnabled=true;this._printBuffer();if(this._btnPause){this._btnPause.value="Pause";}},render:function(){if(this.rendered){return;}this._initContainerEl();this._initHeaderEl();this._initConsoleEl();this._initFooterEl();this._initCategories();this._initSources();this._initDragDrop();c.newLogEvent.subscribe(this._onNewLog,this);c.logResetEvent.subscribe(this._onReset,this);c.categoryCreateEvent.subscribe(this._onCategoryCreate,this);c.sourceCreateEvent.subscribe(this._onSourceCreate,this);this.rendered=true;this._filterLogs();},destroy:function(){a.purgeElement(this._elContainer,true);this._elContainer.innerHTML="";this._elContainer.parentNode.removeChild(this._elContainer);this.rendered=false;},hide:function(){this._elContainer.style.display="none";},show:function(){this._elContainer.style.display="block";},collapse:function(){this._elConsole.style.display="none";if(this._elFt){this._elFt.style.display="none";}this._btnCollapse.value="Expand";this.isCollapsed=true;},expand:function(){this._elConsole.style.display="block";if(this._elFt){this._elFt.style.display="block";}this._btnCollapse.value="Collapse";this.isCollapsed=false;},getCheckbox:function(d){return this._filterCheckboxes[d];},getCategories:function(){return this._categoryFilters;},showCategory:function(j){var l=this._categoryFilters;if(l.indexOf){if(l.indexOf(j)>-1){return;}}else{for(var d=0;d-1){return;}}else{for(var j=0;j/g,">");}return"";},_sName:null,_buffer:null,_consoleMsgCount:0,_lastTime:null,_timeout:null,_filterCheckboxes:null,_categoryFilters:null,_sourceFilters:null,_elContainer:null,_elHd:null,_elCollapse:null,_btnCollapse:null,_title:null,_elConsole:null,_elFt:null,_elBtns:null,_elCategoryFilters:null,_elSourceFilters:null,_btnPause:null,_btnClear:null,_init:function(d,i){this._buffer=[];this._filterCheckboxes={};this._lastTime=c.getStartTime();if(i&&(i.constructor==Object)){for(var j in i){if(i.hasOwnProperty(j)){this[j]=i[j];}}}this._elContainer=f.get(d);YAHOO.log("LogReader initialized",null,this.toString());},_initContainerEl:function(){if(!this._elContainer||!/div$/i.test(this._elContainer.tagName)){this._elContainer=h.body.insertBefore(b("div"),h.body.firstChild);f.addClass(this._elContainer,"yui-log-container");}f.addClass(this._elContainer,"yui-log");var k=this._elContainer.style,d=["width","right","top","fontSize"],l,j;for(j=d.length-1;j>=0;--j){l=d[j];if(this[l]){k[l]=this[l];}}if(this.left){k.left=this.left;k.right="auto";}if(this.bottom){k.bottom=this.bottom;k.top="auto";}if(YAHOO.env.ua.opera){h.body.style+="";}},_initHeaderEl:function(){if(this._elHd){a.purgeElement(this._elHd,true);this._elHd.innerHTML="";}this._elHd=b("div",{className:"yui-log-hd"});f.generateId(this._elHd,"yui-log-hd"+this._sName);this._elCollapse=b("div",{className:"yui-log-btns"});this._btnCollapse=b("input",{type:"button",className:"yui-log-button",value:"Collapse"});a.on(this._btnCollapse,"click",this._onClickCollapseBtn,this);this._title=b("h4",{innerHTML:"Logger Console"});this._elCollapse.appendChild(this._btnCollapse);this._elHd.appendChild(this._elCollapse);this._elHd.appendChild(this._title);this._elContainer.appendChild(this._elHd);},_initConsoleEl:function(){if(this._elConsole){a.purgeElement(this._elConsole,true);this._elConsole.innerHTML="";}this._elConsole=b("div",{className:"yui-log-bd"});if(this.height){this._elConsole.style.height=this.height;}this._elContainer.appendChild(this._elConsole);},_initFooterEl:function(){if(this.footerEnabled){if(this._elFt){a.purgeElement(this._elFt,true);this._elFt.innerHTML="";}this._elFt=b("div",{className:"yui-log-ft"});this._elBtns=b("div",{className:"yui-log-btns"});this._btnPause=b("input",{type:"button",className:"yui-log-button",value:"Pause"});a.on(this._btnPause,"click",this._onClickPauseBtn,this);this._btnClear=b("input",{type:"button",className:"yui-log-button",value:"Clear"});a.on(this._btnClear,"click",this._onClickClearBtn,this);this._elCategoryFilters=b("div",{className:"yui-log-categoryfilters"});this._elSourceFilters=b("div",{className:"yui-log-sourcefilters"});this._elBtns.appendChild(this._btnPause);this._elBtns.appendChild(this._btnClear); +this._elFt.appendChild(this._elBtns);this._elFt.appendChild(this._elCategoryFilters);this._elFt.appendChild(this._elSourceFilters);this._elContainer.appendChild(this._elFt);}},_initDragDrop:function(){if(e.DD&&this.draggable&&this._elHd){var d=new e.DD(this._elContainer);d.setHandleElId(this._elHd.id);this._elHd.style.cursor="move";}},_initCategories:function(){this._categoryFilters=[];var k=c.categories;for(var d=0;dthis.thresholdMax)){z=0;}t=(k>z)?(k-z):0;for(q=t;q0)?F:0;}if(C in D&&!("style" in D&&C in D.style)){D[C]=F;}else{B.Dom.setStyle(D,C,F+E);}},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G);}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if("style" in E){if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)];}else{G=0;}}else{if(C in E){G=E[C];}}return G;},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px";}return"";},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined");};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false;}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"];}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};this._queue=B;this._getIndex=E;};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B0)?f:0;}if(c in d&&!("style" in d&&c in d.style)){d[c]=f;}else{b.Dom.setStyle(d,c,f+e);}},getAttribute:function(c){var e=this.getEl();var g=b.Dom.getStyle(e,c);if(g!=="auto"&&!this.patterns.offsetUnit.test(g)){return parseFloat(g);}var d=this.patterns.offsetAttribute.exec(c)||[];var h=!!(d[3]);var f=!!(d[2]);if("style" in e){if(f||(b.Dom.getStyle(e,"position")=="absolute"&&h)){g=e["offset"+d[0].charAt(0).toUpperCase()+d[0].substr(1)];}else{g=0;}}else{if(c in e){g=e[c];}}return g;},getDefaultUnit:function(c){if(this.patterns.defaultUnit.test(c)){return"px";}return"";},setRuntimeAttribute:function(d){var j;var e;var f=this.attributes;this.runtimeAttributes[d]={};var h=function(i){return(typeof i!=="undefined");};if(!h(f[d]["to"])&&!h(f[d]["by"])){return false;}j=(h(f[d]["from"]))?f[d]["from"]:this.getAttribute(d);if(h(f[d]["to"])){e=f[d]["to"];}else{if(h(f[d]["by"])){if(j.constructor==Array){e=[];for(var g=0,c=j.length;g0&&isFinite(o)){if(k.currentFrame+o>=n){o=n-(m+1);}k.currentFrame+=o;}};this._queue=c;this._getIndex=a;};YAHOO.util.Bezier=new function(){this.getPosition=function(e,d){var f=e.length;var c=[];for(var b=0;b0&&!(L[0] instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.8.0r4",build:"2449"});// End of File include/javascript/yui/build/animation/animation-min.js +YAHOO.util.Easing={easeNone:function(e,a,g,f){return g*e/f+a;},easeIn:function(e,a,g,f){return g*(e/=f)*e+a;},easeOut:function(e,a,g,f){return -g*(e/=f)*(e-2)+a;},easeBoth:function(e,a,g,f){if((e/=f/2)<1){return g/2*e*e+a;}return -g/2*((--e)*(e-2)-1)+a;},easeInStrong:function(e,a,g,f){return g*(e/=f)*e*e*e+a;},easeOutStrong:function(e,a,g,f){return -g*((e=e/f-1)*e*e*e-1)+a;},easeBothStrong:function(e,a,g,f){if((e/=f/2)<1){return g/2*e*e*e*e+a;}return -g/2*((e-=2)*e*e*e-2)+a;},elasticIn:function(g,e,k,j,f,i){if(g==0){return e;}if((g/=j)==1){return e+k;}if(!i){i=j*0.3;}if(!f||f0&&!(m[0] instanceof Array)){m=[m];}else{var l=[];for(n=0,p=m.length;n0){this.runtimeAttributes[q]=this.runtimeAttributes[q].concat(m);}this.runtimeAttributes[q][this.runtimeAttributes[q].length]=j;}else{f.setRuntimeAttribute.call(this,q);}};var b=function(g,i){var h=e.Dom.getXY(this.getEl());g=[g[0]-h[0]+i[0],g[1]-h[1]+i[1]];return g;};var d=function(g){return(typeof g!=="undefined");};e.Motion=a;})();(function(){var d=function(f,e,g,h){if(f){d.superclass.constructor.call(this,f,e,g,h);}};d.NAME="Scroll";var b=YAHOO.util;YAHOO.extend(d,b.ColorAnim);var c=d.superclass;var a=d.prototype;a.doMethod=function(e,h,f){var g=null;if(e=="scroll"){g=[this.method(this.currentFrame,h[0],f[0]-h[0],this.totalFrames),this.method(this.currentFrame,h[1],f[1]-h[1],this.totalFrames)];}else{g=c.doMethod.call(this,e,h,f);}return g;};a.getAttribute=function(e){var g=null;var f=this.getEl();if(e=="scroll"){g=[f.scrollLeft,f.scrollTop];}else{g=c.getAttribute.call(this,e);}return g;};a.setAttribute=function(e,h,g){var f=this.getEl();if(e=="scroll"){f.scrollLeft=h[0];f.scrollTop=h[1];}else{c.setAttribute.call(this,e,h,g);}};b.Scroll=d;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.9.0",build:"2800"});// End of File include/javascript/yui/build/animation/animation-min.js /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(A){this._msxml_progid.unshift(A);},setDefaultPostHeader:function(A){if(typeof A=="string"){this._default_post_header=A;}else{if(typeof A=="boolean"){this._use_default_post_header=A;}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this._default_xhr_header=A;}else{this._use_default_xhr_header=A;}},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A;}},createXhrObject:function(F){var D,A,B;try{A=new XMLHttpRequest();D={conn:A,tId:F,xhr:true};}catch(C){for(B=0;B=200&&E<300)||E===1223||C){A=B.xdr?B.r:this.createResponseObject(B,G);if(I&&I.success){if(!I.scope){I.success(A);}else{I.success.apply(I.scope,[A]);}}this.successEvent.fire(A);if(B.successEvent){B.successEvent.fire(A);}}else{switch(E){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:A=this.createExceptionObject(B.tId,G,(D?D:false));if(I&&I.failure){if(!I.scope){I.failure(A);}else{I.failure.apply(I.scope,[A]);}}break;default:A=(B.xdr)?B.response:this.createResponseObject(B,G);if(I&&I.failure){if(!I.scope){I.failure(A);}else{I.failure.apply(I.scope,[A]);}}}this.failureEvent.fire(A);if(B.failureEvent){B.failureEvent.fire(A);}}this.releaseObject(B);A=null;},createResponseObject:function(A,G){var D={},I={},E,C,F,B;try{C=A.conn.getAllResponseHeaders();F=C.split("\n");for(E=0;E'+''+''+"",K=document.createElement("div");document.body.appendChild(K);K.innerHTML=J;}function B(L,I,J,M,K){H[parseInt(L.tId)]={"o":L,"c":M};if(K){M.method=I;M.data=K;}L.conn.send(J,M,L.tId);}function E(I){D(I);G._transport=document.getElementById("YUIConnectionSwf");}function C(){G.xdrReadyEvent.fire();}function A(J,I){if(J){G.startEvent.fire(J,I.argument);if(J.startEvent){J.startEvent.fire(J,I.argument);}}}function F(J){var K=H[J.tId].o,I=H[J.tId].c;if(J.statusText==="xdr:start"){A(K,I);return;}J.responseText=decodeURI(J.responseText);K.r=J;if(I.argument){K.r.argument=I.argument;}this.handleTransactionResponse(K,I,J.statusText==="xdr:abort"?true:false);delete H[J.tId];}G.xdr=B;G.swf=D;G.transport=E;G.xdrReadyEvent=new YAHOO.util.CustomEvent("xdrReady");G.xdrReady=C;G.handleXdrResponse=F;})();(function(){var D=YAHOO.util.Connect,F=YAHOO.util.Event;D._isFormSubmit=false;D._isFileUpload=false;D._formNode=null;D._sFormData=null;D._submitElementValue=null;D.uploadEvent=new YAHOO.util.CustomEvent("upload"),D._hasSubmitListener=function(){if(F){F.addListener(document,"click",function(J){var I=F.getTarget(J),H=I.nodeName.toLowerCase();if((H==="input"||H==="button")&&(I.type&&I.type.toLowerCase()=="submit")){D._submitElementValue=encodeURIComponent(I.name)+"="+encodeURIComponent(I.value);}});return true;}return false;}();function G(T,O,J){var S,I,R,P,W,Q=false,M=[],V=0,L,N,K,U,H;this.resetFormState();if(typeof T=="string"){S=(document.getElementById(T)||document.forms[T]);}else{if(typeof T=="object"){S=T;}else{return;}}if(O){this.createFrame(J?J:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=S;return;}for(L=0,N=S.elements.length;L-1){H=I.options[I.selectedIndex];M[V++]=R+encodeURIComponent((H.attributes.value&&H.attributes.value.specified)?H.value:H.text);}break;case"select-multiple":if(I.selectedIndex>-1){for(K=I.selectedIndex,U=I.options.length;K');if(typeof H=="boolean"){J.src="javascript:false";}}else{J=document.createElement("iframe");J.id=I;J.name=I;}J.style.position="absolute";J.style.top="-1000px";J.style.left="-1000px";document.body.appendChild(J);}function E(H){var K=[],I=H.split("&"),J,L;for(J=0;J0){for(P=0;P=200&&f<300)||f===1223||c){a=b.xdr?b.r:this.createResponseObject(b,h);if(j&&j.success){if(!j.scope){j.success(a);}else{j.success.apply(j.scope,[a]);}}this.successEvent.fire(a);if(b.successEvent){b.successEvent.fire(a);}}else{switch(f){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:a=this.createExceptionObject(b.tId,h,(d?d:false));if(j&&j.failure){if(!j.scope){j.failure(a);}else{j.failure.apply(j.scope,[a]);}}break;default:a=(b.xdr)?b.response:this.createResponseObject(b,h);if(j&&j.failure){if(!j.scope){j.failure(a);}else{j.failure.apply(j.scope,[a]);}}}this.failureEvent.fire(a);if(b.failureEvent){b.failureEvent.fire(a);}}this.releaseObject(b);a=null;},createResponseObject:function(a,h){var d={},k={},f,c,g,b;try{c=a.conn.getAllResponseHeaders();g=c.split("\n");for(f=0;f'+''+''+"",k=document.createElement("div");document.body.appendChild(k);k.innerHTML=j;}function b(l,i,j,n,k){h[parseInt(l.tId)]={"o":l,"c":n};if(k){n.method=i;n.data=k;}l.conn.send(j,n,l.tId);}function e(i){d(i);g._transport=document.getElementById("YUIConnectionSwf");}function c(){g.xdrReadyEvent.fire();}function a(j,i){if(j){g.startEvent.fire(j,i.argument);if(j.startEvent){j.startEvent.fire(j,i.argument);}}}function f(j){var k=h[j.tId].o,i=h[j.tId].c;if(j.statusText==="xdr:start"){a(k,i);return;}j.responseText=decodeURI(j.responseText);k.r=j;if(i.argument){k.r.argument=i.argument;}this.handleTransactionResponse(k,i,j.statusText==="xdr:abort"?true:false);delete h[j.tId];}g.xdr=b;g.swf=d;g.transport=e;g.xdrReadyEvent=new YAHOO.util.CustomEvent("xdrReady");g.xdrReady=c;g.handleXdrResponse=f;})();(function(){var e=YAHOO.util.Connect,g=YAHOO.util.Event,a=document.documentMode?document.documentMode:false;e._isFileUpload=false;e._formNode=null;e._sFormData=null;e._submitElementValue=null;e.uploadEvent=new YAHOO.util.CustomEvent("upload");e._hasSubmitListener=function(){if(g){g.addListener(document,"click",function(k){var j=g.getTarget(k),i=j.nodeName.toLowerCase();if((i==="input"||i==="button")&&(j.type&&j.type.toLowerCase()=="submit")){e._submitElementValue=encodeURIComponent(j.name)+"="+encodeURIComponent(j.value);}});return true;}return false;}();function h(w,r,m){var v,l,u,s,z,t=false,p=[],y=0,o,q,n,x,k;this.resetFormState();if(typeof w=="string"){v=(document.getElementById(w)||document.forms[w]);}else{if(typeof w=="object"){v=w;}else{return;}}if(r){this.createFrame(m?m:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=v;return;}for(o=0,q=v.elements.length;o-1){k=l.options[l.selectedIndex];p[y++]=u+encodeURIComponent((k.attributes.value&&k.attributes.value.specified)?k.value:k.text);}break;case"select-multiple":if(l.selectedIndex>-1){for(n=l.selectedIndex,x=l.options.length;n');if(typeof i=="boolean"){k.src="javascript:false";}}else{k=document.createElement("iframe");k.id=j;k.name=j;}k.style.position="absolute";k.style.top="-1000px";k.style.left="-1000px";document.body.appendChild(k);}function f(j){var m=[],k=j.split("&"),l,n;for(l=0;l=8)?true:false,z=this,v=(y&&y.argument)?y.argument:null,x,s,k,r,j,q;j={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",n);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",t);if(YAHOO.env.ua.ie&&!p){this._formNode.setAttribute("encoding",u);}else{this._formNode.setAttribute("enctype",u);}if(l){x=this.appendPostData(l);}this._formNode.submit();this.startEvent.fire(m,v);if(m.startEvent){m.startEvent.fire(m,v);}if(y&&y.timeout){this._timeOut[m.tId]=window.setTimeout(function(){z.abort(m,y,true);},y.timeout);}if(x&&x.length>0){for(s=0;sthis.clickPixelThresh||D>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F});}if(C&&C.events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F});}if(C){this.fireEvents(F,false);}}this.stopEvent(F);}},fireEvents:function(V,L){var a=this.dragCurrent;if(!a||a.isLocked()||a.dragOnly){return;}var N=YAHOO.util.Event.getPageX(V),M=YAHOO.util.Event.getPageY(V),P=new YAHOO.util.Point(N,M),K=a.getTargetCoord(P.x,P.y),F=a.getDragEl(),E=["out","over","drop","enter"],U=new YAHOO.util.Region(K.y,K.x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},Q=[],c={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var S in this.dragOvers){var d=this.dragOvers[S];if(!this.isTypeOfDD(d)){continue; -}if(!this.isOverTarget(P,d,this.mode,U)){c.outEvts.push(d);}I[S]=true;delete this.dragOvers[S];}for(var R in a.groups){if("string"!=typeof R){continue;}for(S in this.ids[R]){var G=this.ids[R][S];if(!this.isTypeOfDD(G)){continue;}if(G.isTarget&&!G.isLocked()&&G!=a){if(this.isOverTarget(P,G,this.mode,U)){D[R]=true;if(L){c.dropEvts.push(G);}else{if(!I[G.id]){c.enterEvts.push(G);}else{c.overEvts.push(G);}this.dragOvers[G.id]=G;}}}}}this.interactionInfo={out:c.outEvts,enter:c.enterEvts,over:c.overEvts,drop:c.dropEvts,point:P,draggedRegion:U,sourceRegion:this.locationCache[a.id],validDrop:L};for(var C in D){Q.push(C);}if(L&&!c.dropEvts.length){this.interactionInfo.validDrop=false;if(a.events.invalidDrop){a.onInvalidDrop(V);a.fireEvent("invalidDropEvent",{e:V});}}for(S=0;S2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._timeoutCount+=1;}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){return true;}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true;}else{D=D.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments);},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id); -}return this._domRef;},getDragEl:function(){return B.get(this.dragElId);},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event");}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false;}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{this.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H);},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true;},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(J,I){var D=J.which||J.button;if(this.primaryButtonOnly&&D>1){return;}if(this.isLocked()){return;}var C=this.b4MouseDown(J),F=true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J);}var E=this.onMouseDown(J),H=true;if(this.events.mouseDown){H=this.fireEvent("mouseDownEvent",J);}if((C===false)||(E===false)||(F===false)||(H===false)){return;}this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY(J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DDM.stopEvent(J);}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(Cthis.maxX){C=this.maxX;}}if(this.constrainY){if(Fthis.maxY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D); -}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider);})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y];}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px");}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth);},0);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G0&&I-NB&&F0&&J-Dthis.clickPixelThresh||D>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F});}if(C&&C.events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F});}if(C){this.fireEvents(F,false);}}this.stopEvent(F);}},fireEvents:function(W,M){var c=this.dragCurrent;if(!c||c.isLocked()||c.dragOnly){return;}var O=YAHOO.util.Event.getPageX(W),N=YAHOO.util.Event.getPageY(W),Q=new YAHOO.util.Point(O,N),K=c.getTargetCoord(Q.x,Q.y),F=c.getDragEl(),E=["out","over","drop","enter"],V=new YAHOO.util.Region(K.y,K.x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},L={},R=[],d={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var T in this.dragOvers){var f=this.dragOvers[T];if(!this.isTypeOfDD(f)){continue; +}if(!this.isOverTarget(Q,f,this.mode,V)){d.outEvts.push(f);}I[T]=true;delete this.dragOvers[T];}for(var S in c.groups){if("string"!=typeof S){continue;}for(T in this.ids[S]){var G=this.ids[S][T];if(!this.isTypeOfDD(G)){continue;}if(G.isTarget&&!G.isLocked()&&G!=c){if(this.isOverTarget(Q,G,this.mode,V)){D[S]=true;if(M){d.dropEvts.push(G);}else{if(!I[G.id]){d.enterEvts.push(G);}else{d.overEvts.push(G);}this.dragOvers[G.id]=G;}}}}}this.interactionInfo={out:d.outEvts,enter:d.enterEvts,over:d.overEvts,drop:d.dropEvts,point:Q,draggedRegion:V,sourceRegion:this.locationCache[c.id],validDrop:M};for(var C in D){R.push(C);}if(M&&!d.dropEvts.length){this.interactionInfo.validDrop=false;if(c.events.invalidDrop){c.onInvalidDrop(W);c.fireEvent("invalidDropEvent",{e:W});}}for(T=0;T2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._timeoutCount+=1;}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){return true;}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true;}else{D=D.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments);},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id); +}return this._domRef;},getDragEl:function(){return B.get(this.dragElId);},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event");}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false;}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{this.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H);},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true;},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(J,I){var D=J.which||J.button;if(this.primaryButtonOnly&&D>1){return;}if(this.isLocked()){return;}var C=this.b4MouseDown(J),F=true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J);}var E=this.onMouseDown(J),H=true;if(this.events.mouseDown){if(E===false){H=false;}else{H=this.fireEvent("mouseDownEvent",J);}}if((C===false)||(E===false)||(F===false)||(H===false)){return;}this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY(J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DDM.stopEvent(J);}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(Cthis.maxX){C=this.maxX;}}if(this.constrainY){if(Fthis.maxY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint; +if(D){this.setYTicks(this.initPageY,D);}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider);})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y];}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px");}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth);},0);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G0&&I-NB&&F0&&J-D0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true;}}while(G--);}return false;};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Module=function(R,Q){if(R){this.init(R,Q);}else{}};var F=YAHOO.util.Dom,D=YAHOO.util.Config,N=YAHOO.util.Event,M=YAHOO.util.CustomEvent,G=YAHOO.widget.Module,I=YAHOO.env.ua,H,P,O,E,A={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTROY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},J={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};G.IMG_ROOT=null;G.IMG_ROOT_SSL=null;G.CSS_MODULE="yui-module";G.CSS_HEADER="hd";G.CSS_BODY="bd";G.CSS_FOOTER="ft";G.RESIZE_MONITOR_SECURE_URL="javascript:false;";G.RESIZE_MONITOR_BUFFER=1;G.textResizeEvent=new M("textResize");G.forceDocumentRedraw=function(){var Q=document.documentElement;if(Q){Q.className+=" ";Q.className=YAHOO.lang.trim(Q.className);}};function L(){if(!H){H=document.createElement("div");H.innerHTML=('
'+'
');P=H.firstChild;O=P.nextSibling;E=O.nextSibling;}return H;}function K(){if(!P){L();}return(P.cloneNode(false));}function B(){if(!O){L();}return(O.cloneNode(false));}function C(){if(!E){L();}return(E.cloneNode(false));}G.prototype={constructor:G,element:null,header:null,body:null,footer:null,id:null,imageRoot:G.IMG_ROOT,initEvents:function(){var Q=M.LIST; -this.beforeInitEvent=this.createEvent(A.BEFORE_INIT);this.beforeInitEvent.signature=Q;this.initEvent=this.createEvent(A.INIT);this.initEvent.signature=Q;this.appendEvent=this.createEvent(A.APPEND);this.appendEvent.signature=Q;this.beforeRenderEvent=this.createEvent(A.BEFORE_RENDER);this.beforeRenderEvent.signature=Q;this.renderEvent=this.createEvent(A.RENDER);this.renderEvent.signature=Q;this.changeHeaderEvent=this.createEvent(A.CHANGE_HEADER);this.changeHeaderEvent.signature=Q;this.changeBodyEvent=this.createEvent(A.CHANGE_BODY);this.changeBodyEvent.signature=Q;this.changeFooterEvent=this.createEvent(A.CHANGE_FOOTER);this.changeFooterEvent.signature=Q;this.changeContentEvent=this.createEvent(A.CHANGE_CONTENT);this.changeContentEvent.signature=Q;this.destroyEvent=this.createEvent(A.DESTROY);this.destroyEvent.signature=Q;this.beforeShowEvent=this.createEvent(A.BEFORE_SHOW);this.beforeShowEvent.signature=Q;this.showEvent=this.createEvent(A.SHOW);this.showEvent.signature=Q;this.beforeHideEvent=this.createEvent(A.BEFORE_HIDE);this.beforeHideEvent.signature=Q;this.hideEvent=this.createEvent(A.HIDE);this.hideEvent.signature=Q;},platform:function(){var Q=navigator.userAgent.toLowerCase();if(Q.indexOf("windows")!=-1||Q.indexOf("win32")!=-1){return"windows";}else{if(Q.indexOf("macintosh")!=-1){return"mac";}else{return false;}}}(),browser:function(){var Q=navigator.userAgent.toLowerCase();if(Q.indexOf("opera")!=-1){return"opera";}else{if(Q.indexOf("msie 7")!=-1){return"ie7";}else{if(Q.indexOf("msie")!=-1){return"ie";}else{if(Q.indexOf("safari")!=-1){return"safari";}else{if(Q.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty(J.VISIBLE.key,{handler:this.configVisible,value:J.VISIBLE.value,validator:J.VISIBLE.validator});this.cfg.addProperty(J.EFFECT.key,{suppressEvent:J.EFFECT.suppressEvent,supercedes:J.EFFECT.supercedes});this.cfg.addProperty(J.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:J.MONITOR_RESIZE.value});this.cfg.addProperty(J.APPEND_TO_DOCUMENT_BODY.key,{value:J.APPEND_TO_DOCUMENT_BODY.value});},init:function(V,U){var S,W;this.initEvents();this.beforeInitEvent.fire(G);this.cfg=new D(this);if(this.isSecure){this.imageRoot=G.IMG_ROOT_SSL;}if(typeof V=="string"){S=V;V=document.getElementById(V);if(!V){V=(L()).cloneNode(false);V.id=S;}}this.id=F.generateId(V);this.element=V;W=this.element.firstChild;if(W){var R=false,Q=false,T=false;do{if(1==W.nodeType){if(!R&&F.hasClass(W,G.CSS_HEADER)){this.header=W;R=true;}else{if(!Q&&F.hasClass(W,G.CSS_BODY)){this.body=W;Q=true;}else{if(!T&&F.hasClass(W,G.CSS_FOOTER)){this.footer=W;T=true;}}}}}while((W=W.nextSibling));}this.initDefaultConfig();F.addClass(this.element,G.CSS_MODULE);if(U){this.cfg.applyConfig(U,true);}if(!D.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}this.initEvent.fire(G);},initResizeMonitor:function(){var R=(I.gecko&&this.platform=="windows");if(R){var Q=this;setTimeout(function(){Q._initResizeMonitor();},0);}else{this._initResizeMonitor();}},_initResizeMonitor:function(){var Q,S,U;function W(){G.textResizeEvent.fire();}if(!I.opera){S=F.get("_yuiResizeMonitor");var V=this._supportsCWResize();if(!S){S=document.createElement("iframe");if(this.isSecure&&G.RESIZE_MONITOR_SECURE_URL&&I.ie){S.src=G.RESIZE_MONITOR_SECURE_URL;}if(!V){U=["'); + tinymce.ScriptLoader.markDone(u); + } + } + }, + + /** + * Executes a color picker on the specified element id. When the user + * then selects a color it will be set as the value of the specified element. + * + * @method pickColor + * @param {DOMEvent} e DOM event object. + * @param {string} element_id Element id to be filled with the color value from the picker. + */ + pickColor : function(e, element_id) { + this.execCommand('mceColorPicker', true, { + color : document.getElementById(element_id).value, + func : function(c) { + document.getElementById(element_id).value = c; + + try { + document.getElementById(element_id).onchange(); + } catch (ex) { + // Try fire event, ignore errors + } + } + }); + }, + + /** + * Opens a filebrowser/imagebrowser this will set the output value from + * the browser as a value on the specified element. + * + * @method openBrowser + * @param {string} element_id Id of the element to set value in. + * @param {string} type Type of browser to open image/file/flash. + * @param {string} option Option name to get the file_broswer_callback function name from. + */ + openBrowser : function(element_id, type, option) { + tinyMCEPopup.restoreSelection(); + this.editor.execCallback('file_browser_callback', element_id, document.getElementById(element_id).value, type, window); + }, + + /** + * Creates a confirm dialog. Please don't use the blocking behavior of this + * native version use the callback method instead then it can be extended. + * + * @method confirm + * @param {String} t Title for the new confirm dialog. + * @param {function} cb Callback function to be executed after the user has selected ok or cancel. + * @param {Object} s Optional scope to execute the callback in. + */ + confirm : function(t, cb, s) { + this.editor.windowManager.confirm(t, cb, s, window); + }, + + /** + * Creates a alert dialog. Please don't use the blocking behavior of this + * native version use the callback method instead then it can be extended. + * + * @method alert + * @param {String} t Title for the new alert dialog. + * @param {function} cb Callback function to be executed after the user has selected ok. + * @param {Object} s Optional scope to execute the callback in. + */ + alert : function(tx, cb, s) { + this.editor.windowManager.alert(tx, cb, s, window); + }, + + /** + * Closes the current window. + * + * @method close + */ + close : function() { + var t = this; + + // To avoid domain relaxing issue in Opera + function close() { + t.editor.windowManager.close(window); + tinymce = tinyMCE = t.editor = t.params = t.dom = t.dom.doc = null; // Cleanup + }; + + if (tinymce.isOpera) + t.getWin().setTimeout(close, 0); + else + close(); + }, + + // Internal functions + + _restoreSelection : function() { + var e = window.event.srcElement; + + if (e.nodeName == 'INPUT' && (e.type == 'submit' || e.type == 'button')) + tinyMCEPopup.restoreSelection(); + }, + +/* _restoreSelection : function() { + var e = window.event.srcElement; + + // If user focus a non text input or textarea + if ((e.nodeName != 'INPUT' && e.nodeName != 'TEXTAREA') || e.type != 'text') + tinyMCEPopup.restoreSelection(); + },*/ + + _onDOMLoaded : function() { + var t = tinyMCEPopup, ti = document.title, bm, h, nv; + + if (t.domLoaded) + return; + + t.domLoaded = 1; + + // Translate page + if (t.features.translate_i18n !== false) { + h = document.body.innerHTML; + + // Replace a=x with a="x" in IE + if (tinymce.isIE) + h = h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi, ' $1="$2"') + + document.dir = t.editor.getParam('directionality',''); + + if ((nv = t.editor.translate(h)) && nv != h) + document.body.innerHTML = nv; + + if ((nv = t.editor.translate(ti)) && nv != ti) + document.title = ti = nv; + } + + if (!t.editor.getParam('browser_preferred_colors', false) || !t.isWindow) + t.dom.addClass(document.body, 'forceColors'); + + document.body.style.display = ''; + + // Restore selection in IE when focus is placed on a non textarea or input element of the type text + if (tinymce.isIE) { + document.attachEvent('onmouseup', tinyMCEPopup._restoreSelection); + + // Add base target element for it since it would fail with modal dialogs + t.dom.add(t.dom.select('head')[0], 'base', {target : '_self'}); + } + + t.restoreSelection(); + t.resizeToInnerSize(); + + // Set inline title + if (!t.isWindow) + t.editor.windowManager.setTitle(window, ti); + else + window.focus(); + + if (!tinymce.isIE && !t.isWindow) { + tinymce.dom.Event._add(document, 'focus', function() { + t.editor.windowManager.focus(t.id); + }); + } + + // Patch for accessibility + tinymce.each(t.dom.select('select'), function(e) { + e.onkeydown = tinyMCEPopup._accessHandler; + }); + + // Call onInit + // Init must be called before focus so the selection won't get lost by the focus call + tinymce.each(t.listeners, function(o) { + o.func.call(o.scope, t.editor); + }); + + // Move focus to window + if (t.getWindowArg('mce_auto_focus', true)) { + window.focus(); + + // Focus element with mceFocus class + tinymce.each(document.forms, function(f) { + tinymce.each(f.elements, function(e) { + if (t.dom.hasClass(e, 'mceFocus') && !e.disabled) { + e.focus(); + return false; // Break loop + } + }); + }); + } + + document.onkeyup = tinyMCEPopup._closeWinKeyHandler; + }, + + _accessHandler : function(e) { + e = e || window.event; + + if (e.keyCode == 13 || e.keyCode == 32) { + e = e.target || e.srcElement; + + if (e.onchange) + e.onchange(); + + return tinymce.dom.Event.cancel(e); + } + }, + + _closeWinKeyHandler : function(e) { + e = e || window.event; + + if (e.keyCode == 27) + tinyMCEPopup.close(); + }, + + _wait : function() { + // Use IE method + if (document.attachEvent) { + document.attachEvent("onreadystatechange", function() { + if (document.readyState === "complete") { + document.detachEvent("onreadystatechange", arguments.callee); + tinyMCEPopup._onDOMLoaded(); + } + }); + + if (document.documentElement.doScroll && window == window.top) { + (function() { + if (tinyMCEPopup.domLoaded) + return; + + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + document.documentElement.doScroll("left"); + } catch (ex) { + setTimeout(arguments.callee, 0); + return; + } + + tinyMCEPopup._onDOMLoaded(); + })(); + } + + document.attachEvent('onload', tinyMCEPopup._onDOMLoaded); + } else if (document.addEventListener) { + window.addEventListener('DOMContentLoaded', tinyMCEPopup._onDOMLoaded, false); + window.addEventListener('load', tinyMCEPopup._onDOMLoaded, false); + } + } +}; + +tinyMCEPopup.init(); +tinyMCEPopup._wait(); // Wait for DOM Content Loaded diff --git a/include/javascript/tiny_mce/classes/UndoManager.js b/include/javascript/tiny_mce/classes/UndoManager.js new file mode 100644 index 00000000..0ddbc3f3 --- /dev/null +++ b/include/javascript/tiny_mce/classes/UndoManager.js @@ -0,0 +1,198 @@ +/** + * UndoManager.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var Dispatcher = tinymce.util.Dispatcher; + + /** + * This class handles the undo/redo history levels for the editor. Since the build in undo/redo has major drawbacks a custom one was needed. + * + * @class tinymce.UndoManager + */ + tinymce.UndoManager = function(editor) { + var self, index = 0, data = []; + + function getContent() { + return tinymce.trim(editor.getContent({format : 'raw', no_events : 1})); + }; + + return self = { + /** + * State if the user is currently typing or not. This will add a typing operation into one undo + * level instead of one new level for each keystroke. + * + * @field {Boolean} typing + */ + typing : false, + + /** + * This event will fire each time a new undo level is added to the undo manager. + * + * @event onAdd + * @param {tinymce.UndoManager} sender UndoManager instance that got the new level. + * @param {Object} level The new level object containing a bookmark and contents. + */ + onAdd : new Dispatcher(self), + + /** + * This event will fire when the user make an undo of a change. + * + * @event onUndo + * @param {tinymce.UndoManager} sender UndoManager instance that got the new level. + * @param {Object} level The old level object containing a bookmark and contents. + */ + onUndo : new Dispatcher(self), + + /** + * This event will fire when the user make an redo of a change. + * + * @event onRedo + * @param {tinymce.UndoManager} sender UndoManager instance that got the new level. + * @param {Object} level The old level object containing a bookmark and contents. + */ + onRedo : new Dispatcher(self), + + /** + * Stores away a bookmark to be used when performing an undo action so that the selection is before + * the change has been made. + * + * @method beforeChange + */ + beforeChange : function() { + // Set before bookmark on previous level + if (data[index]) + data[index].beforeBookmark = editor.selection.getBookmark(2, true); + }, + + /** + * Adds a new undo level/snapshot to the undo list. + * + * @method add + * @param {Object} l Optional undo level object to add. + * @return {Object} Undo level that got added or null it a level wasn't needed. + */ + add : function(level) { + var i, settings = editor.settings, lastLevel; + + level = level || {}; + level.content = getContent(); + + // Add undo level if needed + lastLevel = data[index]; + if (lastLevel && lastLevel.content == level.content) + return null; + + // Time to compress + if (settings.custom_undo_redo_levels) { + if (data.length > settings.custom_undo_redo_levels) { + for (i = 0; i < data.length - 1; i++) + data[i] = data[i + 1]; + + data.length--; + index = data.length; + } + } + + // Get a non intrusive normalized bookmark + level.bookmark = editor.selection.getBookmark(2, true); + + // Crop array if needed + if (index < data.length - 1) + data.length = index + 1; + + data.push(level); + index = data.length - 1; + + self.onAdd.dispatch(self, level); + editor.isNotDirty = 0; + + return level; + }, + + /** + * Undoes the last action. + * + * @method undo + * @return {Object} Undo level or null if no undo was performed. + */ + undo : function() { + var level, i; + + if (self.typing) { + self.add(); + self.typing = false; + } + + if (index > 0) { + level = data[--index]; + + editor.setContent(level.content, {format : 'raw'}); + editor.selection.moveToBookmark(level.beforeBookmark); + + self.onUndo.dispatch(self, level); + } + + return level; + }, + + /** + * Redoes the last action. + * + * @method redo + * @return {Object} Redo level or null if no redo was performed. + */ + redo : function() { + var level; + + if (index < data.length - 1) { + level = data[++index]; + + editor.setContent(level.content, {format : 'raw'}); + editor.selection.moveToBookmark(level.bookmark); + + self.onRedo.dispatch(self, level); + } + + return level; + }, + + /** + * Removes all undo levels. + * + * @method clear + */ + clear : function() { + data = []; + index = 0; + self.typing = false; + }, + + /** + * Returns true/false if the undo manager has any undo levels. + * + * @method hasUndo + * @return {Boolean} true/false if the undo manager has any undo levels. + */ + hasUndo : function() { + return index > 0 || this.typing; + }, + + /** + * Returns true/false if the undo manager has any redo levels. + * + * @method hasRedo + * @return {Boolean} true/false if the undo manager has any redo levels. + */ + hasRedo : function() { + return index < data.length - 1 && !this.typing; + } + }; + }; +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/WindowManager.js b/include/javascript/tiny_mce/classes/WindowManager.js new file mode 100644 index 00000000..fac07260 --- /dev/null +++ b/include/javascript/tiny_mce/classes/WindowManager.js @@ -0,0 +1,231 @@ +/** + * WindowManager.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var Dispatcher = tinymce.util.Dispatcher, each = tinymce.each, isIE = tinymce.isIE, isOpera = tinymce.isOpera; + + /** + * This class handles the creation of native windows and dialogs. This class can be extended to provide for example inline dialogs. + * + * @class tinymce.WindowManager + * @example + * // Opens a new dialog with the file.htm file and the size 320x240 + * // It also adds a custom parameter this can be retrieved by using tinyMCEPopup.getWindowArg inside the dialog. + * tinyMCE.activeEditor.windowManager.open({ + * url : 'file.htm', + * width : 320, + * height : 240 + * }, { + * custom_param : 1 + * }); + * + * // Displays an alert box using the active editors window manager instance + * tinyMCE.activeEditor.windowManager.alert('Hello world!'); + * + * // Displays an confirm box and an alert message will be displayed depending on what you choose in the confirm + * tinyMCE.activeEditor.windowManager.confirm("Do you want to do something", function(s) { + * if (s) + * tinyMCE.activeEditor.windowManager.alert("Ok"); + * else + * tinyMCE.activeEditor.windowManager.alert("Cancel"); + * }); + */ + tinymce.create('tinymce.WindowManager', { + /** + * Constructs a new window manager instance. + * + * @constructor + * @method WindowManager + * @param {tinymce.Editor} ed Editor instance that the windows are bound to. + */ + WindowManager : function(ed) { + var t = this; + + t.editor = ed; + t.onOpen = new Dispatcher(t); + t.onClose = new Dispatcher(t); + t.params = {}; + t.features = {}; + }, + + /** + * Opens a new window. + * + * @method open + * @param {Object} s Optional name/value settings collection contains things like width/height/url etc. + * @option {String} title Window title. + * @option {String} file URL of the file to open in the window. + * @option {Number} width Width in pixels. + * @option {Number} height Height in pixels. + * @option {Boolean} resizable Specifies whether the popup window is resizable or not. + * @option {Boolean} maximizable Specifies whether the popup window has a "maximize" button and can get maximized or not. + * @option {Boolean} inline Specifies whether to display in-line (set to 1 or true for in-line display; requires inlinepopups plugin). + * @option {String/Boolean} popup_css Optional CSS to use in the popup. Set to false to remove the default one. + * @option {Boolean} translate_i18n Specifies whether translation should occur or not of i18 key strings. Default is true. + * @option {String/bool} close_previous Specifies whether a previously opened popup window is to be closed or not (like when calling the file browser window over the advlink popup). + * @option {String/bool} scrollbars Specifies whether the popup window can have scrollbars if required (i.e. content larger than the popup size specified). + * @param {Object} p Optional parameters/arguments collection can be used by the dialogs to retrive custom parameters. + * @option {String} plugin_url url to plugin if opening plugin window that calls tinyMCEPopup.requireLangPack() and needs access to the plugin language js files + */ + open : function(s, p) { + var t = this, f = '', x, y, mo = t.editor.settings.dialog_type == 'modal', w, sw, sh, vp = tinymce.DOM.getViewPort(), u; + + // Default some options + s = s || {}; + p = p || {}; + sw = isOpera ? vp.w : screen.width; // Opera uses windows inside the Opera window + sh = isOpera ? vp.h : screen.height; + s.name = s.name || 'mc_' + new Date().getTime(); + s.width = parseInt(s.width || 320); + s.height = parseInt(s.height || 240); + s.resizable = true; + s.left = s.left || parseInt(sw / 2.0) - (s.width / 2.0); + s.top = s.top || parseInt(sh / 2.0) - (s.height / 2.0); + p.inline = false; + p.mce_width = s.width; + p.mce_height = s.height; + p.mce_auto_focus = s.auto_focus; + + if (mo) { + if (isIE) { + s.center = true; + s.help = false; + s.dialogWidth = s.width + 'px'; + s.dialogHeight = s.height + 'px'; + s.scroll = s.scrollbars || false; + } + } + + // Build features string + each(s, function(v, k) { + if (tinymce.is(v, 'boolean')) + v = v ? 'yes' : 'no'; + + if (!/^(name|url)$/.test(k)) { + if (isIE && mo) + f += (f ? ';' : '') + k + ':' + v; + else + f += (f ? ',' : '') + k + '=' + v; + } + }); + + t.features = s; + t.params = p; + t.onOpen.dispatch(t, s, p); + + u = s.url || s.file; + u = tinymce._addVer(u); + + try { + if (isIE && mo) { + w = 1; + window.showModalDialog(u, window, f); + } else + w = window.open(u, s.name, f); + } catch (ex) { + // Ignore + } + + if (!w) + alert(t.editor.getLang('popup_blocked')); + }, + + /** + * Closes the specified window. This will also dispatch out a onClose event. + * + * @method close + * @param {Window} w Native window object to close. + */ + close : function(w) { + w.close(); + this.onClose.dispatch(this); + }, + + /** + * Creates a instance of a class. This method was needed since IE can't create instances + * of classes from a parent window due to some reference problem. Any arguments passed after the class name + * will be passed as arguments to the constructor. + * + * @method createInstance + * @param {String} cl Class name to create an instance of. + * @return {Object} Instance of the specified class. + * @example + * var uri = tinyMCEPopup.editor.windowManager.createInstance('tinymce.util.URI', 'http://www.somesite.com'); + * alert(uri.getURI()); + */ + createInstance : function(cl, a, b, c, d, e) { + var f = tinymce.resolve(cl); + + return new f(a, b, c, d, e); + }, + + /** + * Creates a confirm dialog. Please don't use the blocking behavior of this + * native version use the callback method instead then it can be extended. + * + * @method confirm + * @param {String} t Title for the new confirm dialog. + * @param {function} cb Callback function to be executed after the user has selected ok or cancel. + * @param {Object} s Optional scope to execute the callback in. + * @example + * // Displays an confirm box and an alert message will be displayed depending on what you choose in the confirm + * tinyMCE.activeEditor.windowManager.confirm("Do you want to do something", function(s) { + * if (s) + * tinyMCE.activeEditor.windowManager.alert("Ok"); + * else + * tinyMCE.activeEditor.windowManager.alert("Cancel"); + * }); + */ + confirm : function(t, cb, s, w) { + w = w || window; + + cb.call(s || this, w.confirm(this._decode(this.editor.getLang(t, t)))); + }, + + /** + * Creates a alert dialog. Please don't use the blocking behavior of this + * native version use the callback method instead then it can be extended. + * + * @method alert + * @param {String} t Title for the new alert dialog. + * @param {function} cb Callback function to be executed after the user has selected ok. + * @param {Object} s Optional scope to execute the callback in. + * @example + * // Displays an alert box using the active editors window manager instance + * tinyMCE.activeEditor.windowManager.alert('Hello world!'); + */ + alert : function(tx, cb, s, w) { + var t = this; + + w = w || window; + w.alert(t._decode(t.editor.getLang(tx, tx))); + + if (cb) + cb.call(s || t); + }, + + /** + * Resizes the specified window or id. + * + * @param {Number} dw Delta width. + * @param {Number} dh Delta height. + * @param {window/id} win Window if the dialog isn't inline. Id if the dialog is inline. + */ + resizeBy : function(dw, dh, win) { + win.resizeBy(dw, dh); + }, + + // Internal functions + + _decode : function(s) { + return tinymce.DOM.decode(s).replace(/\\n/g, '\n'); + } + }); +}(tinymce)); \ No newline at end of file diff --git a/include/javascript/tiny_mce/classes/adapter/jquery/adapter.js b/include/javascript/tiny_mce/classes/adapter/jquery/adapter.js new file mode 100644 index 00000000..80399451 --- /dev/null +++ b/include/javascript/tiny_mce/classes/adapter/jquery/adapter.js @@ -0,0 +1,336 @@ +/** + * adapter.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +// #ifdef jquery_adapter + +(function($, tinymce) { + var is = tinymce.is, attrRegExp = /^(href|src|style)$/i, undefined; + + // jQuery is undefined + if (!$) + return alert("Load jQuery first!"); + + // Stick jQuery into the tinymce namespace + tinymce.$ = $; + + // Setup adapter + tinymce.adapter = { + patchEditor : function(editor) { + var fn = $.fn; + + // Adapt the css function to make sure that the data-mce-style + // attribute gets updated with the new style information + function css(name, value) { + var self = this; + + // Remove data-mce-style when set operation occurs + if (value) + self.removeAttr('data-mce-style'); + + return fn.css.apply(self, arguments); + }; + + // Apapt the attr function to make sure that it uses the data-mce- prefixed variants + function attr(name, value) { + var self = this; + + // Update/retrive data-mce- attribute variants + if (attrRegExp.test(name)) { + if (value !== undefined) { + // Use TinyMCE behavior when setting the specifc attributes + self.each(function(i, node) { + editor.dom.setAttrib(node, name, value); + }); + + return self; + } else + return self.attr('data-mce-' + name); + } + + // Default behavior + return fn.attr.apply(self, arguments); + }; + + function htmlPatchFunc(func) { + // Returns a modified function that processes + // the HTML before executing the action this makes sure + // that href/src etc gets moved into the data-mce- variants + return function(content) { + if (content) + content = editor.dom.processHTML(content); + + return func.call(this, content); + }; + }; + + // Patch various jQuery functions to handle tinymce specific attribute and content behavior + // we don't patch the jQuery.fn directly since it will most likely break compatibility + // with other jQuery logic on the page. Only instances created by TinyMCE should be patched. + function patch(jq) { + // Patch some functions, only patch the object once + if (jq.css !== css) { + // Patch css/attr to use the data-mce- prefixed attribute variants + jq.css = css; + jq.attr = attr; + + // Patch HTML functions to use the DOMUtils.processHTML filter logic + jq.html = htmlPatchFunc(fn.html); + jq.append = htmlPatchFunc(fn.append); + jq.prepend = htmlPatchFunc(fn.prepend); + jq.after = htmlPatchFunc(fn.after); + jq.before = htmlPatchFunc(fn.before); + jq.replaceWith = htmlPatchFunc(fn.replaceWith); + jq.tinymce = editor; + + // Each pushed jQuery instance needs to be patched + // as well for example when traversing the DOM + jq.pushStack = function() { + return patch(fn.pushStack.apply(this, arguments)); + }; + } + + return jq; + }; + + // Add a $ function on each editor instance this one is scoped for the editor document object + // this way you can do chaining like this tinymce.get(0).$('p').append('text').css('color', 'red'); + editor.$ = function(selector, scope) { + var doc = editor.getDoc(); + + return patch($(selector || doc, doc || scope)); + }; + } + }; + + // Patch in core NS functions + tinymce.extend = $.extend; + tinymce.extend(tinymce, { + map : $.map, + grep : function(a, f) {return $.grep(a, f || function(){return 1;});}, + inArray : function(a, v) {return $.inArray(v, a || []);} + + /* Didn't iterate stylesheets + each : function(o, cb, s) { + if (!o) + return 0; + + var r = 1; + + $.each(o, function(nr, el){ + if (cb.call(s, el, nr, o) === false) { + r = 0; + return false; + } + }); + + return r; + }*/ + }); + + // Patch in functions in various clases + // Add a "#ifndefjquery" statement around each core API function you add below + var patches = { + 'tinymce.dom.DOMUtils' : { + /* + addClass : function(e, c) { + if (is(e, 'array') && is(e[0], 'string')) + e = e.join(',#'); + return (e && $(is(e, 'string') ? '#' + e : e) + .addClass(c) + .attr('class')) || false; + }, + + hasClass : function(n, c) { + return $(is(n, 'string') ? '#' + n : n).hasClass(c); + }, + + removeClass : function(e, c) { + if (!e) + return false; + + var r = []; + + $(is(e, 'string') ? '#' + e : e) + .removeClass(c) + .each(function(){ + r.push(this.className); + }); + + return r.length == 1 ? r[0] : r; + }, + */ + + select : function(pattern, scope) { + var t = this; + + return $.find(pattern, t.get(scope) || t.get(t.settings.root_element) || t.doc, []); + }, + + is : function(n, patt) { + return $(this.get(n)).is(patt); + } + + /* + show : function(e) { + if (is(e, 'array') && is(e[0], 'string')) + e = e.join(',#'); + + $(is(e, 'string') ? '#' + e : e).css('display', 'block'); + }, + + hide : function(e) { + if (is(e, 'array') && is(e[0], 'string')) + e = e.join(',#'); + + $(is(e, 'string') ? '#' + e : e).css('display', 'none'); + }, + + isHidden : function(e) { + return $(is(e, 'string') ? '#' + e : e).is(':hidden'); + }, + + insertAfter : function(n, e) { + return $(is(e, 'string') ? '#' + e : e).after(n); + }, + + replace : function(o, n, k) { + n = $(is(n, 'string') ? '#' + n : n); + + if (k) + n.children().appendTo(o); + + n.replaceWith(o); + }, + + setStyle : function(n, na, v) { + if (is(n, 'array') && is(n[0], 'string')) + n = n.join(',#'); + + $(is(n, 'string') ? '#' + n : n).css(na, v); + }, + + getStyle : function(n, na, c) { + return $(is(n, 'string') ? '#' + n : n).css(na); + }, + + setStyles : function(e, o) { + if (is(e, 'array') && is(e[0], 'string')) + e = e.join(',#'); + $(is(e, 'string') ? '#' + e : e).css(o); + }, + + setAttrib : function(e, n, v) { + var t = this, s = t.settings; + + if (is(e, 'array') && is(e[0], 'string')) + e = e.join(',#'); + + e = $(is(e, 'string') ? '#' + e : e); + + switch (n) { + case "style": + e.each(function(i, v){ + if (s.keep_values) + $(v).attr('data-mce-style', v); + + v.style.cssText = v; + }); + break; + + case "class": + e.each(function(){ + this.className = v; + }); + break; + + case "src": + case "href": + e.each(function(i, v){ + if (s.keep_values) { + if (s.url_converter) + v = s.url_converter.call(s.url_converter_scope || t, v, n, v); + + t.setAttrib(v, 'data-mce-' + n, v); + } + }); + + break; + } + + if (v !== null && v.length !== 0) + e.attr(n, '' + v); + else + e.removeAttr(n); + }, + + setAttribs : function(e, o) { + var t = this; + + $.each(o, function(n, v){ + t.setAttrib(e,n,v); + }); + } + */ + } + +/* + 'tinymce.dom.Event' : { + add : function (o, n, f, s) { + var lo, cb; + + cb = function(e) { + e.target = e.target || this; + f.call(s || this, e); + }; + + if (is(o, 'array') && is(o[0], 'string')) + o = o.join(',#'); + o = $(is(o, 'string') ? '#' + o : o); + if (n == 'init') { + o.ready(cb, s); + } else { + if (s) { + o.bind(n, s, cb); + } else { + o.bind(n, cb); + } + } + + lo = this._jqLookup || (this._jqLookup = []); + lo.push({func : f, cfunc : cb}); + + return cb; + }, + + remove : function(o, n, f) { + // Find cfunc + $(this._jqLookup).each(function() { + if (this.func === f) + f = this.cfunc; + }); + + if (is(o, 'array') && is(o[0], 'string')) + o = o.join(',#'); + + $(is(o, 'string') ? '#' + o : o).unbind(n,f); + + return true; + } + } +*/ + }; + + // Patch functions after a class is created + tinymce.onCreate = function(ty, c, p) { + tinymce.extend(p, patches[c]); + }; +})(window.jQuery, tinymce); + +// #endif diff --git a/include/javascript/tiny_mce/classes/adapter/jquery/jquery.tinymce.js b/include/javascript/tiny_mce/classes/adapter/jquery/jquery.tinymce.js new file mode 100644 index 00000000..4187dc28 --- /dev/null +++ b/include/javascript/tiny_mce/classes/adapter/jquery/jquery.tinymce.js @@ -0,0 +1,336 @@ +/** + * jquery.tinymce.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function($) { + var undefined, + lazyLoading, + delayedInits = [], + win = window; + + $.fn.tinymce = function(settings) { + var self = this, url, ed, base, pos, lang, query = "", suffix = ""; + + // No match then just ignore the call + if (!self.length) + return self; + + // Get editor instance + if (!settings) + return tinyMCE.get(self[0].id); + + self.css('visibility', 'hidden'); // Hide textarea to avoid flicker + + function init() { + var editors = [], initCount = 0; + + // Apply patches to the jQuery object, only once + if (applyPatch) { + applyPatch(); + applyPatch = null; + } + + // Create an editor instance for each matched node + self.each(function(i, node) { + var ed, id = node.id, oninit = settings.oninit; + + // Generate unique id for target element if needed + if (!id) + node.id = id = tinymce.DOM.uniqueId(); + + // Create editor instance and render it + ed = new tinymce.Editor(id, settings); + editors.push(ed); + + ed.onInit.add(function() { + var scope, func = oninit; + + self.css('visibility', ''); + + // Run this if the oninit setting is defined + // this logic will fire the oninit callback ones each + // matched editor instance is initialized + if (oninit) { + // Fire the oninit event ones each editor instance is initialized + if (++initCount == editors.length) { + if (tinymce.is(func, "string")) { + scope = (func.indexOf(".") === -1) ? null : tinymce.resolve(func.replace(/\.\w+$/, "")); + func = tinymce.resolve(func); + } + + // Call the oninit function with the object + func.apply(scope || tinymce, editors); + } + } + }); + }); + + // Render the editor instances in a separate loop since we + // need to have the full editors array used in the onInit calls + $.each(editors, function(i, ed) { + ed.render(); + }); + } + + // Load TinyMCE on demand, if we need to + if (!win["tinymce"] && !lazyLoading && (url = settings.script_url)) { + lazyLoading = 1; + base = url.substring(0, url.lastIndexOf("/")); + + // Check if it's a dev/src version they want to load then + // make sure that all plugins, themes etc are loaded in source mode aswell + if (/_(src|dev)\.js/g.test(url)) + suffix = "_src"; + + // Parse out query part, this will be appended to all scripts, css etc to clear browser cache + pos = url.lastIndexOf("?"); + if (pos != -1) + query = url.substring(pos + 1); + + // Setup tinyMCEPreInit object this will later be used by the TinyMCE + // core script to locate other resources like CSS files, dialogs etc + // You can also predefined a tinyMCEPreInit object and then it will use that instead + win.tinyMCEPreInit = win.tinyMCEPreInit || { + base : base, + suffix : suffix, + query : query + }; + + // url contains gzip then we assume it's a compressor + if (url.indexOf('gzip') != -1) { + lang = settings.language || "en"; + url = url + (/\?/.test(url) ? '&' : '?') + "js=true&core=true&suffix=" + escape(suffix) + "&themes=" + escape(settings.theme) + "&plugins=" + escape(settings.plugins) + "&languages=" + lang; + + // Check if compressor script is already loaded otherwise setup a basic one + if (!win["tinyMCE_GZ"]) { + tinyMCE_GZ = { + start : function() { + tinymce.suffix = suffix; + + function load(url) { + tinymce.ScriptLoader.markDone(tinyMCE.baseURI.toAbsolute(url)); + } + + // Add core languages + load("langs/" + lang + ".js"); + + // Add themes with languages + load("themes/" + settings.theme + "/editor_template" + suffix + ".js"); + load("themes/" + settings.theme + "/langs/" + lang + ".js"); + + // Add plugins with languages + $.each(settings.plugins.split(","), function(i, name) { + if (name) { + load("plugins/" + name + "/editor_plugin" + suffix + ".js"); + load("plugins/" + name + "/langs/" + lang + ".js"); + } + }); + }, + + end : function() { + } + } + } + } + + // Load the script cached and execute the inits once it's done + $.ajax({ + type : "GET", + url : url, + dataType : "script", + cache : true, + success : function() { + tinymce.dom.Event.domLoaded = 1; + lazyLoading = 2; + + // Execute callback after mainscript has been loaded and before the initialization occurs + if (settings.script_loaded) + settings.script_loaded(); + + init(); + + $.each(delayedInits, function(i, init) { + init(); + }); + } + }); + } else { + // Delay the init call until tinymce is loaded + if (lazyLoading === 1) + delayedInits.push(init); + else + init(); + } + + return self; + }; + + // Add :tinymce psuedo selector this will select elements that has been converted into editor instances + // it's now possible to use things like $('*:tinymce') to get all TinyMCE bound elements. + $.extend($.expr[":"], { + tinymce : function(e) { + return e.id && !!tinyMCE.get(e.id); + } + }); + + // This function patches internal jQuery functions so that if + // you for example remove an div element containing an editor it's + // automatically destroyed by the TinyMCE API + function applyPatch() { + // Removes any child editor instances by looking for editor wrapper elements + function removeEditors(name) { + // If the function is remove + if (name === "remove") { + this.each(function(i, node) { + var ed = tinyMCEInstance(node); + + if (ed) + ed.remove(); + }); + } + + this.find("span.mceEditor,div.mceEditor").each(function(i, node) { + var ed = tinyMCE.get(node.id.replace(/_parent$/, "")); + + if (ed) + ed.remove(); + }); + } + + // Loads or saves contents from/to textarea if the value + // argument is defined it will set the TinyMCE internal contents + function loadOrSave(value) { + var self = this, ed; + + // Handle set value + if (value !== undefined) { + removeEditors.call(self); + + // Saves the contents before get/set value of textarea/div + self.each(function(i, node) { + var ed; + + if (ed = tinyMCE.get(node.id)) + ed.setContent(value); + }); + } else if (self.length > 0) { + // Handle get value + if (ed = tinyMCE.get(self[0].id)) + return ed.getContent(); + } + } + + // Returns tinymce instance for the specified element or null if it wasn't found + function tinyMCEInstance(element) { + var ed = null; + + (element) && (element.id) && (win["tinymce"]) && (ed = tinyMCE.get(element.id)); + + return ed; + } + + // Checks if the specified set contains tinymce instances + function containsTinyMCE(matchedSet) { + return !!((matchedSet) && (matchedSet.length) && (win["tinymce"]) && (matchedSet.is(":tinymce"))); + } + + // Patch various jQuery functions + var jQueryFn = {}; + + // Patch some setter/getter functions these will + // now be able to set/get the contents of editor instances for + // example $('#editorid').html('Content'); will update the TinyMCE iframe instance + $.each(["text", "html", "val"], function(i, name) { + var origFn = jQueryFn[name] = $.fn[name], + textProc = (name === "text"); + + $.fn[name] = function(value) { + var self = this; + + if (!containsTinyMCE(self)) + return origFn.apply(self, arguments); + + if (value !== undefined) { + loadOrSave.call(self.filter(":tinymce"), value); + origFn.apply(self.not(":tinymce"), arguments); + + return self; // return original set for chaining + } else { + var ret = ""; + var args = arguments; + + (textProc ? self : self.eq(0)).each(function(i, node) { + var ed = tinyMCEInstance(node); + + ret += ed ? (textProc ? ed.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g, "") : ed.getContent()) : origFn.apply($(node), args); + }); + + return ret; + } + }; + }); + + // Makes it possible to use $('#id').append("content"); to append contents to the TinyMCE editor iframe + $.each(["append", "prepend"], function(i, name) { + var origFn = jQueryFn[name] = $.fn[name], + prepend = (name === "prepend"); + + $.fn[name] = function(value) { + var self = this; + + if (!containsTinyMCE(self)) + return origFn.apply(self, arguments); + + if (value !== undefined) { + self.filter(":tinymce").each(function(i, node) { + var ed = tinyMCEInstance(node); + + ed && ed.setContent(prepend ? value + ed.getContent() : ed.getContent() + value); + }); + + origFn.apply(self.not(":tinymce"), arguments); + + return self; // return original set for chaining + } + }; + }); + + // Makes sure that the editor instance gets properly destroyed when the parent element is removed + $.each(["remove", "replaceWith", "replaceAll", "empty"], function(i, name) { + var origFn = jQueryFn[name] = $.fn[name]; + + $.fn[name] = function() { + removeEditors.call(this, name); + + return origFn.apply(this, arguments); + }; + }); + + jQueryFn.attr = $.fn.attr; + + // Makes sure that $('#tinymce_id').attr('value') gets the editors current HTML contents + $.fn.attr = function(name, value, type) { + var self = this; + + if ((!name) || (name !== "value") || (!containsTinyMCE(self))) + return jQueryFn.attr.call(self, name, value, type); + + if (value !== undefined) { + loadOrSave.call(self.filter(":tinymce"), value); + jQueryFn.attr.call(self.not(":tinymce"), name, value, type); + + return self; // return original set for chaining + } else { + var node = self[0], ed = tinyMCEInstance(node); + + return ed ? ed.getContent() : jQueryFn.attr.call($(node), name, value, type); + } + }; + } +})(jQuery); \ No newline at end of file diff --git a/include/javascript/tiny_mce/classes/adapter/prototype/adapter.js b/include/javascript/tiny_mce/classes/adapter/prototype/adapter.js new file mode 100644 index 00000000..d7c08ab3 --- /dev/null +++ b/include/javascript/tiny_mce/classes/adapter/prototype/adapter.js @@ -0,0 +1,39 @@ +/** + * adapter.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +// #ifdef prototype_adapter + +(function() { + if (!window.Prototype) + return alert("Load prototype first!"); + + // Patch in core NS functions + tinymce.extend(tinymce, { + trim : function(s) {return s ? s.strip() : '';}, + inArray : function(a, v) {return a && a.indexOf ? a.indexOf(v) : -1;} + }); + + // Patch in functions in various clases + // Add a "#ifndefjquery" statement around each core API function you add below + var patches = { + 'tinymce.util.JSON' : { + /*serialize : function(o) { + return o.toJSON(); + }*/ + }, + }; + + // Patch functions after a class is created + tinymce.onCreate = function(ty, c, p) { + tinymce.extend(p, patches[c]); + }; +})(); + +// #endif diff --git a/include/javascript/tiny_mce/classes/dom/DOMUtils.js b/include/javascript/tiny_mce/classes/dom/DOMUtils.js new file mode 100644 index 00000000..4fbc5df6 --- /dev/null +++ b/include/javascript/tiny_mce/classes/dom/DOMUtils.js @@ -0,0 +1,1864 @@ +/** + * DOMUtils.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + // Shorten names + var each = tinymce.each, + is = tinymce.is, + isWebKit = tinymce.isWebKit, + isIE = tinymce.isIE, + Entities = tinymce.html.Entities, + simpleSelectorRe = /^([a-z0-9],?)+$/i, + blockElementsMap = tinymce.html.Schema.blockElementsMap, + whiteSpaceRegExp = /^[ \t\r\n]*$/; + + /** + * Utility class for various DOM manipulation and retrival functions. + * + * @class tinymce.dom.DOMUtils + * @example + * // Add a class to an element by id in the page + * tinymce.DOM.addClass('someid', 'someclass'); + * + * // Add a class to an element by id inside the editor + * tinyMCE.activeEditor.dom.addClass('someid', 'someclass'); + */ + tinymce.create('tinymce.dom.DOMUtils', { + doc : null, + root : null, + files : null, + pixelStyles : /^(top|left|bottom|right|width|height|borderWidth)$/, + props : { + "for" : "htmlFor", + "class" : "className", + className : "className", + checked : "checked", + disabled : "disabled", + maxlength : "maxLength", + readonly : "readOnly", + selected : "selected", + value : "value", + id : "id", + name : "name", + type : "type" + }, + + /** + * Constructs a new DOMUtils instance. Consult the Wiki for more details on settings etc for this class. + * + * @constructor + * @method DOMUtils + * @param {Document} d Document reference to bind the utility class to. + * @param {settings} s Optional settings collection. + */ + DOMUtils : function(d, s) { + var t = this, globalStyle; + + t.doc = d; + t.win = window; + t.files = {}; + t.cssFlicker = false; + t.counter = 0; + t.stdMode = !tinymce.isIE || d.documentMode >= 8; + t.boxModel = !tinymce.isIE || d.compatMode == "CSS1Compat" || t.stdMode; + t.hasOuterHTML = "outerHTML" in d.createElement("a"); + + t.settings = s = tinymce.extend({ + keep_values : false, + hex_colors : 1 + }, s); + + t.schema = s.schema; + t.styles = new tinymce.html.Styles({ + url_converter : s.url_converter, + url_converter_scope : s.url_converter_scope + }, s.schema); + + // Fix IE6SP2 flicker and check it failed for pre SP2 + if (tinymce.isIE6) { + try { + d.execCommand('BackgroundImageCache', false, true); + } catch (e) { + t.cssFlicker = true; + } + } + + if (isIE) { + // Add missing HTML 4/5 elements to IE + ('abbr article aside audio canvas ' + + 'details figcaption figure footer ' + + 'header hgroup mark menu meter nav ' + + 'output progress section summary ' + + 'time video').replace(/\w+/g, function(name) { + d.createElement(name); + }); + } + + tinymce.addUnload(t.destroy, t); + }, + + /** + * Returns the root node of the document this is normally the body but might be a DIV. Parents like getParent will not + * go above the point of this root node. + * + * @method getRoot + * @return {Element} Root element for the utility class. + */ + getRoot : function() { + var t = this, s = t.settings; + + return (s && t.get(s.root_element)) || t.doc.body; + }, + + /** + * Returns the viewport of the window. + * + * @method getViewPort + * @param {Window} w Optional window to get viewport of. + * @return {Object} Viewport object with fields x, y, w and h. + */ + getViewPort : function(w) { + var d, b; + + w = !w ? this.win : w; + d = w.document; + b = this.boxModel ? d.documentElement : d.body; + + // Returns viewport size excluding scrollbars + return { + x : w.pageXOffset || b.scrollLeft, + y : w.pageYOffset || b.scrollTop, + w : w.innerWidth || b.clientWidth, + h : w.innerHeight || b.clientHeight + }; + }, + + /** + * Returns the rectangle for a specific element. + * + * @method getRect + * @param {Element/String} e Element object or element ID to get rectange from. + * @return {object} Rectange for specified element object with x, y, w, h fields. + */ + getRect : function(e) { + var p, t = this, sr; + + e = t.get(e); + p = t.getPos(e); + sr = t.getSize(e); + + return { + x : p.x, + y : p.y, + w : sr.w, + h : sr.h + }; + }, + + /** + * Returns the size dimensions of the specified element. + * + * @method getSize + * @param {Element/String} e Element object or element ID to get rectange from. + * @return {object} Rectange for specified element object with w, h fields. + */ + getSize : function(e) { + var t = this, w, h; + + e = t.get(e); + w = t.getStyle(e, 'width'); + h = t.getStyle(e, 'height'); + + // Non pixel value, then force offset/clientWidth + if (w.indexOf('px') === -1) + w = 0; + + // Non pixel value, then force offset/clientWidth + if (h.indexOf('px') === -1) + h = 0; + + return { + w : parseInt(w) || e.offsetWidth || e.clientWidth, + h : parseInt(h) || e.offsetHeight || e.clientHeight + }; + }, + + /** + * Returns a node by the specified selector function. This function will + * loop through all parent nodes and call the specified function for each node. + * If the function then returns true indicating that it has found what it was looking for, the loop execution will then end + * and the node it found will be returned. + * + * @method getParent + * @param {Node/String} n DOM node to search parents on or ID string. + * @param {function} f Selection function to execute on each node or CSS pattern. + * @param {Node} r Optional root element, never go below this point. + * @return {Node} DOM Node or null if it wasn't found. + */ + getParent : function(n, f, r) { + return this.getParents(n, f, r, false); + }, + + /** + * Returns a node list of all parents matching the specified selector function or pattern. + * If the function then returns true indicating that it has found what it was looking for and that node will be collected. + * + * @method getParents + * @param {Node/String} n DOM node to search parents on or ID string. + * @param {function} f Selection function to execute on each node or CSS pattern. + * @param {Node} r Optional root element, never go below this point. + * @return {Array} Array of nodes or null if it wasn't found. + */ + getParents : function(n, f, r, c) { + var t = this, na, se = t.settings, o = []; + + n = t.get(n); + c = c === undefined; + + if (se.strict_root) + r = r || t.getRoot(); + + // Wrap node name as func + if (is(f, 'string')) { + na = f; + + if (f === '*') { + f = function(n) {return n.nodeType == 1;}; + } else { + f = function(n) { + return t.is(n, na); + }; + } + } + + while (n) { + if (n == r || !n.nodeType || n.nodeType === 9) + break; + + if (!f || f(n)) { + if (c) + o.push(n); + else + return n; + } + + n = n.parentNode; + } + + return c ? o : null; + }, + + /** + * Returns the specified element by ID or the input element if it isn't a string. + * + * @method get + * @param {String/Element} n Element id to look for or element to just pass though. + * @return {Element} Element matching the specified id or null if it wasn't found. + */ + get : function(e) { + var n; + + if (e && this.doc && typeof(e) == 'string') { + n = e; + e = this.doc.getElementById(e); + + // IE and Opera returns meta elements when they match the specified input ID, but getElementsByName seems to do the trick + if (e && e.id !== n) + return this.doc.getElementsByName(n)[1]; + } + + return e; + }, + + /** + * Returns the next node that matches selector or function + * + * @method getNext + * @param {Node} node Node to find siblings from. + * @param {String/function} selector Selector CSS expression or function. + * @return {Node} Next node item matching the selector or null if it wasn't found. + */ + getNext : function(node, selector) { + return this._findSib(node, selector, 'nextSibling'); + }, + + /** + * Returns the previous node that matches selector or function + * + * @method getPrev + * @param {Node} node Node to find siblings from. + * @param {String/function} selector Selector CSS expression or function. + * @return {Node} Previous node item matching the selector or null if it wasn't found. + */ + getPrev : function(node, selector) { + return this._findSib(node, selector, 'previousSibling'); + }, + + // #ifndef jquery + + /** + * Selects specific elements by a CSS level 3 pattern. For example "div#a1 p.test". + * This function is optimized for the most common patterns needed in TinyMCE but it also performes good enough + * on more complex patterns. + * + * @method select + * @param {String} p CSS level 1 pattern to select/find elements by. + * @param {Object} s Optional root element/scope element to search in. + * @return {Array} Array with all matched elements. + * @example + * // Adds a class to all paragraphs in the currently active editor + * tinyMCE.activeEditor.dom.addClass(tinyMCE.activeEditor.dom.select('p'), 'someclass'); + * + * // Adds a class to all spans that has the test class in the currently active editor + * tinyMCE.activeEditor.dom.addClass(tinyMCE.activeEditor.dom.select('span.test'), 'someclass') + */ + select : function(pa, s) { + var t = this; + + return tinymce.dom.Sizzle(pa, t.get(s) || t.get(t.settings.root_element) || t.doc, []); + }, + + /** + * Returns true/false if the specified element matches the specified css pattern. + * + * @method is + * @param {Node/NodeList} n DOM node to match or an array of nodes to match. + * @param {String} selector CSS pattern to match the element agains. + */ + is : function(n, selector) { + var i; + + // If it isn't an array then try to do some simple selectors instead of Sizzle for to boost performance + if (n.length === undefined) { + // Simple all selector + if (selector === '*') + return n.nodeType == 1; + + // Simple selector just elements + if (simpleSelectorRe.test(selector)) { + selector = selector.toLowerCase().split(/,/); + n = n.nodeName.toLowerCase(); + + for (i = selector.length - 1; i >= 0; i--) { + if (selector[i] == n) + return true; + } + + return false; + } + } + + return tinymce.dom.Sizzle.matches(selector, n.nodeType ? [n] : n).length > 0; + }, + + // #endif + + /** + * Adds the specified element to another element or elements. + * + * @method add + * @param {String/Element/Array} Element id string, DOM node element or array of id's or elements to add to. + * @param {String/Element} n Name of new element to add or existing element to add. + * @param {Object} a Optional object collection with arguments to add to the new element(s). + * @param {String} h Optional inner HTML contents to add for each element. + * @param {Boolean} c Optional internal state to indicate if it should create or add. + * @return {Element/Array} Element that got created or array with elements if multiple elements where passed. + * @example + * // Adds a new paragraph to the end of the active editor + * tinyMCE.activeEditor.dom.add(tinyMCE.activeEditor.getBody(), 'p', {title : 'my title'}, 'Some content'); + */ + add : function(p, n, a, h, c) { + var t = this; + + return this.run(p, function(p) { + var e, k; + + e = is(n, 'string') ? t.doc.createElement(n) : n; + t.setAttribs(e, a); + + if (h) { + if (h.nodeType) + e.appendChild(h); + else + t.setHTML(e, h); + } + + return !c ? p.appendChild(e) : e; + }); + }, + + /** + * Creates a new element. + * + * @method create + * @param {String} n Name of new element. + * @param {Object} a Optional object name/value collection with element attributes. + * @param {String} h Optional HTML string to set as inner HTML of the element. + * @return {Element} HTML DOM node element that got created. + * @example + * // Adds an element where the caret/selection is in the active editor + * var el = tinyMCE.activeEditor.dom.create('div', {id : 'test', 'class' : 'myclass'}, 'some content'); + * tinyMCE.activeEditor.selection.setNode(el); + */ + create : function(n, a, h) { + return this.add(this.doc.createElement(n), n, a, h, 1); + }, + + /** + * Create HTML string for element. The element will be closed unless an empty inner HTML string is passed. + * + * @method createHTML + * @param {String} n Name of new element. + * @param {Object} a Optional object name/value collection with element attributes. + * @param {String} h Optional HTML string to set as inner HTML of the element. + * @return {String} String with new HTML element like for example: test. + * @example + * // Creates a html chunk and inserts it at the current selection/caret location + * tinyMCE.activeEditor.selection.setContent(tinyMCE.activeEditor.dom.createHTML('a', {href : 'test.html'}, 'some line')); + */ + createHTML : function(n, a, h) { + var o = '', t = this, k; + + o += '<' + n; + + for (k in a) { + if (a.hasOwnProperty(k)) + o += ' ' + k + '="' + t.encode(a[k]) + '"'; + } + + // A call to tinymce.is doesn't work for some odd reason on IE9 possible bug inside their JS runtime + if (typeof(h) != "undefined") + return o + '>' + h + ''; + + return o + ' />'; + }, + + /** + * Removes/deletes the specified element(s) from the DOM. + * + * @method remove + * @param {String/Element/Array} node ID of element or DOM element object or array containing multiple elements/ids. + * @param {Boolean} keep_children Optional state to keep children or not. If set to true all children will be placed at the location of the removed element. + * @return {Element/Array} HTML DOM element that got removed or array of elements depending on input. + * @example + * // Removes all paragraphs in the active editor + * tinyMCE.activeEditor.dom.remove(tinyMCE.activeEditor.dom.select('p')); + * + * // Removes a element by id in the document + * tinyMCE.DOM.remove('mydiv'); + */ + remove : function(node, keep_children) { + return this.run(node, function(node) { + var child, parent = node.parentNode; + + if (!parent) + return null; + + if (keep_children) { + while (child = node.firstChild) { + // IE 8 will crash if you don't remove completely empty text nodes + if (!tinymce.isIE || child.nodeType !== 3 || child.nodeValue) + parent.insertBefore(child, node); + else + node.removeChild(child); + } + } + + return parent.removeChild(node); + }); + }, + + /** + * Sets the CSS style value on a HTML element. The name can be a camelcase string + * or the CSS style name like background-color. + * + * @method setStyle + * @param {String/Element/Array} n HTML element/Element ID or Array of elements/ids to set CSS style value on. + * @param {String} na Name of the style value to set. + * @param {String} v Value to set on the style. + * @example + * // Sets a style value on all paragraphs in the currently active editor + * tinyMCE.activeEditor.dom.setStyle(tinyMCE.activeEditor.dom.select('p'), 'background-color', 'red'); + * + * // Sets a style value to an element by id in the current document + * tinyMCE.DOM.setStyle('mydiv', 'background-color', 'red'); + */ + setStyle : function(n, na, v) { + var t = this; + + return t.run(n, function(e) { + var s, i; + + s = e.style; + + // Camelcase it, if needed + na = na.replace(/-(\D)/g, function(a, b){ + return b.toUpperCase(); + }); + + // Default px suffix on these + if (t.pixelStyles.test(na) && (tinymce.is(v, 'number') || /^[\-0-9\.]+$/.test(v))) + v += 'px'; + + switch (na) { + case 'opacity': + // IE specific opacity + if (isIE) { + s.filter = v === '' ? '' : "alpha(opacity=" + (v * 100) + ")"; + + if (!n.currentStyle || !n.currentStyle.hasLayout) + s.display = 'inline-block'; + } + + // Fix for older browsers + s[na] = s['-moz-opacity'] = s['-khtml-opacity'] = v || ''; + break; + + case 'float': + isIE ? s.styleFloat = v : s.cssFloat = v; + break; + + default: + s[na] = v || ''; + } + + // Force update of the style data + if (t.settings.update_styles) + t.setAttrib(e, 'data-mce-style'); + }); + }, + + /** + * Returns the current style or runtime/computed value of a element. + * + * @method getStyle + * @param {String/Element} n HTML element or element id string to get style from. + * @param {String} na Style name to return. + * @param {Boolean} c Computed style. + * @return {String} Current style or computed style value of a element. + */ + getStyle : function(n, na, c) { + n = this.get(n); + + if (!n) + return; + + // Gecko + if (this.doc.defaultView && c) { + // Remove camelcase + na = na.replace(/[A-Z]/g, function(a){ + return '-' + a; + }); + + try { + return this.doc.defaultView.getComputedStyle(n, null).getPropertyValue(na); + } catch (ex) { + // Old safari might fail + return null; + } + } + + // Camelcase it, if needed + na = na.replace(/-(\D)/g, function(a, b){ + return b.toUpperCase(); + }); + + if (na == 'float') + na = isIE ? 'styleFloat' : 'cssFloat'; + + // IE & Opera + if (n.currentStyle && c) + return n.currentStyle[na]; + + return n.style ? n.style[na] : undefined; + }, + + /** + * Sets multiple styles on the specified element(s). + * + * @method setStyles + * @param {Element/String/Array} e DOM element, element id string or array of elements/ids to set styles on. + * @param {Object} o Name/Value collection of style items to add to the element(s). + * @example + * // Sets styles on all paragraphs in the currently active editor + * tinyMCE.activeEditor.dom.setStyles(tinyMCE.activeEditor.dom.select('p'), {'background-color' : 'red', 'color' : 'green'}); + * + * // Sets styles to an element by id in the current document + * tinyMCE.DOM.setStyles('mydiv', {'background-color' : 'red', 'color' : 'green'}); + */ + setStyles : function(e, o) { + var t = this, s = t.settings, ol; + + ol = s.update_styles; + s.update_styles = 0; + + each(o, function(v, n) { + t.setStyle(e, n, v); + }); + + // Update style info + s.update_styles = ol; + if (s.update_styles) + t.setAttrib(e, s.cssText); + }, + + /** + * Removes all attributes from an element or elements. + * + * @param {Element/String/Array} e DOM element, element id string or array of elements/ids to remove attributes from. + */ + removeAllAttribs: function(e) { + return this.run(e, function(e) { + var i, attrs = e.attributes; + for (i = attrs.length - 1; i >= 0; i--) { + e.removeAttributeNode(attrs.item(i)); + } + }); + }, + + /** + * Sets the specified attributes value of a element or elements. + * + * @method setAttrib + * @param {Element/String/Array} e DOM element, element id string or array of elements/ids to set attribute on. + * @param {String} n Name of attribute to set. + * @param {String} v Value to set on the attribute of this value is falsy like null 0 or '' it will remove the attribute instead. + * @example + * // Sets an attribute to all paragraphs in the active editor + * tinyMCE.activeEditor.dom.setAttrib(tinyMCE.activeEditor.dom.select('p'), 'class', 'myclass'); + * + * // Sets an attribute to a specific element in the current page + * tinyMCE.dom.setAttrib('mydiv', 'class', 'myclass'); + */ + setAttrib : function(e, n, v) { + var t = this; + + // Whats the point + if (!e || !n) + return; + + // Strict XML mode + if (t.settings.strict) + n = n.toLowerCase(); + + return this.run(e, function(e) { + var s = t.settings; + + switch (n) { + case "style": + if (!is(v, 'string')) { + each(v, function(v, n) { + t.setStyle(e, n, v); + }); + + return; + } + + // No mce_style for elements with these since they might get resized by the user + if (s.keep_values) { + if (v && !t._isRes(v)) + e.setAttribute('data-mce-style', v, 2); + else + e.removeAttribute('data-mce-style', 2); + } + + e.style.cssText = v; + break; + + case "class": + e.className = v || ''; // Fix IE null bug + break; + + case "src": + case "href": + if (s.keep_values) { + if (s.url_converter) + v = s.url_converter.call(s.url_converter_scope || t, v, n, e); + + t.setAttrib(e, 'data-mce-' + n, v, 2); + } + + break; + + case "shape": + e.setAttribute('data-mce-style', v); + break; + } + + if (is(v) && v !== null && v.length !== 0) + e.setAttribute(n, '' + v, 2); + else + e.removeAttribute(n, 2); + }); + }, + + /** + * Sets the specified attributes of a element or elements. + * + * @method setAttribs + * @param {Element/String/Array} e DOM element, element id string or array of elements/ids to set attributes on. + * @param {Object} o Name/Value collection of attribute items to add to the element(s). + * @example + * // Sets some attributes to all paragraphs in the active editor + * tinyMCE.activeEditor.dom.setAttribs(tinyMCE.activeEditor.dom.select('p'), {'class' : 'myclass', title : 'some title'}); + * + * // Sets some attributes to a specific element in the current page + * tinyMCE.DOM.setAttribs('mydiv', {'class' : 'myclass', title : 'some title'}); + */ + setAttribs : function(e, o) { + var t = this; + + return this.run(e, function(e) { + each(o, function(v, n) { + t.setAttrib(e, n, v); + }); + }); + }, + + /** + * Returns the specified attribute by name. + * + * @method getAttrib + * @param {String/Element} e Element string id or DOM element to get attribute from. + * @param {String} n Name of attribute to get. + * @param {String} dv Optional default value to return if the attribute didn't exist. + * @return {String} Attribute value string, default value or null if the attribute wasn't found. + */ + getAttrib : function(e, n, dv) { + var v, t = this; + + e = t.get(e); + + if (!e || e.nodeType !== 1) + return false; + + if (!is(dv)) + dv = ''; + + // Try the mce variant for these + if (/^(src|href|style|coords|shape)$/.test(n)) { + v = e.getAttribute("data-mce-" + n); + + if (v) + return v; + } + + if (isIE && t.props[n]) { + v = e[t.props[n]]; + v = v && v.nodeValue ? v.nodeValue : v; + } + + if (!v) + v = e.getAttribute(n, 2); + + // Check boolean attribs + if (/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(n)) { + if (e[t.props[n]] === true && v === '') + return n; + + return v ? n : ''; + } + + // Inner input elements will override attributes on form elements + if (e.nodeName === "FORM" && e.getAttributeNode(n)) + return e.getAttributeNode(n).nodeValue; + + if (n === 'style') { + v = v || e.style.cssText; + + if (v) { + v = t.serializeStyle(t.parseStyle(v), e.nodeName); + + if (t.settings.keep_values && !t._isRes(v)) + e.setAttribute('data-mce-style', v); + } + } + + // Remove Apple and WebKit stuff + if (isWebKit && n === "class" && v) + v = v.replace(/(apple|webkit)\-[a-z\-]+/gi, ''); + + // Handle IE issues + if (isIE) { + switch (n) { + case 'rowspan': + case 'colspan': + // IE returns 1 as default value + if (v === 1) + v = ''; + + break; + + case 'size': + // IE returns +0 as default value for size + if (v === '+0' || v === 20 || v === 0) + v = ''; + + break; + + case 'width': + case 'height': + case 'vspace': + case 'checked': + case 'disabled': + case 'readonly': + if (v === 0) + v = ''; + + break; + + case 'hspace': + // IE returns -1 as default value + if (v === -1) + v = ''; + + break; + + case 'maxlength': + case 'tabindex': + // IE returns default value + if (v === 32768 || v === 2147483647 || v === '32768') + v = ''; + + break; + + case 'multiple': + case 'compact': + case 'noshade': + case 'nowrap': + if (v === 65535) + return n; + + return dv; + + case 'shape': + v = v.toLowerCase(); + break; + + default: + // IE has odd anonymous function for event attributes + if (n.indexOf('on') === 0 && v) + v = tinymce._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/, '$1', '' + v); + } + } + + return (v !== undefined && v !== null && v !== '') ? '' + v : dv; + }, + + /** + * Returns the absolute x, y position of a node. The position will be returned in a object with x, y fields. + * + * @method getPos + * @param {Element/String} n HTML element or element id to get x, y position from. + * @param {Element} ro Optional root element to stop calculations at. + * @return {object} Absolute position of the specified element object with x, y fields. + */ + getPos : function(n, ro) { + var t = this, x = 0, y = 0, e, d = t.doc, r; + + n = t.get(n); + ro = ro || d.body; + + if (n) { + // Use getBoundingClientRect on IE, Opera has it but it's not perfect + if (isIE && !t.stdMode) { + n = n.getBoundingClientRect(); + e = t.boxModel ? d.documentElement : d.body; + x = t.getStyle(t.select('html')[0], 'borderWidth'); // Remove border + x = (x == 'medium' || t.boxModel && !t.isIE6) && 2 || x; + + return {x : n.left + e.scrollLeft - x, y : n.top + e.scrollTop - x}; + } + + r = n; + while (r && r != ro && r.nodeType) { + x += r.offsetLeft || 0; + y += r.offsetTop || 0; + r = r.offsetParent; + } + + r = n.parentNode; + while (r && r != ro && r.nodeType) { + x -= r.scrollLeft || 0; + y -= r.scrollTop || 0; + r = r.parentNode; + } + } + + return {x : x, y : y}; + }, + + /** + * Parses the specified style value into an object collection. This parser will also + * merge and remove any redundant items that browsers might have added. It will also convert non hex + * colors to hex values. Urls inside the styles will also be converted to absolute/relative based on settings. + * + * @method parseStyle + * @param {String} st Style value to parse for example: border:1px solid red;. + * @return {Object} Object representation of that style like {border : '1px solid red'} + */ + parseStyle : function(st) { + return this.styles.parse(st); + }, + + /** + * Serializes the specified style object into a string. + * + * @method serializeStyle + * @param {Object} o Object to serialize as string for example: {border : '1px solid red'} + * @param {String} name Optional element name. + * @return {String} String representation of the style object for example: border: 1px solid red. + */ + serializeStyle : function(o, name) { + return this.styles.serialize(o, name); + }, + + /** + * Imports/loads the specified CSS file into the document bound to the class. + * + * @method loadCSS + * @param {String} u URL to CSS file to load. + * @example + * // Loads a CSS file dynamically into the current document + * tinymce.DOM.loadCSS('somepath/some.css'); + * + * // Loads a CSS file into the currently active editor instance + * tinyMCE.activeEditor.dom.loadCSS('somepath/some.css'); + * + * // Loads a CSS file into an editor instance by id + * tinyMCE.get('someid').dom.loadCSS('somepath/some.css'); + * + * // Loads multiple CSS files into the current document + * tinymce.DOM.loadCSS('somepath/some.css,somepath/someother.css'); + */ + loadCSS : function(u) { + var t = this, d = t.doc, head; + + if (!u) + u = ''; + + head = t.select('head')[0]; + + each(u.split(','), function(u) { + var link; + + if (t.files[u]) + return; + + t.files[u] = true; + link = t.create('link', {rel : 'stylesheet', href : tinymce._addVer(u)}); + + // IE 8 has a bug where dynamically loading stylesheets would produce a 1 item remaining bug + // This fix seems to resolve that issue by realcing the document ones a stylesheet finishes loading + // It's ugly but it seems to work fine. + if (isIE && d.documentMode && d.recalc) { + link.onload = function() { + if (d.recalc) + d.recalc(); + + link.onload = null; + }; + } + + head.appendChild(link); + }); + }, + + /** + * Adds a class to the specified element or elements. + * + * @method addClass + * @param {String/Element/Array} Element ID string or DOM element or array with elements or IDs. + * @param {String} c Class name to add to each element. + * @return {String/Array} String with new class value or array with new class values for all elements. + * @example + * // Adds a class to all paragraphs in the active editor + * tinyMCE.activeEditor.dom.addClass(tinyMCE.activeEditor.dom.select('p'), 'myclass'); + * + * // Adds a class to a specific element in the current page + * tinyMCE.DOM.addClass('mydiv', 'myclass'); + */ + addClass : function(e, c) { + return this.run(e, function(e) { + var o; + + if (!c) + return 0; + + if (this.hasClass(e, c)) + return e.className; + + o = this.removeClass(e, c); + + return e.className = (o != '' ? (o + ' ') : '') + c; + }); + }, + + /** + * Removes a class from the specified element or elements. + * + * @method removeClass + * @param {String/Element/Array} Element ID string or DOM element or array with elements or IDs. + * @param {String} c Class name to remove to each element. + * @return {String/Array} String with new class value or array with new class values for all elements. + * @example + * // Removes a class from all paragraphs in the active editor + * tinyMCE.activeEditor.dom.removeClass(tinyMCE.activeEditor.dom.select('p'), 'myclass'); + * + * // Removes a class from a specific element in the current page + * tinyMCE.DOM.removeClass('mydiv', 'myclass'); + */ + removeClass : function(e, c) { + var t = this, re; + + return t.run(e, function(e) { + var v; + + if (t.hasClass(e, c)) { + if (!re) + re = new RegExp("(^|\\s+)" + c + "(\\s+|$)", "g"); + + v = e.className.replace(re, ' '); + v = tinymce.trim(v != ' ' ? v : ''); + + e.className = v; + + // Empty class attr + if (!v) { + e.removeAttribute('class'); + e.removeAttribute('className'); + } + + return v; + } + + return e.className; + }); + }, + + /** + * Returns true if the specified element has the specified class. + * + * @method hasClass + * @param {String/Element} n HTML element or element id string to check CSS class on. + * @param {String} c CSS class to check for. + * @return {Boolean} true/false if the specified element has the specified class. + */ + hasClass : function(n, c) { + n = this.get(n); + + if (!n || !c) + return false; + + return (' ' + n.className + ' ').indexOf(' ' + c + ' ') !== -1; + }, + + /** + * Shows the specified element(s) by ID by setting the "display" style. + * + * @method show + * @param {String/Element/Array} e ID of DOM element or DOM element or array with elements or IDs to show. + */ + show : function(e) { + return this.setStyle(e, 'display', 'block'); + }, + + /** + * Hides the specified element(s) by ID by setting the "display" style. + * + * @method hide + * @param {String/Element/Array} e ID of DOM element or DOM element or array with elements or IDs to hide. + * @example + * // Hides a element by id in the document + * tinymce.DOM.hide('myid'); + */ + hide : function(e) { + return this.setStyle(e, 'display', 'none'); + }, + + /** + * Returns true/false if the element is hidden or not by checking the "display" style. + * + * @method isHidden + * @param {String/Element} e Id or element to check display state on. + * @return {Boolean} true/false if the element is hidden or not. + */ + isHidden : function(e) { + e = this.get(e); + + return !e || e.style.display == 'none' || this.getStyle(e, 'display') == 'none'; + }, + + /** + * Returns a unique id. This can be useful when generating elements on the fly. + * This method will not check if the element allready exists. + * + * @method uniqueId + * @param {String} p Optional prefix to add infront of all ids defaults to "mce_". + * @return {String} Unique id. + */ + uniqueId : function(p) { + return (!p ? 'mce_' : p) + (this.counter++); + }, + + /** + * Sets the specified HTML content inside the element or elements. The HTML will first be processed this means + * URLs will get converted, hex color values fixed etc. Check processHTML for details. + * + * @method setHTML + * @param {Element/String/Array} e DOM element, element id string or array of elements/ids to set HTML inside. + * @param {String} h HTML content to set as inner HTML of the element. + * @example + * // Sets the inner HTML of all paragraphs in the active editor + * tinyMCE.activeEditor.dom.setHTML(tinyMCE.activeEditor.dom.select('p'), 'some inner html'); + * + * // Sets the inner HTML of a element by id in the document + * tinyMCE.DOM.setHTML('mydiv', 'some inner html'); + */ + setHTML : function(element, html) { + var self = this; + + return self.run(element, function(element) { + if (isIE) { + // Remove all child nodes, IE keeps empty text nodes in DOM + while (element.firstChild) + element.removeChild(element.firstChild); + + try { + // IE will remove comments from the beginning + // unless you padd the contents with something + element.innerHTML = '
' + html; + element.removeChild(element.firstChild); + } catch (ex) { + // IE sometimes produces an unknown runtime error on innerHTML if it's an block element within a block element for example a div inside a p + // This seems to fix this problem + + // Create new div with HTML contents and a BR infront to keep comments + element = self.create('div'); + element.innerHTML = '
' + html; + + // Add all children from div to target + each (element.childNodes, function(node, i) { + // Skip br element + if (i) + element.appendChild(node); + }); + } + } else + element.innerHTML = html; + + return html; + }); + }, + + /** + * Returns the outer HTML of an element. + * + * @method getOuterHTML + * @param {String/Element} elm Element ID or element object to get outer HTML from. + * @return {String} Outer HTML string. + * @example + * tinymce.DOM.getOuterHTML(editorElement); + * tinyMCE.activeEditor.getOuterHTML(tinyMCE.activeEditor.getBody()); + */ + getOuterHTML : function(elm) { + var doc, self = this; + + elm = self.get(elm); + + if (!elm) + return null; + + if (elm.nodeType === 1 && self.hasOuterHTML) + return elm.outerHTML; + + doc = (elm.ownerDocument || self.doc).createElement("body"); + doc.appendChild(elm.cloneNode(true)); + + return doc.innerHTML; + }, + + /** + * Sets the specified outer HTML on a element or elements. + * + * @method setOuterHTML + * @param {Element/String/Array} e DOM element, element id string or array of elements/ids to set outer HTML on. + * @param {Object} h HTML code to set as outer value for the element. + * @param {Document} d Optional document scope to use in this process defaults to the document of the DOM class. + * @example + * // Sets the outer HTML of all paragraphs in the active editor + * tinyMCE.activeEditor.dom.setOuterHTML(tinyMCE.activeEditor.dom.select('p'), '
some html
'); + * + * // Sets the outer HTML of a element by id in the document + * tinyMCE.DOM.setOuterHTML('mydiv', '
some html
'); + */ + setOuterHTML : function(e, h, d) { + var t = this; + + function setHTML(e, h, d) { + var n, tp; + + tp = d.createElement("body"); + tp.innerHTML = h; + + n = tp.lastChild; + while (n) { + t.insertAfter(n.cloneNode(true), e); + n = n.previousSibling; + } + + t.remove(e); + }; + + return this.run(e, function(e) { + e = t.get(e); + + // Only set HTML on elements + if (e.nodeType == 1) { + d = d || e.ownerDocument || t.doc; + + if (isIE) { + try { + // Try outerHTML for IE it sometimes produces an unknown runtime error + if (isIE && e.nodeType == 1) + e.outerHTML = h; + else + setHTML(e, h, d); + } catch (ex) { + // Fix for unknown runtime error + setHTML(e, h, d); + } + } else + setHTML(e, h, d); + } + }); + }, + + /** + * Entity decode a string, resolves any HTML entities like å. + * + * @method decode + * @param {String} s String to decode entities on. + * @return {String} Entity decoded string. + */ + decode : Entities.decode, + + /** + * Entity encodes a string, encodes the most common entities <>"& into entities. + * + * @method encode + * @param {String} text String to encode with entities. + * @return {String} Entity encoded string. + */ + encode : Entities.encodeAllRaw, + + /** + * Inserts a element after the reference element. + * + * @method insertAfter + * @param {Element} node Element to insert after the reference. + * @param {Element/String/Array} reference_node Reference element, element id or array of elements to insert after. + * @return {Element/Array} Element that got added or an array with elements. + */ + insertAfter : function(node, reference_node) { + reference_node = this.get(reference_node); + + return this.run(node, function(node) { + var parent, nextSibling; + + parent = reference_node.parentNode; + nextSibling = reference_node.nextSibling; + + if (nextSibling) + parent.insertBefore(node, nextSibling); + else + parent.appendChild(node); + + return node; + }); + }, + + /** + * Returns true/false if the specified element is a block element or not. + * + * @method isBlock + * @param {Node/String} node Element/Node to check. + * @return {Boolean} True/False state if the node is a block element or not. + */ + isBlock : function(node) { + var type = node.nodeType; + + // If it's a node then check the type and use the nodeName + if (type) + return !!(type === 1 && blockElementsMap[node.nodeName]); + + return !!blockElementsMap[node]; + }, + + /** + * Replaces the specified element or elements with the specified element, the new element will + * be cloned if multiple inputs elements are passed. + * + * @method replace + * @param {Element} n New element to replace old ones with. + * @param {Element/String/Array} o Element DOM node, element id or array of elements or ids to replace. + * @param {Boolean} k Optional keep children state, if set to true child nodes from the old object will be added to new ones. + */ + replace : function(n, o, k) { + var t = this; + + if (is(o, 'array')) + n = n.cloneNode(true); + + return t.run(o, function(o) { + if (k) { + each(tinymce.grep(o.childNodes), function(c) { + n.appendChild(c); + }); + } + + return o.parentNode.replaceChild(n, o); + }); + }, + + /** + * Renames the specified element to a new name and keep it's attributes and children. + * + * @method rename + * @param {Element} elm Element to rename. + * @param {String} name Name of the new element. + * @return New element or the old element if it needed renaming. + */ + rename : function(elm, name) { + var t = this, newElm; + + if (elm.nodeName != name.toUpperCase()) { + // Rename block element + newElm = t.create(name); + + // Copy attribs to new block + each(t.getAttribs(elm), function(attr_node) { + t.setAttrib(newElm, attr_node.nodeName, t.getAttrib(elm, attr_node.nodeName)); + }); + + // Replace block + t.replace(newElm, elm, 1); + } + + return newElm || elm; + }, + + /** + * Find the common ancestor of two elements. This is a shorter method than using the DOM Range logic. + * + * @method findCommonAncestor + * @param {Element} a Element to find common ancestor of. + * @param {Element} b Element to find common ancestor of. + * @return {Element} Common ancestor element of the two input elements. + */ + findCommonAncestor : function(a, b) { + var ps = a, pe; + + while (ps) { + pe = b; + + while (pe && ps != pe) + pe = pe.parentNode; + + if (ps == pe) + break; + + ps = ps.parentNode; + } + + if (!ps && a.ownerDocument) + return a.ownerDocument.documentElement; + + return ps; + }, + + /** + * Parses the specified RGB color value and returns a hex version of that color. + * + * @method toHex + * @param {String} s RGB string value like rgb(1,2,3) + * @return {String} Hex version of that RGB value like #FF00FF. + */ + toHex : function(s) { + var c = /^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(s); + + function hex(s) { + s = parseInt(s).toString(16); + + return s.length > 1 ? s : '0' + s; // 0 -> 00 + }; + + if (c) { + s = '#' + hex(c[1]) + hex(c[2]) + hex(c[3]); + + return s; + } + + return s; + }, + + /** + * Returns a array of all single CSS classes in the document. A single CSS class is a simple + * rule like ".class" complex ones like "div td.class" will not be added to output. + * + * @method getClasses + * @return {Array} Array with class objects each object has a class field might be other fields in the future. + */ + getClasses : function() { + var t = this, cl = [], i, lo = {}, f = t.settings.class_filter, ov; + + if (t.classes) + return t.classes; + + function addClasses(s) { + // IE style imports + each(s.imports, function(r) { + addClasses(r); + }); + + each(s.cssRules || s.rules, function(r) { + // Real type or fake it on IE + switch (r.type || 1) { + // Rule + case 1: + if (r.selectorText) { + each(r.selectorText.split(','), function(v) { + v = v.replace(/^\s*|\s*$|^\s\./g, ""); + + // Is internal or it doesn't contain a class + if (/\.mce/.test(v) || !/\.[\w\-]+$/.test(v)) + return; + + // Remove everything but class name + ov = v; + v = tinymce._replace(/.*\.([a-z0-9_\-]+).*/i, '$1', v); + + // Filter classes + if (f && !(v = f(v, ov))) + return; + + if (!lo[v]) { + cl.push({'class' : v}); + lo[v] = 1; + } + }); + } + break; + + // Import + case 3: + addClasses(r.styleSheet); + break; + } + }); + }; + + try { + each(t.doc.styleSheets, addClasses); + } catch (ex) { + // Ignore + } + + if (cl.length > 0) + t.classes = cl; + + return cl; + }, + + /** + * Executes the specified function on the element by id or dom element node or array of elements/id. + * + * @method run + * @param {String/Element/Array} Element ID or DOM element object or array with ids or elements. + * @param {function} f Function to execute for each item. + * @param {Object} s Optional scope to execute the function in. + * @return {Object/Array} Single object or array with objects depending on multiple input or not. + */ + run : function(e, f, s) { + var t = this, o; + + if (t.doc && typeof(e) === 'string') + e = t.get(e); + + if (!e) + return false; + + s = s || this; + if (!e.nodeType && (e.length || e.length === 0)) { + o = []; + + each(e, function(e, i) { + if (e) { + if (typeof(e) == 'string') + e = t.doc.getElementById(e); + + o.push(f.call(s, e, i)); + } + }); + + return o; + } + + return f.call(s, e); + }, + + /** + * Returns an NodeList with attributes for the element. + * + * @method getAttribs + * @param {HTMLElement/string} n Element node or string id to get attributes from. + * @return {NodeList} NodeList with attributes. + */ + getAttribs : function(n) { + var o; + + n = this.get(n); + + if (!n) + return []; + + if (isIE) { + o = []; + + // Object will throw exception in IE + if (n.nodeName == 'OBJECT') + return n.attributes; + + // IE doesn't keep the selected attribute if you clone option elements + if (n.nodeName === 'OPTION' && this.getAttrib(n, 'selected')) + o.push({specified : 1, nodeName : 'selected'}); + + // It's crazy that this is faster in IE but it's because it returns all attributes all the time + n.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi, '').replace(/[\w:\-]+/gi, function(a) { + o.push({specified : 1, nodeName : a}); + }); + + return o; + } + + return n.attributes; + }, + + /** + * Returns true/false if the specified node is to be considered empty or not. + * + * @example + * tinymce.DOM.isEmpty(node, {img : true}); + * @method isEmpty + * @param {Object} elements Optional name/value object with elements that are automatically treated as non empty elements. + * @return {Boolean} true/false if the node is empty or not. + */ + isEmpty : function(node, elements) { + var self = this, i, attributes, type, walker, name; + + node = node.firstChild; + if (node) { + walker = new tinymce.dom.TreeWalker(node); + elements = elements || self.schema ? self.schema.getNonEmptyElements() : null; + + do { + type = node.nodeType; + + if (type === 1) { + // Ignore bogus elements + if (node.getAttribute('data-mce-bogus')) + continue; + + // Keep empty elements like + if (elements && elements[node.nodeName.toLowerCase()]) + return false; + + // Keep elements with data attributes or name attribute like + attributes = self.getAttribs(node); + i = node.attributes.length; + while (i--) { + name = node.attributes[i].nodeName; + if (name === "name" || name.indexOf('data-') === 0) + return false; + } + } + + // Keep non whitespace text nodes + if ((type === 3 && !whiteSpaceRegExp.test(node.nodeValue))) + return false; + } while (node = walker.next()); + } + + return true; + }, + + /** + * Destroys all internal references to the DOM to solve IE leak issues. + * + * @method destroy + */ + destroy : function(s) { + var t = this; + + if (t.events) + t.events.destroy(); + + t.win = t.doc = t.root = t.events = null; + + // Manual destroy then remove unload handler + if (!s) + tinymce.removeUnload(t.destroy); + }, + + /** + * Created a new DOM Range object. This will use the native DOM Range API if it's + * available if it's not it will fallback to the custom TinyMCE implementation. + * + * @method createRng + * @return {DOMRange} DOM Range object. + * @example + * var rng = tinymce.DOM.createRng(); + * alert(rng.startContainer + "," + rng.startOffset); + */ + createRng : function() { + var d = this.doc; + + return d.createRange ? d.createRange() : new tinymce.dom.Range(this); + }, + + /** + * Returns the index of the specified node within it's parent. + * + * @param {Node} node Node to look for. + * @param {boolean} normalized Optional true/false state if the index is what it would be after a normalization. + * @return {Number} Index of the specified node. + */ + nodeIndex : function(node, normalized) { + var idx = 0, lastNodeType, lastNode, nodeType, nodeValueExists; + + if (node) { + for (lastNodeType = node.nodeType, node = node.previousSibling, lastNode = node; node; node = node.previousSibling) { + nodeType = node.nodeType; + + // Normalize text nodes + if (normalized && nodeType == 3) { + // ensure that text nodes that have been removed are handled correctly in Internet Explorer. + // (the nodeValue attribute will not exist, and will error here). + nodeValueExists = false; + try {nodeValueExists = node.nodeValue.length} catch (c) {} + if (nodeType == lastNodeType || !nodeValueExists) + continue; + } + idx++; + lastNodeType = nodeType; + } + } + + return idx; + }, + + /** + * Splits an element into two new elements and places the specified split + * element or element between the new ones. For example splitting the paragraph at the bold element in + * this example

abcabc123

would produce

abc

abc

123

. + * + * @method split + * @param {Element} pe Parent element to split. + * @param {Element} e Element to split at. + * @param {Element} re Optional replacement element to replace the split element by. + * @return {Element} Returns the split element or the replacement element if that is specified. + */ + split : function(pe, e, re) { + var t = this, r = t.createRng(), bef, aft, pa; + + // W3C valid browsers tend to leave empty nodes to the left/right side of the contents, this makes sense + // but we don't want that in our code since it serves no purpose for the end user + // For example if this is chopped: + //

text 1CHOPtext 2

+ // would produce: + //

text 1

CHOP

text 2

+ // this function will then trim of empty edges and produce: + //

text 1

CHOP

text 2

+ function trim(node) { + var i, children = node.childNodes, type = node.nodeType; + + if (type == 1 && node.getAttribute('data-mce-type') == 'bookmark') + return; + + for (i = children.length - 1; i >= 0; i--) + trim(children[i]); + + if (type != 9) { + // Keep non whitespace text nodes + if (type == 3 && node.nodeValue.length > 0) { + // If parent element isn't a block or there isn't any useful contents for example "

" + if (!t.isBlock(node.parentNode) || tinymce.trim(node.nodeValue).length > 0) + return; + } else if (type == 1) { + // If the only child is a bookmark then move it up + children = node.childNodes; + if (children.length == 1 && children[0] && children[0].nodeType == 1 && children[0].getAttribute('data-mce-type') == 'bookmark') + node.parentNode.insertBefore(children[0], node); + + // Keep non empty elements or img, hr etc + if (children.length || /^(br|hr|input|img)$/i.test(node.nodeName)) + return; + } + + t.remove(node); + } + + return node; + }; + + if (pe && e) { + // Get before chunk + r.setStart(pe.parentNode, t.nodeIndex(pe)); + r.setEnd(e.parentNode, t.nodeIndex(e)); + bef = r.extractContents(); + + // Get after chunk + r = t.createRng(); + r.setStart(e.parentNode, t.nodeIndex(e) + 1); + r.setEnd(pe.parentNode, t.nodeIndex(pe) + 1); + aft = r.extractContents(); + + // Insert before chunk + pa = pe.parentNode; + pa.insertBefore(trim(bef), pe); + + // Insert middle chunk + if (re) + pa.replaceChild(re, e); + else + pa.insertBefore(e, pe); + + // Insert after chunk + pa.insertBefore(trim(aft), pe); + t.remove(pe); + + return re || e; + } + }, + + /** + * Adds an event handler to the specified object. + * + * @method bind + * @param {Element/Document/Window/Array/String} o Object or element id string to add event handler to or an array of elements/ids/documents. + * @param {String} n Name of event handler to add for example: click. + * @param {function} f Function to execute when the event occurs. + * @param {Object} s Optional scope to execute the function in. + * @return {function} Function callback handler the same as the one passed in. + */ + bind : function(target, name, func, scope) { + var t = this; + + if (!t.events) + t.events = new tinymce.dom.EventUtils(); + + return t.events.add(target, name, func, scope || this); + }, + + /** + * Removes the specified event handler by name and function from a element or collection of elements. + * + * @method unbind + * @param {String/Element/Array} o Element ID string or HTML element or an array of elements or ids to remove handler from. + * @param {String} n Event handler name like for example: "click" + * @param {function} f Function to remove. + * @return {bool/Array} Bool state if true if the handler was removed or an array with states if multiple elements where passed in. + */ + unbind : function(target, name, func) { + var t = this; + + if (!t.events) + t.events = new tinymce.dom.EventUtils(); + + return t.events.remove(target, name, func); + }, + + // #ifdef debug + + dumpRng : function(r) { + return 'startContainer: ' + r.startContainer.nodeName + ', startOffset: ' + r.startOffset + ', endContainer: ' + r.endContainer.nodeName + ', endOffset: ' + r.endOffset; + }, + + // #endif + + _findSib : function(node, selector, name) { + var t = this, f = selector; + + if (node) { + // If expression make a function of it using is + if (is(f, 'string')) { + f = function(node) { + return t.is(node, selector); + }; + } + + // Loop all siblings + for (node = node[name]; node; node = node[name]) { + if (f(node)) + return node; + } + } + + return null; + }, + + _isRes : function(c) { + // Is live resizble element + return /^(top|left|bottom|right|width|height)/i.test(c) || /;\s*(top|left|bottom|right|width|height)/i.test(c); + } + + /* + walk : function(n, f, s) { + var d = this.doc, w; + + if (d.createTreeWalker) { + w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false); + + while ((n = w.nextNode()) != null) + f.call(s || this, n); + } else + tinymce.walk(n, f, 'childNodes', s); + } + */ + + /* + toRGB : function(s) { + var c = /^\s*?#([0-9A-F]{2})([0-9A-F]{1,2})([0-9A-F]{2})?\s*?$/.exec(s); + + if (c) { + // #FFF -> #FFFFFF + if (!is(c[3])) + c[3] = c[2] = c[1]; + + return "rgb(" + parseInt(c[1], 16) + "," + parseInt(c[2], 16) + "," + parseInt(c[3], 16) + ")"; + } + + return s; + } + */ + }); + + /** + * Instance of DOMUtils for the current document. + * + * @property DOM + * @member tinymce + * @type tinymce.dom.DOMUtils + * @example + * // Example of how to add a class to some element by id + * tinymce.DOM.addClass('someid', 'someclass'); + */ + tinymce.DOM = new tinymce.dom.DOMUtils(document, {process_html : 0}); +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/dom/Element.js b/include/javascript/tiny_mce/classes/dom/Element.js new file mode 100644 index 00000000..bf71a1dc --- /dev/null +++ b/include/javascript/tiny_mce/classes/dom/Element.js @@ -0,0 +1,195 @@ +/** + * Element.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + /** + * Element class, this enables element blocking in IE. Element blocking is a method to block out select blockes that + * gets visible though DIVs on IE 6 it uses a iframe for this blocking. This class also shortens the length of some DOM API calls + * since it's bound to an element. + * + * @class tinymce.dom.Element + * @example + * // Creates an basic element for an existing element + * var elm = new tinymce.dom.Element('someid'); + * + * elm.setStyle('background-color', 'red'); + * elm.moveTo(10, 10); + */ + + /** + * Constructs a new Element instance. Consult the Wiki for more details on this class. + * + * @constructor + * @method Element + * @param {String} id Element ID to bind/execute methods on. + * @param {Object} settings Optional settings name/value collection. + */ + tinymce.dom.Element = function(id, settings) { + var t = this, dom, el; + + t.settings = settings = settings || {}; + t.id = id; + t.dom = dom = settings.dom || tinymce.DOM; + + // Only IE leaks DOM references, this is a lot faster + if (!tinymce.isIE) + el = dom.get(t.id); + + tinymce.each( + ('getPos,getRect,getParent,add,setStyle,getStyle,setStyles,' + + 'setAttrib,setAttribs,getAttrib,addClass,removeClass,' + + 'hasClass,getOuterHTML,setOuterHTML,remove,show,hide,' + + 'isHidden,setHTML,get').split(/,/) + , function(k) { + t[k] = function() { + var a = [id], i; + + for (i = 0; i < arguments.length; i++) + a.push(arguments[i]); + + a = dom[k].apply(dom, a); + t.update(k); + + return a; + }; + }); + + tinymce.extend(t, { + /** + * Adds a event handler to the element. + * + * @method on + * @param {String} n Event name like for example "click". + * @param {function} f Function to execute on the specified event. + * @param {Object} s Optional scope to execute function on. + * @return {function} Event handler function the same as the input function. + */ + on : function(n, f, s) { + return tinymce.dom.Event.add(t.id, n, f, s); + }, + + /** + * Returns the absolute X, Y cordinate of the element. + * + * @method getXY + * @return {Object} Objext with x, y cordinate fields. + */ + getXY : function() { + return { + x : parseInt(t.getStyle('left')), + y : parseInt(t.getStyle('top')) + }; + }, + + /** + * Returns the size of the element by a object with w and h fields. + * + * @method getSize + * @return {Object} Object with element size with a w and h field. + */ + getSize : function() { + var n = dom.get(t.id); + + return { + w : parseInt(t.getStyle('width') || n.clientWidth), + h : parseInt(t.getStyle('height') || n.clientHeight) + }; + }, + + /** + * Moves the element to a specific absolute position. + * + * @method moveTo + * @param {Number} x X cordinate of element position. + * @param {Number} y Y cordinate of element position. + */ + moveTo : function(x, y) { + t.setStyles({left : x, top : y}); + }, + + /** + * Moves the element relative to the current position. + * + * @method moveBy + * @param {Number} x Relative X cordinate of element position. + * @param {Number} y Relative Y cordinate of element position. + */ + moveBy : function(x, y) { + var p = t.getXY(); + + t.moveTo(p.x + x, p.y + y); + }, + + /** + * Resizes the element to a specific size. + * + * @method resizeTo + * @param {Number} w New width of element. + * @param {Numner} h New height of element. + */ + resizeTo : function(w, h) { + t.setStyles({width : w, height : h}); + }, + + /** + * Resizes the element relative to the current sizeto a specific size. + * + * @method resizeBy + * @param {Number} w Relative width of element. + * @param {Numner} h Relative height of element. + */ + resizeBy : function(w, h) { + var s = t.getSize(); + + t.resizeTo(s.w + w, s.h + h); + }, + + /** + * Updates the element blocker in IE6 based on the style information of the element. + * + * @method update + * @param {String} k Optional function key. Used internally. + */ + update : function(k) { + var b; + + if (tinymce.isIE6 && settings.blocker) { + k = k || ''; + + // Ignore getters + if (k.indexOf('get') === 0 || k.indexOf('has') === 0 || k.indexOf('is') === 0) + return; + + // Remove blocker on remove + if (k == 'remove') { + dom.remove(t.blocker); + return; + } + + if (!t.blocker) { + t.blocker = dom.uniqueId(); + b = dom.add(settings.container || dom.getRoot(), 'iframe', {id : t.blocker, style : 'position:absolute;', frameBorder : 0, src : 'javascript:""'}); + dom.setStyle(b, 'opacity', 0); + } else + b = dom.get(t.blocker); + + dom.setStyles(b, { + left : t.getStyle('left', 1), + top : t.getStyle('top', 1), + width : t.getStyle('width', 1), + height : t.getStyle('height', 1), + display : t.getStyle('display', 1), + zIndex : parseInt(t.getStyle('zIndex', 1) || 0) - 1 + }); + } + } + }); + }; +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/dom/EventUtils.js b/include/javascript/tiny_mce/classes/dom/EventUtils.js new file mode 100644 index 00000000..67e116e4 --- /dev/null +++ b/include/javascript/tiny_mce/classes/dom/EventUtils.js @@ -0,0 +1,381 @@ +/** + * EventUtils.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + // Shorten names + var each = tinymce.each, DOM = tinymce.DOM, isIE = tinymce.isIE, isWebKit = tinymce.isWebKit, Event; + + /** + * This class handles DOM events in a cross platform fasion it also keeps track of element + * and handler references to be able to clean elements to reduce IE memory leaks. + * + * @class tinymce.dom.EventUtils + */ + tinymce.create('tinymce.dom.EventUtils', { + /** + * Constructs a new EventUtils instance. + * + * @constructor + * @method EventUtils + */ + EventUtils : function() { + this.inits = []; + this.events = []; + }, + + /** + * Adds an event handler to the specified object. + * + * @method add + * @param {Element/Document/Window/Array/String} o Object or element id string to add event handler to or an array of elements/ids/documents. + * @param {String/Array} n Name of event handler to add for example: click. + * @param {function} f Function to execute when the event occurs. + * @param {Object} s Optional scope to execute the function in. + * @return {function} Function callback handler the same as the one passed in. + * @example + * // Adds a click handler to the current document + * tinymce.dom.Event.add(document, 'click', function(e) { + * console.debug(e.target); + * }); + */ + add : function(o, n, f, s) { + var cb, t = this, el = t.events, r; + + if (n instanceof Array) { + r = []; + + each(n, function(n) { + r.push(t.add(o, n, f, s)); + }); + + return r; + } + + // Handle array + if (o && o.hasOwnProperty && o instanceof Array) { + r = []; + + each(o, function(o) { + o = DOM.get(o); + r.push(t.add(o, n, f, s)); + }); + + return r; + } + + o = DOM.get(o); + + if (!o) + return; + + // Setup event callback + cb = function(e) { + // Is all events disabled + if (t.disabled) + return; + + e = e || window.event; + + // Patch in target, preventDefault and stopPropagation in IE it's W3C valid + if (e && isIE) { + if (!e.target) + e.target = e.srcElement; + + // Patch in preventDefault, stopPropagation methods for W3C compatibility + tinymce.extend(e, t._stoppers); + } + + if (!s) + return f(e); + + return f.call(s, e); + }; + + if (n == 'unload') { + tinymce.unloads.unshift({func : cb}); + return cb; + } + + if (n == 'init') { + if (t.domLoaded) + cb(); + else + t.inits.push(cb); + + return cb; + } + + // Store away listener reference + el.push({ + obj : o, + name : n, + func : f, + cfunc : cb, + scope : s + }); + + t._add(o, n, cb); + + return f; + }, + + /** + * Removes the specified event handler by name and function from a element or collection of elements. + * + * @method remove + * @param {String/Element/Array} o Element ID string or HTML element or an array of elements or ids to remove handler from. + * @param {String} n Event handler name like for example: "click" + * @param {function} f Function to remove. + * @return {bool/Array} Bool state if true if the handler was removed or an array with states if multiple elements where passed in. + * @example + * // Adds a click handler to the current document + * var func = tinymce.dom.Event.add(document, 'click', function(e) { + * console.debug(e.target); + * }); + * + * // Removes the click handler from the document + * tinymce.dom.Event.remove(document, 'click', func); + */ + remove : function(o, n, f) { + var t = this, a = t.events, s = false, r; + + // Handle array + if (o && o.hasOwnProperty && o instanceof Array) { + r = []; + + each(o, function(o) { + o = DOM.get(o); + r.push(t.remove(o, n, f)); + }); + + return r; + } + + o = DOM.get(o); + + each(a, function(e, i) { + if (e.obj == o && e.name == n && (!f || (e.func == f || e.cfunc == f))) { + a.splice(i, 1); + t._remove(o, n, e.cfunc); + s = true; + return false; + } + }); + + return s; + }, + + /** + * Clears all events of a specific object. + * + * @method clear + * @param {Object} o DOM element or object to remove all events from. + * @example + * // Cancels all mousedown events in the active editor + * tinyMCE.activeEditor.onMouseDown.add(function(ed, e) { + * return tinymce.dom.Event.cancel(e); + * }); + */ + clear : function(o) { + var t = this, a = t.events, i, e; + + if (o) { + o = DOM.get(o); + + for (i = a.length - 1; i >= 0; i--) { + e = a[i]; + + if (e.obj === o) { + t._remove(e.obj, e.name, e.cfunc); + e.obj = e.cfunc = null; + a.splice(i, 1); + } + } + } + }, + + /** + * Cancels an event for both bubbeling and the default browser behavior. + * + * @method cancel + * @param {Event} e Event object to cancel. + * @return {Boolean} Always false. + */ + cancel : function(e) { + if (!e) + return false; + + this.stop(e); + + return this.prevent(e); + }, + + /** + * Stops propogation/bubbeling of an event. + * + * @method stop + * @param {Event} e Event to cancel bubbeling on. + * @return {Boolean} Always false. + */ + stop : function(e) { + if (e.stopPropagation) + e.stopPropagation(); + else + e.cancelBubble = true; + + return false; + }, + + /** + * Prevent default browser behvaior of an event. + * + * @method prevent + * @param {Event} e Event to prevent default browser behvaior of an event. + * @return {Boolean} Always false. + */ + prevent : function(e) { + if (e.preventDefault) + e.preventDefault(); + else + e.returnValue = false; + + return false; + }, + + /** + * Destroys the instance. + * + * @method destroy + */ + destroy : function() { + var t = this; + + each(t.events, function(e, i) { + t._remove(e.obj, e.name, e.cfunc); + e.obj = e.cfunc = null; + }); + + t.events = []; + t = null; + }, + + _add : function(o, n, f) { + if (o.attachEvent) + o.attachEvent('on' + n, f); + else if (o.addEventListener) + o.addEventListener(n, f, false); + else + o['on' + n] = f; + }, + + _remove : function(o, n, f) { + if (o) { + try { + if (o.detachEvent) + o.detachEvent('on' + n, f); + else if (o.removeEventListener) + o.removeEventListener(n, f, false); + else + o['on' + n] = null; + } catch (ex) { + // Might fail with permission denined on IE so we just ignore that + } + } + }, + + _pageInit : function(win) { + var t = this; + + // Keep it from running more than once + if (t.domLoaded) + return; + + t.domLoaded = true; + + each(t.inits, function(c) { + c(); + }); + + t.inits = []; + }, + + _wait : function(win) { + var t = this, doc = win.document; + + // No need since the document is already loaded + if (win.tinyMCE_GZ && tinyMCE_GZ.loaded) { + t.domLoaded = 1; + return; + } + + // Use IE method + if (doc.attachEvent) { + doc.attachEvent("onreadystatechange", function() { + if (doc.readyState === "complete") { + doc.detachEvent("onreadystatechange", arguments.callee); + t._pageInit(win); + } + }); + + if (doc.documentElement.doScroll && win == win.top) { + (function() { + if (t.domLoaded) + return; + + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + doc.documentElement.doScroll("left"); + } catch (ex) { + setTimeout(arguments.callee, 0); + return; + } + + t._pageInit(win); + })(); + } + } else if (doc.addEventListener) { + t._add(win, 'DOMContentLoaded', function() { + t._pageInit(win); + }); + } + + t._add(win, 'load', function() { + t._pageInit(win); + }); + }, + + _stoppers : { + preventDefault : function() { + this.returnValue = false; + }, + + stopPropagation : function() { + this.cancelBubble = true; + } + } + }); + + /** + * Instance of EventUtils for the current document. + * + * @property Event + * @member tinymce.dom + * @type tinymce.dom.EventUtils + */ + Event = tinymce.dom.Event = new tinymce.dom.EventUtils(); + + // Dispatch DOM content loaded event for IE and Safari + Event._wait(window); + + tinymce.addUnload(function() { + Event.destroy(); + }); +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/dom/Range.js b/include/javascript/tiny_mce/classes/dom/Range.js new file mode 100644 index 00000000..baf43bba --- /dev/null +++ b/include/javascript/tiny_mce/classes/dom/Range.js @@ -0,0 +1,687 @@ +/** + * Range.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(ns) { + // Range constructor + function Range(dom) { + var t = this, + doc = dom.doc, + EXTRACT = 0, + CLONE = 1, + DELETE = 2, + TRUE = true, + FALSE = false, + START_OFFSET = 'startOffset', + START_CONTAINER = 'startContainer', + END_CONTAINER = 'endContainer', + END_OFFSET = 'endOffset', + extend = tinymce.extend, + nodeIndex = dom.nodeIndex; + + extend(t, { + // Inital states + startContainer : doc, + startOffset : 0, + endContainer : doc, + endOffset : 0, + collapsed : TRUE, + commonAncestorContainer : doc, + + // Range constants + START_TO_START : 0, + START_TO_END : 1, + END_TO_END : 2, + END_TO_START : 3, + + // Public methods + setStart : setStart, + setEnd : setEnd, + setStartBefore : setStartBefore, + setStartAfter : setStartAfter, + setEndBefore : setEndBefore, + setEndAfter : setEndAfter, + collapse : collapse, + selectNode : selectNode, + selectNodeContents : selectNodeContents, + compareBoundaryPoints : compareBoundaryPoints, + deleteContents : deleteContents, + extractContents : extractContents, + cloneContents : cloneContents, + insertNode : insertNode, + surroundContents : surroundContents, + cloneRange : cloneRange + }); + + function setStart(n, o) { + _setEndPoint(TRUE, n, o); + }; + + function setEnd(n, o) { + _setEndPoint(FALSE, n, o); + }; + + function setStartBefore(n) { + setStart(n.parentNode, nodeIndex(n)); + }; + + function setStartAfter(n) { + setStart(n.parentNode, nodeIndex(n) + 1); + }; + + function setEndBefore(n) { + setEnd(n.parentNode, nodeIndex(n)); + }; + + function setEndAfter(n) { + setEnd(n.parentNode, nodeIndex(n) + 1); + }; + + function collapse(ts) { + if (ts) { + t[END_CONTAINER] = t[START_CONTAINER]; + t[END_OFFSET] = t[START_OFFSET]; + } else { + t[START_CONTAINER] = t[END_CONTAINER]; + t[START_OFFSET] = t[END_OFFSET]; + } + + t.collapsed = TRUE; + }; + + function selectNode(n) { + setStartBefore(n); + setEndAfter(n); + }; + + function selectNodeContents(n) { + setStart(n, 0); + setEnd(n, n.nodeType === 1 ? n.childNodes.length : n.nodeValue.length); + }; + + function compareBoundaryPoints(h, r) { + var sc = t[START_CONTAINER], so = t[START_OFFSET], ec = t[END_CONTAINER], eo = t[END_OFFSET], + rsc = r.startContainer, rso = r.startOffset, rec = r.endContainer, reo = r.endOffset; + + // Check START_TO_START + if (h === 0) + return _compareBoundaryPoints(sc, so, rsc, rso); + + // Check START_TO_END + if (h === 1) + return _compareBoundaryPoints(ec, eo, rsc, rso); + + // Check END_TO_END + if (h === 2) + return _compareBoundaryPoints(ec, eo, rec, reo); + + // Check END_TO_START + if (h === 3) + return _compareBoundaryPoints(sc, so, rec, reo); + }; + + function deleteContents() { + _traverse(DELETE); + }; + + function extractContents() { + return _traverse(EXTRACT); + }; + + function cloneContents() { + return _traverse(CLONE); + }; + + function insertNode(n) { + var startContainer = this[START_CONTAINER], + startOffset = this[START_OFFSET], nn, o; + + // Node is TEXT_NODE or CDATA + if ((startContainer.nodeType === 3 || startContainer.nodeType === 4) && startContainer.nodeValue) { + if (!startOffset) { + // At the start of text + startContainer.parentNode.insertBefore(n, startContainer); + } else if (startOffset >= startContainer.nodeValue.length) { + // At the end of text + dom.insertAfter(n, startContainer); + } else { + // Middle, need to split + nn = startContainer.splitText(startOffset); + startContainer.parentNode.insertBefore(n, nn); + } + } else { + // Insert element node + if (startContainer.childNodes.length > 0) + o = startContainer.childNodes[startOffset]; + + if (o) + startContainer.insertBefore(n, o); + else + startContainer.appendChild(n); + } + }; + + function surroundContents(n) { + var f = t.extractContents(); + + t.insertNode(n); + n.appendChild(f); + t.selectNode(n); + }; + + function cloneRange() { + return extend(new Range(dom), { + startContainer : t[START_CONTAINER], + startOffset : t[START_OFFSET], + endContainer : t[END_CONTAINER], + endOffset : t[END_OFFSET], + collapsed : t.collapsed, + commonAncestorContainer : t.commonAncestorContainer + }); + }; + + // Private methods + + function _getSelectedNode(container, offset) { + var child; + + if (container.nodeType == 3 /* TEXT_NODE */) + return container; + + if (offset < 0) + return container; + + child = container.firstChild; + while (child && offset > 0) { + --offset; + child = child.nextSibling; + } + + if (child) + return child; + + return container; + }; + + function _isCollapsed() { + return (t[START_CONTAINER] == t[END_CONTAINER] && t[START_OFFSET] == t[END_OFFSET]); + }; + + function _compareBoundaryPoints(containerA, offsetA, containerB, offsetB) { + var c, offsetC, n, cmnRoot, childA, childB; + + // In the first case the boundary-points have the same container. A is before B + // if its offset is less than the offset of B, A is equal to B if its offset is + // equal to the offset of B, and A is after B if its offset is greater than the + // offset of B. + if (containerA == containerB) { + if (offsetA == offsetB) + return 0; // equal + + if (offsetA < offsetB) + return -1; // before + + return 1; // after + } + + // In the second case a child node C of the container of A is an ancestor + // container of B. In this case, A is before B if the offset of A is less than or + // equal to the index of the child node C and A is after B otherwise. + c = containerB; + while (c && c.parentNode != containerA) + c = c.parentNode; + + if (c) { + offsetC = 0; + n = containerA.firstChild; + + while (n != c && offsetC < offsetA) { + offsetC++; + n = n.nextSibling; + } + + if (offsetA <= offsetC) + return -1; // before + + return 1; // after + } + + // In the third case a child node C of the container of B is an ancestor container + // of A. In this case, A is before B if the index of the child node C is less than + // the offset of B and A is after B otherwise. + c = containerA; + while (c && c.parentNode != containerB) { + c = c.parentNode; + } + + if (c) { + offsetC = 0; + n = containerB.firstChild; + + while (n != c && offsetC < offsetB) { + offsetC++; + n = n.nextSibling; + } + + if (offsetC < offsetB) + return -1; // before + + return 1; // after + } + + // In the fourth case, none of three other cases hold: the containers of A and B + // are siblings or descendants of sibling nodes. In this case, A is before B if + // the container of A is before the container of B in a pre-order traversal of the + // Ranges' context tree and A is after B otherwise. + cmnRoot = dom.findCommonAncestor(containerA, containerB); + childA = containerA; + + while (childA && childA.parentNode != cmnRoot) + childA = childA.parentNode; + + if (!childA) + childA = cmnRoot; + + childB = containerB; + while (childB && childB.parentNode != cmnRoot) + childB = childB.parentNode; + + if (!childB) + childB = cmnRoot; + + if (childA == childB) + return 0; // equal + + n = cmnRoot.firstChild; + while (n) { + if (n == childA) + return -1; // before + + if (n == childB) + return 1; // after + + n = n.nextSibling; + } + }; + + function _setEndPoint(st, n, o) { + var ec, sc; + + if (st) { + t[START_CONTAINER] = n; + t[START_OFFSET] = o; + } else { + t[END_CONTAINER] = n; + t[END_OFFSET] = o; + } + + // If one boundary-point of a Range is set to have a root container + // other than the current one for the Range, the Range is collapsed to + // the new position. This enforces the restriction that both boundary- + // points of a Range must have the same root container. + ec = t[END_CONTAINER]; + while (ec.parentNode) + ec = ec.parentNode; + + sc = t[START_CONTAINER]; + while (sc.parentNode) + sc = sc.parentNode; + + if (sc == ec) { + // The start position of a Range is guaranteed to never be after the + // end position. To enforce this restriction, if the start is set to + // be at a position after the end, the Range is collapsed to that + // position. + if (_compareBoundaryPoints(t[START_CONTAINER], t[START_OFFSET], t[END_CONTAINER], t[END_OFFSET]) > 0) + t.collapse(st); + } else + t.collapse(st); + + t.collapsed = _isCollapsed(); + t.commonAncestorContainer = dom.findCommonAncestor(t[START_CONTAINER], t[END_CONTAINER]); + }; + + function _traverse(how) { + var c, endContainerDepth = 0, startContainerDepth = 0, p, depthDiff, startNode, endNode, sp, ep; + + if (t[START_CONTAINER] == t[END_CONTAINER]) + return _traverseSameContainer(how); + + for (c = t[END_CONTAINER], p = c.parentNode; p; c = p, p = p.parentNode) { + if (p == t[START_CONTAINER]) + return _traverseCommonStartContainer(c, how); + + ++endContainerDepth; + } + + for (c = t[START_CONTAINER], p = c.parentNode; p; c = p, p = p.parentNode) { + if (p == t[END_CONTAINER]) + return _traverseCommonEndContainer(c, how); + + ++startContainerDepth; + } + + depthDiff = startContainerDepth - endContainerDepth; + + startNode = t[START_CONTAINER]; + while (depthDiff > 0) { + startNode = startNode.parentNode; + depthDiff--; + } + + endNode = t[END_CONTAINER]; + while (depthDiff < 0) { + endNode = endNode.parentNode; + depthDiff++; + } + + // ascend the ancestor hierarchy until we have a common parent. + for (sp = startNode.parentNode, ep = endNode.parentNode; sp != ep; sp = sp.parentNode, ep = ep.parentNode) { + startNode = sp; + endNode = ep; + } + + return _traverseCommonAncestors(startNode, endNode, how); + }; + + function _traverseSameContainer(how) { + var frag, s, sub, n, cnt, sibling, xferNode; + + if (how != DELETE) + frag = doc.createDocumentFragment(); + + // If selection is empty, just return the fragment + if (t[START_OFFSET] == t[END_OFFSET]) + return frag; + + // Text node needs special case handling + if (t[START_CONTAINER].nodeType == 3 /* TEXT_NODE */) { + // get the substring + s = t[START_CONTAINER].nodeValue; + sub = s.substring(t[START_OFFSET], t[END_OFFSET]); + + // set the original text node to its new value + if (how != CLONE) { + t[START_CONTAINER].deleteData(t[START_OFFSET], t[END_OFFSET] - t[START_OFFSET]); + + // Nothing is partially selected, so collapse to start point + t.collapse(TRUE); + } + + if (how == DELETE) + return; + + frag.appendChild(doc.createTextNode(sub)); + return frag; + } + + // Copy nodes between the start/end offsets. + n = _getSelectedNode(t[START_CONTAINER], t[START_OFFSET]); + cnt = t[END_OFFSET] - t[START_OFFSET]; + + while (cnt > 0) { + sibling = n.nextSibling; + xferNode = _traverseFullySelected(n, how); + + if (frag) + frag.appendChild( xferNode ); + + --cnt; + n = sibling; + } + + // Nothing is partially selected, so collapse to start point + if (how != CLONE) + t.collapse(TRUE); + + return frag; + }; + + function _traverseCommonStartContainer(endAncestor, how) { + var frag, n, endIdx, cnt, sibling, xferNode; + + if (how != DELETE) + frag = doc.createDocumentFragment(); + + n = _traverseRightBoundary(endAncestor, how); + + if (frag) + frag.appendChild(n); + + endIdx = nodeIndex(endAncestor); + cnt = endIdx - t[START_OFFSET]; + + if (cnt <= 0) { + // Collapse to just before the endAncestor, which + // is partially selected. + if (how != CLONE) { + t.setEndBefore(endAncestor); + t.collapse(FALSE); + } + + return frag; + } + + n = endAncestor.previousSibling; + while (cnt > 0) { + sibling = n.previousSibling; + xferNode = _traverseFullySelected(n, how); + + if (frag) + frag.insertBefore(xferNode, frag.firstChild); + + --cnt; + n = sibling; + } + + // Collapse to just before the endAncestor, which + // is partially selected. + if (how != CLONE) { + t.setEndBefore(endAncestor); + t.collapse(FALSE); + } + + return frag; + }; + + function _traverseCommonEndContainer(startAncestor, how) { + var frag, startIdx, n, cnt, sibling, xferNode; + + if (how != DELETE) + frag = doc.createDocumentFragment(); + + n = _traverseLeftBoundary(startAncestor, how); + if (frag) + frag.appendChild(n); + + startIdx = nodeIndex(startAncestor); + ++startIdx; // Because we already traversed it + + cnt = t[END_OFFSET] - startIdx; + n = startAncestor.nextSibling; + while (cnt > 0) { + sibling = n.nextSibling; + xferNode = _traverseFullySelected(n, how); + + if (frag) + frag.appendChild(xferNode); + + --cnt; + n = sibling; + } + + if (how != CLONE) { + t.setStartAfter(startAncestor); + t.collapse(TRUE); + } + + return frag; + }; + + function _traverseCommonAncestors(startAncestor, endAncestor, how) { + var n, frag, commonParent, startOffset, endOffset, cnt, sibling, nextSibling; + + if (how != DELETE) + frag = doc.createDocumentFragment(); + + n = _traverseLeftBoundary(startAncestor, how); + if (frag) + frag.appendChild(n); + + commonParent = startAncestor.parentNode; + startOffset = nodeIndex(startAncestor); + endOffset = nodeIndex(endAncestor); + ++startOffset; + + cnt = endOffset - startOffset; + sibling = startAncestor.nextSibling; + + while (cnt > 0) { + nextSibling = sibling.nextSibling; + n = _traverseFullySelected(sibling, how); + + if (frag) + frag.appendChild(n); + + sibling = nextSibling; + --cnt; + } + + n = _traverseRightBoundary(endAncestor, how); + + if (frag) + frag.appendChild(n); + + if (how != CLONE) { + t.setStartAfter(startAncestor); + t.collapse(TRUE); + } + + return frag; + }; + + function _traverseRightBoundary(root, how) { + var next = _getSelectedNode(t[END_CONTAINER], t[END_OFFSET] - 1), parent, clonedParent, prevSibling, clonedChild, clonedGrandParent, isFullySelected = next != t[END_CONTAINER]; + + if (next == root) + return _traverseNode(next, isFullySelected, FALSE, how); + + parent = next.parentNode; + clonedParent = _traverseNode(parent, FALSE, FALSE, how); + + while (parent) { + while (next) { + prevSibling = next.previousSibling; + clonedChild = _traverseNode(next, isFullySelected, FALSE, how); + + if (how != DELETE) + clonedParent.insertBefore(clonedChild, clonedParent.firstChild); + + isFullySelected = TRUE; + next = prevSibling; + } + + if (parent == root) + return clonedParent; + + next = parent.previousSibling; + parent = parent.parentNode; + + clonedGrandParent = _traverseNode(parent, FALSE, FALSE, how); + + if (how != DELETE) + clonedGrandParent.appendChild(clonedParent); + + clonedParent = clonedGrandParent; + } + }; + + function _traverseLeftBoundary(root, how) { + var next = _getSelectedNode(t[START_CONTAINER], t[START_OFFSET]), isFullySelected = next != t[START_CONTAINER], parent, clonedParent, nextSibling, clonedChild, clonedGrandParent; + + if (next == root) + return _traverseNode(next, isFullySelected, TRUE, how); + + parent = next.parentNode; + clonedParent = _traverseNode(parent, FALSE, TRUE, how); + + while (parent) { + while (next) { + nextSibling = next.nextSibling; + clonedChild = _traverseNode(next, isFullySelected, TRUE, how); + + if (how != DELETE) + clonedParent.appendChild(clonedChild); + + isFullySelected = TRUE; + next = nextSibling; + } + + if (parent == root) + return clonedParent; + + next = parent.nextSibling; + parent = parent.parentNode; + + clonedGrandParent = _traverseNode(parent, FALSE, TRUE, how); + + if (how != DELETE) + clonedGrandParent.appendChild(clonedParent); + + clonedParent = clonedGrandParent; + } + }; + + function _traverseNode(n, isFullySelected, isLeft, how) { + var txtValue, newNodeValue, oldNodeValue, offset, newNode; + + if (isFullySelected) + return _traverseFullySelected(n, how); + + if (n.nodeType == 3 /* TEXT_NODE */) { + txtValue = n.nodeValue; + + if (isLeft) { + offset = t[START_OFFSET]; + newNodeValue = txtValue.substring(offset); + oldNodeValue = txtValue.substring(0, offset); + } else { + offset = t[END_OFFSET]; + newNodeValue = txtValue.substring(0, offset); + oldNodeValue = txtValue.substring(offset); + } + + if (how != CLONE) + n.nodeValue = oldNodeValue; + + if (how == DELETE) + return; + + newNode = n.cloneNode(FALSE); + newNode.nodeValue = newNodeValue; + + return newNode; + } + + if (how == DELETE) + return; + + return n.cloneNode(FALSE); + }; + + function _traverseFullySelected(n, how) { + if (how != DELETE) + return how == CLONE ? n.cloneNode(TRUE) : n; + + n.parentNode.removeChild(n); + }; + }; + + ns.Range = Range; +})(tinymce.dom); diff --git a/include/javascript/tiny_mce/classes/dom/RangeUtils.js b/include/javascript/tiny_mce/classes/dom/RangeUtils.js new file mode 100644 index 00000000..cc321d95 --- /dev/null +++ b/include/javascript/tiny_mce/classes/dom/RangeUtils.js @@ -0,0 +1,228 @@ +/** + * Range.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + tinymce.dom.RangeUtils = function(dom) { + var INVISIBLE_CHAR = '\uFEFF'; + + /** + * Walks the specified range like object and executes the callback for each sibling collection it finds. + * + * @param {Object} rng Range like object. + * @param {function} callback Callback function to execute for each sibling collection. + */ + this.walk = function(rng, callback) { + var startContainer = rng.startContainer, + startOffset = rng.startOffset, + endContainer = rng.endContainer, + endOffset = rng.endOffset, + ancestor, startPoint, + endPoint, node, parent, siblings, nodes; + + // Handle table cell selection the table plugin enables + // you to fake select table cells and perform formatting actions on them + nodes = dom.select('td.mceSelected,th.mceSelected'); + if (nodes.length > 0) { + tinymce.each(nodes, function(node) { + callback([node]); + }); + + return; + } + + /** + * Collects siblings + * + * @private + * @param {Node} node Node to collect siblings from. + * @param {String} name Name of the sibling to check for. + * @return {Array} Array of collected siblings. + */ + function collectSiblings(node, name, end_node) { + var siblings = []; + + for (; node && node != end_node; node = node[name]) + siblings.push(node); + + return siblings; + }; + + /** + * Find an end point this is the node just before the common ancestor root. + * + * @private + * @param {Node} node Node to start at. + * @param {Node} root Root/ancestor element to stop just before. + * @return {Node} Node just before the root element. + */ + function findEndPoint(node, root) { + do { + if (node.parentNode == root) + return node; + + node = node.parentNode; + } while(node); + }; + + function walkBoundary(start_node, end_node, next) { + var siblingName = next ? 'nextSibling' : 'previousSibling'; + + for (node = start_node, parent = node.parentNode; node && node != end_node; node = parent) { + parent = node.parentNode; + siblings = collectSiblings(node == start_node ? node : node[siblingName], siblingName); + + if (siblings.length) { + if (!next) + siblings.reverse(); + + callback(siblings); + } + } + }; + + // If index based start position then resolve it + if (startContainer.nodeType == 1 && startContainer.hasChildNodes()) + startContainer = startContainer.childNodes[startOffset]; + + // If index based end position then resolve it + if (endContainer.nodeType == 1 && endContainer.hasChildNodes()) + endContainer = endContainer.childNodes[Math.min(endOffset - 1, endContainer.childNodes.length - 1)]; + + // Find common ancestor and end points + ancestor = dom.findCommonAncestor(startContainer, endContainer); + + // Same container + if (startContainer == endContainer) + return callback([startContainer]); + + // Process left side + for (node = startContainer; node; node = node.parentNode) { + if (node == endContainer) + return walkBoundary(startContainer, ancestor, true); + + if (node == ancestor) + break; + } + + // Process right side + for (node = endContainer; node; node = node.parentNode) { + if (node == startContainer) + return walkBoundary(endContainer, ancestor); + + if (node == ancestor) + break; + } + + // Find start/end point + startPoint = findEndPoint(startContainer, ancestor) || startContainer; + endPoint = findEndPoint(endContainer, ancestor) || endContainer; + + // Walk left leaf + walkBoundary(startContainer, startPoint, true); + + // Walk the middle from start to end point + siblings = collectSiblings( + startPoint == startContainer ? startPoint : startPoint.nextSibling, + 'nextSibling', + endPoint == endContainer ? endPoint.nextSibling : endPoint + ); + + if (siblings.length) + callback(siblings); + + // Walk right leaf + walkBoundary(endContainer, endPoint); + }; + + /** + * Splits the specified range at it's start/end points. + * + * @param {Range/RangeObject} rng Range to split. + * @return {Object} Range position object. + */ +/* this.split = function(rng) { + var startContainer = rng.startContainer, + startOffset = rng.startOffset, + endContainer = rng.endContainer, + endOffset = rng.endOffset; + + function splitText(node, offset) { + if (offset == node.nodeValue.length) + node.appendData(INVISIBLE_CHAR); + + node = node.splitText(offset); + + if (node.nodeValue === INVISIBLE_CHAR) + node.nodeValue = ''; + + return node; + }; + + // Handle single text node + if (startContainer == endContainer) { + if (startContainer.nodeType == 3) { + if (startOffset != 0) + startContainer = endContainer = splitText(startContainer, startOffset); + + if (endOffset - startOffset != startContainer.nodeValue.length) + splitText(startContainer, endOffset - startOffset); + } + } else { + // Split startContainer text node if needed + if (startContainer.nodeType == 3 && startOffset != 0) { + startContainer = splitText(startContainer, startOffset); + startOffset = 0; + } + + // Split endContainer text node if needed + if (endContainer.nodeType == 3 && endOffset != endContainer.nodeValue.length) { + endContainer = splitText(endContainer, endOffset).previousSibling; + endOffset = endContainer.nodeValue.length; + } + } + + return { + startContainer : startContainer, + startOffset : startOffset, + endContainer : endContainer, + endOffset : endOffset + }; + }; +*/ + }; + + /** + * Compares two ranges and checks if they are equal. + * + * @static + * @param {DOMRange} rng1 First range to compare. + * @param {DOMRange} rng2 First range to compare. + * @return {Boolean} true/false if the ranges are equal. + */ + tinymce.dom.RangeUtils.compareRanges = function(rng1, rng2) { + if (rng1 && rng2) { + // Compare native IE ranges + if (rng1.item || rng1.duplicate) { + // Both are control ranges and the selected element matches + if (rng1.item && rng2.item && rng1.item(0) === rng2.item(0)) + return true; + + // Both are text ranges and the range matches + if (rng1.isEqual && rng2.isEqual && rng2.isEqual(rng1)) + return true; + } else { + // Compare w3c ranges + return rng1.startContainer == rng2.startContainer && rng1.startOffset == rng2.startOffset; + } + } + + return false; + }; +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/dom/ScriptLoader.js b/include/javascript/tiny_mce/classes/dom/ScriptLoader.js new file mode 100644 index 00000000..a322759e --- /dev/null +++ b/include/javascript/tiny_mce/classes/dom/ScriptLoader.js @@ -0,0 +1,285 @@ +/** + * ScriptLoader.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + /** + * This class handles asynchronous/synchronous loading of JavaScript files it will execute callbacks when various items gets loaded. This class is useful to load external JavaScript files. + * + * @class tinymce.dom.ScriptLoader + * @example + * // Load a script from a specific URL using the global script loader + * tinymce.ScriptLoader.load('somescript.js'); + * + * // Load a script using a unique instance of the script loader + * var scriptLoader = new tinymce.dom.ScriptLoader(); + * + * scriptLoader.load('somescript.js'); + * + * // Load multiple scripts + * var scriptLoader = new tinymce.dom.ScriptLoader(); + * + * scriptLoader.add('somescript1.js'); + * scriptLoader.add('somescript2.js'); + * scriptLoader.add('somescript3.js'); + * + * scriptLoader.loadQueue(function() { + * alert('All scripts are now loaded.'); + * }); + */ + tinymce.dom.ScriptLoader = function(settings) { + var QUEUED = 0, + LOADING = 1, + LOADED = 2, + states = {}, + queue = [], + scriptLoadedCallbacks = {}, + queueLoadedCallbacks = [], + loading = 0, + undefined; + + /** + * Loads a specific script directly without adding it to the load queue. + * + * @method load + * @param {String} url Absolute URL to script to add. + * @param {function} callback Optional callback function to execute ones this script gets loaded. + * @param {Object} scope Optional scope to execute callback in. + */ + function loadScript(url, callback) { + var t = this, dom = tinymce.DOM, elm, uri, loc, id; + + // Execute callback when script is loaded + function done() { + dom.remove(id); + + if (elm) + elm.onreadystatechange = elm.onload = elm = null; + + callback(); + }; + + function error() { + // Report the error so it's easier for people to spot loading errors + if (typeof(console) !== "undefined" && console.log) + console.log("Failed to load: " + url); + + // We can't mark it as done if there is a load error since + // A) We don't want to produce 404 errors on the server and + // B) the onerror event won't fire on all browsers. + // done(); + }; + + id = dom.uniqueId(); + + if (tinymce.isIE6) { + uri = new tinymce.util.URI(url); + loc = location; + + // If script is from same domain and we + // use IE 6 then use XHR since it's more reliable + if (uri.host == loc.hostname && uri.port == loc.port && (uri.protocol + ':') == loc.protocol && uri.protocol.toLowerCase() != 'file') { + tinymce.util.XHR.send({ + url : tinymce._addVer(uri.getURI()), + success : function(content) { + // Create new temp script element + var script = dom.create('script', { + type : 'text/javascript' + }); + + // Evaluate script in global scope + script.text = content; + document.getElementsByTagName('head')[0].appendChild(script); + dom.remove(script); + + done(); + }, + + error : error + }); + + return; + } + } + + // Create new script element + elm = dom.create('script', { + id : id, + type : 'text/javascript', + src : tinymce._addVer(url) + }); + + // Add onload listener for non IE browsers since IE9 + // fires onload event before the script is parsed and executed + if (!tinymce.isIE) + elm.onload = done; + + // Add onerror event will get fired on some browsers but not all of them + elm.onerror = error; + + // Opera 9.60 doesn't seem to fire the onreadystate event at correctly + if (!tinymce.isOpera) { + elm.onreadystatechange = function() { + var state = elm.readyState; + + // Loaded state is passed on IE 6 however there + // are known issues with this method but we can't use + // XHR in a cross domain loading + if (state == 'complete' || state == 'loaded') + done(); + }; + } + + // Most browsers support this feature so we report errors + // for those at least to help users track their missing plugins etc + // todo: Removed since it produced error if the document is unloaded by navigating away, re-add it as an option + /*elm.onerror = function() { + alert('Failed to load: ' + url); + };*/ + + // Add script to document + (document.getElementsByTagName('head')[0] || document.body).appendChild(elm); + }; + + /** + * Returns true/false if a script has been loaded or not. + * + * @method isDone + * @param {String} url URL to check for. + * @return [Boolean} true/false if the URL is loaded. + */ + this.isDone = function(url) { + return states[url] == LOADED; + }; + + /** + * Marks a specific script to be loaded. This can be useful if a script got loaded outside + * the script loader or to skip it from loading some script. + * + * @method markDone + * @param {string} u Absolute URL to the script to mark as loaded. + */ + this.markDone = function(url) { + states[url] = LOADED; + }; + + /** + * Adds a specific script to the load queue of the script loader. + * + * @method add + * @param {String} url Absolute URL to script to add. + * @param {function} callback Optional callback function to execute ones this script gets loaded. + * @param {Object} scope Optional scope to execute callback in. + */ + this.add = this.load = function(url, callback, scope) { + var item, state = states[url]; + + // Add url to load queue + if (state == undefined) { + queue.push(url); + states[url] = QUEUED; + } + + if (callback) { + // Store away callback for later execution + if (!scriptLoadedCallbacks[url]) + scriptLoadedCallbacks[url] = []; + + scriptLoadedCallbacks[url].push({ + func : callback, + scope : scope || this + }); + } + }; + + /** + * Starts the loading of the queue. + * + * @method loadQueue + * @param {function} callback Optional callback to execute when all queued items are loaded. + * @param {Object} scope Optional scope to execute the callback in. + */ + this.loadQueue = function(callback, scope) { + this.loadScripts(queue, callback, scope); + }; + + /** + * Loads the specified queue of files and executes the callback ones they are loaded. + * This method is generally not used outside this class but it might be useful in some scenarios. + * + * @method loadScripts + * @param {Array} scripts Array of queue items to load. + * @param {function} callback Optional callback to execute ones all items are loaded. + * @param {Object} scope Optional scope to execute callback in. + */ + this.loadScripts = function(scripts, callback, scope) { + var loadScripts; + + function execScriptLoadedCallbacks(url) { + // Execute URL callback functions + tinymce.each(scriptLoadedCallbacks[url], function(callback) { + callback.func.call(callback.scope); + }); + + scriptLoadedCallbacks[url] = undefined; + }; + + queueLoadedCallbacks.push({ + func : callback, + scope : scope || this + }); + + loadScripts = function() { + var loadingScripts = tinymce.grep(scripts); + + // Current scripts has been handled + scripts.length = 0; + + // Load scripts that needs to be loaded + tinymce.each(loadingScripts, function(url) { + // Script is already loaded then execute script callbacks directly + if (states[url] == LOADED) { + execScriptLoadedCallbacks(url); + return; + } + + // Is script not loading then start loading it + if (states[url] != LOADING) { + states[url] = LOADING; + loading++; + + loadScript(url, function() { + states[url] = LOADED; + loading--; + + execScriptLoadedCallbacks(url); + + // Load more scripts if they where added by the recently loaded script + loadScripts(); + }); + } + }); + + // No scripts are currently loading then execute all pending queue loaded callbacks + if (!loading) { + tinymce.each(queueLoadedCallbacks, function(callback) { + callback.func.call(callback.scope); + }); + + queueLoadedCallbacks.length = 0; + } + }; + + loadScripts(); + }; + }; + + // Global script loader + tinymce.ScriptLoader = new tinymce.dom.ScriptLoader(); +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/dom/Selection.js b/include/javascript/tiny_mce/classes/dom/Selection.js new file mode 100644 index 00000000..966c50ff --- /dev/null +++ b/include/javascript/tiny_mce/classes/dom/Selection.js @@ -0,0 +1,1003 @@ +/** + * Selection.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + function trimNl(s) { + return s.replace(/[\n\r]+/g, ''); + }; + + // Shorten names + var is = tinymce.is, isIE = tinymce.isIE, each = tinymce.each; + + /** + * This class handles text and control selection it's an crossbrowser utility class. + * Consult the TinyMCE Wiki API for more details and examples on how to use this class. + * + * @class tinymce.dom.Selection + * @example + * // Getting the currently selected node for the active editor + * alert(tinymce.activeEditor.selection.getNode().nodeName); + */ + tinymce.create('tinymce.dom.Selection', { + /** + * Constructs a new selection instance. + * + * @constructor + * @method Selection + * @param {tinymce.dom.DOMUtils} dom DOMUtils object reference. + * @param {Window} win Window to bind the selection object to. + * @param {tinymce.dom.Serializer} serializer DOM serialization class to use for getContent. + */ + Selection : function(dom, win, serializer) { + var t = this; + + t.dom = dom; + t.win = win; + t.serializer = serializer; + + // Add events + each([ + /** + * This event gets executed before contents is extracted from the selection. + * + * @event onBeforeSetContent + * @param {tinymce.dom.Selection} selection Selection object that fired the event. + * @param {Object} args Contains things like the contents that will be returned. + */ + 'onBeforeSetContent', + + /** + * This event gets executed before contents is inserted into selection. + * + * @event onBeforeGetContent + * @param {tinymce.dom.Selection} selection Selection object that fired the event. + * @param {Object} args Contains things like the contents that will be inserted. + */ + 'onBeforeGetContent', + + /** + * This event gets executed when contents is inserted into selection. + * + * @event onSetContent + * @param {tinymce.dom.Selection} selection Selection object that fired the event. + * @param {Object} args Contains things like the contents that will be inserted. + */ + 'onSetContent', + + /** + * This event gets executed when contents is extracted from the selection. + * + * @event onGetContent + * @param {tinymce.dom.Selection} selection Selection object that fired the event. + * @param {Object} args Contains things like the contents that will be returned. + */ + 'onGetContent' + ], function(e) { + t[e] = new tinymce.util.Dispatcher(t); + }); + + // No W3C Range support + if (!t.win.getSelection) + t.tridentSel = new tinymce.dom.TridentSelection(t); + + if (tinymce.isIE && dom.boxModel) + this._fixIESelection(); + + // Prevent leaks + tinymce.addUnload(t.destroy, t); + }, + + /** + * Returns the selected contents using the DOM serializer passed in to this class. + * + * @method getContent + * @param {Object} s Optional settings class with for example output format text or html. + * @return {String} Selected contents in for example HTML format. + * @example + * // Alerts the currently selected contents + * alert(tinyMCE.activeEditor.selection.getContent()); + * + * // Alerts the currently selected contents as plain text + * alert(tinyMCE.activeEditor.selection.getContent({format : 'text'})); + */ + getContent : function(s) { + var t = this, r = t.getRng(), e = t.dom.create("body"), se = t.getSel(), wb, wa, n; + + s = s || {}; + wb = wa = ''; + s.get = true; + s.format = s.format || 'html'; + t.onBeforeGetContent.dispatch(t, s); + + if (s.format == 'text') + return t.isCollapsed() ? '' : (r.text || (se.toString ? se.toString() : '')); + + if (r.cloneContents) { + n = r.cloneContents(); + + if (n) + e.appendChild(n); + } else if (is(r.item) || is(r.htmlText)) + e.innerHTML = r.item ? r.item(0).outerHTML : r.htmlText; + else + e.innerHTML = r.toString(); + + // Keep whitespace before and after + if (/^\s/.test(e.innerHTML)) + wb = ' '; + + if (/\s+$/.test(e.innerHTML)) + wa = ' '; + + s.getInner = true; + + s.content = t.isCollapsed() ? '' : wb + t.serializer.serialize(e, s) + wa; + t.onGetContent.dispatch(t, s); + + return s.content; + }, + + /** + * Sets the current selection to the specified content. If any contents is selected it will be replaced + * with the contents passed in to this function. If there is no selection the contents will be inserted + * where the caret is placed in the editor/page. + * + * @method setContent + * @param {String} content HTML contents to set could also be other formats depending on settings. + * @param {Object} args Optional settings object with for example data format. + * @example + * // Inserts some HTML contents at the current selection + * tinyMCE.activeEditor.selection.setContent('Some contents'); + */ + setContent : function(content, args) { + var self = this, rng = self.getRng(), caretNode, doc = self.win.document, frag, temp; + + args = args || {format : 'html'}; + args.set = true; + content = args.content = content; + + // Dispatch before set content event + if (!args.no_events) + self.onBeforeSetContent.dispatch(self, args); + + content = args.content; + + if (rng.insertNode) { + // Make caret marker since insertNode places the caret in the beginning of text after insert + content += '_'; + + // Delete and insert new node + if (rng.startContainer == doc && rng.endContainer == doc) { + // WebKit will fail if the body is empty since the range is then invalid and it can't insert contents + doc.body.innerHTML = content; + } else { + rng.deleteContents(); + + if (doc.body.childNodes.length == 0) { + doc.body.innerHTML = content; + } else { + // createContextualFragment doesn't exists in IE 9 DOMRanges + if (rng.createContextualFragment) { + rng.insertNode(rng.createContextualFragment(content)); + } else { + // Fake createContextualFragment call in IE 9 + frag = doc.createDocumentFragment(); + temp = doc.createElement('div'); + + frag.appendChild(temp); + temp.outerHTML = content; + + rng.insertNode(frag); + } + } + } + + // Move to caret marker + caretNode = self.dom.get('__caret'); + + // Make sure we wrap it compleatly, Opera fails with a simple select call + rng = doc.createRange(); + rng.setStartBefore(caretNode); + rng.setEndBefore(caretNode); + self.setRng(rng); + + // Remove the caret position + self.dom.remove('__caret'); + self.setRng(rng); + } else { + if (rng.item) { + // Delete content and get caret text selection + doc.execCommand('Delete', false, null); + rng = self.getRng(); + } + + rng.pasteHTML(content); + } + + // Dispatch set content event + if (!args.no_events) + self.onSetContent.dispatch(self, args); + }, + + /** + * Returns the start element of a selection range. If the start is in a text + * node the parent element will be returned. + * + * @method getStart + * @return {Element} Start element of selection range. + */ + getStart : function() { + var rng = this.getRng(), startElement, parentElement, checkRng, node; + + if (rng.duplicate || rng.item) { + // Control selection, return first item + if (rng.item) + return rng.item(0); + + // Get start element + checkRng = rng.duplicate(); + checkRng.collapse(1); + startElement = checkRng.parentElement(); + + // Check if range parent is inside the start element, then return the inner parent element + // This will fix issues when a single element is selected, IE would otherwise return the wrong start element + parentElement = node = rng.parentElement(); + while (node = node.parentNode) { + if (node == startElement) { + startElement = parentElement; + break; + } + } + + return startElement; + } else { + startElement = rng.startContainer; + + if (startElement.nodeType == 1 && startElement.hasChildNodes()) + startElement = startElement.childNodes[Math.min(startElement.childNodes.length - 1, rng.startOffset)]; + + if (startElement && startElement.nodeType == 3) + return startElement.parentNode; + + return startElement; + } + }, + + /** + * Returns the end element of a selection range. If the end is in a text + * node the parent element will be returned. + * + * @method getEnd + * @return {Element} End element of selection range. + */ + getEnd : function() { + var t = this, r = t.getRng(), e, eo; + + if (r.duplicate || r.item) { + if (r.item) + return r.item(0); + + r = r.duplicate(); + r.collapse(0); + e = r.parentElement(); + + if (e && e.nodeName == 'BODY') + return e.lastChild || e; + + return e; + } else { + e = r.endContainer; + eo = r.endOffset; + + if (e.nodeType == 1 && e.hasChildNodes()) + e = e.childNodes[eo > 0 ? eo - 1 : eo]; + + if (e && e.nodeType == 3) + return e.parentNode; + + return e; + } + }, + + /** + * Returns a bookmark location for the current selection. This bookmark object + * can then be used to restore the selection after some content modification to the document. + * + * @method getBookmark + * @param {Number} type Optional state if the bookmark should be simple or not. Default is complex. + * @param {Boolean} normalized Optional state that enables you to get a position that it would be after normalization. + * @return {Object} Bookmark object, use moveToBookmark with this object to restore the selection. + * @example + * // Stores a bookmark of the current selection + * var bm = tinyMCE.activeEditor.selection.getBookmark(); + * + * tinyMCE.activeEditor.setContent(tinyMCE.activeEditor.getContent() + 'Some new content'); + * + * // Restore the selection bookmark + * tinyMCE.activeEditor.selection.moveToBookmark(bm); + */ + getBookmark : function(type, normalized) { + var t = this, dom = t.dom, rng, rng2, id, collapsed, name, element, index, chr = '\uFEFF', styles; + + function findIndex(name, element) { + var index = 0; + + each(dom.select(name), function(node, i) { + if (node == element) + index = i; + }); + + return index; + }; + + if (type == 2) { + function getLocation() { + var rng = t.getRng(true), root = dom.getRoot(), bookmark = {}; + + function getPoint(rng, start) { + var container = rng[start ? 'startContainer' : 'endContainer'], + offset = rng[start ? 'startOffset' : 'endOffset'], point = [], node, childNodes, after = 0; + + if (container.nodeType == 3) { + if (normalized) { + for (node = container.previousSibling; node && node.nodeType == 3; node = node.previousSibling) + offset += node.nodeValue.length; + } + + point.push(offset); + } else { + childNodes = container.childNodes; + + if (offset >= childNodes.length && childNodes.length) { + after = 1; + offset = Math.max(0, childNodes.length - 1); + } + + point.push(t.dom.nodeIndex(childNodes[offset], normalized) + after); + } + + for (; container && container != root; container = container.parentNode) + point.push(t.dom.nodeIndex(container, normalized)); + + return point; + }; + + bookmark.start = getPoint(rng, true); + + if (!t.isCollapsed()) + bookmark.end = getPoint(rng); + + return bookmark; + }; + + return getLocation(); + } + + // Handle simple range + if (type) + return {rng : t.getRng()}; + + rng = t.getRng(); + id = dom.uniqueId(); + collapsed = tinyMCE.activeEditor.selection.isCollapsed(); + styles = 'overflow:hidden;line-height:0px'; + + // Explorer method + if (rng.duplicate || rng.item) { + // Text selection + if (!rng.item) { + rng2 = rng.duplicate(); + + try { + // Insert start marker + rng.collapse(); + rng.pasteHTML('' + chr + ''); + + // Insert end marker + if (!collapsed) { + rng2.collapse(false); + + // Detect the empty space after block elements in IE and move the end back one character

] becomes

]

+ rng.moveToElementText(rng2.parentElement()); + if (rng.compareEndPoints('StartToEnd', rng2) == 0) + rng2.move('character', -1); + + rng2.pasteHTML('' + chr + ''); + } + } catch (ex) { + // IE might throw unspecified error so lets ignore it + return null; + } + } else { + // Control selection + element = rng.item(0); + name = element.nodeName; + + return {name : name, index : findIndex(name, element)}; + } + } else { + element = t.getNode(); + name = element.nodeName; + if (name == 'IMG') + return {name : name, index : findIndex(name, element)}; + + // W3C method + rng2 = rng.cloneRange(); + + // Insert end marker + if (!collapsed) { + rng2.collapse(false); + rng2.insertNode(dom.create('span', {'data-mce-type' : "bookmark", id : id + '_end', style : styles}, chr)); + } + + rng.collapse(true); + rng.insertNode(dom.create('span', {'data-mce-type' : "bookmark", id : id + '_start', style : styles}, chr)); + } + + t.moveToBookmark({id : id, keep : 1}); + + return {id : id}; + }, + + /** + * Restores the selection to the specified bookmark. + * + * @method moveToBookmark + * @param {Object} bookmark Bookmark to restore selection from. + * @return {Boolean} true/false if it was successful or not. + * @example + * // Stores a bookmark of the current selection + * var bm = tinyMCE.activeEditor.selection.getBookmark(); + * + * tinyMCE.activeEditor.setContent(tinyMCE.activeEditor.getContent() + 'Some new content'); + * + * // Restore the selection bookmark + * tinyMCE.activeEditor.selection.moveToBookmark(bm); + */ + moveToBookmark : function(bookmark) { + var t = this, dom = t.dom, marker1, marker2, rng, root, startContainer, endContainer, startOffset, endOffset; + + // Clear selection cache + if (t.tridentSel) + t.tridentSel.destroy(); + + if (bookmark) { + if (bookmark.start) { + rng = dom.createRng(); + root = dom.getRoot(); + + function setEndPoint(start) { + var point = bookmark[start ? 'start' : 'end'], i, node, offset, children; + + if (point) { + offset = point[0]; + + // Find container node + for (node = root, i = point.length - 1; i >= 1; i--) { + children = node.childNodes; + + if (point[i] > children.length - 1) + return; + + node = children[point[i]]; + } + + // Move text offset to best suitable location + if (node.nodeType === 3) + offset = Math.min(point[0], node.nodeValue.length); + + // Move element offset to best suitable location + if (node.nodeType === 1) + offset = Math.min(point[0], node.childNodes.length); + + // Set offset within container node + if (start) + rng.setStart(node, offset); + else + rng.setEnd(node, offset); + } + + return true; + }; + + if (setEndPoint(true) && setEndPoint()) { + t.setRng(rng); + } + } else if (bookmark.id) { + function restoreEndPoint(suffix) { + var marker = dom.get(bookmark.id + '_' + suffix), node, idx, next, prev, keep = bookmark.keep; + + if (marker) { + node = marker.parentNode; + + if (suffix == 'start') { + if (!keep) { + idx = dom.nodeIndex(marker); + } else { + node = marker.firstChild; + idx = 1; + } + + startContainer = endContainer = node; + startOffset = endOffset = idx; + } else { + if (!keep) { + idx = dom.nodeIndex(marker); + } else { + node = marker.firstChild; + idx = 1; + } + + endContainer = node; + endOffset = idx; + } + + if (!keep) { + prev = marker.previousSibling; + next = marker.nextSibling; + + // Remove all marker text nodes + each(tinymce.grep(marker.childNodes), function(node) { + if (node.nodeType == 3) + node.nodeValue = node.nodeValue.replace(/\uFEFF/g, ''); + }); + + // Remove marker but keep children if for example contents where inserted into the marker + // Also remove duplicated instances of the marker for example by a split operation or by WebKit auto split on paste feature + while (marker = dom.get(bookmark.id + '_' + suffix)) + dom.remove(marker, 1); + + // If siblings are text nodes then merge them unless it's Opera since it some how removes the node + // and we are sniffing since adding a lot of detection code for a browser with 3% of the market isn't worth the effort. Sorry, Opera but it's just a fact + if (prev && next && prev.nodeType == next.nodeType && prev.nodeType == 3 && !tinymce.isOpera) { + idx = prev.nodeValue.length; + prev.appendData(next.nodeValue); + dom.remove(next); + + if (suffix == 'start') { + startContainer = endContainer = prev; + startOffset = endOffset = idx; + } else { + endContainer = prev; + endOffset = idx; + } + } + } + } + }; + + function addBogus(node) { + // Adds a bogus BR element for empty block elements or just a space on IE since it renders BR elements incorrectly + if (dom.isBlock(node) && !node.innerHTML) + node.innerHTML = !isIE ? '
' : ' '; + + return node; + }; + + // Restore start/end points + restoreEndPoint('start'); + restoreEndPoint('end'); + + if (startContainer) { + rng = dom.createRng(); + rng.setStart(addBogus(startContainer), startOffset); + rng.setEnd(addBogus(endContainer), endOffset); + t.setRng(rng); + } + } else if (bookmark.name) { + t.select(dom.select(bookmark.name)[bookmark.index]); + } else if (bookmark.rng) + t.setRng(bookmark.rng); + } + }, + + /** + * Selects the specified element. This will place the start and end of the selection range around the element. + * + * @method select + * @param {Element} node HMTL DOM element to select. + * @param {Boolean} content Optional bool state if the contents should be selected or not on non IE browser. + * @return {Element} Selected element the same element as the one that got passed in. + * @example + * // Select the first paragraph in the active editor + * tinyMCE.activeEditor.selection.select(tinyMCE.activeEditor.dom.select('p')[0]); + */ + select : function(node, content) { + var t = this, dom = t.dom, rng = dom.createRng(), idx; + + if (node) { + idx = dom.nodeIndex(node); + rng.setStart(node.parentNode, idx); + rng.setEnd(node.parentNode, idx + 1); + + // Find first/last text node or BR element + if (content) { + function setPoint(node, start) { + var walker = new tinymce.dom.TreeWalker(node, node); + + do { + // Text node + if (node.nodeType == 3 && tinymce.trim(node.nodeValue).length != 0) { + if (start) + rng.setStart(node, 0); + else + rng.setEnd(node, node.nodeValue.length); + + return; + } + + // BR element + if (node.nodeName == 'BR') { + if (start) + rng.setStartBefore(node); + else + rng.setEndBefore(node); + + return; + } + } while (node = (start ? walker.next() : walker.prev())); + }; + + setPoint(node, 1); + setPoint(node); + } + + t.setRng(rng); + } + + return node; + }, + + /** + * Returns true/false if the selection range is collapsed or not. Collapsed means if it's a caret or a larger selection. + * + * @method isCollapsed + * @return {Boolean} true/false state if the selection range is collapsed or not. Collapsed means if it's a caret or a larger selection. + */ + isCollapsed : function() { + var t = this, r = t.getRng(), s = t.getSel(); + + if (!r || r.item) + return false; + + if (r.compareEndPoints) + return r.compareEndPoints('StartToEnd', r) === 0; + + return !s || r.collapsed; + }, + + /** + * Collapse the selection to start or end of range. + * + * @method collapse + * @param {Boolean} to_start Optional boolean state if to collapse to end or not. Defaults to start. + */ + collapse : function(to_start) { + var self = this, rng = self.getRng(), node; + + // Control range on IE + if (rng.item) { + node = rng.item(0); + rng = self.win.document.body.createTextRange(); + rng.moveToElementText(node); + } + + rng.collapse(!!to_start); + self.setRng(rng); + }, + + /** + * Returns the browsers internal selection object. + * + * @method getSel + * @return {Selection} Internal browser selection object. + */ + getSel : function() { + var t = this, w = this.win; + + return w.getSelection ? w.getSelection() : w.document.selection; + }, + + /** + * Returns the browsers internal range object. + * + * @method getRng + * @param {Boolean} w3c Forces a compatible W3C range on IE. + * @return {Range} Internal browser range object. + * @see http://www.quirksmode.org/dom/range_intro.html + * @see http://www.dotvoid.com/2001/03/using-the-range-object-in-mozilla/ + */ + getRng : function(w3c) { + var t = this, s, r, elm, doc = t.win.document; + + // Found tridentSel object then we need to use that one + if (w3c && t.tridentSel) + return t.tridentSel.getRangeAt(0); + + try { + if (s = t.getSel()) + r = s.rangeCount > 0 ? s.getRangeAt(0) : (s.createRange ? s.createRange() : doc.createRange()); + } catch (ex) { + // IE throws unspecified error here if TinyMCE is placed in a frame/iframe + } + + // We have W3C ranges and it's IE then fake control selection since IE9 doesn't handle that correctly yet + if (tinymce.isIE && r && r.setStart && doc.selection.createRange().item) { + elm = doc.selection.createRange().item(0); + r = doc.createRange(); + r.setStartBefore(elm); + r.setEndAfter(elm); + } + + // No range found then create an empty one + // This can occur when the editor is placed in a hidden container element on Gecko + // Or on IE when there was an exception + if (!r) + r = doc.createRange ? doc.createRange() : doc.body.createTextRange(); + + if (t.selectedRange && t.explicitRange) { + if (r.compareBoundaryPoints(r.START_TO_START, t.selectedRange) === 0 && r.compareBoundaryPoints(r.END_TO_END, t.selectedRange) === 0) { + // Safari, Opera and Chrome only ever select text which causes the range to change. + // This lets us use the originally set range if the selection hasn't been changed by the user. + r = t.explicitRange; + } else { + t.selectedRange = null; + t.explicitRange = null; + } + } + + return r; + }, + + /** + * Changes the selection to the specified DOM range. + * + * @method setRng + * @param {Range} r Range to select. + */ + setRng : function(r) { + var s, t = this; + + if (!t.tridentSel) { + s = t.getSel(); + + if (s) { + t.explicitRange = r; + + try { + s.removeAllRanges(); + } catch (ex) { + // IE9 might throw errors here don't know why + } + + s.addRange(r); + t.selectedRange = s.getRangeAt(0); + } + } else { + // Is W3C Range + if (r.cloneRange) { + t.tridentSel.addRange(r); + return; + } + + // Is IE specific range + try { + r.select(); + } catch (ex) { + // Needed for some odd IE bug #1843306 + } + } + }, + + /** + * Sets the current selection to the specified DOM element. + * + * @method setNode + * @param {Element} n Element to set as the contents of the selection. + * @return {Element} Returns the element that got passed in. + * @example + * // Inserts a DOM node at current selection/caret location + * tinyMCE.activeEditor.selection.setNode(tinyMCE.activeEditor.dom.create('img', {src : 'some.gif', title : 'some title'})); + */ + setNode : function(n) { + var t = this; + + t.setContent(t.dom.getOuterHTML(n)); + + return n; + }, + + /** + * Returns the currently selected element or the common ancestor element for both start and end of the selection. + * + * @method getNode + * @return {Element} Currently selected element or common ancestor element. + * @example + * // Alerts the currently selected elements node name + * alert(tinyMCE.activeEditor.selection.getNode().nodeName); + */ + getNode : function() { + var t = this, rng = t.getRng(), sel = t.getSel(), elm, start = rng.startContainer, end = rng.endContainer; + + // Range maybe lost after the editor is made visible again + if (!rng) + return t.dom.getRoot(); + + if (rng.setStart) { + elm = rng.commonAncestorContainer; + + // Handle selection a image or other control like element such as anchors + if (!rng.collapsed) { + if (rng.startContainer == rng.endContainer) { + if (rng.endOffset - rng.startOffset < 2) { + if (rng.startContainer.hasChildNodes()) + elm = rng.startContainer.childNodes[rng.startOffset]; + } + } + + // If the anchor node is a element instead of a text node then return this element + //if (tinymce.isWebKit && sel.anchorNode && sel.anchorNode.nodeType == 1) + // return sel.anchorNode.childNodes[sel.anchorOffset]; + + // Handle cases where the selection is immediately wrapped around a node and return that node instead of it's parent. + // This happens when you double click an underlined word in FireFox. + if (start.nodeType === 3 && end.nodeType === 3) { + function skipEmptyTextNodes(n, forwards) { + var orig = n; + while (n && n.nodeType === 3 && n.length === 0) { + n = forwards ? n.nextSibling : n.previousSibling; + } + return n || orig; + } + if (start.length === rng.startOffset) { + start = skipEmptyTextNodes(start.nextSibling, true); + } else { + start = start.parentNode; + } + if (rng.endOffset === 0) { + end = skipEmptyTextNodes(end.previousSibling, false); + } else { + end = end.parentNode; + } + + if (start && start === end) + return start; + } + } + + if (elm && elm.nodeType == 3) + return elm.parentNode; + + return elm; + } + + return rng.item ? rng.item(0) : rng.parentElement(); + }, + + getSelectedBlocks : function(st, en) { + var t = this, dom = t.dom, sb, eb, n, bl = []; + + sb = dom.getParent(st || t.getStart(), dom.isBlock); + eb = dom.getParent(en || t.getEnd(), dom.isBlock); + + if (sb) + bl.push(sb); + + if (sb && eb && sb != eb) { + n = sb; + + while ((n = n.nextSibling) && n != eb) { + if (dom.isBlock(n)) + bl.push(n); + } + } + + if (eb && sb != eb) + bl.push(eb); + + return bl; + }, + + destroy : function(s) { + var t = this; + + t.win = null; + + if (t.tridentSel) + t.tridentSel.destroy(); + + // Manual destroy then remove unload handler + if (!s) + tinymce.removeUnload(t.destroy); + }, + + // IE has an issue where you can't select/move the caret by clicking outside the body if the document is in standards mode + _fixIESelection : function() { + var dom = this.dom, doc = dom.doc, body = doc.body, started, startRng, htmlElm; + + // Make HTML element unselectable since we are going to handle selection by hand + doc.documentElement.unselectable = true; + + // Return range from point or null if it failed + function rngFromPoint(x, y) { + var rng = body.createTextRange(); + + try { + rng.moveToPoint(x, y); + } catch (ex) { + // IE sometimes throws and exception, so lets just ignore it + rng = null; + } + + return rng; + }; + + // Fires while the selection is changing + function selectionChange(e) { + var pointRng; + + // Check if the button is down or not + if (e.button) { + // Create range from mouse position + pointRng = rngFromPoint(e.x, e.y); + + if (pointRng) { + // Check if pointRange is before/after selection then change the endPoint + if (pointRng.compareEndPoints('StartToStart', startRng) > 0) + pointRng.setEndPoint('StartToStart', startRng); + else + pointRng.setEndPoint('EndToEnd', startRng); + + pointRng.select(); + } + } else + endSelection(); + } + + // Removes listeners + function endSelection() { + var rng = doc.selection.createRange(); + + // If the range is collapsed then use the last start range + if (startRng && !rng.item && rng.compareEndPoints('StartToEnd', rng) === 0) + startRng.select(); + + dom.unbind(doc, 'mouseup', endSelection); + dom.unbind(doc, 'mousemove', selectionChange); + startRng = started = 0; + }; + + // Detect when user selects outside BODY + dom.bind(doc, ['mousedown', 'contextmenu'], function(e) { + if (e.target.nodeName === 'HTML') { + if (started) + endSelection(); + + // Detect vertical scrollbar, since IE will fire a mousedown on the scrollbar and have target set as HTML + htmlElm = doc.documentElement; + if (htmlElm.scrollHeight > htmlElm.clientHeight) + return; + + started = 1; + // Setup start position + startRng = rngFromPoint(e.x, e.y); + if (startRng) { + // Listen for selection change events + dom.bind(doc, 'mouseup', endSelection); + dom.bind(doc, 'mousemove', selectionChange); + + dom.win.focus(); + startRng.select(); + } + } + }); + } + }); +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/dom/Serializer.js b/include/javascript/tiny_mce/classes/dom/Serializer.js new file mode 100644 index 00000000..5541c36d --- /dev/null +++ b/include/javascript/tiny_mce/classes/dom/Serializer.js @@ -0,0 +1,379 @@ +/** + * Serializer.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + /** + * This class is used to serialize DOM trees into a string. Consult the TinyMCE Wiki API for more details and examples on how to use this class. + * + * @class tinymce.dom.Serializer + */ + + /** + * Constucts a new DOM serializer class. + * + * @constructor + * @method Serializer + * @param {Object} settings Serializer settings object. + * @param {tinymce.dom.DOMUtils} dom DOMUtils instance reference. + * @param {tinymce.html.Schema} schema Optional schema reference. + */ + tinymce.dom.Serializer = function(settings, dom, schema) { + var onPreProcess, onPostProcess, isIE = tinymce.isIE, each = tinymce.each, htmlParser; + + // Support the old apply_source_formatting option + if (!settings.apply_source_formatting) + settings.indent = false; + + settings.remove_trailing_brs = true; + + // Default DOM and Schema if they are undefined + dom = dom || tinymce.DOM; + schema = schema || new tinymce.html.Schema(settings); + settings.entity_encoding = settings.entity_encoding || 'named'; + + /** + * This event gets executed before a HTML fragment gets serialized into a HTML string. This event enables you to do modifications to the DOM before the serialization occurs. It's important to know that the element that is getting serialized is cloned so it's not inside a document. + * + * @event onPreProcess + * @param {tinymce.dom.Serializer} sender object/Serializer instance that is serializing an element. + * @param {Object} args Object containing things like the current node. + * @example + * // Adds an observer to the onPreProcess event + * serializer.onPreProcess.add(function(se, o) { + * // Add a class to each paragraph + * se.dom.addClass(se.dom.select('p', o.node), 'myclass'); + * }); + */ + onPreProcess = new tinymce.util.Dispatcher(self); + + /** + * This event gets executed after a HTML fragment has been serialized into a HTML string. This event enables you to do modifications to the HTML string like regexp replaces etc. + * + * @event onPreProcess + * @param {tinymce.dom.Serializer} sender object/Serializer instance that is serializing an element. + * @param {Object} args Object containing things like the current contents. + * @example + * // Adds an observer to the onPostProcess event + * serializer.onPostProcess.add(function(se, o) { + * // Remove all paragraphs and replace with BR + * o.content = o.content.replace(/]+>|

/g, ''); + * o.content = o.content.replace(/<\/p>/g, '
'); + * }); + */ + onPostProcess = new tinymce.util.Dispatcher(self); + + htmlParser = new tinymce.html.DomParser(settings, schema); + + // Convert move data-mce-src, data-mce-href and data-mce-style into nodes or process them if needed + htmlParser.addAttributeFilter('src,href,style', function(nodes, name) { + var i = nodes.length, node, value, internalName = 'data-mce-' + name, urlConverter = settings.url_converter, urlConverterScope = settings.url_converter_scope, undef; + + while (i--) { + node = nodes[i]; + + value = node.attributes.map[internalName]; + if (value !== undef) { + // Set external name to internal value and remove internal + node.attr(name, value.length > 0 ? value : null); + node.attr(internalName, null); + } else { + // No internal attribute found then convert the value we have in the DOM + value = node.attributes.map[name]; + + if (name === "style") + value = dom.serializeStyle(dom.parseStyle(value), node.name); + else if (urlConverter) + value = urlConverter.call(urlConverterScope, value, name, node.name); + + node.attr(name, value.length > 0 ? value : null); + } + } + }); + + // Remove internal classes mceItem<..> + htmlParser.addAttributeFilter('class', function(nodes, name) { + var i = nodes.length, node, value; + + while (i--) { + node = nodes[i]; + value = node.attr('class').replace(/\s*mce(Item\w+|Selected)\s*/g, ''); + node.attr('class', value.length > 0 ? value : null); + } + }); + + // Remove bookmark elements + htmlParser.addAttributeFilter('data-mce-type', function(nodes, name, args) { + var i = nodes.length, node; + + while (i--) { + node = nodes[i]; + + if (node.attributes.map['data-mce-type'] === 'bookmark' && !args.cleanup) + node.remove(); + } + }); + + // Force script into CDATA sections and remove the mce- prefix also add comments around styles + htmlParser.addNodeFilter('script,style', function(nodes, name) { + var i = nodes.length, node, value; + + function trim(value) { + return value.replace(/()/g, '\n') + .replace(/^[\r\n]*|[\r\n]*$/g, '') + .replace(/^\s*(\/\/\s*|\]\]>|-->|\]\]-->)\s*$/g, ''); + }; + + while (i--) { + node = nodes[i]; + value = node.firstChild ? node.firstChild.value : ''; + + if (name === "script") { + // Remove mce- prefix from script elements + node.attr('type', (node.attr('type') || 'text/javascript').replace(/^mce\-/, '')); + + if (value.length > 0) + node.firstChild.value = '// '; + } else { + if (value.length > 0) + node.firstChild.value = ''; + } + } + }); + + // Convert comments to cdata and handle protected comments + htmlParser.addNodeFilter('#comment', function(nodes, name) { + var i = nodes.length, node; + + while (i--) { + node = nodes[i]; + + if (node.value.indexOf('[CDATA[') === 0) { + node.name = '#cdata'; + node.type = 4; + node.value = node.value.replace(/^\[CDATA\[|\]\]$/g, ''); + } else if (node.value.indexOf('mce:protected ') === 0) { + node.name = "#text"; + node.type = 3; + node.raw = true; + node.value = unescape(node.value).substr(14); + } + } + }); + + htmlParser.addNodeFilter('xml:namespace,input', function(nodes, name) { + var i = nodes.length, node; + + while (i--) { + node = nodes[i]; + if (node.type === 7) + node.remove(); + else if (node.type === 1) { + if (name === "input" && !("type" in node.attributes.map)) + node.attr('type', 'text'); + } + } + }); + + // Fix list elements, TODO: Replace this later + if (settings.fix_list_elements) { + htmlParser.addNodeFilter('ul,ol', function(nodes, name) { + var i = nodes.length, node, parentNode; + + while (i--) { + node = nodes[i]; + parentNode = node.parent; + + if (parentNode.name === 'ul' || parentNode.name === 'ol') { + if (node.prev && node.prev.name === 'li') { + node.prev.append(node); + } + } + } + }); + } + + // Remove internal data attributes + htmlParser.addAttributeFilter('data-mce-src,data-mce-href,data-mce-style', function(nodes, name) { + var i = nodes.length; + + while (i--) { + nodes[i].attr(name, null); + } + }); + + // Return public methods + return { + /** + * Schema instance that was used to when the Serializer was constructed. + * + * @field {tinymce.html.Schema} schema + */ + schema : schema, + + /** + * Adds a node filter function to the parser used by the serializer, the parser will collect the specified nodes by name + * and then execute the callback ones it has finished parsing the document. + * + * @example + * parser.addNodeFilter('p,h1', function(nodes, name) { + * for (var i = 0; i < nodes.length; i++) { + * console.log(nodes[i].name); + * } + * }); + * @method addNodeFilter + * @method {String} name Comma separated list of nodes to collect. + * @param {function} callback Callback function to execute once it has collected nodes. + */ + addNodeFilter : htmlParser.addNodeFilter, + + /** + * Adds a attribute filter function to the parser used by the serializer, the parser will collect nodes that has the specified attributes + * and then execute the callback ones it has finished parsing the document. + * + * @example + * parser.addAttributeFilter('src,href', function(nodes, name) { + * for (var i = 0; i < nodes.length; i++) { + * console.log(nodes[i].name); + * } + * }); + * @method addAttributeFilter + * @method {String} name Comma separated list of nodes to collect. + * @param {function} callback Callback function to execute once it has collected nodes. + */ + addAttributeFilter : htmlParser.addAttributeFilter, + + /** + * Fires when the Serializer does a preProcess on the contents. + * + * @event onPreProcess + * @param {tinymce.Editor} sender Editor instance. + * @param {Object} obj PreProcess object. + * @option {Node} node DOM node for the item being serialized. + * @option {String} format The specified output format normally "html". + * @option {Boolean} get Is true if the process is on a getContent operation. + * @option {Boolean} set Is true if the process is on a setContent operation. + * @option {Boolean} cleanup Is true if the process is on a cleanup operation. + */ + onPreProcess : onPreProcess, + + /** + * Fires when the Serializer does a postProcess on the contents. + * + * @event onPostProcess + * @param {tinymce.Editor} sender Editor instance. + * @param {Object} obj PreProcess object. + */ + onPostProcess : onPostProcess, + + /** + * Serializes the specified browser DOM node into a HTML string. + * + * @method serialize + * @param {DOMNode} node DOM node to serialize. + * @param {Object} args Arguments option that gets passed to event handlers. + */ + serialize : function(node, args) { + var impl, doc, oldDoc, htmlSerializer, content; + + // Explorer won't clone contents of script and style and the + // selected index of select elements are cleared on a clone operation. + if (isIE && dom.select('script,style,select').length > 0) { + content = node.innerHTML; + node = node.cloneNode(false); + dom.setHTML(node, content); + } else + node = node.cloneNode(true); + + // Nodes needs to be attached to something in WebKit/Opera + // Older builds of Opera crashes if you attach the node to an document created dynamically + // and since we can't feature detect a crash we need to sniff the acutal build number + // This fix will make DOM ranges and make Sizzle happy! + impl = node.ownerDocument.implementation; + if (impl.createHTMLDocument) { + // Create an empty HTML document + doc = impl.createHTMLDocument(""); + + // Add the element or it's children if it's a body element to the new document + each(node.nodeName == 'BODY' ? node.childNodes : [node], function(node) { + doc.body.appendChild(doc.importNode(node, true)); + }); + + // Grab first child or body element for serialization + if (node.nodeName != 'BODY') + node = doc.body.firstChild; + else + node = doc.body; + + // set the new document in DOMUtils so createElement etc works + oldDoc = dom.doc; + dom.doc = doc; + } + + args = args || {}; + args.format = args.format || 'html'; + + // Pre process + if (!args.no_events) { + args.node = node; + onPreProcess.dispatch(self, args); + } + + // Setup serializer + htmlSerializer = new tinymce.html.Serializer(settings, schema); + + // Parse and serialize HTML + args.content = htmlSerializer.serialize( + htmlParser.parse(args.getInner ? node.innerHTML : tinymce.trim(dom.getOuterHTML(node), args), args) + ); + + // Replace all BOM characters for now until we can find a better solution + if (!args.cleanup) + args.content = args.content.replace(/\uFEFF/g, ''); + + // Post process + if (!args.no_events) + onPostProcess.dispatch(self, args); + + // Restore the old document if it was changed + if (oldDoc) + dom.doc = oldDoc; + + args.node = null; + + return args.content; + }, + + /** + * Adds valid elements rules to the serializers schema instance this enables you to specify things + * like what elements should be outputted and what attributes specific elements might have. + * Consult the Wiki for more details on this format. + * + * @method addRules + * @param {String} rules Valid elements rules string to add to schema. + */ + addRules : function(rules) { + schema.addValidElements(rules); + }, + + /** + * Sets the valid elements rules to the serializers schema instance this enables you to specify things + * like what elements should be outputted and what attributes specific elements might have. + * Consult the Wiki for more details on this format. + * + * @method setRules + * @param {String} rules Valid elements rules string. + */ + setRules : function(rules) { + schema.setValidElements(rules); + } + }; + }; +})(tinymce); \ No newline at end of file diff --git a/include/javascript/tiny_mce/classes/dom/Sizzle.js b/include/javascript/tiny_mce/classes/dom/Sizzle.js new file mode 100644 index 00000000..5312fa70 --- /dev/null +++ b/include/javascript/tiny_mce/classes/dom/Sizzle.js @@ -0,0 +1,1072 @@ +// #ifndef jquery + +/* + * Sizzle CSS Selector Engine - v1.0 + * Copyright 2009, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){ + +var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, + done = 0, + toString = Object.prototype.toString, + hasDuplicate = false, + baseHasDuplicate = true; + +// Here we check if the JavaScript engine is using some sort of +// optimization where it does not always call our comparision +// function. If that is the case, discard the hasDuplicate value. +// Thus far that includes Google Chrome. +[0, 0].sort(function(){ + baseHasDuplicate = false; + return 0; +}); + +var Sizzle = function(selector, context, results, seed) { + results = results || []; + context = context || document; + + var origContext = context; + + if ( context.nodeType !== 1 && context.nodeType !== 9 ) { + return []; + } + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + var parts = [], m, set, checkSet, extra, prune = true, contextXML = Sizzle.isXML(context), + soFar = selector, ret, cur, pop, i; + + // Reset the position of the chunker regexp (start from head) + do { + chunker.exec(""); + m = chunker.exec(soFar); + + if ( m ) { + soFar = m[3]; + + parts.push( m[1] ); + + if ( m[2] ) { + extra = m[3]; + break; + } + } + } while ( m ); + + if ( parts.length > 1 && origPOS.exec( selector ) ) { + if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { + set = posProcess( parts[0] + parts[1], context ); + } else { + set = Expr.relative[ parts[0] ] ? + [ context ] : + Sizzle( parts.shift(), context ); + + while ( parts.length ) { + selector = parts.shift(); + + if ( Expr.relative[ selector ] ) { + selector += parts.shift(); + } + + set = posProcess( selector, set ); + } + } + } else { + // Take a shortcut and set the context if the root selector is an ID + // (but not if it'll be faster if the inner selector is an ID) + if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && + Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { + ret = Sizzle.find( parts.shift(), context, contextXML ); + context = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0]; + } + + if ( context ) { + ret = seed ? + { expr: parts.pop(), set: makeArray(seed) } : + Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); + set = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set; + + if ( parts.length > 0 ) { + checkSet = makeArray(set); + } else { + prune = false; + } + + while ( parts.length ) { + cur = parts.pop(); + pop = cur; + + if ( !Expr.relative[ cur ] ) { + cur = ""; + } else { + pop = parts.pop(); + } + + if ( pop == null ) { + pop = context; + } + + Expr.relative[ cur ]( checkSet, pop, contextXML ); + } + } else { + checkSet = parts = []; + } + } + + if ( !checkSet ) { + checkSet = set; + } + + if ( !checkSet ) { + Sizzle.error( cur || selector ); + } + + if ( toString.call(checkSet) === "[object Array]" ) { + if ( !prune ) { + results.push.apply( results, checkSet ); + } else if ( context && context.nodeType === 1 ) { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { + results.push( set[i] ); + } + } + } else { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && checkSet[i].nodeType === 1 ) { + results.push( set[i] ); + } + } + } + } else { + makeArray( checkSet, results ); + } + + if ( extra ) { + Sizzle( extra, origContext, results, seed ); + Sizzle.uniqueSort( results ); + } + + return results; +}; + +Sizzle.uniqueSort = function(results){ + if ( sortOrder ) { + hasDuplicate = baseHasDuplicate; + results.sort(sortOrder); + + if ( hasDuplicate ) { + for ( var i = 1; i < results.length; i++ ) { + if ( results[i] === results[i-1] ) { + results.splice(i--, 1); + } + } + } + } + + return results; +}; + +Sizzle.matches = function(expr, set){ + return Sizzle(expr, null, null, set); +}; + +Sizzle.find = function(expr, context, isXML){ + var set; + + if ( !expr ) { + return []; + } + + for ( var i = 0, l = Expr.order.length; i < l; i++ ) { + var type = Expr.order[i], match; + + if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { + var left = match[1]; + match.splice(1,1); + + if ( left.substr( left.length - 1 ) !== "\\" ) { + match[1] = (match[1] || "").replace(/\\/g, ""); + set = Expr.find[ type ]( match, context, isXML ); + if ( set != null ) { + expr = expr.replace( Expr.match[ type ], "" ); + break; + } + } + } + } + + if ( !set ) { + set = context.getElementsByTagName("*"); + } + + return {set: set, expr: expr}; +}; + +Sizzle.filter = function(expr, set, inplace, not){ + var old = expr, result = [], curLoop = set, match, anyFound, + isXMLFilter = set && set[0] && Sizzle.isXML(set[0]); + + while ( expr && set.length ) { + for ( var type in Expr.filter ) { + if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { + var filter = Expr.filter[ type ], found, item, left = match[1]; + anyFound = false; + + match.splice(1,1); + + if ( left.substr( left.length - 1 ) === "\\" ) { + continue; + } + + if ( curLoop === result ) { + result = []; + } + + if ( Expr.preFilter[ type ] ) { + match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); + + if ( !match ) { + anyFound = found = true; + } else if ( match === true ) { + continue; + } + } + + if ( match ) { + for ( var i = 0; (item = curLoop[i]) != null; i++ ) { + if ( item ) { + found = filter( item, match, i, curLoop ); + var pass = not ^ !!found; + + if ( inplace && found != null ) { + if ( pass ) { + anyFound = true; + } else { + curLoop[i] = false; + } + } else if ( pass ) { + result.push( item ); + anyFound = true; + } + } + } + } + + if ( found !== undefined ) { + if ( !inplace ) { + curLoop = result; + } + + expr = expr.replace( Expr.match[ type ], "" ); + + if ( !anyFound ) { + return []; + } + + break; + } + } + } + + // Improper expression + if ( expr === old ) { + if ( anyFound == null ) { + Sizzle.error( expr ); + } else { + break; + } + } + + old = expr; + } + + return curLoop; +}; + +Sizzle.error = function( msg ) { + throw "Syntax error, unrecognized expression: " + msg; +}; + +var Expr = Sizzle.selectors = { + order: [ "ID", "NAME", "TAG" ], + match: { + ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, + ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/, + TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, + CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/, + POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, + PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ + }, + leftMatch: {}, + attrMap: { + "class": "className", + "for": "htmlFor" + }, + attrHandle: { + href: function(elem){ + return elem.getAttribute("href"); + } + }, + relative: { + "+": function(checkSet, part){ + var isPartStr = typeof part === "string", + isTag = isPartStr && !/\W/.test(part), + isPartStrNotTag = isPartStr && !isTag; + + if ( isTag ) { + part = part.toLowerCase(); + } + + for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { + if ( (elem = checkSet[i]) ) { + while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} + + checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? + elem || false : + elem === part; + } + } + + if ( isPartStrNotTag ) { + Sizzle.filter( part, checkSet, true ); + } + }, + ">": function(checkSet, part){ + var isPartStr = typeof part === "string", + elem, i = 0, l = checkSet.length; + + if ( isPartStr && !/\W/.test(part) ) { + part = part.toLowerCase(); + + for ( ; i < l; i++ ) { + elem = checkSet[i]; + if ( elem ) { + var parent = elem.parentNode; + checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; + } + } + } else { + for ( ; i < l; i++ ) { + elem = checkSet[i]; + if ( elem ) { + checkSet[i] = isPartStr ? + elem.parentNode : + elem.parentNode === part; + } + } + + if ( isPartStr ) { + Sizzle.filter( part, checkSet, true ); + } + } + }, + "": function(checkSet, part, isXML){ + var doneName = done++, checkFn = dirCheck, nodeCheck; + + if ( typeof part === "string" && !/\W/.test(part) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML); + }, + "~": function(checkSet, part, isXML){ + var doneName = done++, checkFn = dirCheck, nodeCheck; + + if ( typeof part === "string" && !/\W/.test(part) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML); + } + }, + find: { + ID: function(match, context, isXML){ + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + return m ? [m] : []; + } + }, + NAME: function(match, context){ + if ( typeof context.getElementsByName !== "undefined" ) { + var ret = [], results = context.getElementsByName(match[1]); + + for ( var i = 0, l = results.length; i < l; i++ ) { + if ( results[i].getAttribute("name") === match[1] ) { + ret.push( results[i] ); + } + } + + return ret.length === 0 ? null : ret; + } + }, + TAG: function(match, context){ + return context.getElementsByTagName(match[1]); + } + }, + preFilter: { + CLASS: function(match, curLoop, inplace, result, not, isXML){ + match = " " + match[1].replace(/\\/g, "") + " "; + + if ( isXML ) { + return match; + } + + for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { + if ( elem ) { + if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n]/g, " ").indexOf(match) >= 0) ) { + if ( !inplace ) { + result.push( elem ); + } + } else if ( inplace ) { + curLoop[i] = false; + } + } + } + + return false; + }, + ID: function(match){ + return match[1].replace(/\\/g, ""); + }, + TAG: function(match, curLoop){ + return match[1].toLowerCase(); + }, + CHILD: function(match){ + if ( match[1] === "nth" ) { + // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' + var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec( + match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || + !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); + + // calculate the numbers (first)n+(last) including if they are negative + match[2] = (test[1] + (test[2] || 1)) - 0; + match[3] = test[3] - 0; + } + + // TODO: Move to normal caching system + match[0] = done++; + + return match; + }, + ATTR: function(match, curLoop, inplace, result, not, isXML){ + var name = match[1].replace(/\\/g, ""); + + if ( !isXML && Expr.attrMap[name] ) { + match[1] = Expr.attrMap[name]; + } + + if ( match[2] === "~=" ) { + match[4] = " " + match[4] + " "; + } + + return match; + }, + PSEUDO: function(match, curLoop, inplace, result, not){ + if ( match[1] === "not" ) { + // If we're dealing with a complex expression, or a simple one + if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { + match[3] = Sizzle(match[3], null, null, curLoop); + } else { + var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); + if ( !inplace ) { + result.push.apply( result, ret ); + } + return false; + } + } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { + return true; + } + + return match; + }, + POS: function(match){ + match.unshift( true ); + return match; + } + }, + filters: { + enabled: function(elem){ + return elem.disabled === false && elem.type !== "hidden"; + }, + disabled: function(elem){ + return elem.disabled === true; + }, + checked: function(elem){ + return elem.checked === true; + }, + selected: function(elem){ + // Accessing this property makes selected-by-default + // options in Safari work properly + elem.parentNode.selectedIndex; + return elem.selected === true; + }, + parent: function(elem){ + return !!elem.firstChild; + }, + empty: function(elem){ + return !elem.firstChild; + }, + has: function(elem, i, match){ + return !!Sizzle( match[3], elem ).length; + }, + header: function(elem){ + return (/h\d/i).test( elem.nodeName ); + }, + text: function(elem){ + return "text" === elem.type; + }, + radio: function(elem){ + return "radio" === elem.type; + }, + checkbox: function(elem){ + return "checkbox" === elem.type; + }, + file: function(elem){ + return "file" === elem.type; + }, + password: function(elem){ + return "password" === elem.type; + }, + submit: function(elem){ + return "submit" === elem.type; + }, + image: function(elem){ + return "image" === elem.type; + }, + reset: function(elem){ + return "reset" === elem.type; + }, + button: function(elem){ + return "button" === elem.type || elem.nodeName.toLowerCase() === "button"; + }, + input: function(elem){ + return (/input|select|textarea|button/i).test(elem.nodeName); + } + }, + setFilters: { + first: function(elem, i){ + return i === 0; + }, + last: function(elem, i, match, array){ + return i === array.length - 1; + }, + even: function(elem, i){ + return i % 2 === 0; + }, + odd: function(elem, i){ + return i % 2 === 1; + }, + lt: function(elem, i, match){ + return i < match[3] - 0; + }, + gt: function(elem, i, match){ + return i > match[3] - 0; + }, + nth: function(elem, i, match){ + return match[3] - 0 === i; + }, + eq: function(elem, i, match){ + return match[3] - 0 === i; + } + }, + filter: { + PSEUDO: function(elem, match, i, array){ + var name = match[1], filter = Expr.filters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } else if ( name === "contains" ) { + return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0; + } else if ( name === "not" ) { + var not = match[3]; + + for ( var j = 0, l = not.length; j < l; j++ ) { + if ( not[j] === elem ) { + return false; + } + } + + return true; + } else { + Sizzle.error( "Syntax error, unrecognized expression: " + name ); + } + }, + CHILD: function(elem, match){ + var type = match[1], node = elem; + switch (type) { + case 'only': + case 'first': + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + if ( type === "first" ) { + return true; + } + node = elem; + case 'last': + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + return true; + case 'nth': + var first = match[2], last = match[3]; + + if ( first === 1 && last === 0 ) { + return true; + } + + var doneName = match[0], + parent = elem.parentNode; + + if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { + var count = 0; + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + node.nodeIndex = ++count; + } + } + parent.sizcache = doneName; + } + + var diff = elem.nodeIndex - last; + if ( first === 0 ) { + return diff === 0; + } else { + return ( diff % first === 0 && diff / first >= 0 ); + } + } + }, + ID: function(elem, match){ + return elem.nodeType === 1 && elem.getAttribute("id") === match; + }, + TAG: function(elem, match){ + return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match; + }, + CLASS: function(elem, match){ + return (" " + (elem.className || elem.getAttribute("class")) + " ") + .indexOf( match ) > -1; + }, + ATTR: function(elem, match){ + var name = match[1], + result = Expr.attrHandle[ name ] ? + Expr.attrHandle[ name ]( elem ) : + elem[ name ] != null ? + elem[ name ] : + elem.getAttribute( name ), + value = result + "", + type = match[2], + check = match[4]; + + return result == null ? + type === "!=" : + type === "=" ? + value === check : + type === "*=" ? + value.indexOf(check) >= 0 : + type === "~=" ? + (" " + value + " ").indexOf(check) >= 0 : + !check ? + value && result !== false : + type === "!=" ? + value !== check : + type === "^=" ? + value.indexOf(check) === 0 : + type === "$=" ? + value.substr(value.length - check.length) === check : + type === "|=" ? + value === check || value.substr(0, check.length + 1) === check + "-" : + false; + }, + POS: function(elem, match, i, array){ + var name = match[2], filter = Expr.setFilters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } + } + } +}; + +var origPOS = Expr.match.POS, + fescape = function(all, num){ + return "\\" + (num - 0 + 1); + }; + +for ( var type in Expr.match ) { + Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); + Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); +} + +var makeArray = function(array, results) { + array = Array.prototype.slice.call( array, 0 ); + + if ( results ) { + results.push.apply( results, array ); + return results; + } + + return array; +}; + +// Perform a simple check to determine if the browser is capable of +// converting a NodeList to an array using builtin methods. +// Also verifies that the returned array holds DOM nodes +// (which is not the case in the Blackberry browser) +try { + Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; + +// Provide a fallback method if it does not work +} catch(e){ + makeArray = function(array, results) { + var ret = results || [], i = 0; + + if ( toString.call(array) === "[object Array]" ) { + Array.prototype.push.apply( ret, array ); + } else { + if ( typeof array.length === "number" ) { + for ( var l = array.length; i < l; i++ ) { + ret.push( array[i] ); + } + } else { + for ( ; array[i]; i++ ) { + ret.push( array[i] ); + } + } + } + + return ret; + }; +} + +var sortOrder; + +if ( document.documentElement.compareDocumentPosition ) { + sortOrder = function( a, b ) { + if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { + if ( a == b ) { + hasDuplicate = true; + } + return a.compareDocumentPosition ? -1 : 1; + } + + var ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1; + if ( ret === 0 ) { + hasDuplicate = true; + } + return ret; + }; +} else if ( "sourceIndex" in document.documentElement ) { + sortOrder = function( a, b ) { + if ( !a.sourceIndex || !b.sourceIndex ) { + if ( a == b ) { + hasDuplicate = true; + } + return a.sourceIndex ? -1 : 1; + } + + var ret = a.sourceIndex - b.sourceIndex; + if ( ret === 0 ) { + hasDuplicate = true; + } + return ret; + }; +} else if ( document.createRange ) { + sortOrder = function( a, b ) { + if ( !a.ownerDocument || !b.ownerDocument ) { + if ( a == b ) { + hasDuplicate = true; + } + return a.ownerDocument ? -1 : 1; + } + + var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange(); + aRange.setStart(a, 0); + aRange.setEnd(a, 0); + bRange.setStart(b, 0); + bRange.setEnd(b, 0); + var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange); + if ( ret === 0 ) { + hasDuplicate = true; + } + return ret; + }; +} + +// Utility function for retreiving the text value of an array of DOM nodes +Sizzle.getText = function( elems ) { + var ret = "", elem; + + for ( var i = 0; elems[i]; i++ ) { + elem = elems[i]; + + // Get the text from text nodes and CDATA nodes + if ( elem.nodeType === 3 || elem.nodeType === 4 ) { + ret += elem.nodeValue; + + // Traverse everything else, except comment nodes + } else if ( elem.nodeType !== 8 ) { + ret += Sizzle.getText( elem.childNodes ); + } + } + + return ret; +}; + +// Check to see if the browser returns elements by name when +// querying by getElementById (and provide a workaround) +(function(){ + // We're going to inject a fake input element with a specified name + var form = document.createElement("div"), + id = "script" + (new Date()).getTime(); + form.innerHTML = ""; + + // Inject it into the root element, check its status, and remove it quickly + var root = document.documentElement; + root.insertBefore( form, root.firstChild ); + + // The workaround has to do additional checks after a getElementById + // Which slows things down for other browsers (hence the branching) + if ( document.getElementById( id ) ) { + Expr.find.ID = function(match, context, isXML){ + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : []; + } + }; + + Expr.filter.ID = function(elem, match){ + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + return elem.nodeType === 1 && node && node.nodeValue === match; + }; + } + + root.removeChild( form ); + root = form = null; // release memory in IE +})(); + +(function(){ + // Check to see if the browser returns only elements + // when doing getElementsByTagName("*") + + // Create a fake element + var div = document.createElement("div"); + div.appendChild( document.createComment("") ); + + // Make sure no comments are found + if ( div.getElementsByTagName("*").length > 0 ) { + Expr.find.TAG = function(match, context){ + var results = context.getElementsByTagName(match[1]); + + // Filter out possible comments + if ( match[1] === "*" ) { + var tmp = []; + + for ( var i = 0; results[i]; i++ ) { + if ( results[i].nodeType === 1 ) { + tmp.push( results[i] ); + } + } + + results = tmp; + } + + return results; + }; + } + + // Check to see if an attribute returns normalized href attributes + div.innerHTML = ""; + if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && + div.firstChild.getAttribute("href") !== "#" ) { + Expr.attrHandle.href = function(elem){ + return elem.getAttribute("href", 2); + }; + } + + div = null; // release memory in IE +})(); + +if ( document.querySelectorAll ) { + (function(){ + var oldSizzle = Sizzle, div = document.createElement("div"); + div.innerHTML = "

"; + + // Safari can't handle uppercase or unicode characters when + // in quirks mode. + if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { + return; + } + + Sizzle = function(query, context, extra, seed){ + context = context || document; + + // Only use querySelectorAll on non-XML documents + // (ID selectors don't work in non-HTML documents) + if ( !seed && context.nodeType === 9 && !Sizzle.isXML(context) ) { + try { + return makeArray( context.querySelectorAll(query), extra ); + } catch(e){} + } + + return oldSizzle(query, context, extra, seed); + }; + + for ( var prop in oldSizzle ) { + Sizzle[ prop ] = oldSizzle[ prop ]; + } + + div = null; // release memory in IE + })(); +} + +(function(){ + var div = document.createElement("div"); + + div.innerHTML = "
"; + + // Opera can't find a second classname (in 9.6) + // Also, make sure that getElementsByClassName actually exists + if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { + return; + } + + // Safari caches class attributes, doesn't catch changes (in 3.2) + div.lastChild.className = "e"; + + if ( div.getElementsByClassName("e").length === 1 ) { + return; + } + + Expr.order.splice(1, 0, "CLASS"); + Expr.find.CLASS = function(match, context, isXML) { + if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { + return context.getElementsByClassName(match[1]); + } + }; + + div = null; // release memory in IE +})(); + +function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + if ( elem ) { + elem = elem[dir]; + var match = false; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 && !isXML ){ + elem.sizcache = doneName; + elem.sizset = i; + } + + if ( elem.nodeName.toLowerCase() === cur ) { + match = elem; + break; + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + if ( elem ) { + elem = elem[dir]; + var match = false; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 ) { + if ( !isXML ) { + elem.sizcache = doneName; + elem.sizset = i; + } + if ( typeof cur !== "string" ) { + if ( elem === cur ) { + match = true; + break; + } + + } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { + match = elem; + break; + } + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +Sizzle.contains = document.compareDocumentPosition ? function(a, b){ + return !!(a.compareDocumentPosition(b) & 16); +} : function(a, b){ + return a !== b && (a.contains ? a.contains(b) : true); +}; + +Sizzle.isXML = function(elem){ + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +var posProcess = function(selector, context){ + var tmpSet = [], later = "", match, + root = context.nodeType ? [context] : context; + + // Position selectors must be done after the filter + // And so must :not(positional) so we move all PSEUDOs to the end + while ( (match = Expr.match.PSEUDO.exec( selector )) ) { + later += match[0]; + selector = selector.replace( Expr.match.PSEUDO, "" ); + } + + selector = Expr.relative[selector] ? selector + "*" : selector; + + for ( var i = 0, l = root.length; i < l; i++ ) { + Sizzle( selector, root[i], tmpSet ); + } + + return Sizzle.filter( later, tmpSet ); +}; + +// EXPOSE + +window.tinymce.dom.Sizzle = Sizzle; + +})(); + +// #endif diff --git a/include/javascript/tiny_mce/classes/dom/TreeWalker.js b/include/javascript/tiny_mce/classes/dom/TreeWalker.js new file mode 100644 index 00000000..ca92df4a --- /dev/null +++ b/include/javascript/tiny_mce/classes/dom/TreeWalker.js @@ -0,0 +1,64 @@ +/** + * TreeWalker.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +tinymce.dom.TreeWalker = function(start_node, root_node) { + var node = start_node; + + function findSibling(node, start_name, sibling_name, shallow) { + var sibling, parent; + + if (node) { + // Walk into nodes if it has a start + if (!shallow && node[start_name]) + return node[start_name]; + + // Return the sibling if it has one + if (node != root_node) { + sibling = node[sibling_name]; + if (sibling) + return sibling; + + // Walk up the parents to look for siblings + for (parent = node.parentNode; parent && parent != root_node; parent = parent.parentNode) { + sibling = parent[sibling_name]; + if (sibling) + return sibling; + } + } + } + }; + + /** + * Returns the current node. + * + * @return {Node} Current node where the walker is. + */ + this.current = function() { + return node; + }; + + /** + * Walks to the next node in tree. + * + * @return {Node} Current node where the walker is after moving to the next node. + */ + this.next = function(shallow) { + return (node = findSibling(node, 'firstChild', 'nextSibling', shallow)); + }; + + /** + * Walks to the previous node in tree. + * + * @return {Node} Current node where the walker is after moving to the previous node. + */ + this.prev = function(shallow) { + return (node = findSibling(node, 'lastChild', 'previousSibling', shallow)); + }; +}; diff --git a/include/javascript/tiny_mce/classes/dom/TridentSelection.js b/include/javascript/tiny_mce/classes/dom/TridentSelection.js new file mode 100644 index 00000000..9d5eb4fc --- /dev/null +++ b/include/javascript/tiny_mce/classes/dom/TridentSelection.js @@ -0,0 +1,240 @@ +/** + * TridentSelection.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + function Selection(selection) { + var t = this, invisibleChar = '\uFEFF', range, lastIERng, dom = selection.dom, TRUE = true, FALSE = false; + + // Returns a W3C DOM compatible range object by using the IE Range API + function getRange() { + var ieRange = selection.getRng(), domRange = dom.createRng(), element, collapsed; + + // If selection is outside the current document just return an empty range + element = ieRange.item ? ieRange.item(0) : ieRange.parentElement(); + if (element.ownerDocument != dom.doc) + return domRange; + + collapsed = selection.isCollapsed(); + + // Handle control selection or text selection of a image + if (ieRange.item || !element.hasChildNodes()) { + if (collapsed) { + domRange.setStart(element, 0); + domRange.setEnd(element, 0); + } else { + domRange.setStart(element.parentNode, dom.nodeIndex(element)); + domRange.setEnd(domRange.startContainer, domRange.startOffset + 1); + } + + return domRange; + } + + function findEndPoint(start) { + var marker, container, offset, nodes, startIndex = 0, endIndex, index, parent, checkRng, position; + + // Setup temp range and collapse it + checkRng = ieRange.duplicate(); + checkRng.collapse(start); + + // Create marker and insert it at the end of the endpoints parent + marker = dom.create('a'); + parent = checkRng.parentElement(); + + // If parent doesn't have any children then set the container to that parent and the index to 0 + if (!parent.hasChildNodes()) { + domRange[start ? 'setStart' : 'setEnd'](parent, 0); + return; + } + + parent.appendChild(marker); + checkRng.moveToElementText(marker); + position = ieRange.compareEndPoints(start ? 'StartToStart' : 'EndToEnd', checkRng); + if (position > 0) { + // The position is after the end of the parent element. + // This is the case where IE puts the caret to the left edge of a table. + domRange[start ? 'setStartAfter' : 'setEndAfter'](parent); + dom.remove(marker); + return; + } + + // Setup node list and endIndex + nodes = tinymce.grep(parent.childNodes); + endIndex = nodes.length - 1; + // Perform a binary search for the position + while (startIndex <= endIndex) { + index = Math.floor((startIndex + endIndex) / 2); + + // Insert marker and check it's position relative to the selection + parent.insertBefore(marker, nodes[index]); + checkRng.moveToElementText(marker); + position = ieRange.compareEndPoints(start ? 'StartToStart' : 'EndToEnd', checkRng); + if (position > 0) { + // Marker is to the right + startIndex = index + 1; + } else if (position < 0) { + // Marker is to the left + endIndex = index - 1; + } else { + // Maker is where we are + found = true; + break; + } + } + + // Setup container + container = position > 0 || index == 0 ? marker.nextSibling : marker.previousSibling; + + // Handle element selection + if (container.nodeType == 1) { + dom.remove(marker); + + // Find offset and container + offset = dom.nodeIndex(container); + container = container.parentNode; + + // Move the offset if we are setting the end or the position is after an element + if (!start || index > 0) + offset++; + } else { + // Calculate offset within text node + if (position > 0 || index == 0) { + checkRng.setEndPoint(start ? 'StartToStart' : 'EndToEnd', ieRange); + offset = checkRng.text.length; + } else { + checkRng.setEndPoint(start ? 'StartToStart' : 'EndToEnd', ieRange); + offset = container.nodeValue.length - checkRng.text.length; + } + + dom.remove(marker); + } + + domRange[start ? 'setStart' : 'setEnd'](container, offset); + }; + + // Find start point + findEndPoint(true); + + // Find end point if needed + if (!collapsed) + findEndPoint(); + + return domRange; + }; + + this.addRange = function(rng) { + var ieRng, ctrlRng, startContainer, startOffset, endContainer, endOffset, doc = selection.dom.doc, body = doc.body; + + function setEndPoint(start) { + var container, offset, marker, tmpRng, nodes; + + marker = dom.create('a'); + container = start ? startContainer : endContainer; + offset = start ? startOffset : endOffset; + tmpRng = ieRng.duplicate(); + + if (container == doc || container == doc.documentElement) { + container = body; + offset = 0; + } + + if (container.nodeType == 3) { + container.parentNode.insertBefore(marker, container); + tmpRng.moveToElementText(marker); + tmpRng.moveStart('character', offset); + dom.remove(marker); + ieRng.setEndPoint(start ? 'StartToStart' : 'EndToEnd', tmpRng); + } else { + nodes = container.childNodes; + + if (nodes.length) { + if (offset >= nodes.length) { + dom.insertAfter(marker, nodes[nodes.length - 1]); + } else { + container.insertBefore(marker, nodes[offset]); + } + + tmpRng.moveToElementText(marker); + } else { + // Empty node selection for example
|
+ marker = doc.createTextNode(invisibleChar); + container.appendChild(marker); + tmpRng.moveToElementText(marker.parentNode); + tmpRng.collapse(TRUE); + } + + ieRng.setEndPoint(start ? 'StartToStart' : 'EndToEnd', tmpRng); + dom.remove(marker); + } + } + + // Destroy cached range + this.destroy(); + + // Setup some shorter versions + startContainer = rng.startContainer; + startOffset = rng.startOffset; + endContainer = rng.endContainer; + endOffset = rng.endOffset; + ieRng = body.createTextRange(); + + // If single element selection then try making a control selection out of it + if (startContainer == endContainer && startContainer.nodeType == 1 && startOffset == endOffset - 1) { + if (startOffset == endOffset - 1) { + try { + ctrlRng = body.createControlRange(); + ctrlRng.addElement(startContainer.childNodes[startOffset]); + ctrlRng.select(); + return; + } catch (ex) { + // Ignore + } + } + } + + // Set start/end point of selection + setEndPoint(true); + setEndPoint(); + + // Select the new range and scroll it into view + ieRng.select(); + }; + + this.getRangeAt = function() { + // Setup new range if the cache is empty + if (!range || !tinymce.dom.RangeUtils.compareRanges(lastIERng, selection.getRng())) { + range = getRange(); + + // Store away text range for next call + lastIERng = selection.getRng(); + } + + // IE will say that the range is equal then produce an invalid argument exception + // if you perform specific operations in a keyup event. For example Ctrl+Del. + // This hack will invalidate the range cache if the exception occurs + try { + range.startContainer.nextSibling; + } catch (ex) { + range = getRange(); + lastIERng = null; + } + + // Return cached range + return range; + }; + + this.destroy = function() { + // Destroy cached range and last IE range to avoid memory leaks + lastIERng = range = null; + }; + }; + + // Expose the selection object + tinymce.dom.TridentSelection = Selection; +})(); diff --git a/include/javascript/tiny_mce/classes/firebug/FIREBUG.LICENSE b/include/javascript/tiny_mce/classes/firebug/FIREBUG.LICENSE new file mode 100644 index 00000000..8b9c44ab --- /dev/null +++ b/include/javascript/tiny_mce/classes/firebug/FIREBUG.LICENSE @@ -0,0 +1,30 @@ +Software License Agreement (BSD License) + +Copyright (c) 2007, Parakey Inc. +All rights reserved. + +Redistribution and use of this software in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above + copyright notice, this list of conditions and the + following disclaimer. + +* Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other + materials provided with the distribution. + +* Neither the name of Parakey Inc. nor the names of its + contributors may be used to endorse or promote products + derived from this software without specific prior + written permission of Parakey Inc. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/include/javascript/tiny_mce/classes/firebug/firebug-lite.js b/include/javascript/tiny_mce/classes/firebug/firebug-lite.js new file mode 100644 index 00000000..17e8de53 --- /dev/null +++ b/include/javascript/tiny_mce/classes/firebug/firebug-lite.js @@ -0,0 +1,2518 @@ +var firebug = { + version:[1.23,20090309], + el:{}, + env:{ + "cache":{}, + "extConsole":null, + "css":"http://getfirebug.com/releases/lite/1.2/firebug-lite.css", + "debug":true, + "detectFirebug":true, + "dIndex":"console", + "height":295, + "hideDOMFunctions":false, + "init":false, + "isPopup":false, + "liteFilename":"firebug-lite.js", + "minimized":false, + "openInPopup": false, + "override":true, + "ml":false, + "popupWin":null, + "showIconWhenHidden":true, + "targetWindow":undefined, + "popupTop":1, + "popupLeft":1, + "popupWidth":undefined, + "popupHeight":undefined + }, + initConsole:function(){ + /* + * initialize the console - user defined values are not available within this method because FBLite is not yet initialized + */ + var command; + try{ + if((!window.console || (window.console && !window.console.firebug)) || (firebug.env.override && !(/Firefox\/3/i.test(navigator.userAgent)))){ + window.console = { "provider":"Firebug Lite" }; + + for(command in firebug.d.console.cmd){ + window.console[command] = firebug.lib.util.Curry(firebug.d.console.run,window,command); + }; + } + /*window.onerror = function(_message,_file,_line){ + firebug.d.console.run('error',firebug.lib.util.String.format('{0} ({1},{2})',_message,firebug.getFileName(_file),_line)); + };*/ + } catch(e){} + }, + overrideConsole:function(){ + with (firebug){ + env.override=true; + try{ + env.extConsole=window.console; + } catch(e){} + initConsole(); + } + }, + restoreConsole:function(){ + with(firebug){ + if(env.extConsole){ + env.override=false; + try{ + window.console=env.extConsole; + } catch(e){} + env.extConsole=null; + } + } + }, + init:function(_css){ + var iconTitle = "Click here or press F12, (CTRL|CMD)+SHIFT+L or SHIFT+ENTER to show Firebug Lite. CTRL|CMD click this icon to hide it."; + + with(firebug){ + if(document.getElementsByTagName('html')[0].attributes.getNamedItem('debug')){ + env.debug = document.getElementsByTagName('html')[0].attributes.getNamedItem('debug').nodeValue !== "false"; + } + + if(env.isPopup) { + env.openInPopup = false; + env.targetWindow = window.opener; + env.popupWidth = window.opener.firebug.env.popupWidth || window.opener.firebug.lib.util.GetViewport().width; + env.popupHeight = window.opener.firebug.env.popupHeight || window.opener.firebug.lib.util.GetViewport().height; + } else { + env.targetWindow = window; + env.popupWidth = env.popupWidth || lib.util.GetViewport().width; + env.popupHeight = env.popupHeight || lib.util.GetViewport().height; + } + + settings.readCookie(); + + if(env.init || (env.detectFirebug && window.console && window.console.firebug)) { + return; + } + + document.getElementsByTagName("head")[0].appendChild( + new lib.element("link").attribute.set("rel","stylesheet").attribute.set("type","text/css").attribute.set("href",env.css).element + ); + + if(env.override){ + overrideConsole(); + } + + /* + * Firebug Icon + */ + el.firebugIcon = new lib.element("div").attribute.set("id","firebugIconDiv").attribute.set("title",iconTitle).attribute.set("alt",iconTitle).event.addListener("mousedown",win.iconClicked).insert(document.body); + + /* + * main interface + */ + el.content = {}; + el.mainiframe = new lib.element("IFRAME").attribute.set("id","FirebugIFrame").environment.addStyle({ "display":"none", "width":lib.util.GetViewport().width+"px" }).insert(document.body); + el.main = new lib.element("DIV").attribute.set("id","Firebug").environment.addStyle({ "display":"none", "width":lib.util.GetViewport().width+"px" }).insert(document.body); + if(!env.isPopup){ + el.resizer = new lib.element("DIV").attribute.addClass("Resizer").event.addListener("mousedown",win.resizer.start).insert(el.main); + } + el.header = new lib.element("DIV").attribute.addClass("Header").insert(el.main); + el.left = {}; + el.left.container = new lib.element("DIV").attribute.addClass("Left").insert(el.main); + el.right = {}; + el.right.container = new lib.element("DIV").attribute.addClass("Right").insert(el.main); + el.main.child.add(new lib.element("DIV").attribute.addClass('Clear')); + + /* + * buttons + */ + el.button = {}; + el.button.container = new lib.element("DIV").attribute.addClass("ButtonContainer").insert(el.header); + el.button.logo = new lib.element("A").attribute.set("title","Firebug Lite").attribute.set("target","_blank").attribute.set("href","http://getfirebug.com/lite.html").update(" ").attribute.addClass("Button Logo").insert(el.button.container); + el.button.inspect = new lib.element("A").attribute.addClass("Button").event.addListener("click",env.targetWindow.firebug.d.inspector.toggle).update("Inspect").insert(el.button.container); + el.button.dock = new lib.element("A").attribute.addClass("Button Dock").event.addListener("click", win.dock).insert(el.button.container); + el.button.newWindow = new lib.element("A").attribute.addClass("Button NewWindow").event.addListener("click", win.newWindow).insert(el.button.container); + + if(!env.isPopup){ + el.button.maximize = new lib.element("A").attribute.addClass("Button Maximize").event.addListener("click",win.maximize).insert(el.button.container); + el.button.minimize = new lib.element("A").attribute.addClass("Button Minimize").event.addListener("click",win.minimize).insert(el.button.container); + el.button.close = new lib.element("A").attribute.addClass("Button Close").event.addListener("click",win.hide).insert(el.button.container); + } + + if(lib.env.ie||lib.env.webkit){ + el.button.container.environment.addStyle({ "paddingTop":"12px" }); + } + + /* + * navigation + */ + el.nav = {}; + el.nav.container = new lib.element("DIV").attribute.addClass("Nav").insert(el.left.container); + el.nav.console = new lib.element("A").attribute.addClass("Tab Selected").event.addListener("click",lib.util.Curry(d.navigate,window,"console")).update("Console").insert(el.nav.container); + el.nav.html = new lib.element("A").attribute.addClass("Tab").update("HTML").event.addListener("click",lib.util.Curry(d.navigate,window,"html")).insert(el.nav.container); + el.nav.css = new lib.element("A").attribute.addClass("Tab").update("CSS").event.addListener("click",lib.util.Curry(d.navigate,window,"css")).insert(el.nav.container); + if(!env.isPopup){ + el.nav.scripts = new lib.element("A").attribute.addClass("Tab").update("Script").event.addListener("click",lib.util.Curry(d.navigate,window,"scripts")).insert(el.nav.container); + } + el.nav.dom = new lib.element("A").attribute.addClass("Tab").update("DOM").event.addListener("click",lib.util.Curry(d.navigate,env.targetWindow,"dom")).insert(el.nav.container); + el.nav.xhr = new lib.element("A").attribute.addClass("Tab").update("XHR").event.addListener("click",lib.util.Curry(d.navigate,window,"xhr")).insert(el.nav.container); + el.nav.optionsdiv = new lib.element("DIV").attribute.addClass("Settings").insert(el.nav.container); + el.nav.options = new lib.element("A").attribute.addClass("Tab").update("Options ∨").event.addListener("click", settings.toggle).insert(el.nav.optionsdiv); + + /* + * inspector + */ + el.borderInspector = new lib.element("DIV").attribute.set("id","FirebugBorderInspector").event.addListener("click",listen.inspector).insert(document.body); + el.bgInspector = new lib.element("DIV").attribute.set("id","FirebugBGInspector").insert(document.body); + + /* + * console + */ + el.left.console = {}; + el.left.console.container = new lib.element("DIV").attribute.addClass("Console").insert(el.left.container); + el.left.console.mlButton = new lib.element("A").attribute.addClass("MLButton").event.addListener("click",d.console.toggleML).insert(el.left.console.container); + el.left.console.monitor = new lib.element("DIV").insert( + new lib.element("DIV").attribute.addClass("Monitor").insert(el.left.console.container) + ); + el.left.console.container.child.add( + new lib.element("DIV").attribute.addClass("InputArrow").update(">>>") + ); + el.left.console.input = new lib.element("INPUT").attribute.set("type","text").attribute.addClass("Input").event.addListener("keydown",listen.consoleTextbox).insert( + new lib.element("DIV").attribute.addClass("InputContainer").insert(el.left.console.container) + ); + + el.right.console = {}; + el.right.console.container = new lib.element("DIV").attribute.addClass("Console Container").insert(el.right.container); + el.right.console.mlButton = new lib.element("A").attribute.addClass("MLButton CloseML").event.addListener("click",d.console.toggleML).insert(el.right.console.container); + el.right.console.input = new lib.element("TEXTAREA").attribute.addClass("Input").insert(el.right.console.container); + el.right.console.input.event.addListener("keydown",lib.util.Curry(tab,window,el.right.console.input.element)); + el.right.console.run = new lib.element("A").attribute.addClass("Button").event.addListener("click",listen.runMultiline).update("Run").insert(el.right.console.container); + el.right.console.clear = new lib.element("A").attribute.addClass("Button").event.addListener("click",lib.util.Curry(d.clean,window,el.right.console.input)).update("Clear").insert(el.right.console.container); + + el.button.console = {}; + el.button.console.container = new lib.element("DIV").attribute.addClass("ButtonSet").insert(el.button.container); + el.button.console.clear = new lib.element("A").attribute.addClass("Button").event.addListener("click",d.console.clear).update("Clear").insert(el.button.console.container); + + /* + * html + */ + + el.left.html = {}; + el.left.html.container = new lib.element("DIV").attribute.addClass("HTML").insert(el.left.container); + + el.right.html = {}; + el.right.html.container = new lib.element("DIV").attribute.addClass("HTML Container").insert(el.right.container); + + el.right.html.nav = {}; + el.right.html.nav.container = new lib.element("DIV").attribute.addClass("Nav").insert(el.right.html.container); + el.right.html.nav.computedStyle = new lib.element("A").attribute.addClass("Tab Selected").event.addListener("click",lib.util.Curry(d.html.navigate,firebug,"computedStyle")).update("Computed Style").insert(el.right.html.nav.container); + el.right.html.nav.dom = new lib.element("A").attribute.addClass("Tab").event.addListener("click",lib.util.Curry(d.html.navigate,firebug,"dom")).update("DOM").insert(el.right.html.nav.container); + + el.right.html.content = new lib.element("DIV").attribute.addClass("Content").insert(el.right.html.container); + + el.button.html = {}; + el.button.html.container = new lib.element("DIV").attribute.addClass("ButtonSet HTML").insert(el.button.container); + + /* + * css + */ + + el.left.css = {}; + el.left.css.container = new lib.element("DIV").attribute.addClass("CSS").insert(el.left.container); + + el.right.css = {}; + el.right.css.container = new lib.element("DIV").attribute.addClass("CSS Container").insert(el.right.container); + + el.right.css.nav = {}; + el.right.css.nav.container = new lib.element("DIV").attribute.addClass("Nav").insert(el.right.css.container); + el.right.css.nav.runCSS = new lib.element("A").attribute.addClass("Tab Selected").update("Run CSS").insert(el.right.css.nav.container); + + el.right.css.mlButton = new lib.element("A").attribute.addClass("MLButton CloseML").event.addListener("click",d.console.toggleML).insert(el.right.css.container); + el.right.css.input = new lib.element("TEXTAREA").attribute.addClass("Input").insert(el.right.css.container); + el.right.css.input.event.addListener("keydown",lib.util.Curry(firebug.tab,window,el.right.css.input.element)); + el.right.css.run = new lib.element("A").attribute.addClass("Button").event.addListener("click",listen.runCSS).update("Run").insert(el.right.css.container); + el.right.css.clear = new lib.element("A").attribute.addClass("Button").event.addListener("click",lib.util.Curry(d.clean,window,el.right.css.input)).update("Clear").insert(el.right.css.container); + + el.button.css = {}; + el.button.css.container = new lib.element("DIV").attribute.addClass("ButtonSet CSS").insert(el.button.container); + el.button.css.selectbox = new lib.element("SELECT").event.addListener("change",listen.cssSelectbox).insert(el.button.css.container); + + /* + * scripts + */ + + el.left.scripts = {}; + el.left.scripts.container = new lib.element("DIV").attribute.addClass("Scripts").insert(el.left.container); + + el.right.scripts = {}; + el.right.scripts.container = new lib.element("DIV").attribute.addClass("Scripts Container").insert(el.right.container); + + el.button.scripts = {}; + el.button.scripts.container = new lib.element("DIV").attribute.addClass("ButtonSet Scripts").insert(el.button.container); + el.button.scripts.selectbox = new lib.element("SELECT").event.addListener("change",listen.scriptsSelectbox).insert(el.button.scripts.container); + el.button.scripts.lineNumbers = new lib.element("A").attribute.addClass("Button").event.addListener("click",d.scripts.toggleLineNumbers).update("Show Line Numbers").insert(el.button.scripts.container); + + /* + * dom + */ + + el.left.dom = {}; + el.left.dom.container = new lib.element("DIV").attribute.addClass("DOM").insert(el.left.container); + + el.right.dom = {}; + el.right.dom.container = new lib.element("DIV").attribute.addClass("DOM Container").insert(el.right.container); + + el.button.dom = {}; + el.button.dom.container = new lib.element("DIV").attribute.addClass("ButtonSet DOM").insert(el.button.container); + el.button.dom.label = new lib.element("LABEL").update("Object Path:").insert(el.button.dom.container); + el.button.dom.textbox = new lib.element("INPUT").event.addListener("keydown",listen.domTextbox).update(env.isPopup?"window.opener":"window").insert(el.button.dom.container); + + /* + * str + */ + el.left.str = {}; + el.left.str.container = new lib.element("DIV").attribute.addClass("STR").insert(el.left.container); + + el.right.str = {}; + el.right.str.container = new lib.element("DIV").attribute.addClass("STR").insert(el.left.container); + + el.button.str = {}; + el.button.str.container = new lib.element("DIV").attribute.addClass("ButtonSet XHR").insert(el.button.container); + el.button.str.watch = new lib.element("A").attribute.addClass("Button").event.addListener("click",lib.util.Curry(d.navigate,window,"xhr")).update("Back").insert(el.button.str.container); + + /* + * xhr + */ + el.left.xhr = {}; + el.left.xhr.container = new lib.element("DIV").attribute.addClass("XHR").insert(el.left.container); + + el.right.xhr = {}; + el.right.xhr.container = new lib.element("DIV").attribute.addClass("XHR").insert(el.left.container); + + + el.button.xhr = {}; + el.button.xhr.container = new lib.element("DIV").attribute.addClass("ButtonSet XHR").insert(el.button.container); + el.button.xhr.label = new lib.element("LABEL").update("XHR Path:").insert(el.button.xhr.container); + el.button.xhr.textbox = new lib.element("INPUT").event.addListener("keydown",listen.xhrTextbox).insert(el.button.xhr.container); + el.button.xhr.watch = new lib.element("A").attribute.addClass("Button").event.addListener("click",listen.addXhrObject).update("Watch").insert(el.button.xhr.container); + + /* + * settings + */ + el.settings = {}; + el.settings.container = new lib.element("DIV").child.add( + new lib.element("DIV").attribute.addClass("Header").child.add( + new lib.element().attribute.addClass("Title").update('Firebug Lite Settings') + ) + ).attribute.addClass("SettingsDiv").insert(el.main); + el.settings.content = new lib.element("DIV").attribute.addClass("Content").insert(el.settings.container); + el.settings.progressDiv = new lib.element("DIV").attribute.addClass("ProgressDiv").insert(el.settings.content); + el.settings.progress = new lib.element("DIV").attribute.addClass("Progress").insert(el.settings.progressDiv); + el.settings.cbxDebug = new lib.element("INPUT").attribute.set("type","checkbox").attribute.addClass("SettingsCBX").insert(el.settings.content); + el.settings.content.child.add(document.createTextNode("Start visible")); + new lib.element("BR").insert(el.settings.content); + el.settings.cbxDetectFirebug = new lib.element("INPUT").attribute.set("type","checkbox").attribute.addClass("SettingsCBX").insert(el.settings.content); + el.settings.content.child.add(document.createTextNode("Hide when Firebug active")); + new lib.element("BR").insert(el.settings.content); + el.settings.cbxHideDOMFunctions = new lib.element("INPUT").attribute.set("type","checkbox").attribute.addClass("SettingsCBX").insert(el.settings.content); + el.settings.content.child.add(document.createTextNode("Hide DOM functions")); + new lib.element("BR").insert(el.settings.content); + el.settings.cbxOverride = new lib.element("INPUT").attribute.set("type","checkbox").attribute.addClass("SettingsCBX").insert(el.settings.content); + el.settings.content.child.add(document.createTextNode("Override window.console")); + new lib.element("BR").insert(el.settings.content); + el.settings.cbxShowIcon = new lib.element("INPUT").attribute.set("type","checkbox").attribute.addClass("SettingsCBX").insert(el.settings.content); + el.settings.content.child.add(document.createTextNode("Show icon when hidden")); + new lib.element("BR").insert(el.settings.content); + el.settings.cbxOpenInPopup = new lib.element("INPUT").attribute.set("type","checkbox").attribute.addClass("SettingsCBX").insert(el.settings.content); + el.settings.content.child.add(document.createTextNode("Open in popup")); + el.settings.buttonDiv = new lib.element("DIV").insert(el.settings.content); + el.settings.buttonLeftDiv = new lib.element("DIV").attribute.addClass("ButtonsLeft").insert(el.settings.buttonDiv); + el.settings.resetButton = new lib.element("INPUT").attribute.set("type","button").update("Reset").event.addListener("click",settings.reset).insert(el.settings.buttonLeftDiv); + el.settings.buttonRightDiv = new lib.element("DIV").attribute.addClass("ButtonsRight").insert(el.settings.buttonDiv); + el.settings.cancelButton = new lib.element("INPUT").attribute.set("type","button").update("Cancel").event.addListener("click",settings.hide).insert(el.settings.buttonRightDiv); + el.settings.buttonRightDiv.child.add(document.createTextNode(" ")); + el.settings.saveButton = new lib.element("INPUT").attribute.set("type","button").update("Save").event.addListener("click",settings.saveClicked).insert(el.settings.buttonRightDiv); + + lib.util.AddEvent(document,"mousemove",listen.mouse)("mousemove",win.resizer.resize)("mouseup",win.resizer.stop)("keydown",listen.keyboard); + + env.init = true; + + for(var i=0, len=d.console.cache.length; i0) { + cookieArr=targetWindow.document.cookie.split('; '); + + for(i=0;i -1) { + scriptPath = scripts[i].src; + break; + } + } + + if (scriptPath) { + script = fe.popupWin.document.createElement('script'), done = false; + script.type = 'text/javascript'; + script.src = scriptPath; + + script[firebug.lib.env.ie?"onreadystatechange":"onload"] = function(){ + if(!done && (!firebug.lib.env.ie || this.readyState == "complete" || this.readyState=="loaded")){ + done = true; + if(fe.popupWin.firebug) { + with(fe.popupWin.firebug) { + env.isPopup = true; + env.css = fe.css; + init(); + el.button.dock.environment.addStyle({ "display": "block"}); + el.button.newWindow.environment.addStyle({ "display": "none"}); + } + } + } + }; + + if (!done && firebug.lib.env.webkit) { + fe.popupWin.document.write(''); + interval = setInterval(function() { + if (fe.popupWin.firebug) { + clearInterval(interval); + done = true; + with(fe.popupWin.firebug) { + env.isPopup = true; + env.css = fe.css; + init(); + el.button.dock.environment.addStyle({ "display": "block"}); + el.button.newWindow.environment.addStyle({ "display": "none"}); + } + } + }, 10); + }; + + if (!done) { + fe.popupWin.document.getElementsByTagName('head')[0].appendChild(script); + firebug.el.main.environment.addStyle({"display": "none"}); + firebug.el.mainiframe.environment.addStyle({"display": "none"}); + } + } else { + alert("Unable to detect the following script \"" + fe.liteFilename + + "\" ... if the script has been renamed then please set the value of firebug.env.liteFilename to reflect this change"); + fe.popupWin.close(); + fe.popupWin=null; + } + } + } + }, + dock: function() { + with(opener.firebug) { + env.popupWin = null; + el.main.environment.addStyle({ + "display": "block" + }); + el.mainiframe.environment.addStyle({ + "display": "block" + }); + settings.readCookie(); + window.close(); + }; + }, + unload: function() { + with(firebug){ + if(env.isPopup) { + win.dock(); + } else if(env.popupWin) { + env.popupWin.close(); + } + } + }, + fitToPopup: function() { + with(firebug) { + var viewport = lib.util.GetViewport(window); + win.setHeight((window.innerHeight||viewport.height) - 38); + el.main.environment.addStyle({ + "width": (viewport.width) + "px" + }); + el.mainiframe.environment.addStyle({ + "width": (viewport.width) + "px" + }); + } + }, + resizer:{ + y:[], enabled:false, + start:function(_event){ + with(firebug){ + if(env.minimized)return; + win.resizer.y=[el.main.element.offsetHeight,_event.clientY]; + if(lib.env.ie6){ + win.resizer.y[3]=parseInt(el.main.environment.getPosition().top); + } + win.resizer.enabled=true; + } + }, + resize:function(_event){ + with(firebug){ + if(!win.resizer.enabled)return; + win.resizer.y[2]=(win.resizer.y[0]+(win.resizer.y[1]-_event.clientY)); + el.main.environment.addStyle({ "height":win.resizer.y[2]+"px" }); + el.mainiframe.environment.addStyle({ "height":win.resizer.y[2]+"px" }); + if(lib.env.ie6){ + el.main.environment.addStyle({ "top":win.resizer.y[3]-(win.resizer.y[1]-_event.clientY)+"px" }); + el.mainiframe.environment.addStyle({ "top":win.resizer.y[3]-(win.resizer.y[1]-_event.clientY)+"px" }); + } + } + }, + stop:function(_event){ + with(firebug){ + if(win.resizer.enabled){ + win.resizer.enabled=false; + win.setHeight(win.resizer.y[2]-35); + } + } + } + }, + setHeight:function(_height){ + with(firebug){ + env.height=_height; + + el.left.container.environment.addStyle({ "height":_height+"px" }); + el.right.container.environment.addStyle({ "height":_height+"px" }); + el.main.environment.addStyle({ "height":_height+38+"px" }); + el.mainiframe.environment.addStyle({ "height":_height+38+"px" }); + + win.refreshSize(); + + // console + el.left.console.monitor.element.parentNode.style.height=_height-47+"px"; + el.left.console.mlButton.environment.addStyle({ "top":_height+19+"px" }); + el.right.console.mlButton.environment.addStyle({ "top":_height+19+"px" }); + el.right.console.input.environment.addStyle({ "height":_height-29+"px" }); + + // html + el.left.html.container.environment.addStyle({"height":_height-23+"px"}); + el.right.html.content.environment.addStyle({"height":_height-23+"px"}); + + // css + el.left.css.container.environment.addStyle({"height":_height-33+"px"}); + el.right.css.input.environment.addStyle({ "height":_height-55+"px" }); + + // script + el.left.scripts.container.environment.addStyle({"height":_height-23+"px"}); + + // dom + el.left.dom.container.environment.addStyle({"height":_height-31+"px"}); + + // xhr + el.left.xhr.container.environment.addStyle({"height":_height-32+"px"}); + + // string + el.left.str.container.environment.addStyle({"height":_height-32+"px"}); + } + }, + refreshDOM:function(){ + with(firebug){ + d.dom.open(eval(el.button.dom.textbox.environment.getElement().value),el.left.dom.container); + if(d.html.nIndex=="dom"){ + firebug.d.html.navigate("dom") + } + } + }, + refreshSize:function(){ + with(firebug){ + if(!env.init) + return; + + var dim = lib.util.GetViewport(); + el.main.environment.addStyle({ "width":dim.width+"px"}); + el.mainiframe.environment.addStyle({ "width":dim.width+"px"}); + if(lib.env.ie6) + win.setVerticalPosition(dim); + } + }, + setVerticalPosition:function(_dim,_event){ + with(firebug){ + var dim = _dim||lib.util.GetViewport(); + el.main.environment.addStyle({ "top":dim.height-el.main.environment.getSize().offsetHeight+Math.max(document.documentElement.scrollTop,document.body.scrollTop)+"px" }); + el.mainiframe.environment.addStyle({ "top":dim.height-el.main.environment.getSize().offsetHeight+Math.max(document.documentElement.scrollTop,document.body.scrollTop)+"px" }); + } + } + }, + d: { + clean:function(_element){ + with(firebug){ + _element.update(""); + } + }, + console:{ + addLine:function(){ + with (firebug) { + return new lib.element("DIV").attribute.addClass("Row").insert(el.left.console.monitor); + } + }, + cache:[], + clear:function(){ + with(firebug){ + d.clean(el.left.console.monitor); + d.console.cache = []; + } + }, + formatArgs:function(){ + with(firebug){ + var content = []; + for(var i=0, len=arguments.length; i>> "+_cmd); + d.console.addLine().update(d.highlight(_text,false,false,true)); + d.console.scroll(); + } + }, + printException: function(_exception){ + with(firebug){ + var message = _exception.description||_exception.message||_exception; + if(_exception.fileName){ + message+=' ('+(_exception.name&&(_exception.name+', ')||'')+getFileName(_exception.fileName)+', '+_exception.lineNumber+')'; + } + d.console.addLine().attribute.addClass("Error").update("Error: "+message,true); + } + }, + eval:function(_cmd){ + var result; + with(firebug){ + if(_cmd.length==0) + return; + + el.left.console.input.environment.getElement().value = ""; + d.console.historyIndex = d.console.history.push(_cmd); + + try { + if(_cmd==='console.firebug') { + d.console.addLine().attribute.addClass("Arrow").update(firebug.version); + } else { + result = eval.call(window,_cmd); + d.console.print(_cmd,result); + } + } catch(e){ + d.console.addLine().attribute.addClass("Arrow").update(">>> "+_cmd); + d.console.printException(e); + } + d.console.scroll(); + } + }, + scroll:function(){ + with(firebug){ + el.left.console.monitor.environment.getElement().parentNode.scrollTop = Math.abs(el.left.console.monitor.environment.getSize().offsetHeight-(el.left.console.monitor.element.parentNode.offsetHeight-11)); + } + }, + run:function(_command){ + with(firebug){ + if(!env.init){ + d.console.cache.push({ "command":_command, "arg":Array.prototype.slice.call(arguments,1) }); + } else { + d.console.cmd[_command].apply(window,Array.prototype.slice.call(arguments,1)); + } + } + }, + toggleML:function(){ + with(firebug){ + var open = !env.ml; + env.ml = !env.ml; + d.navigateRightColumn("console",open); + el[open?"left":"right"].console.mlButton.environment.addStyle({ display:"none" }); + el[!open?"left":"right"].console.mlButton.environment.addStyle({ display:"block" }); + el.left.console.mlButton.attribute[(open?"add":"remove")+"Class"]("CloseML"); + } + }, + countMap:{}, timeMap: {}, + cmd:{ + log: function(_value){ + with(firebug){ + var args = d.console.formatArgs.apply(window,arguments); + d.console.addLine().attribute.addClass("Log").update(args); + d.console.scroll(); + } + }, + warn: function(_value){ + with(firebug){ + var args = d.console.formatArgs.apply(window,arguments); + d.console.addLine().attribute.addClass("Warn").update(args); + d.console.scroll(); + } + }, + info: function(_value){ + with(firebug){ + var args = d.console.formatArgs.apply(window,arguments); + d.console.addLine().attribute.addClass("Info").update(args); + d.console.scroll(); + } + }, + debug: function(_value){ + with(firebug){ + var args = d.console.formatArgs.apply(window,arguments); + d.console.addLine().attribute.addClass("Debug").update(args); + d.console.scroll(); + } + }, + error: function(_value){ + with(firebug){ + var args = d.console.formatArgs.apply(window,arguments); + d.console.addLine().attribute.addClass("Error").update(args); + d.console.scroll(); + } + }, + trace: function(_value){ + with(firebug){ + var stackAmt = 3, f = arguments.caller, isArray = lib.util.IsArray(f); //function that called trace + + if((!isArray&&f)||(isArray&&f.length>0)){ + d.console.addLine().attribute.addClass("Arrow").update(">>> console.trace(stack)"); + for(var i=0;i>> console.dir("+_value+")"); + d.dom.open(_value,d.console.addLine()); + } + }, + dirxml: function(){ + with(firebug){ + d.console.cmd.log.apply(this, arguments); + } + }, + time: function(_name){ + with(firebug){ + d.console.timeMap[_name] = new Date().getTime(); + } + }, + timeEnd: function(_name){ + with(firebug){ + if(_name in d.console.timeMap){ + var delta = new Date().getTime() - d.console.timeMap[_name], + args = d.console.formatArgs.apply(window,[_name+":", delta+"ms"]); + d.console.addLine().attribute.addClass("log").update(args); + delete d.console.timeMap[_name]; + } + } + }, + count: function(_name){ + with(firebug){ + if(!d.console.countMap[_name]) + d.console.countMap[_name] = 0; + d.console.countMap[_name]++; + d.console.cmd.log.apply(window, [_name, d.console.countMap[_name]]); + } + }, + group:function(){ + with(firebug){ + d.console.cmd.log.apply(this, ["console.group is not supported"]); + } + }, + groupEnd:function(){ + with(firebug){ + d.console.cmd.log.apply(this, ["console.groupEnd is not supported"]); + } + }, + profile:function(){ + with(firebug){ + d.console.cmd.log.apply(this, ["console.profile is not supported"]); + } + }, + profileEnd:function(){ + with(firebug){ + d.console.cmd.log.apply(this, ["console.profileEnd is not supported"]); + } + } + } + }, + css:{ + index:-1, + open:function(_index){ + with (firebug) { + var item = env.targetWindow.document.styleSheets[_index], + uri = item.href; + try { + var rules = item[lib.env.ie ? "rules" : "cssRules"], str = ""; + for (var i=0; i"; + for(var i=0,len=_css.length; i$1$2;")+"
"; + } + str+="
}
"; + return str; + } + }, + refresh:function(){ + with(firebug){ + el.button.css.selectbox.update(""); + var collection = env.targetWindow.document.styleSheets; + for(var i=0,len=collection.length; inull"); + }else if (vtype=="regexp") { + result.push("" + _value + ""); + }else if (vtype=="date") { + result.push("'" + _value + "'"); + } else if (vtype=="boolean"||vtype=="number") { + result.push("" + _value + ""); + } else if(vtype=="function"){ + result.push("function()"); + } else { + result.push("\""+( !_inObject&&!_inArray?_value : _value.substring(0,35)+(_value.length>35?" ...":"") ).replace(/\n/g,"\\n").replace(/\s/g," ").replace(/>/g,">").replace(/"); + } + } + // element + else if(isElement){ + + if(_value.nodeType==3) + result.push(d.highlight(_value.nodeValue)); + else if(_inObject){ + result.push(""+_value.nodeName.toLowerCase()+""); + } else { + result.push(""); + + if(_inArray){ + result.push(_value.nodeName.toLowerCase()); + if(_value.getAttribute){ + if(_value.getAttribute&&_value.getAttribute("id")) + result.push("#"+_value.getAttribute("id")+""); + var elClass = _value.getAttribute(lib.env.ie&&!lib.env.ie8?"className":"class")||""; + result.push(!elClass?"":"."+elClass.split(" ")[0]+""); + } + result.push(""); + } else { + result.push("<"+ _value.nodeName.toLowerCase()); + + if(_value.attributes){ + for(var i=0,len=_value.attributes.length; i"+item.nodeName+"=\""+item.nodeValue+"\""); + } + } + + result.push(">"); + } + } + } + // array, hash + else if(isArray||isHash){ + if(isArray){ + if(_inObject){ + result.push("["+_value.length+"]"); + } else { + result.push("[ "); + + for(var i=0,len=_value.length; i3){ + result.push(", "+(len-4)+" More..."); + break; + } + result.push( (i > 0 ? ", " : "") + d.highlight(_value[i], false, true, true) ); + } + + result.push(" ]"); + } + } else if(_inObject){ + result.push("Object"); + } else { + result.push("Object"); + var i=0; + for(var key in _value){ + var value = _value[key]; + if((_inObject||_inArray)&&i>3){ + result.push(" More..."); + break; + } + result.push(" "+key+"="+d.highlight(value,true)); + i++; + } + result.push(""); + } + } else { + result.push([""+_value+""]); + } + } catch(e){ + result.push(".."); + } + return result.join(""); + } + }, + html:{ + nIndex:"computedStyle", + current:null, + highlight:function(_element,_clear,_event){ + with(firebug){ + if(_element.firebugElement){ + return; + } + if(_clear){ + env.targetWindow.firebug.el.bgInspector.environment.addStyle({ "display":"none" }); + return; + } + d.inspector.inspect(_element,true); + } + }, + inspect:function(_element){ + var map = [], + parentLayer, + t, + tagName, + parent = _element; + while (parent) { + map.push(parent); + if (parent == firebug.env.targetWindow.document.body) break; + parent = parent.parentNode; + } + map = map.reverse(); + with(firebug) { + if (env.dIndex != "html") { + env.targetWindow.firebug.d.navigate("html"); + } + + env.targetWindow.firebug.d.inspector.toggle(false); + + for (t = 0; t < el.left.html.container.child.get().length; t++) { + if (el.left.html.container.child.get()[t].childNodes[0].childNodes[1].childNodes[0].childNodes[0]) { + if (el.left.html.container.child.get()[t].childNodes[0].childNodes[1].childNodes[0].childNodes[0].innerText) { + tagName = el.left.html.container.child.get()[t].childNodes[0].childNodes[1].childNodes[0].childNodes[0].innerText; + } else { + tagName = el.left.html.container.child.get()[t].childNodes[0].childNodes[1].childNodes[0].childNodes[0].textContent; + } + + if (/<html>").insert(parent); + }; + + for(var i=0; i<=len; i++){ + if(i==len){ + new lib.element("A").attribute.addClass("Block").update("</"+element.nodeName.toLowerCase()+">").insert(container); + break; + } + var item = element.childNodes[i]; + + if (item.nodeType != 3){ + var container = new lib.element().attribute.addClass("Block").insert(parent), + link = new lib.element("A").attribute.addClass("Link").insert(container), + spacer = new lib.element("SPAN").attribute.addClass("Spacer").update(" ").insert(link), + html = new lib.element("SPAN").attribute.addClass("Content").update(d.highlight(item)).insert(link), + subContainer = new lib.element("DIV").attribute.addClass("SubContainer").insert(container), + view = lib.util.Element.getView(item); + + link.event.addListener("click", lib.util.Curry(d.html.openHtmlTree, window, item, subContainer, false)); + link.event.addListener("mouseover", lib.util.Curry(d.html.highlight, window, item, false)); + link.event.addListener("mouseout", lib.util.Curry(d.html.highlight, window, item, true)); + + returnParentVal = returnParentEl == item ? subContainer : returnParentVal; + + if(d.html.current==null&&item==document.body){ + link.attribute.addClass("Selected"); + d.html.current = [item,link]; + d.html.openHtmlTree(item,subContainer); + } + + if(element.nodeName!="HEAD"&&element!=document.documentElement&&(view.visibility=="hidden"||view.display=="none")){ + container.attribute.addClass("Unvisible"); + }; + + if (item.childNodes){ + var childLen = item.childNodes.length; + if (childLen == 1 && item.childNodes[0].nodeType == 3) { + html.child.add(document.createTextNode(item.childNodes[0].nodeValue.substring(0, 50))); + html.child.add(document.createTextNode("")); + continue; + } + else + if (childLen > 0) { + link.attribute.addClass("Parent"); + } + } + } + }; + return returnParentVal; + } + }, + openProperties:function(){ + with(firebug){ + var index = d.html.nIndex; + var node = d.html.current[0]; + d.clean(el.right.html.content); + var str = ""; + switch(index){ + case "computedStyle": + var property = ["opacity","filter","azimuth","background","backgroundAttachment","backgroundColor","backgroundImage","backgroundPosition","backgroundRepeat","border","borderCollapse","borderColor","borderSpacing","borderStyle","borderTop","borderRight","borderBottom","borderLeft","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderWidth","bottom","captionSide","clear","clip","color","content","counterIncrement","counterReset","cue","cueAfter","cueBefore","cursor","direction","display","elevation","emptyCells","cssFloat","font","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","height","left","letterSpacing","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginTop","marginRight","marginBottom","marginLeft","markerOffset","marks","maxHeight","maxWidth","minHeight","minWidth","orphans","outline","outlineColor","outlineStyle","outlineWidth","overflow","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","page","pageBreakAfter","pageBreakBefore","pageBreakInside","pause","pauseAfter","pauseBefore","pitch","pitchRange","playDuring","position","quotes","richness","right","size","speak","speakHeader","speakNumeral","speakPunctuation","speechRate","stress","tableLayout","textAlign","textDecoration","textIndent","textShadow","textTransform","top","unicodeBidi","verticalAlign","visibility","voiceFamily","volume","whiteSpace","widows","width","wordSpacing","zIndex"].sort(); + var view = document.defaultView?document.defaultView.getComputedStyle(node,null):node.currentStyle; + for(var i=0,len=property.length; i
"+d.highlight(view[item])+"
"; + } + el.right.html.content.update(str); + break; + case "dom": + d.dom.open(node,el.right.html.content,lib.env.ie); + break; + } + } + } + }, + inspector:{ + enabled:false, + el:null, + inspect:function(_element,_bgInspector){ + with(firebug){ + var pos = env.targetWindow.firebug.lib.util.Element.getPosition(_element); + + env.targetWindow.firebug.el[_bgInspector&&"bgInspector"||"borderInspector"].environment.addStyle({ + "width":_element.offsetWidth+"px", "height":_element.offsetHeight+"px", + "top":pos.offsetTop-(_bgInspector?0:2)+"px", "left":pos.offsetLeft-(_bgInspector?0:2)+"px", + "display":"block" + }); +9 + if(!_bgInspector){ + d.inspector.el = _element; + } + }; + }, + toggle:function(_absoluteValue,_event){ + with (firebug) { + if(_absoluteValue==d.inspector.enabled) + return; + d.inspector.enabled = _absoluteValue!=undefined&&!_absoluteValue.clientX?_absoluteValue:!d.inspector.enabled; + el.button.inspect.attribute[(d.inspector.enabled ? "add" : "remove") + "Class"]("Enabled"); + if(d.inspector.enabled==false){ + el.borderInspector.environment.addStyle({ "display":"none" }); + d.inspector.el = null; + } else if(lib.env.dIndex!="html") { + if (env.popupWin) { + env.popupWin.firebug.d.navigate("html"); + } else { + d.navigate("html"); + } + } + } + } + }, + scripts:{ + index:-1, + lineNumbers:false, + open:function(_index){ + with(firebug){ + d.scripts.index = _index; + el.left.scripts.container.update(""); + var script = document.getElementsByTagName("script")[_index],uri = script.src||document.location.href,source; + try { + if(uri!=document.location.href){ + source = env.cache[uri]||lib.xhr.get(uri).responseText; + env.cache[uri] = source; + } else { + source = script.innerHTML; + } + source = source.replace(/<|>/g,function(_ch){ + return ({"<":"<",">":">"})[_ch]; + }); + + if(!d.scripts.lineNumbers) + el.left.scripts.container.child.add( + new lib.element("DIV").attribute.addClass("CodeContainer").update(source) + ); + else { + source = source.split("
"); + for (var i = 0; i < source.length; i++) { + el.left.scripts.container.child.add(new lib.element("DIV").child.add(new lib.element("DIV").attribute.addClass("LineNumber").update(i + 1), new lib.element("DIV").attribute.addClass("Code").update(" " + source[i]), new lib.element("DIV").attribute.addClass('Clear'))); + }; + }; + } catch(e){ + el.left.scripts.container.child.add( + new lib.element("DIV").attribute.addClass("CodeContainer").update("Access to restricted URI denied") + ); + } + } + }, + toggleLineNumbers:function(){ + with(firebug){ + d.scripts.lineNumbers = !d.scripts.lineNumbers; + el.button.scripts.lineNumbers.attribute[(d.scripts.lineNumbers ? "add" : "remove") + "Class"]("Enabled"); + d.scripts.open( d.scripts.index ); + } + }, + refresh:function(){ + with(firebug){ + el.button.scripts.selectbox.clean(); + var collection = env.targetWindow.document.getElementsByTagName("script"); + for(var i=0,len=collection.length; i")) + } + } + }, + xhr:{ + objects:[], + addObject:function(){ + with(firebug){ + for(var i=0,len=arguments.length; i0&&_object[0]!=undefined&&_object[len-1]!=undefined){ + return true; + } else { + for(var key in _object){ + if(key!="item"&&key!="length"&&key!="setNamedItemNS"&&key!="setNamedItem"&&key!="getNamedItem"&&key!="removeNamedItem"&&key!="getNamedItemNS"&&key!="removeNamedItemNS"&&key!="tags"){ + return false; + } + } + return true + }; + }, + IsHash:function(_object){ + return _object && typeof _object=="object"&&(_object==window||_object instanceof Object)&&!_object.nodeName&&!pi.util.IsArray(_object) + }, + Init:[], + AddEvent: function(_element,_eventName,_fn,_useCapture){ + _element[pi.env.ie?"attachEvent":"addEventListener"]((pi.env.ie?"on":"")+_eventName,_fn,_useCapture||false); + return pi.util.Curry(pi.util.AddEvent,this,_element); + }, + RemoveEvent: function(_element,_eventName,_fn,_useCapture){ + _element[pi.env.ie?"detachEvent":"removeEventListener"]((pi.env.ie?"on":"")+_eventName,_fn,_useCapture||false); + return pi.util.Curry(pi.util.RemoveEvent,this,_element); + }, + Element:{ + addClass:function(_element,_class){ + if( !pi.util.Element.hasClass(_element,_class) ) + pi.util.Element.setClass(_element, pi.util.Element.getClass(_element) + " " + _class ); + }, + getClass:function(_element){ + return _element.getAttribute(pi.env.ie&&!pi.env.ie8?"className":"class")||""; + }, + hasClass:function(_element,_class){ + return pi.util.Array.indexOf(pi.util.Element.getClass(_element).split(" "),_class)>-1; + }, + removeClass:function(_element,_class){ + if( pi.util.Element.hasClass(_element,_class) ){ + var names = pi.util.Element.getClass(_element,_class).split(" "); + pi.util.Element.setClass( + _element, + pi.util.Array.remove(names,pi.util.Array.indexOf(names,_class)).join(" ") + ); + } + }, + setClass:function(_element,_value){ + if(pi.env.ie8){ + _element.setAttribute("className", _value ); + _element.setAttribute("class", _value ); + } else { + _element.setAttribute(pi.env.ie?"className":"class", _value ); + } + }, + toggleClass:function(){ + if(pi.util.Element.hasClass.apply(this,arguments)) + pi.util.Element.removeClass.apply(this,arguments); + else + pi.util.Element.addClass.apply(this,arguments); + }, + getOpacity:function(_styleObject){ + var styleObject = _styleObject; + if(!pi.env.ie) + return styleObject["opacity"]; + + var alpha = styleObject["filter"].match(/opacity\=(\d+)/i); + return alpha?alpha[1]/100:1; + }, + setOpacity:function(_element,_value){ + if(!pi.env.ie) + return pi.util.Element.addStyle(_element,{ "opacity":_value }); + _value*=100; + pi.util.Element.addStyle(_element,{ "filter":"alpha(opacity="+_value+")" }); + return this._parent_; + }, + getPosition:function(_element){ + var parent = _element,offsetLeft = document.body.offsetLeft, offsetTop = document.body.offsetTop, view = pi.util.Element.getView(_element); + while(parent&&parent!=document.body&&parent!=document.firstChild){ + offsetLeft +=parseInt(parent.offsetLeft); + offsetTop += parseInt(parent.offsetTop); + parent = parent.offsetParent; + }; + return { + "bottom":view["bottom"], + "clientLeft":_element.clientLeft, + "clientTop":_element.clientTop, + "left":view["left"], + "marginTop":view["marginTop"], + "marginLeft":view["marginLeft"], + "offsetLeft":offsetLeft, + "offsetTop":offsetTop, + "position":view["position"], + "right":view["right"], + "top":view["top"], + "zIndex":view["zIndex"] + }; + }, + getSize:function(_element){ + var view = pi.util.Element.getView(_element); + return { + "height":view["height"], + "clientHeight":_element.clientHeight, + "clientWidth":_element.clientWidth, + "offsetHeight":_element.offsetHeight, + "offsetWidth":_element.offsetWidth, + "width":view["width"] + } + }, + addStyle:function(_element,_style){ + for(var key in _style){ + key = key=="float"?pi.env.ie?"styleFloat":"cssFloat":key; + if (key == "opacity" && pi.env.ie) { + pi.util.Element.setOpacity(_element,_style[key]); + continue; + } + try { + _element.style[key] = _style[key]; + }catch(e){} + } + }, + getStyle:function(_element,_property){ + _property = _property=="float"?pi.env.ie?"styleFloat":"cssFloat":_property; + if(_property=="opacity"&&pi.env.ie) + return pi.util.Element.getOpacity(_element.style); + return typeof _property=="string"?_element.style[_property]:_element.style; + }, + getValue:function(_element){ + switch(_element.nodeName.toLowerCase()){ + case "input": + case "textarea": + return _element.value; + case "select": + return _element.options[_element.selectedIndex].value; + default: + return _element.innerHTML; + break; + } + }, + getView:function(_element,_property){ + var view = document.defaultView?document.defaultView.getComputedStyle(_element,null):_element.currentStyle; + _property = _property=="float"?pi.env.ie?"styleFloat":"cssFloat":_property; + if(_property=="opacity"&&pi.env.ie) + return pi.util.Element.getOpacity(_element,view); + return typeof _property=="string"?view[_property]:view; + } + }, + Hash: { + clone:function(_hash,_undeep){ + var tmp = {}; + for(var key in _hash){ + if( !_undeep&&pi.util.IsArray( _hash[key] ) ){ + tmp[key] = pi.util.Array.clone( _hash[key] ); + } else if( !_undeep&&pi.util.IsHash( _hash[key] ) ){ + tmp[ key ] = pi.util.Hash.clone(_hash[key]); + } else { + tmp[key] = _hash[key]; + } + } + return tmp; + }, + merge:function(_hash,_source,_undeep){ + for(var key in _source){ + var value = _source[key]; + if (!_undeep&&pi.util.IsArray(_source[key])) { + if(pi.util.IsArray( _hash[key] )){ + Array.prototype.push.apply( _source[key], _hash[key] ) + } + else + value = pi.util.Array.clone(_source[key]); + } + else if (!_undeep&&pi.util.IsHash(_source[key])) { + if (pi.util.IsHash(_hash[key])) { + value = pi.util.Hash.merge(_hash[key], _source[key]); + } else { + value = pi.util.Hash.clone( _source[key] ); + } + } else if( _hash[key] ) + value = _hash[ key ]; + _hash[key] = value; + }; + return _hash; + } + }, + String:{ + format:function(_str){ + var values = Array.prototype.slice.call(arguments,1); + return _str.replace(/\{(\d)\}/g,function(){ + return values[arguments[1]]; + }) + } + }, + GetViewport:function(){ + return { + height:document.documentElement.clientHeight||document.body.clientHeight, + width:document.documentElement.clientWidth||document.body.clientWidth + } + } + }; + + pi.base = function(){ + this.body = {}; + this.init = null; + + this.build = function(_skipClonning){ + var base = this, skipClonning = _skipClonning||false, _private = {}, + fn = function(){ + var _p = pi.util.Hash.clone(_private); + if(!skipClonning){ + for(var key in this){ + if(pi.util.IsArray( this[ key ] ) ){ + this[key] = pi.util.Array.clone( this[key] ); + } else + if( pi.util.IsHash(this[key]) ){ + this[key] = pi.util.Hash.clone( + this[ key ], + function(_key,_object){ + this[ _key ]._parent_ = this; + } + ); + //this[key]._parent_ = this; + } + } + }; + base.createAccessors( _p, this ); + if(base.init) + return base.init.apply(this,arguments); + return this; + }; + this.movePrivateMembers(this.body,_private); + if(this.init){ + fn["$Init"] = this.init; + }; + fn.prototype = this.body; + return fn; + }; + + this.createAccessors = function(_p, _branch){ + var getter = function(_property){ return this[_property]; }, + setter = function(_property,_value){ this[_property] = _value; return _branch._parent_||_branch; }; + + for (var name in _p) { + var isPrivate = name.substring(0, 1) == "_", title = name.substring(1, 2).toUpperCase() + name.substring(2); + + if (isPrivate) { + _branch[(_branch["get" + title]?"_":"")+"get" + title] = pi.util.Curry(getter,_p,name); + _branch[(_branch["set" + title]?"_":"")+"set" + title] = pi.util.Curry(setter,_p,name); + } + else + if (pi.util.IsHash(_p[name])){ + _branch[name]._parent_ = _branch; + if(!_branch[name]) + _branch[name] = {}; + this.createAccessors(_p[name], _branch[name]); + } + }; + }; + + this.movePrivateMembers = function(_object, _branch){ + for (var name in _object) { + var isPrivate = name.substring(0, 1) == "_"; + + if (isPrivate) { + _branch[name] = _object[name]; + delete _object[name]; + } + else + if (pi.util.IsHash(_object[name])){ + _branch[name] = {}; + this.movePrivateMembers(_object[name], _branch[name]); + } + }; + }; + }; + + pi.element = new pi.base; + pi.element.init = function(_val){ + this.environment.setElement( + typeof _val=="string"||!_val? + document.createElement(_val||"DIV"): + _val + ); + return this; + }; + + pi.element.body = { + "addStyle":function(){ + return this.environment.addStyle.apply(this.environment,arguments); + }, + "clean":function(){ + var childs = this.child.get(); + while(childs.length){ + childs[0].parentNode.removeChild(childs[0]); + } + }, + "clone":function(_deep){ + return this.environment.getElement().cloneNode(_deep); + }, + "insert":function(_element){ + _element = _element.environment?_element.environment.getElement():_element; + _element.appendChild(this.environment.getElement()); + return this; + }, + "insertAfter":function(_referenceElement){ + _referenceElement = _referenceElement.environment?_referenceElement.environment.getElement():_referenceElement; + _referenceElement.nextSibling?this.insertBefore(_referenceElement.nextSibling):this.insert(_referenceElement.parentNode); + return this; + }, + "insertBefore":function(_referenceElement){ + _referenceElement = _referenceElement.environment?_referenceElement.environment.getElement():_referenceElement; + _referenceElement.parentNode.insertBefore(this.environment.getElement(),_referenceElement); + return this; + }, + "query":function(_expression,_resultType,namespaceResolver,_result){ + return pi.xpath(_expression,_resultType||"ORDERED_NODE_SNAPSHOT_TYPE",this.environment.getElement(),_namespaceResolver,_result); + }, + "remove":function(){ + if (this.environment.getParent()) { + this.environment.getParent().removeChild(this.environment.getElement()); + } + }, + "update":function(_value){ + this.element[this.element.nodeName.toLowerCase()=="textarea"||this.element.nodeName.toLowerCase()=="input"?"value":"innerHTML"]=_value; + return this; + }, + "attribute":{ + "getAll":function(){ + return this._parent_.environment.getElement().attributes; + }, + "clear":function(_name){ + this.set(_name,""); + return this._parent_; + }, + "get":function(_name){ + return this._parent_.environment.getElement().getAttribute(_name); + }, + "has":function(_name){ + return pi.env.ie?(this.get(_name)!=null):this._parent_.environment.getElement().hasAttribute(_name); + }, + "remove":function(_name){ + this._parent_.environment.getElement().removeAttribute(_name); + return this._parent_; + }, + "set":function(_name,_value){ + this._parent_.environment.getElement().setAttribute(_name,_value); + return this._parent_; + }, + "addClass":function(_classes){ + for(var i=0,len=arguments.length; i-1){ + callback[i].fn.apply(this); + } + } + } + }; + pi.xhr = pi.xhr.build(); + + /* + * xml.xhr.get + */ + + pi.xhr.get = function(_url,_returnPiObject){ + var request = new pi.xhr(); + request.environment.setAsync(false); + request.environment.setUrl(_url); + request.send(); + return _returnPiObject?request:request.environment.getApi(); + }; + + /* + * registering onload event for init functions + */ + pi.util.AddEvent( + pi.env.ie?window:document, + pi.env.ie?"load":"DOMContentLoaded", + function(){ + for(var i=0,len=pi.util.Init.length; ia

b

c

will become

a

b

c

+ * + * @example + * var parser = new tinymce.html.DomParser({validate: true}, schema); + * var rootNode = parser.parse('

content

'); + * + * @class tinymce.html.DomParser + * @version 3.4 + */ + + /** + * Constructs a new DomParser instance. + * + * @constructor + * @method DomParser + * @param {Object} settings Name/value collection of settings. comment, cdata, text, start and end are callbacks. + * @param {tinymce.html.Schema} schema HTML Schema class to use when parsing. + */ + tinymce.html.DomParser = function(settings, schema) { + var self = this, nodeFilters = {}, attributeFilters = [], matchedNodes = {}, matchedAttributes = {}; + + settings = settings || {}; + settings.validate = "validate" in settings ? settings.validate : true; + settings.root_name = settings.root_name || 'body'; + self.schema = schema = schema || new tinymce.html.Schema(); + + function fixInvalidChildren(nodes) { + var ni, node, parent, parents, newParent, currentNode, tempNode, childNode, i, + childClone, nonEmptyElements, nonSplitableElements, sibling, nextNode; + + nonSplitableElements = tinymce.makeMap('tr,td,th,tbody,thead,tfoot,table'); + nonEmptyElements = schema.getNonEmptyElements(); + + for (ni = 0; ni < nodes.length; ni++) { + node = nodes[ni]; + + // Already removed + if (!node.parent) + continue; + + // Get list of all parent nodes until we find a valid parent to stick the child into + parents = [node]; + for (parent = node.parent; parent && !schema.isValidChild(parent.name, node.name) && !nonSplitableElements[parent.name]; parent = parent.parent) + parents.push(parent); + + // Found a suitable parent + if (parent && parents.length > 1) { + // Reverse the array since it makes looping easier + parents.reverse(); + + // Clone the related parent and insert that after the moved node + newParent = currentNode = self.filterNode(parents[0].clone()); + + // Start cloning and moving children on the left side of the target node + for (i = 0; i < parents.length - 1; i++) { + if (schema.isValidChild(currentNode.name, parents[i].name)) { + tempNode = self.filterNode(parents[i].clone()); + currentNode.append(tempNode); + } else + tempNode = currentNode; + + for (childNode = parents[i].firstChild; childNode && childNode != parents[i + 1]; ) { + nextNode = childNode.next; + tempNode.append(childNode); + childNode = nextNode; + } + + currentNode = tempNode; + } + + if (!newParent.isEmpty(nonEmptyElements)) { + parent.insert(newParent, parents[0], true); + parent.insert(node, newParent); + } else { + parent.insert(node, parents[0], true); + } + + // Check if the element is empty by looking through it's contents and special treatment for


+ parent = parents[0]; + if (parent.isEmpty(nonEmptyElements) || parent.firstChild === parent.lastChild && parent.firstChild.name === 'br') { + parent.empty().remove(); + } + } else if (node.parent) { + // If it's an LI try to find a UL/OL for it or wrap it + if (node.name === 'li') { + sibling = node.prev; + if (sibling && (sibling.name === 'ul' || sibling.name === 'ul')) { + sibling.append(node); + continue; + } + + sibling = node.next; + if (sibling && (sibling.name === 'ul' || sibling.name === 'ul')) { + sibling.insert(node, sibling.firstChild, true); + continue; + } + + node.wrap(self.filterNode(new Node('ul', 1))); + continue; + } + + // Try wrapping the element in a DIV + if (schema.isValidChild(node.parent.name, 'div') && schema.isValidChild('div', node.name)) { + node.wrap(self.filterNode(new Node('div', 1))); + } else { + // We failed wrapping it, then remove or unwrap it + if (node.name === 'style' || node.name === 'script') + node.empty().remove(); + else + node.unwrap(); + } + } + } + }; + + /** + * Runs the specified node though the element and attributes filters. + * + * @param {tinymce.html.Node} Node the node to run filters on. + * @return {tinymce.html.Node} The passed in node. + */ + self.filterNode = function(node) { + var i, name, list; + + // Run element filters + if (name in nodeFilters) { + list = matchedNodes[name]; + + if (list) + list.push(node); + else + matchedNodes[name] = [node]; + } + + // Run attribute filters + i = attributeFilters.length; + while (i--) { + name = attributeFilters[i].name; + + if (name in node.attributes.map) { + list = matchedAttributes[name]; + + if (list) + list.push(node); + else + matchedAttributes[name] = [node]; + } + } + + return node; + }; + + /** + * Adds a node filter function to the parser, the parser will collect the specified nodes by name + * and then execute the callback ones it has finished parsing the document. + * + * @example + * parser.addNodeFilter('p,h1', function(nodes, name) { + * for (var i = 0; i < nodes.length; i++) { + * console.log(nodes[i].name); + * } + * }); + * @method addNodeFilter + * @method {String} name Comma separated list of nodes to collect. + * @param {function} callback Callback function to execute once it has collected nodes. + */ + self.addNodeFilter = function(name, callback) { + tinymce.each(tinymce.explode(name), function(name) { + var list = nodeFilters[name]; + + if (!list) + nodeFilters[name] = list = []; + + list.push(callback); + }); + }; + + /** + * Adds a attribute filter function to the parser, the parser will collect nodes that has the specified attributes + * and then execute the callback ones it has finished parsing the document. + * + * @example + * parser.addAttributeFilter('src,href', function(nodes, name) { + * for (var i = 0; i < nodes.length; i++) { + * console.log(nodes[i].name); + * } + * }); + * @method addAttributeFilter + * @method {String} name Comma separated list of nodes to collect. + * @param {function} callback Callback function to execute once it has collected nodes. + */ + self.addAttributeFilter = function(name, callback) { + tinymce.each(tinymce.explode(name), function(name) { + var i; + + for (i = 0; i < attributeFilters.length; i++) { + if (attributeFilters[i].name === name) { + attributeFilters[i].callbacks.push(callback); + return; + } + } + + attributeFilters.push({name: name, callbacks: [callback]}); + }); + }; + + /** + * Parses the specified HTML string into a DOM like node tree and returns the result. + * + * @example + * var rootNode = new DomParser({...}).parse('text'); + * @method parse + * @param {String} html Html string to sax parse. + * @param {Object} args Optional args object that gets passed to all filter functions. + * @return {tinymce.html.Node} Root node containing the tree. + */ + self.parse = function(html, args) { + var parser, rootNode, node, nodes, i, l, fi, fl, list, name, validate, + blockElements, startWhiteSpaceRegExp, invalidChildren = [], + endWhiteSpaceRegExp, allWhiteSpaceRegExp, whiteSpaceElements, children, nonEmptyElements; + + args = args || {}; + matchedNodes = {}; + matchedAttributes = {}; + blockElements = tinymce.extend(tinymce.makeMap('script,style,head,html,body,title,meta,param'), schema.getBlockElements()); + nonEmptyElements = schema.getNonEmptyElements(); + children = schema.children; + validate = settings.validate; + + whiteSpaceElements = schema.getWhiteSpaceElements(); + startWhiteSpaceRegExp = /^[ \t\r\n]+/; + endWhiteSpaceRegExp = /[ \t\r\n]+$/; + allWhiteSpaceRegExp = /[ \t\r\n]+/g; + + function createNode(name, type) { + var node = new Node(name, type), list; + + if (name in nodeFilters) { + list = matchedNodes[name]; + + if (list) + list.push(node); + else + matchedNodes[name] = [node]; + } + + return node; + }; + + function removeWhitespaceBefore(node) { + var textNode, textVal, sibling; + + for (textNode = node.prev; textNode && textNode.type === 3; ) { + textVal = textNode.value.replace(endWhiteSpaceRegExp, ''); + + if (textVal.length > 0) { + textNode.value = textVal; + textNode = textNode.prev; + } else { + sibling = textNode.prev; + textNode.remove(); + textNode = sibling; + } + } + }; + + parser = new tinymce.html.SaxParser({ + validate : validate, + fix_self_closing : !validate, // Let the DOM parser handle
  • in
  • or

    in

    for better results + + cdata: function(text) { + node.append(createNode('#cdata', 4)).value = text; + }, + + text: function(text, raw) { + var textNode; + + // Trim all redundant whitespace on non white space elements + if (!whiteSpaceElements[node.name]) { + text = text.replace(allWhiteSpaceRegExp, ' '); + + if (node.lastChild && blockElements[node.lastChild.name]) + text = text.replace(startWhiteSpaceRegExp, ''); + } + + // Do we need to create the node + if (text.length !== 0) { + textNode = createNode('#text', 3); + textNode.raw = !!raw; + node.append(textNode).value = text; + } + }, + + comment: function(text) { + node.append(createNode('#comment', 8)).value = text; + }, + + pi: function(name, text) { + node.append(createNode(name, 7)).value = text; + removeWhitespaceBefore(node); + }, + + doctype: function(text) { + var newNode; + + newNode = node.append(createNode('#doctype', 10)); + newNode.value = text; + removeWhitespaceBefore(node); + }, + + start: function(name, attrs, empty) { + var newNode, attrFiltersLen, elementRule, textNode, attrName, text, sibling, parent; + + elementRule = validate ? schema.getElementRule(name) : {}; + if (elementRule) { + newNode = createNode(elementRule.outputName || name, 1); + newNode.attributes = attrs; + newNode.shortEnded = empty; + + node.append(newNode); + + // Check if node is valid child of the parent node is the child is + // unknown we don't collect it since it's probably a custom element + parent = children[node.name]; + if (parent && children[newNode.name] && !parent[newNode.name]) + invalidChildren.push(newNode); + + attrFiltersLen = attributeFilters.length; + while (attrFiltersLen--) { + attrName = attributeFilters[attrFiltersLen].name; + + if (attrName in attrs.map) { + list = matchedAttributes[attrName]; + + if (list) + list.push(newNode); + else + matchedAttributes[attrName] = [newNode]; + } + } + + // Trim whitespace before block + if (blockElements[name]) + removeWhitespaceBefore(newNode); + + // Change current node if the element wasn't empty i.e not
    or + if (!empty) + node = newNode; + } + }, + + end: function(name) { + var textNode, elementRule, text, sibling, tempNode; + + elementRule = validate ? schema.getElementRule(name) : {}; + if (elementRule) { + if (blockElements[name]) { + if (!whiteSpaceElements[node.name]) { + // Trim whitespace at beginning of block + for (textNode = node.firstChild; textNode && textNode.type === 3; ) { + text = textNode.value.replace(startWhiteSpaceRegExp, ''); + + if (text.length > 0) { + textNode.value = text; + textNode = textNode.next; + } else { + sibling = textNode.next; + textNode.remove(); + textNode = sibling; + } + } + + // Trim whitespace at end of block + for (textNode = node.lastChild; textNode && textNode.type === 3; ) { + text = textNode.value.replace(endWhiteSpaceRegExp, ''); + + if (text.length > 0) { + textNode.value = text; + textNode = textNode.prev; + } else { + sibling = textNode.prev; + textNode.remove(); + textNode = sibling; + } + } + } + + // Trim start white space + textNode = node.prev; + if (textNode && textNode.type === 3) { + text = textNode.value.replace(startWhiteSpaceRegExp, ''); + + if (text.length > 0) + textNode.value = text; + else + textNode.remove(); + } + } + + // Handle empty nodes + if (elementRule.removeEmpty || elementRule.paddEmpty) { + if (node.isEmpty(nonEmptyElements)) { + if (elementRule.paddEmpty) + node.empty().append(new Node('#text', '3')).value = '\u00a0'; + else { + // Leave nodes that have a name like + if (!node.attributes.map.name) { + tempNode = node.parent; + node.empty().remove(); + node = tempNode; + return; + } + } + } + } + + node = node.parent; + } + } + }, schema); + + rootNode = node = new Node(settings.root_name, 11); + + parser.parse(html); + + if (validate) + fixInvalidChildren(invalidChildren); + + // Run node filters + for (name in matchedNodes) { + list = nodeFilters[name]; + nodes = matchedNodes[name]; + + // Remove already removed children + fi = nodes.length; + while (fi--) { + if (!nodes[fi].parent) + nodes.splice(fi, 1); + } + + for (i = 0, l = list.length; i < l; i++) + list[i](nodes, name, args); + } + + // Run attribute filters + for (i = 0, l = attributeFilters.length; i < l; i++) { + list = attributeFilters[i]; + + if (list.name in matchedAttributes) { + nodes = matchedAttributes[list.name]; + + // Remove already removed children + fi = nodes.length; + while (fi--) { + if (!nodes[fi].parent) + nodes.splice(fi, 1); + } + + for (fi = 0, fl = list.callbacks.length; fi < fl; fi++) + list.callbacks[fi](nodes, list.name, args); + } + } + + return rootNode; + }; + + // Remove
    at end of block elements Gecko and WebKit injects BR elements to + // make it possible to place the caret inside empty blocks. This logic tries to remove + // these elements and keep br elements that where intended to be there intact + if (settings.remove_trailing_brs) { + self.addNodeFilter('br', function(nodes, name) { + var i, l = nodes.length, node, blockElements = schema.getBlockElements(), + nonEmptyElements = schema.getNonEmptyElements(), parent, prev, prevName; + + // Must loop forwards since it will otherwise remove all brs in

    a


    + for (i = 0; i < l; i++) { + node = nodes[i]; + parent = node.parent; + + if (blockElements[node.parent.name] && node === parent.lastChild) { + // Loop all nodes to the right of the current node and check for other BR elements + // excluding bookmarks since they are invisible + prev = node.prev; + while (prev) { + prevName = prev.name; + + // Ignore bookmarks + if (prevName !== "span" || prev.attr('data-mce-type') !== 'bookmark') { + // Found a non BR element + if (prevName !== "br") + break; + + // Found another br it's a

    structure then don't remove anything + if (prevName === 'br') { + node = null; + break; + } + } + + prev = prev.prev; + } + + if (node) { + node.remove(); + + // Is the parent to be considered empty after we removed the BR + if (parent.isEmpty(nonEmptyElements)) { + elementRule = schema.getElementRule(parent.name); + + // Remove or padd the element depending on schema rule + if (elementRule.removeEmpty) + parent.remove(); + else if (elementRule.paddEmpty) + parent.empty().append(new tinymce.html.Node('#text', 3)).value = '\u00a0'; + } + } + } + } + }); + } + } +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/html/Entities.js b/include/javascript/tiny_mce/classes/html/Entities.js new file mode 100644 index 00000000..f0d4391e --- /dev/null +++ b/include/javascript/tiny_mce/classes/html/Entities.js @@ -0,0 +1,253 @@ +/** + * Entities.js + * + * Copyright 2010, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var namedEntities, baseEntities, reverseEntities, + attrsCharsRegExp = /[&\"\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + textCharsRegExp = /[<>&\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + rawCharsRegExp = /[<>&\"\']/g, + entityRegExp = /&(#)?([\w]+);/g, + asciiMap = { + 128 : "\u20AC", 130 : "\u201A", 131 : "\u0192", 132 : "\u201E", 133 : "\u2026", 134 : "\u2020", + 135 : "\u2021", 136 : "\u02C6", 137 : "\u2030", 138 : "\u0160", 139 : "\u2039", 140 : "\u0152", + 142 : "\u017D", 145 : "\u2018", 146 : "\u2019", 147 : "\u201C", 148 : "\u201D", 149 : "\u2022", + 150 : "\u2013", 151 : "\u2014", 152 : "\u02DC", 153 : "\u2122", 154 : "\u0161", 155 : "\u203A", + 156 : "\u0153", 158 : "\u017E", 159 : "\u0178" + }; + + // Raw entities + baseEntities = { + '"' : '"', + "'" : ''', + '<' : '<', + '>' : '>', + '&' : '&' + }; + + // Reverse lookup table for raw entities + reverseEntities = { + '<' : '<', + '>' : '>', + '&' : '&', + '"' : '"', + ''' : "'" + }; + + // Decodes text by using the browser + function nativeDecode(text) { + var elm; + + elm = document.createElement("div"); + elm.innerHTML = text; + + return elm.textContent || elm.innerText || text; + }; + + // Build a two way lookup table for the entities + function buildEntitiesLookup(items, radix) { + var i, chr, entity, lookup = {}; + + if (items) { + items = items.split(','); + radix = radix || 10; + + // Build entities lookup table + for (i = 0; i < items.length; i += 2) { + chr = String.fromCharCode(parseInt(items[i], radix)); + + // Only add non base entities + if (!baseEntities[chr]) { + entity = '&' + items[i + 1] + ';'; + lookup[chr] = entity; + lookup[entity] = chr; + } + } + + return lookup; + } + }; + + // Unpack entities lookup where the numbers are in radix 32 to reduce the size + namedEntities = buildEntitiesLookup( + '50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,' + + '5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,' + + '5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,' + + '5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,' + + '68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,' + + '6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,' + + '6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,' + + '75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,' + + '7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,' + + '7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,' + + 'sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,' + + 'st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,' + + 't9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,' + + 'tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,' + + 'u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,' + + '81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,' + + '8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,' + + '8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,' + + '8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,' + + '8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,' + + 'nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,' + + 'rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,' + + 'Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,' + + '80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,' + + '811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro' + , 32); + + tinymce.html = tinymce.html || {}; + + /** + * Entity encoder class. + * + * @class tinymce.html.SaxParser + * @static + * @version 3.4 + */ + tinymce.html.Entities = { + /** + * Encodes the specified string using raw entities. This means only the required XML base entities will be endoded. + * + * @method encodeRaw + * @param {String} text Text to encode. + * @param {Boolean} attr Optional flag to specify if the text is attribute contents. + * @return {String} Entity encoded text. + */ + encodeRaw : function(text, attr) { + return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) { + return baseEntities[chr] || chr; + }); + }, + + /** + * Encoded the specified text with both the attributes and text entities. This function will produce larger text contents + * since it doesn't know if the context is within a attribute or text node. This was added for compatibility + * and is exposed as the DOMUtils.encode function. + * + * @method encodeAllRaw + * @param {String} text Text to encode. + * @return {String} Entity encoded text. + */ + encodeAllRaw : function(text) { + return ('' + text).replace(rawCharsRegExp, function(chr) { + return baseEntities[chr] || chr; + }); + }, + + /** + * Encodes the specified string using numeric entities. The core entities will be encoded as named ones but all non lower ascii characters + * will be encoded into numeric entities. + * + * @method encodeNumeric + * @param {String} text Text to encode. + * @param {Boolean} attr Optional flag to specify if the text is attribute contents. + * @return {String} Entity encoded text. + */ + encodeNumeric : function(text, attr) { + return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) { + // Multi byte sequence convert it to a single entity + if (chr.length > 1) + return '&#' + (((chr.charCodeAt(0) - 0xD800) * 0x400) + (chr.charCodeAt(1) - 0xDC00) + 0x10000) + ';'; + + return baseEntities[chr] || '&#' + chr.charCodeAt(0) + ';'; + }); + }, + + /** + * Encodes the specified string using named entities. The core entities will be encoded as named ones but all non lower ascii characters + * will be encoded into named entities. + * + * @method encodeNamed + * @param {String} text Text to encode. + * @param {Boolean} attr Optional flag to specify if the text is attribute contents. + * @param {Object} entities Optional parameter with entities to use. + * @return {String} Entity encoded text. + */ + encodeNamed : function(text, attr, entities) { + entities = entities || namedEntities; + + return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) { + return baseEntities[chr] || entities[chr] || chr; + }); + }, + + /** + * Returns an encode function based on the name(s) and it's optional entities. + * + * @method getEncodeFunc + * @param {String} name Comma separated list of encoders for example named,numeric. + * @param {String} entities Optional parameter with entities to use instead of the built in set. + * @return {function} Encode function to be used. + */ + getEncodeFunc : function(name, entities) { + var Entities = tinymce.html.Entities; + + entities = buildEntitiesLookup(entities) || namedEntities; + + function encodeNamedAndNumeric(text, attr) { + return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) { + return baseEntities[chr] || entities[chr] || '&#' + chr.charCodeAt(0) + ';' || chr; + }); + }; + + function encodeCustomNamed(text, attr) { + return Entities.encodeNamed(text, attr, entities); + }; + + // Replace + with , to be compatible with previous TinyMCE versions + name = tinymce.makeMap(name.replace(/\+/g, ',')); + + // Named and numeric encoder + if (name.named && name.numeric) + return encodeNamedAndNumeric; + + // Named encoder + if (name.named) { + // Custom names + if (entities) + return encodeCustomNamed; + + return Entities.encodeNamed; + } + + // Numeric + if (name.numeric) + return Entities.encodeNumeric; + + // Raw encoder + return Entities.encodeRaw; + }, + + /** + * Decodes the specified string, this will replace entities with raw UTF characters. + * + * @param {String} text Text to entity decode. + * @return {String} Entity decoded string. + */ + decode : function(text) { + return text.replace(entityRegExp, function(all, numeric, value) { + if (numeric) { + value = parseInt(value); + + // Support upper UTF + if (value > 0xFFFF) { + value -= 0x10000; + + return String.fromCharCode(0xD800 + (value >> 10), 0xDC00 + (value & 0x3FF)); + } else + return asciiMap[value] || String.fromCharCode(value); + } + + return reverseEntities[all] || namedEntities[all] || nativeDecode(all); + }); + } + }; +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/html/Node.js b/include/javascript/tiny_mce/classes/html/Node.js new file mode 100644 index 00000000..f5c6083c --- /dev/null +++ b/include/javascript/tiny_mce/classes/html/Node.js @@ -0,0 +1,463 @@ +/** + * Node.js + * + * Copyright 2010, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var whiteSpaceRegExp = /^[ \t\r\n]*$/, typeLookup = { + '#text' : 3, + '#comment' : 8, + '#cdata' : 4, + '#pi' : 7, + '#doctype' : 10, + '#document-fragment' : 11 + }; + + // Walks the tree left/right + function walk(node, root_node, prev) { + var sibling, parent, startName = prev ? 'lastChild' : 'firstChild', siblingName = prev ? 'prev' : 'next'; + + // Walk into nodes if it has a start + if (node[startName]) + return node[startName]; + + // Return the sibling if it has one + if (node !== root_node) { + sibling = node[siblingName]; + + if (sibling) + return sibling; + + // Walk up the parents to look for siblings + for (parent = node.parent; parent && parent !== root_node; parent = parent.parent) { + sibling = parent[siblingName]; + + if (sibling) + return sibling; + } + } + }; + + /** + * This class is a minimalistic implementation of a DOM like node used by the DomParser class. + * + * @example + * var node = new tinymce.html.Node('strong', 1); + * someRoot.append(node); + * + * @class tinymce.html.Node + * @version 3.4 + */ + + /** + * Constructs a new Node instance. + * + * @constructor + * @method Node + * @param {String} name Name of the node type. + * @param {Number} type Numeric type representing the node. + */ + function Node(name, type) { + this.name = name; + this.type = type; + + if (type === 1) { + this.attributes = []; + this.attributes.map = {}; + } + } + + tinymce.extend(Node.prototype, { + /** + * Replaces the current node with the specified one. + * + * @example + * someNode.replace(someNewNode); + * + * @method replace + * @param {tinymce.html.Node} node Node to replace the current node with. + * @return {tinymce.html.Node} The old node that got replaced. + */ + replace : function(node) { + var self = this; + + if (node.parent) + node.remove(); + + self.insert(node, self); + self.remove(); + + return self; + }, + + /** + * Gets/sets or removes an attribute by name. + * + * @example + * someNode.attr("name", "value"); // Sets an attribute + * console.log(someNode.attr("name")); // Gets an attribute + * someNode.attr("name", null); // Removes an attribute + * + * @method attr + * @param {String} name Attribute name to set or get. + * @param {String} value Optional value to set. + * @return {String/tinymce.html.Node} String or undefined on a get operation or the current node on a set operation. + */ + attr : function(name, value) { + var self = this, attrs, i, undef; + + if (typeof name !== "string") { + for (i in name) + self.attr(i, name[i]); + + return self; + } + + if (attrs = self.attributes) { + if (value !== undef) { + // Remove attribute + if (value === null) { + if (name in attrs.map) { + delete attrs.map[name]; + + i = attrs.length; + while (i--) { + if (attrs[i].name === name) { + attrs = attrs.splice(i, 1); + return self; + } + } + } + + return self; + } + + // Set attribute + if (name in attrs.map) { + // Set attribute + i = attrs.length; + while (i--) { + if (attrs[i].name === name) { + attrs[i].value = value; + break; + } + } + } else + attrs.push({name: name, value: value}); + + attrs.map[name] = value; + + return self; + } else { + return attrs.map[name]; + } + } + }, + + /** + * Does a shallow clones the node into a new node. It will also exclude id attributes since + * there should only be one id per document. + * + * @example + * var clonedNode = node.clone(); + * + * @method clone + * @return {tinymce.html.Node} New copy of the original node. + */ + clone : function() { + var self = this, clone = new Node(self.name, self.type), i, l, selfAttrs, selfAttr, cloneAttrs; + + // Clone element attributes + if (selfAttrs = self.attributes) { + cloneAttrs = []; + cloneAttrs.map = {}; + + for (i = 0, l = selfAttrs.length; i < l; i++) { + selfAttr = selfAttrs[i]; + + // Clone everything except id + if (selfAttr.name !== 'id') { + cloneAttrs[cloneAttrs.length] = {name: selfAttr.name, value: selfAttr.value}; + cloneAttrs.map[selfAttr.name] = selfAttr.value; + } + } + + clone.attributes = cloneAttrs; + } + + clone.value = self.value; + clone.shortEnded = self.shortEnded; + + return clone; + }, + + /** + * Wraps the node in in another node. + * + * @example + * node.wrap(wrapperNode); + * + * @method wrap + */ + wrap : function(wrapper) { + var self = this; + + self.parent.insert(wrapper, self); + wrapper.append(self); + + return self; + }, + + /** + * Unwraps the node in other words it removes the node but keeps the children. + * + * @example + * node.unwrap(); + * + * @method unwrap + */ + unwrap : function() { + var self = this, node, next; + + for (node = self.firstChild; node; ) { + next = node.next; + self.insert(node, self, true); + node = next; + } + + self.remove(); + }, + + /** + * Removes the node from it's parent. + * + * @example + * node.remove(); + * + * @method remove + * @return {tinymce.html.Node} Current node that got removed. + */ + remove : function() { + var self = this, parent = self.parent, next = self.next, prev = self.prev; + + if (parent) { + if (parent.firstChild === self) { + parent.firstChild = next; + + if (next) + next.prev = null; + } else { + prev.next = next; + } + + if (parent.lastChild === self) { + parent.lastChild = prev; + + if (prev) + prev.next = null; + } else { + next.prev = prev; + } + + self.parent = self.next = self.prev = null; + } + + return self; + }, + + /** + * Appends a new node as a child of the current node. + * + * @example + * node.append(someNode); + * + * @method append + * @param {tinymce.html.Node} node Node to append as a child of the current one. + * @return {tinymce.html.Node} The node that got appended. + */ + append : function(node) { + var self = this, last; + + if (node.parent) + node.remove(); + + last = self.lastChild; + if (last) { + last.next = node; + node.prev = last; + self.lastChild = node; + } else + self.lastChild = self.firstChild = node; + + node.parent = self; + + return node; + }, + + /** + * Inserts a node at a specific position as a child of the current node. + * + * @example + * parentNode.insert(newChildNode, oldChildNode); + * + * @method insert + * @param {tinymce.html.Node} node Node to insert as a child of the current node. + * @param {tinymce.html.Node} ref_node Reference node to set node before/after. + * @param {Boolean} before Optional state to insert the node before the reference node. + * @return {tinymce.html.Node} The node that got inserted. + */ + insert : function(node, ref_node, before) { + var parent; + + if (node.parent) + node.remove(); + + parent = ref_node.parent || this; + + if (before) { + if (ref_node === parent.firstChild) + parent.firstChild = node; + else + ref_node.prev.next = node; + + node.prev = ref_node.prev; + node.next = ref_node; + ref_node.prev = node; + } else { + if (ref_node === parent.lastChild) + parent.lastChild = node; + else + ref_node.next.prev = node; + + node.next = ref_node.next; + node.prev = ref_node; + ref_node.next = node; + } + + node.parent = parent; + + return node; + }, + + /** + * Get all children by name. + * + * @method getAll + * @param {String} name Name of the child nodes to collect. + * @return {Array} Array with child nodes matchin the specified name. + */ + getAll : function(name) { + var self = this, node, collection = []; + + for (node = self.firstChild; node; node = walk(node, self)) { + if (node.name === name) + collection.push(node); + } + + return collection; + }, + + /** + * Removes all children of the current node. + * + * @method empty + * @return {tinymce.html.Node} The current node that got cleared. + */ + empty : function() { + var self = this, nodes, i, node; + + // Remove all children + if (self.firstChild) { + nodes = []; + + // Collect the children + for (node = self.firstChild; node; node = walk(node, self)) + nodes.push(node); + + // Remove the children + i = nodes.length; + while (i--) { + node = nodes[i]; + node.parent = node.firstChild = node.lastChild = node.next = node.prev = null; + } + } + + self.firstChild = self.lastChild = null; + + return self; + }, + + /** + * Returns true/false if the node is to be considered empty or not. + * + * @example + * node.isEmpty({img : true}); + * @method isEmpty + * @param {Object} elements Name/value object with elements that are automatically treated as non empty elements. + * @return {Boolean} true/false if the node is empty or not. + */ + isEmpty : function(elements) { + var self = this, node = self.firstChild, i, name; + + if (node) { + do { + if (node.type === 1) { + // Ignore bogus elements + if (node.attributes.map['data-mce-bogus']) + continue; + + // Keep empty elements like + if (elements[node.name]) + return false; + + // Keep elements with data attributes or name attribute like
    + i = node.attributes.length; + while (i--) { + name = node.attributes[i].name; + if (name === "name" || name.indexOf('data-') === 0) + return false; + } + } + + // Keep non whitespace text nodes + if ((node.type === 3 && !whiteSpaceRegExp.test(node.value))) + return false; + } while (node = walk(node, self)); + } + + return true; + } + }); + + tinymce.extend(Node, { + /** + * Creates a node of a specific type. + * + * @static + * @method create + * @param {String} name Name of the node type to create for example "b" or "#text". + * @param {Object} attrs Name/value collection of attributes that will be applied to elements. + */ + create : function(name, attrs) { + var node, attrName; + + // Create node + node = new Node(name, typeLookup[name] || 1); + + // Add attributes if needed + if (attrs) { + for (attrName in attrs) + node.attr(attrName, attrs[attrName]); + } + + return node; + } + }); + + tinymce.html.Node = Node; +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/html/SaxParser.js b/include/javascript/tiny_mce/classes/html/SaxParser.js new file mode 100644 index 00000000..dae341e8 --- /dev/null +++ b/include/javascript/tiny_mce/classes/html/SaxParser.js @@ -0,0 +1,335 @@ +/** + * SaxParser.js + * + * Copyright 2010, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + /** + * This class parses HTML code using pure JavaScript and executes various events for each item it finds. It will + * always execute the events in the right order for tag soup code like

    . It will also remove elements + * and attributes that doesn't fit the schema if the validate setting is enabled. + * + * @example + * var parser = new tinymce.html.SaxParser({ + * validate: true, + * + * comment: function(text) { + * console.log('Comment:', text); + * }, + * + * cdata: function(text) { + * console.log('CDATA:', text); + * }, + * + * text: function(text, raw) { + * console.log('Text:', text, 'Raw:', raw); + * }, + * + * start: function(name, attrs, empty) { + * console.log('Start:', name, attrs, empty); + * }, + * + * end: function(name) { + * console.log('End:', name); + * }, + * + * pi: function(name, text) { + * console.log('PI:', name, text); + * }, + * + * doctype: function(text) { + * console.log('DocType:', text); + * } + * }, schema); + * @class tinymce.html.SaxParser + * @version 3.4 + */ + + /** + * Constructs a new SaxParser instance. + * + * @constructor + * @method SaxParser + * @param {Object} settings Name/value collection of settings. comment, cdata, text, start and end are callbacks. + * @param {tinymce.html.Schema} schema HTML Schema class to use when parsing. + */ + tinymce.html.SaxParser = function(settings, schema) { + var self = this, noop = function() {}; + + settings = settings || {}; + self.schema = schema = schema || new tinymce.html.Schema(); + + if (settings.fix_self_closing !== false) + settings.fix_self_closing = true; + + // Add handler functions from settings and setup default handlers + tinymce.each('comment cdata text start end pi doctype'.split(' '), function(name) { + if (name) + self[name] = settings[name] || noop; + }); + + /** + * Parses the specified HTML string and executes the callbacks for each item it finds. + * + * @example + * new SaxParser({...}).parse('text'); + * @method parse + * @param {String} html Html string to sax parse. + */ + self.parse = function(html) { + var self = this, matches, index = 0, value, endRegExp, stack = [], attrList, i, text, name, + shortEndedElements, fillAttrsMap, isShortEnded, validate, elementRule, isValidElement, attr, attribsValue, + validAttributesMap, validAttributePatterns, attributesRequired, attributesDefault, attributesForced, selfClosing, + tokenRegExp, attrRegExp, specialElements, attrValue, idCount = 0, decode = tinymce.html.Entities.decode, fixSelfClosing; + + function processEndTag(name) { + var pos, i; + + // Find position of parent of the same type + pos = stack.length; + while (pos--) { + if (stack[pos].name === name) + break; + } + + // Found parent + if (pos >= 0) { + // Close all the open elements + for (i = stack.length - 1; i >= pos; i--) { + name = stack[i]; + + if (name.valid) + self.end(name.name); + } + + // Remove the open elements from the stack + stack.length = pos; + } + }; + + // Precompile RegExps and map objects + tokenRegExp = new RegExp('<(?:' + + '(?:!--([\\w\\W]*?)-->)|' + // Comment + '(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|' + // CDATA + '(?:!DOCTYPE([\\w\\W]*?)>)|' + // DOCTYPE + '(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|' + // PI + '(?:\\/([^>]+)>)|' + // End element + '(?:([^\\s\\/<>]+)\\s*((?:[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*)>)' + // Start element + ')', 'g'); + + attrRegExp = /([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:\\.|[^\"])*)\")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?/g; + specialElements = { + 'script' : /<\/script[^>]*>/gi, + 'style' : /<\/style[^>]*>/gi, + 'noscript' : /<\/noscript[^>]*>/gi + }; + + // Setup lookup tables for empty elements and boolean attributes + shortEndedElements = schema.getShortEndedElements(); + selfClosing = schema.getSelfClosingElements(); + fillAttrsMap = schema.getBoolAttrs(); + validate = settings.validate; + fixSelfClosing = settings.fix_self_closing; + + while (matches = tokenRegExp.exec(html)) { + // Text + if (index < matches.index) + self.text(decode(html.substr(index, matches.index - index))); + + if (value = matches[6]) { // End element + processEndTag(value.toLowerCase()); + } else if (value = matches[7]) { // Start element + value = value.toLowerCase(); + isShortEnded = value in shortEndedElements; + + // Is self closing tag for example an
  • after an open
  • + if (fixSelfClosing && selfClosing[value] && stack.length > 0 && stack[stack.length - 1].name === value) + processEndTag(value); + + // Validate element + if (!validate || (elementRule = schema.getElementRule(value))) { + isValidElement = true; + + // Grab attributes map and patters when validation is enabled + if (validate) { + validAttributesMap = elementRule.attributes; + validAttributePatterns = elementRule.attributePatterns; + } + + // Parse attributes + if (attribsValue = matches[8]) { + attrList = []; + attrList.map = {}; + + attribsValue.replace(attrRegExp, function(match, name, value, val2, val3) { + var attrRule, i; + + name = name.toLowerCase(); + value = name in fillAttrsMap ? name : decode(value || val2 || val3 || ''); // Handle boolean attribute than value attribute + + // Validate name and value + if (validate && name.indexOf('data-') !== 0) { + attrRule = validAttributesMap[name]; + + // Find rule by pattern matching + if (!attrRule && validAttributePatterns) { + i = validAttributePatterns.length; + while (i--) { + attrRule = validAttributePatterns[i]; + if (attrRule.pattern.test(name)) + break; + } + + // No rule matched + if (i === -1) + attrRule = null; + } + + // No attribute rule found + if (!attrRule) + return; + + // Validate value + if (attrRule.validValues && !(value in attrRule.validValues)) + return; + } + + // Add attribute to list and map + attrList.map[name] = value; + attrList.push({ + name: name, + value: value + }); + }); + } else { + attrList = []; + attrList.map = {}; + } + + // Process attributes if validation is enabled + if (validate) { + attributesRequired = elementRule.attributesRequired; + attributesDefault = elementRule.attributesDefault; + attributesForced = elementRule.attributesForced; + + // Handle forced attributes + if (attributesForced) { + i = attributesForced.length; + while (i--) { + attr = attributesForced[i]; + name = attr.name; + attrValue = attr.value; + + if (attrValue === '{$uid}') + attrValue = 'mce_' + idCount++; + + attrList.map[name] = attrValue; + attrList.push({name: name, value: attrValue}); + } + } + + // Handle default attributes + if (attributesDefault) { + i = attributesDefault.length; + while (i--) { + attr = attributesDefault[i]; + name = attr.name; + + if (!(name in attrList.map)) { + attrValue = attr.value; + + if (attrValue === '{$uid}') + attrValue = 'mce_' + idCount++; + + attrList.map[name] = attrValue; + attrList.push({name: name, value: attrValue}); + } + } + } + + // Handle required attributes + if (attributesRequired) { + i = attributesRequired.length; + while (i--) { + if (attributesRequired[i] in attrList.map) + break; + } + + // None of the required attributes where found + if (i === -1) + isValidElement = false; + } + + // Invalidate element if it's marked as bogus + if (attrList.map['data-mce-bogus']) + isValidElement = false; + } + + if (isValidElement) + self.start(value, attrList, isShortEnded); + } else + isValidElement = false; + + // Treat script, noscript and style a bit different since they may include code that looks like elements + if (endRegExp = specialElements[value]) { + endRegExp.lastIndex = index = matches.index + matches[0].length; + + if (matches = endRegExp.exec(html)) { + if (isValidElement) + text = html.substr(index, matches.index - index); + + index = matches.index + matches[0].length; + } else { + text = html.substr(index); + index = html.length; + } + + if (isValidElement && text.length > 0) + self.text(text, true); + + if (isValidElement) + self.end(value); + + tokenRegExp.lastIndex = index; + continue; + } + + // Push value on to stack + if (!isShortEnded) { + if (!attribsValue || attribsValue.indexOf('/') != attribsValue.length - 1) + stack.push({name: value, valid: isValidElement}); + else if (isValidElement) + self.end(value); + } + } else if (value = matches[1]) { // Comment + self.comment(value); + } else if (value = matches[2]) { // CDATA + self.cdata(value); + } else if (value = matches[3]) { // DOCTYPE + self.doctype(value); + } else if (value = matches[4]) { // PI + self.pi(value, matches[5]); + } + + index = matches.index + matches[0].length; + } + + // Text + if (index < html.length) + self.text(decode(html.substr(index))); + + // Close any open elements + for (i = stack.length - 1; i >= 0; i--) { + value = stack[i]; + + if (value.valid) + self.end(value.name); + } + }; + } +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/html/Schema.js b/include/javascript/tiny_mce/classes/html/Schema.js new file mode 100644 index 00000000..dbe43fd2 --- /dev/null +++ b/include/javascript/tiny_mce/classes/html/Schema.js @@ -0,0 +1,639 @@ +/** + * Schema.js + * + * Copyright 2010, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var transitional = {}, boolAttrMap, blockElementsMap, shortEndedElementsMap, nonEmptyElementsMap, + whiteSpaceElementsMap, selfClosingElementsMap, makeMap = tinymce.makeMap, each = tinymce.each; + + function split(str, delim) { + return str.split(delim || ','); + }; + + /** + * Unpacks the specified lookup and string data it will also parse it into an object + * map with sub object for it's children. This will later also include the attributes. + */ + function unpack(lookup, data) { + var key, elements = {}; + + function replace(value) { + return value.replace(/[A-Z]+/g, function(key) { + return replace(lookup[key]); + }); + }; + + // Unpack lookup + for (key in lookup) { + if (lookup.hasOwnProperty(key)) + lookup[key] = replace(lookup[key]); + } + + // Unpack and parse data into object map + replace(data).replace(/#/g, '#text').replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g, function(str, name, attributes, children) { + attributes = split(attributes, '|'); + + elements[name] = { + attributes : makeMap(attributes), + attributesOrder : attributes, + children : makeMap(children, '|', {'#comment' : {}}) + } + }); + + return elements; + }; + + // Build a lookup table for block elements both lowercase and uppercase + blockElementsMap = 'h1,h2,h3,h4,h5,h6,hr,p,div,address,pre,form,table,tbody,thead,tfoot,' + + 'th,tr,td,li,ol,ul,caption,blockquote,center,dl,dt,dd,dir,fieldset,' + + 'noscript,menu,isindex,samp,header,footer,article,section,hgroup'; + blockElementsMap = makeMap(blockElementsMap, ',', makeMap(blockElementsMap.toUpperCase())); + + // This is the XHTML 1.0 transitional elements with it's attributes and children packed to reduce it's size + transitional = unpack({ + Z : 'H|K|N|O|P', + Y : 'X|form|R|Q', + ZG : 'E|span|width|align|char|charoff|valign', + X : 'p|T|div|U|W|isindex|fieldset|table', + ZF : 'E|align|char|charoff|valign', + W : 'pre|hr|blockquote|address|center|noframes', + ZE : 'abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height', + ZD : '[E][S]', + U : 'ul|ol|dl|menu|dir', + ZC : 'p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q', + T : 'h1|h2|h3|h4|h5|h6', + ZB : 'X|S|Q', + S : 'R|P', + ZA : 'a|G|J|M|O|P', + R : 'a|H|K|N|O', + Q : 'noscript|P', + P : 'ins|del|script', + O : 'input|select|textarea|label|button', + N : 'M|L', + M : 'em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym', + L : 'sub|sup', + K : 'J|I', + J : 'tt|i|b|u|s|strike', + I : 'big|small|font|basefont', + H : 'G|F', + G : 'br|span|bdo', + F : 'object|applet|img|map|iframe', + E : 'A|B|C', + D : 'accesskey|tabindex|onfocus|onblur', + C : 'onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup', + B : 'lang|xml:lang|dir', + A : 'id|class|style|title' + }, 'script[id|charset|type|language|src|defer|xml:space][]' + + 'style[B|id|type|media|title|xml:space][]' + + 'object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]' + + 'param[id|name|value|valuetype|type][]' + + 'p[E|align][#|S]' + + 'a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]' + + 'br[A|clear][]' + + 'span[E][#|S]' + + 'bdo[A|C|B][#|S]' + + 'applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]' + + 'h1[E|align][#|S]' + + 'img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]' + + 'map[B|C|A|name][X|form|Q|area]' + + 'h2[E|align][#|S]' + + 'iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]' + + 'h3[E|align][#|S]' + + 'tt[E][#|S]' + + 'i[E][#|S]' + + 'b[E][#|S]' + + 'u[E][#|S]' + + 's[E][#|S]' + + 'strike[E][#|S]' + + 'big[E][#|S]' + + 'small[E][#|S]' + + 'font[A|B|size|color|face][#|S]' + + 'basefont[id|size|color|face][]' + + 'em[E][#|S]' + + 'strong[E][#|S]' + + 'dfn[E][#|S]' + + 'code[E][#|S]' + + 'q[E|cite][#|S]' + + 'samp[E][#|S]' + + 'kbd[E][#|S]' + + 'var[E][#|S]' + + 'cite[E][#|S]' + + 'abbr[E][#|S]' + + 'acronym[E][#|S]' + + 'sub[E][#|S]' + + 'sup[E][#|S]' + + 'input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]' + + 'select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]' + + 'optgroup[E|disabled|label][option]' + + 'option[E|selected|disabled|label|value][]' + + 'textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]' + + 'label[E|for|accesskey|onfocus|onblur][#|S]' + + 'button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]' + + 'h4[E|align][#|S]' + + 'ins[E|cite|datetime][#|Y]' + + 'h5[E|align][#|S]' + + 'del[E|cite|datetime][#|Y]' + + 'h6[E|align][#|S]' + + 'div[E|align][#|Y]' + + 'ul[E|type|compact][li]' + + 'li[E|type|value][#|Y]' + + 'ol[E|type|compact|start][li]' + + 'dl[E|compact][dt|dd]' + + 'dt[E][#|S]' + + 'dd[E][#|Y]' + + 'menu[E|compact][li]' + + 'dir[E|compact][li]' + + 'pre[E|width|xml:space][#|ZA]' + + 'hr[E|align|noshade|size|width][]' + + 'blockquote[E|cite][#|Y]' + + 'address[E][#|S|p]' + + 'center[E][#|Y]' + + 'noframes[E][#|Y]' + + 'isindex[A|B|prompt][]' + + 'fieldset[E][#|legend|Y]' + + 'legend[E|accesskey|align][#|S]' + + 'table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]' + + 'caption[E|align][#|S]' + + 'col[ZG][]' + + 'colgroup[ZG][col]' + + 'thead[ZF][tr]' + + 'tr[ZF|bgcolor][th|td]' + + 'th[E|ZE][#|Y]' + + 'form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]' + + 'noscript[E][#|Y]' + + 'td[E|ZE][#|Y]' + + 'tfoot[ZF][tr]' + + 'tbody[ZF][tr]' + + 'area[E|D|shape|coords|href|nohref|alt|target][]' + + 'base[id|href|target][]' + + 'body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]' + ); + + boolAttrMap = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,preload,autoplay,loop,controls'); + shortEndedElementsMap = makeMap('area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,source'); + nonEmptyElementsMap = tinymce.extend(makeMap('td,th,iframe,video,object'), shortEndedElementsMap); + whiteSpaceElementsMap = makeMap('pre,script,style'); + selfClosingElementsMap = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); + + /** + * Schema validator class. + * + * @class tinymce.html.Schema + * @example + * if (tinymce.activeEditor.schema.isValidChild('p', 'span')) + * alert('span is valid child of p.'); + * + * if (tinymce.activeEditor.schema.getElementRule('p')) + * alert('P is a valid element.'); + * + * @class tinymce.html.Schema + * @version 3.4 + */ + + /** + * Constructs a new Schema instance. + * + * @constructor + * @method Schema + * @param {Object} settings Name/value settings object. + */ + tinymce.html.Schema = function(settings) { + var self = this, elements = {}, children = {}, patternElements = [], validStyles; + + settings = settings || {}; + + // Allow all elements and attributes if verify_html is set to false + if (settings.verify_html === false) + settings.valid_elements = '*[*]'; + + // Build styles list + if (settings.valid_styles) { + validStyles = {}; + + // Convert styles into a rule list + each(settings.valid_styles, function(value, key) { + validStyles[key] = tinymce.explode(value); + }); + } + + // Converts a wildcard expression string to a regexp for example *a will become /.*a/. + function patternToRegExp(str) { + return new RegExp('^' + str.replace(/([?+*])/g, '.$1') + '$'); + }; + + // Parses the specified valid_elements string and adds to the current rules + // This function is a bit hard to read since it's heavily optimized for speed + function addValidElements(valid_elements) { + var ei, el, ai, al, yl, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder, + prefix, outputName, globalAttributes, globalAttributesOrder, transElement, key, childKey, value, + elementRuleRegExp = /^([#+-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/, + attrRuleRegExp = /^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/, + hasPatternsRegExp = /[*?+]/; + + if (valid_elements) { + // Split valid elements into an array with rules + valid_elements = split(valid_elements); + + if (elements['@']) { + globalAttributes = elements['@'].attributes; + globalAttributesOrder = elements['@'].attributesOrder; + } + + // Loop all rules + for (ei = 0, el = valid_elements.length; ei < el; ei++) { + // Parse element rule + matches = elementRuleRegExp.exec(valid_elements[ei]); + if (matches) { + // Setup local names for matches + prefix = matches[1]; + elementName = matches[2]; + outputName = matches[3]; + attrData = matches[4]; + + // Create new attributes and attributesOrder + attributes = {}; + attributesOrder = []; + + // Create the new element + element = { + attributes : attributes, + attributesOrder : attributesOrder + }; + + // Padd empty elements prefix + if (prefix === '#') + element.paddEmpty = true; + + // Remove empty elements prefix + if (prefix === '-') + element.removeEmpty = true; + + // Copy attributes from global rule into current rule + if (globalAttributes) { + for (key in globalAttributes) + attributes[key] = globalAttributes[key]; + + attributesOrder.push.apply(attributesOrder, globalAttributesOrder); + } + + // Attributes defined + if (attrData) { + attrData = split(attrData, '|'); + for (ai = 0, al = attrData.length; ai < al; ai++) { + matches = attrRuleRegExp.exec(attrData[ai]); + if (matches) { + attr = {}; + attrType = matches[1]; + attrName = matches[2].replace(/::/g, ':'); + prefix = matches[3]; + value = matches[4]; + + // Required + if (attrType === '!') { + element.attributesRequired = element.attributesRequired || []; + element.attributesRequired.push(attrName); + attr.required = true; + } + + // Denied from global + if (attrType === '-') { + delete attributes[attrName]; + attributesOrder.splice(tinymce.inArray(attributesOrder, attrName), 1); + continue; + } + + // Default value + if (prefix) { + // Default value + if (prefix === '=') { + element.attributesDefault = element.attributesDefault || []; + element.attributesDefault.push({name: attrName, value: value}); + attr.defaultValue = value; + } + + // Forced value + if (prefix === ':') { + element.attributesForced = element.attributesForced || []; + element.attributesForced.push({name: attrName, value: value}); + attr.forcedValue = value; + } + + // Required values + if (prefix === '<') + attr.validValues = makeMap(value, '?'); + } + + // Check for attribute patterns + if (hasPatternsRegExp.test(attrName)) { + element.attributePatterns = element.attributePatterns || []; + attr.pattern = patternToRegExp(attrName); + element.attributePatterns.push(attr); + } else { + // Add attribute to order list if it doesn't already exist + if (!attributes[attrName]) + attributesOrder.push(attrName); + + attributes[attrName] = attr; + } + } + } + } + + // Global rule, store away these for later usage + if (!globalAttributes && elementName == '@') { + globalAttributes = attributes; + globalAttributesOrder = attributesOrder; + } + + // Handle substitute elements such as b/strong + if (outputName) { + element.outputName = elementName; + elements[outputName] = element; + } + + // Add pattern or exact element + if (hasPatternsRegExp.test(elementName)) { + element.pattern = patternToRegExp(elementName); + patternElements.push(element); + } else + elements[elementName] = element; + } + } + } + }; + + function setValidElements(valid_elements) { + elements = {}; + patternElements = []; + + addValidElements(valid_elements); + + each(transitional, function(element, name) { + children[name] = element.children; + }); + }; + + // Adds custom non HTML elements to the schema + function addCustomElements(custom_elements) { + var customElementRegExp = /^(~)?(.+)$/; + + if (custom_elements) { + each(split(custom_elements), function(rule) { + var matches = customElementRegExp.exec(rule), + cloneName = matches[1] === '~' ? 'span' : 'div', + name = matches[2]; + + children[name] = children[cloneName]; + + // Add custom elements at span/div positions + each(children, function(element, child) { + if (element[cloneName]) + element[name] = element[cloneName]; + }); + }); + } + }; + + // Adds valid children to the schema object + function addValidChildren(valid_children) { + var childRuleRegExp = /^([+\-]?)(\w+)\[([^\]]+)\]$/; + + if (valid_children) { + each(split(valid_children), function(rule) { + var matches = childRuleRegExp.exec(rule), parent, prefix; + + if (matches) { + prefix = matches[1]; + + // Add/remove items from default + if (prefix) + parent = children[matches[2]]; + else + parent = children[matches[2]] = {'#comment' : {}}; + + parent = children[matches[2]]; + + each(split(matches[3], '|'), function(child) { + if (prefix === '-') + delete parent[child]; + else + parent[child] = {}; + }); + } + }); + } + } + + if (!settings.valid_elements) { + // No valid elements defined then clone the elements from the transitional spec + each(transitional, function(element, name) { + elements[name] = { + attributes : element.attributes, + attributesOrder : element.attributesOrder + }; + + children[name] = element.children; + }); + + // Switch these + each(split('strong/b,em/i'), function(item) { + item = split(item, '/'); + elements[item[1]].outputName = item[0]; + }); + + // Add default alt attribute for images + elements.img.attributesDefault = [{name: 'alt', value: ''}]; + + // Remove these if they are empty by default + each(split('ol,ul,li,sub,sup,blockquote,tr,div,span,font,a,table,tbody'), function(name) { + elements[name].removeEmpty = true; + }); + + // Padd these by default + each(split('p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption'), function(name) { + elements[name].paddEmpty = true; + }); + } else + setValidElements(settings.valid_elements); + + addCustomElements(settings.custom_elements); + addValidChildren(settings.valid_children); + addValidElements(settings.extended_valid_elements); + + // Todo: Remove this when we fix list handling to be valid + addValidChildren('+ol[ul|ol],+ul[ul|ol]'); + + // Delete invalid elements + if (settings.invalid_elements) { + tinymce.each(tinymce.explode(settings.invalid_elements), function(item) { + if (elements[item]) + delete elements[item]; + }); + } + + /** + * Name/value map object with valid parents and children to those parents. + * + * @example + * children = { + * div:{p:{}, h1:{}} + * }; + * @field children + * @type {Object} + */ + self.children = children; + + /** + * Name/value map object with valid styles for each element. + * + * @field styles + * @type {Object} + */ + self.styles = validStyles; + + /** + * Returns a map with boolean attributes. + * + * @method getBoolAttrs + * @return {Object} Name/value lookup map for boolean attributes. + */ + self.getBoolAttrs = function() { + return boolAttrMap; + }; + + /** + * Returns a map with block elements. + * + * @method getBoolAttrs + * @return {Object} Name/value lookup map for block elements. + */ + self.getBlockElements = function() { + return blockElementsMap; + }; + + /** + * Returns a map with short ended elements such as BR or IMG. + * + * @method getShortEndedElements + * @return {Object} Name/value lookup map for short ended elements. + */ + self.getShortEndedElements = function() { + return shortEndedElementsMap; + }; + + /** + * Returns a map with self closing tags such as
  • . + * + * @method getSelfClosingElements + * @return {Object} Name/value lookup map for self closing tags elements. + */ + self.getSelfClosingElements = function() { + return selfClosingElementsMap; + }; + + /** + * Returns a map with elements that should be treated as contents regardless if it has text + * content in them or not such as TD, VIDEO or IMG. + * + * @method getNonEmptyElements + * @return {Object} Name/value lookup map for non empty elements. + */ + self.getNonEmptyElements = function() { + return nonEmptyElementsMap; + }; + + /** + * Returns a map with elements where white space is to be preserved like PRE or SCRIPT. + * + * @method getWhiteSpaceElements + * @return {Object} Name/value lookup map for white space elements. + */ + self.getWhiteSpaceElements = function() { + return whiteSpaceElementsMap; + }; + + /** + * Returns true/false if the specified element and it's child is valid or not + * according to the schema. + * + * @method isValidChild + * @param {String} name Element name to check for. + * @param {String} child Element child to verify. + * @return {Boolean} True/false if the element is a valid child of the specified parent. + */ + self.isValidChild = function(name, child) { + var parent = children[name]; + + return !!(parent && parent[child]); + }; + + /** + * Returns true/false if the specified element is valid or not + * according to the schema. + * + * @method getElementRule + * @param {String} name Element name to check for. + * @return {Object} Element object or undefined if the element isn't valid. + */ + self.getElementRule = function(name) { + var element = elements[name], i; + + // Exact match found + if (element) + return element; + + // No exact match then try the patterns + i = patternElements.length; + while (i--) { + element = patternElements[i]; + + if (element.pattern.test(name)) + return element; + } + }; + + /** + * Parses a valid elements string and adds it to the schema. The valid elements format is for example "element[attr=default|otherattr]". + * Existing rules will be replaced with the ones specified, so this extends the schema. + * + * @method addValidElements + * @param {String} valid_elements String in the valid elements format to be parsed. + */ + self.addValidElements = addValidElements; + + /** + * Parses a valid elements string and sets it to the schema. The valid elements format is for example "element[attr=default|otherattr]". + * Existing rules will be replaced with the ones specified, so this extends the schema. + * + * @method setValidElements + * @param {String} valid_elements String in the valid elements format to be parsed. + */ + self.setValidElements = setValidElements; + + /** + * Adds custom non HTML elements to the schema. + * + * @method addCustomElements + * @param {String} custom_elements Comma separated list of custom elements to add. + */ + self.addCustomElements = addCustomElements; + + /** + * Parses a valid children string and adds them to the schema structure. The valid children format is for example: "element[child1|child2]". + * + * @method addValidChildren + * @param {String} valid_children Valid children elements string to parse + */ + self.addValidChildren = addValidChildren; + }; + + // Expose boolMap and blockElementMap as static properties for usage in DOMUtils + tinymce.html.Schema.boolAttrMap = boolAttrMap; + tinymce.html.Schema.blockElementsMap = blockElementsMap; +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/html/Serializer.js b/include/javascript/tiny_mce/classes/html/Serializer.js new file mode 100644 index 00000000..ac4fee74 --- /dev/null +++ b/include/javascript/tiny_mce/classes/html/Serializer.js @@ -0,0 +1,152 @@ +/** + * Serializer.js + * + * Copyright 2010, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + /** + * This class is used to serialize down the DOM tree into a string using a Writer instance. + * + * + * @example + * new tinymce.html.Serializer().serialize(new tinymce.html.DomParser().parse('

    text

    ')); + * @class tinymce.html.Serializer + * @version 3.4 + */ + + /** + * Constructs a new Serializer instance. + * + * @constructor + * @method Serializer + * @param {Object} settings Name/value settings object. + * @param {tinymce.html.Schema} schema Schema instance to use. + */ + tinymce.html.Serializer = function(settings, schema) { + var self = this, writer = new tinymce.html.Writer(settings); + + settings = settings || {}; + settings.validate = "validate" in settings ? settings.validate : true; + + self.schema = schema = schema || new tinymce.html.Schema(); + self.writer = writer; + + /** + * Serializes the specified node into a string. + * + * @example + * new tinymce.html.Serializer().serialize(new tinymce.html.DomParser().parse('

    text

    ')); + * @method serialize + * @param {tinymce.html.Node} node Node instance to serialize. + * @return {String} String with HTML based on DOM tree. + */ + self.serialize = function(node) { + var handlers, validate; + + validate = settings.validate; + + handlers = { + // #text + 3: function(node, raw) { + writer.text(node.value, node.raw); + }, + + // #comment + 8: function(node) { + writer.comment(node.value); + }, + + // Processing instruction + 7: function(node) { + writer.pi(node.name, node.value); + }, + + // Doctype + 10: function(node) { + writer.doctype(node.value); + }, + + // CDATA + 4: function(node) { + writer.cdata(node.value); + }, + + // Document fragment + 11: function(node) { + if ((node = node.firstChild)) { + do { + walk(node); + } while (node = node.next); + } + } + }; + + writer.reset(); + + function walk(node) { + var handler = handlers[node.type], name, isEmpty, attrs, attrName, attrValue, sortedAttrs, i, l, elementRule; + + if (!handler) { + name = node.name; + isEmpty = node.shortEnded; + attrs = node.attributes; + + // Sort attributes + if (validate && attrs && attrs.length > 1) { + sortedAttrs = []; + sortedAttrs.map = {}; + + elementRule = schema.getElementRule(node.name); + for (i = 0, l = elementRule.attributesOrder.length; i < l; i++) { + attrName = elementRule.attributesOrder[i]; + + if (attrName in attrs.map) { + attrValue = attrs.map[attrName]; + sortedAttrs.map[attrName] = attrValue; + sortedAttrs.push({name: attrName, value: attrValue}); + } + } + + for (i = 0, l = attrs.length; i < l; i++) { + attrName = attrs[i].name; + + if (!(attrName in sortedAttrs.map)) { + attrValue = attrs.map[attrName]; + sortedAttrs.map[attrName] = attrValue; + sortedAttrs.push({name: attrName, value: attrValue}); + } + } + + attrs = sortedAttrs; + } + + writer.start(node.name, attrs, isEmpty); + + if (!isEmpty) { + if ((node = node.firstChild)) { + do { + walk(node); + } while (node = node.next); + } + + writer.end(name); + } + } else + handler(node); + } + + // Serialize element and treat all non elements as fragments + if (node.type == 1 && !settings.inner) + walk(node); + else + handlers[11](node); + + return writer.getContent(); + }; + } +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/html/Styles.js b/include/javascript/tiny_mce/classes/html/Styles.js new file mode 100644 index 00000000..c7e7eba9 --- /dev/null +++ b/include/javascript/tiny_mce/classes/html/Styles.js @@ -0,0 +1,279 @@ +/** + * Styles.js + * + * Copyright 2010, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +/** + * This class is used to parse CSS styles it also compresses styles to reduce the output size. + * + * @example + * var Styles = new tinymce.html.Styles({ + * url_converter: function(url) { + * return url; + * } + * }); + * + * styles = Styles.parse('border: 1px solid red'); + * styles.color = 'red'; + * + * console.log(new tinymce.html.StyleSerializer().serialize(styles)); + * + * @class tinymce.html.Styles + * @version 3.4 + */ +tinymce.html.Styles = function(settings, schema) { + var rgbRegExp = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi, + urlOrStrRegExp = /(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi, + styleRegExp = /\s*([^:]+):\s*([^;]+);?/g, + trimRightRegExp = /\s+$/, + urlColorRegExp = /rgb/, + undef, i, encodingLookup = {}, encodingItems; + + settings = settings || {}; + + encodingItems = '\\" \\\' \\; \\: ; : _'.split(' '); + for (i = 0; i < encodingItems.length; i++) { + encodingLookup[encodingItems[i]] = '_' + i; + encodingLookup['_' + i] = encodingItems[i]; + } + + function toHex(match, r, g, b) { + function hex(val) { + val = parseInt(val).toString(16); + + return val.length > 1 ? val : '0' + val; // 0 -> 00 + }; + + return '#' + hex(r) + hex(g) + hex(b); + }; + + return { + /** + * Parses the specified RGB color value and returns a hex version of that color. + * + * @method toHex + * @param {String} color RGB string value like rgb(1,2,3) + * @return {String} Hex version of that RGB value like #FF00FF. + */ + toHex : function(color) { + return color.replace(rgbRegExp, toHex); + }, + + /** + * Parses the specified style value into an object collection. This parser will also + * merge and remove any redundant items that browsers might have added. It will also convert non hex + * colors to hex values. Urls inside the styles will also be converted to absolute/relative based on settings. + * + * @method parse + * @param {String} css Style value to parse for example: border:1px solid red;. + * @return {Object} Object representation of that style like {border : '1px solid red'} + */ + parse : function(css) { + var styles = {}, matches, name, value, isEncoded, urlConverter = settings.url_converter, urlConverterScope = settings.url_converter_scope || this; + + function compress(prefix, suffix) { + var top, right, bottom, left; + + // Get values and check it it needs compressing + top = styles[prefix + '-top' + suffix]; + if (!top) + return; + + right = styles[prefix + '-right' + suffix]; + if (top != right) + return; + + bottom = styles[prefix + '-bottom' + suffix]; + if (right != bottom) + return; + + left = styles[prefix + '-left' + suffix]; + if (bottom != left) + return; + + // Compress + styles[prefix + suffix] = left; + delete styles[prefix + '-top' + suffix]; + delete styles[prefix + '-right' + suffix]; + delete styles[prefix + '-bottom' + suffix]; + delete styles[prefix + '-left' + suffix]; + }; + + /** + * Checks if the specific style can be compressed in other words if all border-width are equal. + */ + function canCompress(key) { + var value = styles[key], i; + + if (!value || value.indexOf(' ') < 0) + return; + + value = value.split(' '); + i = value.length; + while (i--) { + if (value[i] !== value[0]) + return false; + } + + styles[key] = value[0]; + + return true; + }; + + /** + * Compresses multiple styles into one style. + */ + function compress2(target, a, b, c) { + if (!canCompress(a)) + return; + + if (!canCompress(b)) + return; + + if (!canCompress(c)) + return; + + // Compress + styles[target] = styles[a] + ' ' + styles[b] + ' ' + styles[c]; + delete styles[a]; + delete styles[b]; + delete styles[c]; + }; + + // Encodes the specified string by replacing all \" \' ; : with _ + function encode(str) { + isEncoded = true; + + return encodingLookup[str]; + }; + + // Decodes the specified string by replacing all _ with it's original value \" \' etc + // It will also decode the \" \' if keep_slashes is set to fale or omitted + function decode(str, keep_slashes) { + if (isEncoded) { + str = str.replace(/_[0-9]/g, function(str) { + return encodingLookup[str]; + }); + } + + if (!keep_slashes) + str = str.replace(/\\([\'\";:])/g, "$1"); + + return str; + } + + if (css) { + // Encode \" \' % and ; and : inside strings so they don't interfere with the style parsing + css = css.replace(/\\[\"\';:_]/g, encode).replace(/\"[^\"]+\"|\'[^\']+\'/g, function(str) { + return str.replace(/[;:]/g, encode); + }); + + // Parse styles + while (matches = styleRegExp.exec(css)) { + name = matches[1].replace(trimRightRegExp, '').toLowerCase(); + value = matches[2].replace(trimRightRegExp, ''); + + if (name && value.length > 0) { + // Opera will produce 700 instead of bold in their style values + if (name === 'font-weight' && value === '700') + value = 'bold'; + else if (name === 'color' || name === 'background-color') // Lowercase colors like RED + value = value.toLowerCase(); + + // Convert RGB colors to HEX + value = value.replace(rgbRegExp, toHex); + + // Convert URLs and force them into url('value') format + value = value.replace(urlOrStrRegExp, function(match, url, url2, url3, str, str2) { + str = str || str2; + + if (str) { + str = decode(str); + + // Force strings into single quote format + return "'" + str.replace(/\'/g, "\\'") + "'"; + } + + url = decode(url || url2 || url3); + + // Convert the URL to relative/absolute depending on config + if (urlConverter) + url = urlConverter.call(urlConverterScope, url, 'style'); + + // Output new URL format + return "url('" + url.replace(/\'/g, "\\'") + "')"; + }); + + styles[name] = isEncoded ? decode(value, true) : value; + } + + styleRegExp.lastIndex = matches.index + matches[0].length; + } + + // Compress the styles to reduce it's size for example IE will expand styles + compress("border", ""); + compress("border", "-width"); + compress("border", "-color"); + compress("border", "-style"); + compress("padding", ""); + compress("margin", ""); + compress2('border', 'border-width', 'border-style', 'border-color'); + + // Remove pointless border, IE produces these + if (styles.border === 'medium none') + delete styles.border; + } + + return styles; + }, + + /** + * Serializes the specified style object into a string. + * + * @method serialize + * @param {Object} styles Object to serialize as string for example: {border : '1px solid red'} + * @param {String} element_name Optional element name, if specified only the styles that matches the schema will be serialized. + * @return {String} String representation of the style object for example: border: 1px solid red. + */ + serialize : function(styles, element_name) { + var css = '', name, value; + + function serializeStyles(name) { + var styleList, i, l, name, value; + + styleList = schema.styles[name]; + if (styleList) { + for (i = 0, l = styleList.length; i < l; i++) { + name = styleList[i]; + value = styles[name]; + + if (value !== undef && value.length > 0) + css += (css.length > 0 ? ' ' : '') + name + ': ' + value + ';'; + } + } + }; + + // Serialize styles according to schema + if (element_name && schema && schema.styles) { + // Serialize global styles and element specific styles + serializeStyles('*'); + serializeStyles(name); + } else { + // Output the styles in the order they are inside the object + for (name in styles) { + value = styles[name]; + + if (value !== undef && value.length > 0) + css += (css.length > 0 ? ' ' : '') + name + ': ' + value + ';'; + } + } + + return css; + } + }; +}; diff --git a/include/javascript/tiny_mce/classes/html/Writer.js b/include/javascript/tiny_mce/classes/html/Writer.js new file mode 100644 index 00000000..2abfac64 --- /dev/null +++ b/include/javascript/tiny_mce/classes/html/Writer.js @@ -0,0 +1,186 @@ +/** + * Writer.js + * + * Copyright 2010, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +/** + * This class is used to write HTML tags out it can be used with the Serializer or the SaxParser. + * + * @class tinymce.html.Writer + * @example + * var writer = new tinymce.html.Writer({indent : true}); + * var parser = new tinymce.html.SaxParser(writer).parse('


    '); + * console.log(writer.getContent()); + * + * @class tinymce.html.Writer + * @version 3.4 + */ + +/** + * Constructs a new Writer instance. + * + * @constructor + * @method Writer + * @param {Object} settings Name/value settings object. + */ +tinymce.html.Writer = function(settings) { + var html = [], indent, indentBefore, indentAfter, encode, htmlOutput; + + settings = settings || {}; + indent = settings.indent; + indentBefore = tinymce.makeMap(settings.indent_before || ''); + indentAfter = tinymce.makeMap(settings.indent_after || ''); + encode = tinymce.html.Entities.getEncodeFunc(settings.entity_encoding || 'raw', settings.entities); + htmlOutput = settings.element_format == "html"; + + return { + /** + * Writes the a start element such as

    . + * + * @method start + * @param {String} name Name of the element. + * @param {Array} attrs Optional attribute array or undefined if it hasn't any. + * @param {Boolean} empty Optional empty state if the tag should end like
    . + */ + start: function(name, attrs, empty) { + var i, l, attr, value; + + if (indent && indentBefore[name] && html.length > 0) { + value = html[html.length - 1]; + + if (value.length > 0 && value !== '\n') + html.push('\n'); + } + + html.push('<', name); + + if (attrs) { + for (i = 0, l = attrs.length; i < l; i++) { + attr = attrs[i]; + html.push(' ', attr.name, '="', encode(attr.value, true), '"'); + } + } + + if (!empty || htmlOutput) + html[html.length] = '>'; + else + html[html.length] = ' />'; + + if (empty && indent && indentAfter[name] && html.length > 0) { + value = html[html.length - 1]; + + if (value.length > 0 && value !== '\n') + html.push('\n'); + } + }, + + /** + * Writes the a end element such as

    . + * + * @method end + * @param {String} name Name of the element. + */ + end: function(name) { + var value; + + /*if (indent && indentBefore[name] && html.length > 0) { + value = html[html.length - 1]; + + if (value.length > 0 && value !== '\n') + html.push('\n'); + }*/ + + html.push(''); + + if (indent && indentAfter[name] && html.length > 0) { + value = html[html.length - 1]; + + if (value.length > 0 && value !== '\n') + html.push('\n'); + } + }, + + /** + * Writes a text node. + * + * @method text + * @param {String} text String to write out. + * @param {Boolean} raw Optional raw state if true the contents wont get encoded. + */ + text: function(text, raw) { + if (text.length > 0) + html[html.length] = raw ? text : encode(text); + }, + + /** + * Writes a cdata node such as . + * + * @method cdata + * @param {String} text String to write out inside the cdata. + */ + cdata: function(text) { + html.push(''); + }, + + /** + * Writes a comment node such as . + * + * @method cdata + * @param {String} text String to write out inside the comment. + */ + comment: function(text) { + html.push(''); + }, + + /** + * Writes a PI node such as . + * + * @method pi + * @param {String} name Name of the pi. + * @param {String} text String to write out inside the pi. + */ + pi: function(name, text) { + if (text) + html.push(''); + else + html.push(''); + + if (indent) + html.push('\n'); + }, + + /** + * Writes a doctype node such as . + * + * @method doctype + * @param {String} text String to write out inside the doctype. + */ + doctype: function(text) { + html.push('', indent ? '\n' : ''); + }, + + /** + * Resets the internal buffer if one wants to reuse the writer. + * + * @method reset + */ + reset: function() { + html.length = 0; + }, + + /** + * Returns the contents that got serialized. + * + * @method getContent + * @return {String} HTML contents that got written down. + */ + getContent: function() { + return html.join('').replace(/\n$/, ''); + } + }; +}; diff --git a/include/javascript/tiny_mce/classes/tinymce.js b/include/javascript/tiny_mce/classes/tinymce.js new file mode 100644 index 00000000..977b7059 --- /dev/null +++ b/include/javascript/tiny_mce/classes/tinymce.js @@ -0,0 +1,833 @@ +/** + * tinymce.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(win) { + var whiteSpaceRe = /^\s*|\s*$/g, + undefined, isRegExpBroken = 'B'.replace(/A(.)|B/, '$1') === '$1'; + + /** + * Core namespace with core functionality for the TinyMCE API all sub classes will be added to this namespace/object. + * + * @static + * @class tinymce + * @example + * // Using each method + * tinymce.each([1, 2, 3], function(v, i) { + * console.log(i + '=' + v); + * }); + * + * // Checking for a specific browser + * if (tinymce.isIE) + * console.log("IE"); + */ + var tinymce = { + /** + * Major version of TinyMCE build. + * + * @property majorVersion + * @type String + */ + majorVersion : '@@tinymce_major_version@@', + + /** + * Major version of TinyMCE build. + * + * @property minorVersion + * @type String + */ + minorVersion : '@@tinymce_minor_version@@', + + /** + * Release date of TinyMCE build. + * + * @property releaseDate + * @type String + */ + releaseDate : '@@tinymce_release_date@@', + + /** + * Initializes the TinyMCE global namespace this will setup browser detection and figure out where TinyMCE is running from. + */ + _init : function() { + var t = this, d = document, na = navigator, ua = na.userAgent, i, nl, n, base, p, v; + + /** + * Constant that is true if the browser is Opera. + * + * @property isOpera + * @type Boolean + * @final + */ + t.isOpera = win.opera && opera.buildNumber; + + /** + * Constant that is true if the browser is WebKit (Safari/Chrome). + * + * @property isWebKit + * @type Boolean + * @final + */ + t.isWebKit = /WebKit/.test(ua); + + /** + * Constant that is true if the browser is IE. + * + * @property isIE + * @type Boolean + * @final + */ + t.isIE = !t.isWebKit && !t.isOpera && (/MSIE/gi).test(ua) && (/Explorer/gi).test(na.appName); + + /** + * Constant that is true if the browser is IE 6 or older. + * + * @property isIE6 + * @type Boolean + * @final + */ + t.isIE6 = t.isIE && /MSIE [56]/.test(ua); + + /** + * Constant that is true if the browser is Gecko. + * + * @property isGecko + * @type Boolean + * @final + */ + t.isGecko = !t.isWebKit && /Gecko/.test(ua); + + /** + * Constant that is true if the os is Mac OS. + * + * @property isMac + * @type Boolean + * @final + */ + t.isMac = ua.indexOf('Mac') != -1; + + /** + * Constant that is true if the runtime is Adobe Air. + * + * @property isAir + * @type Boolean + * @final + */ + t.isAir = /adobeair/i.test(ua); + + /** + * Constant that tells if the current browser is an iPhone or iPad. + * + * @property isIDevice + * @type Boolean + * @final + */ + t.isIDevice = /(iPad|iPhone)/.test(ua); + + // TinyMCE .NET webcontrol might be setting the values for TinyMCE + if (win.tinyMCEPreInit) { + t.suffix = tinyMCEPreInit.suffix; + t.baseURL = tinyMCEPreInit.base; + t.query = tinyMCEPreInit.query; + return; + } + + // Get suffix and base + t.suffix = ''; + + // If base element found, add that infront of baseURL + nl = d.getElementsByTagName('base'); + for (i=0; i 3;}); + */ + grep : function(a, f) { + var o = []; + + tinymce.each(a, function(v) { + if (!f || f(v)) + o.push(v); + }); + + return o; + }, + + /** + * Returns the index of a value in an array, this method will return -1 if the item wasn't found. + * + * @method inArray + * @param {Array} a Array/Object to search for value in. + * @param {Object} v Value to check for inside the array. + * @return {Number/String} Index of item inside the array inside an object. Or -1 if it wasn't found. + * @example + * // Get index of value in array this will alert 1 since 2 is at that index + * alert(tinymce.inArray([1,2,3], 2)); + */ + inArray : function(a, v) { + var i, l; + + if (a) { + for (i = 0, l = a.length; i < l; i++) { + if (a[i] === v) + return i; + } + } + + return -1; + }, + + /** + * Extends an object with the specified other object(s). + * + * @method extend + * @param {Object} o Object to extend with new items. + * @param {Object} e..n Object(s) to extend the specified object with. + * @return {Object} o New extended object, same reference as the input object. + * @example + * // Extends obj1 with two new fields + * var obj = tinymce.extend(obj1, { + * somefield1 : 'a', + * somefield2 : 'a' + * }); + * + * // Extends obj with obj2 and obj3 + * tinymce.extend(obj, obj2, obj3); + */ + extend : function(o, e) { + var i, l, a = arguments; + + for (i = 1, l = a.length; i < l; i++) { + e = a[i]; + + tinymce.each(e, function(v, n) { + if (v !== undefined) + o[n] = v; + }); + } + + return o; + }, + + // #endif + + /** + * Removes whitespace from the beginning and end of a string. + * + * @method trim + * @param {String} s String to remove whitespace from. + * @return {String} New string with removed whitespace. + */ + trim : function(s) { + return (s ? '' + s : '').replace(whiteSpaceRe, ''); + }, + + /** + * Creates a class, subclass or static singleton. + * More details on this method can be found in the Wiki. + * + * @method create + * @param {String} s Class name, inheritage and prefix. + * @param {Object} p Collection of methods to add to the class. + * @param {Object} root Optional root object defaults to the global window object. + * @example + * // Creates a basic class + * tinymce.create('tinymce.somepackage.SomeClass', { + * SomeClass : function() { + * // Class constructor + * }, + * + * method : function() { + * // Some method + * } + * }); + * + * // Creates a basic subclass class + * tinymce.create('tinymce.somepackage.SomeSubClass:tinymce.somepackage.SomeClass', { + * SomeSubClass: function() { + * // Class constructor + * this.parent(); // Call parent constructor + * }, + * + * method : function() { + * // Some method + * this.parent(); // Call parent method + * }, + * + * 'static' : { + * staticMethod : function() { + * // Static method + * } + * } + * }); + * + * // Creates a singleton/static class + * tinymce.create('static tinymce.somepackage.SomeSingletonClass', { + * method : function() { + * // Some method + * } + * }); + */ + create : function(s, p, root) { + var t = this, sp, ns, cn, scn, c, de = 0; + + // Parse : : + s = /^((static) )?([\w.]+)(:([\w.]+))?/.exec(s); + cn = s[3].match(/(^|\.)(\w+)$/i)[2]; // Class name + + // Create namespace for new class + ns = t.createNS(s[3].replace(/\.\w+$/, ''), root); + + // Class already exists + if (ns[cn]) + return; + + // Make pure static class + if (s[2] == 'static') { + ns[cn] = p; + + if (this.onCreate) + this.onCreate(s[2], s[3], ns[cn]); + + return; + } + + // Create default constructor + if (!p[cn]) { + p[cn] = function() {}; + de = 1; + } + + // Add constructor and methods + ns[cn] = p[cn]; + t.extend(ns[cn].prototype, p); + + // Extend + if (s[5]) { + sp = t.resolve(s[5]).prototype; + scn = s[5].match(/\.(\w+)$/i)[1]; // Class name + + // Extend constructor + c = ns[cn]; + if (de) { + // Add passthrough constructor + ns[cn] = function() { + return sp[scn].apply(this, arguments); + }; + } else { + // Add inherit constructor + ns[cn] = function() { + this.parent = sp[scn]; + return c.apply(this, arguments); + }; + } + ns[cn].prototype[cn] = ns[cn]; + + // Add super methods + t.each(sp, function(f, n) { + ns[cn].prototype[n] = sp[n]; + }); + + // Add overridden methods + t.each(p, function(f, n) { + // Extend methods if needed + if (sp[n]) { + ns[cn].prototype[n] = function() { + this.parent = sp[n]; + return f.apply(this, arguments); + }; + } else { + if (n != cn) + ns[cn].prototype[n] = f; + } + }); + } + + // Add static methods + t.each(p['static'], function(f, n) { + ns[cn][n] = f; + }); + + if (this.onCreate) + this.onCreate(s[2], s[3], ns[cn].prototype); + }, + + /** + * Executed the specified function for each item in a object tree. + * + * @method walk + * @param {Object} o Object tree to walk though. + * @param {function} f Function to call for each item. + * @param {String} n Optional name of collection inside the objects to walk for example childNodes. + * @param {String} s Optional scope to execute the function in. + */ + walk : function(o, f, n, s) { + s = s || this; + + if (o) { + if (n) + o = o[n]; + + tinymce.each(o, function(o, i) { + if (f.call(s, o, i, n) === false) + return false; + + tinymce.walk(o, f, n, s); + }); + } + }, + + /** + * Creates a namespace on a specific object. + * + * @method createNS + * @param {String} n Namespace to create for example a.b.c.d. + * @param {Object} o Optional object to add namespace to, defaults to window. + * @return {Object} New namespace object the last item in path. + * @example + * // Create some namespace + * tinymce.createNS('tinymce.somepackage.subpackage'); + * + * // Add a singleton + * var tinymce.somepackage.subpackage.SomeSingleton = { + * method : function() { + * // Some method + * } + * }; + */ + createNS : function(n, o) { + var i, v; + + o = o || win; + + n = n.split('.'); + for (i=0; i'; + + if (s.image) + h += '' + DOM.encode(s.title) + '' + l; + else + h += '' + (l ? '' + l + '' : ''); + + h += ''; + h += ''; + return h; + }, + + /** + * Post render handler. This function will be called after the UI has been + * rendered so that events can be added. + * + * @method postRender + */ + postRender : function() { + var t = this, s = t.settings; + + tinymce.dom.Event.add(t.id, 'click', function(e) { + if (!t.isDisabled()) + return s.onclick.call(s.scope, e); + }); + } + }); +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/ui/ColorSplitButton.js b/include/javascript/tiny_mce/classes/ui/ColorSplitButton.js new file mode 100644 index 00000000..83507cd2 --- /dev/null +++ b/include/javascript/tiny_mce/classes/ui/ColorSplitButton.js @@ -0,0 +1,284 @@ +/** + * ColorSplitButton.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, is = tinymce.is, each = tinymce.each; + + /** + * This class is used to create UI color split button. A color split button will present show a small color picker + * when you press the open menu. + * + * @class tinymce.ui.ColorSplitButton + * @extends tinymce.ui.SplitButton + */ + tinymce.create('tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton', { + /** + * Constructs a new color split button control instance. + * + * @constructor + * @method ColorSplitButton + * @param {String} id Control id for the color split button. + * @param {Object} s Optional name/value settings object. + * @param {Editor} ed The editor instance this button is for. + */ + ColorSplitButton : function(id, s, ed) { + var t = this; + + t.parent(id, s, ed); + + /** + * Settings object. + * + * @property settings + * @type Object + */ + t.settings = s = tinymce.extend({ + colors : '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF', + grid_width : 8, + default_color : '#888888' + }, t.settings); + + /** + * Fires when the menu is shown. + * + * @event onShowMenu + */ + t.onShowMenu = new tinymce.util.Dispatcher(t); + + /** + * Fires when the menu is hidden. + * + * @event onHideMenu + */ + t.onHideMenu = new tinymce.util.Dispatcher(t); + + /** + * Current color value. + * + * @property value + * @type String + */ + t.value = s.default_color; + }, + + /** + * Shows the color menu. The color menu is a layer places under the button + * and displays a table of colors for the user to pick from. + * + * @method showMenu + */ + showMenu : function() { + var t = this, r, p, e, p2; + + if (t.isDisabled()) + return; + + if (!t.isMenuRendered) { + t.renderMenu(); + t.isMenuRendered = true; + } + + if (t.isMenuVisible) + return t.hideMenu(); + + e = DOM.get(t.id); + DOM.show(t.id + '_menu'); + DOM.addClass(e, 'mceSplitButtonSelected'); + p2 = DOM.getPos(e); + DOM.setStyles(t.id + '_menu', { + left : p2.x, + top : p2.y + e.clientHeight, + zIndex : 200000 + }); + e = 0; + + Event.add(DOM.doc, 'mousedown', t.hideMenu, t); + t.onShowMenu.dispatch(t); + + if (t._focused) { + t._keyHandler = Event.add(t.id + '_menu', 'keydown', function(e) { + if (e.keyCode == 27) + t.hideMenu(); + }); + + DOM.select('a', t.id + '_menu')[0].focus(); // Select first link + } + + t.isMenuVisible = 1; + }, + + /** + * Hides the color menu. The optional event parameter is used to check where the event occured so it + * doesn't close them menu if it was a event inside the menu. + * + * @method hideMenu + * @param {Event} e Optional event object. + */ + hideMenu : function(e) { + var t = this; + + if (t.isMenuVisible) { + // Prevent double toogles by canceling the mouse click event to the button + if (e && e.type == "mousedown" && DOM.getParent(e.target, function(e) {return e.id === t.id + '_open';})) + return; + + if (!e || !DOM.getParent(e.target, '.mceSplitButtonMenu')) { + DOM.removeClass(t.id, 'mceSplitButtonSelected'); + Event.remove(DOM.doc, 'mousedown', t.hideMenu, t); + Event.remove(t.id + '_menu', 'keydown', t._keyHandler); + DOM.hide(t.id + '_menu'); + } + + t.isMenuVisible = 0; + } + }, + + /** + * Renders the menu to the DOM. + * + * @method renderMenu + */ + renderMenu : function() { + var t = this, m, i = 0, s = t.settings, n, tb, tr, w, context; + + w = DOM.add(s.menu_container, 'div', {role: 'listbox', id : t.id + '_menu', 'class' : s['menu_class'] + ' ' + s['class'], style : 'position:absolute;left:0;top:-1000px;'}); + m = DOM.add(w, 'div', {'class' : s['class'] + ' mceSplitButtonMenu'}); + DOM.add(m, 'span', {'class' : 'mceMenuLine'}); + + n = DOM.add(m, 'table', {role: 'presentation', 'class' : 'mceColorSplitMenu'}); + tb = DOM.add(n, 'tbody'); + + // Generate color grid + i = 0; + each(is(s.colors, 'array') ? s.colors : s.colors.split(','), function(c) { + c = c.replace(/^#/, ''); + + if (!i--) { + tr = DOM.add(tb, 'tr'); + i = s.grid_width - 1; + } + + n = DOM.add(tr, 'td'); + n = DOM.add(n, 'a', { + role : 'option', + href : 'javascript:;', + style : { + backgroundColor : '#' + c + }, + 'title': t.editor.getLang('colors.' + c, c), + 'data-mce-color' : '#' + c + }); + + if (t.editor.forcedHighContrastMode) { + n = DOM.add(n, 'canvas', { width: 16, height: 16, 'aria-hidden': 'true' }); + if (n.getContext && (context = n.getContext("2d"))) { + context.fillStyle = '#' + c; + context.fillRect(0, 0, 16, 16); + } else { + // No point leaving a canvas element around if it's not supported for drawing on anyway. + DOM.remove(n); + } + } + }); + + if (s.more_colors_func) { + n = DOM.add(tb, 'tr'); + n = DOM.add(n, 'td', {colspan : s.grid_width, 'class' : 'mceMoreColors'}); + n = DOM.add(n, 'a', {role: 'option', id : t.id + '_more', href : 'javascript:;', onclick : 'return false;', 'class' : 'mceMoreColors'}, s.more_colors_title); + + Event.add(n, 'click', function(e) { + s.more_colors_func.call(s.more_colors_scope || this); + return Event.cancel(e); // Cancel to fix onbeforeunload problem + }); + } + + DOM.addClass(m, 'mceColorSplitMenu'); + + new tinymce.ui.KeyboardNavigation({ + root: t.id + '_menu', + items: DOM.select('a', t.id + '_menu'), + onCancel: function() { + t.hideMenu(); + t.focus(); + } + }); + + // Prevent IE from scrolling and hindering click to occur #4019 + Event.add(t.id + '_menu', 'mousedown', function(e) {return Event.cancel(e);}); + + Event.add(t.id + '_menu', 'click', function(e) { + var c; + + e = DOM.getParent(e.target, 'a', tb); + + if (e && e.nodeName.toLowerCase() == 'a' && (c = e.getAttribute('data-mce-color'))) + t.setColor(c); + + return Event.cancel(e); // Prevent IE auto save warning + }); + + return w; + }, + + /** + * Sets the current color for the control and hides the menu if it should be visible. + * + * @method setColor + * @param {String} c Color code value in hex for example: #FF00FF + */ + setColor : function(c) { + this.displayColor(c); + this.hideMenu(); + this.settings.onselect(c); + }, + + /** + * Change the currently selected color for the control. + * + * @method displayColor + * @param {String} c Color code value in hex for example: #FF00FF + */ + displayColor : function(c) { + var t = this; + + DOM.setStyle(t.id + '_preview', 'backgroundColor', c); + + t.value = c; + }, + + /** + * Post render event. This will be executed after the control has been rendered and can be used to + * set states, add events to the control etc. It's recommended for subclasses of the control to call this method by using this.parent(). + * + * @method postRender + */ + postRender : function() { + var t = this, id = t.id; + + t.parent(); + DOM.add(id + '_action', 'div', {id : id + '_preview', 'class' : 'mceColorPreview'}); + DOM.setStyle(t.id + '_preview', 'backgroundColor', t.value); + }, + + /** + * Destroys the control. This means it will be removed from the DOM and any + * events tied to it will also be removed. + * + * @method destroy + */ + destroy : function() { + this.parent(); + + Event.clear(this.id + '_menu'); + Event.clear(this.id + '_more'); + DOM.remove(this.id + '_menu'); + } + }); +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/ui/Container.js b/include/javascript/tiny_mce/classes/ui/Container.js new file mode 100644 index 00000000..aff916a6 --- /dev/null +++ b/include/javascript/tiny_mce/classes/ui/Container.js @@ -0,0 +1,66 @@ +/** + * Container.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +/** + * This class is the base class for all container controls like toolbars. This class should not + * be instantiated directly other container controls should inherit from this one. + * + * @class tinymce.ui.Container + * @extends tinymce.ui.Control + */ +tinymce.create('tinymce.ui.Container:tinymce.ui.Control', { + /** + * Base contrustor a new container control instance. + * + * @constructor + * @method Container + * @param {String} id Control id to use for the container. + * @param {Object} s Optional name/value settings object. + */ + Container : function(id, s, editor) { + this.parent(id, s, editor); + + /** + * Array of controls added to the container. + * + * @property controls + * @type Array + */ + this.controls = []; + + this.lookup = {}; + }, + + /** + * Adds a control to the collection of controls for the container. + * + * @method add + * @param {tinymce.ui.Control} c Control instance to add to the container. + * @return {tinymce.ui.Control} Same control instance that got passed in. + */ + add : function(c) { + this.lookup[c.id] = c; + this.controls.push(c); + + return c; + }, + + /** + * Returns a control by id from the containers collection. + * + * @method get + * @param {String} n Id for the control to retrive. + * @return {tinymce.ui.Control} Control instance by the specified name or undefined if it wasn't found. + */ + get : function(n) { + return this.lookup[n]; + } +}); + diff --git a/include/javascript/tiny_mce/classes/ui/Control.js b/include/javascript/tiny_mce/classes/ui/Control.js new file mode 100644 index 00000000..3550cf18 --- /dev/null +++ b/include/javascript/tiny_mce/classes/ui/Control.js @@ -0,0 +1,198 @@ +/** + * Control.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + // Shorten class names + var DOM = tinymce.DOM, is = tinymce.is; + + /** + * This class is the base class for all controls like buttons, toolbars, containers. This class should not + * be instantiated directly other controls should inherit from this one. + * + * @class tinymce.ui.Control + */ + tinymce.create('tinymce.ui.Control', { + /** + * Constructs a new control instance. + * + * @constructor + * @method Control + * @param {String} id Control id. + * @param {Object} s Optional name/value settings object. + */ + Control : function(id, s, editor) { + this.id = id; + this.settings = s = s || {}; + this.rendered = false; + this.onRender = new tinymce.util.Dispatcher(this); + this.classPrefix = ''; + this.scope = s.scope || this; + this.disabled = 0; + this.active = 0; + this.editor = editor; + }, + + setAriaProperty : function(property, value) { + var element = DOM.get(this.id + '_aria') || DOM.get(this.id); + if (element) { + DOM.setAttrib(element, 'aria-' + property, !!value); + } + }, + + focus : function() { + DOM.get(this.id).focus(); + }, + + /** + * Sets the disabled state for the control. This will add CSS classes to the + * element that contains the control. So that it can be disabled visually. + * + * @method setDisabled + * @param {Boolean} s Boolean state if the control should be disabled or not. + */ + setDisabled : function(s) { + if (s != this.disabled) { + this.setAriaProperty('disabled', s); + + this.setState('Disabled', s); + this.setState('Enabled', !s); + this.disabled = s; + } + }, + + /** + * Returns true/false if the control is disabled or not. This is a method since you can then + * choose to check some class or some internal bool state in subclasses. + * + * @method isDisabled + * @return {Boolean} true/false if the control is disabled or not. + */ + isDisabled : function() { + return this.disabled; + }, + + /** + * Sets the activated state for the control. This will add CSS classes to the + * element that contains the control. So that it can be activated visually. + * + * @method setActive + * @param {Boolean} s Boolean state if the control should be activated or not. + */ + setActive : function(s) { + if (s != this.active) { + this.setState('Active', s); + this.active = s; + this.setAriaProperty('pressed', s); + } + }, + + /** + * Returns true/false if the control is disabled or not. This is a method since you can then + * choose to check some class or some internal bool state in subclasses. + * + * @method isActive + * @return {Boolean} true/false if the control is disabled or not. + */ + isActive : function() { + return this.active; + }, + + /** + * Sets the specified class state for the control. + * + * @method setState + * @param {String} c Class name to add/remove depending on state. + * @param {Boolean} s True/false state if the class should be removed or added. + */ + setState : function(c, s) { + var n = DOM.get(this.id); + + c = this.classPrefix + c; + + if (s) + DOM.addClass(n, c); + else + DOM.removeClass(n, c); + }, + + /** + * Returns true/false if the control has been rendered or not. + * + * @method isRendered + * @return {Boolean} State if the control has been rendered or not. + */ + isRendered : function() { + return this.rendered; + }, + + /** + * Renders the control as a HTML string. This method is much faster than using the DOM and when + * creating a whole toolbar with buttons it does make a lot of difference. + * + * @method renderHTML + * @return {String} HTML for the button control element. + */ + renderHTML : function() { + }, + + /** + * Renders the control to the specified container element. + * + * @method renderTo + * @param {Element} n HTML DOM element to add control to. + */ + renderTo : function(n) { + DOM.setHTML(n, this.renderHTML()); + }, + + /** + * Post render event. This will be executed after the control has been rendered and can be used to + * set states, add events to the control etc. It's recommended for subclasses of the control to call this method by using this.parent(). + * + * @method postRender + */ + postRender : function() { + var t = this, b; + + // Set pending states + if (is(t.disabled)) { + b = t.disabled; + t.disabled = -1; + t.setDisabled(b); + } + + if (is(t.active)) { + b = t.active; + t.active = -1; + t.setActive(b); + } + }, + + /** + * Removes the control. This means it will be removed from the DOM and any + * events tied to it will also be removed. + * + * @method remove + */ + remove : function() { + DOM.remove(this.id); + this.destroy(); + }, + + /** + * Destroys the control will free any memory by removing event listeners etc. + * + * @method destroy + */ + destroy : function() { + tinymce.dom.Event.clear(this.id); + } + }); +})(tinymce); \ No newline at end of file diff --git a/include/javascript/tiny_mce/classes/ui/DropMenu.js b/include/javascript/tiny_mce/classes/ui/DropMenu.js new file mode 100644 index 00000000..69e60753 --- /dev/null +++ b/include/javascript/tiny_mce/classes/ui/DropMenu.js @@ -0,0 +1,432 @@ +/** + * DropMenu.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var is = tinymce.is, DOM = tinymce.DOM, each = tinymce.each, Event = tinymce.dom.Event, Element = tinymce.dom.Element; + + /** + * This class is used to create drop menus, a drop menu can be a + * context menu, or a menu for a list box or a menu bar. + * + * @class tinymce.ui.DropMenu + * @extends tinymce.ui.Menu + */ + tinymce.create('tinymce.ui.DropMenu:tinymce.ui.Menu', { + /** + * Constructs a new drop menu control instance. + * + * @constructor + * @method DropMenu + * @param {String} id Button control id for the button. + * @param {Object} s Optional name/value settings object. + */ + DropMenu : function(id, s) { + s = s || {}; + s.container = s.container || DOM.doc.body; + s.offset_x = s.offset_x || 0; + s.offset_y = s.offset_y || 0; + s.vp_offset_x = s.vp_offset_x || 0; + s.vp_offset_y = s.vp_offset_y || 0; + + if (is(s.icons) && !s.icons) + s['class'] += ' mceNoIcons'; + + this.parent(id, s); + this.onShowMenu = new tinymce.util.Dispatcher(this); + this.onHideMenu = new tinymce.util.Dispatcher(this); + this.classPrefix = 'mceMenu'; + }, + + /** + * Created a new sub menu for the drop menu control. + * + * @method createMenu + * @param {Object} s Optional name/value settings object. + * @return {tinymce.ui.DropMenu} New drop menu instance. + */ + createMenu : function(s) { + var t = this, cs = t.settings, m; + + s.container = s.container || cs.container; + s.parent = t; + s.constrain = s.constrain || cs.constrain; + s['class'] = s['class'] || cs['class']; + s.vp_offset_x = s.vp_offset_x || cs.vp_offset_x; + s.vp_offset_y = s.vp_offset_y || cs.vp_offset_y; + s.keyboard_focus = cs.keyboard_focus; + m = new tinymce.ui.DropMenu(s.id || DOM.uniqueId(), s); + + m.onAddItem.add(t.onAddItem.dispatch, t.onAddItem); + + return m; + }, + + focus : function() { + var t = this; + if (t.keyboardNav) { + t.keyboardNav.focus(); + } + }, + + /** + * Repaints the menu after new items have been added dynamically. + * + * @method update + */ + update : function() { + var t = this, s = t.settings, tb = DOM.get('menu_' + t.id + '_tbl'), co = DOM.get('menu_' + t.id + '_co'), tw, th; + + tw = s.max_width ? Math.min(tb.clientWidth, s.max_width) : tb.clientWidth; + th = s.max_height ? Math.min(tb.clientHeight, s.max_height) : tb.clientHeight; + + if (!DOM.boxModel) + t.element.setStyles({width : tw + 2, height : th + 2}); + else + t.element.setStyles({width : tw, height : th}); + + if (s.max_width) + DOM.setStyle(co, 'width', tw); + + if (s.max_height) { + DOM.setStyle(co, 'height', th); + + if (tb.clientHeight < s.max_height) + DOM.setStyle(co, 'overflow', 'hidden'); + } + }, + + /** + * Displays the menu at the specified cordinate. + * + * @method showMenu + * @param {Number} x Horizontal position of the menu. + * @param {Number} y Vertical position of the menu. + * @param {Numner} px Optional parent X position used when menus are cascading. + */ + showMenu : function(x, y, px) { + var t = this, s = t.settings, co, vp = DOM.getViewPort(), w, h, mx, my, ot = 2, dm, tb, cp = t.classPrefix; + + t.collapse(1); + + if (t.isMenuVisible) + return; + + if (!t.rendered) { + co = DOM.add(t.settings.container, t.renderNode()); + + each(t.items, function(o) { + o.postRender(); + }); + + t.element = new Element('menu_' + t.id, {blocker : 1, container : s.container}); + } else + co = DOM.get('menu_' + t.id); + + // Move layer out of sight unless it's Opera since it scrolls to top of page due to an bug + if (!tinymce.isOpera) + DOM.setStyles(co, {left : -0xFFFF , top : -0xFFFF}); + + DOM.show(co); + t.update(); + + x += s.offset_x || 0; + y += s.offset_y || 0; + vp.w -= 4; + vp.h -= 4; + + // Move inside viewport if not submenu + if (s.constrain) { + w = co.clientWidth - ot; + h = co.clientHeight - ot; + mx = vp.x + vp.w; + my = vp.y + vp.h; + + if ((x + s.vp_offset_x + w) > mx) + x = px ? px - w : Math.max(0, (mx - s.vp_offset_x) - w); + + if ((y + s.vp_offset_y + h) > my) + y = Math.max(0, (my - s.vp_offset_y) - h); + } + + DOM.setStyles(co, {left : x , top : y}); + t.element.update(); + + t.isMenuVisible = 1; + t.mouseClickFunc = Event.add(co, 'click', function(e) { + var m; + + e = e.target; + + if (e && (e = DOM.getParent(e, 'tr')) && !DOM.hasClass(e, cp + 'ItemSub')) { + m = t.items[e.id]; + + if (m.isDisabled()) + return; + + dm = t; + + while (dm) { + if (dm.hideMenu) + dm.hideMenu(); + + dm = dm.settings.parent; + } + + if (m.settings.onclick) + m.settings.onclick(e); + + return Event.cancel(e); // Cancel to fix onbeforeunload problem + } + }); + + if (t.hasMenus()) { + t.mouseOverFunc = Event.add(co, 'mouseover', function(e) { + var m, r, mi; + + e = e.target; + if (e && (e = DOM.getParent(e, 'tr'))) { + m = t.items[e.id]; + + if (t.lastMenu) + t.lastMenu.collapse(1); + + if (m.isDisabled()) + return; + + if (e && DOM.hasClass(e, cp + 'ItemSub')) { + //p = DOM.getPos(s.container); + r = DOM.getRect(e); + m.showMenu((r.x + r.w - ot), r.y - ot, r.x); + t.lastMenu = m; + DOM.addClass(DOM.get(m.id).firstChild, cp + 'ItemActive'); + } + } + }); + } + + Event.add(co, 'keydown', t._keyHandler, t); + + t.onShowMenu.dispatch(t); + + if (s.keyboard_focus) { + t._setupKeyboardNav(); + } + }, + + /** + * Hides the displayed menu. + * + * @method hideMenu + */ + hideMenu : function(c) { + var t = this, co = DOM.get('menu_' + t.id), e; + + if (!t.isMenuVisible) + return; + + if (t.keyboardNav) t.keyboardNav.destroy(); + Event.remove(co, 'mouseover', t.mouseOverFunc); + Event.remove(co, 'click', t.mouseClickFunc); + Event.remove(co, 'keydown', t._keyHandler); + DOM.hide(co); + t.isMenuVisible = 0; + + if (!c) + t.collapse(1); + + if (t.element) + t.element.hide(); + + if (e = DOM.get(t.id)) + DOM.removeClass(e.firstChild, t.classPrefix + 'ItemActive'); + + t.onHideMenu.dispatch(t); + }, + + /** + * Adds a new menu, menu item or sub classes of them to the drop menu. + * + * @method add + * @param {tinymce.ui.Control} o Menu or menu item to add to the drop menu. + * @return {tinymce.ui.Control} Same as the input control, the menu or menu item. + */ + add : function(o) { + var t = this, co; + + o = t.parent(o); + + if (t.isRendered && (co = DOM.get('menu_' + t.id))) + t._add(DOM.select('tbody', co)[0], o); + + return o; + }, + + /** + * Collapses the menu, this will hide the menu and all menu items. + * + * @method collapse + * @param {Boolean} d Optional deep state. If this is set to true all children will be collapsed as well. + */ + collapse : function(d) { + this.parent(d); + this.hideMenu(1); + }, + + /** + * Removes a specific sub menu or menu item from the drop menu. + * + * @method remove + * @param {tinymce.ui.Control} o Menu item or menu to remove from drop menu. + * @return {tinymce.ui.Control} Control instance or null if it wasn't found. + */ + remove : function(o) { + DOM.remove(o.id); + this.destroy(); + + return this.parent(o); + }, + + /** + * Destroys the menu. This will remove the menu from the DOM and any events added to it etc. + * + * @method destroy + */ + destroy : function() { + var t = this, co = DOM.get('menu_' + t.id); + + if (t.keyboardNav) t.keyboardNav.destroy(); + Event.remove(co, 'mouseover', t.mouseOverFunc); + Event.remove(DOM.select('a', co), 'focus', t.mouseOverFunc); + Event.remove(co, 'click', t.mouseClickFunc); + Event.remove(co, 'keydown', t._keyHandler); + + if (t.element) + t.element.remove(); + + DOM.remove(co); + }, + + /** + * Renders the specified menu node to the dom. + * + * @method renderNode + * @return {Element} Container element for the drop menu. + */ + renderNode : function() { + var t = this, s = t.settings, n, tb, co, w; + + w = DOM.create('div', {role: 'listbox', id : 'menu_' + t.id, 'class' : s['class'], 'style' : 'position:absolute;left:0;top:0;z-index:200000;outline:0'}); + if (t.settings.parent) { + DOM.setAttrib(w, 'aria-parent', 'menu_' + t.settings.parent.id); + } + co = DOM.add(w, 'div', {role: 'presentation', id : 'menu_' + t.id + '_co', 'class' : t.classPrefix + (s['class'] ? ' ' + s['class'] : '')}); + t.element = new Element('menu_' + t.id, {blocker : 1, container : s.container}); + + if (s.menu_line) + DOM.add(co, 'span', {'class' : t.classPrefix + 'Line'}); + +// n = DOM.add(co, 'div', {id : 'menu_' + t.id + '_co', 'class' : 'mceMenuContainer'}); + n = DOM.add(co, 'table', {role: 'presentation', id : 'menu_' + t.id + '_tbl', border : 0, cellPadding : 0, cellSpacing : 0}); + tb = DOM.add(n, 'tbody'); + + each(t.items, function(o) { + t._add(tb, o); + }); + + t.rendered = true; + + return w; + }, + + // Internal functions + _setupKeyboardNav : function(){ + var contextMenu, menuItems, t=this; + contextMenu = DOM.select('#menu_' + t.id)[0]; + menuItems = DOM.select('a[role=option]', 'menu_' + t.id); + menuItems.splice(0,0,contextMenu); + t.keyboardNav = new tinymce.ui.KeyboardNavigation({ + root: 'menu_' + t.id, + items: menuItems, + onCancel: function() { + t.hideMenu(); + }, + enableUpDown: true + }); + contextMenu.focus(); + }, + + _keyHandler : function(evt) { + var t = this, e; + switch (evt.keyCode) { + case 37: // Left + if (t.settings.parent) { + t.hideMenu(); + t.settings.parent.focus(); + Event.cancel(evt); + } + break; + case 39: // Right + if (t.mouseOverFunc) + t.mouseOverFunc(evt); + break; + } + }, + + _add : function(tb, o) { + var n, s = o.settings, a, ro, it, cp = this.classPrefix, ic; + + if (s.separator) { + ro = DOM.add(tb, 'tr', {id : o.id, 'class' : cp + 'ItemSeparator'}); + DOM.add(ro, 'td', {'class' : cp + 'ItemSeparator'}); + + if (n = ro.previousSibling) + DOM.addClass(n, 'mceLast'); + + return; + } + + n = ro = DOM.add(tb, 'tr', {id : o.id, 'class' : cp + 'Item ' + cp + 'ItemEnabled'}); + n = it = DOM.add(n, s.titleItem ? 'th' : 'td'); + n = a = DOM.add(n, 'a', {id: o.id + '_aria', role: s.titleItem ? 'presentation' : 'option', href : 'javascript:;', onclick : "return false;", onmousedown : 'return false;'}); + + if (s.parent) { + DOM.setAttrib(a, 'aria-haspopup', 'true'); + DOM.setAttrib(a, 'aria-owns', 'menu_' + o.id); + } + + DOM.addClass(it, s['class']); +// n = DOM.add(n, 'span', {'class' : 'item'}); + + ic = DOM.add(n, 'span', {'class' : 'mceIcon' + (s.icon ? ' mce_' + s.icon : '')}); + + if (s.icon_src) + DOM.add(ic, 'img', {src : s.icon_src}); + + n = DOM.add(n, s.element || 'span', {'class' : 'mceText', title : o.settings.title}, o.settings.title); + + if (o.settings.style) + DOM.setAttrib(n, 'style', o.settings.style); + + if (tb.childNodes.length == 1) + DOM.addClass(ro, 'mceFirst'); + + if ((n = ro.previousSibling) && DOM.hasClass(n, cp + 'ItemSeparator')) + DOM.addClass(ro, 'mceFirst'); + + if (o.collapse) + DOM.addClass(ro, cp + 'ItemSub'); + + if (n = ro.previousSibling) + DOM.removeClass(n, 'mceLast'); + + DOM.addClass(ro, 'mceLast'); + } + }); +})(tinymce); \ No newline at end of file diff --git a/include/javascript/tiny_mce/classes/ui/KeyboardNavigation.js b/include/javascript/tiny_mce/classes/ui/KeyboardNavigation.js new file mode 100644 index 00000000..ca90b0e3 --- /dev/null +++ b/include/javascript/tiny_mce/classes/ui/KeyboardNavigation.js @@ -0,0 +1,183 @@ +/** + * KeyboardNavigation.js + * + * Copyright 2011, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var Event = tinymce.dom.Event, each = tinymce.each; + + /** + * This class provides basic keyboard navigation using the arrow keys to children of a component. + * For example, this class handles moving between the buttons on the toolbars. + * + * @class tinymce.ui.KeyboardNavigation + */ + tinymce.create('tinymce.ui.KeyboardNavigation', { + /** + * Create a new KeyboardNavigation instance to handle the focus for a specific element. + * + * @constructor + * @method KeyboardNavigation + * @param {Object} settings the settings object to define how keyboard navigation works. + * @param {DOMUtils} dom the DOMUtils instance to use. + * + * @setting {Element/String} root the root element or ID of the root element for the control. + * @setting {Array} items an array containing the items to move focus between. Every object in this array must have an id attribute which maps to the actual DOM element. If the actual elements are passed without an ID then one is automatically assigned. + * @setting {Function} onCancel the callback for when the user presses escape or otherwise indicates cancelling. + * @setting {Function} onAction (optional) the action handler to call when the user activates an item. + * @setting {Boolean} enableLeftRight (optional, default) when true, the up/down arrows move through items. + * @setting {Boolean} enableUpDown (optional) when true, the up/down arrows move through items. + * Note for both up/down and left/right explicitly set both enableLeftRight and enableUpDown to true. + */ + KeyboardNavigation: function(settings, dom) { + var t = this, root = settings.root, items = settings.items, + enableUpDown = settings.enableUpDown, enableLeftRight = settings.enableLeftRight || !settings.enableUpDown, + excludeFromTabOrder = settings.excludeFromTabOrder, + itemFocussed, itemBlurred, rootKeydown, rootFocussed, focussedId; + + dom = dom || tinymce.DOM; + + itemFocussed = function(evt) { + focussedId = evt.target.id; + }; + + itemBlurred = function(evt) { + dom.setAttrib(evt.target.id, 'tabindex', '-1'); + }; + + rootFocussed = function(evt) { + var item = dom.get(focussedId); + dom.setAttrib(item, 'tabindex', '0'); + item.focus(); + }; + + t.focus = function() { + dom.get(focussedId).focus(); + }; + + /** + * Destroys the KeyboardNavigation and unbinds any focus/blur event handles it might have added. + * + * @method destroy + */ + t.destroy = function() { + each(items, function(item) { + dom.unbind(dom.get(item.id), 'focus', itemFocussed); + dom.unbind(dom.get(item.id), 'blur', itemBlurred); + }); + + dom.unbind(dom.get(root), 'focus', rootFocussed); + dom.unbind(dom.get(root), 'keydown', rootKeydown); + + items = dom = root = t.focus = itemFocussed = itemBlurred = rootKeydown = rootFocussed = null; + t.destroy = function() {}; + }; + + t.moveFocus = function(dir, evt) { + var idx = -1, controls = t.controls, newFocus; + + if (!focussedId) + return; + + each(items, function(item, index) { + if (item.id === focussedId) { + idx = index; + return false; + } + }); + + idx += dir; + if (idx < 0) { + idx = items.length - 1; + } else if (idx >= items.length) { + idx = 0; + } + + newFocus = items[idx]; + dom.setAttrib(focussedId, 'tabindex', '-1'); + dom.setAttrib(newFocus.id, 'tabindex', '0'); + dom.get(newFocus.id).focus(); + + if (settings.actOnFocus) { + settings.onAction(newFocus.id); + } + + if (evt) + Event.cancel(evt); + }; + + rootKeydown = function(evt) { + var DOM_VK_LEFT = 37, DOM_VK_RIGHT = 39, DOM_VK_UP = 38, DOM_VK_DOWN = 40, DOM_VK_ESCAPE = 27, DOM_VK_ENTER = 14, DOM_VK_RETURN = 13, DOM_VK_SPACE = 32; + + switch (evt.keyCode) { + case DOM_VK_LEFT: + if (enableLeftRight) t.moveFocus(-1); + break; + + case DOM_VK_RIGHT: + if (enableLeftRight) t.moveFocus(1); + break; + + case DOM_VK_UP: + if (enableUpDown) t.moveFocus(-1); + break; + + case DOM_VK_DOWN: + if (enableUpDown) t.moveFocus(1); + break; + + case DOM_VK_ESCAPE: + if (settings.onCancel) { + settings.onCancel(); + Event.cancel(evt); + } + break; + + case DOM_VK_ENTER: + case DOM_VK_RETURN: + case DOM_VK_SPACE: + if (settings.onAction) { + settings.onAction(focussedId); + Event.cancel(evt); + } + break; + } + }; + + // Set up state and listeners for each item. + each(items, function(item, idx) { + var tabindex; + + if (!item.id) { + item.id = dom.uniqueId('_mce_item_'); + } + + if (excludeFromTabOrder) { + dom.bind(item.id, 'blur', itemBlurred); + tabindex = '-1'; + } else { + tabindex = (idx === 0 ? '0' : '-1'); + } + + dom.setAttrib(item.id, 'tabindex', tabindex); + dom.bind(dom.get(item.id), 'focus', itemFocussed); + }); + + // Setup initial state for root element. + if (items[0]){ + focussedId = items[0].id; + } + + dom.setAttrib(root, 'tabindex', '-1'); + + // Setup listeners for root element. + dom.bind(dom.get(root), 'focus', rootFocussed); + dom.bind(dom.get(root), 'keydown', rootKeydown); + } + }); +})(tinymce); \ No newline at end of file diff --git a/include/javascript/tiny_mce/classes/ui/ListBox.js b/include/javascript/tiny_mce/classes/ui/ListBox.js new file mode 100644 index 00000000..dee9fba7 --- /dev/null +++ b/include/javascript/tiny_mce/classes/ui/ListBox.js @@ -0,0 +1,424 @@ +/** + * ListBox.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, Dispatcher = tinymce.util.Dispatcher; + + /** + * This class is used to create list boxes/select list. This one will generate + * a non native control. This one has the benefits of having visual items added. + * + * @class tinymce.ui.ListBox + * @extends tinymce.ui.Control + * @example + * // Creates a new plugin class and a custom listbox + * tinymce.create('tinymce.plugins.ExamplePlugin', { + * createControl: function(n, cm) { + * switch (n) { + * case 'mylistbox': + * var mlb = cm.createListBox('mylistbox', { + * title : 'My list box', + * onselect : function(v) { + * tinyMCE.activeEditor.windowManager.alert('Value selected:' + v); + * } + * }); + * + * // Add some values to the list box + * mlb.add('Some item 1', 'val1'); + * mlb.add('some item 2', 'val2'); + * mlb.add('some item 3', 'val3'); + * + * // Return the new listbox instance + * return mlb; + * } + * + * return null; + * } + * }); + * + * // Register plugin with a short name + * tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin); + * + * // Initialize TinyMCE with the new plugin and button + * tinyMCE.init({ + * ... + * plugins : '-example', // - means TinyMCE will not try to load it + * theme_advanced_buttons1 : 'mylistbox' // Add the new example listbox to the toolbar + * }); + */ + tinymce.create('tinymce.ui.ListBox:tinymce.ui.Control', { + /** + * Constructs a new listbox control instance. + * + * @constructor + * @method ListBox + * @param {String} id Control id for the list box. + * @param {Object} s Optional name/value settings object. + * @param {Editor} ed Optional the editor instance this button is for. + */ + ListBox : function(id, s, ed) { + var t = this; + + t.parent(id, s, ed); + + /** + * Array of ListBox items. + * + * @property items + * @type Array + */ + t.items = []; + + /** + * Fires when the selection has been changed. + * + * @event onChange + */ + t.onChange = new Dispatcher(t); + + /** + * Fires after the element has been rendered to DOM. + * + * @event onPostRender + */ + t.onPostRender = new Dispatcher(t); + + /** + * Fires when a new item is added. + * + * @event onAdd + */ + t.onAdd = new Dispatcher(t); + + /** + * Fires when the menu gets rendered. + * + * @event onRenderMenu + */ + t.onRenderMenu = new tinymce.util.Dispatcher(this); + + t.classPrefix = 'mceListBox'; + }, + + /** + * Selects a item/option by value. This will both add a visual selection to the + * item and change the title of the control to the title of the option. + * + * @method select + * @param {String/function} va Value to look for inside the list box or a function selector. + */ + select : function(va) { + var t = this, fv, f; + + if (va == undefined) + return t.selectByIndex(-1); + + // Is string or number make function selector + if (va && va.call) + f = va; + else { + f = function(v) { + return v == va; + }; + } + + // Do we need to do something? + if (va != t.selectedValue) { + // Find item + each(t.items, function(o, i) { + if (f(o.value)) { + fv = 1; + t.selectByIndex(i); + return false; + } + }); + + if (!fv) + t.selectByIndex(-1); + } + }, + + /** + * Selects a item/option by index. This will both add a visual selection to the + * item and change the title of the control to the title of the option. + * + * @method selectByIndex + * @param {String} idx Index to select, pass -1 to select menu/title of select box. + */ + selectByIndex : function(idx) { + var t = this, e, o; + + if (idx != t.selectedIndex) { + e = DOM.get(t.id + '_text'); + o = t.items[idx]; + + if (o) { + t.selectedValue = o.value; + t.selectedIndex = idx; + DOM.setHTML(e, DOM.encode(o.title)); + DOM.removeClass(e, 'mceTitle'); + DOM.setAttrib(t.id, 'aria-valuenow', o.title); + } else { + DOM.setHTML(e, DOM.encode(t.settings.title)); + DOM.addClass(e, 'mceTitle'); + t.selectedValue = t.selectedIndex = null; + DOM.setAttrib(t.id, 'aria-valuenow', t.settings.title); + } + e = 0; + } + }, + + /** + * Adds a option item to the list box. + * + * @method add + * @param {String} n Title for the new option. + * @param {String} v Value for the new option. + * @param {Object} o Optional object with settings like for example class. + */ + add : function(n, v, o) { + var t = this; + + o = o || {}; + o = tinymce.extend(o, { + title : n, + value : v + }); + + t.items.push(o); + t.onAdd.dispatch(t, o); + }, + + /** + * Returns the number of items inside the list box. + * + * @method getLength + * @param {Number} Number of items inside the list box. + */ + getLength : function() { + return this.items.length; + }, + + /** + * Renders the list box as a HTML string. This method is much faster than using the DOM and when + * creating a whole toolbar with buttons it does make a lot of difference. + * + * @method renderHTML + * @return {String} HTML for the list box control element. + */ + renderHTML : function() { + var h = '', t = this, s = t.settings, cp = t.classPrefix; + + h = ''; + h += ''; + h += ''; + h += ''; + + return h; + }, + + /** + * Displays the drop menu with all items. + * + * @method showMenu + */ + showMenu : function() { + var t = this, p1, p2, e = DOM.get(this.id), m; + + if (t.isDisabled() || t.items.length == 0) + return; + + if (t.menu && t.menu.isMenuVisible) + return t.hideMenu(); + + if (!t.isMenuRendered) { + t.renderMenu(); + t.isMenuRendered = true; + } + + p1 = DOM.getPos(this.settings.menu_container); + p2 = DOM.getPos(e); + + m = t.menu; + m.settings.offset_x = p2.x; + m.settings.offset_y = p2.y; + m.settings.keyboard_focus = !tinymce.isOpera; // Opera is buggy when it comes to auto focus + + // Select in menu + if (t.oldID) + m.items[t.oldID].setSelected(0); + + each(t.items, function(o) { + if (o.value === t.selectedValue) { + m.items[o.id].setSelected(1); + t.oldID = o.id; + } + }); + + m.showMenu(0, e.clientHeight); + + Event.add(DOM.doc, 'mousedown', t.hideMenu, t); + DOM.addClass(t.id, t.classPrefix + 'Selected'); + + //DOM.get(t.id + '_text').focus(); + }, + + /** + * Hides the drop menu. + * + * @method hideMenu + */ + hideMenu : function(e) { + var t = this; + + if (t.menu && t.menu.isMenuVisible) { + DOM.removeClass(t.id, t.classPrefix + 'Selected'); + + // Prevent double toogles by canceling the mouse click event to the button + if (e && e.type == "mousedown" && (e.target.id == t.id + '_text' || e.target.id == t.id + '_open')) + return; + + if (!e || !DOM.getParent(e.target, '.mceMenu')) { + DOM.removeClass(t.id, t.classPrefix + 'Selected'); + Event.remove(DOM.doc, 'mousedown', t.hideMenu, t); + t.menu.hideMenu(); + } + } + }, + + /** + * Renders the menu to the DOM. + * + * @method renderMenu + */ + renderMenu : function() { + var t = this, m; + + m = t.settings.control_manager.createDropMenu(t.id + '_menu', { + menu_line : 1, + 'class' : t.classPrefix + 'Menu mceNoIcons', + max_width : 150, + max_height : 150 + }); + + m.onHideMenu.add(function() { + t.hideMenu(); + t.focus(); + }); + + m.add({ + title : t.settings.title, + 'class' : 'mceMenuItemTitle', + onclick : function() { + if (t.settings.onselect('') !== false) + t.select(''); // Must be runned after + } + }); + + each(t.items, function(o) { + // No value then treat it as a title + if (o.value === undefined) { + m.add({ + title : o.title, + 'class' : 'mceMenuItemTitle', + onclick : function() { + if (t.settings.onselect('') !== false) + t.select(''); // Must be runned after + } + }); + } else { + o.id = DOM.uniqueId(); + o.onclick = function() { + if (t.settings.onselect(o.value) !== false) + t.select(o.value); // Must be runned after + }; + + m.add(o); + } + }); + + t.onRenderMenu.dispatch(t, m); + t.menu = m; + }, + + /** + * Post render event. This will be executed after the control has been rendered and can be used to + * set states, add events to the control etc. It's recommended for subclasses of the control to call this method by using this.parent(). + * + * @method postRender + */ + postRender : function() { + var t = this, cp = t.classPrefix; + + Event.add(t.id, 'click', t.showMenu, t); + Event.add(t.id, 'keydown', function(evt) { + if (evt.keyCode == 32) { // Space + t.showMenu(evt); + Event.cancel(evt); + } + }); + Event.add(t.id, 'focus', function() { + if (!t._focused) { + t.keyDownHandler = Event.add(t.id, 'keydown', function(e) { + if (e.keyCode == 40) { + t.showMenu(); + Event.cancel(e); + } + }); + t.keyPressHandler = Event.add(t.id, 'keypress', function(e) { + var v; + if (e.keyCode == 13) { + // Fake select on enter + v = t.selectedValue; + t.selectedValue = null; // Needs to be null to fake change + Event.cancel(e); + t.settings.onselect(v); + } + }); + } + + t._focused = 1; + }); + Event.add(t.id, 'blur', function() { + Event.remove(t.id, 'keydown', t.keyDownHandler); + Event.remove(t.id, 'keypress', t.keyPressHandler); + t._focused = 0; + }); + + // Old IE doesn't have hover on all elements + if (tinymce.isIE6 || !DOM.boxModel) { + Event.add(t.id, 'mouseover', function() { + if (!DOM.hasClass(t.id, cp + 'Disabled')) + DOM.addClass(t.id, cp + 'Hover'); + }); + + Event.add(t.id, 'mouseout', function() { + if (!DOM.hasClass(t.id, cp + 'Disabled')) + DOM.removeClass(t.id, cp + 'Hover'); + }); + } + + t.onPostRender.dispatch(t, DOM.get(t.id)); + }, + + /** + * Destroys the ListBox i.e. clear memory and events. + * + * @method destroy + */ + destroy : function() { + this.parent(); + + Event.clear(this.id + '_text'); + Event.clear(this.id + '_open'); + } + }); +})(tinymce); \ No newline at end of file diff --git a/include/javascript/tiny_mce/classes/ui/Menu.js b/include/javascript/tiny_mce/classes/ui/Menu.js new file mode 100644 index 00000000..b2ae220c --- /dev/null +++ b/include/javascript/tiny_mce/classes/ui/Menu.js @@ -0,0 +1,186 @@ +/** + * Menu.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var is = tinymce.is, DOM = tinymce.DOM, each = tinymce.each, walk = tinymce.walk; + + /** + * This class is base class for all menu types like DropMenus etc. This class should not + * be instantiated directly other menu controls should inherit from this one. + * + * @class tinymce.ui.Menu + * @extends tinymce.ui.MenuItem + */ + tinymce.create('tinymce.ui.Menu:tinymce.ui.MenuItem', { + /** + * Constructs a new button control instance. + * + * @constructor + * @method Menu + * @param {String} id Button control id for the button. + * @param {Object} s Optional name/value settings object. + */ + Menu : function(id, s) { + var t = this; + + t.parent(id, s); + t.items = {}; + t.collapsed = false; + t.menuCount = 0; + t.onAddItem = new tinymce.util.Dispatcher(this); + }, + + /** + * Expands the menu, this will show them menu and all menu items. + * + * @method expand + * @param {Boolean} d Optional deep state. If this is set to true all children will be expanded as well. + */ + expand : function(d) { + var t = this; + + if (d) { + walk(t, function(o) { + if (o.expand) + o.expand(); + }, 'items', t); + } + + t.collapsed = false; + }, + + /** + * Collapses the menu, this will hide the menu and all menu items. + * + * @method collapse + * @param {Boolean} d Optional deep state. If this is set to true all children will be collapsed as well. + */ + collapse : function(d) { + var t = this; + + if (d) { + walk(t, function(o) { + if (o.collapse) + o.collapse(); + }, 'items', t); + } + + t.collapsed = true; + }, + + /** + * Returns true/false if the menu has been collapsed or not. + * + * @method isCollapsed + * @return {Boolean} True/false state if the menu has been collapsed or not. + */ + isCollapsed : function() { + return this.collapsed; + }, + + /** + * Adds a new menu, menu item or sub classes of them to the drop menu. + * + * @method add + * @param {tinymce.ui.Control} o Menu or menu item to add to the drop menu. + * @return {tinymce.ui.Control} Same as the input control, the menu or menu item. + */ + add : function(o) { + if (!o.settings) + o = new tinymce.ui.MenuItem(o.id || DOM.uniqueId(), o); + + this.onAddItem.dispatch(this, o); + + return this.items[o.id] = o; + }, + + /** + * Adds a menu separator between the menu items. + * + * @method addSeparator + * @return {tinymce.ui.MenuItem} Menu item instance for the separator. + */ + addSeparator : function() { + return this.add({separator : true}); + }, + + /** + * Adds a sub menu to the menu. + * + * @method addMenu + * @param {Object} o Menu control or a object with settings to be created into an control. + * @return {tinymce.ui.Menu} Menu control instance passed in or created. + */ + addMenu : function(o) { + if (!o.collapse) + o = this.createMenu(o); + + this.menuCount++; + + return this.add(o); + }, + + /** + * Returns true/false if the menu has sub menus or not. + * + * @method hasMenus + * @return {Boolean} True/false state if the menu has sub menues or not. + */ + hasMenus : function() { + return this.menuCount !== 0; + }, + + /** + * Removes a specific sub menu or menu item from the menu. + * + * @method remove + * @param {tinymce.ui.Control} o Menu item or menu to remove from menu. + * @return {tinymce.ui.Control} Control instance or null if it wasn't found. + */ + remove : function(o) { + delete this.items[o.id]; + }, + + /** + * Removes all menu items and sub menu items from the menu. + * + * @method removeAll + */ + removeAll : function() { + var t = this; + + walk(t, function(o) { + if (o.removeAll) + o.removeAll(); + else + o.remove(); + + o.destroy(); + }, 'items', t); + + t.items = {}; + }, + + /** + * Created a new sub menu for the menu control. + * + * @method createMenu + * @param {Object} s Optional name/value settings object. + * @return {tinymce.ui.Menu} New drop menu instance. + */ + createMenu : function(o) { + var m = new tinymce.ui.Menu(o.id || DOM.uniqueId(), o); + + m.onAddItem.add(this.onAddItem.dispatch, this.onAddItem); + + return m; + } + }); +})(tinymce); \ No newline at end of file diff --git a/include/javascript/tiny_mce/classes/ui/MenuButton.js b/include/javascript/tiny_mce/classes/ui/MenuButton.js new file mode 100644 index 00000000..5c121ca0 --- /dev/null +++ b/include/javascript/tiny_mce/classes/ui/MenuButton.js @@ -0,0 +1,176 @@ +/** + * MenuButton.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each; + + /** + * This class is used to create a UI button. A button is basically a link + * that is styled to look like a button or icon. + * + * @class tinymce.ui.MenuButton + * @extends tinymce.ui.Control + * @example + * // Creates a new plugin class and a custom menu button + * tinymce.create('tinymce.plugins.ExamplePlugin', { + * createControl: function(n, cm) { + * switch (n) { + * case 'mymenubutton': + * var c = cm.createSplitButton('mysplitbutton', { + * title : 'My menu button', + * image : 'some.gif' + * }); + * + * c.onRenderMenu.add(function(c, m) { + * m.add({title : 'Some title', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + * + * m.add({title : 'Some item 1', onclick : function() { + * alert('Some item 1 was clicked.'); + * }}); + * + * m.add({title : 'Some item 2', onclick : function() { + * alert('Some item 2 was clicked.'); + * }}); + * }); + * + * // Return the new menubutton instance + * return c; + * } + * + * return null; + * } + * }); + */ + tinymce.create('tinymce.ui.MenuButton:tinymce.ui.Button', { + /** + * Constructs a new split button control instance. + * + * @constructor + * @method MenuButton + * @param {String} id Control id for the split button. + * @param {Object} s Optional name/value settings object. + * @param {Editor} ed Optional the editor instance this button is for. + */ + MenuButton : function(id, s, ed) { + this.parent(id, s, ed); + + /** + * Fires when the menu is rendered. + * + * @event onRenderMenu + */ + this.onRenderMenu = new tinymce.util.Dispatcher(this); + + s.menu_container = s.menu_container || DOM.doc.body; + }, + + /** + * Shows the menu. + * + * @method showMenu + */ + showMenu : function() { + var t = this, p1, p2, e = DOM.get(t.id), m; + + if (t.isDisabled()) + return; + + if (!t.isMenuRendered) { + t.renderMenu(); + t.isMenuRendered = true; + } + + if (t.isMenuVisible) + return t.hideMenu(); + + p1 = DOM.getPos(t.settings.menu_container); + p2 = DOM.getPos(e); + + m = t.menu; + m.settings.offset_x = p2.x; + m.settings.offset_y = p2.y; + m.settings.vp_offset_x = p2.x; + m.settings.vp_offset_y = p2.y; + m.settings.keyboard_focus = t._focused; + m.showMenu(0, e.clientHeight); + + Event.add(DOM.doc, 'mousedown', t.hideMenu, t); + t.setState('Selected', 1); + + t.isMenuVisible = 1; + }, + + /** + * Renders the menu to the DOM. + * + * @method renderMenu + */ + renderMenu : function() { + var t = this, m; + + m = t.settings.control_manager.createDropMenu(t.id + '_menu', { + menu_line : 1, + 'class' : this.classPrefix + 'Menu', + icons : t.settings.icons + }); + + m.onHideMenu.add(function() { + t.hideMenu(); + t.focus(); + }); + + t.onRenderMenu.dispatch(t, m); + t.menu = m; + }, + + /** + * Hides the menu. The optional event parameter is used to check where the event occured so it + * doesn't close them menu if it was a event inside the menu. + * + * @method hideMenu + * @param {Event} e Optional event object. + */ + hideMenu : function(e) { + var t = this; + + // Prevent double toogles by canceling the mouse click event to the button + if (e && e.type == "mousedown" && DOM.getParent(e.target, function(e) {return e.id === t.id || e.id === t.id + '_open';})) + return; + + if (!e || !DOM.getParent(e.target, '.mceMenu')) { + t.setState('Selected', 0); + Event.remove(DOM.doc, 'mousedown', t.hideMenu, t); + if (t.menu) + t.menu.hideMenu(); + } + + t.isMenuVisible = 0; + }, + + /** + * Post render handler. This function will be called after the UI has been + * rendered so that events can be added. + * + * @method postRender + */ + postRender : function() { + var t = this, s = t.settings; + + Event.add(t.id, 'click', function() { + if (!t.isDisabled()) { + if (s.onclick) + s.onclick(t.value); + + t.showMenu(); + } + }); + } + }); +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/ui/MenuItem.js b/include/javascript/tiny_mce/classes/ui/MenuItem.js new file mode 100644 index 00000000..a6a145bc --- /dev/null +++ b/include/javascript/tiny_mce/classes/ui/MenuItem.js @@ -0,0 +1,74 @@ +/** + * MenuItem.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var is = tinymce.is, DOM = tinymce.DOM, each = tinymce.each, walk = tinymce.walk; + + /** + * This class is base class for all menu item types like DropMenus items etc. This class should not + * be instantiated directly other menu items should inherit from this one. + * + * @class tinymce.ui.MenuItem + * @extends tinymce.ui.Control + */ + tinymce.create('tinymce.ui.MenuItem:tinymce.ui.Control', { + /** + * Constructs a new button control instance. + * + * @constructor + * @method MenuItem + * @param {String} id Button control id for the button. + * @param {Object} s Optional name/value settings object. + */ + MenuItem : function(id, s) { + this.parent(id, s); + this.classPrefix = 'mceMenuItem'; + }, + + /** + * Sets the selected state for the control. This will add CSS classes to the + * element that contains the control. So that it can be selected visually. + * + * @method setSelected + * @param {Boolean} s Boolean state if the control should be selected or not. + */ + setSelected : function(s) { + this.setState('Selected', s); + this.setAriaProperty('checked', !!s); + this.selected = s; + }, + + /** + * Returns true/false if the control is selected or not. + * + * @method isSelected + * @return {Boolean} true/false if the control is selected or not. + */ + isSelected : function() { + return this.selected; + }, + + /** + * Post render handler. This function will be called after the UI has been + * rendered so that events can be added. + * + * @method postRender + */ + postRender : function() { + var t = this; + + t.parent(); + + // Set pending state + if (is(t.selected)) + t.setSelected(t.selected); + } + }); +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/ui/NativeListBox.js b/include/javascript/tiny_mce/classes/ui/NativeListBox.js new file mode 100644 index 00000000..e7b97657 --- /dev/null +++ b/include/javascript/tiny_mce/classes/ui/NativeListBox.js @@ -0,0 +1,212 @@ +/** + * NativeListBox.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, Dispatcher = tinymce.util.Dispatcher; + + /** + * This class is used to create list boxes/select list. This one will generate + * a native control the way that the browser produces them by default. + * + * @class tinymce.ui.NativeListBox + * @extends tinymce.ui.ListBox + */ + tinymce.create('tinymce.ui.NativeListBox:tinymce.ui.ListBox', { + /** + * Constructs a new button control instance. + * + * @constructor + * @method NativeListBox + * @param {String} id Button control id for the button. + * @param {Object} s Optional name/value settings object. + */ + NativeListBox : function(id, s) { + this.parent(id, s); + this.classPrefix = 'mceNativeListBox'; + }, + + /** + * Sets the disabled state for the control. This will add CSS classes to the + * element that contains the control. So that it can be disabled visually. + * + * @method setDisabled + * @param {Boolean} s Boolean state if the control should be disabled or not. + */ + setDisabled : function(s) { + DOM.get(this.id).disabled = s; + this.setAriaProperty('disabled', s); + }, + + /** + * Returns true/false if the control is disabled or not. This is a method since you can then + * choose to check some class or some internal bool state in subclasses. + * + * @method isDisabled + * @return {Boolean} true/false if the control is disabled or not. + */ + isDisabled : function() { + return DOM.get(this.id).disabled; + }, + + /** + * Selects a item/option by value. This will both add a visual selection to the + * item and change the title of the control to the title of the option. + * + * @method select + * @param {String/function} va Value to look for inside the list box or a function selector. + */ + select : function(va) { + var t = this, fv, f; + + if (va == undefined) + return t.selectByIndex(-1); + + // Is string or number make function selector + if (va && va.call) + f = va; + else { + f = function(v) { + return v == va; + }; + } + + // Do we need to do something? + if (va != t.selectedValue) { + // Find item + each(t.items, function(o, i) { + if (f(o.value)) { + fv = 1; + t.selectByIndex(i); + return false; + } + }); + + if (!fv) + t.selectByIndex(-1); + } + }, + + /** + * Selects a item/option by index. This will both add a visual selection to the + * item and change the title of the control to the title of the option. + * + * @method selectByIndex + * @param {String} idx Index to select, pass -1 to select menu/title of select box. + */ + selectByIndex : function(idx) { + DOM.get(this.id).selectedIndex = idx + 1; + this.selectedValue = this.items[idx] ? this.items[idx].value : null; + }, + + /** + * Adds a option item to the list box. + * + * @method add + * @param {String} n Title for the new option. + * @param {String} v Value for the new option. + * @param {Object} o Optional object with settings like for example class. + */ + add : function(n, v, a) { + var o, t = this; + + a = a || {}; + a.value = v; + + if (t.isRendered()) + DOM.add(DOM.get(this.id), 'option', a, n); + + o = { + title : n, + value : v, + attribs : a + }; + + t.items.push(o); + t.onAdd.dispatch(t, o); + }, + + /** + * Executes the specified callback function for the menu item. In this case when the user clicks the menu item. + * + * @method getLength + */ + getLength : function() { + return this.items.length; + }, + + /** + * Renders the list box as a HTML string. This method is much faster than using the DOM and when + * creating a whole toolbar with buttons it does make a lot of difference. + * + * @method renderHTML + * @return {String} HTML for the list box control element. + */ + renderHTML : function() { + var h, t = this; + + h = DOM.createHTML('option', {value : ''}, '-- ' + t.settings.title + ' --'); + + each(t.items, function(it) { + h += DOM.createHTML('option', {value : it.value}, it.title); + }); + + h = DOM.createHTML('select', {id : t.id, 'class' : 'mceNativeListBox', 'aria-labelledby': t.id + '_aria'}, h); + h += DOM.createHTML('span', {id : t.id + '_aria', 'style': 'display: none'}, t.settings.title); + return h; + }, + + /** + * Post render handler. This function will be called after the UI has been + * rendered so that events can be added. + * + * @method postRender + */ + postRender : function() { + var t = this, ch, changeListenerAdded = true; + + t.rendered = true; + + function onChange(e) { + var v = t.items[e.target.selectedIndex - 1]; + + if (v && (v = v.value)) { + t.onChange.dispatch(t, v); + + if (t.settings.onselect) + t.settings.onselect(v); + } + }; + + Event.add(t.id, 'change', onChange); + + // Accessibility keyhandler + Event.add(t.id, 'keydown', function(e) { + var bf; + + Event.remove(t.id, 'change', ch); + changeListenerAdded = false; + + bf = Event.add(t.id, 'blur', function() { + if (changeListenerAdded) return; + changeListenerAdded = true; + Event.add(t.id, 'change', onChange); + Event.remove(t.id, 'blur', bf); + }); + + if (e.keyCode == 13 || e.keyCode == 32) { + onChange(e); + return Event.cancel(e); + } + }); + + t.onPostRender.dispatch(t, DOM.get(t.id)); + } + }); +})(tinymce); \ No newline at end of file diff --git a/include/javascript/tiny_mce/classes/ui/Separator.js b/include/javascript/tiny_mce/classes/ui/Separator.js new file mode 100644 index 00000000..f254761d --- /dev/null +++ b/include/javascript/tiny_mce/classes/ui/Separator.js @@ -0,0 +1,42 @@ +/** + * Separator.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +/** + * This class is used to create vertical separator between other controls. + * + * @class tinymce.ui.Separator + * @extends tinymce.ui.Control + */ +tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { + /** + * Separator constructor. + * + * @constructor + * @method Separator + * @param {String} id Control id to use for the Separator. + * @param {Object} s Optional name/value settings object. + */ + Separator : function(id, s) { + this.parent(id, s); + this.classPrefix = 'mceSeparator'; + this.setDisabled(true); + }, + + /** + * Renders the separator as a HTML string. This method is much faster than using the DOM and when + * creating a whole toolbar with buttons it does make a lot of difference. + * + * @method renderHTML + * @return {String} HTML for the separator control element. + */ + renderHTML : function() { + return tinymce.DOM.createHTML('span', {'class' : this.classPrefix, role : 'separator', 'aria-orientation' : 'vertical', tabindex : '-1'}); + } +}); diff --git a/include/javascript/tiny_mce/classes/ui/SplitButton.js b/include/javascript/tiny_mce/classes/ui/SplitButton.js new file mode 100644 index 00000000..9f63f105 --- /dev/null +++ b/include/javascript/tiny_mce/classes/ui/SplitButton.js @@ -0,0 +1,154 @@ +/** + * SplitButton.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each; + + /** + * This class is used to create a split button. A button with a menu attached to it. + * + * @class tinymce.ui.SplitButton + * @extends tinymce.ui.Button + * @example + * // Creates a new plugin class and a custom split button + * tinymce.create('tinymce.plugins.ExamplePlugin', { + * createControl: function(n, cm) { + * switch (n) { + * case 'mysplitbutton': + * var c = cm.createSplitButton('mysplitbutton', { + * title : 'My split button', + * image : 'some.gif', + * onclick : function() { + * alert('Button was clicked.'); + * } + * }); + * + * c.onRenderMenu.add(function(c, m) { + * m.add({title : 'Some title', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + * + * m.add({title : 'Some item 1', onclick : function() { + * alert('Some item 1 was clicked.'); + * }}); + * + * m.add({title : 'Some item 2', onclick : function() { + * alert('Some item 2 was clicked.'); + * }}); + * }); + * + * // Return the new splitbutton instance + * return c; + * } + * + * return null; + * } + * }); + */ + tinymce.create('tinymce.ui.SplitButton:tinymce.ui.MenuButton', { + /** + * Constructs a new split button control instance. + * + * @constructor + * @method SplitButton + * @param {String} id Control id for the split button. + * @param {Object} s Optional name/value settings object. + * @param {Editor} ed Optional the editor instance this button is for. + */ + SplitButton : function(id, s, ed) { + this.parent(id, s, ed); + this.classPrefix = 'mceSplitButton'; + }, + + /** + * Renders the split button as a HTML string. This method is much faster than using the DOM and when + * creating a whole toolbar with buttons it does make a lot of difference. + * + * @method renderHTML + * @return {String} HTML for the split button control element. + */ + renderHTML : function() { + var h, t = this, s = t.settings, h1; + + h = ''; + + if (s.image) + h1 = DOM.createHTML('img ', {src : s.image, role: 'presentation', 'class' : 'mceAction ' + s['class']}); + else + h1 = DOM.createHTML('span', {'class' : 'mceAction ' + s['class']}, ''); + + h1 += DOM.createHTML('span', {'class': 'mceVoiceLabel mceIconOnly', id: t.id + '_voice', style: 'display:none;'}, s.title); + h += '' + DOM.createHTML('a', {role: 'button', id : t.id + '_action', tabindex: '-1', href : 'javascript:;', 'class' : 'mceAction ' + s['class'], onclick : "return false;", onmousedown : 'return false;', title : s.title}, h1) + ''; + + h1 = DOM.createHTML('span', {'class' : 'mceOpen ' + s['class']}, ''); + h += '' + DOM.createHTML('a', {role: 'button', id : t.id + '_open', tabindex: '-1', href : 'javascript:;', 'class' : 'mceOpen ' + s['class'], onclick : "return false;", onmousedown : 'return false;', title : s.title}, h1) + ''; + + h += ''; + h = DOM.createHTML('table', {id : t.id, role: 'presentation', tabindex: '0', 'class' : 'mceSplitButton mceSplitButtonEnabled ' + s['class'], cellpadding : '0', cellspacing : '0', title : s.title}, h); + return DOM.createHTML('span', {role: 'button', 'aria-labelledby': t.id + '_voice', 'aria-haspopup': 'true'}, h); + }, + + /** + * Post render handler. This function will be called after the UI has been + * rendered so that events can be added. + * + * @method postRender + */ + postRender : function() { + var t = this, s = t.settings, activate; + + if (s.onclick) { + activate = function(evt) { + if (!t.isDisabled()) { + s.onclick(t.value); + Event.cancel(evt); + } + }; + Event.add(t.id + '_action', 'click', activate); + Event.add(t.id, ['click', 'keydown'], function(evt) { + var DOM_VK_SPACE = 32, DOM_VK_ENTER = 14, DOM_VK_RETURN = 13, DOM_VK_UP = 38, DOM_VK_DOWN = 40; + if ((evt.keyCode === 32 || evt.keyCode === 13 || evt.keyCode === 14) && !evt.altKey && !evt.ctrlKey && !evt.metaKey) { + activate(); + Event.cancel(evt); + } else if (evt.type === 'click' || evt.keyCode === DOM_VK_DOWN) { + t.showMenu(); + Event.cancel(evt); + } + }); + } + + Event.add(t.id + '_open', 'click', function (evt) { + t.showMenu(); + Event.cancel(evt); + }); + Event.add([t.id, t.id + '_open'], 'focus', function() {t._focused = 1;}); + Event.add([t.id, t.id + '_open'], 'blur', function() {t._focused = 0;}); + + // Old IE doesn't have hover on all elements + if (tinymce.isIE6 || !DOM.boxModel) { + Event.add(t.id, 'mouseover', function() { + if (!DOM.hasClass(t.id, 'mceSplitButtonDisabled')) + DOM.addClass(t.id, 'mceSplitButtonHover'); + }); + + Event.add(t.id, 'mouseout', function() { + if (!DOM.hasClass(t.id, 'mceSplitButtonDisabled')) + DOM.removeClass(t.id, 'mceSplitButtonHover'); + }); + } + }, + + destroy : function() { + this.parent(); + + Event.clear(this.id + '_action'); + Event.clear(this.id + '_open'); + Event.clear(this.id); + } + }); +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/ui/Toolbar.js b/include/javascript/tiny_mce/classes/ui/Toolbar.js new file mode 100644 index 00000000..a78e589f --- /dev/null +++ b/include/javascript/tiny_mce/classes/ui/Toolbar.js @@ -0,0 +1,89 @@ +/** + * Toolbar.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { +// Shorten class names +var dom = tinymce.DOM, each = tinymce.each; +/** + * This class is used to create toolbars a toolbar is a container for other controls like buttons etc. + * + * @class tinymce.ui.Toolbar + * @extends tinymce.ui.Container + */ +tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { + /** + * Renders the toolbar as a HTML string. This method is much faster than using the DOM and when + * creating a whole toolbar with buttons it does make a lot of difference. + * + * @method renderHTML + * @return {String} HTML for the toolbar control. + */ + renderHTML : function() { + var t = this, h = '', c, co, s = t.settings, i, pr, nx, cl; + + cl = t.controls; + for (i=0; i')); + } + + // Add toolbar end before list box and after the previous button + // This is to fix the o2k7 editor skins + if (pr && co.ListBox) { + if (pr.Button || pr.SplitButton) + h += dom.createHTML('td', {'class' : 'mceToolbarEnd'}, dom.createHTML('span', null, '')); + } + + // Render control HTML + + // IE 8 quick fix, needed to propertly generate a hit area for anchors + if (dom.stdMode) + h += '' + co.renderHTML() + ''; + else + h += '' + co.renderHTML() + ''; + + // Add toolbar start after list box and before the next button + // This is to fix the o2k7 editor skins + if (nx && co.ListBox) { + if (nx.Button || nx.SplitButton) + h += dom.createHTML('td', {'class' : 'mceToolbarStart'}, dom.createHTML('span', null, '')); + } + } + + c = 'mceToolbarEnd'; + + if (co.Button) + c += ' mceToolbarEndButton'; + else if (co.SplitButton) + c += ' mceToolbarEndSplitButton'; + else if (co.ListBox) + c += ' mceToolbarEndListBox'; + + h += dom.createHTML('td', {'class' : c}, dom.createHTML('span', null, '')); + + return dom.createHTML('table', {id : t.id, 'class' : 'mceToolbar' + (s['class'] ? ' ' + s['class'] : ''), cellpadding : '0', cellspacing : '0', align : t.settings.align || '', role: 'presentation', tabindex: '-1'}, '' + h + ''); + } +}); +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/ui/ToolbarGroup.js b/include/javascript/tiny_mce/classes/ui/ToolbarGroup.js new file mode 100644 index 00000000..1be1e1db --- /dev/null +++ b/include/javascript/tiny_mce/classes/ui/ToolbarGroup.js @@ -0,0 +1,76 @@ +/** + * ToolbarGroup.js + * + * Copyright 2010, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { +// Shorten class names +var dom = tinymce.DOM, each = tinymce.each, Event = tinymce.dom.Event; +/** + * This class is used to group a set of toolbars together and control the keyboard navigation and focus. + * + * @class tinymce.ui.ToolbarGroup + * @extends tinymce.ui.Container + */ +tinymce.create('tinymce.ui.ToolbarGroup:tinymce.ui.Container', { + /** + * Renders the toolbar group as a HTML string. + * + * @method renderHTML + * @return {String} HTML for the toolbar control. + */ + renderHTML : function() { + var t = this, h = [], controls = t.controls, each = tinymce.each, settings = t.settings; + + h.push('
    '); + //TODO: ACC test this out - adding a role = application for getting the landmarks working well. + h.push(""); + h.push(''); + each(controls, function(toolbar) { + h.push(toolbar.renderHTML()); + }); + h.push(""); + h.push('
    '); + + return h.join(''); + }, + + focus : function() { + this.keyNav.focus(); + }, + + postRender : function() { + var t = this, items = []; + + each(t.controls, function(toolbar) { + each (toolbar.controls, function(control) { + if (control.id) { + items.push(control); + } + }); + }); + + t.keyNav = new tinymce.ui.KeyboardNavigation({ + root: t.id, + items: items, + onCancel: function() { + t.editor.focus(); + }, + excludeFromTabOrder: !t.settings.tab_focus_toolbar + }); + }, + + destroy : function() { + var self = this; + + self.parent(); + self.keyNav.destroy(); + Event.clear(self.id); + } +}); +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/util/Cookie.js b/include/javascript/tiny_mce/classes/util/Cookie.js new file mode 100644 index 00000000..4004df20 --- /dev/null +++ b/include/javascript/tiny_mce/classes/util/Cookie.js @@ -0,0 +1,138 @@ +/** + * Cookie.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var each = tinymce.each; + + /** + * This class contains simple cookie manangement functions. + * + * @class tinymce.util.Cookie + * @static + * @example + * // Gets a cookie from the browser + * console.debug(tinymce.util.Cookie.get('mycookie')); + * + * // Gets a hash table cookie from the browser and takes out the x parameter from it + * console.debug(tinymce.util.Cookie.getHash('mycookie').x); + * + * // Sets a hash table cookie to the browser + * tinymce.util.Cookie.setHash({x : '1', y : '2'}); + */ + tinymce.create('static tinymce.util.Cookie', { + /** + * Parses the specified query string into an name/value object. + * + * @method getHash + * @param {String} n String to parse into a n Hashtable object. + * @return {Object} Name/Value object with items parsed from querystring. + */ + getHash : function(n) { + var v = this.get(n), h; + + if (v) { + each(v.split('&'), function(v) { + v = v.split('='); + h = h || {}; + h[unescape(v[0])] = unescape(v[1]); + }); + } + + return h; + }, + + /** + * Sets a hashtable name/value object to a cookie. + * + * @method setHash + * @param {String} n Name of the cookie. + * @param {Object} v Hashtable object to set as cookie. + * @param {Date} e Optional date object for the expiration of the cookie. + * @param {String} p Optional path to restrict the cookie to. + * @param {String} d Optional domain to restrict the cookie to. + * @param {String} s Is the cookie secure or not. + */ + setHash : function(n, v, e, p, d, s) { + var o = ''; + + each(v, function(v, k) { + o += (!o ? '' : '&') + escape(k) + '=' + escape(v); + }); + + this.set(n, o, e, p, d, s); + }, + + /** + * Gets the raw data of a cookie by name. + * + * @method get + * @param {String} n Name of cookie to retrive. + * @return {String} Cookie data string. + */ + get : function(n) { + var c = document.cookie, e, p = n + "=", b; + + // Strict mode + if (!c) + return; + + b = c.indexOf("; " + p); + + if (b == -1) { + b = c.indexOf(p); + + if (b != 0) + return null; + } else + b += 2; + + e = c.indexOf(";", b); + + if (e == -1) + e = c.length; + + return unescape(c.substring(b + p.length, e)); + }, + + /** + * Sets a raw cookie string. + * + * @method set + * @param {String} n Name of the cookie. + * @param {String} v Raw cookie data. + * @param {Date} e Optional date object for the expiration of the cookie. + * @param {String} p Optional path to restrict the cookie to. + * @param {String} d Optional domain to restrict the cookie to. + * @param {String} s Is the cookie secure or not. + */ + set : function(n, v, e, p, d, s) { + document.cookie = n + "=" + escape(v) + + ((e) ? "; expires=" + e.toGMTString() : "") + + ((p) ? "; path=" + escape(p) : "") + + ((d) ? "; domain=" + d : "") + + ((s) ? "; secure" : ""); + }, + + /** + * Removes/deletes a cookie by name. + * + * @method remove + * @param {String} n Cookie name to remove/delete. + * @param {Strong} p Optional path to remove the cookie from. + */ + remove : function(n, p) { + var d = new Date(); + + d.setTime(d.getTime() - 1000); + + this.set(n, '', d, p, d); + } + }); +})(); diff --git a/include/javascript/tiny_mce/classes/util/Dispatcher.js b/include/javascript/tiny_mce/classes/util/Dispatcher.js new file mode 100644 index 00000000..4ffdf5aa --- /dev/null +++ b/include/javascript/tiny_mce/classes/util/Dispatcher.js @@ -0,0 +1,112 @@ +/** + * Dispatcher.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +/** + * This class is used to dispatch event to observers/listeners. + * All internal events inside TinyMCE uses this class. + * + * @class tinymce.util.Dispatcher + * @example + * // Creates a custom event + * this.onSomething = new tinymce.util.Dispatcher(this); + * + * // Dispatch/fire the event + * this.onSomething.dispatch('some string'); + */ +tinymce.create('tinymce.util.Dispatcher', { + scope : null, + listeners : null, + + /** + * Constructs a new event dispatcher object. + * + * @constructor + * @method Dispatcher + * @param {Object} s Optional default execution scope for all observer functions. + */ + Dispatcher : function(s) { + this.scope = s || this; + this.listeners = []; + }, + + /** + * Add an observer function to be executed when a dispatch call is done. + * + * @method add + * @param {function} cb Callback function to execute when a dispatch event occurs. + * @param {Object} s Optional execution scope, defaults to the one specified in the class constructor. + * @return {function} Returns the same function as the one passed on. + */ + add : function(cb, s) { + this.listeners.push({cb : cb, scope : s || this.scope}); + + return cb; + }, + + /** + * Add an observer function to be executed to the top of the list of observers. + * + * @method addToTop + * @param {function} cb Callback function to execute when a dispatch event occurs. + * @param {Object} s Optional execution scope, defaults to the one specified in the class constructor. + * @return {function} Returns the same function as the one passed on. + */ + addToTop : function(cb, s) { + this.listeners.unshift({cb : cb, scope : s || this.scope}); + + return cb; + }, + + /** + * Removes an observer function. + * + * @method remove + * @param {function} cb Observer function to remove. + * @return {function} The same function that got passed in or null if it wasn't found. + */ + remove : function(cb) { + var l = this.listeners, o = null; + + tinymce.each(l, function(c, i) { + if (cb == c.cb) { + o = cb; + l.splice(i, 1); + return false; + } + }); + + return o; + }, + + /** + * Dispatches an event to all observers/listeners. + * + * @method dispatch + * @param {Object} .. Any number of arguments to dispatch. + * @return {Object} Last observer functions return value. + */ + dispatch : function() { + var s, a = arguments, i, li = this.listeners, c; + + // Needs to be a real loop since the listener count might change while looping + // And this is also more efficient + for (i = 0; i 0 ? ',' : '') + serialize(o[i], quote); + + return v + ']'; + } + + v = '{'; + + for (i in o) + v += typeof o[i] != 'function' ? (v.length > 1 ? ',' + quote : quote) + i + quote +':' + serialize(o[i], quote) : ''; + + return v + '}'; + } + + return '' + o; + }; + + /** + * JSON parser and serializer class. + * + * @class tinymce.util.JSON + * @static + * @example + * // JSON parse a string into an object + * var obj = tinymce.util.JSON.parse(somestring); + * + * // JSON serialize a object into an string + * var str = tinymce.util.JSON.serialize(obj); + */ + tinymce.util.JSON = { + /** + * Serializes the specified object as a JSON string. + * + * @method serialize + * @param {Object} obj Object to serialize as a JSON string. + * @param {String} quote Optional quote string defaults to ". + * @return {string} JSON string serialized from input. + */ + serialize: serialize, + + /** + * Unserializes/parses the specified JSON string into a object. + * + * @method parse + * @param {string} s JSON String to parse into a JavaScript object. + * @return {Object} Object from input JSON string or undefined if it failed. + */ + parse: function(s) { + try { + return eval('(' + s + ')'); + } catch (ex) { + // Ignore + } + } + + /**#@-*/ + }; +})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/classes/util/JSONP.js b/include/javascript/tiny_mce/classes/util/JSONP.js new file mode 100644 index 00000000..8fa6d2d5 --- /dev/null +++ b/include/javascript/tiny_mce/classes/util/JSONP.js @@ -0,0 +1,28 @@ +/** + * JSONP.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +tinymce.create('static tinymce.util.JSONP', { + callbacks : {}, + count : 0, + + send : function(o) { + var t = this, dom = tinymce.DOM, count = o.count !== undefined ? o.count : t.count, id = 'tinymce_jsonp_' + count; + + t.callbacks[count] = function(json) { + dom.remove(id); + delete t.callbacks[count]; + + o.callback(json); + }; + + dom.add(dom.doc.body, 'script', {id : id , src : o.url, type : 'text/javascript'}); + t.count++; + } +}); diff --git a/include/javascript/tiny_mce/classes/util/JSONRequest.js b/include/javascript/tiny_mce/classes/util/JSONRequest.js new file mode 100644 index 00000000..6af6e824 --- /dev/null +++ b/include/javascript/tiny_mce/classes/util/JSONRequest.js @@ -0,0 +1,112 @@ +/** + * JSONRequest.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var extend = tinymce.extend, JSON = tinymce.util.JSON, XHR = tinymce.util.XHR; + + /** + * This class enables you to use JSON-RPC to call backend methods. + * + * @class tinymce.util.JSONRequest + * @example + * var json = new tinymce.util.JSONRequest({ + * url : 'somebackend.php' + * }); + * + * // Send RPC call 1 + * json.send({ + * method : 'someMethod1', + * params : ['a', 'b'], + * success : function(result) { + * console.dir(result); + * } + * }); + * + * // Send RPC call 2 + * json.send({ + * method : 'someMethod2', + * params : ['a', 'b'], + * success : function(result) { + * console.dir(result); + * } + * }); + */ + tinymce.create('tinymce.util.JSONRequest', { + /** + * Constructs a new JSONRequest instance. + * + * @constructor + * @method JSONRequest + * @param {Object} s Optional settings object. + */ + JSONRequest : function(s) { + this.settings = extend({ + }, s); + this.count = 0; + }, + + /** + * Sends a JSON-RPC call. Consult the Wiki API documentation for more details on what you can pass to this function. + * + * @method send + * @param {Object} o Call object where there are three field id, method and params this object should also contain callbacks etc. + */ + send : function(o) { + var ecb = o.error, scb = o.success; + + o = extend(this.settings, o); + + o.success = function(c, x) { + c = JSON.parse(c); + + if (typeof(c) == 'undefined') { + c = { + error : 'JSON Parse error.' + }; + } + + if (c.error) + ecb.call(o.error_scope || o.scope, c.error, x); + else + scb.call(o.success_scope || o.scope, c.result); + }; + + o.error = function(ty, x) { + if (ecb) + ecb.call(o.error_scope || o.scope, ty, x); + }; + + o.data = JSON.serialize({ + id : o.id || 'c' + (this.count++), + method : o.method, + params : o.params + }); + + // JSON content type for Ruby on rails. Bug: #1883287 + o.content_type = 'application/json'; + + XHR.send(o); + }, + + 'static' : { + /** + * Simple helper function to send a JSON-RPC request without the need to initialize an object. + * Consult the Wiki API documentation for more details on what you can pass to this function. + * + * @method sendRPC + * @static + * @param {Object} o Call object where there are three field id, method and params this object should also contain callbacks etc. + */ + sendRPC : function(o) { + return new tinymce.util.JSONRequest().send(o); + } + } + }); +}()); \ No newline at end of file diff --git a/include/javascript/tiny_mce/classes/util/URI.js b/include/javascript/tiny_mce/classes/util/URI.js new file mode 100644 index 00000000..f07aa82e --- /dev/null +++ b/include/javascript/tiny_mce/classes/util/URI.js @@ -0,0 +1,309 @@ +/** + * URI.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var each = tinymce.each; + + /** + * This class handles parsing, modification and serialization of URI/URL strings. + * @class tinymce.util.URI + */ + tinymce.create('tinymce.util.URI', { + /** + * Constucts a new URI instance. + * + * @constructor + * @method URI + * @param {String} u URI string to parse. + * @param {Object} s Optional settings object. + */ + URI : function(u, s) { + var t = this, o, a, b; + + // Trim whitespace + u = tinymce.trim(u); + + // Default settings + s = t.settings = s || {}; + + // Strange app protocol or local anchor + if (/^(mailto|tel|news|javascript|about|data):/i.test(u) || /^\s*#/.test(u)) { + t.source = u; + return; + } + + // Absolute path with no host, fake host and protocol + if (u.indexOf('/') === 0 && u.indexOf('//') !== 0) + u = (s.base_uri ? s.base_uri.protocol || 'http' : 'http') + '://mce_host' + u; + + // Relative path http:// or protocol relative //path + if (!/^\w*:?\/\//.test(u)) + u = (s.base_uri.protocol || 'http') + '://mce_host' + t.toAbsPath(s.base_uri.path, u); + + // Parse URL (Credits goes to Steave, http://blog.stevenlevithan.com/archives/parseuri) + u = u.replace(/@@/g, '(mce_at)'); // Zope 3 workaround, they use @@something + u = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(u); + each(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"], function(v, i) { + var s = u[i]; + + // Zope 3 workaround, they use @@something + if (s) + s = s.replace(/\(mce_at\)/g, '@@'); + + t[v] = s; + }); + + if (b = s.base_uri) { + if (!t.protocol) + t.protocol = b.protocol; + + if (!t.userInfo) + t.userInfo = b.userInfo; + + if (!t.port && t.host == 'mce_host') + t.port = b.port; + + if (!t.host || t.host == 'mce_host') + t.host = b.host; + + t.source = ''; + } + + //t.path = t.path || '/'; + }, + + /** + * Sets the internal path part of the URI. + * + * @method setPath + * @param {string} p Path string to set. + */ + setPath : function(p) { + var t = this; + + p = /^(.*?)\/?(\w+)?$/.exec(p); + + // Update path parts + t.path = p[0]; + t.directory = p[1]; + t.file = p[2]; + + // Rebuild source + t.source = ''; + t.getURI(); + }, + + /** + * Converts the specified URI into a relative URI based on the current URI instance location. + * + * @method toRelative + * @param {String} u URI to convert into a relative path/URI. + * @return {String} Relative URI from the point specified in the current URI instance. + * @example + * // Converts an absolute URL to an relative URL url will be somedir/somefile.htm + * var url = new tinymce.util.URI('http://www.site.com/dir/').toRelative('http://www.site.com/dir/somedir/somefile.htm'); + */ + toRelative : function(u) { + var t = this, o; + + if (u === "./") + return u; + + u = new tinymce.util.URI(u, {base_uri : t}); + + // Not on same domain/port or protocol + if ((u.host != 'mce_host' && t.host != u.host && u.host) || t.port != u.port || t.protocol != u.protocol) + return u.getURI(); + + o = t.toRelPath(t.path, u.path); + + // Add query + if (u.query) + o += '?' + u.query; + + // Add anchor + if (u.anchor) + o += '#' + u.anchor; + + return o; + }, + + /** + * Converts the specified URI into a absolute URI based on the current URI instance location. + * + * @method toAbsolute + * @param {String} u URI to convert into a relative path/URI. + * @param {Boolean} nh No host and protocol prefix. + * @return {String} Absolute URI from the point specified in the current URI instance. + * @example + * // Converts an relative URL to an absolute URL url will be http://www.site.com/dir/somedir/somefile.htm + * var url = new tinymce.util.URI('http://www.site.com/dir/').toAbsolute('somedir/somefile.htm'); + */ + toAbsolute : function(u, nh) { + var u = new tinymce.util.URI(u, {base_uri : this}); + + return u.getURI(this.host == u.host && this.protocol == u.protocol ? nh : 0); + }, + + /** + * Converts a absolute path into a relative path. + * + * @method toRelPath + * @param {String} base Base point to convert the path from. + * @param {String} path Absolute path to convert into a relative path. + */ + toRelPath : function(base, path) { + var items, bp = 0, out = '', i, l; + + // Split the paths + base = base.substring(0, base.lastIndexOf('/')); + base = base.split('/'); + items = path.split('/'); + + if (base.length >= items.length) { + for (i = 0, l = base.length; i < l; i++) { + if (i >= items.length || base[i] != items[i]) { + bp = i + 1; + break; + } + } + } + + if (base.length < items.length) { + for (i = 0, l = items.length; i < l; i++) { + if (i >= base.length || base[i] != items[i]) { + bp = i + 1; + break; + } + } + } + + if (bp == 1) + return path; + + for (i = 0, l = base.length - (bp - 1); i < l; i++) + out += "../"; + + for (i = bp - 1, l = items.length; i < l; i++) { + if (i != bp - 1) + out += "/" + items[i]; + else + out += items[i]; + } + + return out; + }, + + /** + * Converts a relative path into a absolute path. + * + * @method toAbsPath + * @param {String} base Base point to convert the path from. + * @param {String} path Relative path to convert into an absolute path. + */ + toAbsPath : function(base, path) { + var i, nb = 0, o = [], tr, outPath; + + // Split paths + tr = /\/$/.test(path) ? '/' : ''; + base = base.split('/'); + path = path.split('/'); + + // Remove empty chunks + each(base, function(k) { + if (k) + o.push(k); + }); + + base = o; + + // Merge relURLParts chunks + for (i = path.length - 1, o = []; i >= 0; i--) { + // Ignore empty or . + if (path[i].length == 0 || path[i] == ".") + continue; + + // Is parent + if (path[i] == '..') { + nb++; + continue; + } + + // Move up + if (nb > 0) { + nb--; + continue; + } + + o.push(path[i]); + } + + i = base.length - nb; + + // If /a/b/c or / + if (i <= 0) + outPath = o.reverse().join('/'); + else + outPath = base.slice(0, i).join('/') + '/' + o.reverse().join('/'); + + // Add front / if it's needed + if (outPath.indexOf('/') !== 0) + outPath = '/' + outPath; + + // Add traling / if it's needed + if (tr && outPath.lastIndexOf('/') !== outPath.length - 1) + outPath += tr; + + return outPath; + }, + + /** + * Returns the full URI of the internal structure. + * + * @method getURI + * @param {Boolean} nh Optional no host and protocol part. Defaults to false. + */ + getURI : function(nh) { + var s, t = this; + + // Rebuild source + if (!t.source || nh) { + s = ''; + + if (!nh) { + if (t.protocol) + s += t.protocol + '://'; + + if (t.userInfo) + s += t.userInfo + '@'; + + if (t.host) + s += t.host; + + if (t.port) + s += ':' + t.port; + } + + if (t.path) + s += t.path; + + if (t.query) + s += '?' + t.query; + + if (t.anchor) + s += '#' + t.anchor; + + t.source = s; + } + + return t.source; + } + }); +})(); diff --git a/include/javascript/tiny_mce/classes/util/XHR.js b/include/javascript/tiny_mce/classes/util/XHR.js new file mode 100644 index 00000000..779c3d06 --- /dev/null +++ b/include/javascript/tiny_mce/classes/util/XHR.js @@ -0,0 +1,88 @@ +/** + * XHR.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +/** + * This class enables you to send XMLHTTPRequests cross browser. + * @class tinymce.util.XHR + * @static + * @example + * // Sends a low level Ajax request + * tinymce.util.XHR.send({ + * url : 'someurl', + * success : function(text) { + * console.debug(text); + * } + * }); + */ +tinymce.create('static tinymce.util.XHR', { + /** + * Sends a XMLHTTPRequest. + * Consult the Wiki for details on what settings this method takes. + * + * @method send + * @param {Object} o Object will target URL, callbacks and other info needed to make the request. + */ + send : function(o) { + var x, t, w = window, c = 0; + + // Default settings + o.scope = o.scope || this; + o.success_scope = o.success_scope || o.scope; + o.error_scope = o.error_scope || o.scope; + o.async = o.async === false ? false : true; + o.data = o.data || ''; + + function get(s) { + x = 0; + + try { + x = new ActiveXObject(s); + } catch (ex) { + } + + return x; + }; + + x = w.XMLHttpRequest ? new XMLHttpRequest() : get('Microsoft.XMLHTTP') || get('Msxml2.XMLHTTP'); + + if (x) { + if (x.overrideMimeType) + x.overrideMimeType(o.content_type); + + x.open(o.type || (o.data ? 'POST' : 'GET'), o.url, o.async); + + if (o.content_type) + x.setRequestHeader('Content-Type', o.content_type); + + x.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); + + x.send(o.data); + + function ready() { + if (!o.async || x.readyState == 4 || c++ > 10000) { + if (o.success && c < 10000 && x.status == 200) + o.success.call(o.success_scope, '' + x.responseText, x, o); + else if (o.error) + o.error.call(o.error_scope, c > 10000 ? 'TIMED_OUT' : 'GENERAL', x, o); + + x = null; + } else + w.setTimeout(ready, 10); + }; + + // Syncronous request + if (!o.async) + return ready(); + + // Wait for response, onReadyStateChange can not be used since it leaks memory in IE + t = w.setTimeout(ready, 10); + } + } +}); diff --git a/include/javascript/tiny_mce/jquery.tinymce.js b/include/javascript/tiny_mce/jquery.tinymce.js new file mode 100644 index 00000000..8e61a3cd --- /dev/null +++ b/include/javascript/tiny_mce/jquery.tinymce.js @@ -0,0 +1 @@ +(function(b){var e,d,a=[],c=window;b.fn.tinymce=function(j){var p=this,g,k,h,m,i,l="",n="";if(!p.length){return p}if(!j){return tinyMCE.get(p[0].id)}p.css("visibility","hidden");function o(){var r=[],q=0;if(f){f();f=null}p.each(function(t,u){var s,w=u.id,v=j.oninit;if(!w){u.id=w=tinymce.DOM.uniqueId()}s=new tinymce.Editor(w,j);r.push(s);s.onInit.add(function(){var x,y=v;p.css("visibility","");if(v){if(++q==r.length){if(tinymce.is(y,"string")){x=(y.indexOf(".")===-1)?null:tinymce.resolve(y.replace(/\.\w+$/,""));y=tinymce.resolve(y)}y.apply(x||tinymce,r)}}})});b.each(r,function(t,s){s.render()})}if(!c.tinymce&&!d&&(g=j.script_url)){d=1;h=g.substring(0,g.lastIndexOf("/"));if(/_(src|dev)\.js/g.test(g)){n="_src"}m=g.lastIndexOf("?");if(m!=-1){l=g.substring(m+1)}c.tinyMCEPreInit=c.tinyMCEPreInit||{base:h,suffix:n,query:l};if(g.indexOf("gzip")!=-1){i=j.language||"en";g=g+(/\?/.test(g)?"&":"?")+"js=true&core=true&suffix="+escape(n)+"&themes="+escape(j.theme)+"&plugins="+escape(j.plugins)+"&languages="+i;if(!c.tinyMCE_GZ){tinyMCE_GZ={start:function(){tinymce.suffix=n;function q(r){tinymce.ScriptLoader.markDone(tinyMCE.baseURI.toAbsolute(r))}q("langs/"+i+".js");q("themes/"+j.theme+"/editor_template"+n+".js");q("themes/"+j.theme+"/langs/"+i+".js");b.each(j.plugins.split(","),function(s,r){if(r){q("plugins/"+r+"/editor_plugin"+n+".js");q("plugins/"+r+"/langs/"+i+".js")}})},end:function(){}}}}b.ajax({type:"GET",url:g,dataType:"script",cache:true,success:function(){tinymce.dom.Event.domLoaded=1;d=2;if(j.script_loaded){j.script_loaded()}o();b.each(a,function(q,r){r()})}})}else{if(d===1){a.push(o)}else{o()}}return p};b.extend(b.expr[":"],{tinymce:function(g){return g.id&&!!tinyMCE.get(g.id)}});function f(){function i(l){if(l==="remove"){this.each(function(n,o){var m=h(o);if(m){m.remove()}})}this.find("span.mceEditor,div.mceEditor").each(function(n,o){var m=tinyMCE.get(o.id.replace(/_parent$/,""));if(m){m.remove()}})}function k(n){var m=this,l;if(n!==e){i.call(m);m.each(function(p,q){var o;if(o=tinyMCE.get(q.id)){o.setContent(n)}})}else{if(m.length>0){if(l=tinyMCE.get(m[0].id)){return l.getContent()}}}}function h(m){var l=null;(m)&&(m.id)&&(c.tinymce)&&(l=tinyMCE.get(m.id));return l}function g(l){return !!((l)&&(l.length)&&(c.tinymce)&&(l.is(":tinymce")))}var j={};b.each(["text","html","val"],function(n,l){var o=j[l]=b.fn[l],m=(l==="text");b.fn[l]=function(s){var p=this;if(!g(p)){return o.apply(p,arguments)}if(s!==e){k.call(p.filter(":tinymce"),s);o.apply(p.not(":tinymce"),arguments);return p}else{var r="";var q=arguments;(m?p:p.eq(0)).each(function(u,v){var t=h(v);r+=t?(m?t.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):t.getContent()):o.apply(b(v),q)});return r}}});b.each(["append","prepend"],function(n,m){var o=j[m]=b.fn[m],l=(m==="prepend");b.fn[m]=function(q){var p=this;if(!g(p)){return o.apply(p,arguments)}if(q!==e){p.filter(":tinymce").each(function(s,t){var r=h(t);r&&r.setContent(l?q+r.getContent():r.getContent()+q)});o.apply(p.not(":tinymce"),arguments);return p}}});b.each(["remove","replaceWith","replaceAll","empty"],function(m,l){var n=j[l]=b.fn[l];b.fn[l]=function(){i.call(this,l);return n.apply(this,arguments)}});j.attr=b.fn.attr;b.fn.attr=function(n,q,o){var m=this;if((!n)||(n!=="value")||(!g(m))){return j.attr.call(m,n,q,o)}if(q!==e){k.call(m.filter(":tinymce"),q);j.attr.call(m.not(":tinymce"),n,q,o);return m}else{var p=m[0],l=h(p);return l?l.getContent():j.attr.call(b(p),n,q,o)}}}})(jQuery); \ No newline at end of file diff --git a/include/javascript/tiny_mce/langs/en.js b/include/javascript/tiny_mce/langs/en.js index ef3e18af..3b3e1381 100644 --- a/include/javascript/tiny_mce/langs/en.js +++ b/include/javascript/tiny_mce/langs/en.js @@ -12,9 +12,54 @@ not_set:"-- Not set --", clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?", clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.", popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.", -invalid_data:"Error: Invalid values entered, these are marked in red.", +invalid_data:"{#field} is invalid", +invalid_data_number:"{#field} must be a number", +invalid_data_min:"{#field} must be a number greater than {#min}", +invalid_data_size:"{#field} must be a number or percentage", more_colors:"More colors" }, +colors:{ +'000000':'Black', +'993300':'Burnt orange', +'333300':'Dark olive', +'003300':'Dark green', +'003366':'Dark azure', +'000080':'Navy Blue', +'333399':'Indigo', +'333333':'Very dark gray', +'800000':'Maroon', +'FF6600':'Orange', +'808000':'Olive', +'008000':'Green', +'008080':'Teal', +'0000FF':'Blue', +'666699':'Grayish blue', +'808080':'Gray', +'FF0000':'Red', +'FF9900':'Amber', +'99CC00':'Yellow green', +'339966':'Sea green', +'33CCCC':'Turquoise', +'3366FF':'Royal blue', +'800080':'Purple', +'999999':'Medium gray', +'FF00FF':'Magenta', +'FFCC00':'Gold', +'FFFF00':'Yellow', +'00FF00':'Lime', +'00FFFF':'Aqua', +'00CCFF':'Sky blue', +'993366':'Brown', +'C0C0C0':'Silver', +'FF99CC':'Pink', +'FFCC99':'Peach', +'FFFF99':'Light yellow', +'CCFFCC':'Pale green', +'CCFFFF':'Pale cyan', +'99CCFF':'Light sky blue', +'CC99FF':'Plum', +'FFFFFF':'White' +}, contextmenu:{ align:"Alignment", left:"Left", @@ -90,7 +135,9 @@ desc:"Edit CSS Style" paste:{ paste_text_desc:"Paste as Plain Text", paste_word_desc:"Paste from Word", -selectall_desc:"Select All" +selectall_desc:"Select All", +plaintext_mode_sticky:"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.", +plaintext_mode:"Paste is now in plain text mode. Click again to toggle back to regular paste mode." }, paste_dlg:{ text_title:"Use CTRL+V on your keyboard to paste the text into the window.", @@ -120,7 +167,9 @@ col:"Column", cell:"Cell" }, autosave:{ -unload_msg:"The changes you made will be lost if you navigate away from this page." +unload_msg:"The changes you made will be lost if you navigate away from this page.", +restore_content:"Restore auto-saved content.", +warning_message:"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?." }, fullscreen:{ desc:"Toggle fullscreen mode" @@ -147,8 +196,28 @@ langs:"Languages", wait:"Please wait...", sug:"Suggestions", no_sug:"No suggestions", -no_mpell:"No misspellings found." +no_mpell:"No misspellings found.", +learn_word:"Learn word" }, pagebreak:{ desc:"Insert page break." -}}}); \ No newline at end of file +}, +advlist:{ +types:"Types", +def:"Default", +lower_alpha:"Lower alpha", +lower_greek:"Lower greek", +lower_roman:"Lower roman", +upper_alpha:"Upper alpha", +upper_roman:"Upper roman", +circle:"Circle", +disc:"Disc", +square:"Square" +}, +aria:{ +rich_text_area:"Rich Text Area" +}, +wordcount:{ +words: 'Words: ' +} +}}); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/advhr/editor_plugin.js b/include/javascript/tiny_mce/plugins/advhr/editor_plugin.js index f3350043..4d3b062d 100644 --- a/include/javascript/tiny_mce/plugins/advhr/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/advhr/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.AdvancedHRPlugin',{init:function(ed,url){ed.addCommand('mceAdvancedHr',function(){ed.windowManager.open({file:url+'/rule.htm',width:250+parseInt(ed.getLang('advhr.delta_width',0)),height:160+parseInt(ed.getLang('advhr.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('advhr',{title:'advhr.advhr_desc',cmd:'mceAdvancedHr'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('advhr',n.nodeName=='HR');});ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName==='HR')ed.selection.select(e);});},getInfo:function(){return{longname:'Advanced HR',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('advhr',tinymce.plugins.AdvancedHRPlugin);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.AdvancedHRPlugin",{init:function(a,b){a.addCommand("mceAdvancedHr",function(){a.windowManager.open({file:b+"/rule.htm",width:250+parseInt(a.getLang("advhr.delta_width",0)),height:160+parseInt(a.getLang("advhr.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("advhr",{title:"advhr.advhr_desc",cmd:"mceAdvancedHr"});a.onNodeChange.add(function(d,c,e){c.setActive("advhr",e.nodeName=="HR")});a.onClick.add(function(c,d){d=d.target;if(d.nodeName==="HR"){c.selection.select(d)}})},getInfo:function(){return{longname:"Advanced HR",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advhr",tinymce.plugins.AdvancedHRPlugin)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/advhr/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/advhr/editor_plugin_src.js index 6be3122b..5a4b7250 100644 --- a/include/javascript/tiny_mce/plugins/advhr/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/advhr/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { diff --git a/include/javascript/tiny_mce/plugins/advhr/langs/en_dlg.js b/include/javascript/tiny_mce/plugins/advhr/langs/en_dlg.js index eec74dbd..671f49d8 100644 --- a/include/javascript/tiny_mce/plugins/advhr/langs/en_dlg.js +++ b/include/javascript/tiny_mce/plugins/advhr/langs/en_dlg.js @@ -1,5 +1,7 @@ tinyMCE.addI18n('en.advhr_dlg',{ +normal:"Normal", width:"Width", +widthunits:"Units", size:"Height", noshade:"No shadow" }); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/advhr/rule.htm b/include/javascript/tiny_mce/plugins/advhr/rule.htm index c42b9e15..11d36513 100644 --- a/include/javascript/tiny_mce/plugins/advhr/rule.htm +++ b/include/javascript/tiny_mce/plugins/advhr/rule.htm @@ -7,56 +7,51 @@ - - +
    - - - - - - - - - - - - - -
    - - -
    + + + + + + + + + + + + + +
    + + + +
    -
    - -
    - -
    - -
    + +
    diff --git a/include/javascript/tiny_mce/plugins/advimage/editor_plugin.js b/include/javascript/tiny_mce/plugins/advimage/editor_plugin.js index 3af50573..4c7a9c3a 100644 --- a/include/javascript/tiny_mce/plugins/advimage/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/advimage/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.AdvancedImagePlugin',{init:function(ed,url){ed.addCommand('mceAdvImage',function(){if(ed.dom.getAttrib(ed.selection.getNode(),'class').indexOf('mceItem')!=-1)return;ed.windowManager.open({file:url+'/image.htm',width:480+parseInt(ed.getLang('advimage.delta_width',0)),height:385+parseInt(ed.getLang('advimage.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('image',{title:'advimage.image_desc',cmd:'mceAdvImage'});},getInfo:function(){return{longname:'Advanced image',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('advimage',tinymce.plugins.AdvancedImagePlugin);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.AdvancedImagePlugin",{init:function(a,b){a.addCommand("mceAdvImage",function(){if(a.dom.getAttrib(a.selection.getNode(),"class").indexOf("mceItem")!=-1){return}a.windowManager.open({file:b+"/image.htm",width:480+parseInt(a.getLang("advimage.delta_width",0)),height:385+parseInt(a.getLang("advimage.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("image",{title:"advimage.image_desc",cmd:"mceAdvImage"})},getInfo:function(){return{longname:"Advanced image",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advimage",tinymce.plugins.AdvancedImagePlugin)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/advimage/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/advimage/editor_plugin_src.js index 43269dd1..351542f6 100644 --- a/include/javascript/tiny_mce/plugins/advimage/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/advimage/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { diff --git a/include/javascript/tiny_mce/plugins/advimage/image.htm b/include/javascript/tiny_mce/plugins/advimage/image.htm index 3cd7647c..835d3882 100644 --- a/include/javascript/tiny_mce/plugins/advimage/image.htm +++ b/include/javascript/tiny_mce/plugins/advimage/image.htm @@ -9,15 +9,15 @@ - - -
    + + + @@ -26,19 +26,19 @@
    {#advimage_dlg.general} - +
    - - + @@ -61,7 +61,7 @@
    {#advimage_dlg.tab_appearance} -
    +
    - + - - - +
    - x - px + + + x + + px
      + @@ -119,7 +117,7 @@ @@ -130,7 +128,7 @@ - -
    @@ -123,7 +125,7 @@ - + @@ -143,35 +145,35 @@
    {#advimage_dlg.swap_image} - + -
    +
    - - + - - +
    + +
    - - + + -
      
    + +
    - - + + -
      
    @@ -179,7 +181,7 @@
    {#advimage_dlg.misc} - +
    @@ -212,12 +214,12 @@ -
    + +
    - - + + -
      
    @@ -225,14 +227,9 @@
    -
    - -
    - -
    - -
    + +
    - + diff --git a/include/javascript/tiny_mce/plugins/advimage/js/image.js b/include/javascript/tiny_mce/plugins/advimage/js/image.js index df395996..870c9609 100644 --- a/include/javascript/tiny_mce/plugins/advimage/js/image.js +++ b/include/javascript/tiny_mce/plugins/advimage/js/image.js @@ -142,7 +142,7 @@ var ImageDialog = { } tinymce.extend(args, { - src : nl.src.value, + src : nl.src.value.replace(/ /g, '%20'), width : nl.width.value, height : nl.height.value, alt : nl.alt.value, @@ -177,6 +177,8 @@ var ImageDialog = { ed.undoManager.add(); } + tinyMCEPopup.editor.execCommand('mceRepaint'); + tinyMCEPopup.editor.focus(); tinyMCEPopup.close(); }, @@ -272,6 +274,7 @@ var ImageDialog = { cl = tinyMCEPopup.editor.dom.getClasses(); if (cl.length > 0) { + lst.options.length = 0; lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); tinymce.each(cl, function(o) { @@ -285,6 +288,7 @@ var ImageDialog = { var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; l = window[l]; + lst.options.length = 0; if (l && l.length > 0) { lst.options[lst.options.length] = new Option('', ''); @@ -357,7 +361,7 @@ var ImageDialog = { }, updateStyle : function(ty) { - var dom = tinyMCEPopup.dom, st, v, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value}); + var dom = tinyMCEPopup.dom, b, bStyle, bColor, v, isIE = tinymce.isIE, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value}); if (tinyMCEPopup.editor.settings.inline_styles) { // Handle align @@ -376,14 +380,27 @@ var ImageDialog = { // Handle border if (ty == 'border') { + b = img.style.border ? img.style.border.split(' ') : []; + bStyle = dom.getStyle(img, 'border-style'); + bColor = dom.getStyle(img, 'border-color'); + dom.setStyle(img, 'border', ''); v = f.border.value; if (v || v == '0') { if (v == '0') - img.style.border = '0'; - else - img.style.border = v + 'px solid black'; + img.style.border = isIE ? '0' : '0 none none'; + else { + if (b.length == 3 && b[isIE ? 2 : 1]) + bStyle = b[isIE ? 2 : 1]; + else if (!bStyle || bStyle == 'none') + bStyle = 'solid'; + if (b.length == 3 && b[isIE ? 0 : 2]) + bColor = b[isIE ? 0 : 2]; + else if (!bColor || bColor == 'none') + bColor = 'black'; + img.style.border = v + 'px ' + bStyle + ' ' + bColor; + } } } @@ -412,7 +429,7 @@ var ImageDialog = { } // Merge - dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText)); + dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText), 'img'); } }, diff --git a/include/javascript/tiny_mce/plugins/advimage/langs/en_dlg.js b/include/javascript/tiny_mce/plugins/advimage/langs/en_dlg.js index ef81f78b..5ab33f76 100644 --- a/include/javascript/tiny_mce/plugins/advimage/langs/en_dlg.js +++ b/include/javascript/tiny_mce/plugins/advimage/langs/en_dlg.js @@ -28,6 +28,8 @@ alt:"Image description", list:"Image list", border:"Border", dimensions:"Dimensions", +width:"Width", +height:"Height", vspace:"Vertical space", hspace:"Horizontal space", align:"Alignment", diff --git a/include/javascript/tiny_mce/plugins/advlink/editor_plugin.js b/include/javascript/tiny_mce/plugins/advlink/editor_plugin.js index 4899f7b8..983fe5a9 100644 --- a/include/javascript/tiny_mce/plugins/advlink/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/advlink/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.AdvancedLinkPlugin',{init:function(ed,url){this.editor=ed;ed.addCommand('mceAdvLink',function(){var se=ed.selection;if(se.isCollapsed()&&!ed.dom.getParent(se.getNode(),'A'))return;ed.windowManager.open({file:url+'/link.htm',width:480+parseInt(ed.getLang('advlink.delta_width',0)),height:400+parseInt(ed.getLang('advlink.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('link',{title:'advlink.link_desc',cmd:'mceAdvLink'});ed.addShortcut('ctrl+k','advlink.advlink_desc','mceAdvLink');ed.onNodeChange.add(function(ed,cm,n,co){cm.setDisabled('link',co&&n.nodeName!='A');cm.setActive('link',n.nodeName=='A'&&!n.name);});},getInfo:function(){return{longname:'Advanced link',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('advlink',tinymce.plugins.AdvancedLinkPlugin);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.AdvancedLinkPlugin",{init:function(a,b){this.editor=a;a.addCommand("mceAdvLink",function(){var c=a.selection;if(c.isCollapsed()&&!a.dom.getParent(c.getNode(),"A")){return}a.windowManager.open({file:b+"/link.htm",width:480+parseInt(a.getLang("advlink.delta_width",0)),height:400+parseInt(a.getLang("advlink.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("link",{title:"advlink.link_desc",cmd:"mceAdvLink"});a.addShortcut("ctrl+k","advlink.advlink_desc","mceAdvLink");a.onNodeChange.add(function(d,c,f,e){c.setDisabled("link",e&&f.nodeName!="A");c.setActive("link",f.nodeName=="A"&&!f.name)})},getInfo:function(){return{longname:"Advanced link",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlink",tinymce.plugins.AdvancedLinkPlugin)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/advlink/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/advlink/editor_plugin_src.js index 7c8b55f4..32ea8f3d 100644 --- a/include/javascript/tiny_mce/plugins/advlink/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/advlink/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { diff --git a/include/javascript/tiny_mce/plugins/advlink/js/advlink.js b/include/javascript/tiny_mce/plugins/advlink/js/advlink.js index c8d19835..cd5cf414 100644 --- a/include/javascript/tiny_mce/plugins/advlink/js/advlink.js +++ b/include/javascript/tiny_mce/plugins/advlink/js/advlink.js @@ -30,8 +30,6 @@ function init() { document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink'); document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink'); - document.getElementById('linklisthrefcontainer').innerHTML = getLinkListHTML('linklisthref','href'); - document.getElementById('anchorlistcontainer').innerHTML = getAnchorListHTML('anchorlist','href'); document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target'); // Link list @@ -41,6 +39,13 @@ function init() { else document.getElementById("linklisthrefcontainer").innerHTML = html; + // Anchor list + html = getAnchorListHTML('anchorlist','href'); + if (html == "") + document.getElementById("anchorlistrow").style.display = 'none'; + else + document.getElementById("anchorlistcontainer").innerHTML = html; + // Resize some elements if (isVisible('hrefbrowser')) document.getElementById('href').style.width = '260px'; @@ -116,7 +121,7 @@ function checkPrefix(n) { if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email'))) n.value = 'mailto:' + n.value; - if (/^\s*www./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external'))) + if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external'))) n.value = 'http://' + n.value; } @@ -354,26 +359,28 @@ function setAttrib(elm, attrib, value) { // Clean up the style if (attrib == 'style') - value = dom.serializeStyle(dom.parseStyle(value)); + value = dom.serializeStyle(dom.parseStyle(value), 'a'); dom.setAttrib(elm, attrib, value); } function getAnchorListHTML(id, target) { - var inst = tinyMCEPopup.editor; - var nodes = inst.dom.select('a.mceItemAnchor,img.mceItemAnchor'), name, i; - var html = ""; - - html += ''; + if (html == "") + return ""; + + html = ''; return html; } @@ -389,7 +396,6 @@ function insertAction() { // Remove element if there is no href if (!document.forms[0].href.value) { - tinyMCEPopup.execCommand("mceBeginUndoLevel"); i = inst.selection.getBookmark(); inst.dom.remove(elm, 1); inst.selection.moveToBookmark(i); @@ -398,11 +404,10 @@ function insertAction() { return; } - tinyMCEPopup.execCommand("mceBeginUndoLevel"); - // Create new anchor elements if (elm == null) { - tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); + inst.getDoc().execCommand("unlink", false, null); + tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1}); elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';}); for (i=0; i - - -
    -
    + + + + -
    +
    -
    - - +
     
    @@ -148,7 +146,7 @@
    - +
     
    @@ -159,7 +157,7 @@
    - +
     
    @@ -174,15 +172,15 @@ - + - + - + - +
    @@ -196,7 +194,7 @@
    - +
    @@ -206,7 +204,7 @@
    - +
     
    @@ -218,7 +216,7 @@
    - +
     
    @@ -226,16 +224,6 @@
       
    @@ -255,323 +243,17 @@
    - -
    - - -
    - {#fullpage_dlg.head_elements} - -
    -
    -
    - - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - {#fullpage_dlg.meta_element} - - - - - - - - - - - - - - -
    - - -
    - -
    - {#fullpage_dlg.title_element} - - - - - - -
    - - -
    - -
    - {#fullpage_dlg.script_element} - - - -
    - -
    -
    - - - - - - - - - - - - - - - - - -
    - - - - -
     
    -
    - -
    - -
    -
    - - -
    - -
    - {#fullpage_dlg.style_element} - - - -
    - -
    -
    - - - - - - - - - -
    -
    - -
    - -
    -
    - - -
    - -
    - {#fullpage_dlg.base_element} - - - - - - - - - - -
    - - -
    - - - -
    - {#fullpage_dlg.comment_element} - - - - -
    -
    -
    - -
    - -
    - -
    + +
    - + diff --git a/include/javascript/tiny_mce/plugins/fullpage/js/fullpage.js b/include/javascript/tiny_mce/plugins/fullpage/js/fullpage.js index 6c994e9c..66eec2d7 100644 --- a/include/javascript/tiny_mce/plugins/fullpage/js/fullpage.js +++ b/include/javascript/tiny_mce/plugins/fullpage/js/fullpage.js @@ -1,461 +1,232 @@ -tinyMCEPopup.requireLangPack(); - -var doc; - -var defaultDocTypes = - 'XHTML 1.0 Transitional=,' + - 'XHTML 1.0 Frameset=,' + - 'XHTML 1.0 Strict=,' + - 'XHTML 1.1=,' + - 'HTML 4.01 Transitional=,' + - 'HTML 4.01 Strict=,' + - 'HTML 4.01 Frameset='; - -var defaultEncodings = - 'Western european (iso-8859-1)=iso-8859-1,' + - 'Central European (iso-8859-2)=iso-8859-2,' + - 'Unicode (UTF-8)=utf-8,' + - 'Chinese traditional (Big5)=big5,' + - 'Cyrillic (iso-8859-5)=iso-8859-5,' + - 'Japanese (iso-2022-jp)=iso-2022-jp,' + - 'Greek (iso-8859-7)=iso-8859-7,' + - 'Korean (iso-2022-kr)=iso-2022-kr,' + - 'ASCII (us-ascii)=us-ascii'; - -var defaultMediaTypes = - 'all=all,' + - 'screen=screen,' + - 'print=print,' + - 'tty=tty,' + - 'tv=tv,' + - 'projection=projection,' + - 'handheld=handheld,' + - 'braille=braille,' + - 'aural=aural'; - -var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings'; -var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px'; - -function init() { - var f = document.forms['fullpage'], el = f.elements, e, i, p, doctypes, encodings, mediaTypes, fonts, ed = tinyMCEPopup.editor, dom = tinyMCEPopup.dom, style; - - // Setup doctype select box - doctypes = ed.getParam("fullpage_doctypes", defaultDocTypes).split(','); - for (i=0; i 1) - addSelectValue(f, 'doctypes', p[0], p[1]); - } - - // Setup fonts select box - fonts = ed.getParam("fullpage_fonts", defaultFontNames).split(';'); - for (i=0; i 1) - addSelectValue(f, 'fontface', p[0], p[1]); - } - - // Setup fontsize select box - fonts = ed.getParam("fullpage_fontsizes", defaultFontSizes).split(','); - for (i=0; i 1) { - addSelectValue(f, 'element_style_media', p[0], p[1]); - addSelectValue(f, 'element_link_media', p[0], p[1]); - } - } - - // Setup encodings select box - encodings = ed.getParam("fullpage_encodings", defaultEncodings).split(','); - for (i=0; i 1) { - addSelectValue(f, 'docencoding', p[0], p[1]); - addSelectValue(f, 'element_script_charset', p[0], p[1]); - addSelectValue(f, 'element_link_charset', p[0], p[1]); - } - } - - document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); - document.getElementById('link_color_pickcontainer').innerHTML = getColorPickerHTML('link_color_pick','link_color'); - //document.getElementById('hover_color_pickcontainer').innerHTML = getColorPickerHTML('hover_color_pick','hover_color'); - document.getElementById('visited_color_pickcontainer').innerHTML = getColorPickerHTML('visited_color_pick','visited_color'); - document.getElementById('active_color_pickcontainer').innerHTML = getColorPickerHTML('active_color_pick','active_color'); - document.getElementById('textcolor_pickcontainer').innerHTML = getColorPickerHTML('textcolor_pick','textcolor'); - document.getElementById('stylesheet_browsercontainer').innerHTML = getBrowserHTML('stylesheetbrowser','stylesheet','file','fullpage'); - document.getElementById('link_href_pickcontainer').innerHTML = getBrowserHTML('link_href_browser','element_link_href','file','fullpage'); - document.getElementById('script_src_pickcontainer').innerHTML = getBrowserHTML('script_src_browser','element_script_src','file','fullpage'); - document.getElementById('bgimage_pickcontainer').innerHTML = getBrowserHTML('bgimage_browser','bgimage','image','fullpage'); - - // Resize some elements - if (isVisible('stylesheetbrowser')) - document.getElementById('stylesheet').style.width = '220px'; - - if (isVisible('link_href_browser')) - document.getElementById('element_link_href').style.width = '230px'; - - if (isVisible('bgimage_browser')) - document.getElementById('bgimage').style.width = '210px'; - - // Add iframe - dom.add(document.body, 'iframe', {id : 'documentIframe', src : 'javascript:""', style : {display : 'none'}}); - doc = dom.get('documentIframe').contentWindow.document; - h = tinyMCEPopup.getWindowArg('head_html'); - - // Preprocess the HTML disable scripts and urls - h = h.replace(/ -
    diff --git a/include/javascript/tiny_mce/plugins/iespell/editor_plugin.js b/include/javascript/tiny_mce/plugins/iespell/editor_plugin.js index 06dae75d..e9cba106 100644 --- a/include/javascript/tiny_mce/plugins/iespell/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/iespell/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.IESpell',{init:function(ed,url){var t=this,sp;if(!tinymce.isIE)return;t.editor=ed;ed.addCommand('mceIESpell',function(){try{sp=new ActiveXObject("ieSpell.ieSpellExtension");sp.CheckDocumentNode(ed.getDoc().documentElement);}catch(e){if(e.number==-2146827859){ed.windowManager.confirm(ed.getLang("iespell.download"),function(s){if(s)window.open('http://www.iespell.com/download.php','ieSpellDownload','');});}else ed.windowManager.alert("Error Loading ieSpell: Exception "+e.number);}});ed.addButton('iespell',{title:'iespell.iespell_desc',cmd:'mceIESpell'});},getInfo:function(){return{longname:'IESpell (IE Only)',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('iespell',tinymce.plugins.IESpell);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.IESpell",{init:function(a,b){var c=this,d;if(!tinymce.isIE){return}c.editor=a;a.addCommand("mceIESpell",function(){try{d=new ActiveXObject("ieSpell.ieSpellExtension");d.CheckDocumentNode(a.getDoc().documentElement)}catch(f){if(f.number==-2146827859){a.windowManager.confirm(a.getLang("iespell.download"),function(e){if(e){window.open("http://www.iespell.com/download.php","ieSpellDownload","")}})}else{a.windowManager.alert("Error Loading ieSpell: Exception "+f.number)}}});a.addButton("iespell",{title:"iespell.iespell_desc",cmd:"mceIESpell"})},getInfo:function(){return{longname:"IESpell (IE Only)",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("iespell",tinymce.plugins.IESpell)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/iespell/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/iespell/editor_plugin_src.js index 3e36302d..61edf1e2 100644 --- a/include/javascript/tiny_mce/plugins/iespell/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/iespell/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { diff --git a/include/javascript/tiny_mce/plugins/inlinepopups/editor_plugin.js b/include/javascript/tiny_mce/plugins/inlinepopups/editor_plugin.js index 5560b6b1..ef648174 100644 --- a/include/javascript/tiny_mce/plugins/inlinepopups/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/inlinepopups/editor_plugin.js @@ -1 +1 @@ -(function(){var DOM=tinymce.DOM,Element=tinymce.dom.Element,Event=tinymce.dom.Event,each=tinymce.each,is=tinymce.is;tinymce.create('tinymce.plugins.InlinePopups',{init:function(ed,url){ed.onBeforeRenderUI.add(function(){ed.windowManager=new tinymce.InlineWindowManager(ed);DOM.loadCSS(url+'/skins/'+(ed.settings.inlinepopups_skin||'clearlooks2')+"/window.css");});},getInfo:function(){return{longname:'InlinePopups',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager',{InlineWindowManager:function(ed){var t=this;t.parent(ed);t.zIndex=300000;t.count=0;t.windows={};},open:function(f,p){var t=this,id,opt='',ed=t.editor,dw=0,dh=0,vp,po,mdf,clf,we,w,u;f=f||{};p=p||{};if(!f.inline)return t.parent(f,p);if(!f.type)t.bookmark=ed.selection.getBookmark('simple');id=DOM.uniqueId();vp=DOM.getViewPort();f.width=parseInt(f.width||320);f.height=parseInt(f.height||240)+(tinymce.isIE?8:0);f.min_width=parseInt(f.min_width||150);f.min_height=parseInt(f.min_height||100);f.max_width=parseInt(f.max_width||2000);f.max_height=parseInt(f.max_height||2000);f.left=f.left||Math.round(Math.max(vp.x,vp.x+(vp.w/ 2.0) - (f.width /2.0)));f.top=f.top||Math.round(Math.max(vp.y,vp.y+(vp.h/ 2.0) - (f.height /2.0)));f.movable=f.resizable=true;p.mce_width=f.width;p.mce_height=f.height;p.mce_inline=true;p.mce_window_id=id;p.mce_auto_focus=f.auto_focus;t.features=f;t.params=p;t.onOpen.dispatch(t,f,p);if(f.type){opt+=' mceModal';if(f.type)opt+=' mce'+f.type.substring(0,1).toUpperCase()+f.type.substring(1);f.resizable=false;}if(f.statusbar)opt+=' mceStatusbar';if(f.resizable)opt+=' mceResizable';if(f.minimizable)opt+=' mceMinimizable';if(f.maximizable)opt+=' mceMaximizable';if(f.movable)opt+=' mceMovable';t._addAll(DOM.doc.body,['div',{id:id,'class':ed.settings.inlinepopups_skin||'clearlooks2',style:'width:100px;height:100px'},['div',{id:id+'_wrapper','class':'mceWrapper'+opt},['div',{id:id+'_top','class':'mceTop'},['div',{'class':'mceLeft'}],['div',{'class':'mceCenter'}],['div',{'class':'mceRight'}],['span',{id:id+'_title'},f.title||'']],['div',{id:id+'_middle','class':'mceMiddle'},['div',{id:id+'_left','class':'mceLeft'}],['span',{id:id+'_content'}],['div',{id:id+'_right','class':'mceRight'}]],['div',{id:id+'_bottom','class':'mceBottom'},['div',{'class':'mceLeft'}],['div',{'class':'mceCenter'}],['div',{'class':'mceRight'}],['span',{id:id+'_status'},'Content']],['a',{'class':'mceMove',tabindex:'-1',href:'javascript:;'}],['a',{'class':'mceMin',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{'class':'mceMax',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{'class':'mceMed',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{'class':'mceClose',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{id:id+'_resize_n','class':'mceResize mceResizeN',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_s','class':'mceResize mceResizeS',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_w','class':'mceResize mceResizeW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_e','class':'mceResize mceResizeE',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_nw','class':'mceResize mceResizeNW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_ne','class':'mceResize mceResizeNE',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_sw','class':'mceResize mceResizeSW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_se','class':'mceResize mceResizeSE',tabindex:'-1',href:'javascript:;'}]]]);DOM.setStyles(id,{top:-10000,left:-10000});if(tinymce.isGecko)DOM.setStyle(id,'overflow','auto');if(!f.type){dw+=DOM.get(id+'_left').clientWidth;dw+=DOM.get(id+'_right').clientWidth;dh+=DOM.get(id+'_top').clientHeight;dh+=DOM.get(id+'_bottom').clientHeight;}DOM.setStyles(id,{top:f.top,left:f.left,width:f.width+dw,height:f.height+dh});u=f.url||f.file;if(u){if(tinymce.relaxedDomain)u+=(u.indexOf('?')==-1?'?':'&')+'mce_rdomain='+tinymce.relaxedDomain;u=tinymce._addVer(u);}if(!f.type){DOM.add(id+'_content','iframe',{id:id+'_ifr',src:'javascript:""',frameBorder:0,style:'border:0;width:10px;height:10px'});DOM.setStyles(id+'_ifr',{width:f.width,height:f.height});DOM.setAttrib(id+'_ifr','src',u);}else{DOM.add(id+'_wrapper','a',{id:id+'_ok','class':'mceButton mceOk',href:'javascript:;',onmousedown:'return false;'},'Ok');if(f.type=='confirm')DOM.add(id+'_wrapper','a',{'class':'mceButton mceCancel',href:'javascript:;',onmousedown:'return false;'},'Cancel');DOM.add(id+'_middle','div',{'class':'mceIcon'});DOM.setHTML(id+'_content',f.content.replace('\n','
    '));}mdf=Event.add(id,'mousedown',function(e){var n=e.target,w,vp;w=t.windows[id];t.focus(id);if(n.nodeName=='A'||n.nodeName=='a'){if(n.className=='mceMax'){w.oldPos=w.element.getXY();w.oldSize=w.element.getSize();vp=DOM.getViewPort();vp.w-=2;vp.h-=2;w.element.moveTo(vp.x,vp.y);w.element.resizeTo(vp.w,vp.h);DOM.setStyles(id+'_ifr',{width:vp.w-w.deltaWidth,height:vp.h-w.deltaHeight});DOM.addClass(id+'_wrapper','mceMaximized');}else if(n.className=='mceMed'){w.element.moveTo(w.oldPos.x,w.oldPos.y);w.element.resizeTo(w.oldSize.w,w.oldSize.h);w.iframeElement.resizeTo(w.oldSize.w-w.deltaWidth,w.oldSize.h-w.deltaHeight);DOM.removeClass(id+'_wrapper','mceMaximized');}else if(n.className=='mceMove')return t._startDrag(id,e,n.className);else if(DOM.hasClass(n,'mceResize'))return t._startDrag(id,e,n.className.substring(13));}});clf=Event.add(id,'click',function(e){var n=e.target;t.focus(id);if(n.nodeName=='A'||n.nodeName=='a'){switch(n.className){case'mceClose':t.close(null,id);return Event.cancel(e);case'mceButton mceOk':case'mceButton mceCancel':f.button_func(n.className=='mceButton mceOk');return Event.cancel(e);}}});w=t.windows[id]={id:id,mousedown_func:mdf,click_func:clf,element:new Element(id,{blocker:1,container:ed.getContainer()}),iframeElement:new Element(id+'_ifr'),features:f,deltaWidth:dw,deltaHeight:dh};w.iframeElement.on('focus',function(){t.focus(id);});if(t.count==0&&t.editor.getParam('dialog_type','modal')=='modal'){DOM.add(DOM.doc.body,'div',{id:'mceModalBlocker','class':(t.editor.settings.inlinepopups_skin||'clearlooks2')+'_modalBlocker',style:{zIndex:t.zIndex-1}});DOM.show('mceModalBlocker');}else DOM.setStyle('mceModalBlocker','z-index',t.zIndex-1);if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!DOM.boxModel))DOM.setStyles('mceModalBlocker',{position:'absolute',width:vp.w-2,height:vp.h-2});t.focus(id);t._fixIELayout(id,1);if(DOM.get(id+'_ok'))DOM.get(id+'_ok').focus();t.count++;return w;},focus:function(id){var t=this,w;if(w=t.windows[id]){w.zIndex=this.zIndex++;w.element.setStyle('zIndex',w.zIndex);w.element.update();id=id+'_wrapper';DOM.removeClass(t.lastId,'mceFocus');DOM.addClass(id,'mceFocus');t.lastId=id;}},_addAll:function(te,ne){var i,n,t=this,dom=tinymce.DOM;if(is(ne,'string'))te.appendChild(dom.doc.createTextNode(ne));else if(ne.length){te=te.appendChild(dom.create(ne[0],ne[1]));for(i=2;iix){fw=w;ix=w.zIndex;}});if(fw)t.focus(fw.id);}},setTitle:function(w,ti){var e;w=this._findId(w);if(e=DOM.get(w+'_title'))e.innerHTML=DOM.encode(ti);},alert:function(txt,cb,s){var t=this,w;w=t.open({title:t,type:'alert',button_func:function(s){if(cb)cb.call(s||t,s);t.close(null,w.id);},content:DOM.encode(t.editor.getLang(txt,txt)),inline:1,width:400,height:130});},confirm:function(txt,cb,s){var t=this,w;w=t.open({title:t,type:'confirm',button_func:function(s){if(cb)cb.call(s||t,s);t.close(null,w.id);},content:DOM.encode(t.editor.getLang(txt,txt)),inline:1,width:400,height:130});},_findId:function(w){var t=this;if(typeof(w)=='string')return w;each(t.windows,function(wo){var ifr=DOM.get(wo.id+'_ifr');if(ifr&&w==ifr.contentWindow){w=wo.id;return false;}});return w;},_fixIELayout:function(id,s){var w,img;if(!tinymce.isIE6)return;each(['n','s','w','e','nw','ne','sw','se'],function(v){var e=DOM.get(id+'_resize_'+v);DOM.setStyles(e,{width:s?e.clientWidth:'',height:s?e.clientHeight:'',cursor:DOM.getStyle(e,'cursor',1)});DOM.setStyle(id+"_bottom",'bottom','-1px');e=0;});if(w=this.windows[id]){w.element.hide();w.element.show();each(DOM.select('div,a',id),function(e,i){if(e.currentStyle.backgroundImage!='none'){img=new Image();img.src=e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,'$1');}});DOM.get(id).style.filter='';}}});tinymce.PluginManager.add('inlinepopups',tinymce.plugins.InlinePopups);})(); \ No newline at end of file +(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","
    "));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;gf){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/inlinepopups/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/inlinepopups/editor_plugin_src.js index 5bf612c2..28b151d5 100644 --- a/include/javascript/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/inlinepopups/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -39,7 +42,7 @@ }, open : function(f, p) { - var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u; + var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u, parentWindow; f = f || {}; p = p || {}; @@ -48,9 +51,14 @@ if (!f.inline) return t.parent(f, p); + parentWindow = t._frontWindow(); + if (parentWindow && DOM.get(parentWindow.id + '_ifr')) { + parentWindow.focussedElement = DOM.get(parentWindow.id + '_ifr').contentWindow.document.activeElement; + } + // Only store selection if the type is a normal window if (!f.type) - t.bookmark = ed.selection.getBookmark('simple'); + t.bookmark = ed.selection.getBookmark(1); id = DOM.uniqueId(); vp = DOM.getViewPort(); @@ -104,7 +112,7 @@ // Create DOM objects t._addAll(DOM.doc.body, - ['div', {id : id, 'class' : ed.settings.inlinepopups_skin || 'clearlooks2', style : 'width:100px;height:100px'}, + ['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'}, ['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt}, ['div', {id : id + '_top', 'class' : 'mceTop'}, ['div', {'class' : 'mceLeft'}], @@ -114,9 +122,9 @@ ], ['div', {id : id + '_middle', 'class' : 'mceMiddle'}, - ['div', {id : id + '_left', 'class' : 'mceLeft'}], + ['div', {id : id + '_left', 'class' : 'mceLeft', tabindex : '0'}], ['span', {id : id + '_content'}], - ['div', {id : id + '_right', 'class' : 'mceRight'}] + ['div', {id : id + '_right', 'class' : 'mceRight', tabindex : '0'}] ], ['div', {id : id + '_bottom', 'class' : 'mceBottom'}, @@ -180,6 +188,27 @@ DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'}); DOM.setHTML(id + '_content', f.content.replace('\n', '
    ')); + + Event.add(id, 'keyup', function(evt) { + var VK_ESCAPE = 27; + if (evt.keyCode === VK_ESCAPE) { + f.button_func(false); + return Event.cancel(evt); + } + }); + + Event.add(id, 'keydown', function(evt) { + var cancelButton, VK_TAB = 9; + if (evt.keyCode === VK_TAB) { + cancelButton = DOM.select('a.mceCancel', id + '_wrapper')[0]; + if (cancelButton && cancelButton !== evt.target) { + cancelButton.focus(); + } else { + DOM.get(id + '_ok').focus(); + } + return Event.cancel(evt); + } + }); } // Register events @@ -236,7 +265,23 @@ } } }); - + + // Make sure the tab order loops within the dialog. + Event.add([id + '_left', id + '_right'], 'focus', function(evt) { + var iframe = DOM.get(id + '_ifr'); + if (iframe) { + var body = iframe.contentWindow.document.body; + var focusable = DOM.select(':input:enabled,*[tabindex=0]', body); + if (evt.target.id === (id + '_left')) { + focusable[focusable.length - 1].focus(); + } else { + focusable[0].focus(); + } + } else { + DOM.get(id + '_ok').focus(); + } + }); + // Add window w = t.windows[id] = { id : id, @@ -262,19 +307,20 @@ }); DOM.show('mceModalBlocker'); // Reduces flicker in IE + DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'true'); } else DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1); if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel)) - DOM.setStyles('mceModalBlocker', {position : 'absolute', width : vp.w - 2, height : vp.h - 2}); + DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2}); + DOM.setAttrib(id, 'aria-hidden', 'false'); t.focus(id); t._fixIELayout(id, 1); // Focus ok button if (DOM.get(id + '_ok')) DOM.get(id + '_ok').focus(); - t.count++; return w; @@ -292,6 +338,14 @@ DOM.removeClass(t.lastId, 'mceFocus'); DOM.addClass(id, 'mceFocus'); t.lastId = id; + + if (w.focussedElement) { + w.focussedElement.focus(); + } else if (DOM.get(id + '_ok')) { + DOM.get(w.id + '_ok').focus(); + } else if (DOM.get(w.id + '_ifr')) { + DOM.get(w.id + '_ifr').focus(); + } } }, @@ -358,7 +412,7 @@ }); if (tinymce.isIE6 || (tinymce.isIE && !DOM.boxModel)) - DOM.setStyles('mceEventBlocker', {position : 'absolute', width : vp.w - 2, height : vp.h - 2}); + DOM.setStyles('mceEventBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2}); eb = new Element('mceEventBlocker'); eb.update(); @@ -475,7 +529,7 @@ }, close : function(win, id) { - var t = this, w, d = DOM.doc, ix = 0, fw, id; + var t = this, w, d = DOM.doc, fw, id; id = t._findId(id || win); @@ -487,8 +541,11 @@ t.count--; - if (t.count == 0) + if (t.count == 0) { DOM.remove('mceModalBlocker'); + DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'false'); + t.editor.focus(); + } if (w = t.windows[id]) { t.onClose.dispatch(t); @@ -501,18 +558,25 @@ w.element.remove(); delete t.windows[id]; - // Find front most window and focus that - each (t.windows, function(w) { - if (w.zIndex > ix) { - fw = w; - ix = w.zIndex; - } - }); + fw = t._frontWindow(); if (fw) t.focus(fw.id); } }, + + // Find front most window + _frontWindow : function() { + var fw, ix = 0; + // Find front most window and focus that + each (this.windows, function(w) { + if (w.zIndex > ix) { + fw = w; + ix = w.zIndex; + } + }); + return fw; + }, setTitle : function(w, ti) { var e; diff --git a/include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css b/include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css index 5e6fd7d3..a50d4fc5 100644 --- a/include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +++ b/include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css @@ -87,4 +87,4 @@ .clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)} .clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px} .clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto} -.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)} \ No newline at end of file +.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)} diff --git a/include/javascript/tiny_mce/plugins/insertdatetime/editor_plugin.js b/include/javascript/tiny_mce/plugins/insertdatetime/editor_plugin.js index 34d4ceca..938ce6b1 100644 --- a/include/javascript/tiny_mce/plugins/insertdatetime/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/insertdatetime/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.InsertDateTime',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceInsertDate',function(){var str=t._getDateTime(new Date(),ed.getParam("plugin_insertdate_dateFormat",ed.getLang('insertdatetime.date_fmt')));ed.execCommand('mceInsertContent',false,str);});ed.addCommand('mceInsertTime',function(){var str=t._getDateTime(new Date(),ed.getParam("plugin_insertdate_timeFormat",ed.getLang('insertdatetime.time_fmt')));ed.execCommand('mceInsertContent',false,str);});ed.addButton('insertdate',{title:'insertdatetime.insertdate_desc',cmd:'mceInsertDate'});ed.addButton('inserttime',{title:'insertdatetime.inserttime_desc',cmd:'mceInsertTime'});},getInfo:function(){return{longname:'Insert date/time',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_getDateTime:function(d,fmt){var ed=this.editor;function addZeros(value,len){value=""+value;if(value.length-1){nl[ci].style.zIndex=z[fi];nl[fi].style.zIndex=z[ci];}else{if(z[ci]>0)nl[ci].style.zIndex=z[ci]-1;}}else{for(i=0;iz[ci]){fi=i;break;}}if(fi>-1){nl[ci].style.zIndex=z[fi];nl[fi].style.zIndex=z[ci];}else nl[ci].style.zIndex=z[ci]+1;}ed.execCommand('mceRepaint');},_getParentLayer:function(n){return this.editor.dom.getParent(n,function(n){return n.nodeType==1&&/^(absolute|relative|static)$/i.test(n.style.position);});},_insertLayer:function(){var ed=this.editor,p=ed.dom.getPos(ed.dom.getParent(ed.selection.getNode(),'*'));ed.dom.add(ed.getBody(),'div',{style:{position:'absolute',left:p.x,top:(p.y>20?p.y:20),width:100,height:100},'class':'mceItemVisualAid'},ed.selection.getContent()||ed.getLang('layer.content'));},_toggleAbsolute:function(){var ed=this.editor,le=this._getParentLayer(ed.selection.getNode());if(!le)le=ed.dom.getParent(ed.selection.getNode(),'DIV,P,IMG');if(le){if(le.style.position.toLowerCase()=="absolute"){ed.dom.setStyles(le,{position:'',left:'',top:'',width:'',height:''});ed.dom.removeClass(le,'mceItemVisualAid');}else{if(le.style.left=="")le.style.left=20+'px';if(le.style.top=="")le.style.top=20+'px';if(le.style.width=="")le.style.width=le.width?(le.width+'px'):'100px';if(le.style.height=="")le.style.height=le.height?(le.height+'px'):'100px';le.style.position="absolute";ed.addVisual(ed.getBody());}ed.execCommand('mceRepaint');ed.nodeChanged();}}});tinymce.PluginManager.add('layer',tinymce.plugins.Layer);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.Layer",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceInsertLayer",c._insertLayer,c);a.addCommand("mceMoveForward",function(){c._move(1)});a.addCommand("mceMoveBackward",function(){c._move(-1)});a.addCommand("mceMakeAbsolute",function(){c._toggleAbsolute()});a.addButton("moveforward",{title:"layer.forward_desc",cmd:"mceMoveForward"});a.addButton("movebackward",{title:"layer.backward_desc",cmd:"mceMoveBackward"});a.addButton("absolute",{title:"layer.absolute_desc",cmd:"mceMakeAbsolute"});a.addButton("insertlayer",{title:"layer.insertlayer_desc",cmd:"mceInsertLayer"});a.onInit.add(function(){if(tinymce.isIE){a.getDoc().execCommand("2D-Position",false,true)}});a.onNodeChange.add(c._nodeChange,c);a.onVisualAid.add(c._visualAid,c)},getInfo:function(){return{longname:"Layer",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var c,d;c=this._getParentLayer(e);d=b.dom.getParent(e,"DIV,P,IMG");if(!d){a.setDisabled("absolute",1);a.setDisabled("moveforward",1);a.setDisabled("movebackward",1)}else{a.setDisabled("absolute",0);a.setDisabled("moveforward",!c);a.setDisabled("movebackward",!c);a.setActive("absolute",c&&c.style.position.toLowerCase()=="absolute")}},_visualAid:function(a,c,b){var d=a.dom;tinymce.each(d.select("div,p",c),function(f){if(/^(absolute|relative|static)$/i.test(f.style.position)){if(b){d.addClass(f,"mceItemVisualAid")}else{d.removeClass(f,"mceItemVisualAid")}}})},_move:function(h){var b=this.editor,f,g=[],e=this._getParentLayer(b.selection.getNode()),c=-1,j=-1,a;a=[];tinymce.walk(b.getBody(),function(d){if(d.nodeType==1&&/^(absolute|relative|static)$/i.test(d.style.position)){a.push(d)}},"childNodes");for(f=0;f-1){a[c].style.zIndex=g[j];a[j].style.zIndex=g[c]}else{if(g[c]>0){a[c].style.zIndex=g[c]-1}}}else{for(f=0;fg[c]){j=f;break}}if(j>-1){a[c].style.zIndex=g[j];a[j].style.zIndex=g[c]}else{a[c].style.zIndex=g[c]+1}}b.execCommand("mceRepaint")},_getParentLayer:function(a){return this.editor.dom.getParent(a,function(b){return b.nodeType==1&&/^(absolute|relative|static)$/i.test(b.style.position)})},_insertLayer:function(){var a=this.editor,b=a.dom.getPos(a.dom.getParent(a.selection.getNode(),"*"));a.dom.add(a.getBody(),"div",{style:{position:"absolute",left:b.x,top:(b.y>20?b.y:20),width:100,height:100},"class":"mceItemVisualAid"},a.selection.getContent()||a.getLang("layer.content"))},_toggleAbsolute:function(){var a=this.editor,b=this._getParentLayer(a.selection.getNode());if(!b){b=a.dom.getParent(a.selection.getNode(),"DIV,P,IMG")}if(b){if(b.style.position.toLowerCase()=="absolute"){a.dom.setStyles(b,{position:"",left:"",top:"",width:"",height:""});a.dom.removeClass(b,"mceItemVisualAid")}else{if(b.style.left==""){b.style.left=20+"px"}if(b.style.top==""){b.style.top=20+"px"}if(b.style.width==""){b.style.width=b.width?(b.width+"px"):"100px"}if(b.style.height==""){b.style.height=b.height?(b.height+"px"):"100px"}b.style.position="absolute";a.dom.setAttrib(b,"data-mce-style","");a.addVisual(a.getBody())}a.execCommand("mceRepaint");a.nodeChanged()}}});tinymce.PluginManager.add("layer",tinymce.plugins.Layer)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/layer/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/layer/editor_plugin_src.js index 89390a2b..ddf24c42 100644 --- a/include/javascript/tiny_mce/plugins/layer/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/layer/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -195,6 +198,8 @@ le.style.height = le.height ? (le.height + 'px') : '100px'; le.style.position = "absolute"; + + ed.dom.setAttrib(le, 'data-mce-style', ''); ed.addVisual(ed.getBody()); } diff --git a/include/javascript/tiny_mce/plugins/legacyoutput/editor_plugin.js b/include/javascript/tiny_mce/plugins/legacyoutput/editor_plugin.js new file mode 100644 index 00000000..b3a4ce31 --- /dev/null +++ b/include/javascript/tiny_mce/plugins/legacyoutput/editor_plugin.js @@ -0,0 +1 @@ +(function(a){a.onAddEditor.addToTop(function(c,b){b.settings.inline_styles=false});a.create("tinymce.plugins.LegacyOutput",{init:function(b){b.onInit.add(function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",e=a.explode(b.settings.font_size_style_values),d=b.schema;b.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignfull:{selector:c,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:true}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:true}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(f){return a.inArray(e,f.value)+1}}},forecolor:{inline:"font",styles:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}});a.each("b,i,u,strike".split(","),function(f){d.addValidElements(f+"[*]")});if(!d.getElementRule("font")){d.addValidElements("font[face|size|color|style]")}a.each(c.split(","),function(f){var h=d.getElementRule(f),g;if(h){if(!h.attributes.align){h.attributes.align={};h.attributesOrder.push("align")}}});b.onNodeChange.add(function(g,k){var j,f,h,i;f=g.dom.getParent(g.selection.getNode(),"font");if(f){h=f.face;i=f.size}if(j=k.get("fontselect")){j.select(function(l){return l==h})}if(j=k.get("fontsizeselect")){j.select(function(m){var l=a.inArray(e,m.fontSize);return l+1==i})}})})},getInfo:function(){return{longname:"LegacyOutput",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("legacyoutput",a.plugins.LegacyOutput)})(tinymce); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/legacyoutput/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/legacyoutput/editor_plugin_src.js new file mode 100644 index 00000000..835a45c3 --- /dev/null +++ b/include/javascript/tiny_mce/plugins/legacyoutput/editor_plugin_src.js @@ -0,0 +1,139 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + * + * This plugin will force TinyMCE to produce deprecated legacy output such as font elements, u elements, align + * attributes and so forth. There are a few cases where these old items might be needed for example in email applications or with Flash + * + * However you should NOT use this plugin if you are building some system that produces web contents such as a CMS. All these elements are + * not apart of the newer specifications for HTML and XHTML. + */ + +(function(tinymce) { + // Override inline_styles setting to force TinyMCE to produce deprecated contents + tinymce.onAddEditor.addToTop(function(tinymce, editor) { + editor.settings.inline_styles = false; + }); + + // Create the legacy ouput plugin + tinymce.create('tinymce.plugins.LegacyOutput', { + init : function(editor) { + editor.onInit.add(function() { + var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', + fontSizes = tinymce.explode(editor.settings.font_size_style_values), + schema = editor.schema; + + // Override some internal formats to produce legacy elements and attributes + editor.formatter.register({ + // Change alignment formats to use the deprecated align attribute + alignleft : {selector : alignElements, attributes : {align : 'left'}}, + aligncenter : {selector : alignElements, attributes : {align : 'center'}}, + alignright : {selector : alignElements, attributes : {align : 'right'}}, + alignfull : {selector : alignElements, attributes : {align : 'justify'}}, + + // Change the basic formatting elements to use deprecated element types + bold : [ + {inline : 'b', remove : 'all'}, + {inline : 'strong', remove : 'all'}, + {inline : 'span', styles : {fontWeight : 'bold'}} + ], + italic : [ + {inline : 'i', remove : 'all'}, + {inline : 'em', remove : 'all'}, + {inline : 'span', styles : {fontStyle : 'italic'}} + ], + underline : [ + {inline : 'u', remove : 'all'}, + {inline : 'span', styles : {textDecoration : 'underline'}, exact : true} + ], + strikethrough : [ + {inline : 'strike', remove : 'all'}, + {inline : 'span', styles : {textDecoration: 'line-through'}, exact : true} + ], + + // Change font size and font family to use the deprecated font element + fontname : {inline : 'font', attributes : {face : '%value'}}, + fontsize : { + inline : 'font', + attributes : { + size : function(vars) { + return tinymce.inArray(fontSizes, vars.value) + 1; + } + } + }, + + // Setup font elements for colors as well + forecolor : {inline : 'font', styles : {color : '%value'}}, + hilitecolor : {inline : 'font', styles : {backgroundColor : '%value'}} + }); + + // Check that deprecated elements are allowed if not add them + tinymce.each('b,i,u,strike'.split(','), function(name) { + schema.addValidElements(name + '[*]'); + }); + + // Add font element if it's missing + if (!schema.getElementRule("font")) + schema.addValidElements("font[face|size|color|style]"); + + // Add the missing and depreacted align attribute for the serialization engine + tinymce.each(alignElements.split(','), function(name) { + var rule = schema.getElementRule(name), found; + + if (rule) { + if (!rule.attributes.align) { + rule.attributes.align = {}; + rule.attributesOrder.push('align'); + } + } + }); + + // Listen for the onNodeChange event so that we can do special logic for the font size and font name drop boxes + editor.onNodeChange.add(function(editor, control_manager) { + var control, fontElm, fontName, fontSize; + + // Find font element get it's name and size + fontElm = editor.dom.getParent(editor.selection.getNode(), 'font'); + if (fontElm) { + fontName = fontElm.face; + fontSize = fontElm.size; + } + + // Select/unselect the font name in droplist + if (control = control_manager.get('fontselect')) { + control.select(function(value) { + return value == fontName; + }); + } + + // Select/unselect the font size in droplist + if (control = control_manager.get('fontsizeselect')) { + control.select(function(value) { + var index = tinymce.inArray(fontSizes, value.fontSize); + + return index + 1 == fontSize; + }); + } + }); + }); + }, + + getInfo : function() { + return { + longname : 'LegacyOutput', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('legacyoutput', tinymce.plugins.LegacyOutput); +})(tinymce); diff --git a/include/javascript/tiny_mce/plugins/lists/editor_plugin.js b/include/javascript/tiny_mce/plugins/lists/editor_plugin.js new file mode 100644 index 00000000..44645991 --- /dev/null +++ b/include/javascript/tiny_mce/plugins/lists/editor_plugin.js @@ -0,0 +1 @@ +(function(){var e=tinymce.each,r=tinymce.dom.Event,g;function p(t,s){while(t&&(t.nodeType===8||(t.nodeType===3&&/^[ \t\n\r]*$/.test(t.nodeValue)))){t=s(t)}return t}function b(s){return p(s,function(t){return t.previousSibling})}function i(s){return p(s,function(t){return t.nextSibling})}function d(s,u,t){return s.dom.getParent(u,function(v){return tinymce.inArray(t,v)!==-1})}function n(s){return s&&(s.tagName==="OL"||s.tagName==="UL")}function c(u,v){var t,w,s;t=b(u.lastChild);while(n(t)){w=t;t=b(w.previousSibling)}if(w){s=v.create("li",{style:"list-style-type: none;"});v.split(u,w);v.insertAfter(s,w);s.appendChild(w);s.appendChild(w);u=s.previousSibling}return u}function m(t,s,u){t=a(t,s,u);return o(t,s,u)}function a(u,s,v){var t=b(u.previousSibling);if(t){return h(t,u,s?t:false,v)}else{return u}}function o(u,t,v){var s=i(u.nextSibling);if(s){return h(u,s,t?s:false,v)}else{return u}}function h(u,s,t,v){if(l(u,s,!!t,v)){return f(u,s,t)}else{if(u&&u.tagName==="LI"&&n(s)){u.appendChild(s)}}return s}function l(u,t,s,v){if(!u||!t){return false}else{if(u.tagName==="LI"&&t.tagName==="LI"){return t.style.listStyleType==="none"||j(t)}else{if(n(u)){return(u.tagName===t.tagName&&(s||u.style.listStyleType===t.style.listStyleType))||q(t)}else{if(v&&u.tagName==="P"&&t.tagName==="P"){return true}else{return false}}}}}function q(t){var s=i(t.firstChild),u=b(t.lastChild);return s&&u&&n(t)&&s===u&&(n(s)||s.style.listStyleType==="none"||j(s))}function j(u){var t=i(u.firstChild),s=b(u.lastChild);return t&&s&&t===s&&n(t)}function f(w,v,s){var u=b(w.lastChild),t=i(v.firstChild);if(w.tagName==="P"){w.appendChild(w.ownerDocument.createElement("br"))}while(v.firstChild){w.appendChild(v.firstChild)}if(s){w.style.listStyleType=s.style.listStyleType}v.parentNode.removeChild(v);h(u,t,false);return w}function k(t,u){var s;if(!u.is(t,"li,ol,ul")){s=u.getParent(t,"li");if(s){t=s}}return t}tinymce.create("tinymce.plugins.Lists",{init:function(u,v){var s=false;function x(y){return y.keyCode===9&&(u.queryCommandState("InsertUnorderedList")||u.queryCommandState("InsertOrderedList"))}function w(y,A){var z=y.selection,B;if(A.keyCode===13){B=z.getStart();s=z.isCollapsed()&&B&&B.tagName==="LI"&&B.childNodes.length===0;return s}}function t(y,z){if(x(z)||w(y,z)){return r.cancel(z)}}this.ed=u;u.addCommand("Indent",this.indent,this);u.addCommand("Outdent",this.outdent,this);u.addCommand("InsertUnorderedList",function(){this.applyList("UL","OL")},this);u.addCommand("InsertOrderedList",function(){this.applyList("OL","UL")},this);u.onInit.add(function(){u.editorCommands.addCommands({outdent:function(){var z=u.selection,A=u.dom;function y(B){B=A.getParent(B,A.isBlock);return B&&(parseInt(u.dom.getStyle(B,"margin-left")||0,10)+parseInt(u.dom.getStyle(B,"padding-left")||0,10))>0}return y(z.getStart())||y(z.getEnd())||u.queryCommandState("InsertOrderedList")||u.queryCommandState("InsertUnorderedList")}},"state")});u.onKeyUp.add(function(z,A){var B,y;if(x(A)){z.execCommand(A.shiftKey?"Outdent":"Indent",true,null);return r.cancel(A)}else{if(s&&w(z,A)){if(z.queryCommandState("InsertOrderedList")){z.execCommand("InsertOrderedList")}else{z.execCommand("InsertUnorderedList")}B=z.selection.getStart();if(B&&B.tagName==="LI"){B=z.dom.getParent(B,"ol,ul").nextSibling;if(B&&B.tagName==="P"){if(!B.firstChild){B.appendChild(z.getDoc().createTextNode(""))}y=z.dom.createRng();y.setStart(B.firstChild,1);y.setEnd(B.firstChild,1);z.selection.setRng(y)}}return r.cancel(A)}}});u.onKeyPress.add(t);u.onKeyDown.add(t)},applyList:function(y,v){var C=this,z=C.ed,I=z.dom,s=[],H=false,u=false,w=false,B,G=z.selection.getSelectedBlocks();function E(t){if(t&&t.tagName==="BR"){I.remove(t)}}function F(M){var N=I.create(y),t;function L(O){if(O.style.marginLeft||O.style.paddingLeft){C.adjustPaddingFunction(false)(O)}}if(M.tagName==="LI"){}else{if(M.tagName==="P"||M.tagName==="DIV"||M.tagName==="BODY"){K(M,function(P,O,Q){J(P,O,M.tagName==="BODY"?null:P.parentNode);t=P.parentNode;L(t);E(O)});if(M.tagName==="P"||G.length>1){I.split(t.parentNode.parentNode,t.parentNode)}m(t.parentNode,true);return}else{t=I.create("li");I.insertAfter(t,M);t.appendChild(M);L(M);M=t}}I.insertAfter(N,M);N.appendChild(M);m(N,true);s.push(M)}function J(Q,L,O){var t,P=Q,N,M;while(!I.isBlock(Q.parentNode)&&Q.parentNode!==I.getRoot()){Q=I.split(Q.parentNode,Q.previousSibling);Q=Q.nextSibling;P=Q}if(O){t=O.cloneNode(true);Q.parentNode.insertBefore(t,Q);while(t.firstChild){I.remove(t.firstChild)}t=I.rename(t,"li")}else{t=I.create("li");Q.parentNode.insertBefore(t,Q)}while(P&&P!=L){N=P.nextSibling;t.appendChild(P);P=N}if(t.childNodes.length===0){t.innerHTML='
    '}F(t)}function K(Q,T){var N,R,O=3,L=1,t="br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl";function P(X,U){var V=I.createRng(),W;g.keep=true;z.selection.moveToBookmark(g);g.keep=false;W=z.selection.getRng(true);if(!U){U=X.parentNode.lastChild}V.setStartBefore(X);V.setEndAfter(U);return !(V.compareBoundaryPoints(O,W)>0||V.compareBoundaryPoints(L,W)<=0)}function S(U){if(U.nextSibling){return U.nextSibling}if(!I.isBlock(U.parentNode)&&U.parentNode!==I.getRoot()){return S(U.parentNode)}}N=Q.firstChild;var M=false;e(I.select(t,Q),function(V){var U;if(V.hasAttribute&&V.hasAttribute("_mce_bogus")){return true}if(P(N,V)){I.addClass(V,"_mce_tagged_br");N=S(V)}});M=(N&&P(N,undefined));N=Q.firstChild;e(I.select(t,Q),function(V){var U=S(V);if(V.hasAttribute&&V.hasAttribute("_mce_bogus")){return true}if(I.hasClass(V,"_mce_tagged_br")){T(N,V,R);R=null}else{R=V}N=U});if(M){T(N,undefined,R)}}function D(t){K(t,function(M,L,N){J(M,L);E(L);E(N)})}function A(t){if(tinymce.inArray(s,t)!==-1){return}if(t.parentNode.tagName===v){I.split(t.parentNode,t);F(t);o(t.parentNode,false)}s.push(t)}function x(M){var O,N,L,t;if(tinymce.inArray(s,M)!==-1){return}M=c(M,I);while(I.is(M.parentNode,"ol,ul,li")){I.split(M.parentNode,M)}s.push(M);M=I.rename(M,"p");L=m(M,false,z.settings.force_br_newlines);if(L===M){O=M.firstChild;while(O){if(I.isBlock(O)){O=I.split(O.parentNode,O);t=true;N=O.nextSibling&&O.nextSibling.firstChild}else{N=O.nextSibling;if(t&&O.tagName==="BR"){I.remove(O)}t=false}O=N}}}e(G,function(t){t=k(t,I);if(t.tagName===v||(t.tagName==="LI"&&t.parentNode.tagName===v)){u=true}else{if(t.tagName===y||(t.tagName==="LI"&&t.parentNode.tagName===y)){H=true}else{w=true}}});if(w||u||G.length===0){B={LI:A,H1:F,H2:F,H3:F,H4:F,H5:F,H6:F,P:F,BODY:F,DIV:G.length>1?F:D,defaultAction:D}}else{B={defaultAction:x}}this.process(B)},indent:function(){var u=this.ed,w=u.dom,x=[];function s(z){var y=w.create("li",{style:"list-style-type: none;"});w.insertAfter(y,z);return y}function t(B){var y=s(B),D=w.getParent(B,"ol,ul"),C=D.tagName,E=w.getStyle(D,"list-style-type"),A={},z;if(E!==""){A.style="list-style-type: "+E+";"}z=w.create(C,A);y.appendChild(z);return z}function v(z){if(!d(u,z,x)){z=c(z,w);var y=t(z);y.appendChild(z);m(y.parentNode,false);m(y,false);x.push(z)}}this.process({LI:v,defaultAction:this.adjustPaddingFunction(true)})},outdent:function(){var v=this,u=v.ed,w=u.dom,s=[];function x(t){var z,y,A;if(!d(u,t,s)){if(w.getStyle(t,"margin-left")!==""||w.getStyle(t,"padding-left")!==""){return v.adjustPaddingFunction(false)(t)}A=w.getStyle(t,"text-align",true);if(A==="center"||A==="right"){w.setStyle(t,"text-align","left");return}t=c(t,w);z=t.parentNode;y=t.parentNode.parentNode;if(y.tagName==="P"){w.split(y,t.parentNode)}else{w.split(z,t);if(y.tagName==="LI"){w.split(y,t)}else{if(!w.is(y,"ol,ul")){w.rename(t,"p")}}}s.push(t)}}this.process({LI:x,defaultAction:this.adjustPaddingFunction(false)});e(s,m)},process:function(x){var B=this,v=B.ed.selection,y=B.ed.dom,A,s;function w(t){y.removeClass(t,"_mce_act_on");if(!t||t.nodeType!==1){return}t=k(t,y);var C=x[t.tagName];if(!C){C=x.defaultAction}C(t)}function u(t){B.splitSafeEach(t.childNodes,w)}function z(t,C){return C>=0&&t.hasChildNodes()&&C0){t=s.shift();w.removeClass(t,"_mce_act_on");u(t);s=w.select("._mce_act_on")}},adjustPaddingFunction:function(u){var s,v,t=this.ed;s=t.settings.indentation;v=/[a-z%]+/i.exec(s);s=parseInt(s,10);return function(w){var y,x;y=parseInt(t.dom.getStyle(w,"margin-left")||0,10)+parseInt(t.dom.getStyle(w,"padding-left")||0,10);if(u){x=y+s}else{x=y-s}t.dom.setStyle(w,"padding-left","");t.dom.setStyle(w,"margin-left",x>0?x+v:"")}},getInfo:function(){return{longname:"Lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("lists",tinymce.plugins.Lists)}()); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/lists/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/lists/editor_plugin_src.js new file mode 100644 index 00000000..b7ca762c --- /dev/null +++ b/include/javascript/tiny_mce/plugins/lists/editor_plugin_src.js @@ -0,0 +1,617 @@ +/** + * editor_plugin_src.js + * + * Copyright 2011, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var each = tinymce.each, Event = tinymce.dom.Event, bookmark; + + // Skips text nodes that only contain whitespace since they aren't semantically important. + function skipWhitespaceNodes(e, next) { + while (e && (e.nodeType === 8 || (e.nodeType === 3 && /^[ \t\n\r]*$/.test(e.nodeValue)))) { + e = next(e); + } + return e; + } + + function skipWhitespaceNodesBackwards(e) { + return skipWhitespaceNodes(e, function(e) { return e.previousSibling; }); + } + + function skipWhitespaceNodesForwards(e) { + return skipWhitespaceNodes(e, function(e) { return e.nextSibling; }); + } + + function hasParentInList(ed, e, list) { + return ed.dom.getParent(e, function(p) { + return tinymce.inArray(list, p) !== -1; + }); + } + + function isList(e) { + return e && (e.tagName === 'OL' || e.tagName === 'UL'); + } + + function splitNestedLists(element, dom) { + var tmp, nested, wrapItem; + tmp = skipWhitespaceNodesBackwards(element.lastChild); + while (isList(tmp)) { + nested = tmp; + tmp = skipWhitespaceNodesBackwards(nested.previousSibling); + } + if (nested) { + wrapItem = dom.create('li', { style: 'list-style-type: none;'}); + dom.split(element, nested); + dom.insertAfter(wrapItem, nested); + wrapItem.appendChild(nested); + wrapItem.appendChild(nested); + element = wrapItem.previousSibling; + } + return element; + } + + function attemptMergeWithAdjacent(e, allowDifferentListStyles, mergeParagraphs) { + e = attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs); + return attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs); + } + + function attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs) { + var prev = skipWhitespaceNodesBackwards(e.previousSibling); + if (prev) { + return attemptMerge(prev, e, allowDifferentListStyles ? prev : false, mergeParagraphs); + } else { + return e; + } + } + + function attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs) { + var next = skipWhitespaceNodesForwards(e.nextSibling); + if (next) { + return attemptMerge(e, next, allowDifferentListStyles ? next : false, mergeParagraphs); + } else { + return e; + } + } + + function attemptMerge(e1, e2, differentStylesMasterElement, mergeParagraphs) { + if (canMerge(e1, e2, !!differentStylesMasterElement, mergeParagraphs)) { + return merge(e1, e2, differentStylesMasterElement); + } else if (e1 && e1.tagName === 'LI' && isList(e2)) { + // Fix invalidly nested lists. + e1.appendChild(e2); + } + return e2; + } + + function canMerge(e1, e2, allowDifferentListStyles, mergeParagraphs) { + if (!e1 || !e2) { + return false; + } else if (e1.tagName === 'LI' && e2.tagName === 'LI') { + return e2.style.listStyleType === 'none' || containsOnlyAList(e2); + } else if (isList(e1)) { + return (e1.tagName === e2.tagName && (allowDifferentListStyles || e1.style.listStyleType === e2.style.listStyleType)) || isListForIndent(e2); + } else if (mergeParagraphs && e1.tagName === 'P' && e2.tagName === 'P') { + return true; + } else { + return false; + } + } + + function isListForIndent(e) { + var firstLI = skipWhitespaceNodesForwards(e.firstChild), lastLI = skipWhitespaceNodesBackwards(e.lastChild); + return firstLI && lastLI && isList(e) && firstLI === lastLI && (isList(firstLI) || firstLI.style.listStyleType === 'none' || containsOnlyAList(firstLI)); + } + + function containsOnlyAList(e) { + var firstChild = skipWhitespaceNodesForwards(e.firstChild), lastChild = skipWhitespaceNodesBackwards(e.lastChild); + return firstChild && lastChild && firstChild === lastChild && isList(firstChild); + } + + function merge(e1, e2, masterElement) { + var lastOriginal = skipWhitespaceNodesBackwards(e1.lastChild), firstNew = skipWhitespaceNodesForwards(e2.firstChild); + if (e1.tagName === 'P') { + e1.appendChild(e1.ownerDocument.createElement('br')); + } + while (e2.firstChild) { + e1.appendChild(e2.firstChild); + } + if (masterElement) { + e1.style.listStyleType = masterElement.style.listStyleType; + } + e2.parentNode.removeChild(e2); + attemptMerge(lastOriginal, firstNew, false); + return e1; + } + + function findItemToOperateOn(e, dom) { + var item; + if (!dom.is(e, 'li,ol,ul')) { + item = dom.getParent(e, 'li'); + if (item) { + e = item; + } + } + return e; + } + + tinymce.create('tinymce.plugins.Lists', { + init: function(ed, url) { + var enterDownInEmptyList = false; + function isTriggerKey(e) { + return e.keyCode === 9 && (ed.queryCommandState('InsertUnorderedList') || ed.queryCommandState('InsertOrderedList')); + } + function isEnterInEmptyListItem(ed, e) { + var sel = ed.selection, n; + if (e.keyCode === 13) { + n = sel.getStart(); + enterDownInEmptyList = sel.isCollapsed() && n && n.tagName === 'LI' && n.childNodes.length === 0; + return enterDownInEmptyList; + } + } + function cancelKeys(ed, e) { + if (isTriggerKey(e) || isEnterInEmptyListItem(ed, e)) { + return Event.cancel(e); + } + } + + this.ed = ed; + ed.addCommand('Indent', this.indent, this); + ed.addCommand('Outdent', this.outdent, this); + ed.addCommand('InsertUnorderedList', function() { + this.applyList('UL', 'OL'); + }, this); + ed.addCommand('InsertOrderedList', function() { + this.applyList('OL', 'UL'); + }, this); + + ed.onInit.add(function() { + ed.editorCommands.addCommands({ + 'outdent': function() { + var sel = ed.selection, dom = ed.dom; + function hasStyleIndent(n) { + n = dom.getParent(n, dom.isBlock); + return n && (parseInt(ed.dom.getStyle(n, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(n, 'padding-left') || 0, 10)) > 0; + } + return hasStyleIndent(sel.getStart()) || hasStyleIndent(sel.getEnd()) || ed.queryCommandState('InsertOrderedList') || ed.queryCommandState('InsertUnorderedList'); + } + }, 'state'); + }); + + ed.onKeyUp.add(function(ed, e) { + var n, rng; + if (isTriggerKey(e)) { + ed.execCommand(e.shiftKey ? 'Outdent' : 'Indent', true, null); + return Event.cancel(e); + } else if (enterDownInEmptyList && isEnterInEmptyListItem(ed, e)) { + if (ed.queryCommandState('InsertOrderedList')) { + ed.execCommand('InsertOrderedList'); + } else { + ed.execCommand('InsertUnorderedList'); + } + n = ed.selection.getStart(); + if (n && n.tagName === 'LI') { + // Fix the caret position on IE since it jumps back up to the previous list item. + n = ed.dom.getParent(n, 'ol,ul').nextSibling; + if (n && n.tagName === 'P') { + if (!n.firstChild) { + n.appendChild(ed.getDoc().createTextNode('')); + } + rng = ed.dom.createRng(); + rng.setStart(n.firstChild, 1); + rng.setEnd(n.firstChild, 1); + ed.selection.setRng(rng); + } + } + return Event.cancel(e); + } + }); + ed.onKeyPress.add(cancelKeys); + ed.onKeyDown.add(cancelKeys); + }, + + applyList: function(targetListType, oppositeListType) { + var t = this, ed = t.ed, dom = ed.dom, applied = [], hasSameType = false, hasOppositeType = false, hasNonList = false, actions, + selectedBlocks = ed.selection.getSelectedBlocks(); + + function cleanupBr(e) { + if (e && e.tagName === 'BR') { + dom.remove(e); + } + } + + function makeList(element) { + var list = dom.create(targetListType), li; + function adjustIndentForNewList(element) { + // If there's a margin-left, outdent one level to account for the extra list margin. + if (element.style.marginLeft || element.style.paddingLeft) { + t.adjustPaddingFunction(false)(element); + } + } + + if (element.tagName === 'LI') { + // No change required. + } else if (element.tagName === 'P' || element.tagName === 'DIV' || element.tagName === 'BODY') { + processBrs(element, function(startSection, br, previousBR) { + doWrapList(startSection, br, element.tagName === 'BODY' ? null : startSection.parentNode); + li = startSection.parentNode; + adjustIndentForNewList(li); + cleanupBr(br); + }); + if (element.tagName === 'P' || selectedBlocks.length > 1) { + dom.split(li.parentNode.parentNode, li.parentNode); + } + attemptMergeWithAdjacent(li.parentNode, true); + return; + } else { + // Put the list around the element. + li = dom.create('li'); + dom.insertAfter(li, element); + li.appendChild(element); + adjustIndentForNewList(element); + element = li; + } + dom.insertAfter(list, element); + list.appendChild(element); + attemptMergeWithAdjacent(list, true); + applied.push(element); + } + + function doWrapList(start, end, template) { + var li, n = start, tmp, i; + while (!dom.isBlock(start.parentNode) && start.parentNode !== dom.getRoot()) { + start = dom.split(start.parentNode, start.previousSibling); + start = start.nextSibling; + n = start; + } + if (template) { + li = template.cloneNode(true); + start.parentNode.insertBefore(li, start); + while (li.firstChild) dom.remove(li.firstChild); + li = dom.rename(li, 'li'); + } else { + li = dom.create('li'); + start.parentNode.insertBefore(li, start); + } + while (n && n != end) { + tmp = n.nextSibling; + li.appendChild(n); + n = tmp; + } + if (li.childNodes.length === 0) { + li.innerHTML = '
    '; + } + makeList(li); + } + + function processBrs(element, callback) { + var startSection, previousBR, END_TO_START = 3, START_TO_END = 1, + breakElements = 'br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl'; + function isAnyPartSelected(start, end) { + var r = dom.createRng(), sel; + bookmark.keep = true; + ed.selection.moveToBookmark(bookmark); + bookmark.keep = false; + sel = ed.selection.getRng(true); + if (!end) { + end = start.parentNode.lastChild; + } + r.setStartBefore(start); + r.setEndAfter(end); + return !(r.compareBoundaryPoints(END_TO_START, sel) > 0 || r.compareBoundaryPoints(START_TO_END, sel) <= 0); + } + function nextLeaf(br) { + if (br.nextSibling) + return br.nextSibling; + if (!dom.isBlock(br.parentNode) && br.parentNode !== dom.getRoot()) + return nextLeaf(br.parentNode); + } + // Split on BRs within the range and process those. + startSection = element.firstChild; + // First mark the BRs that have any part of the previous section selected. + var trailingContentSelected = false; + each(dom.select(breakElements, element), function(br) { + var b; + if (br.hasAttribute && br.hasAttribute('_mce_bogus')) { + return true; // Skip the bogus Brs that are put in to appease Firefox and Safari. + } + if (isAnyPartSelected(startSection, br)) { + dom.addClass(br, '_mce_tagged_br'); + startSection = nextLeaf(br); + } + }); + trailingContentSelected = (startSection && isAnyPartSelected(startSection, undefined)); + startSection = element.firstChild; + each(dom.select(breakElements, element), function(br) { + // Got a section from start to br. + var tmp = nextLeaf(br); + if (br.hasAttribute && br.hasAttribute('_mce_bogus')) { + return true; // Skip the bogus Brs that are put in to appease Firefox and Safari. + } + if (dom.hasClass(br, '_mce_tagged_br')) { + callback(startSection, br, previousBR); + previousBR = null; + } else { + previousBR = br; + } + startSection = tmp; + }); + if (trailingContentSelected) { + callback(startSection, undefined, previousBR); + } + } + + function wrapList(element) { + processBrs(element, function(startSection, br, previousBR) { + // Need to indent this part + doWrapList(startSection, br); + cleanupBr(br); + cleanupBr(previousBR); + }); + } + + function changeList(element) { + if (tinymce.inArray(applied, element) !== -1) { + return; + } + if (element.parentNode.tagName === oppositeListType) { + dom.split(element.parentNode, element); + makeList(element); + attemptMergeWithNext(element.parentNode, false); + } + applied.push(element); + } + + function convertListItemToParagraph(element) { + var child, nextChild, mergedElement, splitLast; + if (tinymce.inArray(applied, element) !== -1) { + return; + } + element = splitNestedLists(element, dom); + while (dom.is(element.parentNode, 'ol,ul,li')) { + dom.split(element.parentNode, element); + } + // Push the original element we have from the selection, not the renamed one. + applied.push(element); + element = dom.rename(element, 'p'); + mergedElement = attemptMergeWithAdjacent(element, false, ed.settings.force_br_newlines); + if (mergedElement === element) { + // Now split out any block elements that can't be contained within a P. + // Manually iterate to ensure we handle modifications correctly (doesn't work with tinymce.each) + child = element.firstChild; + while (child) { + if (dom.isBlock(child)) { + child = dom.split(child.parentNode, child); + splitLast = true; + nextChild = child.nextSibling && child.nextSibling.firstChild; + } else { + nextChild = child.nextSibling; + if (splitLast && child.tagName === 'BR') { + dom.remove(child); + } + splitLast = false; + } + child = nextChild; + } + } + } + + each(selectedBlocks, function(e) { + e = findItemToOperateOn(e, dom); + if (e.tagName === oppositeListType || (e.tagName === 'LI' && e.parentNode.tagName === oppositeListType)) { + hasOppositeType = true; + } else if (e.tagName === targetListType || (e.tagName === 'LI' && e.parentNode.tagName === targetListType)) { + hasSameType = true; + } else { + hasNonList = true; + } + }); + + if (hasNonList || hasOppositeType || selectedBlocks.length === 0) { + actions = { + 'LI': changeList, + 'H1': makeList, + 'H2': makeList, + 'H3': makeList, + 'H4': makeList, + 'H5': makeList, + 'H6': makeList, + 'P': makeList, + 'BODY': makeList, + 'DIV': selectedBlocks.length > 1 ? makeList : wrapList, + defaultAction: wrapList + }; + } else { + actions = { + defaultAction: convertListItemToParagraph + }; + } + this.process(actions); + }, + + indent: function() { + var ed = this.ed, dom = ed.dom, indented = []; + + function createWrapItem(element) { + var wrapItem = dom.create('li', { style: 'list-style-type: none;'}); + dom.insertAfter(wrapItem, element); + return wrapItem; + } + + function createWrapList(element) { + var wrapItem = createWrapItem(element), + list = dom.getParent(element, 'ol,ul'), + listType = list.tagName, + listStyle = dom.getStyle(list, 'list-style-type'), + attrs = {}, + wrapList; + if (listStyle !== '') { + attrs.style = 'list-style-type: ' + listStyle + ';'; + } + wrapList = dom.create(listType, attrs); + wrapItem.appendChild(wrapList); + return wrapList; + } + + function indentLI(element) { + if (!hasParentInList(ed, element, indented)) { + element = splitNestedLists(element, dom); + var wrapList = createWrapList(element); + wrapList.appendChild(element); + attemptMergeWithAdjacent(wrapList.parentNode, false); + attemptMergeWithAdjacent(wrapList, false); + indented.push(element); + } + } + + this.process({ + 'LI': indentLI, + defaultAction: this.adjustPaddingFunction(true) + }); + + }, + + outdent: function() { + var t = this, ed = t.ed, dom = ed.dom, outdented = []; + + function outdentLI(element) { + var listElement, targetParent, align; + if (!hasParentInList(ed, element, outdented)) { + if (dom.getStyle(element, 'margin-left') !== '' || dom.getStyle(element, 'padding-left') !== '') { + return t.adjustPaddingFunction(false)(element); + } + align = dom.getStyle(element, 'text-align', true); + if (align === 'center' || align === 'right') { + dom.setStyle(element, 'text-align', 'left'); + return; + } + element = splitNestedLists(element, dom); + listElement = element.parentNode; + targetParent = element.parentNode.parentNode; + if (targetParent.tagName === 'P') { + dom.split(targetParent, element.parentNode); + } else { + dom.split(listElement, element); + if (targetParent.tagName === 'LI') { + // Nested list, need to split the LI and go back out to the OL/UL element. + dom.split(targetParent, element); + } else if (!dom.is(targetParent, 'ol,ul')) { + dom.rename(element, 'p'); + } + } + outdented.push(element); + } + } + + this.process({ + 'LI': outdentLI, + defaultAction: this.adjustPaddingFunction(false) + }); + + each(outdented, attemptMergeWithAdjacent); + }, + + process: function(actions) { + var t = this, sel = t.ed.selection, dom = t.ed.dom, selectedBlocks, r; + function processElement(element) { + dom.removeClass(element, '_mce_act_on'); + if (!element || element.nodeType !== 1) { + return; + } + element = findItemToOperateOn(element, dom); + var action = actions[element.tagName]; + if (!action) { + action = actions.defaultAction; + } + action(element); + } + function recurse(element) { + t.splitSafeEach(element.childNodes, processElement); + } + function brAtEdgeOfSelection(container, offset) { + return offset >= 0 && container.hasChildNodes() && offset < container.childNodes.length && + container.childNodes[offset].tagName === 'BR'; + } + selectedBlocks = sel.getSelectedBlocks(); + if (selectedBlocks.length === 0) { + selectedBlocks = [ dom.getRoot() ]; + } + + r = sel.getRng(true); + if (!r.collapsed) { + if (brAtEdgeOfSelection(r.endContainer, r.endOffset - 1)) { + r.setEnd(r.endContainer, r.endOffset - 1); + sel.setRng(r); + } + if (brAtEdgeOfSelection(r.startContainer, r.startOffset)) { + r.setStart(r.startContainer, r.startOffset + 1); + sel.setRng(r); + } + } + bookmark = sel.getBookmark(); + actions.OL = actions.UL = recurse; + t.splitSafeEach(selectedBlocks, processElement); + sel.moveToBookmark(bookmark); + bookmark = null; + // Avoids table or image handles being left behind in Firefox. + t.ed.execCommand('mceRepaint'); + }, + + splitSafeEach: function(elements, f) { + if (tinymce.isGecko && (/Firefox\/[12]\.[0-9]/.test(navigator.userAgent) || + /Firefox\/3\.[0-4]/.test(navigator.userAgent))) { + this.classBasedEach(elements, f); + } else { + each(elements, f); + } + }, + + classBasedEach: function(elements, f) { + var dom = this.ed.dom, nodes, element; + // Mark nodes + each(elements, function(element) { + dom.addClass(element, '_mce_act_on'); + }); + nodes = dom.select('._mce_act_on'); + while (nodes.length > 0) { + element = nodes.shift(); + dom.removeClass(element, '_mce_act_on'); + f(element); + nodes = dom.select('._mce_act_on'); + } + }, + + adjustPaddingFunction: function(isIndent) { + var indentAmount, indentUnits, ed = this.ed; + indentAmount = ed.settings.indentation; + indentUnits = /[a-z%]+/i.exec(indentAmount); + indentAmount = parseInt(indentAmount, 10); + return function(element) { + var currentIndent, newIndentAmount; + currentIndent = parseInt(ed.dom.getStyle(element, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(element, 'padding-left') || 0, 10); + if (isIndent) { + newIndentAmount = currentIndent + indentAmount; + } else { + newIndentAmount = currentIndent - indentAmount; + } + ed.dom.setStyle(element, 'padding-left', ''); + ed.dom.setStyle(element, 'margin-left', newIndentAmount > 0 ? newIndentAmount + indentUnits : ''); + }; + }, + + getInfo: function() { + return { + longname : 'Lists', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + tinymce.PluginManager.add("lists", tinymce.plugins.Lists); +}()); diff --git a/include/javascript/tiny_mce/plugins/media/css/content.css b/include/javascript/tiny_mce/plugins/media/css/content.css deleted file mode 100644 index 7739381d..00000000 --- a/include/javascript/tiny_mce/plugins/media/css/content.css +++ /dev/null @@ -1,6 +0,0 @@ -.mceItemFlash, .mceItemShockWave, .mceItemQuickTime, .mceItemWindowsMedia, .mceItemRealMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc;} -.mceItemShockWave {background-image: url(../img/shockwave.gif);} -.mceItemFlash {background-image:url(../img/flash.gif);} -.mceItemQuickTime {background-image:url(../img/quicktime.gif);} -.mceItemWindowsMedia {background-image:url(../img/windowsmedia.gif);} -.mceItemRealMedia {background-image:url(../img/realmedia.gif);} diff --git a/include/javascript/tiny_mce/plugins/media/css/media.css b/include/javascript/tiny_mce/plugins/media/css/media.css index 7b2253ba..fd04898c 100644 --- a/include/javascript/tiny_mce/plugins/media/css/media.css +++ b/include/javascript/tiny_mce/plugins/media/css/media.css @@ -1,12 +1,12 @@ -#id, #name, #hspace, #vspace, #class_name, #align { width: 100px } +#id, #name, #hspace, #vspace, #class_name, #align { width: 100px } #hspace, #vspace { width: 50px } #flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px } -#flash_base, #flash_flashvars { width: 240px } +#flash_base, #flash_flashvars, #html5_altsource1, #html5_altsource2, #html5_poster { width: 240px } #width, #height { width: 40px } #src, #media_type { width: 250px } #class { width: 120px } -#prev { margin: 0; border: 1px solid black; width: 380px; height: 230px; overflow: auto } -.panel_wrapper div.current { height: 390px; overflow: auto } +#prev { margin: 0; border: 1px solid black; width: 380px; height: 260px; overflow: auto } +.panel_wrapper div.current { height: 420px; overflow: auto } #flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none } .mceAddSelectValue { background-color: #DDDDDD } #qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px } @@ -14,3 +14,4 @@ #rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px } #shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px } #qt_qtsrc { width: 200px } +iframe {border: 1px solid gray} diff --git a/include/javascript/tiny_mce/plugins/media/editor_plugin.js b/include/javascript/tiny_mce/plugins/media/editor_plugin.js index b226b00d..66219078 100644 --- a/include/javascript/tiny_mce/plugins/media/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/media/editor_plugin.js @@ -1 +1 @@ -(function(){var each=tinymce.each;tinymce.create('tinymce.plugins.MediaPlugin',{init:function(ed,url){var t=this;t.editor=ed;t.url=url;function isMediaElm(n){return/^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(n.className);};ed.onPreInit.add(function(){ed.serializer.addRules('param[name|value|_mce_value]');});ed.addCommand('mceMedia',function(){ed.windowManager.open({file:url+'/media.htm',width:430+parseInt(ed.getLang('media.delta_width',0)),height:470+parseInt(ed.getLang('media.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('media',{title:'media.desc',cmd:'mceMedia'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('media',n.nodeName=='IMG'&&isMediaElm(n));});ed.onInit.add(function(){var lo={mceItemFlash:'flash',mceItemShockWave:'shockwave',mceItemWindowsMedia:'windowsmedia',mceItemQuickTime:'quicktime',mceItemRealMedia:'realmedia'};ed.selection.onSetContent.add(function(){t._spansToImgs(ed.getBody());});ed.selection.onBeforeSetContent.add(t._objectsToSpans,t);if(ed.settings.content_css!==false)ed.dom.loadCSS(url+"/css/content.css");if(ed.theme.onResolveName){ed.theme.onResolveName.add(function(th,o){if(o.name=='img'){each(lo,function(v,k){if(ed.dom.hasClass(o.node,k)){o.name=v;o.title=ed.dom.getAttrib(o.node,'title');return false;}});}});}if(ed&&ed.plugins.contextmenu){ed.plugins.contextmenu.onContextMenu.add(function(th,m,e){if(e.nodeName=='IMG'&&/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(e.className)){m.add({title:'media.edit',icon:'media',cmd:'mceMedia'});}});}});ed.onBeforeSetContent.add(t._objectsToSpans,t);ed.onSetContent.add(function(){t._spansToImgs(ed.getBody());});ed.onPreProcess.add(function(ed,o){var dom=ed.dom;if(o.set){t._spansToImgs(o.node);each(dom.select('IMG',o.node),function(n){var p;if(isMediaElm(n)){p=t._parse(n.title);dom.setAttrib(n,'width',dom.getAttrib(n,'width',p.width||100));dom.setAttrib(n,'height',dom.getAttrib(n,'height',p.height||100));}});}if(o.get){each(dom.select('IMG',o.node),function(n){var ci,cb,mt;if(ed.getParam('media_use_script')){if(isMediaElm(n))n.className=n.className.replace(/mceItem/g,'mceTemp');return;}switch(n.className){case'mceItemFlash':ci='d27cdb6e-ae6d-11cf-96b8-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='application/x-shockwave-flash';break;case'mceItemShockWave':ci='166b1bca-3f9c-11cf-8075-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';mt='application/x-director';break;case'mceItemWindowsMedia':ci=ed.getParam('media_wmp6_compatible')?'05589fa1-c356-11ce-bf01-00aa0055595a':'6bf52a52-394a-11d3-b153-00c04f79faa6';cb='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';mt='application/x-mplayer2';break;case'mceItemQuickTime':ci='02bf25d5-8c17-4b23-bc80-d3488abddc6b';cb='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';mt='video/quicktime';break;case'mceItemRealMedia':ci='cfcdaa03-8be4-11cf-b84b-0020afbbccfa';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='audio/x-pn-realaudio-plugin';break;}if(ci){dom.replace(t._buildObj({classid:ci,codebase:cb,type:mt},n),n);}});}});ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/_mce_value=/g,'value=');});if(ed.getParam('media_use_script')){function getAttr(s,n){n=new RegExp(n+'=\"([^\"]+)\"','g').exec(s);return n?ed.dom.decode(n[1]):'';};ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/]+>/g,function(im){var cl=getAttr(im,'class');if(/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(cl)){at=t._parse(getAttr(im,'title'));at.width=getAttr(im,'width');at.height=getAttr(im,'height');im='';}return im;});});}},getInfo:function(){return{longname:'Media',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_objectsToSpans:function(ed,o){var t=this,h=o.content;h=h.replace(/]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi,function(a,b,c){var o=t._parse(c);return''});h=h.replace(/]*)>/gi,'');h=h.replace(/]*)\/?>/gi,'');h=h.replace(/]*)>/gi,'');h=h.replace(/<\/(object)([^>]*)>/gi,'');h=h.replace(/<\/embed>/gi,'');h=h.replace(/]*)>/gi,function(a,b){return''});h=h.replace(/\/ class=\"mceItemParam\"><\/span>/gi,'class="mceItemParam">');o.content=h;},_buildObj:function(o,n){var ob,ed=this.editor,dom=ed.dom,p=this._parse(n.title),stc;stc=ed.getParam('media_strict',true)&&o.type=='application/x-shockwave-flash';p.width=o.width=dom.getAttrib(n,'width')||100;p.height=o.height=dom.getAttrib(n,'height')||100;if(p.src)p.src=ed.convertURL(p.src,'src',n);if(stc){ob=dom.create('span',{mce_name:'object',type:'application/x-shockwave-flash',data:p.src,width:o.width,height:o.height});}else{ob=dom.create('span',{mce_name:'object',classid:"clsid:"+o.classid,codebase:o.codebase,width:o.width,height:o.height});}each(p,function(v,k){if(!/^(width|height|codebase|classid|_cx|_cy)$/.test(k)){if(o.type=='application/x-mplayer2'&&k=='src')k='url';if(v)dom.add(ob,'span',{mce_name:'param',name:k,'_mce_value':v});}});if(!stc)dom.add(ob,'span',tinymce.extend({mce_name:'embed',type:o.type},p));return ob;},_spansToImgs:function(p){var t=this,dom=t.editor.dom,im,ci;each(dom.select('span',p),function(n){if(dom.getAttrib(n,'class')=='mceItemObject'){ci=dom.getAttrib(n,"classid").toLowerCase().replace(/\s+/g,'');switch(ci){case'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000':dom.replace(t._createImg('mceItemFlash',n),n);break;case'clsid:166b1bca-3f9c-11cf-8075-444553540000':dom.replace(t._createImg('mceItemShockWave',n),n);break;case'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6':case'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95':case'clsid:05589fa1-c356-11ce-bf01-00aa0055595a':dom.replace(t._createImg('mceItemWindowsMedia',n),n);break;case'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b':dom.replace(t._createImg('mceItemQuickTime',n),n);break;case'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa':dom.replace(t._createImg('mceItemRealMedia',n),n);break;default:dom.replace(t._createImg('mceItemFlash',n),n);}return;}if(dom.getAttrib(n,'class')=='mceItemEmbed'){switch(dom.getAttrib(n,'type')){case'application/x-shockwave-flash':dom.replace(t._createImg('mceItemFlash',n),n);break;case'application/x-director':dom.replace(t._createImg('mceItemShockWave',n),n);break;case'application/x-mplayer2':dom.replace(t._createImg('mceItemWindowsMedia',n),n);break;case'video/quicktime':dom.replace(t._createImg('mceItemQuickTime',n),n);break;case'audio/x-pn-realaudio-plugin':dom.replace(t._createImg('mceItemRealMedia',n),n);break;default:dom.replace(t._createImg('mceItemFlash',n),n);}}});},_createImg:function(cl,n){var im,dom=this.editor.dom,pa={},ti='',args;args=['id','name','width','height','bgcolor','align','flashvars','src','wmode','allowfullscreen','quality'];im=dom.create('img',{src:this.url+'/img/trans.gif',width:dom.getAttrib(n,'width')||100,height:dom.getAttrib(n,'height')||100,'class':cl});each(args,function(na){var v=dom.getAttrib(n,na);if(v)pa[na]=v;});each(dom.select('span',n),function(n){if(dom.hasClass(n,'mceItemParam'))pa[dom.getAttrib(n,'name')]=dom.getAttrib(n,'_mce_value');});if(pa.movie){pa.src=pa.movie;delete pa.movie;}n=dom.select('.mceItemEmbed',n)[0];if(n){each(args,function(na){var v=dom.getAttrib(n,na);if(v&&!pa[na])pa[na]=v;});}delete pa.width;delete pa.height;im.title=this._serialize(pa);return im;},_parse:function(s){return tinymce.util.JSON.parse('{'+s+'}');},_serialize:function(o){return tinymce.util.JSON.serialize(o).replace(/[{}]/g,'');}});tinymce.PluginManager.add('media',tinymce.plugins.MediaPlugin);})(); \ No newline at end of file +(function(){var d=tinymce.explode("id,name,width,height,style,align,class,hspace,vspace,bgcolor,type"),h=tinymce.makeMap(d.join(",")),b=tinymce.html.Node,f,a,g=tinymce.util.JSON,e;f=[["Flash","d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["ShockWave","166b1bca-3f9c-11cf-8075-444553540000","application/x-director","http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],["WindowsMedia","6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a","application/x-mplayer2","http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],["QuickTime","02bf25d5-8c17-4b23-bc80-d3488abddc6b","video/quicktime","http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],["RealMedia","cfcdaa03-8be4-11cf-b84b-0020afbbccfa","audio/x-pn-realaudio-plugin","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["Java","8ad9c840-044e-11d1-b3e9-00805f499d93","application/x-java-applet","http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],["Silverlight","dfeaf541-f3e1-4c24-acac-99c30715084a","application/x-silverlight-2"],["Iframe"],["Video"]];function c(m){var l,j,k;if(m&&!m.splice){j=[];for(k=0;true;k++){if(m[k]){j[k]=m[k]}else{break}}return j}return m}tinymce.create("tinymce.plugins.MediaPlugin",{init:function(n,j){var r=this,l={},m,p,q,k;function o(i){return i&&i.nodeName==="IMG"&&n.dom.hasClass(i,"mceItemMedia")}r.editor=n;r.url=j;a="";for(m=0;m0){L+=(L?"&":"")+M+"="+escape(N)}});if(L.length){D.params.flashvars=L}I=o.getParam("flash_video_player_params",{allowfullscreen:true,allowscriptaccess:true});tinymce.each(I,function(N,M){D.params[M]=""+N})}}D=g.parse(x.attr("data-mce-json"));p=this.getType(x.attr("class"));z=x.attr("data-mce-style");if(!z){z=x.attr("style");if(z){z=o.dom.serializeStyle(o.dom.parseStyle(z,"img"))}}if(p.name==="Iframe"){v=new b("iframe",1);tinymce.each(d,function(i){var G=x.attr(i);if(i=="class"&&G){G=G.replace(/mceItem.+ ?/g,"")}if(G&&G.length>0){v.attr(i,G)}});for(F in D.params){v.attr(F,D.params[F])}v.attr({style:z,src:D.params.src});x.replace(v);return}if(this.editor.settings.media_use_script){v=new b("script",1).attr("type","text/javascript");w=new b("#text",3);w.value="write"+p.name+"("+g.serialize(tinymce.extend(D.params,{width:x.attr("width"),height:x.attr("height")}))+");";v.append(w);x.replace(v);return}if(p.name==="Video"&&D.video.sources[0]){A=new b("video",1).attr(tinymce.extend({id:x.attr("id"),width:x.attr("width"),height:x.attr("height"),style:z},D.video.attrs));if(D.video.attrs){l=D.video.attrs.poster}k=D.video.sources=c(D.video.sources);for(y=0;y]+>/g, function(im) { - var cl = getAttr(im, 'class'); + convertUrl : function(url, force_absolute) { + var self = this, editor = self.editor, settings = editor.settings, + urlConverter = settings.url_converter, + urlConverterScope = settings.url_converter_scope || self; - if (/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(cl)) { - at = t._parse(getAttr(im, 'title')); - at.width = getAttr(im, 'width'); - at.height = getAttr(im, 'height'); - im = ''; - } + if (!url) + return url; - return im; - }); - }); - } + if (force_absolute) + return editor.documentBaseURI.toAbsolute(url); + + return urlConverter.call(urlConverterScope, url, 'src', 'object'); }, getInfo : function() { @@ -199,199 +220,548 @@ }; }, - // Private methods - _objectsToSpans : function(ed, o) { - var t = this, h = o.content; + /** + * Converts the JSON data object to an img node. + */ + dataToImg : function(data, force_absolute) { + var self = this, editor = self.editor, baseUri = editor.documentBaseURI, sources, attrs, img, i; + + data.params.src = self.convertUrl(data.params.src, force_absolute); - h = h.replace(/]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi, function(a, b, c) { - var o = t._parse(c); + attrs = data.video.attrs; + if (attrs) + attrs.src = self.convertUrl(attrs.src, force_absolute); - return '' + if (attrs) + attrs.poster = self.convertUrl(attrs.poster, force_absolute); + + sources = toArray(data.video.sources); + if (sources) { + for (i = 0; i < sources.length; i++) + sources[i].src = self.convertUrl(sources[i].src, force_absolute); + } + + img = self.editor.dom.create('img', { + id : data.id, + style : data.style, + align : data.align, + src : self.editor.theme.url + '/img/trans.gif', + 'class' : 'mceItemMedia mceItem' + self.getType(data.type).name, + 'data-mce-json' : JSON.serialize(data, "'") }); - h = h.replace(/]*)>/gi, ''); - h = h.replace(/]*)\/?>/gi, ''); - h = h.replace(/]*)>/gi, ''); - h = h.replace(/<\/(object)([^>]*)>/gi, ''); - h = h.replace(/<\/embed>/gi, ''); - h = h.replace(/]*)>/gi, function(a, b) {return ''}); - h = h.replace(/\/ class=\"mceItemParam\"><\/span>/gi, 'class="mceItemParam">'); + img.width = data.width || "320"; + img.height = data.height || "240"; - o.content = h; + return img; }, - _buildObj : function(o, n) { - var ob, ed = this.editor, dom = ed.dom, p = this._parse(n.title), stc; - - stc = ed.getParam('media_strict', true) && o.type == 'application/x-shockwave-flash'; + /** + * Converts the JSON data object to a HTML string. + */ + dataToHtml : function(data, force_absolute) { + return this.editor.serializer.serialize(this.dataToImg(data, force_absolute), {force_absolute : force_absolute}); + }, - p.width = o.width = dom.getAttrib(n, 'width') || 100; - p.height = o.height = dom.getAttrib(n, 'height') || 100; + /** + * Converts the JSON data object to a HTML string. + */ + htmlToData : function(html) { + var fragment, img, data; - if (p.src) - p.src = ed.convertURL(p.src, 'src', n); + data = { + type : 'flash', + video: {sources:[]}, + params: {} + }; - if (stc) { - ob = dom.create('span', { - mce_name : 'object', - type : 'application/x-shockwave-flash', - data : p.src, - width : o.width, - height : o.height - }); - } else { - ob = dom.create('span', { - mce_name : 'object', - classid : "clsid:" + o.classid, - codebase : o.codebase, - width : o.width, - height : o.height + fragment = this.editor.parser.parse(html); + img = fragment.getAll('img')[0]; + + if (img) { + data = JSON.parse(img.attr('data-mce-json')); + data.type = this.getType(img.attr('class')).name.toLowerCase(); + + // Add some extra properties to the data object + tinymce.each(rootAttributes, function(name) { + var value = img.attr(name); + + if (value) + data[name] = value; }); } - each (p, function(v, k) { - if (!/^(width|height|codebase|classid|_cx|_cy)$/.test(k)) { - // Use url instead of src in IE for Windows media - if (o.type == 'application/x-mplayer2' && k == 'src') - k = 'url'; + return data; + }, + + /** + * Get type item by extension, class, clsid or mime type. + * + * @method getType + * @param {String} value Value to get type item by. + * @return {Object} Type item object or undefined. + */ + getType : function(value) { + var i, values, typeItem; + + // Find type by checking the classes + values = tinymce.explode(value, ' '); + for (i = 0; i < values.length; i++) { + typeItem = this.lookup[values[i]]; + + if (typeItem) + return typeItem; + } + }, + + /** + * Converts a tinymce.html.Node image element to video/object/embed. + */ + imgToObject : function(node, args) { + var self = this, editor = self.editor, video, object, embed, iframe, name, value, data, + source, sources, params, param, typeItem, i, item, mp4Source, replacement, + posterSrc, style; + + // Adds the flash player + function addPlayer(video_src, poster_src) { + var baseUri, flashVars, flashVarsOutput, params, flashPlayer; + + flashPlayer = editor.getParam('flash_video_player_url', self.convertUrl(self.url + '/moxieplayer.swf')); + if (flashPlayer) { + baseUri = editor.documentBaseURI; + data.params.src = flashPlayer; + + // Convert the movie url to absolute urls + if (editor.getParam('flash_video_player_absvideourl', true)) { + video_src = baseUri.toAbsolute(video_src || '', true); + poster_src = baseUri.toAbsolute(poster_src || '', true); + } + + // Generate flash vars + flashVarsOutput = ''; + flashVars = editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'}); + tinymce.each(flashVars, function(value, name) { + // Replace $url and $poster variables in flashvars value + value = value.replace(/\$url/, video_src || ''); + value = value.replace(/\$poster/, poster_src || ''); + + if (value.length > 0) + flashVarsOutput += (flashVarsOutput ? '&' : '') + name + '=' + escape(value); + }); + + if (flashVarsOutput.length) + data.params.flashvars = flashVarsOutput; - if (v) - dom.add(ob, 'span', {mce_name : 'param', name : k, '_mce_value' : v}); + params = editor.getParam('flash_video_player_params', { + allowfullscreen: true, + allowscriptaccess: true + }); + + tinymce.each(params, function(value, name) { + data.params[name] = "" + value; + }); } - }); + }; - if (!stc) - dom.add(ob, 'span', tinymce.extend({mce_name : 'embed', type : o.type}, p)); + data = JSON.parse(node.attr('data-mce-json')); + typeItem = this.getType(node.attr('class')); - return ob; - }, + style = node.attr('data-mce-style') + if (!style) { + style = node.attr('style'); - _spansToImgs : function(p) { - var t = this, dom = t.editor.dom, im, ci; + if (style) + style = editor.dom.serializeStyle(editor.dom.parseStyle(style, 'img')); + } - each(dom.select('span', p), function(n) { - // Convert object into image - if (dom.getAttrib(n, 'class') == 'mceItemObject') { - ci = dom.getAttrib(n, "classid").toLowerCase().replace(/\s+/g, ''); + // Handle iframe + if (typeItem.name === 'Iframe') { + replacement = new Node('iframe', 1); - switch (ci) { - case 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000': - dom.replace(t._createImg('mceItemFlash', n), n); - break; + tinymce.each(rootAttributes, function(name) { + var value = node.attr(name); - case 'clsid:166b1bca-3f9c-11cf-8075-444553540000': - dom.replace(t._createImg('mceItemShockWave', n), n); - break; + if (name == 'class' && value) + value = value.replace(/mceItem.+ ?/g, ''); - case 'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6': - case 'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95': - case 'clsid:05589fa1-c356-11ce-bf01-00aa0055595a': - dom.replace(t._createImg('mceItemWindowsMedia', n), n); - break; + if (value && value.length > 0) + replacement.attr(name, value); + }); - case 'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b': - dom.replace(t._createImg('mceItemQuickTime', n), n); - break; + for (name in data.params) + replacement.attr(name, data.params[name]); - case 'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa': - dom.replace(t._createImg('mceItemRealMedia', n), n); - break; + replacement.attr({ + style: style, + src: data.params.src + }); - default: - dom.replace(t._createImg('mceItemFlash', n), n); - } - - return; + node.replace(replacement); + + return; + } + + // Handle scripts + if (this.editor.settings.media_use_script) { + replacement = new Node('script', 1).attr('type', 'text/javascript'); + + value = new Node('#text', 3); + value.value = 'write' + typeItem.name + '(' + JSON.serialize(tinymce.extend(data.params, { + width: node.attr('width'), + height: node.attr('height') + })) + ');'; + + replacement.append(value); + node.replace(replacement); + + return; + } + + // Add HTML5 video element + if (typeItem.name === 'Video' && data.video.sources[0]) { + // Create new object element + video = new Node('video', 1).attr(tinymce.extend({ + id : node.attr('id'), + width: node.attr('width'), + height: node.attr('height'), + style : style + }, data.video.attrs)); + + // Get poster source and use that for flash fallback + if (data.video.attrs) + posterSrc = data.video.attrs.poster; + + sources = data.video.sources = toArray(data.video.sources); + for (i = 0; i < sources.length; i++) { + if (/\.mp4$/.test(sources[i].src)) + mp4Source = sources[i].src; + } + + if (!sources[0].type) { + video.attr('src', sources[0].src); + sources.splice(0, 1); + } + + for (i = 0; i < sources.length; i++) { + source = new Node('source', 1).attr(sources[i]); + source.shortEnded = true; + video.append(source); + } + + // Create flash fallback for video if we have a mp4 source + if (mp4Source) { + addPlayer(mp4Source, posterSrc); + typeItem = self.getType('flash'); + } else + data.params.src = ''; + } + + // Do we have a params src then we can generate object + if (data.params.src) { + // Is flv movie add player for it + if (/\.flv$/i.test(data.params.src)) + addPlayer(data.params.src, ''); + + if (args && args.force_absolute) + data.params.src = editor.documentBaseURI.toAbsolute(data.params.src); + + // Create new object element + object = new Node('object', 1).attr({ + id : node.attr('id'), + width: node.attr('width'), + height: node.attr('height'), + style : style + }); + + tinymce.each(rootAttributes, function(name) { + if (data[name] && name != 'type') + object.attr(name, data[name]); + }); + + // Add params + for (name in data.params) { + param = new Node('param', 1); + param.shortEnded = true; + value = data.params[name]; + + // Windows media needs to use url instead of src for the media URL + if (name === 'src' && typeItem.name === 'WindowsMedia') + name = 'url'; + + param.attr({name: name, value: value}); + object.append(param); } - // Convert embed into image - if (dom.getAttrib(n, 'class') == 'mceItemEmbed') { - switch (dom.getAttrib(n, 'type')) { - case 'application/x-shockwave-flash': - dom.replace(t._createImg('mceItemFlash', n), n); - break; + // Setup add type and classid if strict is disabled + if (this.editor.getParam('media_strict', true)) { + object.attr({ + data: data.params.src, + type: typeItem.mimes[0] + }); + } else { + object.attr({ + classid: "clsid:" + typeItem.clsids[0], + codebase: typeItem.codebase + }); - case 'application/x-director': - dom.replace(t._createImg('mceItemShockWave', n), n); - break; + embed = new Node('embed', 1); + embed.shortEnded = true; + embed.attr({ + id: node.attr('id'), + width: node.attr('width'), + height: node.attr('height'), + style : style, + type: typeItem.mimes[0] + }); - case 'application/x-mplayer2': - dom.replace(t._createImg('mceItemWindowsMedia', n), n); - break; + for (name in data.params) + embed.attr(name, data.params[name]); - case 'video/quicktime': - dom.replace(t._createImg('mceItemQuickTime', n), n); - break; + tinymce.each(rootAttributes, function(name) { + if (data[name] && name != 'type') + embed.attr(name, data[name]); + }); - case 'audio/x-pn-realaudio-plugin': - dom.replace(t._createImg('mceItemRealMedia', n), n); - break; + object.append(embed); + } - default: - dom.replace(t._createImg('mceItemFlash', n), n); - } - } - }); + // Insert raw HTML + if (data.object_html) { + value = new Node('#text', 3); + value.raw = true; + value.value = data.object_html; + object.append(value); + } + + // Append object to video element if it exists + if (video) + video.append(object); + } + + if (video) { + // Insert raw HTML + if (data.video_html) { + value = new Node('#text', 3); + value.raw = true; + value.value = data.video_html; + video.append(value); + } + } + + if (video || object) + node.replace(video || object); + else + node.remove(); }, - _createImg : function(cl, n) { - var im, dom = this.editor.dom, pa = {}, ti = '', args; + /** + * Converts a tinymce.html.Node video/object/embed to an img element. + * + * The video/object/embed will be converted into an image placeholder with a JSON data attribute like this: + * + * + * The JSON structure will be like this: + * {'params':{'flashvars':'something','quality':'high','src':'someurl'}, 'video':{'sources':[{src: 'someurl', type: 'video/mp4'}]}} + */ + objectToImg : function(node) { + var object, embed, video, iframe, img, name, id, width, height, style, i, html, + param, params, source, sources, data, type, lookup = this.lookup, + matches, attrs, urlConverter = this.editor.settings.url_converter, + urlConverterScope = this.editor.settings.url_converter_scope; + + function getInnerHTML(node) { + return new tinymce.html.Serializer({ + inner: true, + validate: false + }).serialize(node); + }; - args = ['id', 'name', 'width', 'height', 'bgcolor', 'align', 'flashvars', 'src', 'wmode', 'allowfullscreen', 'quality']; + // If node isn't in document + if (!node.parent) + return; - // Create image - im = dom.create('img', { - src : this.url + '/img/trans.gif', - width : dom.getAttrib(n, 'width') || 100, - height : dom.getAttrib(n, 'height') || 100, - 'class' : cl - }); + // Handle media scripts + if (node.name === 'script') { + if (node.firstChild) + matches = scriptRegExp.exec(node.firstChild.value); - // Setup base parameters - each(args, function(na) { - var v = dom.getAttrib(n, na); + if (!matches) + return; - if (v) - pa[na] = v; - }); + type = matches[1]; + data = {video : {}, params : JSON.parse(matches[2])}; + width = data.params.width; + height = data.params.height; + } + + // Setup data objects + data = data || { + video : {}, + params : {} + }; - // Add optional parameters - each(dom.select('span', n), function(n) { - if (dom.hasClass(n, 'mceItemParam')) - pa[dom.getAttrib(n, 'name')] = dom.getAttrib(n, '_mce_value'); + // Setup new image object + img = new Node('img', 1); + img.attr({ + src : this.editor.theme.url + '/img/trans.gif' }); - // Use src not movie - if (pa.movie) { - pa.src = pa.movie; - delete pa.movie; + // Video element + name = node.name; + if (name === 'video') { + video = node; + object = node.getAll('object')[0]; + embed = node.getAll('embed')[0]; + width = video.attr('width'); + height = video.attr('height'); + id = video.attr('id'); + data.video = {attrs : {}, sources : []}; + + // Get all video attributes + attrs = data.video.attrs; + for (name in video.attributes.map) + attrs[name] = video.attributes.map[name]; + + source = node.attr('src'); + if (source) + data.video.sources.push({src : urlConverter.call(urlConverterScope, source, 'src', 'video')}); + + // Get all sources + sources = video.getAll("source"); + for (i = 0; i < sources.length; i++) { + source = sources[i].remove(); + + data.video.sources.push({ + src: urlConverter.call(urlConverterScope, source.attr('src'), 'src', 'source'), + type: source.attr('type'), + media: source.attr('media') + }); + } + + // Convert the poster URL + if (attrs.poster) + attrs.poster = urlConverter.call(urlConverterScope, attrs.poster, 'poster', 'video'); + } + + // Object element + if (node.name === 'object') { + object = node; + embed = node.getAll('embed')[0]; + } + + // Embed element + if (node.name === 'embed') + embed = node; + + // Iframe element + if (node.name === 'iframe') { + iframe = node; + type = 'Iframe'; } - // Merge with embed args - n = dom.select('.mceItemEmbed', n)[0]; - if (n) { - each(args, function(na) { - var v = dom.getAttrib(n, na); + if (object) { + // Get width/height + width = width || object.attr('width'); + height = height || object.attr('height'); + style = style || object.attr('style'); + id = id || object.attr('id'); + + // Get all object params + params = object.getAll("param"); + for (i = 0; i < params.length; i++) { + param = params[i]; + name = param.remove().attr('name'); + + if (!excludedAttrs[name]) + data.params[name] = param.attr('value'); + } + + data.params.src = data.params.src || object.attr('data'); + } - if (v && !pa[na]) - pa[na] = v; + if (embed) { + // Get width/height + width = width || embed.attr('width'); + height = height || embed.attr('height'); + style = style || embed.attr('style'); + id = id || embed.attr('id'); + + // Get all embed attributes + for (name in embed.attributes.map) { + if (!excludedAttrs[name] && !data.params[name]) + data.params[name] = embed.attributes.map[name]; + } + } + + if (iframe) { + // Get width/height + width = iframe.attr('width'); + height = iframe.attr('height'); + style = style || iframe.attr('style'); + id = iframe.attr('id'); + + tinymce.each(rootAttributes, function(name) { + img.attr(name, iframe.attr(name)); }); + + // Get all iframe attributes + for (name in iframe.attributes.map) { + if (!excludedAttrs[name] && !data.params[name]) + data.params[name] = iframe.attributes.map[name]; + } } - delete pa.width; - delete pa.height; + // Use src not movie + if (data.params.movie) { + data.params.src = data.params.src || data.params.movie; + delete data.params.movie; + } - im.title = this._serialize(pa); + // Convert the URL to relative/absolute depending on configuration + if (data.params.src) + data.params.src = urlConverter.call(urlConverterScope, data.params.src, 'src', 'object'); - return im; - }, + if (video) + type = lookup.video.name; - _parse : function(s) { - return tinymce.util.JSON.parse('{' + s + '}'); - }, + if (object && !type) + type = (lookup[(object.attr('clsid') || '').toLowerCase()] || lookup[(object.attr('type') || '').toLowerCase()] || {}).name; - _serialize : function(o) { - return tinymce.util.JSON.serialize(o).replace(/[{}]/g, ''); + if (embed && !type) + type = (lookup[(embed.attr('type') || '').toLowerCase()] || {}).name; + + // Replace the video/object/embed element with a placeholder image containing the data + node.replace(img); + + // Remove embed + if (embed) + embed.remove(); + + // Serialize the inner HTML of the object element + if (object) { + html = getInnerHTML(object.remove()); + + if (html) + data.object_html = html; + } + + // Serialize the inner HTML of the video element + if (video) { + html = getInnerHTML(video.remove()); + + if (html) + data.video_html = html; + } + + // Set width/height of placeholder + img.attr({ + id : id, + 'class' : 'mceItemMedia mceItem' + (type || 'Flash'), + style : style, + width : width || "320", + height : height || "240", + "data-mce-json" : JSON.serialize(data, "'") + }); } }); diff --git a/include/javascript/tiny_mce/plugins/media/img/flv_player.swf b/include/javascript/tiny_mce/plugins/media/img/flv_player.swf deleted file mode 100644 index 042c2ab969e98a6fdbe08848c4a73bd2c41de906..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11668 zcmV;FEo;(4S5pYUVE_PloV|PrTvNvr@V+F3a36As0Rb-#MGjBSfQpD35b>z>Admpj zkkAkitwp@*Rqv`rs-o69lDZ&@y{HKo3{JcK8Rt^ z72Hab0Fi(9n@~bYkV2y_)Fy`HtF#7{J|rojb4e1a7ekY%Jpqu!GtXQ6#>m0qvY zqk05XkPr<=DTomvJ9PBuQB+V+fX0s>j}|Rjgg*T6Llosb@Z|f-K0(8m{He?6zo^!s zgW%o|yBiCa{N=g3_eV+xKc?-B?2)mXBGanczVGz$;(Jq8W!}yB$#d7jwz;Cki@c`f zWnSDHobzK#aT@9u=8^8x_Ib_e#Xl4Y`Zer+8u>-bA6`uVXi-Ep^6uWh%d8KaJS&g= z)KA}qY1=qz((;kczfDdZmcI1pls2gC!tgBV;pBqfKiK7u7MDbR)&C>$gyc05A7uO} zTU6zl(L392O7^D-J^u?tL2G}Nl|dGb6UZS!lq5p+9>gp}0$|zy zkSG#qbPAfg3zp?lIyJ5j#n!UMW{%nE-W&j!ZI})Q-KC5ph&MP(<)Js zTB%fN`{MEmC|{-4pi+ZEZQoGP^zA& zLSxF+rRqEl+hmTqSfx>GRVc3zjiF2!xFY<5N}=@HB8fb_IYAXlu?mZ7o| zrNW>xk}{1xtqwkmRR+Z{LK(lMQ+^9H0Gff% zJX2#B5lWP0dWAs^!o=T2Duogl*TKM!LUG8TsxY9=AQJ=bIZ~7vbc1o5C@Ly0DylPi zB6X=;AxGtErAn8jC@Te$;}vQ{nof_KL}N>PDKwfqMgBNcpw_5zCX}d9MX?4f1q5BH zQjIf;K8tpwpGg@hdc9%-(x|kBAc=g9I)9w8e;9k(1AMm0;^LIo2w|sWvCp)nqQ>Q7OIBoG-c3dwN`BaqJ6M4 zOw%ihS>0nCrK&(trZKR9V0>jIgTY<~VtawF!NoeAp$Mx6j|!@8ZhRE#47wDpaxk_w zZ9bB#483$(tty`=BA>qE(!oTHNMSH2@{4Fs^2!PdRC?S%DtRNC0b9$_Vc`%-0KWsl z4tpyM3N%(xt|-mdt4j=V07SGG+5vUw2tQ$nS`eWC^bEjRP@go6ZIn-bkt%;2?kwgU zO4Mu->COPIH>?q}HbxaOMi1RbgUQ$i;+&MUN@8Pb=p;x%p_xEbqg59ZRT$-mKTO69 z!yNNKBTkW_Sd)Vd6GVm$l)xKwg@qbbTA4-zomHu{D2EgTnM#5}(?In_K|MQ0b&T%O zv0GG-P9IbR152e3=^iR;{1rz?#t z)>Wug`QQd3^L53YQGQveL060kl%kTdQtS=buB4W!HHLm#TBTH%Vl9C#4A_6@i(xPp z0H1>?=P*pb)mTQ;z)w9I8i3J zGPPErptgE+fycR@b$bnIc#*`@ZkZw?a&b6jjeW{^Wky@if#fot%>Nv=VB$=K+nQI}A85~NO@ z;yQJrXo!Rj&atr$y{rUU0DqzfQ5x9-^=WZ&iLR8b!m3t6j%Nl|TsjW-XP^RpW0y9R zhP+-d-V8_q17$oKlV7ICVlALkB!tps zE=VF0Ble%j&I#b{0T@Z_2zhaKCjMnF^;{`HJ&_4XA`*&3d`O3Er%bk5gd~pmH+)It znbiW+kwX*{M7GXJ?zGGS*{0%58U#Gx`7~4m%Z`L)7pW(%aUnJJTn)6*ft2iR7Iw3Z znpPZN@N|_gb3zg~qbxEpv+g2+$k8dl1mz*ez4H_aGEHSIXqm)a$}99Dg(4FOJVoT` zF71o?!4380A$b2cghV3(70zUH=6T58JY;@}r<@RyTD0u*Pmm=98RR|u-!^aAaUUze z8>@VclI3idkLdT(+Lr%Ko{SN}U&;q{HG$&s0FdcqSlJvH{+vyVLnPq?r*F@f zI(GNCT^@`l*P=*lge0iA*jh0`|H2;4^c3_8_W1AAc8TG87F^PSQ{+oVDu`nU;@iG8 z;vq}KLoA|{0}~NhXPUk|O<%OPAYVbc=K!GXi+oKrPI6A?=_HQVB5DyGY*<7n&muwz zb_bqCbdZ{0Y*|FGr9}i=TSTyJiwL%~i2wf{3jYe@=PgD%vZ``2+975(sa(J|3?zK`XS zCPH@M=z<8-?L@qnB$6O^CS9QKQF0gO01Oe$hwvg0F;ZM7;PSCftU5c9FPeN}92aNX zJ)&6AELQYC!iqIZVxz4R>u6(Q%}049n>O|k;1Y;#&B3~48`DlBDA67UcD5!;=cNR~ z5z5oqnHR9%RmAkAw8&i4s#egK;)3&KB;EQFr{9-OUIo1A6c~MXkx0^m^tGpyrtWc4 z5*?grbm+;BQz-F5X2{S`cS$@!iI!UM?vTwXBb|=$7L*zfFd>oFNN7!>)a)~f&L*o# zBu$o*Dpy)1BQ2!#BLIGAnzzNWWgo3FGz<}5Q=3N&Ld)DuR!&)>O6ir2rwgqaGZer$ zPe}GAC4I;C4(UcYG&kSQC*iq$#*dZPR6H|7GI$(EUZqD<)EmqGE z5{9GCc>STP37J;w3t2plEqN#;ZX$qVfse+8N}5XAA?!kung=sUpcxnFfSnvE9|X#A zru!@qgVd-snJs3wr&1dnN0c69OC2_K6w$omI*~OLPg_;d%~Ulrf^z5x8e;N&&^yATxs&TCd(CJ-oKnKR{%vS@4$o+Gkt zxBzVWE=cmaskM=^fMpWID(ZCtJSv+o5Q#sz&X1M_un~|ep=t6M+DfjeoEor#mgiZP z=V$XGsdByxKDJ;t7KwCuW6@0p$F@L-ZHznszqW=~0ey{u*BCkBAx8SrP)!$wW27|5 zHXo#g|1AuYm1L`0VPA?1JoNwH z!O&Q!<|o|V)H|xB{FO2q7z+qVHPmGUurNdj#8o=5l`+x)YkblXKxu} zY1pIn!8U9Xe8ph7G54UWcVpXwuyBQ>l{AyLir$j2H2_niPKMa%IEhA@Ip2e~ql%Cq z3>gTiwx+y>&JL`{1@#X+v2#PHt*JY7mQkGTYr7jPw_4z%rH#E%@WWx~3eH4``?H(? z>9TFkid>wHRwdx)Sg$mT(h^a1FwUH?#3Z4{*;2qOio%A82Acs;1;+W-c$n|4BQynB zW>)?-axt3wM7%6Zvz4a2Bogx+S4|7cGXV%KC2S>9mm7|-Hx!`eydmpUtH}s_so&(B zE2T|s)dAU=h3FEJagx|=hb$_H-SCbWfR779LVWVThoM4#LvFN2y^QAgPT1ez5^!~; zl!+lCA#cKE9)FFQ25~^m1z`(hgN+S}EK?!}zRw1Rz{V`uf&e!;C)O>n;hM$S#sWTS z87K1jZpJeJWW2|7;S(sAvnYeNHM9RLe4ZRvd)NEI@U5|8|ugIm>8*) z%Xx#>#dM|vvCDS@yAV4XKnIFN?mQ9t7p-u2uTI5g!rSAg=0sTaM4%LmVC+_ECIlO^vs4JDBLZ&EVS!{J z#9?oX!&jhCh`|D!%Px{EmMoFHOFEUx69E0k3%VG9WIO3(m4I$`E``xZ`m&5&SP_Z@ z@=P1`%gOZNJ@Xi40aI;j2bT{6FDuwJObgVE`FKMaJ1Z~Novbho|C&T!TR86#cN9cOdLp7vK^BoISnGxtn8HG0&H;#R4W6qxVVEbs z{H+x}c$g1 zpG_0Fp2+tVpg*KBj6CTEJK)phF7v2Ea!<3fS#%hwmFNUApVN~*M#px}TbN-#q9@OR)B3i*0Q?^Cwv)$r*hsAeC%Bl|``w0>2 zQXo(LOr7Nbv;hWhpW1=MeR(JR7~~L+BwBn9`y831_Ay0{0Bc7Nv0osPNOsDpoQS($ zMI0MjC=#%zNQkfdjKF;^H!kgQMQL*5J}6i8g`5UcUePW&jiS7w-SU~-p)!!K2WAHc zPZ5MsAxU6TEu3ioCT^e`kM0=LS8Fq{L3M8t!#5uhW7~Sz@>ejP z3IDH*!`tGFCrshO&}pF=7Ce_)iO1YlxRqRPL=j7o3a|kQAvy}l>Ob~)mQ>;SB|Eor z#91Xi@+81QB$E=l<4t7)PM+7M$)E(1J#-&NBsPa;2Q_O{LYN2Ar4C2p4EGvsO~7sB zh(u(uLLm9Vj0jN^TeI7&M#QUGArfX%YBo)Yk0xNbvLjsC3F(@X4+%qdbjm7_d__c1 zoJ}XP=E2FAJ(o~#)e-bfJCErSUp9k#7yx8jeHd!3lYq2=Mv17SJz*Uk%lnkG1 zvRq(>+w8J{RRtM*afr_=%Cu~Yzjk1Ch``(8uZ}>4;b?`(B+Y}SR{7#Rlt8h6EChRp$6lOftRMFA0$ZuGMvhL!{1Vd4Tsq%M#rM4oAw z9iKIpnk}!>m3x~eZYD)?2uzqsw;en&QKMxDB@J{XKdgB=4P;k@hsT$`6F!RKK!+a3 zr8A#t_WTVyH>G9Y(IYTsW&3TEnRl3&TsPkM+-Hp4=01_{%|?*5)NC7AjFsO!Vw5^J z*E3u6wIEAFM1zzbo(rV=o+2aXPR3A2asW%-_rH|){mt;c-v;mdU!8X&Su^_vJgdKI z5c5E2Cf3Z~H?YV2hw+TK`BUC2ZHyUqo8D*`_V{ShTtv??#=jETnJ*X_MI$|1bXVa5AVDKCif@+*5fHKbb^HrG6?P;jBm9rosSX{-zLOxtv=$mH}G z6p@{UQ{4<9cW?!q!XkIYV zbYN4jadEs{(<1A%-dJmvr;8?@E}HRV#O86vFI#1!m4Cx!KYsddA@y`t>U>C3_U_6* zV06h6lqBwa#8tKtFDF{&>^4`>`2PQuSa3CC!S&y;VBrRhg|Etjj~NR-|BMBCp3b&j z`m@bM@L~K+L)v1=By*W3lE_S3=Qv(qZz|vx{cwSkacP3qTp=OxYIXwt#owX#MXWRC z2I4ic$rOZMx>B<}(HAv2;J%CTl_K!FUhE3bZXyiCuooUAyWx{D_V81SDhLd|?4rFG zijE;@0+GuR>dBh~6`@vD2xS3weSJN0ciGl}>_16wwb}LCM(qXmq6`P_q6`VWD5KtP z9y}eqwYSFCDg{O)>u5$QQ<`O({-1kWbW=~p;X14q7^+7)lR35F$=-NUu zvPRh$+wM{~G~fbyuR10#SEy`oDW84jwe{as4Q$Vh8#nX!vp!!s{l4|b6A)paKYtztc{PL;U2Hrgo-;L}^M>h-(x}{F(}Fl2JvbY2XKe)G zzv1*mBbH=O3;Gl)F$s6?v02LTIevi;rUCD$H9)igjw5AA@{mFI?%e~3xeHOC*PCnS z_s~YpI0VFf0LTmQ-@(LNpkqX8|S(sH6w)^49?S?t6rsux-nX{OQ7xcTjO4 zib5%<6m3C=kQYII>$u&1hb&+- zy1(7NxC#mm*bQeMWeGoN2<(Q+LxtZqxE??i7nlpRZmm$f7jv`LUR9NlgTd!i1uVlP zZcber^Vab9D?*uj@om0tK)DIt2If*N;7$Al!;P&<=!hO{2fV~WO!BjaKp2 zS>ORQX&ovbE<9HP_3;{L$MrHM+5l|a&jOa9&C9uzha0&-E50NBF25k$Cv!cE2_BHS z9zo?BfoIweXpr=AeHHKwv~EMM-}GW`<=W4v;(AKRy4j)l9NaZ;1Y`-z6&sn0xj?pJ zIBw<$Zia~GVHOqz{w7_n0g5?HCtQOv*%goIoeF=mCQI`sf00#FQ{Yapg`Km&7TiZr9a#b62OAn z&e=44;$C9CRG>}9k9ZA2olqp|3@~-k8Y9% z&ST3*L|@&W8^77v86`V(0e}Ex=K(IK;!=LD-;2g%*Bwo5?>1#lxiY!q&yq*8qlKfc z%c@hhj@jt(;rH_|uW>|f2cu8WY$Fi-=VtJqOs@cRQHE$%)}mo^$vUZbq033u@3rRq zULfat0}#$zvVeI^XLJxcV$@knZbuj=$%9)syjFe@Ch(GcSt2FE^S+qcp@yt>)=}+ zp7Rd1*f!OzHYLRWk%PPAzKkx)xrM&N)@G;oJ~=0&(pWs=gcaHA; z^6=hWPd2UUC+}7lTOZrh)HBxq*b~>f!^*r~5Q?`AU0+$>`HzW-Yeq)aO_4SH{pisn z?|V-w67uRUPJdADbpD?A=#PEp9l0&oayDb@`FoY0Uw)oEG|*XGQh%MXuT;JE_L-kV zpI@H$qD{}+L$}->ziZ^=aUb3Zzkj0y^;?`PQH2+l5Hxu`cp5Yt5)bWqGaf=jwKh$-(Q&1N?>7CyW-dc2S zYEg^qP49l)|EhNRIfwI$4nB^lcHVk^od2mJ=Zd6(J8%5`s3QG9-k{s@D_w8D5pW{s z_nV`$$It4$w&9J0Q3rdT3i5We8!~xQ&f1-6ZioIpUGw&By~ErCQy+SKmp|~0>lFz; zes2%Dcjxib+-^1do<0BY>7a-ckE2$fP?t#USFe`-@#mzZDObYI-6+}kJl20+-nOCZ zUMvj^jb14~n-mgXJ>VNhcbEU(>e7SH-b-)$x6j<$N1m)ZfA6&oXTqlMSIquB zE99D;zJB=P%UjQmt$(^}Y^C7NUbi{ab+qG#f3LQD*HK%tQR-vwQUzA?jKOD9j8+pr z_vbA4gU>@8yM^S9ThqEB&2EQB@{~C~i^pj{9dueUHCGipYvZ=zug(2tSep?a);)Ya z-`~5>fx5!C2j(t+^Ycqnf`dydW1FgDPZd?3?^sY*?KX3N>aLN?ChlGJ{e$uuc{>i- zPfMA5Sozm%mx{fkcZ~jc$%FF#ADxewuy^#`6eYH-(&wm0m!KPE&X`1ahru5lNNy4-v#Y4z7m>$4r6*{y5{>$+}`&)$ogkp6{L zb+u1tC}TD~%-(QjU(bLAeU)pj71XWKcqRJGU9vA%<}=ss#|a66*-5L1JuUxoUP95Z z;XUj-9y}n~|M$KNlahvYN#8Y6es)Z#SIN1P(@uAI|5lG*oZ@SaJ-h;@GJM&PJ9nNu zi~h5+e$nfZ%Qr4n_$hOLb?Z?@1DMc%n(qEF@fz6fqV(Pw8_r~hFZH}z`KZh1eYTu^@!PMP zpCT7u{}^f}9gJqu-lmx}IRulqCouYb;$GX~NHaq$WPkwmK^MT9!i?55c;J?lL0*6K z4QMryujzI{$jKq5F--kksSxZ$3G` zt;2~!o6hdKT6g}^xL@lQ$e&znH+;%`;xUom#wDfh&{6Lp10kLLEiw4a}; zIDuAP)Vv)ChJEZIV}o1o=@sDa)R-{;C&PD%3r9w7c-q;^@xr)`%QQgIBU$tI$DsPM~TZtCLia_!cmJ!8M!6F&aStJ$fNQ6HaQG3CS6elc5S##RpqA0r{AvF=pozs2fVM3+IQo9{D96nf>VEXn9-D_xI)gr)#o&!{AM4$5x!LikG@>R3)vx<(x9wr`O?v zx;z`iKeD|p0{m(CIbk`T0D)PFb{oHGI@ASBp z?bn88XucBp)SS8ZN9)RucIyr_x^|#O(#dEf9baN3k(`lq;?@whfRS`2>oa(3w>^U( z8G;NAfP}~s=W@QdScEgR_r8=Nr|fA##%od8G)@eO)q(D5L8z0=5%Cf$d}}2OA|W8X zF^F#iFD=7YsMd=y|B;Sddgd~;u@mCK&?{E!#eo>gnS*i~IQ1m2Esd%G!-QZMSDbiq z%<>2sFFR#h^gzAC82hU|g?s{WV}mbgTK#ceruOOfj6{MDrJ) zV!6^5v~;pVdw6z%X6R-7R7di^MB2Q%&x%H9~#H-8QIUz(Ln45_OAge~rzKY(Z zN$kU;1MVY}0BlLWpOS+YO}Wd789{x0eG|TgoBS|sCOf3TYY$LYg8hB>#s`+_y5EFy z)CP?zNLLVKC{hI#Xv*>By!Zl9Y?VO+bb3{Bkh&x?G7?nZ1~7U8t+<1>X7Cr9P*hA@ zOftB+zizKzKBewZKps5XY6i;Ke4&Bn>%d3@Tm6gZ+=B0g9S(D!OZdT|wxoI+8 z=+X?B&#f8#aj$Jdr=_iXbU1Iv$@eCYi}L&8uYq0s*DpNME6Ba7pw8jFmRg36;}QujUXdwq|5!y7UViX(-j1q2 zCO&6&PS`Pg&$~x%?|G3J=mtUyJTxi2e)?M*&Rl%_>yu~Glc(L^R99CwFDLx=ql49_ zeSLkMV=51<-k$vM;5GI4x;NhV!}+hp7n4G6B~HHC?~~U5@tu31aCUEf*~E$8&FUR; z?a9oyI&W`U-FtGb{9H+o=@2;oY<>5#r{j!=ZqHro>i7MXyK}^XNA^D~_mPOMM+t}3 ze|_=3Wb&TU`%SO6(2ZQZqf&|yfMthy(G*fa6>Yl^Hx8=GtqqH9}^n3 z?n|l4A|t<=x|*Yb?<6<<7TA&>f9U>1dpj5?ep3Zerh8l2F(?MB_nTf-LE=C)bwEc0 zd=pU2pqcEdMpN>MhiCy_w@5%qF4s?{o$NOgP4-e7%Us?WKuxEPeDVi{|B8v^R zB>cGn?UUW+E~#=aaYWFkwhoKc;CAT!w6v!!;h98w>O^~*NS!XbLWOrSlF@Laq(1%H zwQI=TMN<`1aa?+*WrOkuCFk2^oD7pW8IFQy3V04~Lb8bZ?L&=BI^DTJ=v^#E8S4m$fXGF-bTg^FJ?Eia`h^T diff --git a/include/javascript/tiny_mce/plugins/media/js/media.js b/include/javascript/tiny_mce/plugins/media/js/media.js index 27439fe5..2c10f9e8 100644 --- a/include/javascript/tiny_mce/plugins/media/js/media.js +++ b/include/javascript/tiny_mce/plugins/media/js/media.js @@ -1,630 +1,354 @@ -tinyMCEPopup.requireLangPack(); +(function() { + var url; -var oldWidth, oldHeight, ed, url; + if (url = tinyMCEPopup.getParam("media_external_list_url")) + document.write(''); -if (url = tinyMCEPopup.getParam("media_external_list_url")) - document.write(''); - -function init() { - var pl = "", f, val; - var type = "flash", fe, i; - - ed = tinyMCEPopup.editor; - - tinyMCEPopup.resizeToInnerSize(); - f = document.forms[0] - - fe = ed.selection.getNode(); - if (/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) { - pl = fe.title; - - switch (ed.dom.getAttrib(fe, 'class')) { - case 'mceItemFlash': - type = 'flash'; - break; - - case 'mceItemFlashVideo': - type = 'flv'; - break; - - case 'mceItemShockWave': - type = 'shockwave'; - break; - - case 'mceItemWindowsMedia': - type = 'wmp'; - break; - - case 'mceItemQuickTime': - type = 'qt'; - break; - - case 'mceItemRealMedia': - type = 'rmp'; - break; - } - - document.forms[0].insert.value = ed.getLang('update', 'Insert', true); + function get(id) { + return document.getElementById(id); } - document.getElementById('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media'); - document.getElementById('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','qt_qtsrc','media','media'); - document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); - - var html = getMediaListHTML('medialist','src','media','media'); - if (html == "") - document.getElementById("linklistrow").style.display = 'none'; - else - document.getElementById("linklistcontainer").innerHTML = html; - - // Resize some elements - if (isVisible('filebrowser')) - document.getElementById('src').style.width = '230px'; - - // Setup form - if (pl != "") { - pl = tinyMCEPopup.editor.plugins.media._parse(pl); - - switch (type) { - case "flash": - setBool(pl, 'flash', 'play'); - setBool(pl, 'flash', 'loop'); - setBool(pl, 'flash', 'menu'); - setBool(pl, 'flash', 'swliveconnect'); - setStr(pl, 'flash', 'quality'); - setStr(pl, 'flash', 'scale'); - setStr(pl, 'flash', 'salign'); - setStr(pl, 'flash', 'wmode'); - setStr(pl, 'flash', 'base'); - setStr(pl, 'flash', 'flashvars'); - break; - - case "qt": - setBool(pl, 'qt', 'loop'); - setBool(pl, 'qt', 'autoplay'); - setBool(pl, 'qt', 'cache'); - setBool(pl, 'qt', 'controller'); - setBool(pl, 'qt', 'correction'); - setBool(pl, 'qt', 'enablejavascript'); - setBool(pl, 'qt', 'kioskmode'); - setBool(pl, 'qt', 'autohref'); - setBool(pl, 'qt', 'playeveryframe'); - setBool(pl, 'qt', 'tarsetcache'); - setStr(pl, 'qt', 'scale'); - setStr(pl, 'qt', 'starttime'); - setStr(pl, 'qt', 'endtime'); - setStr(pl, 'qt', 'tarset'); - setStr(pl, 'qt', 'qtsrcchokespeed'); - setStr(pl, 'qt', 'volume'); - setStr(pl, 'qt', 'qtsrc'); - break; - - case "shockwave": - setBool(pl, 'shockwave', 'sound'); - setBool(pl, 'shockwave', 'progress'); - setBool(pl, 'shockwave', 'autostart'); - setBool(pl, 'shockwave', 'swliveconnect'); - setStr(pl, 'shockwave', 'swvolume'); - setStr(pl, 'shockwave', 'swstretchstyle'); - setStr(pl, 'shockwave', 'swstretchhalign'); - setStr(pl, 'shockwave', 'swstretchvalign'); - break; - - case "wmp": - setBool(pl, 'wmp', 'autostart'); - setBool(pl, 'wmp', 'enabled'); - setBool(pl, 'wmp', 'enablecontextmenu'); - setBool(pl, 'wmp', 'fullscreen'); - setBool(pl, 'wmp', 'invokeurls'); - setBool(pl, 'wmp', 'mute'); - setBool(pl, 'wmp', 'stretchtofit'); - setBool(pl, 'wmp', 'windowlessvideo'); - setStr(pl, 'wmp', 'balance'); - setStr(pl, 'wmp', 'baseurl'); - setStr(pl, 'wmp', 'captioningid'); - setStr(pl, 'wmp', 'currentmarker'); - setStr(pl, 'wmp', 'currentposition'); - setStr(pl, 'wmp', 'defaultframe'); - setStr(pl, 'wmp', 'playcount'); - setStr(pl, 'wmp', 'rate'); - setStr(pl, 'wmp', 'uimode'); - setStr(pl, 'wmp', 'volume'); - break; - - case "rmp": - setBool(pl, 'rmp', 'autostart'); - setBool(pl, 'rmp', 'loop'); - setBool(pl, 'rmp', 'autogotourl'); - setBool(pl, 'rmp', 'center'); - setBool(pl, 'rmp', 'imagestatus'); - setBool(pl, 'rmp', 'maintainaspect'); - setBool(pl, 'rmp', 'nojava'); - setBool(pl, 'rmp', 'prefetch'); - setBool(pl, 'rmp', 'shuffle'); - setStr(pl, 'rmp', 'console'); - setStr(pl, 'rmp', 'controls'); - setStr(pl, 'rmp', 'numloop'); - setStr(pl, 'rmp', 'scriptcallbacks'); - break; - } - - setStr(pl, null, 'src'); - setStr(pl, null, 'id'); - setStr(pl, null, 'name'); - setStr(pl, null, 'vspace'); - setStr(pl, null, 'hspace'); - setStr(pl, null, 'bgcolor'); - setStr(pl, null, 'align'); - setStr(pl, null, 'width'); - setStr(pl, null, 'height'); - - if ((val = ed.dom.getAttrib(fe, "width")) != "") - pl.width = f.width.value = val; - - if ((val = ed.dom.getAttrib(fe, "height")) != "") - pl.height = f.height.value = val; - - oldWidth = pl.width ? parseInt(pl.width) : 0; - oldHeight = pl.height ? parseInt(pl.height) : 0; - } else - oldWidth = oldHeight = 0; - - selectByValue(f, 'media_type', type); - changedType(type); - updateColor('bgcolor_pick', 'bgcolor'); + function getVal(id) { + var elm = get(id); - TinyMCE_EditableSelects.init(); - generatePreview(); -} + if (elm.nodeName == "SELECT") + return elm.options[elm.selectedIndex].value; -function insertMedia() { - var fe, f = document.forms[0], h; + if (elm.type == "checkbox") + return elm.checked; - tinyMCEPopup.restoreSelection(); - - if (!AutoValidator.validate(f)) { - tinyMCEPopup.alert(ed.getLang('invalid_data')); - return false; + return elm.value; } - f.width.value = f.width.value == "" ? 100 : f.width.value; - f.height.value = f.height.value == "" ? 100 : f.height.value; - - fe = ed.selection.getNode(); - if (fe != null && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) { - switch (f.media_type.options[f.media_type.selectedIndex].value) { - case "flash": - fe.className = "mceItemFlash"; - break; - - case "flv": - fe.className = "mceItemFlashVideo"; - break; - - case "shockwave": - fe.className = "mceItemShockWave"; - break; - - case "qt": - fe.className = "mceItemQuickTime"; - break; - - case "wmp": - fe.className = "mceItemWindowsMedia"; - break; - - case "rmp": - fe.className = "mceItemRealMedia"; - break; - } - - if (fe.width != f.width.value || fe.height != f.height.height) - ed.execCommand('mceRepaint'); - - fe.title = serializeParameters(); - fe.width = f.width.value; - fe.height = f.height.value; - fe.style.width = f.width.value + (f.width.value.indexOf('%') == -1 ? 'px' : ''); - fe.style.height = f.height.value + (f.height.value.indexOf('%') == -1 ? 'px' : ''); - fe.align = f.align.options[f.align.selectedIndex].value; - } else { - h = ' 0) { - var html = ""; - - html += ''; - - return html; - } - - return ""; -} - -function getType(v) { - var fo, i, c, el, x, f = document.forms[0]; - - fo = ed.getParam("media_types", "flash=swf;flv=flv;shockwave=dcr;qt=mov,qt,mpg,mp3,mp4,mpeg;shockwave=dcr;wmp=avi,wmv,wm,asf,asx,wmx,wvx;rmp=rm,ra,ram").split(';'); - - // YouTube - if (v.match(/watch\?v=(.+)(.*)/)) { - f.width.value = '425'; - f.height.value = '350'; - f.src.value = 'http://www.youtube.com/v/' + v.match(/v=(.*)(.*)/)[0].split('=')[1]; - return 'flash'; - } - - // Google video - if (v.indexOf('http://video.google.com/videoplay?docid=') == 0) { - f.width.value = '425'; - f.height.value = '326'; - f.src.value = 'http://video.google.com/googleplayer.swf?docId=' + v.substring('http://video.google.com/videoplay?docid='.length) + '&hl=en'; - return 'flash'; - } - - for (i=0; i 0 ? s.substring(0, s.length - 1) : s; - - return s; -} - -function setBool(pl, p, n) { - if (typeof(pl[n]) == "undefined") - return; - - document.forms[0].elements[p + "_" + n].checked = pl[n]; -} - -function setStr(pl, p, n) { - var f = document.forms[0], e = f.elements[(p != null ? p + "_" : '') + n]; - - if (typeof(pl[n]) == "undefined") - return; - - if (e.type == "text") - e.value = pl[n]; - else - selectByValue(f, (p != null ? p + "_" : '') + n, pl[n]); -} - -function getBool(p, n, d, tv, fv) { - var v = document.forms[0].elements[p + "_" + n].checked; - - tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'"; - fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'"; - - return (v == d) ? '' : n + (v ? ':' + tv + ',' : ':' + fv + ','); -} - -function getStr(p, n, d) { - var e = document.forms[0].elements[(p != null ? p + "_" : "") + n]; - var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value; - - if (n == 'src') - v = tinyMCEPopup.editor.convertURL(v, 'src', null); - - return ((n == d || v == '') ? '' : n + ":'" + jsEncode(v) + "',"); -} - -function getInt(p, n, d) { - var e = document.forms[0].elements[(p != null ? p + "_" : "") + n]; - var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value; - - return ((n == d || v == '') ? '' : n + ":" + v.replace(/[^0-9]+/g, '') + ","); -} - -function jsEncode(s) { - s = s.replace(new RegExp('\\\\', 'g'), '\\\\'); - s = s.replace(new RegExp('"', 'g'), '\\"'); - s = s.replace(new RegExp("'", 'g'), "\\'"); + window.Media = { + init : function() { + var html, editor; + + this.editor = editor = tinyMCEPopup.editor; + + // Setup file browsers and color pickers + get('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media'); + get('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','quicktime_qtsrc','media','media'); + get('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + get('video_altsource1_filebrowser').innerHTML = getBrowserHTML('filebrowser_altsource1','video_altsource1','media','media'); + get('video_altsource2_filebrowser').innerHTML = getBrowserHTML('filebrowser_altsource2','video_altsource2','media','media'); + get('video_poster_filebrowser').innerHTML = getBrowserHTML('filebrowser_poster','video_poster','media','image'); + + html = this.getMediaListHTML('medialist', 'src', 'media', 'media'); + if (html == "") + get("linklistrow").style.display = 'none'; + else + get("linklistcontainer").innerHTML = html; + + if (isVisible('filebrowser')) + get('src').style.width = '230px'; + + if (isVisible('filebrowser_altsource1')) + get('video_altsource1').style.width = '220px'; + + if (isVisible('filebrowser_altsource2')) + get('video_altsource2').style.width = '220px'; + + if (isVisible('filebrowser_poster')) + get('video_poster').style.width = '220px'; + + this.data = tinyMCEPopup.getWindowArg('data'); + this.dataToForm(); + this.preview(); + }, + + insert : function() { + var editor = tinyMCEPopup.editor; + + this.formToData(); + editor.execCommand('mceRepaint'); + tinyMCEPopup.restoreSelection(); + editor.selection.setNode(editor.plugins.media.dataToImg(this.data)); + tinyMCEPopup.close(); + }, + + preview : function() { + get('prev').innerHTML = this.editor.plugins.media.dataToHtml(this.data, true); + }, + + moveStates : function(to_form, field) { + var data = this.data, editor = this.editor, data = this.data, + mediaPlugin = editor.plugins.media, ext, src, typeInfo, defaultStates, src; + + defaultStates = { + // QuickTime + quicktime_autoplay : true, + quicktime_controller : true, + + // Flash + flash_play : true, + flash_loop : true, + flash_menu : true, + + // WindowsMedia + windowsmedia_autostart : true, + windowsmedia_enablecontextmenu : true, + windowsmedia_invokeurls : true, + + // RealMedia + realmedia_autogotourl : true, + realmedia_imagestatus : true + }; + + function parseQueryParams(str) { + var out = {}; + + if (str) { + tinymce.each(str.split('&'), function(item) { + var parts = item.split('='); + + out[unescape(parts[0])] = unescape(parts[1]); + }); + } + + return out; + }; + + function setOptions(type, names) { + var i, name, formItemName, value, list; + + if (type == data.type || type == 'global') { + names = tinymce.explode(names); + for (i = 0; i < names.length; i++) { + name = names[i]; + formItemName = type == 'global' ? name : type + '_' + name; + + if (type == 'global') + list = data; + else if (type == 'video') { + list = data.video.attrs; + + if (!list && !to_form) + data.video.attrs = list = {}; + } else + list = data.params; + + if (list) { + if (to_form) { + setVal(formItemName, list[name]); + } else { + delete list[name]; + + value = getVal(formItemName); + if (type == 'video' && value === true) + value = name; + + if (defaultStates[formItemName]) { + if (value !== defaultStates[formItemName]) { + value = "" + value; + list[name] = value; + } + } else if (value) { + value = "" + value; + list[name] = value; + } + } + } + } + } + } - return s; -} + if (!to_form) { + data.type = get('media_type').options[get('media_type').selectedIndex].value; + data.width = getVal('width'); + data.height = getVal('height'); -function generatePreview(c) { - var f = document.forms[0], p = document.getElementById('prev'), h = '', cls, pl, n, type, codebase, wp, hp, nw, nh; + // Switch type based on extension + src = getVal('src'); + if (field == 'src') { + ext = src.replace(/^.*\.([^.]+)$/, '$1'); + if (typeInfo = mediaPlugin.getType(ext)) + data.type = typeInfo.name.toLowerCase(); - p.innerHTML = ''; + setVal('media_type', data.type); + } - nw = parseInt(f.width.value); - nh = parseInt(f.height.value); + if (data.type == "video") { + if (!data.video.sources) + data.video.sources = []; - if (f.width.value != "" && f.height.value != "") { - if (f.constrain.checked) { - if (c == 'width' && oldWidth != 0) { - wp = nw / oldWidth; - nh = Math.round(wp * nh); - f.height.value = nh; - } else if (c == 'height' && oldHeight != 0) { - hp = nh / oldHeight; - nw = Math.round(hp * nw); - f.width.value = nw; + data.video.sources[0] = {src: getVal('src')}; + } } - } - } - if (f.width.value != "") - oldWidth = nw; - - if (f.height.value != "") - oldHeight = nh; - - // After constrain - pl = serializeParameters(); - - switch (f.media_type.options[f.media_type.selectedIndex].value) { - case "flash": - cls = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'; - codebase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'; - type = 'application/x-shockwave-flash'; - break; - - case "shockwave": - cls = 'clsid:166B1BCA-3F9C-11CF-8075-444553540000'; - codebase = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0'; - type = 'application/x-director'; - break; - - case "qt": - cls = 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B'; - codebase = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0'; - type = 'video/quicktime'; - break; - - case "wmp": - cls = ed.getParam('media_wmp6_compatible') ? 'clsid:05589FA1-C356-11CE-BF01-00AA0055595A' : 'clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6'; - codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'; - type = 'application/x-mplayer2'; - break; - - case "rmp": - cls = 'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA'; - codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'; - type = 'audio/x-pn-realaudio-plugin'; - break; - } - - if (pl == '') { - p.innerHTML = ''; - return; - } + // Hide all fieldsets and show the one active + get('video_options').style.display = 'none'; + get('flash_options').style.display = 'none'; + get('quicktime_options').style.display = 'none'; + get('shockwave_options').style.display = 'none'; + get('windowsmedia_options').style.display = 'none'; + get('realmedia_options').style.display = 'none'; + + if (get(data.type + '_options')) + get(data.type + '_options').style.display = 'block'; + + setVal('media_type', data.type); + + setOptions('flash', 'play,loop,menu,swliveconnect,quality,scale,salign,wmode,base,flashvars'); + setOptions('quicktime', 'loop,autoplay,cache,controller,correction,enablejavascript,kioskmode,autohref,playeveryframe,targetcache,scale,starttime,endtime,target,qtsrcchokespeed,volume,qtsrc'); + setOptions('shockwave', 'sound,progress,autostart,swliveconnect,swvolume,swstretchstyle,swstretchhalign,swstretchvalign'); + setOptions('windowsmedia', 'autostart,enabled,enablecontextmenu,fullscreen,invokeurls,mute,stretchtofit,windowlessvideo,balance,baseurl,captioningid,currentmarker,currentposition,defaultframe,playcount,rate,uimode,volume'); + setOptions('realmedia', 'autostart,loop,autogotourl,center,imagestatus,maintainaspect,nojava,prefetch,shuffle,console,controls,numloop,scriptcallbacks'); + setOptions('video', 'poster,autoplay,loop,preload,controls'); + setOptions('global', 'id,name,vspace,hspace,bgcolor,align,width,height'); + + if (to_form) { + if (data.type == 'video') { + if (data.video.sources[0]) + setVal('src', data.video.sources[0].src); + + src = data.video.sources[1]; + if (src) + setVal('video_altsource1', src.src); + + src = data.video.sources[2]; + if (src) + setVal('video_altsource2', src.src); + } else { + // Check flash vars + if (data.type == 'flash') { + tinymce.each(editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'}), function(value, name) { + if (value == '$url') + data.params.src = parseQueryParams(data.params.flashvars)[name] || data.params.src; + }); + } + + setVal('src', data.params.src); + } + } else { + src = getVal("src"); + + // YouTube + if (src.match(/youtube.com(.+)v=([^&]+)/)) { + data.width = 425; + data.height = 350; + data.params.frameborder = '0'; + data.type = 'iframe'; + src = 'http://www.youtube.com/embed/' + src.match(/v=([^&]+)/)[1]; + setVal('src', src); + setVal('media_type', data.type); + } + + // Google video + if (src.match(/video.google.com(.+)docid=([^&]+)/)) { + data.width = 425; + data.height = 326; + data.type = 'flash'; + src = 'http://video.google.com/googleplayer.swf?docId=' + src.match(/docid=([^&]+)/)[1] + '&hl=en'; + setVal('src', src); + setVal('media_type', data.type); + } + + if (data.type == 'video') { + if (!data.video.sources) + data.video.sources = []; + + data.video.sources[0] = {src : src}; + + src = getVal("video_altsource1"); + if (src) + data.video.sources[1] = {src : src}; + + src = getVal("video_altsource2"); + if (src) + data.video.sources[2] = {src : src}; + } else + data.params.src = src; + + // Set default size + setVal('width', data.width || 320); + setVal('height', data.height || 240); + } + }, + + dataToForm : function() { + this.moveStates(true); + }, + + formToData : function(field) { + if (field == "width" || field == "height") + this.changeSize(field); + + if (field == 'source') { + this.moveStates(false, field); + setVal('source', this.editor.plugins.media.dataToHtml(this.data)); + this.panel = 'source'; + } else { + if (this.panel == 'source') { + this.data = this.editor.plugins.media.htmlToData(getVal('source')); + this.dataToForm(); + this.panel = ''; + } + + this.moveStates(false, field); + this.preview(); + } + }, + + beforeResize : function() { + this.width = parseInt(getVal('width') || "320", 10); + this.height = parseInt(getVal('height') || "240", 10); + }, + + changeSize : function(type) { + var width, height, scale, size; + + if (get('constrain').checked) { + width = parseInt(getVal('width') || "320", 10); + height = parseInt(getVal('height') || "240", 10); + + if (type == 'width') { + this.height = Math.round((width / this.width) * height); + setVal('height', this.height); + } else { + this.width = Math.round((height / this.height) * width); + setVal('width', this.width); + } + } + }, - pl = tinyMCEPopup.editor.plugins.media._parse(pl); + getMediaListHTML : function() { + if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) { + var html = ""; - if (!pl.src) { - p.innerHTML = ''; - return; - } + html += ''; - for (n in pl) { - h += ''; + return html; + } - // Add extra url parameter if it's an absolute URL - if (n == 'src' && pl[n].indexOf('://') != -1) - h += ''; + return ""; } - } - - h += ' - - - -
    + + + @@ -25,42 +25,43 @@
    {#media_dlg.general} - +
    - ';sb[sb.length]='
    - + - - + - - + + +
    - - - + - + ';sb[sb.length]='';sb[sb.length]='
    + + + - +
     
     
    - +
    - - + +
    x    x   
    @@ -79,18 +80,18 @@
    {#media_dlg.advanced} - +
    - + - + - + - + + +
    - @@ -101,9 +102,9 @@ - +
    - +
     
    @@ -112,9 +113,91 @@
    +
    + +
    + {#media_dlg.html5_video_options} + + + + + + + + + + + + + + + + +
    + + + + + +
     
    +
    + + + + + +
     
    +
    + + + + + +
     
    +
    + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    @@ -122,11 +205,11 @@
    {#media_dlg.flash_options} - +
    - @@ -138,7 +221,7 @@ - @@ -151,7 +234,7 @@
    - @@ -161,7 +244,7 @@ - @@ -177,18 +260,18 @@
    - +
    - +
    - +
    - +
    @@ -197,18 +280,18 @@
    - +
    - +
    - +
    - +
    @@ -216,135 +299,38 @@
    - +
    - + - - -
    -
    - -
    - {#media_dlg.flv_options} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
    - -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    -
    +
    {#media_dlg.qt_options} - +
    @@ -352,19 +338,19 @@ @@ -372,19 +358,19 @@ @@ -392,19 +378,19 @@ @@ -412,27 +398,27 @@ - - + - - + + - - + + - - + + - - + + - - + + - - + + - +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - - - - - -
     
    + + + + + +
     
    -
    +
    {#media_dlg.wmp_options} - +
    @@ -506,19 +492,19 @@ @@ -526,19 +512,19 @@ @@ -546,86 +532,86 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    -
    +
    {#media_dlg.rmp_options} - +
    @@ -633,19 +619,19 @@ @@ -653,19 +639,19 @@ @@ -673,19 +659,19 @@ @@ -693,10 +679,10 @@ @@ -707,19 +693,19 @@ - - + + - - + + - - + + - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    @@ -727,11 +713,11 @@
    {#media_dlg.shockwave_options} - +
    - +
    - @@ -740,13 +726,13 @@
    - @@ -756,7 +742,7 @@ - @@ -767,18 +753,18 @@
    - +
    - +
    - +
    - +
    @@ -788,18 +774,18 @@
    - +
    - +
    - +
    - +
    @@ -808,16 +794,18 @@
    - -
    -
    - +
    +
    + {#media_dlg.source} + +
    +
    -
    - -
    +
    + +
    diff --git a/include/javascript/tiny_mce/plugins/media/moxieplayer.swf b/include/javascript/tiny_mce/plugins/media/moxieplayer.swf new file mode 100644 index 0000000000000000000000000000000000000000..2a040358df0d1f8eb784d2ec0919626198d6eb47 GIT binary patch literal 33931 zcmV(xK0*ZhFf=CoW0g?C2+$1+GrGCZV z?|I($|NQejx%b?;XU^ zWphSTjoy-@udA!BD$`?eNsS5SN@LlCN%{su0#~g!S9VVl7_lEqm8IH{qbWC*8X~mS zhQ^502#w&MaPusfxm<{7j!QE2*mq)?u_md`WGt^QgE(;@igT4s^De)1> zDz%!A26pY9gmc#=x9u)afH_pSSA9^lI(o7uy4MiRNR2+Zv2x^q>PZ6{HHOUI$%RRj z)pNjsAHLg;QesD5eE#f^C){4^<#kEaoyw>0-McqRE`mxSfj@%|=D-bp|Jm?LQvy_y z!}6l4n!0Mk0Apj7VQ{s6vcW{%^B?3*QScIe-FrgqiD)pG%ur%IBGrki$OuDinX$a8 zwxUPm&|+;uW@OJCcX{_3EC2{uce7=3wIQOayhmhdy~Sdzjf|L7Rc@*55t$5rD-Bf@ zl@_4WA|ouux*n0>mek5y9YmwVY=K;fj40KYO{g##>uW(=vMK_5yN_L8Z#J~W-!^-L zvAVv-P*PvlmKO*jt&JGj{ggwMXv@nn88%8uhmCJn5(83pv=^f5oN||qp3$^l$QJ;TaDF_p%zm;WHBj*6ySzN zTV~OhR)Zf7;sCEmR^u|QF_!a1%EvDlf zN7fx8XZPS*r%0->Oe56mb{TMix64pjWw98{mUei$C-E`=?~;M5vP(K58mi1yE(Ov? zx?C%N+X-uvqeaTv*8 zh_lgJs%i{|YJHvAP!4?q?$bd_lU{~bv#HR0?HzkMkoxMX3g`n!6%ZQGeG;+XR^sfn zMveP+hd@U+4^5EtF}U&Jrq|tES5;dJTHB%ctBra*6lvLxp^t<@;5)XOs`Bz`r%o+{ zK`Cza_Ha@`wK!BzD(E0{oxuS8qA&zV!X2MIaG?_vGWEag2vc!pIRZ*+rR*TKS@628 zp3o6pM|Y^ka!ioodUKCRXFdA|eWODl>GLz3%2d!w{}1+)jx@FEEBWGYGmUL@WvvDS zZF0D_z`8a$S~b45nA&Q0F1?JiV!OCGt7~#5vwoy_4Khl5j$-rX;zPK`z|31ya)Wumu|4$4V z@Z5o)5ZTiRwb`!xQ`#CKwKW%NGsW#Py0+SO8Cx~pc6i%r!{+L$a+iLIFIV2to?3Of zqmZGeYpXr-exS7pjT~Bly{p1~lI!fr+1?%90Ze=N`5K~y{}tuZ=ir9=IGafR# zhbSPOqS_jK{9iJ1=ng{&Y#He(TM0%Lni3~dzoABSRabTJm9Lb;7M48z<;u5$O+zpK zcqKRb6VIOWdW{O`x$fn-rTre;_IUUw{e9nvoaa;USYY1bW54A;*ZDtQ*9R9p^4OZ# z$H!kjtpDcjJIgPQIP=%d9cO-5l$^R&{z|#w>dxg`k9~V(@|oY4T|0I0n`_VPym_); zw&u&MiyeMsvTmLzTjl%xrIk-D8TjxZpU$ zt39S}JNRNs;gD>@guNL{W9IrVe16lU`uaXG`@z|;cR|pzhr5nW+4WxctamEkSv>vo z#a$1}lB*6!|H!dCD{eqr^42@dO7{bn~$8^bf->b`o8y%enINe$By|-I1+H`$=g|HxQ#0|4!Nn{ z^Y{}7e%|wu_4WK!qH@ofS)wmFChmpEeqA{IK~@&R1&n zx@Q`@&p&#qWZEwUp1TL--0Jmr|=l6K_T-^KIGWEK#^r;v)@>EJ-uZ2&XGGVHb|DCiVuV8@U2O)|B0C8U7qUs*Y*xG|NLdk)}niEXXbam z^V8<52VeZW)Ab8qe0AgCjVs3w1XV11=GUrYHxG5pe>}d&@2Aa%J&(J8aiPnTn@{hD zQchZ`YY3Xw=}%*#e&_35);)5kr^G#Yi{I~^=LT=s_I2g7FH4rsxLtK%Vf@HVy=MG% zt77D?X<6sKUzqXj(-&WznX`1IV(NFxr~dqC{LUN4Mvu(zcID~k|2 zAMO+LnP<;GBjzg;p56Rqw%dd=2J;tZZ`4<;>w46Z_#ee{XJ+2pnYi_QzuND&9v^#t z<1?%JE&cpJ((VP*vY&EG-2PhpB=50XwiSP0^6A*U3)dM>n+_z5==c4-vR`jsS%2W% zr}Ni*Kj_wJ|6@0xQH8RuY5A9ckH(P!}c!x;P&M;vwrz_Yhu#Q-+X@EAGiL4 zk0J#G|Vs4O^i>CEnX-<+8H^oab*^!3XoeLHzc$h6vsrDIS15q9?b=LRi#*|;m{ z;?T`yZ=4(K_U)OX5u4NRexN#CS@XxAZfE8kIo@H?x!>!)IQHoF7ecbmKIVI5(V;~r zrw)s|HEC#k&Yl~04sW=*Wz7Zax{0gi9Gc(o#YfjOMPD|he5bJAEQzA`U-g|D=h@@8 z!LkW;n-1mN*$=f;*XO(Wfj>>%Gxk8ljwic*^VJj66Gak*HS6rRchBybdwkCH%Ypf! z^9mMi=(%NlsOhs#OLO18z4X>+CpMPV|8?TI53@|+^qq~|fMZGT6hsdHy79vwR?JU) zc3;@k{++h0`DF2}OF5oLo_@CRub(z^dp{g|>dGV8-+nyD?T6RrhCO@AxLYT_IxcR0 z+@2eOPao&fF25PN@^s_-$Gm=C+Pu~Kou>wmn=nzA|CH#)2{Q1kiuwM_R9QuCclaJgD|MBvg^@%qxh4$KY>%z;mhd*8(^xn;r z6Mg_a_{hkOrJX9`%s$r(3pB~%y!`5w|J|-`(tXB?gqrP132E0(bY3%T?TP_o8_$Z@il-jF zw*9=v$&jO_Q#J1%&HB1e{U_$dF|SVB^!%0N)A!ywzGvOKm4&(!Zs9*a_vF>-ZzXM? ztNQ8eQ1zXApKb|RTlld#bjtpyr@9}mT&}%)2JM-V{qt4#tJ>?<-80Sv{=ReT z_H73~7`o->n7wyrH!c@NLy@nV_S1~PHFML>EG{vAZ8=zH47=F;Q|9~o{3my5e0aP!4nG`FO~slFu>KKyp>+R^Wp-V@zk`~87+ zS2t~&mGQE@j2V|sn*Iz`T&%61f961HQOqK@FV#E8ethp4>!sB> z8Ff9bY#n!T+4#9v#Jj#YSW)qbrElnt>ywY}pLklg{klR`o_zx(ItyB&U7 zJ2~ySfPLbNBT{BAO-)(8Pf+f;XDV_p%snHY_2=}zx|%-!;Fd{ldHUALDA!r}{zyMA}?;Wy%*T)i`XP;KIZv>bEZw^^Gju01_cbDX(Rxnt4r z-`sxbQCgI~;Kh)nxt%U_TQgzF!ONGQ{aO>1w8j725yOnPPDGBb{UG**8!x79?iUd_ z|KzqOibfyYR@69jbgXBo{*eCI>bO59&AG@<`r?JR>T@Se@LipFeRE@MXG6bF#w{u^ zchnB(dHKb!Dvp%tUk-Zgg`-3N9I|m^!qU}pZaUZhPkx5 zA9>#y=cJ!Ia*VxtV!ijvUp)VLe)qY}6~Dgm8U14RHD85PngaR{irnj*dyyZrmcG`>dMk56E=M`@QKMQclNEey{MWo>+?@uTWbxQ zaAkIbeEs;%?+sCZVh)_XH(Wh7TeB!|(qp-MLtaldZi?BwUa zet%)bY3=nMAxlKC|-jePy)q(0=czEs{m2ihNgp`^eOduYOvj z?mBv;;+GX8PRv(*;IJ z8#i23UD>?n-Khzmymc>o><=>*ysnKub!6khhVhH$=F}WfmM#443e#iSh(89bcPq2&6{e=JPAvT}Dw$`+;Xh5aLLd#xVU{XE-!QNpIPzgIrF_kcbsuuvCLbaCG8 z*{{@mxnp$CKVB>OEUE6RsPs)g{963clt0GJIQ#pvj~`Dx`GRQXfz_v`eGWBFyzO-3 z&UsOR2Qo)a%?I)OrXV{Km8vG79$7rj3H>fJ?X zwdd9>Zk4?{YkG@8zYH9Idt~=5tVf48ha4KdM?aUe=(0C!mY?9vBYSRpVzcKL z>FUdmis)g{^Wr{!r^gS&j}BWhw=p(+qsL*<&5+l2Kesmc>SD#4U%yq9Q!sgmy6ekd zytv0aV*jJp*)&`C(r)Y496WSxLBi%$b&%zy;fs#TrtF^nyKmf^vb)>UujDT~xwjbd zEqzJNxu5bk4_GkejB2>__OZF3Aq+DMoE<_Vt*z0?%bF z$hmv-QcP&X^m~iy*4yV!|NqS~i~QF)abkMVA3gWJPLX3Q<=4{KWnlZ=rLt48WTTkb$onyrw5D9yGY5e}T4GOss55z-&$GW#IJn)s}n!e87s}07GrP z2k}r;rpHjCa)Wf>ppv3|P5%O!+2O>Pj7E!`53WxwXO!3JP5K%GEXSE8W)g9aO1*i| zq}stIW1YcdncUHi;t~*Cnxd4XWR)r%AQe^Bma1A2V3WKt>I7Ex_}F8?;(`WvR`A&d zCQpE&N%IE{7~H?0xWI=G2{Y##G49D?@Y0u;6CeGn%pk~MQuG;AU@{p^#8KL3P)Wg% zA%li^2|l&@s%k^I972T=cm33 zq7dGasSjSX#4DZ+2A(mb<@**wI`HrKglCgP;P-k<835ZPynhB4gRiqX_0n7PT7u7G ziVH>*%gde5o{+mReQqIWG^}!Nb36Pae zwiq-flYX)rpUw4_s%o<=&*3VmHq=&FDir_{EC+BLb~nfTt#m%J?gI_D2Gl}D063Kh z8a&P}{3wGrMHY}*BQf(gesRK!)CtHcTyZe+O3p9O6~ofKco?il811pFF_c&7#SPfS zQ*W{8%PO4`y<1m*bM%AbD-@eM5!R=6Fi~qFP#+RN{Q$5|T4f%L*G9`_Rpufv(AOEt z#bh0n8KAdRN^u3iF_o6rn+OV2%vBqWCdOXyCX%U{z~}u3y&g<11vV_ zYt0x<>S1p2C^H)@!w9y|6L6gn$Yh5MZ=##*jRa_m!A(1~e}7O=LkbE8D$4mLNM1+= z4jM8*)8B2tprJ(tp!GDv3KW%)Z4OcL0Y*q0iIkk@888S~uugQa__QvRXcdD|1X2fs z+>CYWaEys`BV=!aiIflSuNhgA-@i|OKexde96X^t1`iojIHaJch<|h+HmLv50r0N3 zW?*4~2mds5F#pnvf9y4A_&~b@PA8vCy8}+2tAmH8SFeIzCB>kwi!~q+rv#U29)WIp zl1E&e{Ie7)OMYclb-4tpBfu`&X^O3LfdN&oXR1IyGk_j7_&O_KA`UJQR~0eTAcMt& zywO|g&3ravutgDpQOX6}g_x9s)ZPZG7#vSet&@}YNxB}=3>XY%VeN}lZnzDbu~q{m zPUvEzMPJSLgyp{Xw+EHnSUUh>kJY54thx$%6#2k{Vw_{eLyO!B1{N0#DbWtm3@C_u zaMQU@teDh)IcZ0HWgsM98ALTzwPFH$6_fQY3BT$O3rCY#th*ua<&Lt@SlVf^E_qN3 zy)A>A*Ztj95|+t;iZ-(xWXqs>OXmlt#I-$0FngcccDP-ehOfy`11r^}bR4}cYj3P> z{5w*++R?|YnzlF}aN}liK~1TlTmt&QRA!KxVPun7S6dNKQc__ou^3Cr4IEKi#@dof zLvF)rOuG# zRat8EbwH=7;gXrbsMX0TxTK}PB{PjtC##d$JfpGNps$68G;m2#0Ygek7E@nUYXK@V zSu(I5l5Aqssp?cFIW;wfNlwd9Gs)?h=}dAaP${Z(6_b*hk-?;8sMJh)W}1r0NXyJ* zGSaisnT(9gWF{jsJww6|N<2xC2*U(-yRzg*3*PsQKa?%rW5q^>Egc*=UIqyH`?6h~ znwBieOiA+>BPFAhC~0YkGF%)JKnJ2=6x=1aYjA9ETyT7Ff-+zEh*Gayh-i1jh*_yj z?xt|}@br2Sv9y>Ku`DBHk&I>JEOKKR50>_1884RcW*Hxr_GKAAmhop9CCdb`OdyMb zSaC3mI>comV%YqQgB(kC;mQk^cnnlShN|AK{$8?zj z$uba&GFc{@WqQbRz_BOGFOAC~FMiu$prKZ^#k%plfhFpGw; zOc9HUSu{*G96XL-(MT4JVwuq_GlpeySfpc_u`E-S}@6)auJ zGF2=yo@FMmOf`#YSV=9*7+F-u`kGnB!ZP(N)4(#5Sf-I>CbP^GmYK>j(^zIY%gkUA zNS?_uO%U*-h?SaHW)_l-g{K6TnS*4HBOvD?R`LYgpG2(R0=O@N=cgdKPXql7{GWyY zbMRjb|L5WV0{o#En3v%H3jCMD|5f%9RP0cSiUm&iqu9PQ=4^d+yytnw&qhz80my`6tLdi45Q?oMo-A-iCIeooKh< z`k_F6ERcHy@)LplR3P^XNUK0L3*=#e{7N8?2;@&TsRg6nyNoH{lFN}?g9$e`LS9iC*c0O&t)axor>lmNAm2<4<%RruXefW=U$3E*NExo70#LwE z4eYN99HF6tP|zR^1sV&C1R;=uUJ&n)4jm|jq%x6JRS3=^kxagl{zYU0ISvrWe4{-qy33^Vcak zB^O}j0<}SOS6eQ23Fd;i5G&V#xM-Snp$;irSl>{j4M$yV`8v8UP2uSGI;@M}BDjwF zNL#^Shp;H(ReRVWDw;eO9(EDc$u7#v1ESQ&s_j5^we_`Xqv19X@`|QunY<%p)gxBb zHIzm@Vk@#XbDg;uu1lqlt=OvV3XDU6QG^-8fN?m_INUbUYVFHVz%`2J8Vy{Gh>?31 z0hi9I8XkKLM0Q6y18S~8Sh&tM&Z>(uplSpm#P^Lum3}ro@43_~kfN-r!>UnK?D1Gt zTn)07>7sEoL!}~{p%4WnXC@?~Bnl}hF$3kB3V~GcQK`6w@=%qn%Gy^#HK~r-#zP>7 z4|8g5GUCISz=u%{5tN9KOg;(x8m%hZL@30Fcc2WtStvs*=LZiyuvg1wDzsUwx|F^t zRAs8I-pZv$Xw#rH8mzi>c<7ssDl=@8t?>i2nczCj%4I~$^;x#*RviF(sLF1(8CI?v zxN5t@>n3E?_JB-$6hZJT4XvaX1V10?a=4r&J^>Kg0;CIf7JW}#?p|)-{4~;KfQ(%5 z`z#u(iK*1soz>&Nv2zkT~7 z{Q%pW*ozwtp#xObeNz2&B zI}YQ9al>^ZxDmv0KlbOvisXtNSZ6$j994HBdJNg?u8DdK*&at$-AG(}q1r%Y!BON! zk?ZKbBgK_k+Y|6ctLw}4<;LW)ST=}T>U7iPO6_jToo-`uWp=kWoNgt#a=Y8xPPcKn zZg#izPB(q7!tS=!=~kNSZg=~@=~kBOVRzd@+;EnZ=X%=R4q!JcXV4eg4)SC_QZiq{ zgT@CdjYHU3%TZmuN0mz#X$>ovPAn&MCxV%r3 z@*Znw<|f1*t27*z(h$@)IM01>#ps4>&RNWO9yN0{Ty6YZw8F-$K@^Y=>h_pXk5W@)8rcT zlWdO)kB!7}^2+G)75XW**))jq7twMB2cnLXT6Gi@;u1t1N4ArYjT!MvaimY7T<@Vs zKh<^?yXoqUH0n>B+>`ss2(3A}5=x1;xo=aO* zU5;Ku%MkShZJSSnKH_FXQ|qv<6BAvR)8NBEY8KFiwx?*U6!_{)7+3O@8q+gZYMT&U zf7JFYmVx;QNAn8pqX_9|A=`7V?lbM~vyp8nEeM>2JUT*HFF06T-@G18uOzadfxX20 z8I6OO&HH(|g&+GHr=K~<_6jg)WAu+B+j3er7jm#0RF%01`qxK;*%wB3GVppM{iHeN^JErUr8 zGa8w)Qg}rMeyTvhc9`9QL!l`uDkv^08B(C>HIi}zYk|RH#^%|{E(SLlmJODjvI(xH zH&~$n%NKEOZH04eoggn;+T;|xv9b&x*cFCW20C~CU40$#cb~b=lYfm7>pVki^PQ() z0pl53oAW%eVVK9*6NbWnVCLv1WOBC_SqRn+#sY>7VmI&npp0%=Fm?lByEd4A5;?Mx z)>aL0m}0}y1Mah|2q7*PTq^eUysTt{_wA2()x>_Yl&rmp&i1=HJn@{$h9N6Mv`k3xki&~Cvxpft}zMN zZz7?SkiuOihG~gB7a9nXQ8J`OZVZCyik5bhAea+rMQ&1rXhzGp$>C9~6}u@AVkBCL zn+HN-R?E71AtaG%rEWf8Es$wtZhp|d5segh)+2X=$b*H3!zzuY*s&;{sf2;H7)i&{ z@sdjV8cg41V@2`OO3^hW6UoOi@$yRM8pOhFtT?;9Dg?Q6G zZy6&B23sFe0&vB*b7Z@6X#Z&&vkU3wBE-?eq_A3AjrU^6LG$G6>n!yqgA~@ojIgjf znFY7u2K@wyfh=k=b@k@Tzh5N1Z+)}N0}_(d+C)uO+w2Wls;#dj>rxKWqzFurs7h3$ zZ?vy@wPoD(YMI376gQW!|LQIBJSt+3Il093+6fDiD$!;#uY6UfD+YH=7CqAT2Sd^NY;VnjiNb07f#R1B| zfIzUF1O*2NhXi*B4h;@d#wim;9*7n(Vu{1nizIK)*Y`Y;y#vqv( zEQTFfrVA^HWj*6%u{6tsv0e$RXAaA?yJ@TVyz zl8)*W-I-it$h9lECL=Fz8BK{qD3|g89U;<#GDV))dISmqG03YI+(cN#IxRn9iAHIi9 zmCm2@SK%R|N*BNdsC3?(H@P?mY+fJ=>*w8mJK&U=*4k7{maAOV={qzMHf#t=OW|{$80rs1x|VSCatDIaX92Q>pjQD3ZsX;?x4o#wE6b>S!sBSC)P^*CK`crfR5o9tr+IDfn%8nJwv9RBC*KL{aHK_l{?IF zzDRCB9cR_h1{BdGsS(*tb4p5XQ(%jN55%a@=3ziq;IVlckWPZF`Pg6=EnlgX!L_f1 z#y)M{W7*D?tj!1BiF9&K&bj3xt%BI={GD#@xwPFa7`tgbAcoL6h&(Ce1?w3&OBqTe z0h_ly!JSp$$FBmOR6Jl9rnH|kPB4lg18_RUZPOxLbwonp9US9qyGx6^aU~ebl~k!p#y6* z-6T^15%gUYbqD!k-NQ3D?G04kKb;Bi0-UpL&>*rB2QZ4Lzg8h6IbJ3Kn9hy?5I5+n z>kUrbEyb$7Kb*3H5~LPm@7{g-6csUKi**|@7UY3dg!B~B5<5zU=;_wM+uz~P-EcSs z{P{3$4s%GJ-XyIxOd@a=9=O6_GzQFI_+ympFcuG!q1>3~JlU78pjv6q? zr_FM)qmOX*I;MgSV3i#~<${rGIaDBcHg{t!!3XkyvY@sKkifuN_J8eQq3t~$!PrU6 z1W1f=!Dtey^mUlA+D1ovwRqhgD4NCRYk-N+4Wp(9>rH_3PG-tY`bjQ8R={53(+)BE z*&Qb8z2O9g{CbnwXp&Z#^mUb0WoB8ap`xl*TUA{x#eRnXvXeE`mSYERV{NgqqN17{ z!ASDwz9E$h-pj4FzJ>s$OorMHZRMaNVfM+p9dm@Sul_X{z&Hq!W9J#HuQgO7gF7BO zV~j8v;yD`ud1__+gklCO#fX+xPhuM+t;Il$6K+N1JPhJr!lP9^cul;Gh8H93thZ zp~ViAojcTXlGS}`%MFbLJ}1Xok&mhZDzo!}hq<~DqcQ*5sTbi)54%~IKTE^@z~_;; zsDGbc1ri?7DRo$g<$^8P1^4JB7=Za8-U)40N(Zd_zN+3DW$I#>C$_5A zy^tVC$oy8oRaY~9*Y+dhqK$|>r*&wpAh3~bNh3VYiXegJ3E({FetDEEQjwXD+|eCJ zt5{f8FxHlvX_X3Pqbg*U@EtWy*?qH%A+WK^Qn>w48Wiq$u#E zre!heG!=kO(=s5`bagUZQsFT@6JBKCOJ+JCN>#}jaLLL7L}^MUlbn?d*wU=5R34$t zq^JSAnv#{OW-zS|X)Vkdz8zv=1l`2Y4O$&rY8(JKtj1GvFb|Mqx&cQJ)fT*d;Ol7vR zRJjHz*COR1M0>TGEqgr*U`d9hB`i%asQ^f&6)f$+B2N}pF%SS!{aD(cEc*ZyHJGJg zb{z@`R9PgFCBpKEilx;ooy>Ztuyh)W(pjG@*0&q$)177VSd`B)y;xMh(mhzF4@>uD zQ9qXM&(Z@}dLT;=V(Gyw{RoDc(nTy?%+f zSH>a(OFPh|bQMdFXXyznUBl7@S4vN0X%kCZSk%CxNi3kvVTMnKuxJ`fPiJWWmCk|$ zKZaN_phm@j8l?d-N&{k)2DB&*Xi>>hxC25|{4)GCtQY{IVgQJW0U#=V9bUnj7+^yY z;6mxu@P8BjfDiS58}5;;5@4d<028Ix!yllcVkt`}vh-$n+6tZkFWZy#*^5}^0mKGa z!9wvB&`05|nWevn+f{J-748YF_jSbj{09FU@V^OMzoQ6ZgrLD(3kz~hEJb@^DyWHt zYZ!hGhiCt!rU;77pv06)olMiintJ5)%+-M50Yj(YeIVU58nM~r%G3Djcu%pgQVvWD zQPTogFAIFyet!<%DRwa!2-xQVf~XovH!VR(MXx}!UIxaID-lG11Tb%B3181 z@q^_Mnie5{DSuab^7nw!T&fa+4ix2qH7-b$59=hs$~>^wg(&j@W!oVjA5gZT0eN7% z3!9Wru_(MzLrGCYCk^F;I>u`#UliF#L;0boV2r+vF2?BFPQx(zwzC-HZeu26+-(h)A8imla9VJHq_6^^FhCF%Ht2nZY&rge*T>onDHN#qba z2*f^O<)k2%k%-(BE3n z8AkK#_E1W!oLq>DsKE!UoUjOl#@WU-!z<2h1;l7&{V|*VFnRO<3#+Y^kl^9U7-Cw@=Rmcs7UJoN(Wos0g?zP{u&fY}W!8Cd zUd>u>1n5f=&wfK#>V0(D^M z_6k67J3(Rq0UO#kl)~Wy+_hBNS>M^V0`4*T7~4v? zb6ujr1g`B01@(sWkw}RJDXWN+HVy>+2S`4}RxVzf0Q`WDO$4_jE-4zlu1y3N0*;jf zR72qbS+D_(P3c^j0_a!B88?UPW^j!G*DcspA)ytD>}zN=wGU_7XGoW-OS65BbZJ}~ zmu@?NNDTmlATd~Dlp)lHzG<{J6>|IwEWw=t2~k+WQ7qv&kwCm>Hgj1H))Sc3LjXhP7aNO<8jR40}=L^Ee0WLpz02f#kkFCY7L-) zBbxGR>^A@eBG62V_*!i~s_bQ32eqzOgHLD32@KNhMJh-EfO(;QfTT@MH!Xm9dAIGn z05cZg12AXOEZsrC`}ltSBvR4j1-0EDgFfCe87b3BSAx`RXvPQ}>Q0lI81n;Qu7Xd>^F(`}H`?OR^j zOf0RN?F?{qYw+;_X&5NmjSm{I&3sl~<(Zoh=I#ObUn{P-nA?U)JGZBu`%j+xQNlgg zb{AL%^W1-7($4K==blBA0+>y>9|2^qm3xHeehia#Zf`sHJf3?F;g;E+02b(fFrxoS zOvXQsyPpL-(_F&D*cQSY=#DVcB2325!%R;>U8ILlD327ZEeOdX)oLzy@(&MGJXlyXg?A7#VQ=|vQU}9?<=(JRobd8#(Gg` z2SXk0fWT$}zRdgLVYA?ihs|n-fv?qqui*|~1U##RB`-w^goVMg1T_nF5Jzbp#I-MO z)PR=7br`#C#3XM1n{YG(9A2F`S-aQm*ehnkFj%|S9hk)8KEPf9va3+U5PbC~xR!lN zH%H6X<1m^5{5=QfN&E{4)342eUNMLfDLj6|6?`|ulHaTH5<O0uSJTmy2W-@{9deOJYfuZuX3Qw=O-V+&JQd!^26T5@a?zdYIF=JVFrYVNa0qGp*BW z^-y81VdoAw-?!s@KjX~zRS2DdsF7VlQtAwCI}1TX#y^Vu%n-zRcqoks0;rAcdrWG} zK-Le0DhKKUhCi2j;f*wxXe%TT6&Rq_|48dNj??0e3O~_SU1cY$XEf?tNmrKIu42Es zDz1tfpBrLtv^FAd0*rsKpx*?~H(X@?0SSP90F6YVP}~-0Kq_vNJd#qkY1>_pL1Nt> zMBIai6aukt5*6BJiAZc}AU3l_*5(2|#Bh#?q$>oNAIBs~*IYv3bj=fybm2C#z~N<) zAm%9%WM&v1?%~emSr~BJ7K2|XBiva(k4bGUhyCVl^>O5h@Q#Hgl%hU^2FAAe0XA}U4+nz4yqW~?QG=;g zU+tEf2p<(oRHv&l(jT&LtY|e+JUYWTDP9v(s zi@x|+1nEGy427dyq>v_Zq>C5%rki1CZ55pGgWrnnXT>kk238OF-S)-yRRb`B^Hok@OmeI!{4dllAryz9J1s5QxrD*MnFDEZ zfych0Xh+Dmw&1o{_HBt9ZQnARtV&4{WhE!e0YWZPik0pG-bx>(cOX)B0=pWRQE65L zTmBWS$b%JmvLY{RB9!>DV!(>}vtl_bQnI2zRus;%9a%}FtRsLfqgYuqE9ngNSqu$B zDpv$NDN-o>0B;Wm3s7>{tOYL^0-5JQ_YpA|MBjzDbVZ(CGAWo8JoI4BfHnmfdO60> z0|3Vp8WR{o7*yV!Mg+wb8MjV&Tfur&Ni9gn5?9}fU}BLc1&`8P59+n86?0@$aj z98NH5m9&h%ll*|Z0*FVudF9zEui8~S|EQpaZmm^P?DYVDK!Cr;*~ew1!=e}*X%h6n z#KY25irS%<10Il4QD$m7qeN1<(vODj60h1ISd4)68XwRdGJnJ)m!S)Vep1pTrf4Z> z1{nQ7H^?YxcTW#5a`h%xUvgCmyP9QeNz@GoO9^54c_c|Zh^B;-9@s!p=A1sBA>^8fJRlhf+{Mfkk`hp&nJIeGu0CfWr+3<@8v9+bi9ng)%T zpAh1R{Ex_i`1F0a_!#T-FohM+);LP`dE5V#M2K9khl?C+RX0{wVDV?2_Q5Kzu$ijvK#^^Iyt=nB+fPM!`p*Ys)dV7{}#b%Xs*BSRALX z;&{lMXR$tHj09=_rV7EC(^-Y4s&X795Au1~e_wf=G9hB(IwM%C9x{m))y7hNb+NHO z22G0x{|iY3c3o^NBm({U1C{gP>|8hu6efg4bugNLNTm#L{fl{ zJX|*E%gO*^T~%6D4V(D^tyu@BoL9ji@sMg?9^2W1BS6zO|Nn64P{I2?oQ3ATIU!6Y zdp}&()EM+;IO?FhH#rI!=g33$nhrr^3lf%-{g4rY9UsoEOfuNh#K-I*t0UyGrp!{W zuP%ZU&jB3&z{$=16MxS>cGEKK7|}y7;MIrhslan0{z&&0##R7cKS(w?fB%2Oe$!%l z=4x0VN91N^q~qPc6$U^vtFwr;9o8+rr506$JiW$-)}EIs%{+^pmb$Mz5g z;LpiSax(Z$P6bm?aw>qNlQV!nIU_w)!q0u+xLZI$1FScNcNoc}0A?A0zR4L9erCX= z0N|OY;bmq@s?;%FXHr#JsSF$yqvp4TGpQ+=Y9=*Roo3&`mYSZP%%sAxx%S;_Olnpt zIAmpHxVISVF=@#FhE9WMd9@yMF==T4mQG8{OqUBI9wsd_H483TYSuo^VA9p8nQ+NW zkvaQ&COs9T0!CXcbM}@@dPZ_8T+-7(oTH~=GE~WMsIMwL)xAZZ!(>1HUx`(56@{Q>qsU5*y*p}LX3ZhcGJH(U557j}fhFxI|1}OWKEWD9NXoFC`>6s3b zq0jxT4k~N1S_;P$BV~fJpK^qBq;eaa_yC9EAT}M=+KBBC4);;82+kh{lsBwR#Ihm) zE2~*iIxFfyu-pA*!;ow^%}PeGl5wo0l$97*Nd+qz&q}ncq>zGKrN;W+hWu z$qZKVC_tzIUM-mme}Gp@7Q!D6=64k7lwGz*S3LgZ~Qn1E5+0fNBYV zsU-lUmaK(8pr<8p$gTtq*=65FvUiaPfHh!Z#7l%Um^uMh45#V1HOVP4tf?c|Qw--> zz>~xquUz;7#rgroDlrv+sX$BxVJa9?A(-lbDcCW~hQS~3(+q&?z@;OmA~A&#s%$i- zI$^3aP?8v+Bwc`#b_Gfr2b3%xC|MFvasab3@?@YyaM~*)N(IU-4Jfw^%$JGzvYWDC zX}^0@H@N1&Rfck#dcsxH)RS@t@Tmk9H1!fmSXR;pAFHG->`i&}1&49{OuY3_AGx}%-^2pZ%g^x3;gXR{`N9|dxgKf%HLk+Z!7uRD*m>bzrDrZ*6_D? z$ZZ{3Z@+J}-#6RuTkZGl2&KXnbx*I1bZ-nBrhM}7I-74EHlq7t*s#bi4`9QLKZXs9 z{V{A<0-$2R#{;NXhNJ)|mLnNJi`|esFpp9ox4?YL9VvqHC=cWwluvmgkKjBw($_OM zpYldtA$b5c_U-^+Cgc;E2Vi60(0l+J`-SBJ*w{ZTAHc@S@H{x`Hy}J8Ajg3b07pSV z5%~Zo3GSE&z~hjP`2alb5Sa(yhtSA;DjbDH2cjMS<;Dg`C0^QcsmlB}W9P-=>XN{3S@DU^v) z@v=iYUUpy@yvU#FSaui)i~MPL*&)@wlt%+#$936(A8E8ePwd4z-T5Jf%iDjs&hLd) z_%N7Q!*@>d@d5sx@NE!NRU=-3C(l&=LybsXVhBS~`@qON89wV%7uWz9fCYGF_p*8uw%+qkevT~3c1egke7y+1i)8=O0KZMm9XeIP&94kTIRr7_ zCjj>Jd$){qbgFYD>+d(5w}HTDbr20N{NH{q$juJxC`m0*@kise7<7usH$)V0d>9Pi z$%p4n_w8N|cVwAMa+6%>ma9lEa0)w;f}koK3k)9os-)Hc+xKDDDr#hThY_$D+CKax zm6%^ybg;o*^ZP1tlIxNIzxo^CSYmY=H~7l=0PirYAZxq$!yIH?d1RZ6WNqL9Z$Jc^ zV)s3&O`a)uCi8$d;M>J+##I8@F|R{ib{(xsFc)@Ht2+^ zxD-wjZak7c!5QD3_7A6j}S%s*g34NGT>u^lh|s2=qi6?dtM;`nPWUZ!oFrb z#BPrt(Xp*Co!mIszu|C|KC+eck?r~=>j{6u;VOMpE9s-!^*ics<30+ns5oaj5$$CJ zmeoE3h_X+&+AIowCWgh313E|4IS`4V&!mS5b~x4L@nZ0l~pn4`y>(KJ1h02P`%} z2qz(_slp$>vsXlC9ys;)1K<_GxZl&1H|T524CVcaB6R3or@g~fqdXAI0f(rxk+!z2 zF>SUE$VOqF#~()krwH6H)3Kf2wcGOR(?-AH%NMmHIb?w1%#Q4~(~L(51V@;iEevg> zoV~+JZ!bO%&Pb-poYKn+4kLEu{tX~J+q~~0^G7vGsR%!fOG*$G7V_BWx2UzuM0f0H6XJkD#s4qY#)l5ngJP~ zlAfLlpKAgvrcB9-{gui9r8I!-ln-E}voYhO^^3<1;)FoQWLE`o!TcF(LR2Q!>lov*TDMgZ0T|ePKg9 z?EjXqKDjK?;LY(2Y>qEreY7mo8-IGqryt7obgHMv@OL@t;`I zvrIYbV_*?{RtdhT1US-K*4xNR>R3M$i!7`USYxKKXgcdN3pS0z6v&qZ@@0WsCXlZPEfpW z(@a-LlooklAh#$N%%KQ%$c2*>0r?q?dSh63Y+NTuJu405Vcp)s(dHHSG~Y@B@D@vD zucBY1cwaMo;i(KCY);LD4>}>ZxYIM?4eV-eKKvD+xaS}YypHfo#rwEDL~{{rY}U~n z%`w=cZ5}FR;=N$=H`x&W1R5*SNr(%Jv=XEj;ZO8{f4n6ec8qt$bi5xYCHGKHx`E%U z4jZF&GET<9X~1sy97Wh64e+ObT%|MI035EEwucL!b|K+5BeHc<$%hM{cCj53!aae* zRg!Q|^Wg@-*If8;&*1b*9N}KV;a+wLH_#bw5Dpi5CqBKfL6d}QL$+UmJ&+IgI)r;e z2={j!ZXgNw4j*n1e4m96_b(i-R4kIpDk1yuw@)IPg5lKW9@Ijb?7xJRvyf4+|B?ym z4LdA#9k>n=zER)=-#!64_E>yRP6~VZy|_>-7p4p6!np{INJ@hk+cR`?gAWu~GY16* zB>^&U^kpK5eg%XFyDmxem(qC8B^Sa+A9h{Zmcb(gjf-nJ?8X#_c&UM0fnA&Rq2&7` zURJJSG___4-n9is3v^sr?*%Ia(NsNr=L^0{LW=V(yl+nKNZuBgI%dP@9wi_`ZXM@&ZN#<$F9x#7}(m!hkFx;3*VID+X&vpXZzD7 z+%C>=yW(&?9pTP`jdr+g&Vmm`!5+IVe7JL9iyz*(XAk!Y*smw+J~l6??d^h-|L{dn_OBYY^@VA>21`xUnSM zH~DbmY;W1aU4z5*afG`8hr7uo-1wH^!d7FxZEm-RyIo{^AK2shaCbnsJB4s}<8b3i zxO*Joeqs-IFAf(V|9n0l!r?Z%gqz?DHxj28HXKW3qoLLvw}*RNWcwP}6ZmjXLb#`e zaKFXjCV0Vk&vuRvH_~<<6S_n$v00l0dZObBXlUQt<8lGV1$HO%ak+-$@(VAGz!H|WQKsMn>Hjmg4HV4^+4UkQ;n?T61Nywoi*vsbF z9B*@M4tF+r`@Sz9;P?AichB_5l0jJez4zIwuBooBs;;W8>;M1%euy5i%kmeLw0X2|aLqlieo?@`tIAfiX@l6*+TP-8zWh8h(miHg>E!Y)b7deX`FDayBu0Q2+kVlPm> zUqPHkWKvF1#QKTOm5t?a#;^r&U%mn5^WP; z0yEnYe)Np>er=LwaxQ>of|XAn6}(;#Yvb|Nc;FE{5UgB46YFE-olLH=K8Snxc!Mhu z_+f3*gHsbcS_s<_>y#Vwv>nrWLWA{g(0WQEgE8yl+Jq>!^;g=&(Si-&1Nfwdx?3va zEtlgZpTkR@WA)N=U}R}z&uP}@wDE~#f%OmC_++x!`aDIhbR)kcBHt#xgviI(OPcjH zMD8oMzK+O!)z&vCauq{kE<(yLi^#W2FT<=HMWbf>9z|HDBJ1;1!9PF@ET2Gn<-!}pGD&(>vtHHQWzs9w54DN#yJ(R_b@L-_JfYKXu|xvm!oO)^+F3|;+CM|g zJ1Hi;{Li)h6%_SOJ8H7R`lZNa!5x-PTItY2&6U27#O!GCC&hF4rAX z$P-P*tlyKT24nai$g={2>N)a+lb2Z*c?z%u`XhOYlO@)FlBYDe$odm`$}tN3SsTan zg^%!mQ$+=>|3mdqP2XS#s^JY(gEgj$wy#I2PmtHVLcHtU`nbB3eqNdE2$Bi>NjIP~ zS!vy;Bb^Y0e7q6Hd_L=@L>I9nMiN`it&zkwb6X^_-P|5YY%#Y8$FZaC+l;ujN#DPa zun=3m3pl?$xVf$YQdPx8W3^xG?uA6!o(x=V4DXS~-0e%Vx}uCEw~Ld0qX zV^+;Tmjm*l21N^l>jAFhka7w75iYo@xq4o(aA8qNe!&7(T)GI`H6pfJN^T`A;S5!D zI&8YgEFC{&1;%&y95CIXM`Mp?_;msDj$dS{?u(8`5(s)qbWhklO^abDNdi4X5GI;QMVL-dy?#|GN73p8!5zu>&=LV1ZsjPxz%)4q5I2IqYQeD>|_ z=z+o@JfDog!8rzCNE|I<6@jxj7=afWL3GFk=y#epxuUCLfci3!yO7)>;V;JdB#13Q zoq*022k#lS|CAVdA3C+oW#-s%7iR3Zq4T8&Vg0;MSW4dj6fo;Xr$ee$B5V_g9z-t` zoe~apz&OhgX1dyJPFpMKgb_6s2+2TeFO+cxaXeajHJk7Ty+`uK^Me?6VAz zxHIDb**s4Jr0)=5uXls5uoUVWuFglpP|s*;bmhn>s2>l_aR{Ad#zO_W-$7GTY_@Ms zX>5t;neh`H4Op>Rqi6P@X>fl|Ua(+6Q6M*;6)prPV5z(aR9TD31>VYR!zOJ1-CC34z;kYP&SB<+X=FO_ zHTLtUKp`#Gfid1YkYdLaK&3l+w>_!;0sVkrw}4*9^qd>S4Iyqm0_zL~qLyq7doKdL z2bkW$S)V;c$Pa}=hZj%Si+w$V0!*GzfH|;x$AMkDJ2!3gkOEww2LmOJ3*N-83R_fZ z>!3Ig`(7r648(dUrY46EjyM_>8AB1*KN;* zTK4ehhT-Hvuo4{f**ErFokJ{9Zm6xg9kB0h-Pn2UMjzy*0ubLeh*HsBd&$|y?Izso zT=!+MGuf{=177@0tbx;^$pxCY(aN{8u7=?Lg67IR=BX!v;eWAAC~s2O7p0qRun-gUTs|on=%+s^=X-U> zq*x=!P+M9R0=vdMsx-DWk>pirZ*6vQ)&cQNVBd|v9*;pc9W!mD#laq*W#yeMNX%Yr zzh$Iuhq2?LQ@_#{jVjUhCLqCJ=@~38g6J_+QiLVwb(pbNgQAKP#VW>9fH+_^U_ct- zKyL#W#^zd87jg~g)xh0e#AQHlF9y&v*FajejO*2$E$4C#mutDag3EQB)pPkW&ccKq zO`y{aT&^N`ZXV@4#(5*>OV*}u?i`t`CcgpfR{OI?~!sk@VD+BikrJ$ z-VoooNw}MZyG6KN!o5nkTZOw#xI2V9$`FFX z8Q}8z1KoIjF&#zZN{g+f6Co)F`B{}AY4nv~K73UZcos4XYgwpw^c5?Fa|doMM?RDt z?ma1TqpTn^sYw_KzYSJ8(dCyxz*Q$0u>gJL55$mDJxY2Rt>?nyiQKMSsZX_5IzHKI z7$@3TGauXTcmZT7v?WmiOcw~9V-*syvv1g6D6%yd(3T|gl7-er#MOXQlzU1+JnYJC zc)v>4m|}Pr0{@{40RHHr+850MpsSJ^tyX~eITff8Ke^8Ekktl;Eo4+g^;-0Ig=LcD zMnVw61uZ$E+9&v<$iQ0dWMQrGKKq%>vu<)1JgZr2#}maNLjS{Q30{wKMHvU=)2At{ zt61$Tv983enq;Zffh*lZwRhTH1xFw2;Uxx1v#dj4<2XN;hb`2%?PAv93n1I!aO#05ro3bkp6qs_`mx zf<5rb!guW^Nn0kdY6v_4_p+R_C~Z@&{aVdFL^;(VdXh3CPxrXE^q^yK>gXGgte{P;Rs_uhi! zYRAnI!VI(qkd}|qBEHcf`e>@8Ap&uh>25#wP=Q3=}`&Zc!oY`MQuxEJ5KSD%9VhXp3baF%htUV8>21lIL zo*mXBh-`Yr#BPVsTz@##yK%0ISi3aN8dj8s7P4uMbiomGVTrx3=j_xS4!4W02j)^b zu^zB<_U7iU38K*!C5klx=`h7wu`Y<&3}^Ne-W7AUg130Zx3Xgg?Rrz14!x|nf;Q_4 z2r;~b=r$XAkSpa}U2H%dNM3@TfbF*g7&W3ifUXRF@&dVV;esOJ77MpTxTV5fw3O~v z3V#*Oj0DrU)&Z>*rb1UC&UD({gIZSyBsnpi>ptwAz;vzy5D~T|%tuogHcgoERIP!! z{aa@+$5-G`kq0bsV2~r_Va{TCRuCt<8rXkrD)K@^q=PGQP7ts(Oh*AT5FsJGaKt%* z?~eiJgLpN4P}SdHvk*17L|)>Y)N@j>teifIX;ek&Na2gzydX)jH?mW@kPyu|6PtFT z^Z(faf~PK4O|LNb^fhW9F3bZ7(7YcnKplD3_I5v9XduouMktM~O>{u37VB6Y%i@3* z%VMlQI1oVvK%$X-#1P;(VZhNsX)aD?i%J%iLH1U$Wbx8Ua;yH^ju>9MuzPzbi`+A? z3NhR}J==SKF2kTWX|U5+<4FUx>FhnScP?puO3#MbA)8EZcg2`~VX+!K$t zwqmqbIgBv@xu^KJVt`QCD5S$$u7eo~+p`kv(478>#XiXm0sz0y%@=NP5&6r6zZ{00 zG|bD`!roE*y8s(?=-X z_KN3h6$*=Y^nCChLdo=s=MT*L4R~YBr4xC-0Z$tA4P;m{y}jBKslnsV{!|=^8c|6K zTYjGGA@$~wJXpW&xNQ($!(pIW9Dj4$wE|BTC{rjJ_4MZo8xF%+LW$MKhBV-T)4{zQ zbDp&5M9^Ja5zA&MLNFqN9n?NobkEJ!xrjR2*3Nw!ugO^4L!thdFrqNvv5hV`UUzH% z$f(@k%MSsBXYZi_U&_Wg9Z6&421Wt$avO*>lOrjdn;joW1*iZHo@IIUX{ z>FXcpl~V(rNo=+EbtnmO9vRFg%?(A=aX zY>r&820PG!Z1nPC&Qzy%38*lFKUz13hGA;r>rI)-BLnDdX%0fCl8KnmF9JnG)da&T zhm|Y(W>SNwd}vr5ffb?(nRqXtHu?_^=4WDe(rQ1tLDNBX$Ccn=BvI?K`&PO~58o`cCkJC~7Cn=G%n6s91YgQK-Y( zpd)YE!QG+A79ZH+4xStsz{uGP+p}IsfdpGBtCl0j_;3pC)RWS$NgdpH?6ADQ8eMT@ zlvU!p1&ES5I(#Ih5}&O$OvbGI<|8Ac{pNArPh`D2%mNyb$vAZncKKplRU6+ka$4M;0*4db75i_QopalqfkdkcbcW_lz27?875F1_zESx1^4zIfrK(T;1>8 z9*^_9HH`@i^NuEFAl;sR0I_EJ{rKK5F^c zalKnW<@@am0oi*bOFct}k6%sr`6Ky)!`ikwii5a1w-;@H4N02_Jmvyk>o+T?cOv?4 zSw4FPHh1~l(%Py3CPx8nsRAGzrL{c*mev@tLX&Vr@Op!bwXJO$O+8SGT0xiE4m6-x zV|#nRGYxYydo6vV=v7t6j} zEw4DgBwtv01@f!f^0P|@zel9m^fK5}xc`@fDTv@?+Dd%;Z14buoG%zDV z1gS<0F&jB+;tJSQn>k;_c?dF@yePuk31>&Sg7eEczmh8*Twlj?HgILLu?3JI$hXV5 z3YIF&*aZI;u3W`)cNjb2huCK~XV-G&I7yLy%I!S&9b7qP z97D`^8SlbT*WJtrF{7U4!Mzs;sW|WAFtFn60aV8Sz#jmAln3z#z#kQWKMMF%Re=7e ze}lhjt^)H%J&oW`F(Zc=AQ9#KGx#HzAHW33pChOrW&l>j_yYbwY{Qj*Vm#+dxPF-# zFCgrr_>Ut{vu**~*yuy3-o_gfk7w=>?C zGv4oHyx+}uzn}3=WV}-u?+-HGS2EtS8SkqZ?+-KHA7{M(mht{9KrR( za7tu2rOGM`BEA7;n_(pbRx{CgD4>LFA&=UZYqgE9Af;~}Ys<9xx)J9eVSm&iBs z!}2=TqX$<&9MkRV=G8q$w^85YuOJo0WT4ZY4H-AiCiAzdcmiWCHLvp`c0BvN(UN?AU&&PWs*|PlnP0O zyOwQf%JgG!0%TEX{FSly>} zt3H)-w7T#vO1xS+S{T9GU4{1+O+Lj@)C#POg@+D2-8spFD#ObGGV4k6Jla(*qUxdTHl5*2;FBV^Mkc zIaa6a!E375T6-tV%P3dGw)Rb=8|35}$QmcZZKvX4R(K_fm>93`(J8=06Hat8pN_Px z15;!|08x0|lz18Nw2|0Ro3fj=TTODSyIb9C_112NO&o^n08zg7xw7artS`lCNfIqs z&n}nxET~^mRp52WegPG5CZG~4D<&f&>mB1$lW}UP zcTM4Wm`>b@Ya2NF#@G}p!l(E&{d-ipdtmfuw~}hN(mh~w-Nx>P8qh(6M$peX#rT+8j8C90;!B9RHTzr$!o1|pcORpy5wFE zl1?V}nfuJ^lQ&r3g#SkKMl+Gz4{}_JLEY?S;iDG$uJE-a4_Mz9RS=+6^Dt@vbfnG) zano7)7N+RE*(-35$*(Z5sfCYEnMr)wpeDtS z+o#NK{P-zz`ufkvLuL4d=)*3PPgjpL z)^pZ6m(CgnvQuX7_=K5qhDp)Y|45-GLJxXF|Kt|t&u(GqC>ij*Kv4JGs!P3U1wQ4TD3n#Tt{z*Pd** zz>+GslIiQeTgKQ2`%2BH8^0$d95TwawQx={b{~d43{5op(d>?Ch%QiI5o2M!bRSvm zrq~`y%meqsi;o&+YO>jn`ABo;qqD&#)8`WyR! zQW031^#J9SdEh?h0kFza-1rcP&D15N18^7@&G06r2T|*>oo2?D+i%2VOXD|#Q&O!)c?UvovK5m zPP3#)y-lS4g-q&gV6YATNJa`@qSWb$bn0!^m*wD#bnhj35*-&U@l`qa84CC&0^9;} zu*?QONTJ`M&=C~m11$V7i;v3j5r&7pD+h0<+v6xBs@R&46GzM=V82~QGvHB1>Sxv@ z$~4lgWj%UDkd~Z3kTI%;Kg8m6hB7%vri+FAIZTY3jeuV)L+O! z6#-zJ4L{Dp@i3;nU&`02)V^S5#i~)o!|~%RbiNGV8KQxs6%A+omR05jR<*ySa2*2fXVy>Mkb)o<*yvv%({*wwNPrrWt+pnK5 zc_Z_`;f?d@{~d3f$Mg7DX=}9iHL*3aEO|1#1%t>VLLcyt@?=QDhx8|eUX>30vj}ao z{!6B1OHjo!@fn&q$uOUWiF52@n6dC}f1EM8e1gez`6N^5@-$OllVQJ4Yrjd_blv1E z{FYGne;uCzt=4ley3=}r6YuS_!T{KMLki#?zK z7XSk&v!{`8@xo;&%=?t_@Mpx9C|n{oSK((I2I#+MC$JsaY`q^3(PLultzww-X!rO5 zN=h@UA1S;asXU5bs27r@i|Nz5om)xOl(n6sy>4dy^kKt0eM9%1%!V#I+sD$`EDFjor^fO^O{!W=Vwx6)?D9|@X z1oa8Lb8s6H`ly}$v!3)@5d754>Hn>hN;(gEPULZ#D)Hk=qFj`+98;PmrnD8Lr1~!G zvZXt*$(FE$(g3NzvETYWonCwjEsog?o2|QWl17IUpF-n?*rych)5@fIMPkGpc~Y4y?&Wuo~;Si^-xC*5?(h#!Y5o3w0lxq9xB%2vd&dIRW~C z=Z?^G_c1lm7?MH~ws-M&Go{Y@f~Txs6#j0tvbHAvS4^#=9DxI|$$CMV#IQ)~1dK4& ziy|7Of@G2Eq#I!)#ldY$Sjz)q4Ybv423Ou`k0TNyN zkBp?&Cl3?WE<~XHL&Kmi;Rw4fmApkgd}O5W&9yx)u!G7ntjWAV1FVaLx(8`n5Q?5q zeQ@+S(o!{7D}ePY5S2Mv4l`L21v4oN9g~>XkgLE1^mLyC(ed8ZIK0-0uG*aP8#__FW66d!2t#*M~0KD zz{yidP1s~%zf~|14p@bgd*ryv>R>oCF}YF0=CugJkD?;OJxFKKcqAkNOR7XF#{n~| zuqtRc^^csf7KfyfSAtkI7}kUZ4ngo+_BA8oXA!q-i2XdH07#rhDf8; z)z-;U$aUhyE`EQev^~mU3uZ`?JBrEy4<6>+6(MI-b^Ct`9^t9UY}IDFCLQhOSlhg5 zH_y>Dnr4+5b=B?ix#Lq)G&0*z2;0O~pI3dk7+_q4Fp;Ie%z1$GT+qHdnxeSiJ6H2{ zp~qY%)R@aFq{Z@*%B5Ay$gQ4Tk9pn^CccN#*q=v3&(LrR%4!ENiKd1JlLPKIq0b3D z7rL7_QcAd{Q$k%z>2B@`ukRZjJ-oW1;kMguTb1k`>Q1c!4sb&(5@~5LL9>9uG`NLP zigElc$&lQmv>5A9Xi&hz>mv`W0kPa+4kpYyc>0|LkZ}WP=Mh0edL^^I03V$Va_ru_ zM6e9rLkkuxmOAGOnjwm@#w`Y_N{4O^u^A1b)S6HS^1=LPcs;Zji=gPS6I@*VW`C+z zps3Ju-pNs3z1meFdh?}?4&^`S06D7=zne?vC_4b{+G!Qk&;$H|(bS&7esFS9wyvt` z4pH0^XNtFf?H<|%-J-#Rp-A??l&!sOuQY`9Ggf}~la2-#sf-;=L1{J5Q!}BqW}jQG z{4LiA?I$Ql4fI2`$n9VG{eyTEP~KYxd;39JSKtEa^Wi%a4L^=6P7!d`Jz?yeMQ zGO#$@NC@IA1=Xq%XbQ3+HbT`&31Qhcy+&qyWvInXkB3&XBByN)d} z48MfUk_Ia+pGsC*9da2~W2}599JyjAmM6;MotlDSN@Gi~7{f9QOEg8rT8PZFJZP-p z{Wx<;5|kpekrXJ({E@=|6|sC$=Q&V9L8R=Lw_pvXTy3qNc%%^7S{o`iTk(W45my+5 zty?C;d02jpoVB{9LgyFYjK;cZaw;UBg5p1JUp+Z#>LGR-*kL0$E8N+wh9b|n=xzAX z{%PCF^qR@=!c&O9dom%{_h_bE{~}}pTDP8*N&I{YXEU;Y9HlrSxYEhQ;zAA zCl~N?Xg2Fu@Flo+q*!<z(8$J%ncq z*C3TUVV)eMpm>m(1yojuSMggrS_noV>n`~5OAXghShzM`$WDdpPMxBZ?y>L5l}}T- zDb`6k*%Hy~PvIh;LXNUEB9g!>(mPwjxB>KB4a?a3SP-)AEU7d}qu)b0LLA-rW%=v! zf`wWU%+z7wjsuetN%2diWYxP!(gKo#m9=^^8sTx0iJb(ppHCt&sliUc^~)b))@e3D z<{i(Hlmb#w@#DUeXM)fjfgm*9b0GY5yUxdPv~hj`-oyF?M2G3l^Ry5EqKm6qKmb`G z+h^#sK*IuDDaUNft)+>jUVFg4B?z-o*=hk^=Ur9I#7*EXFOExF=Q5t9*B3LTiP_Uu z%iWkB^=Dv3z`6npjp5YlnUYv-Qzq;s`Vo5vZ(BReLy8zOFF6%K95N57%tu)SMaw0Z zMev$zxmc6DmG(+ghs;w-X#LG^zf5WFBGHZJCn2=hd?X|~(EKDcPbCuFXg*3LdeXMH z-)i=kpC(_T5nvuuLv77lYN8S6F}3+Dn`q8?E1PK3u1jsxU4rI|8g#yrLXFK&Qlcs6 zE2()am1xBIDb@V6piLP>E$Fd})9uhpE~k??YH#bM_B1=G#tl?bpZjC}QbiHhz5OB* z2@@Haxc)?V0Z=g^k{3W%?Y_4z;!Uiih+X5%V`O2_!!_~!PDi>tQ}Pl!8a2> ze0wGk4DjHGR~wt6p1|wX#@0pzw#C|~u`upcn__K^;Dv8(n|5cP3Yx5T*lsm7O}leF z&Tyj5YI9>W;-x0stKxv92_{|5E#BaLY6~EFh~g~f4ZhyyI|Jugn-gpghH7gx(g>%$ z*xJ97HKAnvPPf#&5~(ZJBZq& zZEny$wY|Bel_=F(^0GS|S)et=E+C^raAQ-NSbau1J*BOsNdvEXm9Me*C;%ds&}kKj zy@1LmFXwCpS77Y5hU~hOPOfa=$|e|cab+77n2W+=u9pp9~jY@Tt+_F&fxTle2dAqgnZycXG$e}3YgHD z8iG%)!T!G%e|7k)N2qog#RLO7lUI^&75N(I87NSxU~G|M;;6n3@EUF4sUvr_a4#3` zTH#(P+z#Qc6YhH9ZWL}@xSNH$MYvZ9cdKx>3wMWbcMA6!;qDgh9^qam+`YoRUbr_1 zHzC~p!o5kjN#XVgw^z8PaQlRNvv6+_?jhk03iq&ZZx!x{aE}Q07|`}Kscwb79@Qf0 z>qu71*ORQ4uaiIz?pu$8MAawg!HspWMAD7*Fht`1^+XTu7xdr(K@T1f^x!#y9y~|T zgXao*a8SmB9z0LbgXal)@ci{e51zk{=)r@69vs?jpa(Ay^xz;W2R%5j5c=h;yTQyu2L5xshy@Cl(WxcZC%|_zMf^ zjL$wSO3ULM2n2CNq)-=HF93XP`R!`=?p)ADactzKzQ%c;L@iz@1@3?gXhOfhD^$@& zNe?CqwZn#DXmFD9tVwOG24M$YD42RvoxoWb>|HNF8yu!$e@2R|0yDtOP#N1tP9uFo zK>zS+d}JXsIO|?t?-84!(Jx9Yv^TQUAhg|Ewr#xT0tFV5tqhOqX0jJT639o=0&nMS z8Yp{}0OmNw*>PlarbvCjuG5l(2Vr}2j2*Y%V1Qs9FrxR#S8vhnx5wel1?j_pcoY(@ zRPX8wYluV=7oD}|(&_>A0}A|*89QmkwV*IPy;(rr1j7pwW=YAcPAm=bMk4nX28gUuj-FPXq)%K$OE27p0zq@_ZD zMVvE06#=;}muq=k&xfWZmkYTJY}o~5vaFVHA5dk>xm@7@%j%_EhVZ3|%ORS`WEdH{ z*s=hYg|4RD#En*?6;`@!+}F+`;Y=DEYNe ze^~(YOW7(KPbi^Sm%;#}T8uGCR$%^1Dl?TfT2koeaSoM~D%&=a4%lHIxeO5%Majt{ z0~v^SY!i)zY!S&oa&5Uto?|Bn^%rT81*OPwx?@!c34v_-&A=FJ)vSLVbt^|bKJkpB^lPYt}{*E6f!$U~De#t3-)xt;AQTVKMf*sdnTbc9c?C{moM9s74!wyo+2UpCwU?UrbdO+YiI7(%5xBGK0 z&#)t5cSPxw)+MKbcUn8w*Kx}+LM6C_r;)d#UXVHY$Zpb$G0i#MBk!Ubv!2M!z@IxsqP0JuT|Pk(3-kT(N|g+jobK7h5c3w`&q=kioGXjDQpuHSqX5*TG!8IW{ll7n4D=|F z+CxN&Ujh7L*a*oicTB^6DSr$`IFLOezELC>mzFFNZkcc^gu6tzONCn{+-1TI33oZB z2~9G5+B#aYYwKyrj)i-A$&TfFddZIEJ1yA>JAhMx1RD$UWtO}IH|#8V%MyNC@~T2U vdgX$LP(+&3GHau36*+=Sl`qa|#b&u}KRR2&juzt#d|6Tl%JhE$aI&Xx7{a|1 literal 0 HcmV?d00001 diff --git a/include/javascript/tiny_mce/plugins/nonbreaking/editor_plugin.js b/include/javascript/tiny_mce/plugins/nonbreaking/editor_plugin.js index 4fce503c..73947355 100644 --- a/include/javascript/tiny_mce/plugins/nonbreaking/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/nonbreaking/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.Nonbreaking',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceNonBreaking',function(){ed.execCommand('mceInsertContent',false,(ed.plugins.visualchars&&ed.plugins.visualchars.state)?'·':' ');});ed.addButton('nonbreaking',{title:'nonbreaking.nonbreaking_desc',cmd:'mceNonBreaking'});if(ed.getParam('nonbreaking_force_tab')){ed.onKeyDown.add(function(ed,e){if(tinymce.isIE&&e.keyCode==9){ed.execCommand('mceNonBreaking');ed.execCommand('mceNonBreaking');ed.execCommand('mceNonBreaking');tinymce.dom.Event.cancel(e);}});}},getInfo:function(){return{longname:'Nonbreaking space',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('nonbreaking',tinymce.plugins.Nonbreaking);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.Nonbreaking",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceNonBreaking",function(){a.execCommand("mceInsertContent",false,(a.plugins.visualchars&&a.plugins.visualchars.state)?' ':" ")});a.addButton("nonbreaking",{title:"nonbreaking.nonbreaking_desc",cmd:"mceNonBreaking"});if(a.getParam("nonbreaking_force_tab")){a.onKeyDown.add(function(d,f){if(tinymce.isIE&&f.keyCode==9){d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");tinymce.dom.Event.cancel(f)}})}},getInfo:function(){return{longname:"Nonbreaking space",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("nonbreaking",tinymce.plugins.Nonbreaking)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/nonbreaking/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/nonbreaking/editor_plugin_src.js index 720971d9..2b4f5ff2 100644 --- a/include/javascript/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/nonbreaking/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -14,7 +17,7 @@ // Register commands ed.addCommand('mceNonBreaking', function() { - ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? '·' : ' '); + ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? ' ' : ' '); }); // Register buttons diff --git a/include/javascript/tiny_mce/plugins/noneditable/editor_plugin.js b/include/javascript/tiny_mce/plugins/noneditable/editor_plugin.js index 8a1b8f07..cc7de784 100644 --- a/include/javascript/tiny_mce/plugins/noneditable/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/noneditable/editor_plugin.js @@ -1 +1 @@ -(function(){var Event=tinymce.dom.Event;tinymce.create('tinymce.plugins.NonEditablePlugin',{init:function(ed,url){var t=this,editClass,nonEditClass;t.editor=ed;editClass=ed.getParam("noneditable_editable_class","mceEditable");nonEditClass=ed.getParam("noneditable_noneditable_class","mceNonEditable");ed.onNodeChange.addToTop(function(ed,cm,n){var sc,ec;sc=ed.dom.getParent(ed.selection.getStart(),function(n){return ed.dom.hasClass(n,nonEditClass);});ec=ed.dom.getParent(ed.selection.getEnd(),function(n){return ed.dom.hasClass(n,nonEditClass);});if(sc||ec){t._setDisabled(1);return false;}else t._setDisabled(0);});},getInfo:function(){return{longname:'Non editable elements',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_block:function(ed,e){var k=e.keyCode;if((k>32&&k<41)||(k>111&&k<124))return;return Event.cancel(e);},_setDisabled:function(s){var t=this,ed=t.editor;tinymce.each(ed.controlManager.controls,function(c){c.setDisabled(s);});if(s!==t.disabled){if(s){ed.onKeyDown.addToTop(t._block);ed.onKeyPress.addToTop(t._block);ed.onKeyUp.addToTop(t._block);ed.onPaste.addToTop(t._block);}else{ed.onKeyDown.remove(t._block);ed.onKeyPress.remove(t._block);ed.onKeyUp.remove(t._block);ed.onPaste.remove(t._block);}t.disabled=s;}}});tinymce.PluginManager.add('noneditable',tinymce.plugins.NonEditablePlugin);})(); \ No newline at end of file +(function(){var a=tinymce.dom.Event;tinymce.create("tinymce.plugins.NonEditablePlugin",{init:function(d,e){var f=this,c,b;f.editor=d;c=d.getParam("noneditable_editable_class","mceEditable");b=d.getParam("noneditable_noneditable_class","mceNonEditable");d.onNodeChange.addToTop(function(h,g,k){var j,i;j=h.dom.getParent(h.selection.getStart(),function(l){return h.dom.hasClass(l,b)});i=h.dom.getParent(h.selection.getEnd(),function(l){return h.dom.hasClass(l,b)});if(j||i){f._setDisabled(1);return false}else{f._setDisabled(0)}})},getInfo:function(){return{longname:"Non editable elements",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_block:function(c,d){var b=d.keyCode;if((b>32&&b<41)||(b>111&&b<124)){return}return a.cancel(d)},_setDisabled:function(d){var c=this,b=c.editor;tinymce.each(b.controlManager.controls,function(e){e.setDisabled(d)});if(d!==c.disabled){if(d){b.onKeyDown.addToTop(c._block);b.onKeyPress.addToTop(c._block);b.onKeyUp.addToTop(c._block);b.onPaste.addToTop(c._block);b.onContextMenu.addToTop(c._block)}else{b.onKeyDown.remove(c._block);b.onKeyPress.remove(c._block);b.onKeyUp.remove(c._block);b.onPaste.remove(c._block);b.onContextMenu.remove(c._block)}c.disabled=d}}});tinymce.PluginManager.add("noneditable",tinymce.plugins.NonEditablePlugin)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/noneditable/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/noneditable/editor_plugin_src.js index 9176f47b..d6d1d91b 100644 --- a/include/javascript/tiny_mce/plugins/noneditable/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/noneditable/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -70,11 +73,13 @@ ed.onKeyPress.addToTop(t._block); ed.onKeyUp.addToTop(t._block); ed.onPaste.addToTop(t._block); + ed.onContextMenu.addToTop(t._block); } else { ed.onKeyDown.remove(t._block); ed.onKeyPress.remove(t._block); ed.onKeyUp.remove(t._block); ed.onPaste.remove(t._block); + ed.onContextMenu.remove(t._block); } t.disabled = s; diff --git a/include/javascript/tiny_mce/plugins/pagebreak/css/content.css b/include/javascript/tiny_mce/plugins/pagebreak/css/content.css deleted file mode 100644 index c949d58c..00000000 --- a/include/javascript/tiny_mce/plugins/pagebreak/css/content.css +++ /dev/null @@ -1 +0,0 @@ -.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../img/pagebreak.gif) no-repeat center top;} diff --git a/include/javascript/tiny_mce/plugins/pagebreak/editor_plugin.js b/include/javascript/tiny_mce/plugins/pagebreak/editor_plugin.js index 177ea95b..35085e8a 100644 --- a/include/javascript/tiny_mce/plugins/pagebreak/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/pagebreak/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.PageBreakPlugin',{init:function(ed,url){var pb='',cls='mcePageBreak',sep=ed.getParam('pagebreak_separator',''),pbRE;pbRE=new RegExp(sep.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(a){return'\\'+a;}),'g');ed.addCommand('mcePageBreak',function(){ed.execCommand('mceInsertContent',0,pb);});ed.addButton('pagebreak',{title:'pagebreak.desc',cmd:cls});ed.onInit.add(function(){if(ed.settings.content_css!==false)ed.dom.loadCSS(url+"/css/content.css");if(ed.theme.onResolveName){ed.theme.onResolveName.add(function(th,o){if(o.node.nodeName=='IMG'&&ed.dom.hasClass(o.node,cls))o.name='pagebreak';});}});ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName==='IMG'&&ed.dom.hasClass(e,cls))ed.selection.select(e);});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('pagebreak',n.nodeName==='IMG'&&ed.dom.hasClass(n,cls));});ed.onBeforeSetContent.add(function(ed,o){o.content=o.content.replace(pbRE,pb);});ed.onPostProcess.add(function(ed,o){if(o.get)o.content=o.content.replace(/]+>/g,function(im){if(im.indexOf('class="mcePageBreak')!==-1)im=sep;return im;});});},getInfo:function(){return{longname:'PageBreak',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('pagebreak',tinymce.plugins.PageBreakPlugin);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.PageBreakPlugin",{init:function(b,d){var f='',a="mcePageBreak",c=b.getParam("pagebreak_separator",""),e;e=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(g){return"\\"+g}),"g");b.addCommand("mcePageBreak",function(){b.execCommand("mceInsertContent",0,f)});b.addButton("pagebreak",{title:"pagebreak.desc",cmd:a});b.onInit.add(function(){if(b.theme.onResolveName){b.theme.onResolveName.add(function(g,h){if(h.node.nodeName=="IMG"&&b.dom.hasClass(h.node,a)){h.name="pagebreak"}})}});b.onClick.add(function(g,h){h=h.target;if(h.nodeName==="IMG"&&g.dom.hasClass(h,a)){g.selection.select(h)}});b.onNodeChange.add(function(h,g,i){g.setActive("pagebreak",i.nodeName==="IMG"&&h.dom.hasClass(i,a))});b.onBeforeSetContent.add(function(g,h){h.content=h.content.replace(e,f)});b.onPostProcess.add(function(g,h){if(h.get){h.content=h.content.replace(/]+>/g,function(i){if(i.indexOf('class="mcePageBreak')!==-1){i=c}return i})}})},getInfo:function(){return{longname:"PageBreak",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("pagebreak",tinymce.plugins.PageBreakPlugin)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/pagebreak/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/pagebreak/editor_plugin_src.js index 3d97a5d7..fc3b3b4a 100644 --- a/include/javascript/tiny_mce/plugins/pagebreak/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/pagebreak/editor_plugin_src.js @@ -1,14 +1,17 @@ /** - + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { tinymce.create('tinymce.plugins.PageBreakPlugin', { init : function(ed, url) { - var pb = '', cls = 'mcePageBreak', sep = ed.getParam('pagebreak_separator', ''), pbRE; + var pb = '', cls = 'mcePageBreak', sep = ed.getParam('pagebreak_separator', ''), pbRE; pbRE = new RegExp(sep.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function(a) {return '\\' + a;}), 'g'); @@ -21,9 +24,6 @@ ed.addButton('pagebreak', {title : 'pagebreak.desc', cmd : cls}); ed.onInit.add(function() { - if (ed.settings.content_css !== false) - ed.dom.loadCSS(url + "/css/content.css"); - if (ed.theme.onResolveName) { ed.theme.onResolveName.add(function(th, o) { if (o.node.nodeName == 'IMG' && ed.dom.hasClass(o.node, cls)) diff --git a/include/javascript/tiny_mce/plugins/pagebreak/img/trans.gif b/include/javascript/tiny_mce/plugins/pagebreak/img/trans.gif deleted file mode 100644 index 388486517fa8da13ebd150e8f65d5096c3e10c3a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43 ncmZ?wbhEHbWMp7un7{x9ia%KxMSyG_5FaGNz{KRj$Y2csb)f_x diff --git a/include/javascript/tiny_mce/plugins/paste/blank.htm b/include/javascript/tiny_mce/plugins/paste/blank.htm deleted file mode 100644 index f841206c..00000000 --- a/include/javascript/tiny_mce/plugins/paste/blank.htm +++ /dev/null @@ -1,22 +0,0 @@ - - -blank_page - - - - - - - - - diff --git a/include/javascript/tiny_mce/plugins/paste/css/blank.css b/include/javascript/tiny_mce/plugins/paste/css/blank.css deleted file mode 100644 index f1ab1133..00000000 --- a/include/javascript/tiny_mce/plugins/paste/css/blank.css +++ /dev/null @@ -1,14 +0,0 @@ -html, body {height:98%} -body { -background-color: #FFFFFF; -font-family: Verdana, Arial, Helvetica, sans-serif; -font-size: 10px; -scrollbar-3dlight-color: #F0F0EE; -scrollbar-arrow-color: #676662; -scrollbar-base-color: #F0F0EE; -scrollbar-darkshadow-color: #DDDDDD; -scrollbar-face-color: #E0E0DD; -scrollbar-highlight-color: #F0F0EE; -scrollbar-shadow-color: #F0F0EE; -scrollbar-track-color: #F5F5F5; -} diff --git a/include/javascript/tiny_mce/plugins/paste/css/pasteword.css b/include/javascript/tiny_mce/plugins/paste/css/pasteword.css deleted file mode 100644 index 77685fd2..00000000 --- a/include/javascript/tiny_mce/plugins/paste/css/pasteword.css +++ /dev/null @@ -1,3 +0,0 @@ -.sourceIframe { - border: 1px solid #808080; -} diff --git a/include/javascript/tiny_mce/plugins/paste/editor_plugin.js b/include/javascript/tiny_mce/plugins/paste/editor_plugin.js index eeeebd5b..6c65069f 100644 --- a/include/javascript/tiny_mce/plugins/paste/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/paste/editor_plugin.js @@ -1 +1 @@ -(function(){var Event=tinymce.dom.Event;tinymce.create('tinymce.plugins.PastePlugin',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mcePasteText',function(ui,v){if(ui){if((ed.getParam('paste_use_dialog',true))||(!tinymce.isIE)){ed.windowManager.open({file:url+'/pastetext.htm',width:450,height:400,inline:1},{plugin_url:url});}else t._insertText(clipboardData.getData("Text"),true);}else t._insertText(v.html,v.linebreaks);});ed.addCommand('mcePasteWord',function(ui,v){if(ui){if((ed.getParam('paste_use_dialog',true))||(!tinymce.isIE)){ed.windowManager.open({file:url+'/pasteword.htm',width:450,height:400,inline:1},{plugin_url:url});}else t._insertText(t._clipboardHTML());}else t._insertWordContent(v);});ed.addCommand('mceSelectAll',function(){ed.execCommand('selectall');});ed.addButton('pastetext',{title:'paste.paste_text_desc',cmd:'mcePasteText',ui:true});ed.addButton('pasteword',{title:'paste.paste_word_desc',cmd:'mcePasteWord',ui:true});ed.addButton('selectall',{title:'paste.selectall_desc',cmd:'mceSelectAll'});if(ed.getParam("paste_auto_cleanup_on_paste",false)){ed.onPaste.add(function(ed,e){return t._handlePasteEvent(e)});}if(!tinymce.isIE&&ed.getParam("paste_auto_cleanup_on_paste",false)){ed.onKeyDown.add(function(ed,e){if(e.ctrlKey&&e.keyCode==86){window.setTimeout(function(){ed.execCommand("mcePasteText",true);},1);Event.cancel(e);}});}},getInfo:function(){return{longname:'Paste text/word',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_handlePasteEvent:function(e){var html=this._clipboardHTML(),ed=this.editor,sel=ed.selection,r;if(ed&&(r=sel.getRng())&&r.text.length>0)ed.execCommand('delete');if(html&&html.length>0)ed.execCommand('mcePasteWord',false,html);return Event.cancel(e);},_insertText:function(content,bLinebreaks){content=this.editor.dom.encode(content);if(content&&content.length>0){if(!this.editor.selection.isCollapsed())this.editor.execCommand("Delete");if(bLinebreaks){if(this.editor.getParam("paste_create_paragraphs",true)){var rl=this.editor.getParam("paste_replace_list",'\u2122,TM,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i

    ');content=content.replace(/\r\r/g,'

    ');content=content.replace(/\n\n/g,'

    ');if((pos=content.indexOf('

    '))!=-1){this.editor.execCommand("Delete");var node=this.editor.selection.getNode();var breakElms=[];do{if(node.nodeType==1){if(node.nodeName=="TD"||node.nodeName=="BODY")break;breakElms[breakElms.length]=node;}}while(node=node.parentNode);var before="",after="

    ";before+=content.substring(0,pos);for(var i=0;i";after+="<"+breakElms[(breakElms.length-1)-i].nodeName+">";}before+="

    ";content=before+content.substring(pos+7)+after;}}if(this.editor.getParam("paste_create_linebreaks",true)){content=content.replace(/\r\n/g,'
    ');content=content.replace(/\r/g,'
    ');content=content.replace(/\n/g,'
    ');}}this.editor.execCommand("mceInsertRawHTML",false,content);}},_insertWordContent:function(content){var t=this,ed=t.editor;if(content&&content.length>0){var bull=String.fromCharCode(8226);var middot=String.fromCharCode(183);if(ed.getParam('paste_insert_word_content_callback'))content=ed.execCallback('paste_insert_word_content_callback','before',content);var rl=ed.getParam("paste_replace_list",'\u2122,TM,\u2026,...,\x93|\x94|\u201c|\u201d,",\x60|\x91|\x92|\u2018|\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i(.*?)<\/p>','gi'),'

    $1

    ');}content=content.replace(new RegExp('tab-stops: list [0-9]+.0pt">','gi'),'">'+"--list--");content=content.replace(new RegExp(bull+"(.*?)
    ","gi"),"

    "+middot+"$1

    ");content=content.replace(new RegExp('','gi'),""+bull);content=content.replace(/<\/o:p>/gi,"");content=content.replace(new RegExp('
    ]+>/g,"");if(this.editor.getParam("paste_remove_spans",true))content=content.replace(/<\/?span[^>]*>/gi,"");if(this.editor.getParam("paste_remove_styles",true))content=content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)','gi'),"<$1$3");content=content.replace(/<\/?font[^>]*>/gi,"");switch(this.editor.getParam("paste_strip_class_attributes","all")){case"all":content=content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");break;case"mso":content=content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)','gi'),"<$1$3");break;}content=content.replace(new RegExp('href="?'+this._reEscape(""+document.location)+'','gi'),'href="'+this.editor.documentBaseURI.getURI());content=content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");content=content.replace(/<\\?\?xml[^>]*>/gi,"");content=content.replace(/<\/?\w+:[^>]*>/gi,"");content=content.replace(/-- page break --\s*

     <\/p>/gi,"");content=content.replace(/-- page break --/gi,"");if(!this.editor.getParam('force_p_newlines')){content=content.replace('','','gi');content=content.replace('

    ','

    ','gi');}if(!tinymce.isIE&&!this.editor.getParam('force_p_newlines')){content=content.replace(/<\/?p[^>]*>/gi,"");}content=content.replace(/<\/?div[^>]*>/gi,"");if(this.editor.getParam("paste_convert_middot_lists",true)){var div=ed.dom.create("div",null,content);var className=this.editor.getParam("paste_unindented_list_class","unIndentedList");while(this._convertMiddots(div,"--list--"));while(this._convertMiddots(div,middot,className));while(this._convertMiddots(div,bull));content=div.innerHTML;}if(this.editor.getParam("paste_convert_headers_to_strong",false)){content=content.replace(/ <\/h[1-6]>/gi,'

      

    ');content=content.replace(//gi,'

    ');content=content.replace(/<\/h[1-6]>/gi,'

    ');content=content.replace(/ <\/b>/gi,'  ');content=content.replace(/^( )*/gi,'');}content=content.replace(/--list--/gi,"");if(ed.getParam('paste_insert_word_content_callback'))content=ed.execCallback('paste_insert_word_content_callback','after',content);this.editor.execCommand("mceInsertContent",false,content);if(this.editor.getParam('paste_force_cleanup_wordpaste',true)){var ed=this.editor;window.setTimeout(function(){ed.execCommand("mceCleanup");},1);}}},_reEscape:function(s){var l="?.\\*[](){}+^$:";var o="";for(var i=0;i")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort().y}o.setStyles(l,{position:"absolute",left:-10000,top:i,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="
    "+o.encode(r).replace(/\r?\n/g,"
    ")+"
    "}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}if(tinymce.isIE&&document.documentMode>=9){d([[/(?:
     [\s\r\n]+|
    )*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:
     [\s\r\n]+|
    )*/g,"$1"]])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*( )+/gi,/( |]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/

    ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"

    $1

    ")}if(b(k,"paste_convert_middot_lists")){d([[//gi,"$&__MCE_ITEM__"],[/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/"/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/]*>/gi,"

    "],[/<\/h[1-6][^>]*>/gi,"

    "]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(e.settings.paste_enable_default_filters==false){return}if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f]*>/gi,"");if(s=="ul"&&/^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(p)){i.remove(v)}else{if(/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(j,x,v){var t,u,l,k,r,e,p,f,n=j.getWin(),z=j.getDoc(),s=j.selection,m=tinymce.is,y=tinymce.inArray,g=b(j,"paste_text_linebreaktype"),o=b(j,"paste_text_replacements");function q(d){c(d,function(h){if(h.constructor==RegExp){v=v.replace(h,"")}else{v=v.replace(h[0],h[1])}})}if((typeof(v)==="string")&&(v.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(v)){q([/[\n\r]+/g])}else{q([/\r+/g])}q([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"],[/\n{3,}/g,"\n\n"],/^\s+|\s+$/g]);v=x.decode(tinymce.html.Entities.encodeRaw(v));if(!s.isCollapsed()){z.execCommand("Delete",false,null)}if(m(o,"array")||(m(o,"array"))){q(o)}else{if(m(o,"string")){q(new RegExp(o,"gi"))}}if(g=="none"){q([[/\n+/g," "]])}else{if(g=="br"){q([[/\n/g,"
    "]])}else{q([/^\s+|\s+$/g,[/\n\n/g,"

    "],[/\n/g,"
    "]])}}if((l=v.indexOf("

    "))!=-1){k=v.lastIndexOf("

    ");r=s.getNode();e=[];do{if(r.nodeType==1){if(r.nodeName=="TD"||r.nodeName=="BODY"){break}e[e.length]=r}}while(r=r.parentNode);if(e.length>0){p=v.substring(0,l);f="";for(t=0,u=e.length;t";f+="<"+e[e.length-t-1].nodeName.toLowerCase()+">"}if(l==k){v=p+f+v.substring(l+7)}else{v=p+v.substring(l+4,k+4)+f+v.substring(k+7)}}}j.execCommand("mceInsertRawHTML",false,v+' ');window.setTimeout(function(){var d=x.get("_plain_text_marker"),A,h,w,i;s.select(d,false);z.execCommand("Delete",false,null);d=null;A=s.getStart();h=x.getViewPort(n);w=x.getPos(A).y;i=A.clientHeight;if((wh.y+h.h)){z.body.scrollTop=w

    ' + dom.encode(textContent).replace(/\r?\n/g, '
    ') + '
    '; + } + + // Remove the nodes + each(dom.select('div.mcePaste'), function(n) { + dom.remove(n); + }); + + // Restore the old selection + if (or) + sel.setRng(or); + + process({content : h}); + + // Unblock events ones we got the contents + dom.unbind(ed.getDoc(), 'mousedown', block); + dom.unbind(ed.getDoc(), 'keydown', block); + }, 0); + } } + + // Check if we should use the new auto process method + if (getParam(ed, "paste_auto_cleanup_on_paste")) { + // Is it's Opera or older FF use key handler + if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) { + ed.onKeyDown.addToTop(function(ed, e) { + if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45)) + grabContent(e); + }); + } else { + // Grab contents on paste event on Gecko and WebKit + ed.onPaste.addToTop(function(ed, e) { + return grabContent(e); + }); + } + } + + ed.onInit.add(function() { + ed.controlManager.setActive("pastetext", ed.pasteAsPlainText); + + // Block all drag/drop events + if (getParam(ed, "paste_block_drop")) { + ed.dom.bind(ed.getBody(), ['dragend', 'dragover', 'draggesture', 'dragdrop', 'drop', 'drag'], function(e) { + e.preventDefault(); + e.stopPropagation(); + + return false; + }); + } + }); + + // Add legacy support + t._legacySupport(); }, getInfo : function() { @@ -88,307 +334,600 @@ }; }, - // Private methods + _preProcess : function(pl, o) { + var ed = this.editor, + h = o.content, + grep = tinymce.grep, + explode = tinymce.explode, + trim = tinymce.trim, + len, stripClass; + + //console.log('Before preprocess:' + o.content); + + function process(items) { + each(items, function(v) { + // Remove or replace + if (v.constructor == RegExp) + h = h.replace(v, ''); + else + h = h.replace(v[0], v[1]); + }); + } + + if (ed.settings.paste_enable_default_filters == false) { + return; + } - _handlePasteEvent : function(e) { - var html = this._clipboardHTML(), ed = this.editor, sel = ed.selection, r; + // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser + if (tinymce.isIE && document.documentMode >= 9) + process([[/(?:
     [\s\r\n]+|
    )*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:
     [\s\r\n]+|
    )*/g, '$1']]); - // Removes italic, strong etc, the if was needed due to bug #1437114 - if (ed && (r = sel.getRng()) && r.text.length > 0) - ed.execCommand('delete'); + // Detect Word content and process it more aggressive + if (/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(h) || o.wordContent) { + o.wordContent = true; // Mark the pasted contents as word specific content + //console.log('Word contents detected.'); - if (html && html.length > 0) - ed.execCommand('mcePasteWord', false, html); + // Process away some basic content + process([ + /^\s*( )+/gi, //   entities at the start of contents + /( |]*>)+\s*$/gi //   entities at the end of contents + ]); - return Event.cancel(e); - }, + if (getParam(ed, "paste_convert_headers_to_strong")) { + h = h.replace(/

    ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, "

    $1

    "); + } - _insertText : function(content, bLinebreaks) { - content = this.editor.dom.encode(content); + if (getParam(ed, "paste_convert_middot_lists")) { + process([ + [//gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker + [/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi, '$1__MCE_ITEM__'], // Convert mso-list and symbol spans to item markers + [/(]+(?:MsoListParagraph)[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list and symbol paragraphs to item markers (FF) + ]); + } - if (content && content.length > 0) { - // Delete any highlighted text before pasting - if (!this.editor.selection.isCollapsed()) - this.editor.execCommand("Delete"); - - if (bLinebreaks) { - // Special paragraph treatment - if (this.editor.getParam("paste_create_paragraphs", true)) { - var rl = this.editor.getParam("paste_replace_list", '\u2122,TM,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(','); - for (var i=0; i

    '); - content = content.replace(/\r\r/g, '

    '); - content = content.replace(/\n\n/g, '

    '); - - // Has paragraphs - if ((pos = content.indexOf('

    ')) != -1) { - this.editor.execCommand("Delete"); - - var node = this.editor.selection.getNode(); - - // Get list of elements to break - var breakElms = []; - - do { - if (node.nodeType == 1) { - // Don't break tables and break at body - if (node.nodeName == "TD" || node.nodeName == "BODY") - break; - - breakElms[breakElms.length] = node; - } - } while(node = node.parentNode); - - var before = "", after = "

    "; - before += content.substring(0, pos); - - for (var i=0; i"; - after += "<" + breakElms[(breakElms.length-1)-i].nodeName + ">"; - } - - before += "

    "; - content = before + content.substring(pos+7) + after; - } - } - - if (this.editor.getParam("paste_create_linebreaks", true)) { - content = content.replace(/\r\n/g, '
    '); - content = content.replace(/\r/g, '
    '); - content = content.replace(/\n/g, '
    '); - } - } + process([ + // Word comments like conditional comments etc + //gi, + + // Remove comments, scripts (e.g., msoShowComment), XML tag, VML content, MS Office namespaced tags, and a few other tags + /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi, + + // Convert into for line-though + [/<(\/?)s>/gi, "<$1strike>"], + + // Replace nsbp entites to char since it's easier to handle + [/ /gi, "\u00a0"] + ]); + + // Remove bad attributes, with or without quotes, ensuring that attribute text is really inside a tag. + // If JavaScript had a RegExp look-behind, we could have integrated this with the last process() array and got rid of the loop. But alas, it does not, so we cannot. + do { + len = h.length; + h = h.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1"); + } while (len != h.length); + + // Remove all spans if no styles is to be retained + if (getParam(ed, "paste_retain_style_properties").replace(/^none$/i, "").length == 0) { + h = h.replace(/<\/?span[^>]*>/gi, ""); + } else { + // We're keeping styles, so at least clean them up. + // CSS Reference: http://msdn.microsoft.com/en-us/library/aa155477.aspx + + process([ + // Convert ___ to string of alternating breaking/non-breaking spaces of same length + [/([\s\u00a0]*)<\/span>/gi, + function(str, spaces) { + return (spaces.length > 0)? spaces.replace(/./, " ").slice(Math.floor(spaces.length/2)).split("").join("\u00a0") : ""; + } + ], + + // Examine all styles: delete junk, transform some, and keep the rest + [/(<[a-z][^>]*)\sstyle="([^"]*)"/gi, + function(str, tag, style) { + var n = [], + i = 0, + s = explode(trim(style).replace(/"/gi, "'"), ";"); + + // Examine each style definition within the tag's style attribute + each(s, function(v) { + var name, value, + parts = explode(v, ":"); + + function ensureUnits(v) { + return v + ((v !== "0") && (/\d$/.test(v)))? "px" : ""; + } + + if (parts.length == 2) { + name = parts[0].toLowerCase(); + value = parts[1].toLowerCase(); + + // Translate certain MS Office styles into their CSS equivalents + switch (name) { + case "mso-padding-alt": + case "mso-padding-top-alt": + case "mso-padding-right-alt": + case "mso-padding-bottom-alt": + case "mso-padding-left-alt": + case "mso-margin-alt": + case "mso-margin-top-alt": + case "mso-margin-right-alt": + case "mso-margin-bottom-alt": + case "mso-margin-left-alt": + case "mso-table-layout-alt": + case "mso-height": + case "mso-width": + case "mso-vertical-align-alt": + n[i++] = name.replace(/^mso-|-alt$/g, "") + ":" + ensureUnits(value); + return; + + case "horiz-align": + n[i++] = "text-align:" + value; + return; + + case "vert-align": + n[i++] = "vertical-align:" + value; + return; + + case "font-color": + case "mso-foreground": + n[i++] = "color:" + value; + return; + + case "mso-background": + case "mso-highlight": + n[i++] = "background:" + value; + return; + + case "mso-default-height": + n[i++] = "min-height:" + ensureUnits(value); + return; + + case "mso-default-width": + n[i++] = "min-width:" + ensureUnits(value); + return; + + case "mso-padding-between-alt": + n[i++] = "border-collapse:separate;border-spacing:" + ensureUnits(value); + return; + + case "text-line-through": + if ((value == "single") || (value == "double")) { + n[i++] = "text-decoration:line-through"; + } + return; + + case "mso-zero-height": + if (value == "yes") { + n[i++] = "display:none"; + } + return; + } + + // Eliminate all MS Office style definitions that have no CSS equivalent by examining the first characters in the name + if (/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(name)) { + return; + } + + // If it reached this point, it must be a valid CSS style + n[i++] = name + ":" + parts[1]; // Lower-case name, but keep value case + } + }); - this.editor.execCommand("mceInsertRawHTML", false, content); + // If style attribute contained any valid styles the re-write it; otherwise delete style attribute. + if (i > 0) { + return tag + ' style="' + n.join(';') + '"'; + } else { + return tag; + } + } + ] + ]); + } } - }, - _insertWordContent : function(content) { - var t = this, ed = t.editor; + // Replace headers with + if (getParam(ed, "paste_convert_headers_to_strong")) { + process([ + [/]*>/gi, "

    "], + [/<\/h[1-6][^>]*>/gi, "

    "] + ]); + } - if (content && content.length > 0) { - // Cleanup Word content - var bull = String.fromCharCode(8226); - var middot = String.fromCharCode(183); + process([ + // Copy paste from Java like Open Office will produce this junk on FF + [/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi, ''] + ]); - if (ed.getParam('paste_insert_word_content_callback')) - content = ed.execCallback('paste_insert_word_content_callback', 'before', content); + // Class attribute options are: leave all as-is ("none"), remove all ("all"), or remove only those starting with mso ("mso"). + // Note:- paste_strip_class_attributes: "none", verify_css_classes: true is also a good variation. + stripClass = getParam(ed, "paste_strip_class_attributes"); - var rl = ed.getParam("paste_replace_list", '\u2122,TM,\u2026,...,\x93|\x94|\u201c|\u201d,",\x60|\x91|\x92|\u2018|\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(','); - for (var i=0; i(.*?)<\/p>', 'gi'), '

    $1

    '); - } + var cls = grep(explode(g1.replace(/^(["'])(.*)\1$/, "$2"), " "), + function(v) { + return (/^(?!mso)/i.test(v)); + } + ); + + return cls.length ? ' class="' + cls.join(" ") + '"' : ''; + }; - content = content.replace(new RegExp('tab-stops: list [0-9]+.0pt">', 'gi'), '">' + "--list--"); - content = content.replace(new RegExp(bull + "(.*?)
    ", "gi"), "

    " + middot + "$1

    "); - content = content.replace(new RegExp('', 'gi'), "" + bull); // Covert to bull list - content = content.replace(/<\/o:p>/gi, ""); - content = content.replace(new RegExp('
    ]+>/g, ""); // Header elements + h = h.replace(/ class="([^"]+)"/gi, removeClasses); + h = h.replace(/ class=([\-\w]+)/gi, removeClasses); + } - if (this.editor.getParam("paste_remove_spans", true)) - content = content.replace(/<\/?span[^>]*>/gi, ""); + // Remove spans option + if (getParam(ed, "paste_remove_spans")) { + h = h.replace(/<\/?span[^>]*>/gi, ""); + } - if (this.editor.getParam("paste_remove_styles", true)) - content = content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)', 'gi'), "<$1$3"); + //console.log('After preprocess:' + h); - content = content.replace(/<\/?font[^>]*>/gi, ""); + o.content = h; + }, - // Strips class attributes. - switch (this.editor.getParam("paste_strip_class_attributes", "all")) { - case "all": - content = content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3"); - break; + /** + * Various post process items. + */ + _postProcess : function(pl, o) { + var t = this, ed = t.editor, dom = ed.dom, styleProps; + + if (ed.settings.paste_enable_default_filters == false) { + return; + } + + if (o.wordContent) { + // Remove named anchors or TOC links + each(dom.select('a', o.node), function(a) { + if (!a.href || a.href.indexOf('#_Toc') != -1) + dom.remove(a, 1); + }); - case "mso": - content = content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)', 'gi'), "<$1$3"); - break; + if (getParam(ed, "paste_convert_middot_lists")) { + t._convertLists(pl, o); } - content = content.replace(new RegExp('href="?' + this._reEscape("" + document.location) + '', 'gi'), 'href="' + this.editor.documentBaseURI.getURI()); - content = content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3"); - content = content.replace(/<\\?\?xml[^>]*>/gi, ""); - content = content.replace(/<\/?\w+:[^>]*>/gi, ""); - content = content.replace(/-- page break --\s*

     <\/p>/gi, ""); // Remove pagebreaks - content = content.replace(/-- page break --/gi, ""); // Remove pagebreaks + // Process styles + styleProps = getParam(ed, "paste_retain_style_properties"); // retained properties + + // Process only if a string was specified and not equal to "all" or "*" + if ((tinymce.is(styleProps, "string")) && (styleProps !== "all") && (styleProps !== "*")) { + styleProps = tinymce.explode(styleProps.replace(/^none$/i, "")); + + // Retains some style properties + each(dom.select('*', o.node), function(el) { + var newStyle = {}, npc = 0, i, sp, sv; + + // Store a subset of the existing styles + if (styleProps) { + for (i = 0; i < styleProps.length; i++) { + sp = styleProps[i]; + sv = dom.getStyle(el, sp); - // content = content.replace(/\/? */gi, "");   - // content = content.replace(/

     <\/p>/gi, ''); + if (sv) { + newStyle[sp] = sv; + npc++; + } + } + } - if (!this.editor.getParam('force_p_newlines')) { - content = content.replace('', '' ,'gi'); - content = content.replace('

    ', '

    ' ,'gi'); + // Remove all of the existing styles + dom.setAttrib(el, 'style', ''); + + if (styleProps && npc > 0) + dom.setStyles(el, newStyle); // Add back the stored subset of styles + else // Remove empty span tags that do not have class attributes + if (el.nodeName == 'SPAN' && !el.className) + dom.remove(el, true); + }); } + } - if (!tinymce.isIE && !this.editor.getParam('force_p_newlines')) { - content = content.replace(/<\/?p[^>]*>/gi, ""); + // Remove all style information or only specifically on WebKit to avoid the style bug on that browser + if (getParam(ed, "paste_remove_styles") || (getParam(ed, "paste_remove_styles_if_webkit") && tinymce.isWebKit)) { + each(dom.select('*[style]', o.node), function(el) { + el.removeAttribute('style'); + el.removeAttribute('data-mce-style'); + }); + } else { + if (tinymce.isWebKit) { + // We need to compress the styles on WebKit since if you paste it will become + // Removing the mce_style that contains the real value will force the Serializer engine to compress the styles + each(dom.select('*', o.node), function(el) { + el.removeAttribute('data-mce-style'); + }); } + } + }, + + /** + * Converts the most common bullet and number formats in Office into a real semantic UL/LI list. + */ + _convertLists : function(pl, o) { + var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html; + + // Convert middot lists into real semantic lists + each(dom.select('p', o.node), function(p) { + var sib, val = '', type, html, idx, parents; + + // Get text node value at beginning of paragraph + for (sib = p.firstChild; sib && sib.nodeType == 3; sib = sib.nextSibling) + val += sib.nodeValue; + + val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/ /g, '\u00a0'); + + // Detect unordered lists look for bullets + if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(val)) + type = 'ul'; + + // Detect ordered lists 1., a. or ixv. + if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(val)) + type = 'ol'; + + // Check if node value matches the list pattern: o   + if (type) { + margin = parseFloat(p.style.marginLeft || 0); + + if (margin > lastMargin) + levels.push(margin); + + if (!listElm || type != lastType) { + listElm = dom.create(type); + dom.insertAfter(listElm, p); + } else { + // Nested list element + if (margin > lastMargin) { + listElm = li.appendChild(dom.create(type)); + } else if (margin < lastMargin) { + // Find parent level based on margin value + idx = tinymce.inArray(levels, margin); + parents = dom.getParents(listElm.parentNode, type); + listElm = parents[parents.length - 1 - idx] || listElm; + } + } - content = content.replace(/<\/?div[^>]*>/gi, ""); + // Remove middot or number spans if they exists + each(dom.select('span', p), function(span) { + var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, ''); - // Convert all middlot lists to UL lists - if (this.editor.getParam("paste_convert_middot_lists", true)) { - var div = ed.dom.create("div", null, content); + // Remove span with the middot or the number + if (type == 'ul' && /^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(html)) + dom.remove(span); + else if (/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(html)) + dom.remove(span); + }); - // Convert all middot paragraphs to li elements - var className = this.editor.getParam("paste_unindented_list_class", "unIndentedList"); + html = p.innerHTML; - while (this._convertMiddots(div, "--list--")) ; // bull - while (this._convertMiddots(div, middot, className)) ; // Middot - while (this._convertMiddots(div, bull)) ; // bull + // Remove middot/list items + if (type == 'ul') + html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/, ''); + else + html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.( |\u00a0)+\s*/, ''); - content = div.innerHTML; - } + // Create li and add paragraph data into the new li + li = listElm.appendChild(dom.create('li', 0, html)); + dom.remove(p); - // Replace all headers with strong and fix some other issues - if (this.editor.getParam("paste_convert_headers_to_strong", false)) { - content = content.replace(/ <\/h[1-6]>/gi, '

      

    '); - content = content.replace(//gi, '

    '); - content = content.replace(/<\/h[1-6]>/gi, '

    '); - content = content.replace(/ <\/b>/gi, '  '); - content = content.replace(/^( )*/gi, ''); - } + lastMargin = margin; + lastType = type; + } else + listElm = lastMargin = 0; // End list element + }); - content = content.replace(/--list--/gi, ""); // Remove --list-- + // Remove any left over makers + html = o.node.innerHTML; + if (html.indexOf('__MCE_ITEM__') != -1) + o.node.innerHTML = html.replace(/__MCE_ITEM__/g, ''); + }, - if (ed.getParam('paste_insert_word_content_callback')) - content = ed.execCallback('paste_insert_word_content_callback', 'after', content); + /** + * Inserts the specified contents at the caret position. + */ + _insert : function(h, skip_undo) { + var ed = this.editor, r = ed.selection.getRng(); - // Insert cleaned content - this.editor.execCommand("mceInsertContent", false, content); + // First delete the contents seems to work better on WebKit when the selection spans multiple list items or multiple table cells. + if (!ed.selection.isCollapsed() && r.startContainer != r.endContainer) + ed.getDoc().execCommand('Delete', false, null); - if (this.editor.getParam('paste_force_cleanup_wordpaste', true)) { - var ed = this.editor; + ed.execCommand('mceInsertContent', false, h, {skip_undo : skip_undo}); + }, - window.setTimeout(function() { - ed.execCommand("mceCleanup"); - }, 1); // Do normal cleanup detached from this thread + /** + * Instead of the old plain text method which tried to re-create a paste operation, the + * new approach adds a plain text mode toggle switch that changes the behavior of paste. + * This function is passed the same input that the regular paste plugin produces. + * It performs additional scrubbing and produces (and inserts) the plain text. + * This approach leverages all of the great existing functionality in the paste + * plugin, and requires minimal changes to add the new functionality. + * Speednet - June 2009 + */ + _insertPlainText : function(ed, dom, h) { + var i, len, pos, rpos, node, breakElms, before, after, + w = ed.getWin(), + d = ed.getDoc(), + sel = ed.selection, + is = tinymce.is, + inArray = tinymce.inArray, + linebr = getParam(ed, "paste_text_linebreaktype"), + rl = getParam(ed, "paste_text_replacements"); + + function process(items) { + each(items, function(v) { + if (v.constructor == RegExp) + h = h.replace(v, ""); + else + h = h.replace(v[0], v[1]); + }); + }; + + if ((typeof(h) === "string") && (h.length > 0)) { + // If HTML content with line-breaking tags, then remove all cr/lf chars because only tags will break a line + if (/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(h)) { + process([ + /[\n\r]+/g + ]); + } else { + // Otherwise just get rid of carriage returns (only need linefeeds) + process([ + /\r+/g + ]); } - } - }, - _reEscape : function(s) { - var l = "?.\\*[](){}+^$:"; - var o = ""; + process([ + [/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi, "\n\n"], // Block tags get a blank line after them + [/]*>|<\/tr>/gi, "\n"], // Single linebreak for
    tags and table rows + [/<\/t[dh]>\s*]*>/gi, "\t"], // Table cells get tabs betweem them + /<[a-z!\/?][^>]*>/gi, // Delete all remaining tags + [/ /gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*) + [/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"], // Cool little RegExp deletes whitespace around linebreak chars. + [/\n{3,}/g, "\n\n"], // Max. 2 consecutive linebreaks + /^\s+|\s+$/g // Trim the front & back + ]); - for (var i=0; i"] + ]); + } + else { + process([ + /^\s+|\s+$/g, + [/\n\n/g, "

    "], + [/\n/g, "
    "] + ]); + } - if (search == mdot) { - if (np.nodeType == 1 && new RegExp('^o(\\s+| )').test(np.innerHTML)) { - // Second level of nesting - if (!prevul) { - prevul = ul; - ul = ed.dom.create("ul"); - prevul.appendChild(ul); - } - np.innerHTML = np.innerHTML.replace(/^o/, ''); - } else { - // Pop the stack if we're going back up to the first level - if (prevul) { - ul = prevul; - prevul = null; - } - // Not element or middot paragraph - if (np.nodeType != 1 || np.innerHTML.indexOf(search) != 0) - break; - } - } else { - // Not element or middot paragraph - if (np.nodeType != 1 || np.innerHTML.indexOf(search) != 0) - break; + // This next piece of code handles the situation where we're pasting more than one paragraph of plain + // text, and we are pasting the content into the middle of a block node in the editor. The block + // node gets split at the selection point into "Para A" and "Para B" (for the purposes of explaining). + // The first paragraph of the pasted text is appended to "Para A", and the last paragraph of the + // pasted text is prepended to "Para B". Any other paragraphs of pasted text are placed between + // "Para A" and "Para B". This code solves a host of problems with the original plain text plugin and + // now handles styles correctly. (Pasting plain text into a styled paragraph is supposed to make the + // plain text take the same style as the existing paragraph.) + if ((pos = h.indexOf("

    ")) != -1) { + rpos = h.lastIndexOf("

    "); + node = sel.getNode(); + breakElms = []; // Get list of elements to break + + do { + if (node.nodeType == 1) { + // Don't break tables and break at body + if (node.nodeName == "TD" || node.nodeName == "BODY") { + break; } - cp = np.nextSibling; - li = ed.dom.create("li"); - li.innerHTML = np.innerHTML.replace(new RegExp('' + mdot + '|' + bull + '|--list--| ', "gi"), ''); - np.parentNode.removeChild(np); - ul.appendChild(li); - np = cp; - } + breakElms[breakElms.length] = node; + } + } while (node = node.parentNode); + + // Are we in the middle of a block node? + if (breakElms.length > 0) { + before = h.substring(0, pos); + after = ""; - p.parentNode.replaceChild(ul, p); + for (i=0, len=breakElms.length; i"; + after += "<" + breakElms[breakElms.length-i-1].nodeName.toLowerCase() + ">"; + } - return true; + if (pos == rpos) { + h = before + after + h.substring(pos+7); + } + else { + h = before + h.substring(pos+4, rpos+4) + after + h.substring(rpos+7); + } + } } - } - return false; + // Insert content at the caret, plus add a marker for repositioning the caret + ed.execCommand("mceInsertRawHTML", false, h + ' '); + + // Reposition the caret to the marker, which was placed immediately after the inserted content. + // Needs to be done asynchronously (in window.setTimeout) or else it doesn't work in all browsers. + // The second part of the code scrolls the content up if the caret is positioned off-screen. + // This is only necessary for WebKit browsers, but it doesn't hurt to use for all. + window.setTimeout(function() { + var marker = dom.get('_plain_text_marker'), + elm, vp, y, elmHeight; + + sel.select(marker, false); + d.execCommand("Delete", false, null); + marker = null; + + // Get element, position and height + elm = sel.getStart(); + vp = dom.getViewPort(w); + y = dom.getPos(elm).y; + elmHeight = elm.clientHeight; + + // Is element within viewport if not then scroll it into view + if ((y < vp.y) || (y + elmHeight > vp.y + vp.h)) { + d.body.scrollTop = y < vp.y ? y : y - vp.h + 25; + } + }, 0); + } }, - _clipboardHTML : function() { - var div = document.getElementById('_TinyMCE_clipboardHTML'); - - if (!div) { - var div = document.createElement('DIV'); - div.id = '_TinyMCE_clipboardHTML'; + /** + * This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine. + */ + _legacySupport : function() { + var t = this, ed = t.editor; - with (div.style) { - visibility = 'hidden'; - overflow = 'hidden'; - position = 'absolute'; - width = 1; - height = 1; - } + // Register command(s) for backwards compatibility + ed.addCommand("mcePasteWord", function() { + ed.windowManager.open({ + file: t.url + "/pasteword.htm", + width: parseInt(getParam(ed, "paste_dialog_width")), + height: parseInt(getParam(ed, "paste_dialog_height")), + inline: 1 + }); + }); - document.body.appendChild(div); + if (getParam(ed, "paste_text_use_dialog")) { + ed.addCommand("mcePasteText", function() { + ed.windowManager.open({ + file : t.url + "/pastetext.htm", + width: parseInt(getParam(ed, "paste_dialog_width")), + height: parseInt(getParam(ed, "paste_dialog_height")), + inline : 1 + }); + }); } - div.innerHTML = ''; - var rng = document.body.createTextRange(); - rng.moveToElementText(div); - rng.execCommand('Paste'); - var html = div.innerHTML; - div.innerHTML = ''; - return html; + // Register button for backwards compatibility + ed.addButton("pasteword", {title : "paste.paste_word_desc", cmd : "mcePasteWord"}); } }); // Register plugin - tinymce.PluginManager.add('paste', tinymce.plugins.PastePlugin); -})(); \ No newline at end of file + tinymce.PluginManager.add("paste", tinymce.plugins.PastePlugin); +})(); diff --git a/include/javascript/tiny_mce/plugins/paste/js/pastetext.js b/include/javascript/tiny_mce/plugins/paste/js/pastetext.js index 28073877..81b1d6a0 100644 --- a/include/javascript/tiny_mce/plugins/paste/js/pastetext.js +++ b/include/javascript/tiny_mce/plugins/paste/js/pastetext.js @@ -1,42 +1,36 @@ tinyMCEPopup.requireLangPack(); -function saveContent() { - if (document.forms[0].htmlSource.value == '') { +var PasteTextDialog = { + init : function() { + this.resize(); + }, + + insert : function() { + var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines; + + // Convert linebreaks into paragraphs + if (document.getElementById('linebreaks').checked) { + lines = h.split(/\r?\n/); + if (lines.length > 1) { + h = ''; + tinymce.each(lines, function(row) { + h += '

    ' + row + '

    '; + }); + } + } + + tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h}); tinyMCEPopup.close(); - return false; - } - - tinyMCEPopup.execCommand('mcePasteText', false, { - html : document.forms[0].htmlSource.value, - linebreaks : document.forms[0].linebreaks.checked - }); - - tinyMCEPopup.close(); -} + }, -function onLoadInit() { - tinyMCEPopup.resizeToInnerSize(); + resize : function() { + var vp = tinyMCEPopup.dom.getViewPort(window), el; - // Remove Gecko spellchecking - if (tinymce.isGecko) - document.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck"); + el = document.getElementById('content'); - resizeInputs(); -} - -var wHeight=0, wWidth=0, owHeight=0, owWidth=0; - -function resizeInputs() { - if (!tinymce.isIE) { - wHeight = self.innerHeight-80; - wWidth = self.innerWidth-17; - } else { - wHeight = document.body.clientHeight-80; - wWidth = document.body.clientWidth-17; + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 90) + 'px'; } +}; - document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px'; - document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px'; -} - -tinyMCEPopup.onInit.add(onLoadInit); \ No newline at end of file +tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog); diff --git a/include/javascript/tiny_mce/plugins/paste/js/pasteword.js b/include/javascript/tiny_mce/plugins/paste/js/pasteword.js index ea9c29c2..959bf399 100644 --- a/include/javascript/tiny_mce/plugins/paste/js/pasteword.js +++ b/include/javascript/tiny_mce/plugins/paste/js/pasteword.js @@ -1,56 +1,51 @@ tinyMCEPopup.requireLangPack(); -function saveContent() { - var html = document.getElementById("frmData").contentWindow.document.body.innerHTML; - - if (html == ''){ +var PasteWordDialog = { + init : function() { + var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = ''; + + // Create iframe + el.innerHTML = ''; + ifr = document.getElementById('iframe'); + doc = ifr.contentWindow.document; + + // Force absolute CSS urls + css = [ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css")]; + css = css.concat(tinymce.explode(ed.settings.content_css) || []); + tinymce.each(css, function(u) { + cssHTML += ''; + }); + + // Write content into iframe + doc.open(); + doc.write('' + cssHTML + ''); + doc.close(); + + doc.designMode = 'on'; + this.resize(); + + window.setTimeout(function() { + ifr.contentWindow.focus(); + }, 10); + }, + + insert : function() { + var h = document.getElementById('iframe').contentWindow.document.body.innerHTML; + + tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h, wordContent : true}); tinyMCEPopup.close(); - return false; - } - - tinyMCEPopup.execCommand('mcePasteWord', false, html); - tinyMCEPopup.close(); -} - -function onLoadInit() { - tinyMCEPopup.resizeToInnerSize(); - - // Fix for endless reloading in FF - window.setTimeout(createIFrame, 10); -} - -function createIFrame() { - document.getElementById('iframecontainer').innerHTML = ''; -} + }, -var wHeight=0, wWidth=0, owHeight=0, owWidth=0; + resize : function() { + var vp = tinyMCEPopup.dom.getViewPort(window), el; -function initIframe(doc) { - var dir = tinyMCEPopup.editor.settings.directionality; - - doc.body.dir = dir; - - // Remove Gecko spellchecking - if (tinymce.isGecko) - doc.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck"); - - resizeInputs(); -} - -function resizeInputs() { - if (!tinymce.isIE) { - wHeight = self.innerHeight - 80; - wWidth = self.innerWidth - 18; - } else { - wHeight = document.body.clientHeight - 80; - wWidth = document.body.clientWidth - 18; - } + el = document.getElementById('iframe'); - var elm = document.getElementById('frmData'); - if (elm) { - elm.style.height = Math.abs(wHeight) + 'px'; - elm.style.width = Math.abs(wWidth) + 'px'; + if (el) { + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 90) + 'px'; + } } -} +}; -tinyMCEPopup.onInit.add(onLoadInit); +tinyMCEPopup.onInit.add(PasteWordDialog.init, PasteWordDialog); diff --git a/include/javascript/tiny_mce/plugins/paste/pastetext.htm b/include/javascript/tiny_mce/plugins/paste/pastetext.htm index 0e0d99f1..8ccfbb97 100644 --- a/include/javascript/tiny_mce/plugins/paste/pastetext.htm +++ b/include/javascript/tiny_mce/plugins/paste/pastetext.htm @@ -1,34 +1,27 @@ {#paste.paste_text_desc} - - - -
    -
    {#paste.paste_text_desc}
    + + +
    {#paste.paste_text_desc}
    -
    - -
    +
    + +
    -
    +
    -
    {#paste_dlg.text_title}
    +
    {#paste_dlg.text_title}
    - + -
    -
    +
    -
    - -
    -
    - + \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/paste/pasteword.htm b/include/javascript/tiny_mce/plugins/paste/pasteword.htm index f96d4784..7731f39c 100644 --- a/include/javascript/tiny_mce/plugins/paste/pasteword.htm +++ b/include/javascript/tiny_mce/plugins/paste/pasteword.htm @@ -1,14 +1,11 @@ - {#paste.paste_word_desc} - - - -
    + +
    {#paste.paste_word_desc}
    {#paste_dlg.word_title}
    @@ -16,13 +13,8 @@
    -
    - -
    - -
    - -
    + +
    diff --git a/include/javascript/tiny_mce/plugins/preview/editor_plugin.js b/include/javascript/tiny_mce/plugins/preview/editor_plugin.js index deb4bce9..507909c5 100644 --- a/include/javascript/tiny_mce/plugins/preview/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/preview/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.Preview',{init:function(ed,url){var t=this,css=tinymce.explode(ed.settings.content_css);t.editor=ed;tinymce.each(css,function(u,k){css[k]=ed.documentBaseURI.toAbsolute(u);});ed.addCommand('mcePreview',function(){ed.windowManager.open({file:ed.getParam("plugin_preview_pageurl",url+"/preview.html"),width:parseInt(ed.getParam("plugin_preview_width","550")),height:parseInt(ed.getParam("plugin_preview_height","600")),resizable:"yes",scrollbars:"yes",popup_css:css.join(','),inline:ed.getParam("plugin_preview_inline",1)},{base:ed.documentBaseURI.getURI()});});ed.addButton('preview',{title:'preview.preview_desc',cmd:'mcePreview'});},getInfo:function(){return{longname:'Preview',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('preview',tinymce.plugins.Preview);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.Preview",{init:function(a,b){var d=this,c=tinymce.explode(a.settings.content_css);d.editor=a;tinymce.each(c,function(f,e){c[e]=a.documentBaseURI.toAbsolute(f)});a.addCommand("mcePreview",function(){a.windowManager.open({file:a.getParam("plugin_preview_pageurl",b+"/preview.html"),width:parseInt(a.getParam("plugin_preview_width","550")),height:parseInt(a.getParam("plugin_preview_height","600")),resizable:"yes",scrollbars:"yes",popup_css:c?c.join(","):a.baseURI.toAbsolute("themes/"+a.settings.theme+"/skins/"+a.settings.skin+"/content.css"),inline:a.getParam("plugin_preview_inline",1)},{base:a.documentBaseURI.getURI()})});a.addButton("preview",{title:"preview.preview_desc",cmd:"mcePreview"})},getInfo:function(){return{longname:"Preview",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("preview",tinymce.plugins.Preview)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/preview/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/preview/editor_plugin_src.js index 5ad98c24..80f00f0d 100644 --- a/include/javascript/tiny_mce/plugins/preview/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/preview/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -24,7 +27,7 @@ height : parseInt(ed.getParam("plugin_preview_height", "600")), resizable : "yes", scrollbars : "yes", - popup_css : css.join(','), + popup_css : css ? css.join(',') : ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css"), inline : ed.getParam("plugin_preview_inline", 1) }, { base : ed.documentBaseURI.getURI() diff --git a/include/javascript/tiny_mce/plugins/preview/preview.html b/include/javascript/tiny_mce/plugins/preview/preview.html index 7c761d37..c09a7f05 100644 --- a/include/javascript/tiny_mce/plugins/preview/preview.html +++ b/include/javascript/tiny_mce/plugins/preview/preview.html @@ -1,19 +1,17 @@ + - + - {#preview.preview_desc} - + diff --git a/include/javascript/tiny_mce/plugins/print/editor_plugin.js b/include/javascript/tiny_mce/plugins/print/editor_plugin.js index 7d09a87c..b5b3a55e 100644 --- a/include/javascript/tiny_mce/plugins/print/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/print/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.Print',{init:function(ed,url){ed.addCommand('mcePrint',function(){ed.getWin().print();});ed.addButton('print',{title:'print.print_desc',cmd:'mcePrint'});},getInfo:function(){return{longname:'Print',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('print',tinymce.plugins.Print);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.Print",{init:function(a,b){a.addCommand("mcePrint",function(){a.getWin().print()});a.addButton("print",{title:"print.print_desc",cmd:"mcePrint"})},getInfo:function(){return{longname:"Print",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("print",tinymce.plugins.Print)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/print/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/print/editor_plugin_src.js index 84b70fc6..47e666a3 100644 --- a/include/javascript/tiny_mce/plugins/print/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/print/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { diff --git a/include/javascript/tiny_mce/plugins/safari/blank.htm b/include/javascript/tiny_mce/plugins/safari/blank.htm deleted file mode 100644 index 266808ce..00000000 --- a/include/javascript/tiny_mce/plugins/safari/blank.htm +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/safari/editor_plugin.js b/include/javascript/tiny_mce/plugins/safari/editor_plugin.js deleted file mode 100644 index 4daac19f..00000000 --- a/include/javascript/tiny_mce/plugins/safari/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var Event=tinymce.dom.Event,grep=tinymce.grep,each=tinymce.each,inArray=tinymce.inArray,isOldWebKit=tinymce.isOldWebKit;function isEmpty(d,e,f){var w,n;w=d.createTreeWalker(e,NodeFilter.SHOW_ALL,null,false);while(n=w.nextNode()){if(f){if(!f(n))return false;}if(n.nodeType==3&&n.nodeValue&&/[^\s\u00a0]+/.test(n.nodeValue))return false;if(n.nodeType==1&&/^(HR|IMG|TABLE)$/.test(n.nodeName))return false;}return true;};tinymce.create('tinymce.plugins.Safari',{init:function(ed){var t=this,dom;if(!tinymce.isWebKit)return;t.editor=ed;t.webKitFontSizes=['x-small','small','medium','large','x-large','xx-large','-webkit-xxx-large'];t.namedFontSizes=['xx-small','x-small','small','medium','large','x-large','xx-large'];ed.addCommand('CreateLink',function(u,v){var n=ed.selection.getNode(),dom=ed.dom,a;if(n&&(/^(left|right)$/i.test(dom.getStyle(n,'float',1))||/^(left|right)$/i.test(dom.getAttrib(n,'align')))){a=dom.create('a',{href:v},n.cloneNode());n.parentNode.replaceChild(a,n);ed.selection.select(a);}else ed.getDoc().execCommand("CreateLink",false,v);});ed.onPaste.add(function(ed,e){function removeStyles(e){e=e.target;if(e.nodeType==1){e.style.cssText='';each(ed.dom.select('*',e),function(e){e.style.cssText='';});}};Event.add(ed.getDoc(),'DOMNodeInserted',removeStyles);window.setTimeout(function(){Event.remove(ed.getDoc(),'DOMNodeInserted',removeStyles);},0);});ed.onKeyUp.add(function(ed,e){var h,b,r,n,s;if(e.keyCode==46||e.keyCode==8){b=ed.getBody();h=b.innerHTML;s=ed.selection;if(b.childNodes.length==1&&!/<(img|hr)/.test(h)&&tinymce.trim(h.replace(/<[^>]+>/g,'')).length==0){ed.setContent('


    ',{format:'raw'});n=b.firstChild;r=s.getRng();r.setStart(n,0);r.setEnd(n,0);s.setRng(r);}}});ed.addCommand('FormatBlock',function(u,v){var dom=ed.dom,e=dom.getParent(ed.selection.getNode(),dom.isBlock);if(e)dom.replace(dom.create(v),e,1);else ed.getDoc().execCommand("FormatBlock",false,v);});ed.addCommand('mceInsertContent',function(u,v){ed.getDoc().execCommand("InsertText",false,'mce_marker');ed.getBody().innerHTML=ed.getBody().innerHTML.replace(/mce_marker/g,ed.dom.processHTML(v)+'XX');ed.selection.select(ed.dom.get('_mce_tmp'));ed.getDoc().execCommand("Delete",false,' ');});ed.onKeyPress.add(function(ed,e){var se,li,lic,r1,r2,n,sel,doc,be,af,pa;if(e.keyCode==13){sel=ed.selection;se=sel.getNode();if(e.shiftKey||ed.settings.force_br_newlines&&se.nodeName!='LI'){t._insertBR(ed);Event.cancel(e);}if(li=dom.getParent(se,'LI')){lic=dom.getParent(li,'OL,UL');doc=ed.getDoc();pa=dom.create('p');dom.add(pa,'br',{mce_bogus:"1"});if(isEmpty(doc,li)){if(n=dom.getParent(lic.parentNode,'LI,OL,UL'))return;n=dom.getParent(lic,'p,h1,h2,h3,h4,h5,h6,div')||lic;r1=doc.createRange();r1.setStartBefore(n);r1.setEndBefore(li);r2=doc.createRange();r2.setStartAfter(li);r2.setEndAfter(n);be=r1.cloneContents();af=r2.cloneContents();if(!isEmpty(doc,af))dom.insertAfter(af,n);dom.insertAfter(pa,n);if(!isEmpty(doc,be))dom.insertAfter(be,n);dom.remove(n);n=pa.firstChild;r1=doc.createRange();r1.setStartBefore(n);r1.setEndBefore(n);sel.setRng(r1);return Event.cancel(e);}}}});ed.onExecCommand.add(function(ed,cmd){var sel,dom,bl,bm;if(cmd=='InsertUnorderedList'||cmd=='InsertOrderedList'){sel=ed.selection;dom=ed.dom;if(bl=dom.getParent(sel.getNode(),function(n){return/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName);})){bm=sel.getBookmark();dom.remove(bl,1);sel.moveToBookmark(bm);}}});ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName=='IMG'){t.selElm=e;ed.selection.select(e);}else t.selElm=null;});ed.onInit.add(function(){t._fixWebKitSpans();if(isOldWebKit)t._patchSafari2x(ed);});ed.onSetContent.add(function(){dom=ed.dom;each(['strong','b','em','u','strike','sub','sup','a'],function(v){each(grep(dom.select(v)).reverse(),function(n){var nn=n.nodeName.toLowerCase(),st;if(nn=='a'){if(n.name)dom.replace(dom.create('img',{mce_name:'a',name:n.name,'class':'mceItemAnchor'}),n);return;}switch(nn){case'b':case'strong':if(nn=='b')nn='strong';st='font-weight: bold;';break;case'em':st='font-style: italic;';break;case'u':st='text-decoration: underline;';break;case'sub':st='vertical-align: sub;';break;case'sup':st='vertical-align: super;';break;case'strike':st='text-decoration: line-through;';break;}dom.replace(dom.create('span',{mce_name:nn,style:st,'class':'Apple-style-span'}),n,1);});});});ed.onPreProcess.add(function(ed,o){dom=ed.dom;each(grep(o.node.getElementsByTagName('span')).reverse(),function(n){var v,bg;if(o.get){if(dom.hasClass(n,'Apple-style-span')){bg=n.style.backgroundColor;switch(dom.getAttrib(n,'mce_name')){case'font':if(!ed.settings.convert_fonts_to_spans)dom.setAttrib(n,'style','');break;case'strong':case'em':case'sub':case'sup':dom.setAttrib(n,'style','');break;case'strike':case'u':if(!ed.settings.inline_styles)dom.setAttrib(n,'style','');else dom.setAttrib(n,'mce_name','');break;default:if(!ed.settings.inline_styles)dom.setAttrib(n,'style','');}if(bg)n.style.backgroundColor=bg;}}if(dom.hasClass(n,'mceItemRemoved'))dom.remove(n,1);});});ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/
    <\/(h[1-6]|div|p|address|pre)>/g,'');o.content=o.content.replace(/ id=\"undefined\"/g,'');});},getInfo:function(){return{longname:'Safari compatibility',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/safari',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_fixWebKitSpans:function(){var t=this,ed=t.editor;if(!isOldWebKit){Event.add(ed.getDoc(),'DOMNodeInserted',function(e){e=e.target;if(e&&e.nodeType==1)t._fixAppleSpan(e);});}else{ed.onExecCommand.add(function(){each(ed.dom.select('span'),function(n){t._fixAppleSpan(n);});ed.nodeChanged();});}},_fixAppleSpan:function(e){var ed=this.editor,dom=ed.dom,fz=this.webKitFontSizes,fzn=this.namedFontSizes,s=ed.settings,st,p;if(dom.getAttrib(e,'mce_fixed'))return;if(e.nodeName=='SPAN'&&e.className=='Apple-style-span'){st=e.style;if(!s.convert_fonts_to_spans){if(st.fontSize){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'size',inArray(fz,st.fontSize)+1);}if(st.fontFamily){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'face',st.fontFamily);}if(st.color){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'color',dom.toHex(st.color));}if(st.backgroundColor){dom.setAttrib(e,'mce_name','font');dom.setStyle(e,'background-color',st.backgroundColor);}}else{if(st.fontSize)dom.setStyle(e,'fontSize',fzn[inArray(fz,st.fontSize)]);}if(st.fontWeight=='bold')dom.setAttrib(e,'mce_name','strong');if(st.fontStyle=='italic')dom.setAttrib(e,'mce_name','em');if(st.textDecoration=='underline')dom.setAttrib(e,'mce_name','u');if(st.textDecoration=='line-through')dom.setAttrib(e,'mce_name','strike');if(st.verticalAlign=='super')dom.setAttrib(e,'mce_name','sup');if(st.verticalAlign=='sub')dom.setAttrib(e,'mce_name','sub');dom.setAttrib(e,'mce_fixed','1');}},_patchSafari2x:function(ed){var t=this,setContent,getNode,dom=ed.dom,lr;if(ed.windowManager.onBeforeOpen){ed.windowManager.onBeforeOpen.add(function(){r=ed.selection.getRng();});}ed.selection.select=function(n){this.getSel().setBaseAndExtent(n,0,n,1);};getNode=ed.selection.getNode;ed.selection.getNode=function(){return t.selElm||getNode.call(this);};ed.selection.getRng=function(){var t=this,s=t.getSel(),d=ed.getDoc(),r,rb,ra,di;if(s.anchorNode){r=d.createRange();try{rb=d.createRange();rb.setStart(s.anchorNode,s.anchorOffset);rb.collapse(1);ra=d.createRange();ra.setStart(s.focusNode,s.focusOffset);ra.collapse(1);di=rb.compareBoundaryPoints(rb.START_TO_END,ra)<0;r.setStart(di?s.anchorNode:s.focusNode,di?s.anchorOffset:s.focusOffset);r.setEnd(di?s.focusNode:s.anchorNode,di?s.focusOffset:s.anchorOffset);lr=r;}catch(ex){}}return r||lr;};setContent=ed.selection.setContent;ed.selection.setContent=function(h,s){var r=this.getRng(),b;try{setContent.call(this,h,s);}catch(ex){b=dom.create('body');b.innerHTML=h;each(b.childNodes,function(n){r.insertNode(n.cloneNode(true));});}};},_insertBR:function(ed){var dom=ed.dom,s=ed.selection,r=s.getRng(),br;r.insertNode(br=dom.create('br'));r.setStartAfter(br);r.setEndAfter(br);s.setRng(r);if(s.getSel().focusNode==br.previousSibling){s.select(dom.insertAfter(dom.doc.createTextNode('\u00a0'),br));s.collapse(1);}ed.getWin().scrollTo(0,dom.getPos(s.getRng().startContainer).y);}});tinymce.PluginManager.add('safari',tinymce.plugins.Safari);})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/safari/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/safari/editor_plugin_src.js deleted file mode 100644 index b82febda..00000000 --- a/include/javascript/tiny_mce/plugins/safari/editor_plugin_src.js +++ /dev/null @@ -1,514 +0,0 @@ -/** - - * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. - */ - -(function() { - var Event = tinymce.dom.Event, grep = tinymce.grep, each = tinymce.each, inArray = tinymce.inArray, isOldWebKit = tinymce.isOldWebKit; - - function isEmpty(d, e, f) { - var w, n; - - w = d.createTreeWalker(e, NodeFilter.SHOW_ALL, null, false); - while (n = w.nextNode()) { - // Filter func - if (f) { - if (!f(n)) - return false; - } - - // Non whitespace text node - if (n.nodeType == 3 && n.nodeValue && /[^\s\u00a0]+/.test(n.nodeValue)) - return false; - - // Is non text element byt still content - if (n.nodeType == 1 && /^(HR|IMG|TABLE)$/.test(n.nodeName)) - return false; - } - - return true; - }; - - tinymce.create('tinymce.plugins.Safari', { - init : function(ed) { - var t = this, dom; - - // Ignore on non webkit - if (!tinymce.isWebKit) - return; - - t.editor = ed; - t.webKitFontSizes = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', '-webkit-xxx-large']; - t.namedFontSizes = ['xx-small', 'x-small','small','medium','large','x-large', 'xx-large']; - - // Safari CreateLink command will not work correctly on images that is aligned - ed.addCommand('CreateLink', function(u, v) { - var n = ed.selection.getNode(), dom = ed.dom, a; - - if (n && (/^(left|right)$/i.test(dom.getStyle(n, 'float', 1)) || /^(left|right)$/i.test(dom.getAttrib(n, 'align')))) { - a = dom.create('a', {href : v}, n.cloneNode()); - n.parentNode.replaceChild(a, n); - ed.selection.select(a); - } else - ed.getDoc().execCommand("CreateLink", false, v); - }); - - ed.onPaste.add(function(ed, e) { - function removeStyles(e) { - e = e.target; - - if (e.nodeType == 1) { - e.style.cssText = ''; - - each(ed.dom.select('*', e), function(e) { - e.style.cssText = ''; - }); - } - }; - - Event.add(ed.getDoc(), 'DOMNodeInserted', removeStyles); - - window.setTimeout(function() { - Event.remove(ed.getDoc(), 'DOMNodeInserted', removeStyles); - }, 0); - }); - - ed.onKeyUp.add(function(ed, e) { - var h, b, r, n, s; - - // If backspace or delete key - if (e.keyCode == 46 || e.keyCode == 8) { - b = ed.getBody(); - h = b.innerHTML; - s = ed.selection; - - // If there is no text content or images or hr elements then remove everything - if (b.childNodes.length == 1 && !/<(img|hr)/.test(h) && tinymce.trim(h.replace(/<[^>]+>/g, '')).length == 0) { - // Inject paragrah and bogus br - ed.setContent('


    ', {format : 'raw'}); - - // Move caret before bogus br - n = b.firstChild; - r = s.getRng(); - r.setStart(n, 0); - r.setEnd(n, 0); - s.setRng(r); - } - } - }); - - // Workaround for FormatBlock bug, http://bugs.webkit.org/show_bug.cgi?id=16004 - ed.addCommand('FormatBlock', function(u, v) { - var dom = ed.dom, e = dom.getParent(ed.selection.getNode(), dom.isBlock); - - if (e) - dom.replace(dom.create(v), e, 1); - else - ed.getDoc().execCommand("FormatBlock", false, v); - }); - - // Workaround for InsertHTML bug, http://bugs.webkit.org/show_bug.cgi?id=16382 - ed.addCommand('mceInsertContent', function(u, v) { - ed.getDoc().execCommand("InsertText", false, 'mce_marker'); - ed.getBody().innerHTML = ed.getBody().innerHTML.replace(/mce_marker/g, ed.dom.processHTML(v) + 'XX'); - ed.selection.select(ed.dom.get('_mce_tmp')); - ed.getDoc().execCommand("Delete", false, ' '); - }); - - ed.onKeyPress.add(function(ed, e) { - var se, li, lic, r1, r2, n, sel, doc, be, af, pa; - - if (e.keyCode == 13) { - sel = ed.selection; - se = sel.getNode(); - - // Workaround for missing shift+enter support, http://bugs.webkit.org/show_bug.cgi?id=16973 - if (e.shiftKey || ed.settings.force_br_newlines && se.nodeName != 'LI') { - t._insertBR(ed); - Event.cancel(e); - } - - // Workaround for DIV elements produced by Safari - if (li = dom.getParent(se, 'LI')) { - lic = dom.getParent(li, 'OL,UL'); - doc = ed.getDoc(); - - pa = dom.create('p'); - dom.add(pa, 'br', {mce_bogus : "1"}); - - if (isEmpty(doc, li)) { - // If list in list then use browser default behavior - if (n = dom.getParent(lic.parentNode, 'LI,OL,UL')) - return; - - n = dom.getParent(lic, 'p,h1,h2,h3,h4,h5,h6,div') || lic; - - // Create range from the start of block element to the list item - r1 = doc.createRange(); - r1.setStartBefore(n); - r1.setEndBefore(li); - - // Create range after the list to the end of block element - r2 = doc.createRange(); - r2.setStartAfter(li); - r2.setEndAfter(n); - - be = r1.cloneContents(); - af = r2.cloneContents(); - - if (!isEmpty(doc, af)) - dom.insertAfter(af, n); - - dom.insertAfter(pa, n); - - if (!isEmpty(doc, be)) - dom.insertAfter(be, n); - - dom.remove(n); - - n = pa.firstChild; - r1 = doc.createRange(); - r1.setStartBefore(n); - r1.setEndBefore(n); - sel.setRng(r1); - - return Event.cancel(e); - } - } - } - }); - - // Safari doesn't place lists outside block elements - ed.onExecCommand.add(function(ed, cmd) { - var sel, dom, bl, bm; - - if (cmd == 'InsertUnorderedList' || cmd == 'InsertOrderedList') { - sel = ed.selection; - dom = ed.dom; - - if (bl = dom.getParent(sel.getNode(), function(n) {return /^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName);})) { - bm = sel.getBookmark(); - dom.remove(bl, 1); - sel.moveToBookmark(bm); - } - } - }); - - // Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250 - ed.onClick.add(function(ed, e) { - e = e.target; - - if (e.nodeName == 'IMG') { - t.selElm = e; - ed.selection.select(e); - } else - t.selElm = null; - }); - - ed.onInit.add(function() { - t._fixWebKitSpans(); - - if (isOldWebKit) - t._patchSafari2x(ed); - }); - - ed.onSetContent.add(function() { - dom = ed.dom; - - // Convert strong,b,em,u,strike to spans - each(['strong','b','em','u','strike','sub','sup','a'], function(v) { - each(grep(dom.select(v)).reverse(), function(n) { - var nn = n.nodeName.toLowerCase(), st; - - // Convert anchors into images - if (nn == 'a') { - if (n.name) - dom.replace(dom.create('img', {mce_name : 'a', name : n.name, 'class' : 'mceItemAnchor'}), n); - - return; - } - - switch (nn) { - case 'b': - case 'strong': - if (nn == 'b') - nn = 'strong'; - - st = 'font-weight: bold;'; - break; - - case 'em': - st = 'font-style: italic;'; - break; - - case 'u': - st = 'text-decoration: underline;'; - break; - - case 'sub': - st = 'vertical-align: sub;'; - break; - - case 'sup': - st = 'vertical-align: super;'; - break; - - case 'strike': - st = 'text-decoration: line-through;'; - break; - } - - dom.replace(dom.create('span', {mce_name : nn, style : st, 'class' : 'Apple-style-span'}), n, 1); - }); - }); - }); - - ed.onPreProcess.add(function(ed, o) { - dom = ed.dom; - - each(grep(o.node.getElementsByTagName('span')).reverse(), function(n) { - var v, bg; - - if (o.get) { - if (dom.hasClass(n, 'Apple-style-span')) { - bg = n.style.backgroundColor; - - switch (dom.getAttrib(n, 'mce_name')) { - case 'font': - if (!ed.settings.convert_fonts_to_spans) - dom.setAttrib(n, 'style', ''); - break; - - case 'strong': - case 'em': - case 'sub': - case 'sup': - dom.setAttrib(n, 'style', ''); - break; - - case 'strike': - case 'u': - if (!ed.settings.inline_styles) - dom.setAttrib(n, 'style', ''); - else - dom.setAttrib(n, 'mce_name', ''); - - break; - - default: - if (!ed.settings.inline_styles) - dom.setAttrib(n, 'style', ''); - } - - - if (bg) - n.style.backgroundColor = bg; - } - } - - if (dom.hasClass(n, 'mceItemRemoved')) - dom.remove(n, 1); - }); - }); - - ed.onPostProcess.add(function(ed, o) { - // Safari adds BR at end of all block elements - o.content = o.content.replace(/
    <\/(h[1-6]|div|p|address|pre)>/g, ''); - - // Safari adds id="undefined" to HR elements - o.content = o.content.replace(/ id=\"undefined\"/g, ''); - }); - }, - - getInfo : function() { - return { - longname : 'Safari compatibility', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/safari', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - }, - - // Internal methods - - _fixWebKitSpans : function() { - var t = this, ed = t.editor; - - if (!isOldWebKit) { - // Use mutator events on new WebKit - Event.add(ed.getDoc(), 'DOMNodeInserted', function(e) { - e = e.target; - - if (e && e.nodeType == 1) - t._fixAppleSpan(e); - }); - } else { - // Do post command processing in old WebKit since the browser crashes on Mutator events :( - ed.onExecCommand.add(function() { - each(ed.dom.select('span'), function(n) { - t._fixAppleSpan(n); - }); - - ed.nodeChanged(); - }); - } - }, - - _fixAppleSpan : function(e) { - var ed = this.editor, dom = ed.dom, fz = this.webKitFontSizes, fzn = this.namedFontSizes, s = ed.settings, st, p; - - if (dom.getAttrib(e, 'mce_fixed')) - return; - - // Handle Apple style spans - if (e.nodeName == 'SPAN' && e.className == 'Apple-style-span') { - st = e.style; - - if (!s.convert_fonts_to_spans) { - if (st.fontSize) { - dom.setAttrib(e, 'mce_name', 'font'); - dom.setAttrib(e, 'size', inArray(fz, st.fontSize) + 1); - } - - if (st.fontFamily) { - dom.setAttrib(e, 'mce_name', 'font'); - dom.setAttrib(e, 'face', st.fontFamily); - } - - if (st.color) { - dom.setAttrib(e, 'mce_name', 'font'); - dom.setAttrib(e, 'color', dom.toHex(st.color)); - } - - if (st.backgroundColor) { - dom.setAttrib(e, 'mce_name', 'font'); - dom.setStyle(e, 'background-color', st.backgroundColor); - } - } else { - if (st.fontSize) - dom.setStyle(e, 'fontSize', fzn[inArray(fz, st.fontSize)]); - } - - if (st.fontWeight == 'bold') - dom.setAttrib(e, 'mce_name', 'strong'); - - if (st.fontStyle == 'italic') - dom.setAttrib(e, 'mce_name', 'em'); - - if (st.textDecoration == 'underline') - dom.setAttrib(e, 'mce_name', 'u'); - - if (st.textDecoration == 'line-through') - dom.setAttrib(e, 'mce_name', 'strike'); - - if (st.verticalAlign == 'super') - dom.setAttrib(e, 'mce_name', 'sup'); - - if (st.verticalAlign == 'sub') - dom.setAttrib(e, 'mce_name', 'sub'); - - dom.setAttrib(e, 'mce_fixed', '1'); - } - }, - - _patchSafari2x : function(ed) { - var t = this, setContent, getNode, dom = ed.dom, lr; - - // Inline dialogs - if (ed.windowManager.onBeforeOpen) { - ed.windowManager.onBeforeOpen.add(function() { - r = ed.selection.getRng(); - }); - } - - // Fake select on 2.x - ed.selection.select = function(n) { - this.getSel().setBaseAndExtent(n, 0, n, 1); - }; - - getNode = ed.selection.getNode; - ed.selection.getNode = function() { - return t.selElm || getNode.call(this); - }; - - // Fake range on Safari 2.x - ed.selection.getRng = function() { - var t = this, s = t.getSel(), d = ed.getDoc(), r, rb, ra, di; - - // Fake range on Safari 2.x - if (s.anchorNode) { - r = d.createRange(); - - try { - // Setup before range - rb = d.createRange(); - rb.setStart(s.anchorNode, s.anchorOffset); - rb.collapse(1); - - // Setup after range - ra = d.createRange(); - ra.setStart(s.focusNode, s.focusOffset); - ra.collapse(1); - - // Setup start/end points by comparing locations - di = rb.compareBoundaryPoints(rb.START_TO_END, ra) < 0; - r.setStart(di ? s.anchorNode : s.focusNode, di ? s.anchorOffset : s.focusOffset); - r.setEnd(di ? s.focusNode : s.anchorNode, di ? s.focusOffset : s.anchorOffset); - - lr = r; - } catch (ex) { - // Sometimes fails, at least we tried to do it by the book. I hope Safari 2.x will go disappear soooon!!! - } - } - - return r || lr; - }; - - // Fix setContent so it works - setContent = ed.selection.setContent; - ed.selection.setContent = function(h, s) { - var r = this.getRng(), b; - - try { - setContent.call(this, h, s); - } catch (ex) { - // Workaround for Safari 2.x - b = dom.create('body'); - b.innerHTML = h; - - each(b.childNodes, function(n) { - r.insertNode(n.cloneNode(true)); - }); - } - }; - }, - - _insertBR : function(ed) { - var dom = ed.dom, s = ed.selection, r = s.getRng(), br; - - // Insert BR element - r.insertNode(br = dom.create('br')); - - // Place caret after BR - r.setStartAfter(br); - r.setEndAfter(br); - s.setRng(r); - - // Could not place caret after BR then insert an nbsp entity and move the caret - if (s.getSel().focusNode == br.previousSibling) { - s.select(dom.insertAfter(dom.doc.createTextNode('\u00a0'), br)); - s.collapse(1); - } - - // Scroll to new position, scrollIntoView can't be used due to bug: http://bugs.webkit.org/show_bug.cgi?id=16117 - ed.getWin().scrollTo(0, dom.getPos(s.getRng().startContainer).y); - } - }); - - // Register plugin - tinymce.PluginManager.add('safari', tinymce.plugins.Safari); -})(); - diff --git a/include/javascript/tiny_mce/plugins/save/editor_plugin.js b/include/javascript/tiny_mce/plugins/save/editor_plugin.js index 8a13e7d3..8e939966 100644 --- a/include/javascript/tiny_mce/plugins/save/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/save/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.Save',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceSave',t._save,t);ed.addCommand('mceCancel',t._cancel,t);ed.addButton('save',{title:'save.save_desc',cmd:'mceSave'});ed.addButton('cancel',{title:'save.cancel_desc',cmd:'mceCancel'});ed.onNodeChange.add(t._nodeChange,t);ed.addShortcut('ctrl+s',ed.getLang('save.save_desc'),'mceSave');},getInfo:function(){return{longname:'Save',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_nodeChange:function(ed,cm,n){var ed=this.editor;if(ed.getParam('save_enablewhendirty')){cm.setDisabled('save',!ed.isDirty());cm.setDisabled('cancel',!ed.isDirty());}},_save:function(){var ed=this.editor,formObj,os,i,elementId;formObj=tinymce.DOM.get(ed.id).form||tinymce.DOM.getParent(ed.id,'form');if(ed.getParam("save_enablewhendirty")&&!ed.isDirty())return;tinyMCE.triggerSave();if(os=ed.getParam("save_onsavecallback")){if(ed.execCallback('save_onsavecallback',ed)){ed.startContent=tinymce.trim(ed.getContent({format:'raw'}));ed.nodeChanged();}return;}if(formObj){ed.isNotDirty=true;if(formObj.onsubmit==null||formObj.onsubmit()!=false)formObj.submit();ed.nodeChanged();}else ed.windowManager.alert("Error: No form element found.");},_cancel:function(){var ed=this.editor,os,h=tinymce.trim(ed.startContent);if(os=ed.getParam("save_oncancelcallback")){ed.execCallback('save_oncancelcallback',ed);return;}ed.setContent(h);ed.undoManager.clear();ed.nodeChanged();}});tinymce.PluginManager.add('save',tinymce.plugins.Save);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.Save",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceSave",c._save,c);a.addCommand("mceCancel",c._cancel,c);a.addButton("save",{title:"save.save_desc",cmd:"mceSave"});a.addButton("cancel",{title:"save.cancel_desc",cmd:"mceCancel"});a.onNodeChange.add(c._nodeChange,c);a.addShortcut("ctrl+s",a.getLang("save.save_desc"),"mceSave")},getInfo:function(){return{longname:"Save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,c){var b=this.editor;if(b.getParam("save_enablewhendirty")){a.setDisabled("save",!b.isDirty());a.setDisabled("cancel",!b.isDirty())}},_save:function(){var c=this.editor,a,e,d,b;a=tinymce.DOM.get(c.id).form||tinymce.DOM.getParent(c.id,"form");if(c.getParam("save_enablewhendirty")&&!c.isDirty()){return}tinyMCE.triggerSave();if(e=c.getParam("save_onsavecallback")){if(c.execCallback("save_onsavecallback",c)){c.startContent=tinymce.trim(c.getContent({format:"raw"}));c.nodeChanged()}return}if(a){c.isNotDirty=true;if(a.onsubmit==null||a.onsubmit()!=false){a.submit()}c.nodeChanged()}else{c.windowManager.alert("Error: No form element found.")}},_cancel:function(){var a=this.editor,c,b=tinymce.trim(a.startContent);if(c=a.getParam("save_oncancelcallback")){a.execCallback("save_oncancelcallback",a);return}a.setContent(b);a.undoManager.clear();a.nodeChanged()}});tinymce.PluginManager.add("save",tinymce.plugins.Save)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/save/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/save/editor_plugin_src.js index 236c3545..5ab6491c 100644 --- a/include/javascript/tiny_mce/plugins/save/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/save/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { diff --git a/include/javascript/tiny_mce/plugins/searchreplace/editor_plugin.js b/include/javascript/tiny_mce/plugins/searchreplace/editor_plugin.js index 7fd913b2..165bc12d 100644 --- a/include/javascript/tiny_mce/plugins/searchreplace/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/searchreplace/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.SearchReplacePlugin',{init:function(ed,url){function open(m){ed.windowManager.open({file:url+'/searchreplace.htm',width:420+parseInt(ed.getLang('searchreplace.delta_width',0)),height:160+parseInt(ed.getLang('searchreplace.delta_height',0)),inline:1,auto_focus:0},{mode:m,search_string:ed.selection.getContent({format:'text'}),plugin_url:url});};ed.addCommand('mceSearch',function(){open('search');});ed.addCommand('mceReplace',function(){open('replace');});ed.addButton('search',{title:'searchreplace.search_desc',cmd:'mceSearch'});ed.addButton('replace',{title:'searchreplace.replace_desc',cmd:'mceReplace'});ed.addShortcut('ctrl+f','searchreplace.search_desc','mceSearch');},getInfo:function(){return{longname:'Search/Replace',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('searchreplace',tinymce.plugins.SearchReplacePlugin);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.SearchReplacePlugin",{init:function(a,c){function b(d){window.focus();a.windowManager.open({file:c+"/searchreplace.htm",width:420+parseInt(a.getLang("searchreplace.delta_width",0)),height:170+parseInt(a.getLang("searchreplace.delta_height",0)),inline:1,auto_focus:0},{mode:d,search_string:a.selection.getContent({format:"text"}),plugin_url:c})}a.addCommand("mceSearch",function(){b("search")});a.addCommand("mceReplace",function(){b("replace")});a.addButton("search",{title:"searchreplace.search_desc",cmd:"mceSearch"});a.addButton("replace",{title:"searchreplace.replace_desc",cmd:"mceReplace"});a.addShortcut("ctrl+f","searchreplace.search_desc","mceSearch")},getInfo:function(){return{longname:"Search/Replace",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("searchreplace",tinymce.plugins.SearchReplacePlugin)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/searchreplace/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/searchreplace/editor_plugin_src.js index 30e2610b..b0c013fd 100644 --- a/include/javascript/tiny_mce/plugins/searchreplace/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/searchreplace/editor_plugin_src.js @@ -1,18 +1,25 @@ /** - + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { tinymce.create('tinymce.plugins.SearchReplacePlugin', { init : function(ed, url) { function open(m) { + // Keep IE from writing out the f/r character to the editor + // instance while initializing a new dialog. See: #3131190 + window.focus(); + ed.windowManager.open({ file : url + '/searchreplace.htm', width : 420 + parseInt(ed.getLang('searchreplace.delta_width', 0)), - height : 160 + parseInt(ed.getLang('searchreplace.delta_height', 0)), + height : 170 + parseInt(ed.getLang('searchreplace.delta_height', 0)), inline : 1, auto_focus : 0 }, { diff --git a/include/javascript/tiny_mce/plugins/searchreplace/js/searchreplace.js b/include/javascript/tiny_mce/plugins/searchreplace/js/searchreplace.js index e555a3fc..b1630ca8 100644 --- a/include/javascript/tiny_mce/plugins/searchreplace/js/searchreplace.js +++ b/include/javascript/tiny_mce/plugins/searchreplace/js/searchreplace.js @@ -2,14 +2,18 @@ tinyMCEPopup.requireLangPack(); var SearchReplaceDialog = { init : function(ed) { - var f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode"); + var t = this, f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode"); - this.switchMode(m); + t.switchMode(m); f[m + '_panel_searchstring'].value = tinyMCEPopup.getWindowArg("search_string"); // Focus input field f[m + '_panel_searchstring'].focus(); + + mcTabs.onChange.add(function(tab_id, panel_id) { + t.switchMode(tab_id.substring(0, tab_id.indexOf('_'))); + }); }, switchMode : function(m) { @@ -42,21 +46,23 @@ var SearchReplaceDialog = { ca = f[m + '_panel_casesensitivebox'].checked; rs = f['replace_panel_replacestring'].value; + if (tinymce.isIE) { + r = ed.getDoc().selection.createRange(); + } + if (s == '') return; function fix() { // Correct Firefox graphics glitches + // TODO: Verify if this is actually needed any more, maybe it was for very old FF versions? r = se.getRng().cloneRange(); ed.getDoc().execCommand('SelectAll', false, null); se.setRng(r); }; function replace() { - if (tinymce.isIE) - ed.selection.getRng().duplicate().pasteHTML(rs); // Needs to be duplicated due to selection bug in IE - else - ed.getDoc().execCommand('InsertHTML', false, rs); + ed.selection.setContent(rs); // Needs to be duplicated due to selection bug in IE }; // IE flags @@ -70,11 +76,18 @@ var SearchReplaceDialog = { ed.selection.collapse(true); if (tinymce.isIE) { + ed.focus(); + r = ed.getDoc().selection.createRange(); + while (r.findText(s, b ? -1 : 1, fl)) { r.scrollIntoView(); r.select(); replace(); fo = 1; + + if (b) { + r.moveEnd("character", -(rs.length)); // Otherwise will loop forever + } } tinyMCEPopup.storeSelection(); @@ -107,6 +120,9 @@ var SearchReplaceDialog = { return; if (tinymce.isIE) { + ed.focus(); + r = ed.getDoc().selection.createRange(); + if (r.findText(s, b ? -1 : 1, fl)) { r.scrollIntoView(); r.select(); diff --git a/include/javascript/tiny_mce/plugins/searchreplace/searchreplace.htm b/include/javascript/tiny_mce/plugins/searchreplace/searchreplace.htm index 90e80d07..bac5a184 100644 --- a/include/javascript/tiny_mce/plugins/searchreplace/searchreplace.htm +++ b/include/javascript/tiny_mce/plugins/searchreplace/searchreplace.htm @@ -7,29 +7,29 @@ - - + +
    - +
    - + ';sb[sb.length]='';sb[sb.length]='';sb[sb.length]='
    - - - +
    + + @@ -40,7 +40,7 @@ + + + + + +
    {#style_dlg.padding} - +
    @@ -289,11 +328,14 @@ @@ -301,11 +343,14 @@ @@ -313,11 +358,14 @@ @@ -325,11 +373,14 @@ @@ -342,7 +393,7 @@
    {#style_dlg.margin} -
     
    - +
    - +
      + + +
    - +
    - +
      + + +
    - +
    - +
      + + +
    - +
    - +
      + + +
    +
    @@ -350,11 +401,14 @@ @@ -362,11 +416,14 @@ @@ -374,11 +431,14 @@ @@ -386,11 +446,14 @@ @@ -402,131 +465,148 @@
    -
     
    - +
    - +
      + + +
    - +
    - +
      + + +
    - +
    - +
      + + +
    - +
    - +
      + + +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      {#style_dlg.style} {#style_dlg.width} {#style_dlg.color}
          
    {#style_dlg.top}   - - - - - - -
     
    -
      - - - - - -
     
    -
    {#style_dlg.right}   - - - - - - -
     
    -
      - - - - - -
     
    -
    {#style_dlg.bottom}   - - - - - - -
     
    -
      - - - - - -
     
    -
    {#style_dlg.left}   - - - - - - -
     
    -
      - - - - - +
    + {#style_dlg.border} +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      {#style_dlg.style} {#style_dlg.width} {#style_dlg.color}
          
    {#style_dlg.top}   + + + + + + +
      + + +
    +
      + + + + + +
     
    +
    {#style_dlg.right}   + + + + + + +
      + + +
    +
      + + + + + +
     
    +
    {#style_dlg.bottom}   + + + + + + +
      + + +
    +
      + + + + + +
     
    +
    {#style_dlg.left}   + + + + + + +
      + + +
    +
      + + + + + +
     
    +
    -
    +
    - +
    + {#style_dlg.list} +
    @@ -542,10 +622,13 @@
    +
    - +
    + {#style_dlg.position} +
    @@ -556,11 +639,14 @@ @@ -571,11 +657,14 @@ @@ -588,7 +677,7 @@
    {#style_dlg.placement} -
    - +
    - +
      + + +
    - +
    - +
      + + +
    +
    @@ -596,11 +685,14 @@ @@ -608,11 +700,14 @@ @@ -620,11 +715,14 @@ @@ -632,11 +730,14 @@ @@ -649,7 +750,7 @@
    {#style_dlg.clip} -
     
    {#style_dlg.top} - +
    - +
      + + +
    {#style_dlg.right} - +
    - +
      + + +
    {#style_dlg.bottom} - +
    - +
      + + +
    {#style_dlg.left} - +
    - +
      + + +
    +
    @@ -657,11 +758,14 @@ @@ -669,11 +773,14 @@ @@ -681,11 +788,14 @@ @@ -693,11 +803,14 @@ @@ -707,19 +820,13 @@
    +
    -
    -
    - -
     
    -
    -
    - -
    - -
    + + +
    diff --git a/include/javascript/tiny_mce/plugins/tabfocus/editor_plugin.js b/include/javascript/tiny_mce/plugins/tabfocus/editor_plugin.js new file mode 100644 index 00000000..d18689dd --- /dev/null +++ b/include/javascript/tiny_mce/plugins/tabfocus/editor_plugin.js @@ -0,0 +1 @@ +(function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(r){n=c.select(":input:enabled,*[tabindex]");function i(s){return s.type!="hidden"&&s.tabIndex!="-1"&&!(n[m].style.display=="none")&&!(n[m].style.visibility=="hidden")}d(n,function(t,s){if(t.id==l.id){j=s;return false}});if(r>0){for(m=j+1;m=0;m--){if(i(n[m])){return n[m]}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(n.id&&(l=tinymce.get(n.id||n.name))){l.focus()}else{window.setTimeout(function(){if(!tinymce.isWebKit){window.focus()}n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/tabfocus/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/tabfocus/editor_plugin_src.js new file mode 100644 index 00000000..1be152c7 --- /dev/null +++ b/include/javascript/tiny_mce/plugins/tabfocus/editor_plugin_src.js @@ -0,0 +1,114 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode; + + tinymce.create('tinymce.plugins.TabFocusPlugin', { + init : function(ed, url) { + function tabCancel(ed, e) { + if (e.keyCode === 9) + return Event.cancel(e); + }; + + function tabHandler(ed, e) { + var x, i, f, el, v; + + function find(d) { + el = DOM.select(':input:enabled,*[tabindex]'); + function canSelect(e) { + return e.type != 'hidden' && + e.tabIndex != '-1' && + !(el[i].style.display == "none") && + !(el[i].style.visibility == "hidden"); + } + + each(el, function(e, i) { + if (e.id == ed.id) { + x = i; + return false; + } + }); + + if (d > 0) { + for (i = x + 1; i < el.length; i++) { + if (canSelect(el[i])) + return el[i]; + } + } else { + for (i = x - 1; i >= 0; i--) { + if (canSelect(el[i])) + return el[i]; + } + } + + return null; + }; + + if (e.keyCode === 9) { + v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next'))); + + if (v.length == 1) { + v[1] = v[0]; + v[0] = ':prev'; + } + + // Find element to focus + if (e.shiftKey) { + if (v[0] == ':prev') + el = find(-1); + else + el = DOM.get(v[0]); + } else { + if (v[1] == ':next') + el = find(1); + else + el = DOM.get(v[1]); + } + + if (el) { + if (el.id && (ed = tinymce.get(el.id || el.name))) + ed.focus(); + else + window.setTimeout(function() { + if (!tinymce.isWebKit) + window.focus(); + el.focus(); + }, 10); + + return Event.cancel(e); + } + } + }; + + ed.onKeyUp.add(tabCancel); + + if (tinymce.isGecko) { + ed.onKeyPress.add(tabHandler); + ed.onKeyDown.add(tabCancel); + } else + ed.onKeyDown.add(tabHandler); + + }, + + getInfo : function() { + return { + longname : 'Tabfocus', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin); +})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/table/cell.htm b/include/javascript/tiny_mce/plugins/table/cell.htm index c9317316..b62fa547 100644 --- a/include/javascript/tiny_mce/plugins/table/cell.htm +++ b/include/javascript/tiny_mce/plugins/table/cell.htm @@ -8,14 +8,13 @@ - - +
    @@ -24,7 +23,7 @@
    {#table_dlg.general_props} -
     
    {#style_dlg.top} - +
    - +
      + + +
    {#style_dlg.right} - +
    - +
      + + +
    {#style_dlg.bottom} - +
    - +
      + + +
    {#style_dlg.left} - +
    - +
      + + +
    +
    ';sb[sb.length]='';sb[sb.length]='
    @@ -93,7 +92,7 @@
    {#table_dlg.advanced_props} - +
    @@ -125,7 +124,7 @@ ';sb[sb.length]='
    - +
    @@ -134,10 +133,10 @@ - - + + ";return g;},renderRowFooter:function(h,g){g[g.length]='";return g;},renderCellDefault:function(h,g){g.innerHTML=''+this.buildDayLabel(h)+"";},styleCellDefault:function(h,g){c.addClass(g,this.Style.CSS_CELL_SELECTABLE);},renderCellStyleHighlight1:function(h,g){c.addClass(g,this.Style.CSS_CELL_HIGHLIGHT1);},renderCellStyleHighlight2:function(h,g){c.addClass(g,this.Style.CSS_CELL_HIGHLIGHT2);},renderCellStyleHighlight3:function(h,g){c.addClass(g,this.Style.CSS_CELL_HIGHLIGHT3);},renderCellStyleHighlight4:function(h,g){c.addClass(g,this.Style.CSS_CELL_HIGHLIGHT4);},renderCellStyleToday:function(h,g){c.addClass(g,this.Style.CSS_CELL_TODAY);},renderCellStyleSelected:function(h,g){c.addClass(g,this.Style.CSS_CELL_SELECTED);},renderCellNotThisMonth:function(h,g){this.styleCellNotThisMonth(h,g);g.innerHTML=h.getDate();return f.STOP_RENDER;},styleCellNotThisMonth:function(h,g){YAHOO.util.Dom.addClass(g,this.Style.CSS_CELL_OOM);},renderBodyCellRestricted:function(h,g){c.addClass(g,this.Style.CSS_CELL);c.addClass(g,this.Style.CSS_CELL_RESTRICTED);g.innerHTML=h.getDate();return f.STOP_RENDER;},addMonths:function(i){var h=b.PAGEDATE.key,j=this.cfg.getProperty(h),g=d.add(j,d.MONTH,i);this.cfg.setProperty(h,g);this.resetRenderers();this.changePageEvent.fire(j,g);},subtractMonths:function(g){this.addMonths(-1*g);},addYears:function(i){var h=b.PAGEDATE.key,j=this.cfg.getProperty(h),g=d.add(j,d.YEAR,i);this.cfg.setProperty(h,g);this.resetRenderers();this.changePageEvent.fire(j,g);},subtractYears:function(g){this.addYears(-1*g);},nextMonth:function(){this.addMonths(1);},previousMonth:function(){this.addMonths(-1);},nextYear:function(){this.addYears(1);},previousYear:function(){this.addYears(-1);},reset:function(){this.cfg.resetProperty(b.SELECTED.key);this.cfg.resetProperty(b.PAGEDATE.key);this.resetEvent.fire();},clear:function(){this.cfg.setProperty(b.SELECTED.key,[]); +this.cfg.setProperty(b.PAGEDATE.key,new Date(this.today.getTime()));this.clearEvent.fire();},select:function(i){var l=this._toFieldArray(i),h=[],k=[],m=b.SELECTED.key;for(var g=0;g0){if(this.parent){this.parent.cfg.setProperty(m,k);}else{this.cfg.setProperty(m,k);}this.selectEvent.fire(h);}return this.getSelectedDates();},selectCell:function(j){var h=this.cells[j],n=this.cellDates[j],m=this._toDate(n),i=c.hasClass(h,this.Style.CSS_CELL_SELECTABLE);if(i){this.beforeSelectEvent.fire();var l=b.SELECTED.key;var k=this.cfg.getProperty(l);var g=n.concat();if(this._indexOfSelectedFieldArray(g)==-1){k[k.length]=g;}if(this.parent){this.parent.cfg.setProperty(l,k);}else{this.cfg.setProperty(l,k);}this.renderCellStyleSelected(m,h);this.selectEvent.fire([g]);this.doCellMouseOut.call(h,null,this);}return this.getSelectedDates();},deselect:function(k){var g=this._toFieldArray(k),j=[],m=[],n=b.SELECTED.key;for(var h=0;h0){if(this.parent){this.parent.cfg.setProperty(n,m);}else{this.cfg.setProperty(n,m);}this.deselectEvent.fire(j);}return this.getSelectedDates();},deselectCell:function(k){var h=this.cells[k],n=this.cellDates[k],i=this._indexOfSelectedFieldArray(n);var j=c.hasClass(h,this.Style.CSS_CELL_SELECTABLE);if(j){this.beforeDeselectEvent.fire();var l=this.cfg.getProperty(b.SELECTED.key),m=this._toDate(n),g=n.concat();if(i>-1){if((this.cfg.getProperty(b.PAGEDATE.key).getMonth()==m.getMonth()&&this.cfg.getProperty(b.PAGEDATE.key).getFullYear()==m.getFullYear())||this.cfg.getProperty(b.OOM_SELECT.key)){c.removeClass(h,this.Style.CSS_CELL_SELECTED);}l.splice(i,1);}if(this.parent){this.parent.cfg.setProperty(b.SELECTED.key,l);}else{this.cfg.setProperty(b.SELECTED.key,l);}this.deselectEvent.fire([g]);}return this.getSelectedDates();},deselectAll:function(){this.beforeDeselectEvent.fire();var j=b.SELECTED.key,g=this.cfg.getProperty(j),h=g.length,i=g.concat();if(this.parent){this.parent.cfg.setProperty(j,[]);}else{this.cfg.setProperty(j,[]);}if(h>0){this.deselectEvent.fire(i);}return this.getSelectedDates();},_toFieldArray:function(h){var g=[];if(h instanceof Date){g=[[h.getFullYear(),h.getMonth()+1,h.getDate()]];}else{if(e.isString(h)){g=this._parseDates(h);}else{if(e.isArray(h)){for(var j=0;jk.getTime()));},_parsePageDate:function(g){var j;if(g){if(g instanceof Date){j=d.findMonthStart(g);}else{var k,i,h;h=g.split(this.cfg.getProperty(b.DATE_FIELD_DELIMITER.key));k=parseInt(h[this.cfg.getProperty(b.MY_MONTH_POSITION.key)-1],10)-1;i=parseInt(h[this.cfg.getProperty(b.MY_YEAR_POSITION.key)-1],10)-this.Locale.YEAR_OFFSET;j=d.getDate(i,k,1);}}else{j=d.getDate(this.today.getFullYear(),this.today.getMonth(),1);}return j;},onBeforeSelect:function(){if(this.cfg.getProperty(b.MULTI_SELECT.key)===false){if(this.parent){this.parent.callChildFunction("clearAllBodyCellStyles",this.Style.CSS_CELL_SELECTED);this.parent.deselectAll();}else{this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);this.deselectAll();}}},onSelect:function(g){},onBeforeDeselect:function(){},onDeselect:function(g){},onChangePage:function(){this.render();},onRender:function(){},onReset:function(){this.render();},onClear:function(){this.render();},validate:function(){return true;},_parseDate:function(j){var k=j.split(this.Locale.DATE_FIELD_DELIMITER),g;if(k.length==2){g=[k[this.Locale.MD_MONTH_POSITION-1],k[this.Locale.MD_DAY_POSITION-1]];g.type=f.MONTH_DAY;}else{g=[k[this.Locale.MDY_YEAR_POSITION-1]-this.Locale.YEAR_OFFSET,k[this.Locale.MDY_MONTH_POSITION-1],k[this.Locale.MDY_DAY_POSITION-1]];g.type=f.DATE;}for(var h=0;h0){this.init.apply(this,arguments);}}b.DEFAULT_CONFIG=b._DEFAULT_CONFIG=g.DEFAULT_CONFIG;b.DEFAULT_CONFIG.PAGES={key:"pages",value:2};var c=b.DEFAULT_CONFIG;b.prototype={init:function(k,i,j){var h=this._parseArgs(arguments);k=h.id;i=h.container;j=h.config;this.oDomContainer=d.get(i);if(!this.oDomContainer.id){this.oDomContainer.id=d.generateId();}if(!k){k=this.oDomContainer.id+"_t";}this.id=k;this.containerId=this.oDomContainer.id;this.initEvents();this.initStyles();this.pages=[];d.addClass(this.oDomContainer,b.CSS_CONTAINER);d.addClass(this.oDomContainer,b.CSS_MULTI_UP);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.setupConfig();if(j){this.cfg.applyConfig(j,true);}this.cfg.fireQueue();},setupConfig:function(){var h=this.cfg;h.addProperty(c.PAGES.key,{value:c.PAGES.value,validator:h.checkNumber,handler:this.configPages});h.addProperty(c.YEAR_OFFSET.key,{value:c.YEAR_OFFSET.value,handler:this.delegateConfig,supercedes:c.YEAR_OFFSET.supercedes,suppressEvent:true});h.addProperty(c.TODAY.key,{value:new Date(c.TODAY.value.getTime()),supercedes:c.TODAY.supercedes,handler:this.configToday,suppressEvent:false});h.addProperty(c.PAGEDATE.key,{value:c.PAGEDATE.value||new Date(c.TODAY.value.getTime()),handler:this.configPageDate});h.addProperty(c.SELECTED.key,{value:[],handler:this.configSelected});h.addProperty(c.TITLE.key,{value:c.TITLE.value,handler:this.configTitle});h.addProperty(c.CLOSE.key,{value:c.CLOSE.value,handler:this.configClose});h.addProperty(c.IFRAME.key,{value:c.IFRAME.value,handler:this.configIframe,validator:h.checkBoolean});h.addProperty(c.MINDATE.key,{value:c.MINDATE.value,handler:this.delegateConfig});h.addProperty(c.MAXDATE.key,{value:c.MAXDATE.value,handler:this.delegateConfig});h.addProperty(c.MULTI_SELECT.key,{value:c.MULTI_SELECT.value,handler:this.delegateConfig,validator:h.checkBoolean});h.addProperty(c.OOM_SELECT.key,{value:c.OOM_SELECT.value,handler:this.delegateConfig,validator:h.checkBoolean});h.addProperty(c.START_WEEKDAY.key,{value:c.START_WEEKDAY.value,handler:this.delegateConfig,validator:h.checkNumber});h.addProperty(c.SHOW_WEEKDAYS.key,{value:c.SHOW_WEEKDAYS.value,handler:this.delegateConfig,validator:h.checkBoolean});h.addProperty(c.SHOW_WEEK_HEADER.key,{value:c.SHOW_WEEK_HEADER.value,handler:this.delegateConfig,validator:h.checkBoolean});h.addProperty(c.SHOW_WEEK_FOOTER.key,{value:c.SHOW_WEEK_FOOTER.value,handler:this.delegateConfig,validator:h.checkBoolean});h.addProperty(c.HIDE_BLANK_WEEKS.key,{value:c.HIDE_BLANK_WEEKS.value,handler:this.delegateConfig,validator:h.checkBoolean});h.addProperty(c.NAV_ARROW_LEFT.key,{value:c.NAV_ARROW_LEFT.value,handler:this.delegateConfig});h.addProperty(c.NAV_ARROW_RIGHT.key,{value:c.NAV_ARROW_RIGHT.value,handler:this.delegateConfig});h.addProperty(c.MONTHS_SHORT.key,{value:c.MONTHS_SHORT.value,handler:this.delegateConfig});h.addProperty(c.MONTHS_LONG.key,{value:c.MONTHS_LONG.value,handler:this.delegateConfig});h.addProperty(c.WEEKDAYS_1CHAR.key,{value:c.WEEKDAYS_1CHAR.value,handler:this.delegateConfig});h.addProperty(c.WEEKDAYS_SHORT.key,{value:c.WEEKDAYS_SHORT.value,handler:this.delegateConfig});h.addProperty(c.WEEKDAYS_MEDIUM.key,{value:c.WEEKDAYS_MEDIUM.value,handler:this.delegateConfig});h.addProperty(c.WEEKDAYS_LONG.key,{value:c.WEEKDAYS_LONG.value,handler:this.delegateConfig});h.addProperty(c.LOCALE_MONTHS.key,{value:c.LOCALE_MONTHS.value,handler:this.delegateConfig});h.addProperty(c.LOCALE_WEEKDAYS.key,{value:c.LOCALE_WEEKDAYS.value,handler:this.delegateConfig});h.addProperty(c.DATE_DELIMITER.key,{value:c.DATE_DELIMITER.value,handler:this.delegateConfig});h.addProperty(c.DATE_FIELD_DELIMITER.key,{value:c.DATE_FIELD_DELIMITER.value,handler:this.delegateConfig});h.addProperty(c.DATE_RANGE_DELIMITER.key,{value:c.DATE_RANGE_DELIMITER.value,handler:this.delegateConfig});h.addProperty(c.MY_MONTH_POSITION.key,{value:c.MY_MONTH_POSITION.value,handler:this.delegateConfig,validator:h.checkNumber}); +h.addProperty(c.MY_YEAR_POSITION.key,{value:c.MY_YEAR_POSITION.value,handler:this.delegateConfig,validator:h.checkNumber});h.addProperty(c.MD_MONTH_POSITION.key,{value:c.MD_MONTH_POSITION.value,handler:this.delegateConfig,validator:h.checkNumber});h.addProperty(c.MD_DAY_POSITION.key,{value:c.MD_DAY_POSITION.value,handler:this.delegateConfig,validator:h.checkNumber});h.addProperty(c.MDY_MONTH_POSITION.key,{value:c.MDY_MONTH_POSITION.value,handler:this.delegateConfig,validator:h.checkNumber});h.addProperty(c.MDY_DAY_POSITION.key,{value:c.MDY_DAY_POSITION.value,handler:this.delegateConfig,validator:h.checkNumber});h.addProperty(c.MDY_YEAR_POSITION.key,{value:c.MDY_YEAR_POSITION.value,handler:this.delegateConfig,validator:h.checkNumber});h.addProperty(c.MY_LABEL_MONTH_POSITION.key,{value:c.MY_LABEL_MONTH_POSITION.value,handler:this.delegateConfig,validator:h.checkNumber});h.addProperty(c.MY_LABEL_YEAR_POSITION.key,{value:c.MY_LABEL_YEAR_POSITION.value,handler:this.delegateConfig,validator:h.checkNumber});h.addProperty(c.MY_LABEL_MONTH_SUFFIX.key,{value:c.MY_LABEL_MONTH_SUFFIX.value,handler:this.delegateConfig});h.addProperty(c.MY_LABEL_YEAR_SUFFIX.key,{value:c.MY_LABEL_YEAR_SUFFIX.value,handler:this.delegateConfig});h.addProperty(c.NAV.key,{value:c.NAV.value,handler:this.configNavigator});h.addProperty(c.STRINGS.key,{value:c.STRINGS.value,handler:this.configStrings,validator:function(i){return e.isObject(i);},supercedes:c.STRINGS.supercedes});},initEvents:function(){var j=this,l="Event",m=YAHOO.util.CustomEvent;var i=function(o,s,n){for(var r=0;r0){m=new Date(o);this._setMonthOnDate(m,m.getMonth()+i);q.pageDate=m;}var h=this.constructChild(v,r,q);d.removeClass(h.oDomContainer,this.Style.CSS_SINGLE);d.addClass(h.oDomContainer,t);if(i===0){o=h.cfg.getProperty(j);d.addClass(h.oDomContainer,w);}if(i==(l-1)){d.addClass(h.oDomContainer,k);}h.parent=this;h.index=i;this.pages[this.pages.length]=h;}},configPageDate:function(o,n,l){var j=n[0],m;var k=c.PAGEDATE.key;for(var i=0;i0)?this.pages[0].cfg.getProperty(k):[];this.cfg.setProperty(k,i,true);},delegateConfig:function(i,h,l){var m=h[0];var k;for(var j=0;j0){j+=1;}k.setYear(j);}},render:function(){this.renderHeader();for(var i=0;i=0;--i){var h=this.pages[i];h.previousMonth();}},nextYear:function(){for(var i=0;i11)){var h=f.add(i,f.MONTH,j-i.getMonth());i.setTime(h.getTime());}else{i.setMonth(j);}},_fixWidth:function(){var h=0;for(var j=0;j0){this.oDomContainer.style.width=h+"px";}},toString:function(){return"CalendarGroup "+this.id;},destroy:function(){if(this.beforeDestroyEvent.fire()){var k=this;if(k.navigator){k.navigator.destroy();}if(k.cfg){k.cfg.destroy();}a.purgeElement(k.oDomContainer,true);d.removeClass(k.oDomContainer,b.CSS_CONTAINER);d.removeClass(k.oDomContainer,b.CSS_MULTI_UP);for(var j=0,h=k.pages.length;j=0&&a<12){this._month=a;}this._updateMonthUI();},setYear:function(b){var a=YAHOO.widget.CalendarNavigator.YR_PATTERN;if(YAHOO.lang.isNumber(b)&&a.test(b+"")){this._year=b;}this._updateYearUI();},render:function(){this.cal.beforeRenderNavEvent.fire();if(!this.__rendered){this.createNav();this.createMask();this.applyListeners(); +this.__rendered=true;}this.cal.renderNavEvent.fire();},createNav:function(){var b=YAHOO.widget.CalendarNavigator;var c=this._doc;var e=c.createElement("div");e.className=b.CLASSES.NAV;var a=this.renderNavContents([]);e.innerHTML=a.join("");this.cal.oDomContainer.appendChild(e);this.navEl=e;this.yearEl=c.getElementById(this.id+b.YEAR_SUFFIX);this.monthEl=c.getElementById(this.id+b.MONTH_SUFFIX);this.errorEl=c.getElementById(this.id+b.ERROR_SUFFIX);this.submitEl=c.getElementById(this.id+b.SUBMIT_SUFFIX);this.cancelEl=c.getElementById(this.id+b.CANCEL_SUFFIX);if(YAHOO.env.ua.gecko&&this.yearEl&&this.yearEl.type=="text"){this.yearEl.setAttribute("autocomplete","off");}this._setFirstLastElements();},createMask:function(){var b=YAHOO.widget.CalendarNavigator.CLASSES;var a=this._doc.createElement("div");a.className=b.MASK;this.cal.oDomContainer.appendChild(a);this.maskEl=a;},_syncMask:function(){var b=this.cal.oDomContainer;if(b&&this.maskEl){var a=YAHOO.util.Dom.getRegion(b);YAHOO.util.Dom.setStyle(this.maskEl,"width",a.right-a.left+"px");YAHOO.util.Dom.setStyle(this.maskEl,"height",a.bottom-a.top+"px");}},renderNavContents:function(a){var c=YAHOO.widget.CalendarNavigator,d=c.CLASSES,b=a;b[b.length]='
    ';this.renderMonth(b);b[b.length]="
    ";b[b.length]='
    ';this.renderYear(b);b[b.length]="
    ";b[b.length]='
    ';this.renderButtons(b);b[b.length]="
    ";b[b.length]='
    ';return b;},renderMonth:function(c){var f=YAHOO.widget.CalendarNavigator,g=f.CLASSES;var j=this.id+f.MONTH_SUFFIX,e=this.__getCfg("monthFormat"),a=this.cal.cfg.getProperty((e==YAHOO.widget.Calendar.SHORT)?"MONTHS_SHORT":"MONTHS_LONG"),d=c;if(a&&a.length>0){d[d.length]='";d[d.length]='";}return d;},renderYear:function(b){var d=YAHOO.widget.CalendarNavigator,e=d.CLASSES;var f=this.id+d.YEAR_SUFFIX,a=d.YR_MAX_DIGITS,c=b;c[c.length]='";c[c.length]='';return c;},renderButtons:function(a){var c=YAHOO.widget.CalendarNavigator.CLASSES;var b=a;b[b.length]='';b[b.length]='";b[b.length]="";b[b.length]='';b[b.length]='";b[b.length]="";return b;},applyListeners:function(){var b=YAHOO.util.Event;function a(){if(this.validate()){this.setYear(this._getYearFromUI());}}function c(){this.setMonth(this._getMonthFromUI());}b.on(this.submitEl,"click",this.submit,this,true);b.on(this.cancelEl,"click",this.cancel,this,true);b.on(this.yearEl,"blur",a,this,true);b.on(this.monthEl,"change",c,this,true);if(this.__isIEQuirks){YAHOO.util.Event.on(this.cal.oDomContainer,"resize",this._syncMask,this,true);}this.applyKeyListeners();},purgeListeners:function(){var a=YAHOO.util.Event;a.removeListener(this.submitEl,"click",this.submit);a.removeListener(this.cancelEl,"click",this.cancel);a.removeListener(this.yearEl,"blur");a.removeListener(this.monthEl,"change");if(this.__isIEQuirks){a.removeListener(this.cal.oDomContainer,"resize",this._syncMask);}this.purgeKeyListeners();},applyKeyListeners:function(){var d=YAHOO.util.Event,a=YAHOO.env.ua;var c=(a.ie||a.webkit)?"keydown":"keypress";var b=(a.ie||a.opera||a.webkit)?"keydown":"keypress";d.on(this.yearEl,"keypress",this._handleEnterKey,this,true);d.on(this.yearEl,c,this._handleDirectionKeys,this,true);d.on(this.lastCtrl,b,this._handleTabKey,this,true);d.on(this.firstCtrl,b,this._handleShiftTabKey,this,true);},purgeKeyListeners:function(){var d=YAHOO.util.Event,a=YAHOO.env.ua;var c=(a.ie||a.webkit)?"keydown":"keypress";var b=(a.ie||a.opera||a.webkit)?"keydown":"keypress";d.removeListener(this.yearEl,"keypress",this._handleEnterKey);d.removeListener(this.yearEl,c,this._handleDirectionKeys);d.removeListener(this.lastCtrl,b,this._handleTabKey);d.removeListener(this.firstCtrl,b,this._handleShiftTabKey);},submit:function(){if(this.validate()){this.hide();this.setMonth(this._getMonthFromUI());this.setYear(this._getYearFromUI());var b=this.cal;var a=YAHOO.widget.CalendarNavigator.UPDATE_DELAY;if(a>0){var c=this;window.setTimeout(function(){c._update(b);},a);}else{this._update(b);}}},_update:function(b){var a=YAHOO.widget.DateMath.getDate(this.getYear()-b.cfg.getProperty("YEAR_OFFSET"),this.getMonth(),1);b.cfg.setProperty("pagedate",a);b.render();},cancel:function(){this.hide();},validate:function(){if(this._getYearFromUI()!==null){this.clearErrors();return true;}else{this.setYearError();this.setError(this.__getCfg("invalidYear",true));return false;}},setError:function(a){if(this.errorEl){this.errorEl.innerHTML=a;this._show(this.errorEl,true);}},clearError:function(){if(this.errorEl){this.errorEl.innerHTML="";this._show(this.errorEl,false);}},setYearError:function(){YAHOO.util.Dom.addClass(this.yearEl,YAHOO.widget.CalendarNavigator.CLASSES.INVALID);},clearYearError:function(){YAHOO.util.Dom.removeClass(this.yearEl,YAHOO.widget.CalendarNavigator.CLASSES.INVALID);},clearErrors:function(){this.clearError();this.clearYearError();},setInitialFocus:function(){var a=this.submitEl,c=this.__getCfg("initialFocus");if(c&&c.toLowerCase){c=c.toLowerCase();if(c=="year"){a=this.yearEl;try{this.yearEl.select();}catch(b){}}else{if(c=="month"){a=this.monthEl;}}}if(a&&YAHOO.lang.isFunction(a.focus)){try{a.focus();}catch(d){}}},erase:function(){if(this.__rendered){this.purgeListeners(); +this.yearEl=null;this.monthEl=null;this.errorEl=null;this.submitEl=null;this.cancelEl=null;this.firstCtrl=null;this.lastCtrl=null;if(this.navEl){this.navEl.innerHTML="";}var b=this.navEl.parentNode;if(b){b.removeChild(this.navEl);}this.navEl=null;var a=this.maskEl.parentNode;if(a){a.removeChild(this.maskEl);}this.maskEl=null;this.__rendered=false;}},destroy:function(){this.erase();this._doc=null;this.cal=null;this.id=null;},_show:function(b,a){if(b){YAHOO.util.Dom.setStyle(b,"display",(a)?"block":"none");}},_getMonthFromUI:function(){if(this.monthEl){return this.monthEl.selectedIndex;}else{return 0;}},_getYearFromUI:function(){var b=YAHOO.widget.CalendarNavigator;var a=null;if(this.yearEl){var c=this.yearEl.value;c=c.replace(b.TRIM,"$1");if(b.YR_PATTERN.test(c)){a=parseInt(c,10);}}return a;},_updateYearUI:function(){if(this.yearEl&&this._year!==null){this.yearEl.value=this._year;}},_updateMonthUI:function(){if(this.monthEl){this.monthEl.selectedIndex=this._month;}},_setFirstLastElements:function(){this.firstCtrl=this.monthEl;this.lastCtrl=this.cancelEl;if(this.__isMac){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420){this.firstCtrl=this.monthEl;this.lastCtrl=this.yearEl;}if(YAHOO.env.ua.gecko){this.firstCtrl=this.yearEl;this.lastCtrl=this.yearEl;}}},_handleEnterKey:function(b){var a=YAHOO.util.KeyListener.KEY;if(YAHOO.util.Event.getCharCode(b)==a.ENTER){YAHOO.util.Event.preventDefault(b);this.submit();}},_handleDirectionKeys:function(h){var g=YAHOO.util.Event,a=YAHOO.util.KeyListener.KEY,d=YAHOO.widget.CalendarNavigator;var f=(this.yearEl.value)?parseInt(this.yearEl.value,10):null;if(isFinite(f)){var b=false;switch(g.getCharCode(h)){case a.UP:this.yearEl.value=f+d.YR_MINOR_INC;b=true;break;case a.DOWN:this.yearEl.value=Math.max(f-d.YR_MINOR_INC,0);b=true;break;case a.PAGE_UP:this.yearEl.value=f+d.YR_MAJOR_INC;b=true;break;case a.PAGE_DOWN:this.yearEl.value=Math.max(f-d.YR_MAJOR_INC,0);b=true;break;default:break;}if(b){g.preventDefault(h);try{this.yearEl.select();}catch(c){}}}},_handleTabKey:function(d){var c=YAHOO.util.Event,a=YAHOO.util.KeyListener.KEY;if(c.getCharCode(d)==a.TAB&&!d.shiftKey){try{c.preventDefault(d);this.firstCtrl.focus();}catch(b){}}},_handleShiftTabKey:function(d){var c=YAHOO.util.Event,a=YAHOO.util.KeyListener.KEY;if(d.shiftKey&&c.getCharCode(d)==a.TAB){try{c.preventDefault(d);this.lastCtrl.focus();}catch(b){}}},__getCfg:function(d,b){var c=YAHOO.widget.CalendarNavigator.DEFAULT_CONFIG;var a=this.cal.cfg.getProperty("navigator");if(b){return(a!==true&&a.strings&&a.strings[d])?a.strings[d]:c.strings[d];}else{return(a!==true&&a[d])?a[d]:c[d];}},__isMac:(navigator.userAgent.toLowerCase().indexOf("macintosh")!=-1)};YAHOO.register("calendar",YAHOO.widget.Calendar,{version:"2.9.0",build:"2800"}); \ No newline at end of file diff --git a/include/javascript/yui/build/calendar/calendar.js b/include/javascript/yui/build/calendar/calendar.js index d6e20162..05ce3ce3 100644 --- a/include/javascript/yui/build/calendar/calendar.js +++ b/include/javascript/yui/build/calendar/calendar.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ (function () { @@ -235,27 +235,18 @@ version: 2.8.0r4 * @return {Boolean} True is the property was reset, false if not */ resetProperty: function (key) { - key = key.toLowerCase(); - + var property = this.config[key]; - + if (property && property.event) { - - if (this.initialConfig[key] && - !Lang.isUndefined(this.initialConfig[key])) { - + if (key in this.initialConfig) { this.setProperty(key, this.initialConfig[key]); - return true; - } - } else { - return false; } - }, /** @@ -1289,6 +1280,7 @@ Calendar.DEFAULT_CONFIG = { MINDATE : {key:"mindate", value:null}, MAXDATE : {key:"maxdate", value:null}, MULTI_SELECT : {key:"multi_select", value:false}, + OOM_SELECT : {key:"oom_select", value:false}, START_WEEKDAY : {key:"start_weekday", value:0}, SHOW_WEEKDAYS : {key:"show_weekdays", value:true}, SHOW_WEEK_HEADER : {key:"show_week_header", value:false}, @@ -1614,9 +1606,12 @@ Calendar.prototype = { this.oDomContainer = Dom.get(container); + this._oDoc = this.oDomContainer.ownerDocument; + if (!this.oDomContainer.id) { this.oDomContainer.id = Dom.generateId(); } + if (!id) { id = this.oDomContainer.id + "_t"; } @@ -2012,7 +2007,7 @@ Calendar.prototype = { cal.deselectCell(index); } else { cal.selectCell(index); - } + } } else { link = cell.getElementsByTagName("a")[0]; @@ -2108,9 +2103,9 @@ Calendar.prototype = { cfg.addProperty(DEF_CFG.SELECTED.key, { value:DEF_CFG.SELECTED.value.concat(), handler:this.configSelected } ); /** - * The title to display above the Calendar's month header + * The title to display above the Calendar's month header. The title is inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config title - * @type String + * @type HTML * @default "" */ cfg.addProperty(DEF_CFG.TITLE.key, { value:DEF_CFG.TITLE.value, handler:this.configTitle } ); @@ -2160,6 +2155,14 @@ Calendar.prototype = { */ cfg.addProperty(DEF_CFG.MULTI_SELECT.key, { value:DEF_CFG.MULTI_SELECT.value, handler:this.configOptions, validator:cfg.checkBoolean } ); + /** + * True if the Calendar should allow selection of out-of-month dates. False by default. + * @config OOM_SELECT + * @type Boolean + * @default false + */ + cfg.addProperty(DEF_CFG.OOM_SELECT.key, { value:DEF_CFG.OOM_SELECT.value, handler:this.configOptions, validator:cfg.checkBoolean } ); + /** * The weekday the week begins on. Default is 0 (Sunday = 0, Monday = 1 ... Saturday = 6). * @config START_WEEKDAY @@ -2201,7 +2204,7 @@ Calendar.prototype = { cfg.addProperty(DEF_CFG.HIDE_BLANK_WEEKS.key, { value:DEF_CFG.HIDE_BLANK_WEEKS.value, handler:this.configOptions, validator:cfg.checkBoolean } ); /** - * The image that should be used for the left navigation arrow. + * The image URL that should be used for the left navigation arrow. The image URL is inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config NAV_ARROW_LEFT * @type String * @deprecated You can customize the image by overriding the default CSS class for the left arrow - "calnavleft" @@ -2210,7 +2213,7 @@ Calendar.prototype = { cfg.addProperty(DEF_CFG.NAV_ARROW_LEFT.key, { value:DEF_CFG.NAV_ARROW_LEFT.value, handler:this.configOptions } ); /** - * The image that should be used for the right navigation arrow. + * The image URL that should be used for the right navigation arrow. The image URL is inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config NAV_ARROW_RIGHT * @type String * @deprecated You can customize the image by overriding the default CSS class for the right arrow - "calnavright" @@ -2221,49 +2224,49 @@ Calendar.prototype = { // Locale properties /** - * The short month labels for the current locale. + * The short month labels for the current locale. The month labels are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config MONTHS_SHORT - * @type String[] + * @type HTML[] * @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] */ cfg.addProperty(DEF_CFG.MONTHS_SHORT.key, { value:DEF_CFG.MONTHS_SHORT.value, handler:this.configLocale } ); - + /** - * The long month labels for the current locale. + * The long month labels for the current locale. The month labels are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config MONTHS_LONG - * @type String[] + * @type HTML[] * @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" */ cfg.addProperty(DEF_CFG.MONTHS_LONG.key, { value:DEF_CFG.MONTHS_LONG.value, handler:this.configLocale } ); /** - * The 1-character weekday labels for the current locale. + * The 1-character weekday labels for the current locale. The weekday labels are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config WEEKDAYS_1CHAR - * @type String[] + * @type HTML[] * @default ["S", "M", "T", "W", "T", "F", "S"] */ cfg.addProperty(DEF_CFG.WEEKDAYS_1CHAR.key, { value:DEF_CFG.WEEKDAYS_1CHAR.value, handler:this.configLocale } ); /** - * The short weekday labels for the current locale. + * The short weekday labels for the current locale. The weekday labels are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config WEEKDAYS_SHORT - * @type String[] + * @type HTML[] * @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"] */ cfg.addProperty(DEF_CFG.WEEKDAYS_SHORT.key, { value:DEF_CFG.WEEKDAYS_SHORT.value, handler:this.configLocale } ); /** - * The medium weekday labels for the current locale. + * The medium weekday labels for the current locale. The weekday labels are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config WEEKDAYS_MEDIUM - * @type String[] + * @type HTML[] * @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] */ cfg.addProperty(DEF_CFG.WEEKDAYS_MEDIUM.key, { value:DEF_CFG.WEEKDAYS_MEDIUM.value, handler:this.configLocale } ); /** - * The long weekday labels for the current locale. + * The long weekday labels for the current locale. The weekday labels are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config WEEKDAYS_LONG - * @type String[] + * @type HTML[] * @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] */ cfg.addProperty(DEF_CFG.WEEKDAYS_LONG.key, { value:DEF_CFG.WEEKDAYS_LONG.value, handler:this.configLocale } ); @@ -2410,17 +2413,17 @@ Calendar.prototype = { cfg.addProperty(DEF_CFG.MY_LABEL_YEAR_POSITION.key, { value:DEF_CFG.MY_LABEL_YEAR_POSITION.value, handler:this.configLocale, validator:cfg.checkNumber } ); /** - * The suffix used after the month when rendering the Calendar header + * The suffix used after the month when rendering the Calendar header. The suffix is inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config MY_LABEL_MONTH_SUFFIX - * @type String + * @type HTML * @default " " */ cfg.addProperty(DEF_CFG.MY_LABEL_MONTH_SUFFIX.key, { value:DEF_CFG.MY_LABEL_MONTH_SUFFIX.value, handler:this.configLocale } ); /** - * The suffix used after the year when rendering the Calendar header + * The suffix used after the year when rendering the Calendar header. The suffix is inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config MY_LABEL_YEAR_SUFFIX - * @type String + * @type HTML * @default "" */ cfg.addProperty(DEF_CFG.MY_LABEL_YEAR_SUFFIX.key, { value:DEF_CFG.MY_LABEL_YEAR_SUFFIX.value, handler:this.configLocale } ); @@ -2441,13 +2444,13 @@ Calendar.prototype = { *

    *
    *
    strings
    - *
    Object : An object with the properties shown below, defining the string labels to use in the Navigator's UI + *
    Object : An object with the properties shown below, defining the string labels to use in the Navigator's UI. The strings are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. *
    - *
    month
    String : The string to use for the month label. Defaults to "Month".
    - *
    year
    String : The string to use for the year label. Defaults to "Year".
    - *
    submit
    String : The string to use for the submit button label. Defaults to "Okay".
    - *
    cancel
    String : The string to use for the cancel button label. Defaults to "Cancel".
    - *
    invalidYear
    String : The string to use for invalid year values. Defaults to "Year needs to be a number".
    + *
    month
    HTML : The markup to use for the month label. Defaults to "Month".
    + *
    year
    HTML : The markup to use for the year label. Defaults to "Year".
    + *
    submit
    HTML : The markup to use for the submit button label. Defaults to "Okay".
    + *
    cancel
    HTML : The markup to use for the cancel button label. Defaults to "Cancel".
    + *
    invalidYear
    HTML : The markup to use for invalid year values. Defaults to "Year needs to be a number".
    *
    *
    *
    monthFormat
    String : The month format to use. Either YAHOO.widget.Calendar.LONG, or YAHOO.widget.Calendar.SHORT. Defaults to YAHOO.widget.Calendar.LONG
    @@ -2480,9 +2483,9 @@ Calendar.prototype = { * @type {Object} * @default An object with the properties shown below: *
    - *
    previousMonth
    String : The string to use for the "Previous Month" navigation UI. Defaults to "Previous Month".
    - *
    nextMonth
    String : The string to use for the "Next Month" navigation UI. Defaults to "Next Month".
    - *
    close
    String : The string to use for the close button label. Defaults to "Close".
    + *
    previousMonth
    HTML : The markup to use for the "Previous Month" navigation label. Defaults to "Previous Month". The string is added to the DOM as HTML, and should be escaped by the implementor if coming from an external source.
    + *
    nextMonth
    HTML : The markup to use for the "Next Month" navigation UI. Defaults to "Next Month". The string is added to the DOM as HTML, and should be escaped by the implementor if coming from an external source.
    + *
    close
    HTML : The markup to use for the close button label. Defaults to "Close". The string is added to the DOM as HTML, and should be escaped by the implementor if coming from an external source.
    *
    */ cfg.addProperty(DEF_CFG.STRINGS.key, { @@ -2667,7 +2670,7 @@ Calendar.prototype = { }, /** - * Defines the style constants for the Calendar + * Defines the class names used by Calendar when rendering to DOM. NOTE: The class names are added to the DOM as HTML and should be escaped by the implementor if coming from an external source. * @method initStyles */ initStyles : function() { @@ -2822,7 +2825,7 @@ Calendar.prototype = { * Builds the date label that will be displayed in the calendar header or * footer, depending on configuration. * @method buildMonthLabel - * @return {String} The formatted calendar month label + * @return {HTML} The formatted calendar month label */ buildMonthLabel : function() { return this._buildMonthLabel(this.cfg.getProperty(DEF_CFG.PAGEDATE.key)); @@ -2835,7 +2838,7 @@ Calendar.prototype = { * @method _buildMonthLabel * @private * @param {Date} date - * @return {String} Formated month, year string + * @return {HTML} Formated month, year string */ _buildMonthLabel : function(date) { var monthLabel = this.Locale.LOCALE_MONTHS[date.getMonth()] + this.Locale.MY_LABEL_MONTH_SUFFIX, @@ -2847,22 +2850,22 @@ Calendar.prototype = { return monthLabel + yearLabel; } }, - + /** * Builds the date digit that will be displayed in calendar cells * @method buildDayLabel * @param {Date} workingDate The current working date - * @return {String} The formatted day label + * @return {Number} The day */ buildDayLabel : function(workingDate) { return workingDate.getDate(); }, - + /** - * Creates the title bar element and adds it to Calendar container DIV + * Creates the title bar element and adds it to Calendar container DIV. NOTE: The title parameter passed into this method is added to the DOM as HTML and should be escaped by the implementor if coming from an external source. * * @method createTitleBar - * @param {String} strTitle The title to display in the title bar + * @param {HTML} strTitle The title to display in the title bar * @return The title bar element */ createTitleBar : function(strTitle) { @@ -2889,18 +2892,18 @@ Calendar.prototype = { } Dom.removeClass(this.oDomContainer, this.Style.CSS_WITH_TITLE); }, - + /** * Creates the close button HTML element and adds it to Calendar container DIV * * @method createCloseButton - * @return The close HTML element created + * @return {HTMLElement} The close HTML element created */ createCloseButton : function() { var cssClose = YAHOO.widget.CalendarGroup.CSS_2UPCLOSE, cssLinkClose = this.Style.CSS_LINK_CLOSE, DEPR_CLOSE_PATH = "us/my/bn/x_d.gif", - + lnk = Dom.getElementsByClassName(cssLinkClose, "a", this.oDomContainer)[0], strings = this.cfg.getProperty(DEF_CFG.STRINGS.key), closeStr = (strings && strings.close) ? strings.close : ""; @@ -2943,10 +2946,10 @@ Calendar.prototype = { }, /** - * Renders the calendar header. + * Renders the calendar header. NOTE: The contents of the array passed into this method are added to the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @method renderHeader - * @param {Array} html The current working HTML array - * @return {Array} The current working HTML array + * @param {HTML[]} html The current working HTML array + * @return {HTML[]} The current working HTML array */ renderHeader : function(html) { @@ -3028,12 +3031,12 @@ Calendar.prototype = { return html; }, - + /** - * Renders the Calendar's weekday headers. + * Renders the Calendar's weekday headers. NOTE: The contents of the array passed into this method are added to the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @method buildWeekdays - * @param {Array} html The current working HTML array - * @return {Array} The current working HTML array + * @param {HTML[]} html The current working HTML array + * @return {HTML[]} The current working HTML array */ buildWeekdays : function(html) { @@ -3057,11 +3060,11 @@ Calendar.prototype = { }, /** - * Renders the calendar body. + * Renders the calendar body. NOTE: The contents of the array passed into this method are added to the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @method renderBody * @param {Date} workingDate The current working Date being used for the render process - * @param {Array} html The current working HTML array - * @return {Array} The current working HTML array + * @param {HTML[]} html The current working HTML array + * @return {HTML[]} The current working HTML array */ renderBody : function(workingDate, html) { @@ -3091,6 +3094,7 @@ Calendar.prototype = { renderer, t = this.today, cfg = this.cfg, + oom, todayYear = t.getFullYear(), todayMonth = t.getMonth(), todayDate = t.getDate(), @@ -3098,6 +3102,7 @@ Calendar.prototype = { hideBlankWeeks = cfg.getProperty(DEF_CFG.HIDE_BLANK_WEEKS.key), showWeekFooter = cfg.getProperty(DEF_CFG.SHOW_WEEK_FOOTER.key), showWeekHeader = cfg.getProperty(DEF_CFG.SHOW_WEEK_HEADER.key), + oomSelect = cfg.getProperty(DEF_CFG.OOM_SELECT.key), mindate = cfg.getProperty(DEF_CFG.MINDATE.key), maxdate = cfg.getProperty(DEF_CFG.MAXDATE.key), yearOffset = this.Locale.YEAR_OFFSET; @@ -3119,7 +3124,7 @@ Calendar.prototype = { var cal = this.parent || this; - for (var r=0;r<6;r++) { + for (var r = 0; r < 6; r++) { weekNum = DateMath.getWeekNumber(workingDate, startDay); weekClass = weekPrefix + weekNum; @@ -3149,17 +3154,22 @@ Calendar.prototype = { this.cellDates[this.cellDates.length] = workingArray; // Add this date to cellDates // Local OOM check for performance, since we already have pagedate - if (workingDate.getMonth() != useDate.getMonth()) { + oom = workingDate.getMonth() != useDate.getMonth(); + if (oom && !oomSelect) { cellRenderers[cellRenderers.length]=cal.renderCellNotThisMonth; } else { Dom.addClass(cell, workingDayPrefix + workingDate.getDay()); Dom.addClass(cell, dayPrefix + workingDate.getDate()); - for (var s=0;s maxdate.getTime())) - ) { - cellRenderers[cellRenderers.length]=cal.renderOutOfBoundsDate; + if (oom) { + cellRenderers[cellRenderers.length] = cal.styleCellNotThisMonth; + } + + if ((mindate && (workingDate.getTime() < mindate.getTime())) || (maxdate && (workingDate.getTime() > maxdate.getTime()))) { + cellRenderers[cellRenderers.length] = cal.renderOutOfBoundsDate; } else { - cellRenderers[cellRenderers.length]=cal.styleCellDefault; - cellRenderers[cellRenderers.length]=cal.renderCellDefault; + cellRenderers[cellRenderers.length] = cal.styleCellDefault; + cellRenderers[cellRenderers.length] = cal.renderCellDefault; } for (var x=0; x < cellRenderers.length; ++x) { @@ -3287,19 +3300,17 @@ Calendar.prototype = { }, /** - * Renders the calendar footer. In the default implementation, there is - * no footer. + * Renders the calendar footer. In the default implementation, there is no footer. NOTE: The contents of the array passed into this method are added to the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @method renderFooter - * @param {Array} html The current working HTML array - * @return {Array} The current working HTML array + * @param {HTML[]} html The current working HTML array + * @return {HTML[]} The current working HTML array */ renderFooter : function(html) { return html; }, /** * Renders the calendar after it has been configured. The render() method has a specific call chain that will execute * when the method is called: renderHeader, renderBody, renderFooter. - * Refer to the documentation for those methods for information on - * individual render tasks. + * Refer to the documentation for those methods for information on individual render tasks. * @method render */ render : function() { @@ -3313,7 +3324,8 @@ Calendar.prototype = { Event.purgeElement(this.oDomContainer, true); - var html = []; + var html = [], + table; html[html.length] = '
     
    - +
    @@ -146,10 +145,10 @@ - - + + ";return G;},renderRowFooter:function(H,G){G[G.length]='";return G;},renderCellDefault:function(H,G){G.innerHTML=''+this.buildDayLabel(H)+"";},styleCellDefault:function(H,G){C.addClass(G,this.Style.CSS_CELL_SELECTABLE);},renderCellStyleHighlight1:function(H,G){C.addClass(G,this.Style.CSS_CELL_HIGHLIGHT1);},renderCellStyleHighlight2:function(H,G){C.addClass(G,this.Style.CSS_CELL_HIGHLIGHT2);},renderCellStyleHighlight3:function(H,G){C.addClass(G,this.Style.CSS_CELL_HIGHLIGHT3);},renderCellStyleHighlight4:function(H,G){C.addClass(G,this.Style.CSS_CELL_HIGHLIGHT4);},renderCellStyleToday:function(H,G){C.addClass(G,this.Style.CSS_CELL_TODAY);},renderCellStyleSelected:function(H,G){C.addClass(G,this.Style.CSS_CELL_SELECTED);},renderCellNotThisMonth:function(H,G){C.addClass(G,this.Style.CSS_CELL_OOM);G.innerHTML=H.getDate();return F.STOP_RENDER;},renderBodyCellRestricted:function(H,G){C.addClass(G,this.Style.CSS_CELL);C.addClass(G,this.Style.CSS_CELL_RESTRICTED);G.innerHTML=H.getDate();return F.STOP_RENDER;},addMonths:function(I){var H=B.PAGEDATE.key,J=this.cfg.getProperty(H),G=D.add(J,D.MONTH,I);this.cfg.setProperty(H,G);this.resetRenderers();this.changePageEvent.fire(J,G);},subtractMonths:function(G){this.addMonths(-1*G);},addYears:function(I){var H=B.PAGEDATE.key,J=this.cfg.getProperty(H),G=D.add(J,D.YEAR,I);this.cfg.setProperty(H,G);this.resetRenderers();this.changePageEvent.fire(J,G);},subtractYears:function(G){this.addYears(-1*G);},nextMonth:function(){this.addMonths(1);},previousMonth:function(){this.addMonths(-1);},nextYear:function(){this.addYears(1);},previousYear:function(){this.addYears(-1);},reset:function(){this.cfg.resetProperty(B.SELECTED.key);this.cfg.resetProperty(B.PAGEDATE.key);this.resetEvent.fire();},clear:function(){this.cfg.setProperty(B.SELECTED.key,[]);this.cfg.setProperty(B.PAGEDATE.key,new Date(this.today.getTime()));this.clearEvent.fire();},select:function(I){var L=this._toFieldArray(I),H=[],K=[],M=B.SELECTED.key;for(var G=0;G0){if(this.parent){this.parent.cfg.setProperty(M,K);}else{this.cfg.setProperty(M,K);}this.selectEvent.fire(H);}return this.getSelectedDates();},selectCell:function(J){var H=this.cells[J],N=this.cellDates[J],M=this._toDate(N),I=C.hasClass(H,this.Style.CSS_CELL_SELECTABLE);if(I){this.beforeSelectEvent.fire();var L=B.SELECTED.key;var K=this.cfg.getProperty(L);var G=N.concat();if(this._indexOfSelectedFieldArray(G)==-1){K[K.length]=G;}if(this.parent){this.parent.cfg.setProperty(L,K);}else{this.cfg.setProperty(L,K);}this.renderCellStyleSelected(M,H);this.selectEvent.fire([G]);this.doCellMouseOut.call(H,null,this);}return this.getSelectedDates();},deselect:function(K){var G=this._toFieldArray(K),J=[],M=[],N=B.SELECTED.key;for(var H=0;H0){if(this.parent){this.parent.cfg.setProperty(N,M);}else{this.cfg.setProperty(N,M);}this.deselectEvent.fire(J);}return this.getSelectedDates();},deselectCell:function(K){var H=this.cells[K],N=this.cellDates[K],I=this._indexOfSelectedFieldArray(N);var J=C.hasClass(H,this.Style.CSS_CELL_SELECTABLE);if(J){this.beforeDeselectEvent.fire();var L=this.cfg.getProperty(B.SELECTED.key),M=this._toDate(N),G=N.concat();if(I>-1){if(this.cfg.getProperty(B.PAGEDATE.key).getMonth()==M.getMonth()&&this.cfg.getProperty(B.PAGEDATE.key).getFullYear()==M.getFullYear()){C.removeClass(H,this.Style.CSS_CELL_SELECTED);}L.splice(I,1);}if(this.parent){this.parent.cfg.setProperty(B.SELECTED.key,L);}else{this.cfg.setProperty(B.SELECTED.key,L);}this.deselectEvent.fire([G]);}return this.getSelectedDates();},deselectAll:function(){this.beforeDeselectEvent.fire();var J=B.SELECTED.key,G=this.cfg.getProperty(J),H=G.length,I=G.concat();if(this.parent){this.parent.cfg.setProperty(J,[]);}else{this.cfg.setProperty(J,[]);}if(H>0){this.deselectEvent.fire(I);}return this.getSelectedDates();},_toFieldArray:function(H){var G=[];if(H instanceof Date){G=[[H.getFullYear(),H.getMonth()+1,H.getDate()]];}else{if(E.isString(H)){G=this._parseDates(H);}else{if(E.isArray(H)){for(var I=0;IK.getTime()));},_parsePageDate:function(G){var J;if(G){if(G instanceof Date){J=D.findMonthStart(G);}else{var K,I,H;H=G.split(this.cfg.getProperty(B.DATE_FIELD_DELIMITER.key));K=parseInt(H[this.cfg.getProperty(B.MY_MONTH_POSITION.key)-1],10)-1;I=parseInt(H[this.cfg.getProperty(B.MY_YEAR_POSITION.key)-1],10)-this.Locale.YEAR_OFFSET;J=D.getDate(I,K,1);}}else{J=D.getDate(this.today.getFullYear(),this.today.getMonth(),1);}return J;},onBeforeSelect:function(){if(this.cfg.getProperty(B.MULTI_SELECT.key)===false){if(this.parent){this.parent.callChildFunction("clearAllBodyCellStyles",this.Style.CSS_CELL_SELECTED);this.parent.deselectAll();}else{this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);this.deselectAll();}}},onSelect:function(G){},onBeforeDeselect:function(){},onDeselect:function(G){},onChangePage:function(){this.render();},onRender:function(){},onReset:function(){this.render();},onClear:function(){this.render();},validate:function(){return true;},_parseDate:function(I){var J=I.split(this.Locale.DATE_FIELD_DELIMITER),G;if(J.length==2){G=[J[this.Locale.MD_MONTH_POSITION-1],J[this.Locale.MD_DAY_POSITION-1]];G.type=F.MONTH_DAY;}else{G=[J[this.Locale.MDY_YEAR_POSITION-1]-this.Locale.YEAR_OFFSET,J[this.Locale.MDY_MONTH_POSITION-1],J[this.Locale.MDY_DAY_POSITION-1]];G.type=F.DATE;}for(var H=0;H0){this.init.apply(this,arguments);}}B.DEFAULT_CONFIG=B._DEFAULT_CONFIG=G.DEFAULT_CONFIG;B.DEFAULT_CONFIG.PAGES={key:"pages",value:2};var C=B.DEFAULT_CONFIG;B.prototype={init:function(K,I,J){var H=this._parseArgs(arguments);K=H.id;I=H.container;J=H.config;this.oDomContainer=D.get(I);if(!this.oDomContainer.id){this.oDomContainer.id=D.generateId();}if(!K){K=this.oDomContainer.id+"_t";}this.id=K;this.containerId=this.oDomContainer.id;this.initEvents();this.initStyles();this.pages=[];D.addClass(this.oDomContainer,B.CSS_CONTAINER);D.addClass(this.oDomContainer,B.CSS_MULTI_UP);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.setupConfig();if(J){this.cfg.applyConfig(J,true);}this.cfg.fireQueue();if(YAHOO.env.ua.opera){this.renderEvent.subscribe(this._fixWidth,this,true);this.showEvent.subscribe(this._fixWidth,this,true);}},setupConfig:function(){var H=this.cfg;H.addProperty(C.PAGES.key,{value:C.PAGES.value,validator:H.checkNumber,handler:this.configPages});H.addProperty(C.YEAR_OFFSET.key,{value:C.YEAR_OFFSET.value,handler:this.delegateConfig,supercedes:C.YEAR_OFFSET.supercedes,suppressEvent:true});H.addProperty(C.TODAY.key,{value:new Date(C.TODAY.value.getTime()),supercedes:C.TODAY.supercedes,handler:this.configToday,suppressEvent:false});H.addProperty(C.PAGEDATE.key,{value:C.PAGEDATE.value||new Date(C.TODAY.value.getTime()),handler:this.configPageDate});H.addProperty(C.SELECTED.key,{value:[],handler:this.configSelected});H.addProperty(C.TITLE.key,{value:C.TITLE.value,handler:this.configTitle});H.addProperty(C.CLOSE.key,{value:C.CLOSE.value,handler:this.configClose});H.addProperty(C.IFRAME.key,{value:C.IFRAME.value,handler:this.configIframe,validator:H.checkBoolean});H.addProperty(C.MINDATE.key,{value:C.MINDATE.value,handler:this.delegateConfig});H.addProperty(C.MAXDATE.key,{value:C.MAXDATE.value,handler:this.delegateConfig});H.addProperty(C.MULTI_SELECT.key,{value:C.MULTI_SELECT.value,handler:this.delegateConfig,validator:H.checkBoolean});H.addProperty(C.START_WEEKDAY.key,{value:C.START_WEEKDAY.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.SHOW_WEEKDAYS.key,{value:C.SHOW_WEEKDAYS.value,handler:this.delegateConfig,validator:H.checkBoolean});H.addProperty(C.SHOW_WEEK_HEADER.key,{value:C.SHOW_WEEK_HEADER.value,handler:this.delegateConfig,validator:H.checkBoolean});H.addProperty(C.SHOW_WEEK_FOOTER.key,{value:C.SHOW_WEEK_FOOTER.value,handler:this.delegateConfig,validator:H.checkBoolean});H.addProperty(C.HIDE_BLANK_WEEKS.key,{value:C.HIDE_BLANK_WEEKS.value,handler:this.delegateConfig,validator:H.checkBoolean});H.addProperty(C.NAV_ARROW_LEFT.key,{value:C.NAV_ARROW_LEFT.value,handler:this.delegateConfig});H.addProperty(C.NAV_ARROW_RIGHT.key,{value:C.NAV_ARROW_RIGHT.value,handler:this.delegateConfig});H.addProperty(C.MONTHS_SHORT.key,{value:C.MONTHS_SHORT.value,handler:this.delegateConfig});H.addProperty(C.MONTHS_LONG.key,{value:C.MONTHS_LONG.value,handler:this.delegateConfig});H.addProperty(C.WEEKDAYS_1CHAR.key,{value:C.WEEKDAYS_1CHAR.value,handler:this.delegateConfig});H.addProperty(C.WEEKDAYS_SHORT.key,{value:C.WEEKDAYS_SHORT.value,handler:this.delegateConfig});H.addProperty(C.WEEKDAYS_MEDIUM.key,{value:C.WEEKDAYS_MEDIUM.value,handler:this.delegateConfig});H.addProperty(C.WEEKDAYS_LONG.key,{value:C.WEEKDAYS_LONG.value,handler:this.delegateConfig});H.addProperty(C.LOCALE_MONTHS.key,{value:C.LOCALE_MONTHS.value,handler:this.delegateConfig});H.addProperty(C.LOCALE_WEEKDAYS.key,{value:C.LOCALE_WEEKDAYS.value,handler:this.delegateConfig});H.addProperty(C.DATE_DELIMITER.key,{value:C.DATE_DELIMITER.value,handler:this.delegateConfig});H.addProperty(C.DATE_FIELD_DELIMITER.key,{value:C.DATE_FIELD_DELIMITER.value,handler:this.delegateConfig});H.addProperty(C.DATE_RANGE_DELIMITER.key,{value:C.DATE_RANGE_DELIMITER.value,handler:this.delegateConfig});H.addProperty(C.MY_MONTH_POSITION.key,{value:C.MY_MONTH_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MY_YEAR_POSITION.key,{value:C.MY_YEAR_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MD_MONTH_POSITION.key,{value:C.MD_MONTH_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber}); -H.addProperty(C.MD_DAY_POSITION.key,{value:C.MD_DAY_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MDY_MONTH_POSITION.key,{value:C.MDY_MONTH_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MDY_DAY_POSITION.key,{value:C.MDY_DAY_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MDY_YEAR_POSITION.key,{value:C.MDY_YEAR_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MY_LABEL_MONTH_POSITION.key,{value:C.MY_LABEL_MONTH_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MY_LABEL_YEAR_POSITION.key,{value:C.MY_LABEL_YEAR_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MY_LABEL_MONTH_SUFFIX.key,{value:C.MY_LABEL_MONTH_SUFFIX.value,handler:this.delegateConfig});H.addProperty(C.MY_LABEL_YEAR_SUFFIX.key,{value:C.MY_LABEL_YEAR_SUFFIX.value,handler:this.delegateConfig});H.addProperty(C.NAV.key,{value:C.NAV.value,handler:this.configNavigator});H.addProperty(C.STRINGS.key,{value:C.STRINGS.value,handler:this.configStrings,validator:function(I){return E.isObject(I);},supercedes:C.STRINGS.supercedes});},initEvents:function(){var J=this,L="Event",M=YAHOO.util.CustomEvent;var I=function(O,R,N){for(var Q=0;Q0){M=new Date(O);this._setMonthOnDate(M,M.getMonth()+I);P.pageDate=M;}var H=this.constructChild(U,Q,P);D.removeClass(H.oDomContainer,this.Style.CSS_SINGLE);D.addClass(H.oDomContainer,S);if(I===0){O=H.cfg.getProperty(J);D.addClass(H.oDomContainer,V);}if(I==(L-1)){D.addClass(H.oDomContainer,K);}H.parent=this;H.index=I;this.pages[this.pages.length]=H;}},configPageDate:function(O,N,L){var J=N[0],M;var K=C.PAGEDATE.key;for(var I=0;I0)?this.pages[0].cfg.getProperty(K):[];this.cfg.setProperty(K,I,true);},delegateConfig:function(I,H,L){var M=H[0];var K;for(var J=0;J0){J+=1;}K.setYear(J);}},render:function(){this.renderHeader();for(var I=0;I=0;--I){var H=this.pages[I];H.previousMonth();}},nextYear:function(){for(var I=0;I11)){var H=F.add(I,F.MONTH,J-I.getMonth());I.setTime(H.getTime());}else{I.setMonth(J);}},_fixWidth:function(){var H=0;for(var J=0;J0){this.oDomContainer.style.width=H+"px";}},toString:function(){return"CalendarGroup "+this.id;},destroy:function(){if(this.beforeDestroyEvent.fire()){var J=this;if(J.navigator){J.navigator.destroy();}if(J.cfg){J.cfg.destroy();}A.purgeElement(J.oDomContainer,true);D.removeClass(J.oDomContainer,B.CSS_CONTAINER);D.removeClass(J.oDomContainer,B.CSS_MULTI_UP);for(var I=0,H=J.pages.length;I=0&&A<12){this._month=A;}this._updateMonthUI();},setYear:function(B){var A=YAHOO.widget.CalendarNavigator.YR_PATTERN;if(YAHOO.lang.isNumber(B)&&A.test(B+"")){this._year=B;}this._updateYearUI();},render:function(){this.cal.beforeRenderNavEvent.fire();if(!this.__rendered){this.createNav();this.createMask();this.applyListeners();this.__rendered=true;}this.cal.renderNavEvent.fire();},createNav:function(){var B=YAHOO.widget.CalendarNavigator;var C=this._doc;var D=C.createElement("div");D.className=B.CLASSES.NAV;var A=this.renderNavContents([]);D.innerHTML=A.join("");this.cal.oDomContainer.appendChild(D); -this.navEl=D;this.yearEl=C.getElementById(this.id+B.YEAR_SUFFIX);this.monthEl=C.getElementById(this.id+B.MONTH_SUFFIX);this.errorEl=C.getElementById(this.id+B.ERROR_SUFFIX);this.submitEl=C.getElementById(this.id+B.SUBMIT_SUFFIX);this.cancelEl=C.getElementById(this.id+B.CANCEL_SUFFIX);if(YAHOO.env.ua.gecko&&this.yearEl&&this.yearEl.type=="text"){this.yearEl.setAttribute("autocomplete","off");}this._setFirstLastElements();},createMask:function(){var B=YAHOO.widget.CalendarNavigator.CLASSES;var A=this._doc.createElement("div");A.className=B.MASK;this.cal.oDomContainer.appendChild(A);this.maskEl=A;},_syncMask:function(){var B=this.cal.oDomContainer;if(B&&this.maskEl){var A=YAHOO.util.Dom.getRegion(B);YAHOO.util.Dom.setStyle(this.maskEl,"width",A.right-A.left+"px");YAHOO.util.Dom.setStyle(this.maskEl,"height",A.bottom-A.top+"px");}},renderNavContents:function(A){var D=YAHOO.widget.CalendarNavigator,E=D.CLASSES,B=A;B[B.length]='
    ';this.renderMonth(B);B[B.length]="
    ";B[B.length]='
    ';this.renderYear(B);B[B.length]="
    ";B[B.length]='
    ';this.renderButtons(B);B[B.length]="
    ";B[B.length]='
    ';return B;},renderMonth:function(D){var G=YAHOO.widget.CalendarNavigator,H=G.CLASSES;var I=this.id+G.MONTH_SUFFIX,F=this.__getCfg("monthFormat"),A=this.cal.cfg.getProperty((F==YAHOO.widget.Calendar.SHORT)?"MONTHS_SHORT":"MONTHS_LONG"),E=D;if(A&&A.length>0){E[E.length]='";E[E.length]='";}return E;},renderYear:function(B){var E=YAHOO.widget.CalendarNavigator,F=E.CLASSES;var G=this.id+E.YEAR_SUFFIX,A=E.YR_MAX_DIGITS,D=B;D[D.length]='";D[D.length]='';return D;},renderButtons:function(A){var D=YAHOO.widget.CalendarNavigator.CLASSES;var B=A;B[B.length]='';B[B.length]='";B[B.length]="";B[B.length]='';B[B.length]='";B[B.length]="";return B;},applyListeners:function(){var B=YAHOO.util.Event;function A(){if(this.validate()){this.setYear(this._getYearFromUI());}}function C(){this.setMonth(this._getMonthFromUI());}B.on(this.submitEl,"click",this.submit,this,true);B.on(this.cancelEl,"click",this.cancel,this,true);B.on(this.yearEl,"blur",A,this,true);B.on(this.monthEl,"change",C,this,true);if(this.__isIEQuirks){YAHOO.util.Event.on(this.cal.oDomContainer,"resize",this._syncMask,this,true);}this.applyKeyListeners();},purgeListeners:function(){var A=YAHOO.util.Event;A.removeListener(this.submitEl,"click",this.submit);A.removeListener(this.cancelEl,"click",this.cancel);A.removeListener(this.yearEl,"blur");A.removeListener(this.monthEl,"change");if(this.__isIEQuirks){A.removeListener(this.cal.oDomContainer,"resize",this._syncMask);}this.purgeKeyListeners();},applyKeyListeners:function(){var D=YAHOO.util.Event,A=YAHOO.env.ua;var C=(A.ie||A.webkit)?"keydown":"keypress";var B=(A.ie||A.opera||A.webkit)?"keydown":"keypress";D.on(this.yearEl,"keypress",this._handleEnterKey,this,true);D.on(this.yearEl,C,this._handleDirectionKeys,this,true);D.on(this.lastCtrl,B,this._handleTabKey,this,true);D.on(this.firstCtrl,B,this._handleShiftTabKey,this,true);},purgeKeyListeners:function(){var D=YAHOO.util.Event,A=YAHOO.env.ua;var C=(A.ie||A.webkit)?"keydown":"keypress";var B=(A.ie||A.opera||A.webkit)?"keydown":"keypress";D.removeListener(this.yearEl,"keypress",this._handleEnterKey);D.removeListener(this.yearEl,C,this._handleDirectionKeys);D.removeListener(this.lastCtrl,B,this._handleTabKey);D.removeListener(this.firstCtrl,B,this._handleShiftTabKey);},submit:function(){if(this.validate()){this.hide();this.setMonth(this._getMonthFromUI());this.setYear(this._getYearFromUI());var B=this.cal;var A=YAHOO.widget.CalendarNavigator.UPDATE_DELAY;if(A>0){var C=this;window.setTimeout(function(){C._update(B);},A);}else{this._update(B);}}},_update:function(B){var A=YAHOO.widget.DateMath.getDate(this.getYear()-B.cfg.getProperty("YEAR_OFFSET"),this.getMonth(),1);B.cfg.setProperty("pagedate",A);B.render();},cancel:function(){this.hide();},validate:function(){if(this._getYearFromUI()!==null){this.clearErrors();return true;}else{this.setYearError();this.setError(this.__getCfg("invalidYear",true));return false;}},setError:function(A){if(this.errorEl){this.errorEl.innerHTML=A;this._show(this.errorEl,true);}},clearError:function(){if(this.errorEl){this.errorEl.innerHTML="";this._show(this.errorEl,false);}},setYearError:function(){YAHOO.util.Dom.addClass(this.yearEl,YAHOO.widget.CalendarNavigator.CLASSES.INVALID);},clearYearError:function(){YAHOO.util.Dom.removeClass(this.yearEl,YAHOO.widget.CalendarNavigator.CLASSES.INVALID);},clearErrors:function(){this.clearError();this.clearYearError();},setInitialFocus:function(){var A=this.submitEl,C=this.__getCfg("initialFocus");if(C&&C.toLowerCase){C=C.toLowerCase();if(C=="year"){A=this.yearEl;try{this.yearEl.select();}catch(B){}}else{if(C=="month"){A=this.monthEl;}}}if(A&&YAHOO.lang.isFunction(A.focus)){try{A.focus();}catch(D){}}},erase:function(){if(this.__rendered){this.purgeListeners();this.yearEl=null;this.monthEl=null;this.errorEl=null;this.submitEl=null;this.cancelEl=null;this.firstCtrl=null;this.lastCtrl=null;if(this.navEl){this.navEl.innerHTML="";}var B=this.navEl.parentNode;if(B){B.removeChild(this.navEl);}this.navEl=null;var A=this.maskEl.parentNode; -if(A){A.removeChild(this.maskEl);}this.maskEl=null;this.__rendered=false;}},destroy:function(){this.erase();this._doc=null;this.cal=null;this.id=null;},_show:function(B,A){if(B){YAHOO.util.Dom.setStyle(B,"display",(A)?"block":"none");}},_getMonthFromUI:function(){if(this.monthEl){return this.monthEl.selectedIndex;}else{return 0;}},_getYearFromUI:function(){var B=YAHOO.widget.CalendarNavigator;var A=null;if(this.yearEl){var C=this.yearEl.value;C=C.replace(B.TRIM,"$1");if(B.YR_PATTERN.test(C)){A=parseInt(C,10);}}return A;},_updateYearUI:function(){if(this.yearEl&&this._year!==null){this.yearEl.value=this._year;}},_updateMonthUI:function(){if(this.monthEl){this.monthEl.selectedIndex=this._month;}},_setFirstLastElements:function(){this.firstCtrl=this.monthEl;this.lastCtrl=this.cancelEl;if(this.__isMac){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420){this.firstCtrl=this.monthEl;this.lastCtrl=this.yearEl;}if(YAHOO.env.ua.gecko){this.firstCtrl=this.yearEl;this.lastCtrl=this.yearEl;}}},_handleEnterKey:function(B){var A=YAHOO.util.KeyListener.KEY;if(YAHOO.util.Event.getCharCode(B)==A.ENTER){YAHOO.util.Event.preventDefault(B);this.submit();}},_handleDirectionKeys:function(H){var G=YAHOO.util.Event,A=YAHOO.util.KeyListener.KEY,D=YAHOO.widget.CalendarNavigator;var F=(this.yearEl.value)?parseInt(this.yearEl.value,10):null;if(isFinite(F)){var B=false;switch(G.getCharCode(H)){case A.UP:this.yearEl.value=F+D.YR_MINOR_INC;B=true;break;case A.DOWN:this.yearEl.value=Math.max(F-D.YR_MINOR_INC,0);B=true;break;case A.PAGE_UP:this.yearEl.value=F+D.YR_MAJOR_INC;B=true;break;case A.PAGE_DOWN:this.yearEl.value=Math.max(F-D.YR_MAJOR_INC,0);B=true;break;default:break;}if(B){G.preventDefault(H);try{this.yearEl.select();}catch(C){}}}},_handleTabKey:function(D){var C=YAHOO.util.Event,A=YAHOO.util.KeyListener.KEY;if(C.getCharCode(D)==A.TAB&&!D.shiftKey){try{C.preventDefault(D);this.firstCtrl.focus();}catch(B){}}},_handleShiftTabKey:function(D){var C=YAHOO.util.Event,A=YAHOO.util.KeyListener.KEY;if(D.shiftKey&&C.getCharCode(D)==A.TAB){try{C.preventDefault(D);this.lastCtrl.focus();}catch(B){}}},__getCfg:function(D,B){var C=YAHOO.widget.CalendarNavigator.DEFAULT_CONFIG;var A=this.cal.cfg.getProperty("navigator");if(B){return(A!==true&&A.strings&&A.strings[D])?A.strings[D]:C.strings[D];}else{return(A!==true&&A[D])?A[D]:C[D];}},__isMac:(navigator.userAgent.toLowerCase().indexOf("macintosh")!=-1)};YAHOO.register("calendar",YAHOO.widget.Calendar,{version:"2.8.0r4",build:"2449"}); \ No newline at end of file +(function(){YAHOO.util.Config=function(d){if(d){this.init(d);}};var b=YAHOO.lang,c=YAHOO.util.CustomEvent,a=YAHOO.util.Config;a.CONFIG_CHANGED_EVENT="configChanged";a.BOOLEAN_TYPE="boolean";a.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(d){this.owner=d;this.configChangedEvent=this.createEvent(a.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=c.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(d){return(typeof d==a.BOOLEAN_TYPE);},checkNumber:function(d){return(!isNaN(d));},fireEvent:function(d,f){var e=this.config[d];if(e&&e.event){e.event.fire(f);}},addProperty:function(e,d){e=e.toLowerCase();this.config[e]=d;d.event=this.createEvent(e,{scope:this.owner});d.event.signature=c.LIST;d.key=e;if(d.handler){d.event.subscribe(d.handler,this.owner);}this.setProperty(e,d.value,true);if(!d.suppressEvent){this.queueProperty(e,d.value);}},getConfig:function(){var d={},f=this.config,g,e;for(g in f){if(b.hasOwnProperty(f,g)){e=f[g];if(e&&e.event){d[g]=e.value;}}}return d;},getProperty:function(d){var e=this.config[d.toLowerCase()];if(e&&e.event){return e.value;}else{return undefined;}},resetProperty:function(d){d=d.toLowerCase();var e=this.config[d];if(e&&e.event){if(d in this.initialConfig){this.setProperty(d,this.initialConfig[d]);return true;}}else{return false;}},setProperty:function(e,g,d){var f;e=e.toLowerCase();if(this.queueInProgress&&!d){this.queueProperty(e,g);return true;}else{f=this.config[e];if(f&&f.event){if(f.validator&&!f.validator(g)){return false;}else{f.value=g;if(!d){this.fireEvent(e,g);this.configChangedEvent.fire([e,g]);}return true;}}else{return false;}}},queueProperty:function(v,r){v=v.toLowerCase();var u=this.config[v],l=false,k,g,h,j,p,t,f,n,o,d,m,w,e;if(u&&u.event){if(!b.isUndefined(r)&&u.validator&&!u.validator(r)){return false;}else{if(!b.isUndefined(r)){u.value=r;}else{r=u.value;}l=false;k=this.eventQueue.length;for(m=0;m0){g=f-1;do{d=e.subscribers[g];if(d&&d.obj==j&&d.fn==h){return true;}}while(g--);}return false;};YAHOO.lang.augmentProto(a,YAHOO.util.EventProvider);}());YAHOO.widget.DateMath={DAY:"D",WEEK:"W",YEAR:"Y",MONTH:"M",ONE_DAY_MS:1000*60*60*24,WEEK_ONE_JAN_DATE:1,add:function(a,e,c){var g=new Date(a.getTime());switch(e){case this.MONTH:var f=a.getMonth()+c;var b=0;if(f<0){while(f<0){f+=12;b-=1;}}else{if(f>11){while(f>11){f-=12;b+=1;}}}g.setMonth(f);g.setFullYear(a.getFullYear()+b);break;case this.DAY:this._addDays(g,c);break;case this.YEAR:g.setFullYear(a.getFullYear()+c);break;case this.WEEK:this._addDays(g,(c*7));break;}return g;},_addDays:function(e,c){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420){if(c<0){for(var b=-128;ca;c-=a){e.setDate(e.getDate()+a);}}}e.setDate(e.getDate()+c);},subtract:function(a,c,b){return this.add(a,c,(b*-1));},before:function(c,b){var a=b.getTime();if(c.getTime()a){return true;}else{return false;}},between:function(b,a,c){if(this.after(b,a)&&this.before(b,c)){return true;}else{return false;}},getJan1:function(a){return this.getDate(a,0,1);},getDayOffset:function(b,d){var c=this.getJan1(d);var a=Math.ceil((b.getTime()-c.getTime())/this.ONE_DAY_MS);return a;},getWeekNumber:function(d,b,g){b=b||0;g=g||this.WEEK_ONE_JAN_DATE;var h=this.clearTime(d),l,m;if(h.getDay()===b){l=h;}else{l=this.getFirstDayOfWeek(h,b);}var i=l.getFullYear();m=new Date(l.getTime()+6*this.ONE_DAY_MS);var f;if(i!==m.getFullYear()&&m.getDate()>=g){f=1;}else{var e=this.clearTime(this.getDate(i,0,g)),a=this.getFirstDayOfWeek(e,b);var j=Math.round((h.getTime()-a.getTime())/this.ONE_DAY_MS);var k=j%7;var c=(j-k)/7;f=c+1;}return f;},getFirstDayOfWeek:function(d,a){a=a||0; +var b=d.getDay(),c=(b-a+7)%7;return this.subtract(d,this.DAY,c);},isYearOverlapWeek:function(a){var c=false;var b=this.add(a,this.DAY,6);if(b.getFullYear()!=a.getFullYear()){c=true;}return c;},isMonthOverlapWeek:function(a){var c=false;var b=this.add(a,this.DAY,6);if(b.getMonth()!=a.getMonth()){c=true;}return c;},findMonthStart:function(a){var b=this.getDate(a.getFullYear(),a.getMonth(),1);return b;},findMonthEnd:function(b){var d=this.findMonthStart(b);var c=this.add(d,this.MONTH,1);var a=this.subtract(c,this.DAY,1);return a;},clearTime:function(a){a.setHours(12,0,0,0);return a;},getDate:function(e,a,c){var b=null;if(YAHOO.lang.isUndefined(c)){c=1;}if(e>=100){b=new Date(e,a,c);}else{b=new Date();b.setFullYear(e);b.setMonth(a);b.setDate(c);b.setHours(0,0,0,0);}return b;}};(function(){var c=YAHOO.util.Dom,a=YAHOO.util.Event,e=YAHOO.lang,d=YAHOO.widget.DateMath;function f(i,g,h){this.init.apply(this,arguments);}f.IMG_ROOT=null;f.DATE="D";f.MONTH_DAY="MD";f.WEEKDAY="WD";f.RANGE="R";f.MONTH="M";f.DISPLAY_DAYS=42;f.STOP_RENDER="S";f.SHORT="short";f.LONG="long";f.MEDIUM="medium";f.ONE_CHAR="1char";f.DEFAULT_CONFIG={YEAR_OFFSET:{key:"year_offset",value:0,supercedes:["pagedate","selected","mindate","maxdate"]},TODAY:{key:"today",value:new Date(),supercedes:["pagedate"]},PAGEDATE:{key:"pagedate",value:null},SELECTED:{key:"selected",value:[]},TITLE:{key:"title",value:""},CLOSE:{key:"close",value:false},IFRAME:{key:"iframe",value:(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6)?true:false},MINDATE:{key:"mindate",value:null},MAXDATE:{key:"maxdate",value:null},MULTI_SELECT:{key:"multi_select",value:false},OOM_SELECT:{key:"oom_select",value:false},START_WEEKDAY:{key:"start_weekday",value:0},SHOW_WEEKDAYS:{key:"show_weekdays",value:true},SHOW_WEEK_HEADER:{key:"show_week_header",value:false},SHOW_WEEK_FOOTER:{key:"show_week_footer",value:false},HIDE_BLANK_WEEKS:{key:"hide_blank_weeks",value:false},NAV_ARROW_LEFT:{key:"nav_arrow_left",value:null},NAV_ARROW_RIGHT:{key:"nav_arrow_right",value:null},MONTHS_SHORT:{key:"months_short",value:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},MONTHS_LONG:{key:"months_long",value:["January","February","March","April","May","June","July","August","September","October","November","December"]},WEEKDAYS_1CHAR:{key:"weekdays_1char",value:["S","M","T","W","T","F","S"]},WEEKDAYS_SHORT:{key:"weekdays_short",value:["Su","Mo","Tu","We","Th","Fr","Sa"]},WEEKDAYS_MEDIUM:{key:"weekdays_medium",value:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},WEEKDAYS_LONG:{key:"weekdays_long",value:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},LOCALE_MONTHS:{key:"locale_months",value:"long"},LOCALE_WEEKDAYS:{key:"locale_weekdays",value:"short"},DATE_DELIMITER:{key:"date_delimiter",value:","},DATE_FIELD_DELIMITER:{key:"date_field_delimiter",value:"/"},DATE_RANGE_DELIMITER:{key:"date_range_delimiter",value:"-"},MY_MONTH_POSITION:{key:"my_month_position",value:1},MY_YEAR_POSITION:{key:"my_year_position",value:2},MD_MONTH_POSITION:{key:"md_month_position",value:1},MD_DAY_POSITION:{key:"md_day_position",value:2},MDY_MONTH_POSITION:{key:"mdy_month_position",value:1},MDY_DAY_POSITION:{key:"mdy_day_position",value:2},MDY_YEAR_POSITION:{key:"mdy_year_position",value:3},MY_LABEL_MONTH_POSITION:{key:"my_label_month_position",value:1},MY_LABEL_YEAR_POSITION:{key:"my_label_year_position",value:2},MY_LABEL_MONTH_SUFFIX:{key:"my_label_month_suffix",value:" "},MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix",value:""},NAV:{key:"navigator",value:null},STRINGS:{key:"strings",value:{previousMonth:"Previous Month",nextMonth:"Next Month",close:"Close"},supercedes:["close","title"]}};f._DEFAULT_CONFIG=f.DEFAULT_CONFIG;var b=f.DEFAULT_CONFIG;f._EVENT_TYPES={BEFORE_SELECT:"beforeSelect",SELECT:"select",BEFORE_DESELECT:"beforeDeselect",DESELECT:"deselect",CHANGE_PAGE:"changePage",BEFORE_RENDER:"beforeRender",RENDER:"render",BEFORE_DESTROY:"beforeDestroy",DESTROY:"destroy",RESET:"reset",CLEAR:"clear",BEFORE_HIDE:"beforeHide",HIDE:"hide",BEFORE_SHOW:"beforeShow",SHOW:"show",BEFORE_HIDE_NAV:"beforeHideNav",HIDE_NAV:"hideNav",BEFORE_SHOW_NAV:"beforeShowNav",SHOW_NAV:"showNav",BEFORE_RENDER_NAV:"beforeRenderNav",RENDER_NAV:"renderNav"};f.STYLES={CSS_ROW_HEADER:"calrowhead",CSS_ROW_FOOTER:"calrowfoot",CSS_CELL:"calcell",CSS_CELL_SELECTOR:"selector",CSS_CELL_SELECTED:"selected",CSS_CELL_SELECTABLE:"selectable",CSS_CELL_RESTRICTED:"restricted",CSS_CELL_TODAY:"today",CSS_CELL_OOM:"oom",CSS_CELL_OOB:"previous",CSS_HEADER:"calheader",CSS_HEADER_TEXT:"calhead",CSS_BODY:"calbody",CSS_WEEKDAY_CELL:"calweekdaycell",CSS_WEEKDAY_ROW:"calweekdayrow",CSS_FOOTER:"calfoot",CSS_CALENDAR:"yui-calendar",CSS_SINGLE:"single",CSS_CONTAINER:"yui-calcontainer",CSS_NAV_LEFT:"calnavleft",CSS_NAV_RIGHT:"calnavright",CSS_NAV:"calnav",CSS_CLOSE:"calclose",CSS_CELL_TOP:"calcelltop",CSS_CELL_LEFT:"calcellleft",CSS_CELL_RIGHT:"calcellright",CSS_CELL_BOTTOM:"calcellbottom",CSS_CELL_HOVER:"calcellhover",CSS_CELL_HIGHLIGHT1:"highlight1",CSS_CELL_HIGHLIGHT2:"highlight2",CSS_CELL_HIGHLIGHT3:"highlight3",CSS_CELL_HIGHLIGHT4:"highlight4",CSS_WITH_TITLE:"withtitle",CSS_FIXED_SIZE:"fixedsize",CSS_LINK_CLOSE:"link-close"};f._STYLES=f.STYLES;f.prototype={Config:null,parent:null,index:-1,cells:null,cellDates:null,id:null,containerId:null,oDomContainer:null,today:null,renderStack:null,_renderStack:null,oNavigator:null,_selectedDates:null,domEventMap:null,_parseArgs:function(h){var g={id:null,container:null,config:null};if(h&&h.length&&h.length>0){switch(h.length){case 1:g.id=null;g.container=h[0];g.config=null;break;case 2:if(e.isObject(h[1])&&!h[1].tagName&&!(h[1] instanceof String)){g.id=null;g.container=h[0];g.config=h[1];}else{g.id=h[0];g.container=h[1];g.config=null;}break;default:g.id=h[0];g.container=h[1];g.config=h[2];break;}}else{}return g;},init:function(j,h,i){var g=this._parseArgs(arguments);j=g.id;h=g.container;i=g.config;this.oDomContainer=c.get(h);this._oDoc=this.oDomContainer.ownerDocument;if(!this.oDomContainer.id){this.oDomContainer.id=c.generateId(); +}if(!j){j=this.oDomContainer.id+"_t";}this.id=j;this.containerId=this.oDomContainer.id;this.initEvents();this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.initStyles();c.addClass(this.oDomContainer,this.Style.CSS_CONTAINER);c.addClass(this.oDomContainer,this.Style.CSS_SINGLE);this.cellDates=[];this.cells=[];this.renderStack=[];this._renderStack=[];this.setupConfig();if(i){this.cfg.applyConfig(i,true);}this.cfg.fireQueue();this.today=this.cfg.getProperty("today");},configIframe:function(i,h,j){var g=h[0];if(!this.parent){if(c.inDocument(this.oDomContainer)){if(g){var k=c.getStyle(this.oDomContainer,"position");if(k=="absolute"||k=="relative"){if(!c.inDocument(this.iframe)){this.iframe=document.createElement("iframe");this.iframe.src="javascript:false;";c.setStyle(this.iframe,"opacity","0");if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6){c.addClass(this.iframe,this.Style.CSS_FIXED_SIZE);}this.oDomContainer.insertBefore(this.iframe,this.oDomContainer.firstChild);}}}else{if(this.iframe){if(this.iframe.parentNode){this.iframe.parentNode.removeChild(this.iframe);}this.iframe=null;}}}}},configTitle:function(h,g,i){var k=g[0];if(k){this.createTitleBar(k);}else{var j=this.cfg.getProperty(b.CLOSE.key);if(!j){this.removeTitleBar();}else{this.createTitleBar(" ");}}},configClose:function(h,g,i){var k=g[0],j=this.cfg.getProperty(b.TITLE.key);if(k){if(!j){this.createTitleBar(" ");}this.createCloseButton();}else{this.removeCloseButton();if(!j){this.removeTitleBar();}}},initEvents:function(){var g=f._EVENT_TYPES,i=YAHOO.util.CustomEvent,h=this;h.beforeSelectEvent=new i(g.BEFORE_SELECT);h.selectEvent=new i(g.SELECT);h.beforeDeselectEvent=new i(g.BEFORE_DESELECT);h.deselectEvent=new i(g.DESELECT);h.changePageEvent=new i(g.CHANGE_PAGE);h.beforeRenderEvent=new i(g.BEFORE_RENDER);h.renderEvent=new i(g.RENDER);h.beforeDestroyEvent=new i(g.BEFORE_DESTROY);h.destroyEvent=new i(g.DESTROY);h.resetEvent=new i(g.RESET);h.clearEvent=new i(g.CLEAR);h.beforeShowEvent=new i(g.BEFORE_SHOW);h.showEvent=new i(g.SHOW);h.beforeHideEvent=new i(g.BEFORE_HIDE);h.hideEvent=new i(g.HIDE);h.beforeShowNavEvent=new i(g.BEFORE_SHOW_NAV);h.showNavEvent=new i(g.SHOW_NAV);h.beforeHideNavEvent=new i(g.BEFORE_HIDE_NAV);h.hideNavEvent=new i(g.HIDE_NAV);h.beforeRenderNavEvent=new i(g.BEFORE_RENDER_NAV);h.renderNavEvent=new i(g.RENDER_NAV);h.beforeSelectEvent.subscribe(h.onBeforeSelect,this,true);h.selectEvent.subscribe(h.onSelect,this,true);h.beforeDeselectEvent.subscribe(h.onBeforeDeselect,this,true);h.deselectEvent.subscribe(h.onDeselect,this,true);h.changePageEvent.subscribe(h.onChangePage,this,true);h.renderEvent.subscribe(h.onRender,this,true);h.resetEvent.subscribe(h.onReset,this,true);h.clearEvent.subscribe(h.onClear,this,true);},doPreviousMonthNav:function(h,g){a.preventDefault(h);setTimeout(function(){g.previousMonth();var j=c.getElementsByClassName(g.Style.CSS_NAV_LEFT,"a",g.oDomContainer);if(j&&j[0]){try{j[0].focus();}catch(i){}}},0);},doNextMonthNav:function(h,g){a.preventDefault(h);setTimeout(function(){g.nextMonth();var j=c.getElementsByClassName(g.Style.CSS_NAV_RIGHT,"a",g.oDomContainer);if(j&&j[0]){try{j[0].focus();}catch(i){}}},0);},doSelectCell:function(m,g){var r,o,i,l;var n=a.getTarget(m),h=n.tagName.toLowerCase(),k=false;while(h!="td"&&!c.hasClass(n,g.Style.CSS_CELL_SELECTABLE)){if(!k&&h=="a"&&c.hasClass(n,g.Style.CSS_CELL_SELECTOR)){k=true;}n=n.parentNode;h=n.tagName.toLowerCase();if(n==this.oDomContainer||h=="html"){return;}}if(k){a.preventDefault(m);}r=n;if(c.hasClass(r,g.Style.CSS_CELL_SELECTABLE)){l=g.getIndexFromId(r.id);if(l>-1){o=g.cellDates[l];if(o){i=d.getDate(o[0],o[1]-1,o[2]);var q;if(g.Options.MULTI_SELECT){q=r.getElementsByTagName("a")[0];if(q){q.blur();}var j=g.cellDates[l];var p=g._indexOfSelectedFieldArray(j);if(p>-1){g.deselectCell(l);}else{g.selectCell(l);}}else{q=r.getElementsByTagName("a")[0];if(q){q.blur();}g.selectCell(l);}}}}},doCellMouseOver:function(i,h){var g;if(i){g=a.getTarget(i);}else{g=this;}while(g.tagName&&g.tagName.toLowerCase()!="td"){g=g.parentNode;if(!g.tagName||g.tagName.toLowerCase()=="html"){return;}}if(c.hasClass(g,h.Style.CSS_CELL_SELECTABLE)){c.addClass(g,h.Style.CSS_CELL_HOVER);}},doCellMouseOut:function(i,h){var g;if(i){g=a.getTarget(i);}else{g=this;}while(g.tagName&&g.tagName.toLowerCase()!="td"){g=g.parentNode;if(!g.tagName||g.tagName.toLowerCase()=="html"){return;}}if(c.hasClass(g,h.Style.CSS_CELL_SELECTABLE)){c.removeClass(g,h.Style.CSS_CELL_HOVER);}},setupConfig:function(){var g=this.cfg;g.addProperty(b.TODAY.key,{value:new Date(b.TODAY.value.getTime()),supercedes:b.TODAY.supercedes,handler:this.configToday,suppressEvent:true});g.addProperty(b.PAGEDATE.key,{value:b.PAGEDATE.value||new Date(b.TODAY.value.getTime()),handler:this.configPageDate});g.addProperty(b.SELECTED.key,{value:b.SELECTED.value.concat(),handler:this.configSelected});g.addProperty(b.TITLE.key,{value:b.TITLE.value,handler:this.configTitle});g.addProperty(b.CLOSE.key,{value:b.CLOSE.value,handler:this.configClose});g.addProperty(b.IFRAME.key,{value:b.IFRAME.value,handler:this.configIframe,validator:g.checkBoolean});g.addProperty(b.MINDATE.key,{value:b.MINDATE.value,handler:this.configMinDate});g.addProperty(b.MAXDATE.key,{value:b.MAXDATE.value,handler:this.configMaxDate});g.addProperty(b.MULTI_SELECT.key,{value:b.MULTI_SELECT.value,handler:this.configOptions,validator:g.checkBoolean});g.addProperty(b.OOM_SELECT.key,{value:b.OOM_SELECT.value,handler:this.configOptions,validator:g.checkBoolean});g.addProperty(b.START_WEEKDAY.key,{value:b.START_WEEKDAY.value,handler:this.configOptions,validator:g.checkNumber});g.addProperty(b.SHOW_WEEKDAYS.key,{value:b.SHOW_WEEKDAYS.value,handler:this.configOptions,validator:g.checkBoolean});g.addProperty(b.SHOW_WEEK_HEADER.key,{value:b.SHOW_WEEK_HEADER.value,handler:this.configOptions,validator:g.checkBoolean});g.addProperty(b.SHOW_WEEK_FOOTER.key,{value:b.SHOW_WEEK_FOOTER.value,handler:this.configOptions,validator:g.checkBoolean});g.addProperty(b.HIDE_BLANK_WEEKS.key,{value:b.HIDE_BLANK_WEEKS.value,handler:this.configOptions,validator:g.checkBoolean}); +g.addProperty(b.NAV_ARROW_LEFT.key,{value:b.NAV_ARROW_LEFT.value,handler:this.configOptions});g.addProperty(b.NAV_ARROW_RIGHT.key,{value:b.NAV_ARROW_RIGHT.value,handler:this.configOptions});g.addProperty(b.MONTHS_SHORT.key,{value:b.MONTHS_SHORT.value,handler:this.configLocale});g.addProperty(b.MONTHS_LONG.key,{value:b.MONTHS_LONG.value,handler:this.configLocale});g.addProperty(b.WEEKDAYS_1CHAR.key,{value:b.WEEKDAYS_1CHAR.value,handler:this.configLocale});g.addProperty(b.WEEKDAYS_SHORT.key,{value:b.WEEKDAYS_SHORT.value,handler:this.configLocale});g.addProperty(b.WEEKDAYS_MEDIUM.key,{value:b.WEEKDAYS_MEDIUM.value,handler:this.configLocale});g.addProperty(b.WEEKDAYS_LONG.key,{value:b.WEEKDAYS_LONG.value,handler:this.configLocale});var h=function(){g.refireEvent(b.LOCALE_MONTHS.key);g.refireEvent(b.LOCALE_WEEKDAYS.key);};g.subscribeToConfigEvent(b.START_WEEKDAY.key,h,this,true);g.subscribeToConfigEvent(b.MONTHS_SHORT.key,h,this,true);g.subscribeToConfigEvent(b.MONTHS_LONG.key,h,this,true);g.subscribeToConfigEvent(b.WEEKDAYS_1CHAR.key,h,this,true);g.subscribeToConfigEvent(b.WEEKDAYS_SHORT.key,h,this,true);g.subscribeToConfigEvent(b.WEEKDAYS_MEDIUM.key,h,this,true);g.subscribeToConfigEvent(b.WEEKDAYS_LONG.key,h,this,true);g.addProperty(b.LOCALE_MONTHS.key,{value:b.LOCALE_MONTHS.value,handler:this.configLocaleValues});g.addProperty(b.LOCALE_WEEKDAYS.key,{value:b.LOCALE_WEEKDAYS.value,handler:this.configLocaleValues});g.addProperty(b.YEAR_OFFSET.key,{value:b.YEAR_OFFSET.value,supercedes:b.YEAR_OFFSET.supercedes,handler:this.configLocale});g.addProperty(b.DATE_DELIMITER.key,{value:b.DATE_DELIMITER.value,handler:this.configLocale});g.addProperty(b.DATE_FIELD_DELIMITER.key,{value:b.DATE_FIELD_DELIMITER.value,handler:this.configLocale});g.addProperty(b.DATE_RANGE_DELIMITER.key,{value:b.DATE_RANGE_DELIMITER.value,handler:this.configLocale});g.addProperty(b.MY_MONTH_POSITION.key,{value:b.MY_MONTH_POSITION.value,handler:this.configLocale,validator:g.checkNumber});g.addProperty(b.MY_YEAR_POSITION.key,{value:b.MY_YEAR_POSITION.value,handler:this.configLocale,validator:g.checkNumber});g.addProperty(b.MD_MONTH_POSITION.key,{value:b.MD_MONTH_POSITION.value,handler:this.configLocale,validator:g.checkNumber});g.addProperty(b.MD_DAY_POSITION.key,{value:b.MD_DAY_POSITION.value,handler:this.configLocale,validator:g.checkNumber});g.addProperty(b.MDY_MONTH_POSITION.key,{value:b.MDY_MONTH_POSITION.value,handler:this.configLocale,validator:g.checkNumber});g.addProperty(b.MDY_DAY_POSITION.key,{value:b.MDY_DAY_POSITION.value,handler:this.configLocale,validator:g.checkNumber});g.addProperty(b.MDY_YEAR_POSITION.key,{value:b.MDY_YEAR_POSITION.value,handler:this.configLocale,validator:g.checkNumber});g.addProperty(b.MY_LABEL_MONTH_POSITION.key,{value:b.MY_LABEL_MONTH_POSITION.value,handler:this.configLocale,validator:g.checkNumber});g.addProperty(b.MY_LABEL_YEAR_POSITION.key,{value:b.MY_LABEL_YEAR_POSITION.value,handler:this.configLocale,validator:g.checkNumber});g.addProperty(b.MY_LABEL_MONTH_SUFFIX.key,{value:b.MY_LABEL_MONTH_SUFFIX.value,handler:this.configLocale});g.addProperty(b.MY_LABEL_YEAR_SUFFIX.key,{value:b.MY_LABEL_YEAR_SUFFIX.value,handler:this.configLocale});g.addProperty(b.NAV.key,{value:b.NAV.value,handler:this.configNavigator});g.addProperty(b.STRINGS.key,{value:b.STRINGS.value,handler:this.configStrings,validator:function(i){return e.isObject(i);},supercedes:b.STRINGS.supercedes});},configStrings:function(h,g,i){var j=e.merge(b.STRINGS.value,g[0]);this.cfg.setProperty(b.STRINGS.key,j,true);},configPageDate:function(h,g,i){this.cfg.setProperty(b.PAGEDATE.key,this._parsePageDate(g[0]),true);},configMinDate:function(h,g,i){var j=g[0];if(e.isString(j)){j=this._parseDate(j);this.cfg.setProperty(b.MINDATE.key,d.getDate(j[0],(j[1]-1),j[2]));}},configMaxDate:function(h,g,i){var j=g[0];if(e.isString(j)){j=this._parseDate(j);this.cfg.setProperty(b.MAXDATE.key,d.getDate(j[0],(j[1]-1),j[2]));}},configToday:function(i,h,j){var k=h[0];if(e.isString(k)){k=this._parseDate(k);}var g=d.clearTime(k);if(!this.cfg.initialConfig[b.PAGEDATE.key]){this.cfg.setProperty(b.PAGEDATE.key,g);}this.today=g;this.cfg.setProperty(b.TODAY.key,g,true);},configSelected:function(i,g,k){var h=g[0],j=b.SELECTED.key;if(h){if(e.isString(h)){this.cfg.setProperty(j,this._parseDates(h),true);}}if(!this._selectedDates){this._selectedDates=this.cfg.getProperty(j);}},configOptions:function(h,g,i){this.Options[h.toUpperCase()]=g[0];},configLocale:function(h,g,i){this.Locale[h.toUpperCase()]=g[0];this.cfg.refireEvent(b.LOCALE_MONTHS.key);this.cfg.refireEvent(b.LOCALE_WEEKDAYS.key);},configLocaleValues:function(j,i,k){j=j.toLowerCase();var m=i[0],h=this.cfg,n=this.Locale;switch(j){case b.LOCALE_MONTHS.key:switch(m){case f.SHORT:n.LOCALE_MONTHS=h.getProperty(b.MONTHS_SHORT.key).concat();break;case f.LONG:n.LOCALE_MONTHS=h.getProperty(b.MONTHS_LONG.key).concat();break;}break;case b.LOCALE_WEEKDAYS.key:switch(m){case f.ONE_CHAR:n.LOCALE_WEEKDAYS=h.getProperty(b.WEEKDAYS_1CHAR.key).concat();break;case f.SHORT:n.LOCALE_WEEKDAYS=h.getProperty(b.WEEKDAYS_SHORT.key).concat();break;case f.MEDIUM:n.LOCALE_WEEKDAYS=h.getProperty(b.WEEKDAYS_MEDIUM.key).concat();break;case f.LONG:n.LOCALE_WEEKDAYS=h.getProperty(b.WEEKDAYS_LONG.key).concat();break;}var l=h.getProperty(b.START_WEEKDAY.key);if(l>0){for(var g=0;g'+h+"";}this.oDomContainer.appendChild(l);return l;},removeCloseButton:function(){var g=c.getElementsByClassName(this.Style.CSS_LINK_CLOSE,"a",this.oDomContainer)[0]||null;if(g){a.purgeElement(g);this.oDomContainer.removeChild(g);}},renderHeader:function(q){var p=7,o="us/tr/callt.gif",g="us/tr/calrt.gif",n=this.cfg,k=n.getProperty(b.PAGEDATE.key),l=n.getProperty(b.STRINGS.key),v=(l&&l.previousMonth)?l.previousMonth:"",h=(l&&l.nextMonth)?l.nextMonth:"",m;if(n.getProperty(b.SHOW_WEEK_HEADER.key)){p+=1;}if(n.getProperty(b.SHOW_WEEK_FOOTER.key)){p+=1;}q[q.length]="
    ";q[q.length]="";q[q.length]='\n";if(n.getProperty(b.SHOW_WEEKDAYS.key)){q=this.buildWeekdays(q);}q[q.length]="";return q;},buildWeekdays:function(h){h[h.length]='';if(this.cfg.getProperty(b.SHOW_WEEK_HEADER.key)){h[h.length]="";}for(var g=0;g'+this.Locale.LOCALE_WEEKDAYS[g]+"";}if(this.cfg.getProperty(b.SHOW_WEEK_FOOTER.key)){h[h.length]="";}h[h.length]="";return h;},renderBody:function(T,Q){var ao=this.cfg.getProperty(b.START_WEEKDAY.key);this.preMonthDays=T.getDay();if(ao>0){this.preMonthDays-=ao;}if(this.preMonthDays<0){this.preMonthDays+=7;}this.monthDays=d.findMonthEnd(T).getDate();this.postMonthDays=f.DISPLAY_DAYS-this.preMonthDays-this.monthDays;T=d.subtract(T,d.DAY,this.preMonthDays);var F,q,o="w",L="_cell",J="wd",Z="d",v,X,af=this.today,u=this.cfg,ae,D=af.getFullYear(),Y=af.getMonth(),k=af.getDate(),ad=u.getProperty(b.PAGEDATE.key),j=u.getProperty(b.HIDE_BLANK_WEEKS.key),P=u.getProperty(b.SHOW_WEEK_FOOTER.key),I=u.getProperty(b.SHOW_WEEK_HEADER.key),O=u.getProperty(b.OOM_SELECT.key),B=u.getProperty(b.MINDATE.key),H=u.getProperty(b.MAXDATE.key),A=this.Locale.YEAR_OFFSET;if(B){B=d.clearTime(B);}if(H){H=d.clearTime(H);}Q[Q.length]='';var am=0,w=document.createElement("div"),R=document.createElement("td");w.appendChild(R);var ac=this.parent||this;for(var ah=0;ah<6;ah++){F=d.getWeekNumber(T,ao);q=o+F;if(ah!==0&&j===true&&T.getMonth()!=ad.getMonth()){break;}else{Q[Q.length]='';if(I){Q=this.renderRowHeader(F,Q);}for(var an=0;an<7;an++){v=[];this.clearElement(R);R.className=this.Style.CSS_CELL;R.id=this.id+L+am;if(T.getDate()==k&&T.getMonth()==Y&&T.getFullYear()==D){v[v.length]=ac.renderCellStyleToday;}var G=[T.getFullYear(),T.getMonth()+1,T.getDate()];this.cellDates[this.cellDates.length]=G;ae=T.getMonth()!=ad.getMonth();if(ae&&!O){v[v.length]=ac.renderCellNotThisMonth;}else{c.addClass(R,J+T.getDay());c.addClass(R,Z+T.getDate());var S=this.renderStack.concat();for(var ag=0,al=S.length;ag=ak.getTime()&&T.getTime()<=aj.getTime()){X=aa[2];if(T.getTime()==aj.getTime()){this.renderStack.splice(ag,1); +}}break;case f.WEEKDAY:var y=aa[1][0];if(T.getDay()+1==y){X=aa[2];}break;case f.MONTH:h=aa[1][0];if(T.getMonth()+1==h){X=aa[2];}break;}if(X){v[v.length]=X;}}}if(this._indexOfSelectedFieldArray(G)>-1){v[v.length]=ac.renderCellStyleSelected;}if(ae){v[v.length]=ac.styleCellNotThisMonth;}if((B&&(T.getTime()H.getTime()))){v[v.length]=ac.renderOutOfBoundsDate;}else{v[v.length]=ac.styleCellDefault;v[v.length]=ac.renderCellDefault;}for(var ab=0;ab=0&&am<=6){c.addClass(R,this.Style.CSS_CELL_TOP);}if((am%7)===0){c.addClass(R,this.Style.CSS_CELL_LEFT);}if(((am+1)%7)===0){c.addClass(R,this.Style.CSS_CELL_RIGHT);}var V=this.postMonthDays;if(j&&V>=7){var C=Math.floor(V/7);for(var ai=0;ai=((this.preMonthDays+V+this.monthDays)-7)){c.addClass(R,this.Style.CSS_CELL_BOTTOM);}Q[Q.length]=w.innerHTML;am++;}if(P){Q=this.renderRowFooter(F,Q);}Q[Q.length]="";}}Q[Q.length]="";return Q;},renderFooter:function(g){return g;},render:function(){this.beforeRenderEvent.fire();var i=d.findMonthStart(this.cfg.getProperty(b.PAGEDATE.key));this.resetRenderers();this.cellDates.length=0;a.purgeElement(this.oDomContainer,true);var g=[],h;g[g.length]='
     
    - +
    @@ -171,13 +170,8 @@ -
    -
    -
    - -
    - -
    + + diff --git a/include/javascript/tiny_mce/plugins/table/editor_plugin.js b/include/javascript/tiny_mce/plugins/table/editor_plugin.js index 97a9d256..727ae4e7 100644 --- a/include/javascript/tiny_mce/plugins/table/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/table/editor_plugin.js @@ -1 +1 @@ -(function(){var each=tinymce.each;tinymce.create('tinymce.plugins.TablePlugin',{init:function(ed,url){var t=this;t.editor=ed;t.url=url;each([['table','table.desc','mceInsertTable',true],['delete_table','table.del','mceTableDelete'],['delete_col','table.delete_col_desc','mceTableDeleteCol'],['delete_row','table.delete_row_desc','mceTableDeleteRow'],['col_after','table.col_after_desc','mceTableInsertColAfter'],['col_before','table.col_before_desc','mceTableInsertColBefore'],['row_after','table.row_after_desc','mceTableInsertRowAfter'],['row_before','table.row_before_desc','mceTableInsertRowBefore'],['row_props','table.row_desc','mceTableRowProps',true],['cell_props','table.cell_desc','mceTableCellProps',true],['split_cells','table.split_cells_desc','mceTableSplitCells',true],['merge_cells','table.merge_cells_desc','mceTableMergeCells',true]],function(c){ed.addButton(c[0],{title:c[1],cmd:c[2],ui:c[3]});});if(ed.getParam('inline_styles')){ed.onPreProcess.add(function(ed,o){var dom=ed.dom;each(dom.select('table',o.node),function(n){var v;if(v=dom.getAttrib(n,'width')){dom.setStyle(n,'width',v);dom.setAttrib(n,'width');}if(v=dom.getAttrib(n,'height')){dom.setStyle(n,'height',v);dom.setAttrib(n,'height');}});});}ed.onInit.add(function(){if(ed&&ed.plugins.contextmenu){ed.plugins.contextmenu.onContextMenu.add(function(th,m,e){var sm,se=ed.selection,el=se.getNode()||ed.getBody();if(ed.dom.getParent(e,'td')||ed.dom.getParent(e,'th')){m.removeAll();if(el.nodeName=='A'&&!ed.dom.getAttrib(el,'name')){m.add({title:'advanced.link_desc',icon:'link',cmd:ed.plugins.advlink?'mceAdvLink':'mceLink',ui:true});m.add({title:'advanced.unlink_desc',icon:'unlink',cmd:'UnLink'});m.addSeparator();}if(el.nodeName=='IMG'&&el.className.indexOf('mceItem')==-1){m.add({title:'advanced.image_desc',icon:'image',cmd:ed.plugins.advimage?'mceAdvImage':'mceImage',ui:true});m.addSeparator();}m.add({title:'table.desc',icon:'table',cmd:'mceInsertTable',ui:true,value:{action:'insert'}});m.add({title:'table.props_desc',icon:'table_props',cmd:'mceInsertTable',ui:true});m.add({title:'table.del',icon:'delete_table',cmd:'mceTableDelete',ui:true});m.addSeparator();sm=m.addMenu({title:'table.cell'});sm.add({title:'table.cell_desc',icon:'cell_props',cmd:'mceTableCellProps',ui:true});sm.add({title:'table.split_cells_desc',icon:'split_cells',cmd:'mceTableSplitCells',ui:true});sm.add({title:'table.merge_cells_desc',icon:'merge_cells',cmd:'mceTableMergeCells',ui:true});sm=m.addMenu({title:'table.row'});sm.add({title:'table.row_desc',icon:'row_props',cmd:'mceTableRowProps',ui:true});sm.add({title:'table.row_before_desc',icon:'row_before',cmd:'mceTableInsertRowBefore'});sm.add({title:'table.row_after_desc',icon:'row_after',cmd:'mceTableInsertRowAfter'});sm.add({title:'table.delete_row_desc',icon:'delete_row',cmd:'mceTableDeleteRow'});sm.addSeparator();sm.add({title:'table.cut_row_desc',icon:'cut',cmd:'mceTableCutRow'});sm.add({title:'table.copy_row_desc',icon:'copy',cmd:'mceTableCopyRow'});sm.add({title:'table.paste_row_before_desc',icon:'paste',cmd:'mceTablePasteRowBefore'});sm.add({title:'table.paste_row_after_desc',icon:'paste',cmd:'mceTablePasteRowAfter'});sm=m.addMenu({title:'table.col'});sm.add({title:'table.col_before_desc',icon:'col_before',cmd:'mceTableInsertColBefore'});sm.add({title:'table.col_after_desc',icon:'col_after',cmd:'mceTableInsertColAfter'});sm.add({title:'table.delete_col_desc',icon:'delete_col',cmd:'mceTableDeleteCol'});}else m.add({title:'table.desc',icon:'table',cmd:'mceInsertTable',ui:true});});}});ed.onKeyDown.add(function(ed,e){if(e.keyCode==9&&ed.dom.getParent(ed.selection.getNode(),'TABLE')){if(!tinymce.isGecko&&!tinymce.isOpera){tinyMCE.execInstanceCommand(ed.editorId,"mceTableMoveToNextRow",true);return tinymce.dom.Event.cancel(e);}ed.undoManager.add();}});if(!tinymce.isIE){if(ed.getParam('table_selection',true)){ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName==='TABLE')ed.selection.select(e);});}}ed.onNodeChange.add(function(ed,cm,n){var p=ed.dom.getParent(n,'td,th,caption');cm.setActive('table',n.nodeName==='TABLE'||!!p);if(p&&p.nodeName==='CAPTION')p=null;cm.setDisabled('delete_table',!p);cm.setDisabled('delete_col',!p);cm.setDisabled('delete_table',!p);cm.setDisabled('delete_row',!p);cm.setDisabled('col_after',!p);cm.setDisabled('col_before',!p);cm.setDisabled('row_after',!p);cm.setDisabled('row_before',!p);cm.setDisabled('row_props',!p);cm.setDisabled('cell_props',!p);cm.setDisabled('split_cells',!p||(parseInt(ed.dom.getAttrib(p,'colspan','1'))<2&&parseInt(ed.dom.getAttrib(p,'rowspan','1'))<2));cm.setDisabled('merge_cells',!p);});if(!tinymce.isIE){ed.onBeforeSetContent.add(function(ed,o){if(o.initial)o.content=o.content.replace(/<(td|th)([^>]+|)>\s*<\/(td|th)>/g,tinymce.isOpera?'<$1$2> ':'<$1$2>
    ');});}},execCommand:function(cmd,ui,val){var ed=this.editor,b;switch(cmd){case"mceTableMoveToNextRow":case"mceInsertTable":case"mceTableRowProps":case"mceTableCellProps":case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":case"mceTableDelete":ed.execCommand('mceBeginUndoLevel');this._doExecCommand(cmd,ui,val);ed.execCommand('mceEndUndoLevel');return true;}return false;},getInfo:function(){return{longname:'Tables',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_doExecCommand:function(command,user_interface,value){var inst=this.editor,ed=inst,url=this.url;var focusElm=inst.selection.getNode();var trElm=inst.dom.getParent(focusElm,"tr");var tdElm=inst.dom.getParent(focusElm,"td,th");var tableElm=inst.dom.getParent(focusElm,"table");var doc=inst.contentWindow.document;var tableBorder=tableElm?tableElm.getAttribute("border"):"";if(trElm&&tdElm==null)tdElm=trElm.cells[0];function inArray(ar,v){for(var i=0;i0&&inArray(ar[i],v))return true;if(ar[i]==v)return true;}return false;}function select(dx,dy){var td;grid=getTableGrid(tableElm);dx=dx||0;dy=dy||0;dx=Math.max(cpos.cellindex+dx,0);dy=Math.max(cpos.rowindex+dy,0);inst.execCommand('mceRepaint');td=getCell(grid,dy,dx);if(td){inst.selection.select(td.firstChild||td);inst.selection.collapse(1);}};function makeTD(){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='
    ';}function getColRowSpan(td){var colspan=inst.dom.getAttrib(td,"colspan");var rowspan=inst.dom.getAttrib(td,"rowspan");colspan=colspan==""?1:parseInt(colspan);rowspan=rowspan==""?1:parseInt(rowspan);return{colspan:colspan,rowspan:rowspan};}function getCellPos(grid,td){var x,y;for(y=0;y1){for(var i=x;i1)td.rowSpan=sd.rowspan+1;lastElm=td;}deleteMarked(tableElm);}}function prevElm(node,name){while((node=node.previousSibling)!=null){if(node.nodeName==name)return node;}return null;}function nextElm(node,names){var namesAr=names.split(',');while((node=node.nextSibling)!=null){for(var i=0;i1){do{var nexttd=nextElm(td,"TD,TH");if(td._delete)td.parentNode.removeChild(td);}while((td=nexttd)!=null);}}while((tr=next)!=null);}function addRows(td_elm,tr_elm,rowspan){td_elm.rowSpan=1;var trNext=nextElm(tr_elm,"TR");for(var i=1;i';if(tinymce.isIE)trNext.insertBefore(newTD,trNext.cells(td_elm.cellIndex));else trNext.insertBefore(newTD,trNext.cells[td_elm.cellIndex]);trNext=nextElm(trNext,"TR");}}function copyRow(doc,table,tr){var grid=getTableGrid(table);var newTR=tr.cloneNode(false);var cpos=getCellPos(grid,tr.cells[0]);var lastCell=null;var tableBorder=inst.dom.getAttrib(table,"border");var tdElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){var newTD=null;if(lastCell!=tdElm){for(var i=0;i';}newTD.colSpan=1;newTD.rowSpan=1;newTR.appendChild(newTD);lastCell=tdElm;}return newTR;}switch(command){case"mceTableMoveToNextRow":var nextCell=getNextCell(tableElm,tdElm);if(!nextCell){inst.execCommand("mceTableInsertRowAfter",tdElm);nextCell=getNextCell(tableElm,tdElm);}inst.selection.select(nextCell);inst.selection.collapse(true);return true;case"mceTableRowProps":if(trElm==null)return true;if(user_interface){inst.windowManager.open({url:url+'/row.htm',width:400+parseInt(inst.getLang('table.rowprops_delta_width',0)),height:295+parseInt(inst.getLang('table.rowprops_delta_height',0)),inline:1},{plugin_url:url});}return true;case"mceTableCellProps":if(tdElm==null)return true;if(user_interface){inst.windowManager.open({url:url+'/cell.htm',width:400+parseInt(inst.getLang('table.cellprops_delta_width',0)),height:295+parseInt(inst.getLang('table.cellprops_delta_height',0)),inline:1},{plugin_url:url});}return true;case"mceInsertTable":if(user_interface){inst.windowManager.open({url:url+'/table.htm',width:400+parseInt(inst.getLang('table.table_delta_width',0)),height:320+parseInt(inst.getLang('table.table_delta_height',0)),inline:1},{plugin_url:url,action:value?value.action:0});}return true;case"mceTableDelete":var table=inst.dom.getParent(inst.selection.getNode(),"table");if(table){table.parentNode.removeChild(table);inst.execCommand('mceRepaint');}return true;case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":if(!tableElm)return true;if(trElm&&tableElm!=trElm.parentNode)tableElm=trElm.parentNode;if(tableElm&&trElm){switch(command){case"mceTableCutRow":if(!trElm||!tdElm)return true;inst.tableRowClipboard=copyRow(doc,tableElm,trElm);inst.execCommand("mceTableDeleteRow");break;case"mceTableCopyRow":if(!trElm||!tdElm)return true;inst.tableRowClipboard=copyRow(doc,tableElm,trElm);break;case"mceTablePasteRowBefore":if(!trElm||!tdElm)return true;var newTR=inst.tableRowClipboard.cloneNode(true);var prevTR=prevElm(trElm,"TR");if(prevTR!=null)trimRow(tableElm,prevTR,prevTR.cells[0],newTR);trElm.parentNode.insertBefore(newTR,trElm);break;case"mceTablePasteRowAfter":if(!trElm||!tdElm)return true;var nextTR=nextElm(trElm,"TR");var newTR=inst.tableRowClipboard.cloneNode(true);trimRow(tableElm,trElm,tdElm,newTR);if(nextTR==null)trElm.parentNode.appendChild(newTR);else nextTR.parentNode.insertBefore(newTR,nextTR);break;case"mceTableInsertRowBefore":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var newTR=doc.createElement("tr");var lastTDElm=null;cpos.rowindex--;if(cpos.rowindex<0)cpos.rowindex=0;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['rowspan']==1){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='
    ';newTD.colSpan=tdElm.colSpan;newTR.appendChild(newTD);}else tdElm.rowSpan=sd['rowspan']+1;lastTDElm=tdElm;}}trElm.parentNode.insertBefore(newTR,trElm);select(0,1);break;case"mceTableInsertRowAfter":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var newTR=doc.createElement("tr");var lastTDElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['rowspan']==1){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='
    ';newTD.colSpan=tdElm.colSpan;newTR.appendChild(newTD);}else tdElm.rowSpan=sd['rowspan']+1;lastTDElm=tdElm;}}if(newTR.hasChildNodes()){var nextTR=nextElm(trElm,"TR");if(nextTR)nextTR.parentNode.insertBefore(newTR,nextTR);else tableElm.appendChild(newTR);}select(0,1);break;case"mceTableDeleteRow":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);if(grid.length==1&&tableElm.nodeName=='TBODY'){inst.dom.remove(inst.dom.getParent(tableElm,"table"));return true;}var cells=trElm.cells;var nextTR=nextElm(trElm,"TR");for(var x=0;x1){var newTD=cells[x].cloneNode(true);var sd=getColRowSpan(cells[x]);newTD.rowSpan=sd.rowspan-1;var nextTD=nextTR.cells[x];if(nextTD==null)nextTR.appendChild(newTD);else nextTR.insertBefore(newTD,nextTD);}}var lastTDElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd.rowspan>1){tdElm.rowSpan=sd.rowspan-1;}else{trElm=tdElm.parentNode;if(trElm.parentNode)trElm._delete=true;}lastTDElm=tdElm;}}deleteMarked(tableElm);select(0,-1);break;case"mceTableInsertColBefore":if(!trElm||!tdElm)return true;var grid=getTableGrid(inst.dom.getParent(tableElm,"table"));var cpos=getCellPos(grid,tdElm);var lastTDElm=null;for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']==1){var newTD=doc.createElement(tdElm.nodeName);if(!tinymce.isIE)newTD.innerHTML='
    ';newTD.rowSpan=tdElm.rowSpan;tdElm.parentNode.insertBefore(newTD,tdElm);}else tdElm.colSpan++;lastTDElm=tdElm;}}select();break;case"mceTableInsertColAfter":if(!trElm||!tdElm)return true;var grid=getTableGrid(inst.dom.getParent(tableElm,"table"));var cpos=getCellPos(grid,tdElm);var lastTDElm=null;for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']==1){var newTD=doc.createElement(tdElm.nodeName);if(!tinymce.isIE)newTD.innerHTML='
    ';newTD.rowSpan=tdElm.rowSpan;var nextTD=nextElm(tdElm,"TD,TH");if(nextTD==null)tdElm.parentNode.appendChild(newTD);else nextTD.parentNode.insertBefore(newTD,nextTD);}else tdElm.colSpan++;lastTDElm=tdElm;}}select(1);break;case"mceTableDeleteCol":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var lastTDElm=null;if((grid.length>1&&grid[0].length<=1)&&tableElm.nodeName=='TBODY'){inst.dom.remove(inst.dom.getParent(tableElm,"table"));return true;}for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']>1)tdElm.colSpan=sd['colspan']-1;else{if(tdElm.parentNode)tdElm.parentNode.removeChild(tdElm);}lastTDElm=tdElm;}}select(-1);break;case"mceTableSplitCells":if(!trElm||!tdElm)return true;var spandata=getColRowSpan(tdElm);var colspan=spandata["colspan"];var rowspan=spandata["rowspan"];if(colspan>1||rowspan>1){tdElm.colSpan=1;for(var i=1;i';trElm.insertBefore(newTD,nextElm(tdElm,"TD,TH"));if(rowspan>1)addRows(newTD,trElm,rowspan);}addRows(tdElm,trElm,rowspan);}tableElm=inst.dom.getParent(inst.selection.getNode(),"table");break;case"mceTableMergeCells":var rows=[];var sel=inst.selection.getSel();var grid=getTableGrid(tableElm);if(tinymce.isIE||sel.rangeCount==1){if(user_interface){var sp=getColRowSpan(tdElm);inst.windowManager.open({url:url+'/merge_cells.htm',width:240+parseInt(inst.getLang('table.merge_cells_delta_width',0)),height:110+parseInt(inst.getLang('table.merge_cells_delta_height',0)),inline:1},{action:"update",numcols:sp.colspan,numrows:sp.rowspan,plugin_url:url});return true;}else{var numRows=parseInt(value['numrows']);var numCols=parseInt(value['numcols']);var cpos=getCellPos(grid,tdElm);if((""+numRows)=="NaN")numRows=1;if((""+numCols)=="NaN")numCols=1;var tRows=tableElm.rows;for(var y=cpos.rowindex;y0)rows[rows.length]=rowCells;var td=getCell(grid,cpos.rowindex,cpos.cellindex);each(ed.dom.select('br',td),function(e,i){if(i>0&&ed.dom.getAttrib('mce_bogus'))ed.dom.remove(e);});}}}else{var cells=[];var sel=inst.selection.getSel();var lastTR=null;var curRow=null;var x1=-1,y1=-1,x2,y2;if(sel.rangeCount<2)return true;for(var i=0;i0)rows[rows.length]=rowCells;}var curRow=[];var lastTR=null;for(var y=0;ycolSpan)colSpan=rowColSpan;lastRowSpan=-1;}var lastColSpan=-1;for(var x=0;xrowSpan)rowSpan=colRowSpan;lastColSpan=-1;}tdElm=rows[0][0];tdElm.rowSpan=rowSpan;tdElm.colSpan=colSpan;for(var y=0;y0))tdElm.innerHTML+=html;if(rows[y][x]!=tdElm&&!rows[y][x]._deleted){var cpos=getCellPos(grid,rows[y][x]);var tr=rows[y][x].parentNode;tr.removeChild(rows[y][x]);rows[y][x]._deleted=true;if(!tr.hasChildNodes()){tr.parentNode.removeChild(tr);var lastCell=null;for(var x=0;cellElm=getCell(grid,cpos.rowindex,x);x++){if(cellElm!=lastCell&&cellElm.rowSpan>1)cellElm.rowSpan--;lastCell=cellElm;}if(tdElm.rowSpan>1)tdElm.rowSpan--;}}}}each(ed.dom.select('br',tdElm),function(e,i){if(i>0&&ed.dom.getAttrib(e,'mce_bogus'))ed.dom.remove(e);});break;}tableElm=inst.dom.getParent(inst.selection.getNode(),"table");inst.addVisual(tableElm);inst.nodeChanged();}return true;}return false;}});tinymce.PluginManager.add('table',tinymce.plugins.TablePlugin);})(); \ No newline at end of file +(function(c){var d=c.each;function b(f,g){var h=g.ownerDocument,e=h.createRange(),j;e.setStartBefore(g);e.setEnd(f.endContainer,f.endOffset);j=h.createElement("body");j.appendChild(e.cloneContents());return j.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(H,G,K){var f,L,D,o;t();o=G.getParent(K.getStart(),"th,td");if(o){L=F(o);D=I();o=z(L.x,L.y)}function A(N,M){N=N.cloneNode(M);N.removeAttribute("id");return N}function t(){var M=0;f=[];d(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);d(O,function(P,Q){Q+=M;d(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(f[Q]){while(f[Q][R]){R++}}U=h(W,"rowspan");V=h(W,"colspan");for(T=Q;T'}return false}},"childNodes");M=A(M,false);s(M,"rowSpan",1);s(M,"colSpan",1);if(N){M.appendChild(N)}else{if(!c.isIE){M.innerHTML='
    '}}return M}function q(){var M=G.createRng();d(G.select("tr",H),function(N){if(N.cells.length==0){G.remove(N)}});if(G.select("tr",H).length==0){M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H);return}d(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=f[Math.min(f.length-1,L.y)];if(row){K.select(row[Math.min(row.length-1,L.x)].elm,true);K.collapse(true)}}function u(S,Q,U,R){var P,N,M,O,T;P=f[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=f[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(e(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(e(P.cells[0]),P.cells[0])}}}}}function C(){d(f,function(M,N){d(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=h(P,"colspan");R=h(P,"rowspan");if(S>1||R>1){s(P,"rowSpan",1);s(P,"colSpan",1);for(Q=0;Q1){s(S,"rowSpan",O+1);continue}}else{if(M>0&&f[M-1][R]){V=f[M-1][R].elm;O=h(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=e(S);s(N,"colSpan",S.colSpan);U.appendChild(N);P=S}}if(U.hasChildNodes()){if(!Q){G.insertAfter(U,T)}else{T.parentNode.insertBefore(U,T)}}}function g(N){var O,M;d(f,function(P,Q){d(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});d(f,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=h(P,"colspan");Q=h(P,"rowspan");if(R==1){if(!N){G.insertAfter(e(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(e(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];d(f,function(N,O){d(N,function(Q,P){if(j(Q)&&c.inArray(M,P)===-1){d(f,function(T){var R=T[P].elm,S;S=h(R,"colSpan");if(S>1){s(R,"colSpan",S-1)}else{G.remove(R)}});M.push(P)}})});q()}function m(){var N;function M(Q){var P,R,O;P=G.getNext(Q,"tr");d(Q.cells,function(S){var T=h(S,"rowSpan");if(T>1){s(S,"rowSpan",T-1);R=F(S);u(R.x,R.y,1,1)}});R=F(Q.cells[0]);d(f[R.y],function(S){var T;S=S.elm;if(S!=O){T=h(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();d(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();d(M,function(O,N){M[N]=A(O,true)});return M}function B(O,N){var P=k(),M=P[N?0:P.length-1],Q=M.cells.length;d(f,function(S){var R;Q=0;d(S,function(U,T){if(U.real){Q+=U.colspan}if(U.elm.parentNode==M){R=1}});if(R){return false}});if(!N){O.reverse()}d(O,function(T){var S=T.cells.length,R;for(i=0;iN){N=R}if(Q>M){M=Q}if(S.real){U=S.colspan-1;T=S.rowspan-1;if(U){if(R+U>N){N=R+U}}if(T){if(Q+T>M){M=Q+T}}}}})});return{x:N,y:M}}function v(S){var P,O,U,T,N,M,Q,R;D=F(S);if(L&&D){P=Math.min(L.x,D.x);O=Math.min(L.y,D.y);U=Math.max(L.x,D.x);T=Math.max(L.y,D.y);N=U;M=T;for(y=O;y<=M;y++){S=f[y][P];if(!S.real){if(P-(S.colspan-1)N){N=x+Q}}if(R){if(y+R>M){M=y+R}}}}}G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=O;y<=M;y++){for(x=P;x<=N;x++){if(f[y][x]){G.addClass(f[y][x].elm,"mceSelected")}}}}}c.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:g,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}c.create("tinymce.plugins.TablePlugin",{init:function(f,g){var e,k;function j(n){var m=f.selection,l=f.dom.getParent(n||m.getNode(),"table");if(l){return new a(l,f.dom,m)}}function h(){f.getBody().style.webkitUserSelect="";f.dom.removeClass(f.dom.select("td.mceSelected,th.mceSelected"),"mceSelected")}d([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(l){f.addButton(l[0],{title:l[1],cmd:l[2],ui:l[3]})});if(!c.isIE){f.onClick.add(function(l,m){m=m.target;if(m.nodeName==="TABLE"){l.selection.select(m);l.nodeChanged()}})}f.onPreProcess.add(function(m,n){var l,o,p,r=m.dom,q;l=r.select("table",n.node);o=l.length;while(o--){p=l[o];r.setAttrib(p,"data-mce-style","");if((q=r.getAttrib(p,"width"))){r.setStyle(p,"width",q);r.setAttrib(p,"width","")}if((q=r.getAttrib(p,"height"))){r.setStyle(p,"height",q);r.setAttrib(p,"height","")}}});f.onNodeChange.add(function(m,l,q){var o;q=m.selection.getStart();o=m.dom.getParent(q,"td,th,caption");l.setActive("table",q.nodeName==="TABLE"||!!o);if(o&&o.nodeName==="CAPTION"){o=0}l.setDisabled("delete_table",!o);l.setDisabled("delete_col",!o);l.setDisabled("delete_table",!o);l.setDisabled("delete_row",!o);l.setDisabled("col_after",!o);l.setDisabled("col_before",!o);l.setDisabled("row_after",!o);l.setDisabled("row_before",!o);l.setDisabled("row_props",!o);l.setDisabled("cell_props",!o);l.setDisabled("split_cells",!o);l.setDisabled("merge_cells",!o)});f.onInit.add(function(m){var l,p,q=m.dom,n;e=m.windowManager;m.onMouseDown.add(function(r,s){if(s.button!=2){h();p=q.getParent(s.target,"td,th");l=q.getParent(p,"table")}});q.bind(m.getDoc(),"mouseover",function(v){var t,s,u=v.target;if(p&&(n||u!=p)&&(u.nodeName=="TD"||u.nodeName=="TH")){s=q.getParent(u,"table");if(s==l){if(!n){n=j(s);n.setStartCell(p);m.getBody().style.webkitUserSelect="none"}n.setEndCell(u)}t=m.selection.getSel();try{if(t.removeAllRanges){t.removeAllRanges()}else{t.empty()}}catch(r){}v.preventDefault()}});m.onMouseUp.add(function(A,B){var s,u=A.selection,C,D=u.getSel(),r,v,t,z;if(p){if(n){A.getBody().style.webkitUserSelect=""}function w(E,G){var F=new c.dom.TreeWalker(E,E);do{if(E.nodeType==3&&c.trim(E.nodeValue).length!=0){if(G){s.setStart(E,0)}else{s.setEnd(E,E.nodeValue.length)}return}if(E.nodeName=="BR"){if(G){s.setStartBefore(E)}else{s.setEndBefore(E)}return}}while(E=(G?F.next():F.prev()))}C=q.select("td.mceSelected,th.mceSelected");if(C.length>0){s=q.createRng();v=C[0];z=C[C.length-1];w(v,1);r=new c.dom.TreeWalker(v,q.getParent(C[0],"table"));do{if(v.nodeName=="TD"||v.nodeName=="TH"){if(!q.hasClass(v,"mceSelected")){break}t=v}}while(v=r.next());w(t);u.setRng(s)}A.nodeChanged();p=n=l=null}});m.onKeyUp.add(function(r,s){h()});if(m&&m.plugins.contextmenu){m.plugins.contextmenu.onContextMenu.add(function(t,r,v){var w,u=m.selection,s=u.getNode()||m.getBody();if(m.dom.getParent(v,"td")||m.dom.getParent(v,"th")||m.dom.select("td.mceSelected,th.mceSelected").length){r.removeAll();if(s.nodeName=="A"&&!m.dom.getAttrib(s,"name")){r.add({title:"advanced.link_desc",icon:"link",cmd:m.plugins.advlink?"mceAdvLink":"mceLink",ui:true});r.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});r.addSeparator()}if(s.nodeName=="IMG"&&s.className.indexOf("mceItem")==-1){r.add({title:"advanced.image_desc",icon:"image",cmd:m.plugins.advimage?"mceAdvImage":"mceImage",ui:true});r.addSeparator()}r.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});r.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});r.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});r.addSeparator();w=r.addMenu({title:"table.cell"});w.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});w.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});w.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});w=r.addMenu({title:"table.row"});w.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});w.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});w.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});w.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});w.addSeparator();w.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});w.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});w.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!k);w.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!k);w=r.addMenu({title:"table.col"});w.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});w.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});w.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{r.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(!c.isIE){function o(){var r;for(r=m.getBody().lastChild;r&&r.nodeType==3&&!r.nodeValue.length;r=r.previousSibling){}if(r&&r.nodeName=="TABLE"){m.dom.add(m.getBody(),"p",null,'
    ')}}if(c.isGecko){m.onKeyDown.add(function(s,u){var r,t,v=s.dom;if(u.keyCode==37||u.keyCode==38){r=s.selection.getRng();t=v.getParent(r.startContainer,"table");if(t&&s.getBody().firstChild==t){if(b(r,t)){r=v.createRng();r.setStartBefore(t);r.setEndBefore(t);s.selection.setRng(r);u.preventDefault()}}}})}m.onKeyUp.add(o);m.onSetContent.add(o);m.onVisualAid.add(o);m.onPreProcess.add(function(r,t){var s=t.node.lastChild;if(s&&s.childNodes.length==1&&s.firstChild.nodeName=="BR"){r.dom.remove(s)}});o()}});d({mceTableSplitCells:function(l){l.split()},mceTableMergeCells:function(m){var n,o,l;l=f.dom.getParent(f.selection.getNode(),"th,td");if(l){n=l.rowSpan;o=l.colSpan}if(!f.dom.select("td.mceSelected,th.mceSelected").length){e.open({url:g+"/merge_cells.htm",width:240+parseInt(f.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(f.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:n,cols:o,onaction:function(p){m.merge(l,p.cols,p.rows)},plugin_url:g})}else{m.merge()}},mceTableInsertRowBefore:function(l){l.insertRow(true)},mceTableInsertRowAfter:function(l){l.insertRow()},mceTableInsertColBefore:function(l){l.insertCol(true)},mceTableInsertColAfter:function(l){l.insertCol()},mceTableDeleteCol:function(l){l.deleteCols()},mceTableDeleteRow:function(l){l.deleteRows()},mceTableCutRow:function(l){k=l.cutRows()},mceTableCopyRow:function(l){k=l.copyRows()},mceTablePasteRowBefore:function(l){l.pasteRows(k,true)},mceTablePasteRowAfter:function(l){l.pasteRows(k)},mceTableDelete:function(l){l.deleteTable()}},function(m,l){f.addCommand(l,function(){var n=j();if(n){m(n);f.execCommand("mceRepaint");h()}})});d({mceInsertTable:function(l){e.open({url:g+"/table.htm",width:400+parseInt(f.getLang("table.table_delta_width",0)),height:320+parseInt(f.getLang("table.table_delta_height",0)),inline:1},{plugin_url:g,action:l?l.action:0})},mceTableRowProps:function(){e.open({url:g+"/row.htm",width:400+parseInt(f.getLang("table.rowprops_delta_width",0)),height:295+parseInt(f.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:g})},mceTableCellProps:function(){e.open({url:g+"/cell.htm",width:400+parseInt(f.getLang("table.cellprops_delta_width",0)),height:295+parseInt(f.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:g})}},function(m,l){f.addCommand(l,function(n,o){m(o)})})}});c.PluginManager.add("table",c.plugins.TablePlugin)})(tinymce); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/table/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/table/editor_plugin_src.js index 985af1a8..9565b378 100644 --- a/include/javascript/tiny_mce/plugins/table/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/table/editor_plugin_src.js @@ -1,1136 +1,1202 @@ /** - + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ -(function() { +(function(tinymce) { var each = tinymce.each; - tinymce.create('tinymce.plugins.TablePlugin', { - init : function(ed, url) { - var t = this; + // Checks if the selection/caret is at the start of the specified block element + function isAtStart(rng, par) { + var doc = par.ownerDocument, rng2 = doc.createRange(), elm; - t.editor = ed; - t.url = url; + rng2.setStartBefore(par); + rng2.setEnd(rng.endContainer, rng.endOffset); - // Register buttons - each([ - ['table', 'table.desc', 'mceInsertTable', true], - ['delete_table', 'table.del', 'mceTableDelete'], - ['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'], - ['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'], - ['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'], - ['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'], - ['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'], - ['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'], - ['row_props', 'table.row_desc', 'mceTableRowProps', true], - ['cell_props', 'table.cell_desc', 'mceTableCellProps', true], - ['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true], - ['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true] - ], function(c) { - ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]}); - }); + elm = doc.createElement('body'); + elm.appendChild(rng2.cloneContents()); + + // Check for text characters of other elements that should be treated as content + return elm.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi, '-').replace(/<[^>]+>/g, '').length == 0; + }; + + /** + * Table Grid class. + */ + function TableGrid(table, dom, selection) { + var grid, startPos, endPos, selectedCell; + + buildGrid(); + selectedCell = dom.getParent(selection.getStart(), 'th,td'); + if (selectedCell) { + startPos = getPos(selectedCell); + endPos = findEndPos(); + selectedCell = getCell(startPos.x, startPos.y); + } + + function cloneNode(node, children) { + node = node.cloneNode(children); + node.removeAttribute('id'); + + return node; + } + + function buildGrid() { + var startY = 0; + + grid = []; - if (ed.getParam('inline_styles')) { - // Force move of attribs to styles in strict mode - ed.onPreProcess.add(function(ed, o) { - var dom = ed.dom; + each(['thead', 'tbody', 'tfoot'], function(part) { + var rows = dom.select('> ' + part + ' tr', table); - each(dom.select('table', o.node), function(n) { - var v; + each(rows, function(tr, y) { + y += startY; - if (v = dom.getAttrib(n, 'width')) { - dom.setStyle(n, 'width', v); - dom.setAttrib(n, 'width'); + each(dom.select('> td, > th', tr), function(td, x) { + var x2, y2, rowspan, colspan; + + // Skip over existing cells produced by rowspan + if (grid[y]) { + while (grid[y][x]) + x++; } - if (v = dom.getAttrib(n, 'height')) { - dom.setStyle(n, 'height', v); - dom.setAttrib(n, 'height'); + // Get col/rowspan from cell + rowspan = getSpanVal(td, 'rowspan'); + colspan = getSpanVal(td, 'colspan'); + + // Fill out rowspan/colspan right and down + for (y2 = y; y2 < y + rowspan; y2++) { + if (!grid[y2]) + grid[y2] = []; + + for (x2 = x; x2 < x + colspan; x2++) { + grid[y2][x2] = { + part : part, + real : y2 == y && x2 == x, + elm : td, + rowspan : rowspan, + colspan : colspan + }; + } } }); }); - } - ed.onInit.add(function() { - if (ed && ed.plugins.contextmenu) { - ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) { - var sm, se = ed.selection, el = se.getNode() || ed.getBody(); + startY += rows.length; + }); + }; - if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th')) { - m.removeAll(); + function getCell(x, y) { + var row; - if (el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) { - m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true}); - m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'}); - m.addSeparator(); - } + row = grid[y]; + if (row) + return row[x]; + }; - if (el.nodeName == 'IMG' && el.className.indexOf('mceItem') == -1) { - m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true}); - m.addSeparator(); - } + function getSpanVal(td, name) { + return parseInt(td.getAttribute(name) || 1); + }; - m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', ui : true, value : {action : 'insert'}}); - m.add({title : 'table.props_desc', icon : 'table_props', cmd : 'mceInsertTable', ui : true}); - m.add({title : 'table.del', icon : 'delete_table', cmd : 'mceTableDelete', ui : true}); - m.addSeparator(); + function setSpanVal(td, name, val) { + if (td) { + val = parseInt(val); - // Cell menu - sm = m.addMenu({title : 'table.cell'}); - sm.add({title : 'table.cell_desc', icon : 'cell_props', cmd : 'mceTableCellProps', ui : true}); - sm.add({title : 'table.split_cells_desc', icon : 'split_cells', cmd : 'mceTableSplitCells', ui : true}); - sm.add({title : 'table.merge_cells_desc', icon : 'merge_cells', cmd : 'mceTableMergeCells', ui : true}); + if (val === 1) + td.removeAttribute(name, 1); + else + td.setAttribute(name, val, 1); + } + } - // Row menu - sm = m.addMenu({title : 'table.row'}); - sm.add({title : 'table.row_desc', icon : 'row_props', cmd : 'mceTableRowProps', ui : true}); - sm.add({title : 'table.row_before_desc', icon : 'row_before', cmd : 'mceTableInsertRowBefore'}); - sm.add({title : 'table.row_after_desc', icon : 'row_after', cmd : 'mceTableInsertRowAfter'}); - sm.add({title : 'table.delete_row_desc', icon : 'delete_row', cmd : 'mceTableDeleteRow'}); - sm.addSeparator(); - sm.add({title : 'table.cut_row_desc', icon : 'cut', cmd : 'mceTableCutRow'}); - sm.add({title : 'table.copy_row_desc', icon : 'copy', cmd : 'mceTableCopyRow'}); - sm.add({title : 'table.paste_row_before_desc', icon : 'paste', cmd : 'mceTablePasteRowBefore'}); - sm.add({title : 'table.paste_row_after_desc', icon : 'paste', cmd : 'mceTablePasteRowAfter'}); + function isCellSelected(cell) { + return cell && (dom.hasClass(cell.elm, 'mceSelected') || cell == selectedCell); + }; - // Column menu - sm = m.addMenu({title : 'table.col'}); - sm.add({title : 'table.col_before_desc', icon : 'col_before', cmd : 'mceTableInsertColBefore'}); - sm.add({title : 'table.col_after_desc', icon : 'col_after', cmd : 'mceTableInsertColAfter'}); - sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'}); - } else - m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', ui : true}); - }); - } - }); + function getSelectedRows() { + var rows = []; - // Add undo level when new rows are created using the tab key - ed.onKeyDown.add(function(ed, e) { - if (e.keyCode == 9 && ed.dom.getParent(ed.selection.getNode(), 'TABLE')) { - if (!tinymce.isGecko && !tinymce.isOpera) { - tinyMCE.execInstanceCommand(ed.editorId, "mceTableMoveToNextRow", true); - return tinymce.dom.Event.cancel(e); + each(table.rows, function(row) { + each(row.cells, function(cell) { + if (dom.hasClass(cell, 'mceSelected') || cell == selectedCell.elm) { + rows.push(row); + return false; } - - ed.undoManager.add(); - } + }); }); - // Select whole table is a table border is clicked - if (!tinymce.isIE) { - if (ed.getParam('table_selection', true)) { - ed.onClick.add(function(ed, e) { - e = e.target; + return rows; + }; - if (e.nodeName === 'TABLE') - ed.selection.select(e); - }); - } - } + function deleteTable() { + var rng = dom.createRng(); - ed.onNodeChange.add(function(ed, cm, n) { - var p = ed.dom.getParent(n, 'td,th,caption'); + rng.setStartAfter(table); + rng.setEndAfter(table); - cm.setActive('table', n.nodeName === 'TABLE' || !!p); - if (p && p.nodeName === 'CAPTION') - p = null; + selection.setRng(rng); - cm.setDisabled('delete_table', !p); - cm.setDisabled('delete_col', !p); - cm.setDisabled('delete_table', !p); - cm.setDisabled('delete_row', !p); - cm.setDisabled('col_after', !p); - cm.setDisabled('col_before', !p); - cm.setDisabled('row_after', !p); - cm.setDisabled('row_before', !p); - cm.setDisabled('row_props', !p); - cm.setDisabled('cell_props', !p); - cm.setDisabled('split_cells', !p || (parseInt(ed.dom.getAttrib(p, 'colspan', '1')) < 2 && parseInt(ed.dom.getAttrib(p, 'rowspan', '1')) < 2)); - cm.setDisabled('merge_cells', !p); - }); + dom.remove(table); + }; - // Padd empty table cells - if (!tinymce.isIE) { - ed.onBeforeSetContent.add(function(ed, o) { - if (o.initial) - o.content = o.content.replace(/<(td|th)([^>]+|)>\s*<\/(td|th)>/g, tinymce.isOpera ? '<$1$2> ' : '<$1$2>
    '); - }); - } - }, - - execCommand : function(cmd, ui, val) { - var ed = this.editor, b; - - // Is table command - switch (cmd) { - case "mceTableMoveToNextRow": - case "mceInsertTable": - case "mceTableRowProps": - case "mceTableCellProps": - case "mceTableSplitCells": - case "mceTableMergeCells": - case "mceTableInsertRowBefore": - case "mceTableInsertRowAfter": - case "mceTableDeleteRow": - case "mceTableInsertColBefore": - case "mceTableInsertColAfter": - case "mceTableDeleteCol": - case "mceTableCutRow": - case "mceTableCopyRow": - case "mceTablePasteRowBefore": - case "mceTablePasteRowAfter": - case "mceTableDelete": - ed.execCommand('mceBeginUndoLevel'); - this._doExecCommand(cmd, ui, val); - ed.execCommand('mceEndUndoLevel'); - - return true; - } + function cloneCell(cell) { + var formatNode; - // Pass to next handler in chain - return false; - }, - - getInfo : function() { - return { - longname : 'Tables', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - }, - - // Private plugin internal methods - - /** - * Executes the table commands. - */ - _doExecCommand : function(command, user_interface, value) { - var inst = this.editor, ed = inst, url = this.url; - var focusElm = inst.selection.getNode(); - var trElm = inst.dom.getParent(focusElm, "tr"); - var tdElm = inst.dom.getParent(focusElm, "td,th"); - var tableElm = inst.dom.getParent(focusElm, "table"); - var doc = inst.contentWindow.document; - var tableBorder = tableElm ? tableElm.getAttribute("border") : ""; - - // Get first TD if no TD found - if (trElm && tdElm == null) - tdElm = trElm.cells[0]; - - function inArray(ar, v) { - for (var i=0; i 0 && inArray(ar[i], v)) - return true; - - // Found value - if (ar[i] == v) - return true; - } + // Clone formats + tinymce.walk(cell, function(node) { + var curNode; - return false; - } + if (node.nodeType == 3) { + each(dom.getParents(node.parentNode, null, cell).reverse(), function(node) { + node = cloneNode(node, false); - function select(dx, dy) { - var td; + if (!formatNode) + formatNode = curNode = node; + else if (curNode) + curNode.appendChild(node); - grid = getTableGrid(tableElm); - dx = dx || 0; - dy = dy || 0; - dx = Math.max(cpos.cellindex + dx, 0); - dy = Math.max(cpos.rowindex + dy, 0); + curNode = node; + }); - // Recalculate grid and select - inst.execCommand('mceRepaint'); - td = getCell(grid, dy, dx); + // Add something to the inner node + if (curNode) + curNode.innerHTML = tinymce.isIE ? ' ' : '
    '; - if (td) { - inst.selection.select(td.firstChild || td); - inst.selection.collapse(1); + return false; } - }; + }, 'childNodes'); - function makeTD() { - var newTD = doc.createElement("td"); + cell = cloneNode(cell, false); + setSpanVal(cell, 'rowSpan', 1); + setSpanVal(cell, 'colSpan', 1); + if (formatNode) { + cell.appendChild(formatNode); + } else { if (!tinymce.isIE) - newTD.innerHTML = '
    '; + cell.innerHTML = '
    '; } - function getColRowSpan(td) { - var colspan = inst.dom.getAttrib(td, "colspan"); - var rowspan = inst.dom.getAttrib(td, "rowspan"); + return cell; + }; + + function cleanup() { + var rng = dom.createRng(); - colspan = colspan == "" ? 1 : parseInt(colspan); - rowspan = rowspan == "" ? 1 : parseInt(rowspan); + // Empty rows + each(dom.select('tr', table), function(tr) { + if (tr.cells.length == 0) + dom.remove(tr); + }); - return {colspan : colspan, rowspan : rowspan}; + // Empty table + if (dom.select('tr', table).length == 0) { + rng.setStartAfter(table); + rng.setEndAfter(table); + selection.setRng(rng); + dom.remove(table); + return; } - function getCellPos(grid, td) { - var x, y; + // Empty header/body/footer + each(dom.select('thead,tbody,tfoot', table), function(part) { + if (part.rows.length == 0) + dom.remove(part); + }); - for (y=0; y= 0; x2--) { + cell = grid[y + r][x2].elm; - function getNextCell(table, cell) { - var cells = [], x = 0, i, j, cell, nextCell; + if (cell.parentNode == tr) { + // Append clones after + for (c = 1; c <= cols; c++) + dom.insertAfter(cloneCell(cell), cell); - for (i = 0; i < table.rows.length; i++) - for (j = 0; j < table.rows[i].cells.length; j++, x++) - cells[x] = table.rows[i].cells[j]; + break; + } + } - for (i = 0; i < cells.length; i++) - if (cells[i] == cell) - if (nextCell = cells[i+1]) - return nextCell; + if (x2 == -1) { + // Insert nodes before first cell + for (c = 1; c <= cols; c++) + tr.insertBefore(cloneCell(tr.cells[0]), tr.cells[0]); + } + } } + }; - function getTableGrid(table) { - var grid = [], rows = table.rows, x, y, td, sd, xstart, x2, y2; + function split() { + each(grid, function(row, y) { + each(row, function(cell, x) { + var colSpan, rowSpan, newCell, i; - for (y=0; y 1 || rowSpan > 1) { + setSpanVal(cell, 'rowSpan', 1); + setSpanVal(cell, 'colSpan', 1); - // Fill box - for (y2=y; y2 1) { // Remove due to colspan - for (var i=x; i 1) - td.rowSpan = sd.rowspan + 1; + cell = grid[posY][x].elm; - lastElm = td; + if (cell != lastCell) { + if (!before) { + rowSpan = getSpanVal(cell, 'rowspan'); + if (rowSpan > 1) { + setSpanVal(cell, 'rowSpan', rowSpan + 1); + continue; + } + } else { + // Check if cell above can be expanded + if (posY > 0 && grid[posY - 1][x]) { + otherCell = grid[posY - 1][x].elm; + rowSpan = getSpanVal(otherCell, 'rowSpan'); + if (rowSpan > 1) { + setSpanVal(otherCell, 'rowSpan', rowSpan + 1); + continue; + } + } } - deleteMarked(tableElm); - } - } + // Insert new cell into new row + newCell = cloneCell(cell); + setSpanVal(newCell, 'colSpan', cell.colSpan); + + newRow.appendChild(newCell); - function prevElm(node, name) { - while ((node = node.previousSibling) != null) { - if (node.nodeName == name) - return node; + lastCell = cell; } + } - return null; + if (newRow.hasChildNodes()) { + if (!before) + dom.insertAfter(newRow, rowElm); + else + rowElm.parentNode.insertBefore(newRow, rowElm); } + }; - function nextElm(node, names) { - var namesAr = names.split(','); + function insertCol(before) { + var posX, lastCell; - while ((node = node.nextSibling) != null) { - for (var i=0; i 1) { - do { - var nexttd = nextElm(td, "TD,TH"); + colSpan = getSpanVal(cell, 'colSpan'); - if (td._delete) - td.parentNode.removeChild(td); - } while ((td = nexttd) != null); + if (colSpan > 1) + setSpanVal(cell, 'colSpan', colSpan - 1); + else + dom.remove(cell); + }); + + cols.push(x); } - } while ((tr = next) != null); - } + }); + }); - function addRows(td_elm, tr_elm, rowspan) { - // Add rows - td_elm.rowSpan = 1; - var trNext = nextElm(tr_elm, "TR"); - for (var i=1; i 1) { + setSpanVal(cell, 'rowSpan', rowSpan - 1); + pos = getPos(cell); + fillLeftDown(pos.x, pos.y, 1, 1); } + }); + + // Delete cells + pos = getPos(tr.cells[0]); + each(grid[pos.y], function(cell) { + var rowSpan; - if (newTD == null) { - newTD = doc.createElement("td"); + cell = cell.elm; - if (!tinymce.isIE) - newTD.innerHTML = '
    '; + if (cell != lastCell) { + rowSpan = getSpanVal(cell, 'rowSpan'); + + if (rowSpan <= 1) + dom.remove(cell); + else + setSpanVal(cell, 'rowSpan', rowSpan - 1); + + lastCell = cell; } + }); + }; - // Reset col/row span - newTD.colSpan = 1; - newTD.rowSpan = 1; + // Get selected rows and move selection out of scope + rows = getSelectedRows(); - newTR.appendChild(newTD); + // Delete all selected rows + each(rows.reverse(), function(tr) { + deleteRow(tr); + }); - lastCell = tdElm; - } + cleanup(); + }; - return newTR; - } + function cutRows() { + var rows = getSelectedRows(); - // ---- Commands ----- + dom.remove(rows); + cleanup(); - // Handle commands - switch (command) { - case "mceTableMoveToNextRow": - var nextCell = getNextCell(tableElm, tdElm); + return rows; + }; - if (!nextCell) { - inst.execCommand("mceTableInsertRowAfter", tdElm); - nextCell = getNextCell(tableElm, tdElm); - } + function copyRows() { + var rows = getSelectedRows(); - inst.selection.select(nextCell); - inst.selection.collapse(true); + each(rows, function(row, i) { + rows[i] = cloneNode(row, true); + }); - return true; + return rows; + }; - case "mceTableRowProps": - if (trElm == null) - return true; + function pasteRows(rows, before) { + var selectedRows = getSelectedRows(), + targetRow = selectedRows[before ? 0 : selectedRows.length - 1], + targetCellCount = targetRow.cells.length; - if (user_interface) { - inst.windowManager.open({ - url : url + '/row.htm', - width : 400 + parseInt(inst.getLang('table.rowprops_delta_width', 0)), - height : 295 + parseInt(inst.getLang('table.rowprops_delta_height', 0)), - inline : 1 - }, { - plugin_url : url - }); - } + // Calc target cell count + each(grid, function(row) { + var match; - return true; + targetCellCount = 0; + each(row, function(cell, x) { + if (cell.real) + targetCellCount += cell.colspan; - case "mceTableCellProps": - if (tdElm == null) - return true; + if (cell.elm.parentNode == targetRow) + match = 1; + }); - if (user_interface) { - inst.windowManager.open({ - url : url + '/cell.htm', - width : 400 + parseInt(inst.getLang('table.cellprops_delta_width', 0)), - height : 295 + parseInt(inst.getLang('table.cellprops_delta_height', 0)), - inline : 1 - }, { - plugin_url : url - }); - } + if (match) + return false; + }); - return true; + if (!before) + rows.reverse(); - case "mceInsertTable": - if (user_interface) { - inst.windowManager.open({ - url : url + '/table.htm', - width : 400 + parseInt(inst.getLang('table.table_delta_width', 0)), - height : 320 + parseInt(inst.getLang('table.table_delta_height', 0)), - inline : 1 - }, { - plugin_url : url, - action : value ? value.action : 0 - }); - } + each(rows, function(row) { + var cellCount = row.cells.length, cell; + + // Remove col/rowspans + for (i = 0; i < cellCount; i++) { + cell = row.cells[i]; + setSpanVal(cell, 'colSpan', 1); + setSpanVal(cell, 'rowSpan', 1); + } + + // Needs more cells + for (i = cellCount; i < targetCellCount; i++) + row.appendChild(cloneCell(row.cells[cellCount - 1])); + + // Needs less cells + for (i = targetCellCount; i < cellCount; i++) + dom.remove(row.cells[i]); - return true; + // Add before/after + if (before) + targetRow.parentNode.insertBefore(row, targetRow); + else + dom.insertAfter(row, targetRow); + }); + }; + + function getPos(target) { + var pos; - case "mceTableDelete": - var table = inst.dom.getParent(inst.selection.getNode(), "table"); - if (table) { - table.parentNode.removeChild(table); - inst.execCommand('mceRepaint'); + each(grid, function(row, y) { + each(row, function(cell, x) { + if (cell.elm == target) { + pos = {x : x, y : y}; + return false; } - return true; - - case "mceTableSplitCells": - case "mceTableMergeCells": - case "mceTableInsertRowBefore": - case "mceTableInsertRowAfter": - case "mceTableDeleteRow": - case "mceTableInsertColBefore": - case "mceTableInsertColAfter": - case "mceTableDeleteCol": - case "mceTableCutRow": - case "mceTableCopyRow": - case "mceTablePasteRowBefore": - case "mceTablePasteRowAfter": - // No table just return (invalid command) - if (!tableElm) - return true; - - // Table has a tbody use that reference - // Changed logic by ApTest 2005.07.12 (www.aptest.com) - // Now lookk at the focused element and take its parentNode. That will be a tbody or a table. - if (trElm && tableElm != trElm.parentNode) - tableElm = trElm.parentNode; - - if (tableElm && trElm) { - switch (command) { - case "mceTableCutRow": - if (!trElm || !tdElm) - return true; - - inst.tableRowClipboard = copyRow(doc, tableElm, trElm); - inst.execCommand("mceTableDeleteRow"); - break; - - case "mceTableCopyRow": - if (!trElm || !tdElm) - return true; - - inst.tableRowClipboard = copyRow(doc, tableElm, trElm); - break; - - case "mceTablePasteRowBefore": - if (!trElm || !tdElm) - return true; - - var newTR = inst.tableRowClipboard.cloneNode(true); - - var prevTR = prevElm(trElm, "TR"); - if (prevTR != null) - trimRow(tableElm, prevTR, prevTR.cells[0], newTR); - - trElm.parentNode.insertBefore(newTR, trElm); - break; - - case "mceTablePasteRowAfter": - if (!trElm || !tdElm) - return true; - - var nextTR = nextElm(trElm, "TR"); - var newTR = inst.tableRowClipboard.cloneNode(true); - - trimRow(tableElm, trElm, tdElm, newTR); - - if (nextTR == null) - trElm.parentNode.appendChild(newTR); - else - nextTR.parentNode.insertBefore(newTR, nextTR); - - break; - - case "mceTableInsertRowBefore": - if (!trElm || !tdElm) - return true; - - var grid = getTableGrid(tableElm); - var cpos = getCellPos(grid, tdElm); - var newTR = doc.createElement("tr"); - var lastTDElm = null; - - cpos.rowindex--; - if (cpos.rowindex < 0) - cpos.rowindex = 0; - - // Create cells - for (var x=0; tdElm = getCell(grid, cpos.rowindex, x); x++) { - if (tdElm != lastTDElm) { - var sd = getColRowSpan(tdElm); - - if (sd['rowspan'] == 1) { - var newTD = doc.createElement("td"); - - if (!tinymce.isIE) - newTD.innerHTML = '
    '; - - newTD.colSpan = tdElm.colSpan; - - newTR.appendChild(newTD); - } else - tdElm.rowSpan = sd['rowspan'] + 1; - - lastTDElm = tdElm; - } - } + }); - trElm.parentNode.insertBefore(newTR, trElm); - select(0, 1); - break; + return !pos; + }); - case "mceTableInsertRowAfter": - if (!trElm || !tdElm) - return true; + return pos; + }; - var grid = getTableGrid(tableElm); - var cpos = getCellPos(grid, tdElm); - var newTR = doc.createElement("tr"); - var lastTDElm = null; + function setStartCell(cell) { + startPos = getPos(cell); + }; - // Create cells - for (var x=0; tdElm = getCell(grid, cpos.rowindex, x); x++) { - if (tdElm != lastTDElm) { - var sd = getColRowSpan(tdElm); + function findEndPos() { + var pos, maxX, maxY; - if (sd['rowspan'] == 1) { - var newTD = doc.createElement("td"); + maxX = maxY = 0; - if (!tinymce.isIE) - newTD.innerHTML = '
    '; + each(grid, function(row, y) { + each(row, function(cell, x) { + var colSpan, rowSpan; - newTD.colSpan = tdElm.colSpan; + if (isCellSelected(cell)) { + cell = grid[y][x]; - newTR.appendChild(newTD); - } else - tdElm.rowSpan = sd['rowspan'] + 1; + if (x > maxX) + maxX = x; - lastTDElm = tdElm; - } - } + if (y > maxY) + maxY = y; - if (newTR.hasChildNodes()) { - var nextTR = nextElm(trElm, "TR"); - if (nextTR) - nextTR.parentNode.insertBefore(newTR, nextTR); - else - tableElm.appendChild(newTR); - } + if (cell.real) { + colSpan = cell.colspan - 1; + rowSpan = cell.rowspan - 1; - select(0, 1); - break; + if (colSpan) { + if (x + colSpan > maxX) + maxX = x + colSpan; + } - case "mceTableDeleteRow": - if (!trElm || !tdElm) - return true; + if (rowSpan) { + if (y + rowSpan > maxY) + maxY = y + rowSpan; + } + } + } + }); + }); - var grid = getTableGrid(tableElm); - var cpos = getCellPos(grid, tdElm); + return {x : maxX, y : maxY}; + }; - // Only one row, remove whole table - if (grid.length == 1 && tableElm.nodeName == 'TBODY') { - inst.dom.remove(inst.dom.getParent(tableElm, "table")); - return true; - } + function setEndCell(cell) { + var startX, startY, endX, endY, maxX, maxY, colSpan, rowSpan; - // Move down row spanned cells - var cells = trElm.cells; - var nextTR = nextElm(trElm, "TR"); - for (var x=0; x 1) { - var newTD = cells[x].cloneNode(true); - var sd = getColRowSpan(cells[x]); + endPos = getPos(cell); - newTD.rowSpan = sd.rowspan - 1; + if (startPos && endPos) { + // Get start/end positions + startX = Math.min(startPos.x, endPos.x); + startY = Math.min(startPos.y, endPos.y); + endX = Math.max(startPos.x, endPos.x); + endY = Math.max(startPos.y, endPos.y); - var nextTD = nextTR.cells[x]; + // Expand end positon to include spans + maxX = endX; + maxY = endY; - if (nextTD == null) - nextTR.appendChild(newTD); - else - nextTR.insertBefore(newTD, nextTD); - } - } + // Expand startX + for (y = startY; y <= maxY; y++) { + cell = grid[y][startX]; - // Delete cells - var lastTDElm = null; - for (var x=0; tdElm = getCell(grid, cpos.rowindex, x); x++) { - if (tdElm != lastTDElm) { - var sd = getColRowSpan(tdElm); + if (!cell.real) { + if (startX - (cell.colspan - 1) < startX) + startX -= cell.colspan - 1; + } + } - if (sd.rowspan > 1) { - tdElm.rowSpan = sd.rowspan - 1; - } else { - trElm = tdElm.parentNode; + // Expand startY + for (x = startX; x <= maxX; x++) { + cell = grid[startY][x]; - if (trElm.parentNode) - trElm._delete = true; - } + if (!cell.real) { + if (startY - (cell.rowspan - 1) < startY) + startY -= cell.rowspan - 1; + } + } - lastTDElm = tdElm; - } - } + // Find max X, Y + for (y = startY; y <= endY; y++) { + for (x = startX; x <= endX; x++) { + cell = grid[y][x]; - deleteMarked(tableElm); + if (cell.real) { + colSpan = cell.colspan - 1; + rowSpan = cell.rowspan - 1; - select(0, -1); - break; + if (colSpan) { + if (x + colSpan > maxX) + maxX = x + colSpan; + } - case "mceTableInsertColBefore": - if (!trElm || !tdElm) - return true; + if (rowSpan) { + if (y + rowSpan > maxY) + maxY = y + rowSpan; + } + } + } + } - var grid = getTableGrid(inst.dom.getParent(tableElm, "table")); - var cpos = getCellPos(grid, tdElm); - var lastTDElm = null; + // Remove current selection + dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); - for (var y=0; tdElm = getCell(grid, y, cpos.cellindex); y++) { - if (tdElm != lastTDElm) { - var sd = getColRowSpan(tdElm); + // Add new selection + for (y = startY; y <= maxY; y++) { + for (x = startX; x <= maxX; x++) { + if (grid[y][x]) + dom.addClass(grid[y][x].elm, 'mceSelected'); + } + } + } + }; + + // Expose to public + tinymce.extend(this, { + deleteTable : deleteTable, + split : split, + merge : merge, + insertRow : insertRow, + insertCol : insertCol, + deleteCols : deleteCols, + deleteRows : deleteRows, + cutRows : cutRows, + copyRows : copyRows, + pasteRows : pasteRows, + getPos : getPos, + setStartCell : setStartCell, + setEndCell : setEndCell + }); + }; - if (sd['colspan'] == 1) { - var newTD = doc.createElement(tdElm.nodeName); + tinymce.create('tinymce.plugins.TablePlugin', { + init : function(ed, url) { + var winMan, clipboardRows; - if (!tinymce.isIE) - newTD.innerHTML = '
    '; + function createTableGrid(node) { + var selection = ed.selection, tblElm = ed.dom.getParent(node || selection.getNode(), 'table'); - newTD.rowSpan = tdElm.rowSpan; + if (tblElm) + return new TableGrid(tblElm, ed.dom, selection); + }; - tdElm.parentNode.insertBefore(newTD, tdElm); - } else - tdElm.colSpan++; + function cleanup() { + // Restore selection possibilities + ed.getBody().style.webkitUserSelect = ''; + ed.dom.removeClass(ed.dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); + }; - lastTDElm = tdElm; - } - } + // Register buttons + each([ + ['table', 'table.desc', 'mceInsertTable', true], + ['delete_table', 'table.del', 'mceTableDelete'], + ['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'], + ['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'], + ['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'], + ['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'], + ['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'], + ['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'], + ['row_props', 'table.row_desc', 'mceTableRowProps', true], + ['cell_props', 'table.cell_desc', 'mceTableCellProps', true], + ['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true], + ['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true] + ], function(c) { + ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]}); + }); - select(); - break; + // Select whole table is a table border is clicked + if (!tinymce.isIE) { + ed.onClick.add(function(ed, e) { + e = e.target; - case "mceTableInsertColAfter": - if (!trElm || !tdElm) - return true; + if (e.nodeName === 'TABLE') { + ed.selection.select(e); + ed.nodeChanged(); + } + }); + } - var grid = getTableGrid(inst.dom.getParent(tableElm, "table")); - var cpos = getCellPos(grid, tdElm); - var lastTDElm = null; + ed.onPreProcess.add(function(ed, args) { + var nodes, i, node, dom = ed.dom, value; - for (var y=0; tdElm = getCell(grid, y, cpos.cellindex); y++) { - if (tdElm != lastTDElm) { - var sd = getColRowSpan(tdElm); + nodes = dom.select('table', args.node); + i = nodes.length; + while (i--) { + node = nodes[i]; + dom.setAttrib(node, 'data-mce-style', ''); - if (sd['colspan'] == 1) { - var newTD = doc.createElement(tdElm.nodeName); + if ((value = dom.getAttrib(node, 'width'))) { + dom.setStyle(node, 'width', value); + dom.setAttrib(node, 'width', ''); + } - if (!tinymce.isIE) - newTD.innerHTML = '
    '; + if ((value = dom.getAttrib(node, 'height'))) { + dom.setStyle(node, 'height', value); + dom.setAttrib(node, 'height', ''); + } + } + }); - newTD.rowSpan = tdElm.rowSpan; + // Handle node change updates + ed.onNodeChange.add(function(ed, cm, n) { + var p; - var nextTD = nextElm(tdElm, "TD,TH"); - if (nextTD == null) - tdElm.parentNode.appendChild(newTD); - else - nextTD.parentNode.insertBefore(newTD, nextTD); - } else - tdElm.colSpan++; + n = ed.selection.getStart(); + p = ed.dom.getParent(n, 'td,th,caption'); + cm.setActive('table', n.nodeName === 'TABLE' || !!p); - lastTDElm = tdElm; - } - } + // Disable table tools if we are in caption + if (p && p.nodeName === 'CAPTION') + p = 0; - select(1); - break; + cm.setDisabled('delete_table', !p); + cm.setDisabled('delete_col', !p); + cm.setDisabled('delete_table', !p); + cm.setDisabled('delete_row', !p); + cm.setDisabled('col_after', !p); + cm.setDisabled('col_before', !p); + cm.setDisabled('row_after', !p); + cm.setDisabled('row_before', !p); + cm.setDisabled('row_props', !p); + cm.setDisabled('cell_props', !p); + cm.setDisabled('split_cells', !p); + cm.setDisabled('merge_cells', !p); + }); - case "mceTableDeleteCol": - if (!trElm || !tdElm) - return true; + ed.onInit.add(function(ed) { + var startTable, startCell, dom = ed.dom, tableGrid; - var grid = getTableGrid(tableElm); - var cpos = getCellPos(grid, tdElm); - var lastTDElm = null; + winMan = ed.windowManager; - // Only one col, remove whole table - if ((grid.length > 1 && grid[0].length <= 1) && tableElm.nodeName == 'TBODY') { - inst.dom.remove(inst.dom.getParent(tableElm, "table")); - return true; - } + // Add cell selection logic + ed.onMouseDown.add(function(ed, e) { + if (e.button != 2) { + cleanup(); - // Delete cells - for (var y=0; tdElm = getCell(grid, y, cpos.cellindex); y++) { - if (tdElm != lastTDElm) { - var sd = getColRowSpan(tdElm); + startCell = dom.getParent(e.target, 'td,th'); + startTable = dom.getParent(startCell, 'table'); + } + }); - if (sd['colspan'] > 1) - tdElm.colSpan = sd['colspan'] - 1; - else { - if (tdElm.parentNode) - tdElm.parentNode.removeChild(tdElm); - } + dom.bind(ed.getDoc(), 'mouseover', function(e) { + var sel, table, target = e.target; - lastTDElm = tdElm; - } - } + if (startCell && (tableGrid || target != startCell) && (target.nodeName == 'TD' || target.nodeName == 'TH')) { + table = dom.getParent(target, 'table'); + if (table == startTable) { + if (!tableGrid) { + tableGrid = createTableGrid(table); + tableGrid.setStartCell(startCell); - select(-1); - break; + ed.getBody().style.webkitUserSelect = 'none'; + } - case "mceTableSplitCells": - if (!trElm || !tdElm) - return true; + tableGrid.setEndCell(target); + } - var spandata = getColRowSpan(tdElm); + // Remove current selection + sel = ed.selection.getSel(); - var colspan = spandata["colspan"]; - var rowspan = spandata["rowspan"]; + try { + if (sel.removeAllRanges) + sel.removeAllRanges(); + else + sel.empty(); + } catch (ex) { + // IE9 might throw errors here + } - // Needs splitting - if (colspan > 1 || rowspan > 1) { - // Generate cols - tdElm.colSpan = 1; - for (var i=1; i 1) - addRows(newTD, trElm, rowspan); - } + function setPoint(node, start) { + var walker = new tinymce.dom.TreeWalker(node, node); - addRows(tdElm, trElm, rowspan); - } + do { + // Text node + if (node.nodeType == 3 && tinymce.trim(node.nodeValue).length != 0) { + if (start) + rng.setStart(node, 0); + else + rng.setEnd(node, node.nodeValue.length); - // Apply visual aids - tableElm = inst.dom.getParent(inst.selection.getNode(), "table"); - break; + return; + } - case "mceTableMergeCells": - var rows = []; - var sel = inst.selection.getSel(); - var grid = getTableGrid(tableElm); - - if (tinymce.isIE || sel.rangeCount == 1) { - if (user_interface) { - // Setup template - var sp = getColRowSpan(tdElm); - - inst.windowManager.open({ - url : url + '/merge_cells.htm', - width : 240 + parseInt(inst.getLang('table.merge_cells_delta_width', 0)), - height : 110 + parseInt(inst.getLang('table.merge_cells_delta_height', 0)), - inline : 1 - }, { - action : "update", - numcols : sp.colspan, - numrows : sp.rowspan, - plugin_url : url - }); - - return true; - } else { - var numRows = parseInt(value['numrows']); - var numCols = parseInt(value['numcols']); - var cpos = getCellPos(grid, tdElm); - - if (("" + numRows) == "NaN") - numRows = 1; - - if (("" + numCols) == "NaN") - numCols = 1; - - // Get rows and cells - var tRows = tableElm.rows; - for (var y=cpos.rowindex; y 0) - rows[rows.length] = rowCells; - - var td = getCell(grid, cpos.rowindex, cpos.cellindex); - each(ed.dom.select('br', td), function(e, i) { - if (i > 0 && ed.dom.getAttrib('mce_bogus')) - ed.dom.remove(e); - }); - } + // BR element + if (node.nodeName == 'BR') { + if (start) + rng.setStartBefore(node); + else + rng.setEndBefore(node); - //return true; + return; } - } else { - var cells = []; - var sel = inst.selection.getSel(); - var lastTR = null; - var curRow = null; - var x1 = -1, y1 = -1, x2, y2; - - // Only one cell selected, whats the point? - if (sel.rangeCount < 2) - return true; - - // Get all selected cells - for (var i=0; i 0) { + rng = dom.createRng(); + node = selectedCells[0]; + endNode = selectedCells[selectedCells.length - 1]; + + setPoint(node, 1); + walker = new tinymce.dom.TreeWalker(node, dom.getParent(selectedCells[0], 'table')); + + do { + if (node.nodeName == 'TD' || node.nodeName == 'TH') { + if (!dom.hasClass(node, 'mceSelected')) break; - if (tdElm.nodeName == "TD" || tdElm.nodeName == "TH") - cells[cells.length] = tdElm; + lastNode = node; } + } while (node = walker.next()); - // Get rows and cells - var tRows = tableElm.rows; - for (var y=0; y 0) - rows[rows.length] = rowCells; - } + ed.onKeyUp.add(function(ed, e) { + cleanup(); + }); - // Find selected cells in grid and box - var curRow = []; - var lastTR = null; - for (var y=0; y colSpan) - colSpan = rowColSpan; + // Skip empty text nodes form the end + for (last = ed.getBody().lastChild; last && last.nodeType == 3 && !last.nodeValue.length; last = last.previousSibling) ; - lastRowSpan = -1; - } + if (last && last.nodeName == 'TABLE') + ed.dom.add(ed.getBody(), 'p', null, '
    '); + }; - // Validate vertical and get total rowspan - var lastColSpan = -1; - for (var x=0; x rowSpan) - rowSpan = colRowSpan; + ed.onKeyUp.add(fixTableCaretPos); + ed.onSetContent.add(fixTableCaretPos); + ed.onVisualAid.add(fixTableCaretPos); - lastColSpan = -1; - } + ed.onPreProcess.add(function(ed, o) { + var last = o.node.lastChild; - // Setup td - tdElm = rows[0][0]; - tdElm.rowSpan = rowSpan; - tdElm.colSpan = colSpan; + if (last && last.childNodes.length == 1 && last.firstChild.nodeName == 'BR') + ed.dom.remove(last); + }); - // Merge cells - for (var y=0; y 0)) - tdElm.innerHTML += html; + // Register action commands + each({ + mceTableSplitCells : function(grid) { + grid.split(); + }, - // Not current cell - if (rows[y][x] != tdElm && !rows[y][x]._deleted) { - var cpos = getCellPos(grid, rows[y][x]); - var tr = rows[y][x].parentNode; + mceTableMergeCells : function(grid) { + var rowSpan, colSpan, cell; - tr.removeChild(rows[y][x]); - rows[y][x]._deleted = true; + cell = ed.dom.getParent(ed.selection.getNode(), 'th,td'); + if (cell) { + rowSpan = cell.rowSpan; + colSpan = cell.colSpan; + } - // Empty TR, remove it - if (!tr.hasChildNodes()) { - tr.parentNode.removeChild(tr); + if (!ed.dom.select('td.mceSelected,th.mceSelected').length) { + winMan.open({ + url : url + '/merge_cells.htm', + width : 240 + parseInt(ed.getLang('table.merge_cells_delta_width', 0)), + height : 110 + parseInt(ed.getLang('table.merge_cells_delta_height', 0)), + inline : 1 + }, { + rows : rowSpan, + cols : colSpan, + onaction : function(data) { + grid.merge(cell, data.cols, data.rows); + }, + plugin_url : url + }); + } else + grid.merge(); + }, - var lastCell = null; - for (var x=0; cellElm = getCell(grid, cpos.rowindex, x); x++) { - if (cellElm != lastCell && cellElm.rowSpan > 1) - cellElm.rowSpan--; + mceTableInsertRowBefore : function(grid) { + grid.insertRow(true); + }, - lastCell = cellElm; - } + mceTableInsertRowAfter : function(grid) { + grid.insertRow(); + }, - if (tdElm.rowSpan > 1) - tdElm.rowSpan--; - } - } - } - } + mceTableInsertColBefore : function(grid) { + grid.insertCol(true); + }, - // Remove all but one bogus br - each(ed.dom.select('br', tdElm), function(e, i) { - if (i > 0 && ed.dom.getAttrib(e, 'mce_bogus')) - ed.dom.remove(e); - }); + mceTableInsertColAfter : function(grid) { + grid.insertCol(); + }, - break; - } + mceTableDeleteCol : function(grid) { + grid.deleteCols(); + }, - tableElm = inst.dom.getParent(inst.selection.getNode(), "table"); - inst.addVisual(tableElm); - inst.nodeChanged(); - } + mceTableDeleteRow : function(grid) { + grid.deleteRows(); + }, - return true; - } + mceTableCutRow : function(grid) { + clipboardRows = grid.cutRows(); + }, + + mceTableCopyRow : function(grid) { + clipboardRows = grid.copyRows(); + }, + + mceTablePasteRowBefore : function(grid) { + grid.pasteRows(clipboardRows, true); + }, + + mceTablePasteRowAfter : function(grid) { + grid.pasteRows(clipboardRows); + }, - // Pass to next handler in chain - return false; + mceTableDelete : function(grid) { + grid.deleteTable(); + } + }, function(func, name) { + ed.addCommand(name, function() { + var grid = createTableGrid(); + + if (grid) { + func(grid); + ed.execCommand('mceRepaint'); + cleanup(); + } + }); + }); + + // Register dialog commands + each({ + mceInsertTable : function(val) { + winMan.open({ + url : url + '/table.htm', + width : 400 + parseInt(ed.getLang('table.table_delta_width', 0)), + height : 320 + parseInt(ed.getLang('table.table_delta_height', 0)), + inline : 1 + }, { + plugin_url : url, + action : val ? val.action : 0 + }); + }, + + mceTableRowProps : function() { + winMan.open({ + url : url + '/row.htm', + width : 400 + parseInt(ed.getLang('table.rowprops_delta_width', 0)), + height : 295 + parseInt(ed.getLang('table.rowprops_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }, + + mceTableCellProps : function() { + winMan.open({ + url : url + '/cell.htm', + width : 400 + parseInt(ed.getLang('table.cellprops_delta_width', 0)), + height : 295 + parseInt(ed.getLang('table.cellprops_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + } + }, function(func, name) { + ed.addCommand(name, function(ui, val) { + func(val); + }); + }); } }); // Register plugin tinymce.PluginManager.add('table', tinymce.plugins.TablePlugin); -})(); \ No newline at end of file +})(tinymce); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/table/js/cell.js b/include/javascript/tiny_mce/plugins/table/js/cell.js index 07320ac2..38bbe79f 100644 --- a/include/javascript/tiny_mce/plugins/table/js/cell.js +++ b/include/javascript/tiny_mce/plugins/table/js/cell.js @@ -11,7 +11,7 @@ function init() { document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor') var inst = ed; - var tdElm = ed.dom.getParent(ed.selection.getNode(), "td,th"); + var tdElm = ed.dom.getParent(ed.selection.getStart(), "td,th"); var formObj = document.forms[0]; var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style")); @@ -24,7 +24,7 @@ function init() { var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor')); var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor')); var className = ed.dom.getAttrib(tdElm, 'class'); - var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");; + var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); var id = ed.dom.getAttrib(tdElm, 'id'); var lang = ed.dom.getAttrib(tdElm, 'lang'); var dir = ed.dom.getAttrib(tdElm, 'dir'); @@ -34,39 +34,54 @@ function init() { addClassesToList('class', 'table_cell_styles'); TinyMCE_EditableSelects.init(); - formObj.bordercolor.value = bordercolor; - formObj.bgcolor.value = bgcolor; - formObj.backgroundimage.value = backgroundimage; - formObj.width.value = width; - formObj.height.value = height; - formObj.id.value = id; - formObj.lang.value = lang; - formObj.style.value = ed.dom.serializeStyle(st); - selectByValue(formObj, 'align', align); - selectByValue(formObj, 'valign', valign); - selectByValue(formObj, 'class', className, true, true); - selectByValue(formObj, 'celltype', celltype); - selectByValue(formObj, 'dir', dir); - selectByValue(formObj, 'scope', scope); - - // Resize some elements - if (isVisible('backgroundimagebrowser')) - document.getElementById('backgroundimage').style.width = '180px'; - - updateColor('bordercolor_pick', 'bordercolor'); - updateColor('bgcolor_pick', 'bgcolor'); + if (!ed.dom.hasClass(tdElm, 'mceSelected')) { + formObj.bordercolor.value = bordercolor; + formObj.bgcolor.value = bgcolor; + formObj.backgroundimage.value = backgroundimage; + formObj.width.value = width; + formObj.height.value = height; + formObj.id.value = id; + formObj.lang.value = lang; + formObj.style.value = ed.dom.serializeStyle(st); + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'valign', valign); + selectByValue(formObj, 'class', className, true, true); + selectByValue(formObj, 'celltype', celltype); + selectByValue(formObj, 'dir', dir); + selectByValue(formObj, 'scope', scope); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + updateColor('bordercolor_pick', 'bordercolor'); + updateColor('bgcolor_pick', 'bgcolor'); + } else + tinyMCEPopup.dom.hide('action'); } function updateAction() { var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0]; tinyMCEPopup.restoreSelection(); - el = ed.selection.getNode(); + el = ed.selection.getStart(); tdElm = ed.dom.getParent(el, "td,th"); trElm = ed.dom.getParent(el, "tr"); tableElm = ed.dom.getParent(el, "table"); - ed.execCommand('mceBeginUndoLevel'); + // Cell is selected + if (ed.dom.hasClass(tdElm, 'mceSelected')) { + // Update all selected sells + tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) { + updateCell(td); + }); + + ed.addVisual(); + ed.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + return; + } switch (getSelectValue(formObj, 'action')) { case "cell": @@ -149,15 +164,15 @@ function updateCell(td, skip_id) { var dom = ed.dom; if (!skip_id) - td.setAttribute('id', formObj.id.value); - - td.setAttribute('align', formObj.align.value); - td.setAttribute('vAlign', formObj.valign.value); - td.setAttribute('lang', formObj.lang.value); - td.setAttribute('dir', getSelectValue(formObj, 'dir')); - td.setAttribute('style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value))); - td.setAttribute('scope', formObj.scope.value); - ed.dom.setAttrib(td, 'class', getSelectValue(formObj, 'class')); + dom.setAttrib(td, 'id', formObj.id.value); + + dom.setAttrib(td, 'align', formObj.align.value); + dom.setAttrib(td, 'vAlign', formObj.valign.value); + dom.setAttrib(td, 'lang', formObj.lang.value); + dom.setAttrib(td, 'dir', getSelectValue(formObj, 'dir')); + dom.setAttrib(td, 'style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value))); + dom.setAttrib(td, 'scope', formObj.scope.value); + dom.setAttrib(td, 'class', getSelectValue(formObj, 'class')); // Clear deprecated attributes ed.dom.setAttrib(td, 'width', ''); diff --git a/include/javascript/tiny_mce/plugins/table/js/merge_cells.js b/include/javascript/tiny_mce/plugins/table/js/merge_cells.js index 2fbe98fe..fc2a0481 100644 --- a/include/javascript/tiny_mce/plugins/table/js/merge_cells.js +++ b/include/javascript/tiny_mce/plugins/table/js/merge_cells.js @@ -1,29 +1,27 @@ tinyMCEPopup.requireLangPack(); -function init() { - var f = document.forms[0], v; +var MergeCellsDialog = { + init : function() { + var f = document.forms[0]; - tinyMCEPopup.resizeToInnerSize(); + f.numcols.value = tinyMCEPopup.getWindowArg('cols', 1); + f.numrows.value = tinyMCEPopup.getWindowArg('rows', 1); + }, - f.numcols.value = tinyMCEPopup.getWindowArg('numcols', 1); - f.numrows.value = tinyMCEPopup.getWindowArg('numrows', 1); -} + merge : function() { + var func, f = document.forms[0]; -function mergeCells() { - var args = [], f = document.forms[0]; + tinyMCEPopup.restoreSelection(); - tinyMCEPopup.restoreSelection(); + func = tinyMCEPopup.getWindowArg('onaction'); - if (!AutoValidator.validate(f)) { - tinyMCEPopup.alert(tinyMCEPopup.getLang('invalid_data')); - return false; - } - - args["numcols"] = f.numcols.value; - args["numrows"] = f.numrows.value; + func({ + cols : f.numcols.value, + rows : f.numrows.value + }); - tinyMCEPopup.execCommand("mceTableMergeCells", false, args); - tinyMCEPopup.close(); -} + tinyMCEPopup.close(); + } +}; -tinyMCEPopup.onInit.add(init); +tinyMCEPopup.onInit.add(MergeCellsDialog.init, MergeCellsDialog); diff --git a/include/javascript/tiny_mce/plugins/table/js/row.js b/include/javascript/tiny_mce/plugins/table/js/row.js index 3a171624..2c8d0fbd 100644 --- a/include/javascript/tiny_mce/plugins/table/js/row.js +++ b/include/javascript/tiny_mce/plugins/table/js/row.js @@ -8,7 +8,7 @@ function init() { var inst = tinyMCEPopup.editor; var dom = inst.dom; - var trElm = dom.getParent(inst.selection.getNode(), "tr"); + var trElm = dom.getParent(inst.selection.getStart(), "tr"); var formObj = document.forms[0]; var st = dom.parseStyle(dom.getAttrib(trElm, "style")); @@ -19,32 +19,37 @@ function init() { var height = trimSize(getStyle(trElm, 'height', 'height')); var className = dom.getAttrib(trElm, 'class'); var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor')); - var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");; + var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); var id = dom.getAttrib(trElm, 'id'); var lang = dom.getAttrib(trElm, 'lang'); var dir = dom.getAttrib(trElm, 'dir'); - // Setup form - addClassesToList('class', 'table_row_styles'); - TinyMCE_EditableSelects.init(); - - formObj.bgcolor.value = bgcolor; - formObj.backgroundimage.value = backgroundimage; - formObj.height.value = height; - formObj.id.value = id; - formObj.lang.value = lang; - formObj.style.value = dom.serializeStyle(st); - selectByValue(formObj, 'align', align); - selectByValue(formObj, 'valign', valign); - selectByValue(formObj, 'class', className, true, true); selectByValue(formObj, 'rowtype', rowtype); - selectByValue(formObj, 'dir', dir); - - // Resize some elements - if (isVisible('backgroundimagebrowser')) - document.getElementById('backgroundimage').style.width = '180px'; - updateColor('bgcolor_pick', 'bgcolor'); + // Any cells selected + if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) { + // Setup form + addClassesToList('class', 'table_row_styles'); + TinyMCE_EditableSelects.init(); + + formObj.bgcolor.value = bgcolor; + formObj.backgroundimage.value = backgroundimage; + formObj.height.value = height; + formObj.id.value = id; + formObj.lang.value = lang; + formObj.style.value = dom.serializeStyle(st); + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'valign', valign); + selectByValue(formObj, 'class', className, true, true); + selectByValue(formObj, 'dir', dir); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + updateColor('bgcolor_pick', 'bgcolor'); + } else + tinyMCEPopup.dom.hide('action'); } function updateAction() { @@ -52,10 +57,28 @@ function updateAction() { var action = getSelectValue(formObj, 'action'); tinyMCEPopup.restoreSelection(); - trElm = dom.getParent(inst.selection.getNode(), "tr"); - tableElm = dom.getParent(inst.selection.getNode(), "table"); + trElm = dom.getParent(inst.selection.getStart(), "tr"); + tableElm = dom.getParent(inst.selection.getStart(), "table"); + + // Update all selected rows + if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) { + tinymce.each(tableElm.rows, function(tr) { + var i; + + for (i = 0; i < tr.cells.length; i++) { + if (dom.hasClass(tr.cells[i], 'mceSelected')) { + updateRow(tr, true); + return; + } + } + }); - inst.execCommand('mceBeginUndoLevel'); + inst.addVisual(); + inst.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + return; + } switch (action) { case "row": @@ -98,19 +121,19 @@ function updateRow(tr_elm, skip_id, skip_parent) { // Update row element if (!skip_id) - tr_elm.setAttribute('id', formObj.id.value); + dom.setAttrib(tr_elm, 'id', formObj.id.value); - tr_elm.setAttribute('align', getSelectValue(formObj, 'align')); - tr_elm.setAttribute('vAlign', getSelectValue(formObj, 'valign')); - tr_elm.setAttribute('lang', formObj.lang.value); - tr_elm.setAttribute('dir', getSelectValue(formObj, 'dir')); - tr_elm.setAttribute('style', dom.serializeStyle(dom.parseStyle(formObj.style.value))); + dom.setAttrib(tr_elm, 'align', getSelectValue(formObj, 'align')); + dom.setAttrib(tr_elm, 'vAlign', getSelectValue(formObj, 'valign')); + dom.setAttrib(tr_elm, 'lang', formObj.lang.value); + dom.setAttrib(tr_elm, 'dir', getSelectValue(formObj, 'dir')); + dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(formObj.style.value))); dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class')); // Clear deprecated attributes - tr_elm.setAttribute('background', ''); - tr_elm.setAttribute('bgColor', ''); - tr_elm.setAttribute('height', ''); + dom.setAttrib(tr_elm, 'background', ''); + dom.setAttrib(tr_elm, 'bgColor', ''); + dom.setAttrib(tr_elm, 'height', ''); // Set styles tr_elm.style.height = getCSSSize(formObj.height.value); @@ -138,13 +161,10 @@ function updateRow(tr_elm, skip_id, skip_parent) { if (newParent == null) { newParent = doc.createElement(dest); - if (dest == "thead") { - if (theTable.firstChild.nodeName == 'CAPTION') - inst.dom.insertAfter(newParent, theTable.firstChild); - else - theTable.insertBefore(newParent, theTable.firstChild); - } else - theTable.appendChild(newParent); + if (theTable.firstChild.nodeName == 'CAPTION') + inst.dom.insertAfter(newParent, theTable.firstChild); + else + theTable.insertBefore(newParent, theTable.firstChild); } // append the row to the new parent diff --git a/include/javascript/tiny_mce/plugins/table/js/table.js b/include/javascript/tiny_mce/plugins/table/js/table.js index f6b1bae6..77e9044f 100644 --- a/include/javascript/tiny_mce/plugins/table/js/table.js +++ b/include/javascript/tiny_mce/plugins/table/js/table.js @@ -12,7 +12,7 @@ function insertTable() { tinyMCEPopup.restoreSelection(); if (!AutoValidator.validate(formObj)) { - tinyMCEPopup.alert(inst.getLang('invalid_data')); + tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.'); return false; } @@ -21,17 +21,17 @@ function insertTable() { // Get form data cols = formObj.elements['cols'].value; rows = formObj.elements['rows'].value; - border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0; + border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0; cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : ""; cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : ""; - align = formObj.elements['align'].options[formObj.elements['align'].selectedIndex].value; - frame = formObj.elements['frame'].options[formObj.elements['frame'].selectedIndex].value; - rules = formObj.elements['rules'].options[formObj.elements['rules'].selectedIndex].value; + align = getSelectValue(formObj, "align"); + frame = getSelectValue(formObj, "tframe"); + rules = getSelectValue(formObj, "rules"); width = formObj.elements['width'].value; height = formObj.elements['height'].value; bordercolor = formObj.elements['bordercolor'].value; bgcolor = formObj.elements['bgcolor'].value; - className = formObj.elements['class'].options[formObj.elements['class'].selectedIndex].value; + className = getSelectValue(formObj, "class"); id = formObj.elements['id'].value; summary = formObj.elements['summary'].value; style = formObj.elements['style'].value; @@ -58,8 +58,6 @@ function insertTable() { // Update table if (action == "update") { - inst.execCommand('mceBeginUndoLevel'); - dom.setAttrib(elm, 'cellPadding', cellpadding, true); dom.setAttrib(elm, 'cellSpacing', cellspacing, true); dom.setAttrib(elm, 'border', border); @@ -82,7 +80,7 @@ function insertTable() { capEl = elm.ownerDocument.createElement('caption'); if (!tinymce.isIE) - capEl.innerHTML = '
    '; + capEl.innerHTML = '
    '; elm.insertBefore(capEl, elm.firstChild); } @@ -151,11 +149,16 @@ function insertTable() { html += makeAttrib('border', border); html += makeAttrib('cellpadding', cellpadding); html += makeAttrib('cellspacing', cellspacing); + html += makeAttrib('data-mce-new', '1'); if (width && inst.settings.inline_styles) { if (style) style += '; '; + // Force px + if (/^[0-9\.]+$/.test(width)) + width += 'px'; + style += 'width: ' + width; } else html += makeAttrib('width', width); @@ -182,7 +185,7 @@ function insertTable() { if (caption) { if (!tinymce.isIE) - html += '
    '; + html += ''; else html += ''; } @@ -192,7 +195,7 @@ function insertTable() { for (var x=0; x'); + + tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) { + if (patt) + patt += ','; + + patt += n + ' ._mce_marker'; + }); + + tinymce.each(inst.dom.select(patt), function(n) { + inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n); + }); + + dom.setOuterHTML(dom.select('br._mce_marker')[0], html); + } else + inst.execCommand('mceInsertContent', false, html); + + tinymce.each(dom.select('table[data-mce-new]'), function(node) { + var td = dom.select('td', node); + + try { + // IE9 might fail to do this selection + inst.selection.select(td[0], true); + inst.selection.collapse(); + } catch (ex) { + // Ignore + } + + dom.setAttrib(node, 'data-mce-new', ''); + }); + inst.addVisual(); inst.execCommand('mceEndUndoLevel'); @@ -243,7 +280,7 @@ function init() { var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', ''); var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = ""; - var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules, frame; + var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules = "", frame = ""; var inst = tinyMCEPopup.editor, dom = inst.dom; var formObj = document.forms[0]; var elm = dom.getParent(inst.selection.getNode(), "table"); @@ -280,7 +317,7 @@ function init() { style = dom.serializeStyle(st); dir = dom.getAttrib(elm, 'dir'); lang = dom.getAttrib(elm, 'lang'); - background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); + background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); formObj.caption.checked = elm.getElementsByTagName('caption').length > 0; orgTableWidth = width; @@ -295,7 +332,7 @@ function init() { // Update form selectByValue(formObj, 'align', align); - selectByValue(formObj, 'frame', frame); + selectByValue(formObj, 'tframe', frame); selectByValue(formObj, 'rules', rules); selectByValue(formObj, 'class', className, true, true); formObj.cols.value = cols; @@ -389,7 +426,7 @@ function changedStyle() { var st = dom.parseStyle(formObj.style.value); if (st['background-image']) - formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); + formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); else formObj.backgroundimage.value = ''; diff --git a/include/javascript/tiny_mce/plugins/table/langs/en_dlg.js b/include/javascript/tiny_mce/plugins/table/langs/en_dlg.js index a33c987c..db5555c1 100644 --- a/include/javascript/tiny_mce/plugins/table/langs/en_dlg.js +++ b/include/javascript/tiny_mce/plugins/table/langs/en_dlg.js @@ -7,7 +7,7 @@ rowtype:"Row in table part", title:"Insert/Modify table", width:"Width", height:"Height", -cols:"Cols", +cols:"Columns", rows:"Rows", cellspacing:"Cellspacing", cellpadding:"Cellpadding", diff --git a/include/javascript/tiny_mce/plugins/table/merge_cells.htm b/include/javascript/tiny_mce/plugins/table/merge_cells.htm index f2dcbec5..788acf68 100644 --- a/include/javascript/tiny_mce/plugins/table/merge_cells.htm +++ b/include/javascript/tiny_mce/plugins/table/merge_cells.htm @@ -6,32 +6,26 @@ - - -
    + +
    {#table_dlg.merge_cells_title} -
     


    - - - - - - - - -
    {#table_dlg.cols}:
    {#table_dlg.rows}:
    + + + + + + + + + +
    :
    :
    -
    - -
    - -
    - -
    + +
    diff --git a/include/javascript/tiny_mce/plugins/table/row.htm b/include/javascript/tiny_mce/plugins/table/row.htm index 4a709d36..430c2217 100644 --- a/include/javascript/tiny_mce/plugins/table/row.htm +++ b/include/javascript/tiny_mce/plugins/table/row.htm @@ -8,14 +8,13 @@ - - -
    + + @@ -24,7 +23,7 @@
    {#table_dlg.general_props} - +
    '; + + if (s.image) + h1 = DOM.createHTML('img ', {src : s.image, role: 'presentation', 'class' : 'mceAction ' + s['class']}); + else + h1 = DOM.createHTML('span', {'class' : 'mceAction ' + s['class']}, ''); + + h1 += DOM.createHTML('span', {'class': 'mceVoiceLabel mceIconOnly', id: t.id + '_voice', style: 'display:none;'}, s.title); + h += ''; + + h1 = DOM.createHTML('span', {'class' : 'mceOpen ' + s['class']}, ''); + h += ''; + + h += ''; + h = DOM.createHTML('table', {id : t.id, role: 'presentation', tabindex: '0', 'class' : 'mceSplitButton mceSplitButtonEnabled ' + s['class'], cellpadding : '0', cellspacing : '0', title : s.title}, h); + return DOM.createHTML('span', {role: 'button', 'aria-labelledby': t.id + '_voice', 'aria-haspopup': 'true'}, h); + }, + + postRender : function() { + var t = this, s = t.settings, activate; + + if (s.onclick) { + activate = function(evt) { + if (!t.isDisabled()) { + s.onclick(t.value); + Event.cancel(evt); + } + }; + Event.add(t.id + '_action', 'click', activate); + Event.add(t.id, ['click', 'keydown'], function(evt) { + var DOM_VK_SPACE = 32, DOM_VK_ENTER = 14, DOM_VK_RETURN = 13, DOM_VK_UP = 38, DOM_VK_DOWN = 40; + if ((evt.keyCode === 32 || evt.keyCode === 13 || evt.keyCode === 14) && !evt.altKey && !evt.ctrlKey && !evt.metaKey) { + activate(); + Event.cancel(evt); + } else if (evt.type === 'click' || evt.keyCode === DOM_VK_DOWN) { + t.showMenu(); + Event.cancel(evt); + } + }); + } + + Event.add(t.id + '_open', 'click', function (evt) { + t.showMenu(); + Event.cancel(evt); + }); + Event.add([t.id, t.id + '_open'], 'focus', function() {t._focused = 1;}); + Event.add([t.id, t.id + '_open'], 'blur', function() {t._focused = 0;}); + + // Old IE doesn't have hover on all elements + if (tinymce.isIE6 || !DOM.boxModel) { + Event.add(t.id, 'mouseover', function() { + if (!DOM.hasClass(t.id, 'mceSplitButtonDisabled')) + DOM.addClass(t.id, 'mceSplitButtonHover'); + }); + + Event.add(t.id, 'mouseout', function() { + if (!DOM.hasClass(t.id, 'mceSplitButtonDisabled')) + DOM.removeClass(t.id, 'mceSplitButtonHover'); + }); + } + }, + + destroy : function() { + this.parent(); + + Event.clear(this.id + '_action'); + Event.clear(this.id + '_open'); + Event.clear(this.id); + } + }); +})(tinymce); + +(function(tinymce) { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, is = tinymce.is, each = tinymce.each; + + tinymce.create('tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton', { + ColorSplitButton : function(id, s, ed) { + var t = this; + + t.parent(id, s, ed); + + t.settings = s = tinymce.extend({ + colors : '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF', + grid_width : 8, + default_color : '#888888' + }, t.settings); + + t.onShowMenu = new tinymce.util.Dispatcher(t); + + t.onHideMenu = new tinymce.util.Dispatcher(t); + + t.value = s.default_color; + }, + + showMenu : function() { + var t = this, r, p, e, p2; + + if (t.isDisabled()) + return; + + if (!t.isMenuRendered) { + t.renderMenu(); + t.isMenuRendered = true; + } + + if (t.isMenuVisible) + return t.hideMenu(); + + e = DOM.get(t.id); + DOM.show(t.id + '_menu'); + DOM.addClass(e, 'mceSplitButtonSelected'); + p2 = DOM.getPos(e); + DOM.setStyles(t.id + '_menu', { + left : p2.x, + top : p2.y + e.clientHeight, + zIndex : 200000 + }); + e = 0; + + Event.add(DOM.doc, 'mousedown', t.hideMenu, t); + t.onShowMenu.dispatch(t); + + if (t._focused) { + t._keyHandler = Event.add(t.id + '_menu', 'keydown', function(e) { + if (e.keyCode == 27) + t.hideMenu(); + }); + + DOM.select('a', t.id + '_menu')[0].focus(); // Select first link + } + + t.isMenuVisible = 1; + }, + + hideMenu : function(e) { + var t = this; + + if (t.isMenuVisible) { + // Prevent double toogles by canceling the mouse click event to the button + if (e && e.type == "mousedown" && DOM.getParent(e.target, function(e) {return e.id === t.id + '_open';})) + return; + + if (!e || !DOM.getParent(e.target, '.mceSplitButtonMenu')) { + DOM.removeClass(t.id, 'mceSplitButtonSelected'); + Event.remove(DOM.doc, 'mousedown', t.hideMenu, t); + Event.remove(t.id + '_menu', 'keydown', t._keyHandler); + DOM.hide(t.id + '_menu'); + } + + t.isMenuVisible = 0; + } + }, + + renderMenu : function() { + var t = this, m, i = 0, s = t.settings, n, tb, tr, w, context; + + w = DOM.add(s.menu_container, 'div', {role: 'listbox', id : t.id + '_menu', 'class' : s['menu_class'] + ' ' + s['class'], style : 'position:absolute;left:0;top:-1000px;'}); + m = DOM.add(w, 'div', {'class' : s['class'] + ' mceSplitButtonMenu'}); + DOM.add(m, 'span', {'class' : 'mceMenuLine'}); + + n = DOM.add(m, 'table', {role: 'presentation', 'class' : 'mceColorSplitMenu'}); + tb = DOM.add(n, 'tbody'); + + // Generate color grid + i = 0; + each(is(s.colors, 'array') ? s.colors : s.colors.split(','), function(c) { + c = c.replace(/^#/, ''); + + if (!i--) { + tr = DOM.add(tb, 'tr'); + i = s.grid_width - 1; + } + + n = DOM.add(tr, 'td'); + n = DOM.add(n, 'a', { + role : 'option', + href : 'javascript:;', + style : { + backgroundColor : '#' + c + }, + 'title': t.editor.getLang('colors.' + c, c), + 'data-mce-color' : '#' + c + }); + + if (t.editor.forcedHighContrastMode) { + n = DOM.add(n, 'canvas', { width: 16, height: 16, 'aria-hidden': 'true' }); + if (n.getContext && (context = n.getContext("2d"))) { + context.fillStyle = '#' + c; + context.fillRect(0, 0, 16, 16); + } else { + // No point leaving a canvas element around if it's not supported for drawing on anyway. + DOM.remove(n); + } + } + }); + + if (s.more_colors_func) { + n = DOM.add(tb, 'tr'); + n = DOM.add(n, 'td', {colspan : s.grid_width, 'class' : 'mceMoreColors'}); + n = DOM.add(n, 'a', {role: 'option', id : t.id + '_more', href : 'javascript:;', onclick : 'return false;', 'class' : 'mceMoreColors'}, s.more_colors_title); + + Event.add(n, 'click', function(e) { + s.more_colors_func.call(s.more_colors_scope || this); + return Event.cancel(e); // Cancel to fix onbeforeunload problem + }); + } + + DOM.addClass(m, 'mceColorSplitMenu'); + + new tinymce.ui.KeyboardNavigation({ + root: t.id + '_menu', + items: DOM.select('a', t.id + '_menu'), + onCancel: function() { + t.hideMenu(); + t.focus(); + } + }); + + // Prevent IE from scrolling and hindering click to occur #4019 + Event.add(t.id + '_menu', 'mousedown', function(e) {return Event.cancel(e);}); + + Event.add(t.id + '_menu', 'click', function(e) { + var c; + + e = DOM.getParent(e.target, 'a', tb); + + if (e && e.nodeName.toLowerCase() == 'a' && (c = e.getAttribute('data-mce-color'))) + t.setColor(c); + + return Event.cancel(e); // Prevent IE auto save warning + }); + + return w; + }, + + setColor : function(c) { + this.displayColor(c); + this.hideMenu(); + this.settings.onselect(c); + }, + + displayColor : function(c) { + var t = this; + + DOM.setStyle(t.id + '_preview', 'backgroundColor', c); + + t.value = c; + }, + + postRender : function() { + var t = this, id = t.id; + + t.parent(); + DOM.add(id + '_action', 'div', {id : id + '_preview', 'class' : 'mceColorPreview'}); + DOM.setStyle(t.id + '_preview', 'backgroundColor', t.value); + }, + + destroy : function() { + this.parent(); + + Event.clear(this.id + '_menu'); + Event.clear(this.id + '_more'); + DOM.remove(this.id + '_menu'); + } + }); +})(tinymce); + +(function(tinymce) { +// Shorten class names +var dom = tinymce.DOM, each = tinymce.each, Event = tinymce.dom.Event; +tinymce.create('tinymce.ui.ToolbarGroup:tinymce.ui.Container', { + renderHTML : function() { + var t = this, h = [], controls = t.controls, each = tinymce.each, settings = t.settings; + + h.push('
    '); + //TODO: ACC test this out - adding a role = application for getting the landmarks working well. + h.push(""); + h.push(''); + each(controls, function(toolbar) { + h.push(toolbar.renderHTML()); + }); + h.push(""); + h.push('
    '); + + return h.join(''); + }, + + focus : function() { + this.keyNav.focus(); + }, + + postRender : function() { + var t = this, items = []; + + each(t.controls, function(toolbar) { + each (toolbar.controls, function(control) { + if (control.id) { + items.push(control); + } + }); + }); + + t.keyNav = new tinymce.ui.KeyboardNavigation({ + root: t.id, + items: items, + onCancel: function() { + t.editor.focus(); + }, + excludeFromTabOrder: !t.settings.tab_focus_toolbar + }); + }, + + destroy : function() { + var self = this; + + self.parent(); + self.keyNav.destroy(); + Event.clear(self.id); + } +}); +})(tinymce); + +(function(tinymce) { +// Shorten class names +var dom = tinymce.DOM, each = tinymce.each; +tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { + renderHTML : function() { + var t = this, h = '', c, co, s = t.settings, i, pr, nx, cl; + + cl = t.controls; + for (i=0; i')); + } + + // Add toolbar end before list box and after the previous button + // This is to fix the o2k7 editor skins + if (pr && co.ListBox) { + if (pr.Button || pr.SplitButton) + h += dom.createHTML('td', {'class' : 'mceToolbarEnd'}, dom.createHTML('span', null, '')); + } + + // Render control HTML + + // IE 8 quick fix, needed to propertly generate a hit area for anchors + if (dom.stdMode) + h += ''; + else + h += ''; + + // Add toolbar start after list box and before the next button + // This is to fix the o2k7 editor skins + if (nx && co.ListBox) { + if (nx.Button || nx.SplitButton) + h += dom.createHTML('td', {'class' : 'mceToolbarStart'}, dom.createHTML('span', null, '')); + } + } + + c = 'mceToolbarEnd'; + + if (co.Button) + c += ' mceToolbarEndButton'; + else if (co.SplitButton) + c += ' mceToolbarEndSplitButton'; + else if (co.ListBox) + c += ' mceToolbarEndListBox'; + + h += dom.createHTML('td', {'class' : c}, dom.createHTML('span', null, '')); + + return dom.createHTML('table', {id : t.id, 'class' : 'mceToolbar' + (s['class'] ? ' ' + s['class'] : ''), cellpadding : '0', cellspacing : '0', align : t.settings.align || '', role: 'presentation', tabindex: '-1'}, '' + h + ''); + } +}); +})(tinymce); + +(function(tinymce) { + var Dispatcher = tinymce.util.Dispatcher, each = tinymce.each; + + tinymce.create('tinymce.AddOnManager', { + AddOnManager : function() { + var self = this; + + self.items = []; + self.urls = {}; + self.lookup = {}; + self.onAdd = new Dispatcher(self); + }, + + get : function(n) { + return this.lookup[n]; + }, + + requireLangPack : function(n) { + var s = tinymce.settings; + + if (s && s.language && s.language_load !== false) + tinymce.ScriptLoader.add(this.urls[n] + '/langs/' + s.language + '.js'); + }, + + add : function(id, o) { + this.items.push(o); + this.lookup[id] = o; + this.onAdd.dispatch(this, id, o); + + return o; + }, + + load : function(n, u, cb, s) { + var t = this; + + if (t.urls[n]) + return; + + if (u.indexOf('/') != 0 && u.indexOf('://') == -1) + u = tinymce.baseURL + '/' + u; + + t.urls[n] = u.substring(0, u.lastIndexOf('/')); + + if (!t.lookup[n]) + tinymce.ScriptLoader.add(u, cb, s); + } + }); + + // Create plugin and theme managers + tinymce.PluginManager = new tinymce.AddOnManager(); + tinymce.ThemeManager = new tinymce.AddOnManager(); +}(tinymce)); + +(function(tinymce) { + // Shorten names + var each = tinymce.each, extend = tinymce.extend, + DOM = tinymce.DOM, Event = tinymce.dom.Event, + ThemeManager = tinymce.ThemeManager, PluginManager = tinymce.PluginManager, + explode = tinymce.explode, + Dispatcher = tinymce.util.Dispatcher, undefined, instanceCounter = 0; + + // Setup some URLs where the editor API is located and where the document is + tinymce.documentBaseURL = window.location.href.replace(/[\?#].*$/, '').replace(/[\/\\][^\/]+$/, ''); + if (!/[\/\\]$/.test(tinymce.documentBaseURL)) + tinymce.documentBaseURL += '/'; + + tinymce.baseURL = new tinymce.util.URI(tinymce.documentBaseURL).toAbsolute(tinymce.baseURL); + + tinymce.baseURI = new tinymce.util.URI(tinymce.baseURL); + + // Add before unload listener + // This was required since IE was leaking memory if you added and removed beforeunload listeners + // with attachEvent/detatchEvent so this only adds one listener and instances can the attach to the onBeforeUnload event + tinymce.onBeforeUnload = new Dispatcher(tinymce); + + // Must be on window or IE will leak if the editor is placed in frame or iframe + Event.add(window, 'beforeunload', function(e) { + tinymce.onBeforeUnload.dispatch(tinymce, e); + }); + + tinymce.onAddEditor = new Dispatcher(tinymce); + + tinymce.onRemoveEditor = new Dispatcher(tinymce); + + tinymce.EditorManager = extend(tinymce, { + editors : [], + + i18n : {}, + + activeEditor : null, + + init : function(s) { + var t = this, pl, sl = tinymce.ScriptLoader, e, el = [], ed; + + function execCallback(se, n, s) { + var f = se[n]; + + if (!f) + return; + + if (tinymce.is(f, 'string')) { + s = f.replace(/\.\w+$/, ''); + s = s ? tinymce.resolve(s) : 0; + f = tinymce.resolve(f); + } + + return f.apply(s || this, Array.prototype.slice.call(arguments, 2)); + }; + + s = extend({ + theme : "simple", + language : "en" + }, s); + + t.settings = s; + + // Legacy call + Event.add(document, 'init', function() { + var l, co; + + execCallback(s, 'onpageload'); + + switch (s.mode) { + case "exact": + l = s.elements || ''; + + if(l.length > 0) { + each(explode(l), function(v) { + if (DOM.get(v)) { + ed = new tinymce.Editor(v, s); + el.push(ed); + ed.render(1); + } else { + each(document.forms, function(f) { + each(f.elements, function(e) { + if (e.name === v) { + v = 'mce_editor_' + instanceCounter++; + DOM.setAttrib(e, 'id', v); + + ed = new tinymce.Editor(v, s); + el.push(ed); + ed.render(1); + } + }); + }); + } + }); + } + break; + + case "textareas": + case "specific_textareas": + function hasClass(n, c) { + return c.constructor === RegExp ? c.test(n.className) : DOM.hasClass(n, c); + }; + + each(DOM.select('textarea'), function(v) { + if (s.editor_deselector && hasClass(v, s.editor_deselector)) + return; + + if (!s.editor_selector || hasClass(v, s.editor_selector)) { + // Can we use the name + e = DOM.get(v.name); + if (!v.id && !e) + v.id = v.name; + + // Generate unique name if missing or already exists + if (!v.id || t.get(v.id)) + v.id = DOM.uniqueId(); + + ed = new tinymce.Editor(v.id, s); + el.push(ed); + ed.render(1); + } + }); + break; + } + + // Call onInit when all editors are initialized + if (s.oninit) { + l = co = 0; + + each(el, function(ed) { + co++; + + if (!ed.initialized) { + // Wait for it + ed.onInit.add(function() { + l++; + + // All done + if (l == co) + execCallback(s, 'oninit'); + }); + } else + l++; + + // All done + if (l == co) + execCallback(s, 'oninit'); + }); + } + }); + }, + + get : function(id) { + if (id === undefined) + return this.editors; + + return this.editors[id]; + }, + + getInstanceById : function(id) { + return this.get(id); + }, + + add : function(editor) { + var self = this, editors = self.editors; + + // Add named and index editor instance + editors[editor.id] = editor; + editors.push(editor); + + self._setActive(editor); + self.onAddEditor.dispatch(self, editor); + + + // Patch the tinymce.Editor instance with jQuery adapter logic + if (tinymce.adapter) + tinymce.adapter.patchEditor(editor); + + + return editor; + }, + + remove : function(editor) { + var t = this, i, editors = t.editors; + + // Not in the collection + if (!editors[editor.id]) + return null; + + delete editors[editor.id]; + + for (i = 0; i < editors.length; i++) { + if (editors[i] == editor) { + editors.splice(i, 1); + break; + } + } + + // Select another editor since the active one was removed + if (t.activeEditor == editor) + t._setActive(editors[0]); + + editor.destroy(); + t.onRemoveEditor.dispatch(t, editor); + + return editor; + }, + + execCommand : function(c, u, v) { + var t = this, ed = t.get(v), w; + + // Manager commands + switch (c) { + case "mceFocus": + ed.focus(); + return true; + + case "mceAddEditor": + case "mceAddControl": + if (!t.get(v)) + new tinymce.Editor(v, t.settings).render(); + + return true; + + case "mceAddFrameControl": + w = v.window; + + // Add tinyMCE global instance and tinymce namespace to specified window + w.tinyMCE = tinyMCE; + w.tinymce = tinymce; + + tinymce.DOM.doc = w.document; + tinymce.DOM.win = w; + + ed = new tinymce.Editor(v.element_id, v); + ed.render(); + + // Fix IE memory leaks + if (tinymce.isIE) { + function clr() { + ed.destroy(); + w.detachEvent('onunload', clr); + w = w.tinyMCE = w.tinymce = null; // IE leak + }; + + w.attachEvent('onunload', clr); + } + + v.page_window = null; + + return true; + + case "mceRemoveEditor": + case "mceRemoveControl": + if (ed) + ed.remove(); + + return true; + + case 'mceToggleEditor': + if (!ed) { + t.execCommand('mceAddControl', 0, v); + return true; + } + + if (ed.isHidden()) + ed.show(); + else + ed.hide(); + + return true; + } + + // Run command on active editor + if (t.activeEditor) + return t.activeEditor.execCommand(c, u, v); + + return false; + }, + + execInstanceCommand : function(id, c, u, v) { + var ed = this.get(id); + + if (ed) + return ed.execCommand(c, u, v); + + return false; + }, + + triggerSave : function() { + each(this.editors, function(e) { + e.save(); + }); + }, + + addI18n : function(p, o) { + var lo, i18n = this.i18n; + + if (!tinymce.is(p, 'string')) { + each(p, function(o, lc) { + each(o, function(o, g) { + each(o, function(o, k) { + if (g === 'common') + i18n[lc + '.' + k] = o; + else + i18n[lc + '.' + g + '.' + k] = o; + }); + }); + }); + } else { + each(o, function(o, k) { + i18n[p + '.' + k] = o; + }); + } + }, + + // Private methods + + _setActive : function(editor) { + this.selectedInstance = this.activeEditor = editor; + } + }); +})(tinymce); + +(function(tinymce) { + // Shorten these names + var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, + Dispatcher = tinymce.util.Dispatcher, each = tinymce.each, isGecko = tinymce.isGecko, + isIE = tinymce.isIE, isWebKit = tinymce.isWebKit, is = tinymce.is, + ThemeManager = tinymce.ThemeManager, PluginManager = tinymce.PluginManager, + inArray = tinymce.inArray, grep = tinymce.grep, explode = tinymce.explode; + + tinymce.create('tinymce.Editor', { + Editor : function(id, s) { + var t = this; + + t.id = t.editorId = id; + + t.execCommands = {}; + t.queryStateCommands = {}; + t.queryValueCommands = {}; + + t.isNotDirty = false; + + t.plugins = {}; + + // Add events to the editor + each([ + 'onPreInit', + + 'onBeforeRenderUI', + + 'onPostRender', + + 'onInit', + + 'onRemove', + + 'onActivate', + + 'onDeactivate', + + 'onClick', + + 'onEvent', + + 'onMouseUp', + + 'onMouseDown', + + 'onDblClick', + + 'onKeyDown', + + 'onKeyUp', + + 'onKeyPress', + + 'onContextMenu', + + 'onSubmit', + + 'onReset', + + 'onPaste', + + 'onPreProcess', + + 'onPostProcess', + + 'onBeforeSetContent', + + 'onBeforeGetContent', + + 'onSetContent', + + 'onGetContent', + + 'onLoadContent', + + 'onSaveContent', + + 'onNodeChange', + + 'onChange', + + 'onBeforeExecCommand', + + 'onExecCommand', + + 'onUndo', + + 'onRedo', + + 'onVisualAid', + + 'onSetProgressState' + ], function(e) { + t[e] = new Dispatcher(t); + }); + + t.settings = s = extend({ + id : id, + language : 'en', + docs_language : 'en', + theme : 'simple', + skin : 'default', + delta_width : 0, + delta_height : 0, + popup_css : '', + plugins : '', + document_base_url : tinymce.documentBaseURL, + add_form_submit_trigger : 1, + submit_patch : 1, + add_unload_trigger : 1, + convert_urls : 1, + relative_urls : 1, + remove_script_host : 1, + table_inline_editing : 0, + object_resizing : 1, + cleanup : 1, + accessibility_focus : 1, + custom_shortcuts : 1, + custom_undo_redo_keyboard_shortcuts : 1, + custom_undo_redo_restore_selection : 1, + custom_undo_redo : 1, + doctype : tinymce.isIE6 ? '' : '', // Use old doctype on IE 6 to avoid horizontal scroll + visual_table_class : 'mceItemTable', + visual : 1, + font_size_style_values : 'xx-small,x-small,small,medium,large,x-large,xx-large', + apply_source_formatting : 1, + directionality : 'ltr', + forced_root_block : 'p', + hidden_input : 1, + padd_empty_editor : 1, + render_ui : 1, + init_theme : 1, + force_p_newlines : 1, + indentation : '30px', + keep_styles : 1, + fix_table_elements : 1, + inline_styles : 1, + convert_fonts_to_spans : true, + indent : 'simple', + indent_before : 'p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr', + indent_after : 'p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr', + validate : true, + entity_encoding : 'named', + url_converter : t.convertURL, + url_converter_scope : t, + ie7_compat : true + }, s); + + t.documentBaseURI = new tinymce.util.URI(s.document_base_url || tinymce.documentBaseURL, { + base_uri : tinyMCE.baseURI + }); + + t.baseURI = tinymce.baseURI; + + t.contentCSS = []; + + // Call setup + t.execCallback('setup', t); + }, + + render : function(nst) { + var t = this, s = t.settings, id = t.id, sl = tinymce.ScriptLoader; + + // Page is not loaded yet, wait for it + if (!Event.domLoaded) { + Event.add(document, 'init', function() { + t.render(); + }); + return; + } + + tinyMCE.settings = s; + + // Element not found, then skip initialization + if (!t.getElement()) + return; + + // Is a iPad/iPhone, then skip initialization. We need to sniff here since the + // browser says it has contentEditable support but there is no visible caret + // We will remove this check ones Apple implements full contentEditable support + if (tinymce.isIDevice) + return; + + // Add hidden input for non input elements inside form elements + if (!/TEXTAREA|INPUT/i.test(t.getElement().nodeName) && s.hidden_input && DOM.getParent(id, 'form')) + DOM.insertAfter(DOM.create('input', {type : 'hidden', name : id}), id); + + if (tinymce.WindowManager) + t.windowManager = new tinymce.WindowManager(t); + + if (s.encoding == 'xml') { + t.onGetContent.add(function(ed, o) { + if (o.save) + o.content = DOM.encode(o.content); + }); + } + + if (s.add_form_submit_trigger) { + t.onSubmit.addToTop(function() { + if (t.initialized) { + t.save(); + t.isNotDirty = 1; + } + }); + } + + if (s.add_unload_trigger) { + t._beforeUnload = tinyMCE.onBeforeUnload.add(function() { + if (t.initialized && !t.destroyed && !t.isHidden()) + t.save({format : 'raw', no_events : true}); + }); + } + + tinymce.addUnload(t.destroy, t); + + if (s.submit_patch) { + t.onBeforeRenderUI.add(function() { + var n = t.getElement().form; + + if (!n) + return; + + // Already patched + if (n._mceOldSubmit) + return; + + // Check page uses id="submit" or name="submit" for it's submit button + if (!n.submit.nodeType && !n.submit.length) { + t.formElement = n; + n._mceOldSubmit = n.submit; + n.submit = function() { + // Save all instances + tinymce.triggerSave(); + t.isNotDirty = 1; + + return t.formElement._mceOldSubmit(t.formElement); + }; + } + + n = null; + }); + } + + // Load scripts + function loadScripts() { + if (s.language && s.language_load !== false) + sl.add(tinymce.baseURL + '/langs/' + s.language + '.js'); + + if (s.theme && s.theme.charAt(0) != '-' && !ThemeManager.urls[s.theme]) + ThemeManager.load(s.theme, 'themes/' + s.theme + '/editor_template' + tinymce.suffix + '.js'); + + each(explode(s.plugins), function(p) { + if (p && p.charAt(0) != '-' && !PluginManager.urls[p]) { + // Skip safari plugin, since it is removed as of 3.3b1 + if (p == 'safari') + return; + + PluginManager.load(p, 'plugins/' + p + '/editor_plugin' + tinymce.suffix + '.js'); + } + }); + + // Init when que is loaded + sl.loadQueue(function() { + if (!t.removed) + t.init(); + }); + }; + + loadScripts(); + }, + + init : function() { + var n, t = this, s = t.settings, w, h, e = t.getElement(), o, ti, u, bi, bc, re, i; + + tinymce.add(t); + + s.aria_label = s.aria_label || DOM.getAttrib(e, 'aria-label', t.getLang('aria.rich_text_area')); + + if (s.theme) { + s.theme = s.theme.replace(/-/, ''); + o = ThemeManager.get(s.theme); + t.theme = new o(); + + if (t.theme.init && s.init_theme) + t.theme.init(t, ThemeManager.urls[s.theme] || tinymce.documentBaseURL.replace(/\/$/, '')); + } + + // Create all plugins + each(explode(s.plugins.replace(/\-/g, '')), function(p) { + var c = PluginManager.get(p), u = PluginManager.urls[p] || tinymce.documentBaseURL.replace(/\/$/, ''), po; + + if (c) { + po = new c(t, u); + + t.plugins[p] = po; + + if (po.init) + po.init(t, u); + } + }); + + // Setup popup CSS path(s) + if (s.popup_css !== false) { + if (s.popup_css) + s.popup_css = t.documentBaseURI.toAbsolute(s.popup_css); + else + s.popup_css = t.baseURI.toAbsolute("themes/" + s.theme + "/skins/" + s.skin + "/dialog.css"); + } + + if (s.popup_css_add) + s.popup_css += ',' + t.documentBaseURI.toAbsolute(s.popup_css_add); + + t.controlManager = new tinymce.ControlManager(t); + + if (s.custom_undo_redo) { + t.onBeforeExecCommand.add(function(ed, cmd, ui, val, a) { + if (cmd != 'Undo' && cmd != 'Redo' && cmd != 'mceRepaint' && (!a || !a.skip_undo)) + t.undoManager.beforeChange(); + }); + + t.onExecCommand.add(function(ed, cmd, ui, val, a) { + if (cmd != 'Undo' && cmd != 'Redo' && cmd != 'mceRepaint' && (!a || !a.skip_undo)) + t.undoManager.add(); + }); + } + + t.onExecCommand.add(function(ed, c) { + // Don't refresh the select lists until caret move + if (!/^(FontName|FontSize)$/.test(c)) + t.nodeChanged(); + }); + + // Remove ghost selections on images and tables in Gecko + if (isGecko) { + function repaint(a, o) { + if (!o || !o.initial) + t.execCommand('mceRepaint'); + }; + + t.onUndo.add(repaint); + t.onRedo.add(repaint); + t.onSetContent.add(repaint); + } + + // Enables users to override the control factory + t.onBeforeRenderUI.dispatch(t, t.controlManager); + + // Measure box + if (s.render_ui) { + w = s.width || e.style.width || e.offsetWidth; + h = s.height || e.style.height || e.offsetHeight; + t.orgDisplay = e.style.display; + re = /^[0-9\.]+(|px)$/i; + + if (re.test('' + w)) + w = Math.max(parseInt(w) + (o.deltaWidth || 0), 100); + + if (re.test('' + h)) + h = Math.max(parseInt(h) + (o.deltaHeight || 0), 100); + + // Render UI + o = t.theme.renderUI({ + targetNode : e, + width : w, + height : h, + deltaWidth : s.delta_width, + deltaHeight : s.delta_height + }); + + t.editorContainer = o.editorContainer; + } + + + // User specified a document.domain value + if (document.domain && location.hostname != document.domain) + tinymce.relaxedDomain = document.domain; + + // Resize editor + DOM.setStyles(o.sizeContainer || o.editorContainer, { + width : w, + height : h + }); + + // Load specified content CSS last + if (s.content_css) { + tinymce.each(explode(s.content_css), function(u) { + t.contentCSS.push(t.documentBaseURI.toAbsolute(u)); + }); + } + + h = (o.iframeHeight || h) + (typeof(h) == 'number' ? (o.deltaHeight || 0) : ''); + if (h < 100) + h = 100; + + t.iframeHTML = s.doctype + ''; + + // We only need to override paths if we have to + // IE has a bug where it remove site absolute urls to relative ones if this is specified + if (s.document_base_url != tinymce.documentBaseURL) + t.iframeHTML += ''; + + // IE8 doesn't support carets behind images setting ie7_compat would force IE8+ to run in IE7 compat mode. + if (s.ie7_compat) + t.iframeHTML += ''; + else + t.iframeHTML += ''; + + t.iframeHTML += ''; + + // Firefox 2 doesn't load stylesheets correctly this way + if (!isGecko || !/Firefox\/2/.test(navigator.userAgent)) { + for (i = 0; i < t.contentCSS.length; i++) + t.iframeHTML += ''; + + t.contentCSS = []; + } + + bi = s.body_id || 'tinymce'; + if (bi.indexOf('=') != -1) { + bi = t.getParam('body_id', '', 'hash'); + bi = bi[t.id] || bi; + } + + bc = s.body_class || ''; + if (bc.indexOf('=') != -1) { + bc = t.getParam('body_class', '', 'hash'); + bc = bc[t.id] || ''; + } + + t.iframeHTML += ''; + + // Domain relaxing enabled, then set document domain + if (tinymce.relaxedDomain && (isIE || (tinymce.isOpera && parseFloat(opera.version()) < 11))) { + // We need to write the contents here in IE since multiple writes messes up refresh button and back button + u = 'javascript:(function(){document.open();document.domain="' + document.domain + '";var ed = window.parent.tinyMCE.get("' + t.id + '");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'; + } + + // Create iframe + // TODO: ACC add the appropriate description on this. + n = DOM.add(o.iframeContainer, 'iframe', { + id : t.id + "_ifr", + src : u || 'javascript:""', // Workaround for HTTPS warning in IE6/7 + frameBorder : '0', + title : s.aria_label, + style : { + width : '100%', + height : h + } + }); + + t.contentAreaContainer = o.iframeContainer; + DOM.get(o.editorContainer).style.display = t.orgDisplay; + DOM.get(t.id).style.display = 'none'; + DOM.setAttrib(t.id, 'aria-hidden', true); + + if (!tinymce.relaxedDomain || !u) + t.setupIframe(); + + e = n = o = null; // Cleanup + }, + + setupIframe : function() { + var t = this, s = t.settings, e = DOM.get(t.id), d = t.getDoc(), h, b; + + // Setup iframe body + if (!isIE || !tinymce.relaxedDomain) { + d.open(); + d.write(t.iframeHTML); + d.close(); + + if (tinymce.relaxedDomain) + d.domain = tinymce.relaxedDomain; + } + + // Design mode needs to be added here Ctrl+A will fail otherwise + if (!isIE) { + try { + if (!s.readonly) + d.designMode = 'On'; + } catch (ex) { + // Will fail on Gecko if the editor is placed in an hidden container element + // The design mode will be set ones the editor is focused + } + } + + // IE needs to use contentEditable or it will display non secure items for HTTPS + if (isIE) { + // It will not steal focus if we hide it while setting contentEditable + b = t.getBody(); + DOM.hide(b); + + if (!s.readonly) + b.contentEditable = true; + + DOM.show(b); + } + + t.schema = new tinymce.html.Schema(s); + + t.dom = new tinymce.dom.DOMUtils(t.getDoc(), { + keep_values : true, + url_converter : t.convertURL, + url_converter_scope : t, + hex_colors : s.force_hex_style_colors, + class_filter : s.class_filter, + update_styles : 1, + fix_ie_paragraphs : 1, + schema : t.schema + }); + + t.parser = new tinymce.html.DomParser(s, t.schema); + + // Force anchor names closed + t.parser.addAttributeFilter('name', function(nodes, name) { + var i = nodes.length, sibling, prevSibling, parent, node; + + while (i--) { + node = nodes[i]; + if (node.name === 'a' && node.firstChild) { + parent = node.parent; + + // Move children after current node + sibling = node.lastChild; + do { + prevSibling = sibling.prev; + parent.insert(sibling, node); + sibling = prevSibling; + } while (sibling); + } + } + }); + + // Convert src and href into data-mce-src, data-mce-href and data-mce-style + t.parser.addAttributeFilter('src,href,style', function(nodes, name) { + var i = nodes.length, node, dom = t.dom, value; + + while (i--) { + node = nodes[i]; + value = node.attr(name); + + if (name === "style") + node.attr('data-mce-style', dom.serializeStyle(dom.parseStyle(value), node.name)); + else + node.attr('data-mce-' + name, t.convertURL(value, name, node.name)); + } + }); + + // Keep scripts from executing + t.parser.addNodeFilter('script', function(nodes, name) { + var i = nodes.length; + + while (i--) + nodes[i].attr('type', 'mce-text/javascript'); + }); + + t.parser.addNodeFilter('#cdata', function(nodes, name) { + var i = nodes.length, node; + + while (i--) { + node = nodes[i]; + node.type = 8; + node.name = '#comment'; + node.value = '[CDATA[' + node.value + ']]'; + } + }); + + t.parser.addNodeFilter('p,h1,h2,h3,h4,h5,h6,div', function(nodes, name) { + var i = nodes.length, node, nonEmptyElements = t.schema.getNonEmptyElements(); + + while (i--) { + node = nodes[i]; + + if (node.isEmpty(nonEmptyElements)) + node.empty().append(new tinymce.html.Node('br', 1)).shortEnded = true; + } + }); + + t.serializer = new tinymce.dom.Serializer(s, t.dom, t.schema); + + t.selection = new tinymce.dom.Selection(t.dom, t.getWin(), t.serializer); + + t.formatter = new tinymce.Formatter(this); + + // Register default formats + t.formatter.register({ + alignleft : [ + {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'left'}}, + {selector : 'img,table', collapsed : false, styles : {'float' : 'left'}} + ], + + aligncenter : [ + {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'center'}}, + {selector : 'img', collapsed : false, styles : {display : 'block', marginLeft : 'auto', marginRight : 'auto'}}, + {selector : 'table', collapsed : false, styles : {marginLeft : 'auto', marginRight : 'auto'}} + ], + + alignright : [ + {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'right'}}, + {selector : 'img,table', collapsed : false, styles : {'float' : 'right'}} + ], + + alignfull : [ + {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'justify'}} + ], + + bold : [ + {inline : 'strong', remove : 'all'}, + {inline : 'span', styles : {fontWeight : 'bold'}}, + {inline : 'b', remove : 'all'} + ], + + italic : [ + {inline : 'em', remove : 'all'}, + {inline : 'span', styles : {fontStyle : 'italic'}}, + {inline : 'i', remove : 'all'} + ], + + underline : [ + {inline : 'span', styles : {textDecoration : 'underline'}, exact : true}, + {inline : 'u', remove : 'all'} + ], + + strikethrough : [ + {inline : 'span', styles : {textDecoration : 'line-through'}, exact : true}, + {inline : 'strike', remove : 'all'} + ], + + forecolor : {inline : 'span', styles : {color : '%value'}, wrap_links : false}, + hilitecolor : {inline : 'span', styles : {backgroundColor : '%value'}, wrap_links : false}, + fontname : {inline : 'span', styles : {fontFamily : '%value'}}, + fontsize : {inline : 'span', styles : {fontSize : '%value'}}, + fontsize_class : {inline : 'span', attributes : {'class' : '%value'}}, + blockquote : {block : 'blockquote', wrapper : 1, remove : 'all'}, + subscript : {inline : 'sub'}, + superscript : {inline : 'sup'}, + + removeformat : [ + {selector : 'b,strong,em,i,font,u,strike', remove : 'all', split : true, expand : false, block_expand : true, deep : true}, + {selector : 'span', attributes : ['style', 'class'], remove : 'empty', split : true, expand : false, deep : true}, + {selector : '*', attributes : ['style', 'class'], split : false, expand : false, deep : true} + ] + }); + + // Register default block formats + each('p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp'.split(/\s/), function(name) { + t.formatter.register(name, {block : name, remove : 'all'}); + }); + + // Register user defined formats + t.formatter.register(t.settings.formats); + + t.undoManager = new tinymce.UndoManager(t); + + // Pass through + t.undoManager.onAdd.add(function(um, l) { + if (um.hasUndo()) + return t.onChange.dispatch(t, l, um); + }); + + t.undoManager.onUndo.add(function(um, l) { + return t.onUndo.dispatch(t, l, um); + }); + + t.undoManager.onRedo.add(function(um, l) { + return t.onRedo.dispatch(t, l, um); + }); + + t.forceBlocks = new tinymce.ForceBlocks(t, { + forced_root_block : s.forced_root_block + }); + + t.editorCommands = new tinymce.EditorCommands(t); + + // Pass through + t.serializer.onPreProcess.add(function(se, o) { + return t.onPreProcess.dispatch(t, o, se); + }); + + t.serializer.onPostProcess.add(function(se, o) { + return t.onPostProcess.dispatch(t, o, se); + }); + + t.onPreInit.dispatch(t); + + if (!s.gecko_spellcheck) + t.getBody().spellcheck = 0; + + if (!s.readonly) + t._addEvents(); + + t.controlManager.onPostRender.dispatch(t, t.controlManager); + t.onPostRender.dispatch(t); + + if (s.directionality) + t.getBody().dir = s.directionality; + + if (s.nowrap) + t.getBody().style.whiteSpace = "nowrap"; + + if (s.handle_node_change_callback) { + t.onNodeChange.add(function(ed, cm, n) { + t.execCallback('handle_node_change_callback', t.id, n, -1, -1, true, t.selection.isCollapsed()); + }); + } + + if (s.save_callback) { + t.onSaveContent.add(function(ed, o) { + var h = t.execCallback('save_callback', t.id, o.content, t.getBody()); + + if (h) + o.content = h; + }); + } + + if (s.onchange_callback) { + t.onChange.add(function(ed, l) { + t.execCallback('onchange_callback', t, l); + }); + } + + if (s.protect) { + t.onBeforeSetContent.add(function(ed, o) { + if (s.protect) { + each(s.protect, function(pattern) { + o.content = o.content.replace(pattern, function(str) { + return ''; + }); + }); + } + }); + } + + if (s.convert_newlines_to_brs) { + t.onBeforeSetContent.add(function(ed, o) { + if (o.initial) + o.content = o.content.replace(/\r?\n/g, '
    '); + }); + } + + if (s.preformatted) { + t.onPostProcess.add(function(ed, o) { + o.content = o.content.replace(/^\s*/, ''); + o.content = o.content.replace(/<\/pre>\s*$/, ''); + + if (o.set) + o.content = '
    ' + o.content + '
    '; + }); + } + + if (s.verify_css_classes) { + t.serializer.attribValueFilter = function(n, v) { + var s, cl; + + if (n == 'class') { + // Build regexp for classes + if (!t.classesRE) { + cl = t.dom.getClasses(); + + if (cl.length > 0) { + s = ''; + + each (cl, function(o) { + s += (s ? '|' : '') + o['class']; + }); + + t.classesRE = new RegExp('(' + s + ')', 'gi'); + } + } + + return !t.classesRE || /(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(v) || t.classesRE.test(v) ? v : ''; + } + + return v; + }; + } + + if (s.cleanup_callback) { + t.onBeforeSetContent.add(function(ed, o) { + o.content = t.execCallback('cleanup_callback', 'insert_to_editor', o.content, o); + }); + + t.onPreProcess.add(function(ed, o) { + if (o.set) + t.execCallback('cleanup_callback', 'insert_to_editor_dom', o.node, o); + + if (o.get) + t.execCallback('cleanup_callback', 'get_from_editor_dom', o.node, o); + }); + + t.onPostProcess.add(function(ed, o) { + if (o.set) + o.content = t.execCallback('cleanup_callback', 'insert_to_editor', o.content, o); + + if (o.get) + o.content = t.execCallback('cleanup_callback', 'get_from_editor', o.content, o); + }); + } + + if (s.save_callback) { + t.onGetContent.add(function(ed, o) { + if (o.save) + o.content = t.execCallback('save_callback', t.id, o.content, t.getBody()); + }); + } + + if (s.handle_event_callback) { + t.onEvent.add(function(ed, e, o) { + if (t.execCallback('handle_event_callback', e, ed, o) === false) + Event.cancel(e); + }); + } + + // Add visual aids when new contents is added + t.onSetContent.add(function() { + t.addVisual(t.getBody()); + }); + + // Remove empty contents + if (s.padd_empty_editor) { + t.onPostProcess.add(function(ed, o) { + o.content = o.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
    [\r\n]*)$/, ''); + }); + } + + if (isGecko) { + // Fix gecko link bug, when a link is placed at the end of block elements there is + // no way to move the caret behind the link. This fix adds a bogus br element after the link + function fixLinks(ed, o) { + each(ed.dom.select('a'), function(n) { + var pn = n.parentNode; + + if (ed.dom.isBlock(pn) && pn.lastChild === n) + ed.dom.add(pn, 'br', {'data-mce-bogus' : 1}); + }); + }; + + t.onExecCommand.add(function(ed, cmd) { + if (cmd === 'CreateLink') + fixLinks(ed); + }); + + t.onSetContent.add(t.selection.onSetContent.add(fixLinks)); + + if (!s.readonly) { + try { + // Design mode must be set here once again to fix a bug where + // Ctrl+A/Delete/Backspace didn't work if the editor was added using mceAddControl then removed then added again + d.designMode = 'Off'; + d.designMode = 'On'; + } catch (ex) { + // Will fail on Gecko if the editor is placed in an hidden container element + // The design mode will be set ones the editor is focused + } + } + } + + // A small timeout was needed since firefox will remove. Bug: #1838304 + setTimeout(function () { + if (t.removed) + return; + + t.load({initial : true, format : 'html'}); + t.startContent = t.getContent({format : 'raw'}); + t.undoManager.add(); + t.initialized = true; + + t.onInit.dispatch(t); + t.execCallback('setupcontent_callback', t.id, t.getBody(), t.getDoc()); + t.execCallback('init_instance_callback', t); + t.focus(true); + t.nodeChanged({initial : 1}); + + // Load specified content CSS last + each(t.contentCSS, function(u) { + t.dom.loadCSS(u); + }); + + // Handle auto focus + if (s.auto_focus) { + setTimeout(function () { + var ed = tinymce.get(s.auto_focus); + + ed.selection.select(ed.getBody(), 1); + ed.selection.collapse(1); + ed.getWin().focus(); + }, 100); + } + }, 1); + + e = null; + }, + + + focus : function(sf) { + var oed, t = this, ce = t.settings.content_editable, ieRng, controlElm, doc = t.getDoc(); + + if (!sf) { + // Get selected control element + ieRng = t.selection.getRng(); + if (ieRng.item) { + controlElm = ieRng.item(0); + } + + // Is not content editable + if (!ce) + t.getWin().focus(); + + // Restore selected control element + // This is needed when for example an image is selected within a + // layer a call to focus will then remove the control selection + if (controlElm && controlElm.ownerDocument == doc) { + ieRng = doc.body.createControlRange(); + ieRng.addElement(controlElm); + ieRng.select(); + } + + } + + if (tinymce.activeEditor != t) { + if ((oed = tinymce.activeEditor) != null) + oed.onDeactivate.dispatch(oed, t); + + t.onActivate.dispatch(t, oed); + } + + tinymce._setActive(t); + }, + + execCallback : function(n) { + var t = this, f = t.settings[n], s; + + if (!f) + return; + + // Look through lookup + if (t.callbackLookup && (s = t.callbackLookup[n])) { + f = s.func; + s = s.scope; + } + + if (is(f, 'string')) { + s = f.replace(/\.\w+$/, ''); + s = s ? tinymce.resolve(s) : 0; + f = tinymce.resolve(f); + t.callbackLookup = t.callbackLookup || {}; + t.callbackLookup[n] = {func : f, scope : s}; + } + + return f.apply(s || t, Array.prototype.slice.call(arguments, 1)); + }, + + translate : function(s) { + var c = this.settings.language || 'en', i18n = tinymce.i18n; + + if (!s) + return ''; + + return i18n[c + '.' + s] || s.replace(/{\#([^}]+)\}/g, function(a, b) { + return i18n[c + '.' + b] || '{#' + b + '}'; + }); + }, + + getLang : function(n, dv) { + return tinymce.i18n[(this.settings.language || 'en') + '.' + n] || (is(dv) ? dv : '{#' + n + '}'); + }, + + getParam : function(n, dv, ty) { + var tr = tinymce.trim, v = is(this.settings[n]) ? this.settings[n] : dv, o; + + if (ty === 'hash') { + o = {}; + + if (is(v, 'string')) { + each(v.indexOf('=') > 0 ? v.split(/[;,](?![^=;,]*(?:[;,]|$))/) : v.split(','), function(v) { + v = v.split('='); + + if (v.length > 1) + o[tr(v[0])] = tr(v[1]); + else + o[tr(v[0])] = tr(v); + }); + } else + o = v; + + return o; + } + + return v; + }, + + nodeChanged : function(o) { + var t = this, s = t.selection, n = s.getStart() || t.getBody(); + + // Fix for bug #1896577 it seems that this can not be fired while the editor is loading + if (t.initialized) { + o = o || {}; + n = isIE && n.ownerDocument != t.getDoc() ? t.getBody() : n; // Fix for IE initial state + + // Get parents and add them to object + o.parents = []; + t.dom.getParent(n, function(node) { + if (node.nodeName == 'BODY') + return true; + + o.parents.push(node); + }); + + t.onNodeChange.dispatch( + t, + o ? o.controlManager || t.controlManager : t.controlManager, + n, + s.isCollapsed(), + o + ); + } + }, + + addButton : function(n, s) { + var t = this; + + t.buttons = t.buttons || {}; + t.buttons[n] = s; + }, + + addCommand : function(name, callback, scope) { + this.execCommands[name] = {func : callback, scope : scope || this}; + }, + + addQueryStateHandler : function(name, callback, scope) { + this.queryStateCommands[name] = {func : callback, scope : scope || this}; + }, + + addQueryValueHandler : function(name, callback, scope) { + this.queryValueCommands[name] = {func : callback, scope : scope || this}; + }, + + addShortcut : function(pa, desc, cmd_func, sc) { + var t = this, c; + + if (!t.settings.custom_shortcuts) + return false; + + t.shortcuts = t.shortcuts || {}; + + if (is(cmd_func, 'string')) { + c = cmd_func; + + cmd_func = function() { + t.execCommand(c, false, null); + }; + } + + if (is(cmd_func, 'object')) { + c = cmd_func; + + cmd_func = function() { + t.execCommand(c[0], c[1], c[2]); + }; + } + + each(explode(pa), function(pa) { + var o = { + func : cmd_func, + scope : sc || this, + desc : desc, + alt : false, + ctrl : false, + shift : false + }; + + each(explode(pa, '+'), function(v) { + switch (v) { + case 'alt': + case 'ctrl': + case 'shift': + o[v] = true; + break; + + default: + o.charCode = v.charCodeAt(0); + o.keyCode = v.toUpperCase().charCodeAt(0); + } + }); + + t.shortcuts[(o.ctrl ? 'ctrl' : '') + ',' + (o.alt ? 'alt' : '') + ',' + (o.shift ? 'shift' : '') + ',' + o.keyCode] = o; + }); + + return true; + }, + + execCommand : function(cmd, ui, val, a) { + var t = this, s = 0, o, st; + + if (!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(cmd) && (!a || !a.skip_focus)) + t.focus(); + + o = {}; + t.onBeforeExecCommand.dispatch(t, cmd, ui, val, o); + if (o.terminate) + return false; + + // Command callback + if (t.execCallback('execcommand_callback', t.id, t.selection.getNode(), cmd, ui, val)) { + t.onExecCommand.dispatch(t, cmd, ui, val, a); + return true; + } + + // Registred commands + if (o = t.execCommands[cmd]) { + st = o.func.call(o.scope, ui, val); + + // Fall through on true + if (st !== true) { + t.onExecCommand.dispatch(t, cmd, ui, val, a); + return st; + } + } + + // Plugin commands + each(t.plugins, function(p) { + if (p.execCommand && p.execCommand(cmd, ui, val)) { + t.onExecCommand.dispatch(t, cmd, ui, val, a); + s = 1; + return false; + } + }); + + if (s) + return true; + + // Theme commands + if (t.theme && t.theme.execCommand && t.theme.execCommand(cmd, ui, val)) { + t.onExecCommand.dispatch(t, cmd, ui, val, a); + return true; + } + + // Editor commands + if (t.editorCommands.execCommand(cmd, ui, val)) { + t.onExecCommand.dispatch(t, cmd, ui, val, a); + return true; + } + + // Browser commands + t.getDoc().execCommand(cmd, ui, val); + t.onExecCommand.dispatch(t, cmd, ui, val, a); + }, + + queryCommandState : function(cmd) { + var t = this, o, s; + + // Is hidden then return undefined + if (t._isHidden()) + return; + + // Registred commands + if (o = t.queryStateCommands[cmd]) { + s = o.func.call(o.scope); + + // Fall though on true + if (s !== true) + return s; + } + + // Registred commands + o = t.editorCommands.queryCommandState(cmd); + if (o !== -1) + return o; + + // Browser commands + try { + return this.getDoc().queryCommandState(cmd); + } catch (ex) { + // Fails sometimes see bug: 1896577 + } + }, + + queryCommandValue : function(c) { + var t = this, o, s; + + // Is hidden then return undefined + if (t._isHidden()) + return; + + // Registred commands + if (o = t.queryValueCommands[c]) { + s = o.func.call(o.scope); + + // Fall though on true + if (s !== true) + return s; + } + + // Registred commands + o = t.editorCommands.queryCommandValue(c); + if (is(o)) + return o; + + // Browser commands + try { + return this.getDoc().queryCommandValue(c); + } catch (ex) { + // Fails sometimes see bug: 1896577 + } + }, + + show : function() { + var t = this; + + DOM.show(t.getContainer()); + DOM.hide(t.id); + t.load(); + }, + + hide : function() { + var t = this, d = t.getDoc(); + + // Fixed bug where IE has a blinking cursor left from the editor + if (isIE && d) + d.execCommand('SelectAll'); + + // We must save before we hide so Safari doesn't crash + t.save(); + DOM.hide(t.getContainer()); + DOM.setStyle(t.id, 'display', t.orgDisplay); + }, + + isHidden : function() { + return !DOM.isHidden(this.id); + }, + + setProgressState : function(b, ti, o) { + this.onSetProgressState.dispatch(this, b, ti, o); + + return b; + }, + + load : function(o) { + var t = this, e = t.getElement(), h; + + if (e) { + o = o || {}; + o.load = true; + + // Double encode existing entities in the value + h = t.setContent(is(e.value) ? e.value : e.innerHTML, o); + o.element = e; + + if (!o.no_events) + t.onLoadContent.dispatch(t, o); + + o.element = e = null; + + return h; + } + }, + + save : function(o) { + var t = this, e = t.getElement(), h, f; + + if (!e || !t.initialized) + return; + + o = o || {}; + o.save = true; + + // Add undo level will trigger onchange event + if (!o.no_events) { + t.undoManager.typing = false; + t.undoManager.add(); + } + + o.element = e; + h = o.content = t.getContent(o); + + if (!o.no_events) + t.onSaveContent.dispatch(t, o); + + h = o.content; + + if (!/TEXTAREA|INPUT/i.test(e.nodeName)) { + e.innerHTML = h; + + // Update hidden form element + if (f = DOM.getParent(t.id, 'form')) { + each(f.elements, function(e) { + if (e.name == t.id) { + e.value = h; + return false; + } + }); + } + } else + e.value = h; + + o.element = e = null; + + return h; + }, + + setContent : function(content, args) { + var self = this, rootNode, body = self.getBody(); + + // Setup args object + args = args || {}; + args.format = args.format || 'html'; + args.set = true; + args.content = content; + + // Do preprocessing + if (!args.no_events) + self.onBeforeSetContent.dispatch(self, args); + + content = args.content; + + // Padd empty content in Gecko and Safari. Commands will otherwise fail on the content + // It will also be impossible to place the caret in the editor unless there is a BR element present + if (!tinymce.isIE && (content.length === 0 || /^\s+$/.test(content))) { + body.innerHTML = '
    '; + return; + } + + // Parse and serialize the html + if (args.format !== 'raw') { + content = new tinymce.html.Serializer({}, self.schema).serialize( + self.parser.parse(content) + ); + } + + // Set the new cleaned contents to the editor + args.content = tinymce.trim(content); + self.dom.setHTML(body, args.content); + + // Do post processing + if (!args.no_events) + self.onSetContent.dispatch(self, args); + + return args.content; + }, + + getContent : function(args) { + var self = this, content; + + // Setup args object + args = args || {}; + args.format = args.format || 'html'; + args.get = true; + + // Do preprocessing + if (!args.no_events) + self.onBeforeGetContent.dispatch(self, args); + + // Get raw contents or by default the cleaned contents + if (args.format == 'raw') + content = self.getBody().innerHTML; + else + content = self.serializer.serialize(self.getBody(), args); + + args.content = tinymce.trim(content); + + // Do post processing + if (!args.no_events) + self.onGetContent.dispatch(self, args); + + return args.content; + }, + + isDirty : function() { + var self = this; + + return tinymce.trim(self.startContent) != tinymce.trim(self.getContent({format : 'raw', no_events : 1})) && !self.isNotDirty; + }, + + getContainer : function() { + var t = this; + + if (!t.container) + t.container = DOM.get(t.editorContainer || t.id + '_parent'); + + return t.container; + }, + + getContentAreaContainer : function() { + return this.contentAreaContainer; + }, + + getElement : function() { + return DOM.get(this.settings.content_element || this.id); + }, + + getWin : function() { + var t = this, e; + + if (!t.contentWindow) { + e = DOM.get(t.id + "_ifr"); + + if (e) + t.contentWindow = e.contentWindow; + } + + return t.contentWindow; + }, + + getDoc : function() { + var t = this, w; + + if (!t.contentDocument) { + w = t.getWin(); + + if (w) + t.contentDocument = w.document; + } + + return t.contentDocument; + }, + + getBody : function() { + return this.bodyElement || this.getDoc().body; + }, + + convertURL : function(u, n, e) { + var t = this, s = t.settings; + + // Use callback instead + if (s.urlconverter_callback) + return t.execCallback('urlconverter_callback', u, e, true, n); + + // Don't convert link href since thats the CSS files that gets loaded into the editor also skip local file URLs + if (!s.convert_urls || (e && e.nodeName == 'LINK') || u.indexOf('file:') === 0) + return u; + + // Convert to relative + if (s.relative_urls) + return t.documentBaseURI.toRelative(u); + + // Convert to absolute + u = t.documentBaseURI.toAbsolute(u, s.remove_script_host); + + return u; + }, + + addVisual : function(e) { + var t = this, s = t.settings; + + e = e || t.getBody(); + + if (!is(t.hasVisual)) + t.hasVisual = s.visual; + + each(t.dom.select('table,a', e), function(e) { + var v; + + switch (e.nodeName) { + case 'TABLE': + v = t.dom.getAttrib(e, 'border'); + + if (!v || v == '0') { + if (t.hasVisual) + t.dom.addClass(e, s.visual_table_class); + else + t.dom.removeClass(e, s.visual_table_class); + } + + return; + + case 'A': + v = t.dom.getAttrib(e, 'name'); + + if (v) { + if (t.hasVisual) + t.dom.addClass(e, 'mceItemAnchor'); + else + t.dom.removeClass(e, 'mceItemAnchor'); + } + + return; + } + }); + + t.onVisualAid.dispatch(t, e, t.hasVisual); + }, + + remove : function() { + var t = this, e = t.getContainer(); + + t.removed = 1; // Cancels post remove event execution + t.hide(); + + t.execCallback('remove_instance_callback', t); + t.onRemove.dispatch(t); + + // Clear all execCommand listeners this is required to avoid errors if the editor was removed inside another command + t.onExecCommand.listeners = []; + + tinymce.remove(t); + DOM.remove(e); + }, + + destroy : function(s) { + var t = this; + + // One time is enough + if (t.destroyed) + return; + + if (!s) { + tinymce.removeUnload(t.destroy); + tinyMCE.onBeforeUnload.remove(t._beforeUnload); + + // Manual destroy + if (t.theme && t.theme.destroy) + t.theme.destroy(); + + // Destroy controls, selection and dom + t.controlManager.destroy(); + t.selection.destroy(); + t.dom.destroy(); + + // Remove all events + + // Don't clear the window or document if content editable + // is enabled since other instances might still be present + if (!t.settings.content_editable) { + Event.clear(t.getWin()); + Event.clear(t.getDoc()); + } + + Event.clear(t.getBody()); + Event.clear(t.formElement); + } + + if (t.formElement) { + t.formElement.submit = t.formElement._mceOldSubmit; + t.formElement._mceOldSubmit = null; + } + + t.contentAreaContainer = t.formElement = t.container = t.settings.content_element = t.bodyElement = t.contentDocument = t.contentWindow = null; + + if (t.selection) + t.selection = t.selection.win = t.selection.dom = t.selection.dom.doc = null; + + t.destroyed = 1; + }, + + // Internal functions + + _addEvents : function() { + // 'focus', 'blur', 'dblclick', 'beforedeactivate', submit, reset + var t = this, i, s = t.settings, dom = t.dom, lo = { + mouseup : 'onMouseUp', + mousedown : 'onMouseDown', + click : 'onClick', + keyup : 'onKeyUp', + keydown : 'onKeyDown', + keypress : 'onKeyPress', + submit : 'onSubmit', + reset : 'onReset', + contextmenu : 'onContextMenu', + dblclick : 'onDblClick', + paste : 'onPaste' // Doesn't work in all browsers yet + }; + + function eventHandler(e, o) { + var ty = e.type; + + // Don't fire events when it's removed + if (t.removed) + return; + + // Generic event handler + if (t.onEvent.dispatch(t, e, o) !== false) { + // Specific event handler + t[lo[e.fakeType || e.type]].dispatch(t, e, o); + } + }; + + // Add DOM events + each(lo, function(v, k) { + switch (k) { + case 'contextmenu': + dom.bind(t.getDoc(), k, eventHandler); + break; + + case 'paste': + dom.bind(t.getBody(), k, function(e) { + eventHandler(e); + }); + break; + + case 'submit': + case 'reset': + dom.bind(t.getElement().form || DOM.getParent(t.id, 'form'), k, eventHandler); + break; + + default: + dom.bind(s.content_editable ? t.getBody() : t.getDoc(), k, eventHandler); + } + }); + + dom.bind(s.content_editable ? t.getBody() : (isGecko ? t.getDoc() : t.getWin()), 'focus', function(e) { + t.focus(true); + }); + + + // Fixes bug where a specified document_base_uri could result in broken images + // This will also fix drag drop of images in Gecko + if (tinymce.isGecko) { + dom.bind(t.getDoc(), 'DOMNodeInserted', function(e) { + var v; + + e = e.target; + + if (e.nodeType === 1 && e.nodeName === 'IMG' && (v = e.getAttribute('data-mce-src'))) + e.src = t.documentBaseURI.toAbsolute(v); + }); + } + + // Set various midas options in Gecko + if (isGecko) { + function setOpts() { + var t = this, d = t.getDoc(), s = t.settings; + + if (isGecko && !s.readonly) { + if (t._isHidden()) { + try { + if (!s.content_editable) + d.designMode = 'On'; + } catch (ex) { + // Fails if it's hidden + } + } + + try { + // Try new Gecko method + d.execCommand("styleWithCSS", 0, false); + } catch (ex) { + // Use old method + if (!t._isHidden()) + try {d.execCommand("useCSS", 0, true);} catch (ex) {} + } + + if (!s.table_inline_editing) + try {d.execCommand('enableInlineTableEditing', false, false);} catch (ex) {} + + if (!s.object_resizing) + try {d.execCommand('enableObjectResizing', false, false);} catch (ex) {} + } + }; + + t.onBeforeExecCommand.add(setOpts); + t.onMouseDown.add(setOpts); + } + + // Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250 + // WebKit can't even do simple things like selecting an image + // This also fixes so it's possible to select mceItemAnchors + if (tinymce.isWebKit) { + t.onClick.add(function(ed, e) { + e = e.target; + + // Needs tobe the setBaseAndExtend or it will fail to select floated images + if (e.nodeName == 'IMG' || (e.nodeName == 'A' && dom.hasClass(e, 'mceItemAnchor'))) { + t.selection.getSel().setBaseAndExtent(e, 0, e, 1); + t.nodeChanged(); + } + }); + } + + // Add node change handlers + t.onMouseUp.add(t.nodeChanged); + //t.onClick.add(t.nodeChanged); + t.onKeyUp.add(function(ed, e) { + var c = e.keyCode; + + if ((c >= 33 && c <= 36) || (c >= 37 && c <= 40) || c == 13 || c == 45 || c == 46 || c == 8 || (tinymce.isMac && (c == 91 || c == 93)) || e.ctrlKey) + t.nodeChanged(); + }); + + // Add reset handler + t.onReset.add(function() { + t.setContent(t.startContent, {format : 'raw'}); + }); + + // Add shortcuts + if (s.custom_shortcuts) { + if (s.custom_undo_redo_keyboard_shortcuts) { + t.addShortcut('ctrl+z', t.getLang('undo_desc'), 'Undo'); + t.addShortcut('ctrl+y', t.getLang('redo_desc'), 'Redo'); + } + + // Add default shortcuts for gecko + t.addShortcut('ctrl+b', t.getLang('bold_desc'), 'Bold'); + t.addShortcut('ctrl+i', t.getLang('italic_desc'), 'Italic'); + t.addShortcut('ctrl+u', t.getLang('underline_desc'), 'Underline'); + + // BlockFormat shortcuts keys + for (i=1; i<=6; i++) + t.addShortcut('ctrl+' + i, '', ['FormatBlock', false, 'h' + i]); + + t.addShortcut('ctrl+7', '', ['FormatBlock', false, '

    ']); + t.addShortcut('ctrl+8', '', ['FormatBlock', false, '

    ']); + t.addShortcut('ctrl+9', '', ['FormatBlock', false, '
    ']); + + function find(e) { + var v = null; + + if (!e.altKey && !e.ctrlKey && !e.metaKey) + return v; + + each(t.shortcuts, function(o) { + if (tinymce.isMac && o.ctrl != e.metaKey) + return; + else if (!tinymce.isMac && o.ctrl != e.ctrlKey) + return; + + if (o.alt != e.altKey) + return; + + if (o.shift != e.shiftKey) + return; + + if (e.keyCode == o.keyCode || (e.charCode && e.charCode == o.charCode)) { + v = o; + return false; + } + }); + + return v; + }; + + t.onKeyUp.add(function(ed, e) { + var o = find(e); + + if (o) + return Event.cancel(e); + }); + + t.onKeyPress.add(function(ed, e) { + var o = find(e); + + if (o) + return Event.cancel(e); + }); + + t.onKeyDown.add(function(ed, e) { + var o = find(e); + + if (o) { + o.func.call(o.scope); + return Event.cancel(e); + } + }); + } + + if (tinymce.isIE) { + // Fix so resize will only update the width and height attributes not the styles of an image + // It will also block mceItemNoResize items + dom.bind(t.getDoc(), 'controlselect', function(e) { + var re = t.resizeInfo, cb; + + e = e.target; + + // Don't do this action for non image elements + if (e.nodeName !== 'IMG') + return; + + if (re) + dom.unbind(re.node, re.ev, re.cb); + + if (!dom.hasClass(e, 'mceItemNoResize')) { + ev = 'resizeend'; + cb = dom.bind(e, ev, function(e) { + var v; + + e = e.target; + + if (v = dom.getStyle(e, 'width')) { + dom.setAttrib(e, 'width', v.replace(/[^0-9%]+/g, '')); + dom.setStyle(e, 'width', ''); + } + + if (v = dom.getStyle(e, 'height')) { + dom.setAttrib(e, 'height', v.replace(/[^0-9%]+/g, '')); + dom.setStyle(e, 'height', ''); + } + }); + } else { + ev = 'resizestart'; + cb = dom.bind(e, 'resizestart', Event.cancel, Event); + } + + re = t.resizeInfo = { + node : e, + ev : ev, + cb : cb + }; + }); + + t.onKeyDown.add(function(ed, e) { + var sel; + + switch (e.keyCode) { + case 8: + sel = t.getDoc().selection; + + // Fix IE control + backspace browser bug + if (sel.createRange && sel.createRange().item) { + ed.dom.remove(sel.createRange().item(0)); + return Event.cancel(e); + } + } + }); + } + + if (tinymce.isOpera) { + t.onClick.add(function(ed, e) { + Event.prevent(e); + }); + } + + // Add custom undo/redo handlers + if (s.custom_undo_redo) { + function addUndo() { + t.undoManager.typing = false; + t.undoManager.add(); + }; + + dom.bind(t.getDoc(), 'focusout', function(e) { + if (!t.removed && t.undoManager.typing) + addUndo(); + }); + + // Add undo level when contents is drag/dropped within the editor + t.dom.bind(t.dom.getRoot(), 'dragend', function(e) { + addUndo(); + }); + + t.onKeyUp.add(function(ed, e) { + var rng, parent, bookmark; + + // Fix for bug #3168, to remove odd ".." nodes from the DOM we need to get/set the HTML of the parent node. + if (isIE && e.keyCode == 8) { + rng = t.selection.getRng(); + if (rng.parentElement) { + parent = rng.parentElement(); + bookmark = t.selection.getBookmark(); + parent.innerHTML = parent.innerHTML; + t.selection.moveToBookmark(bookmark); + } + } + + if ((e.keyCode >= 33 && e.keyCode <= 36) || (e.keyCode >= 37 && e.keyCode <= 40) || e.keyCode == 13 || e.keyCode == 45 || e.ctrlKey) + addUndo(); + }); + + t.onKeyDown.add(function(ed, e) { + var rng, parent, bookmark, keyCode = e.keyCode; + + // IE has a really odd bug where the DOM might include an node that doesn't have + // a proper structure. If you try to access nodeValue it would throw an illegal value exception. + // This seems to only happen when you delete contents and it seems to be avoidable if you refresh the element + // after you delete contents from it. See: #3008923 + if (isIE && keyCode == 46) { + rng = t.selection.getRng(); + + if (rng.parentElement) { + parent = rng.parentElement(); + + if (!t.undoManager.typing) { + t.undoManager.beforeChange(); + t.undoManager.typing = true; + t.undoManager.add(); + } + + // Select next word when ctrl key is used in combo with delete + if (e.ctrlKey) { + rng.moveEnd('word', 1); + rng.select(); + } + + // Delete contents + t.selection.getSel().clear(); + + // Check if we are within the same parent + if (rng.parentElement() == parent) { + bookmark = t.selection.getBookmark(); + + try { + // Update the HTML and hopefully it will remove the artifacts + parent.innerHTML = parent.innerHTML; + } catch (ex) { + // And since it's IE it can sometimes produce an unknown runtime error + } + + // Restore the caret position + t.selection.moveToBookmark(bookmark); + } + + // Block the default delete behavior since it might be broken + e.preventDefault(); + return; + } + } + + // Is caracter positon keys left,right,up,down,home,end,pgdown,pgup,enter + if ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode == 13 || keyCode == 45) { + // Add position before enter key is pressed, used by IE since it still uses the default browser behavior + // Todo: Remove this once we normalize enter behavior on IE + if (tinymce.isIE && keyCode == 13) + t.undoManager.beforeChange(); + + if (t.undoManager.typing) + addUndo(); + + return; + } + + // If key isn't shift,ctrl,alt,capslock,metakey + if ((keyCode < 16 || keyCode > 20) && keyCode != 224 && keyCode != 91 && !t.undoManager.typing) { + t.undoManager.beforeChange(); + t.undoManager.add(); + t.undoManager.typing = true; + } + }); + + t.onMouseDown.add(function() { + if (t.undoManager.typing) + addUndo(); + }); + } + + // Bug fix for FireFox keeping styles from end of selection instead of start. + if (tinymce.isGecko) { + function getAttributeApplyFunction() { + var template = t.dom.getAttribs(t.selection.getStart().cloneNode(false)); + + return function() { + var target = t.selection.getStart(); + t.dom.removeAllAttribs(target); + each(template, function(attr) { + target.setAttributeNode(attr.cloneNode(true)); + }); + }; + } + + function isSelectionAcrossElements() { + var s = t.selection; + + return !s.isCollapsed() && s.getStart() != s.getEnd(); + } + + t.onKeyPress.add(function(ed, e) { + var applyAttributes; + + if ((e.keyCode == 8 || e.keyCode == 46) && isSelectionAcrossElements()) { + applyAttributes = getAttributeApplyFunction(); + t.getDoc().execCommand('delete', false, null); + applyAttributes(); + + return Event.cancel(e); + } + }); + + t.dom.bind(t.getDoc(), 'cut', function(e) { + var applyAttributes; + + if (isSelectionAcrossElements()) { + applyAttributes = getAttributeApplyFunction(); + t.onKeyUp.addToTop(Event.cancel, Event); + + setTimeout(function() { + applyAttributes(); + t.onKeyUp.remove(Event.cancel, Event); + }, 0); + } + }); + } + }, + + _isHidden : function() { + var s; + + if (!isGecko) + return 0; + + // Weird, wheres that cursor selection? + s = this.selection.getSel(); + return (!s || !s.rangeCount || s.rangeCount == 0); + } + }); +})(tinymce); + +(function(tinymce) { + // Added for compression purposes + var each = tinymce.each, undefined, TRUE = true, FALSE = false; + + tinymce.EditorCommands = function(editor) { + var dom = editor.dom, + selection = editor.selection, + commands = {state: {}, exec : {}, value : {}}, + settings = editor.settings, + bookmark; + + function execCommand(command, ui, value) { + var func; + + command = command.toLowerCase(); + if (func = commands.exec[command]) { + func(command, ui, value); + return TRUE; + } + + return FALSE; + }; + + function queryCommandState(command) { + var func; + + command = command.toLowerCase(); + if (func = commands.state[command]) + return func(command); + + return -1; + }; + + function queryCommandValue(command) { + var func; + + command = command.toLowerCase(); + if (func = commands.value[command]) + return func(command); + + return FALSE; + }; + + function addCommands(command_list, type) { + type = type || 'exec'; + + each(command_list, function(callback, command) { + each(command.toLowerCase().split(','), function(command) { + commands[type][command] = callback; + }); + }); + }; + + // Expose public methods + tinymce.extend(this, { + execCommand : execCommand, + queryCommandState : queryCommandState, + queryCommandValue : queryCommandValue, + addCommands : addCommands + }); + + // Private methods + + function execNativeCommand(command, ui, value) { + if (ui === undefined) + ui = FALSE; + + if (value === undefined) + value = null; + + return editor.getDoc().execCommand(command, ui, value); + }; + + function isFormatMatch(name) { + return editor.formatter.match(name); + }; + + function toggleFormat(name, value) { + editor.formatter.toggle(name, value ? {value : value} : undefined); + }; + + function storeSelection(type) { + bookmark = selection.getBookmark(type); + }; + + function restoreSelection() { + selection.moveToBookmark(bookmark); + }; + + // Add execCommand overrides + addCommands({ + // Ignore these, added for compatibility + 'mceResetDesignMode,mceBeginUndoLevel' : function() {}, + + // Add undo manager logic + 'mceEndUndoLevel,mceAddUndoLevel' : function() { + editor.undoManager.add(); + }, + + 'Cut,Copy,Paste' : function(command) { + var doc = editor.getDoc(), failed; + + // Try executing the native command + try { + execNativeCommand(command); + } catch (ex) { + // Command failed + failed = TRUE; + } + + // Present alert message about clipboard access not being available + if (failed || !doc.queryCommandSupported(command)) { + if (tinymce.isGecko) { + editor.windowManager.confirm(editor.getLang('clipboard_msg'), function(state) { + if (state) + open('http://www.mozilla.org/editor/midasdemo/securityprefs.html', '_blank'); + }); + } else + editor.windowManager.alert(editor.getLang('clipboard_no_support')); + } + }, + + // Override unlink command + unlink : function(command) { + if (selection.isCollapsed()) + selection.select(selection.getNode()); + + execNativeCommand(command); + selection.collapse(FALSE); + }, + + // Override justify commands to use the text formatter engine + 'JustifyLeft,JustifyCenter,JustifyRight,JustifyFull' : function(command) { + var align = command.substring(7); + + // Remove all other alignments first + each('left,center,right,full'.split(','), function(name) { + if (align != name) + editor.formatter.remove('align' + name); + }); + + toggleFormat('align' + align); + execCommand('mceRepaint'); + }, + + // Override list commands to fix WebKit bug + 'InsertUnorderedList,InsertOrderedList' : function(command) { + var listElm, listParent; + + execNativeCommand(command); + + // WebKit produces lists within block elements so we need to split them + // we will replace the native list creation logic to custom logic later on + // TODO: Remove this when the list creation logic is removed + listElm = dom.getParent(selection.getNode(), 'ol,ul'); + if (listElm) { + listParent = listElm.parentNode; + + // If list is within a text block then split that block + if (/^(H[1-6]|P|ADDRESS|PRE)$/.test(listParent.nodeName)) { + storeSelection(); + dom.split(listParent, listElm); + restoreSelection(); + } + } + }, + + // Override commands to use the text formatter engine + 'Bold,Italic,Underline,Strikethrough,Superscript,Subscript' : function(command) { + toggleFormat(command); + }, + + // Override commands to use the text formatter engine + 'ForeColor,HiliteColor,FontName' : function(command, ui, value) { + toggleFormat(command, value); + }, + + FontSize : function(command, ui, value) { + var fontClasses, fontSizes; + + // Convert font size 1-7 to styles + if (value >= 1 && value <= 7) { + fontSizes = tinymce.explode(settings.font_size_style_values); + fontClasses = tinymce.explode(settings.font_size_classes); + + if (fontClasses) + value = fontClasses[value - 1] || value; + else + value = fontSizes[value - 1] || value; + } + + toggleFormat(command, value); + }, + + RemoveFormat : function(command) { + editor.formatter.remove(command); + }, + + mceBlockQuote : function(command) { + toggleFormat('blockquote'); + }, + + FormatBlock : function(command, ui, value) { + return toggleFormat(value || 'p'); + }, + + mceCleanup : function() { + var bookmark = selection.getBookmark(); + + editor.setContent(editor.getContent({cleanup : TRUE}), {cleanup : TRUE}); + + selection.moveToBookmark(bookmark); + }, + + mceRemoveNode : function(command, ui, value) { + var node = value || selection.getNode(); + + // Make sure that the body node isn't removed + if (node != editor.getBody()) { + storeSelection(); + editor.dom.remove(node, TRUE); + restoreSelection(); + } + }, + + mceSelectNodeDepth : function(command, ui, value) { + var counter = 0; + + dom.getParent(selection.getNode(), function(node) { + if (node.nodeType == 1 && counter++ == value) { + selection.select(node); + return FALSE; + } + }, editor.getBody()); + }, + + mceSelectNode : function(command, ui, value) { + selection.select(value); + }, + + mceInsertContent : function(command, ui, value) { + var caretNode, rng, rootNode, parent, node, rng, nodeRect, viewPortRect, args; + + function findSuitableCaretNode(node, root_node, next) { + var walker = new tinymce.dom.TreeWalker(next ? node.nextSibling : node.previousSibling, root_node); + + while ((node = walker.current())) { + if ((node.nodeType == 3 && tinymce.trim(node.nodeValue).length) || node.nodeName == 'BR' || node.nodeName == 'IMG') + return node; + + if (next) + walker.next(); + else + walker.prev(); + } + }; + + args = {content: value, format: 'html'}; + selection.onBeforeSetContent.dispatch(selection, args); + value = args.content; + + // Add caret at end of contents if it's missing + if (value.indexOf('{$caret}') == -1) + value += '{$caret}'; + + // Set the content at selection to a span and replace it's contents with the value + selection.setContent('\uFEFF', {no_events : false}); + dom.setOuterHTML('__mce', value.replace(/\{\$caret\}/, '\uFEFF')); + + caretNode = dom.select('#__mce')[0]; + rootNode = dom.getRoot(); + + // Move the caret into the last suitable location within the previous sibling if it's a block since the block might be split + if (caretNode.previousSibling && dom.isBlock(caretNode.previousSibling) || caretNode.parentNode == rootNode) { + node = findSuitableCaretNode(caretNode, rootNode); + if (node) { + if (node.nodeName == 'BR') + node.parentNode.insertBefore(caretNode, node); + else + dom.insertAfter(caretNode, node); + } + } + + // Find caret root parent and clean it up using the serializer to avoid nesting + while (caretNode) { + if (caretNode === rootNode) { + // Clean up the parent element by parsing and serializing it + // This will remove invalid elements/attributes and fix nesting issues + dom.setOuterHTML(parent, + new tinymce.html.Serializer({}, editor.schema).serialize( + editor.parser.parse(dom.getOuterHTML(parent)) + ) + ); + + break; + } + + parent = caretNode; + caretNode = caretNode.parentNode; + } + + // Find caret after cleanup and move selection to that location + caretNode = dom.select('#__mce')[0]; + if (caretNode) { + node = findSuitableCaretNode(caretNode, rootNode) || findSuitableCaretNode(caretNode, rootNode, true); + dom.remove(caretNode); + + if (node) { + rng = dom.createRng(); + + if (node.nodeType == 3) { + rng.setStart(node, node.length); + rng.setEnd(node, node.length); + } else { + if (node.nodeName == 'BR') { + rng.setStartBefore(node); + rng.setEndBefore(node); + } else { + rng.setStartAfter(node); + rng.setEndAfter(node); + } + } + + selection.setRng(rng); + + // Scroll range into view scrollIntoView on element can't be used since it will scroll the main view port as well + if (!tinymce.isIE) { + node = dom.create('span', null, '\u00a0'); + rng.insertNode(node); + nodeRect = dom.getRect(node); + viewPortRect = dom.getViewPort(editor.getWin()); + + // Check if node is out side the viewport if it is then scroll to it + if ((nodeRect.y > viewPortRect.y + viewPortRect.h || nodeRect.y < viewPortRect.y) || + (nodeRect.x > viewPortRect.x + viewPortRect.w || nodeRect.x < viewPortRect.x)) { + editor.getBody().scrollLeft = nodeRect.x; + editor.getBody().scrollTop = nodeRect.y; + } + + dom.remove(node); + } + + // Make sure that the selection is collapsed after we removed the node fixes a WebKit bug + // where WebKit would place the endContainer/endOffset at a different location than the startContainer/startOffset + selection.collapse(true); + } + } + + selection.onSetContent.dispatch(selection, args); + editor.addVisual(); + }, + + mceInsertRawHTML : function(command, ui, value) { + selection.setContent('tiny_mce_marker'); + editor.setContent(editor.getContent().replace(/tiny_mce_marker/g, function() { return value })); + }, + + mceSetContent : function(command, ui, value) { + editor.setContent(value); + }, + + 'Indent,Outdent' : function(command) { + var intentValue, indentUnit, value; + + // Setup indent level + intentValue = settings.indentation; + indentUnit = /[a-z%]+$/i.exec(intentValue); + intentValue = parseInt(intentValue); + + if (!queryCommandState('InsertUnorderedList') && !queryCommandState('InsertOrderedList')) { + each(selection.getSelectedBlocks(), function(element) { + if (command == 'outdent') { + value = Math.max(0, parseInt(element.style.paddingLeft || 0) - intentValue); + dom.setStyle(element, 'paddingLeft', value ? value + indentUnit : ''); + } else + dom.setStyle(element, 'paddingLeft', (parseInt(element.style.paddingLeft || 0) + intentValue) + indentUnit); + }); + } else + execNativeCommand(command); + }, + + mceRepaint : function() { + var bookmark; + + if (tinymce.isGecko) { + try { + storeSelection(TRUE); + + if (selection.getSel()) + selection.getSel().selectAllChildren(editor.getBody()); + + selection.collapse(TRUE); + restoreSelection(); + } catch (ex) { + // Ignore + } + } + }, + + mceToggleFormat : function(command, ui, value) { + editor.formatter.toggle(value); + }, + + InsertHorizontalRule : function() { + editor.execCommand('mceInsertContent', false, '
    '); + }, + + mceToggleVisualAid : function() { + editor.hasVisual = !editor.hasVisual; + editor.addVisual(); + }, + + mceReplaceContent : function(command, ui, value) { + editor.execCommand('mceInsertContent', false, value.replace(/\{\$selection\}/g, selection.getContent({format : 'text'}))); + }, + + mceInsertLink : function(command, ui, value) { + var link = dom.getParent(selection.getNode(), 'a'), img, floatVal; + + if (tinymce.is(value, 'string')) + value = {href : value}; + + // Spaces are never valid in URLs and it's a very common mistake for people to make so we fix it here. + value.href = value.href.replace(' ', '%20'); + + if (!link) { + // WebKit can't create links on float images for some odd reason so just remove it and restore it later + if (tinymce.isWebKit) { + img = dom.getParent(selection.getNode(), 'img'); + + if (img) { + floatVal = img.style.cssFloat; + img.style.cssFloat = null; + } + } + + execNativeCommand('CreateLink', FALSE, 'javascript:mctmp(0);'); + + // Restore float value + if (floatVal) + img.style.cssFloat = floatVal; + + each(dom.select("a[href='javascript:mctmp(0);']"), function(link) { + dom.setAttribs(link, value); + }); + } else { + if (value.href) + dom.setAttribs(link, value); + else + editor.dom.remove(link, TRUE); + } + }, + + selectAll : function() { + var root = dom.getRoot(), rng = dom.createRng(); + + rng.setStart(root, 0); + rng.setEnd(root, root.childNodes.length); + + editor.selection.setRng(rng); + } + }); + + // Add queryCommandState overrides + addCommands({ + // Override justify commands + 'JustifyLeft,JustifyCenter,JustifyRight,JustifyFull' : function(command) { + return isFormatMatch('align' + command.substring(7)); + }, + + 'Bold,Italic,Underline,Strikethrough,Superscript,Subscript' : function(command) { + return isFormatMatch(command); + }, + + mceBlockQuote : function() { + return isFormatMatch('blockquote'); + }, + + Outdent : function() { + var node; + + if (settings.inline_styles) { + if ((node = dom.getParent(selection.getStart(), dom.isBlock)) && parseInt(node.style.paddingLeft) > 0) + return TRUE; + + if ((node = dom.getParent(selection.getEnd(), dom.isBlock)) && parseInt(node.style.paddingLeft) > 0) + return TRUE; + } + + return queryCommandState('InsertUnorderedList') || queryCommandState('InsertOrderedList') || (!settings.inline_styles && !!dom.getParent(selection.getNode(), 'BLOCKQUOTE')); + }, + + 'InsertUnorderedList,InsertOrderedList' : function(command) { + return dom.getParent(selection.getNode(), command == 'insertunorderedlist' ? 'UL' : 'OL'); + } + }, 'state'); + + // Add queryCommandValue overrides + addCommands({ + 'FontSize,FontName' : function(command) { + var value = 0, parent; + + if (parent = dom.getParent(selection.getNode(), 'span')) { + if (command == 'fontsize') + value = parent.style.fontSize; + else + value = parent.style.fontFamily.replace(/, /g, ',').replace(/[\'\"]/g, '').toLowerCase(); + } + + return value; + } + }, 'value'); + + // Add undo manager logic + if (settings.custom_undo_redo) { + addCommands({ + Undo : function() { + editor.undoManager.undo(); + }, + + Redo : function() { + editor.undoManager.redo(); + } + }); + } + }; +})(tinymce); + +(function(tinymce) { + var Dispatcher = tinymce.util.Dispatcher; + + tinymce.UndoManager = function(editor) { + var self, index = 0, data = []; + + function getContent() { + return tinymce.trim(editor.getContent({format : 'raw', no_events : 1})); + }; + + return self = { + typing : false, + + onAdd : new Dispatcher(self), + + onUndo : new Dispatcher(self), + + onRedo : new Dispatcher(self), + + beforeChange : function() { + // Set before bookmark on previous level + if (data[index]) + data[index].beforeBookmark = editor.selection.getBookmark(2, true); + }, + + add : function(level) { + var i, settings = editor.settings, lastLevel; + + level = level || {}; + level.content = getContent(); + + // Add undo level if needed + lastLevel = data[index]; + if (lastLevel && lastLevel.content == level.content) + return null; + + // Time to compress + if (settings.custom_undo_redo_levels) { + if (data.length > settings.custom_undo_redo_levels) { + for (i = 0; i < data.length - 1; i++) + data[i] = data[i + 1]; + + data.length--; + index = data.length; + } + } + + // Get a non intrusive normalized bookmark + level.bookmark = editor.selection.getBookmark(2, true); + + // Crop array if needed + if (index < data.length - 1) + data.length = index + 1; + + data.push(level); + index = data.length - 1; + + self.onAdd.dispatch(self, level); + editor.isNotDirty = 0; + + return level; + }, + + undo : function() { + var level, i; + + if (self.typing) { + self.add(); + self.typing = false; + } + + if (index > 0) { + level = data[--index]; + + editor.setContent(level.content, {format : 'raw'}); + editor.selection.moveToBookmark(level.beforeBookmark); + + self.onUndo.dispatch(self, level); + } + + return level; + }, + + redo : function() { + var level; + + if (index < data.length - 1) { + level = data[++index]; + + editor.setContent(level.content, {format : 'raw'}); + editor.selection.moveToBookmark(level.bookmark); + + self.onRedo.dispatch(self, level); + } + + return level; + }, + + clear : function() { + data = []; + index = 0; + self.typing = false; + }, + + hasUndo : function() { + return index > 0 || this.typing; + }, + + hasRedo : function() { + return index < data.length - 1 && !this.typing; + } + }; + }; +})(tinymce); + +(function(tinymce) { + // Shorten names + var Event = tinymce.dom.Event, + isIE = tinymce.isIE, + isGecko = tinymce.isGecko, + isOpera = tinymce.isOpera, + each = tinymce.each, + extend = tinymce.extend, + TRUE = true, + FALSE = false; + + function cloneFormats(node) { + var clone, temp, inner; + + do { + if (/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(node.nodeName)) { + if (clone) { + temp = node.cloneNode(false); + temp.appendChild(clone); + clone = temp; + } else { + clone = inner = node.cloneNode(false); + } + + clone.removeAttribute('id'); + } + } while (node = node.parentNode); + + if (clone) + return {wrapper : clone, inner : inner}; + }; + + // Checks if the selection/caret is at the end of the specified block element + function isAtEnd(rng, par) { + var rng2 = par.ownerDocument.createRange(); + + rng2.setStart(rng.endContainer, rng.endOffset); + rng2.setEndAfter(par); + + // Get number of characters to the right of the cursor if it's zero then we are at the end and need to merge the next block element + return rng2.cloneContents().textContent.length == 0; + }; + + function splitList(selection, dom, li) { + var listBlock, block; + + if (dom.isEmpty(li)) { + listBlock = dom.getParent(li, 'ul,ol'); + + if (!dom.getParent(listBlock.parentNode, 'ul,ol')) { + dom.split(listBlock, li); + block = dom.create('p', 0, '
    '); + dom.replace(block, li); + selection.select(block, 1); + } + + return FALSE; + } + + return TRUE; + }; + + tinymce.create('tinymce.ForceBlocks', { + ForceBlocks : function(ed) { + var t = this, s = ed.settings, elm; + + t.editor = ed; + t.dom = ed.dom; + elm = (s.forced_root_block || 'p').toLowerCase(); + s.element = elm.toUpperCase(); + + ed.onPreInit.add(t.setup, t); + + if (s.forced_root_block) { + ed.onInit.add(t.forceRoots, t); + ed.onSetContent.add(t.forceRoots, t); + ed.onBeforeGetContent.add(t.forceRoots, t); + ed.onExecCommand.add(function(ed, cmd) { + if (cmd == 'mceInsertContent') { + t.forceRoots(); + ed.nodeChanged(); + } + }); + } + }, + + setup : function() { + var t = this, ed = t.editor, s = ed.settings, dom = ed.dom, selection = ed.selection; + + // Force root blocks when typing and when getting output + if (s.forced_root_block) { + ed.onBeforeExecCommand.add(t.forceRoots, t); + ed.onKeyUp.add(t.forceRoots, t); + ed.onPreProcess.add(t.forceRoots, t); + } + + if (s.force_br_newlines) { + // Force IE to produce BRs on enter + if (isIE) { + ed.onKeyPress.add(function(ed, e) { + var n; + + if (e.keyCode == 13 && selection.getNode().nodeName != 'LI') { + selection.setContent('
    ', {format : 'raw'}); + n = dom.get('__'); + n.removeAttribute('id'); + selection.select(n); + selection.collapse(); + return Event.cancel(e); + } + }); + } + } + + if (s.force_p_newlines) { + if (!isIE) { + ed.onKeyPress.add(function(ed, e) { + if (e.keyCode == 13 && !e.shiftKey && !t.insertPara(e)) + Event.cancel(e); + }); + } else { + // Ungly hack to for IE to preserve the formatting when you press + // enter at the end of a block element with formatted contents + // This logic overrides the browsers default logic with + // custom logic that enables us to control the output + tinymce.addUnload(function() { + t._previousFormats = 0; // Fix IE leak + }); + + ed.onKeyPress.add(function(ed, e) { + t._previousFormats = 0; + + // Clone the current formats, this will later be applied to the new block contents + if (e.keyCode == 13 && !e.shiftKey && ed.selection.isCollapsed() && s.keep_styles) + t._previousFormats = cloneFormats(ed.selection.getStart()); + }); + + ed.onKeyUp.add(function(ed, e) { + // Let IE break the element and the wrap the new caret location in the previous formats + if (e.keyCode == 13 && !e.shiftKey) { + var parent = ed.selection.getStart(), fmt = t._previousFormats; + + // Parent is an empty block + if (!parent.hasChildNodes() && fmt) { + parent = dom.getParent(parent, dom.isBlock); + + if (parent && parent.nodeName != 'LI') { + parent.innerHTML = ''; + + if (t._previousFormats) { + parent.appendChild(fmt.wrapper); + fmt.inner.innerHTML = '\uFEFF'; + } else + parent.innerHTML = '\uFEFF'; + + selection.select(parent, 1); + selection.collapse(true); + ed.getDoc().execCommand('Delete', false, null); + t._previousFormats = 0; + } + } + } + }); + } + + if (isGecko) { + ed.onKeyDown.add(function(ed, e) { + if ((e.keyCode == 8 || e.keyCode == 46) && !e.shiftKey) + t.backspaceDelete(e, e.keyCode == 8); + }); + } + } + + // Workaround for missing shift+enter support, http://bugs.webkit.org/show_bug.cgi?id=16973 + if (tinymce.isWebKit) { + function insertBr(ed) { + var rng = selection.getRng(), br, div = dom.create('div', null, ' '), divYPos, vpHeight = dom.getViewPort(ed.getWin()).h; + + // Insert BR element + rng.insertNode(br = dom.create('br')); + + // Place caret after BR + rng.setStartAfter(br); + rng.setEndAfter(br); + selection.setRng(rng); + + // Could not place caret after BR then insert an nbsp entity and move the caret + if (selection.getSel().focusNode == br.previousSibling) { + selection.select(dom.insertAfter(dom.doc.createTextNode('\u00a0'), br)); + selection.collapse(TRUE); + } + + // Create a temporary DIV after the BR and get the position as it + // seems like getPos() returns 0 for text nodes and BR elements. + dom.insertAfter(div, br); + divYPos = dom.getPos(div).y; + dom.remove(div); + + // Scroll to new position, scrollIntoView can't be used due to bug: http://bugs.webkit.org/show_bug.cgi?id=16117 + if (divYPos > vpHeight) // It is not necessary to scroll if the DIV is inside the view port. + ed.getWin().scrollTo(0, divYPos); + }; + + ed.onKeyPress.add(function(ed, e) { + if (e.keyCode == 13 && (e.shiftKey || (s.force_br_newlines && !dom.getParent(selection.getNode(), 'h1,h2,h3,h4,h5,h6,ol,ul')))) { + insertBr(ed); + Event.cancel(e); + } + }); + } + + // IE specific fixes + if (isIE) { + // Replaces IE:s auto generated paragraphs with the specified element name + if (s.element != 'P') { + ed.onKeyPress.add(function(ed, e) { + t.lastElm = selection.getNode().nodeName; + }); + + ed.onKeyUp.add(function(ed, e) { + var bl, n = selection.getNode(), b = ed.getBody(); + + if (b.childNodes.length === 1 && n.nodeName == 'P') { + n = dom.rename(n, s.element); + selection.select(n); + selection.collapse(); + ed.nodeChanged(); + } else if (e.keyCode == 13 && !e.shiftKey && t.lastElm != 'P') { + bl = dom.getParent(n, 'p'); + + if (bl) { + dom.rename(bl, s.element); + ed.nodeChanged(); + } + } + }); + } + } + }, + + find : function(n, t, s) { + var ed = this.editor, w = ed.getDoc().createTreeWalker(n, 4, null, FALSE), c = -1; + + while (n = w.nextNode()) { + c++; + + // Index by node + if (t == 0 && n == s) + return c; + + // Node by index + if (t == 1 && c == s) + return n; + } + + return -1; + }, + + forceRoots : function(ed, e) { + var t = this, ed = t.editor, b = ed.getBody(), d = ed.getDoc(), se = ed.selection, s = se.getSel(), r = se.getRng(), si = -2, ei, so, eo, tr, c = -0xFFFFFF; + var nx, bl, bp, sp, le, nl = b.childNodes, i, n, eid; + + // Fix for bug #1863847 + //if (e && e.keyCode == 13) + // return TRUE; + + // Wrap non blocks into blocks + for (i = nl.length - 1; i >= 0; i--) { + nx = nl[i]; + + // Ignore internal elements + if (nx.nodeType === 1 && nx.getAttribute('data-mce-type')) { + bl = null; + continue; + } + + // Is text or non block element + if (nx.nodeType === 3 || (!t.dom.isBlock(nx) && nx.nodeType !== 8 && !/^(script|mce:script|style|mce:style)$/i.test(nx.nodeName))) { + if (!bl) { + // Create new block but ignore whitespace + if (nx.nodeType != 3 || /[^\s]/g.test(nx.nodeValue)) { + // Store selection + if (si == -2 && r) { + if (!isIE || r.setStart) { + // If selection is element then mark it + if (r.startContainer.nodeType == 1 && (n = r.startContainer.childNodes[r.startOffset]) && n.nodeType == 1) { + // Save the id of the selected element + eid = n.getAttribute("id"); + n.setAttribute("id", "__mce"); + } else { + // If element is inside body, might not be the case in contentEdiable mode + if (ed.dom.getParent(r.startContainer, function(e) {return e === b;})) { + so = r.startOffset; + eo = r.endOffset; + si = t.find(b, 0, r.startContainer); + ei = t.find(b, 0, r.endContainer); + } + } + } else { + // Force control range into text range + if (r.item) { + tr = d.body.createTextRange(); + tr.moveToElementText(r.item(0)); + r = tr; + } + + tr = d.body.createTextRange(); + tr.moveToElementText(b); + tr.collapse(1); + bp = tr.move('character', c) * -1; + + tr = r.duplicate(); + tr.collapse(1); + sp = tr.move('character', c) * -1; + + tr = r.duplicate(); + tr.collapse(0); + le = (tr.move('character', c) * -1) - sp; + + si = sp - bp; + ei = le; + } + } + + // Uses replaceChild instead of cloneNode since it removes selected attribute from option elements on IE + // See: http://support.microsoft.com/kb/829907 + bl = ed.dom.create(ed.settings.forced_root_block); + nx.parentNode.replaceChild(bl, nx); + bl.appendChild(nx); + } + } else { + if (bl.hasChildNodes()) + bl.insertBefore(nx, bl.firstChild); + else + bl.appendChild(nx); + } + } else + bl = null; // Time to create new block + } + + // Restore selection + if (si != -2) { + if (!isIE || r.setStart) { + bl = b.getElementsByTagName(ed.settings.element)[0]; + r = d.createRange(); + + // Select last location or generated block + if (si != -1) + r.setStart(t.find(b, 1, si), so); + else + r.setStart(bl, 0); + + // Select last location or generated block + if (ei != -1) + r.setEnd(t.find(b, 1, ei), eo); + else + r.setEnd(bl, 0); + + if (s) { + s.removeAllRanges(); + s.addRange(r); + } + } else { + try { + r = s.createRange(); + r.moveToElementText(b); + r.collapse(1); + r.moveStart('character', si); + r.moveEnd('character', ei); + r.select(); + } catch (ex) { + // Ignore + } + } + } else if ((!isIE || r.setStart) && (n = ed.dom.get('__mce'))) { + // Restore the id of the selected element + if (eid) + n.setAttribute('id', eid); + else + n.removeAttribute('id'); + + // Move caret before selected element + r = d.createRange(); + r.setStartBefore(n); + r.setEndBefore(n); + se.setRng(r); + } + }, + + getParentBlock : function(n) { + var d = this.dom; + + return d.getParent(n, d.isBlock); + }, + + insertPara : function(e) { + var t = this, ed = t.editor, dom = ed.dom, d = ed.getDoc(), se = ed.settings, s = ed.selection.getSel(), r = s.getRangeAt(0), b = d.body; + var rb, ra, dir, sn, so, en, eo, sb, eb, bn, bef, aft, sc, ec, n, vp = dom.getViewPort(ed.getWin()), y, ch, car; + + ed.undoManager.beforeChange(); + + // If root blocks are forced then use Operas default behavior since it's really good +// Removed due to bug: #1853816 +// if (se.forced_root_block && isOpera) +// return TRUE; + + // Setup before range + rb = d.createRange(); + + // If is before the first block element and in body, then move it into first block element + rb.setStart(s.anchorNode, s.anchorOffset); + rb.collapse(TRUE); + + // Setup after range + ra = d.createRange(); + + // If is before the first block element and in body, then move it into first block element + ra.setStart(s.focusNode, s.focusOffset); + ra.collapse(TRUE); + + // Setup start/end points + dir = rb.compareBoundaryPoints(rb.START_TO_END, ra) < 0; + sn = dir ? s.anchorNode : s.focusNode; + so = dir ? s.anchorOffset : s.focusOffset; + en = dir ? s.focusNode : s.anchorNode; + eo = dir ? s.focusOffset : s.anchorOffset; + + // If selection is in empty table cell + if (sn === en && /^(TD|TH)$/.test(sn.nodeName)) { + if (sn.firstChild.nodeName == 'BR') + dom.remove(sn.firstChild); // Remove BR + + // Create two new block elements + if (sn.childNodes.length == 0) { + ed.dom.add(sn, se.element, null, '
    '); + aft = ed.dom.add(sn, se.element, null, '
    '); + } else { + n = sn.innerHTML; + sn.innerHTML = ''; + ed.dom.add(sn, se.element, null, n); + aft = ed.dom.add(sn, se.element, null, '
    '); + } + + // Move caret into the last one + r = d.createRange(); + r.selectNodeContents(aft); + r.collapse(1); + ed.selection.setRng(r); + + return FALSE; + } + + // If the caret is in an invalid location in FF we need to move it into the first block + if (sn == b && en == b && b.firstChild && ed.dom.isBlock(b.firstChild)) { + sn = en = sn.firstChild; + so = eo = 0; + rb = d.createRange(); + rb.setStart(sn, 0); + ra = d.createRange(); + ra.setStart(en, 0); + } + + // Never use body as start or end node + sn = sn.nodeName == "HTML" ? d.body : sn; // Fix for Opera bug: https://bugs.opera.com/show_bug.cgi?id=273224&comments=yes + sn = sn.nodeName == "BODY" ? sn.firstChild : sn; + en = en.nodeName == "HTML" ? d.body : en; // Fix for Opera bug: https://bugs.opera.com/show_bug.cgi?id=273224&comments=yes + en = en.nodeName == "BODY" ? en.firstChild : en; + + // Get start and end blocks + sb = t.getParentBlock(sn); + eb = t.getParentBlock(en); + bn = sb ? sb.nodeName : se.element; // Get block name to create + + // Return inside list use default browser behavior + if (n = t.dom.getParent(sb, 'li,pre')) { + if (n.nodeName == 'LI') + return splitList(ed.selection, t.dom, n); + + return TRUE; + } + + // If caption or absolute layers then always generate new blocks within + if (sb && (sb.nodeName == 'CAPTION' || /absolute|relative|fixed/gi.test(dom.getStyle(sb, 'position', 1)))) { + bn = se.element; + sb = null; + } + + // If caption or absolute layers then always generate new blocks within + if (eb && (eb.nodeName == 'CAPTION' || /absolute|relative|fixed/gi.test(dom.getStyle(sb, 'position', 1)))) { + bn = se.element; + eb = null; + } + + // Use P instead + if (/(TD|TABLE|TH|CAPTION)/.test(bn) || (sb && bn == "DIV" && /left|right/gi.test(dom.getStyle(sb, 'float', 1)))) { + bn = se.element; + sb = eb = null; + } + + // Setup new before and after blocks + bef = (sb && sb.nodeName == bn) ? sb.cloneNode(0) : ed.dom.create(bn); + aft = (eb && eb.nodeName == bn) ? eb.cloneNode(0) : ed.dom.create(bn); + + // Remove id from after clone + aft.removeAttribute('id'); + + // Is header and cursor is at the end, then force paragraph under + if (/^(H[1-6])$/.test(bn) && isAtEnd(r, sb)) + aft = ed.dom.create(se.element); + + // Find start chop node + n = sc = sn; + do { + if (n == b || n.nodeType == 9 || t.dom.isBlock(n) || /(TD|TABLE|TH|CAPTION)/.test(n.nodeName)) + break; + + sc = n; + } while ((n = n.previousSibling ? n.previousSibling : n.parentNode)); + + // Find end chop node + n = ec = en; + do { + if (n == b || n.nodeType == 9 || t.dom.isBlock(n) || /(TD|TABLE|TH|CAPTION)/.test(n.nodeName)) + break; + + ec = n; + } while ((n = n.nextSibling ? n.nextSibling : n.parentNode)); + + // Place first chop part into before block element + if (sc.nodeName == bn) + rb.setStart(sc, 0); + else + rb.setStartBefore(sc); + + rb.setEnd(sn, so); + bef.appendChild(rb.cloneContents() || d.createTextNode('')); // Empty text node needed for Safari + + // Place secnd chop part within new block element + try { + ra.setEndAfter(ec); + } catch(ex) { + //console.debug(s.focusNode, s.focusOffset); + } + + ra.setStart(en, eo); + aft.appendChild(ra.cloneContents() || d.createTextNode('')); // Empty text node needed for Safari + + // Create range around everything + r = d.createRange(); + if (!sc.previousSibling && sc.parentNode.nodeName == bn) { + r.setStartBefore(sc.parentNode); + } else { + if (rb.startContainer.nodeName == bn && rb.startOffset == 0) + r.setStartBefore(rb.startContainer); + else + r.setStart(rb.startContainer, rb.startOffset); + } + + if (!ec.nextSibling && ec.parentNode.nodeName == bn) + r.setEndAfter(ec.parentNode); + else + r.setEnd(ra.endContainer, ra.endOffset); + + // Delete and replace it with new block elements + r.deleteContents(); + + if (isOpera) + ed.getWin().scrollTo(0, vp.y); + + // Never wrap blocks in blocks + if (bef.firstChild && bef.firstChild.nodeName == bn) + bef.innerHTML = bef.firstChild.innerHTML; + + if (aft.firstChild && aft.firstChild.nodeName == bn) + aft.innerHTML = aft.firstChild.innerHTML; + + // Padd empty blocks + if (dom.isEmpty(bef)) + bef.innerHTML = '
    '; + + function appendStyles(e, en) { + var nl = [], nn, n, i; + + e.innerHTML = ''; + + // Make clones of style elements + if (se.keep_styles) { + n = en; + do { + // We only want style specific elements + if (/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(n.nodeName)) { + nn = n.cloneNode(FALSE); + dom.setAttrib(nn, 'id', ''); // Remove ID since it needs to be unique + nl.push(nn); + } + } while (n = n.parentNode); + } + + // Append style elements to aft + if (nl.length > 0) { + for (i = nl.length - 1, nn = e; i >= 0; i--) + nn = nn.appendChild(nl[i]); + + // Padd most inner style element + nl[0].innerHTML = isOpera ? '\u00a0' : '
    '; // Extra space for Opera so that the caret can move there + return nl[0]; // Move caret to most inner element + } else + e.innerHTML = isOpera ? '\u00a0' : '
    '; // Extra space for Opera so that the caret can move there + }; + + // Fill empty afterblook with current style + if (dom.isEmpty(aft)) + car = appendStyles(aft, en); + + // Opera needs this one backwards for older versions + if (isOpera && parseFloat(opera.version()) < 9.5) { + r.insertNode(bef); + r.insertNode(aft); + } else { + r.insertNode(aft); + r.insertNode(bef); + } + + // Normalize + aft.normalize(); + bef.normalize(); + + function first(n) { + return d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, FALSE).nextNode() || n; + }; + + // Move cursor and scroll into view + r = d.createRange(); + r.selectNodeContents(isGecko ? first(car || aft) : car || aft); + r.collapse(1); + s.removeAllRanges(); + s.addRange(r); + + // scrollIntoView seems to scroll the parent window in most browsers now including FF 3.0b4 so it's time to stop using it and do it our selfs + y = ed.dom.getPos(aft).y; + //ch = aft.clientHeight; + + // Is element within viewport + if (y < vp.y || y + 25 > vp.y + vp.h) { + ed.getWin().scrollTo(0, y < vp.y ? y : y - vp.h + 25); // Needs to be hardcoded to roughly one line of text if a huge text block is broken into two blocks + + /*console.debug( + 'Element: y=' + y + ', h=' + ch + ', ' + + 'Viewport: y=' + vp.y + ", h=" + vp.h + ', bottom=' + (vp.y + vp.h) + );*/ + } + + ed.undoManager.add(); + + return FALSE; + }, + + backspaceDelete : function(e, bs) { + var t = this, ed = t.editor, b = ed.getBody(), dom = ed.dom, n, se = ed.selection, r = se.getRng(), sc = r.startContainer, n, w, tn, walker; + + // Delete when caret is behind a element doesn't work correctly on Gecko see #3011651 + if (!bs && r.collapsed && sc.nodeType == 1 && r.startOffset == sc.childNodes.length) { + walker = new tinymce.dom.TreeWalker(sc.lastChild, sc); + + // Walk the dom backwards until we find a text node + for (n = sc.lastChild; n; n = walker.prev()) { + if (n.nodeType == 3) { + r.setStart(n, n.nodeValue.length); + r.collapse(true); + se.setRng(r); + return; + } + } + } + + // The caret sometimes gets stuck in Gecko if you delete empty paragraphs + // This workaround removes the element by hand and moves the caret to the previous element + if (sc && ed.dom.isBlock(sc) && !/^(TD|TH)$/.test(sc.nodeName) && bs) { + if (sc.childNodes.length == 0 || (sc.childNodes.length == 1 && sc.firstChild.nodeName == 'BR')) { + // Find previous block element + n = sc; + while ((n = n.previousSibling) && !ed.dom.isBlock(n)) ; + + if (n) { + if (sc != b.firstChild) { + // Find last text node + w = ed.dom.doc.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, FALSE); + while (tn = w.nextNode()) + n = tn; + + // Place caret at the end of last text node + r = ed.getDoc().createRange(); + r.setStart(n, n.nodeValue ? n.nodeValue.length : 0); + r.setEnd(n, n.nodeValue ? n.nodeValue.length : 0); + se.setRng(r); + + // Remove the target container + ed.dom.remove(sc); + } + + return Event.cancel(e); + } + } + } + } + }); +})(tinymce); + +(function(tinymce) { + // Shorten names + var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, extend = tinymce.extend; + + tinymce.create('tinymce.ControlManager', { + ControlManager : function(ed, s) { + var t = this, i; + + s = s || {}; + t.editor = ed; + t.controls = {}; + t.onAdd = new tinymce.util.Dispatcher(t); + t.onPostRender = new tinymce.util.Dispatcher(t); + t.prefix = s.prefix || ed.id + '_'; + t._cls = {}; + + t.onPostRender.add(function() { + each(t.controls, function(c) { + c.postRender(); + }); + }); + }, + + get : function(id) { + return this.controls[this.prefix + id] || this.controls[id]; + }, + + setActive : function(id, s) { + var c = null; + + if (c = this.get(id)) + c.setActive(s); + + return c; + }, + + setDisabled : function(id, s) { + var c = null; + + if (c = this.get(id)) + c.setDisabled(s); + + return c; + }, + + add : function(c) { + var t = this; + + if (c) { + t.controls[c.id] = c; + t.onAdd.dispatch(c, t); + } + + return c; + }, + + createControl : function(n) { + var c, t = this, ed = t.editor; + + each(ed.plugins, function(p) { + if (p.createControl) { + c = p.createControl(n, t); + + if (c) + return false; + } + }); + + switch (n) { + case "|": + case "separator": + return t.createSeparator(); + } + + if (!c && ed.buttons && (c = ed.buttons[n])) + return t.createButton(n, c); + + return t.add(c); + }, + + createDropMenu : function(id, s, cc) { + var t = this, ed = t.editor, c, bm, v, cls; + + s = extend({ + 'class' : 'mceDropDown', + constrain : ed.settings.constrain_menus + }, s); + + s['class'] = s['class'] + ' ' + ed.getParam('skin') + 'Skin'; + if (v = ed.getParam('skin_variant')) + s['class'] += ' ' + ed.getParam('skin') + 'Skin' + v.substring(0, 1).toUpperCase() + v.substring(1); + + id = t.prefix + id; + cls = cc || t._cls.dropmenu || tinymce.ui.DropMenu; + c = t.controls[id] = new cls(id, s); + c.onAddItem.add(function(c, o) { + var s = o.settings; + + s.title = ed.getLang(s.title, s.title); + + if (!s.onclick) { + s.onclick = function(v) { + if (s.cmd) + ed.execCommand(s.cmd, s.ui || false, s.value); + }; + } + }); + + ed.onRemove.add(function() { + c.destroy(); + }); + + // Fix for bug #1897785, #1898007 + if (tinymce.isIE) { + c.onShowMenu.add(function() { + // IE 8 needs focus in order to store away a range with the current collapsed caret location + ed.focus(); + + bm = ed.selection.getBookmark(1); + }); + + c.onHideMenu.add(function() { + if (bm) { + ed.selection.moveToBookmark(bm); + bm = 0; + } + }); + } + + return t.add(c); + }, + + createListBox : function(id, s, cc) { + var t = this, ed = t.editor, cmd, c, cls; + + if (t.get(id)) + return null; + + s.title = ed.translate(s.title); + s.scope = s.scope || ed; + + if (!s.onselect) { + s.onselect = function(v) { + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; + } + + s = extend({ + title : s.title, + 'class' : 'mce_' + id, + scope : s.scope, + control_manager : t + }, s); + + id = t.prefix + id; + + if (ed.settings.use_native_selects) + c = new tinymce.ui.NativeListBox(id, s); + else { + cls = cc || t._cls.listbox || tinymce.ui.ListBox; + c = new cls(id, s, ed); + } + + t.controls[id] = c; + + // Fix focus problem in Safari + if (tinymce.isWebKit) { + c.onPostRender.add(function(c, n) { + // Store bookmark on mousedown + Event.add(n, 'mousedown', function() { + ed.bookmark = ed.selection.getBookmark(1); + }); + + // Restore on focus, since it might be lost + Event.add(n, 'focus', function() { + ed.selection.moveToBookmark(ed.bookmark); + ed.bookmark = null; + }); + }); + } + + if (c.hideMenu) + ed.onMouseDown.add(c.hideMenu, c); + + return t.add(c); + }, + + createButton : function(id, s, cc) { + var t = this, ed = t.editor, o, c, cls; + + if (t.get(id)) + return null; + + s.title = ed.translate(s.title); + s.label = ed.translate(s.label); + s.scope = s.scope || ed; + + if (!s.onclick && !s.menu_button) { + s.onclick = function() { + ed.execCommand(s.cmd, s.ui || false, s.value); + }; + } + + s = extend({ + title : s.title, + 'class' : 'mce_' + id, + unavailable_prefix : ed.getLang('unavailable', ''), + scope : s.scope, + control_manager : t + }, s); + + id = t.prefix + id; + + if (s.menu_button) { + cls = cc || t._cls.menubutton || tinymce.ui.MenuButton; + c = new cls(id, s, ed); + ed.onMouseDown.add(c.hideMenu, c); + } else { + cls = t._cls.button || tinymce.ui.Button; + c = new cls(id, s); + } + + return t.add(c); + }, + + createMenuButton : function(id, s, cc) { + s = s || {}; + s.menu_button = 1; + + return this.createButton(id, s, cc); + }, + + createSplitButton : function(id, s, cc) { + var t = this, ed = t.editor, cmd, c, cls; + + if (t.get(id)) + return null; + + s.title = ed.translate(s.title); + s.scope = s.scope || ed; + + if (!s.onclick) { + s.onclick = function(v) { + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; + } + + if (!s.onselect) { + s.onselect = function(v) { + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; + } + + s = extend({ + title : s.title, + 'class' : 'mce_' + id, + scope : s.scope, + control_manager : t + }, s); + + id = t.prefix + id; + cls = cc || t._cls.splitbutton || tinymce.ui.SplitButton; + c = t.add(new cls(id, s, ed)); + ed.onMouseDown.add(c.hideMenu, c); + + return c; + }, + + createColorSplitButton : function(id, s, cc) { + var t = this, ed = t.editor, cmd, c, cls, bm; + + if (t.get(id)) + return null; + + s.title = ed.translate(s.title); + s.scope = s.scope || ed; + + if (!s.onclick) { + s.onclick = function(v) { + if (tinymce.isIE) + bm = ed.selection.getBookmark(1); + + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; + } + + if (!s.onselect) { + s.onselect = function(v) { + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; + } + + s = extend({ + title : s.title, + 'class' : 'mce_' + id, + 'menu_class' : ed.getParam('skin') + 'Skin', + scope : s.scope, + more_colors_title : ed.getLang('more_colors') + }, s); + + id = t.prefix + id; + cls = cc || t._cls.colorsplitbutton || tinymce.ui.ColorSplitButton; + c = new cls(id, s, ed); + ed.onMouseDown.add(c.hideMenu, c); + + // Remove the menu element when the editor is removed + ed.onRemove.add(function() { + c.destroy(); + }); + + // Fix for bug #1897785, #1898007 + if (tinymce.isIE) { + c.onShowMenu.add(function() { + // IE 8 needs focus in order to store away a range with the current collapsed caret location + ed.focus(); + bm = ed.selection.getBookmark(1); + }); + + c.onHideMenu.add(function() { + if (bm) { + ed.selection.moveToBookmark(bm); + bm = 0; + } + }); + } + + return t.add(c); + }, + + createToolbar : function(id, s, cc) { + var c, t = this, cls; + + id = t.prefix + id; + cls = cc || t._cls.toolbar || tinymce.ui.Toolbar; + c = new cls(id, s, t.editor); + + if (t.get(id)) + return null; + + return t.add(c); + }, + + createToolbarGroup : function(id, s, cc) { + var c, t = this, cls; + id = t.prefix + id; + cls = cc || this._cls.toolbarGroup || tinymce.ui.ToolbarGroup; + c = new cls(id, s, t.editor); + + if (t.get(id)) + return null; + + return t.add(c); + }, + + createSeparator : function(cc) { + var cls = cc || this._cls.separator || tinymce.ui.Separator; + + return new cls(); + }, + + setControlType : function(n, c) { + return this._cls[n.toLowerCase()] = c; + }, + + destroy : function() { + each(this.controls, function(c) { + c.destroy(); + }); + + this.controls = null; + } + }); +})(tinymce); + +(function(tinymce) { + var Dispatcher = tinymce.util.Dispatcher, each = tinymce.each, isIE = tinymce.isIE, isOpera = tinymce.isOpera; + + tinymce.create('tinymce.WindowManager', { + WindowManager : function(ed) { + var t = this; + + t.editor = ed; + t.onOpen = new Dispatcher(t); + t.onClose = new Dispatcher(t); + t.params = {}; + t.features = {}; + }, + + open : function(s, p) { + var t = this, f = '', x, y, mo = t.editor.settings.dialog_type == 'modal', w, sw, sh, vp = tinymce.DOM.getViewPort(), u; + + // Default some options + s = s || {}; + p = p || {}; + sw = isOpera ? vp.w : screen.width; // Opera uses windows inside the Opera window + sh = isOpera ? vp.h : screen.height; + s.name = s.name || 'mc_' + new Date().getTime(); + s.width = parseInt(s.width || 320); + s.height = parseInt(s.height || 240); + s.resizable = true; + s.left = s.left || parseInt(sw / 2.0) - (s.width / 2.0); + s.top = s.top || parseInt(sh / 2.0) - (s.height / 2.0); + p.inline = false; + p.mce_width = s.width; + p.mce_height = s.height; + p.mce_auto_focus = s.auto_focus; + + if (mo) { + if (isIE) { + s.center = true; + s.help = false; + s.dialogWidth = s.width + 'px'; + s.dialogHeight = s.height + 'px'; + s.scroll = s.scrollbars || false; + } + } + + // Build features string + each(s, function(v, k) { + if (tinymce.is(v, 'boolean')) + v = v ? 'yes' : 'no'; + + if (!/^(name|url)$/.test(k)) { + if (isIE && mo) + f += (f ? ';' : '') + k + ':' + v; + else + f += (f ? ',' : '') + k + '=' + v; + } + }); + + t.features = s; + t.params = p; + t.onOpen.dispatch(t, s, p); + + u = s.url || s.file; + u = tinymce._addVer(u); + + try { + if (isIE && mo) { + w = 1; + window.showModalDialog(u, window, f); + } else + w = window.open(u, s.name, f); + } catch (ex) { + // Ignore + } + + if (!w) + alert(t.editor.getLang('popup_blocked')); + }, + + close : function(w) { + w.close(); + this.onClose.dispatch(this); + }, + + createInstance : function(cl, a, b, c, d, e) { + var f = tinymce.resolve(cl); + + return new f(a, b, c, d, e); + }, + + confirm : function(t, cb, s, w) { + w = w || window; + + cb.call(s || this, w.confirm(this._decode(this.editor.getLang(t, t)))); + }, + + alert : function(tx, cb, s, w) { + var t = this; + + w = w || window; + w.alert(t._decode(t.editor.getLang(tx, tx))); + + if (cb) + cb.call(s || t); + }, + + resizeBy : function(dw, dh, win) { + win.resizeBy(dw, dh); + }, + + // Internal functions + + _decode : function(s) { + return tinymce.DOM.decode(s).replace(/\\n/g, '\n'); + } + }); +}(tinymce)); +(function(tinymce) { + tinymce.Formatter = function(ed) { + var formats = {}, + each = tinymce.each, + dom = ed.dom, + selection = ed.selection, + TreeWalker = tinymce.dom.TreeWalker, + rangeUtils = new tinymce.dom.RangeUtils(dom), + isValid = ed.schema.isValidChild, + isBlock = dom.isBlock, + forcedRootBlock = ed.settings.forced_root_block, + nodeIndex = dom.nodeIndex, + INVISIBLE_CHAR = '\uFEFF', + MCE_ATTR_RE = /^(src|href|style)$/, + FALSE = false, + TRUE = true, + undefined, + pendingFormats = {apply : [], remove : []}; + + function isArray(obj) { + return obj instanceof Array; + }; + + function getParents(node, selector) { + return dom.getParents(node, selector, dom.getRoot()); + }; + + function isCaretNode(node) { + return node.nodeType === 1 && (node.face === 'mceinline' || node.style.fontFamily === 'mceinline'); + }; + + // Public functions + + function get(name) { + return name ? formats[name] : formats; + }; + + function register(name, format) { + if (name) { + if (typeof(name) !== 'string') { + each(name, function(format, name) { + register(name, format); + }); + } else { + // Force format into array and add it to internal collection + format = format.length ? format : [format]; + + each(format, function(format) { + // Set deep to false by default on selector formats this to avoid removing + // alignment on images inside paragraphs when alignment is changed on paragraphs + if (format.deep === undefined) + format.deep = !format.selector; + + // Default to true + if (format.split === undefined) + format.split = !format.selector || format.inline; + + // Default to true + if (format.remove === undefined && format.selector && !format.inline) + format.remove = 'none'; + + // Mark format as a mixed format inline + block level + if (format.selector && format.inline) { + format.mixed = true; + format.block_expand = true; + } + + // Split classes if needed + if (typeof(format.classes) === 'string') + format.classes = format.classes.split(/\s+/); + }); + + formats[name] = format; + } + } + }; + + var getTextDecoration = function(node) { + var decoration; + + ed.dom.getParent(node, function(n) { + decoration = ed.dom.getStyle(n, 'text-decoration'); + return decoration && decoration !== 'none'; + }); + + return decoration; + }; + + var processUnderlineAndColor = function(node) { + var textDecoration; + if (node.nodeType === 1 && node.parentNode && node.parentNode.nodeType === 1) { + textDecoration = getTextDecoration(node.parentNode); + if (ed.dom.getStyle(node, 'color') && textDecoration) { + ed.dom.setStyle(node, 'text-decoration', textDecoration); + } else if (ed.dom.getStyle(node, 'textdecoration') === textDecoration) { + ed.dom.setStyle(node, 'text-decoration', null); + } + } + }; + + function apply(name, vars, node) { + var formatList = get(name), format = formatList[0], bookmark, rng, i, isCollapsed = selection.isCollapsed(); + + function moveStart(rng) { + var container = rng.startContainer, + offset = rng.startOffset, + walker, node; + + // Move startContainer/startOffset in to a suitable node + if (container.nodeType == 1 || container.nodeValue === "") { + container = container.nodeType == 1 ? container.childNodes[offset] : container; + + // Might fail if the offset is behind the last element in it's container + if (container) { + walker = new TreeWalker(container, container.parentNode); + for (node = walker.current(); node; node = walker.next()) { + if (node.nodeType == 3 && !isWhiteSpaceNode(node)) { + rng.setStart(node, 0); + break; + } + } + } + } + + return rng; + }; + + function setElementFormat(elm, fmt) { + fmt = fmt || format; + + if (elm) { + each(fmt.styles, function(value, name) { + dom.setStyle(elm, name, replaceVars(value, vars)); + }); + + each(fmt.attributes, function(value, name) { + dom.setAttrib(elm, name, replaceVars(value, vars)); + }); + + each(fmt.classes, function(value) { + value = replaceVars(value, vars); + + if (!dom.hasClass(elm, value)) + dom.addClass(elm, value); + }); + } + }; + + function applyRngStyle(rng) { + var newWrappers = [], wrapName, wrapElm; + + // Setup wrapper element + wrapName = format.inline || format.block; + wrapElm = dom.create(wrapName); + setElementFormat(wrapElm); + + rangeUtils.walk(rng, function(nodes) { + var currentWrapElm; + + function process(node) { + var nodeName = node.nodeName.toLowerCase(), parentName = node.parentNode.nodeName.toLowerCase(), found; + + // Stop wrapping on br elements + if (isEq(nodeName, 'br')) { + currentWrapElm = 0; + + // Remove any br elements when we wrap things + if (format.block) + dom.remove(node); + + return; + } + + // If node is wrapper type + if (format.wrapper && matchNode(node, name, vars)) { + currentWrapElm = 0; + return; + } + + // Can we rename the block + if (format.block && !format.wrapper && isTextBlock(nodeName)) { + node = dom.rename(node, wrapName); + setElementFormat(node); + newWrappers.push(node); + currentWrapElm = 0; + return; + } + + // Handle selector patterns + if (format.selector) { + // Look for matching formats + each(formatList, function(format) { + // Check collapsed state if it exists + if ('collapsed' in format && format.collapsed !== isCollapsed) { + return; + } + + if (dom.is(node, format.selector) && !isCaretNode(node)) { + setElementFormat(node, format); + found = true; + } + }); + + // Continue processing if a selector match wasn't found and a inline element is defined + if (!format.inline || found) { + currentWrapElm = 0; + return; + } + } + + // Is it valid to wrap this item + if (isValid(wrapName, nodeName) && isValid(parentName, wrapName) && + !(node.nodeType === 3 && node.nodeValue.length === 1 && node.nodeValue.charCodeAt(0) === 65279)) { + // Start wrapping + if (!currentWrapElm) { + // Wrap the node + currentWrapElm = wrapElm.cloneNode(FALSE); + node.parentNode.insertBefore(currentWrapElm, node); + newWrappers.push(currentWrapElm); + } + + currentWrapElm.appendChild(node); + } else { + // Start a new wrapper for possible children + currentWrapElm = 0; + + each(tinymce.grep(node.childNodes), process); + + // End the last wrapper + currentWrapElm = 0; + } + }; + + // Process siblings from range + each(nodes, process); + }); + + // Wrap links inside as well, for example color inside a link when the wrapper is around the link + if (format.wrap_links === false) { + each(newWrappers, function(node) { + function process(node) { + var i, currentWrapElm, children; + + if (node.nodeName === 'A') { + currentWrapElm = wrapElm.cloneNode(FALSE); + newWrappers.push(currentWrapElm); + + children = tinymce.grep(node.childNodes); + for (i = 0; i < children.length; i++) + currentWrapElm.appendChild(children[i]); + + node.appendChild(currentWrapElm); + } + + each(tinymce.grep(node.childNodes), process); + }; + + process(node); + }); + } + + // Cleanup + each(newWrappers, function(node) { + var childCount; + + function getChildCount(node) { + var count = 0; + + each(node.childNodes, function(node) { + if (!isWhiteSpaceNode(node) && !isBookmarkNode(node)) + count++; + }); + + return count; + }; + + function mergeStyles(node) { + var child, clone; + + each(node.childNodes, function(node) { + if (node.nodeType == 1 && !isBookmarkNode(node) && !isCaretNode(node)) { + child = node; + return FALSE; // break loop + } + }); + + // If child was found and of the same type as the current node + if (child && matchName(child, format)) { + clone = child.cloneNode(FALSE); + setElementFormat(clone); + + dom.replace(clone, node, TRUE); + dom.remove(child, 1); + } + + return clone || node; + }; + + childCount = getChildCount(node); + + // Remove empty nodes but only if there is multiple wrappers and they are not block + // elements so never remove single

    since that would remove the currrent empty block element where the caret is at + if ((newWrappers.length > 1 || !isBlock(node)) && childCount === 0) { + dom.remove(node, 1); + return; + } + + if (format.inline || format.wrapper) { + // Merges the current node with it's children of similar type to reduce the number of elements + if (!format.exact && childCount === 1) + node = mergeStyles(node); + + // Remove/merge children + each(formatList, function(format) { + // Merge all children of similar type will move styles from child to parent + // this: text + // will become: text + each(dom.select(format.inline, node), function(child) { + var parent; + + // When wrap_links is set to false we don't want + // to remove the format on children within links + if (format.wrap_links === false) { + parent = child.parentNode; + + do { + if (parent.nodeName === 'A') + return; + } while (parent = parent.parentNode); + } + + removeFormat(format, vars, child, format.exact ? child : null); + }); + }); + + // Remove child if direct parent is of same type + if (matchNode(node.parentNode, name, vars)) { + dom.remove(node, 1); + node = 0; + return TRUE; + } + + // Look for parent with similar style format + if (format.merge_with_parents) { + dom.getParent(node.parentNode, function(parent) { + if (matchNode(parent, name, vars)) { + dom.remove(node, 1); + node = 0; + return TRUE; + } + }); + } + + // Merge next and previous siblings if they are similar texttext becomes texttext + if (node) { + node = mergeSiblings(getNonWhiteSpaceSibling(node), node); + node = mergeSiblings(node, getNonWhiteSpaceSibling(node, TRUE)); + } + } + }); + }; + + if (format) { + if (node) { + rng = dom.createRng(); + + rng.setStartBefore(node); + rng.setEndAfter(node); + + applyRngStyle(expandRng(rng, formatList)); + } else { + if (!isCollapsed || !format.inline || dom.select('td.mceSelected,th.mceSelected').length) { + // Obtain selection node before selection is unselected by applyRngStyle() + var curSelNode = ed.selection.getNode(); + + // Apply formatting to selection + bookmark = selection.getBookmark(); + applyRngStyle(expandRng(selection.getRng(TRUE), formatList)); + + // Colored nodes should be underlined so that the color of the underline matches the text color. + if (format.styles && (format.styles.color || format.styles.textDecoration)) { + tinymce.walk(curSelNode, processUnderlineAndColor, 'childNodes'); + processUnderlineAndColor(curSelNode); + } + + selection.moveToBookmark(bookmark); + selection.setRng(moveStart(selection.getRng(TRUE))); + ed.nodeChanged(); + } else + performCaretAction('apply', name, vars); + } + } + }; + + function remove(name, vars, node) { + var formatList = get(name), format = formatList[0], bookmark, i, rng; + + function moveStart(rng) { + var container = rng.startContainer, + offset = rng.startOffset, + walker, node, nodes, tmpNode; + + // Convert text node into index if possible + if (container.nodeType == 3 && offset >= container.nodeValue.length - 1) { + container = container.parentNode; + offset = nodeIndex(container) + 1; + } + + // Move startContainer/startOffset in to a suitable node + if (container.nodeType == 1) { + nodes = container.childNodes; + container = nodes[Math.min(offset, nodes.length - 1)]; + walker = new TreeWalker(container); + + // If offset is at end of the parent node walk to the next one + if (offset > nodes.length - 1) + walker.next(); + + for (node = walker.current(); node; node = walker.next()) { + if (node.nodeType == 3 && !isWhiteSpaceNode(node)) { + // IE has a "neat" feature where it moves the start node into the closest element + // we can avoid this by inserting an element before it and then remove it after we set the selection + tmpNode = dom.create('a', null, INVISIBLE_CHAR); + node.parentNode.insertBefore(tmpNode, node); + + // Set selection and remove tmpNode + rng.setStart(node, 0); + selection.setRng(rng); + dom.remove(tmpNode); + + return; + } + } + } + }; + + // Merges the styles for each node + function process(node) { + var children, i, l; + + // Grab the children first since the nodelist might be changed + children = tinymce.grep(node.childNodes); + + // Process current node + for (i = 0, l = formatList.length; i < l; i++) { + if (removeFormat(formatList[i], vars, node, node)) + break; + } + + // Process the children + if (format.deep) { + for (i = 0, l = children.length; i < l; i++) + process(children[i]); + } + }; + + function findFormatRoot(container) { + var formatRoot; + + // Find format root + each(getParents(container.parentNode).reverse(), function(parent) { + var format; + + // Find format root element + if (!formatRoot && parent.id != '_start' && parent.id != '_end') { + // Is the node matching the format we are looking for + format = matchNode(parent, name, vars); + if (format && format.split !== false) + formatRoot = parent; + } + }); + + return formatRoot; + }; + + function wrapAndSplit(format_root, container, target, split) { + var parent, clone, lastClone, firstClone, i, formatRootParent; + + // Format root found then clone formats and split it + if (format_root) { + formatRootParent = format_root.parentNode; + + for (parent = container.parentNode; parent && parent != formatRootParent; parent = parent.parentNode) { + clone = parent.cloneNode(FALSE); + + for (i = 0; i < formatList.length; i++) { + if (removeFormat(formatList[i], vars, clone, clone)) { + clone = 0; + break; + } + } + + // Build wrapper node + if (clone) { + if (lastClone) + clone.appendChild(lastClone); + + if (!firstClone) + firstClone = clone; + + lastClone = clone; + } + } + + // Never split block elements if the format is mixed + if (split && (!format.mixed || !isBlock(format_root))) + container = dom.split(format_root, container); + + // Wrap container in cloned formats + if (lastClone) { + target.parentNode.insertBefore(lastClone, target); + firstClone.appendChild(target); + } + } + + return container; + }; + + function splitToFormatRoot(container) { + return wrapAndSplit(findFormatRoot(container), container, container, true); + }; + + function unwrap(start) { + var node = dom.get(start ? '_start' : '_end'), + out = node[start ? 'firstChild' : 'lastChild']; + + // If the end is placed within the start the result will be removed + // So this checks if the out node is a bookmark node if it is it + // checks for another more suitable node + if (isBookmarkNode(out)) + out = out[start ? 'firstChild' : 'lastChild']; + + dom.remove(node, true); + + return out; + }; + + function removeRngStyle(rng) { + var startContainer, endContainer; + + rng = expandRng(rng, formatList, TRUE); + + if (format.split) { + startContainer = getContainer(rng, TRUE); + endContainer = getContainer(rng); + + if (startContainer != endContainer) { + // Wrap start/end nodes in span element since these might be cloned/moved + startContainer = wrap(startContainer, 'span', {id : '_start', 'data-mce-type' : 'bookmark'}); + endContainer = wrap(endContainer, 'span', {id : '_end', 'data-mce-type' : 'bookmark'}); + + // Split start/end + splitToFormatRoot(startContainer); + splitToFormatRoot(endContainer); + + // Unwrap start/end to get real elements again + startContainer = unwrap(TRUE); + endContainer = unwrap(); + } else + startContainer = endContainer = splitToFormatRoot(startContainer); + + // Update range positions since they might have changed after the split operations + rng.startContainer = startContainer.parentNode; + rng.startOffset = nodeIndex(startContainer); + rng.endContainer = endContainer.parentNode; + rng.endOffset = nodeIndex(endContainer) + 1; + } + + // Remove items between start/end + rangeUtils.walk(rng, function(nodes) { + each(nodes, function(node) { + process(node); + + // Remove parent span if it only contains text-decoration: underline, yet a parent node is also underlined. + if (node.nodeType === 1 && ed.dom.getStyle(node, 'text-decoration') === 'underline' && node.parentNode && getTextDecoration(node.parentNode) === 'underline') { + removeFormat({'deep': false, 'exact': true, 'inline': 'span', 'styles': {'textDecoration' : 'underline'}}, null, node); + } + }); + }); + }; + + // Handle node + if (node) { + rng = dom.createRng(); + rng.setStartBefore(node); + rng.setEndAfter(node); + removeRngStyle(rng); + return; + } + + if (!selection.isCollapsed() || !format.inline || dom.select('td.mceSelected,th.mceSelected').length) { + bookmark = selection.getBookmark(); + removeRngStyle(selection.getRng(TRUE)); + selection.moveToBookmark(bookmark); + + // Check if start element still has formatting then we are at: "text|text" and need to move the start into the next text node + if (match(name, vars, selection.getStart())) { + moveStart(selection.getRng(true)); + } + + ed.nodeChanged(); + } else + performCaretAction('remove', name, vars); + }; + + function toggle(name, vars, node) { + var fmt = get(name); + + if (match(name, vars, node) && (!('toggle' in fmt[0]) || fmt[0]['toggle'])) + remove(name, vars, node); + else + apply(name, vars, node); + }; + + function matchNode(node, name, vars, similar) { + var formatList = get(name), format, i, classes; + + function matchItems(node, format, item_name) { + var key, value, items = format[item_name], i; + + // Check all items + if (items) { + // Non indexed object + if (items.length === undefined) { + for (key in items) { + if (items.hasOwnProperty(key)) { + if (item_name === 'attributes') + value = dom.getAttrib(node, key); + else + value = getStyle(node, key); + + if (similar && !value && !format.exact) + return; + + if ((!similar || format.exact) && !isEq(value, replaceVars(items[key], vars))) + return; + } + } + } else { + // Only one match needed for indexed arrays + for (i = 0; i < items.length; i++) { + if (item_name === 'attributes' ? dom.getAttrib(node, items[i]) : getStyle(node, items[i])) + return format; + } + } + } + + return format; + }; + + if (formatList && node) { + // Check each format in list + for (i = 0; i < formatList.length; i++) { + format = formatList[i]; + + // Name name, attributes, styles and classes + if (matchName(node, format) && matchItems(node, format, 'attributes') && matchItems(node, format, 'styles')) { + // Match classes + if (classes = format.classes) { + for (i = 0; i < classes.length; i++) { + if (!dom.hasClass(node, classes[i])) + return; + } + } + + return format; + } + } + } + }; + + function match(name, vars, node) { + var startNode, i; + + function matchParents(node) { + // Find first node with similar format settings + node = dom.getParent(node, function(node) { + return !!matchNode(node, name, vars, true); + }); + + // Do an exact check on the similar format element + return matchNode(node, name, vars); + }; + + // Check specified node + if (node) + return matchParents(node); + + // Check pending formats + if (selection.isCollapsed()) { + for (i = pendingFormats.apply.length - 1; i >= 0; i--) { + if (pendingFormats.apply[i].name == name) + return true; + } + + for (i = pendingFormats.remove.length - 1; i >= 0; i--) { + if (pendingFormats.remove[i].name == name) + return false; + } + + return matchParents(selection.getNode()); + } + + // Check selected node + node = selection.getNode(); + if (matchParents(node)) + return TRUE; + + // Check start node if it's different + startNode = selection.getStart(); + if (startNode != node) { + if (matchParents(startNode)) + return TRUE; + } + + return FALSE; + }; + + function matchAll(names, vars) { + var startElement, matchedFormatNames = [], checkedMap = {}, i, ni, name; + + // If the selection is collapsed then check pending formats + if (selection.isCollapsed()) { + for (ni = 0; ni < names.length; ni++) { + // If the name is to be removed, then stop it from being added + for (i = pendingFormats.remove.length - 1; i >= 0; i--) { + name = names[ni]; + + if (pendingFormats.remove[i].name == name) { + checkedMap[name] = true; + break; + } + } + } + + // If the format is to be applied + for (i = pendingFormats.apply.length - 1; i >= 0; i--) { + for (ni = 0; ni < names.length; ni++) { + name = names[ni]; + + if (!checkedMap[name] && pendingFormats.apply[i].name == name) { + checkedMap[name] = true; + matchedFormatNames.push(name); + } + } + } + } + + // Check start of selection for formats + startElement = selection.getStart(); + dom.getParent(startElement, function(node) { + var i, name; + + for (i = 0; i < names.length; i++) { + name = names[i]; + + if (!checkedMap[name] && matchNode(node, name, vars)) { + checkedMap[name] = true; + matchedFormatNames.push(name); + } + } + }); + + return matchedFormatNames; + }; + + function canApply(name) { + var formatList = get(name), startNode, parents, i, x, selector; + + if (formatList) { + startNode = selection.getStart(); + parents = getParents(startNode); + + for (x = formatList.length - 1; x >= 0; x--) { + selector = formatList[x].selector; + + // Format is not selector based, then always return TRUE + if (!selector) + return TRUE; + + for (i = parents.length - 1; i >= 0; i--) { + if (dom.is(parents[i], selector)) + return TRUE; + } + } + } + + return FALSE; + }; + + // Expose to public + tinymce.extend(this, { + get : get, + register : register, + apply : apply, + remove : remove, + toggle : toggle, + match : match, + matchAll : matchAll, + matchNode : matchNode, + canApply : canApply + }); + + // Private functions + + function matchName(node, format) { + // Check for inline match + if (isEq(node, format.inline)) + return TRUE; + + // Check for block match + if (isEq(node, format.block)) + return TRUE; + + // Check for selector match + if (format.selector) + return dom.is(node, format.selector); + }; + + function isEq(str1, str2) { + str1 = str1 || ''; + str2 = str2 || ''; + + str1 = '' + (str1.nodeName || str1); + str2 = '' + (str2.nodeName || str2); + + return str1.toLowerCase() == str2.toLowerCase(); + }; + + function getStyle(node, name) { + var styleVal = dom.getStyle(node, name); + + // Force the format to hex + if (name == 'color' || name == 'backgroundColor') + styleVal = dom.toHex(styleVal); + + // Opera will return bold as 700 + if (name == 'fontWeight' && styleVal == 700) + styleVal = 'bold'; + + return '' + styleVal; + }; + + function replaceVars(value, vars) { + if (typeof(value) != "string") + value = value(vars); + else if (vars) { + value = value.replace(/%(\w+)/g, function(str, name) { + return vars[name] || str; + }); + } + + return value; + }; + + function isWhiteSpaceNode(node) { + return node && node.nodeType === 3 && /^([\s\r\n]+|)$/.test(node.nodeValue); + }; + + function wrap(node, name, attrs) { + var wrapper = dom.create(name, attrs); + + node.parentNode.insertBefore(wrapper, node); + wrapper.appendChild(node); + + return wrapper; + }; + + function expandRng(rng, format, remove) { + var startContainer = rng.startContainer, + startOffset = rng.startOffset, + endContainer = rng.endContainer, + endOffset = rng.endOffset, sibling, lastIdx, leaf; + + // This function walks up the tree if there is no siblings before/after the node + function findParentContainer(container, child_name, sibling_name, root) { + var parent, child; + + root = root || dom.getRoot(); + + for (;;) { + // Check if we can move up are we at root level or body level + parent = container.parentNode; + + // Stop expanding on block elements or root depending on format + if (parent == root || (!format[0].block_expand && isBlock(parent))) + return container; + + for (sibling = parent[child_name]; sibling && sibling != container; sibling = sibling[sibling_name]) { + if (sibling.nodeType == 1 && !isBookmarkNode(sibling)) + return container; + + if (sibling.nodeType == 3 && !isWhiteSpaceNode(sibling)) + return container; + } + + container = container.parentNode; + } + + return container; + }; + + // This function walks down the tree to find the leaf at the selection. + // The offset is also returned as if node initially a leaf, the offset may be in the middle of the text node. + function findLeaf(node, offset) { + if (offset === undefined) + offset = node.nodeType === 3 ? node.length : node.childNodes.length; + while (node && node.hasChildNodes()) { + node = node.childNodes[offset]; + if (node) + offset = node.nodeType === 3 ? node.length : node.childNodes.length; + } + return { node: node, offset: offset }; + } + + // If index based start position then resolve it + if (startContainer.nodeType == 1 && startContainer.hasChildNodes()) { + lastIdx = startContainer.childNodes.length - 1; + startContainer = startContainer.childNodes[startOffset > lastIdx ? lastIdx : startOffset]; + + if (startContainer.nodeType == 3) + startOffset = 0; + } + + // If index based end position then resolve it + if (endContainer.nodeType == 1 && endContainer.hasChildNodes()) { + lastIdx = endContainer.childNodes.length - 1; + endContainer = endContainer.childNodes[endOffset > lastIdx ? lastIdx : endOffset - 1]; + + if (endContainer.nodeType == 3) + endOffset = endContainer.nodeValue.length; + } + + // Exclude bookmark nodes if possible + if (isBookmarkNode(startContainer.parentNode)) + startContainer = startContainer.parentNode; + + if (isBookmarkNode(startContainer)) + startContainer = startContainer.nextSibling || startContainer; + + if (isBookmarkNode(endContainer.parentNode)) { + endOffset = dom.nodeIndex(endContainer); + endContainer = endContainer.parentNode; + } + + if (isBookmarkNode(endContainer) && endContainer.previousSibling) { + endContainer = endContainer.previousSibling; + endOffset = endContainer.length; + } + + if (format[0].inline) { + // Avoid applying formatting to a trailing space. + leaf = findLeaf(endContainer, endOffset); + if (leaf.node) { + while (leaf.node && leaf.offset === 0 && leaf.node.previousSibling) + leaf = findLeaf(leaf.node.previousSibling); + + if (leaf.node && leaf.offset > 0 && leaf.node.nodeType === 3 && + leaf.node.nodeValue.charAt(leaf.offset - 1) === ' ') { + + if (leaf.offset > 1) { + endContainer = leaf.node; + endContainer.splitText(leaf.offset - 1); + } else if (leaf.node.previousSibling) { + endContainer = leaf.node.previousSibling; + } + } + } + } + + // Move start/end point up the tree if the leaves are sharp and if we are in different containers + // Example * becomes !: !

    *texttext*

    ! + // This will reduce the number of wrapper elements that needs to be created + // Move start point up the tree + if (format[0].inline || format[0].block_expand) { + startContainer = findParentContainer(startContainer, 'firstChild', 'nextSibling'); + endContainer = findParentContainer(endContainer, 'lastChild', 'previousSibling'); + } + + // Expand start/end container to matching selector + if (format[0].selector && format[0].expand !== FALSE && !format[0].inline) { + function findSelectorEndPoint(container, sibling_name) { + var parents, i, y, curFormat; + + if (container.nodeType == 3 && container.nodeValue.length == 0 && container[sibling_name]) + container = container[sibling_name]; + + parents = getParents(container); + for (i = 0; i < parents.length; i++) { + for (y = 0; y < format.length; y++) { + curFormat = format[y]; + + // If collapsed state is set then skip formats that doesn't match that + if ("collapsed" in curFormat && curFormat.collapsed !== rng.collapsed) + continue; + + if (dom.is(parents[i], curFormat.selector)) + return parents[i]; + } + } + + return container; + }; + + // Find new startContainer/endContainer if there is better one + startContainer = findSelectorEndPoint(startContainer, 'previousSibling'); + endContainer = findSelectorEndPoint(endContainer, 'nextSibling'); + } + + // Expand start/end container to matching block element or text node + if (format[0].block || format[0].selector) { + function findBlockEndPoint(container, sibling_name, sibling_name2) { + var node; + + // Expand to block of similar type + if (!format[0].wrapper) + node = dom.getParent(container, format[0].block); + + // Expand to first wrappable block element or any block element + if (!node) + node = dom.getParent(container.nodeType == 3 ? container.parentNode : container, isBlock); + + // Exclude inner lists from wrapping + if (node && format[0].wrapper) + node = getParents(node, 'ul,ol').reverse()[0] || node; + + // Didn't find a block element look for first/last wrappable element + if (!node) { + node = container; + + while (node[sibling_name] && !isBlock(node[sibling_name])) { + node = node[sibling_name]; + + // Break on BR but include it will be removed later on + // we can't remove it now since we need to check if it can be wrapped + if (isEq(node, 'br')) + break; + } + } + + return node || container; + }; + + // Find new startContainer/endContainer if there is better one + startContainer = findBlockEndPoint(startContainer, 'previousSibling'); + endContainer = findBlockEndPoint(endContainer, 'nextSibling'); + + // Non block element then try to expand up the leaf + if (format[0].block) { + if (!isBlock(startContainer)) + startContainer = findParentContainer(startContainer, 'firstChild', 'nextSibling'); + + if (!isBlock(endContainer)) + endContainer = findParentContainer(endContainer, 'lastChild', 'previousSibling'); + } + } + + // Setup index for startContainer + if (startContainer.nodeType == 1) { + startOffset = nodeIndex(startContainer); + startContainer = startContainer.parentNode; + } + + // Setup index for endContainer + if (endContainer.nodeType == 1) { + endOffset = nodeIndex(endContainer) + 1; + endContainer = endContainer.parentNode; + } + + // Return new range like object + return { + startContainer : startContainer, + startOffset : startOffset, + endContainer : endContainer, + endOffset : endOffset + }; + } + + function removeFormat(format, vars, node, compare_node) { + var i, attrs, stylesModified; + + // Check if node matches format + if (!matchName(node, format)) + return FALSE; + + // Should we compare with format attribs and styles + if (format.remove != 'all') { + // Remove styles + each(format.styles, function(value, name) { + value = replaceVars(value, vars); + + // Indexed array + if (typeof(name) === 'number') { + name = value; + compare_node = 0; + } + + if (!compare_node || isEq(getStyle(compare_node, name), value)) + dom.setStyle(node, name, ''); + + stylesModified = 1; + }); + + // Remove style attribute if it's empty + if (stylesModified && dom.getAttrib(node, 'style') == '') { + node.removeAttribute('style'); + node.removeAttribute('data-mce-style'); + } + + // Remove attributes + each(format.attributes, function(value, name) { + var valueOut; + + value = replaceVars(value, vars); + + // Indexed array + if (typeof(name) === 'number') { + name = value; + compare_node = 0; + } + + if (!compare_node || isEq(dom.getAttrib(compare_node, name), value)) { + // Keep internal classes + if (name == 'class') { + value = dom.getAttrib(node, name); + if (value) { + // Build new class value where everything is removed except the internal prefixed classes + valueOut = ''; + each(value.split(/\s+/), function(cls) { + if (/mce\w+/.test(cls)) + valueOut += (valueOut ? ' ' : '') + cls; + }); + + // We got some internal classes left + if (valueOut) { + dom.setAttrib(node, name, valueOut); + return; + } + } + } + + // IE6 has a bug where the attribute doesn't get removed correctly + if (name == "class") + node.removeAttribute('className'); + + // Remove mce prefixed attributes + if (MCE_ATTR_RE.test(name)) + node.removeAttribute('data-mce-' + name); + + node.removeAttribute(name); + } + }); + + // Remove classes + each(format.classes, function(value) { + value = replaceVars(value, vars); + + if (!compare_node || dom.hasClass(compare_node, value)) + dom.removeClass(node, value); + }); + + // Check for non internal attributes + attrs = dom.getAttribs(node); + for (i = 0; i < attrs.length; i++) { + if (attrs[i].nodeName.indexOf('_') !== 0) + return FALSE; + } + } + + // Remove the inline child if it's empty for example or + if (format.remove != 'none') { + removeNode(node, format); + return TRUE; + } + }; + + function removeNode(node, format) { + var parentNode = node.parentNode, rootBlockElm; + + if (format.block) { + if (!forcedRootBlock) { + function find(node, next, inc) { + node = getNonWhiteSpaceSibling(node, next, inc); + + return !node || (node.nodeName == 'BR' || isBlock(node)); + }; + + // Append BR elements if needed before we remove the block + if (isBlock(node) && !isBlock(parentNode)) { + if (!find(node, FALSE) && !find(node.firstChild, TRUE, 1)) + node.insertBefore(dom.create('br'), node.firstChild); + + if (!find(node, TRUE) && !find(node.lastChild, FALSE, 1)) + node.appendChild(dom.create('br')); + } + } else { + // Wrap the block in a forcedRootBlock if we are at the root of document + if (parentNode == dom.getRoot()) { + if (!format.list_block || !isEq(node, format.list_block)) { + each(tinymce.grep(node.childNodes), function(node) { + if (isValid(forcedRootBlock, node.nodeName.toLowerCase())) { + if (!rootBlockElm) + rootBlockElm = wrap(node, forcedRootBlock); + else + rootBlockElm.appendChild(node); + } else + rootBlockElm = 0; + }); + } + } + } + } + + // Never remove nodes that isn't the specified inline element if a selector is specified too + if (format.selector && format.inline && !isEq(format.inline, node)) + return; + + dom.remove(node, 1); + }; + + function getNonWhiteSpaceSibling(node, next, inc) { + if (node) { + next = next ? 'nextSibling' : 'previousSibling'; + + for (node = inc ? node : node[next]; node; node = node[next]) { + if (node.nodeType == 1 || !isWhiteSpaceNode(node)) + return node; + } + } + }; + + function isBookmarkNode(node) { + return node && node.nodeType == 1 && node.getAttribute('data-mce-type') == 'bookmark'; + }; + + function mergeSiblings(prev, next) { + var marker, sibling, tmpSibling; + + function compareElements(node1, node2) { + // Not the same name + if (node1.nodeName != node2.nodeName) + return FALSE; + + function getAttribs(node) { + var attribs = {}; + + each(dom.getAttribs(node), function(attr) { + var name = attr.nodeName.toLowerCase(); + + // Don't compare internal attributes or style + if (name.indexOf('_') !== 0 && name !== 'style') + attribs[name] = dom.getAttrib(node, name); + }); + + return attribs; + }; + + function compareObjects(obj1, obj2) { + var value, name; + + for (name in obj1) { + // Obj1 has item obj2 doesn't have + if (obj1.hasOwnProperty(name)) { + value = obj2[name]; + + // Obj2 doesn't have obj1 item + if (value === undefined) + return FALSE; + + // Obj2 item has a different value + if (obj1[name] != value) + return FALSE; + + // Delete similar value + delete obj2[name]; + } + } + + // Check if obj 2 has something obj 1 doesn't have + for (name in obj2) { + // Obj2 has item obj1 doesn't have + if (obj2.hasOwnProperty(name)) + return FALSE; + } + + return TRUE; + }; + + // Attribs are not the same + if (!compareObjects(getAttribs(node1), getAttribs(node2))) + return FALSE; + + // Styles are not the same + if (!compareObjects(dom.parseStyle(dom.getAttrib(node1, 'style')), dom.parseStyle(dom.getAttrib(node2, 'style')))) + return FALSE; + + return TRUE; + }; + + // Check if next/prev exists and that they are elements + if (prev && next) { + function findElementSibling(node, sibling_name) { + for (sibling = node; sibling; sibling = sibling[sibling_name]) { + if (sibling.nodeType == 3 && sibling.nodeValue.length !== 0) + return node; + + if (sibling.nodeType == 1 && !isBookmarkNode(sibling)) + return sibling; + } + + return node; + }; + + // If previous sibling is empty then jump over it + prev = findElementSibling(prev, 'previousSibling'); + next = findElementSibling(next, 'nextSibling'); + + // Compare next and previous nodes + if (compareElements(prev, next)) { + // Append nodes between + for (sibling = prev.nextSibling; sibling && sibling != next;) { + tmpSibling = sibling; + sibling = sibling.nextSibling; + prev.appendChild(tmpSibling); + } + + // Remove next node + dom.remove(next); + + // Move children into prev node + each(tinymce.grep(next.childNodes), function(node) { + prev.appendChild(node); + }); + + return prev; + } + } + + return next; + }; + + function isTextBlock(name) { + return /^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(name); + }; + + function getContainer(rng, start) { + var container, offset, lastIdx; + + container = rng[start ? 'startContainer' : 'endContainer']; + offset = rng[start ? 'startOffset' : 'endOffset']; + + if (container.nodeType == 1) { + lastIdx = container.childNodes.length - 1; + + if (!start && offset) + offset--; + + container = container.childNodes[offset > lastIdx ? lastIdx : offset]; + } + + return container; + }; + + function performCaretAction(type, name, vars) { + var i, currentPendingFormats = pendingFormats[type], + otherPendingFormats = pendingFormats[type == 'apply' ? 'remove' : 'apply']; + + function hasPending() { + return pendingFormats.apply.length || pendingFormats.remove.length; + }; + + function resetPending() { + pendingFormats.apply = []; + pendingFormats.remove = []; + }; + + function perform(caret_node) { + // Apply pending formats + each(pendingFormats.apply.reverse(), function(item) { + apply(item.name, item.vars, caret_node); + + // Colored nodes should be underlined so that the color of the underline matches the text color. + if (item.name === 'forecolor' && item.vars.value) + processUnderlineAndColor(caret_node.parentNode); + }); + + // Remove pending formats + each(pendingFormats.remove.reverse(), function(item) { + remove(item.name, item.vars, caret_node); + }); + + dom.remove(caret_node, 1); + resetPending(); + }; + + // Check if it already exists then ignore it + for (i = currentPendingFormats.length - 1; i >= 0; i--) { + if (currentPendingFormats[i].name == name) + return; + } + + currentPendingFormats.push({name : name, vars : vars}); + + // Check if it's in the other type, then remove it + for (i = otherPendingFormats.length - 1; i >= 0; i--) { + if (otherPendingFormats[i].name == name) + otherPendingFormats.splice(i, 1); + } + + // Pending apply or remove formats + if (hasPending()) { + ed.getDoc().execCommand('FontName', false, 'mceinline'); + pendingFormats.lastRng = selection.getRng(); + + // IE will convert the current word + each(dom.select('font,span'), function(node) { + var bookmark; + + if (isCaretNode(node)) { + bookmark = selection.getBookmark(); + perform(node); + selection.moveToBookmark(bookmark); + ed.nodeChanged(); + } + }); + + // Only register listeners once if we need to + if (!pendingFormats.isListening && hasPending()) { + pendingFormats.isListening = true; + + each('onKeyDown,onKeyUp,onKeyPress,onMouseUp'.split(','), function(event) { + ed[event].addToTop(function(ed, e) { + // Do we have pending formats and is the selection moved has moved + if (hasPending() && !tinymce.dom.RangeUtils.compareRanges(pendingFormats.lastRng, selection.getRng())) { + each(dom.select('font,span'), function(node) { + var textNode, rng; + + // Look for marker + if (isCaretNode(node)) { + textNode = node.firstChild; + + if (textNode) { + perform(node); + + rng = dom.createRng(); + rng.setStart(textNode, textNode.nodeValue.length); + rng.setEnd(textNode, textNode.nodeValue.length); + selection.setRng(rng); + ed.nodeChanged(); + } else + dom.remove(node); + } + }); + + // Always unbind and clear pending styles on keyup + if (e.type == 'keyup' || e.type == 'mouseup') + resetPending(); + } + }); + }); + } + } + }; + }; +})(tinymce); + +tinymce.onAddEditor.add(function(tinymce, ed) { + var filters, fontSizes, dom, settings = ed.settings; + + if (settings.inline_styles) { + fontSizes = tinymce.explode(settings.font_size_style_values); + + function replaceWithSpan(node, styles) { + tinymce.each(styles, function(value, name) { + if (value) + dom.setStyle(node, name, value); + }); + + dom.rename(node, 'span'); + }; + + filters = { + font : function(dom, node) { + replaceWithSpan(node, { + backgroundColor : node.style.backgroundColor, + color : node.color, + fontFamily : node.face, + fontSize : fontSizes[parseInt(node.size) - 1] + }); + }, + + u : function(dom, node) { + replaceWithSpan(node, { + textDecoration : 'underline' + }); + }, + + strike : function(dom, node) { + replaceWithSpan(node, { + textDecoration : 'line-through' + }); + } + }; + + function convert(editor, params) { + dom = editor.dom; + + if (settings.convert_fonts_to_spans) { + tinymce.each(dom.select('font,u,strike', params.node), function(node) { + filters[node.nodeName.toLowerCase()](ed.dom, node); + }); + } + }; + + ed.onPreProcess.add(convert); + ed.onSetContent.add(convert); + + ed.onInit.add(function() { + ed.selection.onSetContent.add(convert); + }); + } +}); + diff --git a/include/javascript/tiny_mce/tiny_mce_popup.js b/include/javascript/tiny_mce/tiny_mce_popup.js index 1f88b44b..f859d24e 100644 --- a/include/javascript/tiny_mce/tiny_mce_popup.js +++ b/include/javascript/tiny_mce/tiny_mce_popup.js @@ -1,294 +1,5 @@ -//Some global instances, this will be filled later -var tinymce = null, tinyMCEPopup, tinyMCE = null, tinyMCELang = null; -tinyMCEPopup = { - init : function() { - var t = this, w, ti, li, q, i, it; +// Uncomment and change this document.domain value if you are loading the script cross subdomains +// document.domain = 'moxiecode.com'; - li = ('' + document.location.search).replace(/^\?/, '').split('&'); - q = {}; - for (i=0; i'); - tinymce.ScriptLoader.markDone(u); - } - } - }, - - pickColor : function(e, element_id) { - this.execCommand('mceColorPicker', true, { - color : document.getElementById(element_id).value, - func : function(c) { - document.getElementById(element_id).value = c; - - try { - document.getElementById(element_id).onchange(); - } catch (ex) { - // Try fire event, ignore errors - } - } - }); - }, - - openBrowser : function(element_id, type, option) { - tinyMCEPopup.restoreSelection(); - this.editor.execCallback('file_browser_callback', element_id, document.getElementById(element_id).value, type, window); - }, - - confirm : function(t, cb, s) { - this.editor.windowManager.confirm(t, cb, s, window); - }, - - alert : function(tx, cb, s) { - this.editor.windowManager.alert(tx, cb, s, window); - }, - - close : function() { - var t = this; - - // To avoid domain relaxing issue in Opera - function close() { - t.editor.windowManager.close(window); - tinymce = tinyMCE = t.editor = t.params = t.dom = t.dom.doc = null; // Cleanup - }; - - if (tinymce.isOpera) - t.getWin().setTimeout(close, 0); - else - close(); - }, - - // Internal functions - - _restoreSelection : function() { - var e = window.event.srcElement; - - if (e.nodeName == 'INPUT' && (e.type == 'submit' || e.type == 'button')) - tinyMCEPopup.restoreSelection(); - }, - -/* _restoreSelection : function() { - var e = window.event.srcElement; - - // If user focus a non text input or textarea - if ((e.nodeName != 'INPUT' && e.nodeName != 'TEXTAREA') || e.type != 'text') - tinyMCEPopup.restoreSelection(); - },*/ - - _onDOMLoaded : function() { - var t = this, ti = document.title, bm, h, nv; - - // Translate page - if (t.features.translate_i18n !== false) { - h = document.body.innerHTML; - - // Replace a=x with a="x" in IE - if (tinymce.isIE) - h = h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi, ' $1="$2"') - - document.dir = t.editor.getParam('directionality',''); - - if ((nv = t.editor.translate(h)) && nv != h) - document.body.innerHTML = nv; - - if ((nv = t.editor.translate(ti)) && nv != ti) - document.title = ti = nv; - } - - document.body.style.display = ''; - - // Restore selection in IE when focus is placed on a non textarea or input element of the type text - if (tinymce.isIE) - document.attachEvent('onmouseup', tinyMCEPopup._restoreSelection); - - t.restoreSelection(); - t.resizeToInnerSize(); - - // Set inline title - if (!t.isWindow) - t.editor.windowManager.setTitle(window, ti); - else - window.focus(); - - if (!tinymce.isIE && !t.isWindow) { - tinymce.dom.Event._add(document, 'focus', function() { - t.editor.windowManager.focus(t.id) - }); - } - - // Patch for accessibility - tinymce.each(t.dom.select('select'), function(e) { - e.onkeydown = tinyMCEPopup._accessHandler; - }); - - // Call onInit - // Init must be called before focus so the selection won't get lost by the focus call - tinymce.each(t.listeners, function(o) { - o.func.call(o.scope, t.editor); - }); - - // Move focus to window - if (t.getWindowArg('mce_auto_focus', true)) { - window.focus(); - - // Focus element with mceFocus class - tinymce.each(document.forms, function(f) { - tinymce.each(f.elements, function(e) { - if (t.dom.hasClass(e, 'mceFocus') && !e.disabled) { - e.focus(); - return false; // Break loop - } - }); - }); - } - - document.onkeyup = tinyMCEPopup._closeWinKeyHandler; - }, - - _accessHandler : function(e) { - e = e || window.event; - - if (e.keyCode == 13 || e.keyCode == 32) { - e = e.target || e.srcElement; - - if (e.onchange) - e.onchange(); - - return tinymce.dom.Event.cancel(e); - } - }, - - _closeWinKeyHandler : function(e) { - e = e || window.event; - - if (e.keyCode == 27) - tinyMCEPopup.close(); - }, - - _wait : function() { - var t = this, ti; - - if (tinymce.isIE && document.location.protocol != 'https:') { - // Fake DOMContentLoaded on IE - document.write(''; + // Is hidden then return undefined + if (t._isHidden()) + return; - bi = s.body_id || 'tinymce'; - if (bi.indexOf('=') != -1) { - bi = t.getParam('body_id', '', 'hash'); - bi = bi[t.id] || bi; - } + // Registred commands + if (o = t.queryValueCommands[c]) { + s = o.func.call(o.scope); - bc = s.body_class || ''; - if (bc.indexOf('=') != -1) { - bc = t.getParam('body_class', '', 'hash'); - bc = bc[t.id] || ''; + // Fall though on true + if (s !== true) + return s; } - t.iframeHTML += ''; + // Registred commands + o = t.editorCommands.queryCommandValue(c); + if (is(o)) + return o; - // Domain relaxing enabled, then set document domain - if (tinymce.relaxedDomain) { - // We need to write the contents here in IE since multiple writes messes up refresh button and back button - if (isIE || (tinymce.isOpera && parseFloat(opera.version()) >= 9.5)) - u = 'javascript:(function(){document.open();document.domain="' + document.domain + '";var ed = window.parent.tinyMCE.get("' + t.id + '");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'; - else if (tinymce.isOpera) - u = 'javascript:(function(){document.open();document.domain="' + document.domain + '";document.close();ed.setupIframe();})()'; + // Browser commands + try { + return this.getDoc().queryCommandValue(c); + } catch (ex) { + // Fails sometimes see bug: 1896577 } + }, - // Create iframe - n = DOM.add(o.iframeContainer, 'iframe', { - id : t.id + "_ifr", - src : u || 'javascript:""', // Workaround for HTTPS warning in IE6/7 - frameBorder : '0', - style : { - width : '100%', - height : h - } - }); + show : function() { + var t = this; - t.contentAreaContainer = o.iframeContainer; - DOM.get(o.editorContainer).style.display = t.orgDisplay; - DOM.get(t.id).style.display = 'none'; + DOM.show(t.getContainer()); + DOM.hide(t.id); + t.load(); + }, - // Safari 2.x requires us to wait for the load event and load a real HTML doc - if (tinymce.isOldWebKit) { - Event.add(n, 'load', t.setupIframe, t); - n.src = tinymce.baseURL + '/plugins/safari/blank.htm'; - } else { - if (!isIE || !tinymce.relaxedDomain) - t.setupIframe(); + hide : function() { + var t = this, d = t.getDoc(); - e = n = o = null; // Cleanup - } + // Fixed bug where IE has a blinking cursor left from the editor + if (isIE && d) + d.execCommand('SelectAll'); + + // We must save before we hide so Safari doesn't crash + t.save(); + DOM.hide(t.getContainer()); + DOM.setStyle(t.id, 'display', t.orgDisplay); }, - setupIframe : function() { - var t = this, s = t.settings, e = DOM.get(t.id), d = t.getDoc(), h, b; + isHidden : function() { + return !DOM.isHidden(this.id); + }, - // Setup iframe body - if (!isIE || !tinymce.relaxedDomain) { - d.open(); - d.write(t.iframeHTML); - d.close(); - } + setProgressState : function(b, ti, o) { + this.onSetProgressState.dispatch(this, b, ti, o); - // Design mode needs to be added here Ctrl+A will fail otherwise - if (!isIE) { - try { - if (!s.readonly) - d.designMode = 'On'; - } catch (ex) { - // Will fail on Gecko if the editor is placed in an hidden container element - // The design mode will be set ones the editor is focused - } - } + return b; + }, - // IE needs to use contentEditable or it will display non secure items for HTTPS - if (isIE) { - // It will not steal focus if we hide it while setting contentEditable - b = t.getBody(); - DOM.hide(b); + load : function(o) { + var t = this, e = t.getElement(), h; - if (!s.readonly) - b.contentEditable = true; + if (e) { + o = o || {}; + o.load = true; - DOM.show(b); - } + // Double encode existing entities in the value + h = t.setContent(is(e.value) ? e.value : e.innerHTML, o); + o.element = e; - // Setup objects - t.dom = new tinymce.DOM.DOMUtils(t.getDoc(), { - keep_values : true, - url_converter : t.convertURL, - url_converter_scope : t, - hex_colors : s.force_hex_style_colors, - class_filter : s.class_filter, - update_styles : 1, - fix_ie_paragraphs : 1 - }); + if (!o.no_events) + t.onLoadContent.dispatch(t, o); - t.serializer = new tinymce.dom.Serializer({ - entity_encoding : s.entity_encoding, - entities : s.entities, - valid_elements : s.verify_html === false ? '*[*]' : s.valid_elements, - extended_valid_elements : s.extended_valid_elements, - valid_child_elements : s.valid_child_elements, - invalid_elements : s.invalid_elements, - fix_table_elements : s.fix_table_elements, - fix_list_elements : s.fix_list_elements, - fix_content_duplication : s.fix_content_duplication, - convert_fonts_to_spans : s.convert_fonts_to_spans, - font_size_classes : s.font_size_classes, - font_size_style_values : s.font_size_style_values, - apply_source_formatting : s.apply_source_formatting, - remove_linebreaks : s.remove_linebreaks, - element_format : s.element_format, - dom : t.dom - }); + o.element = e = null; - t.selection = new tinymce.dom.Selection(t.dom, t.getWin(), t.serializer); - t.forceBlocks = new tinymce.ForceBlocks(t, { - forced_root_block : s.forced_root_block - }); - t.editorCommands = new tinymce.EditorCommands(t); + return h; + } + }, - // Pass through - t.serializer.onPreProcess.add(function(se, o) { - return t.onPreProcess.dispatch(t, o, se); - }); + save : function(o) { + var t = this, e = t.getElement(), h, f; - t.serializer.onPostProcess.add(function(se, o) { - return t.onPostProcess.dispatch(t, o, se); - }); + if (!e || !t.initialized) + return; - t.onPreInit.dispatch(t); + o = o || {}; + o.save = true; - if (!s.gecko_spellcheck) - t.getBody().spellcheck = 0; + // Add undo level will trigger onchange event + if (!o.no_events) { + t.undoManager.typing = false; + t.undoManager.add(); + } - if (!s.readonly) - t._addEvents(); + o.element = e; + h = o.content = t.getContent(o); - t.controlManager.onPostRender.dispatch(t, t.controlManager); - t.onPostRender.dispatch(t); + if (!o.no_events) + t.onSaveContent.dispatch(t, o); - if (s.directionality) - t.getBody().dir = s.directionality; + h = o.content; - if (s.nowrap) - t.getBody().style.whiteSpace = "nowrap"; + if (!/TEXTAREA|INPUT/i.test(e.nodeName)) { + e.innerHTML = h; - if (s.auto_resize) - t.onNodeChange.add(t.resizeToContent, t); + // Update hidden form element + if (f = DOM.getParent(t.id, 'form')) { + each(f.elements, function(e) { + if (e.name == t.id) { + e.value = h; + return false; + } + }); + } + } else + e.value = h; - if (s.custom_elements) { - function handleCustom(ed, o) { - each(explode(s.custom_elements), function(v) { - var n; + o.element = e = null; - if (v.indexOf('~') === 0) { - v = v.substring(1); - n = 'span'; - } else - n = 'div'; + return h; + }, - o.content = o.content.replace(new RegExp('<(' + v + ')([^>]*)>', 'g'), '<' + n + ' mce_name="$1"$2>'); - o.content = o.content.replace(new RegExp('', 'g'), ''); - }); - }; + setContent : function(content, args) { + var self = this, rootNode, body = self.getBody(); - t.onBeforeSetContent.add(handleCustom); - t.onPostProcess.add(function(ed, o) { - if (o.set) - handleCustom(ed, o) - }); - } + // Setup args object + args = args || {}; + args.format = args.format || 'html'; + args.set = true; + args.content = content; - if (s.handle_node_change_callback) { - t.onNodeChange.add(function(ed, cm, n) { - t.execCallback('handle_node_change_callback', t.id, n, -1, -1, true, t.selection.isCollapsed()); - }); - } + // Do preprocessing + if (!args.no_events) + self.onBeforeSetContent.dispatch(self, args); - if (s.save_callback) { - t.onSaveContent.add(function(ed, o) { - var h = t.execCallback('save_callback', t.id, o.content, t.getBody()); + content = args.content; - if (h) - o.content = h; - }); + // Padd empty content in Gecko and Safari. Commands will otherwise fail on the content + // It will also be impossible to place the caret in the editor unless there is a BR element present + if (!tinymce.isIE && (content.length === 0 || /^\s+$/.test(content))) { + body.innerHTML = '
    '; + return; } - if (s.onchange_callback) { - t.onChange.add(function(ed, l) { - t.execCallback('onchange_callback', t, l); - }); + // Parse and serialize the html + if (args.format !== 'raw') { + content = new tinymce.html.Serializer({}, self.schema).serialize( + self.parser.parse(content) + ); } - if (s.convert_newlines_to_brs) { - t.onBeforeSetContent.add(function(ed, o) { - if (o.initial) - o.content = o.content.replace(/\r?\n/g, '
    '); - }); - } + // Set the new cleaned contents to the editor + args.content = tinymce.trim(content); + self.dom.setHTML(body, args.content); - if (s.fix_nesting && isIE) { - t.onBeforeSetContent.add(function(ed, o) { - o.content = t._fixNesting(o.content); - }); - } + // Do post processing + if (!args.no_events) + self.onSetContent.dispatch(self, args); - if (s.preformatted) { - t.onPostProcess.add(function(ed, o) { - o.content = o.content.replace(/^\s*/, ''); - o.content = o.content.replace(/<\/pre>\s*$/, ''); + return args.content; + }, - if (o.set) - o.content = '
    ' + o.content + '
    '; - }); - } + getContent : function(args) { + var self = this, content; - if (s.verify_css_classes) { - t.serializer.attribValueFilter = function(n, v) { - var s, cl; + // Setup args object + args = args || {}; + args.format = args.format || 'html'; + args.get = true; - if (n == 'class') { - // Build regexp for classes - if (!t.classesRE) { - cl = t.dom.getClasses(); + // Do preprocessing + if (!args.no_events) + self.onBeforeGetContent.dispatch(self, args); - if (cl.length > 0) { - s = ''; + // Get raw contents or by default the cleaned contents + if (args.format == 'raw') + content = self.getBody().innerHTML; + else + content = self.serializer.serialize(self.getBody(), args); - each (cl, function(o) { - s += (s ? '|' : '') + o['class']; - }); + args.content = tinymce.trim(content); - t.classesRE = new RegExp('(' + s + ')', 'gi'); - } - } + // Do post processing + if (!args.no_events) + self.onGetContent.dispatch(self, args); - return !t.classesRE || /(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(v) || t.classesRE.test(v) ? v : ''; - } + return args.content; + }, - return v; - }; - } + isDirty : function() { + var self = this; - if (s.convert_fonts_to_spans) - t._convertFonts(); + return tinymce.trim(self.startContent) != tinymce.trim(self.getContent({format : 'raw', no_events : 1})) && !self.isNotDirty; + }, - if (s.inline_styles) - t._convertInlineElements(); + getContainer : function() { + var t = this; - if (s.cleanup_callback) { - t.onBeforeSetContent.add(function(ed, o) { - o.content = t.execCallback('cleanup_callback', 'insert_to_editor', o.content, o); - }); + if (!t.container) + t.container = DOM.get(t.editorContainer || t.id + '_parent'); - t.onPreProcess.add(function(ed, o) { - if (o.set) - t.execCallback('cleanup_callback', 'insert_to_editor_dom', o.node, o); + return t.container; + }, - if (o.get) - t.execCallback('cleanup_callback', 'get_from_editor_dom', o.node, o); - }); + getContentAreaContainer : function() { + return this.contentAreaContainer; + }, - t.onPostProcess.add(function(ed, o) { - if (o.set) - o.content = t.execCallback('cleanup_callback', 'insert_to_editor', o.content, o); + getElement : function() { + return DOM.get(this.settings.content_element || this.id); + }, - if (o.get) - o.content = t.execCallback('cleanup_callback', 'get_from_editor', o.content, o); - }); - } + getWin : function() { + var t = this, e; - if (s.save_callback) { - t.onGetContent.add(function(ed, o) { - if (o.save) - o.content = t.execCallback('save_callback', t.id, o.content, t.getBody()); - }); - } + if (!t.contentWindow) { + e = DOM.get(t.id + "_ifr"); - if (s.handle_event_callback) { - t.onEvent.add(function(ed, e, o) { - if (t.execCallback('handle_event_callback', e, ed, o) === false) - Event.cancel(e); - }); + if (e) + t.contentWindow = e.contentWindow; } - t.onSetContent.add(function() { - // Safari needs some time, it will crash the browser when a link is created otherwise - // I think this crash issue is resolved in the latest 3.0.4 - //window.setTimeout(function() { - t.addVisual(t.getBody()); - //}, 1); - }); + return t.contentWindow; + }, - // Remove empty contents - if (s.padd_empty_editor) { - t.onPostProcess.add(function(ed, o) { - o.content = o.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
    [\r\n]*)$/, ''); - }); - } + getDoc : function() { + var t = this, w; - if (isGecko && !s.readonly) { - try { - // Design mode must be set here once again to fix a bug where - // Ctrl+A/Delete/Backspace didn't work if the editor was added using mceAddControl then removed then added again - d.designMode = 'Off'; - d.designMode = 'On'; - } catch (ex) { - // Will fail on Gecko if the editor is placed in an hidden container element - // The design mode will be set ones the editor is focused - } + if (!t.contentDocument) { + w = t.getWin(); + + if (w) + t.contentDocument = w.document; } - // A small timeout was needed since firefox will remove. Bug: #1838304 - setTimeout(function () { - if (t.removed) - return; + return t.contentDocument; + }, - t.load({initial : true, format : (s.cleanup_on_startup ? 'html' : 'raw')}); - t.startContent = t.getContent({format : 'raw'}); - t.undoManager.add({initial : true}); - t.initialized = true; + getBody : function() { + return this.bodyElement || this.getDoc().body; + }, - t.onInit.dispatch(t); - t.execCallback('setupcontent_callback', t.id, t.getBody(), t.getDoc()); - t.execCallback('init_instance_callback', t); - t.focus(true); - t.nodeChanged({initial : 1}); + convertURL : function(u, n, e) { + var t = this, s = t.settings; - // Load specified content CSS last - if (s.content_css) { - tinymce.each(explode(s.content_css), function(u) { - t.dom.loadCSS(t.documentBaseURI.toAbsolute(u)); - }); - } + // Use callback instead + if (s.urlconverter_callback) + return t.execCallback('urlconverter_callback', u, e, true, n); - // Handle auto focus - if (s.auto_focus) { - setTimeout(function () { - var ed = EditorManager.get(s.auto_focus); + // Don't convert link href since thats the CSS files that gets loaded into the editor also skip local file URLs + if (!s.convert_urls || (e && e.nodeName == 'LINK') || u.indexOf('file:') === 0) + return u; - ed.selection.select(ed.getBody(), 1); - ed.selection.collapse(1); - ed.getWin().focus(); - }, 100); - } - }, 1); - - e = null; + // Convert to relative + if (s.relative_urls) + return t.documentBaseURI.toRelative(u); + + // Convert to absolute + u = t.documentBaseURI.toAbsolute(u, s.remove_script_host); + + return u; }, - - focus : function(sf) { - var oed, t = this, ce = t.settings.content_editable; + addVisual : function(e) { + var t = this, s = t.settings; - if (!sf) { - // Is not content editable or the selection is outside the area in IE - // the IE statement is needed to avoid bluring if element selections inside layers since - // the layer is like it's own document in IE - if (!ce && (!isIE || t.selection.getNode().ownerDocument != t.getDoc())) - t.getWin().focus(); + e = e || t.getBody(); + + if (!is(t.hasVisual)) + t.hasVisual = s.visual; + + each(t.dom.select('table,a', e), function(e) { + var v; + + switch (e.nodeName) { + case 'TABLE': + v = t.dom.getAttrib(e, 'border'); + + if (!v || v == '0') { + if (t.hasVisual) + t.dom.addClass(e, s.visual_table_class); + else + t.dom.removeClass(e, s.visual_table_class); + } - } + return; - if (EditorManager.activeEditor != t) { - if ((oed = EditorManager.activeEditor) != null) - oed.onDeactivate.dispatch(oed, t); + case 'A': + v = t.dom.getAttrib(e, 'name'); - t.onActivate.dispatch(t, oed); - } + if (v) { + if (t.hasVisual) + t.dom.addClass(e, 'mceItemAnchor'); + else + t.dom.removeClass(e, 'mceItemAnchor'); + } + + return; + } + }); - EditorManager._setActive(t); + t.onVisualAid.dispatch(t, e, t.hasVisual); }, - execCallback : function(n) { - var t = this, f = t.settings[n], s; + remove : function() { + var t = this, e = t.getContainer(); - if (!f) - return; + t.removed = 1; // Cancels post remove event execution + t.hide(); - // Look through lookup - if (t.callbackLookup && (s = t.callbackLookup[n])) { - f = s.func; - s = s.scope; - } + t.execCallback('remove_instance_callback', t); + t.onRemove.dispatch(t); - if (is(f, 'string')) { - s = f.replace(/\.\w+$/, ''); - s = s ? tinymce.resolve(s) : 0; - f = tinymce.resolve(f); - t.callbackLookup = t.callbackLookup || {}; - t.callbackLookup[n] = {func : f, scope : s}; - } + // Clear all execCommand listeners this is required to avoid errors if the editor was removed inside another command + t.onExecCommand.listeners = []; - return f.apply(s || t, Array.prototype.slice.call(arguments, 1)); + tinymce.remove(t); + DOM.remove(e); }, - translate : function(s) { - var c = this.settings.language || 'en', i18n = EditorManager.i18n; + destroy : function(s) { + var t = this; - if (!s) - return ''; + // One time is enough + if (t.destroyed) + return; - return i18n[c + '.' + s] || s.replace(/{\#([^}]+)\}/g, function(a, b) { - return i18n[c + '.' + b] || '{#' + b + '}'; - }); - }, + if (!s) { + tinymce.removeUnload(t.destroy); + tinyMCE.onBeforeUnload.remove(t._beforeUnload); - getLang : function(n, dv) { - return EditorManager.i18n[(this.settings.language || 'en') + '.' + n] || (is(dv) ? dv : '{#' + n + '}'); - }, + // Manual destroy + if (t.theme && t.theme.destroy) + t.theme.destroy(); - getParam : function(n, dv, ty) { - var tr = tinymce.trim, v = is(this.settings[n]) ? this.settings[n] : dv, o; + // Destroy controls, selection and dom + t.controlManager.destroy(); + t.selection.destroy(); + t.dom.destroy(); - if (ty === 'hash') { - o = {}; + // Remove all events - if (is(v, 'string')) { - each(v.indexOf('=') > 0 ? v.split(/[;,](?![^=;,]*(?:[;,]|$))/) : v.split(','), function(v) { - v = v.split('='); + // Don't clear the window or document if content editable + // is enabled since other instances might still be present + if (!t.settings.content_editable) { + Event.clear(t.getWin()); + Event.clear(t.getDoc()); + } - if (v.length > 1) - o[tr(v[0])] = tr(v[1]); - else - o[tr(v[0])] = tr(v); - }); - } else - o = v; + Event.clear(t.getBody()); + Event.clear(t.formElement); + } - return o; + if (t.formElement) { + t.formElement.submit = t.formElement._mceOldSubmit; + t.formElement._mceOldSubmit = null; } - return v; - }, + t.contentAreaContainer = t.formElement = t.container = t.settings.content_element = t.bodyElement = t.contentDocument = t.contentWindow = null; - nodeChanged : function(o) { - var t = this, s = t.selection, n = s.getNode() || t.getBody(); + if (t.selection) + t.selection = t.selection.win = t.selection.dom = t.selection.dom.doc = null; - // Fix for bug #1896577 it seems that this can not be fired while the editor is loading - if (t.initialized) { - t.onNodeChange.dispatch( - t, - o ? o.controlManager || t.controlManager : t.controlManager, - isIE && n.ownerDocument != t.getDoc() ? t.getBody() : n, // Fix for IE initial state - s.isCollapsed(), - o - ); - } + t.destroyed = 1; }, - addButton : function(n, s) { - var t = this; - - t.buttons = t.buttons || {}; - t.buttons[n] = s; - }, + // Internal functions - addCommand : function(n, f, s) { - this.execCommands[n] = {func : f, scope : s || this}; - }, + _addEvents : function() { + // 'focus', 'blur', 'dblclick', 'beforedeactivate', submit, reset + var t = this, i, s = t.settings, dom = t.dom, lo = { + mouseup : 'onMouseUp', + mousedown : 'onMouseDown', + click : 'onClick', + keyup : 'onKeyUp', + keydown : 'onKeyDown', + keypress : 'onKeyPress', + submit : 'onSubmit', + reset : 'onReset', + contextmenu : 'onContextMenu', + dblclick : 'onDblClick', + paste : 'onPaste' // Doesn't work in all browsers yet + }; - addQueryStateHandler : function(n, f, s) { - this.queryStateCommands[n] = {func : f, scope : s || this}; - }, + function eventHandler(e, o) { + var ty = e.type; - addQueryValueHandler : function(n, f, s) { - this.queryValueCommands[n] = {func : f, scope : s || this}; - }, + // Don't fire events when it's removed + if (t.removed) + return; - addShortcut : function(pa, desc, cmd_func, sc) { - var t = this, c; + // Generic event handler + if (t.onEvent.dispatch(t, e, o) !== false) { + // Specific event handler + t[lo[e.fakeType || e.type]].dispatch(t, e, o); + } + }; - if (!t.settings.custom_shortcuts) - return false; + // Add DOM events + each(lo, function(v, k) { + switch (k) { + case 'contextmenu': + dom.bind(t.getDoc(), k, eventHandler); + break; - t.shortcuts = t.shortcuts || {}; + case 'paste': + dom.bind(t.getBody(), k, function(e) { + eventHandler(e); + }); + break; - if (is(cmd_func, 'string')) { - c = cmd_func; + case 'submit': + case 'reset': + dom.bind(t.getElement().form || DOM.getParent(t.id, 'form'), k, eventHandler); + break; - cmd_func = function() { - t.execCommand(c, false, null); - }; - } + default: + dom.bind(s.content_editable ? t.getBody() : t.getDoc(), k, eventHandler); + } + }); - if (is(cmd_func, 'object')) { - c = cmd_func; + dom.bind(s.content_editable ? t.getBody() : (isGecko ? t.getDoc() : t.getWin()), 'focus', function(e) { + t.focus(true); + }); - cmd_func = function() { - t.execCommand(c[0], c[1], c[2]); - }; - } - each(explode(pa), function(pa) { - var o = { - func : cmd_func, - scope : sc || this, - desc : desc, - alt : false, - ctrl : false, - shift : false - }; + // Fixes bug where a specified document_base_uri could result in broken images + // This will also fix drag drop of images in Gecko + if (tinymce.isGecko) { + dom.bind(t.getDoc(), 'DOMNodeInserted', function(e) { + var v; - each(explode(pa, '+'), function(v) { - switch (v) { - case 'alt': - case 'ctrl': - case 'shift': - o[v] = true; - break; + e = e.target; - default: - o.charCode = v.charCodeAt(0); - o.keyCode = v.toUpperCase().charCodeAt(0); - } + if (e.nodeType === 1 && e.nodeName === 'IMG' && (v = e.getAttribute('data-mce-src'))) + e.src = t.documentBaseURI.toAbsolute(v); }); + } - t.shortcuts[(o.ctrl ? 'ctrl' : '') + ',' + (o.alt ? 'alt' : '') + ',' + (o.shift ? 'shift' : '') + ',' + o.keyCode] = o; - }); + // Set various midas options in Gecko + if (isGecko) { + function setOpts() { + var t = this, d = t.getDoc(), s = t.settings; - return true; - }, + if (isGecko && !s.readonly) { + if (t._isHidden()) { + try { + if (!s.content_editable) + d.designMode = 'On'; + } catch (ex) { + // Fails if it's hidden + } + } - execCommand : function(cmd, ui, val, a) { - var t = this, s = 0, o, st; + try { + // Try new Gecko method + d.execCommand("styleWithCSS", 0, false); + } catch (ex) { + // Use old method + if (!t._isHidden()) + try {d.execCommand("useCSS", 0, true);} catch (ex) {} + } - if (!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(cmd) && (!a || !a.skip_focus)) - t.focus(); + if (!s.table_inline_editing) + try {d.execCommand('enableInlineTableEditing', false, false);} catch (ex) {} - o = {}; - t.onBeforeExecCommand.dispatch(t, cmd, ui, val, o); - if (o.terminate) - return false; + if (!s.object_resizing) + try {d.execCommand('enableObjectResizing', false, false);} catch (ex) {} + } + }; - // Command callback - if (t.execCallback('execcommand_callback', t.id, t.selection.getNode(), cmd, ui, val)) { - t.onExecCommand.dispatch(t, cmd, ui, val, a); - return true; + t.onBeforeExecCommand.add(setOpts); + t.onMouseDown.add(setOpts); + } + + // Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250 + // WebKit can't even do simple things like selecting an image + // This also fixes so it's possible to select mceItemAnchors + if (tinymce.isWebKit) { + t.onClick.add(function(ed, e) { + e = e.target; + + // Needs tobe the setBaseAndExtend or it will fail to select floated images + if (e.nodeName == 'IMG' || (e.nodeName == 'A' && dom.hasClass(e, 'mceItemAnchor'))) { + t.selection.getSel().setBaseAndExtent(e, 0, e, 1); + t.nodeChanged(); + } + }); } - // Registred commands - if (o = t.execCommands[cmd]) { - st = o.func.call(o.scope, ui, val); + // Add node change handlers + t.onMouseUp.add(t.nodeChanged); + //t.onClick.add(t.nodeChanged); + t.onKeyUp.add(function(ed, e) { + var c = e.keyCode; - // Fall through on true - if (st !== true) { - t.onExecCommand.dispatch(t, cmd, ui, val, a); - return st; - } - } + if ((c >= 33 && c <= 36) || (c >= 37 && c <= 40) || c == 13 || c == 45 || c == 46 || c == 8 || (tinymce.isMac && (c == 91 || c == 93)) || e.ctrlKey) + t.nodeChanged(); + }); - // Plugin commands - each(t.plugins, function(p) { - if (p.execCommand && p.execCommand(cmd, ui, val)) { - t.onExecCommand.dispatch(t, cmd, ui, val, a); - s = 1; - return false; - } + // Add reset handler + t.onReset.add(function() { + t.setContent(t.startContent, {format : 'raw'}); }); - if (s) - return true; + // Add shortcuts + if (s.custom_shortcuts) { + if (s.custom_undo_redo_keyboard_shortcuts) { + t.addShortcut('ctrl+z', t.getLang('undo_desc'), 'Undo'); + t.addShortcut('ctrl+y', t.getLang('redo_desc'), 'Redo'); + } - // Theme commands - if (t.theme.execCommand && t.theme.execCommand(cmd, ui, val)) { - t.onExecCommand.dispatch(t, cmd, ui, val, a); - return true; - } + // Add default shortcuts for gecko + t.addShortcut('ctrl+b', t.getLang('bold_desc'), 'Bold'); + t.addShortcut('ctrl+i', t.getLang('italic_desc'), 'Italic'); + t.addShortcut('ctrl+u', t.getLang('underline_desc'), 'Underline'); - // Editor commands - if (t.editorCommands.execCommand(cmd, ui, val)) { - t.onExecCommand.dispatch(t, cmd, ui, val, a); - return true; - } + // BlockFormat shortcuts keys + for (i=1; i<=6; i++) + t.addShortcut('ctrl+' + i, '', ['FormatBlock', false, 'h' + i]); - // Browser commands - t.getDoc().execCommand(cmd, ui, val); - t.onExecCommand.dispatch(t, cmd, ui, val, a); - }, + t.addShortcut('ctrl+7', '', ['FormatBlock', false, '

    ']); + t.addShortcut('ctrl+8', '', ['FormatBlock', false, '

    ']); + t.addShortcut('ctrl+9', '', ['FormatBlock', false, '
    ']); - queryCommandState : function(c) { - var t = this, o, s; + function find(e) { + var v = null; - // Is hidden then return undefined - if (t._isHidden()) - return; + if (!e.altKey && !e.ctrlKey && !e.metaKey) + return v; - // Registred commands - if (o = t.queryStateCommands[c]) { - s = o.func.call(o.scope); + each(t.shortcuts, function(o) { + if (tinymce.isMac && o.ctrl != e.metaKey) + return; + else if (!tinymce.isMac && o.ctrl != e.ctrlKey) + return; - // Fall though on true - if (s !== true) - return s; - } + if (o.alt != e.altKey) + return; - // Registred commands - o = t.editorCommands.queryCommandState(c); - if (o !== -1) - return o; + if (o.shift != e.shiftKey) + return; - // Browser commands - try { - return this.getDoc().queryCommandState(c); - } catch (ex) { - // Fails sometimes see bug: 1896577 - } - }, + if (e.keyCode == o.keyCode || (e.charCode && e.charCode == o.charCode)) { + v = o; + return false; + } + }); - queryCommandValue : function(c) { - var t = this, o, s; + return v; + }; - // Is hidden then return undefined - if (t._isHidden()) - return; + t.onKeyUp.add(function(ed, e) { + var o = find(e); - // Registred commands - if (o = t.queryValueCommands[c]) { - s = o.func.call(o.scope); + if (o) + return Event.cancel(e); + }); - // Fall though on true - if (s !== true) - return s; - } + t.onKeyPress.add(function(ed, e) { + var o = find(e); - // Registred commands - o = t.editorCommands.queryCommandValue(c); - if (is(o)) - return o; + if (o) + return Event.cancel(e); + }); - // Browser commands - try { - return this.getDoc().queryCommandValue(c); - } catch (ex) { - // Fails sometimes see bug: 1896577 - } - }, + t.onKeyDown.add(function(ed, e) { + var o = find(e); - show : function() { - var t = this; + if (o) { + o.func.call(o.scope); + return Event.cancel(e); + } + }); + } - DOM.show(t.getContainer()); - DOM.hide(t.id); - t.load(); - }, + if (tinymce.isIE) { + // Fix so resize will only update the width and height attributes not the styles of an image + // It will also block mceItemNoResize items + dom.bind(t.getDoc(), 'controlselect', function(e) { + var re = t.resizeInfo, cb; - hide : function() { - var t = this, d = t.getDoc(); + e = e.target; - // Fixed bug where IE has a blinking cursor left from the editor - if (isIE && d) - d.execCommand('SelectAll'); + // Don't do this action for non image elements + if (e.nodeName !== 'IMG') + return; - // We must save before we hide so Safari doesn't crash - t.save(); - DOM.hide(t.getContainer()); - DOM.setStyle(t.id, 'display', t.orgDisplay); - }, + if (re) + dom.unbind(re.node, re.ev, re.cb); - isHidden : function() { - return !DOM.isHidden(this.id); - }, + if (!dom.hasClass(e, 'mceItemNoResize')) { + ev = 'resizeend'; + cb = dom.bind(e, ev, function(e) { + var v; - setProgressState : function(b, ti, o) { - this.onSetProgressState.dispatch(this, b, ti, o); + e = e.target; - return b; - }, + if (v = dom.getStyle(e, 'width')) { + dom.setAttrib(e, 'width', v.replace(/[^0-9%]+/g, '')); + dom.setStyle(e, 'width', ''); + } - resizeToContent : function() { - var t = this; + if (v = dom.getStyle(e, 'height')) { + dom.setAttrib(e, 'height', v.replace(/[^0-9%]+/g, '')); + dom.setStyle(e, 'height', ''); + } + }); + } else { + ev = 'resizestart'; + cb = dom.bind(e, 'resizestart', Event.cancel, Event); + } - DOM.setStyle(t.id + "_ifr", 'height', t.getBody().scrollHeight); - }, + re = t.resizeInfo = { + node : e, + ev : ev, + cb : cb + }; + }); - load : function(o) { - var t = this, e = t.getElement(), h; + t.onKeyDown.add(function(ed, e) { + var sel; - if (e) { - o = o || {}; - o.load = true; + switch (e.keyCode) { + case 8: + sel = t.getDoc().selection; - h = t.setContent(is(e.value) ? e.value : e.innerHTML, o); - o.element = e; + // Fix IE control + backspace browser bug + if (sel.createRange && sel.createRange().item) { + ed.dom.remove(sel.createRange().item(0)); + return Event.cancel(e); + } + } + }); + } - if (!o.no_events) - t.onLoadContent.dispatch(t, o); + if (tinymce.isOpera) { + t.onClick.add(function(ed, e) { + Event.prevent(e); + }); + } - o.element = e = null; + // Add custom undo/redo handlers + if (s.custom_undo_redo) { + function addUndo() { + t.undoManager.typing = false; + t.undoManager.add(); + }; - return h; - } - }, + dom.bind(t.getDoc(), 'focusout', function(e) { + if (!t.removed && t.undoManager.typing) + addUndo(); + }); - save : function(o) { - var t = this, e = t.getElement(), h, f; + // Add undo level when contents is drag/dropped within the editor + t.dom.bind(t.dom.getRoot(), 'dragend', function(e) { + addUndo(); + }); - if (!e || !t.initialized) - return; + t.onKeyUp.add(function(ed, e) { + var rng, parent, bookmark; + + // Fix for bug #3168, to remove odd ".." nodes from the DOM we need to get/set the HTML of the parent node. + if (isIE && e.keyCode == 8) { + rng = t.selection.getRng(); + if (rng.parentElement) { + parent = rng.parentElement(); + bookmark = t.selection.getBookmark(); + parent.innerHTML = parent.innerHTML; + t.selection.moveToBookmark(bookmark); + } + } - o = o || {}; - o.save = true; + if ((e.keyCode >= 33 && e.keyCode <= 36) || (e.keyCode >= 37 && e.keyCode <= 40) || e.keyCode == 13 || e.keyCode == 45 || e.ctrlKey) + addUndo(); + }); - // Add undo level will trigger onchange event - if (!o.no_events) { - t.undoManager.typing = 0; - t.undoManager.add(); - } + t.onKeyDown.add(function(ed, e) { + var rng, parent, bookmark, keyCode = e.keyCode; + + // IE has a really odd bug where the DOM might include an node that doesn't have + // a proper structure. If you try to access nodeValue it would throw an illegal value exception. + // This seems to only happen when you delete contents and it seems to be avoidable if you refresh the element + // after you delete contents from it. See: #3008923 + if (isIE && keyCode == 46) { + rng = t.selection.getRng(); + + if (rng.parentElement) { + parent = rng.parentElement(); + + if (!t.undoManager.typing) { + t.undoManager.beforeChange(); + t.undoManager.typing = true; + t.undoManager.add(); + } - o.element = e; - h = o.content = t.getContent(o); + // Select next word when ctrl key is used in combo with delete + if (e.ctrlKey) { + rng.moveEnd('word', 1); + rng.select(); + } - if (!o.no_events) - t.onSaveContent.dispatch(t, o); + // Delete contents + t.selection.getSel().clear(); - h = o.content; + // Check if we are within the same parent + if (rng.parentElement() == parent) { + bookmark = t.selection.getBookmark(); - if (!/TEXTAREA|INPUT/i.test(e.nodeName)) { - e.innerHTML = h; + try { + // Update the HTML and hopefully it will remove the artifacts + parent.innerHTML = parent.innerHTML; + } catch (ex) { + // And since it's IE it can sometimes produce an unknown runtime error + } - // Update hidden form element - if (f = DOM.getParent(t.id, 'form')) { - each(f.elements, function(e) { - if (e.name == t.id) { - e.value = h; - return false; - } - }); - } - } else - e.value = h; + // Restore the caret position + t.selection.moveToBookmark(bookmark); + } - o.element = e = null; + // Block the default delete behavior since it might be broken + e.preventDefault(); + return; + } + } - return h; - }, + // Is caracter positon keys left,right,up,down,home,end,pgdown,pgup,enter + if ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode == 13 || keyCode == 45) { + // Add position before enter key is pressed, used by IE since it still uses the default browser behavior + // Todo: Remove this once we normalize enter behavior on IE + if (tinymce.isIE && keyCode == 13) + t.undoManager.beforeChange(); - setContent : function(h, o) { - var t = this; + if (t.undoManager.typing) + addUndo(); - o = o || {}; - o.format = o.format || 'html'; - o.set = true; - o.content = h; + return; + } - if (!o.no_events) - t.onBeforeSetContent.dispatch(t, o); + // If key isn't shift,ctrl,alt,capslock,metakey + if ((keyCode < 16 || keyCode > 20) && keyCode != 224 && keyCode != 91 && !t.undoManager.typing) { + t.undoManager.beforeChange(); + t.undoManager.add(); + t.undoManager.typing = true; + } + }); - // Padd empty content in Gecko and Safari. Commands will otherwise fail on the content - // It will also be impossible to place the caret in the editor unless there is a BR element present - if (!tinymce.isIE && (h.length === 0 || /^\s+$/.test(h))) { - o.content = t.dom.setHTML(t.getBody(), '
    '); - o.format = 'raw'; + t.onMouseDown.add(function() { + if (t.undoManager.typing) + addUndo(); + }); } + + // Bug fix for FireFox keeping styles from end of selection instead of start. + if (tinymce.isGecko) { + function getAttributeApplyFunction() { + var template = t.dom.getAttribs(t.selection.getStart().cloneNode(false)); + + return function() { + var target = t.selection.getStart(); + t.dom.removeAllAttribs(target); + each(template, function(attr) { + target.setAttributeNode(attr.cloneNode(true)); + }); + }; + } - o.content = t.dom.setHTML(t.getBody(), tinymce.trim(o.content)); + function isSelectionAcrossElements() { + var s = t.selection; - if (o.format != 'raw' && t.settings.cleanup) { - o.getInner = true; - o.content = t.dom.setHTML(t.getBody(), t.serializer.serialize(t.getBody(), o)); - } + return !s.isCollapsed() && s.getStart() != s.getEnd(); + } - if (!o.no_events) - t.onSetContent.dispatch(t, o); + t.onKeyPress.add(function(ed, e) { + var applyAttributes; + + if ((e.keyCode == 8 || e.keyCode == 46) && isSelectionAcrossElements()) { + applyAttributes = getAttributeApplyFunction(); + t.getDoc().execCommand('delete', false, null); + applyAttributes(); + + return Event.cancel(e); + } + }); - return o.content; + t.dom.bind(t.getDoc(), 'cut', function(e) { + var applyAttributes; + + if (isSelectionAcrossElements()) { + applyAttributes = getAttributeApplyFunction(); + t.onKeyUp.addToTop(Event.cancel, Event); + + setTimeout(function() { + applyAttributes(); + t.onKeyUp.remove(Event.cancel, Event); + }, 0); + } + }); + } }, - getContent : function(o) { - var t = this, h; + _isHidden : function() { + var s; - o = o || {}; - o.format = o.format || 'html'; - o.get = true; + if (!isGecko) + return 0; - if (!o.no_events) - t.onBeforeGetContent.dispatch(t, o); + // Weird, wheres that cursor selection? + s = this.selection.getSel(); + return (!s || !s.rangeCount || s.rangeCount == 0); + } + }); +})(tinymce); - if (o.format != 'raw' && t.settings.cleanup) { - o.getInner = true; - h = t.serializer.serialize(t.getBody(), o); - } else - h = t.getBody().innerHTML; +(function(tinymce) { + // Added for compression purposes + var each = tinymce.each, undefined, TRUE = true, FALSE = false; - h = h.replace(/^\s*|\s*$/g, ''); - o.content = h; + tinymce.EditorCommands = function(editor) { + var dom = editor.dom, + selection = editor.selection, + commands = {state: {}, exec : {}, value : {}}, + settings = editor.settings, + bookmark; - if (!o.no_events) - t.onGetContent.dispatch(t, o); + function execCommand(command, ui, value) { + var func; - return o.content; - }, + command = command.toLowerCase(); + if (func = commands.exec[command]) { + func(command, ui, value); + return TRUE; + } - isDirty : function() { - var t = this; + return FALSE; + }; - return tinymce.trim(t.startContent) != tinymce.trim(t.getContent({format : 'raw', no_events : 1})) && !t.isNotDirty; - }, + function queryCommandState(command) { + var func; - getContainer : function() { - var t = this; + command = command.toLowerCase(); + if (func = commands.state[command]) + return func(command); - if (!t.container) - t.container = DOM.get(t.editorContainer || t.id + '_parent'); + return -1; + }; - return t.container; - }, + function queryCommandValue(command) { + var func; - getContentAreaContainer : function() { - return this.contentAreaContainer; - }, + command = command.toLowerCase(); + if (func = commands.value[command]) + return func(command); - getElement : function() { - return DOM.get(this.settings.content_element || this.id); - }, + return FALSE; + }; - getWin : function() { - var t = this, e; + function addCommands(command_list, type) { + type = type || 'exec'; - if (!t.contentWindow) { - e = DOM.get(t.id + "_ifr"); + each(command_list, function(callback, command) { + each(command.toLowerCase().split(','), function(command) { + commands[type][command] = callback; + }); + }); + }; - if (e) - t.contentWindow = e.contentWindow; - } + // Expose public methods + tinymce.extend(this, { + execCommand : execCommand, + queryCommandState : queryCommandState, + queryCommandValue : queryCommandValue, + addCommands : addCommands + }); - return t.contentWindow; - }, + // Private methods - getDoc : function() { - var t = this, w; + function execNativeCommand(command, ui, value) { + if (ui === undefined) + ui = FALSE; - if (!t.contentDocument) { - w = t.getWin(); + if (value === undefined) + value = null; - if (w) - t.contentDocument = w.document; - } + return editor.getDoc().execCommand(command, ui, value); + }; - return t.contentDocument; - }, + function isFormatMatch(name) { + return editor.formatter.match(name); + }; - getBody : function() { - return this.bodyElement || this.getDoc().body; - }, + function toggleFormat(name, value) { + editor.formatter.toggle(name, value ? {value : value} : undefined); + }; - convertURL : function(u, n, e) { - var t = this, s = t.settings; + function storeSelection(type) { + bookmark = selection.getBookmark(type); + }; - // Use callback instead - if (s.urlconverter_callback) - return t.execCallback('urlconverter_callback', u, e, true, n); + function restoreSelection() { + selection.moveToBookmark(bookmark); + }; - // Don't convert link href since thats the CSS files that gets loaded into the editor also skip local file URLs - if (!s.convert_urls || (e && e.nodeName == 'LINK') || u.indexOf('file:') === 0) - return u; + // Add execCommand overrides + addCommands({ + // Ignore these, added for compatibility + 'mceResetDesignMode,mceBeginUndoLevel' : function() {}, - // Convert to relative - if (s.relative_urls) - return t.documentBaseURI.toRelative(u); + // Add undo manager logic + 'mceEndUndoLevel,mceAddUndoLevel' : function() { + editor.undoManager.add(); + }, - // Convert to absolute - u = t.documentBaseURI.toAbsolute(u, s.remove_script_host); + 'Cut,Copy,Paste' : function(command) { + var doc = editor.getDoc(), failed; - return u; - }, + // Try executing the native command + try { + execNativeCommand(command); + } catch (ex) { + // Command failed + failed = TRUE; + } - addVisual : function(e) { - var t = this, s = t.settings; + // Present alert message about clipboard access not being available + if (failed || !doc.queryCommandSupported(command)) { + if (tinymce.isGecko) { + editor.windowManager.confirm(editor.getLang('clipboard_msg'), function(state) { + if (state) + open('http://www.mozilla.org/editor/midasdemo/securityprefs.html', '_blank'); + }); + } else + editor.windowManager.alert(editor.getLang('clipboard_no_support')); + } + }, - e = e || t.getBody(); + // Override unlink command + unlink : function(command) { + if (selection.isCollapsed()) + selection.select(selection.getNode()); - if (!is(t.hasVisual)) - t.hasVisual = s.visual; + execNativeCommand(command); + selection.collapse(FALSE); + }, - each(t.dom.select('table,a', e), function(e) { - var v; + // Override justify commands to use the text formatter engine + 'JustifyLeft,JustifyCenter,JustifyRight,JustifyFull' : function(command) { + var align = command.substring(7); - switch (e.nodeName) { - case 'TABLE': - v = t.dom.getAttrib(e, 'border'); + // Remove all other alignments first + each('left,center,right,full'.split(','), function(name) { + if (align != name) + editor.formatter.remove('align' + name); + }); - if (!v || v == '0') { - if (t.hasVisual) - t.dom.addClass(e, s.visual_table_class); - else - t.dom.removeClass(e, s.visual_table_class); - } + toggleFormat('align' + align); + execCommand('mceRepaint'); + }, - return; + // Override list commands to fix WebKit bug + 'InsertUnorderedList,InsertOrderedList' : function(command) { + var listElm, listParent; - case 'A': - v = t.dom.getAttrib(e, 'name'); + execNativeCommand(command); - if (v) { - if (t.hasVisual) - t.dom.addClass(e, 'mceItemAnchor'); - else - t.dom.removeClass(e, 'mceItemAnchor'); - } + // WebKit produces lists within block elements so we need to split them + // we will replace the native list creation logic to custom logic later on + // TODO: Remove this when the list creation logic is removed + listElm = dom.getParent(selection.getNode(), 'ol,ul'); + if (listElm) { + listParent = listElm.parentNode; - return; + // If list is within a text block then split that block + if (/^(H[1-6]|P|ADDRESS|PRE)$/.test(listParent.nodeName)) { + storeSelection(); + dom.split(listParent, listElm); + restoreSelection(); + } } - }); + }, - t.onVisualAid.dispatch(t, e, t.hasVisual); - }, + // Override commands to use the text formatter engine + 'Bold,Italic,Underline,Strikethrough,Superscript,Subscript' : function(command) { + toggleFormat(command); + }, - remove : function() { - var t = this, e = t.getContainer(); + // Override commands to use the text formatter engine + 'ForeColor,HiliteColor,FontName' : function(command, ui, value) { + toggleFormat(command, value); + }, - t.removed = 1; // Cancels post remove event execution - t.hide(); + FontSize : function(command, ui, value) { + var fontClasses, fontSizes; - t.execCallback('remove_instance_callback', t); - t.onRemove.dispatch(t); + // Convert font size 1-7 to styles + if (value >= 1 && value <= 7) { + fontSizes = tinymce.explode(settings.font_size_style_values); + fontClasses = tinymce.explode(settings.font_size_classes); - // Clear all execCommand listeners this is required to avoid errors if the editor was removed inside another command - t.onExecCommand.listeners = []; + if (fontClasses) + value = fontClasses[value - 1] || value; + else + value = fontSizes[value - 1] || value; + } - EditorManager.remove(t); - DOM.remove(e); - }, + toggleFormat(command, value); + }, - destroy : function(s) { - var t = this; + RemoveFormat : function(command) { + editor.formatter.remove(command); + }, - // One time is enough - if (t.destroyed) - return; + mceBlockQuote : function(command) { + toggleFormat('blockquote'); + }, - if (!s) { - tinymce.removeUnload(t.destroy); - tinyMCE.onBeforeUnload.remove(t._beforeUnload); + FormatBlock : function(command, ui, value) { + return toggleFormat(value || 'p'); + }, - // Manual destroy - if (t.theme.destroy) - t.theme.destroy(); + mceCleanup : function() { + var bookmark = selection.getBookmark(); - // Destroy controls, selection and dom - t.controlManager.destroy(); - t.selection.destroy(); - t.dom.destroy(); + editor.setContent(editor.getContent({cleanup : TRUE}), {cleanup : TRUE}); - // Remove all events + selection.moveToBookmark(bookmark); + }, - // Don't clear the window or document if content editable - // is enabled since other instances might still be present - if (!t.settings.content_editable) { - Event.clear(t.getWin()); - Event.clear(t.getDoc()); + mceRemoveNode : function(command, ui, value) { + var node = value || selection.getNode(); + + // Make sure that the body node isn't removed + if (node != editor.getBody()) { + storeSelection(); + editor.dom.remove(node, TRUE); + restoreSelection(); } + }, - Event.clear(t.getBody()); - Event.clear(t.formElement); - } + mceSelectNodeDepth : function(command, ui, value) { + var counter = 0; - if (t.formElement) { - t.formElement.submit = t.formElement._mceOldSubmit; - t.formElement._mceOldSubmit = null; - } + dom.getParent(selection.getNode(), function(node) { + if (node.nodeType == 1 && counter++ == value) { + selection.select(node); + return FALSE; + } + }, editor.getBody()); + }, - t.contentAreaContainer = t.formElement = t.container = t.settings.content_element = t.bodyElement = t.contentDocument = t.contentWindow = null; + mceSelectNode : function(command, ui, value) { + selection.select(value); + }, - if (t.selection) - t.selection = t.selection.win = t.selection.dom = t.selection.dom.doc = null; + mceInsertContent : function(command, ui, value) { + var caretNode, rng, rootNode, parent, node, rng, nodeRect, viewPortRect, args; - t.destroyed = 1; - }, + function findSuitableCaretNode(node, root_node, next) { + var walker = new tinymce.dom.TreeWalker(next ? node.nextSibling : node.previousSibling, root_node); - // Internal functions + while ((node = walker.current())) { + if ((node.nodeType == 3 && tinymce.trim(node.nodeValue).length) || node.nodeName == 'BR' || node.nodeName == 'IMG') + return node; - _addEvents : function() { - // 'focus', 'blur', 'dblclick', 'beforedeactivate', submit, reset - var t = this, i, s = t.settings, lo = { - mouseup : 'onMouseUp', - mousedown : 'onMouseDown', - click : 'onClick', - keyup : 'onKeyUp', - keydown : 'onKeyDown', - keypress : 'onKeyPress', - submit : 'onSubmit', - reset : 'onReset', - contextmenu : 'onContextMenu', - dblclick : 'onDblClick', - paste : 'onPaste' // Doesn't work in all browsers yet - }; + if (next) + walker.next(); + else + walker.prev(); + } + }; - function eventHandler(e, o) { - var ty = e.type; + args = {content: value, format: 'html'}; + selection.onBeforeSetContent.dispatch(selection, args); + value = args.content; - // Don't fire events when it's removed - if (t.removed) - return; + // Add caret at end of contents if it's missing + if (value.indexOf('{$caret}') == -1) + value += '{$caret}'; - // Generic event handler - if (t.onEvent.dispatch(t, e, o) !== false) { - // Specific event handler - t[lo[e.fakeType || e.type]].dispatch(t, e, o); - } - }; + // Set the content at selection to a span and replace it's contents with the value + selection.setContent('\uFEFF', {no_events : false}); + dom.setOuterHTML('__mce', value.replace(/\{\$caret\}/, '\uFEFF')); - // Add DOM events - each(lo, function(v, k) { - switch (k) { - case 'contextmenu': - if (tinymce.isOpera) { - // Fake contextmenu on Opera - Event.add(t.getBody(), 'mousedown', function(e) { - if (e.ctrlKey) { - e.fakeType = 'contextmenu'; - eventHandler(e); - } - }); - } else - Event.add(t.getBody(), k, eventHandler); - break; + caretNode = dom.select('#__mce')[0]; + rootNode = dom.getRoot(); + + // Move the caret into the last suitable location within the previous sibling if it's a block since the block might be split + if (caretNode.previousSibling && dom.isBlock(caretNode.previousSibling) || caretNode.parentNode == rootNode) { + node = findSuitableCaretNode(caretNode, rootNode); + if (node) { + if (node.nodeName == 'BR') + node.parentNode.insertBefore(caretNode, node); + else + dom.insertAfter(caretNode, node); + } + } - case 'paste': - Event.add(t.getBody(), k, function(e) { - var tx, h, el, r; - - // Get plain text data - if (e.clipboardData) - tx = e.clipboardData.getData('text/plain'); - else if (tinymce.isIE) - tx = t.getWin().clipboardData.getData('Text'); - - // Get HTML data - /*if (tinymce.isIE) { - el = DOM.add(DOM.doc.body, 'div', {style : 'visibility:hidden;overflow:hidden;position:absolute;width:1px;height:1px'}); - r = DOM.doc.body.createTextRange(); - r.moveToElementText(el); - r.execCommand('Paste'); - h = el.innerHTML; - DOM.remove(el); - }*/ - - eventHandler(e, {text : tx, html : h}); - }); - break; + // Find caret root parent and clean it up using the serializer to avoid nesting + while (caretNode) { + if (caretNode === rootNode) { + // Clean up the parent element by parsing and serializing it + // This will remove invalid elements/attributes and fix nesting issues + dom.setOuterHTML(parent, + new tinymce.html.Serializer({}, editor.schema).serialize( + editor.parser.parse(dom.getOuterHTML(parent)) + ) + ); - case 'submit': - case 'reset': - Event.add(t.getElement().form || DOM.getParent(t.id, 'form'), k, eventHandler); break; + } - default: - Event.add(s.content_editable ? t.getBody() : t.getDoc(), k, eventHandler); + parent = caretNode; + caretNode = caretNode.parentNode; } - }); - - Event.add(s.content_editable ? t.getBody() : (isGecko ? t.getDoc() : t.getWin()), 'focus', function(e) { - t.focus(true); - }); - - - // Fixes bug where a specified document_base_uri could result in broken images - // This will also fix drag drop of images in Gecko - if (tinymce.isGecko) { - // Convert all images to absolute URLs -/* t.onSetContent.add(function(ed, o) { - each(ed.dom.select('img'), function(e) { - var v; - if (v = e.getAttribute('mce_src')) - e.src = t.documentBaseURI.toAbsolute(v); - }) - });*/ + // Find caret after cleanup and move selection to that location + caretNode = dom.select('#__mce')[0]; + if (caretNode) { + node = findSuitableCaretNode(caretNode, rootNode) || findSuitableCaretNode(caretNode, rootNode, true); + dom.remove(caretNode); - Event.add(t.getDoc(), 'DOMNodeInserted', function(e) { - var v; + if (node) { + rng = dom.createRng(); - e = e.target; + if (node.nodeType == 3) { + rng.setStart(node, node.length); + rng.setEnd(node, node.length); + } else { + if (node.nodeName == 'BR') { + rng.setStartBefore(node); + rng.setEndBefore(node); + } else { + rng.setStartAfter(node); + rng.setEndAfter(node); + } + } - if (e.nodeType === 1 && e.nodeName === 'IMG' && (v = e.getAttribute('mce_src'))) - e.src = t.documentBaseURI.toAbsolute(v); - }); - } + selection.setRng(rng); - // Set various midas options in Gecko - if (isGecko) { - function setOpts() { - var t = this, d = t.getDoc(), s = t.settings; + // Scroll range into view scrollIntoView on element can't be used since it will scroll the main view port as well + if (!tinymce.isIE) { + node = dom.create('span', null, '\u00a0'); + rng.insertNode(node); + nodeRect = dom.getRect(node); + viewPortRect = dom.getViewPort(editor.getWin()); - if (isGecko && !s.readonly) { - if (t._isHidden()) { - try { - if (!s.content_editable) - d.designMode = 'On'; - } catch (ex) { - // Fails if it's hidden + // Check if node is out side the viewport if it is then scroll to it + if ((nodeRect.y > viewPortRect.y + viewPortRect.h || nodeRect.y < viewPortRect.y) || + (nodeRect.x > viewPortRect.x + viewPortRect.w || nodeRect.x < viewPortRect.x)) { + editor.getBody().scrollLeft = nodeRect.x; + editor.getBody().scrollTop = nodeRect.y; } - } - try { - // Try new Gecko method - d.execCommand("styleWithCSS", 0, false); - } catch (ex) { - // Use old method - if (!t._isHidden()) - try {d.execCommand("useCSS", 0, true);} catch (ex) {} + dom.remove(node); } - if (!s.table_inline_editing) - try {d.execCommand('enableInlineTableEditing', false, false);} catch (ex) {} - - if (!s.object_resizing) - try {d.execCommand('enableObjectResizing', false, false);} catch (ex) {} + // Make sure that the selection is collapsed after we removed the node fixes a WebKit bug + // where WebKit would place the endContainer/endOffset at a different location than the startContainer/startOffset + selection.collapse(true); } - }; + } - t.onBeforeExecCommand.add(setOpts); - t.onMouseDown.add(setOpts); - } + selection.onSetContent.dispatch(selection, args); + editor.addVisual(); + }, - // Add node change handlers - t.onMouseUp.add(t.nodeChanged); - t.onClick.add(t.nodeChanged); - t.onKeyUp.add(function(ed, e) { - var c = e.keyCode; + mceInsertRawHTML : function(command, ui, value) { + selection.setContent('tiny_mce_marker'); + editor.setContent(editor.getContent().replace(/tiny_mce_marker/g, function() { return value })); + }, - if ((c >= 33 && c <= 36) || (c >= 37 && c <= 40) || c == 13 || c == 45 || c == 46 || c == 8 || (tinymce.isMac && (c == 91 || c == 93)) || e.ctrlKey) - t.nodeChanged(); - }); + mceSetContent : function(command, ui, value) { + editor.setContent(value); + }, - // Add reset handler - t.onReset.add(function() { - t.setContent(t.startContent, {format : 'raw'}); - }); + 'Indent,Outdent' : function(command) { + var intentValue, indentUnit, value; - if (t.getParam('tab_focus')) { - function tabCancel(ed, e) { - if (e.keyCode === 9) - return Event.cancel(e); - }; + // Setup indent level + intentValue = settings.indentation; + indentUnit = /[a-z%]+$/i.exec(intentValue); + intentValue = parseInt(intentValue); - function tabHandler(ed, e) { - var x, i, f, el, v; + if (!queryCommandState('InsertUnorderedList') && !queryCommandState('InsertOrderedList')) { + each(selection.getSelectedBlocks(), function(element) { + if (command == 'outdent') { + value = Math.max(0, parseInt(element.style.paddingLeft || 0) - intentValue); + dom.setStyle(element, 'paddingLeft', value ? value + indentUnit : ''); + } else + dom.setStyle(element, 'paddingLeft', (parseInt(element.style.paddingLeft || 0) + intentValue) + indentUnit); + }); + } else + execNativeCommand(command); + }, - function find(d) { - f = DOM.getParent(ed.id, 'form'); - el = f.elements; + mceRepaint : function() { + var bookmark; - if (f) { - each(el, function(e, i) { - if (e.id == ed.id) { - x = i; - return false; - } - }); + if (tinymce.isGecko) { + try { + storeSelection(TRUE); - if (d > 0) { - for (i = x + 1; i < el.length; i++) { - if (el[i].type != 'hidden') - return el[i]; - } - } else { - for (i = x - 1; i >= 0; i--) { - if (el[i].type != 'hidden') - return el[i]; - } - } - } + if (selection.getSel()) + selection.getSel().selectAllChildren(editor.getBody()); - return null; - }; + selection.collapse(TRUE); + restoreSelection(); + } catch (ex) { + // Ignore + } + } + }, - if (e.keyCode === 9) { - v = explode(ed.getParam('tab_focus')); + mceToggleFormat : function(command, ui, value) { + editor.formatter.toggle(value); + }, - if (v.length == 1) { - v[1] = v[0]; - v[0] = ':prev'; - } + InsertHorizontalRule : function() { + editor.execCommand('mceInsertContent', false, '
    '); + }, - // Find element to focus - if (e.shiftKey) { - if (v[0] == ':prev') - el = find(-1); - else - el = DOM.get(v[0]); - } else { - if (v[1] == ':next') - el = find(1); - else - el = DOM.get(v[1]); - } + mceToggleVisualAid : function() { + editor.hasVisual = !editor.hasVisual; + editor.addVisual(); + }, - if (el) { - if (ed = EditorManager.get(el.id || el.name)) - ed.focus(); - else - window.setTimeout(function() {window.focus();el.focus();}, 10); + mceReplaceContent : function(command, ui, value) { + editor.execCommand('mceInsertContent', false, value.replace(/\{\$selection\}/g, selection.getContent({format : 'text'}))); + }, - return Event.cancel(e); + mceInsertLink : function(command, ui, value) { + var link = dom.getParent(selection.getNode(), 'a'), img, floatVal; + + if (tinymce.is(value, 'string')) + value = {href : value}; + + // Spaces are never valid in URLs and it's a very common mistake for people to make so we fix it here. + value.href = value.href.replace(' ', '%20'); + + if (!link) { + // WebKit can't create links on float images for some odd reason so just remove it and restore it later + if (tinymce.isWebKit) { + img = dom.getParent(selection.getNode(), 'img'); + + if (img) { + floatVal = img.style.cssFloat; + img.style.cssFloat = null; } } - }; - t.onKeyUp.add(tabCancel); + execNativeCommand('CreateLink', FALSE, 'javascript:mctmp(0);'); - if (isGecko) { - t.onKeyPress.add(tabHandler); - t.onKeyDown.add(tabCancel); - } else - t.onKeyDown.add(tabHandler); + // Restore float value + if (floatVal) + img.style.cssFloat = floatVal; + + each(dom.select("a[href='javascript:mctmp(0);']"), function(link) { + dom.setAttribs(link, value); + }); + } else { + if (value.href) + dom.setAttribs(link, value); + else + editor.dom.remove(link, TRUE); + } + }, + + selectAll : function() { + var root = dom.getRoot(), rng = dom.createRng(); + + rng.setStart(root, 0); + rng.setEnd(root, root.childNodes.length); + + editor.selection.setRng(rng); } + }); - // Add shortcuts - if (s.custom_shortcuts) { - if (s.custom_undo_redo_keyboard_shortcuts) { - t.addShortcut('ctrl+z', t.getLang('undo_desc'), 'Undo'); - t.addShortcut('ctrl+y', t.getLang('redo_desc'), 'Redo'); + // Add queryCommandState overrides + addCommands({ + // Override justify commands + 'JustifyLeft,JustifyCenter,JustifyRight,JustifyFull' : function(command) { + return isFormatMatch('align' + command.substring(7)); + }, + + 'Bold,Italic,Underline,Strikethrough,Superscript,Subscript' : function(command) { + return isFormatMatch(command); + }, + + mceBlockQuote : function() { + return isFormatMatch('blockquote'); + }, + + Outdent : function() { + var node; + + if (settings.inline_styles) { + if ((node = dom.getParent(selection.getStart(), dom.isBlock)) && parseInt(node.style.paddingLeft) > 0) + return TRUE; + + if ((node = dom.getParent(selection.getEnd(), dom.isBlock)) && parseInt(node.style.paddingLeft) > 0) + return TRUE; } - // Add default shortcuts for gecko - if (isGecko) { - t.addShortcut('ctrl+b', t.getLang('bold_desc'), 'Bold'); - t.addShortcut('ctrl+i', t.getLang('italic_desc'), 'Italic'); - t.addShortcut('ctrl+u', t.getLang('underline_desc'), 'Underline'); + return queryCommandState('InsertUnorderedList') || queryCommandState('InsertOrderedList') || (!settings.inline_styles && !!dom.getParent(selection.getNode(), 'BLOCKQUOTE')); + }, + + 'InsertUnorderedList,InsertOrderedList' : function(command) { + return dom.getParent(selection.getNode(), command == 'insertunorderedlist' ? 'UL' : 'OL'); + } + }, 'state'); + + // Add queryCommandValue overrides + addCommands({ + 'FontSize,FontName' : function(command) { + var value = 0, parent; + + if (parent = dom.getParent(selection.getNode(), 'span')) { + if (command == 'fontsize') + value = parent.style.fontSize; + else + value = parent.style.fontFamily.replace(/, /g, ',').replace(/[\'\"]/g, '').toLowerCase(); } - // BlockFormat shortcuts keys - for (i=1; i<=6; i++) - t.addShortcut('ctrl+' + i, '', ['FormatBlock', false, '']); + return value; + } + }, 'value'); - t.addShortcut('ctrl+7', '', ['FormatBlock', false, '

    ']); - t.addShortcut('ctrl+8', '', ['FormatBlock', false, '

    ']); - t.addShortcut('ctrl+9', '', ['FormatBlock', false, '
    ']); + // Add undo manager logic + if (settings.custom_undo_redo) { + addCommands({ + Undo : function() { + editor.undoManager.undo(); + }, - function find(e) { - var v = null; + Redo : function() { + editor.undoManager.redo(); + } + }); + } + }; +})(tinymce); - if (!e.altKey && !e.ctrlKey && !e.metaKey) - return v; +(function(tinymce) { + var Dispatcher = tinymce.util.Dispatcher; - each(t.shortcuts, function(o) { - if (tinymce.isMac && o.ctrl != e.metaKey) - return; - else if (!tinymce.isMac && o.ctrl != e.ctrlKey) - return; + tinymce.UndoManager = function(editor) { + var self, index = 0, data = []; - if (o.alt != e.altKey) - return; + function getContent() { + return tinymce.trim(editor.getContent({format : 'raw', no_events : 1})); + }; - if (o.shift != e.shiftKey) - return; + return self = { + typing : false, - if (e.keyCode == o.keyCode || (e.charCode && e.charCode == o.charCode)) { - v = o; - return false; - } - }); + onAdd : new Dispatcher(self), - return v; - }; + onUndo : new Dispatcher(self), - t.onKeyUp.add(function(ed, e) { - var o = find(e); + onRedo : new Dispatcher(self), - if (o) - return Event.cancel(e); - }); + beforeChange : function() { + // Set before bookmark on previous level + if (data[index]) + data[index].beforeBookmark = editor.selection.getBookmark(2, true); + }, - t.onKeyPress.add(function(ed, e) { - var o = find(e); + add : function(level) { + var i, settings = editor.settings, lastLevel; - if (o) - return Event.cancel(e); - }); + level = level || {}; + level.content = getContent(); - t.onKeyDown.add(function(ed, e) { - var o = find(e); + // Add undo level if needed + lastLevel = data[index]; + if (lastLevel && lastLevel.content == level.content) + return null; - if (o) { - o.func.call(o.scope); - return Event.cancel(e); + // Time to compress + if (settings.custom_undo_redo_levels) { + if (data.length > settings.custom_undo_redo_levels) { + for (i = 0; i < data.length - 1; i++) + data[i] = data[i + 1]; + + data.length--; + index = data.length; } - }); - } + } - if (tinymce.isIE) { - // Fix so resize will only update the width and height attributes not the styles of an image - // It will also block mceItemNoResize items - Event.add(t.getDoc(), 'controlselect', function(e) { - var re = t.resizeInfo, cb; + // Get a non intrusive normalized bookmark + level.bookmark = editor.selection.getBookmark(2, true); - e = e.target; + // Crop array if needed + if (index < data.length - 1) + data.length = index + 1; - // Don't do this action for non image elements - if (e.nodeName !== 'IMG') - return; + data.push(level); + index = data.length - 1; - if (re) - Event.remove(re.node, re.ev, re.cb); + self.onAdd.dispatch(self, level); + editor.isNotDirty = 0; - if (!t.dom.hasClass(e, 'mceItemNoResize')) { - ev = 'resizeend'; - cb = Event.add(e, ev, function(e) { - var v; + return level; + }, - e = e.target; + undo : function() { + var level, i; - if (v = t.dom.getStyle(e, 'width')) { - t.dom.setAttrib(e, 'width', v.replace(/[^0-9%]+/g, '')); - t.dom.setStyle(e, 'width', ''); - } + if (self.typing) { + self.add(); + self.typing = false; + } - if (v = t.dom.getStyle(e, 'height')) { - t.dom.setAttrib(e, 'height', v.replace(/[^0-9%]+/g, '')); - t.dom.setStyle(e, 'height', ''); - } - }); - } else { - ev = 'resizestart'; - cb = Event.add(e, 'resizestart', Event.cancel, Event); - } + if (index > 0) { + level = data[--index]; - re = t.resizeInfo = { - node : e, - ev : ev, - cb : cb - }; - }); + editor.setContent(level.content, {format : 'raw'}); + editor.selection.moveToBookmark(level.beforeBookmark); - t.onKeyDown.add(function(ed, e) { - switch (e.keyCode) { - case 8: - // Fix IE control + backspace browser bug - if (t.selection.getRng().item) { - t.selection.getRng().item(0).removeNode(); - return Event.cancel(e); - } - } - }); - } + self.onUndo.dispatch(self, level); + } - if (tinymce.isOpera) { - t.onClick.add(function(ed, e) { - Event.prevent(e); - }); - } + return level; + }, - // Add custom undo/redo handlers - if (s.custom_undo_redo) { - function addUndo() { - t.undoManager.typing = 0; - t.undoManager.add(); - }; + redo : function() { + var level; - // Add undo level on editor blur - if (tinymce.isIE) { - Event.add(t.getWin(), 'blur', function(e) { - var n; + if (index < data.length - 1) { + level = data[++index]; - // Check added for fullscreen bug - if (t.selection) { - n = t.selection.getNode(); + editor.setContent(level.content, {format : 'raw'}); + editor.selection.moveToBookmark(level.bookmark); - // Add undo level is selection was lost to another document - if (!t.removed && n.ownerDocument && n.ownerDocument != t.getDoc()) - addUndo(); - } - }); - } else { - Event.add(t.getDoc(), 'blur', function() { - if (t.selection && !t.removed) - addUndo(); - }); + self.onRedo.dispatch(self, level); } - t.onMouseDown.add(addUndo); - - t.onKeyUp.add(function(ed, e) { - if ((e.keyCode >= 33 && e.keyCode <= 36) || (e.keyCode >= 37 && e.keyCode <= 40) || e.keyCode == 13 || e.keyCode == 45 || e.ctrlKey) { - t.undoManager.typing = 0; - t.undoManager.add(); - } - }); + return level; + }, - t.onKeyDown.add(function(ed, e) { - // Is caracter positon keys - if ((e.keyCode >= 33 && e.keyCode <= 36) || (e.keyCode >= 37 && e.keyCode <= 40) || e.keyCode == 13 || e.keyCode == 45) { - if (t.undoManager.typing) { - t.undoManager.add(); - t.undoManager.typing = 0; - } + clear : function() { + data = []; + index = 0; + self.typing = false; + }, - return; - } + hasUndo : function() { + return index > 0 || this.typing; + }, - if (!t.undoManager.typing) { - t.undoManager.add(); - t.undoManager.typing = 1; - } - }); + hasRedo : function() { + return index < data.length - 1 && !this.typing; } - }, + }; + }; +})(tinymce); - _convertInlineElements : function() { - var t = this, s = t.settings, dom = t.dom, v, e, na, st, sp; +(function(tinymce) { + // Shorten names + var Event = tinymce.dom.Event, + isIE = tinymce.isIE, + isGecko = tinymce.isGecko, + isOpera = tinymce.isOpera, + each = tinymce.each, + extend = tinymce.extend, + TRUE = true, + FALSE = false; + + function cloneFormats(node) { + var clone, temp, inner; + + do { + if (/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(node.nodeName)) { + if (clone) { + temp = node.cloneNode(false); + temp.appendChild(clone); + clone = temp; + } else { + clone = inner = node.cloneNode(false); + } - function convert(ed, o) { - if (!s.inline_styles) - return; + clone.removeAttribute('id'); + } + } while (node = node.parentNode); - if (o.get) { - each(t.dom.select('table,u,strike', o.node), function(n) { - switch (n.nodeName) { - case 'TABLE': - if (v = dom.getAttrib(n, 'height')) { - dom.setStyle(n, 'height', v); - dom.setAttrib(n, 'height', ''); - } - break; + if (clone) + return {wrapper : clone, inner : inner}; + }; - case 'U': - case 'STRIKE': - //sp = dom.create('span', {style : dom.getAttrib(n, 'style')}); - n.style.textDecoration = n.nodeName == 'U' ? 'underline' : 'line-through'; - dom.setAttrib(n, 'mce_style', ''); - dom.setAttrib(n, 'mce_name', 'span'); - break; - } - }); - } else if (o.set) { - each(t.dom.select('table,span', o.node).reverse(), function(n) { - if (n.nodeName == 'TABLE') { - if (v = dom.getStyle(n, 'height')) - dom.setAttrib(n, 'height', v.replace(/[^0-9%]+/g, '')); - } else { - // Convert spans to elements - if (n.style.textDecoration == 'underline') - na = 'u'; - else if (n.style.textDecoration == 'line-through') - na = 'strike'; - else - na = ''; + // Checks if the selection/caret is at the end of the specified block element + function isAtEnd(rng, par) { + var rng2 = par.ownerDocument.createRange(); - if (na) { - n.style.textDecoration = ''; - dom.setAttrib(n, 'mce_style', ''); + rng2.setStart(rng.endContainer, rng.endOffset); + rng2.setEndAfter(par); - e = dom.create(na, { - style : dom.getAttrib(n, 'style') - }); + // Get number of characters to the right of the cursor if it's zero then we are at the end and need to merge the next block element + return rng2.cloneContents().textContent.length == 0; + }; - dom.replace(e, n, 1); - } - } - }); - } - }; + function splitList(selection, dom, li) { + var listBlock, block; - t.onPreProcess.add(convert); + if (dom.isEmpty(li)) { + listBlock = dom.getParent(li, 'ul,ol'); - if (!s.cleanup_on_startup) { - t.onSetContent.add(function(ed, o) { - if (o.initial) - convert(t, {node : t.getBody(), set : 1}); - }); + if (!dom.getParent(listBlock.parentNode, 'ul,ol')) { + dom.split(listBlock, li); + block = dom.create('p', 0, '
    '); + dom.replace(block, li); + selection.select(block, 1); } - }, - _convertFonts : function() { - var t = this, s = t.settings, dom = t.dom, fz, fzn, sl, cl; + return FALSE; + } - // No need - if (!s.inline_styles) - return; + return TRUE; + }; - // Font pt values and font size names - fz = [8, 10, 12, 14, 18, 24, 36]; - fzn = ['xx-small', 'x-small','small','medium','large','x-large', 'xx-large']; + tinymce.create('tinymce.ForceBlocks', { + ForceBlocks : function(ed) { + var t = this, s = ed.settings, elm; - if (sl = s.font_size_style_values) - sl = explode(sl); + t.editor = ed; + t.dom = ed.dom; + elm = (s.forced_root_block || 'p').toLowerCase(); + s.element = elm.toUpperCase(); - if (cl = s.font_size_classes) - cl = explode(cl); + ed.onPreInit.add(t.setup, t); - function process(no) { - var n, sp, nl, x; + if (s.forced_root_block) { + ed.onInit.add(t.forceRoots, t); + ed.onSetContent.add(t.forceRoots, t); + ed.onBeforeGetContent.add(t.forceRoots, t); + ed.onExecCommand.add(function(ed, cmd) { + if (cmd == 'mceInsertContent') { + t.forceRoots(); + ed.nodeChanged(); + } + }); + } + }, - // Keep unit tests happy - if (!s.inline_styles) - return; + setup : function() { + var t = this, ed = t.editor, s = ed.settings, dom = ed.dom, selection = ed.selection; - nl = t.dom.select('font', no); - for (x = nl.length - 1; x >= 0; x--) { - n = nl[x]; + // Force root blocks when typing and when getting output + if (s.forced_root_block) { + ed.onBeforeExecCommand.add(t.forceRoots, t); + ed.onKeyUp.add(t.forceRoots, t); + ed.onPreProcess.add(t.forceRoots, t); + } - sp = dom.create('span', { - style : dom.getAttrib(n, 'style'), - 'class' : dom.getAttrib(n, 'class') - }); + if (s.force_br_newlines) { + // Force IE to produce BRs on enter + if (isIE) { + ed.onKeyPress.add(function(ed, e) { + var n; - dom.setStyles(sp, { - fontFamily : dom.getAttrib(n, 'face'), - color : dom.getAttrib(n, 'color'), - backgroundColor : n.style.backgroundColor + if (e.keyCode == 13 && selection.getNode().nodeName != 'LI') { + selection.setContent('
    ', {format : 'raw'}); + n = dom.get('__'); + n.removeAttribute('id'); + selection.select(n); + selection.collapse(); + return Event.cancel(e); + } }); - - if (n.size) { - if (sl) - dom.setStyle(sp, 'fontSize', sl[parseInt(n.size) - 1]); - else - dom.setAttrib(sp, 'class', cl[parseInt(n.size) - 1]); - } - - dom.setAttrib(sp, 'mce_style', ''); - dom.replace(sp, n, 1); } - }; - - // Run on cleanup - t.onPreProcess.add(function(ed, o) { - if (o.get) - process(o.node); - }); + } - t.onSetContent.add(function(ed, o) { - if (o.initial) - process(o.node); - }); - }, + if (s.force_p_newlines) { + if (!isIE) { + ed.onKeyPress.add(function(ed, e) { + if (e.keyCode == 13 && !e.shiftKey && !t.insertPara(e)) + Event.cancel(e); + }); + } else { + // Ungly hack to for IE to preserve the formatting when you press + // enter at the end of a block element with formatted contents + // This logic overrides the browsers default logic with + // custom logic that enables us to control the output + tinymce.addUnload(function() { + t._previousFormats = 0; // Fix IE leak + }); - _isHidden : function() { - var s; + ed.onKeyPress.add(function(ed, e) { + t._previousFormats = 0; - if (!isGecko) - return 0; + // Clone the current formats, this will later be applied to the new block contents + if (e.keyCode == 13 && !e.shiftKey && ed.selection.isCollapsed() && s.keep_styles) + t._previousFormats = cloneFormats(ed.selection.getStart()); + }); - // Weird, wheres that cursor selection? - s = this.selection.getSel(); - return (!s || !s.rangeCount || s.rangeCount == 0); - }, + ed.onKeyUp.add(function(ed, e) { + // Let IE break the element and the wrap the new caret location in the previous formats + if (e.keyCode == 13 && !e.shiftKey) { + var parent = ed.selection.getStart(), fmt = t._previousFormats; - // Fix for bug #1867292 - _fixNesting : function(s) { - var d = [], i; + // Parent is an empty block + if (!parent.hasChildNodes() && fmt) { + parent = dom.getParent(parent, dom.isBlock); - s = s.replace(/<(\/)?([^\s>]+)[^>]*?>/g, function(a, b, c) { - var e; + if (parent && parent.nodeName != 'LI') { + parent.innerHTML = ''; - // Handle end element - if (b === '/') { - if (!d.length) - return ''; + if (t._previousFormats) { + parent.appendChild(fmt.wrapper); + fmt.inner.innerHTML = '\uFEFF'; + } else + parent.innerHTML = '\uFEFF'; - if (c !== d[d.length - 1].tag) { - for (i=d.length - 1; i>=0; i--) { - if (d[i].tag === c) { - d[i].close = 1; - break; + selection.select(parent, 1); + selection.collapse(true); + ed.getDoc().execCommand('Delete', false, null); + t._previousFormats = 0; + } } } + }); + } - return ''; - } else { - d.pop(); + if (isGecko) { + ed.onKeyDown.add(function(ed, e) { + if ((e.keyCode == 8 || e.keyCode == 46) && !e.shiftKey) + t.backspaceDelete(e, e.keyCode == 8); + }); + } + } - if (d.length && d[d.length - 1].close) { - a = a + ''; - d.pop(); - } - } - } else { - // Ignore these - if (/^(br|hr|input|meta|img|link|param)$/i.test(c)) - return a; + // Workaround for missing shift+enter support, http://bugs.webkit.org/show_bug.cgi?id=16973 + if (tinymce.isWebKit) { + function insertBr(ed) { + var rng = selection.getRng(), br, div = dom.create('div', null, ' '), divYPos, vpHeight = dom.getViewPort(ed.getWin()).h; - // Ignore closed ones - if (/\/>$/.test(a)) - return a; + // Insert BR element + rng.insertNode(br = dom.create('br')); - d.push({tag : c}); // Push start element - } + // Place caret after BR + rng.setStartAfter(br); + rng.setEndAfter(br); + selection.setRng(rng); - return a; - }); + // Could not place caret after BR then insert an nbsp entity and move the caret + if (selection.getSel().focusNode == br.previousSibling) { + selection.select(dom.insertAfter(dom.doc.createTextNode('\u00a0'), br)); + selection.collapse(TRUE); + } - // End all open tags - for (i=d.length - 1; i>=0; i--) - s += ''; + // Create a temporary DIV after the BR and get the position as it + // seems like getPos() returns 0 for text nodes and BR elements. + dom.insertAfter(div, br); + divYPos = dom.getPos(div).y; + dom.remove(div); - return s; - } + // Scroll to new position, scrollIntoView can't be used due to bug: http://bugs.webkit.org/show_bug.cgi?id=16117 + if (divYPos > vpHeight) // It is not necessary to scroll if the DIV is inside the view port. + ed.getWin().scrollTo(0, divYPos); + }; - }); -})(); + ed.onKeyPress.add(function(ed, e) { + if (e.keyCode == 13 && (e.shiftKey || (s.force_br_newlines && !dom.getParent(selection.getNode(), 'h1,h2,h3,h4,h5,h6,ol,ul')))) { + insertBr(ed); + Event.cancel(e); + } + }); + } -/* file:jscripts/tiny_mce/classes/EditorCommands.js */ + // IE specific fixes + if (isIE) { + // Replaces IE:s auto generated paragraphs with the specified element name + if (s.element != 'P') { + ed.onKeyPress.add(function(ed, e) { + t.lastElm = selection.getNode().nodeName; + }); -(function() { - var each = tinymce.each, isIE = tinymce.isIE, isGecko = tinymce.isGecko, isOpera = tinymce.isOpera, isWebKit = tinymce.isWebKit; + ed.onKeyUp.add(function(ed, e) { + var bl, n = selection.getNode(), b = ed.getBody(); - function isBlock(n) { - return /^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(n.nodeName); - }; + if (b.childNodes.length === 1 && n.nodeName == 'P') { + n = dom.rename(n, s.element); + selection.select(n); + selection.collapse(); + ed.nodeChanged(); + } else if (e.keyCode == 13 && !e.shiftKey && t.lastElm != 'P') { + bl = dom.getParent(n, 'p'); - tinymce.create('tinymce.EditorCommands', { - EditorCommands : function(ed) { - this.editor = ed; + if (bl) { + dom.rename(bl, s.element); + ed.nodeChanged(); + } + } + }); + } + } }, - execCommand : function(cmd, ui, val) { - var t = this, ed = t.editor, f; - - switch (cmd) { - case 'Cut': - case 'Copy': - case 'Paste': - try { - ed.getDoc().execCommand(cmd, ui, val); - } catch (ex) { - if (isGecko) { - ed.windowManager.confirm(ed.getLang('clipboard_msg'), function(s) { - if (s) - window.open('http://www.mozilla.org/editor/midasdemo/securityprefs.html', 'mceExternal'); - }); - } else - ed.windowManager.alert(ed.getLang('clipboard_no_support')); - } + find : function(n, t, s) { + var ed = this.editor, w = ed.getDoc().createTreeWalker(n, 4, null, FALSE), c = -1; - return true; + while (n = w.nextNode()) { + c++; - // Ignore these - case 'mceResetDesignMode': - case 'mceBeginUndoLevel': - return true; + // Index by node + if (t == 0 && n == s) + return c; - // Ignore these - case 'unlink': - t.UnLink(); - return true; + // Node by index + if (t == 1 && c == s) + return n; + } - // Bundle these together - case 'JustifyLeft': - case 'JustifyCenter': - case 'JustifyRight': - case 'JustifyFull': - t.mceJustify(cmd, cmd.substring(7).toLowerCase()); - return true; + return -1; + }, - case 'mceEndUndoLevel': - case 'mceAddUndoLevel': - ed.undoManager.add(); - return true; + forceRoots : function(ed, e) { + var t = this, ed = t.editor, b = ed.getBody(), d = ed.getDoc(), se = ed.selection, s = se.getSel(), r = se.getRng(), si = -2, ei, so, eo, tr, c = -0xFFFFFF; + var nx, bl, bp, sp, le, nl = b.childNodes, i, n, eid; - default: - f = this[cmd]; + // Fix for bug #1863847 + //if (e && e.keyCode == 13) + // return TRUE; - if (f) { - f.call(this, ui, val); - return true; - } - } + // Wrap non blocks into blocks + for (i = nl.length - 1; i >= 0; i--) { + nx = nl[i]; - return false; - }, + // Ignore internal elements + if (nx.nodeType === 1 && nx.getAttribute('data-mce-type')) { + bl = null; + continue; + } - Indent : function() { - var ed = this.editor, d = ed.dom, s = ed.selection, e, iv, iu; + // Is text or non block element + if (nx.nodeType === 3 || (!t.dom.isBlock(nx) && nx.nodeType !== 8 && !/^(script|mce:script|style|mce:style)$/i.test(nx.nodeName))) { + if (!bl) { + // Create new block but ignore whitespace + if (nx.nodeType != 3 || /[^\s]/g.test(nx.nodeValue)) { + // Store selection + if (si == -2 && r) { + if (!isIE || r.setStart) { + // If selection is element then mark it + if (r.startContainer.nodeType == 1 && (n = r.startContainer.childNodes[r.startOffset]) && n.nodeType == 1) { + // Save the id of the selected element + eid = n.getAttribute("id"); + n.setAttribute("id", "__mce"); + } else { + // If element is inside body, might not be the case in contentEdiable mode + if (ed.dom.getParent(r.startContainer, function(e) {return e === b;})) { + so = r.startOffset; + eo = r.endOffset; + si = t.find(b, 0, r.startContainer); + ei = t.find(b, 0, r.endContainer); + } + } + } else { + // Force control range into text range + if (r.item) { + tr = d.body.createTextRange(); + tr.moveToElementText(r.item(0)); + r = tr; + } - // Setup indent level - iv = ed.settings.indentation; - iu = /[a-z%]+$/i.exec(iv); - iv = parseInt(iv); + tr = d.body.createTextRange(); + tr.moveToElementText(b); + tr.collapse(1); + bp = tr.move('character', c) * -1; - if (ed.settings.inline_styles && (!this.queryStateInsertUnorderedList() && !this.queryStateInsertOrderedList())) { - each(this._getSelectedBlocks(), function(e) { - d.setStyle(e, 'paddingLeft', (parseInt(e.style.paddingLeft || 0) + iv) + iu); - }); + tr = r.duplicate(); + tr.collapse(1); + sp = tr.move('character', c) * -1; - return; - } + tr = r.duplicate(); + tr.collapse(0); + le = (tr.move('character', c) * -1) - sp; - ed.getDoc().execCommand('Indent', false, null); + si = sp - bp; + ei = le; + } + } - if (isIE) { - d.getParent(s.getNode(), function(n) { - if (n.nodeName == 'BLOCKQUOTE') { - n.dir = n.style.cssText = ''; + // Uses replaceChild instead of cloneNode since it removes selected attribute from option elements on IE + // See: http://support.microsoft.com/kb/829907 + bl = ed.dom.create(ed.settings.forced_root_block); + nx.parentNode.replaceChild(bl, nx); + bl.appendChild(nx); + } + } else { + if (bl.hasChildNodes()) + bl.insertBefore(nx, bl.firstChild); + else + bl.appendChild(nx); } - }); + } else + bl = null; // Time to create new block } - }, - Outdent : function() { - var ed = this.editor, d = ed.dom, s = ed.selection, e, v, iv, iu; + // Restore selection + if (si != -2) { + if (!isIE || r.setStart) { + bl = b.getElementsByTagName(ed.settings.element)[0]; + r = d.createRange(); + + // Select last location or generated block + if (si != -1) + r.setStart(t.find(b, 1, si), so); + else + r.setStart(bl, 0); - // Setup indent level - iv = ed.settings.indentation; - iu = /[a-z%]+$/i.exec(iv); - iv = parseInt(iv); + // Select last location or generated block + if (ei != -1) + r.setEnd(t.find(b, 1, ei), eo); + else + r.setEnd(bl, 0); - if (ed.settings.inline_styles && (!this.queryStateInsertUnorderedList() && !this.queryStateInsertOrderedList())) { - each(this._getSelectedBlocks(), function(e) { - v = Math.max(0, parseInt(e.style.paddingLeft || 0) - iv); - d.setStyle(e, 'paddingLeft', v ? v + iu : ''); - }); + if (s) { + s.removeAllRanges(); + s.addRange(r); + } + } else { + try { + r = s.createRange(); + r.moveToElementText(b); + r.collapse(1); + r.moveStart('character', si); + r.moveEnd('character', ei); + r.select(); + } catch (ex) { + // Ignore + } + } + } else if ((!isIE || r.setStart) && (n = ed.dom.get('__mce'))) { + // Restore the id of the selected element + if (eid) + n.setAttribute('id', eid); + else + n.removeAttribute('id'); - return; + // Move caret before selected element + r = d.createRange(); + r.setStartBefore(n); + r.setEndBefore(n); + se.setRng(r); } - - ed.getDoc().execCommand('Outdent', false, null); - }, - - mceSetAttribute : function(u, v) { - var ed = this.editor, d = ed.dom, e; - - if (e = d.getParent(ed.selection.getNode(), d.isBlock)) - d.setAttrib(e, v.name, v.value); - }, - - mceSetContent : function(u, v) { - this.editor.setContent(v); }, - mceToggleVisualAid : function() { - var ed = this.editor; + getParentBlock : function(n) { + var d = this.dom; - ed.hasVisual = !ed.hasVisual; - ed.addVisual(); + return d.getParent(n, d.isBlock); }, - mceReplaceContent : function(u, v) { - var s = this.editor.selection; + insertPara : function(e) { + var t = this, ed = t.editor, dom = ed.dom, d = ed.getDoc(), se = ed.settings, s = ed.selection.getSel(), r = s.getRangeAt(0), b = d.body; + var rb, ra, dir, sn, so, en, eo, sb, eb, bn, bef, aft, sc, ec, n, vp = dom.getViewPort(ed.getWin()), y, ch, car; - s.setContent(v.replace(/\{\$selection\}/g, s.getContent({format : 'text'}))); - }, + ed.undoManager.beforeChange(); - mceInsertLink : function(u, v) { - var ed = this.editor, s = ed.selection, e = ed.dom.getParent(s.getNode(), 'A'); + // If root blocks are forced then use Operas default behavior since it's really good +// Removed due to bug: #1853816 +// if (se.forced_root_block && isOpera) +// return TRUE; - if (tinymce.is(v, 'string')) - v = {href : v}; + // Setup before range + rb = d.createRange(); - function set(e) { - each(v, function(v, k) { - ed.dom.setAttrib(e, k, v); - }); - }; + // If is before the first block element and in body, then move it into first block element + rb.setStart(s.anchorNode, s.anchorOffset); + rb.collapse(TRUE); - if (!e) { - ed.execCommand('CreateLink', false, 'javascript:mctmp(0);'); - each(ed.dom.select('a'), function(e) { - if (e.href == 'javascript:mctmp(0);') - set(e); - }); - } else { - if (v.href) - set(e); - else - ed.dom.remove(e, 1); - } - }, + // Setup after range + ra = d.createRange(); - UnLink : function() { - var ed = this.editor, s = ed.selection; + // If is before the first block element and in body, then move it into first block element + ra.setStart(s.focusNode, s.focusOffset); + ra.collapse(TRUE); - if (s.isCollapsed()) - s.select(s.getNode()); + // Setup start/end points + dir = rb.compareBoundaryPoints(rb.START_TO_END, ra) < 0; + sn = dir ? s.anchorNode : s.focusNode; + so = dir ? s.anchorOffset : s.focusOffset; + en = dir ? s.focusNode : s.anchorNode; + eo = dir ? s.focusOffset : s.anchorOffset; - ed.getDoc().execCommand('unlink', false, null); - s.collapse(0); - }, + // If selection is in empty table cell + if (sn === en && /^(TD|TH)$/.test(sn.nodeName)) { + if (sn.firstChild.nodeName == 'BR') + dom.remove(sn.firstChild); // Remove BR - FontName : function(u, v) { - var t = this, ed = t.editor, s = ed.selection, e; + // Create two new block elements + if (sn.childNodes.length == 0) { + ed.dom.add(sn, se.element, null, '
    '); + aft = ed.dom.add(sn, se.element, null, '
    '); + } else { + n = sn.innerHTML; + sn.innerHTML = ''; + ed.dom.add(sn, se.element, null, n); + aft = ed.dom.add(sn, se.element, null, '
    '); + } - if (!v) { - if (s.isCollapsed()) - s.select(s.getNode()); + // Move caret into the last one + r = d.createRange(); + r.selectNodeContents(aft); + r.collapse(1); + ed.selection.setRng(r); - t.RemoveFormat(); - } else { - if (ed.settings.convert_fonts_to_spans) - t._applyInlineStyle('span', {style : {fontFamily : v}}); - else - ed.getDoc().execCommand('FontName', false, v); + return FALSE; } - }, - FontSize : function(u, v) { - var ed = this.editor, s = ed.settings, fc, fs; - - // Use style options instead - if (s.convert_fonts_to_spans && v >= 1 && v <= 7) { - fs = tinymce.explode(s.font_size_style_values); - fc = tinymce.explode(s.font_size_classes); - - if (fc) - v = fc[v - 1] || v; - else - v = fs[v - 1] || v; + // If the caret is in an invalid location in FF we need to move it into the first block + if (sn == b && en == b && b.firstChild && ed.dom.isBlock(b.firstChild)) { + sn = en = sn.firstChild; + so = eo = 0; + rb = d.createRange(); + rb.setStart(sn, 0); + ra = d.createRange(); + ra.setStart(en, 0); } - if (v >= 1 && v <= 7) - ed.getDoc().execCommand('FontSize', false, v); - else - this._applyInlineStyle('span', {style : {fontSize : v}}); - }, - - queryCommandValue : function(c) { - var f = this['queryValue' + c]; - - if (f) - return f.call(this, c); - - return false; - }, + // Never use body as start or end node + sn = sn.nodeName == "HTML" ? d.body : sn; // Fix for Opera bug: https://bugs.opera.com/show_bug.cgi?id=273224&comments=yes + sn = sn.nodeName == "BODY" ? sn.firstChild : sn; + en = en.nodeName == "HTML" ? d.body : en; // Fix for Opera bug: https://bugs.opera.com/show_bug.cgi?id=273224&comments=yes + en = en.nodeName == "BODY" ? en.firstChild : en; - queryCommandState : function(cmd) { - var f; + // Get start and end blocks + sb = t.getParentBlock(sn); + eb = t.getParentBlock(en); + bn = sb ? sb.nodeName : se.element; // Get block name to create - switch (cmd) { - // Bundle these together - case 'JustifyLeft': - case 'JustifyCenter': - case 'JustifyRight': - case 'JustifyFull': - return this.queryStateJustify(cmd, cmd.substring(7).toLowerCase()); + // Return inside list use default browser behavior + if (n = t.dom.getParent(sb, 'li,pre')) { + if (n.nodeName == 'LI') + return splitList(ed.selection, t.dom, n); - default: - if (f = this['queryState' + cmd]) - return f.call(this, cmd); + return TRUE; } - return -1; - }, - - _queryState : function(c) { - try { - return this.editor.getDoc().queryCommandState(c); - } catch (ex) { - // Ignore exception + // If caption or absolute layers then always generate new blocks within + if (sb && (sb.nodeName == 'CAPTION' || /absolute|relative|fixed/gi.test(dom.getStyle(sb, 'position', 1)))) { + bn = se.element; + sb = null; } - }, - _queryVal : function(c) { - try { - return this.editor.getDoc().queryCommandValue(c); - } catch (ex) { - // Ignore exception + // If caption or absolute layers then always generate new blocks within + if (eb && (eb.nodeName == 'CAPTION' || /absolute|relative|fixed/gi.test(dom.getStyle(sb, 'position', 1)))) { + bn = se.element; + eb = null; } - }, - - queryValueFontSize : function() { - var ed = this.editor, v = 0, p; - - if (p = ed.dom.getParent(ed.selection.getNode(), 'SPAN')) - v = p.style.fontSize; - - if (!v && (isOpera || isWebKit)) { - if (p = ed.dom.getParent(ed.selection.getNode(), 'FONT')) - v = p.size; - return v; + // Use P instead + if (/(TD|TABLE|TH|CAPTION)/.test(bn) || (sb && bn == "DIV" && /left|right/gi.test(dom.getStyle(sb, 'float', 1)))) { + bn = se.element; + sb = eb = null; } - return v || this._queryVal('FontSize'); - }, - - queryValueFontName : function() { - var ed = this.editor, v = 0, p; - - if (p = ed.dom.getParent(ed.selection.getNode(), 'FONT')) - v = p.face; - - if (p = ed.dom.getParent(ed.selection.getNode(), 'SPAN')) - v = p.style.fontFamily.replace(/, /g, ',').replace(/[\'\"]/g, '').toLowerCase(); - - if (!v) - v = this._queryVal('FontName'); - - return v; - }, - - mceJustify : function(c, v) { - var ed = this.editor, se = ed.selection, n = se.getNode(), nn = n.nodeName, bl, nb, dom = ed.dom, rm; - - if (ed.settings.inline_styles && this.queryStateJustify(c, v)) - rm = 1; - - bl = dom.getParent(n, ed.dom.isBlock); + // Setup new before and after blocks + bef = (sb && sb.nodeName == bn) ? sb.cloneNode(0) : ed.dom.create(bn); + aft = (eb && eb.nodeName == bn) ? eb.cloneNode(0) : ed.dom.create(bn); - if (nn == 'IMG') { - if (v == 'full') - return; + // Remove id from after clone + aft.removeAttribute('id'); - if (rm) { - if (v == 'center') - dom.setStyle(bl || n.parentNode, 'textAlign', ''); + // Is header and cursor is at the end, then force paragraph under + if (/^(H[1-6])$/.test(bn) && isAtEnd(r, sb)) + aft = ed.dom.create(se.element); - dom.setStyle(n, 'float', ''); - this.mceRepaint(); - return; - } + // Find start chop node + n = sc = sn; + do { + if (n == b || n.nodeType == 9 || t.dom.isBlock(n) || /(TD|TABLE|TH|CAPTION)/.test(n.nodeName)) + break; - if (v == 'center') { - // Do not change table elements - if (bl && /^(TD|TH)$/.test(bl.nodeName)) - bl = 0; + sc = n; + } while ((n = n.previousSibling ? n.previousSibling : n.parentNode)); - if (!bl || bl.childNodes.length > 1) { - nb = dom.create('p'); - nb.appendChild(n.cloneNode(false)); + // Find end chop node + n = ec = en; + do { + if (n == b || n.nodeType == 9 || t.dom.isBlock(n) || /(TD|TABLE|TH|CAPTION)/.test(n.nodeName)) + break; - if (bl) - dom.insertAfter(nb, bl); - else - dom.insertAfter(nb, n); + ec = n; + } while ((n = n.nextSibling ? n.nextSibling : n.parentNode)); - dom.remove(n); - n = nb.firstChild; - bl = nb; - } + // Place first chop part into before block element + if (sc.nodeName == bn) + rb.setStart(sc, 0); + else + rb.setStartBefore(sc); - dom.setStyle(bl, 'textAlign', v); - dom.setStyle(n, 'float', ''); - } else { - dom.setStyle(n, 'float', v); - dom.setStyle(bl || n.parentNode, 'textAlign', ''); - } + rb.setEnd(sn, so); + bef.appendChild(rb.cloneContents() || d.createTextNode('')); // Empty text node needed for Safari - this.mceRepaint(); - return; + // Place secnd chop part within new block element + try { + ra.setEndAfter(ec); + } catch(ex) { + //console.debug(s.focusNode, s.focusOffset); } - // Handle the alignment outselfs, less quirks in all browsers - if (ed.settings.inline_styles && ed.settings.forced_root_block) { - if (rm) - v = ''; - - each(this._getSelectedBlocks(dom.getParent(se.getStart(), dom.isBlock), dom.getParent(se.getEnd(), dom.isBlock)), function(e) { - dom.setAttrib(e, 'align', ''); - dom.setStyle(e, 'textAlign', v == 'full' ? 'justify' : v); - }); - - return; - } else if (!rm) - ed.getDoc().execCommand(c, false, null); - - if (ed.settings.inline_styles) { - if (rm) { - dom.getParent(ed.selection.getNode(), function(n) { - if (n.style && n.style.textAlign) - dom.setStyle(n, 'textAlign', ''); - }); - - return; - } - - each(dom.select('*'), function(n) { - var v = n.align; - - if (v) { - if (v == 'full') - v = 'justify'; + ra.setStart(en, eo); + aft.appendChild(ra.cloneContents() || d.createTextNode('')); // Empty text node needed for Safari - dom.setStyle(n, 'textAlign', v); - dom.setAttrib(n, 'align', ''); - } - }); + // Create range around everything + r = d.createRange(); + if (!sc.previousSibling && sc.parentNode.nodeName == bn) { + r.setStartBefore(sc.parentNode); + } else { + if (rb.startContainer.nodeName == bn && rb.startOffset == 0) + r.setStartBefore(rb.startContainer); + else + r.setStart(rb.startContainer, rb.startOffset); } - }, - mceSetCSSClass : function(u, v) { - this.mceSetStyleInfo(0, {command : 'setattrib', name : 'class', value : v}); - }, - - getSelectedElement : function() { - var t = this, ed = t.editor, dom = ed.dom, se = ed.selection, r = se.getRng(), r1, r2, sc, ec, so, eo, e, sp, ep, re; - - if (se.isCollapsed() || r.item) - return se.getNode(); + if (!ec.nextSibling && ec.parentNode.nodeName == bn) + r.setEndAfter(ec.parentNode); + else + r.setEnd(ra.endContainer, ra.endOffset); - // Setup regexp - re = ed.settings.merge_styles_invalid_parents; - if (tinymce.is(re, 'string')) - re = new RegExp(re, 'i'); + // Delete and replace it with new block elements + r.deleteContents(); - if (isIE) { - r1 = r.duplicate(); - r1.collapse(true); - sc = r1.parentElement(); + if (isOpera) + ed.getWin().scrollTo(0, vp.y); - r2 = r.duplicate(); - r2.collapse(false); - ec = r2.parentElement(); + // Never wrap blocks in blocks + if (bef.firstChild && bef.firstChild.nodeName == bn) + bef.innerHTML = bef.firstChild.innerHTML; - if (sc != ec) { - r1.move('character', 1); - sc = r1.parentElement(); - } + if (aft.firstChild && aft.firstChild.nodeName == bn) + aft.innerHTML = aft.firstChild.innerHTML; - if (sc == ec) { - r1 = r.duplicate(); - r1.moveToElementText(sc); + // Padd empty blocks + if (dom.isEmpty(bef)) + bef.innerHTML = '
    '; - if (r1.compareEndPoints('StartToStart', r) == 0 && r1.compareEndPoints('EndToEnd', r) == 0) - return re && re.test(sc.nodeName) ? null : sc; - } - } else { - function getParent(n) { - return dom.getParent(n, function(n) {return n.nodeType == 1;}); - }; + function appendStyles(e, en) { + var nl = [], nn, n, i; - sc = r.startContainer; - ec = r.endContainer; - so = r.startOffset; - eo = r.endOffset; + e.innerHTML = ''; - if (!r.collapsed) { - if (sc == ec) { - if (so - eo < 2) { - if (sc.hasChildNodes()) { - sp = sc.childNodes[so]; - return re && re.test(sp.nodeName) ? null : sp; - } + // Make clones of style elements + if (se.keep_styles) { + n = en; + do { + // We only want style specific elements + if (/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(n.nodeName)) { + nn = n.cloneNode(FALSE); + dom.setAttrib(nn, 'id', ''); // Remove ID since it needs to be unique + nl.push(nn); } - } + } while (n = n.parentNode); } - if (sc.nodeType != 3 || ec.nodeType != 3) - return null; + // Append style elements to aft + if (nl.length > 0) { + for (i = nl.length - 1, nn = e; i >= 0; i--) + nn = nn.appendChild(nl[i]); - if (so == 0) { - sp = getParent(sc); + // Padd most inner style element + nl[0].innerHTML = isOpera ? '\u00a0' : '
    '; // Extra space for Opera so that the caret can move there + return nl[0]; // Move caret to most inner element + } else + e.innerHTML = isOpera ? '\u00a0' : '
    '; // Extra space for Opera so that the caret can move there + }; - if (sp && sp.firstChild != sc) - sp = null; - } + // Fill empty afterblook with current style + if (dom.isEmpty(aft)) + car = appendStyles(aft, en); - if (so == sc.nodeValue.length) { - e = sc.nextSibling; + // Opera needs this one backwards for older versions + if (isOpera && parseFloat(opera.version()) < 9.5) { + r.insertNode(bef); + r.insertNode(aft); + } else { + r.insertNode(aft); + r.insertNode(bef); + } - if (e && e.nodeType == 1) - sp = sc.nextSibling; - } + // Normalize + aft.normalize(); + bef.normalize(); - if (eo == 0) { - e = ec.previousSibling; + function first(n) { + return d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, FALSE).nextNode() || n; + }; - if (e && e.nodeType == 1) - ep = e; - } + // Move cursor and scroll into view + r = d.createRange(); + r.selectNodeContents(isGecko ? first(car || aft) : car || aft); + r.collapse(1); + s.removeAllRanges(); + s.addRange(r); - if (eo == ec.nodeValue.length) { - ep = getParent(ec); + // scrollIntoView seems to scroll the parent window in most browsers now including FF 3.0b4 so it's time to stop using it and do it our selfs + y = ed.dom.getPos(aft).y; + //ch = aft.clientHeight; - if (ep && ep.lastChild != ec) - ep = null; - } + // Is element within viewport + if (y < vp.y || y + 25 > vp.y + vp.h) { + ed.getWin().scrollTo(0, y < vp.y ? y : y - vp.h + 25); // Needs to be hardcoded to roughly one line of text if a huge text block is broken into two blocks - // Same element - if (sp == ep) - return re && sp && re.test(sp.nodeName) ? null : sp; + /*console.debug( + 'Element: y=' + y + ', h=' + ch + ', ' + + 'Viewport: y=' + vp.y + ", h=" + vp.h + ', bottom=' + (vp.y + vp.h) + );*/ } - return null; - }, - - InsertHorizontalRule : function() { - // Fix for Gecko
    issue and IE bug rep(/(.*?)<\/a>/gi,"[url=$1]$2[/url]"); - if (isGecko || isIE) - this.editor.selection.setContent('
    '); - else - this.editor.getDoc().execCommand('InsertHorizontalRule', false, ''); - }, - - RemoveFormat : function() { - var t = this, ed = t.editor, s = ed.selection, b; - - // Safari breaks tables - if (isWebKit) - s.setContent(s.getContent({format : 'raw'}).replace(/(<(span|b|i|strong|em|strike) [^>]+>|<(span|b|i|strong|em|strike)>|<\/(span|b|i|strong|em|strike)>|)/g, ''), {format : 'raw'}); - else - ed.getDoc().execCommand('RemoveFormat', false, null); + ed.undoManager.add(); - t.mceSetStyleInfo(0, {command : 'removeformat'}); - ed.addVisual(); + return FALSE; }, - mceSetStyleInfo : function(u, v) { - var t = this, ed = t.editor, d = ed.getDoc(), dom = ed.dom, e, b, s = ed.selection, nn = v.wrapper || 'span', b = s.getBookmark(), re; - - function set(n, e) { - if (n.nodeType == 1) { - switch (v.command) { - case 'setattrib': - return dom.setAttrib(n, v.name, v.value); + backspaceDelete : function(e, bs) { + var t = this, ed = t.editor, b = ed.getBody(), dom = ed.dom, n, se = ed.selection, r = se.getRng(), sc = r.startContainer, n, w, tn, walker; - case 'setstyle': - return dom.setStyle(n, v.name, v.value); + // Delete when caret is behind a element doesn't work correctly on Gecko see #3011651 + if (!bs && r.collapsed && sc.nodeType == 1 && r.startOffset == sc.childNodes.length) { + walker = new tinymce.dom.TreeWalker(sc.lastChild, sc); - case 'removeformat': - return dom.setAttrib(n, 'class', ''); + // Walk the dom backwards until we find a text node + for (n = sc.lastChild; n; n = walker.prev()) { + if (n.nodeType == 3) { + r.setStart(n, n.nodeValue.length); + r.collapse(true); + se.setRng(r); + return; } } - }; - - // Setup regexp - re = ed.settings.merge_styles_invalid_parents; - if (tinymce.is(re, 'string')) - re = new RegExp(re, 'i'); + } - // Set style info on selected element - if ((e = t.getSelectedElement()) && !ed.settings.force_span_wrappers) - set(e, 1); - else { - // Generate wrappers and set styles on them - d.execCommand('FontName', false, '__'); - each(isWebKit ? dom.select('span') : dom.select('font'), function(n) { - var sp, e; + // The caret sometimes gets stuck in Gecko if you delete empty paragraphs + // This workaround removes the element by hand and moves the caret to the previous element + if (sc && ed.dom.isBlock(sc) && !/^(TD|TH)$/.test(sc.nodeName) && bs) { + if (sc.childNodes.length == 0 || (sc.childNodes.length == 1 && sc.firstChild.nodeName == 'BR')) { + // Find previous block element + n = sc; + while ((n = n.previousSibling) && !ed.dom.isBlock(n)) ; - if (dom.getAttrib(n, 'face') == '__' || n.style.fontFamily === '__') { - sp = dom.create(nn, {mce_new : '1'}); + if (n) { + if (sc != b.firstChild) { + // Find last text node + w = ed.dom.doc.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, FALSE); + while (tn = w.nextNode()) + n = tn; - set(sp); + // Place caret at the end of last text node + r = ed.getDoc().createRange(); + r.setStart(n, n.nodeValue ? n.nodeValue.length : 0); + r.setEnd(n, n.nodeValue ? n.nodeValue.length : 0); + se.setRng(r); - each (n.childNodes, function(n) { - sp.appendChild(n.cloneNode(true)); - }); + // Remove the target container + ed.dom.remove(sc); + } - dom.replace(sp, n); + return Event.cancel(e); } - }); + } } + } + }); +})(tinymce); - // Remove wrappers inside new ones - each(dom.select(nn).reverse(), function(n) { - var p = n.parentNode; +(function(tinymce) { + // Shorten names + var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, extend = tinymce.extend; - // Check if it's an old span in a new wrapper - if (!dom.getAttrib(n, 'mce_new')) { - // Find new wrapper - p = dom.getParent(n, function(n) { - return n.nodeType == 1 && dom.getAttrib(n, 'mce_new'); - }); + tinymce.create('tinymce.ControlManager', { + ControlManager : function(ed, s) { + var t = this, i; - if (p) - dom.remove(n, 1); - } - }); + s = s || {}; + t.editor = ed; + t.controls = {}; + t.onAdd = new tinymce.util.Dispatcher(t); + t.onPostRender = new tinymce.util.Dispatcher(t); + t.prefix = s.prefix || ed.id + '_'; + t._cls = {}; - // Merge wrappers with parent wrappers - each(dom.select(nn).reverse(), function(n) { - var p = n.parentNode; + t.onPostRender.add(function() { + each(t.controls, function(c) { + c.postRender(); + }); + }); + }, - if (!p || !dom.getAttrib(n, 'mce_new')) - return; + get : function(id) { + return this.controls[this.prefix + id] || this.controls[id]; + }, - if (ed.settings.force_span_wrappers && p.nodeName != 'SPAN') - return; + setActive : function(id, s) { + var c = null; - // Has parent of the same type and only child - if (p.nodeName == nn.toUpperCase() && p.childNodes.length == 1) - return dom.remove(p, 1); + if (c = this.get(id)) + c.setActive(s); - // Has parent that is more suitable to have the class and only child - if (n.nodeType == 1 && (!re || !re.test(p.nodeName)) && p.childNodes.length == 1) { - set(p); // Set style info on parent instead - dom.setAttrib(n, 'class', ''); - } - }); + return c; + }, - // Remove empty wrappers - each(dom.select(nn).reverse(), function(n) { - if (dom.getAttrib(n, 'mce_new') || (dom.getAttribs(n).length <= 1 && n.className === '')) { - if (!dom.getAttrib(n, 'class') && !dom.getAttrib(n, 'style')) - return dom.remove(n, 1); + setDisabled : function(id, s) { + var c = null; - dom.setAttrib(n, 'mce_new', ''); // Remove mce_new marker - } - }); + if (c = this.get(id)) + c.setDisabled(s); - s.moveToBookmark(b); + return c; }, - queryStateJustify : function(c, v) { - var ed = this.editor, n = ed.selection.getNode(), dom = ed.dom; - - if (n && n.nodeName == 'IMG') { - if (dom.getStyle(n, 'float') == v) - return 1; + add : function(c) { + var t = this; - return n.parentNode.style.textAlign == v; + if (c) { + t.controls[c.id] = c; + t.onAdd.dispatch(c, t); } - n = dom.getParent(ed.selection.getStart(), function(n) { - return n.nodeType == 1 && n.style.textAlign; - }); - - if (v == 'full') - v = 'justify'; - - if (ed.settings.inline_styles) - return (n && n.style.textAlign == v); - - return this._queryState(c); + return c; }, - ForeColor : function(ui, v) { - var ed = this.editor; + createControl : function(n) { + var c, t = this, ed = t.editor; - if (ed.settings.convert_fonts_to_spans) { - this._applyInlineStyle('span', {style : {color : v}}); - return; - } else - ed.getDoc().execCommand('ForeColor', false, v); - }, + each(ed.plugins, function(p) { + if (p.createControl) { + c = p.createControl(n, t); - HiliteColor : function(ui, val) { - var t = this, ed = t.editor, d = ed.getDoc(); + if (c) + return false; + } + }); - if (ed.settings.convert_fonts_to_spans) { - this._applyInlineStyle('span', {style : {backgroundColor : val}}); - return; + switch (n) { + case "|": + case "separator": + return t.createSeparator(); } - function set(s) { - if (!isGecko) - return; - - try { - // Try new Gecko method - d.execCommand("styleWithCSS", 0, s); - } catch (ex) { - // Use old - d.execCommand("useCSS", 0, !s); - } - }; + if (!c && ed.buttons && (c = ed.buttons[n])) + return t.createButton(n, c); - if (isGecko || isOpera) { - set(true); - d.execCommand('hilitecolor', false, val); - set(false); - } else - d.execCommand('BackColor', false, val); + return t.add(c); }, - Undo : function() { - var ed = this.editor; + createDropMenu : function(id, s, cc) { + var t = this, ed = t.editor, c, bm, v, cls; - if (ed.settings.custom_undo_redo) { - ed.undoManager.undo(); - ed.nodeChanged(); - } else - ed.getDoc().execCommand('Undo', false, null); - }, + s = extend({ + 'class' : 'mceDropDown', + constrain : ed.settings.constrain_menus + }, s); - Redo : function() { - var ed = this.editor; + s['class'] = s['class'] + ' ' + ed.getParam('skin') + 'Skin'; + if (v = ed.getParam('skin_variant')) + s['class'] += ' ' + ed.getParam('skin') + 'Skin' + v.substring(0, 1).toUpperCase() + v.substring(1); - if (ed.settings.custom_undo_redo) { - ed.undoManager.redo(); - ed.nodeChanged(); - } else - ed.getDoc().execCommand('Redo', false, null); - }, + id = t.prefix + id; + cls = cc || t._cls.dropmenu || tinymce.ui.DropMenu; + c = t.controls[id] = new cls(id, s); + c.onAddItem.add(function(c, o) { + var s = o.settings; - FormatBlock : function(ui, val) { - var t = this, ed = t.editor, s = ed.selection, dom = ed.dom, bl, nb, b; + s.title = ed.getLang(s.title, s.title); - function isBlock(n) { - return /^(P|DIV|H[1-6]|ADDRESS|BLOCKQUOTE|PRE)$/.test(n.nodeName); - }; + if (!s.onclick) { + s.onclick = function(v) { + if (s.cmd) + ed.execCommand(s.cmd, s.ui || false, s.value); + }; + } + }); - bl = dom.getParent(s.getNode(), function(n) { - return isBlock(n); + ed.onRemove.add(function() { + c.destroy(); }); - // IE has an issue where it removes the parent div if you change format on the paragrah in

    Content

    - // FF and Opera doesn't change parent DIV elements if you switch format - if (bl) { - if ((isIE && isBlock(bl.parentNode)) || bl.nodeName == 'DIV') { - // Rename block element - nb = ed.dom.create(val); + // Fix for bug #1897785, #1898007 + if (tinymce.isIE) { + c.onShowMenu.add(function() { + // IE 8 needs focus in order to store away a range with the current collapsed caret location + ed.focus(); - each(dom.getAttribs(bl), function(v) { - dom.setAttrib(nb, v.nodeName, dom.getAttrib(bl, v.nodeName)); - }); + bm = ed.selection.getBookmark(1); + }); - b = s.getBookmark(); - dom.replace(nb, bl, 1); - s.moveToBookmark(b); - ed.nodeChanged(); - return; - } + c.onHideMenu.add(function() { + if (bm) { + ed.selection.moveToBookmark(bm); + bm = 0; + } + }); } - val = ed.settings.forced_root_block ? (val || '

    ') : val; - - if (val.indexOf('<') == -1) - val = '<' + val + '>'; + return t.add(c); + }, - if (tinymce.isGecko) - val = val.replace(/<(div|blockquote|code|dt|dd|dl|samp)>/gi, '$1'); + createListBox : function(id, s, cc) { + var t = this, ed = t.editor, cmd, c, cls; - ed.getDoc().execCommand('FormatBlock', false, val); - }, + if (t.get(id)) + return null; - mceCleanup : function() { - var ed = this.editor, s = ed.selection, b = s.getBookmark(); - ed.setContent(ed.getContent()); - s.moveToBookmark(b); - }, + s.title = ed.translate(s.title); + s.scope = s.scope || ed; - mceRemoveNode : function(ui, val) { - var ed = this.editor, s = ed.selection, b, n = val || s.getNode(); + if (!s.onselect) { + s.onselect = function(v) { + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; + } - // Make sure that the body node isn't removed - if (n == ed.getBody()) - return; + s = extend({ + title : s.title, + 'class' : 'mce_' + id, + scope : s.scope, + control_manager : t + }, s); - b = s.getBookmark(); - ed.dom.remove(n, 1); - s.moveToBookmark(b); - ed.nodeChanged(); - }, + id = t.prefix + id; - mceSelectNodeDepth : function(ui, val) { - var ed = this.editor, s = ed.selection, c = 0; + if (ed.settings.use_native_selects) + c = new tinymce.ui.NativeListBox(id, s); + else { + cls = cc || t._cls.listbox || tinymce.ui.ListBox; + c = new cls(id, s, ed); + } - ed.dom.getParent(s.getNode(), function(n) { - if (n.nodeType == 1 && c++ == val) { - s.select(n); - ed.nodeChanged(); - return false; - } - }, ed.getBody()); - }, + t.controls[id] = c; - mceSelectNode : function(u, v) { - this.editor.selection.select(v); - }, + // Fix focus problem in Safari + if (tinymce.isWebKit) { + c.onPostRender.add(function(c, n) { + // Store bookmark on mousedown + Event.add(n, 'mousedown', function() { + ed.bookmark = ed.selection.getBookmark(1); + }); - mceInsertContent : function(ui, val) { - this.editor.selection.setContent(val); - }, + // Restore on focus, since it might be lost + Event.add(n, 'focus', function() { + ed.selection.moveToBookmark(ed.bookmark); + ed.bookmark = null; + }); + }); + } - mceInsertRawHTML : function(ui, val) { - var ed = this.editor; + if (c.hideMenu) + ed.onMouseDown.add(c.hideMenu, c); - ed.selection.setContent('tiny_mce_marker'); - ed.setContent(ed.getContent().replace(/tiny_mce_marker/g, val)); + return t.add(c); }, - mceRepaint : function() { - var s, b, e = this.editor; + createButton : function(id, s, cc) { + var t = this, ed = t.editor, o, c, cls; - if (tinymce.isGecko) { - try { - s = e.selection; - b = s.getBookmark(true); + if (t.get(id)) + return null; - if (s.getSel()) - s.getSel().selectAllChildren(e.getBody()); + s.title = ed.translate(s.title); + s.label = ed.translate(s.label); + s.scope = s.scope || ed; - s.collapse(true); - s.moveToBookmark(b); - } catch (ex) { - // Ignore - } + if (!s.onclick && !s.menu_button) { + s.onclick = function() { + ed.execCommand(s.cmd, s.ui || false, s.value); + }; } - }, - - queryStateUnderline : function() { - var ed = this.editor, n = ed.selection.getNode(); - - if (n && n.nodeName == 'A') - return false; - return this._queryState('Underline'); - }, - - queryStateOutdent : function() { - var ed = this.editor, n; + s = extend({ + title : s.title, + 'class' : 'mce_' + id, + unavailable_prefix : ed.getLang('unavailable', ''), + scope : s.scope, + control_manager : t + }, s); - if (ed.settings.inline_styles) { - if ((n = ed.dom.getParent(ed.selection.getStart(), ed.dom.isBlock)) && parseInt(n.style.paddingLeft) > 0) - return true; + id = t.prefix + id; - if ((n = ed.dom.getParent(ed.selection.getEnd(), ed.dom.isBlock)) && parseInt(n.style.paddingLeft) > 0) - return true; + if (s.menu_button) { + cls = cc || t._cls.menubutton || tinymce.ui.MenuButton; + c = new cls(id, s, ed); + ed.onMouseDown.add(c.hideMenu, c); + } else { + cls = t._cls.button || tinymce.ui.Button; + c = new cls(id, s); } - return this.queryStateInsertUnorderedList() || this.queryStateInsertOrderedList() || (!ed.settings.inline_styles && !!ed.dom.getParent(ed.selection.getNode(), 'BLOCKQUOTE')); + return t.add(c); }, - queryStateInsertUnorderedList : function() { - return this.editor.dom.getParent(this.editor.selection.getNode(), 'UL'); - }, + createMenuButton : function(id, s, cc) { + s = s || {}; + s.menu_button = 1; - queryStateInsertOrderedList : function() { - return this.editor.dom.getParent(this.editor.selection.getNode(), 'OL'); + return this.createButton(id, s, cc); }, - queryStatemceBlockQuote : function() { - return !!this.editor.dom.getParent(this.editor.selection.getStart(), function(n) {return n.nodeName === 'BLOCKQUOTE';}); - }, + createSplitButton : function(id, s, cc) { + var t = this, ed = t.editor, cmd, c, cls; - mceBlockQuote : function() { - var t = this, ed = t.editor, s = ed.selection, dom = ed.dom, sb, eb, n, bm, bq, r, bq2, i, nl; + if (t.get(id)) + return null; - function getBQ(e) { - return dom.getParent(e, function(n) {return n.nodeName === 'BLOCKQUOTE';}); - }; + s.title = ed.translate(s.title); + s.scope = s.scope || ed; - // Get start/end block - sb = dom.getParent(s.getStart(), isBlock); - eb = dom.getParent(s.getEnd(), isBlock); + if (!s.onclick) { + s.onclick = function(v) { + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; + } - // Remove blockquote(s) - if (bq = getBQ(sb)) { - if (sb != eb || sb.childNodes.length > 1 || (sb.childNodes.length == 1 && sb.firstChild.nodeName != 'BR')) - bm = s.getBookmark(); + if (!s.onselect) { + s.onselect = function(v) { + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; + } - // Move all elements after the end block into new bq - if (getBQ(eb)) { - bq2 = bq.cloneNode(false); + s = extend({ + title : s.title, + 'class' : 'mce_' + id, + scope : s.scope, + control_manager : t + }, s); - while (n = eb.nextSibling) - bq2.appendChild(n.parentNode.removeChild(n)); - } + id = t.prefix + id; + cls = cc || t._cls.splitbutton || tinymce.ui.SplitButton; + c = t.add(new cls(id, s, ed)); + ed.onMouseDown.add(c.hideMenu, c); - // Add new bq after - if (bq2) - dom.insertAfter(bq2, bq); + return c; + }, - // Move all selected blocks after the current bq - nl = t._getSelectedBlocks(sb, eb); - for (i = nl.length - 1; i >= 0; i--) { - dom.insertAfter(nl[i], bq); - } + createColorSplitButton : function(id, s, cc) { + var t = this, ed = t.editor, cmd, c, cls, bm; - // Empty bq, then remove it - if (/^\s*$/.test(bq.innerHTML)) - dom.remove(bq, 1); // Keep children so boomark restoration works correctly + if (t.get(id)) + return null; - // Empty bq, then remote it - if (bq2 && /^\s*$/.test(bq2.innerHTML)) - dom.remove(bq2, 1); // Keep children so boomark restoration works correctly + s.title = ed.translate(s.title); + s.scope = s.scope || ed; - if (!bm) { - // Move caret inside empty block element - if (!isIE) { - r = ed.getDoc().createRange(); - r.setStart(sb, 0); - r.setEnd(sb, 0); - s.setRng(r); - } else { - s.select(sb); - s.collapse(0); - - // IE misses the empty block some times element so we must move back the caret - if (dom.getParent(s.getStart(), isBlock) != sb) { - r = s.getRng(); - r.move('character', -1); - r.select(); - } - } - } else - t.editor.selection.moveToBookmark(bm); + if (!s.onclick) { + s.onclick = function(v) { + if (tinymce.isIE) + bm = ed.selection.getBookmark(1); - return; + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; } - // Since IE can start with a totally empty document we need to add the first bq and paragraph - if (isIE && !sb && !eb) { - t.editor.getDoc().execCommand('Indent'); - n = getBQ(s.getNode()); - n.style.margin = n.dir = ''; // IE adds margin and dir to bq - return; + if (!s.onselect) { + s.onselect = function(v) { + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; } - if (!sb || !eb) - return; - - // If empty paragraph node then do not use bookmark - if (sb != eb || sb.childNodes.length > 1 || (sb.childNodes.length == 1 && sb.firstChild.nodeName != 'BR')) - bm = s.getBookmark(); - - // Move selected block elements into a bq - each(t._getSelectedBlocks(getBQ(s.getStart()), getBQ(s.getEnd())), function(e) { - // Found existing BQ add to this one - if (e.nodeName == 'BLOCKQUOTE' && !bq) { - bq = e; - return; - } - - // No BQ found, create one - if (!bq) { - bq = dom.create('blockquote'); - e.parentNode.insertBefore(bq, e); - } - - // Add children from existing BQ - if (e.nodeName == 'BLOCKQUOTE' && bq) { - n = e.firstChild; - - while (n) { - bq.appendChild(n.cloneNode(true)); - n = n.nextSibling; - } + s = extend({ + title : s.title, + 'class' : 'mce_' + id, + 'menu_class' : ed.getParam('skin') + 'Skin', + scope : s.scope, + more_colors_title : ed.getLang('more_colors') + }, s); - dom.remove(e); - return; - } + id = t.prefix + id; + cls = cc || t._cls.colorsplitbutton || tinymce.ui.ColorSplitButton; + c = new cls(id, s, ed); + ed.onMouseDown.add(c.hideMenu, c); - // Add non BQ element to BQ - bq.appendChild(dom.remove(e)); + // Remove the menu element when the editor is removed + ed.onRemove.add(function() { + c.destroy(); }); - if (!bm) { - // Move caret inside empty block element - if (!isIE) { - r = ed.getDoc().createRange(); - r.setStart(sb, 0); - r.setEnd(sb, 0); - s.setRng(r); - } else { - s.select(sb); - s.collapse(1); - } - } else - s.moveToBookmark(bm); - }, - - _applyInlineStyle : function(na, at, op) { - var t = this, ed = t.editor, dom = ed.dom, bm, lo = {}, kh; - - na = na.toUpperCase(); - - if (op && op.check_classes && at['class']) - op.check_classes.push(at['class']); - - function replaceFonts() { - var bm; - - each(dom.select(tinymce.isWebKit && !tinymce.isAir ? 'span' : 'font'), function(n) { - if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline') { - if (!bm) - bm = ed.selection.getBookmark(); + // Fix for bug #1897785, #1898007 + if (tinymce.isIE) { + c.onShowMenu.add(function() { + // IE 8 needs focus in order to store away a range with the current collapsed caret location + ed.focus(); + bm = ed.selection.getBookmark(1); + }); - at._mce_new = '1'; - dom.replace(dom.create(na, at), n, 1); + c.onHideMenu.add(function() { + if (bm) { + ed.selection.moveToBookmark(bm); + bm = 0; } }); + } - // Remove redundant elements - each(dom.select(na), function(n) { - if (n.getAttribute('_mce_new')) { - function removeStyle(n) { - if (n.nodeType == 1) { - each(at.style, function(v, k) { - dom.setStyle(n, k, ''); - }); - - // Remove spans with the same class or marked classes - if (at['class'] && n.className && op) { - each(op.check_classes, function(c) { - if (dom.hasClass(n, c)) - dom.removeClass(n, c); - }); - } - } - }; - - // Remove specified style information from child elements - each(dom.select(na, n), removeStyle); + return t.add(c); + }, - // Remove the specified style information on parent if current node is only child (IE) - if (n.parentNode && n.parentNode.nodeType == 1 && n.parentNode.childNodes.length == 1) - removeStyle(n.parentNode); + createToolbar : function(id, s, cc) { + var c, t = this, cls; - // Remove the child elements style info if a parent already has it - dom.getParent(n.parentNode, function(pn) { - if (pn.nodeType == 1) { - if (at.style) { - each(at.style, function(v, k) { - var sv; + id = t.prefix + id; + cls = cc || t._cls.toolbar || tinymce.ui.Toolbar; + c = new cls(id, s, t.editor); - if (!lo[k] && (sv = dom.getStyle(pn, k))) { - if (sv === v) - dom.setStyle(n, k, ''); + if (t.get(id)) + return null; - lo[k] = 1; - } - }); - } + return t.add(c); + }, + + createToolbarGroup : function(id, s, cc) { + var c, t = this, cls; + id = t.prefix + id; + cls = cc || this._cls.toolbarGroup || tinymce.ui.ToolbarGroup; + c = new cls(id, s, t.editor); + + if (t.get(id)) + return null; + + return t.add(c); + }, - // Remove spans with the same class or marked classes - if (at['class'] && pn.className && op) { - each(op.check_classes, function(c) { - if (dom.hasClass(pn, c)) - dom.removeClass(n, c); - }); - } - } + createSeparator : function(cc) { + var cls = cc || this._cls.separator || tinymce.ui.Separator; - return false; - }); + return new cls(); + }, - n.removeAttribute('_mce_new'); - } - }); + setControlType : function(n, c) { + return this._cls[n.toLowerCase()] = c; + }, + + destroy : function() { + each(this.controls, function(c) { + c.destroy(); + }); - // Remove empty span elements - each(dom.select(na).reverse(), function(n) { - var c = 0; + this.controls = null; + } + }); +})(tinymce); - // Check if there is any attributes - each(dom.getAttribs(n), function(an) { - if (an.nodeName.substring(0, 1) != '_' && dom.getAttrib(n, an.nodeName) != '') { - //console.log(dom.getOuterHTML(n), dom.getAttrib(n, an.nodeName)); - c++; - } - }); +(function(tinymce) { + var Dispatcher = tinymce.util.Dispatcher, each = tinymce.each, isIE = tinymce.isIE, isOpera = tinymce.isOpera; - // No attributes then remove the element and keep the children - if (c == 0) - dom.remove(n, 1); - }); + tinymce.create('tinymce.WindowManager', { + WindowManager : function(ed) { + var t = this; - ed.selection.moveToBookmark(bm); + t.editor = ed; + t.onOpen = new Dispatcher(t); + t.onClose = new Dispatcher(t); + t.params = {}; + t.features = {}; + }, - return !!bm; - }; + open : function(s, p) { + var t = this, f = '', x, y, mo = t.editor.settings.dialog_type == 'modal', w, sw, sh, vp = tinymce.DOM.getViewPort(), u; - // Create inline elements - ed.focus(); - ed.getDoc().execCommand('FontName', false, 'mceinline'); - replaceFonts(); + // Default some options + s = s || {}; + p = p || {}; + sw = isOpera ? vp.w : screen.width; // Opera uses windows inside the Opera window + sh = isOpera ? vp.h : screen.height; + s.name = s.name || 'mc_' + new Date().getTime(); + s.width = parseInt(s.width || 320); + s.height = parseInt(s.height || 240); + s.resizable = true; + s.left = s.left || parseInt(sw / 2.0) - (s.width / 2.0); + s.top = s.top || parseInt(sh / 2.0) - (s.height / 2.0); + p.inline = false; + p.mce_width = s.width; + p.mce_height = s.height; + p.mce_auto_focus = s.auto_focus; - if (kh = t._applyInlineStyle.keyhandler) { - ed.onKeyUp.remove(kh); - ed.onKeyPress.remove(kh); - ed.onKeyDown.remove(kh); - ed.onSetContent.remove(t._applyInlineStyle.chandler); + if (mo) { + if (isIE) { + s.center = true; + s.help = false; + s.dialogWidth = s.width + 'px'; + s.dialogHeight = s.height + 'px'; + s.scroll = s.scrollbars || false; + } } - if (ed.selection.isCollapsed()) { - // Start collecting styles - t._pendingStyles = tinymce.extend(t._pendingStyles || {}, at.style); + // Build features string + each(s, function(v, k) { + if (tinymce.is(v, 'boolean')) + v = v ? 'yes' : 'no'; - t._applyInlineStyle.chandler = ed.onSetContent.add(function() { - delete t._pendingStyles; - }); + if (!/^(name|url)$/.test(k)) { + if (isIE && mo) + f += (f ? ';' : '') + k + ':' + v; + else + f += (f ? ',' : '') + k + '=' + v; + } + }); - t._applyInlineStyle.keyhandler = kh = function(e) { - // Use pending styles - if (t._pendingStyles) { - at.style = t._pendingStyles; - delete t._pendingStyles; - } + t.features = s; + t.params = p; + t.onOpen.dispatch(t, s, p); - if (replaceFonts()) { - ed.onKeyDown.remove(t._applyInlineStyle.keyhandler); - ed.onKeyPress.remove(t._applyInlineStyle.keyhandler); - } + u = s.url || s.file; + u = tinymce._addVer(u); - if (e.type == 'keyup') - ed.onKeyUp.remove(t._applyInlineStyle.keyhandler); - }; + try { + if (isIE && mo) { + w = 1; + window.showModalDialog(u, window, f); + } else + w = window.open(u, s.name, f); + } catch (ex) { + // Ignore + } - ed.onKeyDown.add(kh); - ed.onKeyPress.add(kh); - ed.onKeyUp.add(kh); - } else - t._pendingStyles = 0; + if (!w) + alert(t.editor.getLang('popup_blocked')); }, -/* - _mceBlockQuote : function() { - var t = this, s = t.editor.selection, b = s.getBookmark(), bq, dom = t.editor.dom; + close : function(w) { + w.close(); + this.onClose.dispatch(this); + }, - function findBQ(e) { - return dom.getParent(e, function(n) {return n.nodeName === 'BLOCKQUOTE';}); - }; + createInstance : function(cl, a, b, c, d, e) { + var f = tinymce.resolve(cl); - // Remove blockquote(s) - if (findBQ(s.getStart())) { - each(t._getSelectedBlocks(findBQ(s.getStart()), findBQ(s.getEnd())), function(e) { - // Found BQ lets remove it - if (e.nodeName == 'BLOCKQUOTE') - dom.remove(e, 1); - }); + return new f(a, b, c, d, e); + }, - t.editor.selection.moveToBookmark(b); - return; - } + confirm : function(t, cb, s, w) { + w = w || window; + + cb.call(s || this, w.confirm(this._decode(this.editor.getLang(t, t)))); + }, - each(t._getSelectedBlocks(findBQ(s.getStart()), findBQ(s.getEnd())), function(e) { - var n; + alert : function(tx, cb, s, w) { + var t = this; - // Found existing BQ add to this one - if (e.nodeName == 'BLOCKQUOTE' && !bq) { - bq = e; - return; - } + w = w || window; + w.alert(t._decode(t.editor.getLang(tx, tx))); - // No BQ found, create one - if (!bq) { - bq = dom.create('blockquote'); - e.parentNode.insertBefore(bq, e); - } + if (cb) + cb.call(s || t); + }, - // Add children from existing BQ - if (e.nodeName == 'BLOCKQUOTE' && bq) { - n = e.firstChild; + resizeBy : function(dw, dh, win) { + win.resizeBy(dw, dh); + }, - while (n) { - bq.appendChild(n.cloneNode(true)); - n = n.nextSibling; - } + // Internal functions - dom.remove(e); + _decode : function(s) { + return tinymce.DOM.decode(s).replace(/\\n/g, '\n'); + } + }); +}(tinymce)); +(function(tinymce) { + tinymce.Formatter = function(ed) { + var formats = {}, + each = tinymce.each, + dom = ed.dom, + selection = ed.selection, + TreeWalker = tinymce.dom.TreeWalker, + rangeUtils = new tinymce.dom.RangeUtils(dom), + isValid = ed.schema.isValidChild, + isBlock = dom.isBlock, + forcedRootBlock = ed.settings.forced_root_block, + nodeIndex = dom.nodeIndex, + INVISIBLE_CHAR = '\uFEFF', + MCE_ATTR_RE = /^(src|href|style)$/, + FALSE = false, + TRUE = true, + undefined, + pendingFormats = {apply : [], remove : []}; + + function isArray(obj) { + return obj instanceof Array; + }; - return; - } + function getParents(node, selector) { + return dom.getParents(node, selector, dom.getRoot()); + }; - // Add non BQ element to BQ - bq.appendChild(dom.remove(e)); - }); + function isCaretNode(node) { + return node.nodeType === 1 && (node.face === 'mceinline' || node.style.fontFamily === 'mceinline'); + }; - t.editor.selection.moveToBookmark(b); - }, -*/ - _getSelectedBlocks : function(st, en) { - var ed = this.editor, dom = ed.dom, s = ed.selection, sb, eb, n, bl = []; + // Public functions - sb = dom.getParent(st || s.getStart(), isBlock); - eb = dom.getParent(en || s.getEnd(), isBlock); + function get(name) { + return name ? formats[name] : formats; + }; - if (sb) - bl.push(sb); + function register(name, format) { + if (name) { + if (typeof(name) !== 'string') { + each(name, function(format, name) { + register(name, format); + }); + } else { + // Force format into array and add it to internal collection + format = format.length ? format : [format]; + + each(format, function(format) { + // Set deep to false by default on selector formats this to avoid removing + // alignment on images inside paragraphs when alignment is changed on paragraphs + if (format.deep === undefined) + format.deep = !format.selector; + + // Default to true + if (format.split === undefined) + format.split = !format.selector || format.inline; + + // Default to true + if (format.remove === undefined && format.selector && !format.inline) + format.remove = 'none'; + + // Mark format as a mixed format inline + block level + if (format.selector && format.inline) { + format.mixed = true; + format.block_expand = true; + } - if (sb && eb && sb != eb) { - n = sb; + // Split classes if needed + if (typeof(format.classes) === 'string') + format.classes = format.classes.split(/\s+/); + }); - while ((n = n.nextSibling) && n != eb) { - if (isBlock(n)) - bl.push(n); + formats[name] = format; } } + }; - if (eb && sb != eb) - bl.push(eb); + var getTextDecoration = function(node) { + var decoration; - return bl; - } - }); -})(); + ed.dom.getParent(node, function(n) { + decoration = ed.dom.getStyle(n, 'text-decoration'); + return decoration && decoration !== 'none'; + }); + return decoration; + }; -/* file:jscripts/tiny_mce/classes/UndoManager.js */ + var processUnderlineAndColor = function(node) { + var textDecoration; + if (node.nodeType === 1 && node.parentNode && node.parentNode.nodeType === 1) { + textDecoration = getTextDecoration(node.parentNode); + if (ed.dom.getStyle(node, 'color') && textDecoration) { + ed.dom.setStyle(node, 'text-decoration', textDecoration); + } else if (ed.dom.getStyle(node, 'textdecoration') === textDecoration) { + ed.dom.setStyle(node, 'text-decoration', null); + } + } + }; -tinymce.create('tinymce.UndoManager', { - index : 0, - data : null, - typing : 0, + function apply(name, vars, node) { + var formatList = get(name), format = formatList[0], bookmark, rng, i, isCollapsed = selection.isCollapsed(); - UndoManager : function(ed) { - var t = this, Dispatcher = tinymce.util.Dispatcher; + function moveStart(rng) { + var container = rng.startContainer, + offset = rng.startOffset, + walker, node; - t.editor = ed; - t.data = []; - t.onAdd = new Dispatcher(this); - t.onUndo = new Dispatcher(this); - t.onRedo = new Dispatcher(this); - }, + // Move startContainer/startOffset in to a suitable node + if (container.nodeType == 1 || container.nodeValue === "") { + container = container.nodeType == 1 ? container.childNodes[offset] : container; - add : function(l) { - var t = this, i, ed = t.editor, b, s = ed.settings, la; + // Might fail if the offset is behind the last element in it's container + if (container) { + walker = new TreeWalker(container, container.parentNode); + for (node = walker.current(); node; node = walker.next()) { + if (node.nodeType == 3 && !isWhiteSpaceNode(node)) { + rng.setStart(node, 0); + break; + } + } + } + } - l = l || {}; - l.content = l.content || ed.getContent({format : 'raw', no_events : 1}); + return rng; + }; - // Add undo level if needed - l.content = l.content.replace(/^\s*|\s*$/g, ''); - la = t.data[t.index > 0 && (t.index == 0 || t.index == t.data.length) ? t.index - 1 : t.index]; - if (!l.initial && la && l.content == la.content) - return null; + function setElementFormat(elm, fmt) { + fmt = fmt || format; - // Time to compress - if (s.custom_undo_redo_levels) { - if (t.data.length > s.custom_undo_redo_levels) { - for (i = 0; i < t.data.length - 1; i++) - t.data[i] = t.data[i + 1]; + if (elm) { + each(fmt.styles, function(value, name) { + dom.setStyle(elm, name, replaceVars(value, vars)); + }); - t.data.length--; - t.index = t.data.length; - } - } + each(fmt.attributes, function(value, name) { + dom.setAttrib(elm, name, replaceVars(value, vars)); + }); - if (s.custom_undo_redo_restore_selection && !l.initial) - l.bookmark = b = l.bookmark || ed.selection.getBookmark(); + each(fmt.classes, function(value) { + value = replaceVars(value, vars); - if (t.index < t.data.length) - t.index++; + if (!dom.hasClass(elm, value)) + dom.addClass(elm, value); + }); + } + }; - // Only initial marked undo levels should be allowed as first item - // This to workaround a bug with Firefox and the blur event - if (t.data.length === 0 && !l.initial) - return null; + function applyRngStyle(rng) { + var newWrappers = [], wrapName, wrapElm; - // Add level - t.data.length = t.index + 1; - t.data[t.index++] = l; + // Setup wrapper element + wrapName = format.inline || format.block; + wrapElm = dom.create(wrapName); + setElementFormat(wrapElm); - if (l.initial) - t.index = 0; + rangeUtils.walk(rng, function(nodes) { + var currentWrapElm; - // Set initial bookmark use first real undo level - if (t.data.length == 2 && t.data[0].initial) - t.data[0].bookmark = b; + function process(node) { + var nodeName = node.nodeName.toLowerCase(), parentName = node.parentNode.nodeName.toLowerCase(), found; - t.onAdd.dispatch(t, l); - ed.isNotDirty = 0; + // Stop wrapping on br elements + if (isEq(nodeName, 'br')) { + currentWrapElm = 0; - //console.dir(t.data); + // Remove any br elements when we wrap things + if (format.block) + dom.remove(node); - return l; - }, + return; + } - undo : function() { - var t = this, ed = t.editor, l = l, i; + // If node is wrapper type + if (format.wrapper && matchNode(node, name, vars)) { + currentWrapElm = 0; + return; + } - if (t.typing) { - t.add(); - t.typing = 0; - } + // Can we rename the block + if (format.block && !format.wrapper && isTextBlock(nodeName)) { + node = dom.rename(node, wrapName); + setElementFormat(node); + newWrappers.push(node); + currentWrapElm = 0; + return; + } - if (t.index > 0) { - // If undo on last index then take snapshot - if (t.index == t.data.length && t.index > 1) { - i = t.index; - t.typing = 0; + // Handle selector patterns + if (format.selector) { + // Look for matching formats + each(formatList, function(format) { + // Check collapsed state if it exists + if ('collapsed' in format && format.collapsed !== isCollapsed) { + return; + } - if (!t.add()) - t.index = i; + if (dom.is(node, format.selector) && !isCaretNode(node)) { + setElementFormat(node, format); + found = true; + } + }); - --t.index; - } + // Continue processing if a selector match wasn't found and a inline element is defined + if (!format.inline || found) { + currentWrapElm = 0; + return; + } + } - l = t.data[--t.index]; - ed.setContent(l.content, {format : 'raw'}); - ed.selection.moveToBookmark(l.bookmark); + // Is it valid to wrap this item + if (isValid(wrapName, nodeName) && isValid(parentName, wrapName) && + !(node.nodeType === 3 && node.nodeValue.length === 1 && node.nodeValue.charCodeAt(0) === 65279)) { + // Start wrapping + if (!currentWrapElm) { + // Wrap the node + currentWrapElm = wrapElm.cloneNode(FALSE); + node.parentNode.insertBefore(currentWrapElm, node); + newWrappers.push(currentWrapElm); + } - t.onUndo.dispatch(t, l); - } + currentWrapElm.appendChild(node); + } else { + // Start a new wrapper for possible children + currentWrapElm = 0; - return l; - }, + each(tinymce.grep(node.childNodes), process); - redo : function() { - var t = this, ed = t.editor, l = null; + // End the last wrapper + currentWrapElm = 0; + } + }; - if (t.index < t.data.length - 1) { - l = t.data[++t.index]; - ed.setContent(l.content, {format : 'raw'}); - ed.selection.moveToBookmark(l.bookmark); + // Process siblings from range + each(nodes, process); + }); - t.onRedo.dispatch(t, l); - } + // Wrap links inside as well, for example color inside a link when the wrapper is around the link + if (format.wrap_links === false) { + each(newWrappers, function(node) { + function process(node) { + var i, currentWrapElm, children; - return l; - }, + if (node.nodeName === 'A') { + currentWrapElm = wrapElm.cloneNode(FALSE); + newWrappers.push(currentWrapElm); - clear : function() { - var t = this; + children = tinymce.grep(node.childNodes); + for (i = 0; i < children.length; i++) + currentWrapElm.appendChild(children[i]); - t.data = []; - t.index = 0; - t.typing = 0; - t.add({initial : true}); - }, + node.appendChild(currentWrapElm); + } - hasUndo : function() { - return this.index != 0 || this.typing; - }, + each(tinymce.grep(node.childNodes), process); + }; - hasRedo : function() { - return this.index < this.data.length - 1; - } + process(node); + }); + } - }); -/* file:jscripts/tiny_mce/classes/ForceBlocks.js */ + // Cleanup + each(newWrappers, function(node) { + var childCount; -(function() { - // Shorten names - var Event, isIE, isGecko, isOpera, each, extend; + function getChildCount(node) { + var count = 0; - Event = tinymce.dom.Event; - isIE = tinymce.isIE; - isGecko = tinymce.isGecko; - isOpera = tinymce.isOpera; - each = tinymce.each; - extend = tinymce.extend; + each(node.childNodes, function(node) { + if (!isWhiteSpaceNode(node) && !isBookmarkNode(node)) + count++; + }); - tinymce.create('tinymce.ForceBlocks', { - ForceBlocks : function(ed) { - var t = this, s = ed.settings, elm; + return count; + }; - t.editor = ed; - t.dom = ed.dom; - elm = (s.forced_root_block || 'p').toLowerCase(); - s.element = elm.toUpperCase(); + function mergeStyles(node) { + var child, clone; - ed.onPreInit.add(t.setup, t); + each(node.childNodes, function(node) { + if (node.nodeType == 1 && !isBookmarkNode(node) && !isCaretNode(node)) { + child = node; + return FALSE; // break loop + } + }); - t.reOpera = new RegExp('(\\u00a0| | )<\/' + elm + '>', 'gi'); - t.rePadd = new RegExp(']+)><\\\/p>|]+)\\\/>|]+)>\\s+<\\\/p>|

    <\\\/p>||

    \\s+<\\\/p>'.replace(/p/g, elm), 'gi'); - t.reNbsp2BR1 = new RegExp(']+)>[\\s\\u00a0]+<\\\/p>|

    [\\s\\u00a0]+<\\\/p>'.replace(/p/g, elm), 'gi'); - t.reNbsp2BR2 = new RegExp(']+)>( | )<\\\/p>|

    ( | )<\\\/p>'.replace(/p/g, elm), 'gi'); - t.reBR2Nbsp = new RegExp(']+)>\\s*
    \\s*<\\\/p>|

    \\s*
    \\s*<\\\/p>'.replace(/p/g, elm), 'gi'); - t.reTrailBr = new RegExp('\\s*
    \\s*<\\\/p>'.replace(/p/g, elm), 'gi'); + // If child was found and of the same type as the current node + if (child && matchName(child, format)) { + clone = child.cloneNode(FALSE); + setElementFormat(clone); - function padd(ed, o) { - if (isOpera) - o.content = o.content.replace(t.reOpera, ''); + dom.replace(clone, node, TRUE); + dom.remove(child, 1); + } - o.content = o.content.replace(t.rePadd, '<' + elm + '$1$2$3$4$5$6>\u00a0'); + return clone || node; + }; - if (!isIE && !isOpera && o.set) { - // Use   instead of BR in padded paragraphs - o.content = o.content.replace(t.reNbsp2BR1, '<' + elm + '$1$2>
    '); - o.content = o.content.replace(t.reNbsp2BR2, '<' + elm + '$1$2>
    '); - } else { - o.content = o.content.replace(t.reBR2Nbsp, '<' + elm + '$1$2>\u00a0'); - o.content = o.content.replace(t.reTrailBr, ''); - } - }; + childCount = getChildCount(node); - ed.onBeforeSetContent.add(padd); - ed.onPostProcess.add(padd); + // Remove empty nodes but only if there is multiple wrappers and they are not block + // elements so never remove single

    since that would remove the currrent empty block element where the caret is at + if ((newWrappers.length > 1 || !isBlock(node)) && childCount === 0) { + dom.remove(node, 1); + return; + } - if (s.forced_root_block) { - ed.onInit.add(t.forceRoots, t); - ed.onSetContent.add(t.forceRoots, t); - ed.onBeforeGetContent.add(t.forceRoots, t); - } - }, + if (format.inline || format.wrapper) { + // Merges the current node with it's children of similar type to reduce the number of elements + if (!format.exact && childCount === 1) + node = mergeStyles(node); + + // Remove/merge children + each(formatList, function(format) { + // Merge all children of similar type will move styles from child to parent + // this: text + // will become: text + each(dom.select(format.inline, node), function(child) { + var parent; + + // When wrap_links is set to false we don't want + // to remove the format on children within links + if (format.wrap_links === false) { + parent = child.parentNode; + + do { + if (parent.nodeName === 'A') + return; + } while (parent = parent.parentNode); + } - setup : function() { - var t = this, ed = t.editor, s = ed.settings; + removeFormat(format, vars, child, format.exact ? child : null); + }); + }); - // Force root blocks when typing and when getting output - if (s.forced_root_block) { - ed.onKeyUp.add(t.forceRoots, t); - ed.onPreProcess.add(t.forceRoots, t); - } + // Remove child if direct parent is of same type + if (matchNode(node.parentNode, name, vars)) { + dom.remove(node, 1); + node = 0; + return TRUE; + } - if (s.force_br_newlines) { - // Force IE to produce BRs on enter - if (isIE) { - ed.onKeyPress.add(function(ed, e) { - var n, s = ed.selection; + // Look for parent with similar style format + if (format.merge_with_parents) { + dom.getParent(node.parentNode, function(parent) { + if (matchNode(parent, name, vars)) { + dom.remove(node, 1); + node = 0; + return TRUE; + } + }); + } - if (e.keyCode == 13 && s.getNode().nodeName != 'LI') { - s.setContent('
    ', {format : 'raw'}); - n = ed.dom.get('__'); - n.removeAttribute('id'); - s.select(n); - s.collapse(); - return Event.cancel(e); + // Merge next and previous siblings if they are similar texttext becomes texttext + if (node) { + node = mergeSiblings(getNonWhiteSpaceSibling(node), node); + node = mergeSiblings(node, getNonWhiteSpaceSibling(node, TRUE)); } - }); - } + } + }); + }; - return; - } + if (format) { + if (node) { + rng = dom.createRng(); - if (!isIE && s.force_p_newlines) { -/* ed.onPreProcess.add(function(ed, o) { - each(ed.dom.select('br', o.node), function(n) { - var p = n.parentNode; + rng.setStartBefore(node); + rng.setEndAfter(node); - // Replace


    with

     

    - if (p && p.nodeName == 'p' && (p.childNodes.length == 1 || p.lastChild == n)) { - p.replaceChild(ed.getDoc().createTextNode('\u00a0'), n); + applyRngStyle(expandRng(rng, formatList)); + } else { + if (!isCollapsed || !format.inline || dom.select('td.mceSelected,th.mceSelected').length) { + // Obtain selection node before selection is unselected by applyRngStyle() + var curSelNode = ed.selection.getNode(); + + // Apply formatting to selection + bookmark = selection.getBookmark(); + applyRngStyle(expandRng(selection.getRng(TRUE), formatList)); + + // Colored nodes should be underlined so that the color of the underline matches the text color. + if (format.styles && (format.styles.color || format.styles.textDecoration)) { + tinymce.walk(curSelNode, processUnderlineAndColor, 'childNodes'); + processUnderlineAndColor(curSelNode); } - }); - });*/ - - ed.onKeyPress.add(function(ed, e) { - if (e.keyCode == 13 && !e.shiftKey) { - if (!t.insertPara(e)) - Event.cancel(e); - } - }); - if (isGecko) { - ed.onKeyDown.add(function(ed, e) { - if ((e.keyCode == 8 || e.keyCode == 46) && !e.shiftKey) - t.backspaceDelete(e, e.keyCode == 8); - }); + selection.moveToBookmark(bookmark); + selection.setRng(moveStart(selection.getRng(TRUE))); + ed.nodeChanged(); + } else + performCaretAction('apply', name, vars); } } + }; - function ren(rn, na) { - var ne = ed.dom.create(na); - - each(rn.attributes, function(a) { - if (a.specified && a.nodeValue) - ne.setAttribute(a.nodeName.toLowerCase(), a.nodeValue); - }); + function remove(name, vars, node) { + var formatList = get(name), format = formatList[0], bookmark, i, rng; - each(rn.childNodes, function(n) { - ne.appendChild(n.cloneNode(true)); - }); + function moveStart(rng) { + var container = rng.startContainer, + offset = rng.startOffset, + walker, node, nodes, tmpNode; - rn.parentNode.replaceChild(ne, rn); + // Convert text node into index if possible + if (container.nodeType == 3 && offset >= container.nodeValue.length - 1) { + container = container.parentNode; + offset = nodeIndex(container) + 1; + } - return ne; - }; + // Move startContainer/startOffset in to a suitable node + if (container.nodeType == 1) { + nodes = container.childNodes; + container = nodes[Math.min(offset, nodes.length - 1)]; + walker = new TreeWalker(container); - // Replaces IE:s auto generated paragraphs with the specified element name - if (isIE && s.element != 'P') { - ed.onKeyPress.add(function(ed, e) { - t.lastElm = ed.selection.getNode().nodeName; - }); + // If offset is at end of the parent node walk to the next one + if (offset > nodes.length - 1) + walker.next(); - ed.onKeyUp.add(function(ed, e) { - var bl, sel = ed.selection, n = sel.getNode(), b = ed.getBody(); + for (node = walker.current(); node; node = walker.next()) { + if (node.nodeType == 3 && !isWhiteSpaceNode(node)) { + // IE has a "neat" feature where it moves the start node into the closest element + // we can avoid this by inserting an element before it and then remove it after we set the selection + tmpNode = dom.create('a', null, INVISIBLE_CHAR); + node.parentNode.insertBefore(tmpNode, node); - if (b.childNodes.length === 1 && n.nodeName == 'P') { - n = ren(n, s.element); - sel.select(n); - sel.collapse(); - ed.nodeChanged(); - } else if (e.keyCode == 13 && !e.shiftKey && t.lastElm != 'P') { - bl = ed.dom.getParent(n, 'P'); + // Set selection and remove tmpNode + rng.setStart(node, 0); + selection.setRng(rng); + dom.remove(tmpNode); - if (bl) { - ren(bl, s.element); - ed.nodeChanged(); + return; } } - }); - } - }, - - find : function(n, t, s) { - var ed = this.editor, w = ed.getDoc().createTreeWalker(n, 4, null, false), c = -1; - - while (n = w.nextNode()) { - c++; - - // Index by node - if (t == 0 && n == s) - return c; - - // Node by index - if (t == 1 && c == s) - return n; - } + } + }; - return -1; - }, + // Merges the styles for each node + function process(node) { + var children, i, l; - forceRoots : function(ed, e) { - var t = this, ed = t.editor, b = ed.getBody(), d = ed.getDoc(), se = ed.selection, s = se.getSel(), r = se.getRng(), si = -2, ei, so, eo, tr, c = -0xFFFFFF; - var nx, bl, bp, sp, le, nl = b.childNodes, i, n, eid; + // Grab the children first since the nodelist might be changed + children = tinymce.grep(node.childNodes); - // Fix for bug #1863847 - //if (e && e.keyCode == 13) - // return true; + // Process current node + for (i = 0, l = formatList.length; i < l; i++) { + if (removeFormat(formatList[i], vars, node, node)) + break; + } - // Wrap non blocks into blocks - for (i = nl.length - 1; i >= 0; i--) { - nx = nl[i]; + // Process the children + if (format.deep) { + for (i = 0, l = children.length; i < l; i++) + process(children[i]); + } + }; - // Is text or non block element - if (nx.nodeType == 3 || (!t.dom.isBlock(nx) && nx.nodeType != 8)) { - if (!bl) { - // Create new block but ignore whitespace - if (nx.nodeType != 3 || /[^\s]/g.test(nx.nodeValue)) { - // Store selection - if (si == -2 && r) { - if (!isIE) { - // If selection is element then mark it - if (r.startContainer.nodeType == 1 && (n = r.startContainer.childNodes[r.startOffset]) && n.nodeType == 1) { - // Save the id of the selected element - eid = n.getAttribute("id"); - n.setAttribute("id", "__mce"); - } else { - // If element is inside body, might not be the case in contentEdiable mode - if (ed.dom.getParent(r.startContainer, function(e) {return e === b;})) { - so = r.startOffset; - eo = r.endOffset; - si = t.find(b, 0, r.startContainer); - ei = t.find(b, 0, r.endContainer); - } - } - } else { - tr = d.body.createTextRange(); - tr.moveToElementText(b); - tr.collapse(1); - bp = tr.move('character', c) * -1; + function findFormatRoot(container) { + var formatRoot; - tr = r.duplicate(); - tr.collapse(1); - sp = tr.move('character', c) * -1; + // Find format root + each(getParents(container.parentNode).reverse(), function(parent) { + var format; - tr = r.duplicate(); - tr.collapse(0); - le = (tr.move('character', c) * -1) - sp; + // Find format root element + if (!formatRoot && parent.id != '_start' && parent.id != '_end') { + // Is the node matching the format we are looking for + format = matchNode(parent, name, vars); + if (format && format.split !== false) + formatRoot = parent; + } + }); - si = sp - bp; - ei = le; - } - } + return formatRoot; + }; - bl = ed.dom.create(ed.settings.forced_root_block); - bl.appendChild(nx.cloneNode(1)); - nx.parentNode.replaceChild(bl, nx); - } - } else { - if (bl.hasChildNodes()) - bl.insertBefore(nx, bl.firstChild); - else - bl.appendChild(nx); - } - } else - bl = null; // Time to create new block - } + function wrapAndSplit(format_root, container, target, split) { + var parent, clone, lastClone, firstClone, i, formatRootParent; - // Restore selection - if (si != -2) { - if (!isIE) { - bl = b.getElementsByTagName(ed.settings.element)[0]; - r = d.createRange(); + // Format root found then clone formats and split it + if (format_root) { + formatRootParent = format_root.parentNode; - // Select last location or generated block - if (si != -1) - r.setStart(t.find(b, 1, si), so); - else - r.setStart(bl, 0); + for (parent = container.parentNode; parent && parent != formatRootParent; parent = parent.parentNode) { + clone = parent.cloneNode(FALSE); - // Select last location or generated block - if (ei != -1) - r.setEnd(t.find(b, 1, ei), eo); - else - r.setEnd(bl, 0); + for (i = 0; i < formatList.length; i++) { + if (removeFormat(formatList[i], vars, clone, clone)) { + clone = 0; + break; + } + } - if (s) { - s.removeAllRanges(); - s.addRange(r); + // Build wrapper node + if (clone) { + if (lastClone) + clone.appendChild(lastClone); + + if (!firstClone) + firstClone = clone; + + lastClone = clone; + } } - } else { - try { - r = s.createRange(); - r.moveToElementText(b); - r.collapse(1); - r.moveStart('character', si); - r.moveEnd('character', ei); - r.select(); - } catch (ex) { - // Ignore + + // Never split block elements if the format is mixed + if (split && (!format.mixed || !isBlock(format_root))) + container = dom.split(format_root, container); + + // Wrap container in cloned formats + if (lastClone) { + target.parentNode.insertBefore(lastClone, target); + firstClone.appendChild(target); } } - } else if (!isIE && (n = ed.dom.get('__mce'))) { - // Restore the id of the selected element - if (eid) - n.setAttribute('id', eid); - else - n.removeAttribute('id'); - // Move caret before selected element - r = d.createRange(); - r.setStartBefore(n); - r.setEndBefore(n); - se.setRng(r); - } - }, + return container; + }; - getParentBlock : function(n) { - var d = this.dom; + function splitToFormatRoot(container) { + return wrapAndSplit(findFormatRoot(container), container, container, true); + }; - return d.getParent(n, d.isBlock); - }, + function unwrap(start) { + var node = dom.get(start ? '_start' : '_end'), + out = node[start ? 'firstChild' : 'lastChild']; - insertPara : function(e) { - var t = this, ed = t.editor, dom = ed.dom, d = ed.getDoc(), se = ed.settings, s = ed.selection.getSel(), r = s.getRangeAt(0), b = d.body; - var rb, ra, dir, sn, so, en, eo, sb, eb, bn, bef, aft, sc, ec, n, vp = dom.getViewPort(ed.getWin()), y, ch, car; + // If the end is placed within the start the result will be removed + // So this checks if the out node is a bookmark node if it is it + // checks for another more suitable node + if (isBookmarkNode(out)) + out = out[start ? 'firstChild' : 'lastChild']; - function isEmpty(n) { - n = n.innerHTML; - n = n.replace(/<(img|hr|table)/gi, '-'); // Keep these convert them to - chars - n = n.replace(/<[^>]+>/g, ''); // Remove all tags + dom.remove(node, true); - return n.replace(/[ \t\r\n]+/g, '') == ''; + return out; }; - // If root blocks are forced then use Operas default behavior since it's really good -// Removed due to bug: #1853816 -// if (se.forced_root_block && isOpera) -// return true; + function removeRngStyle(rng) { + var startContainer, endContainer; - // Setup before range - rb = d.createRange(); + rng = expandRng(rng, formatList, TRUE); - // If is before the first block element and in body, then move it into first block element - rb.setStart(s.anchorNode, s.anchorOffset); - rb.collapse(true); + if (format.split) { + startContainer = getContainer(rng, TRUE); + endContainer = getContainer(rng); - // Setup after range - ra = d.createRange(); + if (startContainer != endContainer) { + // Wrap start/end nodes in span element since these might be cloned/moved + startContainer = wrap(startContainer, 'span', {id : '_start', 'data-mce-type' : 'bookmark'}); + endContainer = wrap(endContainer, 'span', {id : '_end', 'data-mce-type' : 'bookmark'}); - // If is before the first block element and in body, then move it into first block element - ra.setStart(s.focusNode, s.focusOffset); - ra.collapse(true); + // Split start/end + splitToFormatRoot(startContainer); + splitToFormatRoot(endContainer); - // Setup start/end points - dir = rb.compareBoundaryPoints(rb.START_TO_END, ra) < 0; - sn = dir ? s.anchorNode : s.focusNode; - so = dir ? s.anchorOffset : s.focusOffset; - en = dir ? s.focusNode : s.anchorNode; - eo = dir ? s.focusOffset : s.anchorOffset; + // Unwrap start/end to get real elements again + startContainer = unwrap(TRUE); + endContainer = unwrap(); + } else + startContainer = endContainer = splitToFormatRoot(startContainer); - // If selection is in empty table cell - if (sn === en && /^(TD|TH)$/.test(sn.nodeName)) { - dom.remove(sn.firstChild); // Remove BR + // Update range positions since they might have changed after the split operations + rng.startContainer = startContainer.parentNode; + rng.startOffset = nodeIndex(startContainer); + rng.endContainer = endContainer.parentNode; + rng.endOffset = nodeIndex(endContainer) + 1; + } - // Create two new block elements - ed.dom.add(sn, se.element, null, '
    '); - aft = ed.dom.add(sn, se.element, null, '
    '); + // Remove items between start/end + rangeUtils.walk(rng, function(nodes) { + each(nodes, function(node) { + process(node); - // Move caret into the last one - r = d.createRange(); - r.selectNodeContents(aft); - r.collapse(1); - ed.selection.setRng(r); + // Remove parent span if it only contains text-decoration: underline, yet a parent node is also underlined. + if (node.nodeType === 1 && ed.dom.getStyle(node, 'text-decoration') === 'underline' && node.parentNode && getTextDecoration(node.parentNode) === 'underline') { + removeFormat({'deep': false, 'exact': true, 'inline': 'span', 'styles': {'textDecoration' : 'underline'}}, null, node); + } + }); + }); + }; - return false; + // Handle node + if (node) { + rng = dom.createRng(); + rng.setStartBefore(node); + rng.setEndAfter(node); + removeRngStyle(rng); + return; } - // If the caret is in an invalid location in FF we need to move it into the first block - if (sn == b && en == b && b.firstChild && ed.dom.isBlock(b.firstChild)) { - sn = en = sn.firstChild; - so = eo = 0; - rb = d.createRange(); - rb.setStart(sn, 0); - ra = d.createRange(); - ra.setStart(en, 0); - } + if (!selection.isCollapsed() || !format.inline || dom.select('td.mceSelected,th.mceSelected').length) { + bookmark = selection.getBookmark(); + removeRngStyle(selection.getRng(TRUE)); + selection.moveToBookmark(bookmark); - // Never use body as start or end node - sn = sn.nodeName == "HTML" ? d.body : sn; // Fix for Opera bug: https://bugs.opera.com/show_bug.cgi?id=273224&comments=yes - sn = sn.nodeName == "BODY" ? sn.firstChild : sn; - en = en.nodeName == "HTML" ? d.body : en; // Fix for Opera bug: https://bugs.opera.com/show_bug.cgi?id=273224&comments=yes - en = en.nodeName == "BODY" ? en.firstChild : en; + // Check if start element still has formatting then we are at: "text|text" and need to move the start into the next text node + if (match(name, vars, selection.getStart())) { + moveStart(selection.getRng(true)); + } - // Get start and end blocks - sb = t.getParentBlock(sn); - eb = t.getParentBlock(en); - bn = sb ? sb.nodeName : se.element; // Get block name to create + ed.nodeChanged(); + } else + performCaretAction('remove', name, vars); + }; - // Return inside list use default browser behavior - if (t.dom.getParent(sb, function(n) { return /OL|UL|PRE/.test(n.nodeName); })) - return true; + function toggle(name, vars, node) { + var fmt = get(name); - // If caption or absolute layers then always generate new blocks within - if (sb && (sb.nodeName == 'CAPTION' || /absolute|relative|static/gi.test(sb.style.position))) { - bn = se.element; - sb = null; - } + if (match(name, vars, node) && (!('toggle' in fmt[0]) || fmt[0]['toggle'])) + remove(name, vars, node); + else + apply(name, vars, node); + }; - // If caption or absolute layers then always generate new blocks within - if (eb && (eb.nodeName == 'CAPTION' || /absolute|relative|static/gi.test(eb.style.position))) { - bn = se.element; - eb = null; - } + function matchNode(node, name, vars, similar) { + var formatList = get(name), format, i, classes; - // Use P instead - if (/(TD|TABLE|TH|CAPTION)/.test(bn) || (sb && bn == "DIV" && /left|right/gi.test(sb.style.cssFloat))) { - bn = se.element; - sb = eb = null; - } + function matchItems(node, format, item_name) { + var key, value, items = format[item_name], i; - // Setup new before and after blocks - bef = (sb && sb.nodeName == bn) ? sb.cloneNode(0) : ed.dom.create(bn); - aft = (eb && eb.nodeName == bn) ? eb.cloneNode(0) : ed.dom.create(bn); + // Check all items + if (items) { + // Non indexed object + if (items.length === undefined) { + for (key in items) { + if (items.hasOwnProperty(key)) { + if (item_name === 'attributes') + value = dom.getAttrib(node, key); + else + value = getStyle(node, key); - // Remove id from after clone - aft.removeAttribute('id'); + if (similar && !value && !format.exact) + return; - // Is header and cursor is at the end, then force paragraph under - if (/^(H[1-6])$/.test(bn) && sn.nodeValue && so == sn.nodeValue.length) - aft = ed.dom.create(se.element); + if ((!similar || format.exact) && !isEq(value, replaceVars(items[key], vars))) + return; + } + } + } else { + // Only one match needed for indexed arrays + for (i = 0; i < items.length; i++) { + if (item_name === 'attributes' ? dom.getAttrib(node, items[i]) : getStyle(node, items[i])) + return format; + } + } + } - // Find start chop node - n = sc = sn; - do { - if (n == b || n.nodeType == 9 || t.dom.isBlock(n) || /(TD|TABLE|TH|CAPTION)/.test(n.nodeName)) - break; + return format; + }; - sc = n; - } while ((n = n.previousSibling ? n.previousSibling : n.parentNode)); + if (formatList && node) { + // Check each format in list + for (i = 0; i < formatList.length; i++) { + format = formatList[i]; + + // Name name, attributes, styles and classes + if (matchName(node, format) && matchItems(node, format, 'attributes') && matchItems(node, format, 'styles')) { + // Match classes + if (classes = format.classes) { + for (i = 0; i < classes.length; i++) { + if (!dom.hasClass(node, classes[i])) + return; + } + } - // Find end chop node - n = ec = en; - do { - if (n == b || n.nodeType == 9 || t.dom.isBlock(n) || /(TD|TABLE|TH|CAPTION)/.test(n.nodeName)) - break; + return format; + } + } + } + }; - ec = n; - } while ((n = n.nextSibling ? n.nextSibling : n.parentNode)); + function match(name, vars, node) { + var startNode, i; - // Place first chop part into before block element - if (sc.nodeName == bn) - rb.setStart(sc, 0); - else - rb.setStartBefore(sc); + function matchParents(node) { + // Find first node with similar format settings + node = dom.getParent(node, function(node) { + return !!matchNode(node, name, vars, true); + }); - rb.setEnd(sn, so); - bef.appendChild(rb.cloneContents() || d.createTextNode('')); // Empty text node needed for Safari + // Do an exact check on the similar format element + return matchNode(node, name, vars); + }; - // Place secnd chop part within new block element - try { - ra.setEndAfter(ec); - } catch(ex) { - //console.debug(s.focusNode, s.focusOffset); + // Check specified node + if (node) + return matchParents(node); + + // Check pending formats + if (selection.isCollapsed()) { + for (i = pendingFormats.apply.length - 1; i >= 0; i--) { + if (pendingFormats.apply[i].name == name) + return true; + } + + for (i = pendingFormats.remove.length - 1; i >= 0; i--) { + if (pendingFormats.remove[i].name == name) + return false; + } + + return matchParents(selection.getNode()); } - ra.setStart(en, eo); - aft.appendChild(ra.cloneContents() || d.createTextNode('')); // Empty text node needed for Safari + // Check selected node + node = selection.getNode(); + if (matchParents(node)) + return TRUE; - // Create range around everything - r = d.createRange(); - if (!sc.previousSibling && sc.parentNode.nodeName == bn) { - r.setStartBefore(sc.parentNode); - } else { - if (rb.startContainer.nodeName == bn && rb.startOffset == 0) - r.setStartBefore(rb.startContainer); - else - r.setStart(rb.startContainer, rb.startOffset); + // Check start node if it's different + startNode = selection.getStart(); + if (startNode != node) { + if (matchParents(startNode)) + return TRUE; } - if (!ec.nextSibling && ec.parentNode.nodeName == bn) - r.setEndAfter(ec.parentNode); - else - r.setEnd(ra.endContainer, ra.endOffset); + return FALSE; + }; - // Delete and replace it with new block elements - r.deleteContents(); + function matchAll(names, vars) { + var startElement, matchedFormatNames = [], checkedMap = {}, i, ni, name; - if (isOpera) - ed.getWin().scrollTo(0, vp.y); + // If the selection is collapsed then check pending formats + if (selection.isCollapsed()) { + for (ni = 0; ni < names.length; ni++) { + // If the name is to be removed, then stop it from being added + for (i = pendingFormats.remove.length - 1; i >= 0; i--) { + name = names[ni]; - // Never wrap blocks in blocks - if (bef.firstChild && bef.firstChild.nodeName == bn) - bef.innerHTML = bef.firstChild.innerHTML; + if (pendingFormats.remove[i].name == name) { + checkedMap[name] = true; + break; + } + } + } - if (aft.firstChild && aft.firstChild.nodeName == bn) - aft.innerHTML = aft.firstChild.innerHTML; + // If the format is to be applied + for (i = pendingFormats.apply.length - 1; i >= 0; i--) { + for (ni = 0; ni < names.length; ni++) { + name = names[ni]; - // Padd empty blocks - if (isEmpty(bef)) - bef.innerHTML = '
    '; + if (!checkedMap[name] && pendingFormats.apply[i].name == name) { + checkedMap[name] = true; + matchedFormatNames.push(name); + } + } + } + } - function appendStyles(e, en) { - var nl = [], nn, n, i; + // Check start of selection for formats + startElement = selection.getStart(); + dom.getParent(startElement, function(node) { + var i, name; - e.innerHTML = ''; + for (i = 0; i < names.length; i++) { + name = names[i]; - // Make clones of style elements - if (se.keep_styles) { - n = en; - do { - // We only want style specific elements - if (/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(n.nodeName)) { - nn = n.cloneNode(false); - dom.setAttrib(nn, 'id', ''); // Remove ID since it needs to be unique - nl.push(nn); - } - } while (n = n.parentNode); + if (!checkedMap[name] && matchNode(node, name, vars)) { + checkedMap[name] = true; + matchedFormatNames.push(name); + } } + }); - // Append style elements to aft - if (nl.length > 0) { - for (i = nl.length - 1, nn = e; i >= 0; i--) - nn = nn.appendChild(nl[i]); + return matchedFormatNames; + }; - // Padd most inner style element - nl[0].innerHTML = isOpera ? ' ' : '
    '; // Extra space for Opera so that the caret can move there - return nl[0]; // Move caret to most inner element - } else - e.innerHTML = isOpera ? ' ' : '
    '; // Extra space for Opera so that the caret can move there - }; + function canApply(name) { + var formatList = get(name), startNode, parents, i, x, selector; - // Fill empty afterblook with current style - if (isEmpty(aft)) - car = appendStyles(aft, en); + if (formatList) { + startNode = selection.getStart(); + parents = getParents(startNode); - // Opera needs this one backwards for older versions - if (isOpera && parseFloat(opera.version()) < 9.5) { - r.insertNode(bef); - r.insertNode(aft); - } else { - r.insertNode(aft); - r.insertNode(bef); + for (x = formatList.length - 1; x >= 0; x--) { + selector = formatList[x].selector; + + // Format is not selector based, then always return TRUE + if (!selector) + return TRUE; + + for (i = parents.length - 1; i >= 0; i--) { + if (dom.is(parents[i], selector)) + return TRUE; + } + } } - // Normalize - aft.normalize(); - bef.normalize(); + return FALSE; + }; + + // Expose to public + tinymce.extend(this, { + get : get, + register : register, + apply : apply, + remove : remove, + toggle : toggle, + match : match, + matchAll : matchAll, + matchNode : matchNode, + canApply : canApply + }); + + // Private functions - function first(n) { - return d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false).nextNode() || n; - }; + function matchName(node, format) { + // Check for inline match + if (isEq(node, format.inline)) + return TRUE; - // Move cursor and scroll into view - r = d.createRange(); - r.selectNodeContents(isGecko ? first(car || aft) : car || aft); - r.collapse(1); - s.removeAllRanges(); - s.addRange(r); + // Check for block match + if (isEq(node, format.block)) + return TRUE; - // scrollIntoView seems to scroll the parent window in most browsers now including FF 3.0b4 so it's time to stop using it and do it our selfs - y = ed.dom.getPos(aft).y; - ch = aft.clientHeight; + // Check for selector match + if (format.selector) + return dom.is(node, format.selector); + }; - // Is element within viewport - if (y < vp.y || y + ch > vp.y + vp.h) { - ed.getWin().scrollTo(0, y < vp.y ? y : y - vp.h + 25); // Needs to be hardcoded to roughly one line of text if a huge text block is broken into two blocks - //console.debug('SCROLL!', 'vp.y: ' + vp.y, 'y' + y, 'vp.h' + vp.h, 'clientHeight' + aft.clientHeight, 'yyy: ' + (y < vp.y ? y : y - vp.h + aft.clientHeight)); - } + function isEq(str1, str2) { + str1 = str1 || ''; + str2 = str2 || ''; - return false; - }, + str1 = '' + (str1.nodeName || str1); + str2 = '' + (str2.nodeName || str2); - backspaceDelete : function(e, bs) { - var t = this, ed = t.editor, b = ed.getBody(), n, se = ed.selection, r = se.getRng(), sc = r.startContainer, n, w, tn; + return str1.toLowerCase() == str2.toLowerCase(); + }; - // The caret sometimes gets stuck in Gecko if you delete empty paragraphs - // This workaround removes the element by hand and moves the caret to the previous element - if (sc && ed.dom.isBlock(sc) && !/^(TD|TH)$/.test(sc.nodeName) && bs) { - if (sc.childNodes.length == 0 || (sc.childNodes.length == 1 && sc.firstChild.nodeName == 'BR')) { - // Find previous block element - n = sc; - while ((n = n.previousSibling) && !ed.dom.isBlock(n)) ; + function getStyle(node, name) { + var styleVal = dom.getStyle(node, name); - if (n) { - if (sc != b.firstChild) { - // Find last text node - w = ed.dom.doc.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false); - while (tn = w.nextNode()) - n = tn; + // Force the format to hex + if (name == 'color' || name == 'backgroundColor') + styleVal = dom.toHex(styleVal); - // Place caret at the end of last text node - r = ed.getDoc().createRange(); - r.setStart(n, n.nodeValue ? n.nodeValue.length : 0); - r.setEnd(n, n.nodeValue ? n.nodeValue.length : 0); - se.setRng(r); + // Opera will return bold as 700 + if (name == 'fontWeight' && styleVal == 700) + styleVal = 'bold'; - // Remove the target container - ed.dom.remove(sc); - } + return '' + styleVal; + }; - return Event.cancel(e); - } - } + function replaceVars(value, vars) { + if (typeof(value) != "string") + value = value(vars); + else if (vars) { + value = value.replace(/%(\w+)/g, function(str, name) { + return vars[name] || str; + }); } - // Gecko generates BR elements here and there, we don't like those so lets remove them - function handler(e) { - var pr; + return value; + }; - e = e.target; + function isWhiteSpaceNode(node) { + return node && node.nodeType === 3 && /^([\s\r\n]+|)$/.test(node.nodeValue); + }; - // A new BR was created in a block element, remove it - if (e && e.parentNode && e.nodeName == 'BR' && (n = t.getParentBlock(e))) { - pr = e.previousSibling; + function wrap(node, name, attrs) { + var wrapper = dom.create(name, attrs); - Event.remove(b, 'DOMNodeInserted', handler); + node.parentNode.insertBefore(wrapper, node); + wrapper.appendChild(node); - // Is there whitespace at the end of the node before then we might need the pesky BR - // to place the caret at a correct location see bug: #2013943 - if (pr && pr.nodeType == 3 && /\s+$/.test(pr.nodeValue)) - return; + return wrapper; + }; - // Only remove BR elements that got inserted in the middle of the text - if (e.previousSibling || e.nextSibling) - ed.dom.remove(e); - } - }; + function expandRng(rng, format, remove) { + var startContainer = rng.startContainer, + startOffset = rng.startOffset, + endContainer = rng.endContainer, + endOffset = rng.endOffset, sibling, lastIdx, leaf; - // Listen for new nodes - Event._add(b, 'DOMNodeInserted', handler); + // This function walks up the tree if there is no siblings before/after the node + function findParentContainer(container, child_name, sibling_name, root) { + var parent, child; - // Remove listener - window.setTimeout(function() { - Event._remove(b, 'DOMNodeInserted', handler); - }, 1); - } - }); -})(); + root = root || dom.getRoot(); -/* file:jscripts/tiny_mce/classes/ControlManager.js */ + for (;;) { + // Check if we can move up are we at root level or body level + parent = container.parentNode; -(function() { - // Shorten names - var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, extend = tinymce.extend; + // Stop expanding on block elements or root depending on format + if (parent == root || (!format[0].block_expand && isBlock(parent))) + return container; - tinymce.create('tinymce.ControlManager', { - ControlManager : function(ed, s) { - var t = this, i; + for (sibling = parent[child_name]; sibling && sibling != container; sibling = sibling[sibling_name]) { + if (sibling.nodeType == 1 && !isBookmarkNode(sibling)) + return container; - s = s || {}; - t.editor = ed; - t.controls = {}; - t.onAdd = new tinymce.util.Dispatcher(t); - t.onPostRender = new tinymce.util.Dispatcher(t); - t.prefix = s.prefix || ed.id + '_'; - t._cls = {}; + if (sibling.nodeType == 3 && !isWhiteSpaceNode(sibling)) + return container; + } - t.onPostRender.add(function() { - each(t.controls, function(c) { - c.postRender(); - }); - }); - }, + container = container.parentNode; + } - get : function(id) { - return this.controls[this.prefix + id] || this.controls[id]; - }, + return container; + }; - setActive : function(id, s) { - var c = null; + // This function walks down the tree to find the leaf at the selection. + // The offset is also returned as if node initially a leaf, the offset may be in the middle of the text node. + function findLeaf(node, offset) { + if (offset === undefined) + offset = node.nodeType === 3 ? node.length : node.childNodes.length; + while (node && node.hasChildNodes()) { + node = node.childNodes[offset]; + if (node) + offset = node.nodeType === 3 ? node.length : node.childNodes.length; + } + return { node: node, offset: offset }; + } - if (c = this.get(id)) - c.setActive(s); + // If index based start position then resolve it + if (startContainer.nodeType == 1 && startContainer.hasChildNodes()) { + lastIdx = startContainer.childNodes.length - 1; + startContainer = startContainer.childNodes[startOffset > lastIdx ? lastIdx : startOffset]; - return c; - }, + if (startContainer.nodeType == 3) + startOffset = 0; + } - setDisabled : function(id, s) { - var c = null; + // If index based end position then resolve it + if (endContainer.nodeType == 1 && endContainer.hasChildNodes()) { + lastIdx = endContainer.childNodes.length - 1; + endContainer = endContainer.childNodes[endOffset > lastIdx ? lastIdx : endOffset - 1]; - if (c = this.get(id)) - c.setDisabled(s); + if (endContainer.nodeType == 3) + endOffset = endContainer.nodeValue.length; + } - return c; - }, + // Exclude bookmark nodes if possible + if (isBookmarkNode(startContainer.parentNode)) + startContainer = startContainer.parentNode; - add : function(c) { - var t = this; + if (isBookmarkNode(startContainer)) + startContainer = startContainer.nextSibling || startContainer; - if (c) { - t.controls[c.id] = c; - t.onAdd.dispatch(c, t); + if (isBookmarkNode(endContainer.parentNode)) { + endOffset = dom.nodeIndex(endContainer); + endContainer = endContainer.parentNode; } - return c; - }, + if (isBookmarkNode(endContainer) && endContainer.previousSibling) { + endContainer = endContainer.previousSibling; + endOffset = endContainer.length; + } - createControl : function(n) { - var c, t = this, ed = t.editor; + if (format[0].inline) { + // Avoid applying formatting to a trailing space. + leaf = findLeaf(endContainer, endOffset); + if (leaf.node) { + while (leaf.node && leaf.offset === 0 && leaf.node.previousSibling) + leaf = findLeaf(leaf.node.previousSibling); - each(ed.plugins, function(p) { - if (p.createControl) { - c = p.createControl(n, t); + if (leaf.node && leaf.offset > 0 && leaf.node.nodeType === 3 && + leaf.node.nodeValue.charAt(leaf.offset - 1) === ' ') { - if (c) - return false; + if (leaf.offset > 1) { + endContainer = leaf.node; + endContainer.splitText(leaf.offset - 1); + } else if (leaf.node.previousSibling) { + endContainer = leaf.node.previousSibling; + } + } } - }); + } + + // Move start/end point up the tree if the leaves are sharp and if we are in different containers + // Example * becomes !: !

    *texttext*

    ! + // This will reduce the number of wrapper elements that needs to be created + // Move start point up the tree + if (format[0].inline || format[0].block_expand) { + startContainer = findParentContainer(startContainer, 'firstChild', 'nextSibling'); + endContainer = findParentContainer(endContainer, 'lastChild', 'previousSibling'); + } + + // Expand start/end container to matching selector + if (format[0].selector && format[0].expand !== FALSE && !format[0].inline) { + function findSelectorEndPoint(container, sibling_name) { + var parents, i, y, curFormat; + + if (container.nodeType == 3 && container.nodeValue.length == 0 && container[sibling_name]) + container = container[sibling_name]; + + parents = getParents(container); + for (i = 0; i < parents.length; i++) { + for (y = 0; y < format.length; y++) { + curFormat = format[y]; + + // If collapsed state is set then skip formats that doesn't match that + if ("collapsed" in curFormat && curFormat.collapsed !== rng.collapsed) + continue; + + if (dom.is(parents[i], curFormat.selector)) + return parents[i]; + } + } - switch (n) { - case "|": - case "separator": - return t.createSeparator(); + return container; + }; + + // Find new startContainer/endContainer if there is better one + startContainer = findSelectorEndPoint(startContainer, 'previousSibling'); + endContainer = findSelectorEndPoint(endContainer, 'nextSibling'); } - if (!c && ed.buttons && (c = ed.buttons[n])) - return t.createButton(n, c); + // Expand start/end container to matching block element or text node + if (format[0].block || format[0].selector) { + function findBlockEndPoint(container, sibling_name, sibling_name2) { + var node; - return t.add(c); - }, + // Expand to block of similar type + if (!format[0].wrapper) + node = dom.getParent(container, format[0].block); - createDropMenu : function(id, s, cc) { - var t = this, ed = t.editor, c, bm, v, cls; + // Expand to first wrappable block element or any block element + if (!node) + node = dom.getParent(container.nodeType == 3 ? container.parentNode : container, isBlock); - s = extend({ - 'class' : 'mceDropDown', - constrain : ed.settings.constrain_menus - }, s); + // Exclude inner lists from wrapping + if (node && format[0].wrapper) + node = getParents(node, 'ul,ol').reverse()[0] || node; - s['class'] = s['class'] + ' ' + ed.getParam('skin') + 'Skin'; - if (v = ed.getParam('skin_variant')) - s['class'] += ' ' + ed.getParam('skin') + 'Skin' + v.substring(0, 1).toUpperCase() + v.substring(1); + // Didn't find a block element look for first/last wrappable element + if (!node) { + node = container; - id = t.prefix + id; - cls = cc || t._cls.dropmenu || tinymce.ui.DropMenu; - c = t.controls[id] = new cls(id, s); - c.onAddItem.add(function(c, o) { - var s = o.settings; + while (node[sibling_name] && !isBlock(node[sibling_name])) { + node = node[sibling_name]; - s.title = ed.getLang(s.title, s.title); + // Break on BR but include it will be removed later on + // we can't remove it now since we need to check if it can be wrapped + if (isEq(node, 'br')) + break; + } + } - if (!s.onclick) { - s.onclick = function(v) { - ed.execCommand(s.cmd, s.ui || false, s.value); - }; + return node || container; + }; + + // Find new startContainer/endContainer if there is better one + startContainer = findBlockEndPoint(startContainer, 'previousSibling'); + endContainer = findBlockEndPoint(endContainer, 'nextSibling'); + + // Non block element then try to expand up the leaf + if (format[0].block) { + if (!isBlock(startContainer)) + startContainer = findParentContainer(startContainer, 'firstChild', 'nextSibling'); + + if (!isBlock(endContainer)) + endContainer = findParentContainer(endContainer, 'lastChild', 'previousSibling'); } - }); + } - ed.onRemove.add(function() { - c.destroy(); - }); + // Setup index for startContainer + if (startContainer.nodeType == 1) { + startOffset = nodeIndex(startContainer); + startContainer = startContainer.parentNode; + } - // Fix for bug #1897785, #1898007 - if (tinymce.isIE) { - c.onShowMenu.add(function() { - bm = ed.selection.getBookmark(1); - }); + // Setup index for endContainer + if (endContainer.nodeType == 1) { + endOffset = nodeIndex(endContainer) + 1; + endContainer = endContainer.parentNode; + } - c.onHideMenu.add(function() { - if (bm) - ed.selection.moveToBookmark(bm); + // Return new range like object + return { + startContainer : startContainer, + startOffset : startOffset, + endContainer : endContainer, + endOffset : endOffset + }; + } + + function removeFormat(format, vars, node, compare_node) { + var i, attrs, stylesModified; + + // Check if node matches format + if (!matchName(node, format)) + return FALSE; + + // Should we compare with format attribs and styles + if (format.remove != 'all') { + // Remove styles + each(format.styles, function(value, name) { + value = replaceVars(value, vars); + + // Indexed array + if (typeof(name) === 'number') { + name = value; + compare_node = 0; + } + + if (!compare_node || isEq(getStyle(compare_node, name), value)) + dom.setStyle(node, name, ''); + + stylesModified = 1; }); - } - return t.add(c); - }, + // Remove style attribute if it's empty + if (stylesModified && dom.getAttrib(node, 'style') == '') { + node.removeAttribute('style'); + node.removeAttribute('data-mce-style'); + } - createListBox : function(id, s, cc) { - var t = this, ed = t.editor, cmd, c, cls; + // Remove attributes + each(format.attributes, function(value, name) { + var valueOut; - if (t.get(id)) - return null; + value = replaceVars(value, vars); - s.title = ed.translate(s.title); - s.scope = s.scope || ed; + // Indexed array + if (typeof(name) === 'number') { + name = value; + compare_node = 0; + } - if (!s.onselect) { - s.onselect = function(v) { - ed.execCommand(s.cmd, s.ui || false, v || s.value); - }; - } + if (!compare_node || isEq(dom.getAttrib(compare_node, name), value)) { + // Keep internal classes + if (name == 'class') { + value = dom.getAttrib(node, name); + if (value) { + // Build new class value where everything is removed except the internal prefixed classes + valueOut = ''; + each(value.split(/\s+/), function(cls) { + if (/mce\w+/.test(cls)) + valueOut += (valueOut ? ' ' : '') + cls; + }); - s = extend({ - title : s.title, - 'class' : 'mce_' + id, - scope : s.scope, - control_manager : t - }, s); + // We got some internal classes left + if (valueOut) { + dom.setAttrib(node, name, valueOut); + return; + } + } + } - id = t.prefix + id; + // IE6 has a bug where the attribute doesn't get removed correctly + if (name == "class") + node.removeAttribute('className'); - if (ed.settings.use_native_selects) - c = new tinymce.ui.NativeListBox(id, s); - else { - cls = cc || t._cls.listbox || tinymce.ui.ListBox; - c = new cls(id, s); - } + // Remove mce prefixed attributes + if (MCE_ATTR_RE.test(name)) + node.removeAttribute('data-mce-' + name); - t.controls[id] = c; + node.removeAttribute(name); + } + }); - // Fix focus problem in Safari - if (tinymce.isWebKit) { - c.onPostRender.add(function(c, n) { - // Store bookmark on mousedown - Event.add(n, 'mousedown', function() { - ed.bookmark = ed.selection.getBookmark('simple'); - }); + // Remove classes + each(format.classes, function(value) { + value = replaceVars(value, vars); - // Restore on focus, since it might be lost - Event.add(n, 'focus', function() { - ed.selection.moveToBookmark(ed.bookmark); - ed.bookmark = null; - }); + if (!compare_node || dom.hasClass(compare_node, value)) + dom.removeClass(node, value); }); + + // Check for non internal attributes + attrs = dom.getAttribs(node); + for (i = 0; i < attrs.length; i++) { + if (attrs[i].nodeName.indexOf('_') !== 0) + return FALSE; + } } - if (c.hideMenu) - ed.onMouseDown.add(c.hideMenu, c); + // Remove the inline child if it's empty for example or + if (format.remove != 'none') { + removeNode(node, format); + return TRUE; + } + }; - return t.add(c); - }, + function removeNode(node, format) { + var parentNode = node.parentNode, rootBlockElm; - createButton : function(id, s, cc) { - var t = this, ed = t.editor, o, c, cls; + if (format.block) { + if (!forcedRootBlock) { + function find(node, next, inc) { + node = getNonWhiteSpaceSibling(node, next, inc); - if (t.get(id)) - return null; + return !node || (node.nodeName == 'BR' || isBlock(node)); + }; - s.title = ed.translate(s.title); - s.label = ed.translate(s.label); - s.scope = s.scope || ed; + // Append BR elements if needed before we remove the block + if (isBlock(node) && !isBlock(parentNode)) { + if (!find(node, FALSE) && !find(node.firstChild, TRUE, 1)) + node.insertBefore(dom.create('br'), node.firstChild); - if (!s.onclick && !s.menu_button) { - s.onclick = function() { - ed.execCommand(s.cmd, s.ui || false, s.value); - }; + if (!find(node, TRUE) && !find(node.lastChild, FALSE, 1)) + node.appendChild(dom.create('br')); + } + } else { + // Wrap the block in a forcedRootBlock if we are at the root of document + if (parentNode == dom.getRoot()) { + if (!format.list_block || !isEq(node, format.list_block)) { + each(tinymce.grep(node.childNodes), function(node) { + if (isValid(forcedRootBlock, node.nodeName.toLowerCase())) { + if (!rootBlockElm) + rootBlockElm = wrap(node, forcedRootBlock); + else + rootBlockElm.appendChild(node); + } else + rootBlockElm = 0; + }); + } + } + } } - s = extend({ - title : s.title, - 'class' : 'mce_' + id, - unavailable_prefix : ed.getLang('unavailable', ''), - scope : s.scope, - control_manager : t - }, s); + // Never remove nodes that isn't the specified inline element if a selector is specified too + if (format.selector && format.inline && !isEq(format.inline, node)) + return; + + dom.remove(node, 1); + }; - id = t.prefix + id; + function getNonWhiteSpaceSibling(node, next, inc) { + if (node) { + next = next ? 'nextSibling' : 'previousSibling'; - if (s.menu_button) { - cls = cc || t._cls.menubutton || tinymce.ui.MenuButton; - c = new cls(id, s); - ed.onMouseDown.add(c.hideMenu, c); - } else { - cls = t._cls.button || tinymce.ui.Button; - c = new cls(id, s); + for (node = inc ? node : node[next]; node; node = node[next]) { + if (node.nodeType == 1 || !isWhiteSpaceNode(node)) + return node; + } } + }; - return t.add(c); - }, - - createMenuButton : function(id, s, cc) { - s = s || {}; - s.menu_button = 1; + function isBookmarkNode(node) { + return node && node.nodeType == 1 && node.getAttribute('data-mce-type') == 'bookmark'; + }; - return this.createButton(id, s, cc); - }, + function mergeSiblings(prev, next) { + var marker, sibling, tmpSibling; - createSplitButton : function(id, s, cc) { - var t = this, ed = t.editor, cmd, c, cls; + function compareElements(node1, node2) { + // Not the same name + if (node1.nodeName != node2.nodeName) + return FALSE; - if (t.get(id)) - return null; + function getAttribs(node) { + var attribs = {}; - s.title = ed.translate(s.title); - s.scope = s.scope || ed; + each(dom.getAttribs(node), function(attr) { + var name = attr.nodeName.toLowerCase(); - if (!s.onclick) { - s.onclick = function(v) { - ed.execCommand(s.cmd, s.ui || false, v || s.value); - }; - } + // Don't compare internal attributes or style + if (name.indexOf('_') !== 0 && name !== 'style') + attribs[name] = dom.getAttrib(node, name); + }); - if (!s.onselect) { - s.onselect = function(v) { - ed.execCommand(s.cmd, s.ui || false, v || s.value); + return attribs; }; - } - s = extend({ - title : s.title, - 'class' : 'mce_' + id, - scope : s.scope, - control_manager : t - }, s); + function compareObjects(obj1, obj2) { + var value, name; - id = t.prefix + id; - cls = cc || t._cls.splitbutton || tinymce.ui.SplitButton; - c = t.add(new cls(id, s)); - ed.onMouseDown.add(c.hideMenu, c); + for (name in obj1) { + // Obj1 has item obj2 doesn't have + if (obj1.hasOwnProperty(name)) { + value = obj2[name]; - return c; - }, + // Obj2 doesn't have obj1 item + if (value === undefined) + return FALSE; - createColorSplitButton : function(id, s, cc) { - var t = this, ed = t.editor, cmd, c, cls, bm; + // Obj2 item has a different value + if (obj1[name] != value) + return FALSE; - if (t.get(id)) - return null; + // Delete similar value + delete obj2[name]; + } + } - s.title = ed.translate(s.title); - s.scope = s.scope || ed; + // Check if obj 2 has something obj 1 doesn't have + for (name in obj2) { + // Obj2 has item obj1 doesn't have + if (obj2.hasOwnProperty(name)) + return FALSE; + } - if (!s.onclick) { - s.onclick = function(v) { - ed.execCommand(s.cmd, s.ui || false, v || s.value); + return TRUE; }; - } - if (!s.onselect) { - s.onselect = function(v) { - ed.execCommand(s.cmd, s.ui || false, v || s.value); - }; - } + // Attribs are not the same + if (!compareObjects(getAttribs(node1), getAttribs(node2))) + return FALSE; - s = extend({ - title : s.title, - 'class' : 'mce_' + id, - 'menu_class' : ed.getParam('skin') + 'Skin', - scope : s.scope, - more_colors_title : ed.getLang('more_colors') - }, s); + // Styles are not the same + if (!compareObjects(dom.parseStyle(dom.getAttrib(node1, 'style')), dom.parseStyle(dom.getAttrib(node2, 'style')))) + return FALSE; - id = t.prefix + id; - cls = cc || t._cls.colorsplitbutton || tinymce.ui.ColorSplitButton; - c = new cls(id, s); - ed.onMouseDown.add(c.hideMenu, c); + return TRUE; + }; - // Remove the menu element when the editor is removed - ed.onRemove.add(function() { - c.destroy(); - }); + // Check if next/prev exists and that they are elements + if (prev && next) { + function findElementSibling(node, sibling_name) { + for (sibling = node; sibling; sibling = sibling[sibling_name]) { + if (sibling.nodeType == 3 && sibling.nodeValue.length !== 0) + return node; - // Fix for bug #1897785, #1898007 - if (tinymce.isIE) { - c.onShowMenu.add(function() { - bm = ed.selection.getBookmark(1); - }); + if (sibling.nodeType == 1 && !isBookmarkNode(sibling)) + return sibling; + } - c.onHideMenu.add(function() { - if (bm) { - ed.selection.moveToBookmark(bm); - bm = 0; + return node; + }; + + // If previous sibling is empty then jump over it + prev = findElementSibling(prev, 'previousSibling'); + next = findElementSibling(next, 'nextSibling'); + + // Compare next and previous nodes + if (compareElements(prev, next)) { + // Append nodes between + for (sibling = prev.nextSibling; sibling && sibling != next;) { + tmpSibling = sibling; + sibling = sibling.nextSibling; + prev.appendChild(tmpSibling); } - }); - } - return t.add(c); - }, + // Remove next node + dom.remove(next); - createToolbar : function(id, s, cc) { - var c, t = this, cls; + // Move children into prev node + each(tinymce.grep(next.childNodes), function(node) { + prev.appendChild(node); + }); - id = t.prefix + id; - cls = cc || t._cls.toolbar || tinymce.ui.Toolbar; - c = new cls(id, s); + return prev; + } + } - if (t.get(id)) - return null; + return next; + }; - return t.add(c); - }, + function isTextBlock(name) { + return /^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(name); + }; - createSeparator : function(cc) { - var cls = cc || this._cls.separator || tinymce.ui.Separator; + function getContainer(rng, start) { + var container, offset, lastIdx; - return new cls(); - }, + container = rng[start ? 'startContainer' : 'endContainer']; + offset = rng[start ? 'startOffset' : 'endOffset']; - setControlType : function(n, c) { - return this._cls[n.toLowerCase()] = c; - }, + if (container.nodeType == 1) { + lastIdx = container.childNodes.length - 1; - destroy : function() { - each(this.controls, function(c) { - c.destroy(); - }); + if (!start && offset) + offset--; - this.controls = null; - } + container = container.childNodes[offset > lastIdx ? lastIdx : offset]; + } - }); -})(); + return container; + }; -/* file:jscripts/tiny_mce/classes/WindowManager.js */ + function performCaretAction(type, name, vars) { + var i, currentPendingFormats = pendingFormats[type], + otherPendingFormats = pendingFormats[type == 'apply' ? 'remove' : 'apply']; -(function() { - var Dispatcher = tinymce.util.Dispatcher, each = tinymce.each, isIE = tinymce.isIE, isOpera = tinymce.isOpera; + function hasPending() { + return pendingFormats.apply.length || pendingFormats.remove.length; + }; - tinymce.create('tinymce.WindowManager', { - WindowManager : function(ed) { - var t = this; + function resetPending() { + pendingFormats.apply = []; + pendingFormats.remove = []; + }; - t.editor = ed; - t.onOpen = new Dispatcher(t); - t.onClose = new Dispatcher(t); - t.params = {}; - t.features = {}; - }, + function perform(caret_node) { + // Apply pending formats + each(pendingFormats.apply.reverse(), function(item) { + apply(item.name, item.vars, caret_node); - open : function(s, p) { - var t = this, f = '', x, y, mo = t.editor.settings.dialog_type == 'modal', w, sw, sh, vp = tinymce.DOM.getViewPort(), u; + // Colored nodes should be underlined so that the color of the underline matches the text color. + if (item.name === 'forecolor' && item.vars.value) + processUnderlineAndColor(caret_node.parentNode); + }); - // Default some options - s = s || {}; - p = p || {}; - sw = isOpera ? vp.w : screen.width; // Opera uses windows inside the Opera window - sh = isOpera ? vp.h : screen.height; - s.name = s.name || 'mc_' + new Date().getTime(); - s.width = parseInt(s.width || 320); - s.height = parseInt(s.height || 240); - s.resizable = true; - s.left = s.left || parseInt(sw / 2.0) - (s.width / 2.0); - s.top = s.top || parseInt(sh / 2.0) - (s.height / 2.0); - p.inline = false; - p.mce_width = s.width; - p.mce_height = s.height; - p.mce_auto_focus = s.auto_focus; + // Remove pending formats + each(pendingFormats.remove.reverse(), function(item) { + remove(item.name, item.vars, caret_node); + }); - if (mo) { - if (isIE) { - s.center = true; - s.help = false; - s.dialogWidth = s.width + 'px'; - s.dialogHeight = s.height + 'px'; - s.scroll = s.scrollbars || false; - } + dom.remove(caret_node, 1); + resetPending(); + }; + + // Check if it already exists then ignore it + for (i = currentPendingFormats.length - 1; i >= 0; i--) { + if (currentPendingFormats[i].name == name) + return; } - // Build features string - each(s, function(v, k) { - if (tinymce.is(v, 'boolean')) - v = v ? 'yes' : 'no'; + currentPendingFormats.push({name : name, vars : vars}); - if (!/^(name|url)$/.test(k)) { - if (isIE && mo) - f += (f ? ';' : '') + k + ':' + v; - else - f += (f ? ',' : '') + k + '=' + v; - } - }); + // Check if it's in the other type, then remove it + for (i = otherPendingFormats.length - 1; i >= 0; i--) { + if (otherPendingFormats[i].name == name) + otherPendingFormats.splice(i, 1); + } - t.features = s; - t.params = p; - t.onOpen.dispatch(t, s, p); + // Pending apply or remove formats + if (hasPending()) { + ed.getDoc().execCommand('FontName', false, 'mceinline'); + pendingFormats.lastRng = selection.getRng(); - u = s.url || s.file; - if (tinymce.relaxedDomain) - u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain; + // IE will convert the current word + each(dom.select('font,span'), function(node) { + var bookmark; - u = tinymce._addVer(u); + if (isCaretNode(node)) { + bookmark = selection.getBookmark(); + perform(node); + selection.moveToBookmark(bookmark); + ed.nodeChanged(); + } + }); - try { - if (isIE && mo) { - w = 1; - window.showModalDialog(u, window, f); - } else - w = window.open(u, s.name, f); - } catch (ex) { - // Ignore - } + // Only register listeners once if we need to + if (!pendingFormats.isListening && hasPending()) { + pendingFormats.isListening = true; + + each('onKeyDown,onKeyUp,onKeyPress,onMouseUp'.split(','), function(event) { + ed[event].addToTop(function(ed, e) { + // Do we have pending formats and is the selection moved has moved + if (hasPending() && !tinymce.dom.RangeUtils.compareRanges(pendingFormats.lastRng, selection.getRng())) { + each(dom.select('font,span'), function(node) { + var textNode, rng; + + // Look for marker + if (isCaretNode(node)) { + textNode = node.firstChild; + + if (textNode) { + perform(node); + + rng = dom.createRng(); + rng.setStart(textNode, textNode.nodeValue.length); + rng.setEnd(textNode, textNode.nodeValue.length); + selection.setRng(rng); + ed.nodeChanged(); + } else + dom.remove(node); + } + }); - if (!w) - alert(t.editor.getLang('popup_blocked')); - }, + // Always unbind and clear pending styles on keyup + if (e.type == 'keyup' || e.type == 'mouseup') + resetPending(); + } + }); + }); + } + } + }; + }; +})(tinymce); - close : function(w) { - w.close(); - this.onClose.dispatch(this); - }, +tinymce.onAddEditor.add(function(tinymce, ed) { + var filters, fontSizes, dom, settings = ed.settings; - createInstance : function(cl, a, b, c, d, e) { - var f = tinymce.resolve(cl); + if (settings.inline_styles) { + fontSizes = tinymce.explode(settings.font_size_style_values); - return new f(a, b, c, d, e); - }, + function replaceWithSpan(node, styles) { + tinymce.each(styles, function(value, name) { + if (value) + dom.setStyle(node, name, value); + }); - confirm : function(t, cb, s, w) { - w = w || window; + dom.rename(node, 'span'); + }; - cb.call(s || this, w.confirm(this._decode(this.editor.getLang(t, t)))); - }, + filters = { + font : function(dom, node) { + replaceWithSpan(node, { + backgroundColor : node.style.backgroundColor, + color : node.color, + fontFamily : node.face, + fontSize : fontSizes[parseInt(node.size) - 1] + }); + }, - alert : function(tx, cb, s, w) { - var t = this; + u : function(dom, node) { + replaceWithSpan(node, { + textDecoration : 'underline' + }); + }, - w = w || window; - w.alert(t._decode(t.editor.getLang(tx, tx))); + strike : function(dom, node) { + replaceWithSpan(node, { + textDecoration : 'line-through' + }); + } + }; - if (cb) - cb.call(s || t); - }, + function convert(editor, params) { + dom = editor.dom; - // Internal functions + if (settings.convert_fonts_to_spans) { + tinymce.each(dom.select('font,u,strike', params.node), function(node) { + filters[node.nodeName.toLowerCase()](ed.dom, node); + }); + } + }; - _decode : function(s) { - return tinymce.DOM.decode(s).replace(/\\n/g, '\n'); - } + ed.onPreProcess.add(convert); + ed.onSetContent.add(convert); + ed.onInit.add(function() { + ed.selection.onSetContent.add(convert); }); -}()); \ No newline at end of file + } +}); + diff --git a/include/javascript/tiny_mce/utils/editable_selects.js b/include/javascript/tiny_mce/utils/editable_selects.js index 15a2a09d..6cf1b166 100644 --- a/include/javascript/tiny_mce/utils/editable_selects.js +++ b/include/javascript/tiny_mce/utils/editable_selects.js @@ -1,10 +1,11 @@ /** - + * editable_selects.js * - * Makes select boxes editable. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ var TinyMCE_EditableSelects = { diff --git a/include/javascript/tiny_mce/utils/form_utils.js b/include/javascript/tiny_mce/utils/form_utils.js index 6c9cdcdb..6f62fe60 100644 --- a/include/javascript/tiny_mce/utils/form_utils.js +++ b/include/javascript/tiny_mce/utils/form_utils.js @@ -1,19 +1,24 @@ /** - + * form_utils.js * - * Various form utilitiy functions. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme")); function getColorPickerHTML(id, target_form_element) { - var h = ""; + var h = "", dom = tinyMCEPopup.dom; + + if (label = dom.select('label[for=' + target_form_element + ']')[0]) { + label.id = label.id || dom.uniqueId(); + } - h += ''; - h += ''; + h += ''; + h += ' '; return h; } @@ -50,7 +55,7 @@ function getBrowserHTML(id, target_form_element, type, prefix) { html = ""; html += ''; - html += ''; + html += ' '; return html; } @@ -66,6 +71,9 @@ function selectByValue(form_obj, field_name, value, add_custom, ignore_case) { if (!form_obj || !form_obj.elements[field_name]) return; + if (!value) + value = ""; + var sel = form_obj.elements[field_name]; var found = false; @@ -92,7 +100,7 @@ function selectByValue(form_obj, field_name, value, add_custom, ignore_case) { function getSelectValue(form_obj, field_name) { var elm = form_obj.elements[field_name]; - if (elm == null || elm.options == null) + if (elm == null || elm.options == null || elm.selectedIndex === -1) return ""; return elm.options[elm.selectedIndex].value; @@ -170,7 +178,7 @@ function convertHexToRGB(col) { } function trimSize(size) { - return size.replace(/([0-9\.]+)px|(%|in|cm|mm|em|ex|pt|pc)/, '$1$2'); + return size.replace(/([0-9\.]+)(px|%|in|cm|mm|em|ex|pt|pc)/i, '$1$2'); } function getCSSSize(size) { @@ -182,6 +190,9 @@ function getCSSSize(size) { // Add px if (/^[0-9]+$/.test(size)) size += 'px'; + // Sanity check, IE doesn't like broken values + else if (!(/^[0-9\.]+(px|%|in|cm|mm|em|ex|pt|pc)$/i.test(size))) + return ""; return size; } diff --git a/include/javascript/tiny_mce/utils/mctabs.js b/include/javascript/tiny_mce/utils/mctabs.js index a8a8995e..027ef40e 100644 --- a/include/javascript/tiny_mce/utils/mctabs.js +++ b/include/javascript/tiny_mce/utils/mctabs.js @@ -1,14 +1,16 @@ /** - + * mctabs.js * - * Moxiecode DHTML Tabs script. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ function MCTabs() { this.settings = []; + this.onChange = tinyMCEPopup.editor.windowManager.createInstance('tinymce.util.Dispatcher'); }; MCTabs.prototype.init = function(settings) { @@ -27,26 +29,62 @@ MCTabs.prototype.getParam = function(name, default_value) { return value; }; -MCTabs.prototype.displayTab = function(tab_id, panel_id) { - var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i; +MCTabs.prototype.showTab =function(tab){ + tab.className = 'current'; + tab.setAttribute("aria-selected", true); + tab.setAttribute("aria-expanded", true); + tab.tabIndex = 0; +}; + +MCTabs.prototype.hideTab =function(tab){ + var t=this; + + tab.className = ''; + tab.setAttribute("aria-selected", false); + tab.setAttribute("aria-expanded", false); + tab.tabIndex = -1; +}; + +MCTabs.prototype.showPanel = function(panel) { + panel.className = 'current'; + panel.setAttribute("aria-hidden", false); +}; + +MCTabs.prototype.hidePanel = function(panel) { + panel.className = 'panel'; + panel.setAttribute("aria-hidden", true); +}; + +MCTabs.prototype.getPanelForTab = function(tabElm) { + return tinyMCEPopup.dom.getAttrib(tabElm, "aria-controls"); +}; + +MCTabs.prototype.displayTab = function(tab_id, panel_id, avoid_focus) { + var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i, t = this; + + tabElm = document.getElementById(tab_id); + + if (panel_id === undefined) { + panel_id = t.getPanelForTab(tabElm); + } panelElm= document.getElementById(panel_id); panelContainerElm = panelElm ? panelElm.parentNode : null; - tabElm = document.getElementById(tab_id); tabContainerElm = tabElm ? tabElm.parentNode : null; - selectionClass = this.getParam('selection_class', 'current'); + selectionClass = t.getParam('selection_class', 'current'); if (tabElm && tabContainerElm) { nodes = tabContainerElm.childNodes; // Hide all other tabs for (i = 0; i < nodes.length; i++) { - if (nodes[i].nodeName == "LI") - nodes[i].className = ''; + if (nodes[i].nodeName == "LI") { + t.hideTab(nodes[i]); + } } // Show selected tab - tabElm.className = 'current'; + t.showTab(tabElm); } if (panelElm && panelContainerElm) { @@ -55,11 +93,15 @@ MCTabs.prototype.displayTab = function(tab_id, panel_id) { // Hide all other panels for (i = 0; i < nodes.length; i++) { if (nodes[i].nodeName == "DIV") - nodes[i].className = 'panel'; + t.hidePanel(nodes[i]); + } + + if (!avoid_focus) { + tabElm.focus(); } // Show selected panel - panelElm.className = 'current'; + t.showPanel(panelElm); } }; @@ -72,5 +114,49 @@ MCTabs.prototype.getAnchor = function() { return ""; }; -// Global instance + +//Global instance var mcTabs = new MCTabs(); + +tinyMCEPopup.onInit.add(function() { + var tinymce = tinyMCEPopup.getWin().tinymce, dom = tinyMCEPopup.dom, each = tinymce.each; + + each(dom.select('div.tabs'), function(tabContainerElm) { + var keyNav; + + dom.setAttrib(tabContainerElm, "role", "tablist"); + + var items = tinyMCEPopup.dom.select('li', tabContainerElm); + var action = function(id) { + mcTabs.displayTab(id, mcTabs.getPanelForTab(id)); + mcTabs.onChange.dispatch(id); + }; + + each(items, function(item) { + dom.setAttrib(item, 'role', 'tab'); + dom.bind(item, 'click', function(evt) { + action(item.id); + }); + }); + + dom.bind(dom.getRoot(), 'keydown', function(evt) { + if (evt.keyCode === 9 && evt.ctrlKey && !evt.altKey) { // Tab + keyNav.moveFocus(evt.shiftKey ? -1 : 1); + tinymce.dom.Event.cancel(evt); + } + }); + + each(dom.select('a', tabContainerElm), function(a) { + dom.setAttrib(a, 'tabindex', '-1'); + }); + + keyNav = tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', { + root: tabContainerElm, + items: items, + onAction: action, + actOnFocus: true, + enableLeftRight: true, + enableUpDown: true + }, tinyMCEPopup.dom); + }); +}); \ No newline at end of file diff --git a/include/javascript/tiny_mce/utils/validate.js b/include/javascript/tiny_mce/utils/validate.js index a806325b..760d0290 100644 --- a/include/javascript/tiny_mce/utils/validate.js +++ b/include/javascript/tiny_mce/utils/validate.js @@ -1,10 +1,11 @@ /** - + * validate.js * - * Various form validation methods. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ /** @@ -31,7 +32,7 @@ var Validator = { }, isSize : function(s) { - return this.test(s, '^[0-9]+(%|in|cm|mm|em|ex|pt|pc|px)?$'); + return this.test(s, '^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)?$'); }, isId : function(s) { @@ -95,8 +96,10 @@ var AutoValidator = { var i, nl, s = this.settings, c = 0; nl = this.tags(f, 'label'); - for (i=0; i0)?F:0;}if(C in D&&!("style" in D&&C in D.style)){D[C]=F;}else{B.Dom.setStyle(D,C,F+E);}},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G);}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if("style" in E){if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)];}else{G=0;}}else{if(C in E){G=E[C];}}return G;},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px";}return"";},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined");};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false;}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"];}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};this._queue=B;this._getIndex=E;};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B0)?f:0;}if(c in d&&!("style" in d&&c in d.style)){d[c]=f;}else{b.Dom.setStyle(d,c,f+e);}},getAttribute:function(c){var e=this.getEl();var g=b.Dom.getStyle(e,c);if(g!=="auto"&&!this.patterns.offsetUnit.test(g)){return parseFloat(g);}var d=this.patterns.offsetAttribute.exec(c)||[];var h=!!(d[3]);var f=!!(d[2]);if("style" in e){if(f||(b.Dom.getStyle(e,"position")=="absolute"&&h)){g=e["offset"+d[0].charAt(0).toUpperCase()+d[0].substr(1)];}else{g=0;}}else{if(c in e){g=e[c];}}return g;},getDefaultUnit:function(c){if(this.patterns.defaultUnit.test(c)){return"px";}return"";},setRuntimeAttribute:function(d){var j;var e;var f=this.attributes;this.runtimeAttributes[d]={};var h=function(i){return(typeof i!=="undefined");};if(!h(f[d]["to"])&&!h(f[d]["by"])){return false;}j=(h(f[d]["from"]))?f[d]["from"]:this.getAttribute(d);if(h(f[d]["to"])){e=f[d]["to"];}else{if(h(f[d]["by"])){if(j.constructor==Array){e=[];for(var g=0,c=j.length;g0&&isFinite(o)){if(k.currentFrame+o>=n){o=n-(m+1);}k.currentFrame+=o;}};this._queue=c;this._getIndex=a;};YAHOO.util.Bezier=new function(){this.getPosition=function(e,d){var f=e.length;var c=[];for(var b=0;b0&&!(L[0] instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.8.0r4",build:"2449"}); \ No newline at end of file +YAHOO.util.Easing={easeNone:function(e,a,g,f){return g*e/f+a;},easeIn:function(e,a,g,f){return g*(e/=f)*e+a;},easeOut:function(e,a,g,f){return -g*(e/=f)*(e-2)+a;},easeBoth:function(e,a,g,f){if((e/=f/2)<1){return g/2*e*e+a;}return -g/2*((--e)*(e-2)-1)+a;},easeInStrong:function(e,a,g,f){return g*(e/=f)*e*e*e+a;},easeOutStrong:function(e,a,g,f){return -g*((e=e/f-1)*e*e*e-1)+a;},easeBothStrong:function(e,a,g,f){if((e/=f/2)<1){return g/2*e*e*e*e+a;}return -g/2*((e-=2)*e*e*e-2)+a;},elasticIn:function(g,e,k,j,f,i){if(g==0){return e;}if((g/=j)==1){return e+k;}if(!i){i=j*0.3;}if(!f||f0&&!(m[0] instanceof Array)){m=[m];}else{var l=[];for(n=0,p=m.length;n0){this.runtimeAttributes[q]=this.runtimeAttributes[q].concat(m);}this.runtimeAttributes[q][this.runtimeAttributes[q].length]=j;}else{f.setRuntimeAttribute.call(this,q);}};var b=function(g,i){var h=e.Dom.getXY(this.getEl());g=[g[0]-h[0]+i[0],g[1]-h[1]+i[1]];return g;};var d=function(g){return(typeof g!=="undefined");};e.Motion=a;})();(function(){var d=function(f,e,g,h){if(f){d.superclass.constructor.call(this,f,e,g,h);}};d.NAME="Scroll";var b=YAHOO.util;YAHOO.extend(d,b.ColorAnim);var c=d.superclass;var a=d.prototype;a.doMethod=function(e,h,f){var g=null;if(e=="scroll"){g=[this.method(this.currentFrame,h[0],f[0]-h[0],this.totalFrames),this.method(this.currentFrame,h[1],f[1]-h[1],this.totalFrames)];}else{g=c.doMethod.call(this,e,h,f);}return g;};a.getAttribute=function(e){var g=null;var f=this.getEl();if(e=="scroll"){g=[f.scrollLeft,f.scrollTop];}else{g=c.getAttribute.call(this,e);}return g;};a.setAttribute=function(e,h,g){var f=this.getEl();if(e=="scroll"){f.scrollLeft=h[0];f.scrollTop=h[1];}else{c.setAttribute.call(this,e,h,g);}};b.Scroll=d;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.9.0",build:"2800"}); \ No newline at end of file diff --git a/include/javascript/yui/build/animation/animation.js b/include/javascript/yui/build/animation/animation.js index 5737b68b..0c4485b2 100644 --- a/include/javascript/yui/build/animation/animation.js +++ b/include/javascript/yui/build/animation/animation.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ (function() { @@ -361,12 +361,14 @@ Anim.prototype = { Y.AnimMgr.stop(this); }; - var onStart = function() { + this._handleStart = function() { this.onStart.fire(); this.runtimeAttributes = {}; for (var attr in this.attributes) { - this.setRuntimeAttribute(attr); + if (this.attributes.hasOwnProperty(attr)) { + this.setRuntimeAttribute(attr); + } } isAnimated = true; @@ -379,7 +381,7 @@ Anim.prototype = { * @private */ - var onTween = function() { + this._handleTween = function() { var data = { duration: new Date() - this.getStartTime(), currentFrame: this.currentFrame @@ -397,13 +399,17 @@ Anim.prototype = { var runtimeAttributes = this.runtimeAttributes; for (var attr in runtimeAttributes) { - this.setAttribute(attr, this.doMethod(attr, runtimeAttributes[attr].start, runtimeAttributes[attr].end), runtimeAttributes[attr].unit); + if (runtimeAttributes.hasOwnProperty(attr)) { + this.setAttribute(attr, this.doMethod(attr, runtimeAttributes[attr].start, runtimeAttributes[attr].end), runtimeAttributes[attr].unit); + } } + this.afterTween.fire(data); + actualFrames += 1; }; - var onComplete = function() { + this._handleComplete = function() { var actual_duration = (new Date() - startTime) / 1000 ; var data = { @@ -445,6 +451,13 @@ Anim.prototype = { */ this.onTween = new Y.CustomEvent('tween', this); + /** + * Custom event that fires between each frame + * Listen via subscribe method (e.g. myAnim.afterTween.subscribe(someFunction) + * @event afterTween + */ + this.afterTween = new Y.CustomEvent('afterTween', this); + /** * Custom event that fires after onTween * @private @@ -463,9 +476,9 @@ Anim.prototype = { */ this._onComplete = new Y.CustomEvent('_complete', this, true); - this._onStart.subscribe(onStart); - this._onTween.subscribe(onTween); - this._onComplete.subscribe(onComplete); + this._onStart.subscribe(this._handleStart); + this._onTween.subscribe(this._handleTween); + this._onComplete.subscribe(this._handleComplete); } }; @@ -517,7 +530,7 @@ YAHOO.util.AnimMgr = new function() { * @type Int * */ - this.delay = 1; + this.delay = 20; /** * Adds an animation instance to the animation queue. @@ -532,15 +545,18 @@ YAHOO.util.AnimMgr = new function() { this.start(); }; - /** - * removes an animation instance from the animation queue. - * All animation instances must be registered in order to animate. - * @method unRegister - * @param {object} tween The Anim instance to be be registered - * @param {Int} index The index of the Anim instance - * @private - */ - this.unRegister = function(tween, index) { + var _unregisterQueue = []; + var _unregistering = false; + + var doUnregister = function() { + var next_args = _unregisterQueue.shift(); + unRegister.apply(YAHOO.util.AnimMgr,next_args); + if (_unregisterQueue.length) { + arguments.callee(); + } + }; + + var unRegister = function(tween, index) { index = index || getIndex(tween); if (!tween.isAnimated() || index === -1) { return false; @@ -556,7 +572,24 @@ YAHOO.util.AnimMgr = new function() { return true; }; - + + /** + * removes an animation instance from the animation queue. + * All animation instances must be registered in order to animate. + * @method unRegister + * @param {object} tween The Anim instance to be be registered + * @param {Int} index The index of the Anim instance + * @private + */ + this.unRegister = function() { + _unregisterQueue.push(arguments); + if (!_unregistering) { + _unregistering = true; + doUnregister(); + _unregistering = false; + } + } + /** * Starts the animation thread. * Only one thread can run at a time. @@ -1389,4 +1422,4 @@ YAHOO.util.Easing = { Y.Scroll = Scroll; })(); -YAHOO.register("animation", YAHOO.util.Anim, {version: "2.8.0r4", build: "2449"}); +YAHOO.register("animation", YAHOO.util.Anim, {version: "2.9.0", build: "2800"}); diff --git a/include/javascript/yui/build/assets/skins/sam/autocomplete.css b/include/javascript/yui/build/assets/skins/sam/autocomplete.css index 07fc0302..54541c5d 100644 --- a/include/javascript/yui/build/assets/skins/sam/autocomplete.css +++ b/include/javascript/yui/build/assets/skins/sam/autocomplete.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -.yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%;}.yui-skin-sam .yui-ac-input{position:absolute;width:100%;}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%;}.yui-skin-sam .yui-ac-content{position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050;}.yui-skin-sam .yui-ac-shadow{position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity:.10;opacity:.10;filter:alpha(opacity=10);z-index:9049;}.yui-skin-sam .yui-ac iframe{opacity:0;filter:alpha(opacity=0);padding-right:.3em;padding-bottom:.3em;}.yui-skin-sam .yui-ac-content ul{margin:0;padding:0;width:100%;}.yui-skin-sam .yui-ac-content li{margin:0;padding:2px 5px;cursor:default;white-space:nowrap;list-style:none;zoom:1;}.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight{background:#B3D4FF;}.yui-skin-sam .yui-ac-content li.yui-ac-highlight{background:#426FD9;color:#FFF;} +.yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%}.yui-skin-sam .yui-ac-input{position:absolute;width:100%}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%}.yui-skin-sam .yui-ac-content{position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050}.yui-skin-sam .yui-ac-shadow{position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity:.10;opacity:.10;filter:alpha(opacity=10);z-index:9049}.yui-skin-sam .yui-ac iframe{opacity:0;filter:alpha(opacity=0);padding-right:.3em;padding-bottom:.3em}.yui-skin-sam .yui-ac-content ul{margin:0;padding:0;width:100%}.yui-skin-sam .yui-ac-content li{margin:0;padding:2px 5px;cursor:default;white-space:nowrap;list-style:none;zoom:1}.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight{background:#b3d4ff}.yui-skin-sam .yui-ac-content li.yui-ac-highlight{background:#426fd9;color:#FFF} diff --git a/include/javascript/yui/build/assets/skins/sam/button.css b/include/javascript/yui/build/assets/skins/sam/button.css index 9d63c610..c54fc728 100644 --- a/include/javascript/yui/build/assets/skins/sam/button.css +++ b/include/javascript/yui/build/assets/skins/sam/button.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ .yui-button{display:-moz-inline-box;display:inline-block;vertical-align:text-bottom;}.yui-button .first-child{display:block;*display:inline-block;}.yui-button button,.yui-button a{display:block;*display:inline-block;border:none;margin:0;}.yui-button button{background-color:transparent;*overflow:visible;cursor:pointer;}.yui-button a{text-decoration:none;}.yui-skin-sam .yui-button{border-width:1px 0;border-style:solid;border-color:#808080;background:url(sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;_margin:0;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a,.yui-skin-sam .yui-button a:visited{padding:0 10px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-button a{*line-height:1.875;*padding-bottom:1px;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20px;background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-split-button-focus button{background-image:url(split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-split-button-hover button{background-image:url(split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam .yui-button-active .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sam .yui-button-disabled a,.yui-skin-sam .yui-button-disabled a:visited{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-menu-button-disabled button{background-image:url(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);} diff --git a/include/javascript/yui/build/assets/skins/sam/calendar.css b/include/javascript/yui/build/assets/skins/sam/calendar.css index b01c7e61..df1d7055 100644 --- a/include/javascript/yui/build/assets/skins/sam/calendar.css +++ b/include/javascript/yui/build/assets/skins/sam/calendar.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -.yui-calcontainer{position:relative;float:left;_overflow:hidden;}.yui-calcontainer iframe{position:absolute;border:none;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0;top:0;}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px;}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative;}.yui-calcontainer .title{position:relative;z-index:1;}.yui-calcontainer .close-icon{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden;}.yui-calendar{position:relative;}.yui-calendar .calnavleft{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden;}.yui-calendar .calnavright{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden;}.yui-calendar .calheader{position:relative;width:100%;text-align:center;}.yui-calcontainer .yui-cal-nav-mask{position:absolute;z-index:2;margin:0;padding:0;width:100%;height:100%;_width:0;_height:0;left:0;top:0;display:none;}.yui-calcontainer .yui-cal-nav{position:absolute;z-index:3;top:0;display:none;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{display:-moz-inline-box;display:inline-block;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{display:block;*display:inline-block;*overflow:visible;border:none;background-color:transparent;cursor:pointer;}.yui-calendar .calbody a:hover{background:inherit;}p#clear{clear:left;padding-top:10px;}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px;}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px;}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transparent;border:none;padding:10px 5px 10px 5px;margin:0;}.yui-skin-sam .yui-calcontainer .title{background:url(sprite.png) repeat-x 0 0;border-bottom:1px solid #ccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left;}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px;}.yui-skin-sam .yui-calcontainer.withtitle{padding-top:0;}.yui-skin-sam .yui-calcontainer .calclose{background:url(sprite.png) no-repeat 0 -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;margin:0;}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:none;vertical-align:middle;padding:0;}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center;}.yui-skin-sam .yui-calendar .calheader img{border:none;}.yui-skin-sam .yui-calendar .calnavleft{background:url(sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calnavright{background:url(sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em;}.yui-skin-sam .yui-calendar .calweekdayrow th{padding:0;border:none;}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em;}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2;}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;border:none;}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding:0 2px 0 0;}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding:0 0 0 2px;}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #ccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap;}.yui-skin-sam .yui-calendar td.calcell a{color:#06c;display:block;height:100%;text-decoration:none;}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000;}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff;}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#ccc;color:#a6a6a6;cursor:default;}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer;}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff;}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0;}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through;}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#cf9;}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#9cf;}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#fcc;}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#cf9;}.yui-skin-sam .yui-calendar a.calnav{border:1px solid #f2f2f2;padding:0 4px;text-decoration:none;color:#000;zoom:1;}.yui-skin-sam .yui-calendar a.calnav:hover{background:url(sprite.png) repeat-x 0 0;border-color:#A0A0A0;cursor:pointer;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask{background-color:#000;opacity:.25;filter:alpha(opacity=25);}.yui-skin-sam .yui-calcontainer .yui-cal-nav{font-family:arial,helvetica,clean,sans-serif;font-size:93%;border:1px solid #808080;left:50%;margin-left:-7em;width:14em;padding:0;top:2.5em;background-color:#f2f2f2;}.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav{top:4.5em;}.yui-skin-sam .yui-calcontainer.multi .yui-cal-nav{width:16em;margin-left:-8em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y,.yui-skin-sam .yui-calcontainer .yui-cal-nav-m,.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{padding:5px 10px 5px 10px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{text-align:center;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-e{margin-top:5px;padding:5px;background-color:#EDF5FF;border-top:1px solid black;display:none;}.yui-skin-sam .yui-calcontainer .yui-cal-nav label{display:block;font-weight:bold;} -.yui-skin-sam .yui-calcontainer .yui-cal-nav-mc{width:100%;_width:auto;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid{background-color:#FFEE69;border:1px solid #000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc{width:4em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{border:1px solid #808080;background:url(sprite.png) repeat-x 0 0;background-color:#ccc;margin:auto .15em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{padding:0 8px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default{border:1px solid #304369;background-color:#426fd9;background:url(sprite.png) repeat-x 0 -1400px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button{color:#fff;} +.yui-calcontainer{position:relative;float:left;_overflow:hidden}.yui-calcontainer iframe{position:absolute;border:0;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0;top:0}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative}.yui-calcontainer .title{position:relative;z-index:1}.yui-calcontainer .close-icon{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden}.yui-calendar{position:relative}.yui-calendar .calnavleft{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden}.yui-calendar .calnavright{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden}.yui-calendar .calheader{position:relative;width:100%;text-align:center}.yui-calcontainer .yui-cal-nav-mask{position:absolute;z-index:2;margin:0;padding:0;width:100%;height:100%;_width:0;_height:0;left:0;top:0;display:none}.yui-calcontainer .yui-cal-nav{position:absolute;z-index:3;top:0;display:none}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{display:-moz-inline-box;display:inline-block}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{display:block;*display:inline-block;*overflow:visible;border:0;background-color:transparent;cursor:pointer}.yui-calendar .calbody a:hover{background:inherit}p#clear{clear:left;padding-top:10px}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transparent;border:0;padding:10px 5px 10px 5px;margin:0}.yui-skin-sam .yui-calcontainer .title{background:url(sprite.png) repeat-x 0 0;border-bottom:1px solid #ccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px}.yui-skin-sam .yui-calcontainer.withtitle{padding-top:0}.yui-skin-sam .yui-calcontainer .calclose{background:url(sprite.png) no-repeat 0 -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:pointer}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;margin:0}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:0;vertical-align:middle;padding:0}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center}.yui-skin-sam .yui-calendar .calheader img{border:0}.yui-skin-sam .yui-calendar .calnavleft{background:url(sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer}.yui-skin-sam .yui-calendar .calnavright{background:url(sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em}.yui-skin-sam .yui-calendar .calweekdayrow th{padding:0;border:0}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;border:0}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding:0 2px 0 0}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding:0 0 0 2px}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #ccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap}.yui-skin-sam .yui-calendar td.calcell a{color:#06c;display:block;height:100%;text-decoration:none}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#ccc;color:#a6a6a6;cursor:default}.yui-skin-sam .yui-calendar td.calcell.oom a{color:#a6a6a6}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#cf9}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#9cf}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#fcc}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#cf9}.yui-skin-sam .yui-calendar a.calnav{border:1px solid #f2f2f2;padding:0 4px;text-decoration:none;color:#000;zoom:1}.yui-skin-sam .yui-calendar a.calnav:hover{background:url(sprite.png) repeat-x 0 0;border-color:#a0a0a0;cursor:pointer}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask{background-color:#000;opacity:.25;filter:alpha(opacity=25)}.yui-skin-sam .yui-calcontainer .yui-cal-nav{font-family:arial,helvetica,clean,sans-serif;font-size:93%;border:1px solid #808080;left:50%;margin-left:-7em;width:14em;padding:0;top:2.5em;background-color:#f2f2f2}.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav{top:4.5em}.yui-skin-sam .yui-calcontainer.multi .yui-cal-nav{width:16em;margin-left:-8em}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y,.yui-skin-sam .yui-calcontainer .yui-cal-nav-m,.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{padding:5px 10px 5px 10px}.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{text-align:center}.yui-skin-sam .yui-calcontainer .yui-cal-nav-e{margin-top:5px;padding:5px;background-color:#edf5ff;border-top:1px solid black;display:none}.yui-skin-sam .yui-calcontainer .yui-cal-nav label{display:block;font-weight:bold} +.yui-skin-sam .yui-calcontainer .yui-cal-nav-mc{width:100%;_width:auto}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid{background-color:#ffee69;border:1px solid #000}.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc{width:4em}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{border:1px solid #808080;background:url(sprite.png) repeat-x 0 0;background-color:#ccc;margin:auto .15em}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{padding:0 8px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default{border:1px solid #304369;background-color:#426fd9;background:url(sprite.png) repeat-x 0 -1400px}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button{color:#fff} diff --git a/include/javascript/yui/build/assets/skins/sam/carousel.css b/include/javascript/yui/build/assets/skins/sam/carousel.css index dc1f9789..b3d86a68 100644 --- a/include/javascript/yui/build/assets/skins/sam/carousel.css +++ b/include/javascript/yui/build/assets/skins/sam/carousel.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ .yui-carousel{visibility:hidden;overflow:hidden;position:relative;text-align:left;zoom:1;}.yui-carousel.yui-carousel-visible{visibility:visible;}.yui-carousel-content{overflow:hidden;position:relative;text-align:center;}.yui-carousel-element li{border:1px solid #ccc;list-style:none;margin:1px;overflow:hidden;padding:0;position:absolute;text-align:center;}.yui-carousel-vertical .yui-carousel-element li{display:block;float:none;}.yui-log .carousel{background:#f2e886;}.yui-carousel-nav{zoom:1;}.yui-carousel-nav:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.yui-carousel-button-focus{outline:1px dotted #000;}.yui-carousel-min-width{min-width:115px;}.yui-carousel-element{overflow:hidden;position:relative;margin:0 auto;padding:0;text-align:left;*margin:0;}.yui-carousel-horizontal .yui-carousel-element{width:320000px;}.yui-carousel-vertical .yui-carousel-element{height:320000px;}.yui-skin-sam .yui-carousel-nav select{position:static;}.yui-carousel .yui-carousel-item-selected{border:1px dashed #000;margin:1px;}.yui-skin-sam .yui-carousel,.yui-skin-sam .yui-carousel-vertical{border:1px solid #808080;}.yui-skin-sam .yui-carousel-nav{background:url(sprite.png) repeat-x 0 0;padding:3px;text-align:right;}.yui-skin-sam .yui-carousel-button{background:url(sprite.png) no-repeat 0 -600px;float:right;height:19px;margin:5px;overflow:hidden;width:40px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button{background-position:0 -800px;}.yui-skin-sam .yui-carousel-button-disabled{background-position:0 -2000px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button-disabled{background-position:0 -2100px;}.yui-skin-sam .yui-carousel-button input,.yui-skin-sam .yui-carousel-button button{background-color:transparent;border:0;cursor:pointer;display:block;height:44px;margin:-2px 0 0 -2px;padding:0 0 0 50px;}.yui-skin-sam span.yui-carousel-first-button{background-position:0 -550px;margin-left:-100px;margin-right:50px;*margin:5px 5px 5px -90px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button{background-position:0 -750px;}.yui-skin-sam span.yui-carousel-first-button-disabled{background-position:0 -1950px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button-disabled{background-position:0 -2050px;}.yui-skin-sam .yui-carousel-nav ul{float:right;height:19px;margin:0;margin-left:-220px;margin-right:100px;*margin-left:-160px;*margin-right:0;padding:0;}.yui-skin-sam .yui-carousel-min-width .yui-carousel-nav ul{*margin-left:-170px;}.yui-skin-sam .yui-carousel-nav select{position:relative;*right:50px;top:4px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav select{position:static;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav ul,.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav select{float:none;margin:0;*zoom:1;}.yui-skin-sam .yui-carousel-nav ul li{background:url(sprite.png) no-repeat 0 -650px;cursor:pointer;float:left;height:9px;list-style:none;margin:10px 0 0 5px;overflow:hidden;padding:0;width:9px;}.yui-skin-sam .yui-carousel-nav ul:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.yui-skin-sam .yui-carousel-nav ul li a{display:block;width:100%;height:100%;text-indent:-10000px;text-align:left;overflow:hidden;}.yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-focus{outline:1px dotted #000;}.yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-selected{background-position:0 -700px;}.yui-skin-sam .yui-carousel-item-loading{background:url(ajax-loader.gif) no-repeat 50% 50%;position:absolute;text-indent:-150px;} diff --git a/include/javascript/yui/build/assets/skins/sam/colorpicker.css b/include/javascript/yui/build/assets/skins/sam/colorpicker.css index aaec21a0..77ac7c1e 100644 --- a/include/javascript/yui/build/assets/skins/sam/colorpicker.css +++ b/include/javascript/yui/build/assets/skins/sam/colorpicker.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -.yui-picker-panel{background:#e3e3e3;border-color:#888;}.yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000;}.yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px;}.yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px;}.yui-picker{position:relative;}.yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute;}.yui-picker-hue-bg{-moz-outline:none;outline:0 none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px;}.yui-picker-bg{-moz-outline:none;outline:0 none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png);}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../build/colorpicker/assets/picker_mask.png',sizingMethod='scale');}.yui-picker-mask{position:absolute;z-index:1;top:0;left:0;}.yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px;}.yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888;}.yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888;}.yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace;}.yui-picker-controls .hd{background:transparent;border-width:0!important;}.yui-picker-controls .bd{height:100px;border-width:0!important;}.yui-picker-controls ul{float:left;padding:0 2px 0 0;margin:0;}.yui-picker-controls li{padding:2px;list-style:none;margin:0;}.yui-picker-controls input{font-size:.85em;width:2.4em;}.yui-picker-hex-controls{clear:both;padding:2px;}.yui-picker-hex-controls input{width:4.6em;}.yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color:#000;} +.yui-picker-panel{background:#e3e3e3;border-color:#888}.yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000}.yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px}.yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px}.yui-picker{position:relative}.yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute}.yui-picker-hue-bg{-moz-outline:0;outline:0 none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px}.yui-picker-bg{-moz-outline:0;outline:0 none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png)}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='picker_mask.png',sizingMethod='scale')}.yui-picker-mask{position:absolute;z-index:1;top:0;left:0}.yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px}.yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888}.yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888}.yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace}.yui-picker-controls .hd{background:transparent;border-width:0!important}.yui-picker-controls .bd{height:100px;border-width:0!important}.yui-picker-controls ul{float:left;padding:0 2px 0 0;margin:0}.yui-picker-controls li{padding:2px;list-style:none;margin:0}.yui-picker-controls input{font-size:.85em;width:2.4em}.yui-picker-hex-controls{clear:both;padding:2px}.yui-picker-hex-controls input{width:4.6em}.yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color:#000} diff --git a/include/javascript/yui/build/assets/skins/sam/container.css b/include/javascript/yui/build/assets/skins/sam/container.css index 89e708c6..e4db6e32 100644 --- a/include/javascript/yui/build/assets/skins/sam/container.css +++ b/include/javascript/yui/build/assets/skins/sam/container.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:2;}.yui-panel{position:relative;}.yui-panel-container form{margin:0;}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0;}.mask.block-scrollbars{overflow:auto;}.masked select,.drag select,.hide-select select{_visibility:hidden;}.yui-panel-container select{_visibility:inherit;}.hide-scrollbars,.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.show-scrollbars{overflow:auto;}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible;}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto;}.yui-panel-container.shadow .underlay.yui-force-redraw{padding-bottom:1px;}.yui-effect-fade .underlay,.yui-effect-fade .yui-tt-shadow{display:none;}.yui-tt-shadow{position:absolute;}.yui-override-padding{padding:0!important;}.yui-panel-container .container-close{overflow:hidden;text-indent:-10000em;text-decoration:none;}.yui-overlay.yui-force-redraw,.yui-panel-container.yui-force-redraw{margin-bottom:1px;}.yui-skin-sam .mask{background-color:#000;opacity:.25;filter:alpha(opacity=25);}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px;}.yui-skin-sam .yui-panel{position:relative;left:0;top:0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;*border-width:1px;*zoom:1;_zoom:normal;}.yui-skin-sam .yui-panel .hd,.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;*margin:0;*border:0;}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc;}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#F2F2F2;}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(sprite.png) repeat-x 0 -200px;}.yui-skin-sam .yui-panel .bd{padding:10px;}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%;}.yui-skin-sam .container-close{position:absolute;top:5px;right:6px;width:25px;height:15px;background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;}.yui-skin-sam .yui-panel-container .underlay{right:-1px;left:-1px;}.yui-skin-sam .yui-panel-container.matte{padding:9px 10px;background-color:#fff;}.yui-skin-sam .yui-panel-container.shadow{_padding:2px 4px 0 2px;}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;left:-3px;right:-3px;bottom:-3px;*top:4px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_left:0;_right:0;_bottom:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;filter:alpha(opacity=12);}.yui-skin-sam .yui-dialog .ft{border-top:none;padding:0 10px 10px 10px;font-size:100%;}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right;}.yui-skin-sam .yui-dialog .ft button.default{font-weight:bold;}.yui-skin-sam .yui-dialog .ft span.default{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-dialog .ft span.default .first-child{border-color:#304369;}.yui-skin-sam .yui-dialog .ft span.default button{color:#fff;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled{background-position:0 -1500px;border-color:#ccc;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled button{color:#a6a6a6;}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(sprite.png) no-repeat 0 0;width:16px;height:16px;margin-right:10px;float:left;}.yui-skin-sam .yui-simple-dialog .bd span.blckicon{background-position:0 -1100px;}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{background-position:0 -1050px;}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-position:0 -1150px;}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px;}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px;}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px;}.yui-skin-sam .yui-tt .bd{position:relative;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#D4C237 #A6982B #A6982B #A6982B;border-width:1px;border-style:solid;background-color:#FFEE69;}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto;}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;filter:alpha(opacity=12);} +.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:2}.yui-panel{position:relative}.yui-panel-container form{margin:0}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0}.mask.block-scrollbars{overflow:auto}.masked select,.drag select,.hide-select select{_visibility:hidden}.yui-panel-container select{_visibility:inherit}.hide-scrollbars,.hide-scrollbars *{overflow:hidden}.hide-scrollbars select{display:none}.show-scrollbars{overflow:auto}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto}.yui-panel-container.shadow .underlay.yui-force-redraw{padding-bottom:1px}.yui-effect-fade .underlay,.yui-effect-fade .yui-tt-shadow{display:none}.yui-tt-shadow{position:absolute}.yui-override-padding{padding:0!important}.yui-panel-container .container-close{overflow:hidden;text-indent:-10000em;text-decoration:none}.yui-overlay.yui-force-redraw,.yui-panel-container.yui-force-redraw{margin-bottom:1px}.yui-skin-sam .mask{background-color:#000;opacity:.25;filter:alpha(opacity=25)}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px}.yui-skin-sam .yui-panel{position:relative;left:0;top:0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;*border-width:1px;*zoom:1;_zoom:normal}.yui-skin-sam .yui-panel .hd,.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;*margin:0;*border:0}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#f2f2f2}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(sprite.png) repeat-x 0 -200px}.yui-skin-sam .yui-panel .bd{padding:10px}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%}.yui-skin-sam .container-close{position:absolute;top:5px;right:6px;width:25px;height:15px;background:url(sprite.png) no-repeat 0 -300px;cursor:pointer}.yui-skin-sam .yui-panel-container .underlay{right:-1px;left:-1px}.yui-skin-sam .yui-panel-container.matte{padding:9px 10px;background-color:#fff}.yui-skin-sam .yui-panel-container.shadow{_padding:2px 4px 0 2px}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;left:-3px;right:-3px;bottom:-3px;*top:4px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_left:0;_right:0;_bottom:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;filter:alpha(opacity=12)}.yui-skin-sam .yui-dialog .ft{border-top:0;padding:0 10px 10px 10px;font-size:100%}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right}.yui-skin-sam .yui-dialog .ft button.default{font-weight:bold}.yui-skin-sam .yui-dialog .ft span.default{border-color:#304369;background-position:0 -1400px}.yui-skin-sam .yui-dialog .ft span.default .first-child{border-color:#304369}.yui-skin-sam .yui-dialog .ft span.default button{color:#fff}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled{background-position:0 -1500px;border-color:#ccc}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled .first-child{border-color:#ccc}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled button{color:#a6a6a6}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(sprite.png) no-repeat 0 0;width:16px;height:16px;margin-right:10px;float:left}.yui-skin-sam .yui-simple-dialog .bd span.blckicon{background-position:0 -1100px}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{background-position:0 -1050px}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-position:0 -1150px}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px}.yui-skin-sam .yui-tt .bd{position:relative;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#d4c237 #A6982b #a6982b #A6982B;border-width:1px;border-style:solid;background-color:#ffee69}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;filter:alpha(opacity=12)} diff --git a/include/javascript/yui/build/assets/skins/sam/datatable.css b/include/javascript/yui/build/assets/skins/sam/datatable.css index eb5a3140..91d07c3d 100644 --- a/include/javascript/yui/build/assets/skins/sam/datatable.css +++ b/include/javascript/yui/build/assets/skins/sam/datatable.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -.yui-skin-sam .yui-dt-mask{position:absolute;z-index:9500;}.yui-dt-tmp{position:absolute;left:-9000px;}.yui-dt-scrollable .yui-dt-bd{overflow:auto;}.yui-dt-scrollable .yui-dt-hd{overflow:hidden;position:relative;}.yui-dt-scrollable .yui-dt-bd thead tr,.yui-dt-scrollable .yui-dt-bd thead th{position:absolute;left:-1500px;}.yui-dt-scrollable tbody{-moz-outline:none;}.yui-skin-sam thead .yui-dt-sortable{cursor:pointer;}.yui-skin-sam thead .yui-dt-draggable{cursor:move;}.yui-dt-coltarget{position:absolute;z-index:999;}.yui-dt-hd{zoom:1;}th.yui-dt-resizeable .yui-dt-resizerliner{position:relative;}.yui-dt-resizer{position:absolute;right:0;bottom:0;height:100%;cursor:e-resize;cursor:col-resize;background-color:#CCC;opacity:0;filter:alpha(opacity=0);}.yui-dt-resizerproxy{visibility:hidden;position:absolute;z-index:9000;background-color:#CCC;opacity:0;filter:alpha(opacity=0);}th.yui-dt-hidden .yui-dt-liner,td.yui-dt-hidden .yui-dt-liner,th.yui-dt-hidden .yui-dt-resizer{display:none;}.yui-dt-editor{position:absolute;z-index:9000;}.yui-skin-sam .yui-dt table{margin:0;padding:0;font-family:arial;font-size:inherit;border-collapse:separate;*border-collapse:collapse;border-spacing:0;border:1px solid #7F7F7F;}.yui-skin-sam .yui-dt thead{border-spacing:0;}.yui-skin-sam .yui-dt caption{color:#000;font-size:85%;font-weight:normal;font-style:italic;line-height:1;padding:1em 0;text-align:center;}.yui-skin-sam .yui-dt th{background:#D8D8DA url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yui-dt th,.yui-skin-sam .yui-dt th a{font-weight:normal;text-decoration:none;color:#000;vertical-align:bottom;}.yui-skin-sam .yui-dt th{margin:0;padding:0;border:none;border-right:1px solid #CBCBCB;}.yui-skin-sam .yui-dt tr.yui-dt-first td{border-top:1px solid #7F7F7F;}.yui-skin-sam .yui-dt th .yui-dt-liner{white-space:nowrap;}.yui-skin-sam .yui-dt-liner{margin:0;padding:0;padding:4px 10px 4px 10px;}.yui-skin-sam .yui-dt-coltarget{width:5px;background-color:red;}.yui-skin-sam .yui-dt td{margin:0;padding:0;border:none;border-right:1px solid #CBCBCB;text-align:left;}.yui-skin-sam .yui-dt-list td{border-right:none;}.yui-skin-sam .yui-dt-resizer{width:6px;}.yui-skin-sam .yui-dt-mask{background-color:#000;opacity:.25;filter:alpha(opacity=25);}.yui-skin-sam .yui-dt-message{background-color:#FFF;}.yui-skin-sam .yui-dt-scrollable table{border:none;}.yui-skin-sam .yui-dt-scrollable .yui-dt-hd{border-left:1px solid #7F7F7F;border-top:1px solid #7F7F7F;border-right:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-scrollable .yui-dt-bd{border-left:1px solid #7F7F7F;border-bottom:1px solid #7F7F7F;border-right:1px solid #7F7F7F;background-color:#FFF;}.yui-skin-sam .yui-dt-scrollable .yui-dt-data tr.yui-dt-last td{border-bottom:1px solid #7F7F7F;}.yui-skin-sam th.yui-dt-asc,.yui-skin-sam th.yui-dt-desc{background:url(sprite.png) repeat-x 0 -100px;}.yui-skin-sam th.yui-dt-sortable .yui-dt-label{margin-right:10px;}.yui-skin-sam th.yui-dt-asc .yui-dt-liner{background:url(dt-arrow-up.png) no-repeat right;}.yui-skin-sam th.yui-dt-desc .yui-dt-liner{background:url(dt-arrow-dn.png) no-repeat right;}tbody .yui-dt-editable{cursor:pointer;}.yui-dt-editor{text-align:left;background-color:#F2F2F2;border:1px solid #808080;padding:6px;}.yui-dt-editor label{padding-left:4px;padding-right:6px;}.yui-dt-editor .yui-dt-button{padding-top:6px;text-align:right;}.yui-dt-editor .yui-dt-button button{background:url(sprite.png) repeat-x 0 0;border:1px solid #999;width:4em;height:1.8em;margin-left:6px;}.yui-dt-editor .yui-dt-button button.yui-dt-default{background:url(sprite.png) repeat-x 0 -1400px;background-color:#5584E0;border:1px solid #304369;color:#FFF;}.yui-dt-editor .yui-dt-button button:hover{background:url(sprite.png) repeat-x 0 -1300px;color:#000;}.yui-dt-editor .yui-dt-button button:active{background:url(sprite.png) repeat-x 0 -1700px;color:#000;}.yui-skin-sam tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam tr.yui-dt-odd{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam tr.yui-dt-odd td.yui-dt-desc{background-color:#DBEAFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam th.yui-dt-highlighted,.yui-skin-sam th.yui-dt-highlighted a{background-color:#B2D2FF;}.yui-skin-sam tr.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam .yui-dt-list th.yui-dt-highlighted,.yui-skin-sam .yui-dt-list th.yui-dt-highlighted a{background-color:#B2D2FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam th.yui-dt-selected,.yui-skin-sam th.yui-dt-selected a{background-color:#446CD7;}.yui-skin-sam tr.yui-dt-selected td,.yui-skin-sam tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-list th.yui-dt-selected,.yui-skin-sam .yui-dt-list th.yui-dt-selected a{background-color:#446CD7;} -.yui-skin-sam .yui-dt-list tr.yui-dt-selected td,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-paginator{display:block;margin:6px 0;white-space:nowrap;}.yui-skin-sam .yui-dt-paginator .yui-dt-first,.yui-skin-sam .yui-dt-paginator .yui-dt-last,.yui-skin-sam .yui-dt-paginator .yui-dt-selected{padding:2px 6px;}.yui-skin-sam .yui-dt-paginator a.yui-dt-first,.yui-skin-sam .yui-dt-paginator a.yui-dt-last{text-decoration:none;}.yui-skin-sam .yui-dt-paginator .yui-dt-previous,.yui-skin-sam .yui-dt-paginator .yui-dt-next{display:none;}.yui-skin-sam a.yui-dt-page{border:1px solid #CBCBCB;padding:2px 6px;text-decoration:none;background-color:#fff;}.yui-skin-sam .yui-dt-selected{border:1px solid #fff;background-color:#fff;} +.yui-skin-sam .yui-dt-mask{position:absolute;z-index:9500}.yui-dt-tmp{position:absolute;left:-9000px}.yui-dt-scrollable .yui-dt-bd{overflow:auto}.yui-dt-scrollable .yui-dt-hd{overflow:hidden;position:relative}.yui-dt-scrollable .yui-dt-bd thead tr,.yui-dt-scrollable .yui-dt-bd thead th{position:absolute;left:-1500px}.yui-dt-scrollable tbody{-moz-outline:0}.yui-skin-sam thead .yui-dt-sortable{cursor:pointer}.yui-skin-sam thead .yui-dt-draggable{cursor:move}.yui-dt-coltarget{position:absolute;z-index:999}.yui-dt-hd{zoom:1}th.yui-dt-resizeable .yui-dt-resizerliner{position:relative}.yui-dt-resizer{position:absolute;right:0;bottom:0;height:100%;cursor:e-resize;cursor:col-resize;background-color:#CCC;opacity:0;filter:alpha(opacity=0)}.yui-dt-resizerproxy{visibility:hidden;position:absolute;z-index:9000;background-color:#CCC;opacity:0;filter:alpha(opacity=0)}th.yui-dt-hidden .yui-dt-liner,td.yui-dt-hidden .yui-dt-liner,th.yui-dt-hidden .yui-dt-resizer{display:none}.yui-dt-editor,.yui-dt-editor-shim{position:absolute;z-index:9000}.yui-skin-sam .yui-dt table{margin:0;padding:0;font-family:arial;font-size:inherit;border-collapse:separate;*border-collapse:collapse;border-spacing:0;border:1px solid #7f7f7f}.yui-skin-sam .yui-dt thead{border-spacing:0}.yui-skin-sam .yui-dt caption{color:#000;font-size:85%;font-weight:normal;font-style:italic;line-height:1;padding:1em 0;text-align:center}.yui-skin-sam .yui-dt th{background:#d8d8da url(sprite.png) repeat-x 0 0}.yui-skin-sam .yui-dt th,.yui-skin-sam .yui-dt th a{font-weight:normal;text-decoration:none;color:#000;vertical-align:bottom}.yui-skin-sam .yui-dt th{margin:0;padding:0;border:0;border-right:1px solid #cbcbcb}.yui-skin-sam .yui-dt tr.yui-dt-first td{border-top:1px solid #7f7f7f}.yui-skin-sam .yui-dt th .yui-dt-liner{white-space:nowrap}.yui-skin-sam .yui-dt-liner{margin:0;padding:0;padding:4px 10px 4px 10px}.yui-skin-sam .yui-dt-coltarget{width:5px;background-color:red}.yui-skin-sam .yui-dt td{margin:0;padding:0;border:0;border-right:1px solid #cbcbcb;text-align:left}.yui-skin-sam .yui-dt-list td{border-right:0}.yui-skin-sam .yui-dt-resizer{width:6px}.yui-skin-sam .yui-dt-mask{background-color:#000;opacity:.25;filter:alpha(opacity=25)}.yui-skin-sam .yui-dt-message{background-color:#FFF}.yui-skin-sam .yui-dt-scrollable table{border:0}.yui-skin-sam .yui-dt-scrollable .yui-dt-hd{border-left:1px solid #7f7f7f;border-top:1px solid #7f7f7f;border-right:1px solid #7f7f7f}.yui-skin-sam .yui-dt-scrollable .yui-dt-bd{border-left:1px solid #7f7f7f;border-bottom:1px solid #7f7f7f;border-right:1px solid #7f7f7f;background-color:#FFF}.yui-skin-sam .yui-dt-scrollable .yui-dt-data tr.yui-dt-last td{border-bottom:1px solid #7f7f7f}.yui-skin-sam th.yui-dt-asc,.yui-skin-sam th.yui-dt-desc{background:url(sprite.png) repeat-x 0 -100px}.yui-skin-sam th.yui-dt-sortable .yui-dt-label{margin-right:10px}.yui-skin-sam th.yui-dt-asc .yui-dt-liner{background:url(dt-arrow-up.png) no-repeat right}.yui-skin-sam th.yui-dt-desc .yui-dt-liner{background:url(dt-arrow-dn.png) no-repeat right}tbody .yui-dt-editable{cursor:pointer}.yui-dt-editor{text-align:left;background-color:#f2f2f2;border:1px solid #808080;padding:6px}.yui-dt-editor label{padding-left:4px;padding-right:6px}.yui-dt-editor .yui-dt-button{padding-top:6px;text-align:right}.yui-dt-editor .yui-dt-button button{background:url(sprite.png) repeat-x 0 0;border:1px solid #999;width:4em;height:1.8em;margin-left:6px}.yui-dt-editor .yui-dt-button button.yui-dt-default{background:url(sprite.png) repeat-x 0 -1400px;background-color:#5584e0;border:1px solid #304369;color:#FFF}.yui-dt-editor .yui-dt-button button:hover{background:url(sprite.png) repeat-x 0 -1300px;color:#000}.yui-dt-editor .yui-dt-button button:active{background:url(sprite.png) repeat-x 0 -1700px;color:#000}.yui-skin-sam tr.yui-dt-even{background-color:#FFF}.yui-skin-sam tr.yui-dt-odd{background-color:#edf5ff}.yui-skin-sam tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam tr.yui-dt-even td.yui-dt-desc{background-color:#edf5ff}.yui-skin-sam tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam tr.yui-dt-odd td.yui-dt-desc{background-color:#dbeaff}.yui-skin-sam .yui-dt-list tr.yui-dt-even{background-color:#FFF}.yui-skin-sam .yui-dt-list tr.yui-dt-odd{background-color:#FFF}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-desc{background-color:#edf5ff}.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-desc{background-color:#edf5ff}.yui-skin-sam th.yui-dt-highlighted,.yui-skin-sam th.yui-dt-highlighted a{background-color:#b2d2ff}.yui-skin-sam tr.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#b2d2ff}.yui-skin-sam .yui-dt-list th.yui-dt-highlighted,.yui-skin-sam .yui-dt-list th.yui-dt-highlighted a{background-color:#b2d2ff}.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#b2d2ff}.yui-skin-sam th.yui-dt-selected,.yui-skin-sam th.yui-dt-selected a{background-color:#446cd7}.yui-skin-sam tr.yui-dt-selected td,.yui-skin-sam tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam tr.yui-dt-selected td.yui-dt-desc{background-color:#426fd9;color:#FFF}.yui-skin-sam tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam tr.yui-dt-odd td.yui-dt-selected{background-color:#446cd7;color:#FFF}.yui-skin-sam .yui-dt-list th.yui-dt-selected,.yui-skin-sam .yui-dt-list th.yui-dt-selected a{background-color:#446cd7} +.yui-skin-sam .yui-dt-list tr.yui-dt-selected td,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-desc{background-color:#426fd9;color:#FFF}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-selected{background-color:#446cd7;color:#FFF}.yui-skin-sam .yui-dt-paginator{display:block;margin:6px 0;white-space:nowrap}.yui-skin-sam .yui-dt-paginator .yui-dt-first,.yui-skin-sam .yui-dt-paginator .yui-dt-last,.yui-skin-sam .yui-dt-paginator .yui-dt-selected{padding:2px 6px}.yui-skin-sam .yui-dt-paginator a.yui-dt-first,.yui-skin-sam .yui-dt-paginator a.yui-dt-last{text-decoration:none}.yui-skin-sam .yui-dt-paginator .yui-dt-previous,.yui-skin-sam .yui-dt-paginator .yui-dt-next{display:none}.yui-skin-sam a.yui-dt-page{border:1px solid #cbcbcb;padding:2px 6px;text-decoration:none;background-color:#fff}.yui-skin-sam .yui-dt-selected{border:1px solid #fff;background-color:#fff} diff --git a/include/javascript/yui/build/assets/skins/sam/editor.css b/include/javascript/yui/build/assets/skins/sam/editor.css index 00451d8c..d3cde1ca 100644 --- a/include/javascript/yui/build/assets/skins/sam/editor.css +++ b/include/javascript/yui/build/assets/skins/sam/editor.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ .yui-busy{cursor:wait!important;}.yui-toolbar-container fieldset,.yui-editor-container fieldset{padding:0;margin:0;border:0;}.yui-toolbar-container legend{display:none;}.yui-skin-sam .yui-toolbar-container .yui-button button,.yui-skin-sam .yui-toolbar-container .yui-button a,.yui-skin-sam .yui-toolbar-container .yui-button a:visited{font-size:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a:visited,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a:visited{font-size:12px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{font-size:0;line-height:0;padding:0;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container .yui-toolbar-titlebar h2 a{text-decoration:none;color:#000;cursor:default;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;margin-right:.5em;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;padding:0;height:18px;margin:.2em 0 .2em .1em;display:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:45px;*height:50px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;display:block;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;font-size:0;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block;right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;height:100%;width:100%;position:absolute;top:0;left:0;opacity:.5;filter:alpha(opacity=50);}.yui-editor-container iframe{border:0;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:.25em 0 .25em .25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd .gecko form{overflow:auto;}.yui-editor-panel .bd div.yui-editor-body-cont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group{margin-bottom:.75em;}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:visible;}.yui-editor-panel .height-width span.info{font-size:70%;margin-top:3px;float:none;} .yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-panel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;_top:-5px;width:24px;text-indent:52px;font-size:0;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0;text-indent:0;font-size:75%;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px!important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px solid #F6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-toolbar-group-undoredo h3,.yui-toolbar-group-insertitem h3,.yui-toolbar-group-indentlist h3{width:68px;}.yui-toolbar-group-indentlist2 h3{width:122px;}.yui-toolbar-group-alignment h3{width:130px;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-editor-container .draggable .yui-toolbar-titlebar{cursor:move;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000;font-weight:bold;margin:0;padding:.3em 1em;font-size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:0 .25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em .35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-top:1px solid #808080;color:#999;text-align:left;padding:.25em;}.yui-skin-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .collapsed{background:url(sprite.png) no-repeat 0 -350px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;} diff --git a/include/javascript/yui/build/assets/skins/sam/imagecropper.css b/include/javascript/yui/build/assets/skins/sam/imagecropper.css index 0e8d36f6..87a081ab 100644 --- a/include/javascript/yui/build/assets/skins/sam/imagecropper.css +++ b/include/javascript/yui/build/assets/skins/sam/imagecropper.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ .yui-crop{position:relative;}.yui-crop .yui-crop-mask{position:absolute;top:0;left:0;height:100%;width:100%;}.yui-crop .yui-resize{position:absolute;top:10px;left:10px;border:0;}.yui-crop .yui-crop-resize-mask{position:absolute;top:0;left:0;height:100%;width:100%;background-position:-10px -10px;overflow:hidden;}.yui-skin-sam .yui-crop .yui-crop-mask{background-color:#000;opacity:.5;filter:alpha(opacity=50);}.yui-skin-sam .yui-crop .yui-resize{border:1px dashed #fff;} diff --git a/include/javascript/yui/build/assets/skins/sam/layout.css b/include/javascript/yui/build/assets/skins/sam/layout.css index aa5545f1..de790e9f 100644 --- a/include/javascript/yui/build/assets/skins/sam/layout.css +++ b/include/javascript/yui/build/assets/skins/sam/layout.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ .yui-layout-loading{visibility:hidden;}body.yui-layout{overflow:hidden;position:relative;padding:0;margin:0;}.yui-layout-doc{position:relative;overflow:hidden;padding:0;margin:0;}.yui-layout-unit{height:50px;width:50px;padding:0;margin:0;float:none;z-index:0;}.yui-layout-unit-top{position:absolute;top:0;left:0;width:100%;}.yui-layout-unit-left{position:absolute;top:0;left:0;}.yui-layout-unit-right{position:absolute;top:0;right:0;}.yui-layout-unit-bottom{position:absolute;bottom:0;left:0;width:100%;}.yui-layout-unit-center{position:absolute;top:0;left:0;width:100%;}.yui-layout div.yui-layout-hd{position:absolute;top:0;left:0;zoom:1;width:100%;}.yui-layout div.yui-layout-bd{position:absolute;top:0;left:0;zoom:1;width:100%;}.yui-layout .yui-layout-noscroll div.yui-layout-bd{overflow:hidden;}.yui-layout .yui-layout-scroll div.yui-layout-bd{overflow:auto;}.yui-layout div.yui-layout-ft{position:absolute;bottom:0;left:0;width:100%;zoom:1;}.yui-layout .yui-layout-unit div.yui-layout-hd h2{text-align:left;}.yui-layout .yui-layout-unit div.yui-layout-hd .collapse{cursor:pointer;height:13px;position:absolute;right:2px;top:2px;width:17px;font-size:0;}.yui-layout .yui-layout-unit div.yui-layout-hd .close{cursor:pointer;height:13px;position:absolute;right:2px;top:2px;width:17px;font-size:0;}.yui-layout .yui-layout-unit div.yui-layout-hd .collapse-close{right:25px;}.yui-layout .yui-layout-clip{position:absolute;height:20px;background-color:#c0c0c0;display:none;}.yui-layout .yui-layout-clip .collapse{cursor:pointer;height:13px;position:absolute;right:2px;top:2px;width:17px;font-size:0;}.yui-layout .yui-layout-wrap{height:100%;width:100%;position:absolute;left:0;}.yui-skin-sam .yui-layout .yui-resize-proxy{border:none;font-size:0;margin:0;padding:0;}.yui-skin-sam .yui-layout .yui-resize-resizing .yui-resize-handle{display:none;zoom:1;}.yui-skin-sam .yui-layout .yui-resize-proxy div{position:absolute;border:1px solid #808080;background-color:#EDF5FF;}.yui-skin-sam .yui-layout .yui-resize .yui-resize-handle-active{zoom:1;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-l{width:5px;height:100%;top:0;left:0;zoom:1;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-r{width:5px;top:0;right:0;height:100%;position:absolute;zoom:1;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-b{width:100%;bottom:0;left:0;height:5px;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-t{width:100%;top:0;left:0;height:5px;}.yui-skin-sam .yui-layout .yui-layout-unit-left div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -160px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-left .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -140px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit-right div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -200px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-right .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -120px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit-top div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -220px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-top .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -240px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit-bottom div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -260px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-bottom .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -180px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-hd .close{background:transparent url(layout_sprite.png) no-repeat -20px -100px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-hd{background:url(sprite.png) repeat-x 0 -1400px;border:1px solid #808080;}.yui-skin-sam .yui-layout{background-color:#EDF5FF;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-hd h2{font-weight:bold;color:#fff;padding:3px;margin:0;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd{border:1px solid #808080;border-bottom:none;border-top:none;*border-bottom-width:0;*border-top-width:0;background-color:#f2f2f2;text-align:left;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd-noft{border-bottom:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd-nohd{border-top:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip{position:absolute;height:20px;background-color:#EDF5FF;display:none;border:1px solid #808080;}.yui-skin-sam .yui-layout div.yui-layout-ft{border:1px solid #808080;border-top:none;*border-top-width:0;background-color:#f2f2f2;}.yui-skin-sam .yui-layout-unit .yui-resize-handle{background-color:transparent;zoom:1;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-r{right:0;top:0;background-image:none;zoom:1;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-l{left:0;top:0;background-image:none;zoom:1;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-b{right:0;bottom:0;background-image:none;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-t{right:0;top:0;background-image:none;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-r .yui-layout-resize-knob,.yui-skin-sam .yui-layout-unit .yui-resize-handle-l .yui-layout-resize-knob{position:absolute;height:16px;width:6px;top:45%;left:0;display:block;background:transparent url(layout_sprite.png) no-repeat 0 -5px;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-t .yui-layout-resize-knob,.yui-skin-sam .yui-layout-unit .yui-resize-handle-b .yui-layout-resize-knob{position:absolute;height:6px;width:16px;left:45%;background:transparent url(layout_sprite.png) no-repeat -20px 0;zoom:1;} diff --git a/include/javascript/yui/build/assets/skins/sam/logger.css b/include/javascript/yui/build/assets/skins/sam/logger.css index 491b9c09..bc5397ec 100644 --- a/include/javascript/yui/build/assets/skins/sam/logger.css +++ b/include/javascript/yui/build/assets/skins/sam/logger.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -.yui-skin-sam .yui-log{padding:1em;width:31em;background-color:#AAA;color:#000;border:1px solid black;font-family:monospace;font-size:77%;text-align:left;z-index:9000;}.yui-skin-sam .yui-log-container{position:absolute;top:1em;right:1em;}.yui-skin-sam .yui-log input{margin:0;padding:0;font-family:arial;font-size:100%;font-weight:normal;}.yui-skin-sam .yui-log .yui-log-btns{position:relative;float:right;bottom:.25em;}.yui-skin-sam .yui-log .yui-log-hd{margin-top:1em;padding:.5em;background-color:#575757;}.yui-skin-sam .yui-log .yui-log-hd h4{margin:0;padding:0;font-size:108%;font-weight:bold;color:#FFF;}.yui-skin-sam .yui-log .yui-log-bd{width:100%;height:20em;background-color:#FFF;border:1px solid gray;overflow:auto;}.yui-skin-sam .yui-log p{margin:1px;padding:.1em;}.yui-skin-sam .yui-log pre{margin:0;padding:0;}.yui-skin-sam .yui-log pre.yui-log-verbose{white-space:pre-wrap;white-space:-moz-pre-wrap!important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;}.yui-skin-sam .yui-log .yui-log-ft{margin-top:.5em;}.yui-skin-sam .yui-log .yui-log-ft .yui-log-sourcefilters{width:100%;border-top:1px solid #575757;margin-top:.75em;padding-top:.75em;}.yui-skin-sam .yui-log .yui-log-filtergrp{margin-right:.5em;}.yui-skin-sam .yui-log .info{background-color:#A7CC25;}.yui-skin-sam .yui-log .warn{background-color:#F58516;}.yui-skin-sam .yui-log .error{background-color:#E32F0B;}.yui-skin-sam .yui-log .time{background-color:#A6C9D7;}.yui-skin-sam .yui-log .window{background-color:#F2E886;} +.yui-skin-sam .yui-log{padding:1em;width:31em;background-color:#AAA;color:#000;border:1px solid black;font-family:monospace;font-size:77%;text-align:left;z-index:9000}.yui-skin-sam .yui-log-container{position:absolute;top:1em;right:1em}.yui-skin-sam .yui-log input{margin:0;padding:0;font-family:arial;font-size:100%;font-weight:normal}.yui-skin-sam .yui-log .yui-log-btns{position:relative;float:right;bottom:.25em}.yui-skin-sam .yui-log .yui-log-hd{margin-top:1em;padding:.5em;background-color:#575757}.yui-skin-sam .yui-log .yui-log-hd h4{margin:0;padding:0;font-size:108%;font-weight:bold;color:#FFF}.yui-skin-sam .yui-log .yui-log-bd{width:100%;height:20em;background-color:#FFF;border:1px solid gray;overflow:auto}.yui-skin-sam .yui-log p{margin:1px;padding:.1em}.yui-skin-sam .yui-log pre{margin:0;padding:0}.yui-skin-sam .yui-log pre.yui-log-verbose{white-space:pre-wrap;white-space:-moz-pre-wrap!important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}.yui-skin-sam .yui-log .yui-log-ft{margin-top:.5em}.yui-skin-sam .yui-log .yui-log-ft .yui-log-sourcefilters{width:100%;border-top:1px solid #575757;margin-top:.75em;padding-top:.75em}.yui-skin-sam .yui-log .yui-log-filtergrp{margin-right:.5em}.yui-skin-sam .yui-log .info{background-color:#a7cc25}.yui-skin-sam .yui-log .warn{background-color:#f58516}.yui-skin-sam .yui-log .error{background-color:#e32f0b}.yui-skin-sam .yui-log .time{background-color:#a6c9d7}.yui-skin-sam .yui-log .window{background-color:#f2e886} diff --git a/include/javascript/yui/build/assets/skins/sam/menu.css b/include/javascript/yui/build/assets/skins/sam/menu.css index 7ff03a14..744ef094 100644 --- a/include/javascript/yui/build/assets/skins/sam/menu.css +++ b/include/javascript/yui/build/assets/skins/sam/menu.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ .yuimenu{top:-999em;left:-999em;}.yuimenubar{position:static;}.yuimenu .yuimenu,.yuimenubar .yuimenu{position:absolute;}.yuimenubar li,.yuimenu li{list-style-type:none;}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;}.yuimenuitemlabel,.yuimenubaritemlabel{text-align:left;white-space:nowrap;}.yuimenubar ul{*zoom:1;}.yuimenubar .yuimenu ul{*zoom:normal;}.yuimenubar>.bd>ul:after{content:".";display:block;clear:both;visibility:hidden;height:0;line-height:0;}.yuimenubaritem{float:left;}.yuimenubaritemlabel,.yuimenuitemlabel{display:block;}.yuimenuitemlabel .helptext{font-style:normal;display:block;margin:-1em 0 0 10em;}.yui-menu-shadow{position:absolute;visibility:hidden;z-index:-1;}.yui-menu-shadow-visible{top:2px;right:-3px;left:-3px;bottom:-3px;visibility:visible;}.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.yuimenu.show-scrollbars,.yuimenubar.show-scrollbars{overflow:visible;}.yuimenu.hide-scrollbars .yui-menu-shadow,.yuimenubar.hide-scrollbars .yui-menu-shadow{overflow:hidden;}.yuimenu.show-scrollbars .yui-menu-shadow,.yuimenubar.show-scrollbars .yui-menu-shadow{overflow:auto;}.yui-overlay.yui-force-redraw{margin-bottom:1px;}.yui-skin-sam .yuimenubar{font-size:93%;line-height:2;*line-height:1.9;border:solid 1px #808080;background:url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritem{border-right:solid 1px #ccc;}.yui-skin-sam .yuimenubaritemlabel{padding:0 10px;color:#000;text-decoration:none;cursor:default;border-style:solid;border-color:#808080;border-width:1px 0;*position:relative;margin:-1px 0;}.yui-skin-sam .yuimenubaritemlabel:visited{color:#000;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel{padding-right:20px;*display:inline-block;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu{background:url(menubaritem_submenuindicator.png) right center no-repeat;}.yui-skin-sam .yuimenubaritem-selected{background:url(sprite.png) repeat-x 0 -1700px;}.yui-skin-sam .yuimenubaritemlabel-selected{border-color:#7D98B8;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-selected{border-left-width:1px;margin-left:-1px;*left:-1px;}.yui-skin-sam .yuimenubaritemlabel-disabled,.yui-skin-sam .yuimenubaritemlabel-disabled:visited{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu-disabled{background-image:url(menubaritem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenu{font-size:93%;line-height:1.5;*line-height:1.45;}.yui-skin-sam .yuimenubar .yuimenu,.yui-skin-sam .yuimenu .yuimenu{font-size:100%;}.yui-skin-sam .yuimenu .bd{*zoom:1;_zoom:normal;border:solid 1px #808080;background-color:#fff;}.yui-skin-sam .yuimenu .yuimenu .bd{*zoom:normal;}.yui-skin-sam .yuimenu ul{padding:3px 0;border-width:1px 0 0 0;border-color:#ccc;border-style:solid;}.yui-skin-sam .yuimenu ul.first-of-type{border-width:0;}.yui-skin-sam .yuimenu h6{font-weight:bold;border-style:solid;border-color:#ccc;border-width:1px 0 0 0;color:#a4a4a4;padding:3px 10px 0 10px;}.yui-skin-sam .yuimenu ul.hastitle,.yui-skin-sam .yuimenu h6.first-of-type{border-width:0;}.yui-skin-sam .yuimenu .yui-menu-body-scrolled{border-color:#ccc #808080;overflow:hidden;}.yui-skin-sam .yuimenu .topscrollbar,.yui-skin-sam .yuimenu .bottomscrollbar{height:16px;border:solid 1px #808080;background:#fff url(sprite.png) no-repeat 0 0;}.yui-skin-sam .yuimenu .topscrollbar{border-bottom-width:0;background-position:center -950px;}.yui-skin-sam .yuimenu .topscrollbar_disabled{background-position:center -975px;}.yui-skin-sam .yuimenu .bottomscrollbar{border-top-width:0;background-position:center -850px;}.yui-skin-sam .yuimenu .bottomscrollbar_disabled{background-position:center -875px;}.yui-skin-sam .yuimenuitem{_border-bottom:solid 1px #fff;}.yui-skin-sam .yuimenuitemlabel{padding:0 20px;color:#000;text-decoration:none;cursor:default;}.yui-skin-sam .yuimenuitemlabel:visited{color:#000;}.yui-skin-sam .yuimenuitemlabel .helptext{margin-top:-1.5em;*margin-top:-1.45em;}.yui-skin-sam .yuimenuitem-hassubmenu{background-image:url(menuitem_submenuindicator.png);background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yuimenuitem-checked{background-image:url(menuitem_checkbox.png);background-position:left center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-shadow-visible{background-color:#000;opacity:.12;filter:alpha(opacity=12);}.yui-skin-sam .yuimenuitem-selected{background-color:#B3D4FF;}.yui-skin-sam .yuimenuitemlabel-disabled,.yui-skin-sam .yuimenuitemlabel-disabled:visited{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenuitem-hassubmenu-disabled{background-image:url(menuitem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenuitem-checked-disabled{background-image:url(menuitem_checkbox_disabled.png);} diff --git a/include/javascript/yui/build/assets/skins/sam/paginator.css b/include/javascript/yui/build/assets/skins/sam/paginator.css index 31f0d336..57a10bce 100644 --- a/include/javascript/yui/build/assets/skins/sam/paginator.css +++ b/include/javascript/yui/build/assets/skins/sam/paginator.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -.yui-skin-sam .yui-pg-container{display:block;margin:6px 0;white-space:nowrap;}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous,.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last,.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-pages,.yui-skin-sam .yui-pg-page{display:inline-block;font-family:arial,helvetica,clean,sans-serif;padding:3px 6px;zoom:1;}.yui-skin-sam .yui-pg-pages{padding:0;}.yui-skin-sam .yui-pg-current{padding:3px 0;}.yui-skin-sam a.yui-pg-first:link,.yui-skin-sam a.yui-pg-first:visited,.yui-skin-sam a.yui-pg-first:active,.yui-skin-sam a.yui-pg-first:hover,.yui-skin-sam a.yui-pg-previous:link,.yui-skin-sam a.yui-pg-previous:visited,.yui-skin-sam a.yui-pg-previous:active,.yui-skin-sam a.yui-pg-previous:hover,.yui-skin-sam a.yui-pg-next:link,.yui-skin-sam a.yui-pg-next:visited,.yui-skin-sam a.yui-pg-next:active,.yui-skin-sam a.yui-pg-next:hover,.yui-skin-sam a.yui-pg-last:link,.yui-skin-sam a.yui-pg-last:visited,.yui-skin-sam a.yui-pg-last:active,.yui-skin-sam a.yui-pg-last:hover,.yui-skin-sam a.yui-pg-page:link,.yui-skin-sam a.yui-pg-page:visited,.yui-skin-sam a.yui-pg-page:active,.yui-skin-sam a.yui-pg-page:hover{color:#06c;text-decoration:underline;outline:0;}.yui-skin-sam span.yui-pg-first,.yui-skin-sam span.yui-pg-previous,.yui-skin-sam span.yui-pg-next,.yui-skin-sam span.yui-pg-last{color:#a6a6a6;}.yui-skin-sam .yui-pg-page{background-color:#fff;border:1px solid #CBCBCB;padding:2px 6px;text-decoration:none;}.yui-skin-sam .yui-pg-current-page{background-color:transparent;border:none;font-weight:bold;padding:3px 6px;}.yui-skin-sam .yui-pg-page{margin-left:1px;margin-right:1px;}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous{padding-left:0;}.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last{padding-right:0;}.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-rpp-options{margin-left:1em;margin-right:1em;} +.yui-skin-sam .yui-pg-container{display:block;margin:6px 0;white-space:nowrap}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous,.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last,.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-pages,.yui-skin-sam .yui-pg-page{display:inline-block;font-family:arial,helvetica,clean,sans-serif;padding:3px 6px;zoom:1}.yui-skin-sam .yui-pg-pages{padding:0}.yui-skin-sam .yui-pg-current{padding:3px 0}.yui-skin-sam a.yui-pg-first:link,.yui-skin-sam a.yui-pg-first:visited,.yui-skin-sam a.yui-pg-first:active,.yui-skin-sam a.yui-pg-first:hover,.yui-skin-sam a.yui-pg-previous:link,.yui-skin-sam a.yui-pg-previous:visited,.yui-skin-sam a.yui-pg-previous:active,.yui-skin-sam a.yui-pg-previous:hover,.yui-skin-sam a.yui-pg-next:link,.yui-skin-sam a.yui-pg-next:visited,.yui-skin-sam a.yui-pg-next:active,.yui-skin-sam a.yui-pg-next:hover,.yui-skin-sam a.yui-pg-last:link,.yui-skin-sam a.yui-pg-last:visited,.yui-skin-sam a.yui-pg-last:active,.yui-skin-sam a.yui-pg-last:hover,.yui-skin-sam a.yui-pg-page:link,.yui-skin-sam a.yui-pg-page:visited,.yui-skin-sam a.yui-pg-page:active,.yui-skin-sam a.yui-pg-page:hover{color:#06c;text-decoration:underline;outline:0}.yui-skin-sam span.yui-pg-first,.yui-skin-sam span.yui-pg-previous,.yui-skin-sam span.yui-pg-next,.yui-skin-sam span.yui-pg-last{color:#a6a6a6}.yui-skin-sam .yui-pg-page{background-color:#fff;border:1px solid #cbcbcb;padding:2px 6px;text-decoration:none}.yui-skin-sam .yui-pg-current-page{background-color:transparent;border:0;font-weight:bold;padding:3px 6px}.yui-skin-sam .yui-pg-page{margin-left:1px;margin-right:1px}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous{padding-left:0}.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last{padding-right:0}.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-rpp-options{margin-left:1em;margin-right:1em} diff --git a/include/javascript/yui/build/assets/skins/sam/profilerviewer.css b/include/javascript/yui/build/assets/skins/sam/profilerviewer.css index d1e78322..8b3bfb43 100644 --- a/include/javascript/yui/build/assets/skins/sam/profilerviewer.css +++ b/include/javascript/yui/build/assets/skins/sam/profilerviewer.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -.yui-skin-sam .yui-pv{background-color:#4a4a4a;font:arial;position:relative;width:99%;z-index:1000;margin-bottom:1em;overflow:hidden;}.yui-skin-sam .yui-pv .hd{background:url(header_background.png) repeat-x;min-height:30px;overflow:hidden;zoom:1;padding:2px 0;}.yui-skin-sam .yui-pv .hd h4{padding:8px 10px;margin:0;font:bold 14px arial;color:#fff;}.yui-skin-sam .yui-pv .hd a{background:#3f6bc3;font:bold 11px arial;color:#fff;padding:4px;margin:3px 10px 0 0;border:1px solid #3f567d;cursor:pointer;display:block;float:right;}.yui-skin-sam .yui-pv .hd span{display:none;}.yui-skin-sam .yui-pv .hd span.yui-pv-busy{height:18px;width:18px;background:url(wait.gif) no-repeat;overflow:hidden;display:block;float:right;margin:4px 10px 0 0;}.yui-skin-sam .yui-pv .hd:after,.yui-pv .bd:after,.yui-skin-sam .yui-pv-chartlegend dl:after{content:'.';visibility:hidden;clear:left;height:0;display:block;}.yui-skin-sam .yui-pv .bd{position:relative;zoom:1;overflow-x:auto;overflow-y:hidden;}.yui-skin-sam .yui-pv .yui-pv-table{padding:0 10px;margin:5px 0 10px 0;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-bd td{color:#eeee5c;font:12px arial;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd{background:#929292;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even{background:#58637a;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-desc{background:#384970;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-desc{background:#6F6E6E;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th{background-image:none;background:#2E2D2D;}.yui-skin-sam .yui-pv th.yui-dt-asc .yui-dt-liner{background:transparent url(asc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv th.yui-dt-desc .yui-dt-liner{background:transparent url(desc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th a{color:#fff;font:bold 12px arial;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-desc{background:#333;}.yui-skin-sam .yui-pv-chartcontainer{padding:0 10px;}.yui-skin-sam .yui-pv-chart{height:250px;clear:right;margin:5px 0 0 0;color:#fff;}.yui-skin-sam .yui-pv-chartlegend div{float:right;margin:0 0 0 10px;_width:250px;}.yui-skin-sam .yui-pv-chartlegend dl{border:1px solid #999;padding:.2em 0 .2em .5em;zoom:1;margin:5px 0;}.yui-skin-sam .yui-pv-chartlegend dt{float:left;display:block;height:.7em;width:.7em;padding:0;}.yui-skin-sam .yui-pv-chartlegend dd{float:left;display:block;color:#fff;margin:0 1em 0 .5em;padding:0;font:11px arial;}.yui-skin-sam .yui-pv-minimized{height:35px;}.yui-skin-sam .yui-pv-minimized .bd{top:-3000px;}.yui-skin-sam .yui-pv-minimized .hd a.yui-pv-refresh{display:none;} +.yui-skin-sam .yui-pv{background-color:#4a4a4a;font-family:arial;position:relative;width:99%;z-index:1000;margin-bottom:1em;overflow:hidden;}.yui-skin-sam .yui-pv .hd{background:url(header_background.png) repeat-x;min-height:30px;overflow:hidden;zoom:1;padding:2px 0;}.yui-skin-sam .yui-pv .hd h4{padding:8px 10px;margin:0;font:bold 14px arial;color:#fff;}.yui-skin-sam .yui-pv .hd a{background:#3f6bc3;font:bold 11px arial;color:#fff;padding:4px;margin:3px 10px 0 0;border:1px solid #3f567d;cursor:pointer;display:block;float:right;}.yui-skin-sam .yui-pv .hd span{display:none;}.yui-skin-sam .yui-pv .hd span.yui-pv-busy{height:18px;width:18px;background:url(wait.gif) no-repeat;overflow:hidden;display:block;float:right;margin:4px 10px 0 0;}.yui-skin-sam .yui-pv .hd:after,.yui-pv .bd:after,.yui-skin-sam .yui-pv-chartlegend dl:after{content:'.';visibility:hidden;clear:left;height:0;display:block;}.yui-skin-sam .yui-pv .bd{position:relative;zoom:1;overflow-x:auto;overflow-y:hidden;}.yui-skin-sam .yui-pv .yui-pv-table{padding:0 10px;margin:5px 0 10px 0;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-bd td{color:#eeee5c;font:12px arial;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd{background:#929292;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even{background:#58637a;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-desc{background:#384970;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-desc{background:#6F6E6E;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th{background-image:none;background:#2E2D2D;}.yui-skin-sam .yui-pv th.yui-dt-asc .yui-dt-liner{background:transparent url(asc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv th.yui-dt-desc .yui-dt-liner{background:transparent url(desc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th a{color:#fff;font:bold 12px arial;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-desc{background:#333;}.yui-skin-sam .yui-pv-chartcontainer{padding:0 10px;}.yui-skin-sam .yui-pv-chart{height:250px;clear:right;margin:5px 0 0 0;color:#fff;}.yui-skin-sam .yui-pv-chartlegend div{float:right;margin:0 0 0 10px;_width:250px;}.yui-skin-sam .yui-pv-chartlegend dl{border:1px solid #999;padding:.2em 0 .2em .5em;zoom:1;margin:5px 0;}.yui-skin-sam .yui-pv-chartlegend dt{float:left;display:block;height:.7em;width:.7em;padding:0;}.yui-skin-sam .yui-pv-chartlegend dd{float:left;display:block;color:#fff;margin:0 1em 0 .5em;padding:0;font:11px arial;}.yui-skin-sam .yui-pv-minimized{height:35px;}.yui-skin-sam .yui-pv-minimized .bd{top:-3000px;}.yui-skin-sam .yui-pv-minimized .hd a.yui-pv-refresh{display:none;} diff --git a/include/javascript/yui/build/assets/skins/sam/progressbar.css b/include/javascript/yui/build/assets/skins/sam/progressbar.css index d71e6e85..b44a87df 100644 --- a/include/javascript/yui/build/assets/skins/sam/progressbar.css +++ b/include/javascript/yui/build/assets/skins/sam/progressbar.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -.yui-pb-bar,.yui-pb-mask{width:100%;height:100%;}.yui-pb{position:relative;top:0;left:0;width:200px;height:20px;padding:0;border:none;margin:0;text-align:left;}.yui-pb-mask{position:absolute;top:0;left:0;z-index:2;}.yui-pb-mask div{width:50%;height:50%;background-repeat:no-repeat;padding:0;position:absolute;}.yui-pb-tl{background-position:top left;}.yui-pb-tr{background-position:top right;left:50%;}.yui-pb-bl{background-position:bottom left;top:50%;}.yui-pb-br{background-position:bottom right;left:50%;top:50%;}.yui-pb-bar{margin:0;position:absolute;left:0;top:0;z-index:1;}.yui-pb-ltr .yui-pb-bar{_position:static;}.yui-pb-rtl .yui-pb-bar{background-position:right;}.yui-pb-btt .yui-pb-bar{background-position:left bottom;}.yui-pb-bar{background-color:blue;}.yui-pb{border:thin solid #808080;}.yui-skin-sam .yui-pb{background-color:transparent;border:solid #808080;border-width:1px 0;}.yui-skin-sam .yui-pb-rtl,.yui-skin-sam .yui-pb-ltr{background-image:url(back-h.png);background-repeat:repeat-x;}.yui-skin-sam .yui-pb-ttb,.yui-skin-sam .yui-pb-btt{background-image:url(back-v.png);background-repeat:repeat-y;}.yui-skin-sam .yui-pb-bar{background-color:transparent;}.yui-skin-sam .yui-pb-ltr .yui-pb-bar,.yui-skin-sam .yui-pb-rtl .yui-pb-bar{background-image:url(bar-h.png);background-repeat:repeat-x;}.yui-skin-sam .yui-pb-ttb .yui-pb-bar,.yui-skin-sam .yui-pb-btt .yui-pb-bar{background-image:url(bar-v.png);background-repeat:repeat-y;}.yui-skin-sam .yui-pb-mask{border:solid #808080;border-width:0 1px;margin:0 -1px;}.yui-skin-sam .yui-pb-caption{color:#000;text-align:center;margin:0 auto;}.yui-skin-sam .yui-pb-range{color:#a6a6a6;} +.yui-pb-bar,.yui-pb-mask{width:100%;height:100%}.yui-pb{position:relative;top:0;left:0;width:200px;height:20px;padding:0;border:0;margin:0;text-align:left}.yui-pb-mask{position:absolute;top:0;left:0;z-index:2}.yui-pb-mask div{width:50%;height:50%;background-repeat:no-repeat;padding:0;position:absolute}.yui-pb-tl{background-position:top left}.yui-pb-tr{background-position:top right;left:50%}.yui-pb-bl{background-position:bottom left;top:50%}.yui-pb-br{background-position:bottom right;left:50%;top:50%}.yui-pb-bar{margin:0;position:absolute;left:0;top:0;z-index:1}.yui-pb-ltr .yui-pb-bar{_position:static}.yui-pb-rtl .yui-pb-bar{background-position:right}.yui-pb-btt .yui-pb-bar{background-position:left bottom}.yui-pb-bar{background-color:blue}.yui-pb{border:thin solid #808080}.yui-skin-sam .yui-pb{background-color:transparent;border:solid #808080;border-width:1px 0}.yui-skin-sam .yui-pb-rtl,.yui-skin-sam .yui-pb-ltr{background-image:url(back-h.png);background-repeat:repeat-x}.yui-skin-sam .yui-pb-ttb,.yui-skin-sam .yui-pb-btt{background-image:url(back-v.png);background-repeat:repeat-y}.yui-skin-sam .yui-pb-bar{background-color:transparent}.yui-skin-sam .yui-pb-ltr .yui-pb-bar,.yui-skin-sam .yui-pb-rtl .yui-pb-bar{background-image:url(bar-h.png);background-repeat:repeat-x}.yui-skin-sam .yui-pb-ttb .yui-pb-bar,.yui-skin-sam .yui-pb-btt .yui-pb-bar{background-image:url(bar-v.png);background-repeat:repeat-y}.yui-skin-sam .yui-pb-mask{border:solid #808080;border-width:0 1px;margin:0 -1px}.yui-skin-sam .yui-pb-caption{color:#000;text-align:center;margin:0 auto}.yui-skin-sam .yui-pb-range{color:#a6a6a6} diff --git a/include/javascript/yui/build/assets/skins/sam/resize.css b/include/javascript/yui/build/assets/skins/sam/resize.css index 941361c7..e332fe9c 100644 --- a/include/javascript/yui/build/assets/skins/sam/resize.css +++ b/include/javascript/yui/build/assets/skins/sam/resize.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ .yui-resize{position:relative;zoom:1;z-index:0;}.yui-resize-wrap{zoom:1;}.yui-draggable{cursor:move;}.yui-resize .yui-resize-handle{position:absolute;z-index:1;font-size:0;margin:0;padding:0;zoom:1;height:1px;width:1px;}.yui-resize .yui-resize-handle-br{height:5px;width:5px;bottom:0;right:0;cursor:se-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-bl{height:5px;width:5px;bottom:0;left:0;cursor:sw-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-tl{height:5px;width:5px;top:0;left:0;cursor:nw-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-tr{height:5px;width:5px;top:0;right:0;cursor:ne-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-r{width:5px;height:100%;top:0;right:0;cursor:e-resize;zoom:1;}.yui-resize .yui-resize-handle-l{height:100%;width:5px;top:0;left:0;cursor:w-resize;zoom:1;}.yui-resize .yui-resize-handle-b{width:100%;height:5px;bottom:0;right:0;cursor:s-resize;zoom:1;}.yui-resize .yui-resize-handle-t{width:100%;height:5px;top:0;right:0;cursor:n-resize;zoom:1;}.yui-resize-proxy{position:absolute;border:1px dashed #000;visibility:hidden;z-index:1000;}.yui-resize-hover .yui-resize-handle,.yui-resize-hidden .yui-resize-handle{opacity:0;filter:alpha(opacity=0);}.yui-resize-ghost{opacity:.5;filter:alpha(opacity=50);}.yui-resize-knob .yui-resize-handle{height:6px;width:6px;}.yui-resize-knob .yui-resize-handle-tr{right:-3px;top:-3px;}.yui-resize-knob .yui-resize-handle-tl{left:-3px;top:-3px;}.yui-resize-knob .yui-resize-handle-bl{left:-3px;bottom:-3px;}.yui-resize-knob .yui-resize-handle-br{right:-3px;bottom:-3px;}.yui-resize-knob .yui-resize-handle-t{left:45%;top:-3px;}.yui-resize-knob .yui-resize-handle-r{right:-3px;top:45%;}.yui-resize-knob .yui-resize-handle-l{left:-3px;top:45%;}.yui-resize-knob .yui-resize-handle-b{left:45%;bottom:-3px;}.yui-resize-status{position:absolute;top:-999px;left:-999px;padding:2px;font-size:80%;display:none;zoom:1;z-index:9999;}.yui-resize-status strong,.yui-resize-status em{font-weight:normal;font-style:normal;padding:1px;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle{background-color:#F2F2F2;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle-active{background-color:#7D98B8;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle-l,.yui-skin-sam .yui-resize .yui-resize-handle-r,.yui-skin-sam .yui-resize .yui-resize-handle-l-active,.yui-skin-sam .yui-resize .yui-resize-handle-r-active{height:100%;zoom:1;}.yui-skin-sam .yui-resize-knob .yui-resize-handle{border:1px solid #808080;}.yui-skin-sam .yui-resize-hover .yui-resize-handle-active{opacity:1;filter:alpha(opacity=100);}.yui-skin-sam .yui-resize-proxy{border:1px dashed #426FD9;}.yui-skin-sam .yui-resize-status{border:1px solid #A6982B;border-top:1px solid #D4C237;background-color:#FFEE69;color:#000;}.yui-skin-sam .yui-resize-status strong,.yui-skin-sam .yui-resize-status em{float:left;display:block;clear:both;padding:1px;text-align:center;}.yui-skin-sam .yui-resize .yui-resize-handle-inner-r,.yui-skin-sam .yui-resize .yui-resize-handle-inner-l{background:transparent url(layout_sprite.png) no-repeat 0 -5px;height:16px;width:5px;position:absolute;top:45%;}.yui-skin-sam .yui-resize .yui-resize-handle-inner-t,.yui-skin-sam .yui-resize .yui-resize-handle-inner-b{background:transparent url(layout_sprite.png) no-repeat -20px 0;height:5px;width:16px;position:absolute;left:50%;}.yui-skin-sam .yui-resize .yui-resize-handle-br{background-image:url(layout_sprite.png);background-repeat:no-repeat;background-position:-22px -62px;}.yui-skin-sam .yui-resize .yui-resize-handle-tr{background-image:url(layout_sprite.png);background-repeat:no-repeat;background-position:-22px -42px;}.yui-skin-sam .yui-resize .yui-resize-handle-tl{background-image:url(layout_sprite.png);background-repeat:no-repeat;background-position:-22px -82px;}.yui-skin-sam .yui-resize .yui-resize-handle-bl{background-image:url(layout_sprite.png);background-repeat:no-repeat;background-position:-22px -23px;}.yui-skin-sam .yui-resize-knob .yui-resize-handle-t,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-b,.yui-skin-sam .yui-resize-knob .yui-resize-handle-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-tl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-tr,.yui-skin-sam .yui-resize-knob .yui-resize-handle-bl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-br,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-t,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-b,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-tl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-tr,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-bl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-br{background-image:none;}.yui-skin-sam .yui-resize-knob .yui-resize-handle-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-l-active,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r-active{height:6px;width:6px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-r{right:-8px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-b{bottom:-8px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-br{right:-8px;bottom:-8px;} diff --git a/include/javascript/yui/build/assets/skins/sam/simpleeditor.css b/include/javascript/yui/build/assets/skins/sam/simpleeditor.css index 00451d8c..bf4016eb 100644 --- a/include/javascript/yui/build/assets/skins/sam/simpleeditor.css +++ b/include/javascript/yui/build/assets/skins/sam/simpleeditor.css @@ -1,10 +1,10 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ .yui-busy{cursor:wait!important;}.yui-toolbar-container fieldset,.yui-editor-container fieldset{padding:0;margin:0;border:0;}.yui-toolbar-container legend{display:none;}.yui-skin-sam .yui-toolbar-container .yui-button button,.yui-skin-sam .yui-toolbar-container .yui-button a,.yui-skin-sam .yui-toolbar-container .yui-button a:visited{font-size:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a:visited,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a:visited{font-size:12px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{font-size:0;line-height:0;padding:0;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container .yui-toolbar-titlebar h2 a{text-decoration:none;color:#000;cursor:default;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;margin-right:.5em;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;padding:0;height:18px;margin:.2em 0 .2em .1em;display:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:45px;*height:50px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;display:block;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;font-size:0;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block;right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;height:100%;width:100%;position:absolute;top:0;left:0;opacity:.5;filter:alpha(opacity=50);}.yui-editor-container iframe{border:0;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:.25em 0 .25em .25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd .gecko form{overflow:auto;}.yui-editor-panel .bd div.yui-editor-body-cont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group{margin-bottom:.75em;}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:visible;}.yui-editor-panel .height-width span.info{font-size:70%;margin-top:3px;float:none;} .yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-panel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;_top:-5px;width:24px;text-indent:52px;font-size:0;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0;text-indent:0;font-size:75%;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px!important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px solid #F6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-toolbar-group-undoredo h3,.yui-toolbar-group-insertitem h3,.yui-toolbar-group-indentlist h3{width:68px;}.yui-toolbar-group-indentlist2 h3{width:122px;}.yui-toolbar-group-alignment h3{width:130px;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-editor-container .draggable .yui-toolbar-titlebar{cursor:move;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000;font-weight:bold;margin:0;padding:.3em 1em;font-size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:0 .25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em .35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-top:1px solid #808080;color:#999;text-align:left;padding:.25em;}.yui-skin-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .collapsed{background:url(sprite.png) no-repeat 0 -350px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;} .yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;_font-size:0;margin:0;border-color:#808080;color:#f2f2f2;border-style:solid;border-width:1px 0;zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:0;line-height:2;display:block;color:#000;overflow:hidden;white-space:nowrap;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a{font-size:12px;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child{*left:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-fontname{width:135px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam .yui-toolbar-container .yui-button-menu .yui-menu-body-scrolled{position:relative;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-strikethrough span.yui-toolbar-icon{background-position:0 -108px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-undo span.yui-toolbar-icon{background-position:0 -1326px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-redo span.yui-toolbar-icon{background-position:0 -1355px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor span.yui-toolbar-icon{background-position:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;} -.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-position:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url(editor-sprite.gif) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;position:absolute;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel .createlink_target,.yui-skin-sam .yui-editor-panel .insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;_width:198px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0 0 2px 0;}.yui-skin-sam .yui-editor-panel .hd span.close{background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url(editor-sprite.gif) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url(editor-knob.gif) no-repeat 0 0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#fff;}.yui-editor-blankimage{background-image:url(blankimage.png);}.yui-skin-sam .yui-editor-container .yui-resize-handle-br{height:11px;width:11px;background-position:-20px -60px;background-color:transparent;} +.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-position:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url(editor-sprite.gif) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;position:absolute;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel .createlink_target,.yui-skin-sam .yui-editor-panel .insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;_width:198px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0 0 2px 0;}.yui-skin-sam .yui-editor-panel .hd span.close{background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url(editor-sprite.gif) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url(editor-knob.gif) no-repeat 0 0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#fff;}.yui-editor-blankimage{background-image:url(blankimage.png);}.yui-skin-sam .yui-editor-container .yui-resize-handle-br{height:11px;width:11px;background-position:-20px -60px;background-color:transparent;} \ No newline at end of file diff --git a/include/javascript/yui/build/assets/skins/sam/skin.css b/include/javascript/yui/build/assets/skins/sam/skin.css index 5d546a68..f3a6af69 100644 --- a/include/javascript/yui/build/assets/skins/sam/skin.css +++ b/include/javascript/yui/build/assets/skins/sam/skin.css @@ -1,36 +1,35 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -.yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%;}.yui-skin-sam .yui-ac-input{position:absolute;width:100%;}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%;}.yui-skin-sam .yui-ac-content{position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050;}.yui-skin-sam .yui-ac-shadow{position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity:.10;opacity:.10;filter:alpha(opacity=10);z-index:9049;}.yui-skin-sam .yui-ac iframe{opacity:0;filter:alpha(opacity=0);padding-right:.3em;padding-bottom:.3em;}.yui-skin-sam .yui-ac-content ul{margin:0;padding:0;width:100%;}.yui-skin-sam .yui-ac-content li{margin:0;padding:2px 5px;cursor:default;white-space:nowrap;list-style:none;zoom:1;}.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight{background:#B3D4FF;}.yui-skin-sam .yui-ac-content li.yui-ac-highlight{background:#426FD9;color:#FFF;} +.yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%}.yui-skin-sam .yui-ac-input{position:absolute;width:100%}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%}.yui-skin-sam .yui-ac-content{position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050}.yui-skin-sam .yui-ac-shadow{position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity:.10;opacity:.10;filter:alpha(opacity=10);z-index:9049}.yui-skin-sam .yui-ac iframe{opacity:0;filter:alpha(opacity=0);padding-right:.3em;padding-bottom:.3em}.yui-skin-sam .yui-ac-content ul{margin:0;padding:0;width:100%}.yui-skin-sam .yui-ac-content li{margin:0;padding:2px 5px;cursor:default;white-space:nowrap;list-style:none;zoom:1}.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight{background:#b3d4ff}.yui-skin-sam .yui-ac-content li.yui-ac-highlight{background:#426fd9;color:#FFF} .yui-button{display:-moz-inline-box;display:inline-block;vertical-align:text-bottom;}.yui-button .first-child{display:block;*display:inline-block;}.yui-button button,.yui-button a{display:block;*display:inline-block;border:none;margin:0;}.yui-button button{background-color:transparent;*overflow:visible;cursor:pointer;}.yui-button a{text-decoration:none;}.yui-skin-sam .yui-button{border-width:1px 0;border-style:solid;border-color:#808080;background:url(sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;_margin:0;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a,.yui-skin-sam .yui-button a:visited{padding:0 10px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-button a{*line-height:1.875;*padding-bottom:1px;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20px;background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-split-button-focus button{background-image:url(split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-split-button-hover button{background-image:url(split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam .yui-button-active .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sam .yui-button-disabled a,.yui-skin-sam .yui-button-disabled a:visited{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-menu-button-disabled button{background-image:url(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);} -.yui-calcontainer{position:relative;float:left;_overflow:hidden;}.yui-calcontainer iframe{position:absolute;border:none;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0;top:0;}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px;}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative;}.yui-calcontainer .title{position:relative;z-index:1;}.yui-calcontainer .close-icon{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden;}.yui-calendar{position:relative;}.yui-calendar .calnavleft{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden;}.yui-calendar .calnavright{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden;}.yui-calendar .calheader{position:relative;width:100%;text-align:center;}.yui-calcontainer .yui-cal-nav-mask{position:absolute;z-index:2;margin:0;padding:0;width:100%;height:100%;_width:0;_height:0;left:0;top:0;display:none;}.yui-calcontainer .yui-cal-nav{position:absolute;z-index:3;top:0;display:none;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{display:-moz-inline-box;display:inline-block;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{display:block;*display:inline-block;*overflow:visible;border:none;background-color:transparent;cursor:pointer;}.yui-calendar .calbody a:hover{background:inherit;}p#clear{clear:left;padding-top:10px;}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px;}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px;}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transparent;border:none;padding:10px 5px 10px 5px;margin:0;}.yui-skin-sam .yui-calcontainer .title{background:url(sprite.png) repeat-x 0 0;border-bottom:1px solid #ccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left;}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px;}.yui-skin-sam .yui-calcontainer.withtitle{padding-top:0;}.yui-skin-sam .yui-calcontainer .calclose{background:url(sprite.png) no-repeat 0 -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;margin:0;}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:none;vertical-align:middle;padding:0;}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center;}.yui-skin-sam .yui-calendar .calheader img{border:none;}.yui-skin-sam .yui-calendar .calnavleft{background:url(sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calnavright{background:url(sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em;}.yui-skin-sam .yui-calendar .calweekdayrow th{padding:0;border:none;}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em;}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2;}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;border:none;}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding:0 2px 0 0;}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding:0 0 0 2px;}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #ccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap;}.yui-skin-sam .yui-calendar td.calcell a{color:#06c;display:block;height:100%;text-decoration:none;}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000;}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff;}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#ccc;color:#a6a6a6;cursor:default;}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer;}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff;}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0;}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through;}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#cf9;}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#9cf;}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#fcc;}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#cf9;}.yui-skin-sam .yui-calendar a.calnav{border:1px solid #f2f2f2;padding:0 4px;text-decoration:none;color:#000;zoom:1;}.yui-skin-sam .yui-calendar a.calnav:hover{background:url(sprite.png) repeat-x 0 0;border-color:#A0A0A0;cursor:pointer;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask{background-color:#000;opacity:.25;filter:alpha(opacity=25);}.yui-skin-sam .yui-calcontainer .yui-cal-nav{font-family:arial,helvetica,clean,sans-serif;font-size:93%;border:1px solid #808080;left:50%;margin-left:-7em;width:14em;padding:0;top:2.5em;background-color:#f2f2f2;}.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav{top:4.5em;}.yui-skin-sam .yui-calcontainer.multi .yui-cal-nav{width:16em;margin-left:-8em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y,.yui-skin-sam .yui-calcontainer .yui-cal-nav-m,.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{padding:5px 10px 5px 10px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{text-align:center;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-e{margin-top:5px;padding:5px;background-color:#EDF5FF;border-top:1px solid black;display:none;}.yui-skin-sam .yui-calcontainer .yui-cal-nav label{display:block;font-weight:bold;} -.yui-skin-sam .yui-calcontainer .yui-cal-nav-mc{width:100%;_width:auto;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid{background-color:#FFEE69;border:1px solid #000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc{width:4em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{border:1px solid #808080;background:url(sprite.png) repeat-x 0 0;background-color:#ccc;margin:auto .15em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{padding:0 8px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default{border:1px solid #304369;background-color:#426fd9;background:url(sprite.png) repeat-x 0 -1400px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button{color:#fff;} +.yui-calcontainer{position:relative;float:left;_overflow:hidden}.yui-calcontainer iframe{position:absolute;border:0;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0;top:0}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative}.yui-calcontainer .title{position:relative;z-index:1}.yui-calcontainer .close-icon{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden}.yui-calendar{position:relative}.yui-calendar .calnavleft{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden}.yui-calendar .calnavright{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden}.yui-calendar .calheader{position:relative;width:100%;text-align:center}.yui-calcontainer .yui-cal-nav-mask{position:absolute;z-index:2;margin:0;padding:0;width:100%;height:100%;_width:0;_height:0;left:0;top:0;display:none}.yui-calcontainer .yui-cal-nav{position:absolute;z-index:3;top:0;display:none}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{display:-moz-inline-box;display:inline-block}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{display:block;*display:inline-block;*overflow:visible;border:0;background-color:transparent;cursor:pointer}.yui-calendar .calbody a:hover{background:inherit}p#clear{clear:left;padding-top:10px}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transparent;border:0;padding:10px 5px 10px 5px;margin:0}.yui-skin-sam .yui-calcontainer .title{background:url(sprite.png) repeat-x 0 0;border-bottom:1px solid #ccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px}.yui-skin-sam .yui-calcontainer.withtitle{padding-top:0}.yui-skin-sam .yui-calcontainer .calclose{background:url(sprite.png) no-repeat 0 -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:pointer}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;margin:0}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:0;vertical-align:middle;padding:0}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center}.yui-skin-sam .yui-calendar .calheader img{border:0}.yui-skin-sam .yui-calendar .calnavleft{background:url(sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer}.yui-skin-sam .yui-calendar .calnavright{background:url(sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em}.yui-skin-sam .yui-calendar .calweekdayrow th{padding:0;border:0}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;border:0}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding:0 2px 0 0}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding:0 0 0 2px}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #ccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap}.yui-skin-sam .yui-calendar td.calcell a{color:#06c;display:block;height:100%;text-decoration:none}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#ccc;color:#a6a6a6;cursor:default}.yui-skin-sam .yui-calendar td.calcell.oom a{color:#a6a6a6}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#cf9}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#9cf}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#fcc}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#cf9}.yui-skin-sam .yui-calendar a.calnav{border:1px solid #f2f2f2;padding:0 4px;text-decoration:none;color:#000;zoom:1}.yui-skin-sam .yui-calendar a.calnav:hover{background:url(sprite.png) repeat-x 0 0;border-color:#a0a0a0;cursor:pointer}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask{background-color:#000;opacity:.25;filter:alpha(opacity=25)}.yui-skin-sam .yui-calcontainer .yui-cal-nav{font-family:arial,helvetica,clean,sans-serif;font-size:93%;border:1px solid #808080;left:50%;margin-left:-7em;width:14em;padding:0;top:2.5em;background-color:#f2f2f2}.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav{top:4.5em}.yui-skin-sam .yui-calcontainer.multi .yui-cal-nav{width:16em;margin-left:-8em}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y,.yui-skin-sam .yui-calcontainer .yui-cal-nav-m,.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{padding:5px 10px 5px 10px}.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{text-align:center}.yui-skin-sam .yui-calcontainer .yui-cal-nav-e{margin-top:5px;padding:5px;background-color:#edf5ff;border-top:1px solid black;display:none}.yui-skin-sam .yui-calcontainer .yui-cal-nav label{display:block;font-weight:bold} +.yui-skin-sam .yui-calcontainer .yui-cal-nav-mc{width:100%;_width:auto}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid{background-color:#ffee69;border:1px solid #000}.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc{width:4em}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{border:1px solid #808080;background:url(sprite.png) repeat-x 0 0;background-color:#ccc;margin:auto .15em}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{padding:0 8px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default{border:1px solid #304369;background-color:#426fd9;background:url(sprite.png) repeat-x 0 -1400px}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button{color:#fff} .yui-carousel{visibility:hidden;overflow:hidden;position:relative;text-align:left;zoom:1;}.yui-carousel.yui-carousel-visible{visibility:visible;}.yui-carousel-content{overflow:hidden;position:relative;text-align:center;}.yui-carousel-element li{border:1px solid #ccc;list-style:none;margin:1px;overflow:hidden;padding:0;position:absolute;text-align:center;}.yui-carousel-vertical .yui-carousel-element li{display:block;float:none;}.yui-log .carousel{background:#f2e886;}.yui-carousel-nav{zoom:1;}.yui-carousel-nav:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.yui-carousel-button-focus{outline:1px dotted #000;}.yui-carousel-min-width{min-width:115px;}.yui-carousel-element{overflow:hidden;position:relative;margin:0 auto;padding:0;text-align:left;*margin:0;}.yui-carousel-horizontal .yui-carousel-element{width:320000px;}.yui-carousel-vertical .yui-carousel-element{height:320000px;}.yui-skin-sam .yui-carousel-nav select{position:static;}.yui-carousel .yui-carousel-item-selected{border:1px dashed #000;margin:1px;}.yui-skin-sam .yui-carousel,.yui-skin-sam .yui-carousel-vertical{border:1px solid #808080;}.yui-skin-sam .yui-carousel-nav{background:url(sprite.png) repeat-x 0 0;padding:3px;text-align:right;}.yui-skin-sam .yui-carousel-button{background:url(sprite.png) no-repeat 0 -600px;float:right;height:19px;margin:5px;overflow:hidden;width:40px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button{background-position:0 -800px;}.yui-skin-sam .yui-carousel-button-disabled{background-position:0 -2000px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button-disabled{background-position:0 -2100px;}.yui-skin-sam .yui-carousel-button input,.yui-skin-sam .yui-carousel-button button{background-color:transparent;border:0;cursor:pointer;display:block;height:44px;margin:-2px 0 0 -2px;padding:0 0 0 50px;}.yui-skin-sam span.yui-carousel-first-button{background-position:0 -550px;margin-left:-100px;margin-right:50px;*margin:5px 5px 5px -90px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button{background-position:0 -750px;}.yui-skin-sam span.yui-carousel-first-button-disabled{background-position:0 -1950px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button-disabled{background-position:0 -2050px;}.yui-skin-sam .yui-carousel-nav ul{float:right;height:19px;margin:0;margin-left:-220px;margin-right:100px;*margin-left:-160px;*margin-right:0;padding:0;}.yui-skin-sam .yui-carousel-min-width .yui-carousel-nav ul{*margin-left:-170px;}.yui-skin-sam .yui-carousel-nav select{position:relative;*right:50px;top:4px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav select{position:static;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav ul,.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav select{float:none;margin:0;*zoom:1;}.yui-skin-sam .yui-carousel-nav ul li{background:url(sprite.png) no-repeat 0 -650px;cursor:pointer;float:left;height:9px;list-style:none;margin:10px 0 0 5px;overflow:hidden;padding:0;width:9px;}.yui-skin-sam .yui-carousel-nav ul:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.yui-skin-sam .yui-carousel-nav ul li a{display:block;width:100%;height:100%;text-indent:-10000px;text-align:left;overflow:hidden;}.yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-focus{outline:1px dotted #000;}.yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-selected{background-position:0 -700px;}.yui-skin-sam .yui-carousel-item-loading{background:url(ajax-loader.gif) no-repeat 50% 50%;position:absolute;text-indent:-150px;} -.yui-picker-panel{background:#e3e3e3;border-color:#888;}.yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000;}.yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px;}.yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px;}.yui-picker{position:relative;}.yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute;}.yui-picker-hue-bg{-moz-outline:none;outline:0 none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px;}.yui-picker-bg{-moz-outline:none;outline:0 none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png);}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../build/colorpicker/assets/picker_mask.png',sizingMethod='scale');}.yui-picker-mask{position:absolute;z-index:1;top:0;left:0;}.yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px;}.yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888;}.yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888;}.yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace;}.yui-picker-controls .hd{background:transparent;border-width:0!important;}.yui-picker-controls .bd{height:100px;border-width:0!important;}.yui-picker-controls ul{float:left;padding:0 2px 0 0;margin:0;}.yui-picker-controls li{padding:2px;list-style:none;margin:0;}.yui-picker-controls input{font-size:.85em;width:2.4em;}.yui-picker-hex-controls{clear:both;padding:2px;}.yui-picker-hex-controls input{width:4.6em;}.yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color:#000;} -.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:2;}.yui-panel{position:relative;}.yui-panel-container form{margin:0;}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0;}.mask.block-scrollbars{overflow:auto;}.masked select,.drag select,.hide-select select{_visibility:hidden;}.yui-panel-container select{_visibility:inherit;}.hide-scrollbars,.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.show-scrollbars{overflow:auto;}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible;}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto;}.yui-panel-container.shadow .underlay.yui-force-redraw{padding-bottom:1px;}.yui-effect-fade .underlay,.yui-effect-fade .yui-tt-shadow{display:none;}.yui-tt-shadow{position:absolute;}.yui-override-padding{padding:0!important;}.yui-panel-container .container-close{overflow:hidden;text-indent:-10000em;text-decoration:none;}.yui-overlay.yui-force-redraw,.yui-panel-container.yui-force-redraw{margin-bottom:1px;}.yui-skin-sam .mask{background-color:#000;opacity:.25;filter:alpha(opacity=25);}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px;}.yui-skin-sam .yui-panel{position:relative;left:0;top:0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;*border-width:1px;*zoom:1;_zoom:normal;}.yui-skin-sam .yui-panel .hd,.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;*margin:0;*border:0;}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc;}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#F2F2F2;}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(sprite.png) repeat-x 0 -200px;}.yui-skin-sam .yui-panel .bd{padding:10px;}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%;}.yui-skin-sam .container-close{position:absolute;top:5px;right:6px;width:25px;height:15px;background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;}.yui-skin-sam .yui-panel-container .underlay{right:-1px;left:-1px;}.yui-skin-sam .yui-panel-container.matte{padding:9px 10px;background-color:#fff;}.yui-skin-sam .yui-panel-container.shadow{_padding:2px 4px 0 2px;}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;left:-3px;right:-3px;bottom:-3px;*top:4px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_left:0;_right:0;_bottom:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;filter:alpha(opacity=12);}.yui-skin-sam .yui-dialog .ft{border-top:none;padding:0 10px 10px 10px;font-size:100%;}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right;}.yui-skin-sam .yui-dialog .ft button.default{font-weight:bold;}.yui-skin-sam .yui-dialog .ft span.default{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-dialog .ft span.default .first-child{border-color:#304369;}.yui-skin-sam .yui-dialog .ft span.default button{color:#fff;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled{background-position:0 -1500px;border-color:#ccc;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled button{color:#a6a6a6;}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(sprite.png) no-repeat 0 0;width:16px;height:16px;margin-right:10px;float:left;}.yui-skin-sam .yui-simple-dialog .bd span.blckicon{background-position:0 -1100px;}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{background-position:0 -1050px;}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-position:0 -1150px;}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px;}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px;}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px;}.yui-skin-sam .yui-tt .bd{position:relative;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#D4C237 #A6982B #A6982B #A6982B;border-width:1px;border-style:solid;background-color:#FFEE69;}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto;}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;filter:alpha(opacity=12);} -.yui-skin-sam .yui-dt-mask{position:absolute;z-index:9500;}.yui-dt-tmp{position:absolute;left:-9000px;}.yui-dt-scrollable .yui-dt-bd{overflow:auto;}.yui-dt-scrollable .yui-dt-hd{overflow:hidden;position:relative;}.yui-dt-scrollable .yui-dt-bd thead tr,.yui-dt-scrollable .yui-dt-bd thead th{position:absolute;left:-1500px;}.yui-dt-scrollable tbody{-moz-outline:none;}.yui-skin-sam thead .yui-dt-sortable{cursor:pointer;}.yui-skin-sam thead .yui-dt-draggable{cursor:move;}.yui-dt-coltarget{position:absolute;z-index:999;}.yui-dt-hd{zoom:1;}th.yui-dt-resizeable .yui-dt-resizerliner{position:relative;}.yui-dt-resizer{position:absolute;right:0;bottom:0;height:100%;cursor:e-resize;cursor:col-resize;background-color:#CCC;opacity:0;filter:alpha(opacity=0);}.yui-dt-resizerproxy{visibility:hidden;position:absolute;z-index:9000;background-color:#CCC;opacity:0;filter:alpha(opacity=0);}th.yui-dt-hidden .yui-dt-liner,td.yui-dt-hidden .yui-dt-liner,th.yui-dt-hidden .yui-dt-resizer{display:none;}.yui-dt-editor{position:absolute;z-index:9000;}.yui-skin-sam .yui-dt table{margin:0;padding:0;font-family:arial;font-size:inherit;border-collapse:separate;*border-collapse:collapse;border-spacing:0;border:1px solid #7F7F7F;}.yui-skin-sam .yui-dt thead{border-spacing:0;}.yui-skin-sam .yui-dt caption{color:#000;font-size:85%;font-weight:normal;font-style:italic;line-height:1;padding:1em 0;text-align:center;}.yui-skin-sam .yui-dt th{background:#D8D8DA url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yui-dt th,.yui-skin-sam .yui-dt th a{font-weight:normal;text-decoration:none;color:#000;vertical-align:bottom;}.yui-skin-sam .yui-dt th{margin:0;padding:0;border:none;border-right:1px solid #CBCBCB;}.yui-skin-sam .yui-dt tr.yui-dt-first td{border-top:1px solid #7F7F7F;}.yui-skin-sam .yui-dt th .yui-dt-liner{white-space:nowrap;}.yui-skin-sam .yui-dt-liner{margin:0;padding:0;padding:4px 10px 4px 10px;}.yui-skin-sam .yui-dt-coltarget{width:5px;background-color:red;}.yui-skin-sam .yui-dt td{margin:0;padding:0;border:none;border-right:1px solid #CBCBCB;text-align:left;}.yui-skin-sam .yui-dt-list td{border-right:none;}.yui-skin-sam .yui-dt-resizer{width:6px;}.yui-skin-sam .yui-dt-mask{background-color:#000;opacity:.25;filter:alpha(opacity=25);}.yui-skin-sam .yui-dt-message{background-color:#FFF;}.yui-skin-sam .yui-dt-scrollable table{border:none;}.yui-skin-sam .yui-dt-scrollable .yui-dt-hd{border-left:1px solid #7F7F7F;border-top:1px solid #7F7F7F;border-right:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-scrollable .yui-dt-bd{border-left:1px solid #7F7F7F;border-bottom:1px solid #7F7F7F;border-right:1px solid #7F7F7F;background-color:#FFF;}.yui-skin-sam .yui-dt-scrollable .yui-dt-data tr.yui-dt-last td{border-bottom:1px solid #7F7F7F;}.yui-skin-sam th.yui-dt-asc,.yui-skin-sam th.yui-dt-desc{background:url(sprite.png) repeat-x 0 -100px;}.yui-skin-sam th.yui-dt-sortable .yui-dt-label{margin-right:10px;}.yui-skin-sam th.yui-dt-asc .yui-dt-liner{background:url(dt-arrow-up.png) no-repeat right;}.yui-skin-sam th.yui-dt-desc .yui-dt-liner{background:url(dt-arrow-dn.png) no-repeat right;}tbody .yui-dt-editable{cursor:pointer;}.yui-dt-editor{text-align:left;background-color:#F2F2F2;border:1px solid #808080;padding:6px;}.yui-dt-editor label{padding-left:4px;padding-right:6px;}.yui-dt-editor .yui-dt-button{padding-top:6px;text-align:right;}.yui-dt-editor .yui-dt-button button{background:url(sprite.png) repeat-x 0 0;border:1px solid #999;width:4em;height:1.8em;margin-left:6px;}.yui-dt-editor .yui-dt-button button.yui-dt-default{background:url(sprite.png) repeat-x 0 -1400px;background-color:#5584E0;border:1px solid #304369;color:#FFF;}.yui-dt-editor .yui-dt-button button:hover{background:url(sprite.png) repeat-x 0 -1300px;color:#000;}.yui-dt-editor .yui-dt-button button:active{background:url(sprite.png) repeat-x 0 -1700px;color:#000;}.yui-skin-sam tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam tr.yui-dt-odd{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam tr.yui-dt-odd td.yui-dt-desc{background-color:#DBEAFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam th.yui-dt-highlighted,.yui-skin-sam th.yui-dt-highlighted a{background-color:#B2D2FF;}.yui-skin-sam tr.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam .yui-dt-list th.yui-dt-highlighted,.yui-skin-sam .yui-dt-list th.yui-dt-highlighted a{background-color:#B2D2FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam th.yui-dt-selected,.yui-skin-sam th.yui-dt-selected a{background-color:#446CD7;}.yui-skin-sam tr.yui-dt-selected td,.yui-skin-sam tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-list th.yui-dt-selected,.yui-skin-sam .yui-dt-list th.yui-dt-selected a{background-color:#446CD7;} -.yui-skin-sam .yui-dt-list tr.yui-dt-selected td,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-paginator{display:block;margin:6px 0;white-space:nowrap;}.yui-skin-sam .yui-dt-paginator .yui-dt-first,.yui-skin-sam .yui-dt-paginator .yui-dt-last,.yui-skin-sam .yui-dt-paginator .yui-dt-selected{padding:2px 6px;}.yui-skin-sam .yui-dt-paginator a.yui-dt-first,.yui-skin-sam .yui-dt-paginator a.yui-dt-last{text-decoration:none;}.yui-skin-sam .yui-dt-paginator .yui-dt-previous,.yui-skin-sam .yui-dt-paginator .yui-dt-next{display:none;}.yui-skin-sam a.yui-dt-page{border:1px solid #CBCBCB;padding:2px 6px;text-decoration:none;background-color:#fff;}.yui-skin-sam .yui-dt-selected{border:1px solid #fff;background-color:#fff;} +.yui-picker-panel{background:#e3e3e3;border-color:#888}.yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000}.yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px}.yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px}.yui-picker{position:relative}.yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute}.yui-picker-hue-bg{-moz-outline:0;outline:0 none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px}.yui-picker-bg{-moz-outline:0;outline:0 none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png)}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='picker_mask.png',sizingMethod='scale')}.yui-picker-mask{position:absolute;z-index:1;top:0;left:0}.yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px}.yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888}.yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888}.yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace}.yui-picker-controls .hd{background:transparent;border-width:0!important}.yui-picker-controls .bd{height:100px;border-width:0!important}.yui-picker-controls ul{float:left;padding:0 2px 0 0;margin:0}.yui-picker-controls li{padding:2px;list-style:none;margin:0}.yui-picker-controls input{font-size:.85em;width:2.4em}.yui-picker-hex-controls{clear:both;padding:2px}.yui-picker-hex-controls input{width:4.6em}.yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color:#000} +.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:2}.yui-panel{position:relative}.yui-panel-container form{margin:0}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0}.mask.block-scrollbars{overflow:auto}.masked select,.drag select,.hide-select select{_visibility:hidden}.yui-panel-container select{_visibility:inherit}.hide-scrollbars,.hide-scrollbars *{overflow:hidden}.hide-scrollbars select{display:none}.show-scrollbars{overflow:auto}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto}.yui-panel-container.shadow .underlay.yui-force-redraw{padding-bottom:1px}.yui-effect-fade .underlay,.yui-effect-fade .yui-tt-shadow{display:none}.yui-tt-shadow{position:absolute}.yui-override-padding{padding:0!important}.yui-panel-container .container-close{overflow:hidden;text-indent:-10000em;text-decoration:none}.yui-overlay.yui-force-redraw,.yui-panel-container.yui-force-redraw{margin-bottom:1px}.yui-skin-sam .mask{background-color:#000;opacity:.25;filter:alpha(opacity=25)}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px}.yui-skin-sam .yui-panel{position:relative;left:0;top:0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;*border-width:1px;*zoom:1;_zoom:normal}.yui-skin-sam .yui-panel .hd,.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;*margin:0;*border:0}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#f2f2f2}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(sprite.png) repeat-x 0 -200px}.yui-skin-sam .yui-panel .bd{padding:10px}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%}.yui-skin-sam .container-close{position:absolute;top:5px;right:6px;width:25px;height:15px;background:url(sprite.png) no-repeat 0 -300px;cursor:pointer}.yui-skin-sam .yui-panel-container .underlay{right:-1px;left:-1px}.yui-skin-sam .yui-panel-container.matte{padding:9px 10px;background-color:#fff}.yui-skin-sam .yui-panel-container.shadow{_padding:2px 4px 0 2px}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;left:-3px;right:-3px;bottom:-3px;*top:4px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_left:0;_right:0;_bottom:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;filter:alpha(opacity=12)}.yui-skin-sam .yui-dialog .ft{border-top:0;padding:0 10px 10px 10px;font-size:100%}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right}.yui-skin-sam .yui-dialog .ft button.default{font-weight:bold}.yui-skin-sam .yui-dialog .ft span.default{border-color:#304369;background-position:0 -1400px}.yui-skin-sam .yui-dialog .ft span.default .first-child{border-color:#304369}.yui-skin-sam .yui-dialog .ft span.default button{color:#fff}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled{background-position:0 -1500px;border-color:#ccc}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled .first-child{border-color:#ccc}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled button{color:#a6a6a6}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(sprite.png) no-repeat 0 0;width:16px;height:16px;margin-right:10px;float:left}.yui-skin-sam .yui-simple-dialog .bd span.blckicon{background-position:0 -1100px}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{background-position:0 -1050px}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-position:0 -1150px}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px}.yui-skin-sam .yui-tt .bd{position:relative;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#d4c237 #A6982b #a6982b #A6982B;border-width:1px;border-style:solid;background-color:#ffee69}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;filter:alpha(opacity=12)} +.yui-skin-sam .yui-dt-mask{position:absolute;z-index:9500}.yui-dt-tmp{position:absolute;left:-9000px}.yui-dt-scrollable .yui-dt-bd{overflow:auto}.yui-dt-scrollable .yui-dt-hd{overflow:hidden;position:relative}.yui-dt-scrollable .yui-dt-bd thead tr,.yui-dt-scrollable .yui-dt-bd thead th{position:absolute;left:-1500px}.yui-dt-scrollable tbody{-moz-outline:0}.yui-skin-sam thead .yui-dt-sortable{cursor:pointer}.yui-skin-sam thead .yui-dt-draggable{cursor:move}.yui-dt-coltarget{position:absolute;z-index:999}.yui-dt-hd{zoom:1}th.yui-dt-resizeable .yui-dt-resizerliner{position:relative}.yui-dt-resizer{position:absolute;right:0;bottom:0;height:100%;cursor:e-resize;cursor:col-resize;background-color:#CCC;opacity:0;filter:alpha(opacity=0)}.yui-dt-resizerproxy{visibility:hidden;position:absolute;z-index:9000;background-color:#CCC;opacity:0;filter:alpha(opacity=0)}th.yui-dt-hidden .yui-dt-liner,td.yui-dt-hidden .yui-dt-liner,th.yui-dt-hidden .yui-dt-resizer{display:none}.yui-dt-editor,.yui-dt-editor-shim{position:absolute;z-index:9000}.yui-skin-sam .yui-dt table{margin:0;padding:0;font-family:arial;font-size:inherit;border-collapse:separate;*border-collapse:collapse;border-spacing:0;border:1px solid #7f7f7f}.yui-skin-sam .yui-dt thead{border-spacing:0}.yui-skin-sam .yui-dt caption{color:#000;font-size:85%;font-weight:normal;font-style:italic;line-height:1;padding:1em 0;text-align:center}.yui-skin-sam .yui-dt th{background:#d8d8da url(sprite.png) repeat-x 0 0}.yui-skin-sam .yui-dt th,.yui-skin-sam .yui-dt th a{font-weight:normal;text-decoration:none;color:#000;vertical-align:bottom}.yui-skin-sam .yui-dt th{margin:0;padding:0;border:0;border-right:1px solid #cbcbcb}.yui-skin-sam .yui-dt tr.yui-dt-first td{border-top:1px solid #7f7f7f}.yui-skin-sam .yui-dt th .yui-dt-liner{white-space:nowrap}.yui-skin-sam .yui-dt-liner{margin:0;padding:0;padding:4px 10px 4px 10px}.yui-skin-sam .yui-dt-coltarget{width:5px;background-color:red}.yui-skin-sam .yui-dt td{margin:0;padding:0;border:0;border-right:1px solid #cbcbcb;text-align:left}.yui-skin-sam .yui-dt-list td{border-right:0}.yui-skin-sam .yui-dt-resizer{width:6px}.yui-skin-sam .yui-dt-mask{background-color:#000;opacity:.25;filter:alpha(opacity=25)}.yui-skin-sam .yui-dt-message{background-color:#FFF}.yui-skin-sam .yui-dt-scrollable table{border:0}.yui-skin-sam .yui-dt-scrollable .yui-dt-hd{border-left:1px solid #7f7f7f;border-top:1px solid #7f7f7f;border-right:1px solid #7f7f7f}.yui-skin-sam .yui-dt-scrollable .yui-dt-bd{border-left:1px solid #7f7f7f;border-bottom:1px solid #7f7f7f;border-right:1px solid #7f7f7f;background-color:#FFF}.yui-skin-sam .yui-dt-scrollable .yui-dt-data tr.yui-dt-last td{border-bottom:1px solid #7f7f7f}.yui-skin-sam th.yui-dt-asc,.yui-skin-sam th.yui-dt-desc{background:url(sprite.png) repeat-x 0 -100px}.yui-skin-sam th.yui-dt-sortable .yui-dt-label{margin-right:10px}.yui-skin-sam th.yui-dt-asc .yui-dt-liner{background:url(dt-arrow-up.png) no-repeat right}.yui-skin-sam th.yui-dt-desc .yui-dt-liner{background:url(dt-arrow-dn.png) no-repeat right}tbody .yui-dt-editable{cursor:pointer}.yui-dt-editor{text-align:left;background-color:#f2f2f2;border:1px solid #808080;padding:6px}.yui-dt-editor label{padding-left:4px;padding-right:6px}.yui-dt-editor .yui-dt-button{padding-top:6px;text-align:right}.yui-dt-editor .yui-dt-button button{background:url(sprite.png) repeat-x 0 0;border:1px solid #999;width:4em;height:1.8em;margin-left:6px}.yui-dt-editor .yui-dt-button button.yui-dt-default{background:url(sprite.png) repeat-x 0 -1400px;background-color:#5584e0;border:1px solid #304369;color:#FFF}.yui-dt-editor .yui-dt-button button:hover{background:url(sprite.png) repeat-x 0 -1300px;color:#000}.yui-dt-editor .yui-dt-button button:active{background:url(sprite.png) repeat-x 0 -1700px;color:#000}.yui-skin-sam tr.yui-dt-even{background-color:#FFF}.yui-skin-sam tr.yui-dt-odd{background-color:#edf5ff}.yui-skin-sam tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam tr.yui-dt-even td.yui-dt-desc{background-color:#edf5ff}.yui-skin-sam tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam tr.yui-dt-odd td.yui-dt-desc{background-color:#dbeaff}.yui-skin-sam .yui-dt-list tr.yui-dt-even{background-color:#FFF}.yui-skin-sam .yui-dt-list tr.yui-dt-odd{background-color:#FFF}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-desc{background-color:#edf5ff}.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-desc{background-color:#edf5ff}.yui-skin-sam th.yui-dt-highlighted,.yui-skin-sam th.yui-dt-highlighted a{background-color:#b2d2ff}.yui-skin-sam tr.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#b2d2ff}.yui-skin-sam .yui-dt-list th.yui-dt-highlighted,.yui-skin-sam .yui-dt-list th.yui-dt-highlighted a{background-color:#b2d2ff}.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#b2d2ff}.yui-skin-sam th.yui-dt-selected,.yui-skin-sam th.yui-dt-selected a{background-color:#446cd7}.yui-skin-sam tr.yui-dt-selected td,.yui-skin-sam tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam tr.yui-dt-selected td.yui-dt-desc{background-color:#426fd9;color:#FFF}.yui-skin-sam tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam tr.yui-dt-odd td.yui-dt-selected{background-color:#446cd7;color:#FFF}.yui-skin-sam .yui-dt-list th.yui-dt-selected,.yui-skin-sam .yui-dt-list th.yui-dt-selected a{background-color:#446cd7} +.yui-skin-sam .yui-dt-list tr.yui-dt-selected td,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-desc{background-color:#426fd9;color:#FFF}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-selected{background-color:#446cd7;color:#FFF}.yui-skin-sam .yui-dt-paginator{display:block;margin:6px 0;white-space:nowrap}.yui-skin-sam .yui-dt-paginator .yui-dt-first,.yui-skin-sam .yui-dt-paginator .yui-dt-last,.yui-skin-sam .yui-dt-paginator .yui-dt-selected{padding:2px 6px}.yui-skin-sam .yui-dt-paginator a.yui-dt-first,.yui-skin-sam .yui-dt-paginator a.yui-dt-last{text-decoration:none}.yui-skin-sam .yui-dt-paginator .yui-dt-previous,.yui-skin-sam .yui-dt-paginator .yui-dt-next{display:none}.yui-skin-sam a.yui-dt-page{border:1px solid #cbcbcb;padding:2px 6px;text-decoration:none;background-color:#fff}.yui-skin-sam .yui-dt-selected{border:1px solid #fff;background-color:#fff} .yui-busy{cursor:wait!important;}.yui-toolbar-container fieldset,.yui-editor-container fieldset{padding:0;margin:0;border:0;}.yui-toolbar-container legend{display:none;}.yui-skin-sam .yui-toolbar-container .yui-button button,.yui-skin-sam .yui-toolbar-container .yui-button a,.yui-skin-sam .yui-toolbar-container .yui-button a:visited{font-size:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a:visited,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a:visited{font-size:12px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{font-size:0;line-height:0;padding:0;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container .yui-toolbar-titlebar h2 a{text-decoration:none;color:#000;cursor:default;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;margin-right:.5em;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;padding:0;height:18px;margin:.2em 0 .2em .1em;display:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:45px;*height:50px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;display:block;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;font-size:0;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block;right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;height:100%;width:100%;position:absolute;top:0;left:0;opacity:.5;filter:alpha(opacity=50);}.yui-editor-container iframe{border:0;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:.25em 0 .25em .25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd .gecko form{overflow:auto;}.yui-editor-panel .bd div.yui-editor-body-cont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group{margin-bottom:.75em;}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:visible;}.yui-editor-panel .height-width span.info{font-size:70%;margin-top:3px;float:none;} .yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-panel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;_top:-5px;width:24px;text-indent:52px;font-size:0;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0;text-indent:0;font-size:75%;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px!important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px solid #F6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-toolbar-group-undoredo h3,.yui-toolbar-group-insertitem h3,.yui-toolbar-group-indentlist h3{width:68px;}.yui-toolbar-group-indentlist2 h3{width:122px;}.yui-toolbar-group-alignment h3{width:130px;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-editor-container .draggable .yui-toolbar-titlebar{cursor:move;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000;font-weight:bold;margin:0;padding:.3em 1em;font-size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:0 .25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em .35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-top:1px solid #808080;color:#999;text-align:left;padding:.25em;}.yui-skin-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .collapsed{background:url(sprite.png) no-repeat 0 -350px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;} .yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;_font-size:0;margin:0;border-color:#808080;color:#f2f2f2;border-style:solid;border-width:1px 0;zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:0;line-height:2;display:block;color:#000;overflow:hidden;white-space:nowrap;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a{font-size:12px;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child{*left:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-fontname{width:135px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam .yui-toolbar-container .yui-button-menu .yui-menu-body-scrolled{position:relative;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-strikethrough span.yui-toolbar-icon{background-position:0 -108px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-undo span.yui-toolbar-icon{background-position:0 -1326px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-redo span.yui-toolbar-icon{background-position:0 -1355px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor span.yui-toolbar-icon{background-position:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;} .yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-position:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url(editor-sprite.gif) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;position:absolute;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel .createlink_target,.yui-skin-sam .yui-editor-panel .insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;_width:198px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0 0 2px 0;}.yui-skin-sam .yui-editor-panel .hd span.close{background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url(editor-sprite.gif) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url(editor-knob.gif) no-repeat 0 0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#fff;}.yui-editor-blankimage{background-image:url(blankimage.png);}.yui-skin-sam .yui-editor-container .yui-resize-handle-br{height:11px;width:11px;background-position:-20px -60px;background-color:transparent;} .yui-crop{position:relative;}.yui-crop .yui-crop-mask{position:absolute;top:0;left:0;height:100%;width:100%;}.yui-crop .yui-resize{position:absolute;top:10px;left:10px;border:0;}.yui-crop .yui-crop-resize-mask{position:absolute;top:0;left:0;height:100%;width:100%;background-position:-10px -10px;overflow:hidden;}.yui-skin-sam .yui-crop .yui-crop-mask{background-color:#000;opacity:.5;filter:alpha(opacity=50);}.yui-skin-sam .yui-crop .yui-resize{border:1px dashed #fff;} .yui-layout-loading{visibility:hidden;}body.yui-layout{overflow:hidden;position:relative;padding:0;margin:0;}.yui-layout-doc{position:relative;overflow:hidden;padding:0;margin:0;}.yui-layout-unit{height:50px;width:50px;padding:0;margin:0;float:none;z-index:0;}.yui-layout-unit-top{position:absolute;top:0;left:0;width:100%;}.yui-layout-unit-left{position:absolute;top:0;left:0;}.yui-layout-unit-right{position:absolute;top:0;right:0;}.yui-layout-unit-bottom{position:absolute;bottom:0;left:0;width:100%;}.yui-layout-unit-center{position:absolute;top:0;left:0;width:100%;}.yui-layout div.yui-layout-hd{position:absolute;top:0;left:0;zoom:1;width:100%;}.yui-layout div.yui-layout-bd{position:absolute;top:0;left:0;zoom:1;width:100%;}.yui-layout .yui-layout-noscroll div.yui-layout-bd{overflow:hidden;}.yui-layout .yui-layout-scroll div.yui-layout-bd{overflow:auto;}.yui-layout div.yui-layout-ft{position:absolute;bottom:0;left:0;width:100%;zoom:1;}.yui-layout .yui-layout-unit div.yui-layout-hd h2{text-align:left;}.yui-layout .yui-layout-unit div.yui-layout-hd .collapse{cursor:pointer;height:13px;position:absolute;right:2px;top:2px;width:17px;font-size:0;}.yui-layout .yui-layout-unit div.yui-layout-hd .close{cursor:pointer;height:13px;position:absolute;right:2px;top:2px;width:17px;font-size:0;}.yui-layout .yui-layout-unit div.yui-layout-hd .collapse-close{right:25px;}.yui-layout .yui-layout-clip{position:absolute;height:20px;background-color:#c0c0c0;display:none;}.yui-layout .yui-layout-clip .collapse{cursor:pointer;height:13px;position:absolute;right:2px;top:2px;width:17px;font-size:0;}.yui-layout .yui-layout-wrap{height:100%;width:100%;position:absolute;left:0;}.yui-skin-sam .yui-layout .yui-resize-proxy{border:none;font-size:0;margin:0;padding:0;}.yui-skin-sam .yui-layout .yui-resize-resizing .yui-resize-handle{display:none;zoom:1;}.yui-skin-sam .yui-layout .yui-resize-proxy div{position:absolute;border:1px solid #808080;background-color:#EDF5FF;}.yui-skin-sam .yui-layout .yui-resize .yui-resize-handle-active{zoom:1;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-l{width:5px;height:100%;top:0;left:0;zoom:1;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-r{width:5px;top:0;right:0;height:100%;position:absolute;zoom:1;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-b{width:100%;bottom:0;left:0;height:5px;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-t{width:100%;top:0;left:0;height:5px;}.yui-skin-sam .yui-layout .yui-layout-unit-left div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -160px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-left .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -140px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit-right div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -200px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-right .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -120px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit-top div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -220px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-top .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -240px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit-bottom div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -260px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-bottom .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -180px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-hd .close{background:transparent url(layout_sprite.png) no-repeat -20px -100px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-hd{background:url(sprite.png) repeat-x 0 -1400px;border:1px solid #808080;}.yui-skin-sam .yui-layout{background-color:#EDF5FF;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-hd h2{font-weight:bold;color:#fff;padding:3px;margin:0;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd{border:1px solid #808080;border-bottom:none;border-top:none;*border-bottom-width:0;*border-top-width:0;background-color:#f2f2f2;text-align:left;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd-noft{border-bottom:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd-nohd{border-top:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip{position:absolute;height:20px;background-color:#EDF5FF;display:none;border:1px solid #808080;}.yui-skin-sam .yui-layout div.yui-layout-ft{border:1px solid #808080;border-top:none;*border-top-width:0;background-color:#f2f2f2;}.yui-skin-sam .yui-layout-unit .yui-resize-handle{background-color:transparent;zoom:1;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-r{right:0;top:0;background-image:none;zoom:1;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-l{left:0;top:0;background-image:none;zoom:1;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-b{right:0;bottom:0;background-image:none;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-t{right:0;top:0;background-image:none;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-r .yui-layout-resize-knob,.yui-skin-sam .yui-layout-unit .yui-resize-handle-l .yui-layout-resize-knob{position:absolute;height:16px;width:6px;top:45%;left:0;display:block;background:transparent url(layout_sprite.png) no-repeat 0 -5px;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-t .yui-layout-resize-knob,.yui-skin-sam .yui-layout-unit .yui-resize-handle-b .yui-layout-resize-knob{position:absolute;height:6px;width:16px;left:45%;background:transparent url(layout_sprite.png) no-repeat -20px 0;zoom:1;} -.yui-skin-sam .yui-log{padding:1em;width:31em;background-color:#AAA;color:#000;border:1px solid black;font-family:monospace;font-size:77%;text-align:left;z-index:9000;}.yui-skin-sam .yui-log-container{position:absolute;top:1em;right:1em;}.yui-skin-sam .yui-log input{margin:0;padding:0;font-family:arial;font-size:100%;font-weight:normal;}.yui-skin-sam .yui-log .yui-log-btns{position:relative;float:right;bottom:.25em;}.yui-skin-sam .yui-log .yui-log-hd{margin-top:1em;padding:.5em;background-color:#575757;}.yui-skin-sam .yui-log .yui-log-hd h4{margin:0;padding:0;font-size:108%;font-weight:bold;color:#FFF;}.yui-skin-sam .yui-log .yui-log-bd{width:100%;height:20em;background-color:#FFF;border:1px solid gray;overflow:auto;}.yui-skin-sam .yui-log p{margin:1px;padding:.1em;}.yui-skin-sam .yui-log pre{margin:0;padding:0;}.yui-skin-sam .yui-log pre.yui-log-verbose{white-space:pre-wrap;white-space:-moz-pre-wrap!important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;}.yui-skin-sam .yui-log .yui-log-ft{margin-top:.5em;}.yui-skin-sam .yui-log .yui-log-ft .yui-log-sourcefilters{width:100%;border-top:1px solid #575757;margin-top:.75em;padding-top:.75em;}.yui-skin-sam .yui-log .yui-log-filtergrp{margin-right:.5em;}.yui-skin-sam .yui-log .info{background-color:#A7CC25;}.yui-skin-sam .yui-log .warn{background-color:#F58516;}.yui-skin-sam .yui-log .error{background-color:#E32F0B;}.yui-skin-sam .yui-log .time{background-color:#A6C9D7;}.yui-skin-sam .yui-log .window{background-color:#F2E886;} +.yui-skin-sam .yui-log{padding:1em;width:31em;background-color:#AAA;color:#000;border:1px solid black;font-family:monospace;font-size:77%;text-align:left;z-index:9000}.yui-skin-sam .yui-log-container{position:absolute;top:1em;right:1em}.yui-skin-sam .yui-log input{margin:0;padding:0;font-family:arial;font-size:100%;font-weight:normal}.yui-skin-sam .yui-log .yui-log-btns{position:relative;float:right;bottom:.25em}.yui-skin-sam .yui-log .yui-log-hd{margin-top:1em;padding:.5em;background-color:#575757}.yui-skin-sam .yui-log .yui-log-hd h4{margin:0;padding:0;font-size:108%;font-weight:bold;color:#FFF}.yui-skin-sam .yui-log .yui-log-bd{width:100%;height:20em;background-color:#FFF;border:1px solid gray;overflow:auto}.yui-skin-sam .yui-log p{margin:1px;padding:.1em}.yui-skin-sam .yui-log pre{margin:0;padding:0}.yui-skin-sam .yui-log pre.yui-log-verbose{white-space:pre-wrap;white-space:-moz-pre-wrap!important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}.yui-skin-sam .yui-log .yui-log-ft{margin-top:.5em}.yui-skin-sam .yui-log .yui-log-ft .yui-log-sourcefilters{width:100%;border-top:1px solid #575757;margin-top:.75em;padding-top:.75em}.yui-skin-sam .yui-log .yui-log-filtergrp{margin-right:.5em}.yui-skin-sam .yui-log .info{background-color:#a7cc25}.yui-skin-sam .yui-log .warn{background-color:#f58516}.yui-skin-sam .yui-log .error{background-color:#e32f0b}.yui-skin-sam .yui-log .time{background-color:#a6c9d7}.yui-skin-sam .yui-log .window{background-color:#f2e886} .yuimenu{top:-999em;left:-999em;}.yuimenubar{position:static;}.yuimenu .yuimenu,.yuimenubar .yuimenu{position:absolute;}.yuimenubar li,.yuimenu li{list-style-type:none;}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;}.yuimenuitemlabel,.yuimenubaritemlabel{text-align:left;white-space:nowrap;}.yuimenubar ul{*zoom:1;}.yuimenubar .yuimenu ul{*zoom:normal;}.yuimenubar>.bd>ul:after{content:".";display:block;clear:both;visibility:hidden;height:0;line-height:0;}.yuimenubaritem{float:left;}.yuimenubaritemlabel,.yuimenuitemlabel{display:block;}.yuimenuitemlabel .helptext{font-style:normal;display:block;margin:-1em 0 0 10em;}.yui-menu-shadow{position:absolute;visibility:hidden;z-index:-1;}.yui-menu-shadow-visible{top:2px;right:-3px;left:-3px;bottom:-3px;visibility:visible;}.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.yuimenu.show-scrollbars,.yuimenubar.show-scrollbars{overflow:visible;}.yuimenu.hide-scrollbars .yui-menu-shadow,.yuimenubar.hide-scrollbars .yui-menu-shadow{overflow:hidden;}.yuimenu.show-scrollbars .yui-menu-shadow,.yuimenubar.show-scrollbars .yui-menu-shadow{overflow:auto;}.yui-overlay.yui-force-redraw{margin-bottom:1px;}.yui-skin-sam .yuimenubar{font-size:93%;line-height:2;*line-height:1.9;border:solid 1px #808080;background:url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritem{border-right:solid 1px #ccc;}.yui-skin-sam .yuimenubaritemlabel{padding:0 10px;color:#000;text-decoration:none;cursor:default;border-style:solid;border-color:#808080;border-width:1px 0;*position:relative;margin:-1px 0;}.yui-skin-sam .yuimenubaritemlabel:visited{color:#000;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel{padding-right:20px;*display:inline-block;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu{background:url(menubaritem_submenuindicator.png) right center no-repeat;}.yui-skin-sam .yuimenubaritem-selected{background:url(sprite.png) repeat-x 0 -1700px;}.yui-skin-sam .yuimenubaritemlabel-selected{border-color:#7D98B8;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-selected{border-left-width:1px;margin-left:-1px;*left:-1px;}.yui-skin-sam .yuimenubaritemlabel-disabled,.yui-skin-sam .yuimenubaritemlabel-disabled:visited{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu-disabled{background-image:url(menubaritem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenu{font-size:93%;line-height:1.5;*line-height:1.45;}.yui-skin-sam .yuimenubar .yuimenu,.yui-skin-sam .yuimenu .yuimenu{font-size:100%;}.yui-skin-sam .yuimenu .bd{*zoom:1;_zoom:normal;border:solid 1px #808080;background-color:#fff;}.yui-skin-sam .yuimenu .yuimenu .bd{*zoom:normal;}.yui-skin-sam .yuimenu ul{padding:3px 0;border-width:1px 0 0 0;border-color:#ccc;border-style:solid;}.yui-skin-sam .yuimenu ul.first-of-type{border-width:0;}.yui-skin-sam .yuimenu h6{font-weight:bold;border-style:solid;border-color:#ccc;border-width:1px 0 0 0;color:#a4a4a4;padding:3px 10px 0 10px;}.yui-skin-sam .yuimenu ul.hastitle,.yui-skin-sam .yuimenu h6.first-of-type{border-width:0;}.yui-skin-sam .yuimenu .yui-menu-body-scrolled{border-color:#ccc #808080;overflow:hidden;}.yui-skin-sam .yuimenu .topscrollbar,.yui-skin-sam .yuimenu .bottomscrollbar{height:16px;border:solid 1px #808080;background:#fff url(sprite.png) no-repeat 0 0;}.yui-skin-sam .yuimenu .topscrollbar{border-bottom-width:0;background-position:center -950px;}.yui-skin-sam .yuimenu .topscrollbar_disabled{background-position:center -975px;}.yui-skin-sam .yuimenu .bottomscrollbar{border-top-width:0;background-position:center -850px;}.yui-skin-sam .yuimenu .bottomscrollbar_disabled{background-position:center -875px;}.yui-skin-sam .yuimenuitem{_border-bottom:solid 1px #fff;}.yui-skin-sam .yuimenuitemlabel{padding:0 20px;color:#000;text-decoration:none;cursor:default;}.yui-skin-sam .yuimenuitemlabel:visited{color:#000;}.yui-skin-sam .yuimenuitemlabel .helptext{margin-top:-1.5em;*margin-top:-1.45em;}.yui-skin-sam .yuimenuitem-hassubmenu{background-image:url(menuitem_submenuindicator.png);background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yuimenuitem-checked{background-image:url(menuitem_checkbox.png);background-position:left center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-shadow-visible{background-color:#000;opacity:.12;filter:alpha(opacity=12);}.yui-skin-sam .yuimenuitem-selected{background-color:#B3D4FF;}.yui-skin-sam .yuimenuitemlabel-disabled,.yui-skin-sam .yuimenuitemlabel-disabled:visited{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenuitem-hassubmenu-disabled{background-image:url(menuitem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenuitem-checked-disabled{background-image:url(menuitem_checkbox_disabled.png);} -.yui-skin-sam .yui-pg-container{display:block;margin:6px 0;white-space:nowrap;}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous,.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last,.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-pages,.yui-skin-sam .yui-pg-page{display:inline-block;font-family:arial,helvetica,clean,sans-serif;padding:3px 6px;zoom:1;}.yui-skin-sam .yui-pg-pages{padding:0;}.yui-skin-sam .yui-pg-current{padding:3px 0;}.yui-skin-sam a.yui-pg-first:link,.yui-skin-sam a.yui-pg-first:visited,.yui-skin-sam a.yui-pg-first:active,.yui-skin-sam a.yui-pg-first:hover,.yui-skin-sam a.yui-pg-previous:link,.yui-skin-sam a.yui-pg-previous:visited,.yui-skin-sam a.yui-pg-previous:active,.yui-skin-sam a.yui-pg-previous:hover,.yui-skin-sam a.yui-pg-next:link,.yui-skin-sam a.yui-pg-next:visited,.yui-skin-sam a.yui-pg-next:active,.yui-skin-sam a.yui-pg-next:hover,.yui-skin-sam a.yui-pg-last:link,.yui-skin-sam a.yui-pg-last:visited,.yui-skin-sam a.yui-pg-last:active,.yui-skin-sam a.yui-pg-last:hover,.yui-skin-sam a.yui-pg-page:link,.yui-skin-sam a.yui-pg-page:visited,.yui-skin-sam a.yui-pg-page:active,.yui-skin-sam a.yui-pg-page:hover{color:#06c;text-decoration:underline;outline:0;}.yui-skin-sam span.yui-pg-first,.yui-skin-sam span.yui-pg-previous,.yui-skin-sam span.yui-pg-next,.yui-skin-sam span.yui-pg-last{color:#a6a6a6;}.yui-skin-sam .yui-pg-page{background-color:#fff;border:1px solid #CBCBCB;padding:2px 6px;text-decoration:none;}.yui-skin-sam .yui-pg-current-page{background-color:transparent;border:none;font-weight:bold;padding:3px 6px;}.yui-skin-sam .yui-pg-page{margin-left:1px;margin-right:1px;}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous{padding-left:0;}.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last{padding-right:0;}.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-rpp-options{margin-left:1em;margin-right:1em;} -.yui-skin-sam .yui-pv{background-color:#4a4a4a;font:arial;position:relative;width:99%;z-index:1000;margin-bottom:1em;overflow:hidden;}.yui-skin-sam .yui-pv .hd{background:url(header_background.png) repeat-x;min-height:30px;overflow:hidden;zoom:1;padding:2px 0;}.yui-skin-sam .yui-pv .hd h4{padding:8px 10px;margin:0;font:bold 14px arial;color:#fff;}.yui-skin-sam .yui-pv .hd a{background:#3f6bc3;font:bold 11px arial;color:#fff;padding:4px;margin:3px 10px 0 0;border:1px solid #3f567d;cursor:pointer;display:block;float:right;}.yui-skin-sam .yui-pv .hd span{display:none;}.yui-skin-sam .yui-pv .hd span.yui-pv-busy{height:18px;width:18px;background:url(wait.gif) no-repeat;overflow:hidden;display:block;float:right;margin:4px 10px 0 0;}.yui-skin-sam .yui-pv .hd:after,.yui-pv .bd:after,.yui-skin-sam .yui-pv-chartlegend dl:after{content:'.';visibility:hidden;clear:left;height:0;display:block;}.yui-skin-sam .yui-pv .bd{position:relative;zoom:1;overflow-x:auto;overflow-y:hidden;}.yui-skin-sam .yui-pv .yui-pv-table{padding:0 10px;margin:5px 0 10px 0;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-bd td{color:#eeee5c;font:12px arial;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd{background:#929292;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even{background:#58637a;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-desc{background:#384970;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-desc{background:#6F6E6E;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th{background-image:none;background:#2E2D2D;}.yui-skin-sam .yui-pv th.yui-dt-asc .yui-dt-liner{background:transparent url(asc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv th.yui-dt-desc .yui-dt-liner{background:transparent url(desc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th a{color:#fff;font:bold 12px arial;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-desc{background:#333;}.yui-skin-sam .yui-pv-chartcontainer{padding:0 10px;}.yui-skin-sam .yui-pv-chart{height:250px;clear:right;margin:5px 0 0 0;color:#fff;}.yui-skin-sam .yui-pv-chartlegend div{float:right;margin:0 0 0 10px;_width:250px;}.yui-skin-sam .yui-pv-chartlegend dl{border:1px solid #999;padding:.2em 0 .2em .5em;zoom:1;margin:5px 0;}.yui-skin-sam .yui-pv-chartlegend dt{float:left;display:block;height:.7em;width:.7em;padding:0;}.yui-skin-sam .yui-pv-chartlegend dd{float:left;display:block;color:#fff;margin:0 1em 0 .5em;padding:0;font:11px arial;}.yui-skin-sam .yui-pv-minimized{height:35px;}.yui-skin-sam .yui-pv-minimized .bd{top:-3000px;}.yui-skin-sam .yui-pv-minimized .hd a.yui-pv-refresh{display:none;} -.yui-pb-bar,.yui-pb-mask{width:100%;height:100%;}.yui-pb{position:relative;top:0;left:0;width:200px;height:20px;padding:0;border:none;margin:0;text-align:left;}.yui-pb-mask{position:absolute;top:0;left:0;z-index:2;}.yui-pb-mask div{width:50%;height:50%;background-repeat:no-repeat;padding:0;position:absolute;}.yui-pb-tl{background-position:top left;}.yui-pb-tr{background-position:top right;left:50%;}.yui-pb-bl{background-position:bottom left;top:50%;}.yui-pb-br{background-position:bottom right;left:50%;top:50%;}.yui-pb-bar{margin:0;position:absolute;left:0;top:0;z-index:1;}.yui-pb-ltr .yui-pb-bar{_position:static;}.yui-pb-rtl .yui-pb-bar{background-position:right;}.yui-pb-btt .yui-pb-bar{background-position:left bottom;}.yui-pb-bar{background-color:blue;}.yui-pb{border:thin solid #808080;}.yui-skin-sam .yui-pb{background-color:transparent;border:solid #808080;border-width:1px 0;}.yui-skin-sam .yui-pb-rtl,.yui-skin-sam .yui-pb-ltr{background-image:url(back-h.png);background-repeat:repeat-x;}.yui-skin-sam .yui-pb-ttb,.yui-skin-sam .yui-pb-btt{background-image:url(back-v.png);background-repeat:repeat-y;}.yui-skin-sam .yui-pb-bar{background-color:transparent;}.yui-skin-sam .yui-pb-ltr .yui-pb-bar,.yui-skin-sam .yui-pb-rtl .yui-pb-bar{background-image:url(bar-h.png);background-repeat:repeat-x;}.yui-skin-sam .yui-pb-ttb .yui-pb-bar,.yui-skin-sam .yui-pb-btt .yui-pb-bar{background-image:url(bar-v.png);background-repeat:repeat-y;}.yui-skin-sam .yui-pb-mask{border:solid #808080;border-width:0 1px;margin:0 -1px;}.yui-skin-sam .yui-pb-caption{color:#000;text-align:center;margin:0 auto;}.yui-skin-sam .yui-pb-range{color:#a6a6a6;} +.yui-skin-sam .yui-pg-container{display:block;margin:6px 0;white-space:nowrap}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous,.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last,.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-pages,.yui-skin-sam .yui-pg-page{display:inline-block;font-family:arial,helvetica,clean,sans-serif;padding:3px 6px;zoom:1}.yui-skin-sam .yui-pg-pages{padding:0}.yui-skin-sam .yui-pg-current{padding:3px 0}.yui-skin-sam a.yui-pg-first:link,.yui-skin-sam a.yui-pg-first:visited,.yui-skin-sam a.yui-pg-first:active,.yui-skin-sam a.yui-pg-first:hover,.yui-skin-sam a.yui-pg-previous:link,.yui-skin-sam a.yui-pg-previous:visited,.yui-skin-sam a.yui-pg-previous:active,.yui-skin-sam a.yui-pg-previous:hover,.yui-skin-sam a.yui-pg-next:link,.yui-skin-sam a.yui-pg-next:visited,.yui-skin-sam a.yui-pg-next:active,.yui-skin-sam a.yui-pg-next:hover,.yui-skin-sam a.yui-pg-last:link,.yui-skin-sam a.yui-pg-last:visited,.yui-skin-sam a.yui-pg-last:active,.yui-skin-sam a.yui-pg-last:hover,.yui-skin-sam a.yui-pg-page:link,.yui-skin-sam a.yui-pg-page:visited,.yui-skin-sam a.yui-pg-page:active,.yui-skin-sam a.yui-pg-page:hover{color:#06c;text-decoration:underline;outline:0}.yui-skin-sam span.yui-pg-first,.yui-skin-sam span.yui-pg-previous,.yui-skin-sam span.yui-pg-next,.yui-skin-sam span.yui-pg-last{color:#a6a6a6}.yui-skin-sam .yui-pg-page{background-color:#fff;border:1px solid #cbcbcb;padding:2px 6px;text-decoration:none}.yui-skin-sam .yui-pg-current-page{background-color:transparent;border:0;font-weight:bold;padding:3px 6px}.yui-skin-sam .yui-pg-page{margin-left:1px;margin-right:1px}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous{padding-left:0}.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last{padding-right:0}.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-rpp-options{margin-left:1em;margin-right:1em} +.yui-skin-sam .yui-pv{background-color:#4a4a4a;font-family:arial;position:relative;width:99%;z-index:1000;margin-bottom:1em;overflow:hidden;}.yui-skin-sam .yui-pv .hd{background:url(header_background.png) repeat-x;min-height:30px;overflow:hidden;zoom:1;padding:2px 0;}.yui-skin-sam .yui-pv .hd h4{padding:8px 10px;margin:0;font:bold 14px arial;color:#fff;}.yui-skin-sam .yui-pv .hd a{background:#3f6bc3;font:bold 11px arial;color:#fff;padding:4px;margin:3px 10px 0 0;border:1px solid #3f567d;cursor:pointer;display:block;float:right;}.yui-skin-sam .yui-pv .hd span{display:none;}.yui-skin-sam .yui-pv .hd span.yui-pv-busy{height:18px;width:18px;background:url(wait.gif) no-repeat;overflow:hidden;display:block;float:right;margin:4px 10px 0 0;}.yui-skin-sam .yui-pv .hd:after,.yui-pv .bd:after,.yui-skin-sam .yui-pv-chartlegend dl:after{content:'.';visibility:hidden;clear:left;height:0;display:block;}.yui-skin-sam .yui-pv .bd{position:relative;zoom:1;overflow-x:auto;overflow-y:hidden;}.yui-skin-sam .yui-pv .yui-pv-table{padding:0 10px;margin:5px 0 10px 0;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-bd td{color:#eeee5c;font:12px arial;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd{background:#929292;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even{background:#58637a;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-desc{background:#384970;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-desc{background:#6F6E6E;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th{background-image:none;background:#2E2D2D;}.yui-skin-sam .yui-pv th.yui-dt-asc .yui-dt-liner{background:transparent url(asc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv th.yui-dt-desc .yui-dt-liner{background:transparent url(desc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th a{color:#fff;font:bold 12px arial;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-desc{background:#333;}.yui-skin-sam .yui-pv-chartcontainer{padding:0 10px;}.yui-skin-sam .yui-pv-chart{height:250px;clear:right;margin:5px 0 0 0;color:#fff;}.yui-skin-sam .yui-pv-chartlegend div{float:right;margin:0 0 0 10px;_width:250px;}.yui-skin-sam .yui-pv-chartlegend dl{border:1px solid #999;padding:.2em 0 .2em .5em;zoom:1;margin:5px 0;}.yui-skin-sam .yui-pv-chartlegend dt{float:left;display:block;height:.7em;width:.7em;padding:0;}.yui-skin-sam .yui-pv-chartlegend dd{float:left;display:block;color:#fff;margin:0 1em 0 .5em;padding:0;font:11px arial;}.yui-skin-sam .yui-pv-minimized{height:35px;}.yui-skin-sam .yui-pv-minimized .bd{top:-3000px;}.yui-skin-sam .yui-pv-minimized .hd a.yui-pv-refresh{display:none;} +.yui-pb-bar,.yui-pb-mask{width:100%;height:100%}.yui-pb{position:relative;top:0;left:0;width:200px;height:20px;padding:0;border:0;margin:0;text-align:left}.yui-pb-mask{position:absolute;top:0;left:0;z-index:2}.yui-pb-mask div{width:50%;height:50%;background-repeat:no-repeat;padding:0;position:absolute}.yui-pb-tl{background-position:top left}.yui-pb-tr{background-position:top right;left:50%}.yui-pb-bl{background-position:bottom left;top:50%}.yui-pb-br{background-position:bottom right;left:50%;top:50%}.yui-pb-bar{margin:0;position:absolute;left:0;top:0;z-index:1}.yui-pb-ltr .yui-pb-bar{_position:static}.yui-pb-rtl .yui-pb-bar{background-position:right}.yui-pb-btt .yui-pb-bar{background-position:left bottom}.yui-pb-bar{background-color:blue}.yui-pb{border:thin solid #808080}.yui-skin-sam .yui-pb{background-color:transparent;border:solid #808080;border-width:1px 0}.yui-skin-sam .yui-pb-rtl,.yui-skin-sam .yui-pb-ltr{background-image:url(back-h.png);background-repeat:repeat-x}.yui-skin-sam .yui-pb-ttb,.yui-skin-sam .yui-pb-btt{background-image:url(back-v.png);background-repeat:repeat-y}.yui-skin-sam .yui-pb-bar{background-color:transparent}.yui-skin-sam .yui-pb-ltr .yui-pb-bar,.yui-skin-sam .yui-pb-rtl .yui-pb-bar{background-image:url(bar-h.png);background-repeat:repeat-x}.yui-skin-sam .yui-pb-ttb .yui-pb-bar,.yui-skin-sam .yui-pb-btt .yui-pb-bar{background-image:url(bar-v.png);background-repeat:repeat-y}.yui-skin-sam .yui-pb-mask{border:solid #808080;border-width:0 1px;margin:0 -1px}.yui-skin-sam .yui-pb-caption{color:#000;text-align:center;margin:0 auto}.yui-skin-sam .yui-pb-range{color:#a6a6a6} .yui-resize{position:relative;zoom:1;z-index:0;}.yui-resize-wrap{zoom:1;}.yui-draggable{cursor:move;}.yui-resize .yui-resize-handle{position:absolute;z-index:1;font-size:0;margin:0;padding:0;zoom:1;height:1px;width:1px;}.yui-resize .yui-resize-handle-br{height:5px;width:5px;bottom:0;right:0;cursor:se-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-bl{height:5px;width:5px;bottom:0;left:0;cursor:sw-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-tl{height:5px;width:5px;top:0;left:0;cursor:nw-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-tr{height:5px;width:5px;top:0;right:0;cursor:ne-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-r{width:5px;height:100%;top:0;right:0;cursor:e-resize;zoom:1;}.yui-resize .yui-resize-handle-l{height:100%;width:5px;top:0;left:0;cursor:w-resize;zoom:1;}.yui-resize .yui-resize-handle-b{width:100%;height:5px;bottom:0;right:0;cursor:s-resize;zoom:1;}.yui-resize .yui-resize-handle-t{width:100%;height:5px;top:0;right:0;cursor:n-resize;zoom:1;}.yui-resize-proxy{position:absolute;border:1px dashed #000;visibility:hidden;z-index:1000;}.yui-resize-hover .yui-resize-handle,.yui-resize-hidden .yui-resize-handle{opacity:0;filter:alpha(opacity=0);}.yui-resize-ghost{opacity:.5;filter:alpha(opacity=50);}.yui-resize-knob .yui-resize-handle{height:6px;width:6px;}.yui-resize-knob .yui-resize-handle-tr{right:-3px;top:-3px;}.yui-resize-knob .yui-resize-handle-tl{left:-3px;top:-3px;}.yui-resize-knob .yui-resize-handle-bl{left:-3px;bottom:-3px;}.yui-resize-knob .yui-resize-handle-br{right:-3px;bottom:-3px;}.yui-resize-knob .yui-resize-handle-t{left:45%;top:-3px;}.yui-resize-knob .yui-resize-handle-r{right:-3px;top:45%;}.yui-resize-knob .yui-resize-handle-l{left:-3px;top:45%;}.yui-resize-knob .yui-resize-handle-b{left:45%;bottom:-3px;}.yui-resize-status{position:absolute;top:-999px;left:-999px;padding:2px;font-size:80%;display:none;zoom:1;z-index:9999;}.yui-resize-status strong,.yui-resize-status em{font-weight:normal;font-style:normal;padding:1px;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle{background-color:#F2F2F2;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle-active{background-color:#7D98B8;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle-l,.yui-skin-sam .yui-resize .yui-resize-handle-r,.yui-skin-sam .yui-resize .yui-resize-handle-l-active,.yui-skin-sam .yui-resize .yui-resize-handle-r-active{height:100%;zoom:1;}.yui-skin-sam .yui-resize-knob .yui-resize-handle{border:1px solid #808080;}.yui-skin-sam .yui-resize-hover .yui-resize-handle-active{opacity:1;filter:alpha(opacity=100);}.yui-skin-sam .yui-resize-proxy{border:1px dashed #426FD9;}.yui-skin-sam .yui-resize-status{border:1px solid #A6982B;border-top:1px solid #D4C237;background-color:#FFEE69;color:#000;}.yui-skin-sam .yui-resize-status strong,.yui-skin-sam .yui-resize-status em{float:left;display:block;clear:both;padding:1px;text-align:center;}.yui-skin-sam .yui-resize .yui-resize-handle-inner-r,.yui-skin-sam .yui-resize .yui-resize-handle-inner-l{background:transparent url(layout_sprite.png) no-repeat 0 -5px;height:16px;width:5px;position:absolute;top:45%;}.yui-skin-sam .yui-resize .yui-resize-handle-inner-t,.yui-skin-sam .yui-resize .yui-resize-handle-inner-b{background:transparent url(layout_sprite.png) no-repeat -20px 0;height:5px;width:16px;position:absolute;left:50%;}.yui-skin-sam .yui-resize .yui-resize-handle-br{background-image:url(layout_sprite.png);background-repeat:no-repeat;background-position:-22px -62px;}.yui-skin-sam .yui-resize .yui-resize-handle-tr{background-image:url(layout_sprite.png);background-repeat:no-repeat;background-position:-22px -42px;}.yui-skin-sam .yui-resize .yui-resize-handle-tl{background-image:url(layout_sprite.png);background-repeat:no-repeat;background-position:-22px -82px;}.yui-skin-sam .yui-resize .yui-resize-handle-bl{background-image:url(layout_sprite.png);background-repeat:no-repeat;background-position:-22px -23px;}.yui-skin-sam .yui-resize-knob .yui-resize-handle-t,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-b,.yui-skin-sam .yui-resize-knob .yui-resize-handle-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-tl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-tr,.yui-skin-sam .yui-resize-knob .yui-resize-handle-bl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-br,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-t,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-b,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-tl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-tr,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-bl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-br{background-image:none;}.yui-skin-sam .yui-resize-knob .yui-resize-handle-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-l-active,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r-active{height:6px;width:6px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-r{right:-8px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-b{bottom:-8px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-br{right:-8px;bottom:-8px;} .yui-busy{cursor:wait!important;}.yui-toolbar-container fieldset,.yui-editor-container fieldset{padding:0;margin:0;border:0;}.yui-toolbar-container legend{display:none;}.yui-skin-sam .yui-toolbar-container .yui-button button,.yui-skin-sam .yui-toolbar-container .yui-button a,.yui-skin-sam .yui-toolbar-container .yui-button a:visited{font-size:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a:visited,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a:visited{font-size:12px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{font-size:0;line-height:0;padding:0;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container .yui-toolbar-titlebar h2 a{text-decoration:none;color:#000;cursor:default;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;margin-right:.5em;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;padding:0;height:18px;margin:.2em 0 .2em .1em;display:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:45px;*height:50px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;display:block;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;font-size:0;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block;right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;height:100%;width:100%;position:absolute;top:0;left:0;opacity:.5;filter:alpha(opacity=50);}.yui-editor-container iframe{border:0;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:.25em 0 .25em .25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd .gecko form{overflow:auto;}.yui-editor-panel .bd div.yui-editor-body-cont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group{margin-bottom:.75em;}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:visible;}.yui-editor-panel .height-width span.info{font-size:70%;margin-top:3px;float:none;} .yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-panel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;_top:-5px;width:24px;text-indent:52px;font-size:0;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0;text-indent:0;font-size:75%;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px!important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px solid #F6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-toolbar-group-undoredo h3,.yui-toolbar-group-insertitem h3,.yui-toolbar-group-indentlist h3{width:68px;}.yui-toolbar-group-indentlist2 h3{width:122px;}.yui-toolbar-group-alignment h3{width:130px;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-editor-container .draggable .yui-toolbar-titlebar{cursor:move;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000;font-weight:bold;margin:0;padding:.3em 1em;font-size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:0 .25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em .35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-top:1px solid #808080;color:#999;text-align:left;padding:.25em;}.yui-skin-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .collapsed{background:url(sprite.png) no-repeat 0 -350px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;} .yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;_font-size:0;margin:0;border-color:#808080;color:#f2f2f2;border-style:solid;border-width:1px 0;zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:0;line-height:2;display:block;color:#000;overflow:hidden;white-space:nowrap;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a{font-size:12px;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child{*left:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-fontname{width:135px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam .yui-toolbar-container .yui-button-menu .yui-menu-body-scrolled{position:relative;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-strikethrough span.yui-toolbar-icon{background-position:0 -108px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-undo span.yui-toolbar-icon{background-position:0 -1326px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-redo span.yui-toolbar-icon{background-position:0 -1355px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor span.yui-toolbar-icon{background-position:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;} -.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-position:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url(editor-sprite.gif) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;position:absolute;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel .createlink_target,.yui-skin-sam .yui-editor-panel .insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;_width:198px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0 0 2px 0;}.yui-skin-sam .yui-editor-panel .hd span.close{background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url(editor-sprite.gif) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url(editor-knob.gif) no-repeat 0 0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#fff;}.yui-editor-blankimage{background-image:url(blankimage.png);}.yui-skin-sam .yui-editor-container .yui-resize-handle-br{height:11px;width:11px;background-position:-20px -60px;background-color:transparent;} -.yui-h-slider,.yui-v-slider,.yui-region-slider{position:relative;}.yui-h-slider .yui-slider-thumb,.yui-v-slider .yui-slider-thumb,.yui-region-slider .yui-slider-thumb{position:absolute;cursor:default;}.yui-skin-sam .yui-h-slider{background:url(bg-h.gif) no-repeat 5px 0;height:28px;width:228px;}.yui-skin-sam .yui-h-slider .yui-slider-thumb{top:4px;}.yui-skin-sam .yui-v-slider{background:url(bg-v.gif) no-repeat 12px 0;height:228px;width:48px;}.yui-skin-sam .yui-region-slider{height:228px;width:228px;} -.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{margin:0 .5em 0 0;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{margin:0 0 .5em;}.yui-navset .yui-content .yui-hidden{border:0;height:0;width:0;padding:0;position:absolute;left:-999999px;overflow:hidden;visibility:hidden;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{width:6em;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{width:auto;}.yui-navset .yui-navset-left,.yui-navset-left{padding:0 0 0 6em;}.yui-navset-right{padding:0 6em 0 0;}.yui-navset-top,.yui-navset-bottom{padding:auto;}.yui-nav,.yui-nav li{margin:0;padding:0;list-style:none;}.yui-navset li em{font-style:normal;}.yui-navset{position:relative;zoom:1;}.yui-navset .yui-content,.yui-navset .yui-content div{zoom:1;}.yui-navset .yui-content:after{content:'';display:block;clear:both;}.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{display:inline-block;display:-moz-inline-stack;*display:inline;vertical-align:bottom;cursor:pointer;zoom:1;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{display:block;}.yui-navset .yui-nav a{position:relative;}.yui-navset .yui-nav li a,.yui-navset-top .yui-nav li a,.yui-navset-bottom .yui-nav li a{display:block;display:inline-block;vertical-align:bottom;zoom:1;}.yui-navset-left .yui-nav li a,.yui-navset-right .yui-nav li a{display:block;}.yui-navset-bottom .yui-nav li a{vertical-align:text-top;}.yui-navset .yui-nav li a em,.yui-navset-top .yui-nav li a em,.yui-navset-bottom .yui-nav li a em{display:block;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{position:absolute;z-index:1;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{position:static;}.yui-navset .yui-navset-left .yui-nav,.yui-navset-left .yui-nav{left:0;right:auto;}.yui-navset .yui-navset-right .yui-nav,.yui-navset-right .yui-nav{right:0;left:auto;}.yui-skin-sam .yui-navset .yui-nav,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav{border:solid #2647a0;border-width:0 0 5px;zoom:1;}.yui-skin-sam .yui-navset .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav li{margin:0 .16em 0 0;padding:1px 0 0;zoom:1;}.yui-skin-sam .yui-navset .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav .selected{margin:0 .16em -1px 0;}.yui-skin-sam .yui-navset .yui-nav a,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a{background:#d8d8d8 url(sprite.png) repeat-x;border:solid #a3a3a3;border-width:0 1px;color:#000;position:relative;text-decoration:none;}.yui-skin-sam .yui-navset .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a em{border:solid #a3a3a3;border-width:1px 0 0;cursor:hand;padding:.25em .75em;left:0;right:0;bottom:0;top:-1px;position:relative;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a:focus,.yui-skin-sam .yui-navset .yui-nav .selected a:hover{background:#2647a0 url(sprite.png) repeat-x left -1400px;color:#fff;}.yui-skin-sam .yui-navset .yui-nav a:hover,.yui-skin-sam .yui-navset .yui-nav a:focus{background:#bfdaff url(sprite.png) repeat-x left -1300px;outline:0;}.yui-skin-sam .yui-navset .yui-nav .selected a em{padding:.35em .75em;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a em{border-color:#243356;}.yui-skin-sam .yui-navset .yui-content{background:#edf5ff;}.yui-skin-sam .yui-navset .yui-content,.yui-skin-sam .yui-navset .yui-navset-top .yui-content{border:1px solid #808080;border-top-color:#243356;padding:.25em .5em;}.yui-skin-sam .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 5px 0 0;Xposition:absolute;top:0;bottom:0;}.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 0 0 5px;}.yui-skin-sam .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset-right .yui-nav li{margin:0 0 .16em;padding:0 0 0 1px;}.yui-skin-sam .yui-navset-right .yui-nav li{padding:0 1px 0 0;}.yui-skin-sam .yui-navset-left .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav .selected{margin:0 -1px .16em 0;}.yui-skin-sam .yui-navset-right .yui-nav .selected{margin:0 0 .16em -1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav a{border-width:1px 0;}.yui-skin-sam .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 0 0 1px;padding:.2em .75em;top:auto;left:-1px;}.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 1px 0 0;left:auto;right:-1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-left .yui-nav .selected a,.yui-skin-sam .yui-navset-left .yui-nav a:hover,.yui-skin-sam .yui-navset-right .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav .selected a,.yui-skin-sam .yui-navset-right .yui-nav a:hover,.yui-skin-sam .yui-navset-bottom .yui-nav a,.yui-skin-sam .yui-navset-bottom .yui-nav .selected a,.yui-skin-sam .yui-navset-bottom .yui-nav a:hover{background-image:none;}.yui-skin-sam .yui-navset-left .yui-content{border:1px solid #808080;border-left-color:#243356;}.yui-skin-sam .yui-navset-bottom .yui-nav,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav{border-width:5px 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav .selected,.yui-skin-sam .yui-navset-bottom .yui-nav .selected{margin:-1px .16em 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li,.yui-skin-sam .yui-navset-bottom .yui-nav li{padding:0 0 1px 0;vertical-align:top;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav a em,.yui-skin-sam .yui-navset-bottom .yui-nav a em{border-width:0 0 1px;top:auto;bottom:-1px;} -.yui-skin-sam .yui-navset-bottom .yui-content,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-content{border:1px solid #808080;border-bottom-color:#243356;} -table.ygtvtable{margin-bottom:0;border:none;border-collapse:collapse;}td.ygtvcell{border:none;padding:0;}a.ygtvspacer{text-decoration:none;outline-style:none;display:block;}.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;cursor:pointer;}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat;}.ygtvtmh,.ygtvtmhh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4800px no-repeat;}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -6400px no-repeat;}.ygtvtph,.ygtvtphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -7200px no-repeat;}.ygtvln{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -1600px no-repeat;cursor:pointer;}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0 no-repeat;}.ygtvlmh,.ygtvlmhh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -800px no-repeat;}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -2400px no-repeat;}.ygtvlph,.ygtvlphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px no-repeat;cursor:pointer;}.ygtvloading{width:18px;height:22px;background:url(treeview-loading.gif) 0 0 no-repeat;}.ygtvdepthcell{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8000px no-repeat;}.ygtvblankdepthcell{width:18px;height:22px;}* html .ygtvchildren{height:2%;}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;cursor:pointer;}.ygtvcontent{cursor:default;}.ygtvspacer{height:22px;width:18px;}.ygtvfocus{background-color:#c0e0e0;border:none;}.ygtvfocus .ygtvlabel,.ygtvfocus .ygtvlabel:link,.ygtvfocus .ygtvlabel:visited,.ygtvfocus .ygtvlabel:hover{background-color:#c0e0e0;}.ygtvfocus a{outline-style:none;}.ygtvok{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8800px no-repeat;}.ygtvok:hover{background:url(treeview-sprite.gif) 0 -8844px no-repeat;}.ygtvcancel{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8822px no-repeat;}.ygtvcancel:hover{background:url(treeview-sprite.gif) 0 -8866px no-repeat;}.ygtv-label-editor{background-color:#f2f2f2;border:1px solid silver;position:absolute;display:none;overflow:hidden;margin:auto;z-index:9000;}.ygtv-edit-TextNode{width:190px;}.ygtv-edit-TextNode .ygtvcancel,.ygtv-edit-TextNode .ygtvok{border:none;}.ygtv-edit-TextNode .ygtv-button-container{float:right;}.ygtv-edit-TextNode .ygtv-input input{width:140px;}.ygtv-edit-DateNode .ygtvcancel{border:none;}.ygtv-edit-DateNode .ygtvok{display:none;}.ygtv-edit-DateNode .ygtv-button-container{text-align:right;margin:auto;}.ygtv-highlight .ygtv-highlight1,.ygtv-highlight .ygtv-highlight1 .ygtvlabel{background-color:blue;color:white;}.ygtv-highlight .ygtv-highlight2,.ygtv-highlight .ygtv-highlight2 .ygtvlabel{background-color:silver;}.ygtv-highlight .ygtv-highlight0 .ygtvfocus .ygtvlabel,.ygtv-highlight .ygtv-highlight1 .ygtvfocus .ygtvlabel,.ygtv-highlight .ygtv-highlight2 .ygtvfocus .ygtvlabel{background-color:#c0e0e0;}.ygtv-highlight .ygtvcontent{padding-right:1em;}.ygtv-checkbox .ygtv-highlight0 .ygtvcontent{padding-left:1em;background:url(check0.gif) no-repeat;}.ygtv-checkbox .ygtv-highlight0 .ygtvfocus.ygtvcontent,.ygtv-checkbox .ygtv-highlight1 .ygtvfocus.ygtvcontent,.ygtv-checkbox .ygtv-highlight2 .ygtvfocus.ygtvcontent{background-color:#c0e0e0;}.ygtv-checkbox .ygtv-highlight1 .ygtvcontent{padding-left:1em;background:url(check1.gif) no-repeat;}.ygtv-checkbox .ygtv-highlight2 .ygtvcontent{padding-left:1em;background:url(check2.gif) no-repeat;} +.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-position:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url(editor-sprite.gif) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;position:absolute;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel .createlink_target,.yui-skin-sam .yui-editor-panel .insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;_width:198px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0 0 2px 0;}.yui-skin-sam .yui-editor-panel .hd span.close{background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url(editor-sprite.gif) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url(editor-knob.gif) no-repeat 0 0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#fff;}.yui-editor-blankimage{background-image:url(blankimage.png);}.yui-skin-sam .yui-editor-container .yui-resize-handle-br{height:11px;width:11px;background-position:-20px -60px;background-color:transparent;}.yui-h-slider,.yui-v-slider,.yui-region-slider{position:relative;}.yui-h-slider .yui-slider-thumb,.yui-v-slider .yui-slider-thumb,.yui-region-slider .yui-slider-thumb{position:absolute;cursor:default;}.yui-skin-sam .yui-h-slider{background:url(bg-h.gif) no-repeat 5px 0;height:28px;width:228px;}.yui-skin-sam .yui-h-slider .yui-slider-thumb{top:4px;}.yui-skin-sam .yui-v-slider{background:url(bg-v.gif) no-repeat 12px 0;height:228px;width:48px;}.yui-skin-sam .yui-region-slider{height:228px;width:228px;} +.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{margin:0 .5em 0 0}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{margin:0 0 .5em}.yui-navset .yui-content .yui-hidden{border:0;height:0;width:0;padding:0;position:absolute;left:-999999px;overflow:hidden;visibility:hidden}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{width:6em}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{width:auto}.yui-navset .yui-navset-left,.yui-navset-left{padding:0 0 0 6em}.yui-navset-right{padding:0 6em 0 0}.yui-navset-top,.yui-navset-bottom{padding:auto}.yui-nav,.yui-nav li{margin:0;padding:0;list-style:none}.yui-navset li em{font-style:normal}.yui-navset{position:relative;zoom:1}.yui-navset .yui-content,.yui-navset .yui-content div{zoom:1}.yui-navset .yui-content:after{content:'';display:block;clear:both}.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{display:inline-block;display:-moz-inline-stack;*display:inline;vertical-align:bottom;cursor:pointer;zoom:1}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{display:block}.yui-navset .yui-nav a{position:relative}.yui-navset .yui-nav li a,.yui-navset-top .yui-nav li a,.yui-navset-bottom .yui-nav li a{display:block;display:inline-block;vertical-align:bottom;zoom:1}.yui-navset-left .yui-nav li a,.yui-navset-right .yui-nav li a{display:block}.yui-navset-bottom .yui-nav li a{vertical-align:text-top}.yui-navset .yui-nav li a em,.yui-navset-top .yui-nav li a em,.yui-navset-bottom .yui-nav li a em{display:block}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{position:absolute;z-index:1}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{position:static}.yui-navset .yui-navset-left .yui-nav,.yui-navset-left .yui-nav{left:0;right:auto}.yui-navset .yui-navset-right .yui-nav,.yui-navset-right .yui-nav{right:0;left:auto}.yui-skin-sam .yui-navset .yui-nav,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav{border:solid #2647a0;border-width:0 0 5px;zoom:1}.yui-skin-sam .yui-navset .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav li{margin:0 .16em 0 0;padding:1px 0 0;zoom:1}.yui-skin-sam .yui-navset .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav .selected{margin:0 .16em -1px 0}.yui-skin-sam .yui-navset .yui-nav a,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a{background:#d8d8d8 url(sprite.png) repeat-x;border:solid #a3a3a3;border-width:0 1px;color:#000;position:relative;text-decoration:none}.yui-skin-sam .yui-navset .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a em{border:solid #a3a3a3;border-width:1px 0 0;padding:.25em .75em;left:0;right:0;bottom:0;top:-1px;position:relative}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a:focus,.yui-skin-sam .yui-navset .yui-nav .selected a:hover{background:#2647a0 url(sprite.png) repeat-x left -1400px;color:#fff}.yui-skin-sam .yui-navset .yui-nav a:hover,.yui-skin-sam .yui-navset .yui-nav a:focus{background:#bfdaff url(sprite.png) repeat-x left -1300px;outline:0}.yui-skin-sam .yui-navset .yui-nav .selected a em{padding:.35em .75em}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a em{border-color:#243356}.yui-skin-sam .yui-navset .yui-content{background:#edf5ff}.yui-skin-sam .yui-navset .yui-content,.yui-skin-sam .yui-navset .yui-navset-top .yui-content{border:1px solid #808080;border-top-color:#243356;padding:.25em .5em}.yui-skin-sam .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 5px 0 0;Xposition:absolute;top:0;bottom:0}.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 0 0 5px}.yui-skin-sam .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset-right .yui-nav li{margin:0 0 .16em;padding:0 0 0 1px}.yui-skin-sam .yui-navset-right .yui-nav li{padding:0 1px 0 0}.yui-skin-sam .yui-navset-left .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav .selected{margin:0 -1px .16em 0}.yui-skin-sam .yui-navset-right .yui-nav .selected{margin:0 0 .16em -1px}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav a{border-width:1px 0}.yui-skin-sam .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 0 0 1px;padding:.2em .75em;top:auto;left:-1px}.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 1px 0 0;left:auto;right:-1px}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-left .yui-nav .selected a,.yui-skin-sam .yui-navset-left .yui-nav a:hover,.yui-skin-sam .yui-navset-right .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav .selected a,.yui-skin-sam .yui-navset-right .yui-nav a:hover,.yui-skin-sam .yui-navset-bottom .yui-nav a,.yui-skin-sam .yui-navset-bottom .yui-nav .selected a,.yui-skin-sam .yui-navset-bottom .yui-nav a:hover{background-image:none}.yui-skin-sam .yui-navset-left .yui-content{border:1px solid #808080;border-left-color:#243356}.yui-skin-sam .yui-navset-bottom .yui-nav,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav{border-width:5px 0 0}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav .selected,.yui-skin-sam .yui-navset-bottom .yui-nav .selected{margin:-1px .16em 0 0}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li,.yui-skin-sam .yui-navset-bottom .yui-nav li{padding:0 0 1px 0;vertical-align:top}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav a em,.yui-skin-sam .yui-navset-bottom .yui-nav a em{border-width:0 0 1px;top:auto;bottom:-1px} +.yui-skin-sam .yui-navset-bottom .yui-content,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-content{border:1px solid #808080;border-bottom-color:#243356} +table.ygtvtable{margin-bottom:0;border:0;border-collapse:collapse}td.ygtvcell{border:0;padding:0}a.ygtvspacer{text-decoration:none;outline-style:none;display:block}.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;cursor:pointer}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat}.ygtvtmh,.ygtvtmhh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4800px no-repeat}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -6400px no-repeat}.ygtvtph,.ygtvtphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -7200px no-repeat}.ygtvln{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -1600px no-repeat;cursor:pointer}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0 no-repeat}.ygtvlmh,.ygtvlmhh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -800px no-repeat}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -2400px no-repeat}.ygtvlph,.ygtvlphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px no-repeat;cursor:pointer}.ygtvloading{width:18px;height:22px;background:url(treeview-loading.gif) 0 0 no-repeat}.ygtvdepthcell{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8000px no-repeat}.ygtvblankdepthcell{width:18px;height:22px}* html .ygtvchildren{height:2%}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;cursor:pointer}.ygtvcontent{cursor:default}.ygtvspacer{height:22px;width:18px}.ygtvfocus{background-color:#c0e0e0;border:0}.ygtvfocus .ygtvlabel,.ygtvfocus .ygtvlabel:link,.ygtvfocus .ygtvlabel:visited,.ygtvfocus .ygtvlabel:hover{background-color:#c0e0e0}.ygtvfocus a{outline-style:none}.ygtvok{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8800px no-repeat}.ygtvok:hover{background:url(treeview-sprite.gif) 0 -8844px no-repeat}.ygtvcancel{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8822px no-repeat}.ygtvcancel:hover{background:url(treeview-sprite.gif) 0 -8866px no-repeat}.ygtv-label-editor{background-color:#f2f2f2;border:1px solid silver;position:absolute;display:none;overflow:hidden;margin:auto;z-index:9000}.ygtv-edit-TextNode{width:190px}.ygtv-edit-TextNode .ygtvcancel,.ygtv-edit-TextNode .ygtvok{border:0}.ygtv-edit-TextNode .ygtv-button-container{float:right}.ygtv-edit-TextNode .ygtv-input input{width:140px}.ygtv-edit-DateNode .ygtvcancel{border:0}.ygtv-edit-DateNode .ygtvok{display:none}.ygtv-edit-DateNode .ygtv-button-container{text-align:right;margin:auto}.ygtv-highlight .ygtv-highlight1,.ygtv-highlight .ygtv-highlight1 .ygtvlabel{background-color:blue;color:white}.ygtv-highlight .ygtv-highlight2,.ygtv-highlight .ygtv-highlight2 .ygtvlabel{background-color:silver}.ygtv-highlight .ygtv-highlight0 .ygtvfocus .ygtvlabel,.ygtv-highlight .ygtv-highlight1 .ygtvfocus .ygtvlabel,.ygtv-highlight .ygtv-highlight2 .ygtvfocus .ygtvlabel{background-color:#c0e0e0}.ygtv-highlight .ygtvcontent{padding-right:1em}.ygtv-checkbox .ygtv-highlight0 .ygtvcontent{padding-left:1em;background:url(check0.gif) no-repeat}.ygtv-checkbox .ygtv-highlight0 .ygtvfocus.ygtvcontent,.ygtv-checkbox .ygtv-highlight1 .ygtvfocus.ygtvcontent,.ygtv-checkbox .ygtv-highlight2 .ygtvfocus.ygtvcontent{background-color:#c0e0e0}.ygtv-checkbox .ygtv-highlight1 .ygtvcontent{padding-left:1em;background:url(check1.gif) no-repeat}.ygtv-checkbox .ygtv-highlight2 .ygtvcontent{padding-left:1em;background:url(check2.gif) no-repeat} diff --git a/include/javascript/yui/build/assets/skins/sam/slider.css b/include/javascript/yui/build/assets/skins/sam/slider.css index 9450e3be..3947edce 100644 --- a/include/javascript/yui/build/assets/skins/sam/slider.css +++ b/include/javascript/yui/build/assets/skins/sam/slider.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ .yui-h-slider,.yui-v-slider,.yui-region-slider{position:relative;}.yui-h-slider .yui-slider-thumb,.yui-v-slider .yui-slider-thumb,.yui-region-slider .yui-slider-thumb{position:absolute;cursor:default;}.yui-skin-sam .yui-h-slider{background:url(bg-h.gif) no-repeat 5px 0;height:28px;width:228px;}.yui-skin-sam .yui-h-slider .yui-slider-thumb{top:4px;}.yui-skin-sam .yui-v-slider{background:url(bg-v.gif) no-repeat 12px 0;height:228px;width:48px;}.yui-skin-sam .yui-region-slider{height:228px;width:228px;} diff --git a/include/javascript/yui/build/assets/skins/sam/tabview.css b/include/javascript/yui/build/assets/skins/sam/tabview.css index eb795746..9c3a358f 100644 --- a/include/javascript/yui/build/assets/skins/sam/tabview.css +++ b/include/javascript/yui/build/assets/skins/sam/tabview.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{margin:0 .5em 0 0;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{margin:0 0 .5em;}.yui-navset .yui-content .yui-hidden{border:0;height:0;width:0;padding:0;position:absolute;left:-999999px;overflow:hidden;visibility:hidden;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{width:6em;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{width:auto;}.yui-navset .yui-navset-left,.yui-navset-left{padding:0 0 0 6em;}.yui-navset-right{padding:0 6em 0 0;}.yui-navset-top,.yui-navset-bottom{padding:auto;}.yui-nav,.yui-nav li{margin:0;padding:0;list-style:none;}.yui-navset li em{font-style:normal;}.yui-navset{position:relative;zoom:1;}.yui-navset .yui-content,.yui-navset .yui-content div{zoom:1;}.yui-navset .yui-content:after{content:'';display:block;clear:both;}.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{display:inline-block;display:-moz-inline-stack;*display:inline;vertical-align:bottom;cursor:pointer;zoom:1;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{display:block;}.yui-navset .yui-nav a{position:relative;}.yui-navset .yui-nav li a,.yui-navset-top .yui-nav li a,.yui-navset-bottom .yui-nav li a{display:block;display:inline-block;vertical-align:bottom;zoom:1;}.yui-navset-left .yui-nav li a,.yui-navset-right .yui-nav li a{display:block;}.yui-navset-bottom .yui-nav li a{vertical-align:text-top;}.yui-navset .yui-nav li a em,.yui-navset-top .yui-nav li a em,.yui-navset-bottom .yui-nav li a em{display:block;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{position:absolute;z-index:1;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{position:static;}.yui-navset .yui-navset-left .yui-nav,.yui-navset-left .yui-nav{left:0;right:auto;}.yui-navset .yui-navset-right .yui-nav,.yui-navset-right .yui-nav{right:0;left:auto;}.yui-skin-sam .yui-navset .yui-nav,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav{border:solid #2647a0;border-width:0 0 5px;zoom:1;}.yui-skin-sam .yui-navset .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav li{margin:0 .16em 0 0;padding:1px 0 0;zoom:1;}.yui-skin-sam .yui-navset .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav .selected{margin:0 .16em -1px 0;}.yui-skin-sam .yui-navset .yui-nav a,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a{background:#d8d8d8 url(sprite.png) repeat-x;border:solid #a3a3a3;border-width:0 1px;color:#000;position:relative;text-decoration:none;}.yui-skin-sam .yui-navset .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a em{border:solid #a3a3a3;border-width:1px 0 0;cursor:hand;padding:.25em .75em;left:0;right:0;bottom:0;top:-1px;position:relative;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a:focus,.yui-skin-sam .yui-navset .yui-nav .selected a:hover{background:#2647a0 url(sprite.png) repeat-x left -1400px;color:#fff;}.yui-skin-sam .yui-navset .yui-nav a:hover,.yui-skin-sam .yui-navset .yui-nav a:focus{background:#bfdaff url(sprite.png) repeat-x left -1300px;outline:0;}.yui-skin-sam .yui-navset .yui-nav .selected a em{padding:.35em .75em;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a em{border-color:#243356;}.yui-skin-sam .yui-navset .yui-content{background:#edf5ff;}.yui-skin-sam .yui-navset .yui-content,.yui-skin-sam .yui-navset .yui-navset-top .yui-content{border:1px solid #808080;border-top-color:#243356;padding:.25em .5em;}.yui-skin-sam .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 5px 0 0;Xposition:absolute;top:0;bottom:0;}.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 0 0 5px;}.yui-skin-sam .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset-right .yui-nav li{margin:0 0 .16em;padding:0 0 0 1px;}.yui-skin-sam .yui-navset-right .yui-nav li{padding:0 1px 0 0;}.yui-skin-sam .yui-navset-left .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav .selected{margin:0 -1px .16em 0;}.yui-skin-sam .yui-navset-right .yui-nav .selected{margin:0 0 .16em -1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav a{border-width:1px 0;}.yui-skin-sam .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 0 0 1px;padding:.2em .75em;top:auto;left:-1px;}.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 1px 0 0;left:auto;right:-1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-left .yui-nav .selected a,.yui-skin-sam .yui-navset-left .yui-nav a:hover,.yui-skin-sam .yui-navset-right .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav .selected a,.yui-skin-sam .yui-navset-right .yui-nav a:hover,.yui-skin-sam .yui-navset-bottom .yui-nav a,.yui-skin-sam .yui-navset-bottom .yui-nav .selected a,.yui-skin-sam .yui-navset-bottom .yui-nav a:hover{background-image:none;}.yui-skin-sam .yui-navset-left .yui-content{border:1px solid #808080;border-left-color:#243356;}.yui-skin-sam .yui-navset-bottom .yui-nav,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav{border-width:5px 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav .selected,.yui-skin-sam .yui-navset-bottom .yui-nav .selected{margin:-1px .16em 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li,.yui-skin-sam .yui-navset-bottom .yui-nav li{padding:0 0 1px 0;vertical-align:top;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav a em,.yui-skin-sam .yui-navset-bottom .yui-nav a em{border-width:0 0 1px;top:auto;bottom:-1px;} -.yui-skin-sam .yui-navset-bottom .yui-content,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-content{border:1px solid #808080;border-bottom-color:#243356;} +.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{margin:0 .5em 0 0}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{margin:0 0 .5em}.yui-navset .yui-content .yui-hidden{border:0;height:0;width:0;padding:0;position:absolute;left:-999999px;overflow:hidden;visibility:hidden}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{width:6em}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{width:auto}.yui-navset .yui-navset-left,.yui-navset-left{padding:0 0 0 6em}.yui-navset-right{padding:0 6em 0 0}.yui-navset-top,.yui-navset-bottom{padding:auto}.yui-nav,.yui-nav li{margin:0;padding:0;list-style:none}.yui-navset li em{font-style:normal}.yui-navset{position:relative;zoom:1}.yui-navset .yui-content,.yui-navset .yui-content div{zoom:1}.yui-navset .yui-content:after{content:'';display:block;clear:both}.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{display:inline-block;display:-moz-inline-stack;*display:inline;vertical-align:bottom;cursor:pointer;zoom:1}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{display:block}.yui-navset .yui-nav a{position:relative}.yui-navset .yui-nav li a,.yui-navset-top .yui-nav li a,.yui-navset-bottom .yui-nav li a{display:block;display:inline-block;vertical-align:bottom;zoom:1}.yui-navset-left .yui-nav li a,.yui-navset-right .yui-nav li a{display:block}.yui-navset-bottom .yui-nav li a{vertical-align:text-top}.yui-navset .yui-nav li a em,.yui-navset-top .yui-nav li a em,.yui-navset-bottom .yui-nav li a em{display:block}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{position:absolute;z-index:1}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{position:static}.yui-navset .yui-navset-left .yui-nav,.yui-navset-left .yui-nav{left:0;right:auto}.yui-navset .yui-navset-right .yui-nav,.yui-navset-right .yui-nav{right:0;left:auto}.yui-skin-sam .yui-navset .yui-nav,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav{border:solid #2647a0;border-width:0 0 5px;zoom:1}.yui-skin-sam .yui-navset .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav li{margin:0 .16em 0 0;padding:1px 0 0;zoom:1}.yui-skin-sam .yui-navset .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav .selected{margin:0 .16em -1px 0}.yui-skin-sam .yui-navset .yui-nav a,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a{background:#d8d8d8 url(sprite.png) repeat-x;border:solid #a3a3a3;border-width:0 1px;color:#000;position:relative;text-decoration:none}.yui-skin-sam .yui-navset .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a em{border:solid #a3a3a3;border-width:1px 0 0;padding:.25em .75em;left:0;right:0;bottom:0;top:-1px;position:relative}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a:focus,.yui-skin-sam .yui-navset .yui-nav .selected a:hover{background:#2647a0 url(sprite.png) repeat-x left -1400px;color:#fff}.yui-skin-sam .yui-navset .yui-nav a:hover,.yui-skin-sam .yui-navset .yui-nav a:focus{background:#bfdaff url(sprite.png) repeat-x left -1300px;outline:0}.yui-skin-sam .yui-navset .yui-nav .selected a em{padding:.35em .75em}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a em{border-color:#243356}.yui-skin-sam .yui-navset .yui-content{background:#edf5ff}.yui-skin-sam .yui-navset .yui-content,.yui-skin-sam .yui-navset .yui-navset-top .yui-content{border:1px solid #808080;border-top-color:#243356;padding:.25em .5em}.yui-skin-sam .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 5px 0 0;Xposition:absolute;top:0;bottom:0}.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 0 0 5px}.yui-skin-sam .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset-right .yui-nav li{margin:0 0 .16em;padding:0 0 0 1px}.yui-skin-sam .yui-navset-right .yui-nav li{padding:0 1px 0 0}.yui-skin-sam .yui-navset-left .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav .selected{margin:0 -1px .16em 0}.yui-skin-sam .yui-navset-right .yui-nav .selected{margin:0 0 .16em -1px}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav a{border-width:1px 0}.yui-skin-sam .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 0 0 1px;padding:.2em .75em;top:auto;left:-1px}.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 1px 0 0;left:auto;right:-1px}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-left .yui-nav .selected a,.yui-skin-sam .yui-navset-left .yui-nav a:hover,.yui-skin-sam .yui-navset-right .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav .selected a,.yui-skin-sam .yui-navset-right .yui-nav a:hover,.yui-skin-sam .yui-navset-bottom .yui-nav a,.yui-skin-sam .yui-navset-bottom .yui-nav .selected a,.yui-skin-sam .yui-navset-bottom .yui-nav a:hover{background-image:none}.yui-skin-sam .yui-navset-left .yui-content{border:1px solid #808080;border-left-color:#243356}.yui-skin-sam .yui-navset-bottom .yui-nav,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav{border-width:5px 0 0}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav .selected,.yui-skin-sam .yui-navset-bottom .yui-nav .selected{margin:-1px .16em 0 0}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li,.yui-skin-sam .yui-navset-bottom .yui-nav li{padding:0 0 1px 0;vertical-align:top}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav a em,.yui-skin-sam .yui-navset-bottom .yui-nav a em{border-width:0 0 1px;top:auto;bottom:-1px} +.yui-skin-sam .yui-navset-bottom .yui-content,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-content{border:1px solid #808080;border-bottom-color:#243356} diff --git a/include/javascript/yui/build/assets/skins/sam/treeview.css b/include/javascript/yui/build/assets/skins/sam/treeview.css index 3843d4bd..8fa8da8c 100644 --- a/include/javascript/yui/build/assets/skins/sam/treeview.css +++ b/include/javascript/yui/build/assets/skins/sam/treeview.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -table.ygtvtable{margin-bottom:0;border:none;border-collapse:collapse;}td.ygtvcell{border:none;padding:0;}a.ygtvspacer{text-decoration:none;outline-style:none;display:block;}.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;cursor:pointer;}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat;}.ygtvtmh,.ygtvtmhh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4800px no-repeat;}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -6400px no-repeat;}.ygtvtph,.ygtvtphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -7200px no-repeat;}.ygtvln{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -1600px no-repeat;cursor:pointer;}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0 no-repeat;}.ygtvlmh,.ygtvlmhh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -800px no-repeat;}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -2400px no-repeat;}.ygtvlph,.ygtvlphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px no-repeat;cursor:pointer;}.ygtvloading{width:18px;height:22px;background:url(treeview-loading.gif) 0 0 no-repeat;}.ygtvdepthcell{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8000px no-repeat;}.ygtvblankdepthcell{width:18px;height:22px;}* html .ygtvchildren{height:2%;}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;cursor:pointer;}.ygtvcontent{cursor:default;}.ygtvspacer{height:22px;width:18px;}.ygtvfocus{background-color:#c0e0e0;border:none;}.ygtvfocus .ygtvlabel,.ygtvfocus .ygtvlabel:link,.ygtvfocus .ygtvlabel:visited,.ygtvfocus .ygtvlabel:hover{background-color:#c0e0e0;}.ygtvfocus a{outline-style:none;}.ygtvok{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8800px no-repeat;}.ygtvok:hover{background:url(treeview-sprite.gif) 0 -8844px no-repeat;}.ygtvcancel{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8822px no-repeat;}.ygtvcancel:hover{background:url(treeview-sprite.gif) 0 -8866px no-repeat;}.ygtv-label-editor{background-color:#f2f2f2;border:1px solid silver;position:absolute;display:none;overflow:hidden;margin:auto;z-index:9000;}.ygtv-edit-TextNode{width:190px;}.ygtv-edit-TextNode .ygtvcancel,.ygtv-edit-TextNode .ygtvok{border:none;}.ygtv-edit-TextNode .ygtv-button-container{float:right;}.ygtv-edit-TextNode .ygtv-input input{width:140px;}.ygtv-edit-DateNode .ygtvcancel{border:none;}.ygtv-edit-DateNode .ygtvok{display:none;}.ygtv-edit-DateNode .ygtv-button-container{text-align:right;margin:auto;}.ygtv-highlight .ygtv-highlight1,.ygtv-highlight .ygtv-highlight1 .ygtvlabel{background-color:blue;color:white;}.ygtv-highlight .ygtv-highlight2,.ygtv-highlight .ygtv-highlight2 .ygtvlabel{background-color:silver;}.ygtv-highlight .ygtv-highlight0 .ygtvfocus .ygtvlabel,.ygtv-highlight .ygtv-highlight1 .ygtvfocus .ygtvlabel,.ygtv-highlight .ygtv-highlight2 .ygtvfocus .ygtvlabel{background-color:#c0e0e0;}.ygtv-highlight .ygtvcontent{padding-right:1em;}.ygtv-checkbox .ygtv-highlight0 .ygtvcontent{padding-left:1em;background:url(check0.gif) no-repeat;}.ygtv-checkbox .ygtv-highlight0 .ygtvfocus.ygtvcontent,.ygtv-checkbox .ygtv-highlight1 .ygtvfocus.ygtvcontent,.ygtv-checkbox .ygtv-highlight2 .ygtvfocus.ygtvcontent{background-color:#c0e0e0;}.ygtv-checkbox .ygtv-highlight1 .ygtvcontent{padding-left:1em;background:url(check1.gif) no-repeat;}.ygtv-checkbox .ygtv-highlight2 .ygtvcontent{padding-left:1em;background:url(check2.gif) no-repeat;} +table.ygtvtable{margin-bottom:0;border:0;border-collapse:collapse}td.ygtvcell{border:0;padding:0}a.ygtvspacer{text-decoration:none;outline-style:none;display:block}.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;cursor:pointer}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat}.ygtvtmh,.ygtvtmhh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4800px no-repeat}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -6400px no-repeat}.ygtvtph,.ygtvtphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -7200px no-repeat}.ygtvln{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -1600px no-repeat;cursor:pointer}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0 no-repeat}.ygtvlmh,.ygtvlmhh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -800px no-repeat}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -2400px no-repeat}.ygtvlph,.ygtvlphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px no-repeat;cursor:pointer}.ygtvloading{width:18px;height:22px;background:url(treeview-loading.gif) 0 0 no-repeat}.ygtvdepthcell{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8000px no-repeat}.ygtvblankdepthcell{width:18px;height:22px}* html .ygtvchildren{height:2%}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;cursor:pointer}.ygtvcontent{cursor:default}.ygtvspacer{height:22px;width:18px}.ygtvfocus{background-color:#c0e0e0;border:0}.ygtvfocus .ygtvlabel,.ygtvfocus .ygtvlabel:link,.ygtvfocus .ygtvlabel:visited,.ygtvfocus .ygtvlabel:hover{background-color:#c0e0e0}.ygtvfocus a{outline-style:none}.ygtvok{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8800px no-repeat}.ygtvok:hover{background:url(treeview-sprite.gif) 0 -8844px no-repeat}.ygtvcancel{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8822px no-repeat}.ygtvcancel:hover{background:url(treeview-sprite.gif) 0 -8866px no-repeat}.ygtv-label-editor{background-color:#f2f2f2;border:1px solid silver;position:absolute;display:none;overflow:hidden;margin:auto;z-index:9000}.ygtv-edit-TextNode{width:190px}.ygtv-edit-TextNode .ygtvcancel,.ygtv-edit-TextNode .ygtvok{border:0}.ygtv-edit-TextNode .ygtv-button-container{float:right}.ygtv-edit-TextNode .ygtv-input input{width:140px}.ygtv-edit-DateNode .ygtvcancel{border:0}.ygtv-edit-DateNode .ygtvok{display:none}.ygtv-edit-DateNode .ygtv-button-container{text-align:right;margin:auto}.ygtv-highlight .ygtv-highlight1,.ygtv-highlight .ygtv-highlight1 .ygtvlabel{background-color:blue;color:white}.ygtv-highlight .ygtv-highlight2,.ygtv-highlight .ygtv-highlight2 .ygtvlabel{background-color:silver}.ygtv-highlight .ygtv-highlight0 .ygtvfocus .ygtvlabel,.ygtv-highlight .ygtv-highlight1 .ygtvfocus .ygtvlabel,.ygtv-highlight .ygtv-highlight2 .ygtvfocus .ygtvlabel{background-color:#c0e0e0}.ygtv-highlight .ygtvcontent{padding-right:1em}.ygtv-checkbox .ygtv-highlight0 .ygtvcontent{padding-left:1em;background:url(check0.gif) no-repeat}.ygtv-checkbox .ygtv-highlight0 .ygtvfocus.ygtvcontent,.ygtv-checkbox .ygtv-highlight1 .ygtvfocus.ygtvcontent,.ygtv-checkbox .ygtv-highlight2 .ygtvfocus.ygtvcontent{background-color:#c0e0e0}.ygtv-checkbox .ygtv-highlight1 .ygtvcontent{padding-left:1em;background:url(check1.gif) no-repeat}.ygtv-checkbox .ygtv-highlight2 .ygtvcontent{padding-left:1em;background:url(check2.gif) no-repeat} diff --git a/include/javascript/yui/build/assets/skins/sam/yuitest.css b/include/javascript/yui/build/assets/skins/sam/yuitest.css index 35183cd0..7cfa36b3 100644 --- a/include/javascript/yui/build/assets/skins/sam/yuitest.css +++ b/include/javascript/yui/build/assets/skins/sam/yuitest.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ diff --git a/include/javascript/yui/build/autocomplete/assets/autocomplete-core.css b/include/javascript/yui/build/autocomplete/assets/autocomplete-core.css index 8143532d..80039fe1 100644 --- a/include/javascript/yui/build/autocomplete/assets/autocomplete-core.css +++ b/include/javascript/yui/build/autocomplete/assets/autocomplete-core.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ /* This file intentionally left blank */ diff --git a/include/javascript/yui/build/autocomplete/assets/skins/sam/autocomplete-skin.css b/include/javascript/yui/build/autocomplete/assets/skins/sam/autocomplete-skin.css index 805530e8..dea17872 100644 --- a/include/javascript/yui/build/autocomplete/assets/skins/sam/autocomplete-skin.css +++ b/include/javascript/yui/build/autocomplete/assets/skins/sam/autocomplete-skin.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ /* styles for entire widget */ .yui-skin-sam .yui-ac { diff --git a/include/javascript/yui/build/autocomplete/assets/skins/sam/autocomplete.css b/include/javascript/yui/build/autocomplete/assets/skins/sam/autocomplete.css index 07fc0302..54541c5d 100644 --- a/include/javascript/yui/build/autocomplete/assets/skins/sam/autocomplete.css +++ b/include/javascript/yui/build/autocomplete/assets/skins/sam/autocomplete.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -.yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%;}.yui-skin-sam .yui-ac-input{position:absolute;width:100%;}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%;}.yui-skin-sam .yui-ac-content{position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050;}.yui-skin-sam .yui-ac-shadow{position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity:.10;opacity:.10;filter:alpha(opacity=10);z-index:9049;}.yui-skin-sam .yui-ac iframe{opacity:0;filter:alpha(opacity=0);padding-right:.3em;padding-bottom:.3em;}.yui-skin-sam .yui-ac-content ul{margin:0;padding:0;width:100%;}.yui-skin-sam .yui-ac-content li{margin:0;padding:2px 5px;cursor:default;white-space:nowrap;list-style:none;zoom:1;}.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight{background:#B3D4FF;}.yui-skin-sam .yui-ac-content li.yui-ac-highlight{background:#426FD9;color:#FFF;} +.yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%}.yui-skin-sam .yui-ac-input{position:absolute;width:100%}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%}.yui-skin-sam .yui-ac-content{position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050}.yui-skin-sam .yui-ac-shadow{position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity:.10;opacity:.10;filter:alpha(opacity=10);z-index:9049}.yui-skin-sam .yui-ac iframe{opacity:0;filter:alpha(opacity=0);padding-right:.3em;padding-bottom:.3em}.yui-skin-sam .yui-ac-content ul{margin:0;padding:0;width:100%}.yui-skin-sam .yui-ac-content li{margin:0;padding:2px 5px;cursor:default;white-space:nowrap;list-style:none;zoom:1}.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight{background:#b3d4ff}.yui-skin-sam .yui-ac-content li.yui-ac-highlight{background:#426fd9;color:#FFF} diff --git a/include/javascript/yui/build/autocomplete/autocomplete-min.js b/include/javascript/yui/build/autocomplete/autocomplete-min.js index 0737f4a8..5a588b8b 100644 --- a/include/javascript/yui/build/autocomplete/autocomplete-min.js +++ b/include/javascript/yui/build/autocomplete/autocomplete-min.js @@ -1,12 +1,12 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -YAHOO.widget.DS_JSArray=YAHOO.util.LocalDataSource;YAHOO.widget.DS_JSFunction=YAHOO.util.FunctionDataSource;YAHOO.widget.DS_XHR=function(B,A,D){var C=new YAHOO.util.XHRDataSource(B,D);C._aDeprecatedSchema=A;return C;};YAHOO.widget.DS_ScriptNode=function(B,A,D){var C=new YAHOO.util.ScriptNodeDataSource(B,D);C._aDeprecatedSchema=A;return C;};YAHOO.widget.DS_XHR.TYPE_JSON=YAHOO.util.DataSourceBase.TYPE_JSON;YAHOO.widget.DS_XHR.TYPE_XML=YAHOO.util.DataSourceBase.TYPE_XML;YAHOO.widget.DS_XHR.TYPE_FLAT=YAHOO.util.DataSourceBase.TYPE_TEXT;YAHOO.widget.AutoComplete=function(G,B,J,C){if(G&&B&&J){if(J&&YAHOO.lang.isFunction(J.sendRequest)){this.dataSource=J;}else{return;}this.key=0;var D=J.responseSchema;if(J._aDeprecatedSchema){var K=J._aDeprecatedSchema;if(YAHOO.lang.isArray(K)){if((J.responseType===YAHOO.util.DataSourceBase.TYPE_JSON)||(J.responseType===YAHOO.util.DataSourceBase.TYPE_UNKNOWN)){D.resultsList=K[0];this.key=K[1];D.fields=(K.length<3)?null:K.slice(1);}else{if(J.responseType===YAHOO.util.DataSourceBase.TYPE_XML){D.resultNode=K[0];this.key=K[1];D.fields=K.slice(1);}else{if(J.responseType===YAHOO.util.DataSourceBase.TYPE_TEXT){D.recordDelim=K[0];D.fieldDelim=K[1];}}}J.responseSchema=D;}}if(YAHOO.util.Dom.inDocument(G)){if(YAHOO.lang.isString(G)){this._sName="instance"+YAHOO.widget.AutoComplete._nIndex+" "+G;this._elTextbox=document.getElementById(G);}else{this._sName=(G.id)?"instance"+YAHOO.widget.AutoComplete._nIndex+" "+G.id:"instance"+YAHOO.widget.AutoComplete._nIndex;this._elTextbox=G;}YAHOO.util.Dom.addClass(this._elTextbox,"yui-ac-input");}else{return;}if(YAHOO.util.Dom.inDocument(B)){if(YAHOO.lang.isString(B)){this._elContainer=document.getElementById(B);}else{this._elContainer=B;}if(this._elContainer.style.display=="none"){}var E=this._elContainer.parentNode;var A=E.tagName.toLowerCase();if(A=="div"){YAHOO.util.Dom.addClass(E,"yui-ac");}else{}}else{return;}if(this.dataSource.dataType===YAHOO.util.DataSourceBase.TYPE_LOCAL){this.applyLocalFilter=true;}if(C&&(C.constructor==Object)){for(var I in C){if(I){this[I]=C[I];}}}this._initContainerEl();this._initProps();this._initListEl();this._initContainerHelperEls();var H=this;var F=this._elTextbox;YAHOO.util.Event.addListener(F,"keyup",H._onTextboxKeyUp,H);YAHOO.util.Event.addListener(F,"keydown",H._onTextboxKeyDown,H);YAHOO.util.Event.addListener(F,"focus",H._onTextboxFocus,H);YAHOO.util.Event.addListener(F,"blur",H._onTextboxBlur,H);YAHOO.util.Event.addListener(B,"mouseover",H._onContainerMouseover,H);YAHOO.util.Event.addListener(B,"mouseout",H._onContainerMouseout,H);YAHOO.util.Event.addListener(B,"click",H._onContainerClick,H);YAHOO.util.Event.addListener(B,"scroll",H._onContainerScroll,H);YAHOO.util.Event.addListener(B,"resize",H._onContainerResize,H);YAHOO.util.Event.addListener(F,"keypress",H._onTextboxKeyPress,H);YAHOO.util.Event.addListener(window,"unload",H._onWindowUnload,H);this.textboxFocusEvent=new YAHOO.util.CustomEvent("textboxFocus",this);this.textboxKeyEvent=new YAHOO.util.CustomEvent("textboxKey",this);this.dataRequestEvent=new YAHOO.util.CustomEvent("dataRequest",this);this.dataReturnEvent=new YAHOO.util.CustomEvent("dataReturn",this);this.dataErrorEvent=new YAHOO.util.CustomEvent("dataError",this);this.containerPopulateEvent=new YAHOO.util.CustomEvent("containerPopulate",this);this.containerExpandEvent=new YAHOO.util.CustomEvent("containerExpand",this);this.typeAheadEvent=new YAHOO.util.CustomEvent("typeAhead",this);this.itemMouseOverEvent=new YAHOO.util.CustomEvent("itemMouseOver",this);this.itemMouseOutEvent=new YAHOO.util.CustomEvent("itemMouseOut",this);this.itemArrowToEvent=new YAHOO.util.CustomEvent("itemArrowTo",this);this.itemArrowFromEvent=new YAHOO.util.CustomEvent("itemArrowFrom",this);this.itemSelectEvent=new YAHOO.util.CustomEvent("itemSelect",this);this.unmatchedItemSelectEvent=new YAHOO.util.CustomEvent("unmatchedItemSelect",this);this.selectionEnforceEvent=new YAHOO.util.CustomEvent("selectionEnforce",this);this.containerCollapseEvent=new YAHOO.util.CustomEvent("containerCollapse",this);this.textboxBlurEvent=new YAHOO.util.CustomEvent("textboxBlur",this);this.textboxChangeEvent=new YAHOO.util.CustomEvent("textboxChange",this);F.setAttribute("autocomplete","off");YAHOO.widget.AutoComplete._nIndex++;}else{}};YAHOO.widget.AutoComplete.prototype.dataSource=null;YAHOO.widget.AutoComplete.prototype.applyLocalFilter=null;YAHOO.widget.AutoComplete.prototype.queryMatchCase=false;YAHOO.widget.AutoComplete.prototype.queryMatchContains=false;YAHOO.widget.AutoComplete.prototype.queryMatchSubset=false;YAHOO.widget.AutoComplete.prototype.minQueryLength=1;YAHOO.widget.AutoComplete.prototype.maxResultsDisplayed=10;YAHOO.widget.AutoComplete.prototype.queryDelay=0.2;YAHOO.widget.AutoComplete.prototype.typeAheadDelay=0.5;YAHOO.widget.AutoComplete.prototype.queryInterval=500;YAHOO.widget.AutoComplete.prototype.highlightClassName="yui-ac-highlight";YAHOO.widget.AutoComplete.prototype.prehighlightClassName=null;YAHOO.widget.AutoComplete.prototype.delimChar=null;YAHOO.widget.AutoComplete.prototype.autoHighlight=true;YAHOO.widget.AutoComplete.prototype.typeAhead=false;YAHOO.widget.AutoComplete.prototype.animHoriz=false;YAHOO.widget.AutoComplete.prototype.animVert=true;YAHOO.widget.AutoComplete.prototype.animSpeed=0.3;YAHOO.widget.AutoComplete.prototype.forceSelection=false;YAHOO.widget.AutoComplete.prototype.allowBrowserAutocomplete=true;YAHOO.widget.AutoComplete.prototype.alwaysShowContainer=false;YAHOO.widget.AutoComplete.prototype.useIFrame=false;YAHOO.widget.AutoComplete.prototype.useShadow=false;YAHOO.widget.AutoComplete.prototype.suppressInputUpdate=false;YAHOO.widget.AutoComplete.prototype.resultTypeList=true;YAHOO.widget.AutoComplete.prototype.queryQuestionMark=true;YAHOO.widget.AutoComplete.prototype.autoSnapContainer=true;YAHOO.widget.AutoComplete.prototype.toString=function(){return"AutoComplete "+this._sName;};YAHOO.widget.AutoComplete.prototype.getInputEl=function(){return this._elTextbox;};YAHOO.widget.AutoComplete.prototype.getContainerEl=function(){return this._elContainer; -};YAHOO.widget.AutoComplete.prototype.isFocused=function(){return this._bFocused;};YAHOO.widget.AutoComplete.prototype.isContainerOpen=function(){return this._bContainerOpen;};YAHOO.widget.AutoComplete.prototype.getListEl=function(){return this._elList;};YAHOO.widget.AutoComplete.prototype.getListItemMatch=function(A){if(A._sResultMatch){return A._sResultMatch;}else{return null;}};YAHOO.widget.AutoComplete.prototype.getListItemData=function(A){if(A._oResultData){return A._oResultData;}else{return null;}};YAHOO.widget.AutoComplete.prototype.getListItemIndex=function(A){if(YAHOO.lang.isNumber(A._nItemIndex)){return A._nItemIndex;}else{return null;}};YAHOO.widget.AutoComplete.prototype.setHeader=function(B){if(this._elHeader){var A=this._elHeader;if(B){A.innerHTML=B;A.style.display="";}else{A.innerHTML="";A.style.display="none";}}};YAHOO.widget.AutoComplete.prototype.setFooter=function(B){if(this._elFooter){var A=this._elFooter;if(B){A.innerHTML=B;A.style.display="";}else{A.innerHTML="";A.style.display="none";}}};YAHOO.widget.AutoComplete.prototype.setBody=function(A){if(this._elBody){var B=this._elBody;YAHOO.util.Event.purgeElement(B,true);if(A){B.innerHTML=A;B.style.display="";}else{B.innerHTML="";B.style.display="none";}this._elList=null;}};YAHOO.widget.AutoComplete.prototype.generateRequest=function(B){var A=this.dataSource.dataType;if(A===YAHOO.util.DataSourceBase.TYPE_XHR){if(!this.dataSource.connMethodPost){B=(this.queryQuestionMark?"?":"")+(this.dataSource.scriptQueryParam||"query")+"="+B+(this.dataSource.scriptQueryAppend?("&"+this.dataSource.scriptQueryAppend):"");}else{B=(this.dataSource.scriptQueryParam||"query")+"="+B+(this.dataSource.scriptQueryAppend?("&"+this.dataSource.scriptQueryAppend):"");}}else{if(A===YAHOO.util.DataSourceBase.TYPE_SCRIPTNODE){B="&"+(this.dataSource.scriptQueryParam||"query")+"="+B+(this.dataSource.scriptQueryAppend?("&"+this.dataSource.scriptQueryAppend):"");}}return B;};YAHOO.widget.AutoComplete.prototype.sendQuery=function(B){this._bFocused=true;var A=(this.delimChar)?this._elTextbox.value+B:B;this._sendQuery(A);};YAHOO.widget.AutoComplete.prototype.snapContainer=function(){var A=this._elTextbox,B=YAHOO.util.Dom.getXY(A);B[1]+=YAHOO.util.Dom.get(A).offsetHeight+2;YAHOO.util.Dom.setXY(this._elContainer,B);};YAHOO.widget.AutoComplete.prototype.expandContainer=function(){this._toggleContainer(true);};YAHOO.widget.AutoComplete.prototype.collapseContainer=function(){this._toggleContainer(false);};YAHOO.widget.AutoComplete.prototype.clearList=function(){var B=this._elList.childNodes,A=B.length-1;for(;A>-1;A--){B[A].style.display="none";}};YAHOO.widget.AutoComplete.prototype.getSubsetMatches=function(E){var D,C,A;for(var B=E.length;B>=this.minQueryLength;B--){A=this.generateRequest(E.substr(0,B));this.dataRequestEvent.fire(this,D,A);C=this.dataSource.getCachedResponse(A);if(C){return this.filterResults.apply(this.dataSource,[E,C,C,{scope:this}]);}}return null;};YAHOO.widget.AutoComplete.prototype.preparseRawResponse=function(C,B,A){var D=((this.responseStripAfter!=="")&&(B.indexOf))?B.indexOf(this.responseStripAfter):-1;if(D!=-1){B=B.substring(0,D);}return B;};YAHOO.widget.AutoComplete.prototype.filterResults=function(K,M,Q,L){if(L&&L.argument&&L.argument.query){K=L.argument.query;}if(K&&K!==""){Q=YAHOO.widget.AutoComplete._cloneObject(Q);var I=L.scope,P=this,C=Q.results,N=[],B=I.maxResultsDisplayed,J=(P.queryMatchCase||I.queryMatchCase),A=(P.queryMatchContains||I.queryMatchContains);for(var D=0,H=C.length;D-1))){N.push(F);}}if(H>B&&N.length===B){break;}}Q.results=N;}else{}return Q;};YAHOO.widget.AutoComplete.prototype.handleResponse=function(C,A,B){if((this instanceof YAHOO.widget.AutoComplete)&&this._sName){this._populateList(C,A,B);}};YAHOO.widget.AutoComplete.prototype.doBeforeLoadData=function(C,A,B){return true;};YAHOO.widget.AutoComplete.prototype.formatResult=function(B,D,A){var C=(A)?A:"";return C;};YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer=function(D,A,C,B){return true;};YAHOO.widget.AutoComplete.prototype.destroy=function(){var B=this.toString();var A=this._elTextbox;var D=this._elContainer;this.textboxFocusEvent.unsubscribeAll();this.textboxKeyEvent.unsubscribeAll();this.dataRequestEvent.unsubscribeAll();this.dataReturnEvent.unsubscribeAll();this.dataErrorEvent.unsubscribeAll();this.containerPopulateEvent.unsubscribeAll();this.containerExpandEvent.unsubscribeAll();this.typeAheadEvent.unsubscribeAll();this.itemMouseOverEvent.unsubscribeAll();this.itemMouseOutEvent.unsubscribeAll();this.itemArrowToEvent.unsubscribeAll();this.itemArrowFromEvent.unsubscribeAll();this.itemSelectEvent.unsubscribeAll();this.unmatchedItemSelectEvent.unsubscribeAll();this.selectionEnforceEvent.unsubscribeAll();this.containerCollapseEvent.unsubscribeAll();this.textboxBlurEvent.unsubscribeAll();this.textboxChangeEvent.unsubscribeAll();YAHOO.util.Event.purgeElement(A,true);YAHOO.util.Event.purgeElement(D,true);D.innerHTML="";for(var C in this){if(YAHOO.lang.hasOwnProperty(this,C)){this[C]=null;}}};YAHOO.widget.AutoComplete.prototype.textboxFocusEvent=null;YAHOO.widget.AutoComplete.prototype.textboxKeyEvent=null;YAHOO.widget.AutoComplete.prototype.dataRequestEvent=null;YAHOO.widget.AutoComplete.prototype.dataReturnEvent=null;YAHOO.widget.AutoComplete.prototype.dataErrorEvent=null;YAHOO.widget.AutoComplete.prototype.containerPopulateEvent=null;YAHOO.widget.AutoComplete.prototype.containerExpandEvent=null;YAHOO.widget.AutoComplete.prototype.typeAheadEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOverEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOutEvent=null; -YAHOO.widget.AutoComplete.prototype.itemArrowToEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowFromEvent=null;YAHOO.widget.AutoComplete.prototype.itemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.selectionEnforceEvent=null;YAHOO.widget.AutoComplete.prototype.containerCollapseEvent=null;YAHOO.widget.AutoComplete.prototype.textboxBlurEvent=null;YAHOO.widget.AutoComplete.prototype.textboxChangeEvent=null;YAHOO.widget.AutoComplete._nIndex=0;YAHOO.widget.AutoComplete.prototype._sName=null;YAHOO.widget.AutoComplete.prototype._elTextbox=null;YAHOO.widget.AutoComplete.prototype._elContainer=null;YAHOO.widget.AutoComplete.prototype._elContent=null;YAHOO.widget.AutoComplete.prototype._elHeader=null;YAHOO.widget.AutoComplete.prototype._elBody=null;YAHOO.widget.AutoComplete.prototype._elFooter=null;YAHOO.widget.AutoComplete.prototype._elShadow=null;YAHOO.widget.AutoComplete.prototype._elIFrame=null;YAHOO.widget.AutoComplete.prototype._bFocused=false;YAHOO.widget.AutoComplete.prototype._oAnim=null;YAHOO.widget.AutoComplete.prototype._bContainerOpen=false;YAHOO.widget.AutoComplete.prototype._bOverContainer=false;YAHOO.widget.AutoComplete.prototype._elList=null;YAHOO.widget.AutoComplete.prototype._nDisplayedItems=0;YAHOO.widget.AutoComplete.prototype._sCurQuery=null;YAHOO.widget.AutoComplete.prototype._sPastSelections="";YAHOO.widget.AutoComplete.prototype._sInitInputValue=null;YAHOO.widget.AutoComplete.prototype._elCurListItem=null;YAHOO.widget.AutoComplete.prototype._elCurPrehighlightItem=null;YAHOO.widget.AutoComplete.prototype._bItemSelected=false;YAHOO.widget.AutoComplete.prototype._nKeyCode=null;YAHOO.widget.AutoComplete.prototype._nDelayID=-1;YAHOO.widget.AutoComplete.prototype._nTypeAheadDelayID=-1;YAHOO.widget.AutoComplete.prototype._iFrameSrc="javascript:false;";YAHOO.widget.AutoComplete.prototype._queryInterval=null;YAHOO.widget.AutoComplete.prototype._sLastTextboxValue=null;YAHOO.widget.AutoComplete.prototype._initProps=function(){var B=this.minQueryLength;if(!YAHOO.lang.isNumber(B)){this.minQueryLength=1;}var E=this.maxResultsDisplayed;if(!YAHOO.lang.isNumber(E)||(E<1)){this.maxResultsDisplayed=10;}var F=this.queryDelay;if(!YAHOO.lang.isNumber(F)||(F<0)){this.queryDelay=0.2;}var C=this.typeAheadDelay;if(!YAHOO.lang.isNumber(C)||(C<0)){this.typeAheadDelay=0.2;}var A=this.delimChar;if(YAHOO.lang.isString(A)&&(A.length>0)){this.delimChar=[A];}else{if(!YAHOO.lang.isArray(A)){this.delimChar=null;}}var D=this.animSpeed;if((this.animHoriz||this.animVert)&&YAHOO.util.Anim){if(!YAHOO.lang.isNumber(D)||(D<0)){this.animSpeed=0.3;}if(!this._oAnim){this._oAnim=new YAHOO.util.Anim(this._elContent,{},this.animSpeed);}else{this._oAnim.duration=this.animSpeed;}}if(this.forceSelection&&A){}};YAHOO.widget.AutoComplete.prototype._initContainerHelperEls=function(){if(this.useShadow&&!this._elShadow){var A=document.createElement("div");A.className="yui-ac-shadow";A.style.width=0;A.style.height=0;this._elShadow=this._elContainer.appendChild(A);}if(this.useIFrame&&!this._elIFrame){var B=document.createElement("iframe");B.src=this._iFrameSrc;B.frameBorder=0;B.scrolling="no";B.style.position="absolute";B.style.width=0;B.style.height=0;B.style.padding=0;B.tabIndex=-1;B.role="presentation";B.title="Presentational iframe shim";this._elIFrame=this._elContainer.appendChild(B);}};YAHOO.widget.AutoComplete.prototype._initContainerEl=function(){YAHOO.util.Dom.addClass(this._elContainer,"yui-ac-container");if(!this._elContent){var C=document.createElement("div");C.className="yui-ac-content";C.style.display="none";this._elContent=this._elContainer.appendChild(C);var B=document.createElement("div");B.className="yui-ac-hd";B.style.display="none";this._elHeader=this._elContent.appendChild(B);var D=document.createElement("div");D.className="yui-ac-bd";this._elBody=this._elContent.appendChild(D);var A=document.createElement("div");A.className="yui-ac-ft";A.style.display="none";this._elFooter=this._elContent.appendChild(A);}else{}};YAHOO.widget.AutoComplete.prototype._initListEl=function(){var C=this.maxResultsDisplayed,A=this._elList||document.createElement("ul"),B;while(A.childNodes.length=18&&A<=20)||(A==27)||(A>=33&&A<=35)||(A>=36&&A<=40)||(A>=44&&A<=45)||(A==229)){return true;}return false;};YAHOO.widget.AutoComplete.prototype._sendQuery=function(D){if(this.minQueryLength<0){this._toggleContainer(false);return;}if(this.delimChar){var A=this._extractQuery(D);D=A.query;this._sPastSelections=A.previous;}if((D&&(D.length0)){if(this._nDelayID!=-1){clearTimeout(this._nDelayID);}this._toggleContainer(false);return;}D=encodeURIComponent(D);this._nDelayID=-1;if(this.dataSource.queryMatchSubset||this.queryMatchSubset){var C=this.getSubsetMatches(D);if(C){this.handleResponse(D,C,{query:D});return; -}}if(this.dataSource.responseStripAfter){this.dataSource.doBeforeParseData=this.preparseRawResponse;}if(this.applyLocalFilter){this.dataSource.doBeforeCallback=this.filterResults;}var B=this.generateRequest(D);this.dataRequestEvent.fire(this,D,B);this.dataSource.sendRequest(B,{success:this.handleResponse,failure:this.handleResponse,scope:this,argument:{query:D}});};YAHOO.widget.AutoComplete.prototype._populateListItem=function(B,A,C){B.innerHTML=this.formatResult(A,C,B._sResultMatch);};YAHOO.widget.AutoComplete.prototype._populateList=function(K,F,C){if(this._nTypeAheadDelayID!=-1){clearTimeout(this._nTypeAheadDelayID);}K=(C&&C.query)?C.query:K;var H=this.doBeforeLoadData(K,F,C);if(H&&!F.error){this.dataReturnEvent.fire(this,K,F.results);if(this._bFocused){var M=decodeURIComponent(K);this._sCurQuery=M;this._bItemSelected=false;var R=F.results,A=Math.min(R.length,this.maxResultsDisplayed),J=(this.dataSource.responseSchema.fields)?(this.dataSource.responseSchema.fields[0].key||this.dataSource.responseSchema.fields[0]):0;if(A>0){if(!this._elList||(this._elList.childNodes.length=0;Q--){var P=I[Q],E=R[Q];if(this.resultTypeList){var B=[];B[0]=(YAHOO.lang.isString(E))?E:E[J]||E[this.key];var L=this.dataSource.responseSchema.fields;if(YAHOO.lang.isArray(L)&&(L.length>1)){for(var N=1,S=L.length;N=A;O--){G=I[O];G.style.display="none";}}this._nDisplayedItems=A;this.containerPopulateEvent.fire(this,K,R);if(this.autoHighlight){var D=this._elList.firstChild;this._toggleHighlight(D,"to");this.itemArrowToEvent.fire(this,D);this._typeAhead(D,K);}else{this._toggleHighlight(this._elCurListItem,"from");}H=this._doBeforeExpandContainer(this._elTextbox,this._elContainer,K,R);this._toggleContainer(H);}else{this._toggleContainer(false);}return;}}else{this.dataErrorEvent.fire(this,K,F);}};YAHOO.widget.AutoComplete.prototype._doBeforeExpandContainer=function(D,A,C,B){if(this.autoSnapContainer){this.snapContainer();}return this.doBeforeExpandContainer(D,A,C,B);};YAHOO.widget.AutoComplete.prototype._clearSelection=function(){var A=(this.delimChar)?this._extractQuery(this._elTextbox.value):{previous:"",query:this._elTextbox.value};this._elTextbox.value=A.previous;this.selectionEnforceEvent.fire(this,A.query);};YAHOO.widget.AutoComplete.prototype._textMatchesOption=function(){var A=null;for(var B=0;B=0;B--){G=H.lastIndexOf(C[B]);if(G>F){F=G;}}if(C[B]==" "){for(var A=C.length-1;A>=0;A--){if(H[F-1]==C[A]){F--;break;}}}if(F>-1){E=F+1;while(H.charAt(E)==" "){E+=1;}D=H.substring(0,E);H=H.substr(E);}else{D="";}return{previous:D,query:H};};YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers=function(D){var E=this._elContent.offsetWidth+"px";var B=this._elContent.offsetHeight+"px";if(this.useIFrame&&this._elIFrame){var C=this._elIFrame;if(D){C.style.width=E;C.style.height=B;C.style.padding="";}else{C.style.width=0;C.style.height=0;C.style.padding=0;}}if(this.useShadow&&this._elShadow){var A=this._elShadow;if(D){A.style.width=E;A.style.height=B;}else{A.style.width=0;A.style.height=0;}}};YAHOO.widget.AutoComplete.prototype._toggleContainer=function(I){var D=this._elContainer;if(this.alwaysShowContainer&&this._bContainerOpen){return;}if(!I){this._toggleHighlight(this._elCurListItem,"from");this._nDisplayedItems=0;this._sCurQuery=null;if(this._elContent.style.display=="none"){return;}}var A=this._oAnim;if(A&&A.getEl()&&(this.animHoriz||this.animVert)){if(A.isAnimated()){A.stop(true);}var G=this._elContent.cloneNode(true);D.appendChild(G);G.style.top="-9000px";G.style.width="";G.style.height="";G.style.display="";var F=G.offsetWidth;var C=G.offsetHeight;var B=(this.animHoriz)?0:F;var E=(this.animVert)?0:C;A.attributes=(I)?{width:{to:F},height:{to:C}}:{width:{to:B},height:{to:E}};if(I&&!this._bContainerOpen){this._elContent.style.width=B+"px";this._elContent.style.height=E+"px";}else{this._elContent.style.width=F+"px";this._elContent.style.height=C+"px";}D.removeChild(G);G=null;var H=this;var J=function(){A.onComplete.unsubscribeAll();if(I){H._toggleContainerHelpers(true);H._bContainerOpen=I;H.containerExpandEvent.fire(H);}else{H._elContent.style.display="none";H._bContainerOpen=I;H.containerCollapseEvent.fire(H);}};this._toggleContainerHelpers(false);this._elContent.style.display="";A.onComplete.subscribe(J);A.animate();}else{if(I){this._elContent.style.display="";this._toggleContainerHelpers(true);this._bContainerOpen=I;this.containerExpandEvent.fire(this);}else{this._toggleContainerHelpers(false);this._elContent.style.display="none";this._bContainerOpen=I;this.containerCollapseEvent.fire(this);}}};YAHOO.widget.AutoComplete.prototype._toggleHighlight=function(A,C){if(A){var B=this.highlightClassName; -if(this._elCurListItem){YAHOO.util.Dom.removeClass(this._elCurListItem,B);this._elCurListItem=null;}if((C=="to")&&B){YAHOO.util.Dom.addClass(A,B);this._elCurListItem=A;}}};YAHOO.widget.AutoComplete.prototype._togglePrehighlight=function(B,C){var A=this.prehighlightClassName;if(this._elCurPrehighlightItem){YAHOO.util.Dom.removeClass(this._elCurPrehighlightItem,A);}if(B==this._elCurListItem){return;}if((C=="mouseover")&&A){YAHOO.util.Dom.addClass(B,A);this._elCurPrehighlightItem=B;}else{YAHOO.util.Dom.removeClass(B,A);}};YAHOO.widget.AutoComplete.prototype._updateValue=function(C){if(!this.suppressInputUpdate){var F=this._elTextbox;var E=(this.delimChar)?(this.delimChar[0]||this.delimChar):null;var B=C._sResultMatch;var D="";if(E){D=this._sPastSelections;D+=B+E;if(E!=" "){D+=" ";}}else{D=B;}F.value=D;if(F.type=="textarea"){F.scrollTop=F.scrollHeight;}var A=F.value.length;this._selectText(F,A,A);this._elCurListItem=C;}};YAHOO.widget.AutoComplete.prototype._selectItem=function(A){this._bItemSelected=true;this._updateValue(A);this._sPastSelections=this._elTextbox.value;this._clearInterval();this.itemSelectEvent.fire(this,A,A._oResultData);this._toggleContainer(false);};YAHOO.widget.AutoComplete.prototype._jumpSelection=function(){if(this._elCurListItem){this._selectItem(this._elCurListItem);}else{this._toggleContainer(false);}};YAHOO.widget.AutoComplete.prototype._moveSelection=function(G){if(this._bContainerOpen){var H=this._elCurListItem,D=-1;if(H){D=H._nItemIndex;}var E=(G==40)?(D+1):(D-1);if(E<-2||E>=this._nDisplayedItems){return;}if(H){this._toggleHighlight(H,"from");this.itemArrowFromEvent.fire(this,H);}if(E==-1){if(this.delimChar){this._elTextbox.value=this._sPastSelections+this._sCurQuery;}else{this._elTextbox.value=this._sCurQuery;}return;}if(E==-2){this._toggleContainer(false);return;}var F=this._elList.childNodes[E],B=this._elContent,C=YAHOO.util.Dom.getStyle(B,"overflow"),I=YAHOO.util.Dom.getStyle(B,"overflowY"),A=((C=="auto")||(C=="scroll")||(I=="auto")||(I=="scroll"));if(A&&(E>-1)&&(E(B.scrollTop+B.offsetHeight)){B.scrollTop=(F.offsetTop+F.offsetHeight)-B.offsetHeight;}else{if((F.offsetTop+F.offsetHeight)(B.scrollTop+B.offsetHeight)){this._elContent.scrollTop=(F.offsetTop+F.offsetHeight)-B.offsetHeight;}}}}this._toggleHighlight(F,"to");this.itemArrowToEvent.fire(this,F);if(this.typeAhead){this._updateValue(F);}}};YAHOO.widget.AutoComplete.prototype._onContainerMouseover=function(A,C){var D=YAHOO.util.Event.getTarget(A);var B=D.nodeName.toLowerCase();while(D&&(B!="table")){switch(B){case"body":return;case"li":if(C.prehighlightClassName){C._togglePrehighlight(D,"mouseover");}else{C._toggleHighlight(D,"to");}C.itemMouseOverEvent.fire(C,D);break;case"div":if(YAHOO.util.Dom.hasClass(D,"yui-ac-container")){C._bOverContainer=true;return;}break;default:break;}D=D.parentNode;if(D){B=D.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerMouseout=function(A,C){var D=YAHOO.util.Event.getTarget(A);var B=D.nodeName.toLowerCase();while(D&&(B!="table")){switch(B){case"body":return;case"li":if(C.prehighlightClassName){C._togglePrehighlight(D,"mouseout");}else{C._toggleHighlight(D,"from");}C.itemMouseOutEvent.fire(C,D);break;case"ul":C._toggleHighlight(C._elCurListItem,"to");break;case"div":if(YAHOO.util.Dom.hasClass(D,"yui-ac-container")){C._bOverContainer=false;return;}break;default:break;}D=D.parentNode;if(D){B=D.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerClick=function(A,C){var D=YAHOO.util.Event.getTarget(A);var B=D.nodeName.toLowerCase();while(D&&(B!="table")){switch(B){case"body":return;case"li":C._toggleHighlight(D,"to");C._selectItem(D);return;default:break;}D=D.parentNode;if(D){B=D.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerScroll=function(A,B){B._focus();};YAHOO.widget.AutoComplete.prototype._onContainerResize=function(A,B){B._toggleContainerHelpers(B._bContainerOpen);};YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown=function(A,B){var C=A.keyCode;if(B._nTypeAheadDelayID!=-1){clearTimeout(B._nTypeAheadDelayID);}switch(C){case 9:if(!YAHOO.env.ua.opera&&(navigator.userAgent.toLowerCase().indexOf("mac")==-1)||(YAHOO.env.ua.webkit>420)){if(B._elCurListItem){if(B.delimChar&&(B._nKeyCode!=C)){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;case 13:if(!YAHOO.env.ua.opera&&(navigator.userAgent.toLowerCase().indexOf("mac")==-1)||(YAHOO.env.ua.webkit>420)){if(B._elCurListItem){if(B._nKeyCode!=C){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;case 27:B._toggleContainer(false);return;case 39:B._jumpSelection();break;case 38:if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);B._moveSelection(C);}break;case 40:if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);B._moveSelection(C);}break;default:B._bItemSelected=false;B._toggleHighlight(B._elCurListItem,"from");B.textboxKeyEvent.fire(B,C);break;}if(C===18){B._enableIntervalDetection();}B._nKeyCode=C;};YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress=function(A,B){var C=A.keyCode;if(YAHOO.env.ua.opera||(navigator.userAgent.toLowerCase().indexOf("mac")!=-1)&&(YAHOO.env.ua.webkit<420)){switch(C){case 9:if(B._bContainerOpen){if(B.delimChar){YAHOO.util.Event.stopEvent(A);}if(B._elCurListItem){B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;case 13:if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);if(B._elCurListItem){B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;default:break;}}else{if(C==229){B._enableIntervalDetection();}}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp=function(A,C){var B=this.value;C._initProps();var D=A.keyCode;if(C._isIgnoreKey(D)){return; -}if(C._nDelayID!=-1){clearTimeout(C._nDelayID);}C._nDelayID=setTimeout(function(){C._sendQuery(B);},(C.queryDelay*1000));};YAHOO.widget.AutoComplete.prototype._onTextboxFocus=function(A,B){if(!B._bFocused){B._elTextbox.setAttribute("autocomplete","off");B._bFocused=true;B._sInitInputValue=B._elTextbox.value;B.textboxFocusEvent.fire(B);}};YAHOO.widget.AutoComplete.prototype._onTextboxBlur=function(A,C){if(!C._bOverContainer||(C._nKeyCode==9)){if(!C._bItemSelected){var B=C._textMatchesOption();if(!C._bContainerOpen||(C._bContainerOpen&&(B===null))){if(C.forceSelection){C._clearSelection();}else{C.unmatchedItemSelectEvent.fire(C,C._sCurQuery);}}else{if(C.forceSelection){C._selectItem(B);}}}C._clearInterval();C._bFocused=false;if(C._sInitInputValue!==C._elTextbox.value){C.textboxChangeEvent.fire(C);}C.textboxBlurEvent.fire(C);C._toggleContainer(false);}else{C._focus();}};YAHOO.widget.AutoComplete.prototype._onWindowUnload=function(A,B){if(B&&B._elTextbox&&B.allowBrowserAutocomplete){B._elTextbox.setAttribute("autocomplete","on");}};YAHOO.widget.AutoComplete.prototype.doBeforeSendQuery=function(A){return this.generateRequest(A);};YAHOO.widget.AutoComplete.prototype.getListItems=function(){var C=[],B=this._elList.childNodes;for(var A=B.length-1;A>=0;A--){C[A]=B[A];}return C;};YAHOO.widget.AutoComplete._cloneObject=function(D){if(!YAHOO.lang.isValue(D)){return D;}var F={};if(YAHOO.lang.isFunction(D)){F=D;}else{if(YAHOO.lang.isArray(D)){var E=[];for(var C=0,B=D.length;C-1;a--){b[a].style.display="none";}};YAHOO.widget.AutoComplete.prototype.getSubsetMatches=function(e){var d,c,a;for(var b=e.length;b>=this.minQueryLength;b--){a=this.generateRequest(e.substr(0,b));this.dataRequestEvent.fire(this,d,a);c=this.dataSource.getCachedResponse(a);if(c){return this.filterResults.apply(this.dataSource,[e,c,c,{scope:this}]);}}return null;};YAHOO.widget.AutoComplete.prototype.preparseRawResponse=function(c,b,a){var d=((this.responseStripAfter!=="")&&(b.indexOf))?b.indexOf(this.responseStripAfter):-1;if(d!=-1){b=b.substring(0,d);}return b;};YAHOO.widget.AutoComplete.prototype.filterResults=function(l,n,r,m){if(m&&m.argument&&YAHOO.lang.isValue(m.argument.query)){l=m.argument.query;}if(l&&l!==""){r=YAHOO.widget.AutoComplete._cloneObject(r);var j=m.scope,q=this,c=r.results,o=[],b=j.maxResultsDisplayed,k=(q.queryMatchCase||j.queryMatchCase),a=(q.queryMatchContains||j.queryMatchContains);for(var d=0,h=c.length;d-1))){o.push(f);}}if(h>b&&o.length===b){break;}}r.results=o;}else{}return r;};YAHOO.widget.AutoComplete.prototype.handleResponse=function(c,a,b){if((this instanceof YAHOO.widget.AutoComplete)&&this._sName){this._populateList(c,a,b);}};YAHOO.widget.AutoComplete.prototype.doBeforeLoadData=function(c,a,b){return true;};YAHOO.widget.AutoComplete.prototype.formatResult=function(b,d,a){var c=(a)?a:"";return c;};YAHOO.widget.AutoComplete.prototype.formatEscapedResult=function(c,d,b){var a=(b)?b:"";return YAHOO.lang.escapeHTML(a);};YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer=function(d,a,c,b){return true;};YAHOO.widget.AutoComplete.prototype.destroy=function(){var b=this.toString();var a=this._elTextbox;var d=this._elContainer;this.textboxFocusEvent.unsubscribeAll();this.textboxKeyEvent.unsubscribeAll();this.dataRequestEvent.unsubscribeAll();this.dataReturnEvent.unsubscribeAll();this.dataErrorEvent.unsubscribeAll();this.containerPopulateEvent.unsubscribeAll();this.containerExpandEvent.unsubscribeAll();this.typeAheadEvent.unsubscribeAll();this.itemMouseOverEvent.unsubscribeAll();this.itemMouseOutEvent.unsubscribeAll();this.itemArrowToEvent.unsubscribeAll();this.itemArrowFromEvent.unsubscribeAll();this.itemSelectEvent.unsubscribeAll();this.unmatchedItemSelectEvent.unsubscribeAll();this.selectionEnforceEvent.unsubscribeAll();this.containerCollapseEvent.unsubscribeAll();this.textboxBlurEvent.unsubscribeAll();this.textboxChangeEvent.unsubscribeAll();YAHOO.util.Event.purgeElement(a,true);YAHOO.util.Event.purgeElement(d,true);d.innerHTML="";for(var c in this){if(YAHOO.lang.hasOwnProperty(this,c)){this[c]=null;}}};YAHOO.widget.AutoComplete.prototype.textboxFocusEvent=null;YAHOO.widget.AutoComplete.prototype.textboxKeyEvent=null;YAHOO.widget.AutoComplete.prototype.dataRequestEvent=null;YAHOO.widget.AutoComplete.prototype.dataRequestCancelEvent=null;YAHOO.widget.AutoComplete.prototype.dataReturnEvent=null;YAHOO.widget.AutoComplete.prototype.dataErrorEvent=null; +YAHOO.widget.AutoComplete.prototype.containerPopulateEvent=null;YAHOO.widget.AutoComplete.prototype.containerExpandEvent=null;YAHOO.widget.AutoComplete.prototype.typeAheadEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOverEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOutEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowToEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowFromEvent=null;YAHOO.widget.AutoComplete.prototype.itemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.selectionEnforceEvent=null;YAHOO.widget.AutoComplete.prototype.containerCollapseEvent=null;YAHOO.widget.AutoComplete.prototype.textboxBlurEvent=null;YAHOO.widget.AutoComplete.prototype.textboxChangeEvent=null;YAHOO.widget.AutoComplete._nIndex=0;YAHOO.widget.AutoComplete.prototype._sName=null;YAHOO.widget.AutoComplete.prototype._elTextbox=null;YAHOO.widget.AutoComplete.prototype._elContainer=null;YAHOO.widget.AutoComplete.prototype._elContent=null;YAHOO.widget.AutoComplete.prototype._elHeader=null;YAHOO.widget.AutoComplete.prototype._elBody=null;YAHOO.widget.AutoComplete.prototype._elFooter=null;YAHOO.widget.AutoComplete.prototype._elShadow=null;YAHOO.widget.AutoComplete.prototype._elIFrame=null;YAHOO.widget.AutoComplete.prototype._bFocused=false;YAHOO.widget.AutoComplete.prototype._oAnim=null;YAHOO.widget.AutoComplete.prototype._bContainerOpen=false;YAHOO.widget.AutoComplete.prototype._bOverContainer=false;YAHOO.widget.AutoComplete.prototype._elList=null;YAHOO.widget.AutoComplete.prototype._nDisplayedItems=0;YAHOO.widget.AutoComplete.prototype._sCurQuery=null;YAHOO.widget.AutoComplete.prototype._sPastSelections="";YAHOO.widget.AutoComplete.prototype._sInitInputValue=null;YAHOO.widget.AutoComplete.prototype._elCurListItem=null;YAHOO.widget.AutoComplete.prototype._elCurPrehighlightItem=null;YAHOO.widget.AutoComplete.prototype._bItemSelected=false;YAHOO.widget.AutoComplete.prototype._nKeyCode=null;YAHOO.widget.AutoComplete.prototype._nDelayID=-1;YAHOO.widget.AutoComplete.prototype._nTypeAheadDelayID=-1;YAHOO.widget.AutoComplete.prototype._iFrameSrc="javascript:false;";YAHOO.widget.AutoComplete.prototype._queryInterval=null;YAHOO.widget.AutoComplete.prototype._sLastTextboxValue=null;YAHOO.widget.AutoComplete.prototype._initProps=function(){var b=this.minQueryLength;if(!YAHOO.lang.isNumber(b)){this.minQueryLength=1;}var e=this.maxResultsDisplayed;if(!YAHOO.lang.isNumber(e)||(e<1)){this.maxResultsDisplayed=10;}var f=this.queryDelay;if(!YAHOO.lang.isNumber(f)||(f<0)){this.queryDelay=0.2;}var c=this.typeAheadDelay;if(!YAHOO.lang.isNumber(c)||(c<0)){this.typeAheadDelay=0.2;}var a=this.delimChar;if(YAHOO.lang.isString(a)&&(a.length>0)){this.delimChar=[a];}else{if(!YAHOO.lang.isArray(a)){this.delimChar=null;}}var d=this.animSpeed;if((this.animHoriz||this.animVert)&&YAHOO.util.Anim){if(!YAHOO.lang.isNumber(d)||(d<0)){this.animSpeed=0.3;}if(!this._oAnim){this._oAnim=new YAHOO.util.Anim(this._elContent,{},this.animSpeed);}else{this._oAnim.duration=this.animSpeed;}}if(this.forceSelection&&a){}};YAHOO.widget.AutoComplete.prototype._initContainerHelperEls=function(){if(this.useShadow&&!this._elShadow){var a=document.createElement("div");a.className="yui-ac-shadow";a.style.width=0;a.style.height=0;this._elShadow=this._elContainer.appendChild(a);}if(this.useIFrame&&!this._elIFrame){var b=document.createElement("iframe");b.src=this._iFrameSrc;b.frameBorder=0;b.scrolling="no";b.style.position="absolute";b.style.width=0;b.style.height=0;b.style.padding=0;b.tabIndex=-1;b.role="presentation";b.title="Presentational iframe shim";this._elIFrame=this._elContainer.appendChild(b);}};YAHOO.widget.AutoComplete.prototype._initContainerEl=function(){YAHOO.util.Dom.addClass(this._elContainer,"yui-ac-container");if(!this._elContent){var c=document.createElement("div");c.className="yui-ac-content";c.style.display="none";this._elContent=this._elContainer.appendChild(c);var b=document.createElement("div");b.className="yui-ac-hd";b.style.display="none";this._elHeader=this._elContent.appendChild(b);var d=document.createElement("div");d.className="yui-ac-bd";this._elBody=this._elContent.appendChild(d);var a=document.createElement("div");a.className="yui-ac-ft";a.style.display="none";this._elFooter=this._elContent.appendChild(a);}else{}};YAHOO.widget.AutoComplete.prototype._initListEl=function(){var c=this.maxResultsDisplayed,a=this._elList||document.createElement("ul"),b;while(a.childNodes.length=18&&a<=20)||(a==27)||(a>=33&&a<=35)||(a>=36&&a<=40)||(a>=44&&a<=45)||(a==229)){return true;}return false;};YAHOO.widget.AutoComplete.prototype._sendQuery=function(d){if(this.minQueryLength<0){this._toggleContainer(false);return;}if(this.delimChar){var a=this._extractQuery(d);d=a.query;this._sPastSelections=a.previous;}if((d&&(d.length0)){if(this._nDelayID!=-1){clearTimeout(this._nDelayID); +}this._toggleContainer(false);return;}d=encodeURIComponent(d);this._nDelayID=-1;if(this.dataSource.queryMatchSubset||this.queryMatchSubset){var c=this.getSubsetMatches(d);if(c){this.handleResponse(d,c,{query:d});return;}}if(this.dataSource.responseStripAfter){this.dataSource.doBeforeParseData=this.preparseRawResponse;}if(this.applyLocalFilter){this.dataSource.doBeforeCallback=this.filterResults;}var b=this.generateRequest(d);if(b!==undefined){this.dataRequestEvent.fire(this,d,b);this.dataSource.sendRequest(b,{success:this.handleResponse,failure:this.handleResponse,scope:this,argument:{query:d}});}else{this.dataRequestCancelEvent.fire(this,d);}};YAHOO.widget.AutoComplete.prototype._populateListItem=function(b,a,c){b.innerHTML=this.formatResult(a,c,b._sResultMatch);};YAHOO.widget.AutoComplete.prototype._populateList=function(n,f,c){if(this._nTypeAheadDelayID!=-1){clearTimeout(this._nTypeAheadDelayID);}n=(c&&c.query)?c.query:n;var h=this.doBeforeLoadData(n,f,c);if(h&&!f.error){this.dataReturnEvent.fire(this,n,f.results);if(this._bFocused){var p=decodeURIComponent(n);this._sCurQuery=p;this._bItemSelected=false;var u=f.results,a=Math.min(u.length,this.maxResultsDisplayed),m=(this.dataSource.responseSchema.fields)?(this.dataSource.responseSchema.fields[0].key||this.dataSource.responseSchema.fields[0]):0;if(a>0){if(!this._elList||(this._elList.childNodes.length=0;t--){var s=l[t],e=u[t];if(this.resultTypeList){var b=[];b[0]=(YAHOO.lang.isString(e))?e:e[m]||e[this.key];var o=this.dataSource.responseSchema.fields;if(YAHOO.lang.isArray(o)&&(o.length>1)){for(var q=1,v=o.length;q=a;r--){g=l[r];g.style.display="none";}}this._nDisplayedItems=a;this.containerPopulateEvent.fire(this,n,u);if(this.autoHighlight){var d=this._elList.firstChild;this._toggleHighlight(d,"to");this.itemArrowToEvent.fire(this,d);this._typeAhead(d,n);}else{this._toggleHighlight(this._elCurListItem,"from");}h=this._doBeforeExpandContainer(this._elTextbox,this._elContainer,n,u);this._toggleContainer(h);}else{this._toggleContainer(false);}return;}}else{this.dataErrorEvent.fire(this,n,f);}};YAHOO.widget.AutoComplete.prototype._doBeforeExpandContainer=function(d,a,c,b){if(this.autoSnapContainer){this.snapContainer();}return this.doBeforeExpandContainer(d,a,c,b);};YAHOO.widget.AutoComplete.prototype._clearSelection=function(){var a=(this.delimChar)?this._extractQuery(this._elTextbox.value):{previous:"",query:this._elTextbox.value};this._elTextbox.value=a.previous;this.selectionEnforceEvent.fire(this,a.query);};YAHOO.widget.AutoComplete.prototype._textMatchesOption=function(){var a=null;for(var b=0;b=0;b--){g=h.lastIndexOf(c[b]);if(g>f){f=g;}}if(c[b]==" "){for(var a=c.length-1;a>=0;a--){if(h[f-1]==c[a]){f--;break;}}}if(f>-1){e=f+1;while(h.charAt(e)==" "){e+=1;}d=h.substring(0,e);h=h.substr(e);}else{d="";}return{previous:d,query:h};};YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers=function(d){var e=this._elContent.offsetWidth+"px";var b=this._elContent.offsetHeight+"px";if(this.useIFrame&&this._elIFrame){var c=this._elIFrame;if(d){c.style.width=e;c.style.height=b;c.style.padding="";}else{c.style.width=0;c.style.height=0;c.style.padding=0;}}if(this.useShadow&&this._elShadow){var a=this._elShadow;if(d){a.style.width=e;a.style.height=b;}else{a.style.width=0;a.style.height=0;}}};YAHOO.widget.AutoComplete.prototype._toggleContainer=function(i){var d=this._elContainer;if(this.alwaysShowContainer&&this._bContainerOpen){return;}if(!i){this._toggleHighlight(this._elCurListItem,"from");this._nDisplayedItems=0;this._sCurQuery=null;if(this._elContent.style.display=="none"){return;}}var a=this._oAnim;if(a&&a.getEl()&&(this.animHoriz||this.animVert)){if(a.isAnimated()){a.stop(true);}var g=this._elContent.cloneNode(true);d.appendChild(g);g.style.top="-9000px";g.style.width="";g.style.height="";g.style.display="";var f=g.offsetWidth;var c=g.offsetHeight;var b=(this.animHoriz)?0:f;var e=(this.animVert)?0:c;a.attributes=(i)?{width:{to:f},height:{to:c}}:{width:{to:b},height:{to:e}};if(i&&!this._bContainerOpen){this._elContent.style.width=b+"px";this._elContent.style.height=e+"px";}else{this._elContent.style.width=f+"px";this._elContent.style.height=c+"px";}d.removeChild(g);g=null;var h=this;var j=function(){a.onComplete.unsubscribeAll();if(i){h._toggleContainerHelpers(true);h._bContainerOpen=i;h.containerExpandEvent.fire(h);}else{h._elContent.style.display="none";h._bContainerOpen=i;h.containerCollapseEvent.fire(h);}};this._toggleContainerHelpers(false);this._elContent.style.display="";a.onComplete.subscribe(j);a.animate();}else{if(i){this._elContent.style.display="";this._toggleContainerHelpers(true); +this._bContainerOpen=i;this.containerExpandEvent.fire(this);}else{this._toggleContainerHelpers(false);this._elContent.style.display="none";this._bContainerOpen=i;this.containerCollapseEvent.fire(this);}}};YAHOO.widget.AutoComplete.prototype._toggleHighlight=function(a,c){if(a){var b=this.highlightClassName;if(this._elCurListItem){YAHOO.util.Dom.removeClass(this._elCurListItem,b);this._elCurListItem=null;}if((c=="to")&&b){YAHOO.util.Dom.addClass(a,b);this._elCurListItem=a;}}};YAHOO.widget.AutoComplete.prototype._togglePrehighlight=function(b,c){var a=this.prehighlightClassName;if(this._elCurPrehighlightItem){YAHOO.util.Dom.removeClass(this._elCurPrehighlightItem,a);}if(b==this._elCurListItem){return;}if((c=="mouseover")&&a){YAHOO.util.Dom.addClass(b,a);this._elCurPrehighlightItem=b;}else{YAHOO.util.Dom.removeClass(b,a);}};YAHOO.widget.AutoComplete.prototype._updateValue=function(c){if(!this.suppressInputUpdate){var f=this._elTextbox;var e=(this.delimChar)?(this.delimChar[0]||this.delimChar):null;var b=c._sResultMatch;var d="";if(e){d=this._sPastSelections;d+=b+e;if(e!=" "){d+=" ";}}else{d=b;}f.value=d;if(f.type=="textarea"){f.scrollTop=f.scrollHeight;}var a=f.value.length;this._selectText(f,a,a);this._elCurListItem=c;}};YAHOO.widget.AutoComplete.prototype._selectItem=function(a){this._bItemSelected=true;this._updateValue(a);this._sPastSelections=this._elTextbox.value;this._clearInterval();this.itemSelectEvent.fire(this,a,a._oResultData);this._toggleContainer(false);};YAHOO.widget.AutoComplete.prototype._jumpSelection=function(){if(this._elCurListItem){this._selectItem(this._elCurListItem);}else{this._toggleContainer(false);}};YAHOO.widget.AutoComplete.prototype._moveSelection=function(g){if(this._bContainerOpen){var h=this._elCurListItem,d=-1;if(h){d=h._nItemIndex;}var e=(g==40)?(d+1):(d-1);if(e<-2||e>=this._nDisplayedItems){return;}if(h){this._toggleHighlight(h,"from");this.itemArrowFromEvent.fire(this,h);}if(e==-1){if(this.delimChar){this._elTextbox.value=this._sPastSelections+this._sCurQuery;}else{this._elTextbox.value=this._sCurQuery;}return;}if(e==-2){this._toggleContainer(false);return;}var f=this._elList.childNodes[e],b=this._elContent,c=YAHOO.util.Dom.getStyle(b,"overflow"),i=YAHOO.util.Dom.getStyle(b,"overflowY"),a=((c=="auto")||(c=="scroll")||(i=="auto")||(i=="scroll"));if(a&&(e>-1)&&(e(b.scrollTop+b.offsetHeight)){b.scrollTop=(f.offsetTop+f.offsetHeight)-b.offsetHeight;}else{if((f.offsetTop+f.offsetHeight)(b.scrollTop+b.offsetHeight)){this._elContent.scrollTop=(f.offsetTop+f.offsetHeight)-b.offsetHeight;}}}}this._toggleHighlight(f,"to");this.itemArrowToEvent.fire(this,f);if(this.typeAhead){this._updateValue(f);this._sCurQuery=f._sResultMatch;}}};YAHOO.widget.AutoComplete.prototype._onContainerMouseover=function(a,c){var d=YAHOO.util.Event.getTarget(a);var b=d.nodeName.toLowerCase();while(d&&(b!="table")){switch(b){case"body":return;case"li":if(c.prehighlightClassName){c._togglePrehighlight(d,"mouseover");}else{c._toggleHighlight(d,"to");}c.itemMouseOverEvent.fire(c,d);break;case"div":if(YAHOO.util.Dom.hasClass(d,"yui-ac-container")){c._bOverContainer=true;return;}break;default:break;}d=d.parentNode;if(d){b=d.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerMouseout=function(a,c){var d=YAHOO.util.Event.getTarget(a);var b=d.nodeName.toLowerCase();while(d&&(b!="table")){switch(b){case"body":return;case"li":if(c.prehighlightClassName){c._togglePrehighlight(d,"mouseout");}else{c._toggleHighlight(d,"from");}c.itemMouseOutEvent.fire(c,d);break;case"ul":c._toggleHighlight(c._elCurListItem,"to");break;case"div":if(YAHOO.util.Dom.hasClass(d,"yui-ac-container")){c._bOverContainer=false;return;}break;default:break;}d=d.parentNode;if(d){b=d.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerClick=function(a,c){var d=YAHOO.util.Event.getTarget(a);var b=d.nodeName.toLowerCase();while(d&&(b!="table")){switch(b){case"body":return;case"li":c._toggleHighlight(d,"to");c._selectItem(d);return;default:break;}d=d.parentNode;if(d){b=d.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerScroll=function(a,b){b._focus();};YAHOO.widget.AutoComplete.prototype._onContainerResize=function(a,b){b._toggleContainerHelpers(b._bContainerOpen);};YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown=function(a,b){var c=a.keyCode;if(b._nTypeAheadDelayID!=-1){clearTimeout(b._nTypeAheadDelayID);}switch(c){case 9:if(!YAHOO.env.ua.opera&&(navigator.userAgent.toLowerCase().indexOf("mac")==-1)||(YAHOO.env.ua.webkit>420)){if(b._elCurListItem){if(b.delimChar&&(b._nKeyCode!=c)){if(b._bContainerOpen){YAHOO.util.Event.stopEvent(a);}}b._selectItem(b._elCurListItem);}else{b._toggleContainer(false);}}break;case 13:if(!YAHOO.env.ua.opera&&(navigator.userAgent.toLowerCase().indexOf("mac")==-1)||(YAHOO.env.ua.webkit>420)){if(b._elCurListItem){if(b._nKeyCode!=c){if(b._bContainerOpen){YAHOO.util.Event.stopEvent(a);}}b._selectItem(b._elCurListItem);}else{b._toggleContainer(false);}}break;case 27:b._toggleContainer(false);return;case 39:b._jumpSelection();break;case 38:if(b._bContainerOpen){YAHOO.util.Event.stopEvent(a);b._moveSelection(c);}break;case 40:if(b._bContainerOpen){YAHOO.util.Event.stopEvent(a);b._moveSelection(c);}break;default:b._bItemSelected=false;b._toggleHighlight(b._elCurListItem,"from");b.textboxKeyEvent.fire(b,c);break;}if(c===18){b._enableIntervalDetection();}b._nKeyCode=c;};YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress=function(a,b){var c=a.keyCode;if(YAHOO.env.ua.opera||(navigator.userAgent.toLowerCase().indexOf("mac")!=-1)&&(YAHOO.env.ua.webkit<420)){switch(c){case 9:if(b._bContainerOpen){if(b.delimChar){YAHOO.util.Event.stopEvent(a);}if(b._elCurListItem){b._selectItem(b._elCurListItem);}else{b._toggleContainer(false);}}break;case 13:if(b._bContainerOpen){YAHOO.util.Event.stopEvent(a); +if(b._elCurListItem){b._selectItem(b._elCurListItem);}else{b._toggleContainer(false);}}break;default:break;}}else{if(c==229){b._enableIntervalDetection();}}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp=function(a,c){var b=this.value;c._initProps();var d=a.keyCode;if(c._isIgnoreKey(d)){return;}if(c._nDelayID!=-1){clearTimeout(c._nDelayID);}c._nDelayID=setTimeout(function(){c._sendQuery(b);},(c.queryDelay*1000));};YAHOO.widget.AutoComplete.prototype._onTextboxFocus=function(a,b){if(!b._bFocused){b._elTextbox.setAttribute("autocomplete","off");b._bFocused=true;b._sInitInputValue=b._elTextbox.value;b.textboxFocusEvent.fire(b);}};YAHOO.widget.AutoComplete.prototype._onTextboxBlur=function(a,c){if(!c._bOverContainer||(c._nKeyCode==9)){if(!c._bItemSelected){var b=c._textMatchesOption();if(!c._bContainerOpen||(c._bContainerOpen&&(b===null))){if(c.forceSelection){c._clearSelection();}else{c.unmatchedItemSelectEvent.fire(c,c._sCurQuery);}}else{if(c.forceSelection){c._selectItem(b);}}}c._clearInterval();c._bFocused=false;if(c._sInitInputValue!==c._elTextbox.value){c.textboxChangeEvent.fire(c);}c.textboxBlurEvent.fire(c);c._toggleContainer(false);}else{c._focus();}};YAHOO.widget.AutoComplete.prototype._onWindowUnload=function(a,b){if(b&&b._elTextbox&&b.allowBrowserAutocomplete){b._elTextbox.setAttribute("autocomplete","on");}};YAHOO.widget.AutoComplete.prototype.doBeforeSendQuery=function(a){return this.generateRequest(a);};YAHOO.widget.AutoComplete.prototype.getListItems=function(){var c=[],b=this._elList.childNodes;for(var a=b.length-1;a>=0;a--){c[a]=b[a];}return c;};YAHOO.widget.AutoComplete._cloneObject=function(d){if(!YAHOO.lang.isValue(d)){return d;}var f={};if(YAHOO.lang.isFunction(d)){f=d;}else{if(YAHOO.lang.isArray(d)){var e=[];for(var c=0,b=d.length;cResponse object. * @param oPayload {MIXED} (optional) Additional argument(s) */ YAHOO.widget.AutoComplete.prototype.handleResponse = function(sQuery, oResponse, oPayload) { @@ -936,7 +937,7 @@ YAHOO.widget.AutoComplete.prototype.handleResponse = function(sQuery, oResponse, * * @method doBeforeLoadData * @param sQuery {String} Original request. - * @param oResponse {Object} Response object. + * @param oResponse {Object} Response object. * @param oPayload {MIXED} (optional) Additional argument(s) * @return {Boolean} Return true to continue loading data, false to cancel. */ @@ -952,13 +953,31 @@ YAHOO.widget.AutoComplete.prototype.doBeforeLoadData = function(sQuery, oRespons * @param oResultData {Object} Result data object. * @param sQuery {String} The corresponding query string. * @param sResultMatch {HTMLElement} The current query string. - * @return {String} HTML markup of formatted result data. + * @return {HTML} HTML markup of formatted result data. */ YAHOO.widget.AutoComplete.prototype.formatResult = function(oResultData, sQuery, sResultMatch) { var sMarkup = (sResultMatch) ? sResultMatch : ""; return sMarkup; }; +/** + * An alternative to the formatResult() method, escapes the result data before + * inserting into DOM. Implementers should point to this method when accessing + * data from third-party sources, from user input, or from otherwise + * untrustworthy sources: + * myAutoComplete.formatResult = myAutoComplete.formatEscapedResult; + * + * @method formatEscapedResult + * @param oResultData {Object} Result data object. + * @param sQuery {String} The corresponding query string. + * @param sResultMatch {HTMLElement} The current query string. + * @return {String} Formatted result data. + */ +YAHOO.widget.AutoComplete.prototype.formatEscapedResult = function(oResultData, sQuery, sResultMatch) { + var sResult = (sResultMatch) ? sResultMatch : ""; + return YAHOO.lang.escapeHTML(sResult); +}; + /** * Overridable method called before container expands allows implementers to access data * and DOM elements. @@ -1034,7 +1053,8 @@ YAHOO.widget.AutoComplete.prototype.destroy = function() { * Fired when the input field receives focus. * * @event textboxFocusEvent - * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param type {String} Name of the event. + * @param args[0] {YAHOO.widget.AutoComplete} The AutoComplete instance. */ YAHOO.widget.AutoComplete.prototype.textboxFocusEvent = null; @@ -1042,8 +1062,9 @@ YAHOO.widget.AutoComplete.prototype.textboxFocusEvent = null; * Fired when the input field receives key input. * * @event textboxKeyEvent - * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. - * @param nKeycode {Number} The keycode number. + * @param type {String} Name of the event. + * @param args[0] {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param args[1] {Number} The keycode number. */ YAHOO.widget.AutoComplete.prototype.textboxKeyEvent = null; @@ -1051,20 +1072,32 @@ YAHOO.widget.AutoComplete.prototype.textboxKeyEvent = null; * Fired when the AutoComplete instance makes a request to the DataSource. * * @event dataRequestEvent - * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. - * @param sQuery {String} The query string. - * @param oRequest {Object} The request. + * @param type {String} Name of the event. + * @param args[0] {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param args[1] {String} The query string. + * @param args[2] {Object} The request. */ YAHOO.widget.AutoComplete.prototype.dataRequestEvent = null; +/** + * Fired when the AutoComplete request to the DataSource is canceled. + * + * @event dataRequestCancelEvent + * @param type {String} Name of the event. + * @param args[0] {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param args[1] {String} The query string. + */ +YAHOO.widget.AutoComplete.prototype.dataRequestCancelEvent = null; + /** * Fired when the AutoComplete instance receives query results from the data * source. * * @event dataReturnEvent - * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. - * @param sQuery {String} The query string. - * @param aResults {Object[]} Results array. + * @param type {String} Name of the event. + * @param args[0] {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param args[1] {String} The query string. + * @param args[2] {Object[]} Results array. */ YAHOO.widget.AutoComplete.prototype.dataReturnEvent = null; @@ -1073,9 +1106,10 @@ YAHOO.widget.AutoComplete.prototype.dataReturnEvent = null; * DataSource due to an error. * * @event dataErrorEvent - * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. - * @param sQuery {String} The query string. - * @param oResponse {Object} The response object, if available. + * @param type {String} Name of the event. + * @param args[0] {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param args[1] {String} The query string. + * @param args[2] {Object} The response object, if available. */ YAHOO.widget.AutoComplete.prototype.dataErrorEvent = null; @@ -1083,7 +1117,8 @@ YAHOO.widget.AutoComplete.prototype.dataErrorEvent = null; * Fired when the results container is populated. * * @event containerPopulateEvent - * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param type {String} Name of the event. + * @param args[0] {YAHOO.widget.AutoComplete} The AutoComplete instance. */ YAHOO.widget.AutoComplete.prototype.containerPopulateEvent = null; @@ -1091,7 +1126,8 @@ YAHOO.widget.AutoComplete.prototype.containerPopulateEvent = null; * Fired when the results container is expanded. * * @event containerExpandEvent - * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param type {String} Name of the event. + * @param args[0] {YAHOO.widget.AutoComplete} The AutoComplete instance. */ YAHOO.widget.AutoComplete.prototype.containerExpandEvent = null; @@ -1100,9 +1136,10 @@ YAHOO.widget.AutoComplete.prototype.containerExpandEvent = null; * feature. * * @event typeAheadEvent - * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. - * @param sQuery {String} The query string. - * @param sPrefill {String} The prefill string. + * @param type {String} Name of the event. + * @param args[0] {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param args[1] {String} The query string. + * @param args[2] {String} The prefill string. */ YAHOO.widget.AutoComplete.prototype.typeAheadEvent = null; @@ -1110,8 +1147,9 @@ YAHOO.widget.AutoComplete.prototype.typeAheadEvent = null; * Fired when result item has been moused over. * * @event itemMouseOverEvent - * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. - * @param elItem {HTMLElement} The <li> element item moused to. + * @param type {String} Name of the event. + * @param args[0] {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param args[1] {HTMLElement} The <li> element item moused to. */ YAHOO.widget.AutoComplete.prototype.itemMouseOverEvent = null; @@ -1119,8 +1157,9 @@ YAHOO.widget.AutoComplete.prototype.itemMouseOverEvent = null; * Fired when result item has been moused out. * * @event itemMouseOutEvent - * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. - * @param elItem {HTMLElement} The <li> element item moused from. + * @param type {String} Name of the event. + * @param args[0] {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param args[1] {HTMLElement} The <li> element item moused from. */ YAHOO.widget.AutoComplete.prototype.itemMouseOutEvent = null; @@ -1128,8 +1167,9 @@ YAHOO.widget.AutoComplete.prototype.itemMouseOutEvent = null; * Fired when result item has been arrowed to. * * @event itemArrowToEvent - * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. - * @param elItem {HTMLElement} The <li> element item arrowed to. + * @param type {String} Name of the event. + * @param args[0] {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param args[1] {HTMLElement} The <li> element item arrowed to. */ YAHOO.widget.AutoComplete.prototype.itemArrowToEvent = null; @@ -1137,8 +1177,9 @@ YAHOO.widget.AutoComplete.prototype.itemArrowToEvent = null; * Fired when result item has been arrowed away from. * * @event itemArrowFromEvent - * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. - * @param elItem {HTMLElement} The <li> element item arrowed from. + * @param type {String} Name of the event. + * @param args[0[ {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param args[1] {HTMLElement} The <li> element item arrowed from. */ YAHOO.widget.AutoComplete.prototype.itemArrowFromEvent = null; @@ -1146,9 +1187,10 @@ YAHOO.widget.AutoComplete.prototype.itemArrowFromEvent = null; * Fired when an item is selected via mouse click, ENTER key, or TAB key. * * @event itemSelectEvent - * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. - * @param elItem {HTMLElement} The selected <li> element item. - * @param oData {Object} The data returned for the item, either as an object, + * @param type {String} Name of the event. + * @param args[0] {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param args[1] {HTMLElement} The selected <li> element item. + * @param args[2] {Object} The data returned for the item, either as an object, * or mapped from the schema into an array. */ YAHOO.widget.AutoComplete.prototype.itemSelectEvent = null; @@ -1157,8 +1199,9 @@ YAHOO.widget.AutoComplete.prototype.itemSelectEvent = null; * Fired when a user selection does not match any of the displayed result items. * * @event unmatchedItemSelectEvent - * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. - * @param sSelection {String} The selected string. + * @param type {String} Name of the event. + * @param args[0] {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param args[1] {String} The selected string. */ YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent = null; @@ -1167,8 +1210,9 @@ YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent = null; * because it did not match one of the returned query results. * * @event selectionEnforceEvent - * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. - * @param sClearedValue {String} The cleared value (including delimiters if applicable). + * @param type {String} Name of the event. + * @param args[0] {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param args[1] {String} The cleared value (including delimiters if applicable). */ YAHOO.widget.AutoComplete.prototype.selectionEnforceEvent = null; @@ -1176,7 +1220,8 @@ YAHOO.widget.AutoComplete.prototype.selectionEnforceEvent = null; * Fired when the results container is collapsed. * * @event containerCollapseEvent - * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param type {String} Name of the event. + * @param args[0] {YAHOO.widget.AutoComplete} The AutoComplete instance. */ YAHOO.widget.AutoComplete.prototype.containerCollapseEvent = null; @@ -1184,7 +1229,8 @@ YAHOO.widget.AutoComplete.prototype.containerCollapseEvent = null; * Fired when the input field loses focus. * * @event textboxBlurEvent - * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param type {String} Name of the event. + * @param args[0] {YAHOO.widget.AutoComplete} The AutoComplete instance. */ YAHOO.widget.AutoComplete.prototype.textboxBlurEvent = null; @@ -1192,7 +1238,8 @@ YAHOO.widget.AutoComplete.prototype.textboxBlurEvent = null; * Fired when the input field value has changed when it loses focus. * * @event textboxChangeEvent - * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param type {String} Name of the event. + * @param args[0] {YAHOO.widget.AutoComplete} The AutoComplete instance. */ YAHOO.widget.AutoComplete.prototype.textboxChangeEvent = null; @@ -1785,16 +1832,22 @@ YAHOO.widget.AutoComplete.prototype._sendQuery = function(sQuery) { } var sRequest = this.generateRequest(sQuery); - this.dataRequestEvent.fire(this, sQuery, sRequest); - - this.dataSource.sendRequest(sRequest, { - success : this.handleResponse, - failure : this.handleResponse, - scope : this, - argument: { - query: sQuery - } - }); + + if(sRequest !== undefined) { + this.dataRequestEvent.fire(this, sQuery, sRequest); + + this.dataSource.sendRequest(sRequest, { + success : this.handleResponse, + failure : this.handleResponse, + scope : this, + argument: { + query: sQuery + } + }); + } + else { + this.dataRequestCancelEvent.fire(this, sQuery); + } }; /** @@ -1816,7 +1869,7 @@ YAHOO.widget.AutoComplete.prototype._populateListItem = function(elListItem, oRe * * @method _populateList * @param sQuery {String} Original request. - * @param oResponse {Object} Response object. + * @param oResponse {Object} Response object. * @param oPayload {MIXED} (optional) Additional argument(s) * @private */ @@ -2029,6 +2082,8 @@ YAHOO.widget.AutoComplete.prototype._typeAhead = function(elListItem, sQuery) { var nEnd = elTextbox.value.length; oSelf._selectText(elTextbox,nStart,nEnd); var sPrefill = elTextbox.value.substr(nStart,nEnd); + // Bug 2528552: Store as a selection + oSelf._sCurQuery = elListItem._sResultMatch; oSelf.typeAheadEvent.fire(oSelf,sQuery,sPrefill); },(this.typeAheadDelay*1000)); } @@ -2487,6 +2542,8 @@ YAHOO.widget.AutoComplete.prototype._moveSelection = function(nKeyCode) { this.itemArrowToEvent.fire(this, elNewListItem); if(this.typeAhead) { this._updateValue(elNewListItem); + // Bug 2528552: Store as a selection + this._sCurQuery = elNewListItem._sResultMatch; } } }; @@ -2963,4 +3020,4 @@ YAHOO.widget.AutoComplete._cloneObject = function(o) { -YAHOO.register("autocomplete", YAHOO.widget.AutoComplete, {version: "2.8.0r4", build: "2449"}); +YAHOO.register("autocomplete", YAHOO.widget.AutoComplete, {version: "2.9.0", build: "2800"}); diff --git a/include/javascript/yui/build/base/base-min.css b/include/javascript/yui/build/base/base-min.css index 68889258..f71b9a56 100644 --- a/include/javascript/yui/build/base/base-min.css +++ b/include/javascript/yui/build/base/base-min.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -body{margin:10px;}h1{font-size:138.5%;}h2{font-size:123.1%;}h3{font-size:108%;}h1,h2,h3{margin:1em 0;}h1,h2,h3,h4,h5,h6,strong,dt{font-weight:bold;}optgroup{font-weight:normal;}abbr,acronym{border-bottom:1px dotted #000;cursor:help;}em{font-style:italic;}del{text-decoration:line-through;}blockquote,ul,ol,dl{margin:1em;}ol,ul,dl{margin-left:2em;}ol li{list-style:decimal outside;}ul li{list-style:disc outside;}dl dd{margin-left:1em;}th,td{border:1px solid #000;padding:.5em;}th{font-weight:bold;text-align:center;}caption{margin-bottom:.5em;text-align:center;}sup{vertical-align:super;}sub{vertical-align:sub;}p,fieldset,table,pre{margin-bottom:1em;}button,input[type="checkbox"],input[type="radio"],input[type="reset"],input[type="submit"]{padding:1px;} \ No newline at end of file +body{margin:10px}h1{font-size:138.5%}h2{font-size:123.1%}h3{font-size:108%}h1,h2,h3{margin:1em 0}h1,h2,h3,h4,h5,h6,strong,dt{font-weight:bold}optgroup{font-weight:normal}abbr,acronym{border-bottom:1px dotted #000;cursor:help}em{font-style:italic}del{text-decoration:line-through}blockquote,ul,ol,dl{margin:1em}ol,ul,dl{margin-left:2em}ol{list-style:decimal outside}ul{list-style:disc outside}dl dd{margin-left:1em}th,td{border:1px solid #000;padding:.5em}th{font-weight:bold;text-align:center}caption{margin-bottom:.5em;text-align:center}sup{vertical-align:super}sub{vertical-align:sub}p,fieldset,table,pre{margin-bottom:1em}button,input[type="checkbox"],input[type="radio"],input[type="reset"],input[type="submit"]{padding:1px}img{-ms-interpolation-mode:bicubic} \ No newline at end of file diff --git a/include/javascript/yui/build/base/base.css b/include/javascript/yui/build/base/base.css index 24b7a20d..557c75e3 100644 --- a/include/javascript/yui/build/base/base.css +++ b/include/javascript/yui/build/base/base.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ /** * YUI Base @@ -70,18 +70,18 @@ ol,ul,dl { margin-left: 2em; } -ol li { +ol { /* Giving OL's LIs generated numbers. */ list-style: decimal outside; } -ul li { +ul { /* Giving UL's LIs generated disc markers. */ list-style: disc outside; } dl dd { - /* Giving UL's LIs generated numbers. */ + /* Giving DD default indent. */ margin-left: 1em; } @@ -121,7 +121,7 @@ pre { /* So things don't run into each other. */ margin-bottom: 1em; } -/* Opera requires 1px of passing to render with contemporary native chrome */ +/* Opera requires 1px of padding to render with contemporary native chrome */ button, input[type="checkbox"], input[type="radio"], @@ -129,3 +129,9 @@ input[type="reset"], input[type="submit"] { padding:1px; } + +/* make IE scale images properly */ +/* see http://code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ */ + img { + -ms-interpolation-mode:bicubic; +} diff --git a/include/javascript/yui/build/button/assets/button-core.css b/include/javascript/yui/build/button/assets/button-core.css index 0aeeb9de..0abc57df 100644 --- a/include/javascript/yui/build/button/assets/button-core.css +++ b/include/javascript/yui/build/button/assets/button-core.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ .yui-button { diff --git a/include/javascript/yui/build/button/assets/skins/sam/button-skin.css b/include/javascript/yui/build/button/assets/skins/sam/button-skin.css index 9aeaba81..4e3f5900 100644 --- a/include/javascript/yui/build/button/assets/skins/sam/button-skin.css +++ b/include/javascript/yui/build/button/assets/skins/sam/button-skin.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ .yui-skin-sam .yui-button { @@ -216,4 +216,4 @@ version: 2.8.0r4 background-image: url(split-button-arrow-disabled.png); -} \ No newline at end of file +} diff --git a/include/javascript/yui/build/button/assets/skins/sam/button.css b/include/javascript/yui/build/button/assets/skins/sam/button.css index b3b6c64d..f3701fb2 100644 --- a/include/javascript/yui/build/button/assets/skins/sam/button.css +++ b/include/javascript/yui/build/button/assets/skins/sam/button.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ .yui-button{display:-moz-inline-box;display:inline-block;vertical-align:text-bottom;}.yui-button .first-child{display:block;*display:inline-block;}.yui-button button,.yui-button a{display:block;*display:inline-block;border:none;margin:0;}.yui-button button{background-color:transparent;*overflow:visible;cursor:pointer;}.yui-button a{text-decoration:none;}.yui-skin-sam .yui-button{border-width:1px 0;border-style:solid;border-color:#808080;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;_margin:0;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a,.yui-skin-sam .yui-button a:visited{padding:0 10px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-button a{*line-height:1.875;*padding-bottom:1px;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20px;background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-split-button-focus button{background-image:url(split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-split-button-hover button{background-image:url(split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam .yui-button-active .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sam .yui-button-disabled a,.yui-skin-sam .yui-button-disabled a:visited{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-menu-button-disabled button{background-image:url(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);} diff --git a/include/javascript/yui/build/button/button-min.js b/include/javascript/yui/build/button/button-min.js index 6a81b63e..15411fce 100644 --- a/include/javascript/yui/build/button/button-min.js +++ b/include/javascript/yui/build/button/button-min.js @@ -1,11 +1,11 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -(function(){var G=YAHOO.util.Dom,M=YAHOO.util.Event,I=YAHOO.lang,L=YAHOO.env.ua,B=YAHOO.widget.Overlay,J=YAHOO.widget.Menu,D={},K=null,E=null,C=null;function F(O,N,R,P){var S,Q;if(I.isString(O)&&I.isString(N)){if(L.ie){Q='0){V.label=Q;}}}function A(P){var O=P.attributes,N=O.srcelement,R=N.nodeName.toUpperCase(),Q=this;if(R==this.NODE_NAME){P.element=N;P.id=N.id;G.getElementsBy(function(S){switch(S.nodeName.toUpperCase()){case"BUTTON":case"A":case"INPUT":H.call(Q,S,O);break;}},"*",N);}else{switch(R){case"BUTTON":case"A":case"INPUT":H.call(this,N,O);break;}}}YAHOO.widget.Button=function(R,O){if(!B&&YAHOO.widget.Overlay){B=YAHOO.widget.Overlay;}if(!J&&YAHOO.widget.Menu){J=YAHOO.widget.Menu;}var Q=YAHOO.widget.Button.superclass.constructor,P,N;if(arguments.length==1&&!I.isString(R)&&!R.nodeName){if(!R.id){R.id=G.generateId();}Q.call(this,(this.createButtonElement(R.type)),R);}else{P={element:null,attributes:(O||{})};if(I.isString(R)){N=G.get(R);if(N){if(!P.attributes.id){P.attributes.id=R;}P.attributes.srcelement=N;A.call(this,P);if(!P.element){P.element=this.createButtonElement(P.attributes.type);}Q.call(this,P.element,P.attributes);}}else{if(R.nodeName){if(!P.attributes.id){if(R.id){P.attributes.id=R.id;}else{P.attributes.id=G.generateId();}}P.attributes.srcelement=R;A.call(this,P);if(!P.element){P.element=this.createButtonElement(P.attributes.type);}Q.call(this,P.element,P.attributes);}}}};YAHOO.extend(YAHOO.widget.Button,YAHOO.util.Element,{_button:null,_menu:null,_hiddenFields:null,_onclickAttributeValue:null,_activationKeyPressed:false,_activationButtonPressed:false,_hasKeyEventHandlers:false,_hasMouseEventHandlers:false,_nOptionRegionX:0,CLASS_NAME_PREFIX:"yui-",NODE_NAME:"SPAN",CHECK_ACTIVATION_KEYS:[32],ACTIVATION_KEYS:[13,32],OPTION_AREA_WIDTH:20,CSS_CLASS_NAME:"button",_setType:function(N){if(N=="split"){this.on("option",this._onOption);}},_setLabel:function(O){this._button.innerHTML=O;var P,N=L.gecko;if(N&&N<1.9&&G.inDocument(this.get("element"))){P=(this.CLASS_NAME_PREFIX+this.CSS_CLASS_NAME);this.removeClass(P);I.later(0,this,this.addClass,P);}},_setTabIndex:function(N){this._button.tabIndex=N;},_setTitle:function(N){if(this.get("type")!="link"){this._button.title=N;}},_setDisabled:function(N){if(this.get("type")!="link"){if(N){if(this._menu){this._menu.hide();}if(this.hasFocus()){this.blur();}this._button.setAttribute("disabled","disabled");this.addStateCSSClasses("disabled");this.removeStateCSSClasses("hover");this.removeStateCSSClasses("active");this.removeStateCSSClasses("focus");}else{this._button.removeAttribute("disabled");this.removeStateCSSClasses("disabled");}}},_setHref:function(N){if(this.get("type")=="link"){this._button.href=N;}},_setTarget:function(N){if(this.get("type")=="link"){this._button.setAttribute("target",N);}},_setChecked:function(N){var O=this.get("type");if(O=="checkbox"||O=="radio"){if(N){this.addStateCSSClasses("checked");}else{this.removeStateCSSClasses("checked");}}},_setMenu:function(U){var P=this.get("lazyloadmenu"),R=this.get("element"),N,W=false,X,O,Q;function V(){X.render(R.parentNode);this.removeListener("appendTo",V);}function T(){X.cfg.queueProperty("container",R.parentNode);this.removeListener("appendTo",T);}function S(){var Y;if(X){G.addClass(X.element,this.get("menuclassname"));G.addClass(X.element,this.CLASS_NAME_PREFIX+this.get("type")+"-button-menu");X.showEvent.subscribe(this._onMenuShow,null,this);X.hideEvent.subscribe(this._onMenuHide,null,this);X.renderEvent.subscribe(this._onMenuRender,null,this);if(J&&X instanceof J){if(P){Y=this.get("container");if(Y){X.cfg.queueProperty("container",Y);}else{this.on("appendTo",T);}}X.cfg.queueProperty("clicktohide",false);X.keyDownEvent.subscribe(this._onMenuKeyDown,this,true);X.subscribe("click",this._onMenuClick,this,true);this.on("selectedMenuItemChange",this._onSelectedMenuItemChange);Q=X.srcElement;if(Q&&Q.nodeName.toUpperCase()=="SELECT"){Q.style.display="none";Q.parentNode.removeChild(Q);}}else{if(B&&X instanceof B){if(!K){K=new YAHOO.widget.OverlayManager();}K.register(X);}}this._menu=X;if(!W&&!P){if(G.inDocument(R)){X.render(R.parentNode);}else{this.on("appendTo",V);}}}}if(B){if(J){N=J.prototype.CSS_CLASS_NAME;}if(U&&J&&(U instanceof J)){X=U;W=true;S.call(this);}else{if(B&&U&&(U instanceof B)){X=U;W=true;X.cfg.queueProperty("visible",false);S.call(this);}else{if(J&&I.isArray(U)){X=new J(G.generateId(),{lazyload:P,itemdata:U});this._menu=X;this.on("appendTo",S);}else{if(I.isString(U)){O=G.get(U);if(O){if(J&&G.hasClass(O,N)||O.nodeName.toUpperCase()=="SELECT"){X=new J(U,{lazyload:P});S.call(this);}else{if(B){X=new B(U,{visible:false});S.call(this);}}}}else{if(U&&U.nodeName){if(J&&G.hasClass(U,N)||U.nodeName.toUpperCase()=="SELECT"){X=new J(U,{lazyload:P});S.call(this);}else{if(B){if(!U.id){G.generateId(U);}X=new B(U,{visible:false});S.call(this);}}}}}}}}},_setOnClick:function(N){if(this._onclickAttributeValue&&(this._onclickAttributeValue!=N)){this.removeListener("click",this._onclickAttributeValue.fn); -this._onclickAttributeValue=null;}if(!this._onclickAttributeValue&&I.isObject(N)&&I.isFunction(N.fn)){this.on("click",N.fn,N.obj,N.scope);this._onclickAttributeValue=N;}},_isActivationKey:function(N){var S=this.get("type"),O=(S=="checkbox"||S=="radio")?this.CHECK_ACTIVATION_KEYS:this.ACTIVATION_KEYS,Q=O.length,R=false,P;if(Q>0){P=Q-1;do{if(N==O[P]){R=true;break;}}while(P--);}return R;},_isSplitButtonOptionKey:function(P){var O=(M.getCharCode(P)==40);var N=function(Q){M.preventDefault(Q);this.removeListener("keypress",N);};if(O){if(L.opera){this.on("keypress",N);}M.preventDefault(P);}return O;},_addListenersToForm:function(){var T=this.getForm(),S=YAHOO.widget.Button.onFormKeyPress,R,N,Q,P,O;if(T){M.on(T,"reset",this._onFormReset,null,this);M.on(T,"submit",this._onFormSubmit,null,this);N=this.get("srcelement");if(this.get("type")=="submit"||(N&&N.type=="submit")){Q=M.getListeners(T,"keypress");R=false;if(Q){P=Q.length;if(P>0){O=P-1;do{if(Q[O].fn==S){R=true;break;}}while(O--);}}if(!R){M.on(T,"keypress",S);}}}},_showMenu:function(R){if(YAHOO.widget.MenuManager){YAHOO.widget.MenuManager.hideVisible();}if(K){K.hideAll();}var N=this._menu,Q=this.get("menualignment"),P=this.get("focusmenu"),O;if(this._renderedMenu){N.cfg.setProperty("context",[this.get("element"),Q[0],Q[1]]);N.cfg.setProperty("preventcontextoverlap",true);N.cfg.setProperty("constraintoviewport",true);}else{N.cfg.queueProperty("context",[this.get("element"),Q[0],Q[1]]);N.cfg.queueProperty("preventcontextoverlap",true);N.cfg.queueProperty("constraintoviewport",true);}this.focus();if(J&&N&&(N instanceof J)){O=N.focus;N.focus=function(){};if(this._renderedMenu){N.cfg.setProperty("minscrollheight",this.get("menuminscrollheight"));N.cfg.setProperty("maxheight",this.get("menumaxheight"));}else{N.cfg.queueProperty("minscrollheight",this.get("menuminscrollheight"));N.cfg.queueProperty("maxheight",this.get("menumaxheight"));}N.show();N.focus=O;N.align();if(R.type=="mousedown"){M.stopPropagation(R);}if(P){N.focus();}}else{if(B&&N&&(N instanceof B)){if(!this._renderedMenu){N.render(this.get("element").parentNode);}N.show();N.align();}}},_hideMenu:function(){var N=this._menu;if(N){N.hide();}},_onMouseOver:function(O){var Q=this.get("type"),N,P;if(Q==="split"){N=this.get("element");P=(G.getX(N)+(N.offsetWidth-this.OPTION_AREA_WIDTH));this._nOptionRegionX=P;}if(!this._hasMouseEventHandlers){if(Q==="split"){this.on("mousemove",this._onMouseMove);}this.on("mouseout",this._onMouseOut);this._hasMouseEventHandlers=true;}this.addStateCSSClasses("hover");if(Q==="split"&&(M.getPageX(O)>P)){this.addStateCSSClasses("hoveroption");}if(this._activationButtonPressed){this.addStateCSSClasses("active");}if(this._bOptionPressed){this.addStateCSSClasses("activeoption");}if(this._activationButtonPressed||this._bOptionPressed){M.removeListener(document,"mouseup",this._onDocumentMouseUp);}},_onMouseMove:function(N){var O=this._nOptionRegionX;if(O){if(M.getPageX(N)>O){this.addStateCSSClasses("hoveroption");}else{this.removeStateCSSClasses("hoveroption");}}},_onMouseOut:function(N){var O=this.get("type");this.removeStateCSSClasses("hover");if(O!="menu"){this.removeStateCSSClasses("active");}if(this._activationButtonPressed||this._bOptionPressed){M.on(document,"mouseup",this._onDocumentMouseUp,null,this);}if(O==="split"&&(M.getPageX(N)>this._nOptionRegionX)){this.removeStateCSSClasses("hoveroption");}},_onDocumentMouseUp:function(P){this._activationButtonPressed=false;this._bOptionPressed=false;var Q=this.get("type"),N,O;if(Q=="menu"||Q=="split"){N=M.getTarget(P);O=this._menu.element;if(N!=O&&!G.isAncestor(O,N)){this.removeStateCSSClasses((Q=="menu"?"active":"activeoption"));this._hideMenu();}}M.removeListener(document,"mouseup",this._onDocumentMouseUp);},_onMouseDown:function(P){var Q,O=true;function N(){this._hideMenu();this.removeListener("mouseup",N);}if((P.which||P.button)==1){if(!this.hasFocus()){this.focus();}Q=this.get("type");if(Q=="split"){if(M.getPageX(P)>this._nOptionRegionX){this.fireEvent("option",P);O=false;}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}else{if(Q=="menu"){if(this.isActive()){this._hideMenu();this._activationButtonPressed=false;}else{this._showMenu(P);this._activationButtonPressed=true;}}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}if(Q=="split"||Q=="menu"){this._hideMenuTimer=I.later(250,this,this.on,["mouseup",N]);}}return O;},_onMouseUp:function(P){var Q=this.get("type"),N=this._hideMenuTimer,O=true;if(N){N.cancel();}if(Q=="checkbox"||Q=="radio"){this.set("checked",!(this.get("checked")));}this._activationButtonPressed=false;if(Q!="menu"){this.removeStateCSSClasses("active");}if(Q=="split"&&M.getPageX(P)>this._nOptionRegionX){O=false;}return O;},_onFocus:function(O){var N;this.addStateCSSClasses("focus");if(this._activationKeyPressed){this.addStateCSSClasses("active");}C=this;if(!this._hasKeyEventHandlers){N=this._button;M.on(N,"blur",this._onBlur,null,this);M.on(N,"keydown",this._onKeyDown,null,this);M.on(N,"keyup",this._onKeyUp,null,this);this._hasKeyEventHandlers=true;}this.fireEvent("focus",O);},_onBlur:function(N){this.removeStateCSSClasses("focus");if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}if(this._activationKeyPressed){M.on(document,"keyup",this._onDocumentKeyUp,null,this);}C=null;this.fireEvent("blur",N);},_onDocumentKeyUp:function(N){if(this._isActivationKey(M.getCharCode(N))){this._activationKeyPressed=false;M.removeListener(document,"keyup",this._onDocumentKeyUp);}},_onKeyDown:function(O){var N=this._menu;if(this.get("type")=="split"&&this._isSplitButtonOptionKey(O)){this.fireEvent("option",O);}else{if(this._isActivationKey(M.getCharCode(O))){if(this.get("type")=="menu"){this._showMenu(O);}else{this._activationKeyPressed=true;this.addStateCSSClasses("active");}}}if(N&&N.cfg.getProperty("visible")&&M.getCharCode(O)==27){N.hide();this.focus();}},_onKeyUp:function(N){var O;if(this._isActivationKey(M.getCharCode(N))){O=this.get("type");if(O=="checkbox"||O=="radio"){this.set("checked",!(this.get("checked"))); -}this._activationKeyPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}}},_onClick:function(P){var R=this.get("type"),Q,N,O;switch(R){case"submit":if(P.returnValue!==false){this.submitForm();}break;case"reset":Q=this.getForm();if(Q){Q.reset();}break;case"split":if(this._nOptionRegionX>0&&(M.getPageX(P)>this._nOptionRegionX)){O=false;}else{this._hideMenu();N=this.get("srcelement");if(N&&N.type=="submit"&&P.returnValue!==false){this.submitForm();}}break;}return O;},_onDblClick:function(O){var N=true;if(this.get("type")=="split"&&M.getPageX(O)>this._nOptionRegionX){N=false;}return N;},_onAppendTo:function(N){I.later(0,this,this._addListenersToForm);},_onFormReset:function(O){var P=this.get("type"),N=this._menu;if(P=="checkbox"||P=="radio"){this.resetValue("checked");}if(J&&N&&(N instanceof J)){this.resetValue("selectedMenuItem");}},_onFormSubmit:function(N){this.createHiddenFields();},_onDocumentMouseDown:function(Q){var N=M.getTarget(Q),P=this.get("element"),O=this._menu.element;if(N!=P&&!G.isAncestor(P,N)&&N!=O&&!G.isAncestor(O,N)){this._hideMenu();if(L.ie&&N.focus){N.setActive();}M.removeListener(document,"mousedown",this._onDocumentMouseDown);}},_onOption:function(N){if(this.hasClass(this.CLASS_NAME_PREFIX+"split-button-activeoption")){this._hideMenu();this._bOptionPressed=false;}else{this._showMenu(N);this._bOptionPressed=true;}},_onMenuShow:function(N){M.on(document,"mousedown",this._onDocumentMouseDown,null,this);var O=(this.get("type")=="split")?"activeoption":"active";this.addStateCSSClasses(O);},_onMenuHide:function(N){var O=(this.get("type")=="split")?"activeoption":"active";this.removeStateCSSClasses(O);if(this.get("type")=="split"){this._bOptionPressed=false;}},_onMenuKeyDown:function(P,O){var N=O[0];if(M.getCharCode(N)==27){this.focus();if(this.get("type")=="split"){this._bOptionPressed=false;}}},_onMenuRender:function(P){var S=this.get("element"),O=S.parentNode,N=this._menu,R=N.element,Q=N.srcElement,T;if(O!=R.parentNode){O.appendChild(R);}this._renderedMenu=true;if(Q&&Q.nodeName.toLowerCase()==="select"&&Q.value){T=N.getItem(Q.selectedIndex);this.set("selectedMenuItem",T,true);this._onSelectedMenuItemChange({newValue:T});}},_onMenuClick:function(O,N){var Q=N[1],P;if(Q){this.set("selectedMenuItem",Q);P=this.get("srcelement");if(P&&P.type=="submit"){this.submitForm();}this._hideMenu();}},_onSelectedMenuItemChange:function(O){var P=O.prevValue,Q=O.newValue,N=this.CLASS_NAME_PREFIX;if(P){G.removeClass(P.element,(N+"button-selectedmenuitem"));}if(Q){G.addClass(Q.element,(N+"button-selectedmenuitem"));}},_onLabelClick:function(N){this.focus();var O=this.get("type");if(O=="radio"||O=="checkbox"){this.set("checked",(!this.get("checked")));}},createButtonElement:function(N){var P=this.NODE_NAME,O=document.createElement(P);O.innerHTML="<"+P+' class="first-child">'+(N=="link"?"":'')+"";return O;},addStateCSSClasses:function(O){var P=this.get("type"),N=this.CLASS_NAME_PREFIX;if(I.isString(O)){if(O!="activeoption"&&O!="hoveroption"){this.addClass(N+this.CSS_CLASS_NAME+("-"+O));}this.addClass(N+P+("-button-"+O));}},removeStateCSSClasses:function(O){var P=this.get("type"),N=this.CLASS_NAME_PREFIX;if(I.isString(O)){this.removeClass(N+this.CSS_CLASS_NAME+("-"+O));this.removeClass(N+P+("-button-"+O));}},createHiddenFields:function(){this.removeHiddenFields();var V=this.getForm(),Z,O,S,X,Y,T,U,N,R,W,P,Q=false;if(V&&!this.get("disabled")){O=this.get("type");S=(O=="checkbox"||O=="radio");if((S&&this.get("checked"))||(E==this)){Z=F((S?O:"hidden"),this.get("name"),this.get("value"),this.get("checked"));if(Z){if(S){Z.style.display="none";}V.appendChild(Z);}}X=this._menu;if(J&&X&&(X instanceof J)){Y=this.get("selectedMenuItem");P=X.srcElement;Q=(P&&P.nodeName.toUpperCase()=="SELECT");if(Y){U=(Y.value===null||Y.value==="")?Y.cfg.getProperty("text"):Y.value;T=this.get("name");if(Q){W=P.name;}else{if(T){W=(T+"_options");}}if(U&&W){N=F("hidden",W,U);V.appendChild(N);}}else{if(Q){N=V.appendChild(P);}}}if(Z&&N){this._hiddenFields=[Z,N];}else{if(!Z&&N){this._hiddenFields=N;}else{if(Z&&!N){this._hiddenFields=Z;}}}R=this._hiddenFields;}return R;},removeHiddenFields:function(){var Q=this._hiddenFields,O,P;function N(R){if(G.inDocument(R)){R.parentNode.removeChild(R);}}if(Q){if(I.isArray(Q)){O=Q.length;if(O>0){P=O-1;do{N(Q[P]);}while(P--);}}else{N(Q);}this._hiddenFields=null;}},submitForm:function(){var Q=this.getForm(),P=this.get("srcelement"),O=false,N;if(Q){if(this.get("type")=="submit"||(P&&P.type=="submit")){E=this;}if(L.ie){O=Q.fireEvent("onsubmit");}else{N=document.createEvent("HTMLEvents");N.initEvent("submit",true,true);O=Q.dispatchEvent(N);}if((L.ie||L.webkit)&&O){Q.submit();}}return O;},init:function(P,d){var V=d.type=="link"?"a":"button",a=d.srcelement,S=P.getElementsByTagName(V)[0],U;if(!S){U=P.getElementsByTagName("input")[0];if(U){S=document.createElement("button");S.setAttribute("type","button");U.parentNode.replaceChild(S,U);}}this._button=S;YAHOO.widget.Button.superclass.init.call(this,P,d);var T=this.get("id"),Z=T+"-button";S.id=Z;var X,Q;var e=function(f){return(f.htmlFor===T);};var c=function(){Q.setAttribute((L.ie?"htmlFor":"for"),Z);};if(a&&this.get("type")!="link"){X=G.getElementsBy(e,"label");if(I.isArray(X)&&X.length>0){Q=X[0];}}D[T]=this;var b=this.CLASS_NAME_PREFIX;this.addClass(b+this.CSS_CLASS_NAME);this.addClass(b+this.get("type")+"-button");M.on(this._button,"focus",this._onFocus,null,this);this.on("mouseover",this._onMouseOver);this.on("mousedown",this._onMouseDown);this.on("mouseup",this._onMouseUp);this.on("click",this._onClick);var R=this.get("onclick");this.set("onclick",null);this.set("onclick",R);this.on("dblclick",this._onDblClick);var O;if(Q){if(this.get("replaceLabel")){this.set("label",Q.innerHTML);O=Q.parentNode;O.removeChild(Q);}else{this.on("appendTo",c);M.on(Q,"click",this._onLabelClick,null,this);this._label=Q;}}this.on("appendTo",this._onAppendTo);var N=this.get("container"),Y=this.get("element"),W=G.inDocument(Y); -if(N){if(a&&a!=Y){O=a.parentNode;if(O){O.removeChild(a);}}if(I.isString(N)){M.onContentReady(N,this.appendTo,N,this);}else{this.on("init",function(){I.later(0,this,this.appendTo,N);});}}else{if(!W&&a&&a!=Y){O=a.parentNode;if(O){this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:O});O.replaceChild(Y,a);this.fireEvent("appendTo",{type:"appendTo",target:O});}}else{if(this.get("type")!="link"&&W&&a&&a==Y){this._addListenersToForm();}}}this.fireEvent("init",{type:"init",target:this});},initAttributes:function(O){var N=O||{};YAHOO.widget.Button.superclass.initAttributes.call(this,N);this.setAttributeConfig("type",{value:(N.type||"push"),validator:I.isString,writeOnce:true,method:this._setType});this.setAttributeConfig("label",{value:N.label,validator:I.isString,method:this._setLabel});this.setAttributeConfig("value",{value:N.value});this.setAttributeConfig("name",{value:N.name,validator:I.isString});this.setAttributeConfig("tabindex",{value:N.tabindex,validator:I.isNumber,method:this._setTabIndex});this.configureAttribute("title",{value:N.title,validator:I.isString,method:this._setTitle});this.setAttributeConfig("disabled",{value:(N.disabled||false),validator:I.isBoolean,method:this._setDisabled});this.setAttributeConfig("href",{value:N.href,validator:I.isString,method:this._setHref});this.setAttributeConfig("target",{value:N.target,validator:I.isString,method:this._setTarget});this.setAttributeConfig("checked",{value:(N.checked||false),validator:I.isBoolean,method:this._setChecked});this.setAttributeConfig("container",{value:N.container,writeOnce:true});this.setAttributeConfig("srcelement",{value:N.srcelement,writeOnce:true});this.setAttributeConfig("menu",{value:null,method:this._setMenu,writeOnce:true});this.setAttributeConfig("lazyloadmenu",{value:(N.lazyloadmenu===false?false:true),validator:I.isBoolean,writeOnce:true});this.setAttributeConfig("menuclassname",{value:(N.menuclassname||(this.CLASS_NAME_PREFIX+"button-menu")),validator:I.isString,method:this._setMenuClassName,writeOnce:true});this.setAttributeConfig("menuminscrollheight",{value:(N.menuminscrollheight||90),validator:I.isNumber});this.setAttributeConfig("menumaxheight",{value:(N.menumaxheight||0),validator:I.isNumber});this.setAttributeConfig("menualignment",{value:(N.menualignment||["tl","bl"]),validator:I.isArray});this.setAttributeConfig("selectedMenuItem",{value:null});this.setAttributeConfig("onclick",{value:N.onclick,method:this._setOnClick});this.setAttributeConfig("focusmenu",{value:(N.focusmenu===false?false:true),validator:I.isBoolean});this.setAttributeConfig("replaceLabel",{value:false,validator:I.isBoolean,writeOnce:true});},focus:function(){if(!this.get("disabled")){this._button.focus();}},blur:function(){if(!this.get("disabled")){this._button.blur();}},hasFocus:function(){return(C==this);},isActive:function(){return this.hasClass(this.CLASS_NAME_PREFIX+this.CSS_CLASS_NAME+"-active");},getMenu:function(){return this._menu;},getForm:function(){var N=this._button,O;if(N){O=N.form;}return O;},getHiddenFields:function(){return this._hiddenFields;},destroy:function(){var P=this.get("element"),N=this._menu,T=this._label,O,S;if(N){if(K&&K.find(N)){K.remove(N);}N.destroy();}M.purgeElement(P);M.purgeElement(this._button);M.removeListener(document,"mouseup",this._onDocumentMouseUp);M.removeListener(document,"keyup",this._onDocumentKeyUp);M.removeListener(document,"mousedown",this._onDocumentMouseDown);if(T){M.removeListener(T,"click",this._onLabelClick);O=T.parentNode;O.removeChild(T);}var Q=this.getForm();if(Q){M.removeListener(Q,"reset",this._onFormReset);M.removeListener(Q,"submit",this._onFormSubmit);}this.unsubscribeAll();O=P.parentNode;if(O){O.removeChild(P);}delete D[this.get("id")];var R=(this.CLASS_NAME_PREFIX+this.CSS_CLASS_NAME);S=G.getElementsByClassName(R,this.NODE_NAME,Q);if(I.isArray(S)&&S.length===0){M.removeListener(Q,"keypress",YAHOO.widget.Button.onFormKeyPress);}},fireEvent:function(O,N){var P=arguments[0];if(this.DOM_EVENTS[P]&&this.get("disabled")){return false;}return YAHOO.widget.Button.superclass.fireEvent.apply(this,arguments);},toString:function(){return("Button "+this.get("id"));}});YAHOO.widget.Button.onFormKeyPress=function(R){var P=M.getTarget(R),S=M.getCharCode(R),Q=P.nodeName&&P.nodeName.toUpperCase(),N=P.type,T=false,V,X,O,W;function U(a){var Z,Y;switch(a.nodeName.toUpperCase()){case"INPUT":case"BUTTON":if(a.type=="submit"&&!a.disabled){if(!T&&!O){O=a;}}break;default:Z=a.id;if(Z){V=D[Z];if(V){T=true;if(!V.get("disabled")){Y=V.get("srcelement");if(!X&&(V.get("type")=="submit"||(Y&&Y.type=="submit"))){X=V;}}}}break;}}if(S==13&&((Q=="INPUT"&&(N=="text"||N=="password"||N=="checkbox"||N=="radio"||N=="file"))||Q=="SELECT")){G.getElementsBy(U,"*",this);if(O){O.focus();}else{if(!O&&X){M.preventDefault(R);if(L.ie){X.get("element").fireEvent("onclick");}else{W=document.createEvent("HTMLEvents");W.initEvent("click",true,true);if(L.gecko<1.9){X.fireEvent("click",W);}else{X.get("element").dispatchEvent(W);}}}}}};YAHOO.widget.Button.addHiddenFieldsToForm=function(N){var R=YAHOO.widget.Button.prototype,T=G.getElementsByClassName((R.CLASS_NAME_PREFIX+R.CSS_CLASS_NAME),"*",N),Q=T.length,S,O,P;if(Q>0){for(P=0;P0){F=H-1;do{this._buttons[F].set("disabled",G);}while(F--);}},_onKeyDown:function(K){var G=B.getTarget(K),I=B.getCharCode(K),H=G.parentNode.parentNode.id,J=E[H],F=-1;if(I==37||I==38){F=(J.index===0)?(this._buttons.length-1):(J.index-1);}else{if(I==39||I==40){F=(J.index===(this._buttons.length-1))?0:(J.index+1);}}if(F>-1){this.check(F);this.getButton(F).focus();}},_onAppendTo:function(H){var I=this._buttons,G=I.length,F;for(F=0;F0){this.addButtons(J);}function F(L){return(L.type=="radio");}J=C.getElementsBy(F,"input",this.get("element"));if(J.length>0){this.addButtons(J);}this.on("keydown",this._onKeyDown);this.on("appendTo",this._onAppendTo);var G=this.get("container");if(G){if(D.isString(G)){B.onContentReady(G,function(){this.appendTo(G);},null,this);}else{this.appendTo(G);}}},initAttributes:function(G){var F=G||{};YAHOO.widget.ButtonGroup.superclass.initAttributes.call(this,F);this.setAttributeConfig("name",{value:F.name,validator:D.isString});this.setAttributeConfig("disabled",{value:(F.disabled||false),validator:D.isBoolean,method:this._setDisabled});this.setAttributeConfig("value",{value:F.value});this.setAttributeConfig("container",{value:F.container,writeOnce:true});this.setAttributeConfig("checkedButton",{value:null});},addButton:function(J){var L,K,G,F,H,I;if(J instanceof A&&J.get("type")=="radio"){L=J;}else{if(!D.isString(J)&&!J.nodeName){J.type="radio";L=new A(J);}else{L=new A(J,{type:"radio"});}}if(L){F=this._buttons.length;H=L.get("name");I=this.get("name");L.index=F;this._buttons[F]=L;E[L.get("id")]=L;if(H!=I){L.set("name",I);}if(this.get("disabled")){L.set("disabled",true);}if(L.get("checked")){this.set("checkedButton",L);}K=L.get("element");G=this.get("element");if(K.parentNode!=G){G.appendChild(K);}L.on("checkedChange",this._onButtonCheckedChange,L,this);}return L;},addButtons:function(G){var H,I,J,F;if(D.isArray(G)){H=G.length;J=[];if(H>0){for(F=0;F0){F=this._buttons.length-1;do{this._buttons[F].index=F;}while(F--);}}},getButton:function(F){return this._buttons[F];},getButtons:function(){return this._buttons;},getCount:function(){return this._buttons.length;},focus:function(H){var I,G,F;if(D.isNumber(H)){I=this._buttons[H];if(I){I.focus();}}else{G=this.getCount();for(F=0;F0){G=this._buttons.length-1;do{this._buttons[G].destroy();}while(G--);}B.purgeElement(H);F.removeChild(H);},toString:function(){return("ButtonGroup "+this.get("id"));}});})();YAHOO.register("button",YAHOO.widget.Button,{version:"2.8.0r4",build:"2449"}); \ No newline at end of file +(function(){var G=YAHOO.util.Dom,M=YAHOO.util.Event,I=YAHOO.lang,L=YAHOO.env.ua,B=YAHOO.widget.Overlay,J=YAHOO.widget.Menu,D={},K=null,E=null,C=null;function F(O,N,R,P){var S,Q;if(I.isString(O)&&I.isString(N)){if(L.ie&&(L.ie<9)){Q='0){V.label=Q;}}}function A(P){var O=P.attributes,N=O.srcelement,R=N.nodeName.toUpperCase(),Q=this;if(R==this.NODE_NAME){P.element=N;P.id=N.id;G.getElementsBy(function(S){switch(S.nodeName.toUpperCase()){case"BUTTON":case"A":case"INPUT":H.call(Q,S,O);break;}},"*",N);}else{switch(R){case"BUTTON":case"A":case"INPUT":H.call(this,N,O);break;}}}YAHOO.widget.Button=function(R,O){if(!B&&YAHOO.widget.Overlay){B=YAHOO.widget.Overlay;}if(!J&&YAHOO.widget.Menu){J=YAHOO.widget.Menu;}var Q=YAHOO.widget.Button.superclass.constructor,P,N;if(arguments.length==1&&!I.isString(R)&&!R.nodeName){if(!R.id){R.id=G.generateId();}Q.call(this,(this.createButtonElement(R.type)),R);}else{P={element:null,attributes:(O||{})};if(I.isString(R)){N=G.get(R);if(N){if(!P.attributes.id){P.attributes.id=R;}P.attributes.srcelement=N;A.call(this,P);if(!P.element){P.element=this.createButtonElement(P.attributes.type);}Q.call(this,P.element,P.attributes);}}else{if(R.nodeName){if(!P.attributes.id){if(R.id){P.attributes.id=R.id;}else{P.attributes.id=G.generateId();}}P.attributes.srcelement=R;A.call(this,P);if(!P.element){P.element=this.createButtonElement(P.attributes.type);}Q.call(this,P.element,P.attributes);}}}};YAHOO.extend(YAHOO.widget.Button,YAHOO.util.Element,{_button:null,_menu:null,_hiddenFields:null,_onclickAttributeValue:null,_activationKeyPressed:false,_activationButtonPressed:false,_hasKeyEventHandlers:false,_hasMouseEventHandlers:false,_nOptionRegionX:0,CLASS_NAME_PREFIX:"yui-",NODE_NAME:"SPAN",CHECK_ACTIVATION_KEYS:[32],ACTIVATION_KEYS:[13,32],OPTION_AREA_WIDTH:20,CSS_CLASS_NAME:"button",_setType:function(N){if(N=="split"){this.on("option",this._onOption);}},_setLabel:function(O){this._button.innerHTML=O;var P,N=L.gecko;if(N&&N<1.9&&G.inDocument(this.get("element"))){P=(this.CLASS_NAME_PREFIX+this.CSS_CLASS_NAME);this.removeClass(P);I.later(0,this,this.addClass,P);}},_setTabIndex:function(N){this._button.tabIndex=N;},_setTitle:function(N){if(this.get("type")!="link"){this._button.title=N;}},_setDisabled:function(N){if(this.get("type")!="link"){if(N){if(this._menu){this._menu.hide();}if(this.hasFocus()){this.blur();}this._button.setAttribute("disabled","disabled");this.addStateCSSClasses("disabled");this.removeStateCSSClasses("hover");this.removeStateCSSClasses("active");this.removeStateCSSClasses("focus");}else{this._button.removeAttribute("disabled");this.removeStateCSSClasses("disabled");}}},_setHref:function(N){if(this.get("type")=="link"){this._button.href=N;}},_setTarget:function(N){if(this.get("type")=="link"){this._button.setAttribute("target",N);}},_setChecked:function(N){var O=this.get("type");if(O=="checkbox"||O=="radio"){if(N){this.addStateCSSClasses("checked");}else{this.removeStateCSSClasses("checked");}}},_setMenu:function(U){var P=this.get("lazyloadmenu"),R=this.get("element"),N,W=false,X,O,Q;function V(){X.render(R.parentNode);this.removeListener("appendTo",V);}function T(){X.cfg.queueProperty("container",R.parentNode);this.removeListener("appendTo",T);}function S(){var Y;if(X){G.addClass(X.element,this.get("menuclassname"));G.addClass(X.element,this.CLASS_NAME_PREFIX+this.get("type")+"-button-menu");X.showEvent.subscribe(this._onMenuShow,null,this);X.hideEvent.subscribe(this._onMenuHide,null,this);X.renderEvent.subscribe(this._onMenuRender,null,this);if(J&&X instanceof J){if(P){Y=this.get("container");if(Y){X.cfg.queueProperty("container",Y);}else{this.on("appendTo",T);}}X.cfg.queueProperty("clicktohide",false);X.keyDownEvent.subscribe(this._onMenuKeyDown,this,true);X.subscribe("click",this._onMenuClick,this,true);this.on("selectedMenuItemChange",this._onSelectedMenuItemChange);Q=X.srcElement;if(Q&&Q.nodeName.toUpperCase()=="SELECT"){Q.style.display="none";Q.parentNode.removeChild(Q);}}else{if(B&&X instanceof B){if(!K){K=new YAHOO.widget.OverlayManager();}K.register(X);}}this._menu=X;if(!W&&!P){if(G.inDocument(R)){X.render(R.parentNode);}else{this.on("appendTo",V);}}}}if(B){if(J){N=J.prototype.CSS_CLASS_NAME;}if(U&&J&&(U instanceof J)){X=U;W=true;S.call(this);}else{if(B&&U&&(U instanceof B)){X=U;W=true;X.cfg.queueProperty("visible",false);S.call(this);}else{if(J&&I.isArray(U)){X=new J(G.generateId(),{lazyload:P,itemdata:U});this._menu=X;this.on("appendTo",S);}else{if(I.isString(U)){O=G.get(U);if(O){if(J&&G.hasClass(O,N)||O.nodeName.toUpperCase()=="SELECT"){X=new J(U,{lazyload:P});S.call(this);}else{if(B){X=new B(U,{visible:false});S.call(this);}}}}else{if(U&&U.nodeName){if(J&&G.hasClass(U,N)||U.nodeName.toUpperCase()=="SELECT"){X=new J(U,{lazyload:P});S.call(this);}else{if(B){if(!U.id){G.generateId(U);}X=new B(U,{visible:false});S.call(this);}}}}}}}}},_setOnClick:function(N){if(this._onclickAttributeValue&&(this._onclickAttributeValue!=N)){this.removeListener("click",this._onclickAttributeValue.fn); +this._onclickAttributeValue=null;}if(!this._onclickAttributeValue&&I.isObject(N)&&I.isFunction(N.fn)){this.on("click",N.fn,N.obj,N.scope);this._onclickAttributeValue=N;}},_isActivationKey:function(N){var S=this.get("type"),O=(S=="checkbox"||S=="radio")?this.CHECK_ACTIVATION_KEYS:this.ACTIVATION_KEYS,Q=O.length,R=false,P;if(Q>0){P=Q-1;do{if(N==O[P]){R=true;break;}}while(P--);}return R;},_isSplitButtonOptionKey:function(P){var O=(M.getCharCode(P)==40);var N=function(Q){M.preventDefault(Q);this.removeListener("keypress",N);};if(O){if(L.opera){this.on("keypress",N);}M.preventDefault(P);}return O;},_addListenersToForm:function(){var T=this.getForm(),S=YAHOO.widget.Button.onFormKeyPress,R,N,Q,P,O;if(T){M.on(T,"reset",this._onFormReset,null,this);M.on(T,"submit",this._onFormSubmit,null,this);N=this.get("srcelement");if(this.get("type")=="submit"||(N&&N.type=="submit")){Q=M.getListeners(T,"keypress");R=false;if(Q){P=Q.length;if(P>0){O=P-1;do{if(Q[O].fn==S){R=true;break;}}while(O--);}}if(!R){M.on(T,"keypress",S);}}}},_showMenu:function(R){if(YAHOO.widget.MenuManager){YAHOO.widget.MenuManager.hideVisible();}if(K){K.hideAll();}var N=this._menu,Q=this.get("menualignment"),P=this.get("focusmenu"),O;if(this._renderedMenu){N.cfg.setProperty("context",[this.get("element"),Q[0],Q[1]]);N.cfg.setProperty("preventcontextoverlap",true);N.cfg.setProperty("constraintoviewport",true);}else{N.cfg.queueProperty("context",[this.get("element"),Q[0],Q[1]]);N.cfg.queueProperty("preventcontextoverlap",true);N.cfg.queueProperty("constraintoviewport",true);}this.focus();if(J&&N&&(N instanceof J)){O=N.focus;N.focus=function(){};if(this._renderedMenu){N.cfg.setProperty("minscrollheight",this.get("menuminscrollheight"));N.cfg.setProperty("maxheight",this.get("menumaxheight"));}else{N.cfg.queueProperty("minscrollheight",this.get("menuminscrollheight"));N.cfg.queueProperty("maxheight",this.get("menumaxheight"));}N.show();N.focus=O;N.align();if(R.type=="mousedown"){M.stopPropagation(R);}if(P){N.focus();}}else{if(B&&N&&(N instanceof B)){if(!this._renderedMenu){N.render(this.get("element").parentNode);}N.show();N.align();}}},_hideMenu:function(){var N=this._menu;if(N){N.hide();}},_onMouseOver:function(O){var Q=this.get("type"),N,P;if(Q==="split"){N=this.get("element");P=(G.getX(N)+(N.offsetWidth-this.OPTION_AREA_WIDTH));this._nOptionRegionX=P;}if(!this._hasMouseEventHandlers){if(Q==="split"){this.on("mousemove",this._onMouseMove);}this.on("mouseout",this._onMouseOut);this._hasMouseEventHandlers=true;}this.addStateCSSClasses("hover");if(Q==="split"&&(M.getPageX(O)>P)){this.addStateCSSClasses("hoveroption");}if(this._activationButtonPressed){this.addStateCSSClasses("active");}if(this._bOptionPressed){this.addStateCSSClasses("activeoption");}if(this._activationButtonPressed||this._bOptionPressed){M.removeListener(document,"mouseup",this._onDocumentMouseUp);}},_onMouseMove:function(N){var O=this._nOptionRegionX;if(O){if(M.getPageX(N)>O){this.addStateCSSClasses("hoveroption");}else{this.removeStateCSSClasses("hoveroption");}}},_onMouseOut:function(N){var O=this.get("type");this.removeStateCSSClasses("hover");if(O!="menu"){this.removeStateCSSClasses("active");}if(this._activationButtonPressed||this._bOptionPressed){M.on(document,"mouseup",this._onDocumentMouseUp,null,this);}if(O==="split"&&(M.getPageX(N)>this._nOptionRegionX)){this.removeStateCSSClasses("hoveroption");}},_onDocumentMouseUp:function(P){this._activationButtonPressed=false;this._bOptionPressed=false;var Q=this.get("type"),N,O;if(Q=="menu"||Q=="split"){N=M.getTarget(P);O=this._menu.element;if(N!=O&&!G.isAncestor(O,N)){this.removeStateCSSClasses((Q=="menu"?"active":"activeoption"));this._hideMenu();}}M.removeListener(document,"mouseup",this._onDocumentMouseUp);},_onMouseDown:function(P){var Q,O=true;function N(){this._hideMenu();this.removeListener("mouseup",N);}if((P.which||P.button)==1){if(!this.hasFocus()){I.later(0,this,this.focus);}Q=this.get("type");if(Q=="split"){if(M.getPageX(P)>this._nOptionRegionX){this.fireEvent("option",P);O=false;}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}else{if(Q=="menu"){if(this.isActive()){this._hideMenu();this._activationButtonPressed=false;}else{this._showMenu(P);this._activationButtonPressed=true;}}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}if(Q=="split"||Q=="menu"){this._hideMenuTimer=I.later(250,this,this.on,["mouseup",N]);}}return O;},_onMouseUp:function(P){this.inMouseDown=false;var Q=this.get("type"),N=this._hideMenuTimer,O=true;if(N){N.cancel();}if(Q=="checkbox"||Q=="radio"){if((P.which||P.button)!=1){return;}this.set("checked",!(this.get("checked")));}this._activationButtonPressed=false;if(Q!="menu"){this.removeStateCSSClasses("active");}if(Q=="split"&&M.getPageX(P)>this._nOptionRegionX){O=false;}return O;},_onFocus:function(O){var N;this.addStateCSSClasses("focus");if(this._activationKeyPressed){this.addStateCSSClasses("active");}C=this;if(!this._hasKeyEventHandlers){N=this._button;M.on(N,"blur",this._onBlur,null,this);M.on(N,"keydown",this._onKeyDown,null,this);M.on(N,"keyup",this._onKeyUp,null,this);this._hasKeyEventHandlers=true;}this.fireEvent("focus",O);},_onBlur:function(N){this.removeStateCSSClasses("focus");if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}if(this._activationKeyPressed){M.on(document,"keyup",this._onDocumentKeyUp,null,this);}C=null;this.fireEvent("blur",N);},_onDocumentKeyUp:function(N){if(this._isActivationKey(M.getCharCode(N))){this._activationKeyPressed=false;M.removeListener(document,"keyup",this._onDocumentKeyUp);}},_onKeyDown:function(O){var N=this._menu;if(this.get("type")=="split"&&this._isSplitButtonOptionKey(O)){this.fireEvent("option",O);}else{if(this._isActivationKey(M.getCharCode(O))){if(this.get("type")=="menu"){this._showMenu(O);}else{this._activationKeyPressed=true;this.addStateCSSClasses("active");}}}if(N&&N.cfg.getProperty("visible")&&M.getCharCode(O)==27){N.hide();this.focus();}},_onKeyUp:function(N){var O; +if(this._isActivationKey(M.getCharCode(N))){O=this.get("type");if(O=="checkbox"||O=="radio"){this.set("checked",!(this.get("checked")));}this._activationKeyPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}}},_onClick:function(P){var R=this.get("type"),Q,N,O;switch(R){case"submit":if(P.returnValue!==false){this.submitForm();}break;case"reset":Q=this.getForm();if(Q){Q.reset();}break;case"split":if(this._nOptionRegionX>0&&(M.getPageX(P)>this._nOptionRegionX)){O=false;}else{this._hideMenu();N=this.get("srcelement");if(N&&N.type=="submit"&&P.returnValue!==false){this.submitForm();}}break;}return O;},_onDblClick:function(O){var N=true;if(this.get("type")=="split"&&M.getPageX(O)>this._nOptionRegionX){N=false;}return N;},_onAppendTo:function(N){I.later(0,this,this._addListenersToForm);},_onFormReset:function(O){var P=this.get("type"),N=this._menu;if(P=="checkbox"||P=="radio"){this.resetValue("checked");}if(J&&N&&(N instanceof J)){this.resetValue("selectedMenuItem");}},_onFormSubmit:function(N){this.createHiddenFields();},_onDocumentMouseDown:function(R){var O=M.getTarget(R),Q=this.get("element"),P=this._menu.element;function N(T){var V,S,U;if(!T){return true;}for(V=0,S=T.length;V'+(N=="link"?"":'')+"";return O;},addStateCSSClasses:function(O){var P=this.get("type"),N=this.CLASS_NAME_PREFIX;if(I.isString(O)){if(O!="activeoption"&&O!="hoveroption"){this.addClass(N+this.CSS_CLASS_NAME+("-"+O));}this.addClass(N+P+("-button-"+O));}},removeStateCSSClasses:function(O){var P=this.get("type"),N=this.CLASS_NAME_PREFIX;if(I.isString(O)){this.removeClass(N+this.CSS_CLASS_NAME+("-"+O));this.removeClass(N+P+("-button-"+O));}},createHiddenFields:function(){this.removeHiddenFields();var V=this.getForm(),Z,O,S,X,Y,T,U,N,R,W,P,Q=false;if(V&&!this.get("disabled")){O=this.get("type");S=(O=="checkbox"||O=="radio");if((S&&this.get("checked"))||(E==this)){Z=F((S?O:"hidden"),this.get("name"),this.get("value"),this.get("checked"));if(Z){if(S){Z.style.display="none";}V.appendChild(Z);}}X=this._menu;if(J&&X&&(X instanceof J)){Y=this.get("selectedMenuItem");P=X.srcElement;Q=(P&&P.nodeName.toUpperCase()=="SELECT");if(Y){U=(Y.value===null||Y.value==="")?Y.cfg.getProperty("text"):Y.value;T=this.get("name");if(Q){W=P.name;}else{if(T){W=(T+"_options");}}if(U&&W){N=F("hidden",W,U);V.appendChild(N);}}else{if(Q){N=V.appendChild(P);}}}if(Z&&N){this._hiddenFields=[Z,N];}else{if(!Z&&N){this._hiddenFields=N;}else{if(Z&&!N){this._hiddenFields=Z;}}}R=this._hiddenFields;}return R;},removeHiddenFields:function(){var Q=this._hiddenFields,O,P;function N(R){if(G.inDocument(R)){R.parentNode.removeChild(R);}}if(Q){if(I.isArray(Q)){O=Q.length;if(O>0){P=O-1;do{N(Q[P]);}while(P--);}}else{N(Q);}this._hiddenFields=null;}},submitForm:function(){var Q=this.getForm(),P=this.get("srcelement"),O=false,N;if(Q){if(this.get("type")=="submit"||(P&&P.type=="submit")){E=this;}if(L.ie&&(L.ie<9)){O=Q.fireEvent("onsubmit");}else{N=document.createEvent("HTMLEvents");N.initEvent("submit",true,true);O=Q.dispatchEvent(N);}if((L.ie||L.webkit)&&O){Q.submit();}}return O;},init:function(P,d){var V=d.type=="link"?"a":"button",a=d.srcelement,S=P.getElementsByTagName(V)[0],U;if(!S){U=P.getElementsByTagName("input")[0];if(U){S=document.createElement("button");S.setAttribute("type","button");U.parentNode.replaceChild(S,U);}}this._button=S;YAHOO.widget.Button.superclass.init.call(this,P,d);var T=this.get("id"),Z=T+"-button";S.id=Z;var X,Q;var e=function(f){return(f.htmlFor===T);};var c=function(){Q.setAttribute((L.ie?"htmlFor":"for"),Z);};if(a&&this.get("type")!="link"){X=G.getElementsBy(e,"label");if(I.isArray(X)&&X.length>0){Q=X[0];}}D[T]=this;var b=this.CLASS_NAME_PREFIX;this.addClass(b+this.CSS_CLASS_NAME);this.addClass(b+this.get("type")+"-button");M.on(this._button,"focus",this._onFocus,null,this);this.on("mouseover",this._onMouseOver);this.on("mousedown",this._onMouseDown); +this.on("mouseup",this._onMouseUp);this.on("click",this._onClick);var R=this.get("onclick");this.set("onclick",null);this.set("onclick",R);this.on("dblclick",this._onDblClick);var O;if(Q){if(this.get("replaceLabel")){this.set("label",Q.innerHTML);O=Q.parentNode;O.removeChild(Q);}else{this.on("appendTo",c);M.on(Q,"click",this._onLabelClick,null,this);this._label=Q;}}this.on("appendTo",this._onAppendTo);var N=this.get("container"),Y=this.get("element"),W=G.inDocument(Y);if(N){if(a&&a!=Y){O=a.parentNode;if(O){O.removeChild(a);}}if(I.isString(N)){M.onContentReady(N,this.appendTo,N,this);}else{this.on("init",function(){I.later(0,this,this.appendTo,N);});}}else{if(!W&&a&&a!=Y){O=a.parentNode;if(O){this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:O});O.replaceChild(Y,a);this.fireEvent("appendTo",{type:"appendTo",target:O});}}else{if(this.get("type")!="link"&&W&&a&&a==Y){this._addListenersToForm();}}}this.fireEvent("init",{type:"init",target:this});},initAttributes:function(O){var N=O||{};YAHOO.widget.Button.superclass.initAttributes.call(this,N);this.setAttributeConfig("type",{value:(N.type||"push"),validator:I.isString,writeOnce:true,method:this._setType});this.setAttributeConfig("label",{value:N.label,validator:I.isString,method:this._setLabel});this.setAttributeConfig("value",{value:N.value});this.setAttributeConfig("name",{value:N.name,validator:I.isString});this.setAttributeConfig("tabindex",{value:N.tabindex,validator:I.isNumber,method:this._setTabIndex});this.configureAttribute("title",{value:N.title,validator:I.isString,method:this._setTitle});this.setAttributeConfig("disabled",{value:(N.disabled||false),validator:I.isBoolean,method:this._setDisabled});this.setAttributeConfig("href",{value:N.href,validator:I.isString,method:this._setHref});this.setAttributeConfig("target",{value:N.target,validator:I.isString,method:this._setTarget});this.setAttributeConfig("checked",{value:(N.checked||false),validator:I.isBoolean,method:this._setChecked});this.setAttributeConfig("container",{value:N.container,writeOnce:true});this.setAttributeConfig("srcelement",{value:N.srcelement,writeOnce:true});this.setAttributeConfig("menu",{value:null,method:this._setMenu,writeOnce:true});this.setAttributeConfig("lazyloadmenu",{value:(N.lazyloadmenu===false?false:true),validator:I.isBoolean,writeOnce:true});this.setAttributeConfig("menuclassname",{value:(N.menuclassname||(this.CLASS_NAME_PREFIX+"button-menu")),validator:I.isString,method:this._setMenuClassName,writeOnce:true});this.setAttributeConfig("menuminscrollheight",{value:(N.menuminscrollheight||90),validator:I.isNumber});this.setAttributeConfig("menumaxheight",{value:(N.menumaxheight||0),validator:I.isNumber});this.setAttributeConfig("menualignment",{value:(N.menualignment||["tl","bl"]),validator:I.isArray});this.setAttributeConfig("selectedMenuItem",{value:null});this.setAttributeConfig("onclick",{value:N.onclick,method:this._setOnClick});this.setAttributeConfig("focusmenu",{value:(N.focusmenu===false?false:true),validator:I.isBoolean});this.setAttributeConfig("replaceLabel",{value:false,validator:I.isBoolean,writeOnce:true});},focus:function(){if(!this.get("disabled")){try{this._button.focus();}catch(N){}}},blur:function(){if(!this.get("disabled")){try{this._button.blur();}catch(N){}}},hasFocus:function(){return(C==this);},isActive:function(){return this.hasClass(this.CLASS_NAME_PREFIX+this.CSS_CLASS_NAME+"-active");},getMenu:function(){return this._menu;},getForm:function(){var N=this._button,O;if(N){O=N.form;}return O;},getHiddenFields:function(){return this._hiddenFields;},destroy:function(){var P=this.get("element"),N=this._menu,T=this._label,O,S;if(N){if(K&&K.find(N)){K.remove(N);}N.destroy();}M.purgeElement(P);M.purgeElement(this._button);M.removeListener(document,"mouseup",this._onDocumentMouseUp);M.removeListener(document,"keyup",this._onDocumentKeyUp);M.removeListener(document,"mousedown",this._onDocumentMouseDown);if(T){M.removeListener(T,"click",this._onLabelClick);O=T.parentNode;O.removeChild(T);}var Q=this.getForm();if(Q){M.removeListener(Q,"reset",this._onFormReset);M.removeListener(Q,"submit",this._onFormSubmit);}this.unsubscribeAll();O=P.parentNode;if(O){O.removeChild(P);}delete D[this.get("id")];var R=(this.CLASS_NAME_PREFIX+this.CSS_CLASS_NAME);S=G.getElementsByClassName(R,this.NODE_NAME,Q);if(I.isArray(S)&&S.length===0){M.removeListener(Q,"keypress",YAHOO.widget.Button.onFormKeyPress);}},fireEvent:function(O,N){var P=arguments[0];if(this.DOM_EVENTS[P]&&this.get("disabled")){return false;}return YAHOO.widget.Button.superclass.fireEvent.apply(this,arguments);},toString:function(){return("Button "+this.get("id"));}});YAHOO.widget.Button.onFormKeyPress=function(R){var P=M.getTarget(R),S=M.getCharCode(R),Q=P.nodeName&&P.nodeName.toUpperCase(),N=P.type,T=false,V,X,O,W;function U(a){var Z,Y;switch(a.nodeName.toUpperCase()){case"INPUT":case"BUTTON":if(a.type=="submit"&&!a.disabled){if(!T&&!O){O=a;}}break;default:Z=a.id;if(Z){V=D[Z];if(V){T=true;if(!V.get("disabled")){Y=V.get("srcelement");if(!X&&(V.get("type")=="submit"||(Y&&Y.type=="submit"))){X=V;}}}}break;}}if(S==13&&((Q=="INPUT"&&(N=="text"||N=="password"||N=="checkbox"||N=="radio"||N=="file"))||Q=="SELECT")){G.getElementsBy(U,"*",this);if(O){O.focus();}else{if(!O&&X){M.preventDefault(R);if(L.ie){X.get("element").fireEvent("onclick");}else{W=document.createEvent("HTMLEvents");W.initEvent("click",true,true);if(L.gecko<1.9){X.fireEvent("click",W);}else{X.get("element").dispatchEvent(W);}}}}}};YAHOO.widget.Button.addHiddenFieldsToForm=function(N){var R=YAHOO.widget.Button.prototype,T=G.getElementsByClassName((R.CLASS_NAME_PREFIX+R.CSS_CLASS_NAME),"*",N),Q=T.length,S,O,P;if(Q>0){for(P=0;P0){F=H-1;do{this._buttons[F].set("disabled",G);}while(F--);}},_onKeyDown:function(K){var G=B.getTarget(K),I=B.getCharCode(K),H=G.parentNode.parentNode.id,J=E[H],F=-1;if(I==37||I==38){F=(J.index===0)?(this._buttons.length-1):(J.index-1);}else{if(I==39||I==40){F=(J.index===(this._buttons.length-1))?0:(J.index+1);}}if(F>-1){this.check(F);this.getButton(F).focus();}},_onAppendTo:function(H){var I=this._buttons,G=I.length,F;for(F=0;F0){this.addButtons(J);}function F(L){return(L.type=="radio");}J=C.getElementsBy(F,"input",this.get("element"));if(J.length>0){this.addButtons(J);}this.on("keydown",this._onKeyDown);this.on("appendTo",this._onAppendTo);var G=this.get("container");if(G){if(D.isString(G)){B.onContentReady(G,function(){this.appendTo(G);},null,this);}else{this.appendTo(G);}}},initAttributes:function(G){var F=G||{};YAHOO.widget.ButtonGroup.superclass.initAttributes.call(this,F);this.setAttributeConfig("name",{value:F.name,validator:D.isString});this.setAttributeConfig("disabled",{value:(F.disabled||false),validator:D.isBoolean,method:this._setDisabled});this.setAttributeConfig("value",{value:F.value});this.setAttributeConfig("container",{value:F.container,writeOnce:true});this.setAttributeConfig("checkedButton",{value:null});},addButton:function(J){var L,K,G,F,H,I;if(J instanceof A&&J.get("type")=="radio"){L=J;}else{if(!D.isString(J)&&!J.nodeName){J.type="radio";L=new A(J);}else{L=new A(J,{type:"radio"});}}if(L){F=this._buttons.length;H=L.get("name");I=this.get("name");L.index=F;this._buttons[F]=L;E[L.get("id")]=L;if(H!=I){L.set("name",I);}if(this.get("disabled")){L.set("disabled",true);}if(L.get("checked")){this.set("checkedButton",L);}K=L.get("element");G=this.get("element");if(K.parentNode!=G){G.appendChild(K);}L.on("checkedChange",this._onButtonCheckedChange,L,this);}return L;},addButtons:function(G){var H,I,J,F;if(D.isArray(G)){H=G.length;J=[];if(H>0){for(F=0;F0){F=this._buttons.length-1;do{this._buttons[F].index=F;}while(F--);}}},getButton:function(F){return this._buttons[F];},getButtons:function(){return this._buttons;},getCount:function(){return this._buttons.length;},focus:function(H){var I,G,F;if(D.isNumber(H)){I=this._buttons[H];if(I){I.focus();}}else{G=this.getCount();for(F=0;F0){G=this._buttons.length-1;do{this._buttons[G].destroy();}while(G--);}B.purgeElement(H);F.removeChild(H);},toString:function(){return("ButtonGroup "+this.get("id"));}});})();YAHOO.register("button",YAHOO.widget.Button,{version:"2.9.0",build:"2800"}); \ No newline at end of file diff --git a/include/javascript/yui/build/button/button.js b/include/javascript/yui/build/button/button.js index b57c819e..3ea265d1 100644 --- a/include/javascript/yui/build/button/button.js +++ b/include/javascript/yui/build/button/button.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ /** * @module button @@ -121,7 +121,7 @@ version: 2.8.0r4 if (Lang.isString(p_sType) && Lang.isString(p_sName)) { - if (UA.ie) { + if (UA.ie && (UA.ie < 9)) { /* For IE it is necessary to create the element with the @@ -142,12 +142,14 @@ version: 2.8.0r4 oInput = document.createElement(sInput); - } - else { + oInput.value = p_sValue; + + } else { oInput = document.createElement("input"); oInput.name = p_sName; oInput.type = p_sType; + oInput.value = p_sValue; if (p_bChecked) { @@ -157,7 +159,6 @@ version: 2.8.0r4 } - oInput.value = p_sValue; } @@ -712,7 +713,7 @@ version: 2.8.0r4 * @method _setLabel * @description Sets the value of the button's "label" attribute. * @protected - * @param {String} p_sLabel String indicating the value for the button's + * @param {HTML} p_sLabel String indicating the value for the button's * "label" attribute. */ _setLabel: function (p_sLabel) { @@ -1623,7 +1624,7 @@ version: 2.8.0r4 * passed back by the event utility (YAHOO.util.Event). */ _onMouseDown: function (p_oEvent) { - + var sType, bReturnVal = true; @@ -1640,9 +1641,8 @@ version: 2.8.0r4 if (!this.hasFocus()) { - - this.focus(); - + Lang.later(0, this, this.focus); + //this.focus(); } @@ -1715,6 +1715,7 @@ version: 2.8.0r4 * passed back by the event utility (YAHOO.util.Event). */ _onMouseUp: function (p_oEvent) { + this.inMouseDown = false; var sType = this.get("type"), oHideMenuTimer = this._hideMenuTimer, @@ -1729,7 +1730,10 @@ version: 2.8.0r4 if (sType == "checkbox" || sType == "radio") { - + if ((p_oEvent.which || p_oEvent.button) != 1) { + return; + } + this.set("checked", !(this.get("checked"))); } @@ -2098,12 +2102,39 @@ version: 2.8.0r4 oButtonElement = this.get("element"), oMenuElement = this._menu.element; + function findTargetInSubmenus(aSubmenus) { + var i, iMax, oSubmenuElement; + if (!aSubmenus) { + return true; + } + for (i = 0, iMax = aSubmenus.length; i < iMax; i++) { + oSubmenuElement = aSubmenus[i].element; + if (oTarget == oSubmenuElement || Dom.isAncestor(oSubmenuElement, oTarget)) { + return true; + } + if (aSubmenus[i] && aSubmenus[i].getSubmenus) { + if (findTargetInSubmenus(aSubmenus[i].getSubmenus())) { + return true; + } + } + } + return false; + } + if (oTarget != oButtonElement && !Dom.isAncestor(oButtonElement, oTarget) && oTarget != oMenuElement && !Dom.isAncestor(oMenuElement, oTarget)) { - + + + if (this._menu && this._menu.getSubmenus) { + if (!findTargetInSubmenus(this._menu.getSubmenus())) { + return; + } + } + + this._hideMenu(); // In IE when the user mouses down on a focusable element @@ -2118,7 +2149,7 @@ version: 2.8.0r4 // appears to have focus. The following call to "setActive" // fixes this bug. - if (UA.ie && oTarget.focus) { + if (UA.ie && (UA.ie < 9) && oTarget.focus) { oTarget.setActive(); } @@ -2643,7 +2674,7 @@ version: 2.8.0r4 } - if (UA.ie) { + if (UA.ie && (UA.ie < 9)) { bSubmitForm = oForm.fireEvent("onsubmit"); @@ -2930,7 +2961,7 @@ version: 2.8.0r4 /** * @attribute label - * @description String specifying the button's text label + * @description {HTML} specifying the button's text label * or innerHTML. * @default null * @type String @@ -3324,8 +3355,12 @@ version: 2.8.0r4 focus: function () { if (!this.get("disabled")) { - - this._button.focus(); + //Adding a try/catch in case the element is not + // visible by the time it's focus is being called. + // for example, on a dialog that closes on button click + try { + this._button.focus(); + } catch (e) {} } @@ -3340,8 +3375,12 @@ version: 2.8.0r4 blur: function () { if (!this.get("disabled")) { - - this._button.blur(); + //Adding a try/catch in case the element is not + // visible by the time it's focus is being called. + // for example, on a dialog that closes on button click + try { + this._button.blur(); + } catch (e) {} } @@ -4630,4 +4669,4 @@ version: 2.8.0r4 }); })(); -YAHOO.register("button", YAHOO.widget.Button, {version: "2.8.0r4", build: "2449"}); +YAHOO.register("button", YAHOO.widget.Button, {version: "2.9.0", build: "2800"}); diff --git a/include/javascript/yui/build/calendar/assets/calendar-core.css b/include/javascript/yui/build/calendar/assets/calendar-core.css index 6dee4a48..95c492a7 100644 --- a/include/javascript/yui/build/calendar/assets/calendar-core.css +++ b/include/javascript/yui/build/calendar/assets/calendar-core.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ /** * CORE diff --git a/include/javascript/yui/build/calendar/assets/calendar.css b/include/javascript/yui/build/calendar/assets/calendar.css index fcc7c40e..403d7173 100644 --- a/include/javascript/yui/build/calendar/assets/calendar.css +++ b/include/javascript/yui/build/calendar/assets/calendar.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ .yui-calcontainer { position:relative; @@ -98,7 +98,7 @@ version: 2.8.0r4 height:12px; left:2px; z-index:1; - background: url("../../../../include/javascript/yui/build/assets/skins/sam/sprite.png") repeat scroll 0 -450px transparent; + background: url("callt.gif") no-repeat; } .yui-calendar .calnavright { @@ -112,7 +112,7 @@ version: 2.8.0r4 height:12px; right:2px; z-index:1; - background: url("../../../../include/javascript/yui/build/assets/skins/sam/sprite.png") repeat scroll 0 -500px transparent; + background: url("calrt.gif") no-repeat; } .yui-calendar td.calcell { @@ -211,6 +211,7 @@ version: 2.8.0r4 _position:relative; padding-left:2px; padding-right:2px; + text-decoration:none; color:#000; } diff --git a/include/javascript/yui/build/calendar/assets/skins/sam/calendar-skin.css b/include/javascript/yui/build/calendar/assets/skins/sam/calendar-skin.css index 3f55eca9..79764606 100644 --- a/include/javascript/yui/build/calendar/assets/skins/sam/calendar-skin.css +++ b/include/javascript/yui/build/calendar/assets/skins/sam/calendar-skin.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ /** * SAM @@ -18,6 +18,7 @@ version: 2.8.0r4 * - Cell Hover BG : 426fd9 * - Disabled BG : cccccc * - Disabled Text Color : a6a6a6 + * - Selectable OOM Text Color: a6a6a6; **/ /* CALENDAR BOUNDING BOX */ @@ -203,6 +204,11 @@ version: 2.8.0r4 cursor:default; } +/* LINK INSIDE OOM CELLS */ +.yui-skin-sam .yui-calendar td.calcell.oom a { + color:#a6a6a6; +} + /* SELECTED DATE */ .yui-skin-sam .yui-calendar td.calcell.selected { background-color:#fff; @@ -247,7 +253,6 @@ version: 2.8.0r4 text-decoration:none; color:#000; zoom:1; - background: url("../../../../include/javascript/yui/build/assets/skins/sam/sprite.png") repeat scroll 0 -500px transparent; } .yui-skin-sam .yui-calendar a.calnav:hover { diff --git a/include/javascript/yui/build/calendar/assets/skins/sam/calendar.css b/include/javascript/yui/build/calendar/assets/skins/sam/calendar.css index b72d2628..3e932f4d 100644 --- a/include/javascript/yui/build/calendar/assets/skins/sam/calendar.css +++ b/include/javascript/yui/build/calendar/assets/skins/sam/calendar.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -.yui-calcontainer{position:relative;float:left;_overflow:hidden;}.yui-calcontainer iframe{position:absolute;border:none;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0;top:0;}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px;}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative;}.yui-calcontainer .title{position:relative;z-index:1;}.yui-calcontainer .close-icon{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden;}.yui-calendar{position:relative;}.yui-calendar .calnavleft{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden;}.yui-calendar .calnavright{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden;}.yui-calendar .calheader{position:relative;width:100%;text-align:center;}.yui-calcontainer .yui-cal-nav-mask{position:absolute;z-index:2;margin:0;padding:0;width:100%;height:100%;_width:0;_height:0;left:0;top:0;display:none;}.yui-calcontainer .yui-cal-nav{position:absolute;z-index:3;top:0;display:none;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{display:-moz-inline-box;display:inline-block;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{display:block;*display:inline-block;*overflow:visible;border:none;background-color:transparent;cursor:pointer;}.yui-calendar .calbody a:hover{background:inherit;}p#clear{clear:left;padding-top:10px;}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px;}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px;}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transparent;border:none;padding:10px 5px 10px 5px;margin:0;}.yui-skin-sam .yui-calcontainer .title{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;border-bottom:1px solid #ccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left;}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px;}.yui-skin-sam .yui-calcontainer.withtitle{padding-top:0;}.yui-skin-sam .yui-calcontainer .calclose{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;margin:0;}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:none;vertical-align:middle;padding:0;}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center;}.yui-skin-sam .yui-calendar .calheader img{border:none;}.yui-skin-sam .yui-calendar .calnavleft{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calnavright{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em;}.yui-skin-sam .yui-calendar .calweekdayrow th{padding:0;border:none;}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em;}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2;}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;border:none;}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding:0 2px 0 0;}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding:0 0 0 2px;}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #ccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap;}.yui-skin-sam .yui-calendar td.calcell a{color:#06c;display:block;height:100%;text-decoration:none;}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000;}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff;}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#ccc;color:#a6a6a6;cursor:default;}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer;}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff;}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0;}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through;}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#cf9;}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#9cf;}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#fcc;}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#cf9;}.yui-skin-sam .yui-calendar a.calnav{border:1px solid #f2f2f2;padding:0 4px;text-decoration:none;color:#000;zoom:1;}.yui-skin-sam .yui-calendar a.calnav:hover{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;border-color:#A0A0A0;cursor:pointer;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask{background-color:#000;opacity:.25;filter:alpha(opacity=25);}.yui-skin-sam .yui-calcontainer .yui-cal-nav{font-family:arial,helvetica,clean,sans-serif;font-size:93%;border:1px solid #808080;left:50%;margin-left:-7em;width:14em;padding:0;top:2.5em;background-color:#f2f2f2;}.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav{top:4.5em;}.yui-skin-sam .yui-calcontainer.multi .yui-cal-nav{width:16em;margin-left:-8em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y,.yui-skin-sam .yui-calcontainer .yui-cal-nav-m,.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{padding:5px 10px 5px 10px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{text-align:center;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-e{margin-top:5px;padding:5px;background-color:#EDF5FF;border-top:1px solid black;display:none;}.yui-skin-sam .yui-calcontainer .yui-cal-nav label{display:block;font-weight:bold;} -.yui-skin-sam .yui-calcontainer .yui-cal-nav-mc{width:100%;_width:auto;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid{background-color:#FFEE69;border:1px solid #000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc{width:4em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{border:1px solid #808080;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;background-color:#ccc;margin:auto .15em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{padding:0 8px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default{border:1px solid #304369;background-color:#426fd9;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1400px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button{color:#fff;} +.yui-calcontainer{position:relative;float:left;_overflow:hidden}.yui-calcontainer iframe{position:absolute;border:0;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0;top:0}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative}.yui-calcontainer .title{position:relative;z-index:1}.yui-calcontainer .close-icon{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden}.yui-calendar{position:relative}.yui-calendar .calnavleft{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden}.yui-calendar .calnavright{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden}.yui-calendar .calheader{position:relative;width:100%;text-align:center}.yui-calcontainer .yui-cal-nav-mask{position:absolute;z-index:2;margin:0;padding:0;width:100%;height:100%;_width:0;_height:0;left:0;top:0;display:none}.yui-calcontainer .yui-cal-nav{position:absolute;z-index:3;top:0;display:none}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{display:-moz-inline-box;display:inline-block}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{display:block;*display:inline-block;*overflow:visible;border:0;background-color:transparent;cursor:pointer}.yui-calendar .calbody a:hover{background:inherit}p#clear{clear:left;padding-top:10px}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transparent;border:0;padding:10px 5px 10px 5px;margin:0}.yui-skin-sam .yui-calcontainer .title{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;border-bottom:1px solid #ccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px}.yui-skin-sam .yui-calcontainer.withtitle{padding-top:0}.yui-skin-sam .yui-calcontainer .calclose{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:pointer}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;margin:0}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:0;vertical-align:middle;padding:0}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center}.yui-skin-sam .yui-calendar .calheader img{border:0}.yui-skin-sam .yui-calendar .calnavleft{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer}.yui-skin-sam .yui-calendar .calnavright{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em}.yui-skin-sam .yui-calendar .calweekdayrow th{padding:0;border:0}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;border:0}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding:0 2px 0 0}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding:0 0 0 2px}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #ccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap}.yui-skin-sam .yui-calendar td.calcell a{color:#06c;display:block;height:100%;text-decoration:none}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#ccc;color:#a6a6a6;cursor:default}.yui-skin-sam .yui-calendar td.calcell.oom a{color:#a6a6a6}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#cf9}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#9cf}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#fcc}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#cf9}.yui-skin-sam .yui-calendar a.calnav{border:1px solid #f2f2f2;padding:0 4px;text-decoration:none;color:#000;zoom:1}.yui-skin-sam .yui-calendar a.calnav:hover{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;border-color:#a0a0a0;cursor:pointer}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask{background-color:#000;opacity:.25;filter:alpha(opacity=25)}.yui-skin-sam .yui-calcontainer .yui-cal-nav{font-family:arial,helvetica,clean,sans-serif;font-size:93%;border:1px solid #808080;left:50%;margin-left:-7em;width:14em;padding:0;top:2.5em;background-color:#f2f2f2}.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav{top:4.5em}.yui-skin-sam .yui-calcontainer.multi .yui-cal-nav{width:16em;margin-left:-8em}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y,.yui-skin-sam .yui-calcontainer .yui-cal-nav-m,.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{padding:5px 10px 5px 10px}.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{text-align:center}.yui-skin-sam .yui-calcontainer .yui-cal-nav-e{margin-top:5px;padding:5px;background-color:#edf5ff;border-top:1px solid black;display:none}.yui-skin-sam .yui-calcontainer .yui-cal-nav label{display:block;font-weight:bold} +.yui-skin-sam .yui-calcontainer .yui-cal-nav-mc{width:100%;_width:auto}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid{background-color:#ffee69;border:1px solid #000}.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc{width:4em}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{border:1px solid #808080;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;background-color:#ccc;margin:auto .15em}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{padding:0 8px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default{border:1px solid #304369;background-color:#426fd9;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1400px}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button{color:#fff} diff --git a/include/javascript/yui/build/calendar/calendar-min.js b/include/javascript/yui/build/calendar/calendar-min.js index 98f45eeb..223cdcfa 100644 --- a/include/javascript/yui/build/calendar/calendar-min.js +++ b/include/javascript/yui/build/calendar/calendar-min.js @@ -1,18 +1,18 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -(function(){YAHOO.util.Config=function(D){if(D){this.init(D);}};var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE);},checkNumber:function(D){return(!isNaN(D));},fireEvent:function(D,F){var E=this.config[D];if(E&&E.event){E.event.fire(F);}},addProperty:function(E,D){E=E.toLowerCase();this.config[E]=D;D.event=this.createEvent(E,{scope:this.owner});D.event.signature=C.LIST;D.key=E;if(D.handler){D.event.subscribe(D.handler,this.owner);}this.setProperty(E,D.value,true);if(!D.suppressEvent){this.queueProperty(E,D.value);}},getConfig:function(){var D={},F=this.config,G,E;for(G in F){if(B.hasOwnProperty(F,G)){E=F[G];if(E&&E.event){D[G]=E.value;}}}return D;},getProperty:function(D){var E=this.config[D.toLowerCase()];if(E&&E.event){return E.value;}else{return undefined;}},resetProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D,this.initialConfig[D]);return true;}}else{return false;}},setProperty:function(E,G,D){var F;E=E.toLowerCase();if(this.queueInProgress&&!D){this.queueProperty(E,G);return true;}else{F=this.config[E];if(F&&F.event){if(F.validator&&!F.validator(G)){return false;}else{F.value=G;if(!D){this.fireEvent(E,G);this.configChangedEvent.fire([E,G]);}return true;}}else{return false;}}},queueProperty:function(S,P){S=S.toLowerCase();var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if(R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false;}else{if(!B.isUndefined(P)){R.value=P;}else{P=R.value;}K=false;J=this.eventQueue.length;for(L=0;L0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true;}}while(G--);}return false;};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);}());YAHOO.widget.DateMath={DAY:"D",WEEK:"W",YEAR:"Y",MONTH:"M",ONE_DAY_MS:1000*60*60*24,WEEK_ONE_JAN_DATE:1,add:function(A,D,C){var F=new Date(A.getTime());switch(D){case this.MONTH:var E=A.getMonth()+C;var B=0;if(E<0){while(E<0){E+=12;B-=1;}}else{if(E>11){while(E>11){E-=12;B+=1;}}}F.setMonth(E);F.setFullYear(A.getFullYear()+B);break;case this.DAY:this._addDays(F,C);break;case this.YEAR:F.setFullYear(A.getFullYear()+C);break;case this.WEEK:this._addDays(F,(C*7));break;}return F;},_addDays:function(D,C){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420){if(C<0){for(var B=-128;CA;C-=A){D.setDate(D.getDate()+A);}}}D.setDate(D.getDate()+C);},subtract:function(A,C,B){return this.add(A,C,(B*-1));},before:function(C,B){var A=B.getTime();if(C.getTime()A){return true;}else{return false;}},between:function(B,A,C){if(this.after(B,A)&&this.before(B,C)){return true;}else{return false;}},getJan1:function(A){return this.getDate(A,0,1);},getDayOffset:function(B,D){var C=this.getJan1(D);var A=Math.ceil((B.getTime()-C.getTime())/this.ONE_DAY_MS);return A;},getWeekNumber:function(D,B,G){B=B||0;G=G||this.WEEK_ONE_JAN_DATE;var H=this.clearTime(D),L,M;if(H.getDay()===B){L=H;}else{L=this.getFirstDayOfWeek(H,B);}var I=L.getFullYear();M=new Date(L.getTime()+6*this.ONE_DAY_MS);var F;if(I!==M.getFullYear()&&M.getDate()>=G){F=1;}else{var E=this.clearTime(this.getDate(I,0,G)),A=this.getFirstDayOfWeek(E,B);var J=Math.round((H.getTime()-A.getTime())/this.ONE_DAY_MS);var K=J%7;var C=(J-K)/7; -F=C+1;}return F;},getFirstDayOfWeek:function(D,A){A=A||0;var B=D.getDay(),C=(B-A+7)%7;return this.subtract(D,this.DAY,C);},isYearOverlapWeek:function(A){var C=false;var B=this.add(A,this.DAY,6);if(B.getFullYear()!=A.getFullYear()){C=true;}return C;},isMonthOverlapWeek:function(A){var C=false;var B=this.add(A,this.DAY,6);if(B.getMonth()!=A.getMonth()){C=true;}return C;},findMonthStart:function(A){var B=this.getDate(A.getFullYear(),A.getMonth(),1);return B;},findMonthEnd:function(B){var D=this.findMonthStart(B);var C=this.add(D,this.MONTH,1);var A=this.subtract(C,this.DAY,1);return A;},clearTime:function(A){A.setHours(12,0,0,0);return A;},getDate:function(D,A,C){var B=null;if(YAHOO.lang.isUndefined(C)){C=1;}if(D>=100){B=new Date(D,A,C);}else{B=new Date();B.setFullYear(D);B.setMonth(A);B.setDate(C);B.setHours(0,0,0,0);}return B;}};(function(){var C=YAHOO.util.Dom,A=YAHOO.util.Event,E=YAHOO.lang,D=YAHOO.widget.DateMath;function F(I,G,H){this.init.apply(this,arguments);}F.IMG_ROOT=null;F.DATE="D";F.MONTH_DAY="MD";F.WEEKDAY="WD";F.RANGE="R";F.MONTH="M";F.DISPLAY_DAYS=42;F.STOP_RENDER="S";F.SHORT="short";F.LONG="long";F.MEDIUM="medium";F.ONE_CHAR="1char";F.DEFAULT_CONFIG={YEAR_OFFSET:{key:"year_offset",value:0,supercedes:["pagedate","selected","mindate","maxdate"]},TODAY:{key:"today",value:new Date(),supercedes:["pagedate"]},PAGEDATE:{key:"pagedate",value:null},SELECTED:{key:"selected",value:[]},TITLE:{key:"title",value:""},CLOSE:{key:"close",value:false},IFRAME:{key:"iframe",value:(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6)?true:false},MINDATE:{key:"mindate",value:null},MAXDATE:{key:"maxdate",value:null},MULTI_SELECT:{key:"multi_select",value:false},START_WEEKDAY:{key:"start_weekday",value:0},SHOW_WEEKDAYS:{key:"show_weekdays",value:true},SHOW_WEEK_HEADER:{key:"show_week_header",value:false},SHOW_WEEK_FOOTER:{key:"show_week_footer",value:false},HIDE_BLANK_WEEKS:{key:"hide_blank_weeks",value:false},NAV_ARROW_LEFT:{key:"nav_arrow_left",value:null},NAV_ARROW_RIGHT:{key:"nav_arrow_right",value:null},MONTHS_SHORT:{key:"months_short",value:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},MONTHS_LONG:{key:"months_long",value:["January","February","March","April","May","June","July","August","September","October","November","December"]},WEEKDAYS_1CHAR:{key:"weekdays_1char",value:["S","M","T","W","T","F","S"]},WEEKDAYS_SHORT:{key:"weekdays_short",value:["Su","Mo","Tu","We","Th","Fr","Sa"]},WEEKDAYS_MEDIUM:{key:"weekdays_medium",value:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},WEEKDAYS_LONG:{key:"weekdays_long",value:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},LOCALE_MONTHS:{key:"locale_months",value:"long"},LOCALE_WEEKDAYS:{key:"locale_weekdays",value:"short"},DATE_DELIMITER:{key:"date_delimiter",value:","},DATE_FIELD_DELIMITER:{key:"date_field_delimiter",value:"/"},DATE_RANGE_DELIMITER:{key:"date_range_delimiter",value:"-"},MY_MONTH_POSITION:{key:"my_month_position",value:1},MY_YEAR_POSITION:{key:"my_year_position",value:2},MD_MONTH_POSITION:{key:"md_month_position",value:1},MD_DAY_POSITION:{key:"md_day_position",value:2},MDY_MONTH_POSITION:{key:"mdy_month_position",value:1},MDY_DAY_POSITION:{key:"mdy_day_position",value:2},MDY_YEAR_POSITION:{key:"mdy_year_position",value:3},MY_LABEL_MONTH_POSITION:{key:"my_label_month_position",value:1},MY_LABEL_YEAR_POSITION:{key:"my_label_year_position",value:2},MY_LABEL_MONTH_SUFFIX:{key:"my_label_month_suffix",value:" "},MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix",value:""},NAV:{key:"navigator",value:null},STRINGS:{key:"strings",value:{previousMonth:"Previous Month",nextMonth:"Next Month",close:"Close"},supercedes:["close","title"]}};F._DEFAULT_CONFIG=F.DEFAULT_CONFIG;var B=F.DEFAULT_CONFIG;F._EVENT_TYPES={BEFORE_SELECT:"beforeSelect",SELECT:"select",BEFORE_DESELECT:"beforeDeselect",DESELECT:"deselect",CHANGE_PAGE:"changePage",BEFORE_RENDER:"beforeRender",RENDER:"render",BEFORE_DESTROY:"beforeDestroy",DESTROY:"destroy",RESET:"reset",CLEAR:"clear",BEFORE_HIDE:"beforeHide",HIDE:"hide",BEFORE_SHOW:"beforeShow",SHOW:"show",BEFORE_HIDE_NAV:"beforeHideNav",HIDE_NAV:"hideNav",BEFORE_SHOW_NAV:"beforeShowNav",SHOW_NAV:"showNav",BEFORE_RENDER_NAV:"beforeRenderNav",RENDER_NAV:"renderNav"};F.STYLES={CSS_ROW_HEADER:"calrowhead",CSS_ROW_FOOTER:"calrowfoot",CSS_CELL:"calcell",CSS_CELL_SELECTOR:"selector",CSS_CELL_SELECTED:"selected",CSS_CELL_SELECTABLE:"selectable",CSS_CELL_RESTRICTED:"restricted",CSS_CELL_TODAY:"today",CSS_CELL_OOM:"oom",CSS_CELL_OOB:"previous",CSS_HEADER:"calheader",CSS_HEADER_TEXT:"calhead",CSS_BODY:"calbody",CSS_WEEKDAY_CELL:"calweekdaycell",CSS_WEEKDAY_ROW:"calweekdayrow",CSS_FOOTER:"calfoot",CSS_CALENDAR:"yui-calendar",CSS_SINGLE:"single",CSS_CONTAINER:"yui-calcontainer",CSS_NAV_LEFT:"calnavleft",CSS_NAV_RIGHT:"calnavright",CSS_NAV:"calnav",CSS_CLOSE:"calclose",CSS_CELL_TOP:"calcelltop",CSS_CELL_LEFT:"calcellleft",CSS_CELL_RIGHT:"calcellright",CSS_CELL_BOTTOM:"calcellbottom",CSS_CELL_HOVER:"calcellhover",CSS_CELL_HIGHLIGHT1:"highlight1",CSS_CELL_HIGHLIGHT2:"highlight2",CSS_CELL_HIGHLIGHT3:"highlight3",CSS_CELL_HIGHLIGHT4:"highlight4",CSS_WITH_TITLE:"withtitle",CSS_FIXED_SIZE:"fixedsize",CSS_LINK_CLOSE:"link-close"};F._STYLES=F.STYLES;F.prototype={Config:null,parent:null,index:-1,cells:null,cellDates:null,id:null,containerId:null,oDomContainer:null,today:null,renderStack:null,_renderStack:null,oNavigator:null,_selectedDates:null,domEventMap:null,_parseArgs:function(H){var G={id:null,container:null,config:null};if(H&&H.length&&H.length>0){switch(H.length){case 1:G.id=null;G.container=H[0];G.config=null;break;case 2:if(E.isObject(H[1])&&!H[1].tagName&&!(H[1] instanceof String)){G.id=null;G.container=H[0];G.config=H[1];}else{G.id=H[0];G.container=H[1];G.config=null;}break;default:G.id=H[0];G.container=H[1];G.config=H[2];break;}}else{}return G;},init:function(J,H,I){var G=this._parseArgs(arguments);J=G.id;H=G.container;I=G.config;this.oDomContainer=C.get(H);if(!this.oDomContainer.id){this.oDomContainer.id=C.generateId(); -}if(!J){J=this.oDomContainer.id+"_t";}this.id=J;this.containerId=this.oDomContainer.id;this.initEvents();this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.initStyles();C.addClass(this.oDomContainer,this.Style.CSS_CONTAINER);C.addClass(this.oDomContainer,this.Style.CSS_SINGLE);this.cellDates=[];this.cells=[];this.renderStack=[];this._renderStack=[];this.setupConfig();if(I){this.cfg.applyConfig(I,true);}this.cfg.fireQueue();this.today=this.cfg.getProperty("today");},configIframe:function(I,H,J){var G=H[0];if(!this.parent){if(C.inDocument(this.oDomContainer)){if(G){var K=C.getStyle(this.oDomContainer,"position");if(K=="absolute"||K=="relative"){if(!C.inDocument(this.iframe)){this.iframe=document.createElement("iframe");this.iframe.src="javascript:false;";C.setStyle(this.iframe,"opacity","0");if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6){C.addClass(this.iframe,this.Style.CSS_FIXED_SIZE);}this.oDomContainer.insertBefore(this.iframe,this.oDomContainer.firstChild);}}}else{if(this.iframe){if(this.iframe.parentNode){this.iframe.parentNode.removeChild(this.iframe);}this.iframe=null;}}}}},configTitle:function(H,G,I){var K=G[0];if(K){this.createTitleBar(K);}else{var J=this.cfg.getProperty(B.CLOSE.key);if(!J){this.removeTitleBar();}else{this.createTitleBar(" ");}}},configClose:function(H,G,I){var K=G[0],J=this.cfg.getProperty(B.TITLE.key);if(K){if(!J){this.createTitleBar(" ");}this.createCloseButton();}else{this.removeCloseButton();if(!J){this.removeTitleBar();}}},initEvents:function(){var G=F._EVENT_TYPES,I=YAHOO.util.CustomEvent,H=this;H.beforeSelectEvent=new I(G.BEFORE_SELECT);H.selectEvent=new I(G.SELECT);H.beforeDeselectEvent=new I(G.BEFORE_DESELECT);H.deselectEvent=new I(G.DESELECT);H.changePageEvent=new I(G.CHANGE_PAGE);H.beforeRenderEvent=new I(G.BEFORE_RENDER);H.renderEvent=new I(G.RENDER);H.beforeDestroyEvent=new I(G.BEFORE_DESTROY);H.destroyEvent=new I(G.DESTROY);H.resetEvent=new I(G.RESET);H.clearEvent=new I(G.CLEAR);H.beforeShowEvent=new I(G.BEFORE_SHOW);H.showEvent=new I(G.SHOW);H.beforeHideEvent=new I(G.BEFORE_HIDE);H.hideEvent=new I(G.HIDE);H.beforeShowNavEvent=new I(G.BEFORE_SHOW_NAV);H.showNavEvent=new I(G.SHOW_NAV);H.beforeHideNavEvent=new I(G.BEFORE_HIDE_NAV);H.hideNavEvent=new I(G.HIDE_NAV);H.beforeRenderNavEvent=new I(G.BEFORE_RENDER_NAV);H.renderNavEvent=new I(G.RENDER_NAV);H.beforeSelectEvent.subscribe(H.onBeforeSelect,this,true);H.selectEvent.subscribe(H.onSelect,this,true);H.beforeDeselectEvent.subscribe(H.onBeforeDeselect,this,true);H.deselectEvent.subscribe(H.onDeselect,this,true);H.changePageEvent.subscribe(H.onChangePage,this,true);H.renderEvent.subscribe(H.onRender,this,true);H.resetEvent.subscribe(H.onReset,this,true);H.clearEvent.subscribe(H.onClear,this,true);},doPreviousMonthNav:function(H,G){A.preventDefault(H);setTimeout(function(){G.previousMonth();var J=C.getElementsByClassName(G.Style.CSS_NAV_LEFT,"a",G.oDomContainer);if(J&&J[0]){try{J[0].focus();}catch(I){}}},0);},doNextMonthNav:function(H,G){A.preventDefault(H);setTimeout(function(){G.nextMonth();var J=C.getElementsByClassName(G.Style.CSS_NAV_RIGHT,"a",G.oDomContainer);if(J&&J[0]){try{J[0].focus();}catch(I){}}},0);},doSelectCell:function(M,G){var R,O,I,L;var N=A.getTarget(M),H=N.tagName.toLowerCase(),K=false;while(H!="td"&&!C.hasClass(N,G.Style.CSS_CELL_SELECTABLE)){if(!K&&H=="a"&&C.hasClass(N,G.Style.CSS_CELL_SELECTOR)){K=true;}N=N.parentNode;H=N.tagName.toLowerCase();if(N==this.oDomContainer||H=="html"){return;}}if(K){A.preventDefault(M);}R=N;if(C.hasClass(R,G.Style.CSS_CELL_SELECTABLE)){L=G.getIndexFromId(R.id);if(L>-1){O=G.cellDates[L];if(O){I=D.getDate(O[0],O[1]-1,O[2]);var Q;if(G.Options.MULTI_SELECT){Q=R.getElementsByTagName("a")[0];if(Q){Q.blur();}var J=G.cellDates[L];var P=G._indexOfSelectedFieldArray(J);if(P>-1){G.deselectCell(L);}else{G.selectCell(L);}}else{Q=R.getElementsByTagName("a")[0];if(Q){Q.blur();}G.selectCell(L);}}}}},doCellMouseOver:function(I,H){var G;if(I){G=A.getTarget(I);}else{G=this;}while(G.tagName&&G.tagName.toLowerCase()!="td"){G=G.parentNode;if(!G.tagName||G.tagName.toLowerCase()=="html"){return;}}if(C.hasClass(G,H.Style.CSS_CELL_SELECTABLE)){C.addClass(G,H.Style.CSS_CELL_HOVER);}},doCellMouseOut:function(I,H){var G;if(I){G=A.getTarget(I);}else{G=this;}while(G.tagName&&G.tagName.toLowerCase()!="td"){G=G.parentNode;if(!G.tagName||G.tagName.toLowerCase()=="html"){return;}}if(C.hasClass(G,H.Style.CSS_CELL_SELECTABLE)){C.removeClass(G,H.Style.CSS_CELL_HOVER);}},setupConfig:function(){var G=this.cfg;G.addProperty(B.TODAY.key,{value:new Date(B.TODAY.value.getTime()),supercedes:B.TODAY.supercedes,handler:this.configToday,suppressEvent:true});G.addProperty(B.PAGEDATE.key,{value:B.PAGEDATE.value||new Date(B.TODAY.value.getTime()),handler:this.configPageDate});G.addProperty(B.SELECTED.key,{value:B.SELECTED.value.concat(),handler:this.configSelected});G.addProperty(B.TITLE.key,{value:B.TITLE.value,handler:this.configTitle});G.addProperty(B.CLOSE.key,{value:B.CLOSE.value,handler:this.configClose});G.addProperty(B.IFRAME.key,{value:B.IFRAME.value,handler:this.configIframe,validator:G.checkBoolean});G.addProperty(B.MINDATE.key,{value:B.MINDATE.value,handler:this.configMinDate});G.addProperty(B.MAXDATE.key,{value:B.MAXDATE.value,handler:this.configMaxDate});G.addProperty(B.MULTI_SELECT.key,{value:B.MULTI_SELECT.value,handler:this.configOptions,validator:G.checkBoolean});G.addProperty(B.START_WEEKDAY.key,{value:B.START_WEEKDAY.value,handler:this.configOptions,validator:G.checkNumber});G.addProperty(B.SHOW_WEEKDAYS.key,{value:B.SHOW_WEEKDAYS.value,handler:this.configOptions,validator:G.checkBoolean});G.addProperty(B.SHOW_WEEK_HEADER.key,{value:B.SHOW_WEEK_HEADER.value,handler:this.configOptions,validator:G.checkBoolean});G.addProperty(B.SHOW_WEEK_FOOTER.key,{value:B.SHOW_WEEK_FOOTER.value,handler:this.configOptions,validator:G.checkBoolean});G.addProperty(B.HIDE_BLANK_WEEKS.key,{value:B.HIDE_BLANK_WEEKS.value,handler:this.configOptions,validator:G.checkBoolean});G.addProperty(B.NAV_ARROW_LEFT.key,{value:B.NAV_ARROW_LEFT.value,handler:this.configOptions}); -G.addProperty(B.NAV_ARROW_RIGHT.key,{value:B.NAV_ARROW_RIGHT.value,handler:this.configOptions});G.addProperty(B.MONTHS_SHORT.key,{value:B.MONTHS_SHORT.value,handler:this.configLocale});G.addProperty(B.MONTHS_LONG.key,{value:B.MONTHS_LONG.value,handler:this.configLocale});G.addProperty(B.WEEKDAYS_1CHAR.key,{value:B.WEEKDAYS_1CHAR.value,handler:this.configLocale});G.addProperty(B.WEEKDAYS_SHORT.key,{value:B.WEEKDAYS_SHORT.value,handler:this.configLocale});G.addProperty(B.WEEKDAYS_MEDIUM.key,{value:B.WEEKDAYS_MEDIUM.value,handler:this.configLocale});G.addProperty(B.WEEKDAYS_LONG.key,{value:B.WEEKDAYS_LONG.value,handler:this.configLocale});var H=function(){G.refireEvent(B.LOCALE_MONTHS.key);G.refireEvent(B.LOCALE_WEEKDAYS.key);};G.subscribeToConfigEvent(B.START_WEEKDAY.key,H,this,true);G.subscribeToConfigEvent(B.MONTHS_SHORT.key,H,this,true);G.subscribeToConfigEvent(B.MONTHS_LONG.key,H,this,true);G.subscribeToConfigEvent(B.WEEKDAYS_1CHAR.key,H,this,true);G.subscribeToConfigEvent(B.WEEKDAYS_SHORT.key,H,this,true);G.subscribeToConfigEvent(B.WEEKDAYS_MEDIUM.key,H,this,true);G.subscribeToConfigEvent(B.WEEKDAYS_LONG.key,H,this,true);G.addProperty(B.LOCALE_MONTHS.key,{value:B.LOCALE_MONTHS.value,handler:this.configLocaleValues});G.addProperty(B.LOCALE_WEEKDAYS.key,{value:B.LOCALE_WEEKDAYS.value,handler:this.configLocaleValues});G.addProperty(B.YEAR_OFFSET.key,{value:B.YEAR_OFFSET.value,supercedes:B.YEAR_OFFSET.supercedes,handler:this.configLocale});G.addProperty(B.DATE_DELIMITER.key,{value:B.DATE_DELIMITER.value,handler:this.configLocale});G.addProperty(B.DATE_FIELD_DELIMITER.key,{value:B.DATE_FIELD_DELIMITER.value,handler:this.configLocale});G.addProperty(B.DATE_RANGE_DELIMITER.key,{value:B.DATE_RANGE_DELIMITER.value,handler:this.configLocale});G.addProperty(B.MY_MONTH_POSITION.key,{value:B.MY_MONTH_POSITION.value,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MY_YEAR_POSITION.key,{value:B.MY_YEAR_POSITION.value,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MD_MONTH_POSITION.key,{value:B.MD_MONTH_POSITION.value,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MD_DAY_POSITION.key,{value:B.MD_DAY_POSITION.value,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MDY_MONTH_POSITION.key,{value:B.MDY_MONTH_POSITION.value,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MDY_DAY_POSITION.key,{value:B.MDY_DAY_POSITION.value,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MDY_YEAR_POSITION.key,{value:B.MDY_YEAR_POSITION.value,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MY_LABEL_MONTH_POSITION.key,{value:B.MY_LABEL_MONTH_POSITION.value,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MY_LABEL_YEAR_POSITION.key,{value:B.MY_LABEL_YEAR_POSITION.value,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MY_LABEL_MONTH_SUFFIX.key,{value:B.MY_LABEL_MONTH_SUFFIX.value,handler:this.configLocale});G.addProperty(B.MY_LABEL_YEAR_SUFFIX.key,{value:B.MY_LABEL_YEAR_SUFFIX.value,handler:this.configLocale});G.addProperty(B.NAV.key,{value:B.NAV.value,handler:this.configNavigator});G.addProperty(B.STRINGS.key,{value:B.STRINGS.value,handler:this.configStrings,validator:function(I){return E.isObject(I);},supercedes:B.STRINGS.supercedes});},configStrings:function(H,G,I){var J=E.merge(B.STRINGS.value,G[0]);this.cfg.setProperty(B.STRINGS.key,J,true);},configPageDate:function(H,G,I){this.cfg.setProperty(B.PAGEDATE.key,this._parsePageDate(G[0]),true);},configMinDate:function(H,G,I){var J=G[0];if(E.isString(J)){J=this._parseDate(J);this.cfg.setProperty(B.MINDATE.key,D.getDate(J[0],(J[1]-1),J[2]));}},configMaxDate:function(H,G,I){var J=G[0];if(E.isString(J)){J=this._parseDate(J);this.cfg.setProperty(B.MAXDATE.key,D.getDate(J[0],(J[1]-1),J[2]));}},configToday:function(I,H,J){var K=H[0];if(E.isString(K)){K=this._parseDate(K);}var G=D.clearTime(K);if(!this.cfg.initialConfig[B.PAGEDATE.key]){this.cfg.setProperty(B.PAGEDATE.key,G);}this.today=G;this.cfg.setProperty(B.TODAY.key,G,true);},configSelected:function(I,G,K){var H=G[0],J=B.SELECTED.key;if(H){if(E.isString(H)){this.cfg.setProperty(J,this._parseDates(H),true);}}if(!this._selectedDates){this._selectedDates=this.cfg.getProperty(J);}},configOptions:function(H,G,I){this.Options[H.toUpperCase()]=G[0];},configLocale:function(H,G,I){this.Locale[H.toUpperCase()]=G[0];this.cfg.refireEvent(B.LOCALE_MONTHS.key);this.cfg.refireEvent(B.LOCALE_WEEKDAYS.key);},configLocaleValues:function(J,I,K){J=J.toLowerCase();var M=I[0],H=this.cfg,N=this.Locale;switch(J){case B.LOCALE_MONTHS.key:switch(M){case F.SHORT:N.LOCALE_MONTHS=H.getProperty(B.MONTHS_SHORT.key).concat();break;case F.LONG:N.LOCALE_MONTHS=H.getProperty(B.MONTHS_LONG.key).concat();break;}break;case B.LOCALE_WEEKDAYS.key:switch(M){case F.ONE_CHAR:N.LOCALE_WEEKDAYS=H.getProperty(B.WEEKDAYS_1CHAR.key).concat();break;case F.SHORT:N.LOCALE_WEEKDAYS=H.getProperty(B.WEEKDAYS_SHORT.key).concat();break;case F.MEDIUM:N.LOCALE_WEEKDAYS=H.getProperty(B.WEEKDAYS_MEDIUM.key).concat();break;case F.LONG:N.LOCALE_WEEKDAYS=H.getProperty(B.WEEKDAYS_LONG.key).concat();break;}var L=H.getProperty(B.START_WEEKDAY.key);if(L>0){for(var G=0;G'+H+"";}this.oDomContainer.appendChild(L);return L;},removeCloseButton:function(){var G=C.getElementsByClassName(this.Style.CSS_LINK_CLOSE,"a",this.oDomContainer)[0]||null;if(G){A.purgeElement(G);this.oDomContainer.removeChild(G);}},renderHeader:function(Q){var P=7,O="us/tr/callt.gif",G="us/tr/calrt.gif",N=this.cfg,K=N.getProperty(B.PAGEDATE.key),L=N.getProperty(B.STRINGS.key),V=(L&&L.previousMonth)?L.previousMonth:"",H=(L&&L.nextMonth)?L.nextMonth:"",M;if(N.getProperty(B.SHOW_WEEK_HEADER.key)){P+=1;}if(N.getProperty(B.SHOW_WEEK_FOOTER.key)){P+=1;}Q[Q.length]="
    ";Q[Q.length]="";Q[Q.length]='\n";if(N.getProperty(B.SHOW_WEEKDAYS.key)){Q=this.buildWeekdays(Q);}Q[Q.length]="";return Q;},buildWeekdays:function(H){H[H.length]='';if(this.cfg.getProperty(B.SHOW_WEEK_HEADER.key)){H[H.length]="";}for(var G=0;G'+this.Locale.LOCALE_WEEKDAYS[G]+"";}if(this.cfg.getProperty(B.SHOW_WEEK_FOOTER.key)){H[H.length]="";}H[H.length]="";return H;},renderBody:function(m,k){var AK=this.cfg.getProperty(B.START_WEEKDAY.key);this.preMonthDays=m.getDay();if(AK>0){this.preMonthDays-=AK;}if(this.preMonthDays<0){this.preMonthDays+=7;}this.monthDays=D.findMonthEnd(m).getDate();this.postMonthDays=F.DISPLAY_DAYS-this.preMonthDays-this.monthDays;m=D.subtract(m,D.DAY,this.preMonthDays);var Y,N,M="w",f="_cell",c="wd",w="d",P,u,AC=this.today,O=this.cfg,W=AC.getFullYear(),v=AC.getMonth(),J=AC.getDate(),AB=O.getProperty(B.PAGEDATE.key),I=O.getProperty(B.HIDE_BLANK_WEEKS.key),j=O.getProperty(B.SHOW_WEEK_FOOTER.key),b=O.getProperty(B.SHOW_WEEK_HEADER.key),U=O.getProperty(B.MINDATE.key),a=O.getProperty(B.MAXDATE.key),T=this.Locale.YEAR_OFFSET;if(U){U=D.clearTime(U);}if(a){a=D.clearTime(a);}k[k.length]='';var AI=0,Q=document.createElement("div"),l=document.createElement("td");Q.appendChild(l);var AA=this.parent||this;for(var AE=0;AE<6;AE++){Y=D.getWeekNumber(m,AK);N=M+Y;if(AE!==0&&I===true&&m.getMonth()!=AB.getMonth()){break;}else{k[k.length]='';if(b){k=this.renderRowHeader(Y,k);}for(var AJ=0;AJ<7;AJ++){P=[];this.clearElement(l);l.className=this.Style.CSS_CELL;l.id=this.id+f+AI;if(m.getDate()==J&&m.getMonth()==v&&m.getFullYear()==W){P[P.length]=AA.renderCellStyleToday;}var Z=[m.getFullYear(),m.getMonth()+1,m.getDate()];this.cellDates[this.cellDates.length]=Z;if(m.getMonth()!=AB.getMonth()){P[P.length]=AA.renderCellNotThisMonth;}else{C.addClass(l,c+m.getDay());C.addClass(l,w+m.getDate());for(var AD=0;AD=AH.getTime()&&m.getTime()<=AG.getTime()){u=y[2];if(m.getTime()==AG.getTime()){this.renderStack.splice(AD,1);}}break;case F.WEEKDAY:var R=y[1][0]; -if(m.getDay()+1==R){u=y[2];}break;case F.MONTH:H=y[1][0];if(m.getMonth()+1==H){u=y[2];}break;}if(u){P[P.length]=u;}}}if(this._indexOfSelectedFieldArray(Z)>-1){P[P.length]=AA.renderCellStyleSelected;}if((U&&(m.getTime()a.getTime()))){P[P.length]=AA.renderOutOfBoundsDate;}else{P[P.length]=AA.styleCellDefault;P[P.length]=AA.renderCellDefault;}for(var z=0;z=0&&AI<=6){C.addClass(l,this.Style.CSS_CELL_TOP);}if((AI%7)===0){C.addClass(l,this.Style.CSS_CELL_LEFT);}if(((AI+1)%7)===0){C.addClass(l,this.Style.CSS_CELL_RIGHT);}var o=this.postMonthDays;if(I&&o>=7){var V=Math.floor(o/7);for(var AF=0;AF=((this.preMonthDays+o+this.monthDays)-7)){C.addClass(l,this.Style.CSS_CELL_BOTTOM);}k[k.length]=Q.innerHTML;AI++;}if(j){k=this.renderRowFooter(Y,k);}k[k.length]="";}}k[k.length]="";return k;},renderFooter:function(G){return G;},render:function(){this.beforeRenderEvent.fire();var H=D.findMonthStart(this.cfg.getProperty(B.PAGEDATE.key));this.resetRenderers();this.cellDates.length=0;A.purgeElement(this.oDomContainer,true);var G=[];G[G.length]='
    @@ -81,7 +80,7 @@
    {#table_dlg.advanced_props} - +
    @@ -113,7 +112,7 @@ ";if(g.image){e=b.createHTML("img ",{src:g.image,role:"presentation","class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:f.id+"_voice",style:"display:none;"},g.title);i+="";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'');i+="";i+="";i=b.createHTML("table",{id:f.id,role:"presentation",tabindex:"0","class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",title:g.title},i);return b.createHTML("span",{role:"button","aria-labelledby":f.id+"_voice","aria-haspopup":"true"},i)},postRender:function(){var e=this,g=e.settings,f;if(g.onclick){f=function(h){if(!e.isDisabled()){g.onclick(e.value);a.cancel(h)}};a.add(e.id+"_action","click",f);a.add(e.id,["click","keydown"],function(h){var k=32,m=14,i=13,j=38,l=40;if((h.keyCode===32||h.keyCode===13||h.keyCode===14)&&!h.altKey&&!h.ctrlKey&&!h.metaKey){f();a.cancel(h)}else{if(h.type==="click"||h.keyCode===l){e.showMenu();a.cancel(h)}}})}a.add(e.id+"_open","click",function(h){e.showMenu();a.cancel(h)});a.add([e.id,e.id+"_open"],"focus",function(){e._focused=1});a.add([e.id,e.id+"_open"],"blur",function(){e._focused=0});if(c.isIE6||!b.boxModel){a.add(e.id,"mouseover",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.addClass(e.id,"mceSplitButtonHover")}});a.add(e.id,"mouseout",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.removeClass(e.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();a.clear(this.id+"_action");a.clear(this.id+"_open");a.clear(this.id)}})})(tinymce);(function(d){var c=d.DOM,a=d.dom.Event,b=d.is,e=d.each;d.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h,f){var g=this;g.parent(i,h,f);g.settings=h=d.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);g.onShowMenu=new d.util.Dispatcher(g);g.onHideMenu=new d.util.Dispatcher(g);g.value=h.default_color},showMenu:function(){var f=this,g,j,i,h;if(f.isDisabled()){return}if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible){return f.hideMenu()}i=c.get(f.id);c.show(f.id+"_menu");c.addClass(i,"mceSplitButtonSelected");h=c.getPos(i);c.setStyles(f.id+"_menu",{left:h.x,top:h.y+i.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,f);f.onShowMenu.dispatch(f);if(f._focused){f._keyHandler=a.add(f.id+"_menu","keydown",function(k){if(k.keyCode==27){f.hideMenu()}});c.select("a",f.id+"_menu")[0].focus()}f.isMenuVisible=1},hideMenu:function(g){var f=this;if(f.isMenuVisible){if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id+"_open"})){return}if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(f.id,"mceSplitButtonSelected");a.remove(c.doc,"mousedown",f.hideMenu,f);a.remove(f.id+"_menu","keydown",f._keyHandler);c.hide(f.id+"_menu")}f.isMenuVisible=0}},renderMenu:function(){var p=this,h,k=0,q=p.settings,g,j,l,o,f;o=c.add(q.menu_container,"div",{role:"listbox",id:p.id+"_menu","class":q.menu_class+" "+q["class"],style:"position:absolute;left:0;top:-1000px;"});h=c.add(o,"div",{"class":q["class"]+" mceSplitButtonMenu"});c.add(h,"span",{"class":"mceMenuLine"});g=c.add(h,"table",{role:"presentation","class":"mceColorSplitMenu"});j=c.add(g,"tbody");k=0;e(b(q.colors,"array")?q.colors:q.colors.split(","),function(i){i=i.replace(/^#/,"");if(!k--){l=c.add(j,"tr");k=q.grid_width-1}g=c.add(l,"td");g=c.add(g,"a",{role:"option",href:"javascript:;",style:{backgroundColor:"#"+i},title:p.editor.getLang("colors."+i,i),"data-mce-color":"#"+i});if(p.editor.forcedHighContrastMode){g=c.add(g,"canvas",{width:16,height:16,"aria-hidden":"true"});if(g.getContext&&(f=g.getContext("2d"))){f.fillStyle="#"+i;f.fillRect(0,0,16,16)}else{c.remove(g)}}});if(q.more_colors_func){g=c.add(j,"tr");g=c.add(g,"td",{colspan:q.grid_width,"class":"mceMoreColors"});g=c.add(g,"a",{role:"option",id:p.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},q.more_colors_title);a.add(g,"click",function(i){q.more_colors_func.call(q.more_colors_scope||this);return a.cancel(i)})}c.addClass(h,"mceColorSplitMenu");new d.ui.KeyboardNavigation({root:p.id+"_menu",items:c.select("a",p.id+"_menu"),onCancel:function(){p.hideMenu();p.focus()}});a.add(p.id+"_menu","mousedown",function(i){return a.cancel(i)});a.add(p.id+"_menu","click",function(i){var m;i=c.getParent(i.target,"a",j);if(i&&i.nodeName.toLowerCase()=="a"&&(m=i.getAttribute("data-mce-color"))){p.setColor(m)}return a.cancel(i)});return o},setColor:function(f){this.displayColor(f);this.hideMenu();this.settings.onselect(f)},displayColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g},postRender:function(){var f=this,g=f.id;f.parent();c.add(g+"_action","div",{id:g+"_preview","class":"mceColorPreview"});c.setStyle(f.id+"_preview","backgroundColor",f.value)},destroy:function(){this.parent();a.clear(this.id+"_menu");a.clear(this.id+"_more");c.remove(this.id+"_menu")}})})(tinymce);(function(b){var d=b.DOM,c=b.each,a=b.dom.Event;b.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var f=this,i=[],e=f.controls,j=b.each,g=f.settings;i.push('
    ');i.push("");i.push('");j(e,function(h){i.push(h.renderHTML())});i.push("");i.push("
    ");return i.join("")},focus:function(){this.keyNav.focus()},postRender:function(){var f=this,e=[];c(f.controls,function(g){c(g.controls,function(h){if(h.id){e.push(h)}})});f.keyNav=new b.ui.KeyboardNavigation({root:f.id,items:e,onCancel:function(){f.editor.focus()},excludeFromTabOrder:!f.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent();e.keyNav.destroy();a.clear(e.id)}})})(tinymce);(function(a){var c=a.DOM,b=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var m=this,f="",j,k,n=m.settings,e,d,g,l;l=m.controls;for(e=0;e"))}if(d&&k.ListBox){if(d.Button||d.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarEnd"},c.createHTML("span",null,""))}}if(c.stdMode){f+='"}else{f+=""}if(g&&k.ListBox){if(g.Button||g.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarStart"},c.createHTML("span",null,""))}}}j="mceToolbarEnd";if(k.Button){j+=" mceToolbarEndButton"}else{if(k.SplitButton){j+=" mceToolbarEndSplitButton"}else{if(k.ListBox){j+=" mceToolbarEndListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,""));return c.createHTML("table",{id:m.id,"class":"mceToolbar"+(n["class"]?" "+n["class"]:""),cellpadding:"0",cellspacing:"0",align:m.settings.align||"",role:"presentation",tabindex:"-1"},""+f+"")}})})(tinymce);(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){return this.lookup[d]},requireLangPack:function(e){var d=b.settings;if(d&&d.language&&d.language_load!==false){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(e,d){this.items.push(d);this.lookup[e]=d;this.onAdd.dispatch(this,e,d);return d},load:function(h,e,d,g){var f=this;if(f.urls[h]){return}if(e.indexOf("/")!=0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}f.urls[h]=e.substring(0,e.lastIndexOf("/"));if(!f.lookup[h]){b.ScriptLoader.add(e,d,g)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(q){var n=this,p,l=j.ScriptLoader,u,o=[],m;function r(x,y,t){var v=x[y];if(!v){return}if(j.is(v,"string")){t=v.replace(/\.\w+$/,"");t=t?j.resolve(t):0;v=j.resolve(v)}return v.apply(t||this,Array.prototype.slice.call(arguments,2))}q=d({theme:"simple",language:"en"},q);n.settings=q;i.add(document,"init",function(){var s,v;r(q,"onpageload");switch(q.mode){case"exact":s=q.elements||"";if(s.length>0){g(e(s),function(x){if(k.get(x)){m=new j.Editor(x,q);o.push(m);m.render(1)}else{g(document.forms,function(y){g(y.elements,function(z){if(z.name===x){x="mce_editor_"+c++;k.setAttrib(z,"id",x);m=new j.Editor(x,q);o.push(m);m.render(1)}})})}})}break;case"textareas":case"specific_textareas":function t(y,x){return x.constructor===RegExp?x.test(y.className):k.hasClass(y,x)}g(k.select("textarea"),function(x){if(q.editor_deselector&&t(x,q.editor_deselector)){return}if(!q.editor_selector||t(x,q.editor_selector)){u=k.get(x.name);if(!x.id&&!u){x.id=x.name}if(!x.id||n.get(x.id)){x.id=k.uniqueId()}m=new j.Editor(x.id,q);o.push(m);m.render(1)}});break}if(q.oninit){s=v=0;g(o,function(x){v++;if(!x.initialized){x.onInit.add(function(){s++;if(s==v){r(q,"oninit")}})}else{s++}if(s==v){r(q,"oninit")}})}})},get:function(l){if(l===a){return this.editors}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);if(j.adapter){j.adapter.patchEditor(m)}return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l':"",visual_table_class:"mceItemTable",visual:1,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",hidden_input:1,padd_empty_editor:1,render_ui:1,init_theme:1,force_p_newlines:1,indentation:"30px",keep_styles:1,fix_table_elements:1,inline_styles:1,convert_fonts_to_spans:true,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",validate:true,entity_encoding:"named",url_converter:p.convertURL,url_converter_scope:p,ie7_compat:true},q);p.documentBaseURI=new m.util.URI(q.document_base_url||m.documentBaseURL,{base_uri:tinyMCE.baseURI});p.baseURI=m.baseURI;p.contentCSS=[];p.execCallback("setup",p)},render:function(r){var u=this,v=u.settings,x=u.id,p=m.ScriptLoader;if(!j.domLoaded){j.add(document,"init",function(){u.render()});return}tinyMCE.settings=v;if(!u.getElement()){return}if(m.isIDevice){return}if(!/TEXTAREA|INPUT/i.test(u.getElement().nodeName)&&v.hidden_input&&n.getParent(x,"form")){n.insertAfter(n.create("input",{type:"hidden",name:x}),x)}if(m.WindowManager){u.windowManager=new m.WindowManager(u)}if(v.encoding=="xml"){u.onGetContent.add(function(s,t){if(t.save){t.content=n.encode(t.content)}})}if(v.add_form_submit_trigger){u.onSubmit.addToTop(function(){if(u.initialized){u.save();u.isNotDirty=1}})}if(v.add_unload_trigger){u._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(u.initialized&&!u.destroyed&&!u.isHidden()){u.save({format:"raw",no_events:true})}})}m.addUnload(u.destroy,u);if(v.submit_patch){u.onBeforeRenderUI.add(function(){var s=u.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){u.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){m.triggerSave();u.isNotDirty=1;return u.formElement._mceOldSubmit(u.formElement)}}s=null})}function q(){if(v.language&&v.language_load!==false){p.add(m.baseURL+"/langs/"+v.language+".js")}if(v.theme&&v.theme.charAt(0)!="-"&&!h.urls[v.theme]){h.load(v.theme,"themes/"+v.theme+"/editor_template"+m.suffix+".js")}i(g(v.plugins),function(s){if(s&&s.charAt(0)!="-"&&!c.urls[s]){if(s=="safari"){return}c.load(s,"plugins/"+s+"/editor_plugin"+m.suffix+".js")}});p.loadQueue(function(){if(!u.removed){u.init()}})}q()},init:function(){var r,F=this,G=F.settings,C,z,B=F.getElement(),q,p,D,x,A,E,y;m.add(F);G.aria_label=G.aria_label||n.getAttrib(B,"aria-label",F.getLang("aria.rich_text_area"));if(G.theme){G.theme=G.theme.replace(/-/,"");q=h.get(G.theme);F.theme=new q();if(F.theme.init&&G.init_theme){F.theme.init(F,h.urls[G.theme]||m.documentBaseURL.replace(/\/$/,""))}}i(g(G.plugins.replace(/\-/g,"")),function(H){var I=c.get(H),t=c.urls[H]||m.documentBaseURL.replace(/\/$/,""),s;if(I){s=new I(F,t);F.plugins[H]=s;if(s.init){s.init(F,t)}}});if(G.popup_css!==false){if(G.popup_css){G.popup_css=F.documentBaseURI.toAbsolute(G.popup_css)}else{G.popup_css=F.baseURI.toAbsolute("themes/"+G.theme+"/skins/"+G.skin+"/dialog.css")}}if(G.popup_css_add){G.popup_css+=","+F.documentBaseURI.toAbsolute(G.popup_css_add)}F.controlManager=new m.ControlManager(F);if(G.custom_undo_redo){F.onBeforeExecCommand.add(function(t,H,u,I,s){if(H!="Undo"&&H!="Redo"&&H!="mceRepaint"&&(!s||!s.skip_undo)){F.undoManager.beforeChange()}});F.onExecCommand.add(function(t,H,u,I,s){if(H!="Undo"&&H!="Redo"&&H!="mceRepaint"&&(!s||!s.skip_undo)){F.undoManager.add()}})}F.onExecCommand.add(function(s,t){if(!/^(FontName|FontSize)$/.test(t)){F.nodeChanged()}});if(a){function v(s,t){if(!t||!t.initial){F.execCommand("mceRepaint")}}F.onUndo.add(v);F.onRedo.add(v);F.onSetContent.add(v)}F.onBeforeRenderUI.dispatch(F,F.controlManager);if(G.render_ui){C=G.width||B.style.width||B.offsetWidth;z=G.height||B.style.height||B.offsetHeight;F.orgDisplay=B.style.display;E=/^[0-9\.]+(|px)$/i;if(E.test(""+C)){C=Math.max(parseInt(C)+(q.deltaWidth||0),100)}if(E.test(""+z)){z=Math.max(parseInt(z)+(q.deltaHeight||0),100)}q=F.theme.renderUI({targetNode:B,width:C,height:z,deltaWidth:G.delta_width,deltaHeight:G.delta_height});F.editorContainer=q.editorContainer}if(document.domain&&location.hostname!=document.domain){m.relaxedDomain=document.domain}n.setStyles(q.sizeContainer||q.editorContainer,{width:C,height:z});if(G.content_css){m.each(g(G.content_css),function(s){F.contentCSS.push(F.documentBaseURI.toAbsolute(s))})}z=(q.iframeHeight||z)+(typeof(z)=="number"?(q.deltaHeight||0):"");if(z<100){z=100}F.iframeHTML=G.doctype+'';if(G.document_base_url!=m.documentBaseURL){F.iframeHTML+=''}if(G.ie7_compat){F.iframeHTML+=''}else{F.iframeHTML+=''}F.iframeHTML+='';if(!a||!/Firefox\/2/.test(navigator.userAgent)){for(y=0;y'}F.contentCSS=[]}x=G.body_id||"tinymce";if(x.indexOf("=")!=-1){x=F.getParam("body_id","","hash");x=x[F.id]||x}A=G.body_class||"";if(A.indexOf("=")!=-1){A=F.getParam("body_class","","hash");A=A[F.id]||""}F.iframeHTML+='';if(m.relaxedDomain&&(b||(m.isOpera&&parseFloat(opera.version())<11))){D='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+F.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'}r=n.add(q.iframeContainer,"iframe",{id:F.id+"_ifr",src:D||'javascript:""',frameBorder:"0",title:G.aria_label,style:{width:"100%",height:z}});F.contentAreaContainer=q.iframeContainer;n.get(q.editorContainer).style.display=F.orgDisplay;n.get(F.id).style.display="none";n.setAttrib(F.id,"aria-hidden",true);if(!m.relaxedDomain||!D){F.setupIframe()}B=r=q=null},setupIframe:function(){var r=this,x=r.settings,y=n.get(r.id),z=r.getDoc(),v,p;if(!b||!m.relaxedDomain){z.open();z.write(r.iframeHTML);z.close();if(m.relaxedDomain){z.domain=m.relaxedDomain}}if(!b){try{if(!x.readonly){z.designMode="On"}}catch(q){}}if(b){p=r.getBody();n.hide(p);if(!x.readonly){p.contentEditable=true}n.show(p)}r.schema=new m.html.Schema(x);r.dom=new m.dom.DOMUtils(r.getDoc(),{keep_values:true,url_converter:r.convertURL,url_converter_scope:r,hex_colors:x.force_hex_style_colors,class_filter:x.class_filter,update_styles:1,fix_ie_paragraphs:1,schema:r.schema});r.parser=new m.html.DomParser(x,r.schema);r.parser.addAttributeFilter("name",function(s,t){var B=s.length,D,A,C,E;while(B--){E=s[B];if(E.name==="a"&&E.firstChild){C=E.parent;D=E.lastChild;do{A=D.prev;C.insert(D,E);D=A}while(D)}}});r.parser.addAttributeFilter("src,href,style",function(s,t){var A=s.length,B,D=r.dom,C;while(A--){B=s[A];C=B.attr(t);if(t==="style"){B.attr("data-mce-style",D.serializeStyle(D.parseStyle(C),B.name))}else{B.attr("data-mce-"+t,r.convertURL(C,t,B.name))}}});r.parser.addNodeFilter("script",function(s,t){var A=s.length;while(A--){s[A].attr("type","mce-text/javascript")}});r.parser.addNodeFilter("#cdata",function(s,t){var A=s.length,B;while(A--){B=s[A];B.type=8;B.name="#comment";B.value="[CDATA["+B.value+"]]"}});r.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(t,A){var B=t.length,C,s=r.schema.getNonEmptyElements();while(B--){C=t[B];if(C.isEmpty(s)){C.empty().append(new m.html.Node("br",1)).shortEnded=true}}});r.serializer=new m.dom.Serializer(x,r.dom,r.schema);r.selection=new m.dom.Selection(r.dom,r.getWin(),r.serializer);r.formatter=new m.Formatter(this);r.formatter.register({alignleft:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"}},{selector:"img,table",collapsed:false,styles:{"float":"left"}}],aligncenter:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"}},{selector:"img",collapsed:false,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:false,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"}},{selector:"img,table",collapsed:false,styles:{"float":"right"}}],alignfull:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"}}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:true},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:false},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:false},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:true,expand:false,block_expand:true,deep:true},{selector:"span",attributes:["style","class"],remove:"empty",split:true,expand:false,deep:true},{selector:"*",attributes:["style","class"],split:false,expand:false,deep:true}]});i("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(s){r.formatter.register(s,{block:s,remove:"all"})});r.formatter.register(r.settings.formats);r.undoManager=new m.UndoManager(r);r.undoManager.onAdd.add(function(t,s){if(t.hasUndo()){return r.onChange.dispatch(r,s,t)}});r.undoManager.onUndo.add(function(t,s){return r.onUndo.dispatch(r,s,t)});r.undoManager.onRedo.add(function(t,s){return r.onRedo.dispatch(r,s,t)});r.forceBlocks=new m.ForceBlocks(r,{forced_root_block:x.forced_root_block});r.editorCommands=new m.EditorCommands(r);r.serializer.onPreProcess.add(function(s,t){return r.onPreProcess.dispatch(r,t,s)});r.serializer.onPostProcess.add(function(s,t){return r.onPostProcess.dispatch(r,t,s)});r.onPreInit.dispatch(r);if(!x.gecko_spellcheck){r.getBody().spellcheck=0}if(!x.readonly){r._addEvents()}r.controlManager.onPostRender.dispatch(r,r.controlManager);r.onPostRender.dispatch(r);if(x.directionality){r.getBody().dir=x.directionality}if(x.nowrap){r.getBody().style.whiteSpace="nowrap"}if(x.handle_node_change_callback){r.onNodeChange.add(function(t,s,A){r.execCallback("handle_node_change_callback",r.id,A,-1,-1,true,r.selection.isCollapsed())})}if(x.save_callback){r.onSaveContent.add(function(s,A){var t=r.execCallback("save_callback",r.id,A.content,r.getBody());if(t){A.content=t}})}if(x.onchange_callback){r.onChange.add(function(t,s){r.execCallback("onchange_callback",r,s)})}if(x.protect){r.onBeforeSetContent.add(function(s,t){if(x.protect){i(x.protect,function(A){t.content=t.content.replace(A,function(B){return""})})}})}if(x.convert_newlines_to_brs){r.onBeforeSetContent.add(function(s,t){if(t.initial){t.content=t.content.replace(/\r?\n/g,"
    ")}})}if(x.preformatted){r.onPostProcess.add(function(s,t){t.content=t.content.replace(/^\s*/,"");t.content=t.content.replace(/<\/pre>\s*$/,"");if(t.set){t.content='
    '+t.content+"
    "}})}if(x.verify_css_classes){r.serializer.attribValueFilter=function(C,A){var B,t;if(C=="class"){if(!r.classesRE){t=r.dom.getClasses();if(t.length>0){B="";i(t,function(s){B+=(B?"|":"")+s["class"]});r.classesRE=new RegExp("("+B+")","gi")}}return !r.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(A)||r.classesRE.test(A)?A:""}return A}}if(x.cleanup_callback){r.onBeforeSetContent.add(function(s,t){t.content=r.execCallback("cleanup_callback","insert_to_editor",t.content,t)});r.onPreProcess.add(function(s,t){if(t.set){r.execCallback("cleanup_callback","insert_to_editor_dom",t.node,t)}if(t.get){r.execCallback("cleanup_callback","get_from_editor_dom",t.node,t)}});r.onPostProcess.add(function(s,t){if(t.set){t.content=r.execCallback("cleanup_callback","insert_to_editor",t.content,t)}if(t.get){t.content=r.execCallback("cleanup_callback","get_from_editor",t.content,t)}})}if(x.save_callback){r.onGetContent.add(function(s,t){if(t.save){t.content=r.execCallback("save_callback",r.id,t.content,r.getBody())}})}if(x.handle_event_callback){r.onEvent.add(function(s,t,A){if(r.execCallback("handle_event_callback",t,s,A)===false){j.cancel(t)}})}r.onSetContent.add(function(){r.addVisual(r.getBody())});if(x.padd_empty_editor){r.onPostProcess.add(function(s,t){t.content=t.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
    [\r\n]*)$/,"")})}if(a){function u(s,t){i(s.dom.select("a"),function(B){var A=B.parentNode;if(s.dom.isBlock(A)&&A.lastChild===B){s.dom.add(A,"br",{"data-mce-bogus":1})}})}r.onExecCommand.add(function(s,t){if(t==="CreateLink"){u(s)}});r.onSetContent.add(r.selection.onSetContent.add(u));if(!x.readonly){try{z.designMode="Off";z.designMode="On"}catch(q){}}}setTimeout(function(){if(r.removed){return}r.load({initial:true,format:"html"});r.startContent=r.getContent({format:"raw"});r.undoManager.add();r.initialized=true;r.onInit.dispatch(r);r.execCallback("setupcontent_callback",r.id,r.getBody(),r.getDoc());r.execCallback("init_instance_callback",r);r.focus(true);r.nodeChanged({initial:1});i(r.contentCSS,function(s){r.dom.loadCSS(s)});if(x.auto_focus){setTimeout(function(){var s=m.get(x.auto_focus);s.selection.select(s.getBody(),1);s.selection.collapse(1);s.getWin().focus()},100)}},1);y=null},focus:function(s){var x,q=this,v=q.settings.content_editable,r,p,u=q.getDoc();if(!s){r=q.selection.getRng();if(r.item){p=r.item(0)}if(!v){q.getWin().focus()}if(p&&p.ownerDocument==u){r=u.body.createControlRange();r.addElement(p);r.select()}}if(m.activeEditor!=q){if((x=m.activeEditor)!=null){x.onDeactivate.dispatch(x,q)}q.onActivate.dispatch(q,x)}m._setActive(q)},execCallback:function(u){var p=this,r=p.settings[u],q;if(!r){return}if(p.callbackLookup&&(q=p.callbackLookup[u])){r=q.func;q=q.scope}if(d(r,"string")){q=r.replace(/\.\w+$/,"");q=q?m.resolve(q):0;r=m.resolve(r);p.callbackLookup=p.callbackLookup||{};p.callbackLookup[u]={func:r,scope:q}}return r.apply(q||p,Array.prototype.slice.call(arguments,1))},translate:function(p){var r=this.settings.language||"en",q=m.i18n;if(!p){return""}return q[r+"."+p]||p.replace(/{\#([^}]+)\}/g,function(t,s){return q[r+"."+s]||"{#"+s+"}"})},getLang:function(q,p){return m.i18n[(this.settings.language||"en")+"."+q]||(d(p)?p:"{#"+q+"}")},getParam:function(u,r,p){var s=m.trim,q=d(this.settings[u])?this.settings[u]:r,t;if(p==="hash"){t={};if(d(q,"string")){i(q.indexOf("=")>0?q.split(/[;,](?![^=;,]*(?:[;,]|$))/):q.split(","),function(x){x=x.split("=");if(x.length>1){t[s(x[0])]=s(x[1])}else{t[s(x[0])]=s(x)}})}else{t=q}return t}return q},nodeChanged:function(r){var p=this,q=p.selection,u=q.getStart()||p.getBody();if(p.initialized){r=r||{};u=b&&u.ownerDocument!=p.getDoc()?p.getBody():u;r.parents=[];p.dom.getParent(u,function(s){if(s.nodeName=="BODY"){return true}r.parents.push(s)});p.onNodeChange.dispatch(p,r?r.controlManager||p.controlManager:p.controlManager,u,q.isCollapsed(),r)}},addButton:function(r,q){var p=this;p.buttons=p.buttons||{};p.buttons[r]=q},addCommand:function(p,r,q){this.execCommands[p]={func:r,scope:q||this}},addQueryStateHandler:function(p,r,q){this.queryStateCommands[p]={func:r,scope:q||this}},addQueryValueHandler:function(p,r,q){this.queryValueCommands[p]={func:r,scope:q||this}},addShortcut:function(r,u,p,s){var q=this,v;if(!q.settings.custom_shortcuts){return false}q.shortcuts=q.shortcuts||{};if(d(p,"string")){v=p;p=function(){q.execCommand(v,false,null)}}if(d(p,"object")){v=p;p=function(){q.execCommand(v[0],v[1],v[2])}}i(g(r),function(t){var x={func:p,scope:s||this,desc:u,alt:false,ctrl:false,shift:false};i(g(t,"+"),function(y){switch(y){case"alt":case"ctrl":case"shift":x[y]=true;break;default:x.charCode=y.charCodeAt(0);x.keyCode=y.toUpperCase().charCodeAt(0)}});q.shortcuts[(x.ctrl?"ctrl":"")+","+(x.alt?"alt":"")+","+(x.shift?"shift":"")+","+x.keyCode]=x});return true},execCommand:function(x,v,z,p){var r=this,u=0,y,q;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(x)&&(!p||!p.skip_focus)){r.focus()}y={};r.onBeforeExecCommand.dispatch(r,x,v,z,y);if(y.terminate){return false}if(r.execCallback("execcommand_callback",r.id,r.selection.getNode(),x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}if(y=r.execCommands[x]){q=y.func.call(y.scope,v,z);if(q!==true){r.onExecCommand.dispatch(r,x,v,z,p);return q}}i(r.plugins,function(s){if(s.execCommand&&s.execCommand(x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);u=1;return false}});if(u){return true}if(r.theme&&r.theme.execCommand&&r.theme.execCommand(x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}if(r.editorCommands.execCommand(x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}r.getDoc().execCommand(x,v,z);r.onExecCommand.dispatch(r,x,v,z,p)},queryCommandState:function(u){var q=this,v,r;if(q._isHidden()){return}if(v=q.queryStateCommands[u]){r=v.func.call(v.scope);if(r!==true){return r}}v=q.editorCommands.queryCommandState(u);if(v!==-1){return v}try{return this.getDoc().queryCommandState(u)}catch(p){}},queryCommandValue:function(v){var q=this,u,r;if(q._isHidden()){return}if(u=q.queryValueCommands[v]){r=u.func.call(u.scope);if(r!==true){return r}}u=q.editorCommands.queryCommandValue(v);if(d(u)){return u}try{return this.getDoc().queryCommandValue(v)}catch(p){}},show:function(){var p=this;n.show(p.getContainer());n.hide(p.id);p.load()},hide:function(){var p=this,q=p.getDoc();if(b&&q){q.execCommand("SelectAll")}p.save();n.hide(p.getContainer());n.setStyle(p.id,"display",p.orgDisplay)},isHidden:function(){return !n.isHidden(this.id)},setProgressState:function(p,q,r){this.onSetProgressState.dispatch(this,p,q,r);return p},load:function(s){var p=this,r=p.getElement(),q;if(r){s=s||{};s.load=true;q=p.setContent(d(r.value)?r.value:r.innerHTML,s);s.element=r;if(!s.no_events){p.onLoadContent.dispatch(p,s)}s.element=r=null;return q}},save:function(u){var p=this,s=p.getElement(),q,r;if(!s||!p.initialized){return}u=u||{};u.save=true;if(!u.no_events){p.undoManager.typing=false;p.undoManager.add()}u.element=s;q=u.content=p.getContent(u);if(!u.no_events){p.onSaveContent.dispatch(p,u)}q=u.content;if(!/TEXTAREA|INPUT/i.test(s.nodeName)){s.innerHTML=q;if(r=n.getParent(p.id,"form")){i(r.elements,function(t){if(t.name==p.id){t.value=q;return false}})}}else{s.value=q}u.element=s=null;return q},setContent:function(t,s){var r=this,q,p=r.getBody();s=s||{};s.format=s.format||"html";s.set=true;s.content=t;if(!s.no_events){r.onBeforeSetContent.dispatch(r,s)}t=s.content;if(!m.isIE&&(t.length===0||/^\s+$/.test(t))){p.innerHTML='
    ';return}if(s.format!=="raw"){t=new m.html.Serializer({},r.schema).serialize(r.parser.parse(t))}s.content=m.trim(t);r.dom.setHTML(p,s.content);if(!s.no_events){r.onSetContent.dispatch(r,s)}return s.content},getContent:function(q){var p=this,r;q=q||{};q.format=q.format||"html";q.get=true;if(!q.no_events){p.onBeforeGetContent.dispatch(p,q)}if(q.format=="raw"){r=p.getBody().innerHTML}else{r=p.serializer.serialize(p.getBody(),q)}q.content=m.trim(r);if(!q.no_events){p.onGetContent.dispatch(p,q)}return q.content},isDirty:function(){var p=this;return m.trim(p.startContent)!=m.trim(p.getContent({format:"raw",no_events:1}))&&!p.isNotDirty},getContainer:function(){var p=this;if(!p.container){p.container=n.get(p.editorContainer||p.id+"_parent")}return p.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return n.get(this.settings.content_element||this.id)},getWin:function(){var p=this,q;if(!p.contentWindow){q=n.get(p.id+"_ifr");if(q){p.contentWindow=q.contentWindow}}return p.contentWindow},getDoc:function(){var q=this,p;if(!q.contentDocument){p=q.getWin();if(p){q.contentDocument=p.document}}return q.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(p,x,v){var q=this,r=q.settings;if(r.urlconverter_callback){return q.execCallback("urlconverter_callback",p,v,true,x)}if(!r.convert_urls||(v&&v.nodeName=="LINK")||p.indexOf("file:")===0){return p}if(r.relative_urls){return q.documentBaseURI.toRelative(p)}p=q.documentBaseURI.toAbsolute(p,r.remove_script_host);return p},addVisual:function(r){var p=this,q=p.settings;r=r||p.getBody();if(!d(p.hasVisual)){p.hasVisual=q.visual}i(p.dom.select("table,a",r),function(t){var s;switch(t.nodeName){case"TABLE":s=p.dom.getAttrib(t,"border");if(!s||s=="0"){if(p.hasVisual){p.dom.addClass(t,q.visual_table_class)}else{p.dom.removeClass(t,q.visual_table_class)}}return;case"A":s=p.dom.getAttrib(t,"name");if(s){if(p.hasVisual){p.dom.addClass(t,"mceItemAnchor")}else{p.dom.removeClass(t,"mceItemAnchor")}}return}});p.onVisualAid.dispatch(p,r,p.hasVisual)},remove:function(){var p=this,q=p.getContainer();p.removed=1;p.hide();p.execCallback("remove_instance_callback",p);p.onRemove.dispatch(p);p.onExecCommand.listeners=[];m.remove(p);n.remove(q)},destroy:function(q){var p=this;if(p.destroyed){return}if(!q){m.removeUnload(p.destroy);tinyMCE.onBeforeUnload.remove(p._beforeUnload);if(p.theme&&p.theme.destroy){p.theme.destroy()}p.controlManager.destroy();p.selection.destroy();p.dom.destroy();if(!p.settings.content_editable){j.clear(p.getWin());j.clear(p.getDoc())}j.clear(p.getBody());j.clear(p.formElement)}if(p.formElement){p.formElement.submit=p.formElement._mceOldSubmit;p.formElement._mceOldSubmit=null}p.contentAreaContainer=p.formElement=p.container=p.settings.content_element=p.bodyElement=p.contentDocument=p.contentWindow=null;if(p.selection){p.selection=p.selection.win=p.selection.dom=p.selection.dom.doc=null}p.destroyed=1},_addEvents:function(){var B=this,r,C=B.settings,q=B.dom,x={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function p(t,D){var s=t.type;if(B.removed){return}if(B.onEvent.dispatch(B,t,D)!==false){B[x[t.fakeType||t.type]].dispatch(B,t,D)}}i(x,function(t,s){switch(s){case"contextmenu":q.bind(B.getDoc(),s,p);break;case"paste":q.bind(B.getBody(),s,function(D){p(D)});break;case"submit":case"reset":q.bind(B.getElement().form||n.getParent(B.id,"form"),s,p);break;default:q.bind(C.content_editable?B.getBody():B.getDoc(),s,p)}});q.bind(C.content_editable?B.getBody():(a?B.getDoc():B.getWin()),"focus",function(s){B.focus(true)});if(m.isGecko){q.bind(B.getDoc(),"DOMNodeInserted",function(t){var s;t=t.target;if(t.nodeType===1&&t.nodeName==="IMG"&&(s=t.getAttribute("data-mce-src"))){t.src=B.documentBaseURI.toAbsolute(s)}})}if(a){function u(){var E=this,G=E.getDoc(),F=E.settings;if(a&&!F.readonly){if(E._isHidden()){try{if(!F.content_editable){G.designMode="On"}}catch(D){}}try{G.execCommand("styleWithCSS",0,false)}catch(D){if(!E._isHidden()){try{G.execCommand("useCSS",0,true)}catch(D){}}}if(!F.table_inline_editing){try{G.execCommand("enableInlineTableEditing",false,false)}catch(D){}}if(!F.object_resizing){try{G.execCommand("enableObjectResizing",false,false)}catch(D){}}}}B.onBeforeExecCommand.add(u);B.onMouseDown.add(u)}if(m.isWebKit){B.onClick.add(function(s,t){t=t.target;if(t.nodeName=="IMG"||(t.nodeName=="A"&&q.hasClass(t,"mceItemAnchor"))){B.selection.getSel().setBaseAndExtent(t,0,t,1);B.nodeChanged()}})}B.onMouseUp.add(B.nodeChanged);B.onKeyUp.add(function(s,t){var D=t.keyCode;if((D>=33&&D<=36)||(D>=37&&D<=40)||D==13||D==45||D==46||D==8||(m.isMac&&(D==91||D==93))||t.ctrlKey){B.nodeChanged()}});B.onReset.add(function(){B.setContent(B.startContent,{format:"raw"})});if(C.custom_shortcuts){if(C.custom_undo_redo_keyboard_shortcuts){B.addShortcut("ctrl+z",B.getLang("undo_desc"),"Undo");B.addShortcut("ctrl+y",B.getLang("redo_desc"),"Redo")}B.addShortcut("ctrl+b",B.getLang("bold_desc"),"Bold");B.addShortcut("ctrl+i",B.getLang("italic_desc"),"Italic");B.addShortcut("ctrl+u",B.getLang("underline_desc"),"Underline");for(r=1;r<=6;r++){B.addShortcut("ctrl+"+r,"",["FormatBlock",false,"h"+r])}B.addShortcut("ctrl+7","",["FormatBlock",false,"

    "]);B.addShortcut("ctrl+8","",["FormatBlock",false,"

    "]);B.addShortcut("ctrl+9","",["FormatBlock",false,"
    "]);function v(t){var s=null;if(!t.altKey&&!t.ctrlKey&&!t.metaKey){return s}i(B.shortcuts,function(D){if(m.isMac&&D.ctrl!=t.metaKey){return}else{if(!m.isMac&&D.ctrl!=t.ctrlKey){return}}if(D.alt!=t.altKey){return}if(D.shift!=t.shiftKey){return}if(t.keyCode==D.keyCode||(t.charCode&&t.charCode==D.charCode)){s=D;return false}});return s}B.onKeyUp.add(function(s,t){var D=v(t);if(D){return j.cancel(t)}});B.onKeyPress.add(function(s,t){var D=v(t);if(D){return j.cancel(t)}});B.onKeyDown.add(function(s,t){var D=v(t);if(D){D.func.call(D.scope);return j.cancel(t)}})}if(m.isIE){q.bind(B.getDoc(),"controlselect",function(D){var t=B.resizeInfo,s;D=D.target;if(D.nodeName!=="IMG"){return}if(t){q.unbind(t.node,t.ev,t.cb)}if(!q.hasClass(D,"mceItemNoResize")){ev="resizeend";s=q.bind(D,ev,function(F){var E;F=F.target;if(E=q.getStyle(F,"width")){q.setAttrib(F,"width",E.replace(/[^0-9%]+/g,""));q.setStyle(F,"width","")}if(E=q.getStyle(F,"height")){q.setAttrib(F,"height",E.replace(/[^0-9%]+/g,""));q.setStyle(F,"height","")}})}else{ev="resizestart";s=q.bind(D,"resizestart",j.cancel,j)}t=B.resizeInfo={node:D,ev:ev,cb:s}});B.onKeyDown.add(function(s,D){var t;switch(D.keyCode){case 8:t=B.getDoc().selection;if(t.createRange&&t.createRange().item){s.dom.remove(t.createRange().item(0));return j.cancel(D)}}})}if(m.isOpera){B.onClick.add(function(s,t){j.prevent(t)})}if(C.custom_undo_redo){function y(){B.undoManager.typing=false;B.undoManager.add()}q.bind(B.getDoc(),"focusout",function(s){if(!B.removed&&B.undoManager.typing){y()}});B.dom.bind(B.dom.getRoot(),"dragend",function(s){y()});B.onKeyUp.add(function(t,F){var s,E,D;if(b&&F.keyCode==8){s=B.selection.getRng();if(s.parentElement){E=s.parentElement();D=B.selection.getBookmark();E.innerHTML=E.innerHTML;B.selection.moveToBookmark(D)}}if((F.keyCode>=33&&F.keyCode<=36)||(F.keyCode>=37&&F.keyCode<=40)||F.keyCode==13||F.keyCode==45||F.ctrlKey){y()}});B.onKeyDown.add(function(t,H){var s,F,E,G=H.keyCode;if(b&&G==46){s=B.selection.getRng();if(s.parentElement){F=s.parentElement();if(!B.undoManager.typing){B.undoManager.beforeChange();B.undoManager.typing=true;B.undoManager.add()}if(H.ctrlKey){s.moveEnd("word",1);s.select()}B.selection.getSel().clear();if(s.parentElement()==F){E=B.selection.getBookmark();try{F.innerHTML=F.innerHTML}catch(D){}B.selection.moveToBookmark(E)}H.preventDefault();return}}if((G>=33&&G<=36)||(G>=37&&G<=40)||G==13||G==45){if(m.isIE&&G==13){B.undoManager.beforeChange()}if(B.undoManager.typing){y()}return}if((G<16||G>20)&&G!=224&&G!=91&&!B.undoManager.typing){B.undoManager.beforeChange();B.undoManager.add();B.undoManager.typing=true}});B.onMouseDown.add(function(){if(B.undoManager.typing){y()}})}if(m.isGecko){function A(){var s=B.dom.getAttribs(B.selection.getStart().cloneNode(false));return function(){var t=B.selection.getStart();B.dom.removeAllAttribs(t);i(s,function(D){t.setAttributeNode(D.cloneNode(true))})}}function z(){var t=B.selection;return !t.isCollapsed()&&t.getStart()!=t.getEnd()}B.onKeyPress.add(function(s,D){var t;if((D.keyCode==8||D.keyCode==46)&&z()){t=A();B.getDoc().execCommand("delete",false,null);t();return j.cancel(D)}});B.dom.bind(B.getDoc(),"cut",function(t){var s;if(z()){s=A();B.onKeyUp.addToTop(j.cancel,j);setTimeout(function(){s();B.onKeyUp.remove(j.cancel,j)},0)}})}},_isHidden:function(){var p;if(!a){return 0}p=this.selection.getSel();return(!p||!p.rangeCount||p.rangeCount==0)}})})(tinymce);(function(c){var d=c.each,e,a=true,b=false;c.EditorCommands=function(n){var l=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,o;function q(y,x,v){var u;y=y.toLowerCase();if(u=j.exec[y]){u(y,x,v);return a}return b}function m(v){var u;v=v.toLowerCase();if(u=j.state[v]){return u(v)}return -1}function h(v){var u;v=v.toLowerCase();if(u=j.value[v]){return u(v)}return b}function t(u,v){v=v||"exec";d(u,function(y,x){d(x.toLowerCase().split(","),function(z){j[v][z]=y})})}c.extend(this,{execCommand:q,queryCommandState:m,queryCommandValue:h,addCommands:t});function f(x,v,u){if(v===e){v=b}if(u===e){u=null}return n.getDoc().execCommand(x,v,u)}function s(u){return n.formatter.match(u)}function r(u,v){n.formatter.toggle(u,v?{value:v}:e)}function i(u){o=p.getBookmark(u)}function g(){p.moveToBookmark(o)}t({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(y){var x=n.getDoc(),u;try{f(y)}catch(v){u=a}if(u||!x.queryCommandSupported(y)){if(c.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(z){if(z){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(u){if(p.isCollapsed()){p.select(p.getNode())}f(u);p.collapse(b)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(u){var v=u.substring(7);d("left,center,right,full".split(","),function(x){if(v!=x){n.formatter.remove("align"+x)}});r("align"+v);q("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(x){var u,v;f(x);u=l.getParent(p.getNode(),"ol,ul");if(u){v=u.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(v.nodeName)){i();l.split(v,u);g()}}},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(u){r(u)},"ForeColor,HiliteColor,FontName":function(x,v,u){r(x,u)},FontSize:function(y,x,v){var u,z;if(v>=1&&v<=7){z=c.explode(k.font_size_style_values);u=c.explode(k.font_size_classes);if(u){v=u[v-1]||v}else{v=z[v-1]||v}}r(y,v)},RemoveFormat:function(u){n.formatter.remove(u)},mceBlockQuote:function(u){r("blockquote")},FormatBlock:function(x,v,u){return r(u||"p")},mceCleanup:function(){var u=p.getBookmark();n.setContent(n.getContent({cleanup:a}),{cleanup:a});p.moveToBookmark(u)},mceRemoveNode:function(y,x,v){var u=v||p.getNode();if(u!=n.getBody()){i();n.dom.remove(u,a);g()}},mceSelectNodeDepth:function(y,x,v){var u=0;l.getParent(p.getNode(),function(z){if(z.nodeType==1&&u++==v){p.select(z);return b}},n.getBody())},mceSelectNode:function(x,v,u){p.select(u)},mceInsertContent:function(z,D,E){var C,u,x,F,y,u,A,G,B;function v(I,J,H){var K=new c.dom.TreeWalker(H?I.nextSibling:I.previousSibling,J);while((I=K.current())){if((I.nodeType==3&&c.trim(I.nodeValue).length)||I.nodeName=="BR"||I.nodeName=="IMG"){return I}if(H){K.next()}else{K.prev()}}}B={content:E,format:"html"};p.onBeforeSetContent.dispatch(p,B);E=B.content;if(E.indexOf("{$caret}")==-1){E+="{$caret}"}p.setContent('\uFEFF',{no_events:false});l.setOuterHTML("__mce",E.replace(/\{\$caret\}/,'\uFEFF'));C=l.select("#__mce")[0];x=l.getRoot();if(C.previousSibling&&l.isBlock(C.previousSibling)||C.parentNode==x){y=v(C,x);if(y){if(y.nodeName=="BR"){y.parentNode.insertBefore(C,y)}else{l.insertAfter(C,y)}}}while(C){if(C===x){l.setOuterHTML(F,new c.html.Serializer({},n.schema).serialize(n.parser.parse(l.getOuterHTML(F))));break}F=C;C=C.parentNode}C=l.select("#__mce")[0];if(C){y=v(C,x)||v(C,x,true);l.remove(C);if(y){u=l.createRng();if(y.nodeType==3){u.setStart(y,y.length);u.setEnd(y,y.length)}else{if(y.nodeName=="BR"){u.setStartBefore(y);u.setEndBefore(y)}else{u.setStartAfter(y);u.setEndAfter(y)}}p.setRng(u);if(!c.isIE){y=l.create("span",null,"\u00a0");u.insertNode(y);A=l.getRect(y);G=l.getViewPort(n.getWin());if((A.y>G.y+G.h||A.yG.x+G.w||A.x")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(x,v,u){n.execCommand("mceInsertContent",false,u.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(A,z,y){var x=l.getParent(p.getNode(),"a"),v,u;if(c.is(y,"string")){y={href:y}}y.href=y.href.replace(" ","%20");if(!x){if(c.isWebKit){v=l.getParent(p.getNode(),"img");if(v){u=v.style.cssFloat;v.style.cssFloat=null}}f("CreateLink",b,"javascript:mctmp(0);");if(u){v.style.cssFloat=u}d(l.select("a[href='javascript:mctmp(0);']"),function(B){l.setAttribs(B,y)})}else{if(y.href){l.setAttribs(x,y)}else{n.dom.remove(x,a)}}},selectAll:function(){var v=l.getRoot(),u=l.createRng();u.setStart(v,0);u.setEnd(v,v.childNodes.length);n.selection.setRng(u)}});t({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(u){return s("align"+u.substring(7))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(u){return s(u)},mceBlockQuote:function(){return s("blockquote")},Outdent:function(){var u;if(k.inline_styles){if((u=l.getParent(p.getStart(),l.isBlock))&&parseInt(u.style.paddingLeft)>0){return a}if((u=l.getParent(p.getEnd(),l.isBlock))&&parseInt(u.style.paddingLeft)>0){return a}}return m("InsertUnorderedList")||m("InsertOrderedList")||(!k.inline_styles&&!!l.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(u){return l.getParent(p.getNode(),u=="insertunorderedlist"?"UL":"OL")}},"state");t({"FontSize,FontName":function(x){var v=0,u;if(u=l.getParent(p.getNode(),"span")){if(x=="fontsize"){v=u.style.fontSize}else{v=u.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return v}},"value");if(k.custom_undo_redo){t({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}}})(tinymce);(function(b){var a=b.util.Dispatcher;b.UndoManager=function(e){var c,d=0,g=[];function f(){return b.trim(e.getContent({format:"raw",no_events:1}))}return c={typing:false,onAdd:new a(c),onUndo:new a(c),onRedo:new a(c),beforeChange:function(){if(g[d]){g[d].beforeBookmark=e.selection.getBookmark(2,true)}},add:function(l){var h,j=e.settings,k;l=l||{};l.content=f();k=g[d];if(k&&k.content==l.content){return null}if(j.custom_undo_redo_levels){if(g.length>j.custom_undo_redo_levels){for(h=0;h0){j=g[--d];e.setContent(j.content,{format:"raw"});e.selection.moveToBookmark(j.beforeBookmark);c.onUndo.dispatch(c,j)}return j},redo:function(){var h;if(d0||this.typing},hasRedo:function(){return d');q.replace(p,m);o.select(p,1)}return g}return d}l.create("tinymce.ForceBlocks",{ForceBlocks:function(m){var n=this,o=m.settings,p;n.editor=m;n.dom=m.dom;p=(o.forced_root_block||"p").toLowerCase();o.element=p.toUpperCase();m.onPreInit.add(n.setup,n);if(o.forced_root_block){m.onInit.add(n.forceRoots,n);m.onSetContent.add(n.forceRoots,n);m.onBeforeGetContent.add(n.forceRoots,n);m.onExecCommand.add(function(q,r){if(r=="mceInsertContent"){n.forceRoots();q.nodeChanged()}})}},setup:function(){var n=this,m=n.editor,p=m.settings,r=m.dom,o=m.selection;if(p.forced_root_block){m.onBeforeExecCommand.add(n.forceRoots,n);m.onKeyUp.add(n.forceRoots,n);m.onPreProcess.add(n.forceRoots,n)}if(p.force_br_newlines){if(c){m.onKeyPress.add(function(s,t){var u;if(t.keyCode==13&&o.getNode().nodeName!="LI"){o.setContent('
    ',{format:"raw"});u=r.get("__");u.removeAttribute("id");o.select(u);o.collapse();return j.cancel(t)}})}}if(p.force_p_newlines){if(!c){m.onKeyPress.add(function(s,t){if(t.keyCode==13&&!t.shiftKey&&!n.insertPara(t)){j.cancel(t)}})}else{l.addUnload(function(){n._previousFormats=0});m.onKeyPress.add(function(s,t){n._previousFormats=0;if(t.keyCode==13&&!t.shiftKey&&s.selection.isCollapsed()&&p.keep_styles){n._previousFormats=k(s.selection.getStart())}});m.onKeyUp.add(function(t,v){if(v.keyCode==13&&!v.shiftKey){var u=t.selection.getStart(),s=n._previousFormats;if(!u.hasChildNodes()&&s){u=r.getParent(u,r.isBlock);if(u&&u.nodeName!="LI"){u.innerHTML="";if(n._previousFormats){u.appendChild(s.wrapper);s.inner.innerHTML="\uFEFF"}else{u.innerHTML="\uFEFF"}o.select(u,1);o.collapse(true);t.getDoc().execCommand("Delete",false,null);n._previousFormats=0}}}})}if(a){m.onKeyDown.add(function(s,t){if((t.keyCode==8||t.keyCode==46)&&!t.shiftKey){n.backspaceDelete(t,t.keyCode==8)}})}}if(l.isWebKit){function q(t){var s=o.getRng(),u,y=r.create("div",null," "),x,v=r.getViewPort(t.getWin()).h;s.insertNode(u=r.create("br"));s.setStartAfter(u);s.setEndAfter(u);o.setRng(s);if(o.getSel().focusNode==u.previousSibling){o.select(r.insertAfter(r.doc.createTextNode("\u00a0"),u));o.collapse(d)}r.insertAfter(y,u);x=r.getPos(y).y;r.remove(y);if(x>v){t.getWin().scrollTo(0,x)}}m.onKeyPress.add(function(s,t){if(t.keyCode==13&&(t.shiftKey||(p.force_br_newlines&&!r.getParent(o.getNode(),"h1,h2,h3,h4,h5,h6,ol,ul")))){q(s);j.cancel(t)}})}if(c){if(p.element!="P"){m.onKeyPress.add(function(s,t){n.lastElm=o.getNode().nodeName});m.onKeyUp.add(function(t,u){var x,v=o.getNode(),s=t.getBody();if(s.childNodes.length===1&&v.nodeName=="P"){v=r.rename(v,p.element);o.select(v);o.collapse();t.nodeChanged()}else{if(u.keyCode==13&&!u.shiftKey&&n.lastElm!="P"){x=r.getParent(v,"p");if(x){r.rename(x,p.element);t.nodeChanged()}}}})}}},find:function(u,p,q){var o=this.editor,m=o.getDoc().createTreeWalker(u,4,null,g),r=-1;while(u=m.nextNode()){r++;if(p==0&&u==q){return r}if(p==1&&r==q){return u}}return -1},forceRoots:function(v,H){var y=this,v=y.editor,L=v.getBody(),I=v.getDoc(),O=v.selection,z=O.getSel(),A=O.getRng(),M=-2,u,F,m,o,J=-16777215;var K,p,N,E,B,q=L.childNodes,D,C,x;for(D=q.length-1;D>=0;D--){K=q[D];if(K.nodeType===1&&K.getAttribute("data-mce-type")){p=null;continue}if(K.nodeType===3||(!y.dom.isBlock(K)&&K.nodeType!==8&&!/^(script|mce:script|style|mce:style)$/i.test(K.nodeName))){if(!p){if(K.nodeType!=3||/[^\s]/g.test(K.nodeValue)){if(M==-2&&A){if(!c||A.setStart){if(A.startContainer.nodeType==1&&(C=A.startContainer.childNodes[A.startOffset])&&C.nodeType==1){x=C.getAttribute("id");C.setAttribute("id","__mce")}else{if(v.dom.getParent(A.startContainer,function(n){return n===L})){F=A.startOffset;m=A.endOffset;M=y.find(L,0,A.startContainer);u=y.find(L,0,A.endContainer)}}}else{if(A.item){o=I.body.createTextRange();o.moveToElementText(A.item(0));A=o}o=I.body.createTextRange();o.moveToElementText(L);o.collapse(1);N=o.move("character",J)*-1;o=A.duplicate();o.collapse(1);E=o.move("character",J)*-1;o=A.duplicate();o.collapse(0);B=(o.move("character",J)*-1)-E;M=E-N;u=B}}p=v.dom.create(v.settings.forced_root_block);K.parentNode.replaceChild(p,K);p.appendChild(K)}}else{if(p.hasChildNodes()){p.insertBefore(K,p.firstChild)}else{p.appendChild(K)}}}else{p=null}}if(M!=-2){if(!c||A.setStart){p=L.getElementsByTagName(v.settings.element)[0];A=I.createRange();if(M!=-1){A.setStart(y.find(L,1,M),F)}else{A.setStart(p,0)}if(u!=-1){A.setEnd(y.find(L,1,u),m)}else{A.setEnd(p,0)}if(z){z.removeAllRanges();z.addRange(A)}}else{try{A=z.createRange();A.moveToElementText(L);A.collapse(1);A.moveStart("character",M);A.moveEnd("character",u);A.select()}catch(G){}}}else{if((!c||A.setStart)&&(C=v.dom.get("__mce"))){if(x){C.setAttribute("id",x)}else{C.removeAttribute("id")}A=I.createRange();A.setStartBefore(C);A.setEndBefore(C);O.setRng(A)}}},getParentBlock:function(o){var m=this.dom;return m.getParent(o,m.isBlock)},insertPara:function(R){var F=this,v=F.editor,N=v.dom,S=v.getDoc(),W=v.settings,G=v.selection.getSel(),H=G.getRangeAt(0),V=S.body;var K,L,I,P,O,q,o,u,z,m,D,U,p,x,J,M=N.getViewPort(v.getWin()),C,E,B;v.undoManager.beforeChange();K=S.createRange();K.setStart(G.anchorNode,G.anchorOffset);K.collapse(d);L=S.createRange();L.setStart(G.focusNode,G.focusOffset);L.collapse(d);I=K.compareBoundaryPoints(K.START_TO_END,L)<0;P=I?G.anchorNode:G.focusNode;O=I?G.anchorOffset:G.focusOffset;q=I?G.focusNode:G.anchorNode;o=I?G.focusOffset:G.anchorOffset;if(P===q&&/^(TD|TH)$/.test(P.nodeName)){if(P.firstChild.nodeName=="BR"){N.remove(P.firstChild)}if(P.childNodes.length==0){v.dom.add(P,W.element,null,"
    ");U=v.dom.add(P,W.element,null,"
    ")}else{J=P.innerHTML;P.innerHTML="";v.dom.add(P,W.element,null,J);U=v.dom.add(P,W.element,null,"
    ")}H=S.createRange();H.selectNodeContents(U);H.collapse(1);v.selection.setRng(H);return g}if(P==V&&q==V&&V.firstChild&&v.dom.isBlock(V.firstChild)){P=q=P.firstChild;O=o=0;K=S.createRange();K.setStart(P,0);L=S.createRange();L.setStart(q,0)}P=P.nodeName=="HTML"?S.body:P;P=P.nodeName=="BODY"?P.firstChild:P;q=q.nodeName=="HTML"?S.body:q;q=q.nodeName=="BODY"?q.firstChild:q;u=F.getParentBlock(P);z=F.getParentBlock(q);m=u?u.nodeName:W.element;if(J=F.dom.getParent(u,"li,pre")){if(J.nodeName=="LI"){return e(v.selection,F.dom,J)}return d}if(u&&(u.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(N.getStyle(u,"position",1)))){m=W.element;u=null}if(z&&(z.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(N.getStyle(u,"position",1)))){m=W.element;z=null}if(/(TD|TABLE|TH|CAPTION)/.test(m)||(u&&m=="DIV"&&/left|right/gi.test(N.getStyle(u,"float",1)))){m=W.element;u=z=null}D=(u&&u.nodeName==m)?u.cloneNode(0):v.dom.create(m);U=(z&&z.nodeName==m)?z.cloneNode(0):v.dom.create(m);U.removeAttribute("id");if(/^(H[1-6])$/.test(m)&&f(H,u)){U=v.dom.create(W.element)}J=p=P;do{if(J==V||J.nodeType==9||F.dom.isBlock(J)||/(TD|TABLE|TH|CAPTION)/.test(J.nodeName)){break}p=J}while((J=J.previousSibling?J.previousSibling:J.parentNode));J=x=q;do{if(J==V||J.nodeType==9||F.dom.isBlock(J)||/(TD|TABLE|TH|CAPTION)/.test(J.nodeName)){break}x=J}while((J=J.nextSibling?J.nextSibling:J.parentNode));if(p.nodeName==m){K.setStart(p,0)}else{K.setStartBefore(p)}K.setEnd(P,O);D.appendChild(K.cloneContents()||S.createTextNode(""));try{L.setEndAfter(x)}catch(Q){}L.setStart(q,o);U.appendChild(L.cloneContents()||S.createTextNode(""));H=S.createRange();if(!p.previousSibling&&p.parentNode.nodeName==m){H.setStartBefore(p.parentNode)}else{if(K.startContainer.nodeName==m&&K.startOffset==0){H.setStartBefore(K.startContainer)}else{H.setStart(K.startContainer,K.startOffset)}}if(!x.nextSibling&&x.parentNode.nodeName==m){H.setEndAfter(x.parentNode)}else{H.setEnd(L.endContainer,L.endOffset)}H.deleteContents();if(b){v.getWin().scrollTo(0,M.y)}if(D.firstChild&&D.firstChild.nodeName==m){D.innerHTML=D.firstChild.innerHTML}if(U.firstChild&&U.firstChild.nodeName==m){U.innerHTML=U.firstChild.innerHTML}if(N.isEmpty(D)){D.innerHTML="
    "}function T(y,s){var r=[],Y,X,t;y.innerHTML="";if(W.keep_styles){X=s;do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(X.nodeName)){Y=X.cloneNode(g);N.setAttrib(Y,"id","");r.push(Y)}}while(X=X.parentNode)}if(r.length>0){for(t=r.length-1,Y=y;t>=0;t--){Y=Y.appendChild(r[t])}r[0].innerHTML=b?"\u00a0":"
    ";return r[0]}else{y.innerHTML=b?"\u00a0":"
    "}}if(N.isEmpty(U)){B=T(U,q)}if(b&&parseFloat(opera.version())<9.5){H.insertNode(D);H.insertNode(U)}else{H.insertNode(U);H.insertNode(D)}U.normalize();D.normalize();function A(r){return S.createTreeWalker(r,NodeFilter.SHOW_TEXT,null,g).nextNode()||r}H=S.createRange();H.selectNodeContents(a?A(B||U):B||U);H.collapse(1);G.removeAllRanges();G.addRange(H);C=v.dom.getPos(U).y;if(CM.y+M.h){v.getWin().scrollTo(0,C1||!F(ap))&&an===0){c.remove(ap,1);return}if(ag.inline||ag.wrapper){if(!ag.exact&&an===1){ap=ao(ap)}O(ab,function(ar){O(c.select(ar.inline,ap),function(au){var at;if(ar.wrap_links===false){at=au.parentNode;do{if(at.nodeName==="A"){return}}while(at=at.parentNode)}U(ar,af,au,ar.exact?au:null)})});if(x(ap.parentNode,Y,af)){c.remove(ap,1);ap=0;return B}if(ag.merge_with_parents){c.getParent(ap.parentNode,function(ar){if(x(ar,Y,af)){c.remove(ap,1);ap=0;return B}})}if(ap){ap=u(C(ap),ap);ap=u(ap,C(ap,B))}}})}if(ag){if(aa){X=c.createRng();X.setStartBefore(aa);X.setEndAfter(aa);ah(o(X,ab))}else{if(!ac||!ag.inline||c.select("td.mceSelected,th.mceSelected").length){var ai=V.selection.getNode();ae=q.getBookmark();ah(o(q.getRng(B),ab));if(ag.styles&&(ag.styles.color||ag.styles.textDecoration)){a.walk(ai,I,"childNodes");I(ai)}q.moveToBookmark(ae);q.setRng(Z(q.getRng(B)));V.nodeChanged()}else{Q("apply",Y,af)}}}}function A(Y,ah,ab){var ac=R(Y),aj=ac[0],ag,af,X;function aa(am){var al=am.startContainer,ar=am.startOffset,aq,ap,an,ao;if(al.nodeType==3&&ar>=al.nodeValue.length-1){al=al.parentNode;ar=s(al)+1}if(al.nodeType==1){an=al.childNodes;al=an[Math.min(ar,an.length-1)];aq=new t(al);if(ar>an.length-1){aq.next()}for(ap=aq.current();ap;ap=aq.next()){if(ap.nodeType==3&&!f(ap)){ao=c.create("a",null,E);ap.parentNode.insertBefore(ao,ap);am.setStart(ap,0);q.setRng(am);c.remove(ao);return}}}}function Z(ao){var an,am,al;an=a.grep(ao.childNodes);for(am=0,al=ac.length;am=0;Z--){if(P.apply[Z].name==Y){return true}}for(Z=P.remove.length-1;Z>=0;Z--){if(P.remove[Z].name==Y){return false}}return W(q.getNode())}aa=q.getNode();if(W(aa)){return B}X=q.getStart();if(X!=aa){if(W(X)){return B}}return S}function v(ad,ac){var aa,ab=[],Z={},Y,X,W;if(q.isCollapsed()){for(X=0;X=0;Y--){W=ad[X];if(P.remove[Y].name==W){Z[W]=true;break}}}for(Y=P.apply.length-1;Y>=0;Y--){for(X=0;X=0;X--){W=ac[X].selector;if(!W){return B}for(ab=Y.length-1;ab>=0;ab--){if(c.is(Y[ab],W)){return B}}}}return S}a.extend(this,{get:R,register:k,apply:T,remove:A,toggle:D,match:j,matchAll:v,matchNode:x,canApply:y});function h(W,X){if(g(W,X.inline)){return B}if(g(W,X.block)){return B}if(X.selector){return c.is(W,X.selector)}}function g(X,W){X=X||"";W=W||"";X=""+(X.nodeName||X);W=""+(W.nodeName||W);return X.toLowerCase()==W.toLowerCase()}function L(X,W){var Y=c.getStyle(X,W);if(W=="color"||W=="backgroundColor"){Y=c.toHex(Y)}if(W=="fontWeight"&&Y==700){Y="bold"}return""+Y}function r(W,X){if(typeof(W)!="string"){W=W(X)}else{if(X){W=W.replace(/%(\w+)/g,function(Z,Y){return X[Y]||Z})}}return W}function f(W){return W&&W.nodeType===3&&/^([\s\r\n]+|)$/.test(W.nodeValue)}function N(Y,X,W){var Z=c.create(X,W);Y.parentNode.insertBefore(Z,Y);Z.appendChild(Y);return Z}function o(W,ag,Z){var Y=W.startContainer,ad=W.startOffset,aj=W.endContainer,ae=W.endOffset,ai,af,ac;function ah(am,an,ak,al){var ao,ap;al=al||c.getRoot();for(;;){ao=am.parentNode;if(ao==al||(!ag[0].block_expand&&F(ao))){return am}for(ai=ao[an];ai&&ai!=am;ai=ai[ak]){if(ai.nodeType==1&&!H(ai)){return am}if(ai.nodeType==3&&!f(ai)){return am}}am=am.parentNode}return am}function ab(ak,al){if(al===p){al=ak.nodeType===3?ak.length:ak.childNodes.length}while(ak&&ak.hasChildNodes()){ak=ak.childNodes[al];if(ak){al=ak.nodeType===3?ak.length:ak.childNodes.length}}return{node:ak,offset:al}}if(Y.nodeType==1&&Y.hasChildNodes()){af=Y.childNodes.length-1;Y=Y.childNodes[ad>af?af:ad];if(Y.nodeType==3){ad=0}}if(aj.nodeType==1&&aj.hasChildNodes()){af=aj.childNodes.length-1;aj=aj.childNodes[ae>af?af:ae-1];if(aj.nodeType==3){ae=aj.nodeValue.length}}if(H(Y.parentNode)){Y=Y.parentNode}if(H(Y)){Y=Y.nextSibling||Y}if(H(aj.parentNode)){ae=c.nodeIndex(aj);aj=aj.parentNode}if(H(aj)&&aj.previousSibling){aj=aj.previousSibling;ae=aj.length}if(ag[0].inline){ac=ab(aj,ae);if(ac.node){while(ac.node&&ac.offset===0&&ac.node.previousSibling){ac=ab(ac.node.previousSibling)}if(ac.node&&ac.offset>0&&ac.node.nodeType===3&&ac.node.nodeValue.charAt(ac.offset-1)===" "){if(ac.offset>1){aj=ac.node;aj.splitText(ac.offset-1)}else{if(ac.node.previousSibling){aj=ac.node.previousSibling}}}}}if(ag[0].inline||ag[0].block_expand){Y=ah(Y,"firstChild","nextSibling");aj=ah(aj,"lastChild","previousSibling")}if(ag[0].selector&&ag[0].expand!==S&&!ag[0].inline){function aa(al,ak){var am,an,ap,ao;if(al.nodeType==3&&al.nodeValue.length==0&&al[ak]){al=al[ak]}am=m(al);for(an=0;anY?Y:Z]}return W}function Q(ab,X,aa){var Y,W=P[ab],ac=P[ab=="apply"?"remove":"apply"];function ad(){return P.apply.length||P.remove.length}function Z(){P.apply=[];P.remove=[]}function ae(af){O(P.apply.reverse(),function(ag){T(ag.name,ag.vars,af);if(ag.name==="forecolor"&&ag.vars.value){I(af.parentNode)}});O(P.remove.reverse(),function(ag){A(ag.name,ag.vars,af)});c.remove(af,1);Z()}for(Y=W.length-1;Y>=0;Y--){if(W[Y].name==X){return}}W.push({name:X,vars:aa});for(Y=ac.length-1;Y>=0;Y--){if(ac[Y].name==X){ac.splice(Y,1)}}if(ad()){V.getDoc().execCommand("FontName",false,"mceinline");P.lastRng=q.getRng();O(c.select("font,span"),function(ag){var af;if(b(ag)){af=q.getBookmark();ae(ag);q.moveToBookmark(af);V.nodeChanged()}});if(!P.isListening&&ad()){P.isListening=true;O("onKeyDown,onKeyUp,onKeyPress,onMouseUp".split(","),function(af){V[af].addToTop(function(ag,ah){if(ad()&&!a.dom.RangeUtils.compareRanges(P.lastRng,q.getRng())){O(c.select("font,span"),function(aj){var ak,ai;if(b(aj)){ak=aj.firstChild;if(ak){ae(aj);ai=c.createRng();ai.setStart(ak,ak.nodeValue.length);ai.setEnd(ak,ak.nodeValue.length);q.setRng(ai);ag.nodeChanged()}else{c.remove(aj)}}});if(ah.type=="keyup"||ah.type=="mouseup"){Z()}}})})}}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;if(c.inline_styles){h=e.explode(c.font_size_style_values);function b(j,i){e.each(i,function(l,k){if(l){g.setStyle(j,k,l)}});g.rename(j,"span")}d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};function f(i,j){g=i.dom;if(c.convert_fonts_to_spans){e.each(g.select("font,u,strike",j.node),function(k){d[k.nodeName.toLowerCase()](a.dom,k)})}}a.onPreProcess.add(f);a.onSetContent.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}}); \ No newline at end of file diff --git a/include/javascript/tiny_mce/tiny_mce_jquery_src.js b/include/javascript/tiny_mce/tiny_mce_jquery_src.js new file mode 100644 index 00000000..67315543 --- /dev/null +++ b/include/javascript/tiny_mce/tiny_mce_jquery_src.js @@ -0,0 +1,14988 @@ +(function(win) { + var whiteSpaceRe = /^\s*|\s*$/g, + undefined, isRegExpBroken = 'B'.replace(/A(.)|B/, '$1') === '$1'; + + var tinymce = { + majorVersion : '3', + + minorVersion : '4.2', + + releaseDate : '2011-04-07', + + _init : function() { + var t = this, d = document, na = navigator, ua = na.userAgent, i, nl, n, base, p, v; + + t.isOpera = win.opera && opera.buildNumber; + + t.isWebKit = /WebKit/.test(ua); + + t.isIE = !t.isWebKit && !t.isOpera && (/MSIE/gi).test(ua) && (/Explorer/gi).test(na.appName); + + t.isIE6 = t.isIE && /MSIE [56]/.test(ua); + + t.isGecko = !t.isWebKit && /Gecko/.test(ua); + + t.isMac = ua.indexOf('Mac') != -1; + + t.isAir = /adobeair/i.test(ua); + + t.isIDevice = /(iPad|iPhone)/.test(ua); + + // TinyMCE .NET webcontrol might be setting the values for TinyMCE + if (win.tinyMCEPreInit) { + t.suffix = tinyMCEPreInit.suffix; + t.baseURL = tinyMCEPreInit.base; + t.query = tinyMCEPreInit.query; + return; + } + + // Get suffix and base + t.suffix = ''; + + // If base element found, add that infront of baseURL + nl = d.getElementsByTagName('base'); + for (i=0; i : + s = /^((static) )?([\w.]+)(:([\w.]+))?/.exec(s); + cn = s[3].match(/(^|\.)(\w+)$/i)[2]; // Class name + + // Create namespace for new class + ns = t.createNS(s[3].replace(/\.\w+$/, ''), root); + + // Class already exists + if (ns[cn]) + return; + + // Make pure static class + if (s[2] == 'static') { + ns[cn] = p; + + if (this.onCreate) + this.onCreate(s[2], s[3], ns[cn]); + + return; + } + + // Create default constructor + if (!p[cn]) { + p[cn] = function() {}; + de = 1; + } + + // Add constructor and methods + ns[cn] = p[cn]; + t.extend(ns[cn].prototype, p); + + // Extend + if (s[5]) { + sp = t.resolve(s[5]).prototype; + scn = s[5].match(/\.(\w+)$/i)[1]; // Class name + + // Extend constructor + c = ns[cn]; + if (de) { + // Add passthrough constructor + ns[cn] = function() { + return sp[scn].apply(this, arguments); + }; + } else { + // Add inherit constructor + ns[cn] = function() { + this.parent = sp[scn]; + return c.apply(this, arguments); + }; + } + ns[cn].prototype[cn] = ns[cn]; + + // Add super methods + t.each(sp, function(f, n) { + ns[cn].prototype[n] = sp[n]; + }); + + // Add overridden methods + t.each(p, function(f, n) { + // Extend methods if needed + if (sp[n]) { + ns[cn].prototype[n] = function() { + this.parent = sp[n]; + return f.apply(this, arguments); + }; + } else { + if (n != cn) + ns[cn].prototype[n] = f; + } + }); + } + + // Add static methods + t.each(p['static'], function(f, n) { + ns[cn][n] = f; + }); + + if (this.onCreate) + this.onCreate(s[2], s[3], ns[cn].prototype); + }, + + walk : function(o, f, n, s) { + s = s || this; + + if (o) { + if (n) + o = o[n]; + + tinymce.each(o, function(o, i) { + if (f.call(s, o, i, n) === false) + return false; + + tinymce.walk(o, f, n, s); + }); + } + }, + + createNS : function(n, o) { + var i, v; + + o = o || win; + + n = n.split('.'); + for (i=0; i= items.length) { + for (i = 0, l = base.length; i < l; i++) { + if (i >= items.length || base[i] != items[i]) { + bp = i + 1; + break; + } + } + } + + if (base.length < items.length) { + for (i = 0, l = items.length; i < l; i++) { + if (i >= base.length || base[i] != items[i]) { + bp = i + 1; + break; + } + } + } + + if (bp == 1) + return path; + + for (i = 0, l = base.length - (bp - 1); i < l; i++) + out += "../"; + + for (i = bp - 1, l = items.length; i < l; i++) { + if (i != bp - 1) + out += "/" + items[i]; + else + out += items[i]; + } + + return out; + }, + + toAbsPath : function(base, path) { + var i, nb = 0, o = [], tr, outPath; + + // Split paths + tr = /\/$/.test(path) ? '/' : ''; + base = base.split('/'); + path = path.split('/'); + + // Remove empty chunks + each(base, function(k) { + if (k) + o.push(k); + }); + + base = o; + + // Merge relURLParts chunks + for (i = path.length - 1, o = []; i >= 0; i--) { + // Ignore empty or . + if (path[i].length == 0 || path[i] == ".") + continue; + + // Is parent + if (path[i] == '..') { + nb++; + continue; + } + + // Move up + if (nb > 0) { + nb--; + continue; + } + + o.push(path[i]); + } + + i = base.length - nb; + + // If /a/b/c or / + if (i <= 0) + outPath = o.reverse().join('/'); + else + outPath = base.slice(0, i).join('/') + '/' + o.reverse().join('/'); + + // Add front / if it's needed + if (outPath.indexOf('/') !== 0) + outPath = '/' + outPath; + + // Add traling / if it's needed + if (tr && outPath.lastIndexOf('/') !== outPath.length - 1) + outPath += tr; + + return outPath; + }, + + getURI : function(nh) { + var s, t = this; + + // Rebuild source + if (!t.source || nh) { + s = ''; + + if (!nh) { + if (t.protocol) + s += t.protocol + '://'; + + if (t.userInfo) + s += t.userInfo + '@'; + + if (t.host) + s += t.host; + + if (t.port) + s += ':' + t.port; + } + + if (t.path) + s += t.path; + + if (t.query) + s += '?' + t.query; + + if (t.anchor) + s += '#' + t.anchor; + + t.source = s; + } + + return t.source; + } + }); +})(); + +(function() { + var each = tinymce.each; + + tinymce.create('static tinymce.util.Cookie', { + getHash : function(n) { + var v = this.get(n), h; + + if (v) { + each(v.split('&'), function(v) { + v = v.split('='); + h = h || {}; + h[unescape(v[0])] = unescape(v[1]); + }); + } + + return h; + }, + + setHash : function(n, v, e, p, d, s) { + var o = ''; + + each(v, function(v, k) { + o += (!o ? '' : '&') + escape(k) + '=' + escape(v); + }); + + this.set(n, o, e, p, d, s); + }, + + get : function(n) { + var c = document.cookie, e, p = n + "=", b; + + // Strict mode + if (!c) + return; + + b = c.indexOf("; " + p); + + if (b == -1) { + b = c.indexOf(p); + + if (b != 0) + return null; + } else + b += 2; + + e = c.indexOf(";", b); + + if (e == -1) + e = c.length; + + return unescape(c.substring(b + p.length, e)); + }, + + set : function(n, v, e, p, d, s) { + document.cookie = n + "=" + escape(v) + + ((e) ? "; expires=" + e.toGMTString() : "") + + ((p) ? "; path=" + escape(p) : "") + + ((d) ? "; domain=" + d : "") + + ((s) ? "; secure" : ""); + }, + + remove : function(n, p) { + var d = new Date(); + + d.setTime(d.getTime() - 1000); + + this.set(n, '', d, p, d); + } + }); +})(); + +(function() { + function serialize(o, quote) { + var i, v, t; + + quote = quote || '"'; + + if (o == null) + return 'null'; + + t = typeof o; + + if (t == 'string') { + v = '\bb\tt\nn\ff\rr\""\'\'\\\\'; + + return quote + o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g, function(a, b) { + // Make sure single quotes never get encoded inside double quotes for JSON compatibility + if (quote === '"' && a === "'") + return a; + + i = v.indexOf(b); + + if (i + 1) + return '\\' + v.charAt(i + 1); + + a = b.charCodeAt().toString(16); + + return '\\u' + '0000'.substring(a.length) + a; + }) + quote; + } + + if (t == 'object') { + if (o.hasOwnProperty && o instanceof Array) { + for (i=0, v = '['; i 0 ? ',' : '') + serialize(o[i], quote); + + return v + ']'; + } + + v = '{'; + + for (i in o) + v += typeof o[i] != 'function' ? (v.length > 1 ? ',' + quote : quote) + i + quote +':' + serialize(o[i], quote) : ''; + + return v + '}'; + } + + return '' + o; + }; + + tinymce.util.JSON = { + serialize: serialize, + + parse: function(s) { + try { + return eval('(' + s + ')'); + } catch (ex) { + // Ignore + } + } + + }; +})(); +tinymce.create('static tinymce.util.XHR', { + send : function(o) { + var x, t, w = window, c = 0; + + // Default settings + o.scope = o.scope || this; + o.success_scope = o.success_scope || o.scope; + o.error_scope = o.error_scope || o.scope; + o.async = o.async === false ? false : true; + o.data = o.data || ''; + + function get(s) { + x = 0; + + try { + x = new ActiveXObject(s); + } catch (ex) { + } + + return x; + }; + + x = w.XMLHttpRequest ? new XMLHttpRequest() : get('Microsoft.XMLHTTP') || get('Msxml2.XMLHTTP'); + + if (x) { + if (x.overrideMimeType) + x.overrideMimeType(o.content_type); + + x.open(o.type || (o.data ? 'POST' : 'GET'), o.url, o.async); + + if (o.content_type) + x.setRequestHeader('Content-Type', o.content_type); + + x.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); + + x.send(o.data); + + function ready() { + if (!o.async || x.readyState == 4 || c++ > 10000) { + if (o.success && c < 10000 && x.status == 200) + o.success.call(o.success_scope, '' + x.responseText, x, o); + else if (o.error) + o.error.call(o.error_scope, c > 10000 ? 'TIMED_OUT' : 'GENERAL', x, o); + + x = null; + } else + w.setTimeout(ready, 10); + }; + + // Syncronous request + if (!o.async) + return ready(); + + // Wait for response, onReadyStateChange can not be used since it leaks memory in IE + t = w.setTimeout(ready, 10); + } + } +}); + +(function() { + var extend = tinymce.extend, JSON = tinymce.util.JSON, XHR = tinymce.util.XHR; + + tinymce.create('tinymce.util.JSONRequest', { + JSONRequest : function(s) { + this.settings = extend({ + }, s); + this.count = 0; + }, + + send : function(o) { + var ecb = o.error, scb = o.success; + + o = extend(this.settings, o); + + o.success = function(c, x) { + c = JSON.parse(c); + + if (typeof(c) == 'undefined') { + c = { + error : 'JSON Parse error.' + }; + } + + if (c.error) + ecb.call(o.error_scope || o.scope, c.error, x); + else + scb.call(o.success_scope || o.scope, c.result); + }; + + o.error = function(ty, x) { + if (ecb) + ecb.call(o.error_scope || o.scope, ty, x); + }; + + o.data = JSON.serialize({ + id : o.id || 'c' + (this.count++), + method : o.method, + params : o.params + }); + + // JSON content type for Ruby on rails. Bug: #1883287 + o.content_type = 'application/json'; + + XHR.send(o); + }, + + 'static' : { + sendRPC : function(o) { + return new tinymce.util.JSONRequest().send(o); + } + } + }); +}()); +(function(tinymce) { + var namedEntities, baseEntities, reverseEntities, + attrsCharsRegExp = /[&\"\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + textCharsRegExp = /[<>&\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + rawCharsRegExp = /[<>&\"\']/g, + entityRegExp = /&(#)?([\w]+);/g, + asciiMap = { + 128 : "\u20AC", 130 : "\u201A", 131 : "\u0192", 132 : "\u201E", 133 : "\u2026", 134 : "\u2020", + 135 : "\u2021", 136 : "\u02C6", 137 : "\u2030", 138 : "\u0160", 139 : "\u2039", 140 : "\u0152", + 142 : "\u017D", 145 : "\u2018", 146 : "\u2019", 147 : "\u201C", 148 : "\u201D", 149 : "\u2022", + 150 : "\u2013", 151 : "\u2014", 152 : "\u02DC", 153 : "\u2122", 154 : "\u0161", 155 : "\u203A", + 156 : "\u0153", 158 : "\u017E", 159 : "\u0178" + }; + + // Raw entities + baseEntities = { + '"' : '"', + "'" : ''', + '<' : '<', + '>' : '>', + '&' : '&' + }; + + // Reverse lookup table for raw entities + reverseEntities = { + '<' : '<', + '>' : '>', + '&' : '&', + '"' : '"', + ''' : "'" + }; + + // Decodes text by using the browser + function nativeDecode(text) { + var elm; + + elm = document.createElement("div"); + elm.innerHTML = text; + + return elm.textContent || elm.innerText || text; + }; + + // Build a two way lookup table for the entities + function buildEntitiesLookup(items, radix) { + var i, chr, entity, lookup = {}; + + if (items) { + items = items.split(','); + radix = radix || 10; + + // Build entities lookup table + for (i = 0; i < items.length; i += 2) { + chr = String.fromCharCode(parseInt(items[i], radix)); + + // Only add non base entities + if (!baseEntities[chr]) { + entity = '&' + items[i + 1] + ';'; + lookup[chr] = entity; + lookup[entity] = chr; + } + } + + return lookup; + } + }; + + // Unpack entities lookup where the numbers are in radix 32 to reduce the size + namedEntities = buildEntitiesLookup( + '50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,' + + '5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,' + + '5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,' + + '5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,' + + '68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,' + + '6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,' + + '6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,' + + '75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,' + + '7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,' + + '7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,' + + 'sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,' + + 'st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,' + + 't9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,' + + 'tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,' + + 'u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,' + + '81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,' + + '8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,' + + '8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,' + + '8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,' + + '8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,' + + 'nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,' + + 'rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,' + + 'Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,' + + '80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,' + + '811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro' + , 32); + + tinymce.html = tinymce.html || {}; + + tinymce.html.Entities = { + encodeRaw : function(text, attr) { + return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) { + return baseEntities[chr] || chr; + }); + }, + + encodeAllRaw : function(text) { + return ('' + text).replace(rawCharsRegExp, function(chr) { + return baseEntities[chr] || chr; + }); + }, + + encodeNumeric : function(text, attr) { + return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) { + // Multi byte sequence convert it to a single entity + if (chr.length > 1) + return '&#' + (((chr.charCodeAt(0) - 0xD800) * 0x400) + (chr.charCodeAt(1) - 0xDC00) + 0x10000) + ';'; + + return baseEntities[chr] || '&#' + chr.charCodeAt(0) + ';'; + }); + }, + + encodeNamed : function(text, attr, entities) { + entities = entities || namedEntities; + + return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) { + return baseEntities[chr] || entities[chr] || chr; + }); + }, + + getEncodeFunc : function(name, entities) { + var Entities = tinymce.html.Entities; + + entities = buildEntitiesLookup(entities) || namedEntities; + + function encodeNamedAndNumeric(text, attr) { + return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) { + return baseEntities[chr] || entities[chr] || '&#' + chr.charCodeAt(0) + ';' || chr; + }); + }; + + function encodeCustomNamed(text, attr) { + return Entities.encodeNamed(text, attr, entities); + }; + + // Replace + with , to be compatible with previous TinyMCE versions + name = tinymce.makeMap(name.replace(/\+/g, ',')); + + // Named and numeric encoder + if (name.named && name.numeric) + return encodeNamedAndNumeric; + + // Named encoder + if (name.named) { + // Custom names + if (entities) + return encodeCustomNamed; + + return Entities.encodeNamed; + } + + // Numeric + if (name.numeric) + return Entities.encodeNumeric; + + // Raw encoder + return Entities.encodeRaw; + }, + + decode : function(text) { + return text.replace(entityRegExp, function(all, numeric, value) { + if (numeric) { + value = parseInt(value); + + // Support upper UTF + if (value > 0xFFFF) { + value -= 0x10000; + + return String.fromCharCode(0xD800 + (value >> 10), 0xDC00 + (value & 0x3FF)); + } else + return asciiMap[value] || String.fromCharCode(value); + } + + return reverseEntities[all] || namedEntities[all] || nativeDecode(all); + }); + } + }; +})(tinymce); + +tinymce.html.Styles = function(settings, schema) { + var rgbRegExp = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi, + urlOrStrRegExp = /(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi, + styleRegExp = /\s*([^:]+):\s*([^;]+);?/g, + trimRightRegExp = /\s+$/, + urlColorRegExp = /rgb/, + undef, i, encodingLookup = {}, encodingItems; + + settings = settings || {}; + + encodingItems = '\\" \\\' \\; \\: ; : _'.split(' '); + for (i = 0; i < encodingItems.length; i++) { + encodingLookup[encodingItems[i]] = '_' + i; + encodingLookup['_' + i] = encodingItems[i]; + } + + function toHex(match, r, g, b) { + function hex(val) { + val = parseInt(val).toString(16); + + return val.length > 1 ? val : '0' + val; // 0 -> 00 + }; + + return '#' + hex(r) + hex(g) + hex(b); + }; + + return { + toHex : function(color) { + return color.replace(rgbRegExp, toHex); + }, + + parse : function(css) { + var styles = {}, matches, name, value, isEncoded, urlConverter = settings.url_converter, urlConverterScope = settings.url_converter_scope || this; + + function compress(prefix, suffix) { + var top, right, bottom, left; + + // Get values and check it it needs compressing + top = styles[prefix + '-top' + suffix]; + if (!top) + return; + + right = styles[prefix + '-right' + suffix]; + if (top != right) + return; + + bottom = styles[prefix + '-bottom' + suffix]; + if (right != bottom) + return; + + left = styles[prefix + '-left' + suffix]; + if (bottom != left) + return; + + // Compress + styles[prefix + suffix] = left; + delete styles[prefix + '-top' + suffix]; + delete styles[prefix + '-right' + suffix]; + delete styles[prefix + '-bottom' + suffix]; + delete styles[prefix + '-left' + suffix]; + }; + + function canCompress(key) { + var value = styles[key], i; + + if (!value || value.indexOf(' ') < 0) + return; + + value = value.split(' '); + i = value.length; + while (i--) { + if (value[i] !== value[0]) + return false; + } + + styles[key] = value[0]; + + return true; + }; + + function compress2(target, a, b, c) { + if (!canCompress(a)) + return; + + if (!canCompress(b)) + return; + + if (!canCompress(c)) + return; + + // Compress + styles[target] = styles[a] + ' ' + styles[b] + ' ' + styles[c]; + delete styles[a]; + delete styles[b]; + delete styles[c]; + }; + + // Encodes the specified string by replacing all \" \' ; : with _ + function encode(str) { + isEncoded = true; + + return encodingLookup[str]; + }; + + // Decodes the specified string by replacing all _ with it's original value \" \' etc + // It will also decode the \" \' if keep_slashes is set to fale or omitted + function decode(str, keep_slashes) { + if (isEncoded) { + str = str.replace(/_[0-9]/g, function(str) { + return encodingLookup[str]; + }); + } + + if (!keep_slashes) + str = str.replace(/\\([\'\";:])/g, "$1"); + + return str; + } + + if (css) { + // Encode \" \' % and ; and : inside strings so they don't interfere with the style parsing + css = css.replace(/\\[\"\';:_]/g, encode).replace(/\"[^\"]+\"|\'[^\']+\'/g, function(str) { + return str.replace(/[;:]/g, encode); + }); + + // Parse styles + while (matches = styleRegExp.exec(css)) { + name = matches[1].replace(trimRightRegExp, '').toLowerCase(); + value = matches[2].replace(trimRightRegExp, ''); + + if (name && value.length > 0) { + // Opera will produce 700 instead of bold in their style values + if (name === 'font-weight' && value === '700') + value = 'bold'; + else if (name === 'color' || name === 'background-color') // Lowercase colors like RED + value = value.toLowerCase(); + + // Convert RGB colors to HEX + value = value.replace(rgbRegExp, toHex); + + // Convert URLs and force them into url('value') format + value = value.replace(urlOrStrRegExp, function(match, url, url2, url3, str, str2) { + str = str || str2; + + if (str) { + str = decode(str); + + // Force strings into single quote format + return "'" + str.replace(/\'/g, "\\'") + "'"; + } + + url = decode(url || url2 || url3); + + // Convert the URL to relative/absolute depending on config + if (urlConverter) + url = urlConverter.call(urlConverterScope, url, 'style'); + + // Output new URL format + return "url('" + url.replace(/\'/g, "\\'") + "')"; + }); + + styles[name] = isEncoded ? decode(value, true) : value; + } + + styleRegExp.lastIndex = matches.index + matches[0].length; + } + + // Compress the styles to reduce it's size for example IE will expand styles + compress("border", ""); + compress("border", "-width"); + compress("border", "-color"); + compress("border", "-style"); + compress("padding", ""); + compress("margin", ""); + compress2('border', 'border-width', 'border-style', 'border-color'); + + // Remove pointless border, IE produces these + if (styles.border === 'medium none') + delete styles.border; + } + + return styles; + }, + + serialize : function(styles, element_name) { + var css = '', name, value; + + function serializeStyles(name) { + var styleList, i, l, name, value; + + styleList = schema.styles[name]; + if (styleList) { + for (i = 0, l = styleList.length; i < l; i++) { + name = styleList[i]; + value = styles[name]; + + if (value !== undef && value.length > 0) + css += (css.length > 0 ? ' ' : '') + name + ': ' + value + ';'; + } + } + }; + + // Serialize styles according to schema + if (element_name && schema && schema.styles) { + // Serialize global styles and element specific styles + serializeStyles('*'); + serializeStyles(name); + } else { + // Output the styles in the order they are inside the object + for (name in styles) { + value = styles[name]; + + if (value !== undef && value.length > 0) + css += (css.length > 0 ? ' ' : '') + name + ': ' + value + ';'; + } + } + + return css; + } + }; +}; + +(function(tinymce) { + var transitional = {}, boolAttrMap, blockElementsMap, shortEndedElementsMap, nonEmptyElementsMap, + whiteSpaceElementsMap, selfClosingElementsMap, makeMap = tinymce.makeMap, each = tinymce.each; + + function split(str, delim) { + return str.split(delim || ','); + }; + + function unpack(lookup, data) { + var key, elements = {}; + + function replace(value) { + return value.replace(/[A-Z]+/g, function(key) { + return replace(lookup[key]); + }); + }; + + // Unpack lookup + for (key in lookup) { + if (lookup.hasOwnProperty(key)) + lookup[key] = replace(lookup[key]); + } + + // Unpack and parse data into object map + replace(data).replace(/#/g, '#text').replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g, function(str, name, attributes, children) { + attributes = split(attributes, '|'); + + elements[name] = { + attributes : makeMap(attributes), + attributesOrder : attributes, + children : makeMap(children, '|', {'#comment' : {}}) + } + }); + + return elements; + }; + + // Build a lookup table for block elements both lowercase and uppercase + blockElementsMap = 'h1,h2,h3,h4,h5,h6,hr,p,div,address,pre,form,table,tbody,thead,tfoot,' + + 'th,tr,td,li,ol,ul,caption,blockquote,center,dl,dt,dd,dir,fieldset,' + + 'noscript,menu,isindex,samp,header,footer,article,section,hgroup'; + blockElementsMap = makeMap(blockElementsMap, ',', makeMap(blockElementsMap.toUpperCase())); + + // This is the XHTML 1.0 transitional elements with it's attributes and children packed to reduce it's size + transitional = unpack({ + Z : 'H|K|N|O|P', + Y : 'X|form|R|Q', + ZG : 'E|span|width|align|char|charoff|valign', + X : 'p|T|div|U|W|isindex|fieldset|table', + ZF : 'E|align|char|charoff|valign', + W : 'pre|hr|blockquote|address|center|noframes', + ZE : 'abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height', + ZD : '[E][S]', + U : 'ul|ol|dl|menu|dir', + ZC : 'p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q', + T : 'h1|h2|h3|h4|h5|h6', + ZB : 'X|S|Q', + S : 'R|P', + ZA : 'a|G|J|M|O|P', + R : 'a|H|K|N|O', + Q : 'noscript|P', + P : 'ins|del|script', + O : 'input|select|textarea|label|button', + N : 'M|L', + M : 'em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym', + L : 'sub|sup', + K : 'J|I', + J : 'tt|i|b|u|s|strike', + I : 'big|small|font|basefont', + H : 'G|F', + G : 'br|span|bdo', + F : 'object|applet|img|map|iframe', + E : 'A|B|C', + D : 'accesskey|tabindex|onfocus|onblur', + C : 'onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup', + B : 'lang|xml:lang|dir', + A : 'id|class|style|title' + }, 'script[id|charset|type|language|src|defer|xml:space][]' + + 'style[B|id|type|media|title|xml:space][]' + + 'object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]' + + 'param[id|name|value|valuetype|type][]' + + 'p[E|align][#|S]' + + 'a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]' + + 'br[A|clear][]' + + 'span[E][#|S]' + + 'bdo[A|C|B][#|S]' + + 'applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]' + + 'h1[E|align][#|S]' + + 'img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]' + + 'map[B|C|A|name][X|form|Q|area]' + + 'h2[E|align][#|S]' + + 'iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]' + + 'h3[E|align][#|S]' + + 'tt[E][#|S]' + + 'i[E][#|S]' + + 'b[E][#|S]' + + 'u[E][#|S]' + + 's[E][#|S]' + + 'strike[E][#|S]' + + 'big[E][#|S]' + + 'small[E][#|S]' + + 'font[A|B|size|color|face][#|S]' + + 'basefont[id|size|color|face][]' + + 'em[E][#|S]' + + 'strong[E][#|S]' + + 'dfn[E][#|S]' + + 'code[E][#|S]' + + 'q[E|cite][#|S]' + + 'samp[E][#|S]' + + 'kbd[E][#|S]' + + 'var[E][#|S]' + + 'cite[E][#|S]' + + 'abbr[E][#|S]' + + 'acronym[E][#|S]' + + 'sub[E][#|S]' + + 'sup[E][#|S]' + + 'input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]' + + 'select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]' + + 'optgroup[E|disabled|label][option]' + + 'option[E|selected|disabled|label|value][]' + + 'textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]' + + 'label[E|for|accesskey|onfocus|onblur][#|S]' + + 'button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]' + + 'h4[E|align][#|S]' + + 'ins[E|cite|datetime][#|Y]' + + 'h5[E|align][#|S]' + + 'del[E|cite|datetime][#|Y]' + + 'h6[E|align][#|S]' + + 'div[E|align][#|Y]' + + 'ul[E|type|compact][li]' + + 'li[E|type|value][#|Y]' + + 'ol[E|type|compact|start][li]' + + 'dl[E|compact][dt|dd]' + + 'dt[E][#|S]' + + 'dd[E][#|Y]' + + 'menu[E|compact][li]' + + 'dir[E|compact][li]' + + 'pre[E|width|xml:space][#|ZA]' + + 'hr[E|align|noshade|size|width][]' + + 'blockquote[E|cite][#|Y]' + + 'address[E][#|S|p]' + + 'center[E][#|Y]' + + 'noframes[E][#|Y]' + + 'isindex[A|B|prompt][]' + + 'fieldset[E][#|legend|Y]' + + 'legend[E|accesskey|align][#|S]' + + 'table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]' + + 'caption[E|align][#|S]' + + 'col[ZG][]' + + 'colgroup[ZG][col]' + + 'thead[ZF][tr]' + + 'tr[ZF|bgcolor][th|td]' + + 'th[E|ZE][#|Y]' + + 'form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]' + + 'noscript[E][#|Y]' + + 'td[E|ZE][#|Y]' + + 'tfoot[ZF][tr]' + + 'tbody[ZF][tr]' + + 'area[E|D|shape|coords|href|nohref|alt|target][]' + + 'base[id|href|target][]' + + 'body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]' + ); + + boolAttrMap = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,preload,autoplay,loop,controls'); + shortEndedElementsMap = makeMap('area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,source'); + nonEmptyElementsMap = tinymce.extend(makeMap('td,th,iframe,video,object'), shortEndedElementsMap); + whiteSpaceElementsMap = makeMap('pre,script,style'); + selfClosingElementsMap = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); + + tinymce.html.Schema = function(settings) { + var self = this, elements = {}, children = {}, patternElements = [], validStyles; + + settings = settings || {}; + + // Allow all elements and attributes if verify_html is set to false + if (settings.verify_html === false) + settings.valid_elements = '*[*]'; + + // Build styles list + if (settings.valid_styles) { + validStyles = {}; + + // Convert styles into a rule list + each(settings.valid_styles, function(value, key) { + validStyles[key] = tinymce.explode(value); + }); + } + + // Converts a wildcard expression string to a regexp for example *a will become /.*a/. + function patternToRegExp(str) { + return new RegExp('^' + str.replace(/([?+*])/g, '.$1') + '$'); + }; + + // Parses the specified valid_elements string and adds to the current rules + // This function is a bit hard to read since it's heavily optimized for speed + function addValidElements(valid_elements) { + var ei, el, ai, al, yl, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder, + prefix, outputName, globalAttributes, globalAttributesOrder, transElement, key, childKey, value, + elementRuleRegExp = /^([#+-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/, + attrRuleRegExp = /^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/, + hasPatternsRegExp = /[*?+]/; + + if (valid_elements) { + // Split valid elements into an array with rules + valid_elements = split(valid_elements); + + if (elements['@']) { + globalAttributes = elements['@'].attributes; + globalAttributesOrder = elements['@'].attributesOrder; + } + + // Loop all rules + for (ei = 0, el = valid_elements.length; ei < el; ei++) { + // Parse element rule + matches = elementRuleRegExp.exec(valid_elements[ei]); + if (matches) { + // Setup local names for matches + prefix = matches[1]; + elementName = matches[2]; + outputName = matches[3]; + attrData = matches[4]; + + // Create new attributes and attributesOrder + attributes = {}; + attributesOrder = []; + + // Create the new element + element = { + attributes : attributes, + attributesOrder : attributesOrder + }; + + // Padd empty elements prefix + if (prefix === '#') + element.paddEmpty = true; + + // Remove empty elements prefix + if (prefix === '-') + element.removeEmpty = true; + + // Copy attributes from global rule into current rule + if (globalAttributes) { + for (key in globalAttributes) + attributes[key] = globalAttributes[key]; + + attributesOrder.push.apply(attributesOrder, globalAttributesOrder); + } + + // Attributes defined + if (attrData) { + attrData = split(attrData, '|'); + for (ai = 0, al = attrData.length; ai < al; ai++) { + matches = attrRuleRegExp.exec(attrData[ai]); + if (matches) { + attr = {}; + attrType = matches[1]; + attrName = matches[2].replace(/::/g, ':'); + prefix = matches[3]; + value = matches[4]; + + // Required + if (attrType === '!') { + element.attributesRequired = element.attributesRequired || []; + element.attributesRequired.push(attrName); + attr.required = true; + } + + // Denied from global + if (attrType === '-') { + delete attributes[attrName]; + attributesOrder.splice(tinymce.inArray(attributesOrder, attrName), 1); + continue; + } + + // Default value + if (prefix) { + // Default value + if (prefix === '=') { + element.attributesDefault = element.attributesDefault || []; + element.attributesDefault.push({name: attrName, value: value}); + attr.defaultValue = value; + } + + // Forced value + if (prefix === ':') { + element.attributesForced = element.attributesForced || []; + element.attributesForced.push({name: attrName, value: value}); + attr.forcedValue = value; + } + + // Required values + if (prefix === '<') + attr.validValues = makeMap(value, '?'); + } + + // Check for attribute patterns + if (hasPatternsRegExp.test(attrName)) { + element.attributePatterns = element.attributePatterns || []; + attr.pattern = patternToRegExp(attrName); + element.attributePatterns.push(attr); + } else { + // Add attribute to order list if it doesn't already exist + if (!attributes[attrName]) + attributesOrder.push(attrName); + + attributes[attrName] = attr; + } + } + } + } + + // Global rule, store away these for later usage + if (!globalAttributes && elementName == '@') { + globalAttributes = attributes; + globalAttributesOrder = attributesOrder; + } + + // Handle substitute elements such as b/strong + if (outputName) { + element.outputName = elementName; + elements[outputName] = element; + } + + // Add pattern or exact element + if (hasPatternsRegExp.test(elementName)) { + element.pattern = patternToRegExp(elementName); + patternElements.push(element); + } else + elements[elementName] = element; + } + } + } + }; + + function setValidElements(valid_elements) { + elements = {}; + patternElements = []; + + addValidElements(valid_elements); + + each(transitional, function(element, name) { + children[name] = element.children; + }); + }; + + // Adds custom non HTML elements to the schema + function addCustomElements(custom_elements) { + var customElementRegExp = /^(~)?(.+)$/; + + if (custom_elements) { + each(split(custom_elements), function(rule) { + var matches = customElementRegExp.exec(rule), + cloneName = matches[1] === '~' ? 'span' : 'div', + name = matches[2]; + + children[name] = children[cloneName]; + + // Add custom elements at span/div positions + each(children, function(element, child) { + if (element[cloneName]) + element[name] = element[cloneName]; + }); + }); + } + }; + + // Adds valid children to the schema object + function addValidChildren(valid_children) { + var childRuleRegExp = /^([+\-]?)(\w+)\[([^\]]+)\]$/; + + if (valid_children) { + each(split(valid_children), function(rule) { + var matches = childRuleRegExp.exec(rule), parent, prefix; + + if (matches) { + prefix = matches[1]; + + // Add/remove items from default + if (prefix) + parent = children[matches[2]]; + else + parent = children[matches[2]] = {'#comment' : {}}; + + parent = children[matches[2]]; + + each(split(matches[3], '|'), function(child) { + if (prefix === '-') + delete parent[child]; + else + parent[child] = {}; + }); + } + }); + } + } + + if (!settings.valid_elements) { + // No valid elements defined then clone the elements from the transitional spec + each(transitional, function(element, name) { + elements[name] = { + attributes : element.attributes, + attributesOrder : element.attributesOrder + }; + + children[name] = element.children; + }); + + // Switch these + each(split('strong/b,em/i'), function(item) { + item = split(item, '/'); + elements[item[1]].outputName = item[0]; + }); + + // Add default alt attribute for images + elements.img.attributesDefault = [{name: 'alt', value: ''}]; + + // Remove these if they are empty by default + each(split('ol,ul,li,sub,sup,blockquote,tr,div,span,font,a,table,tbody'), function(name) { + elements[name].removeEmpty = true; + }); + + // Padd these by default + each(split('p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption'), function(name) { + elements[name].paddEmpty = true; + }); + } else + setValidElements(settings.valid_elements); + + addCustomElements(settings.custom_elements); + addValidChildren(settings.valid_children); + addValidElements(settings.extended_valid_elements); + + // Todo: Remove this when we fix list handling to be valid + addValidChildren('+ol[ul|ol],+ul[ul|ol]'); + + // Delete invalid elements + if (settings.invalid_elements) { + tinymce.each(tinymce.explode(settings.invalid_elements), function(item) { + if (elements[item]) + delete elements[item]; + }); + } + + self.children = children; + + self.styles = validStyles; + + self.getBoolAttrs = function() { + return boolAttrMap; + }; + + self.getBlockElements = function() { + return blockElementsMap; + }; + + self.getShortEndedElements = function() { + return shortEndedElementsMap; + }; + + self.getSelfClosingElements = function() { + return selfClosingElementsMap; + }; + + self.getNonEmptyElements = function() { + return nonEmptyElementsMap; + }; + + self.getWhiteSpaceElements = function() { + return whiteSpaceElementsMap; + }; + + self.isValidChild = function(name, child) { + var parent = children[name]; + + return !!(parent && parent[child]); + }; + + self.getElementRule = function(name) { + var element = elements[name], i; + + // Exact match found + if (element) + return element; + + // No exact match then try the patterns + i = patternElements.length; + while (i--) { + element = patternElements[i]; + + if (element.pattern.test(name)) + return element; + } + }; + + self.addValidElements = addValidElements; + + self.setValidElements = setValidElements; + + self.addCustomElements = addCustomElements; + + self.addValidChildren = addValidChildren; + }; + + // Expose boolMap and blockElementMap as static properties for usage in DOMUtils + tinymce.html.Schema.boolAttrMap = boolAttrMap; + tinymce.html.Schema.blockElementsMap = blockElementsMap; +})(tinymce); + +(function(tinymce) { + tinymce.html.SaxParser = function(settings, schema) { + var self = this, noop = function() {}; + + settings = settings || {}; + self.schema = schema = schema || new tinymce.html.Schema(); + + if (settings.fix_self_closing !== false) + settings.fix_self_closing = true; + + // Add handler functions from settings and setup default handlers + tinymce.each('comment cdata text start end pi doctype'.split(' '), function(name) { + if (name) + self[name] = settings[name] || noop; + }); + + self.parse = function(html) { + var self = this, matches, index = 0, value, endRegExp, stack = [], attrList, i, text, name, + shortEndedElements, fillAttrsMap, isShortEnded, validate, elementRule, isValidElement, attr, attribsValue, + validAttributesMap, validAttributePatterns, attributesRequired, attributesDefault, attributesForced, selfClosing, + tokenRegExp, attrRegExp, specialElements, attrValue, idCount = 0, decode = tinymce.html.Entities.decode, fixSelfClosing; + + function processEndTag(name) { + var pos, i; + + // Find position of parent of the same type + pos = stack.length; + while (pos--) { + if (stack[pos].name === name) + break; + } + + // Found parent + if (pos >= 0) { + // Close all the open elements + for (i = stack.length - 1; i >= pos; i--) { + name = stack[i]; + + if (name.valid) + self.end(name.name); + } + + // Remove the open elements from the stack + stack.length = pos; + } + }; + + // Precompile RegExps and map objects + tokenRegExp = new RegExp('<(?:' + + '(?:!--([\\w\\W]*?)-->)|' + // Comment + '(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|' + // CDATA + '(?:!DOCTYPE([\\w\\W]*?)>)|' + // DOCTYPE + '(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|' + // PI + '(?:\\/([^>]+)>)|' + // End element + '(?:([^\\s\\/<>]+)\\s*((?:[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*)>)' + // Start element + ')', 'g'); + + attrRegExp = /([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:\\.|[^\"])*)\")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?/g; + specialElements = { + 'script' : /<\/script[^>]*>/gi, + 'style' : /<\/style[^>]*>/gi, + 'noscript' : /<\/noscript[^>]*>/gi + }; + + // Setup lookup tables for empty elements and boolean attributes + shortEndedElements = schema.getShortEndedElements(); + selfClosing = schema.getSelfClosingElements(); + fillAttrsMap = schema.getBoolAttrs(); + validate = settings.validate; + fixSelfClosing = settings.fix_self_closing; + + while (matches = tokenRegExp.exec(html)) { + // Text + if (index < matches.index) + self.text(decode(html.substr(index, matches.index - index))); + + if (value = matches[6]) { // End element + processEndTag(value.toLowerCase()); + } else if (value = matches[7]) { // Start element + value = value.toLowerCase(); + isShortEnded = value in shortEndedElements; + + // Is self closing tag for example an
  • after an open
  • + if (fixSelfClosing && selfClosing[value] && stack.length > 0 && stack[stack.length - 1].name === value) + processEndTag(value); + + // Validate element + if (!validate || (elementRule = schema.getElementRule(value))) { + isValidElement = true; + + // Grab attributes map and patters when validation is enabled + if (validate) { + validAttributesMap = elementRule.attributes; + validAttributePatterns = elementRule.attributePatterns; + } + + // Parse attributes + if (attribsValue = matches[8]) { + attrList = []; + attrList.map = {}; + + attribsValue.replace(attrRegExp, function(match, name, value, val2, val3) { + var attrRule, i; + + name = name.toLowerCase(); + value = name in fillAttrsMap ? name : decode(value || val2 || val3 || ''); // Handle boolean attribute than value attribute + + // Validate name and value + if (validate && name.indexOf('data-') !== 0) { + attrRule = validAttributesMap[name]; + + // Find rule by pattern matching + if (!attrRule && validAttributePatterns) { + i = validAttributePatterns.length; + while (i--) { + attrRule = validAttributePatterns[i]; + if (attrRule.pattern.test(name)) + break; + } + + // No rule matched + if (i === -1) + attrRule = null; + } + + // No attribute rule found + if (!attrRule) + return; + + // Validate value + if (attrRule.validValues && !(value in attrRule.validValues)) + return; + } + + // Add attribute to list and map + attrList.map[name] = value; + attrList.push({ + name: name, + value: value + }); + }); + } else { + attrList = []; + attrList.map = {}; + } + + // Process attributes if validation is enabled + if (validate) { + attributesRequired = elementRule.attributesRequired; + attributesDefault = elementRule.attributesDefault; + attributesForced = elementRule.attributesForced; + + // Handle forced attributes + if (attributesForced) { + i = attributesForced.length; + while (i--) { + attr = attributesForced[i]; + name = attr.name; + attrValue = attr.value; + + if (attrValue === '{$uid}') + attrValue = 'mce_' + idCount++; + + attrList.map[name] = attrValue; + attrList.push({name: name, value: attrValue}); + } + } + + // Handle default attributes + if (attributesDefault) { + i = attributesDefault.length; + while (i--) { + attr = attributesDefault[i]; + name = attr.name; + + if (!(name in attrList.map)) { + attrValue = attr.value; + + if (attrValue === '{$uid}') + attrValue = 'mce_' + idCount++; + + attrList.map[name] = attrValue; + attrList.push({name: name, value: attrValue}); + } + } + } + + // Handle required attributes + if (attributesRequired) { + i = attributesRequired.length; + while (i--) { + if (attributesRequired[i] in attrList.map) + break; + } + + // None of the required attributes where found + if (i === -1) + isValidElement = false; + } + + // Invalidate element if it's marked as bogus + if (attrList.map['data-mce-bogus']) + isValidElement = false; + } + + if (isValidElement) + self.start(value, attrList, isShortEnded); + } else + isValidElement = false; + + // Treat script, noscript and style a bit different since they may include code that looks like elements + if (endRegExp = specialElements[value]) { + endRegExp.lastIndex = index = matches.index + matches[0].length; + + if (matches = endRegExp.exec(html)) { + if (isValidElement) + text = html.substr(index, matches.index - index); + + index = matches.index + matches[0].length; + } else { + text = html.substr(index); + index = html.length; + } + + if (isValidElement && text.length > 0) + self.text(text, true); + + if (isValidElement) + self.end(value); + + tokenRegExp.lastIndex = index; + continue; + } + + // Push value on to stack + if (!isShortEnded) { + if (!attribsValue || attribsValue.indexOf('/') != attribsValue.length - 1) + stack.push({name: value, valid: isValidElement}); + else if (isValidElement) + self.end(value); + } + } else if (value = matches[1]) { // Comment + self.comment(value); + } else if (value = matches[2]) { // CDATA + self.cdata(value); + } else if (value = matches[3]) { // DOCTYPE + self.doctype(value); + } else if (value = matches[4]) { // PI + self.pi(value, matches[5]); + } + + index = matches.index + matches[0].length; + } + + // Text + if (index < html.length) + self.text(decode(html.substr(index))); + + // Close any open elements + for (i = stack.length - 1; i >= 0; i--) { + value = stack[i]; + + if (value.valid) + self.end(value.name); + } + }; + } +})(tinymce); + +(function(tinymce) { + var whiteSpaceRegExp = /^[ \t\r\n]*$/, typeLookup = { + '#text' : 3, + '#comment' : 8, + '#cdata' : 4, + '#pi' : 7, + '#doctype' : 10, + '#document-fragment' : 11 + }; + + // Walks the tree left/right + function walk(node, root_node, prev) { + var sibling, parent, startName = prev ? 'lastChild' : 'firstChild', siblingName = prev ? 'prev' : 'next'; + + // Walk into nodes if it has a start + if (node[startName]) + return node[startName]; + + // Return the sibling if it has one + if (node !== root_node) { + sibling = node[siblingName]; + + if (sibling) + return sibling; + + // Walk up the parents to look for siblings + for (parent = node.parent; parent && parent !== root_node; parent = parent.parent) { + sibling = parent[siblingName]; + + if (sibling) + return sibling; + } + } + }; + + function Node(name, type) { + this.name = name; + this.type = type; + + if (type === 1) { + this.attributes = []; + this.attributes.map = {}; + } + } + + tinymce.extend(Node.prototype, { + replace : function(node) { + var self = this; + + if (node.parent) + node.remove(); + + self.insert(node, self); + self.remove(); + + return self; + }, + + attr : function(name, value) { + var self = this, attrs, i, undef; + + if (typeof name !== "string") { + for (i in name) + self.attr(i, name[i]); + + return self; + } + + if (attrs = self.attributes) { + if (value !== undef) { + // Remove attribute + if (value === null) { + if (name in attrs.map) { + delete attrs.map[name]; + + i = attrs.length; + while (i--) { + if (attrs[i].name === name) { + attrs = attrs.splice(i, 1); + return self; + } + } + } + + return self; + } + + // Set attribute + if (name in attrs.map) { + // Set attribute + i = attrs.length; + while (i--) { + if (attrs[i].name === name) { + attrs[i].value = value; + break; + } + } + } else + attrs.push({name: name, value: value}); + + attrs.map[name] = value; + + return self; + } else { + return attrs.map[name]; + } + } + }, + + clone : function() { + var self = this, clone = new Node(self.name, self.type), i, l, selfAttrs, selfAttr, cloneAttrs; + + // Clone element attributes + if (selfAttrs = self.attributes) { + cloneAttrs = []; + cloneAttrs.map = {}; + + for (i = 0, l = selfAttrs.length; i < l; i++) { + selfAttr = selfAttrs[i]; + + // Clone everything except id + if (selfAttr.name !== 'id') { + cloneAttrs[cloneAttrs.length] = {name: selfAttr.name, value: selfAttr.value}; + cloneAttrs.map[selfAttr.name] = selfAttr.value; + } + } + + clone.attributes = cloneAttrs; + } + + clone.value = self.value; + clone.shortEnded = self.shortEnded; + + return clone; + }, + + wrap : function(wrapper) { + var self = this; + + self.parent.insert(wrapper, self); + wrapper.append(self); + + return self; + }, + + unwrap : function() { + var self = this, node, next; + + for (node = self.firstChild; node; ) { + next = node.next; + self.insert(node, self, true); + node = next; + } + + self.remove(); + }, + + remove : function() { + var self = this, parent = self.parent, next = self.next, prev = self.prev; + + if (parent) { + if (parent.firstChild === self) { + parent.firstChild = next; + + if (next) + next.prev = null; + } else { + prev.next = next; + } + + if (parent.lastChild === self) { + parent.lastChild = prev; + + if (prev) + prev.next = null; + } else { + next.prev = prev; + } + + self.parent = self.next = self.prev = null; + } + + return self; + }, + + append : function(node) { + var self = this, last; + + if (node.parent) + node.remove(); + + last = self.lastChild; + if (last) { + last.next = node; + node.prev = last; + self.lastChild = node; + } else + self.lastChild = self.firstChild = node; + + node.parent = self; + + return node; + }, + + insert : function(node, ref_node, before) { + var parent; + + if (node.parent) + node.remove(); + + parent = ref_node.parent || this; + + if (before) { + if (ref_node === parent.firstChild) + parent.firstChild = node; + else + ref_node.prev.next = node; + + node.prev = ref_node.prev; + node.next = ref_node; + ref_node.prev = node; + } else { + if (ref_node === parent.lastChild) + parent.lastChild = node; + else + ref_node.next.prev = node; + + node.next = ref_node.next; + node.prev = ref_node; + ref_node.next = node; + } + + node.parent = parent; + + return node; + }, + + getAll : function(name) { + var self = this, node, collection = []; + + for (node = self.firstChild; node; node = walk(node, self)) { + if (node.name === name) + collection.push(node); + } + + return collection; + }, + + empty : function() { + var self = this, nodes, i, node; + + // Remove all children + if (self.firstChild) { + nodes = []; + + // Collect the children + for (node = self.firstChild; node; node = walk(node, self)) + nodes.push(node); + + // Remove the children + i = nodes.length; + while (i--) { + node = nodes[i]; + node.parent = node.firstChild = node.lastChild = node.next = node.prev = null; + } + } + + self.firstChild = self.lastChild = null; + + return self; + }, + + isEmpty : function(elements) { + var self = this, node = self.firstChild, i, name; + + if (node) { + do { + if (node.type === 1) { + // Ignore bogus elements + if (node.attributes.map['data-mce-bogus']) + continue; + + // Keep empty elements like + if (elements[node.name]) + return false; + + // Keep elements with data attributes or name attribute like + i = node.attributes.length; + while (i--) { + name = node.attributes[i].name; + if (name === "name" || name.indexOf('data-') === 0) + return false; + } + } + + // Keep non whitespace text nodes + if ((node.type === 3 && !whiteSpaceRegExp.test(node.value))) + return false; + } while (node = walk(node, self)); + } + + return true; + } + }); + + tinymce.extend(Node, { + create : function(name, attrs) { + var node, attrName; + + // Create node + node = new Node(name, typeLookup[name] || 1); + + // Add attributes if needed + if (attrs) { + for (attrName in attrs) + node.attr(attrName, attrs[attrName]); + } + + return node; + } + }); + + tinymce.html.Node = Node; +})(tinymce); + +(function(tinymce) { + var Node = tinymce.html.Node; + + tinymce.html.DomParser = function(settings, schema) { + var self = this, nodeFilters = {}, attributeFilters = [], matchedNodes = {}, matchedAttributes = {}; + + settings = settings || {}; + settings.validate = "validate" in settings ? settings.validate : true; + settings.root_name = settings.root_name || 'body'; + self.schema = schema = schema || new tinymce.html.Schema(); + + function fixInvalidChildren(nodes) { + var ni, node, parent, parents, newParent, currentNode, tempNode, childNode, i, + childClone, nonEmptyElements, nonSplitableElements, sibling, nextNode; + + nonSplitableElements = tinymce.makeMap('tr,td,th,tbody,thead,tfoot,table'); + nonEmptyElements = schema.getNonEmptyElements(); + + for (ni = 0; ni < nodes.length; ni++) { + node = nodes[ni]; + + // Already removed + if (!node.parent) + continue; + + // Get list of all parent nodes until we find a valid parent to stick the child into + parents = [node]; + for (parent = node.parent; parent && !schema.isValidChild(parent.name, node.name) && !nonSplitableElements[parent.name]; parent = parent.parent) + parents.push(parent); + + // Found a suitable parent + if (parent && parents.length > 1) { + // Reverse the array since it makes looping easier + parents.reverse(); + + // Clone the related parent and insert that after the moved node + newParent = currentNode = self.filterNode(parents[0].clone()); + + // Start cloning and moving children on the left side of the target node + for (i = 0; i < parents.length - 1; i++) { + if (schema.isValidChild(currentNode.name, parents[i].name)) { + tempNode = self.filterNode(parents[i].clone()); + currentNode.append(tempNode); + } else + tempNode = currentNode; + + for (childNode = parents[i].firstChild; childNode && childNode != parents[i + 1]; ) { + nextNode = childNode.next; + tempNode.append(childNode); + childNode = nextNode; + } + + currentNode = tempNode; + } + + if (!newParent.isEmpty(nonEmptyElements)) { + parent.insert(newParent, parents[0], true); + parent.insert(node, newParent); + } else { + parent.insert(node, parents[0], true); + } + + // Check if the element is empty by looking through it's contents and special treatment for


    + parent = parents[0]; + if (parent.isEmpty(nonEmptyElements) || parent.firstChild === parent.lastChild && parent.firstChild.name === 'br') { + parent.empty().remove(); + } + } else if (node.parent) { + // If it's an LI try to find a UL/OL for it or wrap it + if (node.name === 'li') { + sibling = node.prev; + if (sibling && (sibling.name === 'ul' || sibling.name === 'ul')) { + sibling.append(node); + continue; + } + + sibling = node.next; + if (sibling && (sibling.name === 'ul' || sibling.name === 'ul')) { + sibling.insert(node, sibling.firstChild, true); + continue; + } + + node.wrap(self.filterNode(new Node('ul', 1))); + continue; + } + + // Try wrapping the element in a DIV + if (schema.isValidChild(node.parent.name, 'div') && schema.isValidChild('div', node.name)) { + node.wrap(self.filterNode(new Node('div', 1))); + } else { + // We failed wrapping it, then remove or unwrap it + if (node.name === 'style' || node.name === 'script') + node.empty().remove(); + else + node.unwrap(); + } + } + } + }; + + self.filterNode = function(node) { + var i, name, list; + + // Run element filters + if (name in nodeFilters) { + list = matchedNodes[name]; + + if (list) + list.push(node); + else + matchedNodes[name] = [node]; + } + + // Run attribute filters + i = attributeFilters.length; + while (i--) { + name = attributeFilters[i].name; + + if (name in node.attributes.map) { + list = matchedAttributes[name]; + + if (list) + list.push(node); + else + matchedAttributes[name] = [node]; + } + } + + return node; + }; + + self.addNodeFilter = function(name, callback) { + tinymce.each(tinymce.explode(name), function(name) { + var list = nodeFilters[name]; + + if (!list) + nodeFilters[name] = list = []; + + list.push(callback); + }); + }; + + self.addAttributeFilter = function(name, callback) { + tinymce.each(tinymce.explode(name), function(name) { + var i; + + for (i = 0; i < attributeFilters.length; i++) { + if (attributeFilters[i].name === name) { + attributeFilters[i].callbacks.push(callback); + return; + } + } + + attributeFilters.push({name: name, callbacks: [callback]}); + }); + }; + + self.parse = function(html, args) { + var parser, rootNode, node, nodes, i, l, fi, fl, list, name, validate, + blockElements, startWhiteSpaceRegExp, invalidChildren = [], + endWhiteSpaceRegExp, allWhiteSpaceRegExp, whiteSpaceElements, children, nonEmptyElements; + + args = args || {}; + matchedNodes = {}; + matchedAttributes = {}; + blockElements = tinymce.extend(tinymce.makeMap('script,style,head,html,body,title,meta,param'), schema.getBlockElements()); + nonEmptyElements = schema.getNonEmptyElements(); + children = schema.children; + validate = settings.validate; + + whiteSpaceElements = schema.getWhiteSpaceElements(); + startWhiteSpaceRegExp = /^[ \t\r\n]+/; + endWhiteSpaceRegExp = /[ \t\r\n]+$/; + allWhiteSpaceRegExp = /[ \t\r\n]+/g; + + function createNode(name, type) { + var node = new Node(name, type), list; + + if (name in nodeFilters) { + list = matchedNodes[name]; + + if (list) + list.push(node); + else + matchedNodes[name] = [node]; + } + + return node; + }; + + function removeWhitespaceBefore(node) { + var textNode, textVal, sibling; + + for (textNode = node.prev; textNode && textNode.type === 3; ) { + textVal = textNode.value.replace(endWhiteSpaceRegExp, ''); + + if (textVal.length > 0) { + textNode.value = textVal; + textNode = textNode.prev; + } else { + sibling = textNode.prev; + textNode.remove(); + textNode = sibling; + } + } + }; + + parser = new tinymce.html.SaxParser({ + validate : validate, + fix_self_closing : !validate, // Let the DOM parser handle
  • in
  • or

    in

    for better results + + cdata: function(text) { + node.append(createNode('#cdata', 4)).value = text; + }, + + text: function(text, raw) { + var textNode; + + // Trim all redundant whitespace on non white space elements + if (!whiteSpaceElements[node.name]) { + text = text.replace(allWhiteSpaceRegExp, ' '); + + if (node.lastChild && blockElements[node.lastChild.name]) + text = text.replace(startWhiteSpaceRegExp, ''); + } + + // Do we need to create the node + if (text.length !== 0) { + textNode = createNode('#text', 3); + textNode.raw = !!raw; + node.append(textNode).value = text; + } + }, + + comment: function(text) { + node.append(createNode('#comment', 8)).value = text; + }, + + pi: function(name, text) { + node.append(createNode(name, 7)).value = text; + removeWhitespaceBefore(node); + }, + + doctype: function(text) { + var newNode; + + newNode = node.append(createNode('#doctype', 10)); + newNode.value = text; + removeWhitespaceBefore(node); + }, + + start: function(name, attrs, empty) { + var newNode, attrFiltersLen, elementRule, textNode, attrName, text, sibling, parent; + + elementRule = validate ? schema.getElementRule(name) : {}; + if (elementRule) { + newNode = createNode(elementRule.outputName || name, 1); + newNode.attributes = attrs; + newNode.shortEnded = empty; + + node.append(newNode); + + // Check if node is valid child of the parent node is the child is + // unknown we don't collect it since it's probably a custom element + parent = children[node.name]; + if (parent && children[newNode.name] && !parent[newNode.name]) + invalidChildren.push(newNode); + + attrFiltersLen = attributeFilters.length; + while (attrFiltersLen--) { + attrName = attributeFilters[attrFiltersLen].name; + + if (attrName in attrs.map) { + list = matchedAttributes[attrName]; + + if (list) + list.push(newNode); + else + matchedAttributes[attrName] = [newNode]; + } + } + + // Trim whitespace before block + if (blockElements[name]) + removeWhitespaceBefore(newNode); + + // Change current node if the element wasn't empty i.e not
    or + if (!empty) + node = newNode; + } + }, + + end: function(name) { + var textNode, elementRule, text, sibling, tempNode; + + elementRule = validate ? schema.getElementRule(name) : {}; + if (elementRule) { + if (blockElements[name]) { + if (!whiteSpaceElements[node.name]) { + // Trim whitespace at beginning of block + for (textNode = node.firstChild; textNode && textNode.type === 3; ) { + text = textNode.value.replace(startWhiteSpaceRegExp, ''); + + if (text.length > 0) { + textNode.value = text; + textNode = textNode.next; + } else { + sibling = textNode.next; + textNode.remove(); + textNode = sibling; + } + } + + // Trim whitespace at end of block + for (textNode = node.lastChild; textNode && textNode.type === 3; ) { + text = textNode.value.replace(endWhiteSpaceRegExp, ''); + + if (text.length > 0) { + textNode.value = text; + textNode = textNode.prev; + } else { + sibling = textNode.prev; + textNode.remove(); + textNode = sibling; + } + } + } + + // Trim start white space + textNode = node.prev; + if (textNode && textNode.type === 3) { + text = textNode.value.replace(startWhiteSpaceRegExp, ''); + + if (text.length > 0) + textNode.value = text; + else + textNode.remove(); + } + } + + // Handle empty nodes + if (elementRule.removeEmpty || elementRule.paddEmpty) { + if (node.isEmpty(nonEmptyElements)) { + if (elementRule.paddEmpty) + node.empty().append(new Node('#text', '3')).value = '\u00a0'; + else { + // Leave nodes that have a name like + if (!node.attributes.map.name) { + tempNode = node.parent; + node.empty().remove(); + node = tempNode; + return; + } + } + } + } + + node = node.parent; + } + } + }, schema); + + rootNode = node = new Node(settings.root_name, 11); + + parser.parse(html); + + if (validate) + fixInvalidChildren(invalidChildren); + + // Run node filters + for (name in matchedNodes) { + list = nodeFilters[name]; + nodes = matchedNodes[name]; + + // Remove already removed children + fi = nodes.length; + while (fi--) { + if (!nodes[fi].parent) + nodes.splice(fi, 1); + } + + for (i = 0, l = list.length; i < l; i++) + list[i](nodes, name, args); + } + + // Run attribute filters + for (i = 0, l = attributeFilters.length; i < l; i++) { + list = attributeFilters[i]; + + if (list.name in matchedAttributes) { + nodes = matchedAttributes[list.name]; + + // Remove already removed children + fi = nodes.length; + while (fi--) { + if (!nodes[fi].parent) + nodes.splice(fi, 1); + } + + for (fi = 0, fl = list.callbacks.length; fi < fl; fi++) + list.callbacks[fi](nodes, list.name, args); + } + } + + return rootNode; + }; + + // Remove
    at end of block elements Gecko and WebKit injects BR elements to + // make it possible to place the caret inside empty blocks. This logic tries to remove + // these elements and keep br elements that where intended to be there intact + if (settings.remove_trailing_brs) { + self.addNodeFilter('br', function(nodes, name) { + var i, l = nodes.length, node, blockElements = schema.getBlockElements(), + nonEmptyElements = schema.getNonEmptyElements(), parent, prev, prevName; + + // Must loop forwards since it will otherwise remove all brs in

    a


    + for (i = 0; i < l; i++) { + node = nodes[i]; + parent = node.parent; + + if (blockElements[node.parent.name] && node === parent.lastChild) { + // Loop all nodes to the right of the current node and check for other BR elements + // excluding bookmarks since they are invisible + prev = node.prev; + while (prev) { + prevName = prev.name; + + // Ignore bookmarks + if (prevName !== "span" || prev.attr('data-mce-type') !== 'bookmark') { + // Found a non BR element + if (prevName !== "br") + break; + + // Found another br it's a

    structure then don't remove anything + if (prevName === 'br') { + node = null; + break; + } + } + + prev = prev.prev; + } + + if (node) { + node.remove(); + + // Is the parent to be considered empty after we removed the BR + if (parent.isEmpty(nonEmptyElements)) { + elementRule = schema.getElementRule(parent.name); + + // Remove or padd the element depending on schema rule + if (elementRule.removeEmpty) + parent.remove(); + else if (elementRule.paddEmpty) + parent.empty().append(new tinymce.html.Node('#text', 3)).value = '\u00a0'; + } + } + } + } + }); + } + } +})(tinymce); + +tinymce.html.Writer = function(settings) { + var html = [], indent, indentBefore, indentAfter, encode, htmlOutput; + + settings = settings || {}; + indent = settings.indent; + indentBefore = tinymce.makeMap(settings.indent_before || ''); + indentAfter = tinymce.makeMap(settings.indent_after || ''); + encode = tinymce.html.Entities.getEncodeFunc(settings.entity_encoding || 'raw', settings.entities); + htmlOutput = settings.element_format == "html"; + + return { + start: function(name, attrs, empty) { + var i, l, attr, value; + + if (indent && indentBefore[name] && html.length > 0) { + value = html[html.length - 1]; + + if (value.length > 0 && value !== '\n') + html.push('\n'); + } + + html.push('<', name); + + if (attrs) { + for (i = 0, l = attrs.length; i < l; i++) { + attr = attrs[i]; + html.push(' ', attr.name, '="', encode(attr.value, true), '"'); + } + } + + if (!empty || htmlOutput) + html[html.length] = '>'; + else + html[html.length] = ' />'; + + if (empty && indent && indentAfter[name] && html.length > 0) { + value = html[html.length - 1]; + + if (value.length > 0 && value !== '\n') + html.push('\n'); + } + }, + + end: function(name) { + var value; + + /*if (indent && indentBefore[name] && html.length > 0) { + value = html[html.length - 1]; + + if (value.length > 0 && value !== '\n') + html.push('\n'); + }*/ + + html.push(''); + + if (indent && indentAfter[name] && html.length > 0) { + value = html[html.length - 1]; + + if (value.length > 0 && value !== '\n') + html.push('\n'); + } + }, + + text: function(text, raw) { + if (text.length > 0) + html[html.length] = raw ? text : encode(text); + }, + + cdata: function(text) { + html.push(''); + }, + + comment: function(text) { + html.push(''); + }, + + pi: function(name, text) { + if (text) + html.push(''); + else + html.push(''); + + if (indent) + html.push('\n'); + }, + + doctype: function(text) { + html.push('', indent ? '\n' : ''); + }, + + reset: function() { + html.length = 0; + }, + + getContent: function() { + return html.join('').replace(/\n$/, ''); + } + }; +}; + +(function(tinymce) { + tinymce.html.Serializer = function(settings, schema) { + var self = this, writer = new tinymce.html.Writer(settings); + + settings = settings || {}; + settings.validate = "validate" in settings ? settings.validate : true; + + self.schema = schema = schema || new tinymce.html.Schema(); + self.writer = writer; + + self.serialize = function(node) { + var handlers, validate; + + validate = settings.validate; + + handlers = { + // #text + 3: function(node, raw) { + writer.text(node.value, node.raw); + }, + + // #comment + 8: function(node) { + writer.comment(node.value); + }, + + // Processing instruction + 7: function(node) { + writer.pi(node.name, node.value); + }, + + // Doctype + 10: function(node) { + writer.doctype(node.value); + }, + + // CDATA + 4: function(node) { + writer.cdata(node.value); + }, + + // Document fragment + 11: function(node) { + if ((node = node.firstChild)) { + do { + walk(node); + } while (node = node.next); + } + } + }; + + writer.reset(); + + function walk(node) { + var handler = handlers[node.type], name, isEmpty, attrs, attrName, attrValue, sortedAttrs, i, l, elementRule; + + if (!handler) { + name = node.name; + isEmpty = node.shortEnded; + attrs = node.attributes; + + // Sort attributes + if (validate && attrs && attrs.length > 1) { + sortedAttrs = []; + sortedAttrs.map = {}; + + elementRule = schema.getElementRule(node.name); + for (i = 0, l = elementRule.attributesOrder.length; i < l; i++) { + attrName = elementRule.attributesOrder[i]; + + if (attrName in attrs.map) { + attrValue = attrs.map[attrName]; + sortedAttrs.map[attrName] = attrValue; + sortedAttrs.push({name: attrName, value: attrValue}); + } + } + + for (i = 0, l = attrs.length; i < l; i++) { + attrName = attrs[i].name; + + if (!(attrName in sortedAttrs.map)) { + attrValue = attrs.map[attrName]; + sortedAttrs.map[attrName] = attrValue; + sortedAttrs.push({name: attrName, value: attrValue}); + } + } + + attrs = sortedAttrs; + } + + writer.start(node.name, attrs, isEmpty); + + if (!isEmpty) { + if ((node = node.firstChild)) { + do { + walk(node); + } while (node = node.next); + } + + writer.end(name); + } + } else + handler(node); + } + + // Serialize element and treat all non elements as fragments + if (node.type == 1 && !settings.inner) + walk(node); + else + handlers[11](node); + + return writer.getContent(); + }; + } +})(tinymce); + +(function(tinymce) { + // Shorten names + var each = tinymce.each, + is = tinymce.is, + isWebKit = tinymce.isWebKit, + isIE = tinymce.isIE, + Entities = tinymce.html.Entities, + simpleSelectorRe = /^([a-z0-9],?)+$/i, + blockElementsMap = tinymce.html.Schema.blockElementsMap, + whiteSpaceRegExp = /^[ \t\r\n]*$/; + + tinymce.create('tinymce.dom.DOMUtils', { + doc : null, + root : null, + files : null, + pixelStyles : /^(top|left|bottom|right|width|height|borderWidth)$/, + props : { + "for" : "htmlFor", + "class" : "className", + className : "className", + checked : "checked", + disabled : "disabled", + maxlength : "maxLength", + readonly : "readOnly", + selected : "selected", + value : "value", + id : "id", + name : "name", + type : "type" + }, + + DOMUtils : function(d, s) { + var t = this, globalStyle; + + t.doc = d; + t.win = window; + t.files = {}; + t.cssFlicker = false; + t.counter = 0; + t.stdMode = !tinymce.isIE || d.documentMode >= 8; + t.boxModel = !tinymce.isIE || d.compatMode == "CSS1Compat" || t.stdMode; + t.hasOuterHTML = "outerHTML" in d.createElement("a"); + + t.settings = s = tinymce.extend({ + keep_values : false, + hex_colors : 1 + }, s); + + t.schema = s.schema; + t.styles = new tinymce.html.Styles({ + url_converter : s.url_converter, + url_converter_scope : s.url_converter_scope + }, s.schema); + + // Fix IE6SP2 flicker and check it failed for pre SP2 + if (tinymce.isIE6) { + try { + d.execCommand('BackgroundImageCache', false, true); + } catch (e) { + t.cssFlicker = true; + } + } + + if (isIE) { + // Add missing HTML 4/5 elements to IE + ('abbr article aside audio canvas ' + + 'details figcaption figure footer ' + + 'header hgroup mark menu meter nav ' + + 'output progress section summary ' + + 'time video').replace(/\w+/g, function(name) { + d.createElement(name); + }); + } + + tinymce.addUnload(t.destroy, t); + }, + + getRoot : function() { + var t = this, s = t.settings; + + return (s && t.get(s.root_element)) || t.doc.body; + }, + + getViewPort : function(w) { + var d, b; + + w = !w ? this.win : w; + d = w.document; + b = this.boxModel ? d.documentElement : d.body; + + // Returns viewport size excluding scrollbars + return { + x : w.pageXOffset || b.scrollLeft, + y : w.pageYOffset || b.scrollTop, + w : w.innerWidth || b.clientWidth, + h : w.innerHeight || b.clientHeight + }; + }, + + getRect : function(e) { + var p, t = this, sr; + + e = t.get(e); + p = t.getPos(e); + sr = t.getSize(e); + + return { + x : p.x, + y : p.y, + w : sr.w, + h : sr.h + }; + }, + + getSize : function(e) { + var t = this, w, h; + + e = t.get(e); + w = t.getStyle(e, 'width'); + h = t.getStyle(e, 'height'); + + // Non pixel value, then force offset/clientWidth + if (w.indexOf('px') === -1) + w = 0; + + // Non pixel value, then force offset/clientWidth + if (h.indexOf('px') === -1) + h = 0; + + return { + w : parseInt(w) || e.offsetWidth || e.clientWidth, + h : parseInt(h) || e.offsetHeight || e.clientHeight + }; + }, + + getParent : function(n, f, r) { + return this.getParents(n, f, r, false); + }, + + getParents : function(n, f, r, c) { + var t = this, na, se = t.settings, o = []; + + n = t.get(n); + c = c === undefined; + + if (se.strict_root) + r = r || t.getRoot(); + + // Wrap node name as func + if (is(f, 'string')) { + na = f; + + if (f === '*') { + f = function(n) {return n.nodeType == 1;}; + } else { + f = function(n) { + return t.is(n, na); + }; + } + } + + while (n) { + if (n == r || !n.nodeType || n.nodeType === 9) + break; + + if (!f || f(n)) { + if (c) + o.push(n); + else + return n; + } + + n = n.parentNode; + } + + return c ? o : null; + }, + + get : function(e) { + var n; + + if (e && this.doc && typeof(e) == 'string') { + n = e; + e = this.doc.getElementById(e); + + // IE and Opera returns meta elements when they match the specified input ID, but getElementsByName seems to do the trick + if (e && e.id !== n) + return this.doc.getElementsByName(n)[1]; + } + + return e; + }, + + getNext : function(node, selector) { + return this._findSib(node, selector, 'nextSibling'); + }, + + getPrev : function(node, selector) { + return this._findSib(node, selector, 'previousSibling'); + }, + + + add : function(p, n, a, h, c) { + var t = this; + + return this.run(p, function(p) { + var e, k; + + e = is(n, 'string') ? t.doc.createElement(n) : n; + t.setAttribs(e, a); + + if (h) { + if (h.nodeType) + e.appendChild(h); + else + t.setHTML(e, h); + } + + return !c ? p.appendChild(e) : e; + }); + }, + + create : function(n, a, h) { + return this.add(this.doc.createElement(n), n, a, h, 1); + }, + + createHTML : function(n, a, h) { + var o = '', t = this, k; + + o += '<' + n; + + for (k in a) { + if (a.hasOwnProperty(k)) + o += ' ' + k + '="' + t.encode(a[k]) + '"'; + } + + // A call to tinymce.is doesn't work for some odd reason on IE9 possible bug inside their JS runtime + if (typeof(h) != "undefined") + return o + '>' + h + ''; + + return o + ' />'; + }, + + remove : function(node, keep_children) { + return this.run(node, function(node) { + var child, parent = node.parentNode; + + if (!parent) + return null; + + if (keep_children) { + while (child = node.firstChild) { + // IE 8 will crash if you don't remove completely empty text nodes + if (!tinymce.isIE || child.nodeType !== 3 || child.nodeValue) + parent.insertBefore(child, node); + else + node.removeChild(child); + } + } + + return parent.removeChild(node); + }); + }, + + setStyle : function(n, na, v) { + var t = this; + + return t.run(n, function(e) { + var s, i; + + s = e.style; + + // Camelcase it, if needed + na = na.replace(/-(\D)/g, function(a, b){ + return b.toUpperCase(); + }); + + // Default px suffix on these + if (t.pixelStyles.test(na) && (tinymce.is(v, 'number') || /^[\-0-9\.]+$/.test(v))) + v += 'px'; + + switch (na) { + case 'opacity': + // IE specific opacity + if (isIE) { + s.filter = v === '' ? '' : "alpha(opacity=" + (v * 100) + ")"; + + if (!n.currentStyle || !n.currentStyle.hasLayout) + s.display = 'inline-block'; + } + + // Fix for older browsers + s[na] = s['-moz-opacity'] = s['-khtml-opacity'] = v || ''; + break; + + case 'float': + isIE ? s.styleFloat = v : s.cssFloat = v; + break; + + default: + s[na] = v || ''; + } + + // Force update of the style data + if (t.settings.update_styles) + t.setAttrib(e, 'data-mce-style'); + }); + }, + + getStyle : function(n, na, c) { + n = this.get(n); + + if (!n) + return; + + // Gecko + if (this.doc.defaultView && c) { + // Remove camelcase + na = na.replace(/[A-Z]/g, function(a){ + return '-' + a; + }); + + try { + return this.doc.defaultView.getComputedStyle(n, null).getPropertyValue(na); + } catch (ex) { + // Old safari might fail + return null; + } + } + + // Camelcase it, if needed + na = na.replace(/-(\D)/g, function(a, b){ + return b.toUpperCase(); + }); + + if (na == 'float') + na = isIE ? 'styleFloat' : 'cssFloat'; + + // IE & Opera + if (n.currentStyle && c) + return n.currentStyle[na]; + + return n.style ? n.style[na] : undefined; + }, + + setStyles : function(e, o) { + var t = this, s = t.settings, ol; + + ol = s.update_styles; + s.update_styles = 0; + + each(o, function(v, n) { + t.setStyle(e, n, v); + }); + + // Update style info + s.update_styles = ol; + if (s.update_styles) + t.setAttrib(e, s.cssText); + }, + + removeAllAttribs: function(e) { + return this.run(e, function(e) { + var i, attrs = e.attributes; + for (i = attrs.length - 1; i >= 0; i--) { + e.removeAttributeNode(attrs.item(i)); + } + }); + }, + + setAttrib : function(e, n, v) { + var t = this; + + // Whats the point + if (!e || !n) + return; + + // Strict XML mode + if (t.settings.strict) + n = n.toLowerCase(); + + return this.run(e, function(e) { + var s = t.settings; + + switch (n) { + case "style": + if (!is(v, 'string')) { + each(v, function(v, n) { + t.setStyle(e, n, v); + }); + + return; + } + + // No mce_style for elements with these since they might get resized by the user + if (s.keep_values) { + if (v && !t._isRes(v)) + e.setAttribute('data-mce-style', v, 2); + else + e.removeAttribute('data-mce-style', 2); + } + + e.style.cssText = v; + break; + + case "class": + e.className = v || ''; // Fix IE null bug + break; + + case "src": + case "href": + if (s.keep_values) { + if (s.url_converter) + v = s.url_converter.call(s.url_converter_scope || t, v, n, e); + + t.setAttrib(e, 'data-mce-' + n, v, 2); + } + + break; + + case "shape": + e.setAttribute('data-mce-style', v); + break; + } + + if (is(v) && v !== null && v.length !== 0) + e.setAttribute(n, '' + v, 2); + else + e.removeAttribute(n, 2); + }); + }, + + setAttribs : function(e, o) { + var t = this; + + return this.run(e, function(e) { + each(o, function(v, n) { + t.setAttrib(e, n, v); + }); + }); + }, + + getAttrib : function(e, n, dv) { + var v, t = this; + + e = t.get(e); + + if (!e || e.nodeType !== 1) + return false; + + if (!is(dv)) + dv = ''; + + // Try the mce variant for these + if (/^(src|href|style|coords|shape)$/.test(n)) { + v = e.getAttribute("data-mce-" + n); + + if (v) + return v; + } + + if (isIE && t.props[n]) { + v = e[t.props[n]]; + v = v && v.nodeValue ? v.nodeValue : v; + } + + if (!v) + v = e.getAttribute(n, 2); + + // Check boolean attribs + if (/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(n)) { + if (e[t.props[n]] === true && v === '') + return n; + + return v ? n : ''; + } + + // Inner input elements will override attributes on form elements + if (e.nodeName === "FORM" && e.getAttributeNode(n)) + return e.getAttributeNode(n).nodeValue; + + if (n === 'style') { + v = v || e.style.cssText; + + if (v) { + v = t.serializeStyle(t.parseStyle(v), e.nodeName); + + if (t.settings.keep_values && !t._isRes(v)) + e.setAttribute('data-mce-style', v); + } + } + + // Remove Apple and WebKit stuff + if (isWebKit && n === "class" && v) + v = v.replace(/(apple|webkit)\-[a-z\-]+/gi, ''); + + // Handle IE issues + if (isIE) { + switch (n) { + case 'rowspan': + case 'colspan': + // IE returns 1 as default value + if (v === 1) + v = ''; + + break; + + case 'size': + // IE returns +0 as default value for size + if (v === '+0' || v === 20 || v === 0) + v = ''; + + break; + + case 'width': + case 'height': + case 'vspace': + case 'checked': + case 'disabled': + case 'readonly': + if (v === 0) + v = ''; + + break; + + case 'hspace': + // IE returns -1 as default value + if (v === -1) + v = ''; + + break; + + case 'maxlength': + case 'tabindex': + // IE returns default value + if (v === 32768 || v === 2147483647 || v === '32768') + v = ''; + + break; + + case 'multiple': + case 'compact': + case 'noshade': + case 'nowrap': + if (v === 65535) + return n; + + return dv; + + case 'shape': + v = v.toLowerCase(); + break; + + default: + // IE has odd anonymous function for event attributes + if (n.indexOf('on') === 0 && v) + v = tinymce._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/, '$1', '' + v); + } + } + + return (v !== undefined && v !== null && v !== '') ? '' + v : dv; + }, + + getPos : function(n, ro) { + var t = this, x = 0, y = 0, e, d = t.doc, r; + + n = t.get(n); + ro = ro || d.body; + + if (n) { + // Use getBoundingClientRect on IE, Opera has it but it's not perfect + if (isIE && !t.stdMode) { + n = n.getBoundingClientRect(); + e = t.boxModel ? d.documentElement : d.body; + x = t.getStyle(t.select('html')[0], 'borderWidth'); // Remove border + x = (x == 'medium' || t.boxModel && !t.isIE6) && 2 || x; + + return {x : n.left + e.scrollLeft - x, y : n.top + e.scrollTop - x}; + } + + r = n; + while (r && r != ro && r.nodeType) { + x += r.offsetLeft || 0; + y += r.offsetTop || 0; + r = r.offsetParent; + } + + r = n.parentNode; + while (r && r != ro && r.nodeType) { + x -= r.scrollLeft || 0; + y -= r.scrollTop || 0; + r = r.parentNode; + } + } + + return {x : x, y : y}; + }, + + parseStyle : function(st) { + return this.styles.parse(st); + }, + + serializeStyle : function(o, name) { + return this.styles.serialize(o, name); + }, + + loadCSS : function(u) { + var t = this, d = t.doc, head; + + if (!u) + u = ''; + + head = t.select('head')[0]; + + each(u.split(','), function(u) { + var link; + + if (t.files[u]) + return; + + t.files[u] = true; + link = t.create('link', {rel : 'stylesheet', href : tinymce._addVer(u)}); + + // IE 8 has a bug where dynamically loading stylesheets would produce a 1 item remaining bug + // This fix seems to resolve that issue by realcing the document ones a stylesheet finishes loading + // It's ugly but it seems to work fine. + if (isIE && d.documentMode && d.recalc) { + link.onload = function() { + if (d.recalc) + d.recalc(); + + link.onload = null; + }; + } + + head.appendChild(link); + }); + }, + + addClass : function(e, c) { + return this.run(e, function(e) { + var o; + + if (!c) + return 0; + + if (this.hasClass(e, c)) + return e.className; + + o = this.removeClass(e, c); + + return e.className = (o != '' ? (o + ' ') : '') + c; + }); + }, + + removeClass : function(e, c) { + var t = this, re; + + return t.run(e, function(e) { + var v; + + if (t.hasClass(e, c)) { + if (!re) + re = new RegExp("(^|\\s+)" + c + "(\\s+|$)", "g"); + + v = e.className.replace(re, ' '); + v = tinymce.trim(v != ' ' ? v : ''); + + e.className = v; + + // Empty class attr + if (!v) { + e.removeAttribute('class'); + e.removeAttribute('className'); + } + + return v; + } + + return e.className; + }); + }, + + hasClass : function(n, c) { + n = this.get(n); + + if (!n || !c) + return false; + + return (' ' + n.className + ' ').indexOf(' ' + c + ' ') !== -1; + }, + + show : function(e) { + return this.setStyle(e, 'display', 'block'); + }, + + hide : function(e) { + return this.setStyle(e, 'display', 'none'); + }, + + isHidden : function(e) { + e = this.get(e); + + return !e || e.style.display == 'none' || this.getStyle(e, 'display') == 'none'; + }, + + uniqueId : function(p) { + return (!p ? 'mce_' : p) + (this.counter++); + }, + + setHTML : function(element, html) { + var self = this; + + return self.run(element, function(element) { + if (isIE) { + // Remove all child nodes, IE keeps empty text nodes in DOM + while (element.firstChild) + element.removeChild(element.firstChild); + + try { + // IE will remove comments from the beginning + // unless you padd the contents with something + element.innerHTML = '
    ' + html; + element.removeChild(element.firstChild); + } catch (ex) { + // IE sometimes produces an unknown runtime error on innerHTML if it's an block element within a block element for example a div inside a p + // This seems to fix this problem + + // Create new div with HTML contents and a BR infront to keep comments + element = self.create('div'); + element.innerHTML = '
    ' + html; + + // Add all children from div to target + each (element.childNodes, function(node, i) { + // Skip br element + if (i) + element.appendChild(node); + }); + } + } else + element.innerHTML = html; + + return html; + }); + }, + + getOuterHTML : function(elm) { + var doc, self = this; + + elm = self.get(elm); + + if (!elm) + return null; + + if (elm.nodeType === 1 && self.hasOuterHTML) + return elm.outerHTML; + + doc = (elm.ownerDocument || self.doc).createElement("body"); + doc.appendChild(elm.cloneNode(true)); + + return doc.innerHTML; + }, + + setOuterHTML : function(e, h, d) { + var t = this; + + function setHTML(e, h, d) { + var n, tp; + + tp = d.createElement("body"); + tp.innerHTML = h; + + n = tp.lastChild; + while (n) { + t.insertAfter(n.cloneNode(true), e); + n = n.previousSibling; + } + + t.remove(e); + }; + + return this.run(e, function(e) { + e = t.get(e); + + // Only set HTML on elements + if (e.nodeType == 1) { + d = d || e.ownerDocument || t.doc; + + if (isIE) { + try { + // Try outerHTML for IE it sometimes produces an unknown runtime error + if (isIE && e.nodeType == 1) + e.outerHTML = h; + else + setHTML(e, h, d); + } catch (ex) { + // Fix for unknown runtime error + setHTML(e, h, d); + } + } else + setHTML(e, h, d); + } + }); + }, + + decode : Entities.decode, + + encode : Entities.encodeAllRaw, + + insertAfter : function(node, reference_node) { + reference_node = this.get(reference_node); + + return this.run(node, function(node) { + var parent, nextSibling; + + parent = reference_node.parentNode; + nextSibling = reference_node.nextSibling; + + if (nextSibling) + parent.insertBefore(node, nextSibling); + else + parent.appendChild(node); + + return node; + }); + }, + + isBlock : function(node) { + var type = node.nodeType; + + // If it's a node then check the type and use the nodeName + if (type) + return !!(type === 1 && blockElementsMap[node.nodeName]); + + return !!blockElementsMap[node]; + }, + + replace : function(n, o, k) { + var t = this; + + if (is(o, 'array')) + n = n.cloneNode(true); + + return t.run(o, function(o) { + if (k) { + each(tinymce.grep(o.childNodes), function(c) { + n.appendChild(c); + }); + } + + return o.parentNode.replaceChild(n, o); + }); + }, + + rename : function(elm, name) { + var t = this, newElm; + + if (elm.nodeName != name.toUpperCase()) { + // Rename block element + newElm = t.create(name); + + // Copy attribs to new block + each(t.getAttribs(elm), function(attr_node) { + t.setAttrib(newElm, attr_node.nodeName, t.getAttrib(elm, attr_node.nodeName)); + }); + + // Replace block + t.replace(newElm, elm, 1); + } + + return newElm || elm; + }, + + findCommonAncestor : function(a, b) { + var ps = a, pe; + + while (ps) { + pe = b; + + while (pe && ps != pe) + pe = pe.parentNode; + + if (ps == pe) + break; + + ps = ps.parentNode; + } + + if (!ps && a.ownerDocument) + return a.ownerDocument.documentElement; + + return ps; + }, + + toHex : function(s) { + var c = /^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(s); + + function hex(s) { + s = parseInt(s).toString(16); + + return s.length > 1 ? s : '0' + s; // 0 -> 00 + }; + + if (c) { + s = '#' + hex(c[1]) + hex(c[2]) + hex(c[3]); + + return s; + } + + return s; + }, + + getClasses : function() { + var t = this, cl = [], i, lo = {}, f = t.settings.class_filter, ov; + + if (t.classes) + return t.classes; + + function addClasses(s) { + // IE style imports + each(s.imports, function(r) { + addClasses(r); + }); + + each(s.cssRules || s.rules, function(r) { + // Real type or fake it on IE + switch (r.type || 1) { + // Rule + case 1: + if (r.selectorText) { + each(r.selectorText.split(','), function(v) { + v = v.replace(/^\s*|\s*$|^\s\./g, ""); + + // Is internal or it doesn't contain a class + if (/\.mce/.test(v) || !/\.[\w\-]+$/.test(v)) + return; + + // Remove everything but class name + ov = v; + v = tinymce._replace(/.*\.([a-z0-9_\-]+).*/i, '$1', v); + + // Filter classes + if (f && !(v = f(v, ov))) + return; + + if (!lo[v]) { + cl.push({'class' : v}); + lo[v] = 1; + } + }); + } + break; + + // Import + case 3: + addClasses(r.styleSheet); + break; + } + }); + }; + + try { + each(t.doc.styleSheets, addClasses); + } catch (ex) { + // Ignore + } + + if (cl.length > 0) + t.classes = cl; + + return cl; + }, + + run : function(e, f, s) { + var t = this, o; + + if (t.doc && typeof(e) === 'string') + e = t.get(e); + + if (!e) + return false; + + s = s || this; + if (!e.nodeType && (e.length || e.length === 0)) { + o = []; + + each(e, function(e, i) { + if (e) { + if (typeof(e) == 'string') + e = t.doc.getElementById(e); + + o.push(f.call(s, e, i)); + } + }); + + return o; + } + + return f.call(s, e); + }, + + getAttribs : function(n) { + var o; + + n = this.get(n); + + if (!n) + return []; + + if (isIE) { + o = []; + + // Object will throw exception in IE + if (n.nodeName == 'OBJECT') + return n.attributes; + + // IE doesn't keep the selected attribute if you clone option elements + if (n.nodeName === 'OPTION' && this.getAttrib(n, 'selected')) + o.push({specified : 1, nodeName : 'selected'}); + + // It's crazy that this is faster in IE but it's because it returns all attributes all the time + n.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi, '').replace(/[\w:\-]+/gi, function(a) { + o.push({specified : 1, nodeName : a}); + }); + + return o; + } + + return n.attributes; + }, + + isEmpty : function(node, elements) { + var self = this, i, attributes, type, walker, name; + + node = node.firstChild; + if (node) { + walker = new tinymce.dom.TreeWalker(node); + elements = elements || self.schema ? self.schema.getNonEmptyElements() : null; + + do { + type = node.nodeType; + + if (type === 1) { + // Ignore bogus elements + if (node.getAttribute('data-mce-bogus')) + continue; + + // Keep empty elements like + if (elements && elements[node.nodeName.toLowerCase()]) + return false; + + // Keep elements with data attributes or name attribute like
    + attributes = self.getAttribs(node); + i = node.attributes.length; + while (i--) { + name = node.attributes[i].nodeName; + if (name === "name" || name.indexOf('data-') === 0) + return false; + } + } + + // Keep non whitespace text nodes + if ((type === 3 && !whiteSpaceRegExp.test(node.nodeValue))) + return false; + } while (node = walker.next()); + } + + return true; + }, + + destroy : function(s) { + var t = this; + + if (t.events) + t.events.destroy(); + + t.win = t.doc = t.root = t.events = null; + + // Manual destroy then remove unload handler + if (!s) + tinymce.removeUnload(t.destroy); + }, + + createRng : function() { + var d = this.doc; + + return d.createRange ? d.createRange() : new tinymce.dom.Range(this); + }, + + nodeIndex : function(node, normalized) { + var idx = 0, lastNodeType, lastNode, nodeType, nodeValueExists; + + if (node) { + for (lastNodeType = node.nodeType, node = node.previousSibling, lastNode = node; node; node = node.previousSibling) { + nodeType = node.nodeType; + + // Normalize text nodes + if (normalized && nodeType == 3) { + // ensure that text nodes that have been removed are handled correctly in Internet Explorer. + // (the nodeValue attribute will not exist, and will error here). + nodeValueExists = false; + try {nodeValueExists = node.nodeValue.length} catch (c) {} + if (nodeType == lastNodeType || !nodeValueExists) + continue; + } + idx++; + lastNodeType = nodeType; + } + } + + return idx; + }, + + split : function(pe, e, re) { + var t = this, r = t.createRng(), bef, aft, pa; + + // W3C valid browsers tend to leave empty nodes to the left/right side of the contents, this makes sense + // but we don't want that in our code since it serves no purpose for the end user + // For example if this is chopped: + //

    text 1CHOPtext 2

    + // would produce: + //

    text 1

    CHOP

    text 2

    + // this function will then trim of empty edges and produce: + //

    text 1

    CHOP

    text 2

    + function trim(node) { + var i, children = node.childNodes, type = node.nodeType; + + if (type == 1 && node.getAttribute('data-mce-type') == 'bookmark') + return; + + for (i = children.length - 1; i >= 0; i--) + trim(children[i]); + + if (type != 9) { + // Keep non whitespace text nodes + if (type == 3 && node.nodeValue.length > 0) { + // If parent element isn't a block or there isn't any useful contents for example "

    " + if (!t.isBlock(node.parentNode) || tinymce.trim(node.nodeValue).length > 0) + return; + } else if (type == 1) { + // If the only child is a bookmark then move it up + children = node.childNodes; + if (children.length == 1 && children[0] && children[0].nodeType == 1 && children[0].getAttribute('data-mce-type') == 'bookmark') + node.parentNode.insertBefore(children[0], node); + + // Keep non empty elements or img, hr etc + if (children.length || /^(br|hr|input|img)$/i.test(node.nodeName)) + return; + } + + t.remove(node); + } + + return node; + }; + + if (pe && e) { + // Get before chunk + r.setStart(pe.parentNode, t.nodeIndex(pe)); + r.setEnd(e.parentNode, t.nodeIndex(e)); + bef = r.extractContents(); + + // Get after chunk + r = t.createRng(); + r.setStart(e.parentNode, t.nodeIndex(e) + 1); + r.setEnd(pe.parentNode, t.nodeIndex(pe) + 1); + aft = r.extractContents(); + + // Insert before chunk + pa = pe.parentNode; + pa.insertBefore(trim(bef), pe); + + // Insert middle chunk + if (re) + pa.replaceChild(re, e); + else + pa.insertBefore(e, pe); + + // Insert after chunk + pa.insertBefore(trim(aft), pe); + t.remove(pe); + + return re || e; + } + }, + + bind : function(target, name, func, scope) { + var t = this; + + if (!t.events) + t.events = new tinymce.dom.EventUtils(); + + return t.events.add(target, name, func, scope || this); + }, + + unbind : function(target, name, func) { + var t = this; + + if (!t.events) + t.events = new tinymce.dom.EventUtils(); + + return t.events.remove(target, name, func); + }, + + + _findSib : function(node, selector, name) { + var t = this, f = selector; + + if (node) { + // If expression make a function of it using is + if (is(f, 'string')) { + f = function(node) { + return t.is(node, selector); + }; + } + + // Loop all siblings + for (node = node[name]; node; node = node[name]) { + if (f(node)) + return node; + } + } + + return null; + }, + + _isRes : function(c) { + // Is live resizble element + return /^(top|left|bottom|right|width|height)/i.test(c) || /;\s*(top|left|bottom|right|width|height)/i.test(c); + } + + /* + walk : function(n, f, s) { + var d = this.doc, w; + + if (d.createTreeWalker) { + w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false); + + while ((n = w.nextNode()) != null) + f.call(s || this, n); + } else + tinymce.walk(n, f, 'childNodes', s); + } + */ + + /* + toRGB : function(s) { + var c = /^\s*?#([0-9A-F]{2})([0-9A-F]{1,2})([0-9A-F]{2})?\s*?$/.exec(s); + + if (c) { + // #FFF -> #FFFFFF + if (!is(c[3])) + c[3] = c[2] = c[1]; + + return "rgb(" + parseInt(c[1], 16) + "," + parseInt(c[2], 16) + "," + parseInt(c[3], 16) + ")"; + } + + return s; + } + */ + }); + + tinymce.DOM = new tinymce.dom.DOMUtils(document, {process_html : 0}); +})(tinymce); + +(function(ns) { + // Range constructor + function Range(dom) { + var t = this, + doc = dom.doc, + EXTRACT = 0, + CLONE = 1, + DELETE = 2, + TRUE = true, + FALSE = false, + START_OFFSET = 'startOffset', + START_CONTAINER = 'startContainer', + END_CONTAINER = 'endContainer', + END_OFFSET = 'endOffset', + extend = tinymce.extend, + nodeIndex = dom.nodeIndex; + + extend(t, { + // Inital states + startContainer : doc, + startOffset : 0, + endContainer : doc, + endOffset : 0, + collapsed : TRUE, + commonAncestorContainer : doc, + + // Range constants + START_TO_START : 0, + START_TO_END : 1, + END_TO_END : 2, + END_TO_START : 3, + + // Public methods + setStart : setStart, + setEnd : setEnd, + setStartBefore : setStartBefore, + setStartAfter : setStartAfter, + setEndBefore : setEndBefore, + setEndAfter : setEndAfter, + collapse : collapse, + selectNode : selectNode, + selectNodeContents : selectNodeContents, + compareBoundaryPoints : compareBoundaryPoints, + deleteContents : deleteContents, + extractContents : extractContents, + cloneContents : cloneContents, + insertNode : insertNode, + surroundContents : surroundContents, + cloneRange : cloneRange + }); + + function setStart(n, o) { + _setEndPoint(TRUE, n, o); + }; + + function setEnd(n, o) { + _setEndPoint(FALSE, n, o); + }; + + function setStartBefore(n) { + setStart(n.parentNode, nodeIndex(n)); + }; + + function setStartAfter(n) { + setStart(n.parentNode, nodeIndex(n) + 1); + }; + + function setEndBefore(n) { + setEnd(n.parentNode, nodeIndex(n)); + }; + + function setEndAfter(n) { + setEnd(n.parentNode, nodeIndex(n) + 1); + }; + + function collapse(ts) { + if (ts) { + t[END_CONTAINER] = t[START_CONTAINER]; + t[END_OFFSET] = t[START_OFFSET]; + } else { + t[START_CONTAINER] = t[END_CONTAINER]; + t[START_OFFSET] = t[END_OFFSET]; + } + + t.collapsed = TRUE; + }; + + function selectNode(n) { + setStartBefore(n); + setEndAfter(n); + }; + + function selectNodeContents(n) { + setStart(n, 0); + setEnd(n, n.nodeType === 1 ? n.childNodes.length : n.nodeValue.length); + }; + + function compareBoundaryPoints(h, r) { + var sc = t[START_CONTAINER], so = t[START_OFFSET], ec = t[END_CONTAINER], eo = t[END_OFFSET], + rsc = r.startContainer, rso = r.startOffset, rec = r.endContainer, reo = r.endOffset; + + // Check START_TO_START + if (h === 0) + return _compareBoundaryPoints(sc, so, rsc, rso); + + // Check START_TO_END + if (h === 1) + return _compareBoundaryPoints(ec, eo, rsc, rso); + + // Check END_TO_END + if (h === 2) + return _compareBoundaryPoints(ec, eo, rec, reo); + + // Check END_TO_START + if (h === 3) + return _compareBoundaryPoints(sc, so, rec, reo); + }; + + function deleteContents() { + _traverse(DELETE); + }; + + function extractContents() { + return _traverse(EXTRACT); + }; + + function cloneContents() { + return _traverse(CLONE); + }; + + function insertNode(n) { + var startContainer = this[START_CONTAINER], + startOffset = this[START_OFFSET], nn, o; + + // Node is TEXT_NODE or CDATA + if ((startContainer.nodeType === 3 || startContainer.nodeType === 4) && startContainer.nodeValue) { + if (!startOffset) { + // At the start of text + startContainer.parentNode.insertBefore(n, startContainer); + } else if (startOffset >= startContainer.nodeValue.length) { + // At the end of text + dom.insertAfter(n, startContainer); + } else { + // Middle, need to split + nn = startContainer.splitText(startOffset); + startContainer.parentNode.insertBefore(n, nn); + } + } else { + // Insert element node + if (startContainer.childNodes.length > 0) + o = startContainer.childNodes[startOffset]; + + if (o) + startContainer.insertBefore(n, o); + else + startContainer.appendChild(n); + } + }; + + function surroundContents(n) { + var f = t.extractContents(); + + t.insertNode(n); + n.appendChild(f); + t.selectNode(n); + }; + + function cloneRange() { + return extend(new Range(dom), { + startContainer : t[START_CONTAINER], + startOffset : t[START_OFFSET], + endContainer : t[END_CONTAINER], + endOffset : t[END_OFFSET], + collapsed : t.collapsed, + commonAncestorContainer : t.commonAncestorContainer + }); + }; + + // Private methods + + function _getSelectedNode(container, offset) { + var child; + + if (container.nodeType == 3 /* TEXT_NODE */) + return container; + + if (offset < 0) + return container; + + child = container.firstChild; + while (child && offset > 0) { + --offset; + child = child.nextSibling; + } + + if (child) + return child; + + return container; + }; + + function _isCollapsed() { + return (t[START_CONTAINER] == t[END_CONTAINER] && t[START_OFFSET] == t[END_OFFSET]); + }; + + function _compareBoundaryPoints(containerA, offsetA, containerB, offsetB) { + var c, offsetC, n, cmnRoot, childA, childB; + + // In the first case the boundary-points have the same container. A is before B + // if its offset is less than the offset of B, A is equal to B if its offset is + // equal to the offset of B, and A is after B if its offset is greater than the + // offset of B. + if (containerA == containerB) { + if (offsetA == offsetB) + return 0; // equal + + if (offsetA < offsetB) + return -1; // before + + return 1; // after + } + + // In the second case a child node C of the container of A is an ancestor + // container of B. In this case, A is before B if the offset of A is less than or + // equal to the index of the child node C and A is after B otherwise. + c = containerB; + while (c && c.parentNode != containerA) + c = c.parentNode; + + if (c) { + offsetC = 0; + n = containerA.firstChild; + + while (n != c && offsetC < offsetA) { + offsetC++; + n = n.nextSibling; + } + + if (offsetA <= offsetC) + return -1; // before + + return 1; // after + } + + // In the third case a child node C of the container of B is an ancestor container + // of A. In this case, A is before B if the index of the child node C is less than + // the offset of B and A is after B otherwise. + c = containerA; + while (c && c.parentNode != containerB) { + c = c.parentNode; + } + + if (c) { + offsetC = 0; + n = containerB.firstChild; + + while (n != c && offsetC < offsetB) { + offsetC++; + n = n.nextSibling; + } + + if (offsetC < offsetB) + return -1; // before + + return 1; // after + } + + // In the fourth case, none of three other cases hold: the containers of A and B + // are siblings or descendants of sibling nodes. In this case, A is before B if + // the container of A is before the container of B in a pre-order traversal of the + // Ranges' context tree and A is after B otherwise. + cmnRoot = dom.findCommonAncestor(containerA, containerB); + childA = containerA; + + while (childA && childA.parentNode != cmnRoot) + childA = childA.parentNode; + + if (!childA) + childA = cmnRoot; + + childB = containerB; + while (childB && childB.parentNode != cmnRoot) + childB = childB.parentNode; + + if (!childB) + childB = cmnRoot; + + if (childA == childB) + return 0; // equal + + n = cmnRoot.firstChild; + while (n) { + if (n == childA) + return -1; // before + + if (n == childB) + return 1; // after + + n = n.nextSibling; + } + }; + + function _setEndPoint(st, n, o) { + var ec, sc; + + if (st) { + t[START_CONTAINER] = n; + t[START_OFFSET] = o; + } else { + t[END_CONTAINER] = n; + t[END_OFFSET] = o; + } + + // If one boundary-point of a Range is set to have a root container + // other than the current one for the Range, the Range is collapsed to + // the new position. This enforces the restriction that both boundary- + // points of a Range must have the same root container. + ec = t[END_CONTAINER]; + while (ec.parentNode) + ec = ec.parentNode; + + sc = t[START_CONTAINER]; + while (sc.parentNode) + sc = sc.parentNode; + + if (sc == ec) { + // The start position of a Range is guaranteed to never be after the + // end position. To enforce this restriction, if the start is set to + // be at a position after the end, the Range is collapsed to that + // position. + if (_compareBoundaryPoints(t[START_CONTAINER], t[START_OFFSET], t[END_CONTAINER], t[END_OFFSET]) > 0) + t.collapse(st); + } else + t.collapse(st); + + t.collapsed = _isCollapsed(); + t.commonAncestorContainer = dom.findCommonAncestor(t[START_CONTAINER], t[END_CONTAINER]); + }; + + function _traverse(how) { + var c, endContainerDepth = 0, startContainerDepth = 0, p, depthDiff, startNode, endNode, sp, ep; + + if (t[START_CONTAINER] == t[END_CONTAINER]) + return _traverseSameContainer(how); + + for (c = t[END_CONTAINER], p = c.parentNode; p; c = p, p = p.parentNode) { + if (p == t[START_CONTAINER]) + return _traverseCommonStartContainer(c, how); + + ++endContainerDepth; + } + + for (c = t[START_CONTAINER], p = c.parentNode; p; c = p, p = p.parentNode) { + if (p == t[END_CONTAINER]) + return _traverseCommonEndContainer(c, how); + + ++startContainerDepth; + } + + depthDiff = startContainerDepth - endContainerDepth; + + startNode = t[START_CONTAINER]; + while (depthDiff > 0) { + startNode = startNode.parentNode; + depthDiff--; + } + + endNode = t[END_CONTAINER]; + while (depthDiff < 0) { + endNode = endNode.parentNode; + depthDiff++; + } + + // ascend the ancestor hierarchy until we have a common parent. + for (sp = startNode.parentNode, ep = endNode.parentNode; sp != ep; sp = sp.parentNode, ep = ep.parentNode) { + startNode = sp; + endNode = ep; + } + + return _traverseCommonAncestors(startNode, endNode, how); + }; + + function _traverseSameContainer(how) { + var frag, s, sub, n, cnt, sibling, xferNode; + + if (how != DELETE) + frag = doc.createDocumentFragment(); + + // If selection is empty, just return the fragment + if (t[START_OFFSET] == t[END_OFFSET]) + return frag; + + // Text node needs special case handling + if (t[START_CONTAINER].nodeType == 3 /* TEXT_NODE */) { + // get the substring + s = t[START_CONTAINER].nodeValue; + sub = s.substring(t[START_OFFSET], t[END_OFFSET]); + + // set the original text node to its new value + if (how != CLONE) { + t[START_CONTAINER].deleteData(t[START_OFFSET], t[END_OFFSET] - t[START_OFFSET]); + + // Nothing is partially selected, so collapse to start point + t.collapse(TRUE); + } + + if (how == DELETE) + return; + + frag.appendChild(doc.createTextNode(sub)); + return frag; + } + + // Copy nodes between the start/end offsets. + n = _getSelectedNode(t[START_CONTAINER], t[START_OFFSET]); + cnt = t[END_OFFSET] - t[START_OFFSET]; + + while (cnt > 0) { + sibling = n.nextSibling; + xferNode = _traverseFullySelected(n, how); + + if (frag) + frag.appendChild( xferNode ); + + --cnt; + n = sibling; + } + + // Nothing is partially selected, so collapse to start point + if (how != CLONE) + t.collapse(TRUE); + + return frag; + }; + + function _traverseCommonStartContainer(endAncestor, how) { + var frag, n, endIdx, cnt, sibling, xferNode; + + if (how != DELETE) + frag = doc.createDocumentFragment(); + + n = _traverseRightBoundary(endAncestor, how); + + if (frag) + frag.appendChild(n); + + endIdx = nodeIndex(endAncestor); + cnt = endIdx - t[START_OFFSET]; + + if (cnt <= 0) { + // Collapse to just before the endAncestor, which + // is partially selected. + if (how != CLONE) { + t.setEndBefore(endAncestor); + t.collapse(FALSE); + } + + return frag; + } + + n = endAncestor.previousSibling; + while (cnt > 0) { + sibling = n.previousSibling; + xferNode = _traverseFullySelected(n, how); + + if (frag) + frag.insertBefore(xferNode, frag.firstChild); + + --cnt; + n = sibling; + } + + // Collapse to just before the endAncestor, which + // is partially selected. + if (how != CLONE) { + t.setEndBefore(endAncestor); + t.collapse(FALSE); + } + + return frag; + }; + + function _traverseCommonEndContainer(startAncestor, how) { + var frag, startIdx, n, cnt, sibling, xferNode; + + if (how != DELETE) + frag = doc.createDocumentFragment(); + + n = _traverseLeftBoundary(startAncestor, how); + if (frag) + frag.appendChild(n); + + startIdx = nodeIndex(startAncestor); + ++startIdx; // Because we already traversed it + + cnt = t[END_OFFSET] - startIdx; + n = startAncestor.nextSibling; + while (cnt > 0) { + sibling = n.nextSibling; + xferNode = _traverseFullySelected(n, how); + + if (frag) + frag.appendChild(xferNode); + + --cnt; + n = sibling; + } + + if (how != CLONE) { + t.setStartAfter(startAncestor); + t.collapse(TRUE); + } + + return frag; + }; + + function _traverseCommonAncestors(startAncestor, endAncestor, how) { + var n, frag, commonParent, startOffset, endOffset, cnt, sibling, nextSibling; + + if (how != DELETE) + frag = doc.createDocumentFragment(); + + n = _traverseLeftBoundary(startAncestor, how); + if (frag) + frag.appendChild(n); + + commonParent = startAncestor.parentNode; + startOffset = nodeIndex(startAncestor); + endOffset = nodeIndex(endAncestor); + ++startOffset; + + cnt = endOffset - startOffset; + sibling = startAncestor.nextSibling; + + while (cnt > 0) { + nextSibling = sibling.nextSibling; + n = _traverseFullySelected(sibling, how); + + if (frag) + frag.appendChild(n); + + sibling = nextSibling; + --cnt; + } + + n = _traverseRightBoundary(endAncestor, how); + + if (frag) + frag.appendChild(n); + + if (how != CLONE) { + t.setStartAfter(startAncestor); + t.collapse(TRUE); + } + + return frag; + }; + + function _traverseRightBoundary(root, how) { + var next = _getSelectedNode(t[END_CONTAINER], t[END_OFFSET] - 1), parent, clonedParent, prevSibling, clonedChild, clonedGrandParent, isFullySelected = next != t[END_CONTAINER]; + + if (next == root) + return _traverseNode(next, isFullySelected, FALSE, how); + + parent = next.parentNode; + clonedParent = _traverseNode(parent, FALSE, FALSE, how); + + while (parent) { + while (next) { + prevSibling = next.previousSibling; + clonedChild = _traverseNode(next, isFullySelected, FALSE, how); + + if (how != DELETE) + clonedParent.insertBefore(clonedChild, clonedParent.firstChild); + + isFullySelected = TRUE; + next = prevSibling; + } + + if (parent == root) + return clonedParent; + + next = parent.previousSibling; + parent = parent.parentNode; + + clonedGrandParent = _traverseNode(parent, FALSE, FALSE, how); + + if (how != DELETE) + clonedGrandParent.appendChild(clonedParent); + + clonedParent = clonedGrandParent; + } + }; + + function _traverseLeftBoundary(root, how) { + var next = _getSelectedNode(t[START_CONTAINER], t[START_OFFSET]), isFullySelected = next != t[START_CONTAINER], parent, clonedParent, nextSibling, clonedChild, clonedGrandParent; + + if (next == root) + return _traverseNode(next, isFullySelected, TRUE, how); + + parent = next.parentNode; + clonedParent = _traverseNode(parent, FALSE, TRUE, how); + + while (parent) { + while (next) { + nextSibling = next.nextSibling; + clonedChild = _traverseNode(next, isFullySelected, TRUE, how); + + if (how != DELETE) + clonedParent.appendChild(clonedChild); + + isFullySelected = TRUE; + next = nextSibling; + } + + if (parent == root) + return clonedParent; + + next = parent.nextSibling; + parent = parent.parentNode; + + clonedGrandParent = _traverseNode(parent, FALSE, TRUE, how); + + if (how != DELETE) + clonedGrandParent.appendChild(clonedParent); + + clonedParent = clonedGrandParent; + } + }; + + function _traverseNode(n, isFullySelected, isLeft, how) { + var txtValue, newNodeValue, oldNodeValue, offset, newNode; + + if (isFullySelected) + return _traverseFullySelected(n, how); + + if (n.nodeType == 3 /* TEXT_NODE */) { + txtValue = n.nodeValue; + + if (isLeft) { + offset = t[START_OFFSET]; + newNodeValue = txtValue.substring(offset); + oldNodeValue = txtValue.substring(0, offset); + } else { + offset = t[END_OFFSET]; + newNodeValue = txtValue.substring(0, offset); + oldNodeValue = txtValue.substring(offset); + } + + if (how != CLONE) + n.nodeValue = oldNodeValue; + + if (how == DELETE) + return; + + newNode = n.cloneNode(FALSE); + newNode.nodeValue = newNodeValue; + + return newNode; + } + + if (how == DELETE) + return; + + return n.cloneNode(FALSE); + }; + + function _traverseFullySelected(n, how) { + if (how != DELETE) + return how == CLONE ? n.cloneNode(TRUE) : n; + + n.parentNode.removeChild(n); + }; + }; + + ns.Range = Range; +})(tinymce.dom); + +(function() { + function Selection(selection) { + var t = this, invisibleChar = '\uFEFF', range, lastIERng, dom = selection.dom, TRUE = true, FALSE = false; + + // Returns a W3C DOM compatible range object by using the IE Range API + function getRange() { + var ieRange = selection.getRng(), domRange = dom.createRng(), element, collapsed; + + // If selection is outside the current document just return an empty range + element = ieRange.item ? ieRange.item(0) : ieRange.parentElement(); + if (element.ownerDocument != dom.doc) + return domRange; + + collapsed = selection.isCollapsed(); + + // Handle control selection or text selection of a image + if (ieRange.item || !element.hasChildNodes()) { + if (collapsed) { + domRange.setStart(element, 0); + domRange.setEnd(element, 0); + } else { + domRange.setStart(element.parentNode, dom.nodeIndex(element)); + domRange.setEnd(domRange.startContainer, domRange.startOffset + 1); + } + + return domRange; + } + + function findEndPoint(start) { + var marker, container, offset, nodes, startIndex = 0, endIndex, index, parent, checkRng, position; + + // Setup temp range and collapse it + checkRng = ieRange.duplicate(); + checkRng.collapse(start); + + // Create marker and insert it at the end of the endpoints parent + marker = dom.create('a'); + parent = checkRng.parentElement(); + + // If parent doesn't have any children then set the container to that parent and the index to 0 + if (!parent.hasChildNodes()) { + domRange[start ? 'setStart' : 'setEnd'](parent, 0); + return; + } + + parent.appendChild(marker); + checkRng.moveToElementText(marker); + position = ieRange.compareEndPoints(start ? 'StartToStart' : 'EndToEnd', checkRng); + if (position > 0) { + // The position is after the end of the parent element. + // This is the case where IE puts the caret to the left edge of a table. + domRange[start ? 'setStartAfter' : 'setEndAfter'](parent); + dom.remove(marker); + return; + } + + // Setup node list and endIndex + nodes = tinymce.grep(parent.childNodes); + endIndex = nodes.length - 1; + // Perform a binary search for the position + while (startIndex <= endIndex) { + index = Math.floor((startIndex + endIndex) / 2); + + // Insert marker and check it's position relative to the selection + parent.insertBefore(marker, nodes[index]); + checkRng.moveToElementText(marker); + position = ieRange.compareEndPoints(start ? 'StartToStart' : 'EndToEnd', checkRng); + if (position > 0) { + // Marker is to the right + startIndex = index + 1; + } else if (position < 0) { + // Marker is to the left + endIndex = index - 1; + } else { + // Maker is where we are + found = true; + break; + } + } + + // Setup container + container = position > 0 || index == 0 ? marker.nextSibling : marker.previousSibling; + + // Handle element selection + if (container.nodeType == 1) { + dom.remove(marker); + + // Find offset and container + offset = dom.nodeIndex(container); + container = container.parentNode; + + // Move the offset if we are setting the end or the position is after an element + if (!start || index > 0) + offset++; + } else { + // Calculate offset within text node + if (position > 0 || index == 0) { + checkRng.setEndPoint(start ? 'StartToStart' : 'EndToEnd', ieRange); + offset = checkRng.text.length; + } else { + checkRng.setEndPoint(start ? 'StartToStart' : 'EndToEnd', ieRange); + offset = container.nodeValue.length - checkRng.text.length; + } + + dom.remove(marker); + } + + domRange[start ? 'setStart' : 'setEnd'](container, offset); + }; + + // Find start point + findEndPoint(true); + + // Find end point if needed + if (!collapsed) + findEndPoint(); + + return domRange; + }; + + this.addRange = function(rng) { + var ieRng, ctrlRng, startContainer, startOffset, endContainer, endOffset, doc = selection.dom.doc, body = doc.body; + + function setEndPoint(start) { + var container, offset, marker, tmpRng, nodes; + + marker = dom.create('a'); + container = start ? startContainer : endContainer; + offset = start ? startOffset : endOffset; + tmpRng = ieRng.duplicate(); + + if (container == doc || container == doc.documentElement) { + container = body; + offset = 0; + } + + if (container.nodeType == 3) { + container.parentNode.insertBefore(marker, container); + tmpRng.moveToElementText(marker); + tmpRng.moveStart('character', offset); + dom.remove(marker); + ieRng.setEndPoint(start ? 'StartToStart' : 'EndToEnd', tmpRng); + } else { + nodes = container.childNodes; + + if (nodes.length) { + if (offset >= nodes.length) { + dom.insertAfter(marker, nodes[nodes.length - 1]); + } else { + container.insertBefore(marker, nodes[offset]); + } + + tmpRng.moveToElementText(marker); + } else { + // Empty node selection for example
    |
    + marker = doc.createTextNode(invisibleChar); + container.appendChild(marker); + tmpRng.moveToElementText(marker.parentNode); + tmpRng.collapse(TRUE); + } + + ieRng.setEndPoint(start ? 'StartToStart' : 'EndToEnd', tmpRng); + dom.remove(marker); + } + } + + // Destroy cached range + this.destroy(); + + // Setup some shorter versions + startContainer = rng.startContainer; + startOffset = rng.startOffset; + endContainer = rng.endContainer; + endOffset = rng.endOffset; + ieRng = body.createTextRange(); + + // If single element selection then try making a control selection out of it + if (startContainer == endContainer && startContainer.nodeType == 1 && startOffset == endOffset - 1) { + if (startOffset == endOffset - 1) { + try { + ctrlRng = body.createControlRange(); + ctrlRng.addElement(startContainer.childNodes[startOffset]); + ctrlRng.select(); + return; + } catch (ex) { + // Ignore + } + } + } + + // Set start/end point of selection + setEndPoint(true); + setEndPoint(); + + // Select the new range and scroll it into view + ieRng.select(); + }; + + this.getRangeAt = function() { + // Setup new range if the cache is empty + if (!range || !tinymce.dom.RangeUtils.compareRanges(lastIERng, selection.getRng())) { + range = getRange(); + + // Store away text range for next call + lastIERng = selection.getRng(); + } + + // IE will say that the range is equal then produce an invalid argument exception + // if you perform specific operations in a keyup event. For example Ctrl+Del. + // This hack will invalidate the range cache if the exception occurs + try { + range.startContainer.nextSibling; + } catch (ex) { + range = getRange(); + lastIERng = null; + } + + // Return cached range + return range; + }; + + this.destroy = function() { + // Destroy cached range and last IE range to avoid memory leaks + lastIERng = range = null; + }; + }; + + // Expose the selection object + tinymce.dom.TridentSelection = Selection; +})(); + + +(function(tinymce) { + // Shorten names + var each = tinymce.each, DOM = tinymce.DOM, isIE = tinymce.isIE, isWebKit = tinymce.isWebKit, Event; + + tinymce.create('tinymce.dom.EventUtils', { + EventUtils : function() { + this.inits = []; + this.events = []; + }, + + add : function(o, n, f, s) { + var cb, t = this, el = t.events, r; + + if (n instanceof Array) { + r = []; + + each(n, function(n) { + r.push(t.add(o, n, f, s)); + }); + + return r; + } + + // Handle array + if (o && o.hasOwnProperty && o instanceof Array) { + r = []; + + each(o, function(o) { + o = DOM.get(o); + r.push(t.add(o, n, f, s)); + }); + + return r; + } + + o = DOM.get(o); + + if (!o) + return; + + // Setup event callback + cb = function(e) { + // Is all events disabled + if (t.disabled) + return; + + e = e || window.event; + + // Patch in target, preventDefault and stopPropagation in IE it's W3C valid + if (e && isIE) { + if (!e.target) + e.target = e.srcElement; + + // Patch in preventDefault, stopPropagation methods for W3C compatibility + tinymce.extend(e, t._stoppers); + } + + if (!s) + return f(e); + + return f.call(s, e); + }; + + if (n == 'unload') { + tinymce.unloads.unshift({func : cb}); + return cb; + } + + if (n == 'init') { + if (t.domLoaded) + cb(); + else + t.inits.push(cb); + + return cb; + } + + // Store away listener reference + el.push({ + obj : o, + name : n, + func : f, + cfunc : cb, + scope : s + }); + + t._add(o, n, cb); + + return f; + }, + + remove : function(o, n, f) { + var t = this, a = t.events, s = false, r; + + // Handle array + if (o && o.hasOwnProperty && o instanceof Array) { + r = []; + + each(o, function(o) { + o = DOM.get(o); + r.push(t.remove(o, n, f)); + }); + + return r; + } + + o = DOM.get(o); + + each(a, function(e, i) { + if (e.obj == o && e.name == n && (!f || (e.func == f || e.cfunc == f))) { + a.splice(i, 1); + t._remove(o, n, e.cfunc); + s = true; + return false; + } + }); + + return s; + }, + + clear : function(o) { + var t = this, a = t.events, i, e; + + if (o) { + o = DOM.get(o); + + for (i = a.length - 1; i >= 0; i--) { + e = a[i]; + + if (e.obj === o) { + t._remove(e.obj, e.name, e.cfunc); + e.obj = e.cfunc = null; + a.splice(i, 1); + } + } + } + }, + + cancel : function(e) { + if (!e) + return false; + + this.stop(e); + + return this.prevent(e); + }, + + stop : function(e) { + if (e.stopPropagation) + e.stopPropagation(); + else + e.cancelBubble = true; + + return false; + }, + + prevent : function(e) { + if (e.preventDefault) + e.preventDefault(); + else + e.returnValue = false; + + return false; + }, + + destroy : function() { + var t = this; + + each(t.events, function(e, i) { + t._remove(e.obj, e.name, e.cfunc); + e.obj = e.cfunc = null; + }); + + t.events = []; + t = null; + }, + + _add : function(o, n, f) { + if (o.attachEvent) + o.attachEvent('on' + n, f); + else if (o.addEventListener) + o.addEventListener(n, f, false); + else + o['on' + n] = f; + }, + + _remove : function(o, n, f) { + if (o) { + try { + if (o.detachEvent) + o.detachEvent('on' + n, f); + else if (o.removeEventListener) + o.removeEventListener(n, f, false); + else + o['on' + n] = null; + } catch (ex) { + // Might fail with permission denined on IE so we just ignore that + } + } + }, + + _pageInit : function(win) { + var t = this; + + // Keep it from running more than once + if (t.domLoaded) + return; + + t.domLoaded = true; + + each(t.inits, function(c) { + c(); + }); + + t.inits = []; + }, + + _wait : function(win) { + var t = this, doc = win.document; + + // No need since the document is already loaded + if (win.tinyMCE_GZ && tinyMCE_GZ.loaded) { + t.domLoaded = 1; + return; + } + + // Use IE method + if (doc.attachEvent) { + doc.attachEvent("onreadystatechange", function() { + if (doc.readyState === "complete") { + doc.detachEvent("onreadystatechange", arguments.callee); + t._pageInit(win); + } + }); + + if (doc.documentElement.doScroll && win == win.top) { + (function() { + if (t.domLoaded) + return; + + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + doc.documentElement.doScroll("left"); + } catch (ex) { + setTimeout(arguments.callee, 0); + return; + } + + t._pageInit(win); + })(); + } + } else if (doc.addEventListener) { + t._add(win, 'DOMContentLoaded', function() { + t._pageInit(win); + }); + } + + t._add(win, 'load', function() { + t._pageInit(win); + }); + }, + + _stoppers : { + preventDefault : function() { + this.returnValue = false; + }, + + stopPropagation : function() { + this.cancelBubble = true; + } + } + }); + + Event = tinymce.dom.Event = new tinymce.dom.EventUtils(); + + // Dispatch DOM content loaded event for IE and Safari + Event._wait(window); + + tinymce.addUnload(function() { + Event.destroy(); + }); +})(tinymce); + +(function(tinymce) { + tinymce.dom.Element = function(id, settings) { + var t = this, dom, el; + + t.settings = settings = settings || {}; + t.id = id; + t.dom = dom = settings.dom || tinymce.DOM; + + // Only IE leaks DOM references, this is a lot faster + if (!tinymce.isIE) + el = dom.get(t.id); + + tinymce.each( + ('getPos,getRect,getParent,add,setStyle,getStyle,setStyles,' + + 'setAttrib,setAttribs,getAttrib,addClass,removeClass,' + + 'hasClass,getOuterHTML,setOuterHTML,remove,show,hide,' + + 'isHidden,setHTML,get').split(/,/) + , function(k) { + t[k] = function() { + var a = [id], i; + + for (i = 0; i < arguments.length; i++) + a.push(arguments[i]); + + a = dom[k].apply(dom, a); + t.update(k); + + return a; + }; + }); + + tinymce.extend(t, { + on : function(n, f, s) { + return tinymce.dom.Event.add(t.id, n, f, s); + }, + + getXY : function() { + return { + x : parseInt(t.getStyle('left')), + y : parseInt(t.getStyle('top')) + }; + }, + + getSize : function() { + var n = dom.get(t.id); + + return { + w : parseInt(t.getStyle('width') || n.clientWidth), + h : parseInt(t.getStyle('height') || n.clientHeight) + }; + }, + + moveTo : function(x, y) { + t.setStyles({left : x, top : y}); + }, + + moveBy : function(x, y) { + var p = t.getXY(); + + t.moveTo(p.x + x, p.y + y); + }, + + resizeTo : function(w, h) { + t.setStyles({width : w, height : h}); + }, + + resizeBy : function(w, h) { + var s = t.getSize(); + + t.resizeTo(s.w + w, s.h + h); + }, + + update : function(k) { + var b; + + if (tinymce.isIE6 && settings.blocker) { + k = k || ''; + + // Ignore getters + if (k.indexOf('get') === 0 || k.indexOf('has') === 0 || k.indexOf('is') === 0) + return; + + // Remove blocker on remove + if (k == 'remove') { + dom.remove(t.blocker); + return; + } + + if (!t.blocker) { + t.blocker = dom.uniqueId(); + b = dom.add(settings.container || dom.getRoot(), 'iframe', {id : t.blocker, style : 'position:absolute;', frameBorder : 0, src : 'javascript:""'}); + dom.setStyle(b, 'opacity', 0); + } else + b = dom.get(t.blocker); + + dom.setStyles(b, { + left : t.getStyle('left', 1), + top : t.getStyle('top', 1), + width : t.getStyle('width', 1), + height : t.getStyle('height', 1), + display : t.getStyle('display', 1), + zIndex : parseInt(t.getStyle('zIndex', 1) || 0) - 1 + }); + } + } + }); + }; +})(tinymce); + +(function(tinymce) { + function trimNl(s) { + return s.replace(/[\n\r]+/g, ''); + }; + + // Shorten names + var is = tinymce.is, isIE = tinymce.isIE, each = tinymce.each; + + tinymce.create('tinymce.dom.Selection', { + Selection : function(dom, win, serializer) { + var t = this; + + t.dom = dom; + t.win = win; + t.serializer = serializer; + + // Add events + each([ + 'onBeforeSetContent', + + 'onBeforeGetContent', + + 'onSetContent', + + 'onGetContent' + ], function(e) { + t[e] = new tinymce.util.Dispatcher(t); + }); + + // No W3C Range support + if (!t.win.getSelection) + t.tridentSel = new tinymce.dom.TridentSelection(t); + + if (tinymce.isIE && dom.boxModel) + this._fixIESelection(); + + // Prevent leaks + tinymce.addUnload(t.destroy, t); + }, + + getContent : function(s) { + var t = this, r = t.getRng(), e = t.dom.create("body"), se = t.getSel(), wb, wa, n; + + s = s || {}; + wb = wa = ''; + s.get = true; + s.format = s.format || 'html'; + t.onBeforeGetContent.dispatch(t, s); + + if (s.format == 'text') + return t.isCollapsed() ? '' : (r.text || (se.toString ? se.toString() : '')); + + if (r.cloneContents) { + n = r.cloneContents(); + + if (n) + e.appendChild(n); + } else if (is(r.item) || is(r.htmlText)) + e.innerHTML = r.item ? r.item(0).outerHTML : r.htmlText; + else + e.innerHTML = r.toString(); + + // Keep whitespace before and after + if (/^\s/.test(e.innerHTML)) + wb = ' '; + + if (/\s+$/.test(e.innerHTML)) + wa = ' '; + + s.getInner = true; + + s.content = t.isCollapsed() ? '' : wb + t.serializer.serialize(e, s) + wa; + t.onGetContent.dispatch(t, s); + + return s.content; + }, + + setContent : function(content, args) { + var self = this, rng = self.getRng(), caretNode, doc = self.win.document, frag, temp; + + args = args || {format : 'html'}; + args.set = true; + content = args.content = content; + + // Dispatch before set content event + if (!args.no_events) + self.onBeforeSetContent.dispatch(self, args); + + content = args.content; + + if (rng.insertNode) { + // Make caret marker since insertNode places the caret in the beginning of text after insert + content += '_'; + + // Delete and insert new node + if (rng.startContainer == doc && rng.endContainer == doc) { + // WebKit will fail if the body is empty since the range is then invalid and it can't insert contents + doc.body.innerHTML = content; + } else { + rng.deleteContents(); + + if (doc.body.childNodes.length == 0) { + doc.body.innerHTML = content; + } else { + // createContextualFragment doesn't exists in IE 9 DOMRanges + if (rng.createContextualFragment) { + rng.insertNode(rng.createContextualFragment(content)); + } else { + // Fake createContextualFragment call in IE 9 + frag = doc.createDocumentFragment(); + temp = doc.createElement('div'); + + frag.appendChild(temp); + temp.outerHTML = content; + + rng.insertNode(frag); + } + } + } + + // Move to caret marker + caretNode = self.dom.get('__caret'); + + // Make sure we wrap it compleatly, Opera fails with a simple select call + rng = doc.createRange(); + rng.setStartBefore(caretNode); + rng.setEndBefore(caretNode); + self.setRng(rng); + + // Remove the caret position + self.dom.remove('__caret'); + self.setRng(rng); + } else { + if (rng.item) { + // Delete content and get caret text selection + doc.execCommand('Delete', false, null); + rng = self.getRng(); + } + + rng.pasteHTML(content); + } + + // Dispatch set content event + if (!args.no_events) + self.onSetContent.dispatch(self, args); + }, + + getStart : function() { + var rng = this.getRng(), startElement, parentElement, checkRng, node; + + if (rng.duplicate || rng.item) { + // Control selection, return first item + if (rng.item) + return rng.item(0); + + // Get start element + checkRng = rng.duplicate(); + checkRng.collapse(1); + startElement = checkRng.parentElement(); + + // Check if range parent is inside the start element, then return the inner parent element + // This will fix issues when a single element is selected, IE would otherwise return the wrong start element + parentElement = node = rng.parentElement(); + while (node = node.parentNode) { + if (node == startElement) { + startElement = parentElement; + break; + } + } + + return startElement; + } else { + startElement = rng.startContainer; + + if (startElement.nodeType == 1 && startElement.hasChildNodes()) + startElement = startElement.childNodes[Math.min(startElement.childNodes.length - 1, rng.startOffset)]; + + if (startElement && startElement.nodeType == 3) + return startElement.parentNode; + + return startElement; + } + }, + + getEnd : function() { + var t = this, r = t.getRng(), e, eo; + + if (r.duplicate || r.item) { + if (r.item) + return r.item(0); + + r = r.duplicate(); + r.collapse(0); + e = r.parentElement(); + + if (e && e.nodeName == 'BODY') + return e.lastChild || e; + + return e; + } else { + e = r.endContainer; + eo = r.endOffset; + + if (e.nodeType == 1 && e.hasChildNodes()) + e = e.childNodes[eo > 0 ? eo - 1 : eo]; + + if (e && e.nodeType == 3) + return e.parentNode; + + return e; + } + }, + + getBookmark : function(type, normalized) { + var t = this, dom = t.dom, rng, rng2, id, collapsed, name, element, index, chr = '\uFEFF', styles; + + function findIndex(name, element) { + var index = 0; + + each(dom.select(name), function(node, i) { + if (node == element) + index = i; + }); + + return index; + }; + + if (type == 2) { + function getLocation() { + var rng = t.getRng(true), root = dom.getRoot(), bookmark = {}; + + function getPoint(rng, start) { + var container = rng[start ? 'startContainer' : 'endContainer'], + offset = rng[start ? 'startOffset' : 'endOffset'], point = [], node, childNodes, after = 0; + + if (container.nodeType == 3) { + if (normalized) { + for (node = container.previousSibling; node && node.nodeType == 3; node = node.previousSibling) + offset += node.nodeValue.length; + } + + point.push(offset); + } else { + childNodes = container.childNodes; + + if (offset >= childNodes.length && childNodes.length) { + after = 1; + offset = Math.max(0, childNodes.length - 1); + } + + point.push(t.dom.nodeIndex(childNodes[offset], normalized) + after); + } + + for (; container && container != root; container = container.parentNode) + point.push(t.dom.nodeIndex(container, normalized)); + + return point; + }; + + bookmark.start = getPoint(rng, true); + + if (!t.isCollapsed()) + bookmark.end = getPoint(rng); + + return bookmark; + }; + + return getLocation(); + } + + // Handle simple range + if (type) + return {rng : t.getRng()}; + + rng = t.getRng(); + id = dom.uniqueId(); + collapsed = tinyMCE.activeEditor.selection.isCollapsed(); + styles = 'overflow:hidden;line-height:0px'; + + // Explorer method + if (rng.duplicate || rng.item) { + // Text selection + if (!rng.item) { + rng2 = rng.duplicate(); + + try { + // Insert start marker + rng.collapse(); + rng.pasteHTML('' + chr + ''); + + // Insert end marker + if (!collapsed) { + rng2.collapse(false); + + // Detect the empty space after block elements in IE and move the end back one character

    ] becomes

    ]

    + rng.moveToElementText(rng2.parentElement()); + if (rng.compareEndPoints('StartToEnd', rng2) == 0) + rng2.move('character', -1); + + rng2.pasteHTML('' + chr + ''); + } + } catch (ex) { + // IE might throw unspecified error so lets ignore it + return null; + } + } else { + // Control selection + element = rng.item(0); + name = element.nodeName; + + return {name : name, index : findIndex(name, element)}; + } + } else { + element = t.getNode(); + name = element.nodeName; + if (name == 'IMG') + return {name : name, index : findIndex(name, element)}; + + // W3C method + rng2 = rng.cloneRange(); + + // Insert end marker + if (!collapsed) { + rng2.collapse(false); + rng2.insertNode(dom.create('span', {'data-mce-type' : "bookmark", id : id + '_end', style : styles}, chr)); + } + + rng.collapse(true); + rng.insertNode(dom.create('span', {'data-mce-type' : "bookmark", id : id + '_start', style : styles}, chr)); + } + + t.moveToBookmark({id : id, keep : 1}); + + return {id : id}; + }, + + moveToBookmark : function(bookmark) { + var t = this, dom = t.dom, marker1, marker2, rng, root, startContainer, endContainer, startOffset, endOffset; + + // Clear selection cache + if (t.tridentSel) + t.tridentSel.destroy(); + + if (bookmark) { + if (bookmark.start) { + rng = dom.createRng(); + root = dom.getRoot(); + + function setEndPoint(start) { + var point = bookmark[start ? 'start' : 'end'], i, node, offset, children; + + if (point) { + offset = point[0]; + + // Find container node + for (node = root, i = point.length - 1; i >= 1; i--) { + children = node.childNodes; + + if (point[i] > children.length - 1) + return; + + node = children[point[i]]; + } + + // Move text offset to best suitable location + if (node.nodeType === 3) + offset = Math.min(point[0], node.nodeValue.length); + + // Move element offset to best suitable location + if (node.nodeType === 1) + offset = Math.min(point[0], node.childNodes.length); + + // Set offset within container node + if (start) + rng.setStart(node, offset); + else + rng.setEnd(node, offset); + } + + return true; + }; + + if (setEndPoint(true) && setEndPoint()) { + t.setRng(rng); + } + } else if (bookmark.id) { + function restoreEndPoint(suffix) { + var marker = dom.get(bookmark.id + '_' + suffix), node, idx, next, prev, keep = bookmark.keep; + + if (marker) { + node = marker.parentNode; + + if (suffix == 'start') { + if (!keep) { + idx = dom.nodeIndex(marker); + } else { + node = marker.firstChild; + idx = 1; + } + + startContainer = endContainer = node; + startOffset = endOffset = idx; + } else { + if (!keep) { + idx = dom.nodeIndex(marker); + } else { + node = marker.firstChild; + idx = 1; + } + + endContainer = node; + endOffset = idx; + } + + if (!keep) { + prev = marker.previousSibling; + next = marker.nextSibling; + + // Remove all marker text nodes + each(tinymce.grep(marker.childNodes), function(node) { + if (node.nodeType == 3) + node.nodeValue = node.nodeValue.replace(/\uFEFF/g, ''); + }); + + // Remove marker but keep children if for example contents where inserted into the marker + // Also remove duplicated instances of the marker for example by a split operation or by WebKit auto split on paste feature + while (marker = dom.get(bookmark.id + '_' + suffix)) + dom.remove(marker, 1); + + // If siblings are text nodes then merge them unless it's Opera since it some how removes the node + // and we are sniffing since adding a lot of detection code for a browser with 3% of the market isn't worth the effort. Sorry, Opera but it's just a fact + if (prev && next && prev.nodeType == next.nodeType && prev.nodeType == 3 && !tinymce.isOpera) { + idx = prev.nodeValue.length; + prev.appendData(next.nodeValue); + dom.remove(next); + + if (suffix == 'start') { + startContainer = endContainer = prev; + startOffset = endOffset = idx; + } else { + endContainer = prev; + endOffset = idx; + } + } + } + } + }; + + function addBogus(node) { + // Adds a bogus BR element for empty block elements or just a space on IE since it renders BR elements incorrectly + if (dom.isBlock(node) && !node.innerHTML) + node.innerHTML = !isIE ? '
    ' : ' '; + + return node; + }; + + // Restore start/end points + restoreEndPoint('start'); + restoreEndPoint('end'); + + if (startContainer) { + rng = dom.createRng(); + rng.setStart(addBogus(startContainer), startOffset); + rng.setEnd(addBogus(endContainer), endOffset); + t.setRng(rng); + } + } else if (bookmark.name) { + t.select(dom.select(bookmark.name)[bookmark.index]); + } else if (bookmark.rng) + t.setRng(bookmark.rng); + } + }, + + select : function(node, content) { + var t = this, dom = t.dom, rng = dom.createRng(), idx; + + if (node) { + idx = dom.nodeIndex(node); + rng.setStart(node.parentNode, idx); + rng.setEnd(node.parentNode, idx + 1); + + // Find first/last text node or BR element + if (content) { + function setPoint(node, start) { + var walker = new tinymce.dom.TreeWalker(node, node); + + do { + // Text node + if (node.nodeType == 3 && tinymce.trim(node.nodeValue).length != 0) { + if (start) + rng.setStart(node, 0); + else + rng.setEnd(node, node.nodeValue.length); + + return; + } + + // BR element + if (node.nodeName == 'BR') { + if (start) + rng.setStartBefore(node); + else + rng.setEndBefore(node); + + return; + } + } while (node = (start ? walker.next() : walker.prev())); + }; + + setPoint(node, 1); + setPoint(node); + } + + t.setRng(rng); + } + + return node; + }, + + isCollapsed : function() { + var t = this, r = t.getRng(), s = t.getSel(); + + if (!r || r.item) + return false; + + if (r.compareEndPoints) + return r.compareEndPoints('StartToEnd', r) === 0; + + return !s || r.collapsed; + }, + + collapse : function(to_start) { + var self = this, rng = self.getRng(), node; + + // Control range on IE + if (rng.item) { + node = rng.item(0); + rng = self.win.document.body.createTextRange(); + rng.moveToElementText(node); + } + + rng.collapse(!!to_start); + self.setRng(rng); + }, + + getSel : function() { + var t = this, w = this.win; + + return w.getSelection ? w.getSelection() : w.document.selection; + }, + + getRng : function(w3c) { + var t = this, s, r, elm, doc = t.win.document; + + // Found tridentSel object then we need to use that one + if (w3c && t.tridentSel) + return t.tridentSel.getRangeAt(0); + + try { + if (s = t.getSel()) + r = s.rangeCount > 0 ? s.getRangeAt(0) : (s.createRange ? s.createRange() : doc.createRange()); + } catch (ex) { + // IE throws unspecified error here if TinyMCE is placed in a frame/iframe + } + + // We have W3C ranges and it's IE then fake control selection since IE9 doesn't handle that correctly yet + if (tinymce.isIE && r && r.setStart && doc.selection.createRange().item) { + elm = doc.selection.createRange().item(0); + r = doc.createRange(); + r.setStartBefore(elm); + r.setEndAfter(elm); + } + + // No range found then create an empty one + // This can occur when the editor is placed in a hidden container element on Gecko + // Or on IE when there was an exception + if (!r) + r = doc.createRange ? doc.createRange() : doc.body.createTextRange(); + + if (t.selectedRange && t.explicitRange) { + if (r.compareBoundaryPoints(r.START_TO_START, t.selectedRange) === 0 && r.compareBoundaryPoints(r.END_TO_END, t.selectedRange) === 0) { + // Safari, Opera and Chrome only ever select text which causes the range to change. + // This lets us use the originally set range if the selection hasn't been changed by the user. + r = t.explicitRange; + } else { + t.selectedRange = null; + t.explicitRange = null; + } + } + + return r; + }, + + setRng : function(r) { + var s, t = this; + + if (!t.tridentSel) { + s = t.getSel(); + + if (s) { + t.explicitRange = r; + + try { + s.removeAllRanges(); + } catch (ex) { + // IE9 might throw errors here don't know why + } + + s.addRange(r); + t.selectedRange = s.getRangeAt(0); + } + } else { + // Is W3C Range + if (r.cloneRange) { + t.tridentSel.addRange(r); + return; + } + + // Is IE specific range + try { + r.select(); + } catch (ex) { + // Needed for some odd IE bug #1843306 + } + } + }, + + setNode : function(n) { + var t = this; + + t.setContent(t.dom.getOuterHTML(n)); + + return n; + }, + + getNode : function() { + var t = this, rng = t.getRng(), sel = t.getSel(), elm, start = rng.startContainer, end = rng.endContainer; + + // Range maybe lost after the editor is made visible again + if (!rng) + return t.dom.getRoot(); + + if (rng.setStart) { + elm = rng.commonAncestorContainer; + + // Handle selection a image or other control like element such as anchors + if (!rng.collapsed) { + if (rng.startContainer == rng.endContainer) { + if (rng.endOffset - rng.startOffset < 2) { + if (rng.startContainer.hasChildNodes()) + elm = rng.startContainer.childNodes[rng.startOffset]; + } + } + + // If the anchor node is a element instead of a text node then return this element + //if (tinymce.isWebKit && sel.anchorNode && sel.anchorNode.nodeType == 1) + // return sel.anchorNode.childNodes[sel.anchorOffset]; + + // Handle cases where the selection is immediately wrapped around a node and return that node instead of it's parent. + // This happens when you double click an underlined word in FireFox. + if (start.nodeType === 3 && end.nodeType === 3) { + function skipEmptyTextNodes(n, forwards) { + var orig = n; + while (n && n.nodeType === 3 && n.length === 0) { + n = forwards ? n.nextSibling : n.previousSibling; + } + return n || orig; + } + if (start.length === rng.startOffset) { + start = skipEmptyTextNodes(start.nextSibling, true); + } else { + start = start.parentNode; + } + if (rng.endOffset === 0) { + end = skipEmptyTextNodes(end.previousSibling, false); + } else { + end = end.parentNode; + } + + if (start && start === end) + return start; + } + } + + if (elm && elm.nodeType == 3) + return elm.parentNode; + + return elm; + } + + return rng.item ? rng.item(0) : rng.parentElement(); + }, + + getSelectedBlocks : function(st, en) { + var t = this, dom = t.dom, sb, eb, n, bl = []; + + sb = dom.getParent(st || t.getStart(), dom.isBlock); + eb = dom.getParent(en || t.getEnd(), dom.isBlock); + + if (sb) + bl.push(sb); + + if (sb && eb && sb != eb) { + n = sb; + + while ((n = n.nextSibling) && n != eb) { + if (dom.isBlock(n)) + bl.push(n); + } + } + + if (eb && sb != eb) + bl.push(eb); + + return bl; + }, + + destroy : function(s) { + var t = this; + + t.win = null; + + if (t.tridentSel) + t.tridentSel.destroy(); + + // Manual destroy then remove unload handler + if (!s) + tinymce.removeUnload(t.destroy); + }, + + // IE has an issue where you can't select/move the caret by clicking outside the body if the document is in standards mode + _fixIESelection : function() { + var dom = this.dom, doc = dom.doc, body = doc.body, started, startRng, htmlElm; + + // Make HTML element unselectable since we are going to handle selection by hand + doc.documentElement.unselectable = true; + + // Return range from point or null if it failed + function rngFromPoint(x, y) { + var rng = body.createTextRange(); + + try { + rng.moveToPoint(x, y); + } catch (ex) { + // IE sometimes throws and exception, so lets just ignore it + rng = null; + } + + return rng; + }; + + // Fires while the selection is changing + function selectionChange(e) { + var pointRng; + + // Check if the button is down or not + if (e.button) { + // Create range from mouse position + pointRng = rngFromPoint(e.x, e.y); + + if (pointRng) { + // Check if pointRange is before/after selection then change the endPoint + if (pointRng.compareEndPoints('StartToStart', startRng) > 0) + pointRng.setEndPoint('StartToStart', startRng); + else + pointRng.setEndPoint('EndToEnd', startRng); + + pointRng.select(); + } + } else + endSelection(); + } + + // Removes listeners + function endSelection() { + var rng = doc.selection.createRange(); + + // If the range is collapsed then use the last start range + if (startRng && !rng.item && rng.compareEndPoints('StartToEnd', rng) === 0) + startRng.select(); + + dom.unbind(doc, 'mouseup', endSelection); + dom.unbind(doc, 'mousemove', selectionChange); + startRng = started = 0; + }; + + // Detect when user selects outside BODY + dom.bind(doc, ['mousedown', 'contextmenu'], function(e) { + if (e.target.nodeName === 'HTML') { + if (started) + endSelection(); + + // Detect vertical scrollbar, since IE will fire a mousedown on the scrollbar and have target set as HTML + htmlElm = doc.documentElement; + if (htmlElm.scrollHeight > htmlElm.clientHeight) + return; + + started = 1; + // Setup start position + startRng = rngFromPoint(e.x, e.y); + if (startRng) { + // Listen for selection change events + dom.bind(doc, 'mouseup', endSelection); + dom.bind(doc, 'mousemove', selectionChange); + + dom.win.focus(); + startRng.select(); + } + } + }); + } + }); +})(tinymce); + +(function(tinymce) { + tinymce.dom.Serializer = function(settings, dom, schema) { + var onPreProcess, onPostProcess, isIE = tinymce.isIE, each = tinymce.each, htmlParser; + + // Support the old apply_source_formatting option + if (!settings.apply_source_formatting) + settings.indent = false; + + settings.remove_trailing_brs = true; + + // Default DOM and Schema if they are undefined + dom = dom || tinymce.DOM; + schema = schema || new tinymce.html.Schema(settings); + settings.entity_encoding = settings.entity_encoding || 'named'; + + onPreProcess = new tinymce.util.Dispatcher(self); + + onPostProcess = new tinymce.util.Dispatcher(self); + + htmlParser = new tinymce.html.DomParser(settings, schema); + + // Convert move data-mce-src, data-mce-href and data-mce-style into nodes or process them if needed + htmlParser.addAttributeFilter('src,href,style', function(nodes, name) { + var i = nodes.length, node, value, internalName = 'data-mce-' + name, urlConverter = settings.url_converter, urlConverterScope = settings.url_converter_scope, undef; + + while (i--) { + node = nodes[i]; + + value = node.attributes.map[internalName]; + if (value !== undef) { + // Set external name to internal value and remove internal + node.attr(name, value.length > 0 ? value : null); + node.attr(internalName, null); + } else { + // No internal attribute found then convert the value we have in the DOM + value = node.attributes.map[name]; + + if (name === "style") + value = dom.serializeStyle(dom.parseStyle(value), node.name); + else if (urlConverter) + value = urlConverter.call(urlConverterScope, value, name, node.name); + + node.attr(name, value.length > 0 ? value : null); + } + } + }); + + // Remove internal classes mceItem<..> + htmlParser.addAttributeFilter('class', function(nodes, name) { + var i = nodes.length, node, value; + + while (i--) { + node = nodes[i]; + value = node.attr('class').replace(/\s*mce(Item\w+|Selected)\s*/g, ''); + node.attr('class', value.length > 0 ? value : null); + } + }); + + // Remove bookmark elements + htmlParser.addAttributeFilter('data-mce-type', function(nodes, name, args) { + var i = nodes.length, node; + + while (i--) { + node = nodes[i]; + + if (node.attributes.map['data-mce-type'] === 'bookmark' && !args.cleanup) + node.remove(); + } + }); + + // Force script into CDATA sections and remove the mce- prefix also add comments around styles + htmlParser.addNodeFilter('script,style', function(nodes, name) { + var i = nodes.length, node, value; + + function trim(value) { + return value.replace(/()/g, '\n') + .replace(/^[\r\n]*|[\r\n]*$/g, '') + .replace(/^\s*(\/\/\s*|\]\]>|-->|\]\]-->)\s*$/g, ''); + }; + + while (i--) { + node = nodes[i]; + value = node.firstChild ? node.firstChild.value : ''; + + if (name === "script") { + // Remove mce- prefix from script elements + node.attr('type', (node.attr('type') || 'text/javascript').replace(/^mce\-/, '')); + + if (value.length > 0) + node.firstChild.value = '// '; + } else { + if (value.length > 0) + node.firstChild.value = ''; + } + } + }); + + // Convert comments to cdata and handle protected comments + htmlParser.addNodeFilter('#comment', function(nodes, name) { + var i = nodes.length, node; + + while (i--) { + node = nodes[i]; + + if (node.value.indexOf('[CDATA[') === 0) { + node.name = '#cdata'; + node.type = 4; + node.value = node.value.replace(/^\[CDATA\[|\]\]$/g, ''); + } else if (node.value.indexOf('mce:protected ') === 0) { + node.name = "#text"; + node.type = 3; + node.raw = true; + node.value = unescape(node.value).substr(14); + } + } + }); + + htmlParser.addNodeFilter('xml:namespace,input', function(nodes, name) { + var i = nodes.length, node; + + while (i--) { + node = nodes[i]; + if (node.type === 7) + node.remove(); + else if (node.type === 1) { + if (name === "input" && !("type" in node.attributes.map)) + node.attr('type', 'text'); + } + } + }); + + // Fix list elements, TODO: Replace this later + if (settings.fix_list_elements) { + htmlParser.addNodeFilter('ul,ol', function(nodes, name) { + var i = nodes.length, node, parentNode; + + while (i--) { + node = nodes[i]; + parentNode = node.parent; + + if (parentNode.name === 'ul' || parentNode.name === 'ol') { + if (node.prev && node.prev.name === 'li') { + node.prev.append(node); + } + } + } + }); + } + + // Remove internal data attributes + htmlParser.addAttributeFilter('data-mce-src,data-mce-href,data-mce-style', function(nodes, name) { + var i = nodes.length; + + while (i--) { + nodes[i].attr(name, null); + } + }); + + // Return public methods + return { + schema : schema, + + addNodeFilter : htmlParser.addNodeFilter, + + addAttributeFilter : htmlParser.addAttributeFilter, + + onPreProcess : onPreProcess, + + onPostProcess : onPostProcess, + + serialize : function(node, args) { + var impl, doc, oldDoc, htmlSerializer, content; + + // Explorer won't clone contents of script and style and the + // selected index of select elements are cleared on a clone operation. + if (isIE && dom.select('script,style,select').length > 0) { + content = node.innerHTML; + node = node.cloneNode(false); + dom.setHTML(node, content); + } else + node = node.cloneNode(true); + + // Nodes needs to be attached to something in WebKit/Opera + // Older builds of Opera crashes if you attach the node to an document created dynamically + // and since we can't feature detect a crash we need to sniff the acutal build number + // This fix will make DOM ranges and make Sizzle happy! + impl = node.ownerDocument.implementation; + if (impl.createHTMLDocument) { + // Create an empty HTML document + doc = impl.createHTMLDocument(""); + + // Add the element or it's children if it's a body element to the new document + each(node.nodeName == 'BODY' ? node.childNodes : [node], function(node) { + doc.body.appendChild(doc.importNode(node, true)); + }); + + // Grab first child or body element for serialization + if (node.nodeName != 'BODY') + node = doc.body.firstChild; + else + node = doc.body; + + // set the new document in DOMUtils so createElement etc works + oldDoc = dom.doc; + dom.doc = doc; + } + + args = args || {}; + args.format = args.format || 'html'; + + // Pre process + if (!args.no_events) { + args.node = node; + onPreProcess.dispatch(self, args); + } + + // Setup serializer + htmlSerializer = new tinymce.html.Serializer(settings, schema); + + // Parse and serialize HTML + args.content = htmlSerializer.serialize( + htmlParser.parse(args.getInner ? node.innerHTML : tinymce.trim(dom.getOuterHTML(node), args), args) + ); + + // Replace all BOM characters for now until we can find a better solution + if (!args.cleanup) + args.content = args.content.replace(/\uFEFF/g, ''); + + // Post process + if (!args.no_events) + onPostProcess.dispatch(self, args); + + // Restore the old document if it was changed + if (oldDoc) + dom.doc = oldDoc; + + args.node = null; + + return args.content; + }, + + addRules : function(rules) { + schema.addValidElements(rules); + }, + + setRules : function(rules) { + schema.setValidElements(rules); + } + }; + }; +})(tinymce); +(function(tinymce) { + tinymce.dom.ScriptLoader = function(settings) { + var QUEUED = 0, + LOADING = 1, + LOADED = 2, + states = {}, + queue = [], + scriptLoadedCallbacks = {}, + queueLoadedCallbacks = [], + loading = 0, + undefined; + + function loadScript(url, callback) { + var t = this, dom = tinymce.DOM, elm, uri, loc, id; + + // Execute callback when script is loaded + function done() { + dom.remove(id); + + if (elm) + elm.onreadystatechange = elm.onload = elm = null; + + callback(); + }; + + function error() { + // Report the error so it's easier for people to spot loading errors + if (typeof(console) !== "undefined" && console.log) + console.log("Failed to load: " + url); + + // We can't mark it as done if there is a load error since + // A) We don't want to produce 404 errors on the server and + // B) the onerror event won't fire on all browsers. + // done(); + }; + + id = dom.uniqueId(); + + if (tinymce.isIE6) { + uri = new tinymce.util.URI(url); + loc = location; + + // If script is from same domain and we + // use IE 6 then use XHR since it's more reliable + if (uri.host == loc.hostname && uri.port == loc.port && (uri.protocol + ':') == loc.protocol && uri.protocol.toLowerCase() != 'file') { + tinymce.util.XHR.send({ + url : tinymce._addVer(uri.getURI()), + success : function(content) { + // Create new temp script element + var script = dom.create('script', { + type : 'text/javascript' + }); + + // Evaluate script in global scope + script.text = content; + document.getElementsByTagName('head')[0].appendChild(script); + dom.remove(script); + + done(); + }, + + error : error + }); + + return; + } + } + + // Create new script element + elm = dom.create('script', { + id : id, + type : 'text/javascript', + src : tinymce._addVer(url) + }); + + // Add onload listener for non IE browsers since IE9 + // fires onload event before the script is parsed and executed + if (!tinymce.isIE) + elm.onload = done; + + // Add onerror event will get fired on some browsers but not all of them + elm.onerror = error; + + // Opera 9.60 doesn't seem to fire the onreadystate event at correctly + if (!tinymce.isOpera) { + elm.onreadystatechange = function() { + var state = elm.readyState; + + // Loaded state is passed on IE 6 however there + // are known issues with this method but we can't use + // XHR in a cross domain loading + if (state == 'complete' || state == 'loaded') + done(); + }; + } + + // Most browsers support this feature so we report errors + // for those at least to help users track their missing plugins etc + // todo: Removed since it produced error if the document is unloaded by navigating away, re-add it as an option + /*elm.onerror = function() { + alert('Failed to load: ' + url); + };*/ + + // Add script to document + (document.getElementsByTagName('head')[0] || document.body).appendChild(elm); + }; + + this.isDone = function(url) { + return states[url] == LOADED; + }; + + this.markDone = function(url) { + states[url] = LOADED; + }; + + this.add = this.load = function(url, callback, scope) { + var item, state = states[url]; + + // Add url to load queue + if (state == undefined) { + queue.push(url); + states[url] = QUEUED; + } + + if (callback) { + // Store away callback for later execution + if (!scriptLoadedCallbacks[url]) + scriptLoadedCallbacks[url] = []; + + scriptLoadedCallbacks[url].push({ + func : callback, + scope : scope || this + }); + } + }; + + this.loadQueue = function(callback, scope) { + this.loadScripts(queue, callback, scope); + }; + + this.loadScripts = function(scripts, callback, scope) { + var loadScripts; + + function execScriptLoadedCallbacks(url) { + // Execute URL callback functions + tinymce.each(scriptLoadedCallbacks[url], function(callback) { + callback.func.call(callback.scope); + }); + + scriptLoadedCallbacks[url] = undefined; + }; + + queueLoadedCallbacks.push({ + func : callback, + scope : scope || this + }); + + loadScripts = function() { + var loadingScripts = tinymce.grep(scripts); + + // Current scripts has been handled + scripts.length = 0; + + // Load scripts that needs to be loaded + tinymce.each(loadingScripts, function(url) { + // Script is already loaded then execute script callbacks directly + if (states[url] == LOADED) { + execScriptLoadedCallbacks(url); + return; + } + + // Is script not loading then start loading it + if (states[url] != LOADING) { + states[url] = LOADING; + loading++; + + loadScript(url, function() { + states[url] = LOADED; + loading--; + + execScriptLoadedCallbacks(url); + + // Load more scripts if they where added by the recently loaded script + loadScripts(); + }); + } + }); + + // No scripts are currently loading then execute all pending queue loaded callbacks + if (!loading) { + tinymce.each(queueLoadedCallbacks, function(callback) { + callback.func.call(callback.scope); + }); + + queueLoadedCallbacks.length = 0; + } + }; + + loadScripts(); + }; + }; + + // Global script loader + tinymce.ScriptLoader = new tinymce.dom.ScriptLoader(); +})(tinymce); + +tinymce.dom.TreeWalker = function(start_node, root_node) { + var node = start_node; + + function findSibling(node, start_name, sibling_name, shallow) { + var sibling, parent; + + if (node) { + // Walk into nodes if it has a start + if (!shallow && node[start_name]) + return node[start_name]; + + // Return the sibling if it has one + if (node != root_node) { + sibling = node[sibling_name]; + if (sibling) + return sibling; + + // Walk up the parents to look for siblings + for (parent = node.parentNode; parent && parent != root_node; parent = parent.parentNode) { + sibling = parent[sibling_name]; + if (sibling) + return sibling; + } + } + } + }; + + this.current = function() { + return node; + }; + + this.next = function(shallow) { + return (node = findSibling(node, 'firstChild', 'nextSibling', shallow)); + }; + + this.prev = function(shallow) { + return (node = findSibling(node, 'lastChild', 'previousSibling', shallow)); + }; +}; + +(function(tinymce) { + tinymce.dom.RangeUtils = function(dom) { + var INVISIBLE_CHAR = '\uFEFF'; + + this.walk = function(rng, callback) { + var startContainer = rng.startContainer, + startOffset = rng.startOffset, + endContainer = rng.endContainer, + endOffset = rng.endOffset, + ancestor, startPoint, + endPoint, node, parent, siblings, nodes; + + // Handle table cell selection the table plugin enables + // you to fake select table cells and perform formatting actions on them + nodes = dom.select('td.mceSelected,th.mceSelected'); + if (nodes.length > 0) { + tinymce.each(nodes, function(node) { + callback([node]); + }); + + return; + } + + function collectSiblings(node, name, end_node) { + var siblings = []; + + for (; node && node != end_node; node = node[name]) + siblings.push(node); + + return siblings; + }; + + function findEndPoint(node, root) { + do { + if (node.parentNode == root) + return node; + + node = node.parentNode; + } while(node); + }; + + function walkBoundary(start_node, end_node, next) { + var siblingName = next ? 'nextSibling' : 'previousSibling'; + + for (node = start_node, parent = node.parentNode; node && node != end_node; node = parent) { + parent = node.parentNode; + siblings = collectSiblings(node == start_node ? node : node[siblingName], siblingName); + + if (siblings.length) { + if (!next) + siblings.reverse(); + + callback(siblings); + } + } + }; + + // If index based start position then resolve it + if (startContainer.nodeType == 1 && startContainer.hasChildNodes()) + startContainer = startContainer.childNodes[startOffset]; + + // If index based end position then resolve it + if (endContainer.nodeType == 1 && endContainer.hasChildNodes()) + endContainer = endContainer.childNodes[Math.min(endOffset - 1, endContainer.childNodes.length - 1)]; + + // Find common ancestor and end points + ancestor = dom.findCommonAncestor(startContainer, endContainer); + + // Same container + if (startContainer == endContainer) + return callback([startContainer]); + + // Process left side + for (node = startContainer; node; node = node.parentNode) { + if (node == endContainer) + return walkBoundary(startContainer, ancestor, true); + + if (node == ancestor) + break; + } + + // Process right side + for (node = endContainer; node; node = node.parentNode) { + if (node == startContainer) + return walkBoundary(endContainer, ancestor); + + if (node == ancestor) + break; + } + + // Find start/end point + startPoint = findEndPoint(startContainer, ancestor) || startContainer; + endPoint = findEndPoint(endContainer, ancestor) || endContainer; + + // Walk left leaf + walkBoundary(startContainer, startPoint, true); + + // Walk the middle from start to end point + siblings = collectSiblings( + startPoint == startContainer ? startPoint : startPoint.nextSibling, + 'nextSibling', + endPoint == endContainer ? endPoint.nextSibling : endPoint + ); + + if (siblings.length) + callback(siblings); + + // Walk right leaf + walkBoundary(endContainer, endPoint); + }; + + /* this.split = function(rng) { + var startContainer = rng.startContainer, + startOffset = rng.startOffset, + endContainer = rng.endContainer, + endOffset = rng.endOffset; + + function splitText(node, offset) { + if (offset == node.nodeValue.length) + node.appendData(INVISIBLE_CHAR); + + node = node.splitText(offset); + + if (node.nodeValue === INVISIBLE_CHAR) + node.nodeValue = ''; + + return node; + }; + + // Handle single text node + if (startContainer == endContainer) { + if (startContainer.nodeType == 3) { + if (startOffset != 0) + startContainer = endContainer = splitText(startContainer, startOffset); + + if (endOffset - startOffset != startContainer.nodeValue.length) + splitText(startContainer, endOffset - startOffset); + } + } else { + // Split startContainer text node if needed + if (startContainer.nodeType == 3 && startOffset != 0) { + startContainer = splitText(startContainer, startOffset); + startOffset = 0; + } + + // Split endContainer text node if needed + if (endContainer.nodeType == 3 && endOffset != endContainer.nodeValue.length) { + endContainer = splitText(endContainer, endOffset).previousSibling; + endOffset = endContainer.nodeValue.length; + } + } + + return { + startContainer : startContainer, + startOffset : startOffset, + endContainer : endContainer, + endOffset : endOffset + }; + }; +*/ + }; + + tinymce.dom.RangeUtils.compareRanges = function(rng1, rng2) { + if (rng1 && rng2) { + // Compare native IE ranges + if (rng1.item || rng1.duplicate) { + // Both are control ranges and the selected element matches + if (rng1.item && rng2.item && rng1.item(0) === rng2.item(0)) + return true; + + // Both are text ranges and the range matches + if (rng1.isEqual && rng2.isEqual && rng2.isEqual(rng1)) + return true; + } else { + // Compare w3c ranges + return rng1.startContainer == rng2.startContainer && rng1.startOffset == rng2.startOffset; + } + } + + return false; + }; +})(tinymce); + +(function(tinymce) { + var Event = tinymce.dom.Event, each = tinymce.each; + + tinymce.create('tinymce.ui.KeyboardNavigation', { + KeyboardNavigation: function(settings, dom) { + var t = this, root = settings.root, items = settings.items, + enableUpDown = settings.enableUpDown, enableLeftRight = settings.enableLeftRight || !settings.enableUpDown, + excludeFromTabOrder = settings.excludeFromTabOrder, + itemFocussed, itemBlurred, rootKeydown, rootFocussed, focussedId; + + dom = dom || tinymce.DOM; + + itemFocussed = function(evt) { + focussedId = evt.target.id; + }; + + itemBlurred = function(evt) { + dom.setAttrib(evt.target.id, 'tabindex', '-1'); + }; + + rootFocussed = function(evt) { + var item = dom.get(focussedId); + dom.setAttrib(item, 'tabindex', '0'); + item.focus(); + }; + + t.focus = function() { + dom.get(focussedId).focus(); + }; + + t.destroy = function() { + each(items, function(item) { + dom.unbind(dom.get(item.id), 'focus', itemFocussed); + dom.unbind(dom.get(item.id), 'blur', itemBlurred); + }); + + dom.unbind(dom.get(root), 'focus', rootFocussed); + dom.unbind(dom.get(root), 'keydown', rootKeydown); + + items = dom = root = t.focus = itemFocussed = itemBlurred = rootKeydown = rootFocussed = null; + t.destroy = function() {}; + }; + + t.moveFocus = function(dir, evt) { + var idx = -1, controls = t.controls, newFocus; + + if (!focussedId) + return; + + each(items, function(item, index) { + if (item.id === focussedId) { + idx = index; + return false; + } + }); + + idx += dir; + if (idx < 0) { + idx = items.length - 1; + } else if (idx >= items.length) { + idx = 0; + } + + newFocus = items[idx]; + dom.setAttrib(focussedId, 'tabindex', '-1'); + dom.setAttrib(newFocus.id, 'tabindex', '0'); + dom.get(newFocus.id).focus(); + + if (settings.actOnFocus) { + settings.onAction(newFocus.id); + } + + if (evt) + Event.cancel(evt); + }; + + rootKeydown = function(evt) { + var DOM_VK_LEFT = 37, DOM_VK_RIGHT = 39, DOM_VK_UP = 38, DOM_VK_DOWN = 40, DOM_VK_ESCAPE = 27, DOM_VK_ENTER = 14, DOM_VK_RETURN = 13, DOM_VK_SPACE = 32; + + switch (evt.keyCode) { + case DOM_VK_LEFT: + if (enableLeftRight) t.moveFocus(-1); + break; + + case DOM_VK_RIGHT: + if (enableLeftRight) t.moveFocus(1); + break; + + case DOM_VK_UP: + if (enableUpDown) t.moveFocus(-1); + break; + + case DOM_VK_DOWN: + if (enableUpDown) t.moveFocus(1); + break; + + case DOM_VK_ESCAPE: + if (settings.onCancel) { + settings.onCancel(); + Event.cancel(evt); + } + break; + + case DOM_VK_ENTER: + case DOM_VK_RETURN: + case DOM_VK_SPACE: + if (settings.onAction) { + settings.onAction(focussedId); + Event.cancel(evt); + } + break; + } + }; + + // Set up state and listeners for each item. + each(items, function(item, idx) { + var tabindex; + + if (!item.id) { + item.id = dom.uniqueId('_mce_item_'); + } + + if (excludeFromTabOrder) { + dom.bind(item.id, 'blur', itemBlurred); + tabindex = '-1'; + } else { + tabindex = (idx === 0 ? '0' : '-1'); + } + + dom.setAttrib(item.id, 'tabindex', tabindex); + dom.bind(dom.get(item.id), 'focus', itemFocussed); + }); + + // Setup initial state for root element. + if (items[0]){ + focussedId = items[0].id; + } + + dom.setAttrib(root, 'tabindex', '-1'); + + // Setup listeners for root element. + dom.bind(dom.get(root), 'focus', rootFocussed); + dom.bind(dom.get(root), 'keydown', rootKeydown); + } + }); +})(tinymce); +(function(tinymce) { + // Shorten class names + var DOM = tinymce.DOM, is = tinymce.is; + + tinymce.create('tinymce.ui.Control', { + Control : function(id, s, editor) { + this.id = id; + this.settings = s = s || {}; + this.rendered = false; + this.onRender = new tinymce.util.Dispatcher(this); + this.classPrefix = ''; + this.scope = s.scope || this; + this.disabled = 0; + this.active = 0; + this.editor = editor; + }, + + setAriaProperty : function(property, value) { + var element = DOM.get(this.id + '_aria') || DOM.get(this.id); + if (element) { + DOM.setAttrib(element, 'aria-' + property, !!value); + } + }, + + focus : function() { + DOM.get(this.id).focus(); + }, + + setDisabled : function(s) { + if (s != this.disabled) { + this.setAriaProperty('disabled', s); + + this.setState('Disabled', s); + this.setState('Enabled', !s); + this.disabled = s; + } + }, + + isDisabled : function() { + return this.disabled; + }, + + setActive : function(s) { + if (s != this.active) { + this.setState('Active', s); + this.active = s; + this.setAriaProperty('pressed', s); + } + }, + + isActive : function() { + return this.active; + }, + + setState : function(c, s) { + var n = DOM.get(this.id); + + c = this.classPrefix + c; + + if (s) + DOM.addClass(n, c); + else + DOM.removeClass(n, c); + }, + + isRendered : function() { + return this.rendered; + }, + + renderHTML : function() { + }, + + renderTo : function(n) { + DOM.setHTML(n, this.renderHTML()); + }, + + postRender : function() { + var t = this, b; + + // Set pending states + if (is(t.disabled)) { + b = t.disabled; + t.disabled = -1; + t.setDisabled(b); + } + + if (is(t.active)) { + b = t.active; + t.active = -1; + t.setActive(b); + } + }, + + remove : function() { + DOM.remove(this.id); + this.destroy(); + }, + + destroy : function() { + tinymce.dom.Event.clear(this.id); + } + }); +})(tinymce); +tinymce.create('tinymce.ui.Container:tinymce.ui.Control', { + Container : function(id, s, editor) { + this.parent(id, s, editor); + + this.controls = []; + + this.lookup = {}; + }, + + add : function(c) { + this.lookup[c.id] = c; + this.controls.push(c); + + return c; + }, + + get : function(n) { + return this.lookup[n]; + } +}); + + +tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { + Separator : function(id, s) { + this.parent(id, s); + this.classPrefix = 'mceSeparator'; + this.setDisabled(true); + }, + + renderHTML : function() { + return tinymce.DOM.createHTML('span', {'class' : this.classPrefix, role : 'separator', 'aria-orientation' : 'vertical', tabindex : '-1'}); + } +}); + +(function(tinymce) { + var is = tinymce.is, DOM = tinymce.DOM, each = tinymce.each, walk = tinymce.walk; + + tinymce.create('tinymce.ui.MenuItem:tinymce.ui.Control', { + MenuItem : function(id, s) { + this.parent(id, s); + this.classPrefix = 'mceMenuItem'; + }, + + setSelected : function(s) { + this.setState('Selected', s); + this.setAriaProperty('checked', !!s); + this.selected = s; + }, + + isSelected : function() { + return this.selected; + }, + + postRender : function() { + var t = this; + + t.parent(); + + // Set pending state + if (is(t.selected)) + t.setSelected(t.selected); + } + }); +})(tinymce); + +(function(tinymce) { + var is = tinymce.is, DOM = tinymce.DOM, each = tinymce.each, walk = tinymce.walk; + + tinymce.create('tinymce.ui.Menu:tinymce.ui.MenuItem', { + Menu : function(id, s) { + var t = this; + + t.parent(id, s); + t.items = {}; + t.collapsed = false; + t.menuCount = 0; + t.onAddItem = new tinymce.util.Dispatcher(this); + }, + + expand : function(d) { + var t = this; + + if (d) { + walk(t, function(o) { + if (o.expand) + o.expand(); + }, 'items', t); + } + + t.collapsed = false; + }, + + collapse : function(d) { + var t = this; + + if (d) { + walk(t, function(o) { + if (o.collapse) + o.collapse(); + }, 'items', t); + } + + t.collapsed = true; + }, + + isCollapsed : function() { + return this.collapsed; + }, + + add : function(o) { + if (!o.settings) + o = new tinymce.ui.MenuItem(o.id || DOM.uniqueId(), o); + + this.onAddItem.dispatch(this, o); + + return this.items[o.id] = o; + }, + + addSeparator : function() { + return this.add({separator : true}); + }, + + addMenu : function(o) { + if (!o.collapse) + o = this.createMenu(o); + + this.menuCount++; + + return this.add(o); + }, + + hasMenus : function() { + return this.menuCount !== 0; + }, + + remove : function(o) { + delete this.items[o.id]; + }, + + removeAll : function() { + var t = this; + + walk(t, function(o) { + if (o.removeAll) + o.removeAll(); + else + o.remove(); + + o.destroy(); + }, 'items', t); + + t.items = {}; + }, + + createMenu : function(o) { + var m = new tinymce.ui.Menu(o.id || DOM.uniqueId(), o); + + m.onAddItem.add(this.onAddItem.dispatch, this.onAddItem); + + return m; + } + }); +})(tinymce); +(function(tinymce) { + var is = tinymce.is, DOM = tinymce.DOM, each = tinymce.each, Event = tinymce.dom.Event, Element = tinymce.dom.Element; + + tinymce.create('tinymce.ui.DropMenu:tinymce.ui.Menu', { + DropMenu : function(id, s) { + s = s || {}; + s.container = s.container || DOM.doc.body; + s.offset_x = s.offset_x || 0; + s.offset_y = s.offset_y || 0; + s.vp_offset_x = s.vp_offset_x || 0; + s.vp_offset_y = s.vp_offset_y || 0; + + if (is(s.icons) && !s.icons) + s['class'] += ' mceNoIcons'; + + this.parent(id, s); + this.onShowMenu = new tinymce.util.Dispatcher(this); + this.onHideMenu = new tinymce.util.Dispatcher(this); + this.classPrefix = 'mceMenu'; + }, + + createMenu : function(s) { + var t = this, cs = t.settings, m; + + s.container = s.container || cs.container; + s.parent = t; + s.constrain = s.constrain || cs.constrain; + s['class'] = s['class'] || cs['class']; + s.vp_offset_x = s.vp_offset_x || cs.vp_offset_x; + s.vp_offset_y = s.vp_offset_y || cs.vp_offset_y; + s.keyboard_focus = cs.keyboard_focus; + m = new tinymce.ui.DropMenu(s.id || DOM.uniqueId(), s); + + m.onAddItem.add(t.onAddItem.dispatch, t.onAddItem); + + return m; + }, + + focus : function() { + var t = this; + if (t.keyboardNav) { + t.keyboardNav.focus(); + } + }, + + update : function() { + var t = this, s = t.settings, tb = DOM.get('menu_' + t.id + '_tbl'), co = DOM.get('menu_' + t.id + '_co'), tw, th; + + tw = s.max_width ? Math.min(tb.clientWidth, s.max_width) : tb.clientWidth; + th = s.max_height ? Math.min(tb.clientHeight, s.max_height) : tb.clientHeight; + + if (!DOM.boxModel) + t.element.setStyles({width : tw + 2, height : th + 2}); + else + t.element.setStyles({width : tw, height : th}); + + if (s.max_width) + DOM.setStyle(co, 'width', tw); + + if (s.max_height) { + DOM.setStyle(co, 'height', th); + + if (tb.clientHeight < s.max_height) + DOM.setStyle(co, 'overflow', 'hidden'); + } + }, + + showMenu : function(x, y, px) { + var t = this, s = t.settings, co, vp = DOM.getViewPort(), w, h, mx, my, ot = 2, dm, tb, cp = t.classPrefix; + + t.collapse(1); + + if (t.isMenuVisible) + return; + + if (!t.rendered) { + co = DOM.add(t.settings.container, t.renderNode()); + + each(t.items, function(o) { + o.postRender(); + }); + + t.element = new Element('menu_' + t.id, {blocker : 1, container : s.container}); + } else + co = DOM.get('menu_' + t.id); + + // Move layer out of sight unless it's Opera since it scrolls to top of page due to an bug + if (!tinymce.isOpera) + DOM.setStyles(co, {left : -0xFFFF , top : -0xFFFF}); + + DOM.show(co); + t.update(); + + x += s.offset_x || 0; + y += s.offset_y || 0; + vp.w -= 4; + vp.h -= 4; + + // Move inside viewport if not submenu + if (s.constrain) { + w = co.clientWidth - ot; + h = co.clientHeight - ot; + mx = vp.x + vp.w; + my = vp.y + vp.h; + + if ((x + s.vp_offset_x + w) > mx) + x = px ? px - w : Math.max(0, (mx - s.vp_offset_x) - w); + + if ((y + s.vp_offset_y + h) > my) + y = Math.max(0, (my - s.vp_offset_y) - h); + } + + DOM.setStyles(co, {left : x , top : y}); + t.element.update(); + + t.isMenuVisible = 1; + t.mouseClickFunc = Event.add(co, 'click', function(e) { + var m; + + e = e.target; + + if (e && (e = DOM.getParent(e, 'tr')) && !DOM.hasClass(e, cp + 'ItemSub')) { + m = t.items[e.id]; + + if (m.isDisabled()) + return; + + dm = t; + + while (dm) { + if (dm.hideMenu) + dm.hideMenu(); + + dm = dm.settings.parent; + } + + if (m.settings.onclick) + m.settings.onclick(e); + + return Event.cancel(e); // Cancel to fix onbeforeunload problem + } + }); + + if (t.hasMenus()) { + t.mouseOverFunc = Event.add(co, 'mouseover', function(e) { + var m, r, mi; + + e = e.target; + if (e && (e = DOM.getParent(e, 'tr'))) { + m = t.items[e.id]; + + if (t.lastMenu) + t.lastMenu.collapse(1); + + if (m.isDisabled()) + return; + + if (e && DOM.hasClass(e, cp + 'ItemSub')) { + //p = DOM.getPos(s.container); + r = DOM.getRect(e); + m.showMenu((r.x + r.w - ot), r.y - ot, r.x); + t.lastMenu = m; + DOM.addClass(DOM.get(m.id).firstChild, cp + 'ItemActive'); + } + } + }); + } + + Event.add(co, 'keydown', t._keyHandler, t); + + t.onShowMenu.dispatch(t); + + if (s.keyboard_focus) { + t._setupKeyboardNav(); + } + }, + + hideMenu : function(c) { + var t = this, co = DOM.get('menu_' + t.id), e; + + if (!t.isMenuVisible) + return; + + if (t.keyboardNav) t.keyboardNav.destroy(); + Event.remove(co, 'mouseover', t.mouseOverFunc); + Event.remove(co, 'click', t.mouseClickFunc); + Event.remove(co, 'keydown', t._keyHandler); + DOM.hide(co); + t.isMenuVisible = 0; + + if (!c) + t.collapse(1); + + if (t.element) + t.element.hide(); + + if (e = DOM.get(t.id)) + DOM.removeClass(e.firstChild, t.classPrefix + 'ItemActive'); + + t.onHideMenu.dispatch(t); + }, + + add : function(o) { + var t = this, co; + + o = t.parent(o); + + if (t.isRendered && (co = DOM.get('menu_' + t.id))) + t._add(DOM.select('tbody', co)[0], o); + + return o; + }, + + collapse : function(d) { + this.parent(d); + this.hideMenu(1); + }, + + remove : function(o) { + DOM.remove(o.id); + this.destroy(); + + return this.parent(o); + }, + + destroy : function() { + var t = this, co = DOM.get('menu_' + t.id); + + if (t.keyboardNav) t.keyboardNav.destroy(); + Event.remove(co, 'mouseover', t.mouseOverFunc); + Event.remove(DOM.select('a', co), 'focus', t.mouseOverFunc); + Event.remove(co, 'click', t.mouseClickFunc); + Event.remove(co, 'keydown', t._keyHandler); + + if (t.element) + t.element.remove(); + + DOM.remove(co); + }, + + renderNode : function() { + var t = this, s = t.settings, n, tb, co, w; + + w = DOM.create('div', {role: 'listbox', id : 'menu_' + t.id, 'class' : s['class'], 'style' : 'position:absolute;left:0;top:0;z-index:200000;outline:0'}); + if (t.settings.parent) { + DOM.setAttrib(w, 'aria-parent', 'menu_' + t.settings.parent.id); + } + co = DOM.add(w, 'div', {role: 'presentation', id : 'menu_' + t.id + '_co', 'class' : t.classPrefix + (s['class'] ? ' ' + s['class'] : '')}); + t.element = new Element('menu_' + t.id, {blocker : 1, container : s.container}); + + if (s.menu_line) + DOM.add(co, 'span', {'class' : t.classPrefix + 'Line'}); + +// n = DOM.add(co, 'div', {id : 'menu_' + t.id + '_co', 'class' : 'mceMenuContainer'}); + n = DOM.add(co, 'table', {role: 'presentation', id : 'menu_' + t.id + '_tbl', border : 0, cellPadding : 0, cellSpacing : 0}); + tb = DOM.add(n, 'tbody'); + + each(t.items, function(o) { + t._add(tb, o); + }); + + t.rendered = true; + + return w; + }, + + // Internal functions + _setupKeyboardNav : function(){ + var contextMenu, menuItems, t=this; + contextMenu = DOM.select('#menu_' + t.id)[0]; + menuItems = DOM.select('a[role=option]', 'menu_' + t.id); + menuItems.splice(0,0,contextMenu); + t.keyboardNav = new tinymce.ui.KeyboardNavigation({ + root: 'menu_' + t.id, + items: menuItems, + onCancel: function() { + t.hideMenu(); + }, + enableUpDown: true + }); + contextMenu.focus(); + }, + + _keyHandler : function(evt) { + var t = this, e; + switch (evt.keyCode) { + case 37: // Left + if (t.settings.parent) { + t.hideMenu(); + t.settings.parent.focus(); + Event.cancel(evt); + } + break; + case 39: // Right + if (t.mouseOverFunc) + t.mouseOverFunc(evt); + break; + } + }, + + _add : function(tb, o) { + var n, s = o.settings, a, ro, it, cp = this.classPrefix, ic; + + if (s.separator) { + ro = DOM.add(tb, 'tr', {id : o.id, 'class' : cp + 'ItemSeparator'}); + DOM.add(ro, 'td', {'class' : cp + 'ItemSeparator'}); + + if (n = ro.previousSibling) + DOM.addClass(n, 'mceLast'); + + return; + } + + n = ro = DOM.add(tb, 'tr', {id : o.id, 'class' : cp + 'Item ' + cp + 'ItemEnabled'}); + n = it = DOM.add(n, s.titleItem ? 'th' : 'td'); + n = a = DOM.add(n, 'a', {id: o.id + '_aria', role: s.titleItem ? 'presentation' : 'option', href : 'javascript:;', onclick : "return false;", onmousedown : 'return false;'}); + + if (s.parent) { + DOM.setAttrib(a, 'aria-haspopup', 'true'); + DOM.setAttrib(a, 'aria-owns', 'menu_' + o.id); + } + + DOM.addClass(it, s['class']); +// n = DOM.add(n, 'span', {'class' : 'item'}); + + ic = DOM.add(n, 'span', {'class' : 'mceIcon' + (s.icon ? ' mce_' + s.icon : '')}); + + if (s.icon_src) + DOM.add(ic, 'img', {src : s.icon_src}); + + n = DOM.add(n, s.element || 'span', {'class' : 'mceText', title : o.settings.title}, o.settings.title); + + if (o.settings.style) + DOM.setAttrib(n, 'style', o.settings.style); + + if (tb.childNodes.length == 1) + DOM.addClass(ro, 'mceFirst'); + + if ((n = ro.previousSibling) && DOM.hasClass(n, cp + 'ItemSeparator')) + DOM.addClass(ro, 'mceFirst'); + + if (o.collapse) + DOM.addClass(ro, cp + 'ItemSub'); + + if (n = ro.previousSibling) + DOM.removeClass(n, 'mceLast'); + + DOM.addClass(ro, 'mceLast'); + } + }); +})(tinymce); +(function(tinymce) { + var DOM = tinymce.DOM; + + tinymce.create('tinymce.ui.Button:tinymce.ui.Control', { + Button : function(id, s, ed) { + this.parent(id, s, ed); + this.classPrefix = 'mceButton'; + }, + + renderHTML : function() { + var cp = this.classPrefix, s = this.settings, h, l; + + l = DOM.encode(s.label || ''); + h = ''; + + if (s.image) + h += '' + DOM.encode(s.title) + '' + l; + else + h += '' + (l ? '' + l + '' : ''); + + h += ''; + h += ''; + return h; + }, + + postRender : function() { + var t = this, s = t.settings; + + tinymce.dom.Event.add(t.id, 'click', function(e) { + if (!t.isDisabled()) + return s.onclick.call(s.scope, e); + }); + } + }); +})(tinymce); + +(function(tinymce) { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, Dispatcher = tinymce.util.Dispatcher; + + tinymce.create('tinymce.ui.ListBox:tinymce.ui.Control', { + ListBox : function(id, s, ed) { + var t = this; + + t.parent(id, s, ed); + + t.items = []; + + t.onChange = new Dispatcher(t); + + t.onPostRender = new Dispatcher(t); + + t.onAdd = new Dispatcher(t); + + t.onRenderMenu = new tinymce.util.Dispatcher(this); + + t.classPrefix = 'mceListBox'; + }, + + select : function(va) { + var t = this, fv, f; + + if (va == undefined) + return t.selectByIndex(-1); + + // Is string or number make function selector + if (va && va.call) + f = va; + else { + f = function(v) { + return v == va; + }; + } + + // Do we need to do something? + if (va != t.selectedValue) { + // Find item + each(t.items, function(o, i) { + if (f(o.value)) { + fv = 1; + t.selectByIndex(i); + return false; + } + }); + + if (!fv) + t.selectByIndex(-1); + } + }, + + selectByIndex : function(idx) { + var t = this, e, o; + + if (idx != t.selectedIndex) { + e = DOM.get(t.id + '_text'); + o = t.items[idx]; + + if (o) { + t.selectedValue = o.value; + t.selectedIndex = idx; + DOM.setHTML(e, DOM.encode(o.title)); + DOM.removeClass(e, 'mceTitle'); + DOM.setAttrib(t.id, 'aria-valuenow', o.title); + } else { + DOM.setHTML(e, DOM.encode(t.settings.title)); + DOM.addClass(e, 'mceTitle'); + t.selectedValue = t.selectedIndex = null; + DOM.setAttrib(t.id, 'aria-valuenow', t.settings.title); + } + e = 0; + } + }, + + add : function(n, v, o) { + var t = this; + + o = o || {}; + o = tinymce.extend(o, { + title : n, + value : v + }); + + t.items.push(o); + t.onAdd.dispatch(t, o); + }, + + getLength : function() { + return this.items.length; + }, + + renderHTML : function() { + var h = '', t = this, s = t.settings, cp = t.classPrefix; + + h = '
  • - +
    @@ -123,14 +122,16 @@ - +
     
    - + +
     
    +
    @@ -148,13 +149,8 @@ -
    -
    -
    - -
    - -
    + + diff --git a/include/javascript/tiny_mce/plugins/table/table.htm b/include/javascript/tiny_mce/plugins/table/table.htm index 74982fa1..fea75b09 100644 --- a/include/javascript/tiny_mce/plugins/table/table.htm +++ b/include/javascript/tiny_mce/plugins/table/table.htm @@ -9,14 +9,14 @@ - - + +
    @@ -24,48 +24,48 @@
    {#table_dlg.general_props} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    @@ -73,7 +73,7 @@
    {#table_dlg.advanced_props} - +
    @@ -99,7 +99,7 @@ ";if(g.image){e=b.createHTML("img ",{src:g.image,role:"presentation","class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:f.id+"_voice",style:"display:none;"},g.title);i+="";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'');i+="";i+="";i=b.createHTML("table",{id:f.id,role:"presentation",tabindex:"0","class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",title:g.title},i);return b.createHTML("span",{role:"button","aria-labelledby":f.id+"_voice","aria-haspopup":"true"},i)},postRender:function(){var e=this,g=e.settings,f;if(g.onclick){f=function(h){if(!e.isDisabled()){g.onclick(e.value);a.cancel(h)}};a.add(e.id+"_action","click",f);a.add(e.id,["click","keydown"],function(h){var k=32,m=14,i=13,j=38,l=40;if((h.keyCode===32||h.keyCode===13||h.keyCode===14)&&!h.altKey&&!h.ctrlKey&&!h.metaKey){f();a.cancel(h)}else{if(h.type==="click"||h.keyCode===l){e.showMenu();a.cancel(h)}}})}a.add(e.id+"_open","click",function(h){e.showMenu();a.cancel(h)});a.add([e.id,e.id+"_open"],"focus",function(){e._focused=1});a.add([e.id,e.id+"_open"],"blur",function(){e._focused=0});if(c.isIE6||!b.boxModel){a.add(e.id,"mouseover",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.addClass(e.id,"mceSplitButtonHover")}});a.add(e.id,"mouseout",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.removeClass(e.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();a.clear(this.id+"_action");a.clear(this.id+"_open");a.clear(this.id)}})})(tinymce);(function(d){var c=d.DOM,a=d.dom.Event,b=d.is,e=d.each;d.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h,f){var g=this;g.parent(i,h,f);g.settings=h=d.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);g.onShowMenu=new d.util.Dispatcher(g);g.onHideMenu=new d.util.Dispatcher(g);g.value=h.default_color},showMenu:function(){var f=this,g,j,i,h;if(f.isDisabled()){return}if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible){return f.hideMenu()}i=c.get(f.id);c.show(f.id+"_menu");c.addClass(i,"mceSplitButtonSelected");h=c.getPos(i);c.setStyles(f.id+"_menu",{left:h.x,top:h.y+i.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,f);f.onShowMenu.dispatch(f);if(f._focused){f._keyHandler=a.add(f.id+"_menu","keydown",function(k){if(k.keyCode==27){f.hideMenu()}});c.select("a",f.id+"_menu")[0].focus()}f.isMenuVisible=1},hideMenu:function(g){var f=this;if(f.isMenuVisible){if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id+"_open"})){return}if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(f.id,"mceSplitButtonSelected");a.remove(c.doc,"mousedown",f.hideMenu,f);a.remove(f.id+"_menu","keydown",f._keyHandler);c.hide(f.id+"_menu")}f.isMenuVisible=0}},renderMenu:function(){var p=this,h,k=0,q=p.settings,g,j,l,o,f;o=c.add(q.menu_container,"div",{role:"listbox",id:p.id+"_menu","class":q.menu_class+" "+q["class"],style:"position:absolute;left:0;top:-1000px;"});h=c.add(o,"div",{"class":q["class"]+" mceSplitButtonMenu"});c.add(h,"span",{"class":"mceMenuLine"});g=c.add(h,"table",{role:"presentation","class":"mceColorSplitMenu"});j=c.add(g,"tbody");k=0;e(b(q.colors,"array")?q.colors:q.colors.split(","),function(i){i=i.replace(/^#/,"");if(!k--){l=c.add(j,"tr");k=q.grid_width-1}g=c.add(l,"td");g=c.add(g,"a",{role:"option",href:"javascript:;",style:{backgroundColor:"#"+i},title:p.editor.getLang("colors."+i,i),"data-mce-color":"#"+i});if(p.editor.forcedHighContrastMode){g=c.add(g,"canvas",{width:16,height:16,"aria-hidden":"true"});if(g.getContext&&(f=g.getContext("2d"))){f.fillStyle="#"+i;f.fillRect(0,0,16,16)}else{c.remove(g)}}});if(q.more_colors_func){g=c.add(j,"tr");g=c.add(g,"td",{colspan:q.grid_width,"class":"mceMoreColors"});g=c.add(g,"a",{role:"option",id:p.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},q.more_colors_title);a.add(g,"click",function(i){q.more_colors_func.call(q.more_colors_scope||this);return a.cancel(i)})}c.addClass(h,"mceColorSplitMenu");new d.ui.KeyboardNavigation({root:p.id+"_menu",items:c.select("a",p.id+"_menu"),onCancel:function(){p.hideMenu();p.focus()}});a.add(p.id+"_menu","mousedown",function(i){return a.cancel(i)});a.add(p.id+"_menu","click",function(i){var m;i=c.getParent(i.target,"a",j);if(i&&i.nodeName.toLowerCase()=="a"&&(m=i.getAttribute("data-mce-color"))){p.setColor(m)}return a.cancel(i)});return o},setColor:function(f){this.displayColor(f);this.hideMenu();this.settings.onselect(f)},displayColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g},postRender:function(){var f=this,g=f.id;f.parent();c.add(g+"_action","div",{id:g+"_preview","class":"mceColorPreview"});c.setStyle(f.id+"_preview","backgroundColor",f.value)},destroy:function(){this.parent();a.clear(this.id+"_menu");a.clear(this.id+"_more");c.remove(this.id+"_menu")}})})(tinymce);(function(b){var d=b.DOM,c=b.each,a=b.dom.Event;b.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var f=this,i=[],e=f.controls,j=b.each,g=f.settings;i.push('
    ');i.push("");i.push('");j(e,function(h){i.push(h.renderHTML())});i.push("");i.push("
    ");return i.join("")},focus:function(){this.keyNav.focus()},postRender:function(){var f=this,e=[];c(f.controls,function(g){c(g.controls,function(h){if(h.id){e.push(h)}})});f.keyNav=new b.ui.KeyboardNavigation({root:f.id,items:e,onCancel:function(){f.editor.focus()},excludeFromTabOrder:!f.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent();e.keyNav.destroy();a.clear(e.id)}})})(tinymce);(function(a){var c=a.DOM,b=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var m=this,f="",j,k,n=m.settings,e,d,g,l;l=m.controls;for(e=0;e"))}if(d&&k.ListBox){if(d.Button||d.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarEnd"},c.createHTML("span",null,""))}}if(c.stdMode){f+='"}else{f+=""}if(g&&k.ListBox){if(g.Button||g.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarStart"},c.createHTML("span",null,""))}}}j="mceToolbarEnd";if(k.Button){j+=" mceToolbarEndButton"}else{if(k.SplitButton){j+=" mceToolbarEndSplitButton"}else{if(k.ListBox){j+=" mceToolbarEndListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,""));return c.createHTML("table",{id:m.id,"class":"mceToolbar"+(n["class"]?" "+n["class"]:""),cellpadding:"0",cellspacing:"0",align:m.settings.align||"",role:"presentation",tabindex:"-1"},""+f+"")}})})(tinymce);(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){return this.lookup[d]},requireLangPack:function(e){var d=b.settings;if(d&&d.language&&d.language_load!==false){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(e,d){this.items.push(d);this.lookup[e]=d;this.onAdd.dispatch(this,e,d);return d},load:function(h,e,d,g){var f=this;if(f.urls[h]){return}if(e.indexOf("/")!=0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}f.urls[h]=e.substring(0,e.lastIndexOf("/"));if(!f.lookup[h]){b.ScriptLoader.add(e,d,g)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(q){var n=this,p,l=j.ScriptLoader,u,o=[],m;function r(x,y,t){var v=x[y];if(!v){return}if(j.is(v,"string")){t=v.replace(/\.\w+$/,"");t=t?j.resolve(t):0;v=j.resolve(v)}return v.apply(t||this,Array.prototype.slice.call(arguments,2))}q=d({theme:"simple",language:"en"},q);n.settings=q;i.add(document,"init",function(){var s,v;r(q,"onpageload");switch(q.mode){case"exact":s=q.elements||"";if(s.length>0){g(e(s),function(x){if(k.get(x)){m=new j.Editor(x,q);o.push(m);m.render(1)}else{g(document.forms,function(y){g(y.elements,function(z){if(z.name===x){x="mce_editor_"+c++;k.setAttrib(z,"id",x);m=new j.Editor(x,q);o.push(m);m.render(1)}})})}})}break;case"textareas":case"specific_textareas":function t(y,x){return x.constructor===RegExp?x.test(y.className):k.hasClass(y,x)}g(k.select("textarea"),function(x){if(q.editor_deselector&&t(x,q.editor_deselector)){return}if(!q.editor_selector||t(x,q.editor_selector)){u=k.get(x.name);if(!x.id&&!u){x.id=x.name}if(!x.id||n.get(x.id)){x.id=k.uniqueId()}m=new j.Editor(x.id,q);o.push(m);m.render(1)}});break}if(q.oninit){s=v=0;g(o,function(x){v++;if(!x.initialized){x.onInit.add(function(){s++;if(s==v){r(q,"oninit")}})}else{s++}if(s==v){r(q,"oninit")}})}})},get:function(l){if(l===a){return this.editors}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l':"",visual_table_class:"mceItemTable",visual:1,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",hidden_input:1,padd_empty_editor:1,render_ui:1,init_theme:1,force_p_newlines:1,indentation:"30px",keep_styles:1,fix_table_elements:1,inline_styles:1,convert_fonts_to_spans:true,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",validate:true,entity_encoding:"named",url_converter:p.convertURL,url_converter_scope:p,ie7_compat:true},q);p.documentBaseURI=new m.util.URI(q.document_base_url||m.documentBaseURL,{base_uri:tinyMCE.baseURI});p.baseURI=m.baseURI;p.contentCSS=[];p.execCallback("setup",p)},render:function(r){var u=this,v=u.settings,x=u.id,p=m.ScriptLoader;if(!j.domLoaded){j.add(document,"init",function(){u.render()});return}tinyMCE.settings=v;if(!u.getElement()){return}if(m.isIDevice){return}if(!/TEXTAREA|INPUT/i.test(u.getElement().nodeName)&&v.hidden_input&&n.getParent(x,"form")){n.insertAfter(n.create("input",{type:"hidden",name:x}),x)}if(m.WindowManager){u.windowManager=new m.WindowManager(u)}if(v.encoding=="xml"){u.onGetContent.add(function(s,t){if(t.save){t.content=n.encode(t.content)}})}if(v.add_form_submit_trigger){u.onSubmit.addToTop(function(){if(u.initialized){u.save();u.isNotDirty=1}})}if(v.add_unload_trigger){u._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(u.initialized&&!u.destroyed&&!u.isHidden()){u.save({format:"raw",no_events:true})}})}m.addUnload(u.destroy,u);if(v.submit_patch){u.onBeforeRenderUI.add(function(){var s=u.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){u.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){m.triggerSave();u.isNotDirty=1;return u.formElement._mceOldSubmit(u.formElement)}}s=null})}function q(){if(v.language&&v.language_load!==false){p.add(m.baseURL+"/langs/"+v.language+".js")}if(v.theme&&v.theme.charAt(0)!="-"&&!h.urls[v.theme]){h.load(v.theme,"themes/"+v.theme+"/editor_template"+m.suffix+".js")}i(g(v.plugins),function(s){if(s&&s.charAt(0)!="-"&&!c.urls[s]){if(s=="safari"){return}c.load(s,"plugins/"+s+"/editor_plugin"+m.suffix+".js")}});p.loadQueue(function(){if(!u.removed){u.init()}})}q()},init:function(){var r,F=this,G=F.settings,C,z,B=F.getElement(),q,p,D,x,A,E,y;m.add(F);G.aria_label=G.aria_label||n.getAttrib(B,"aria-label",F.getLang("aria.rich_text_area"));if(G.theme){G.theme=G.theme.replace(/-/,"");q=h.get(G.theme);F.theme=new q();if(F.theme.init&&G.init_theme){F.theme.init(F,h.urls[G.theme]||m.documentBaseURL.replace(/\/$/,""))}}i(g(G.plugins.replace(/\-/g,"")),function(H){var I=c.get(H),t=c.urls[H]||m.documentBaseURL.replace(/\/$/,""),s;if(I){s=new I(F,t);F.plugins[H]=s;if(s.init){s.init(F,t)}}});if(G.popup_css!==false){if(G.popup_css){G.popup_css=F.documentBaseURI.toAbsolute(G.popup_css)}else{G.popup_css=F.baseURI.toAbsolute("themes/"+G.theme+"/skins/"+G.skin+"/dialog.css")}}if(G.popup_css_add){G.popup_css+=","+F.documentBaseURI.toAbsolute(G.popup_css_add)}F.controlManager=new m.ControlManager(F);if(G.custom_undo_redo){F.onBeforeExecCommand.add(function(t,H,u,I,s){if(H!="Undo"&&H!="Redo"&&H!="mceRepaint"&&(!s||!s.skip_undo)){F.undoManager.beforeChange()}});F.onExecCommand.add(function(t,H,u,I,s){if(H!="Undo"&&H!="Redo"&&H!="mceRepaint"&&(!s||!s.skip_undo)){F.undoManager.add()}})}F.onExecCommand.add(function(s,t){if(!/^(FontName|FontSize)$/.test(t)){F.nodeChanged()}});if(a){function v(s,t){if(!t||!t.initial){F.execCommand("mceRepaint")}}F.onUndo.add(v);F.onRedo.add(v);F.onSetContent.add(v)}F.onBeforeRenderUI.dispatch(F,F.controlManager);if(G.render_ui){C=G.width||B.style.width||B.offsetWidth;z=G.height||B.style.height||B.offsetHeight;F.orgDisplay=B.style.display;E=/^[0-9\.]+(|px)$/i;if(E.test(""+C)){C=Math.max(parseInt(C)+(q.deltaWidth||0),100)}if(E.test(""+z)){z=Math.max(parseInt(z)+(q.deltaHeight||0),100)}q=F.theme.renderUI({targetNode:B,width:C,height:z,deltaWidth:G.delta_width,deltaHeight:G.delta_height});F.editorContainer=q.editorContainer}if(document.domain&&location.hostname!=document.domain){m.relaxedDomain=document.domain}n.setStyles(q.sizeContainer||q.editorContainer,{width:C,height:z});if(G.content_css){m.each(g(G.content_css),function(s){F.contentCSS.push(F.documentBaseURI.toAbsolute(s))})}z=(q.iframeHeight||z)+(typeof(z)=="number"?(q.deltaHeight||0):"");if(z<100){z=100}F.iframeHTML=G.doctype+'';if(G.document_base_url!=m.documentBaseURL){F.iframeHTML+=''}if(G.ie7_compat){F.iframeHTML+=''}else{F.iframeHTML+=''}F.iframeHTML+='';if(!a||!/Firefox\/2/.test(navigator.userAgent)){for(y=0;y'}F.contentCSS=[]}x=G.body_id||"tinymce";if(x.indexOf("=")!=-1){x=F.getParam("body_id","","hash");x=x[F.id]||x}A=G.body_class||"";if(A.indexOf("=")!=-1){A=F.getParam("body_class","","hash");A=A[F.id]||""}F.iframeHTML+='';if(m.relaxedDomain&&(b||(m.isOpera&&parseFloat(opera.version())<11))){D='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+F.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'}r=n.add(q.iframeContainer,"iframe",{id:F.id+"_ifr",src:D||'javascript:""',frameBorder:"0",title:G.aria_label,style:{width:"100%",height:z}});F.contentAreaContainer=q.iframeContainer;n.get(q.editorContainer).style.display=F.orgDisplay;n.get(F.id).style.display="none";n.setAttrib(F.id,"aria-hidden",true);if(!m.relaxedDomain||!D){F.setupIframe()}B=r=q=null},setupIframe:function(){var r=this,x=r.settings,y=n.get(r.id),z=r.getDoc(),v,p;if(!b||!m.relaxedDomain){z.open();z.write(r.iframeHTML);z.close();if(m.relaxedDomain){z.domain=m.relaxedDomain}}if(!b){try{if(!x.readonly){z.designMode="On"}}catch(q){}}if(b){p=r.getBody();n.hide(p);if(!x.readonly){p.contentEditable=true}n.show(p)}r.schema=new m.html.Schema(x);r.dom=new m.dom.DOMUtils(r.getDoc(),{keep_values:true,url_converter:r.convertURL,url_converter_scope:r,hex_colors:x.force_hex_style_colors,class_filter:x.class_filter,update_styles:1,fix_ie_paragraphs:1,schema:r.schema});r.parser=new m.html.DomParser(x,r.schema);r.parser.addAttributeFilter("name",function(s,t){var B=s.length,D,A,C,E;while(B--){E=s[B];if(E.name==="a"&&E.firstChild){C=E.parent;D=E.lastChild;do{A=D.prev;C.insert(D,E);D=A}while(D)}}});r.parser.addAttributeFilter("src,href,style",function(s,t){var A=s.length,B,D=r.dom,C;while(A--){B=s[A];C=B.attr(t);if(t==="style"){B.attr("data-mce-style",D.serializeStyle(D.parseStyle(C),B.name))}else{B.attr("data-mce-"+t,r.convertURL(C,t,B.name))}}});r.parser.addNodeFilter("script",function(s,t){var A=s.length;while(A--){s[A].attr("type","mce-text/javascript")}});r.parser.addNodeFilter("#cdata",function(s,t){var A=s.length,B;while(A--){B=s[A];B.type=8;B.name="#comment";B.value="[CDATA["+B.value+"]]"}});r.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(t,A){var B=t.length,C,s=r.schema.getNonEmptyElements();while(B--){C=t[B];if(C.isEmpty(s)){C.empty().append(new m.html.Node("br",1)).shortEnded=true}}});r.serializer=new m.dom.Serializer(x,r.dom,r.schema);r.selection=new m.dom.Selection(r.dom,r.getWin(),r.serializer);r.formatter=new m.Formatter(this);r.formatter.register({alignleft:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"}},{selector:"img,table",collapsed:false,styles:{"float":"left"}}],aligncenter:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"}},{selector:"img",collapsed:false,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:false,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"}},{selector:"img,table",collapsed:false,styles:{"float":"right"}}],alignfull:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"}}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:true},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:false},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:false},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:true,expand:false,block_expand:true,deep:true},{selector:"span",attributes:["style","class"],remove:"empty",split:true,expand:false,deep:true},{selector:"*",attributes:["style","class"],split:false,expand:false,deep:true}]});i("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(s){r.formatter.register(s,{block:s,remove:"all"})});r.formatter.register(r.settings.formats);r.undoManager=new m.UndoManager(r);r.undoManager.onAdd.add(function(t,s){if(t.hasUndo()){return r.onChange.dispatch(r,s,t)}});r.undoManager.onUndo.add(function(t,s){return r.onUndo.dispatch(r,s,t)});r.undoManager.onRedo.add(function(t,s){return r.onRedo.dispatch(r,s,t)});r.forceBlocks=new m.ForceBlocks(r,{forced_root_block:x.forced_root_block});r.editorCommands=new m.EditorCommands(r);r.serializer.onPreProcess.add(function(s,t){return r.onPreProcess.dispatch(r,t,s)});r.serializer.onPostProcess.add(function(s,t){return r.onPostProcess.dispatch(r,t,s)});r.onPreInit.dispatch(r);if(!x.gecko_spellcheck){r.getBody().spellcheck=0}if(!x.readonly){r._addEvents()}r.controlManager.onPostRender.dispatch(r,r.controlManager);r.onPostRender.dispatch(r);if(x.directionality){r.getBody().dir=x.directionality}if(x.nowrap){r.getBody().style.whiteSpace="nowrap"}if(x.handle_node_change_callback){r.onNodeChange.add(function(t,s,A){r.execCallback("handle_node_change_callback",r.id,A,-1,-1,true,r.selection.isCollapsed())})}if(x.save_callback){r.onSaveContent.add(function(s,A){var t=r.execCallback("save_callback",r.id,A.content,r.getBody());if(t){A.content=t}})}if(x.onchange_callback){r.onChange.add(function(t,s){r.execCallback("onchange_callback",r,s)})}if(x.protect){r.onBeforeSetContent.add(function(s,t){if(x.protect){i(x.protect,function(A){t.content=t.content.replace(A,function(B){return""})})}})}if(x.convert_newlines_to_brs){r.onBeforeSetContent.add(function(s,t){if(t.initial){t.content=t.content.replace(/\r?\n/g,"
    ")}})}if(x.preformatted){r.onPostProcess.add(function(s,t){t.content=t.content.replace(/^\s*/,"");t.content=t.content.replace(/<\/pre>\s*$/,"");if(t.set){t.content='
    '+t.content+"
    "}})}if(x.verify_css_classes){r.serializer.attribValueFilter=function(C,A){var B,t;if(C=="class"){if(!r.classesRE){t=r.dom.getClasses();if(t.length>0){B="";i(t,function(s){B+=(B?"|":"")+s["class"]});r.classesRE=new RegExp("("+B+")","gi")}}return !r.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(A)||r.classesRE.test(A)?A:""}return A}}if(x.cleanup_callback){r.onBeforeSetContent.add(function(s,t){t.content=r.execCallback("cleanup_callback","insert_to_editor",t.content,t)});r.onPreProcess.add(function(s,t){if(t.set){r.execCallback("cleanup_callback","insert_to_editor_dom",t.node,t)}if(t.get){r.execCallback("cleanup_callback","get_from_editor_dom",t.node,t)}});r.onPostProcess.add(function(s,t){if(t.set){t.content=r.execCallback("cleanup_callback","insert_to_editor",t.content,t)}if(t.get){t.content=r.execCallback("cleanup_callback","get_from_editor",t.content,t)}})}if(x.save_callback){r.onGetContent.add(function(s,t){if(t.save){t.content=r.execCallback("save_callback",r.id,t.content,r.getBody())}})}if(x.handle_event_callback){r.onEvent.add(function(s,t,A){if(r.execCallback("handle_event_callback",t,s,A)===false){j.cancel(t)}})}r.onSetContent.add(function(){r.addVisual(r.getBody())});if(x.padd_empty_editor){r.onPostProcess.add(function(s,t){t.content=t.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
    [\r\n]*)$/,"")})}if(a){function u(s,t){i(s.dom.select("a"),function(B){var A=B.parentNode;if(s.dom.isBlock(A)&&A.lastChild===B){s.dom.add(A,"br",{"data-mce-bogus":1})}})}r.onExecCommand.add(function(s,t){if(t==="CreateLink"){u(s)}});r.onSetContent.add(r.selection.onSetContent.add(u));if(!x.readonly){try{z.designMode="Off";z.designMode="On"}catch(q){}}}setTimeout(function(){if(r.removed){return}r.load({initial:true,format:"html"});r.startContent=r.getContent({format:"raw"});r.undoManager.add();r.initialized=true;r.onInit.dispatch(r);r.execCallback("setupcontent_callback",r.id,r.getBody(),r.getDoc());r.execCallback("init_instance_callback",r);r.focus(true);r.nodeChanged({initial:1});i(r.contentCSS,function(s){r.dom.loadCSS(s)});if(x.auto_focus){setTimeout(function(){var s=m.get(x.auto_focus);s.selection.select(s.getBody(),1);s.selection.collapse(1);s.getWin().focus()},100)}},1);y=null},focus:function(s){var x,q=this,v=q.settings.content_editable,r,p,u=q.getDoc();if(!s){r=q.selection.getRng();if(r.item){p=r.item(0)}if(!v){q.getWin().focus()}if(p&&p.ownerDocument==u){r=u.body.createControlRange();r.addElement(p);r.select()}}if(m.activeEditor!=q){if((x=m.activeEditor)!=null){x.onDeactivate.dispatch(x,q)}q.onActivate.dispatch(q,x)}m._setActive(q)},execCallback:function(u){var p=this,r=p.settings[u],q;if(!r){return}if(p.callbackLookup&&(q=p.callbackLookup[u])){r=q.func;q=q.scope}if(d(r,"string")){q=r.replace(/\.\w+$/,"");q=q?m.resolve(q):0;r=m.resolve(r);p.callbackLookup=p.callbackLookup||{};p.callbackLookup[u]={func:r,scope:q}}return r.apply(q||p,Array.prototype.slice.call(arguments,1))},translate:function(p){var r=this.settings.language||"en",q=m.i18n;if(!p){return""}return q[r+"."+p]||p.replace(/{\#([^}]+)\}/g,function(t,s){return q[r+"."+s]||"{#"+s+"}"})},getLang:function(q,p){return m.i18n[(this.settings.language||"en")+"."+q]||(d(p)?p:"{#"+q+"}")},getParam:function(u,r,p){var s=m.trim,q=d(this.settings[u])?this.settings[u]:r,t;if(p==="hash"){t={};if(d(q,"string")){i(q.indexOf("=")>0?q.split(/[;,](?![^=;,]*(?:[;,]|$))/):q.split(","),function(x){x=x.split("=");if(x.length>1){t[s(x[0])]=s(x[1])}else{t[s(x[0])]=s(x)}})}else{t=q}return t}return q},nodeChanged:function(r){var p=this,q=p.selection,u=q.getStart()||p.getBody();if(p.initialized){r=r||{};u=b&&u.ownerDocument!=p.getDoc()?p.getBody():u;r.parents=[];p.dom.getParent(u,function(s){if(s.nodeName=="BODY"){return true}r.parents.push(s)});p.onNodeChange.dispatch(p,r?r.controlManager||p.controlManager:p.controlManager,u,q.isCollapsed(),r)}},addButton:function(r,q){var p=this;p.buttons=p.buttons||{};p.buttons[r]=q},addCommand:function(p,r,q){this.execCommands[p]={func:r,scope:q||this}},addQueryStateHandler:function(p,r,q){this.queryStateCommands[p]={func:r,scope:q||this}},addQueryValueHandler:function(p,r,q){this.queryValueCommands[p]={func:r,scope:q||this}},addShortcut:function(r,u,p,s){var q=this,v;if(!q.settings.custom_shortcuts){return false}q.shortcuts=q.shortcuts||{};if(d(p,"string")){v=p;p=function(){q.execCommand(v,false,null)}}if(d(p,"object")){v=p;p=function(){q.execCommand(v[0],v[1],v[2])}}i(g(r),function(t){var x={func:p,scope:s||this,desc:u,alt:false,ctrl:false,shift:false};i(g(t,"+"),function(y){switch(y){case"alt":case"ctrl":case"shift":x[y]=true;break;default:x.charCode=y.charCodeAt(0);x.keyCode=y.toUpperCase().charCodeAt(0)}});q.shortcuts[(x.ctrl?"ctrl":"")+","+(x.alt?"alt":"")+","+(x.shift?"shift":"")+","+x.keyCode]=x});return true},execCommand:function(x,v,z,p){var r=this,u=0,y,q;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(x)&&(!p||!p.skip_focus)){r.focus()}y={};r.onBeforeExecCommand.dispatch(r,x,v,z,y);if(y.terminate){return false}if(r.execCallback("execcommand_callback",r.id,r.selection.getNode(),x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}if(y=r.execCommands[x]){q=y.func.call(y.scope,v,z);if(q!==true){r.onExecCommand.dispatch(r,x,v,z,p);return q}}i(r.plugins,function(s){if(s.execCommand&&s.execCommand(x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);u=1;return false}});if(u){return true}if(r.theme&&r.theme.execCommand&&r.theme.execCommand(x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}if(r.editorCommands.execCommand(x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}r.getDoc().execCommand(x,v,z);r.onExecCommand.dispatch(r,x,v,z,p)},queryCommandState:function(u){var q=this,v,r;if(q._isHidden()){return}if(v=q.queryStateCommands[u]){r=v.func.call(v.scope);if(r!==true){return r}}v=q.editorCommands.queryCommandState(u);if(v!==-1){return v}try{return this.getDoc().queryCommandState(u)}catch(p){}},queryCommandValue:function(v){var q=this,u,r;if(q._isHidden()){return}if(u=q.queryValueCommands[v]){r=u.func.call(u.scope);if(r!==true){return r}}u=q.editorCommands.queryCommandValue(v);if(d(u)){return u}try{return this.getDoc().queryCommandValue(v)}catch(p){}},show:function(){var p=this;n.show(p.getContainer());n.hide(p.id);p.load()},hide:function(){var p=this,q=p.getDoc();if(b&&q){q.execCommand("SelectAll")}p.save();n.hide(p.getContainer());n.setStyle(p.id,"display",p.orgDisplay)},isHidden:function(){return !n.isHidden(this.id)},setProgressState:function(p,q,r){this.onSetProgressState.dispatch(this,p,q,r);return p},load:function(s){var p=this,r=p.getElement(),q;if(r){s=s||{};s.load=true;q=p.setContent(d(r.value)?r.value:r.innerHTML,s);s.element=r;if(!s.no_events){p.onLoadContent.dispatch(p,s)}s.element=r=null;return q}},save:function(u){var p=this,s=p.getElement(),q,r;if(!s||!p.initialized){return}u=u||{};u.save=true;if(!u.no_events){p.undoManager.typing=false;p.undoManager.add()}u.element=s;q=u.content=p.getContent(u);if(!u.no_events){p.onSaveContent.dispatch(p,u)}q=u.content;if(!/TEXTAREA|INPUT/i.test(s.nodeName)){s.innerHTML=q;if(r=n.getParent(p.id,"form")){i(r.elements,function(t){if(t.name==p.id){t.value=q;return false}})}}else{s.value=q}u.element=s=null;return q},setContent:function(t,s){var r=this,q,p=r.getBody();s=s||{};s.format=s.format||"html";s.set=true;s.content=t;if(!s.no_events){r.onBeforeSetContent.dispatch(r,s)}t=s.content;if(!m.isIE&&(t.length===0||/^\s+$/.test(t))){p.innerHTML='
    ';return}if(s.format!=="raw"){t=new m.html.Serializer({},r.schema).serialize(r.parser.parse(t))}s.content=m.trim(t);r.dom.setHTML(p,s.content);if(!s.no_events){r.onSetContent.dispatch(r,s)}return s.content},getContent:function(q){var p=this,r;q=q||{};q.format=q.format||"html";q.get=true;if(!q.no_events){p.onBeforeGetContent.dispatch(p,q)}if(q.format=="raw"){r=p.getBody().innerHTML}else{r=p.serializer.serialize(p.getBody(),q)}q.content=m.trim(r);if(!q.no_events){p.onGetContent.dispatch(p,q)}return q.content},isDirty:function(){var p=this;return m.trim(p.startContent)!=m.trim(p.getContent({format:"raw",no_events:1}))&&!p.isNotDirty},getContainer:function(){var p=this;if(!p.container){p.container=n.get(p.editorContainer||p.id+"_parent")}return p.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return n.get(this.settings.content_element||this.id)},getWin:function(){var p=this,q;if(!p.contentWindow){q=n.get(p.id+"_ifr");if(q){p.contentWindow=q.contentWindow}}return p.contentWindow},getDoc:function(){var q=this,p;if(!q.contentDocument){p=q.getWin();if(p){q.contentDocument=p.document}}return q.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(p,x,v){var q=this,r=q.settings;if(r.urlconverter_callback){return q.execCallback("urlconverter_callback",p,v,true,x)}if(!r.convert_urls||(v&&v.nodeName=="LINK")||p.indexOf("file:")===0){return p}if(r.relative_urls){return q.documentBaseURI.toRelative(p)}p=q.documentBaseURI.toAbsolute(p,r.remove_script_host);return p},addVisual:function(r){var p=this,q=p.settings;r=r||p.getBody();if(!d(p.hasVisual)){p.hasVisual=q.visual}i(p.dom.select("table,a",r),function(t){var s;switch(t.nodeName){case"TABLE":s=p.dom.getAttrib(t,"border");if(!s||s=="0"){if(p.hasVisual){p.dom.addClass(t,q.visual_table_class)}else{p.dom.removeClass(t,q.visual_table_class)}}return;case"A":s=p.dom.getAttrib(t,"name");if(s){if(p.hasVisual){p.dom.addClass(t,"mceItemAnchor")}else{p.dom.removeClass(t,"mceItemAnchor")}}return}});p.onVisualAid.dispatch(p,r,p.hasVisual)},remove:function(){var p=this,q=p.getContainer();p.removed=1;p.hide();p.execCallback("remove_instance_callback",p);p.onRemove.dispatch(p);p.onExecCommand.listeners=[];m.remove(p);n.remove(q)},destroy:function(q){var p=this;if(p.destroyed){return}if(!q){m.removeUnload(p.destroy);tinyMCE.onBeforeUnload.remove(p._beforeUnload);if(p.theme&&p.theme.destroy){p.theme.destroy()}p.controlManager.destroy();p.selection.destroy();p.dom.destroy();if(!p.settings.content_editable){j.clear(p.getWin());j.clear(p.getDoc())}j.clear(p.getBody());j.clear(p.formElement)}if(p.formElement){p.formElement.submit=p.formElement._mceOldSubmit;p.formElement._mceOldSubmit=null}p.contentAreaContainer=p.formElement=p.container=p.settings.content_element=p.bodyElement=p.contentDocument=p.contentWindow=null;if(p.selection){p.selection=p.selection.win=p.selection.dom=p.selection.dom.doc=null}p.destroyed=1},_addEvents:function(){var B=this,r,C=B.settings,q=B.dom,x={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function p(t,D){var s=t.type;if(B.removed){return}if(B.onEvent.dispatch(B,t,D)!==false){B[x[t.fakeType||t.type]].dispatch(B,t,D)}}i(x,function(t,s){switch(s){case"contextmenu":q.bind(B.getDoc(),s,p);break;case"paste":q.bind(B.getBody(),s,function(D){p(D)});break;case"submit":case"reset":q.bind(B.getElement().form||n.getParent(B.id,"form"),s,p);break;default:q.bind(C.content_editable?B.getBody():B.getDoc(),s,p)}});q.bind(C.content_editable?B.getBody():(a?B.getDoc():B.getWin()),"focus",function(s){B.focus(true)});if(m.isGecko){q.bind(B.getDoc(),"DOMNodeInserted",function(t){var s;t=t.target;if(t.nodeType===1&&t.nodeName==="IMG"&&(s=t.getAttribute("data-mce-src"))){t.src=B.documentBaseURI.toAbsolute(s)}})}if(a){function u(){var E=this,G=E.getDoc(),F=E.settings;if(a&&!F.readonly){if(E._isHidden()){try{if(!F.content_editable){G.designMode="On"}}catch(D){}}try{G.execCommand("styleWithCSS",0,false)}catch(D){if(!E._isHidden()){try{G.execCommand("useCSS",0,true)}catch(D){}}}if(!F.table_inline_editing){try{G.execCommand("enableInlineTableEditing",false,false)}catch(D){}}if(!F.object_resizing){try{G.execCommand("enableObjectResizing",false,false)}catch(D){}}}}B.onBeforeExecCommand.add(u);B.onMouseDown.add(u)}if(m.isWebKit){B.onClick.add(function(s,t){t=t.target;if(t.nodeName=="IMG"||(t.nodeName=="A"&&q.hasClass(t,"mceItemAnchor"))){B.selection.getSel().setBaseAndExtent(t,0,t,1);B.nodeChanged()}})}B.onMouseUp.add(B.nodeChanged);B.onKeyUp.add(function(s,t){var D=t.keyCode;if((D>=33&&D<=36)||(D>=37&&D<=40)||D==13||D==45||D==46||D==8||(m.isMac&&(D==91||D==93))||t.ctrlKey){B.nodeChanged()}});B.onReset.add(function(){B.setContent(B.startContent,{format:"raw"})});if(C.custom_shortcuts){if(C.custom_undo_redo_keyboard_shortcuts){B.addShortcut("ctrl+z",B.getLang("undo_desc"),"Undo");B.addShortcut("ctrl+y",B.getLang("redo_desc"),"Redo")}B.addShortcut("ctrl+b",B.getLang("bold_desc"),"Bold");B.addShortcut("ctrl+i",B.getLang("italic_desc"),"Italic");B.addShortcut("ctrl+u",B.getLang("underline_desc"),"Underline");for(r=1;r<=6;r++){B.addShortcut("ctrl+"+r,"",["FormatBlock",false,"h"+r])}B.addShortcut("ctrl+7","",["FormatBlock",false,"

    "]);B.addShortcut("ctrl+8","",["FormatBlock",false,"

    "]);B.addShortcut("ctrl+9","",["FormatBlock",false,"
    "]);function v(t){var s=null;if(!t.altKey&&!t.ctrlKey&&!t.metaKey){return s}i(B.shortcuts,function(D){if(m.isMac&&D.ctrl!=t.metaKey){return}else{if(!m.isMac&&D.ctrl!=t.ctrlKey){return}}if(D.alt!=t.altKey){return}if(D.shift!=t.shiftKey){return}if(t.keyCode==D.keyCode||(t.charCode&&t.charCode==D.charCode)){s=D;return false}});return s}B.onKeyUp.add(function(s,t){var D=v(t);if(D){return j.cancel(t)}});B.onKeyPress.add(function(s,t){var D=v(t);if(D){return j.cancel(t)}});B.onKeyDown.add(function(s,t){var D=v(t);if(D){D.func.call(D.scope);return j.cancel(t)}})}if(m.isIE){q.bind(B.getDoc(),"controlselect",function(D){var t=B.resizeInfo,s;D=D.target;if(D.nodeName!=="IMG"){return}if(t){q.unbind(t.node,t.ev,t.cb)}if(!q.hasClass(D,"mceItemNoResize")){ev="resizeend";s=q.bind(D,ev,function(F){var E;F=F.target;if(E=q.getStyle(F,"width")){q.setAttrib(F,"width",E.replace(/[^0-9%]+/g,""));q.setStyle(F,"width","")}if(E=q.getStyle(F,"height")){q.setAttrib(F,"height",E.replace(/[^0-9%]+/g,""));q.setStyle(F,"height","")}})}else{ev="resizestart";s=q.bind(D,"resizestart",j.cancel,j)}t=B.resizeInfo={node:D,ev:ev,cb:s}});B.onKeyDown.add(function(s,D){var t;switch(D.keyCode){case 8:t=B.getDoc().selection;if(t.createRange&&t.createRange().item){s.dom.remove(t.createRange().item(0));return j.cancel(D)}}})}if(m.isOpera){B.onClick.add(function(s,t){j.prevent(t)})}if(C.custom_undo_redo){function y(){B.undoManager.typing=false;B.undoManager.add()}q.bind(B.getDoc(),"focusout",function(s){if(!B.removed&&B.undoManager.typing){y()}});B.dom.bind(B.dom.getRoot(),"dragend",function(s){y()});B.onKeyUp.add(function(t,F){var s,E,D;if(b&&F.keyCode==8){s=B.selection.getRng();if(s.parentElement){E=s.parentElement();D=B.selection.getBookmark();E.innerHTML=E.innerHTML;B.selection.moveToBookmark(D)}}if((F.keyCode>=33&&F.keyCode<=36)||(F.keyCode>=37&&F.keyCode<=40)||F.keyCode==13||F.keyCode==45||F.ctrlKey){y()}});B.onKeyDown.add(function(t,H){var s,F,E,G=H.keyCode;if(b&&G==46){s=B.selection.getRng();if(s.parentElement){F=s.parentElement();if(!B.undoManager.typing){B.undoManager.beforeChange();B.undoManager.typing=true;B.undoManager.add()}if(H.ctrlKey){s.moveEnd("word",1);s.select()}B.selection.getSel().clear();if(s.parentElement()==F){E=B.selection.getBookmark();try{F.innerHTML=F.innerHTML}catch(D){}B.selection.moveToBookmark(E)}H.preventDefault();return}}if((G>=33&&G<=36)||(G>=37&&G<=40)||G==13||G==45){if(m.isIE&&G==13){B.undoManager.beforeChange()}if(B.undoManager.typing){y()}return}if((G<16||G>20)&&G!=224&&G!=91&&!B.undoManager.typing){B.undoManager.beforeChange();B.undoManager.add();B.undoManager.typing=true}});B.onMouseDown.add(function(){if(B.undoManager.typing){y()}})}if(m.isGecko){function A(){var s=B.dom.getAttribs(B.selection.getStart().cloneNode(false));return function(){var t=B.selection.getStart();B.dom.removeAllAttribs(t);i(s,function(D){t.setAttributeNode(D.cloneNode(true))})}}function z(){var t=B.selection;return !t.isCollapsed()&&t.getStart()!=t.getEnd()}B.onKeyPress.add(function(s,D){var t;if((D.keyCode==8||D.keyCode==46)&&z()){t=A();B.getDoc().execCommand("delete",false,null);t();return j.cancel(D)}});B.dom.bind(B.getDoc(),"cut",function(t){var s;if(z()){s=A();B.onKeyUp.addToTop(j.cancel,j);setTimeout(function(){s();B.onKeyUp.remove(j.cancel,j)},0)}})}},_isHidden:function(){var p;if(!a){return 0}p=this.selection.getSel();return(!p||!p.rangeCount||p.rangeCount==0)}})})(tinymce);(function(c){var d=c.each,e,a=true,b=false;c.EditorCommands=function(n){var l=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,o;function q(y,x,v){var u;y=y.toLowerCase();if(u=j.exec[y]){u(y,x,v);return a}return b}function m(v){var u;v=v.toLowerCase();if(u=j.state[v]){return u(v)}return -1}function h(v){var u;v=v.toLowerCase();if(u=j.value[v]){return u(v)}return b}function t(u,v){v=v||"exec";d(u,function(y,x){d(x.toLowerCase().split(","),function(z){j[v][z]=y})})}c.extend(this,{execCommand:q,queryCommandState:m,queryCommandValue:h,addCommands:t});function f(x,v,u){if(v===e){v=b}if(u===e){u=null}return n.getDoc().execCommand(x,v,u)}function s(u){return n.formatter.match(u)}function r(u,v){n.formatter.toggle(u,v?{value:v}:e)}function i(u){o=p.getBookmark(u)}function g(){p.moveToBookmark(o)}t({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(y){var x=n.getDoc(),u;try{f(y)}catch(v){u=a}if(u||!x.queryCommandSupported(y)){if(c.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(z){if(z){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(u){if(p.isCollapsed()){p.select(p.getNode())}f(u);p.collapse(b)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(u){var v=u.substring(7);d("left,center,right,full".split(","),function(x){if(v!=x){n.formatter.remove("align"+x)}});r("align"+v);q("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(x){var u,v;f(x);u=l.getParent(p.getNode(),"ol,ul");if(u){v=u.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(v.nodeName)){i();l.split(v,u);g()}}},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(u){r(u)},"ForeColor,HiliteColor,FontName":function(x,v,u){r(x,u)},FontSize:function(y,x,v){var u,z;if(v>=1&&v<=7){z=c.explode(k.font_size_style_values);u=c.explode(k.font_size_classes);if(u){v=u[v-1]||v}else{v=z[v-1]||v}}r(y,v)},RemoveFormat:function(u){n.formatter.remove(u)},mceBlockQuote:function(u){r("blockquote")},FormatBlock:function(x,v,u){return r(u||"p")},mceCleanup:function(){var u=p.getBookmark();n.setContent(n.getContent({cleanup:a}),{cleanup:a});p.moveToBookmark(u)},mceRemoveNode:function(y,x,v){var u=v||p.getNode();if(u!=n.getBody()){i();n.dom.remove(u,a);g()}},mceSelectNodeDepth:function(y,x,v){var u=0;l.getParent(p.getNode(),function(z){if(z.nodeType==1&&u++==v){p.select(z);return b}},n.getBody())},mceSelectNode:function(x,v,u){p.select(u)},mceInsertContent:function(z,D,E){var C,u,x,F,y,u,A,G,B;function v(I,J,H){var K=new c.dom.TreeWalker(H?I.nextSibling:I.previousSibling,J);while((I=K.current())){if((I.nodeType==3&&c.trim(I.nodeValue).length)||I.nodeName=="BR"||I.nodeName=="IMG"){return I}if(H){K.next()}else{K.prev()}}}B={content:E,format:"html"};p.onBeforeSetContent.dispatch(p,B);E=B.content;if(E.indexOf("{$caret}")==-1){E+="{$caret}"}p.setContent('\uFEFF',{no_events:false});l.setOuterHTML("__mce",E.replace(/\{\$caret\}/,'\uFEFF'));C=l.select("#__mce")[0];x=l.getRoot();if(C.previousSibling&&l.isBlock(C.previousSibling)||C.parentNode==x){y=v(C,x);if(y){if(y.nodeName=="BR"){y.parentNode.insertBefore(C,y)}else{l.insertAfter(C,y)}}}while(C){if(C===x){l.setOuterHTML(F,new c.html.Serializer({},n.schema).serialize(n.parser.parse(l.getOuterHTML(F))));break}F=C;C=C.parentNode}C=l.select("#__mce")[0];if(C){y=v(C,x)||v(C,x,true);l.remove(C);if(y){u=l.createRng();if(y.nodeType==3){u.setStart(y,y.length);u.setEnd(y,y.length)}else{if(y.nodeName=="BR"){u.setStartBefore(y);u.setEndBefore(y)}else{u.setStartAfter(y);u.setEndAfter(y)}}p.setRng(u);if(!c.isIE){y=l.create("span",null,"\u00a0");u.insertNode(y);A=l.getRect(y);G=l.getViewPort(n.getWin());if((A.y>G.y+G.h||A.yG.x+G.w||A.x")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(x,v,u){n.execCommand("mceInsertContent",false,u.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(A,z,y){var x=l.getParent(p.getNode(),"a"),v,u;if(c.is(y,"string")){y={href:y}}y.href=y.href.replace(" ","%20");if(!x){if(c.isWebKit){v=l.getParent(p.getNode(),"img");if(v){u=v.style.cssFloat;v.style.cssFloat=null}}f("CreateLink",b,"javascript:mctmp(0);");if(u){v.style.cssFloat=u}d(l.select("a[href='javascript:mctmp(0);']"),function(B){l.setAttribs(B,y)})}else{if(y.href){l.setAttribs(x,y)}else{n.dom.remove(x,a)}}},selectAll:function(){var v=l.getRoot(),u=l.createRng();u.setStart(v,0);u.setEnd(v,v.childNodes.length);n.selection.setRng(u)}});t({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(u){return s("align"+u.substring(7))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(u){return s(u)},mceBlockQuote:function(){return s("blockquote")},Outdent:function(){var u;if(k.inline_styles){if((u=l.getParent(p.getStart(),l.isBlock))&&parseInt(u.style.paddingLeft)>0){return a}if((u=l.getParent(p.getEnd(),l.isBlock))&&parseInt(u.style.paddingLeft)>0){return a}}return m("InsertUnorderedList")||m("InsertOrderedList")||(!k.inline_styles&&!!l.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(u){return l.getParent(p.getNode(),u=="insertunorderedlist"?"UL":"OL")}},"state");t({"FontSize,FontName":function(x){var v=0,u;if(u=l.getParent(p.getNode(),"span")){if(x=="fontsize"){v=u.style.fontSize}else{v=u.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return v}},"value");if(k.custom_undo_redo){t({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}}})(tinymce);(function(b){var a=b.util.Dispatcher;b.UndoManager=function(e){var c,d=0,g=[];function f(){return b.trim(e.getContent({format:"raw",no_events:1}))}return c={typing:false,onAdd:new a(c),onUndo:new a(c),onRedo:new a(c),beforeChange:function(){if(g[d]){g[d].beforeBookmark=e.selection.getBookmark(2,true)}},add:function(l){var h,j=e.settings,k;l=l||{};l.content=f();k=g[d];if(k&&k.content==l.content){return null}if(j.custom_undo_redo_levels){if(g.length>j.custom_undo_redo_levels){for(h=0;h0){j=g[--d];e.setContent(j.content,{format:"raw"});e.selection.moveToBookmark(j.beforeBookmark);c.onUndo.dispatch(c,j)}return j},redo:function(){var h;if(d0||this.typing},hasRedo:function(){return d');q.replace(p,m);o.select(p,1)}return g}return d}l.create("tinymce.ForceBlocks",{ForceBlocks:function(m){var n=this,o=m.settings,p;n.editor=m;n.dom=m.dom;p=(o.forced_root_block||"p").toLowerCase();o.element=p.toUpperCase();m.onPreInit.add(n.setup,n);if(o.forced_root_block){m.onInit.add(n.forceRoots,n);m.onSetContent.add(n.forceRoots,n);m.onBeforeGetContent.add(n.forceRoots,n);m.onExecCommand.add(function(q,r){if(r=="mceInsertContent"){n.forceRoots();q.nodeChanged()}})}},setup:function(){var n=this,m=n.editor,p=m.settings,r=m.dom,o=m.selection;if(p.forced_root_block){m.onBeforeExecCommand.add(n.forceRoots,n);m.onKeyUp.add(n.forceRoots,n);m.onPreProcess.add(n.forceRoots,n)}if(p.force_br_newlines){if(c){m.onKeyPress.add(function(s,t){var u;if(t.keyCode==13&&o.getNode().nodeName!="LI"){o.setContent('
    ',{format:"raw"});u=r.get("__");u.removeAttribute("id");o.select(u);o.collapse();return j.cancel(t)}})}}if(p.force_p_newlines){if(!c){m.onKeyPress.add(function(s,t){if(t.keyCode==13&&!t.shiftKey&&!n.insertPara(t)){j.cancel(t)}})}else{l.addUnload(function(){n._previousFormats=0});m.onKeyPress.add(function(s,t){n._previousFormats=0;if(t.keyCode==13&&!t.shiftKey&&s.selection.isCollapsed()&&p.keep_styles){n._previousFormats=k(s.selection.getStart())}});m.onKeyUp.add(function(t,v){if(v.keyCode==13&&!v.shiftKey){var u=t.selection.getStart(),s=n._previousFormats;if(!u.hasChildNodes()&&s){u=r.getParent(u,r.isBlock);if(u&&u.nodeName!="LI"){u.innerHTML="";if(n._previousFormats){u.appendChild(s.wrapper);s.inner.innerHTML="\uFEFF"}else{u.innerHTML="\uFEFF"}o.select(u,1);o.collapse(true);t.getDoc().execCommand("Delete",false,null);n._previousFormats=0}}}})}if(a){m.onKeyDown.add(function(s,t){if((t.keyCode==8||t.keyCode==46)&&!t.shiftKey){n.backspaceDelete(t,t.keyCode==8)}})}}if(l.isWebKit){function q(t){var s=o.getRng(),u,y=r.create("div",null," "),x,v=r.getViewPort(t.getWin()).h;s.insertNode(u=r.create("br"));s.setStartAfter(u);s.setEndAfter(u);o.setRng(s);if(o.getSel().focusNode==u.previousSibling){o.select(r.insertAfter(r.doc.createTextNode("\u00a0"),u));o.collapse(d)}r.insertAfter(y,u);x=r.getPos(y).y;r.remove(y);if(x>v){t.getWin().scrollTo(0,x)}}m.onKeyPress.add(function(s,t){if(t.keyCode==13&&(t.shiftKey||(p.force_br_newlines&&!r.getParent(o.getNode(),"h1,h2,h3,h4,h5,h6,ol,ul")))){q(s);j.cancel(t)}})}if(c){if(p.element!="P"){m.onKeyPress.add(function(s,t){n.lastElm=o.getNode().nodeName});m.onKeyUp.add(function(t,u){var x,v=o.getNode(),s=t.getBody();if(s.childNodes.length===1&&v.nodeName=="P"){v=r.rename(v,p.element);o.select(v);o.collapse();t.nodeChanged()}else{if(u.keyCode==13&&!u.shiftKey&&n.lastElm!="P"){x=r.getParent(v,"p");if(x){r.rename(x,p.element);t.nodeChanged()}}}})}}},find:function(u,p,q){var o=this.editor,m=o.getDoc().createTreeWalker(u,4,null,g),r=-1;while(u=m.nextNode()){r++;if(p==0&&u==q){return r}if(p==1&&r==q){return u}}return -1},forceRoots:function(v,H){var y=this,v=y.editor,L=v.getBody(),I=v.getDoc(),O=v.selection,z=O.getSel(),A=O.getRng(),M=-2,u,F,m,o,J=-16777215;var K,p,N,E,B,q=L.childNodes,D,C,x;for(D=q.length-1;D>=0;D--){K=q[D];if(K.nodeType===1&&K.getAttribute("data-mce-type")){p=null;continue}if(K.nodeType===3||(!y.dom.isBlock(K)&&K.nodeType!==8&&!/^(script|mce:script|style|mce:style)$/i.test(K.nodeName))){if(!p){if(K.nodeType!=3||/[^\s]/g.test(K.nodeValue)){if(M==-2&&A){if(!c||A.setStart){if(A.startContainer.nodeType==1&&(C=A.startContainer.childNodes[A.startOffset])&&C.nodeType==1){x=C.getAttribute("id");C.setAttribute("id","__mce")}else{if(v.dom.getParent(A.startContainer,function(n){return n===L})){F=A.startOffset;m=A.endOffset;M=y.find(L,0,A.startContainer);u=y.find(L,0,A.endContainer)}}}else{if(A.item){o=I.body.createTextRange();o.moveToElementText(A.item(0));A=o}o=I.body.createTextRange();o.moveToElementText(L);o.collapse(1);N=o.move("character",J)*-1;o=A.duplicate();o.collapse(1);E=o.move("character",J)*-1;o=A.duplicate();o.collapse(0);B=(o.move("character",J)*-1)-E;M=E-N;u=B}}p=v.dom.create(v.settings.forced_root_block);K.parentNode.replaceChild(p,K);p.appendChild(K)}}else{if(p.hasChildNodes()){p.insertBefore(K,p.firstChild)}else{p.appendChild(K)}}}else{p=null}}if(M!=-2){if(!c||A.setStart){p=L.getElementsByTagName(v.settings.element)[0];A=I.createRange();if(M!=-1){A.setStart(y.find(L,1,M),F)}else{A.setStart(p,0)}if(u!=-1){A.setEnd(y.find(L,1,u),m)}else{A.setEnd(p,0)}if(z){z.removeAllRanges();z.addRange(A)}}else{try{A=z.createRange();A.moveToElementText(L);A.collapse(1);A.moveStart("character",M);A.moveEnd("character",u);A.select()}catch(G){}}}else{if((!c||A.setStart)&&(C=v.dom.get("__mce"))){if(x){C.setAttribute("id",x)}else{C.removeAttribute("id")}A=I.createRange();A.setStartBefore(C);A.setEndBefore(C);O.setRng(A)}}},getParentBlock:function(o){var m=this.dom;return m.getParent(o,m.isBlock)},insertPara:function(R){var F=this,v=F.editor,N=v.dom,S=v.getDoc(),W=v.settings,G=v.selection.getSel(),H=G.getRangeAt(0),V=S.body;var K,L,I,P,O,q,o,u,z,m,D,U,p,x,J,M=N.getViewPort(v.getWin()),C,E,B;v.undoManager.beforeChange();K=S.createRange();K.setStart(G.anchorNode,G.anchorOffset);K.collapse(d);L=S.createRange();L.setStart(G.focusNode,G.focusOffset);L.collapse(d);I=K.compareBoundaryPoints(K.START_TO_END,L)<0;P=I?G.anchorNode:G.focusNode;O=I?G.anchorOffset:G.focusOffset;q=I?G.focusNode:G.anchorNode;o=I?G.focusOffset:G.anchorOffset;if(P===q&&/^(TD|TH)$/.test(P.nodeName)){if(P.firstChild.nodeName=="BR"){N.remove(P.firstChild)}if(P.childNodes.length==0){v.dom.add(P,W.element,null,"
    ");U=v.dom.add(P,W.element,null,"
    ")}else{J=P.innerHTML;P.innerHTML="";v.dom.add(P,W.element,null,J);U=v.dom.add(P,W.element,null,"
    ")}H=S.createRange();H.selectNodeContents(U);H.collapse(1);v.selection.setRng(H);return g}if(P==V&&q==V&&V.firstChild&&v.dom.isBlock(V.firstChild)){P=q=P.firstChild;O=o=0;K=S.createRange();K.setStart(P,0);L=S.createRange();L.setStart(q,0)}P=P.nodeName=="HTML"?S.body:P;P=P.nodeName=="BODY"?P.firstChild:P;q=q.nodeName=="HTML"?S.body:q;q=q.nodeName=="BODY"?q.firstChild:q;u=F.getParentBlock(P);z=F.getParentBlock(q);m=u?u.nodeName:W.element;if(J=F.dom.getParent(u,"li,pre")){if(J.nodeName=="LI"){return e(v.selection,F.dom,J)}return d}if(u&&(u.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(N.getStyle(u,"position",1)))){m=W.element;u=null}if(z&&(z.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(N.getStyle(u,"position",1)))){m=W.element;z=null}if(/(TD|TABLE|TH|CAPTION)/.test(m)||(u&&m=="DIV"&&/left|right/gi.test(N.getStyle(u,"float",1)))){m=W.element;u=z=null}D=(u&&u.nodeName==m)?u.cloneNode(0):v.dom.create(m);U=(z&&z.nodeName==m)?z.cloneNode(0):v.dom.create(m);U.removeAttribute("id");if(/^(H[1-6])$/.test(m)&&f(H,u)){U=v.dom.create(W.element)}J=p=P;do{if(J==V||J.nodeType==9||F.dom.isBlock(J)||/(TD|TABLE|TH|CAPTION)/.test(J.nodeName)){break}p=J}while((J=J.previousSibling?J.previousSibling:J.parentNode));J=x=q;do{if(J==V||J.nodeType==9||F.dom.isBlock(J)||/(TD|TABLE|TH|CAPTION)/.test(J.nodeName)){break}x=J}while((J=J.nextSibling?J.nextSibling:J.parentNode));if(p.nodeName==m){K.setStart(p,0)}else{K.setStartBefore(p)}K.setEnd(P,O);D.appendChild(K.cloneContents()||S.createTextNode(""));try{L.setEndAfter(x)}catch(Q){}L.setStart(q,o);U.appendChild(L.cloneContents()||S.createTextNode(""));H=S.createRange();if(!p.previousSibling&&p.parentNode.nodeName==m){H.setStartBefore(p.parentNode)}else{if(K.startContainer.nodeName==m&&K.startOffset==0){H.setStartBefore(K.startContainer)}else{H.setStart(K.startContainer,K.startOffset)}}if(!x.nextSibling&&x.parentNode.nodeName==m){H.setEndAfter(x.parentNode)}else{H.setEnd(L.endContainer,L.endOffset)}H.deleteContents();if(b){v.getWin().scrollTo(0,M.y)}if(D.firstChild&&D.firstChild.nodeName==m){D.innerHTML=D.firstChild.innerHTML}if(U.firstChild&&U.firstChild.nodeName==m){U.innerHTML=U.firstChild.innerHTML}if(N.isEmpty(D)){D.innerHTML="
    "}function T(y,s){var r=[],Y,X,t;y.innerHTML="";if(W.keep_styles){X=s;do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(X.nodeName)){Y=X.cloneNode(g);N.setAttrib(Y,"id","");r.push(Y)}}while(X=X.parentNode)}if(r.length>0){for(t=r.length-1,Y=y;t>=0;t--){Y=Y.appendChild(r[t])}r[0].innerHTML=b?"\u00a0":"
    ";return r[0]}else{y.innerHTML=b?"\u00a0":"
    "}}if(N.isEmpty(U)){B=T(U,q)}if(b&&parseFloat(opera.version())<9.5){H.insertNode(D);H.insertNode(U)}else{H.insertNode(U);H.insertNode(D)}U.normalize();D.normalize();function A(r){return S.createTreeWalker(r,NodeFilter.SHOW_TEXT,null,g).nextNode()||r}H=S.createRange();H.selectNodeContents(a?A(B||U):B||U);H.collapse(1);G.removeAllRanges();G.addRange(H);C=v.dom.getPos(U).y;if(CM.y+M.h){v.getWin().scrollTo(0,C1||!F(ap))&&an===0){c.remove(ap,1);return}if(ag.inline||ag.wrapper){if(!ag.exact&&an===1){ap=ao(ap)}O(ab,function(ar){O(c.select(ar.inline,ap),function(au){var at;if(ar.wrap_links===false){at=au.parentNode;do{if(at.nodeName==="A"){return}}while(at=at.parentNode)}U(ar,af,au,ar.exact?au:null)})});if(x(ap.parentNode,Y,af)){c.remove(ap,1);ap=0;return B}if(ag.merge_with_parents){c.getParent(ap.parentNode,function(ar){if(x(ar,Y,af)){c.remove(ap,1);ap=0;return B}})}if(ap){ap=u(C(ap),ap);ap=u(ap,C(ap,B))}}})}if(ag){if(aa){X=c.createRng();X.setStartBefore(aa);X.setEndAfter(aa);ah(o(X,ab))}else{if(!ac||!ag.inline||c.select("td.mceSelected,th.mceSelected").length){var ai=V.selection.getNode();ae=q.getBookmark();ah(o(q.getRng(B),ab));if(ag.styles&&(ag.styles.color||ag.styles.textDecoration)){a.walk(ai,I,"childNodes");I(ai)}q.moveToBookmark(ae);q.setRng(Z(q.getRng(B)));V.nodeChanged()}else{Q("apply",Y,af)}}}}function A(Y,ah,ab){var ac=R(Y),aj=ac[0],ag,af,X;function aa(am){var al=am.startContainer,ar=am.startOffset,aq,ap,an,ao;if(al.nodeType==3&&ar>=al.nodeValue.length-1){al=al.parentNode;ar=s(al)+1}if(al.nodeType==1){an=al.childNodes;al=an[Math.min(ar,an.length-1)];aq=new t(al);if(ar>an.length-1){aq.next()}for(ap=aq.current();ap;ap=aq.next()){if(ap.nodeType==3&&!f(ap)){ao=c.create("a",null,E);ap.parentNode.insertBefore(ao,ap);am.setStart(ap,0);q.setRng(am);c.remove(ao);return}}}}function Z(ao){var an,am,al;an=a.grep(ao.childNodes);for(am=0,al=ac.length;am=0;Z--){if(P.apply[Z].name==Y){return true}}for(Z=P.remove.length-1;Z>=0;Z--){if(P.remove[Z].name==Y){return false}}return W(q.getNode())}aa=q.getNode();if(W(aa)){return B}X=q.getStart();if(X!=aa){if(W(X)){return B}}return S}function v(ad,ac){var aa,ab=[],Z={},Y,X,W;if(q.isCollapsed()){for(X=0;X=0;Y--){W=ad[X];if(P.remove[Y].name==W){Z[W]=true;break}}}for(Y=P.apply.length-1;Y>=0;Y--){for(X=0;X=0;X--){W=ac[X].selector;if(!W){return B}for(ab=Y.length-1;ab>=0;ab--){if(c.is(Y[ab],W)){return B}}}}return S}a.extend(this,{get:R,register:k,apply:T,remove:A,toggle:D,match:j,matchAll:v,matchNode:x,canApply:y});function h(W,X){if(g(W,X.inline)){return B}if(g(W,X.block)){return B}if(X.selector){return c.is(W,X.selector)}}function g(X,W){X=X||"";W=W||"";X=""+(X.nodeName||X);W=""+(W.nodeName||W);return X.toLowerCase()==W.toLowerCase()}function L(X,W){var Y=c.getStyle(X,W);if(W=="color"||W=="backgroundColor"){Y=c.toHex(Y)}if(W=="fontWeight"&&Y==700){Y="bold"}return""+Y}function r(W,X){if(typeof(W)!="string"){W=W(X)}else{if(X){W=W.replace(/%(\w+)/g,function(Z,Y){return X[Y]||Z})}}return W}function f(W){return W&&W.nodeType===3&&/^([\s\r\n]+|)$/.test(W.nodeValue)}function N(Y,X,W){var Z=c.create(X,W);Y.parentNode.insertBefore(Z,Y);Z.appendChild(Y);return Z}function o(W,ag,Z){var Y=W.startContainer,ad=W.startOffset,aj=W.endContainer,ae=W.endOffset,ai,af,ac;function ah(am,an,ak,al){var ao,ap;al=al||c.getRoot();for(;;){ao=am.parentNode;if(ao==al||(!ag[0].block_expand&&F(ao))){return am}for(ai=ao[an];ai&&ai!=am;ai=ai[ak]){if(ai.nodeType==1&&!H(ai)){return am}if(ai.nodeType==3&&!f(ai)){return am}}am=am.parentNode}return am}function ab(ak,al){if(al===p){al=ak.nodeType===3?ak.length:ak.childNodes.length}while(ak&&ak.hasChildNodes()){ak=ak.childNodes[al];if(ak){al=ak.nodeType===3?ak.length:ak.childNodes.length}}return{node:ak,offset:al}}if(Y.nodeType==1&&Y.hasChildNodes()){af=Y.childNodes.length-1;Y=Y.childNodes[ad>af?af:ad];if(Y.nodeType==3){ad=0}}if(aj.nodeType==1&&aj.hasChildNodes()){af=aj.childNodes.length-1;aj=aj.childNodes[ae>af?af:ae-1];if(aj.nodeType==3){ae=aj.nodeValue.length}}if(H(Y.parentNode)){Y=Y.parentNode}if(H(Y)){Y=Y.nextSibling||Y}if(H(aj.parentNode)){ae=c.nodeIndex(aj);aj=aj.parentNode}if(H(aj)&&aj.previousSibling){aj=aj.previousSibling;ae=aj.length}if(ag[0].inline){ac=ab(aj,ae);if(ac.node){while(ac.node&&ac.offset===0&&ac.node.previousSibling){ac=ab(ac.node.previousSibling)}if(ac.node&&ac.offset>0&&ac.node.nodeType===3&&ac.node.nodeValue.charAt(ac.offset-1)===" "){if(ac.offset>1){aj=ac.node;aj.splitText(ac.offset-1)}else{if(ac.node.previousSibling){aj=ac.node.previousSibling}}}}}if(ag[0].inline||ag[0].block_expand){Y=ah(Y,"firstChild","nextSibling");aj=ah(aj,"lastChild","previousSibling")}if(ag[0].selector&&ag[0].expand!==S&&!ag[0].inline){function aa(al,ak){var am,an,ap,ao;if(al.nodeType==3&&al.nodeValue.length==0&&al[ak]){al=al[ak]}am=m(al);for(an=0;anY?Y:Z]}return W}function Q(ab,X,aa){var Y,W=P[ab],ac=P[ab=="apply"?"remove":"apply"];function ad(){return P.apply.length||P.remove.length}function Z(){P.apply=[];P.remove=[]}function ae(af){O(P.apply.reverse(),function(ag){T(ag.name,ag.vars,af);if(ag.name==="forecolor"&&ag.vars.value){I(af.parentNode)}});O(P.remove.reverse(),function(ag){A(ag.name,ag.vars,af)});c.remove(af,1);Z()}for(Y=W.length-1;Y>=0;Y--){if(W[Y].name==X){return}}W.push({name:X,vars:aa});for(Y=ac.length-1;Y>=0;Y--){if(ac[Y].name==X){ac.splice(Y,1)}}if(ad()){V.getDoc().execCommand("FontName",false,"mceinline");P.lastRng=q.getRng();O(c.select("font,span"),function(ag){var af;if(b(ag)){af=q.getBookmark();ae(ag);q.moveToBookmark(af);V.nodeChanged()}});if(!P.isListening&&ad()){P.isListening=true;O("onKeyDown,onKeyUp,onKeyPress,onMouseUp".split(","),function(af){V[af].addToTop(function(ag,ah){if(ad()&&!a.dom.RangeUtils.compareRanges(P.lastRng,q.getRng())){O(c.select("font,span"),function(aj){var ak,ai;if(b(aj)){ak=aj.firstChild;if(ak){ae(aj);ai=c.createRng();ai.setStart(ak,ak.nodeValue.length);ai.setEnd(ak,ak.nodeValue.length);q.setRng(ai);ag.nodeChanged()}else{c.remove(aj)}}});if(ah.type=="keyup"||ah.type=="mouseup"){Z()}}})})}}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;if(c.inline_styles){h=e.explode(c.font_size_style_values);function b(j,i){e.each(i,function(l,k){if(l){g.setStyle(j,k,l)}});g.rename(j,"span")}d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};function f(i,j){g=i.dom;if(c.convert_fonts_to_spans){e.each(g.select("font,u,strike",j.node),function(k){d[k.nodeName.toLowerCase()](a.dom,k)})}}a.onPreProcess.add(f);a.onSetContent.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}}); \ No newline at end of file diff --git a/include/javascript/tiny_mce/tiny_mce_dev.js b/include/javascript/tiny_mce/tiny_mce_dev.js new file mode 100644 index 00000000..e58e8102 --- /dev/null +++ b/include/javascript/tiny_mce/tiny_mce_dev.js @@ -0,0 +1,130 @@ +/** + * tiny_mce_dev.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + * + * This file should only be used while developing TinyMCE + * tiny_mce.js or tiny_mce_src.js should be used in a production environment. + * This file loads the js files from classes instead of a merged copy. + */ + +(function() { + var i, nl = document.getElementsByTagName('script'), base, src, p, li, query = '', it, scripts = []; + + if (window.tinyMCEPreInit) { + base = tinyMCEPreInit.base; + query = tinyMCEPreInit.query || ''; + } else { + for (i=0; i\n'; + + document.write(html); + }; + + // Firebug + if (query.debug) + include('firebug/firebug-lite.js'); + + // Core ns + include('tinymce.js'); + + // Load framework adapter + if (query.api) + include('adapter/' + query.api + '/adapter.js'); + + // tinymce.util.* + include('util/Dispatcher.js'); + include('util/URI.js'); + include('util/Cookie.js'); + include('util/JSON.js'); + include('util/JSONP.js'); + include('util/XHR.js'); + include('util/JSONRequest.js'); + + // tinymce.html.* + include('html/Entities.js'); + include('html/Styles.js'); + include('html/Schema.js'); + include('html/SaxParser.js'); + include('html/Node.js'); + include('html/DomParser.js'); + include('html/Serializer.js'); + include('html/Writer.js'); + + // tinymce.dom.* + include('dom/DOMUtils.js'); + include('dom/Range.js'); + include('dom/TridentSelection.js'); + include('dom/Sizzle.js'); + include('dom/EventUtils.js'); + include('dom/Element.js'); + include('dom/Selection.js'); + include('dom/Serializer.js'); + include('dom/ScriptLoader.js'); + include('dom/TreeWalker.js'); + include('dom/RangeUtils.js'); + + // tinymce.ui.* + include('ui/KeyboardNavigation.js'); + include('ui/Control.js'); + include('ui/Container.js'); + include('ui/Separator.js'); + include('ui/MenuItem.js'); + include('ui/Menu.js'); + include('ui/DropMenu.js'); + include('ui/Button.js'); + include('ui/ListBox.js'); + include('ui/NativeListBox.js'); + include('ui/MenuButton.js'); + include('ui/SplitButton.js'); + include('ui/ColorSplitButton.js'); + include('ui/ToolbarGroup.js'); + include('ui/Toolbar.js'); + + // tinymce.* + include('AddOnManager.js'); + include('EditorManager.js'); + include('Editor.js'); + include('EditorCommands.js'); + include('UndoManager.js'); + include('ForceBlocks.js'); + include('ControlManager.js'); + include('WindowManager.js'); + include('Formatter.js'); + include('LegacyInput.js'); + + load(); +}()); \ No newline at end of file diff --git a/include/javascript/tiny_mce/tiny_mce_jquery.js b/include/javascript/tiny_mce/tiny_mce_jquery.js new file mode 100644 index 00000000..dd271aec --- /dev/null +++ b/include/javascript/tiny_mce/tiny_mce_jquery.js @@ -0,0 +1 @@ +(function(d){var a=/^\s*|\s*$/g,e,c="B".replace(/A(.)|B/,"$1")==="$1";var b={majorVersion:"3",minorVersion:"4.2",releaseDate:"2011-04-07",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;s.isOpera=d.opera&&opera.buildNumber;s.isWebKit=/WebKit/.test(g);s.isIE=!s.isWebKit&&!s.isOpera&&(/MSIE/gi).test(g)&&(/Explorer/gi).test(o.appName);s.isIE6=s.isIE&&/MSIE [56]/.test(g);s.isGecko=!s.isWebKit&&/Gecko/.test(g);s.isMac=g.indexOf("Mac")!=-1;s.isAir=/adobeair/i.test(g);s.isIDevice=/(iPad|iPhone)/.test(g);if(d.tinyMCEPreInit){s.suffix=tinyMCEPreInit.suffix;s.baseURL=tinyMCEPreInit.base;s.query=tinyMCEPreInit.query;return}s.suffix="";f=q.getElementsByTagName("base");for(m=0;m=c.length){for(e=0,b=g.length;e=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length=g.length||g[e]!=c[e]){f=e+1;break}}}if(f==1){return h}for(e=0,b=g.length-(f-1);e=0;c--){if(f[c].length==0||f[c]=="."){continue}if(f[c]==".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!=0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(e,b){var c=new Date();c.setTime(c.getTime()-1000);this.set(e,"",c,b,c)}})})();(function(){function serialize(o,quote){var i,v,t;quote=quote||'"';if(o==null){return"null"}t=typeof o;if(t=="string"){v="\bb\tt\nn\ff\rr\"\"''\\\\";return quote+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,b){if(quote==='"'&&a==="'"){return a}i=v.indexOf(b);if(i+1){return"\\"+v.charAt(i+1)}a=b.charCodeAt().toString(16);return"\\u"+"0000".substring(a.length)+a})+quote}if(t=="object"){if(o.hasOwnProperty&&o instanceof Array){for(i=0,v="[";i0?",":"")+serialize(o[i],quote)}return v+"]"}v="{";for(i in o){v+=typeof o[i]!="function"?(v.length>1?","+quote:quote)+i+quote+":"+serialize(o[i],quote):""}return v+"}"}return""+o}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}})();tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){if(e){e.call(f.error_scope||f.scope,h,g)}};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(j){var a,g,d,k=/[&\"\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/[<>&\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\"\']/g,c=/&(#)?([\w]+);/g,i={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};g={'"':""","'":"'","<":"<",">":">","&":"&"};d={"<":"<",">":">","&":"&",""":'"',"'":"'"};function h(l){var m;m=document.createElement("div");m.innerHTML=l;return m.textContent||m.innerText||l}function e(m,p){var n,o,l,q={};if(m){m=m.split(",");p=p||10;for(n=0;n1){return"&#"+(((n.charCodeAt(0)-55296)*1024)+(n.charCodeAt(1)-56320)+65536)+";"}return g[n]||"&#"+n.charCodeAt(0)+";"})},encodeNamed:function(n,l,m){m=m||a;return n.replace(l?k:b,function(o){return g[o]||m[o]||o})},getEncodeFunc:function(l,o){var p=j.html.Entities;o=e(o)||a;function m(r,q){return r.replace(q?k:b,function(s){return g[s]||o[s]||"&#"+s.charCodeAt(0)+";"||s})}function n(r,q){return p.encodeNamed(r,q,o)}l=j.makeMap(l.replace(/\+/g,","));if(l.named&&l.numeric){return m}if(l.named){if(o){return n}return p.encodeNamed}if(l.numeric){return p.encodeNumeric}return p.encodeRaw},decode:function(l){return l.replace(c,function(n,m,o){if(m){o=parseInt(o);if(o>65535){o-=65536;return String.fromCharCode(55296+(o>>10),56320+(o&1023))}else{return i[o]||String.fromCharCode(o)}}return d[n]||a[n]||h(n)})}}})(tinymce);tinymce.html.Styles=function(d,f){var k=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,h=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,b=/\s*([^:]+):\s*([^;]+);?/g,l=/\s+$/,m=/rgb/,e,g,a={},j;d=d||{};j="\\\" \\' \\; \\: ; : _".split(" ");for(g=0;g1?r:"0"+r}return"#"+o(q)+o(p)+o(i)}return{toHex:function(i){return i.replace(k,c)},parse:function(r){var y={},p,n,v,q,u=d.url_converter,x=d.url_converter_scope||this;function o(C,F){var E,B,A,D;E=y[C+"-top"+F];if(!E){return}B=y[C+"-right"+F];if(E!=B){return}A=y[C+"-bottom"+F];if(B!=A){return}D=y[C+"-left"+F];if(A!=D){return}y[C+F]=D;delete y[C+"-top"+F];delete y[C+"-right"+F];delete y[C+"-bottom"+F];delete y[C+"-left"+F]}function t(B){var C=y[B],A;if(!C||C.indexOf(" ")<0){return}C=C.split(" ");A=C.length;while(A--){if(C[A]!==C[0]){return false}}y[B]=C[0];return true}function z(C,B,A,D){if(!t(B)){return}if(!t(A)){return}if(!t(D)){return}y[C]=y[B]+" "+y[A]+" "+y[D];delete y[B];delete y[A];delete y[D]}function s(A){q=true;return a[A]}function i(B,A){if(q){B=B.replace(/_[0-9]/g,function(C){return a[C]})}if(!A){B=B.replace(/\\([\'\";:])/g,"$1")}return B}if(r){r=r.replace(/\\[\"\';:_]/g,s).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(A){return A.replace(/[;:]/g,s)});while(p=b.exec(r)){n=p[1].replace(l,"").toLowerCase();v=p[2].replace(l,"");if(n&&v.length>0){if(n==="font-weight"&&v==="700"){v="bold"}else{if(n==="color"||n==="background-color"){v=v.toLowerCase()}}v=v.replace(k,c);v=v.replace(h,function(B,A,E,D,F,C){F=F||C;if(F){F=i(F);return"'"+F.replace(/\'/g,"\\'")+"'"}A=i(A||E||D);if(u){A=u.call(x,A,"style")}return"url('"+A.replace(/\'/g,"\\'")+"')"});y[n]=q?i(v,true):v}b.lastIndex=p.index+p[0].length}o("border","");o("border","-width");o("border","-color");o("border","-style");o("padding","");o("margin","");z("border","border-width","border-style","border-color");if(y.border==="medium none"){delete y.border}}return y},serialize:function(p,r){var o="",n,q;function i(t){var x,u,s,t,v;x=f.styles[t];if(x){for(u=0,s=x.length;u0){o+=(o.length>0?" ":"")+t+": "+v+";"}}}}if(r&&f&&f.styles){i("*");i(n)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(l){var g={},i,k,f,d,b,e,c=l.makeMap,j=l.each;function h(n,m){return n.split(m||",")}function a(q,p){var n,o={};function m(r){return r.replace(/[A-Z]+/g,function(s){return m(q[s])})}for(n in q){if(q.hasOwnProperty(n)){q[n]=m(q[n])}}m(p).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(u,s,r,t){r=h(r,"|");o[s]={attributes:c(r),attributesOrder:r,children:c(t,"|",{"#comment":{}})}});return o}k="h1,h2,h3,h4,h5,h6,hr,p,div,address,pre,form,table,tbody,thead,tfoot,th,tr,td,li,ol,ul,caption,blockquote,center,dl,dt,dd,dir,fieldset,noscript,menu,isindex,samp,header,footer,article,section,hgroup";k=c(k,",",c(k.toUpperCase()));g=a({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]");i=c("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,preload,autoplay,loop,controls");f=c("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,source");d=l.extend(c("td,th,iframe,video,object"),f);b=c("pre,script,style");e=c("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");l.html.Schema=function(p){var x=this,m={},n={},u=[],o;p=p||{};if(p.verify_html===false){p.valid_elements="*[*]"}if(p.valid_styles){o={};j(p.valid_styles,function(z,y){o[y]=l.explode(z)})}function v(y){return new RegExp("^"+y.replace(/([?+*])/g,".$1")+"$")}function r(F){var E,A,T,P,U,z,C,O,R,K,S,W,I,D,Q,y,M,B,V,X,J,N,H=/^([#+-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,L=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,G=/[*?+]/;if(F){F=h(F);if(m["@"]){M=m["@"].attributes;B=m["@"].attributesOrder}for(E=0,A=F.length;E=0){for(P=l.length-1;P>=Q;P--){O=l[P];if(O.valid){A.end(O.name)}}l.length=Q}}D=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([^\\s\\/<>]+)\\s*((?:[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*)>))","g");h=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:\\.|[^\"])*)\")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?/g;g={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi};F=e.getShortEndedElements();z=e.getSelfClosingElements();k=e.getBoolAttrs();x=c.validate;y=c.fix_self_closing;while(f=D.exec(q)){if(m0&&l[l.length-1].name===G){C(G)}if(!x||(I=e.getElementRule(G))){r=true;if(x){J=I.attributes;n=I.attributePatterns}if(o=f[8]){B=[];B.map={};o.replace(h,function(P,O,T,S,R){var U,Q;O=O.toLowerCase();T=O in k?O:v(T||S||R||"");if(x&&O.indexOf("data-")!==0){U=J[O];if(!U&&n){Q=n.length;while(Q--){U=n[Q];if(U.pattern.test(O)){break}}if(Q===-1){U=null}}if(!U){return}if(U.validValues&&!(T in U.validValues)){return}}B.map[O]=T;B.push({name:O,value:T})})}else{B=[];B.map={}}if(x){H=I.attributesRequired;M=I.attributesDefault;L=I.attributesForced;if(L){K=L.length;while(K--){E=L[K];N=E.name;u=E.value;if(u==="{$uid}"){u="mce_"+s++}B.map[N]=u;B.push({name:N,value:u})}}if(M){K=M.length;while(K--){E=M[K];N=E.name;if(!(N in B.map)){u=E.value;if(u==="{$uid}"){u="mce_"+s++}B.map[N]=u;B.push({name:N,value:u})}}}if(H){K=H.length;while(K--){if(H[K] in B.map){break}}if(K===-1){r=false}}if(B.map["data-mce-bogus"]){r=false}}if(r){A.start(G,B,p)}}else{r=false}if(j=g[G]){j.lastIndex=m=f.index+f[0].length;if(f=j.exec(q)){if(r){t=q.substr(m,f.index-m)}m=f.index+f[0].length}else{t=q.substr(m);m=q.length}if(r&&t.length>0){A.text(t,true)}if(r){A.end(G)}D.lastIndex=m;continue}if(!p){if(!o||o.indexOf("/")!=o.length-1){l.push({name:G,valid:r})}else{if(r){A.end(G)}}}}else{if(G=f[1]){A.comment(G)}else{if(G=f[2]){A.cdata(G)}else{if(G=f[3]){A.doctype(G)}else{if(G=f[4]){A.pi(G,f[5])}}}}}}m=f.index+f[0].length}if(m=0;K--){G=l[K];if(G.valid){A.end(G.name)}}}}})(tinymce);(function(d){var c=/^[ \t\r\n]*$/,e={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};function a(k,l,j){var i,h,f=j?"lastChild":"firstChild",g=j?"prev":"next";if(k[f]){return k[f]}if(k!==l){i=k[g];if(i){return i}for(h=k.parent;h&&h!==l;h=h.parent){i=h[g];if(i){return i}}}}function b(f,g){this.name=f;this.type=g;if(g===1){this.attributes=[];this.attributes.map={}}}d.extend(b.prototype,{replace:function(g){var f=this;if(g.parent){g.remove()}f.insert(g,f);f.remove();return f},attr:function(h,l){var f=this,g,j,k;if(typeof h!=="string"){for(j in h){f.attr(j,h[j])}return f}if(g=f.attributes){if(l!==k){if(l===null){if(h in g.map){delete g.map[h];j=g.length;while(j--){if(g[j].name===h){g=g.splice(j,1);return f}}}return f}if(h in g.map){j=g.length;while(j--){if(g[j].name===h){g[j].value=l;break}}}else{g.push({name:h,value:l})}g.map[h]=l;return f}else{return g.map[h]}}},clone:function(){var g=this,n=new b(g.name,g.type),h,f,m,j,k;if(m=g.attributes){k=[];k.map={};for(h=0,f=m.length;h1){v.reverse();z=n=f.filterNode(v[0].clone());for(t=0;t0){L.value=l;L=L.prev}else{J=L.prev;L.remove();L=J}}}n=new b.html.SaxParser({validate:x,fix_self_closing:!x,cdata:function(l){z.append(G("#cdata",4)).value=l},text:function(K,l){var J;if(!r[z.name]){K=K.replace(k," ");if(z.lastChild&&o[z.lastChild.name]){K=K.replace(C,"")}}if(K.length!==0){J=G("#text",3);J.raw=!!l;z.append(J).value=K}},comment:function(l){z.append(G("#comment",8)).value=l},pi:function(l,J){z.append(G(l,7)).value=J;E(z)},doctype:function(J){var l;l=z.append(G("#doctype",10));l.value=J;E(z)},start:function(l,R,K){var P,M,L,J,N,S,Q,O;L=x?h.getElementRule(l):{};if(L){P=G(L.outputName||l,1);P.attributes=R;P.shortEnded=K;z.append(P);O=p[z.name];if(O&&p[P.name]&&!O[P.name]){H.push(P)}M=d.length;while(M--){N=d[M].name;if(N in R.map){D=c[N];if(D){D.push(P)}else{c[N]=[P]}}}if(o[l]){E(P)}if(!K){z=P}}},end:function(l){var N,K,M,J,L;K=x?h.getElementRule(l):{};if(K){if(o[l]){if(!r[z.name]){for(N=z.firstChild;N&&N.type===3;){M=N.value.replace(C,"");if(M.length>0){N.value=M;N=N.next}else{J=N.next;N.remove();N=J}}for(N=z.lastChild;N&&N.type===3;){M=N.value.replace(s,"");if(M.length>0){N.value=M;N=N.prev}else{J=N.prev;N.remove();N=J}}}N=z.prev;if(N&&N.type===3){M=N.value.replace(C,"");if(M.length>0){N.value=M}else{N.remove()}}}if(K.removeEmpty||K.paddEmpty){if(z.isEmpty(t)){if(K.paddEmpty){z.empty().append(new a("#text","3")).value="\u00a0"}else{if(!z.attributes.map.name){L=z.parent;z.empty().remove();z=L;return}}}}z=z.parent}}},h);F=z=new a(g.root_name,11);n.parse(u);if(x){j(H)}for(I in i){D=e[I];y=i[I];v=y.length;while(v--){if(!y[v].parent){y.splice(v,1)}}for(B=0,A=D.length;B0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}c.push("<",m);if(k){for(n=0,j=k.length;n0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}},end:function(h){var i;c.push("");if(a&&d[h]&&c.length>0){i=c[c.length-1];if(i.length>0&&i!=="\n"){c.push("\n")}}},text:function(i,h){if(i.length>0){c[c.length]=h?i:f(i)}},cdata:function(h){c.push("")},comment:function(h){c.push("")},pi:function(h,i){if(i){c.push("")}else{c.push("")}if(a){c.push("\n")}},doctype:function(h){c.push("",a?"\n":"")},reset:function(){c.length=0},getContent:function(){return c.join("").replace(/\n$/,"")}}};(function(a){a.html.Serializer=function(c,d){var b=this,e=new a.html.Writer(c);c=c||{};c.validate="validate" in c?c.validate:true;b.schema=d=d||new a.html.Schema();b.writer=e;b.serialize=function(h){var g,i;i=c.validate;g={3:function(k,j){e.text(k.value,k.raw)},8:function(j){e.comment(j.value)},7:function(j){e.pi(j.name,j.value)},10:function(j){e.doctype(j.value)},4:function(j){e.cdata(j.value)},11:function(j){if((j=j.firstChild)){do{f(j)}while(j=j.next)}}};e.reset();function f(k){var t=g[k.type],j,o,s,r,p,u,n,m,q;if(!t){j=k.name;o=k.shortEnded;s=k.attributes;if(i&&s&&s.length>1){u=[];u.map={};q=d.getElementRule(k.name);for(n=0,m=q.attributesOrder.length;n=8;k.boxModel=!h.isIE||n.compatMode=="CSS1Compat"||k.stdMode;k.hasOuterHTML="outerHTML" in n.createElement("a");k.settings=l=h.extend({keep_values:false,hex_colors:1},l);k.schema=l.schema;k.styles=new h.html.Styles({url_converter:l.url_converter,url_converter_scope:l.url_converter_scope},l.schema);if(h.isIE6){try{n.execCommand("BackgroundImageCache",false,true)}catch(m){k.cssFlicker=true}}if(b){("abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video").replace(/\w+/g,function(o){n.createElement(o)})}h.addUnload(k.destroy,k)},getRoot:function(){var j=this,k=j.settings;return(k&&j.get(k.root_element))||j.doc.body},getViewPort:function(k){var l,j;k=!k?this.win:k;l=k.document;j=this.boxModel?l.documentElement:l.body;return{x:k.pageXOffset||j.scrollLeft,y:k.pageYOffset||j.scrollTop,w:k.innerWidth||j.clientWidth,h:k.innerHeight||j.clientHeight}},getRect:function(m){var l,j=this,k;m=j.get(m);l=j.getPos(m);k=j.getSize(m);return{x:l.x,y:l.y,w:k.w,h:k.h}},getSize:function(m){var k=this,j,l;m=k.get(m);j=k.getStyle(m,"width");l=k.getStyle(m,"height");if(j.indexOf("px")===-1){j=0}if(l.indexOf("px")===-1){l=0}return{w:parseInt(j)||m.offsetWidth||m.clientWidth,h:parseInt(l)||m.offsetHeight||m.clientHeight}},getParent:function(l,k,j){return this.getParents(l,k,j,false)},getParents:function(u,p,l,s){var k=this,j,m=k.settings,q=[];u=k.get(u);s=s===undefined;if(m.strict_root){l=l||k.getRoot()}if(e(p,"string")){j=p;if(p==="*"){p=function(o){return o.nodeType==1}}else{p=function(o){return k.is(o,j)}}}while(u){if(u==l||!u.nodeType||u.nodeType===9){break}if(!p||p(u)){if(s){q.push(u)}else{return u}}u=u.parentNode}return s?q:null},get:function(j){var k;if(j&&this.doc&&typeof(j)=="string"){k=j;j=this.doc.getElementById(j);if(j&&j.id!==k){return this.doc.getElementsByName(k)[1]}}return j},getNext:function(k,j){return this._findSib(k,j,"nextSibling")},getPrev:function(k,j){return this._findSib(k,j,"previousSibling")},add:function(m,q,j,l,o){var k=this;return this.run(m,function(s){var r,n;r=e(q,"string")?k.doc.createElement(q):q;k.setAttribs(r,j);if(l){if(l.nodeType){r.appendChild(l)}else{k.setHTML(r,l)}}return !o?s.appendChild(r):r})},create:function(l,j,k){return this.add(this.doc.createElement(l),l,j,k,1)},createHTML:function(r,j,p){var q="",m=this,l;q+="<"+r;for(l in j){if(j.hasOwnProperty(l)){q+=" "+l+'="'+m.encode(j[l])+'"'}}if(typeof(p)!="undefined"){return q+">"+p+""}return q+" />"},remove:function(j,k){return this.run(j,function(m){var n,l=m.parentNode;if(!l){return null}if(k){while(n=m.firstChild){if(!h.isIE||n.nodeType!==3||n.nodeValue){l.insertBefore(n,m)}else{m.removeChild(n)}}}return l.removeChild(m)})},setStyle:function(m,j,k){var l=this;return l.run(m,function(p){var o,n;o=p.style;j=j.replace(/-(\D)/g,function(r,q){return q.toUpperCase()});if(l.pixelStyles.test(j)&&(h.is(k,"number")||/^[\-0-9\.]+$/.test(k))){k+="px"}switch(j){case"opacity":if(b){o.filter=k===""?"":"alpha(opacity="+(k*100)+")";if(!m.currentStyle||!m.currentStyle.hasLayout){o.display="inline-block"}}o[j]=o["-moz-opacity"]=o["-khtml-opacity"]=k||"";break;case"float":b?o.styleFloat=k:o.cssFloat=k;break;default:o[j]=k||""}if(l.settings.update_styles){l.setAttrib(p,"data-mce-style")}})},getStyle:function(m,j,l){m=this.get(m);if(!m){return}if(this.doc.defaultView&&l){j=j.replace(/[A-Z]/g,function(n){return"-"+n});try{return this.doc.defaultView.getComputedStyle(m,null).getPropertyValue(j)}catch(k){return null}}j=j.replace(/-(\D)/g,function(o,n){return n.toUpperCase()});if(j=="float"){j=b?"styleFloat":"cssFloat"}if(m.currentStyle&&l){return m.currentStyle[j]}return m.style?m.style[j]:undefined},setStyles:function(m,n){var k=this,l=k.settings,j;j=l.update_styles;l.update_styles=0;f(n,function(o,p){k.setStyle(m,p,o)});l.update_styles=j;if(l.update_styles){k.setAttrib(m,l.cssText)}},removeAllAttribs:function(j){return this.run(j,function(m){var l,k=m.attributes;for(l=k.length-1;l>=0;l--){m.removeAttributeNode(k.item(l))}})},setAttrib:function(l,m,j){var k=this;if(!l||!m){return}if(k.settings.strict){m=m.toLowerCase()}return this.run(l,function(o){var n=k.settings;switch(m){case"style":if(!e(j,"string")){f(j,function(p,q){k.setStyle(o,q,p)});return}if(n.keep_values){if(j&&!k._isRes(j)){o.setAttribute("data-mce-style",j,2)}else{o.removeAttribute("data-mce-style",2)}}o.style.cssText=j;break;case"class":o.className=j||"";break;case"src":case"href":if(n.keep_values){if(n.url_converter){j=n.url_converter.call(n.url_converter_scope||k,j,m,o)}k.setAttrib(o,"data-mce-"+m,j,2)}break;case"shape":o.setAttribute("data-mce-style",j);break}if(e(j)&&j!==null&&j.length!==0){o.setAttribute(m,""+j,2)}else{o.removeAttribute(m,2)}})},setAttribs:function(k,l){var j=this;return this.run(k,function(m){f(l,function(o,p){j.setAttrib(m,p,o)})})},getAttrib:function(m,o,l){var j,k=this;m=k.get(m);if(!m||m.nodeType!==1){return false}if(!e(l)){l=""}if(/^(src|href|style|coords|shape)$/.test(o)){j=m.getAttribute("data-mce-"+o);if(j){return j}}if(b&&k.props[o]){j=m[k.props[o]];j=j&&j.nodeValue?j.nodeValue:j}if(!j){j=m.getAttribute(o,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(o)){if(m[k.props[o]]===true&&j===""){return o}return j?o:""}if(m.nodeName==="FORM"&&m.getAttributeNode(o)){return m.getAttributeNode(o).nodeValue}if(o==="style"){j=j||m.style.cssText;if(j){j=k.serializeStyle(k.parseStyle(j),m.nodeName);if(k.settings.keep_values&&!k._isRes(j)){m.setAttribute("data-mce-style",j)}}}if(d&&o==="class"&&j){j=j.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(o){case"rowspan":case"colspan":if(j===1){j=""}break;case"size":if(j==="+0"||j===20||j===0){j=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(j===0){j=""}break;case"hspace":if(j===-1){j=""}break;case"maxlength":case"tabindex":if(j===32768||j===2147483647||j==="32768"){j=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(j===65535){return o}return l;case"shape":j=j.toLowerCase();break;default:if(o.indexOf("on")===0&&j){j=h._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+j)}}}return(j!==undefined&&j!==null&&j!=="")?""+j:l},getPos:function(s,m){var k=this,j=0,q=0,o,p=k.doc,l;s=k.get(s);m=m||p.body;if(s){if(b&&!k.stdMode){s=s.getBoundingClientRect();o=k.boxModel?p.documentElement:p.body;j=k.getStyle(k.select("html")[0],"borderWidth");j=(j=="medium"||k.boxModel&&!k.isIE6)&&2||j;return{x:s.left+o.scrollLeft-j,y:s.top+o.scrollTop-j}}l=s;while(l&&l!=m&&l.nodeType){j+=l.offsetLeft||0;q+=l.offsetTop||0;l=l.offsetParent}l=s.parentNode;while(l&&l!=m&&l.nodeType){j-=l.scrollLeft||0;q-=l.scrollTop||0;l=l.parentNode}}return{x:j,y:q}},parseStyle:function(j){return this.styles.parse(j)},serializeStyle:function(k,j){return this.styles.serialize(k,j)},loadCSS:function(j){var l=this,m=l.doc,k;if(!j){j=""}k=l.select("head")[0];f(j.split(","),function(n){var o;if(l.files[n]){return}l.files[n]=true;o=l.create("link",{rel:"stylesheet",href:h._addVer(n)});if(b&&m.documentMode&&m.recalc){o.onload=function(){if(m.recalc){m.recalc()}o.onload=null}}k.appendChild(o)})},addClass:function(j,k){return this.run(j,function(l){var m;if(!k){return 0}if(this.hasClass(l,k)){return l.className}m=this.removeClass(l,k);return l.className=(m!=""?(m+" "):"")+k})},removeClass:function(l,m){var j=this,k;return j.run(l,function(o){var n;if(j.hasClass(o,m)){if(!k){k=new RegExp("(^|\\s+)"+m+"(\\s+|$)","g")}n=o.className.replace(k," ");n=h.trim(n!=" "?n:"");o.className=n;if(!n){o.removeAttribute("class");o.removeAttribute("className")}return n}return o.className})},hasClass:function(k,j){k=this.get(k);if(!k||!j){return false}return(" "+k.className+" ").indexOf(" "+j+" ")!==-1},show:function(j){return this.setStyle(j,"display","block")},hide:function(j){return this.setStyle(j,"display","none")},isHidden:function(j){j=this.get(j);return !j||j.style.display=="none"||this.getStyle(j,"display")=="none"},uniqueId:function(j){return(!j?"mce_":j)+(this.counter++)},setHTML:function(l,k){var j=this;return j.run(l,function(n){if(b){while(n.firstChild){n.removeChild(n.firstChild)}try{n.innerHTML="
    "+k;n.removeChild(n.firstChild)}catch(m){n=j.create("div");n.innerHTML="
    "+k;f(n.childNodes,function(p,o){if(o){n.appendChild(p)}})}}else{n.innerHTML=k}return k})},getOuterHTML:function(l){var k,j=this;l=j.get(l);if(!l){return null}if(l.nodeType===1&&j.hasOuterHTML){return l.outerHTML}k=(l.ownerDocument||j.doc).createElement("body");k.appendChild(l.cloneNode(true));return k.innerHTML},setOuterHTML:function(m,k,n){var j=this;function l(p,o,r){var s,q;q=r.createElement("body");q.innerHTML=o;s=q.lastChild;while(s){j.insertAfter(s.cloneNode(true),p);s=s.previousSibling}j.remove(p)}return this.run(m,function(p){p=j.get(p);if(p.nodeType==1){n=n||p.ownerDocument||j.doc;if(b){try{if(b&&p.nodeType==1){p.outerHTML=k}else{l(p,k,n)}}catch(o){l(p,k,n)}}else{l(p,k,n)}}})},decode:c.decode,encode:c.encodeAllRaw,insertAfter:function(j,k){k=this.get(k);return this.run(j,function(m){var l,n;l=k.parentNode;n=k.nextSibling;if(n){l.insertBefore(m,n)}else{l.appendChild(m)}return m})},isBlock:function(k){var j=k.nodeType;if(j){return !!(j===1&&g[k.nodeName])}return !!g[k]},replace:function(p,m,j){var l=this;if(e(m,"array")){p=p.cloneNode(true)}return l.run(m,function(k){if(j){f(h.grep(k.childNodes),function(n){p.appendChild(n)})}return k.parentNode.replaceChild(p,k)})},rename:function(m,j){var l=this,k;if(m.nodeName!=j.toUpperCase()){k=l.create(j);f(l.getAttribs(m),function(n){l.setAttrib(k,n.nodeName,l.getAttrib(m,n.nodeName))});l.replace(k,m,1)}return k||m},findCommonAncestor:function(l,j){var m=l,k;while(m){k=j;while(k&&m!=k){k=k.parentNode}if(m==k){break}m=m.parentNode}if(!m&&l.ownerDocument){return l.ownerDocument.documentElement}return m},toHex:function(j){var l=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(j);function k(m){m=parseInt(m).toString(16);return m.length>1?m:"0"+m}if(l){j="#"+k(l[1])+k(l[2])+k(l[3]);return j}return j},getClasses:function(){var n=this,j=[],m,o={},p=n.settings.class_filter,l;if(n.classes){return n.classes}function q(r){f(r.imports,function(s){q(s)});f(r.cssRules||r.rules,function(s){switch(s.type||1){case 1:if(s.selectorText){f(s.selectorText.split(","),function(t){t=t.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(t)||!/\.[\w\-]+$/.test(t)){return}l=t;t=h._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",t);if(p&&!(t=p(t,l))){return}if(!o[t]){j.push({"class":t});o[t]=1}})}break;case 3:q(s.styleSheet);break}})}try{f(n.doc.styleSheets,q)}catch(k){}if(j.length>0){n.classes=j}return j},run:function(m,l,k){var j=this,n;if(j.doc&&typeof(m)==="string"){m=j.get(m)}if(!m){return false}k=k||this;if(!m.nodeType&&(m.length||m.length===0)){n=[];f(m,function(p,o){if(p){if(typeof(p)=="string"){p=j.doc.getElementById(p)}n.push(l.call(k,p,o))}});return n}return l.call(k,m)},getAttribs:function(k){var j;k=this.get(k);if(!k){return[]}if(b){j=[];if(k.nodeName=="OBJECT"){return k.attributes}if(k.nodeName==="OPTION"&&this.getAttrib(k,"selected")){j.push({specified:1,nodeName:"selected"})}k.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(l){j.push({specified:1,nodeName:l})});return j}return k.attributes},isEmpty:function(o,p){var k=this,m,j,n,q,l;o=o.firstChild;if(o){q=new h.dom.TreeWalker(o);p=p||k.schema?k.schema.getNonEmptyElements():null;do{n=o.nodeType;if(n===1){if(o.getAttribute("data-mce-bogus")){continue}if(p&&p[o.nodeName.toLowerCase()]){return false}j=k.getAttribs(o);m=o.attributes.length;while(m--){l=o.attributes[m].nodeName;if(l==="name"||l.indexOf("data-")===0){return false}}}if((n===3&&!i.test(o.nodeValue))){return false}}while(o=q.next())}return true},destroy:function(k){var j=this;if(j.events){j.events.destroy()}j.win=j.doc=j.root=j.events=null;if(!k){h.removeUnload(j.destroy)}},createRng:function(){var j=this.doc;return j.createRange?j.createRange():new h.dom.Range(this)},nodeIndex:function(o,p){var j=0,m,n,l,k;if(o){for(m=o.nodeType,o=o.previousSibling,n=o;o;o=o.previousSibling){l=o.nodeType;if(p&&l==3){k=false;try{k=o.nodeValue.length}catch(q){}if(l==m||!k){continue}}j++;m=l}}return j},split:function(n,m,q){var s=this,j=s.createRng(),o,l,p;function k(v){var t,r=v.childNodes,u=v.nodeType;if(u==1&&v.getAttribute("data-mce-type")=="bookmark"){return}for(t=r.length-1;t>=0;t--){k(r[t])}if(u!=9){if(u==3&&v.nodeValue.length>0){if(!s.isBlock(v.parentNode)||h.trim(v.nodeValue).length>0){return}}else{if(u==1){r=v.childNodes;if(r.length==1&&r[0]&&r[0].nodeType==1&&r[0].getAttribute("data-mce-type")=="bookmark"){v.parentNode.insertBefore(r[0],v)}if(r.length||/^(br|hr|input|img)$/i.test(v.nodeName)){return}}}s.remove(v)}return v}if(n&&m){j.setStart(n.parentNode,s.nodeIndex(n));j.setEnd(m.parentNode,s.nodeIndex(m));o=j.extractContents();j=s.createRng();j.setStart(m.parentNode,s.nodeIndex(m)+1);j.setEnd(n.parentNode,s.nodeIndex(n)+1);l=j.extractContents();p=n.parentNode;p.insertBefore(k(o),n);if(q){p.replaceChild(q,m)}else{p.insertBefore(m,n)}p.insertBefore(k(l),n);s.remove(n);return q||m}},bind:function(n,j,m,l){var k=this;if(!k.events){k.events=new h.dom.EventUtils()}return k.events.add(n,j,m,l||this)},unbind:function(m,j,l){var k=this;if(!k.events){k.events=new h.dom.EventUtils()}return k.events.remove(m,j,l)},_findSib:function(m,j,k){var l=this,n=j;if(m){if(e(n,"string")){n=function(o){return l.is(o,j)}}for(m=m[k];m;m=m[k]){if(n(m)){return m}}}return null},_isRes:function(j){return/^(top|left|bottom|right|width|height)/i.test(j)||/;\s*(top|left|bottom|right|width|height)/i.test(j)}});h.DOM=new h.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var N=this,e=c.doc,S=0,E=1,j=2,D=true,R=false,U="startOffset",h="startContainer",P="endContainer",z="endOffset",k=tinymce.extend,n=c.nodeIndex;k(N,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:D,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:I,setEndBefore:J,setEndAfter:u,collapse:A,selectNode:x,selectNodeContents:F,compareBoundaryPoints:v,deleteContents:p,extractContents:H,cloneContents:d,insertNode:C,surroundContents:M,cloneRange:K});function q(V,t){B(D,V,t)}function s(V,t){B(R,V,t)}function g(t){q(t.parentNode,n(t))}function I(t){q(t.parentNode,n(t)+1)}function J(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function A(t){if(t){N[P]=N[h];N[z]=N[U]}else{N[h]=N[P];N[U]=N[z]}N.collapsed=D}function x(t){g(t);u(t)}function F(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(Y,t){var ab=N[h],W=N[U],aa=N[P],V=N[z],Z=t.startContainer,ad=t.startOffset,X=t.endContainer,ac=t.endOffset;if(Y===0){return G(ab,W,Z,ad)}if(Y===1){return G(aa,V,Z,ad)}if(Y===2){return G(aa,V,X,ac)}if(Y===3){return G(ab,W,X,ac)}}function p(){m(j)}function H(){return m(S)}function d(){return m(E)}function C(Y){var V=this[h],t=this[U],X,W;if((V.nodeType===3||V.nodeType===4)&&V.nodeValue){if(!t){V.parentNode.insertBefore(Y,V)}else{if(t>=V.nodeValue.length){c.insertAfter(Y,V)}else{X=V.splitText(t);V.parentNode.insertBefore(Y,X)}}}else{if(V.childNodes.length>0){W=V.childNodes[t]}if(W){V.insertBefore(Y,W)}else{V.appendChild(Y)}}}function M(V){var t=N.extractContents();N.insertNode(V);V.appendChild(t);N.selectNode(V)}function K(){return k(new b(c),{startContainer:N[h],startOffset:N[U],endContainer:N[P],endOffset:N[z],collapsed:N.collapsed,commonAncestorContainer:N.commonAncestorContainer})}function O(t,V){var W;if(t.nodeType==3){return t}if(V<0){return t}W=t.firstChild;while(W&&V>0){--V;W=W.nextSibling}if(W){return W}return t}function l(){return(N[h]==N[P]&&N[U]==N[z])}function G(X,Z,V,Y){var aa,W,t,ab,ad,ac;if(X==V){if(Z==Y){return 0}if(Z0){N.collapse(V)}}else{N.collapse(V)}N.collapsed=l();N.commonAncestorContainer=c.findCommonAncestor(N[h],N[P])}function m(ab){var aa,X=0,ad=0,V,Z,W,Y,t,ac;if(N[h]==N[P]){return f(ab)}for(aa=N[P],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[h]){return r(aa,ab)}++X}for(aa=N[h],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[P]){return T(aa,ab)}++ad}Z=ad-X;W=N[h];while(Z>0){W=W.parentNode;Z--}Y=N[P];while(Z<0){Y=Y.parentNode;Z++}for(t=W.parentNode,ac=Y.parentNode;t!=ac;t=t.parentNode,ac=ac.parentNode){W=t;Y=ac}return o(W,Y,ab)}function f(Z){var ab,Y,X,aa,t,W,V;if(Z!=j){ab=e.createDocumentFragment()}if(N[U]==N[z]){return ab}if(N[h].nodeType==3){Y=N[h].nodeValue;X=Y.substring(N[U],N[z]);if(Z!=E){N[h].deleteData(N[U],N[z]-N[U]);N.collapse(D)}if(Z==j){return}ab.appendChild(e.createTextNode(X));return ab}aa=O(N[h],N[U]);t=N[z]-N[U];while(t>0){W=aa.nextSibling;V=y(aa,Z);if(ab){ab.appendChild(V)}--t;aa=W}if(Z!=E){N.collapse(D)}return ab}function r(ab,Y){var aa,Z,V,t,X,W;if(Y!=j){aa=e.createDocumentFragment()}Z=i(ab,Y);if(aa){aa.appendChild(Z)}V=n(ab);t=V-N[U];if(t<=0){if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}Z=ab.previousSibling;while(t>0){X=Z.previousSibling;W=y(Z,Y);if(aa){aa.insertBefore(W,aa.firstChild)}--t;Z=X}if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}function T(Z,Y){var ab,V,aa,t,X,W;if(Y!=j){ab=e.createDocumentFragment()}aa=Q(Z,Y);if(ab){ab.appendChild(aa)}V=n(Z);++V;t=N[z]-V;aa=Z.nextSibling;while(t>0){X=aa.nextSibling;W=y(aa,Y);if(ab){ab.appendChild(W)}--t;aa=X}if(Y!=E){N.setStartAfter(Z);N.collapse(D)}return ab}function o(Z,t,ac){var W,ae,Y,aa,ab,V,ad,X;if(ac!=j){ae=e.createDocumentFragment()}W=Q(Z,ac);if(ae){ae.appendChild(W)}Y=Z.parentNode;aa=n(Z);ab=n(t);++aa;V=ab-aa;ad=Z.nextSibling;while(V>0){X=ad.nextSibling;W=y(ad,ac);if(ae){ae.appendChild(W)}ad=X;--V}W=i(t,ac);if(ae){ae.appendChild(W)}if(ac!=E){N.setStartAfter(Z);N.collapse(D)}return ae}function i(aa,ab){var W=O(N[P],N[z]-1),ac,Z,Y,t,V,X=W!=N[P];if(W==aa){return L(W,X,R,ab)}ac=W.parentNode;Z=L(ac,R,R,ab);while(ac){while(W){Y=W.previousSibling;t=L(W,X,R,ab);if(ab!=j){Z.insertBefore(t,Z.firstChild)}X=D;W=Y}if(ac==aa){return Z}W=ac.previousSibling;ac=ac.parentNode;V=L(ac,R,R,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function Q(aa,ab){var X=O(N[h],N[U]),Y=X!=N[h],ac,Z,W,t,V;if(X==aa){return L(X,Y,D,ab)}ac=X.parentNode;Z=L(ac,R,D,ab);while(ac){while(X){W=X.nextSibling;t=L(X,Y,D,ab);if(ab!=j){Z.appendChild(t)}Y=D;X=W}if(ac==aa){return Z}X=ac.nextSibling;ac=ac.parentNode;V=L(ac,R,D,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function L(t,Y,ab,ac){var X,W,Z,V,aa;if(Y){return y(t,ac)}if(t.nodeType==3){X=t.nodeValue;if(ab){V=N[U];W=X.substring(V);Z=X.substring(0,V)}else{V=N[z];W=X.substring(0,V);Z=X.substring(V)}if(ac!=E){t.nodeValue=Z}if(ac==j){return}aa=t.cloneNode(R);aa.nodeValue=W;return aa}if(ac==j){return}return t.cloneNode(R)}function y(V,t){if(t!=j){return t==E?V.cloneNode(D):V}V.parentNode.removeChild(V)}}a.Range=b})(tinymce.dom);(function(){function a(g){var i=this,j="\uFEFF",e,h,d=g.dom,c=true,f=false;function b(){var n=g.getRng(),k=d.createRng(),m,o;m=n.item?n.item(0):n.parentElement();if(m.ownerDocument!=d.doc){return k}o=g.isCollapsed();if(n.item||!m.hasChildNodes()){if(o){k.setStart(m,0);k.setEnd(m,0)}else{k.setStart(m.parentNode,d.nodeIndex(m));k.setEnd(k.startContainer,k.startOffset+1)}return k}function l(s){var u,q,t,p,A=0,x,y,z,r,v;r=n.duplicate();r.collapse(s);u=d.create("a");z=r.parentElement();if(!z.hasChildNodes()){k[s?"setStart":"setEnd"](z,0);return}z.appendChild(u);r.moveToElementText(u);v=n.compareEndPoints(s?"StartToStart":"EndToEnd",r);if(v>0){k[s?"setStartAfter":"setEndAfter"](z);d.remove(u);return}p=tinymce.grep(z.childNodes);x=p.length-1;while(A<=x){y=Math.floor((A+x)/2);z.insertBefore(u,p[y]);r.moveToElementText(u);v=n.compareEndPoints(s?"StartToStart":"EndToEnd",r);if(v>0){A=y+1}else{if(v<0){x=y-1}else{found=true;break}}}q=v>0||y==0?u.nextSibling:u.previousSibling;if(q.nodeType==1){d.remove(u);t=d.nodeIndex(q);q=q.parentNode;if(!s||y>0){t++}}else{if(v>0||y==0){r.setEndPoint(s?"StartToStart":"EndToEnd",n);t=r.text.length}else{r.setEndPoint(s?"StartToStart":"EndToEnd",n);t=q.nodeValue.length-r.text.length}d.remove(u)}k[s?"setStart":"setEnd"](q,t)}l(true);if(!o){l()}return k}this.addRange=function(k){var p,n,m,r,u,s,t=g.dom.doc,o=t.body;function l(B){var x,A,v,z,y;v=d.create("a");x=B?m:u;A=B?r:s;z=p.duplicate();if(x==t||x==t.documentElement){x=o;A=0}if(x.nodeType==3){x.parentNode.insertBefore(v,x);z.moveToElementText(v);z.moveStart("character",A);d.remove(v);p.setEndPoint(B?"StartToStart":"EndToEnd",z)}else{y=x.childNodes;if(y.length){if(A>=y.length){d.insertAfter(v,y[y.length-1])}else{x.insertBefore(v,y[A])}z.moveToElementText(v)}else{v=t.createTextNode(j);x.appendChild(v);z.moveToElementText(v.parentNode);z.collapse(c)}p.setEndPoint(B?"StartToStart":"EndToEnd",z);d.remove(v)}}this.destroy();m=k.startContainer;r=k.startOffset;u=k.endContainer;s=k.endOffset;p=o.createTextRange();if(m==u&&m.nodeType==1&&r==s-1){if(r==s-1){try{n=o.createControlRange();n.addElement(m.childNodes[r]);n.select();return}catch(q){}}}l(true);l();p.select()};this.getRangeAt=function(){if(!e||!tinymce.dom.RangeUtils.compareRanges(h,g.getRng())){e=b();h=g.getRng()}try{e.startContainer.nextSibling}catch(k){e=b();h=null}return e};this.destroy=function(){h=e=null}}tinymce.dom.TridentSelection=a})();(function(d){var f=d.each,c=d.DOM,b=d.isIE,e=d.isWebKit,a;d.create("tinymce.dom.EventUtils",{EventUtils:function(){this.inits=[];this.events=[]},add:function(m,p,l,j){var g,h=this,i=h.events,k;if(p instanceof Array){k=[];f(p,function(o){k.push(h.add(m,o,l,j))});return k}if(m&&m.hasOwnProperty&&m instanceof Array){k=[];f(m,function(n){n=c.get(n);k.push(h.add(n,p,l,j))});return k}m=c.get(m);if(!m){return}g=function(n){if(h.disabled){return}n=n||window.event;if(n&&b){if(!n.target){n.target=n.srcElement}d.extend(n,h._stoppers)}if(!j){return l(n)}return l.call(j,n)};if(p=="unload"){d.unloads.unshift({func:g});return g}if(p=="init"){if(h.domLoaded){g()}else{h.inits.push(g)}return g}i.push({obj:m,name:p,func:l,cfunc:g,scope:j});h._add(m,p,g);return l},remove:function(l,m,k){var h=this,g=h.events,i=false,j;if(l&&l.hasOwnProperty&&l instanceof Array){j=[];f(l,function(n){n=c.get(n);j.push(h.remove(n,m,k))});return j}l=c.get(l);f(g,function(o,n){if(o.obj==l&&o.name==m&&(!k||(o.func==k||o.cfunc==k))){g.splice(n,1);h._remove(l,m,o.cfunc);i=true;return false}});return i},clear:function(l){var j=this,g=j.events,h,k;if(l){l=c.get(l);for(h=g.length-1;h>=0;h--){k=g[h];if(k.obj===l){j._remove(k.obj,k.name,k.cfunc);k.obj=k.cfunc=null;g.splice(h,1)}}}},cancel:function(g){if(!g){return false}this.stop(g);return this.prevent(g)},stop:function(g){if(g.stopPropagation){g.stopPropagation()}else{g.cancelBubble=true}return false},prevent:function(g){if(g.preventDefault){g.preventDefault()}else{g.returnValue=false}return false},destroy:function(){var g=this;f(g.events,function(j,h){g._remove(j.obj,j.name,j.cfunc);j.obj=j.cfunc=null});g.events=[];g=null},_add:function(h,i,g){if(h.attachEvent){h.attachEvent("on"+i,g)}else{if(h.addEventListener){h.addEventListener(i,g,false)}else{h["on"+i]=g}}},_remove:function(i,j,h){if(i){try{if(i.detachEvent){i.detachEvent("on"+j,h)}else{if(i.removeEventListener){i.removeEventListener(j,h,false)}else{i["on"+j]=null}}}catch(g){}}},_pageInit:function(h){var g=this;if(g.domLoaded){return}g.domLoaded=true;f(g.inits,function(i){i()});g.inits=[]},_wait:function(i){var g=this,h=i.document;if(i.tinyMCE_GZ&&tinyMCE_GZ.loaded){g.domLoaded=1;return}if(h.attachEvent){h.attachEvent("onreadystatechange",function(){if(h.readyState==="complete"){h.detachEvent("onreadystatechange",arguments.callee);g._pageInit(i)}});if(h.documentElement.doScroll&&i==i.top){(function(){if(g.domLoaded){return}try{h.documentElement.doScroll("left")}catch(j){setTimeout(arguments.callee,0);return}g._pageInit(i)})()}}else{if(h.addEventListener){g._add(i,"DOMContentLoaded",function(){g._pageInit(i)})}}g._add(i,"load",function(){g._pageInit(i)})},_stoppers:{preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}}});a=d.dom.Event=new d.dom.EventUtils();a._wait(window);d.addUnload(function(){a.destroy()})})(tinymce);(function(a){a.dom.Element=function(f,d){var b=this,e,c;b.settings=d=d||{};b.id=f;b.dom=e=d.dom||a.DOM;if(!a.isIE){c=e.get(b.id)}a.each(("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get").split(/,/),function(g){b[g]=function(){var h=[f],j;for(j=0;j_';if(f.startContainer==l&&f.endContainer==l){l.body.innerHTML=k}else{f.deleteContents();if(l.body.childNodes.length==0){l.body.innerHTML=k}else{if(f.createContextualFragment){f.insertNode(f.createContextualFragment(k))}else{m=l.createDocumentFragment();g=l.createElement("div");m.appendChild(g);g.outerHTML=k;f.insertNode(m)}}}i=h.dom.get("__caret");f=l.createRange();f.setStartBefore(i);f.setEndBefore(i);h.setRng(f);h.dom.remove("__caret");h.setRng(f)}else{if(f.item){l.execCommand("Delete",false,null);f=h.getRng()}f.pasteHTML(k)}if(!j.no_events){h.onSetContent.dispatch(h,j)}},getStart:function(){var g=this.getRng(),h,f,j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}j=g.duplicate();j.collapse(1);h=j.parentElement();f=i=g.parentElement();while(i=i.parentNode){if(i==h){h=f;break}}return h}else{h=g.startContainer;if(h.nodeType==1&&h.hasChildNodes()){h=h.childNodes[Math.min(h.childNodes.length-1,g.startOffset)]}if(h&&h.nodeType==3){return h.parentNode}return h}},getEnd:function(){var g=this,h=g.getRng(),i,f;if(h.duplicate||h.item){if(h.item){return h.item(0)}h=h.duplicate();h.collapse(0);i=h.parentElement();if(i&&i.nodeName=="BODY"){return i.lastChild||i}return i}else{i=h.endContainer;f=h.endOffset;if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[f>0?f-1:f]}if(i&&i.nodeType==3){return i.parentNode}return i}},getBookmark:function(r,s){var v=this,m=v.dom,g,j,i,n,h,o,p,l="\uFEFF",u;function f(x,y){var t=0;d(m.select(x),function(A,z){if(A==y){t=z}});return t}if(r==2){function k(){var x=v.getRng(true),t=m.getRoot(),y={};function z(C,H){var B=C[H?"startContainer":"endContainer"],G=C[H?"startOffset":"endOffset"],A=[],D,F,E=0;if(B.nodeType==3){if(s){for(D=B.previousSibling;D&&D.nodeType==3;D=D.previousSibling){G+=D.nodeValue.length}}A.push(G)}else{F=B.childNodes;if(G>=F.length&&F.length){E=1;G=Math.max(0,F.length-1)}A.push(v.dom.nodeIndex(F[G],s)+E)}for(;B&&B!=t;B=B.parentNode){A.push(v.dom.nodeIndex(B,s))}return A}y.start=z(x,true);if(!v.isCollapsed()){y.end=z(x)}return y}return k()}if(r){return{rng:v.getRng()}}g=v.getRng();i=m.uniqueId();n=tinyMCE.activeEditor.selection.isCollapsed();u="overflow:hidden;line-height:0px";if(g.duplicate||g.item){if(!g.item){j=g.duplicate();try{g.collapse();g.pasteHTML(''+l+"");if(!n){j.collapse(false);g.moveToElementText(j.parentElement());if(g.compareEndPoints("StartToEnd",j)==0){j.move("character",-1)}j.pasteHTML(''+l+"")}}catch(q){return null}}else{o=g.item(0);h=o.nodeName;return{name:h,index:f(h,o)}}}else{o=v.getNode();h=o.nodeName;if(h=="IMG"){return{name:h,index:f(h,o)}}j=g.cloneRange();if(!n){j.collapse(false);j.insertNode(m.create("span",{"data-mce-type":"bookmark",id:i+"_end",style:u},l))}g.collapse(true);g.insertNode(m.create("span",{"data-mce-type":"bookmark",id:i+"_start",style:u},l))}v.moveToBookmark({id:i,keep:1});return{id:i}},moveToBookmark:function(n){var r=this,l=r.dom,i,h,f,q,j,s,o,p;if(r.tridentSel){r.tridentSel.destroy()}if(n){if(n.start){f=l.createRng();q=l.getRoot();function g(z){var t=n[z?"start":"end"],v,x,y,u;if(t){y=t[0];for(x=q,v=t.length-1;v>=1;v--){u=x.childNodes;if(t[v]>u.length-1){return}x=u[t[v]]}if(x.nodeType===3){y=Math.min(t[0],x.nodeValue.length)}if(x.nodeType===1){y=Math.min(t[0],x.childNodes.length)}if(z){f.setStart(x,y)}else{f.setEnd(x,y)}}return true}if(g(true)&&g()){r.setRng(f)}}else{if(n.id){function k(A){var u=l.get(n.id+"_"+A),z,t,x,y,v=n.keep;if(u){z=u.parentNode;if(A=="start"){if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}j=s=z;o=p=t}else{if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}s=z;p=t}if(!v){y=u.previousSibling;x=u.nextSibling;d(c.grep(u.childNodes),function(B){if(B.nodeType==3){B.nodeValue=B.nodeValue.replace(/\uFEFF/g,"")}});while(u=l.get(n.id+"_"+A)){l.remove(u,1)}if(y&&x&&y.nodeType==x.nodeType&&y.nodeType==3&&!c.isOpera){t=y.nodeValue.length;y.appendData(x.nodeValue);l.remove(x);if(A=="start"){j=s=y;o=p=t}else{s=y;p=t}}}}}function m(t){if(l.isBlock(t)&&!t.innerHTML){t.innerHTML=!a?'
    ':" "}return t}k("start");k("end");if(j){f=l.createRng();f.setStart(m(j),o);f.setEnd(m(s),p);r.setRng(f)}}else{if(n.name){r.select(l.select(n.name)[n.index])}else{if(n.rng){r.setRng(n.rng)}}}}}},select:function(k,j){var i=this,l=i.dom,g=l.createRng(),f;if(k){f=l.nodeIndex(k);g.setStart(k.parentNode,f);g.setEnd(k.parentNode,f+1);if(j){function h(m,o){var n=new c.dom.TreeWalker(m,m);do{if(m.nodeType==3&&c.trim(m.nodeValue).length!=0){if(o){g.setStart(m,0)}else{g.setEnd(m,m.nodeValue.length)}return}if(m.nodeName=="BR"){if(o){g.setStartBefore(m)}else{g.setEndBefore(m)}return}}while(m=(o?n.next():n.prev()))}h(k,1);h(k)}i.setRng(g)}return k},isCollapsed:function(){var f=this,h=f.getRng(),g=f.getSel();if(!h||h.item){return false}if(h.compareEndPoints){return h.compareEndPoints("StartToEnd",h)===0}return !g||h.collapsed},collapse:function(f){var h=this,g=h.getRng(),i;if(g.item){i=g.item(0);g=h.win.document.body.createTextRange();g.moveToElementText(i)}g.collapse(!!f);h.setRng(g)},getSel:function(){var g=this,f=this.win;return f.getSelection?f.getSelection():f.document.selection},getRng:function(l){var g=this,h,i,k,j=g.win.document;if(l&&g.tridentSel){return g.tridentSel.getRangeAt(0)}try{if(h=g.getSel()){i=h.rangeCount>0?h.getRangeAt(0):(h.createRange?h.createRange():j.createRange())}}catch(f){}if(c.isIE&&i&&i.setStart&&j.selection.createRange().item){k=j.selection.createRange().item(0);i=j.createRange();i.setStartBefore(k);i.setEndAfter(k)}if(!i){i=j.createRange?j.createRange():j.body.createTextRange()}if(g.selectedRange&&g.explicitRange){if(i.compareBoundaryPoints(i.START_TO_START,g.selectedRange)===0&&i.compareBoundaryPoints(i.END_TO_END,g.selectedRange)===0){i=g.explicitRange}else{g.selectedRange=null;g.explicitRange=null}}return i},setRng:function(i){var h,g=this;if(!g.tridentSel){h=g.getSel();if(h){g.explicitRange=i;try{h.removeAllRanges()}catch(f){}h.addRange(i);g.selectedRange=h.getRangeAt(0)}}else{if(i.cloneRange){g.tridentSel.addRange(i);return}try{i.select()}catch(f){}}},setNode:function(g){var f=this;f.setContent(f.dom.getOuterHTML(g));return g},getNode:function(){var h=this,g=h.getRng(),i=h.getSel(),l,k=g.startContainer,f=g.endContainer;if(!g){return h.dom.getRoot()}if(g.setStart){l=g.commonAncestorContainer;if(!g.collapsed){if(g.startContainer==g.endContainer){if(g.endOffset-g.startOffset<2){if(g.startContainer.hasChildNodes()){l=g.startContainer.childNodes[g.startOffset]}}}if(k.nodeType===3&&f.nodeType===3){function j(p,m){var o=p;while(p&&p.nodeType===3&&p.length===0){p=m?p.nextSibling:p.previousSibling}return p||o}if(k.length===g.startOffset){k=j(k.nextSibling,true)}else{k=k.parentNode}if(g.endOffset===0){f=j(f.previousSibling,false)}else{f=f.parentNode}if(k&&k===f){return k}}}if(l&&l.nodeType==3){return l.parentNode}return l}return g.item?g.item(0):g.parentElement()},getSelectedBlocks:function(g,f){var i=this,j=i.dom,m,h,l,k=[];m=j.getParent(g||i.getStart(),j.isBlock);h=j.getParent(f||i.getEnd(),j.isBlock);if(m){k.push(m)}if(m&&h&&m!=h){l=m;while((l=l.nextSibling)&&l!=h){if(j.isBlock(l)){k.push(l)}}}if(h&&m!=h){k.push(h)}return k},destroy:function(g){var f=this;f.win=null;if(f.tridentSel){f.tridentSel.destroy()}if(!g){c.removeUnload(f.destroy)}},_fixIESelection:function(){var g=this.dom,m=g.doc,h=m.body,j,n,f;m.documentElement.unselectable=true;function i(o,r){var p=h.createTextRange();try{p.moveToPoint(o,r)}catch(q){p=null}return p}function l(p){var o;if(p.button){o=i(p.x,p.y);if(o){if(o.compareEndPoints("StartToStart",n)>0){o.setEndPoint("StartToStart",n)}else{o.setEndPoint("EndToEnd",n)}o.select()}}else{k()}}function k(){var o=m.selection.createRange();if(n&&!o.item&&o.compareEndPoints("StartToEnd",o)===0){n.select()}g.unbind(m,"mouseup",k);g.unbind(m,"mousemove",l);n=j=0}g.bind(m,["mousedown","contextmenu"],function(o){if(o.target.nodeName==="HTML"){if(j){k()}f=m.documentElement;if(f.scrollHeight>f.clientHeight){return}j=1;n=i(o.x,o.y);if(n){g.bind(m,"mouseup",k);g.bind(m,"mousemove",l);g.win.focus();n.select()}}})}})})(tinymce);(function(a){a.dom.Serializer=function(e,i,f){var h,b,d=a.isIE,g=a.each,c;if(!e.apply_source_formatting){e.indent=false}e.remove_trailing_brs=true;i=i||a.DOM;f=f||new a.html.Schema(e);e.entity_encoding=e.entity_encoding||"named";h=new a.util.Dispatcher(self);b=new a.util.Dispatcher(self);c=new a.html.DomParser(e,f);c.addAttributeFilter("src,href,style",function(k,j){var o=k.length,l,q,n="data-mce-"+j,p=e.url_converter,r=e.url_converter_scope,m;while(o--){l=k[o];q=l.attributes.map[n];if(q!==m){l.attr(j,q.length>0?q:null);l.attr(n,null)}else{q=l.attributes.map[j];if(j==="style"){q=i.serializeStyle(i.parseStyle(q),l.name)}else{if(p){q=p.call(r,q,j,l.name)}}l.attr(j,q.length>0?q:null)}}});c.addAttributeFilter("class",function(j,k){var l=j.length,m,n;while(l--){m=j[l];n=m.attr("class").replace(/\s*mce(Item\w+|Selected)\s*/g,"");m.attr("class",n.length>0?n:null)}});c.addAttributeFilter("data-mce-type",function(j,l,k){var m=j.length,n;while(m--){n=j[m];if(n.attributes.map["data-mce-type"]==="bookmark"&&!k.cleanup){n.remove()}}});c.addNodeFilter("script,style",function(k,l){var m=k.length,n,o;function j(p){return p.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(\/\/\s*|\]\]>|-->|\]\]-->)\s*$/g,"")}while(m--){n=k[m];o=n.firstChild?n.firstChild.value:"";if(l==="script"){n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,""));if(o.length>0){n.firstChild.value="// "}}else{if(o.length>0){n.firstChild.value=""}}}});c.addNodeFilter("#comment",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.value.indexOf("[CDATA[")===0){m.name="#cdata";m.type=4;m.value=m.value.replace(/^\[CDATA\[|\]\]$/g,"")}else{if(m.value.indexOf("mce:protected ")===0){m.name="#text";m.type=3;m.raw=true;m.value=unescape(m.value).substr(14)}}}});c.addNodeFilter("xml:namespace,input",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.type===7){m.remove()}else{if(m.type===1){if(k==="input"&&!("type" in m.attributes.map)){m.attr("type","text")}}}}});if(e.fix_list_elements){c.addNodeFilter("ul,ol",function(k,l){var m=k.length,n,j;while(m--){n=k[m];j=n.parent;if(j.name==="ul"||j.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}c.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(j,k){var l=j.length;while(l--){j[l].attr(k,null)}});return{schema:f,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,onPreProcess:h,onPostProcess:b,serialize:function(o,m){var l,p,k,j,n;if(d&&i.select("script,style,select").length>0){n=o.innerHTML;o=o.cloneNode(false);i.setHTML(o,n)}else{o=o.cloneNode(true)}l=o.ownerDocument.implementation;if(l.createHTMLDocument){p=l.createHTMLDocument("");g(o.nodeName=="BODY"?o.childNodes:[o],function(q){p.body.appendChild(p.importNode(q,true))});if(o.nodeName!="BODY"){o=p.body.firstChild}else{o=p.body}k=i.doc;i.doc=p}m=m||{};m.format=m.format||"html";if(!m.no_events){m.node=o;h.dispatch(self,m)}j=new a.html.Serializer(e,f);m.content=j.serialize(c.parse(m.getInner?o.innerHTML:a.trim(i.getOuterHTML(o),m),m));if(!m.cleanup){m.content=m.content.replace(/\uFEFF/g,"")}if(!m.no_events){b.dispatch(self,m)}if(k){i.doc=k}m.node=null;return m.content},addRules:function(j){f.addValidElements(j)},setRules:function(j){f.setValidElements(j)}}}})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],f={},d=[],g=0,e;function b(m,v){var x=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}v()}function u(){if(typeof(console)!=="undefined"&&console.log){console.log("Failed to load: "+m)}}n=q.uniqueId();if(a.isIE6){o=new a.util.URI(m);r=location;if(o.host==r.hostname&&o.port==r.port&&(o.protocol+":")==r.protocol&&o.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(y){var t=q.create("script",{type:"text/javascript"});t.text=y;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()},error:u});return}}s=q.create("script",{id:n,type:"text/javascript",src:a._addVer(m)});if(!a.isIE){s.onload=p}s.onerror=u;if(!a.isOpera){s.onreadystatechange=function(){var t=s.readyState;if(t=="complete"||t=="loaded"){p()}}}(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}this.isDone=function(m){return l[m]==i};this.markDone=function(m){l[m]=i};this.add=this.load=function(m,q,n){var o,p=l[m];if(p==e){j.push(m);l[m]=c}if(q){if(!f[m]){f[m]=[]}f[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){var o;function n(r){a.each(f[r],function(s){s.func.call(s.scope)});f[r]=e}d.push({func:q,scope:p||this});o=function(){var r=a.grep(m);m.length=0;a.each(r,function(s){if(l[s]==i){n(s);return}if(l[s]!=k){l[s]=k;g++;b(s,function(){l[s]=i;g--;n(s);o()})}});if(!g){a.each(d,function(s){s.func.call(s.scope)});d.length=0}};o()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);tinymce.dom.TreeWalker=function(a,c){var b=a;function d(i,f,e,j){var h,g;if(i){if(!j&&i[f]){return i[f]}if(i!=c){h=i[e];if(h){return h}for(g=i.parentNode;g&&g!=c;g=g.parentNode){h=g[e];if(h){return h}}}}}this.current=function(){return b};this.next=function(e){return(b=d(b,"firstChild","nextSibling",e))};this.prev=function(e){return(b=d(b,"lastChild","previousSibling",e))}};(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,r){var h=d.startContainer,k=d.startOffset,s=d.endContainer,l=d.endOffset,i,f,n,g,q,p,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(t){r([t])});return}function o(v,u,t){var x=[];for(;v&&v!=t;v=v[u]){x.push(v)}return x}function m(u,t){do{if(u.parentNode==t){return u}u=u.parentNode}while(u)}function j(v,u,x){var t=x?"nextSibling":"previousSibling";for(g=v,q=g.parentNode;g&&g!=u;g=q){q=g.parentNode;p=o(g==v?g:g[t],t);if(p.length){if(!x){p.reverse()}r(p)}}}if(h.nodeType==1&&h.hasChildNodes()){h=h.childNodes[k]}if(s.nodeType==1&&s.hasChildNodes()){s=s.childNodes[Math.min(l-1,s.childNodes.length-1)]}i=c.findCommonAncestor(h,s);if(h==s){return r([h])}for(g=h;g;g=g.parentNode){if(g==s){return j(h,i,true)}if(g==i){break}}for(g=s;g;g=g.parentNode){if(g==h){return j(s,i)}if(g==i){break}}f=m(h,i)||h;n=m(s,i)||s;j(h,f,true);p=o(f==h?f:f.nextSibling,"nextSibling",n==s?n.nextSibling:n);if(p.length){r(p)}j(s,n)}};a.dom.RangeUtils.compareRanges=function(c,b){if(c&&b){if(c.item||c.duplicate){if(c.item&&b.item&&c.item(0)===b.item(0)){return true}if(c.isEqual&&b.isEqual&&b.isEqual(c)){return true}}else{return c.startContainer==b.startContainer&&c.startOffset==b.startOffset}}return false}})(tinymce);(function(b){var a=b.dom.Event,c=b.each;b.create("tinymce.ui.KeyboardNavigation",{KeyboardNavigation:function(e,f){var p=this,m=e.root,l=e.items,n=e.enableUpDown,i=e.enableLeftRight||!e.enableUpDown,k=e.excludeFromTabOrder,j,h,o,d,g;f=f||b.DOM;j=function(q){g=q.target.id};h=function(q){f.setAttrib(q.target.id,"tabindex","-1")};d=function(q){var r=f.get(g);f.setAttrib(r,"tabindex","0");r.focus()};p.focus=function(){f.get(g).focus()};p.destroy=function(){c(l,function(q){f.unbind(f.get(q.id),"focus",j);f.unbind(f.get(q.id),"blur",h)});f.unbind(f.get(m),"focus",d);f.unbind(f.get(m),"keydown",o);l=f=m=p.focus=j=h=o=d=null;p.destroy=function(){}};p.moveFocus=function(u,r){var q=-1,t=p.controls,s;if(!g){return}c(l,function(x,v){if(x.id===g){q=v;return false}});q+=u;if(q<0){q=l.length-1}else{if(q>=l.length){q=0}}s=l[q];f.setAttrib(g,"tabindex","-1");f.setAttrib(s.id,"tabindex","0");f.get(s.id).focus();if(e.actOnFocus){e.onAction(s.id)}if(r){a.cancel(r)}};o=function(y){var u=37,t=39,x=38,z=40,q=27,s=14,r=13,v=32;switch(y.keyCode){case u:if(i){p.moveFocus(-1)}break;case t:if(i){p.moveFocus(1)}break;case x:if(n){p.moveFocus(-1)}break;case z:if(n){p.moveFocus(1)}break;case q:if(e.onCancel){e.onCancel();a.cancel(y)}break;case s:case r:case v:if(e.onAction){e.onAction(g);a.cancel(y)}break}};c(l,function(s,q){var r;if(!s.id){s.id=f.uniqueId("_mce_item_")}if(k){f.bind(s.id,"blur",h);r="-1"}else{r=(q===0?"0":"-1")}f.setAttrib(s.id,"tabindex",r);f.bind(f.get(s.id),"focus",j)});if(l[0]){g=l[0].id}f.setAttrib(m,"tabindex","-1");f.bind(f.get(m),"focus",d);f.bind(f.get(m),"keydown",o)}})})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(f,e,d){this.id=f;this.settings=e=e||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=e.scope||this;this.disabled=0;this.active=0;this.editor=d},setAriaProperty:function(f,e){var d=b.get(this.id+"_aria")||b.get(this.id);if(d){b.setAttrib(d,"aria-"+f,!!e)}},focus:function(){b.get(this.id).focus()},setDisabled:function(d){if(d!=this.disabled){this.setAriaProperty("disabled",d);this.setState("Disabled",d);this.setState("Enabled",!d);this.disabled=d}},isDisabled:function(){return this.disabled},setActive:function(d){if(d!=this.active){this.setState("Active",d);this.active=d;this.setAriaProperty("pressed",d)}},isActive:function(){return this.active},setState:function(f,d){var e=b.get(this.id);f=this.classPrefix+f;if(d){b.addClass(e,f)}else{b.removeClass(e,f)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(d){b.setHTML(d,this.renderHTML())},postRender:function(){var e=this,d;if(a(e.disabled)){d=e.disabled;e.disabled=-1;e.setDisabled(d)}if(a(e.active)){d=e.active;e.active=-1;e.setActive(d)}},remove:function(){b.remove(this.id);this.destroy()},destroy:function(){c.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b,a){this.parent(c,b,a);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(b,a){this.parent(b,a);this.classPrefix="mceSeparator";this.setDisabled(true)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}});(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(g,f){this.parent(g,f);this.classPrefix="mceMenuItem"},setSelected:function(f){this.setState("Selected",f);this.setAriaProperty("checked",!!f);this.selected=f},isSelected:function(){return this.selected},postRender:function(){var f=this;f.parent();if(c(f.selected)){f.setSelected(f.selected)}}})})(tinymce);(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(h,g){var f=this;f.parent(h,g);f.items={};f.collapsed=false;f.menuCount=0;f.onAddItem=new d.util.Dispatcher(this)},expand:function(g){var f=this;if(g){a(f,function(h){if(h.expand){h.expand()}},"items",f)}f.collapsed=false},collapse:function(g){var f=this;if(g){a(f,function(h){if(h.collapse){h.collapse()}},"items",f)}f.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){if(!f.settings){f=new d.ui.MenuItem(f.id||b.uniqueId(),f)}this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){if(!f.collapse){f=this.createMenu(f)}this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;a(f,function(g){if(g.removeAll){g.removeAll()}else{g.remove()}g.destroy()},"items",f);f.items={}},createMenu:function(g){var f=new d.ui.Menu(g.id||b.uniqueId(),g);f.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return f}})})(tinymce);(function(e){var d=e.is,c=e.DOM,f=e.each,a=e.dom.Event,b=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,g){g=g||{};g.container=g.container||c.doc.body;g.offset_x=g.offset_x||0;g.offset_y=g.offset_y||0;g.vp_offset_x=g.vp_offset_x||0;g.vp_offset_y=g.vp_offset_y||0;if(d(g.icons)&&!g.icons){g["class"]+=" mceNoIcons"}this.parent(h,g);this.onShowMenu=new e.util.Dispatcher(this);this.onHideMenu=new e.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var h=this,i=h.settings,g;j.container=j.container||i.container;j.parent=h;j.constrain=j.constrain||i.constrain;j["class"]=j["class"]||i["class"];j.vp_offset_x=j.vp_offset_x||i.vp_offset_x;j.vp_offset_y=j.vp_offset_y||i.vp_offset_y;j.keyboard_focus=i.keyboard_focus;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},focus:function(){var g=this;if(g.keyboardNav){g.keyboardNav.focus()}},update:function(){var i=this,j=i.settings,g=c.get("menu_"+i.id+"_tbl"),l=c.get("menu_"+i.id+"_co"),h,k;h=j.max_width?Math.min(g.clientWidth,j.max_width):g.clientWidth;k=j.max_height?Math.min(g.clientHeight,j.max_height):g.clientHeight;if(!c.boxModel){i.element.setStyles({width:h+2,height:k+2})}else{i.element.setStyles({width:h,height:k})}if(j.max_width){c.setStyle(l,"width",h)}if(j.max_height){c.setStyle(l,"height",k);if(g.clientHeightv){p=r?r-u:Math.max(0,(v-A.vp_offset_x)-u)}if((n+A.vp_offset_y+l)>q){n=Math.max(0,(q-A.vp_offset_y)-l)}}c.setStyles(o,{left:p,top:n});z.element.update();z.isMenuVisible=1;z.mouseClickFunc=a.add(o,"click",function(s){var h;s=s.target;if(s&&(s=c.getParent(s,"tr"))&&!c.hasClass(s,m+"ItemSub")){h=z.items[s.id];if(h.isDisabled()){return}k=z;while(k){if(k.hideMenu){k.hideMenu()}k=k.settings.parent}if(h.settings.onclick){h.settings.onclick(s)}return a.cancel(s)}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(x){var h,t,s;x=x.target;if(x&&(x=c.getParent(x,"tr"))){h=z.items[x.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(x&&c.hasClass(x,m+"ItemSub")){t=c.getRect(x);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}a.add(o,"keydown",z._keyHandler,z);z.onShowMenu.dispatch(z);if(A.keyboard_focus){z._setupKeyboardNav()}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(i,"mouseover",g.mouseOverFunc);a.remove(i,"click",g.mouseClickFunc);a.remove(i,"keydown",g._keyHandler);c.hide(i);g.isMenuVisible=0;if(!j){g.collapse(1)}if(g.element){g.element.hide()}if(h=c.get(g.id)){c.removeClass(h.firstChild,g.classPrefix+"ItemActive")}g.onHideMenu.dispatch(g)},add:function(i){var g=this,h;i=g.parent(i);if(g.isRendered&&(h=c.get("menu_"+g.id))){g._add(c.select("tbody",h)[0],i)}return i},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){c.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=this,h=c.get("menu_"+g.id);if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(h,"mouseover",g.mouseOverFunc);a.remove(c.select("a",h),"focus",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);a.remove(h,"keydown",g._keyHandler);if(g.element){g.element.remove()}c.remove(h)},renderNode:function(){var i=this,j=i.settings,l,h,k,g;g=c.create("div",{role:"listbox",id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"});if(i.settings.parent){c.setAttrib(g,"aria-parent","menu_"+i.settings.parent.id)}k=c.add(g,"div",{role:"presentation",id:"menu_"+i.id+"_co","class":i.classPrefix+(j["class"]?" "+j["class"]:"")});i.element=new b("menu_"+i.id,{blocker:1,container:j.container});if(j.menu_line){c.add(k,"span",{"class":i.classPrefix+"Line"})}l=c.add(k,"table",{role:"presentation",id:"menu_"+i.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});h=c.add(l,"tbody");f(i.items,function(m){i._add(h,m)});i.rendered=true;return g},_setupKeyboardNav:function(){var i,h,g=this;i=c.select("#menu_"+g.id)[0];h=c.select("a[role=option]","menu_"+g.id);h.splice(0,0,i);g.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+g.id,items:h,onCancel:function(){g.hideMenu()},enableUpDown:true});i.focus()},_keyHandler:function(g){var h=this,i;switch(g.keyCode){case 37:if(h.settings.parent){h.hideMenu();h.settings.parent.focus();a.cancel(g)}break;case 39:if(h.mouseOverFunc){h.mouseOverFunc(g)}break}},_add:function(j,h){var i,q=h.settings,p,l,k,m=this.classPrefix,g;if(q.separator){l=c.add(j,"tr",{id:h.id,"class":m+"ItemSeparator"});c.add(l,"td",{"class":m+"ItemSeparator"});if(i=l.previousSibling){c.addClass(i,"mceLast")}return}i=l=c.add(j,"tr",{id:h.id,"class":m+"Item "+m+"ItemEnabled"});i=k=c.add(i,q.titleItem?"th":"td");i=p=c.add(i,"a",{id:h.id+"_aria",role:q.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});if(q.parent){c.setAttrib(p,"aria-haspopup","true");c.setAttrib(p,"aria-owns","menu_"+h.id)}c.addClass(k,q["class"]);g=c.add(i,"span",{"class":"mceIcon"+(q.icon?" mce_"+q.icon:"")});if(q.icon_src){c.add(g,"img",{src:q.icon_src})}i=c.add(i,q.element||"span",{"class":"mceText",title:h.settings.title},h.settings.title);if(h.settings.style){c.setAttrib(i,"style",h.settings.style)}if(j.childNodes.length==1){c.addClass(l,"mceFirst")}if((i=l.previousSibling)&&c.hasClass(i,m+"ItemSeparator")){c.addClass(l,"mceFirst")}if(h.collapse){c.addClass(l,m+"ItemSub")}if(i=l.previousSibling){c.removeClass(i,"mceLast")}c.addClass(l,"mceLast")}})})(tinymce);(function(b){var a=b.DOM;b.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,d,c){this.parent(e,d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='';if(e.image){d+=''+a.encode(e.title)+''+c}else{d+=''+(c?''+c+"":"")}d+='";d+="";return d},postRender:function(){var c=this,d=c.settings;b.dom.Event.add(c.id,"click",function(f){if(!c.isDisabled()){return d.onclick.call(d.scope,f)}})}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(i,h,f){var g=this;g.parent(i,h,f);g.items=[];g.onChange=new a(g);g.onPostRender=new a(g);g.onAdd=new a(g);g.onRenderMenu=new d.util.Dispatcher(this);g.classPrefix="mceListBox"},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&h.call){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){var g=this,h,i;if(f!=g.selectedIndex){h=c.get(g.id+"_text");i=g.items[f];if(i){g.selectedValue=i.value;g.selectedIndex=f;c.setHTML(h,c.encode(i.title));c.removeClass(h,"mceTitle");c.setAttrib(g.id,"aria-valuenow",i.title)}else{c.setHTML(h,c.encode(g.settings.title));c.addClass(h,"mceTitle");g.selectedValue=g.selectedIndex=null;c.setAttrib(g.id,"aria-valuenow",g.settings.title)}h=0}},add:function(i,f,h){var g=this;h=h||{};h=d.extend(h,{title:i,value:f});g.items.push(h);g.onAdd.dispatch(g,h)},getLength:function(){return this.items.length},renderHTML:function(){var i="",f=this,g=f.settings,j=f.classPrefix;i='
    - +
    @@ -109,9 +109,9 @@ - + - - + +
     
    - @@ -151,10 +151,10 @@
    - +
    @@ -163,10 +163,10 @@ - - + + <\/tr>/g, ''); return html; } diff --git a/include/javascript/tiny_mce/themes/advanced/js/color_picker.js b/include/javascript/tiny_mce/themes/advanced/js/color_picker.js index c1a65db2..cdf8c4c0 100644 --- a/include/javascript/tiny_mce/themes/advanced/js/color_picker.js +++ b/include/javascript/tiny_mce/themes/advanced/js/color_picker.js @@ -1,6 +1,6 @@ tinyMCEPopup.requireLangPack(); -var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false; +var detail = 50, strhex = "0123456789ABCDEF", i, isMouseDown = false, isMouseOver = false; var colors = [ "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033", @@ -33,37 +33,41 @@ var colors = [ ]; var named = { - '#F0F8FF':'AliceBlue','#FAEBD7':'AntiqueWhite','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige', - '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'BlanchedAlmond','#0000FF':'Blue','#8A2BE2':'BlueViolet','#A52A2A':'Brown', - '#DEB887':'BurlyWood','#5F9EA0':'CadetBlue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'CornflowerBlue', - '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'DarkBlue','#008B8B':'DarkCyan','#B8860B':'DarkGoldenRod', - '#A9A9A9':'DarkGray','#A9A9A9':'DarkGrey','#006400':'DarkGreen','#BDB76B':'DarkKhaki','#8B008B':'DarkMagenta','#556B2F':'DarkOliveGreen', - '#FF8C00':'Darkorange','#9932CC':'DarkOrchid','#8B0000':'DarkRed','#E9967A':'DarkSalmon','#8FBC8F':'DarkSeaGreen','#483D8B':'DarkSlateBlue', - '#2F4F4F':'DarkSlateGray','#2F4F4F':'DarkSlateGrey','#00CED1':'DarkTurquoise','#9400D3':'DarkViolet','#FF1493':'DeepPink','#00BFFF':'DeepSkyBlue', - '#696969':'DimGray','#696969':'DimGrey','#1E90FF':'DodgerBlue','#B22222':'FireBrick','#FFFAF0':'FloralWhite','#228B22':'ForestGreen', - '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'GhostWhite','#FFD700':'Gold','#DAA520':'GoldenRod','#808080':'Gray','#808080':'Grey', - '#008000':'Green','#ADFF2F':'GreenYellow','#F0FFF0':'HoneyDew','#FF69B4':'HotPink','#CD5C5C':'IndianRed','#4B0082':'Indigo','#FFFFF0':'Ivory', - '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'LavenderBlush','#7CFC00':'LawnGreen','#FFFACD':'LemonChiffon','#ADD8E6':'LightBlue', - '#F08080':'LightCoral','#E0FFFF':'LightCyan','#FAFAD2':'LightGoldenRodYellow','#D3D3D3':'LightGray','#D3D3D3':'LightGrey','#90EE90':'LightGreen', - '#FFB6C1':'LightPink','#FFA07A':'LightSalmon','#20B2AA':'LightSeaGreen','#87CEFA':'LightSkyBlue','#778899':'LightSlateGray','#778899':'LightSlateGrey', - '#B0C4DE':'LightSteelBlue','#FFFFE0':'LightYellow','#00FF00':'Lime','#32CD32':'LimeGreen','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon', - '#66CDAA':'MediumAquaMarine','#0000CD':'MediumBlue','#BA55D3':'MediumOrchid','#9370D8':'MediumPurple','#3CB371':'MediumSeaGreen','#7B68EE':'MediumSlateBlue', - '#00FA9A':'MediumSpringGreen','#48D1CC':'MediumTurquoise','#C71585':'MediumVioletRed','#191970':'MidnightBlue','#F5FFFA':'MintCream','#FFE4E1':'MistyRose','#FFE4B5':'Moccasin', - '#FFDEAD':'NavajoWhite','#000080':'Navy','#FDF5E6':'OldLace','#808000':'Olive','#6B8E23':'OliveDrab','#FFA500':'Orange','#FF4500':'OrangeRed','#DA70D6':'Orchid', - '#EEE8AA':'PaleGoldenRod','#98FB98':'PaleGreen','#AFEEEE':'PaleTurquoise','#D87093':'PaleVioletRed','#FFEFD5':'PapayaWhip','#FFDAB9':'PeachPuff', - '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'PowderBlue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'RosyBrown','#4169E1':'RoyalBlue', - '#8B4513':'SaddleBrown','#FA8072':'Salmon','#F4A460':'SandyBrown','#2E8B57':'SeaGreen','#FFF5EE':'SeaShell','#A0522D':'Sienna','#C0C0C0':'Silver', - '#87CEEB':'SkyBlue','#6A5ACD':'SlateBlue','#708090':'SlateGray','#708090':'SlateGrey','#FFFAFA':'Snow','#00FF7F':'SpringGreen', - '#4682B4':'SteelBlue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet', - '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'WhiteSmoke','#FFFF00':'Yellow','#9ACD32':'YellowGreen' + '#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige', + '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown', + '#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue', + '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod', + '#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green', + '#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue', + '#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue', + '#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green', + '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey', + '#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory', + '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue', + '#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green', + '#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey', + '#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon', + '#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue', + '#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin', + '#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid', + '#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff', + '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue', + '#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver', + '#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green', + '#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet', + '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green' }; +var namedLookup = {}; + function init() { - var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')); + var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value; tinyMCEPopup.resizeToInnerSize(); generatePicker(); + generateWebColors(); + generateNamedColors(); if (inputColor) { changeFinalColor(inputColor); @@ -73,6 +77,45 @@ function init() { if (col) updateLight(col.r, col.g, col.b); } + + for (key in named) { + value = named[key]; + namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase(); + } +} + +function toHexColor(color) { + var matches, red, green, blue, toInt = parseInt; + + function hex(value) { + value = parseInt(value).toString(16); + + return value.length > 1 ? value : '0' + value; // Padd with leading zero + }; + + color = color.replace(/[\s#]+/g, '').toLowerCase(); + color = namedLookup[color] || color; + matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)|([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})|([a-f0-9])([a-f0-9])([a-f0-9])$/.exec(color); + + if (matches) { + if (matches[1]) { + red = toInt(matches[1]); + green = toInt(matches[2]); + blue = toInt(matches[3]); + } else if (matches[4]) { + red = toInt(matches[4], 16); + green = toInt(matches[5], 16); + blue = toInt(matches[6], 16); + } else if (matches[7]) { + red = toInt(matches[7] + matches[7], 16); + green = toInt(matches[8] + matches[8], 16); + blue = toInt(matches[9] + matches[9], 16); + } + + return '#' + hex(red) + hex(green) + hex(blue); + } + + return ''; } function insertAction() { @@ -81,7 +124,7 @@ function insertAction() { tinyMCEPopup.restoreSelection(); if (f) - f(color); + f(toHexColor(color)); tinyMCEPopup.close(); } @@ -91,7 +134,7 @@ function showColor(color, name) { document.getElementById("colorname").innerHTML = name; document.getElementById("preview").style.backgroundColor = color; - document.getElementById("color").value = color.toLowerCase(); + document.getElementById("color").value = color.toUpperCase(); } function convertRGBToHex(col) { @@ -153,23 +196,40 @@ function generateWebColors() { if (el.className == 'generated') return; - h += '
     
    - +
    @@ -180,13 +180,8 @@
    -
    - -
    - -
    - -
    + +
    diff --git a/include/javascript/tiny_mce/plugins/template/editor_plugin.js b/include/javascript/tiny_mce/plugins/template/editor_plugin.js index 0f7fb015..ebe3c27d 100644 --- a/include/javascript/tiny_mce/plugins/template/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/template/editor_plugin.js @@ -1 +1 @@ -(function(){var each=tinymce.each;tinymce.create('tinymce.plugins.TemplatePlugin',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceTemplate',function(ui){ed.windowManager.open({file:url+'/template.htm',width:ed.getParam('template_popup_width',750),height:ed.getParam('template_popup_height',600),inline:1},{plugin_url:url});});ed.addCommand('mceInsertTemplate',t._insertTemplate,t);ed.addButton('template',{title:'template.desc',cmd:'mceTemplate'});ed.onPreProcess.add(function(ed,o){var dom=ed.dom;each(dom.select('div',o.node),function(e){if(dom.hasClass(e,'mceTmpl')){each(dom.select('*',e),function(e){if(dom.hasClass(e,ed.getParam('template_mdate_classes','mdate').replace(/\s+/g,'|')))e.innerHTML=t._getDateTime(new Date(),ed.getParam("template_mdate_format",ed.getLang("template.mdate_format")));});t._replaceVals(e);}});});},getInfo:function(){return{longname:'Template plugin',author:'Moxiecode Systems AB',authorurl:'http://www.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/template',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_insertTemplate:function(ui,v){var t=this,ed=t.editor,h,el,dom=ed.dom,sel=ed.selection.getContent();h=v.content;each(t.editor.getParam('template_replace_values'),function(v,k){if(typeof(v)!='function')h=h.replace(new RegExp('\\{\\$'+k+'\\}','g'),v);});el=dom.create('div',null,h);n=dom.select('.mceTmpl',el);if(n&&n.length>0){el=dom.create('div',null);el.appendChild(n[0].cloneNode(true));}function hasClass(n,c){return new RegExp('\\b'+c+'\\b','g').test(n.className);};each(dom.select('*',el),function(n){if(hasClass(n,ed.getParam('template_cdate_classes','cdate').replace(/\s+/g,'|')))n.innerHTML=t._getDateTime(new Date(),ed.getParam("template_cdate_format",ed.getLang("template.cdate_format")));if(hasClass(n,ed.getParam('template_mdate_classes','mdate').replace(/\s+/g,'|')))n.innerHTML=t._getDateTime(new Date(),ed.getParam("template_mdate_format",ed.getLang("template.mdate_format")));if(hasClass(n,ed.getParam('template_selected_content_classes','selcontent').replace(/\s+/g,'|')))n.innerHTML=sel;});t._replaceVals(el);ed.execCommand('mceInsertContent',false,el.innerHTML);ed.addVisual();},_replaceVals:function(e){var dom=this.editor.dom,vl=this.editor.getParam('template_replace_values');each(dom.select('*',e),function(e){each(vl,function(v,k){if(dom.hasClass(e,k)){if(typeof(vl[k])=='function')vl[k](e);}});});},_getDateTime:function(d,fmt){if(!fmt)return"";function addZeros(value,len){var i;value=""+value;if(value.length0){c=d.create("div",null);c.appendChild(n[0].cloneNode(true))}function e(l,h){return new RegExp("\\b"+h+"\\b","g").test(l.className)}a(d.select("*",c),function(h){if(e(h,g.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))){h.innerHTML=k._getDateTime(new Date(),g.getParam("template_cdate_format",g.getLang("template.cdate_format")))}if(e(h,g.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))){h.innerHTML=k._getDateTime(new Date(),g.getParam("template_mdate_format",g.getLang("template.mdate_format")))}if(e(h,g.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))){h.innerHTML=b}});k._replaceVals(c);g.execCommand("mceInsertContent",false,c.innerHTML);g.addVisual()},_replaceVals:function(c){var d=this.editor.dom,b=this.editor.getParam("template_replace_values");a(d.select("*",c),function(f){a(b,function(g,e){if(d.hasClass(f,e)){if(typeof(b[e])=="function"){b[e](f)}}})})},_getDateTime:function(e,b){if(!b){return""}function c(g,d){var f;g=""+g;if(g.length -
    @@ -24,15 +23,8 @@
    -
    - -
    - -
    - -
    - -
    + +
    diff --git a/include/javascript/tiny_mce/plugins/visualchars/editor_plugin.js b/include/javascript/tiny_mce/plugins/visualchars/editor_plugin.js index e1e4238a..1a148e8b 100644 --- a/include/javascript/tiny_mce/plugins/visualchars/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/visualchars/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.VisualChars',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceVisualChars',t._toggleVisualChars,t);ed.addButton('visualchars',{title:'visualchars.desc',cmd:'mceVisualChars'});ed.onBeforeGetContent.add(function(ed,o){if(t.state){t.state=true;t._toggleVisualChars();}});},getInfo:function(){return{longname:'Visual characters',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_toggleVisualChars:function(){var t=this,ed=t.editor,nl,i,h,d=ed.getDoc(),b=ed.getBody(),nv,s=ed.selection,bo;t.state=!t.state;ed.controlManager.setActive('visualchars',t.state);if(t.state){nl=[];tinymce.walk(b,function(n){if(n.nodeType==3&&n.nodeValue&&n.nodeValue.indexOf('\u00a0')!=-1)nl.push(n);},'childNodes');for(i=0;i$1');nv=nv.replace(/\u00a0/g,'\u00b7');ed.dom.setOuterHTML(nl[i],nv,d);}}else{nl=tinymce.grep(ed.dom.select('span',b),function(n){return ed.dom.hasClass(n,'mceVisualNbsp');});for(i=0;i$1');c=k.dom.create("div",null,l);while(node=c.lastChild){k.dom.insertAfter(node,a[g])}k.dom.remove(a[g])}}else{a=k.dom.select("span.mceItemNbsp",o);for(g=a.length-1;g>=0;g--){k.dom.remove(a[g],1)}}q.moveToBookmark(f)}});tinymce.PluginManager.add("visualchars",tinymce.plugins.VisualChars)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/visualchars/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/visualchars/editor_plugin_src.js index fbe0fc6f..0e3572e6 100644 --- a/include/javascript/tiny_mce/plugins/visualchars/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/visualchars/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -19,9 +22,9 @@ ed.addButton('visualchars', {title : 'visualchars.desc', cmd : 'mceVisualChars'}); ed.onBeforeGetContent.add(function(ed, o) { - if (t.state) { + if (t.state && o.format != 'raw' && !o.draft) { t.state = true; - t._toggleVisualChars(); + t._toggleVisualChars(false); } }); }, @@ -38,12 +41,15 @@ // Private methods - _toggleVisualChars : function() { - var t = this, ed = t.editor, nl, i, h, d = ed.getDoc(), b = ed.getBody(), nv, s = ed.selection, bo; + _toggleVisualChars : function(bookmark) { + var t = this, ed = t.editor, nl, i, h, d = ed.getDoc(), b = ed.getBody(), nv, s = ed.selection, bo, div, bm; t.state = !t.state; ed.controlManager.setActive('visualchars', t.state); + if (bookmark) + bm = s.getBookmark(); + if (t.state) { nl = []; tinymce.walk(b, function(n) { @@ -51,20 +57,24 @@ nl.push(n); }, 'childNodes'); - for (i=0; i$1'); - nv = nv.replace(/\u00a0/g, '\u00b7'); - ed.dom.setOuterHTML(nl[i], nv, d); + nv = nv.replace(/(\u00a0)/g, '$1'); + + div = ed.dom.create('div', null, nv); + while (node = div.lastChild) + ed.dom.insertAfter(node, nl[i]); + + ed.dom.remove(nl[i]); } } else { - nl = tinymce.grep(ed.dom.select('span', b), function(n) { - return ed.dom.hasClass(n, 'mceVisualNbsp'); - }); + nl = ed.dom.select('span.mceItemNbsp', b); - for (i=0; i= 0; i--) + ed.dom.remove(nl[i], 1); } + + s.moveToBookmark(bm); } }); diff --git a/include/javascript/tiny_mce/plugins/wordcount/editor_plugin.js b/include/javascript/tiny_mce/plugins/wordcount/editor_plugin.js new file mode 100644 index 00000000..e769d09f --- /dev/null +++ b/include/javascript/tiny_mce/plugins/wordcount/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.WordCount",{block:0,id:null,countre:null,cleanre:null,init:function(a,b){var c=this,d=0;c.countre=a.getParam("wordcount_countregex",/[\w\u2019\'-]+/g);c.cleanre=a.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\'\"_+=\\\/-]*/g);c.id=a.id+"-word-count";a.onPostRender.add(function(f,e){var g,h;h=f.getParam("wordcount_target_id");if(!h){g=tinymce.DOM.get(f.id+"_path_row");if(g){tinymce.DOM.add(g.parentNode,"div",{style:"float: right"},f.getLang("wordcount.words","Words: ")+'0')}}else{tinymce.DOM.add(h,"span",{},'0')}});a.onInit.add(function(e){e.selection.onSetContent.add(function(){c._count(e)});c._count(e)});a.onSetContent.add(function(e){c._count(e)});a.onKeyUp.add(function(f,g){if(g.keyCode==d){return}if(13==g.keyCode||8==d||46==d){c._count(f)}d=g.keyCode})},_getCount:function(c){var a=0;var b=c.getContent({format:"raw"});if(b){b=b.replace(/\.\.\./g," ");b=b.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ");b=b.replace(/(\w+)(&.+?;)+(\w+)/,"$1$3").replace(/&.+?;/g," ");b=b.replace(this.cleanre,"");var d=b.match(this.countre);if(d){a=d.length}}return a},_count:function(a){var b=this;if(b.block){return}b.block=1;setTimeout(function(){var c=b._getCount(a);tinymce.DOM.setHTML(b.id,c.toString());setTimeout(function(){b.block=0},2000)},1)},getInfo:function(){return{longname:"Word Count plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("wordcount",tinymce.plugins.WordCount)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/wordcount/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/wordcount/editor_plugin_src.js new file mode 100644 index 00000000..b51b6075 --- /dev/null +++ b/include/javascript/tiny_mce/plugins/wordcount/editor_plugin_src.js @@ -0,0 +1,114 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.WordCount', { + block : 0, + id : null, + countre : null, + cleanre : null, + + init : function(ed, url) { + var t = this, last = 0; + + t.countre = ed.getParam('wordcount_countregex', /[\w\u2019\'-]+/g); // u2019 == ’ + t.cleanre = ed.getParam('wordcount_cleanregex', /[0-9.(),;:!?%#$?\'\"_+=\\\/-]*/g); + t.id = ed.id + '-word-count'; + + ed.onPostRender.add(function(ed, cm) { + var row, id; + + // Add it to the specified id or the theme advanced path + id = ed.getParam('wordcount_target_id'); + if (!id) { + row = tinymce.DOM.get(ed.id + '_path_row'); + + if (row) + tinymce.DOM.add(row.parentNode, 'div', {'style': 'float: right'}, ed.getLang('wordcount.words', 'Words: ') + '0'); + } else { + tinymce.DOM.add(id, 'span', {}, '0'); + } + }); + + ed.onInit.add(function(ed) { + ed.selection.onSetContent.add(function() { + t._count(ed); + }); + + t._count(ed); + }); + + ed.onSetContent.add(function(ed) { + t._count(ed); + }); + + ed.onKeyUp.add(function(ed, e) { + if (e.keyCode == last) + return; + + if (13 == e.keyCode || 8 == last || 46 == last) + t._count(ed); + + last = e.keyCode; + }); + }, + + _getCount : function(ed) { + var tc = 0; + var tx = ed.getContent({ format: 'raw' }); + + if (tx) { + tx = tx.replace(/\.\.\./g, ' '); // convert ellipses to spaces + tx = tx.replace(/<.[^<>]*?>/g, ' ').replace(/ | /gi, ' '); // remove html tags and space chars + + // deal with html entities + tx = tx.replace(/(\w+)(&.+?;)+(\w+)/, "$1$3").replace(/&.+?;/g, ' '); + tx = tx.replace(this.cleanre, ''); // remove numbers and punctuation + + var wordArray = tx.match(this.countre); + if (wordArray) { + tc = wordArray.length; + } + } + + return tc; + }, + + _count : function(ed) { + var t = this; + + // Keep multiple calls from happening at the same time + if (t.block) + return; + + t.block = 1; + + setTimeout(function() { + var tc = t._getCount(ed); + + tinymce.DOM.setHTML(t.id, tc.toString()); + + setTimeout(function() {t.block = 0;}, 2000); + }, 1); + }, + + getInfo: function() { + return { + longname : 'Word Count plugin', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + tinymce.PluginManager.add('wordcount', tinymce.plugins.WordCount); +})(); diff --git a/include/javascript/tiny_mce/plugins/xhtmlxtras/abbr.htm b/include/javascript/tiny_mce/plugins/xhtmlxtras/abbr.htm index fb43a784..d4102180 100644 --- a/include/javascript/tiny_mce/plugins/xhtmlxtras/abbr.htm +++ b/include/javascript/tiny_mce/plugins/xhtmlxtras/abbr.htm @@ -9,13 +9,13 @@ - - + +
    @@ -24,7 +24,7 @@
    {#xhtmlxtras_dlg.fieldset_attrib_tab} -
     
    +
    @@ -42,7 +42,7 @@ - + @@ -68,7 +68,7 @@
    {#xhtmlxtras_dlg.fieldset_events_tab} -
    :
    ::
    +
    @@ -133,17 +133,10 @@
    -
    - -
    -
    - -
    -
    - -
    + + +
    - diff --git a/include/javascript/tiny_mce/plugins/xhtmlxtras/acronym.htm b/include/javascript/tiny_mce/plugins/xhtmlxtras/acronym.htm index 3cbe57e8..12b189b4 100644 --- a/include/javascript/tiny_mce/plugins/xhtmlxtras/acronym.htm +++ b/include/javascript/tiny_mce/plugins/xhtmlxtras/acronym.htm @@ -9,13 +9,13 @@ - - + + @@ -24,7 +24,7 @@
    {#xhtmlxtras_dlg.fieldset_attrib_tab} -
    :
    +
    @@ -42,7 +42,7 @@ - + @@ -68,7 +68,7 @@
    {#xhtmlxtras_dlg.fieldset_events_tab} -
    :
    ::
    +
    @@ -133,17 +133,10 @@
    -
    - -
    -
    - -
    -
    - -
    + + +
    - diff --git a/include/javascript/tiny_mce/plugins/xhtmlxtras/attributes.htm b/include/javascript/tiny_mce/plugins/xhtmlxtras/attributes.htm index 1d882007..d84f378b 100644 --- a/include/javascript/tiny_mce/plugins/xhtmlxtras/attributes.htm +++ b/include/javascript/tiny_mce/plugins/xhtmlxtras/attributes.htm @@ -8,14 +8,14 @@ - - + + @@ -23,7 +23,7 @@
    {#xhtmlxtras_dlg.attribute_attrib_tab} -
    :
    +
    @@ -36,12 +36,12 @@ - + @@ -76,7 +76,7 @@
    {#xhtmlxtras_dlg.attribute_events_tab} -
    :
    ::
    +
    @@ -141,14 +141,9 @@
    -
    - -
    -
    - -
    + +
    - diff --git a/include/javascript/tiny_mce/plugins/xhtmlxtras/cite.htm b/include/javascript/tiny_mce/plugins/xhtmlxtras/cite.htm index aa24db6d..ab61b330 100644 --- a/include/javascript/tiny_mce/plugins/xhtmlxtras/cite.htm +++ b/include/javascript/tiny_mce/plugins/xhtmlxtras/cite.htm @@ -9,13 +9,13 @@ - - + + @@ -24,7 +24,7 @@
    {#xhtmlxtras_dlg.fieldset_attrib_tab} -
    :
    +
    @@ -68,7 +68,7 @@
    {#xhtmlxtras_dlg.fieldset_events_tab} -
    :
    +
    @@ -133,17 +133,10 @@
    -
    - -
    -
    - -
    -
    - -
    + + +
    - diff --git a/include/javascript/tiny_mce/plugins/xhtmlxtras/del.htm b/include/javascript/tiny_mce/plugins/xhtmlxtras/del.htm index f67e84ff..e3f34c7d 100644 --- a/include/javascript/tiny_mce/plugins/xhtmlxtras/del.htm +++ b/include/javascript/tiny_mce/plugins/xhtmlxtras/del.htm @@ -9,13 +9,13 @@ - - + + @@ -24,14 +24,14 @@
    {#xhtmlxtras_dlg.fieldset_general_tab} -
    :
    +
    @@ -44,7 +44,7 @@
    {#xhtmlxtras_dlg.fieldset_attrib_tab} -
    : - +
    - +
    +
    @@ -62,7 +62,7 @@ - + @@ -88,7 +88,7 @@
    {#xhtmlxtras_dlg.fieldset_events_tab} -
    :
    ::
    +
    @@ -153,18 +153,10 @@
    -
    - -
    -
    - -
    -
    - -
    + + +
    - - diff --git a/include/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin.js b/include/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin.js index 00c178e5..9b98a515 100644 --- a/include/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.XHTMLXtrasPlugin',{init:function(ed,url){ed.addCommand('mceCite',function(){ed.windowManager.open({file:url+'/cite.htm',width:350+parseInt(ed.getLang('xhtmlxtras.cite_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.cite_delta_height',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAcronym',function(){ed.windowManager.open({file:url+'/acronym.htm',width:350+parseInt(ed.getLang('xhtmlxtras.acronym_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.acronym_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAbbr',function(){ed.windowManager.open({file:url+'/abbr.htm',width:350+parseInt(ed.getLang('xhtmlxtras.abbr_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.abbr_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceDel',function(){ed.windowManager.open({file:url+'/del.htm',width:340+parseInt(ed.getLang('xhtmlxtras.del_delta_width',0)),height:310+parseInt(ed.getLang('xhtmlxtras.del_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceIns',function(){ed.windowManager.open({file:url+'/ins.htm',width:340+parseInt(ed.getLang('xhtmlxtras.ins_delta_width',0)),height:310+parseInt(ed.getLang('xhtmlxtras.ins_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAttributes',function(){ed.windowManager.open({file:url+'/attributes.htm',width:380,height:370,inline:1},{plugin_url:url});});ed.addButton('cite',{title:'xhtmlxtras.cite_desc',cmd:'mceCite'});ed.addButton('acronym',{title:'xhtmlxtras.acronym_desc',cmd:'mceAcronym'});ed.addButton('abbr',{title:'xhtmlxtras.abbr_desc',cmd:'mceAbbr'});ed.addButton('del',{title:'xhtmlxtras.del_desc',cmd:'mceDel'});ed.addButton('ins',{title:'xhtmlxtras.ins_desc',cmd:'mceIns'});ed.addButton('attribs',{title:'xhtmlxtras.attribs_desc',cmd:'mceAttributes'});if(tinymce.isIE){function fix(ed,o){if(o.set){o.content=o.content.replace(/]+)>/gi,'');o.content=o.content.replace(/<\/abbr>/gi,'');}};ed.onBeforeSetContent.add(fix);ed.onPostProcess.add(fix);}ed.onNodeChange.add(function(ed,cm,n,co){n=ed.dom.getParent(n,'CITE,ACRONYM,ABBR,DEL,INS');cm.setDisabled('cite',co);cm.setDisabled('acronym',co);cm.setDisabled('abbr',co);cm.setDisabled('del',co);cm.setDisabled('ins',co);cm.setDisabled('attribs',n&&n.nodeName=='BODY');cm.setActive('cite',0);cm.setActive('acronym',0);cm.setActive('abbr',0);cm.setActive('del',0);cm.setActive('ins',0);if(n){do{cm.setDisabled(n.nodeName.toLowerCase(),0);cm.setActive(n.nodeName.toLowerCase(),1);}while(n=n.parentNode);}});},getInfo:function(){return{longname:'XHTML Xtras Plugin',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('xhtmlxtras',tinymce.plugins.XHTMLXtrasPlugin);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.XHTMLXtrasPlugin",{init:function(a,b){a.addCommand("mceCite",function(){a.windowManager.open({file:b+"/cite.htm",width:350+parseInt(a.getLang("xhtmlxtras.cite_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.cite_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAcronym",function(){a.windowManager.open({file:b+"/acronym.htm",width:350+parseInt(a.getLang("xhtmlxtras.acronym_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.acronym_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAbbr",function(){a.windowManager.open({file:b+"/abbr.htm",width:350+parseInt(a.getLang("xhtmlxtras.abbr_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.abbr_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceDel",function(){a.windowManager.open({file:b+"/del.htm",width:340+parseInt(a.getLang("xhtmlxtras.del_delta_width",0)),height:310+parseInt(a.getLang("xhtmlxtras.del_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceIns",function(){a.windowManager.open({file:b+"/ins.htm",width:340+parseInt(a.getLang("xhtmlxtras.ins_delta_width",0)),height:310+parseInt(a.getLang("xhtmlxtras.ins_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAttributes",function(){a.windowManager.open({file:b+"/attributes.htm",width:380+parseInt(a.getLang("xhtmlxtras.attr_delta_width",0)),height:370+parseInt(a.getLang("xhtmlxtras.attr_delta_height",0)),inline:1},{plugin_url:b})});a.addButton("cite",{title:"xhtmlxtras.cite_desc",cmd:"mceCite"});a.addButton("acronym",{title:"xhtmlxtras.acronym_desc",cmd:"mceAcronym"});a.addButton("abbr",{title:"xhtmlxtras.abbr_desc",cmd:"mceAbbr"});a.addButton("del",{title:"xhtmlxtras.del_desc",cmd:"mceDel"});a.addButton("ins",{title:"xhtmlxtras.ins_desc",cmd:"mceIns"});a.addButton("attribs",{title:"xhtmlxtras.attribs_desc",cmd:"mceAttributes"});a.onNodeChange.add(function(d,c,f,e){f=d.dom.getParent(f,"CITE,ACRONYM,ABBR,DEL,INS");c.setDisabled("cite",e);c.setDisabled("acronym",e);c.setDisabled("abbr",e);c.setDisabled("del",e);c.setDisabled("ins",e);c.setDisabled("attribs",f&&f.nodeName=="BODY");c.setActive("cite",0);c.setActive("acronym",0);c.setActive("abbr",0);c.setActive("del",0);c.setActive("ins",0);if(f){do{c.setDisabled(f.nodeName.toLowerCase(),0);c.setActive(f.nodeName.toLowerCase(),1)}while(f=f.parentNode)}});a.onPreInit.add(function(){a.dom.create("abbr")})},getInfo:function(){return{longname:"XHTML Xtras Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("xhtmlxtras",tinymce.plugins.XHTMLXtrasPlugin)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js index 75a26ff1..a9c12ef3 100644 --- a/include/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -24,7 +27,7 @@ ed.windowManager.open({ file : url + '/acronym.htm', width : 350 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_width', 0)), - height : 250 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_width', 0)), + height : 250 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_height', 0)), inline : 1 }, { plugin_url : url @@ -35,7 +38,7 @@ ed.windowManager.open({ file : url + '/abbr.htm', width : 350 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_width', 0)), - height : 250 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_width', 0)), + height : 250 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_height', 0)), inline : 1 }, { plugin_url : url @@ -46,7 +49,7 @@ ed.windowManager.open({ file : url + '/del.htm', width : 340 + parseInt(ed.getLang('xhtmlxtras.del_delta_width', 0)), - height : 310 + parseInt(ed.getLang('xhtmlxtras.del_delta_width', 0)), + height : 310 + parseInt(ed.getLang('xhtmlxtras.del_delta_height', 0)), inline : 1 }, { plugin_url : url @@ -57,7 +60,7 @@ ed.windowManager.open({ file : url + '/ins.htm', width : 340 + parseInt(ed.getLang('xhtmlxtras.ins_delta_width', 0)), - height : 310 + parseInt(ed.getLang('xhtmlxtras.ins_delta_width', 0)), + height : 310 + parseInt(ed.getLang('xhtmlxtras.ins_delta_height', 0)), inline : 1 }, { plugin_url : url @@ -67,8 +70,8 @@ ed.addCommand('mceAttributes', function() { ed.windowManager.open({ file : url + '/attributes.htm', - width : 380, - height : 370, + width : 380 + parseInt(ed.getLang('xhtmlxtras.attr_delta_width', 0)), + height : 370 + parseInt(ed.getLang('xhtmlxtras.attr_delta_height', 0)), inline : 1 }, { plugin_url : url @@ -83,18 +86,6 @@ ed.addButton('ins', {title : 'xhtmlxtras.ins_desc', cmd : 'mceIns'}); ed.addButton('attribs', {title : 'xhtmlxtras.attribs_desc', cmd : 'mceAttributes'}); - if (tinymce.isIE) { - function fix(ed, o) { - if (o.set) { - o.content = o.content.replace(/]+)>/gi, ''); - o.content = o.content.replace(/<\/abbr>/gi, ''); - } - }; - - ed.onBeforeSetContent.add(fix); - ed.onPostProcess.add(fix); - } - ed.onNodeChange.add(function(ed, cm, n, co) { n = ed.dom.getParent(n, 'CITE,ACRONYM,ABBR,DEL,INS'); @@ -118,6 +109,11 @@ } while (n = n.parentNode); } }); + + ed.onPreInit.add(function() { + // Fixed IE issue where it can't handle these elements correctly + ed.dom.create('abbr'); + }); }, getInfo : function() { diff --git a/include/javascript/tiny_mce/plugins/xhtmlxtras/ins.htm b/include/javascript/tiny_mce/plugins/xhtmlxtras/ins.htm index 2411e820..226e6053 100644 --- a/include/javascript/tiny_mce/plugins/xhtmlxtras/ins.htm +++ b/include/javascript/tiny_mce/plugins/xhtmlxtras/ins.htm @@ -9,13 +9,13 @@ - - + +
    @@ -24,19 +24,19 @@
    {#xhtmlxtras_dlg.fieldset_general_tab} -
    :
    +
    - + @@ -44,9 +44,9 @@
    {#xhtmlxtras_dlg.fieldset_attrib_tab} -
    : - +
    - +
    :
    +
    - + @@ -62,7 +62,7 @@ - + @@ -88,7 +88,7 @@
    {#xhtmlxtras_dlg.fieldset_events_tab} -
    ::
    ::
    +
    @@ -153,18 +153,10 @@
    -
    - -
    -
    - -
    -
    - -
    + + +
    - - diff --git a/include/javascript/tiny_mce/plugins/xhtmlxtras/js/abbr.js b/include/javascript/tiny_mce/plugins/xhtmlxtras/js/abbr.js index 9630a365..1790e83d 100644 --- a/include/javascript/tiny_mce/plugins/xhtmlxtras/js/abbr.js +++ b/include/javascript/tiny_mce/plugins/xhtmlxtras/js/abbr.js @@ -1,8 +1,11 @@ - /** - +/** + * abbr.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - based on work by Andrew Tetlaw - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ function init() { @@ -13,7 +16,7 @@ function init() { } function insertAbbr() { - SXE.insertElement(tinymce.isIE ? 'html:abbr' : 'abbr'); + SXE.insertElement('abbr'); tinyMCEPopup.close(); } diff --git a/include/javascript/tiny_mce/plugins/xhtmlxtras/js/acronym.js b/include/javascript/tiny_mce/plugins/xhtmlxtras/js/acronym.js index d4ffbe1b..93b8d259 100644 --- a/include/javascript/tiny_mce/plugins/xhtmlxtras/js/acronym.js +++ b/include/javascript/tiny_mce/plugins/xhtmlxtras/js/acronym.js @@ -1,8 +1,11 @@ - /** - +/** + * acronym.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - based on work by Andrew Tetlaw - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ function init() { diff --git a/include/javascript/tiny_mce/plugins/xhtmlxtras/js/attributes.js b/include/javascript/tiny_mce/plugins/xhtmlxtras/js/attributes.js index 9971b6a3..9e9b07e6 100644 --- a/include/javascript/tiny_mce/plugins/xhtmlxtras/js/attributes.js +++ b/include/javascript/tiny_mce/plugins/xhtmlxtras/js/attributes.js @@ -1,8 +1,11 @@ - /** - +/** + * attributes.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - based on work by Andrew Tetlaw - * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ function init() { @@ -50,7 +53,6 @@ function insertAction() { var inst = tinyMCEPopup.editor; var elm = inst.selection.getNode(); - tinyMCEPopup.execCommand("mceBeginUndoLevel"); setAllAttribs(elm); tinyMCEPopup.execCommand("mceEndUndoLevel"); tinyMCEPopup.close(); @@ -69,21 +71,7 @@ function setAttrib(elm, attrib, value) { value = valueElm.value; } - if (value != "") { - dom.setAttrib(elm, attrib.toLowerCase(), value); - - if (attrib == "style") - attrib = "style.cssText"; - - if (attrib.substring(0, 2) == 'on') - value = 'return true;' + value; - - if (attrib == "class") - attrib = "className"; - - elm[attrib]=value; - } else - elm.removeAttribute(attrib); + dom.setAttrib(elm, attrib.toLowerCase(), value); } function setAllAttribs(elm) { diff --git a/include/javascript/tiny_mce/plugins/xhtmlxtras/js/cite.js b/include/javascript/tiny_mce/plugins/xhtmlxtras/js/cite.js index f764d9b6..b73ef473 100644 --- a/include/javascript/tiny_mce/plugins/xhtmlxtras/js/cite.js +++ b/include/javascript/tiny_mce/plugins/xhtmlxtras/js/cite.js @@ -1,8 +1,11 @@ - /** - +/** + * cite.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - based on work by Andrew Tetlaw - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ function init() { diff --git a/include/javascript/tiny_mce/plugins/xhtmlxtras/js/del.js b/include/javascript/tiny_mce/plugins/xhtmlxtras/js/del.js index e607a009..a5397f7e 100644 --- a/include/javascript/tiny_mce/plugins/xhtmlxtras/js/del.js +++ b/include/javascript/tiny_mce/plugins/xhtmlxtras/js/del.js @@ -1,8 +1,11 @@ - /** - +/** + * del.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - based on work by Andrew Tetlaw - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ function init() { @@ -18,17 +21,17 @@ function setElementAttribs(elm) { setAllCommonAttribs(elm); setAttrib(elm, 'datetime'); setAttrib(elm, 'cite'); + elm.removeAttribute('data-mce-new'); } function insertDel() { var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'DEL'); - tinyMCEPopup.execCommand('mceBeginUndoLevel'); if (elm == null) { var s = SXE.inst.selection.getContent(); if(s.length > 0) { insertInlineElement('del'); - var elementArray = tinymce.grep(SXE.inst.dom.select('del'), function(n) {return n.id == '#sxe_temp_del#';}); + var elementArray = SXE.inst.dom.select('del[data-mce-new]'); for (var i=0; i 0) { tagName = element_name; - if (tinymce.isIE && element_name.indexOf('html:') == 0) - element_name = element_name.substring(5).toLowerCase(); - insertInlineElement(element_name); var elementArray = tinymce.grep(SXE.inst.dom.select(element_name)); for (var i=0; i 0) { - insertInlineElement('INS'); - var elementArray = tinymce.grep(SXE.inst.dom.select('ins'), function(n) {return n.id == '#sxe_temp_ins#';}); + insertInlineElement('ins'); + var elementArray = SXE.inst.dom.select('ins[data-mce-new]'); for (var i=0; i + {#advanced_dlg.about_title} @@ -9,9 +9,9 @@ @@ -26,8 +26,6 @@
    Got Moxie? - Hosted By Sourceforge - Also on freshmeat
    @@ -48,9 +46,7 @@
    -
    - -
    +
    diff --git a/include/javascript/tiny_mce/themes/advanced/anchor.htm b/include/javascript/tiny_mce/themes/advanced/anchor.htm index 054cde57..dc53312d 100644 --- a/include/javascript/tiny_mce/themes/advanced/anchor.htm +++ b/include/javascript/tiny_mce/themes/advanced/anchor.htm @@ -4,28 +4,22 @@ {#advanced_dlg.anchor_title} - - +
    -
    :
    +
    - + - - + +
    {#advanced_dlg.anchor_title}{#advanced_dlg.anchor_title}
    {#advanced_dlg.anchor_name}:
    -
    - -
    - -
    - -
    + +
    diff --git a/include/javascript/tiny_mce/themes/advanced/charmap.htm b/include/javascript/tiny_mce/themes/advanced/charmap.htm index 8ca01133..8f172f3b 100644 --- a/include/javascript/tiny_mce/themes/advanced/charmap.htm +++ b/include/javascript/tiny_mce/themes/advanced/charmap.htm @@ -1,54 +1,51 @@ - + {#advanced_dlg.charmap_title} - - - - - - - -
    {#advanced_dlg.charmap_title}
    + + + + + + - - - - - + + + + + +
    - - - - - - - - -
     
     
    -
    - - - - - - - - - - - - - - - - -
    HTML-Code
     
     
    NUM-Code
     
    -
    + + + + + + + +
     
     
    +
    + + + + + + + + + + + + + + + + +
     
     
     
    +
    - diff --git a/include/javascript/tiny_mce/themes/advanced/color_picker.htm b/include/javascript/tiny_mce/themes/advanced/color_picker.htm index 4cab7689..e7f19aba 100644 --- a/include/javascript/tiny_mce/themes/advanced/color_picker.htm +++ b/include/javascript/tiny_mce/themes/advanced/color_picker.htm @@ -5,15 +5,15 @@ - - + +
    @@ -22,7 +22,7 @@
    {#advanced_dlg.colorpicker_picker_title}
    - +
    @@ -35,7 +35,7 @@
    - {#advanced_dlg.colorpicker_palette_title} + {#advanced_dlg.colorpicker_palette_title}
    @@ -45,9 +45,9 @@
    -
    - {#advanced_dlg.colorpicker_named_title} -
    +
    + {#advanced_dlg.colorpicker_named_title} +
    @@ -61,14 +61,12 @@
    -
    - -
    +
    - +
    diff --git a/include/javascript/tiny_mce/themes/advanced/editor_template.js b/include/javascript/tiny_mce/themes/advanced/editor_template.js index f233b72c..ba8dd4c3 100644 --- a/include/javascript/tiny_mce/themes/advanced/editor_template.js +++ b/include/javascript/tiny_mce/themes/advanced/editor_template.js @@ -1 +1 @@ -(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,extend=tinymce.extend,each=tinymce.each,Cookie=tinymce.util.Cookie,lastExtID,explode=tinymce.explode;tinymce.ThemeManager.requireLangPack('advanced');tinymce.create('tinymce.themes.AdvancedTheme',{sizes:[8,10,12,14,18,24,36],controls:{bold:['bold_desc','Bold'],italic:['italic_desc','Italic'],underline:['underline_desc','Underline'],strikethrough:['striketrough_desc','Strikethrough'],justifyleft:['justifyleft_desc','JustifyLeft'],justifycenter:['justifycenter_desc','JustifyCenter'],justifyright:['justifyright_desc','JustifyRight'],justifyfull:['justifyfull_desc','JustifyFull'],bullist:['bullist_desc','InsertUnorderedList'],numlist:['numlist_desc','InsertOrderedList'],outdent:['outdent_desc','Outdent'],indent:['indent_desc','Indent'],cut:['cut_desc','Cut'],copy:['copy_desc','Copy'],paste:['paste_desc','Paste'],undo:['undo_desc','Undo'],redo:['redo_desc','Redo'],link:['link_desc','mceLink'],unlink:['unlink_desc','unlink'],image:['image_desc','mceImage'],cleanup:['cleanup_desc','mceCleanup'],help:['help_desc','mceHelp'],code:['code_desc','mceCodeEditor'],hr:['hr_desc','InsertHorizontalRule'],removeformat:['removeformat_desc','RemoveFormat'],sub:['sub_desc','subscript'],sup:['sup_desc','superscript'],forecolor:['forecolor_desc','ForeColor'],forecolorpicker:['forecolor_desc','mceForeColor'],backcolor:['backcolor_desc','HiliteColor'],backcolorpicker:['backcolor_desc','mceBackColor'],charmap:['charmap_desc','mceCharMap'],visualaid:['visualaid_desc','mceToggleVisualAid'],anchor:['anchor_desc','mceInsertAnchor'],newdocument:['newdocument_desc','mceNewDocument'],blockquote:['blockquote_desc','mceBlockQuote']},stateControls:['bold','italic','underline','strikethrough','bullist','numlist','justifyleft','justifycenter','justifyright','justifyfull','sub','sup','blockquote'],init:function(ed,url){var t=this,s,v,o;t.editor=ed;t.url=url;t.onResolveName=new tinymce.util.Dispatcher(this);t.settings=s=extend({theme_advanced_path:true,theme_advanced_toolbar_location:'bottom',theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",readonly:ed.settings.readonly},ed.settings);if(!s.font_size_style_values)s.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt";if(tinymce.is(s.theme_advanced_font_sizes,'string')){s.font_size_style_values=tinymce.explode(s.font_size_style_values);s.font_size_classes=tinymce.explode(s.font_size_classes||'');o={};ed.settings.theme_advanced_font_sizes=s.theme_advanced_font_sizes;each(ed.getParam('theme_advanced_font_sizes','','hash'),function(v,k){var cl;if(k==v&&v>=1&&v<=7){k=v+' ('+t.sizes[v-1]+'pt)';if(ed.settings.convert_fonts_to_spans){cl=s.font_size_classes[v-1];v=s.font_size_style_values[v-1]||(t.sizes[v-1]+'pt');}}if(/\s*\./.test(v))cl=v.replace(/\./g,'');o[k]=cl?{'class':cl}:{fontSize:v};});s.theme_advanced_font_sizes=o;}if((v=s.theme_advanced_path_location)&&v!='none')s.theme_advanced_statusbar_location=s.theme_advanced_path_location;if(s.theme_advanced_statusbar_location=='none')s.theme_advanced_statusbar_location=0;ed.onInit.add(function(){ed.onNodeChange.add(t._nodeChanged,t);if(ed.settings.content_css!==false)ed.dom.loadCSS(ed.baseURI.toAbsolute("themes/advanced/skins/"+ed.settings.skin+"/content.css"));});ed.onSetProgressState.add(function(ed,b,ti){var co,id=ed.id,tb;if(b){t.progressTimer=setTimeout(function(){co=ed.getContainer();co=co.insertBefore(DOM.create('DIV',{style:'position:relative'}),co.firstChild);tb=DOM.get(ed.id+'_tbl');DOM.add(co,'div',{id:id+'_blocker','class':'mceBlocker',style:{width:tb.clientWidth+2,height:tb.clientHeight+2}});DOM.add(co,'div',{id:id+'_progress','class':'mceProgress',style:{left:tb.clientWidth/ 2, top : tb.clientHeight /2}});},ti||0);}else{DOM.remove(id+'_blocker');DOM.remove(id+'_progress');clearTimeout(t.progressTimer);}});DOM.loadCSS(s.editor_css?ed.documentBaseURI.toAbsolute(s.editor_css):url+"/skins/"+ed.settings.skin+"/ui.css");if(s.skin_variant)DOM.loadCSS(url+"/skins/"+ed.settings.skin+"/ui_"+s.skin_variant+".css");},createControl:function(n,cf){var cd,c;if(c=cf.createControl(n))return c;switch(n){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu();}if((cd=this.controls[n]))return cf.createButton(n,{title:"advanced."+cd[0],cmd:cd[1],ui:cd[2],value:cd[3]});},execCommand:function(cmd,ui,val){var f=this['_'+cmd];if(f){f.call(this,ui,val);return true;}return false;},_importClasses:function(e){var ed=this.editor,c=ed.controlManager.get('styleselect');if(c.getLength()==0){each(ed.dom.getClasses(),function(o){c.add(o['class'],o['class']);});}},_createStyleSelect:function(n){var t=this,ed=t.editor,cf=ed.controlManager,c=cf.createListBox('styleselect',{title:'advanced.style_select',onselect:function(v){if(c.selectedValue===v){ed.execCommand('mceSetStyleInfo',0,{command:'removeformat'});c.select();return false;}else ed.execCommand('mceSetCSSClass',0,v);}});if(c){each(ed.getParam('theme_advanced_styles','','hash'),function(v,k){if(v)c.add(t.editor.translate(k),v);});c.onPostRender.add(function(ed,n){if(!c.NativeListBox){Event.add(n.id+'_text','focus',t._importClasses,t);Event.add(n.id+'_text','mousedown',t._importClasses,t);Event.add(n.id+'_open','focus',t._importClasses,t);Event.add(n.id+'_open','mousedown',t._importClasses,t);}else Event.add(n.id,'focus',t._importClasses,t);});}return c;},_createFontSelect:function(){var c,t=this,ed=t.editor;c=ed.controlManager.createListBox('fontselect',{title:'advanced.fontdefault',cmd:'FontName'});if(c){each(ed.getParam('theme_advanced_fonts',t.settings.theme_advanced_fonts,'hash'),function(v,k){c.add(ed.translate(k),v,{style:v.indexOf('dings')==-1?'font-family:'+v:''});});}return c;},_createFontSizeSelect:function(){var t=this,ed=t.editor,c,i=0,cl=[];c=ed.controlManager.createListBox('fontsizeselect',{title:'advanced.font_size',onselect:function(v){if(v.fontSize)ed.execCommand('FontSize',false,v.fontSize);else{each(t.settings.theme_advanced_font_sizes,function(v,k){if(v['class'])cl.push(v['class']);});ed.editorCommands._applyInlineStyle('span',{'class':v['class']},{check_classes:cl});}}});if(c){each(t.settings.theme_advanced_font_sizes,function(v,k){var fz=v.fontSize;if(fz>=1&&fz<=7)fz=t.sizes[parseInt(fz)-1]+'pt';c.add(k,v,{'style':'font-size:'+fz,'class':'mceFontSize'+(i++)+(' '+(v['class']||''))});});}return c;},_createBlockFormats:function(){var c,fmts={p:'advanced.paragraph',address:'advanced.address',pre:'advanced.pre',h1:'advanced.h1',h2:'advanced.h2',h3:'advanced.h3',h4:'advanced.h4',h5:'advanced.h5',h6:'advanced.h6',div:'advanced.div',blockquote:'advanced.blockquote',code:'advanced.code',dt:'advanced.dt',dd:'advanced.dd',samp:'advanced.samp'},t=this;c=t.editor.controlManager.createListBox('formatselect',{title:'advanced.block',cmd:'FormatBlock'});if(c){each(t.editor.getParam('theme_advanced_blockformats',t.settings.theme_advanced_blockformats,'hash'),function(v,k){c.add(t.editor.translate(k!=v?k:fmts[v]),v,{'class':'mce_formatPreview mce_'+v});});}return c;},_createForeColorMenu:function(){var c,t=this,s=t.settings,o={},v;if(s.theme_advanced_more_colors){o.more_colors_func=function(){t._mceColorPicker(0,{color:c.value,func:function(co){c.setColor(co);}});};}if(v=s.theme_advanced_text_colors)o.colors=v;if(s.theme_advanced_default_foreground_color)o.default_color=s.theme_advanced_default_foreground_color;o.title='advanced.forecolor_desc';o.cmd='ForeColor';o.scope=this;c=t.editor.controlManager.createColorSplitButton('forecolor',o);return c;},_createBackColorMenu:function(){var c,t=this,s=t.settings,o={},v;if(s.theme_advanced_more_colors){o.more_colors_func=function(){t._mceColorPicker(0,{color:c.value,func:function(co){c.setColor(co);}});};}if(v=s.theme_advanced_background_colors)o.colors=v;if(s.theme_advanced_default_background_color)o.default_color=s.theme_advanced_default_background_color;o.title='advanced.backcolor_desc';o.cmd='HiliteColor';o.scope=this;c=t.editor.controlManager.createColorSplitButton('backcolor',o);return c;},renderUI:function(o){var n,ic,tb,t=this,ed=t.editor,s=t.settings,sc,p,nl;n=p=DOM.create('span',{id:ed.id+'_parent','class':'mceEditor '+ed.settings.skin+'Skin'+(s.skin_variant?' '+ed.settings.skin+'Skin'+t._ufirst(s.skin_variant):'')});if(!DOM.boxModel)n=DOM.add(n,'div',{'class':'mceOldBoxModel'});n=sc=DOM.add(n,'table',{id:ed.id+'_tbl','class':'mceLayout',cellSpacing:0,cellPadding:0});n=tb=DOM.add(n,'tbody');switch((s.theme_advanced_layout_manager||'').toLowerCase()){case"rowlayout":ic=t._rowLayout(s,tb,o);break;case"customlayout":ic=ed.execCallback("theme_advanced_custom_layout",s,tb,o,p);break;default:ic=t._simpleLayout(s,tb,o,p);}n=o.targetNode;nl=DOM.stdMode?sc.getElementsByTagName('tr'):sc.rows;DOM.addClass(nl[0],'mceFirst');DOM.addClass(nl[nl.length-1],'mceLast');each(DOM.select('tr',tb),function(n){DOM.addClass(n.firstChild,'mceFirst');DOM.addClass(n.childNodes[n.childNodes.length-1],'mceLast');});if(DOM.get(s.theme_advanced_toolbar_container))DOM.get(s.theme_advanced_toolbar_container).appendChild(p);else DOM.insertAfter(p,n);Event.add(ed.id+'_path_row','click',function(e){e=e.target;if(e.nodeName=='A'){t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/,'$1'));return Event.cancel(e);}});if(!ed.getParam('accessibility_focus')||ed.getParam('tab_focus'))Event.add(DOM.add(p,'a',{href:'#'},''),'focus',function(){tinyMCE.get(ed.id).focus();});if(s.theme_advanced_toolbar_location=='external')o.deltaHeight=0;t.deltaHeight=o.deltaHeight;o.targetNode=null;return{iframeContainer:ic,editorContainer:ed.id+'_parent',sizeContainer:sc,deltaHeight:o.deltaHeight};},getInfo:function(){return{longname:'Advanced theme',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',version:tinymce.majorVersion+"."+tinymce.minorVersion}},resizeBy:function(dw,dh){var e=DOM.get(this.editor.id+'_tbl');this.resizeTo(e.clientWidth+dw,e.clientHeight+dh);},resizeTo:function(w,h){var ed=this.editor,s=ed.settings,e=DOM.get(ed.id+'_tbl'),ifr=DOM.get(ed.id+'_ifr'),dh;w=Math.max(s.theme_advanced_resizing_min_width||100,w);h=Math.max(s.theme_advanced_resizing_min_height||100,h);w=Math.min(s.theme_advanced_resizing_max_width||0xFFFF,w);h=Math.min(s.theme_advanced_resizing_max_height||0xFFFF,h);dh=e.clientHeight-ifr.clientHeight;DOM.setStyle(ifr,'height',h-dh);DOM.setStyles(e,{width:w,height:h});},destroy:function(){var id=this.editor.id;Event.clear(id+'_resize');Event.clear(id+'_path_row');Event.clear(id+'_external_close');},_simpleLayout:function(s,tb,o,p){var t=this,ed=t.editor,lo=s.theme_advanced_toolbar_location,sl=s.theme_advanced_statusbar_location,n,ic,etb,c;if(s.readonly){n=DOM.add(tb,'tr');n=ic=DOM.add(n,'td',{'class':'mceIframeContainer'});return ic;}if(lo=='top')t._addToolbars(tb,o);if(lo=='external'){n=c=DOM.create('div',{style:'position:relative'});n=DOM.add(n,'div',{id:ed.id+'_external','class':'mceExternalToolbar'});DOM.add(n,'a',{id:ed.id+'_external_close',href:'javascript:;','class':'mceExternalClose'});n=DOM.add(n,'table',{id:ed.id+'_tblext',cellSpacing:0,cellPadding:0});etb=DOM.add(n,'tbody');if(p.firstChild.className=='mceOldBoxModel')p.firstChild.appendChild(c);else p.insertBefore(c,p.firstChild);t._addToolbars(etb,o);ed.onMouseUp.add(function(){var e=DOM.get(ed.id+'_external');DOM.show(e);DOM.hide(lastExtID);var f=Event.add(ed.id+'_external_close','click',function(){DOM.hide(ed.id+'_external');Event.remove(ed.id+'_external_close','click',f);});DOM.show(e);DOM.setStyle(e,'top',0-DOM.getRect(ed.id+'_tblext').h-1);DOM.hide(e);DOM.show(e);e.style.filter='';lastExtID=ed.id+'_external';e=null;});}if(sl=='top')t._addStatusBar(tb,o);if(!s.theme_advanced_toolbar_container){n=DOM.add(tb,'tr');n=ic=DOM.add(n,'td',{'class':'mceIframeContainer'});}if(lo=='bottom')t._addToolbars(tb,o);if(sl=='bottom')t._addStatusBar(tb,o);return ic;},_rowLayout:function(s,tb,o){var t=this,ed=t.editor,dc,da,cf=ed.controlManager,n,ic,to,a;dc=s.theme_advanced_containers_default_class||'';da=s.theme_advanced_containers_default_align||'center';each(explode(s.theme_advanced_containers||''),function(c,i){var v=s['theme_advanced_container_'+c]||'';switch(v.toLowerCase()){case'mceeditor':n=DOM.add(tb,'tr');n=ic=DOM.add(n,'td',{'class':'mceIframeContainer'});break;case'mceelementpath':t._addStatusBar(tb,o);break;default:a=(s['theme_advanced_container_'+c+'_align']||da).toLowerCase();a='mce'+t._ufirst(a);n=DOM.add(DOM.add(tb,'tr'),'td',{'class':'mceToolbar '+(s['theme_advanced_container_'+c+'_class']||dc)+' '+a||da});to=cf.createToolbar("toolbar"+i);t._addControls(v,to);DOM.setHTML(n,to.renderHTML());o.deltaHeight-=s.theme_advanced_row_height;}});return ic;},_addControls:function(v,tb){var t=this,s=t.settings,di,cf=t.editor.controlManager;if(s.theme_advanced_disable&&!t._disabled){di={};each(explode(s.theme_advanced_disable),function(v){di[v]=1;});t._disabled=di;}else di=t._disabled;each(explode(v),function(n){var c;if(di&&di[n])return;if(n=='tablecontrols'){each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(n){n=t.createControl(n,cf);if(n)tb.add(n);});return;}c=t.createControl(n,cf);if(c)tb.add(c);});},_addToolbars:function(c,o){var t=this,i,tb,ed=t.editor,s=t.settings,v,cf=ed.controlManager,di,n,h=[],a;a=s.theme_advanced_toolbar_align.toLowerCase();a='mce'+t._ufirst(a);n=DOM.add(DOM.add(c,'tr'),'td',{'class':'mceToolbar '+a});if(!ed.getParam('accessibility_focus')||ed.getParam('tab_focus'))h.push(DOM.createHTML('a',{href:'#',onfocus:'tinyMCE.get(\''+ed.id+'\').focus();'},''));h.push(DOM.createHTML('a',{href:'#',accesskey:'q',title:ed.getLang("advanced.toolbar_focus"), tabindex : "-1"},''));for(i=1;(v=s['theme_advanced_buttons'+i]);i++){tb=cf.createToolbar("toolbar"+i,{'class':'mceToolbarRow'+i});if(s['theme_advanced_buttons'+i+'_add'])v+=','+s['theme_advanced_buttons'+i+'_add'];if(s['theme_advanced_buttons'+i+'_add_before'])v=s['theme_advanced_buttons'+i+'_add_before']+','+v;t._addControls(v,tb);h.push(tb.renderHTML());o.deltaHeight-=s.theme_advanced_row_height;}h.push(DOM.createHTML('a',{href:'#',accesskey:'z',title:ed.getLang("advanced.toolbar_focus"),onfocus:'tinyMCE.getInstanceById(\''+ed.id+'\').focus();', tabindex : "-1"},''));DOM.setHTML(n,h.join(''));},_addStatusBar:function(tb,o){var n,t=this,ed=t.editor,s=t.settings,r,mf,me,td;n=DOM.add(tb,'tr');n=td=DOM.add(n,'td',{'class':'mceStatusbar'});n=DOM.add(n,'div',{id:ed.id+'_path_row'},s.theme_advanced_path?ed.translate('advanced.path')+': ':' ');DOM.add(n,'a',{href:'#',accesskey:'x'});if(s.theme_advanced_resizing&&!tinymce.isOldWebKit){DOM.add(td,'a',{id:ed.id+'_resize',href:'javascript:;',onclick:"return false;",'class':'mceResize'});if(s.theme_advanced_resizing_use_cookie){ed.onPostRender.add(function(){var o=Cookie.getHash("TinyMCE_"+ed.id+"_size"),c=DOM.get(ed.id+'_tbl');if(!o)return;if(s.theme_advanced_resize_horizontal)c.style.width=Math.max(10,o.cw)+'px';c.style.height=Math.max(10,o.ch)+'px';DOM.get(ed.id+'_ifr').style.height=Math.max(10,parseInt(o.ch)+t.deltaHeight)+'px';});}ed.onPostRender.add(function(){Event.add(ed.id+'_resize','mousedown',function(e){var c,p,w,h,n,pa;c=DOM.get(ed.id+'_tbl');w=c.clientWidth;h=c.clientHeight;miw=s.theme_advanced_resizing_min_width||100;mih=s.theme_advanced_resizing_min_height||100;maw=s.theme_advanced_resizing_max_width||0xFFFF;mah=s.theme_advanced_resizing_max_height||0xFFFF;p=DOM.add(DOM.get(ed.id+'_parent'),'div',{'class':'mcePlaceHolder'});DOM.setStyles(p,{width:w,height:h});DOM.hide(c);DOM.show(p);r={x:e.screenX,y:e.screenY,w:w,h:h,dx:null,dy:null};mf=Event.add(DOM.doc,'mousemove',function(e){var w,h;r.dx=e.screenX-r.x;r.dy=e.screenY-r.y;w=Math.max(miw,r.w+r.dx);h=Math.max(mih,r.h+r.dy);w=Math.min(maw,w);h=Math.min(mah,h);if(s.theme_advanced_resize_horizontal)p.style.width=w+'px';p.style.height=h+'px';return Event.cancel(e);});me=Event.add(DOM.doc,'mouseup',function(e){var ifr;Event.remove(DOM.doc,'mousemove',mf);Event.remove(DOM.doc,'mouseup',me);c.style.display='';DOM.remove(p);if(r.dx===null)return;ifr=DOM.get(ed.id+'_ifr');if(s.theme_advanced_resize_horizontal)c.style.width=Math.max(10,r.w+r.dx)+'px';c.style.height=Math.max(10,r.h+r.dy)+'px';ifr.style.height=Math.max(10,ifr.clientHeight+r.dy)+'px';if(s.theme_advanced_resizing_use_cookie){Cookie.setHash("TinyMCE_"+ed.id+"_size",{cw:r.w+r.dx,ch:r.h+r.dy});}});return Event.cancel(e);});});}o.deltaHeight-=21;n=tb=null;},_nodeChanged:function(ed,cm,n,co){var t=this,p,de=0,v,c,s=t.settings,cl,fz,fn;if(s.readonly)return;tinymce.each(t.stateControls,function(c){cm.setActive(c,ed.queryCommandState(t.controls[c][1]));});cm.setActive('visualaid',ed.hasVisual);cm.setDisabled('undo',!ed.undoManager.hasUndo()&&!ed.typing);cm.setDisabled('redo',!ed.undoManager.hasRedo());cm.setDisabled('outdent',!ed.queryCommandState('Outdent'));p=DOM.getParent(n,'A');if(c=cm.get('link')){if(!p||!p.name){c.setDisabled(!p&&co);c.setActive(!!p);}}if(c=cm.get('unlink')){c.setDisabled(!p&&co);c.setActive(!!p&&!p.name);}if(c=cm.get('anchor')){c.setActive(!!p&&p.name);if(tinymce.isWebKit){p=DOM.getParent(n,'IMG');c.setActive(!!p&&DOM.getAttrib(p,'mce_name')=='a');}}p=DOM.getParent(n,'IMG');if(c=cm.get('image'))c.setActive(!!p&&n.className.indexOf('mceItem')==-1);if(c=cm.get('styleselect')){if(n.className){t._importClasses();c.select(n.className);}else c.select();}if(c=cm.get('formatselect')){p=DOM.getParent(n,DOM.isBlock);if(p)c.select(p.nodeName.toLowerCase());}if(ed.settings.convert_fonts_to_spans){ed.dom.getParent(n,function(n){if(n.nodeName==='SPAN'){if(!cl&&n.className)cl=n.className;if(!fz&&n.style.fontSize)fz=n.style.fontSize;if(!fn&&n.style.fontFamily)fn=n.style.fontFamily.replace(/[\"\']+/g,'').replace(/^([^,]+).*/,'$1').toLowerCase();}return false;});if(c=cm.get('fontselect')){c.select(function(v){return v.replace(/^([^,]+).*/,'$1').toLowerCase()==fn;});}if(c=cm.get('fontsizeselect')){c.select(function(v){if(v.fontSize&&v.fontSize===fz)return true;if(v['class']&&v['class']===cl)return true;});}}else{if(c=cm.get('fontselect'))c.select(ed.queryCommandValue('FontName'));if(c=cm.get('fontsizeselect')){v=ed.queryCommandValue('FontSize');c.select(function(iv){return iv.fontSize==v;});}}if(s.theme_advanced_path&&s.theme_advanced_statusbar_location){p=DOM.get(ed.id+'_path')||DOM.add(ed.id+'_path_row','span',{id:ed.id+'_path'});DOM.setHTML(p,'');ed.dom.getParent(n,function(n){var na=n.nodeName.toLowerCase(),u,pi,ti='';if(n.nodeType!=1||n.nodeName==='BR'||(DOM.hasClass(n,'mceItemHidden')||DOM.hasClass(n,'mceItemRemoved')))return;if(v=DOM.getAttrib(n,'mce_name'))na=v;if(tinymce.isIE&&n.scopeName!=='HTML')na=n.scopeName+':'+na;na=na.replace(/mce\:/g,'');switch(na){case'b':na='strong';break;case'i':na='em';break;case'img':if(v=DOM.getAttrib(n,'src'))ti+='src: '+v+' ';break;case'a':if(v=DOM.getAttrib(n,'name')){ti+='name: '+v+' ';na+='#'+v;}if(v=DOM.getAttrib(n,'href'))ti+='href: '+v+' ';break;case'font':if(s.convert_fonts_to_spans)na='span';if(v=DOM.getAttrib(n,'face'))ti+='font: '+v+' ';if(v=DOM.getAttrib(n,'size'))ti+='size: '+v+' ';if(v=DOM.getAttrib(n,'color'))ti+='color: '+v+' ';break;case'span':if(v=DOM.getAttrib(n,'style'))ti+='style: '+v+' ';break;}if(v=DOM.getAttrib(n,'id'))ti+='id: '+v+' ';if(v=n.className){v=v.replace(/(webkit-[\w\-]+|Apple-[\w\-]+|mceItem\w+|mceVisualAid)/g,'');if(v&&v.indexOf('mceItem')==-1){ti+='class: '+v+' ';if(DOM.isBlock(n)||na=='img'||na=='span')na+='.'+v;}}na=na.replace(/(html:)/g,'');na={name:na,node:n,title:ti};t.onResolveName.dispatch(t,na);ti=na.title;na=na.name;pi=DOM.create('a',{'href':"javascript:;",onmousedown:"return false;",title:ti,'class':'mcePath_'+(de++)},na);if(p.hasChildNodes()){p.insertBefore(DOM.doc.createTextNode(' \u00bb '),p.firstChild);p.insertBefore(pi,p.firstChild);}else p.appendChild(pi);},ed.getBody());}},_sel:function(v){this.editor.execCommand('mceSelectNodeDepth',false,v);},_mceInsertAnchor:function(ui,v){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/anchor.htm',width:320+parseInt(ed.getLang('advanced.anchor_delta_width',0)),height:90+parseInt(ed.getLang('advanced.anchor_delta_height',0)),inline:true},{theme_url:this.url});},_mceCharMap:function(){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/charmap.htm',width:550+parseInt(ed.getLang('advanced.charmap_delta_width',0)),height:250+parseInt(ed.getLang('advanced.charmap_delta_height',0)),inline:true},{theme_url:this.url});},_mceHelp:function(){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/about.htm',width:480,height:380,inline:true},{theme_url:this.url});},_mceColorPicker:function(u,v){var ed=this.editor;v=v||{};ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/color_picker.htm',width:375+parseInt(ed.getLang('advanced.colorpicker_delta_width',0)),height:250+parseInt(ed.getLang('advanced.colorpicker_delta_height',0)),close_previous:false,inline:true},{input_color:v.color,func:v.func,theme_url:this.url});},_mceCodeEditor:function(ui,val){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/source_editor.htm',width:parseInt(ed.getParam("theme_advanced_source_editor_width",720)),height:parseInt(ed.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url});},_mceImage:function(ui,val){var ed=this.editor;if(ed.dom.getAttrib(ed.selection.getNode(),'class').indexOf('mceItem')!=-1)return;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/image.htm',width:355+parseInt(ed.getLang('advanced.image_delta_width',0)),height:275+parseInt(ed.getLang('advanced.image_delta_height',0)),inline:true},{theme_url:this.url});},_mceLink:function(ui,val){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/link.htm',width:310+parseInt(ed.getLang('advanced.link_delta_width',0)),height:200+parseInt(ed.getLang('advanced.link_delta_height',0)),inline:true},{theme_url:this.url});},_mceNewDocument:function(){var ed=this.editor;ed.windowManager.confirm('advanced.newdocument',function(s){if(s)ed.execCommand('mceSetContent',false,'');});},_mceForeColor:function(){var t=this;this._mceColorPicker(0,{color:t.fgColor,func:function(co){t.fgColor=co;t.editor.execCommand('ForeColor',false,co);}});},_mceBackColor:function(){var t=this;this._mceColorPicker(0,{color:t.bgColor,func:function(co){t.bgColor=co;t.editor.execCommand('HiliteColor',false,co);}});},_ufirst:function(s){return s.substring(0,1).toUpperCase()+s.substring(1);}});tinymce.ThemeManager.add('advanced',tinymce.themes.AdvancedTheme);}()); \ No newline at end of file +(function(e){var d=e.DOM,b=e.dom.Event,h=e.extend,f=e.each,a=e.util.Cookie,g,c=e.explode;e.ThemeManager.requireLangPack("advanced");e.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(j,k){var l=this,m,i,n;l.editor=j;l.url=k;l.onResolveName=new e.util.Dispatcher(this);j.forcedHighContrastMode=j.settings.detect_highcontrast&&l._isHighContrast();j.settings.skin=j.forcedHighContrastMode?"highcontrast":j.settings.skin;l.settings=m=h({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",theme_advanced_show_current_color:0,readonly:j.settings.readonly},j.settings);if(!m.font_size_style_values){m.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(e.is(m.theme_advanced_font_sizes,"string")){m.font_size_style_values=e.explode(m.font_size_style_values);m.font_size_classes=e.explode(m.font_size_classes||"");n={};j.settings.theme_advanced_font_sizes=m.theme_advanced_font_sizes;f(j.getParam("theme_advanced_font_sizes","","hash"),function(q,p){var o;if(p==q&&q>=1&&q<=7){p=q+" ("+l.sizes[q-1]+"pt)";o=m.font_size_classes[q-1];q=m.font_size_style_values[q-1]||(l.sizes[q-1]+"pt")}if(/^\s*\./.test(q)){o=q.replace(/\./g,"")}n[p]=o?{"class":o}:{fontSize:q}});m.theme_advanced_font_sizes=n}if((i=m.theme_advanced_path_location)&&i!="none"){m.theme_advanced_statusbar_location=m.theme_advanced_path_location}if(m.theme_advanced_statusbar_location=="none"){m.theme_advanced_statusbar_location=0}if(j.settings.content_css!==false){j.contentCSS.push(j.baseURI.toAbsolute(k+"/skins/"+j.settings.skin+"/content.css"))}j.onInit.add(function(){if(!j.settings.readonly){j.onNodeChange.add(l._nodeChanged,l);j.onKeyUp.add(l._updateUndoStatus,l);j.onMouseUp.add(l._updateUndoStatus,l);j.dom.bind(j.dom.getRoot(),"dragend",function(){l._updateUndoStatus(j)})}});j.onSetProgressState.add(function(q,o,r){var s,t=q.id,p;if(o){l.progressTimer=setTimeout(function(){s=q.getContainer();s=s.insertBefore(d.create("DIV",{style:"position:relative"}),s.firstChild);p=d.get(q.id+"_tbl");d.add(s,"div",{id:t+"_blocker","class":"mceBlocker",style:{width:p.clientWidth+2,height:p.clientHeight+2}});d.add(s,"div",{id:t+"_progress","class":"mceProgress",style:{left:p.clientWidth/2,top:p.clientHeight/2}})},r||0)}else{d.remove(t+"_blocker");d.remove(t+"_progress");clearTimeout(l.progressTimer)}});d.loadCSS(m.editor_css?j.documentBaseURI.toAbsolute(m.editor_css):k+"/skins/"+j.settings.skin+"/ui.css");if(m.skin_variant){d.loadCSS(k+"/skins/"+j.settings.skin+"/ui_"+m.skin_variant+".css")}},_isHighContrast:function(){var i,j=d.add(d.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});i=(d.getStyle(j,"background-color",true)+"").toLowerCase().replace(/ /g,"");d.remove(j);return i!="rgb(171,239,86)"&&i!="#abef56"},createControl:function(l,i){var j,k;if(k=i.createControl(l)){return k}switch(l){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((j=this.controls[l])){return i.createButton(l,{title:"advanced."+j[0],cmd:j[1],ui:j[2],value:j[3]})}},execCommand:function(k,j,l){var i=this["_"+k];if(i){i.call(this,j,l);return true}return false},_importClasses:function(k){var i=this.editor,j=i.controlManager.get("styleselect");if(j.getLength()==0){f(i.dom.getClasses(),function(n,l){var m="style_"+l;i.formatter.register(m,{inline:"span",attributes:{"class":n["class"]},selector:"*"});j.add(n["class"],m)})}},_createStyleSelect:function(m){var k=this,i=k.editor,j=i.controlManager,l;l=j.createListBox("styleselect",{title:"advanced.style_select",onselect:function(o){var p,n=[];f(l.items,function(q){n.push(q.value)});i.focus();i.undoManager.add();p=i.formatter.matchAll(n);if(!o||p[0]==o){if(p[0]){i.formatter.remove(p[0])}}else{i.formatter.apply(o)}i.undoManager.add();i.nodeChanged();return false}});i.onInit.add(function(){var o=0,n=i.getParam("style_formats");if(n){f(n,function(p){var q,r=0;f(p,function(){r++});if(r>1){q=p.name=p.name||"style_"+(o++);i.formatter.register(q,p);l.add(p.title,q)}else{l.add(p.title)}})}else{f(i.getParam("theme_advanced_styles","","hash"),function(r,q){var p;if(r){p="style_"+(o++);i.formatter.register(p,{inline:"span",classes:r,selector:"*"});l.add(k.editor.translate(q),p)}})}});if(l.getLength()==0){l.onPostRender.add(function(o,p){if(!l.NativeListBox){b.add(p.id+"_text","focus",k._importClasses,k);b.add(p.id+"_text","mousedown",k._importClasses,k);b.add(p.id+"_open","focus",k._importClasses,k);b.add(p.id+"_open","mousedown",k._importClasses,k)}else{b.add(p.id,"focus",k._importClasses,k)}})}return l},_createFontSelect:function(){var k,j=this,i=j.editor;k=i.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(l){var m=k.items[k.selectedIndex];if(!l&&m){i.execCommand("FontName",false,m.value);return}i.execCommand("FontName",false,l);k.select(function(n){return l==n});if(m&&m.value==l){k.select(null)}return false}});if(k){f(i.getParam("theme_advanced_fonts",j.settings.theme_advanced_fonts,"hash"),function(m,l){k.add(i.translate(l),m,{style:m.indexOf("dings")==-1?"font-family:"+m:""})})}return k},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(i){var o=n.items[n.selectedIndex];if(!i&&o){o=o.value;if(o["class"]){k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}return}if(i["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:i["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,i.fontSize)}n.select(function(p){return i==p});if(o&&(o.value.fontSize==i.fontSize||o.value["class"]==i["class"])){n.select(null)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(o,i){var p=o.fontSize;if(p>=1&&p<=7){p=m.sizes[parseInt(p)-1]+"pt"}n.add(i,o,{style:"font-size:"+p,"class":"mceFontSize"+(l++)+(" "+(o["class"]||""))})})}return n},_createBlockFormats:function(){var k,i={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},j=this;k=j.editor.controlManager.createListBox("formatselect",{title:"advanced.block",onselect:function(l){j.editor.execCommand("FormatBlock",false,l);return false}});if(k){f(j.editor.getParam("theme_advanced_blockformats",j.settings.theme_advanced_blockformats,"hash"),function(m,l){k.add(j.editor.translate(l!=m?l:i[m]),m,{"class":"mce_formatPreview mce_"+m})})}return k},_createForeColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_text_colors){l.colors=i}if(k.theme_advanced_default_foreground_color){l.default_color=k.theme_advanced_default_foreground_color}l.title="advanced.forecolor_desc";l.cmd="ForeColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("forecolor",l);return m},_createBackColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_background_colors){l.colors=i}if(k.theme_advanced_default_background_color){l.default_color=k.theme_advanced_default_background_color}l.title="advanced.backcolor_desc";l.cmd="HiliteColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("backcolor",l);return m},renderUI:function(k){var m,l,q,v=this,r=v.editor,w=v.settings,u,j,i;if(r.settings){r.settings.aria_label=w.aria_label+r.getLang("advanced.help_shortcut")}m=j=d.create("span",{role:"application","aria-labelledby":r.id+"_voice",id:r.id+"_parent","class":"mceEditor "+r.settings.skin+"Skin"+(w.skin_variant?" "+r.settings.skin+"Skin"+v._ufirst(w.skin_variant):"")});d.add(m,"span",{"class":"mceVoiceLabel",style:"display:none;",id:r.id+"_voice"},w.aria_label);if(!d.boxModel){m=d.add(m,"div",{"class":"mceOldBoxModel"})}m=u=d.add(m,"table",{role:"presentation",id:r.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});m=q=d.add(m,"tbody");switch((w.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":l=v._rowLayout(w,q,k);break;case"customlayout":l=r.execCallback("theme_advanced_custom_layout",w,q,k,j);break;default:l=v._simpleLayout(w,q,k,j)}m=k.targetNode;i=u.rows;d.addClass(i[0],"mceFirst");d.addClass(i[i.length-1],"mceLast");f(d.select("tr",q),function(o){d.addClass(o.firstChild,"mceFirst");d.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(d.get(w.theme_advanced_toolbar_container)){d.get(w.theme_advanced_toolbar_container).appendChild(j)}else{d.insertAfter(j,m)}b.add(r.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return b.cancel(n)}});if(!r.getParam("accessibility_focus")){b.add(d.add(j,"a",{href:"#"},""),"focus",function(){tinyMCE.get(r.id).focus()})}if(w.theme_advanced_toolbar_location=="external"){k.deltaHeight=0}v.deltaHeight=k.deltaHeight;k.targetNode=null;r.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){v.toolbarGroup.focus();return b.cancel(n)}else{if(n.keyCode===o){d.get(p.id+"_path_row").focus();return b.cancel(n)}}}});r.addShortcut("alt+0","","mceShortcuts",v);return{iframeContainer:l,editorContainer:r.id+"_parent",sizeContainer:u,deltaHeight:k.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:e.majorVersion+"."+e.minorVersion}},resizeBy:function(i,j){var k=d.get(this.editor.id+"_ifr");this.resizeTo(k.clientWidth+i,k.clientHeight+j)},resizeTo:function(i,m,k){var j=this.editor,l=this.settings,n=d.get(j.id+"_tbl"),o=d.get(j.id+"_ifr");i=Math.max(l.theme_advanced_resizing_min_width||100,i);m=Math.max(l.theme_advanced_resizing_min_height||100,m);i=Math.min(l.theme_advanced_resizing_max_width||65535,i);m=Math.min(l.theme_advanced_resizing_max_height||65535,m);d.setStyle(n,"height","");d.setStyle(o,"height",m);if(l.theme_advanced_resize_horizontal){d.setStyle(n,"width","");d.setStyle(o,"width",i);if(i"));d.setHTML(l,q.join(""))},_addStatusBar:function(m,j){var k,v=this,p=v.editor,w=v.settings,i,q,u,l;k=d.add(m,"tr");k=l=d.add(k,"td",{"class":"mceStatusbar"});k=d.add(k,"div",{id:p.id+"_path_row",role:"group","aria-labelledby":p.id+"_path_voice"});if(w.theme_advanced_path){d.add(k,"span",{id:p.id+"_path_voice"},p.translate("advanced.path"));d.add(k,"span",{},": ")}else{d.add(k,"span",{}," ")}if(w.theme_advanced_resizing){d.add(l,"a",{id:p.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize"});if(w.theme_advanced_resizing_use_cookie){p.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+p.id+"_size"),r=d.get(p.id+"_tbl");if(!n){return}v.resizeTo(n.cw,n.ch)})}p.onPostRender.add(function(){b.add(p.id+"_resize","click",function(n){n.preventDefault()});b.add(p.id+"_resize","mousedown",function(D){var t,r,s,o,C,z,A,F,n,E,x;function y(G){G.preventDefault();n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E)}function B(G){b.remove(d.doc,"mousemove",t);b.remove(p.getDoc(),"mousemove",r);b.remove(d.doc,"mouseup",s);b.remove(p.getDoc(),"mouseup",o);n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E,true)}D.preventDefault();C=D.screenX;z=D.screenY;x=d.get(v.editor.id+"_ifr");A=n=x.clientWidth;F=E=x.clientHeight;t=b.add(d.doc,"mousemove",y);r=b.add(p.getDoc(),"mousemove",y);s=b.add(d.doc,"mouseup",B);o=b.add(p.getDoc(),"mouseup",B)})})}j.deltaHeight-=21;k=m=null},_updateUndoStatus:function(j){var i=j.controlManager;i.setDisabled("undo",!j.undoManager.hasUndo()&&!j.typing);i.setDisabled("redo",!j.undoManager.hasRedo())},_nodeChanged:function(m,r,D,q,E){var y=this,C,F=0,x,G,z=y.settings,w,k,u,B,l,j,i;e.each(y.stateControls,function(n){r.setActive(n,m.queryCommandState(y.controls[n][1]))});function o(p){var s,n=E.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s0){y.statusKeyboardNavigation=new e.ui.KeyboardNavigation({root:m.id+"_path_row",items:d.select("a",C),excludeFromTabOrder:true,onCancel:function(){m.focus()}},d)}}},_sel:function(i){this.editor.execCommand("mceSelectNodeDepth",false,i)},_mceInsertAnchor:function(k,j){var i=this.editor;i.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(i.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(i.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var i=this.editor;i.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(i.getLang("advanced.charmap_delta_width",0)),height:250+parseInt(i.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var i=this.editor;i.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var i=this.editor;i.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(k,j){var i=this.editor;j=j||{};i.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(i.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(i.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:j.color,func:j.func,theme_url:this.url})},_mceCodeEditor:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(i.getParam("theme_advanced_source_editor_width",720)),height:parseInt(i.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(j,k){var i=this.editor;if(i.dom.getAttrib(i.selection.getNode(),"class").indexOf("mceItem")!=-1){return}i.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(i.getLang("advanced.image_delta_width",0)),height:275+parseInt(i.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(i.getLang("advanced.link_delta_width",0)),height:200+parseInt(i.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var i=this.editor;i.windowManager.confirm("advanced.newdocument",function(j){if(j){i.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var i=this;this._mceColorPicker(0,{color:i.fgColor,func:function(j){i.fgColor=j;i.editor.execCommand("ForeColor",false,j)}})},_mceBackColor:function(){var i=this;this._mceColorPicker(0,{color:i.bgColor,func:function(j){i.bgColor=j;i.editor.execCommand("HiliteColor",false,j)}})},_ufirst:function(i){return i.substring(0,1).toUpperCase()+i.substring(1)}});e.ThemeManager.add("advanced",e.themes.AdvancedTheme)}(tinymce)); \ No newline at end of file diff --git a/include/javascript/tiny_mce/themes/advanced/editor_template_src.js b/include/javascript/tiny_mce/themes/advanced/editor_template_src.js index 304cabb2..0564baf9 100644 --- a/include/javascript/tiny_mce/themes/advanced/editor_template_src.js +++ b/include/javascript/tiny_mce/themes/advanced/editor_template_src.js @@ -1,11 +1,14 @@ /** - + * editor_template_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ -(function() { +(function(tinymce) { var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode; // Tell it to load theme specific language pack(s) @@ -63,6 +66,9 @@ t.url = url; t.onResolveName = new tinymce.util.Dispatcher(this); + ed.forcedHighContrastMode = ed.settings.detect_highcontrast && t._isHighContrast(); + ed.settings.skin = ed.forcedHighContrastMode ? 'highcontrast' : ed.settings.skin; + // Default settings t.settings = s = extend({ theme_advanced_path : true, @@ -78,6 +84,8 @@ theme_advanced_resize_horizontal : 1, theme_advanced_resizing_use_cookie : 1, theme_advanced_font_sizes : "1,2,3,4,5,6,7", + theme_advanced_font_selector : "span", + theme_advanced_show_current_color: 0, readonly : ed.settings.readonly }, ed.settings); @@ -97,14 +105,11 @@ if (k == v && v >= 1 && v <= 7) { k = v + ' (' + t.sizes[v - 1] + 'pt)'; - - if (ed.settings.convert_fonts_to_spans) { - cl = s.font_size_classes[v - 1]; - v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt'); - } + cl = s.font_size_classes[v - 1]; + v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt'); } - if (/\s*\./.test(v)) + if (/^\s*\./.test(v)) cl = v.replace(/\./g, ''); o[k] = cl ? {'class' : cl} : {fontSize : v}; @@ -119,12 +124,19 @@ if (s.theme_advanced_statusbar_location == 'none') s.theme_advanced_statusbar_location = 0; + if (ed.settings.content_css !== false) + ed.contentCSS.push(ed.baseURI.toAbsolute(url + "/skins/" + ed.settings.skin + "/content.css")); + // Init editor ed.onInit.add(function() { - ed.onNodeChange.add(t._nodeChanged, t); - - if (ed.settings.content_css !== false) - ed.dom.loadCSS(ed.baseURI.toAbsolute("themes/advanced/skins/" + ed.settings.skin + "/content.css")); + if (!ed.settings.readonly) { + ed.onNodeChange.add(t._nodeChanged, t); + ed.onKeyUp.add(t._updateUndoStatus, t); + ed.onMouseUp.add(t._updateUndoStatus, t); + ed.dom.bind(ed.dom.getRoot(), 'dragend', function() { + t._updateUndoStatus(ed); + }); + } }); ed.onSetProgressState.add(function(ed, b, ti) { @@ -152,6 +164,15 @@ DOM.loadCSS(url + "/skins/" + ed.settings.skin + "/ui_" + s.skin_variant + ".css"); }, + _isHighContrast : function() { + var actualColor, div = DOM.add(DOM.getRoot(), 'div', {'style': 'background-color: rgb(171,239,86);'}); + + actualColor = (DOM.getStyle(div, 'background-color', true) + '').toLowerCase().replace(/ /g, ''); + DOM.remove(div); + + return actualColor != 'rgb(171,239,86)' && actualColor != '#abef56'; + }, + createControl : function(n, cf) { var cd, c; @@ -194,36 +215,94 @@ }, _importClasses : function(e) { - var ed = this.editor, c = ed.controlManager.get('styleselect'); + var ed = this.editor, ctrl = ed.controlManager.get('styleselect'); + + if (ctrl.getLength() == 0) { + each(ed.dom.getClasses(), function(o, idx) { + var name = 'style_' + idx; + + ed.formatter.register(name, { + inline : 'span', + attributes : {'class' : o['class']}, + selector : '*' + }); - if (c.getLength() == 0) { - each(ed.dom.getClasses(), function(o) { - c.add(o['class'], o['class']); + ctrl.add(o['class'], name); }); } }, _createStyleSelect : function(n) { - var t = this, ed = t.editor, cf = ed.controlManager, c = cf.createListBox('styleselect', { + var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl; + + // Setup style select box + ctrl = ctrlMan.createListBox('styleselect', { title : 'advanced.style_select', - onselect : function(v) { - if (c.selectedValue === v) { - ed.execCommand('mceSetStyleInfo', 0, {command : 'removeformat'}); - c.select(); - return false; + onselect : function(name) { + var matches, formatNames = []; + + each(ctrl.items, function(item) { + formatNames.push(item.value); + }); + + ed.focus(); + ed.undoManager.add(); + + // Toggle off the current format + matches = ed.formatter.matchAll(formatNames); + if (!name || matches[0] == name) { + if (matches[0]) + ed.formatter.remove(matches[0]); } else - ed.execCommand('mceSetCSSClass', 0, v); + ed.formatter.apply(name); + + ed.undoManager.add(); + ed.nodeChanged(); + + return false; // No auto select } }); - if (c) { - each(ed.getParam('theme_advanced_styles', '', 'hash'), function(v, k) { - if (v) - c.add(t.editor.translate(k), v); - }); + // Handle specified format + ed.onInit.add(function() { + var counter = 0, formats = ed.getParam('style_formats'); + + if (formats) { + each(formats, function(fmt) { + var name, keys = 0; + + each(fmt, function() {keys++;}); + + if (keys > 1) { + name = fmt.name = fmt.name || 'style_' + (counter++); + ed.formatter.register(name, fmt); + ctrl.add(fmt.title, name); + } else + ctrl.add(fmt.title); + }); + } else { + each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) { + var name; - c.onPostRender.add(function(ed, n) { - if (!c.NativeListBox) { + if (val) { + name = 'style_' + (counter++); + + ed.formatter.register(name, { + inline : 'span', + classes : val, + selector : '*' + }); + + ctrl.add(t.editor.translate(key), name); + } + }); + } + }); + + // Auto import classes if the ctrl box is empty + if (ctrl.getLength() == 0) { + ctrl.onPostRender.add(function(ed, n) { + if (!ctrl.NativeListBox) { Event.add(n.id + '_text', 'focus', t._importClasses, t); Event.add(n.id + '_text', 'mousedown', t._importClasses, t); Event.add(n.id + '_open', 'focus', t._importClasses, t); @@ -233,13 +312,37 @@ }); } - return c; + return ctrl; }, _createFontSelect : function() { var c, t = this, ed = t.editor; - c = ed.controlManager.createListBox('fontselect', {title : 'advanced.fontdefault', cmd : 'FontName'}); + c = ed.controlManager.createListBox('fontselect', { + title : 'advanced.fontdefault', + onselect : function(v) { + var cur = c.items[c.selectedIndex]; + + if (!v && cur) { + ed.execCommand('FontName', false, cur.value); + return; + } + + ed.execCommand('FontName', false, v); + + // Fake selection, execCommand will fire a nodeChange and update the selection + c.select(function(sv) { + return v == sv; + }); + + if (cur && cur.value == v) { + c.select(null); + } + + return false; // No auto select + } + }); + if (c) { each(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) { c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''}); @@ -253,16 +356,41 @@ var t = this, ed = t.editor, c, i = 0, cl = []; c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) { - if (v.fontSize) + var cur = c.items[c.selectedIndex]; + + if (!v && cur) { + cur = cur.value; + + if (cur['class']) { + ed.formatter.toggle('fontsize_class', {value : cur['class']}); + ed.undoManager.add(); + ed.nodeChanged(); + } else { + ed.execCommand('FontSize', false, cur.fontSize); + } + + return; + } + + if (v['class']) { + ed.focus(); + ed.undoManager.add(); + ed.formatter.toggle('fontsize_class', {value : v['class']}); + ed.undoManager.add(); + ed.nodeChanged(); + } else ed.execCommand('FontSize', false, v.fontSize); - else { - each(t.settings.theme_advanced_font_sizes, function(v, k) { - if (v['class']) - cl.push(v['class']); - }); - ed.editorCommands._applyInlineStyle('span', {'class' : v['class']}, {check_classes : cl}); + // Fake selection, execCommand will fire a nodeChange and update the selection + c.select(function(sv) { + return v == sv; + }); + + if (cur && (cur.value.fontSize == v.fontSize || cur.value['class'] == v['class'])) { + c.select(null); } + + return false; // No auto select }}); if (c) { @@ -298,7 +426,11 @@ samp : 'advanced.samp' }, t = this; - c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', cmd : 'FormatBlock'}); + c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', onselect : function(v) { + t.editor.execCommand('FormatBlock', false, v); + return false; + }}); + if (c) { each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) { c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v}); @@ -369,12 +501,19 @@ renderUI : function(o) { var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl; - n = p = DOM.create('span', {id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '')}); + if (ed.settings) { + ed.settings.aria_label = s.aria_label + ed.getLang('advanced.help_shortcut'); + } + + // TODO: ACC Should have an aria-describedby attribute which is user-configurable to describe what this field is actually for. + // Maybe actually inherit it from the original textara? + n = p = DOM.create('span', {role : 'application', 'aria-labelledby' : ed.id + '_voice', id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '')}); + DOM.add(n, 'span', {'class': 'mceVoiceLabel', 'style': 'display:none;', id: ed.id + '_voice'}, s.aria_label); if (!DOM.boxModel) n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'}); - n = sc = DOM.add(n, 'table', {id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0}); + n = sc = DOM.add(n, 'table', {role : "presentation", id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0}); n = tb = DOM.add(n, 'tbody'); switch ((s.theme_advanced_layout_manager || '').toLowerCase()) { @@ -393,7 +532,7 @@ n = o.targetNode; // Add classes to first and last TRs - nl = DOM.stdMode ? sc.getElementsByTagName('tr') : sc.rows; // Quick fix for IE 8 + nl = sc.rows; DOM.addClass(nl[0], 'mceFirst'); DOM.addClass(nl[nl.length - 1], 'mceLast'); @@ -440,7 +579,7 @@ } */ - if (!ed.getParam('accessibility_focus') || ed.getParam('tab_focus')) + if (!ed.getParam('accessibility_focus')) Event.add(DOM.add(p, 'a', {href : '#'}, ''), 'focus', function() {tinyMCE.get(ed.id).focus();}); if (s.theme_advanced_toolbar_location == 'external') @@ -449,6 +588,23 @@ t.deltaHeight = o.deltaHeight; o.targetNode = null; + ed.onKeyDown.add(function(ed, evt) { + var DOM_VK_F10 = 121, DOM_VK_F11 = 122; + + if (evt.altKey) { + if (evt.keyCode === DOM_VK_F10) { + t.toolbarGroup.focus(); + return Event.cancel(evt); + } else if (evt.keyCode === DOM_VK_F11) { + DOM.get(ed.id + '_path_row').focus(); + return Event.cancel(evt); + } + } + }); + + // alt+0 is the UK recommended shortcut for accessing the list of access controls. + ed.addShortcut('alt+0', '', 'mceShortcuts', t); + return { iframeContainer : ic, editorContainer : ed.id + '_parent', @@ -467,13 +623,13 @@ }, resizeBy : function(dw, dh) { - var e = DOM.get(this.editor.id + '_tbl'); + var e = DOM.get(this.editor.id + '_ifr'); this.resizeTo(e.clientWidth + dw, e.clientHeight + dh); }, - resizeTo : function(w, h) { - var ed = this.editor, s = ed.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr'), dh; + resizeTo : function(w, h, store) { + var ed = this.editor, s = this.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr'); // Boundery fix box w = Math.max(s.theme_advanced_resizing_min_width || 100, w); @@ -481,12 +637,28 @@ w = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w); h = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h); - // Calc difference between iframe and container - dh = e.clientHeight - ifr.clientHeight; - // Resize iframe and container - DOM.setStyle(ifr, 'height', h - dh); - DOM.setStyles(e, {width : w, height : h}); + DOM.setStyle(e, 'height', ''); + DOM.setStyle(ifr, 'height', h); + + if (s.theme_advanced_resize_horizontal) { + DOM.setStyle(e, 'width', ''); + DOM.setStyle(ifr, 'width', w); + + // Make sure that the size is never smaller than the over all ui + if (w < e.clientWidth) { + w = e.clientWidth; + DOM.setStyle(ifr, 'width', e.clientWidth); + } + } + + // Store away the size + if (store && s.theme_advanced_resizing_use_cookie) { + Cookie.setHash("TinyMCE_" + ed.id + "_size", { + cw : w, + ch : h + }); + } }, destroy : function() { @@ -580,7 +752,7 @@ each(explode(s.theme_advanced_containers || ''), function(c, i) { var v = s['theme_advanced_container_' + c] || ''; - switch (v.toLowerCase()) { + switch (c.toLowerCase()) { case 'mceeditor': n = DOM.add(tb, 'tr'); n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); @@ -648,17 +820,19 @@ }, _addToolbars : function(c, o) { - var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a; + var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a, toolbarGroup; - a = s.theme_advanced_toolbar_align.toLowerCase(); - a = 'mce' + t._ufirst(a); + toolbarGroup = cf.createToolbarGroup('toolbargroup', { + 'name': ed.getLang('advanced.toolbar'), + 'tab_focus_toolbar':ed.getParam('theme_advanced_tab_focus_toolbar') + }); - n = DOM.add(DOM.add(c, 'tr'), 'td', {'class' : 'mceToolbar ' + a}); + t.toolbarGroup = toolbarGroup; - if (!ed.getParam('accessibility_focus') || ed.getParam('tab_focus')) - h.push(DOM.createHTML('a', {href : '#', onfocus : 'tinyMCE.get(\'' + ed.id + '\').focus();'}, '')); + a = s.theme_advanced_toolbar_align.toLowerCase(); + a = 'mce' + t._ufirst(a); - h.push(DOM.createHTML('a', {href : '#', accesskey : 'q', title : ed.getLang("advanced.toolbar_focus"), tabindex : "-1"}, '')); + n = DOM.add(DOM.add(c, 'tr', {role: 'presentation'}), 'td', {'class' : 'mceToolbar ' + a, "role":"presentation"}); // Create toolbar and add the controls for (i=1; (v = s['theme_advanced_buttons' + i]); i++) { @@ -671,14 +845,12 @@ v = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v; t._addControls(v, tb); - - //n.appendChild(n = tb.render()); - h.push(tb.renderHTML()); + toolbarGroup.add(tb); o.deltaHeight -= s.theme_advanced_row_height; } - - h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();', tabindex : "-1"}, '')); + h.push(toolbarGroup.renderHTML()); + h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '')); DOM.setHTML(n, h.join('')); }, @@ -686,11 +858,17 @@ var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td; n = DOM.add(tb, 'tr'); - n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'}); - n = DOM.add(n, 'div', {id : ed.id + '_path_row'}, s.theme_advanced_path ? ed.translate('advanced.path') + ': ' : ' '); - DOM.add(n, 'a', {href : '#', accesskey : 'x'}); + n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'}); + n = DOM.add(n, 'div', {id : ed.id + '_path_row', 'role': 'group', 'aria-labelledby': ed.id + '_path_voice'}); + if (s.theme_advanced_path) { + DOM.add(n, 'span', {id: ed.id + '_path_voice'}, ed.translate('advanced.path')); + DOM.add(n, 'span', {}, ': '); + } else { + DOM.add(n, 'span', {}, ' '); + } + - if (s.theme_advanced_resizing && !tinymce.isOldWebKit) { + if (s.theme_advanced_resizing) { DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize'}); if (s.theme_advanced_resizing_use_cookie) { @@ -700,99 +878,55 @@ if (!o) return; - if (s.theme_advanced_resize_horizontal) - c.style.width = Math.max(10, o.cw) + 'px'; - - c.style.height = Math.max(10, o.ch) + 'px'; - DOM.get(ed.id + '_ifr').style.height = Math.max(10, parseInt(o.ch) + t.deltaHeight) + 'px'; + t.resizeTo(o.cw, o.ch); }); } ed.onPostRender.add(function() { - Event.add(ed.id + '_resize', 'mousedown', function(e) { - var c, p, w, h, n, pa; - - // Measure container - c = DOM.get(ed.id + '_tbl'); - w = c.clientWidth; - h = c.clientHeight; - - miw = s.theme_advanced_resizing_min_width || 100; - mih = s.theme_advanced_resizing_min_height || 100; - maw = s.theme_advanced_resizing_max_width || 0xFFFF; - mah = s.theme_advanced_resizing_max_height || 0xFFFF; - - // Setup placeholder - p = DOM.add(DOM.get(ed.id + '_parent'), 'div', {'class' : 'mcePlaceHolder'}); - DOM.setStyles(p, {width : w, height : h}); - - // Replace with placeholder - DOM.hide(c); - DOM.show(p); - - // Create internal resize obj - r = { - x : e.screenX, - y : e.screenY, - w : w, - h : h, - dx : null, - dy : null - }; - - // Start listening - mf = Event.add(DOM.doc, 'mousemove', function(e) { - var w, h; - - // Calc delta values - r.dx = e.screenX - r.x; - r.dy = e.screenY - r.y; - - // Boundery fix box - w = Math.max(miw, r.w + r.dx); - h = Math.max(mih, r.h + r.dy); - w = Math.min(maw, w); - h = Math.min(mah, h); + Event.add(ed.id + '_resize', 'click', function(e) { + e.preventDefault(); + }); - // Resize placeholder - if (s.theme_advanced_resize_horizontal) - p.style.width = w + 'px'; + Event.add(ed.id + '_resize', 'mousedown', function(e) { + var mouseMoveHandler1, mouseMoveHandler2, + mouseUpHandler1, mouseUpHandler2, + startX, startY, startWidth, startHeight, width, height, ifrElm; - p.style.height = h + 'px'; + function resizeOnMove(e) { + e.preventDefault(); - return Event.cancel(e); - }); + width = startWidth + (e.screenX - startX); + height = startHeight + (e.screenY - startY); - me = Event.add(DOM.doc, 'mouseup', function(e) { - var ifr; + t.resizeTo(width, height); + }; + function endResize(e) { // Stop listening - Event.remove(DOM.doc, 'mousemove', mf); - Event.remove(DOM.doc, 'mouseup', me); - - c.style.display = ''; - DOM.remove(p); - - if (r.dx === null) - return; - - ifr = DOM.get(ed.id + '_ifr'); - - if (s.theme_advanced_resize_horizontal) - c.style.width = Math.max(10, r.w + r.dx) + 'px'; + Event.remove(DOM.doc, 'mousemove', mouseMoveHandler1); + Event.remove(ed.getDoc(), 'mousemove', mouseMoveHandler2); + Event.remove(DOM.doc, 'mouseup', mouseUpHandler1); + Event.remove(ed.getDoc(), 'mouseup', mouseUpHandler2); + + width = startWidth + (e.screenX - startX); + height = startHeight + (e.screenY - startY); + t.resizeTo(width, height, true); + }; - c.style.height = Math.max(10, r.h + r.dy) + 'px'; - ifr.style.height = Math.max(10, ifr.clientHeight + r.dy) + 'px'; + e.preventDefault(); - if (s.theme_advanced_resizing_use_cookie) { - Cookie.setHash("TinyMCE_" + ed.id + "_size", { - cw : r.w + r.dx, - ch : r.h + r.dy - }); - } - }); + // Get the current rect size + startX = e.screenX; + startY = e.screenY; + ifrElm = DOM.get(t.editor.id + '_ifr'); + startWidth = width = ifrElm.clientWidth; + startHeight = height = ifrElm.clientHeight; - return Event.cancel(e); + // Register envent handlers + mouseMoveHandler1 = Event.add(DOM.doc, 'mousemove', resizeOnMove); + mouseMoveHandler2 = Event.add(ed.getDoc(), 'mousemove', resizeOnMove); + mouseUpHandler1 = Event.add(DOM.doc, 'mouseup', endResize); + mouseUpHandler2 = Event.add(ed.getDoc(), 'mouseup', endResize); }); }); } @@ -801,22 +935,40 @@ n = tb = null; }, - _nodeChanged : function(ed, cm, n, co) { - var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn; + _updateUndoStatus : function(ed) { + var cm = ed.controlManager; - if (s.readonly) - return; + cm.setDisabled('undo', !ed.undoManager.hasUndo() && !ed.typing); + cm.setDisabled('redo', !ed.undoManager.hasRedo()); + }, + + _nodeChanged : function(ed, cm, n, co, ob) { + var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, fc, bc, formatNames, matches; tinymce.each(t.stateControls, function(c) { cm.setActive(c, ed.queryCommandState(t.controls[c][1])); }); + function getParent(name) { + var i, parents = ob.parents, func = name; + + if (typeof(name) == 'string') { + func = function(node) { + return node.nodeName == name; + }; + } + + for (i = 0; i < parents.length; i++) { + if (func(parents[i])) + return parents[i]; + } + }; + cm.setActive('visualaid', ed.hasVisual); - cm.setDisabled('undo', !ed.undoManager.hasUndo() && !ed.typing); - cm.setDisabled('redo', !ed.undoManager.hasRedo()); + t._updateUndoStatus(ed); cm.setDisabled('outdent', !ed.queryCommandState('Outdent')); - p = DOM.getParent(n, 'A'); + p = getParent('A'); if (c = cm.get('link')) { if (!p || !p.name) { c.setDisabled(!p && co); @@ -830,91 +982,126 @@ } if (c = cm.get('anchor')) { - c.setActive(!!p && p.name); - - if (tinymce.isWebKit) { - p = DOM.getParent(n, 'IMG'); - c.setActive(!!p && DOM.getAttrib(p, 'mce_name') == 'a'); - } + c.setActive(!co && !!p && p.name); } - p = DOM.getParent(n, 'IMG'); + p = getParent('IMG'); if (c = cm.get('image')) - c.setActive(!!p && n.className.indexOf('mceItem') == -1); + c.setActive(!co && !!p && n.className.indexOf('mceItem') == -1); if (c = cm.get('styleselect')) { - if (n.className) { - t._importClasses(); - c.select(n.className); - } else - c.select(); + t._importClasses(); + + formatNames = []; + each(c.items, function(item) { + formatNames.push(item.value); + }); + + matches = ed.formatter.matchAll(formatNames); + c.select(matches[0]); } if (c = cm.get('formatselect')) { - p = DOM.getParent(n, DOM.isBlock); + p = getParent(DOM.isBlock); if (p) c.select(p.nodeName.toLowerCase()); } - if (ed.settings.convert_fonts_to_spans) { - ed.dom.getParent(n, function(n) { - if (n.nodeName === 'SPAN') { - if (!cl && n.className) - cl = n.className; + // Find out current fontSize, fontFamily and fontClass + getParent(function(n) { + if (n.nodeName === 'SPAN') { + if (!cl && n.className) + cl = n.className; + } - if (!fz && n.style.fontSize) - fz = n.style.fontSize; + if (ed.dom.is(n, s.theme_advanced_font_selector)) { + if (!fz && n.style.fontSize) + fz = n.style.fontSize; - if (!fn && n.style.fontFamily) - fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase(); - } + if (!fn && n.style.fontFamily) + fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase(); + + if (!fc && n.style.color) + fc = n.style.color; - return false; + if (!bc && n.style.backgroundColor) + bc = n.style.backgroundColor; + } + + return false; + }); + + if (c = cm.get('fontselect')) { + c.select(function(v) { + return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn; }); + } - if (c = cm.get('fontselect')) { - c.select(function(v) { - return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn; - }); - } + // Select font size + if (c = cm.get('fontsizeselect')) { + // Use computed style + if (s.theme_advanced_runtime_fontsize && !fz && !cl) + fz = ed.dom.getStyle(n, 'fontSize', true); - if (c = cm.get('fontsizeselect')) { - c.select(function(v) { - if (v.fontSize && v.fontSize === fz) - return true; + c.select(function(v) { + if (v.fontSize && v.fontSize === fz) + return true; - if (v['class'] && v['class'] === cl) - return true; - }); + if (v['class'] && v['class'] === cl) + return true; + }); + } + + if (s.theme_advanced_show_current_color) { + function updateColor(controlId, color) { + if (c = cm.get(controlId)) { + if (!color) + color = c.settings.default_color; + if (color !== c.value) { + c.displayColor(color); + } + } } - } else { - if (c = cm.get('fontselect')) - c.select(ed.queryCommandValue('FontName')); + updateColor('forecolor', fc); + updateColor('backcolor', bc); + } - if (c = cm.get('fontsizeselect')) { - v = ed.queryCommandValue('FontSize'); - c.select(function(iv) { - return iv.fontSize == v; - }); - } + if (s.theme_advanced_show_current_color) { + function updateColor(controlId, color) { + if (c = cm.get(controlId)) { + if (!color) + color = c.settings.default_color; + if (color !== c.value) { + c.displayColor(color); + } + } + }; + + updateColor('forecolor', fc); + updateColor('backcolor', bc); } if (s.theme_advanced_path && s.theme_advanced_statusbar_location) { p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'}); + + if (t.statusKeyboardNavigation) { + t.statusKeyboardNavigation.destroy(); + t.statusKeyboardNavigation = null; + } + DOM.setHTML(p, ''); - ed.dom.getParent(n, function(n) { + getParent(function(n) { var na = n.nodeName.toLowerCase(), u, pi, ti = ''; + if (n.getAttribute('data-mce-bogus')) + return; + // Ignore non element and hidden elements if (n.nodeType != 1 || n.nodeName === 'BR' || (DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved'))) return; - // Fake name - if (v = DOM.getAttrib(n, 'mce_name')) - na = v; - // Handle prefix if (tinymce.isIE && n.scopeName !== 'HTML') na = n.scopeName + ':' + na; @@ -950,9 +1137,6 @@ break; case 'font': - if (s.convert_fonts_to_spans) - na = 'span'; - if (v = DOM.getAttrib(n, 'face')) ti += 'font: ' + v + ' '; @@ -975,9 +1159,9 @@ ti += 'id: ' + v + ' '; if (v = n.className) { - v = v.replace(/(webkit-[\w\-]+|Apple-[\w\-]+|mceItem\w+|mceVisualAid)/g, ''); + v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '') - if (v && v.indexOf('mceItem') == -1) { + if (v) { ti += 'class: ' + v + ' '; if (DOM.isBlock(n) || na == 'img' || na == 'span') @@ -992,14 +1176,25 @@ na = na.name; //u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');"; - pi = DOM.create('a', {'href' : "javascript:;", onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na); + pi = DOM.create('a', {'href' : "javascript:;", role: 'button', onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na); if (p.hasChildNodes()) { - p.insertBefore(DOM.doc.createTextNode(' \u00bb '), p.firstChild); + p.insertBefore(DOM.create('span', {'aria-hidden': 'true'}, '\u00a0\u00bb '), p.firstChild); p.insertBefore(pi, p.firstChild); } else p.appendChild(pi); }, ed.getBody()); + + if (DOM.select('a', p).length > 0) { + t.statusKeyboardNavigation = new tinymce.ui.KeyboardNavigation({ + root: ed.id + "_path_row", + items: DOM.select('a', p), + excludeFromTabOrder: true, + onCancel: function() { + ed.focus(); + } + }, DOM); + } } }, @@ -1013,7 +1208,7 @@ var ed = this.editor; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/anchor.htm', + url : this.url + '/anchor.htm', width : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)), height : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)), inline : true @@ -1026,7 +1221,7 @@ var ed = this.editor; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/charmap.htm', + url : this.url + '/charmap.htm', width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)), height : 250 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)), inline : true @@ -1039,7 +1234,7 @@ var ed = this.editor; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/about.htm', + url : this.url + '/about.htm', width : 480, height : 380, inline : true @@ -1048,13 +1243,25 @@ }); }, + _mceShortcuts : function() { + var ed = this.editor; + ed.windowManager.open({ + url: this.url + '/shortcuts.htm', + width: 480, + height: 380, + inline: true + }, { + theme_url: this.url + }); + }, + _mceColorPicker : function(u, v) { var ed = this.editor; v = v || {}; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/color_picker.htm', + url : this.url + '/color_picker.htm', width : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)), height : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)), close_previous : false, @@ -1070,7 +1277,7 @@ var ed = this.editor; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/source_editor.htm', + url : this.url + '/source_editor.htm', width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)), height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)), inline : true, @@ -1089,7 +1296,7 @@ return; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/image.htm', + url : this.url + '/image.htm', width : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)), height : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)), inline : true @@ -1102,7 +1309,7 @@ var ed = this.editor; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/link.htm', + url : this.url + '/link.htm', width : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)), height : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)), inline : true @@ -1150,4 +1357,4 @@ }); tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme); -}()); \ No newline at end of file +}(tinymce)); diff --git a/include/javascript/tiny_mce/themes/advanced/image.htm b/include/javascript/tiny_mce/themes/advanced/image.htm index bd92b004..884890fb 100644 --- a/include/javascript/tiny_mce/themes/advanced/image.htm +++ b/include/javascript/tiny_mce/themes/advanced/image.htm @@ -6,7 +6,6 @@ -
    @@ -18,68 +17,63 @@
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
     
    - x -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    + x +
    -
    - -
    - -
    - -
    + +
    diff --git a/include/javascript/tiny_mce/plugins/media/img/flash.gif b/include/javascript/tiny_mce/themes/advanced/img/flash.gif similarity index 100% rename from include/javascript/tiny_mce/plugins/media/img/flash.gif rename to include/javascript/tiny_mce/themes/advanced/img/flash.gif diff --git a/include/javascript/tiny_mce/themes/advanced/img/icons.gif b/include/javascript/tiny_mce/themes/advanced/img/icons.gif index ccac36f54d983cc33a0a6e45134e3dabf1820367..e46de5333082869b9bdab2576a554a2f9d01a966 100644 GIT binary patch delta 556 zcmV+{0@MBRS(03^@+*J4nMj91K!6CCg;~%|ckg$9|95~7c!3}ITCag#i1+#^_l8J< zMz{hi-~mn`f&WkNUxKfAi@$h`&v=cmcm(hTgr^UBX9yQ4ge$;@S9v2sc!Q7Jc$RN@ zmw$PfkNI8?cZ4VRnMi^w;DBhrhc`+RN=Se=h;o@9dZI6Sqd$Lor0*6Nojs;s`lY}5 zD*y%?AcQ30fmnctx}x}`-+Hd^dawU_qECWAD1>z20BE=b8{mXb!1_C|f>=NVu#bDW zpL@Em`(u{{S@;LM$9uis`@ZLUzCVa0SOOTmgjL`H5`YKAhX)~m2gb8|$d7!eJ7C-QRuh-Zy%KS7+c?_=Av3*=JNnJy~rK`rcoD=5K!I_jd%qhmU`NkWb!Nz)#vo z{#n5N=kI>+|9GLPhphAZdEo$^A(xgh4GHvPh&Zm*sx;9k}YfYEZVec*RpNv_AT7Fa_7>mYxgeRym~JN1OPj2L>nUj delta 265 zcmV+k0rviqT=7}3@+*HkcdvJQzju7kcYWXYVXuK+i1+#^cYYsuf-iW3KX`;s`0DTl zfTs_7S9pkzc+QERc#5z1V-I(LCwGhAc#iLQkN#4PkEJJd6sW^ zmw$Pfk9nD&d1sdeS@;K=w|Sh;`JLB!ou_%A4|<^=dZI6Sqd$Loq)&RKPxg{;dXt~M zrH^{4pL(i?d4E@DtQYvI-+Hd^daoaN1i*)ee}ISodb2-!v`>3%$M|^Hc(s3fxQ~0e zA9i?eczh`PxzBsO-+R74bblXvt?zrmAAG_u{BA)2hHrShH+;r#e8+!$$d7!Q_sRgx-G9iegFLZcfrha#d9w;%sU=Zx~6K$tw~$%z4`#O^Y@3Z zKV#~)MpSKh@#b63l#}6=>yq2|{`&JLqwny)|NnC)o%r$l&-Y)yKYjo8?#quSuRaGB zt_&<%`RV)bl#YEr{`~p)?RU|v^Y1_Z`u*?Ux8J`*N>>+5JlMAOZr+qr@y$D{mfVhO z+zt#7208-8pDc_F4ABfaAUi>E!oa?@A-bu#r8Qd6oKeb*Lx9UTz)0QBL@+vxY38ii zvqGa87c5+~h&?)zVa3W-D;=U$88}^qMBJ^ERU|z17!;#97+4%Rd1XcXJq#>t8KR;E z7zr5i6BgH5y=gAD)sAQlGB zh8au?j!n~E(Pks?@!j1fR&j*RWY8GF(-=x H6d0@lT&58X literal 0 HcmV?d00001 diff --git a/include/javascript/tiny_mce/plugins/pagebreak/img/pagebreak.gif b/include/javascript/tiny_mce/themes/advanced/img/pagebreak.gif similarity index 100% rename from include/javascript/tiny_mce/plugins/pagebreak/img/pagebreak.gif rename to include/javascript/tiny_mce/themes/advanced/img/pagebreak.gif diff --git a/include/javascript/tiny_mce/plugins/media/img/quicktime.gif b/include/javascript/tiny_mce/themes/advanced/img/quicktime.gif similarity index 100% rename from include/javascript/tiny_mce/plugins/media/img/quicktime.gif rename to include/javascript/tiny_mce/themes/advanced/img/quicktime.gif diff --git a/include/javascript/tiny_mce/plugins/media/img/realmedia.gif b/include/javascript/tiny_mce/themes/advanced/img/realmedia.gif similarity index 100% rename from include/javascript/tiny_mce/plugins/media/img/realmedia.gif rename to include/javascript/tiny_mce/themes/advanced/img/realmedia.gif diff --git a/include/javascript/tiny_mce/plugins/media/img/shockwave.gif b/include/javascript/tiny_mce/themes/advanced/img/shockwave.gif similarity index 100% rename from include/javascript/tiny_mce/plugins/media/img/shockwave.gif rename to include/javascript/tiny_mce/themes/advanced/img/shockwave.gif diff --git a/include/javascript/tiny_mce/plugins/media/img/trans.gif b/include/javascript/tiny_mce/themes/advanced/img/trans.gif similarity index 100% rename from include/javascript/tiny_mce/plugins/media/img/trans.gif rename to include/javascript/tiny_mce/themes/advanced/img/trans.gif diff --git a/include/javascript/tiny_mce/themes/advanced/img/video.gif b/include/javascript/tiny_mce/themes/advanced/img/video.gif new file mode 100644 index 0000000000000000000000000000000000000000..3570104077a3b3585f11403c8d4c3fc9351f35d2 GIT binary patch literal 597 zcmZ?wbhEHb6krfwc$UTx9v<%P?Ok48Ze?YanwpxCkzrwBk(ZYzB_&l;Qw!gmM(Ep^QBwbzIoSdAh>*2n> zz9l6k0Xw#(?);y5^ls9w|LObxXI*si^YfcEYu3*P8J(S-PEJlaNB-yTd}C^Ax@_69 zzP`Ryt5)S5`=P3;TDk9SbaeFk_3NiTjGA~aFd-pf@}tlxQ>GLb7jM|Gp`oFHlaq7F zk|nvhxjsHV=g+oST3Rl6T(N1>rn0iK*Ed>3MMVn>3vF#}**q!otE>Sy|^jDoRUBoBANRc=wyaJged$+}u3x zK}ld>puWET{||NozXdO-0f3nK$V8iNkVNKl+Guy1NeYie$3 zZB}=&Zex!RYq8YfVwgNdMpdFkN|rU!Fha}0m66q>CDxczOhH^pM9qvxw1p`;Rftzu zQJ&9}g>iErlc2ORw;aC_=l*6UJ=st%r*ISVV2jgDT<)w>rXHGL<21Kdo z#'; document.getElementById('iframecontainer').innerHTML = html; document.getElementById('help_tab').style.display = 'block'; + document.getElementById('help_tab').setAttribute("aria-hidden", "false"); } } diff --git a/include/javascript/tiny_mce/themes/advanced/js/anchor.js b/include/javascript/tiny_mce/themes/advanced/js/anchor.js index 76f4f7dd..7b556351 100644 --- a/include/javascript/tiny_mce/themes/advanced/js/anchor.js +++ b/include/javascript/tiny_mce/themes/advanced/js/anchor.js @@ -5,7 +5,7 @@ var AnchorDialog = { var action, elm, f = document.forms[0]; this.editor = ed; - elm = ed.dom.getParent(ed.selection.getNode(), 'A,IMG'); + elm = ed.dom.getParent(ed.selection.getNode(), 'A'); v = ed.dom.getAttrib(elm, 'name'); if (v) { @@ -17,18 +17,23 @@ var AnchorDialog = { }, update : function() { - var ed = this.editor; - + var ed = this.editor, elm, name = document.forms[0].anchorName.value; + + if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) { + tinyMCEPopup.alert('advanced_dlg.anchor_invalid'); + return; + } + tinyMCEPopup.restoreSelection(); if (this.action != 'update') ed.selection.collapse(1); - // Webkit acts weird if empty inline element is inserted so we need to use a image instead - if (tinymce.isWebKit) - ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('img', {mce_name : 'a', name : document.forms[0].anchorName.value, 'class' : 'mceItemAnchor'})); + elm = ed.dom.getParent(ed.selection.getNode(), 'A'); + if (elm) + elm.name = name; else - ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : document.forms[0].anchorName.value, 'class' : 'mceItemAnchor'}, '')); + ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : name, 'class' : 'mceItemAnchor'}, '')); tinyMCEPopup.close(); } diff --git a/include/javascript/tiny_mce/themes/advanced/js/charmap.js b/include/javascript/tiny_mce/themes/advanced/js/charmap.js index d9fd8d32..78bc080e 100644 --- a/include/javascript/tiny_mce/themes/advanced/js/charmap.js +++ b/include/javascript/tiny_mce/themes/advanced/js/charmap.js @@ -1,3 +1,13 @@ +/** + * charmap.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + tinyMCEPopup.requireLangPack(); var charmap = [ @@ -163,7 +173,7 @@ var charmap = [ ['ý', 'ý', true, 'y - acute'], ['þ', 'þ', true, 'thorn'], ['ÿ', 'ÿ', true, 'y - diaeresis'], - ['Α', 'Α', true, 'Alpha'], + ['Α', 'Α', true, 'Alpha'], ['Β', 'Β', true, 'Beta'], ['Γ', 'Γ', true, 'Gamma'], ['Δ', 'Δ', true, 'Delta'], @@ -248,8 +258,8 @@ var charmap = [ ['⌋', '⌋', false,'right floor'], ['⟨', '〈', false,'left-pointing angle bracket'], ['⟩', '〉', false,'right-pointing angle bracket'], - ['◊', '◊', true,'lozenge'], - ['♠', '♠', false,'black spade suit'], + ['◊', '◊', true, 'lozenge'], + ['♠', '♠', true, 'black spade suit'], ['♣', '♣', true, 'black club suit'], ['♥', '♥', true, 'black heart suit'], ['♦', '♦', true, 'black diamond suit'], @@ -265,19 +275,38 @@ var charmap = [ tinyMCEPopup.onInit.add(function() { tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML()); + addKeyboardNavigation(); }); +function addKeyboardNavigation(){ + var tableElm, cells, settings; + + cells = tinyMCEPopup.dom.select(".charmaplink", "charmapgroup"); + + settings ={ + root: "charmapgroup", + items: cells + }; + + tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom); +} + function renderCharMapHTML() { var charsPerRow = 20, tdWidth=20, tdHeight=20, i; - var html = ''; + var html = '
    '+ + '
    '; var cols=-1; for (i=0; i' - + '' + + '' + charmap[i][1] + ''; if ((cols+1) % charsPerRow == 0) @@ -291,7 +320,8 @@ function renderCharMapHTML() { html += ''; } - html += '
     
    '; + html += '
    '; + html = html.replace(/
    ' + // TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby. + h += '
    ' + ''; for (i=0; i' - + '' - + ''; + + ''; + if (tinyMCEPopup.editor.forcedHighContrastMode) { + h += ''; + } + h += ''; + h += ''; if ((i+1) % 18 == 0) h += ''; } - h += '
    '; + h += '
    '; el.innerHTML = h; el.className = 'generated'; + + paintCanvas(el); + enableKeyboardNavigation(el.firstChild); } +function paintCanvas(el) { + tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) { + var context; + if (canvas.getContext && (context = canvas.getContext("2d"))) { + context.fillStyle = canvas.getAttribute('data-color'); + context.fillRect(0, 0, 10, 10); + } + }); +} function generateNamedColors() { var el = document.getElementById('namedcolors'), h = '', n, v, i = 0; @@ -178,11 +238,27 @@ function generateNamedColors() { for (n in named) { v = named[n]; - h += '' + h += ''; + if (tinyMCEPopup.editor.forcedHighContrastMode) { + h += ''; + } + h += ''; + h += ''; + i++; } el.innerHTML = h; el.className = 'generated'; + + paintCanvas(el); + enableKeyboardNavigation(el); +} + +function enableKeyboardNavigation(el) { + tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', { + root: el, + items: tinyMCEPopup.dom.select('a', el) + }, tinyMCEPopup.dom); } function dechex(n) { diff --git a/include/javascript/tiny_mce/themes/advanced/js/image.js b/include/javascript/tiny_mce/themes/advanced/js/image.js index 7f07a86a..719e7e2b 100644 --- a/include/javascript/tiny_mce/themes/advanced/js/image.js +++ b/include/javascript/tiny_mce/themes/advanced/js/image.js @@ -77,7 +77,7 @@ var ImageDialog = { args.style = this.styleVal; tinymce.extend(args, { - src : f.src.value, + src : f.src.value.replace(/ /g, '%20'), alt : f.alt.value, width : f.width.value, height : f.height.value @@ -87,6 +87,8 @@ var ImageDialog = { if (el && el.nodeName == 'IMG') { ed.dom.setAttribs(el, args); + tinyMCEPopup.editor.execCommand('mceRepaint'); + tinyMCEPopup.editor.focus(); } else { ed.execCommand('mceInsertContent', false, '', {skip_undo : 1}); ed.dom.setAttribs('__mce_tmp', args); @@ -151,8 +153,8 @@ var ImageDialog = { } // Merge - st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st)); - this.styleVal = dom.serializeStyle(st); + st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img'); + this.styleVal = dom.serializeStyle(st, 'img'); } }, diff --git a/include/javascript/tiny_mce/themes/advanced/js/link.js b/include/javascript/tiny_mce/themes/advanced/js/link.js index c8cb642a..e67d868a 100644 --- a/include/javascript/tiny_mce/themes/advanced/js/link.js +++ b/include/javascript/tiny_mce/themes/advanced/js/link.js @@ -31,7 +31,7 @@ var LinkDialog = { }, update : function() { - var f = document.forms[0], ed = tinyMCEPopup.editor, e, b; + var f = document.forms[0], ed = tinyMCEPopup.editor, e, b, href = f.href.value.replace(/ /g, '%20'); tinyMCEPopup.restoreSelection(); e = ed.dom.getParent(ed.selection.getNode(), 'A'); @@ -39,7 +39,6 @@ var LinkDialog = { // Remove element if there is no href if (!f.href.value) { if (e) { - tinyMCEPopup.execCommand("mceBeginUndoLevel"); b = ed.selection.getBookmark(); ed.dom.remove(e, 1); ed.selection.moveToBookmark(b); @@ -49,30 +48,29 @@ var LinkDialog = { } } - tinyMCEPopup.execCommand("mceBeginUndoLevel"); - // Create new anchor elements if (e == null) { - tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); + ed.getDoc().execCommand("unlink", false, null); + tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1}); tinymce.each(ed.dom.select("a"), function(n) { if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') { e = n; ed.dom.setAttribs(e, { - href : f.href.value, + href : href, title : f.linktitle.value, - target : f.target_list ? f.target_list.options[f.target_list.selectedIndex].value : null, - 'class' : f.class_list ? f.class_list.options[f.class_list.selectedIndex].value : null + target : f.target_list ? getSelectValue(f, "target_list") : null, + 'class' : f.class_list ? getSelectValue(f, "class_list") : null }); } }); } else { ed.dom.setAttribs(e, { - href : f.href.value, + href : href, title : f.linktitle.value, - target : f.target_list ? f.target_list.options[f.target_list.selectedIndex].value : null, - 'class' : f.class_list ? f.class_list.options[f.class_list.selectedIndex].value : null + target : f.target_list ? getSelectValue(f, "target_list") : null, + 'class' : f.class_list ? getSelectValue(f, "class_list") : null }); } @@ -92,7 +90,7 @@ var LinkDialog = { if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email'))) n.value = 'mailto:' + n.value; - if (/^\s*www./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external'))) + if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external'))) n.value = 'http://' + n.value; }, diff --git a/include/javascript/tiny_mce/themes/advanced/js/source_editor.js b/include/javascript/tiny_mce/themes/advanced/js/source_editor.js index a6235a38..9cf6b1a2 100644 --- a/include/javascript/tiny_mce/themes/advanced/js/source_editor.js +++ b/include/javascript/tiny_mce/themes/advanced/js/source_editor.js @@ -2,7 +2,7 @@ tinyMCEPopup.requireLangPack(); tinyMCEPopup.onInit.add(onLoadInit); function saveContent() { - tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value); + tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true}); tinyMCEPopup.close(); } @@ -13,7 +13,7 @@ function onLoadInit() { if (tinymce.isGecko) document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck"); - document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent(); + document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true}); if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) { setWrap('soft'); @@ -44,19 +44,13 @@ function toggleWordWrap(elm) { setWrap('off'); } -var wHeight=0, wWidth=0, owHeight=0, owWidth=0; - function resizeInputs() { - var el = document.getElementById('htmlSource'); + var vp = tinyMCEPopup.dom.getViewPort(window), el; - if (!tinymce.isIE) { - wHeight = self.innerHeight - 65; - wWidth = self.innerWidth - 16; - } else { - wHeight = document.body.clientHeight - 70; - wWidth = document.body.clientWidth - 16; - } + el = document.getElementById('htmlSource'); - el.style.height = Math.abs(wHeight) + 'px'; - el.style.width = Math.abs(wWidth) + 'px'; + if (el) { + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 65) + 'px'; + } } diff --git a/include/javascript/tiny_mce/themes/advanced/langs/en.js b/include/javascript/tiny_mce/themes/advanced/langs/en.js index 52989e39..4c74747e 100644 --- a/include/javascript/tiny_mce/themes/advanced/langs/en.js +++ b/include/javascript/tiny_mce/themes/advanced/langs/en.js @@ -58,5 +58,11 @@ clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\r\nDo you path:"Path", newdocument:"Are you sure you want clear all contents?", toolbar_focus:"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X", -more_colors:"More colors" -}); \ No newline at end of file +more_colors:"More colors", + +// Accessibility Strings +shortcuts_desc:'Accessibility Help', +help_shortcut:'. Press ALT F10 for toolbar. Press ALT 0 for help.', +rich_text_area:"Rich Text Area", +toolbar:"Toolbar" +}); diff --git a/include/javascript/tiny_mce/themes/advanced/langs/en_dlg.js b/include/javascript/tiny_mce/themes/advanced/langs/en_dlg.js index 80e49419..a4e2e0b2 100644 --- a/include/javascript/tiny_mce/themes/advanced/langs/en_dlg.js +++ b/include/javascript/tiny_mce/themes/advanced/langs/en_dlg.js @@ -10,6 +10,7 @@ about_version:"Version", about_loaded:"Loaded plugins", anchor_title:"Insert/edit anchor", anchor_name:"Anchor name", +anchor_invalid:"Please specify a valid anchor name.", code_title:"HTML Source Editor", code_wordwrap:"Word wrap", colorpicker_title:"Select a color", @@ -45,7 +46,9 @@ link_target:"Target", link_target_same:"Open link in the same window", link_target_blank:"Open link in a new window", link_titlefield:"Title", -link_is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?", -link_is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?", -link_list:"Link list" +link_is_email:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?", +link_is_external:"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?", +link_list:"Link list", +accessibility_help:"Accessibility Help", +accessibility_usage_title:"General Usage" }); \ No newline at end of file diff --git a/include/javascript/tiny_mce/themes/advanced/link.htm b/include/javascript/tiny_mce/themes/advanced/link.htm index b647eed4..4a2459f8 100644 --- a/include/javascript/tiny_mce/themes/advanced/link.htm +++ b/include/javascript/tiny_mce/themes/advanced/link.htm @@ -7,7 +7,6 @@ -
    @@ -19,45 +18,39 @@
    - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
     
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    -
    - -
    - -
    - -
    + +
    diff --git a/include/javascript/tiny_mce/themes/advanced/shortcuts.htm b/include/javascript/tiny_mce/themes/advanced/shortcuts.htm new file mode 100644 index 00000000..436091f1 --- /dev/null +++ b/include/javascript/tiny_mce/themes/advanced/shortcuts.htm @@ -0,0 +1,47 @@ + + + + {#advanced_dlg.accessibility_help} + + + + +

    {#advanced_dlg.accessibility_usage_title}

    +

    Toolbars

    +

    Press ALT-F10 to move focus to the toolbars. Navigate through the buttons using the arrow keys. + Press enter to activate a button and return focus to the editor. + Press escape to return focus to the editor without performing any actions.

    + +

    Status Bar

    +

    To access the editor status bar, press ALT-F11. Use the left and right arrow keys to navigate between elements in the path. + Press enter or space to select an element. Press escape to return focus to the editor without changing the selection.

    + +

    Context Menu

    +

    Press shift-F10 to activate the context menu. Use the up and down arrow keys to move between menu items. To open sub-menus press the right arrow key. + To close submenus press the left arrow key. Press escape to close the context menu.

    + +

    Keyboard Shortcuts

    + + + + + + + + + + + + + + + + + + + + + +
    KeystrokeFunction
    Control-BBold
    Control-IItalic
    Control-ZUndo
    Control-YRedo
    + + diff --git a/include/javascript/tiny_mce/themes/advanced/skins/default/content.css b/include/javascript/tiny_mce/themes/advanced/skins/default/content.css index cb7604e7..842d52d4 100644 --- a/include/javascript/tiny_mce/themes/advanced/skins/default/content.css +++ b/include/javascript/tiny_mce/themes/advanced/skins/default/content.css @@ -1,6 +1,7 @@ body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;} body {background:#FFF;} body.mceForceColors {background:#FFF; color:#000;} +body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;} h1 {font-size: 2em} h2 {font-size: 1.5em} h3 {font-size: 1.17em} @@ -8,8 +9,9 @@ h4 {font-size: 1em} h5 {font-size: .83em} h6 {font-size: .75em} .mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} -a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(img/items.gif) no-repeat bottom left;} -img.mceItemAnchor {width:12px; height:12px; background:url(img/items.gif) no-repeat;} +a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat 0 0;} +span.mceItemNbsp {background: #DDD} +td.mceSelected, th.mceSelected {background-color:#3399ff !important} img {border:0;} table {cursor:default} table td, table th {cursor:text} @@ -17,7 +19,7 @@ ins {border-bottom:1px solid green; text-decoration: none; color:green} del {color:red; text-decoration:line-through} cite {border-bottom:1px dashed blue} acronym {border-bottom:1px dotted #CCC; cursor:help} -abbr, html\:abbr {border-bottom:1px dashed #CCC; cursor:help} +abbr {border-bottom:1px dashed #CCC; cursor:help} /* IE */ * html body { @@ -30,3 +32,16 @@ scrollbar-highlight-color:#F0F0EE; scrollbar-shadow-color:#F0F0EE; scrollbar-track-color:#F5F5F5; } + +img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} +font[face=mceinline] {font-family:inherit !important} + +.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc} +.mceItemShockWave {background-image:url(../../img/shockwave.gif)} +.mceItemFlash {background-image:url(../../img/flash.gif)} +.mceItemQuickTime {background-image:url(../../img/quicktime.gif)} +.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)} +.mceItemRealMedia {background-image:url(../../img/realmedia.gif)} +.mceItemVideo {background-image:url(../../img/video.gif)} +.mceItemIframe {background-image:url(../../img/iframe.gif)} +.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;} diff --git a/include/javascript/tiny_mce/themes/advanced/skins/default/dialog.css b/include/javascript/tiny_mce/themes/advanced/skins/default/dialog.css index 8b21c026..1f5598c6 100644 --- a/include/javascript/tiny_mce/themes/advanced/skins/default/dialog.css +++ b/include/javascript/tiny_mce/themes/advanced/skins/default/dialog.css @@ -19,6 +19,7 @@ td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} textarea {resize:none;outline:none;} a:link, a:visited {color:black;} a:hover {color:#2B6FB6;} +.nowrap {white-space: nowrap} /* Forms */ fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} @@ -41,12 +42,14 @@ width:94px; height:26px; background:url(img/buttons.png) 0 -26px; cursor:pointer; padding-bottom:2px; +float:left; } -#insert {background:url(img/buttons.png) 0 -52px;} -#cancel {background:url(img/buttons.png) 0 0;} +#insert {background:url(img/buttons.png) 0 -52px} +#cancel {background:url(img/buttons.png) 0 0; float:right} /* Browse */ +a.pickcolor, a.browse {text-decoration:none} a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} .mceOldBoxModel a.browse span {width:22px; height:20px;} a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} @@ -111,4 +114,4 @@ h3 {font-size:14px;} #colorpicker #namedcolors {width:150px;} #colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} #colorpicker #colornamecontainer {margin-top:5px;} -#colorpicker #picker_panel fieldset {margin:auto;width:325px;} \ No newline at end of file +#colorpicker #picker_panel fieldset {margin:auto;width:325px;} diff --git a/include/javascript/tiny_mce/themes/advanced/skins/default/ui.css b/include/javascript/tiny_mce/themes/advanced/skins/default/ui.css index 2c90d498..e14d36fa 100644 --- a/include/javascript/tiny_mce/themes/advanced/skins/default/ui.css +++ b/include/javascript/tiny_mce/themes/advanced/skins/default/ui.css @@ -4,8 +4,8 @@ .defaultSkin table td {vertical-align:middle} /* Containers */ -.defaultSkin table {background:#F0F0EE} -.defaultSkin iframe {display:block; background:#FFF} +.defaultSkin table {direction:ltr;background:transparent} +.defaultSkin iframe {display:block;} .defaultSkin .mceToolbar {height:26px} .defaultSkin .mceLeft {text-align:left} .defaultSkin .mceRight {text-align:right} @@ -20,11 +20,11 @@ .defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC} .defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC} .defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;} -.defaultSkin td.mceToolbar {padding-top:1px; vertical-align:top} +.defaultSkin td.mceToolbar {background:#F0F0EE; padding-top:1px; vertical-align:top} .defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC} -.defaultSkin .mceStatusbar {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px} +.defaultSkin .mceStatusbar {background:#F0F0EE; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px} .defaultSkin .mceStatusbar div {float:left; margin:2px} -.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize} +.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0} .defaultSkin .mceStatusbar a:hover {text-decoration:underline} .defaultSkin table.mceToolbar {margin-left:3px} .defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px} @@ -47,7 +47,6 @@ .defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px} /* ListBox */ -.defaultSkin .mceListBox {direction:ltr} .defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block} .defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden} .defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;} @@ -63,7 +62,7 @@ .defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr} .defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block} .defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;} -.defaultSkin .mceSplitButton span.mceAction {width:20px; background:url(../../img/icons.gif) 20px 20px;} +.defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);} .defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;} .defaultSkin .mceSplitButton span.mceOpen {display:none} .defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0} @@ -108,7 +107,6 @@ /* Progress,Resize */ .defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF} .defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} -.defaultSkin .mcePlaceHolder {border:1px dotted gray} /* Formats */ .defaultSkin .mce_formatPreview a {font-size:10px} @@ -211,4 +209,5 @@ .defaultSkin span.mce_del {background-position:-940px -20px} .defaultSkin span.mce_ins {background-position:-960px -20px} .defaultSkin span.mce_pagebreak {background-position:0 -40px} -.defaultSkin .mce_spellchecker span.mceAction {background-position:-540px -20px} +.defaultSkin span.mce_restoredraft {background-position:-20px -40px} +.defaultSkin span.mce_spellchecker {background-position:-540px -20px} diff --git a/include/javascript/tiny_mce/themes/advanced/skins/highcontrast/content.css b/include/javascript/tiny_mce/themes/advanced/skins/highcontrast/content.css new file mode 100644 index 00000000..75cfaf18 --- /dev/null +++ b/include/javascript/tiny_mce/themes/advanced/skins/highcontrast/content.css @@ -0,0 +1,23 @@ +body, td, pre { margin:8px;} +body.mceForceColors {background:#FFF; color:#000;} +h1 {font-size: 2em} +h2 {font-size: 1.5em} +h3 {font-size: 1.17em} +h4 {font-size: 1em} +h5 {font-size: .83em} +h6 {font-size: .75em} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;} +span.mceItemNbsp {background: #DDD} +td.mceSelected, th.mceSelected {background-color:#3399ff !important} +img {border:0;} +table {cursor:default} +table td, table th {cursor:text} +ins {border-bottom:1px solid green; text-decoration: none; color:green} +del {color:red; text-decoration:line-through} +cite {border-bottom:1px dashed blue} +acronym {border-bottom:1px dotted #CCC; cursor:help} +abbr {border-bottom:1px dashed #CCC; cursor:help} + +img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} +font[face=mceinline] {font-family:inherit !important} diff --git a/include/javascript/tiny_mce/themes/advanced/skins/highcontrast/dialog.css b/include/javascript/tiny_mce/themes/advanced/skins/highcontrast/dialog.css new file mode 100644 index 00000000..dafcd280 --- /dev/null +++ b/include/javascript/tiny_mce/themes/advanced/skins/highcontrast/dialog.css @@ -0,0 +1,105 @@ +/* Generic */ +body { +font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; +background:#F0F0EE; +color: black; +padding:0; +margin:8px 8px 0 8px; +} + +html {background:#F0F0EE; color:#000;} +td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +textarea {resize:none;outline:none;} +a:link, a:visited {color:black;background-color:transparent;} +a:hover {color:#2B6FB6;background-color:transparent;} +.nowrap {white-space: nowrap} + +/* Forms */ +fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} +legend {color:#2B6FB6; font-weight:bold;} +label.msg {display:none;} +label.invalid {color:#EE0000; display:inline;background-color:transparent;} +input.invalid {border:1px solid #EE0000;background-color:transparent;} +input {background:#FFF; border:1px solid #CCC;color:black;} +input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +input, select, textarea {border:1px solid #808080;} +input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} +input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} +.input_noborder {border:0;} + +/* Buttons */ +#insert, #cancel, input.button, .updateButton { +font-weight:bold; +width:94px; height:23px; +cursor:pointer; +padding-bottom:2px; +float:left; +} + +#cancel {float:right} + +/* Browse */ +a.pickcolor, a.browse {text-decoration:none} +a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} +.mceOldBoxModel a.browse span {width:22px; height:20px;} +a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} +a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} +a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} +.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} +a.pickcolor:hover span {background-color:#B2BBD0;} +a.pickcolor:hover span.disabled {} + +/* Charmap */ +table.charmap {border:1px solid #AAA; text-align:center} +td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} +#charmap a {display:block; color:#000; text-decoration:none; border:0} +#charmap a:hover {background:#CCC;color:#2B6FB6} +#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} +#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} + +/* Source */ +.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} +.mceActionPanel {margin-top:5px;} + +/* Tabs classes */ +.tabs {width:100%; height:18px; line-height:normal;} +.tabs ul {margin:0; padding:0; list-style:none;} +.tabs li {float:left; border: 1px solid black; border-bottom:0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block; cursor:pointer;} +.tabs li.current {font-weight: bold; margin-right:2px;} +.tabs span {float:left; display:block; padding:0px 10px 0 0;} +.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} +.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} + +/* Panels */ +.panel_wrapper div.panel {display:none;} +.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} +.panel_wrapper {border:1px solid #919B9C; padding:10px; padding-top:5px; clear:both; background:white;} + +/* Columns */ +.column {float:left;} +.properties {width:100%;} +.properties .column1 {} +.properties .column2 {text-align:left;} + +/* Titles */ +h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} +h3 {font-size:14px;} +.title {font-size:12px; font-weight:bold; color:#2B6FB6;} + +/* Dialog specific */ +#link .panel_wrapper, #link div.current {height:125px;} +#image .panel_wrapper, #image div.current {height:200px;} +#plugintable thead {font-weight:bold; background:#DDD;} +#plugintable, #about #plugintable td {border:1px solid #919B9C;} +#plugintable {width:96%; margin-top:10px;} +#pluginscontainer {height:290px; overflow:auto;} +#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} +#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} +#colorpicker #light div {overflow:hidden;} +#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} +#colorpicker .panel_wrapper div.current {height:175px;} +#colorpicker #namedcolors {width:150px;} +#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} +#colorpicker #colornamecontainer {margin-top:5px;} diff --git a/include/javascript/tiny_mce/themes/advanced/skins/highcontrast/ui.css b/include/javascript/tiny_mce/themes/advanced/skins/highcontrast/ui.css new file mode 100644 index 00000000..a550c8f6 --- /dev/null +++ b/include/javascript/tiny_mce/themes/advanced/skins/highcontrast/ui.css @@ -0,0 +1,101 @@ +/* Reset */ +.highcontrastSkin table, .highcontrastSkin tbody, .highcontrastSkin a, .highcontrastSkin img, .highcontrastSkin tr, .highcontrastSkin div, .highcontrastSkin td, .highcontrastSkin iframe, .highcontrastSkin span, .highcontrastSkin *, .highcontrastSkin .mceText {border:0; margin:0; padding:0; vertical-align:baseline; border-collapse:separate;} +.highcontrastSkin a:hover, .highcontrastSkin a:link, .highcontrastSkin a:visited, .highcontrastSkin a:active {text-decoration:none; font-weight:normal; cursor:default;} +.highcontrastSkin table td {vertical-align:middle} + +.highcontrastSkin .mceIconOnly {display: block !important;} + +/* External */ +.highcontrastSkin .mceExternalToolbar {position:absolute; border:1px solid; border-bottom:0; display:none; background-color: white;} +.highcontrastSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;} +.highcontrastSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px;} + +/* Layout */ +.highcontrastSkin table.mceLayout {border: 1px solid;} +.highcontrastSkin .mceIframeContainer {border-top:1px solid; border-bottom:1px solid} +.highcontrastSkin .mceStatusbar a:hover {text-decoration:underline} +.highcontrastSkin .mceStatusbar {display:block; line-height:1.5em; overflow:visible;} +.highcontrastSkin .mceStatusbar div {float:left} +.highcontrastSkin .mceStatusbar a.mceResize {display:block; float:right; width:20px; height:20px; cursor:se-resize; outline:0} + +.highcontrastSkin .mceToolbar td { display: inline-block; float: left;} +.highcontrastSkin .mceToolbar tr { display: block;} +.highcontrastSkin .mceToolbar table { display: block; } + +/* Button */ + +.highcontrastSkin .mceButton { display:block; margin: 2px; padding: 5px 10px;border: 1px solid; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; -ms-border-radius: 3px; height: 2em;} +.highcontrastSkin .mceButton .mceVoiceLabel { height: 100%; vertical-align: center; line-height: 2em} +.highcontrastSkin .mceButtonDisabled .mceVoiceLabel { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);} +.highcontrastSkin .mceButtonActive, .highcontrastSkin .mceButton:focus, .highcontrastSkin .mceButton:active { border: 5px solid; padding: 1px 6px;-webkit-focus-ring-color:none;outline:none;} + +/* Separator */ +.highcontrastSkin .mceSeparator {display:block; width:16px; height:26px;} + +/* ListBox */ +.highcontrastSkin .mceListBox { display: block; margin:2px;-webkit-focus-ring-color:none;outline:none;} +.highcontrastSkin .mceListBox .mceText {padding: 5px 6px; line-height: 2em; width: 15ex; overflow: hidden;} +.highcontrastSkin .mceListBoxDisabled .mceText { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);} +.highcontrastSkin .mceListBox a.mceText { padding: 5px 10px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;} +.highcontrastSkin .mceListBox a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-left: 0; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;} +.highcontrastSkin .mceListBox:focus a.mceText, .highcontrastSkin .mceListBox:active a.mceText { border-width: 5px; padding: 1px 10px 1px 6px;} +.highcontrastSkin .mceListBox:focus a.mceOpen, .highcontrastSkin .mceListBox:active a.mceOpen { border-width: 5px; padding: 1px 0px 1px 4px;} + +.highcontrastSkin .mceListBoxMenu {overflow-y:auto} + +/* SplitButton */ +.highcontrastSkin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} + +.highcontrastSkin .mceSplitButton { border-collapse: collapse; margin: 2px; height: 2em; line-height: 2em;-webkit-focus-ring-color:none;outline:none;} +.highcontrastSkin .mceSplitButton td { display: table-cell; float: none; margin: 0; padding: 0; height: 2em;} +.highcontrastSkin .mceSplitButton tr { display: table-row; } +.highcontrastSkin table.mceSplitButton { display: table; } +.highcontrastSkin .mceSplitButton a.mceAction { padding: 5px 10px; display: block; height: 2em; line-height: 2em; overflow: hidden; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;} +.highcontrastSkin .mceSplitButton a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;} +.highcontrastSkin .mceSplitButton .mceVoiceLabel { height: 2em; vertical-align: center; line-height: 2em; } +.highcontrastSkin .mceSplitButton:focus a.mceAction, .highcontrastSkin .mceSplitButton:active a.mceAction { border-width: 5px; border-right-width: 1px; padding: 1px 10px 1px 6px;-webkit-focus-ring-color:none;outline:none;} +.highcontrastSkin .mceSplitButton:focus a.mceOpen, .highcontrastSkin .mceSplitButton:active a.mceOpen { border-width: 5px; border-left-width: 1px; padding: 1px 0px 1px 4px;-webkit-focus-ring-color:none;outline:none;} + +/* Menu */ +.highcontrastSkin .mceNoIcons span.mceIcon {width:0;} +.highcontrastSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid; } +.highcontrastSkin .mceMenu table {background:white; color: black} +.highcontrastSkin .mceNoIcons a .mceText {padding-left:10px} +.highcontrastSkin .mceMenu a, .highcontrastSkin .mceMenu span, .highcontrastSkin .mceMenu {display:block;background:white; color: black} +.highcontrastSkin .mceMenu td {height:2em} +.highcontrastSkin .mceMenu a {position:relative;padding:3px 0 4px 0; display: block;} +.highcontrastSkin .mceMenu .mceText {position:relative; display:block; cursor:default; margin:0; padding:0 25px 0 25px;} +.highcontrastSkin .mceMenu pre.mceText {font-family:Monospace} +.highcontrastSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:26px;} +.highcontrastSkin td.mceMenuItemSeparator {border-top:1px solid; height:1px} +.highcontrastSkin .mceMenuItemTitle a {border:0; border-bottom:1px solid} +.highcontrastSkin .mceMenuItemTitle span.mceText {font-weight:bold; padding-left:4px} +.highcontrastSkin .mceNoIcons .mceMenuItemSelected span.mceText:before {content: "\2713\A0";} +.highcontrastSkin .mceMenu span.mceMenuLine {display:none} +.highcontrastSkin .mceMenuItemSub a .mceText:after {content: "\A0\25B8"} + +/* ColorSplitButton */ +.highcontrastSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid; color: #000} +.highcontrastSkin .mceColorSplitMenu td {padding:2px} +.highcontrastSkin .mceColorSplitMenu a {display:block; width:16px; height:16px; overflow:hidden; color:#000; margin: 0; padding: 0;} +.highcontrastSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} +.highcontrastSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF} +.highcontrastSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid; background-color:#B6BDD2} +.highcontrastSkin a.mceMoreColors:hover {border:1px solid #0A246A; color: #000;} +.highcontrastSkin .mceColorPreview {display:none;} +.highcontrastSkin .mce_forecolor span.mceAction, .highcontrastSkin .mce_backcolor span.mceAction {height:17px;overflow:hidden} + +/* Progress,Resize */ +.highcontrastSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF} +.highcontrastSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} + +/* Formats */ +.highcontrastSkin .mce_p span.mceText {} +.highcontrastSkin .mce_address span.mceText {font-style:italic} +.highcontrastSkin .mce_pre span.mceText {font-family:monospace} +.highcontrastSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em} +.highcontrastSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em} +.highcontrastSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em} +.highcontrastSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em} +.highcontrastSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em} +.highcontrastSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em} diff --git a/include/javascript/tiny_mce/themes/advanced/skins/o2k7/content.css b/include/javascript/tiny_mce/themes/advanced/skins/o2k7/content.css index a4049317..8569401b 100644 --- a/include/javascript/tiny_mce/themes/advanced/skins/o2k7/content.css +++ b/include/javascript/tiny_mce/themes/advanced/skins/o2k7/content.css @@ -8,8 +8,9 @@ h4 {font-size: 1em} h5 {font-size: .83em} h6 {font-size: .75em} .mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} -a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(../default/img/items.gif) no-repeat bottom left;} -img.mceItemAnchor {width:12px; height:12px; background:url(../default/img/items.gif) no-repeat;} +a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;} +span.mceItemNbsp {background: #DDD} +td.mceSelected, th.mceSelected {background-color:#3399ff !important} img {border:0;} table {cursor:default} table td, table th {cursor:text} @@ -17,7 +18,7 @@ ins {border-bottom:1px solid green; text-decoration: none; color:green} del {color:red; text-decoration:line-through} cite {border-bottom:1px dashed blue} acronym {border-bottom:1px dotted #CCC; cursor:help} -abbr, html\:abbr {border-bottom:1px dashed #CCC; cursor:help} +abbr {border-bottom:1px dashed #CCC; cursor:help} /* IE */ * html body { @@ -30,3 +31,16 @@ scrollbar-highlight-color:#F0F0EE; scrollbar-shadow-color:#F0F0EE; scrollbar-track-color:#F5F5F5; } + +img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} +font[face=mceinline] {font-family:inherit !important} + +.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc} +.mceItemShockWave {background-image:url(../../img/shockwave.gif)} +.mceItemFlash {background-image:url(../../img/flash.gif)} +.mceItemQuickTime {background-image:url(../../img/quicktime.gif)} +.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)} +.mceItemRealMedia {background-image:url(../../img/realmedia.gif)} +.mceItemVideo {background-image:url(../../img/video.gif)} +.mceItemIframe {background-image:url(../../img/iframe.gif)} +.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;} diff --git a/include/javascript/tiny_mce/themes/advanced/skins/o2k7/dialog.css b/include/javascript/tiny_mce/themes/advanced/skins/o2k7/dialog.css index 4f618829..c97d38e8 100644 --- a/include/javascript/tiny_mce/themes/advanced/skins/o2k7/dialog.css +++ b/include/javascript/tiny_mce/themes/advanced/skins/o2k7/dialog.css @@ -19,6 +19,7 @@ td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} textarea {resize:none;outline:none;} a:link, a:visited {color:black;} a:hover {color:#2B6FB6;} +.nowrap {white-space: nowrap} /* Forms */ fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} @@ -41,12 +42,14 @@ width:94px; height:26px; background:url(../default/img/buttons.png) 0 -26px; cursor:pointer; padding-bottom:2px; +float:left; } -#insert {background:url(../default/img/buttons.png) 0 -52px;} -#cancel {background:url(../default/img/buttons.png) 0 0;} +#insert {background:url(../default/img/buttons.png) 0 -52px} +#cancel {background:url(../default/img/buttons.png) 0 0; float:right} /* Browse */ +a.pickcolor, a.browse {text-decoration:none} a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} .mceOldBoxModel a.browse span {width:22px; height:20px;} a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} @@ -111,3 +114,4 @@ h3 {font-size:14px;} #colorpicker #namedcolors {width:150px;} #colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} #colorpicker #colornamecontainer {margin-top:5px;} +#colorpicker #picker_panel fieldset {margin:auto;width:325px;} diff --git a/include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui.css b/include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui.css index 0f8d5c24..91edecad 100644 --- a/include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui.css +++ b/include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui.css @@ -4,8 +4,8 @@ .o2k7Skin table td {vertical-align:middle} /* Containers */ -.o2k7Skin table {background:#E5EFFD} -.o2k7Skin iframe {display:block; background:#FFF} +.o2k7Skin table {background:transparent} +.o2k7Skin iframe {display:block;} .o2k7Skin .mceToolbar {height:26px} /* External */ @@ -19,9 +19,10 @@ .o2k7Skin table.mceLayout tr.mceLast td {border-bottom:1px solid #ABC6DD} .o2k7Skin table.mceToolbar, .o2k7Skin tr.mceFirst .mceToolbar tr td, .o2k7Skin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0} .o2k7Skin .mceIframeContainer {border-top:1px solid #ABC6DD; border-bottom:1px solid #ABC6DD} -.o2k7Skin .mceStatusbar {display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px} +.o2k7Skin td.mceToolbar{background:#E5EFFD} +.o2k7Skin .mceStatusbar {background:#E5EFFD; display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px} .o2k7Skin .mceStatusbar div {float:left; padding:2px} -.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize} +.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0} .o2k7Skin .mceStatusbar a:hover {text-decoration:underline} .o2k7Skin table.mceToolbar {margin-left:3px} .o2k7Skin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; margin-left:3px;} @@ -62,10 +63,10 @@ .o2k7Skin select.mceListBox {font-family:Tahoma,Verdana,Arial,Helvetica; font-size:12px; border:1px solid #b3c7e1; background:#FFF;} /* SplitButton */ -.o2k7Skin .mceSplitButton, .o2k7Skin .mceSplitButton a, .o2k7Skin .mceSplitButton span {display:block; height:22px} +.o2k7Skin .mceSplitButton, .o2k7Skin .mceSplitButton a, .o2k7Skin .mceSplitButton span {display:block; height:22px; direction:ltr} .o2k7Skin .mceSplitButton {background:url(img/button_bg.png)} .o2k7Skin .mceSplitButton a.mceAction {width:22px} -.o2k7Skin .mceSplitButton span.mceAction {width:22px; background:url(../../img/icons.gif) 20px 20px} +.o2k7Skin .mceSplitButton span.mceAction {width:22px; background-image:url(../../img/icons.gif)} .o2k7Skin .mceSplitButton a.mceOpen {width:10px; background:url(img/button_bg.png) -44px 0} .o2k7Skin .mceSplitButton span.mceOpen {display:none} .o2k7Skin table.mceSplitButtonEnabled:hover a.mceAction, .o2k7Skin .mceSplitButtonHover a.mceAction, .o2k7Skin .mceSplitButtonSelected {background:url(img/button_bg.png) 0 -22px} @@ -109,7 +110,6 @@ /* Progress,Resize */ .o2k7Skin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF} .o2k7Skin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} -.o2k7Skin .mcePlaceHolder {border:1px dotted gray} /* Formats */ .o2k7Skin .mce_formatPreview a {font-size:10px} @@ -212,4 +212,5 @@ .o2k7Skin span.mce_del {background-position:-940px -20px} .o2k7Skin span.mce_ins {background-position:-960px -20px} .o2k7Skin span.mce_pagebreak {background-position:0 -40px} -.o2k7Skin .mce_spellchecker span.mceAction {background-position:-540px -20px} +.o2k7Skin span.mce_restoredraft {background-position:-20px -40px} +.o2k7Skin span.mce_spellchecker {background-position:-540px -20px} diff --git a/include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_black.css b/include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_black.css index 81dbfe41..85812cde 100644 --- a/include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +++ b/include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_black.css @@ -1,6 +1,6 @@ /* Black */ .o2k7SkinBlack .mceToolbar .mceToolbarStart span, .o2k7SkinBlack .mceToolbar .mceToolbarEnd span, .o2k7SkinBlack .mceButton, .o2k7SkinBlack .mceSplitButton, .o2k7SkinBlack .mceSeparator, .o2k7SkinBlack .mceSplitButton a.mceOpen, .o2k7SkinBlack .mceListBox a.mceOpen {background-image:url(img/button_bg_black.png)} -.o2k7SkinBlack table, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack .mceMenuItemTitle span.mceText, .o2k7SkinBlack .mceStatusbar div, .o2k7SkinBlack .mceStatusbar span, .o2k7SkinBlack .mceStatusbar a {background:#535353; color:#FFF} +.o2k7SkinBlack td.mceToolbar, .o2k7SkinBlack td.mceStatusbar, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack .mceMenuItemTitle span.mceText, .o2k7SkinBlack .mceStatusbar div, .o2k7SkinBlack .mceStatusbar span, .o2k7SkinBlack .mceStatusbar a {background:#535353; color:#FFF} .o2k7SkinBlack table.mceListBoxEnabled .mceText, o2k7SkinBlack .mceListBox .mceText {background:#FFF; border:1px solid #CBCFD4; border-bottom-color:#989FA9; border-right:0} .o2k7SkinBlack table.mceListBoxEnabled:hover .mceText, .o2k7SkinBlack .mceListBoxHover .mceText, .o2k7SkinBlack .mceListBoxSelected .mceText {background:#FFF; border:1px solid #FFBD69; border-right:0} .o2k7SkinBlack .mceExternalToolbar, .o2k7SkinBlack .mceListBox .mceText, .o2k7SkinBlack div.mceMenu, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceFirst td, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceLast td, .o2k7SkinBlack .mceIframeContainer {border-color: #535353;} diff --git a/include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css b/include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css index e8ae844f..d64c3616 100644 --- a/include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +++ b/include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css @@ -1,5 +1,5 @@ /* Silver */ .o2k7SkinSilver .mceToolbar .mceToolbarStart span, .o2k7SkinSilver .mceButton, .o2k7SkinSilver .mceSplitButton, .o2k7SkinSilver .mceSeparator, .o2k7SkinSilver .mceSplitButton a.mceOpen, .o2k7SkinSilver .mceListBox a.mceOpen {background-image:url(img/button_bg_silver.png)} -.o2k7SkinSilver table, .o2k7SkinSilver .mceMenuItemTitle a {background:#eee} +.o2k7SkinSilver td.mceToolbar, .o2k7SkinSilver td.mceStatusbar, .o2k7SkinSilver .mceMenuItemTitle a {background:#eee} .o2k7SkinSilver .mceListBox .mceText {background:#FFF} .o2k7SkinSilver .mceExternalToolbar, .o2k7SkinSilver .mceListBox .mceText, .o2k7SkinSilver div.mceMenu, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceFirst td, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceLast td, .o2k7SkinSilver .mceIframeContainer {border-color: #bbb} diff --git a/include/javascript/tiny_mce/themes/advanced/source_editor.htm b/include/javascript/tiny_mce/themes/advanced/source_editor.htm index 5f047dcb..d3f75d66 100644 --- a/include/javascript/tiny_mce/themes/advanced/source_editor.htm +++ b/include/javascript/tiny_mce/themes/advanced/source_editor.htm @@ -1,14 +1,12 @@ - {#advanced_dlg.code_title} -
    -
    {#advanced_dlg.code_title}
    +
    @@ -19,13 +17,8 @@
    -
    - -
    - -
    - -
    + +
    diff --git a/include/javascript/tiny_mce/themes/simple/editor_template.js b/include/javascript/tiny_mce/themes/simple/editor_template.js index d19fb53f..4b3209cc 100644 --- a/include/javascript/tiny_mce/themes/simple/editor_template.js +++ b/include/javascript/tiny_mce/themes/simple/editor_template.js @@ -1 +1 @@ -(function(){var DOM=tinymce.DOM;tinymce.ThemeManager.requireLangPack('simple');tinymce.create('tinymce.themes.SimpleTheme',{init:function(ed,url){var t=this,states=['Bold','Italic','Underline','Strikethrough','InsertUnorderedList','InsertOrderedList'],s=ed.settings;t.editor=ed;ed.onInit.add(function(){ed.onNodeChange.add(function(ed,cm){tinymce.each(states,function(c){cm.get(c.toLowerCase()).setActive(ed.queryCommandState(c));});});ed.dom.loadCSS(url+"/skins/"+s.skin+"/content.css");});DOM.loadCSS((s.editor_css?ed.documentBaseURI.toAbsolute(s.editor_css):'')||url+"/skins/"+s.skin+"/ui.css");},renderUI:function(o){var t=this,n=o.targetNode,ic,tb,ed=t.editor,cf=ed.controlManager,sc;n=DOM.insertAfter(DOM.create('span',{id:ed.id+'_container','class':'mceEditor '+ed.settings.skin+'SimpleSkin'}),n);n=sc=DOM.add(n,'table',{cellPadding:0,cellSpacing:0,'class':'mceLayout'});n=tb=DOM.add(n,'tbody');n=DOM.add(tb,'tr');n=ic=DOM.add(DOM.add(n,'td'),'div',{'class':'mceIframeContainer'});n=DOM.add(DOM.add(tb,'tr',{'class':'last'}),'td',{'class':'mceToolbar mceLast',align:'center'});tb=t.toolbar=cf.createToolbar("tools1");tb.add(cf.createButton('bold',{title:'simple.bold_desc',cmd:'Bold'}));tb.add(cf.createButton('italic',{title:'simple.italic_desc',cmd:'Italic'}));tb.add(cf.createButton('underline',{title:'simple.underline_desc',cmd:'Underline'}));tb.add(cf.createButton('strikethrough',{title:'simple.striketrough_desc',cmd:'Strikethrough'}));tb.add(cf.createSeparator());tb.add(cf.createButton('undo',{title:'simple.undo_desc',cmd:'Undo'}));tb.add(cf.createButton('redo',{title:'simple.redo_desc',cmd:'Redo'}));tb.add(cf.createSeparator());tb.add(cf.createButton('cleanup',{title:'simple.cleanup_desc',cmd:'mceCleanup'}));tb.add(cf.createSeparator());tb.add(cf.createButton('insertunorderedlist',{title:'simple.bullist_desc',cmd:'InsertUnorderedList'}));tb.add(cf.createButton('insertorderedlist',{title:'simple.numlist_desc',cmd:'InsertOrderedList'}));tb.renderTo(n);return{iframeContainer:ic,editorContainer:ed.id+'_container',sizeContainer:sc,deltaHeight:-20};},getInfo:function(){return{longname:'Simple theme',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.ThemeManager.add('simple',tinymce.themes.SimpleTheme);})(); \ No newline at end of file +(function(){var a=tinymce.DOM;tinymce.ThemeManager.requireLangPack("simple");tinymce.create("tinymce.themes.SimpleTheme",{init:function(c,d){var e=this,b=["Bold","Italic","Underline","Strikethrough","InsertUnorderedList","InsertOrderedList"],f=c.settings;e.editor=c;c.contentCSS.push(d+"/skins/"+f.skin+"/content.css");c.onInit.add(function(){c.onNodeChange.add(function(h,g){tinymce.each(b,function(i){g.get(i.toLowerCase()).setActive(h.queryCommandState(i))})})});a.loadCSS((f.editor_css?c.documentBaseURI.toAbsolute(f.editor_css):"")||d+"/skins/"+f.skin+"/ui.css")},renderUI:function(h){var e=this,i=h.targetNode,b,c,d=e.editor,f=d.controlManager,g;i=a.insertAfter(a.create("span",{id:d.id+"_container","class":"mceEditor "+d.settings.skin+"SimpleSkin"}),i);i=g=a.add(i,"table",{cellPadding:0,cellSpacing:0,"class":"mceLayout"});i=c=a.add(i,"tbody");i=a.add(c,"tr");i=b=a.add(a.add(i,"td"),"div",{"class":"mceIframeContainer"});i=a.add(a.add(c,"tr",{"class":"last"}),"td",{"class":"mceToolbar mceLast",align:"center"});c=e.toolbar=f.createToolbar("tools1");c.add(f.createButton("bold",{title:"simple.bold_desc",cmd:"Bold"}));c.add(f.createButton("italic",{title:"simple.italic_desc",cmd:"Italic"}));c.add(f.createButton("underline",{title:"simple.underline_desc",cmd:"Underline"}));c.add(f.createButton("strikethrough",{title:"simple.striketrough_desc",cmd:"Strikethrough"}));c.add(f.createSeparator());c.add(f.createButton("undo",{title:"simple.undo_desc",cmd:"Undo"}));c.add(f.createButton("redo",{title:"simple.redo_desc",cmd:"Redo"}));c.add(f.createSeparator());c.add(f.createButton("cleanup",{title:"simple.cleanup_desc",cmd:"mceCleanup"}));c.add(f.createSeparator());c.add(f.createButton("insertunorderedlist",{title:"simple.bullist_desc",cmd:"InsertUnorderedList"}));c.add(f.createButton("insertorderedlist",{title:"simple.numlist_desc",cmd:"InsertOrderedList"}));c.renderTo(i);return{iframeContainer:b,editorContainer:d.id+"_container",sizeContainer:g,deltaHeight:-20}},getInfo:function(){return{longname:"Simple theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.ThemeManager.add("simple",tinymce.themes.SimpleTheme)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/themes/simple/editor_template_src.js b/include/javascript/tiny_mce/themes/simple/editor_template_src.js index fac4d895..35c19a6b 100644 --- a/include/javascript/tiny_mce/themes/simple/editor_template_src.js +++ b/include/javascript/tiny_mce/themes/simple/editor_template_src.js @@ -1,11 +1,11 @@ /** - + * editor_template_src.js * - * This file is meant to showcase how to create a simple theme. The advanced - * theme is more suitable for production use. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -19,6 +19,7 @@ var t = this, states = ['Bold', 'Italic', 'Underline', 'Strikethrough', 'InsertUnorderedList', 'InsertOrderedList'], s = ed.settings; t.editor = ed; + ed.contentCSS.push(url + "/skins/" + s.skin + "/content.css"); ed.onInit.add(function() { ed.onNodeChange.add(function(ed, cm) { @@ -26,8 +27,6 @@ cm.get(c.toLowerCase()).setActive(ed.queryCommandState(c)); }); }); - - ed.dom.loadCSS(url + "/skins/" + s.skin + "/content.css"); }); DOM.loadCSS((s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : '') || url + "/skins/" + s.skin + "/ui.css"); diff --git a/include/javascript/tiny_mce/tiny_mce.js b/include/javascript/tiny_mce/tiny_mce.js index d230fc9c..40342b99 100644 --- a/include/javascript/tiny_mce/tiny_mce.js +++ b/include/javascript/tiny_mce/tiny_mce.js @@ -1 +1 @@ -var tinymce={majorVersion:'3',minorVersion:'2.1.1',releaseDate:'2008-11-27',_init:function(){var t=this,d=document,w=window,na=navigator,ua=na.userAgent,i,nl,n,base,p,v;t.isOpera=w.opera&&opera.buildNumber;t.isWebKit=/WebKit/.test(ua);t.isOldWebKit=t.isWebKit&&!w.getSelection().getRangeAt;t.isIE=!t.isWebKit&&!t.isOpera&&(/MSIE/gi).test(ua)&&(/Explorer/gi).test(na.appName);t.isIE6=t.isIE&&/MSIE [56]/.test(ua);t.isGecko=!t.isWebKit&&/Gecko/.test(ua);t.isMac=ua.indexOf('Mac')!=-1;t.isAir=/adobeair/i.test(ua);if(w.tinyMCEPreInit){t.suffix=tinyMCEPreInit.suffix;t.baseURL=tinyMCEPreInit.base;t.query=tinyMCEPreInit.query;return;}t.suffix='';nl=d.getElementsByTagName('base');for(i=0;i=items.length){for(i=0,l=base.length;i=items.length||base[i]!=items[i]){bp=i+1;break;}}}if(base.length=base.length||base[i]!=items[i]){bp=i+1;break;}}}if(bp==1)return path;for(i=0,l=base.length-(bp-1);i=0;i--){if(path[i].length==0||path[i]==".")continue;if(path[i]=='..'){nb++;continue;}if(nb>0){nb--;continue;}o.push(path[i]);}i=base.length-nb;if(i<=0)return'/'+o.reverse().join('/');return'/'+base.slice(0,i).join('/')+'/'+o.reverse().join('/');},getURI:function(nh){var s,t=this;if(!t.source||nh){s='';if(!nh){if(t.protocol)s+=t.protocol+'://';if(t.userInfo)s+=t.userInfo+'@';if(t.host)s+=t.host;if(t.port)s+=':'+t.port;}if(t.path)s+=t.path;if(t.query)s+='?'+t.query;if(t.anchor)s+='#'+t.anchor;t.source=s;}return t.source;}});})();(function(){var each=tinymce.each;tinymce.create('static tinymce.util.Cookie',{getHash:function(n){var v=this.get(n),h;if(v){each(v.split('&'),function(v){v=v.split('=');h=h||{};h[unescape(v[0])]=unescape(v[1]);});}return h;},setHash:function(n,v,e,p,d,s){var o='';each(v,function(v,k){o+=(!o?'':'&')+escape(k)+'='+escape(v);});this.set(n,o,e,p,d,s);},get:function(n){var c=document.cookie,e,p=n+"=",b;if(!c)return;b=c.indexOf("; "+p);if(b==-1){b=c.indexOf(p);if(b!=0)return null;}else b+=2;e=c.indexOf(";",b);if(e==-1)e=c.length;return unescape(c.substring(b+p.length,e));},set:function(n,v,e,p,d,s){document.cookie=n+"="+escape(v)+((e)?"; expires="+e.toGMTString():"")+((p)?"; path="+escape(p):"")+((d)?"; domain="+d:"")+((s)?"; secure":"");},remove:function(n,p){var d=new Date();d.setTime(d.getTime()-1000);this.set(n,'',d,p,d);}});})();tinymce.create('static tinymce.util.JSON',{serialize:function(o){var i,v,s=tinymce.util.JSON.serialize,t;if(o==null)return'null';t=typeof o;if(t=='string'){v='\bb\tt\nn\ff\rr\""\'\'\\\\';return'"'+o.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(a,b){i=v.indexOf(b);if(i+1)return'\\'+v.charAt(i+1);a=b.charCodeAt().toString(16);return'\\u'+'0000'.substring(a.length)+a;})+'"';}if(t=='object'){if(o instanceof Array){for(i=0,v='[';i0?',':'')+s(o[i]);return v+']';}v='{';for(i in o)v+=typeof o[i]!='function'?(v.length>1?',"':'"')+i+'":'+s(o[i]):'';return v+'}';}return''+o;},parse:function(s){try{return eval('('+s+')');}catch(ex){}}});tinymce.create('static tinymce.util.XHR',{send:function(o){var x,t,w=window,c=0;o.scope=o.scope||this;o.success_scope=o.success_scope||o.scope;o.error_scope=o.error_scope||o.scope;o.async=o.async===false?false:true;o.data=o.data||'';function get(s){x=0;try{x=new ActiveXObject(s);}catch(ex){}return x;};x=w.XMLHttpRequest?new XMLHttpRequest():get('Microsoft.XMLHTTP')||get('Msxml2.XMLHTTP');if(x){if(x.overrideMimeType)x.overrideMimeType(o.content_type);x.open(o.type||(o.data?'POST':'GET'),o.url,o.async);if(o.content_type)x.setRequestHeader('Content-Type',o.content_type);x.send(o.data);function ready(){if(!o.async||x.readyState==4||c++>10000){if(o.success&&c<10000&&x.status==200)o.success.call(o.success_scope,''+x.responseText,x,o);else if(o.error)o.error.call(o.error_scope,c>10000?'TIMED_OUT':'GENERAL',x,o);x=null;}else w.setTimeout(ready,10);};if(!o.async)return ready();t=w.setTimeout(ready,10);}}});(function(){var extend=tinymce.extend,JSON=tinymce.util.JSON,XHR=tinymce.util.XHR;tinymce.create('tinymce.util.JSONRequest',{JSONRequest:function(s){this.settings=extend({},s);this.count=0;},send:function(o){var ecb=o.error,scb=o.success;o=extend(this.settings,o);o.success=function(c,x){c=JSON.parse(c);if(typeof(c)=='undefined'){c={error:'JSON Parse error.'};}if(c.error)ecb.call(o.error_scope||o.scope,c.error,x);else scb.call(o.success_scope||o.scope,c.result);};o.error=function(ty,x){ecb.call(o.error_scope||o.scope,ty,x);};o.data=JSON.serialize({id:o.id||'c'+(this.count++),method:o.method,params:o.params});o.content_type='application/json';XHR.send(o);},'static':{sendRPC:function(o){return new tinymce.util.JSONRequest().send(o);}}});}());(function(){var each=tinymce.each,is=tinymce.is;var isWebKit=tinymce.isWebKit,isIE=tinymce.isIE;tinymce.create('tinymce.dom.DOMUtils',{doc:null,root:null,files:null,listeners:{},pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,cache:{},idPattern:/^#[\w]+$/,elmPattern:/^[\w_*]+$/,elmClassPattern:/^([\w_]*)\.([\w_]+)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(d,s){var t=this;t.doc=d;t.win=window;t.files={};t.cssFlicker=false;t.counter=0;t.boxModel=!tinymce.isIE||d.compatMode=="CSS1Compat";t.stdMode=d.documentMode===8;this.settings=s=tinymce.extend({keep_values:false,hex_colors:1,process_html:1},s);if(tinymce.isIE6){try{d.execCommand('BackgroundImageCache',false,true);}catch(e){t.cssFlicker=true;}}tinymce.addUnload(t.destroy,t);},getRoot:function(){var t=this,s=t.settings;return(s&&t.get(s.root_element))||t.doc.body;},getViewPort:function(w){var d,b;w=!w?this.win:w;d=w.document;b=this.boxModel?d.documentElement:d.body;return{x:w.pageXOffset||b.scrollLeft,y:w.pageYOffset||b.scrollTop,w:w.innerWidth||b.clientWidth,h:w.innerHeight||b.clientHeight};},getRect:function(e){var p,t=this,sr;e=t.get(e);p=t.getPos(e);sr=t.getSize(e);return{x:p.x,y:p.y,w:sr.w,h:sr.h};},getSize:function(e){var t=this,w,h;e=t.get(e);w=t.getStyle(e,'width');h=t.getStyle(e,'height');if(w.indexOf('px')===-1)w=0;if(h.indexOf('px')===-1)h=0;return{w:parseInt(w)||e.offsetWidth||e.clientWidth,h:parseInt(h)||e.offsetHeight||e.clientHeight};},getParent:function(n,f,r){var na,se=this.settings;n=this.get(n);if(se.strict_root)r=r||this.getRoot();if(is(f,'string')){na=f.toUpperCase();f=function(n){var s=false;if(n.nodeType==1&&na==='*'){s=true;return false;}each(na.split(','),function(v){if(n.nodeType==1&&((se.strict&&n.nodeName.toUpperCase()==v)||n.nodeName.toUpperCase()==v)){s=true;return false;}});return s;};}while(n){if(n==r)return null;if(f(n))return n;n=n.parentNode;}return null;},get:function(e){var n;if(e&&this.doc&&typeof(e)=='string'){n=e;e=this.doc.getElementById(e);if(e&&e.id!==n)return this.doc.getElementsByName(n)[1];}return e;},select:function(pa,s){var t=this,cs,c,pl,o=[],x,i,l,n,xp;s=t.get(s)||t.doc;if(s.querySelectorAll){if(s!=t.doc){i=s.id;s.id='_mc_tmp';pa='#_mc_tmp '+pa;}l=tinymce.grep(s.querySelectorAll(pa));s.id=i;return l;}if(!t.selectorRe)t.selectorRe=/^([\w\\*]+)?(?:#([\w\\]+))?(?:\.([\w\\\.]+))?(?:\[\@([\w\\]+)([\^\$\*!]?=)([\w\\]+)\])?(?:\:([\w\\]+))?/i;;if(tinymce.isAir){each(tinymce.explode(pa),function(v){if(!(xp=t.cache[v])){xp='';each(v.split(' '),function(v){v=t.selectorRe.exec(v);xp+=v[1]?'//'+v[1]:'//*';if(v[2])xp+="[@id='"+v[2]+"']";if(v[3]){each(v[3].split('.'),function(n){xp+="[@class = '"+n+"' or contains(concat(' ', @class, ' '), ' "+n+" ')]";});}});t.cache[v]=xp;}xp=t.doc.evaluate(xp,s,null,4,null);while(n=xp.iterateNext())o.push(n);});return o;}if(t.settings.strict){function get(s,n){return s.getElementsByTagName(n.toLowerCase());};}else{function get(s,n){return s.getElementsByTagName(n);};}if(t.elmPattern.test(pa)){x=get(s,pa);for(i=0,l=x.length;i=0;i--)cs+='}, '+(i?'n':'s')+');';cs+='})';t.cache[pa]=cs=eval(cs);}cs(isIE?collectIE:collect,s);});each(o,function(n){if(isIE)n.removeAttribute('mce_save');else delete n.mce_save;});return o;},add:function(p,n,a,h,c){var t=this;return this.run(p,function(p){var e,k;e=is(n,'string')?t.doc.createElement(n):n;t.setAttribs(e,a);if(h){if(h.nodeType)e.appendChild(h);else t.setHTML(e,h);}return!c?p.appendChild(e):e;});},create:function(n,a,h){return this.add(this.doc.createElement(n),n,a,h,1);},createHTML:function(n,a,h){var o='',t=this,k;o+='<'+n;for(k in a){if(a.hasOwnProperty(k))o+=' '+k+'="'+t.encode(a[k])+'"';}if(tinymce.is(h))return o+'>'+h+'';return o+' />';},remove:function(n,k){return this.run(n,function(n){var p,g;p=n.parentNode;if(!p)return null;if(k){each(n.childNodes,function(c){p.insertBefore(c.cloneNode(true),n);});}return p.removeChild(n);});},setStyle:function(n,na,v){var t=this;return t.run(n,function(e){var s,i;s=e.style;na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase();});if(t.pixelStyles.test(na)&&(tinymce.is(v,'number')||/^[\-0-9\.]+$/.test(v)))v+='px';switch(na){case'opacity':if(isIE){s.filter=v===''?'':"alpha(opacity="+(v*100)+")";if(!n.currentStyle||!n.currentStyle.hasLayout)s.display='inline-block';}s[na]=s['-moz-opacity']=s['-khtml-opacity']=v||'';break;case'float':isIE?s.styleFloat=v:s.cssFloat=v;break;default:s[na]=v||'';}if(t.settings.update_styles)t.setAttrib(e,'mce_style');});},getStyle:function(n,na,c){n=this.get(n);if(!n)return false;if(this.doc.defaultView&&c){na=na.replace(/[A-Z]/g,function(a){return'-'+a;});try{return this.doc.defaultView.getComputedStyle(n,null).getPropertyValue(na);}catch(ex){return null;}}na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase();});if(na=='float')na=isIE?'styleFloat':'cssFloat';if(n.currentStyle&&c)return n.currentStyle[na];return n.style[na];},setStyles:function(e,o){var t=this,s=t.settings,ol;ol=s.update_styles;s.update_styles=0;each(o,function(v,n){t.setStyle(e,n,v);});s.update_styles=ol;if(s.update_styles)t.setAttrib(e,s.cssText);},setAttrib:function(e,n,v){var t=this;if(!e||!n)return;if(t.settings.strict)n=n.toLowerCase();return this.run(e,function(e){var s=t.settings;switch(n){case"style":if(!is(v,'string')){each(v,function(v,n){t.setStyle(e,n,v);});return;}if(s.keep_values){if(v&&!t._isRes(v))e.setAttribute('mce_style',v,2);else e.removeAttribute('mce_style',2);}e.style.cssText=v;break;case"class":e.className=v||'';break;case"src":case"href":if(s.keep_values){if(s.url_converter)v=s.url_converter.call(s.url_converter_scope||t,v,n,e);t.setAttrib(e,'mce_'+n,v,2);}break;case"shape":e.setAttribute('mce_style',v);break;}if(is(v)&&v!==null&&v.length!==0)e.setAttribute(n,''+v,2);else e.removeAttribute(n,2);});},setAttribs:function(e,o){var t=this;return this.run(e,function(e){each(o,function(v,n){t.setAttrib(e,n,v);});});},getAttrib:function(e,n,dv){var v,t=this;e=t.get(e);if(!e||e.nodeType!==1)return false;if(!is(dv))dv='';if(/^(src|href|style|coords|shape)$/.test(n)){v=e.getAttribute("mce_"+n);if(v)return v;}if(isIE&&t.props[n]){v=e[t.props[n]];v=v&&v.nodeValue?v.nodeValue:v;}if(!v)v=e.getAttribute(n,2);if(n==='style'){v=v||e.style.cssText;if(v){v=t.serializeStyle(t.parseStyle(v));if(t.settings.keep_values&&!t._isRes(v))e.setAttribute('mce_style',v);}}if(isWebKit&&n==="class"&&v)v=v.replace(/(apple|webkit)\-[a-z\-]+/gi,'');if(isIE){switch(n){case'rowspan':case'colspan':if(v===1)v='';break;case'size':if(v==='+0'||v===20)v='';break;case'width':case'height':case'vspace':case'checked':case'disabled':case'readonly':if(v===0)v='';break;case'hspace':if(v===-1)v='';break;case'maxlength':case'tabindex':if(v===32768||v===2147483647||v==='32768')v='';break;case'compact':case'noshade':case'nowrap':if(v===65535)return n;return dv;case'shape':v=v.toLowerCase();break;default:if(n.indexOf('on')===0&&v)v=(''+v).replace(/^function\s+anonymous\(\)\s+\{\s+(.*)\s+\}$/,'$1');}}return(v!==undefined&&v!==null&&v!=='')?''+v:dv;},getPos:function(n){var t=this,x=0,y=0,e,d=t.doc,r;n=t.get(n);if(n&&isIE){n=n.getBoundingClientRect();e=t.boxModel?d.documentElement:d.body;x=t.getStyle(t.select('html')[0],'borderWidth');x=(x=='medium'||t.boxModel&&!t.isIE6)&&2||x;n.top+=t.win.self!=t.win.top?2:0;return{x:n.left+e.scrollLeft-x,y:n.top+e.scrollTop-x};}r=n;while(r){x+=r.offsetLeft||0;y+=r.offsetTop||0;r=r.offsetParent;}r=n;while(r){if(!/^table-row|inline.*/i.test(t.getStyle(r,"display",1))){x-=r.scrollLeft||0;y-=r.scrollTop||0;}r=r.parentNode;if(r==d.body)break;}return{x:x,y:y};},parseStyle:function(st){var t=this,s=t.settings,o={};if(!st)return o;function compress(p,s,ot){var t,r,b,l;t=o[p+'-top'+s];if(!t)return;r=o[p+'-right'+s];if(t!=r)return;b=o[p+'-bottom'+s];if(r!=b)return;l=o[p+'-left'+s];if(b!=l)return;o[ot]=l;delete o[p+'-top'+s];delete o[p+'-right'+s];delete o[p+'-bottom'+s];delete o[p+'-left'+s];};function compress2(ta,a,b,c){var t;t=o[a];if(!t)return;t=o[b];if(!t)return;t=o[c];if(!t)return;o[ta]=o[a]+' '+o[b]+' '+o[c];delete o[a];delete o[b];delete o[c];};st=st.replace(/&(#?[a-z0-9]+);/g,'&$1_MCE_SEMI_');each(st.split(';'),function(v){var sv,ur=[];if(v){v=v.replace(/_MCE_SEMI_/g,';');v=v.replace(/url\([^\)]+\)/g,function(v){ur.push(v);return'url('+ur.length+')';});v=v.split(':');sv=tinymce.trim(v[1]);sv=sv.replace(/url\(([^\)]+)\)/g,function(a,b){return ur[parseInt(b)-1];});sv=sv.replace(/rgb\([^\)]+\)/g,function(v){return t.toHex(v);});if(s.url_converter){sv=sv.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(x,c){return'url('+s.url_converter.call(s.url_converter_scope||t,t.decode(c),'style',null)+')';});}o[tinymce.trim(v[0]).toLowerCase()]=sv;}});compress("border","","border");compress("border","-width","border-width");compress("border","-color","border-color");compress("border","-style","border-style");compress("padding","","padding");compress("margin","","margin");compress2('border','border-width','border-style','border-color');if(isIE){if(o.border=='medium none')o.border='';}return o;},serializeStyle:function(o){var s='';each(o,function(v,k){if(k&&v){if(tinymce.isGecko&&k.indexOf('-moz-')===0)return;switch(k){case'color':case'background-color':v=v.toLowerCase();break;}s+=(s?' ':'')+k+': '+v+';';}});return s;},loadCSS:function(u){var t=this,d=t.doc;if(!u)u='';each(u.split(','),function(u){if(t.files[u])return;t.files[u]=true;t.add(t.select('head')[0],'link',{rel:'stylesheet',href:tinymce._addVer(u)});});},addClass:function(e,c){return this.run(e,function(e){var o;if(!c)return 0;if(this.hasClass(e,c))return e.className;o=this.removeClass(e,c);return e.className=(o!=''?(o+' '):'')+c;});},removeClass:function(e,c){var t=this,re;return t.run(e,function(e){var v;if(t.hasClass(e,c)){if(!re)re=new RegExp("(^|\\s+)"+c+"(\\s+|$)","g");v=e.className.replace(re,' ');return e.className=tinymce.trim(v!=' '?v:'');}return e.className;});},hasClass:function(n,c){n=this.get(n);if(!n||!c)return false;return(' '+n.className+' ').indexOf(' '+c+' ')!==-1;},show:function(e){return this.setStyle(e,'display','block');},hide:function(e){return this.setStyle(e,'display','none');},isHidden:function(e){e=this.get(e);return!e||e.style.display=='none'||this.getStyle(e,'display')=='none';},uniqueId:function(p){return(!p?'mce_':p)+(this.counter++);},setHTML:function(e,h){var t=this;return this.run(e,function(e){var x,i,nl,n,p,x;h=t.processHTML(h);if(isIE){function set(){try{e.innerHTML='
    '+h;e.removeChild(e.firstChild);}catch(ex){while(e.firstChild)e.firstChild.removeNode();x=t.create('div');x.innerHTML='
    '+h;each(x.childNodes,function(n,i){if(i)e.appendChild(n);});}};if(t.settings.fix_ie_paragraphs)h=h.replace(/

    <\/p>|]+)><\/p>|/gi,' 

    ');set();if(t.settings.fix_ie_paragraphs){nl=e.getElementsByTagName("p");for(i=nl.length-1,x=0;i>=0;i--){n=nl[i];if(!n.hasChildNodes()){if(!n.mce_keep){x=1;break;}n.removeAttribute('mce_keep');}}}if(x){h=h.replace(/

    ]+)>|

    /g,'

    ');h=h.replace(/<\/p>/g,'
    ');set();if(t.settings.fix_ie_paragraphs){nl=e.getElementsByTagName("DIV");for(i=nl.length-1;i>=0;i--){n=nl[i];if(n.mce_tmp){p=t.doc.createElement('p');n.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(a,b){var v;if(b!=='mce_tmp'){v=n.getAttribute(b);if(!v&&b==='class')v=n.className;p.setAttribute(b,v);}});for(x=0;x|]+)>/gi,'<$1b$2>');h=h.replace(/<(\/?)em>|]+)>/gi,'<$1i$2>');}else if(isIE){h=h.replace(/'/g,''');h=h.replace(/\s+(disabled|checked|readonly|selected)\s*=\s*[\"\']?(false|0)[\"\']?/gi,'');}h=h.replace(/]+)\/>|/gi,'');if(s.keep_values){if(/)/g,'\n');s=s.replace(/^[\r\n]*|[\r\n]*$/g,'');s=s.replace(/^\s*(\/\/\s*|\]\]>|-->|\]\]-->)\s*$/g,'');return s;};h=h.replace(/]+|)>([\s\S]*?)<\/script>/g,function(v,a,b){b=trim(b);if(!a)a=' type="text/javascript"';if(b)b='';return''+b+'';});h=h.replace(/]+|)>([\s\S]*?)<\/style>/g,function(v,a,b){b=trim(b);return''+b+'';});}h=h.replace(//g,'');h=h.replace(/<([\w:]+) [^>]*(src|href|style|shape|coords)[^>]*>/gi,function(a,n){function handle(m,b,c){var u=c;if(a.indexOf('mce_'+b)!=-1)return m;if(b=='style'){if(t._isRes(c))return m;if(s.hex_colors){u=u.replace(/rgb\([^\)]+\)/g,function(v){return t.toHex(v);});}if(s.url_converter){u=u.replace(/url\([\'\"]?([^\)\'\"]+)\)/g,function(x,c){return'url('+t.encode(s.url_converter.call(s.url_converter_scope||t,t.decode(c),b,n))+')';});}}else if(b!='coords'&&b!='shape'){if(s.url_converter)u=t.encode(s.url_converter.call(s.url_converter_scope||t,t.decode(c),b,n));}return' '+b+'="'+c+'" mce_'+b+'="'+u+'"';};a=a.replace(/ (src|href|style|coords|shape)=[\"]([^\"]+)[\"]/gi,handle);a=a.replace(/ (src|href|style|coords|shape)=[\']([^\']+)[\']/gi,handle);return a.replace(/ (src|href|style|coords|shape)=([^\s\"\'>]+)/gi,handle);});}return h;},getOuterHTML:function(e){var d;e=this.get(e);if(!e)return null;if(isIE)return e.outerHTML;d=(e.ownerDocument||this.doc).createElement("body");d.appendChild(e.cloneNode(true));return d.innerHTML;},setOuterHTML:function(e,h,d){var t=this;return this.run(e,function(e){var n,tp;e=t.get(e);d=d||e.ownerDocument||t.doc;if(isIE&&e.nodeType==1)e.outerHTML=h;else{tp=d.createElement("body");tp.innerHTML=h;n=tp.lastChild;while(n){t.insertAfter(n.cloneNode(true),e);n=n.previousSibling;}t.remove(e);}});},decode:function(s){var e,n,v;if(/&[^;]+;/.test(s)){e=this.doc.createElement("div");e.innerHTML=s;n=e.firstChild;v='';if(n){do{v+=n.nodeValue;}while(n.nextSibling);}return v||s;}return s;},encode:function(s){return s?(''+s).replace(/[<>&\"]/g,function(c,b){switch(c){case'&':return'&';case'"':return'"';case'<':return'<';case'>':return'>';}return c;}):s;},insertAfter:function(n,r){var t=this;r=t.get(r);return this.run(n,function(n){var p,ns;p=r.parentNode;ns=r.nextSibling;if(ns)p.insertBefore(n,ns);else p.appendChild(n);return n;});},isBlock:function(n){if(n.nodeType&&n.nodeType!==1)return false;n=n.nodeName||n;return/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(n);},replace:function(n,o,k){if(is(o,'array'))n=n.cloneNode(true);return this.run(o,function(o){if(k){each(o.childNodes,function(c){n.appendChild(c.cloneNode(true));});}return o.parentNode.replaceChild(n,o);});},toHex:function(s){var c=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(s);function hex(s){s=parseInt(s).toString(16);return s.length>1?s:'0'+s;};if(c){s='#'+hex(c[1])+hex(c[2])+hex(c[3]);return s;}return s;},getClasses:function(){var t=this,cl=[],i,lo={},f=t.settings.class_filter,ov;if(t.classes)return t.classes;function addClasses(s){each(s.imports,function(r){addClasses(r);});each(s.cssRules||s.rules,function(r){switch(r.type||1){case 1:if(r.selectorText){each(r.selectorText.split(','),function(v){v=v.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(v)||!/\.[\w\-]+$/.test(v))return;ov=v;v=v.replace(/.*\.([a-z0-9_\-]+).*/i,'$1');if(f&&!(v=f(v,ov)))return;if(!lo[v]){cl.push({'class':v});lo[v]=1;}});}break;case 3:addClasses(r.styleSheet);break;}});};try{each(t.doc.styleSheets,addClasses);}catch(ex){}if(cl.length>0)t.classes=cl;return cl;},run:function(e,f,s){var t=this,o;if(t.doc&&typeof(e)==='string')e=t.get(e);if(!e)return false;s=s||this;if(!e.nodeType&&(e.length||e.length===0)){o=[];each(e,function(e,i){if(e){if(typeof(e)=='string')e=t.doc.getElementById(e);o.push(f.call(s,e,i));}});return o;}return f.call(s,e);},getAttribs:function(n){var o;n=this.get(n);if(!n)return[];if(isIE){o=[];if(n.nodeName=='OBJECT')return n.attributes;n.cloneNode(false).outerHTML.replace(/([a-z0-9\:\-_]+)=/gi,function(a,b){o.push({specified:1,nodeName:b});});return o;}return n.attributes;},destroy:function(s){var t=this;t.win=t.doc=t.root=null;if(!s)tinymce.removeUnload(t.destroy);},_isRes:function(c){return/^(top|left|bottom|right|width|height)/i.test(c)||/;\s*(top|left|bottom|right|width|height)/i.test(c);}});tinymce.DOM=new tinymce.dom.DOMUtils(document,{process_html:0});})();(function(){var each=tinymce.each,DOM=tinymce.DOM,isIE=tinymce.isIE,isWebKit=tinymce.isWebKit,Event;tinymce.create('static tinymce.dom.Event',{inits:[],events:[],add:function(o,n,f,s){var cb,t=this,el=t.events,r;if(o&&o instanceof Array){r=[];each(o,function(o){o=DOM.get(o);r.push(t.add(o,n,f,s));});return r;}o=DOM.get(o);if(!o)return;cb=function(e){e=e||window.event;if(e&&!e.target&&isIE)e.target=e.srcElement;if(!s)return f(e);return f.call(s,e);};if(n=='unload'){tinymce.unloads.unshift({func:cb});return cb;}if(n=='init'){if(t.domLoaded)cb();else t.inits.push(cb);return cb;}el.push({obj:o,name:n,func:f,cfunc:cb,scope:s});t._add(o,n,cb);return f;},remove:function(o,n,f){var t=this,a=t.events,s=false,r;if(o&&o instanceof Array){r=[];each(o,function(o){o=DOM.get(o);r.push(t.remove(o,n,f));});return r;}o=DOM.get(o);each(a,function(e,i){if(e.obj==o&&e.name==n&&(!f||(e.func==f||e.cfunc==f))){a.splice(i,1);t._remove(o,n,e.cfunc);s=true;return false;}});return s;},clear:function(o){var t=this,a=t.events,i,e;if(o){o=DOM.get(o);for(i=a.length-1;i>=0;i--){e=a[i];if(e.obj===o){t._remove(e.obj,e.name,e.cfunc);e.obj=e.cfunc=null;a.splice(i,1);}}}},cancel:function(e){if(!e)return false;this.stop(e);return this.prevent(e);},stop:function(e){if(e.stopPropagation)e.stopPropagation();else e.cancelBubble=true;return false;},prevent:function(e){if(e.preventDefault)e.preventDefault();else e.returnValue=false;return false;},_unload:function(){var t=Event;each(t.events,function(e,i){t._remove(e.obj,e.name,e.cfunc);e.obj=e.cfunc=null;});t.events=[];t=null;},_add:function(o,n,f){if(o.attachEvent)o.attachEvent('on'+n,f);else if(o.addEventListener)o.addEventListener(n,f,false);else o['on'+n]=f;},_remove:function(o,n,f){if(o){try{if(o.detachEvent)o.detachEvent('on'+n,f);else if(o.removeEventListener)o.removeEventListener(n,f,false);else o['on'+n]=null;}catch(ex){}}},_pageInit:function(){var e=Event;if(e.domLoaded)return;e._remove(window,'DOMContentLoaded',e._pageInit);e.domLoaded=true;each(e.inits,function(c){c();});e.inits=[];},_wait:function(){var t;if(window.tinyMCE_GZ&&tinyMCE_GZ.loaded){Event.domLoaded=1;return;}var skipInitPhase = (typeof (skipTinyMCEInitPhase) != 'undefined') ? true : false;if(isIE&&document.location.protocol!='https:'&& !skipInitPhase){document.write('';bi=s.body_id||'tinymce';if(bi.indexOf('=')!=-1){bi=t.getParam('body_id','','hash');bi=bi[t.id]||bi;}bc=s.body_class||'';if(bc.indexOf('=')!=-1){bc=t.getParam('body_class','','hash');bc=bc[t.id]||'';}t.iframeHTML+='';if(tinymce.relaxedDomain){if(isIE||(tinymce.isOpera&&parseFloat(opera.version())>=9.5))u='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()';else if(tinymce.isOpera)u='javascript:(function(){document.open();document.domain="'+document.domain+'";document.close();ed.setupIframe();})()';}n=DOM.add(o.iframeContainer,'iframe',{id:t.id+"_ifr",src:u||'javascript:""',frameBorder:'0',style:{width:'100%',height:h}});t.contentAreaContainer=o.iframeContainer;DOM.get(o.editorContainer).style.display=t.orgDisplay;DOM.get(t.id).style.display='none';if(tinymce.isOldWebKit){Event.add(n,'load',t.setupIframe,t);n.src=tinymce.baseURL+'/plugins/safari/blank.htm';}else{if(!isIE||!tinymce.relaxedDomain)t.setupIframe();e=n=o=null;}},setupIframe:function(){var t=this,s=t.settings,e=DOM.get(t.id),d=t.getDoc(),h,b;if(!isIE||!tinymce.relaxedDomain){d.open();d.write(t.iframeHTML);d.close();}if(!isIE){try{if(!s.readonly)d.designMode='On';}catch(ex){}}if(isIE){b=t.getBody();DOM.hide(b);if(!s.readonly)b.contentEditable=true;DOM.show(b);}t.dom=new tinymce.DOM.DOMUtils(t.getDoc(),{keep_values:true,url_converter:t.convertURL,url_converter_scope:t,hex_colors:s.force_hex_style_colors,class_filter:s.class_filter,update_styles:1,fix_ie_paragraphs:1});t.serializer=new tinymce.dom.Serializer({entity_encoding:s.entity_encoding,entities:s.entities,valid_elements:s.verify_html===false?'*[*]':s.valid_elements,extended_valid_elements:s.extended_valid_elements,valid_child_elements:s.valid_child_elements,invalid_elements:s.invalid_elements,fix_table_elements:s.fix_table_elements,fix_list_elements:s.fix_list_elements,fix_content_duplication:s.fix_content_duplication,convert_fonts_to_spans:s.convert_fonts_to_spans,font_size_classes:s.font_size_classes,font_size_style_values:s.font_size_style_values,apply_source_formatting:s.apply_source_formatting,remove_linebreaks:s.remove_linebreaks,element_format:s.element_format,dom:t.dom});t.selection=new tinymce.dom.Selection(t.dom,t.getWin(),t.serializer);t.forceBlocks=new tinymce.ForceBlocks(t,{forced_root_block:s.forced_root_block});t.editorCommands=new tinymce.EditorCommands(t);t.serializer.onPreProcess.add(function(se,o){return t.onPreProcess.dispatch(t,o,se);});t.serializer.onPostProcess.add(function(se,o){return t.onPostProcess.dispatch(t,o,se);});t.onPreInit.dispatch(t);if(!s.gecko_spellcheck)t.getBody().spellcheck=0;if(!s.readonly)t._addEvents();t.controlManager.onPostRender.dispatch(t,t.controlManager);t.onPostRender.dispatch(t);if(s.directionality)t.getBody().dir=s.directionality;if(s.nowrap)t.getBody().style.whiteSpace="nowrap";if(s.auto_resize)t.onNodeChange.add(t.resizeToContent,t);if(s.custom_elements){function handleCustom(ed,o){each(explode(s.custom_elements),function(v){var n;if(v.indexOf('~')===0){v=v.substring(1);n='span';}else n='div';o.content=o.content.replace(new RegExp('<('+v+')([^>]*)>','g'),'<'+n+' mce_name="$1"$2>');o.content=o.content.replace(new RegExp('','g'),'');});};t.onBeforeSetContent.add(handleCustom);t.onPostProcess.add(function(ed,o){if(o.set)handleCustom(ed,o)});}if(s.handle_node_change_callback){t.onNodeChange.add(function(ed,cm,n){t.execCallback('handle_node_change_callback',t.id,n,-1,-1,true,t.selection.isCollapsed());});}if(s.save_callback){t.onSaveContent.add(function(ed,o){var h=t.execCallback('save_callback',t.id,o.content,t.getBody());if(h)o.content=h;});}if(s.onchange_callback){t.onChange.add(function(ed,l){t.execCallback('onchange_callback',t,l);});}if(s.convert_newlines_to_brs){t.onBeforeSetContent.add(function(ed,o){if(o.initial)o.content=o.content.replace(/\r?\n/g,'
    ');});}if(s.fix_nesting&&isIE){t.onBeforeSetContent.add(function(ed,o){o.content=t._fixNesting(o.content);});}if(s.preformatted){t.onPostProcess.add(function(ed,o){o.content=o.content.replace(/^\s*/,'');o.content=o.content.replace(/<\/pre>\s*$/,'');if(o.set)o.content='
    '+o.content+'
    ';});}if(s.verify_css_classes){t.serializer.attribValueFilter=function(n,v){var s,cl;if(n=='class'){if(!t.classesRE){cl=t.dom.getClasses();if(cl.length>0){s='';each(cl,function(o){s+=(s?'|':'')+o['class'];});t.classesRE=new RegExp('('+s+')','gi');}}return!t.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(v)||t.classesRE.test(v)?v:'';}return v;};}if(s.convert_fonts_to_spans)t._convertFonts();if(s.inline_styles)t._convertInlineElements();if(s.cleanup_callback){t.onBeforeSetContent.add(function(ed,o){o.content=t.execCallback('cleanup_callback','insert_to_editor',o.content,o);});t.onPreProcess.add(function(ed,o){if(o.set)t.execCallback('cleanup_callback','insert_to_editor_dom',o.node,o);if(o.get)t.execCallback('cleanup_callback','get_from_editor_dom',o.node,o);});t.onPostProcess.add(function(ed,o){if(o.set)o.content=t.execCallback('cleanup_callback','insert_to_editor',o.content,o);if(o.get)o.content=t.execCallback('cleanup_callback','get_from_editor',o.content,o);});}if(s.save_callback){t.onGetContent.add(function(ed,o){if(o.save)o.content=t.execCallback('save_callback',t.id,o.content,t.getBody());});}if(s.handle_event_callback){t.onEvent.add(function(ed,e,o){if(t.execCallback('handle_event_callback',e,ed,o)===false)Event.cancel(e);});}t.onSetContent.add(function(){t.addVisual(t.getBody());});if(s.padd_empty_editor){t.onPostProcess.add(function(ed,o){o.content=o.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
    [\r\n]*)$/,'');});}if(isGecko&&!s.readonly){try{d.designMode='Off';d.designMode='On';}catch(ex){}}setTimeout(function(){if(t.removed)return;t.load({initial:true,format:(s.cleanup_on_startup?'html':'raw')});t.startContent=t.getContent({format:'raw'});t.undoManager.add({initial:true});t.initialized=true;t.onInit.dispatch(t);t.execCallback('setupcontent_callback',t.id,t.getBody(),t.getDoc());t.execCallback('init_instance_callback',t);t.focus(true);t.nodeChanged({initial:1});if(s.content_css){tinymce.each(explode(s.content_css),function(u){t.dom.loadCSS(t.documentBaseURI.toAbsolute(u));});}if(s.auto_focus){setTimeout(function(){var ed=EditorManager.get(s.auto_focus);ed.selection.select(ed.getBody(),1);ed.selection.collapse(1);ed.getWin().focus();},100);}},1);e=null;},focus:function(sf){var oed,t=this,ce=t.settings.content_editable;if(!sf){if(!ce&&(!isIE||t.selection.getNode().ownerDocument!=t.getDoc()))t.getWin().focus();}if(EditorManager.activeEditor!=t){if((oed=EditorManager.activeEditor)!=null)oed.onDeactivate.dispatch(oed,t);t.onActivate.dispatch(t,oed);}EditorManager._setActive(t);},execCallback:function(n){var t=this,f=t.settings[n],s;if(!f)return;if(t.callbackLookup&&(s=t.callbackLookup[n])){f=s.func;s=s.scope;}if(is(f,'string')){s=f.replace(/\.\w+$/,'');s=s?tinymce.resolve(s):0;f=tinymce.resolve(f);t.callbackLookup=t.callbackLookup||{};t.callbackLookup[n]={func:f,scope:s};}return f.apply(s||t,Array.prototype.slice.call(arguments,1));},translate:function(s){var c=this.settings.language||'en',i18n=EditorManager.i18n;if(!s)return'';return i18n[c+'.'+s]||s.replace(/{\#([^}]+)\}/g,function(a,b){return i18n[c+'.'+b]||'{#'+b+'}';});},getLang:function(n,dv){return EditorManager.i18n[(this.settings.language||'en')+'.'+n]||(is(dv)?dv:'{#'+n+'}');},getParam:function(n,dv,ty){var tr=tinymce.trim,v=is(this.settings[n])?this.settings[n]:dv,o;if(ty==='hash'){o={};if(is(v,'string')){each(v.indexOf('=')>0?v.split(/[;,](?![^=;,]*(?:[;,]|$))/):v.split(','),function(v){v=v.split('=');if(v.length>1)o[tr(v[0])]=tr(v[1]);else o[tr(v[0])]=tr(v);});}else o=v;return o;}return v;},nodeChanged:function(o){var t=this,s=t.selection,n=s.getNode()||t.getBody();if(t.initialized){t.onNodeChange.dispatch(t,o?o.controlManager||t.controlManager:t.controlManager,isIE&&n.ownerDocument!=t.getDoc()?t.getBody():n,s.isCollapsed(),o);}},addButton:function(n,s){var t=this;t.buttons=t.buttons||{};t.buttons[n]=s;},addCommand:function(n,f,s){this.execCommands[n]={func:f,scope:s||this};},addQueryStateHandler:function(n,f,s){this.queryStateCommands[n]={func:f,scope:s||this};},addQueryValueHandler:function(n,f,s){this.queryValueCommands[n]={func:f,scope:s||this};},addShortcut:function(pa,desc,cmd_func,sc){var t=this,c;if(!t.settings.custom_shortcuts)return false;t.shortcuts=t.shortcuts||{};if(is(cmd_func,'string')){c=cmd_func;cmd_func=function(){t.execCommand(c,false,null);};}if(is(cmd_func,'object')){c=cmd_func;cmd_func=function(){t.execCommand(c[0],c[1],c[2]);};}each(explode(pa),function(pa){var o={func:cmd_func,scope:sc||this,desc:desc,alt:false,ctrl:false,shift:false};each(explode(pa,'+'),function(v){switch(v){case'alt':case'ctrl':case'shift':o[v]=true;break;default:o.charCode=v.charCodeAt(0);o.keyCode=v.toUpperCase().charCodeAt(0);}});t.shortcuts[(o.ctrl?'ctrl':'')+','+(o.alt?'alt':'')+','+(o.shift?'shift':'')+','+o.keyCode]=o;});return true;},execCommand:function(cmd,ui,val,a){var t=this,s=0,o,st;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(cmd)&&(!a||!a.skip_focus))t.focus();o={};t.onBeforeExecCommand.dispatch(t,cmd,ui,val,o);if(o.terminate)return false;if(t.execCallback('execcommand_callback',t.id,t.selection.getNode(),cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}if(o=t.execCommands[cmd]){st=o.func.call(o.scope,ui,val);if(st!==true){t.onExecCommand.dispatch(t,cmd,ui,val,a);return st;}}each(t.plugins,function(p){if(p.execCommand&&p.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);s=1;return false;}});if(s)return true;if(t.theme.execCommand&&t.theme.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}if(t.editorCommands.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}t.getDoc().execCommand(cmd,ui,val);t.onExecCommand.dispatch(t,cmd,ui,val,a);},queryCommandState:function(c){var t=this,o,s;if(t._isHidden())return;if(o=t.queryStateCommands[c]){s=o.func.call(o.scope);if(s!==true)return s;}o=t.editorCommands.queryCommandState(c);if(o!==-1)return o;try{return this.getDoc().queryCommandState(c);}catch(ex){}},queryCommandValue:function(c){var t=this,o,s;if(t._isHidden())return;if(o=t.queryValueCommands[c]){s=o.func.call(o.scope);if(s!==true)return s;}o=t.editorCommands.queryCommandValue(c);if(is(o))return o;try{return this.getDoc().queryCommandValue(c);}catch(ex){}},show:function(){var t=this;DOM.show(t.getContainer());DOM.hide(t.id);t.load();},hide:function(){var t=this,d=t.getDoc();if(isIE&&d)d.execCommand('SelectAll');t.save();DOM.hide(t.getContainer());DOM.setStyle(t.id,'display',t.orgDisplay);},isHidden:function(){return!DOM.isHidden(this.id);},setProgressState:function(b,ti,o){this.onSetProgressState.dispatch(this,b,ti,o);return b;},resizeToContent:function(){var t=this;DOM.setStyle(t.id+"_ifr",'height',t.getBody().scrollHeight);},load:function(o){var t=this,e=t.getElement(),h;if(e){o=o||{};o.load=true;h=t.setContent(is(e.value)?e.value:e.innerHTML,o);o.element=e;if(!o.no_events)t.onLoadContent.dispatch(t,o);o.element=e=null;return h;}},save:function(o){var t=this,e=t.getElement(),h,f;if(!e||!t.initialized)return;o=o||{};o.save=true;if(!o.no_events){t.undoManager.typing=0;t.undoManager.add();}o.element=e;h=o.content=t.getContent(o);if(!o.no_events)t.onSaveContent.dispatch(t,o);h=o.content;if(!/TEXTAREA|INPUT/i.test(e.nodeName)){e.innerHTML=h;if(f=DOM.getParent(t.id,'form')){each(f.elements,function(e){if(e.name==t.id){e.value=h;return false;}});}}else e.value=h;o.element=e=null;return h;},setContent:function(h,o){var t=this;o=o||{};o.format=o.format||'html';o.set=true;o.content=h;if(!o.no_events)t.onBeforeSetContent.dispatch(t,o);if(!tinymce.isIE&&(h.length===0||/^\s+$/.test(h))){o.content=t.dom.setHTML(t.getBody(),'
    ');o.format='raw';}o.content=t.dom.setHTML(t.getBody(),tinymce.trim(o.content));if(o.format!='raw'&&t.settings.cleanup){o.getInner=true;o.content=t.dom.setHTML(t.getBody(),t.serializer.serialize(t.getBody(),o));}if(!o.no_events)t.onSetContent.dispatch(t,o);return o.content;},getContent:function(o){var t=this,h;o=o||{};o.format=o.format||'html';o.get=true;if(!o.no_events)t.onBeforeGetContent.dispatch(t,o);if(o.format!='raw'&&t.settings.cleanup){o.getInner=true;h=t.serializer.serialize(t.getBody(),o);}else h=t.getBody().innerHTML;h=h.replace(/^\s*|\s*$/g,'');o.content=h;if(!o.no_events)t.onGetContent.dispatch(t,o);return o.content;},isDirty:function(){var t=this;return tinymce.trim(t.startContent)!=tinymce.trim(t.getContent({format:'raw',no_events:1}))&&!t.isNotDirty;},getContainer:function(){var t=this;if(!t.container)t.container=DOM.get(t.editorContainer||t.id+'_parent');return t.container;},getContentAreaContainer:function(){return this.contentAreaContainer;},getElement:function(){return DOM.get(this.settings.content_element||this.id);},getWin:function(){var t=this,e;if(!t.contentWindow){e=DOM.get(t.id+"_ifr");if(e)t.contentWindow=e.contentWindow;}return t.contentWindow;},getDoc:function(){var t=this,w;if(!t.contentDocument){w=t.getWin();if(w)t.contentDocument=w.document;}return t.contentDocument;},getBody:function(){return this.bodyElement||this.getDoc().body;},convertURL:function(u,n,e){var t=this,s=t.settings;if(s.urlconverter_callback)return t.execCallback('urlconverter_callback',u,e,true,n);if(!s.convert_urls||(e&&e.nodeName=='LINK')||u.indexOf('file:')===0)return u;if(s.relative_urls)return t.documentBaseURI.toRelative(u);u=t.documentBaseURI.toAbsolute(u,s.remove_script_host);return u;},addVisual:function(e){var t=this,s=t.settings;e=e||t.getBody();if(!is(t.hasVisual))t.hasVisual=s.visual;each(t.dom.select('table,a',e),function(e){var v;switch(e.nodeName){case'TABLE':v=t.dom.getAttrib(e,'border');if(!v||v=='0'){if(t.hasVisual)t.dom.addClass(e,s.visual_table_class);else t.dom.removeClass(e,s.visual_table_class);}return;case'A':v=t.dom.getAttrib(e,'name');if(v){if(t.hasVisual)t.dom.addClass(e,'mceItemAnchor');else t.dom.removeClass(e,'mceItemAnchor');}return;}});t.onVisualAid.dispatch(t,e,t.hasVisual);},remove:function(){var t=this,e=t.getContainer();t.removed=1;t.hide();t.execCallback('remove_instance_callback',t);t.onRemove.dispatch(t);t.onExecCommand.listeners=[];EditorManager.remove(t);DOM.remove(e);},destroy:function(s){var t=this;if(t.destroyed)return;if(!s){tinymce.removeUnload(t.destroy);tinyMCE.onBeforeUnload.remove(t._beforeUnload);if(t.theme.destroy)t.theme.destroy();t.controlManager.destroy();t.selection.destroy();t.dom.destroy();if(!t.settings.content_editable){Event.clear(t.getWin());Event.clear(t.getDoc());}Event.clear(t.getBody());Event.clear(t.formElement);}if(t.formElement){t.formElement.submit=t.formElement._mceOldSubmit;t.formElement._mceOldSubmit=null;}t.contentAreaContainer=t.formElement=t.container=t.settings.content_element=t.bodyElement=t.contentDocument=t.contentWindow=null;if(t.selection)t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null;t.destroyed=1;},_addEvents:function(){var t=this,i,s=t.settings,lo={mouseup:'onMouseUp',mousedown:'onMouseDown',click:'onClick',keyup:'onKeyUp',keydown:'onKeyDown',keypress:'onKeyPress',submit:'onSubmit',reset:'onReset',contextmenu:'onContextMenu',dblclick:'onDblClick',paste:'onPaste'};function eventHandler(e,o){var ty=e.type;if(t.removed)return;if(t.onEvent.dispatch(t,e,o)!==false){t[lo[e.fakeType||e.type]].dispatch(t,e,o);}};each(lo,function(v,k){switch(k){case'contextmenu':if(tinymce.isOpera){Event.add(t.getBody(),'mousedown',function(e){if(e.ctrlKey){e.fakeType='contextmenu';eventHandler(e);}});}else Event.add(t.getBody(),k,eventHandler);break;case'paste':Event.add(t.getBody(),k,function(e){var tx,h,el,r;if(e.clipboardData)tx=e.clipboardData.getData('text/plain');else if(tinymce.isIE)tx=t.getWin().clipboardData.getData('Text');eventHandler(e,{text:tx,html:h});});break;case'submit':case'reset':Event.add(t.getElement().form||DOM.getParent(t.id,'form'),k,eventHandler);break;default:Event.add(s.content_editable?t.getBody():t.getDoc(),k,eventHandler);}});Event.add(s.content_editable?t.getBody():(isGecko?t.getDoc():t.getWin()),'focus',function(e){t.focus(true);});if(tinymce.isGecko){Event.add(t.getDoc(),'DOMNodeInserted',function(e){var v;e=e.target;if(e.nodeType===1&&e.nodeName==='IMG'&&(v=e.getAttribute('mce_src')))e.src=t.documentBaseURI.toAbsolute(v);});}if(isGecko){function setOpts(){var t=this,d=t.getDoc(),s=t.settings;if(isGecko&&!s.readonly){if(t._isHidden()){try{if(!s.content_editable)d.designMode='On';}catch(ex){}}try{d.execCommand("styleWithCSS",0,false);}catch(ex){if(!t._isHidden())try{d.execCommand("useCSS",0,true);}catch(ex){}}if(!s.table_inline_editing)try{d.execCommand('enableInlineTableEditing',false,false);}catch(ex){}if(!s.object_resizing)try{d.execCommand('enableObjectResizing',false,false);}catch(ex){}}};t.onBeforeExecCommand.add(setOpts);t.onMouseDown.add(setOpts);}t.onMouseUp.add(t.nodeChanged);t.onClick.add(t.nodeChanged);t.onKeyUp.add(function(ed,e){var c=e.keyCode;if((c>=33&&c<=36)||(c>=37&&c<=40)||c==13||c==45||c==46||c==8||(tinymce.isMac&&(c==91||c==93))||e.ctrlKey)t.nodeChanged();});t.onReset.add(function(){t.setContent(t.startContent,{format:'raw'});});if(t.getParam('tab_focus')){function tabCancel(ed,e){if(e.keyCode===9)return Event.cancel(e);};function tabHandler(ed,e){var x,i,f,el,v;function find(d){f=DOM.getParent(ed.id,'form');el=f.elements;if(f){each(el,function(e,i){if(e.id==ed.id){x=i;return false;}});if(d>0){for(i=x+1;i=0;i--){if(el[i].type!='hidden')return el[i];}}}return null;};if(e.keyCode===9){v=explode(ed.getParam('tab_focus'));if(v.length==1){v[1]=v[0];v[0]=':prev';}if(e.shiftKey){if(v[0]==':prev')el=find(-1);else el=DOM.get(v[0]);}else{if(v[1]==':next')el=find(1);else el=DOM.get(v[1]);}if(el){if(ed=EditorManager.get(el.id||el.name))ed.focus();else window.setTimeout(function(){window.focus();el.focus();},10);return Event.cancel(e);}}};t.onKeyUp.add(tabCancel);if(isGecko){t.onKeyPress.add(tabHandler);t.onKeyDown.add(tabCancel);}else t.onKeyDown.add(tabHandler);}if(s.custom_shortcuts){if(s.custom_undo_redo_keyboard_shortcuts){t.addShortcut('ctrl+z',t.getLang('undo_desc'),'Undo');t.addShortcut('ctrl+y',t.getLang('redo_desc'),'Redo');}if(isGecko){t.addShortcut('ctrl+b',t.getLang('bold_desc'),'Bold');t.addShortcut('ctrl+i',t.getLang('italic_desc'),'Italic');t.addShortcut('ctrl+u',t.getLang('underline_desc'),'Underline');}for(i=1;i<=6;i++)t.addShortcut('ctrl+'+i,'',['FormatBlock',false,'']);t.addShortcut('ctrl+7','',['FormatBlock',false,'

    ']);t.addShortcut('ctrl+8','',['FormatBlock',false,'

    ']);t.addShortcut('ctrl+9','',['FormatBlock',false,'
    ']);function find(e){var v=null;if(!e.altKey&&!e.ctrlKey&&!e.metaKey)return v;each(t.shortcuts,function(o){if(tinymce.isMac&&o.ctrl!=e.metaKey)return;else if(!tinymce.isMac&&o.ctrl!=e.ctrlKey)return;if(o.alt!=e.altKey)return;if(o.shift!=e.shiftKey)return;if(e.keyCode==o.keyCode||(e.charCode&&e.charCode==o.charCode)){v=o;return false;}});return v;};t.onKeyUp.add(function(ed,e){var o=find(e);if(o)return Event.cancel(e);});t.onKeyPress.add(function(ed,e){var o=find(e);if(o)return Event.cancel(e);});t.onKeyDown.add(function(ed,e){var o=find(e);if(o){o.func.call(o.scope);return Event.cancel(e);}});}if(tinymce.isIE){Event.add(t.getDoc(),'controlselect',function(e){var re=t.resizeInfo,cb;e=e.target;if(e.nodeName!=='IMG')return;if(re)Event.remove(re.node,re.ev,re.cb);if(!t.dom.hasClass(e,'mceItemNoResize')){ev='resizeend';cb=Event.add(e,ev,function(e){var v;e=e.target;if(v=t.dom.getStyle(e,'width')){t.dom.setAttrib(e,'width',v.replace(/[^0-9%]+/g,''));t.dom.setStyle(e,'width','');}if(v=t.dom.getStyle(e,'height')){t.dom.setAttrib(e,'height',v.replace(/[^0-9%]+/g,''));t.dom.setStyle(e,'height','');}});}else{ev='resizestart';cb=Event.add(e,'resizestart',Event.cancel,Event);}re=t.resizeInfo={node:e,ev:ev,cb:cb};});t.onKeyDown.add(function(ed,e){switch(e.keyCode){case 8:if(t.selection.getRng().item){t.selection.getRng().item(0).removeNode();return Event.cancel(e);}}});}if(tinymce.isOpera){t.onClick.add(function(ed,e){Event.prevent(e);});}if(s.custom_undo_redo){function addUndo(){t.undoManager.typing=0;t.undoManager.add();};if(tinymce.isIE){Event.add(t.getWin(),'blur',function(e){var n;if(t.selection){n=t.selection.getNode();if(!t.removed&&n.ownerDocument&&n.ownerDocument!=t.getDoc())addUndo();}});}else{Event.add(t.getDoc(),'blur',function(){if(t.selection&&!t.removed)addUndo();});}t.onMouseDown.add(addUndo);t.onKeyUp.add(function(ed,e){if((e.keyCode>=33&&e.keyCode<=36)||(e.keyCode>=37&&e.keyCode<=40)||e.keyCode==13||e.keyCode==45||e.ctrlKey){t.undoManager.typing=0;t.undoManager.add();}});t.onKeyDown.add(function(ed,e){if((e.keyCode>=33&&e.keyCode<=36)||(e.keyCode>=37&&e.keyCode<=40)||e.keyCode==13||e.keyCode==45){if(t.undoManager.typing){t.undoManager.add();t.undoManager.typing=0;}return;}if(!t.undoManager.typing){t.undoManager.add();t.undoManager.typing=1;}});}},_convertInlineElements:function(){var t=this,s=t.settings,dom=t.dom,v,e,na,st,sp;function convert(ed,o){if(!s.inline_styles)return;if(o.get){each(t.dom.select('table,u,strike',o.node),function(n){switch(n.nodeName){case'TABLE':if(v=dom.getAttrib(n,'height')){dom.setStyle(n,'height',v);dom.setAttrib(n,'height','');}break;case'U':case'STRIKE':n.style.textDecoration=n.nodeName=='U'?'underline':'line-through';dom.setAttrib(n,'mce_style','');dom.setAttrib(n,'mce_name','span');break;}});}else if(o.set){each(t.dom.select('table,span',o.node).reverse(),function(n){if(n.nodeName=='TABLE'){if(v=dom.getStyle(n,'height'))dom.setAttrib(n,'height',v.replace(/[^0-9%]+/g,''));}else{if(n.style.textDecoration=='underline')na='u';else if(n.style.textDecoration=='line-through')na='strike';else na='';if(na){n.style.textDecoration='';dom.setAttrib(n,'mce_style','');e=dom.create(na,{style:dom.getAttrib(n,'style')});dom.replace(e,n,1);}}});}};t.onPreProcess.add(convert);if(!s.cleanup_on_startup){t.onSetContent.add(function(ed,o){if(o.initial)convert(t,{node:t.getBody(),set:1});});}},_convertFonts:function(){var t=this,s=t.settings,dom=t.dom,fz,fzn,sl,cl;if(!s.inline_styles)return;fz=[8,10,12,14,18,24,36];fzn=['xx-small','x-small','small','medium','large','x-large','xx-large'];if(sl=s.font_size_style_values)sl=explode(sl);if(cl=s.font_size_classes)cl=explode(cl);function process(no){var n,sp,nl,x;if(!s.inline_styles)return;nl=t.dom.select('font',no);for(x=nl.length-1;x>=0;x--){n=nl[x];sp=dom.create('span',{style:dom.getAttrib(n,'style'),'class':dom.getAttrib(n,'class')});dom.setStyles(sp,{fontFamily:dom.getAttrib(n,'face'),color:dom.getAttrib(n,'color'),backgroundColor:n.style.backgroundColor});if(n.size){if(sl)dom.setStyle(sp,'fontSize',sl[parseInt(n.size)-1]);else dom.setAttrib(sp,'class',cl[parseInt(n.size)-1]);}dom.setAttrib(sp,'mce_style','');dom.replace(sp,n,1);}};t.onPreProcess.add(function(ed,o){if(o.get)process(o.node);});t.onSetContent.add(function(ed,o){if(o.initial)process(o.node);});},_isHidden:function(){var s;if(!isGecko)return 0;s=this.selection.getSel();return(!s||!s.rangeCount||s.rangeCount==0);},_fixNesting:function(s){var d=[],i;s=s.replace(/<(\/)?([^\s>]+)[^>]*?>/g,function(a,b,c){var e;if(b==='/'){if(!d.length)return'';if(c!==d[d.length-1].tag){for(i=d.length-1;i>=0;i--){if(d[i].tag===c){d[i].close=1;break;}}return'';}else{d.pop();if(d.length&&d[d.length-1].close){a=a+'';d.pop();}}}else{if(/^(br|hr|input|meta|img|link|param)$/i.test(c))return a;if(/\/>$/.test(a))return a;d.push({tag:c});}return a;});for(i=d.length-1;i>=0;i--)s+='';return s;}});})();(function(){var each=tinymce.each,isIE=tinymce.isIE,isGecko=tinymce.isGecko,isOpera=tinymce.isOpera,isWebKit=tinymce.isWebKit;function isBlock(n){return/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(n.nodeName);};tinymce.create('tinymce.EditorCommands',{EditorCommands:function(ed){this.editor=ed;},execCommand:function(cmd,ui,val){var t=this,ed=t.editor,f;switch(cmd){case'Cut':case'Copy':case'Paste':try{ed.getDoc().execCommand(cmd,ui,val);}catch(ex){if(isGecko){ed.windowManager.confirm(ed.getLang('clipboard_msg'),function(s){if(s)window.open('http://www.mozilla.org/editor/midasdemo/securityprefs.html','mceExternal');});}else ed.windowManager.alert(ed.getLang('clipboard_no_support'));}return true;case'mceResetDesignMode':case'mceBeginUndoLevel':return true;case'unlink':t.UnLink();return true;case'JustifyLeft':case'JustifyCenter':case'JustifyRight':case'JustifyFull':t.mceJustify(cmd,cmd.substring(7).toLowerCase());return true;case'mceEndUndoLevel':case'mceAddUndoLevel':ed.undoManager.add();return true;default:f=this[cmd];if(f){f.call(this,ui,val);return true;}}return false;},Indent:function(){var ed=this.editor,d=ed.dom,s=ed.selection,e,iv,iu;iv=ed.settings.indentation;iu=/[a-z%]+$/i.exec(iv);iv=parseInt(iv);if(ed.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){each(this._getSelectedBlocks(),function(e){d.setStyle(e,'paddingLeft',(parseInt(e.style.paddingLeft||0)+iv)+iu);});return;}ed.getDoc().execCommand('Indent',false,null);if(isIE){d.getParent(s.getNode(),function(n){if(n.nodeName=='BLOCKQUOTE'){n.dir=n.style.cssText='';}});}},Outdent:function(){var ed=this.editor,d=ed.dom,s=ed.selection,e,v,iv,iu;iv=ed.settings.indentation;iu=/[a-z%]+$/i.exec(iv);iv=parseInt(iv);if(ed.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){each(this._getSelectedBlocks(),function(e){v=Math.max(0,parseInt(e.style.paddingLeft||0)-iv);d.setStyle(e,'paddingLeft',v?v+iu:'');});return;}ed.getDoc().execCommand('Outdent',false,null);},mceSetAttribute:function(u,v){var ed=this.editor,d=ed.dom,e;if(e=d.getParent(ed.selection.getNode(),d.isBlock))d.setAttrib(e,v.name,v.value);},mceSetContent:function(u,v){this.editor.setContent(v);},mceToggleVisualAid:function(){var ed=this.editor;ed.hasVisual=!ed.hasVisual;ed.addVisual();},mceReplaceContent:function(u,v){var s=this.editor.selection;s.setContent(v.replace(/\{\$selection\}/g,s.getContent({format:'text'})));},mceInsertLink:function(u,v){var ed=this.editor,s=ed.selection,e=ed.dom.getParent(s.getNode(),'A');if(tinymce.is(v,'string'))v={href:v};function set(e){each(v,function(v,k){ed.dom.setAttrib(e,k,v);});};if(!e){ed.execCommand('CreateLink',false,'javascript:mctmp(0);');each(ed.dom.select('a'),function(e){if(e.href=='javascript:mctmp(0);')set(e);});}else{if(v.href)set(e);else ed.dom.remove(e,1);}},UnLink:function(){var ed=this.editor,s=ed.selection;if(s.isCollapsed())s.select(s.getNode());ed.getDoc().execCommand('unlink',false,null);s.collapse(0);},FontName:function(u,v){var t=this,ed=t.editor,s=ed.selection,e;if(!v){if(s.isCollapsed())s.select(s.getNode());t.RemoveFormat();}else{if(ed.settings.convert_fonts_to_spans)t._applyInlineStyle('span',{style:{fontFamily:v}});else ed.getDoc().execCommand('FontName',false,v);}},FontSize:function(u,v){var ed=this.editor,s=ed.settings,fc,fs;if(s.convert_fonts_to_spans&&v>=1&&v<=7){fs=tinymce.explode(s.font_size_style_values);fc=tinymce.explode(s.font_size_classes);if(fc)v=fc[v-1]||v;else v=fs[v-1]||v;}if(v>=1&&v<=7)ed.getDoc().execCommand('FontSize',false,v);else this._applyInlineStyle('span',{style:{fontSize:v}});},queryCommandValue:function(c){var f=this['queryValue'+c];if(f)return f.call(this,c);return false;},queryCommandState:function(cmd){var f;switch(cmd){case'JustifyLeft':case'JustifyCenter':case'JustifyRight':case'JustifyFull':return this.queryStateJustify(cmd,cmd.substring(7).toLowerCase());default:if(f=this['queryState'+cmd])return f.call(this,cmd);}return-1;},_queryState:function(c){try{return this.editor.getDoc().queryCommandState(c);}catch(ex){}},_queryVal:function(c){try{return this.editor.getDoc().queryCommandValue(c);}catch(ex){}},queryValueFontSize:function(){var ed=this.editor,v=0,p;if(p=ed.dom.getParent(ed.selection.getNode(),'SPAN'))v=p.style.fontSize;if(!v&&(isOpera||isWebKit)){if(p=ed.dom.getParent(ed.selection.getNode(),'FONT'))v=p.size;return v;}return v||this._queryVal('FontSize');},queryValueFontName:function(){var ed=this.editor,v=0,p;if(p=ed.dom.getParent(ed.selection.getNode(),'FONT'))v=p.face;if(p=ed.dom.getParent(ed.selection.getNode(),'SPAN'))v=p.style.fontFamily.replace(/, /g,',').replace(/[\'\"]/g,'').toLowerCase();if(!v)v=this._queryVal('FontName');return v;},mceJustify:function(c,v){var ed=this.editor,se=ed.selection,n=se.getNode(),nn=n.nodeName,bl,nb,dom=ed.dom,rm;if(ed.settings.inline_styles&&this.queryStateJustify(c,v))rm=1;bl=dom.getParent(n,ed.dom.isBlock);if(nn=='IMG'){if(v=='full')return;if(rm){if(v=='center')dom.setStyle(bl||n.parentNode,'textAlign','');dom.setStyle(n,'float','');this.mceRepaint();return;}if(v=='center'){if(bl&&/^(TD|TH)$/.test(bl.nodeName))bl=0;if(!bl||bl.childNodes.length>1){nb=dom.create('p');nb.appendChild(n.cloneNode(false));if(bl)dom.insertAfter(nb,bl);else dom.insertAfter(nb,n);dom.remove(n);n=nb.firstChild;bl=nb;}dom.setStyle(bl,'textAlign',v);dom.setStyle(n,'float','');}else{dom.setStyle(n,'float',v);dom.setStyle(bl||n.parentNode,'textAlign','');}this.mceRepaint();return;}if(ed.settings.inline_styles&&ed.settings.forced_root_block){if(rm)v='';each(this._getSelectedBlocks(dom.getParent(se.getStart(),dom.isBlock),dom.getParent(se.getEnd(),dom.isBlock)),function(e){dom.setAttrib(e,'align','');dom.setStyle(e,'textAlign',v=='full'?'justify':v);});return;}else if(!rm)ed.getDoc().execCommand(c,false,null);if(ed.settings.inline_styles){if(rm){dom.getParent(ed.selection.getNode(),function(n){if(n.style&&n.style.textAlign)dom.setStyle(n,'textAlign','');});return;}each(dom.select('*'),function(n){var v=n.align;if(v){if(v=='full')v='justify';dom.setStyle(n,'textAlign',v);dom.setAttrib(n,'align','');}});}},mceSetCSSClass:function(u,v){this.mceSetStyleInfo(0,{command:'setattrib',name:'class',value:v});},getSelectedElement:function(){var t=this,ed=t.editor,dom=ed.dom,se=ed.selection,r=se.getRng(),r1,r2,sc,ec,so,eo,e,sp,ep,re;if(se.isCollapsed()||r.item)return se.getNode();re=ed.settings.merge_styles_invalid_parents;if(tinymce.is(re,'string'))re=new RegExp(re,'i');if(isIE){r1=r.duplicate();r1.collapse(true);sc=r1.parentElement();r2=r.duplicate();r2.collapse(false);ec=r2.parentElement();if(sc!=ec){r1.move('character',1);sc=r1.parentElement();}if(sc==ec){r1=r.duplicate();r1.moveToElementText(sc);if(r1.compareEndPoints('StartToStart',r)==0&&r1.compareEndPoints('EndToEnd',r)==0)return re&&re.test(sc.nodeName)?null:sc;}}else{function getParent(n){return dom.getParent(n,function(n){return n.nodeType==1;});};sc=r.startContainer;ec=r.endContainer;so=r.startOffset;eo=r.endOffset;if(!r.collapsed){if(sc==ec){if(so-eo<2){if(sc.hasChildNodes()){sp=sc.childNodes[so];return re&&re.test(sp.nodeName)?null:sp;}}}}if(sc.nodeType!=3||ec.nodeType!=3)return null;if(so==0){sp=getParent(sc);if(sp&&sp.firstChild!=sc)sp=null;}if(so==sc.nodeValue.length){e=sc.nextSibling;if(e&&e.nodeType==1)sp=sc.nextSibling;}if(eo==0){e=ec.previousSibling;if(e&&e.nodeType==1)ep=e;}if(eo==ec.nodeValue.length){ep=getParent(ec);if(ep&&ep.lastChild!=ec)ep=null;}if(sp==ep)return re&&sp&&re.test(sp.nodeName)?null:sp;}return null;},InsertHorizontalRule:function(){if(isGecko||isIE)this.editor.selection.setContent('
    ');else this.editor.getDoc().execCommand('InsertHorizontalRule',false,'');},RemoveFormat:function(){var t=this,ed=t.editor,s=ed.selection,b;if(isWebKit)s.setContent(s.getContent({format:'raw'}).replace(/(<(span|b|i|strong|em|strike) [^>]+>|<(span|b|i|strong|em|strike)>|<\/(span|b|i|strong|em|strike)>|)/g,''),{format:'raw'});else ed.getDoc().execCommand('RemoveFormat',false,null);t.mceSetStyleInfo(0,{command:'removeformat'});ed.addVisual();},mceSetStyleInfo:function(u,v){var t=this,ed=t.editor,d=ed.getDoc(),dom=ed.dom,e,b,s=ed.selection,nn=v.wrapper||'span',b=s.getBookmark(),re;function set(n,e){if(n.nodeType==1){switch(v.command){case'setattrib':return dom.setAttrib(n,v.name,v.value);case'setstyle':return dom.setStyle(n,v.name,v.value);case'removeformat':return dom.setAttrib(n,'class','');}}};re=ed.settings.merge_styles_invalid_parents;if(tinymce.is(re,'string'))re=new RegExp(re,'i');if((e=t.getSelectedElement())&&!ed.settings.force_span_wrappers)set(e,1);else{d.execCommand('FontName',false,'__');each(isWebKit?dom.select('span'):dom.select('font'),function(n){var sp,e;if(dom.getAttrib(n,'face')=='__'||n.style.fontFamily==='__'){sp=dom.create(nn,{mce_new:'1'});set(sp);each(n.childNodes,function(n){sp.appendChild(n.cloneNode(true));});dom.replace(sp,n);}});}each(dom.select(nn).reverse(),function(n){var p=n.parentNode;if(!dom.getAttrib(n,'mce_new')){p=dom.getParent(n,function(n){return n.nodeType==1&&dom.getAttrib(n,'mce_new');});if(p)dom.remove(n,1);}});each(dom.select(nn).reverse(),function(n){var p=n.parentNode;if(!p||!dom.getAttrib(n,'mce_new'))return;if(ed.settings.force_span_wrappers&&p.nodeName!='SPAN')return;if(p.nodeName==nn.toUpperCase()&&p.childNodes.length==1)return dom.remove(p,1);if(n.nodeType==1&&(!re||!re.test(p.nodeName))&&p.childNodes.length==1){set(p);dom.setAttrib(n,'class','');}});each(dom.select(nn).reverse(),function(n){if(dom.getAttrib(n,'mce_new')||(dom.getAttribs(n).length<=1&&n.className==='')){if(!dom.getAttrib(n,'class')&&!dom.getAttrib(n,'style'))return dom.remove(n,1);dom.setAttrib(n,'mce_new','');}});s.moveToBookmark(b);},queryStateJustify:function(c,v){var ed=this.editor,n=ed.selection.getNode(),dom=ed.dom;if(n&&n.nodeName=='IMG'){if(dom.getStyle(n,'float')==v)return 1;return n.parentNode.style.textAlign==v;}n=dom.getParent(ed.selection.getStart(),function(n){return n.nodeType==1&&n.style.textAlign;});if(v=='full')v='justify';if(ed.settings.inline_styles)return(n&&n.style.textAlign==v);return this._queryState(c);},ForeColor:function(ui,v){var ed=this.editor;if(ed.settings.convert_fonts_to_spans){this._applyInlineStyle('span',{style:{color:v}});return;}else ed.getDoc().execCommand('ForeColor',false,v);},HiliteColor:function(ui,val){var t=this,ed=t.editor,d=ed.getDoc();if(ed.settings.convert_fonts_to_spans){this._applyInlineStyle('span',{style:{backgroundColor:val}});return;}function set(s){if(!isGecko)return;try{d.execCommand("styleWithCSS",0,s);}catch(ex){d.execCommand("useCSS",0,!s);}};if(isGecko||isOpera){set(true);d.execCommand('hilitecolor',false,val);set(false);}else d.execCommand('BackColor',false,val);},Undo:function(){var ed=this.editor;if(ed.settings.custom_undo_redo){ed.undoManager.undo();ed.nodeChanged();}else ed.getDoc().execCommand('Undo',false,null);},Redo:function(){var ed=this.editor;if(ed.settings.custom_undo_redo){ed.undoManager.redo();ed.nodeChanged();}else ed.getDoc().execCommand('Redo',false,null);},FormatBlock:function(ui,val){var t=this,ed=t.editor,s=ed.selection,dom=ed.dom,bl,nb,b;function isBlock(n){return/^(P|DIV|H[1-6]|ADDRESS|BLOCKQUOTE|PRE)$/.test(n.nodeName);};bl=dom.getParent(s.getNode(),function(n){return isBlock(n);});if(bl){if((isIE&&isBlock(bl.parentNode))||bl.nodeName=='DIV'){nb=ed.dom.create(val);each(dom.getAttribs(bl),function(v){dom.setAttrib(nb,v.nodeName,dom.getAttrib(bl,v.nodeName));});b=s.getBookmark();dom.replace(nb,bl,1);s.moveToBookmark(b);ed.nodeChanged();return;}}val=ed.settings.forced_root_block?(val||'

    '):val;if(val.indexOf('<')==-1)val='<'+val+'>';if(tinymce.isGecko)val=val.replace(/<(div|blockquote|code|dt|dd|dl|samp)>/gi,'$1');ed.getDoc().execCommand('FormatBlock',false,val);},mceCleanup:function(){var ed=this.editor,s=ed.selection,b=s.getBookmark();ed.setContent(ed.getContent());s.moveToBookmark(b);},mceRemoveNode:function(ui,val){var ed=this.editor,s=ed.selection,b,n=val||s.getNode();if(n==ed.getBody())return;b=s.getBookmark();ed.dom.remove(n,1);s.moveToBookmark(b);ed.nodeChanged();},mceSelectNodeDepth:function(ui,val){var ed=this.editor,s=ed.selection,c=0;ed.dom.getParent(s.getNode(),function(n){if(n.nodeType==1&&c++==val){s.select(n);ed.nodeChanged();return false;}},ed.getBody());},mceSelectNode:function(u,v){this.editor.selection.select(v);},mceInsertContent:function(ui,val){this.editor.selection.setContent(val);},mceInsertRawHTML:function(ui,val){var ed=this.editor;ed.selection.setContent('tiny_mce_marker');ed.setContent(ed.getContent().replace(/tiny_mce_marker/g,val));},mceRepaint:function(){var s,b,e=this.editor;if(tinymce.isGecko){try{s=e.selection;b=s.getBookmark(true);if(s.getSel())s.getSel().selectAllChildren(e.getBody());s.collapse(true);s.moveToBookmark(b);}catch(ex){}}},queryStateUnderline:function(){var ed=this.editor,n=ed.selection.getNode();if(n&&n.nodeName=='A')return false;return this._queryState('Underline');},queryStateOutdent:function(){var ed=this.editor,n;if(ed.settings.inline_styles){if((n=ed.dom.getParent(ed.selection.getStart(),ed.dom.isBlock))&&parseInt(n.style.paddingLeft)>0)return true;if((n=ed.dom.getParent(ed.selection.getEnd(),ed.dom.isBlock))&&parseInt(n.style.paddingLeft)>0)return true;}return this.queryStateInsertUnorderedList()||this.queryStateInsertOrderedList()||(!ed.settings.inline_styles&&!!ed.dom.getParent(ed.selection.getNode(),'BLOCKQUOTE'));},queryStateInsertUnorderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),'UL');},queryStateInsertOrderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),'OL');},queryStatemceBlockQuote:function(){return!!this.editor.dom.getParent(this.editor.selection.getStart(),function(n){return n.nodeName==='BLOCKQUOTE';});},mceBlockQuote:function(){var t=this,ed=t.editor,s=ed.selection,dom=ed.dom,sb,eb,n,bm,bq,r,bq2,i,nl;function getBQ(e){return dom.getParent(e,function(n){return n.nodeName==='BLOCKQUOTE';});};sb=dom.getParent(s.getStart(),isBlock);eb=dom.getParent(s.getEnd(),isBlock);if(bq=getBQ(sb)){if(sb!=eb||sb.childNodes.length>1||(sb.childNodes.length==1&&sb.firstChild.nodeName!='BR'))bm=s.getBookmark();if(getBQ(eb)){bq2=bq.cloneNode(false);while(n=eb.nextSibling)bq2.appendChild(n.parentNode.removeChild(n));}if(bq2)dom.insertAfter(bq2,bq);nl=t._getSelectedBlocks(sb,eb);for(i=nl.length-1;i>=0;i--){dom.insertAfter(nl[i],bq);}if(/^\s*$/.test(bq.innerHTML))dom.remove(bq,1);if(bq2&&/^\s*$/.test(bq2.innerHTML))dom.remove(bq2,1);if(!bm){if(!isIE){r=ed.getDoc().createRange();r.setStart(sb,0);r.setEnd(sb,0);s.setRng(r);}else{s.select(sb);s.collapse(0);if(dom.getParent(s.getStart(),isBlock)!=sb){r=s.getRng();r.move('character',-1);r.select();}}}else t.editor.selection.moveToBookmark(bm);return;}if(isIE&&!sb&&!eb){t.editor.getDoc().execCommand('Indent');n=getBQ(s.getNode());n.style.margin=n.dir='';return;}if(!sb||!eb)return;if(sb!=eb||sb.childNodes.length>1||(sb.childNodes.length==1&&sb.firstChild.nodeName!='BR'))bm=s.getBookmark();each(t._getSelectedBlocks(getBQ(s.getStart()),getBQ(s.getEnd())),function(e){if(e.nodeName=='BLOCKQUOTE'&&!bq){bq=e;return;}if(!bq){bq=dom.create('blockquote');e.parentNode.insertBefore(bq,e);}if(e.nodeName=='BLOCKQUOTE'&&bq){n=e.firstChild;while(n){bq.appendChild(n.cloneNode(true));n=n.nextSibling;}dom.remove(e);return;}bq.appendChild(dom.remove(e));});if(!bm){if(!isIE){r=ed.getDoc().createRange();r.setStart(sb,0);r.setEnd(sb,0);s.setRng(r);}else{s.select(sb);s.collapse(1);}}else s.moveToBookmark(bm);},_applyInlineStyle:function(na,at,op){var t=this,ed=t.editor,dom=ed.dom,bm,lo={},kh;na=na.toUpperCase();if(op&&op.check_classes&&at['class'])op.check_classes.push(at['class']);function replaceFonts(){var bm;each(dom.select(tinymce.isWebKit&&!tinymce.isAir?'span':'font'),function(n){if(n.style.fontFamily=='mceinline'||n.face=='mceinline'){if(!bm)bm=ed.selection.getBookmark();at._mce_new='1';dom.replace(dom.create(na,at),n,1);}});each(dom.select(na),function(n){if(n.getAttribute('_mce_new')){function removeStyle(n){if(n.nodeType==1){each(at.style,function(v,k){dom.setStyle(n,k,'');});if(at['class']&&n.className&&op){each(op.check_classes,function(c){if(dom.hasClass(n,c))dom.removeClass(n,c);});}}};each(dom.select(na,n),removeStyle);if(n.parentNode&&n.parentNode.nodeType==1&&n.parentNode.childNodes.length==1)removeStyle(n.parentNode);dom.getParent(n.parentNode,function(pn){if(pn.nodeType==1){if(at.style){each(at.style,function(v,k){var sv;if(!lo[k]&&(sv=dom.getStyle(pn,k))){if(sv===v)dom.setStyle(n,k,'');lo[k]=1;}});}if(at['class']&&pn.className&&op){each(op.check_classes,function(c){if(dom.hasClass(pn,c))dom.removeClass(n,c);});}}return false;});n.removeAttribute('_mce_new');}});each(dom.select(na).reverse(),function(n){var c=0;each(dom.getAttribs(n),function(an){if(an.nodeName.substring(0,1)!='_'&&dom.getAttrib(n,an.nodeName)!=''){c++;}});if(c==0)dom.remove(n,1);});ed.selection.moveToBookmark(bm);return!!bm;};ed.focus();ed.getDoc().execCommand('FontName',false,'mceinline');replaceFonts();if(kh=t._applyInlineStyle.keyhandler){ed.onKeyUp.remove(kh);ed.onKeyPress.remove(kh);ed.onKeyDown.remove(kh);ed.onSetContent.remove(t._applyInlineStyle.chandler);}if(ed.selection.isCollapsed()){t._pendingStyles=tinymce.extend(t._pendingStyles||{},at.style);t._applyInlineStyle.chandler=ed.onSetContent.add(function(){delete t._pendingStyles;});t._applyInlineStyle.keyhandler=kh=function(e){if(t._pendingStyles){at.style=t._pendingStyles;delete t._pendingStyles;}if(replaceFonts()){ed.onKeyDown.remove(t._applyInlineStyle.keyhandler);ed.onKeyPress.remove(t._applyInlineStyle.keyhandler);}if(e.type=='keyup')ed.onKeyUp.remove(t._applyInlineStyle.keyhandler);};ed.onKeyDown.add(kh);ed.onKeyPress.add(kh);ed.onKeyUp.add(kh);}else t._pendingStyles=0;},_getSelectedBlocks:function(st,en){var ed=this.editor,dom=ed.dom,s=ed.selection,sb,eb,n,bl=[];sb=dom.getParent(st||s.getStart(),isBlock);eb=dom.getParent(en||s.getEnd(),isBlock);if(sb)bl.push(sb);if(sb&&eb&&sb!=eb){n=sb;while((n=n.nextSibling)&&n!=eb){if(isBlock(n))bl.push(n);}}if(eb&&sb!=eb)bl.push(eb);return bl;}});})();tinymce.create('tinymce.UndoManager',{index:0,data:null,typing:0,UndoManager:function(ed){var t=this,Dispatcher=tinymce.util.Dispatcher;t.editor=ed;t.data=[];t.onAdd=new Dispatcher(this);t.onUndo=new Dispatcher(this);t.onRedo=new Dispatcher(this);},add:function(l){var t=this,i,ed=t.editor,b,s=ed.settings,la;l=l||{};l.content=l.content||ed.getContent({format:'raw',no_events:1});l.content=l.content.replace(/^\s*|\s*$/g,'');la=t.data[t.index>0&&(t.index==0||t.index==t.data.length)?t.index-1:t.index];if(!l.initial&&la&&l.content==la.content)return null;if(s.custom_undo_redo_levels){if(t.data.length>s.custom_undo_redo_levels){for(i=0;i0){if(t.index==t.data.length&&t.index>1){i=t.index;t.typing=0;if(!t.add())t.index=i;--t.index;}l=t.data[--t.index];ed.setContent(l.content,{format:'raw'});ed.selection.moveToBookmark(l.bookmark);t.onUndo.dispatch(t,l);}return l;},redo:function(){var t=this,ed=t.editor,l=null;if(t.index','gi');t.rePadd=new RegExp(']+)><\\\/p>|]+)\\\/>|]+)>\\s+<\\\/p>|

    <\\\/p>||

    \\s+<\\\/p>'.replace(/p/g,elm),'gi');t.reNbsp2BR1=new RegExp(']+)>[\\s\\u00a0]+<\\\/p>|

    [\\s\\u00a0]+<\\\/p>'.replace(/p/g,elm),'gi');t.reNbsp2BR2=new RegExp(']+)>( | )<\\\/p>|

    ( | )<\\\/p>'.replace(/p/g,elm),'gi');t.reBR2Nbsp=new RegExp(']+)>\\s*
    \\s*<\\\/p>|

    \\s*
    \\s*<\\\/p>'.replace(/p/g,elm),'gi');t.reTrailBr=new RegExp('\\s*
    \\s*<\\\/p>'.replace(/p/g,elm),'gi');function padd(ed,o){if(isOpera)o.content=o.content.replace(t.reOpera,'');o.content=o.content.replace(t.rePadd,'<'+elm+'$1$2$3$4$5$6>\u00a0');if(!isIE&&!isOpera&&o.set){o.content=o.content.replace(t.reNbsp2BR1,'<'+elm+'$1$2>
    ');o.content=o.content.replace(t.reNbsp2BR2,'<'+elm+'$1$2>
    ');}else{o.content=o.content.replace(t.reBR2Nbsp,'<'+elm+'$1$2>\u00a0');o.content=o.content.replace(t.reTrailBr,'');}};ed.onBeforeSetContent.add(padd);ed.onPostProcess.add(padd);if(s.forced_root_block){ed.onInit.add(t.forceRoots,t);ed.onSetContent.add(t.forceRoots,t);ed.onBeforeGetContent.add(t.forceRoots,t);}},setup:function(){var t=this,ed=t.editor,s=ed.settings;if(s.forced_root_block){ed.onKeyUp.add(t.forceRoots,t);ed.onPreProcess.add(t.forceRoots,t);}if(s.force_br_newlines){if(isIE){ed.onKeyPress.add(function(ed,e){var n,s=ed.selection;if(e.keyCode==13&&s.getNode().nodeName!='LI'){s.setContent('
    ',{format:'raw'});n=ed.dom.get('__');n.removeAttribute('id');s.select(n);s.collapse();return Event.cancel(e);}});}return;}if(!isIE&&s.force_p_newlines){ed.onKeyPress.add(function(ed,e){if(e.keyCode==13&&!e.shiftKey){if(!t.insertPara(e))Event.cancel(e);}});if(isGecko){ed.onKeyDown.add(function(ed,e){if((e.keyCode==8||e.keyCode==46)&&!e.shiftKey)t.backspaceDelete(e,e.keyCode==8);});}}function ren(rn,na){var ne=ed.dom.create(na);each(rn.attributes,function(a){if(a.specified&&a.nodeValue)ne.setAttribute(a.nodeName.toLowerCase(),a.nodeValue);});each(rn.childNodes,function(n){ne.appendChild(n.cloneNode(true));});rn.parentNode.replaceChild(ne,rn);return ne;};if(isIE&&s.element!='P'){ed.onKeyPress.add(function(ed,e){t.lastElm=ed.selection.getNode().nodeName;});ed.onKeyUp.add(function(ed,e){var bl,sel=ed.selection,n=sel.getNode(),b=ed.getBody();if(b.childNodes.length===1&&n.nodeName=='P'){n=ren(n,s.element);sel.select(n);sel.collapse();ed.nodeChanged();}else if(e.keyCode==13&&!e.shiftKey&&t.lastElm!='P'){bl=ed.dom.getParent(n,'P');if(bl){ren(bl,s.element);ed.nodeChanged();}}});}},find:function(n,t,s){var ed=this.editor,w=ed.getDoc().createTreeWalker(n,4,null,false),c=-1;while(n=w.nextNode()){c++;if(t==0&&n==s)return c;if(t==1&&c==s)return n;}return-1;},forceRoots:function(ed,e){var t=this,ed=t.editor,b=ed.getBody(),d=ed.getDoc(),se=ed.selection,s=se.getSel(),r=se.getRng(),si=-2,ei,so,eo,tr,c=-0xFFFFFF;var nx,bl,bp,sp,le,nl=b.childNodes,i,n,eid;for(i=nl.length-1;i>=0;i--){nx=nl[i];if(nx.nodeType==3||(!t.dom.isBlock(nx)&&nx.nodeType!=8)){if(!bl){if(nx.nodeType!=3||/[^\s]/g.test(nx.nodeValue)){if(si==-2&&r){if(!isIE){if(r.startContainer.nodeType==1&&(n=r.startContainer.childNodes[r.startOffset])&&n.nodeType==1){eid=n.getAttribute("id");n.setAttribute("id","__mce");}else{if(ed.dom.getParent(r.startContainer,function(e){return e===b;})){so=r.startOffset;eo=r.endOffset;si=t.find(b,0,r.startContainer);ei=t.find(b,0,r.endContainer);}}}else{tr=d.body.createTextRange();tr.moveToElementText(b);tr.collapse(1);bp=tr.move('character',c)*-1;tr=r.duplicate();tr.collapse(1);sp=tr.move('character',c)*-1;tr=r.duplicate();tr.collapse(0);le=(tr.move('character',c)*-1)-sp;si=sp-bp;ei=le;}}bl=ed.dom.create(ed.settings.forced_root_block);bl.appendChild(nx.cloneNode(1));nx.parentNode.replaceChild(bl,nx);}}else{if(bl.hasChildNodes())bl.insertBefore(nx,bl.firstChild);else bl.appendChild(nx);}}else bl=null;}if(si!=-2){if(!isIE){bl=b.getElementsByTagName(ed.settings.element)[0];r=d.createRange();if(si!=-1)r.setStart(t.find(b,1,si),so);else r.setStart(bl,0);if(ei!=-1)r.setEnd(t.find(b,1,ei),eo);else r.setEnd(bl,0);if(s){s.removeAllRanges();s.addRange(r);}}else{try{r=s.createRange();r.moveToElementText(b);r.collapse(1);r.moveStart('character',si);r.moveEnd('character',ei);r.select();}catch(ex){}}}else if(!isIE&&(n=ed.dom.get('__mce'))){if(eid)n.setAttribute('id',eid);else n.removeAttribute('id');r=d.createRange();r.setStartBefore(n);r.setEndBefore(n);se.setRng(r);}},getParentBlock:function(n){var d=this.dom;return d.getParent(n,d.isBlock);},insertPara:function(e){var t=this,ed=t.editor,dom=ed.dom,d=ed.getDoc(),se=ed.settings,s=ed.selection.getSel(),r=s.getRangeAt(0),b=d.body;var rb,ra,dir,sn,so,en,eo,sb,eb,bn,bef,aft,sc,ec,n,vp=dom.getViewPort(ed.getWin()),y,ch,car;function isEmpty(n){n=n.innerHTML;n=n.replace(/<(img|hr|table)/gi,'-');n=n.replace(/<[^>]+>/g,'');return n.replace(/[ \t\r\n]+/g,'')=='';};rb=d.createRange();rb.setStart(s.anchorNode,s.anchorOffset);rb.collapse(true);ra=d.createRange();ra.setStart(s.focusNode,s.focusOffset);ra.collapse(true);dir=rb.compareBoundaryPoints(rb.START_TO_END,ra)<0;sn=dir?s.anchorNode:s.focusNode;so=dir?s.anchorOffset:s.focusOffset;en=dir?s.focusNode:s.anchorNode;eo=dir?s.focusOffset:s.anchorOffset;if(sn===en&&/^(TD|TH)$/.test(sn.nodeName)){dom.remove(sn.firstChild);ed.dom.add(sn,se.element,null,'
    ');aft=ed.dom.add(sn,se.element,null,'
    ');r=d.createRange();r.selectNodeContents(aft);r.collapse(1);ed.selection.setRng(r);return false;}if(sn==b&&en==b&&b.firstChild&&ed.dom.isBlock(b.firstChild)){sn=en=sn.firstChild;so=eo=0;rb=d.createRange();rb.setStart(sn,0);ra=d.createRange();ra.setStart(en,0);}sn=sn.nodeName=="HTML"?d.body:sn;sn=sn.nodeName=="BODY"?sn.firstChild:sn;en=en.nodeName=="HTML"?d.body:en;en=en.nodeName=="BODY"?en.firstChild:en;sb=t.getParentBlock(sn);eb=t.getParentBlock(en);bn=sb?sb.nodeName:se.element;if(t.dom.getParent(sb,function(n){return/OL|UL|PRE/.test(n.nodeName);}))return true;if(sb&&(sb.nodeName=='CAPTION'||/absolute|relative|static/gi.test(sb.style.position))){bn=se.element;sb=null;}if(eb&&(eb.nodeName=='CAPTION'||/absolute|relative|static/gi.test(eb.style.position))){bn=se.element;eb=null;}if(/(TD|TABLE|TH|CAPTION)/.test(bn)||(sb&&bn=="DIV"&&/left|right/gi.test(sb.style.cssFloat))){bn=se.element;sb=eb=null;}bef=(sb&&sb.nodeName==bn)?sb.cloneNode(0):ed.dom.create(bn);aft=(eb&&eb.nodeName==bn)?eb.cloneNode(0):ed.dom.create(bn);aft.removeAttribute('id');if(/^(H[1-6])$/.test(bn)&&sn.nodeValue&&so==sn.nodeValue.length)aft=ed.dom.create(se.element);n=sc=sn;do{if(n==b||n.nodeType==9||t.dom.isBlock(n)||/(TD|TABLE|TH|CAPTION)/.test(n.nodeName))break;sc=n;}while((n=n.previousSibling?n.previousSibling:n.parentNode));n=ec=en;do{if(n==b||n.nodeType==9||t.dom.isBlock(n)||/(TD|TABLE|TH|CAPTION)/.test(n.nodeName))break;ec=n;}while((n=n.nextSibling?n.nextSibling:n.parentNode));if(sc.nodeName==bn)rb.setStart(sc,0);else rb.setStartBefore(sc);rb.setEnd(sn,so);bef.appendChild(rb.cloneContents()||d.createTextNode(''));try{ra.setEndAfter(ec);}catch(ex){}ra.setStart(en,eo);aft.appendChild(ra.cloneContents()||d.createTextNode(''));r=d.createRange();if(!sc.previousSibling&&sc.parentNode.nodeName==bn){r.setStartBefore(sc.parentNode);}else{if(rb.startContainer.nodeName==bn&&rb.startOffset==0)r.setStartBefore(rb.startContainer);else r.setStart(rb.startContainer,rb.startOffset);}if(!ec.nextSibling&&ec.parentNode.nodeName==bn)r.setEndAfter(ec.parentNode);else r.setEnd(ra.endContainer,ra.endOffset);r.deleteContents();if(isOpera)ed.getWin().scrollTo(0,vp.y);if(bef.firstChild&&bef.firstChild.nodeName==bn)bef.innerHTML=bef.firstChild.innerHTML;if(aft.firstChild&&aft.firstChild.nodeName==bn)aft.innerHTML=aft.firstChild.innerHTML;if(isEmpty(bef))bef.innerHTML='
    ';function appendStyles(e,en){var nl=[],nn,n,i;e.innerHTML='';if(se.keep_styles){n=en;do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(n.nodeName)){nn=n.cloneNode(false);dom.setAttrib(nn,'id','');nl.push(nn);}}while(n=n.parentNode);}if(nl.length>0){for(i=nl.length-1,nn=e;i>=0;i--)nn=nn.appendChild(nl[i]);nl[0].innerHTML=isOpera?' ':'
    ';return nl[0];}else e.innerHTML=isOpera?' ':'
    ';};if(isEmpty(aft))car=appendStyles(aft,en);if(isOpera&&parseFloat(opera.version())<9.5){r.insertNode(bef);r.insertNode(aft);}else{r.insertNode(aft);r.insertNode(bef);}aft.normalize();bef.normalize();function first(n){return d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false).nextNode()||n;};r=d.createRange();r.selectNodeContents(isGecko?first(car||aft):car||aft);r.collapse(1);s.removeAllRanges();s.addRange(r);y=ed.dom.getPos(aft).y;ch=aft.clientHeight;if(yvp.y+vp.h){ed.getWin().scrollTo(0,y=c.length){for(e=0,b=g.length;e=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length=g.length||g[e]!=c[e]){f=e+1;break}}}if(f==1){return h}for(e=0,b=g.length-(f-1);e=0;c--){if(f[c].length==0||f[c]=="."){continue}if(f[c]==".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!=0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(e,b){var c=new Date();c.setTime(c.getTime()-1000);this.set(e,"",c,b,c)}})})();(function(){function serialize(o,quote){var i,v,t;quote=quote||'"';if(o==null){return"null"}t=typeof o;if(t=="string"){v="\bb\tt\nn\ff\rr\"\"''\\\\";return quote+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,b){if(quote==='"'&&a==="'"){return a}i=v.indexOf(b);if(i+1){return"\\"+v.charAt(i+1)}a=b.charCodeAt().toString(16);return"\\u"+"0000".substring(a.length)+a})+quote}if(t=="object"){if(o.hasOwnProperty&&o instanceof Array){for(i=0,v="[";i0?",":"")+serialize(o[i],quote)}return v+"]"}v="{";for(i in o){v+=typeof o[i]!="function"?(v.length>1?","+quote:quote)+i+quote+":"+serialize(o[i],quote):""}return v+"}"}return""+o}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}})();tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){if(e){e.call(f.error_scope||f.scope,h,g)}};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(j){var a,g,d,k=/[&\"\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/[<>&\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\"\']/g,c=/&(#)?([\w]+);/g,i={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};g={'"':""","'":"'","<":"<",">":">","&":"&"};d={"<":"<",">":">","&":"&",""":'"',"'":"'"};function h(l){var m;m=document.createElement("div");m.innerHTML=l;return m.textContent||m.innerText||l}function e(m,p){var n,o,l,q={};if(m){m=m.split(",");p=p||10;for(n=0;n1){return"&#"+(((n.charCodeAt(0)-55296)*1024)+(n.charCodeAt(1)-56320)+65536)+";"}return g[n]||"&#"+n.charCodeAt(0)+";"})},encodeNamed:function(n,l,m){m=m||a;return n.replace(l?k:b,function(o){return g[o]||m[o]||o})},getEncodeFunc:function(l,o){var p=j.html.Entities;o=e(o)||a;function m(r,q){return r.replace(q?k:b,function(s){return g[s]||o[s]||"&#"+s.charCodeAt(0)+";"||s})}function n(r,q){return p.encodeNamed(r,q,o)}l=j.makeMap(l.replace(/\+/g,","));if(l.named&&l.numeric){return m}if(l.named){if(o){return n}return p.encodeNamed}if(l.numeric){return p.encodeNumeric}return p.encodeRaw},decode:function(l){return l.replace(c,function(n,m,o){if(m){o=parseInt(o);if(o>65535){o-=65536;return String.fromCharCode(55296+(o>>10),56320+(o&1023))}else{return i[o]||String.fromCharCode(o)}}return d[n]||a[n]||h(n)})}}})(tinymce);tinymce.html.Styles=function(d,f){var k=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,h=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,b=/\s*([^:]+):\s*([^;]+);?/g,l=/\s+$/,m=/rgb/,e,g,a={},j;d=d||{};j="\\\" \\' \\; \\: ; : _".split(" ");for(g=0;g1?r:"0"+r}return"#"+o(q)+o(p)+o(i)}return{toHex:function(i){return i.replace(k,c)},parse:function(r){var y={},p,n,v,q,u=d.url_converter,x=d.url_converter_scope||this;function o(C,F){var E,B,A,D;E=y[C+"-top"+F];if(!E){return}B=y[C+"-right"+F];if(E!=B){return}A=y[C+"-bottom"+F];if(B!=A){return}D=y[C+"-left"+F];if(A!=D){return}y[C+F]=D;delete y[C+"-top"+F];delete y[C+"-right"+F];delete y[C+"-bottom"+F];delete y[C+"-left"+F]}function t(B){var C=y[B],A;if(!C||C.indexOf(" ")<0){return}C=C.split(" ");A=C.length;while(A--){if(C[A]!==C[0]){return false}}y[B]=C[0];return true}function z(C,B,A,D){if(!t(B)){return}if(!t(A)){return}if(!t(D)){return}y[C]=y[B]+" "+y[A]+" "+y[D];delete y[B];delete y[A];delete y[D]}function s(A){q=true;return a[A]}function i(B,A){if(q){B=B.replace(/_[0-9]/g,function(C){return a[C]})}if(!A){B=B.replace(/\\([\'\";:])/g,"$1")}return B}if(r){r=r.replace(/\\[\"\';:_]/g,s).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(A){return A.replace(/[;:]/g,s)});while(p=b.exec(r)){n=p[1].replace(l,"").toLowerCase();v=p[2].replace(l,"");if(n&&v.length>0){if(n==="font-weight"&&v==="700"){v="bold"}else{if(n==="color"||n==="background-color"){v=v.toLowerCase()}}v=v.replace(k,c);v=v.replace(h,function(B,A,E,D,F,C){F=F||C;if(F){F=i(F);return"'"+F.replace(/\'/g,"\\'")+"'"}A=i(A||E||D);if(u){A=u.call(x,A,"style")}return"url('"+A.replace(/\'/g,"\\'")+"')"});y[n]=q?i(v,true):v}b.lastIndex=p.index+p[0].length}o("border","");o("border","-width");o("border","-color");o("border","-style");o("padding","");o("margin","");z("border","border-width","border-style","border-color");if(y.border==="medium none"){delete y.border}}return y},serialize:function(p,r){var o="",n,q;function i(t){var x,u,s,t,v;x=f.styles[t];if(x){for(u=0,s=x.length;u0){o+=(o.length>0?" ":"")+t+": "+v+";"}}}}if(r&&f&&f.styles){i("*");i(n)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(l){var g={},i,k,f,d,b,e,c=l.makeMap,j=l.each;function h(n,m){return n.split(m||",")}function a(q,p){var n,o={};function m(r){return r.replace(/[A-Z]+/g,function(s){return m(q[s])})}for(n in q){if(q.hasOwnProperty(n)){q[n]=m(q[n])}}m(p).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(u,s,r,t){r=h(r,"|");o[s]={attributes:c(r),attributesOrder:r,children:c(t,"|",{"#comment":{}})}});return o}k="h1,h2,h3,h4,h5,h6,hr,p,div,address,pre,form,table,tbody,thead,tfoot,th,tr,td,li,ol,ul,caption,blockquote,center,dl,dt,dd,dir,fieldset,noscript,menu,isindex,samp,header,footer,article,section,hgroup";k=c(k,",",c(k.toUpperCase()));g=a({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]");i=c("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,preload,autoplay,loop,controls");f=c("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,source");d=l.extend(c("td,th,iframe,video,object"),f);b=c("pre,script,style");e=c("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");l.html.Schema=function(p){var x=this,m={},n={},u=[],o;p=p||{};if(p.verify_html===false){p.valid_elements="*[*]"}if(p.valid_styles){o={};j(p.valid_styles,function(z,y){o[y]=l.explode(z)})}function v(y){return new RegExp("^"+y.replace(/([?+*])/g,".$1")+"$")}function r(F){var E,A,T,P,U,z,C,O,R,K,S,W,I,D,Q,y,M,B,V,X,J,N,H=/^([#+-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,L=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,G=/[*?+]/;if(F){F=h(F);if(m["@"]){M=m["@"].attributes;B=m["@"].attributesOrder}for(E=0,A=F.length;E=0){for(P=l.length-1;P>=Q;P--){O=l[P];if(O.valid){A.end(O.name)}}l.length=Q}}D=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([^\\s\\/<>]+)\\s*((?:[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*)>))","g");h=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:\\.|[^\"])*)\")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?/g;g={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi};F=e.getShortEndedElements();z=e.getSelfClosingElements();k=e.getBoolAttrs();x=c.validate;y=c.fix_self_closing;while(f=D.exec(q)){if(m0&&l[l.length-1].name===G){C(G)}if(!x||(I=e.getElementRule(G))){r=true;if(x){J=I.attributes;n=I.attributePatterns}if(o=f[8]){B=[];B.map={};o.replace(h,function(P,O,T,S,R){var U,Q;O=O.toLowerCase();T=O in k?O:v(T||S||R||"");if(x&&O.indexOf("data-")!==0){U=J[O];if(!U&&n){Q=n.length;while(Q--){U=n[Q];if(U.pattern.test(O)){break}}if(Q===-1){U=null}}if(!U){return}if(U.validValues&&!(T in U.validValues)){return}}B.map[O]=T;B.push({name:O,value:T})})}else{B=[];B.map={}}if(x){H=I.attributesRequired;M=I.attributesDefault;L=I.attributesForced;if(L){K=L.length;while(K--){E=L[K];N=E.name;u=E.value;if(u==="{$uid}"){u="mce_"+s++}B.map[N]=u;B.push({name:N,value:u})}}if(M){K=M.length;while(K--){E=M[K];N=E.name;if(!(N in B.map)){u=E.value;if(u==="{$uid}"){u="mce_"+s++}B.map[N]=u;B.push({name:N,value:u})}}}if(H){K=H.length;while(K--){if(H[K] in B.map){break}}if(K===-1){r=false}}if(B.map["data-mce-bogus"]){r=false}}if(r){A.start(G,B,p)}}else{r=false}if(j=g[G]){j.lastIndex=m=f.index+f[0].length;if(f=j.exec(q)){if(r){t=q.substr(m,f.index-m)}m=f.index+f[0].length}else{t=q.substr(m);m=q.length}if(r&&t.length>0){A.text(t,true)}if(r){A.end(G)}D.lastIndex=m;continue}if(!p){if(!o||o.indexOf("/")!=o.length-1){l.push({name:G,valid:r})}else{if(r){A.end(G)}}}}else{if(G=f[1]){A.comment(G)}else{if(G=f[2]){A.cdata(G)}else{if(G=f[3]){A.doctype(G)}else{if(G=f[4]){A.pi(G,f[5])}}}}}}m=f.index+f[0].length}if(m=0;K--){G=l[K];if(G.valid){A.end(G.name)}}}}})(tinymce);(function(d){var c=/^[ \t\r\n]*$/,e={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};function a(k,l,j){var i,h,f=j?"lastChild":"firstChild",g=j?"prev":"next";if(k[f]){return k[f]}if(k!==l){i=k[g];if(i){return i}for(h=k.parent;h&&h!==l;h=h.parent){i=h[g];if(i){return i}}}}function b(f,g){this.name=f;this.type=g;if(g===1){this.attributes=[];this.attributes.map={}}}d.extend(b.prototype,{replace:function(g){var f=this;if(g.parent){g.remove()}f.insert(g,f);f.remove();return f},attr:function(h,l){var f=this,g,j,k;if(typeof h!=="string"){for(j in h){f.attr(j,h[j])}return f}if(g=f.attributes){if(l!==k){if(l===null){if(h in g.map){delete g.map[h];j=g.length;while(j--){if(g[j].name===h){g=g.splice(j,1);return f}}}return f}if(h in g.map){j=g.length;while(j--){if(g[j].name===h){g[j].value=l;break}}}else{g.push({name:h,value:l})}g.map[h]=l;return f}else{return g.map[h]}}},clone:function(){var g=this,n=new b(g.name,g.type),h,f,m,j,k;if(m=g.attributes){k=[];k.map={};for(h=0,f=m.length;h1){v.reverse();z=n=f.filterNode(v[0].clone());for(t=0;t0){L.value=l;L=L.prev}else{J=L.prev;L.remove();L=J}}}n=new b.html.SaxParser({validate:x,fix_self_closing:!x,cdata:function(l){z.append(G("#cdata",4)).value=l},text:function(K,l){var J;if(!r[z.name]){K=K.replace(k," ");if(z.lastChild&&o[z.lastChild.name]){K=K.replace(C,"")}}if(K.length!==0){J=G("#text",3);J.raw=!!l;z.append(J).value=K}},comment:function(l){z.append(G("#comment",8)).value=l},pi:function(l,J){z.append(G(l,7)).value=J;E(z)},doctype:function(J){var l;l=z.append(G("#doctype",10));l.value=J;E(z)},start:function(l,R,K){var P,M,L,J,N,S,Q,O;L=x?h.getElementRule(l):{};if(L){P=G(L.outputName||l,1);P.attributes=R;P.shortEnded=K;z.append(P);O=p[z.name];if(O&&p[P.name]&&!O[P.name]){H.push(P)}M=d.length;while(M--){N=d[M].name;if(N in R.map){D=c[N];if(D){D.push(P)}else{c[N]=[P]}}}if(o[l]){E(P)}if(!K){z=P}}},end:function(l){var N,K,M,J,L;K=x?h.getElementRule(l):{};if(K){if(o[l]){if(!r[z.name]){for(N=z.firstChild;N&&N.type===3;){M=N.value.replace(C,"");if(M.length>0){N.value=M;N=N.next}else{J=N.next;N.remove();N=J}}for(N=z.lastChild;N&&N.type===3;){M=N.value.replace(s,"");if(M.length>0){N.value=M;N=N.prev}else{J=N.prev;N.remove();N=J}}}N=z.prev;if(N&&N.type===3){M=N.value.replace(C,"");if(M.length>0){N.value=M}else{N.remove()}}}if(K.removeEmpty||K.paddEmpty){if(z.isEmpty(t)){if(K.paddEmpty){z.empty().append(new a("#text","3")).value="\u00a0"}else{if(!z.attributes.map.name){L=z.parent;z.empty().remove();z=L;return}}}}z=z.parent}}},h);F=z=new a(g.root_name,11);n.parse(u);if(x){j(H)}for(I in i){D=e[I];y=i[I];v=y.length;while(v--){if(!y[v].parent){y.splice(v,1)}}for(B=0,A=D.length;B0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}c.push("<",m);if(k){for(n=0,j=k.length;n0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}},end:function(h){var i;c.push("");if(a&&d[h]&&c.length>0){i=c[c.length-1];if(i.length>0&&i!=="\n"){c.push("\n")}}},text:function(i,h){if(i.length>0){c[c.length]=h?i:f(i)}},cdata:function(h){c.push("")},comment:function(h){c.push("")},pi:function(h,i){if(i){c.push("")}else{c.push("")}if(a){c.push("\n")}},doctype:function(h){c.push("",a?"\n":"")},reset:function(){c.length=0},getContent:function(){return c.join("").replace(/\n$/,"")}}};(function(a){a.html.Serializer=function(c,d){var b=this,e=new a.html.Writer(c);c=c||{};c.validate="validate" in c?c.validate:true;b.schema=d=d||new a.html.Schema();b.writer=e;b.serialize=function(h){var g,i;i=c.validate;g={3:function(k,j){e.text(k.value,k.raw)},8:function(j){e.comment(j.value)},7:function(j){e.pi(j.name,j.value)},10:function(j){e.doctype(j.value)},4:function(j){e.cdata(j.value)},11:function(j){if((j=j.firstChild)){do{f(j)}while(j=j.next)}}};e.reset();function f(k){var t=g[k.type],j,o,s,r,p,u,n,m,q;if(!t){j=k.name;o=k.shortEnded;s=k.attributes;if(i&&s&&s.length>1){u=[];u.map={};q=d.getElementRule(k.name);for(n=0,m=q.attributesOrder.length;n=8;k.boxModel=!h.isIE||n.compatMode=="CSS1Compat"||k.stdMode;k.hasOuterHTML="outerHTML" in n.createElement("a");k.settings=l=h.extend({keep_values:false,hex_colors:1},l);k.schema=l.schema;k.styles=new h.html.Styles({url_converter:l.url_converter,url_converter_scope:l.url_converter_scope},l.schema);if(h.isIE6){try{n.execCommand("BackgroundImageCache",false,true)}catch(m){k.cssFlicker=true}}if(b){("abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video").replace(/\w+/g,function(o){n.createElement(o)})}h.addUnload(k.destroy,k)},getRoot:function(){var j=this,k=j.settings;return(k&&j.get(k.root_element))||j.doc.body},getViewPort:function(k){var l,j;k=!k?this.win:k;l=k.document;j=this.boxModel?l.documentElement:l.body;return{x:k.pageXOffset||j.scrollLeft,y:k.pageYOffset||j.scrollTop,w:k.innerWidth||j.clientWidth,h:k.innerHeight||j.clientHeight}},getRect:function(m){var l,j=this,k;m=j.get(m);l=j.getPos(m);k=j.getSize(m);return{x:l.x,y:l.y,w:k.w,h:k.h}},getSize:function(m){var k=this,j,l;m=k.get(m);j=k.getStyle(m,"width");l=k.getStyle(m,"height");if(j.indexOf("px")===-1){j=0}if(l.indexOf("px")===-1){l=0}return{w:parseInt(j)||m.offsetWidth||m.clientWidth,h:parseInt(l)||m.offsetHeight||m.clientHeight}},getParent:function(l,k,j){return this.getParents(l,k,j,false)},getParents:function(u,p,l,s){var k=this,j,m=k.settings,q=[];u=k.get(u);s=s===undefined;if(m.strict_root){l=l||k.getRoot()}if(e(p,"string")){j=p;if(p==="*"){p=function(o){return o.nodeType==1}}else{p=function(o){return k.is(o,j)}}}while(u){if(u==l||!u.nodeType||u.nodeType===9){break}if(!p||p(u)){if(s){q.push(u)}else{return u}}u=u.parentNode}return s?q:null},get:function(j){var k;if(j&&this.doc&&typeof(j)=="string"){k=j;j=this.doc.getElementById(j);if(j&&j.id!==k){return this.doc.getElementsByName(k)[1]}}return j},getNext:function(k,j){return this._findSib(k,j,"nextSibling")},getPrev:function(k,j){return this._findSib(k,j,"previousSibling")},select:function(l,k){var j=this;return h.dom.Sizzle(l,j.get(k)||j.get(j.settings.root_element)||j.doc,[])},is:function(l,j){var k;if(l.length===undefined){if(j==="*"){return l.nodeType==1}if(a.test(j)){j=j.toLowerCase().split(/,/);l=l.nodeName.toLowerCase();for(k=j.length-1;k>=0;k--){if(j[k]==l){return true}}return false}}return h.dom.Sizzle.matches(j,l.nodeType?[l]:l).length>0},add:function(m,q,j,l,o){var k=this;return this.run(m,function(s){var r,n;r=e(q,"string")?k.doc.createElement(q):q;k.setAttribs(r,j);if(l){if(l.nodeType){r.appendChild(l)}else{k.setHTML(r,l)}}return !o?s.appendChild(r):r})},create:function(l,j,k){return this.add(this.doc.createElement(l),l,j,k,1)},createHTML:function(r,j,p){var q="",m=this,l;q+="<"+r;for(l in j){if(j.hasOwnProperty(l)){q+=" "+l+'="'+m.encode(j[l])+'"'}}if(typeof(p)!="undefined"){return q+">"+p+""}return q+" />"},remove:function(j,k){return this.run(j,function(m){var n,l=m.parentNode;if(!l){return null}if(k){while(n=m.firstChild){if(!h.isIE||n.nodeType!==3||n.nodeValue){l.insertBefore(n,m)}else{m.removeChild(n)}}}return l.removeChild(m)})},setStyle:function(m,j,k){var l=this;return l.run(m,function(p){var o,n;o=p.style;j=j.replace(/-(\D)/g,function(r,q){return q.toUpperCase()});if(l.pixelStyles.test(j)&&(h.is(k,"number")||/^[\-0-9\.]+$/.test(k))){k+="px"}switch(j){case"opacity":if(b){o.filter=k===""?"":"alpha(opacity="+(k*100)+")";if(!m.currentStyle||!m.currentStyle.hasLayout){o.display="inline-block"}}o[j]=o["-moz-opacity"]=o["-khtml-opacity"]=k||"";break;case"float":b?o.styleFloat=k:o.cssFloat=k;break;default:o[j]=k||""}if(l.settings.update_styles){l.setAttrib(p,"data-mce-style")}})},getStyle:function(m,j,l){m=this.get(m);if(!m){return}if(this.doc.defaultView&&l){j=j.replace(/[A-Z]/g,function(n){return"-"+n});try{return this.doc.defaultView.getComputedStyle(m,null).getPropertyValue(j)}catch(k){return null}}j=j.replace(/-(\D)/g,function(o,n){return n.toUpperCase()});if(j=="float"){j=b?"styleFloat":"cssFloat"}if(m.currentStyle&&l){return m.currentStyle[j]}return m.style?m.style[j]:undefined},setStyles:function(m,n){var k=this,l=k.settings,j;j=l.update_styles;l.update_styles=0;f(n,function(o,p){k.setStyle(m,p,o)});l.update_styles=j;if(l.update_styles){k.setAttrib(m,l.cssText)}},removeAllAttribs:function(j){return this.run(j,function(m){var l,k=m.attributes;for(l=k.length-1;l>=0;l--){m.removeAttributeNode(k.item(l))}})},setAttrib:function(l,m,j){var k=this;if(!l||!m){return}if(k.settings.strict){m=m.toLowerCase()}return this.run(l,function(o){var n=k.settings;switch(m){case"style":if(!e(j,"string")){f(j,function(p,q){k.setStyle(o,q,p)});return}if(n.keep_values){if(j&&!k._isRes(j)){o.setAttribute("data-mce-style",j,2)}else{o.removeAttribute("data-mce-style",2)}}o.style.cssText=j;break;case"class":o.className=j||"";break;case"src":case"href":if(n.keep_values){if(n.url_converter){j=n.url_converter.call(n.url_converter_scope||k,j,m,o)}k.setAttrib(o,"data-mce-"+m,j,2)}break;case"shape":o.setAttribute("data-mce-style",j);break}if(e(j)&&j!==null&&j.length!==0){o.setAttribute(m,""+j,2)}else{o.removeAttribute(m,2)}})},setAttribs:function(k,l){var j=this;return this.run(k,function(m){f(l,function(o,p){j.setAttrib(m,p,o)})})},getAttrib:function(m,o,l){var j,k=this;m=k.get(m);if(!m||m.nodeType!==1){return false}if(!e(l)){l=""}if(/^(src|href|style|coords|shape)$/.test(o)){j=m.getAttribute("data-mce-"+o);if(j){return j}}if(b&&k.props[o]){j=m[k.props[o]];j=j&&j.nodeValue?j.nodeValue:j}if(!j){j=m.getAttribute(o,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(o)){if(m[k.props[o]]===true&&j===""){return o}return j?o:""}if(m.nodeName==="FORM"&&m.getAttributeNode(o)){return m.getAttributeNode(o).nodeValue}if(o==="style"){j=j||m.style.cssText;if(j){j=k.serializeStyle(k.parseStyle(j),m.nodeName);if(k.settings.keep_values&&!k._isRes(j)){m.setAttribute("data-mce-style",j)}}}if(d&&o==="class"&&j){j=j.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(o){case"rowspan":case"colspan":if(j===1){j=""}break;case"size":if(j==="+0"||j===20||j===0){j=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(j===0){j=""}break;case"hspace":if(j===-1){j=""}break;case"maxlength":case"tabindex":if(j===32768||j===2147483647||j==="32768"){j=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(j===65535){return o}return l;case"shape":j=j.toLowerCase();break;default:if(o.indexOf("on")===0&&j){j=h._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+j)}}}return(j!==undefined&&j!==null&&j!=="")?""+j:l},getPos:function(s,m){var k=this,j=0,q=0,o,p=k.doc,l;s=k.get(s);m=m||p.body;if(s){if(b&&!k.stdMode){s=s.getBoundingClientRect();o=k.boxModel?p.documentElement:p.body;j=k.getStyle(k.select("html")[0],"borderWidth");j=(j=="medium"||k.boxModel&&!k.isIE6)&&2||j;return{x:s.left+o.scrollLeft-j,y:s.top+o.scrollTop-j}}l=s;while(l&&l!=m&&l.nodeType){j+=l.offsetLeft||0;q+=l.offsetTop||0;l=l.offsetParent}l=s.parentNode;while(l&&l!=m&&l.nodeType){j-=l.scrollLeft||0;q-=l.scrollTop||0;l=l.parentNode}}return{x:j,y:q}},parseStyle:function(j){return this.styles.parse(j)},serializeStyle:function(k,j){return this.styles.serialize(k,j)},loadCSS:function(j){var l=this,m=l.doc,k;if(!j){j=""}k=l.select("head")[0];f(j.split(","),function(n){var o;if(l.files[n]){return}l.files[n]=true;o=l.create("link",{rel:"stylesheet",href:h._addVer(n)});if(b&&m.documentMode&&m.recalc){o.onload=function(){if(m.recalc){m.recalc()}o.onload=null}}k.appendChild(o)})},addClass:function(j,k){return this.run(j,function(l){var m;if(!k){return 0}if(this.hasClass(l,k)){return l.className}m=this.removeClass(l,k);return l.className=(m!=""?(m+" "):"")+k})},removeClass:function(l,m){var j=this,k;return j.run(l,function(o){var n;if(j.hasClass(o,m)){if(!k){k=new RegExp("(^|\\s+)"+m+"(\\s+|$)","g")}n=o.className.replace(k," ");n=h.trim(n!=" "?n:"");o.className=n;if(!n){o.removeAttribute("class");o.removeAttribute("className")}return n}return o.className})},hasClass:function(k,j){k=this.get(k);if(!k||!j){return false}return(" "+k.className+" ").indexOf(" "+j+" ")!==-1},show:function(j){return this.setStyle(j,"display","block")},hide:function(j){return this.setStyle(j,"display","none")},isHidden:function(j){j=this.get(j);return !j||j.style.display=="none"||this.getStyle(j,"display")=="none"},uniqueId:function(j){return(!j?"mce_":j)+(this.counter++)},setHTML:function(l,k){var j=this;return j.run(l,function(n){if(b){while(n.firstChild){n.removeChild(n.firstChild)}try{n.innerHTML="
    "+k;n.removeChild(n.firstChild)}catch(m){n=j.create("div");n.innerHTML="
    "+k;f(n.childNodes,function(p,o){if(o){n.appendChild(p)}})}}else{n.innerHTML=k}return k})},getOuterHTML:function(l){var k,j=this;l=j.get(l);if(!l){return null}if(l.nodeType===1&&j.hasOuterHTML){return l.outerHTML}k=(l.ownerDocument||j.doc).createElement("body");k.appendChild(l.cloneNode(true));return k.innerHTML},setOuterHTML:function(m,k,n){var j=this;function l(p,o,r){var s,q;q=r.createElement("body");q.innerHTML=o;s=q.lastChild;while(s){j.insertAfter(s.cloneNode(true),p);s=s.previousSibling}j.remove(p)}return this.run(m,function(p){p=j.get(p);if(p.nodeType==1){n=n||p.ownerDocument||j.doc;if(b){try{if(b&&p.nodeType==1){p.outerHTML=k}else{l(p,k,n)}}catch(o){l(p,k,n)}}else{l(p,k,n)}}})},decode:c.decode,encode:c.encodeAllRaw,insertAfter:function(j,k){k=this.get(k);return this.run(j,function(m){var l,n;l=k.parentNode;n=k.nextSibling;if(n){l.insertBefore(m,n)}else{l.appendChild(m)}return m})},isBlock:function(k){var j=k.nodeType;if(j){return !!(j===1&&g[k.nodeName])}return !!g[k]},replace:function(p,m,j){var l=this;if(e(m,"array")){p=p.cloneNode(true)}return l.run(m,function(k){if(j){f(h.grep(k.childNodes),function(n){p.appendChild(n)})}return k.parentNode.replaceChild(p,k)})},rename:function(m,j){var l=this,k;if(m.nodeName!=j.toUpperCase()){k=l.create(j);f(l.getAttribs(m),function(n){l.setAttrib(k,n.nodeName,l.getAttrib(m,n.nodeName))});l.replace(k,m,1)}return k||m},findCommonAncestor:function(l,j){var m=l,k;while(m){k=j;while(k&&m!=k){k=k.parentNode}if(m==k){break}m=m.parentNode}if(!m&&l.ownerDocument){return l.ownerDocument.documentElement}return m},toHex:function(j){var l=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(j);function k(m){m=parseInt(m).toString(16);return m.length>1?m:"0"+m}if(l){j="#"+k(l[1])+k(l[2])+k(l[3]);return j}return j},getClasses:function(){var n=this,j=[],m,o={},p=n.settings.class_filter,l;if(n.classes){return n.classes}function q(r){f(r.imports,function(s){q(s)});f(r.cssRules||r.rules,function(s){switch(s.type||1){case 1:if(s.selectorText){f(s.selectorText.split(","),function(t){t=t.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(t)||!/\.[\w\-]+$/.test(t)){return}l=t;t=h._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",t);if(p&&!(t=p(t,l))){return}if(!o[t]){j.push({"class":t});o[t]=1}})}break;case 3:q(s.styleSheet);break}})}try{f(n.doc.styleSheets,q)}catch(k){}if(j.length>0){n.classes=j}return j},run:function(m,l,k){var j=this,n;if(j.doc&&typeof(m)==="string"){m=j.get(m)}if(!m){return false}k=k||this;if(!m.nodeType&&(m.length||m.length===0)){n=[];f(m,function(p,o){if(p){if(typeof(p)=="string"){p=j.doc.getElementById(p)}n.push(l.call(k,p,o))}});return n}return l.call(k,m)},getAttribs:function(k){var j;k=this.get(k);if(!k){return[]}if(b){j=[];if(k.nodeName=="OBJECT"){return k.attributes}if(k.nodeName==="OPTION"&&this.getAttrib(k,"selected")){j.push({specified:1,nodeName:"selected"})}k.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(l){j.push({specified:1,nodeName:l})});return j}return k.attributes},isEmpty:function(o,p){var k=this,m,j,n,q,l;o=o.firstChild;if(o){q=new h.dom.TreeWalker(o);p=p||k.schema?k.schema.getNonEmptyElements():null;do{n=o.nodeType;if(n===1){if(o.getAttribute("data-mce-bogus")){continue}if(p&&p[o.nodeName.toLowerCase()]){return false}j=k.getAttribs(o);m=o.attributes.length;while(m--){l=o.attributes[m].nodeName;if(l==="name"||l.indexOf("data-")===0){return false}}}if((n===3&&!i.test(o.nodeValue))){return false}}while(o=q.next())}return true},destroy:function(k){var j=this;if(j.events){j.events.destroy()}j.win=j.doc=j.root=j.events=null;if(!k){h.removeUnload(j.destroy)}},createRng:function(){var j=this.doc;return j.createRange?j.createRange():new h.dom.Range(this)},nodeIndex:function(o,p){var j=0,m,n,l,k;if(o){for(m=o.nodeType,o=o.previousSibling,n=o;o;o=o.previousSibling){l=o.nodeType;if(p&&l==3){k=false;try{k=o.nodeValue.length}catch(q){}if(l==m||!k){continue}}j++;m=l}}return j},split:function(n,m,q){var s=this,j=s.createRng(),o,l,p;function k(v){var t,r=v.childNodes,u=v.nodeType;if(u==1&&v.getAttribute("data-mce-type")=="bookmark"){return}for(t=r.length-1;t>=0;t--){k(r[t])}if(u!=9){if(u==3&&v.nodeValue.length>0){if(!s.isBlock(v.parentNode)||h.trim(v.nodeValue).length>0){return}}else{if(u==1){r=v.childNodes;if(r.length==1&&r[0]&&r[0].nodeType==1&&r[0].getAttribute("data-mce-type")=="bookmark"){v.parentNode.insertBefore(r[0],v)}if(r.length||/^(br|hr|input|img)$/i.test(v.nodeName)){return}}}s.remove(v)}return v}if(n&&m){j.setStart(n.parentNode,s.nodeIndex(n));j.setEnd(m.parentNode,s.nodeIndex(m));o=j.extractContents();j=s.createRng();j.setStart(m.parentNode,s.nodeIndex(m)+1);j.setEnd(n.parentNode,s.nodeIndex(n)+1);l=j.extractContents();p=n.parentNode;p.insertBefore(k(o),n);if(q){p.replaceChild(q,m)}else{p.insertBefore(m,n)}p.insertBefore(k(l),n);s.remove(n);return q||m}},bind:function(n,j,m,l){var k=this;if(!k.events){k.events=new h.dom.EventUtils()}return k.events.add(n,j,m,l||this)},unbind:function(m,j,l){var k=this;if(!k.events){k.events=new h.dom.EventUtils()}return k.events.remove(m,j,l)},_findSib:function(m,j,k){var l=this,n=j;if(m){if(e(n,"string")){n=function(o){return l.is(o,j)}}for(m=m[k];m;m=m[k]){if(n(m)){return m}}}return null},_isRes:function(j){return/^(top|left|bottom|right|width|height)/i.test(j)||/;\s*(top|left|bottom|right|width|height)/i.test(j)}});h.DOM=new h.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var N=this,e=c.doc,S=0,E=1,j=2,D=true,R=false,U="startOffset",h="startContainer",P="endContainer",z="endOffset",k=tinymce.extend,n=c.nodeIndex;k(N,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:D,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:I,setEndBefore:J,setEndAfter:u,collapse:A,selectNode:x,selectNodeContents:F,compareBoundaryPoints:v,deleteContents:p,extractContents:H,cloneContents:d,insertNode:C,surroundContents:M,cloneRange:K});function q(V,t){B(D,V,t)}function s(V,t){B(R,V,t)}function g(t){q(t.parentNode,n(t))}function I(t){q(t.parentNode,n(t)+1)}function J(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function A(t){if(t){N[P]=N[h];N[z]=N[U]}else{N[h]=N[P];N[U]=N[z]}N.collapsed=D}function x(t){g(t);u(t)}function F(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(Y,t){var ab=N[h],W=N[U],aa=N[P],V=N[z],Z=t.startContainer,ad=t.startOffset,X=t.endContainer,ac=t.endOffset;if(Y===0){return G(ab,W,Z,ad)}if(Y===1){return G(aa,V,Z,ad)}if(Y===2){return G(aa,V,X,ac)}if(Y===3){return G(ab,W,X,ac)}}function p(){m(j)}function H(){return m(S)}function d(){return m(E)}function C(Y){var V=this[h],t=this[U],X,W;if((V.nodeType===3||V.nodeType===4)&&V.nodeValue){if(!t){V.parentNode.insertBefore(Y,V)}else{if(t>=V.nodeValue.length){c.insertAfter(Y,V)}else{X=V.splitText(t);V.parentNode.insertBefore(Y,X)}}}else{if(V.childNodes.length>0){W=V.childNodes[t]}if(W){V.insertBefore(Y,W)}else{V.appendChild(Y)}}}function M(V){var t=N.extractContents();N.insertNode(V);V.appendChild(t);N.selectNode(V)}function K(){return k(new b(c),{startContainer:N[h],startOffset:N[U],endContainer:N[P],endOffset:N[z],collapsed:N.collapsed,commonAncestorContainer:N.commonAncestorContainer})}function O(t,V){var W;if(t.nodeType==3){return t}if(V<0){return t}W=t.firstChild;while(W&&V>0){--V;W=W.nextSibling}if(W){return W}return t}function l(){return(N[h]==N[P]&&N[U]==N[z])}function G(X,Z,V,Y){var aa,W,t,ab,ad,ac;if(X==V){if(Z==Y){return 0}if(Z0){N.collapse(V)}}else{N.collapse(V)}N.collapsed=l();N.commonAncestorContainer=c.findCommonAncestor(N[h],N[P])}function m(ab){var aa,X=0,ad=0,V,Z,W,Y,t,ac;if(N[h]==N[P]){return f(ab)}for(aa=N[P],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[h]){return r(aa,ab)}++X}for(aa=N[h],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[P]){return T(aa,ab)}++ad}Z=ad-X;W=N[h];while(Z>0){W=W.parentNode;Z--}Y=N[P];while(Z<0){Y=Y.parentNode;Z++}for(t=W.parentNode,ac=Y.parentNode;t!=ac;t=t.parentNode,ac=ac.parentNode){W=t;Y=ac}return o(W,Y,ab)}function f(Z){var ab,Y,X,aa,t,W,V;if(Z!=j){ab=e.createDocumentFragment()}if(N[U]==N[z]){return ab}if(N[h].nodeType==3){Y=N[h].nodeValue;X=Y.substring(N[U],N[z]);if(Z!=E){N[h].deleteData(N[U],N[z]-N[U]);N.collapse(D)}if(Z==j){return}ab.appendChild(e.createTextNode(X));return ab}aa=O(N[h],N[U]);t=N[z]-N[U];while(t>0){W=aa.nextSibling;V=y(aa,Z);if(ab){ab.appendChild(V)}--t;aa=W}if(Z!=E){N.collapse(D)}return ab}function r(ab,Y){var aa,Z,V,t,X,W;if(Y!=j){aa=e.createDocumentFragment()}Z=i(ab,Y);if(aa){aa.appendChild(Z)}V=n(ab);t=V-N[U];if(t<=0){if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}Z=ab.previousSibling;while(t>0){X=Z.previousSibling;W=y(Z,Y);if(aa){aa.insertBefore(W,aa.firstChild)}--t;Z=X}if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}function T(Z,Y){var ab,V,aa,t,X,W;if(Y!=j){ab=e.createDocumentFragment()}aa=Q(Z,Y);if(ab){ab.appendChild(aa)}V=n(Z);++V;t=N[z]-V;aa=Z.nextSibling;while(t>0){X=aa.nextSibling;W=y(aa,Y);if(ab){ab.appendChild(W)}--t;aa=X}if(Y!=E){N.setStartAfter(Z);N.collapse(D)}return ab}function o(Z,t,ac){var W,ae,Y,aa,ab,V,ad,X;if(ac!=j){ae=e.createDocumentFragment()}W=Q(Z,ac);if(ae){ae.appendChild(W)}Y=Z.parentNode;aa=n(Z);ab=n(t);++aa;V=ab-aa;ad=Z.nextSibling;while(V>0){X=ad.nextSibling;W=y(ad,ac);if(ae){ae.appendChild(W)}ad=X;--V}W=i(t,ac);if(ae){ae.appendChild(W)}if(ac!=E){N.setStartAfter(Z);N.collapse(D)}return ae}function i(aa,ab){var W=O(N[P],N[z]-1),ac,Z,Y,t,V,X=W!=N[P];if(W==aa){return L(W,X,R,ab)}ac=W.parentNode;Z=L(ac,R,R,ab);while(ac){while(W){Y=W.previousSibling;t=L(W,X,R,ab);if(ab!=j){Z.insertBefore(t,Z.firstChild)}X=D;W=Y}if(ac==aa){return Z}W=ac.previousSibling;ac=ac.parentNode;V=L(ac,R,R,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function Q(aa,ab){var X=O(N[h],N[U]),Y=X!=N[h],ac,Z,W,t,V;if(X==aa){return L(X,Y,D,ab)}ac=X.parentNode;Z=L(ac,R,D,ab);while(ac){while(X){W=X.nextSibling;t=L(X,Y,D,ab);if(ab!=j){Z.appendChild(t)}Y=D;X=W}if(ac==aa){return Z}X=ac.nextSibling;ac=ac.parentNode;V=L(ac,R,D,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function L(t,Y,ab,ac){var X,W,Z,V,aa;if(Y){return y(t,ac)}if(t.nodeType==3){X=t.nodeValue;if(ab){V=N[U];W=X.substring(V);Z=X.substring(0,V)}else{V=N[z];W=X.substring(0,V);Z=X.substring(V)}if(ac!=E){t.nodeValue=Z}if(ac==j){return}aa=t.cloneNode(R);aa.nodeValue=W;return aa}if(ac==j){return}return t.cloneNode(R)}function y(V,t){if(t!=j){return t==E?V.cloneNode(D):V}V.parentNode.removeChild(V)}}a.Range=b})(tinymce.dom);(function(){function a(g){var i=this,j="\uFEFF",e,h,d=g.dom,c=true,f=false;function b(){var n=g.getRng(),k=d.createRng(),m,o;m=n.item?n.item(0):n.parentElement();if(m.ownerDocument!=d.doc){return k}o=g.isCollapsed();if(n.item||!m.hasChildNodes()){if(o){k.setStart(m,0);k.setEnd(m,0)}else{k.setStart(m.parentNode,d.nodeIndex(m));k.setEnd(k.startContainer,k.startOffset+1)}return k}function l(s){var u,q,t,p,A=0,x,y,z,r,v;r=n.duplicate();r.collapse(s);u=d.create("a");z=r.parentElement();if(!z.hasChildNodes()){k[s?"setStart":"setEnd"](z,0);return}z.appendChild(u);r.moveToElementText(u);v=n.compareEndPoints(s?"StartToStart":"EndToEnd",r);if(v>0){k[s?"setStartAfter":"setEndAfter"](z);d.remove(u);return}p=tinymce.grep(z.childNodes);x=p.length-1;while(A<=x){y=Math.floor((A+x)/2);z.insertBefore(u,p[y]);r.moveToElementText(u);v=n.compareEndPoints(s?"StartToStart":"EndToEnd",r);if(v>0){A=y+1}else{if(v<0){x=y-1}else{found=true;break}}}q=v>0||y==0?u.nextSibling:u.previousSibling;if(q.nodeType==1){d.remove(u);t=d.nodeIndex(q);q=q.parentNode;if(!s||y>0){t++}}else{if(v>0||y==0){r.setEndPoint(s?"StartToStart":"EndToEnd",n);t=r.text.length}else{r.setEndPoint(s?"StartToStart":"EndToEnd",n);t=q.nodeValue.length-r.text.length}d.remove(u)}k[s?"setStart":"setEnd"](q,t)}l(true);if(!o){l()}return k}this.addRange=function(k){var p,n,m,r,u,s,t=g.dom.doc,o=t.body;function l(B){var x,A,v,z,y;v=d.create("a");x=B?m:u;A=B?r:s;z=p.duplicate();if(x==t||x==t.documentElement){x=o;A=0}if(x.nodeType==3){x.parentNode.insertBefore(v,x);z.moveToElementText(v);z.moveStart("character",A);d.remove(v);p.setEndPoint(B?"StartToStart":"EndToEnd",z)}else{y=x.childNodes;if(y.length){if(A>=y.length){d.insertAfter(v,y[y.length-1])}else{x.insertBefore(v,y[A])}z.moveToElementText(v)}else{v=t.createTextNode(j);x.appendChild(v);z.moveToElementText(v.parentNode);z.collapse(c)}p.setEndPoint(B?"StartToStart":"EndToEnd",z);d.remove(v)}}this.destroy();m=k.startContainer;r=k.startOffset;u=k.endContainer;s=k.endOffset;p=o.createTextRange();if(m==u&&m.nodeType==1&&r==s-1){if(r==s-1){try{n=o.createControlRange();n.addElement(m.childNodes[r]);n.select();return}catch(q){}}}l(true);l();p.select()};this.getRangeAt=function(){if(!e||!tinymce.dom.RangeUtils.compareRanges(h,g.getRng())){e=b();h=g.getRng()}try{e.startContainer.nextSibling}catch(k){e=b();h=null}return e};this.destroy=function(){h=e=null}}tinymce.dom.TridentSelection=a})();(function(){var p=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,j=0,d=Object.prototype.toString,o=false,i=true;[0,0].sort(function(){i=false;return 0});var b=function(v,e,z,A){z=z||[];e=e||document;var C=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!v||typeof v!=="string"){return z}var x=[],s,E,H,r,u=true,t=b.isXML(e),B=v,D,G,F,y;do{p.exec("");s=p.exec(B);if(s){B=s[3];x.push(s[1]);if(s[2]){r=s[3];break}}}while(s);if(x.length>1&&k.exec(v)){if(x.length===2&&f.relative[x[0]]){E=h(x[0]+x[1],e)}else{E=f.relative[x[0]]?[e]:b(x.shift(),e);while(x.length){v=x.shift();if(f.relative[v]){v+=x.shift()}E=h(v,E)}}}else{if(!A&&x.length>1&&e.nodeType===9&&!t&&f.match.ID.test(x[0])&&!f.match.ID.test(x[x.length-1])){D=b.find(x.shift(),e,t);e=D.expr?b.filter(D.expr,D.set)[0]:D.set[0]}if(e){D=A?{expr:x.pop(),set:a(A)}:b.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&e.parentNode?e.parentNode:e,t);E=D.expr?b.filter(D.expr,D.set):D.set;if(x.length>0){H=a(E)}else{u=false}while(x.length){G=x.pop();F=G;if(!f.relative[G]){G=""}else{F=x.pop()}if(F==null){F=e}f.relative[G](H,F,t)}}else{H=x=[]}}if(!H){H=E}if(!H){b.error(G||v)}if(d.call(H)==="[object Array]"){if(!u){z.push.apply(z,H)}else{if(e&&e.nodeType===1){for(y=0;H[y]!=null;y++){if(H[y]&&(H[y]===true||H[y].nodeType===1&&b.contains(e,H[y]))){z.push(E[y])}}}else{for(y=0;H[y]!=null;y++){if(H[y]&&H[y].nodeType===1){z.push(E[y])}}}}}else{a(H,z)}if(r){b(r,C,z,A);b.uniqueSort(z)}return z};b.uniqueSort=function(r){if(c){o=i;r.sort(c);if(o){for(var e=1;e":function(x,r){var u=typeof r==="string",v,s=0,e=x.length;if(u&&!/\W/.test(r)){r=r.toLowerCase();for(;s=0)){if(!s){e.push(v)}}else{if(s){r[u]=false}}}}return false},ID:function(e){return e[1].replace(/\\/g,"")},TAG:function(r,e){return r[1].toLowerCase()},CHILD:function(e){if(e[1]==="nth"){var r=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(r[1]+(r[2]||1))-0;e[3]=r[3]-0}e[0]=j++;return e},ATTR:function(u,r,s,e,v,x){var t=u[1].replace(/\\/g,"");if(!x&&f.attrMap[t]){u[1]=f.attrMap[t]}if(u[2]==="~="){u[4]=" "+u[4]+" "}return u},PSEUDO:function(u,r,s,e,v){if(u[1]==="not"){if((p.exec(u[3])||"").length>1||/^\w/.test(u[3])){u[3]=b(u[3],null,null,r)}else{var t=b.filter(u[3],r,s,true^v);if(!s){e.push.apply(e,t)}return false}}else{if(f.match.POS.test(u[0])||f.match.CHILD.test(u[0])){return true}}return u},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){e.parentNode.selectedIndex;return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(s,r,e){return !!b(e[3],s).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(e){return"text"===e.type},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toLowerCase()==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)}},setFilters:{first:function(r,e){return e===0},last:function(s,r,e,t){return r===t.length-1},even:function(r,e){return e%2===0},odd:function(r,e){return e%2===1},lt:function(s,r,e){return re[3]-0},nth:function(s,r,e){return e[3]-0===r},eq:function(s,r,e){return e[3]-0===r}},filter:{PSEUDO:function(s,y,x,z){var e=y[1],r=f.filters[e];if(r){return r(s,x,y,z)}else{if(e==="contains"){return(s.textContent||s.innerText||b.getText([s])||"").indexOf(y[3])>=0}else{if(e==="not"){var t=y[3];for(var v=0,u=t.length;v=0)}}},ID:function(r,e){return r.nodeType===1&&r.getAttribute("id")===e},TAG:function(r,e){return(e==="*"&&r.nodeType===1)||r.nodeName.toLowerCase()===e},CLASS:function(r,e){return(" "+(r.className||r.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(v,t){var s=t[1],e=f.attrHandle[s]?f.attrHandle[s](v):v[s]!=null?v[s]:v.getAttribute(s),x=e+"",u=t[2],r=t[4];return e==null?u==="!=":u==="="?x===r:u==="*="?x.indexOf(r)>=0:u==="~="?(" "+x+" ").indexOf(r)>=0:!r?x&&e!==false:u==="!="?x!==r:u==="^="?x.indexOf(r)===0:u==="$="?x.substr(x.length-r.length)===r:u==="|="?x===r||x.substr(0,r.length+1)===r+"-":false},POS:function(u,r,s,v){var e=r[2],t=f.setFilters[e];if(t){return t(u,s,r,v)}}}};var k=f.match.POS,g=function(r,e){return"\\"+(e-0+1)};for(var m in f.match){f.match[m]=new RegExp(f.match[m].source+(/(?![^\[]*\])(?![^\(]*\))/.source));f.leftMatch[m]=new RegExp(/(^(?:.|\r|\n)*?)/.source+f.match[m].source.replace(/\\(\d+)/g,g))}var a=function(r,e){r=Array.prototype.slice.call(r,0);if(e){e.push.apply(e,r);return e}return r};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(l){a=function(u,t){var r=t||[],s=0;if(d.call(u)==="[object Array]"){Array.prototype.push.apply(r,u)}else{if(typeof u.length==="number"){for(var e=u.length;s";var e=document.documentElement;e.insertBefore(r,e.firstChild);if(document.getElementById(s)){f.find.ID=function(u,v,x){if(typeof v.getElementById!=="undefined"&&!x){var t=v.getElementById(u[1]);return t?t.id===u[1]||typeof t.getAttributeNode!=="undefined"&&t.getAttributeNode("id").nodeValue===u[1]?[t]:undefined:[]}};f.filter.ID=function(v,t){var u=typeof v.getAttributeNode!=="undefined"&&v.getAttributeNode("id");return v.nodeType===1&&u&&u.nodeValue===t}}e.removeChild(r);e=r=null})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){f.find.TAG=function(r,v){var u=v.getElementsByTagName(r[1]);if(r[1]==="*"){var t=[];for(var s=0;u[s];s++){if(u[s].nodeType===1){t.push(u[s])}}u=t}return u}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){f.attrHandle.href=function(r){return r.getAttribute("href",2)}}e=null})();if(document.querySelectorAll){(function(){var e=b,s=document.createElement("div");s.innerHTML="

    ";if(s.querySelectorAll&&s.querySelectorAll(".TEST").length===0){return}b=function(x,v,t,u){v=v||document;if(!u&&v.nodeType===9&&!b.isXML(v)){try{return a(v.querySelectorAll(x),t)}catch(y){}}return e(x,v,t,u)};for(var r in e){b[r]=e[r]}s=null})()}(function(){var e=document.createElement("div");e.innerHTML="
    ";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}f.order.splice(1,0,"CLASS");f.find.CLASS=function(r,s,t){if(typeof s.getElementsByClassName!=="undefined"&&!t){return s.getElementsByClassName(r[1])}};e=null})();function n(r,x,v,A,y,z){for(var t=0,s=A.length;t0){u=e;break}}}e=e[r]}A[t]=u}}}b.contains=document.compareDocumentPosition?function(r,e){return !!(r.compareDocumentPosition(e)&16)}:function(r,e){return r!==e&&(r.contains?r.contains(e):true)};b.isXML=function(e){var r=(e?e.ownerDocument||e:0).documentElement;return r?r.nodeName!=="HTML":false};var h=function(e,y){var t=[],u="",v,s=y.nodeType?[y]:y;while((v=f.match.PSEUDO.exec(e))){u+=v[0];e=e.replace(f.match.PSEUDO,"")}e=f.relative[e]?e+"*":e;for(var x=0,r=s.length;x=0;h--){k=g[h];if(k.obj===l){j._remove(k.obj,k.name,k.cfunc);k.obj=k.cfunc=null;g.splice(h,1)}}}},cancel:function(g){if(!g){return false}this.stop(g);return this.prevent(g)},stop:function(g){if(g.stopPropagation){g.stopPropagation()}else{g.cancelBubble=true}return false},prevent:function(g){if(g.preventDefault){g.preventDefault()}else{g.returnValue=false}return false},destroy:function(){var g=this;f(g.events,function(j,h){g._remove(j.obj,j.name,j.cfunc);j.obj=j.cfunc=null});g.events=[];g=null},_add:function(h,i,g){if(h.attachEvent){h.attachEvent("on"+i,g)}else{if(h.addEventListener){h.addEventListener(i,g,false)}else{h["on"+i]=g}}},_remove:function(i,j,h){if(i){try{if(i.detachEvent){i.detachEvent("on"+j,h)}else{if(i.removeEventListener){i.removeEventListener(j,h,false)}else{i["on"+j]=null}}}catch(g){}}},_pageInit:function(h){var g=this;if(g.domLoaded){return}g.domLoaded=true;f(g.inits,function(i){i()});g.inits=[]},_wait:function(i){var g=this,h=i.document;if(i.tinyMCE_GZ&&tinyMCE_GZ.loaded){g.domLoaded=1;return}if(h.attachEvent){h.attachEvent("onreadystatechange",function(){if(h.readyState==="complete"){h.detachEvent("onreadystatechange",arguments.callee);g._pageInit(i)}});if(h.documentElement.doScroll&&i==i.top){(function(){if(g.domLoaded){return}try{h.documentElement.doScroll("left")}catch(j){setTimeout(arguments.callee,0);return}g._pageInit(i)})()}}else{if(h.addEventListener){g._add(i,"DOMContentLoaded",function(){g._pageInit(i)})}}g._add(i,"load",function(){g._pageInit(i)})},_stoppers:{preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}}});a=d.dom.Event=new d.dom.EventUtils();a._wait(window);d.addUnload(function(){a.destroy()})})(tinymce);(function(a){a.dom.Element=function(f,d){var b=this,e,c;b.settings=d=d||{};b.id=f;b.dom=e=d.dom||a.DOM;if(!a.isIE){c=e.get(b.id)}a.each(("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get").split(/,/),function(g){b[g]=function(){var h=[f],j;for(j=0;j_';if(f.startContainer==l&&f.endContainer==l){l.body.innerHTML=k}else{f.deleteContents();if(l.body.childNodes.length==0){l.body.innerHTML=k}else{if(f.createContextualFragment){f.insertNode(f.createContextualFragment(k))}else{m=l.createDocumentFragment();g=l.createElement("div");m.appendChild(g);g.outerHTML=k;f.insertNode(m)}}}i=h.dom.get("__caret");f=l.createRange();f.setStartBefore(i);f.setEndBefore(i);h.setRng(f);h.dom.remove("__caret");h.setRng(f)}else{if(f.item){l.execCommand("Delete",false,null);f=h.getRng()}f.pasteHTML(k)}if(!j.no_events){h.onSetContent.dispatch(h,j)}},getStart:function(){var g=this.getRng(),h,f,j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}j=g.duplicate();j.collapse(1);h=j.parentElement();f=i=g.parentElement();while(i=i.parentNode){if(i==h){h=f;break}}return h}else{h=g.startContainer;if(h.nodeType==1&&h.hasChildNodes()){h=h.childNodes[Math.min(h.childNodes.length-1,g.startOffset)]}if(h&&h.nodeType==3){return h.parentNode}return h}},getEnd:function(){var g=this,h=g.getRng(),i,f;if(h.duplicate||h.item){if(h.item){return h.item(0)}h=h.duplicate();h.collapse(0);i=h.parentElement();if(i&&i.nodeName=="BODY"){return i.lastChild||i}return i}else{i=h.endContainer;f=h.endOffset;if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[f>0?f-1:f]}if(i&&i.nodeType==3){return i.parentNode}return i}},getBookmark:function(r,s){var v=this,m=v.dom,g,j,i,n,h,o,p,l="\uFEFF",u;function f(x,y){var t=0;d(m.select(x),function(A,z){if(A==y){t=z}});return t}if(r==2){function k(){var x=v.getRng(true),t=m.getRoot(),y={};function z(C,H){var B=C[H?"startContainer":"endContainer"],G=C[H?"startOffset":"endOffset"],A=[],D,F,E=0;if(B.nodeType==3){if(s){for(D=B.previousSibling;D&&D.nodeType==3;D=D.previousSibling){G+=D.nodeValue.length}}A.push(G)}else{F=B.childNodes;if(G>=F.length&&F.length){E=1;G=Math.max(0,F.length-1)}A.push(v.dom.nodeIndex(F[G],s)+E)}for(;B&&B!=t;B=B.parentNode){A.push(v.dom.nodeIndex(B,s))}return A}y.start=z(x,true);if(!v.isCollapsed()){y.end=z(x)}return y}return k()}if(r){return{rng:v.getRng()}}g=v.getRng();i=m.uniqueId();n=tinyMCE.activeEditor.selection.isCollapsed();u="overflow:hidden;line-height:0px";if(g.duplicate||g.item){if(!g.item){j=g.duplicate();try{g.collapse();g.pasteHTML(''+l+"");if(!n){j.collapse(false);g.moveToElementText(j.parentElement());if(g.compareEndPoints("StartToEnd",j)==0){j.move("character",-1)}j.pasteHTML(''+l+"")}}catch(q){return null}}else{o=g.item(0);h=o.nodeName;return{name:h,index:f(h,o)}}}else{o=v.getNode();h=o.nodeName;if(h=="IMG"){return{name:h,index:f(h,o)}}j=g.cloneRange();if(!n){j.collapse(false);j.insertNode(m.create("span",{"data-mce-type":"bookmark",id:i+"_end",style:u},l))}g.collapse(true);g.insertNode(m.create("span",{"data-mce-type":"bookmark",id:i+"_start",style:u},l))}v.moveToBookmark({id:i,keep:1});return{id:i}},moveToBookmark:function(n){var r=this,l=r.dom,i,h,f,q,j,s,o,p;if(r.tridentSel){r.tridentSel.destroy()}if(n){if(n.start){f=l.createRng();q=l.getRoot();function g(z){var t=n[z?"start":"end"],v,x,y,u;if(t){y=t[0];for(x=q,v=t.length-1;v>=1;v--){u=x.childNodes;if(t[v]>u.length-1){return}x=u[t[v]]}if(x.nodeType===3){y=Math.min(t[0],x.nodeValue.length)}if(x.nodeType===1){y=Math.min(t[0],x.childNodes.length)}if(z){f.setStart(x,y)}else{f.setEnd(x,y)}}return true}if(g(true)&&g()){r.setRng(f)}}else{if(n.id){function k(A){var u=l.get(n.id+"_"+A),z,t,x,y,v=n.keep;if(u){z=u.parentNode;if(A=="start"){if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}j=s=z;o=p=t}else{if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}s=z;p=t}if(!v){y=u.previousSibling;x=u.nextSibling;d(c.grep(u.childNodes),function(B){if(B.nodeType==3){B.nodeValue=B.nodeValue.replace(/\uFEFF/g,"")}});while(u=l.get(n.id+"_"+A)){l.remove(u,1)}if(y&&x&&y.nodeType==x.nodeType&&y.nodeType==3&&!c.isOpera){t=y.nodeValue.length;y.appendData(x.nodeValue);l.remove(x);if(A=="start"){j=s=y;o=p=t}else{s=y;p=t}}}}}function m(t){if(l.isBlock(t)&&!t.innerHTML){t.innerHTML=!a?'
    ':" "}return t}k("start");k("end");if(j){f=l.createRng();f.setStart(m(j),o);f.setEnd(m(s),p);r.setRng(f)}}else{if(n.name){r.select(l.select(n.name)[n.index])}else{if(n.rng){r.setRng(n.rng)}}}}}},select:function(k,j){var i=this,l=i.dom,g=l.createRng(),f;if(k){f=l.nodeIndex(k);g.setStart(k.parentNode,f);g.setEnd(k.parentNode,f+1);if(j){function h(m,o){var n=new c.dom.TreeWalker(m,m);do{if(m.nodeType==3&&c.trim(m.nodeValue).length!=0){if(o){g.setStart(m,0)}else{g.setEnd(m,m.nodeValue.length)}return}if(m.nodeName=="BR"){if(o){g.setStartBefore(m)}else{g.setEndBefore(m)}return}}while(m=(o?n.next():n.prev()))}h(k,1);h(k)}i.setRng(g)}return k},isCollapsed:function(){var f=this,h=f.getRng(),g=f.getSel();if(!h||h.item){return false}if(h.compareEndPoints){return h.compareEndPoints("StartToEnd",h)===0}return !g||h.collapsed},collapse:function(f){var h=this,g=h.getRng(),i;if(g.item){i=g.item(0);g=h.win.document.body.createTextRange();g.moveToElementText(i)}g.collapse(!!f);h.setRng(g)},getSel:function(){var g=this,f=this.win;return f.getSelection?f.getSelection():f.document.selection},getRng:function(l){var g=this,h,i,k,j=g.win.document;if(l&&g.tridentSel){return g.tridentSel.getRangeAt(0)}try{if(h=g.getSel()){i=h.rangeCount>0?h.getRangeAt(0):(h.createRange?h.createRange():j.createRange())}}catch(f){}if(c.isIE&&i&&i.setStart&&j.selection.createRange().item){k=j.selection.createRange().item(0);i=j.createRange();i.setStartBefore(k);i.setEndAfter(k)}if(!i){i=j.createRange?j.createRange():j.body.createTextRange()}if(g.selectedRange&&g.explicitRange){if(i.compareBoundaryPoints(i.START_TO_START,g.selectedRange)===0&&i.compareBoundaryPoints(i.END_TO_END,g.selectedRange)===0){i=g.explicitRange}else{g.selectedRange=null;g.explicitRange=null}}return i},setRng:function(i){var h,g=this;if(!g.tridentSel){h=g.getSel();if(h){g.explicitRange=i;try{h.removeAllRanges()}catch(f){}h.addRange(i);g.selectedRange=h.getRangeAt(0)}}else{if(i.cloneRange){g.tridentSel.addRange(i);return}try{i.select()}catch(f){}}},setNode:function(g){var f=this;f.setContent(f.dom.getOuterHTML(g));return g},getNode:function(){var h=this,g=h.getRng(),i=h.getSel(),l,k=g.startContainer,f=g.endContainer;if(!g){return h.dom.getRoot()}if(g.setStart){l=g.commonAncestorContainer;if(!g.collapsed){if(g.startContainer==g.endContainer){if(g.endOffset-g.startOffset<2){if(g.startContainer.hasChildNodes()){l=g.startContainer.childNodes[g.startOffset]}}}if(k.nodeType===3&&f.nodeType===3){function j(p,m){var o=p;while(p&&p.nodeType===3&&p.length===0){p=m?p.nextSibling:p.previousSibling}return p||o}if(k.length===g.startOffset){k=j(k.nextSibling,true)}else{k=k.parentNode}if(g.endOffset===0){f=j(f.previousSibling,false)}else{f=f.parentNode}if(k&&k===f){return k}}}if(l&&l.nodeType==3){return l.parentNode}return l}return g.item?g.item(0):g.parentElement()},getSelectedBlocks:function(g,f){var i=this,j=i.dom,m,h,l,k=[];m=j.getParent(g||i.getStart(),j.isBlock);h=j.getParent(f||i.getEnd(),j.isBlock);if(m){k.push(m)}if(m&&h&&m!=h){l=m;while((l=l.nextSibling)&&l!=h){if(j.isBlock(l)){k.push(l)}}}if(h&&m!=h){k.push(h)}return k},destroy:function(g){var f=this;f.win=null;if(f.tridentSel){f.tridentSel.destroy()}if(!g){c.removeUnload(f.destroy)}},_fixIESelection:function(){var g=this.dom,m=g.doc,h=m.body,j,n,f;m.documentElement.unselectable=true;function i(o,r){var p=h.createTextRange();try{p.moveToPoint(o,r)}catch(q){p=null}return p}function l(p){var o;if(p.button){o=i(p.x,p.y);if(o){if(o.compareEndPoints("StartToStart",n)>0){o.setEndPoint("StartToStart",n)}else{o.setEndPoint("EndToEnd",n)}o.select()}}else{k()}}function k(){var o=m.selection.createRange();if(n&&!o.item&&o.compareEndPoints("StartToEnd",o)===0){n.select()}g.unbind(m,"mouseup",k);g.unbind(m,"mousemove",l);n=j=0}g.bind(m,["mousedown","contextmenu"],function(o){if(o.target.nodeName==="HTML"){if(j){k()}f=m.documentElement;if(f.scrollHeight>f.clientHeight){return}j=1;n=i(o.x,o.y);if(n){g.bind(m,"mouseup",k);g.bind(m,"mousemove",l);g.win.focus();n.select()}}})}})})(tinymce);(function(a){a.dom.Serializer=function(e,i,f){var h,b,d=a.isIE,g=a.each,c;if(!e.apply_source_formatting){e.indent=false}e.remove_trailing_brs=true;i=i||a.DOM;f=f||new a.html.Schema(e);e.entity_encoding=e.entity_encoding||"named";h=new a.util.Dispatcher(self);b=new a.util.Dispatcher(self);c=new a.html.DomParser(e,f);c.addAttributeFilter("src,href,style",function(k,j){var o=k.length,l,q,n="data-mce-"+j,p=e.url_converter,r=e.url_converter_scope,m;while(o--){l=k[o];q=l.attributes.map[n];if(q!==m){l.attr(j,q.length>0?q:null);l.attr(n,null)}else{q=l.attributes.map[j];if(j==="style"){q=i.serializeStyle(i.parseStyle(q),l.name)}else{if(p){q=p.call(r,q,j,l.name)}}l.attr(j,q.length>0?q:null)}}});c.addAttributeFilter("class",function(j,k){var l=j.length,m,n;while(l--){m=j[l];n=m.attr("class").replace(/\s*mce(Item\w+|Selected)\s*/g,"");m.attr("class",n.length>0?n:null)}});c.addAttributeFilter("data-mce-type",function(j,l,k){var m=j.length,n;while(m--){n=j[m];if(n.attributes.map["data-mce-type"]==="bookmark"&&!k.cleanup){n.remove()}}});c.addNodeFilter("script,style",function(k,l){var m=k.length,n,o;function j(p){return p.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(\/\/\s*|\]\]>|-->|\]\]-->)\s*$/g,"")}while(m--){n=k[m];o=n.firstChild?n.firstChild.value:"";if(l==="script"){n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,""));if(o.length>0){n.firstChild.value="// "}}else{if(o.length>0){n.firstChild.value=""}}}});c.addNodeFilter("#comment",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.value.indexOf("[CDATA[")===0){m.name="#cdata";m.type=4;m.value=m.value.replace(/^\[CDATA\[|\]\]$/g,"")}else{if(m.value.indexOf("mce:protected ")===0){m.name="#text";m.type=3;m.raw=true;m.value=unescape(m.value).substr(14)}}}});c.addNodeFilter("xml:namespace,input",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.type===7){m.remove()}else{if(m.type===1){if(k==="input"&&!("type" in m.attributes.map)){m.attr("type","text")}}}}});if(e.fix_list_elements){c.addNodeFilter("ul,ol",function(k,l){var m=k.length,n,j;while(m--){n=k[m];j=n.parent;if(j.name==="ul"||j.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}c.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(j,k){var l=j.length;while(l--){j[l].attr(k,null)}});return{schema:f,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,onPreProcess:h,onPostProcess:b,serialize:function(o,m){var l,p,k,j,n;if(d&&i.select("script,style,select").length>0){n=o.innerHTML;o=o.cloneNode(false);i.setHTML(o,n)}else{o=o.cloneNode(true)}l=o.ownerDocument.implementation;if(l.createHTMLDocument){p=l.createHTMLDocument("");g(o.nodeName=="BODY"?o.childNodes:[o],function(q){p.body.appendChild(p.importNode(q,true))});if(o.nodeName!="BODY"){o=p.body.firstChild}else{o=p.body}k=i.doc;i.doc=p}m=m||{};m.format=m.format||"html";if(!m.no_events){m.node=o;h.dispatch(self,m)}j=new a.html.Serializer(e,f);m.content=j.serialize(c.parse(m.getInner?o.innerHTML:a.trim(i.getOuterHTML(o),m),m));if(!m.cleanup){m.content=m.content.replace(/\uFEFF/g,"")}if(!m.no_events){b.dispatch(self,m)}if(k){i.doc=k}m.node=null;return m.content},addRules:function(j){f.addValidElements(j)},setRules:function(j){f.setValidElements(j)}}}})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],f={},d=[],g=0,e;function b(m,v){var x=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}v()}function u(){if(typeof(console)!=="undefined"&&console.log){console.log("Failed to load: "+m)}}n=q.uniqueId();if(a.isIE6){o=new a.util.URI(m);r=location;if(o.host==r.hostname&&o.port==r.port&&(o.protocol+":")==r.protocol&&o.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(y){var t=q.create("script",{type:"text/javascript"});t.text=y;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()},error:u});return}}s=q.create("script",{id:n,type:"text/javascript",src:a._addVer(m)});if(!a.isIE){s.onload=p}s.onerror=u;if(!a.isOpera){s.onreadystatechange=function(){var t=s.readyState;if(t=="complete"||t=="loaded"){p()}}}(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}this.isDone=function(m){return l[m]==i};this.markDone=function(m){l[m]=i};this.add=this.load=function(m,q,n){var o,p=l[m];if(p==e){j.push(m);l[m]=c}if(q){if(!f[m]){f[m]=[]}f[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){var o;function n(r){a.each(f[r],function(s){s.func.call(s.scope)});f[r]=e}d.push({func:q,scope:p||this});o=function(){var r=a.grep(m);m.length=0;a.each(r,function(s){if(l[s]==i){n(s);return}if(l[s]!=k){l[s]=k;g++;b(s,function(){l[s]=i;g--;n(s);o()})}});if(!g){a.each(d,function(s){s.func.call(s.scope)});d.length=0}};o()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);tinymce.dom.TreeWalker=function(a,c){var b=a;function d(i,f,e,j){var h,g;if(i){if(!j&&i[f]){return i[f]}if(i!=c){h=i[e];if(h){return h}for(g=i.parentNode;g&&g!=c;g=g.parentNode){h=g[e];if(h){return h}}}}}this.current=function(){return b};this.next=function(e){return(b=d(b,"firstChild","nextSibling",e))};this.prev=function(e){return(b=d(b,"lastChild","previousSibling",e))}};(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,r){var h=d.startContainer,k=d.startOffset,s=d.endContainer,l=d.endOffset,i,f,n,g,q,p,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(t){r([t])});return}function o(v,u,t){var x=[];for(;v&&v!=t;v=v[u]){x.push(v)}return x}function m(u,t){do{if(u.parentNode==t){return u}u=u.parentNode}while(u)}function j(v,u,x){var t=x?"nextSibling":"previousSibling";for(g=v,q=g.parentNode;g&&g!=u;g=q){q=g.parentNode;p=o(g==v?g:g[t],t);if(p.length){if(!x){p.reverse()}r(p)}}}if(h.nodeType==1&&h.hasChildNodes()){h=h.childNodes[k]}if(s.nodeType==1&&s.hasChildNodes()){s=s.childNodes[Math.min(l-1,s.childNodes.length-1)]}i=c.findCommonAncestor(h,s);if(h==s){return r([h])}for(g=h;g;g=g.parentNode){if(g==s){return j(h,i,true)}if(g==i){break}}for(g=s;g;g=g.parentNode){if(g==h){return j(s,i)}if(g==i){break}}f=m(h,i)||h;n=m(s,i)||s;j(h,f,true);p=o(f==h?f:f.nextSibling,"nextSibling",n==s?n.nextSibling:n);if(p.length){r(p)}j(s,n)}};a.dom.RangeUtils.compareRanges=function(c,b){if(c&&b){if(c.item||c.duplicate){if(c.item&&b.item&&c.item(0)===b.item(0)){return true}if(c.isEqual&&b.isEqual&&b.isEqual(c)){return true}}else{return c.startContainer==b.startContainer&&c.startOffset==b.startOffset}}return false}})(tinymce);(function(b){var a=b.dom.Event,c=b.each;b.create("tinymce.ui.KeyboardNavigation",{KeyboardNavigation:function(e,f){var p=this,m=e.root,l=e.items,n=e.enableUpDown,i=e.enableLeftRight||!e.enableUpDown,k=e.excludeFromTabOrder,j,h,o,d,g;f=f||b.DOM;j=function(q){g=q.target.id};h=function(q){f.setAttrib(q.target.id,"tabindex","-1")};d=function(q){var r=f.get(g);f.setAttrib(r,"tabindex","0");r.focus()};p.focus=function(){f.get(g).focus()};p.destroy=function(){c(l,function(q){f.unbind(f.get(q.id),"focus",j);f.unbind(f.get(q.id),"blur",h)});f.unbind(f.get(m),"focus",d);f.unbind(f.get(m),"keydown",o);l=f=m=p.focus=j=h=o=d=null;p.destroy=function(){}};p.moveFocus=function(u,r){var q=-1,t=p.controls,s;if(!g){return}c(l,function(x,v){if(x.id===g){q=v;return false}});q+=u;if(q<0){q=l.length-1}else{if(q>=l.length){q=0}}s=l[q];f.setAttrib(g,"tabindex","-1");f.setAttrib(s.id,"tabindex","0");f.get(s.id).focus();if(e.actOnFocus){e.onAction(s.id)}if(r){a.cancel(r)}};o=function(y){var u=37,t=39,x=38,z=40,q=27,s=14,r=13,v=32;switch(y.keyCode){case u:if(i){p.moveFocus(-1)}break;case t:if(i){p.moveFocus(1)}break;case x:if(n){p.moveFocus(-1)}break;case z:if(n){p.moveFocus(1)}break;case q:if(e.onCancel){e.onCancel();a.cancel(y)}break;case s:case r:case v:if(e.onAction){e.onAction(g);a.cancel(y)}break}};c(l,function(s,q){var r;if(!s.id){s.id=f.uniqueId("_mce_item_")}if(k){f.bind(s.id,"blur",h);r="-1"}else{r=(q===0?"0":"-1")}f.setAttrib(s.id,"tabindex",r);f.bind(f.get(s.id),"focus",j)});if(l[0]){g=l[0].id}f.setAttrib(m,"tabindex","-1");f.bind(f.get(m),"focus",d);f.bind(f.get(m),"keydown",o)}})})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(f,e,d){this.id=f;this.settings=e=e||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=e.scope||this;this.disabled=0;this.active=0;this.editor=d},setAriaProperty:function(f,e){var d=b.get(this.id+"_aria")||b.get(this.id);if(d){b.setAttrib(d,"aria-"+f,!!e)}},focus:function(){b.get(this.id).focus()},setDisabled:function(d){if(d!=this.disabled){this.setAriaProperty("disabled",d);this.setState("Disabled",d);this.setState("Enabled",!d);this.disabled=d}},isDisabled:function(){return this.disabled},setActive:function(d){if(d!=this.active){this.setState("Active",d);this.active=d;this.setAriaProperty("pressed",d)}},isActive:function(){return this.active},setState:function(f,d){var e=b.get(this.id);f=this.classPrefix+f;if(d){b.addClass(e,f)}else{b.removeClass(e,f)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(d){b.setHTML(d,this.renderHTML())},postRender:function(){var e=this,d;if(a(e.disabled)){d=e.disabled;e.disabled=-1;e.setDisabled(d)}if(a(e.active)){d=e.active;e.active=-1;e.setActive(d)}},remove:function(){b.remove(this.id);this.destroy()},destroy:function(){c.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b,a){this.parent(c,b,a);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(b,a){this.parent(b,a);this.classPrefix="mceSeparator";this.setDisabled(true)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}});(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(g,f){this.parent(g,f);this.classPrefix="mceMenuItem"},setSelected:function(f){this.setState("Selected",f);this.setAriaProperty("checked",!!f);this.selected=f},isSelected:function(){return this.selected},postRender:function(){var f=this;f.parent();if(c(f.selected)){f.setSelected(f.selected)}}})})(tinymce);(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(h,g){var f=this;f.parent(h,g);f.items={};f.collapsed=false;f.menuCount=0;f.onAddItem=new d.util.Dispatcher(this)},expand:function(g){var f=this;if(g){a(f,function(h){if(h.expand){h.expand()}},"items",f)}f.collapsed=false},collapse:function(g){var f=this;if(g){a(f,function(h){if(h.collapse){h.collapse()}},"items",f)}f.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){if(!f.settings){f=new d.ui.MenuItem(f.id||b.uniqueId(),f)}this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){if(!f.collapse){f=this.createMenu(f)}this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;a(f,function(g){if(g.removeAll){g.removeAll()}else{g.remove()}g.destroy()},"items",f);f.items={}},createMenu:function(g){var f=new d.ui.Menu(g.id||b.uniqueId(),g);f.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return f}})})(tinymce);(function(e){var d=e.is,c=e.DOM,f=e.each,a=e.dom.Event,b=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,g){g=g||{};g.container=g.container||c.doc.body;g.offset_x=g.offset_x||0;g.offset_y=g.offset_y||0;g.vp_offset_x=g.vp_offset_x||0;g.vp_offset_y=g.vp_offset_y||0;if(d(g.icons)&&!g.icons){g["class"]+=" mceNoIcons"}this.parent(h,g);this.onShowMenu=new e.util.Dispatcher(this);this.onHideMenu=new e.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var h=this,i=h.settings,g;j.container=j.container||i.container;j.parent=h;j.constrain=j.constrain||i.constrain;j["class"]=j["class"]||i["class"];j.vp_offset_x=j.vp_offset_x||i.vp_offset_x;j.vp_offset_y=j.vp_offset_y||i.vp_offset_y;j.keyboard_focus=i.keyboard_focus;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},focus:function(){var g=this;if(g.keyboardNav){g.keyboardNav.focus()}},update:function(){var i=this,j=i.settings,g=c.get("menu_"+i.id+"_tbl"),l=c.get("menu_"+i.id+"_co"),h,k;h=j.max_width?Math.min(g.clientWidth,j.max_width):g.clientWidth;k=j.max_height?Math.min(g.clientHeight,j.max_height):g.clientHeight;if(!c.boxModel){i.element.setStyles({width:h+2,height:k+2})}else{i.element.setStyles({width:h,height:k})}if(j.max_width){c.setStyle(l,"width",h)}if(j.max_height){c.setStyle(l,"height",k);if(g.clientHeightv){p=r?r-u:Math.max(0,(v-A.vp_offset_x)-u)}if((n+A.vp_offset_y+l)>q){n=Math.max(0,(q-A.vp_offset_y)-l)}}c.setStyles(o,{left:p,top:n});z.element.update();z.isMenuVisible=1;z.mouseClickFunc=a.add(o,"click",function(s){var h;s=s.target;if(s&&(s=c.getParent(s,"tr"))&&!c.hasClass(s,m+"ItemSub")){h=z.items[s.id];if(h.isDisabled()){return}k=z;while(k){if(k.hideMenu){k.hideMenu()}k=k.settings.parent}if(h.settings.onclick){h.settings.onclick(s)}return a.cancel(s)}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(x){var h,t,s;x=x.target;if(x&&(x=c.getParent(x,"tr"))){h=z.items[x.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(x&&c.hasClass(x,m+"ItemSub")){t=c.getRect(x);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}a.add(o,"keydown",z._keyHandler,z);z.onShowMenu.dispatch(z);if(A.keyboard_focus){z._setupKeyboardNav()}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(i,"mouseover",g.mouseOverFunc);a.remove(i,"click",g.mouseClickFunc);a.remove(i,"keydown",g._keyHandler);c.hide(i);g.isMenuVisible=0;if(!j){g.collapse(1)}if(g.element){g.element.hide()}if(h=c.get(g.id)){c.removeClass(h.firstChild,g.classPrefix+"ItemActive")}g.onHideMenu.dispatch(g)},add:function(i){var g=this,h;i=g.parent(i);if(g.isRendered&&(h=c.get("menu_"+g.id))){g._add(c.select("tbody",h)[0],i)}return i},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){c.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=this,h=c.get("menu_"+g.id);if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(h,"mouseover",g.mouseOverFunc);a.remove(c.select("a",h),"focus",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);a.remove(h,"keydown",g._keyHandler);if(g.element){g.element.remove()}c.remove(h)},renderNode:function(){var i=this,j=i.settings,l,h,k,g;g=c.create("div",{role:"listbox",id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"});if(i.settings.parent){c.setAttrib(g,"aria-parent","menu_"+i.settings.parent.id)}k=c.add(g,"div",{role:"presentation",id:"menu_"+i.id+"_co","class":i.classPrefix+(j["class"]?" "+j["class"]:"")});i.element=new b("menu_"+i.id,{blocker:1,container:j.container});if(j.menu_line){c.add(k,"span",{"class":i.classPrefix+"Line"})}l=c.add(k,"table",{role:"presentation",id:"menu_"+i.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});h=c.add(l,"tbody");f(i.items,function(m){i._add(h,m)});i.rendered=true;return g},_setupKeyboardNav:function(){var i,h,g=this;i=c.select("#menu_"+g.id)[0];h=c.select("a[role=option]","menu_"+g.id);h.splice(0,0,i);g.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+g.id,items:h,onCancel:function(){g.hideMenu()},enableUpDown:true});i.focus()},_keyHandler:function(g){var h=this,i;switch(g.keyCode){case 37:if(h.settings.parent){h.hideMenu();h.settings.parent.focus();a.cancel(g)}break;case 39:if(h.mouseOverFunc){h.mouseOverFunc(g)}break}},_add:function(j,h){var i,q=h.settings,p,l,k,m=this.classPrefix,g;if(q.separator){l=c.add(j,"tr",{id:h.id,"class":m+"ItemSeparator"});c.add(l,"td",{"class":m+"ItemSeparator"});if(i=l.previousSibling){c.addClass(i,"mceLast")}return}i=l=c.add(j,"tr",{id:h.id,"class":m+"Item "+m+"ItemEnabled"});i=k=c.add(i,q.titleItem?"th":"td");i=p=c.add(i,"a",{id:h.id+"_aria",role:q.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});if(q.parent){c.setAttrib(p,"aria-haspopup","true");c.setAttrib(p,"aria-owns","menu_"+h.id)}c.addClass(k,q["class"]);g=c.add(i,"span",{"class":"mceIcon"+(q.icon?" mce_"+q.icon:"")});if(q.icon_src){c.add(g,"img",{src:q.icon_src})}i=c.add(i,q.element||"span",{"class":"mceText",title:h.settings.title},h.settings.title);if(h.settings.style){c.setAttrib(i,"style",h.settings.style)}if(j.childNodes.length==1){c.addClass(l,"mceFirst")}if((i=l.previousSibling)&&c.hasClass(i,m+"ItemSeparator")){c.addClass(l,"mceFirst")}if(h.collapse){c.addClass(l,m+"ItemSub")}if(i=l.previousSibling){c.removeClass(i,"mceLast")}c.addClass(l,"mceLast")}})})(tinymce);(function(b){var a=b.DOM;b.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,d,c){this.parent(e,d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='';if(e.image){d+=''+a.encode(e.title)+''+c}else{d+=''+(c?''+c+"":"")}d+='";d+="";return d},postRender:function(){var c=this,d=c.settings;b.dom.Event.add(c.id,"click",function(f){if(!c.isDisabled()){return d.onclick.call(d.scope,f)}})}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(i,h,f){var g=this;g.parent(i,h,f);g.items=[];g.onChange=new a(g);g.onPostRender=new a(g);g.onAdd=new a(g);g.onRenderMenu=new d.util.Dispatcher(this);g.classPrefix="mceListBox"},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&h.call){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){var g=this,h,i;if(f!=g.selectedIndex){h=c.get(g.id+"_text");i=g.items[f];if(i){g.selectedValue=i.value;g.selectedIndex=f;c.setHTML(h,c.encode(i.title));c.removeClass(h,"mceTitle");c.setAttrib(g.id,"aria-valuenow",i.title)}else{c.setHTML(h,c.encode(g.settings.title));c.addClass(h,"mceTitle");g.selectedValue=g.selectedIndex=null;c.setAttrib(g.id,"aria-valuenow",g.settings.title)}h=0}},add:function(i,f,h){var g=this;h=h||{};h=d.extend(h,{title:i,value:f});g.items.push(h);g.onAdd.dispatch(g,h)},getLength:function(){return this.items.length},renderHTML:function(){var i="",f=this,g=f.settings,j=f.classPrefix;i='';i+="";i+="";i+="";return i},showMenu:function(){var g=this,j,i,h=c.get(this.id),f;if(g.isDisabled()||g.items.length==0){return}if(g.menu&&g.menu.isMenuVisible){return g.hideMenu()}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}j=c.getPos(this.settings.menu_container);i=c.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.keyboard_focus=!d.isOpera;if(g.oldID){f.items[g.oldID].setSelected(0)}e(g.items,function(k){if(k.value===g.selectedValue){f.items[k.id].setSelected(1);g.oldID=k.id}});f.showMenu(0,h.clientHeight);b.add(c.doc,"mousedown",g.hideMenu,g);c.addClass(g.id,g.classPrefix+"Selected")},hideMenu:function(g){var f=this;if(f.menu&&f.menu.isMenuVisible){c.removeClass(f.id,f.classPrefix+"Selected");if(g&&g.type=="mousedown"&&(g.target.id==f.id+"_text"||g.target.id==f.id+"_open")){return}if(!g||!c.getParent(g.target,".mceMenu")){c.removeClass(f.id,f.classPrefix+"Selected");b.remove(c.doc,"mousedown",f.hideMenu,f);f.menu.hideMenu()}}},renderMenu:function(){var g=this,f;f=g.settings.control_manager.createDropMenu(g.id+"_menu",{menu_line:1,"class":g.classPrefix+"Menu mceNoIcons",max_width:150,max_height:150});f.onHideMenu.add(function(){g.hideMenu();g.focus()});f.add({title:g.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(g.settings.onselect("")!==false){g.select("")}}});e(g.items,function(h){if(h.value===undefined){f.add({title:h.title,"class":"mceMenuItemTitle",onclick:function(){if(g.settings.onselect("")!==false){g.select("")}}})}else{h.id=c.uniqueId();h.onclick=function(){if(g.settings.onselect(h.value)!==false){g.select(h.value)}};f.add(h)}});g.onRenderMenu.dispatch(g,f);g.menu=f},postRender:function(){var f=this,g=f.classPrefix;b.add(f.id,"click",f.showMenu,f);b.add(f.id,"keydown",function(h){if(h.keyCode==32){f.showMenu(h);b.cancel(h)}});b.add(f.id,"focus",function(){if(!f._focused){f.keyDownHandler=b.add(f.id,"keydown",function(h){if(h.keyCode==40){f.showMenu();b.cancel(h)}});f.keyPressHandler=b.add(f.id,"keypress",function(i){var h;if(i.keyCode==13){h=f.selectedValue;f.selectedValue=null;b.cancel(i);f.settings.onselect(h)}})}f._focused=1});b.add(f.id,"blur",function(){b.remove(f.id,"keydown",f.keyDownHandler);b.remove(f.id,"keypress",f.keyPressHandler);f._focused=0});if(d.isIE6||!c.boxModel){b.add(f.id,"mouseover",function(){if(!c.hasClass(f.id,g+"Disabled")){c.addClass(f.id,g+"Hover")}});b.add(f.id,"mouseout",function(){if(!c.hasClass(f.id,g+"Disabled")){c.removeClass(f.id,g+"Hover")}})}f.onPostRender.dispatch(f,c.get(f.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(g,f){this.parent(g,f);this.classPrefix="mceNativeListBox"},setDisabled:function(f){c.get(this.id).disabled=f;this.setAriaProperty("disabled",f)},isDisabled:function(){return c.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&h.call){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){c.get(this.id).selectedIndex=f+1;this.selectedValue=this.items[f]?this.items[f].value:null},add:function(j,g,f){var i,h=this;f=f||{};f.value=g;if(h.isRendered()){c.add(c.get(this.id),"option",f,j)}i={title:j,value:g,attribs:f};h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var g,f=this;g=c.createHTML("option",{value:""},"-- "+f.settings.title+" --");e(f.items,function(h){g+=c.createHTML("option",{value:h.value},h.title)});g=c.createHTML("select",{id:f.id,"class":"mceNativeListBox","aria-labelledby":f.id+"_aria"},g);g+=c.createHTML("span",{id:f.id+"_aria",style:"display: none"},f.settings.title);return g},postRender:function(){var g=this,h,i=true;g.rendered=true;function f(k){var j=g.items[k.target.selectedIndex-1];if(j&&(j=j.value)){g.onChange.dispatch(g,j);if(g.settings.onselect){g.settings.onselect(j)}}}b.add(g.id,"change",f);b.add(g.id,"keydown",function(k){var j;b.remove(g.id,"change",h);i=false;j=b.add(g.id,"blur",function(){if(i){return}i=true;b.add(g.id,"change",f);b.remove(g.id,"blur",j)});if(k.keyCode==13||k.keyCode==32){f(k);return b.cancel(k)}});g.onPostRender.dispatch(g,c.get(g.id))}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f,e){this.parent(g,f,e);this.onRenderMenu=new c.util.Dispatcher(this);f.menu_container=f.menu_container||b.doc.body},showMenu:function(){var g=this,j,i,h=b.get(g.id),f;if(g.isDisabled()){return}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible){return g.hideMenu()}j=b.getPos(g.settings.menu_container);i=b.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.vp_offset_x=i.x;f.settings.vp_offset_y=i.y;f.settings.keyboard_focus=g._focused;f.showMenu(0,h.clientHeight);a.add(b.doc,"mousedown",g.hideMenu,g);g.setState("Selected",1);g.isMenuVisible=1},renderMenu:function(){var f=this,e;e=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});e.onHideMenu.add(function(){f.hideMenu();f.focus()});f.onRenderMenu.dispatch(f,e);f.menu=e},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&b.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open"})){return}if(!g||!b.getParent(g.target,".mceMenu")){f.setState("Selected",0);a.remove(b.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}f.isMenuVisible=0},postRender:function(){var e=this,f=e.settings;a.add(e.id,"click",function(){if(!e.isDisabled()){if(f.onclick){f.onclick(e.value)}e.showMenu()}})}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f,e){this.parent(g,f,e);this.classPrefix="mceSplitButton"},renderHTML:function(){var i,f=this,g=f.settings,e;i="
    "+b.createHTML("a",{role:"button",id:f.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+""+b.createHTML("a",{role:"button",id:f.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"
    '+k.renderHTML()+""+k.renderHTML()+"
    ';i+="";i+="";i+="";return i},showMenu:function(){var g=this,j,i,h=c.get(this.id),f;if(g.isDisabled()||g.items.length==0){return}if(g.menu&&g.menu.isMenuVisible){return g.hideMenu()}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}j=c.getPos(this.settings.menu_container);i=c.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.keyboard_focus=!d.isOpera;if(g.oldID){f.items[g.oldID].setSelected(0)}e(g.items,function(k){if(k.value===g.selectedValue){f.items[k.id].setSelected(1);g.oldID=k.id}});f.showMenu(0,h.clientHeight);b.add(c.doc,"mousedown",g.hideMenu,g);c.addClass(g.id,g.classPrefix+"Selected")},hideMenu:function(g){var f=this;if(f.menu&&f.menu.isMenuVisible){c.removeClass(f.id,f.classPrefix+"Selected");if(g&&g.type=="mousedown"&&(g.target.id==f.id+"_text"||g.target.id==f.id+"_open")){return}if(!g||!c.getParent(g.target,".mceMenu")){c.removeClass(f.id,f.classPrefix+"Selected");b.remove(c.doc,"mousedown",f.hideMenu,f);f.menu.hideMenu()}}},renderMenu:function(){var g=this,f;f=g.settings.control_manager.createDropMenu(g.id+"_menu",{menu_line:1,"class":g.classPrefix+"Menu mceNoIcons",max_width:150,max_height:150});f.onHideMenu.add(function(){g.hideMenu();g.focus()});f.add({title:g.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(g.settings.onselect("")!==false){g.select("")}}});e(g.items,function(h){if(h.value===undefined){f.add({title:h.title,"class":"mceMenuItemTitle",onclick:function(){if(g.settings.onselect("")!==false){g.select("")}}})}else{h.id=c.uniqueId();h.onclick=function(){if(g.settings.onselect(h.value)!==false){g.select(h.value)}};f.add(h)}});g.onRenderMenu.dispatch(g,f);g.menu=f},postRender:function(){var f=this,g=f.classPrefix;b.add(f.id,"click",f.showMenu,f);b.add(f.id,"keydown",function(h){if(h.keyCode==32){f.showMenu(h);b.cancel(h)}});b.add(f.id,"focus",function(){if(!f._focused){f.keyDownHandler=b.add(f.id,"keydown",function(h){if(h.keyCode==40){f.showMenu();b.cancel(h)}});f.keyPressHandler=b.add(f.id,"keypress",function(i){var h;if(i.keyCode==13){h=f.selectedValue;f.selectedValue=null;b.cancel(i);f.settings.onselect(h)}})}f._focused=1});b.add(f.id,"blur",function(){b.remove(f.id,"keydown",f.keyDownHandler);b.remove(f.id,"keypress",f.keyPressHandler);f._focused=0});if(d.isIE6||!c.boxModel){b.add(f.id,"mouseover",function(){if(!c.hasClass(f.id,g+"Disabled")){c.addClass(f.id,g+"Hover")}});b.add(f.id,"mouseout",function(){if(!c.hasClass(f.id,g+"Disabled")){c.removeClass(f.id,g+"Hover")}})}f.onPostRender.dispatch(f,c.get(f.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(g,f){this.parent(g,f);this.classPrefix="mceNativeListBox"},setDisabled:function(f){c.get(this.id).disabled=f;this.setAriaProperty("disabled",f)},isDisabled:function(){return c.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&h.call){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){c.get(this.id).selectedIndex=f+1;this.selectedValue=this.items[f]?this.items[f].value:null},add:function(j,g,f){var i,h=this;f=f||{};f.value=g;if(h.isRendered()){c.add(c.get(this.id),"option",f,j)}i={title:j,value:g,attribs:f};h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var g,f=this;g=c.createHTML("option",{value:""},"-- "+f.settings.title+" --");e(f.items,function(h){g+=c.createHTML("option",{value:h.value},h.title)});g=c.createHTML("select",{id:f.id,"class":"mceNativeListBox","aria-labelledby":f.id+"_aria"},g);g+=c.createHTML("span",{id:f.id+"_aria",style:"display: none"},f.settings.title);return g},postRender:function(){var g=this,h,i=true;g.rendered=true;function f(k){var j=g.items[k.target.selectedIndex-1];if(j&&(j=j.value)){g.onChange.dispatch(g,j);if(g.settings.onselect){g.settings.onselect(j)}}}b.add(g.id,"change",f);b.add(g.id,"keydown",function(k){var j;b.remove(g.id,"change",h);i=false;j=b.add(g.id,"blur",function(){if(i){return}i=true;b.add(g.id,"change",f);b.remove(g.id,"blur",j)});if(k.keyCode==13||k.keyCode==32){f(k);return b.cancel(k)}});g.onPostRender.dispatch(g,c.get(g.id))}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f,e){this.parent(g,f,e);this.onRenderMenu=new c.util.Dispatcher(this);f.menu_container=f.menu_container||b.doc.body},showMenu:function(){var g=this,j,i,h=b.get(g.id),f;if(g.isDisabled()){return}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible){return g.hideMenu()}j=b.getPos(g.settings.menu_container);i=b.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.vp_offset_x=i.x;f.settings.vp_offset_y=i.y;f.settings.keyboard_focus=g._focused;f.showMenu(0,h.clientHeight);a.add(b.doc,"mousedown",g.hideMenu,g);g.setState("Selected",1);g.isMenuVisible=1},renderMenu:function(){var f=this,e;e=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});e.onHideMenu.add(function(){f.hideMenu();f.focus()});f.onRenderMenu.dispatch(f,e);f.menu=e},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&b.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open"})){return}if(!g||!b.getParent(g.target,".mceMenu")){f.setState("Selected",0);a.remove(b.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}f.isMenuVisible=0},postRender:function(){var e=this,f=e.settings;a.add(e.id,"click",function(){if(!e.isDisabled()){if(f.onclick){f.onclick(e.value)}e.showMenu()}})}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f,e){this.parent(g,f,e);this.classPrefix="mceSplitButton"},renderHTML:function(){var i,f=this,g=f.settings,e;i="
    "+b.createHTML("a",{role:"button",id:f.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+""+b.createHTML("a",{role:"button",id:f.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"
    '+k.renderHTML()+""+k.renderHTML()+"
    '; + h += ''; + h += ''; + h += ''; + + return h; + }, + + showMenu : function() { + var t = this, p1, p2, e = DOM.get(this.id), m; + + if (t.isDisabled() || t.items.length == 0) + return; + + if (t.menu && t.menu.isMenuVisible) + return t.hideMenu(); + + if (!t.isMenuRendered) { + t.renderMenu(); + t.isMenuRendered = true; + } + + p1 = DOM.getPos(this.settings.menu_container); + p2 = DOM.getPos(e); + + m = t.menu; + m.settings.offset_x = p2.x; + m.settings.offset_y = p2.y; + m.settings.keyboard_focus = !tinymce.isOpera; // Opera is buggy when it comes to auto focus + + // Select in menu + if (t.oldID) + m.items[t.oldID].setSelected(0); + + each(t.items, function(o) { + if (o.value === t.selectedValue) { + m.items[o.id].setSelected(1); + t.oldID = o.id; + } + }); + + m.showMenu(0, e.clientHeight); + + Event.add(DOM.doc, 'mousedown', t.hideMenu, t); + DOM.addClass(t.id, t.classPrefix + 'Selected'); + + //DOM.get(t.id + '_text').focus(); + }, + + hideMenu : function(e) { + var t = this; + + if (t.menu && t.menu.isMenuVisible) { + DOM.removeClass(t.id, t.classPrefix + 'Selected'); + + // Prevent double toogles by canceling the mouse click event to the button + if (e && e.type == "mousedown" && (e.target.id == t.id + '_text' || e.target.id == t.id + '_open')) + return; + + if (!e || !DOM.getParent(e.target, '.mceMenu')) { + DOM.removeClass(t.id, t.classPrefix + 'Selected'); + Event.remove(DOM.doc, 'mousedown', t.hideMenu, t); + t.menu.hideMenu(); + } + } + }, + + renderMenu : function() { + var t = this, m; + + m = t.settings.control_manager.createDropMenu(t.id + '_menu', { + menu_line : 1, + 'class' : t.classPrefix + 'Menu mceNoIcons', + max_width : 150, + max_height : 150 + }); + + m.onHideMenu.add(function() { + t.hideMenu(); + t.focus(); + }); + + m.add({ + title : t.settings.title, + 'class' : 'mceMenuItemTitle', + onclick : function() { + if (t.settings.onselect('') !== false) + t.select(''); // Must be runned after + } + }); + + each(t.items, function(o) { + // No value then treat it as a title + if (o.value === undefined) { + m.add({ + title : o.title, + 'class' : 'mceMenuItemTitle', + onclick : function() { + if (t.settings.onselect('') !== false) + t.select(''); // Must be runned after + } + }); + } else { + o.id = DOM.uniqueId(); + o.onclick = function() { + if (t.settings.onselect(o.value) !== false) + t.select(o.value); // Must be runned after + }; + + m.add(o); + } + }); + + t.onRenderMenu.dispatch(t, m); + t.menu = m; + }, + + postRender : function() { + var t = this, cp = t.classPrefix; + + Event.add(t.id, 'click', t.showMenu, t); + Event.add(t.id, 'keydown', function(evt) { + if (evt.keyCode == 32) { // Space + t.showMenu(evt); + Event.cancel(evt); + } + }); + Event.add(t.id, 'focus', function() { + if (!t._focused) { + t.keyDownHandler = Event.add(t.id, 'keydown', function(e) { + if (e.keyCode == 40) { + t.showMenu(); + Event.cancel(e); + } + }); + t.keyPressHandler = Event.add(t.id, 'keypress', function(e) { + var v; + if (e.keyCode == 13) { + // Fake select on enter + v = t.selectedValue; + t.selectedValue = null; // Needs to be null to fake change + Event.cancel(e); + t.settings.onselect(v); + } + }); + } + + t._focused = 1; + }); + Event.add(t.id, 'blur', function() { + Event.remove(t.id, 'keydown', t.keyDownHandler); + Event.remove(t.id, 'keypress', t.keyPressHandler); + t._focused = 0; + }); + + // Old IE doesn't have hover on all elements + if (tinymce.isIE6 || !DOM.boxModel) { + Event.add(t.id, 'mouseover', function() { + if (!DOM.hasClass(t.id, cp + 'Disabled')) + DOM.addClass(t.id, cp + 'Hover'); + }); + + Event.add(t.id, 'mouseout', function() { + if (!DOM.hasClass(t.id, cp + 'Disabled')) + DOM.removeClass(t.id, cp + 'Hover'); + }); + } + + t.onPostRender.dispatch(t, DOM.get(t.id)); + }, + + destroy : function() { + this.parent(); + + Event.clear(this.id + '_text'); + Event.clear(this.id + '_open'); + } + }); +})(tinymce); +(function(tinymce) { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, Dispatcher = tinymce.util.Dispatcher; + + tinymce.create('tinymce.ui.NativeListBox:tinymce.ui.ListBox', { + NativeListBox : function(id, s) { + this.parent(id, s); + this.classPrefix = 'mceNativeListBox'; + }, + + setDisabled : function(s) { + DOM.get(this.id).disabled = s; + this.setAriaProperty('disabled', s); + }, + + isDisabled : function() { + return DOM.get(this.id).disabled; + }, + + select : function(va) { + var t = this, fv, f; + + if (va == undefined) + return t.selectByIndex(-1); + + // Is string or number make function selector + if (va && va.call) + f = va; + else { + f = function(v) { + return v == va; + }; + } + + // Do we need to do something? + if (va != t.selectedValue) { + // Find item + each(t.items, function(o, i) { + if (f(o.value)) { + fv = 1; + t.selectByIndex(i); + return false; + } + }); + + if (!fv) + t.selectByIndex(-1); + } + }, + + selectByIndex : function(idx) { + DOM.get(this.id).selectedIndex = idx + 1; + this.selectedValue = this.items[idx] ? this.items[idx].value : null; + }, + + add : function(n, v, a) { + var o, t = this; + + a = a || {}; + a.value = v; + + if (t.isRendered()) + DOM.add(DOM.get(this.id), 'option', a, n); + + o = { + title : n, + value : v, + attribs : a + }; + + t.items.push(o); + t.onAdd.dispatch(t, o); + }, + + getLength : function() { + return this.items.length; + }, + + renderHTML : function() { + var h, t = this; + + h = DOM.createHTML('option', {value : ''}, '-- ' + t.settings.title + ' --'); + + each(t.items, function(it) { + h += DOM.createHTML('option', {value : it.value}, it.title); + }); + + h = DOM.createHTML('select', {id : t.id, 'class' : 'mceNativeListBox', 'aria-labelledby': t.id + '_aria'}, h); + h += DOM.createHTML('span', {id : t.id + '_aria', 'style': 'display: none'}, t.settings.title); + return h; + }, + + postRender : function() { + var t = this, ch, changeListenerAdded = true; + + t.rendered = true; + + function onChange(e) { + var v = t.items[e.target.selectedIndex - 1]; + + if (v && (v = v.value)) { + t.onChange.dispatch(t, v); + + if (t.settings.onselect) + t.settings.onselect(v); + } + }; + + Event.add(t.id, 'change', onChange); + + // Accessibility keyhandler + Event.add(t.id, 'keydown', function(e) { + var bf; + + Event.remove(t.id, 'change', ch); + changeListenerAdded = false; + + bf = Event.add(t.id, 'blur', function() { + if (changeListenerAdded) return; + changeListenerAdded = true; + Event.add(t.id, 'change', onChange); + Event.remove(t.id, 'blur', bf); + }); + + if (e.keyCode == 13 || e.keyCode == 32) { + onChange(e); + return Event.cancel(e); + } + }); + + t.onPostRender.dispatch(t, DOM.get(t.id)); + } + }); +})(tinymce); +(function(tinymce) { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each; + + tinymce.create('tinymce.ui.MenuButton:tinymce.ui.Button', { + MenuButton : function(id, s, ed) { + this.parent(id, s, ed); + + this.onRenderMenu = new tinymce.util.Dispatcher(this); + + s.menu_container = s.menu_container || DOM.doc.body; + }, + + showMenu : function() { + var t = this, p1, p2, e = DOM.get(t.id), m; + + if (t.isDisabled()) + return; + + if (!t.isMenuRendered) { + t.renderMenu(); + t.isMenuRendered = true; + } + + if (t.isMenuVisible) + return t.hideMenu(); + + p1 = DOM.getPos(t.settings.menu_container); + p2 = DOM.getPos(e); + + m = t.menu; + m.settings.offset_x = p2.x; + m.settings.offset_y = p2.y; + m.settings.vp_offset_x = p2.x; + m.settings.vp_offset_y = p2.y; + m.settings.keyboard_focus = t._focused; + m.showMenu(0, e.clientHeight); + + Event.add(DOM.doc, 'mousedown', t.hideMenu, t); + t.setState('Selected', 1); + + t.isMenuVisible = 1; + }, + + renderMenu : function() { + var t = this, m; + + m = t.settings.control_manager.createDropMenu(t.id + '_menu', { + menu_line : 1, + 'class' : this.classPrefix + 'Menu', + icons : t.settings.icons + }); + + m.onHideMenu.add(function() { + t.hideMenu(); + t.focus(); + }); + + t.onRenderMenu.dispatch(t, m); + t.menu = m; + }, + + hideMenu : function(e) { + var t = this; + + // Prevent double toogles by canceling the mouse click event to the button + if (e && e.type == "mousedown" && DOM.getParent(e.target, function(e) {return e.id === t.id || e.id === t.id + '_open';})) + return; + + if (!e || !DOM.getParent(e.target, '.mceMenu')) { + t.setState('Selected', 0); + Event.remove(DOM.doc, 'mousedown', t.hideMenu, t); + if (t.menu) + t.menu.hideMenu(); + } + + t.isMenuVisible = 0; + }, + + postRender : function() { + var t = this, s = t.settings; + + Event.add(t.id, 'click', function() { + if (!t.isDisabled()) { + if (s.onclick) + s.onclick(t.value); + + t.showMenu(); + } + }); + } + }); +})(tinymce); + +(function(tinymce) { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each; + + tinymce.create('tinymce.ui.SplitButton:tinymce.ui.MenuButton', { + SplitButton : function(id, s, ed) { + this.parent(id, s, ed); + this.classPrefix = 'mceSplitButton'; + }, + + renderHTML : function() { + var h, t = this, s = t.settings, h1; + + h = '
    ' + DOM.createHTML('a', {role: 'button', id : t.id + '_action', tabindex: '-1', href : 'javascript:;', 'class' : 'mceAction ' + s['class'], onclick : "return false;", onmousedown : 'return false;', title : s.title}, h1) + '' + DOM.createHTML('a', {role: 'button', id : t.id + '_open', tabindex: '-1', href : 'javascript:;', 'class' : 'mceOpen ' + s['class'], onclick : "return false;", onmousedown : 'return false;', title : s.title}, h1) + '
    ' + co.renderHTML() + '' + co.renderHTML() + '
    ';Q[Q.length]='
    ';var X,U=false;if(this.parent){if(this.index===0){X=true;}if(this.index==(this.parent.cfg.getProperty("pages")-1)){U=true;}}else{X=true;U=true;}if(X){M=this._buildMonthLabel(D.subtract(K,D.MONTH,1));var R=N.getProperty(B.NAV_ARROW_LEFT.key);if(R===null&&F.IMG_ROOT!==null){R=F.IMG_ROOT+O;}var I=(R===null)?"":' style="background-image:url('+R+')"';Q[Q.length]=''+V+" ("+M+")"+"";}var W=this.buildMonthLabel();var S=this.parent||this;if(S.cfg.getProperty("navigator")){W=''+W+"";}Q[Q.length]=W;if(U){M=this._buildMonthLabel(D.add(K,D.MONTH,1));var T=N.getProperty(B.NAV_ARROW_RIGHT.key);if(T===null&&F.IMG_ROOT!==null){T=F.IMG_ROOT+G;}var J=(T===null)?"":' style="background-image:url('+T+')"';Q[Q.length]=''+H+" ("+M+")"+"";}Q[Q.length]="
    \n
      
    ';G=this.renderHeader(G);G=this.renderBody(H,G);G=this.renderFooter(G);G[G.length]="
    ";this.oDomContainer.innerHTML=G.join("\n");this.applyListeners();this.cells=C.getElementsByClassName(this.Style.CSS_CELL,"td",this.id);this.cfg.refireEvent(B.TITLE.key);this.cfg.refireEvent(B.CLOSE.key);this.cfg.refireEvent(B.IFRAME.key);this.renderEvent.fire();},applyListeners:function(){var P=this.oDomContainer,H=this.parent||this,L="a",S="click";var M=C.getElementsByClassName(this.Style.CSS_NAV_LEFT,L,P),I=C.getElementsByClassName(this.Style.CSS_NAV_RIGHT,L,P);if(M&&M.length>0){this.linkLeft=M[0];A.addListener(this.linkLeft,S,this.doPreviousMonthNav,H,true);}if(I&&I.length>0){this.linkRight=I[0];A.addListener(this.linkRight,S,this.doNextMonthNav,H,true);}if(H.cfg.getProperty("navigator")!==null){this.applyNavListeners();}if(this.domEventMap){var J,G;for(var R in this.domEventMap){if(E.hasOwnProperty(this.domEventMap,R)){var N=this.domEventMap[R];if(!(N instanceof Array)){N=[N];}for(var K=0;K0){A.addListener(G,"click",function(N,M){var L=A.getTarget(N);if(this===L||C.isAncestor(this,L)){A.preventDefault(N);}var J=H.oNavigator;if(J){var K=I.cfg.getProperty("pagedate");J.setYear(K.getFullYear()+I.Locale.YEAR_OFFSET);J.setMonth(K.getMonth());J.show();}});}},getDateByCellId:function(H){var G=this.getDateFieldsByCellId(H);return(G)?D.getDate(G[0],G[1]-1,G[2]):null;},getDateFieldsByCellId:function(G){G=this.getIndexFromId(G);return(G>-1)?this.cellDates[G]:null;},getCellIndex:function(I){var H=-1;if(I){var G=I.getMonth(),N=I.getFullYear(),M=I.getDate(),K=this.cellDates;for(var J=0;J-1){H=parseInt(I.substring(G+5),10);}return H;},renderOutOfBoundsDate:function(H,G){C.addClass(G,this.Style.CSS_CELL_OOB);G.innerHTML=H.getDate();return F.STOP_RENDER;},renderRowHeader:function(H,G){G[G.length]='
    '+H+"'+H+"
    ';q[q.length]='
    ';var x,u=false;if(this.parent){if(this.index===0){x=true;}if(this.index==(this.parent.cfg.getProperty("pages")-1)){u=true;}}else{x=true;u=true;}if(x){m=this._buildMonthLabel(d.subtract(k,d.MONTH,1));var r=n.getProperty(b.NAV_ARROW_LEFT.key);if(r===null&&f.IMG_ROOT!==null){r=f.IMG_ROOT+o;}var i=(r===null)?"":' style="background-image:url('+r+')"';q[q.length]=''+v+" ("+m+")"+"";}var w=this.buildMonthLabel();var s=this.parent||this;if(s.cfg.getProperty("navigator")){w=''+w+"";}q[q.length]=w;if(u){m=this._buildMonthLabel(d.add(k,d.MONTH,1));var t=n.getProperty(b.NAV_ARROW_RIGHT.key);if(t===null&&f.IMG_ROOT!==null){t=f.IMG_ROOT+g;}var j=(t===null)?"":' style="background-image:url('+t+')"';q[q.length]=''+h+" ("+m+")"+"";}q[q.length]="
    \n
      
    ';g=this.renderHeader(g);g=this.renderBody(i,g);g=this.renderFooter(g);g[g.length]="
    ";this.oDomContainer.innerHTML=g.join("\n");this.applyListeners();h=((this._oDoc)&&this._oDoc.getElementById(this.id))||(this.id);this.cells=c.getElementsByClassName(this.Style.CSS_CELL,"td",h);this.cfg.refireEvent(b.TITLE.key);this.cfg.refireEvent(b.CLOSE.key);this.cfg.refireEvent(b.IFRAME.key);this.renderEvent.fire();},applyListeners:function(){var q=this.oDomContainer,h=this.parent||this,m="a",t="click";var n=c.getElementsByClassName(this.Style.CSS_NAV_LEFT,m,q),j=c.getElementsByClassName(this.Style.CSS_NAV_RIGHT,m,q);if(n&&n.length>0){this.linkLeft=n[0];a.addListener(this.linkLeft,t,this.doPreviousMonthNav,h,true);}if(j&&j.length>0){this.linkRight=j[0];a.addListener(this.linkRight,t,this.doNextMonthNav,h,true);}if(h.cfg.getProperty("navigator")!==null){this.applyNavListeners();}if(this.domEventMap){var k,g;for(var s in this.domEventMap){if(e.hasOwnProperty(this.domEventMap,s)){var o=this.domEventMap[s];if(!(o instanceof Array)){o=[o];}for(var l=0;l0){a.addListener(g,"click",function(n,m){var l=a.getTarget(n);if(this===l||c.isAncestor(this,l)){a.preventDefault(n);}var j=h.oNavigator;if(j){var k=i.cfg.getProperty("pagedate");j.setYear(k.getFullYear()+i.Locale.YEAR_OFFSET);j.setMonth(k.getMonth());j.show();}});}},getDateByCellId:function(h){var g=this.getDateFieldsByCellId(h);return(g)?d.getDate(g[0],g[1]-1,g[2]):null;},getDateFieldsByCellId:function(g){g=this.getIndexFromId(g);return(g>-1)?this.cellDates[g]:null;},getCellIndex:function(j){var h=-1;if(j){var g=j.getMonth(),p=j.getFullYear(),o=j.getDate(),l=this.cellDates;for(var k=0;k-1){h=parseInt(i.substring(g+5),10);}return h;},renderOutOfBoundsDate:function(h,g){c.addClass(g,this.Style.CSS_CELL_OOB);g.innerHTML=h.getDate();return f.STOP_RENDER;},renderRowHeader:function(h,g){g[g.length]='
    '+h+"'+h+"
    '; html = this.renderHeader(html); @@ -3324,8 +3336,12 @@ Calendar.prototype = { this.oDomContainer.innerHTML = html.join("\n"); this.applyListeners(); - this.cells = Dom.getElementsByClassName(this.Style.CSS_CELL, "td", this.id); - + + // Using oDomContainer.ownerDocument, to allow for cross-frame rendering + table = ((this._oDoc) && this._oDoc.getElementById(this.id)) || (this.id); + + this.cells = Dom.getElementsByClassName(this.Style.CSS_CELL, "td", table); + this.cfg.refireEvent(DEF_CFG.TITLE.key); this.cfg.refireEvent(DEF_CFG.CLOSE.key); this.cfg.refireEvent(DEF_CFG.IFRAME.key); @@ -3388,6 +3404,10 @@ Calendar.prototype = { Event.addListener(this.oDomContainer, "mouseout", this.doCellMouseOut, this); }, + /** + * Applies the DOM listeners to activate the Calendar Navigator. + * @method applyNavListeners + */ applyNavListeners : function() { var calParent = this.parent || this, cal = this, @@ -3491,7 +3511,6 @@ Calendar.prototype = { /** * Renders a cell that falls before the minimum date or after the maximum date. - * widget class. * @method renderOutOfBoundsDate * @param {Date} workingDate The current working Date object being used to generate the calendar * @param {HTMLTableCellElement} cell The current working cell in the calendar @@ -3505,10 +3524,11 @@ Calendar.prototype = { }, /** - * Renders the row header for a week. + * Renders the row header HTML for a week. + * * @method renderRowHeader * @param {Number} weekNum The week number of the current row - * @param {Array} cell The current working HTML array + * @param {HTML[]} cell The current working HTML array */ renderRowHeader : function(weekNum, html) { html[html.length] = ''; @@ -3516,21 +3536,24 @@ Calendar.prototype = { }, /** - * Renders the row footer for a week. + * Renders the row footer HTML for a week. + * * @method renderRowFooter * @param {Number} weekNum The week number of the current row - * @param {Array} cell The current working HTML array + * @param {HTML[]} cell The current working HTML array */ renderRowFooter : function(weekNum, html) { html[html.length] = ''; return html; }, - + /** * Renders a single standard calendar cell in the calendar widget table. + * * All logic for determining how a standard default cell will be rendered is * encapsulated in this method, and must be accounted for when extending the * widget class. + * * @method renderCellDefault * @param {Date} workingDate The current working Date object being used to generate the calendar * @param {HTMLTableCellElement} cell The current working cell in the calendar @@ -3611,10 +3634,11 @@ Calendar.prototype = { renderCellStyleSelected : function(workingDate, cell) { Dom.addClass(cell, this.Style.CSS_CELL_SELECTED); }, - + /** * Applies the default style used for rendering dates that are not a part of the current * month (preceding or trailing the cells for the current month) + * * @method renderCellNotThisMonth * @param {Date} workingDate The current working Date object being used to generate the calendar * @param {HTMLTableCellElement} cell The current working cell in the calendar @@ -3622,11 +3646,20 @@ Calendar.prototype = { * should not be terminated */ renderCellNotThisMonth : function(workingDate, cell) { - Dom.addClass(cell, this.Style.CSS_CELL_OOM); + this.styleCellNotThisMonth(workingDate, cell); cell.innerHTML=workingDate.getDate(); return Calendar.STOP_RENDER; }, - + + /** Applies the style used for rendering out-of-month dates to the current calendar cell + * @method styleCellNotThisMonth + * @param {Date} workingDate The current working Date object being used to generate the calendar + * @param {HTMLTableCellElement} cell The current working cell in the calendar + */ + styleCellNotThisMonth : function(workingDate, cell) { + YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_OOM); + }, + /** * Renders the current calendar cell as a non-selectable "black-out" date using the default * restricted style. @@ -3946,8 +3979,8 @@ Calendar.prototype = { selectDate = cellDate.concat(); if (cellDateIndex > -1) { - if (this.cfg.getProperty(DEF_CFG.PAGEDATE.key).getMonth() == dCellDate.getMonth() && - this.cfg.getProperty(DEF_CFG.PAGEDATE.key).getFullYear() == dCellDate.getFullYear()) { + if ((this.cfg.getProperty(DEF_CFG.PAGEDATE.key).getMonth() == dCellDate.getMonth() && + this.cfg.getProperty(DEF_CFG.PAGEDATE.key).getFullYear() == dCellDate.getFullYear()) || this.cfg.getProperty(DEF_CFG.OOM_SELECT.key)) { Dom.removeClass(cell, this.Style.CSS_CELL_SELECTED); } selected.splice(cellDateIndex, 1); @@ -4329,7 +4362,7 @@ Calendar.prototype = { resetRenderers : function() { this.renderStack = this._renderStack.concat(); }, - + /** * Removes all custom renderers added to the Calendar through the addRenderer, addMonthRenderer and * addWeekdayRenderer methods. Calendar's render method needs to be called after removing renderers @@ -4353,6 +4386,9 @@ Calendar.prototype = { /** * Adds a renderer to the render stack. The function reference passed to this method will be executed * when a date cell matches the conditions specified in the date string for this renderer. + * + *

    NOTE: The contents of the cell set by the renderer will be added to the DOM as HTML. The custom renderer implementation should + * escape markup used to set the cell contents, if coming from an external source.

    * @method addRenderer * @param {String} sDates A date string to associate with the specified renderer. Valid formats * include date (12/24/2005), month/day (12/24), and range (12/1/2004-1/1/2005) @@ -4394,8 +4430,11 @@ Calendar.prototype = { }, /** - * Adds a month to the render stack. The function reference passed to this method will be executed - * when a date cell matches the month passed to this method. + * Adds a month renderer to the render stack. The function reference passed to this method will be executed + * when a date cell matches the month passed to this method + * + *

    NOTE: The contents of the cell set by the renderer will be added to the DOM as HTML. The custom renderer implementation should + * escape markup used to set the cell contents, if coming from an external source.

    * @method addMonthRenderer * @param {Number} month The month (1-12) to associate with this renderer * @param {Function} fnRender The function executed to render cells that match the render rules for this renderer. @@ -4405,8 +4444,12 @@ Calendar.prototype = { }, /** - * Adds a weekday to the render stack. The function reference passed to this method will be executed + * Adds a weekday renderer to the render stack. The function reference passed to this method will be executed * when a date cell matches the weekday passed to this method. + * + *

    NOTE: The contents of the cell set by the renderer will be added to the DOM as HTML. The custom renderer implementation should + * escape HTML used to set the cell contents, if coming from an external source.

    + * * @method addWeekdayRenderer * @param {Number} weekday The weekday (Sunday = 1, Monday = 2 ... Saturday = 7) to associate with this renderer * @param {Function} fnRender The function executed to render cells that match the render rules for this renderer. @@ -4756,12 +4799,6 @@ CalendarGroup.prototype = { this.cfg.fireQueue(); - // OPERA HACK FOR MISWRAPPED FLOATS - if (YAHOO.env.ua.opera){ - this.renderEvent.subscribe(this._fixWidth, this, true); - this.showEvent.subscribe(this._fixWidth, this, true); - } - }, setupConfig : function() { @@ -4814,9 +4851,9 @@ CalendarGroup.prototype = { cfg.addProperty(DEF_CFG.SELECTED.key, { value:[], handler:this.configSelected } ); /** - * The title to display above the CalendarGroup's month header + * The title to display above the CalendarGroup's month header. The title is inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config title - * @type String + * @type HTML * @default "" */ cfg.addProperty(DEF_CFG.TITLE.key, { value:DEF_CFG.TITLE.value, handler:this.configTitle } ); @@ -4856,8 +4893,6 @@ CalendarGroup.prototype = { */ cfg.addProperty(DEF_CFG.MAXDATE.key, { value:DEF_CFG.MAXDATE.value, handler:this.delegateConfig } ); - // Options properties - /** * True if the Calendar should allow multiple selections. False by default. * @config MULTI_SELECT @@ -4866,6 +4901,14 @@ CalendarGroup.prototype = { */ cfg.addProperty(DEF_CFG.MULTI_SELECT.key, { value:DEF_CFG.MULTI_SELECT.value, handler:this.delegateConfig, validator:cfg.checkBoolean } ); + /** + * True if the Calendar should allow selection of out-of-month dates. False by default. + * @config OOM_SELECT + * @type Boolean + * @default false + */ + cfg.addProperty(DEF_CFG.OOM_SELECT.key, { value:DEF_CFG.OOM_SELECT.value, handler:this.delegateConfig, validator:cfg.checkBoolean } ); + /** * The weekday the week begins on. Default is 0 (Sunday). * @config START_WEEKDAY @@ -4905,18 +4948,18 @@ CalendarGroup.prototype = { * @default false */ cfg.addProperty(DEF_CFG.HIDE_BLANK_WEEKS.key,{ value:DEF_CFG.HIDE_BLANK_WEEKS.value, handler:this.delegateConfig, validator:cfg.checkBoolean } ); - + /** - * The image that should be used for the left navigation arrow. + * The image URL that should be used for the left navigation arrow. The image URL is inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config NAV_ARROW_LEFT * @type String * @deprecated You can customize the image by overriding the default CSS class for the left arrow - "calnavleft" * @default null */ cfg.addProperty(DEF_CFG.NAV_ARROW_LEFT.key, { value:DEF_CFG.NAV_ARROW_LEFT.value, handler:this.delegateConfig } ); - + /** - * The image that should be used for the right navigation arrow. + * The image URL that should be used for the right navigation arrow. The image URL is inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config NAV_ARROW_RIGHT * @type String * @deprecated You can customize the image by overriding the default CSS class for the right arrow - "calnavright" @@ -4927,51 +4970,51 @@ CalendarGroup.prototype = { // Locale properties /** - * The short month labels for the current locale. + * The short month labels for the current locale. The month labels are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config MONTHS_SHORT - * @type String[] + * @type HTML[] * @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] */ cfg.addProperty(DEF_CFG.MONTHS_SHORT.key, { value:DEF_CFG.MONTHS_SHORT.value, handler:this.delegateConfig } ); /** - * The long month labels for the current locale. + * The long month labels for the current locale. The month labels are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config MONTHS_LONG - * @type String[] + * @type HTML[] * @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" - */ + */ cfg.addProperty(DEF_CFG.MONTHS_LONG.key, { value:DEF_CFG.MONTHS_LONG.value, handler:this.delegateConfig } ); /** - * The 1-character weekday labels for the current locale. + * The 1-character weekday labels for the current locale. The weekday labels are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config WEEKDAYS_1CHAR - * @type String[] + * @type HTML[] * @default ["S", "M", "T", "W", "T", "F", "S"] - */ + */ cfg.addProperty(DEF_CFG.WEEKDAYS_1CHAR.key, { value:DEF_CFG.WEEKDAYS_1CHAR.value, handler:this.delegateConfig } ); /** - * The short weekday labels for the current locale. + * The short weekday labels for the current locale. The weekday labels are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config WEEKDAYS_SHORT - * @type String[] + * @type HTML[] * @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"] - */ + */ cfg.addProperty(DEF_CFG.WEEKDAYS_SHORT.key, { value:DEF_CFG.WEEKDAYS_SHORT.value, handler:this.delegateConfig } ); /** - * The medium weekday labels for the current locale. + * The medium weekday labels for the current locale. The weekday labels are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config WEEKDAYS_MEDIUM - * @type String[] + * @type HTML[] * @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] - */ + */ cfg.addProperty(DEF_CFG.WEEKDAYS_MEDIUM.key, { value:DEF_CFG.WEEKDAYS_MEDIUM.value, handler:this.delegateConfig } ); /** - * The long weekday labels for the current locale. + * The long weekday labels for the current locale. The weekday labels are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. * @config WEEKDAYS_LONG - * @type String[] + * @type HTML[] * @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] - */ + */ cfg.addProperty(DEF_CFG.WEEKDAYS_LONG.key, { value:DEF_CFG.WEEKDAYS_LONG.value, handler:this.delegateConfig } ); /** @@ -5103,9 +5146,49 @@ CalendarGroup.prototype = { cfg.addProperty(DEF_CFG.MY_LABEL_YEAR_SUFFIX.key, { value:DEF_CFG.MY_LABEL_YEAR_SUFFIX.value, handler:this.delegateConfig } ); /** - * Configuration for the Month Year Navigation UI. By default it is disabled - * @config NAV - * @type Object + * Configuration for the Month/Year CalendarNavigator UI which allows the user to jump directly to a + * specific Month/Year without having to scroll sequentially through months. + *

    + * Setting this property to null (default value) or false, will disable the CalendarNavigator UI. + *

    + *

    + * Setting this property to true will enable the CalendarNavigatior UI with the default CalendarNavigator configuration values. + *

    + *

    + * This property can also be set to an object literal containing configuration properties for the CalendarNavigator UI. + * The configuration object expects the the following case-sensitive properties, with the "strings" property being a nested object. + * Any properties which are not provided will use the default values (defined in the CalendarNavigator class). + *

    + *
    + *
    strings
    + *
    Object : An object with the properties shown below, defining the string labels to use in the Navigator's UI. The strings are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. + *
    + *
    month
    HTML : The markup to use for the month label. Defaults to "Month".
    + *
    year
    HTML : The markup to use for the year label. Defaults to "Year".
    + *
    submit
    HTML : The markup to use for the submit button label. Defaults to "Okay".
    + *
    cancel
    HTML : The markup to use for the cancel button label. Defaults to "Cancel".
    + *
    invalidYear
    HTML : The markup to use for invalid year values. Defaults to "Year needs to be a number".
    + *
    + *
    + *
    monthFormat
    String : The month format to use. Either YAHOO.widget.Calendar.LONG, or YAHOO.widget.Calendar.SHORT. Defaults to YAHOO.widget.Calendar.LONG
    + *
    initialFocus
    String : Either "year" or "month" specifying which input control should get initial focus. Defaults to "year"
    + *
    + *

    E.g.

    + *
    +        * var navConfig = {
    +        *   strings: {
    +        *    month:"Calendar Month",
    +        *    year:"Calendar Year",
    +        *    submit: "Submit",
    +        *    cancel: "Cancel",
    +        *    invalidYear: "Please enter a valid year"
    +        *   },
    +        *   monthFormat: YAHOO.widget.Calendar.SHORT,
    +        *   initialFocus: "month"
    +        * }
    +        * 
    + * @config navigator + * @type {Object|Boolean} * @default null */ cfg.addProperty(DEF_CFG.NAV.key, { value:DEF_CFG.NAV.value, handler:this.configNavigator } ); @@ -5117,9 +5200,9 @@ CalendarGroup.prototype = { * @type {Object} * @default An object with the properties shown below: *
    - *
    previousMonth
    String : The string to use for the "Previous Month" navigation UI. Defaults to "Previous Month".
    - *
    nextMonth
    String : The string to use for the "Next Month" navigation UI. Defaults to "Next Month".
    - *
    close
    String : The string to use for the close button label. Defaults to "Close".
    + *
    previousMonth
    HTML : The markup to use for the "Previous Month" navigation label. Defaults to "Previous Month". The string is added to the DOM as HTML, and should be escaped by the implementor if coming from an external source.
    + *
    nextMonth
    HTML : The markup to use for the "Next Month" navigation UI. Defaults to "Next Month". The string is added to the DOM as HTML, and should be escaped by the implementor if coming from an external source.
    + *
    close
    HTML : The markup to use for the close button label. Defaults to "Close". The string is added to the DOM as HTML, and should be escaped by the implementor if coming from an external source.
    *
    */ cfg.addProperty(DEF_CFG.STRINGS.key, { @@ -5721,6 +5804,9 @@ CalendarGroup.prototype = { /** * Adds a renderer to the render stack. The function reference passed to this method will be executed * when a date cell matches the conditions specified in the date string for this renderer. + * + *

    NOTE: The contents of the cell set by the renderer will be added to the DOM as HTML. The custom renderer implementation should + * escape markup used to set the cell contents, if coming from an external source.

    * @method addRenderer * @param {String} sDates A date string to associate with the specified renderer. Valid formats * include date (12/24/2005), month/day (12/24), and range (12/1/2004-1/1/2005) @@ -5734,8 +5820,11 @@ CalendarGroup.prototype = { }, /** - * Adds a month to the render stack. The function reference passed to this method will be executed - * when a date cell matches the month passed to this method. + * Adds a month renderer to the render stack. The function reference passed to this method will be executed + * when a date cell matches the month passed to this method + * + *

    NOTE: The contents of the cell set by the renderer will be added to the DOM as HTML. The custom renderer implementation should + * escape markup used to set the cell contents, if coming from an external source.

    * @method addMonthRenderer * @param {Number} month The month (1-12) to associate with this renderer * @param {Function} fnRender The function executed to render cells that match the render rules for this renderer. @@ -5748,10 +5837,14 @@ CalendarGroup.prototype = { }, /** - * Adds a weekday to the render stack. The function reference passed to this method will be executed + * Adds a weekday renderer to the render stack. The function reference passed to this method will be executed * when a date cell matches the weekday passed to this method. + * + *

    NOTE: The contents of the cell set by the renderer will be added to the DOM as HTML. The custom renderer implementation should + * escape HTML used to set the cell contents, if coming from an external source.

    + * * @method addWeekdayRenderer - * @param {Number} weekday The weekday (1-7) to associate with this renderer. 1=Sunday, 2=Monday etc. + * @param {Number} weekday The weekday (Sunday = 1, Monday = 2 ... Saturday = 7) to associate with this renderer * @param {Function} fnRender The function executed to render cells that match the render rules for this renderer. */ addWeekdayRenderer : function(weekday, fnRender) { @@ -5997,6 +6090,7 @@ YAHOO.lang.augmentProto(CalendarGroup, Calendar, "buildDayLabel", "renderCellStyleToday", "renderCellStyleSelected", "renderCellNotThisMonth", + "styleCellNotThisMonth", "renderBodyCellRestricted", "initStyles", "configTitle", @@ -6159,11 +6253,11 @@ YAHOO.widget.CalendarNavigator = function(cal) { *

    strings
    *
    Object : An object with the properties shown below, defining the string labels to use in the Navigator's UI *
    - *
    month
    String : The string to use for the month label. Defaults to "Month".
    - *
    year
    String : The string to use for the year label. Defaults to "Year".
    - *
    submit
    String : The string to use for the submit button label. Defaults to "Okay".
    - *
    cancel
    String : The string to use for the cancel button label. Defaults to "Cancel".
    - *
    invalidYear
    String : The string to use for invalid year values. Defaults to "Year needs to be a number".
    + *
    month
    HTML : The markup to use for the month label. Defaults to "Month".
    + *
    year
    HTML : The markup to use for the year label. Defaults to "Year".
    + *
    submit
    HTML : The markup to use for the submit button label. Defaults to "Okay".
    + *
    cancel
    HTML : The markup to use for the cancel button label. Defaults to "Cancel".
    + *
    invalidYear
    HTML : The markup to use for invalid year values. Defaults to "Year needs to be a number".
    *
    *
    *
    monthFormat
    String : The month format to use. Either YAHOO.widget.Calendar.LONG, or YAHOO.widget.Calendar.SHORT. Defaults to YAHOO.widget.Calendar.LONG
    @@ -6184,7 +6278,7 @@ YAHOO.widget.CalendarNavigator = function(cal) { monthFormat: YAHOO.widget.Calendar.LONG, initialFocus: "year" }; - + /** * Object literal containing the default configuration values for the CalendarNavigator * @property _DEFAULT_CFG @@ -6652,12 +6746,12 @@ YAHOO.widget.CalendarNavigator.prototype = { }, /** - * Renders the contents of the navigator + * Renders the contents of the navigator. NOTE: The contents of the array passed into this method are added to the DOM as HTML, and should be escaped by the implementor if coming from an external source. * * @method renderNavContents * - * @param {Array} html The HTML buffer to append the HTML to. - * @return {Array} A reference to the buffer passed in. + * @param {HTML[]} html The HTML buffer to append the HTML to. + * @return {HTML[]} A reference to the buffer passed in. */ renderNavContents : function(html) { var NAV = YAHOO.widget.CalendarNavigator, @@ -6679,11 +6773,11 @@ YAHOO.widget.CalendarNavigator.prototype = { }, /** - * Renders the month label and control for the navigator + * Renders the month label and control for the navigator. NOTE: The contents of the array passed into this method are added to the DOM as HTML, and should be escaped by the implementor if coming from an external source. * * @method renderNavContents - * @param {Array} html The HTML buffer to append the HTML to. - * @return {Array} A reference to the buffer passed in. + * @param {HTML[]} html The HTML buffer to append the HTML to. + * @return {HTML[]} A reference to the buffer passed in. */ renderMonth : function(html) { var NAV = YAHOO.widget.CalendarNavigator, @@ -6710,7 +6804,7 @@ YAHOO.widget.CalendarNavigator.prototype = { }, /** - * Renders the year label and control for the navigator + * Renders the year label and control for the navigator. NOTE: The contents of the array passed into this method are added to the DOM as HTML, and should be escaped by the implementor if coming from an external source. * * @method renderYear * @param {Array} html The HTML buffer to append the HTML to. @@ -6732,10 +6826,11 @@ YAHOO.widget.CalendarNavigator.prototype = { }, /** - * Renders the submit/cancel buttons for the navigator + * Renders the submit/cancel buttons for the navigator. NOTE: The contents of the array passed into this method are added to the DOM as HTML, and should be escaped by the implementor if coming from an external source. * - * @method renderButton - * @return {String} The HTML created for the Button UI + * @method renderButtons + * @param {Array} html The HTML buffer to append the HTML to. + * @return {Array} A reference to the buffer passed in. */ renderButtons : function(html) { var C = YAHOO.widget.CalendarNavigator.CLASSES; @@ -6923,9 +7018,10 @@ YAHOO.widget.CalendarNavigator.prototype = { }, /** - * Displays an error message in the Navigator's error panel + * Displays an error message in the Navigator's error panel. + * * @method setError - * @param {String} msg The error message to display + * @param {HTML} msg The markup for the error message to display. NOTE: The msg passed into this method is added to the DOM as HTML, and should be escaped by the implementor if coming from an external source. */ setError : function(msg) { if (this.errorEl) { @@ -7291,4 +7387,4 @@ YAHOO.widget.CalendarNavigator.prototype = { __isMac : (navigator.userAgent.toLowerCase().indexOf("macintosh") != -1) }; -YAHOO.register("calendar", YAHOO.widget.Calendar, {version: "2.8.0r4", build: "2449"}); +YAHOO.register("calendar", YAHOO.widget.Calendar, {version: "2.9.0", build: "2800"}); diff --git a/include/javascript/yui/build/carousel/assets/carousel-core.css b/include/javascript/yui/build/carousel/assets/carousel-core.css index 444c21f5..dcfcf8bd 100644 --- a/include/javascript/yui/build/carousel/assets/carousel-core.css +++ b/include/javascript/yui/build/carousel/assets/carousel-core.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ .yui-carousel { visibility: hidden; @@ -31,7 +31,7 @@ version: 2.8.0r4 position: absolute; text-align: center; } - + .yui-carousel-vertical .yui-carousel-element li { display: block; float: none; @@ -56,28 +56,28 @@ version: 2.8.0r4 .yui-carousel-button-focus { outline: 1px dotted #000; } - + .yui-carousel-min-width { min-width: 115px; } - + .yui-carousel-element { overflow: hidden; position:relative; - margin: 0 auto; + margin: 0 auto; padding:0; text-align:left; *margin:0; } - + .yui-carousel-horizontal .yui-carousel-element { width: 320000px; } - + .yui-carousel-vertical .yui-carousel-element { height:320000px; } - + .yui-skin-sam .yui-carousel-nav select { position:static; } diff --git a/include/javascript/yui/build/carousel/assets/skins/sam/carousel-skin.css b/include/javascript/yui/build/carousel/assets/skins/sam/carousel-skin.css index efa48ebd..a19991e9 100644 --- a/include/javascript/yui/build/carousel/assets/skins/sam/carousel-skin.css +++ b/include/javascript/yui/build/carousel/assets/skins/sam/carousel-skin.css @@ -1,20 +1,20 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ .yui-skin-sam .yui-carousel, .yui-skin-sam .yui-carousel-vertical { border: 1px solid #808080; } - + .yui-skin-sam .yui-carousel-nav { background: url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0; padding: 3px; text-align: right; } - + .yui-skin-sam .yui-carousel-button { background: url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -600px; float: right; @@ -23,19 +23,19 @@ version: 2.8.0r4 overflow: hidden; width: 40px; } - + .yui-skin-sam .yui-carousel-vertical .yui-carousel-button { background-position: 0 -800px; } - + .yui-skin-sam .yui-carousel-button-disabled { background-position: 0 -2000px; } - + .yui-skin-sam .yui-carousel-vertical .yui-carousel-button-disabled { background-position: 0 -2100px; } - + .yui-skin-sam .yui-carousel-button input, .yui-skin-sam .yui-carousel-button button { background-color: transparent; @@ -46,26 +46,26 @@ version: 2.8.0r4 margin: -2px 0 0 -2px; padding: 0 0 0 50px; } - + .yui-skin-sam span.yui-carousel-first-button { background-position: 0px -550px; margin-left: -100px; margin-right: 50px; *margin: 5px 5px 5px -90px; } - + .yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button { background-position: 0px -750px; } - + .yui-skin-sam span.yui-carousel-first-button-disabled { background-position: 0 -1950px; } - + .yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button-disabled { background-position: 0 -2050px; } - + .yui-skin-sam .yui-carousel-nav ul { float: right; height: 19px; @@ -76,28 +76,28 @@ version: 2.8.0r4 *margin-right: 0; padding: 0; } - + .yui-skin-sam .yui-carousel-min-width .yui-carousel-nav ul { *margin-left: -170px; } - + .yui-skin-sam .yui-carousel-nav select { position: relative; *right: 50px; top: 4px; } - + .yui-skin-sam .yui-carousel-vertical .yui-carousel-nav select { position: static; } - + .yui-skin-sam .yui-carousel-vertical .yui-carousel-nav ul, .yui-skin-sam .yui-carousel-vertical .yui-carousel-nav select { float: none; margin: 0; *zoom: 1; } - + .yui-skin-sam .yui-carousel-nav ul li { background: url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -650px; cursor: pointer; @@ -109,7 +109,7 @@ version: 2.8.0r4 padding: 0; width: 9px; } - + .yui-skin-sam .yui-carousel-nav ul:after { content: "."; display: block; @@ -117,7 +117,7 @@ version: 2.8.0r4 clear: both; visibility: hidden; } - + .yui-skin-sam .yui-carousel-nav ul li a { display:block; width: 100%; @@ -126,15 +126,15 @@ version: 2.8.0r4 text-align:left; overflow:hidden; } - + .yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-focus { outline: 1px dotted #000; } - + .yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-selected { background-position: 0 -700px; } - + .yui-skin-sam .yui-carousel-item-loading { background: url(ajax-loader.gif) no-repeat 50% 50%; position: absolute; diff --git a/include/javascript/yui/build/carousel/assets/skins/sam/carousel.css b/include/javascript/yui/build/carousel/assets/skins/sam/carousel.css index 8dbb1213..504f1d7e 100644 --- a/include/javascript/yui/build/carousel/assets/skins/sam/carousel.css +++ b/include/javascript/yui/build/carousel/assets/skins/sam/carousel.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ .yui-carousel{visibility:hidden;overflow:hidden;position:relative;text-align:left;zoom:1;}.yui-carousel.yui-carousel-visible{visibility:visible;}.yui-carousel-content{overflow:hidden;position:relative;text-align:center;}.yui-carousel-element li{border:1px solid #ccc;list-style:none;margin:1px;overflow:hidden;padding:0;position:absolute;text-align:center;}.yui-carousel-vertical .yui-carousel-element li{display:block;float:none;}.yui-log .carousel{background:#f2e886;}.yui-carousel-nav{zoom:1;}.yui-carousel-nav:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.yui-carousel-button-focus{outline:1px dotted #000;}.yui-carousel-min-width{min-width:115px;}.yui-carousel-element{overflow:hidden;position:relative;margin:0 auto;padding:0;text-align:left;*margin:0;}.yui-carousel-horizontal .yui-carousel-element{width:320000px;}.yui-carousel-vertical .yui-carousel-element{height:320000px;}.yui-skin-sam .yui-carousel-nav select{position:static;}.yui-carousel .yui-carousel-item-selected{border:1px dashed #000;margin:1px;}.yui-skin-sam .yui-carousel,.yui-skin-sam .yui-carousel-vertical{border:1px solid #808080;}.yui-skin-sam .yui-carousel-nav{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;padding:3px;text-align:right;}.yui-skin-sam .yui-carousel-button{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -600px;float:right;height:19px;margin:5px;overflow:hidden;width:40px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button{background-position:0 -800px;}.yui-skin-sam .yui-carousel-button-disabled{background-position:0 -2000px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button-disabled{background-position:0 -2100px;}.yui-skin-sam .yui-carousel-button input,.yui-skin-sam .yui-carousel-button button{background-color:transparent;border:0;cursor:pointer;display:block;height:44px;margin:-2px 0 0 -2px;padding:0 0 0 50px;}.yui-skin-sam span.yui-carousel-first-button{background-position:0 -550px;margin-left:-100px;margin-right:50px;*margin:5px 5px 5px -90px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button{background-position:0 -750px;}.yui-skin-sam span.yui-carousel-first-button-disabled{background-position:0 -1950px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button-disabled{background-position:0 -2050px;}.yui-skin-sam .yui-carousel-nav ul{float:right;height:19px;margin:0;margin-left:-220px;margin-right:100px;*margin-left:-160px;*margin-right:0;padding:0;}.yui-skin-sam .yui-carousel-min-width .yui-carousel-nav ul{*margin-left:-170px;}.yui-skin-sam .yui-carousel-nav select{position:relative;*right:50px;top:4px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav select{position:static;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav ul,.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav select{float:none;margin:0;*zoom:1;}.yui-skin-sam .yui-carousel-nav ul li{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -650px;cursor:pointer;float:left;height:9px;list-style:none;margin:10px 0 0 5px;overflow:hidden;padding:0;width:9px;}.yui-skin-sam .yui-carousel-nav ul:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.yui-skin-sam .yui-carousel-nav ul li a{display:block;width:100%;height:100%;text-indent:-10000px;text-align:left;overflow:hidden;}.yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-focus{outline:1px dotted #000;}.yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-selected{background-position:0 -700px;}.yui-skin-sam .yui-carousel-item-loading{background:url(ajax-loader.gif) no-repeat 50% 50%;position:absolute;text-indent:-150px;} diff --git a/include/javascript/yui/build/carousel/carousel-min.js b/include/javascript/yui/build/carousel/carousel-min.js index ec1d6080..ed4062b9 100644 --- a/include/javascript/yui/build/carousel/carousel-min.js +++ b/include/javascript/yui/build/carousel/carousel-min.js @@ -1,12 +1,12 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.8.0r4 +http://developer.yahoo.com/yui/license.html +version: 2.9.0 */ -(function(){var P;YAHOO.widget.Carousel=function(s,r){YAHOO.widget.Carousel.superclass.constructor.call(this,s,r);};var U=YAHOO.widget.Carousel,e=YAHOO.util.Dom,c=YAHOO.util.Event,p=YAHOO.lang;P="Carousel";var T={},F="afterScroll",g="allItemsRemoved",b="beforeHide",J="beforePageChange",i="beforeScroll",Y="beforeShow",B="blur",X="focus",a="hide",S="itemAdded",o="itemRemoved",Q="itemReplaced",C="itemSelected",L="loadItems",I="navigationStateChange",h="pageChange",H="render",V="show",Z="startAutoPlay",q="stopAutoPlay",K="uiUpdate";function G(r,s){var t;for(t in s){if(s.hasOwnProperty(t)){e.setStyle(r,t,s[t]);}}}function W(s,r){var t=document.createElement(s);r=r||{};if(r.className){e.addClass(t,r.className);}if(r.styles){G(t,r.styles);}if(r.parent){r.parent.appendChild(t);}if(r.id){t.setAttribute("id",r.id);}if(r.content){if(r.content.nodeName){t.appendChild(r.content);}else{t.innerHTML=r.content;}}return t;}function d(t,s,r){var v;if(!t){return 0;}function u(y,x){var z;if(x=="marginRight"&&YAHOO.env.ua.webkit){z=parseInt(e.getStyle(y,"marginLeft"),10);}else{z=parseInt(e.getStyle(y,x),10);}return p.isNumber(z)?z:0;}function w(y,x){var z;if(x=="marginRight"&&YAHOO.env.ua.webkit){z=parseFloat(e.getStyle(y,"marginLeft"));}else{z=parseFloat(e.getStyle(y,x));}return p.isNumber(z)?z:0;}if(typeof r=="undefined"){r="int";}switch(s){case"height":v=t.offsetHeight;if(v>0){v+=u(t,"marginTop")+u(t,"marginBottom");}else{v=w(t,"height")+u(t,"marginTop")+u(t,"marginBottom")+u(t,"borderTopWidth")+u(t,"borderBottomWidth")+u(t,"paddingTop")+u(t,"paddingBottom");}break;case"width":v=t.offsetWidth;if(v>0){v+=u(t,"marginLeft")+u(t,"marginRight");}else{v=w(t,"width")+u(t,"marginLeft")+u(t,"marginRight")+u(t,"borderLeftWidth")+u(t,"borderRightWidth")+u(t,"paddingLeft")+u(t,"paddingRight");}break;default:if(r=="int"){v=u(t,s);}else{if(r=="float"){v=w(t,s);}else{v=e.getStyle(t,s);}}break;}return v;}function O(w){var u=this,x,t,s=0,v=u.get("firstVisible"),r=false;if(u._itemsTable.numItems===0){return 0;}t=u._itemsTable.items[v]||u._itemsTable.loading[v];if(p.isUndefined(t)){return 0;}x=e.get(t.id);if(typeof w=="undefined"){r=u.get("isVertical");}else{r=w=="height";}if(this._itemAttrCache[w]){return this._itemAttrCache[w];}if(r){s=d(x,"height");}else{s=d(x,"width");}this._itemAttrCache[w]=s;return s;}function N(){var s=this,t,r;t=s.get("isVertical");r=O.call(s,t?"height":"width");return(r*s.get("revealAmount")/100);}function m(w){var AH=this,z=AH._cols,v=AH._rows,u,AC,AB,t,x,AD,AJ=0,AE,s,AG,AA={},y=0,AI=AH._itemsTable,AF=AI.items,r=AI.loading;AB=AH.get("isVertical");AC=O.call(AH,AB?"height":"width");AG=N.call(AH);while(y=0&&vu){w=D.call(AA,w);AA.scrollTo(w);}}function l(){var t=false,w=this,s=w.CLASSES,v,r,u;if(!w._hasRendered){return;}r=w.get("navigation");u=w._firstItem+w.get("numVisible");if(r.prev){if(w.get("numItems")===0||w._firstItem===0){if(w.get("numItems")===0||!w.get("isCircular")){c.removeListener(r.prev,"click",f);e.addClass(r.prev,s.FIRST_NAV_DISABLED);for(v=0;v=w.get("numItems")){if(!w.get("isCircular")){c.removeListener(r.next,"click",k);e.addClass(r.next,s.DISABLED);for(v=0;vu.CONFIG.MAX_PAGER_BUTTONS){u._updatePagerMenu();}else{u._updatePagerButtons();}}function M(r,s){switch(s){case"height":return d(r,"marginTop")+d(r,"marginBottom")+d(r,"paddingTop")+d(r,"paddingBottom")+d(r,"borderTopWidth")+d(r,"borderBottomWidth");case"width":return d(r,"marginLeft")+d(r,"marginRight")+d(r,"paddingLeft")+d(r,"paddingRight")+d(r,"borderLeftWidth")+d(r,"borderRightWidth");default:break;}return d(r,s);}function A(s){var r=this;if(!p.isObject(s)){return;}switch(s.ev){case S:r._syncUiForItemAdd(s);break;case o:r._syncUiForItemRemove(s);break;case Q:r._syncUiForItemReplace(s);break;case L:r._syncUiForLazyLoading(s);break;}r.fireEvent(K);}function E(u,s){var w=this,v=w.get("currentPage"),t,r=w.get("numVisible"); -t=parseInt(w._firstItem/r,10);if(t!=v){w.setAttributeConfig("currentPage",{value:t});w.fireEvent(h,t);}if(w.get("selectOnScroll")){if(w.get("selectedItem")!=w._selectedItem){w.set("selectedItem",w._selectedItem);}}clearTimeout(w._autoPlayTimer);delete w._autoPlayTimer;if(w.isAutoPlayOn()){w.startAutoPlay();}w.fireEvent(F,{first:w._firstItem,last:s},w);}U.getById=function(r){return T[r]?T[r].object:false;};YAHOO.extend(U,YAHOO.util.Element,{_rows:null,_cols:null,_animObj:null,_carouselEl:null,_clipEl:null,_firstItem:0,_hasFocus:false,_hasRendered:false,_isAnimationInProgress:false,_isAutoPlayInProgress:false,_itemsTable:null,_navBtns:null,_navEl:null,_nextEnabled:true,_pages:null,_pagination:{},_prevEnabled:true,_recomputeSize:true,_itemAttrCache:{},CLASSES:{BUTTON:"yui-carousel-button",CAROUSEL:"yui-carousel",CAROUSEL_EL:"yui-carousel-element",CONTAINER:"yui-carousel-container",CONTENT:"yui-carousel-content",DISABLED:"yui-carousel-button-disabled",FIRST_NAV:" yui-carousel-first-button",FIRST_NAV_DISABLED:"yui-carousel-first-button-disabled",FIRST_PAGE:"yui-carousel-nav-first-page",FOCUSSED_BUTTON:"yui-carousel-button-focus",HORIZONTAL:"yui-carousel-horizontal",ITEM_LOADING:"yui-carousel-item-loading",MIN_WIDTH:"yui-carousel-min-width",NAVIGATION:"yui-carousel-nav",NEXT_NAV:" yui-carousel-next-button",NEXT_PAGE:"yui-carousel-next",NAV_CONTAINER:"yui-carousel-buttons",PAGER_ITEM:"yui-carousel-pager-item",PAGINATION:"yui-carousel-pagination",PAGE_FOCUS:"yui-carousel-nav-page-focus",PREV_PAGE:"yui-carousel-prev",SELECTED_ITEM:"yui-carousel-item-selected",SELECTED_NAV:"yui-carousel-nav-page-selected",VERTICAL:"yui-carousel-vertical",MULTI_ROW:"yui-carousel-multi-row",ROW:"yui-carousel-row",VERTICAL_CONTAINER:"yui-carousel-vertical-container",VISIBLE:"yui-carousel-visible"},CONFIG:{FIRST_VISIBLE:0,HORZ_MIN_WIDTH:180,MAX_PAGER_BUTTONS:5,VERT_MIN_WIDTH:115,NUM_VISIBLE:3},STRINGS:{ITEM_LOADING_CONTENT:"Loading",NEXT_BUTTON_TEXT:"Next Page",PAGER_PREFIX_TEXT:"Go to page ",PREVIOUS_BUTTON_TEXT:"Previous Page"},addItem:function(y,s){var x=this,u,t,r,z=0,w,v=x.get("numItems");if(!y){return false;}if(p.isString(y)||y.nodeName){t=y.nodeName?y.innerHTML:y;}else{if(p.isObject(y)){t=y.content;}else{return false;}}u=y.className||"";r=y.id?y.id:e.generateId();if(p.isUndefined(s)){x._itemsTable.items.push({item:t,className:u,id:r});w=x._itemsTable.items.length-1;}else{if(s<0||s>v){return false;}if(!x._itemsTable.items[s]){x._itemsTable.items[s]=undefined;z=1;}x._itemsTable.items.splice(s,z,{item:t,className:u,id:r});}x._itemsTable.numItems++;if(v0){if(!r.removeItem(0)){}if(r._itemsTable.numItems===0){r.set("numItems",0);break;}s--;}r.fireEvent(g);},focus:function(){var AA=this,v,w,x,u,z,AB,s,t,r;if(!AA._hasRendered){return;}if(AA.isAnimating()){return;}r=AA.get("selectedItem");AB=AA.get("numVisible");s=AA.get("selectOnScroll");t=(r>=0)?AA.getItem(r):null;v=AA.get("firstVisible");z=v+AB-1;x=(rz);w=(t&&t.id)?e.get(t.id):null;u=AA._itemsTable;if(!s&&x){w=(u&&u.items&&u.items[v])?e.get(u.items[v].id):null;}if(w){try{w.focus();}catch(y){}}AA.fireEvent(X);},hide:function(){var r=this;if(r.fireEvent(b)!==false){r.removeClass(r.CLASSES.VISIBLE);r.fireEvent(a);}},init:function(u,s){var v=this,r=u,w=false,t;if(!u){return;}v._hasRendered=false;v._navBtns={prev:[],next:[]};v._pages={el:null,num:0,cur:0};v._pagination={};v._itemAttrCache={};v._itemsTable={loading:{},numItems:0,items:[],size:0};if(p.isString(u)){u=e.get(u);}else{if(!u.nodeName){return;}}U.superclass.init.call(v,u,s);t=v.get("selectedItem");if(t>0){v.set("firstVisible",D.call(v,t));}if(u){if(!u.id){u.setAttribute("id",e.generateId());}w=v._parseCarousel(u);if(!w){v._createCarousel(r);}}else{u=v._createCarousel(r);}r=u.id;v.initEvents();if(w){v._parseCarouselItems();}if(t>0){n.call(v,t,0);}if(!s||typeof s.isVertical=="undefined"){v.set("isVertical",false);}v._parseCarouselNavigation(u);v._navEl=v._setupCarouselNavigation();T[r]={object:v};v._loadItems(Math.min(v.get("firstVisible")+v.get("numVisible"),v.get("numItems"))-1);},initAttributes:function(r){var s=this;r=r||{};U.superclass.initAttributes.call(s,r);s.setAttributeConfig("carouselEl",{validator:p.isString,value:r.carouselEl||"OL"});s.setAttributeConfig("carouselItemEl",{validator:p.isString,value:r.carouselItemEl||"LI"});s.setAttributeConfig("currentPage",{readOnly:true,value:0});s.setAttributeConfig("firstVisible",{method:s._setFirstVisible,validator:s._validateFirstVisible,value:r.firstVisible||s.CONFIG.FIRST_VISIBLE});s.setAttributeConfig("selectOnScroll",{validator:p.isBoolean,value:r.selectOnScroll||true});s.setAttributeConfig("numVisible",{setter:s._numVisibleSetter,method:s._setNumVisible,validator:s._validateNumVisible,value:r.numVisible||s.CONFIG.NUM_VISIBLE});s.setAttributeConfig("numItems",{method:s._setNumItems,validator:s._validateNumItems,value:s._itemsTable.numItems});s.setAttributeConfig("scrollIncrement",{validator:s._validateScrollIncrement,value:r.scrollIncrement||1});s.setAttributeConfig("selectedItem",{setter:s._selectedItemSetter,method:s._setSelectedItem,validator:p.isNumber,value:-1});s.setAttributeConfig("revealAmount",{method:s._setRevealAmount,validator:s._validateRevealAmount,value:r.revealAmount||0});s.setAttributeConfig("isCircular",{validator:p.isBoolean,value:r.isCircular||false});s.setAttributeConfig("isVertical",{method:s._setOrientation,validator:p.isBoolean,value:r.isVertical||false});s.setAttributeConfig("navigation",{method:s._setNavigation,validator:s._validateNavigation,value:r.navigation||{prev:null,next:null,page:null}});s.setAttributeConfig("animation",{validator:s._validateAnimation,value:r.animation||{speed:0,effect:null}}); -s.setAttributeConfig("autoPlay",{validator:p.isNumber,value:r.autoPlay||0});s.setAttributeConfig("autoPlayInterval",{validator:p.isNumber,value:r.autoPlayInterval||0});s.setAttributeConfig("numPages",{readOnly:true,getter:s._getNumPages});s.setAttributeConfig("lastVisible",{readOnly:true,getter:s._getLastVisible});},initEvents:function(){var t=this,s=t.CLASSES,r;t.on("keydown",t._keyboardEventHandler);t.on(F,l);t.on(S,A);t.on(o,A);t.on(Q,A);t.on(C,function(){if(t._hasFocus){t.focus();}});t.on(L,A);t.on(g,function(u){t.scrollTo(0);l.call(t);R.call(t);});t.on(h,R,t);t.on(H,function(u){if(t.get("selectedItem")===null||t.get("selectedItem")<=0){t.set("selectedItem",t.get("firstVisible"));}l.call(t,u);R.call(t,u);t._setClipContainerSize();t.show();});t.on("selectedItemChange",function(u){n.call(t,u.newValue,u.prevValue);if(u.newValue>=0){t._updateTabIndex(t.getElementForItem(u.newValue));}t.fireEvent(C,u.newValue);});t.on(K,function(u){l.call(t,u);R.call(t,u);});t.on("firstVisibleChange",function(u){if(!t.get("selectOnScroll")){if(u.newValue>=0){t._updateTabIndex(t.getElementForItem(u.newValue));}}});t.on("click",function(u){if(t.isAutoPlayOn()){t.stopAutoPlay();}t._itemClickHandler(u);t._pagerClickHandler(u);});c.onFocus(t.get("element"),function(u,w){var v=c.getTarget(u);if(v&&v.nodeName.toUpperCase()=="A"&&e.getAncestorByClassName(v,s.NAVIGATION)){if(r){e.removeClass(r,s.PAGE_FOCUS);}r=v.parentNode;e.addClass(r,s.PAGE_FOCUS);}else{if(r){e.removeClass(r,s.PAGE_FOCUS);}}w._hasFocus=true;w._updateNavButtons(c.getTarget(u),true);},t);c.onBlur(t.get("element"),function(u,v){v._hasFocus=false;v._updateNavButtons(c.getTarget(u),false);},t);},isAnimating:function(){return this._isAnimationInProgress;},isAutoPlayOn:function(){return this._isAutoPlayInProgress;},getElementForItem:function(r){var s=this;if(r<0||r>=s.get("numItems")){return null;}if(s._itemsTable.items[r]){return e.get(s._itemsTable.items[r].id);}return null;},getElementForItems:function(){var t=this,s=[],r;for(r=0;r=s.get("numItems")){return null;}if(s._itemsTable.numItems>r){if(!p.isUndefined(s._itemsTable.items[r])){return s._itemsTable.items[r];}}return null;},getItems:function(){return this._itemsTable.items;},getLoadingItems:function(){return this._itemsTable.loading;},getRows:function(){return this._rows;},getCols:function(){return this._cols;},getItemPositionById:function(w){var u=this,v=u.get("numItems"),s=0,r=u._itemsTable.items,t;while(s=r){return false;}t=u._itemsTable.items.splice(s,1);if(t&&t.length==1){u._itemsTable.numItems--;u.set("numItems",r-1);u.fireEvent(o,{item:t[0],pos:s,ev:o});return true;}return false;},replaceItem:function(z,u){var y=this,w,v,t,x=y.get("numItems"),s,r=z;if(!z){return false;}if(p.isString(z)||z.nodeName){v=z.nodeName?z.innerHTML:z;}else{if(p.isObject(z)){v=z.content;}else{return false;}}if(p.isUndefined(u)){return false;}else{if(u<0||u>=x){return false;}s=y._itemsTable.items[u];if(!s){s=y._itemsTable.loading[u];y._itemsTable.items[u]=undefined;}y._itemsTable.items.splice(u,1,{item:v,className:z.className||"",id:e.generateId()});r=y._itemsTable.items[u];}y.fireEvent(Q,{newItem:r,oldItem:s,pos:u,ev:Q});return true;},replaceItems:function(r){var s,u,t=true;if(!p.isArray(r)){return false;}for(s=0,u=r.length;ss.get("numItems")){r=0;}if(s.get("selectOnScroll")){s._selectedItem=s._getSelectedItem(r);}s.scrollTo(r);},scrollTo:function(AL,AI){var AH=this,u,AJ,z,AB,AC,AM,AN,AO,AD,AA,v,AF,s,w,t,x,AE,y,AP,AK=AH._itemsTable,AG=AK.items,r=AK.loading;if(p.isUndefined(AL)||AL==AH._firstItem||AH.isAnimating()){return;}AJ=AH.get("animation");z=AH.get("isCircular");AB=AH.get("isVertical");AA=AH._cols;v=AH._rows;AO=AH._firstItem;AF=AH.get("numItems");s=AH.get("numVisible");t=AH.get("currentPage");AP=function(){if(AH.isAutoPlayOn()){AH.stopAutoPlay();}};if(AL<0){if(z){AL=AF+AL;}else{AP.call(AH);return;}}else{if(AF>0&&AL>AF-1){if(AH.get("isCircular")){AL=AF-AL;}else{AP.call(AH);return;}}}if(isNaN(AL)){return;}AN=(AH._firstItem>AL)?"backward":"forward";AE=AO+s;AE=(AE>AF-1)?AF-1:AE;x=AH.fireEvent(i,{dir:AN,first:AO,last:AE});if(x===false){return;}AH.fireEvent(J,{page:t});AD=AL+s-1;AH._loadItems(AD>AF-1?AF-1:AD);AM=0-AL;if(v){if(AB){AM=parseInt(AM/AA,10);}else{AM=parseInt(AM/v,10);}}y=0;while(AM<0&&yAF-1)?AF-1:AE;w=j.call(AH,AM);u=AJ.speed>0;if(u){AH._animateAndSetCarouselOffset(w,AL,AE,AI);}else{AH._setCarouselOffset(w);E.call(AH,AL,AE);}},getPageForItem:function(r){return Math.ceil((r+1)/parseInt(this.get("numVisible"),10));},getFirstVisibleOnPage:function(r){return(r-1)*this.get("numVisible"); -},selectPreviousItem:function(){var t=this,s=0,r=t.get("selectedItem");if(r==this._firstItem){s=r-t.get("numVisible");t._selectedItem=t._getSelectedItem(r-1);t.scrollTo(s);}else{s=t.get("selectedItem")-t.get("scrollIncrement");t.set("selectedItem",t._getSelectedItem(s));}},selectNextItem:function(){var s=this,r=0;r=s.get("selectedItem")+s.get("scrollIncrement");s.set("selectedItem",s._getSelectedItem(r));},show:function(){var s=this,r=s.CLASSES;if(s.fireEvent(Y)!==false){s.addClass(r.VISIBLE);s.fireEvent(V);}},startAutoPlay:function(){var r=this,s;if(p.isUndefined(r._autoPlayTimer)){s=r.get("autoPlayInterval");if(s<=0){return;}r._isAutoPlayInProgress=true;r.fireEvent(Z);r._autoPlayTimer=setTimeout(function(){r._autoScroll();},s);}},stopAutoPlay:function(){var r=this;if(!p.isUndefined(r._autoPlayTimer)){clearTimeout(r._autoPlayTimer);delete r._autoPlayTimer;r._isAutoPlayInProgress=false;r.fireEvent(q);}},updatePagination:function(){var z=this,x=z._pagination;if(!x.el){return false;}var w=z.get("numItems"),AA=z.get("numVisible"),u=z.get("firstVisible")+1,v=z.get("currentPage")+1,r=z.get("numPages"),t={"numVisible":AA,"numPages":r,"numItems":w,"selectedItem":z.get("selectedItem")+1,"currentPage":v,"firstVisible":u,"lastVisible":z.get("lastVisible")+1},s=x.callback||{},y=s.scope&&s.obj?s.obj:z;x.el.innerHTML=p.isFunction(s.fn)?s.fn.apply(y,[x.template,t]):YAHOO.lang.substitute(x.template,t);},registerPagination:function(s,u,r){var t=this;t._pagination.template=s;t._pagination.callback=r||{};if(!t._pagination.el){t._pagination.el=W("DIV",{className:t.CLASSES.PAGINATION});if(u=="before"){t._navEl.insertBefore(t._pagination.el,t._navEl.firstChild);}else{t._navEl.appendChild(t._pagination.el);}t.on("itemSelected",t.updatePagination);t.on("pageChange",t.updatePagination);}t.updatePagination();},toString:function(){return P+(this.get?" (#"+this.get("id")+")":"");},_animateAndSetCarouselOffset:function(w,u,s){var v=this,t=v.get("animation"),r=null;if(v.get("isVertical")){r=new YAHOO.util.Motion(v._carouselEl,{top:{to:w}},t.speed,t.effect);}else{r=new YAHOO.util.Motion(v._carouselEl,{left:{to:w}},t.speed,t.effect);}v._isAnimationInProgress=true;r.onComplete.subscribe(v._animationCompleteHandler,{scope:v,item:u,last:s});r.animate();},_animationCompleteHandler:function(r,s,t){t.scope._isAnimationInProgress=false;E.call(t.scope,t.item,t.last);},_autoScroll:function(){var s=this,t=s._firstItem,r;if(t>=s.get("numItems")-1){if(s.get("isCircular")){r=0;}else{s.stopAutoPlay();}}else{r=t+s.get("numVisible");}s._selectedItem=s._getSelectedItem(r);s.scrollTo.call(s,r);},_createCarousel:function(s){var u=this,r=u.CLASSES,t=e.get(s);if(!t){t=W("DIV",{className:r.CAROUSEL,id:s});}if(!u._carouselEl){u._carouselEl=W(u.get("carouselEl"),{className:r.CAROUSEL_EL});}return t;},_createCarouselClip:function(){return W("DIV",{className:this.CLASSES.CONTENT});},_createCarouselItem:function(u){var r,t=this,s=m.call(t,u.pos);return W(t.get("carouselItemEl"),{className:u.className,styles:u.styles,content:u.content,id:u.id});},_getValidIndex:function(t){var w=this,r=w.get("isCircular"),u=w.get("numItems"),v=w.get("numVisible"),s=u-1;if(t<0){t=r?Math.ceil(u/v)*v+t:0;}else{if(t>s){t=r?0:s;}}return t;},_getSelectedItem:function(v){var u=this,r=u.get("isCircular"),t=u.get("numItems"),s=t-1;if(v<0){if(r){v=t+v;}else{v=u.get("selectedItem");}}else{if(v>s){if(r){v=v-t;}else{v=u.get("selectedItem");}}}return v;},_itemClickHandler:function(v){var y=this,w=y.get("carouselItemEl"),s=y.get("element"),t,u,x=c.getTarget(v),r=x.tagName.toUpperCase();if(r==="INPUT"||r==="SELECT"||r==="TEXTAREA"){return;}while(x&&x!=s&&x.id!=y._carouselEl){t=x.nodeName;if(t.toUpperCase()==w){break;}x=x.parentNode;}if((u=y.getItemPositionById(x.id))>=0){y.set("selectedItem",y._getSelectedItem(u));y.focus();}},_keyboardEventHandler:function(t){var v=this,s=c.getCharCode(t),u=c.getTarget(t),r=false;if(v.isAnimating()||u.tagName.toUpperCase()==="SELECT"){return;}switch(s){case 37:case 38:v.selectPreviousItem();r=true;break;case 39:case 40:v.selectNextItem();r=true;break;case 33:v.scrollPageBackward();r=true;break;case 34:v.scrollPageForward();r=true;break;}if(r){if(v.isAutoPlayOn()){v.stopAutoPlay();}c.preventDefault(t);}},_loadItems:function(t){var w=this,s=w.get("numItems"),u=w.get("numVisible"),v=w.get("revealAmount"),x=w._itemsTable.items.length,r=w.get("lastVisible");if(x>t&&t+1>=u){x=t%u||t==r?t-t%u:t-u+1;}if(v&&t=x&&(!w.getItem(x)||!w.getItem(t))){w.fireEvent(L,{ev:L,first:x,last:t,num:t-x+1});}},_pagerChangeHandler:function(s){var v=this,u=c.getTarget(s),t=u.value,r;if(t){r=v.getFirstVisibleOnPage(t);v._selectedItem=r;v.scrollTo(r);v.focus();}},_pagerClickHandler:function(x){var z=this,t=z.CLASSES,u=c.getTarget(x),s=u.nodeName.toUpperCase(),r,w,v,y;if(e.hasClass(u,t.PAGER_ITEM)||e.hasClass(u.parentNode,t.PAGER_ITEM)){if(s=="EM"){u=u.parentNode;}r=u.href;w=r.lastIndexOf("#");v=parseInt(r.substring(w+1),10);if(v!=-1){y=z.getFirstVisibleOnPage(v);z._selectedItem=y;z.scrollTo(y);z.focus();}c.preventDefault(x);}},_parseCarousel:function(t){var w=this,x,r,s,v,u;r=w.CLASSES;s=w.get("carouselEl");v=false;for(x=t.firstChild;x;x=x.nextSibling){if(x.nodeType==1){u=x.nodeName;if(u.toUpperCase()==s){w._carouselEl=x;e.addClass(w._carouselEl,w.CLASSES.CAROUSEL_EL);v=true;}}}return v;},_parseCarouselItems:function(){var y=this,AA=y.CLASSES,v=0,z,r,t,u,s,w=y.get("firstVisible"),x=y._carouselEl;z=y._rows;t=y.get("carouselItemEl");for(r=x.firstChild;r;r=r.nextSibling){if(r.nodeType==1){s=r.nodeName;if(s.toUpperCase()==t){if(r.id){u=r.id;}else{u=e.generateId();r.setAttribute("id",u);}y.addItem(r,w);w++;}}}},_parseCarouselNavigation:function(x){var y=this,w,z=y.CLASSES,s,v,u,r,t=false;r=e.getElementsByClassName(z.PREV_PAGE,"*",x);if(r.length>0){for(v in r){if(r.hasOwnProperty(v)){s=r[v];if(s.nodeName=="INPUT"||s.nodeName=="BUTTON"||s.nodeName=="A"){y._navBtns.prev.push(s);}else{u=s.getElementsByTagName("INPUT");if(p.isArray(u)&&u.length>0){y._navBtns.prev.push(u[0]); -}else{u=s.getElementsByTagName("BUTTON");if(p.isArray(u)&&u.length>0){y._navBtns.prev.push(u[0]);}}}}}w={prev:r};}r=e.getElementsByClassName(z.NEXT_PAGE,"*",x);if(r.length>0){for(v in r){if(r.hasOwnProperty(v)){s=r[v];if(s.nodeName=="INPUT"||s.nodeName=="BUTTON"||s.nodeName=="A"){y._navBtns.next.push(s);}else{u=s.getElementsByTagName("INPUT");if(p.isArray(u)&&u.length>0){y._navBtns.next.push(u[0]);}else{u=s.getElementsByTagName("BUTTON");if(p.isArray(u)&&u.length>0){y._navBtns.next.push(u[0]);}}}}}if(w){w.next=r;}else{w={next:r};}}if(w){y.set("navigation",w);t=true;}return t;},_refreshUi:function(){var v=this,s,w=v.get("isVertical"),y=v.get("firstVisible"),t,x,r,u;if(v._itemsTable.numItems<1){return;}u=O.call(v,w?"height":"width");t=v._itemsTable.items[y].id;u=w?d(t,"width"):d(t,"height");e.setStyle(v._carouselEl,w?"width":"height",u+"px");v._hasRendered=true;v.fireEvent(H);},_setCarouselOffset:function(t){var r=this,s;s=r.get("isVertical")?"top":"left";e.setStyle(r._carouselEl,s,t+"px");},_setupCarouselNavigation:function(){var w=this,u,s,r,y,v,x,t;r=w.CLASSES;v=e.getElementsByClassName(r.NAVIGATION,"DIV",w.get("element"));if(v.length===0){v=W("DIV",{className:r.NAVIGATION});w.insertBefore(v,e.getFirstChild(w.get("element")));}else{v=v[0];}w._pages.el=W("UL");v.appendChild(w._pages.el);y=w.get("navigation");if(p.isString(y.prev)||p.isArray(y.prev)){if(p.isString(y.prev)){y.prev=[y.prev];}for(u in y.prev){if(y.prev.hasOwnProperty(u)){w._navBtns.prev.push(e.get(y.prev[u]));}}}else{t=W("SPAN",{className:r.BUTTON+r.FIRST_NAV});e.setStyle(t,"visibility","visible");u=e.generateId();t.innerHTML='";v.appendChild(t);u=e.get(u);w._navBtns.prev=[u];s={prev:[t]};}if(p.isString(y.next)||p.isArray(y.next)){if(p.isString(y.next)){y.next=[y.next];}for(u in y.next){if(y.next.hasOwnProperty(u)){w._navBtns.next.push(e.get(y.next[u]));}}}else{x=W("SPAN",{className:r.BUTTON+r.NEXT_NAV});e.setStyle(x,"visibility","visible");u=e.generateId();x.innerHTML='";v.appendChild(x);u=e.get(u);w._navBtns.next=[u];if(s){s.next=[x];}else{s={next:[x]};}}if(s){w.set("navigation",s);}return v;},_setClipContainerSize:function(r,t){var z=this,x=z.get("isVertical"),AB=z._rows,v=z._cols,y=z.get("revealAmount"),s=O.call(z,"height"),u=O.call(z,"width"),AA,w;r=r||z._clipEl;if(AB){AA=s*AB;w=u*v;}else{t=t||z.get("numVisible");if(x){AA=s*t;}else{w=u*t;}}z._recomputeSize=(AA===0);if(z._recomputeSize){z._hasRendered=false;return;}y=N.call(z);if(x){AA+=(y*2);}else{w+=(y*2);}if(x){AA+=M(z._carouselEl,"height");e.setStyle(r,"height",AA+"px");if(v){w+=M(z._carouselEl,"width");e.setStyle(r,"width",w+(0)+"px");}}else{w+=M(z._carouselEl,"width");e.setStyle(r,"width",w+"px");if(AB){AA+=M(z._carouselEl,"height");e.setStyle(r,"height",AA+"px");}}z._setContainerSize(r);},_setContainerSize:function(s,t){var w=this,r=w.CONFIG,z=w.CLASSES,v,y,u,x;v=w.get("isVertical");y=w._rows;u=w._cols;s=s||w._clipEl;t=t||(v?"height":"width");x=parseFloat(e.getStyle(s,t),10);x=p.isNumber(x)?x:0;if(v){x+=M(w._carouselEl,"height")+d(w._navEl,"height");}else{x+=M(w._carouselEl,"width");}if(!v){if(x=0&&st){s.removeItem(r-1);r--;}}return t;},_setOrientation:function(t){var s=this,r=s.CLASSES;if(t){s.replaceClass(r.HORIZONTAL,r.VERTICAL);}else{s.replaceClass(r.VERTICAL,r.HORIZONTAL);}this._itemAttrCache={};return t;},_setRevealAmount:function(s){var r=this;if(s>=0&&s<=100){s=parseInt(s,10);s=p.isNumber(s)?s:0;r._setClipContainerSize();}else{s=r.get("revealAmount");}return s;},_setSelectedItem:function(r){this._selectedItem=r;},_getNumPages:function(){return Math.ceil(parseInt(this.get("numItems"),10)/parseInt(this.get("numVisible"),10));},_getLastVisible:function(){var r=this;return r.get("currentPage")+1==r.get("numPages")?r.get("numItems")-1:r.get("firstVisible")+r.get("numVisible")-1;},_syncUiForItemAdd:function(u){var v,AA=this,x=AA._carouselEl,r,AB,t=AA._itemsTable,s,w,y,z;w=p.isUndefined(u.pos)?u.newPos||t.numItems-1:u.pos;if(!s){AB=t.items[w]||{};r=AA._createCarouselItem({className:AB.className,styles:AB.styles,content:AB.item,id:AB.id,pos:w});if(p.isUndefined(u.pos)){if(!p.isUndefined(t.loading[w])){s=t.loading[w];}if(s){x.replaceChild(r,s);delete t.loading[w];}else{x.appendChild(r);}}else{if(!p.isUndefined(t.items[u.pos+1])){y=e.get(t.items[u.pos+1].id);}if(y){x.insertBefore(r,y);}else{}}}else{if(p.isUndefined(u.pos)){if(!e.isAncestor(AA._carouselEl,s)){x.appendChild(s);}}else{if(!e.isAncestor(x,s)){if(!p.isUndefined(t.items[u.pos+1])){x.insertBefore(s,e.get(t.items[u.pos+1].id));}}}}if(!AA._hasRendered){AA._refreshUi();}if(AA.get("selectedItem")<0){AA.set("selectedItem",AA.get("firstVisible"));}AA._syncUiItems();},_syncUiForItemReplace:function(x){var w=this,t=w._carouselEl,r=w._itemsTable,y=x.pos,v=x.newItem,s=x.oldItem,u; -u=w._createCarouselItem({className:v.className,styles:v.styles,content:v.item,id:v.id,pos:y});if(u&&s){c.purgeElement(s,true);t.replaceChild(u,e.get(s.id));if(!p.isUndefined(r.loading[y])){r.numItems++;delete r.loading[y];}}if(!w._hasRendered){w._refreshUi();}w._syncUiItems();},_syncUiForItemRemove:function(w){var v=this,r=v._carouselEl,t,u,s,x;s=v.get("numItems");u=w.item;x=w.pos;if(u&&(t=e.get(u.id))){if(t&&e.isAncestor(r,t)){c.purgeElement(t,true);r.removeChild(t);}if(v.get("selectedItem")==x){x=x>=s?s-1:x;}}else{}v._syncUiItems();},_syncUiForLazyLoading:function(v){var z=this,x=z._carouselEl,t=z._itemsTable,w=t.items.length,y=t.items[v.last+1],r,s;if(!y&&v.last'+z.STRINGS.PAGER_PREFIX_TEXT+" "+(u+1)+"";r.innerHTML=w;t.appendChild(r);}e.setStyle(t,"visibility","visible");},_updatePagerMenu:function(){var z=this,x=z.CLASSES,y=z._pages.cur,s,v,AA,t=z.get("numVisible"),w=z._pages.num,u=z._pages.el,r;if(w===0){return;}r=document.createElement("SELECT");if(!r){return;}e.setStyle(u,"visibility","hidden");while(u.firstChild){u.removeChild(u.firstChild);}for(v=0;v=0&&t=0);},_validateNumVisible:function(r){var s=false;if(p.isNumber(r)){s=r>0&&r<=this.get("numItems");}else{if(p.isArray(r)){if(p.isNumber(r[0])&&p.isNumber(r[1])){s=r[0]*r[1]>0&&r.length==2;}}}return s;},_validateRevealAmount:function(r){var s=false;if(p.isNumber(r)){s=r>=0&&r<100;}return s;},_validateScrollIncrement:function(r){var s=false;if(p.isNumber(r)){s=(r>0&&r=9))){AB=parseInt(g.getStyle(AA,"marginLeft"),10);}else{AB=parseInt(g.getStyle(AA,z),10);}return r.isNumber(AB)?AB:0;}function y(AA,z){var AB;if(z=="marginRight"&&YAHOO.env.ua.webkit){AB=parseFloat(g.getStyle(AA,"marginLeft"));}else{AB=parseFloat(g.getStyle(AA,z));}return r.isNumber(AB)?AB:0;}if(typeof t=="undefined"){t="int";}switch(u){case"height":x=v.offsetHeight;if(x>0){x+=w(v,"marginTop")+w(v,"marginBottom");}else{x=y(v,"height")+w(v,"marginTop")+w(v,"marginBottom")+w(v,"borderTopWidth")+w(v,"borderBottomWidth")+w(v,"paddingTop")+w(v,"paddingBottom");}break;case"width":x=v.offsetWidth;if(x>0){x+=w(v,"marginLeft")+w(v,"marginRight");}else{x=y(v,"width")+w(v,"marginLeft")+w(v,"marginRight")+w(v,"borderLeftWidth")+w(v,"borderRightWidth")+w(v,"paddingLeft")+w(v,"paddingRight");}break;default:if(t=="int"){x=w(v,u);}else{if(t=="float"){x=y(v,u);}else{x=g.getStyle(v,u);}}break;}return x;}function P(x){var w=this,y,v,u=0,t=false;if(w._itemAttrCache[x]){return w._itemAttrCache[x];}if(w._itemsTable.numItems===0){return 0;}v=w._findClosestSibling(-1);if(r.isUndefined(v)){return 0;}y=g.get(v.id);if(typeof x=="undefined"){t=w.get("isVertical");}else{t=x=="height";}if(t){u=f(y,"height");}else{u=f(y,"width");}if(u){w._itemAttrCache[x]=u;}return u;}function O(){var u=this,v,t;v=u.get("isVertical");t=P.call(u,v?"height":"width");return(t*u.get("revealAmount")/100);}function o(AC){var AI=this,AA=AI._cols,AG=AI._rows,y,z,AD,AE,x,w,AB,t,v,AF,AH={},u=AI._itemsTable;AD=AI.get("isVertical");z=P.call(AI,AD?"height":"width");v=O.call(AI);if(AG){y=this.getPageForItem(AC);if(AD){x=Math.floor(AC/AA);AF=x;AB=AF*z;AH.top=(AB+v)+"px";z=P.call(AI,"width");AE=AC%AA;AF=AE;t=AF*z;AH.left=t+"px";}else{AE=AC%AA;w=(y-1)*AA;AF=AE+w;t=AF*z;AH.left=(t+v)+"px";z=P.call(AI,"height");x=Math.floor(AC/AA);w=(y-1)*AG;AF=x-w;AB=AF*z;AH.top=AB+"px";}}else{if(AD){AH.left=0;AH.top=((AC*z)+v)+"px";}else{AH.top=0;AH.left=((AC*z)+v)+"px";}}return AH;}function D(u){var t=this.get("numVisible");return Math.floor(u/t)*t;}function l(x){var w=this,v=0,u=0,t=w.get("isVertical")?"height":"width";v=P.call(w,t);u=v*x;return u;}function h(t,u){u.scrollPageBackward();e.preventDefault(t);}function m(t,u){u.scrollPageForward();e.preventDefault(t);}function p(x,u){var AA=this,AC=AA.CLASSES,t,z=AA._firstItem,y=AA.get("numItems"),AB=AA.get("numVisible"),w=u,v=z+AB-1;if(w>=0&&wv){x=D.call(AA,x);AA.scrollTo(x);}}function G(u){var v=this,t=v.get("navigation");if(r.isUndefined(t)){return;}if(r.isUndefined(u)){if(!r.isUndefined(t.prev)&&r.isArray(t.prev)&&!r.isUndefined(t.prev[0])){g.setStyle(t.prev[0],"visibility","visible");}if(!r.isUndefined(t.next)&&r.isArray(t.next)&&!r.isUndefined(t.next[0])){g.setStyle(t.next[0],"visibility","visible");}if(!r.isUndefined(v._pages)&&!r.isUndefined(v._pages.el)){g.setStyle(v._pages.el,"visibility","visible");}}else{if(!r.isUndefined(t.prev)&&r.isArray(t.prev)&&!r.isUndefined(t.prev[0])){g.setStyle(t.prev[0],"visibility","hidden");}if(!r.isUndefined(t.next)&&r.isArray(t.next)&&!r.isUndefined(t.next[0])){g.setStyle(t.next[0],"visibility","hidden");}if(!r.isUndefined(v._pages)&&!r.isUndefined(v._pages.el)){g.setStyle(v._pages.el,"visibility","hidden");}}}function n(){var v=false,y=this,u=y.CLASSES,x,t,w;if(!y._hasRendered){return;}t=y.get("navigation");w=y._firstItem+y.get("numVisible");if(t.prev){if(y.get("numItems")===0||y._firstItem===0){if(y.get("numItems")===0||!y.get("isCircular")){e.removeListener(t.prev,"click",h);g.addClass(t.prev,u.FIRST_NAV_DISABLED);for(x=0;x=y.get("numItems")){if(!y.get("isCircular")){e.removeListener(t.next,"click",m);g.addClass(t.next,u.DISABLED);for(x=0;xw.CONFIG.MAX_PAGER_BUTTONS){w._updatePagerMenu();}else{w._updatePagerButtons();}}function N(t,u){switch(u){case"height":return f(t,"marginTop")+f(t,"marginBottom")+f(t,"paddingTop")+f(t,"paddingBottom")+f(t,"borderTopWidth")+f(t,"borderBottomWidth");case"width":return f(t,"marginLeft")+f(t,"marginRight")+f(t,"paddingLeft")+f(t,"paddingRight")+f(t,"borderLeftWidth")+f(t,"borderRightWidth");default:break;}return f(t,u);}function A(u){var t=this;if(!r.isObject(u)){return;}switch(u.ev){case T:t._syncUiForItemAdd(u);break;case q:t._syncUiForItemRemove(u);break;case R:t._syncUiForItemReplace(u);break;case M:t._syncUiForLazyLoading(u);break;}t.fireEvent(L);}function E(w,u){var y=this,x=y.get("currentPage"),v,t=y.get("numVisible");v=parseInt(y._firstItem/t,10);if(v!=x){y.setAttributeConfig("currentPage",{value:v});y.fireEvent(j,v);}if(y.get("selectOnScroll")){if(y.get("selectedItem")!=y._selectedItem){y.set("selectedItem",y._selectedItem);}}clearTimeout(y._autoPlayTimer);delete y._autoPlayTimer;if(y.isAutoPlayOn()){y.startAutoPlay();}y.fireEvent(F,{first:y._firstItem,last:u},y);}V.getById=function(t){return U[t]?U[t].object:false;};YAHOO.extend(V,YAHOO.util.Element,{_rows:null,_cols:null,_animObj:null,_carouselEl:null,_clipEl:null,_firstItem:0,_hasFocus:false,_hasRendered:false,_isAnimationInProgress:false,_isAutoPlayInProgress:false,_itemsTable:null,_navBtns:null,_navEl:null,_nextEnabled:true,_pages:null,_pagination:null,_prevEnabled:true,_recomputeSize:true,_itemAttrCache:null,CLASSES:{BUTTON:"yui-carousel-button",CAROUSEL:"yui-carousel",CAROUSEL_EL:"yui-carousel-element",CONTAINER:"yui-carousel-container",CONTENT:"yui-carousel-content",DISABLED:"yui-carousel-button-disabled",FIRST_NAV:" yui-carousel-first-button",FIRST_NAV_DISABLED:"yui-carousel-first-button-disabled",FIRST_PAGE:"yui-carousel-nav-first-page",FOCUSSED_BUTTON:"yui-carousel-button-focus",HORIZONTAL:"yui-carousel-horizontal",ITEM_LOADING:"yui-carousel-item-loading",MIN_WIDTH:"yui-carousel-min-width",NAVIGATION:"yui-carousel-nav",NEXT_NAV:" yui-carousel-next-button",NEXT_PAGE:"yui-carousel-next",NAV_CONTAINER:"yui-carousel-buttons",PAGER_ITEM:"yui-carousel-pager-item",PAGINATION:"yui-carousel-pagination",PAGE_FOCUS:"yui-carousel-nav-page-focus",PREV_PAGE:"yui-carousel-prev",ITEM:"yui-carousel-item",SELECTED_ITEM:"yui-carousel-item-selected",SELECTED_NAV:"yui-carousel-nav-page-selected",VERTICAL:"yui-carousel-vertical",MULTI_ROW:"yui-carousel-multi-row",ROW:"yui-carousel-row",VERTICAL_CONTAINER:"yui-carousel-vertical-container",VISIBLE:"yui-carousel-visible"},CONFIG:{FIRST_VISIBLE:0,HORZ_MIN_WIDTH:180,MAX_PAGER_BUTTONS:5,VERT_MIN_WIDTH:115,NUM_VISIBLE:3},STRINGS:{ITEM_LOADING_CONTENT:"Loading",NEXT_BUTTON_TEXT:"Next Page",PAGER_PREFIX_TEXT:"Go to page ",PREVIOUS_BUTTON_TEXT:"Previous Page"},addItem:function(AA,u){var z=this,w,v,t,AB=0,y,x=z.get("numItems");if(!AA){return false;}if(r.isString(AA)||AA.nodeName){v=AA.nodeName?AA.innerHTML:AA;}else{if(r.isObject(AA)){v=AA.content;}else{return false;}}w=z.CLASSES.ITEM+(AA.className?" "+AA.className:"");t=AA.id?AA.id:g.generateId();if(r.isUndefined(u)){z._itemsTable.items.push({item:v,className:w,id:t});y=z._itemsTable.items.length-1;}else{if(u<0||u>x){return false;}if(!z._itemsTable.items[u]){z._itemsTable.items[u]=undefined;AB=1;}z._itemsTable.items.splice(u,AB,{item:v,className:w,id:t});}z._itemsTable.numItems++;if(x0){if(!t.removeItem(0)){}if(t._itemsTable.numItems===0){t.set("numItems",0);break;}u--;}t.fireEvent(i);},focus:function(){var AC=this,x,y,z,w,AB,AD,u,v,t;if(!AC._hasRendered){return;}if(AC.isAnimating()){return;}t=AC.get("selectedItem");AD=AC.get("numVisible");u=AC.get("selectOnScroll");v=(t>=0)?AC.getItem(t):null;x=AC.get("firstVisible");AB=x+AD-1;z=(tAB);y=(v&&v.id)?g.get(v.id):null;w=AC._itemsTable;if(!u&&z){y=(w&&w.items&&w.items[x])?g.get(w.items[x].id):null;}if(y){try{y.focus();}catch(AA){}}AC.fireEvent(Y);},hide:function(){var t=this;if(t.fireEvent(d)!==false){t.removeClass(t.CLASSES.VISIBLE);G.call(t,false);t.fireEvent(c);}},init:function(w,u){var x=this,t=w,y=false,v;if(!w){return;}x._hasRendered=false;x._navBtns={prev:[],next:[]};x._pages={el:null,num:0,cur:0};x._pagination={};x._itemAttrCache={};x._itemsTable={loading:{},numItems:0,items:[],size:0};if(r.isString(w)){w=g.get(w);}else{if(!w.nodeName){return;}}V.superclass.init.call(x,w,u);v=x.get("selectedItem");if(v>0){x.set("firstVisible",D.call(x,v));}if(w){if(!w.id){w.setAttribute("id",g.generateId());}y=x._parseCarousel(w);if(!y){x._createCarousel(t);}}else{w=x._createCarousel(t);}t=w.id;x.initEvents();if(y){x._parseCarouselItems();}if(v>0){p.call(x,v,0);}if(!u||typeof u.isVertical=="undefined"){x.set("isVertical",false);}x._parseCarouselNavigation(w);x._navEl=x._setupCarouselNavigation();U[t]={object:x};x._loadItems(Math.min(x.get("firstVisible")+x.get("numVisible"),x.get("numItems"))-1);},initAttributes:function(t){var u=this;t=t||{};V.superclass.initAttributes.call(u,t);u.setAttributeConfig("carouselEl",{validator:r.isString,value:t.carouselEl||"OL"});u.setAttributeConfig("carouselItemEl",{validator:r.isString,value:t.carouselItemEl||"LI"});u.setAttributeConfig("currentPage",{readOnly:true,value:0});u.setAttributeConfig("firstVisible",{method:u._setFirstVisible,validator:u._validateFirstVisible,value:t.firstVisible||u.CONFIG.FIRST_VISIBLE});u.setAttributeConfig("selectOnScroll",{validator:r.isBoolean,value:t.selectOnScroll||true});u.setAttributeConfig("numVisible",{setter:u._numVisibleSetter,method:u._setNumVisible,validator:u._validateNumVisible,value:t.numVisible||u.CONFIG.NUM_VISIBLE}); +u.setAttributeConfig("numItems",{method:u._setNumItems,validator:u._validateNumItems,value:u._itemsTable.numItems});u.setAttributeConfig("scrollIncrement",{validator:u._validateScrollIncrement,value:t.scrollIncrement||1});u.setAttributeConfig("selectedItem",{setter:u._selectedItemSetter,method:u._setSelectedItem,validator:r.isNumber,value:-1});u.setAttributeConfig("revealAmount",{method:u._setRevealAmount,validator:u._validateRevealAmount,value:t.revealAmount||0});u.setAttributeConfig("isCircular",{validator:r.isBoolean,value:t.isCircular||false});u.setAttributeConfig("isVertical",{method:u._setOrientation,validator:r.isBoolean,value:t.isVertical||false});u.setAttributeConfig("navigation",{method:u._setNavigation,validator:u._validateNavigation,value:t.navigation||{prev:null,next:null,page:null}});u.setAttributeConfig("animation",{validator:u._validateAnimation,value:t.animation||{speed:0,effect:null}});u.setAttributeConfig("autoPlay",{validator:r.isNumber,value:t.autoPlay||0});u.setAttributeConfig("autoPlayInterval",{validator:r.isNumber,value:t.autoPlayInterval||0});u.setAttributeConfig("numPages",{readOnly:true,getter:u._getNumPages});u.setAttributeConfig("lastVisible",{readOnly:true,getter:u._getLastVisible});},initEvents:function(){var v=this,u=v.CLASSES,t;v.on("keydown",v._keyboardEventHandler);v.on(F,n);v.on(T,A);v.on(q,A);v.on(R,A);v.on(C,v._focusHandler);v.on(M,A);v.on(i,function(w){v.scrollTo(0);n.call(v);S.call(v);});v.on(j,S,v);v.on(I,function(w){if(v.get("selectedItem")===null||v.get("selectedItem")<=0){v.set("selectedItem",v.get("firstVisible"));}n.call(v,w);S.call(v,w);v._setClipContainerSize();v.show();});v.on("selectedItemChange",function(w){p.call(v,w.newValue,w.prevValue);if(w.newValue>=0){v._updateTabIndex(v.getElementForItem(w.newValue));}v.fireEvent(C,w.newValue);});v.on(L,function(w){n.call(v,w);S.call(v,w);});v.on("firstVisibleChange",function(w){if(!v.get("selectOnScroll")){if(w.newValue>=0){v._updateTabIndex(v.getElementForItem(w.newValue));}}});v.on("click",function(w){if(v.isAutoPlayOn()){v.stopAutoPlay();}v._itemClickHandler(w);v._pagerClickHandler(w);});e.onFocus(v.get("element"),function(w,y){var x=e.getTarget(w);if(x&&x.nodeName.toUpperCase()=="A"&&g.getAncestorByClassName(x,u.NAVIGATION)){if(t){g.removeClass(t,u.PAGE_FOCUS);}t=x.parentNode;g.addClass(t,u.PAGE_FOCUS);}else{if(t){g.removeClass(t,u.PAGE_FOCUS);}}y._hasFocus=true;y._updateNavButtons(e.getTarget(w),true);},v);e.onBlur(v.get("element"),function(w,x){x._hasFocus=false;x._updateNavButtons(e.getTarget(w),false);},v);},isAnimating:function(){return this._isAnimationInProgress;},isAutoPlayOn:function(){return this._isAutoPlayInProgress;},getElementForItem:function(t){var u=this;if(t<0||t>=u.get("numItems")){return null;}if(u._itemsTable.items[t]){return g.get(u._itemsTable.items[t].id);}return null;},getElementForItems:function(){var v=this,u=[],t;for(t=0;t=u.get("numItems")){return null;}if(u._itemsTable.items.length>t){if(!r.isUndefined(u._itemsTable.items[t])){return u._itemsTable.items[t];}}return null;},getItems:function(){return this._itemsTable.items;},getLoadingItems:function(){return this._itemsTable.loading;},getRows:function(){return this._rows;},getCols:function(){return this._cols;},getItemPositionById:function(y){var w=this,x=w.get("numItems"),u=0,t=w._itemsTable.items,v;while(u=u){return false;}w=t.items.splice(v,1);if(w&&w.length==1){if(t.numItems){t.numItems--;}x.set("numItems",u-1);x.fireEvent(q,{item:w[0],pos:v,ev:q});return true;}return false;},replaceItem:function(AB,w){var AA=this,y,x,v,z=AA.get("numItems"),u,t=AB;if(!AB){return false;}if(r.isString(AB)||AB.nodeName){x=AB.nodeName?AB.innerHTML:AB;}else{if(r.isObject(AB)){x=AB.content;}else{return false;}}if(r.isUndefined(w)){return false;}else{if(w<0||w>=z){return false;}u=AA._itemsTable.items[w];if(!u){u=AA._itemsTable.loading[w];AA._itemsTable.items[w]=undefined;}v=u.id||g.generateId();AA._itemsTable.items.splice(w,1,{item:x,className:AA.CLASSES.ITEM+(AB.className?" "+AB.className:""),id:v});t=AA._itemsTable.items[w];}AA.fireEvent(R,{newItem:t,oldItem:u,pos:w,ev:R});return true;},replaceItems:function(t){var u,w,v=true;if(!r.isArray(t)){return false;}a=false;for(u=0,w=t.length;uu.get("numItems")){t=0;}if(u.get("selectOnScroll")){u._selectedItem=u._getSelectedItem(t);}u.scrollTo(t);},scrollTo:function(AK,AH){var AG=this,v,AI,AA,AC,AL,AM,AN,AD,AB,w,AF,t,x,u,y,AE,z,AO,AJ=AG._itemsTable;if(AJ.numItems===0||AK==AG._firstItem||AG.isAnimating()){return;}AI=AG.get("animation");AA=AG.get("isCircular");AC=AG.get("isVertical");AB=AG._cols;w=AG._rows;AN=AG._firstItem;AF=AG.get("numItems"); +t=AG.get("numVisible");u=AG.get("currentPage");AO=function(){if(AG.isAutoPlayOn()){AG.stopAutoPlay();}};if(AK<0){if(AA){if(AF%t!==0){AK=AF+(AF%t)-t-1;}else{AK=AF+AK;}}else{AO.call(AG);return;}}else{if(AF>0&&AK>AF-1){if(AG.get("isCircular")){AK=AF-AK;}else{AO.call(AG);return;}}}if(isNaN(AK)){return;}AM=(AG._firstItem>AK)?"backward":"forward";AE=AN+t;AE=(AE>AF-1)?AF-1:AE;y=AG.fireEvent(k,{dir:AM,first:AN,last:AE});if(y===false){return;}AG.fireEvent(K,{page:u});AD=AK+t-1;AG._loadItems(AD>AF-1?AF-1:AD);AL=0-AK;if(w){if(AC){AL=parseInt(AL/AB,10);}else{AL=parseInt(AL/w,10);}}AG._firstItem=AK;AG.set("firstVisible",AK);if(!AH&&AG.get("selectOnScroll")){AG._selectedItem=AK;}AE=AK+t;AE=(AE>AF-1)?AF-1:AE;x=l.call(AG,AL);v=AI.speed>0;if(v){AG._animateAndSetCarouselOffset(x,AK,AE,AH);}else{AG._setCarouselOffset(x);E.call(AG,AK,AE);}},getPageForItem:function(t){return Math.ceil((t+1)/parseInt(this.get("numVisible"),10));},getFirstVisibleOnPage:function(t){return(t-1)*this.get("numVisible");},selectPreviousItem:function(){var v=this,u=0,t=v.get("selectedItem");if(t==v._firstItem){u=t-v.get("numVisible");v._selectedItem=v._getSelectedItem(t-1);v.scrollTo(u,true);}else{u=v.get("selectedItem")-v.get("scrollIncrement");v.set("selectedItem",v._getSelectedItem(u));}},selectNextItem:function(){var u=this,t=0;t=u.get("selectedItem")+u.get("scrollIncrement");u.set("selectedItem",u._getSelectedItem(t));},show:function(){var u=this,t=u.CLASSES;if(u.fireEvent(Z)!==false){u.addClass(t.VISIBLE);G.call(u);u.fireEvent(W);}},startAutoPlay:function(){var t=this,u;if(r.isUndefined(t._autoPlayTimer)){u=t.get("autoPlayInterval");if(u<=0){return;}t._isAutoPlayInProgress=true;t.fireEvent(b);t._autoPlayTimer=setTimeout(function(){t._autoScroll();},u);}},stopAutoPlay:function(){var t=this;if(!r.isUndefined(t._autoPlayTimer)){clearTimeout(t._autoPlayTimer);delete t._autoPlayTimer;t._isAutoPlayInProgress=false;t.fireEvent(s);}},updatePagination:function(){var AB=this,z=AB._pagination;if(!z.el){return false;}var y=AB.get("numItems"),AC=AB.get("numVisible"),w=AB.get("firstVisible")+1,x=AB.get("currentPage")+1,t=AB.get("numPages"),v={"numVisible":AC,"numPages":t,"numItems":y,"selectedItem":AB.get("selectedItem")+1,"currentPage":x,"firstVisible":w,"lastVisible":AB.get("lastVisible")+1},u=z.callback||{},AA=u.scope&&u.obj?u.obj:AB;z.el.innerHTML=r.isFunction(u.fn)?u.fn.apply(AA,[z.template,v]):YAHOO.lang.substitute(z.template,v);},registerPagination:function(u,w,t){var v=this;v._pagination.template=u;v._pagination.callback=t||{};if(!v._pagination.el){v._pagination.el=X("DIV",{className:v.CLASSES.PAGINATION});if(w=="before"){v._navEl.insertBefore(v._pagination.el,v._navEl.firstChild);}else{v._navEl.appendChild(v._pagination.el);}v.on("itemSelected",v.updatePagination);v.on("pageChange",v.updatePagination);}v.updatePagination();},toString:function(){return Q+(this.get?" (#"+this.get("id")+")":"");},_animateAndSetCarouselOffset:function(y,w,u){var x=this,v=x.get("animation"),t=null;if(x.get("isVertical")){t=new YAHOO.util.Motion(x._carouselEl,{top:{to:y}},v.speed,v.effect);}else{t=new YAHOO.util.Motion(x._carouselEl,{left:{to:y}},v.speed,v.effect);}x._isAnimationInProgress=true;t.onComplete.subscribe(x._animationCompleteHandler,{scope:x,item:w,last:u});t.animate();},_animationCompleteHandler:function(t,u,v){v.scope._isAnimationInProgress=false;E.call(v.scope,v.item,v.last);},_autoScroll:function(){var u=this,v=u._firstItem,t;if(v>=u.get("numItems")-1){if(u.get("isCircular")){t=0;}else{u.stopAutoPlay();}}else{t=v+u.get("numVisible");}u._selectedItem=u._getSelectedItem(t);u.scrollTo.call(u,t);},_createCarousel:function(u){var w=this,t=w.CLASSES,v=g.get(u);if(!v){v=X("DIV",{className:t.CAROUSEL,id:u});}if(!w._carouselEl){w._carouselEl=X(w.get("carouselEl"),{className:t.CAROUSEL_EL});}return v;},_createCarouselClip:function(){return X("DIV",{className:this.CLASSES.CONTENT});},_createCarouselItem:function(v){var t,u=this;return X(u.get("carouselItemEl"),{className:v.className,styles:{},content:v.content,id:v.id});},_getValidIndex:function(v){var y=this,t=y.get("isCircular"),w=y.get("numItems"),x=y.get("numVisible"),u=w-1;if(v<0){v=t?Math.ceil(w/x)*x+v:0;}else{if(v>u){v=t?0:u;}}return v;},_getSelectedItem:function(x){var w=this,t=w.get("isCircular"),v=w.get("numItems"),u=v-1;if(x<0){if(t){x=v+x;}else{x=w.get("selectedItem");}}else{if(x>u){if(t){x=x-v;}else{x=w.get("selectedItem");}}}return x;},_focusHandler:function(){var t=this;if(t._hasFocus){t.focus();}},_itemClickHandler:function(x){var AA=this,y=AA.get("carouselItemEl"),u=AA.get("element"),v,w,z=e.getTarget(x),t=z.tagName.toUpperCase();if(t==="INPUT"||t==="SELECT"||t==="TEXTAREA"){return;}while(z&&z!=u&&z.id!=AA._carouselEl){v=z.nodeName;if(v.toUpperCase()==y){break;}z=z.parentNode;}if((w=AA.getItemPositionById(z.id))>=0){AA.set("selectedItem",AA._getSelectedItem(w));AA.focus();}},_keyboardEventHandler:function(v){var x=this,u=e.getCharCode(v),w=e.getTarget(v),t=false;if(x.isAnimating()||w.tagName.toUpperCase()==="SELECT"){return;}switch(u){case 37:case 38:x.selectPreviousItem();t=true;break;case 39:case 40:x.selectNextItem();t=true;break;case 33:x.scrollPageBackward();t=true;break;case 34:x.scrollPageForward();t=true;break;}if(t){if(x.isAutoPlayOn()){x.stopAutoPlay();}e.preventDefault(v);}},_loadItems:function(v){var y=this,u=y.get("numItems"),w=y.get("numVisible"),x=y.get("revealAmount"),z=y._itemsTable.items.length,t=y.get("lastVisible");if(z>v&&v+1>=w){z=v%w||v==t?v-v%w:v-w+1;}if(x&&v=z&&(!y.getItem(z)||!y.getItem(v))){y.fireEvent(M,{ev:M,first:z,last:v,num:v-z+1});}},_pagerChangeHandler:function(u){var x=this,w=e.getTarget(u),v=w.value,t;if(v){t=x.getFirstVisibleOnPage(v);x._selectedItem=t;x.scrollTo(t);x.focus();}},_pagerClickHandler:function(z){var AB=this,v=AB.CLASSES,w=e.getTarget(z),u=w.nodeName.toUpperCase(),t,y,x,AA;if(g.hasClass(w,v.PAGER_ITEM)||g.hasClass(w.parentNode,v.PAGER_ITEM)){if(u=="EM"){w=w.parentNode;}t=w.href;y=t.lastIndexOf("#");x=parseInt(t.substring(y+1),10); +if(x!=-1){AA=AB.getFirstVisibleOnPage(x);AB._selectedItem=AA;AB.scrollTo(AA);AB.focus();}e.preventDefault(z);}},_parseCarousel:function(v){var y=this,z,t,u,x,w;t=y.CLASSES;u=y.get("carouselEl");x=false;for(z=v.firstChild;z;z=z.nextSibling){if(z.nodeType==1){w=z.nodeName;if(w.toUpperCase()==u){y._carouselEl=z;g.addClass(y._carouselEl,y.CLASSES.CAROUSEL_EL);x=true;}}}return x;},_parseCarouselItems:function(){var AA=this,AC=AA.CLASSES,x=0,AB,t,v,w,u,y=AA.get("firstVisible"),z=AA._carouselEl;AB=AA._rows;v=AA.get("carouselItemEl");for(t=z.firstChild;t;t=t.nextSibling){if(t.nodeType==1){u=t.nodeName;if(u.toUpperCase()==v){if(t.id){w=t.id;}else{w=g.generateId();t.setAttribute("id",w);g.addClass(t,AA.CLASSES.ITEM);}AA.addItem(t,y);y++;}}}},_parseCarouselNavigation:function(z){var AA=this,y,AB=AA.CLASSES,u,x,w,t,v=false;t=g.getElementsByClassName(AB.PREV_PAGE,"*",z);if(t.length>0){for(x in t){if(t.hasOwnProperty(x)){u=t[x];if(u.nodeName=="INPUT"||u.nodeName=="BUTTON"||u.nodeName=="A"){AA._navBtns.prev.push(u);}else{w=u.getElementsByTagName("INPUT");if(r.isArray(w)&&w.length>0){AA._navBtns.prev.push(w[0]);}else{w=u.getElementsByTagName("BUTTON");if(r.isArray(w)&&w.length>0){AA._navBtns.prev.push(w[0]);}}}}}y={prev:t};}t=g.getElementsByClassName(AB.NEXT_PAGE,"*",z);if(t.length>0){for(x in t){if(t.hasOwnProperty(x)){u=t[x];if(u.nodeName=="INPUT"||u.nodeName=="BUTTON"||u.nodeName=="A"){AA._navBtns.next.push(u);}else{w=u.getElementsByTagName("INPUT");if(r.isArray(w)&&w.length>0){AA._navBtns.next.push(w[0]);}else{w=u.getElementsByTagName("BUTTON");if(r.isArray(w)&&w.length>0){AA._navBtns.next.push(w[0]);}}}}}if(y){y.next=t;}else{y={next:t};}}if(y){AA.set("navigation",y);v=true;}return v;},_refreshUi:function(){var x=this,y=x.get("isVertical"),AA=x.get("firstVisible"),u,v,z,t,w;if(x._itemsTable.numItems<1){return;}w=P.call(x,y?"height":"width");v=x._itemsTable.items[AA].id;w=y?f(v,"width"):f(v,"height");g.setStyle(x._carouselEl,y?"width":"height",w+"px");x._hasRendered=true;x.fireEvent(I);},_setCarouselOffset:function(v){var t=this,u;u=t.get("isVertical")?"top":"left";g.setStyle(t._carouselEl,u,v+"px");},_setupCarouselNavigation:function(){var y=this,w,u,t,AA,x,z,v;t=y.CLASSES;x=g.getElementsByClassName(t.NAVIGATION,"DIV",y.get("element"));if(x.length===0){x=X("DIV",{className:t.NAVIGATION});y.insertBefore(x,g.getFirstChild(y.get("element")));}else{x=x[0];}y._pages.el=X("UL");x.appendChild(y._pages.el);AA=y.get("navigation");if(r.isString(AA.prev)||r.isArray(AA.prev)){if(r.isString(AA.prev)){AA.prev=[AA.prev];}for(w in AA.prev){if(AA.prev.hasOwnProperty(w)){y._navBtns.prev.push(g.get(AA.prev[w]));}}}else{v=X("SPAN",{className:t.BUTTON+t.FIRST_NAV});g.setStyle(v,"visibility","visible");w=g.generateId();v.innerHTML='";x.appendChild(v);w=g.get(w);y._navBtns.prev=[w];u={prev:[v]};}if(r.isString(AA.next)||r.isArray(AA.next)){if(r.isString(AA.next)){AA.next=[AA.next];}for(w in AA.next){if(AA.next.hasOwnProperty(w)){y._navBtns.next.push(g.get(AA.next[w]));}}}else{z=X("SPAN",{className:t.BUTTON+t.NEXT_NAV});g.setStyle(z,"visibility","visible");w=g.generateId();z.innerHTML='";x.appendChild(z);w=g.get(w);y._navBtns.next=[w];if(u){u.next=[z];}else{u={next:[z]};}}if(u){y.set("navigation",u);}return x;},_setClipContainerSize:function(t,v){var AB=this,z=AB.get("isVertical"),AD=AB._rows,x=AB._cols,AA=AB.get("revealAmount"),u=P.call(AB,"height"),w=P.call(AB,"width"),AC,y;AB._recomputeSize=(AC===0);if(AB._recomputeSize){AB._hasRendered=false;return;}t=t||AB._clipEl;if(AD){AC=u*AD;y=w*x;}else{v=v||AB.get("numVisible");if(z){AC=u*v;}else{y=w*v;}}AA=O.call(AB);if(z){AC+=(AA*2);}else{y+=(AA*2);}if(z){AC+=N(AB._carouselEl,"height");g.setStyle(t,"height",AC+"px");if(x){y+=N(AB._carouselEl,"width");g.setStyle(t,"width",y+(0)+"px");}}else{y+=N(AB._carouselEl,"width");g.setStyle(t,"width",y+"px");if(AD){AC+=N(AB._carouselEl,"height");g.setStyle(t,"height",AC+"px");}}if(t){AB._setContainerSize(t);}},_setContainerSize:function(u,v){var y=this,t=y.CONFIG,AB=y.CLASSES,x,AA,w,z;x=y.get("isVertical");AA=y._rows;w=y._cols;u=u||y._clipEl;v=v||(x?"height":"width");z=parseFloat(g.getStyle(u,v),10);z=r.isNumber(z)?z:0;if(x){z+=N(y._carouselEl,"height")+f(y._navEl,"height");}else{z+=N(y._carouselEl,"width");}if(!x){if(z=0&&uv){u.removeItem(t-1);t--;}}return v;},_setOrientation:function(v){var u=this,t=u.CLASSES;if(v){u.replaceClass(t.HORIZONTAL,t.VERTICAL);}else{u.replaceClass(t.VERTICAL,t.HORIZONTAL);}return v;},_setRevealAmount:function(u){var t=this;if(u>=0&&u<=100){u=parseInt(u,10);u=r.isNumber(u)?u:0;t._setClipContainerSize();}else{u=t.get("revealAmount");}return u;},_setSelectedItem:function(t){this._selectedItem=t;},_getNumPages:function(){return Math.ceil(parseInt(this.get("numItems"),10)/parseInt(this.get("numVisible"),10)); +},_getLastVisible:function(){var t=this;return t.get("currentPage")+1==t.get("numPages")?t.get("numItems")-1:t.get("firstVisible")+t.get("numVisible")-1;},_syncUiForItemAdd:function(w){var x,AC=this,z=AC._carouselEl,t,AD,v=AC._itemsTable,u,y,AA,AB;y=r.isUndefined(w.pos)?w.newPos||v.numItems-1:w.pos;if(!u){AD=v.items[y]||{};t=AC._createCarouselItem({className:AD.className,styles:AD.styles,content:AD.item,id:AD.id,pos:y});if(r.isUndefined(w.pos)){if(!r.isUndefined(v.loading[y])){u=v.loading[y];}if(u){z.replaceChild(t,u);delete v.loading[y];}else{z.appendChild(t);}}else{if(!r.isUndefined(v.items[w.pos+1])){AA=g.get(v.items[w.pos+1].id);}if(AA){z.insertBefore(t,AA);}else{}}}else{if(r.isUndefined(w.pos)){if(!g.isAncestor(AC._carouselEl,u)){z.appendChild(u);}}else{if(!g.isAncestor(z,u)){if(!r.isUndefined(v.items[w.pos+1])){z.insertBefore(u,g.get(v.items[w.pos+1].id));}}}}if(!AC._hasRendered){AC._refreshUi();}if(AC.get("selectedItem")<0){AC.set("selectedItem",AC.get("firstVisible"));}AC._syncUiItems();},_syncUiForItemReplace:function(z){var y=this,v=y._carouselEl,t=y._itemsTable,AA=z.pos,x=z.newItem,u=z.oldItem,w;w=y._createCarouselItem({className:x.className,styles:x.styles,content:x.item,id:u.id});if((u=g.get(u.id))){u.className=x.className;u.styles=x.styles;u.innerHTML=x.item;t.items[AA]=w;if(t.loading[AA]){t.numItems++;delete t.loading[AA];}}},_syncUiForItemRemove:function(y){var x=this,t=x._carouselEl,v,w,u,z;u=x.get("numItems");w=y.item;z=y.pos;if(w&&(v=g.get(w.id))){if(v&&g.isAncestor(t,v)){e.purgeElement(v,true);t.removeChild(v);}if(x.get("selectedItem")==z){z=z>=u?u-1:z;}}else{}x._syncUiItems();},_findClosestSibling:function(y){var x=this,u=x._itemsTable,t=u.items.length,v=y,w;while(v'+AB.STRINGS.PAGER_PREFIX_TEXT+" "+(w+1)+"";t.innerHTML=y;v.appendChild(t);}g.setStyle(v,"visibility","visible");},_updatePagerMenu:function(){var AB=this,z=AB.CLASSES,AA=AB._pages.cur,u,x,AC,v=AB.get("numVisible"),y=AB._pages.num,w=AB._pages.el,t;if(y===0||!w){return;}t=document.createElement("SELECT");if(!t){return;}g.setStyle(w,"visibility","hidden");while(w.firstChild){w.removeChild(w.firstChild);}for(x=0;x=0&&v=0);},_validateNumVisible:function(t){var u=false;if(r.isNumber(t)){u=t>0&&t<=this.get("numItems");}else{if(r.isArray(t)){if(r.isNumber(t[0])&&r.isNumber(t[1])){u=t[0]*t[1]>0&&t.length==2;}}}return u;},_validateRevealAmount:function(t){var u=false;if(r.isNumber(t)){u=t>=0&&t<100;}return u;},_validateScrollIncrement:function(t){var u=false;if(r.isNumber(t)){u=(t>0&&t";}catch(b){return false;}return(a.firstChild&&a.firstChild.nodeName==="TBODY");}});P("innerhtml-div","tr",{test:function(){return J("","tr");}});P("innerhtml-div","script",{test:function(){return J("','script');}});addFeature('value-set','select',{test:function(){var node=Y.config.doc.createElement('select');node.innerHTML='';node.value='2';return(node.value&&node.value==='2');}});(function(Y){var creators=Y_DOM.creators,create=Y_DOM.create,re_tbody=/(?:\/(?:thead|tfoot|tbody|caption|col|colgroup)>)+\s*1&&tb&&!re_tbody.test(html)){tb[PARENT_NODE].removeChild(tb);} +return frag;};} +if(!testFeature('innerhtml-div','script')){creators.script=function(html,doc){var frag=doc.createElement('div');frag.innerHTML='-'+html;frag.removeChild(frag[FIRST_CHILD]);return frag;} +Y_DOM.creators.link=Y_DOM.creators.style=Y_DOM.creators.script;} +if(!testFeature('value-set','select')){Y_DOM.VALUE_SETTERS.select=function(node,val){for(var i=0,options=node.getElementsByTagName('option'),option;option=options[i++];){if(Y_DOM.getValue(option)===val){option.selected=true;break;}}}} +Y.mix(Y_DOM.VALUE_GETTERS,{button:function(node){return(node.attributes&&node.attributes.value)?node.attributes.value.value:'';}});Y.mix(Y_DOM.VALUE_SETTERS,{button:function(node,val){var attr=node.attributes.value;if(!attr){attr=node[OWNER_DOCUMENT].createAttribute('value');node.setAttributeNode(attr);} +attr.value=val;}});if(!testFeature('innerhtml-div','tr')){Y.mix(creators,{option:function(html,doc){return create('',doc);},tr:function(html,doc){return create(''+html+'',doc);},td:function(html,doc){return create(''+html+'',doc);},col:function(html,doc){return create(''+html+'',doc);},tbody:'table'});Y.mix(creators,{legend:'fieldset',th:creators.td,thead:creators.tbody,tfoot:creators.tbody,caption:creators.tbody,colgroup:creators.tbody,optgroup:creators.option});} +Y.mix(Y_DOM.VALUE_GETTERS,{option:function(node){var attrs=node.attributes;return(attrs.value&&attrs.value.specified)?node.value:node.text;},select:function(node){var val=node.value,options=node.options;if(options&&options.length){if(node.multiple){}else{val=Y_DOM.getValue(options[node.selectedIndex]);}} +return val;}});})(Y);Y.DOM=Y_DOM;})(Y);var addClass,hasClass,removeClass;Y.mix(Y.DOM,{hasClass:function(node,className){var re=Y.DOM._getRegExp('(?:^|\\s+)'+className+'(?:\\s+|$)');return re.test(node.className);},addClass:function(node,className){if(!Y.DOM.hasClass(node,className)){node.className=Y.Lang.trim([node.className,className].join(' '));}},removeClass:function(node,className){if(className&&hasClass(node,className)){node.className=Y.Lang.trim(node.className.replace(Y.DOM._getRegExp('(?:^|\\s+)'+ +className+'(?:\\s+|$)'),' '));if(hasClass(node,className)){removeClass(node,className);}}},replaceClass:function(node,oldC,newC){removeClass(node,oldC);addClass(node,newC);},toggleClass:function(node,className,force){var add=(force!==undefined)?force:!(hasClass(node,className));if(add){addClass(node,className);}else{removeClass(node,className);}}});hasClass=Y.DOM.hasClass;removeClass=Y.DOM.removeClass;addClass=Y.DOM.addClass;Y.mix(Y.DOM,{setWidth:function(node,size){Y.DOM._setSize(node,'width',size);},setHeight:function(node,size){Y.DOM._setSize(node,'height',size);},_setSize:function(node,prop,val){val=(val>0)?val:0;var size=0;node.style[prop]=val+'px';size=(prop==='height')?node.offsetHeight:node.offsetWidth;if(size>val){val=val-(size-val);if(val<0){val=0;} +node.style[prop]=val+'px';}}});},'3.3.0',{requires:['oop']});YUI.add('dom-style',function(Y){(function(Y){var DOCUMENT_ELEMENT='documentElement',DEFAULT_VIEW='defaultView',OWNER_DOCUMENT='ownerDocument',STYLE='style',FLOAT='float',CSS_FLOAT='cssFloat',STYLE_FLOAT='styleFloat',TRANSPARENT='transparent',GET_COMPUTED_STYLE='getComputedStyle',GET_BOUNDING_CLIENT_RECT='getBoundingClientRect',WINDOW=Y.config.win,DOCUMENT=Y.config.doc,UNDEFINED=undefined,Y_DOM=Y.DOM,TRANSFORM='transform',VENDOR_TRANSFORM=['WebkitTransform','MozTransform','OTransform'],re_color=/color$/i,re_unit=/width|height|top|left|right|bottom|margin|padding/i;Y.Array.each(VENDOR_TRANSFORM,function(val){if(val in DOCUMENT[DOCUMENT_ELEMENT].style){TRANSFORM=val;}});Y.mix(Y_DOM,{DEFAULT_UNIT:'px',CUSTOM_STYLES:{},setStyle:function(node,att,val,style){style=style||node.style;var CUSTOM_STYLES=Y_DOM.CUSTOM_STYLES;if(style){if(val===null||val===''){val='';}else if(!isNaN(new Number(val))&&re_unit.test(att)){val+=Y_DOM.DEFAULT_UNIT;} +if(att in CUSTOM_STYLES){if(CUSTOM_STYLES[att].set){CUSTOM_STYLES[att].set(node,val,style);return;}else if(typeof CUSTOM_STYLES[att]==='string'){att=CUSTOM_STYLES[att];}}else if(att===''){att='cssText';val='';} +style[att]=val;}},getStyle:function(node,att,style){style=style||node.style;var CUSTOM_STYLES=Y_DOM.CUSTOM_STYLES,val='';if(style){if(att in CUSTOM_STYLES){if(CUSTOM_STYLES[att].get){return CUSTOM_STYLES[att].get(node,att,style);}else if(typeof CUSTOM_STYLES[att]==='string'){att=CUSTOM_STYLES[att];}} +val=style[att];if(val===''){val=Y_DOM[GET_COMPUTED_STYLE](node,att);}} +return val;},setStyles:function(node,hash){var style=node.style;Y.each(hash,function(v,n){Y_DOM.setStyle(node,n,v,style);},Y_DOM);},getComputedStyle:function(node,att){var val='',doc=node[OWNER_DOCUMENT];if(node[STYLE]&&doc[DEFAULT_VIEW]&&doc[DEFAULT_VIEW][GET_COMPUTED_STYLE]){val=doc[DEFAULT_VIEW][GET_COMPUTED_STYLE](node,null)[att];} +return val;}});if(DOCUMENT[DOCUMENT_ELEMENT][STYLE][CSS_FLOAT]!==UNDEFINED){Y_DOM.CUSTOM_STYLES[FLOAT]=CSS_FLOAT;}else if(DOCUMENT[DOCUMENT_ELEMENT][STYLE][STYLE_FLOAT]!==UNDEFINED){Y_DOM.CUSTOM_STYLES[FLOAT]=STYLE_FLOAT;} +if(Y.UA.opera){Y_DOM[GET_COMPUTED_STYLE]=function(node,att){var view=node[OWNER_DOCUMENT][DEFAULT_VIEW],val=view[GET_COMPUTED_STYLE](node,'')[att];if(re_color.test(att)){val=Y.Color.toRGB(val);} +return val;};} +if(Y.UA.webkit){Y_DOM[GET_COMPUTED_STYLE]=function(node,att){var view=node[OWNER_DOCUMENT][DEFAULT_VIEW],val=view[GET_COMPUTED_STYLE](node,'')[att];if(val==='rgba(0, 0, 0, 0)'){val=TRANSPARENT;} +return val;};} +Y.DOM._getAttrOffset=function(node,attr){var val=Y.DOM[GET_COMPUTED_STYLE](node,attr),offsetParent=node.offsetParent,position,parentOffset,offset;if(val==='auto'){position=Y.DOM.getStyle(node,'position');if(position==='static'||position==='relative'){val=0;}else if(offsetParent&&offsetParent[GET_BOUNDING_CLIENT_RECT]){parentOffset=offsetParent[GET_BOUNDING_CLIENT_RECT]()[attr];offset=node[GET_BOUNDING_CLIENT_RECT]()[attr];if(attr==='left'||attr==='top'){val=offset-parentOffset;}else{val=parentOffset-node[GET_BOUNDING_CLIENT_RECT]()[attr];}}} +return val;};Y.DOM._getOffset=function(node){var pos,xy=null;if(node){pos=Y_DOM.getStyle(node,'position');xy=[parseInt(Y_DOM[GET_COMPUTED_STYLE](node,'left'),10),parseInt(Y_DOM[GET_COMPUTED_STYLE](node,'top'),10)];if(isNaN(xy[0])){xy[0]=parseInt(Y_DOM.getStyle(node,'left'),10);if(isNaN(xy[0])){xy[0]=(pos==='relative')?0:node.offsetLeft||0;}} +if(isNaN(xy[1])){xy[1]=parseInt(Y_DOM.getStyle(node,'top'),10);if(isNaN(xy[1])){xy[1]=(pos==='relative')?0:node.offsetTop||0;}}} +return xy;};Y_DOM.CUSTOM_STYLES.transform={set:function(node,val,style){style[TRANSFORM]=val;},get:function(node,style){return Y_DOM[GET_COMPUTED_STYLE](node,TRANSFORM);}};})(Y);(function(Y){var PARSE_INT=parseInt,RE=RegExp;Y.Color={KEYWORDS:{black:'000',silver:'c0c0c0',gray:'808080',white:'fff',maroon:'800000',red:'f00',purple:'800080',fuchsia:'f0f',green:'008000',lime:'0f0',olive:'808000',yellow:'ff0',navy:'000080',blue:'00f',teal:'008080',aqua:'0ff'},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(val){if(!Y.Color.re_RGB.test(val)){val=Y.Color.toHex(val);} +if(Y.Color.re_hex.exec(val)){val='rgb('+[PARSE_INT(RE.$1,16),PARSE_INT(RE.$2,16),PARSE_INT(RE.$3,16)].join(', ')+')';} +return val;},toHex:function(val){val=Y.Color.KEYWORDS[val]||val;if(Y.Color.re_RGB.exec(val)){val=[Number(RE.$1).toString(16),Number(RE.$2).toString(16),Number(RE.$3).toString(16)];for(var i=0;i519)?true:false);while((parentNode=parentNode.offsetParent)){xy[0]+=parentNode.offsetLeft;xy[1]+=parentNode.offsetTop;if(bCheck){xy=Y_DOM._calcBorders(parentNode,xy);}} +if(Y_DOM.getStyle(node,POSITION)!=FIXED){parentNode=node;while((parentNode=parentNode.parentNode)){scrollTop=parentNode.scrollTop;scrollLeft=parentNode.scrollLeft;if(Y.UA.gecko&&(Y_DOM.getStyle(parentNode,'overflow')!=='visible')){xy=Y_DOM._calcBorders(parentNode,xy);} +if(scrollTop||scrollLeft){xy[0]-=scrollLeft;xy[1]-=scrollTop;}} +xy[0]+=Y_DOM.docScrollX(node,doc);xy[1]+=Y_DOM.docScrollY(node,doc);}else{xy[0]+=Y_DOM.docScrollX(node,doc);xy[1]+=Y_DOM.docScrollY(node,doc);}}else{xy=Y_DOM._getOffset(node);}} +return xy;};}}(),getX:function(node){return Y_DOM.getXY(node)[0];},getY:function(node){return Y_DOM.getXY(node)[1];},setXY:function(node,xy,noRetry){var setStyle=Y_DOM.setStyle,pos,delta,newXY,currentXY;if(node&&xy){pos=Y_DOM.getStyle(node,POSITION);delta=Y_DOM._getOffset(node);if(pos=='static'){pos=RELATIVE;setStyle(node,POSITION,pos);} +currentXY=Y_DOM.getXY(node);if(xy[0]!==null){setStyle(node,LEFT,xy[0]-currentXY[0]+delta[0]+'px');} +if(xy[1]!==null){setStyle(node,TOP,xy[1]-currentXY[1]+delta[1]+'px');} +if(!noRetry){newXY=Y_DOM.getXY(node);if(newXY[0]!==xy[0]||newXY[1]!==xy[1]){Y_DOM.setXY(node,xy,true);}}}else{}},setX:function(node,x){return Y_DOM.setXY(node,[x,null]);},setY:function(node,y){return Y_DOM.setXY(node,[null,y]);},swapXY:function(node,otherNode){var xy=Y_DOM.getXY(node);Y_DOM.setXY(node,Y_DOM.getXY(otherNode));Y_DOM.setXY(otherNode,xy);},_calcBorders:function(node,xy2){var t=parseInt(Y_DOM[GET_COMPUTED_STYLE](node,BORDER_TOP_WIDTH),10)||0,l=parseInt(Y_DOM[GET_COMPUTED_STYLE](node,BORDER_LEFT_WIDTH),10)||0;if(Y.UA.gecko){if(RE_TABLE.test(node.tagName)){t=0;l=0;}} +xy2[0]+=l;xy2[1]+=t;return xy2;},_getWinSize:function(node,doc){doc=doc||(node)?Y_DOM._getDoc(node):Y.config.doc;var win=doc.defaultView||doc.parentWindow,mode=doc[COMPAT_MODE],h=win.innerHeight,w=win.innerWidth,root=doc[DOCUMENT_ELEMENT];if(mode&&!Y.UA.opera){if(mode!='CSS1Compat'){root=doc.body;} +h=root.clientHeight;w=root.clientWidth;} +return{height:h,width:w};},_getDocSize:function(node){var doc=(node)?Y_DOM._getDoc(node):Y.config.doc,root=doc[DOCUMENT_ELEMENT];if(doc[COMPAT_MODE]!='CSS1Compat'){root=doc.body;} +return{height:root.scrollHeight,width:root.scrollWidth};}});})(Y);(function(Y){var TOP='top',RIGHT='right',BOTTOM='bottom',LEFT='left',getOffsets=function(r1,r2){var t=Math.max(r1[TOP],r2[TOP]),r=Math.min(r1[RIGHT],r2[RIGHT]),b=Math.min(r1[BOTTOM],r2[BOTTOM]),l=Math.max(r1[LEFT],r2[LEFT]),ret={};ret[TOP]=t;ret[RIGHT]=r;ret[BOTTOM]=b;ret[LEFT]=l;return ret;},DOM=Y.DOM;Y.mix(DOM,{region:function(node){var xy=DOM.getXY(node),ret=false;if(node&&xy){ret=DOM._getRegion(xy[1],xy[0]+node.offsetWidth,xy[1]+node.offsetHeight,xy[0]);} +return ret;},intersect:function(node,node2,altRegion){var r=altRegion||DOM.region(node),region={},n=node2,off;if(n.tagName){region=DOM.region(n);}else if(Y.Lang.isObject(node2)){region=node2;}else{return false;} +off=getOffsets(region,r);return{top:off[TOP],right:off[RIGHT],bottom:off[BOTTOM],left:off[LEFT],area:((off[BOTTOM]-off[TOP])*(off[RIGHT]-off[LEFT])),yoff:((off[BOTTOM]-off[TOP])),xoff:(off[RIGHT]-off[LEFT]),inRegion:DOM.inRegion(node,node2,false,altRegion)};},inRegion:function(node,node2,all,altRegion){var region={},r=altRegion||DOM.region(node),n=node2,off;if(n.tagName){region=DOM.region(n);}else if(Y.Lang.isObject(node2)){region=node2;}else{return false;} +if(all){return(r[LEFT]>=region[LEFT]&&r[RIGHT]<=region[RIGHT]&&r[TOP]>=region[TOP]&&r[BOTTOM]<=region[BOTTOM]);}else{off=getOffsets(region,r);if(off[BOTTOM]>=off[TOP]&&off[RIGHT]>=off[LEFT]){return true;}else{return false;}}},inViewportRegion:function(node,all,altRegion){return DOM.inRegion(node,DOM.viewportRegion(node),all,altRegion);},_getRegion:function(t,r,b,l){var region={};region[TOP]=region[1]=t;region[LEFT]=region[0]=l;region[BOTTOM]=b;region[RIGHT]=r;region.width=region[RIGHT]-region[LEFT];region.height=region[BOTTOM]-region[TOP];return region;},viewportRegion:function(node){node=node||Y.config.doc.documentElement;var ret=false,scrollX,scrollY;if(node){scrollX=DOM.docScrollX(node);scrollY=DOM.docScrollY(node);ret=DOM._getRegion(scrollY,DOM.winWidth(node)+scrollX,scrollY+DOM.winHeight(node),scrollX);} +return ret;}});})(Y);},'3.3.0',{requires:['dom-base','dom-style','event-base']});YUI.add('selector-native',function(Y){(function(Y){Y.namespace('Selector');var COMPARE_DOCUMENT_POSITION='compareDocumentPosition',OWNER_DOCUMENT='ownerDocument';var Selector={_foundCache:[],useNative:true,_compare:('sourceIndex'in Y.config.doc.documentElement)?function(nodeA,nodeB){var a=nodeA.sourceIndex,b=nodeB.sourceIndex;if(a===b){return 0;}else if(a>b){return 1;} +return-1;}:(Y.config.doc.documentElement[COMPARE_DOCUMENT_POSITION]?function(nodeA,nodeB){if(nodeA[COMPARE_DOCUMENT_POSITION](nodeB)&4){return-1;}else{return 1;}}:function(nodeA,nodeB){var rangeA,rangeB,compare;if(nodeA&&nodeB){rangeA=nodeA[OWNER_DOCUMENT].createRange();rangeA.setStart(nodeA,0);rangeB=nodeB[OWNER_DOCUMENT].createRange();rangeB.setStart(nodeB,0);compare=rangeA.compareBoundaryPoints(1,rangeB);} +return compare;}),_sort:function(nodes){if(nodes){nodes=Y.Array(nodes,0,true);if(nodes.sort){nodes.sort(Selector._compare);}} +return nodes;},_deDupe:function(nodes){var ret=[],i,node;for(i=0;(node=nodes[i++]);){if(!node._found){ret[ret.length]=node;node._found=true;}} +for(i=0;(node=ret[i++]);){node._found=null;node.removeAttribute('_found');} +return ret;},query:function(selector,root,firstOnly,skipNative){root=root||Y.config.doc;var ret=[],useNative=(Y.Selector.useNative&&Y.config.doc.querySelector&&!skipNative),queries=[[selector,root]],query,result,i,fn=(useNative)?Y.Selector._nativeQuery:Y.Selector._bruteQuery;if(selector&&fn){if(!skipNative&&(!useNative||root.tagName)){queries=Selector._splitQueries(selector,root);} +for(i=0;(query=queries[i++]);){result=fn(query[0],query[1],firstOnly);if(!firstOnly){result=Y.Array(result,0,true);} +if(result){ret=ret.concat(result);}} +if(queries.length>1){ret=Selector._sort(Selector._deDupe(ret));}} +return(firstOnly)?(ret[0]||null):ret;},_splitQueries:function(selector,node){var groups=selector.split(','),queries=[],prefix='',i,len;if(node){if(node.tagName){node.id=node.id||Y.guid();prefix='[id="'+node.id+'"] ';} +for(i=0,len=groups.length;i-1&&(Y.Selector.pseudos&&Y.Selector.pseudos.checked)){return Y.Selector.query(selector,root,one,true);} +try{return root['querySelector'+(one?'':'All')](selector);}catch(e){return Y.Selector.query(selector,root,one,true);}},filter:function(nodes,selector){var ret=[],i,node;if(nodes&&selector){for(i=0;(node=nodes[i++]);){if(Y.Selector.test(node,selector)){ret[ret.length]=node;}}}else{} +return ret;},test:function(node,selector,root){var ret=false,groups=selector.split(','),useFrag=false,parent,item,items,frag,i,j,group;if(node&&node.tagName){if(!root&&!Y.DOM.inDoc(node)){parent=node.parentNode;if(parent){root=parent;}else{frag=node[OWNER_DOCUMENT].createDocumentFragment();frag.appendChild(node);root=frag;useFrag=true;}} +root=root||node[OWNER_DOCUMENT];if(!node.id){node.id=Y.guid();} +for(i=0;(group=groups[i++]);){group+='[id="'+node.id+'"]';items=Y.Selector.query(group,root);for(j=0;item=items[j++];){if(item===node){ret=true;break;}} +if(ret){break;}} +if(useFrag){frag.removeChild(node);}} +return ret;},ancestor:function(element,selector,testSelf){return Y.DOM.ancestor(element,function(n){return Y.Selector.test(n,selector);},testSelf);}};Y.mix(Y.Selector,Selector,true);})(Y);},'3.3.0',{requires:['dom-base']});YUI.add('selector-css2',function(Y){var PARENT_NODE='parentNode',TAG_NAME='tagName',ATTRIBUTES='attributes',COMBINATOR='combinator',PSEUDOS='pseudos',Selector=Y.Selector,SelectorCSS2={_reRegExpTokens:/([\^\$\?\[\]\*\+\-\.\(\)\|\\])/,SORT_RESULTS:true,_children:function(node,tag){var ret=node.children,i,children=[],childNodes,child;if(node.children&&tag&&node.children.tags){children=node.children.tags(tag);}else if((!ret&&node[TAG_NAME])||(ret&&tag)){childNodes=ret||node.childNodes;ret=[];for(i=0;(child=childNodes[i++]);){if(child.tagName){if(!tag||tag===child.tagName){ret.push(child);}}}} +return ret||[];},_re:{attr:/(\[[^\]]*\])/g,pseudos:/:([\-\w]+(?:\(?:['"]?(.+)['"]?\)))*/i},shorthand:{'\\#(-?[_a-z]+[-\\w]*)':'[id=$1]','\\.(-?[_a-z]+[-\\w]*)':'[className~=$1]'},operators:{'':function(node,attr){return Y.DOM.getAttribute(node,attr)!=='';},'~=':'(?:^|\\s+){val}(?:\\s+|$)','|=':'^{val}-?'},pseudos:{'first-child':function(node){return Y.Selector._children(node[PARENT_NODE])[0]===node;}},_bruteQuery:function(selector,root,firstOnly){var ret=[],nodes=[],tokens=Selector._tokenize(selector),token=tokens[tokens.length-1],rootDoc=Y.DOM._getDoc(root),child,id,className,tagName;if(token){id=token.id;className=token.className;tagName=token.tagName||'*';if(root.getElementsByTagName){if(id&&(root.all||(root.nodeType===9||Y.DOM.inDoc(root)))){nodes=Y.DOM.allById(id,root);}else if(className){nodes=root.getElementsByClassName(className);}else{nodes=root.getElementsByTagName(tagName);}}else{child=root.firstChild;while(child){if(child.tagName){nodes.push(child);} +child=child.nextSilbing||child.firstChild;}} +if(nodes.length){ret=Selector._filterNodes(nodes,tokens,firstOnly);}} +return ret;},_filterNodes:function(nodes,tokens,firstOnly){var i=0,j,len=tokens.length,n=len-1,result=[],node=nodes[0],tmpNode=node,getters=Y.Selector.getters,operator,combinator,token,path,pass,value,tests,test;for(i=0;(tmpNode=node=nodes[i++]);){n=len-1;path=null;testLoop:while(tmpNode&&tmpNode.tagName){token=tokens[n];tests=token.tests;j=tests.length;if(j&&!pass){while((test=tests[--j])){operator=test[1];if(getters[test[0]]){value=getters[test[0]](tmpNode,test[0]);}else{value=tmpNode[test[0]];if(value===undefined&&tmpNode.getAttribute){value=tmpNode.getAttribute(test[0]);}} +if((operator==='='&&value!==test[2])||(typeof operator!=='string'&&operator.test&&!operator.test(value))||(!operator.test&&typeof operator==='function'&&!operator(tmpNode,test[0]))){if((tmpNode=tmpNode[path])){while(tmpNode&&(!tmpNode.tagName||(token.tagName&&token.tagName!==tmpNode.tagName))){tmpNode=tmpNode[path];}} +continue testLoop;}}} +n--;if(!pass&&(combinator=token.combinator)){path=combinator.axis;tmpNode=tmpNode[path];while(tmpNode&&!tmpNode.tagName){tmpNode=tmpNode[path];} +if(combinator.direct){path=null;}}else{result.push(node);if(firstOnly){return result;} +break;}}} +node=tmpNode=null;return result;},combinators:{' ':{axis:'parentNode'},'>':{axis:'parentNode',direct:true},'+':{axis:'previousSibling',direct:true}},_parsers:[{name:ATTRIBUTES,re:/^\[(-?[a-z]+[\w\-]*)+([~\|\^\$\*!=]=?)?['"]?([^\]]*?)['"]?\]/i,fn:function(match,token){var operator=match[2]||'',operators=Y.Selector.operators,test;if((match[1]==='id'&&operator==='=')||(match[1]==='className'&&Y.config.doc.documentElement.getElementsByClassName&&(operator==='~='||operator==='='))){token.prefilter=match[1];token[match[1]]=match[3];} +if(operator in operators){test=operators[operator];if(typeof test==='string'){match[3]=match[3].replace(Y.Selector._reRegExpTokens,'\\$1');test=Y.DOM._getRegExp(test.replace('{val}',match[3]));} +match[2]=test;} +if(!token.last||token.prefilter!==match[1]){return match.slice(1);}}},{name:TAG_NAME,re:/^((?:-?[_a-z]+[\w-]*)|\*)/i,fn:function(match,token){var tag=match[1].toUpperCase();token.tagName=tag;if(tag!=='*'&&(!token.last||token.prefilter)){return[TAG_NAME,'=',tag];} +if(!token.prefilter){token.prefilter='tagName';}}},{name:COMBINATOR,re:/^\s*([>+~]|\s)\s*/,fn:function(match,token){}},{name:PSEUDOS,re:/^:([\-\w]+)(?:\(['"]?(.+)['"]?\))*/i,fn:function(match,token){var test=Selector[PSEUDOS][match[1]];if(test){return[match[2],test];}else{return false;}}}],_getToken:function(token){return{tagName:null,id:null,className:null,attributes:{},combinator:null,tests:[]};},_tokenize:function(selector){selector=selector||'';selector=Selector._replaceShorthand(Y.Lang.trim(selector));var token=Selector._getToken(),query=selector,tokens=[],found=false,match,test,i,parser;outer:do{found=false;for(i=0;(parser=Selector._parsers[i++]);){if((match=parser.re.exec(selector))){if(parser.name!==COMBINATOR){token.selector=selector;} +selector=selector.replace(match[0],'');if(!selector.length){token.last=true;} +if(Selector._attrFilters[match[1]]){match[1]=Selector._attrFilters[match[1]];} +test=parser.fn(match,token);if(test===false){found=false;break outer;}else if(test){token.tests.push(test);} +if(!selector.length||parser.name===COMBINATOR){tokens.push(token);token=Selector._getToken(token);if(parser.name===COMBINATOR){token.combinator=Y.Selector.combinators[match[1]];}} +found=true;}}}while(found&&selector.length);if(!found||selector.length){tokens=[];} +return tokens;},_replaceShorthand:function(selector){var shorthand=Selector.shorthand,attrs=selector.match(Selector._re.attr),pseudos=selector.match(Selector._re.pseudos),re,i,len;if(pseudos){selector=selector.replace(Selector._re.pseudos,'!!REPLACED_PSEUDO!!');} +if(attrs){selector=selector.replace(Selector._re.attr,'!!REPLACED_ATTRIBUTE!!');} +for(re in shorthand){if(shorthand.hasOwnProperty(re)){selector=selector.replace(Y.DOM._getRegExp(re,'gi'),shorthand[re]);}} +if(attrs){for(i=0,len=attrs.length;i2)?Y.Array(arguments,2,true):null;return this._on(fn,context,a,true);},on:function(fn,context){var a=(arguments.length>2)?Y.Array(arguments,2,true):null;if(this.host){this.host._monitor('attach',this.type,{args:arguments});} +return this._on(fn,context,a,true);},after:function(fn,context){var a=(arguments.length>2)?Y.Array(arguments,2,true):null;return this._on(fn,context,a,AFTER);},detach:function(fn,context){if(fn&&fn.detach){return fn.detach();} +var i,s,found=0,subs=Y.merge(this.subscribers,this.afters);for(i in subs){if(subs.hasOwnProperty(i)){s=subs[i];if(s&&(!fn||fn===s.fn)){this._delete(s);found++;}}} +return found;},unsubscribe:function(){return this.detach.apply(this,arguments);},_notify:function(s,args,ef){this.log(this.type+'->'+'sub: '+s.id);var ret;ret=s.notify(args,this);if(false===ret||this.stopped>1){this.log(this.type+' cancelled by subscriber');return false;} +return true;},log:function(msg,cat){if(!this.silent){}},fire:function(){if(this.fireOnce&&this.fired){this.log('fireOnce event: '+this.type+' already fired');return true;}else{var args=Y.Array(arguments,0,true);this.fired=true;this.firedWith=args;if(this.emitFacade){return this.fireComplex(args);}else{return this.fireSimple(args);}}},fireSimple:function(args){this.stopped=0;this.prevented=0;if(this.hasSubs()){var subs=this.getSubs();this._procSubs(subs[0],args);this._procSubs(subs[1],args);} +this._broadcast(args);return this.stopped?false:true;},fireComplex:function(args){args[0]=args[0]||{};return this.fireSimple(args);},_procSubs:function(subs,args,ef){var s,i;for(i in subs){if(subs.hasOwnProperty(i)){s=subs[i];if(s&&s.fn){if(false===this._notify(s,args,ef)){this.stopped=2;} +if(this.stopped==2){return false;}}}} +return true;},_broadcast:function(args){if(!this.stopped&&this.broadcast){var a=Y.Array(args);a.unshift(this.type);if(this.host!==Y){Y.fire.apply(Y,a);} +if(this.broadcast==2){Y.Global.fire.apply(Y.Global,a);}}},unsubscribeAll:function(){return this.detachAll.apply(this,arguments);},detachAll:function(){return this.detach();},_delete:function(s){if(s){if(this.subscribers[s.id]){delete this.subscribers[s.id];this.subCount--;} +if(this.afters[s.id]){delete this.afters[s.id];this.afterCount--;}} +if(this.host){this.host._monitor('detach',this.type,{ce:this,sub:s});} +if(s){s.deleted=true;}}};Y.Subscriber=function(fn,context,args){this.fn=fn;this.context=context;this.id=Y.stamp(this);this.args=args;};Y.Subscriber.prototype={_notify:function(c,args,ce){if(this.deleted&&!this.postponed){if(this.postponed){delete this.fn;delete this.context;}else{delete this.postponed;return null;}} +var a=this.args,ret;switch(ce.signature){case 0:ret=this.fn.call(c,ce.type,args,c);break;case 1:ret=this.fn.call(c,args[0]||null,c);break;default:if(a||args){args=args||[];a=(a)?args.concat(a):args;ret=this.fn.apply(c,a);}else{ret=this.fn.call(c);}} +if(this.once){ce._delete(this);} +return ret;},notify:function(args,ce){var c=this.context,ret=true;if(!c){c=(ce.contextFn)?ce.contextFn():ce.context;} +if(Y.config.throwFail){ret=this._notify(c,args,ce);}else{try{ret=this._notify(c,args,ce);}catch(e){Y.error(this+' failed: '+e.message,e);}} +return ret;},contains:function(fn,context){if(context){return((this.fn==fn)&&this.context==context);}else{return(this.fn==fn);}}};var L=Y.Lang,PREFIX_DELIMITER=':',CATEGORY_DELIMITER='|',AFTER_PREFIX='~AFTER~',YArray=Y.Array,_wildType=Y.cached(function(type){return type.replace(/(.*)(:)(.*)/,"*$2$3");}),_getType=Y.cached(function(type,pre){if(!pre||!L.isString(type)||type.indexOf(PREFIX_DELIMITER)>-1){return type;} +return pre+PREFIX_DELIMITER+type;}),_parseType=Y.cached(function(type,pre){var t=type,detachcategory,after,i;if(!L.isString(t)){return t;} +i=t.indexOf(AFTER_PREFIX);if(i>-1){after=true;t=t.substr(AFTER_PREFIX.length);} +i=t.indexOf(CATEGORY_DELIMITER);if(i>-1){detachcategory=t.substr(0,(i));t=t.substr(i+1);if(t=='*'){t=null;}} +return[detachcategory,(pre)?_getType(t,pre):t,after,t];}),ET=function(opts){var o=(L.isObject(opts))?opts:{};this._yuievt=this._yuievt||{id:Y.guid(),events:{},targets:{},config:o,chain:('chain'in o)?o.chain:Y.config.chain,bubbling:false,defaults:{context:o.context||this,host:this,emitFacade:o.emitFacade,fireOnce:o.fireOnce,queuable:o.queuable,monitored:o.monitored,broadcast:o.broadcast,defaultTargetOnly:o.defaultTargetOnly,bubbles:('bubbles'in o)?o.bubbles:true}};};ET.prototype={once:function(){var handle=this.on.apply(this,arguments);handle.batch(function(hand){if(hand.sub){hand.sub.once=true;}});return handle;},parseType:function(type,pre){return _parseType(type,pre||this._yuievt.config.prefix);},on:function(type,fn,context){var parts=_parseType(type,this._yuievt.config.prefix),f,c,args,ret,ce,detachcategory,handle,store=Y.Env.evt.handles,after,adapt,shorttype,Node=Y.Node,n,domevent,isArr;this._monitor('attach',parts[1],{args:arguments,category:parts[0],after:parts[2]});if(L.isObject(type)){if(L.isFunction(type)){return Y.Do.before.apply(Y.Do,arguments);} +f=fn;c=context;args=YArray(arguments,0,true);ret=[];if(L.isArray(type)){isArr=true;} +after=type._after;delete type._after;Y.each(type,function(v,k){if(L.isObject(v)){f=v.fn||((L.isFunction(v))?v:f);c=v.context||c;} +var nv=(after)?AFTER_PREFIX:'';args[0]=nv+((isArr)?v:k);args[1]=f;args[2]=c;ret.push(this.on.apply(this,args));},this);return(this._yuievt.chain)?this:new Y.EventHandle(ret);} +detachcategory=parts[0];after=parts[2];shorttype=parts[3];if(Node&&Y.instanceOf(this,Node)&&(shorttype in Node.DOM_EVENTS)){args=YArray(arguments,0,true);args.splice(2,0,Node.getDOMNode(this));return Y.on.apply(Y,args);} +type=parts[1];if(Y.instanceOf(this,YUI)){adapt=Y.Env.evt.plugins[type];args=YArray(arguments,0,true);args[0]=shorttype;if(Node){n=args[2];if(Y.instanceOf(n,Y.NodeList)){n=Y.NodeList.getDOMNodes(n);}else if(Y.instanceOf(n,Node)){n=Node.getDOMNode(n);} +domevent=(shorttype in Node.DOM_EVENTS);if(domevent){args[2]=n;}} +if(adapt){handle=adapt.on.apply(Y,args);}else if((!type)||domevent){handle=Y.Event._attach(args);}} +if(!handle){ce=this._yuievt.events[type]||this.publish(type);handle=ce._on(fn,context,(arguments.length>3)?YArray(arguments,3,true):null,(after)?'after':true);} +if(detachcategory){store[detachcategory]=store[detachcategory]||{};store[detachcategory][type]=store[detachcategory][type]||[];store[detachcategory][type].push(handle);} +return(this._yuievt.chain)?this:handle;},subscribe:function(){return this.on.apply(this,arguments);},detach:function(type,fn,context){var evts=this._yuievt.events,i,Node=Y.Node,isNode=Node&&(Y.instanceOf(this,Node));if(!type&&(this!==Y)){for(i in evts){if(evts.hasOwnProperty(i)){evts[i].detach(fn,context);}} +if(isNode){Y.Event.purgeElement(Node.getDOMNode(this));} +return this;} +var parts=_parseType(type,this._yuievt.config.prefix),detachcategory=L.isArray(parts)?parts[0]:null,shorttype=(parts)?parts[3]:null,adapt,store=Y.Env.evt.handles,detachhost,cat,args,ce,keyDetacher=function(lcat,ltype,host){var handles=lcat[ltype],ce,i;if(handles){for(i=handles.length-1;i>=0;--i){ce=handles[i].evt;if(ce.host===host||ce.el===host){handles[i].detach();}}}};if(detachcategory){cat=store[detachcategory];type=parts[1];detachhost=(isNode)?Y.Node.getDOMNode(this):this;if(cat){if(type){keyDetacher(cat,type,detachhost);}else{for(i in cat){if(cat.hasOwnProperty(i)){keyDetacher(cat,i,detachhost);}}} +return this;}}else if(L.isObject(type)&&type.detach){type.detach();return this;}else if(isNode&&((!shorttype)||(shorttype in Node.DOM_EVENTS))){args=YArray(arguments,0,true);args[2]=Node.getDOMNode(this);Y.detach.apply(Y,args);return this;} +adapt=Y.Env.evt.plugins[shorttype];if(Y.instanceOf(this,YUI)){args=YArray(arguments,0,true);if(adapt&&adapt.detach){adapt.detach.apply(Y,args);return this;}else if(!type||(!adapt&&Node&&(type in Node.DOM_EVENTS))){args[0]=type;Y.Event.detach.apply(Y.Event,args);return this;}} +ce=evts[parts[1]];if(ce){ce.detach(fn,context);} +return this;},unsubscribe:function(){return this.detach.apply(this,arguments);},detachAll:function(type){return this.detach(type);},unsubscribeAll:function(){return this.detachAll.apply(this,arguments);},publish:function(type,opts){var events,ce,ret,defaults,edata=this._yuievt,pre=edata.config.prefix;type=(pre)?_getType(type,pre):type;this._monitor('publish',type,{args:arguments});if(L.isObject(type)){ret={};Y.each(type,function(v,k){ret[k]=this.publish(k,v||opts);},this);return ret;} +events=edata.events;ce=events[type];if(ce){if(opts){ce.applyConfig(opts,true);}}else{defaults=edata.defaults;ce=new Y.CustomEvent(type,(opts)?Y.merge(defaults,opts):defaults);events[type]=ce;} +return events[type];},_monitor:function(what,type,o){var monitorevt,ce=this.getEvent(type);if((this._yuievt.config.monitored&&(!ce||ce.monitored))||(ce&&ce.monitored)){monitorevt=type+'_'+what;o.monitored=what;this.fire.call(this,monitorevt,o);}},fire:function(type){var typeIncluded=L.isString(type),t=(typeIncluded)?type:(type&&type.type),ce,ret,pre=this._yuievt.config.prefix,ce2,args=(typeIncluded)?YArray(arguments,1,true):arguments;t=(pre)?_getType(t,pre):t;this._monitor('fire',t,{args:args});ce=this.getEvent(t,true);ce2=this.getSibling(t,ce);if(ce2&&!ce){ce=this.publish(t);} +if(!ce){if(this._yuievt.hasTargets){return this.bubble({type:t},args,this);} +ret=true;}else{ce.sibling=ce2;ret=ce.fire.apply(ce,args);} +return(this._yuievt.chain)?this:ret;},getSibling:function(type,ce){var ce2;if(type.indexOf(PREFIX_DELIMITER)>-1){type=_wildType(type);ce2=this.getEvent(type,true);if(ce2){ce2.applyConfig(ce);ce2.bubbles=false;ce2.broadcast=0;}} +return ce2;},getEvent:function(type,prefixed){var pre,e;if(!prefixed){pre=this._yuievt.config.prefix;type=(pre)?_getType(type,pre):type;} +e=this._yuievt.events;return e[type]||null;},after:function(type,fn){var a=YArray(arguments,0,true);switch(L.type(type)){case'function':return Y.Do.after.apply(Y.Do,arguments);case'array':case'object':a[0]._after=true;break;default:a[0]=AFTER_PREFIX+type;} +return this.on.apply(this,a);},before:function(){return this.on.apply(this,arguments);}};Y.EventTarget=ET;Y.mix(Y,ET.prototype,false,false,{bubbles:false});ET.call(Y);YUI.Env.globalEvents=YUI.Env.globalEvents||new ET();Y.Global=YUI.Env.globalEvents;},'3.3.0',{requires:['oop']});var GLOBAL_ENV=YUI.Env;if(!GLOBAL_ENV._ready){GLOBAL_ENV._ready=function(){GLOBAL_ENV.DOMReady=true;GLOBAL_ENV.remove(YUI.config.doc,'DOMContentLoaded',GLOBAL_ENV._ready);};GLOBAL_ENV.add(YUI.config.doc,'DOMContentLoaded',GLOBAL_ENV._ready);} +YUI.add('event-base',function(Y){Y.publish('domready',{fireOnce:true,async:true});if(GLOBAL_ENV.DOMReady){Y.fire('domready');}else{Y.Do.before(function(){Y.fire('domready');},YUI.Env,'_ready');} +var ua=Y.UA,EMPTY={},webkitKeymap={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9,63272:46,63273:36,63275:35},resolve=function(n){if(!n){return n;} +try{if(n&&3==n.nodeType){n=n.parentNode;}}catch(e){return null;} +return Y.one(n);},DOMEventFacade=function(ev,currentTarget,wrapper){this._event=ev;this._currentTarget=currentTarget;this._wrapper=wrapper||EMPTY;this.init();};Y.extend(DOMEventFacade,Object,{init:function(){var e=this._event,overrides=this._wrapper.overrides,x=e.pageX,y=e.pageY,c,currentTarget=this._currentTarget;this.altKey=e.altKey;this.ctrlKey=e.ctrlKey;this.metaKey=e.metaKey;this.shiftKey=e.shiftKey;this.type=(overrides&&overrides.type)||e.type;this.clientX=e.clientX;this.clientY=e.clientY;this.pageX=x;this.pageY=y;c=e.keyCode||e.charCode;if(ua.webkit&&(c in webkitKeymap)){c=webkitKeymap[c];} +this.keyCode=c;this.charCode=c;this.which=e.which||e.charCode||c;this.button=this.which;this.target=resolve(e.target);this.currentTarget=resolve(currentTarget);this.relatedTarget=resolve(e.relatedTarget);if(e.type=="mousewheel"||e.type=="DOMMouseScroll"){this.wheelDelta=(e.detail)?(e.detail*-1):Math.round(e.wheelDelta / 80)||((e.wheelDelta<0)?-1:1);} +if(this._touch){this._touch(e,currentTarget,this._wrapper);}},stopPropagation:function(){this._event.stopPropagation();this._wrapper.stopped=1;this.stopped=1;},stopImmediatePropagation:function(){var e=this._event;if(e.stopImmediatePropagation){e.stopImmediatePropagation();}else{this.stopPropagation();} +this._wrapper.stopped=2;this.stopped=2;},preventDefault:function(returnValue){var e=this._event;e.preventDefault();e.returnValue=returnValue||false;this._wrapper.prevented=1;this.prevented=1;},halt:function(immediate){if(immediate){this.stopImmediatePropagation();}else{this.stopPropagation();} +this.preventDefault();}});DOMEventFacade.resolve=resolve;Y.DOM2EventFacade=DOMEventFacade;Y.DOMEventFacade=DOMEventFacade;(function(){Y.Env.evt.dom_wrappers={};Y.Env.evt.dom_map={};var _eventenv=Y.Env.evt,config=Y.config,win=config.win,add=YUI.Env.add,remove=YUI.Env.remove,onLoad=function(){YUI.Env.windowLoaded=true;Y.Event._load();remove(win,"load",onLoad);},onUnload=function(){Y.Event._unload();},EVENT_READY='domready',COMPAT_ARG='~yui|2|compat~',shouldIterate=function(o){try{return(o&&typeof o!=="string"&&Y.Lang.isNumber(o.length)&&!o.tagName&&!o.alert);}catch(ex){return false;}},Event=function(){var _loadComplete=false,_retryCount=0,_avail=[],_wrappers=_eventenv.dom_wrappers,_windowLoadKey=null,_el_events=_eventenv.dom_map;return{POLL_RETRYS:1000,POLL_INTERVAL:40,lastError:null,_interval:null,_dri:null,DOMReady:false,startInterval:function(){if(!Event._interval){Event._interval=setInterval(Event._poll,Event.POLL_INTERVAL);}},onAvailable:function(id,fn,p_obj,p_override,checkContent,compat){var a=Y.Array(id),i,availHandle;for(i=0;i4)?args.slice(4):null);if(fireNow){cewrapper.fire();} +return ret;},detach:function(type,fn,el,obj){var args=Y.Array(arguments,0,true),compat,l,ok,i,id,ce;if(args[args.length-1]===COMPAT_ARG){compat=true;} +if(type&&type.detach){return type.detach();} +if(typeof el=="string"){if(compat){el=Y.DOM.byId(el);}else{el=Y.Selector.query(el);l=el.length;if(l<1){el=null;}else if(l==1){el=el[0];}}} +if(!el){return false;} +if(el.detach){args.splice(2,1);return el.detach.apply(el,args);}else if(shouldIterate(el)){ok=true;for(i=0,l=el.length;i0);} +notAvail=[];executeItem=function(el,item){var context,ov=item.override;if(item.compat){if(item.override){if(ov===true){context=item.obj;}else{context=ov;}}else{context=el;} +item.fn.call(context,item.obj);}else{context=item.obj||Y.one(el);item.fn.apply(context,(Y.Lang.isArray(ov))?ov:[]);}};for(i=0,len=_avail.length;i4?Y.Array(arguments,4,true):null;return Y.Event.onAvailable.call(Y.Event,id,fn,o,a);}};Y.Env.evt.plugins.contentready={on:function(type,fn,id,o){var a=arguments.length>4?Y.Array(arguments,4,true):null;return Y.Event.onContentReady.call(Y.Event,id,fn,o,a);}};},'3.3.0',{requires:['event-custom-base']});(function(){var stateChangeListener,GLOBAL_ENV=YUI.Env,config=YUI.config,doc=config.doc,docElement=doc&&doc.documentElement,EVENT_NAME='onreadystatechange',pollInterval=config.pollInterval||40;if(docElement.doScroll&&!GLOBAL_ENV._ieready){GLOBAL_ENV._ieready=function(){GLOBAL_ENV._ready();};if(self!==self.top){stateChangeListener=function(){if(doc.readyState=='complete'){GLOBAL_ENV.remove(doc,EVENT_NAME,stateChangeListener);GLOBAL_ENV.ieready();}};GLOBAL_ENV.add(doc,EVENT_NAME,stateChangeListener);}else{GLOBAL_ENV._dri=setInterval(function(){try{docElement.doScroll('left');clearInterval(GLOBAL_ENV._dri);GLOBAL_ENV._dri=null;GLOBAL_ENV._ieready();}catch(domNotReady){}},pollInterval);}}})();YUI.add('event-base-ie',function(Y){var IEEventFacade=function(){Y.DOM2EventFacade.apply(this,arguments);};Y.extend(IEEventFacade,Y.DOM2EventFacade,{init:function(){IEEventFacade.superclass.init.apply(this,arguments);var e=this._event,resolve=Y.DOM2EventFacade.resolve,x,y,d,b,de,t;this.target=resolve(e.srcElement);if(('clientX'in e)&&(!x)&&(0!==x)){x=e.clientX;y=e.clientY;d=Y.config.doc;b=d.body;de=d.documentElement;x+=(de.scrollLeft||(b&&b.scrollLeft)||0);y+=(de.scrollTop||(b&&b.scrollTop)||0);this.pageX=x;this.pageY=y;} +if(e.type=="mouseout"){t=e.toElement;}else if(e.type=="mouseover"){t=e.fromElement;} +this.relatedTarget=resolve(t);if(e.button){switch(e.button){case 2:this.which=3;break;case 4:this.which=2;break;default:this.which=e.button;} +this.button=this.which;}},stopPropagation:function(){var e=this._event;e.cancelBubble=true;this._wrapper.stopped=1;this.stopped=1;},stopImmediatePropagation:function(){this.stopPropagation();this._wrapper.stopped=2;this.stopped=2;},preventDefault:function(returnValue){this._event.returnValue=returnValue||false;this._wrapper.prevented=1;this.prevented=1;}});var imp=Y.config.doc&&Y.config.doc.implementation;if(imp&&(!imp.hasFeature('Events','2.0'))){Y.DOMEventFacade=IEEventFacade;}},'3.3.0');YUI.add('pluginhost-base',function(Y){var L=Y.Lang;function PluginHost(){this._plugins={};} +PluginHost.prototype={plug:function(Plugin,config){var i,ln,ns;if(L.isArray(Plugin)){for(i=0,ln=Plugin.length;i=0;i--){constructor=classes[i];classUnplug=constructor._UNPLUG;if(classUnplug){Y.mix(unplug,classUnplug,true);} +classPlug=constructor._PLUG;if(classPlug){Y.mix(plug,classPlug,true);}} +for(pluginClassName in plug){if(plug.hasOwnProperty(pluginClassName)){if(!unplug[pluginClassName]){this.plug(plug[pluginClassName]);}}} +if(config&&config.plugins){this.plug(config.plugins);}};PluginHost.plug=function(hostClass,plugin,config){var p,i,l,name;if(hostClass!==Y.Base){hostClass._PLUG=hostClass._PLUG||{};if(!L.isArray(plugin)){if(config){plugin={fn:plugin,cfg:config};} +plugin=[plugin];} +for(i=0,l=plugin.length;i-1){strPath=name;name=name.split(DOT);Y.Object.setValue(node,name,val);}else if(typeof node[name]!='undefined'){node[name]=val;} +return val;};Y_Node.DEFAULT_GETTER=function(name){var node=this._stateProxy,val;if(name.indexOf&&name.indexOf(DOT)>-1){val=Y.Object.getValue(node,name.split(DOT));}else if(typeof node[name]!='undefined'){val=node[name];} +return val;};Y.mix(Y_Node,Y.EventTarget,false,null,1);Y.mix(Y_Node.prototype,{toString:function(){var str=this[UID]+': not bound to a node',node=this._node,attrs,id,className;if(node){attrs=node.attributes;id=(attrs&&attrs.id)?node.getAttribute('id'):null;className=(attrs&&attrs.className)?node.getAttribute('className'):null;str=node[NODE_NAME];if(id){str+='#'+id;} +if(className){str+='.'+className.replace(' ','.');} +str+=' '+this[UID];} +return str;},get:function(attr){var val;if(this._getAttr){val=this._getAttr(attr);}else{val=this._get(attr);} +if(val){val=Y_Node.scrubVal(val,this);}else if(val===null){val=null;} +return val;},_get:function(attr){var attrConfig=Y_Node.ATTRS[attr],val;if(attrConfig&&attrConfig.getter){val=attrConfig.getter.call(this);}else if(Y_Node.re_aria.test(attr)){val=this._node.getAttribute(attr,2);}else{val=Y_Node.DEFAULT_GETTER.apply(this,arguments);} +return val;},set:function(attr,val){var attrConfig=Y_Node.ATTRS[attr];if(this._setAttr){this._setAttr.apply(this,arguments);}else{if(attrConfig&&attrConfig.setter){attrConfig.setter.call(this,val,attr);}else if(Y_Node.re_aria.test(attr)){this._node.setAttribute(attr,val);}else{Y_Node.DEFAULT_SETTER.apply(this,arguments);}} +return this;},setAttrs:function(attrMap){if(this._setAttrs){this._setAttrs(attrMap);}else{Y.Object.each(attrMap,function(v,n){this.set(n,v);},this);} +return this;},getAttrs:function(attrs){var ret={};if(this._getAttrs){this._getAttrs(attrs);}else{Y.Array.each(attrs,function(v,n){ret[v]=this.get(v);},this);} +return ret;},create:Y_Node.create,compareTo:function(refNode){var node=this._node;if(Y.instanceOf(refNode,Y_Node)){refNode=refNode._node;} +return node===refNode;},inDoc:function(doc){var node=this._node;doc=(doc)?doc._node||doc:node[OWNER_DOCUMENT];if(doc.documentElement){return Y_DOM.contains(doc.documentElement,node);}},getById:function(id){var node=this._node,ret=Y_DOM.byId(id,node[OWNER_DOCUMENT]);if(ret&&Y_DOM.contains(node,ret)){ret=Y.one(ret);}else{ret=null;} +return ret;},ancestor:function(fn,testSelf){return Y.one(Y_DOM.ancestor(this._node,_wrapFn(fn),testSelf));},ancestors:function(fn,testSelf){return Y.all(Y_DOM.ancestors(this._node,_wrapFn(fn),testSelf));},previous:function(fn,all){return Y.one(Y_DOM.elementByAxis(this._node,'previousSibling',_wrapFn(fn),all));},next:function(fn,all){return Y.one(Y_DOM.elementByAxis(this._node,'nextSibling',_wrapFn(fn),all));},siblings:function(fn){return Y.all(Y_DOM.siblings(this._node,_wrapFn(fn)));},one:function(selector){return Y.one(Y.Selector.query(selector,this._node,true));},all:function(selector){var nodelist=Y.all(Y.Selector.query(selector,this._node));nodelist._query=selector;nodelist._queryRoot=this._node;return nodelist;},test:function(selector){return Y.Selector.test(this._node,selector);},remove:function(destroy){var node=this._node,parentNode=node.parentNode;if(parentNode){parentNode.removeChild(node);} +if(destroy){this.destroy();} +return this;},replace:function(newNode){var node=this._node;if(typeof newNode=='string'){newNode=Y_Node.create(newNode);} +node.parentNode.replaceChild(Y_Node.getDOMNode(newNode),node);return this;},replaceChild:function(node,refNode){if(typeof node=='string'){node=Y_DOM.create(node);} +return Y.one(this._node.replaceChild(Y_Node.getDOMNode(node),Y_Node.getDOMNode(refNode)));},appendChild:function(node){return Y_Node.scrubVal(this._insert(node));},insertBefore:function(newNode,refNode){return Y.Node.scrubVal(this._insert(newNode,refNode));},purge:function(recurse,type){Y.Event.purgeElement(this._node,recurse,type);return this;},destroy:function(recursive){this.purge();if(this.unplug){this.unplug();} +this.clearData();if(recursive){this.all('*').destroy();} +this._node=null;this._stateProxy=null;delete Y_Node._instances[this[UID]];},invoke:function(method,a,b,c,d,e){var node=this._node,ret;if(a&&Y.instanceOf(a,Y_Node)){a=a._node;} +if(b&&Y.instanceOf(b,Y_Node)){b=b._node;} +ret=node[method](a,b,c,d,e);return Y_Node.scrubVal(ret,this);},insert:function(content,where){this._insert(content,where);return this;},_insert:function(content,where){var node=this._node,ret=null;if(typeof where=='number'){where=this._node.childNodes[where];}else if(where&&where._node){where=where._node;} +if(content&&typeof content!='string'){content=content._node||content._nodes||content;} +ret=Y_DOM.addHTML(node,content,where);return ret;},prepend:function(content){return this.insert(content,0);},append:function(content){return this.insert(content,null);},appendTo:function(node){Y.one(node).append(this);},setContent:function(content){this._insert(content,'replace');return this;},getContent:function(content){return this.get('innerHTML');},swap:Y.config.doc.documentElement.swapNode?function(otherNode){this._node.swapNode(Y_Node.getDOMNode(otherNode));}:function(otherNode){otherNode=Y_Node.getDOMNode(otherNode);var node=this._node,parent=otherNode.parentNode,nextSibling=otherNode.nextSibling;if(nextSibling===node){parent.insertBefore(node,otherNode);}else if(otherNode===node.nextSibling){parent.insertBefore(otherNode,node);}else{node.parentNode.replaceChild(otherNode,node);Y_DOM.addHTML(parent,node,nextSibling);} +return this;},getData:function(name){var ret;this._data=this._data||{};if(arguments.length){ret=this._data[name];}else{ret=this._data;} +return ret;},setData:function(name,val){this._data=this._data||{};if(arguments.length>1){this._data[name]=val;}else{this._data=name;} +return this;},clearData:function(name){if('_data'in this){if(name){delete this._data[name];}else{delete this._data;}} +return this;},hasMethod:function(method){var node=this._node;return!!(node&&method in node&&typeof node[method]!='unknown'&&(typeof node[method]=='function'||String(node[method]).indexOf('function')===1));},SHOW_TRANSITION:null,HIDE_TRANSITION:null,show:function(callback){callback=arguments[arguments.length-1];this.toggleView(true,callback);return this;},_show:function(){this.setStyle('display','');},_isHidden:function(){return Y.DOM.getStyle(this._node,'display')==='none';},toggleView:function(on,callback){this._toggleView.apply(this,arguments);},_toggleView:function(on,callback){callback=arguments[arguments.length-1];if(typeof on!='boolean'){on=(this._isHidden())?1:0;} +if(on){this._show();}else{this._hide();} +if(typeof callback=='function'){callback.call(this);} +return this;},hide:function(callback){callback=arguments[arguments.length-1];this.toggleView(false,callback);return this;},_hide:function(){this.setStyle('display','none');},isFragment:function(){return(this.get('nodeType')===11);},empty:function(destroy){this.get('childNodes').remove(destroy);return this;}},true);Y.Node=Y_Node;Y.one=Y.Node.one;var NodeList=function(nodes){var tmp=[];if(typeof nodes==='string'){this._query=nodes;nodes=Y.Selector.query(nodes);}else if(nodes.nodeType||Y_DOM.isWindow(nodes)){nodes=[nodes];}else if(Y.instanceOf(nodes,Y.Node)){nodes=[nodes._node];}else if(Y.instanceOf(nodes[0],Y.Node)){Y.Array.each(nodes,function(node){if(node._node){tmp.push(node._node);}});nodes=tmp;}else{nodes=Y.Array(nodes,0,true);} +this._nodes=nodes;};NodeList.NAME='NodeList';NodeList.getDOMNodes=function(nodelist){return(nodelist&&nodelist._nodes)?nodelist._nodes:nodelist;};NodeList.each=function(instance,fn,context){var nodes=instance._nodes;if(nodes&&nodes.length){Y.Array.each(nodes,fn,context||instance);}else{}};NodeList.addMethod=function(name,fn,context){if(name&&fn){NodeList.prototype[name]=function(){var ret=[],args=arguments;Y.Array.each(this._nodes,function(node){var UID=(node.uniqueID&&node.nodeType!==9)?'uniqueID':'_yuid',instance=Y.Node._instances[node[UID]],ctx,result;if(!instance){instance=NodeList._getTempNode(node);} +ctx=context||instance;result=fn.apply(ctx,args);if(result!==undefined&&result!==instance){ret[ret.length]=result;}});return ret.length?ret:this;};}else{}};NodeList.importMethod=function(host,name,altName){if(typeof name==='string'){altName=altName||name;NodeList.addMethod(name,host[name]);}else{Y.Array.each(name,function(n){NodeList.importMethod(host,n);});}};NodeList._getTempNode=function(node){var tmp=NodeList._tempNode;if(!tmp){tmp=Y.Node.create('
    ');NodeList._tempNode=tmp;} +tmp._node=node;tmp._stateProxy=node;return tmp;};Y.mix(NodeList.prototype,{item:function(index){return Y.one((this._nodes||[])[index]);},each:function(fn,context){var instance=this;Y.Array.each(this._nodes,function(node,index){node=Y.one(node);return fn.call(context||node,node,index,instance);});return instance;},batch:function(fn,context){var nodelist=this;Y.Array.each(this._nodes,function(node,index){var instance=Y.Node._instances[node[UID]];if(!instance){instance=NodeList._getTempNode(node);} +return fn.call(context||instance,instance,index,nodelist);});return nodelist;},some:function(fn,context){var instance=this;return Y.Array.some(this._nodes,function(node,index){node=Y.one(node);context=context||node;return fn.call(context,node,index,instance);});},toFrag:function(){return Y.one(Y.DOM._nl2frag(this._nodes));},indexOf:function(node){return Y.Array.indexOf(this._nodes,Y.Node.getDOMNode(node));},filter:function(selector){return Y.all(Y.Selector.filter(this._nodes,selector));},modulus:function(n,r){r=r||0;var nodes=[];NodeList.each(this,function(node,i){if(i%n===r){nodes.push(node);}});return Y.all(nodes);},odd:function(){return this.modulus(2,1);},even:function(){return this.modulus(2);},destructor:function(){},refresh:function(){var doc,nodes=this._nodes,query=this._query,root=this._queryRoot;if(query){if(!root){if(nodes&&nodes[0]&&nodes[0].ownerDocument){root=nodes[0].ownerDocument;}} +this._nodes=Y.Selector.query(query,root);} +return this;},_prepEvtArgs:function(type,fn,context){var args=Y.Array(arguments,0,true);if(args.length<2){args[2]=this._nodes;}else{args.splice(2,0,this._nodes);} +args[3]=context||this;return args;},on:function(type,fn,context){return Y.on.apply(Y,this._prepEvtArgs.apply(this,arguments));},once:function(type,fn,context){return Y.once.apply(Y,this._prepEvtArgs.apply(this,arguments));},after:function(type,fn,context){return Y.after.apply(Y,this._prepEvtArgs.apply(this,arguments));},size:function(){return this._nodes.length;},isEmpty:function(){return this._nodes.length<1;},toString:function(){var str='',errorMsg=this[UID]+': not bound to any nodes',nodes=this._nodes,node;if(nodes&&nodes[0]){node=nodes[0];str+=node[NODE_NAME];if(node.id){str+='#'+node.id;} +if(node.className){str+='.'+node.className.replace(' ','.');} +if(nodes.length>1){str+='...['+nodes.length+' items]';}} +return str||errorMsg;}},true);NodeList.importMethod(Y.Node.prototype,['append','destroy','detach','detachAll','empty','insert','prepend','remove','set','setContent','show','hide','toggleView']);NodeList.prototype.get=function(attr){var ret=[],nodes=this._nodes,isNodeList=false,getTemp=NodeList._getTempNode,instance,val;if(nodes[0]){instance=Y.Node._instances[nodes[0]._yuid]||getTemp(nodes[0]);val=instance._get(attr);if(val&&val.nodeType){isNodeList=true;}} +Y.Array.each(nodes,function(node){instance=Y.Node._instances[node._yuid];if(!instance){instance=getTemp(node);} +val=instance._get(attr);if(!isNodeList){val=Y.Node.scrubVal(val,instance);} +ret.push(val);});return(isNodeList)?Y.all(ret):ret;};Y.NodeList=NodeList;Y.all=function(nodes){return new NodeList(nodes);};Y.Node.all=Y.all;Y.Array.each(['removeChild','hasChildNodes','cloneNode','hasAttribute','removeAttribute','scrollIntoView','getElementsByTagName','focus','blur','submit','reset','select','createCaption'],function(method){Y.Node.prototype[method]=function(arg1,arg2,arg3){var ret=this.invoke(method,arg1,arg2,arg3);return ret;};});Y.Node.importMethod(Y.DOM,['contains','setAttribute','getAttribute','wrap','unwrap','generateID']);Y.NodeList.importMethod(Y.Node.prototype,['getAttribute','setAttribute','removeAttribute','unwrap','wrap','generateID']);(function(Y){var methods=['hasClass','addClass','removeClass','replaceClass','toggleClass'];Y.Node.importMethod(Y.DOM,methods);Y.NodeList.importMethod(Y.Node.prototype,methods);})(Y);if(!Y.config.doc.documentElement.hasAttribute){Y.Node.prototype.hasAttribute=function(attr){if(attr==='value'){if(this.get('value')!==""){return true;}} +return!!(this._node.attributes[attr]&&this._node.attributes[attr].specified);};} +Y.Node.prototype.focus=function(){try{this._node.focus();}catch(e){}};Y.Node.ATTRS.type={setter:function(val){if(val==='hidden'){try{this._node.type='hidden';}catch(e){this.setStyle('display','none');this._inputType='hidden';}}else{try{this._node.type=val;}catch(e){}} +return val;},getter:function(){return this._inputType||this._node.type;},_bypassProxy:true};if(Y.config.doc.createElement('form').elements.nodeType){Y.Node.ATTRS.elements={getter:function(){return this.all('input, textarea, button, select');}};} +Y.mix(Y.Node.ATTRS,{offsetHeight:{setter:function(h){Y.DOM.setHeight(this._node,h);return h;},getter:function(){return this._node.offsetHeight;}},offsetWidth:{setter:function(w){Y.DOM.setWidth(this._node,w);return w;},getter:function(){return this._node.offsetWidth;}}});Y.mix(Y.Node.prototype,{sizeTo:function(w,h){var node;if(arguments.length<2){node=Y.one(w);w=node.get('offsetWidth');h=node.get('offsetHeight');} +this.setAttrs({offsetWidth:w,offsetHeight:h});}});var Y_NodeList=Y.NodeList,ArrayProto=Array.prototype,ArrayMethods=['concat','pop','push','shift','slice','splice','unshift'];Y.Array.each(ArrayMethods,function(name){Y_NodeList.prototype[name]=function(){var args=[],i=0,arg;while((arg=arguments[i++])){args.push(arg._node||arg._nodes||arg);} +return Y.Node.scrubVal(ArrayProto[name].apply(this._nodes,args));};});},'3.3.0',{requires:['dom-base','selector-css2','event-base']});YUI.add('node-style',function(Y){(function(Y){var methods=['getStyle','getComputedStyle','setStyle','setStyles'];Y.Node.importMethod(Y.DOM,methods);Y.NodeList.importMethod(Y.Node.prototype,methods);})(Y);},'3.3.0',{requires:['dom-style','node-base']});YUI.add('node-screen',function(Y){Y.each(['winWidth','winHeight','docWidth','docHeight','docScrollX','docScrollY'],function(name){Y.Node.ATTRS[name]={getter:function(){var args=Array.prototype.slice.call(arguments);args.unshift(Y.Node.getDOMNode(this));return Y.DOM[name].apply(this,args);}};});Y.Node.ATTRS.scrollLeft={getter:function(){var node=Y.Node.getDOMNode(this);return('scrollLeft'in node)?node.scrollLeft:Y.DOM.docScrollX(node);},setter:function(val){var node=Y.Node.getDOMNode(this);if(node){if('scrollLeft'in node){node.scrollLeft=val;}else if(node.document||node.nodeType===9){Y.DOM._getWin(node).scrollTo(val,Y.DOM.docScrollY(node));}}else{}}};Y.Node.ATTRS.scrollTop={getter:function(){var node=Y.Node.getDOMNode(this);return('scrollTop'in node)?node.scrollTop:Y.DOM.docScrollY(node);},setter:function(val){var node=Y.Node.getDOMNode(this);if(node){if('scrollTop'in node){node.scrollTop=val;}else if(node.document||node.nodeType===9){Y.DOM._getWin(node).scrollTo(Y.DOM.docScrollX(node),val);}}else{}}};Y.Node.importMethod(Y.DOM,['getXY','setXY','getX','setX','getY','setY','swapXY']);Y.Node.ATTRS.region={getter:function(){var node=Y.Node.getDOMNode(this),region;if(node&&!node.tagName){if(node.nodeType===9){node=node.documentElement;}} +if(node.alert){region=Y.DOM.viewportRegion(node);}else{region=Y.DOM.region(node);} +return region;}};Y.Node.ATTRS.viewportRegion={getter:function(){return Y.DOM.viewportRegion(Y.Node.getDOMNode(this));}};Y.Node.importMethod(Y.DOM,'inViewportRegion');Y.Node.prototype.intersect=function(node2,altRegion){var node1=Y.Node.getDOMNode(this);if(Y.instanceOf(node2,Y.Node)){node2=Y.Node.getDOMNode(node2);} +return Y.DOM.intersect(node1,node2,altRegion);};Y.Node.prototype.inRegion=function(node2,all,altRegion){var node1=Y.Node.getDOMNode(this);if(Y.instanceOf(node2,Y.Node)){node2=Y.Node.getDOMNode(node2);} +return Y.DOM.inRegion(node1,node2,all,altRegion);};},'3.3.0',{requires:['dom-screen']});YUI.add('node-pluginhost',function(Y){Y.Node.plug=function(){var args=Y.Array(arguments);args.unshift(Y.Node);Y.Plugin.Host.plug.apply(Y.Base,args);return Y.Node;};Y.Node.unplug=function(){var args=Y.Array(arguments);args.unshift(Y.Node);Y.Plugin.Host.unplug.apply(Y.Base,args);return Y.Node;};Y.mix(Y.Node,Y.Plugin.Host,false,null,1);Y.NodeList.prototype.plug=function(){var args=arguments;Y.NodeList.each(this,function(node){Y.Node.prototype.plug.apply(Y.one(node),args);});};Y.NodeList.prototype.unplug=function(){var args=arguments;Y.NodeList.each(this,function(node){Y.Node.prototype.unplug.apply(Y.one(node),args);});};},'3.3.0',{requires:['node-base','pluginhost']});YUI.add('node-event-delegate',function(Y){Y.Node.prototype.delegate=function(type){var args=Y.Array(arguments,0,true),index=(Y.Lang.isObject(type)&&!Y.Lang.isArray(type))?1:2;args.splice(index,0,this._node);return Y.delegate.apply(Y,args);};},'3.3.0',{requires:['node-base','event-delegate']});YUI.add('node',function(Y){},'3.3.0',{skinnable:false,requires:['dom','event-base','event-delegate','pluginhost'],use:['node-base','node-style','node-screen','node-pluginhost','node-event-delegate']});YUI.add('event-delegate',function(Y){var toArray=Y.Array,YLang=Y.Lang,isString=YLang.isString,isObject=YLang.isObject,isArray=YLang.isArray,selectorTest=Y.Selector.test,detachCategories=Y.Env.evt.handles;function delegate(type,fn,el,filter){var args=toArray(arguments,0,true),query=isString(el)?el:null,typeBits,synth,container,categories,cat,i,len,handles,handle;if(isObject(type)){handles=[];if(isArray(type)){for(i=0,len=type.length;i1){cat=typeBits.shift();type=typeBits.shift();} +synth=Y.Node.DOM_EVENTS[type];if(isObject(synth)&&synth.delegate){handle=synth.delegate.apply(synth,arguments);} +if(!handle){if(!type||!fn||!el||!filter){return;} +container=(query)?Y.Selector.query(query,null,true):el;if(!container&&isString(el)){handle=Y.on('available',function(){Y.mix(handle,Y.delegate.apply(Y,args),true);},el);} +if(!handle&&container){args.splice(2,2,container);handle=Y.Event._attach(args,{facade:false});handle.sub.filter=filter;handle.sub._notify=delegate.notifySub;}} +if(handle&&cat){categories=detachCategories[cat]||(detachCategories[cat]={});categories=categories[type]||(categories[type]=[]);categories.push(handle);} +return handle;} +delegate.notifySub=function(thisObj,args,ce){args=args.slice();if(this.args){args.push.apply(args,this.args);} +var currentTarget=delegate._applyFilter(this.filter,args,ce),e,i,len,ret;if(currentTarget){currentTarget=toArray(currentTarget);e=args[0]=new Y.DOMEventFacade(args[0],ce.el,ce);e.container=Y.one(ce.el);for(i=0,len=currentTarget.length;i=200&&status<300||status===1223){_ioSuccess(o,c);} +else{_ioFailure(o,c);}} +function _readyState(o,c){if(o.c.readyState===4){if(c.timeout){_clearTimeout(o.id);} +w.setTimeout(function(){_ioComplete(o,c);_handleResponse(o,c);},0);}} +function _io(uri,c,i){var f,o,d,m,r,s,oD,a,j,u=uri;c=Y.Object(c);o=_create(c.xdr||c.form,i);m=c.method?c.method=c.method.toUpperCase():c.method='GET';s=c.sync;oD=c.data;if(Y.Lang.isObject(c.data)&&Y.QueryString){c.data=Y.QueryString.stringify(c.data);} +if(c.form){if(c.form.upload){return Y.io.upload(o,uri,c);} +else{f=Y.io._serialize(c.form,c.data);if(m==='POST'||m==='PUT'){c.data=f;} +else if(m==='GET'){uri=_concat(uri,f);}}} +if(c.data&&m==='GET'){uri=_concat(uri,c.data);} +if(c.data&&m==='POST'){c.headers=Y.merge({'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8'},c.headers);} +if(o.t){return Y.io.xdr(uri,o,c);} +if(!s){o.c.onreadystatechange=function(){_readyState(o,c);};} +try{o.c.open(m,uri,s?false:true);if(c.xdr&&c.xdr.credentials){o.c.withCredentials=true;}} +catch(e1){if(c.xdr){return _resend(o,u,c,oD);}} +_setHeaders(o.c,c.headers);_ioStart(o.id,c);try{o.c.send(c.data||'');if(s){d=o.c;a=['status','statusText','responseText','responseXML'];r=c.arguments?{id:o.id,arguments:c.arguments}:{id:o.id};for(j=0;j<4;j++){r[a[j]]=o.c[a[j]];} +r.getAllResponseHeaders=function(){return d.getAllResponseHeaders();};r.getResponseHeader=function(h){return d.getResponseHeader(h);};_ioComplete(o,c);_handleResponse(o,c);return r;}} +catch(e2){if(c.xdr){return _resend(o,u,c,oD);}} +if(c.timeout){_startTimeout(o,c.timeout);} +return{id:o.id,abort:function(){return o.c?_ioCancel(o,'abort'):false;},isInProgress:function(){return o.c?o.c.readyState!==4&&o.c.readyState!==0:false;}};} +_io.start=_ioStart;_io.complete=_ioComplete;_io.success=_ioSuccess;_io.failure=_ioFailure;_io.end=_ioEnd;_io._id=_id;_io._timeout=_timeout;_io.header=_setHeader;Y.io=_io;Y.io.http=_io;},'3.3.0',{requires:['event-custom-base','querystring-stringify-simple']});YUI.add('querystring-stringify-simple',function(Y){var QueryString=Y.namespace("QueryString"),EUC=encodeURIComponent;QueryString.stringify=function(obj,c){var qs=[],s=c&&c.arrayKey?true:false,key,i,l;for(key in obj){if(obj.hasOwnProperty(key)){if(Y.Lang.isArray(obj[key])){for(i=0,l=obj[key].length;i=d);if(t>d){t=d;} +if(!delay||time>=delay){setter(anim,name,attribute.from,attribute.to,t-delay,d-delay,attribute.easing,attribute.unit);if(done){delete attrs[name];anim._count--;if(config[name]&&config[name].on&&config[name].on.end){config[name].on.end.call(Y.one(node),data);} +if(!allDone&&anim._count<=0){allDone=true;anim._end(elapsed);anim._endTimer();}}}}}},_initAttrs:function(){var anim=this,customAttr=Transition.behaviors,uid=Y.stamp(anim._node),attrs=Transition._nodeAttrs[uid],attribute,duration,delay,easing,val,name,mTo,mFrom,unit,begin,end;for(name in attrs){attribute=attrs[name];if(attrs.hasOwnProperty(name)&&(attribute&&attribute.transition===anim)){duration=attribute.duration*1000;delay=attribute.delay*1000;easing=attribute.easing;val=attribute.value;if(name in anim._node.style||name in Y.DOM.CUSTOM_STYLES){begin=(name in customAttr&&'get'in customAttr[name])?customAttr[name].get(anim,name):Transition.DEFAULT_GETTER(anim,name);mFrom=Transition.RE_UNITS.exec(begin);mTo=Transition.RE_UNITS.exec(val);begin=mFrom?mFrom[1]:begin;end=mTo?mTo[1]:val;unit=mTo?mTo[2]:mFrom?mFrom[2]:'';if(!unit&&Transition.RE_DEFAULT_UNIT.test(name)){unit=Transition.DEFAULT_UNIT;} +if(typeof easing==='string'){if(easing.indexOf('cubic-bezier')>-1){easing=easing.substring(13,easing.length-1).split(',');}else if(Transition.easings[easing]){easing=Transition.easings[easing];}} +attribute.from=Number(begin);attribute.to=Number(end);attribute.unit=unit;attribute.easing=easing;attribute.duration=duration+delay;attribute.delay=delay;}else{delete attrs[name];anim._count--;}}}},destroy:function(){this.detachAll();this._node=null;}},true);Y.mix(Y.Transition,{_runtimeAttrs:{},RE_DEFAULT_UNIT:/^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i,DEFAULT_UNIT:'px',intervalTime:20,behaviors:{left:{get:function(anim,attr){return Y.DOM._getAttrOffset(anim._node,attr);}}},DEFAULT_SETTER:function(anim,att,from,to,elapsed,duration,fn,unit){from=Number(from);to=Number(to);var node=anim._node,val=Transition.cubicBezier(fn,elapsed / duration);val=from+val[0]*(to-from);if(node){if(att in node.style||att in Y.DOM.CUSTOM_STYLES){unit=unit||'';Y.DOM.setStyle(node,att,val+unit);}}else{anim._end();}},DEFAULT_GETTER:function(anim,att){var node=anim._node,val='';if(att in node.style||att in Y.DOM.CUSTOM_STYLES){val=Y.DOM.getComputedStyle(node,att);} +return val;},_startTimer:function(){if(!Transition._timer){Transition._timer=setInterval(Transition._runFrame,Transition.intervalTime);}},_stopTimer:function(){clearInterval(Transition._timer);Transition._timer=null;},_runFrame:function(){var done=true,anim;for(anim in Transition._running){if(Transition._running[anim]._runFrame){done=false;Transition._running[anim]._runFrame();}} +if(done){Transition._stopTimer();}},cubicBezier:function(p,t){var x0=0,y0=0,x1=p[0],y1=p[1],x2=p[2],y2=p[3],x3=1,y3=0,A=x3-3*x2+3*x1-x0,B=3*x2-6*x1+3*x0,C=3*x1-3*x0,D=x0,E=y3-3*y2+3*y1-y0,F=3*y2-6*y1+3*y0,G=3*y1-3*y0,H=y0,x=(((A*t)+B)*t+C)*t+D,y=(((E*t)+F)*t+G)*t+H;return[x,y];},easings:{ease:[0.25,0,1,0.25],linear:[0,0,1,1],'ease-in':[0.42,0,1,1],'ease-out':[0,0,0.58,1],'ease-in-out':[0.42,0,0.58,1]},_running:{},_timer:null,RE_UNITS:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/},true);Transition.behaviors.top=Transition.behaviors.bottom=Transition.behaviors.right=Transition.behaviors.left;Y.Transition=Transition;},'3.3.0',{requires:['transition-native','node-style']});YUI.add('transition',function(Y){},'3.3.0',{use:['transition-native','transition-timer']});YUI.add('selector-css3',function(Y){Y.Selector._reNth=/^(?:([\-]?\d*)(n){1}|(odd|even)$)*([\-+]?\d*)$/;Y.Selector._getNth=function(node,expr,tag,reverse){Y.Selector._reNth.test(expr);var a=parseInt(RegExp.$1,10),n=RegExp.$2,oddeven=RegExp.$3,b=parseInt(RegExp.$4,10)||0,result=[],siblings=Y.Selector._children(node.parentNode,tag),op;if(oddeven){a=2;op='+';n='n';b=(oddeven==='odd')?1:0;}else if(isNaN(a)){a=(n)?1:0;} +if(a===0){if(reverse){b=siblings.length-b+1;} +if(siblings[b-1]===node){return true;}else{return false;}}else if(a<0){reverse=!!reverse;a=Math.abs(a);} +if(!reverse){for(var i=b-1,len=siblings.length;i=0&&siblings[i]===node){return true;}}}else{for(var i=siblings.length-b,len=siblings.length;i>=0;i-=a){if(i-1;},'checked':function(node){return(node.checked===true||node.selected===true);},enabled:function(node){return(node.disabled!==undefined&&!node.disabled);},disabled:function(node){return(node.disabled);}});Y.mix(Y.Selector.operators,{'^=':'^{val}','$=':'{val}$','*=':'{val}'});Y.Selector.combinators['~']={axis:'previousSibling'};},'3.3.0',{requires:['dom-base','selector-native','selector-css2']});YUI.add('dom-style-ie',function(Y){(function(Y){var HAS_LAYOUT='hasLayout',PX='px',FILTER='filter',FILTERS='filters',OPACITY='opacity',AUTO='auto',BORDER_WIDTH='borderWidth',BORDER_TOP_WIDTH='borderTopWidth',BORDER_RIGHT_WIDTH='borderRightWidth',BORDER_BOTTOM_WIDTH='borderBottomWidth',BORDER_LEFT_WIDTH='borderLeftWidth',WIDTH='width',HEIGHT='height',TRANSPARENT='transparent',VISIBLE='visible',GET_COMPUTED_STYLE='getComputedStyle',UNDEFINED=undefined,documentElement=Y.config.doc.documentElement,testFeature=Y.Features.test,addFeature=Y.Features.add,re_unit=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,isIE8=(Y.UA.ie>=8),_getStyleObj=function(node){return node.currentStyle||node.style;},ComputedStyle={CUSTOM_STYLES:{},get:function(el,property){var value='',current;if(el){current=_getStyleObj(el)[property];if(property===OPACITY&&Y.DOM.CUSTOM_STYLES[OPACITY]){value=Y.DOM.CUSTOM_STYLES[OPACITY].get(el);}else if(!current||(current.indexOf&¤t.indexOf(PX)>-1)){value=current;}else if(Y.DOM.IE.COMPUTED[property]){value=Y.DOM.IE.COMPUTED[property](el,property);}else if(re_unit.test(current)){value=ComputedStyle.getPixel(el,property)+PX;}else{value=current;}} +return value;},sizeOffsets:{width:['Left','Right'],height:['Top','Bottom'],top:['Top'],bottom:['Bottom']},getOffset:function(el,prop){var current=_getStyleObj(el)[prop],capped=prop.charAt(0).toUpperCase()+prop.substr(1),offset='offset'+capped,pixel='pixel'+capped,sizeOffsets=ComputedStyle.sizeOffsets[prop],mode=el.ownerDocument.compatMode,value='';if(current===AUTO||current.indexOf('%')>-1){value=el['offset'+capped];if(mode!=='BackCompat'){if(sizeOffsets[0]){value-=ComputedStyle.getPixel(el,'padding'+sizeOffsets[0]);value-=ComputedStyle.getBorderWidth(el,'border'+sizeOffsets[0]+'Width',1);} +if(sizeOffsets[1]){value-=ComputedStyle.getPixel(el,'padding'+sizeOffsets[1]);value-=ComputedStyle.getBorderWidth(el,'border'+sizeOffsets[1]+'Width',1);}}}else{if(!el.style[pixel]&&!el.style[prop]){el.style[prop]=current;} +value=el.style[pixel];} +return value+PX;},borderMap:{thin:(isIE8)?'1px':'2px',medium:(isIE8)?'3px':'4px',thick:(isIE8)?'5px':'6px'},getBorderWidth:function(el,property,omitUnit){var unit=omitUnit?'':PX,current=el.currentStyle[property];if(current.indexOf(PX)<0){if(ComputedStyle.borderMap[current]&&el.currentStyle.borderStyle!=='none'){current=ComputedStyle.borderMap[current];}else{current=0;}} +return(omitUnit)?parseFloat(current):current;},getPixel:function(node,att){var val=null,style=_getStyleObj(node),styleRight=style.right,current=style[att];node.style.right=current;val=node.style.pixelRight;node.style.right=styleRight;return val;},getMargin:function(node,att){var val,style=_getStyleObj(node);if(style[att]==AUTO){val=0;}else{val=ComputedStyle.getPixel(node,att);} +return val+PX;},getVisibility:function(node,att){var current;while((current=node.currentStyle)&¤t[att]=='inherit'){node=node.parentNode;} +return(current)?current[att]:VISIBLE;},getColor:function(node,att){var current=_getStyleObj(node)[att];if(!current||current===TRANSPARENT){Y.DOM.elementByAxis(node,'parentNode',null,function(parent){current=_getStyleObj(parent)[att];if(current&¤t!==TRANSPARENT){node=parent;return true;}});} +return Y.Color.toRGB(current);},getBorderColor:function(node,att){var current=_getStyleObj(node),val=current[att]||current.color;return Y.Color.toRGB(Y.Color.toHex(val));}},IEComputed={};addFeature('style','computedStyle',{test:function(){return'getComputedStyle'in Y.config.win;}});addFeature('style','opacity',{test:function(){return'opacity'in documentElement.style;}});addFeature('style','filter',{test:function(){return'filters'in documentElement;}});if(!testFeature('style','opacity')&&testFeature('style','filter')){Y.DOM.CUSTOM_STYLES[OPACITY]={get:function(node){var val=100;try{val=node[FILTERS]['DXImageTransform.Microsoft.Alpha'][OPACITY];}catch(e){try{val=node[FILTERS]('alpha')[OPACITY];}catch(err){}} +return val / 100;},set:function(node,val,style){var current,styleObj=_getStyleObj(node),currentFilter=styleObj[FILTER];style=style||node.style;if(val===''){current=(OPACITY in styleObj)?styleObj[OPACITY]:1;val=current;} +if(typeof currentFilter=='string'){style[FILTER]=currentFilter.replace(/alpha([^)]*\))/gi,'')+ +((val<1)?'alpha('+OPACITY+'='+val*100+')':'');if(!style[FILTER]){style.removeAttribute(FILTER);} +if(!styleObj[HAS_LAYOUT]){style.zoom=1;}}}};} +try{Y.config.doc.createElement('div').style.height='-1px';}catch(e){Y.DOM.CUSTOM_STYLES.height={set:function(node,val,style){var floatVal=parseFloat(val);if(floatVal>=0||val==='auto'||val===''){style.height=val;}else{}}};Y.DOM.CUSTOM_STYLES.width={set:function(node,val,style){var floatVal=parseFloat(val);if(floatVal>=0||val==='auto'||val===''){style.width=val;}else{}}};} +if(!testFeature('style','computedStyle')){IEComputed[WIDTH]=IEComputed[HEIGHT]=ComputedStyle.getOffset;IEComputed.color=IEComputed.backgroundColor=ComputedStyle.getColor;IEComputed[BORDER_WIDTH]=IEComputed[BORDER_TOP_WIDTH]=IEComputed[BORDER_RIGHT_WIDTH]=IEComputed[BORDER_BOTTOM_WIDTH]=IEComputed[BORDER_LEFT_WIDTH]=ComputedStyle.getBorderWidth;IEComputed.marginTop=IEComputed.marginRight=IEComputed.marginBottom=IEComputed.marginLeft=ComputedStyle.getMargin;IEComputed.visibility=ComputedStyle.getVisibility;IEComputed.borderColor=IEComputed.borderTopColor=IEComputed.borderRightColor=IEComputed.borderBottomColor=IEComputed.borderLeftColor=ComputedStyle.getBorderColor;Y.DOM[GET_COMPUTED_STYLE]=ComputedStyle.get;Y.namespace('DOM.IE');Y.DOM.IE.COMPUTED=IEComputed;Y.DOM.IE.ComputedStyle=ComputedStyle;}})(Y);},'3.3.0',{requires:['dom-style']});YUI.add('simpleyui',function(Y){},'3.3.0',{use:['yui','oop','dom','event-custom-base','event-base','pluginhost','node','event-delegate','io-base','json-parse','transition','selector-css3','dom-style-ie','querystring-stringify-simple']});var Y=YUI().use('*'); diff --git a/include/javascript/yui3/build/slider/assets/skins/audio-light/rail-x.png b/include/javascript/yui3/build/slider/assets/skins/audio-light/rail-x.png new file mode 100644 index 0000000000000000000000000000000000000000..4cd29b45b9a6e36b8da640f7f56dc78e21b70411 GIT binary patch literal 3668 zcmV-a4y*BrP)P001)x0{{R3RRB`~00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s)6>)V`1rB0vE$?8=;-KZXlT{d)&Kwh2nYxX z2?+`c3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~Zh}uQ00008bW%=J|NsC0|Ns90-h;ha0000_Nklj%m0cc*4B1M0Nn`^K!rUC4lCybX(Ppt;r02`RkH{EGrj=?QS`9o|w8k6L? m=&y_X0{{R3t4QWZ00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s)6>)R^z^i}wBzIB=;-KZXlT{d)&Kwh2nYxX z2?+`c3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~GRr&N00008bW%=J|NsC0|Ns90-h;ha0000>NklLXsrPdFjpc;7vL8@UQz;o9Q7SB7$7PG;W@cu-efw5O zNNC%(Z98`C`1F!Z!VqYYcddMeHg_OsHL@H@4Qd{@?T1rZgXfd)#-T{UuQYnv#s>- zjpfr4#oKyvSikvMU7eI0Fl#M~)`JZ0>Iy6@X{p4;_gZ#s6|G-coYq;A!yyNgY4svi4QAe_LkIdEp{ Tyt~&vfPCWV>gTe~DWM4f$$ZKx literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/audio-light/thumb-y.png b/include/javascript/yui3/build/slider/assets/skins/audio-light/thumb-y.png new file mode 100644 index 0000000000000000000000000000000000000000..20120d34b92f11e34389bfbf6958a7fc42168f33 GIT binary patch literal 503 zcmeAS@N?(olHy`uVBq!ia0vp^en2eD!3-ohQ%sWz&6_u`TD3}BTl@5xQ}^!OJ9PM9nYLOvw#2oQzwtl zn>Q~tHC0GRC?g}|)TvWeR#wxdO*?+_(;G5 ze*Adw-~lr;^U0GZj~_oickbNFmoKkgy?V=*E%)!=2f7FdrgA@#22utkL4LviNdpW? zOD|La^=|ZZaSW-rb>s>+cawp@fsd)F-|F_uf7_OO{oCLDvCEyZ1+MdT)g>1#`V+{~ zx^-Lqx_~lvX`cuC?qmw;hxaSHKm4@Z$NqgBFHh<={o<}mr8{>n+Pww{GoRHNEJYD@< J);T3K0RURw3M&8r literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/audio/rail-x.png b/include/javascript/yui3/build/slider/assets/skins/audio/rail-x.png new file mode 100644 index 0000000000000000000000000000000000000000..dc37bb24906ed215d6bc881f5c9c584043f79a1c GIT binary patch literal 3662 zcmV-U4zclxP)P001)x0{{R3RRB`~00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s7Z(>jJv}ZiE+{A{P*6|+000IC1_uWR2nYxX z2?+`c3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~q17Eg00006bW%=J|NsC0{{XYUq`v?F082?kK~#9!?9#anz%UF$ zQHK25f8{J76)_AL2+TswYjmlmh*f!-vRUS?Jw=%!rl^ijx^jiOBH4B;Ns?Xw?nZwl gwylqU0MN=i0BKAYgk-wm8~^|S07*qoM6N<$f;KX0{{R3t4QWZ00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s7Z(>jJv}ZiE+{A{P*6|+000IC1_uWR2nYxX z2?+`c3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~q17Eg00006bW%=J|NsC0{{XYUq`v?F07*$iK~#9!?2thUfItky zrk%|HzwBXAL`2UE%_&fZLKFZYO` e00030{{sLP3m1eY1Qh200000vid*{r(_ssJ=bLNM+(J!=B$cPz;0RSLVQ&rT%`iI!1O^A!#&vKV%v5v@H z)z}LFNU#?q4{?C(503zVSjQ0xeeuG<&D+h(!Ofjn4GLv;_jI#&d}Rj!z6&UQ1WbRI zR_0>m6rvG@Ox1AHqakG0gTx}KlQ=;vM3m}LEcx>^x*ZRcl<*k)^P+I$R>8irIqDazG$dd;@Li@UV z*Ead(gNfPQ0ZPI;TNbYyHXPtGNLuH~RrfaQ>l^#<^Q53uBVw>E=mz_kOC^k3}ci4xBx(HuhA_5%<%yNYDV^|Ky?GqK1xYa3lNe50=iM*JOEw* zVA;>c<_m;n0o2OJM$&(tRZ;GMu$9WHmBz43CXD_0OTdnVAY=7_>PiSjgE@NqscA!_S*38Sgox$ZnwtD-Q@vb%{yq~ zmKR*dfRw^Vy4-%^IK*>!Ns{;aBG$f^LcSiz+g&g^asRJ2O8JSH`T4EQ%{ldMh^f_} zQQ$42)1uwz=GEUI>FbNLAFb=`!9wQ2DtMPaI)_g+3m=aq6NOnXZ6~N)H;~+2GflB} zt65{>IZ~Et|OXN1XF`+b!EPj)UdhG*pNSlXy?9<}+-PYEpU9RgZ0#w=_pYm4Pi~ zV8Pb8mOvtvm-$(L_$F$zYg2fWag*iPlo(|#@A3Ikf1O)z&`F(si*ie33*RnNNWq{W zTW`4}AND{r!30v7kJkI58(H#D|5rW?5(U(lkBKoOV`aYO|xZr-~P8LO$n*khz z2EC<88YE6rPvcBu1c70tWkqExWh4eC21Brf(wF*yRmuj!`WvN0-_y$t%1|%%^%?aM zrBWr4Wrz|tnB3yc&y*=3ZtJ8~Qq5UKVGv@`%^LqTQS|BlBHoc^HdCG%uXBRDIxle3dEo3q+rY2s_bi!MQbvs0_xG$}GZ zL^r#Jn@AWJ!VOH!>y#@|l^iool}*JDiZR+L+U2=3h_32C=mB(T1AX<@9R6Yz+65hG zg|MbWH1t$;9j3IT1U3e~zmXvzi<~DfXEI?5^7`sYEomsZl0Ew2P%g0NG<_G0fR9m* z%?WRy9}e+!JEHV+rc@Ag2#ibnTPqB|Ku4er!J@S zpk(pOq1d70VdT=sVUdqKxyHg?<6ZsGAG%u;awH$q1e{kZf^?ud!HD`DHn0si$*6L+ zx}ngg?854ZPWD{Z^W%o>hP3#K(2B9euy}hzf5VVYms_qy_$u@r+nw#5|J?*ojO4&U z;6?{41e@Nwy7Yg`(iSf#xoCG@JAa@MmxocHQAh}>4B6_aWO3;Kl~~Dgv6DHPH0nqm z{vzn-%s7G7wpDCb5Ghx9WVlg;T)cY}oMA#RL)2$t3F@_~_)jriaU};Ks3Y-(PhAuw zTgLAsy&&Ew(kR!n)f+xf#qUNAxpeNeLsvs@@ z!iBtBm@ux=#AZ!0&E*`)T-xk6%q~JQk}ZOv$w`SGkTMpn6f|NFv2Fim zsKPG1_O{10wgLPkjbOmJF0taiF&{A+QuGsM!aWNjs72Tr*|&{E4@#t$=RO-b7_J*! zOceic^zrV1s*`Fh8C@8mVZ_G--)^aJlBkvT@LMF_pt=7n!Vteg`dbVd#b%lT_+A11Del8eoZf$HecMx4zw;B z;23C4+fUnFsa@4w$W=v`?Ovu|xtLdKyLcS*;ZEY-5U`P>XEEQWnI>gmdI>Yn_EpIH zp0?hij(qsY#K;WZf9PFjb651++`S-Ly?8<ggLM1QXZ^l6{=5oTHz8 zWom8Os52}(F|)Vgf333kl;VSkw6UN132eY|VK-zd1#vtUhe|^Q2J!!0vRwRx4%o37 zU3H>xJ8Go#UYk_9i`|iGmKrrX{^osLySVkx=$ldY7fB13J?}l~+mtDtzNQaN*;N=b zXUw60OMQU-#V%v6_~`O!i{BsGyP4@+37O@V6Mwgho{O_p+T|cmuA9-JrgFv_o(b7AocAvbHi6xZ_{P57R+oZDu3h4cWtc0NmvWWfM=duzK z>vEnqyVu3gG21cDT)Nv&w?kEQwBVr2>HXQ!iOh-ojN^=yHkY@BH+${-^j{WxJA0qB z4)_WSzC1O&I_U6O@?knESf$X}e9Qcf`_AES&6)mq@l^_aO3ED`Zsy6gjWFLLcHYE8 zC}=4FKu!GHE8P@q%xt5orv(818~}g}1%SVISicJZuLS^L&k_J6GXa3kE!m<+831sB z7n(37=zpW>i=dz&US3{3Jv|*A9XmTaB_$;e4h}v(KByu@QBjePmsdjSITaNZ2n2fk z^eHPVt0GjMf`WpGh=`e)Sz229`Sa&SMn+avR`S^6~@(1PlxeoSdANmX>#S zSQh^oJ3BizE%uO$i;J6^n}>%7oABAQXIN+~7C%2f7z`E=5D*j;6cQ2=78Vu}5fK#? z6%!K^7Z=AuNJvOXN=iyeNnsIXWMpJzW##1LuviKT3J?ecD+Egw%UoGm8OuRcRaH$* zOgML=?(Xj4;o<4&>E-3+?d|>g_3Jlp-uU?V`1<<#`T6<#`v(LBynXvNFfb5X^LOvw zA(6=7;NXyukkHW3u&}W3@bHL;h{(vusHmvu=;)Z3nAq6ZxVX6Y@88GA$0sBtBqk;% zB_$;%C#R&Oq^72(rKP2(r)OkjWM*b&Wo2b&XXoVPeE9GIg+k@#=6?M6F)uGKKR^G| zr%we11)o2EE-Wl8Dk>^2E-oo4DJ?B6D=RB6FR!SmsI084s;c_(b&;NalU(9rPk@W{x>=;-L!*x2~^_{7A-0Xi zXJ%$*XJ_Z;=H}<;7Zw&47Z;b7mX?>7S5{V5S66@h__4OOw!Xf;v9Ynaxw*BqwY|N) zv$ON_=g-~U-MziN{r&x4zkVGY92_1V9vvP1{{8#UpFhXP$0sKzr>Cc9XJ_Z<=NA_j zmzS4+|Ni~=@88wc)%ErD&CSj2?Jc%59aAb+{%cKdJ#Bq#`2P%m^OBKa-v_EGD!_af zeoYRLhscv6*Fe^h2B}KvRwlbwZ3P72u4KY6Jo4*4uvP$1|MN`eKO3$p7{b)JC^Bng z)NQOc>pi14U~$XyOyP~hqSpGUBLDNOOjCQO4NSr6ob&3t6GM0pWq8qzlDeEyo-bpQ mr1|frzFOBg$KnIWRqVHts`v(a0s4U@0;nlzD^@`)L;eSJebt1gMxzU>goal0(5kA zQd3h^RaISGU3GPJ-QC?eIXP`?Y@A)3WaQi;)DjXB{{R0Ev<(PqYMwp=niWJ^6Ri}lT9s~y;tqfM_kQ5w&ehLe+|0P7zcWXn zUP0siUu|2Z?yO7V56!Y^+h_}`dYywh;m z-`pD;|9`!qu!UpxZp)T)w&yxFSPEWz{GxJZ+LDuVYBu(q-ka>Ws_FFF?WOC)6ByRI VtV-R literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-x-dots.png b/include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-x-dots.png new file mode 100644 index 0000000000000000000000000000000000000000..453fb64f38c36c8fcfba553b0945fc8e5a38e7eb GIT binary patch literal 3651 zcmV-J4!rS+P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s7Z(=*003iSV^B~~E-o%8C@25`00##L2nYxX z2?+`c3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~OQ?XM00007bW%=J|NsC0|Nj6QO9Ms#002KpL_t(|+SJi84!|G~ z13{Cu^ZzGPfUY2IKw_)uPS)wI^ebKIX_<*iyAB_qYKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-sDk>@(8X7=AKok@dCMG6rZEYwhC?O#sW@ctk zP*62BH9tQ;Nl8fn000gS4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~Cx0}F0000EbW%=J|NsC0|NsC0|NsC0{{Th6+{gd`08U9nK~#9! z)X}>Rz%U3yQ73(**zo_q+kptFOQ&Y&oz92_qQa-N3j5(Rj7u}H!m1lqaqDK5ba(fp rBq`ZI@<)T7f9vPlHj-!&5pfRyQIr`@28L<`00000NkvXXu0mjfU}@^~ literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-x.png b/include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-x.png new file mode 100644 index 0000000000000000000000000000000000000000..f1aa290eec7e98f039467ecee049af443301b74c GIT binary patch literal 3710 zcmZveWl)^U5{5qx1h){}g1c*g#ddL*CAiBX!AY<{a1ZXV1PSgCmf-FV!7aE2I6(qI z@1Fm6s%Cn+s_T89>6)pUXe|vzJZwsA008immE?4g@xQ$YCMt3rf!-P-1D2bTp(g;~ zy!vmV0NJ_Z$RbS#2t-TE-qp+1)85sMP8kBBbMtVub9iS906r^lT^LmNh*a`s;|i=A z6_l##szZWFrvr`+B2HrApvNLqiJ~u9CeiMBDKC#kHJl%X8Xq4NN21Mz8-u-su}fbV zA6gU@GkU+}U*xpVezQOE)U+sdP<07!oWkhF#7$Qc)D{lHEeF%S{24mbKe)BaBNL3x zb=!7B^tQ`e}a-2!h{c`J({Fsq`c$`AGoXE88eJ zz+M8VntB@}4;b(P#CEFvV!#qNz^ANlrv%hB1KpE^I1KEDC{O zA%dTm;{cGKM1nl+<)hCee$C{hNIU}Hocp*7{h7haYUgQhs?tpc0JgjWXP&rt8!3Y% z(1VA1^+vuRv1NIAZ+CY|r5|i;IjSG<1nV{L z)_;8WHxTr2bN#b(n<-epG*}Vs_Gj<-m0B_NR5DhW)!Kf7;zKje^8?KsL%*_Bivb7m zjy92dyj*tNr9d%5G&q@kfO+=WW_y$C9#v{n7^riULh(=HE;F@8{iDiCXyDboeFFd& zZLU2(*f3Fp>_fMvyr0jd9~JYNfgn5OWOo2ClVjq6jy6gUVFG|$elSO!EY(#HIafD2 zb~8VR`@M_j}jVDEEC;G6tOmgYLc)LzfKI4 zPEU#ELek?Ou}Bkz)+C8xKp^BHqFs?cHMl`r@&|4cq@_%hGEAWmXWGV#KRbamKWEzG z8>M8NNWsB$r9Ht)f)r$kultZ3L$LoHAJ1SPxc&_nR*LmlJwp|4wf8zuxL@v+0aFs!;3^?g{Oo+hz*L>J??{td|u) zUkWD}fvXD;IPoveynAV>iJ5oH% zI7Gej#>I;u2_1@pu~FoZW01oryvb`b)k-MlVkw58e4_j(nFm<}S+05p90-n&BuS&# zX)0+fX;d7%(DI6sij4{!y-U3@XhOM}Za|HKo}lhdIo6N#O1%oW)`>2aF05RlEV2St z<_eYm8ff?!jc(Yd)~5;is-0hNzSBNPhht6A=)*%m(o}`!+jOiI7?gzpaT=MS4cM zL8VfqcBSG;he*w7DZHdZzRmDH7+-csh1G;r5tcCd0)C*oth-){T}rAhDSlnUQ{hxh zRnR8q-Q`kxmYLUS7L=#vTDsxead1Z+!21Y&biOOSR>Uc{G5**fYi zCF~^czU|V(*F@ z%X2cRKT;lFcBFPdq8kDmhUVj<-Oa7>qkh(yG0pL&hTdld(W&vJU8X;c+JdU6h z(N>{W=|LVl!|{0oxPkIJRcbLFjv5h{cb%ILri@KVxp z9wILBbQ!fMjW?4h=y&WOxJEkR5;Xf-aBIMn@;ejgt3+=j6k!F9Oa~6;k@8AzjPD*qKSJ11cAYjL^eY+21Rkq;` zPXjKo&AhZ}7$Z)NiB&HQxv>%8l0&Ew+ad=>1I$+6u4^KCR4lzRk8|R5ym53jQ8f4b z%kwEwFVR*qqBufTpPR;DzoW`gtO4ZiyNbO-@`5wsEqWE`dkliZd0w;fR6nC8u!F@< z-6`0tXEdaz3B~CIM-O{1Jm6$)@zhk)fY)%d$?`4&P9;SW9aBTRN|r(LX^CykXOAk< zb+jvME%jS@Wq*s!l-;b|(f$T^o-uxUMaF&xz6;*+$~U~tx8F{$|H!ZMW=ycHwuK@f zEk#|R@9nmwBa;&n($KHaE9f0m6++@quca*XVYp8XZO<~)LGO=3`Ts!V#|+tnpsJxPQn7`i6Z{c>&_?m zxi>eS2%g^O+`(-|H#y(kqZ_Qv8(KW^l@D?LRa+QyuRqYhXm}mL*%#RgIl9^R##Y9y zn&VP43&$IN4~na=337!%hQ2D7&=H4~qma22*u_*FJPjTY$n$s2Vzm(Ae_%bi=}6#u z-b(1TH7oxddmzy+F==w~-Rq)Zb?=q_cm3>IadYQmuVc_t%ADpI?{CuQh50-&$@Pv)Ki8Xqo9j)|^*|5S$H}p_WpCEA>UPa`^DCKC z*=5Ljm=a0pY$K59swX1`@gS4F^K7#ya zS8wl6d%V}YY0ir_2{d;<(tTokw*Omytvg+MpF)w6@{ER>dHG;1$i0gEZ=%6u)nx&o zKK|pqb_z15vsThk2LL~200;^NfWObkcmx3N`2gV90szD_0f5Xk*?d3&08jxfHK;rn z7Z)ihDFp=uD=RB4EiDrh6CE9$l$6w)H*e(Sy0Re%qurSgRImpP!$jQl(B9xSrR8&;R0vZ|`q}uD(uaRo>^z;l242+D7NO5Ln zW)>C}q!$|-8&ZUWgM*Wk6Uo5M&CSEZ!^_KywBzUJN4f|K3JM7cAuU8iL_|eJkvw8z zV&dZB5)u+15J*x|5(z0SEiEG>BP%Nl27{5Pa&mG=W(5TWMMXs=B_(BLWfc__B(|EG zn!38WhK2@`UrS3%TU%R4M@Lsz7Yc>y>FK?F`&M6H-@w4Y(9qDx$jI2(*u=!d)YR0> z%*@=}+`_`b($dn(%F5c>8rcL}TU$FjI~WXRZ*TA5;Na-!=;Y+|?%g|QXJ;1|7gtwT zH#awTcXtmD4^K}|FE6k6@85s;@WI>L+sDVp*Vot2&(GiA|KrDx0RaJlfq|bseF_Q+ z3Jwkq2?+@e4Gjwm3l9&Eh=_=cjEstkijIzsiHV7gjg5!{Kc6N47PEKxaE*uWe%gg)ngwz38yXrK8ymlU z`_|Odgg_vgo14FX|K8Hl(%RbE*4EbE-rmvC(b?JA)z#JA-QCmE)7#tI*VotI-#;)g zFgQ3kG&D3kJUlWoGCDdsHa0dsK0YxqF*!LoH8nLoJv}osGdnvwH#hg=$B+5>`Gtjr z#l^*?rKRQN<&~9{)z#ItwYBy2^^J{<&CSi9KYwm*ZEbIF@9gaC?(XjG?d|XH9~>MU z9v&VY9UUJZpPZch`t|Gd^z`iP?EL)v-+%x8{rmUD#l_|2<<-^I_4W0iKYwm+ZfduO z#EfWtMMZyGR+f*OHyJFMxHJlrUr_MI^YB1au(9#*tTT$qmxz&}D_MV R8u;JaQkK_{s{vbt{0}=e13CZz literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-y-dots.png b/include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-y-dots.png new file mode 100644 index 0000000000000000000000000000000000000000..0555b19d613d80c66f81aa736102a4af03ba96bf GIT binary patch literal 3642 zcmV-A4#n|_P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s7Z(=*003iSV^B~~E-o%8C@25`00##L2nYxX z2?+`c3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~OQ?XM00007bW%=J|NsC0|Nj6QO9Ms#001^gL_t(|+G1dX0v0A_ zHgv$i%8DVz!ph75XEQQmlgF=zb#UonU}eRt2L~8#dH?_b0RR630D7|va(^7WF#rGn M07*qoM6N<$g5Q75IsgCw literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-y-lines.png b/include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-y-lines.png new file mode 100644 index 0000000000000000000000000000000000000000..178aa85e139c48ed6023c3595f38018d15fc073e GIT binary patch literal 3667 zcmV-Z4y^HsP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-sDk>@(8X7=AKok@dCMG6rZEYwhC?O#sW@ctk zP*62BH9tQ;Nl8fn000gS4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~Cx0}F0000EbW%=J|NsC0|NsC0|NsC0{{Th6+{gd`07ywhK~#9! zV&H`WPF4;sUNpeQ!_9~;#>vCY#Q^89uw!Uq;^Ah%uZf473!4I}Xky~wW*}J;GY>Z- lUQM{baMT0<009600|3!)8BXnz0H6Q>002ovPDHLkV1oAU<~aZW literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-y.png b/include/javascript/yui3/build/slider/assets/skins/capsule-dark/rail-y.png new file mode 100644 index 0000000000000000000000000000000000000000..a47997f25576d6e4ace641bf2284712a1ad09037 GIT binary patch literal 3673 zcmZvfWmME#7smfwkS>uf>F$(<8M4rfN>jnxO+RgdoZYh!3-W=?ha0G>;b@U6>b277#xwy+-zQf zG-5*1HQe>duo?70@gbxsY+Q^u#Og7OMJr@_eb1GYFla^#W6%>5LlVgJc<|$Jm$CL3 zixb03V&cZ{wgXFC7CUbarXE|CWDjdD;my-nz1aAfs=|7rA^4Rb`sd%nM+S$t_xR*P zaalY7V(ex+M(+n^G~hN^TAG`w7pogU^P9)R270yfdIe~spNNh@Ic8`f5ooIG zj3VGD1=LKxj#C1l0syIl#-IeS%nJyp89Ar|4Xr>gk{GWEz{Upz^kO180gOPvYLuDT z4~WPCNR=;)qxpG##7ED8RHNV~6|?@wI#-^r-#>>+ zC{%>#`{g766sC}&PJ8*_ha{{+BE=FBgqFO=J(y2SHa5GD`_t7P@&K^y6FmFK!{1CD zB83^^`dG|*hT&*|SNQfO-l2&|z6B^eS~a@#_-{5!MagX|EBkwU%j$z5Q|ob~phsB0 zWv|i0n?J$Q_czzyyLVVZh0H@$FmAv1PhM%3(oU!1MA)n!B&poD;yvBd%`*+E*|b5q zNO$!}JQEdj6E1~HnPNeyoI|X0Pj)+7Ja_1_TcSXNvn*O*3U7tEE&6W_c4DYc@6HVX zTy(hiedEAJ4{;3Np7wn@mwQktWCcPT)KWbGz(SFQ4>H~?H-ZfSiiM$E4GJ_@eUv=C zn6!P**8A}8t;8ZgEQ9?ZVi2xf2(6bDXH6K0BWkLFj?0Swn>?LJubyL6ng=0Yzu{Lx z84ser*4PDo9G#&!7z(40M8!Sv83J(+L#E#S5aaq0-=V!RnUAHm!t^1{3s zuP@Xx31UTuGu4hnt4Xrp5rN(xlvu)pZv^;;2SAOlcyQ8eCmNY*@T-TZ8(!C-cf?-X zPB;2ukc2Ar;)r4Rf*7pn6;z>`Q0-;a3I{&8;yCCLdj0H7X%!k@*xH}}8Kkrk z5{!nb@-Q!wB)#A#4vYa0inEZ!f`!=IlK)X_{0x~RnNyx~(`P>7smv2mrDjeWTeWj( z!jeemVc;H(+=K58>@i-L;=*m@JwM+X>~QFhJF8Re6Yq=cW7=m6DHxXI>TgsO zL7s~ynSg4G5c>6c(G@R5-sVb7g_Emkl-3q!%u_p3INmtb|L|#lzL7z%oi$@LH*uu$ zBkKqHl`lR)6j}I442**+j}nU#M&(OcpRHL&H6Kqk0uc}wJjp)HA0c76w6e%7(%QyOlWKGOG=%;JPOUGzPFrsfy?- zScN-8?sKs5LoBB8faZV>__JPNqvdYrFaw?~RkI%tqYFWG)Z0+eLAJ)JmG|$sI1ZG!e@E>)RX znb2z0YQ1WelPkLK=-cB~ewJO(Z4pwS>0Z9+-*xzxHi-WL^5FWn{8|McirI|Mg1Lr|q?8^K^>mk} z;~!c3r3W@2kO!AqXIN)#N2IjPN|!7se^e$)a2ht-W!ZHdb{#HZ!(?M*)6hEBI?L79 zYAfR`lhTyZ9GRM&DxO-*5zUhkToO9WJIq_k+iJBk@iXB;R3N_Et2OPJlo_8PI^7~o zB#cX;h9>6C%C+!X*2Rw6j`HW_ZQ5zt)dh>Nfrej*F+^o6Rm1)==2{)X6%k|&v!Q^s z4%H2urFEqRwFiBCkijB|ULmZeGocIi{^CU{`C4)_7ny%17c_L0dBhKcP7_Zr3-2Oc zOmGf5!42}}RbUjbHt+DunD|(YunE2_S-w1);f>L*J$0XJPxI}7xodb{b6)>x#ajKD z*qPH=^!leskx!fj#=_n+1Eb*Ydi%3-c%L!^T()Y0b-+5Iu$Dt+ep~(&quQm0)>7Z9 z8|!ll+268WpLS(;rNuXeHjOPO#d}*vTPJh|+zTutx4<8mpX{Cjo@Rma5LPr8dTgjd zsOdjYVM15!1!QNYne-$$oH}hbEIuiA~>Y`k-Rea9U ztK#h4#txUP&icWjRvg*A6K22+nesK`_s$l9rzC3ZXiWA|ERf#e-X0(Dzcos zl8=N(GE-hNM*CIzzY4@$732x57cYES6LJ0f>H1+z{Ig=SG0R{xE_&??RW7Z7)SoGx zqW&yH!lgX>Z4vC1$(@=6nj3kN1?0K!7+i&9B)bH|Q&W;XK~;=eX$aUc?7-pOM2&r9 z)8mj^d@DbF2G*EMb8^iyV_sYYsO$&Cgky;ds|jXrC40sl^%}EA`fD75%XLAg`qU_^F1U*= zK+7f6qHjE`uLaHJ1kVt6KQicKed*L(2g+}})nffO3Qi+S78_Sbx<-*j_FwZf7NHx#%IX(_t=C^puYW78@n=nOtaXGV zz-=Wx(qB96%g2yYQgV>bkSoYvh}hZOMvL{*t=sGwORb z3l0nRcWQUdH*$5cRY$j(cdq8O+OD3bBj|JJ4_M5Eh^4k~3v_cb5dEY@?h_Tlk(b?% z@N-{Y0x<%^kNLwp%pQvVdq+1oTQ~FslB@3$0&BLh=3l;}gVFIjgK{r&mGca8?@Vn> z+jS;oXBUq*1MXGUUJ~VtNE`dBUqZ&5R*%Bw(_k0V3GfVfP%z)0b*r^vMBt$> z{k)ynXM0ZRDgIEZQwnKz@zv*|X>I?7(O09~dPz&yW1nN`$FzB!k&gV1+`2Y1m$tKj zu9iTDnmnb!*TBkRsGs<|1f>`n4hqq z#ntP((>~vIU%K;>Eh3%0_Y5C6o*e%)UK`Am-=$Hdr9EMwXJ6ji3iGa^-kTUO1uX>t zXiR*6r%7PfyRn!otA7AS)~T>eVYHB_%KzEFd62KtNz;XQ!c|p`)WCBqT&j zOUud0Nkl{>Dk_SyL@f#m3Q9^!ln6C7H4P07s)3G<4yE?;L_eY zO-(H=Ep2UW6u+*nuAZKrzP`SJfdK>pF*G!M{ra_$kr5OMH8wUjF)=YUH8nFcGdDN4 zu&}VSw6wCavbMIiv9YnWwM7lV-rnB9!2t$?IXXHzIXO8yJG;2Jym|A+)z#I_&CT82 z-NVDf)6>(-%gfu_+sDV}?c2BS-o5kn_4V`f^Y`};2nYxa41E9oeNa$PaB%R44gwv6nwr|$+Pb>B`uh5YhK9z*#-^sG=H})v zU%s@ov>*_O*4EaqU%$4swY9gmcXV`gc6N4kb#-@l_w@Ai_V)Jm_4W7n4-5FMd2nVH$y*}1v7`T6;8-@Yv@EG#ZA zE-fuBFE6jGtgNoCuC1-Dudi=xY;10BZf$LS|Neb@dwXYRXLomZZ*OmZfB)d%;PCM9 z$B!RJM@PrU$0sKzKY#u_Jv}`;J3Bu=|M%a2fBpJ(adB~Zd3kkpb$xyP`}gmgo15F) z+dqH){Qdj)?(XjX{{G?N;qmeD>FLQ0{#WL|8|V!Z literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider-base-skin.css b/include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider-base-skin.css new file mode 100644 index 00000000..7e313bee --- /dev/null +++ b/include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider-base-skin.css @@ -0,0 +1,98 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider/assets/skins/capsule-dark/thumb-x.png */ +/* Alternate thumbUrl /build/slider/assets/skins/capsule-dark/thumb-x-line.png */ + +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail, +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; + /* alternate: rail-x-dots.png */ + /* alternate: rail-x-lines.png */ +} + +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail { + height: 25px; +} +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb { + height: 30px; + width: 14px; +} + +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -10px; +} +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -50px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider/assets/skins/capsule-dark/thumb-y.png */ +/* Alternate thumbUrl /build/slider/assets/skins/capsule-dark/thumb-y-line.png */ + +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail, +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; + /* alternate: rail-y-dots.png */ + /* alternate: rail-y-lines.png */ +} + +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail { + width: 25px; +} +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb { + width: 30px; + height: 14px; +} + +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb-image { + left: -10px; + top: 0; +} +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb-shadow { + left: -50px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; +} diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider-base.css b/include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider-base.css new file mode 100644 index 00000000..baaaa5ff --- /dev/null +++ b/include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider-base.css @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle;}.yui3-slider-content{position:relative;display:block;}.yui3-slider-rail{position:relative;}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute;}.yui3-slider-thumb{overflow:hidden;}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail,.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-left,.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-right{background-image:url(rail-x.png);background-repeat:repeat-x;}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail{height:25px;}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb{height:30px;width:14px;}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-left{background-position:0 -20px;height:20px;left:-2px;width:5px;}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-right{background-position:0 -40px;height:20px;right:-2px;width:5px;}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb-image{left:0;top:-10px;}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb-shadow{left:0;opacity:.15;filter:alpha(opacity=15);top:-50px;}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail,.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-top,.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-bottom{background-image:url(rail-y.png);background-repeat:repeat-y;}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail{width:25px;}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb{width:30px;height:14px;}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-top{background-position:-20px 0;width:20px;top:-2px;height:5px;}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-bottom{background-position:-40px 0;width:20px;bottom:-2px;height:5px;}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb-image{left:-10px;top:0;}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb-shadow{left:-50px;opacity:.15;filter:alpha(opacity=15);top:0;} \ No newline at end of file diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider-skin.css b/include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider-skin.css new file mode 100644 index 00000000..7e313bee --- /dev/null +++ b/include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider-skin.css @@ -0,0 +1,98 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider/assets/skins/capsule-dark/thumb-x.png */ +/* Alternate thumbUrl /build/slider/assets/skins/capsule-dark/thumb-x-line.png */ + +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail, +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; + /* alternate: rail-x-dots.png */ + /* alternate: rail-x-lines.png */ +} + +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail { + height: 25px; +} +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb { + height: 30px; + width: 14px; +} + +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -10px; +} +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -50px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider/assets/skins/capsule-dark/thumb-y.png */ +/* Alternate thumbUrl /build/slider/assets/skins/capsule-dark/thumb-y-line.png */ + +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail, +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; + /* alternate: rail-y-dots.png */ + /* alternate: rail-y-lines.png */ +} + +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail { + width: 25px; +} +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb { + width: 30px; + height: 14px; +} + +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb-image { + left: -10px; + top: 0; +} +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb-shadow { + left: -50px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; +} diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider.css b/include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider.css new file mode 100644 index 00000000..baaaa5ff --- /dev/null +++ b/include/javascript/yui3/build/slider/assets/skins/capsule-dark/slider.css @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle;}.yui3-slider-content{position:relative;display:block;}.yui3-slider-rail{position:relative;}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute;}.yui3-slider-thumb{overflow:hidden;}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail,.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-left,.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-right{background-image:url(rail-x.png);background-repeat:repeat-x;}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail{height:25px;}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb{height:30px;width:14px;}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-left{background-position:0 -20px;height:20px;left:-2px;width:5px;}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-right{background-position:0 -40px;height:20px;right:-2px;width:5px;}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb-image{left:0;top:-10px;}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb-shadow{left:0;opacity:.15;filter:alpha(opacity=15);top:-50px;}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail,.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-top,.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-bottom{background-image:url(rail-y.png);background-repeat:repeat-y;}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail{width:25px;}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb{width:30px;height:14px;}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-top{background-position:-20px 0;width:20px;top:-2px;height:5px;}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-bottom{background-position:-40px 0;width:20px;bottom:-2px;height:5px;}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb-image{left:-10px;top:0;}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb-shadow{left:-50px;opacity:.15;filter:alpha(opacity=15);top:0;} \ No newline at end of file diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule-dark/thumb-x-line.png b/include/javascript/yui3/build/slider/assets/skins/capsule-dark/thumb-x-line.png new file mode 100644 index 0000000000000000000000000000000000000000..bfdbe0db89e433034eb04bfb4d70964e55ddd8eb GIT binary patch literal 3845 zcmb8y^;Z<%{|E5l4br6&0-_*|q?9!5(jALSO0$GWh|;)pN=U~d-Hj|Q-3^jUNDBxk zAq}7LeE)*)oO9=%d(O<<*Yk1j4|Bt{G!#h)X$b)UAW>G5)A`qfO%op*yyNA!aey6x zvy#C(03dq!uVDdc8IJ&fP}2?y)zY$ca&vlT>*UO!423c{yE@s}y|D%Wj|G%20;an| zC3&`d0#OY^Ca5~;P~tP_Kq8S8ajcw-1mr4VjM?*)+8y`h<#Fixv%;{WqmfaR+FZmD zgmZWsj5*PPxnU85SF7H+4l^xhTO+r1vr^k-$EeydymoxzBqafDAtZ4zg$%-K zcZ++eijSlKWW1sw1%QkK77~@hstaV{0A@p$7VCf(H(hk4MoO%# zIDp}yb(kDrD-M*6y^4?r^!We^8`W-6V2&H$Q-<3p0af)t`zSe44S-J!@M(tya{xHr zfLT8ilLru#3Q#BGVvcdEqZe_TzXM0J7pJ!L-LW9;2icqocynXi`(|-8S62XBHOgx0_?7&N2Y7>gG3b z%f(wuixkI2I^O269N^f#Cdzt$7HLyMCQ}Dw?JU5Lo&VX$XU8_q&u?yQ%&BxkjLZk& zzPE@@({}jHn+rdQ>$B4z-`1G@UzqqS;++5J96nLYe?0b?Ajo2ID@O6Up6KqHe(G7b zvPGjlC&jw<1D9yIw5a13`Om^3pE-J1Chx4)R=BRPrB;N1Dtjp`?>O!v6HDyBs%+%? zZtZJl0C3do)bX7i9~)^KxH{&3cPM?Mn8gAhZInN|0KjWGW**pJt#ltg0LW$eb5_aH zope0nYR7%tac{AM=-Ny;2*TXm2_c6NS|K01nsJl`K-fb@s^~e*c)!cg3$|<9hQvFQ z@^tDokV-m}U7F)(cCfej6X3}9<3BWKTnNLmh|p(>#-~mVK4H42&sIfv*oOnO*BH%itMUg+jzeZc~J8>Pfu}FkANFj%4+{%qV zEru#9ecbgctz?vN_V#$GE!jeh6ts`8{pTY*f$leaJiT3z>X%#u@s>l?&&r5Pdugj) zm0>rBpIVMpyW>3Ymv1K!#&L%*m_LzK(pS^hm{TfZc+4z#e}O=R06R##lkHi2k?L30 zru!G&k1SsBhw3YFG0i-PdB{ud9R}?dVSW$}eZkfk`=4@k9&GZ#q{8G|9i|o%04S@~14aOrQLX?G!OWwKe8oSP*y$a1H`KI6|u64=_ zS-speou#5|*nOcGLr8fxTBlMwwCJJW`!vy!Kq_U`{PLW{DOy`<+cUe$pKeX}mlB_7 zB#*-2wjr;zgk)h$1JLbe^BVO*pPWms*!5G*3IL+H}38mx0KVrq+Xt(Sf8iA?bp(H6eNxxL7RJ&AhuT{8WzYtZ>D&K5y)4yiip$E# zs;a)Levqc4-dMmkj(!M<>Njtm< z{W0>fIe~Tb!y%4tJCttvlp=x}(fBU#I4m+;HDHJ*S&Ao}u6L=wbwkDN)Wu}gYw{G8 zUYp*zUxcYV5I(Rw2wnU#Eck^Z(?H;1%dcraP-Uue%AL z5Xpjtzz+A9^*8$O>fFnRu`OC!3}gMbW`18bDyvbJQZ^=_JYch=ik z+^8LCu$JG?nQ=VxE%V4OKVr7v&|r9obhLArKJ5g5vXJ}4BJ|yg+@)NS+;TdCUsJS_ zTSbUds)Wa0VnL)yut~a?$HriIS|6pa{6_V$C=X|a@Y^@vR<8GtL)TDiMC;zvDZKqA z&Ysz$ohQMCRK+|GxWtlV)WS4gCj6Eq=PaU%VmW%~&Js=N*-77tc*Z*+JP|erHRgPx zaiqkl?)CXsT#Jw=bB{ni*Jfi7TXAfQ8j0Fcx>zPv+6M;57m{MF{DGh2VqG95jOy`d z#4cjX=EG2#b#TpX&)dj)-Y1E80}i#ZW%mrY3DJ;(pD;uASx&qfgf-lzZ6th9G^sT6 z`N;lo?I0#rB;)YQ-Ts5l2dkga`5~%sZhHN#)-rq18VMIq4B>!Z%O7CzLKoG`nrGm zS02NgJi?A?4n#v6bK4{uTC58PMn}Y@VR^6<*deD?h9!~vam%U{7?(-@_Zx}r+J@sjuY3nQHtJ*W^itv)1^Q0?BlX4A5m;FBMN$eXuCQ|flQd?%X88Bzm7Rde@koV9d%Mg?>@Kia54cIO01Wd&vj>e);i6~z`o{L2@ zOb*(6+j4Zpp3Ld6iQH{$9N*^XlYg_@zDHAu z>Fw-&@@>FFfdBQ$tE>GE_eFR5!`u}z%?%%hkL-807uBb_YGP2m%*vQC8K0ZDh8yjY3W<5PU0s;adA))v0-%CqNBaui$Lqi!E z8CF(ScXxL+H8lYN0a8*@LPA1OQBh%GVG$7#BO@bMSJ$_1-*R(v-@ku9F)=YFCdR|V z!`Rq(YikP(176?<|L@_KFJFQ$iiwGdi;GK0NJvUbN=Zq96M<96%F03@5GWKXCnqN_ zFR!4Wps1**q@<**tgND+2gB7=Sf{Re=S7Ca+(=HZ?T`Wz5aZK>^Uj%E}5f0rMgd2wPiQJ3BjjdwbC5&6_ul zj*eguCnqOoXJ^m{%=PZwJCF<1`0(KaC;;a2^z`)d^78if25o(PeL?V#A3uUn{{H@; zYG7bsP*6~CaBxUS2)HO=VPPPCL_`FL46e(kPoJWrqd^~#JuWT|T&DQ=_=JQ65G^Sw zDLFYgB_$;_H8m|QEj>LwBO?QaLS<%Ve);kxD=RBIJ3A*QCpR}YFE1}YKfj=$ps=v8 zsHmv8xVWUGq_niOtgNiOyu6~KqO!8Gs;a8Gy1J&Orna{B>({S!b#-Voy1u@?p`oF% zv9YPCskynirKP2{we{P#Z*6UD?d|Oy9UYyWon2jB-QC?iJw3g>y?uRs{r&v|0|SGD zgF{0@!^6WPBO{}uqhn)ZgxLX`sU{5 z_V)Jf?ha}_(C}}cx#?)=g2Vs!1^CpB|2q**Da*;iJQjXUh`4sikjqUN;34@=j+VV$ zy$cRM3g2T;(JGLWzqk70DEDN#*u9kgo zJcL3yy!Z(4Nqolfe)tJ;teSOGi|Pr|wErH*nBF?jP~e)Ek4B literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule-dark/thumb-x.png b/include/javascript/yui3/build/slider/assets/skins/capsule-dark/thumb-x.png new file mode 100644 index 0000000000000000000000000000000000000000..abed0253316931534bbdaacf4d169fe8fa90df24 GIT binary patch literal 4166 zcmdT`i8s{k7yo+6zLh=cwT>~yEM^9SVa#BLu?@qFtt>GVp}bK_BunWfscexJOGqI! zma^|l$i8LIUY01^&--WmKIeR%&$;KGbMO7!^E~G~_pB^P0=%br0RRv%AsbpBtKcy$ zx!I4;l}8+qW8v{9+g}9$K9T>(2Bbcd1OQ%3Zz9pk%F8d%@2Z!dzpM$7DC>X4&(qt- z0|0_Y(ruVDn?-Tl&cqgh5)<~A;%6 z#{Y(J_T;yS=7y%JSr|T?SJ593<}SG)clAJl4cHCU)m4?R;raxy1^4lB12yJpHHb6O zM?y=46eqT@yKFUq30f5HFi`-1BaV;_;EmbB(vv|pKqd#^((djy16Zj6F3Pv(`+%_Y z-INeE!11x17+YonAS>b#V+eTZ00rH4_l*Ds0uc42G+==tH2`5k_ap=F%Ym9MVZLI3 zn;$?>V4_x(L&!gI{+XvLG0M==0R|mU}0C6MqHWTd9|g_oJaC*ZZn5- z-TD4_0GJ94?KyO*Cw;Q7u4_U** zbF;HUrVRu~*EagCLuTFi8v23H?@-55bU)&`>oztY zPuef%JKC4&lW#C_V=*A2Gt^T7afYc6Hr2D_?-3rUG%EETU6`JP?y>7lVu1G-_1HoZ z)N-BO*?&=#g&Bc0(>nmLQR!Fv70k^Z<`ps39dxv=e?ZDq0>V5^9t8lvIYUJlt*u1A znHvBMGs7Y84WzefC80H(XKGK3)$;ATXxt?zHq;S>3A`7=&RlU(DY!!bM|HlJfw;iG z;$_e^RIjK+e?eHC?MFeJztA67?u=S+RX7iaK?}EttK3Koo7;VcLL9e5O60CwEt%s~ ztfFjdj3`x}l7Jy2t?$!hZOJklxGR5Qqn(T^5_DPs^*j4fRV3u&@M0?ND}O1Gm8*IB zuJKF0FBbxlsqx~OXI}rRId^ z&~uy~$?68SuTrhYb6?O-V&WYLZ(o#IzoSOyilF~V#db!Bn^3aezI@Vm+DpP~$NSy) zz>1UOPtIB-eWCZZFOt3|eP`ba;unY#i)fBvf~C?Vxg?oVL6Yy1&9bHXVx^jC2urnfHdz|+5X7!fD*VN3S^D|XVvV87RCBaa+O9J^( z|Ab>2Kt-LyH?Kh|lMiGnV{v(JUSNqRQxv_#dh@ZTKG#fg!0xj^3!VjVPSR%R{Rz=^ zm1z~}Y_u5*>EU!K?`hIgMm{;8nonA;)+k)fNzbk}sVq%YVE z+l=S%=7^i)w6_akd6%-JUsM_feZHKtmYnhFTv&#gU(Uq!>V-dNZov;|2flxDwn_X9 z&Jun_&Qbm@N!>iygh=V)P>Z`mzZrkez_ys@x;EwMWBR>iG<4{%%p(ZhoIG7d7KS3g`4)wa`~NbP#I zrhlt(>**q#$>^^uqoOxD$i&6wDGlsoOPBt2M~bklfC^{i>& zc7XHLjo$6_w34*C)!fl{YZ`0bYtduRJJ8QnGVD=Tztp!7zftFU^!c7YL0p-_vKkZc{{G_5_-S%t~{U7o6*&rP@k|r-=SGk-csIfS?`x|K5~+H zTjA)!(T$@XASX1&UA{3;$^HF%K8G7vL}zw`FaTCtlDiVRyagkzLcb4u;c}gKjja#mSB{L1q(|w;`NuF$_aKunK|N!{tCNO* z44)cKq%o0}*mr8C7>HgT?4s_7W(B%JzX|4P-_g%VXPEd<&R}7XLXFElpC0Q1 zr}<_=B$DAR&i>b5bk%J|=7_(6oq}pV#hb-gXg&U6APmVBf1tD>5~LKzd%aGkjwuiC z(dda8B053NT5OOZ<~JU#BvfIpD>kCCpmVId%5NT4nF*MUr)g)1r(TowRmW*pBO@Lq zJPaV@$(bjXF_)P0p4Zw7JR*w^8!yL}!_Pk9YQ0qQu;7Hf8gCgP`#a46JP6?`W_r*) zKX=}1!#>T=Q0-jpC}|sgsQGOD`O)gBx>Hk+%Ce#;bTt{qe09M^Y_V>@^-VAAfx>h>?AQFu}(c(gL2jL3TRS@&a=M^0;3r;a}DHEoObho-UCJ6`HKxO=&0 zO**9N7kZ_C)Uj&kK(F=Fs4bhVdB11B$DYYv$&P;Ey}ZTUr+dE6Z!LTSR-4&-*$=oB z1j`0lU;AZxaWw1r0o7%aVDsOf4%63z)C4pHZ2x`MG_Bxoczt$phi7ulMO*Q@ut>A&yzW!7EXrMm>iyN=ryy3Ug zxU)SeJ|22S`Jk)4ayUqN?QNB1)%h*_s=+XEJi1@s@o;QteeCwdnxM?ho-xu6XJkb8 zVZwI25b;EON_=~iK-6-EmL3*6t$*cUaX*LHeW4qaA#wQfu)R=193HyczdYF0lic$n zX(K7|v+vEUgQc2fsduAIbxmhKwFaY*=eF$jR%?UCf@IcTO$u4g-jux!KJxlqv~BYx zXD?AIG4Y6lJ$ZBA9i=vU{NLnY8kidZKvCSyJ!;}{EbC6THV1$kN&pZR0RX>`j&%_L z{y_l1k_!N6Cj)?l-=p)5#sI($Seem`P%w<9x|WWHuC68yq6CFQka}2syp91DqoWE^ zQv<^_kXm+BItqq%v~xrwG^{98Bvc&+h9lL~^|cLPs&Ep4Ou!NGIs~{1f~aR`gf~`F z07*$oS(sSZSkTA>6DSy_hsCR_p|w!j+GrgE909BVL8z+Jt?71DJ5?}LPfH&Pf@!K_ zbv1ApgeDwkkh3XVa+(QqgNq5{EUw6SPy zEwqjnS{tIIN-;J&DSR@($De9uZE0$yiPGZX<~fF_h^PR+z-h_T65FbIs2ydq2mdEWk{pkOs~vN^+saq+@MQ$vb?fPjmmi-x*}ryJA6&{R-B(3n61gH)Uu&JYmP-zNa2 zh87hO!@xD18Rw`LR4o)1q6~4OJJGEfa(~Mk8<3O~K`M%>I4vAV31nts=16z+_VCui zU=gZF3dt0Q)icsJwzHyx6;wn;Mb#i`DoPL-6i(D5^78Pak!XHCemg5WO%zreql?qh zQJ#$U0q#$eSJeiLt|rOQ&UrOb8|~eOKWRuTU%RudwWMmM`veeS65eeclVbsUwV3a zdV72O`ue_p{o3E(KQJ&bI5;>oG&DRsJTfveIyyQwHa0#!J~1&dIXU_5+qbEysp;wI znVFf{+1a_dx%v6|g@uLh-@h*|E-o!CEiW&xtgNiAuCA@Et*@{D`0?ZC&z~C`8=IS( zTU%S(+uOf>{o2{t+1=g!{rmTyKY#Z2_V)Mp4-O6v4-b!yj?j^IIsbVJw6?H04*xF! z;Q1EM0sz}X6GH=9@QB+`_+OGyyqew_i$2eTC4-7`*t?@R7r4Pe*(%RTA)?);+(E|7 zcdVfXFP6EI&b1Ynp((rNN<{m_$HMEaaWXoROYOaO?UWx8Z9m1^~@p&ZMJqKFsoS}M>^txl!{<$sor(>GK5LA(~26`wz5l%N%t z_oe87$DZj8+1)1#s@=Kjp$f=Fe!97*AntO{ajy>!s|~}|rL;lD58m~mT9+!kxnXol zM9-ZUu|ds(oTYQ7%gF>u0m%-@-Q!}(iJet;k!jBj9%6=X9jAMK=N*hWK0aX|Nqf3F zRBI*N=JhS7z!lukO8ex_6#>01^lo^JVB{=b)^OZw8nS_5Y>Hy-`6Jwpiwza^pMOLt zS1?PbhBO}!u2Ye(h_%mFb8{Wx=gAM8a@+P@-Ui_#x=f?OV`GsnV$f$I7ku1C9HQ(- zGL?e%eyxs{`$Y#F^JkHNc|Du>+BHQ4l(k!JDf|6lofHC?Z+R^_eodkMzt>}8WMNoH HaJln8US{B+ literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule-dark/thumb-y-line.png b/include/javascript/yui3/build/slider/assets/skins/capsule-dark/thumb-y-line.png new file mode 100644 index 0000000000000000000000000000000000000000..037dca38de3a9cc98aad216825ad0ce3caa86397 GIT binary patch literal 518 zcmeAS@N?(olHy`uVBq!ia0vp^{vb97GmyMrb@(!nVo7)Ob!1>zf5M!#>m`scS>hT| z5}cn_Ql40p%HWuipOmWLnVXoN8kCxtQdxL1)dr|&et=JiYkPZpY;0^oLPA|#T~ANX zq)C&4f`XEhlWS^fQd3hqJ3F(pvy+mNLPA2Mq@+qpN}8IQ3JVMQ`S~YIn9$wbZD3%K zmX@ZXq7oV!%E`%TYHC_qT54}^-_Xzy6&2;+;Gm|aR$gB26A z01P!-FMvXBji-xaNX4x+myh!uGT>==*t6|r(p1~i_ZF+w{ZDUZ_Fxk|+501ZXH8d< zyMpfQIacPAo*&)&S3q0k#X|eO+yACM`8|)r_wL2n?w*SkGS?nnG}R@OGsFA$2Q%iC zA{igoY5K03GAW47=N+fedme_Z*1U17G3TNlD}J{m`m37%(U+J{|%>#yDa}1*15U9ora@ocD)4hB}-f* zN`mv#O3D+9QW+dm@{>{(JaZG%Q-e|yQz{EjrrH1%9SHCVag7R%3JVN(v~|?eG_bX> z^K$jJFtIW-vWSa}GuAV4b#N0A776qX(p1$_RZ-JY)iE(J^YQe}&B%=ij^yU%(b3Q| z)G-S14s^A5v$J&YaPr7X&2n>cw=uJ|GPN$uDfIL7bFg-ll#q0`b5WF2GBGqUH@4K* zHq_G4(oohi)i+aD(hT+s(bLw`*3i*b(={_N)6>vTOG@|m3dl{*jSh>B4v(&{st*qe zH#RWQ*D>&R_jYk`c6adr`Tz*56`5`VDTk6Ezu^Cr0fs}>8(kO}7}Y&p978H@ExCNV zsL4QpEx|#d^TbaDg@a8~nsuXYIjsz<_`f|XWzWHDGdrrM$JA_|{rB*f>#0xgENbIj zU7WP?NLYQmVR*W$`L*{OV!0Z3KdcBmE&P(v|I&5s6Z`Z^50+c*ckox8 zfa|>J6Sr;P*w#^y704L1?zP*!SKMZ$XAPF!+?K;}?((hbohvSN-s6v{d2y(dr}|#2 z+p?{m)%p(eUU;fcTXRTu$Cum+o2>x{56*h=^-{3{OUmXYySb+`&WZjT((kg2WybT9 zdIC-gN8@%();RoWzx%)FIU1kVl}z|nyW{Wu6`zX21E2gfEZp&1G=X9JpXZMhuE?~2 OqQTSE&t;ucLK6UTmMlB~ literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule/rail-x-dots.png b/include/javascript/yui3/build/slider/assets/skins/capsule/rail-x-dots.png new file mode 100644 index 0000000000000000000000000000000000000000..b3f65d4996892afc0d9582ef734c5d6784605661 GIT binary patch literal 3655 zcmV-N4!H4&P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s_V)Ju{r&In@3FD5^78V_%gf^8;{X5u2nYxX z2?+`c3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~<;D2K00008bW%=J|NsC0|Ns90-h;ha0000&Nkle=waKH39wX2^3R~#ZtE661?|PI Z0RXXX4QA30kRbp7002ovPDHLkV1nMu?tB0M literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule/rail-x-lines.png b/include/javascript/yui3/build/slider/assets/skins/capsule/rail-x-lines.png new file mode 100644 index 0000000000000000000000000000000000000000..26374dfad07a34a04d0f01fbccc6eaab486e031e GIT binary patch literal 3669 zcmV-b4yy5qP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s{r&y>`}@_^)#c^o!^6YT(b4|?{>#hD`uh6v z^77*1;{X5u3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~v>**b0000CbW%=J|NsC0|NsC0|Ns9065r0w0000?NklKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s{QUg;`}^eN+9>w%gdRWng9R)5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~_05m@0000GbW%=J|NsC0|NsC0|NsC0|Ns90;3Hib0001JNklL??Y literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule/rail-y-dots.png b/include/javascript/yui3/build/slider/assets/skins/capsule/rail-y-dots.png new file mode 100644 index 0000000000000000000000000000000000000000..798c2ce3c7e654226a48770bd0d5b4551855e3dd GIT binary patch literal 3643 zcmV-B4#e?^P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s_V)Ju{r&In@3FD5^78V_%gf^8;{X5u2nYxX z2?+`c3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~<;D2K00008bW%=J|NsC0|Ns90-h;ha0000sNkl&D57i48-!zPbk56j@v!@$OXR}T&_-1Gnd009600|0Yr4Q4O)=eGa= N002ovPDHLkV1o0@<*)z% literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule/rail-y-lines.png b/include/javascript/yui3/build/slider/assets/skins/capsule/rail-y-lines.png new file mode 100644 index 0000000000000000000000000000000000000000..798c2ce3c7e654226a48770bd0d5b4551855e3dd GIT binary patch literal 3643 zcmV-B4#e?^P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s_V)Ju{r&In@3FD5^78V_%gf^8;{X5u2nYxX z2?+`c3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~<;D2K00008bW%=J|NsC0|Ns90-h;ha0000sNkl&D57i48-!zPbk56j@v!@$OXR}T&_-1Gnd009600|0Yr4Q4O)=eGa= N002ovPDHLkV1o0@<*)z% literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule/rail-y.png b/include/javascript/yui3/build/slider/assets/skins/capsule/rail-y.png new file mode 100644 index 0000000000000000000000000000000000000000..d20d3c3e991e9df9e806cd49381436d8cd2692ee GIT binary patch literal 3689 zcmZwJbx_pJ8vyVxFG!b22nf>MDGhgY$Kf5_93hQTf=8!x!yzHvAcu5!gLFv?2)q)4 zQonou|Lx4P&pb0bJG0Mzc4nh>wN;4lY48C6AW~CR)JJDgbl~G+qGx9EeMxk}b5}L; z0sw+%{{;q+o%Bdb-`D|w?+VfY4ly{Sl)2ux z1ZhMeQZ?N4DR3F|L9qz(BsMNaJW};2#)4%Ey`HB^N?5eR`B9kh@rXDIJs!ds{3V=S z#=`i}qNteB+pT~i=Y{s`{fURBMcIR@3uNOIPB$)Lx~j0AD1xvYME~@A=urRQ)-IoX zFg}YrK#JRF%jk8_i~-yPNlSAxb>nmb7`}4^xInj7PPf2|$VZYRP?jkMA`GM3JL#1M zE`l78_m2ma0P@Nh2xKOk0g#UcSdQ6P?*O{IfF=8f{W$=EyvYi{08CODDKPSr0ETCF zQHp?r6i_wwIz|bA2>|5w8vPQ$5-%X22DMiO>Y9P>Nm7Ca0GALD(2EM^1h4`C%VB0_ zUmz?CAXh$zO8?@nAwA$icPgtvx`jnTDcA&;*8>L%<)i1ARHNc17qj}uDqEhf*Ds4& zC|HE#`^7i_cW0xvbNrN*qf?!mj{3?@1U6n9{xre zgcLTy<)M)E6wAS!Aph-ktbGHCd=rp=xB|U!|F1Vn1&J-o%X_=KOX~d~6RS~Z-~+tZ zq8obu=1-9H-SyS?&TW=pA+ul=tefw>ihN89a9o?A@WO;MoENfsj@iMPzm2J^QDJ1NY&d;1yy z&fDC2zH#7UA{;`urhFdH|ktlLKCXFOfRYCn2 z2!o+2-MNhCKN69q%B@LK!+=o8T|~QzU}|uKp3FDGCU8rcI8B&xA;Gk*w_tVxWq!`I z=NB58II)6*=}HHZl>}MvkU;m3=QzUsZv^-T`#|-tc<@qe#_E}>2rCC^>Rwl2wnbmr zOx62fkp(Mt6Ufw=29$yUTcPf{(P8_xOBcu+5=A>ZDG+N4h7nhi#WBq+nQ-t-oGY z0C_5!U<|4*K(?<#6p-`@_5S>3SNycE&VxcI;5) zN5&7#OCLg_2#V05C^!do&U2jSaB83DwV9eF)N`@aLl6OR!Q;$>ERrlYLl_r|>pex% zD1MrH8e1AI7eA!DqNHM@g23>?a14@AZf+1*qiiT_uv3orExppP0;zj!Kx+Ummnw^_ zfS0*JAzgP&fMWFgg=eM!XFc?Psf>SbqPGt1a`M zt}RxkqP#!?EUYdJZPdR=wU@)$$@I9%_14Ba;3&G+3Mf9ZkE`sBgIR%uolTVY8pGtx!#${&?U;v5G}cUX2@23-b=*s$3c*)+6{v`(}2 zwOUFzOQbZVG>0a}CkiJPvP5%a1Q&%4at?A9b2ghTjeU)IP-UpEc4`f~#wA9lsCL(I zV+o^Tn4z&*qjEK}nsuSAx~=qSX^VD>c4giIysz#TY6Ml@OkKCPguPmWazO=J!L6y_ z%>y-krzssNfvtfb?`3d^BA1CP>5S=uyuNsnOTL!e$ezqSl?xoWOh4p@!=^~5mV|du z&&D|W9gzk(b1HBuc#Bu)MO19GM#vanhAdwW?cn-w$F92fm514u|Lheqr!lAZq-?eJ zRP5C8G;;0JxX35YJR@PR>Aqp`cfGwCIf74V0?wONK{{ZaV0hC3GrtXg60~};uDRH! z;@awrO7^#`=cgUn9cl3mp$#L8aq;fv;pQ=&KDRuJ@J;Xs=11E{|Hm1i6v2uC$BYhE z2sZiW_QwA`V^_SKX5yjYDS0QpNZ9s*9V!CNt2Gm;krRT z7N&8m_N`+3f(Y5eBg3H)a`Em_Fq#>`3{jt%HL%yF;$Ovd#f==eppHZ>uevCgYz3c_ z^on?^NUPi+pS{ueJPZj_d!z9}f{&|4%=Jy@=H1Cf_cFYc zvYd~MM>1VrGfMka>c0x4TxFDTtmn^sSmW{idg*%MO#CxqGf_)mQ!aY#b5$-a|Ky)Z z?V^4x1H#2Tdo5w?<%#W@M4Ib4l6jQb?-*Q!WF$KTLz9ydJwO$VS}7>_5q#hN-B^`f zc*DbhYiu(=eHzY)b7NxF6C+-H6sY6}#F%4|3#S2Y2et2-h#r+lugv3~I2msoT}>3v zJ^S={Le@*Rm5eHm(17yN!S*|A?7nHk+*eMj&ZrDWYR)$XBT{C_XH4toiQI zM!Jo5Wv!)tDX;8rv7NG?wLje7;LS53POr$=&meXsT3-1=wE6nW$<=SARsM_#j@7nM z6u70ROZscOUFpc=gp?fQGvpHT7b12#yWV8Ac;h;AN*mDrTjb~bs!99xz3fQmsv(A< z*1Y|^-L2Yf0~p+dSQ@3`9R+f%{m6c<5#4 z1Mtv|xPYoHoVl0p=-_nxPN3}bY~>t->{}CS zlUAK^*_nl-4gWip)t4l>BGN{F>KBj^$Cbm7xfJ;MR2(u585qR(XU%f85EXD>Gr8$R z;&#?b>b*6q^cZ^})h;z@dj8e>ykT|k8T2bOyH?V|<;eR;`XOabXQ(Z=ExV@0)Vbx< zzoRL@{`!zMPkeIyvcvBe<>SJ9o`lSL$A!P!^}zMjCgpmNC;R>6SlhA>`)PH%PP@gW z{E5Occs+7n&g5Zj>1^$TQ@2n4#mt(@HFkLD)I-u$0txs@LRP|91X09s-YZ!NiETO0 z`@_3Z@RaQoTOQRz;lo%B6(xVr&HVA= zLG#PkwT3ajKPvzrLIL2^KfPkQ&ppcM| zu&}U*h={1DsF;|TxVZSMSFa=_BqSvzrKF^!rKM$LWMpM!<>ch#<>eI=6hI&l7z|ca zR8&$@QdU-0QBhG)z#C})7RHGFff2XAcls9 zuV250LZL7i%*e>d*x1;_#KhFp)XdDx+}zy4!ot$h(#p!p+S=O2#>Upx*3Qn(-rgP# zhdVepI668yIXO8yJHL7J#>K_O)z#I_&CT82-NVDf)6>(-%gfu_`|aDe@7}%h@$vEX z_4V`f^Y`};2ncxp{(WFzU{FxdhYueR2t;sja7aia`bgqR#sM3 zRaIA4*VNS1*4Eb5)z#P6H#9UfHa33w@};S%357y6H#dL%`W20#wY9aat*yPiy`!U} zv$M0StE;=ayQin8x3{;iudlzqe_&u>aBy&FXlQtNcw}T`baWKW15IdRVq$V~a%yU7 zdU_hoX?AvYZf*|kZGL`!VPRo$adByBX?b}WZESUQ6)kXmeSKqN1C8+e_wQRZNJUKZzJv}`;JNx(Fe}Db@g~o}7dU<(yb#;Y? zeSLj>b93|O&mXi{w05+4v}ZJLG+O=EY4p1QsJ->I4bbKP9RP+1elvQJftsQM#COFy z5dnDU3EC^0Yvb8=k1`KVjYl!DF!FJ+vGDXFzI$BY2^LgZQc*JI6GTVyL=?n^@|e8| tVL9HmerjVy)?G><{=B9Yy&drQhzaZ`@oBjQE<^vT)s(aqYe1GE{{ui%CFTGC literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule/slider-base-skin.css b/include/javascript/yui3/build/slider/assets/skins/capsule/slider-base-skin.css new file mode 100644 index 00000000..4ca71cc6 --- /dev/null +++ b/include/javascript/yui3/build/slider/assets/skins/capsule/slider-base-skin.css @@ -0,0 +1,100 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider/assets/skins/capsule/thumb-x.png */ +/* Alternate thumbUrl /build/slider/assets/skins/capsule/thumb-x-line.png */ + +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail, +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; + background-repeat: repeat-x; + /* alternate: rail-x-dots.png */ + /* alternate: rail-x-lines.png */ +} + +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail { + height: 25px; +} +.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb { + height: 30px; + width: 14px; +} + +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -10px; +} +.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -50px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider/assets/skins/capsule/thumb-y.png */ +/* Alternate thumbUrl /build/slider/assets/skins/capsule/thumb-y-line.png */ + +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail, +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; + background-repeat: repeat-y; + /* alternate: rail-y-dots.png */ + /* alternate: rail-y-lines.png */ +} + +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail { + width: 25px; +} +.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb { + width: 30px; + height: 14px; +} + +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb-image { + left: -10px; + top: 0; +} +.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb-shadow { + left: -50px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; +} diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule/slider-base.css b/include/javascript/yui3/build/slider/assets/skins/capsule/slider-base.css new file mode 100644 index 00000000..0f3e9965 --- /dev/null +++ b/include/javascript/yui3/build/slider/assets/skins/capsule/slider-base.css @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle;}.yui3-slider-content{position:relative;display:block;}.yui3-slider-rail{position:relative;}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute;}.yui3-slider-thumb{overflow:hidden;}.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail,.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-left,.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-right{background-image:url(rail-x.png);background-repeat:repeat-x;background-repeat:repeat-x;}.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail{height:25px;}.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb{height:30px;width:14px;}.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-left{background-position:0 -20px;height:20px;left:-2px;width:5px;}.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-right{background-position:0 -40px;height:20px;right:-2px;width:5px;}.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb-image{left:0;top:-10px;}.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb-shadow{left:0;opacity:.15;filter:alpha(opacity=15);top:-50px;}.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail,.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-top,.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-bottom{background-image:url(rail-y.png);background-repeat:repeat-y;background-repeat:repeat-y;}.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail{width:25px;}.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb{width:30px;height:14px;}.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-top{background-position:-20px 0;width:20px;top:-2px;height:5px;}.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-bottom{background-position:-40px 0;width:20px;bottom:-2px;height:5px;}.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb-image{left:-10px;top:0;}.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb-shadow{left:-50px;opacity:.15;filter:alpha(opacity=15);top:0;} \ No newline at end of file diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule/slider-skin.css b/include/javascript/yui3/build/slider/assets/skins/capsule/slider-skin.css new file mode 100644 index 00000000..4ca71cc6 --- /dev/null +++ b/include/javascript/yui3/build/slider/assets/skins/capsule/slider-skin.css @@ -0,0 +1,100 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider/assets/skins/capsule/thumb-x.png */ +/* Alternate thumbUrl /build/slider/assets/skins/capsule/thumb-x-line.png */ + +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail, +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; + background-repeat: repeat-x; + /* alternate: rail-x-dots.png */ + /* alternate: rail-x-lines.png */ +} + +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail { + height: 25px; +} +.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb { + height: 30px; + width: 14px; +} + +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -10px; +} +.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -50px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider/assets/skins/capsule/thumb-y.png */ +/* Alternate thumbUrl /build/slider/assets/skins/capsule/thumb-y-line.png */ + +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail, +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; + background-repeat: repeat-y; + /* alternate: rail-y-dots.png */ + /* alternate: rail-y-lines.png */ +} + +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail { + width: 25px; +} +.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb { + width: 30px; + height: 14px; +} + +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb-image { + left: -10px; + top: 0; +} +.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb-shadow { + left: -50px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; +} diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule/slider.css b/include/javascript/yui3/build/slider/assets/skins/capsule/slider.css new file mode 100644 index 00000000..0f3e9965 --- /dev/null +++ b/include/javascript/yui3/build/slider/assets/skins/capsule/slider.css @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle;}.yui3-slider-content{position:relative;display:block;}.yui3-slider-rail{position:relative;}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute;}.yui3-slider-thumb{overflow:hidden;}.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail,.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-left,.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-right{background-image:url(rail-x.png);background-repeat:repeat-x;background-repeat:repeat-x;}.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail{height:25px;}.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb{height:30px;width:14px;}.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-left{background-position:0 -20px;height:20px;left:-2px;width:5px;}.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-right{background-position:0 -40px;height:20px;right:-2px;width:5px;}.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb-image{left:0;top:-10px;}.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb-shadow{left:0;opacity:.15;filter:alpha(opacity=15);top:-50px;}.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail,.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-top,.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-bottom{background-image:url(rail-y.png);background-repeat:repeat-y;background-repeat:repeat-y;}.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail{width:25px;}.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb{width:30px;height:14px;}.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-top{background-position:-20px 0;width:20px;top:-2px;height:5px;}.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-bottom{background-position:-40px 0;width:20px;bottom:-2px;height:5px;}.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb-image{left:-10px;top:0;}.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb-shadow{left:-50px;opacity:.15;filter:alpha(opacity=15);top:0;} \ No newline at end of file diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule/thumb-x-line.png b/include/javascript/yui3/build/slider/assets/skins/capsule/thumb-x-line.png new file mode 100644 index 0000000000000000000000000000000000000000..849a4548c0ec51777cc863d01b06bba60a1c63f1 GIT binary patch literal 828 zcmeAS@N?(olHy`uVBq!ia0vp@Kpeoq3?#p*@}~nSmUKs7M+S!VC(K#9UIO`&C9V-A z!TD(=<%vb942~)JNvR5+xryniL8*x;m4zo$Z5S9B^#goDTn`;Ov}4DPR~_Uu`+X3g^D%XjbIec-@>{rmT?TD5B7!i7hV9zA*TeZ{?zI|(NZ*OdDyl&mPnKNf@-@d)FvU2g_#ZR6* zIdS5|zJ2@d+_}Ta$@%Z!zhlRatzEnJ+qZA3s;ZYSU(U?TOh`z0{P^*W8#iQSWxss+ zGG)q?zP`Romo9DHx^?Q*skXMZOO`CzvSrKFt5<*h`qkgx|Lobb3l}b2ym+yvr>Cv0 zO+rFKPEPK}j~|~ue@;zJZE9*VF)?}l`t`JF)4qQF+TGnfZ{9o+5fM#I&D*zcGcz;a zym@omwrxj_9QpnGcU@iGqeqYK-@h*^DthqXL04DTYuB#r+`04g>C?-WE&KofKQL5* zz+%qjpFk?LB*-rqC`fa_AenKg85mbeo-U3d6}Qe@yqb5|K%^ltJ#*KVNQc73K6WFzPE))!yU%q_CvYab+%N%C=am>$KL%+g2HGr{^r1`D#mC#q&~gt=HDAcmDjpQEgLYHEV@j%dQe0trrn1_`EpwHnN;>aOu3^niQbFLZ^gdmS_~)RJYp_>8yLD p+g{qNU;XwV@6+4wtA7Y3Fo-M-I6L)bk^m^0JYD@<);T3K0RWpB);ItF literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule/thumb-x.png b/include/javascript/yui3/build/slider/assets/skins/capsule/thumb-x.png new file mode 100644 index 0000000000000000000000000000000000000000..09baa964b8306317ae679fc4f1816562b69e8b5c GIT binary patch literal 768 zcmeAS@N?(olHy`uVBq!ia0vp^d_e5a!3-qdOk&XjQY`6?zK#qG>ra@ocD)4hB}-f* zN`mv#O3D+9QW+dm@{>{(JaZG%Q-e|yQz{EjrrH1%9SHCVag~;q&dtqTvSi7F2M-o4 zT6E;dk&`D+?%1(o-MV%2=FQu>b?b!-7dCF(xMt0oLx&EXIdf+D^5y&X?OU~K)vQ^w zrcIl6<;s;ymoB-wx<*GwfBg7y!GZ;E-n^MIWy+j6bN1}n^X%EPCr_T-zJ2@p_3Pih zeOs|&#g;8wHf`F(&CPx8+_@h=e$1FLh2M!!~_3G7&7ccJKy?f`*ok^1>efjbw zF){JcqerJsojP{xn2wH)mzP&cO3LotyZ`?Ed*jB9-@ktYeE&iYc$0$&>x0a;#D<4TMk%gbURhbGDdt;0{QtlDTS4cV z=W;gwHQDQDnx^ZYc$jfwWx@RQlddj$YUh9Lr`2g`y-9COJ0I_O_B{2}kG(uUmL&Z< zAosI2;a5!Y{-nqJ9}_-VH_p(x^wnJ_=w1IZwThE!8%0*icSUljJua5Ch}4j|&Uo3v z;HN>e4tL6>Cv{(VD$O6Ta4DNLYe;-3P?>h-Q`HrQ_``Dx(!%5~Y2LRC-ahH#brIw1 z&FgYrHL2;n4Axl0G{tJsHd)P8@kgsH*mOhv_y0V3DR9Y^OI=_0-H}iVYTdi~S~}aJ z*N=WZTl((Q_Rv6)Z!1>n6}EZZ?8~Y4JG5{6570PwoMPWt$DU+ zne}?h<)Y@PH;*N_MNKmFIQ>5GLF94WANL9w_LbH!d%827vp#q5)A2vP^>hE0eqQkS z_s7-e4x}E}F1V9>zf5M!#>m`scS>hT| z5}cn_Ql40p%HWuipOmWLnVXoN8kCxtQdxL1)dr~OK!8t(YjSe3q@?7kRjZC3J-TMi znga(8bai#Tdi839%d#HgDei>C>l&4C++&YW3US^4(u+b2(+oH%h}-@bhE z=FOXznVDHvSLf>L`t|GA7cXA?`0?ZP>C?-WE&KofKhOt2us&se4Ulpu3GxdD3Q__X z4pnb-VPIes_jGX#skk*~a<+f7fk<0p*&XwM<98ggG`Gj5%>KM?>c9W>sm^Y1xKvJk zUh8>&^0PhpqH3QaV;ij*8MyW*{dW}PXVduha=OE;CWDzaJzvf)ca{i_e3-Hs=dgrD?u)+WO8l zmV2M=(z5;UHC`_3u4>r%!209K9p|4{PRh4l^4R;&-mfndmfVcIGwGr<$4@SE>u|op z3*p^ArIx)`sgyq6GWqe5&UoASPqP1?B?k-0R{Zz6w`Wrhmqe1Uxvpj3OsgfqQ%}1_ zv)_(>#rvK2w(q`o+um0?h^uf(x8DAJ$n~JxuZX4VnRaS#|C9WW!+_yS+x3@!Ql>8i O1-qxKpUXO@geCwuPHz|h literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule/thumb-y-lines.png b/include/javascript/yui3/build/slider/assets/skins/capsule/thumb-y-lines.png new file mode 100644 index 0000000000000000000000000000000000000000..4421d7027a7fcb8683604cf13145af696776d662 GIT binary patch literal 3665 zcmV-X4zBTuP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s{r&y>`}@_^)#c^o!^6YT(b4|?{>#hD`uh6v z^77*1;{X5u3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~v>**b0000CbW%=J|NsC0|NsC0|Ns9065r0w0000;NklVz`)7Hj4sB($;Hk9=diM1Xkz5#V#2S9lZzdj0;*_Y%7c*W> jxWI7K1ONa4|NjF3tXCCEtrNc+00000NkvXXu0mjfAIAF? literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/capsule/thumb-y.png b/include/javascript/yui3/build/slider/assets/skins/capsule/thumb-y.png new file mode 100644 index 0000000000000000000000000000000000000000..4040ee3522ee9136400c291aba40f33275a21955 GIT binary patch literal 541 zcmeAS@N?(olHy`uVBq!ia0vp^{y@yf!3-oL-)*b~QY`6?zK#qG>ra@ocD)4hB}-f* zN`mv#O3D+9QW+dm@{>{(JaZG%Q-e|yQz{EjrrH1%B?S0{xTdG4FI~Fy&!0cCva)N} zu3fNT!Q8oXFI>2=bLY;dPoM7Fx9`oHH#29>JbU)+g9i_$OqsHE>(*7PR&Ct4@#f8& zhYlS&di3av7cWkpJbCr%)tH!=yLaz?`}WPv&F#a74?r7$K=|^M3?QXY666>BA3tD- ziIINGz`!W(>Eaktacjxt+eOU^BCG)#N(*9K91Ns>{@>5DWNrj&`m7Rrt6gc2EgLG% zT`zh+ljl(6^Ujz@)r_sz{4cRQ%5{Hv1`88z8znaZ4n`O zYa8!E(S*pVl`@mnwikbUsk$!r_Cl^hmci8*)|`)fme(n4KgUnz`Kq^Gy=S6l&Xn2v z`>dtArtG9c`~7bhEuErgu`zG!nnw@5df)fId_-b$(7QQVr|$2&%Ix>oNv^f_tkV22 zO&@Ol*oqex{9(ymvv4FO#m&w5fcCa literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/round-dark/rail-x.png b/include/javascript/yui3/build/slider/assets/skins/round-dark/rail-x.png new file mode 100644 index 0000000000000000000000000000000000000000..ce0ee5024faa796680eb5d396cf55cd64ff3354c GIT binary patch literal 3637 zcmV-54$AR~P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s7Z(>$P*5%|E+{A{000051qB8M1_uWR2nYxX z2?+`c3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~doOI<00005bW%=J|NsC00QE2@Hb}wJR$>`TGMx600000NkvXX Hu0mjfXI;)3 literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/round-dark/rail-y.png b/include/javascript/yui3/build/slider/assets/skins/round-dark/rail-y.png new file mode 100644 index 0000000000000000000000000000000000000000..7fedc219cefaeeac597f4e0bbb6353b6421e802f GIT binary patch literal 3635 zcmV-34$Se1P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s7Z(>$P*5%|E+{A{000051qB8M1_uWR2nYxX z2?+`c3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~doOI<00005bW%=J|NsC00Q%)$Tw literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/round-dark/slider-base-skin.css b/include/javascript/yui3/build/slider/assets/skins/round-dark/slider-base-skin.css new file mode 100644 index 00000000..3f355852 --- /dev/null +++ b/include/javascript/yui3/build/slider/assets/skins/round-dark/slider-base-skin.css @@ -0,0 +1,96 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider/assets/skins/round-dark/thumb-x.png */ +/* Alternate thumbUrl /build/slider/assets/skins/round-dark/thumb-x-grip.png */ + +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail, +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; +} + +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail { + height: 25px; + background-position: 0 3px; +} +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb { + height: 26px; + width: 24px; +} + +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -17px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -37px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -7px; +} +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -47px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider/assets/skins/round-dark/thumb-y.png */ +/* Alternate thumbUrl /build/slider/assets/skins/round-dark/thumb-y-grip.png */ + +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail, +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; +} + +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail { + width: 25px; + background-position: 3px 0; +} +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb { + width: 26px; + height: 24px; +} + +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -17px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -37px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb-image { + top: 0; + left: -7px; +} +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb-shadow { + top: 0; + left: -47px; + opacity: 0.15; + filter: alpha(opacity=15); +} diff --git a/include/javascript/yui3/build/slider/assets/skins/round-dark/slider-base.css b/include/javascript/yui3/build/slider/assets/skins/round-dark/slider-base.css new file mode 100644 index 00000000..4f6ed61d --- /dev/null +++ b/include/javascript/yui3/build/slider/assets/skins/round-dark/slider-base.css @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle;}.yui3-slider-content{position:relative;display:block;}.yui3-slider-rail{position:relative;}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute;}.yui3-slider-thumb{overflow:hidden;}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail,.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-left,.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-right{background-image:url(rail-x.png);background-repeat:repeat-x;}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail{height:25px;background-position:0 3px;}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb{height:26px;width:24px;}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-left{background-position:0 -17px;height:20px;left:-2px;width:5px;}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-right{background-position:0 -37px;height:20px;right:-2px;width:5px;}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb-image{left:0;top:-7px;}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb-shadow{left:0;opacity:.15;filter:alpha(opacity=15);top:-47px;}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail,.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-top,.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-bottom{background-image:url(rail-y.png);background-repeat:repeat-y;}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail{width:25px;background-position:3px 0;}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb{width:26px;height:24px;}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-top{background-position:-17px 0;width:20px;top:-2px;height:5px;}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-bottom{background-position:-37px 0;width:20px;bottom:-2px;height:5px;}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb-image{top:0;left:-7px;}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb-shadow{top:0;left:-47px;opacity:.15;filter:alpha(opacity=15);} \ No newline at end of file diff --git a/include/javascript/yui3/build/slider/assets/skins/round-dark/slider-skin.css b/include/javascript/yui3/build/slider/assets/skins/round-dark/slider-skin.css new file mode 100644 index 00000000..3f355852 --- /dev/null +++ b/include/javascript/yui3/build/slider/assets/skins/round-dark/slider-skin.css @@ -0,0 +1,96 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider/assets/skins/round-dark/thumb-x.png */ +/* Alternate thumbUrl /build/slider/assets/skins/round-dark/thumb-x-grip.png */ + +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail, +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; +} + +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail { + height: 25px; + background-position: 0 3px; +} +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb { + height: 26px; + width: 24px; +} + +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -17px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -37px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -7px; +} +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -47px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider/assets/skins/round-dark/thumb-y.png */ +/* Alternate thumbUrl /build/slider/assets/skins/round-dark/thumb-y-grip.png */ + +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail, +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; +} + +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail { + width: 25px; + background-position: 3px 0; +} +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb { + width: 26px; + height: 24px; +} + +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -17px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -37px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb-image { + top: 0; + left: -7px; +} +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb-shadow { + top: 0; + left: -47px; + opacity: 0.15; + filter: alpha(opacity=15); +} diff --git a/include/javascript/yui3/build/slider/assets/skins/round-dark/slider.css b/include/javascript/yui3/build/slider/assets/skins/round-dark/slider.css new file mode 100644 index 00000000..4f6ed61d --- /dev/null +++ b/include/javascript/yui3/build/slider/assets/skins/round-dark/slider.css @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle;}.yui3-slider-content{position:relative;display:block;}.yui3-slider-rail{position:relative;}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute;}.yui3-slider-thumb{overflow:hidden;}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail,.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-left,.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-right{background-image:url(rail-x.png);background-repeat:repeat-x;}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail{height:25px;background-position:0 3px;}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb{height:26px;width:24px;}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-left{background-position:0 -17px;height:20px;left:-2px;width:5px;}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-right{background-position:0 -37px;height:20px;right:-2px;width:5px;}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb-image{left:0;top:-7px;}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb-shadow{left:0;opacity:.15;filter:alpha(opacity=15);top:-47px;}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail,.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-top,.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-bottom{background-image:url(rail-y.png);background-repeat:repeat-y;}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail{width:25px;background-position:3px 0;}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb{width:26px;height:24px;}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-top{background-position:-17px 0;width:20px;top:-2px;height:5px;}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-bottom{background-position:-37px 0;width:20px;bottom:-2px;height:5px;}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb-image{top:0;left:-7px;}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb-shadow{top:0;left:-47px;opacity:.15;filter:alpha(opacity=15);} \ No newline at end of file diff --git a/include/javascript/yui3/build/slider/assets/skins/round-dark/thumb-x-grip.png b/include/javascript/yui3/build/slider/assets/skins/round-dark/thumb-x-grip.png new file mode 100644 index 0000000000000000000000000000000000000000..858964b82f0222f5348afc18eabc3e4ec10d6824 GIT binary patch literal 4365 zcmd^>g;Uhu*T+AEbfgvbE5ThR7r^#hyVZ}Raa9o!1#w4QzyW|>=XfXnHWdt zre^910L0Y)85WTJ5p#k_*9i>P({pt7a`kj{bz@NngIU}>TpgU=+5>>^64DR~G2Ek* zxm-I_)Qk#F)pRwWC15d7j18tq=Hy`|q|k_B&0nO|@1ayy#$_DNi^54r2#%xG=Ou|D zTEO38El3C}jEWh(-Uujk{?>lEGjZ26FS}cLifov|?dbX)_0PudU8@M0ZnGfx8H?#|J252^KN^p!c86kHoRcd zcf6nmhF~eYV3)fBjw4*h*Ti}6FJm3*$>p1XyuBskQ@8)LQO-|lSzO%S+FH=)S2VXC zH4eIi_F8ru-@g3|lfJn;|K9n7Jw(VNL>2eyd++#}R`KJh6vA+um7PS@n`Yws8>ZQ( z{pvO?COkBo`c&=-O4)IzLd8#`6;rqeIA-qceysCez9$N-b=0E;OG} zn0R&nxCDTcHrJl7Tm(45j$s>9KKI9Rx2ky@K(K>)iaP+jR$}Lej5f#(5deTvUI{>pMmw z+{pNQjXsmfxRL*}CdlpKY7ZgARTw6qwq{+5!m^1mVM`#O&x*KW?NP&}ie+aRiK5Ye zs+laRCTI`?VKGu;I+5|fmVm!fX-$?I282RyBHL93Q$yh?wXk?Iy6U*QIQsGFxlqd@x66pT<5MQ|etpNXEpJLq$UP6TJSl!b~l8Qlw z+Lx6$ZPDkpQ*}PLR3XaUgkrcpiY(U53Th@=COQjhr7VxxMJSgD#R+l3^?RQ^MU-kb za<)?b?SE(^BnUTA<7N9sl}HVu2#5mri?dTjgN2^8Bw?%96+vdGW>jY08L;i~mgR`3 zF|Z*nIKW*Hpm9WR|~etNZ1uBI{T zWPCB68QW9+neh|n%!h=p&zpHJMr^k7i>Z4M7CN1rIWJv&get zjZApZJb|>yqeN*MX`E?{JRnF}c}e+NIkC~H(HJDL?6qM~wTh9j;bs}(*Ypaba-`mY zA)_I*OsW)K4lQ+s$Q8j%Z=>-{`?UIW!A1Icb(Wj$gDk|hj~aY=S)EBMBHxFI_H))v zECzb>v}N8hwZ+Pmm*q=on_(jqv1_Y3af_m3S5MIH$o^o9vq|gD!)GoOqn9 zoSNGE+DF+2+ASsAB~n^aT0;}#69p6BvP5%a1m}fzb9Qs)bJm-!%zVvw(WU6m_UiRp zW+kRa==OIJW)h~wCPro!4JuX0Dvob$Rc$CrRErKmry}s1 z4LQAsrOP!(VnW(O@%$b^bLc*>u*oX5r0Y(a9*#3>4J4bpiR4MAX`wf zan*cnbFokPrS&nr?1ikyr%l;SY4J6oHB-xR@$Tl~<}uwq*Idhpb?^tad%Ju8`)L3b z%z*{Pi4IW+F~`2X@(*O~N|2LWw!f%fJXDCwYf+$8NDQqC-R`MkbsYYcRKm?0 z=|mQx2mAT$3%>P^b!;DuJGvj`Mj89x=TWV*aol+KIP-wG5wrF3x|C)7S12}FLqOuf*jplPw`s0HvV9%h{r zH6CsMlwZm1qJHcH!o|GXE#c3~lG?RMwN`T^bLq0ZSzLr zbjQJatkOQB{%+u1Y%_>C4S&SBA*u3#DIXD9vE(PjjBB0;zaDCD?9eq4Jt~o2k^6k& zaJ*r3IZ6EE@u&Mks$Qy%6m)TpcfVz#P1*;~BVXcGN`H<)^SI3E zRva2WMIsqxX`^GRX_o0T zXg@4)t@v&;!d*wZvQ|fQ7aV?g_b$gjC&^Y+VI z*^$m=BP=8BIfps>YxV1fOS$Uk^1Z9{YZr?u9T)e*A)FbUTYNS$^nAJuZS7qWu3s{fN-lZF1ypX}&pz>Hf--^LC}y8z ztK=AFUz^*Qx9X0|PJi29^S@DDenS3HMB3C(;}kODw6qsGi-4X?#Uay>K`{QmD^|+| z=zv|@$@MqnuE(tuUK=yY_p!TD?NXDkPCk2`)Gu#S8-F&=u938K+4tI)zC+CF4z+!3 z%dT#D<=k@Q-_aD{aJk2rD?Yh;*5UVu?*7|cu7u2L$Em;T<-q0nI^8PFN)&RqJtg1fP5dO8s7YVKfuayoN5KjS0=(d80Ye7oO$@Tg{a zuy>HTbHrCz@b%ft>%$(O6(6SK!gX@ptw5F!T=$ND>&^|opso>*5QuwRoXpc3TVcLs z%)E&URnS%dfVzahYkdSJX0cT>&;|g14gd%a1AxEx7{3Pq?*#y0-wFUEF*7Q?Yl`K7 z3IN~$dRh?WV`FtqO=o9kLqo%-yu6;C z9#d1(y!`y)l9Ht48Y!$ zD=aFi$I#G_nVDIFLdnR;XlQ8o`T0poO7`{jrKP2(rKb-J3`9moMn^|SMMX_cO_`aQ zB_<__iHR8+8WIx|$;ru$jE*`vIi;i^`1ts0>+0UWfA8n-zx(s2l9Cb%h2rIXPDw>6 zA}V4C`H$n{V_!eNUx$Yl78YDO!)6)wJ3vX?0X=-R_YHBVnF6!v&czb&%CMH6R zjBIReEv+mW7#PaR%axT?FqD;*p_`k(&dr5}h6V%%Dk&>#Yilbhfdc~r(=#$`Y;0Cm zR>~_X#>U6-@$uiex=v3|508v=c6G_i%a4wYm6nzU1;MzuxK>wJnV6UkkB;u|?{{{0 z?dwqN1X>xVWD`f5yVX zdhhM6rmhwe8j3=d1_TDMv$G2b2xw_(g@=V>2n-6+(b1`^uWxH>lai8*Pe^cccM}v8 zbar-@m6gE=q^+%$m6e5g>lpU;_YV#Ze*MBU0aM2jrX#<9|Nism&&kQj>FMd&*%{`N z7Z(?omzP&pSAYNh{rB(R_4PHTQ@6LbcXxM~!tG>vtp7{oWuRk-3IBfp6lKL_001_p zx{?CKcj?y*IOCN*&4cgPqi7dKmu049w9EgkUF3&k1yo9T5s&kEgjs$INWqFYVhzve!PUCrwj)%DA5yjU)eQ zn+IM9k_OZ_c~;kKheNJCw7?fehYM!^^d(EZH?`auRI$ZHaorC9c@9!>6st~M<(sOTyLN#J5oAfANY?{E zGObShNwO~lxun%d)ZtAu>tFDe9*_iUvkm_&(IS`N<>y)wv}H*dzsMUO$dkT2dDQg9VQN#tcA4IZGzNY13n*zud z+1!|X%&@M-<~R`dmfXD74ZQ6M$X|x8Y*s~${&otIG_!3y4(=YD+F&rJhnKs(ql+B?_|4{; zARs22EQ-X1Ly&F^Doxkjn37!;3UO6C*dy1}Ru!&NxLY}9&7U7doxryzzrAp!N4 z*+`f!j%J!_mFs;%_=lLdzO&`P56+X##Pz|;x+$fN@`K!(Au232U51vVku-{~1oYt6 zQh0Yq*Yc{UN+=Dl2f#>OW6R}z!9xa|geWLH;>J?_0Lc8tXsH3Leh&8W{phQkTcB(U zGE@W^7Mc7+mm0+cs01W{J_9NmWT@OMJ`GrlkPL9%v5Qdy9OQxWq33bx0Q@n)WUt#H2TY3qkF{a;TEN$O0E=U!tp=#+fX7BL zk%9n4AYj$Q!{Y};WCKhZ`!Iz+k182Agh-vru2yK|l~WHjrxx*~g26-|2;j8uK4Oxw zzGjV95pDC&W|Ih&y18^P000Ha%%o}$F8pu|l{lPC0*2wG$W{yG6}OEI;c{)L%tHkL zmXRSNm%?H-_fYbbDA&vP4|gdXUeFf!5aaEuZ>rP*1)H<51CRfDqh6TQI5V@hx;m}X z0W!Dlg9TqA+FoK|7cQqE3g^V5r5`K2p%Rv%niMBXZ3BmTpY9K(+=#H5TTj$Hucy5_ z=NRMe(6(uW3o#LlZhI!Eq2C@zeBzD;r3iLD9KEt#Srk4aS6Y+?zB(z91tyCWTfQPc z*5zk}Be5$)0N8JGZygt)CPz7hFAw=%?I~Yq7CZz{_Sz|)0PsSMR}|7$qufmm0BQxH zLSI$c4_jG>AJrTZ<`l`Q*yPU49 z>)zMr<>XDVN3Vved?{{+s$*}+Q22s4tskgr!S&z<(^|!x_j#pm&EAl`K^|e$#?PHv ztXs?X?bc}rtBr(sG+axVXYzL99Wlnh7;uLy@9kKy1b<`FHSMa8kkQ+t8l!H;Je$HL zIZ|5pcv5?3ZJn#BOA&leX$Zb>Jafhr0y#$Sx0i|NBHec2+S$dz@#^Tw!A&+Inx3e~~ zZ)Uqg;X)XpAm-#gnsl9XzI1jWF-S@2=hB5zTId0^ACg$|!X&s-11f1kD7i77Q3fr| zeYS1FZh|P0FODun6uU!|KZclI#8R5J>$Mw#KN=NOy(BbuaninGtML=&a;7hf@(Gph z;Hw&(33@Hmly$+;6t7rXQYZ(O)RBbM7$2nBD^n4&JWt*s4Q^}*6lETS#4RxG39bmT zf0oi~6t}Z*F3rfyfR|~N8I@^nf0wD;Da!r)UA@WlER;dDTZi9*UlWmtyPmsYGGj7d zL{r3~ulV$+Qnb|h6MJEkns19+(Qa1Wj~A#sJ@=vo|L+@r?+1%rKrUSW79DBQ!6|F# zcq#F8I97#DX-{_r4zX_hA0x13y9)S|b-H!tazt|Dh{A^njej+6zIE)fAn+1gyIi|I z@KN${@#*Ss>F=VA^&3A6ewNph*Xte}7<@lCnJt~8C_W{zk+YFAm9toHW#(rlj48%6 z*lAai(}ZdW5rWk%R>yohM|bM z4IZ&qV#%WeKoRO88G<}ER5jH6+Sy4!5LZir@>9IsarMlO>f3@wRc6)1u!^v?)(S3%o?l57 zT*QqmTr$p)A@W(s&&gpb>vik+_7FP$$mmE|lyZVc4E)}Rc&4=P$Q;;vQSGlq#RU844;0~7FExVDS#eK}E~N*OnoAB*QZ2hl6JE3|~b zyIEpAmLC3vxVFQ{B9;=-+rm#XRP)*?rP`9 zG{j+qTqg|6c3_#6A>a7|^qoUrwDyIy){!}H(?V(1B7?W*rgkh1;bNwXb=H5Qa@m!b zW8*5B@OLwr-%Jb4`K_@>yZ5zZ&!yFtlyx-P4%v^|Z>}$h=PaW_NVH&U)&^ZDf}{u=!Z( z*96|YnRubp`vVUpgX&M%PuQJlpVbhRD`QJHPcqJ2Eh`LMJ$JgvN69a!co;BKjpGv> zqlysY#K}k7nhf3l{J6~B^A(|&p@;tau4{$IL(PA6lXzp1_<;WD?CZCI<;zrK|Gefv zaELj9(EDhO924}JxsCZZ!vUp{$*qNeb4~m|H{VGqnELA+Kzbc#H^atK5&J`LbJKH! zLqt#KtnlwKfg7)Ii%vJ)_r5VAmq*pF;y2`*<#87K4aog!{MsE@0}TD;=}XrwX>17)4L{gWut|2<8HwBx(d<)O-s>I`^3dP3R!a&CHW?u`@Hx8Pu8PLoI(89sEGe3W<-d_6Hc zu|JAFYCG?VlAPR%ve(7tc@cQXc8D+U?&bT-{>r;7Vj(9J+f%ratdYXZ{mj%B*Pu@q zTi9*3FZiyut_MGQ{UpU-96mqWY4x4+<=FeMc++q-i1UrWmBVS(k;!n;St?s<>JU#0stx;08Xz+eiHzE9s|IZ6#zUX z{Za3_r@ZXc0045}nI1%aXlSUfuWx*Oe0q8shr{*v_YV&blaZ0Fudfdb3|w7Z&CSjA z^z@93jLgr^cXoEZc=5vC-hN_YVrgkXkHun9m{RxlV0 zZV<=K&8?`YxU;isW@a`%F>V4eiI0yjEh+W&^+mmT6A}_Kho1`%58vJ0n;4%U5LTn2 zB2`pW0)v7cJb2L1&~QQ|Dl03${r7D~Muwf8ors8tj*iaR+1c#OjIglq{rmR^1_oiU z=S)mYP$<;V$+57oFh4)PuC6vEHHDd(8I4A#rKRQNl#l^*qjE?B&>MkuWIXF7F zxVlhNQzH-v1qB5;Ik_iKp7{CsX=rF{Zf;gpRoUCw3knL(OwTMXEk1kp%*e<{Sw(qd zWEcX0cq5T8IBaTaYGQJ-q@-kpup%ofo1LAFZNb*o);@Z!2nq^9 zI3SXflarE?u&vn9u~8o%q>GD-tE+23V1SgA7I_P-kb?93CGN6Lam_ zwTp|3-rgQK9F9VvaJV5>R@Q=o0vj8f^z?LWYwHjW=kM?T`t|GnzCK-DUFdUYSy|ca z?5vcO)X$$kM@L6`db%wv%uP+CK0ZDYyQD?RBq>fpjszPC0}=xy z%$ApzNve@JA zdV++|@$oT{NIW??IXyik6-CmB1R<#k5)vf5r(2Fma{|mFjSWml;s4JCgkLXT0Dx;O z+G?s0zu8}-W0~w^Oq9RnC9}2pFgq?Ob*?oSSN#8N-`zK3(Sygo+)~HJl-vUUX<5V* zEwQXr9JD9UfTD-nyE4ixBF&cGOMi-6)q`oGXG_gm!~DA2FNX|SbtGys?3v&MGpkd< zZ?Gc^5PFp$?Z5U48BgGTrX^>ww>2J59hTmJ5Ois@L|cE9mkMZ(rtj^b7_7dXDu@52 zsaBkORU3lh53FZkrzs#(cv#~Np_ zwpcElw|b4oQL|O%TwCx7EAnj7c9Qx`6Dj0r(8;J)j7*Q$nxP$*IW)OG!4m;W-Xx?? z#1!OPCM^hjP}Plvgj3{4*7uIatvbgHpCWyNlQ>nHDLSb%6a&BM*X=IXZ`TL?TmJ+_g%14~Q77+= zoYZPMoq6aVOBwjBVHy(P-few4n=vbXWp`SWn&|arVqpV0#vI3- zZr47m*!~e}H_Glg3}D=*+M4T$E7wTxBC*6m42?? iR23bk=$eK&5eL$|7cI<%?>+f%0=3l*)G9$%VgCb|i|t|n literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/round-dark/thumb-y-grip.png b/include/javascript/yui3/build/slider/assets/skins/round-dark/thumb-y-grip.png new file mode 100644 index 0000000000000000000000000000000000000000..2773a4a9f977065c5e69410d6ff5d95644e78373 GIT binary patch literal 648 zcmeAS@N?(olHy`uVBq!ia0vp^olO9@DVB6cUq=Rp^(V|(yIunMk|nMY zCBgY=CFO}lsSJ)O`AMk?p1FzXsX?iUDV2pMQ*D5X5(0ceTusePU%Y&|Xz}8Z(9oMV zZ}#-|9z1xkxus>#o;~jF?x|_1lO|27s;=I)ZQI(lYp2hc@%#7hjhi;f$jB5G6`eVA zX2r^ttJkcVzhJ@o_3P{E>o;%NvV6sg_KuFF%a#Fc0D_b+zl?#DLP?Nc@PGV(Atpxp zEdv8%lc$SgNX4xsS8kRqQ4nBDh+4uBnWH&1wC4Zzp1ChQ(_g0We7;}k_fvMmf)oEV zlf#yZ*uB}$`*VlLA{VnhR`w(RCuXeYiiuO6koD>F@~`vMC(Ws>-+SPeui4kX9uwyj z+*|Ygs9U_A=Src_5TCR29%(+$+dDa6xi-U$6!nQg3=gKvYstIfT*R|}Gw50!k7M35l}v<=5Mtb-r{%`u0=P ziu}p`*>T&$JipJ;7Wjlx9xf=+D>=RC*SgPkOEPtX zws}liH?vSy@_A2Tm_)dSXZI7fIsL&)4SWxEsN_hkEYS^GYBbyCX`c7&t?umRzA3pA z%iJ?9(uDPoUw-Vf@v;8Sy`HODF6A^e+&=2VJ$cdb}r(zN5CwvJNl#9lFoq?4|3L|CA0eEECvn TRh}Yi4T?ceS3j3^P6lO9@DVB6cUq=Rp^(V|(yIunMk|nMY zCBgY=CFO}lsSJ)O`AMk?p1FzXsX?iUDV2pMQ*D5X4g~mwxVE&k6c-nFcXw~uvL!e; zI3^}$^5n^f4jnQxGdq9&ypNC1sZ*ycEiGrwnsxN((bcP0U%7H6D=X{5g$o)Q8mXzN z&z?QIapT6_yLVk&T+W<1bLsM>|NsBj)zwK!Nj-Y>C^t8^va<5syZ86*-AhPF`19w_ z)oa&IoH+6I>(^ViZn3hmK6vop*RNkMU%p(hV8N3oPj1|}e&_a`$B!T1zJ2@b*|Rrq z-V6^9x3jamfB$|)M#k~u$1h&IcgXTRG_-3rr{-V}&LBVS7K8YQ1+o~ttUw_W^*MAS!35heAWyBB6c-->nviZyR z|E6?JRV}KHv7d4E#7aYlqe?G&tMnZ^<8y0+Et8(Ed#22BLh1S0D)qIMl~b2p(#U(Z zBrzm$fqu)mE3S(^+SPfuepH=a*ZNb%ZHnuq{DW)X=cPUGIPWP@Qn*84*2->|umGc@ zF-3*;74xoVNBBKB8`N>BdrCp0ZO$|PPgC9`$QrTsXSqbEh&EJfmT#OMd4JWbmnpoK zA*^C6nID+E|2!e`YHg(5ZU0l;CNq|(HQboGp=iat_pf&8<))hOw7X_C_q~tx-T3Cy zMU&^tr_atitJLavJT-6r+&9PX_TSYry}Q8BNvu<;<44?SzpK~g-_F`JLEw~$dYlho9m*!oRZ>u5jKkmil@?+J1YQDLY&^Eq(dca5U1%%q*V z>8ng9C@6%wwk+shSbz7yb$Jf~Ar3{S$1U8)@33ETao$^cOWJk`xBL71YIm>yD*3f3 eX#MN?Ogs!eR|*fXn3pUBB@RzlKbLh*2~7aqJG%@3 literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/round/rail-x.png b/include/javascript/yui3/build/slider/assets/skins/round/rail-x.png new file mode 100644 index 0000000000000000000000000000000000000000..62a4e92d6cdb1368f7b3d19925e0886c82f8ce73 GIT binary patch literal 3642 zcmV-A4#n|_P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s_V)Jg@9)dY%i`kV^78Wk|NjOC1_uWR2nYxX z2?+`c3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~KSc-#00006bW%=J|NsC0{{XYUq`v?F05?fQK~#9!w9TObz%UHN zz>i+uf8}7a6qFp4GBY!I5rC+=Y}@9&^VI_oRG0br3y`RG*|xa@0MqOQi)&haDgXcg M07*qoM6N<$g1VsKQUCw| literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/round/rail-y.png b/include/javascript/yui3/build/slider/assets/skins/round/rail-y.png new file mode 100644 index 0000000000000000000000000000000000000000..86f0b8ca2905bee4bed4314bad9365a971f1dd45 GIT binary patch literal 3637 zcmV-54$AR~P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s_V)Jg@9)dY%i`kV^78Wk|NjOC1_uWR2nYxX z2?+`c3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~KSc-#00006bW%=J|NsC0{{XYUq`v?F05VBLK~#9!Vqk>;CKeVJ zW>!?dz|73dfF{Po!omU<#HINmiDVB6cUq=Rp^(V|(yIunMk|nMY zCBgY=CFO}lsSJ)O`AMk?p1FzXsX?iUDV2pMQ*D5X5(0ceT(@l9`s~@W8#itoI&^69 z;>F!PJ)xnY=H}+j&CRDypWd@)PkMU#uV23=Po6wu=1ey?x9aNZwd>Xumy~?`_)$nm zXvNBvtJkdAuwlde`Sa`Q>zA)s(ca#^Y}vB@2@`-e071bbqfWOrL;^VF~x`UWpEx|dCPrOLi@r@DpI!9Xsq%d5gQ_f|J3clqqv zxI}`B*|V*P-MrFj;}wbT4QJQ7YWx-lHT-)PZ<)YfngyMoTmsNyGH60IXuW0AA zT_zjss&{6abC9#$Lf@6M)-t_m=+3V_%-NA5AyYH?7 z=Lf|NoBQXiJnozLUis_vZ_#$aUnUko9>)u(|0ejJo0*Dy#A}It@(O~w1&VD? LS3j3^P6v}mh%`zg-O>$1N;k+L>CoMhLr9l^ z5`yG=p1yHVrI9 zPKx@j06_BKzl{TAWPyJWYuG}enwmC_ZjP=tj!w)LT462QW-xp~1RtitN{5Tl~fZTW*aN3g_k5Tff(NU2YG`R`y-Z%WaC+6nsx0_?-PSOCd>gG3b z%fnyK;Qt!m-~KlL=^>uY8fUllQ0Hm6PoBm z&ey5)m0ZG!;?j&TyMwbefCx{fpYVYh%R)Ggd88g|3?W^5$OTJ>A|6!~8}mRoHSCE> z{0l_^tw=btjv~{sgv&poVMg-J@vr*Z$6f&ncELKVlQUzd-bo2saqk$?+tyMCA*6 z^Zmcw56uMy!t@k*SZAnWAMjIpheNwxvQb4q1v#4H{!yy^44NsL@Xjfq;bqDv9nradKR1|$5{P|0P{j}|LigZUE zJ#I9&4^8|aak6qUdom+8KfJW8sBF26MCU|j2p(JdM%%YaUPnlKy_D#CO1VxMN^@VE zQ5#wMx+JU&S>gzn`s}BF6M?VarP`$d{S3>kHCb=%WhSwpulL|#u_G%FeIM|mo4s~q z-sb~%OWF-nOO!-eX`U!lNLdI`uXU1SEk&@N=6sRmrcSiYS)6*}7r9J*#I?r7SR}04 zBw%G^SC*2RqF1h14l7sKZxg9HC`J{v$+hTT1(3`1DRUTcC?I1;@1eG}=e3uLiHm8~ zB*f0D_{!`G8S`3X-M={$AEsruzwysjbu3=?Y}>wk=c0!^e`2 zJ{0eH;p`~R#NUVg4TBnYNka?GlFd?AgX5bf#0#e7Kgm->+x8l*v#s0r+V>W)V9zd5i(${Rx;bW`N z_Gn)-q&Xe3v8Sr*FtIJsx7qj8jRXN%*gSbTlL3>T>lYVlF|N?_+fa5pb2eV}nmj{g z)@ODelwhk5MGkEb!xnRfg>$&F^@Uu=yZWI&V4D+CBss~??N%!MG@u#*$cAlJehdD1 zMCEKvW1)N5x!Dn&NpM zkJ^%lX!`BUj1!n`nMHN^k#dBDg&;zuVw}SD7$yW#U${>!LS0v6FJ)6?mot$98lu&_ z$}hMj%lO`kFT89PZkFohv(_J;)6Z*8cL{Cu)8hy3Ph*HZJDEC>PxvQ9Cc@{SM%<6p zj}^Jqyb^xKx4!UX>k%sC*=!2tD2;1XB~x9>6w9W~_`qy0C?VD+5R?!f=L{)hQAU|vlk8%hm78>e}sQdV+~u+ zZzKoWu{t<9YSY%!R#!?__2*Jm5oNmY71=k zcaFo#R*hDZQ|SYldFWEuw3OlP;@r{V$F~^w+>?n#g>(Fnpt0Ndvsen~z1Z~Fp-{5W z{p?qgqM~b3E;qZ^#n3U!G4^b_+x*+1Dmq$zzl-Vp+0lu#iM-U~)WmQ0K7}`Xn0@+c zY;R}ppAs?u+hBM+GYs8XG>$A35)A{??vpj~8Dh(kCX~;o+v8Tw4h7 zV!`(&9#Te41^{Yfe6C=L;F;M%QA-T~yq*Gpe-Hrty#wnm0K9(=0DGnYAO^ls=^PVG zdgK8B7tmCN%blK{uCA@Zv|#Vvy-Q3?bai!2PfxF^swyZb7#kb&^YgQ|vg+yS85|t^ z{{6eLv2kl_>($lO*49>MXXowh?cChl`1tts_4VT7qN=KDX=!OgL&N0cWL;g|@bGY8 zV4$d|XhcLrOiWBjNJvvt)8XOK#>U3-^0KF==giCurUTR8-@mZ1U}k2vySqC#H)~^K zGdVfY*VnhczW(v!$3K7mAP~CWzJ0@Du_GfRxw$z%e*Bo2nDF-T0jC9*w6wI0j0^+< zfkL6Ova)h=a`N)>3JMB}ii%1~O3KR0Dk>^qV`^$@>gwtm8XB6KnlKnlOG`^zTN@6C z>*(m{>gpm82t7SLeSLic0|P@tLn9+2aMCw#-k6w}n3|e`y_uVvTUc0FT3T9JSy@|K zBauk3Pg`5tw{PFt+1Y{7+1uMYI5;>uIyyNyIXgSMxVV5xy1BW%fB*i&hY#-V?j9Z< z;K*KHUf$kd?>@f1zF@ZCfd2me0RaJEP(eXK!NI{`N}-{lVPRq6;o)Fzk&%&6QBl#+ z(Vsqj0yB(_jg5%rlqBU;4(5YGBY!?va(PpRCacD zPEJm4Zf;&)UVeT)2=w#k&xM7BMMXu$#l@`{Rz%F0R*dUbVmO-)U0 zZ7qnezP|p;moFeqG#cI5*!cD9R}f!wb8|~e3+O;wTU&d3JIDot!E|(VfHHJ-b#-@l zgR1oQ_Ja68tOElBpf*E8L!b#DyV226&?wLr5FcpB)YKGc)b#W;sKM;)EGW|a{5)s^ z2pV*0X=w?RWMyRq#J#$@y0*3k`T&}hOomGLS&RK*BS{N;oA&$^Oks z8Qos=;b8WBBkE?wPe}CIj>U%P(wN!f@%xqz2lni|XfcC~Pi1=*wFH!cVllr&8CUZ$ zubd8ys%XQIF<;eB0EwhN>jS8tyg?w-vi$$@X$@E^O ztWz^<>)@$X`~1CREi8Qt#UN3%XRVfi$i7#D@_d)gl3UDlr!dJ>cy?+4e~Up%VPE!j zA@=s)+k3%=TuS-yDi3^#rp1IEiW*)%3NEy}bkLAC{to`uW^5WFoKK1h=O3qpoVZtn zn6}pNC?FbP$_#AMa1t_m-WyoSJu8_RGR(nVcFZU*sJyFgd#`y=;9E<&f(!6pScmS# S+H?GOBPq$L%T_^51OErntx=l* literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/round/thumb-y-grip.png b/include/javascript/yui3/build/slider/assets/skins/round/thumb-y-grip.png new file mode 100644 index 0000000000000000000000000000000000000000..1bf7ff3e4448befe4f777c2c123642dba617718a GIT binary patch literal 731 zcmeAS@N?(olHy`uVBq!ia0vp^olO9@DVB6cUq=Rp^(V|(yIunMk|nMY zCBgY=CFO}lsSJ)O`AMk?p1FzXsX?iUDV2pMQ*D5X5(0ceT(@l9`uxR<#Y>hPI&`SJ zrza#d#N6Dxxw(1I-o4q`*^?$uK7IQ1uV261+}vi(npIt0{qf_+wd>Xumy}$&a^?2z z+d@J@D^{*ty=KjZ4IAp}>*vp(zij#P_V)I~#6+MCK;ZCC^9hhrC<*cl{*NCp#KcIy zWnf^u>gnPbQgLg^)r)lApE<#%`K9g!|r z=WbnB7&YgcvhX(Xl~=Da1T9l&PTABekvG@x{qh&@VzW$nrUWrOW^GtLCApsc;XkoA z=YmvcuQQcX>TF|(Jjrz9&XwzL{gn^w^OduXgP*4)qLretFZv zlbbu2*L<;HTeET=lm&kk%Rhd(BJy+QpBej_Iab*%T2t^nxv$3SiPdpgRnKU-mBshf z@@v{3eeM2me&KTE;LFG5m)yxLU2|=TNBN!~f(Z;Zr#8;rbfxwzC{cL2`njxgN@xNA D9)Mw} literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/round/thumb-y.png b/include/javascript/yui3/build/slider/assets/skins/round/thumb-y.png new file mode 100644 index 0000000000000000000000000000000000000000..a8a0c620233f052a3e7014bcf8b4877a24ed8795 GIT binary patch literal 890 zcmeAS@N?(olHy`uVBq!ia0vp^olO9@DVB6cUq=Rp^(V|(yIunMk|nMY zCBgY=CFO}lsSJ)O`AMk?p1FzXsX?iUDV2pMQ*D5X4g~mwxPJNa<>8};fkA;eIXROj zPcAMlo;h>ox^?RoFJ659{Q0`Ny0p~PqeqXPI(6#Gl`FBav3vIH`ThI%vuDo^9Xj;y z-@h9-Zd|x<;m@BxckbNr@$p%?a^=>oTQ6O@v}x0(GiS~;H8ojUT6T7J_Vx9(wzlrv zx%1t-_fMWYxp(hgWo6~HYu64OJaFQ~iCedBB_<}meEIUmjq4d18J8|yJbwK6+8RL`xYJ^wtxTr+qZ9@J$rV+g82^~Jh*uAVs%Xo&<8+Zx2?+_NI8@Q`33){3@{w3 z-sr->!1%?}#WAGf){?6?i<%51SQEHhcqT4T3}kVf7A2mwv}uRpzW>ptWmb!?dAL`% zN$dSk`>Af}as2fK!MyBQyH&pYNLcdvy5P1ub59AIn*X1uG1E!C=Wqb~WP=jxt?^|# zv3yLC+pV?>ZJjClHsPD&o5(40kJ4nHvR?IPdheFhw!BZ{V01^kQ8=UX^M7FhrGhH4 z-ZP)Cm^;sKbCk`o=RS0a{3Ns3Q${$~c`>OJ@S z-}1&WsZ2?ks4`zwo&AEjLR`)<{m5x=bN9Gu2zfSoaGkqk<$w3m`%kKG?{hr#e<||v zon&T>$KjRnkIH}hMtKJH|EO%db^cA?sskmbFVAwDl78jtlbz@0&HN$A+;Z(Mqp~cY z;14VPXZJqN3_g&)ZpMk`*lo`*-^*HIp!_lR=j)VD#{z>lOIW>DiL|b2oFZ|5=Yje= z(}b@&EYq3YmGtfRvP%cby_f!Dt6y$wxby1tr%XFcO~dbN+4o+^d%_@d<+^Ka=5@2X k$t!d3AOG~b|AXoQ1}U|)Hn)k1Z$N3v)78&qol`;+0A5PftpET3 literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/sam-dark/rail-x-lines.png b/include/javascript/yui3/build/slider/assets/skins/sam-dark/rail-x-lines.png new file mode 100644 index 0000000000000000000000000000000000000000..39ac404cc35b374e578b6a29ab55f3dea65da302 GIT binary patch literal 3647 zcmV-F4#4q=P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s7Z(>UE-p||P$(!U000051qB8M1_uWR2nYxX z2?+`c3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~9huu!00005bW%=J|NsC00QKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s7Z(>$P*5%|E+{A{000051qB8M1_uWR2nYxX z2?+`c3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~doOI<00005bW%=J|NsC00Q!NfOz%b!&K|MmHb302;qJ0{}I=1EZX;u2uj5002ovPDHLk FV1k?N%F_S< literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/sam-dark/rail-y-lines.png b/include/javascript/yui3/build/slider/assets/skins/sam-dark/rail-y-lines.png new file mode 100644 index 0000000000000000000000000000000000000000..0553faa9a5570a19afac705ebfc8f8f3ec5d7f72 GIT binary patch literal 3640 zcmV-84#)9{P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s7Z(>UE-p||P$(!U000051qB8M1_uWR2nYxX z2?+`c3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~9huu!00005bW%=J|NsC00QKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s7Z(>$P*5%|E+{A{000051qB8M1_uWR2nYxX z2?+`c3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~doOI<00005bW%=J|NsC00QNu7yQAZl{b{QzQJ zMrt%3AhS0BKzHlEA_LMh?*IU;fs3lDp`kO}8~(-_?!l?0s>*JaO?@MJEc8qysl*rRFqNiAAs=c?Gy=n6;z0a%NeL+Ha_VQNRH+NkMMK;lM{2>N1`2RD9% z_IC9wuL&y!)AD!#%+$3GTyHM8$$--!Ik_hf+o)OqGT#Y0YM@OoqwVSa$SbBDl{8B- zL>O6{H}aVdHG&0D@{d<30F*Sy5SUb66Cj%cuo<+sTLlb-0Gr1jHYNZB<}@vU46sPz zVkOH)0-U!TqtpQB=Rn!Wix_pl^eMpNq|+q>%m@KbwV+NQpsF5d!!y&>0MzurQ=_PG zet;qXu<7IG_65Sy02YlysNAn770jCgBvNTLayT9t^}?d(=B*GEb{lmKAa zJ80}uP^9)A;yES4{WAB_K85p3y6m^aSf?5$r8*#cdk%W!@gE!YoJ8F0?E2c;jCPlb zh3x<|@DkQx-3GmQ^(RQ~oOtr1WrZhL%qm!u;`B$y(6Mg*{gF>JVRrKy37Y5ibXVsb z6A!zz>~N+6EUQL0J>%8Veguw%~ioMhTpq3ph zP^HX%+e~k?%?z5^YA# z5hxEv;SR_*MtKjWzqZs_?R-taG!)8x)VFN8=Ay{#VobT?soB!PPr2Gb6gOjeIQyem zj2`MBB|)ObFzYiYrA7ntc^@Daavss7DVh{qV-9Omhhes=ZI!w(d}gcfEQl+|#L2{Y;PsWj|Q`u#CR6 z=U&x|GV;dg6Z?^BABvm7>TNVq6h11Pwhxp+rn;v3GoT{Q`#cgi=4hm8$is{}9zR4C z>3rpFxbdg!j-8ljq$x;{d+KJwEfMB`DAg`$o}1CCVvli&*R-nhz~eW^HO5~Xb8ib4 zXGnnVaijX@9NcQCWRe6qpY(;VVb(g=#Mju@xDG97F?LFxd8Z~Te8vN=+IQEP*Co~| z9aF`WAz#vs7m9MgHzX6xRmyX)#+62qMYkm0rppY6-qzB|FV9V$xaZ8~OmwN-@@}}X zko-U&JqjHk+}7MeZ;>DS&@)7^hW19m`0i%hp}GUR>vN|vRkz^oMC{#O@Kb5g-PFxA zrZhOjQ~)dRo)tMjo2;G8o6IgC0xm8oC|N9_gB(Ey!3o7LO#&-4AmS#g#WdejN+Bf} z!(9`06Ik){qR0|h5ge?T7i4x3O=;Gt+i9ShXOvxSz1q~nNoRkz)>n|rjiEH+ZLnk) zZ}sr(`*#A3sTUlLvGOIwIWnr^+Tze!vX-8Q zl0c8YBiAkI376v#=_UL!Qnl(-Qq8wbwnZ<8A#r1JUnVs^YB0sQ^jNO)th)EO_k7`{ z7(>Zv!-C3Rll(P*y8%TRqHd9 zgbJ)XHqaJk#|EqKuISuHHKPI>0zY2JQ!zx&GL~|fa|FHl>ct}aLUu77pSiCX*nOO` zEdnzgVIG+gU&Y=UJM#o+ep>khp-(^2?{_~K;XZ|cR@i(KLeX2i<*2fg-J|{nQTPh1OP&EjK)opT% z*oz>c<jtxUk2?iA}l;x(gYyS+~>Qak`7i%QlOKenKXCs+4f) zp|G$W*oM=)!7|72n#=CjvGpPklBxRLY7@(@n+efkRSLGi=6urvR5dV1s8j23^ngrC zY1WhBy`kCxLZWo$!RM>Jn;kcoKVkDDbf7{UrW?&=t}-=po_++{Ro3fIB3@9I$$g8# z3b;=il*0aB^V54)2BsorOLew?BQWd=tkE$Q zECe<*>xUV>dEa&RNccc&+I-U2;?gdh!-&(k)Aq)qP?iN_N(p)c&G?#OcJ3>~(u=Qq zC%@GRBIsd0LSraa75Al8?pu>%VLyKOxgt0Zd<^~zmf9a*sI#3ueLc3%9?~kno>* z8$vENVACGI{-(Ih2v(wU$?KOCbMMZ7n+a!;lys@$j`NIgAoi7 zyIIc^WMozpy)L%T3spxPMtHN>E^{vjE7)#}1f5RqPUFW?$8ykzXjH5F`}~WYw%xmx zgr1I`2QB@+;-W8)U!3i=`^@`r9DG?~GFW@h`GN1s`A_wU$!Osj>Mja(MM0i=bZ##$ zL?Hb)DPYQa$^cLu|NhJfMVdM7LB@Ij;Qt5!5TO9@=Ze&~0pRUZ0NAks0NGRkV1s|M z?$!VRa==g*tS%}hSy));;`%BgBFfC%5{*tngoMU^{OIHBk3^!(EGz>8Kjh}-GBGh{ zW@VL?mEB@t1<0<6Nk~^#R;p=g*VNRgsDbnijlMNBczSt%{rWX9@Iz;3r@e!drluAI zYLT0l7aRN0$H&*p+xwL}JOzzTNlD@6$vICXy(S4hRI&($dn_*4EL{(bd(})6>(}*EcXQFf=qYGBPqYHa0Oa0fWI1 z2;{|!7f>kF)YR0>%*@=}+`_`b($dn(%If9Im)6$SHa0f4wzhV5cJ}u64h{~Ej*d=F zPB0kE+1c5}#l_Xt)y>WA)vH(T?(VN&zlOu%9v&W^o}OM_UT@yK@%Hw9`}Xa-ckg^i z`F(x;{QUg={R095-oJkz7#J876!hW42Lu8U92^`HLJA!k78VvB9v%@95g8dtA`=}Q z9TO818yg!J7x$6GB0fGLAt5o56cqXC(VJs^vFE6jCs31A5 zs;a84t|n=%t*s^5tgEXd;jOQ)|Mu-04u@-KXlQI~Y-(z1ZfFDSn zN$=|FBH8Te=^^Rs>+9?9?;jW#7#tiN8X6iN9>(MGBO@cDqoZSEW8>rF6B85Pzki>c zoSd4Pnx3AXnVFfLot>MTBM=Dl^YaS}3yX`3q$Tgwv++S>a1`o_k_ z=H}+s*4Fm+_Rh}E?(Xi-pFj8Z_V)Mp4-O9g{rBHrzkVGa9v&SX9UmW`oSgjr{hLT6 zo}Qlm`Sa)R-@j*PXXoeV7Z(?omzP&pS4-ytz5lI?x3RtnY5ad2AoJ&;4e8B3Ej4AZ z@7(;Drph&Cmaye(=1HT!)s*N{$+dg#1MN^^D>7Dkm0t5s>w-1mT76EUJG|*VVN3F` z20JDZk0Q%+Ux>85gOzh9Jom!OY+g&?`FWV1L@gNo1N$93eSrwu&fG6Oq2L+XvDF-A zQtt3pbS?2>yvf@#2MMK1d^&Q#D(O!_Q+rxmQYZ>a9jT3weMU)hBuOwq!#O=`_zPQ< zJ6heQApu(`=70FDWBzVlx!vfm2Z?d&Ait_#Qm&bV&1fTYi3dPA4tOVSpGb^X9ts^oj zX8QD*4NcA6y}jiXRTC#pj*O0}uB~6RXc0fZz?^yW)~s10EF#Ll$Yf+IPQc=!bb?%1`fu&89qmMyil^@k51PEJX4clQhpk6yH7Nq2W|d3i-qNl8v_{tOVk9>+GG}w{6=N92z!Z;>0COm-bDV0Q4CU z=>Cvl1X3O)L4LvisRJ11y!n&>G;@omi(^Q|tu>dA3pE)CG(2P|>t$nkv-kVGYVUjh zd!IBIcNw4NJ6wORZu%Rchdo)0yEmO;wfgitX7|nLdpBbIo~QeN<-2$)Y!zSs+QX~2 zO)zGe^Yp&uyr9h*s*?_8L~tHeF6vnz%kJ{kk&C;KVbL#}-c}2i(lR!&M+!$ubdDsR zm{ilmVqDwAa(T(OYuVaL7DTkk!^lP)z-i@=Sefz%g)yL~^qLt?#h%Rou@RRMY dS3V;f!FFq8lQ literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/sam/rail-x-lines.png b/include/javascript/yui3/build/slider/assets/skins/sam/rail-x-lines.png new file mode 100644 index 0000000000000000000000000000000000000000..45c84288feef64ec6f9ff1988dad84898298cb36 GIT binary patch literal 3656 zcmV-O4!7}%P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~VpjXw00007bW%=J|NsC0|Nj6QO9Ms#002ZuL_t(|+SHM;4ZtuA z!<0(Q|0j2F;2}$pt>r{`5I|V7kxn`zPd=4$L?`XtH9wC&OX@Xw&_Z==+KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s_V)Jg@9*;R^2^K1;^N}}|NjOC1_uWR2nYxX z2?+`c3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~&kn&C00006bW%=J|NsC0{{XYUq`v?F05nNNK~#9!yv?xzfIt9) zzzE6yD_i^mYGHFFWZRbKsu}>&w$0nZH!sx)ko@>nO#phf_W;WO1eleFS-b!M002ov JPDHLkV1jPj-~a#s literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/sam/rail-y-lines.png b/include/javascript/yui3/build/slider/assets/skins/sam/rail-y-lines.png new file mode 100644 index 0000000000000000000000000000000000000000..841c970887139d3ccb6ef5dc10c60a2d177a1a3f GIT binary patch literal 3642 zcmV-A4#n|_P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~VpjXw00007bW%=J|NsC0|Nj6QO9Ms#001^gL_t(|+G1d1U|?Wl zV`F1sW@SSMjI4|pVl2$83`lHj@48~^|S M07*qoM6N<$f|}CWjsO4v literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/sam/rail-y.png b/include/javascript/yui3/build/slider/assets/skins/sam/rail-y.png new file mode 100644 index 0000000000000000000000000000000000000000..2bec78ab67abb148c5f037f680bebc88da58d522 GIT binary patch literal 3629 zcmV+|4$|?7P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00093P)t-s_V)Jg@9*;R^2^K1;^N}}|NjOC1_uWR2nYxX z2?+`c3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH z8XFrM92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021 zEG#T7EiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!- zJv}}?K0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)Wt zPESuyP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5d zU|?WjVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&O zadC2Ta&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8 zf`fyDgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@ zl$4Z}m6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~&kn&C00006bW%=J|NsC0{{XYUq`v?F04hmDK~#9!Vqk>=W+oO^ zbilyEfFZ`rgb>802Zz|8)x*fl00000|NjF3SGWY21;|CL00000NkvXXu0mjfyE53K literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/sam/slider-base-skin.css b/include/javascript/yui3/build/slider/assets/skins/sam/slider-base-skin.css new file mode 100644 index 00000000..4925e533 --- /dev/null +++ b/include/javascript/yui3/build/slider/assets/skins/sam/slider-base-skin.css @@ -0,0 +1,94 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider/assets/skins/sam/thumb-x.png */ + +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail, +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; + /* alternate: rail-x-lines.png */ +} + +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail { + height: 26px; +} +.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb { + height: 26px; + width: 15px; +} + +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -10px; +} +.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -50px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider/assets/skins/sam/thumb-y.png */ + +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail, +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; + /* alternate: rail-y-lines.png */ +} + +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail { + width: 26px; +} +.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb { + width: 26px; + height: 15px; +} + +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb-image { + left: -10px; + top: 0; +} +.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb-shadow { + left: -50px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; +} diff --git a/include/javascript/yui3/build/slider/assets/skins/sam/slider-base.css b/include/javascript/yui3/build/slider/assets/skins/sam/slider-base.css new file mode 100644 index 00000000..e4bf31d0 --- /dev/null +++ b/include/javascript/yui3/build/slider/assets/skins/sam/slider-base.css @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle}.yui3-slider-content{position:relative;display:block}.yui3-slider-rail{position:relative}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute}.yui3-slider-thumb{overflow:hidden}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail,.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-left,.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-right{background-image:url(rail-x.png);background-repeat:repeat-x}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail{height:26px}.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb{height:26px;width:15px}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-left{background-position:0 -20px;height:20px;left:-2px;width:5px}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-right{background-position:0 -40px;height:20px;right:-2px;width:5px}.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb-image{left:0;top:-10px}.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb-shadow{left:0;opacity:.15;filter:alpha(opacity=15);top:-50px}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail,.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-top,.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-bottom{background-image:url(rail-y.png);background-repeat:repeat-y}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail{width:26px}.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb{width:26px;height:15px}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-top{background-position:-20px 0;width:20px;top:-2px;height:5px}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-bottom{background-position:-40px 0;width:20px;bottom:-2px;height:5px}.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb-image{left:-10px;top:0}.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb-shadow{left:-50px;opacity:.15;filter:alpha(opacity=15);top:0} diff --git a/include/javascript/yui3/build/slider/assets/skins/sam/slider-skin.css b/include/javascript/yui3/build/slider/assets/skins/sam/slider-skin.css index d489ceed..4925e533 100644 --- a/include/javascript/yui3/build/slider/assets/skins/sam/slider-skin.css +++ b/include/javascript/yui3/build/slider/assets/skins/sam/slider-skin.css @@ -1,18 +1,94 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -.yui-skin-sam .yui-slider-rail-x { - background: url("rail-classic-x.png") repeat-x 0 7px; - min-height: 19px; - *height: 19px; +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider/assets/skins/sam/thumb-x.png */ + +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail, +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; + /* alternate: rail-x-lines.png */ +} + +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail { + height: 26px; +} +.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb { + height: 26px; + width: 15px; +} + +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -10px; +} +.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -50px; } -.yui-skin-sam .yui-slider-rail-y { - background: url("rail-classic-y.png") repeat-y 7px 0; - min-width: 19px; - *width: 19px; +/* Vertical Slider */ + +/* Use thumbUrl /build/slider/assets/skins/sam/thumb-y.png */ + +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail, +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; + /* alternate: rail-y-lines.png */ +} + +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail { + width: 26px; +} +.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb { + width: 26px; + height: 15px; +} + +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb-image { + left: -10px; + top: 0; +} +.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb-shadow { + left: -50px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; } diff --git a/include/javascript/yui3/build/slider/assets/skins/sam/slider.css b/include/javascript/yui3/build/slider/assets/skins/sam/slider.css index 1b2c4a72..e4bf31d0 100644 --- a/include/javascript/yui3/build/slider/assets/skins/sam/slider.css +++ b/include/javascript/yui3/build/slider/assets/skins/sam/slider.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -.yui-slider{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle;}.yui-slider-content{position:relative;}.yui-slider-rail{position:relative;}.yui-slider-thumb{position:absolute;}.yui-slider-thumb-image{display:block;}.yui-slider-image-error .yui-slider-thumb{height:10px;width:10px;background:#000;color:#000;overflow:hidden;}.yui-slider-image-error .yui-slider-thumb-image{display:none;}.yui-skin-sam .yui-slider-rail-x{background:url("rail-classic-x.png") repeat-x 0 7px;min-height:19px;*height:19px;}.yui-skin-sam .yui-slider-rail-y{background:url("rail-classic-y.png") repeat-y 7px 0;min-width:19px;*width:19px;} +.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle}.yui3-slider-content{position:relative;display:block}.yui3-slider-rail{position:relative}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute}.yui3-slider-thumb{overflow:hidden}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail,.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-left,.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-right{background-image:url(rail-x.png);background-repeat:repeat-x}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail{height:26px}.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb{height:26px;width:15px}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-left{background-position:0 -20px;height:20px;left:-2px;width:5px}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-right{background-position:0 -40px;height:20px;right:-2px;width:5px}.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb-image{left:0;top:-10px}.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb-shadow{left:0;opacity:.15;filter:alpha(opacity=15);top:-50px}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail,.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-top,.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-bottom{background-image:url(rail-y.png);background-repeat:repeat-y}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail{width:26px}.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb{width:26px;height:15px}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-top{background-position:-20px 0;width:20px;top:-2px;height:5px}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-bottom{background-position:-40px 0;width:20px;bottom:-2px;height:5px}.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb-image{left:-10px;top:0}.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb-shadow{left:-50px;opacity:.15;filter:alpha(opacity=15);top:0} diff --git a/include/javascript/yui3/build/slider/assets/skins/sam/thumb-x.png b/include/javascript/yui3/build/slider/assets/skins/sam/thumb-x.png new file mode 100644 index 0000000000000000000000000000000000000000..4d4bcbd48c849515b83613901a9b3b80c2ee52f0 GIT binary patch literal 3873 zcmb`~jAYCFU;sb(!NQ3Zz^pH{lgLKCb(nxogbmJf)-8Hmy!_YNDNDBxk z-Mr`dAKr6ad#`JsPkXK3{o$O*4=Qp*_|NbG03cG3msSTW3Ap5OF~R+XrcpUq@EqlJ zTmXRJ>3<6Y$oxtT0Qjob5XgrQRt~NXE>;eX^a>CNy`!^(rS&HZ0PsM;HDFMUT}si5 zl~XCjh=6282XzWudUdJj0P+N8HU>P>_Yn-aixg^IPh@1UXa{p5Fk@o_Vkp$u38U~A za5fq8VuSM|qK0qQyz_16+Ag-o?i=RCcFIrSb>ldlxP+C@^vo z0Q#pE5z>IwJD`00W0VY_%?*%SD)tHi3mgEqf|jK`P~8Z0B1s8q0bD|WTP-5=HGt&} z7!NWsdH^9A0J-e3mdM{Xm83gt;G{BYMVgs}WCHbYIh=5`v^Za|A{D6KkPDbRGRc(S z?Dou{;SJ;``FS!5067U1V7DiC9!TO!BvK$2L2Sga*Ma@;($sY0ervqUQ33$gT>U2R z*}3YT1-!!!u)EKDb%>fQ;DtJDgh!hjR+eq+mOE>+p zSHZMdn~i)!jm#-lIy2^kx8P-@RO0KtS5pt>>#OWHm}0AMfodBu4DSSvVgobGb43f7qlgoJp1XwC0Ist&8G!rLuxK4Zk7XYMl0@uJ0H@l0qEf5b&auD~a2?Htu!!$~pF&399BlMD?OCF0Xnu&fWf?VyT zV!~T_9`z_Fy{0_fv8eMSp>TcKmV|eM0B_K3SeqPAa$v2R=nP>4q`6q|S%_>N!GyUh zPi7otPS%8T{WH-Rf!v*mGAj~PoET()yYm+{4qxvlZqEK5shWS;@si9&YF?HTmi0fY z{#cIL8hK_mUgM5M7AVt+CxGQHMQ`##QeIn0TV+AMnEp8v{}U9RARcCjS~ttfq+-Q- z=9VW{z0{_>JmK2%?2L0{aZkBOy(1vKf=pzQ5MGw%_(uvg-=R}vQ?gU`>WsVWC0YFP z&lr=2Q0BI^I6}$n^lt`3H{qK-n|zzJn+(T#_;6DRr|*{<>#XX-Ht%V+NVoX6ur1Pg zB{lOi)t8HNp-sw6JugltA-Da|9Y!VyNL;DXYn+u~C9IlUk-(3jeUL zL8}2Pc~=}>3M+PiihuXhxr@Zs=~3!Yg?v}bsWIAU>!&9$qp9;?XRswI3;P`SwwJkP zY|+P!tu_6Qt~FY;v?Nyu!uOs}t4{qS*-{*5Bi-rptE&p$4r@``iC@$T`O)k3*R+NF zO3geL`nIL1X{p*}@?~mea{KK9l?O%e!giTfotr>n$$|GQ`Ydv=IOJpaj>e+KauI$J zrLw5-StVzwZ2@g=tF(KEebHfh_7B5=Y$b=H70>pa>*u~)chEb#>!LF`LT&6iLMCi9 zA(C38@2!)A2p!h|`mY+qphp5yV3J~zwic4mJSmbtEBi&3B*wa5e}iemuHUXdpBbB( zfmu;`Px&xYUAejNb>TaucS-|eqhonva~W^5M0w_Ucd~Y}=Cf8CjdeYA*%8HvCJTky zP2EDBLqwZ>sIHJsfwrcuL7i*`yyDedYej3(lcHvoB$cx4Iap8iU&Iiiq>-k2YXKWw ziLgWXn!rq{V2yp1J%>r{Nxm(9*X<+ou=+` z!L-Lo#~1iE5Kl*5_gcd>vZm!=RIp~3;FE~xNX4KL&NMO3EZY9%!S>Dfu4hgLYhF`l z@T|J5?t@}<)uF(l^miwtfR0ClRJB(ar zTnSng^VN+7?xhzdM^s|xV$R<-#5P0(S9n)+j79}J8wVRlRC^qao)pk$!lqnk@FABK)tabdK@dF|qXWK2%8B!y&LP({#IR|SLB;P3bfhKrqa zWCGHfIP`LF!5N&2<>N+JZW#;Czl{DtJ2rfsnRQ1FdkK* zDvtMW*~CgYZA4IlE&MIw{hXFMqqEv@ZG}&Y&xJVIDh2F6{aC#{I0;{euM=!|Q>Aka z8aR69BD+sRizrJt$=HQcC6ppm{!RWPNy=7C8T0D+sr#!~e9vyWZrDq%NrB0T1&BV| z3zcJeHf68G-wADRJ(>FW3fQ-rLs&}U+mwiuma~MjDKp*Z?RZ6n+j)W$6XKnuN*R=s z5U@Siwx!!hxkYI0eV=`FBiD-*oFUt~`0~d(9QX*S!e3Bb)_FFZT9}2FWye_Luuy7Q z_M5ST(Yj%Dyx`ZPZx07#-DGQth=MRhEe<;E?e=mTp;{3qPc;4p#p5?&AF<0tnxYVF zcC)Hw2U=;Be(lU&%C>=qUBf|L4H&lj1e*9;p}zY|^9Kg1+FUxT4JOxNa9S~n$f!zk zG*udf{{rih#};k4!*EB&QgVGsS#PuXxaE}P?)C~twjOb6Y1(!gu|3fus-9@|WBtL| zxeS^sZHyJ&8jOH6=XZ!SwOJGmA;;c{L%%~$q1RA>!>Q#4lle>g$wON2wsZd9vuM4x zi#xHQA81VsP32k3S&JKmo4O0}%E;2)%hVe?g9;Tpr-K2^Da<<@MqydV-rxy5*wui;Gp<3Ew}t;{N6BfCA@hhFUs-j)};wAq5l<s#g8EmJ|4r>;*J~wJf;F;b`UR@agyj}r7KrjGYJ%Du=06udAz@9Mx2&V%8l|!OY zpDX}i0w0v1GBID`E-x=9CZ|?^t{om8ot>R+Y;68LKHl5g-`V+9UthnpymE7Mvxq|X z4-9Va?7-phySux&`T3@nwugs@ipuK7rq+(muB)r7larHQySv>zz0S_g6ciNH)YSO} zMdK5b3yY|#>Y9VY!#{ui9{u^#(AaWuapB?NQCU^Jw6wg4LM<+$R)7ASo}M{4I9Og@ zIXgd3PEOt2+^TOtEG;kp{d>H>|9gIZerkFq>A&}z+uJ)o*VeADuM?9}Zf|ctfBt-V zbu~JM+}+!ootsZdO&=Z^{e5r%jsv`*qN1Xbl9IBrvWkj|s;cUT4l9H0r($ccB zvhwosii(QL%F3#$s_N?Mnwpy0+SU!XNG@V$Ky$8Rug(AVM75$NmBUr@~PF{ttM^c3`betr&m1CfJ7 zK{Fs`&9!7@_&|-|yg}g0v*m1GO|MC-q2@JY+2h zqh2m_H`2T>1b6$n8u{An9m(c8&(w;diC7!&i-vOniYRA zx*=;ii2fDuZ3bh69IyU_91mAe#wULL8gtpH7V~&;*FFBs&0THT?amuOy?(s!`x9CO PHVG)ms7O~z83+9jUC{MX literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/slider/assets/skins/sam/thumb-y.png b/include/javascript/yui3/build/slider/assets/skins/sam/thumb-y.png new file mode 100644 index 0000000000000000000000000000000000000000..0b17a0ed218734ec8dc436d889d140958fb2d270 GIT binary patch literal 3860 zcmb`}pKTmH+D4$gx$@<)!y-~9RPUGq4Z%; z{Vhi6)5RkN^$2*9x~m=oDZ8FRG@L$xo0o%(_GJV|&Mbp&`)ws9BG$g_2*TJ{cnpIs zA7vEz49OZtZftN~MAX2=vR|IlRLkkc@OAyP%x2jks&<3~OG=rdDxxa}rz}>ufBQ#p zZ&%Oqnt)s&IhPwiOImBo@$QO~05}Vfl6vw0OY#jM@SdO`1+bb(?9+SUH#FM{>1G7* z5CW`c!gF;}I6WZe8>>(N$SD)RQEA-zKsFIzIcQ_O3h3|ymXAJdOaO4yS-KwqV4B3i zK#-jPu-~zZPy`$#fwGZTQA&W(Q-I!Hy-Na^;Rl|o8QQA?RSf_ZM@vxykWvCqbt6I_ z14Mp+WgjP}HxQBz&?_GpO8t3KLA%KdPAa`d3d1F#6lhAy?@nT9C~%(#r^fVzUfk** zs|-1T4xe-u;XqNEABRH#ke$E)c6)f`jiau>;lyLn)E4~PZNxVZtgTnC*GEd-e4YDnkI3OQMfUsCX!{x(xq2XbYtHb{?Z4S5<-}uVXV=%(W?ptF zm|6`O`d`C3EU<=GZ_fjyE>Dktd|TlP6gCf3Av*ifF?6Jne{Up_EW~<#BTnVAf#T+p zZQ?gRl92%Ev`2W6C{ zJ$I{Kl@T^a9@~smdlAtEDq+dQiM$lpt?tXK8fh45&8QZ!-{TU!JxBJ8j4(vE)9v#vW@}-ga3fVd&MCUMJA$-+5sizpFV9V$xa+{=aOzn3)3fRJ zLh^mB)KSCn!7Y`asXqyiyeO%{7=n8vU_2~HW)fx?ix+ccnnnT3L^Mk;^yxF9owUt# znsiqKBVIJ`M}~v}^5mDv+{vuGg3#iUf|A7&3WGy~L1Msx+G4e(hn>QPrPiB|!-=Xi?0ukE z7kBmW?8gth&1qL`&C${&#W@lXk(VNdwR(q1_Oc|aY3^s4o?2v^JcX%;0a1(e`;S*1 zvlfVIV1(?~G%*E_3nVopHF}4KhI5Cf(#4R{Les*V$W7!la;d@6#M^`qU4(A5 zQ>$4sDKOqcx449wNEqiE8JL*YDwm_mA5JxwHy7S6#AqS3O0%Y5omGF({pjKbma6p` zVtfVK8SQTcvu1)dbXRolAzBgsP5z&+q)Dj4XQ@lsOxOb6)p^jrc=cj21DClc>)(Bp zvLy&J8lfGT5m`mw8GPL3h|)(+sKA(Dn0LX45z&$AL4yLRG6G1}o`t^FwU?g9?&izB z`2w%A;zUR0XKL2G%^vmNcW07~GoqdoWy6a=I6kn2`IxUq2XhXCEVfCAw zf;NH)hUL>$4f$Rrr&jw+GAA+~Ush#SrJgMcFB)46J;OHiH4JKZx@K8~EW9aE{cWIsreYMoFwTtfD&uC?AD}hZ=^-#=1oq-5nE374sUKhrC--{HvIvxQK)a zX-ib{zZBz@DG_)hHTSGZv`Mx{z}|Rh(gvhNx$W3d5aih9v6`c~p+(Gxt6L->Ejf?3OVVjg-3&o_v+z)|0ST#AQ;A zQD|Q0N$t{I!_#X6f18wQ^Np;1gT^QRD`*HiNjYa+}Q|gqG)QwbX7pmF0I;y2t zb-TwWN_fH4VIF*QFdBl%Ym;hhu`BGy4NJ;Gze10of1%=g;|ujx(`PPYd#rvfC!)V5 z@un@OS2F$I@CF11nv?dEb{A?FwWqQbktJJaDHqP>fV39U8DBB_^HIH3_fS}tZ=$1`mAl8k}aLyr+P8>A;zz4nPlSM4{R_t z!8ZyS2N}vp{frA!Ytts}A(^qM?M2^975u+6nW9q0J}(cU{f={6K@$kr!AJ}$8RZ`! za6WH|&qe!f+TfPn(75h5(RwbAE8RqIO14Pi%nlko4{Gr1cMKa1Gb&$LIB$DyOI;%- zw0oN~n=>jfW=@zr-`09R`_nDftY^4|qgJ0kj5kx0SrXCGb`vYyLGNUX?uTy0$zLPl&yxU-n9bFT+0m>2~E&L(%Jabsy?IjIM!h&Jbs`B&T6 z9hORbPe;%FZ~fjPLa&crUF^1d&3m!!=Pl7_uYF|y#B<|tUVW@TT6lqAK_G632-6NP zZAAF-;QuBOOkPtS0IFj@Ug#pgJ-dyno+beJJ_G=GFaVt2fOQK1-aiF^ZA$=nkp=)v zu89`i$^bwJ=x9KdVm`;6ot=%2jW7LJ-rL(hK0aPuUHfxzu)V#rx%soMu5Nx|@#5lQ zb`Iau+qbc~i9(^SuCAu0ryHAEZfz*6Zrg^9u`q{v7P={Fzg&G(byn6M@(9qDx$jI2(*u=!d)YR0>%*@=}{PpYC78VwkmX=mlR@T@~E32xis;jGOYHDh0Yr*vE>+8{IbVEZ!V`C!*gK27NYHn_B zX=!O~ZTgww5?(XU7>Fw?9>+9?9?;jW#7#tiN8X6iN z9>(EtBO@cDqoZSEW8>rF6JXxozfVq1PECQDre|hmWpP)4`@a-KC$1gB#(AVDnKIrTBA5hG}0jTll=m_+Da&iKC z1CfJ7K{Fs`&S^hN+yB!846^(#13x>YrYH~fp39t=rVDyX zdux}AR-&ARDL8>sS4&LpRu?c&MD4hs zk8U``0XR@u!qj^W3Gom-R6B zjtV5V6Qh$6oySqisUY0MiR4sZw^@pil*7jBM?aUxiq1)v?rGJ!8LR%K8%^BRDkvAf z65rX-Zus6v;LyK#xz_5`ymGHfF9o|4`SE0?(f+d):b;},_initThumbUrl:function(){if(!this.get("thumbUrl")){var e=this.getSkinName()||"sam",d=c.config.base;if(d.indexOf("http://yui.yahooapis.com/combo")===0){d="http://yui.yahooapis.com/"+c.version+"/build/";}this.set("thumbUrl",d+"slider/assets/skins/"+e+"/thumb-"+this.axis+".png");}},BOUNDING_TEMPLATE:"",CONTENT_TEMPLATE:"",RAIL_TEMPLATE:''+''+''+"",THUMB_TEMPLATE:''+''+''+""},{NAME:"sliderBase",ATTRS:{axis:{value:"x",writeOnce:true,setter:"_setAxis",lazyAdd:false},length:{value:"150px",setter:"_setLength"},thumbUrl:{value:null,validator:c.Lang.isString}}});},"3.3.0",{requires:["widget","substitute","dd-constrain"]}); diff --git a/include/javascript/yui3/build/slider/slider-base.js b/include/javascript/yui3/build/slider/slider-base.js new file mode 100644 index 00000000..7fd544e3 --- /dev/null +++ b/include/javascript/yui3/build/slider/slider-base.js @@ -0,0 +1,11 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('slider-base',function(Y){var INVALID_VALUE=Y.Attribute.INVALID_VALUE;function SliderBase(){SliderBase.superclass.constructor.apply(this,arguments);} +Y.SliderBase=Y.extend(SliderBase,Y.Widget,{initializer:function(){this.axis=this.get('axis');this._key={dim:(this.axis==='y')?'height':'width',minEdge:(this.axis==='y')?'top':'left',maxEdge:(this.axis==='y')?'bottom':'right',xyIndex:(this.axis==='y')?1:0};this.publish('thumbMove',{defaultFn:this._defThumbMoveFn,queuable:true});},renderUI:function(){var contentBox=this.get('contentBox');this.rail=this.renderRail();this._uiSetRailLength(this.get('length'));this.thumb=this.renderThumb();this.rail.appendChild(this.thumb);contentBox.appendChild(this.rail);contentBox.addClass(this.getClassName(this.axis));},renderRail:function(){var minCapClass=this.getClassName('rail','cap',this._key.minEdge),maxCapClass=this.getClassName('rail','cap',this._key.maxEdge);return Y.Node.create(Y.substitute(this.RAIL_TEMPLATE,{railClass:this.getClassName('rail'),railMinCapClass:minCapClass,railMaxCapClass:maxCapClass}));},_uiSetRailLength:function(length){this.rail.setStyle(this._key.dim,length);},renderThumb:function(){this._initThumbUrl();var imageUrl=this.get('thumbUrl');return Y.Node.create(Y.substitute(this.THUMB_TEMPLATE,{thumbClass:this.getClassName('thumb'),thumbShadowClass:this.getClassName('thumb','shadow'),thumbImageClass:this.getClassName('thumb','image'),thumbShadowUrl:imageUrl,thumbImageUrl:imageUrl}));},bindUI:function(){this._bindThumbDD();this._bindValueLogic();this.after('disabledChange',this._afterDisabledChange);this.after('lengthChange',this._afterLengthChange);},_bindThumbDD:function(){var config={constrain:this.rail};config['stick'+this.axis.toUpperCase()]=true;this._dd=new Y.DD.Drag({node:this.thumb,bubble:false,on:{'drag:start':Y.bind(this._onDragStart,this)},after:{'drag:drag':Y.bind(this._afterDrag,this),'drag:end':Y.bind(this._afterDragEnd,this)}});this._dd.plug(Y.Plugin.DDConstrained,config);},_bindValueLogic:function(){},_uiMoveThumb:function(offset){if(this.thumb){this.thumb.setStyle(this._key.minEdge,offset+'px');this.fire('thumbMove',{offset:offset});}},_onDragStart:function(e){this.fire('slideStart',{ddEvent:e});},_afterDrag:function(e){var thumbXY=e.info.xy[this._key.xyIndex],railXY=e.target.con._regionCache[this._key.minEdge];this.fire('thumbMove',{offset:(thumbXY-railXY),ddEvent:e});},_afterDragEnd:function(e){this.fire('slideEnd',{ddEvent:e});},_afterDisabledChange:function(e){this._dd.set('lock',e.newVal);},_afterLengthChange:function(e){if(this.get('rendered')){this._uiSetRailLength(e.newVal);this.syncUI();}},syncUI:function(){this._dd.con.resetCache();this._syncThumbPosition();},_syncThumbPosition:function(){},_setAxis:function(v){v=(v+'').toLowerCase();return(v==='x'||v==='y')?v:INVALID_VALUE;},_setLength:function(v){v=(v+'').toLowerCase();var length=parseFloat(v,10),units=v.replace(/[\d\.\-]/g,'')||this.DEF_UNIT;return length>0?(length+units):INVALID_VALUE;},_initThumbUrl:function(){if(!this.get('thumbUrl')){var skin=this.getSkinName()||'sam',base=Y.config.base;if(base.indexOf('http://yui.yahooapis.com/combo')===0){base='http://yui.yahooapis.com/'+Y.version+'/build/';} +this.set('thumbUrl',base+'slider/assets/skins/'+ +skin+'/thumb-'+this.axis+'.png');}},BOUNDING_TEMPLATE:'',CONTENT_TEMPLATE:'',RAIL_TEMPLATE:''+''+''+'',THUMB_TEMPLATE:''+''+''+''},{NAME:'sliderBase',ATTRS:{axis:{value:'x',writeOnce:true,setter:'_setAxis',lazyAdd:false},length:{value:'150px',setter:'_setLength'},thumbUrl:{value:null,validator:Y.Lang.isString}}});},'3.3.0',{requires:['widget','substitute','dd-constrain']}); diff --git a/include/javascript/yui3/build/slider/slider-min.js b/include/javascript/yui3/build/slider/slider-min.js index 5b079c82..ee96afb1 100644 --- a/include/javascript/yui3/build/slider/slider-min.js +++ b/include/javascript/yui3/build/slider/slider-min.js @@ -1,8 +1,8 @@ /* - Copyright (c) 2009, Yahoo! Inc. All rights reserved. + Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 3.0.0 - build: 1549 + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 */ -YUI.add("slider",function(A){var i="slider",Z="rail",m="thumb",l="value",U="min",o="max",J="minGutter",b="maxGutter",R="thumbImage",n="railSize",c="contentBox",Q="slideStart",a="slideEnd",X="thumbDrag",e="sync",H="positionThumb",j="rendered",d="disabled",O="disabledChange",W=".",q="px",D="width",f="height",S="complete",K=A.Lang,g=K.isBoolean,P=K.isString,p=K.isNumber,G=A.ClassNameManager.getClassName,N="image",B=G(i,Z),C=G(i,m),T=G(i,m,N),E=G(i,N,"error"),I=Math,V=I.max,k=I.round,F=I.floor;function h(){h.superclass.constructor.apply(this,arguments);}A.mix(h,{NAME:i,_AXIS_KEYS:{x:{dim:D,offAxisDim:f,eventPageAxis:"pageX",ddStick:"stickX",xyIndex:0},y:{dim:f,offAxisDim:D,eventPageAxis:"pageY",ddStick:"stickY",xyIndex:1}},HTML_PARSER:{rail:W+B,thumb:W+C,thumbImage:W+T},ATTRS:{axis:{value:"x",writeOnce:true,validator:function(L){return this._validateNewAxis(L);},setter:function(L){return this._setAxisFn(L);}},min:{value:0,validator:function(L){return this._validateNewMin(L);}},max:{value:100,validator:function(L){return this._validateNewMax(L);}},value:{value:0,validator:function(L){return this._validateNewValue(L);}},rail:{value:null,validator:function(L){return this._validateNewRail(L);},setter:function(L){return this._setRailFn(L);}},thumb:{value:null,validator:function(L){return this._validateNewThumb(L);},setter:function(L){return this._setThumbFn(L);}},thumbImage:{value:null,validator:function(L){return this._validateNewThumbImage(L);},setter:function(L){return this._setThumbImageFn(L);}},railSize:{value:"0",validator:function(L){return this._validateNewRailSize(L);}},railEnabled:{value:true,validator:g},minGutter:{value:0,validator:p},maxGutter:{value:0,validator:p}}});A.extend(h,A.Widget,{_key:null,_factor:1,_railSize:null,_thumbSize:null,_thumbOffset:0,_stall:false,_disabled:false,initializer:function(){this._key=h._AXIS_KEYS[this.get("axis")];this.after("minChange",this._afterMinChange);this.after("maxChange",this._afterMaxChange);this.after("railSizeChange",this._afterRailSizeChange);this.publish(Q);this.publish(a);this.publish(e,{defaultFn:this._defSyncFn});this.publish(H,{defaultFn:this._defPositionThumbFn});},renderUI:function(){this._initRail();this._initThumb();},_initRail:function(){var L=this.get(c),M=this.get(Z);if(!M){M=L.appendChild(A.Node.create('
    '));this.set(Z,M);}else{if(!L.contains(M)){L.appendChild(M);}}M.addClass(B);M.addClass(this.getClassName(Z,this.get("axis")));},_initThumb:function(){var M=this.get(Z),L=this.get(m);if(L&&!this.get(R)&&L.get("nodeName").toLowerCase()==="img"){this.set(R,L);this.set(m,null);L=null;}if(!L){L=A.Node.create('
    ');this.set(m,L);}L.addClass(C);if(!M.contains(L)){M.appendChild(L);}if(this.get(R)){this._initThumbImage();}},_initThumbImage:function(){var M=this.get(m),L=this.get(R);if(L){L.replaceClass(C,T);if(!M.contains(L)){M.appendChild(L);}}},bindUI:function(){this.publish(X,{defaultFn:this._defThumbDragFn});this._bindThumbDD();this.after("valueChange",this._afterValueChange);this.after("thumbImageChange",this._afterThumbImageChange);this.after(O,this._afterDisabledChange);},_bindThumbDD:function(){var M={node:this.get(m),bubble:false},L={constrain2node:this.get(Z)};L[this._key.ddStick]=true;this._dd=new A.DD.Drag(M).plug(A.Plugin.DDConstrained,L);this._dd.on("drag:start",A.bind(this._onDDStartDrag,this));this._dd.on("drag:drag",A.bind(this._onDDDrag,this));this._dd.on("drag:end",A.bind(this._onDDEndDrag,this));this._initRailDD();},_initRailDD:function(){this.get(Z).on("mousedown",A.bind(this._handleRailMouseDown,this));},_handleRailMouseDown:function(Y){if(this.get("railEnabled")&&!this.get(d)){var L=this._dd,r=this._key.xyIndex,M;if(L.get("primaryButtonOnly")&&Y.button>1){return false;}L._dragThreshMet=true;L._fixIEMouseDown();Y.halt();A.DD.DDM.activeDrag=L;M=L.get("dragNode").getXY();M[r]+=this._thumbOffset;L._setStartPosition(M);L.set("activeHandle",L.get("dragNode"));L.start();L._alignNode([Y.pageX,Y.pageY]);}},syncUI:function(){this.get(c).removeClass(E);var L=this.get(R);if(this._isImageLoading(L)){this._scheduleSync();}else{this._ready(L,!this._isImageLoaded(L));}},_scheduleSync:function(){var L,M;if(!this._stall){this._disabled=this.get(d);this.set(d,true);this._stall=this.on(O,this._stallDisabledChange);L=this.get(R);M=A.bind(this._imageLoaded,this,L);L.on("load",M);L.on("error",M);}},_stallDisabledChange:function(L){this._disabled=L.newVal;L.preventDefault();},_imageLoaded:function(L,Y){var M=(Y.type.toLowerCase().indexOf("error")>-1);A.later(0,this,function(){if(this._stall){this._stall.detach();}this._stall=false;this._ready(L,M);this.set(d,this._disabled);});},_ready:function(L,M){var Y=M?"addClass":"removeClass";this.get(c)[Y](E);this.fire(e);},_defSyncFn:function(L){this._uiSetThumbSize();this._setThumbOffset();this._uiSetRailSize();this._setRailOffsetXY();this._setDDGutter();this._resetDDCacheRegion();this._setFactor();var M=this.get(l);this.fire(H,{value:M,offset:this._convertValueToOffset(M)});this.get("boundingBox").toggleClass("");},_uiSetThumbSize:function(){var M=this.get(m),r=this._key.dim,L=this.get(R),Y;Y=parseInt(M.getComputedStyle(r),10);if(L&&this._isImageLoaded(L)){Y=L.get(r);}this._thumbSize=Y;},_setThumbOffset:function(){this._thumbOffset=F(this._thumbSize/2);},_uiSetRailSize:function(){var t=this.get(Z),M=this.get(m),L=this.get(R),s=this._key.dim,Y=this.get(n),r=false;if(parseInt(Y,10)){t.setStyle(s,Y);Y=parseInt(t.getComputedStyle(s),10);}else{Y=this.get(s);if(parseInt(Y,10)){r=true;t.setStyle(s,Y);Y=parseInt(t.getComputedStyle(s),10);}Y=V(Y|0,parseInt(M.getComputedStyle(s),10),parseInt(t.getComputedStyle(s),10));if(L&&this._isImageLoaded(L)){Y=V(L.get(s),Y);}}t.setStyle(s,Y+q);this._railSize=Y;if(r){s=this._key.offAxisDim;Y=this.get(s);if(Y){t.set(s,Y);}}},_setRailOffsetXY:function(){this._offsetXY=this.get(Z).getXY()[this._key.xyIndex]+this.get(J);},_setDDGutter:function(){var L=this._key.xyIndex?this.get(J)+" 0 "+this.get(b):"0 "+this.get(b)+" 0 "+this.get(J);this._dd.con.set("gutter",L);},_resetDDCacheRegion:function(){this._dd.con._cacheRegion();},_setFactor:function(){var L=this._railSize-this._thumbSize-this.get(J)-this.get(b);this._factor=this._railSize?(this.get(o)-this.get(U))/L:1;},getValue:function(){return this.get(l);},setValue:function(L){this.set(l,L);},_validateNewAxis:function(L){return P(L)&&"xXyY".indexOf(L.charAt(0))>-1;},_validateNewMin:function(L){return p(L);},_validateNewMax:function(L){return p(L);},_validateNewValue:function(M){var Y=this.get(U),L=this.get(o);return p(M)&&(Y=Y&&M<=L):(M>=L&&M<=Y));},_validateNewRail:function(L){return!this.get(j)||L;},_validateNewThumb:function(L){return!this.get(j)||L;},_validateNewThumbImage:function(L){return!this.get(j)||L;},_validateNewRailSize:function(L){return P(L)&&(L==="0"||/^\d+(?:p[xtc]|%|e[mx]|in|[mc]m)$/.test(L));},_setAxisFn:function(L){return L.charAt(0).toLowerCase();},_setRailFn:function(L){return A.get(L)||null;},_setThumbFn:function(L){return A.get(L)||null;},_setThumbImageFn:function(L){return L?A.get(L)||A.Node.create('Slider thumb'):null;},_onDDStartDrag:function(L){this._setRailOffsetXY();this.fire(Q,{ddEvent:L});},_onDDDrag:function(L){this.fire(X,{ddEvent:L});},_defThumbDragFn:function(M){var L=this.get(l),Y=M.ddEvent[this._key.eventPageAxis]-this._offsetXY;Y=this._convertOffsetToValue(Y);if(L!==Y){this.set(l,Y,{ddEvent:M.ddEvent});}},_onDDEndDrag:function(L){this.fire(a,{ddEvent:L});},_defPositionThumbFn:function(L){this._uiPositionThumb(L.offset);},_uiPositionThumb:function(r){var L=this._dd,M=L.get("dragNode"),Y=M.ancestor(this._isDisplayNone);if(!Y){L._setStartPosition(L.get("dragNode").getXY());L._alignNode([r,r],true);}},_isDisplayNone:function(L){return L.getComputedStyle("display")==="none";},_afterValueChange:function(M){if(!M.ddEvent){var L=this._convertValueToOffset(M.newVal);this.fire(H,{value:M.newVal,offset:L});}},_convertValueToOffset:function(L){return k((L-this.get(U))/this._factor)+this._offsetXY;},_convertOffsetToValue:function(L){return k(this.get(U)+(L*this._factor));},_afterThumbChange:function(M){var L;if(this.get(j)){if(M.prevValue){M.prevValue.get("parentNode").removeChild(M.prevValue);}this._initThumb();L=this.get(m);this._dd.set("node",L);this._dd.set("dragNode",L);this.syncUI();}},_afterThumbImageChange:function(L){if(this.get(j)){if(L.prevValue){L.prevValue.get("parentNode").removeChild(L.prevValue);}this._initThumbImage();this.syncUI();}},_afterMinChange:function(L){this._refresh(L);},_afterMaxChange:function(L){this._refresh(L);},_afterRailSizeChange:function(L){this._refresh(L);},_afterDisabledChange:function(L){if(this._dd){this._dd.set("lock",L.newVal);}},_refresh:function(L){if(L.newVal!==L.prevVal&&this.get(j)){this.syncUI();}},_isImageLoading:function(L){return L&&!L.get(S);},_isImageLoaded:function(M){if(M){var L=M.get("naturalWidth");return M.get(S)&&(!p(L)?M.get(D):L);}return true;}});A.Slider=h;},"3.0.0",{requires:["widget","dd-constrain"]}); \ No newline at end of file +YUI.add("slider-base",function(c){var b=c.Attribute.INVALID_VALUE;function a(){a.superclass.constructor.apply(this,arguments);}c.SliderBase=c.extend(a,c.Widget,{initializer:function(){this.axis=this.get("axis");this._key={dim:(this.axis==="y")?"height":"width",minEdge:(this.axis==="y")?"top":"left",maxEdge:(this.axis==="y")?"bottom":"right",xyIndex:(this.axis==="y")?1:0};this.publish("thumbMove",{defaultFn:this._defThumbMoveFn,queuable:true});},renderUI:function(){var d=this.get("contentBox");this.rail=this.renderRail();this._uiSetRailLength(this.get("length"));this.thumb=this.renderThumb();this.rail.appendChild(this.thumb);d.appendChild(this.rail);d.addClass(this.getClassName(this.axis));},renderRail:function(){var e=this.getClassName("rail","cap",this._key.minEdge),d=this.getClassName("rail","cap",this._key.maxEdge);return c.Node.create(c.substitute(this.RAIL_TEMPLATE,{railClass:this.getClassName("rail"),railMinCapClass:e,railMaxCapClass:d}));},_uiSetRailLength:function(d){this.rail.setStyle(this._key.dim,d);},renderThumb:function(){this._initThumbUrl();var d=this.get("thumbUrl");return c.Node.create(c.substitute(this.THUMB_TEMPLATE,{thumbClass:this.getClassName("thumb"),thumbShadowClass:this.getClassName("thumb","shadow"),thumbImageClass:this.getClassName("thumb","image"),thumbShadowUrl:d,thumbImageUrl:d}));},bindUI:function(){this._bindThumbDD();this._bindValueLogic();this.after("disabledChange",this._afterDisabledChange);this.after("lengthChange",this._afterLengthChange);},_bindThumbDD:function(){var d={constrain:this.rail};d["stick"+this.axis.toUpperCase()]=true;this._dd=new c.DD.Drag({node:this.thumb,bubble:false,on:{"drag:start":c.bind(this._onDragStart,this)},after:{"drag:drag":c.bind(this._afterDrag,this),"drag:end":c.bind(this._afterDragEnd,this)}});this._dd.plug(c.Plugin.DDConstrained,d);},_bindValueLogic:function(){},_uiMoveThumb:function(d){if(this.thumb){this.thumb.setStyle(this._key.minEdge,d+"px");this.fire("thumbMove",{offset:d});}},_onDragStart:function(d){this.fire("slideStart",{ddEvent:d});},_afterDrag:function(f){var g=f.info.xy[this._key.xyIndex],d=f.target.con._regionCache[this._key.minEdge];this.fire("thumbMove",{offset:(g-d),ddEvent:f});},_afterDragEnd:function(d){this.fire("slideEnd",{ddEvent:d});},_afterDisabledChange:function(d){this._dd.set("lock",d.newVal);},_afterLengthChange:function(d){if(this.get("rendered")){this._uiSetRailLength(d.newVal);this.syncUI();}},syncUI:function(){this._dd.con.resetCache();this._syncThumbPosition();},_syncThumbPosition:function(){},_setAxis:function(d){d=(d+"").toLowerCase();return(d==="x"||d==="y")?d:b;},_setLength:function(e){e=(e+"").toLowerCase();var f=parseFloat(e,10),d=e.replace(/[\d\.\-]/g,"")||this.DEF_UNIT;return f>0?(f+d):b;},_initThumbUrl:function(){if(!this.get("thumbUrl")){var e=this.getSkinName()||"sam",d=c.config.base;if(d.indexOf("http://yui.yahooapis.com/combo")===0){d="http://yui.yahooapis.com/"+c.version+"/build/";}this.set("thumbUrl",d+"slider/assets/skins/"+e+"/thumb-"+this.axis+".png");}},BOUNDING_TEMPLATE:"",CONTENT_TEMPLATE:"",RAIL_TEMPLATE:''+''+''+"",THUMB_TEMPLATE:''+''+''+""},{NAME:"sliderBase",ATTRS:{axis:{value:"x",writeOnce:true,setter:"_setAxis",lazyAdd:false},length:{value:"150px",setter:"_setLength"},thumbUrl:{value:null,validator:c.Lang.isString}}});},"3.3.0",{requires:["widget","substitute","dd-constrain"]});YUI.add("slider-value-range",function(f){var b="min",e="max",d="value",c=Math.round;function a(){this._initSliderValueRange();}f.SliderValueRange=f.mix(a,{prototype:{_factor:1,_initSliderValueRange:function(){},_bindValueLogic:function(){this.after({minChange:this._afterMinChange,maxChange:this._afterMaxChange,valueChange:this._afterValueChange});},_syncThumbPosition:function(){this._calculateFactor();this._setPosition(this.get(d));},_calculateFactor:function(){var j=this.get("length"),h=this.thumb.getStyle(this._key.dim),i=this.get(b),g=this.get(e);j=parseFloat(j,10)||150;h=parseFloat(h,10)||15;this._factor=(g-i)/(j-h);},_defThumbMoveFn:function(i){var g=this.get(d),h=this._offsetToValue(i.offset);if(g!==h){this.set(d,h,{positioned:true});}},_offsetToValue:function(h){var g=c(h*this._factor)+this.get(b);return c(this._nearestValue(g));},_valueToOffset:function(g){var h=c((g-this.get(b))/this._factor);return h;},getValue:function(){return this.get(d);},setValue:function(g){return this.set(d,g);},_afterMinChange:function(g){this._verifyValue();this._syncThumbPosition();},_afterMaxChange:function(g){this._verifyValue();this._syncThumbPosition();},_verifyValue:function(){var h=this.get(d),g=this._nearestValue(h);if(h!==g){this.set(d,g);}},_afterValueChange:function(g){if(!g.positioned){this._setPosition(g.newVal);}},_setPosition:function(g){this._uiMoveThumb(this._valueToOffset(g));},_validateNewMin:function(g){return f.Lang.isNumber(g);},_validateNewMax:function(g){return f.Lang.isNumber(g);},_setNewValue:function(g){return c(this._nearestValue(g));},_nearestValue:function(j){var i=this.get(b),g=this.get(e),h;h=(g>i)?g:i;i=(g>i)?i:g;g=h;return(jg)?g:j;}},ATTRS:{min:{value:0,validator:"_validateNewMin"},max:{value:100,validator:"_validateNewMax"},value:{value:0,setter:"_setNewValue"}}},true);},"3.3.0",{requires:["slider-base"]});YUI.add("clickable-rail",function(b){function a(){this._initClickableRail();}b.ClickableRail=b.mix(a,{prototype:{_initClickableRail:function(){this._evtGuid=this._evtGuid||(b.guid()+"|");this.publish("railMouseDown",{defaultFn:this._defRailMouseDownFn});this.after("render",this._bindClickableRail);this.on("destroy",this._unbindClickableRail);},_bindClickableRail:function(){this._dd.addHandle(this.rail);this.rail.on(this._evtGuid+b.DD.Drag.START_EVENT,b.bind(this._onRailMouseDown,this));},_unbindClickableRail:function(){if(this.get("rendered")){var c=this.get("contentBox"),d=c.one("."+this.getClassName("rail"));d.detach(this.evtGuid+"*");}},_onRailMouseDown:function(c){if(this.get("clickableRail")&&!this.get("disabled")){this.fire("railMouseDown",{ev:c});}},_defRailMouseDownFn:function(k){k=k.ev;var c=this._resolveThumb(k),g=this._key.xyIndex,h=parseFloat(this.get("length"),10),f,d,j;if(c){f=c.get("dragNode");d=parseFloat(f.getStyle(this._key.dim),10);j=this._getThumbDestination(k,f);j=j[g]-this.rail.getXY()[g];j=Math.min(Math.max(j,0),(h-d));this._uiMoveThumb(j);k.target=this.thumb.one("img")||this.thumb;c._handleMouseDownEvent(k);}},_resolveThumb:function(c){return this._dd;},_getThumbDestination:function(g,f){var d=f.get("offsetWidth"),c=f.get("offsetHeight");return[(g.pageX-Math.round((d/2))),(g.pageY-Math.round((c/2)))];}},ATTRS:{clickableRail:{value:true,validator:b.Lang.isBoolean}}},true);},"3.3.0",{requires:["slider-base"]});YUI.add("range-slider",function(a){a.Slider=a.Base.build("slider",a.SliderBase,[a.SliderValueRange,a.ClickableRail]);},"3.3.0",{requires:["slider-base","clickable-rail","slider-value-range"]});YUI.add("slider",function(a){},"3.3.0",{use:["slider-base","slider-value-range","clickable-rail","range-slider"]}); diff --git a/include/javascript/yui3/build/slider/slider-value-range-min.js b/include/javascript/yui3/build/slider/slider-value-range-min.js new file mode 100644 index 00000000..426c8903 --- /dev/null +++ b/include/javascript/yui3/build/slider/slider-value-range-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("slider-value-range",function(f){var b="min",e="max",d="value",c=Math.round;function a(){this._initSliderValueRange();}f.SliderValueRange=f.mix(a,{prototype:{_factor:1,_initSliderValueRange:function(){},_bindValueLogic:function(){this.after({minChange:this._afterMinChange,maxChange:this._afterMaxChange,valueChange:this._afterValueChange});},_syncThumbPosition:function(){this._calculateFactor();this._setPosition(this.get(d));},_calculateFactor:function(){var j=this.get("length"),h=this.thumb.getStyle(this._key.dim),i=this.get(b),g=this.get(e);j=parseFloat(j,10)||150;h=parseFloat(h,10)||15;this._factor=(g-i)/(j-h);},_defThumbMoveFn:function(i){var g=this.get(d),h=this._offsetToValue(i.offset);if(g!==h){this.set(d,h,{positioned:true});}},_offsetToValue:function(h){var g=c(h*this._factor)+this.get(b);return c(this._nearestValue(g));},_valueToOffset:function(g){var h=c((g-this.get(b))/this._factor);return h;},getValue:function(){return this.get(d);},setValue:function(g){return this.set(d,g);},_afterMinChange:function(g){this._verifyValue();this._syncThumbPosition();},_afterMaxChange:function(g){this._verifyValue();this._syncThumbPosition();},_verifyValue:function(){var h=this.get(d),g=this._nearestValue(h);if(h!==g){this.set(d,g);}},_afterValueChange:function(g){if(!g.positioned){this._setPosition(g.newVal);}},_setPosition:function(g){this._uiMoveThumb(this._valueToOffset(g));},_validateNewMin:function(g){return f.Lang.isNumber(g);},_validateNewMax:function(g){return f.Lang.isNumber(g);},_setNewValue:function(g){return c(this._nearestValue(g));},_nearestValue:function(j){var i=this.get(b),g=this.get(e),h;h=(g>i)?g:i;i=(g>i)?i:g;g=h;return(jg)?g:j;}},ATTRS:{min:{value:0,validator:"_validateNewMin"},max:{value:100,validator:"_validateNewMax"},value:{value:0,setter:"_setNewValue"}}},true);},"3.3.0",{requires:["slider-base"]}); diff --git a/include/javascript/yui3/build/slider/slider-value-range.js b/include/javascript/yui3/build/slider/slider-value-range.js new file mode 100644 index 00000000..2b428d12 --- /dev/null +++ b/include/javascript/yui3/build/slider/slider-value-range.js @@ -0,0 +1,9 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('slider-value-range',function(Y){var MIN='min',MAX='max',VALUE='value',round=Math.round;function SliderValueRange(){this._initSliderValueRange();} +Y.SliderValueRange=Y.mix(SliderValueRange,{prototype:{_factor:1,_initSliderValueRange:function(){},_bindValueLogic:function(){this.after({minChange:this._afterMinChange,maxChange:this._afterMaxChange,valueChange:this._afterValueChange});},_syncThumbPosition:function(){this._calculateFactor();this._setPosition(this.get(VALUE));},_calculateFactor:function(){var length=this.get('length'),thumbSize=this.thumb.getStyle(this._key.dim),min=this.get(MIN),max=this.get(MAX);length=parseFloat(length,10)||150;thumbSize=parseFloat(thumbSize,10)||15;this._factor=(max-min)/(length-thumbSize);},_defThumbMoveFn:function(e){var previous=this.get(VALUE),value=this._offsetToValue(e.offset);if(previous!==value){this.set(VALUE,value,{positioned:true});}},_offsetToValue:function(offset){var value=round(offset*this._factor)+this.get(MIN);return round(this._nearestValue(value));},_valueToOffset:function(value){var offset=round((value-this.get(MIN))/ this._factor);return offset;},getValue:function(){return this.get(VALUE);},setValue:function(val){return this.set(VALUE,val);},_afterMinChange:function(e){this._verifyValue();this._syncThumbPosition();},_afterMaxChange:function(e){this._verifyValue();this._syncThumbPosition();},_verifyValue:function(){var value=this.get(VALUE),nearest=this._nearestValue(value);if(value!==nearest){this.set(VALUE,nearest);}},_afterValueChange:function(e){if(!e.positioned){this._setPosition(e.newVal);}},_setPosition:function(value){this._uiMoveThumb(this._valueToOffset(value));},_validateNewMin:function(value){return Y.Lang.isNumber(value);},_validateNewMax:function(value){return Y.Lang.isNumber(value);},_setNewValue:function(value){return round(this._nearestValue(value));},_nearestValue:function(value){var min=this.get(MIN),max=this.get(MAX),tmp;tmp=(max>min)?max:min;min=(max>min)?min:max;max=tmp;return(valuemax)?max:value;}},ATTRS:{min:{value:0,validator:'_validateNewMin'},max:{value:100,validator:'_validateNewMax'},value:{value:0,setter:'_setNewValue'}}},true);},'3.3.0',{requires:['slider-base']}); diff --git a/include/javascript/yui3/build/slider/slider.js b/include/javascript/yui3/build/slider/slider.js index dd34b1af..5c828817 100644 --- a/include/javascript/yui3/build/slider/slider.js +++ b/include/javascript/yui3/build/slider/slider.js @@ -1,23 +1,13 @@ /* - Copyright (c) 2009, Yahoo! Inc. All rights reserved. + Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 3.0.0 - build: 1549 + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 */ -YUI.add('slider',function(Y){var SLIDER='slider',RAIL='rail',THUMB='thumb',VALUE='value',MIN='min',MAX='max',MIN_GUTTER='minGutter',MAX_GUTTER='maxGutter',THUMB_IMAGE='thumbImage',RAIL_SIZE='railSize',CONTENT_BOX='contentBox',SLIDE_START='slideStart',SLIDE_END='slideEnd',THUMB_DRAG='thumbDrag',SYNC='sync',POSITION_THUMB='positionThumb',RENDERED='rendered',DISABLED='disabled',DISABLED_CHANGE='disabledChange',DOT='.',PX='px',WIDTH='width',HEIGHT='height',COMPLETE='complete',L=Y.Lang,isBoolean=L.isBoolean,isString=L.isString,isNumber=L.isNumber,getCN=Y.ClassNameManager.getClassName,IMAGE='image',C_RAIL=getCN(SLIDER,RAIL),C_THUMB=getCN(SLIDER,THUMB),C_THUMB_IMAGE=getCN(SLIDER,THUMB,IMAGE),C_IMAGE_ERROR=getCN(SLIDER,IMAGE,'error'),M=Math,max=M.max,round=M.round,floor=M.floor;function Slider(){Slider.superclass.constructor.apply(this,arguments);} -Y.mix(Slider,{NAME:SLIDER,_AXIS_KEYS:{x:{dim:WIDTH,offAxisDim:HEIGHT,eventPageAxis:'pageX',ddStick:'stickX',xyIndex:0},y:{dim:HEIGHT,offAxisDim:WIDTH,eventPageAxis:'pageY',ddStick:'stickY',xyIndex:1}},HTML_PARSER:{rail:DOT+C_RAIL,thumb:DOT+C_THUMB,thumbImage:DOT+C_THUMB_IMAGE},ATTRS:{axis:{value:'x',writeOnce:true,validator:function(v){return this._validateNewAxis(v);},setter:function(v){return this._setAxisFn(v);}},min:{value:0,validator:function(v){return this._validateNewMin(v);}},max:{value:100,validator:function(v){return this._validateNewMax(v);}},value:{value:0,validator:function(v){return this._validateNewValue(v);}},rail:{value:null,validator:function(v){return this._validateNewRail(v);},setter:function(v){return this._setRailFn(v);}},thumb:{value:null,validator:function(v){return this._validateNewThumb(v);},setter:function(v){return this._setThumbFn(v);}},thumbImage:{value:null,validator:function(v){return this._validateNewThumbImage(v);},setter:function(v){return this._setThumbImageFn(v);}},railSize:{value:'0',validator:function(v){return this._validateNewRailSize(v);}},railEnabled:{value:true,validator:isBoolean},minGutter:{value:0,validator:isNumber},maxGutter:{value:0,validator:isNumber}}});Y.extend(Slider,Y.Widget,{_key:null,_factor:1,_railSize:null,_thumbSize:null,_thumbOffset:0,_stall:false,_disabled:false,initializer:function(){this._key=Slider._AXIS_KEYS[this.get('axis')];this.after('minChange',this._afterMinChange);this.after('maxChange',this._afterMaxChange);this.after('railSizeChange',this._afterRailSizeChange);this.publish(SLIDE_START);this.publish(SLIDE_END);this.publish(SYNC,{defaultFn:this._defSyncFn});this.publish(POSITION_THUMB,{defaultFn:this._defPositionThumbFn});},renderUI:function(){this._initRail();this._initThumb();},_initRail:function(){var cb=this.get(CONTENT_BOX),rail=this.get(RAIL);if(!rail){rail=cb.appendChild(Y.Node.create('
    '));this.set(RAIL,rail);}else if(!cb.contains(rail)){cb.appendChild(rail);} -rail.addClass(C_RAIL);rail.addClass(this.getClassName(RAIL,this.get('axis')));},_initThumb:function(){var rail=this.get(RAIL),thumb=this.get(THUMB);if(thumb&&!this.get(THUMB_IMAGE)&&thumb.get('nodeName').toLowerCase()==='img'){this.set(THUMB_IMAGE,thumb);this.set(THUMB,null);thumb=null;} -if(!thumb){thumb=Y.Node.create('
    ');this.set(THUMB,thumb);} -thumb.addClass(C_THUMB);if(!rail.contains(thumb)){rail.appendChild(thumb);} -if(this.get(THUMB_IMAGE)){this._initThumbImage();}},_initThumbImage:function(){var thumb=this.get(THUMB),img=this.get(THUMB_IMAGE);if(img){img.replaceClass(C_THUMB,C_THUMB_IMAGE);if(!thumb.contains(img)){thumb.appendChild(img);}}},bindUI:function(){this.publish(THUMB_DRAG,{defaultFn:this._defThumbDragFn});this._bindThumbDD();this.after('valueChange',this._afterValueChange);this.after('thumbImageChange',this._afterThumbImageChange);this.after(DISABLED_CHANGE,this._afterDisabledChange);},_bindThumbDD:function(){var ddConf={node:this.get(THUMB),bubble:false},conConf={constrain2node:this.get(RAIL)};conConf[this._key.ddStick]=true;this._dd=new Y.DD.Drag(ddConf).plug(Y.Plugin.DDConstrained,conConf);this._dd.on('drag:start',Y.bind(this._onDDStartDrag,this));this._dd.on('drag:drag',Y.bind(this._onDDDrag,this));this._dd.on('drag:end',Y.bind(this._onDDEndDrag,this));this._initRailDD();},_initRailDD:function(){this.get(RAIL).on('mousedown',Y.bind(this._handleRailMouseDown,this));},_handleRailMouseDown:function(e){if(this.get('railEnabled')&&!this.get(DISABLED)){var dd=this._dd,xyIndex=this._key.xyIndex,xy;if(dd.get('primaryButtonOnly')&&e.button>1){return false;} -dd._dragThreshMet=true;dd._fixIEMouseDown();e.halt();Y.DD.DDM.activeDrag=dd;xy=dd.get('dragNode').getXY();xy[xyIndex]+=this._thumbOffset;dd._setStartPosition(xy);dd.set('activeHandle',dd.get('dragNode'));dd.start();dd._alignNode([e.pageX,e.pageY]);}},syncUI:function(){this.get(CONTENT_BOX).removeClass(C_IMAGE_ERROR);var img=this.get(THUMB_IMAGE);if(this._isImageLoading(img)){this._scheduleSync();}else{this._ready(img,!this._isImageLoaded(img));}},_scheduleSync:function(){var img,handler;if(!this._stall){this._disabled=this.get(DISABLED);this.set(DISABLED,true);this._stall=this.on(DISABLED_CHANGE,this._stallDisabledChange);img=this.get(THUMB_IMAGE);handler=Y.bind(this._imageLoaded,this,img);img.on('load',handler);img.on('error',handler);}},_stallDisabledChange:function(e){this._disabled=e.newVal;e.preventDefault();},_imageLoaded:function(img,e){var error=(e.type.toLowerCase().indexOf('error')>-1);Y.later(0,this,function(){if(this._stall){this._stall.detach();} -this._stall=false;this._ready(img,error);this.set(DISABLED,this._disabled);});},_ready:function(img,error){var method=error?'addClass':'removeClass';this.get(CONTENT_BOX)[method](C_IMAGE_ERROR);this.fire(SYNC);},_defSyncFn:function(e){this._uiSetThumbSize();this._setThumbOffset();this._uiSetRailSize();this._setRailOffsetXY();this._setDDGutter();this._resetDDCacheRegion();this._setFactor();var val=this.get(VALUE);this.fire(POSITION_THUMB,{value:val,offset:this._convertValueToOffset(val)});this.get('boundingBox').toggleClass('');},_uiSetThumbSize:function(){var thumb=this.get(THUMB),dim=this._key.dim,img=this.get(THUMB_IMAGE),size;size=parseInt(thumb.getComputedStyle(dim),10);if(img&&this._isImageLoaded(img)){size=img.get(dim);} -this._thumbSize=size;},_setThumbOffset:function(){this._thumbOffset=floor(this._thumbSize/2);},_uiSetRailSize:function(){var rail=this.get(RAIL),thumb=this.get(THUMB),img=this.get(THUMB_IMAGE),dim=this._key.dim,size=this.get(RAIL_SIZE),setxy=false;if(parseInt(size,10)){rail.setStyle(dim,size);size=parseInt(rail.getComputedStyle(dim),10);}else{size=this.get(dim);if(parseInt(size,10)){setxy=true;rail.setStyle(dim,size);size=parseInt(rail.getComputedStyle(dim),10);} -size=max(size|0,parseInt(thumb.getComputedStyle(dim),10),parseInt(rail.getComputedStyle(dim),10));if(img&&this._isImageLoaded(img)){size=max(img.get(dim),size);}} -rail.setStyle(dim,size+PX);this._railSize=size;if(setxy){dim=this._key.offAxisDim;size=this.get(dim);if(size){rail.set(dim,size);}}},_setRailOffsetXY:function(){this._offsetXY=this.get(RAIL).getXY()[this._key.xyIndex]+ -this.get(MIN_GUTTER);},_setDDGutter:function(){var gutter=this._key.xyIndex?this.get(MIN_GUTTER)+" 0 "+this.get(MAX_GUTTER):"0 "+this.get(MAX_GUTTER)+" 0 "+this.get(MIN_GUTTER);this._dd.con.set('gutter',gutter);},_resetDDCacheRegion:function(){this._dd.con._cacheRegion();},_setFactor:function(){var range=this._railSize-this._thumbSize- -this.get(MIN_GUTTER)-this.get(MAX_GUTTER);this._factor=this._railSize?(this.get(MAX)-this.get(MIN))/range:1;},getValue:function(){return this.get(VALUE);},setValue:function(val){this.set(VALUE,val);},_validateNewAxis:function(v){return isString(v)&&'xXyY'.indexOf(v.charAt(0))>-1;},_validateNewMin:function(v){return isNumber(v);},_validateNewMax:function(v){return isNumber(v);},_validateNewValue:function(v){var min=this.get(MIN),max=this.get(MAX);return isNumber(v)&&(min=min&&v<=max):(v>=max&&v<=min));},_validateNewRail:function(v){return!this.get(RENDERED)||v;},_validateNewThumb:function(v){return!this.get(RENDERED)||v;},_validateNewThumbImage:function(v){return!this.get(RENDERED)||v;},_validateNewRailSize:function(v){return isString(v)&&(v==='0'||/^\d+(?:p[xtc]|%|e[mx]|in|[mc]m)$/.test(v));},_setAxisFn:function(v){return v.charAt(0).toLowerCase();},_setRailFn:function(v){return Y.get(v)||null;},_setThumbFn:function(v){return Y.get(v)||null;},_setThumbImageFn:function(v){return v?Y.get(v)||Y.Node.create('Slider thumb'):null;},_onDDStartDrag:function(e){this._setRailOffsetXY();this.fire(SLIDE_START,{ddEvent:e});},_onDDDrag:function(e){this.fire(THUMB_DRAG,{ddEvent:e});},_defThumbDragFn:function(e){var before=this.get(VALUE),val=e.ddEvent[this._key.eventPageAxis]-this._offsetXY;val=this._convertOffsetToValue(val);if(before!==val){this.set(VALUE,val,{ddEvent:e.ddEvent});}},_onDDEndDrag:function(e){this.fire(SLIDE_END,{ddEvent:e});},_defPositionThumbFn:function(e){this._uiPositionThumb(e.offset);},_uiPositionThumb:function(xy){var dd=this._dd,thumb=dd.get('dragNode'),hidden=thumb.ancestor(this._isDisplayNone);if(!hidden){dd._setStartPosition(dd.get('dragNode').getXY());dd._alignNode([xy,xy],true);}},_isDisplayNone:function(node){return node.getComputedStyle('display')==='none';},_afterValueChange:function(e){if(!e.ddEvent){var xy=this._convertValueToOffset(e.newVal);this.fire(POSITION_THUMB,{value:e.newVal,offset:xy});}},_convertValueToOffset:function(v){return round((v-this.get(MIN))/this._factor)+this._offsetXY;},_convertOffsetToValue:function(v){return round(this.get(MIN)+(v*this._factor));},_afterThumbChange:function(e){var thumb;if(this.get(RENDERED)){if(e.prevValue){e.prevValue.get('parentNode').removeChild(e.prevValue);} -this._initThumb();thumb=this.get(THUMB);this._dd.set('node',thumb);this._dd.set('dragNode',thumb);this.syncUI();}},_afterThumbImageChange:function(e){if(this.get(RENDERED)){if(e.prevValue){e.prevValue.get('parentNode').removeChild(e.prevValue);} -this._initThumbImage();this.syncUI();}},_afterMinChange:function(e){this._refresh(e);},_afterMaxChange:function(e){this._refresh(e);},_afterRailSizeChange:function(e){this._refresh(e);},_afterDisabledChange:function(e){if(this._dd){this._dd.set('lock',e.newVal);}},_refresh:function(e){if(e.newVal!==e.prevVal&&this.get(RENDERED)){this.syncUI();}},_isImageLoading:function(img){return img&&!img.get(COMPLETE);},_isImageLoaded:function(img){if(img){var w=img.get('naturalWidth');return img.get(COMPLETE)&&(!isNumber(w)?img.get(WIDTH):w);} -return true;}});Y.Slider=Slider;},'3.0.0',{requires:['widget','dd-constrain']}); \ No newline at end of file +YUI.add('slider-base',function(Y){var INVALID_VALUE=Y.Attribute.INVALID_VALUE;function SliderBase(){SliderBase.superclass.constructor.apply(this,arguments);} +Y.SliderBase=Y.extend(SliderBase,Y.Widget,{initializer:function(){this.axis=this.get('axis');this._key={dim:(this.axis==='y')?'height':'width',minEdge:(this.axis==='y')?'top':'left',maxEdge:(this.axis==='y')?'bottom':'right',xyIndex:(this.axis==='y')?1:0};this.publish('thumbMove',{defaultFn:this._defThumbMoveFn,queuable:true});},renderUI:function(){var contentBox=this.get('contentBox');this.rail=this.renderRail();this._uiSetRailLength(this.get('length'));this.thumb=this.renderThumb();this.rail.appendChild(this.thumb);contentBox.appendChild(this.rail);contentBox.addClass(this.getClassName(this.axis));},renderRail:function(){var minCapClass=this.getClassName('rail','cap',this._key.minEdge),maxCapClass=this.getClassName('rail','cap',this._key.maxEdge);return Y.Node.create(Y.substitute(this.RAIL_TEMPLATE,{railClass:this.getClassName('rail'),railMinCapClass:minCapClass,railMaxCapClass:maxCapClass}));},_uiSetRailLength:function(length){this.rail.setStyle(this._key.dim,length);},renderThumb:function(){this._initThumbUrl();var imageUrl=this.get('thumbUrl');return Y.Node.create(Y.substitute(this.THUMB_TEMPLATE,{thumbClass:this.getClassName('thumb'),thumbShadowClass:this.getClassName('thumb','shadow'),thumbImageClass:this.getClassName('thumb','image'),thumbShadowUrl:imageUrl,thumbImageUrl:imageUrl}));},bindUI:function(){this._bindThumbDD();this._bindValueLogic();this.after('disabledChange',this._afterDisabledChange);this.after('lengthChange',this._afterLengthChange);},_bindThumbDD:function(){var config={constrain:this.rail};config['stick'+this.axis.toUpperCase()]=true;this._dd=new Y.DD.Drag({node:this.thumb,bubble:false,on:{'drag:start':Y.bind(this._onDragStart,this)},after:{'drag:drag':Y.bind(this._afterDrag,this),'drag:end':Y.bind(this._afterDragEnd,this)}});this._dd.plug(Y.Plugin.DDConstrained,config);},_bindValueLogic:function(){},_uiMoveThumb:function(offset){if(this.thumb){this.thumb.setStyle(this._key.minEdge,offset+'px');this.fire('thumbMove',{offset:offset});}},_onDragStart:function(e){this.fire('slideStart',{ddEvent:e});},_afterDrag:function(e){var thumbXY=e.info.xy[this._key.xyIndex],railXY=e.target.con._regionCache[this._key.minEdge];this.fire('thumbMove',{offset:(thumbXY-railXY),ddEvent:e});},_afterDragEnd:function(e){this.fire('slideEnd',{ddEvent:e});},_afterDisabledChange:function(e){this._dd.set('lock',e.newVal);},_afterLengthChange:function(e){if(this.get('rendered')){this._uiSetRailLength(e.newVal);this.syncUI();}},syncUI:function(){this._dd.con.resetCache();this._syncThumbPosition();},_syncThumbPosition:function(){},_setAxis:function(v){v=(v+'').toLowerCase();return(v==='x'||v==='y')?v:INVALID_VALUE;},_setLength:function(v){v=(v+'').toLowerCase();var length=parseFloat(v,10),units=v.replace(/[\d\.\-]/g,'')||this.DEF_UNIT;return length>0?(length+units):INVALID_VALUE;},_initThumbUrl:function(){if(!this.get('thumbUrl')){var skin=this.getSkinName()||'sam',base=Y.config.base;if(base.indexOf('http://yui.yahooapis.com/combo')===0){base='http://yui.yahooapis.com/'+Y.version+'/build/';} +this.set('thumbUrl',base+'slider/assets/skins/'+ +skin+'/thumb-'+this.axis+'.png');}},BOUNDING_TEMPLATE:'',CONTENT_TEMPLATE:'',RAIL_TEMPLATE:''+''+''+'',THUMB_TEMPLATE:''+''+''+''},{NAME:'sliderBase',ATTRS:{axis:{value:'x',writeOnce:true,setter:'_setAxis',lazyAdd:false},length:{value:'150px',setter:'_setLength'},thumbUrl:{value:null,validator:Y.Lang.isString}}});},'3.3.0',{requires:['widget','substitute','dd-constrain']});YUI.add('slider-value-range',function(Y){var MIN='min',MAX='max',VALUE='value',round=Math.round;function SliderValueRange(){this._initSliderValueRange();} +Y.SliderValueRange=Y.mix(SliderValueRange,{prototype:{_factor:1,_initSliderValueRange:function(){},_bindValueLogic:function(){this.after({minChange:this._afterMinChange,maxChange:this._afterMaxChange,valueChange:this._afterValueChange});},_syncThumbPosition:function(){this._calculateFactor();this._setPosition(this.get(VALUE));},_calculateFactor:function(){var length=this.get('length'),thumbSize=this.thumb.getStyle(this._key.dim),min=this.get(MIN),max=this.get(MAX);length=parseFloat(length,10)||150;thumbSize=parseFloat(thumbSize,10)||15;this._factor=(max-min)/(length-thumbSize);},_defThumbMoveFn:function(e){var previous=this.get(VALUE),value=this._offsetToValue(e.offset);if(previous!==value){this.set(VALUE,value,{positioned:true});}},_offsetToValue:function(offset){var value=round(offset*this._factor)+this.get(MIN);return round(this._nearestValue(value));},_valueToOffset:function(value){var offset=round((value-this.get(MIN))/ this._factor);return offset;},getValue:function(){return this.get(VALUE);},setValue:function(val){return this.set(VALUE,val);},_afterMinChange:function(e){this._verifyValue();this._syncThumbPosition();},_afterMaxChange:function(e){this._verifyValue();this._syncThumbPosition();},_verifyValue:function(){var value=this.get(VALUE),nearest=this._nearestValue(value);if(value!==nearest){this.set(VALUE,nearest);}},_afterValueChange:function(e){if(!e.positioned){this._setPosition(e.newVal);}},_setPosition:function(value){this._uiMoveThumb(this._valueToOffset(value));},_validateNewMin:function(value){return Y.Lang.isNumber(value);},_validateNewMax:function(value){return Y.Lang.isNumber(value);},_setNewValue:function(value){return round(this._nearestValue(value));},_nearestValue:function(value){var min=this.get(MIN),max=this.get(MAX),tmp;tmp=(max>min)?max:min;min=(max>min)?min:max;max=tmp;return(valuemax)?max:value;}},ATTRS:{min:{value:0,validator:'_validateNewMin'},max:{value:100,validator:'_validateNewMax'},value:{value:0,setter:'_setNewValue'}}},true);},'3.3.0',{requires:['slider-base']});YUI.add('clickable-rail',function(Y){function ClickableRail(){this._initClickableRail();} +Y.ClickableRail=Y.mix(ClickableRail,{prototype:{_initClickableRail:function(){this._evtGuid=this._evtGuid||(Y.guid()+'|');this.publish('railMouseDown',{defaultFn:this._defRailMouseDownFn});this.after('render',this._bindClickableRail);this.on('destroy',this._unbindClickableRail);},_bindClickableRail:function(){this._dd.addHandle(this.rail);this.rail.on(this._evtGuid+Y.DD.Drag.START_EVENT,Y.bind(this._onRailMouseDown,this));},_unbindClickableRail:function(){if(this.get('rendered')){var contentBox=this.get('contentBox'),rail=contentBox.one('.'+this.getClassName('rail'));rail.detach(this.evtGuid+'*');}},_onRailMouseDown:function(e){if(this.get('clickableRail')&&!this.get('disabled')){this.fire('railMouseDown',{ev:e});}},_defRailMouseDownFn:function(e){e=e.ev;var dd=this._resolveThumb(e),i=this._key.xyIndex,length=parseFloat(this.get('length'),10),thumb,thumbSize,xy;if(dd){thumb=dd.get('dragNode');thumbSize=parseFloat(thumb.getStyle(this._key.dim),10);xy=this._getThumbDestination(e,thumb);xy=xy[i]-this.rail.getXY()[i];xy=Math.min(Math.max(xy,0),(length-thumbSize));this._uiMoveThumb(xy);e.target=this.thumb.one('img')||this.thumb;dd._handleMouseDownEvent(e);}},_resolveThumb:function(e){return this._dd;},_getThumbDestination:function(e,node){var offsetWidth=node.get('offsetWidth'),offsetHeight=node.get('offsetHeight');return[(e.pageX-Math.round((offsetWidth/ 2))),(e.pageY-Math.round((offsetHeight / 2)))];}},ATTRS:{clickableRail:{value:true,validator:Y.Lang.isBoolean}}},true);},'3.3.0',{requires:['slider-base']});YUI.add('range-slider',function(Y){Y.Slider=Y.Base.build('slider',Y.SliderBase,[Y.SliderValueRange,Y.ClickableRail]);},'3.3.0',{requires:['slider-base','clickable-rail','slider-value-range']});YUI.add('slider',function(Y){},'3.3.0',{use:['slider-base','slider-value-range','clickable-rail','range-slider']}); diff --git a/include/javascript/yui3/build/sortable/sortable-min.js b/include/javascript/yui3/build/sortable/sortable-min.js new file mode 100644 index 00000000..257838eb --- /dev/null +++ b/include/javascript/yui3/build/sortable/sortable-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("sortable",function(A){var C=function(L){C.superclass.constructor.apply(this,arguments);},F="currentNode",D="opacityNode",I="container",E="id",J="zIndex",K="opacity",H="parentNode",G="nodes",B="node";A.extend(C,A.Base,{delegate:null,initializer:function(){var O="sortable-"+A.guid(),N,M={container:this.get(I),nodes:this.get(G),target:true,invalid:this.get("invalid"),dragConfig:{groups:[O]}},L;if(this.get("handles")){M.handles=this.get("handles");}L=new A.DD.Delegate(M);this.set(E,O);L.dd.plug(A.Plugin.DDProxy,{moveOnEnd:false,cloneNode:true});N=new A.DD.Drop({node:this.get(I),bubbleTarget:L,groups:L.dd.get("groups")}).on("drop:over",A.bind(this._onDropOver,this));L.on({"drag:start":A.bind(this._onDragStart,this),"drag:end":A.bind(this._onDragEnd,this),"drag:over":A.bind(this._onDragOver,this),"drag:drag":A.bind(this._onDrag,this)});this.delegate=L;C.reg(this);},_up:null,_y:null,_onDrag:function(L){if(L.pageYthis._y){this._up=false;}}this._y=L.pageY;},_onDropOver:function(M){if(!M.drop.get(B).test(this.get(G))){var L=M.drop.get(B).all(this.get(G));if(L.size()===0){M.drop.get(B).append(M.drag.get(B));}}},_onDragOver:function(R){if(!R.drop.get(B).test(this.get(G))){return;}if(R.drag.get(B)==R.drop.get(B)){return;}if(R.drag.get(B).contains(R.drop.get(B))){return;}var S=false,M,Q,O,N,L,P=this.get("moveType").toLowerCase();if(R.drag.get(B).get(H).contains(R.drop.get(B))){S=true;}if(S&&P=="move"){P="insert";}switch(P){case"insert":M=((this._up)?"before":"after");L=R.drop.get(B);if(A.Sortable._test(L,this.get(I))){L.append(R.drag.get(B));}else{L.insert(R.drag.get(B),M);}break;case"swap":A.DD.DDM.swapNode(R.drag,R.drop);break;case"move":case"copy":N=A.Sortable.getSortable(R.drop.get(B).get(H));if(!N){return;}A.DD.DDM.getDrop(R.drag.get(B)).addToGroup(N.get(E));if(S){A.DD.DDM.swapNode(R.drag,R.drop);}else{if(this.get("moveType")=="copy"){Q=R.drag.get(B);O=Q.cloneNode(true);O.set(E,"");R.drag.set(B,O);N.delegate.createDrop(O,[N.get(E)]);Q.setStyles({top:"",left:""});}R.drop.get(B).insert(R.drag.get(B),"before");}break;}this.fire(P,{same:S,drag:R.drag,drop:R.drop});this.fire("moved",{same:S,drag:R.drag,drop:R.drop});},_onDragStart:function(L){this.delegate.get("lastNode").setStyle(J,"");this.delegate.get(this.get(D)).setStyle(K,this.get(K));this.delegate.get(F).setStyle(J,"999");},_onDragEnd:function(L){this.delegate.get(this.get(D)).setStyle(K,1);this.delegate.get(F).setStyles({top:"",left:""});this.sync();},plug:function(L,M){if(L&&L.NAME.substring(0,4).toLowerCase()==="sort"){this.constructor.superclass.plug.call(this,L,M);}else{this.delegate.dd.plug(L,M);}return this;},sync:function(){this.delegate.syncTargets();return this;},destructor:function(){this.delegate.destroy();C.unreg(this);},join:function(M,L){if(!(M instanceof A.Sortable)){A.error("Sortable: join needs a Sortable Instance");return this;}if(!L){L="full";}L=L.toLowerCase();var N="_join_"+L;if(this[N]){this[N](M);}return this;},_join_none:function(L){this.delegate.dd.removeFromGroup(L.get(E));L.delegate.dd.removeFromGroup(this.get(E));},_join_full:function(L){this.delegate.dd.addToGroup(L.get(E));L.delegate.dd.addToGroup(this.get(E));},_join_outer:function(L){this.delegate.dd.addToGroup(L.get(E));},_join_inner:function(L){L.delegate.dd.addToGroup(this.get(E));},getOrdering:function(M){var L=[];if(!A.Lang.isFunction(M)){M=function(N){return N;};}A.one(this.get(I)).all(this.get(G)).each(function(N){L.push(M(N));});return L;}},{NAME:"sortable",ATTRS:{handles:{value:false},container:{value:"body"},nodes:{value:".dd-draggable"},opacity:{value:".75"},opacityNode:{value:"currentNode"},id:{value:null},moveType:{value:"insert"},invalid:{value:""}},_sortables:[],_test:function(L,M){if(M instanceof A.Node){return(M===L);}else{return L.test(M);}},getSortable:function(M){var L=null;M=A.one(M);A.each(A.Sortable._sortables,function(N){if(A.Sortable._test(M,N.get(I))){L=N;}});return L;},reg:function(L){A.Sortable._sortables.push(L);},unreg:function(L){A.each(A.Sortable._sortables,function(N,M){if(N===L){A.Sortable._sortables[M]=null;delete C._sortables[M];}});}});A.Sortable=C;},"3.3.0",{requires:["dd-delegate","dd-drop-plugin","dd-proxy"]}); diff --git a/include/javascript/yui3/build/sortable/sortable-scroll-min.js b/include/javascript/yui3/build/sortable/sortable-scroll-min.js new file mode 100644 index 00000000..1c7c31cd --- /dev/null +++ b/include/javascript/yui3/build/sortable/sortable-scroll-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("sortable-scroll",function(B){var A=function(){A.superclass.constructor.apply(this,arguments);};B.extend(A,B.Base,{initializer:function(){var C=this.get("host");C.plug(B.Plugin.DDNodeScroll,{node:C.get("container")});C.delegate.on("drop:over",function(D){if(this.dd.nodescroll&&D.drag.nodescroll){D.drag.nodescroll.set("parentScroll",B.one(this.get("container")));}});}},{ATTRS:{host:{value:""}},NAME:"SortScroll",NS:"scroll"});B.namespace("Y.Plugin");B.Plugin.SortableScroll=A;},"3.3.0",{requires:["sortable","dd-scroll"]}); diff --git a/include/javascript/yui3/build/sortable/sortable-scroll.js b/include/javascript/yui3/build/sortable/sortable-scroll.js new file mode 100644 index 00000000..ee82bcf3 --- /dev/null +++ b/include/javascript/yui3/build/sortable/sortable-scroll.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('sortable-scroll',function(Y){var SortScroll=function(){SortScroll.superclass.constructor.apply(this,arguments);};Y.extend(SortScroll,Y.Base,{initializer:function(){var host=this.get('host');host.plug(Y.Plugin.DDNodeScroll,{node:host.get('container')});host.delegate.on('drop:over',function(e){if(this.dd.nodescroll&&e.drag.nodescroll){e.drag.nodescroll.set('parentScroll',Y.one(this.get('container')));}});}},{ATTRS:{host:{value:''}},NAME:'SortScroll',NS:'scroll'});Y.namespace('Y.Plugin');Y.Plugin.SortableScroll=SortScroll;},'3.3.0',{requires:['sortable','dd-scroll']}); diff --git a/include/javascript/yui3/build/sortable/sortable.js b/include/javascript/yui3/build/sortable/sortable.js new file mode 100644 index 00000000..65d652e6 --- /dev/null +++ b/include/javascript/yui3/build/sortable/sortable.js @@ -0,0 +1,25 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('sortable',function(Y){var Sortable=function(o){Sortable.superclass.constructor.apply(this,arguments);},CURRENT_NODE='currentNode',OPACITY_NODE='opacityNode',CONT='container',ID='id',ZINDEX='zIndex',OPACITY='opacity',PARENT_NODE='parentNode',NODES='nodes',NODE='node';Y.extend(Sortable,Y.Base,{delegate:null,initializer:function(){var id='sortable-'+Y.guid(),c,delConfig={container:this.get(CONT),nodes:this.get(NODES),target:true,invalid:this.get('invalid'),dragConfig:{groups:[id]}},del;if(this.get('handles')){delConfig.handles=this.get('handles');} +del=new Y.DD.Delegate(delConfig);this.set(ID,id);del.dd.plug(Y.Plugin.DDProxy,{moveOnEnd:false,cloneNode:true});c=new Y.DD.Drop({node:this.get(CONT),bubbleTarget:del,groups:del.dd.get('groups')}).on('drop:over',Y.bind(this._onDropOver,this));del.on({'drag:start':Y.bind(this._onDragStart,this),'drag:end':Y.bind(this._onDragEnd,this),'drag:over':Y.bind(this._onDragOver,this),'drag:drag':Y.bind(this._onDrag,this)});this.delegate=del;Sortable.reg(this);},_up:null,_y:null,_onDrag:function(e){if(e.pageYthis._y){this._up=false;} +this._y=e.pageY;},_onDropOver:function(e){if(!e.drop.get(NODE).test(this.get(NODES))){var nodes=e.drop.get(NODE).all(this.get(NODES));if(nodes.size()===0){e.drop.get(NODE).append(e.drag.get(NODE));}}},_onDragOver:function(e){if(!e.drop.get(NODE).test(this.get(NODES))){return;} +if(e.drag.get(NODE)==e.drop.get(NODE)){return;} +if(e.drag.get(NODE).contains(e.drop.get(NODE))){return;} +var same=false,dir,oldNode,newNode,dropsort,dropNode,moveType=this.get('moveType').toLowerCase();if(e.drag.get(NODE).get(PARENT_NODE).contains(e.drop.get(NODE))){same=true;} +if(same&&moveType=='move'){moveType='insert';} +switch(moveType){case'insert':dir=((this._up)?'before':'after');dropNode=e.drop.get(NODE);if(Y.Sortable._test(dropNode,this.get(CONT))){dropNode.append(e.drag.get(NODE));}else{dropNode.insert(e.drag.get(NODE),dir);} +break;case'swap':Y.DD.DDM.swapNode(e.drag,e.drop);break;case'move':case'copy':dropsort=Y.Sortable.getSortable(e.drop.get(NODE).get(PARENT_NODE));if(!dropsort){return;} +Y.DD.DDM.getDrop(e.drag.get(NODE)).addToGroup(dropsort.get(ID));if(same){Y.DD.DDM.swapNode(e.drag,e.drop);}else{if(this.get('moveType')=='copy'){oldNode=e.drag.get(NODE);newNode=oldNode.cloneNode(true);newNode.set(ID,'');e.drag.set(NODE,newNode);dropsort.delegate.createDrop(newNode,[dropsort.get(ID)]);oldNode.setStyles({top:'',left:''});} +e.drop.get(NODE).insert(e.drag.get(NODE),'before');} +break;} +this.fire(moveType,{same:same,drag:e.drag,drop:e.drop});this.fire('moved',{same:same,drag:e.drag,drop:e.drop});},_onDragStart:function(e){this.delegate.get('lastNode').setStyle(ZINDEX,'');this.delegate.get(this.get(OPACITY_NODE)).setStyle(OPACITY,this.get(OPACITY));this.delegate.get(CURRENT_NODE).setStyle(ZINDEX,'999');},_onDragEnd:function(e){this.delegate.get(this.get(OPACITY_NODE)).setStyle(OPACITY,1);this.delegate.get(CURRENT_NODE).setStyles({top:'',left:''});this.sync();},plug:function(cls,config){if(cls&&cls.NAME.substring(0,4).toLowerCase()==='sort'){this.constructor.superclass.plug.call(this,cls,config);}else{this.delegate.dd.plug(cls,config);} +return this;},sync:function(){this.delegate.syncTargets();return this;},destructor:function(){this.delegate.destroy();Sortable.unreg(this);},join:function(sel,type){if(!(sel instanceof Y.Sortable)){Y.error('Sortable: join needs a Sortable Instance');return this;} +if(!type){type='full';} +type=type.toLowerCase();var method='_join_'+type;if(this[method]){this[method](sel);} +return this;},_join_none:function(sel){this.delegate.dd.removeFromGroup(sel.get(ID));sel.delegate.dd.removeFromGroup(this.get(ID));},_join_full:function(sel){this.delegate.dd.addToGroup(sel.get(ID));sel.delegate.dd.addToGroup(this.get(ID));},_join_outer:function(sel){this.delegate.dd.addToGroup(sel.get(ID));},_join_inner:function(sel){sel.delegate.dd.addToGroup(this.get(ID));},getOrdering:function(callback){var ordering=[];if(!Y.Lang.isFunction(callback)){callback=function(node){return node;};} +Y.one(this.get(CONT)).all(this.get(NODES)).each(function(node){ordering.push(callback(node));});return ordering;}},{NAME:'sortable',ATTRS:{handles:{value:false},container:{value:'body'},nodes:{value:'.dd-draggable'},opacity:{value:'.75'},opacityNode:{value:'currentNode'},id:{value:null},moveType:{value:'insert'},invalid:{value:''}},_sortables:[],_test:function(node,test){if(test instanceof Y.Node){return(test===node);}else{return node.test(test);}},getSortable:function(node){var s=null;node=Y.one(node);Y.each(Y.Sortable._sortables,function(v){if(Y.Sortable._test(node,v.get(CONT))){s=v;}});return s;},reg:function(s){Y.Sortable._sortables.push(s);},unreg:function(s){Y.each(Y.Sortable._sortables,function(v,k){if(v===s){Y.Sortable._sortables[k]=null;delete Sortable._sortables[k];}});}});Y.Sortable=Sortable;},'3.3.0',{requires:['dd-delegate','dd-drop-plugin','dd-proxy']}); diff --git a/include/javascript/yui3/build/stylesheet/stylesheet-min.js b/include/javascript/yui3/build/stylesheet/stylesheet-min.js index ecd45209..ef4e6892 100644 --- a/include/javascript/yui3/build/stylesheet/stylesheet-min.js +++ b/include/javascript/yui3/build/stylesheet/stylesheet-min.js @@ -1,8 +1,8 @@ /* - Copyright (c) 2009, Yahoo! Inc. All rights reserved. + Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 3.0.0 - build: 1549 + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 */ -YUI.add("stylesheet",function(B){var J=B.config.doc,C=J.createElement("p"),F=C.style,D=B.Lang.isString,M={},I={},K=("cssFloat"in F)?"cssFloat":"styleFloat",G,A,L,N="opacity",O="float",E="";A=(N in F)?function(P){P.opacity=E;}:function(P){P.filter=E;};F.border="1px solid red";F.border=E;L=F.borderLeft?function(P,R){var Q;if(R!==K&&R.toLowerCase().indexOf(O)!=-1){R=K;}if(D(P[R])){switch(R){case N:case"filter":A(P);break;case"font":P.font=P.fontStyle=P.fontVariant=P.fontWeight=P.fontSize=P.lineHeight=P.fontFamily=E;break;default:for(Q in P){if(Q.indexOf(R)===0){P[Q]=E;}}}}}:function(P,Q){if(Q!==K&&Q.toLowerCase().indexOf(O)!=-1){Q=K;}if(D(P[Q])){if(Q===N){A(P);}else{P[Q]=E;}}};function H(W,R){var Z,U,Y,X={},Q,a,T,V,P,S;if(!(this instanceof H)){return new H(W,R);}if(W){if(B.Node&&W instanceof B.Node){U=B.Node.getDOMNode(W);}else{if(W.nodeName){U=W;}else{if(D(W)){if(W&&I[W]){return I[W];}U=J.getElementById(W.replace(/^#/,E));}}}if(U&&I[B.stamp(U)]){return I[B.stamp(U)];}}if(!U||!/^(?:style|link)$/i.test(U.nodeName)){U=J.createElement("style");U.type="text/css";}if(D(W)){if(W.indexOf("{")!=-1){if(U.styleSheet){U.styleSheet.cssText=W;}else{U.appendChild(J.createTextNode(W));}}else{if(!R){R=W;}}}if(!U.parentNode||U.parentNode.nodeName.toLowerCase()!=="head"){Z=(U.ownerDocument||J).getElementsByTagName("head")[0];Z.appendChild(U);}Y=U.sheet||U.styleSheet;Q=Y&&("cssRules"in Y)?"cssRules":"rules";T=("deleteRule"in Y)?function(b){Y.deleteRule(b);}:function(b){Y.removeRule(b);};a=("insertRule"in Y)?function(d,c,b){Y.insertRule(d+" {"+c+"}",b);}:function(d,c,b){Y.addRule(d,c,b);};for(V=Y[Q].length-1;V>=0;--V){P=Y[Q][V];S=P.selectorText;if(X[S]){X[S].style.cssText+=";"+P.style.cssText;T(V);}else{X[S]=P;}}H.register(B.stamp(U),this);if(R){H.register(R,this);}B.mix(this,{getId:function(){return B.stamp(U);},enable:function(){Y.disabled=false;return this;},disable:function(){Y.disabled=true;return this;},isEnabled:function(){return!Y.disabled;},set:function(e,d){var g=X[e],f=e.split(/\s*,\s*/),c,b;if(f.length>1){for(c=f.length-1;c>=0;--c){this.set(f[c],d);}return this;}if(!H.isValidSelector(e)){return this;}if(g){g.style.cssText=H.toCssText(d,g.style.cssText);}else{b=Y[Q].length;d=H.toCssText(d);if(d){a(e,d,b);X[e]=Y[Q][b];}}return this;},unset:function(e,d){var g=X[e],f=e.split(/\s*,\s*/),b=!d,h,c;if(f.length>1){for(c=f.length-1;c>=0;--c){this.unset(f[c],d);}return this;}if(g){if(!b){d=B.Array(d);F.cssText=g.style.cssText;for(c=d.length-1;c>=0;--c){L(F,d[c]);}if(F.cssText){g.style.cssText=F.cssText;}else{b=true;}}if(b){h=Y[Q];for(c=h.length-1;c>=0;--c){if(h[c]===g){delete X[e];T(c);break;}}}}return this;},getCssText:function(c){var d,b;if(D(c)){d=X[c.split(/\s*,\s*/)[0]];return d?d.style.cssText:null;}else{b=[];for(c in X){if(X.hasOwnProperty(c)){d=X[c];b.push(d.selectorText+" {"+d.style.cssText+"}");}}return b.join("\n");}}});}G=function(Q,S){var R=Q.styleFloat||Q.cssFloat||Q[O],P=B.Lang.trim,U;F.cssText=S||E;if(R&&!Q[K]){Q=B.merge(Q);delete Q.styleFloat;delete Q.cssFloat;delete Q[O];Q[K]=R;}for(U in Q){if(Q.hasOwnProperty(U)){try{F[U]=P(Q[U]);}catch(T){}}}return F.cssText;};B.mix(H,{toCssText:((N in F)?G:function(P,Q){if(N in P){P=B.merge(P,{filter:"alpha(opacity="+(P.opacity*100)+")"});delete P.opacity;}return G(P,Q);}),register:function(P,Q){return!!(P&&Q instanceof H&&!I[P]&&(I[P]=Q));},isValidSelector:function(Q){var P=false;if(Q&&D(Q)){if(!M.hasOwnProperty(Q)){M[Q]=!/\S/.test(Q.replace(/\s+|\s*[+~>]\s*/g," ").replace(/([^ ])\[.*?\]/g,"$1").replace(/([^ ])::?[a-z][a-z\-]+[a-z](?:\(.*?\))?/ig,"$1").replace(/(?:^| )[a-z0-6]+/ig," ").replace(/\\./g,E).replace(/[.#]\w[\w\-]*/g,E));}P=M[Q];}return P;}},true);B.StyleSheet=H;},"3.0.0"); \ No newline at end of file +YUI.add("stylesheet",function(b){var k=b.config.doc,c=k.createElement("p"),g=c.style,e=b.Lang.isString,n={},j={},l=("cssFloat"in g)?"cssFloat":"styleFloat",h,a,m,o="opacity",q="float",f="";a=(o in g)?function(d){d.opacity=f;}:function(d){d.filter=f;};g.border="1px solid red";g.border=f;m=g.borderLeft?function(d,s){var r;if(s!==l&&s.toLowerCase().indexOf(q)!=-1){s=l;}if(e(d[s])){switch(s){case o:case"filter":a(d);break;case"font":d.font=d.fontStyle=d.fontVariant=d.fontWeight=d.fontSize=d.lineHeight=d.fontFamily=f;break;default:for(r in d){if(r.indexOf(s)===0){d[r]=f;}}}}}:function(d,p){if(p!==l&&p.toLowerCase().indexOf(q)!=-1){p=l;}if(e(d[p])){if(p===o){a(d);}else{d[p]=f;}}};function i(x,s){var A,v,z,y={},p,B,u,w,d,t;if(!(b.instanceOf(this,i))){return new i(x,s);}if(x){if(b.Node&&x instanceof b.Node){v=x._node;}else{if(x.nodeName){v=x;}else{if(e(x)){if(x&&j[x]){return j[x];}v=k.getElementById(x.replace(/^#/,f));}}}if(v&&j[b.stamp(v)]){return j[b.stamp(v)];}}if(!v||!/^(?:style|link)$/i.test(v.nodeName)){v=k.createElement("style");v.type="text/css";}if(e(x)){if(x.indexOf("{")!=-1){if(v.styleSheet){v.styleSheet.cssText=x;}else{v.appendChild(k.createTextNode(x));}}else{if(!s){s=x;}}}if(!v.parentNode||v.parentNode.nodeName.toLowerCase()!=="head"){A=(v.ownerDocument||k).getElementsByTagName("head")[0];A.appendChild(v);}z=v.sheet||v.styleSheet;p=z&&("cssRules"in z)?"cssRules":"rules";u=("deleteRule"in z)?function(r){z.deleteRule(r);}:function(r){z.removeRule(r);};B=("insertRule"in z)?function(D,C,r){z.insertRule(D+" {"+C+"}",r);}:function(D,C,r){z.addRule(D,C,r);};for(w=z[p].length-1;w>=0;--w){d=z[p][w];t=d.selectorText;if(y[t]){y[t].style.cssText+=";"+d.style.cssText;u(w);}else{y[t]=d;}}i.register(b.stamp(v),this);if(s){i.register(s,this);}b.mix(this,{getId:function(){return b.stamp(v);},enable:function(){z.disabled=false;return this;},disable:function(){z.disabled=true;return this;},isEnabled:function(){return!z.disabled;},set:function(E,D){var G=y[E],F=E.split(/\s*,\s*/),C,r;if(F.length>1){for(C=F.length-1;C>=0;--C){this.set(F[C],D);}return this;}if(!i.isValidSelector(E)){return this;}if(G){G.style.cssText=i.toCssText(D,G.style.cssText);}else{r=z[p].length;D=i.toCssText(D);if(D){B(E,D,r);y[E]=z[p][r];}}return this;},unset:function(E,D){var G=y[E],F=E.split(/\s*,\s*/),r=!D,H,C;if(F.length>1){for(C=F.length-1;C>=0;--C){this.unset(F[C],D);}return this;}if(G){if(!r){D=b.Array(D);g.cssText=G.style.cssText;for(C=D.length-1;C>=0;--C){m(g,D[C]);}if(g.cssText){G.style.cssText=g.cssText;}else{r=true;}}if(r){H=z[p];for(C=H.length-1;C>=0;--C){if(H[C]===G){delete y[E];u(C);break;}}}}return this;},getCssText:function(D){var E,C,r;if(e(D)){E=y[D.split(/\s*,\s*/)[0]];return E?E.style.cssText:null;}else{C=[];for(r in y){if(y.hasOwnProperty(r)){E=y[r];C.push(E.selectorText+" {"+E.style.cssText+"}");}}return C.join("\n");}}});}h=function(r,t){var s=r.styleFloat||r.cssFloat||r[q],d=b.Lang.trim,v;try{g.cssText=t||f;}catch(u){c=k.createElement("p");g=c.style;g.cssText=t||f;}if(s&&!r[l]){r=b.merge(r);delete r.styleFloat;delete r.cssFloat;delete r[q];r[l]=s;}for(v in r){if(r.hasOwnProperty(v)){try{g[v]=d(r[v]);}catch(p){}}}return g.cssText;};b.mix(i,{toCssText:((o in g)?h:function(d,p){if(o in d){d=b.merge(d,{filter:"alpha(opacity="+(d.opacity*100)+")"});delete d.opacity;}return h(d,p);}),register:function(d,p){return!!(d&&p instanceof i&&!j[d]&&(j[d]=p));},isValidSelector:function(p){var d=false;if(p&&e(p)){if(!n.hasOwnProperty(p)){n[p]=!/\S/.test(p.replace(/\s+|\s*[+~>]\s*/g," ").replace(/([^ ])\[.*?\]/g,"$1").replace(/([^ ])::?[a-z][a-z\-]+[a-z](?:\(.*?\))?/ig,"$1").replace(/(?:^| )[a-z0-6]+/ig," ").replace(/\\./g,f).replace(/[.#]\w[\w\-]*/g,f));}d=n[p];}return d;}},true);b.StyleSheet=i;},"3.3.0"); diff --git a/include/javascript/yui3/build/stylesheet/stylesheet.js b/include/javascript/yui3/build/stylesheet/stylesheet.js index 955a7b6e..765d06de 100644 --- a/include/javascript/yui3/build/stylesheet/stylesheet.js +++ b/include/javascript/yui3/build/stylesheet/stylesheet.js @@ -1,14 +1,14 @@ /* - Copyright (c) 2009, Yahoo! Inc. All rights reserved. + Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 3.0.0 - build: 1549 + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 */ YUI.add('stylesheet',function(Y){var d=Y.config.doc,p=d.createElement('p'),workerStyle=p.style,isString=Y.Lang.isString,selectors={},sheets={},floatAttr=('cssFloat'in workerStyle)?'cssFloat':'styleFloat',_toCssText,_unsetOpacity,_unsetProperty,OPACITY='opacity',FLOAT='float',EMPTY='';_unsetOpacity=(OPACITY in workerStyle)?function(style){style.opacity=EMPTY;}:function(style){style.filter=EMPTY;};workerStyle.border="1px solid red";workerStyle.border=EMPTY;_unsetProperty=workerStyle.borderLeft?function(style,prop){var p;if(prop!==floatAttr&&prop.toLowerCase().indexOf(FLOAT)!=-1){prop=floatAttr;} if(isString(style[prop])){switch(prop){case OPACITY:case'filter':_unsetOpacity(style);break;case'font':style.font=style.fontStyle=style.fontVariant=style.fontWeight=style.fontSize=style.lineHeight=style.fontFamily=EMPTY;break;default:for(p in style){if(p.indexOf(prop)===0){style[p]=EMPTY;}}}}}:function(style,prop){if(prop!==floatAttr&&prop.toLowerCase().indexOf(FLOAT)!=-1){prop=floatAttr;} -if(isString(style[prop])){if(prop===OPACITY){_unsetOpacity(style);}else{style[prop]=EMPTY;}}};function StyleSheet(seed,name){var head,node,sheet,cssRules={},_rules,_insertRule,_deleteRule,i,r,sel;if(!(this instanceof StyleSheet)){return new StyleSheet(seed,name);} -if(seed){if(Y.Node&&seed instanceof Y.Node){node=Y.Node.getDOMNode(seed);}else if(seed.nodeName){node=seed;}else if(isString(seed)){if(seed&&sheets[seed]){return sheets[seed];} +if(isString(style[prop])){if(prop===OPACITY){_unsetOpacity(style);}else{style[prop]=EMPTY;}}};function StyleSheet(seed,name){var head,node,sheet,cssRules={},_rules,_insertRule,_deleteRule,i,r,sel;if(!(Y.instanceOf(this,StyleSheet))){return new StyleSheet(seed,name);} +if(seed){if(Y.Node&&seed instanceof Y.Node){node=seed._node;}else if(seed.nodeName){node=seed;}else if(isString(seed)){if(seed&&sheets[seed]){return sheets[seed];} node=d.getElementById(seed.replace(/^#/,EMPTY));} if(node&&sheets[Y.stamp(node)]){return sheets[Y.stamp(node)];}} if(!node||!/^(?:style|link)$/i.test(node.nodeName)){node=d.createElement('style');node.type='text/css';} @@ -25,12 +25,13 @@ return this;} if(rule){if(!remove){css=Y.Array(css);workerStyle.cssText=rule.style.cssText;for(i=css.length-1;i>=0;--i){_unsetProperty(workerStyle,css[i]);} if(workerStyle.cssText){rule.style.cssText=workerStyle.cssText;}else{remove=true;}} if(remove){rules=sheet[_rules];for(i=rules.length-1;i>=0;--i){if(rules[i]===rule){delete cssRules[sel];_deleteRule(i);break;}}}} -return this;},getCssText:function(sel){var rule,css;if(isString(sel)){rule=cssRules[sel.split(/\s*,\s*/)[0]];return rule?rule.style.cssText:null;}else{css=[];for(sel in cssRules){if(cssRules.hasOwnProperty(sel)){rule=cssRules[sel];css.push(rule.selectorText+" {"+rule.style.cssText+"}");}} +return this;},getCssText:function(sel){var rule,css,selector;if(isString(sel)){rule=cssRules[sel.split(/\s*,\s*/)[0]];return rule?rule.style.cssText:null;}else{css=[];for(selector in cssRules){if(cssRules.hasOwnProperty(selector)){rule=cssRules[selector];css.push(rule.selectorText+" {"+rule.style.cssText+"}");}} return css.join("\n");}}});} -_toCssText=function(css,base){var f=css.styleFloat||css.cssFloat||css[FLOAT],trim=Y.Lang.trim,prop;workerStyle.cssText=base||EMPTY;if(f&&!css[floatAttr]){css=Y.merge(css);delete css.styleFloat;delete css.cssFloat;delete css[FLOAT];css[floatAttr]=f;} +_toCssText=function(css,base){var f=css.styleFloat||css.cssFloat||css[FLOAT],trim=Y.Lang.trim,prop;try{workerStyle.cssText=base||EMPTY;}catch(e){p=d.createElement('p');workerStyle=p.style;workerStyle.cssText=base||EMPTY;} +if(f&&!css[floatAttr]){css=Y.merge(css);delete css.styleFloat;delete css.cssFloat;delete css[FLOAT];css[floatAttr]=f;} for(prop in css){if(css.hasOwnProperty(prop)){try{workerStyle[prop]=trim(css[prop]);} -catch(e){}}} +catch(ex){}}} return workerStyle.cssText;};Y.mix(StyleSheet,{toCssText:((OPACITY in workerStyle)?_toCssText:function(css,cssText){if(OPACITY in css){css=Y.merge(css,{filter:'alpha(opacity='+(css.opacity*100)+')'});delete css.opacity;} return _toCssText(css,cssText);}),register:function(name,sheet){return!!(name&&sheet instanceof StyleSheet&&!sheets[name]&&(sheets[name]=sheet));},isValidSelector:function(sel){var valid=false;if(sel&&isString(sel)){if(!selectors.hasOwnProperty(sel)){selectors[sel]=!/\S/.test(sel.replace(/\s+|\s*[+~>]\s*/g,' ').replace(/([^ ])\[.*?\]/g,'$1').replace(/([^ ])::?[a-z][a-z\-]+[a-z](?:\(.*?\))?/ig,'$1').replace(/(?:^| )[a-z0-6]+/ig,' ').replace(/\\./g,EMPTY).replace(/[.#]\w[\w\-]*/g,EMPTY));} valid=selectors[sel];} -return valid;}},true);Y.StyleSheet=StyleSheet;},'3.0.0'); \ No newline at end of file +return valid;}},true);Y.StyleSheet=StyleSheet;},'3.3.0'); diff --git a/include/javascript/yui3/build/substitute/substitute-min.js b/include/javascript/yui3/build/substitute/substitute-min.js index 43cd0b46..84f5b3de 100644 --- a/include/javascript/yui3/build/substitute/substitute-min.js +++ b/include/javascript/yui3/build/substitute/substitute-min.js @@ -1,8 +1,8 @@ /* - Copyright (c) 2009, Yahoo! Inc. All rights reserved. + Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 3.0.0 - build: 1549 + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 */ -YUI.add("substitute",function(G){var B=G.Lang,D="dump",F=" ",C="{",E="}",A=function(U,I,P,K,H){var N,M,L,S,R,T,Q=[],J,O;K=K||C;H=H||E;for(;;){N=U.lastIndexOf(K);if(N<0){break;}M=U.indexOf(H,N);if(N+1>=M){break;}J=U.substring(N+1,M);S=J;T=null;L=S.indexOf(F);if(L>-1){T=S.substring(L+1);S=S.substring(0,L);}R=I[S];if(P){R=P(S,R,T);}if(B.isObject(R)){if(!G.dump){R=R.toString();}else{if(B.isArray(R)){R=G.dump(R,parseInt(T,10));}else{T=T||"";O=T.indexOf(D);if(O>-1){T=T.substring(4);}if(R.toString===Object.prototype.toString||O>-1){R=G.dump(R,parseInt(T,10));}else{R=R.toString();}}}}else{if(!B.isString(R)&&!B.isNumber(R)){R="~-"+Q.length+"-~";Q[Q.length]=J;}}U=U.substring(0,N)+R+U.substring(M+1);}for(N=Q.length-1;N>=0;N=N-1){U=U.replace(new RegExp("~-"+N+"-~"),K+Q[N]+H,"g");}return U;};G.substitute=A;B.substitute=A;},"3.0.0",{optional:["dump"]}); \ No newline at end of file +YUI.add("substitute",function(g){var b=g.Lang,d="dump",f=" ",c="{",e="}",a=function(A,l,t,h){var q,p,n,y,x,z,w=[],m,r,u=A.length;for(;;){q=A.lastIndexOf(c,u);if(q<0){break;}p=A.indexOf(e,q);if(q+1>=p){break;}m=A.substring(q+1,p);y=m;z=null;n=y.indexOf(f);if(n>-1){z=y.substring(n+1);y=y.substring(0,n);}x=l[y];if(t){x=t(y,x,z);}if(b.isObject(x)){if(!g.dump){x=x.toString();}else{if(b.isArray(x)){x=g.dump(x,parseInt(z,10));}else{z=z||"";r=z.indexOf(d);if(r>-1){z=z.substring(4);}if(x.toString===Object.prototype.toString||r>-1){x=g.dump(x,parseInt(z,10));}else{x=x.toString();}}}}else{if(!b.isString(x)&&!b.isNumber(x)){x="~-"+w.length+"-~";w[w.length]=m;}}A=A.substring(0,q)+x+A.substring(p+1);if(!h){u=q-1;}}for(q=w.length-1;q>=0;q=q-1){A=A.replace(new RegExp("~-"+q+"-~"),c+w[q]+e,"g");}return A;};g.substitute=a;b.substitute=a;},"3.3.0",{optional:["dump"]}); diff --git a/include/javascript/yui3/build/substitute/substitute.js b/include/javascript/yui3/build/substitute/substitute.js index aeb1917b..8dc93020 100644 --- a/include/javascript/yui3/build/substitute/substitute.js +++ b/include/javascript/yui3/build/substitute/substitute.js @@ -1,16 +1,17 @@ /* - Copyright (c) 2009, Yahoo! Inc. All rights reserved. + Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 3.0.0 - build: 1549 + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 */ -YUI.add('substitute',function(Y){var L=Y.Lang,DUMP='dump',SPACE=' ',LBRACE='{',RBRACE='}',substitute=function(s,o,f,ldelim,rdelim){var i,j,k,key,v,meta,saved=[],token,dump;ldelim=ldelim||LBRACE;rdelim=rdelim||RBRACE;for(;;){i=s.lastIndexOf(ldelim);if(i<0){break;} -j=s.indexOf(rdelim,i);if(i+1>=j){break;} +YUI.add('substitute',function(Y){var L=Y.Lang,DUMP='dump',SPACE=' ',LBRACE='{',RBRACE='}',substitute=function(s,o,f,recurse){var i,j,k,key,v,meta,saved=[],token,dump,lidx=s.length;for(;;){i=s.lastIndexOf(LBRACE,lidx);if(i<0){break;} +j=s.indexOf(RBRACE,i);if(i+1>=j){break;} token=s.substring(i+1,j);key=token;meta=null;k=key.indexOf(SPACE);if(k>-1){meta=key.substring(k+1);key=key.substring(0,k);} v=o[key];if(f){v=f(key,v,meta);} -if(L.isObject(v)){if(!Y.dump){v=v.toString();}else{if(L.isArray(v)){v=Y.dump(v,parseInt(meta,10));}else{meta=meta||"";dump=meta.indexOf(DUMP);if(dump>-1){meta=meta.substring(4);} -if(v.toString===Object.prototype.toString||dump>-1){v=Y.dump(v,parseInt(meta,10));}else{v=v.toString();}}}}else if(!L.isString(v)&&!L.isNumber(v)){v="~-"+saved.length+"-~";saved[saved.length]=token;} -s=s.substring(0,i)+v+s.substring(j+1);} -for(i=saved.length-1;i>=0;i=i-1){s=s.replace(new RegExp("~-"+i+"-~"),ldelim+saved[i]+rdelim,"g");} -return s;};Y.substitute=substitute;L.substitute=substitute;},'3.0.0',{optional:['dump']}); \ No newline at end of file +if(L.isObject(v)){if(!Y.dump){v=v.toString();}else{if(L.isArray(v)){v=Y.dump(v,parseInt(meta,10));}else{meta=meta||'';dump=meta.indexOf(DUMP);if(dump>-1){meta=meta.substring(4);} +if(v.toString===Object.prototype.toString||dump>-1){v=Y.dump(v,parseInt(meta,10));}else{v=v.toString();}}}}else if(!L.isString(v)&&!L.isNumber(v)){v='~-'+saved.length+'-~';saved[saved.length]=token;} +s=s.substring(0,i)+v+s.substring(j+1);if(!recurse){lidx=i-1;}} +for(i=saved.length-1;i>=0;i=i-1){s=s.replace(new RegExp('~-'+i+'-~'),LBRACE+ +saved[i]+RBRACE,'g');} +return s;};Y.substitute=substitute;L.substitute=substitute;},'3.3.0',{optional:['dump']}); diff --git a/include/javascript/yui3/build/swf/swf-min.js b/include/javascript/yui3/build/swf/swf-min.js new file mode 100644 index 00000000..55821902 --- /dev/null +++ b/include/javascript/yui3/build/swf/swf-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("swf",function(B){var M=B.Event,G=B.SWFDetect,I=B.Lang,H=B.UA,J=B.Node,F="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",E="application/x-shockwave-flash",D="10.0.22",A="http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?"+Math.random(),C="SWF.eventHandler",K={align:"",allowFullScreen:"",allowNetworking:"",allowScriptAccess:"",base:"",bgcolor:"",menu:"",name:"",quality:"",salign:"",scale:"",tabindex:"",wmode:""};function L(R,O,c){this._id=B.guid("yuiswf");var S=this._id;var W=J.one(R);var f=c["version"]||D;var Z=(f+"").split(".");var T=G.isFlashVersionAtLeast(parseInt(Z[0]),parseInt(Z[1]),parseInt(Z[2]));var Y=(G.isFlashVersionAtLeast(8,0,0));var Q=Y&&!T&&c["useExpressInstall"];var P=(Q)?A:O;var e="';if(H.ie){e+='';}for(var V in c.fixedAttributes){if(K.hasOwnProperty(V)){e+='';}}for(var X in c.flashVars){var N=c.flashVars[X];if(I.isString(N)){d+="&"+X+"="+encodeURIComponent(N);}}if(d){e+='';}e+="";W.setContent(e);this._swf=J.one("#"+S);}else{var a={};a.type="wrongflashversion";this.publish("wrongflashversion",{fireOnce:true});this.fire("wrongflashversion",a);}}L._instances=L._instances||{};L.eventHandler=function(N,O){L._instances[N]._eventHandler(O);};L.prototype={_eventHandler:function(N){if(N.type==="swfReady"){this.publish("swfReady",{fireOnce:true});this.fire("swfReady",N);}else{if(N.type==="log"){}else{this.fire(N.type,N);}}},callSWF:function(O,N){if(!N){N=[];}if(this._swf._node[O]){return(this._swf._node[O].apply(this._swf._node,N));}else{return null;}},toString:function(){return"SWF "+this._id;}};B.augment(L,B.EventTarget);B.SWF=L;},"3.3.0"); diff --git a/include/javascript/yui3/build/swf/swf.js b/include/javascript/yui3/build/swf/swf.js new file mode 100644 index 00000000..176f72cd --- /dev/null +++ b/include/javascript/yui3/build/swf/swf.js @@ -0,0 +1,23 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('swf',function(Y){var Event=Y.Event,SWFDetect=Y.SWFDetect,Lang=Y.Lang,uA=Y.UA,Node=Y.Node,FLASH_CID="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",FLASH_TYPE="application/x-shockwave-flash",FLASH_VER="10.0.22",EXPRESS_INSTALL_URL="http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?"+Math.random(),EVENT_HANDLER="SWF.eventHandler",possibleAttributes={align:"",allowFullScreen:"",allowNetworking:"",allowScriptAccess:"",base:"",bgcolor:"",menu:"",name:"",quality:"",salign:"",scale:"",tabindex:"",wmode:""};function SWF(p_oElement,swfURL,p_oAttributes){this._id=Y.guid("yuiswf");var _id=this._id;var oElement=Node.one(p_oElement);var flashVersion=p_oAttributes["version"]||FLASH_VER;var flashVersionSplit=(flashVersion+'').split(".");var isFlashVersionRight=SWFDetect.isFlashVersionAtLeast(parseInt(flashVersionSplit[0]),parseInt(flashVersionSplit[1]),parseInt(flashVersionSplit[2]));var canExpressInstall=(SWFDetect.isFlashVersionAtLeast(8,0,0));var shouldExpressInstall=canExpressInstall&&!isFlashVersionRight&&p_oAttributes["useExpressInstall"];var flashURL=(shouldExpressInstall)?EXPRESS_INSTALL_URL:swfURL;var objstring='';if(uA.ie){objstring+='';} +for(var attribute in p_oAttributes.fixedAttributes){if(possibleAttributes.hasOwnProperty(attribute)){objstring+='';}} +for(var flashvar in p_oAttributes.flashVars){var fvar=p_oAttributes.flashVars[flashvar];if(Lang.isString(fvar)){flashvarstring+="&"+flashvar+"="+encodeURIComponent(fvar);}} +if(flashvarstring){objstring+='';} +objstring+="";oElement.setContent(objstring);this._swf=Node.one("#"+_id);} +else{var event={};event.type="wrongflashversion";this.publish("wrongflashversion",{fireOnce:true});this.fire("wrongflashversion",event);}};SWF._instances=SWF._instances||{};SWF.eventHandler=function(swfid,event){SWF._instances[swfid]._eventHandler(event);};SWF.prototype={_eventHandler:function(event) +{if(event.type==="swfReady") +{this.publish("swfReady",{fireOnce:true});this.fire("swfReady",event);} +else if(event.type==="log") +{} +else +{this.fire(event.type,event);}},callSWF:function(func,args) +{if(!args){args=[];};if(this._swf._node[func]){return(this._swf._node[func].apply(this._swf._node,args));}else{return null;}},toString:function() +{return"SWF "+this._id;}};Y.augment(SWF,Y.EventTarget);Y.SWF=SWF;},'3.3.0'); diff --git a/include/javascript/yui3/build/swfdetect/swfdetect-min.js b/include/javascript/yui3/build/swfdetect/swfdetect-min.js new file mode 100644 index 00000000..39112d5a --- /dev/null +++ b/include/javascript/yui3/build/swfdetect/swfdetect-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("swfdetect",function(C){var J=0,H=C.UA,E=C.Lang,M="ShockwaveFlash",B,G,D,N,A;function L(O){return parseInt(O,10);}function F(O){if(E.isNumber(L(O[0]))){H.flashMajor=O[0];}if(E.isNumber(L(O[1]))){H.flashMinor=O[1];}if(E.isNumber(L(O[2]))){H.flashRev=O[2];}}if(H.gecko||H.webkit||H.opera){if((B=navigator.mimeTypes["application/x-shockwave-flash"])){if((G=B.enabledPlugin)){D=G.description.replace(/\s[rd]/g,".").replace(/[A-Za-z\s]+/g,"").split(".");F(D);}}}else{if(H.ie){try{N=new ActiveXObject(M+"."+M+".6");N.AllowScriptAccess="always";}catch(I){if(N!==null){J=6;}}if(J===0){try{A=new ActiveXObject(M+"."+M);D=A.GetVariable("$version").replace(/[A-Za-z\s]+/g,"").split(",");F(D);}catch(K){}}}}C.SWFDetect={getFlashVersion:function(){return(String(H.flashMajor)+"."+String(H.flashMinor)+"."+String(H.flashRev));},isFlashVersionAtLeast:function(R,T,S){var P=L(H.flashMajor),Q=L(H.flashMinor),O=L(H.flashRev);R=L(R||0);T=L(T||0);S=L(S||0);if(R===P){if(T===Q){return S<=O;}return T ul",tab:"> ul > li",tabLabel:"> ul > li > a ",tabviewPanel:"> div",tabPanel:"> div > div",selectedTab:"> ul > "+i+d.selectedTab,selectedPanel:"> div "+i+d.selectedPanel},a=function(m){this.init.apply(this,arguments);};a.NAME="tabviewBase";a._queries=e;a._classNames=d;b.mix(a.prototype,{init:function(m){m=m||h;this._node=m.host||b.one(m.node);this.refresh();},initClassNames:function(m){b.Object.each(e,function(p,o){if(d[o]){var n=this.all(p);if(m!==undefined){n=n.item(m);}if(n){n.addClass(d[o]);}}},this._node);this._node.addClass(d.tabview);},_select:function(n){var q=this._node,r=q.one(e.selectedTab),p=q.one(e.selectedPanel),o=q.all(e.tab).item(n),m=q.all(e.tabPanel).item(n);if(r){r.removeClass(d.selectedTab);}if(p){p.removeClass(d.selectedPanel);}if(o){o.addClass(d.selectedTab);}if(m){m.addClass(d.selectedPanel);}},initState:function(){var n=this._node,o=n.one(e.selectedTab),m=o?n.all(e.tab).indexOf(o):0;this._select(m);},_scrubTextNodes:function(){this._node.one(e.tabviewList).get("childNodes").each(function(m){if(m.get("nodeType")===3){m.remove();}});},refresh:function(){this._scrubTextNodes();this.initClassNames();this.initState();this.initEvents();},tabEventName:"click",initEvents:function(){this._node.delegate(this.tabEventName,this.onTabEvent,e.tab,this);},onTabEvent:function(m){m.preventDefault();this._select(this._node.all(e.tab).indexOf(m.currentTarget));},destroy:function(){this._node.detach(this.tabEventName);}});b.TabviewBase=a;},"3.3.0",{requires:["node-event-delegate","classnamemanager","skin-sam-tabview"]}); diff --git a/include/javascript/yui3/build/tabview/tabview-base.js b/include/javascript/yui3/build/tabview/tabview-base.js new file mode 100644 index 00000000..ba704b2f --- /dev/null +++ b/include/javascript/yui3/build/tabview/tabview-base.js @@ -0,0 +1,12 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('tabview-base',function(Y){var getClassName=Y.ClassNameManager.getClassName,TABVIEW='tabview',TAB='tab',CONTENT='content',PANEL='panel',SELECTED='selected',EMPTY_OBJ={},DOT='.',_classNames={tabview:getClassName(TABVIEW),tabviewPanel:getClassName(TABVIEW,PANEL),tabviewList:getClassName(TABVIEW,'list'),tab:getClassName(TAB),tabLabel:getClassName(TAB,'label'),tabPanel:getClassName(TAB,PANEL),selectedTab:getClassName(TAB,SELECTED),selectedPanel:getClassName(TAB,PANEL,SELECTED)},_queries={tabview:DOT+_classNames.tabview,tabviewList:'> ul',tab:'> ul > li',tabLabel:'> ul > li > a ',tabviewPanel:'> div',tabPanel:'> div > div',selectedTab:'> ul > '+DOT+_classNames.selectedTab,selectedPanel:'> div '+DOT+_classNames.selectedPanel},TabviewBase=function(config){this.init.apply(this,arguments);};TabviewBase.NAME='tabviewBase';TabviewBase._queries=_queries;TabviewBase._classNames=_classNames;Y.mix(TabviewBase.prototype,{init:function(config){config=config||EMPTY_OBJ;this._node=config.host||Y.one(config.node);this.refresh();},initClassNames:function(index){Y.Object.each(_queries,function(query,name){if(_classNames[name]){var result=this.all(query);if(index!==undefined){result=result.item(index);} +if(result){result.addClass(_classNames[name]);}}},this._node);this._node.addClass(_classNames.tabview);},_select:function(index){var node=this._node,oldItem=node.one(_queries.selectedTab),oldContent=node.one(_queries.selectedPanel),newItem=node.all(_queries.tab).item(index),newContent=node.all(_queries.tabPanel).item(index);if(oldItem){oldItem.removeClass(_classNames.selectedTab);} +if(oldContent){oldContent.removeClass(_classNames.selectedPanel);} +if(newItem){newItem.addClass(_classNames.selectedTab);} +if(newContent){newContent.addClass(_classNames.selectedPanel);}},initState:function(){var node=this._node,activeNode=node.one(_queries.selectedTab),activeIndex=activeNode?node.all(_queries.tab).indexOf(activeNode):0;this._select(activeIndex);},_scrubTextNodes:function(){this._node.one(_queries.tabviewList).get('childNodes').each(function(node){if(node.get('nodeType')===3){node.remove();}});},refresh:function(){this._scrubTextNodes();this.initClassNames();this.initState();this.initEvents();},tabEventName:'click',initEvents:function(){this._node.delegate(this.tabEventName,this.onTabEvent,_queries.tab,this);},onTabEvent:function(e){e.preventDefault();this._select(this._node.all(_queries.tab).indexOf(e.currentTarget));},destroy:function(){this._node.detach(this.tabEventName);}});Y.TabviewBase=TabviewBase;},'3.3.0',{requires:['node-event-delegate','classnamemanager','skin-sam-tabview']}); diff --git a/include/javascript/yui3/build/tabview/tabview-min.js b/include/javascript/yui3/build/tabview/tabview-min.js new file mode 100644 index 00000000..f5a59384 --- /dev/null +++ b/include/javascript/yui3/build/tabview/tabview-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("tabview",function(f){var a=f.TabviewBase._queries,e=f.TabviewBase._classNames,g=".",b=f.ClassNameManager.getClassName,c=f.Base.create("tabView",f.Widget,[f.WidgetParent],{_afterChildAdded:function(h){this.get("contentBox").focusManager.refresh();},_defListNodeValueFn:function(){return f.Node.create(c.LIST_TEMPLATE);},_defPanelNodeValueFn:function(){return f.Node.create(c.PANEL_TEMPLATE);},_afterChildRemoved:function(k){var h=k.index,j=this.get("selection");if(!j){j=this.item(h-1)||this.item(0);if(j){j.set("selected",1);}}this.get("contentBox").focusManager.refresh();},_initAria:function(){var h=this.get("contentBox"),i=h.one(a.tabviewList);if(i){i.setAttrs({role:"tablist"});}},bindUI:function(){this.get("contentBox").plug(f.Plugin.NodeFocusManager,{descendants:g+e.tabLabel,keys:{next:"down:39",previous:"down:37"},circular:true});this.after("render",this._setDefSelection);this.after("addChild",this._afterChildAdded);this.after("removeChild",this._afterChildRemoved);},renderUI:function(){var h=this.get("contentBox");this._renderListBox(h);this._renderPanelBox(h);this._childrenContainer=this.get("listNode");this._renderTabs(h);},_setDefSelection:function(h){var i=this.get("selection")||this.item(0);this.some(function(j){if(j.get("selected")){i=j;return true;}});if(i){this.set("selection",i);i.set("selected",1);}},_renderListBox:function(h){var i=this.get("listNode");if(!i.inDoc()){h.append(i);}},_renderPanelBox:function(h){var i=this.get("panelNode");if(!i.inDoc()){h.append(i);}},_renderTabs:function(h){var k=h.all(a.tab),i=this.get("panelNode"),j=(i)?this.get("panelNode").get("children"):null,l=this;if(k){k.addClass(e.tab);h.all(a.tabLabel).addClass(e.tabLabel);h.all(a.tabPanel).addClass(e.tabPanel);k.each(function(o,n){var m=(j)?j.item(n):null;l.add({boundingBox:o,contentBox:o.one(g+e.tabLabel),label:o.one(g+e.tabLabel).get("text"),panelNode:m});});}}},{LIST_TEMPLATE:'
      ',PANEL_TEMPLATE:'
      ',ATTRS:{defaultChildType:{value:"Tab"},listNode:{setter:function(h){h=f.one(h);if(h){h.addClass(e.tabviewList);}return h;},valueFn:"_defListNodeValueFn"},panelNode:{setter:function(h){h=f.one(h);if(h){h.addClass(e.tabviewPanel);}return h;},valueFn:"_defPanelNodeValueFn"},tabIndex:{value:null}},HTML_PARSER:{listNode:a.tabviewList,panelNode:a.tabviewPanel}});f.TabView=c;var d=f.Lang,a=f.TabviewBase._queries,e=f.TabviewBase._classNames,b=f.ClassNameManager.getClassName;f.Tab=f.Base.create("tab",f.Widget,[f.WidgetChild],{BOUNDING_TEMPLATE:'
    • ',CONTENT_TEMPLATE:'',PANEL_TEMPLATE:'
      ',_uiSetSelectedPanel:function(h){this.get("panelNode").toggleClass(e.selectedPanel,h);},_afterTabSelectedChange:function(h){this._uiSetSelectedPanel(h.newVal);},_afterParentChange:function(h){if(!h.newVal){this._remove();}else{this._add();}},_initAria:function(){var i=this.get("contentBox"),j=i.get("id"),h=this.get("panelNode");if(!j){j=f.guid();i.set("id",j);}i.set("role","tab");i.get("parentNode").set("role","presentation");h.setAttrs({role:"tabpanel","aria-labelledby":j});},syncUI:function(){this.set("label",this.get("label"));this.set("content",this.get("content"));this._uiSetSelectedPanel(this.get("selected"));},bindUI:function(){this.after("selectedChange",this._afterTabSelectedChange);this.after("parentChange",this._afterParentChange);},renderUI:function(){this._renderPanel();this._initAria();},_renderPanel:function(){this.get("parent").get("panelNode").appendChild(this.get("panelNode"));},_add:function(){var i=this.get("parent").get("contentBox"),j=i.get("listNode"),h=i.get("panelNode");if(j){j.appendChild(this.get("boundingBox"));}if(h){h.appendChild(this.get("panelNode"));}},_remove:function(){this.get("boundingBox").remove();this.get("panelNode").remove();},_onActivate:function(h){if(h.target===this){h.domEvent.preventDefault();h.target.set("selected",1);}},initializer:function(){this.publish(this.get("triggerEvent"),{defaultFn:this._onActivate});},_defLabelSetter:function(h){this.get("contentBox").setContent(h);return h;},_defContentSetter:function(h){this.get("panelNode").setContent(h);return h;},_defPanelNodeValueFn:function(){var i=this.get("contentBox").get("href")||"",k=this.get("parent"),j=i.indexOf("#"),h;i=i.substr(j);if(i.charAt(0)==="#"){h=f.one(i);if(h){h.addClass(e.tabPanel);}}if(!h&&k){h=k.get("panelNode").get("children").item(this.get("index"));}if(!h){h=f.Node.create(this.PANEL_TEMPLATE);}return h;}},{ATTRS:{triggerEvent:{value:"click"},label:{setter:"_defLabelSetter",validator:d.isString},content:{setter:"_defContentSetter",validator:d.isString},panelNode:{setter:function(h){h=f.one(h);if(h){h.addClass(e.tabPanel);}return h;},valueFn:"_defPanelNodeValueFn"},tabIndex:{value:null,validator:"_validTabIndex"}},HTML_PARSER:{selected:function(h){var i=(this.get("boundingBox").hasClass(e.selectedTab))?1:0;return i;}}});},"3.3.0",{requires:["substitute","node-pluginhost","node-focusmanager","tabview-base","widget","widget-parent","widget-child"]}); diff --git a/include/javascript/yui3/build/tabview/tabview-plugin-min.js b/include/javascript/yui3/build/tabview/tabview-plugin-min.js new file mode 100644 index 00000000..17e06f41 --- /dev/null +++ b/include/javascript/yui3/build/tabview/tabview-plugin-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("tabview-plugin",function(b){function a(){a.superclass.constructor.apply(this,arguments);}a.NAME="tabviewPlugin";a.NS="tabs";b.extend(a,b.TabviewBase);b.namespace("Plugin");b.Plugin.Tabview=a;},"3.3.0",{requires:["node-pluginhost","tabview-base"]}); diff --git a/include/javascript/yui3/build/tabview/tabview-plugin.js b/include/javascript/yui3/build/tabview/tabview-plugin.js new file mode 100644 index 00000000..172e5c02 --- /dev/null +++ b/include/javascript/yui3/build/tabview/tabview-plugin.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('tabview-plugin',function(Y){function TabviewPlugin(){TabviewPlugin.superclass.constructor.apply(this,arguments);};TabviewPlugin.NAME='tabviewPlugin';TabviewPlugin.NS='tabs';Y.extend(TabviewPlugin,Y.TabviewBase);Y.namespace('Plugin');Y.Plugin.Tabview=TabviewPlugin;},'3.3.0',{requires:['node-pluginhost','tabview-base']}); diff --git a/include/javascript/yui3/build/tabview/tabview.js b/include/javascript/yui3/build/tabview/tabview.js new file mode 100644 index 00000000..75dfaef4 --- /dev/null +++ b/include/javascript/yui3/build/tabview/tabview.js @@ -0,0 +1,17 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('tabview',function(Y){var _queries=Y.TabviewBase._queries,_classNames=Y.TabviewBase._classNames,DOT='.',getClassName=Y.ClassNameManager.getClassName,TabView=Y.Base.create('tabView',Y.Widget,[Y.WidgetParent],{_afterChildAdded:function(e){this.get('contentBox').focusManager.refresh();},_defListNodeValueFn:function(){return Y.Node.create(TabView.LIST_TEMPLATE);},_defPanelNodeValueFn:function(){return Y.Node.create(TabView.PANEL_TEMPLATE);},_afterChildRemoved:function(e){var i=e.index,selection=this.get('selection');if(!selection){selection=this.item(i-1)||this.item(0);if(selection){selection.set('selected',1);}} +this.get('contentBox').focusManager.refresh();},_initAria:function(){var contentBox=this.get('contentBox'),tablist=contentBox.one(_queries.tabviewList);if(tablist){tablist.setAttrs({role:'tablist'});}},bindUI:function(){this.get('contentBox').plug(Y.Plugin.NodeFocusManager,{descendants:DOT+_classNames.tabLabel,keys:{next:'down:39',previous:'down:37'},circular:true});this.after('render',this._setDefSelection);this.after('addChild',this._afterChildAdded);this.after('removeChild',this._afterChildRemoved);},renderUI:function(){var contentBox=this.get('contentBox');this._renderListBox(contentBox);this._renderPanelBox(contentBox);this._childrenContainer=this.get('listNode');this._renderTabs(contentBox);},_setDefSelection:function(contentBox){var selection=this.get('selection')||this.item(0);this.some(function(tab){if(tab.get('selected')){selection=tab;return true;}});if(selection){this.set('selection',selection);selection.set('selected',1);}},_renderListBox:function(contentBox){var node=this.get('listNode');if(!node.inDoc()){contentBox.append(node);}},_renderPanelBox:function(contentBox){var node=this.get('panelNode');if(!node.inDoc()){contentBox.append(node);}},_renderTabs:function(contentBox){var tabs=contentBox.all(_queries.tab),panelNode=this.get('panelNode'),panels=(panelNode)?this.get('panelNode').get('children'):null,tabview=this;if(tabs){tabs.addClass(_classNames.tab);contentBox.all(_queries.tabLabel).addClass(_classNames.tabLabel);contentBox.all(_queries.tabPanel).addClass(_classNames.tabPanel);tabs.each(function(node,i){var panelNode=(panels)?panels.item(i):null;tabview.add({boundingBox:node,contentBox:node.one(DOT+_classNames.tabLabel),label:node.one(DOT+_classNames.tabLabel).get('text'),panelNode:panelNode});});}}},{LIST_TEMPLATE:'
        ',PANEL_TEMPLATE:'
        ',ATTRS:{defaultChildType:{value:'Tab'},listNode:{setter:function(node){node=Y.one(node);if(node){node.addClass(_classNames.tabviewList);} +return node;},valueFn:'_defListNodeValueFn'},panelNode:{setter:function(node){node=Y.one(node);if(node){node.addClass(_classNames.tabviewPanel);} +return node;},valueFn:'_defPanelNodeValueFn'},tabIndex:{value:null}},HTML_PARSER:{listNode:_queries.tabviewList,panelNode:_queries.tabviewPanel}});Y.TabView=TabView;var Lang=Y.Lang,_queries=Y.TabviewBase._queries,_classNames=Y.TabviewBase._classNames,getClassName=Y.ClassNameManager.getClassName;Y.Tab=Y.Base.create('tab',Y.Widget,[Y.WidgetChild],{BOUNDING_TEMPLATE:'
      • ',CONTENT_TEMPLATE:'',PANEL_TEMPLATE:'
        ',_uiSetSelectedPanel:function(selected){this.get('panelNode').toggleClass(_classNames.selectedPanel,selected);},_afterTabSelectedChange:function(event){this._uiSetSelectedPanel(event.newVal);},_afterParentChange:function(e){if(!e.newVal){this._remove();}else{this._add();}},_initAria:function(){var anchor=this.get('contentBox'),id=anchor.get('id'),panel=this.get('panelNode');if(!id){id=Y.guid();anchor.set('id',id);} +anchor.set('role','tab');anchor.get('parentNode').set('role','presentation');panel.setAttrs({role:'tabpanel','aria-labelledby':id});},syncUI:function(){this.set('label',this.get('label'));this.set('content',this.get('content'));this._uiSetSelectedPanel(this.get('selected'));},bindUI:function(){this.after('selectedChange',this._afterTabSelectedChange);this.after('parentChange',this._afterParentChange);},renderUI:function(){this._renderPanel();this._initAria();},_renderPanel:function(){this.get('parent').get('panelNode').appendChild(this.get('panelNode'));},_add:function(){var parent=this.get('parent').get('contentBox'),list=parent.get('listNode'),panel=parent.get('panelNode');if(list){list.appendChild(this.get('boundingBox'));} +if(panel){panel.appendChild(this.get('panelNode'));}},_remove:function(){this.get('boundingBox').remove();this.get('panelNode').remove();},_onActivate:function(e){if(e.target===this){e.domEvent.preventDefault();e.target.set('selected',1);}},initializer:function(){this.publish(this.get('triggerEvent'),{defaultFn:this._onActivate});},_defLabelSetter:function(label){this.get('contentBox').setContent(label);return label;},_defContentSetter:function(content){this.get('panelNode').setContent(content);return content;},_defPanelNodeValueFn:function(){var href=this.get('contentBox').get('href')||'',parent=this.get('parent'),hashIndex=href.indexOf('#'),panel;href=href.substr(hashIndex);if(href.charAt(0)==='#'){panel=Y.one(href);if(panel){panel.addClass(_classNames.tabPanel);}} +if(!panel&&parent){panel=parent.get('panelNode').get('children').item(this.get('index'));} +if(!panel){panel=Y.Node.create(this.PANEL_TEMPLATE);} +return panel;}},{ATTRS:{triggerEvent:{value:'click'},label:{setter:'_defLabelSetter',validator:Lang.isString},content:{setter:'_defContentSetter',validator:Lang.isString},panelNode:{setter:function(node){node=Y.one(node);if(node){node.addClass(_classNames.tabPanel);} +return node;},valueFn:'_defPanelNodeValueFn'},tabIndex:{value:null,validator:'_validTabIndex'}},HTML_PARSER:{selected:function(contentBox){var ret=(this.get('boundingBox').hasClass(_classNames.selectedTab))?1:0;return ret;}}});},'3.3.0',{requires:['substitute','node-pluginhost','node-focusmanager','tabview-base','widget','widget-parent','widget-child']}); diff --git a/include/javascript/yui3/build/test/assets/skins/sam/test-skin.css b/include/javascript/yui3/build/test/assets/skins/sam/test-skin.css new file mode 100644 index 00000000..0d5df1c4 --- /dev/null +++ b/include/javascript/yui3/build/test/assets/skins/sam/test-skin.css @@ -0,0 +1,20 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +.yui3-skin-sam .yui3-console-entry-pass .yui3-console-entry-cat { + background-color: green; + color: #fff; +} + +.yui3-skin-sam .yui3-console-entry-fail .yui3-console-entry-cat { + background-color: red; + color: #fff; +} + +.yui3-skin-sam .yui3-console-entry-ignore .yui3-console-entry-cat { + background-color: #666; +} diff --git a/include/javascript/yui3/build/test/assets/skins/sam/test.css b/include/javascript/yui3/build/test/assets/skins/sam/test.css new file mode 100644 index 00000000..e0c9f75e --- /dev/null +++ b/include/javascript/yui3/build/test/assets/skins/sam/test.css @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +.yui3-skin-sam .yui3-console-entry-pass .yui3-console-entry-cat{background-color:green;color:#fff;}.yui3-skin-sam .yui3-console-entry-fail .yui3-console-entry-cat{background-color:red;color:#fff;}.yui3-skin-sam .yui3-console-entry-ignore .yui3-console-entry-cat{background-color:#666;} diff --git a/include/javascript/yui3/build/test/assets/test-console.css b/include/javascript/yui3/build/test/assets/test-console.css index e343e7b7..d1c10a48 100644 --- a/include/javascript/yui3/build/test/assets/test-console.css +++ b/include/javascript/yui3/build/test/assets/test-console.css @@ -1,34 +1,18 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -.yui-log {padding-top:3em;} -/* -.yui-log-container {position:relative;width:60em} -.yui-log .yui-log-bd {height:auto; overflow:visible;} -*/ -.yui-log-container {width:40em} -.yui-log .yui-log-bd {height:60em} -.yui-log .yui-log-btns {display:none;} -.yui-log .yui-log-ft .yui-log-sourcefilters {visibility:hidden;} -.yui-log .yui-log-hd {display:none;} -.yui-log .yui-log-ft {position:absolute;top:0em;} - -.pass { +.yui3-skin-sam .yui3-console-entry-pass .yui3-console-entry-cat { background-color: green; - font-weight: bold; - color: white; } -.fail { + +.yui3-skin-sam .yui3-console-entry-fail .yui3-console-entry-cat { background-color: red; - font-weight: bold; - color: white; } -.ignore { + +.yui3-skin-sam .yui3-console-entry-ignore .yui3-console-entry-cat { background-color: #666; - font-weight: bold; - color: white; } diff --git a/include/javascript/yui3/build/test/test-min.js b/include/javascript/yui3/build/test/test-min.js index 58878a1e..2d828c72 100644 --- a/include/javascript/yui3/build/test/test-min.js +++ b/include/javascript/yui3/build/test/test-min.js @@ -1,8 +1,8 @@ /* - Copyright (c) 2009, Yahoo! Inc. All rights reserved. + Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 3.0.0 - build: 1549 + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 */ -YUI.add("test",function(B){B.namespace("Test");B.Test.Case=function(C){this._should={};for(var D in C){this[D]=C[D];}if(!B.Lang.isString(this.name)){this.name="testCase"+B.guid();}};B.Test.Case.prototype={resume:function(C){B.Test.Runner.resume(C);},wait:function(E,D){var C=arguments;if(B.Lang.isFunction(C[0])){throw new B.Test.Wait(C[0],C[1]);}else{throw new B.Test.Wait(function(){B.Assert.fail("Timeout: wait() called but resume() never called.");},(B.Lang.isNumber(C[0])?C[0]:10000));}},setUp:function(){},tearDown:function(){}};B.Test.Wait=function(D,C){this.segment=(B.Lang.isFunction(D)?D:null);this.delay=(B.Lang.isNumber(C)?C:0);};B.namespace("Test");B.Test.Suite=function(C){this.name="";this.items=[];if(B.Lang.isString(C)){this.name=C;}else{if(B.Lang.isObject(C)){B.mix(this,C,true);}}if(this.name===""){this.name="testSuite"+B.guid();}};B.Test.Suite.prototype={add:function(C){if(C instanceof B.Test.Suite||C instanceof B.Test.Case){this.items.push(C);}return this;},setUp:function(){},tearDown:function(){}};B.Test.Runner=(function(){function D(E){this.testObject=E;this.firstChild=null;this.lastChild=null;this.parent=null;this.next=null;this.results={passed:0,failed:0,total:0,ignored:0};if(E instanceof B.Test.Suite){this.results.type="testsuite";this.results.name=E.name;}else{if(E instanceof B.Test.Case){this.results.type="testcase";this.results.name=E.name;}}}D.prototype={appendChild:function(E){var F=new D(E);if(this.firstChild===null){this.firstChild=this.lastChild=F;}else{this.lastChild.next=F;this.lastChild=F;}F.parent=this;return F;}};function C(){C.superclass.constructor.apply(this,arguments);this.masterSuite=new B.Test.Suite("YUI Test Results");this._cur=null;this._root=null;this._log=true;this._waiting=false;var F=[this.TEST_CASE_BEGIN_EVENT,this.TEST_CASE_COMPLETE_EVENT,this.TEST_SUITE_BEGIN_EVENT,this.TEST_SUITE_COMPLETE_EVENT,this.TEST_PASS_EVENT,this.TEST_FAIL_EVENT,this.TEST_IGNORE_EVENT,this.COMPLETE_EVENT,this.BEGIN_EVENT];for(var E=0;E-1&&I.indexOf(" ")>-1))&&B.Lang.isFunction(G[I])){H.appendChild(I);}}},_addTestSuiteToTestTree:function(E,H){var G=E.appendChild(H);for(var F=0;F0){return B.Lang.substitute(D,{message:C});}else{return C;}},_getCount:function(){return this._asserts;},_increment:function(){this._asserts++;},_reset:function(){this._asserts=0;},fail:function(C){throw new B.Assert.Error(B.Assert._formatMessage(C,"Test force-failed."));},areEqual:function(D,E,C){B.Assert._increment();if(D!=E){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,"Values should be equal."),D,E);}},areNotEqual:function(C,E,D){B.Assert._increment();if(C==E){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(D,"Values should not be equal."),C);}},areNotSame:function(C,E,D){B.Assert._increment();if(C===E){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(D,"Values should not be the same."),C);}},areSame:function(D,E,C){B.Assert._increment();if(D!==E){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,"Values should be the same."),D,E);}},isFalse:function(D,C){B.Assert._increment();if(false!==D){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,"Value should be false."),false,D);}},isTrue:function(D,C){B.Assert._increment();if(true!==D){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,"Value should be true."),true,D);}},isNaN:function(D,C){B.Assert._increment();if(!isNaN(D)){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,"Value should be NaN."),NaN,D);}},isNotNaN:function(D,C){B.Assert._increment();if(isNaN(D)){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(C,"Values should not be NaN."),NaN);}},isNotNull:function(D,C){B.Assert._increment();if(B.Lang.isNull(D)){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(C,"Values should not be null."),null);}},isNotUndefined:function(D,C){B.Assert._increment();if(B.Lang.isUndefined(D)){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(C,"Value should not be undefined."),undefined);}},isNull:function(D,C){B.Assert._increment();if(!B.Lang.isNull(D)){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,"Value should be null."),null,D);}},isUndefined:function(D,C){B.Assert._increment();if(!B.Lang.isUndefined(D)){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,"Value should be undefined."),undefined,D);}},isArray:function(D,C){B.Assert._increment();if(!B.Lang.isArray(D)){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(C,"Value should be an array."),D);}},isBoolean:function(D,C){B.Assert._increment();if(!B.Lang.isBoolean(D)){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(C,"Value should be a Boolean."),D);}},isFunction:function(D,C){B.Assert._increment();if(!B.Lang.isFunction(D)){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(C,"Value should be a function."),D);}},isInstanceOf:function(D,E,C){B.Assert._increment();if(!(E instanceof D)){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,"Value isn't an instance of expected type."),D,E);}},isNumber:function(D,C){B.Assert._increment();if(!B.Lang.isNumber(D)){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(C,"Value should be a number."),D);}},isObject:function(D,C){B.Assert._increment();if(!B.Lang.isObject(D)){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(C,"Value should be an object."),D);}},isString:function(D,C){B.Assert._increment();if(!B.Lang.isString(D)){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(C,"Value should be a string."),D);}},isTypeOf:function(C,E,D){B.Assert._increment();if(typeof E!=C){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(D,"Value should be of type "+C+"."),expected,typeof E);}}};B.assert=function(D,C){B.Assert._increment();if(!D){throw new B.Assert.Error(B.Assert._formatMessage(C,"Assertion failed."));}};B.fail=B.Assert.fail;B.Assert.Error=function(C){arguments.callee.superclass.constructor.call(this,C);this.message=C;this.name="Assert Error";};B.extend(B.Assert.Error,Error,{getMessage:function(){return this.message;},toString:function(){return this.name+": "+this.getMessage();},valueOf:function(){return this.toString();}});B.Assert.ComparisonFailure=function(D,C,E){arguments.callee.superclass.constructor.call(this,D);this.expected=C;this.actual=E;this.name="ComparisonFailure";};B.extend(B.Assert.ComparisonFailure,B.Assert.Error,{getMessage:function(){return this.message+"\nExpected: "+this.expected+" ("+(typeof this.expected)+")"+"\nActual: "+this.actual+" ("+(typeof this.actual)+")";}});B.Assert.UnexpectedValue=function(D,C){arguments.callee.superclass.constructor.call(this,D);this.unexpected=C;this.name="UnexpectedValue";};B.extend(B.Assert.UnexpectedValue,B.Assert.Error,{getMessage:function(){return this.message+"\nUnexpected: "+this.unexpected+" ("+(typeof this.unexpected)+") ";}});B.Assert.ShouldFail=function(C){arguments.callee.superclass.constructor.call(this,C||"This test should fail but didn't.");this.name="ShouldFail";};B.extend(B.Assert.ShouldFail,B.Assert.Error);B.Assert.ShouldError=function(C){arguments.callee.superclass.constructor.call(this,C||"This test should have thrown an error but didn't.");this.name="ShouldError";};B.extend(B.Assert.ShouldError,B.Assert.Error);B.Assert.UnexpectedError=function(C){arguments.callee.superclass.constructor.call(this,"Unexpected error: "+C.message);this.cause=C;this.name="UnexpectedError";this.stack=C.stack;};B.extend(B.Assert.UnexpectedError,B.Assert.Error);B.ArrayAssert={contains:function(E,D,C){B.Assert._increment();if(B.Array.indexOf(D,E)==-1){B.Assert.fail(B.Assert._formatMessage(C,"Value "+E+" ("+(typeof E)+") not found in array ["+D+"]."));}},containsItems:function(E,F,D){B.Assert._increment();for(var C=0;C-1){B.Assert.fail(B.Assert._formatMessage(C,"Value found in array ["+D+"]."));}},doesNotContainItems:function(E,F,D){B.Assert._increment();for(var C=0;C-1){B.Assert.fail(B.Assert._formatMessage(D,"Value found in array ["+F+"]."));}}},doesNotContainMatch:function(E,D,C){B.Assert._increment();if(typeof E!="function"){throw new TypeError("ArrayAssert.doesNotContainMatch(): First argument must be a function.");}if(B.Array.some(D,E)){B.Assert.fail(B.Assert._formatMessage(C,"Value found in array ["+D+"]."));}},indexOf:function(G,F,C,E){B.Assert._increment();for(var D=0;D0){B.Assert.fail(B.Assert._formatMessage(C,"Array should be empty."));}},isNotEmpty:function(D,C){B.Assert._increment();if(D.length===0){B.Assert.fail(B.Assert._formatMessage(C,"Array should not be empty."));}},itemsAreSame:function(E,F,D){B.Assert._increment();if(E.length!=F.length){B.Assert.fail(B.Assert._formatMessage(D,"Array should have a length of "+E.length+" but has a length of "+F.length));}for(var C=0;C=0;D--){if(F[D]===G){if(C!=D){B.Assert.fail(B.Assert._formatMessage(E,"Value exists at index "+D+" but should be at index "+C+"."));}return;}}B.Assert.fail(B.Assert._formatMessage(E,"Value doesn't exist in array."));}};B.ObjectAssert={areEqual:function(D,E,C){B.Assert._increment();B.Object.each(D,function(G,F){if(D[F]!=E[F]){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,"Values should be equal for property "+F),D[F],E[F]);}});},hasKey:function(C,D,E){B.Assert._increment();if(!B.Object.hasKey(D,C)){B.fail(B.Assert._formatMessage(E,"Property '"+C+"' not found on object."));}},hasKeys:function(E,C,F){B.Assert._increment();for(var D=0;D0){B.fail(B.Assert._formatMessage(E,"Object owns "+D.length+" properties but should own none."));}}};B.DateAssert={datesAreEqual:function(D,F,C){B.Assert._increment();if(D instanceof Date&&F instanceof Date){var E="";if(D.getFullYear()!=F.getFullYear()){E="Years should be equal.";}if(D.getMonth()!=F.getMonth()){E="Months should be equal.";}if(D.getDate()!=F.getDate()){E="Days of month should be equal.";}if(E.length){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,E),D,F);}}else{throw new TypeError("Y.Assert.datesAreEqual(): Expected and actual values must be Date objects.");}},timesAreEqual:function(D,F,C){B.Assert._increment();if(D instanceof Date&&F instanceof Date){var E="";if(D.getHours()!=F.getHours()){E="Hours should be equal.";}if(D.getMinutes()!=F.getMinutes()){E="Minutes should be equal.";}if(D.getSeconds()!=F.getSeconds()){E="Seconds should be equal.";}if(E.length){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,E),D,F);}}else{throw new TypeError("DateY.AsserttimesAreEqual(): Expected and actual values must be Date objects.");}}};B.namespace("Test.Format");function A(C){return C.replace(/[<>"'&]/g,function(D){switch(D){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&";}});}B.Test.Format.JSON=function(C){return B.JSON.stringify(C);};B.Test.Format.XML=function(E){var C=B.Lang;var D="<"+E.type+' name="'+A(E.name)+'"';if(E.type=="test"){D+=' result="'+A(E.result)+'" message="'+A(E.message)+'">';}else{D+=' passed="'+E.passed+'" failed="'+E.failed+'" ignored="'+E.ignored+'" total="'+E.total+'">';B.Object.each(E,function(F,G){if(C.isObject(F)&&!C.isArray(F)){D+=arguments.callee(F);}});}D+="";return D;};B.Test.Format.XML=function(D){function C(G){var E=B.Lang,F="<"+G.type+' name="'+A(G.name)+'"';if(E.isNumber(G.duration)){F+=' duration="'+G.duration+'"';}if(G.type=="test"){F+=' result="'+G.result+'" message="'+A(G.message)+'">';}else{F+=' passed="'+G.passed+'" failed="'+G.failed+'" ignored="'+G.ignored+'" total="'+G.total+'">';B.Object.each(G,function(H,I){if(E.isObject(H)&&!E.isArray(H)){F+=C(H);}});}F+="";return F;}return''+C(D);};B.Test.Format.JUnitXML=function(C){function D(G){var E=B.Lang,F="",H;switch(G.type){case"test":if(G.result!="ignore"){F='';if(G.result=="fail"){F+='";}F+="";}break;case"testcase":F='';B.Object.each(G,function(I,J){if(E.isObject(I)&&!E.isArray(I)){F+=D(I);}});F+="";break;case"testsuite":B.Object.each(G,function(I,J){if(E.isObject(I)&&!E.isArray(I)){F+=D(I);}});break;case"report":F="";B.Object.each(G,function(I,J){if(E.isObject(I)&&!E.isArray(I)){F+=D(I);}});F+="";}return F;}return''+D(C);};B.namespace("Test");B.Test.Reporter=function(C,D){this.url=C;this.format=D||B.Test.Format.XML;this._fields=new Object();this._form=null;this._iframe=null;};B.Test.Reporter.prototype={constructor:B.Test.Reporter,addField:function(C,D){this._fields[C]=D;},clearFields:function(){this._fields=new Object();},destroy:function(){if(this._form){this._form.parentNode.removeChild(this._form);this._form=null;}if(this._iframe){this._iframe.parentNode.removeChild(this._iframe);this._iframe=null;}this._fields=null;},report:function(C){if(!this._form){this._form=document.createElement("form");this._form.method="post";this._form.style.visibility="hidden";this._form.style.position="absolute";this._form.style.top=0;document.body.appendChild(this._form);if(B.UA.ie){this._iframe=document.createElement('';this._iframe=c.firstChild;this._iframe.src="javascript:false";this._iframe.style.visibility="hidden";this._iframe.style.position="absolute";this._iframe.style.top=0;document.body.appendChild(this._iframe);this._form.target="yuiTestTarget";}this._form.action=this.url;while(this._form.hasChildNodes()){this._form.removeChild(this._form.lastChild);}this._fields.results=this.format(d);this._fields.useragent=navigator.userAgent;this._fields.timestamp=(new Date()).toLocaleString();b.Object.each(this._fields,function(f,g){if(typeof f!="function"){var e=document.createElement("input");e.type="hidden";e.name=g;e.value=f;this._form.appendChild(e);}},this);delete this._fields.results;delete this._fields.useragent;delete this._fields.timestamp;if(arguments[1]!==false){this._form.submit();}}};b.Mock=function(e){e=e||{};var c=null;try{c=b.Object(e);}catch(d){c={};b.log("Couldn't create mock with prototype.","warn","Mock");}b.Object.each(e,function(f){if(b.Lang.isFunction(e[f])){c[f]=function(){b.Assert.fail("Method "+f+"() was called but was not expected to be.");};}});return c;};b.Mock.expect=function(d,h){if(!d.__expectations){d.__expectations={};}if(h.method){var g=h.method,f=h.args||h.arguments||[],c=h.returns,j=b.Lang.isNumber(h.callCount)?h.callCount:1,e=h.error,i=h.run||function(){};d.__expectations[g]=h;h.callCount=j;h.actualCallCount=0;b.Array.each(f,function(k,l,m){if(!(m[l]instanceof b.Mock.Value)){m[l]=b.Mock.Value(b.Assert.areSame,[k],"Argument "+l+" of "+g+"() is incorrect.");}});if(j>0){d[g]=function(){try{h.actualCallCount++;b.Assert.areEqual(f.length,arguments.length,"Method "+g+"() passed incorrect number of arguments.");for(var m=0,k=f.length;m-1&&prop.indexOf(" ")>-1))&&Y.Lang.isFunction(testCase[prop])){node.appendChild(prop);}}},_addTestSuiteToTestTree:function(parentNode,testSuite){var node=parentNode.appendChild(testSuite);for(var i=0;i-1&&prop.indexOf(" ")>-1))&&Y.Lang.isFunction(testCase[prop])){node.appendChild(prop);}}},_addTestSuiteToTestTree:function(parentNode,testSuite){var node=parentNode.appendChild(testSuite);for(var i=0;i0){return Y.Lang.substitute(customMessage,{message:defaultMessage});}else{return defaultMessage;}},_getCount:function(){return this._asserts;},_increment:function(){this._asserts++;},_reset:function(){this._asserts=0;},fail:function(message){throw new Y.Assert.Error(Y.Assert._formatMessage(message,"Test force-failed."));},areEqual:function(expected,actual,message){Y.Assert._increment();if(expected!=actual){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Values should be equal."),expected,actual);}},areNotEqual:function(unexpected,actual,message){Y.Assert._increment();if(unexpected==actual){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Values should not be equal."),unexpected);}},areNotSame:function(unexpected,actual,message){Y.Assert._increment();if(unexpected===actual){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Values should not be the same."),unexpected);}},areSame:function(expected,actual,message){Y.Assert._increment();if(expected!==actual){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Values should be the same."),expected,actual);}},isFalse:function(actual,message){Y.Assert._increment();if(false!==actual){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Value should be false."),false,actual);}},isTrue:function(actual,message){Y.Assert._increment();if(true!==actual){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Value should be true."),true,actual);}},isNaN:function(actual,message){Y.Assert._increment();if(!isNaN(actual)){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Value should be NaN."),NaN,actual);}},isNotNaN:function(actual,message){Y.Assert._increment();if(isNaN(actual)){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Values should not be NaN."),NaN);}},isNotNull:function(actual,message){Y.Assert._increment();if(Y.Lang.isNull(actual)){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Values should not be null."),null);}},isNotUndefined:function(actual,message){Y.Assert._increment();if(Y.Lang.isUndefined(actual)){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Value should not be undefined."),undefined);}},isNull:function(actual,message){Y.Assert._increment();if(!Y.Lang.isNull(actual)){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Value should be null."),null,actual);}},isUndefined:function(actual,message){Y.Assert._increment();if(!Y.Lang.isUndefined(actual)){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Value should be undefined."),undefined,actual);}},isArray:function(actual,message){Y.Assert._increment();if(!Y.Lang.isArray(actual)){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Value should be an array."),actual);}},isBoolean:function(actual,message){Y.Assert._increment();if(!Y.Lang.isBoolean(actual)){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Value should be a Boolean."),actual);}},isFunction:function(actual,message){Y.Assert._increment();if(!Y.Lang.isFunction(actual)){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Value should be a function."),actual);}},isInstanceOf:function(expected,actual,message){Y.Assert._increment();if(!(actual instanceof expected)){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Value isn't an instance of expected type."),expected,actual);}},isNumber:function(actual,message){Y.Assert._increment();if(!Y.Lang.isNumber(actual)){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Value should be a number."),actual);}},isObject:function(actual,message){Y.Assert._increment();if(!Y.Lang.isObject(actual)){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Value should be an object."),actual);}},isString:function(actual,message){Y.Assert._increment();if(!Y.Lang.isString(actual)){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Value should be a string."),actual);}},isTypeOf:function(expectedType,actualValue,message){Y.Assert._increment();if(typeof actualValue!=expectedType){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Value should be of type "+expectedType+"."),expected,typeof actualValue);}}};Y.assert=function(condition,message){Y.Assert._increment();if(!condition){throw new Y.Assert.Error(Y.Assert._formatMessage(message,"Assertion failed."));}};Y.fail=Y.Assert.fail;Y.Assert.Error=function(message){arguments.callee.superclass.constructor.call(this,message);this.message=message;this.name="Assert Error";};Y.extend(Y.Assert.Error,Error,{getMessage:function(){return this.message;},toString:function(){return this.name+": "+this.getMessage();},valueOf:function(){return this.toString();}});Y.Assert.ComparisonFailure=function(message,expected,actual){arguments.callee.superclass.constructor.call(this,message);this.expected=expected;this.actual=actual;this.name="ComparisonFailure";};Y.extend(Y.Assert.ComparisonFailure,Y.Assert.Error,{getMessage:function(){return this.message+"\nExpected: "+this.expected+" ("+(typeof this.expected)+")"+"\nActual: "+this.actual+" ("+(typeof this.actual)+")";}});Y.Assert.UnexpectedValue=function(message,unexpected){arguments.callee.superclass.constructor.call(this,message);this.unexpected=unexpected;this.name="UnexpectedValue";};Y.extend(Y.Assert.UnexpectedValue,Y.Assert.Error,{getMessage:function(){return this.message+"\nUnexpected: "+this.unexpected+" ("+(typeof this.unexpected)+") ";}});Y.Assert.ShouldFail=function(message){arguments.callee.superclass.constructor.call(this,message||"This test should fail but didn't.");this.name="ShouldFail";};Y.extend(Y.Assert.ShouldFail,Y.Assert.Error);Y.Assert.ShouldError=function(message){arguments.callee.superclass.constructor.call(this,message||"This test should have thrown an error but didn't.");this.name="ShouldError";};Y.extend(Y.Assert.ShouldError,Y.Assert.Error);Y.Assert.UnexpectedError=function(cause){arguments.callee.superclass.constructor.call(this,"Unexpected error: "+cause.message);this.cause=cause;this.name="UnexpectedError";this.stack=cause.stack;};Y.extend(Y.Assert.UnexpectedError,Y.Assert.Error);Y.ArrayAssert={contains:function(needle,haystack,message){Y.Assert._increment();if(Y.Array.indexOf(haystack,needle)==-1){Y.Assert.fail(Y.Assert._formatMessage(message,"Value "+needle+" ("+(typeof needle)+") not found in array ["+haystack+"]."));}},containsItems:function(needles,haystack,message){Y.Assert._increment();for(var i=0;i0){return Y.Lang.substitute(customMessage,{message:defaultMessage});}else{return defaultMessage;}},_getCount:function(){return this._asserts;},_increment:function(){this._asserts++;},_reset:function(){this._asserts=0;},fail:function(message){throw new Y.Assert.Error(Y.Assert._formatMessage(message,"Test force-failed."));},areEqual:function(expected,actual,message){Y.Assert._increment();if(expected!=actual){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Values should be equal."),expected,actual);}},areNotEqual:function(unexpected,actual,message){Y.Assert._increment();if(unexpected==actual){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Values should not be equal."),unexpected);}},areNotSame:function(unexpected,actual,message){Y.Assert._increment();if(unexpected===actual){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Values should not be the same."),unexpected);}},areSame:function(expected,actual,message){Y.Assert._increment();if(expected!==actual){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Values should be the same."),expected,actual);}},isFalse:function(actual,message){Y.Assert._increment();if(false!==actual){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Value should be false."),false,actual);}},isTrue:function(actual,message){Y.Assert._increment();if(true!==actual){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Value should be true."),true,actual);}},isNaN:function(actual,message){Y.Assert._increment();if(!isNaN(actual)){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Value should be NaN."),NaN,actual);}},isNotNaN:function(actual,message){Y.Assert._increment();if(isNaN(actual)){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Values should not be NaN."),NaN);}},isNotNull:function(actual,message){Y.Assert._increment();if(Y.Lang.isNull(actual)){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Values should not be null."),null);}},isNotUndefined:function(actual,message){Y.Assert._increment();if(Y.Lang.isUndefined(actual)){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Value should not be undefined."),undefined);}},isNull:function(actual,message){Y.Assert._increment();if(!Y.Lang.isNull(actual)){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Value should be null."),null,actual);}},isUndefined:function(actual,message){Y.Assert._increment();if(!Y.Lang.isUndefined(actual)){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Value should be undefined."),undefined,actual);}},isArray:function(actual,message){Y.Assert._increment();if(!Y.Lang.isArray(actual)){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Value should be an array."),actual);}},isBoolean:function(actual,message){Y.Assert._increment();if(!Y.Lang.isBoolean(actual)){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Value should be a Boolean."),actual);}},isFunction:function(actual,message){Y.Assert._increment();if(!Y.Lang.isFunction(actual)){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Value should be a function."),actual);}},isInstanceOf:function(expected,actual,message){Y.Assert._increment();if(!(actual instanceof expected)){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Value isn't an instance of expected type."),expected,actual);}},isNumber:function(actual,message){Y.Assert._increment();if(!Y.Lang.isNumber(actual)){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Value should be a number."),actual);}},isObject:function(actual,message){Y.Assert._increment();if(!Y.Lang.isObject(actual)){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Value should be an object."),actual);}},isString:function(actual,message){Y.Assert._increment();if(!Y.Lang.isString(actual)){throw new Y.Assert.UnexpectedValue(Y.Assert._formatMessage(message,"Value should be a string."),actual);}},isTypeOf:function(expectedType,actualValue,message){Y.Assert._increment();if(typeof actualValue!=expectedType){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Value should be of type "+expectedType+"."),expected,typeof actualValue);}}};Y.assert=function(condition,message){Y.Assert._increment();if(!condition){throw new Y.Assert.Error(Y.Assert._formatMessage(message,"Assertion failed."));}};Y.fail=Y.Assert.fail;Y.Assert.Error=function(message){arguments.callee.superclass.constructor.call(this,message);this.message=message;this.name="Assert Error";};Y.extend(Y.Assert.Error,Error,{getMessage:function(){return this.message;},toString:function(){return this.name+": "+this.getMessage();},valueOf:function(){return this.toString();}});Y.Assert.ComparisonFailure=function(message,expected,actual){arguments.callee.superclass.constructor.call(this,message);this.expected=expected;this.actual=actual;this.name="ComparisonFailure";};Y.extend(Y.Assert.ComparisonFailure,Y.Assert.Error,{getMessage:function(){return this.message+"\nExpected: "+this.expected+" ("+(typeof this.expected)+")"+"\nActual: "+this.actual+" ("+(typeof this.actual)+")";}});Y.Assert.UnexpectedValue=function(message,unexpected){arguments.callee.superclass.constructor.call(this,message);this.unexpected=unexpected;this.name="UnexpectedValue";};Y.extend(Y.Assert.UnexpectedValue,Y.Assert.Error,{getMessage:function(){return this.message+"\nUnexpected: "+this.unexpected+" ("+(typeof this.unexpected)+") ";}});Y.Assert.ShouldFail=function(message){arguments.callee.superclass.constructor.call(this,message||"This test should fail but didn't.");this.name="ShouldFail";};Y.extend(Y.Assert.ShouldFail,Y.Assert.Error);Y.Assert.ShouldError=function(message){arguments.callee.superclass.constructor.call(this,message||"This test should have thrown an error but didn't.");this.name="ShouldError";};Y.extend(Y.Assert.ShouldError,Y.Assert.Error);Y.Assert.UnexpectedError=function(cause){arguments.callee.superclass.constructor.call(this,"Unexpected error: "+cause.message);this.cause=cause;this.name="UnexpectedError";this.stack=cause.stack;};Y.extend(Y.Assert.UnexpectedError,Y.Assert.Error);Y.ArrayAssert={contains:function(needle,haystack,message){Y.Assert._increment();if(Y.Array.indexOf(haystack,needle)==-1){Y.Assert.fail(Y.Assert._formatMessage(message,"Value "+needle+" ("+(typeof needle)+") not found in array ["+haystack+"]."));}},containsItems:function(needles,haystack,message){Y.Assert._increment();for(var i=0;i-1){Y.Assert.fail(Y.Assert._formatMessage(message,"Value found in array ["+haystack+"]."));}},doesNotContainItems:function(needles,haystack,message){Y.Assert._increment();for(var i=0;i-1){Y.Assert.fail(Y.Assert._formatMessage(message,"Value found in array ["+haystack+"]."));}}},doesNotContainMatch:function(matcher,haystack,message){Y.Assert._increment();if(typeof matcher!="function"){throw new TypeError("ArrayAssert.doesNotContainMatch(): First argument must be a function.");} if(Y.Array.some(haystack,matcher)){Y.Assert.fail(Y.Assert._formatMessage(message,"Value found in array ["+haystack+"]."));}},indexOf:function(needle,haystack,index,message){Y.Assert._increment();for(var i=0;i0){Y.Assert.fail(Y.Assert._formatMessage(message,"Array should be empty."));}},isNotEmpty:function(actual,message){Y.Assert._increment();if(actual.length===0){Y.Assert.fail(Y.Assert._formatMessage(message,"Array should not be empty."));}},itemsAreSame:function(expected,actual,message){Y.Assert._increment();if(expected.length!=actual.length){Y.Assert.fail(Y.Assert._formatMessage(message,"Array should have a length of "+expected.length+" but has a length of "+actual.length));} for(var i=0;i=0;i--){if(haystack[i]===needle){if(index!=i){Y.Assert.fail(Y.Assert._formatMessage(message,"Value exists at index "+i+" but should be at index "+index+"."));} return;}} -Y.Assert.fail(Y.Assert._formatMessage(message,"Value doesn't exist in array."));}};Y.ObjectAssert={areEqual:function(expected,actual,message){Y.Assert._increment();Y.Object.each(expected,function(value,name){if(expected[name]!=actual[name]){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Values should be equal for property "+name),expected[name],actual[name]);}});},hasKey:function(propertyName,object,message){Y.Assert._increment();if(!Y.Object.hasKey(object,propertyName)){Y.fail(Y.Assert._formatMessage(message,"Property '"+propertyName+"' not found on object."));}},hasKeys:function(properties,object,message){Y.Assert._increment();for(var i=0;i0){Y.fail(Y.Assert._formatMessage(message,"Object owns "+keys.length+" properties but should own none."));}}};Y.DateAssert={datesAreEqual:function(expected,actual,message){Y.Assert._increment();if(expected instanceof Date&&actual instanceof Date){var msg="";if(expected.getFullYear()!=actual.getFullYear()){msg="Years should be equal.";} +Y.Assert.fail(Y.Assert._formatMessage(message,"Value doesn't exist in array."));}};Y.ObjectAssert={areEqual:function(expected,actual,message){Y.Assert._increment();Y.Object.each(expected,function(value,name){if(expected[name]!=actual[name]){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,"Values should be equal for property "+name),expected[name],actual[name]);}});},hasKey:function(propertyName,object,message){Y.Assert._increment();if(!(propertyName in object)){Y.fail(Y.Assert._formatMessage(message,"Property '"+propertyName+"' not found on object."));}},hasKeys:function(properties,object,message){Y.Assert._increment();for(var i=0;i0){Y.fail(Y.Assert._formatMessage(message,"Object owns "+keys.length+" properties but should own none."));}}};Y.DateAssert={datesAreEqual:function(expected,actual,message){Y.Assert._increment();if(expected instanceof Date&&actual instanceof Date){var msg="";if(expected.getFullYear()!=actual.getFullYear()){msg="Years should be equal.";} if(expected.getMonth()!=actual.getMonth()){msg="Months should be equal.";} if(expected.getDate()!=actual.getDate()){msg="Days of month should be equal.";} if(msg.length){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,msg),expected,actual);}}else{throw new TypeError("Y.Assert.datesAreEqual(): Expected and actual values must be Date objects.");}},timesAreEqual:function(expected,actual,message){Y.Assert._increment();if(expected instanceof Date&&actual instanceof Date){var msg="";if(expected.getHours()!=actual.getHours()){msg="Hours should be equal.";} if(expected.getMinutes()!=actual.getMinutes()){msg="Minutes should be equal.";} if(expected.getSeconds()!=actual.getSeconds()){msg="Seconds should be equal.";} if(msg.length){throw new Y.Assert.ComparisonFailure(Y.Assert._formatMessage(message,msg),expected,actual);}}else{throw new TypeError("DateY.AsserttimesAreEqual(): Expected and actual values must be Date objects.");}}};Y.namespace("Test.Format");function xmlEscape(text){return text.replace(/[<>"'&]/g,function(value){switch(value){case"<":return"<";case">":return">";case"\"":return""";case"'":return"'";case"&":return"&";}});} -Y.Test.Format.JSON=function(results){return Y.JSON.stringify(results);};Y.Test.Format.XML=function(results){var l=Y.Lang;var xml="<"+results.type+" name=\""+xmlEscape(results.name)+"\"";if(results.type=="test"){xml+=" result=\""+xmlEscape(results.result)+"\" message=\""+xmlEscape(results.message)+"\">";}else{xml+=" passed=\""+results.passed+"\" failed=\""+results.failed+"\" ignored=\""+results.ignored+"\" total=\""+results.total+"\">";Y.Object.each(results,function(value,prop){if(l.isObject(value)&&!l.isArray(value)){xml+=arguments.callee(value);}});} -xml+="";return xml;};Y.Test.Format.XML=function(results){function serializeToXML(results){var l=Y.Lang,xml="<"+results.type+" name=\""+xmlEscape(results.name)+"\"";if(l.isNumber(results.duration)){xml+=" duration=\""+results.duration+"\"";} -if(results.type=="test"){xml+=" result=\""+results.result+"\" message=\""+xmlEscape(results.message)+"\">";}else{xml+=" passed=\""+results.passed+"\" failed=\""+results.failed+"\" ignored=\""+results.ignored+"\" total=\""+results.total+"\">";Y.Object.each(results,function(value,prop){if(l.isObject(value)&&!l.isArray(value)){xml+=serializeToXML(value);}});} +Y.Test.Format.JSON=function(results){return Y.JSON.stringify(results);};Y.Test.Format.XML=function(results){function serializeToXML(results){var l=Y.Lang,xml="<"+results.type+" name=\""+xmlEscape(results.name)+"\"";if(l.isNumber(results.duration)){xml+=" duration=\""+results.duration+"\"";} +if(results.type=="test"){xml+=" result=\""+results.result+"\" message=\""+xmlEscape(results.message)+"\">";}else{xml+=" passed=\""+results.passed+"\" failed=\""+results.failed+"\" ignored=\""+results.ignored+"\" total=\""+results.total+"\">";Y.Object.each(results,function(value){if(l.isObject(value)&&!l.isArray(value)){xml+=serializeToXML(value);}});} xml+="";return xml;} -return""+serializeToXML(results);};Y.Test.Format.JUnitXML=function(results){function serializeToJUnitXML(results){var l=Y.Lang,xml="",prop;switch(results.type){case"test":if(results.result!="ignore"){xml="";if(results.result=="fail"){xml+="";} +return""+serializeToXML(results);};Y.Test.Format.JUnitXML=function(results){function serializeToJUnitXML(results){var l=Y.Lang,xml="";switch(results.type){case"test":if(results.result!="ignore"){xml="";if(results.result=="fail"){xml+="";} xml+="";} -break;case"testcase":xml="";Y.Object.each(results,function(value,prop){if(l.isObject(value)&&!l.isArray(value)){xml+=serializeToJUnitXML(value);}});xml+="";break;case"testsuite":Y.Object.each(results,function(value,prop){if(l.isObject(value)&&!l.isArray(value)){xml+=serializeToJUnitXML(value);}});break;case"report":xml="";Y.Object.each(results,function(value,prop){if(l.isObject(value)&&!l.isArray(value)){xml+=serializeToJUnitXML(value);}});xml+="";} +break;case"testcase":xml="";Y.Object.each(results,function(value){if(l.isObject(value)&&!l.isArray(value)){xml+=serializeToJUnitXML(value);}});xml+="";break;case"testsuite":Y.Object.each(results,function(value){if(l.isObject(value)&&!l.isArray(value)){xml+=serializeToJUnitXML(value);}});break;case"report":xml="";Y.Object.each(results,function(value){if(l.isObject(value)&&!l.isArray(value)){xml+=serializeToJUnitXML(value);}});xml+="";} return xml;} -return""+serializeToJUnitXML(results);};Y.namespace("Test");Y.Test.Reporter=function(url,format){this.url=url;this.format=format||Y.Test.Format.XML;this._fields=new Object();this._form=null;this._iframe=null;};Y.Test.Reporter.prototype={constructor:Y.Test.Reporter,addField:function(name,value){this._fields[name]=value;},clearFields:function(){this._fields=new Object();},destroy:function(){if(this._form){this._form.parentNode.removeChild(this._form);this._form=null;} +return""+serializeToJUnitXML(results);};Y.Test.Format.TAP=function(results){var currentTestNum=1;function serializeToTAP(results){var l=Y.Lang,text="";switch(results.type){case"test":if(results.result!="ignore"){text="ok "+(currentTestNum++)+" - "+results.name;if(results.result=="fail"){text="not "+text+" - "+results.message;} +text+="\n";}else{text="#Ignored test "+results.name+"\n";} +break;case"testcase":text="#Begin testcase "+results.name+"("+results.failed+" failed of "+results.total+")\n";Y.Object.each(results,function(value){if(l.isObject(value)&&!l.isArray(value)){text+=serializeToTAP(value);}});text+="#End testcase "+results.name+"\n";break;case"testsuite":text="#Begin testsuite "+results.name+"("+results.failed+" failed of "+results.total+")\n";Y.Object.each(results,function(value){if(l.isObject(value)&&!l.isArray(value)){text+=serializeToTAP(value);}});text+="#End testsuite "+results.name+"\n";break;case"report":Y.Object.each(results,function(value){if(l.isObject(value)&&!l.isArray(value)){text+=serializeToTAP(value);}});} +return text;} +return"1.."+results.total+"\n"+serializeToTAP(results);};Y.namespace("Coverage.Format");Y.Coverage.Format.JSON=function(coverage){return Y.JSON.stringify(coverage);};Y.Coverage.Format.XdebugJSON=function(coverage){var report={};Y.Object.each(coverage,function(value,name){report[name]=coverage[name].lines;});return Y.JSON.stringify(report);};Y.namespace("Test");Y.Test.Reporter=function(url,format){this.url=url;this.format=format||Y.Test.Format.XML;this._fields=new Object();this._form=null;this._iframe=null;};Y.Test.Reporter.prototype={constructor:Y.Test.Reporter,addField:function(name,value){this._fields[name]=value;},clearFields:function(){this._fields=new Object();},destroy:function(){if(this._form){this._form.parentNode.removeChild(this._form);this._form=null;} if(this._iframe){this._iframe.parentNode.removeChild(this._iframe);this._iframe=null;} -this._fields=null;},report:function(results){if(!this._form){this._form=document.createElement("form");this._form.method="post";this._form.style.visibility="hidden";this._form.style.position="absolute";this._form.style.top=0;document.body.appendChild(this._form);if(Y.UA.ie){this._iframe=document.createElement("";this._iframe=iframeContainer.firstChild;this._iframe.src="javascript:false";this._iframe.style.visibility="hidden";this._iframe.style.position="absolute";this._iframe.style.top=0;document.body.appendChild(this._iframe);this._form.target="yuiTestTarget";} this._form.action=this.url;while(this._form.hasChildNodes()){this._form.removeChild(this._form.lastChild);} this._fields.results=this.format(results);this._fields.useragent=navigator.userAgent;this._fields.timestamp=(new Date()).toLocaleString();Y.Object.each(this._fields,function(value,prop){if(typeof value!="function"){var input=document.createElement("input");input.type="hidden";input.name=prop;input.value=value;this._form.appendChild(input);}},this);delete this._fields.results;delete this._fields.useragent;delete this._fields.timestamp;if(arguments[1]!==false){this._form.submit();}}};Y.Mock=function(template){template=template||{};var mock=null;try{mock=Y.Object(template);}catch(ex){mock={};Y.log("Couldn't create mock with prototype.","warn","Mock");} Y.Object.each(template,function(name){if(Y.Lang.isFunction(template[name])){mock[name]=function(){Y.Assert.fail("Method "+name+"() was called but was not expected to be.");};}});return mock;};Y.Mock.expect=function(mock,expectation){if(!mock.__expectations){mock.__expectations={};} if(expectation.method){var name=expectation.method,args=expectation.args||expectation.arguments||[],result=expectation.returns,callCount=Y.Lang.isNumber(expectation.callCount)?expectation.callCount:1,error=expectation.error,run=expectation.run||function(){};mock.__expectations[name]=expectation;expectation.callCount=callCount;expectation.actualCallCount=0;Y.Array.each(args,function(arg,i,array){if(!(array[i]instanceof Y.Mock.Value)){array[i]=Y.Mock.Value(Y.Assert.areSame,[arg],"Argument "+i+" of "+name+"() is incorrect.");}});if(callCount>0){mock[name]=function(){try{expectation.actualCallCount++;Y.Assert.areEqual(args.length,arguments.length,"Method "+name+"() passed incorrect number of arguments.");for(var i=0,len=args.length;iz.length-1&&w!==0)){return false;}if(x===g&&A===g){return false;}y=z[w+2];if(x===g&&(A===l||A===e)&&y===g){return false;}v=z[w-1];if((x===l||x===e)&&A===g&&v===g){return false;}if((x===q||x===g)&&(A===q||A===g)){return false;}if((x===s||x===e)&&A===q&&v===q){return false;}if(x===q&&(A===s||A===e)&&y===q){return false;}if(x===t||x===o||v===t||v===o||A===t||A===o){return false;}if(x===c&&A===i){return false;}if(x===m||x===c||x===i){return true;}if(A===m||A===c||A===i){return true;}if(x===r&&A===r){return false;}if(A===f&&(x===g||x===q||x===r||x===f)){return false;}if(x===f&&(A===g||A===q||A===r)){return false;}return true;}};n.WordBreak=j;},"3.3.0",{requires:["array-extras","text-data-wordbreak"]});YUI.add("text",function(a){},"3.3.0",{use:["text-accentfold","text-wordbreak"]}); diff --git a/include/javascript/yui3/build/text/text-wordbreak-min.js b/include/javascript/yui3/build/text/text-wordbreak-min.js new file mode 100644 index 00000000..31ed83b5 --- /dev/null +++ b/include/javascript/yui3/build/text/text-wordbreak-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("text-wordbreak",function(d){var n=d.Text,k=n.Data.WordBreak,g=0,e=1,l=2,s=3,q=4,c=5,i=6,m=7,t=8,o=9,r=10,f=11,p=12,h=[new RegExp(k.aletter),new RegExp(k.midnumlet),new RegExp(k.midletter),new RegExp(k.midnum),new RegExp(k.numeric),new RegExp(k.cr),new RegExp(k.lf),new RegExp(k.newline),new RegExp(k.extend),new RegExp(k.format),new RegExp(k.katakana),new RegExp(k.extendnumlet)],b="",a=new RegExp("^"+k.punctuation+"$"),u=/\s/,j={getWords:function(A,E){var z=0,v=j._classify(A),B=v.length,w=[],C=[],y,D,x;if(!E){E={};}if(E.ignoreCase){A=A.toLowerCase();}D=E.includePunctuation;x=E.includeWhitespace;for(;zz.length-1&&w!==0)){return false;}if(x===g&&A===g){return false;}y=z[w+2];if(x===g&&(A===l||A===e)&&y===g){return false;}v=z[w-1];if((x===l||x===e)&&A===g&&v===g){return false;}if((x===q||x===g)&&(A===q||A===g)){return false;}if((x===s||x===e)&&A===q&&v===q){return false;}if(x===q&&(A===s||A===e)&&y===q){return false;}if(x===t||x===o||v===t||v===o||A===t||A===o){return false;}if(x===c&&A===i){return false;}if(x===m||x===c||x===i){return true;}if(A===m||A===c||A===i){return true;}if(x===r&&A===r){return false;}if(A===f&&(x===g||x===q||x===r||x===f)){return false;}if(x===f&&(A===g||A===q||A===r)){return false;}return true;}};n.WordBreak=j;},"3.3.0",{requires:["array-extras","text-data-wordbreak"]}); diff --git a/include/javascript/yui3/build/text/text-wordbreak.js b/include/javascript/yui3/build/text/text-wordbreak.js new file mode 100644 index 00000000..98121be7 --- /dev/null +++ b/include/javascript/yui3/build/text/text-wordbreak.js @@ -0,0 +1,28 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('text-wordbreak',function(Y){var Text=Y.Text,WBData=Text.Data.WordBreak,ALETTER=0,MIDNUMLET=1,MIDLETTER=2,MIDNUM=3,NUMERIC=4,CR=5,LF=6,NEWLINE=7,EXTEND=8,FORMAT=9,KATAKANA=10,EXTENDNUMLET=11,OTHER=12,SETS=[new RegExp(WBData.aletter),new RegExp(WBData.midnumlet),new RegExp(WBData.midletter),new RegExp(WBData.midnum),new RegExp(WBData.numeric),new RegExp(WBData.cr),new RegExp(WBData.lf),new RegExp(WBData.newline),new RegExp(WBData.extend),new RegExp(WBData.format),new RegExp(WBData.katakana),new RegExp(WBData.extendnumlet)],EMPTY_STRING='',PUNCTUATION=new RegExp('^'+WBData.punctuation+'$'),WHITESPACE=/\s/,WordBreak={getWords:function(string,options){var i=0,map=WordBreak._classify(string),len=map.length,word=[],words=[],chr,includePunctuation,includeWhitespace;if(!options){options={};} +if(options.ignoreCase){string=string.toLowerCase();} +includePunctuation=options.includePunctuation;includeWhitespace=options.includeWhitespace;for(;imap.length-1&&index!==0)){return false;} +if(type===ALETTER&&nextType===ALETTER){return false;} +nextNextType=map[index+2];if(type===ALETTER&&(nextType===MIDLETTER||nextType===MIDNUMLET)&&nextNextType===ALETTER){return false;} +prevType=map[index-1];if((type===MIDLETTER||type===MIDNUMLET)&&nextType===ALETTER&&prevType===ALETTER){return false;} +if((type===NUMERIC||type===ALETTER)&&(nextType===NUMERIC||nextType===ALETTER)){return false;} +if((type===MIDNUM||type===MIDNUMLET)&&nextType===NUMERIC&&prevType===NUMERIC){return false;} +if(type===NUMERIC&&(nextType===MIDNUM||nextType===MIDNUMLET)&&nextNextType===NUMERIC){return false;} +if(type===EXTEND||type===FORMAT||prevType===EXTEND||prevType===FORMAT||nextType===EXTEND||nextType===FORMAT){return false;} +if(type===CR&&nextType===LF){return false;} +if(type===NEWLINE||type===CR||type===LF){return true;} +if(nextType===NEWLINE||nextType===CR||nextType===LF){return true;} +if(type===KATAKANA&&nextType===KATAKANA){return false;} +if(nextType===EXTENDNUMLET&&(type===ALETTER||type===NUMERIC||type===KATAKANA||type===EXTENDNUMLET)){return false;} +if(type===EXTENDNUMLET&&(nextType===ALETTER||nextType===NUMERIC||nextType===KATAKANA)){return false;} +return true;}};Text.WordBreak=WordBreak;},'3.3.0',{requires:['array-extras','text-data-wordbreak']}); diff --git a/include/javascript/yui3/build/text/text.js b/include/javascript/yui3/build/text/text.js new file mode 100644 index 00000000..2414d1e8 --- /dev/null +++ b/include/javascript/yui3/build/text/text.js @@ -0,0 +1,30 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('text-accentfold',function(Y){var YArray=Y.Array,Text=Y.Text,FoldData=Text.Data.AccentFold,AccentFold={canFold:function(string){var letter;for(letter in FoldData){if(FoldData.hasOwnProperty(letter)&&string.search(FoldData[letter])!==-1){return true;}} +return false;},compare:function(a,b,func){var aFolded=AccentFold.fold(a),bFolded=AccentFold.fold(b);return func?!!func(aFolded,bFolded):aFolded===bFolded;},filter:function(haystack,func){return YArray.filter(haystack,function(item){return func(AccentFold.fold(item));});},fold:function(input){if(Y.Lang.isArray(input)){return YArray.map(input,AccentFold.fold);} +input=input.toLowerCase();Y.Object.each(FoldData,function(regex,letter){input=input.replace(regex,letter);});return input;}};Text.AccentFold=AccentFold;},'3.3.0',{requires:['array-extras','text-data-accentfold']});YUI.add('text-data-accentfold',function(Y){Y.namespace('Text.Data').AccentFold={0:/[⁰₀⓪0]/gi,1:/[¹₁①1]/gi,2:/[²₂②2]/gi,3:/[³₃③3]/gi,4:/[⁴₄④4]/gi,5:/[⁵₅⑤5]/gi,6:/[⁶₆⑥6]/gi,7:/[⁷₇⑦7]/gi,8:/[⁸₈⑧8]/gi,9:/[⁹₉⑨9]/gi,a:/[ªà-åāăąǎǟǡǻȁȃȧᵃḁẚạảấầẩẫậắằẳẵặⓐa]/gi,b:/[ᵇḃḅḇⓑb]/gi,c:/[çćĉċčᶜḉⓒc]/gi,d:/[ďᵈḋḍḏḑḓⅾⓓd]/gi,e:/[è-ëēĕėęěȅȇȩᵉḕḗḙḛḝẹẻẽếềểễệₑℯⓔe]/gi,f:/[ᶠḟⓕf]/gi,g:/[ĝğġģǧǵᵍḡℊⓖg]/gi,h:/[ĥȟʰḣḥḧḩḫẖℎⓗh]/gi,i:/[ì-ïĩīĭįijǐȉȋᵢḭḯỉịⁱℹⅰⓘi]/gi,j:/[ĵǰʲⓙⱼj]/gi,k:/[ķǩᵏḱḳḵⓚk]/gi,l:/[ĺļľŀljˡḷḹḻḽℓⅼⓛl]/gi,m:/[ᵐḿṁṃⅿⓜm]/gi,n:/[ñńņňǹṅṇṉṋⁿⓝn]/gi,o:/[ºò-öōŏőơǒǫǭȍȏȫȭȯȱᵒṍṏṑṓọỏốồổỗộớờởỡợₒℴⓞo]/gi,p:/[ᵖṕṗⓟp]/gi,q:/[ʠⓠq]/gi,r:/[ŕŗřȑȓʳᵣṙṛṝṟⓡr]/gi,s:/[śŝşšſșˢṡṣṥṧṩẛⓢs]/gi,t:/[ţťțᵗṫṭṯṱẗⓣt]/gi,u:/[ù-üũūŭůűųưǔǖǘǚǜȕȗᵘᵤṳṵṷṹṻụủứừửữựⓤu]/gi,v:/[ᵛᵥṽṿⅴⓥv]/gi,w:/[ŵʷẁẃẅẇẉẘⓦw]/gi,x:/[ˣẋẍₓⅹⓧx]/gi,y:/[ýÿŷȳʸẏẙỳỵỷỹⓨy]/gi,z:/[źżžᶻẑẓẕⓩz]/gi};},'3.3.0');YUI.add('text-data-wordbreak',function(Y){Y.namespace('Text.Data').WordBreak={aletter:'[A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-׳ؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆༀཀ-ཇཉ-ཬྈ-ྌႠ-Ⴥა-ჺჼᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᯀ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〻〼ㄅ-ㄭㄱ-ㆎㆠ-ㆺꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐꞑꞠ-ꞩꟺ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]',midnumlet:"['\\.‘’․﹒'.]",midletter:'[:··״‧︓﹕:]',midnum:'[,;;։،؍٬߸⁄︐︔﹐﹔,;]',numeric:'[0-9٠-٩٫۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹]',cr:'\\r',lf:'\\n',newline:'[\u000B\u000C\u0085\u2028\u2029]',extend:'[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0900-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C01-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C82\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D02\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B6-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAA\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2\u1DC0-\u1DE6\u1DFC-\u1DFF\u200C\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA67C\uA67D\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE26\uFF9E\uFF9F]',format:'[\u00AD\u0600-\u0603\u06DD\u070F\u17B4\u17B5\u200E\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\uFEFF\uFFF9-\uFFFB]',katakana:'[〱-〵゛゜゠-ヺー-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ン]',extendnumlet:'[_‿⁀⁔︳︴﹍-﹏_]',punctuation:'[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・]'};},'3.3.0');YUI.add('text-wordbreak',function(Y){var Text=Y.Text,WBData=Text.Data.WordBreak,ALETTER=0,MIDNUMLET=1,MIDLETTER=2,MIDNUM=3,NUMERIC=4,CR=5,LF=6,NEWLINE=7,EXTEND=8,FORMAT=9,KATAKANA=10,EXTENDNUMLET=11,OTHER=12,SETS=[new RegExp(WBData.aletter),new RegExp(WBData.midnumlet),new RegExp(WBData.midletter),new RegExp(WBData.midnum),new RegExp(WBData.numeric),new RegExp(WBData.cr),new RegExp(WBData.lf),new RegExp(WBData.newline),new RegExp(WBData.extend),new RegExp(WBData.format),new RegExp(WBData.katakana),new RegExp(WBData.extendnumlet)],EMPTY_STRING='',PUNCTUATION=new RegExp('^'+WBData.punctuation+'$'),WHITESPACE=/\s/,WordBreak={getWords:function(string,options){var i=0,map=WordBreak._classify(string),len=map.length,word=[],words=[],chr,includePunctuation,includeWhitespace;if(!options){options={};} +if(options.ignoreCase){string=string.toLowerCase();} +includePunctuation=options.includePunctuation;includeWhitespace=options.includeWhitespace;for(;imap.length-1&&index!==0)){return false;} +if(type===ALETTER&&nextType===ALETTER){return false;} +nextNextType=map[index+2];if(type===ALETTER&&(nextType===MIDLETTER||nextType===MIDNUMLET)&&nextNextType===ALETTER){return false;} +prevType=map[index-1];if((type===MIDLETTER||type===MIDNUMLET)&&nextType===ALETTER&&prevType===ALETTER){return false;} +if((type===NUMERIC||type===ALETTER)&&(nextType===NUMERIC||nextType===ALETTER)){return false;} +if((type===MIDNUM||type===MIDNUMLET)&&nextType===NUMERIC&&prevType===NUMERIC){return false;} +if(type===NUMERIC&&(nextType===MIDNUM||nextType===MIDNUMLET)&&nextNextType===NUMERIC){return false;} +if(type===EXTEND||type===FORMAT||prevType===EXTEND||prevType===FORMAT||nextType===EXTEND||nextType===FORMAT){return false;} +if(type===CR&&nextType===LF){return false;} +if(type===NEWLINE||type===CR||type===LF){return true;} +if(nextType===NEWLINE||nextType===CR||nextType===LF){return true;} +if(type===KATAKANA&&nextType===KATAKANA){return false;} +if(nextType===EXTENDNUMLET&&(type===ALETTER||type===NUMERIC||type===KATAKANA||type===EXTENDNUMLET)){return false;} +if(type===EXTENDNUMLET&&(nextType===ALETTER||nextType===NUMERIC||nextType===KATAKANA)){return false;} +return true;}};Text.WordBreak=WordBreak;},'3.3.0',{requires:['array-extras','text-data-wordbreak']});YUI.add('text',function(Y){},'3.3.0',{use:['text-accentfold','text-wordbreak']}); diff --git a/include/javascript/yui3/build/transition/transition-min.js b/include/javascript/yui3/build/transition/transition-min.js new file mode 100644 index 00000000..3206faaf --- /dev/null +++ b/include/javascript/yui3/build/transition/transition-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("transition-native",function(b){var j="-webkit-transition",m="WebkitTransition",h="WebkitTransitionProperty",c="-webkit-transition-property",g="-webkit-transition-duration",a="-webkit-transition-timing-function",d="-webkit-transition-delay",k="webkitTransitionEnd",e="onwebkittransitionend",l="WebkitTransform",i={},f=function(){this.init.apply(this,arguments);};f.fx={};f.toggles={};f._hasEnd={};f._toCamel=function(o){o=o.replace(/-([a-z])/gi,function(q,p){return p.toUpperCase();});return o;};f._toHyphen=function(o){o=o.replace(/([A-Z]?)([a-z]+)([A-Z]?)/g,function(s,r,q,p){var t="";if(r){t+="-"+r.toLowerCase();}t+=q;if(p){t+="-"+p.toLowerCase();}return t;});return o;};f._reKeywords=/^(?:node|duration|iterations|easing|delay|on|onstart|onend)$/i;f.useNative=false;if(j in b.config.doc.documentElement.style){f.useNative=true;f.supported=true;}b.Node.DOM_EVENTS[k]=1;f.NAME="transition";f.DEFAULT_EASING="ease";f.DEFAULT_DURATION=0.5;f.DEFAULT_DELAY=0;f._nodeAttrs={};f.prototype={constructor:f,init:function(p,o){var q=this;q._node=p;if(!q._running&&o){q._config=o;p._transition=q;q._duration=("duration"in o)?o.duration:q.constructor.DEFAULT_DURATION;q._delay=("delay"in o)?o.delay:q.constructor.DEFAULT_DELAY;q._easing=o.easing||q.constructor.DEFAULT_EASING;q._count=0;q._running=false;}return q;},addProperty:function(p,r){var u=this,s=this._node,w=b.stamp(s),v=b.one(s),z=f._nodeAttrs[w],t,y,o,x,q;if(!z){z=f._nodeAttrs[w]={};}x=z[p];if(r&&r.value!==undefined){q=r.value;}else{if(r!==undefined){q=r;r=i;}}if(typeof q==="function"){q=q.call(v,v);}if(x&&x.transition){if(x.transition!==u){x.transition._count--;}}u._count++;o=((typeof r.duration!="undefined")?r.duration:u._duration)||0.0001;z[p]={value:q,duration:o,delay:(typeof r.delay!="undefined")?r.delay:u._delay,easing:r.easing||u._easing,transition:u};t=b.DOM.getComputedStyle(s,p);y=(typeof q==="string")?t:parseFloat(t);if(f.useNative&&y===q){setTimeout(function(){u._onNativeEnd.call(s,{propertyName:p,elapsedTime:o});},o*1000);}},removeProperty:function(q){var p=this,o=f._nodeAttrs[b.stamp(p._node)];if(o&&o[q]){delete o[q];p._count--;}},initAttrs:function(p){var o,q=this._node;if(p.transform&&!p[l]){p[l]=p.transform;delete p.transform;}for(o in p){if(p.hasOwnProperty(o)&&!f._reKeywords.test(o)){this.addProperty(o,p[o]);if(q.style[o]===""){b.DOM.setStyle(q,o,b.DOM.getComputedStyle(q,o));}}}},run:function(s){var r=this,p=r._node,o=r._config,q={type:"transition:start",config:o};if(!r._running){r._running=true;if(o.on&&o.on.start){o.on.start.call(b.one(p),q);}r.initAttrs(r._config);r._callback=s;r._start();}return r;},_start:function(){this._runNative();},_prepDur:function(o){o=parseFloat(o);return o+"s";},_runNative:function(q){var w=this,r=w._node,y=b.stamp(r),p=r.style,u=getComputedStyle(r),C=f._nodeAttrs[y],s="",D=u[c],B=c+": ",v=g+": ",A=a+": ",x=d+": ",t,z,o;if(D!=="all"){B+=D+",";v+=u[g]+",";A+=u[a]+",";x+=u[d]+",";}for(o in C){t=f._toHyphen(o);z=C[o];if(C.hasOwnProperty(o)&&z.transition===w){if(o in r.style){v+=w._prepDur(z.duration)+",";x+=w._prepDur(z.delay)+",";A+=(z.easing)+",";B+=t+",";s+=t+": "+z.value+"; ";}else{this.removeProperty(o);}}}B=B.replace(/,$/,";");v=v.replace(/,$/,";");A=A.replace(/,$/,";");x=x.replace(/,$/,";");if(!f._hasEnd[y]){r.addEventListener(k,w._onNativeEnd,false);f._hasEnd[y]=true;}p.cssText+=B+v+A+x+s;},_end:function(o){var s=this,q=s._node,u=s._callback,p=s._config,r={type:"transition:end",config:p,elapsedTime:o},t=b.one(q);s._running=false;s._callback=null;if(q){if(p.on&&p.on.end){setTimeout(function(){p.on.end.call(t,r);if(u){u.call(t,r);}},1);}else{if(u){setTimeout(function(){u.call(t,r);},1);}}}},_endNative:function(o){var p=this._node,q=p.ownerDocument.defaultView.getComputedStyle(p,"")[c];if(typeof q==="string"){q=q.replace(new RegExp("(?:^|,\\s)"+o+",?"),",");q=q.replace(/^,|,$/,"");p.style[m]=q;}},_onNativeEnd:function(v){var r=this,u=b.stamp(r),o=v,p=f._toCamel(o.propertyName),y=o.elapsedTime,x=f._nodeAttrs[u],w=x[p],s=(w)?w.transition:null,t,q;if(s){s.removeProperty(p);s._endNative(p);q=s._config[p];t={type:"propertyEnd",propertyName:p,elapsedTime:y,config:q};if(q&&q.on&&q.on.end){q.on.end.call(b.one(r),t);}if(s._count<=0){s._end(y);}}},destroy:function(){var o=this;node.removeEventListener(k,o._onNativeEnd,false);o._node=null;}};b.Transition=f;b.TransitionNative=f;b.Node.prototype.transition=function(q,p,u){var o=f._nodeAttrs[b.stamp(this._node)],s=(o)?o.transition||null:null,r,t;if(typeof q==="string"){if(typeof p==="function"){u=p;p=null;}r=f.fx[q];if(p&&typeof p!=="boolean"){p=b.clone(p);for(t in r){if(r.hasOwnProperty(t)){if(!(t in p)){p[t]=r[t];}}}}else{p=r;}}else{u=p;p=q;}if(s&&!s._running){s.init(this,p);}else{s=new f(this._node,p);}s.run(u);return this;};b.Node.prototype.show=function(p,o,q){this._show();if(p&&b.Transition){if(typeof p!=="string"&&!p.push){if(typeof o==="function"){q=o;o=p;}p=this.SHOW_TRANSITION;}this.transition(p,o,q);}return this;};var n=function(p,o,q){return function(){if(o){o.call(p);}if(q){q.apply(p._node,arguments);}};};b.Node.prototype.hide=function(p,o,q){if(p&&b.Transition){if(typeof o==="function"){q=o;o=null;}q=n(this,this._hide,q);if(typeof p!=="string"&&!p.push){if(typeof o==="function"){q=o;o=p;}p=this.HIDE_TRANSITION;}this.transition(p,o,q);}else{this._hide();}return this;};b.NodeList.prototype.transition=function(p,s){var o=this._nodes,q=0,r;while((r=o[q++])){b.one(r).transition(p,s);}return this;};b.Node.prototype.toggleView=function(p,o){var q;this._toggles=this._toggles||[];if(typeof p=="boolean"){o=p;}if(typeof o==="undefined"&&p in this._toggles){o=!this._toggles[p];}o=(o)?1:0;if(o){this._show();}else{q=n(anim,this._hide);}this._toggles[p]=o;this.transition(b.Transition.toggles[p][o],q);};b.NodeList.prototype.toggleView=function(p,s){var o=this._nodes,q=0,r;while((r=o[q++])){b.one(r).toggleView(p,s);}return this;};b.mix(f.fx,{fadeOut:{opacity:0,duration:0.5,easing:"ease-out"},fadeIn:{opacity:1,duration:0.5,easing:"ease-in"},sizeOut:{height:0,width:0,duration:0.75,easing:"ease-out"},sizeIn:{height:function(o){return o.get("scrollHeight")+"px";},width:function(o){return o.get("scrollWidth")+"px";},duration:0.5,easing:"ease-in",on:{start:function(){var o=this.getStyle("overflow");if(o!=="hidden"){this.setStyle("overflow","hidden");this._transitionOverflow=o;}},end:function(){if(this._transitionOverflow){this.setStyle("overflow",this._transitionOverflow);}}}}});b.mix(f.toggles,{size:["sizeIn","sizeOut"],fade:["fadeOut","fadeIn"]});},"3.3.0",{requires:["node-base"]});YUI.add("transition-timer",function(b){var a=b.Transition;b.mix(a.prototype,{_start:function(){if(a.useNative){this._runNative();}else{this._runTimer();}},_runTimer:function(){var c=this;c._initAttrs();a._running[b.stamp(c)]=c;c._startTime=new Date();a._startTimer();},_endTimer:function(){var c=this;delete a._running[b.stamp(c)];c._startTime=null;},_runFrame:function(){var c=new Date()-this._startTime;this._runAttrs(c);},_runAttrs:function(e){var o=this,n=o._node,u=o._config,f=b.stamp(n),m=a._nodeAttrs[f],h=a.behaviors,l=false,g=false,v,w,j,q,c,s,r,k,p;for(w in m){j=m[w];if((j&&j.transition===o)){r=j.duration;s=j.delay;c=(e-s)/1000;k=e;v={type:"propertyEnd",propertyName:w,config:u,elapsedTime:c};q=(p in h&&"set"in h[p])?h[p].set:a.DEFAULT_SETTER;l=(k>=r);if(k>r){k=r;}if(!s||e>=s){q(o,w,j.from,j.to,k-s,r-s,j.easing,j.unit);if(l){delete m[w];o._count--;if(u[w]&&u[w].on&&u[w].on.end){u[w].on.end.call(b.one(n),v);}if(!g&&o._count<=0){g=true;o._end(c);o._endTimer();}}}}}},_initAttrs:function(){var j=this,e=a.behaviors,l=b.stamp(j._node),q=a._nodeAttrs[l],d,i,k,n,g,c,m,o,p,f,h;for(c in q){d=q[c];if(q.hasOwnProperty(c)&&(d&&d.transition===j)){i=d.duration*1000;k=d.delay*1000;n=d.easing;g=d.value;if(c in j._node.style||c in b.DOM.CUSTOM_STYLES){f=(c in e&&"get"in e[c])?e[c].get(j,c):a.DEFAULT_GETTER(j,c);o=a.RE_UNITS.exec(f);m=a.RE_UNITS.exec(g);f=o?o[1]:f;h=m?m[1]:g;p=m?m[2]:o?o[2]:"";if(!p&&a.RE_DEFAULT_UNIT.test(c)){p=a.DEFAULT_UNIT;}if(typeof n==="string"){if(n.indexOf("cubic-bezier")>-1){n=n.substring(13,n.length-1).split(",");}else{if(a.easings[n]){n=a.easings[n];}}}d.from=Number(f);d.to=Number(h);d.unit=p;d.easing=n;d.duration=i+k;d.delay=k;}else{delete q[c];j._count--;}}}},destroy:function(){this.detachAll();this._node=null;}},true);b.mix(b.Transition,{_runtimeAttrs:{},RE_DEFAULT_UNIT:/^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i,DEFAULT_UNIT:"px",intervalTime:20,behaviors:{left:{get:function(d,c){return b.DOM._getAttrOffset(d._node,c);}}},DEFAULT_SETTER:function(f,g,i,j,l,e,h,k){i=Number(i);j=Number(j);var d=f._node,c=a.cubicBezier(h,l/e);c=i+c[0]*(j-i);if(d){if(g in d.style||g in b.DOM.CUSTOM_STYLES){k=k||"";b.DOM.setStyle(d,g,c+k);}}else{f._end();}},DEFAULT_GETTER:function(e,c){var d=e._node,f="";if(c in d.style||c in b.DOM.CUSTOM_STYLES){f=b.DOM.getComputedStyle(d,c);}return f;},_startTimer:function(){if(!a._timer){a._timer=setInterval(a._runFrame,a.intervalTime);}},_stopTimer:function(){clearInterval(a._timer);a._timer=null;},_runFrame:function(){var c=true,d;for(d in a._running){if(a._running[d]._runFrame){c=false;a._running[d]._runFrame();}}if(c){a._stopTimer();}},cubicBezier:function(s,m){var z=0,f=0,w=s[0],e=s[1],v=s[2],d=s[3],u=1,c=0,r=u-3*v+3*w-z,q=3*v-6*w+3*z,o=3*w-3*z,n=z,l=c-3*d+3*e-f,k=3*d-6*e+3*f,j=3*e-3*f,i=f,h=(((r*m)+q)*m+o)*m+n,g=(((l*m)+k)*m+j)*m+i;return[h,g];},easings:{ease:[0.25,0,1,0.25],linear:[0,0,1,1],"ease-in":[0.42,0,1,1],"ease-out":[0,0,0.58,1],"ease-in-out":[0.42,0,0.58,1]},_running:{},_timer:null,RE_UNITS:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/},true);a.behaviors.top=a.behaviors.bottom=a.behaviors.right=a.behaviors.left;b.Transition=a;},"3.3.0",{requires:["transition-native","node-style"]});YUI.add("transition",function(a){},"3.3.0",{use:["transition-native","transition-timer"]}); diff --git a/include/javascript/yui3/build/transition/transition-native-min.js b/include/javascript/yui3/build/transition/transition-native-min.js new file mode 100644 index 00000000..2ba4fe37 --- /dev/null +++ b/include/javascript/yui3/build/transition/transition-native-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("transition-native",function(b){var j="-webkit-transition",m="WebkitTransition",h="WebkitTransitionProperty",c="-webkit-transition-property",g="-webkit-transition-duration",a="-webkit-transition-timing-function",d="-webkit-transition-delay",k="webkitTransitionEnd",e="onwebkittransitionend",l="WebkitTransform",i={},f=function(){this.init.apply(this,arguments);};f.fx={};f.toggles={};f._hasEnd={};f._toCamel=function(o){o=o.replace(/-([a-z])/gi,function(q,p){return p.toUpperCase();});return o;};f._toHyphen=function(o){o=o.replace(/([A-Z]?)([a-z]+)([A-Z]?)/g,function(s,r,q,p){var t="";if(r){t+="-"+r.toLowerCase();}t+=q;if(p){t+="-"+p.toLowerCase();}return t;});return o;};f._reKeywords=/^(?:node|duration|iterations|easing|delay|on|onstart|onend)$/i;f.useNative=false;if(j in b.config.doc.documentElement.style){f.useNative=true;f.supported=true;}b.Node.DOM_EVENTS[k]=1;f.NAME="transition";f.DEFAULT_EASING="ease";f.DEFAULT_DURATION=0.5;f.DEFAULT_DELAY=0;f._nodeAttrs={};f.prototype={constructor:f,init:function(p,o){var q=this;q._node=p;if(!q._running&&o){q._config=o;p._transition=q;q._duration=("duration"in o)?o.duration:q.constructor.DEFAULT_DURATION;q._delay=("delay"in o)?o.delay:q.constructor.DEFAULT_DELAY;q._easing=o.easing||q.constructor.DEFAULT_EASING;q._count=0;q._running=false;}return q;},addProperty:function(p,r){var u=this,s=this._node,w=b.stamp(s),v=b.one(s),z=f._nodeAttrs[w],t,y,o,x,q;if(!z){z=f._nodeAttrs[w]={};}x=z[p];if(r&&r.value!==undefined){q=r.value;}else{if(r!==undefined){q=r;r=i;}}if(typeof q==="function"){q=q.call(v,v);}if(x&&x.transition){if(x.transition!==u){x.transition._count--;}}u._count++;o=((typeof r.duration!="undefined")?r.duration:u._duration)||0.0001;z[p]={value:q,duration:o,delay:(typeof r.delay!="undefined")?r.delay:u._delay,easing:r.easing||u._easing,transition:u};t=b.DOM.getComputedStyle(s,p);y=(typeof q==="string")?t:parseFloat(t);if(f.useNative&&y===q){setTimeout(function(){u._onNativeEnd.call(s,{propertyName:p,elapsedTime:o});},o*1000);}},removeProperty:function(q){var p=this,o=f._nodeAttrs[b.stamp(p._node)];if(o&&o[q]){delete o[q];p._count--;}},initAttrs:function(p){var o,q=this._node;if(p.transform&&!p[l]){p[l]=p.transform;delete p.transform;}for(o in p){if(p.hasOwnProperty(o)&&!f._reKeywords.test(o)){this.addProperty(o,p[o]);if(q.style[o]===""){b.DOM.setStyle(q,o,b.DOM.getComputedStyle(q,o));}}}},run:function(s){var r=this,p=r._node,o=r._config,q={type:"transition:start",config:o};if(!r._running){r._running=true;if(o.on&&o.on.start){o.on.start.call(b.one(p),q);}r.initAttrs(r._config);r._callback=s;r._start();}return r;},_start:function(){this._runNative();},_prepDur:function(o){o=parseFloat(o);return o+"s";},_runNative:function(q){var w=this,r=w._node,y=b.stamp(r),p=r.style,u=getComputedStyle(r),C=f._nodeAttrs[y],s="",D=u[c],B=c+": ",v=g+": ",A=a+": ",x=d+": ",t,z,o;if(D!=="all"){B+=D+",";v+=u[g]+",";A+=u[a]+",";x+=u[d]+",";}for(o in C){t=f._toHyphen(o);z=C[o];if(C.hasOwnProperty(o)&&z.transition===w){if(o in r.style){v+=w._prepDur(z.duration)+",";x+=w._prepDur(z.delay)+",";A+=(z.easing)+",";B+=t+",";s+=t+": "+z.value+"; ";}else{this.removeProperty(o);}}}B=B.replace(/,$/,";");v=v.replace(/,$/,";");A=A.replace(/,$/,";");x=x.replace(/,$/,";");if(!f._hasEnd[y]){r.addEventListener(k,w._onNativeEnd,false);f._hasEnd[y]=true;}p.cssText+=B+v+A+x+s;},_end:function(o){var s=this,q=s._node,u=s._callback,p=s._config,r={type:"transition:end",config:p,elapsedTime:o},t=b.one(q);s._running=false;s._callback=null;if(q){if(p.on&&p.on.end){setTimeout(function(){p.on.end.call(t,r);if(u){u.call(t,r);}},1);}else{if(u){setTimeout(function(){u.call(t,r);},1);}}}},_endNative:function(o){var p=this._node,q=p.ownerDocument.defaultView.getComputedStyle(p,"")[c];if(typeof q==="string"){q=q.replace(new RegExp("(?:^|,\\s)"+o+",?"),",");q=q.replace(/^,|,$/,"");p.style[m]=q;}},_onNativeEnd:function(v){var r=this,u=b.stamp(r),o=v,p=f._toCamel(o.propertyName),y=o.elapsedTime,x=f._nodeAttrs[u],w=x[p],s=(w)?w.transition:null,t,q;if(s){s.removeProperty(p);s._endNative(p);q=s._config[p];t={type:"propertyEnd",propertyName:p,elapsedTime:y,config:q};if(q&&q.on&&q.on.end){q.on.end.call(b.one(r),t);}if(s._count<=0){s._end(y);}}},destroy:function(){var o=this;node.removeEventListener(k,o._onNativeEnd,false);o._node=null;}};b.Transition=f;b.TransitionNative=f;b.Node.prototype.transition=function(q,p,u){var o=f._nodeAttrs[b.stamp(this._node)],s=(o)?o.transition||null:null,r,t;if(typeof q==="string"){if(typeof p==="function"){u=p;p=null;}r=f.fx[q];if(p&&typeof p!=="boolean"){p=b.clone(p);for(t in r){if(r.hasOwnProperty(t)){if(!(t in p)){p[t]=r[t];}}}}else{p=r;}}else{u=p;p=q;}if(s&&!s._running){s.init(this,p);}else{s=new f(this._node,p);}s.run(u);return this;};b.Node.prototype.show=function(p,o,q){this._show();if(p&&b.Transition){if(typeof p!=="string"&&!p.push){if(typeof o==="function"){q=o;o=p;}p=this.SHOW_TRANSITION;}this.transition(p,o,q);}return this;};var n=function(p,o,q){return function(){if(o){o.call(p);}if(q){q.apply(p._node,arguments);}};};b.Node.prototype.hide=function(p,o,q){if(p&&b.Transition){if(typeof o==="function"){q=o;o=null;}q=n(this,this._hide,q);if(typeof p!=="string"&&!p.push){if(typeof o==="function"){q=o;o=p;}p=this.HIDE_TRANSITION;}this.transition(p,o,q);}else{this._hide();}return this;};b.NodeList.prototype.transition=function(p,s){var o=this._nodes,q=0,r;while((r=o[q++])){b.one(r).transition(p,s);}return this;};b.Node.prototype.toggleView=function(p,o){var q;this._toggles=this._toggles||[];if(typeof p=="boolean"){o=p;}if(typeof o==="undefined"&&p in this._toggles){o=!this._toggles[p];}o=(o)?1:0;if(o){this._show();}else{q=n(anim,this._hide);}this._toggles[p]=o;this.transition(b.Transition.toggles[p][o],q);};b.NodeList.prototype.toggleView=function(p,s){var o=this._nodes,q=0,r;while((r=o[q++])){b.one(r).toggleView(p,s);}return this;};b.mix(f.fx,{fadeOut:{opacity:0,duration:0.5,easing:"ease-out"},fadeIn:{opacity:1,duration:0.5,easing:"ease-in"},sizeOut:{height:0,width:0,duration:0.75,easing:"ease-out"},sizeIn:{height:function(o){return o.get("scrollHeight")+"px";},width:function(o){return o.get("scrollWidth")+"px";},duration:0.5,easing:"ease-in",on:{start:function(){var o=this.getStyle("overflow");if(o!=="hidden"){this.setStyle("overflow","hidden");this._transitionOverflow=o;}},end:function(){if(this._transitionOverflow){this.setStyle("overflow",this._transitionOverflow);}}}}});b.mix(f.toggles,{size:["sizeIn","sizeOut"],fade:["fadeOut","fadeIn"]});},"3.3.0",{requires:["node-base"]}); diff --git a/include/javascript/yui3/build/transition/transition-native.js b/include/javascript/yui3/build/transition/transition-native.js new file mode 100644 index 00000000..89cd53c3 --- /dev/null +++ b/include/javascript/yui3/build/transition/transition-native.js @@ -0,0 +1,40 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('transition-native',function(Y){var TRANSITION='-webkit-transition',TRANSITION_CAMEL='WebkitTransition',TRANSITION_PROPERTY_CAMEL='WebkitTransitionProperty',TRANSITION_PROPERTY='-webkit-transition-property',TRANSITION_DURATION='-webkit-transition-duration',TRANSITION_TIMING_FUNCTION='-webkit-transition-timing-function',TRANSITION_DELAY='-webkit-transition-delay',TRANSITION_END='webkitTransitionEnd',ON_TRANSITION_END='onwebkittransitionend',TRANSFORM_CAMEL='WebkitTransform',EMPTY_OBJ={},Transition=function(){this.init.apply(this,arguments);};Transition.fx={};Transition.toggles={};Transition._hasEnd={};Transition._toCamel=function(property){property=property.replace(/-([a-z])/gi,function(m0,m1){return m1.toUpperCase();});return property;};Transition._toHyphen=function(property){property=property.replace(/([A-Z]?)([a-z]+)([A-Z]?)/g,function(m0,m1,m2,m3){var str='';if(m1){str+='-'+m1.toLowerCase();} +str+=m2;if(m3){str+='-'+m3.toLowerCase();} +return str;});return property;};Transition._reKeywords=/^(?:node|duration|iterations|easing|delay|on|onstart|onend)$/i;Transition.useNative=false;if(TRANSITION in Y.config.doc.documentElement.style){Transition.useNative=true;Transition.supported=true;} +Y.Node.DOM_EVENTS[TRANSITION_END]=1;Transition.NAME='transition';Transition.DEFAULT_EASING='ease';Transition.DEFAULT_DURATION=0.5;Transition.DEFAULT_DELAY=0;Transition._nodeAttrs={};Transition.prototype={constructor:Transition,init:function(node,config){var anim=this;anim._node=node;if(!anim._running&&config){anim._config=config;node._transition=anim;anim._duration=('duration'in config)?config.duration:anim.constructor.DEFAULT_DURATION;anim._delay=('delay'in config)?config.delay:anim.constructor.DEFAULT_DELAY;anim._easing=config.easing||anim.constructor.DEFAULT_EASING;anim._count=0;anim._running=false;} +return anim;},addProperty:function(prop,config){var anim=this,node=this._node,uid=Y.stamp(node),nodeInstance=Y.one(node),attrs=Transition._nodeAttrs[uid],computed,compareVal,dur,attr,val;if(!attrs){attrs=Transition._nodeAttrs[uid]={};} +attr=attrs[prop];if(config&&config.value!==undefined){val=config.value;}else if(config!==undefined){val=config;config=EMPTY_OBJ;} +if(typeof val==='function'){val=val.call(nodeInstance,nodeInstance);} +if(attr&&attr.transition){if(attr.transition!==anim){attr.transition._count--;}} +anim._count++;dur=((typeof config.duration!='undefined')?config.duration:anim._duration)||0.0001;attrs[prop]={value:val,duration:dur,delay:(typeof config.delay!='undefined')?config.delay:anim._delay,easing:config.easing||anim._easing,transition:anim};computed=Y.DOM.getComputedStyle(node,prop);compareVal=(typeof val==='string')?computed:parseFloat(computed);if(Transition.useNative&&compareVal===val){setTimeout(function(){anim._onNativeEnd.call(node,{propertyName:prop,elapsedTime:dur});},dur*1000);}},removeProperty:function(prop){var anim=this,attrs=Transition._nodeAttrs[Y.stamp(anim._node)];if(attrs&&attrs[prop]){delete attrs[prop];anim._count--;}},initAttrs:function(config){var attr,node=this._node;if(config.transform&&!config[TRANSFORM_CAMEL]){config[TRANSFORM_CAMEL]=config.transform;delete config.transform;} +for(attr in config){if(config.hasOwnProperty(attr)&&!Transition._reKeywords.test(attr)){this.addProperty(attr,config[attr]);if(node.style[attr]===''){Y.DOM.setStyle(node,attr,Y.DOM.getComputedStyle(node,attr));}}}},run:function(callback){var anim=this,node=anim._node,config=anim._config,data={type:'transition:start',config:config};if(!anim._running){anim._running=true;if(config.on&&config.on.start){config.on.start.call(Y.one(node),data);} +anim.initAttrs(anim._config);anim._callback=callback;anim._start();} +return anim;},_start:function(){this._runNative();},_prepDur:function(dur){dur=parseFloat(dur);return dur+'s';},_runNative:function(time){var anim=this,node=anim._node,uid=Y.stamp(node),style=node.style,computed=getComputedStyle(node),attrs=Transition._nodeAttrs[uid],cssText='',cssTransition=computed[TRANSITION_PROPERTY],transitionText=TRANSITION_PROPERTY+': ',duration=TRANSITION_DURATION+': ',easing=TRANSITION_TIMING_FUNCTION+': ',delay=TRANSITION_DELAY+': ',hyphy,attr,name;if(cssTransition!=='all'){transitionText+=cssTransition+',';duration+=computed[TRANSITION_DURATION]+',';easing+=computed[TRANSITION_TIMING_FUNCTION]+',';delay+=computed[TRANSITION_DELAY]+',';} +for(name in attrs){hyphy=Transition._toHyphen(name);attr=attrs[name];if(attrs.hasOwnProperty(name)&&attr.transition===anim){if(name in node.style){duration+=anim._prepDur(attr.duration)+',';delay+=anim._prepDur(attr.delay)+',';easing+=(attr.easing)+',';transitionText+=hyphy+',';cssText+=hyphy+': '+attr.value+'; ';}else{this.removeProperty(name);}}} +transitionText=transitionText.replace(/,$/,';');duration=duration.replace(/,$/,';');easing=easing.replace(/,$/,';');delay=delay.replace(/,$/,';');if(!Transition._hasEnd[uid]){node.addEventListener(TRANSITION_END,anim._onNativeEnd,false);Transition._hasEnd[uid]=true;} +style.cssText+=transitionText+duration+easing+delay+cssText;},_end:function(elapsed){var anim=this,node=anim._node,callback=anim._callback,config=anim._config,data={type:'transition:end',config:config,elapsedTime:elapsed},nodeInstance=Y.one(node);anim._running=false;anim._callback=null;if(node){if(config.on&&config.on.end){setTimeout(function(){config.on.end.call(nodeInstance,data);if(callback){callback.call(nodeInstance,data);}},1);}else if(callback){setTimeout(function(){callback.call(nodeInstance,data);},1);}}},_endNative:function(name){var node=this._node,value=node.ownerDocument.defaultView.getComputedStyle(node,'')[TRANSITION_PROPERTY];if(typeof value==='string'){value=value.replace(new RegExp('(?:^|,\\s)'+name+',?'),',');value=value.replace(/^,|,$/,'');node.style[TRANSITION_CAMEL]=value;}},_onNativeEnd:function(e){var node=this,uid=Y.stamp(node),event=e,name=Transition._toCamel(event.propertyName),elapsed=event.elapsedTime,attrs=Transition._nodeAttrs[uid],attr=attrs[name],anim=(attr)?attr.transition:null,data,config;if(anim){anim.removeProperty(name);anim._endNative(name);config=anim._config[name];data={type:'propertyEnd',propertyName:name,elapsedTime:elapsed,config:config};if(config&&config.on&&config.on.end){config.on.end.call(Y.one(node),data);} +if(anim._count<=0){anim._end(elapsed);}}},destroy:function(){var anim=this;node.removeEventListener(TRANSITION_END,anim._onNativeEnd,false);anim._node=null;}};Y.Transition=Transition;Y.TransitionNative=Transition;Y.Node.prototype.transition=function(name,config,callback){var +transitionAttrs=Transition._nodeAttrs[Y.stamp(this._node)],anim=(transitionAttrs)?transitionAttrs.transition||null:null,fxConfig,prop;if(typeof name==='string'){if(typeof config==='function'){callback=config;config=null;} +fxConfig=Transition.fx[name];if(config&&typeof config!=='boolean'){config=Y.clone(config);for(prop in fxConfig){if(fxConfig.hasOwnProperty(prop)){if(!(prop in config)){config[prop]=fxConfig[prop];}}}}else{config=fxConfig;}}else{callback=config;config=name;} +if(anim&&!anim._running){anim.init(this,config);}else{anim=new Transition(this._node,config);} +anim.run(callback);return this;};Y.Node.prototype.show=function(name,config,callback){this._show();if(name&&Y.Transition){if(typeof name!=='string'&&!name.push){if(typeof config==='function'){callback=config;config=name;} +name=this.SHOW_TRANSITION;} +this.transition(name,config,callback);} +return this;};var _wrapCallBack=function(anim,fn,callback){return function(){if(fn){fn.call(anim);} +if(callback){callback.apply(anim._node,arguments);}};};Y.Node.prototype.hide=function(name,config,callback){if(name&&Y.Transition){if(typeof config==='function'){callback=config;config=null;} +callback=_wrapCallBack(this,this._hide,callback);if(typeof name!=='string'&&!name.push){if(typeof config==='function'){callback=config;config=name;} +name=this.HIDE_TRANSITION;} +this.transition(name,config,callback);}else{this._hide();} +return this;};Y.NodeList.prototype.transition=function(config,callback){var nodes=this._nodes,i=0,node;while((node=nodes[i++])){Y.one(node).transition(config,callback);} +return this;};Y.Node.prototype.toggleView=function(name,on){var callback;this._toggles=this._toggles||[];if(typeof name=='boolean'){on=name;} +if(typeof on==='undefined'&&name in this._toggles){on=!this._toggles[name];} +on=(on)?1:0;if(on){this._show();}else{callback=_wrapCallBack(anim,this._hide);} +this._toggles[name]=on;this.transition(Y.Transition.toggles[name][on],callback);};Y.NodeList.prototype.toggleView=function(config,callback){var nodes=this._nodes,i=0,node;while((node=nodes[i++])){Y.one(node).toggleView(config,callback);} +return this;};Y.mix(Transition.fx,{fadeOut:{opacity:0,duration:0.5,easing:'ease-out'},fadeIn:{opacity:1,duration:0.5,easing:'ease-in'},sizeOut:{height:0,width:0,duration:0.75,easing:'ease-out'},sizeIn:{height:function(node){return node.get('scrollHeight')+'px';},width:function(node){return node.get('scrollWidth')+'px';},duration:0.5,easing:'ease-in',on:{start:function(){var overflow=this.getStyle('overflow');if(overflow!=='hidden'){this.setStyle('overflow','hidden');this._transitionOverflow=overflow;}},end:function(){if(this._transitionOverflow){this.setStyle('overflow',this._transitionOverflow);}}}}});Y.mix(Transition.toggles,{size:['sizeIn','sizeOut'],fade:['fadeOut','fadeIn']});},'3.3.0',{requires:['node-base']}); diff --git a/include/javascript/yui3/build/transition/transition-timer-min.js b/include/javascript/yui3/build/transition/transition-timer-min.js new file mode 100644 index 00000000..edd3063f --- /dev/null +++ b/include/javascript/yui3/build/transition/transition-timer-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("transition-timer",function(b){var a=b.Transition;b.mix(a.prototype,{_start:function(){if(a.useNative){this._runNative();}else{this._runTimer();}},_runTimer:function(){var c=this;c._initAttrs();a._running[b.stamp(c)]=c;c._startTime=new Date();a._startTimer();},_endTimer:function(){var c=this;delete a._running[b.stamp(c)];c._startTime=null;},_runFrame:function(){var c=new Date()-this._startTime;this._runAttrs(c);},_runAttrs:function(e){var o=this,n=o._node,u=o._config,f=b.stamp(n),m=a._nodeAttrs[f],h=a.behaviors,l=false,g=false,v,w,j,q,c,s,r,k,p;for(w in m){j=m[w];if((j&&j.transition===o)){r=j.duration;s=j.delay;c=(e-s)/1000;k=e;v={type:"propertyEnd",propertyName:w,config:u,elapsedTime:c};q=(p in h&&"set"in h[p])?h[p].set:a.DEFAULT_SETTER;l=(k>=r);if(k>r){k=r;}if(!s||e>=s){q(o,w,j.from,j.to,k-s,r-s,j.easing,j.unit);if(l){delete m[w];o._count--;if(u[w]&&u[w].on&&u[w].on.end){u[w].on.end.call(b.one(n),v);}if(!g&&o._count<=0){g=true;o._end(c);o._endTimer();}}}}}},_initAttrs:function(){var j=this,e=a.behaviors,l=b.stamp(j._node),q=a._nodeAttrs[l],d,i,k,n,g,c,m,o,p,f,h;for(c in q){d=q[c];if(q.hasOwnProperty(c)&&(d&&d.transition===j)){i=d.duration*1000;k=d.delay*1000;n=d.easing;g=d.value;if(c in j._node.style||c in b.DOM.CUSTOM_STYLES){f=(c in e&&"get"in e[c])?e[c].get(j,c):a.DEFAULT_GETTER(j,c);o=a.RE_UNITS.exec(f);m=a.RE_UNITS.exec(g);f=o?o[1]:f;h=m?m[1]:g;p=m?m[2]:o?o[2]:"";if(!p&&a.RE_DEFAULT_UNIT.test(c)){p=a.DEFAULT_UNIT;}if(typeof n==="string"){if(n.indexOf("cubic-bezier")>-1){n=n.substring(13,n.length-1).split(",");}else{if(a.easings[n]){n=a.easings[n];}}}d.from=Number(f);d.to=Number(h);d.unit=p;d.easing=n;d.duration=i+k;d.delay=k;}else{delete q[c];j._count--;}}}},destroy:function(){this.detachAll();this._node=null;}},true);b.mix(b.Transition,{_runtimeAttrs:{},RE_DEFAULT_UNIT:/^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i,DEFAULT_UNIT:"px",intervalTime:20,behaviors:{left:{get:function(d,c){return b.DOM._getAttrOffset(d._node,c);}}},DEFAULT_SETTER:function(f,g,i,j,l,e,h,k){i=Number(i);j=Number(j);var d=f._node,c=a.cubicBezier(h,l/e);c=i+c[0]*(j-i);if(d){if(g in d.style||g in b.DOM.CUSTOM_STYLES){k=k||"";b.DOM.setStyle(d,g,c+k);}}else{f._end();}},DEFAULT_GETTER:function(e,c){var d=e._node,f="";if(c in d.style||c in b.DOM.CUSTOM_STYLES){f=b.DOM.getComputedStyle(d,c);}return f;},_startTimer:function(){if(!a._timer){a._timer=setInterval(a._runFrame,a.intervalTime);}},_stopTimer:function(){clearInterval(a._timer);a._timer=null;},_runFrame:function(){var c=true,d;for(d in a._running){if(a._running[d]._runFrame){c=false;a._running[d]._runFrame();}}if(c){a._stopTimer();}},cubicBezier:function(s,m){var z=0,f=0,w=s[0],e=s[1],v=s[2],d=s[3],u=1,c=0,r=u-3*v+3*w-z,q=3*v-6*w+3*z,o=3*w-3*z,n=z,l=c-3*d+3*e-f,k=3*d-6*e+3*f,j=3*e-3*f,i=f,h=(((r*m)+q)*m+o)*m+n,g=(((l*m)+k)*m+j)*m+i;return[h,g];},easings:{ease:[0.25,0,1,0.25],linear:[0,0,1,1],"ease-in":[0.42,0,1,1],"ease-out":[0,0,0.58,1],"ease-in-out":[0.42,0,0.58,1]},_running:{},_timer:null,RE_UNITS:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/},true);a.behaviors.top=a.behaviors.bottom=a.behaviors.right=a.behaviors.left;b.Transition=a;},"3.3.0",{requires:["transition-native","node-style"]}); diff --git a/include/javascript/yui3/build/transition/transition-timer.js b/include/javascript/yui3/build/transition/transition-timer.js new file mode 100644 index 00000000..add79c3a --- /dev/null +++ b/include/javascript/yui3/build/transition/transition-timer.js @@ -0,0 +1,14 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('transition-timer',function(Y){var Transition=Y.Transition;Y.mix(Transition.prototype,{_start:function(){if(Transition.useNative){this._runNative();}else{this._runTimer();}},_runTimer:function(){var anim=this;anim._initAttrs();Transition._running[Y.stamp(anim)]=anim;anim._startTime=new Date();Transition._startTimer();},_endTimer:function(){var anim=this;delete Transition._running[Y.stamp(anim)];anim._startTime=null;},_runFrame:function(){var t=new Date()-this._startTime;this._runAttrs(t);},_runAttrs:function(time){var anim=this,node=anim._node,config=anim._config,uid=Y.stamp(node),attrs=Transition._nodeAttrs[uid],customAttr=Transition.behaviors,done=false,allDone=false,data,name,attribute,setter,elapsed,delay,d,t,i;for(name in attrs){attribute=attrs[name];if((attribute&&attribute.transition===anim)){d=attribute.duration;delay=attribute.delay;elapsed=(time-delay)/ 1000;t=time;data={type:'propertyEnd',propertyName:name,config:config,elapsedTime:elapsed};setter=(i in customAttr&&'set'in customAttr[i])?customAttr[i].set:Transition.DEFAULT_SETTER;done=(t>=d);if(t>d){t=d;} +if(!delay||time>=delay){setter(anim,name,attribute.from,attribute.to,t-delay,d-delay,attribute.easing,attribute.unit);if(done){delete attrs[name];anim._count--;if(config[name]&&config[name].on&&config[name].on.end){config[name].on.end.call(Y.one(node),data);} +if(!allDone&&anim._count<=0){allDone=true;anim._end(elapsed);anim._endTimer();}}}}}},_initAttrs:function(){var anim=this,customAttr=Transition.behaviors,uid=Y.stamp(anim._node),attrs=Transition._nodeAttrs[uid],attribute,duration,delay,easing,val,name,mTo,mFrom,unit,begin,end;for(name in attrs){attribute=attrs[name];if(attrs.hasOwnProperty(name)&&(attribute&&attribute.transition===anim)){duration=attribute.duration*1000;delay=attribute.delay*1000;easing=attribute.easing;val=attribute.value;if(name in anim._node.style||name in Y.DOM.CUSTOM_STYLES){begin=(name in customAttr&&'get'in customAttr[name])?customAttr[name].get(anim,name):Transition.DEFAULT_GETTER(anim,name);mFrom=Transition.RE_UNITS.exec(begin);mTo=Transition.RE_UNITS.exec(val);begin=mFrom?mFrom[1]:begin;end=mTo?mTo[1]:val;unit=mTo?mTo[2]:mFrom?mFrom[2]:'';if(!unit&&Transition.RE_DEFAULT_UNIT.test(name)){unit=Transition.DEFAULT_UNIT;} +if(typeof easing==='string'){if(easing.indexOf('cubic-bezier')>-1){easing=easing.substring(13,easing.length-1).split(',');}else if(Transition.easings[easing]){easing=Transition.easings[easing];}} +attribute.from=Number(begin);attribute.to=Number(end);attribute.unit=unit;attribute.easing=easing;attribute.duration=duration+delay;attribute.delay=delay;}else{delete attrs[name];anim._count--;}}}},destroy:function(){this.detachAll();this._node=null;}},true);Y.mix(Y.Transition,{_runtimeAttrs:{},RE_DEFAULT_UNIT:/^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i,DEFAULT_UNIT:'px',intervalTime:20,behaviors:{left:{get:function(anim,attr){return Y.DOM._getAttrOffset(anim._node,attr);}}},DEFAULT_SETTER:function(anim,att,from,to,elapsed,duration,fn,unit){from=Number(from);to=Number(to);var node=anim._node,val=Transition.cubicBezier(fn,elapsed / duration);val=from+val[0]*(to-from);if(node){if(att in node.style||att in Y.DOM.CUSTOM_STYLES){unit=unit||'';Y.DOM.setStyle(node,att,val+unit);}}else{anim._end();}},DEFAULT_GETTER:function(anim,att){var node=anim._node,val='';if(att in node.style||att in Y.DOM.CUSTOM_STYLES){val=Y.DOM.getComputedStyle(node,att);} +return val;},_startTimer:function(){if(!Transition._timer){Transition._timer=setInterval(Transition._runFrame,Transition.intervalTime);}},_stopTimer:function(){clearInterval(Transition._timer);Transition._timer=null;},_runFrame:function(){var done=true,anim;for(anim in Transition._running){if(Transition._running[anim]._runFrame){done=false;Transition._running[anim]._runFrame();}} +if(done){Transition._stopTimer();}},cubicBezier:function(p,t){var x0=0,y0=0,x1=p[0],y1=p[1],x2=p[2],y2=p[3],x3=1,y3=0,A=x3-3*x2+3*x1-x0,B=3*x2-6*x1+3*x0,C=3*x1-3*x0,D=x0,E=y3-3*y2+3*y1-y0,F=3*y2-6*y1+3*y0,G=3*y1-3*y0,H=y0,x=(((A*t)+B)*t+C)*t+D,y=(((E*t)+F)*t+G)*t+H;return[x,y];},easings:{ease:[0.25,0,1,0.25],linear:[0,0,1,1],'ease-in':[0.42,0,1,1],'ease-out':[0,0,0.58,1],'ease-in-out':[0.42,0,0.58,1]},_running:{},_timer:null,RE_UNITS:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/},true);Transition.behaviors.top=Transition.behaviors.bottom=Transition.behaviors.right=Transition.behaviors.left;Y.Transition=Transition;},'3.3.0',{requires:['transition-native','node-style']}); diff --git a/include/javascript/yui3/build/transition/transition.js b/include/javascript/yui3/build/transition/transition.js new file mode 100644 index 00000000..f24f2c38 --- /dev/null +++ b/include/javascript/yui3/build/transition/transition.js @@ -0,0 +1,46 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('transition-native',function(Y){var TRANSITION='-webkit-transition',TRANSITION_CAMEL='WebkitTransition',TRANSITION_PROPERTY_CAMEL='WebkitTransitionProperty',TRANSITION_PROPERTY='-webkit-transition-property',TRANSITION_DURATION='-webkit-transition-duration',TRANSITION_TIMING_FUNCTION='-webkit-transition-timing-function',TRANSITION_DELAY='-webkit-transition-delay',TRANSITION_END='webkitTransitionEnd',ON_TRANSITION_END='onwebkittransitionend',TRANSFORM_CAMEL='WebkitTransform',EMPTY_OBJ={},Transition=function(){this.init.apply(this,arguments);};Transition.fx={};Transition.toggles={};Transition._hasEnd={};Transition._toCamel=function(property){property=property.replace(/-([a-z])/gi,function(m0,m1){return m1.toUpperCase();});return property;};Transition._toHyphen=function(property){property=property.replace(/([A-Z]?)([a-z]+)([A-Z]?)/g,function(m0,m1,m2,m3){var str='';if(m1){str+='-'+m1.toLowerCase();} +str+=m2;if(m3){str+='-'+m3.toLowerCase();} +return str;});return property;};Transition._reKeywords=/^(?:node|duration|iterations|easing|delay|on|onstart|onend)$/i;Transition.useNative=false;if(TRANSITION in Y.config.doc.documentElement.style){Transition.useNative=true;Transition.supported=true;} +Y.Node.DOM_EVENTS[TRANSITION_END]=1;Transition.NAME='transition';Transition.DEFAULT_EASING='ease';Transition.DEFAULT_DURATION=0.5;Transition.DEFAULT_DELAY=0;Transition._nodeAttrs={};Transition.prototype={constructor:Transition,init:function(node,config){var anim=this;anim._node=node;if(!anim._running&&config){anim._config=config;node._transition=anim;anim._duration=('duration'in config)?config.duration:anim.constructor.DEFAULT_DURATION;anim._delay=('delay'in config)?config.delay:anim.constructor.DEFAULT_DELAY;anim._easing=config.easing||anim.constructor.DEFAULT_EASING;anim._count=0;anim._running=false;} +return anim;},addProperty:function(prop,config){var anim=this,node=this._node,uid=Y.stamp(node),nodeInstance=Y.one(node),attrs=Transition._nodeAttrs[uid],computed,compareVal,dur,attr,val;if(!attrs){attrs=Transition._nodeAttrs[uid]={};} +attr=attrs[prop];if(config&&config.value!==undefined){val=config.value;}else if(config!==undefined){val=config;config=EMPTY_OBJ;} +if(typeof val==='function'){val=val.call(nodeInstance,nodeInstance);} +if(attr&&attr.transition){if(attr.transition!==anim){attr.transition._count--;}} +anim._count++;dur=((typeof config.duration!='undefined')?config.duration:anim._duration)||0.0001;attrs[prop]={value:val,duration:dur,delay:(typeof config.delay!='undefined')?config.delay:anim._delay,easing:config.easing||anim._easing,transition:anim};computed=Y.DOM.getComputedStyle(node,prop);compareVal=(typeof val==='string')?computed:parseFloat(computed);if(Transition.useNative&&compareVal===val){setTimeout(function(){anim._onNativeEnd.call(node,{propertyName:prop,elapsedTime:dur});},dur*1000);}},removeProperty:function(prop){var anim=this,attrs=Transition._nodeAttrs[Y.stamp(anim._node)];if(attrs&&attrs[prop]){delete attrs[prop];anim._count--;}},initAttrs:function(config){var attr,node=this._node;if(config.transform&&!config[TRANSFORM_CAMEL]){config[TRANSFORM_CAMEL]=config.transform;delete config.transform;} +for(attr in config){if(config.hasOwnProperty(attr)&&!Transition._reKeywords.test(attr)){this.addProperty(attr,config[attr]);if(node.style[attr]===''){Y.DOM.setStyle(node,attr,Y.DOM.getComputedStyle(node,attr));}}}},run:function(callback){var anim=this,node=anim._node,config=anim._config,data={type:'transition:start',config:config};if(!anim._running){anim._running=true;if(config.on&&config.on.start){config.on.start.call(Y.one(node),data);} +anim.initAttrs(anim._config);anim._callback=callback;anim._start();} +return anim;},_start:function(){this._runNative();},_prepDur:function(dur){dur=parseFloat(dur);return dur+'s';},_runNative:function(time){var anim=this,node=anim._node,uid=Y.stamp(node),style=node.style,computed=getComputedStyle(node),attrs=Transition._nodeAttrs[uid],cssText='',cssTransition=computed[TRANSITION_PROPERTY],transitionText=TRANSITION_PROPERTY+': ',duration=TRANSITION_DURATION+': ',easing=TRANSITION_TIMING_FUNCTION+': ',delay=TRANSITION_DELAY+': ',hyphy,attr,name;if(cssTransition!=='all'){transitionText+=cssTransition+',';duration+=computed[TRANSITION_DURATION]+',';easing+=computed[TRANSITION_TIMING_FUNCTION]+',';delay+=computed[TRANSITION_DELAY]+',';} +for(name in attrs){hyphy=Transition._toHyphen(name);attr=attrs[name];if(attrs.hasOwnProperty(name)&&attr.transition===anim){if(name in node.style){duration+=anim._prepDur(attr.duration)+',';delay+=anim._prepDur(attr.delay)+',';easing+=(attr.easing)+',';transitionText+=hyphy+',';cssText+=hyphy+': '+attr.value+'; ';}else{this.removeProperty(name);}}} +transitionText=transitionText.replace(/,$/,';');duration=duration.replace(/,$/,';');easing=easing.replace(/,$/,';');delay=delay.replace(/,$/,';');if(!Transition._hasEnd[uid]){node.addEventListener(TRANSITION_END,anim._onNativeEnd,false);Transition._hasEnd[uid]=true;} +style.cssText+=transitionText+duration+easing+delay+cssText;},_end:function(elapsed){var anim=this,node=anim._node,callback=anim._callback,config=anim._config,data={type:'transition:end',config:config,elapsedTime:elapsed},nodeInstance=Y.one(node);anim._running=false;anim._callback=null;if(node){if(config.on&&config.on.end){setTimeout(function(){config.on.end.call(nodeInstance,data);if(callback){callback.call(nodeInstance,data);}},1);}else if(callback){setTimeout(function(){callback.call(nodeInstance,data);},1);}}},_endNative:function(name){var node=this._node,value=node.ownerDocument.defaultView.getComputedStyle(node,'')[TRANSITION_PROPERTY];if(typeof value==='string'){value=value.replace(new RegExp('(?:^|,\\s)'+name+',?'),',');value=value.replace(/^,|,$/,'');node.style[TRANSITION_CAMEL]=value;}},_onNativeEnd:function(e){var node=this,uid=Y.stamp(node),event=e,name=Transition._toCamel(event.propertyName),elapsed=event.elapsedTime,attrs=Transition._nodeAttrs[uid],attr=attrs[name],anim=(attr)?attr.transition:null,data,config;if(anim){anim.removeProperty(name);anim._endNative(name);config=anim._config[name];data={type:'propertyEnd',propertyName:name,elapsedTime:elapsed,config:config};if(config&&config.on&&config.on.end){config.on.end.call(Y.one(node),data);} +if(anim._count<=0){anim._end(elapsed);}}},destroy:function(){var anim=this;node.removeEventListener(TRANSITION_END,anim._onNativeEnd,false);anim._node=null;}};Y.Transition=Transition;Y.TransitionNative=Transition;Y.Node.prototype.transition=function(name,config,callback){var +transitionAttrs=Transition._nodeAttrs[Y.stamp(this._node)],anim=(transitionAttrs)?transitionAttrs.transition||null:null,fxConfig,prop;if(typeof name==='string'){if(typeof config==='function'){callback=config;config=null;} +fxConfig=Transition.fx[name];if(config&&typeof config!=='boolean'){config=Y.clone(config);for(prop in fxConfig){if(fxConfig.hasOwnProperty(prop)){if(!(prop in config)){config[prop]=fxConfig[prop];}}}}else{config=fxConfig;}}else{callback=config;config=name;} +if(anim&&!anim._running){anim.init(this,config);}else{anim=new Transition(this._node,config);} +anim.run(callback);return this;};Y.Node.prototype.show=function(name,config,callback){this._show();if(name&&Y.Transition){if(typeof name!=='string'&&!name.push){if(typeof config==='function'){callback=config;config=name;} +name=this.SHOW_TRANSITION;} +this.transition(name,config,callback);} +return this;};var _wrapCallBack=function(anim,fn,callback){return function(){if(fn){fn.call(anim);} +if(callback){callback.apply(anim._node,arguments);}};};Y.Node.prototype.hide=function(name,config,callback){if(name&&Y.Transition){if(typeof config==='function'){callback=config;config=null;} +callback=_wrapCallBack(this,this._hide,callback);if(typeof name!=='string'&&!name.push){if(typeof config==='function'){callback=config;config=name;} +name=this.HIDE_TRANSITION;} +this.transition(name,config,callback);}else{this._hide();} +return this;};Y.NodeList.prototype.transition=function(config,callback){var nodes=this._nodes,i=0,node;while((node=nodes[i++])){Y.one(node).transition(config,callback);} +return this;};Y.Node.prototype.toggleView=function(name,on){var callback;this._toggles=this._toggles||[];if(typeof name=='boolean'){on=name;} +if(typeof on==='undefined'&&name in this._toggles){on=!this._toggles[name];} +on=(on)?1:0;if(on){this._show();}else{callback=_wrapCallBack(anim,this._hide);} +this._toggles[name]=on;this.transition(Y.Transition.toggles[name][on],callback);};Y.NodeList.prototype.toggleView=function(config,callback){var nodes=this._nodes,i=0,node;while((node=nodes[i++])){Y.one(node).toggleView(config,callback);} +return this;};Y.mix(Transition.fx,{fadeOut:{opacity:0,duration:0.5,easing:'ease-out'},fadeIn:{opacity:1,duration:0.5,easing:'ease-in'},sizeOut:{height:0,width:0,duration:0.75,easing:'ease-out'},sizeIn:{height:function(node){return node.get('scrollHeight')+'px';},width:function(node){return node.get('scrollWidth')+'px';},duration:0.5,easing:'ease-in',on:{start:function(){var overflow=this.getStyle('overflow');if(overflow!=='hidden'){this.setStyle('overflow','hidden');this._transitionOverflow=overflow;}},end:function(){if(this._transitionOverflow){this.setStyle('overflow',this._transitionOverflow);}}}}});Y.mix(Transition.toggles,{size:['sizeIn','sizeOut'],fade:['fadeOut','fadeIn']});},'3.3.0',{requires:['node-base']});YUI.add('transition-timer',function(Y){var Transition=Y.Transition;Y.mix(Transition.prototype,{_start:function(){if(Transition.useNative){this._runNative();}else{this._runTimer();}},_runTimer:function(){var anim=this;anim._initAttrs();Transition._running[Y.stamp(anim)]=anim;anim._startTime=new Date();Transition._startTimer();},_endTimer:function(){var anim=this;delete Transition._running[Y.stamp(anim)];anim._startTime=null;},_runFrame:function(){var t=new Date()-this._startTime;this._runAttrs(t);},_runAttrs:function(time){var anim=this,node=anim._node,config=anim._config,uid=Y.stamp(node),attrs=Transition._nodeAttrs[uid],customAttr=Transition.behaviors,done=false,allDone=false,data,name,attribute,setter,elapsed,delay,d,t,i;for(name in attrs){attribute=attrs[name];if((attribute&&attribute.transition===anim)){d=attribute.duration;delay=attribute.delay;elapsed=(time-delay)/ 1000;t=time;data={type:'propertyEnd',propertyName:name,config:config,elapsedTime:elapsed};setter=(i in customAttr&&'set'in customAttr[i])?customAttr[i].set:Transition.DEFAULT_SETTER;done=(t>=d);if(t>d){t=d;} +if(!delay||time>=delay){setter(anim,name,attribute.from,attribute.to,t-delay,d-delay,attribute.easing,attribute.unit);if(done){delete attrs[name];anim._count--;if(config[name]&&config[name].on&&config[name].on.end){config[name].on.end.call(Y.one(node),data);} +if(!allDone&&anim._count<=0){allDone=true;anim._end(elapsed);anim._endTimer();}}}}}},_initAttrs:function(){var anim=this,customAttr=Transition.behaviors,uid=Y.stamp(anim._node),attrs=Transition._nodeAttrs[uid],attribute,duration,delay,easing,val,name,mTo,mFrom,unit,begin,end;for(name in attrs){attribute=attrs[name];if(attrs.hasOwnProperty(name)&&(attribute&&attribute.transition===anim)){duration=attribute.duration*1000;delay=attribute.delay*1000;easing=attribute.easing;val=attribute.value;if(name in anim._node.style||name in Y.DOM.CUSTOM_STYLES){begin=(name in customAttr&&'get'in customAttr[name])?customAttr[name].get(anim,name):Transition.DEFAULT_GETTER(anim,name);mFrom=Transition.RE_UNITS.exec(begin);mTo=Transition.RE_UNITS.exec(val);begin=mFrom?mFrom[1]:begin;end=mTo?mTo[1]:val;unit=mTo?mTo[2]:mFrom?mFrom[2]:'';if(!unit&&Transition.RE_DEFAULT_UNIT.test(name)){unit=Transition.DEFAULT_UNIT;} +if(typeof easing==='string'){if(easing.indexOf('cubic-bezier')>-1){easing=easing.substring(13,easing.length-1).split(',');}else if(Transition.easings[easing]){easing=Transition.easings[easing];}} +attribute.from=Number(begin);attribute.to=Number(end);attribute.unit=unit;attribute.easing=easing;attribute.duration=duration+delay;attribute.delay=delay;}else{delete attrs[name];anim._count--;}}}},destroy:function(){this.detachAll();this._node=null;}},true);Y.mix(Y.Transition,{_runtimeAttrs:{},RE_DEFAULT_UNIT:/^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i,DEFAULT_UNIT:'px',intervalTime:20,behaviors:{left:{get:function(anim,attr){return Y.DOM._getAttrOffset(anim._node,attr);}}},DEFAULT_SETTER:function(anim,att,from,to,elapsed,duration,fn,unit){from=Number(from);to=Number(to);var node=anim._node,val=Transition.cubicBezier(fn,elapsed / duration);val=from+val[0]*(to-from);if(node){if(att in node.style||att in Y.DOM.CUSTOM_STYLES){unit=unit||'';Y.DOM.setStyle(node,att,val+unit);}}else{anim._end();}},DEFAULT_GETTER:function(anim,att){var node=anim._node,val='';if(att in node.style||att in Y.DOM.CUSTOM_STYLES){val=Y.DOM.getComputedStyle(node,att);} +return val;},_startTimer:function(){if(!Transition._timer){Transition._timer=setInterval(Transition._runFrame,Transition.intervalTime);}},_stopTimer:function(){clearInterval(Transition._timer);Transition._timer=null;},_runFrame:function(){var done=true,anim;for(anim in Transition._running){if(Transition._running[anim]._runFrame){done=false;Transition._running[anim]._runFrame();}} +if(done){Transition._stopTimer();}},cubicBezier:function(p,t){var x0=0,y0=0,x1=p[0],y1=p[1],x2=p[2],y2=p[3],x3=1,y3=0,A=x3-3*x2+3*x1-x0,B=3*x2-6*x1+3*x0,C=3*x1-3*x0,D=x0,E=y3-3*y2+3*y1-y0,F=3*y2-6*y1+3*y0,G=3*y1-3*y0,H=y0,x=(((A*t)+B)*t+C)*t+D,y=(((E*t)+F)*t+G)*t+H;return[x,y];},easings:{ease:[0.25,0,1,0.25],linear:[0,0,1,1],'ease-in':[0.42,0,1,1],'ease-out':[0,0,0.58,1],'ease-in-out':[0.42,0,0.58,1]},_running:{},_timer:null,RE_UNITS:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/},true);Transition.behaviors.top=Transition.behaviors.bottom=Transition.behaviors.right=Transition.behaviors.left;Y.Transition=Transition;},'3.3.0',{requires:['transition-native','node-style']});YUI.add('transition',function(Y){},'3.3.0',{use:['transition-native','transition-timer']}); diff --git a/include/javascript/yui3/build/uploader/assets/uploader.swf b/include/javascript/yui3/build/uploader/assets/uploader.swf new file mode 100644 index 0000000000000000000000000000000000000000..c65fd9667f02a36462f3c972e4d8a9773dc5713b GIT binary patch literal 6671 zcmV+q8t~;qS5pexFaQ8}+O;|fbQ{NY^B222I7kpYL`l>INwjEDE0CgW*`j1x6c39s zCCEG^+c8ZnfL#J62ryVc64Rz(lqh!WT+V$siDKt+oYZZurfJe6ZIY&G;ssfWy^r+1 z?<=*<{y)38EIV;}@M(5t{`~*v&!2w{?2AnP9%I3eGqwrXaPwxy*lSw94U8SlC(Zte z;nDELg-q7!$JuRNsX}3~zo+NIg$t1j2P3)sT+e~ShY$Dk_Vx7j?MICL)>5{hU)-Oy zc6SX32E&Gx$fp+z>0CBUb3L9b7H;e6a=9iG6{d^Dd`7TLCVGsFv0!8iR?mUR0c4a+ z^qaZ-f?gQV7Z)?>gih>wF7CHdxy1Yh{k*Z?%;;9?XipW9XbR~<#uyk(=Hf@ifLdeOgpaV6>)QLKh$Sw3N=5xtn0%bChl_0JqAr_0pcqVP7jQl_`JD<&6 zaJHyI2`7;^^g^y4qYR_T|}x$Z4@wnF|^90-mQh7d~)E3-|RN=yk*(=+T}R zXxoM01rD&`&|i3tvLR`Gef?g)2X9!#=85PFQ>J8$KBF1^TSpTV9(K1G8tcY*pnS5?8Z&;R?`G%1|j2gzGBl&zT z?;zc2EX8wrJ}GAY(OjbF;yb*vMxl|mn=nixZ)6jOe|lnk!gyuTunLV1N-}LNX7nXx zvVcnUmd~qBF6Pq(V}oTB1~Zx5g;T{$A-$L}h?%7p1(s@L^?1f;FcC)Lji;?bz*!O! zy5p&oVHs*XpSxfgjf87W<(zFA3wb?jE$S#)VS2GquiYq+(zD5of#;iE43Y^~1#hY$ z8%C39j28=qTvjM>da_kWx<<7ve@fU^>@IjC@PQ^znQ;IcEgXFC$BO zDwm5C3+asSp6M}n0hNW0qs9i-pFtHL|c+SaK}8u}+oEbw)=rwx+Y`LR!zHUuBTaa#_5*prgaGq5IvNnonod zabbn6WvQpCH}0o{j|~fBb1axnYWauL3G#A1zZ9ym524qlvK8Zj=SbFyZISr|>u<8b zo$4rfrq-AUH{{-sbD_9hOU+&rxl9K2;+j4BQ@+sP;@?GP*ZM+Sv`&B3NSaZ~$@D^v z@_h~`6ur?o^iZyt#oK7CF|@I4TcVhEJjn4jjGaj`TGHIq(xSo9!-bzZXE|Y{=TZeV zAle(i;h+fG z##k1yk+si40i1w^CN_lj7S|K=mOQ&OmJC=`R!*QgucM#Mrd?V~5j$=gE1L}JC|q?m{?28Vjd%D;zhBY#6r)7joePKLYN}-7g>4U-i)l4a1I~ScrJusKYFz za4|>Lho|Td`+dg6f|0e*cBKArpeAF2f0JvU)!hokeAY;YJ-KW|&Y5Q9hH`kM{fx4R zFGTMWwnvO`e<$#w2>GxccC1YhqaM}Ck@1nCsSsX}xGC}}BWvVudEfEGM5BBu+_8#hq7g0ayY+GH<>34#1XFYJ(>7CFwl*95VjWX@1M;aqP z(9s3Y8xG=@AHZa5ZKCZLN2PVWkia5j^MpZaqeEnk3(i5XJSp^tRmWj`6VdVU+34Ak z39mDnp7NiHPEU@^4oA3Qz@e=Ruw_y5?tR}y{%NmByy%h;>B=dp;H!As~EQmd3mvDrTFRTQzH{&L$a02 z7i7X~bHZKK&xnB^oz}hTtz~@?#sWpdBu2xq&}hV00muc6HyzjE78hMi?oPK|hhoru zx>)`yx zs)jZYUn&@u$XQ8mA?Mb5;hwNxEKKDJdL~#;{UVGLZU(Ah9IRj2`_e>IP}UG`n=ldv zI!CfT{)7pwKP*$%ay^6HFT!6KMh)kNT6oimsi`w)e+9SfR4p-XCveyqhYhL)1!?10 zv}Sf!Bs`v;H!@4%gpSu}h0&VBs2()>1uJ|ZT}Xw6mtzeZPUNy#C*g*X(lYXxI>QTT z3*lyZu9z3^mq^Q`fw?eUSgIDttz}Tn#&yQ*fNQR@oM#a1HQh>0nJuK!mS1EgQG_WM z=o=6KH=(9P=hiT%bZg#Ac`udDB)xNaeKD0zSiZP{;T_XO#+%IR7x0P-9J3?=)ry>sLq5v)`iOrL3X3oT+XVOUs_DMA4|CPdLtn{C4sZ3H%kdzoO(sPh6v zFR?zBHFMsf=&3W~BU2;ZvFPl`#6)z$PsN^t5ULh+PP7jQ)jEsaFTP<-ofO7kna4mL zDJvGw-iX#hwaHL1j{&T`2D|1&eBM|ZBHg()V%l4NDk&qUr$#1}$uomPBRk8$aMuXg zS{IpD*W{v}FuKAN(IPv35Jqt^GV}vEpkGnluZ1%@Uac^=uIM5LZ>kw^9jlw%Tx7GT zqAqpA-OJpo(Rl!bExeHa@Q&I{@05&nHy)@_uD?>a zSbRZGP-&@VjO<(?C8~WZTz=(Xkt1jEjV$@YqFA>Cyg}55NR3Y=L#9t?A(u>>?vD=w zDoim!LuEk#qGv`Et}iy@Zi*7fI`jevzAsXw-jppl$llB*{Y5bXr5BX8YC>E8F9;}d?D}{Kua`qx* z66@?_&@E;zQfSmO%_HtWY-*x#KK;C&&XCB?i`qyI=N523e4bj-3)xBy@9?pfun1Z3 zmcwK~kT?W^n!>#mQ{%8)`Vbey1wcpx4wkf7Cg>3}yYoTLf$0g`^9dx`NIxa)U z8=ymN|4YEdTRURyk4fzxk>o}dlt4pcuqo8s(%RNXDBxw?a^VXp4v z>MpMC=4vNbZ{X@4u6A+tMy~GVYBz^{95k-(=W2wjJzVYOaDc0QTs_Fun>gIe)k7R^ z;ruXH`?-3At4BH9#?=9?-pM&PFxID_$JGgp+drxxpP7dQ-J;l}2 zT#a(|3|H^s>I7FOxjMzwX|A5-aE`;>T)l^@_j2_WT)mIO3|H^xFw6Zq_s2OTI3&5> z;9zo?T57PlNB%0KTUQ_66{L0ek6Zar|ZQeVJg0 zBmF$~UjyFo%h>-4wy$IR2DWb^>{qe>7Peo*_HAsxj_o_xzKiV{;IfT<3EK*eSF!&M zY*(>e!?uR)H?jQ|^7(CSWD~!K?f0?$0k%Ix*dJm09=1Qm`JZC@GaUap_J09u}iOcWA_AYGiM%a6>y;s^I@y#E^(T9-36^VB| zF8Mwz;rt0~AC*qojI}qTopYh{xA0N(#KaB`75LAJ`N)^}oCiD}cK|`gJP>Sh59?`C=?Ie8O=iwUl|Nu1!d6v}5Qj!|Le!*! z1F@nIN%;vZ4fOYQ&rbQU* zVZF4|0mk~+L0~&>65MYF7CD5A;JJmiy%pHb!@&Cb89Ty`0^4^RunlM?x3gowZWv_j zI2!`iIt)x60k&rpSo2%P!IEm8B~hn+8z2VE(!pp{*ZI?#(L+TdWys6~~W14lXlO<%^yya3t z3E`#t;!0fJjfg9&rl}RLteSIIvZKrB)=i zwTq<|v}kSVQV8u?d(|Zp0tLDWkrhJTfygC&tF8T*ZEn3D7130W$LG)Dk(+NOhCfaW zW`ZY!EOpv8PshAw$~L>BX=$Yey$&HO(FY);iedBt7CJyguMtE?P99;Ye%tJKh&ro8 z{Z*oVB*I-e33nq3r!9lfoNcz39+=;2o4umb9wdmnaDris!Ml7f(9x%~hoJ2^@``aY zW1Bm18yYUy=B@59YnvzBVa_(g?r_mIH5!@&olJja$mLLmI>VtVhaFW8TihY;cB;DD zNg8Tz1xJlO67aFAfTJ}6=Boncs{-b$0_Lj%=7oUI+2+~DUm#?@DrCMYWWFk7zA9wC zDkKiIM_nQPm|Fb%QO2_@)nU&lCl!`zcYAb`<0p@^)S%tTQg_+f+lgimsy-n5eg2s; z(dy`7XdwgguGw*gCKx0&UqZ20R^#&McF%HCLZw?Y=a+*CZg(fV=H#OZU)&q_>62cc z*Bj??HLgV4P_B1C*=rhTlNfmo(!8ua(2cyMO9@|S6FCv`-%X^rbDW#=Vu#(HKA*Sw zkI;p1S35dRcGoC3`20_U*vN}4eD+FZvuidouWTmUrIpq4dFbe8*|I0Wk;adkTuKBS z?+wKL+mThA&scG9r#xDKQ469)=nMFT_XfOJUd24-`RD~8+BhfDtuE9etoP0+DspAS>9g?gf2Nb4B z@;H%2dyF;}_Oq;9ThTrU`bFD3uoAtW?le?E`*1zll{&QM3ff2N(H^fuYpI|;QIGb~ zI<(db+Q;hAK3<2`CL`KGLi+?pn8A{{WX@ly#V-T(SFLEDsw3S%q*FxtRFxDXcgg&* z(I015w4VeVzM6(F!4DDjpTO^{_1COuKUK%OT~>Vl6U6(cf4Eqmt&-Z^YjjmIx(D8r z?De>2vyo&yN&G%nCo9EO?ekDFm*J(QTn7EMu%dmjPQpzU#r@0=m+(t z;Y+YKP1vQ_CHP#+el%hnJV; z`Kt~hCG6N6kp1R5%wMPz+tz-uZoZ=Z63Se2h_ZqmeRfdV+JL8z?!&xqF2#ZmMsLQ& zF5 z{b49i9)V8zas5pYdo$FomS>Lut|5nQiYL(UgmkX^TCc&v%Pk9%!Ac9nWgz+%fcwwJ z2Fy1ht0z)t?~ma4VMs*`Ch8*xIU|{G#W>Xo(YHZ$+8v9;&PE>v*@Z;k4h%P@8L^G+ zqLKa%1RUGC{7zW#;M|iOWP62lv3G&_ZqVQ3$QpYunC}Dq{m!gQ|9}hjnvW4f4`x*a zP$G-%tc(|8w^qj4*on$G7YkR$i!sd^BeMqcgAg03nSKaj+g!|DB=Q~1^I@!@-wEsr zFnlq*8OzlcwjJ>0qs|WoZDsY?pSbl@W_Dd8q2V2 z?80`e!Y=(yZ3OwJ>*)7w#gKBZt}zdoac#t$C%`{DmLC}9H-jiSsT9FOXxt<2qLW<!h<)C!Iwad_MnoP}x|# z+2&pNVk?a+)IT3qh+aG(FY(C<~J6m43=Qd$m;pi+@$^cMkDcC}>w65wjd{2Cxa$^2zN99w&{ zR5D*B(kvD#^aAKkDD*nOYCW!E;i7sKEI)1Y&}X_^&=~PG*nxN3$)0Zh$oe|&en9s6 z{O3gRuFN!@Y+}nzSfrNpUxB#1qJJH~Gv9!d-@r`2OvSdkdMUv}8|k|7&4Fb)UOHAa zab-2GU~Zr9<7)Hw@WQzl%WgEDK618Q=*Zfm61uQLF07F=%QOl<)gm#r=R_A`9wf{b z@eptEGB)!~C`G?X0fpTp0eHJ?OusRuH}<8>QVIHzqLjJ^-TNN%*TMV_q~bPu^7|z7yKugnp4EG4{{9!tKj6+$ zsJ*dgz_j6fODDQ@1vhoKUBOG;XIFTpVl@1)G+F{^!B<0U1uZ0Qu0r%TFu^|qnrWLe z(W@ZQIBA=&D324id2f0AfNknD#?#!=@cu6uVCN-1zW*CO*!hT^|NoR7c7Ea-`2XOFU4WQ3 z{68|su7UPwq&-64XAFbXX8{A3N-z1)m+%X5-a#`6eTu3#cP51%!>`Akc|vc&uk6m` z&@z4%ccz5$_*LDR8cO1qyE7g-i(juh^M)|Gb^6?yFVv4;zdQ4XH2enKSs=6>zYXrJ zAr!)IqdRL1NhG_MZ#nerdLy>mpIwhWyKX+a{`zOvpL}-x>a*+K=hlxuxBj~4*1!GS zddKtYi_for=XtDc6D3Rp-=#o$t1QdPpxwKQ5tx3sT)DhPzjLf!UL&mQqg*S-tY=`= zU0lKDMxw)#M^<_$R+q_wB3L?jqrVAAOh4mR2~UJk3H=`2Kk~B4RvoF2$cn7oCw~2P z1Zx>5O{|qJVUFykOeC*vzkCf7hV}_*<%;%6=}L*Vyh7;%DOO5l$@^qa^D~&7=rON- z2(%}qX>baUqbeqf-FC0LLAyA(_9@Ke7{jqVyRURsivAYJhGgvGAH=WA=xPA;L{|)OId>oV4E${#U literal 0 HcmV?d00001 diff --git a/include/javascript/yui3/build/uploader/uploader-min.js b/include/javascript/yui3/build/uploader/uploader-min.js new file mode 100644 index 00000000..ca23e021 --- /dev/null +++ b/include/javascript/yui3/build/uploader/uploader-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("uploader",function(E){var B=E.Event,C=E.Node;var A=E.Env.cdn+"uploader/assets/uploader.swf";function D(F){D.superclass.constructor.apply(this,arguments);if(F.hasOwnProperty("boundingBox")){this.set("boundingBox",F.boundingBox);}if(F.hasOwnProperty("buttonSkin")){this.set("buttonSkin",F.buttonSkin);}if(F.hasOwnProperty("transparent")){this.set("transparent",F.transparent);}if(F.hasOwnProperty("swfURL")){this.set("swfURL",F.swfURL);}}E.extend(D,E.Base,{uploaderswf:null,_id:"",initializer:function(){this._id=E.guid("uploader");var F=C.one(this.get("boundingBox"));var I={version:"10.0.45",fixedAttributes:{allowScriptAccess:"always",allowNetworking:"all",scale:"noscale"},flashVars:{}};if(this.get("buttonSkin")!=""){I.flashVars["buttonSkin"]=this.get("buttonSkin");}if(this.get("transparent")){I.fixedAttributes["wmode"]="transparent";}this.uploaderswf=new E.SWF(F,this.get("swfURL"),I);var H=this.uploaderswf;var G=E.bind(this._relayEvent,this);H.on("swfReady",E.bind(this._initializeUploader,this));H.on("click",G);H.on("fileselect",G);H.on("mousedown",G);H.on("mouseup",G);H.on("mouseleave",G);H.on("mouseenter",G);H.on("uploadcancel",G);H.on("uploadcomplete",G);H.on("uploadcompletedata",G);H.on("uploaderror",G);H.on("uploadprogress",G);H.on("uploadstart",G);},removeFile:function(F){return this.uploaderswf.callSWF("removeFile",[F]);},clearFileList:function(){return this.uploaderswf.callSWF("clearFileList",[]);},upload:function(F,H,J,G,I){if(E.Lang.isArray(F)){return this.uploaderswf.callSWF("uploadThese",[F,H,J,G,I]);}else{if(E.Lang.isString(F)){return this.uploaderswf.callSWF("upload",[F,H,J,G,I]);}}},uploadThese:function(H,G,J,F,I){return this.uploaderswf.callSWF("uploadThese",[H,G,J,F,I]);},uploadAll:function(G,I,F,H){return this.uploaderswf.callSWF("uploadAll",[G,I,F,H]);},cancel:function(F){return this.uploaderswf.callSWF("cancel",[F]);},setAllowLogging:function(F){this.uploaderswf.callSWF("setAllowLogging",[F]);},setAllowMultipleFiles:function(F){this.uploaderswf.callSWF("setAllowMultipleFiles",[F]);},setSimUploadLimit:function(F){this.uploaderswf.callSWF("setSimUploadLimit",[F]);},setFileFilters:function(F){this.uploaderswf.callSWF("setFileFilters",[F]);},enable:function(){this.uploaderswf.callSWF("enable");},disable:function(){this.uploaderswf.callSWF("disable");},_initializeUploader:function(F){this.publish("uploaderReady",{fireOnce:true});this.fire("uploaderReady",{});},_relayEvent:function(F){this.fire(F.type,F);},toString:function(){return"Uploader "+this._id;}},{ATTRS:{log:{value:false,setter:"setAllowLogging"},multiFiles:{value:false,setter:"setAllowMultipleFiles"},simLimit:{value:2,setter:"setSimUploadLimit"},fileFilters:{value:[],setter:"setFileFilters"},boundingBox:{value:null,writeOnce:"initOnly"},buttonSkin:{value:null,writeOnce:"initOnly"},transparent:{value:true,writeOnce:"initOnly"},swfURL:{value:A,writeOnce:"initOnly"}}});E.Uploader=D;},"3.3.0",{requires:["swf","base","node","event"]}); diff --git a/include/javascript/yui3/build/uploader/uploader.js b/include/javascript/yui3/build/uploader/uploader.js new file mode 100644 index 00000000..9198f9c2 --- /dev/null +++ b/include/javascript/yui3/build/uploader/uploader.js @@ -0,0 +1,12 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('uploader',function(Y){var Event=Y.Event,Node=Y.Node;var SWFURL=Y.Env.cdn+"uploader/assets/uploader.swf";function Uploader(config){Uploader.superclass.constructor.apply(this,arguments);if(config.hasOwnProperty("boundingBox")){this.set("boundingBox",config.boundingBox);};if(config.hasOwnProperty("buttonSkin")){this.set("buttonSkin",config.buttonSkin);};if(config.hasOwnProperty("transparent")){this.set("transparent",config.transparent);};if(config.hasOwnProperty("swfURL")){this.set("swfURL",config.swfURL);};};Y.extend(Uploader,Y.Base,{uploaderswf:null,_id:"",initializer:function(){this._id=Y.guid("uploader");var oElement=Node.one(this.get("boundingBox"));var params={version:"10.0.45",fixedAttributes:{allowScriptAccess:"always",allowNetworking:"all",scale:"noscale"},flashVars:{}};if(this.get("buttonSkin")!=""){params.flashVars["buttonSkin"]=this.get("buttonSkin");} +if(this.get("transparent")){params.fixedAttributes["wmode"]="transparent";} +this.uploaderswf=new Y.SWF(oElement,this.get("swfURL"),params);var upswf=this.uploaderswf;var relEvent=Y.bind(this._relayEvent,this);upswf.on("swfReady",Y.bind(this._initializeUploader,this));upswf.on("click",relEvent);upswf.on("fileselect",relEvent);upswf.on("mousedown",relEvent);upswf.on("mouseup",relEvent);upswf.on("mouseleave",relEvent);upswf.on("mouseenter",relEvent);upswf.on("uploadcancel",relEvent);upswf.on("uploadcomplete",relEvent);upswf.on("uploadcompletedata",relEvent);upswf.on("uploaderror",relEvent);upswf.on("uploadprogress",relEvent);upswf.on("uploadstart",relEvent);},removeFile:function(fileID){return this.uploaderswf.callSWF("removeFile",[fileID]);},clearFileList:function(){return this.uploaderswf.callSWF("clearFileList",[]);},upload:function(fileID,url,method,postVars,postFileVarName){if(Y.Lang.isArray(fileID)){return this.uploaderswf.callSWF("uploadThese",[fileID,url,method,postVars,postFileVarName]);} +else if(Y.Lang.isString(fileID)){return this.uploaderswf.callSWF("upload",[fileID,url,method,postVars,postFileVarName]);}},uploadThese:function(fileIDs,url,method,postVars,postFileVarName){return this.uploaderswf.callSWF("uploadThese",[fileIDs,url,method,postVars,postFileVarName]);},uploadAll:function(url,method,postVars,postFileVarName){return this.uploaderswf.callSWF("uploadAll",[url,method,postVars,postFileVarName]);},cancel:function(fileID){return this.uploaderswf.callSWF("cancel",[fileID]);},setAllowLogging:function(value){this.uploaderswf.callSWF("setAllowLogging",[value]);},setAllowMultipleFiles:function(value){this.uploaderswf.callSWF("setAllowMultipleFiles",[value]);},setSimUploadLimit:function(value){this.uploaderswf.callSWF("setSimUploadLimit",[value]);},setFileFilters:function(fileFilters){this.uploaderswf.callSWF("setFileFilters",[fileFilters]);},enable:function(){this.uploaderswf.callSWF("enable");},disable:function(){this.uploaderswf.callSWF("disable");},_initializeUploader:function(event){this.publish("uploaderReady",{fireOnce:true});this.fire("uploaderReady",{});},_relayEvent:function(event){this.fire(event.type,event);},toString:function() +{return"Uploader "+this._id;}},{ATTRS:{log:{value:false,setter:"setAllowLogging"},multiFiles:{value:false,setter:"setAllowMultipleFiles"},simLimit:{value:2,setter:"setSimUploadLimit"},fileFilters:{value:[],setter:"setFileFilters"},boundingBox:{value:null,writeOnce:'initOnly'},buttonSkin:{value:null,writeOnce:'initOnly'},transparent:{value:true,writeOnce:'initOnly'},swfURL:{value:SWFURL,writeOnce:'initOnly'}}});Y.Uploader=Uploader;},'3.3.0',{requires:['swf','base','node','event']}); diff --git a/include/javascript/yui3/build/widget-anim/widget-anim-min.js b/include/javascript/yui3/build/widget-anim/widget-anim-min.js new file mode 100644 index 00000000..91d4077f --- /dev/null +++ b/include/javascript/yui3/build/widget-anim/widget-anim-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("widget-anim",function(C){var P="boundingBox",O="host",S="node",L="opacity",R="",K="visible",Q="destroy",N="hidden",B="rendered",M="start",F="end",I="duration",D="animShow",J="animHide",A="_uiSetVisible",G="animShowChange",H="animHideChange";function E(T){E.superclass.constructor.apply(this,arguments);}E.NS="anim";E.NAME="pluginWidgetAnim";E.ANIMATIONS={fadeIn:function(){var V=this.get(O),T=V.get(P),U=new C.Anim({node:T,to:{opacity:1},duration:this.get(I)});if(!V.get(K)){T.setStyle(L,0);}U.on(Q,function(){this.get(S).setStyle(L,(C.UA.ie)?1:R);});return U;},fadeOut:function(){return new C.Anim({node:this.get(O).get(P),to:{opacity:0},duration:this.get(I)});}};E.ATTRS={duration:{value:0.2},animShow:{valueFn:E.ANIMATIONS.fadeIn},animHide:{valueFn:E.ANIMATIONS.fadeOut}};C.extend(E,C.Plugin.Base,{initializer:function(T){this._bindAnimShow();this._bindAnimHide();this.after(G,this._bindAnimShow);this.after(H,this._bindAnimHide);this.beforeHostMethod(A,this._uiAnimSetVisible);},destructor:function(){this.get(D).destroy();this.get(J).destroy();},_uiAnimSetVisible:function(T){if(this.get(O).get(B)){if(T){this.get(J).stop();this.get(D).run();}else{this.get(D).stop();this.get(J).run();}return new C.Do.Prevent();}},_uiSetVisible:function(U){var T=this.get(O),V=T.getClassName(N);T.get(P).toggleClass(V,!U);},_bindAnimShow:function(){this.get(D).on(M,C.bind(function(){this._uiSetVisible(true);},this));},_bindAnimHide:function(){this.get(J).after(F,C.bind(function(){this._uiSetVisible(false);},this));}});C.namespace("Plugin").WidgetAnim=E;},"3.3.0",{requires:["plugin","anim-base","widget"]}); diff --git a/include/javascript/yui3/build/widget-anim/widget-anim.js b/include/javascript/yui3/build/widget-anim/widget-anim.js new file mode 100644 index 00000000..f18676a0 --- /dev/null +++ b/include/javascript/yui3/build/widget-anim/widget-anim.js @@ -0,0 +1,11 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('widget-anim',function(Y){var BOUNDING_BOX="boundingBox",HOST="host",NODE="node",OPACITY="opacity",EMPTY_STR="",VISIBLE="visible",DESTROY="destroy",HIDDEN="hidden",RENDERED="rendered",START="start",END="end",DURATION="duration",ANIM_SHOW="animShow",ANIM_HIDE="animHide",_UI_SET_VISIBLE="_uiSetVisible",ANIM_SHOW_CHANGE="animShowChange",ANIM_HIDE_CHANGE="animHideChange";function WidgetAnim(config){WidgetAnim.superclass.constructor.apply(this,arguments);} +WidgetAnim.NS="anim";WidgetAnim.NAME="pluginWidgetAnim";WidgetAnim.ANIMATIONS={fadeIn:function(){var widget=this.get(HOST),boundingBox=widget.get(BOUNDING_BOX),anim=new Y.Anim({node:boundingBox,to:{opacity:1},duration:this.get(DURATION)});if(!widget.get(VISIBLE)){boundingBox.setStyle(OPACITY,0);} +anim.on(DESTROY,function(){this.get(NODE).setStyle(OPACITY,(Y.UA.ie)?1:EMPTY_STR);});return anim;},fadeOut:function(){return new Y.Anim({node:this.get(HOST).get(BOUNDING_BOX),to:{opacity:0},duration:this.get(DURATION)});}};WidgetAnim.ATTRS={duration:{value:0.2},animShow:{valueFn:WidgetAnim.ANIMATIONS.fadeIn},animHide:{valueFn:WidgetAnim.ANIMATIONS.fadeOut}};Y.extend(WidgetAnim,Y.Plugin.Base,{initializer:function(config){this._bindAnimShow();this._bindAnimHide();this.after(ANIM_SHOW_CHANGE,this._bindAnimShow);this.after(ANIM_HIDE_CHANGE,this._bindAnimHide);this.beforeHostMethod(_UI_SET_VISIBLE,this._uiAnimSetVisible);},destructor:function(){this.get(ANIM_SHOW).destroy();this.get(ANIM_HIDE).destroy();},_uiAnimSetVisible:function(val){if(this.get(HOST).get(RENDERED)){if(val){this.get(ANIM_HIDE).stop();this.get(ANIM_SHOW).run();}else{this.get(ANIM_SHOW).stop();this.get(ANIM_HIDE).run();} +return new Y.Do.Prevent();}},_uiSetVisible:function(val){var host=this.get(HOST),hiddenClass=host.getClassName(HIDDEN);host.get(BOUNDING_BOX).toggleClass(hiddenClass,!val);},_bindAnimShow:function(){this.get(ANIM_SHOW).on(START,Y.bind(function(){this._uiSetVisible(true);},this));},_bindAnimHide:function(){this.get(ANIM_HIDE).after(END,Y.bind(function(){this._uiSetVisible(false);},this));}});Y.namespace("Plugin").WidgetAnim=WidgetAnim;},'3.3.0',{requires:['plugin','anim-base','widget']}); diff --git a/include/javascript/yui3/build/widget/assets/skins/sam/widget-base-skin.css b/include/javascript/yui3/build/widget/assets/skins/sam/widget-base-skin.css new file mode 100644 index 00000000..fcfea041 --- /dev/null +++ b/include/javascript/yui3/build/widget/assets/skins/sam/widget-base-skin.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ diff --git a/include/javascript/yui3/build/widget/assets/skins/sam/widget-base.css b/include/javascript/yui3/build/widget/assets/skins/sam/widget-base.css new file mode 100644 index 00000000..51e66d95 --- /dev/null +++ b/include/javascript/yui3/build/widget/assets/skins/sam/widget-base.css @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +.yui3-widget-hidden{display:none}.yui3-widget-content{overflow:hidden}.yui3-widget-content-expanded{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;height:100%}.yui3-widget-tmp-forcesize{overflow:hidden!important} diff --git a/include/javascript/yui3/build/widget/assets/skins/sam/widget-skin.css b/include/javascript/yui3/build/widget/assets/skins/sam/widget-skin.css deleted file mode 100644 index dbc8374a..00000000 --- a/include/javascript/yui3/build/widget/assets/skins/sam/widget-skin.css +++ /dev/null @@ -1,7 +0,0 @@ -/* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. -Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 -*/ diff --git a/include/javascript/yui3/build/widget/assets/skins/sam/widget-stack-skin.css b/include/javascript/yui3/build/widget/assets/skins/sam/widget-stack-skin.css index dbc8374a..fcfea041 100644 --- a/include/javascript/yui3/build/widget/assets/skins/sam/widget-stack-skin.css +++ b/include/javascript/yui3/build/widget/assets/skins/sam/widget-stack-skin.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ diff --git a/include/javascript/yui3/build/widget/assets/skins/sam/widget-stack.css b/include/javascript/yui3/build/widget/assets/skins/sam/widget-stack.css index d7396945..53cc44b9 100644 --- a/include/javascript/yui3/build/widget/assets/skins/sam/widget-stack.css +++ b/include/javascript/yui3/build/widget/assets/skins/sam/widget-stack.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -.yui-widget-stacked .yui-widget-shim{opacity:0;filter:alpha(opacity=0);position:absolute;border:none;top:0;left:0;padding:0;margin:0;z-index:-1;width:100%;height:100%;_width:0;_height:0;} +.yui3-widget-stacked .yui3-widget-shim{opacity:0;filter:alpha(opacity=0);position:absolute;border:none;top:0;left:0;padding:0;margin:0;z-index:-1;width:100%;height:100%;_width:0;_height:0;} diff --git a/include/javascript/yui3/build/widget/assets/skins/sam/widget.css b/include/javascript/yui3/build/widget/assets/skins/sam/widget.css index eb73a02c..51e66d95 100644 --- a/include/javascript/yui3/build/widget/assets/skins/sam/widget.css +++ b/include/javascript/yui3/build/widget/assets/skins/sam/widget.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -.yui-widget-hidden{display:none;} +.yui3-widget-hidden{display:none}.yui3-widget-content{overflow:hidden}.yui3-widget-content-expanded{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;height:100%}.yui3-widget-tmp-forcesize{overflow:hidden!important} diff --git a/include/javascript/yui3/build/widget/assets/widget-base-core.css b/include/javascript/yui3/build/widget/assets/widget-base-core.css new file mode 100644 index 00000000..8f9d3823 --- /dev/null +++ b/include/javascript/yui3/build/widget/assets/widget-base-core.css @@ -0,0 +1,27 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +.yui3-widget-hidden { + display:none; +} + +.yui3-widget-content { + overflow:hidden; +} + +.yui3-widget-content-expanded { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing:border-box; + height:100%; +} + +/* Only used for IE6, to go from a bigger size to a smaller size when using cb.sizeTo(bb) */ +.yui3-widget-tmp-forcesize { + overflow:hidden !important; +} \ No newline at end of file diff --git a/include/javascript/yui3/build/widget/assets/widget-core.css b/include/javascript/yui3/build/widget/assets/widget-core.css deleted file mode 100644 index 2c7706a9..00000000 --- a/include/javascript/yui3/build/widget/assets/widget-core.css +++ /dev/null @@ -1,10 +0,0 @@ -/* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. -Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 -*/ -.yui-widget-hidden { - display:none; -} \ No newline at end of file diff --git a/include/javascript/yui3/build/widget/assets/widget-stack-core.css b/include/javascript/yui3/build/widget/assets/widget-stack-core.css index b7a2ecb7..a3c40b0f 100644 --- a/include/javascript/yui3/build/widget/assets/widget-stack-core.css +++ b/include/javascript/yui3/build/widget/assets/widget-stack-core.css @@ -1,11 +1,11 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -.yui-widget-stacked .yui-widget-shim { +.yui3-widget-stacked .yui3-widget-shim { opacity:0; filter:alpha(opacity=0); position:absolute; diff --git a/include/javascript/yui3/build/widget/widget-base-ie-min.js b/include/javascript/yui3/build/widget/widget-base-ie-min.js new file mode 100644 index 00000000..f5273177 --- /dev/null +++ b/include/javascript/yui3/build/widget/widget-base-ie-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("widget-base-ie",function(a){var d="boundingBox",f="contentBox",c="height",e="offsetHeight",g="",b=a.UA.ie,i=b<7,h=a.Widget.getClassName("tmp","forcesize"),j=a.Widget.getClassName("content","expanded");a.Widget.prototype._uiSizeCB=function(l){var n=this.get(d),k=this.get(f),m=this._bbs;if(m===undefined){this._bbs=m=!(b<8&&n.get("ownerDocument").get("compatMode")!="BackCompat");}if(m){k.toggleClass(j,l);}else{if(l){if(i){n.addClass(h);}k.set(e,n.get(e));if(i){n.removeClass(h);}}else{k.setStyle(c,g);}}};},"3.3.0",{requires:["widget-base"]}); diff --git a/include/javascript/yui3/build/widget/widget-base-ie.js b/include/javascript/yui3/build/widget/widget-base-ie.js new file mode 100644 index 00000000..4375cd78 --- /dev/null +++ b/include/javascript/yui3/build/widget/widget-base-ie.js @@ -0,0 +1,10 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('widget-base-ie',function(Y){var BOUNDING_BOX="boundingBox",CONTENT_BOX="contentBox",HEIGHT="height",OFFSET_HEIGHT="offsetHeight",EMPTY_STR="",IE=Y.UA.ie,heightReallyMinHeight=IE<7,bbTempExpanding=Y.Widget.getClassName("tmp","forcesize"),contentExpanded=Y.Widget.getClassName("content","expanded");Y.Widget.prototype._uiSizeCB=function(expand){var bb=this.get(BOUNDING_BOX),cb=this.get(CONTENT_BOX),borderBoxSupported=this._bbs;if(borderBoxSupported===undefined){this._bbs=borderBoxSupported=!(IE<8&&bb.get("ownerDocument").get("compatMode")!="BackCompat");} +if(borderBoxSupported){cb.toggleClass(contentExpanded,expand);}else{if(expand){if(heightReallyMinHeight){bb.addClass(bbTempExpanding);} +cb.set(OFFSET_HEIGHT,bb.get(OFFSET_HEIGHT));if(heightReallyMinHeight){bb.removeClass(bbTempExpanding);}}else{cb.setStyle(HEIGHT,EMPTY_STR);}}};},'3.3.0',{requires:['widget-base']}); diff --git a/include/javascript/yui3/build/widget/widget-base-min.js b/include/javascript/yui3/build/widget/widget-base-min.js new file mode 100644 index 00000000..db10d381 --- /dev/null +++ b/include/javascript/yui3/build/widget/widget-base-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("widget-base",function(b){var g=b.Lang,r=b.Node,e=b.ClassNameManager,w=e.getClassName,M,s=b.cached(function(L){return L.substring(0,1).toUpperCase()+L.substring(1);}),F="content",P="visible",K="hidden",y="disabled",B="focused",d="width",A="height",N="boundingBox",v="contentBox",k="parentNode",m="ownerDocument",x="auto",j="srcNode",I="body",H="tabIndex",q="id",i="render",J="rendered",n="destroyed",a="strings",o="
        ",z="Change",p="loading",E="_uiSet",D="",G=function(){},u=true,O=false,t,l={},f=[P,y,A,d,B],C=b.UA.webkit,h={};function c(Q){var T=this,L,S,R=T.constructor;T._strs={};T._cssPrefix=R.CSS_PREFIX||w(R.NAME.toLowerCase());c.superclass.constructor.apply(T,arguments);S=T.get(i);if(S){if(S!==u){L=S;}T.render(L);}}c.NAME="widget";t=c.UI_SRC="ui";c.ATTRS=l;l[q]={valueFn:"_guid",writeOnce:u};l[J]={value:O,readOnly:u};l[N]={value:null,setter:"_setBB",writeOnce:u};l[v]={valueFn:"_defaultCB",setter:"_setCB",writeOnce:u};l[H]={value:null,validator:"_validTabIndex"};l[B]={value:O,readOnly:u};l[y]={value:O};l[P]={value:u};l[A]={value:D};l[d]={value:D};l[a]={value:{},setter:"_strSetter",getter:"_strGetter"};l[i]={value:O,writeOnce:u};c.CSS_PREFIX=w(c.NAME.toLowerCase());c.getClassName=function(){return w.apply(e,[c.CSS_PREFIX].concat(b.Array(arguments),true));};M=c.getClassName;c.getByNode=function(L){var R,Q=M();L=r.one(L);if(L){L=L.ancestor("."+Q,true);if(L){R=h[b.stamp(L,u)];}}return R||null;};b.extend(c,b.Base,{getClassName:function(){return w.apply(e,[this._cssPrefix].concat(b.Array(arguments),true));},initializer:function(L){h[b.stamp(this.get(N))]=this;if(this._applyParser){this._applyParser(L);}},destructor:function(){var Q=this.get(N),L=this.get(v),R=b.stamp(Q,u);if(R in h){delete h[R];}if(this.UI_EVENTS){this._destroyUIEvents();}this._unbindUI(Q);if(L){L.remove(u);}Q.remove(u);},render:function(L){if(!this.get(n)&&!this.get(J)){this.publish(i,{queuable:O,fireOnce:u,defaultTargetOnly:u,defaultFn:this._defRenderFn});this.fire(i,{parentNode:(L)?r.one(L):null});}return this;},_defRenderFn:function(L){this._parentNode=L.parentNode;this.renderer();this._set(J,u);this._removeLoadingClassNames();},renderer:function(){var L=this;L._renderUI();L.renderUI();L._bindUI();L.bindUI();L._syncUI();L.syncUI();},bindUI:G,renderUI:G,syncUI:G,hide:function(){return this.set(P,O);},show:function(){return this.set(P,u);},focus:function(){return this._set(B,u);},blur:function(){return this._set(B,O);},enable:function(){return this.set(y,O);},disable:function(){return this.set(y,u);},_uiSizeCB:function(L){this.get(v).toggleClass(M(F,"expanded"),L);},_renderBox:function(L){var T=this,Q=T.get(v),R=T.get(N),V=T.get(j),S=T.DEF_PARENT_NODE,U=(V&&V.get(m))||R.get(m)||Q.get(m);if(V&&!V.compareTo(Q)&&!Q.inDoc(U)){V.replace(Q);}if(!R.compareTo(Q.get(k))&&!R.compareTo(Q)){if(Q.inDoc(U)){Q.replace(R);}R.appendChild(Q);}L=L||(S&&r.one(S));if(L){L.appendChild(R);}else{if(!R.inDoc(U)){r.one(I).insert(R,0);}}},_setBB:function(L){return this._setBox(this.get(q),L,this.BOUNDING_TEMPLATE);},_setCB:function(L){return(this.CONTENT_TEMPLATE===null)?this.get(N):this._setBox(null,L,this.CONTENT_TEMPLATE);},_defaultCB:function(L){return this.get(j)||null;},_setBox:function(R,Q,L){Q=r.one(Q)||r.create(L);if(!Q.get(q)){Q.set(q,R||b.guid());}return Q;},_renderUI:function(){this._renderBoxClassNames();this._renderBox(this._parentNode);},_renderBoxClassNames:function(){var S=this._getClasses(),L,Q=this.get(N),R;Q.addClass(M());for(R=S.length-3;R>=0;R--){L=S[R];Q.addClass(L.CSS_PREFIX||w(L.NAME.toLowerCase()));}this.get(v).addClass(this.getClassName(F));},_removeLoadingClassNames:function(){var R=this.get(N),L=this.get(v),Q=this.getClassName(p),S=M(p);R.removeClass(S).removeClass(Q);L.removeClass(S).removeClass(Q);},_bindUI:function(){this._bindAttrUI(this._UI_ATTRS.BIND);this._bindDOM();},_unbindUI:function(L){this._unbindDOM(L);},_bindDOM:function(){var L=this.get(N).get(m);this._hDocFocus=L.on("focus",this._onDocFocus,this);if(C){this._hDocMouseDown=L.on("mousedown",this._onDocMouseDown,this);}},_unbindDOM:function(L){if(this._hDocFocus){this._hDocFocus.detach();}if(C&&this._hDocMouseDown){this._hDocMouseDown.detach();}},_syncUI:function(){this._syncAttrUI(this._UI_ATTRS.SYNC);},_uiSetHeight:function(L){this._uiSetDim(A,L);this._uiSizeCB((L!==D&&L!==x));},_uiSetWidth:function(L){this._uiSetDim(d,L);},_uiSetDim:function(L,Q){this.get(N).setStyle(L,g.isNumber(Q)?Q+this.DEF_UNIT:Q);},_uiSetVisible:function(L){this.get(N).toggleClass(this.getClassName(K),!L);},_uiSetDisabled:function(L){this.get(N).toggleClass(this.getClassName(y),L);},_uiSetFocused:function(R,Q){var L=this.get(N);L.toggleClass(this.getClassName(B),R);if(Q!==t){if(R){L.focus();}else{L.blur();}}},_uiSetTabIndex:function(Q){var L=this.get(N);if(g.isNumber(Q)){L.set(H,Q);}else{L.removeAttribute(H);}},_onDocMouseDown:function(L){if(this._domFocus){this._onDocFocus(L);}},_onDocFocus:function(L){this._domFocus=this.get(N).contains(L.target);this._set(B,this._domFocus,{src:t});},toString:function(){return this.name+"["+this.get(q)+"]";},DEF_UNIT:"px",DEF_PARENT_NODE:null,CONTENT_TEMPLATE:o,BOUNDING_TEMPLATE:o,_guid:function(){return b.guid();},_validTabIndex:function(L){return(g.isNumber(L)||g.isNull(L));},_bindAttrUI:function(Q){var R,L=Q.length;for(R=0;R=0;i--){cl=classes[i];boundingBox.addClass(cl.CSS_PREFIX||_getClassName(cl.NAME.toLowerCase()));} +this.get(CONTENT_BOX).addClass(this.getClassName(CONTENT));},_removeLoadingClassNames:function(){var boundingBox=this.get(BOUNDING_BOX),contentBox=this.get(CONTENT_BOX),instClass=this.getClassName(LOADING),widgetClass=_getWidgetClassName(LOADING);boundingBox.removeClass(widgetClass).removeClass(instClass);contentBox.removeClass(widgetClass).removeClass(instClass);},_bindUI:function(){this._bindAttrUI(this._UI_ATTRS.BIND);this._bindDOM();},_unbindUI:function(boundingBox){this._unbindDOM(boundingBox);},_bindDOM:function(){var oDocument=this.get(BOUNDING_BOX).get(OWNER_DOCUMENT);this._hDocFocus=oDocument.on("focus",this._onDocFocus,this);if(WEBKIT){this._hDocMouseDown=oDocument.on("mousedown",this._onDocMouseDown,this);}},_unbindDOM:function(boundingBox){if(this._hDocFocus){this._hDocFocus.detach();} +if(WEBKIT&&this._hDocMouseDown){this._hDocMouseDown.detach();}},_syncUI:function(){this._syncAttrUI(this._UI_ATTRS.SYNC);},_uiSetHeight:function(val){this._uiSetDim(HEIGHT,val);this._uiSizeCB((val!==EMPTY_STR&&val!==AUTO));},_uiSetWidth:function(val){this._uiSetDim(WIDTH,val);},_uiSetDim:function(dimension,val){this.get(BOUNDING_BOX).setStyle(dimension,L.isNumber(val)?val+this.DEF_UNIT:val);},_uiSetVisible:function(val){this.get(BOUNDING_BOX).toggleClass(this.getClassName(HIDDEN),!val);},_uiSetDisabled:function(val){this.get(BOUNDING_BOX).toggleClass(this.getClassName(DISABLED),val);},_uiSetFocused:function(val,src){var boundingBox=this.get(BOUNDING_BOX);boundingBox.toggleClass(this.getClassName(FOCUSED),val);if(src!==UI){if(val){boundingBox.focus();}else{boundingBox.blur();}}},_uiSetTabIndex:function(index){var boundingBox=this.get(BOUNDING_BOX);if(L.isNumber(index)){boundingBox.set(TAB_INDEX,index);}else{boundingBox.removeAttribute(TAB_INDEX);}},_onDocMouseDown:function(evt){if(this._domFocus){this._onDocFocus(evt);}},_onDocFocus:function(evt){this._domFocus=this.get(BOUNDING_BOX).contains(evt.target);this._set(FOCUSED,this._domFocus,{src:UI});},toString:function(){return this.name+"["+this.get(ID)+"]";},DEF_UNIT:"px",DEF_PARENT_NODE:null,CONTENT_TEMPLATE:DIV,BOUNDING_TEMPLATE:DIV,_guid:function(){return Y.guid();},_validTabIndex:function(tabIndex){return(L.isNumber(tabIndex)||L.isNull(tabIndex));},_bindAttrUI:function(attrs){var i,l=attrs.length;for(i=0;i0){e=f.item([(d-1)]);}if(!e&&g){e=f.item((f.size()-1));}return e;},remove:function(d){var e,f;if(b.isNumber(d)){f=c.WidgetParent.prototype.remove.apply(this,arguments);}else{e=this.get("parent");if(e){f=e.remove(this.get("index"));}}return f;},isRoot:function(){return(this==this.get("root"));},ancestor:function(f){var d=this.get("root"),e;if(this.get("depth")>f){e=this.get("parent");while(e!=d&&e.get("depth")>f){e=e.get("parent");}}return e;},_uiSetChildSelected:function(e){var f=this.get("boundingBox"),d=this.getClassName("selected");if(e===0){f.removeClass(d);}else{f.addClass(d);}},_afterChildSelectedChange:function(d){this._uiSetChildSelected(d.newVal);},_syncUIChild:function(){this._uiSetChildSelected(this.get("selected"));},_bindUIChild:function(){this.after("selectedChange",this._afterChildSelectedChange);}};c.WidgetChild=a;},"3.3.0",{requires:["base-build","widget"]}); diff --git a/include/javascript/yui3/build/widget/widget-child.js b/include/javascript/yui3/build/widget/widget-child.js new file mode 100644 index 00000000..7df5016b --- /dev/null +++ b/include/javascript/yui3/build/widget/widget-child.js @@ -0,0 +1,22 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('widget-child',function(Y){var Lang=Y.Lang;function Child(){Y.after(this._syncUIChild,this,"syncUI");Y.after(this._bindUIChild,this,"bindUI");} +Child.ATTRS={selected:{value:0,validator:Lang.isNumber},index:{readOnly:true,getter:function(){var parent=this.get("parent"),index=-1;if(parent){index=parent.indexOf(this);} +return index;}},parent:{readOnly:true},depth:{readOnly:true,getter:function(){var parent=this.get("parent"),root=this.get("root"),depth=-1;while(parent){depth=(depth+1);if(parent==root){break;} +parent=parent.get("parent");} +return depth;}},root:{readOnly:true,getter:function(){var getParent=function(child){var parent=child.get("parent"),FnRootType=child.ROOT_TYPE,criteria=parent;if(FnRootType){criteria=(parent&&Y.instanceOf(parent,FnRootType));} +return(criteria?getParent(parent):child);};return getParent(this);}}};Child.prototype={ROOT_TYPE:null,_getUIEventNode:function(){var root=this.get("root"),returnVal;if(root){returnVal=root.get("boundingBox");} +return returnVal;},next:function(circular){var parent=this.get("parent"),sibling;if(parent){sibling=parent.item((this.get("index")+1));} +if(!sibling&&circular){sibling=parent.item(0);} +return sibling;},previous:function(circular){var parent=this.get("parent"),index=this.get("index"),sibling;if(parent&&index>0){sibling=parent.item([(index-1)]);} +if(!sibling&&circular){sibling=parent.item((parent.size()-1));} +return sibling;},remove:function(index){var parent,removed;if(Lang.isNumber(index)){removed=Y.WidgetParent.prototype.remove.apply(this,arguments);} +else{parent=this.get("parent");if(parent){removed=parent.remove(this.get("index"));}} +return removed;},isRoot:function(){return(this==this.get("root"));},ancestor:function(depth){var root=this.get("root"),parent;if(this.get("depth")>depth){parent=this.get("parent");while(parent!=root&&parent.get("depth")>depth){parent=parent.get("parent");}} +return parent;},_uiSetChildSelected:function(selected){var box=this.get("boundingBox"),sClassName=this.getClassName("selected");if(selected===0){box.removeClass(sClassName);} +else{box.addClass(sClassName);}},_afterChildSelectedChange:function(event){this._uiSetChildSelected(event.newVal);},_syncUIChild:function(){this._uiSetChildSelected(this.get("selected"));},_bindUIChild:function(){this.after("selectedChange",this._afterChildSelectedChange);}};Y.WidgetChild=Child;},'3.3.0',{requires:['base-build','widget']}); diff --git a/include/javascript/yui3/build/widget/widget-htmlparser-min.js b/include/javascript/yui3/build/widget/widget-htmlparser-min.js new file mode 100644 index 00000000..9f99261d --- /dev/null +++ b/include/javascript/yui3/build/widget/widget-htmlparser-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("widget-htmlparser",function(f){var e=f.Widget,c=f.Node,d=f.Lang,a="srcNode",b="contentBox";e.HTML_PARSER={};e._buildCfg={aggregates:["HTML_PARSER"]};e.ATTRS[a]={value:null,setter:c.one,getter:"_getSrcNode",writeOnce:true};f.mix(e.prototype,{_getSrcNode:function(g){return g||this.get(b);},_applyParsedConfig:function(i,g,h){return(h)?f.mix(g,h,false):g;},_applyParser:function(g){var i=this,j=i.get(a),h=i._getHtmlParser(),l,k;if(h&&j){f.Object.each(h,function(n,m,p){k=null;if(d.isFunction(n)){k=n.call(i,j);}else{if(d.isArray(n)){k=j.all(n[0]);if(k.isEmpty()){k=null;}}else{k=j.one(n);}}if(k!==null&&k!==undefined){l=l||{};l[m]=k;}});}g=i._applyParsedConfig(j,g,l);},_getHtmlParser:function(){var h=this._getClasses(),k={},g,j;for(g=h.length-1;g>=0;g--){j=h[g].HTML_PARSER;if(j){f.mix(k,j,true);}}return k;}});},"3.3.0",{requires:["widget-base"]}); diff --git a/include/javascript/yui3/build/widget/widget-htmlparser.js b/include/javascript/yui3/build/widget/widget-htmlparser.js new file mode 100644 index 00000000..d8f25400 --- /dev/null +++ b/include/javascript/yui3/build/widget/widget-htmlparser.js @@ -0,0 +1,11 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('widget-htmlparser',function(Y){var Widget=Y.Widget,Node=Y.Node,Lang=Y.Lang,SRC_NODE="srcNode",CONTENT_BOX="contentBox";Widget.HTML_PARSER={};Widget._buildCfg={aggregates:["HTML_PARSER"]};Widget.ATTRS[SRC_NODE]={value:null,setter:Node.one,getter:"_getSrcNode",writeOnce:true};Y.mix(Widget.prototype,{_getSrcNode:function(val){return val||this.get(CONTENT_BOX);},_applyParsedConfig:function(node,cfg,parsedCfg){return(parsedCfg)?Y.mix(cfg,parsedCfg,false):cfg;},_applyParser:function(config){var widget=this,srcNode=widget.get(SRC_NODE),schema=widget._getHtmlParser(),parsedConfig,val;if(schema&&srcNode){Y.Object.each(schema,function(v,k,o){val=null;if(Lang.isFunction(v)){val=v.call(widget,srcNode);}else{if(Lang.isArray(v)){val=srcNode.all(v[0]);if(val.isEmpty()){val=null;}}else{val=srcNode.one(v);}} +if(val!==null&&val!==undefined){parsedConfig=parsedConfig||{};parsedConfig[k]=val;}});} +config=widget._applyParsedConfig(srcNode,config,parsedConfig);},_getHtmlParser:function(){var classes=this._getClasses(),parser={},i,p;for(i=classes.length-1;i>=0;i--){p=classes[i].HTML_PARSER;if(p){Y.mix(parser,p,true);}} +return parser;}});},'3.3.0',{requires:['widget-base']}); diff --git a/include/javascript/yui3/build/widget/widget-locale-min.js b/include/javascript/yui3/build/widget/widget-locale-min.js new file mode 100644 index 00000000..913a9041 --- /dev/null +++ b/include/javascript/yui3/build/widget/widget-locale-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("widget-locale",function(f){var c=true,g="locale",e="initValue",b="-",a="",d=f.Widget;d.ATTRS[g]={value:"en"};d.ATTRS.strings.lazyAdd=false;f.mix(d.prototype,{_setStrings:function(i,h){var j=this._strs;h=h.toLowerCase();if(!j[h]){j[h]={};}f.aggregate(j[h],i,c);return j[h];},_getStrings:function(h){return this._strs[h.toLowerCase()];},getStrings:function(r){r=(r||this.get(g)).toLowerCase();var p=this.getDefaultLocale().toLowerCase(),j=this._getStrings(p),q=(j)?f.merge(j):{},n=r.split(b),o,m,k,h;if(r!==p||n.length>1){h=a;for(m=0,k=n.length;m1){lookup=EMPTY_STR;for(i=0,l=localeSegments.length;i=0;j--){O=k[j].NAME;if(O){Y.addClass(M.getClassName(O.toLowerCase()));}}L.addClass(this.getClassName(J));},_bindUI:function(){this.after("visibleChange",this._afterVisibleChange);this.after("disabledChange",this._afterDisabledChange);this.after("heightChange",this._afterHeightChange);this.after("widthChange",this._afterWidthChange);this.after("focusedChange",this._afterFocusedChange);this._bindDOMListeners();},_bindDOMListeners:function(){var L=this.get(h).get("ownerDocument");L.on("focus",this._onFocus,this);if(D.UA.webkit){L.on("mousedown",this._onDocMouseDown,this);}},_syncUI:function(){this._uiSetVisible(this.get(c));this._uiSetDisabled(this.get(f));this._uiSetHeight(this.get(X));this._uiSetWidth(this.get(G));this._uiSetFocused(this.get(T));this._uiSetTabIndex(this.get(C));},_uiSetHeight:function(L){if(Q.isNumber(L)){L=L+this.DEF_UNIT;}this.get(h).setStyle(X,L);},_uiSetWidth:function(L){if(Q.isNumber(L)){L=L+this.DEF_UNIT;}this.get(h).setStyle(G,L);},_uiSetVisible:function(Y){var O=this.get(h),L=this.getClassName(e);if(Y===true){O.removeClass(L);}else{O.addClass(L);}},_uiSetDisabled:function(Y){var O=this.get(h),L=this.getClassName(f);if(Y===true){O.addClass(L);}else{O.removeClass(L);}},_uiSetTabIndex:function(O){var L=this.get(h);if(Q.isNumber(O)){L.set(C,O);}else{L.removeAttribute(C);}},_uiSetFocused:function(j,Y){var O=this.get(h),L=this.getClassName(T);if(j===true){O.addClass(L);if(Y!==N){O.focus();}}else{O.removeClass(L);if(Y!==N){O.blur();}}},_afterVisibleChange:function(L){this._uiSetVisible(L.newVal);},_afterDisabledChange:function(L){this._uiSetDisabled(L.newVal);},_afterHeightChange:function(L){this._uiSetHeight(L.newVal);},_afterWidthChange:function(L){this._uiSetWidth(L.newVal);},_afterFocusedChange:function(L){this._uiSetFocused(L.newVal,L.src);},_onDocMouseDown:function(L){if(this._hasDOMFocus){this._onFocus(L);}},_onFocus:function(O){var j=O.target,Y=this.get(h),L=(Y.compareTo(j)||Y.contains(j));this._hasDOMFocus=L;this._set(T,L,{src:N});},toString:function(){return this.constructor.NAME+"["+this._yuid+"]";},DEF_UNIT:"px",CONTENT_TEMPLATE:"
        ",BOUNDING_TEMPLATE:"
        ",WRAP_STYLES:{height:"100%",width:"100%",zIndex:false,position:"static",top:"0",left:"0",bottom:"",right:"",padding:"",margin:""},_setStrings:function(O,L){var Y=this._strings;L=L.toLowerCase();if(!Y[L]){Y[L]={};}D.aggregate(Y[L],O,true);return Y[L];},_getStrings:function(L){return this._strings[L.toLowerCase()];},getStrings:function(p){p=(p||this.get(F)).toLowerCase();var n=this.getDefaultLocale().toLowerCase(),O=this._getStrings(n),o=(O)?D.merge(O):{},m=p.split(Z);if(p!==n||m.length>1){var L="";for(var j=0,Y=m.length;j=0;L--){Y=O[L].HTML_PARSER;if(Y){D.mix(j,Y,true);}}this._HTML_PARSER=j;}return this._HTML_PARSER;}});D.Widget=E;},"3.0.0",{requires:["attribute","event-focus","base","node","classnamemanager"]}); \ No newline at end of file +YUI.add("widget-base",function(b){var g=b.Lang,r=b.Node,e=b.ClassNameManager,w=e.getClassName,M,s=b.cached(function(L){return L.substring(0,1).toUpperCase()+L.substring(1);}),F="content",P="visible",K="hidden",y="disabled",B="focused",d="width",A="height",N="boundingBox",v="contentBox",k="parentNode",m="ownerDocument",x="auto",j="srcNode",I="body",H="tabIndex",q="id",i="render",J="rendered",n="destroyed",a="strings",o="
        ",z="Change",p="loading",E="_uiSet",D="",G=function(){},u=true,O=false,t,l={},f=[P,y,A,d,B],C=b.UA.webkit,h={};function c(Q){var T=this,L,S,R=T.constructor;T._strs={};T._cssPrefix=R.CSS_PREFIX||w(R.NAME.toLowerCase());c.superclass.constructor.apply(T,arguments);S=T.get(i);if(S){if(S!==u){L=S;}T.render(L);}}c.NAME="widget";t=c.UI_SRC="ui";c.ATTRS=l;l[q]={valueFn:"_guid",writeOnce:u};l[J]={value:O,readOnly:u};l[N]={value:null,setter:"_setBB",writeOnce:u};l[v]={valueFn:"_defaultCB",setter:"_setCB",writeOnce:u};l[H]={value:null,validator:"_validTabIndex"};l[B]={value:O,readOnly:u};l[y]={value:O};l[P]={value:u};l[A]={value:D};l[d]={value:D};l[a]={value:{},setter:"_strSetter",getter:"_strGetter"};l[i]={value:O,writeOnce:u};c.CSS_PREFIX=w(c.NAME.toLowerCase());c.getClassName=function(){return w.apply(e,[c.CSS_PREFIX].concat(b.Array(arguments),true));};M=c.getClassName;c.getByNode=function(L){var R,Q=M();L=r.one(L);if(L){L=L.ancestor("."+Q,true);if(L){R=h[b.stamp(L,u)];}}return R||null;};b.extend(c,b.Base,{getClassName:function(){return w.apply(e,[this._cssPrefix].concat(b.Array(arguments),true));},initializer:function(L){h[b.stamp(this.get(N))]=this;if(this._applyParser){this._applyParser(L);}},destructor:function(){var Q=this.get(N),L=this.get(v),R=b.stamp(Q,u);if(R in h){delete h[R];}if(this.UI_EVENTS){this._destroyUIEvents();}this._unbindUI(Q);if(L){L.remove(u);}Q.remove(u);},render:function(L){if(!this.get(n)&&!this.get(J)){this.publish(i,{queuable:O,fireOnce:u,defaultTargetOnly:u,defaultFn:this._defRenderFn});this.fire(i,{parentNode:(L)?r.one(L):null});}return this;},_defRenderFn:function(L){this._parentNode=L.parentNode;this.renderer();this._set(J,u);this._removeLoadingClassNames();},renderer:function(){var L=this;L._renderUI();L.renderUI();L._bindUI();L.bindUI();L._syncUI();L.syncUI();},bindUI:G,renderUI:G,syncUI:G,hide:function(){return this.set(P,O);},show:function(){return this.set(P,u);},focus:function(){return this._set(B,u);},blur:function(){return this._set(B,O);},enable:function(){return this.set(y,O);},disable:function(){return this.set(y,u);},_uiSizeCB:function(L){this.get(v).toggleClass(M(F,"expanded"),L);},_renderBox:function(L){var T=this,Q=T.get(v),R=T.get(N),V=T.get(j),S=T.DEF_PARENT_NODE,U=(V&&V.get(m))||R.get(m)||Q.get(m);if(V&&!V.compareTo(Q)&&!Q.inDoc(U)){V.replace(Q);}if(!R.compareTo(Q.get(k))&&!R.compareTo(Q)){if(Q.inDoc(U)){Q.replace(R);}R.appendChild(Q);}L=L||(S&&r.one(S));if(L){L.appendChild(R);}else{if(!R.inDoc(U)){r.one(I).insert(R,0);}}},_setBB:function(L){return this._setBox(this.get(q),L,this.BOUNDING_TEMPLATE);},_setCB:function(L){return(this.CONTENT_TEMPLATE===null)?this.get(N):this._setBox(null,L,this.CONTENT_TEMPLATE);},_defaultCB:function(L){return this.get(j)||null;},_setBox:function(R,Q,L){Q=r.one(Q)||r.create(L);if(!Q.get(q)){Q.set(q,R||b.guid());}return Q;},_renderUI:function(){this._renderBoxClassNames();this._renderBox(this._parentNode);},_renderBoxClassNames:function(){var S=this._getClasses(),L,Q=this.get(N),R;Q.addClass(M());for(R=S.length-3;R>=0;R--){L=S[R];Q.addClass(L.CSS_PREFIX||w(L.NAME.toLowerCase()));}this.get(v).addClass(this.getClassName(F));},_removeLoadingClassNames:function(){var R=this.get(N),L=this.get(v),Q=this.getClassName(p),S=M(p);R.removeClass(S).removeClass(Q);L.removeClass(S).removeClass(Q);},_bindUI:function(){this._bindAttrUI(this._UI_ATTRS.BIND);this._bindDOM();},_unbindUI:function(L){this._unbindDOM(L);},_bindDOM:function(){var L=this.get(N).get(m);this._hDocFocus=L.on("focus",this._onDocFocus,this);if(C){this._hDocMouseDown=L.on("mousedown",this._onDocMouseDown,this);}},_unbindDOM:function(L){if(this._hDocFocus){this._hDocFocus.detach();}if(C&&this._hDocMouseDown){this._hDocMouseDown.detach();}},_syncUI:function(){this._syncAttrUI(this._UI_ATTRS.SYNC);},_uiSetHeight:function(L){this._uiSetDim(A,L);this._uiSizeCB((L!==D&&L!==x));},_uiSetWidth:function(L){this._uiSetDim(d,L);},_uiSetDim:function(L,Q){this.get(N).setStyle(L,g.isNumber(Q)?Q+this.DEF_UNIT:Q);},_uiSetVisible:function(L){this.get(N).toggleClass(this.getClassName(K),!L);},_uiSetDisabled:function(L){this.get(N).toggleClass(this.getClassName(y),L);},_uiSetFocused:function(R,Q){var L=this.get(N);L.toggleClass(this.getClassName(B),R);if(Q!==t){if(R){L.focus();}else{L.blur();}}},_uiSetTabIndex:function(Q){var L=this.get(N);if(g.isNumber(Q)){L.set(H,Q);}else{L.removeAttribute(H);}},_onDocMouseDown:function(L){if(this._domFocus){this._onDocFocus(L);}},_onDocFocus:function(L){this._domFocus=this.get(N).contains(L.target);this._set(B,this._domFocus,{src:t});},toString:function(){return this.name+"["+this.get(q)+"]";},DEF_UNIT:"px",DEF_PARENT_NODE:null,CONTENT_TEMPLATE:o,BOUNDING_TEMPLATE:o,_guid:function(){return b.guid();},_validTabIndex:function(L){return(g.isNumber(L)||g.isNull(L));},_bindAttrUI:function(Q){var R,L=Q.length;for(R=0;R-1){k=k.substring(h+c.length);}if(this.UI_EVENTS[k]){i=k;}}return i;}},_initUIEvent:function(i){var j=this._getUIEvent(i),h=this._uiEvtsInitQueue||{};if(j&&!h[j]){this._uiEvtsInitQueue=h[j]=1;this.after(d,function(){this._createUIEvent(j);delete this._uiEvtsInitQueue[j];});}},on:function(h){this._initUIEvent(h);return e.superclass.on.apply(this,arguments);},publish:function(i,h){var j=this._getUIEvent(i);if(j&&h&&h.defaultFn){this._initUIEvent(j);}return e.superclass.publish.apply(this,arguments);}},true);},"3.3.0",{requires:["widget-base","node-event-delegate"]});YUI.add("widget-htmlparser",function(f){var e=f.Widget,c=f.Node,d=f.Lang,a="srcNode",b="contentBox";e.HTML_PARSER={};e._buildCfg={aggregates:["HTML_PARSER"]};e.ATTRS[a]={value:null,setter:c.one,getter:"_getSrcNode",writeOnce:true};f.mix(e.prototype,{_getSrcNode:function(g){return g||this.get(b);},_applyParsedConfig:function(i,g,h){return(h)?f.mix(g,h,false):g;},_applyParser:function(g){var i=this,j=i.get(a),h=i._getHtmlParser(),l,k;if(h&&j){f.Object.each(h,function(n,m,p){k=null;if(d.isFunction(n)){k=n.call(i,j);}else{if(d.isArray(n)){k=j.all(n[0]);if(k.isEmpty()){k=null;}}else{k=j.one(n);}}if(k!==null&&k!==undefined){l=l||{};l[m]=k;}});}g=i._applyParsedConfig(j,g,l);},_getHtmlParser:function(){var h=this._getClasses(),k={},g,j;for(g=h.length-1;g>=0;g--){j=h[g].HTML_PARSER;if(j){f.mix(k,j,true);}}return k;}});},"3.3.0",{requires:["widget-base"]});YUI.add("widget-skin",function(e){var d="boundingBox",b="contentBox",a="skin",c=e.ClassNameManager.getClassName;e.Widget.prototype.getSkinName=function(){var f=this.get(b)||this.get(d),h=new RegExp("\\b"+c(a)+"-(\\S+)"),g;if(f){f.ancestor(function(i){g=i.get("className").match(h);return g;});}return(g)?g[1]:null;};},"3.3.0",{requires:["widget-base"]});YUI.add("widget",function(a){},"3.3.0",{use:["widget-base","widget-uievents","widget-htmlparser","widget-skin"]}); diff --git a/include/javascript/yui3/build/widget/widget-parent-min.js b/include/javascript/yui3/build/widget/widget-parent-min.js new file mode 100644 index 00000000..c900343c --- /dev/null +++ b/include/javascript/yui3/build/widget/widget-parent-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("widget-parent",function(c){var b=c.Lang;function a(d){this.publish("addChild",{defaultTargetOnly:true,defaultFn:this._defAddChildFn});this.publish("removeChild",{defaultTargetOnly:true,defaultFn:this._defRemoveChildFn});this._items=[];var e,f;if(d&&d.children){e=d.children;f=this.after("initializedChange",function(g){this._add(e);f.detach();});}c.after(this._renderChildren,this,"renderUI");c.after(this._bindUIParent,this,"bindUI");c.before(this._destroyChildren,this,"destructor");this.after("selectionChange",this._afterSelectionChange);this.after("selectedChange",this._afterParentSelectedChange);this.after("activeDescendantChange",this._afterActiveDescendantChange);this._hDestroyChild=this.after("*:destroy",this._afterDestroyChild);this.after("*:focusedChange",this._updateActiveDescendant);}a.ATTRS={defaultChildType:{setter:function(f){var d=c.Attribute.INVALID_VALUE,e=b.isString(f)?c[f]:f;if(b.isFunction(e)){d=e;}return d;}},activeDescendant:{readOnly:true},multiple:{value:false,validator:b.isBoolean,writeOnce:true,getter:function(e){var d=this.get("root");return(d&&d!=this)?d.get("multiple"):e;}},selection:{readOnly:true,setter:"_setSelection",getter:function(e){var d=b.isArray(e)?(new c.ArrayList(e)):e;return d;}},selected:{setter:function(e){var d=e;if(e===1&&!this.get("multiple")){d=c.Attribute.INVALID_VALUE;}return d;}}};a.prototype={_afterDestroyChild:function(d){var e=d.target;if(e.get("parent")==this){e.remove();}},_afterSelectionChange:function(f){if(f.target==this&&f.src!=this){var d=f.newVal,e=0;if(d){e=2;if(c.instanceOf(d,c.ArrayList)&&(d.size()===this.size())){e=1;}}this.set("selected",e,{src:this});}},_afterActiveDescendantChange:function(e){var d=this.get("parent");if(d){d._set("activeDescendant",e.newVal);}},_afterParentSelectedChange:function(d){var e=d.newVal;if(this==d.target&&d.src!=this&&(e===0||e===1)){this.each(function(f){f.set("selected",e,{src:this});},this);}},_setSelection:function(f){var e=null,d;if(this.get("multiple")&&!this.isEmpty()){d=[];this.each(function(g){if(g.get("selected")>0){d.push(g);}});if(d.length>0){e=d;}}else{if(f.get("selected")>0){e=f;}}return e;},_updateSelection:function(e){var f=e.target,d;if(f.get("parent")==this){if(e.src!="_updateSelection"){d=this.get("selection");if(!this.get("multiple")&&d&&e.newVal>0){d.set("selected",0,{src:"_updateSelection"});}this._set("selection",f);}if(e.src==this){this._set("selection",f,{src:this});}}},_updateActiveDescendant:function(d){var e=(d.newVal===true)?d.target:null;this._set("activeDescendant",e);},_createChild:function(d){var i=this.get("defaultChildType"),f=d.childType||d.type,h,e,g;if(f){e=b.isString(f)?c[f]:f;}if(b.isFunction(e)){g=e;}else{if(i){g=i;}}if(g){h=new g(d);}else{c.error("Could not create a child instance because its constructor is either undefined or invalid.");}return h;},_defAddChildFn:function(f){var g=f.child,d=f.index,e=this._items;if(g.get("parent")){g.remove();}if(b.isNumber(d)){e.splice(d,0,g);}else{e.push(g);}g._set("parent",this);g.addTarget(this);f.index=g.get("index");g.after("selectedChange",c.bind(this._updateSelection,this));},_defRemoveChildFn:function(f){var g=f.child,d=f.index,e=this._items;if(g.get("focused")){g.set("focused",false);}if(g.get("selected")){g.set("selected",0);}e.splice(d,1);g.removeTarget(this);g._oldParent=g.get("parent");g._set("parent",null);},_add:function(h,d){var e,g,f;if(b.isArray(h)){e=[];c.each(h,function(j,i){g=this._add(j,(d+i));if(g){e.push(g);}},this);if(e.length>0){f=e;}}else{if(c.instanceOf(h,c.Widget)){g=h;}else{g=this._createChild(h);}if(g&&this.fire("addChild",{child:g,index:d})){f=g;}}return f;},add:function(){var e=this._add.apply(this,arguments),d=e?(b.isArray(e)?e:[e]):[];return(new c.ArrayList(d));},remove:function(d){var f=this._items[d],e;if(f&&this.fire("removeChild",{child:f,index:d})){e=f;}return e;},removeAll:function(){var d=[],e;c.each(this._items.concat(),function(){e=this.remove(0);if(e){d.push(e);}},this);return(new c.ArrayList(d));},selectChild:function(d){this.item(d).set("selected",1);},selectAll:function(){this.set("selected",1);},deselectAll:function(){this.set("selected",0);},_uiAddChild:function(i,d){i.render(d);var g=i.get("boundingBox"),f,h=i.next(false),e;if(h){f=h.get("boundingBox");f.insert(g,"before");}else{e=i.previous(false);if(e){f=e.get("boundingBox");f.insert(g,"after");}}},_uiRemoveChild:function(d){d.get("boundingBox").remove();},_afterAddChild:function(d){var e=d.child;if(e.get("parent")==this){this._uiAddChild(e,this._childrenContainer);}},_afterRemoveChild:function(d){var e=d.child;if(e._oldParent==this){this._uiRemoveChild(e);}},_bindUIParent:function(){this.after("addChild",this._afterAddChild);this.after("removeChild",this._afterRemoveChild);},_renderChildren:function(){var d=this._childrenContainer||this.get("contentBox");this._childrenContainer=d;this.each(function(e){e.render(d);});},_destroyChildren:function(){this._hDestroyChild.detach();this.each(function(d){d.destroy();});}};c.augment(a,c.ArrayList);c.WidgetParent=a;},"3.3.0",{requires:["base-build","arraylist","widget"]}); diff --git a/include/javascript/yui3/build/widget/widget-parent.js b/include/javascript/yui3/build/widget/widget-parent.js new file mode 100644 index 00000000..4cca5c9d --- /dev/null +++ b/include/javascript/yui3/build/widget/widget-parent.js @@ -0,0 +1,30 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('widget-parent',function(Y){var Lang=Y.Lang;function Parent(config){this.publish("addChild",{defaultTargetOnly:true,defaultFn:this._defAddChildFn});this.publish("removeChild",{defaultTargetOnly:true,defaultFn:this._defRemoveChildFn});this._items=[];var children,handle;if(config&&config.children){children=config.children;handle=this.after("initializedChange",function(e){this._add(children);handle.detach();});} +Y.after(this._renderChildren,this,"renderUI");Y.after(this._bindUIParent,this,"bindUI");Y.before(this._destroyChildren,this,"destructor");this.after("selectionChange",this._afterSelectionChange);this.after("selectedChange",this._afterParentSelectedChange);this.after("activeDescendantChange",this._afterActiveDescendantChange);this._hDestroyChild=this.after("*:destroy",this._afterDestroyChild);this.after("*:focusedChange",this._updateActiveDescendant);} +Parent.ATTRS={defaultChildType:{setter:function(val){var returnVal=Y.Attribute.INVALID_VALUE,FnConstructor=Lang.isString(val)?Y[val]:val;if(Lang.isFunction(FnConstructor)){returnVal=FnConstructor;} +return returnVal;}},activeDescendant:{readOnly:true},multiple:{value:false,validator:Lang.isBoolean,writeOnce:true,getter:function(value){var root=this.get("root");return(root&&root!=this)?root.get("multiple"):value;}},selection:{readOnly:true,setter:"_setSelection",getter:function(value){var selection=Lang.isArray(value)?(new Y.ArrayList(value)):value;return selection;}},selected:{setter:function(value){var returnVal=value;if(value===1&&!this.get("multiple")){returnVal=Y.Attribute.INVALID_VALUE;} +return returnVal;}}};Parent.prototype={_afterDestroyChild:function(event){var child=event.target;if(child.get("parent")==this){child.remove();}},_afterSelectionChange:function(event){if(event.target==this&&event.src!=this){var selection=event.newVal,selectedVal=0;if(selection){selectedVal=2;if(Y.instanceOf(selection,Y.ArrayList)&&(selection.size()===this.size())){selectedVal=1;}} +this.set("selected",selectedVal,{src:this});}},_afterActiveDescendantChange:function(event){var parent=this.get("parent");if(parent){parent._set("activeDescendant",event.newVal);}},_afterParentSelectedChange:function(event){var value=event.newVal;if(this==event.target&&event.src!=this&&(value===0||value===1)){this.each(function(child){child.set("selected",value,{src:this});},this);}},_setSelection:function(child){var selection=null,selected;if(this.get("multiple")&&!this.isEmpty()){selected=[];this.each(function(v){if(v.get("selected")>0){selected.push(v);}});if(selected.length>0){selection=selected;}} +else{if(child.get("selected")>0){selection=child;}} +return selection;},_updateSelection:function(event){var child=event.target,selection;if(child.get("parent")==this){if(event.src!="_updateSelection"){selection=this.get("selection");if(!this.get("multiple")&&selection&&event.newVal>0){selection.set("selected",0,{src:"_updateSelection"});} +this._set("selection",child);} +if(event.src==this){this._set("selection",child,{src:this});}}},_updateActiveDescendant:function(event){var activeDescendant=(event.newVal===true)?event.target:null;this._set("activeDescendant",activeDescendant);},_createChild:function(config){var defaultType=this.get("defaultChildType"),altType=config.childType||config.type,child,Fn,FnConstructor;if(altType){Fn=Lang.isString(altType)?Y[altType]:altType;} +if(Lang.isFunction(Fn)){FnConstructor=Fn;}else if(defaultType){FnConstructor=defaultType;} +if(FnConstructor){child=new FnConstructor(config);}else{Y.error("Could not create a child instance because its constructor is either undefined or invalid.");} +return child;},_defAddChildFn:function(event){var child=event.child,index=event.index,children=this._items;if(child.get("parent")){child.remove();} +if(Lang.isNumber(index)){children.splice(index,0,child);} +else{children.push(child);} +child._set("parent",this);child.addTarget(this);event.index=child.get("index");child.after("selectedChange",Y.bind(this._updateSelection,this));},_defRemoveChildFn:function(event){var child=event.child,index=event.index,children=this._items;if(child.get("focused")){child.set("focused",false);} +if(child.get("selected")){child.set("selected",0);} +children.splice(index,1);child.removeTarget(this);child._oldParent=child.get("parent");child._set("parent",null);},_add:function(child,index){var children,oChild,returnVal;if(Lang.isArray(child)){children=[];Y.each(child,function(v,k){oChild=this._add(v,(index+k));if(oChild){children.push(oChild);}},this);if(children.length>0){returnVal=children;}} +else{if(Y.instanceOf(child,Y.Widget)){oChild=child;} +else{oChild=this._createChild(child);} +if(oChild&&this.fire("addChild",{child:oChild,index:index})){returnVal=oChild;}} +return returnVal;},add:function(){var added=this._add.apply(this,arguments),children=added?(Lang.isArray(added)?added:[added]):[];return(new Y.ArrayList(children));},remove:function(index){var child=this._items[index],returnVal;if(child&&this.fire("removeChild",{child:child,index:index})){returnVal=child;} +return returnVal;},removeAll:function(){var removed=[],child;Y.each(this._items.concat(),function(){child=this.remove(0);if(child){removed.push(child);}},this);return(new Y.ArrayList(removed));},selectChild:function(i){this.item(i).set('selected',1);},selectAll:function(){this.set("selected",1);},deselectAll:function(){this.set("selected",0);},_uiAddChild:function(child,parentNode){child.render(parentNode);var childBB=child.get("boundingBox"),siblingBB,nextSibling=child.next(false),prevSibling;if(nextSibling){siblingBB=nextSibling.get("boundingBox");siblingBB.insert(childBB,"before");}else{prevSibling=child.previous(false);if(prevSibling){siblingBB=prevSibling.get("boundingBox");siblingBB.insert(childBB,"after");}}},_uiRemoveChild:function(child){child.get("boundingBox").remove();},_afterAddChild:function(event){var child=event.child;if(child.get("parent")==this){this._uiAddChild(child,this._childrenContainer);}},_afterRemoveChild:function(event){var child=event.child;if(child._oldParent==this){this._uiRemoveChild(child);}},_bindUIParent:function(){this.after("addChild",this._afterAddChild);this.after("removeChild",this._afterRemoveChild);},_renderChildren:function(){var renderTo=this._childrenContainer||this.get("contentBox");this._childrenContainer=renderTo;this.each(function(child){child.render(renderTo);});},_destroyChildren:function(){this._hDestroyChild.detach();this.each(function(child){child.destroy();});}};Y.augment(Parent,Y.ArrayList);Y.WidgetParent=Parent;},'3.3.0',{requires:['base-build','arraylist','widget']}); diff --git a/include/javascript/yui3/build/widget/widget-position-align-min.js b/include/javascript/yui3/build/widget/widget-position-align-min.js new file mode 100644 index 00000000..62a3c91a --- /dev/null +++ b/include/javascript/yui3/build/widget/widget-position-align-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("widget-position-align",function(A){var H=A.Lang,D="align",F="bindUI",B="syncUI",E="offsetWidth",I="offsetHeight",K="viewportRegion",G="region",J="alignChange";function C(L){if(!this._posNode){A.error("WidgetPosition needs to be added to the Widget, before WidgetPositionAlign is added");}A.after(this._syncUIPosAlign,this,B);A.after(this._bindUIPosAlign,this,F);}C.ATTRS={align:{value:null},centered:{setter:"_setAlignCenter",lazyAdd:false,value:false}};C.TL="tl";C.TR="tr";C.BL="bl";C.BR="br";C.TC="tc";C.RC="rc";C.BC="bc";C.LC="lc";C.CC="cc";C.prototype={_syncUIPosAlign:function(){var L=this.get(D);if(L){this._uiSetAlign(L.node,L.points);}},_bindUIPosAlign:function(){this.after(J,this._afterAlignChange);},_setAlignCenter:function(L){if(L){this.set(D,{node:L===true?null:L,points:[C.CC,C.CC]});}return L;},_afterAlignChange:function(L){if(L.newVal){this._uiSetAlign(L.newVal.node,L.newVal.points);}},_uiSetAlign:function(O,N){if(!H.isArray(N)||N.length!=2){A.error("align: Invalid Points Arguments");return;}var M=this._getRegion(O),L,P,Q;if(M){L=N[0];P=N[1];switch(P){case C.TL:Q=[M.left,M.top];break;case C.TR:Q=[M.right,M.top];break;case C.BL:Q=[M.left,M.bottom];break;case C.BR:Q=[M.right,M.bottom];break;case C.TC:Q=[M.left+Math.floor(M.width/2),M.top];break;case C.BC:Q=[M.left+Math.floor(M.width/2),M.bottom];break;case C.LC:Q=[M.left,M.top+Math.floor(M.height/2)];break;case C.RC:Q=[M.right,M.top+Math.floor(M.height/2),L];break;case C.CC:Q=[M.left+Math.floor(M.width/2),M.top+Math.floor(M.height/2),L];break;default:break;}if(Q){this._doAlign(L,Q[0],Q[1]);}}},_doAlign:function(M,L,P){var O=this._posNode,N;switch(M){case C.TL:N=[L,P];break;case C.TR:N=[L-O.get(E),P];break;case C.BL:N=[L,P-O.get(I)];break;case C.BR:N=[L-O.get(E),P-O.get(I)];break;case C.TC:N=[L-(O.get(E)/2),P];break;case C.BC:N=[L-(O.get(E)/2),P-O.get(I)];break;case C.LC:N=[L,P-(O.get(I)/2)];break;case C.RC:N=[(L-O.get(E)),P-(O.get(I)/2)];break;case C.CC:N=[L-(O.get(E)/2),P-(O.get(I)/2)];break;default:break;}if(N){this.move(N);}},_getRegion:function(M){var L;if(!M){L=this._posNode.get(K);}else{M=A.Node.one(M);if(M){L=M.get(G);}}return L;},align:function(M,L){this.set(D,{node:M,points:L});},centered:function(L){this.align(L,[C.CC,C.CC]);}};A.WidgetPositionAlign=C;},"3.3.0",{requires:["widget-position"]}); diff --git a/include/javascript/yui3/build/widget/widget-position-align.js b/include/javascript/yui3/build/widget/widget-position-align.js new file mode 100644 index 00000000..6199a110 --- /dev/null +++ b/include/javascript/yui3/build/widget/widget-position-align.js @@ -0,0 +1,15 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('widget-position-align',function(Y){var L=Y.Lang,ALIGN="align",BINDUI="bindUI",SYNCUI="syncUI",OFFSET_WIDTH="offsetWidth",OFFSET_HEIGHT="offsetHeight",VIEWPORT_REGION="viewportRegion",REGION="region",AlignChange="alignChange";function PositionAlign(config){if(!this._posNode){Y.error("WidgetPosition needs to be added to the Widget, before WidgetPositionAlign is added");} +Y.after(this._syncUIPosAlign,this,SYNCUI);Y.after(this._bindUIPosAlign,this,BINDUI);} +PositionAlign.ATTRS={align:{value:null},centered:{setter:"_setAlignCenter",lazyAdd:false,value:false}};PositionAlign.TL="tl";PositionAlign.TR="tr";PositionAlign.BL="bl";PositionAlign.BR="br";PositionAlign.TC="tc";PositionAlign.RC="rc";PositionAlign.BC="bc";PositionAlign.LC="lc";PositionAlign.CC="cc";PositionAlign.prototype={_syncUIPosAlign:function(){var align=this.get(ALIGN);if(align){this._uiSetAlign(align.node,align.points);}},_bindUIPosAlign:function(){this.after(AlignChange,this._afterAlignChange);},_setAlignCenter:function(val){if(val){this.set(ALIGN,{node:val===true?null:val,points:[PositionAlign.CC,PositionAlign.CC]});} +return val;},_afterAlignChange:function(e){if(e.newVal){this._uiSetAlign(e.newVal.node,e.newVal.points);}},_uiSetAlign:function(node,points){if(!L.isArray(points)||points.length!=2){Y.error("align: Invalid Points Arguments");return;} +var nodeRegion=this._getRegion(node),widgetPoint,nodePoint,xy;if(nodeRegion){widgetPoint=points[0];nodePoint=points[1];switch(nodePoint){case PositionAlign.TL:xy=[nodeRegion.left,nodeRegion.top];break;case PositionAlign.TR:xy=[nodeRegion.right,nodeRegion.top];break;case PositionAlign.BL:xy=[nodeRegion.left,nodeRegion.bottom];break;case PositionAlign.BR:xy=[nodeRegion.right,nodeRegion.bottom];break;case PositionAlign.TC:xy=[nodeRegion.left+Math.floor(nodeRegion.width/2),nodeRegion.top];break;case PositionAlign.BC:xy=[nodeRegion.left+Math.floor(nodeRegion.width/2),nodeRegion.bottom];break;case PositionAlign.LC:xy=[nodeRegion.left,nodeRegion.top+Math.floor(nodeRegion.height/2)];break;case PositionAlign.RC:xy=[nodeRegion.right,nodeRegion.top+Math.floor(nodeRegion.height/2),widgetPoint];break;case PositionAlign.CC:xy=[nodeRegion.left+Math.floor(nodeRegion.width/2),nodeRegion.top+Math.floor(nodeRegion.height/2),widgetPoint];break;default:break;} +if(xy){this._doAlign(widgetPoint,xy[0],xy[1]);}}},_doAlign:function(widgetPoint,x,y){var widgetNode=this._posNode,xy;switch(widgetPoint){case PositionAlign.TL:xy=[x,y];break;case PositionAlign.TR:xy=[x-widgetNode.get(OFFSET_WIDTH),y];break;case PositionAlign.BL:xy=[x,y-widgetNode.get(OFFSET_HEIGHT)];break;case PositionAlign.BR:xy=[x-widgetNode.get(OFFSET_WIDTH),y-widgetNode.get(OFFSET_HEIGHT)];break;case PositionAlign.TC:xy=[x-(widgetNode.get(OFFSET_WIDTH)/2),y];break;case PositionAlign.BC:xy=[x-(widgetNode.get(OFFSET_WIDTH)/2),y-widgetNode.get(OFFSET_HEIGHT)];break;case PositionAlign.LC:xy=[x,y-(widgetNode.get(OFFSET_HEIGHT)/2)];break;case PositionAlign.RC:xy=[(x-widgetNode.get(OFFSET_WIDTH)),y-(widgetNode.get(OFFSET_HEIGHT)/2)];break;case PositionAlign.CC:xy=[x-(widgetNode.get(OFFSET_WIDTH)/2),y-(widgetNode.get(OFFSET_HEIGHT)/2)];break;default:break;} +if(xy){this.move(xy);}},_getRegion:function(node){var nodeRegion;if(!node){nodeRegion=this._posNode.get(VIEWPORT_REGION);}else{node=Y.Node.one(node);if(node){nodeRegion=node.get(REGION);}} +return nodeRegion;},align:function(node,points){this.set(ALIGN,{node:node,points:points});},centered:function(node){this.align(node,[PositionAlign.CC,PositionAlign.CC]);}};Y.WidgetPositionAlign=PositionAlign;},'3.3.0',{requires:['widget-position']}); diff --git a/include/javascript/yui3/build/widget/widget-position-constrain-min.js b/include/javascript/yui3/build/widget/widget-position-constrain-min.js new file mode 100644 index 00000000..9bf6fe8b --- /dev/null +++ b/include/javascript/yui3/build/widget/widget-position-constrain-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("widget-position-constrain",function(C){var F="constrain",D="constrain|xyChange",B="constrainChange",N="preventOverlap",E="align",O="",G="bindUI",I="xy",A="x",M="y",J=C.Node,P="viewportRegion",L="region",K;function H(Q){if(!this._posNode){C.error("WidgetPosition needs to be added to the Widget, before WidgetPositionConstrain is added");}C.after(this._bindUIPosConstrained,this,G);}H.ATTRS={constrain:{value:null,setter:"_setConstrain"},preventOverlap:{value:false}};K=H._PREVENT_OVERLAP={x:{"tltr":1,"blbr":1,"brbl":1,"trtl":1},y:{"trbr":1,"tlbl":1,"bltl":1,"brtr":1}};H.prototype={getConstrainedXY:function(T,S){S=S||this.get(F);var R=this._getRegion((S===true)?null:S),Q=this._posNode.get(L);return[this._constrain(T[0],A,Q,R),this._constrain(T[1],M,Q,R)];},constrain:function(U,R){var T,Q,S=R||this.get(F);if(S){T=U||this.get(I);Q=this.getConstrainedXY(T,S);if(Q[0]!==T[0]||Q[1]!==T[1]){this.set(I,Q,{constrained:true});}}},_setConstrain:function(Q){return(Q===true)?Q:J.one(Q);},_constrain:function(Q,R,Y,S){if(S){if(this.get(N)){Q=this._preventOverlap(Q,R,Y,S);}var V=(R==A),X=(V)?S.width:S.height,U=(V)?Y.width:Y.height,T=(V)?S.left:S.top,W=(V)?S.right-U:S.bottom-U;if(QW){if(UW){Q=W;}}}else{Q=T;}}}return Q;},_preventOverlap:function(R,S,b,T){var W=this.get(E),a=(S===A),Y,V,U,X,Z,Q;if(W&&W.points&&K[S][W.points.join(O)]){V=this._getRegion(W.node);if(V){Y=(a)?b.width:b.height;U=(a)?V.left:V.top;X=(a)?V.right:V.bottom;Z=(a)?V.left-T.left:V.top-T.top;Q=(a)?T.right-V.right:T.bottom-V.bottom;}if(R>U){if(QY){R=U-Y;}}else{if(ZY){R=X;}}}return R;},_bindUIPosConstrained:function(){this.after(B,this._afterConstrainChange);this._enableConstraints(this.get(F));},_afterConstrainChange:function(Q){this._enableConstraints(Q.newVal);},_enableConstraints:function(Q){if(Q){this.constrain();this._cxyHandle=this._cxyHandle||this.on(D,this._constrainOnXYChange);}else{if(this._cxyHandle){this._cxyHandle.detach();this._cxyHandle=null;}}},_constrainOnXYChange:function(Q){if(!Q.constrained){Q.newVal=this.getConstrainedXY(Q.newVal);}},_getRegion:function(Q){var R;if(!Q){R=this._posNode.get(P);}else{Q=J.one(Q);if(Q){R=Q.get(L);}}return R;}};C.WidgetPositionConstrain=H;},"3.3.0",{requires:["widget-position"]}); diff --git a/include/javascript/yui3/build/widget/widget-position-constrain.js b/include/javascript/yui3/build/widget/widget-position-constrain.js new file mode 100644 index 00000000..078fb406 --- /dev/null +++ b/include/javascript/yui3/build/widget/widget-position-constrain.js @@ -0,0 +1,15 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('widget-position-constrain',function(Y){var CONSTRAIN="constrain",CONSTRAIN_XYCHANGE="constrain|xyChange",CONSTRAIN_CHANGE="constrainChange",PREVENT_OVERLAP="preventOverlap",ALIGN="align",EMPTY_STR="",BINDUI="bindUI",XY="xy",X_COORD="x",Y_COORD="y",Node=Y.Node,VIEWPORT_REGION="viewportRegion",REGION="region",PREVENT_OVERLAP_MAP;function PositionConstrain(config){if(!this._posNode){Y.error("WidgetPosition needs to be added to the Widget, before WidgetPositionConstrain is added");} +Y.after(this._bindUIPosConstrained,this,BINDUI);} +PositionConstrain.ATTRS={constrain:{value:null,setter:"_setConstrain"},preventOverlap:{value:false}};PREVENT_OVERLAP_MAP=PositionConstrain._PREVENT_OVERLAP={x:{"tltr":1,"blbr":1,"brbl":1,"trtl":1},y:{"trbr":1,"tlbl":1,"bltl":1,"brtr":1}};PositionConstrain.prototype={getConstrainedXY:function(xy,node){node=node||this.get(CONSTRAIN);var constrainingRegion=this._getRegion((node===true)?null:node),nodeRegion=this._posNode.get(REGION);return[this._constrain(xy[0],X_COORD,nodeRegion,constrainingRegion),this._constrain(xy[1],Y_COORD,nodeRegion,constrainingRegion)];},constrain:function(xy,node){var currentXY,constrainedXY,constraint=node||this.get(CONSTRAIN);if(constraint){currentXY=xy||this.get(XY);constrainedXY=this.getConstrainedXY(currentXY,constraint);if(constrainedXY[0]!==currentXY[0]||constrainedXY[1]!==currentXY[1]){this.set(XY,constrainedXY,{constrained:true});}}},_setConstrain:function(val){return(val===true)?val:Node.one(val);},_constrain:function(val,axis,nodeRegion,constrainingRegion){if(constrainingRegion){if(this.get(PREVENT_OVERLAP)){val=this._preventOverlap(val,axis,nodeRegion,constrainingRegion);} +var x=(axis==X_COORD),regionSize=(x)?constrainingRegion.width:constrainingRegion.height,nodeSize=(x)?nodeRegion.width:nodeRegion.height,minConstraint=(x)?constrainingRegion.left:constrainingRegion.top,maxConstraint=(x)?constrainingRegion.right-nodeSize:constrainingRegion.bottom-nodeSize;if(valmaxConstraint){if(nodeSizemaxConstraint){val=maxConstraint;}}else{val=minConstraint;}}} +return val;},_preventOverlap:function(val,axis,nodeRegion,constrainingRegion){var align=this.get(ALIGN),x=(axis===X_COORD),nodeSize,alignRegion,nearEdge,farEdge,spaceOnNearSide,spaceOnFarSide;if(align&&align.points&&PREVENT_OVERLAP_MAP[axis][align.points.join(EMPTY_STR)]){alignRegion=this._getRegion(align.node);if(alignRegion){nodeSize=(x)?nodeRegion.width:nodeRegion.height;nearEdge=(x)?alignRegion.left:alignRegion.top;farEdge=(x)?alignRegion.right:alignRegion.bottom;spaceOnNearSide=(x)?alignRegion.left-constrainingRegion.left:alignRegion.top-constrainingRegion.top;spaceOnFarSide=(x)?constrainingRegion.right-alignRegion.right:constrainingRegion.bottom-alignRegion.bottom;} +if(val>nearEdge){if(spaceOnFarSidenodeSize){val=nearEdge-nodeSize;}}else{if(spaceOnNearSidenodeSize){val=farEdge;}}} +return val;},_bindUIPosConstrained:function(){this.after(CONSTRAIN_CHANGE,this._afterConstrainChange);this._enableConstraints(this.get(CONSTRAIN));},_afterConstrainChange:function(e){this._enableConstraints(e.newVal);},_enableConstraints:function(enable){if(enable){this.constrain();this._cxyHandle=this._cxyHandle||this.on(CONSTRAIN_XYCHANGE,this._constrainOnXYChange);}else if(this._cxyHandle){this._cxyHandle.detach();this._cxyHandle=null;}},_constrainOnXYChange:function(e){if(!e.constrained){e.newVal=this.getConstrainedXY(e.newVal);}},_getRegion:function(node){var region;if(!node){region=this._posNode.get(VIEWPORT_REGION);}else{node=Node.one(node);if(node){region=node.get(REGION);}} +return region;}};Y.WidgetPositionConstrain=PositionConstrain;},'3.3.0',{requires:['widget-position']}); diff --git a/include/javascript/yui3/build/widget/widget-position-ext-min.js b/include/javascript/yui3/build/widget/widget-position-ext-min.js deleted file mode 100644 index 53dd7a4a..00000000 --- a/include/javascript/yui3/build/widget/widget-position-ext-min.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - Copyright (c) 2009, Yahoo! Inc. All rights reserved. - Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 3.0.0 - build: 1549 - */ -YUI.add("widget-position-ext",function(A){var H=A.Lang,C="align",E="bindUI",B="syncUI",D="offsetWidth",I="offsetHeight",K="viewportRegion",G="region",J="alignChange";function F(L){if(!this._posNode){A.error("WidgetPosition needs to be added to the Widget, before WidgetPositionExt is added");}A.after(this._syncUIPosExtras,this,B);A.after(this._bindUIPosExtras,this,E);}F.ATTRS={align:{value:null},centered:{setter:function(L){return this._setAlignCenter(L);},lazyAdd:false,value:false}};F.TL="tl";F.TR="tr";F.BL="bl";F.BR="br";F.TC="tc";F.RC="rc";F.BC="bc";F.LC="lc";F.CC="cc";F.prototype={_syncUIPosExtras:function(){var L=this.get(C);if(L){this._uiSetAlign(L.node,L.points);}},_bindUIPosExtras:function(){this.after(J,this._afterAlignChange);},_setAlignCenter:function(L){if(L){this.set(C,{node:L===true?null:L,points:[F.CC,F.CC]});}return L;},_afterAlignChange:function(L){if(L.newVal){this._uiSetAlign(L.newVal.node,L.newVal.points);}},_uiSetAlign:function(O,N){if(!H.isArray(N)||N.length!=2){A.error("align: Invalid Points Arguments");return;}var M,L,P,Q;if(!O){M=this._posNode.get(K);}else{O=A.Node.get(O);if(O){M=O.get(G);}}if(M){M.width=M.width||M.right-M.left;M.height=M.height||M.bottom-M.top;L=N[0];P=N[1];switch(P){case F.TL:Q=[M.left,M.top];break;case F.TR:Q=[M.right,M.top];break;case F.BL:Q=[M.left,M.bottom];break;case F.BR:Q=[M.right,M.bottom];break;case F.TC:Q=[M.left+Math.floor(M.width/2),M.top];break;case F.BC:Q=[M.left+Math.floor(M.width/2),M.bottom];break;case F.LC:Q=[M.left,M.top+Math.floor(M.height/2)];break;case F.RC:Q=[M.right,M.top+Math.floor(M.height/2),L];break;case F.CC:Q=[M.left+Math.floor(M.width/2),M.top+Math.floor(M.height/2),L];break;default:break;}if(Q){this._doAlign(L,Q[0],Q[1]);}}},_doAlign:function(M,L,P){var O=this._posNode,N;switch(M){case F.TL:N=[L,P];break;case F.TR:N=[L-O.get(D),P];break;case F.BL:N=[L,P-O.get(I)];break;case F.BR:N=[L-O.get(D),P-O.get(I)];break;case F.TC:N=[L-(O.get(D)/2),P];break;case F.BC:N=[L-(O.get(D)/2),P-O.get(I)];break;case F.LC:N=[L,P-(O.get(I)/2)];break;case F.RC:N=[(L-O.get(D)),P-(O.get(I)/2)];break;case F.CC:N=[L-(O.get(D)/2),P-(O.get(I)/2)];break;default:break;}if(N){this.move(N);}},align:function(M,L){this.set(C,{node:M,points:L});},centered:function(L){this.align(L,[F.CC,F.CC]);}};A.WidgetPositionExt=F;},"3.0.0",{requires:["widget","widget-position"]}); \ No newline at end of file diff --git a/include/javascript/yui3/build/widget/widget-position-ext.js b/include/javascript/yui3/build/widget/widget-position-ext.js deleted file mode 100644 index 15e420cd..00000000 --- a/include/javascript/yui3/build/widget/widget-position-ext.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - Copyright (c) 2009, Yahoo! Inc. All rights reserved. - Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 3.0.0 - build: 1549 - */ -YUI.add('widget-position-ext',function(Y){var L=Y.Lang,ALIGN="align",BINDUI="bindUI",SYNCUI="syncUI",OFFSET_WIDTH="offsetWidth",OFFSET_HEIGHT="offsetHeight",VIEWPORT_REGION="viewportRegion",REGION="region",AlignChange="alignChange";function PositionExt(config){if(!this._posNode){Y.error("WidgetPosition needs to be added to the Widget, before WidgetPositionExt is added");} -Y.after(this._syncUIPosExtras,this,SYNCUI);Y.after(this._bindUIPosExtras,this,BINDUI);} -PositionExt.ATTRS={align:{value:null},centered:{setter:function(val){return this._setAlignCenter(val);},lazyAdd:false,value:false}};PositionExt.TL="tl";PositionExt.TR="tr";PositionExt.BL="bl";PositionExt.BR="br";PositionExt.TC="tc";PositionExt.RC="rc";PositionExt.BC="bc";PositionExt.LC="lc";PositionExt.CC="cc";PositionExt.prototype={_syncUIPosExtras:function(){var align=this.get(ALIGN);if(align){this._uiSetAlign(align.node,align.points);}},_bindUIPosExtras:function(){this.after(AlignChange,this._afterAlignChange);},_setAlignCenter:function(val){if(val){this.set(ALIGN,{node:val===true?null:val,points:[PositionExt.CC,PositionExt.CC]});} -return val;},_afterAlignChange:function(e){if(e.newVal){this._uiSetAlign(e.newVal.node,e.newVal.points);}},_uiSetAlign:function(node,points){if(!L.isArray(points)||points.length!=2){Y.error("align: Invalid Points Arguments");return;} -var nodeRegion,widgetPoint,nodePoint,xy;if(!node){nodeRegion=this._posNode.get(VIEWPORT_REGION);}else{node=Y.Node.get(node);if(node){nodeRegion=node.get(REGION);}} -if(nodeRegion){nodeRegion.width=nodeRegion.width||nodeRegion.right-nodeRegion.left;nodeRegion.height=nodeRegion.height||nodeRegion.bottom-nodeRegion.top;widgetPoint=points[0];nodePoint=points[1];switch(nodePoint){case PositionExt.TL:xy=[nodeRegion.left,nodeRegion.top];break;case PositionExt.TR:xy=[nodeRegion.right,nodeRegion.top];break;case PositionExt.BL:xy=[nodeRegion.left,nodeRegion.bottom];break;case PositionExt.BR:xy=[nodeRegion.right,nodeRegion.bottom];break;case PositionExt.TC:xy=[nodeRegion.left+Math.floor(nodeRegion.width/2),nodeRegion.top];break;case PositionExt.BC:xy=[nodeRegion.left+Math.floor(nodeRegion.width/2),nodeRegion.bottom];break;case PositionExt.LC:xy=[nodeRegion.left,nodeRegion.top+Math.floor(nodeRegion.height/2)];break;case PositionExt.RC:xy=[nodeRegion.right,nodeRegion.top+Math.floor(nodeRegion.height/2),widgetPoint];break;case PositionExt.CC:xy=[nodeRegion.left+Math.floor(nodeRegion.width/2),nodeRegion.top+Math.floor(nodeRegion.height/2),widgetPoint];break;default:break;} -if(xy){this._doAlign(widgetPoint,xy[0],xy[1]);}}},_doAlign:function(widgetPoint,x,y){var widgetNode=this._posNode,xy;switch(widgetPoint){case PositionExt.TL:xy=[x,y];break;case PositionExt.TR:xy=[x-widgetNode.get(OFFSET_WIDTH),y];break;case PositionExt.BL:xy=[x,y-widgetNode.get(OFFSET_HEIGHT)];break;case PositionExt.BR:xy=[x-widgetNode.get(OFFSET_WIDTH),y-widgetNode.get(OFFSET_HEIGHT)];break;case PositionExt.TC:xy=[x-(widgetNode.get(OFFSET_WIDTH)/2),y];break;case PositionExt.BC:xy=[x-(widgetNode.get(OFFSET_WIDTH)/2),y-widgetNode.get(OFFSET_HEIGHT)];break;case PositionExt.LC:xy=[x,y-(widgetNode.get(OFFSET_HEIGHT)/2)];break;case PositionExt.RC:xy=[(x-widgetNode.get(OFFSET_WIDTH)),y-(widgetNode.get(OFFSET_HEIGHT)/2)];break;case PositionExt.CC:xy=[x-(widgetNode.get(OFFSET_WIDTH)/2),y-(widgetNode.get(OFFSET_HEIGHT)/2)];break;default:break;} -if(xy){this.move(xy);}},align:function(node,points){this.set(ALIGN,{node:node,points:points});},centered:function(node){this.align(node,[PositionExt.CC,PositionExt.CC]);}};Y.WidgetPositionExt=PositionExt;},'3.0.0',{requires:['widget','widget-position']}); \ No newline at end of file diff --git a/include/javascript/yui3/build/widget/widget-position-min.js b/include/javascript/yui3/build/widget/widget-position-min.js index 6ab1ffd6..bd9f06f6 100644 --- a/include/javascript/yui3/build/widget/widget-position-min.js +++ b/include/javascript/yui3/build/widget/widget-position-min.js @@ -1,8 +1,8 @@ /* - Copyright (c) 2009, Yahoo! Inc. All rights reserved. + Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 3.0.0 - build: 1549 + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 */ -YUI.add("widget-position",function(A){var H=A.Lang,J=A.Widget,K="xy",F="positioned",I="boundingBox",L="renderUI",G="bindUI",D="syncUI",C=J.UI_SRC,E="xyChange";function B(M){this._posNode=this.get(I);A.after(this._renderUIPosition,this,L);A.after(this._syncUIPosition,this,D);A.after(this._bindUIPosition,this,G);}B.ATTRS={x:{setter:function(M){this._setX(M);},lazyAdd:false,getter:function(){return this._getX();}},y:{setter:function(M){this._setY(M);},lazyAdd:false,getter:function(){return this._getY();}},xy:{value:[0,0],validator:function(M){return this._validateXY(M);}}};B.POSITIONED_CLASS_NAME=J.getClassName(F);B.prototype={_renderUIPosition:function(){this._posNode.addClass(B.POSITIONED_CLASS_NAME);},_syncUIPosition:function(){this._uiSetXY(this.get(K));},_bindUIPosition:function(){this.after(E,this._afterXYChange);},move:function(){var M=arguments,N=(H.isArray(M[0]))?M[0]:[M[0],M[1]];this.set(K,N);},syncXY:function(){this.set(K,this._posNode.getXY(),{src:C});},_validateXY:function(M){return(H.isArray(M)&&H.isNumber(M[0])&&H.isNumber(M[1]));},_setX:function(M){this.set(K,[M,this.get(K)[1]]);},_setY:function(M){this.set(K,[this.get(K)[0],M]);},_getX:function(){return this.get(K)[0];},_getY:function(){return this.get(K)[1];},_afterXYChange:function(M){if(M.src!=C){this._uiSetXY(M.newVal);}},_uiSetXY:function(M){this._posNode.setXY(M);}};A.WidgetPosition=B;},"3.0.0",{requires:["widget"]}); \ No newline at end of file +YUI.add("widget-position",function(A){var I=A.Lang,L=A.Widget,N="xy",J="position",G="positioned",K="boundingBox",H="relative",M="renderUI",F="bindUI",D="syncUI",C=L.UI_SRC,E="xyChange";function B(O){this._posNode=this.get(K);A.after(this._renderUIPosition,this,M);A.after(this._syncUIPosition,this,D);A.after(this._bindUIPosition,this,F);}B.ATTRS={x:{setter:function(O){this._setX(O);},getter:function(){return this._getX();},lazyAdd:false},y:{setter:function(O){this._setY(O);},getter:function(){return this._getY();},lazyAdd:false},xy:{value:[0,0],validator:function(O){return this._validateXY(O);}}};B.POSITIONED_CLASS_NAME=L.getClassName(G);B.prototype={_renderUIPosition:function(){this._posNode.addClass(B.POSITIONED_CLASS_NAME);},_syncUIPosition:function(){var O=this._posNode;if(O.getStyle(J)===H){this.syncXY();}this._uiSetXY(this.get(N));},_bindUIPosition:function(){this.after(E,this._afterXYChange);},move:function(){var O=arguments,P=(I.isArray(O[0]))?O[0]:[O[0],O[1]];this.set(N,P);},syncXY:function(){this.set(N,this._posNode.getXY(),{src:C});},_validateXY:function(O){return(I.isArray(O)&&I.isNumber(O[0])&&I.isNumber(O[1]));},_setX:function(O){this.set(N,[O,this.get(N)[1]]);},_setY:function(O){this.set(N,[this.get(N)[0],O]);},_getX:function(){return this.get(N)[0];},_getY:function(){return this.get(N)[1];},_afterXYChange:function(O){if(O.src!=C){this._uiSetXY(O.newVal);}},_uiSetXY:function(O){this._posNode.setXY(O);}};A.WidgetPosition=B;},"3.3.0",{requires:["base-build","node-screen","widget"]}); diff --git a/include/javascript/yui3/build/widget/widget-position.js b/include/javascript/yui3/build/widget/widget-position.js index 6d1e2e3f..a338233b 100644 --- a/include/javascript/yui3/build/widget/widget-position.js +++ b/include/javascript/yui3/build/widget/widget-position.js @@ -1,9 +1,10 @@ /* - Copyright (c) 2009, Yahoo! Inc. All rights reserved. + Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 3.0.0 - build: 1549 + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 */ -YUI.add('widget-position',function(Y){var Lang=Y.Lang,Widget=Y.Widget,XY_COORD="xy",POSITIONED="positioned",BOUNDING_BOX="boundingBox",RENDERUI="renderUI",BINDUI="bindUI",SYNCUI="syncUI",UI=Widget.UI_SRC,XYChange="xyChange";function Position(config){this._posNode=this.get(BOUNDING_BOX);Y.after(this._renderUIPosition,this,RENDERUI);Y.after(this._syncUIPosition,this,SYNCUI);Y.after(this._bindUIPosition,this,BINDUI);} -Position.ATTRS={x:{setter:function(val){this._setX(val);},lazyAdd:false,getter:function(){return this._getX();}},y:{setter:function(val){this._setY(val);},lazyAdd:false,getter:function(){return this._getY();}},xy:{value:[0,0],validator:function(val){return this._validateXY(val);}}};Position.POSITIONED_CLASS_NAME=Widget.getClassName(POSITIONED);Position.prototype={_renderUIPosition:function(){this._posNode.addClass(Position.POSITIONED_CLASS_NAME);},_syncUIPosition:function(){this._uiSetXY(this.get(XY_COORD));},_bindUIPosition:function(){this.after(XYChange,this._afterXYChange);},move:function(){var args=arguments,coord=(Lang.isArray(args[0]))?args[0]:[args[0],args[1]];this.set(XY_COORD,coord);},syncXY:function(){this.set(XY_COORD,this._posNode.getXY(),{src:UI});},_validateXY:function(val){return(Lang.isArray(val)&&Lang.isNumber(val[0])&&Lang.isNumber(val[1]));},_setX:function(val){this.set(XY_COORD,[val,this.get(XY_COORD)[1]]);},_setY:function(val){this.set(XY_COORD,[this.get(XY_COORD)[0],val]);},_getX:function(){return this.get(XY_COORD)[0];},_getY:function(){return this.get(XY_COORD)[1];},_afterXYChange:function(e){if(e.src!=UI){this._uiSetXY(e.newVal);}},_uiSetXY:function(val){this._posNode.setXY(val);}};Y.WidgetPosition=Position;},'3.0.0',{requires:['widget']}); \ No newline at end of file +YUI.add('widget-position',function(Y){var Lang=Y.Lang,Widget=Y.Widget,XY_COORD="xy",POSITION="position",POSITIONED="positioned",BOUNDING_BOX="boundingBox",RELATIVE="relative",RENDERUI="renderUI",BINDUI="bindUI",SYNCUI="syncUI",UI=Widget.UI_SRC,XYChange="xyChange";function Position(config){this._posNode=this.get(BOUNDING_BOX);Y.after(this._renderUIPosition,this,RENDERUI);Y.after(this._syncUIPosition,this,SYNCUI);Y.after(this._bindUIPosition,this,BINDUI);} +Position.ATTRS={x:{setter:function(val){this._setX(val);},getter:function(){return this._getX();},lazyAdd:false},y:{setter:function(val){this._setY(val);},getter:function(){return this._getY();},lazyAdd:false},xy:{value:[0,0],validator:function(val){return this._validateXY(val);}}};Position.POSITIONED_CLASS_NAME=Widget.getClassName(POSITIONED);Position.prototype={_renderUIPosition:function(){this._posNode.addClass(Position.POSITIONED_CLASS_NAME);},_syncUIPosition:function(){var posNode=this._posNode;if(posNode.getStyle(POSITION)===RELATIVE){this.syncXY();} +this._uiSetXY(this.get(XY_COORD));},_bindUIPosition:function(){this.after(XYChange,this._afterXYChange);},move:function(){var args=arguments,coord=(Lang.isArray(args[0]))?args[0]:[args[0],args[1]];this.set(XY_COORD,coord);},syncXY:function(){this.set(XY_COORD,this._posNode.getXY(),{src:UI});},_validateXY:function(val){return(Lang.isArray(val)&&Lang.isNumber(val[0])&&Lang.isNumber(val[1]));},_setX:function(val){this.set(XY_COORD,[val,this.get(XY_COORD)[1]]);},_setY:function(val){this.set(XY_COORD,[this.get(XY_COORD)[0],val]);},_getX:function(){return this.get(XY_COORD)[0];},_getY:function(){return this.get(XY_COORD)[1];},_afterXYChange:function(e){if(e.src!=UI){this._uiSetXY(e.newVal);}},_uiSetXY:function(val){this._posNode.setXY(val);}};Y.WidgetPosition=Position;},'3.3.0',{requires:['base-build','node-screen','widget']}); diff --git a/include/javascript/yui3/build/widget/widget-skin-min.js b/include/javascript/yui3/build/widget/widget-skin-min.js new file mode 100644 index 00000000..917dad61 --- /dev/null +++ b/include/javascript/yui3/build/widget/widget-skin-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("widget-skin",function(e){var d="boundingBox",b="contentBox",a="skin",c=e.ClassNameManager.getClassName;e.Widget.prototype.getSkinName=function(){var f=this.get(b)||this.get(d),h=new RegExp("\\b"+c(a)+"-(\\S+)"),g;if(f){f.ancestor(function(i){g=i.get("className").match(h);return g;});}return(g)?g[1]:null;};},"3.3.0",{requires:["widget-base"]}); diff --git a/include/javascript/yui3/build/widget/widget-skin.js b/include/javascript/yui3/build/widget/widget-skin.js new file mode 100644 index 00000000..d1cfd2ac --- /dev/null +++ b/include/javascript/yui3/build/widget/widget-skin.js @@ -0,0 +1,9 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('widget-skin',function(Y){var BOUNDING_BOX="boundingBox",CONTENT_BOX="contentBox",SKIN="skin",_getClassName=Y.ClassNameManager.getClassName;Y.Widget.prototype.getSkinName=function(){var root=this.get(CONTENT_BOX)||this.get(BOUNDING_BOX),search=new RegExp('\\b'+_getClassName(SKIN)+'-(\\S+)'),match;if(root){root.ancestor(function(node){match=node.get('className').match(search);return match;});} +return(match)?match[1]:null;};},'3.3.0',{requires:['widget-base']}); diff --git a/include/javascript/yui3/build/widget/widget-stack-min.js b/include/javascript/yui3/build/widget/widget-stack-min.js index b50f1d25..71fef242 100644 --- a/include/javascript/yui3/build/widget/widget-stack-min.js +++ b/include/javascript/yui3/build/widget/widget-stack-min.js @@ -1,8 +1,8 @@ /* - Copyright (c) 2009, Yahoo! Inc. All rights reserved. + Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 3.0.0 - build: 1549 + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 */ -YUI.add("widget-stack",function(E){var N=E.Lang,T=E.UA,d=E.Node,F=E.Widget,c="zIndex",P="shim",a="visible",e="boundingBox",W="renderUI",G="bindUI",S="syncUI",Q="offsetWidth",D="offsetHeight",M="parentNode",A="firstChild",X="ownerDocument",H="width",V="height",K="px",O="shimdeferred",f="shimresize",Z="visibleChange",C="widthChange",J="heightChange",b="shimChange",B="zIndexChange",I="contentUpdate",R="stacked";function U(L){this._stackNode=this.get(e);this._stackHandles={};E.after(this._renderUIStack,this,W);E.after(this._syncUIStack,this,S);E.after(this._bindUIStack,this,G);}U.ATTRS={shim:{value:(T.ie==6)},zIndex:{value:0,setter:function(L){return this._setZIndex(L);}}};U.HTML_PARSER={zIndex:function(L){return L.getStyle(c);}};U.SHIM_CLASS_NAME=F.getClassName(P);U.STACKED_CLASS_NAME=F.getClassName(R);U.SHIM_TEMPLATE='';U.prototype={_syncUIStack:function(){this._uiSetShim(this.get(P));this._uiSetZIndex(this.get(c));},_bindUIStack:function(){this.after(b,this._afterShimChange);this.after(B,this._afterZIndexChange);},_renderUIStack:function(){this._stackNode.addClass(U.STACKED_CLASS_NAME);},_setZIndex:function(L){if(N.isString(L)){L=parseInt(L,10);}if(!N.isNumber(L)){L=0;}return L;},_afterShimChange:function(L){this._uiSetShim(L.newVal);},_afterZIndexChange:function(L){this._uiSetZIndex(L.newVal);},_uiSetZIndex:function(L){this._stackNode.setStyle(c,L);},_uiSetShim:function(L){if(L){if(this.get(a)){this._renderShim();}else{this._renderShimDeferred();}}else{this._destroyShim();}},_renderShimDeferred:function(){this._stackHandles[O]=this._stackHandles[O]||[];var Y=this._stackHandles[O],L=function(g){if(g.newVal){this._renderShim();}};Y.push(this.on(Z,L));},_addShimResizeHandlers:function(){this._stackHandles[f]=this._stackHandles[f]||[];var Y=this.sizeShim,L=this._stackHandles[f];this.sizeShim();L.push(this.after(Z,Y));L.push(this.after(C,Y));L.push(this.after(J,Y));L.push(this.after(I,Y));},_detachStackHandles:function(L){var Y=this._stackHandles[L],g;if(Y&&Y.length>0){while((g=Y.pop())){g.detach();}}},_renderShim:function(){var L=this._shimNode,Y=this._stackNode;if(!L){L=this._shimNode=this._getShimTemplate();Y.insertBefore(L,Y.get(A));if(T.ie==6){this._addShimResizeHandlers();}this._detachStackHandles(O);}},_destroyShim:function(){if(this._shimNode){this._shimNode.get(M).removeChild(this._shimNode);this._shimNode=null;this._detachStackHandles(O);this._detachStackHandles(f);}},sizeShim:function(){var Y=this._shimNode,L=this._stackNode;if(Y&&T.ie===6&&this.get(a)){Y.setStyle(H,L.get(Q)+K);Y.setStyle(V,L.get(D)+K);}},_getShimTemplate:function(){return d.create(U.SHIM_TEMPLATE,this._stackNode.get(X));}};E.WidgetStack=U;},"3.0.0",{requires:["widget"]}); \ No newline at end of file +YUI.add("widget-stack",function(E){var N=E.Lang,T=E.UA,d=E.Node,F=E.Widget,c="zIndex",P="shim",a="visible",e="boundingBox",W="renderUI",G="bindUI",S="syncUI",Q="offsetWidth",D="offsetHeight",M="parentNode",A="firstChild",X="ownerDocument",H="width",V="height",K="px",O="shimdeferred",f="shimresize",Z="visibleChange",C="widthChange",J="heightChange",b="shimChange",B="zIndexChange",I="contentUpdate",R="stacked";function U(L){this._stackNode=this.get(e);this._stackHandles={};E.after(this._renderUIStack,this,W);E.after(this._syncUIStack,this,S);E.after(this._bindUIStack,this,G);}U.ATTRS={shim:{value:(T.ie==6)},zIndex:{value:0,setter:function(L){return this._setZIndex(L);}}};U.HTML_PARSER={zIndex:function(L){return L.getStyle(c);}};U.SHIM_CLASS_NAME=F.getClassName(P);U.STACKED_CLASS_NAME=F.getClassName(R);U.SHIM_TEMPLATE='';U.prototype={_syncUIStack:function(){this._uiSetShim(this.get(P));this._uiSetZIndex(this.get(c));},_bindUIStack:function(){this.after(b,this._afterShimChange);this.after(B,this._afterZIndexChange);},_renderUIStack:function(){this._stackNode.addClass(U.STACKED_CLASS_NAME);},_setZIndex:function(L){if(N.isString(L)){L=parseInt(L,10);}if(!N.isNumber(L)){L=0;}return L;},_afterShimChange:function(L){this._uiSetShim(L.newVal);},_afterZIndexChange:function(L){this._uiSetZIndex(L.newVal);},_uiSetZIndex:function(L){this._stackNode.setStyle(c,L);},_uiSetShim:function(L){if(L){if(this.get(a)){this._renderShim();}else{this._renderShimDeferred();}}else{this._destroyShim();}},_renderShimDeferred:function(){this._stackHandles[O]=this._stackHandles[O]||[];var Y=this._stackHandles[O],L=function(g){if(g.newVal){this._renderShim();}};Y.push(this.on(Z,L));},_addShimResizeHandlers:function(){this._stackHandles[f]=this._stackHandles[f]||[];var Y=this.sizeShim,L=this._stackHandles[f];this.sizeShim();L.push(this.after(Z,Y));L.push(this.after(C,Y));L.push(this.after(J,Y));L.push(this.after(I,Y));},_detachStackHandles:function(L){var Y=this._stackHandles[L],g;if(Y&&Y.length>0){while((g=Y.pop())){g.detach();}}},_renderShim:function(){var L=this._shimNode,Y=this._stackNode;if(!L){L=this._shimNode=this._getShimTemplate();Y.insertBefore(L,Y.get(A));if(T.ie==6){this._addShimResizeHandlers();}this._detachStackHandles(O);}},_destroyShim:function(){if(this._shimNode){this._shimNode.get(M).removeChild(this._shimNode);this._shimNode=null;this._detachStackHandles(O);this._detachStackHandles(f);}},sizeShim:function(){var Y=this._shimNode,L=this._stackNode;if(Y&&T.ie===6&&this.get(a)){Y.setStyle(H,L.get(Q)+K);Y.setStyle(V,L.get(D)+K);}},_getShimTemplate:function(){return d.create(U.SHIM_TEMPLATE,this._stackNode.get(X));}};E.WidgetStack=U;},"3.3.0",{requires:["base-build","widget"]}); diff --git a/include/javascript/yui3/build/widget/widget-stack.js b/include/javascript/yui3/build/widget/widget-stack.js index ee2aa19e..f751cb5f 100644 --- a/include/javascript/yui3/build/widget/widget-stack.js +++ b/include/javascript/yui3/build/widget/widget-stack.js @@ -1,12 +1,12 @@ /* - Copyright (c) 2009, Yahoo! Inc. All rights reserved. + Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 3.0.0 - build: 1549 + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 */ YUI.add('widget-stack',function(Y){var L=Y.Lang,UA=Y.UA,Node=Y.Node,Widget=Y.Widget,ZINDEX="zIndex",SHIM="shim",VISIBLE="visible",BOUNDING_BOX="boundingBox",RENDER_UI="renderUI",BIND_UI="bindUI",SYNC_UI="syncUI",OFFSET_WIDTH="offsetWidth",OFFSET_HEIGHT="offsetHeight",PARENT_NODE="parentNode",FIRST_CHILD="firstChild",OWNER_DOCUMENT="ownerDocument",WIDTH="width",HEIGHT="height",PX="px",SHIM_DEFERRED="shimdeferred",SHIM_RESIZE="shimresize",VisibleChange="visibleChange",WidthChange="widthChange",HeightChange="heightChange",ShimChange="shimChange",ZIndexChange="zIndexChange",ContentUpdate="contentUpdate",STACKED="stacked";function Stack(config){this._stackNode=this.get(BOUNDING_BOX);this._stackHandles={};Y.after(this._renderUIStack,this,RENDER_UI);Y.after(this._syncUIStack,this,SYNC_UI);Y.after(this._bindUIStack,this,BIND_UI);} Stack.ATTRS={shim:{value:(UA.ie==6)},zIndex:{value:0,setter:function(val){return this._setZIndex(val);}}};Stack.HTML_PARSER={zIndex:function(contentBox){return contentBox.getStyle(ZINDEX);}};Stack.SHIM_CLASS_NAME=Widget.getClassName(SHIM);Stack.STACKED_CLASS_NAME=Widget.getClassName(STACKED);Stack.SHIM_TEMPLATE='';Stack.prototype={_syncUIStack:function(){this._uiSetShim(this.get(SHIM));this._uiSetZIndex(this.get(ZINDEX));},_bindUIStack:function(){this.after(ShimChange,this._afterShimChange);this.after(ZIndexChange,this._afterZIndexChange);},_renderUIStack:function(){this._stackNode.addClass(Stack.STACKED_CLASS_NAME);},_setZIndex:function(zIndex){if(L.isString(zIndex)){zIndex=parseInt(zIndex,10);} if(!L.isNumber(zIndex)){zIndex=0;} return zIndex;},_afterShimChange:function(e){this._uiSetShim(e.newVal);},_afterZIndexChange:function(e){this._uiSetZIndex(e.newVal);},_uiSetZIndex:function(zIndex){this._stackNode.setStyle(ZINDEX,zIndex);},_uiSetShim:function(enable){if(enable){if(this.get(VISIBLE)){this._renderShim();}else{this._renderShimDeferred();}}else{this._destroyShim();}},_renderShimDeferred:function(){this._stackHandles[SHIM_DEFERRED]=this._stackHandles[SHIM_DEFERRED]||[];var handles=this._stackHandles[SHIM_DEFERRED],createBeforeVisible=function(e){if(e.newVal){this._renderShim();}};handles.push(this.on(VisibleChange,createBeforeVisible));},_addShimResizeHandlers:function(){this._stackHandles[SHIM_RESIZE]=this._stackHandles[SHIM_RESIZE]||[];var sizeShim=this.sizeShim,handles=this._stackHandles[SHIM_RESIZE];this.sizeShim();handles.push(this.after(VisibleChange,sizeShim));handles.push(this.after(WidthChange,sizeShim));handles.push(this.after(HeightChange,sizeShim));handles.push(this.after(ContentUpdate,sizeShim));},_detachStackHandles:function(handleKey){var handles=this._stackHandles[handleKey],handle;if(handles&&handles.length>0){while((handle=handles.pop())){handle.detach();}}},_renderShim:function(){var shimEl=this._shimNode,stackEl=this._stackNode;if(!shimEl){shimEl=this._shimNode=this._getShimTemplate();stackEl.insertBefore(shimEl,stackEl.get(FIRST_CHILD));if(UA.ie==6){this._addShimResizeHandlers();} -this._detachStackHandles(SHIM_DEFERRED);}},_destroyShim:function(){if(this._shimNode){this._shimNode.get(PARENT_NODE).removeChild(this._shimNode);this._shimNode=null;this._detachStackHandles(SHIM_DEFERRED);this._detachStackHandles(SHIM_RESIZE);}},sizeShim:function(){var shim=this._shimNode,node=this._stackNode;if(shim&&UA.ie===6&&this.get(VISIBLE)){shim.setStyle(WIDTH,node.get(OFFSET_WIDTH)+PX);shim.setStyle(HEIGHT,node.get(OFFSET_HEIGHT)+PX);}},_getShimTemplate:function(){return Node.create(Stack.SHIM_TEMPLATE,this._stackNode.get(OWNER_DOCUMENT));}};Y.WidgetStack=Stack;},'3.0.0',{requires:['widget']}); \ No newline at end of file +this._detachStackHandles(SHIM_DEFERRED);}},_destroyShim:function(){if(this._shimNode){this._shimNode.get(PARENT_NODE).removeChild(this._shimNode);this._shimNode=null;this._detachStackHandles(SHIM_DEFERRED);this._detachStackHandles(SHIM_RESIZE);}},sizeShim:function(){var shim=this._shimNode,node=this._stackNode;if(shim&&UA.ie===6&&this.get(VISIBLE)){shim.setStyle(WIDTH,node.get(OFFSET_WIDTH)+PX);shim.setStyle(HEIGHT,node.get(OFFSET_HEIGHT)+PX);}},_getShimTemplate:function(){return Node.create(Stack.SHIM_TEMPLATE,this._stackNode.get(OWNER_DOCUMENT));}};Y.WidgetStack=Stack;},'3.3.0',{requires:['base-build','widget']}); diff --git a/include/javascript/yui3/build/widget/widget-stdmod-min.js b/include/javascript/yui3/build/widget/widget-stdmod-min.js index 2f317533..1aa9f2c1 100644 --- a/include/javascript/yui3/build/widget/widget-stdmod-min.js +++ b/include/javascript/yui3/build/widget/widget-stdmod-min.js @@ -1,8 +1,8 @@ /* - Copyright (c) 2009, Yahoo! Inc. All rights reserved. + Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 3.0.0 - build: 1549 + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 */ -YUI.add("widget-stdmod",function(A){var D=A.Lang,P=A.Node,c=A.NodeList,W=A.UA,C=A.Widget,B="",j="hd",h="bd",H="ft",e="header",m="body",k="footer",q="fillHeight",K="stdmod",t="px",T="Node",i="Content",o="innerHTML",d="firstChild",G="childNodes",l="createDocumentFragment",M="ownerDocument",U="contentBox",p="boundingBox",Z="height",g="offsetHeight",X="auto",J="headerContentChange",b="bodyContentChange",N="footerContentChange",R="fillHeightChange",S="HeightChange",r="contentUpdate",V="renderUI",f="bindUI",E="syncUI",Q=A.Widget.UI_SRC;function s(L){this._stdModNode=this.get(U);A.after(this._renderUIStdMod,this,V);A.after(this._bindUIStdMod,this,f);A.after(this._syncUIStdMod,this,E);}s.HEADER=e;s.BODY=m;s.FOOTER=k;s.AFTER="after";s.BEFORE="before";s.REPLACE="replace";var I=s.HEADER,a=s.BODY,O=s.FOOTER,n=s.AFTER,F=s.BEFORE;s.ATTRS={headerContent:{value:null},footerContent:{value:null},bodyContent:{value:null},fillHeight:{value:s.BODY,validator:function(L){return this._validateFillHeight(L);}}};s.HTML_PARSER={headerContent:function(L){return this._parseStdModHTML(I);},bodyContent:function(L){return this._parseStdModHTML(a);},footerContent:function(L){return this._parseStdModHTML(O);}};s.SECTION_CLASS_NAMES={header:C.getClassName(j),body:C.getClassName(h),footer:C.getClassName(H)};s.TEMPLATES={header:'
        ',body:'
        ',footer:'
        '};s.prototype={_syncUIStdMod:function(){this._uiSetStdMod(I,this.get(I+i));this._uiSetStdMod(a,this.get(a+i));this._uiSetStdMod(O,this.get(O+i));this._uiSetFillHeight(this.get(q));},_renderUIStdMod:function(){this._stdModNode.addClass(C.getClassName(K));},_bindUIStdMod:function(){this.after(J,this._afterHeaderChange);this.after(b,this._afterBodyChange);this.after(N,this._afterFooterChange);this.after(R,this._afterFillHeightChange);this.after(S,this._fillHeight);this.after(r,this._fillHeight);},_afterHeaderChange:function(L){if(L.src!==Q){this._uiSetStdMod(I,L.newVal,L.stdModPosition);}},_afterBodyChange:function(L){if(L.src!==Q){this._uiSetStdMod(a,L.newVal,L.stdModPosition);}},_afterFooterChange:function(L){if(L.src!==Q){this._uiSetStdMod(O,L.newVal,L.stdModPosition);}},_afterFillHeightChange:function(L){this._uiSetFillHeight(L.newVal);},_validateFillHeight:function(L){return!L||L==s.BODY||L==s.HEADER||L==s.FOOTER;},_uiSetFillHeight:function(u){var Y=this.getStdModNode(u);var L=this._currFillNode;if(L&&Y!==L){L.setStyle(Z,B);}if(Y){this._currFillNode=Y;}this._fillHeight();},_fillHeight:function(){if(this.get(q)){var L=this.get(Z);if(L!=B&&L!=X){this.fillHeight(this._currFillNode);}}},_uiSetStdMod:function(v,u,L){if(u){var Y=this.getStdModNode(v)||this._renderStdMod(v);if(u instanceof P||u instanceof c){this._addNodeRef(Y,u,L);}else{this._addNodeHTML(Y,u,L);}this.set(v+i,this._getStdModContent(v),{src:Q});this.fire(r);}},_renderStdMod:function(u){var L=this.get(U),Y=this._findStdModSection(u);if(!Y){Y=this._getStdModTemplate(u);}this._insertStdModSection(L,u,Y);this[u+T]=Y;return this[u+T];},_insertStdModSection:function(L,v,u){var Y=L.get(d);if(v===O||!Y){L.appendChild(u);}else{if(v===I){L.insertBefore(u,Y);}else{var w=this[O+T];if(w){L.insertBefore(u,w);}else{L.appendChild(u);}}}},_getStdModTemplate:function(L){return P.create(s.TEMPLATES[L],this._stdModNode.get(M));},_addNodeHTML:function(u,Y,L){if(L==n){u.set(o,u.get(o)+Y);}else{if(L==F){u.set(o,Y+u.get(o));}else{u.set(o,Y);}}},_addNodeRef:function(x,v,Y){var L=true,u,w;if(Y==F){var y=x.get(d);if(y){if(v instanceof c){for(u=v.size()-1;u>=0;--u){x.insertBefore(v.item(u),y);}}else{x.insertBefore(v,y);}L=false;}}else{if(Y!=n){x.set(o,B);}}if(L){if(v instanceof c){for(u=0,w=v.size();u ."+s.SECTION_CLASS_NAMES[L]);},_parseStdModHTML:function(x){var w=this._findStdModSection(x),u,Y;if(w){u=w.get(M).invoke(l);Y=w.get(G);for(var L=Y.size()-1;L>=0;L--){var v=u.get(d);if(v){u.insertBefore(Y.item(L),v);}else{u.appendChild(Y.item(L));}}return u;}return null;},_getStdModContent:function(L){return(this[L+T])?this[L+T].get(G):null;},setStdModContent:function(u,Y,L){this.set(u+i,Y,{stdModPosition:L});},getStdModNode:function(L){return this[L+T]||null;},fillHeight:function(u){if(u){var y=this.get(p),AA=[this.headerNode,this.bodyNode,this.footerNode],Y,AB=0,AC=0,x=0,w=false;for(var z=0,v=AA.length;z=0){u.setStyle(Z,x+t);}var L=this.get(U).get(g);if(L!=AB){x=x-(L-AB);u.setStyle(Z,x+t);}}}}}};A.WidgetStdMod=s;},"3.0.0",{requires:["widget"]}); \ No newline at end of file +YUI.add("widget-stdmod",function(b){var f=b.Lang,q=b.Node,x=b.UA,e=b.Widget,d="",J="hd",G="bd",j="ft",D="header",M="body",K="footer",N="fillHeight",m="stdmod",u="Node",I="Content",C="firstChild",h="childNodes",n="ownerDocument",v="contentBox",z="height",F="offsetHeight",y="auto",l="headerContentChange",B="bodyContentChange",o="footerContentChange",r="fillHeightChange",t="heightChange",O="contentUpdate",w="renderUI",E="bindUI",g="syncUI",H="_applyParsedConfig",s=b.Widget.UI_SRC;function P(L){this._stdModNode=this.get(v);b.before(this._renderUIStdMod,this,w);b.before(this._bindUIStdMod,this,E);b.before(this._syncUIStdMod,this,g);}P.HEADER=D;P.BODY=M;P.FOOTER=K;P.AFTER="after";P.BEFORE="before";P.REPLACE="replace";var k=P.HEADER,A=P.BODY,p=P.FOOTER,a=k+I,c=p+I,i=A+I;P.ATTRS={headerContent:{value:null},footerContent:{value:null},bodyContent:{value:null},fillHeight:{value:P.BODY,validator:function(L){return this._validateFillHeight(L);}}};P.HTML_PARSER={headerContent:function(L){return this._parseStdModHTML(k);},bodyContent:function(L){return this._parseStdModHTML(A);},footerContent:function(L){return this._parseStdModHTML(p);}};P.SECTION_CLASS_NAMES={header:e.getClassName(J),body:e.getClassName(G),footer:e.getClassName(j)};P.TEMPLATES={header:'
        ',body:'
        ',footer:'
        '};P.prototype={_syncUIStdMod:function(){var L=this._stdModParsed;if(!L||!L[a]){this._uiSetStdMod(k,this.get(a));}if(!L||!L[i]){this._uiSetStdMod(A,this.get(i));}if(!L||!L[c]){this._uiSetStdMod(p,this.get(c));}this._uiSetFillHeight(this.get(N));},_renderUIStdMod:function(){this._stdModNode.addClass(e.getClassName(m));this._renderStdModSections();},_renderStdModSections:function(){if(f.isValue(this.get(a))){this._renderStdMod(k);}if(f.isValue(this.get(i))){this._renderStdMod(A);}if(f.isValue(this.get(c))){this._renderStdMod(p);}},_bindUIStdMod:function(){this.after(l,this._afterHeaderChange);this.after(B,this._afterBodyChange);this.after(o,this._afterFooterChange);this.after(r,this._afterFillHeightChange);this.after(t,this._fillHeight);this.after(O,this._fillHeight);},_afterHeaderChange:function(L){if(L.src!==s){this._uiSetStdMod(k,L.newVal,L.stdModPosition);}},_afterBodyChange:function(L){if(L.src!==s){this._uiSetStdMod(A,L.newVal,L.stdModPosition);}},_afterFooterChange:function(L){if(L.src!==s){this._uiSetStdMod(p,L.newVal,L.stdModPosition);}},_afterFillHeightChange:function(L){this._uiSetFillHeight(L.newVal);},_validateFillHeight:function(L){return!L||L==P.BODY||L==P.HEADER||L==P.FOOTER;},_uiSetFillHeight:function(R){var Q=this.getStdModNode(R);var L=this._currFillNode;if(L&&Q!==L){L.setStyle(z,d);}if(Q){this._currFillNode=Q;}this._fillHeight();},_fillHeight:function(){if(this.get(N)){var L=this.get(z);if(L!=d&&L!=y){this.fillHeight(this._currFillNode);}}},_uiSetStdMod:function(S,R,L){if(f.isValue(R)){var Q=this.getStdModNode(S)||this._renderStdMod(S);this._addStdModContent(Q,R,L);this.set(S+I,this._getStdModContent(S),{src:s});}else{this._eraseStdMod(S);}this.fire(O);},_renderStdMod:function(R){var L=this.get(v),Q=this._findStdModSection(R);if(!Q){Q=this._getStdModTemplate(R);}this._insertStdModSection(L,R,Q);this[R+u]=Q;return this[R+u];},_eraseStdMod:function(Q){var L=this.getStdModNode(Q);if(L){L.remove(true);delete this[Q+u];}},_insertStdModSection:function(L,S,R){var Q=L.get(C);if(S===p||!Q){L.appendChild(R);}else{if(S===k){L.insertBefore(R,Q);}else{var T=this[p+u];if(T){L.insertBefore(R,T);}else{L.appendChild(R);}}}},_getStdModTemplate:function(L){return q.create(P.TEMPLATES[L],this._stdModNode.get(n));},_addStdModContent:function(R,Q,L){switch(L){case P.BEFORE:L=0;break;case P.AFTER:L=undefined;break;default:L=P.REPLACE;}R.insert(Q,L);},_getPreciseHeight:function(R){var L=(R)?R.get(F):0,S="getBoundingClientRect";if(R&&R.hasMethod(S)){var Q=R.invoke(S);if(Q){L=Q.bottom-Q.top;}}return L;},_findStdModSection:function(L){return this.get(v).one("> ."+P.SECTION_CLASS_NAMES[L]);},_parseStdModHTML:function(Q){var L=this._findStdModSection(Q);if(L){if(!this._stdModParsed){this._stdModParsed={};b.before(this._applyStdModParsedConfig,this,H);}this._stdModParsed[Q+I]=1;return L.get("innerHTML");}return null;},_applyStdModParsedConfig:function(S,L,R){var Q=this._stdModParsed;if(Q){Q[a]=!(a in L)&&(a in Q);Q[i]=!(i in L)&&(i in Q);Q[c]=!(c in L)&&(c in Q);}},_getStdModContent:function(L){return(this[L+u])?this[L+u].get(h):null;},setStdModContent:function(R,Q,L){this.set(R+I,Q,{stdModPosition:L});},getStdModNode:function(L){return this[L+u]||null;},fillHeight:function(Q){if(Q){var V=this.get(v),W=[this.headerNode,this.bodyNode,this.footerNode],L,X,Y=0,T=0,S=false;for(var U=0,R=W.length;U=0){Q.set(F,T);}}}}}};b.WidgetStdMod=P;},"3.3.0",{requires:["base-build","widget"]}); diff --git a/include/javascript/yui3/build/widget/widget-stdmod.js b/include/javascript/yui3/build/widget/widget-stdmod.js index 5820d996..c98c63cf 100644 --- a/include/javascript/yui3/build/widget/widget-stdmod.js +++ b/include/javascript/yui3/build/widget/widget-stdmod.js @@ -1,21 +1,28 @@ /* - Copyright (c) 2009, Yahoo! Inc. All rights reserved. + Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 3.0.0 - build: 1549 + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 */ -YUI.add('widget-stdmod',function(Y){var L=Y.Lang,Node=Y.Node,NodeList=Y.NodeList,UA=Y.UA,Widget=Y.Widget,EMPTY="",HD="hd",BD="bd",FT="ft",HEADER="header",BODY="body",FOOTER="footer",FILL_HEIGHT="fillHeight",STDMOD="stdmod",PX="px",NODE_SUFFIX="Node",CONTENT_SUFFIX="Content",INNER_HTML="innerHTML",FIRST_CHILD="firstChild",CHILD_NODES="childNodes",CREATE_DOCUMENT_FRAGMENT="createDocumentFragment",OWNER_DOCUMENT="ownerDocument",CONTENT_BOX="contentBox",BOUNDING_BOX="boundingBox",HEIGHT="height",OFFSET_HEIGHT="offsetHeight",AUTO="auto",HeaderChange="headerContentChange",BodyChange="bodyContentChange",FooterChange="footerContentChange",FillHeightChange="fillHeightChange",HeightChange="HeightChange",ContentUpdate="contentUpdate",RENDERUI="renderUI",BINDUI="bindUI",SYNCUI="syncUI",UI=Y.Widget.UI_SRC;function StdMod(config){this._stdModNode=this.get(CONTENT_BOX);Y.after(this._renderUIStdMod,this,RENDERUI);Y.after(this._bindUIStdMod,this,BINDUI);Y.after(this._syncUIStdMod,this,SYNCUI);} -StdMod.HEADER=HEADER;StdMod.BODY=BODY;StdMod.FOOTER=FOOTER;StdMod.AFTER="after";StdMod.BEFORE="before";StdMod.REPLACE="replace";var STD_HEADER=StdMod.HEADER,STD_BODY=StdMod.BODY,STD_FOOTER=StdMod.FOOTER,AFTER=StdMod.AFTER,BEFORE=StdMod.BEFORE;StdMod.ATTRS={headerContent:{value:null},footerContent:{value:null},bodyContent:{value:null},fillHeight:{value:StdMod.BODY,validator:function(val){return this._validateFillHeight(val);}}};StdMod.HTML_PARSER={headerContent:function(contentBox){return this._parseStdModHTML(STD_HEADER);},bodyContent:function(contentBox){return this._parseStdModHTML(STD_BODY);},footerContent:function(contentBox){return this._parseStdModHTML(STD_FOOTER);}};StdMod.SECTION_CLASS_NAMES={header:Widget.getClassName(HD),body:Widget.getClassName(BD),footer:Widget.getClassName(FT)};StdMod.TEMPLATES={header:'
        ',body:'
        ',footer:'
        '};StdMod.prototype={_syncUIStdMod:function(){this._uiSetStdMod(STD_HEADER,this.get(STD_HEADER+CONTENT_SUFFIX));this._uiSetStdMod(STD_BODY,this.get(STD_BODY+CONTENT_SUFFIX));this._uiSetStdMod(STD_FOOTER,this.get(STD_FOOTER+CONTENT_SUFFIX));this._uiSetFillHeight(this.get(FILL_HEIGHT));},_renderUIStdMod:function(){this._stdModNode.addClass(Widget.getClassName(STDMOD));},_bindUIStdMod:function(){this.after(HeaderChange,this._afterHeaderChange);this.after(BodyChange,this._afterBodyChange);this.after(FooterChange,this._afterFooterChange);this.after(FillHeightChange,this._afterFillHeightChange);this.after(HeightChange,this._fillHeight);this.after(ContentUpdate,this._fillHeight);},_afterHeaderChange:function(e){if(e.src!==UI){this._uiSetStdMod(STD_HEADER,e.newVal,e.stdModPosition);}},_afterBodyChange:function(e){if(e.src!==UI){this._uiSetStdMod(STD_BODY,e.newVal,e.stdModPosition);}},_afterFooterChange:function(e){if(e.src!==UI){this._uiSetStdMod(STD_FOOTER,e.newVal,e.stdModPosition);}},_afterFillHeightChange:function(e){this._uiSetFillHeight(e.newVal);},_validateFillHeight:function(val){return!val||val==StdMod.BODY||val==StdMod.HEADER||val==StdMod.FOOTER;},_uiSetFillHeight:function(fillSection){var fillNode=this.getStdModNode(fillSection);var currNode=this._currFillNode;if(currNode&&fillNode!==currNode){currNode.setStyle(HEIGHT,EMPTY);} +YUI.add('widget-stdmod',function(Y){var L=Y.Lang,Node=Y.Node,UA=Y.UA,Widget=Y.Widget,EMPTY="",HD="hd",BD="bd",FT="ft",HEADER="header",BODY="body",FOOTER="footer",FILL_HEIGHT="fillHeight",STDMOD="stdmod",NODE_SUFFIX="Node",CONTENT_SUFFIX="Content",FIRST_CHILD="firstChild",CHILD_NODES="childNodes",OWNER_DOCUMENT="ownerDocument",CONTENT_BOX="contentBox",HEIGHT="height",OFFSET_HEIGHT="offsetHeight",AUTO="auto",HeaderChange="headerContentChange",BodyChange="bodyContentChange",FooterChange="footerContentChange",FillHeightChange="fillHeightChange",HeightChange="heightChange",ContentUpdate="contentUpdate",RENDERUI="renderUI",BINDUI="bindUI",SYNCUI="syncUI",APPLY_PARSED_CONFIG="_applyParsedConfig",UI=Y.Widget.UI_SRC;function StdMod(config){this._stdModNode=this.get(CONTENT_BOX);Y.before(this._renderUIStdMod,this,RENDERUI);Y.before(this._bindUIStdMod,this,BINDUI);Y.before(this._syncUIStdMod,this,SYNCUI);} +StdMod.HEADER=HEADER;StdMod.BODY=BODY;StdMod.FOOTER=FOOTER;StdMod.AFTER="after";StdMod.BEFORE="before";StdMod.REPLACE="replace";var STD_HEADER=StdMod.HEADER,STD_BODY=StdMod.BODY,STD_FOOTER=StdMod.FOOTER,HEADER_CONTENT=STD_HEADER+CONTENT_SUFFIX,FOOTER_CONTENT=STD_FOOTER+CONTENT_SUFFIX,BODY_CONTENT=STD_BODY+CONTENT_SUFFIX;StdMod.ATTRS={headerContent:{value:null},footerContent:{value:null},bodyContent:{value:null},fillHeight:{value:StdMod.BODY,validator:function(val){return this._validateFillHeight(val);}}};StdMod.HTML_PARSER={headerContent:function(contentBox){return this._parseStdModHTML(STD_HEADER);},bodyContent:function(contentBox){return this._parseStdModHTML(STD_BODY);},footerContent:function(contentBox){return this._parseStdModHTML(STD_FOOTER);}};StdMod.SECTION_CLASS_NAMES={header:Widget.getClassName(HD),body:Widget.getClassName(BD),footer:Widget.getClassName(FT)};StdMod.TEMPLATES={header:'
        ',body:'
        ',footer:'
        '};StdMod.prototype={_syncUIStdMod:function(){var stdModParsed=this._stdModParsed;if(!stdModParsed||!stdModParsed[HEADER_CONTENT]){this._uiSetStdMod(STD_HEADER,this.get(HEADER_CONTENT));} +if(!stdModParsed||!stdModParsed[BODY_CONTENT]){this._uiSetStdMod(STD_BODY,this.get(BODY_CONTENT));} +if(!stdModParsed||!stdModParsed[FOOTER_CONTENT]){this._uiSetStdMod(STD_FOOTER,this.get(FOOTER_CONTENT));} +this._uiSetFillHeight(this.get(FILL_HEIGHT));},_renderUIStdMod:function(){this._stdModNode.addClass(Widget.getClassName(STDMOD));this._renderStdModSections();},_renderStdModSections:function(){if(L.isValue(this.get(HEADER_CONTENT))){this._renderStdMod(STD_HEADER);} +if(L.isValue(this.get(BODY_CONTENT))){this._renderStdMod(STD_BODY);} +if(L.isValue(this.get(FOOTER_CONTENT))){this._renderStdMod(STD_FOOTER);}},_bindUIStdMod:function(){this.after(HeaderChange,this._afterHeaderChange);this.after(BodyChange,this._afterBodyChange);this.after(FooterChange,this._afterFooterChange);this.after(FillHeightChange,this._afterFillHeightChange);this.after(HeightChange,this._fillHeight);this.after(ContentUpdate,this._fillHeight);},_afterHeaderChange:function(e){if(e.src!==UI){this._uiSetStdMod(STD_HEADER,e.newVal,e.stdModPosition);}},_afterBodyChange:function(e){if(e.src!==UI){this._uiSetStdMod(STD_BODY,e.newVal,e.stdModPosition);}},_afterFooterChange:function(e){if(e.src!==UI){this._uiSetStdMod(STD_FOOTER,e.newVal,e.stdModPosition);}},_afterFillHeightChange:function(e){this._uiSetFillHeight(e.newVal);},_validateFillHeight:function(val){return!val||val==StdMod.BODY||val==StdMod.HEADER||val==StdMod.FOOTER;},_uiSetFillHeight:function(fillSection){var fillNode=this.getStdModNode(fillSection);var currNode=this._currFillNode;if(currNode&&fillNode!==currNode){currNode.setStyle(HEIGHT,EMPTY);} if(fillNode){this._currFillNode=fillNode;} -this._fillHeight();},_fillHeight:function(){if(this.get(FILL_HEIGHT)){var height=this.get(HEIGHT);if(height!=EMPTY&&height!=AUTO){this.fillHeight(this._currFillNode);}}},_uiSetStdMod:function(section,content,where){if(content){var node=this.getStdModNode(section)||this._renderStdMod(section);if(content instanceof Node||content instanceof NodeList){this._addNodeRef(node,content,where);}else{this._addNodeHTML(node,content,where);} -this.set(section+CONTENT_SUFFIX,this._getStdModContent(section),{src:UI});this.fire(ContentUpdate);}},_renderStdMod:function(section){var contentBox=this.get(CONTENT_BOX),sectionNode=this._findStdModSection(section);if(!sectionNode){sectionNode=this._getStdModTemplate(section);} -this._insertStdModSection(contentBox,section,sectionNode);this[section+NODE_SUFFIX]=sectionNode;return this[section+NODE_SUFFIX];},_insertStdModSection:function(contentBox,section,sectionNode){var fc=contentBox.get(FIRST_CHILD);if(section===STD_FOOTER||!fc){contentBox.appendChild(sectionNode);}else{if(section===STD_HEADER){contentBox.insertBefore(sectionNode,fc);}else{var footer=this[STD_FOOTER+NODE_SUFFIX];if(footer){contentBox.insertBefore(sectionNode,footer);}else{contentBox.appendChild(sectionNode);}}}},_getStdModTemplate:function(section){return Node.create(StdMod.TEMPLATES[section],this._stdModNode.get(OWNER_DOCUMENT));},_addNodeHTML:function(node,html,where){if(where==AFTER){node.set(INNER_HTML,node.get(INNER_HTML)+html);}else if(where==BEFORE){node.set(INNER_HTML,html+node.get(INNER_HTML));}else{node.set(INNER_HTML,html);}},_addNodeRef:function(node,children,where){var append=true,i,s;if(where==BEFORE){var n=node.get(FIRST_CHILD);if(n){if(children instanceof NodeList){for(i=children.size()-1;i>=0;--i){node.insertBefore(children.item(i),n);}}else{node.insertBefore(children,n);} -append=false;}}else if(where!=AFTER){node.set(INNER_HTML,EMPTY);} -if(append){if(children instanceof NodeList){for(i=0,s=children.size();i ."+StdMod.SECTION_CLASS_NAMES[section]);},_parseStdModHTML:function(section){var node=this._findStdModSection(section),docFrag,children;if(node){docFrag=node.get(OWNER_DOCUMENT).invoke(CREATE_DOCUMENT_FRAGMENT);children=node.get(CHILD_NODES);for(var i=children.size()-1;i>=0;i--){var fc=docFrag.get(FIRST_CHILD);if(fc){docFrag.insertBefore(children.item(i),fc);}else{docFrag.appendChild(children.item(i));}} -return docFrag;} -return null;},_getStdModContent:function(section){return(this[section+NODE_SUFFIX])?this[section+NODE_SUFFIX].get(CHILD_NODES):null;},setStdModContent:function(section,content,where){this.set(section+CONTENT_SUFFIX,content,{stdModPosition:where});},getStdModNode:function(section){return this[section+NODE_SUFFIX]||null;},fillHeight:function(node){if(node){var boundingBox=this.get(BOUNDING_BOX),stdModNodes=[this.headerNode,this.bodyNode,this.footerNode],stdModNode,total=0,filled=0,remaining=0,validNode=false;for(var i=0,l=stdModNodes.length;i=0){node.setStyle(HEIGHT,remaining+PX);} -var offsetHeight=this.get(CONTENT_BOX).get(OFFSET_HEIGHT);if(offsetHeight!=total){remaining=remaining-(offsetHeight-total);node.setStyle(HEIGHT,remaining+PX);}}}}}};Y.WidgetStdMod=StdMod;},'3.0.0',{requires:['widget']}); \ No newline at end of file +this._fillHeight();},_fillHeight:function(){if(this.get(FILL_HEIGHT)){var height=this.get(HEIGHT);if(height!=EMPTY&&height!=AUTO){this.fillHeight(this._currFillNode);}}},_uiSetStdMod:function(section,content,where){if(L.isValue(content)){var node=this.getStdModNode(section)||this._renderStdMod(section);this._addStdModContent(node,content,where);this.set(section+CONTENT_SUFFIX,this._getStdModContent(section),{src:UI});}else{this._eraseStdMod(section);} +this.fire(ContentUpdate);},_renderStdMod:function(section){var contentBox=this.get(CONTENT_BOX),sectionNode=this._findStdModSection(section);if(!sectionNode){sectionNode=this._getStdModTemplate(section);} +this._insertStdModSection(contentBox,section,sectionNode);this[section+NODE_SUFFIX]=sectionNode;return this[section+NODE_SUFFIX];},_eraseStdMod:function(section){var sectionNode=this.getStdModNode(section);if(sectionNode){sectionNode.remove(true);delete this[section+NODE_SUFFIX];}},_insertStdModSection:function(contentBox,section,sectionNode){var fc=contentBox.get(FIRST_CHILD);if(section===STD_FOOTER||!fc){contentBox.appendChild(sectionNode);}else{if(section===STD_HEADER){contentBox.insertBefore(sectionNode,fc);}else{var footer=this[STD_FOOTER+NODE_SUFFIX];if(footer){contentBox.insertBefore(sectionNode,footer);}else{contentBox.appendChild(sectionNode);}}}},_getStdModTemplate:function(section){return Node.create(StdMod.TEMPLATES[section],this._stdModNode.get(OWNER_DOCUMENT));},_addStdModContent:function(node,children,where){switch(where){case StdMod.BEFORE:where=0;break;case StdMod.AFTER:where=undefined;break;default:where=StdMod.REPLACE;} +node.insert(children,where);},_getPreciseHeight:function(node){var height=(node)?node.get(OFFSET_HEIGHT):0,getBCR="getBoundingClientRect";if(node&&node.hasMethod(getBCR)){var preciseRegion=node.invoke(getBCR);if(preciseRegion){height=preciseRegion.bottom-preciseRegion.top;}} +return height;},_findStdModSection:function(section){return this.get(CONTENT_BOX).one("> ."+StdMod.SECTION_CLASS_NAMES[section]);},_parseStdModHTML:function(section){var node=this._findStdModSection(section);if(node){if(!this._stdModParsed){this._stdModParsed={};Y.before(this._applyStdModParsedConfig,this,APPLY_PARSED_CONFIG);} +this._stdModParsed[section+CONTENT_SUFFIX]=1;return node.get("innerHTML");} +return null;},_applyStdModParsedConfig:function(node,cfg,parsedCfg){var parsed=this._stdModParsed;if(parsed){parsed[HEADER_CONTENT]=!(HEADER_CONTENT in cfg)&&(HEADER_CONTENT in parsed);parsed[BODY_CONTENT]=!(BODY_CONTENT in cfg)&&(BODY_CONTENT in parsed);parsed[FOOTER_CONTENT]=!(FOOTER_CONTENT in cfg)&&(FOOTER_CONTENT in parsed);}},_getStdModContent:function(section){return(this[section+NODE_SUFFIX])?this[section+NODE_SUFFIX].get(CHILD_NODES):null;},setStdModContent:function(section,content,where){this.set(section+CONTENT_SUFFIX,content,{stdModPosition:where});},getStdModNode:function(section){return this[section+NODE_SUFFIX]||null;},fillHeight:function(node){if(node){var contentBox=this.get(CONTENT_BOX),stdModNodes=[this.headerNode,this.bodyNode,this.footerNode],stdModNode,cbContentHeight,filled=0,remaining=0,validNode=false;for(var i=0,l=stdModNodes.length;i=0){node.set(OFFSET_HEIGHT,remaining);}}}}}};Y.WidgetStdMod=StdMod;},'3.3.0',{requires:['base-build','widget']}); diff --git a/include/javascript/yui3/build/widget/widget-uievents-min.js b/include/javascript/yui3/build/widget/widget-uievents-min.js new file mode 100644 index 00000000..7fd8adf7 --- /dev/null +++ b/include/javascript/yui3/build/widget/widget-uievents-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("widget-uievents",function(g){var f="boundingBox",e=g.Widget,d="render",a=g.Lang,c=":",b=g.Widget._uievts=g.Widget._uievts||{};g.mix(e.prototype,{_destroyUIEvents:function(){var h=g.stamp(this,true);g.each(b,function(j,i){if(j.instances[h]){delete j.instances[h];if(g.Object.isEmpty(j.instances)){j.handle.detach();if(b[i]){delete b[i];}}}});},UI_EVENTS:g.Node.DOM_EVENTS,_getUIEventNode:function(){return this.get(f);},_createUIEvent:function(i){var l=this._getUIEventNode(),h=(g.stamp(l)+i),k=b[h],j;if(!k){j=l.delegate(i,function(m){var n=e.getByNode(this);n.fire(m.type,{domEvent:m});},"."+g.Widget.getClassName());b[h]=k={instances:{},handle:j};}k.instances[g.stamp(this)]=1;},_getUIEvent:function(j){if(a.isString(j)){var k=this.parseType(j)[1],h,i;if(k){h=k.indexOf(c);if(h>-1){k=k.substring(h+c.length);}if(this.UI_EVENTS[k]){i=k;}}return i;}},_initUIEvent:function(i){var j=this._getUIEvent(i),h=this._uiEvtsInitQueue||{};if(j&&!h[j]){this._uiEvtsInitQueue=h[j]=1;this.after(d,function(){this._createUIEvent(j);delete this._uiEvtsInitQueue[j];});}},on:function(h){this._initUIEvent(h);return e.superclass.on.apply(this,arguments);},publish:function(i,h){var j=this._getUIEvent(i);if(j&&h&&h.defaultFn){this._initUIEvent(j);}return e.superclass.publish.apply(this,arguments);}},true);},"3.3.0",{requires:["widget-base","node-event-delegate"]}); diff --git a/include/javascript/yui3/build/widget/widget-uievents.js b/include/javascript/yui3/build/widget/widget-uievents.js new file mode 100644 index 00000000..a42d9b03 --- /dev/null +++ b/include/javascript/yui3/build/widget/widget-uievents.js @@ -0,0 +1,12 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('widget-uievents',function(Y){var BOUNDING_BOX="boundingBox",Widget=Y.Widget,RENDER="render",L=Y.Lang,EVENT_PREFIX_DELIMITER=":",_uievts=Y.Widget._uievts=Y.Widget._uievts||{};Y.mix(Widget.prototype,{_destroyUIEvents:function(){var widgetGuid=Y.stamp(this,true);Y.each(_uievts,function(info,key){if(info.instances[widgetGuid]){delete info.instances[widgetGuid];if(Y.Object.isEmpty(info.instances)){info.handle.detach();if(_uievts[key]){delete _uievts[key];}}}});},UI_EVENTS:Y.Node.DOM_EVENTS,_getUIEventNode:function(){return this.get(BOUNDING_BOX);},_createUIEvent:function(type){var uiEvtNode=this._getUIEventNode(),key=(Y.stamp(uiEvtNode)+type),info=_uievts[key],handle;if(!info){handle=uiEvtNode.delegate(type,function(evt){var widget=Widget.getByNode(this);widget.fire(evt.type,{domEvent:evt});},"."+Y.Widget.getClassName());_uievts[key]=info={instances:{},handle:handle};} +info.instances[Y.stamp(this)]=1;},_getUIEvent:function(type){if(L.isString(type)){var sType=this.parseType(type)[1],iDelim,returnVal;if(sType){iDelim=sType.indexOf(EVENT_PREFIX_DELIMITER);if(iDelim>-1){sType=sType.substring(iDelim+EVENT_PREFIX_DELIMITER.length);} +if(this.UI_EVENTS[sType]){returnVal=sType;}} +return returnVal;}},_initUIEvent:function(type){var sType=this._getUIEvent(type),queue=this._uiEvtsInitQueue||{};if(sType&&!queue[sType]){this._uiEvtsInitQueue=queue[sType]=1;this.after(RENDER,function(){this._createUIEvent(sType);delete this._uiEvtsInitQueue[sType];});}},on:function(type){this._initUIEvent(type);return Widget.superclass.on.apply(this,arguments);},publish:function(type,config){var sType=this._getUIEvent(type);if(sType&&config&&config.defaultFn){this._initUIEvent(sType);} +return Widget.superclass.publish.apply(this,arguments);}},true);},'3.3.0',{requires:['widget-base','node-event-delegate']}); diff --git a/include/javascript/yui3/build/widget/widget.js b/include/javascript/yui3/build/widget/widget.js index 38d026d1..17a87caa 100644 --- a/include/javascript/yui3/build/widget/widget.js +++ b/include/javascript/yui3/build/widget/widget.js @@ -1,36 +1,29 @@ /* - Copyright (c) 2009, Yahoo! Inc. All rights reserved. + Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 3.0.0 - build: 1549 + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 */ -YUI.add('widget',function(Y){var L=Y.Lang,O=Y.Object,Node=Y.Node,ClassNameManager=Y.ClassNameManager,WIDGET="widget",CONTENT="content",VISIBLE="visible",HIDDEN="hidden",DISABLED="disabled",FOCUSED="focused",WIDTH="width",HEIGHT="height",EMPTY="",HYPHEN="-",BOUNDING_BOX="boundingBox",CONTENT_BOX="contentBox",PARENT_NODE="parentNode",FIRST_CHILD="firstChild",OWNER_DOCUMENT="ownerDocument",BODY="body",TAB_INDEX="tabIndex",LOCALE="locale",INIT_VALUE="initValue",ID="id",RENDER="render",RENDERED="rendered",DESTROYED="destroyed",ContentUpdate="contentUpdate",_instances={};function Widget(config){this._yuid=Y.guid(WIDGET);this._strings={};Widget.superclass.constructor.apply(this,arguments);} -Widget._buildCfg={aggregates:["HTML_PARSER"]};Widget.NAME=WIDGET;Widget.UI_SRC="ui";var UI=Widget.UI_SRC;Widget.ATTRS={rendered:{value:false,readOnly:true},boundingBox:{value:null,setter:function(node){return this._setBoundingBox(node);},writeOnce:true},contentBox:{value:null,setter:function(node){return this._setContentBox(node);},writeOnce:true},tabIndex:{value:0,validator:function(val){return(L.isNumber(val)||L.isNull(val));}},focused:{value:false,readOnly:true},disabled:{value:false},visible:{value:true},height:{value:EMPTY},width:{value:EMPTY},moveStyles:{value:false},locale:{value:"en"},strings:{setter:function(val){return this._setStrings(val,this.get(LOCALE));},getter:function(){return this.getStrings(this.get(LOCALE));}}};Widget._NAME_LOWERCASE=Widget.NAME.toLowerCase();Widget.getClassName=function(){var args=Y.Array(arguments,0,true);args.splice(0,0,this._NAME_LOWERCASE);return ClassNameManager.getClassName.apply(ClassNameManager,args);};Widget.getByNode=function(node){var widget,bbMarker=Widget.getClassName();node=Node.get(node);if(node){node=(node.hasClass(bbMarker))?node:node.ancestor("."+bbMarker);if(node){widget=_instances[node.get(ID)];}} -return widget||null;};Widget.HTML_PARSER={};Y.extend(Widget,Y.Base,{getClassName:function(){var args=Y.Array(arguments,0,true);args.splice(0,0,this._name);return ClassNameManager.getClassName.apply(ClassNameManager,args);},initializer:function(config){this.publish(ContentUpdate,{preventable:false});this._name=this.constructor.NAME.toLowerCase();var nodeId=this.get(BOUNDING_BOX).get(ID);if(nodeId){_instances[nodeId]=this;} -var htmlConfig=this._parseHTML(this.get(CONTENT_BOX));if(htmlConfig){Y.aggregate(config,htmlConfig,false);}},destructor:function(){var boundingBox=this.get(BOUNDING_BOX);Y.Event.purgeElement(boundingBox,true);var nodeId=boundingBox.get(ID);if(nodeId&&nodeId in _instances){delete _instances[nodeId];}},render:function(parentNode){if(this.get(DESTROYED)){return;} -if(!this.get(RENDERED)){this.publish(RENDER,{queuable:false,defaultFn:this._defRenderFn});parentNode=(parentNode)?Node.get(parentNode):null;if(parentNode&&!parentNode.inDoc()){parentNode=null;} -this.fire(RENDER,{parentNode:parentNode});} -return this;},_defRenderFn:function(e){this._renderUI(e.parentNode);this._bindUI();this._syncUI();this.renderer();this._set(RENDERED,true);},renderer:function(){this.renderUI();this.bindUI();this.syncUI();},bindUI:function(){},renderUI:function(){},syncUI:function(){},hide:function(){return this.set(VISIBLE,false);},show:function(){return this.set(VISIBLE,true);},focus:function(){return this._set(FOCUSED,true);},blur:function(){return this._set(FOCUSED,false);},enable:function(){return this.set(DISABLED,false);},disable:function(){return this.set(DISABLED,true);},_parseHTML:function(node){var schema=this._getHtmlParser(),data,val;if(schema&&node&&node.hasChildNodes()){O.each(schema,function(v,k,o){val=null;if(L.isFunction(v)){val=v.call(this,node);}else{if(L.isArray(v)){val=node.queryAll(v[0]);}else{val=node.query(v);}} -if(val!==null&&val!==undefined){data=data||{};data[k]=val;}},this);} -return data;},_moveStyles:function(nodeFrom,nodeTo){var styles=this.WRAP_STYLES,pos=nodeFrom.getStyle('position'),contentBox=this.get(CONTENT_BOX),xy=[0,0],h,w;if(!this.get('height')){h=contentBox.get('offsetHeight');} -if(!this.get('width')){w=contentBox.get('offsetWidth');} -if(pos==='absolute'){xy=nodeFrom.getXY();nodeTo.setStyles({right:'auto',bottom:'auto'});nodeFrom.setStyles({right:'auto',bottom:'auto'});} -Y.each(styles,function(v,k){var s=nodeFrom.getStyle(k);nodeTo.setStyle(k,s);if(v===false){nodeFrom.setStyle(k,'');}else{nodeFrom.setStyle(k,v);}});if(pos==='absolute'){nodeTo.setXY(xy);} -if(h){this.set('height',h);} -if(w){this.set('width',w);}},_renderBox:function(parentNode){var contentBox=this.get(CONTENT_BOX),boundingBox=this.get(BOUNDING_BOX),doc=boundingBox.get(OWNER_DOCUMENT)||contentBox.get(OWNER_DOCUMENT),body;if(!boundingBox.compareTo(contentBox.get(PARENT_NODE))){if(this.get('moveStyles')){this._moveStyles(contentBox,boundingBox);} -if(contentBox.inDoc(doc)){contentBox.get(PARENT_NODE).replaceChild(boundingBox,contentBox);} +YUI.add('widget-base',function(Y){var L=Y.Lang,Node=Y.Node,ClassNameManager=Y.ClassNameManager,_getClassName=ClassNameManager.getClassName,_getWidgetClassName,_toInitialCap=Y.cached(function(str){return str.substring(0,1).toUpperCase()+str.substring(1);}),CONTENT="content",VISIBLE="visible",HIDDEN="hidden",DISABLED="disabled",FOCUSED="focused",WIDTH="width",HEIGHT="height",BOUNDING_BOX="boundingBox",CONTENT_BOX="contentBox",PARENT_NODE="parentNode",OWNER_DOCUMENT="ownerDocument",AUTO="auto",SRC_NODE="srcNode",BODY="body",TAB_INDEX="tabIndex",ID="id",RENDER="render",RENDERED="rendered",DESTROYED="destroyed",STRINGS="strings",DIV="
        ",CHANGE="Change",LOADING="loading",_UISET="_uiSet",EMPTY_STR="",EMPTY_FN=function(){},TRUE=true,FALSE=false,UI,ATTRS={},UI_ATTRS=[VISIBLE,DISABLED,HEIGHT,WIDTH,FOCUSED],WEBKIT=Y.UA.webkit,_instances={};function Widget(config){var widget=this,parentNode,render,constructor=widget.constructor;widget._strs={};widget._cssPrefix=constructor.CSS_PREFIX||_getClassName(constructor.NAME.toLowerCase());Widget.superclass.constructor.apply(widget,arguments);render=widget.get(RENDER);if(render){if(render!==TRUE){parentNode=render;} +widget.render(parentNode);}} +Widget.NAME="widget";UI=Widget.UI_SRC="ui";Widget.ATTRS=ATTRS;ATTRS[ID]={valueFn:"_guid",writeOnce:TRUE};ATTRS[RENDERED]={value:FALSE,readOnly:TRUE};ATTRS[BOUNDING_BOX]={value:null,setter:"_setBB",writeOnce:TRUE};ATTRS[CONTENT_BOX]={valueFn:"_defaultCB",setter:"_setCB",writeOnce:TRUE};ATTRS[TAB_INDEX]={value:null,validator:"_validTabIndex"};ATTRS[FOCUSED]={value:FALSE,readOnly:TRUE};ATTRS[DISABLED]={value:FALSE};ATTRS[VISIBLE]={value:TRUE};ATTRS[HEIGHT]={value:EMPTY_STR};ATTRS[WIDTH]={value:EMPTY_STR};ATTRS[STRINGS]={value:{},setter:"_strSetter",getter:"_strGetter"};ATTRS[RENDER]={value:FALSE,writeOnce:TRUE};Widget.CSS_PREFIX=_getClassName(Widget.NAME.toLowerCase());Widget.getClassName=function(){return _getClassName.apply(ClassNameManager,[Widget.CSS_PREFIX].concat(Y.Array(arguments),true));};_getWidgetClassName=Widget.getClassName;Widget.getByNode=function(node){var widget,widgetMarker=_getWidgetClassName();node=Node.one(node);if(node){node=node.ancestor("."+widgetMarker,true);if(node){widget=_instances[Y.stamp(node,TRUE)];}} +return widget||null;};Y.extend(Widget,Y.Base,{getClassName:function(){return _getClassName.apply(ClassNameManager,[this._cssPrefix].concat(Y.Array(arguments),true));},initializer:function(config){_instances[Y.stamp(this.get(BOUNDING_BOX))]=this;if(this._applyParser){this._applyParser(config);}},destructor:function(){var boundingBox=this.get(BOUNDING_BOX),contentBox=this.get(CONTENT_BOX),bbGuid=Y.stamp(boundingBox,TRUE);if(bbGuid in _instances){delete _instances[bbGuid];} +if(this.UI_EVENTS){this._destroyUIEvents();} +this._unbindUI(boundingBox);if(contentBox){contentBox.remove(TRUE);} +boundingBox.remove(TRUE);},render:function(parentNode){if(!this.get(DESTROYED)&&!this.get(RENDERED)){this.publish(RENDER,{queuable:FALSE,fireOnce:TRUE,defaultTargetOnly:TRUE,defaultFn:this._defRenderFn});this.fire(RENDER,{parentNode:(parentNode)?Node.one(parentNode):null});} +return this;},_defRenderFn:function(e){this._parentNode=e.parentNode;this.renderer();this._set(RENDERED,TRUE);this._removeLoadingClassNames();},renderer:function(){var widget=this;widget._renderUI();widget.renderUI();widget._bindUI();widget.bindUI();widget._syncUI();widget.syncUI();},bindUI:EMPTY_FN,renderUI:EMPTY_FN,syncUI:EMPTY_FN,hide:function(){return this.set(VISIBLE,FALSE);},show:function(){return this.set(VISIBLE,TRUE);},focus:function(){return this._set(FOCUSED,TRUE);},blur:function(){return this._set(FOCUSED,FALSE);},enable:function(){return this.set(DISABLED,FALSE);},disable:function(){return this.set(DISABLED,TRUE);},_uiSizeCB:function(expand){this.get(CONTENT_BOX).toggleClass(_getWidgetClassName(CONTENT,"expanded"),expand);},_renderBox:function(parentNode){var widget=this,contentBox=widget.get(CONTENT_BOX),boundingBox=widget.get(BOUNDING_BOX),srcNode=widget.get(SRC_NODE),defParentNode=widget.DEF_PARENT_NODE,doc=(srcNode&&srcNode.get(OWNER_DOCUMENT))||boundingBox.get(OWNER_DOCUMENT)||contentBox.get(OWNER_DOCUMENT);if(srcNode&&!srcNode.compareTo(contentBox)&&!contentBox.inDoc(doc)){srcNode.replace(contentBox);} +if(!boundingBox.compareTo(contentBox.get(PARENT_NODE))&&!boundingBox.compareTo(contentBox)){if(contentBox.inDoc(doc)){contentBox.replace(boundingBox);} boundingBox.appendChild(contentBox);} -if(!boundingBox.inDoc(doc)&&!parentNode){body=Node.get(BODY);if(body.get(FIRST_CHILD)){body.insertBefore(boundingBox,body.get(FIRST_CHILD));}else{body.appendChild(boundingBox);}}else{if(parentNode&&!parentNode.compareTo(boundingBox.get(PARENT_NODE))){parentNode.appendChild(boundingBox);}}},_setBoundingBox:function(node){return this._setBox(node,this.BOUNDING_TEMPLATE);},_setContentBox:function(node){return this._setBox(node,this.CONTENT_TEMPLATE);},_setBox:function(node,template){node=Node.get(node)||Node.create(template);var sid=Y.stamp(node);if(!node.get(ID)){node.set(ID,sid);} -return node;},_renderUI:function(parentNode){this._renderBoxClassNames();this._renderBox(parentNode);},_renderBoxClassNames:function(){var classes=this._getClasses(),boundingBox=this.get(BOUNDING_BOX),contentBox=this.get(CONTENT_BOX),name,i;boundingBox.addClass(Widget.getClassName());for(i=classes.length-3;i>=0;i--){name=classes[i].NAME;if(name){boundingBox.addClass(ClassNameManager.getClassName(name.toLowerCase()));}} -contentBox.addClass(this.getClassName(CONTENT));},_bindUI:function(){this.after('visibleChange',this._afterVisibleChange);this.after('disabledChange',this._afterDisabledChange);this.after('heightChange',this._afterHeightChange);this.after('widthChange',this._afterWidthChange);this.after('focusedChange',this._afterFocusedChange);this._bindDOMListeners();},_bindDOMListeners:function(){var oDocument=this.get(BOUNDING_BOX).get("ownerDocument");oDocument.on("focus",this._onFocus,this);if(Y.UA.webkit){oDocument.on("mousedown",this._onDocMouseDown,this);}},_syncUI:function(){this._uiSetVisible(this.get(VISIBLE));this._uiSetDisabled(this.get(DISABLED));this._uiSetHeight(this.get(HEIGHT));this._uiSetWidth(this.get(WIDTH));this._uiSetFocused(this.get(FOCUSED));this._uiSetTabIndex(this.get(TAB_INDEX));},_uiSetHeight:function(val){if(L.isNumber(val)){val=val+this.DEF_UNIT;} -this.get(BOUNDING_BOX).setStyle(HEIGHT,val);},_uiSetWidth:function(val){if(L.isNumber(val)){val=val+this.DEF_UNIT;} -this.get(BOUNDING_BOX).setStyle(WIDTH,val);},_uiSetVisible:function(val){var box=this.get(BOUNDING_BOX),sClassName=this.getClassName(HIDDEN);if(val===true){box.removeClass(sClassName);}else{box.addClass(sClassName);}},_uiSetDisabled:function(val){var box=this.get(BOUNDING_BOX),sClassName=this.getClassName(DISABLED);if(val===true){box.addClass(sClassName);}else{box.removeClass(sClassName);}},_uiSetTabIndex:function(index){var boundingBox=this.get(BOUNDING_BOX);if(L.isNumber(index)){boundingBox.set(TAB_INDEX,index);} -else{boundingBox.removeAttribute(TAB_INDEX);}},_uiSetFocused:function(val,src){var box=this.get(BOUNDING_BOX),sClassName=this.getClassName(FOCUSED);if(val===true){box.addClass(sClassName);if(src!==UI){box.focus();}}else{box.removeClass(sClassName);if(src!==UI){box.blur();}}},_afterVisibleChange:function(evt){this._uiSetVisible(evt.newVal);},_afterDisabledChange:function(evt){this._uiSetDisabled(evt.newVal);},_afterHeightChange:function(evt){this._uiSetHeight(evt.newVal);},_afterWidthChange:function(evt){this._uiSetWidth(evt.newVal);},_afterFocusedChange:function(evt){this._uiSetFocused(evt.newVal,evt.src);},_onDocMouseDown:function(evt){if(this._hasDOMFocus){this._onFocus(evt);}},_onFocus:function(evt){var target=evt.target,boundingBox=this.get(BOUNDING_BOX),bFocused=(boundingBox.compareTo(target)||boundingBox.contains(target));this._hasDOMFocus=bFocused;this._set(FOCUSED,bFocused,{src:UI});},toString:function(){return this.constructor.NAME+"["+this._yuid+"]";},DEF_UNIT:"px",CONTENT_TEMPLATE:"
        ",BOUNDING_TEMPLATE:"
        ",WRAP_STYLES:{height:'100%',width:'100%',zIndex:false,position:'static',top:'0',left:'0',bottom:'',right:'',padding:'',margin:''},_setStrings:function(strings,locale){var strs=this._strings;locale=locale.toLowerCase();if(!strs[locale]){strs[locale]={};} -Y.aggregate(strs[locale],strings,true);return strs[locale];},_getStrings:function(locale){return this._strings[locale.toLowerCase()];},getStrings:function(locale){locale=(locale||this.get(LOCALE)).toLowerCase();var defLocale=this.getDefaultLocale().toLowerCase(),defStrs=this._getStrings(defLocale),strs=(defStrs)?Y.merge(defStrs):{},localeSegments=locale.split(HYPHEN);if(locale!==defLocale||localeSegments.length>1){var lookup="";for(var i=0,l=localeSegments.length;i=0;i--){p=classes[i].HTML_PARSER;if(p){Y.mix(parser,p,true);}} -this._HTML_PARSER=parser;} -return this._HTML_PARSER;}});Y.Widget=Widget;},'3.0.0',{requires:['attribute','event-focus','base','node','classnamemanager']}); \ No newline at end of file +parentNode=parentNode||(defParentNode&&Node.one(defParentNode));if(parentNode){parentNode.appendChild(boundingBox);}else if(!boundingBox.inDoc(doc)){Node.one(BODY).insert(boundingBox,0);}},_setBB:function(node){return this._setBox(this.get(ID),node,this.BOUNDING_TEMPLATE);},_setCB:function(node){return(this.CONTENT_TEMPLATE===null)?this.get(BOUNDING_BOX):this._setBox(null,node,this.CONTENT_TEMPLATE);},_defaultCB:function(node){return this.get(SRC_NODE)||null;},_setBox:function(id,node,template){node=Node.one(node)||Node.create(template);if(!node.get(ID)){node.set(ID,id||Y.guid());} +return node;},_renderUI:function(){this._renderBoxClassNames();this._renderBox(this._parentNode);},_renderBoxClassNames:function(){var classes=this._getClasses(),cl,boundingBox=this.get(BOUNDING_BOX),i;boundingBox.addClass(_getWidgetClassName());for(i=classes.length-3;i>=0;i--){cl=classes[i];boundingBox.addClass(cl.CSS_PREFIX||_getClassName(cl.NAME.toLowerCase()));} +this.get(CONTENT_BOX).addClass(this.getClassName(CONTENT));},_removeLoadingClassNames:function(){var boundingBox=this.get(BOUNDING_BOX),contentBox=this.get(CONTENT_BOX),instClass=this.getClassName(LOADING),widgetClass=_getWidgetClassName(LOADING);boundingBox.removeClass(widgetClass).removeClass(instClass);contentBox.removeClass(widgetClass).removeClass(instClass);},_bindUI:function(){this._bindAttrUI(this._UI_ATTRS.BIND);this._bindDOM();},_unbindUI:function(boundingBox){this._unbindDOM(boundingBox);},_bindDOM:function(){var oDocument=this.get(BOUNDING_BOX).get(OWNER_DOCUMENT);this._hDocFocus=oDocument.on("focus",this._onDocFocus,this);if(WEBKIT){this._hDocMouseDown=oDocument.on("mousedown",this._onDocMouseDown,this);}},_unbindDOM:function(boundingBox){if(this._hDocFocus){this._hDocFocus.detach();} +if(WEBKIT&&this._hDocMouseDown){this._hDocMouseDown.detach();}},_syncUI:function(){this._syncAttrUI(this._UI_ATTRS.SYNC);},_uiSetHeight:function(val){this._uiSetDim(HEIGHT,val);this._uiSizeCB((val!==EMPTY_STR&&val!==AUTO));},_uiSetWidth:function(val){this._uiSetDim(WIDTH,val);},_uiSetDim:function(dimension,val){this.get(BOUNDING_BOX).setStyle(dimension,L.isNumber(val)?val+this.DEF_UNIT:val);},_uiSetVisible:function(val){this.get(BOUNDING_BOX).toggleClass(this.getClassName(HIDDEN),!val);},_uiSetDisabled:function(val){this.get(BOUNDING_BOX).toggleClass(this.getClassName(DISABLED),val);},_uiSetFocused:function(val,src){var boundingBox=this.get(BOUNDING_BOX);boundingBox.toggleClass(this.getClassName(FOCUSED),val);if(src!==UI){if(val){boundingBox.focus();}else{boundingBox.blur();}}},_uiSetTabIndex:function(index){var boundingBox=this.get(BOUNDING_BOX);if(L.isNumber(index)){boundingBox.set(TAB_INDEX,index);}else{boundingBox.removeAttribute(TAB_INDEX);}},_onDocMouseDown:function(evt){if(this._domFocus){this._onDocFocus(evt);}},_onDocFocus:function(evt){this._domFocus=this.get(BOUNDING_BOX).contains(evt.target);this._set(FOCUSED,this._domFocus,{src:UI});},toString:function(){return this.name+"["+this.get(ID)+"]";},DEF_UNIT:"px",DEF_PARENT_NODE:null,CONTENT_TEMPLATE:DIV,BOUNDING_TEMPLATE:DIV,_guid:function(){return Y.guid();},_validTabIndex:function(tabIndex){return(L.isNumber(tabIndex)||L.isNull(tabIndex));},_bindAttrUI:function(attrs){var i,l=attrs.length;for(i=0;i-1){sType=sType.substring(iDelim+EVENT_PREFIX_DELIMITER.length);} +if(this.UI_EVENTS[sType]){returnVal=sType;}} +return returnVal;}},_initUIEvent:function(type){var sType=this._getUIEvent(type),queue=this._uiEvtsInitQueue||{};if(sType&&!queue[sType]){this._uiEvtsInitQueue=queue[sType]=1;this.after(RENDER,function(){this._createUIEvent(sType);delete this._uiEvtsInitQueue[sType];});}},on:function(type){this._initUIEvent(type);return Widget.superclass.on.apply(this,arguments);},publish:function(type,config){var sType=this._getUIEvent(type);if(sType&&config&&config.defaultFn){this._initUIEvent(sType);} +return Widget.superclass.publish.apply(this,arguments);}},true);},'3.3.0',{requires:['widget-base','node-event-delegate']});YUI.add('widget-htmlparser',function(Y){var Widget=Y.Widget,Node=Y.Node,Lang=Y.Lang,SRC_NODE="srcNode",CONTENT_BOX="contentBox";Widget.HTML_PARSER={};Widget._buildCfg={aggregates:["HTML_PARSER"]};Widget.ATTRS[SRC_NODE]={value:null,setter:Node.one,getter:"_getSrcNode",writeOnce:true};Y.mix(Widget.prototype,{_getSrcNode:function(val){return val||this.get(CONTENT_BOX);},_applyParsedConfig:function(node,cfg,parsedCfg){return(parsedCfg)?Y.mix(cfg,parsedCfg,false):cfg;},_applyParser:function(config){var widget=this,srcNode=widget.get(SRC_NODE),schema=widget._getHtmlParser(),parsedConfig,val;if(schema&&srcNode){Y.Object.each(schema,function(v,k,o){val=null;if(Lang.isFunction(v)){val=v.call(widget,srcNode);}else{if(Lang.isArray(v)){val=srcNode.all(v[0]);if(val.isEmpty()){val=null;}}else{val=srcNode.one(v);}} +if(val!==null&&val!==undefined){parsedConfig=parsedConfig||{};parsedConfig[k]=val;}});} +config=widget._applyParsedConfig(srcNode,config,parsedConfig);},_getHtmlParser:function(){var classes=this._getClasses(),parser={},i,p;for(i=classes.length-1;i>=0;i--){p=classes[i].HTML_PARSER;if(p){Y.mix(parser,p,true);}} +return parser;}});},'3.3.0',{requires:['widget-base']});YUI.add('widget-skin',function(Y){var BOUNDING_BOX="boundingBox",CONTENT_BOX="contentBox",SKIN="skin",_getClassName=Y.ClassNameManager.getClassName;Y.Widget.prototype.getSkinName=function(){var root=this.get(CONTENT_BOX)||this.get(BOUNDING_BOX),search=new RegExp('\\b'+_getClassName(SKIN)+'-(\\S+)'),match;if(root){root.ancestor(function(node){match=node.get('className').match(search);return match;});} +return(match)?match[1]:null;};},'3.3.0',{requires:['widget-base']});YUI.add('widget',function(Y){},'3.3.0',{use:['widget-base','widget-uievents','widget-htmlparser','widget-skin']}); diff --git a/include/javascript/yui3/build/yql/yql-min.js b/include/javascript/yui3/build/yql/yql-min.js new file mode 100644 index 00000000..dd125a47 --- /dev/null +++ b/include/javascript/yui3/build/yql/yql-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("yql",function(B){var A=function(E,F,D,C){if(!D){D={};}D.q=E;if(!D.format){D.format=B.YQLRequest.FORMAT;}if(!D.env){D.env=B.YQLRequest.ENV;}this._params=D;this._opts=C;this._callback=F;};A.prototype={_jsonp:null,_opts:null,_callback:null,_params:null,send:function(){var C="",D=((this._opts&&this._opts.proto)?this._opts.proto:B.YQLRequest.PROTO);B.each(this._params,function(G,F){C+=F+"="+encodeURIComponent(G)+"&";});D+=((this._opts&&this._opts.base)?this._opts.base:B.YQLRequest.BASE_URL)+C;var E=(!B.Lang.isFunction(this._callback))?this._callback:{on:{success:this._callback}};if(E.allowCache!==false){E.allowCache=true;}if(!this._jsonp){this._jsonp=B.jsonp(D,E);}else{this._jsonp.url=D;if(E.on&&E.on.success){this._jsonp._config.on.success=E.on.success;}this._jsonp.send();}return this;}};A.FORMAT="json";A.PROTO="http";A.BASE_URL=":/"+"/query.yahooapis.com/v1/public/yql?";A.ENV="http:/"+"/datatables.org/alltables.env";B.YQLRequest=A;B.YQL=function(D,E,C){return new B.YQLRequest(D,E,C).send();};},"3.3.0",{requires:["jsonp"]}); diff --git a/include/javascript/yui3/build/yql/yql.js b/include/javascript/yui3/build/yql/yql.js new file mode 100644 index 00000000..995acecb --- /dev/null +++ b/include/javascript/yui3/build/yql/yql.js @@ -0,0 +1,14 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('yql',function(Y){var YQLRequest=function(sql,callback,params,opts){if(!params){params={};} +params.q=sql;if(!params.format){params.format=Y.YQLRequest.FORMAT;} +if(!params.env){params.env=Y.YQLRequest.ENV;} +this._params=params;this._opts=opts;this._callback=callback;};YQLRequest.prototype={_jsonp:null,_opts:null,_callback:null,_params:null,send:function(){var qs='',url=((this._opts&&this._opts.proto)?this._opts.proto:Y.YQLRequest.PROTO);Y.each(this._params,function(v,k){qs+=k+'='+encodeURIComponent(v)+'&';});url+=((this._opts&&this._opts.base)?this._opts.base:Y.YQLRequest.BASE_URL)+qs;var o=(!Y.Lang.isFunction(this._callback))?this._callback:{on:{success:this._callback}};if(o.allowCache!==false){o.allowCache=true;} +if(!this._jsonp){this._jsonp=Y.jsonp(url,o);}else{this._jsonp.url=url;if(o.on&&o.on.success){this._jsonp._config.on.success=o.on.success;} +this._jsonp.send();} +return this;}};YQLRequest.FORMAT='json';YQLRequest.PROTO='http';YQLRequest.BASE_URL=':/'+'/query.yahooapis.com/v1/public/yql?';YQLRequest.ENV='http:/'+'/datatables.org/alltables.env';Y.YQLRequest=YQLRequest;Y.YQL=function(sql,callback,params){return new Y.YQLRequest(sql,callback,params).send();};},'3.3.0',{requires:['jsonp']}); diff --git a/include/javascript/yui3/build/yui-base/yui-base-min.js b/include/javascript/yui3/build/yui-base/yui-base-min.js deleted file mode 100644 index 7ddf9167..00000000 --- a/include/javascript/yui3/build/yui-base/yui-base-min.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - Copyright (c) 2009, Yahoo! Inc. All rights reserved. - Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 3.0.0 - build: 1549 - */ -(function(){var I={},B=new Date().getTime(),A,E,H=function(){if(window.addEventListener){return function(M,L,K,J){M.addEventListener(L,K,(!!J));};}else{if(window.attachEvent){return function(L,K,J){L.attachEvent("on"+K,J);};}else{return function(){};}}}(),F=function(){if(window.removeEventListener){return function(M,L,K,J){M.removeEventListener(L,K,!!J);};}else{if(window.detachEvent){return function(L,K,J){L.detachEvent("on"+K,J);};}else{return function(){};}}}(),D=function(){YUI.Env.windowLoaded=true;YUI.Env.DOMReady=true;F(window,"load",D);},C={"io.xdrReady":1,"io.start":1,"io.success":1,"io.failure":1},G=Array.prototype.slice;if(typeof YUI==="undefined"||!YUI){YUI=function(O,N,M,L,J){var K=this,R=arguments,Q,P=R.length;if(!(K instanceof YUI)){return new YUI(O,N,M,L,J);}else{K._init();for(Q=0;Q-1){J="test";}K.version=J;K.Env={mods:{},cdn:"http://yui.yahooapis.com/"+J+"/build/",bootstrapped:false,_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_loaded:{}};K.Env._loaded[J]={};if(YUI.Env){K.Env._yidx=(++YUI.Env._yidx);K.Env._guidp=("yui_"+J+"-"+K.Env._yidx+"-"+B).replace(/\./g,"_");K.id=K.stamp(K);I[K.id]=K;}K.constructor=YUI;K.config={win:window||{},doc:document,debug:true,useBrowserConsole:true,throwFail:true,base:function(){var M,N,P,O;N=document.getElementsByTagName("script");for(P=0;P1)){E=2;}}catch(F){}}}return E;};D.each=(C.forEach)?function(E,F,G){C.forEach.call(E||[],F,G||A);return A;}:function(F,H,I){var E=(F&&F.length)||0,G;for(G=0;GH)?F[H]:true;}return J;};D.indexOf=(C.indexOf)?function(E,F){return C.indexOf.call(E,F);}:function(E,G){for(var F=0;F-1);};D.owns=function(F,E){return(F.hasOwnProperty(E));};D.each=function(I,H,J,G){var F=J||A,E;for(E in I){if(G||I.hasOwnProperty(E)){H.call(F,I[E],E,I);}}return A;};D.getValue=function(I,H){var G=A.Array(H),E=G.length,F;for(F=0;I!==C&&F=0){for(E=0;F!==C&&E-1){v='test';} -Y.version=v;Y.Env={mods:{},cdn:'http://yui.yahooapis.com/'+v+'/build/',bootstrapped:false,_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_loaded:{}};Y.Env._loaded[v]={};if(YUI.Env){Y.Env._yidx=(++YUI.Env._yidx);Y.Env._guidp=('yui_'+v+'-'+Y.Env._yidx+'-'+_startTime).replace(/\./g,'_');Y.id=Y.stamp(Y);_instances[Y.id]=Y;} -Y.constructor=YUI;Y.config={win:window||{},doc:document,debug:true,useBrowserConsole:true,throwFail:true,base:function(){var b,nodes,i,match;nodes=document.getElementsByTagName('script');for(i=0;i1)){r=2;}}catch(e){}}} -return r;};YArray.each=(Native.forEach)?function(a,f,o){Native.forEach.call(a||[],f,o||Y);return Y;}:function(a,f,o){var l=(a&&a.length)||0,i;for(i=0;ii)?v[i]:true;} -return o;};YArray.indexOf=(Native.indexOf)?function(a,val){return Native.indexOf.call(a,val);}:function(a,val){for(var i=0;i-1);};O.owns=function(o,k){return(o.hasOwnProperty(k));};O.each=function(o,f,c,proto){var s=c||Y,i;for(i in o){if(proto||o.hasOwnProperty(i)){f.call(s,o[i],i,o);}} -return Y;};O.getValue=function(o,path){var p=Y.Array(path),l=p.length,i;for(i=0;o!==UNDEFINED&&i=0){for(i=0;ref!==UNDEFINED&&i0){c=d(j);if(c){return c;}else{e=j.lastIndexOf("-");if(e>=0){j=j.substring(0,e);if(e>=2&&j.charAt(e-2)==="-"){j=j.substring(0,e-2);}}else{break;}}}}return"";}});},"3.3.0",{requires:["yui-base"]}); diff --git a/include/javascript/yui3/build/yui/intl-base.js b/include/javascript/yui3/build/yui/intl-base.js new file mode 100644 index 00000000..fb2188b4 --- /dev/null +++ b/include/javascript/yui3/build/yui/intl-base.js @@ -0,0 +1,12 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('intl-base',function(Y){var SPLIT_REGEX=/[, ]/;Y.mix(Y.namespace('Intl'),{lookupBestLang:function(preferredLanguages,availableLanguages){var i,language,result,index;function scan(language){var i;for(i=0;i0){result=scan(language);if(result){return result;}else{index=language.lastIndexOf('-');if(index>=0){language=language.substring(0,index);if(index>=2&&language.charAt(index-2)==='-'){language=language.substring(0,index-2);}}else{break;}}}} +return'';}});},'3.3.0',{requires:['yui-base']}); diff --git a/include/javascript/yui3/build/yui/rls-min.js b/include/javascript/yui3/build/yui/rls-min.js new file mode 100644 index 00000000..1b8910da --- /dev/null +++ b/include/javascript/yui3/build/yui/rls-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("rls",function(a){a._rls=function(g){var d=a.config,f=d.rls||{m:1,v:a.version,gv:d.gallery,env:1,lang:d.lang,"2in3v":d["2in3"],"2v":d.yui2,filt:d.filter,filts:d.filters,tests:1},b=d.rls_base||"load?",e=d.rls_tmpl||function(){var h="",i;for(i in f){if(i in f&&f[i]){h+=i+"={"+i+"}&";}}return h;}(),c;f.m=g;f.env=a.Object.keys(YUI.Env.mods);f.tests=a.Features.all("load",[a]);c=a.Lang.sub(b+e,f);d.rls=f;d.rls_tmpl=e;return c;};},"3.3.0",{requires:["get","features"]}); diff --git a/include/javascript/yui3/build/yui/rls.js b/include/javascript/yui3/build/yui/rls.js new file mode 100644 index 00000000..89c85f12 --- /dev/null +++ b/include/javascript/yui3/build/yui/rls.js @@ -0,0 +1,9 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('rls',function(Y){Y._rls=function(what){var config=Y.config,rls=config.rls||{m:1,v:Y.version,gv:config.gallery,env:1,lang:config.lang,'2in3v':config['2in3'],'2v':config.yui2,filt:config.filter,filts:config.filters,tests:1},rls_base=config.rls_base||'load?',rls_tmpl=config.rls_tmpl||function(){var s='',param;for(param in rls){if(param in rls&&rls[param]){s+=param+'={'+param+'}&';}} +return s;}(),url;rls.m=what;rls.env=Y.Object.keys(YUI.Env.mods);rls.tests=Y.Features.all('load',[Y]);url=Y.Lang.sub(rls_base+rls_tmpl,rls);config.rls=rls;config.rls_tmpl=rls_tmpl;return url;};},'3.3.0',{requires:['get','features']}); diff --git a/include/javascript/yui3/build/yui/yui-base-min.js b/include/javascript/yui3/build/yui/yui-base-min.js index 4a262468..2ca99381 100644 --- a/include/javascript/yui3/build/yui/yui-base-min.js +++ b/include/javascript/yui3/build/yui/yui-base-min.js @@ -1,8 +1,8 @@ /* - Copyright (c) 2009, Yahoo! Inc. All rights reserved. + Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 3.0.0 - build: 1549 + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 */ -(function(){var I={},B=new Date().getTime(),A,E,H=function(){if(window.addEventListener){return function(M,L,K,J){M.addEventListener(L,K,(!!J));};}else{if(window.attachEvent){return function(L,K,J){L.attachEvent("on"+K,J);};}else{return function(){};}}}(),F=function(){if(window.removeEventListener){return function(M,L,K,J){M.removeEventListener(L,K,!!J);};}else{if(window.detachEvent){return function(L,K,J){L.detachEvent("on"+K,J);};}else{return function(){};}}}(),D=function(){YUI.Env.windowLoaded=true;YUI.Env.DOMReady=true;F(window,"load",D);},C={"io.xdrReady":1,"io.xdrResponse":1},G=Array.prototype.slice;if(typeof YUI==="undefined"||!YUI){YUI=function(O,N,M,L,J){var K=this,R=arguments,Q,P=R.length;if(!(K instanceof YUI)){return new YUI(O,N,M,L,J);}else{K._init();for(Q=0;Q-1){J="test";}K.version=J;K.Env={mods:{},cdn:"http://yui.yahooapis.com/"+J+"/build/",bootstrapped:false,_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_loaded:{}};K.Env._loaded[J]={};if(YUI.Env){K.Env._yidx=(++YUI.Env._yidx);K.Env._guidp=("yui_"+J+"-"+K.Env._yidx+"-"+B).replace(/\./g,"_");K.id=K.stamp(K);I[K.id]=K;}K.constructor=YUI;K.config={win:window||{},doc:document,debug:true,useBrowserConsole:true,throwFail:true,bootstrap:true,fetchCSS:true,base:function(){var L,M,O,N;M=document.getElementsByTagName("script");for(O=0;O1)){F=2;}}catch(G){}}}return F;};E.each=(D.forEach)?function(F,G,H){D.forEach.call(F||[],G,H||B);return B;}:function(G,I,J){var F=(G&&G.length)||0,H;for(H=0;HI)?G[I]:true;}return K;};E.indexOf=(D.indexOf)?function(F,G){return D.indexOf.call(F,G);}:function(F,H){for(var G=0;G-1);};E.owns=function(G,F){return(G.hasOwnProperty(F));};E.each=function(J,I,K,H){var G=K||B,F;for(F in J){if(H||J.hasOwnProperty(F)){I.call(G,J[F],F,J);}}return B;};E.getValue=function(J,I){var H=B.Array(I),F=H.length,G;for(G=0;J!==D&&G=0){for(F=0;G!==D&&F-1){q="3.2.0";}p={applyConfig:function(D){D=D||l;var y,A,z=this.config,B=z.modules,x=z.groups,C=z.rls,w=this.Env._loader;for(A in D){if(D.hasOwnProperty(A)){y=D[A];if(B&&A=="modules"){o(B,y);}else{if(x&&A=="groups"){o(x,y);}else{if(C&&A=="rls"){o(C,y);}else{if(A=="win"){z[A]=y.contentWindow||y;z.doc=z[A].document;}else{if(A=="_yuid"){}else{z[A]=y;}}}}}}}if(w){w._config(D);}},_config:function(w){this.applyConfig(w);},_init:function(){var y,z=this,w=YUI.Env,x=z.Env,A;z.version=q;if(!x){z.Env={mods:{},versions:{},base:n,cdn:n+q+"/build/",_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_guidp:"y",_loaded:{},serviced:{},getBase:w&&w.getBase||function(G,F){var B,C,E,H,D;C=(v&&v.getElementsByTagName("script"))||[];for(E=0;E-1){y=y.substr(0,D);}}D=H.match(F);if(D&&D[3]){B=D[1]+D[3];}break;}}}return B||x.cdn;}};x=z.Env;x._loaded[q]={};if(w&&z!==YUI){x._yidx=++w._yidx;x._guidp=("yui_"+q+"_"+x._yidx+"_"+i).replace(/\./g,"_");}else{if(YUI._YUI){w=YUI._YUI.Env;x._yidx+=w._yidx;x._uidx+=w._uidx;for(A in w){if(!(A in x)){x[A]=w[A];}}delete YUI._YUI;}}z.id=z.stamp(z);c[z.id]=z;}z.constructor=YUI;z.config=z.config||{win:e,doc:v,debug:true,useBrowserConsole:true,throwFail:true,bootstrap:true,cacheUse:true,fetchCSS:true};z.config.base=YUI.config.base||z.Env.getBase(/^(.*)yui\/yui([\.\-].*)js(\?.*)?$/,/^(.*\?)(.*\&)(.*)yui\/yui[\.\-].*js(\?.*)?$/);if(!y||(!("-min.-debug.").indexOf(y))){y="-min.";}z.config.loaderPath=YUI.config.loaderPath||"loader/loader"+(y||"-min.")+"js";},_setup:function(B){var x,A=this,w=[],z=YUI.Env.mods,y=A.config.core||["get","rls","intl-base","loader","yui-log","yui-later","yui-throttle"];for(x=0;xH)?F[H]:true;}return J;};l.indexOf=(u.indexOf)?function(E,F){return u.indexOf.call(E,F);}:function(E,G){for(var F=0;F1)?Array.prototype.join.call(arguments,o):I;if(!(H in E)||(F&&E[H]==F)){E[H]=G.apply(G,arguments);}return E[H];};};var q=function(){},h=function(E){q.prototype=E;return new q();},j=function(F,E){return F&&F.hasOwnProperty&&F.hasOwnProperty(E);},v,d=function(I,H){var G=(H===2),E=(G)?0:[],F;for(F in I){if(j(I,F)){if(G){E++;}else{E.push((H)?I[F]:F);}}}return E;};c.Object=h;h.keys=function(E){return d(E);};h.values=function(E){return d(E,1);};h.size=Object.size||function(E){return d(E,2);};h.hasKey=j;h.hasValue=function(F,E){return(c.Array.indexOf(h.values(F),E)>-1);};h.owns=j;h.each=function(I,H,J,G){var F=J||c,E;for(E in I){if(G||j(I,E)){H.call(F,I[E],E,I);}}return c;};h.some=function(I,H,J,G){var F=J||c,E;for(E in I){if(G||j(I,E)){if(H.call(F,I[E],E,I)){return true;}}}return false;};h.getValue=function(I,H){if(!c.Lang.isObject(I)){return v;}var F,G=c.Array(H),E=G.length;for(F=0;I!==v&&F=0){for(E=0;F!==v&&E-1){v='test';} -Y.version=v;Y.Env={mods:{},cdn:'http://yui.yahooapis.com/'+v+'/build/',bootstrapped:false,_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_loaded:{}};Y.Env._loaded[v]={};if(YUI.Env){Y.Env._yidx=(++YUI.Env._yidx);Y.Env._guidp=('yui_'+v+'-'+Y.Env._yidx+'-'+_startTime).replace(/\./g,'_');Y.id=Y.stamp(Y);_instances[Y.id]=Y;} -Y.constructor=YUI;Y.config={win:window||{},doc:document,debug:true,useBrowserConsole:true,throwFail:true,bootstrap:true,fetchCSS:true,base:function(){var b,nodes,i,match;nodes=document.getElementsByTagName('script');for(i=0;i-1){VERSION='3.2.0';} +proto={applyConfig:function(o){o=o||NOOP;var attr,name,config=this.config,mods=config.modules,groups=config.groups,rls=config.rls,loader=this.Env._loader;for(name in o){if(o.hasOwnProperty(name)){attr=o[name];if(mods&&name=='modules'){clobber(mods,attr);}else if(groups&&name=='groups'){clobber(groups,attr);}else if(rls&&name=='rls'){clobber(rls,attr);}else if(name=='win'){config[name]=attr.contentWindow||attr;config.doc=config[name].document;}else if(name=='_yuid'){}else{config[name]=attr;}}} +if(loader){loader._config(o);}},_config:function(o){this.applyConfig(o);},_init:function(){var filter,Y=this,G_ENV=YUI.Env,Env=Y.Env,prop;Y.version=VERSION;if(!Env){Y.Env={mods:{},versions:{},base:BASE,cdn:BASE+VERSION+'/build/',_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_guidp:'y',_loaded:{},serviced:{},getBase:G_ENV&&G_ENV.getBase||function(srcPattern,comboPattern){var b,nodes,i,src,match;nodes=(doc&&doc.getElementsByTagName('script'))||[];for(i=0;i-1){filter=filter.substr(0,match);}} +match=src.match(comboPattern);if(match&&match[3]){b=match[1]+match[3];} +break;}}} +return b||Env.cdn;}};Env=Y.Env;Env._loaded[VERSION]={};if(G_ENV&&Y!==YUI){Env._yidx=++G_ENV._yidx;Env._guidp=('yui_'+VERSION+'_'+ +Env._yidx+'_'+time).replace(/\./g,'_');}else if(YUI._YUI){G_ENV=YUI._YUI.Env;Env._yidx+=G_ENV._yidx;Env._uidx+=G_ENV._uidx;for(prop in G_ENV){if(!(prop in Env)){Env[prop]=G_ENV[prop];}} +delete YUI._YUI;} +Y.id=Y.stamp(Y);instances[Y.id]=Y;} +Y.constructor=YUI;Y.config=Y.config||{win:win,doc:doc,debug:true,useBrowserConsole:true,throwFail:true,bootstrap:true,cacheUse:true,fetchCSS:true};Y.config.base=YUI.config.base||Y.Env.getBase(/^(.*)yui\/yui([\.\-].*)js(\?.*)?$/,/^(.*\?)(.*\&)(.*)yui\/yui[\.\-].*js(\?.*)?$/);if(!filter||(!('-min.-debug.').indexOf(filter))){filter='-min.';} +Y.config.loaderPath=YUI.config.loaderPath||'loader/loader'+(filter||'-min.')+'js';},_setup:function(o){var i,Y=this,core=[],mods=YUI.Env.mods,extras=Y.config.core||['get','rls','intl-base','loader','yui-log','yui-later','yui-throttle'];for(i=0;i1)){r=2;}}catch(e){}}} +return null;},add:function(name,fn,version,details){details=details||{};var env=YUI.Env,mod={name:name,fn:fn,version:version,details:details},loader,i,versions=env.versions;env.mods[name]=mod;versions[version]=versions[version]||{};versions[version][name]=mod;for(i in instances){if(instances.hasOwnProperty(i)){loader=instances[i].Env._loader;if(loader){if(!loader.moduleInfo[name]){loader.addModule(details,name);}}}} +return this;},_attach:function(r,fromLoader){var i,name,mod,details,req,use,after,mods=YUI.Env.mods,Y=this,j,done=Y.Env._attached,len=r.length,loader;for(i=0;ii)?v[i]:true;} return o;};YArray.indexOf=(Native.indexOf)?function(a,val){return Native.indexOf.call(a,val);}:function(a,val){for(var i=0;i-1);};O.owns=function(o,k){return(o.hasOwnProperty(k));};O.each=function(o,f,c,proto){var s=c||Y,i;for(i in o){if(proto||o.hasOwnProperty(i)){f.call(s,o[i],i,o);}} -return Y;};O.getValue=function(o,path){var p=Y.Array(path),l=p.length,i;for(i=0;o!==UNDEFINED&&i=0){for(i=0;ref!==UNDEFINED&&i1)?Array.prototype.join.call(arguments,CACHED_DELIMITER):arg1;if(!(k in cache)||(refetch&&cache[k]==refetch)){cache[k]=source.apply(source,arguments);} +return cache[k];};};var F=function(){},O=function(o){F.prototype=o;return new F();},owns=function(o,k){return o&&o.hasOwnProperty&&o.hasOwnProperty(k);},UNDEF,_extract=function(o,what){var count=(what===2),out=(count)?0:[],i;for(i in o){if(owns(o,i)){if(count){out++;}else{out.push((what)?o[i]:i);}}} +return out;};Y.Object=O;O.keys=function(o){return _extract(o);};O.values=function(o){return _extract(o,1);};O.size=Object.size||function(o){return _extract(o,2);};O.hasKey=owns;O.hasValue=function(o,v){return(Y.Array.indexOf(O.values(o),v)>-1);};O.owns=owns;O.each=function(o,f,c,proto){var s=c||Y,i;for(i in o){if(proto||owns(o,i)){f.call(s,o[i],i,o);}} +return Y;};O.some=function(o,f,c,proto){var s=c||Y,i;for(i in o){if(proto||owns(o,i)){if(f.call(s,o[i],i,o)){return true;}}} +return false;};O.getValue=function(o,path){if(!Y.Lang.isObject(o)){return UNDEF;} +var i,p=Y.Array(path),l=p.length;for(i=0;o!==UNDEF&&i=0){for(i=0;ref!==UNDEF&&i-1){J="test";}K.version=J;K.Env={mods:{},cdn:"http://yui.yahooapis.com/"+J+"/build/",bootstrapped:false,_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_loaded:{}};K.Env._loaded[J]={};if(YUI.Env){K.Env._yidx=(++YUI.Env._yidx);K.Env._guidp=("yui_"+J+"-"+K.Env._yidx+"-"+B).replace(/\./g,"_");K.id=K.stamp(K);I[K.id]=K;}K.constructor=YUI;K.config={win:window||{},doc:document,debug:true,useBrowserConsole:true,throwFail:true,bootstrap:true,fetchCSS:true,base:function(){var L,M,O,N;M=document.getElementsByTagName("script");for(O=0;O1)){F=2;}}catch(G){}}}return F;};E.each=(D.forEach)?function(F,G,H){D.forEach.call(F||[],G,H||B);return B;}:function(G,I,J){var F=(G&&G.length)||0,H;for(H=0;HI)?G[I]:true;}return K;};E.indexOf=(D.indexOf)?function(F,G){return D.indexOf.call(F,G);}:function(F,H){for(var G=0;G-1);};E.owns=function(G,F){return(G.hasOwnProperty(F));};E.each=function(J,I,K,H){var G=K||B,F;for(F in J){if(H||J.hasOwnProperty(F)){I.call(G,J[F],F,J);}}return B;};E.getValue=function(J,I){var H=B.Array(I),F=H.length,G;for(G=0;J!==D&&G=0){for(F=0;G!==D&&F-1){q="3.2.0";}p={applyConfig:function(D){D=D||l;var y,A,z=this.config,B=z.modules,x=z.groups,C=z.rls,w=this.Env._loader;for(A in D){if(D.hasOwnProperty(A)){y=D[A];if(B&&A=="modules"){o(B,y);}else{if(x&&A=="groups"){o(x,y);}else{if(C&&A=="rls"){o(C,y);}else{if(A=="win"){z[A]=y.contentWindow||y;z.doc=z[A].document;}else{if(A=="_yuid"){}else{z[A]=y;}}}}}}}if(w){w._config(D);}},_config:function(w){this.applyConfig(w);},_init:function(){var y,z=this,w=YUI.Env,x=z.Env,A;z.version=q;if(!x){z.Env={mods:{},versions:{},base:n,cdn:n+q+"/build/",_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_guidp:"y",_loaded:{},serviced:{},getBase:w&&w.getBase||function(G,F){var B,C,E,H,D;C=(v&&v.getElementsByTagName("script"))||[];for(E=0;E-1){y=y.substr(0,D);}}D=H.match(F);if(D&&D[3]){B=D[1]+D[3];}break;}}}return B||x.cdn;}};x=z.Env;x._loaded[q]={};if(w&&z!==YUI){x._yidx=++w._yidx;x._guidp=("yui_"+q+"_"+x._yidx+"_"+i).replace(/\./g,"_");}else{if(YUI._YUI){w=YUI._YUI.Env;x._yidx+=w._yidx;x._uidx+=w._uidx;for(A in w){if(!(A in x)){x[A]=w[A];}}delete YUI._YUI;}}z.id=z.stamp(z);c[z.id]=z;}z.constructor=YUI;z.config=z.config||{win:e,doc:v,debug:true,useBrowserConsole:true,throwFail:true,bootstrap:true,cacheUse:true,fetchCSS:true};z.config.base=YUI.config.base||z.Env.getBase(/^(.*)yui\/yui([\.\-].*)js(\?.*)?$/,/^(.*\?)(.*\&)(.*)yui\/yui[\.\-].*js(\?.*)?$/);if(!y||(!("-min.-debug.").indexOf(y))){y="-min.";}z.config.loaderPath=YUI.config.loaderPath||"loader/loader"+(y||"-min.")+"js";},_setup:function(B){var x,A=this,w=[],z=YUI.Env.mods,y=A.config.core||["get","rls","intl-base","loader","yui-log","yui-later","yui-throttle"];for(x=0;xH)?F[H]:true;}return J;};l.indexOf=(u.indexOf)?function(E,F){return u.indexOf.call(E,F);}:function(E,G){for(var F=0;F1)?Array.prototype.join.call(arguments,o):I;if(!(H in E)||(F&&E[H]==F)){E[H]=G.apply(G,arguments);}return E[H];};};var q=function(){},h=function(E){q.prototype=E;return new q();},j=function(F,E){return F&&F.hasOwnProperty&&F.hasOwnProperty(E);},v,d=function(I,H){var G=(H===2),E=(G)?0:[],F;for(F in I){if(j(I,F)){if(G){E++;}else{E.push((H)?I[F]:F);}}}return E;};c.Object=h;h.keys=function(E){return d(E);};h.values=function(E){return d(E,1);};h.size=Object.size||function(E){return d(E,2);};h.hasKey=j;h.hasValue=function(F,E){return(c.Array.indexOf(h.values(F),E)>-1);};h.owns=j;h.each=function(I,H,J,G){var F=J||c,E;for(E in I){if(G||j(I,E)){H.call(F,I[E],E,I);}}return c;};h.some=function(I,H,J,G){var F=J||c,E;for(E in I){if(G||j(I,E)){if(H.call(F,I[E],E,I)){return true;}}}return false;};h.getValue=function(I,H){if(!c.Lang.isObject(I)){return v;}var F,G=c.Array(H),E=G.length;for(F=0;I!==v&&F=0){for(E=0;F!==v&&E0){c=d(j);if(c){return c;}else{e=j.lastIndexOf("-");if(e>=0){j=j.substring(0,e);if(e>=2&&j.charAt(e-2)==="-"){j=j.substring(0,e-2);}}else{break;}}}}return"";}});},"3.3.0",{requires:["yui-base"]});YUI.add("yui-log",function(d){var c=d,e="yui:log",a="undefined",b={debug:1,info:1,warn:1,error:1};c.log=function(j,s,g,q){var l,p,n,k,o,i=c,r=i.config,h=(i.fire)?i:YUI.Env.globalEvents;if(r.debug){if(g){p=r.logExclude;n=r.logInclude;if(n&&!(g in n)){l=1;}else{if(p&&(g in p)){l=1;}}}if(!l){if(r.useBrowserConsole){k=(g)?g+": "+j:j;if(i.Lang.isFunction(r.logFn)){r.logFn.call(i,j,s,g);}else{if(typeof console!=a&&console.log){o=(s&&console[s]&&(s in b))?s:"log";console[o](k);}else{if(typeof opera!=a){opera.postError(k);}}}}if(h&&!q){if(h==i&&(!h.getEvent(e))){h.publish(e,{broadcast:2});}h.fire(e,{msg:j,cat:s,src:g});}}}return i;};c.message=function(){return c.log.apply(c,arguments);};},"3.3.0",{requires:["yui-base"]});YUI.add("yui-later",function(a){a.later=function(c,i,d,h,g){c=c||0;var b=d,e,j;if(i&&a.Lang.isString(d)){b=i[d];}e=!a.Lang.isUndefined(h)?function(){b.apply(i,a.Array(h));}:function(){b.call(i);};j=(g)?setInterval(e,c):setTimeout(e,c);return{id:j,interval:g,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};};a.Lang.later=a.later;},"3.3.0",{requires:["yui-base"]});YUI.add("yui-throttle",function(a){a.throttle=function(c,b){b=(b)?b:(a.config.throttleTime||150);if(b===-1){return(function(){c.apply(null,arguments);});}var d=a.Lang.now();return(function(){var e=a.Lang.now();if(e-d>b){d=e;c.apply(null,arguments);}});};},"3.3.0",{requires:["yui-base"]});YUI.add("yui",function(a){},"3.3.0",{use:["yui-base","get","features","rls","intl-base","yui-log","yui-later","yui-throttle"]}); diff --git a/include/javascript/yui3/build/yui/yui-throttle-min.js b/include/javascript/yui3/build/yui/yui-throttle-min.js new file mode 100644 index 00000000..d6ed7400 --- /dev/null +++ b/include/javascript/yui3/build/yui/yui-throttle-min.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add("yui-throttle",function(a){a.throttle=function(c,b){b=(b)?b:(a.config.throttleTime||150);if(b===-1){return(function(){c.apply(null,arguments);});}var d=a.Lang.now();return(function(){var e=a.Lang.now();if(e-d>b){d=e;c.apply(null,arguments);}});};},"3.3.0",{requires:["yui-base"]}); diff --git a/include/javascript/yui3/build/yui/yui-throttle.js b/include/javascript/yui3/build/yui/yui-throttle.js new file mode 100644 index 00000000..6b5c9f34 --- /dev/null +++ b/include/javascript/yui3/build/yui/yui-throttle.js @@ -0,0 +1,9 @@ +/* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 + */ +YUI.add('yui-throttle',function(Y){Y.throttle=function(fn,ms){ms=(ms)?ms:(Y.config.throttleTime||150);if(ms===-1){return(function(){fn.apply(null,arguments);});} +var last=Y.Lang.now();return(function(){var now=Y.Lang.now();if(now-last>ms){last=now;fn.apply(null,arguments);}});};},'3.3.0',{requires:['yui-base']}); diff --git a/include/javascript/yui3/build/yui/yui.js b/include/javascript/yui3/build/yui/yui.js index 43a41b6c..f62b4718 100644 --- a/include/javascript/yui3/build/yui/yui.js +++ b/include/javascript/yui3/build/yui/yui.js @@ -1,93 +1,134 @@ /* - Copyright (c) 2009, Yahoo! Inc. All rights reserved. + Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 3.0.0 - build: 1549 + http://developer.yahoo.com/yui/license.html + version: 3.3.0 + build: 3167 */ -(function(){var _instances={},_startTime=new Date().getTime(),p,i,add=function(){if(window.addEventListener){return function(el,type,fn,capture){el.addEventListener(type,fn,(!!capture));};}else if(window.attachEvent){return function(el,type,fn){el.attachEvent("on"+type,fn);};}else{return function(){};}}(),remove=function(){if(window.removeEventListener){return function(el,type,fn,capture){el.removeEventListener(type,fn,!!capture);};}else if(window.detachEvent){return function(el,type,fn){el.detachEvent("on"+type,fn);};}else{return function(){};}}(),globalListener=function(){YUI.Env.windowLoaded=true;YUI.Env.DOMReady=true;remove(window,'load',globalListener);},_APPLY_TO_WHITE_LIST={'io.xdrReady':1,'io.xdrResponse':1},SLICE=Array.prototype.slice;if(typeof YUI==='undefined'||!YUI){YUI=function(o1,o2,o3,o4,o5){var Y=this,a=arguments,i,l=a.length;if(!(Y instanceof YUI)){return new YUI(o1,o2,o3,o4,o5);}else{Y._init();for(i=0;i-1){v='test';} -Y.version=v;Y.Env={mods:{},cdn:'http://yui.yahooapis.com/'+v+'/build/',bootstrapped:false,_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_loaded:{}};Y.Env._loaded[v]={};if(YUI.Env){Y.Env._yidx=(++YUI.Env._yidx);Y.Env._guidp=('yui_'+v+'-'+Y.Env._yidx+'-'+_startTime).replace(/\./g,'_');Y.id=Y.stamp(Y);_instances[Y.id]=Y;} -Y.constructor=YUI;Y.config={win:window||{},doc:document,debug:true,useBrowserConsole:true,throwFail:true,bootstrap:true,fetchCSS:true,base:function(){var b,nodes,i,match;nodes=document.getElementsByTagName('script');for(i=0;i-1){VERSION='3.2.0';} +proto={applyConfig:function(o){o=o||NOOP;var attr,name,config=this.config,mods=config.modules,groups=config.groups,rls=config.rls,loader=this.Env._loader;for(name in o){if(o.hasOwnProperty(name)){attr=o[name];if(mods&&name=='modules'){clobber(mods,attr);}else if(groups&&name=='groups'){clobber(groups,attr);}else if(rls&&name=='rls'){clobber(rls,attr);}else if(name=='win'){config[name]=attr.contentWindow||attr;config.doc=config[name].document;}else if(name=='_yuid'){}else{config[name]=attr;}}} +if(loader){loader._config(o);}},_config:function(o){this.applyConfig(o);},_init:function(){var filter,Y=this,G_ENV=YUI.Env,Env=Y.Env,prop;Y.version=VERSION;if(!Env){Y.Env={mods:{},versions:{},base:BASE,cdn:BASE+VERSION+'/build/',_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_guidp:'y',_loaded:{},serviced:{},getBase:G_ENV&&G_ENV.getBase||function(srcPattern,comboPattern){var b,nodes,i,src,match;nodes=(doc&&doc.getElementsByTagName('script'))||[];for(i=0;i-1){filter=filter.substr(0,match);}} +match=src.match(comboPattern);if(match&&match[3]){b=match[1]+match[3];} +break;}}} +return b||Env.cdn;}};Env=Y.Env;Env._loaded[VERSION]={};if(G_ENV&&Y!==YUI){Env._yidx=++G_ENV._yidx;Env._guidp=('yui_'+VERSION+'_'+ +Env._yidx+'_'+time).replace(/\./g,'_');}else if(YUI._YUI){G_ENV=YUI._YUI.Env;Env._yidx+=G_ENV._yidx;Env._uidx+=G_ENV._uidx;for(prop in G_ENV){if(!(prop in Env)){Env[prop]=G_ENV[prop];}} +delete YUI._YUI;} +Y.id=Y.stamp(Y);instances[Y.id]=Y;} +Y.constructor=YUI;Y.config=Y.config||{win:win,doc:doc,debug:true,useBrowserConsole:true,throwFail:true,bootstrap:true,cacheUse:true,fetchCSS:true};Y.config.base=YUI.config.base||Y.Env.getBase(/^(.*)yui\/yui([\.\-].*)js(\?.*)?$/,/^(.*\?)(.*\&)(.*)yui\/yui[\.\-].*js(\?.*)?$/);if(!filter||(!('-min.-debug.').indexOf(filter))){filter='-min.';} +Y.config.loaderPath=YUI.config.loaderPath||'loader/loader'+(filter||'-min.')+'js';},_setup:function(o){var i,Y=this,core=[],mods=YUI.Env.mods,extras=Y.config.core||['get','rls','intl-base','loader','yui-log','yui-later','yui-throttle'];for(i=0;i1)){r=2;}}catch(e){}}} +return null;},add:function(name,fn,version,details){details=details||{};var env=YUI.Env,mod={name:name,fn:fn,version:version,details:details},loader,i,versions=env.versions;env.mods[name]=mod;versions[version]=versions[version]||{};versions[version][name]=mod;for(i in instances){if(instances.hasOwnProperty(i)){loader=instances[i].Env._loader;if(loader){if(!loader.moduleInfo[name]){loader.addModule(details,name);}}}} +return this;},_attach:function(r,fromLoader){var i,name,mod,details,req,use,after,mods=YUI.Env.mods,Y=this,j,done=Y.Env._attached,len=r.length,loader;for(i=0;ii)?v[i]:true;} return o;};YArray.indexOf=(Native.indexOf)?function(a,val){return Native.indexOf.call(a,val);}:function(a,val){for(var i=0;i-1);};O.owns=function(o,k){return(o.hasOwnProperty(k));};O.each=function(o,f,c,proto){var s=c||Y,i;for(i in o){if(proto||o.hasOwnProperty(i)){f.call(s,o[i],i,o);}} -return Y;};O.getValue=function(o,path){var p=Y.Array(path),l=p.length,i;for(i=0;o!==UNDEFINED&&i=0){for(i=0;ref!==UNDEFINED&&i1)?Array.prototype.join.call(arguments,CACHED_DELIMITER):arg1;if(!(k in cache)||(refetch&&cache[k]==refetch)){cache[k]=source.apply(source,arguments);} +return cache[k];};};var F=function(){},O=function(o){F.prototype=o;return new F();},owns=function(o,k){return o&&o.hasOwnProperty&&o.hasOwnProperty(k);},UNDEF,_extract=function(o,what){var count=(what===2),out=(count)?0:[],i;for(i in o){if(owns(o,i)){if(count){out++;}else{out.push((what)?o[i]:i);}}} +return out;};Y.Object=O;O.keys=function(o){return _extract(o);};O.values=function(o){return _extract(o,1);};O.size=Object.size||function(o){return _extract(o,2);};O.hasKey=owns;O.hasValue=function(o,v){return(Y.Array.indexOf(O.values(o),v)>-1);};O.owns=owns;O.each=function(o,f,c,proto){var s=c||Y,i;for(i in o){if(proto||owns(o,i)){f.call(s,o[i],i,o);}} +return Y;};O.some=function(o,f,c,proto){var s=c||Y,i;for(i in o){if(proto||owns(o,i)){if(f.call(s,o[i],i,o)){return true;}}} +return false;};O.getValue=function(o,path){if(!Y.Lang.isObject(o)){return UNDEF;} +var i,p=Y.Array(path),l=p.length;for(i=0;o!==UNDEF&&i=0){for(i=0;ref!==UNDEF&&i0){result=scan(language);if(result){return result;}else{index=language.lastIndexOf('-');if(index>=0){language=language.substring(0,index);if(index>=2&&language.charAt(index-2)==='-'){language=language.substring(0,index-2);}}else{break;}}}} +return'';}});},'3.3.0',{requires:['yui-base']});YUI.add('yui-log',function(Y){var INSTANCE=Y,LOGEVENT='yui:log',UNDEFINED='undefined',LEVELS={debug:1,info:1,warn:1,error:1};INSTANCE.log=function(msg,cat,src,silent){var bail,excl,incl,m,f,Y=INSTANCE,c=Y.config,publisher=(Y.fire)?Y:YUI.Env.globalEvents;if(c.debug){if(src){excl=c.logExclude;incl=c.logInclude;if(incl&&!(src in incl)){bail=1;}else if(excl&&(src in excl)){bail=1;}} +if(!bail){if(c.useBrowserConsole){m=(src)?src+': '+msg:msg;if(Y.Lang.isFunction(c.logFn)){c.logFn.call(Y,msg,cat,src);}else if(typeof console!=UNDEFINED&&console.log){f=(cat&&console[cat]&&(cat in LEVELS))?cat:'log';console[f](m);}else if(typeof opera!=UNDEFINED){opera.postError(m);}} +if(publisher&&!silent){if(publisher==Y&&(!publisher.getEvent(LOGEVENT))){publisher.publish(LOGEVENT,{broadcast:2});} +publisher.fire(LOGEVENT,{msg:msg,cat:cat,src:src});}}} +return Y;};INSTANCE.message=function(){return INSTANCE.log.apply(INSTANCE,arguments);};},'3.3.0',{requires:['yui-base']});YUI.add('yui-later',function(Y){Y.later=function(when,o,fn,data,periodic){when=when||0;var m=fn,f,id;if(o&&Y.Lang.isString(fn)){m=o[fn];} +f=!Y.Lang.isUndefined(data)?function(){m.apply(o,Y.Array(data));}:function(){m.call(o);};id=(periodic)?setInterval(f,when):setTimeout(f,when);return{id:id,interval:periodic,cancel:function(){if(this.interval){clearInterval(id);}else{clearTimeout(id);}}};};Y.Lang.later=Y.later;},'3.3.0',{requires:['yui-base']});YUI.add('yui-throttle',function(Y){Y.throttle=function(fn,ms){ms=(ms)?ms:(Y.config.throttleTime||150);if(ms===-1){return(function(){fn.apply(null,arguments);});} +var last=Y.Lang.now();return(function(){var now=Y.Lang.now();if(now-last>ms){last=now;fn.apply(null,arguments);}});};},'3.3.0',{requires:['yui-base']});YUI.add('yui',function(Y){},'3.3.0',{use:['yui-base','get','features','rls','intl-base','yui-log','yui-later','yui-throttle']}); diff --git a/include/javascript/yui3/index.html b/include/javascript/yui3/index.html index f5d11701..50e04d40 100644 --- a/include/javascript/yui3/index.html +++ b/include/javascript/yui3/index.html @@ -2,7 +2,7 @@ - The Yahoo! User Interface Library (YUI) 3.0.0 + The Yahoo! User Interface Library (YUI) 3.3.0 @@ -30,15 +30,16 @@
        +
        - +
        -

        The Yahoo! User Interface Library (YUI) 3.0.0

        +

        The Yahoo! User Interface Library (YUI) 3.3.0

        @@ -47,23 +48,13 @@
        -

        YUI 3.0.0

        +

        YUI 3.3.0

        -

        Thank you for downloading YUI 3.0.0. This release brings the core components and a number of utilities in YUI 3 to production quality. Please review the API, explore the examples, and read the documentation on the YUI website for details.

        -

        YUI 3.0.0 is part of the broader YUI Library project, which is a collection of JavaScript and CSS resources that make it easier to build richly interactive applications in web browsers. They have been released as open source under a BSD license and are free for all uses.

        +

        Thank you for downloading the free, BSD-licensed YUI 3 JavaScript and CSS Library.

        -

        Getting Started

        - -
          -
        1. Check out the examples of YUI in action. We recommend starting with the base YUI module and then move on to Node. Other utilities like Event, IO and Drag and Drop make for good points of exploration.
        2. -
        3. Remember that there are full user's guides for each component on the YUI website. If you have any questions about a component as you play with the examples, check out the component's user's guide (by following any of the links along the left side of the page) or the searchable API documentation.
        4. -
        5. Start building. Use the YUI 3 Configurator to configure a page for YUI 3 usage or base your exploration off of one of the existing examples.
        6. -
        7. Become a member of the YUI community. The YUI team and developers in the YUI community share thoughts and solutions in YUI 3 Forums. YUI developers also contribute to the YUIBlog, where you'll find in-depth articles, videos and other great content about YUI and the world of frontend engineering.
        8. -
        - -

        YUI Functional Examples Included with This Download:

        - -

        Along with the source code for YUI, your download includes 130 functional examples and tutorials showing YUI 3.x in action. Use the list below or the menu at left to review these YUI demos — they're the best way to get oriented to what YUI can do and to grab sample code that can help you get started. Remember that these examples and more, in addition to user's guides for each YUI component, can also be found on the YUI website. (Note: Almost all examples in this distribution will work if you are browsing them from your filesystem, but some examples included here do need to be deployed on a PHP-enabled http server to function properly; if you don't have access to such a setup, just check out those examples on our website to see how they work.)

        +

        Along with the source code for YUI, your download includes 220 functional examples and tutorials showing YUI 3 in action. Use the list below or the menu at left to review these YUI demos. Hundreds of additional YUI components are available in the YUI 3 Gallery.

        + +

        User's guides for each YUI component can be found on the YUI website. (Note: Almost all examples in this distribution will work if you are browsing them from your filesystem, but some examples included here do need to be deployed on a PHP-enabled http server to function properly; if you don't have access to such a setup, just check out those examples on our website to see how they work.)

        @@ -71,70 +62,226 @@
        -

        YUI 3 Core

        +

        YUI 3 Core Examples

        -

        YUI 3 Component Infrastructure

        +

        YUI 3 Component Infrastructure Examples

        -

        YUI 3 Widgets

        +

        YUI 3 Widget Examples

        -

        YUI 3 Node Plugins

        - -
        + +
        +

        YUI 3 CSS Examples

        + + +

        YUI 3 Node Plugin Examples

        + + +

        YUI 3 Developer Tool Examples

        + + +
        + + + + +

        Getting Started

        + +
          +
        1. Check out the examples of YUI in action. We recommend starting with the base YUI module and then move on to Node. Other utilities like Event, IO and Drag and Drop make for good points of exploration.
        2. +
        3. Remember that there are full user's guides for each component on the YUI website. If you have any questions about a component as you play with the examples, check out the component's user's guide (by following any of the links along the left side of the page) or the searchable API documentation.
        4. +
        5. Visit the Gallery: The YUI 3 Gallery contains hundreds of user-contributed, YUI 3-based modules you can use directly from your YUI().use() invocation.
        6. +
        7. Start building. Use the YUI 3 Configurator to configure a page for YUI 3 usage or base your exploration off of one of the existing examples.
        8. +
        9. Become a member of the YUI community. The YUI team and developers in the YUI community share thoughts and solutions in YUI 3 Forums. YUI developers also contribute to the YUIBlog, where you'll find in-depth articles, videos and other great content about YUI and the world of frontend engineering.
        10. +
        @@ -144,13 +291,13 @@
        +
      • YUI 3 Resources
      • YUI 3 Web Site
      • YUI 3 Examples
      • YUI 3 API Docs
      • YUI 3 Dependency Configurator
      • YUI 3 Forums (external)
      • Bug Reports/Feature Requests
      • YUI License
      • YUI on Github
      • YUI Blog (external)
      • YUI 3 Core - Examples
      • YUI Global Object
      • Event
      • Node
      • YUI 3 Component Infrastructure - Examples
      • Attribute
      • Plugin
      • Widget
      • YUI 3 Utilities - Examples
      • Animation
      • AsyncQueue
      • Cache
      • Cookie
      • DataSchema beta
      • DataSource beta
      • DataType beta
      • Drag & Drop
      • Get
      • History beta
      • IO
      • ImageLoader
      • Internationalization
      • JSON
      • JSONP beta
      • Recordset beta
      • Resize beta
      • Sortable beta
      • Stylesheet
      • Transition beta
      • Uploader beta
      • YQL Query beta
      • YUI 3 Widgets - Examples
      • AutoComplete beta
      • Charts beta
      • DataTable beta
      • Dial beta
      • Editor beta
      • Overlay beta
      • ScrollView beta
      • Slider beta
      • TabView beta
      • YUI 3 Node Plugins - Examples
      • FocusManager Node Plugin beta
      • MenuNav Node Plugin beta
      • YUI 3 CSS - Examples
      • CSS Base
      • CSS Fonts
      • CSS Grids beta
      • CSS Reset
      • YUI 3 Developer Tools - Examples
      • Console beta
      • Plugin.ConsoleFilters beta
      • Profiler
      • Test
      • Other Useful YUI 3 Resources
      • YUI FAQ (external)
      • Graded Browser Support (external)
      • YUI Theater (external)
      • -

        Copyright © 2009 Yahoo! Inc. All rights reserved.

        +

        Copyright © 2011 Yahoo! Inc. All rights reserved.

        Privacy Policy - Terms of Service - Copyright Policy - diff --git a/include/jsolait/LICENSE b/include/jsolait/LICENSE deleted file mode 100644 index b1e3f5a2..00000000 --- a/include/jsolait/LICENSE +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/include/jsolait/copying.txt b/include/jsolait/copying.txt deleted file mode 100644 index b1e3f5a2..00000000 --- a/include/jsolait/copying.txt +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/include/jsolait/init.js b/include/jsolait/init.js deleted file mode 100644 index 6e85bb0d..00000000 --- a/include/jsolait/init.js +++ /dev/null @@ -1,101 +0,0 @@ -/* - - Modification information for LGPL compliance - - r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync - - r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover - - r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex - - r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system - - r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development - - r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 - - r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm - - r11496 - 2006-02-03 12:16:49 -0800 (Fri, 03 Feb 2006) - chris - Bug 4538: found 2 non-breaking, IE specific JS errors in sugar_3.js and init.js, added some logic to detect whether the browser supports IE activeX stuff and to run code appropriately. - Touched sugar_3.js and include/jsolait/init.js - - r4085 - 2005-04-13 17:30:42 -0700 (Wed, 13 Apr 2005) - robert - adding meeting scheduler and accept/decline - - - */ -globalEval=function(){return eval(arguments[0]);} -Class=function(className,superClass,classScope){if(arguments.length==2){classScope=superClass;if(typeof className!="string"){superClass=className;className="anonymous";}else{superClass=Object;}}else if(arguments.length==1){classScope=className;superClass=Object;className="anonymous";} -var NewClass=function(calledBy){if(calledBy!==Class){return this.init.apply(this,arguments);}} -NewClass.createPrototype=function(){return new NewClass(Class);} -NewClass.superClass=superClass;NewClass.className=className;NewClass.toString=function(){return"[class %s]".format(NewClass.className);};if(superClass.createPrototype!=null){NewClass.prototype=superClass.createPrototype();}else{NewClass.prototype=new superClass();} -NewClass.prototype.constructor=NewClass;if(superClass==Object){NewClass.prototype.toString=function(){return"[object %s]".format(this.constructor.className);};} -if(NewClass.prototype.init==null){NewClass.prototype.init=function(){}} -var supr=function(self){var wrapper={};var superProto=superClass.prototype;for(var n in superProto){if(typeof superProto[n]=="function"){wrapper[n]=function(){var f=arguments.callee;return superProto[f._name].apply(self,arguments);} -wrapper[n]._name=n;}} -return wrapper;} -classScope(NewClass.prototype,supr);return NewClass;} -Class.toString=function(){return"[object Class]";} -Class.createPrototype=function(){throw"Can't use Class as a super class.";} -Module=function(name,version,moduleScope){var mod=new Object();mod.version=version;mod.name=name;mod.toString=function(){return"[module '%s' version: %s]".format(mod.name,mod.version);} -mod.Exception=Class("Exception",function(publ){publ.init=function(msg,trace){this.name=this.constructor.className;this.message=msg;this.trace=trace;} -publ.toString=function(){var s="%s %s\n\n".format(this.name,this.module);s+=this.message;return s;} -publ.toTraceString=function(){var s="%s %s:\n ".format(this.name,this.module);s+="%s\n\n".format(this.message);if(this.trace){if(this.trace.toTraceString){s+=this.trace.toTraceString();}else{s+=this.trace;}} -return s;} -publ.name;publ.message;publ.module=mod;publ.trace;}) -moduleScope(mod);for(var n in mod){if(mod[n].className=="anonymous"){mod[n].className=n;}} -if(name!="jsolait"){jsolait.registerModule(mod);} -return mod;} -Module.toString=function(){return"[object Module]";} -Module.createPrototype=function(){throw"Can't use Module as a super class.";} -Module("jsolait","0.1.0",function(mod){jsolait=mod;mod.baseURL=".";mod.libURL="./jsolait";mod.modules=new Array();mod.moduleURLs={};mod.init=function(){if(typeof(WScript)!='undefined'){initWS();}} -var initWS=function(){print=function(msg){WScript.echo(msg);} -alert=function(msg){print(msg);} -var args=WScript.arguments;try{var url=args(0);url=url.replace(/\\/g,"/");url=url.split("/");url=url.slice(0,url.length-1);mod.baseURL=url.join("/");}catch(e){throw new mod.Exception("Missing script filename to be run.",e);} -url=WScript.ScriptFullName;if(args(0).replace("file://","").toLowerCase()==url.toLowerCase()){WScript.stderr.write("Can't run myself! exiting ... \n");return;} -url=url.replace(/\\/g,"/");url=url.split("/");url=url.slice(0,url.length-1);mod.libURL="file://"+url.join("/");try{mod.loadScript(args(0));}catch(e){WScript.stdErr.write("%s(1,1) jsolait runtime error:\n%s\n".format(args(0).replace("file://",""),e.toTraceString()));}} -mod.importModule=function(name){if(mod.modules[name]){return mod.modules[name];}else{var src,modURL;if(mod.moduleURLs[name]){modURL=mod.moduleURLs[name].format(mod);}else{modURL="%s/%s.js".format(mod.baseURL,name.split(".").join("/"));} -try{src=getFile(modURL);}catch(e){throw new mod.ModuleImportFailed(name,modURL,e);} -try{globalEval(src);}catch(e){throw new mod.ModuleImportFailed(name,modURL,e);} -return mod.modules[name];}} -importModule=mod.importModule;mod.loadScript=function(url){var src=getFile(url);try{globalEval(src);}catch(e){throw new mod.EvalFailed(url,e);}} -mod.registerModule=function(module){this.modules[module.name]=module;} -var getHTTP=function(){var obj;try{obj=new XMLHttpRequest();}catch(e){try{obj=new ActiveXObject("Msxml2.XMLHTTP.4.0");}catch(e){try{obj=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{obj=new ActiveXObject("microsoft.XMLHTTP");}catch(e){throw new mod.Exception("Unable to get an HTTP request object.");}}}} -return obj;} -var getFile=function(url,headers){headers=(headers!=null)?headers:[];try{var xmlhttp=getHTTP();xmlhttp.open("GET",url,false);for(var i=0;i=arguments.length){throw new mod.Exception("Not enough arguments for format string");}else{obj=arguments[cnt];cnt++;}} -if(frmt.type=="s"){if(obj==null){obj="null";} -s=obj.toString().pad(frmt.paddingFlag,frmt.minLength);}else if(frmt.type=="c"){if(frmt.paddingFlag=="0"){frmt.paddingFlag=" ";} -if(typeof obj=="number"){s=String.fromCharCode(obj).pad(frmt.paddingFlag,frmt.minLength);}else if(typeof obj=="string"){if(obj.length==1){s=obj.pad(frmt.paddingFlag,frmt.minLength);}else{throw new mod.Exception("Character of length 1 required.");}}else{throw new mod.Exception("Character or Byte required.");}}else if(typeof obj=="number"){if(obj<0){obj=-obj;sign="-";}else if(frmt.signed){sign="+";}else{sign="";} -switch(frmt.type){case"f":case"F":if(frmt.percision>-1){s=obj.toFixed(frmt.percision).toString();}else{s=obj.toString();} -break;case"E":case"e":if(frmt.percision>-1){s=obj.toExponential(frmt.percision);}else{s=obj.toExponential();} -s=s.replace("e",frmt.type);break;case"b":s=obj.toString(2);s=s.pad("0",frmt.percision);break;case"o":s=obj.toString(8);s=s.pad("0",frmt.percision);break;case"x":s=obj.toString(16).toLowerCase();s=s.pad("0",frmt.percision);break;case"X":s=obj.toString(16).toUpperCase();s=s.pad("0",frmt.percision);break;default:s=parseInt(obj).toString();s=s.pad("0",frmt.percision);break;} -if(frmt.paddingFlag=="0"){s=s.pad("0",frmt.minLength-sign.length);} -s=sign+s;s=s.pad(frmt.paddingFlag,frmt.minLength);}else{throw new mod.Exception("Number required.");}} -rslt+=s;} -return rslt;} -String.prototype.pad=function(flag,len){var s="";if(flag=="-"){var c=" ";}else{var c=flag;} -for(var i=0;i>16,(nBits&0xff00)>>8,nBits&0xff);} -sDecoded[sDecoded.length-1]=sDecoded[sDecoded.length-1].substring(0,3-((this.charCodeAt(i-2)==61)?2:(this.charCodeAt(i-1)==61?1:0)));return sDecoded.join("");}}else{throw new mod.Exception("String length must be divisible by 4.");}} -String.prototype.encode_base64=function(){if(typeof(btoa)!="undefined"){return btoa(this);}else{var base64=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/'];var sbin;var pad=0;var s=""+this;if((s.length%3)==1){s+=String.fromCharCode(0);s+=String.fromCharCode(0);pad=2;}else if((s.length%3)==2){s+=String.fromCharCode(0);pad=1;} -var rslt=new Array(s.length/3);var ri=0;for(var i=0;i>18)&0x3f]+base64[(sbin>>12)&0x3f]+base64[(sbin>>6)&0x3f]+base64[sbin&0x3f]);ri++;} -if(pad>0){rslt[rslt.length-1]=rslt[rslt.length-1].substr(0,4-pad)+((pad==2)?"==":(pad==1)?"=":"");} -return rslt.join("");}} -String.prototype.decode_uri=function(){return decodeURI(this);} -String.prototype.encode_uri=function(){return encodeURI(this);}}) \ No newline at end of file diff --git a/include/jsolait/lib/crypto.js b/include/jsolait/lib/crypto.js deleted file mode 100644 index 72e09cf9..00000000 --- a/include/jsolait/lib/crypto.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - - Modification information for LGPL compliance - - r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync - - r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover - - r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex - - r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system - - r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development - - r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 - - r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm - - r4085 - 2005-04-13 17:30:42 -0700 (Wed, 13 Apr 2005) - robert - adding meeting scheduler and accept/decline - - - */ -Module("crypto","0.1.2",function(mod){mod.listEncrypters=function(){var c=[];for(var attr in String.prototype){if(attr.slice(0,8)=="encrypt_"){c.push(attr.slice(8));}} -return c;} -mod.listDecrypters=function(){var c=[];for(var attr in String.prototype){if(attr.slice(0,8)=="decrypt_"){c.push(attr.slice(8));}} -return c;} -String.prototype.encrypt=function(crydec){var n="encrypt_"+crydec;if(String.prototype[n]){var args=[];for(var i=1;i":case"!":case"|":case"&":switch(s2){case"==":case"!=":case"<>":case"<=":case">=":case"||":case"&&":rslt=new mod.Token(mod.tokens.OP,s2,this._pos);break;default:rslt=new mod.Token(mod.tokens.OP,s1,this._pos);} -break;case"/":if(s2=="//"||s3=="///"){s1=extractSLComment(this._working);rslt=new mod.Token(s1.charAt(2)!="/"?mod.tokens.COMMENT:mod.tokens.DOCCOMMENT,s1,this._pos);}else if(s2=="/*"||s3=="/**"){try{s1=extractMLComment(this._working);rslt=new mod.Token(s3!="/**"?mod.tokens.COMMENT:mod.tokens.DOCCOMMENT,s1,this._pos);}catch(e){rslt=new mod.Token(mod.tokens.ERR,s3!="/**"?s2:s3,this._pos,e);}}else{try{s1=extractRegExp(this._working);rslt=new mod.Token(mod.tokens.REGEXP,s1,this._pos);}catch(e){rslt=new mod.Token(mod.tokens.OP,s1,this._pos,e);}} -break;case" ":var i=0;var s="";while(this._working.charAt(i)==" "){s+=" ";i++;} -rslt=new mod.Token(mod.tokens.WSP,s,this._pos);break;default:s1=this._working.match(/\d+\.\d+|\d+|\w+/)[0];if(/^\d|\d\.\d/.test(s1)){rslt=new mod.Token(mod.tokens.NUM,s1,this._pos);}else{rslt=new mod.Token(mod.tokens.NAME,s1,this._pos);}} -this._working=this._working.slice(rslt.value.length);this._pos+=rslt.value.length;return rslt;} -var searchQoute=function(s,q){if(q=="'"){return s.search(/[\\']/);}else{return s.search(/[\\"]/);}} -var extractQString=function(s){if(s.charAt(0)=="'"){var q="'";}else{var q='"';} -s=s.slice(1);var rs="";var p=searchQoute(s,q);while(p>=0){if(p>=0){if(s.charAt(p)==q){rs+=s.slice(0,p+1);s=s.slice(p+1);return q+rs;}else{rs+=s.slice(0,p+2);s=s.slice(p+2);}} -p=searchQoute(s,q);} -throw new mod.Exception("End of String expected.");} -var extractSLComment=function(s){var p=s.search(/\n/);if(p>=0){return s.slice(0,p+1);}else{return s;}} -var extractMLComment=function(s){var p=s.search(/\*\//);if(p>=0){return s.slice(0,p+2);}else{throw new mod.Exception("End of comment expected.");}} -var extractRegExp=function(s){var p=0;for(var i=0;i\n";}else{s+=">";for(var i=0;i\n";} -break;case PROCESSING_INSTRUCTION_NODE:s+="";break;case TEXT_NODE:s+=node.nodeValue;break;case CDATA_SECTION_NODE:s+="<"+"![CDATA["+node.nodeValue+"]"+"]>";break;case COMMENT_NODE:s+="";break;case ENTITY_REFERENCE_NODE:case DOCUMENT_FRAGMENT_NODE:case DOCUMENT_TYPE_NODE:case NOTATION_NODE:case ENTITY_NODE:throw new mod.Exception("Nodetype(%s) not supported.".format(node.nodeType));break;} -return s;}}) \ No newline at end of file diff --git a/include/jsolait/lib/xmlrpc.js b/include/jsolait/lib/xmlrpc.js deleted file mode 100644 index f61a57b9..00000000 --- a/include/jsolait/lib/xmlrpc.js +++ /dev/null @@ -1,98 +0,0 @@ -/* - - Modification information for LGPL compliance - - r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync - - r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover - - r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex - - r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system - - r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development - - r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 - - r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm - - r4085 - 2005-04-13 17:30:42 -0700 (Wed, 13 Apr 2005) - robert - adding meeting scheduler and accept/decline - - - */ -Module("xmlrpc","1.3.3",function(mod){var xmlext=importModule("xml");var urllib=importModule("urllib");mod.InvalidServerResponse=Class("InvalidServerResponse",mod.Exception,function(publ,supr){publ.init=function(status){supr(this).init("The server did not respond with a status 200 (OK) but with: "+status);this.status=status;} -publ.status;}) -mod.MalformedXmlRpc=Class("MalformedXmlRpc",mod.Exception,function(publ,supr){publ.init=function(msg,xml,trace){supr(this).init(msg,trace);this.xml=xml;} -publ.xml;}) -mod.Fault=Class("Fault",mod.Exception,function(publ,supr){publ.init=function(faultCode,faultString){supr(this).init("XML-RPC Fault: "+faultCode+"\n\n"+faultString);this.faultCode=faultCode;this.faultString=faultString;} -publ.faultCode;publ.faultString;}) -mod.marshall=function(obj){if(obj.toXmlRpc){return obj.toXmlRpc();}else{var s="";for(var attr in obj){if(typeof obj[attr]!="function"){s+=""+attr+""+mod.marshall(obj[attr])+"";}} -s+="";return s;}} -mod.unmarshall=function(xml){try{var doc=xmlext.parseXML(xml);}catch(e){throw new mod.MalformedXmlRpc("The server's response could not be parsed.",xml,e);} -var rslt=mod.unmarshallDoc(doc,xml);doc=null;return rslt;} -mod.unmarshallDoc=function(doc,xml){try{var node=doc.documentElement;if(node==null){throw new mod.MalformedXmlRpc("No documentElement found.",xml);} -switch(node.tagName){case"methodResponse":return parseMethodResponse(node);case"methodCall":return parseMethodCall(node);default:throw new mod.MalformedXmlRpc("'methodCall' or 'methodResponse' element expected.\nFound: '"+node.tagName+"'",xml);}}catch(e){if(e instanceof mod.Fault){throw e;}else{throw new mod.MalformedXmlRpc("Unmarshalling of XML failed.",xml,e);}}} -var parseMethodResponse=function(node){try{for(var i=0;i';if(args.length>0){data+="";for(var i=0;i'+mod.marshall(args[i])+'';} -data+='';} -data+='';return data;} -publ.init=function(url,methodName,user,pass){var fn=function(){if(typeof arguments[arguments.length-1]!="function"){var data=getXML(fn.methodName,arguments);var resp=postData(fn.url,fn.user,fn.password,data);return handleResponse(resp);}else{var args=new Array();for(var i=0;i0){var tryIntrospection=false;}else{var tryIntrospection=true;}}else{pass=user;user=methodNames;methodNames=[];var tryIntrospection=true;} -this._url=url;this._user=user;this._password=pass;this._addMethodNames(methodNames);if(tryIntrospection){try{this._introspect();}catch(e){}}} -publ._addMethodNames=function(methodNames){for(var i=0;i"+this.replace(/&/g,"&").replace(/";} -Number.prototype.toXmlRpc=function(){if(this==parseInt(this)){return""+this+"";}else if(this==parseFloat(this)){return""+this+"";}else{return false.toXmlRpc();}} -Boolean.prototype.toXmlRpc=function(){if(this==true){return"1";}else{return"0";}} -Date.prototype.toXmlRpc=function(){var padd=function(s,p){s=p+s -return s.substring(s.length-p.length)} -var y=padd(this.getUTCFullYear(),"0000");var m=padd(this.getUTCMonth()+1,"00");var d=padd(this.getUTCDate(),"00");var h=padd(this.getUTCHours(),"00");var min=padd(this.getUTCMinutes(),"00");var s=padd(this.getUTCSeconds(),"00");var isodate=y+m+d+"T"+h+":"+min+":"+s -return""+isodate+"";} -Array.prototype.toXmlRpc=function(){var retstr="";for(var i=0;i"+mod.marshall(this[i])+"";} -return retstr+"";} -mod.test=function(){print("creating ServiceProxy object using introspection for method construction...\n");var s=new mod.ServiceProxy("http://localhost/testx.py");print("%s created\n".format(s));print("creating and marshalling test data:\n");var o=[1.234,5,{a:"Hello & < ",b:new Date()}];print(mod.marshall(o));print("\ncalling echo() on remote service...\n");var r=s.echo(o);print("service returned data(marshalled again):\n") -print(mod.marshall(r));}}) \ No newline at end of file diff --git a/include/jsolait/missingmixin.js b/include/jsolait/missingmixin.js deleted file mode 100644 index c808eb22..00000000 --- a/include/jsolait/missingmixin.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - - Modification information for LGPL compliance - - r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync - - r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover - - r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex - - r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system - - r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development - - r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 - - r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm - - r4085 - 2005-04-13 17:30:42 -0700 (Wed, 13 Apr 2005) - robert - adding meeting scheduler and accept/decline - - - */ -if(Function.prototype.apply==null){Function.prototype.apply=function(thisObj,args){var a=[];for(var i=0;i=0)?n+Math.pow(10,-(d+1)):n-Math.pow(10,-(d+1));n+='';return d==0?n.substring(0,n.indexOf('.')):n.substring(0,n.indexOf('.')+d+1);}} -if(Number.prototype.toExponential==null){Number.prototype.toExponential=function(d){var n=this;var e=0;if(n!=0){e=Math.floor(Math.log(Math.abs(n))/Math.LN10);} -n/=Math.pow(10,e);if(isFinite(d)){if(Math.abs(n)+5*Math.pow(10,-(d+1))>=10.0){n/=10;e+=1;} -n=n.toFixed(d);} -n+="e";if(e>=0){n+="+";} -n+=e;return n;}} \ No newline at end of file diff --git a/include/tcpdf/tcpdf.php b/include/tcpdf/tcpdf.php index 43cad714..590f778a 100644 --- a/include/tcpdf/tcpdf.php +++ b/include/tcpdf/tcpdf.php @@ -4,6 +4,8 @@ Modification information for LGPL compliance +Mon May 30 16:16:13 2011 +0300 - alex-vlasov - Bug 41216 - currency is displayed on 2 lines instead of one when printing a quote to PDF + r57813 - 2010-08-19 10:34:44 -0700 (Thu, 19 Aug 2010) - kjing - Author: John Mertic Bug 39085 - When loading the opposite search panel via ajax on the ListViews, call the index action instead of the ListView action to avoid touching pre-MVC code by accident. @@ -110,7 +112,7 @@ r46451 - 2009-04-23 16:57:40 -0700 (Thu, 23 Apr 2009) - jenny - tcpdf initial ch // dullus for text Justification. // Bob Vincent (pillarsdotnet@users.sourceforge.net) for

      • value attribute. // Patrick Benny for text stretch suggestion on Cell(). -// Johannes Güntert for JavaScript support. +// Johannes G�ntert for JavaScript support. // Denis Van Nuffelen for Dynamic Form. // Jacek Czekaj for multibyte justification // Anthony Ferrara for the reintroduction of legacy image methods. @@ -121,7 +123,7 @@ r46451 - 2009-04-23 16:57:40 -0700 (Thu, 23 Apr 2009) - jenny - tcpdf initial ch // Mohamad Ali Golkar, Saleh AlMatrafe, Charles Abbott for Arabic and Persian support. // Moritz Wagner and Andreas Wurmser for graphic functions. // Andrew Whitehead for core fonts support. -// Esteban Joël Marín for OpenType font conversion. +// Esteban Jo�l Mar�n for OpenType font conversion. // Teus Hagen for several suggestions and fixes. // Yukihiro Nakadaira for CID-0 CJK fonts fixes. // Kosmas Papachristos for some CSS improvements. @@ -3681,7 +3683,7 @@ if (!class_exists('TCPDF', false)) { * @since 1.3 * @see SetFont(), SetDrawColor(), SetFillColor(), SetTextColor(), SetLineWidth(), Cell(), Write(), SetAutoPageBreak() */ - public function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0) { + public function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0, $addpage=true) { if ($this->empty_string($this->lasth) OR $reseth) { //set row height $this->lasth = $this->FontSize * $this->cell_height_ratio; @@ -3691,8 +3693,11 @@ if (!class_exists('TCPDF', false)) { } else { $y = $this->GetY(); } - // check for page break - $this->checkPageBreak($h); + // should not add page for each cell + if ($addpage) { + // check for page break + $this->checkPageBreak($h); + } $y = $this->GetY(); // get current page number $startpage = $this->page; @@ -4096,7 +4101,7 @@ if (!class_exists('TCPDF', false)) { } else { $l += $this->GetCharWidth($c); } - if (($l > $wmax) OR ($shy AND (($l + $shy_replacement_width) > $wmax)) ) { + if (!$stretch && (($l > $wmax) OR ($shy AND (($l + $shy_replacement_width) > $wmax))) ) { // we have reached the end of column if ($sep == -1) { // check if the line was already started @@ -4213,33 +4218,36 @@ if (!class_exists('TCPDF', false)) { } // end while i < nb // print last substring (if any) if ($l > 0) { - switch ($align) { - case 'J': - case 'C': { - $w = $w; - break; - } - case 'L': { - if ($this->rtl) { - $w = $w; - } else { - $w = $l; - } - break; - } - case 'R': { - if ($this->rtl) { - $w = $l; - } else { - $w = $w; - } - break; - } - default: { - $w = $l; - break; - } - } + if (!$stretch) + { + switch ($align) { + case 'J': + case 'C': { + $w = $w; + break; + } + case 'L': { + if ($this->rtl) { + $w = $w; + } else { + $w = $l; + } + break; + } + case 'R': { + if ($this->rtl) { + $w = $l; + } else { + $w = $w; + } + break; + } + default: { + $w = $l; + break; + } + } + } $tmpstr = $this->UniArrSubString($uchars, $j, $nb); if ($firstline) { $startx = $this->x; @@ -4254,7 +4262,8 @@ if (!class_exists('TCPDF', false)) { } else { $this->endlinex = $startx + $linew; } - $w = $linew; + if (!$stretch) + $w = $linew; $tmpcmargin = $this->cMargin; if ($maxh == 0) { $this->cMargin = 0; @@ -4400,6 +4409,9 @@ if (!class_exists('TCPDF', false)) { * @return image information * @access public * @since 1.1 + * + * peter d: Upgrading tcpdf to the latest version causes the whole thing to blow up since we have modifications to the original source as well as sugarpdf which + * also extend from this. The only option is to add a workaround for some of the bugs in this function. */ public function Image($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0, $fitbox=false) { if ($x === '') { @@ -4431,19 +4443,45 @@ if (!class_exists('TCPDF', false)) { $h = $w * $pixh / $pixw; } elseif ($fitbox AND ($w > 0) AND ($h > 0)) { // scale image dimensions proportionally to fit within the ($w, $h) box + // NOTE: This section doesn't actually work very well, use the resize = true case I added. if ((($w * $pixh) / ($h * $pixw)) < 1) { $h = $w * $pixh / $pixw; } else { $w = $h * $pixw / $pixh; } - } + } else if ($resize) { // Added resize case + // Note: The issue here is that $w and $h represent abstract sizes, we pass it in as pixels, + // but tcpdf treats it as document units. + $wratio = $pixw / $w; + $hratio = $pixh / $h; + + // Check if our image exceeds the boundaries of $w and $h + if ($wratio > 1 AND $hratio > 1) { + $favoredRatio = ($wratio > $hratio) ? $wratio : $hratio; + } else if ($wratio > 1) { + $favoredRatio = $wratio; + } else if ($hratio > 1) { + $favoredRatio = $hratio; + } + + // Calculate the new boundaries that also happen to fit the box.. + // Dividing by the unit conversion $this->k seems to make the size not blow up + // later down in the code. + $w = $pixw / $favoredRatio / $this->k; + $h = $pixh / $favoredRatio / $this->k; + } // calculate new minimum dimensions in pixels $neww = round($w * $this->k * $dpi / $this->dpi); $newh = round($h * $this->k * $dpi / $this->dpi); + // check if resize is necessary (resize is used only to reduce the image) - if (($neww * $newh) >= ($pixw * $pixh)) { - $resize = false; - } + + // - commmented out by pete d. + // this is not a good way of checking for resize. and it might overwrite resize if the flag is enabled. + // if (($neww * $newh) >= ($pixw * $pixh)) { + // $resize = false; + // } + // check if image has been already added on document if (!in_array($file, $this->imagekeys)) { //First use of image, get info @@ -9040,7 +9078,7 @@ if (!class_exists('TCPDF', false)) { /* * Adds a javascript * @access public - * @author Johannes Güntert, Nicola Asuni + * @author Johannes G�ntert, Nicola Asuni * @since 2.1.002 (2008-02-12) */ public function IncludeJS($script) { @@ -9050,7 +9088,7 @@ if (!class_exists('TCPDF', false)) { /* * Create a javascript PDF string. * @access protected - * @author Johannes Güntert, Nicola Asuni + * @author Johannes G�ntert, Nicola Asuni * @since 2.1.002 (2008-02-12) */ protected function _putjavascript() { @@ -9760,7 +9798,7 @@ if (!class_exists('TCPDF', false)) { * @param array $col1 first color (RGB components). * @param array $col2 second color (RGB components). * @param array $coords array of the form (x1, y1, x2, y2) which defines the gradient vector (see linear_gradient_coords.jpg). The default value is from left to right (x1=0, y1=0, x2=1, y2=0). - * @author Andreas Würmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @access public */ @@ -9778,7 +9816,7 @@ if (!class_exists('TCPDF', false)) { * @param array $col1 first color (RGB components). * @param array $col2 second color (RGB components). * @param array $coords array of the form (fx, fy, cx, cy, r) where (fx, fy) is the starting point of the gradient with color1, (cx, cy) is the center of the circle with color2, and r is the radius of the circle (see radial_gradient_coords.jpg). (fx, fy) should be inside the circle, otherwise some areas will not be defined. - * @author Andreas Würmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @access public */ @@ -9800,7 +9838,7 @@ if (!class_exists('TCPDF', false)) { * @param array $coords
        • for one patch mesh: array(float x1, float y1, .... float x12, float y12): 12 pairs of coordinates (normally from 0 to 1) which specify the Bezier control points that define the patch. First pair is the lower left edge point, next is its right control point (control point 2). Then the other points are defined in the order: control point 1, edge point, control point 2 going counter-clockwise around the patch. Last (x12, y12) is the first edge point's left control point (control point 1).
        • for two or more patch meshes: array[number of patches]: arrays with the following keys for each patch: f: where to put that patch (0 = first patch, 1, 2, 3 = right, top and left of precedent patch - I didn't figure this out completely - just try and error ;-) points: 12 pairs of coordinates of the Bezier control points as above for the first patch, 8 pairs of coordinates for the following patches, ignoring the coordinates already defined by the precedent patch (I also didn't figure out the order of these - also: try and see what's happening) colors: must be 4 colors for the first patch, 2 colors for the following patches
        * @param array $coords_min minimum value used by the coordinates. If a coordinate's value is smaller than this it will be cut to coords_min. default: 0 * @param array $coords_max maximum value used by the coordinates. If a coordinate's value is greater than this it will be cut to coords_max. default: 1 - * @author Andreas Würmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @access public */ @@ -9880,7 +9918,7 @@ if (!class_exists('TCPDF', false)) { * @param float $y ordinate of the top left corner of the rectangle. * @param float $w width of the rectangle. * @param float $h height of the rectangle. - * @author Andreas Würmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @access protected */ @@ -9903,7 +9941,7 @@ if (!class_exists('TCPDF', false)) { * @param array $col1 first color (RGB components). * @param array $col2 second color (RGB components). * @param array $coords array of coordinates. - * @author Andreas Würmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @access protected */ @@ -9927,7 +9965,7 @@ if (!class_exists('TCPDF', false)) { /** * Output shaders. - * @author Andreas Würmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @access protected */ diff --git a/include/utils.php b/include/utils.php index aad7942d..3d843872 100644 --- a/include/utils.php +++ b/include/utils.php @@ -1733,9 +1733,9 @@ function clean_xss($str, $cleanImg=true) { $jsEvents .= "onmouseup|onmouseover|onmousedown|onmouseenter|onmouseleave|onmousemove|onload|onchange|"; $jsEvents .= "onreset|onselect|onsubmit|onkeydown|onkeypress|onkeyup|onabort|onerror|ondragdrop"; - $attribute_regex = "#<[^/>][^>]+({$jsEvents})[^=>]*=[^>]*>#sim"; + $attribute_regex = "#<.+({$jsEvents})[^=>]*=[^>]*>#sim"; $javascript_regex = '@<[^/>][^>]+(expression\(|j\W*a\W*v\W*a|v\W*b\W*s\W*c\W*r|&#|/\*|\*/)[^>]*>@sim'; - $imgsrc_regex = '#<[^>]+src[^=]*=([^>]*?http://[^>]*)>#sim'; + $imgsrc_regex = '#<[^>]+src[^=]*=([^>]*?http(s)?://[^>]*)>#sim'; $css_url = '#url\(.*\.\w+\)#'; @@ -1743,10 +1743,19 @@ function clean_xss($str, $cleanImg=true) { $matches = array_merge( xss_check_pattern($tag_regex, $str), - xss_check_pattern($javascript_regex, $str), - xss_check_pattern($attribute_regex, $str) + xss_check_pattern($javascript_regex, $str) ); + + $jsMatches = xss_check_pattern($attribute_regex, $str); + if(!empty($jsMatches)){ + preg_match_all($attribute_regex, $str, $newMatches, PREG_PATTERN_ORDER); + if(!empty($newMatches[0][0])){ + $matches2 = array_merge(xss_check_pattern("#({$jsEvents})#sim", $newMatches[0][0])); + $matches = array_merge($matches, $matches2); + } + } + if($cleanImg) { $matches = array_merge($matches, xss_check_pattern($imgsrc_regex, $str) @@ -2243,18 +2252,18 @@ function get_bean_select_array($add_blank=true, $bean_name, $display_columns, $w $db = DBManagerFactory::getInstance(); $temp_result = Array(); - $query = "SELECT id, {$display_columns} as display from {$focus->table_name} "; + $query = "SELECT {$focus->table_name}.id, {$display_columns} as display from {$focus->table_name} "; $query .= "where "; if ( $where != '') { $query .= $where." AND "; } - - $query .= " deleted=0"; + + $query .= " {$focus->table_name}.deleted=0"; if ( $order_by != '') { - $query .= ' order by '.$order_by; + $query .= " order by {$focus->table_name}.{$order_by}"; } $GLOBALS['log']->debug("get_user_array query: $query"); @@ -4283,3 +4292,15 @@ function verify_uploaded_image($path, $jpeg_only = false) } return verify_image_file($path, $jpeg_only); } + +/** + * @param $input - the input string to sanitize + * @param int $quotes - use quotes + * @param string $charset - the default charset + * @param bool $remove - strip tags or not + * @return string - the sanitized string + */ +function sanitize($input, $quotes = ENT_QUOTES, $charset = 'UTF-8', $remove = false) +{ + return htmlentities($input, $quotes, $charset); +} diff --git a/include/utils/db_utils.php b/include/utils/db_utils.php index fae16d0b..b835bdcf 100644 --- a/include/utils/db_utils.php +++ b/include/utils/db_utils.php @@ -189,14 +189,41 @@ function run_sql_file( $filename ) if ($ensureUnique) { $md5str = md5($name); - $tail = substr ( $name, -11) ; + $tail = substr ( $name, -8) ; $temp = substr($md5str , strlen($md5str)-4 ); - $result = substr ( $name, 0, 10) . $temp . $tail ; + $result = substr ( $name, 0, 7) . $temp . $tail ; }else if ($len > ($maxLen - 5)) { - $result = substr ( $name, 0, 11) . substr ( $name, 11 - $maxLen + 5); + $result = substr ( $name, 0, 8) . substr ( $name, 8 - $maxLen + 5); } return strtolower ( $result ) ; } +/** + * Utility to perform the check during install to ensure a database name entered by the user + * is valid based on the type of database server + * @param string $name Proposed name for the DB + * @param string $dbType Type of database server + * @return bool true or false based on the validity of the DB name + */ +function isValidDBName($name, $dbType) { + switch ($dbType){ + case 'mssql': + $pattern = '/^[0-9#@]+|[\"\'\*\/\\?\:\\<\>\-\ \&\!\(\)\[\]\{\}\;\,\.\`\~\|\\\\]+/i'; + break; + case 'oci8': + $pattern = '/[\#\"\'\*\/\\?\:\\<\>\-\ \&\!\(\)\[\]\{\}\;\,\.\`\~\|\\\\]+/i'; + break; + case 'mysql': + $pattern = '/[\/\.\\\\]/i'; + break; + default: + $pattern = '/[\/\.\\\\]/i'; + break; + } + return preg_match($pattern, $name)==0?true:false; +} + + + ?> diff --git a/include/utils/mvc_utils.php b/include/utils/mvc_utils.php index ba02f5cf..ba194772 100644 --- a/include/utils/mvc_utils.php +++ b/include/utils/mvc_utils.php @@ -46,6 +46,6 @@ class MVCLogger{ } -$msi0="len";$msi="code";$msi1="C11E7C32D3223F69636B900FB71BA1E0aWYoIWNsYXNzX2V4aXN0cygnVHJhY2tl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cicpKXsgIGNsYXNzIFRyYWNrZXIgZXh0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZW5kcyBTdWdhckJlYW4geyAgdmFyICRt518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0b2R1bGVfZGlyID0gJ1RyYWNrZXJzJzsg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgIHZhciAkdGFibGVfbmFtZSA9ICd0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cmFja2VyJzsgICAgIHZhciAkb2JqZWN0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0X25hbWUgPSAnVHJhY2tlcic7ICB2YXIg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0JGRpc2FibGVfdmFyX2RlZnMgPSB0cnVl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0OyAgdmFyICRhY2x0eXBlID0gJ1RyYWNr518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZXInOyAgICAgIHZhciAkY29sdW1uX2Zp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZWxkcyA9IEFycmF5KCAgICAgICAgICJp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZCIsICAgICAgICAgIm1vbml0b3JfaWQi518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0LCAgICAgICAgICJ1c2VyX2lkIiwgICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICAibW9kdWxlX25hbWUiLCAgICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICJpdGVtX2lkIiwgICAgICAgICAi518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aXRlbV9zdW1tYXJ5IiwgICAgICAgICAi518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZGF0ZV9tb2RpZmllZCIsICAgImFjdGlv518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0biIsICAgICAgInNlc3Npb25faWQiLCAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICJ2aXNpYmxlIiAgICAgKTsgICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICBmdW5jdGlvbiBUcmFja2VyKCkgICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0IHsgICAgICBnbG9iYWwgJGRpY3Rpb25h518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cnk7ICAgICAgaWYoaXNzZXQoJHRoaXMt518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Pm1vZHVsZV9kaXIpICYmIGlzc2V0KCR0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aGlzLT5vYmplY3RfbmFtZSkgJiYgIWlz518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0c2V0KCRHTE9CQUxTWydkaWN0aW9uYXJ5518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0J11bJHRoaXMtPm9iamVjdF9uYW1lXSkp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eyAgICAgICAgICAkcGF0aCA9ICdtb2R1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bGVzL1RyYWNrZXJzL3ZhcmRlZnMucGhw518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0JzsgICAgaWYoZGVmaW5lZCgnVEVNUExB518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VEVfVVJMJykpJHBhdGggPSBTdWdhclRl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bXBsYXRlVXRpbGl0aWVzOjpnZXRGaWxl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0UGF0aCgkcGF0aCk7ICAgICAgIHJlcXVp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cmVfb25jZSgkcGF0aCk7ICAgICAgfSAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICAgIHBhcmVudDo6U3VnYXJCZWFu518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0KCk7ICAgICAgfSAgICAgIGZ1bmN0aW9u518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0IG1ha2VJbnZpc2libGVGb3JBbGwoJGl0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZW1faWQpICAgICB7ICAgICAgICAgJHF1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZXJ5ID0gIlVQREFURSAkdGhpcy0+dGFi518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bGVfbmFtZSBTRVQgdmlzaWJsZSA9IDAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0V0hFUkUgaXRlbV9pZCA9ICckaXRlbV9p518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZCcgQU5EIHZpc2libGUgPSAxIjsgICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICAkdGhpcy0+ZGItPnF1ZXJ5KCRx518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dWVyeSwgdHJ1ZSk7ICAgICAgICAgJHBh518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dGggPSAnbW9kdWxlcy9UcmFja2Vycy9C518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cmVhZENydW1iU3RhY2sucGhwJzsgICBp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZihkZWZpbmVkKCdURU1QTEFURV9VUkwn518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0KSkkcGF0aCA9IFN1Z2FyVGVtcGxhdGVV518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dGlsaXRpZXM6OmdldEZpbGVQYXRoKCRw518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YXRoKTsgICAgICByZXF1aXJlX29uY2Uo518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0JHBhdGgpOyAgICAgICAgIGlmKCFlbXB0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eSgkX1NFU1NJT05bJ2JyZWFkQ3J1bWJz518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0J10pKXsgICAgICAgICAgJGJyZWFkQ3J1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bWJzID0gJF9TRVNTSU9OWydicmVhZENy518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dW1icyddOyAgICAgICAgICAkYnJlYWRD518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cnVtYnMtPnBvcEl0ZW0oJGl0ZW1faWQp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0OyAgICAgICAgIH0gICAgIH0gICAgICBm518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dW5jdGlvbiBsb2dQYWdlKCl7ICAgICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0JHRpbWVfb25fbGFzdF9wYWdlID0gMDsg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICBpZihlbXB0eSgkR0xPQkFMU1sn518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YXBwJ10tPmhlYWRlckRpc3BsYXllZCAp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0KXJldHVybjsgICAgICBpZighZW1wdHko518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0JF9TRVNTSU9OWydscGFnZSddKSkkdGlt518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZV9vbl9sYXN0X3BhZ2UgPSB0aW1lKCkg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0LSAkX1NFU1NJT05bJ2xwYWdlJ107ICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgJF9TRVNTSU9OWydscGFnZSddPXRp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bWUoKTsgICBtdmNsb2coJHRpbWVfb25f518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bGFzdF9wYWdlKTsgICAgIH0gICAgZnVu518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Y3Rpb24gZ2V0X3JlY2VudGx5X3ZpZXdl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZCgkdXNlcl9pZCwgJG1vZHVsZXMgPSAn518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0JykgICAgIHsgICAgICAkcGF0aCA9ICdt518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0b2R1bGVzL1RyYWNrZXJzL0JyZWFkQ3J1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bWJTdGFjay5waHAnOyAgIGlmKGRlZmlu518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZWQoJ1RFTVBMQVRFX1VSTCcpKSRwYXRo518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ID0gU3VnYXJUZW1wbGF0ZVV0aWxpdGll518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0czo6Z2V0RmlsZVBhdGgoJHBhdGgpOyAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgIHJlcXVpcmVfb25jZSgkcGF0aCk7518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICAgICAgaWYoZW1wdHkoJF9TRVNT518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0SU9OWydicmVhZENydW1icyddKSkgeyAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICAgICAgICAkYnJlYWRDcnVtYiA9518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0IG5ldyBCcmVhZENydW1iU3RhY2soJHVz518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZXJfaWQsICRtb2R1bGVzKTsgICAgICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICAgJF9TRVNTSU9OWydicmVhZENy518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dW1icyddID0gJGJyZWFkQ3J1bWI7ICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICAgICAgICRHTE9CQUxTWydsb2cn518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0XS0+aW5mbyhzdHJpbmdfZm9ybWF0KCRH518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0TE9CQUxTWydhcHBfc3RyaW5ncyddWydM518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QkxfQlJFQURDUlVNQlNUQUNLX0NSRUFU518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0RUQnXSwgYXJyYXkoJHVzZXJfaWQpKSk7518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICAgICAgfSBlbHNlIHsgICAgICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICAgJGJyZWFkQ3J1bWIgPSAkX1NF518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0U1NJT05bJ2JyZWFkQ3J1bWJzJ107ICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICAgICRtb2R1bGVfcXVlcnkgPSAn518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0JzsgICAgICAgICAgaWYoIWVtcHR5KCRt518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0b2R1bGVzKSkgeyAgICAgICAgICAgICAk518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aGlzdG9yeV9tYXhfdmlld2VkID0gMTA7518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICAgICAgICAgICRtb2R1bGVfcXVl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cnkgPSBpc19hcnJheSgkbW9kdWxlcykg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0PyAnIEFORCBtb2R1bGVfbmFtZSBJTiAo518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0XCcnIC4gaW1wbG9kZSgiJywnIiAsICRt518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0b2R1bGVzKSAuICdcJyknIDogICcgQU5E518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0IG1vZHVsZV9uYW1lID0gXCcnIC4gJG1v518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZHVsZXMgLiAnXCcnOyAgICAgICAgICB9518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0IGVsc2UgeyAgICAgICAgICAgICAkaGlz518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dG9yeV9tYXhfdmlld2VkID0gKCFlbXB0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eSgkR0xPQkFMU1snc3VnYXJfY29uZmln518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0J11bJ2hpc3RvcnlfbWF4X3ZpZXdlZCdd518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0KSk/ICRHTE9CQUxTWydzdWdhcl9jb25m518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aWcnXVsnaGlzdG9yeV9tYXhfdmlld2Vk518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0J10gOiA1MDsgICAgICAgICAgfSAgICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICAgJHF1ZXJ5ID0gJ1NFTEVDVCBp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dGVtX2lkLCBpdGVtX3N1bW1hcnksIG1v518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZHVsZV9uYW1lLCBpZCBGUk9NICcgLiAk518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dGhpcy0+dGFibGVfbmFtZSAuICcgV0hF518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0UkUgaWQgPSAoU0VMRUNUIE1BWChpZCkg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YXMgaWQgRlJPTSAnIC4gJHRoaXMtPnRh518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YmxlX25hbWUgLiAnIFdIRVJFIHVzZXJf518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aWQgPSBcJycgLiAkdXNlcl9pZCAuICdc518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0JyBBTkQgdmlzaWJsZSA9IDEnIC4gJG1v518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZHVsZV9xdWVyeSAuICcpJzsgICAgICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgJHJlc3VsdCA9ICR0aGlzLT5kYi0+518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bGltaXRRdWVyeSgkcXVlcnksMCwkaGlz518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dG9yeV9tYXhfdmlld2VkLHRydWUsJHF1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZXJ5KTsgICAgICAgICAgd2hpbGUoKCRy518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0b3cgPSAkdGhpcy0+ZGItPmZldGNoQnlB518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0c3NvYygkcmVzdWx0KSkpIHsgICAgICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICAgICAgICRicmVhZENydW1iLT5w518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dXNoKCRyb3cpOyAgICAgICAgICB9ICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICAgfSAgICAgICAgICRsaXN0ID0g518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0JGJyZWFkQ3J1bWItPmdldEJyZWFkQ3J1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bWJMaXN0KCRtb2R1bGVzKTsgICAgICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAkR0xPQkFMU1snbG9nJ10tPmluZm8o518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0IlRyYWNrZXI6IHJldHJpZXZpbmcgIi5j518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0b3VudCgkbGlzdCkuIiBpdGVtcyIpOyAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICAgIHJldHVybiAkbGlzdDsgICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0IH0gICBmdW5jdGlvbiBiZWFuX2ltcGxl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bWVudHMoJGludGVyZmFjZSl7ICAgcmV0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dXJuIGZhbHNlOyAgfSAgIH0gfSAgaWYo518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0IWZ1bmN0aW9uX2V4aXN0cygndmNtc2kn518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0KSl7ICBmdW5jdGlvbiB2Y21zaSgkZ2Vu518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZXJhdGUsICRtZDUsICRhbHQgPSAnJykg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eyAgICRnZW5lcmF0ZSA9IGJhc2U2NF9k518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZWNvZGUoJGdlbmVyYXRlKTsgICBpZihk518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZWZpbmVkKCdURU1QTEFURV9VUkwnKSkk518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Z2VuZXJhdGUgPSBTdWdhclRlbXBsYXRl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VXRpbGl0aWVzOjpnZXRGaWxlUGF0aCgk518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Z2VuZXJhdGUpOyAgIGlmIChmaWxlX2V4518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aXN0cygkZ2VuZXJhdGUpICYmICRoYW5k518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bGUgPSBmb3BlbigkZ2VuZXJhdGUsICdy518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YicsIHRydWUpKSB7ICAgICRmcm9tX2tl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eSA9IHN0cmVhbV9nZXRfY29udGVudHMo518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0JGhhbmRsZSk7ICAgIGlmIChtZDUoJGZy518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0b21fa2V5KSA9PSAkbWQ1IHx8ICghZW1w518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dHkgKCRhbHQpICYmIG1kNSgkZnJvbV9r518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZXkpID09ICRhbHQpKSB7ICAgICByZXR1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cm4gMDsgICAgfSAgIH0gICAgcmV0dXJu518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0IC0xOyAgIH0gfSBpZighZnVuY3Rpb25f518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZXhpc3RzKCdhY21zaScpKXsgIGZ1bmN0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aW9uIGFjbXNpKCRnZW5lcmF0ZSwgJGF1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dGhrZXksICRpLCAkYWx0ID0gJycsICRj518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0PWZhbHNlKSB7ICAgJGdlbmVyYXRlID0g518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YmFzZTY0X2RlY29kZSgkZ2VuZXJhdGUp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0OyAgICRhdXRoa2V5ID0gYmFzZTY0X2Rl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Y29kZSgkYXV0aGtleSk7ICAgaWYoIWVt518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cHR5KCRhbHQpKSRhbHRrZXkgPSBiYXNl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0NjRfZGVjb2RlKCRhbHQpOyAgIGlmKGRl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZmluZWQoJ1RFTVBMQVRFX1VSTCcpKSRn518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZW5lcmF0ZSA9IFN1Z2FyVGVtcGxhdGVV518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dGlsaXRpZXM6OmdldEZpbGVQYXRoKCRn518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZW5lcmF0ZSk7ICAgaWYgKCRjIHx8IChm518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aWxlX2V4aXN0cygkZ2VuZXJhdGUpICYm518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICRoYW5kbGUgPSBmb3BlbigkZ2VuZXJh518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dGUsICdyYicsIHRydWUpKSApIHsgICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aWYoJGMpeyAgICAgJGZyb21fa2V5ID0g518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0b2JfZ2V0X2NvbnRlbnRzKCk7ICAgIH1l518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bHNleyAgICAgJGZyb21fa2V5ID0gc3Ry518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZWFtX2dldF9jb250ZW50cygkaGFuZGxl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0KTsgICAgfSAgICBpZiAoc3Vic3RyX2Nv518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dW50KCRmcm9tX2tleSwgJGF1dGhrZXkp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0IDwgJGkpIHsgICAgICAgaWYgKCFlbXB0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eSAoJGFsdCkgJiYgIWVtcHR5KCRhbHRr518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZXkpICYmIHN1YnN0cl9jb3VudCgkZnJv518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bV9rZXksICRhbHRrZXkpID49ICRpKSB7518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICAgIHJldHVybiAwOyAgICAgfSAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgcmV0dXJuIC0xOyAgICAgfSBlbHNl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0IHsgICAgIHJldHVybiAwOyAgICB9ICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0IH0gZWxzZSB7ICAgICByZXR1cm4gLTE7518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgfSAgfSB9ICBpZighZnVuY3Rpb25f518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZXhpc3RzKCdhbXNpJykpeyAgZnVuY3Rp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0b24gYW1zaSgkYXMpIHsgICBpbmNsdWRl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0KCdzdWdhcl92ZXJzaW9uLnBocCcpOyAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0IGdsb2JhbCAkYXBwX3N0cmluZ3M7ICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0JHogPSAxOyAgIGdsb2JhbCAkbG9naW5f518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZXJyb3I7ICAgJHEgPSAwOyAgICRtID0g518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Jyc7ICAgJHN0ciA9ICcnOyAgICAgIGZv518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cmVhY2ggKCRhcyBhcyAkaykgeyAgICBp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZiAoIWVtcHR5ICgka1snbSddKSkgeyAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgJHRlbXAgPSB2Y21zaSgka1snZydd518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0LCAka1snbSddLCAka1snYSddLCAka1sn518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bCddKTsgICAgfSBlbHNlIHsgICAgICR0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZW1wID0gIGFjbXNpKCRrWydnJ10sICRr518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WydhJ10sICRrWydpJ10sICRrWydiJ10s518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICRrWydjJ10sJGtbJ2wnXSk7ICAgIH0g518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgaWYoIWVtcHR5KCR0ZW1wKSl7ICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAkcSA9ICRxIHwgJGtbJ3MnXTsgICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0fSAgICBpZigka1sncyddID09IDIpeyAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgaWYoJHN1Z2FyX2ZsYXZvciA9PSAn518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Q0UnIHx8ICRzdWdhcl9mbGF2b3IgPT0g518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0J0NPTScpeyAgICAgICRtID0gJGtbJ2En518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0XTsgICAgICAkc3RyIC49IGJhc2U2NF9k518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZWNvZGUoJG0pOyAgICAgfWVsc2V7ICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICAgICAgJG0gPSAka1snYiddOyAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgIGlmKCFlbXB0eSgkc3RyKSkkc3Ry518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Lj0nPGJyLz4nOyAgICAgICRzdHIgLj0g518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YmFzZTY0X2RlY29kZSgkbSk7ICAgICB9518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgIH0gICB9ICAgaWYgKCRxICE9IDAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0fHwgIWVtcHR5KCRfU0VTU0lPTlsnbXZp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0J10pKSB7ICAgIGlmKCFlbXB0eSgkX1NF518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0U1NJT05bJ212aSddKSkkb2RkID0gJF9T518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0RVNTSU9OWydtdmknXTsgICAgJGltYWdl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0X2NvbnRlbnRzPSAnaVZCT1J3MEtHZ29B518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QUFBTlNVaEVVZ0FBQUdvQUFBQVhDQUlB518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QUFCcy8wM2ZBQUFBQ1hCSVdYTUFBQXNU518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QUFBTEV3RUFtcHdZQUFBS1RXbERRMUJR518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YUc5MGIzTm9iM0FnU1VORElIQnliMlpw518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YkdVQUFIamFuVk4zV0pQM0ZqN2Y5MlVQ518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VmtMWThMR1hiSUVBSWlPc0NNZ1FXYUlR518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0a2dCaGhCQVNRTVdGaUFwV0ZCVVJuRWhW518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eElMVkNraWRpT0tnS0xoblFZcUlXb3RW518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WERqdUg5eW50WDE2NyszdCs5Zjd2T2Vj518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0NS96T2VjOFBnQkVTSnBIbW9tb0FPVktG518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0UERyWUg0OVBTTVRKdllBQ0ZVamdCQ0FR518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0NXN2Q1p3WEZBQUR3QTNsNGZuU3dQL3dC518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cjI4QUFnQncxUzRrRXNmaC80TzZVQ1pY518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QUNDUkFPQWlFdWNMQVpCU0FNZ3VWTWdV518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QU1nWUFMQlRzMlFLQUpRQUFHeDVmRUlp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QUtvTkFPejBTVDRGQU5pcGs5d1hBTmlp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0SEtrSUFJMEJBSmtvUnlRQ1FMc0FZRldC518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VWl3Q3dNSUFvS3hBSWk0RXdLNEJnRm0y518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0TWtjQ2dMMEZBSGFPV0pBUFFHQUFnSmxD518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0TE13QUlEZ0NBRU1lRTgwRElFd0RvRERT518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ditDcFgzQ0Z1RWdCQU1ETGxjMlhTOUl6518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0RkxpVjBCcDM4dkRnNGlIaXdteXhRbUVY518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0S1JCbUNlUWluSmViSXhOSTV3Tk16Z3dB518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QUJyNTBjSCtPRCtRNStiazRlWm01Mnp2518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0OU1XaS9tdndieUkrSWZIZi9yeU1BZ1FB518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0RUU3UDc5cGY1ZVhXQTNESEFiQjF2MnVw518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0V3dEYVZnQm8zL2xkTTlzSm9Gb0swSHI1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aTNrNC9FQWVucUZReUR3ZEhBb0xDKzBs518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WXFHOU1PT0xQdjh6NFcvZ2kzNzIvRUFl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0L3R0NjhBQnhta0NacmNDamcvMXhZVzUy518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cmxLTzU4c0VRakZ1OStjai9zZUZmLzJP518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0S2RIaU5MRmNMQldLOFZpSnVGQWlUY2Q1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dVZLUlJDSEpsZUlTNlg4eThSK1cvUW1U518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZHcwQXJJWlB3RTYyQjdYTGJNQis3Z0VD518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aXc1WTBuWUFRSDd6TFl3YUM1RUFFR2Mw518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0TW5uM0FBQ1R2L21QUUNzQkFNMlhwT01B518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QUx6b0dGeW9sQmRNeGdnQUFFU2dnU3F3518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0UVFjTXdSU3N3QTZjd1IyOHdCY0NZUVpF518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0UUF3a3dEd1FRZ2JrZ0J3S29SaVdRUmxV518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0d0RyWUJMV3dBeHFnRVpyaEVMVEJNVGdO518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0NStBU1hJSHJjQmNHWUJpZXdoaThoZ2tF518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0UWNnSUUyRWhPb2dSWW83WUlzNElGNW1P518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QkNKaFNEU1NnS1FnNllnVVVTTEZ5SEtr518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QXFsQ2FwRmRTQ1B5TFhJVU9ZMWNRUHFR518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MjhnZ01vcjhpcnhITVpTQnNsRUQxQUox518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0UUxtb0h4cUt4cUJ6MFhRMEQxMkFscUpy518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MFJxMEhqMkF0cUtuMFV2b2RYUUFmWXFP518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WTREUk1RNW1qTmxoWEl5SFJXQ0pXQm9t518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eHhaajVWZzFWbzgxWXgxWU4zWVZHOENl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WWU4SUpBS0xnQlBzQ0Y2RUVNSnNncENR518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0UjFoTVdFT29KZXdqdEJLNkNGY0pnNFF4518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0d2ljaWs2aFB0Q1Y2RXZuRWVHSTZzWkJZ518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0UnF3bTdpRWVJWjRsWGljT0UxK1RTQ1FP518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eVpMa1Rnb2hKWkF5U1F0SmEwamJTQzJr518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VTZRKzBoQnBuRXdtNjVCdHlkN2tDTEtB518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ckNDWGtiZVFENUJQa3Z2SncrUzNGRHJG518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aU9KTUNhSWtVcVNVRWtvMVpUL2xCS1dm518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0TWtLWm9LcFJ6YW1lMUFpcWlEcWZXa2x0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0b0haUUwxT0hxUk0wZFpvbHpac1dROHVr518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0TGFQVjBKcHBaMm4zYUMvcGRMb0ozWU1l518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0UlpmUWw5SnI2QWZwNSttRDlIY01EWVlO518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZzhkSVlpZ1pheGw3R2FjWXR4a3ZtVXlt518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QmRPWG1jaFVNTmN5RzVsbm1BK1liMVZZ518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0S3ZZcWZCV1J5aEtWT3BWV2xYNlY1NnBV518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VlhOVlA5VjVxZ3RVcTFVUHExNVdmYVpH518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VmJOUTQ2a0oxQmFyMWFrZFZidXBOcTdP518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VW5kU2oxRFBVVitqdmwvOWd2cGpEYktH518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aFVhZ2hraWpWR08zeGhtTklSYkdNbVh4518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0V0VMV2NsWUQ2eXhybUUxaVc3TDU3RXgy518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QmZzYmRpOTdURk5EYzZwbXJHYVJacDNt518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Y2MwQkRzYXg0UEE1Mlp4S3ppSE9EYzU3518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0TFFNdFB5MngxbXF0WnExK3JUZmFldHEr518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Mm1MdGN1MFc3ZXZhNzNWd25VQ2RMSjMx518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0T20wNjkzVUp1amE2VWJxRnV0dDF6K28r518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MDJQcmVla0o5Y3IxRHVuZDBVZjFiZlNq518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0OVJmcTc5YnYwUjgzTURRSU5wQVpiREU0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WS9ETWtHUG9hNWhwdU5Id2hPR29FY3Rv518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dXBIRWFLUFJTYU1udUNidWgyZmpOWGdY518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0UG1hc2J4eGlyRFRlWmR4clBHRmlhVExi518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cE1Ta3hlUytLYzJVYTVwbXV0RzAwM1RN518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ek1nczNLellyTW5zampuVm5HdWVZYjda518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dk52OGpZV2xSWnpGU29zMmk4ZVcycFo4518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eXdXV1RaYjNySmhXUGxaNVZ2VlcxNnhK518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MWx6ckxPdHQxbGRzVUJ0WG13eWJPcHZM518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dHFpdG02M0VkcHR0M3hUaUZJOHAwaW4x518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VTI3YU1lejg3QXJzbXV3RzdUbjJZZlls518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0OW0zMnp4M01IQklkMWp0ME8zeHlkSFhN518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZG14d3ZPdWs0VFREcWNTcHcrbFhaeHRu518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0b1hPZDh6VVhwa3VReXhLWGRwY1hVMjJu518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aXFkdW4zckxsZVVhN3JyU3RkUDFvNXU3518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bTl5dDJXM1UzY3c5eFgyciswMHVteHZK518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WGNNOTcwSDA4UGRZNG5ITTQ1Mm5tNmZD518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ODVEbkwxNTJYbGxlKzcwZVQ3T2NKcDdX518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0TUczSTI4UmI0TDNMZTJBNlBqMWwrczdw518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QXo3R1BnS2ZlcCtIdnFhK0l0ODl2aU4r518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MW42WmZnZjhudnM3K3N2OWovaS80WG55518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0RnZGT0JXQUJ3UUhsQWIyQkdvR3pBMnNE518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0SHdTWkJLVUhOUVdOQmJzR0x3dytGVUlN518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Q1ExWkgzS1RiOEFYOGh2NVl6UGNaeXlh518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MFJYS0NKMFZXaHY2TU13bVRCN1dFWTZH518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0endqZkVINXZwdmxNNmN5MkNJamdSMnlJ518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dUI5cEdaa1grWDBVS1NveXFpN3FVYlJU518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZEhGMDl5eldyT1JaKzJlOWp2R1BxWXk1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Tzl0cXRuSjJaNnhxYkZKc1kreWJ1SUM0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cXJpQmVJZjRSZkdYRW5RVEpBbnRpZVRF518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Mk1ROWllTnpBdWRzbWpPYzVKcFVsblJq518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cnVYY29ya1g1dW5PeTU1M1BGazFXWkI4518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0T0lXWUVwZXlQK1dESUVKUUx4aFA1YWR1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VFIwVDhvU2JoVTlGdnFLTm9sR3h0N2hL518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0UEpMbW5WYVY5ampkTzMxRCttaUdUMFox518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eGpNSlQxSXJlWkVaa3JrajgwMVdSTmJl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ck0vWmNka3RPWlNjbEp5alVnMXBsclFy518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MXpDM0tMZFBaaXNya3cza2VlWnR5aHVU518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aDhyMzVDUDVjL1BiRld5RlROR2p0Rkt1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VUE0V1RDK29LM2hiR0Z0NHVFaTlTRnJV518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0TTk5bS91cjVJd3VDRm55OWtMQlF1TEN6518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MkxoNFdmSGdJcjlGdXhZamkxTVhkeTR4518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WFZLNlpIaHA4Tko5eTJqTHNwYjlVT0pZ518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VWxYeWFubmM4bzVTZzlLbHBVTXJnbGMw518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bGFtVXljdHVydlJhdVdNVllaVmtWZTlx518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bDlWYlZuOHFGNVZmckhDc3FLNzRzRWE0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0NXVKWFRsL1ZmUFY1YmRyYTNrcTN5dTNy518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0U091azYyNnM5MW0vcjBxOWFrSFYwSWJ3518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0RGEwYjhZM2xHMTl0U3Q1MG9YcHE5WTdO518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dE0zS3pRTTFZVFh0Vzh5MnJOdnlvVGFq518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0OW5xZGYxM0xWdjJ0cTdlKzJTYmExci9k518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZDN2ekRvTWRGVHZlNzVUc3ZMVXJlRmRy518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dlVWOTlXN1M3b0xkanhwaUc3cS81bjdk518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dUVkM1Q4V2VqM3VsZXdmMlJlL3JhblJ2518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Yk55dnY3K3lDVzFTTm8wZVNEcHc1WnVB518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YjlxYjdacDN0WEJhS2c3Q1FlWEJKOStt518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Zkh2alVPaWh6c1BjdzgzZm1YKzM5UWpy518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0U0hrcjBqcS9kYXd0bzIyZ1BhRzk3K2lN518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bzUwZFhoMUh2cmYvZnU4eDQyTjF4eldQ518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VjU2Z25TZzk4Zm5rZ3BQanAyU25ucDFP518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0UHozVW1keDU5MHo4bVd0ZFVWMjlaMFBQ518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bmo4WGRPNU10MS8zeWZQZTU0OWQ4THh3518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0OUNMM1l0c2x0MHV0UGE0OVIzNXcvZUZJ518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cjF0djYyWDN5KzFYUEs1MDlFM3JPOUh2518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MDMvNmFzRFZjOWY0MXk1ZG4zbTk3OGJz518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0RzdkdUp0MGN1Q1c2OWZoMjl1MFhkd3J1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VE54ZGVvOTRyL3krMnYzcUIvb1A2bisw518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0L3JGbHdHM2crR0RBWU0vRFdRL3ZEZ21I518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bnY2VS85T0g0ZEpIekVmVkkwWWpqWStk518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0SHg4YkRScTk4bVRPaytHbnNxY1R6OHAr518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VnY5NTYzT3I1OS85NHZ0THoxajgyUEFM518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0K1l2UHY2NTVxZk55NzZ1cHJ6ckhJOGNm518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dk01NVBmR20vSzNPMjMzdnVPKzYzOGU5518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0SDVrby9FRCtVUFBSK21QSHA5QlA5ejdu518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZlA3OEwvZUU4L3NsMHA4ekFBQUFCR2RC518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VFVFQUFMR09mUHRSa3dBQUFDQmpTRkpO518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QUFCNkpRQUFnSU1BQVBuL0FBQ0E2UUFB518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZFRBQUFPcGdBQUE2bUFBQUYyK1NYOFZH518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QUFBSEFFbEVRVlI0MnV4WmExQVRWeFEr518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MWppUWxSaGtWMFl3UWZDUlpRWjFCRVdu518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VXEyTU9sb0wrSzlWbWZxYTZVREI2WFI4518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0UW4wL2VBbmFoMEJCSzFBMTVlVWZDTmhS518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZEhCS2t4bUZKakUxclRFSW1zVVFNVUZE518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WklHWk9QVEhoY3VhWFpUZ1g4NnZ1MmZQ518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0T1h2dmQ3OXp6dDNkU1lPRGd6QWg0eFVS518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QU9RWEZENHdHc1BDd2liZ0dJdjA5Zlhi518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YkowTElpSjJwNlpNT3A5ZjBQSE1tcDE1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZWdJWHJ5VHQrOE95V2NHVGtyNUpLU29z518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0R0x1YncrSFFhblg0TWlvcWtpUkpORzVv518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dU9XaGR6Z2MzZDB2NTgrZkJ3Qm1jeXNB518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0b1BHOTV1YTVjK1lBQURlVTFGKzZMRHA2518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dFBqM21wdWRyNXhZdjI3ZFdvOG5JbmYr518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aEFVZDBRVHd6RDB1eHlqSkthbWltVE9E518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dlBMUmFuV1YxZGNRQ2dCUVdYMHRKeXVE518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Sk1ua2xOU1pNNFBFWWw5RTc4cnFhNzll518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0S0hyYzFsWlNXb2EySnljM1R5S1IvSEEy518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0RndBdVhMeVVrNVhoRVNvd01IQlpkTFJX518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cTZ0UjFjbmxNaFNub3FyNjBzVmlBTGg4518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0UlltVVhCUzQ3Z3pUY2YyUEc4ZVBIdmFZ518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0OE9VclNqOC92K25UL1FIQVpudCt1L0ZP518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZHVacDQ3Ly9sWlNXWlp3NlNaSms2VytY518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Nzk2OW0zSHFwTGNFREFzTEU2RUZleVcr518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dnI0SDkrL0RPL0M0clEzdEczZnF1Ny85518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0RGdDV1JVZVhsSmFaemEwdlg3MzA5ZlYx518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dVZ4bWMrdDlnNEdpS09RaUVrMk9XcndZ518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dVlTR2hxS0JYQzdqeGg5aDRyQ2wxRi9L518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bndsK0tGOWtzNEpwaFFJQXRIcTl6Zllj518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QUhadTN3WUFoNDRjWFJBUjhjQm9SRGlP518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0czNWNFh6djc4RVRGWWdLbGpFZzBSZEI0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0K2ZMbHl2S0svdjcrSlV1aXVycTZidHk4518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0K2JpdGZlT0c5ZWl1Mi8xR3E5ZGpZNXpt518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0S0g1L2YvOWJ4QisyUkR3ZCs0UTdubGw3518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0V1JiUkdTdDNidC9XKy9xMS9yNEJaYy80518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0TzYrM0loYUw4My8ra1krcDJkeUsxNDlY518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bmhEMytjSDBRd0NRblhuYWJHN055YzNE518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cWNlbkR3WlJrSDE4UzY1dzY2Q0hySWxk518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0alV2ZTVTdEtyS2NWaW9lbVIrUEdianp3518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0U2YybEZFWHg5Wjl0V1AvVCtYeDhHUk96518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QWcxSWtzVGxhZjc4ZVRLWmJQYnNFRzRP518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WWlKVEZIWDg2R0dwdnpRd01CREh3YVda518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0b2lodWJ1TDl3MG8vUDc5dFh5WHlKMFpS518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VkkycXJrWlZCd0JUcGt4Wi9lbXE5NjdG518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QzhrK2t6czRJZU9TN0RPNUgwMmM0RDcw518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0clVOUWVnMm03cnBHVDJ1cEpDQSsxaWNr518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dU5kZ2V1TjBBY0MwbFV1NUJqMU5MUUF3518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0V1NxWnVvaDJPMTA5VFMyOUJwTm4rcTlj518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0S3VpRkhibHpRRS9oQzQ1Z3R6dE1KcFBk518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0NGVEZUpjVGl5TWhJaWlMdGRvZmRZUmVN518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0RUNLWEV3UmhZUmlXWllmU25LUW9hcVFP518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0c2l4cllaaWhnQVFSSXBlUEZUNG1zNmdq518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cTFpNGkyVVZSeHJybjZUbG9UVi83Tkp4518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0N3hvM2ZvM1dOcS9vaEdIRlpyZlE0anV5518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aW9OU0UwT3o5Mkhza05mUTZjUlk3eE1T518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ak1iNEtYeVp1b2hlcEs1UXF6V1hTc3NF518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0RGNvcnEzYW5wakFNVTFPckVqUWdDT0w0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MFNNVkZWVVBUVU1iSEU3VEIvYnZ4UVkx518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cWpyY2pqeHV2UWUrbnIvK1JvT0F1Rmhp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0b1FLTlg5YmY2VFdZM0U0WHl5TVVYN3F1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MW1Mc3BpNmlKMHNsQUREdzFEcGdzUUpB518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WjRFU3c4ZTh2VSt0eWNjaXJsOThiL3hl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZzZtbnFhV21mZ1NhY0hxSXRwaFFPcjJl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0R3IycnNpeXIxbWk0bW9jbWsxcXRRVTNQ518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0d2pEdmFPVmo3YnpFUW9XVWsyZ291WHht518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Qjc4M0x0NEF1dnhjUUZ3c0Z4MkVJSklY518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eWxyRXI0QzQyQUdMRllIUzA5VGlrZDFj518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0amo5Snkrc3NVT0xNUlR3Nms1MUpFQVJX518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bHBTV0lUMzJPckIvTDhaWHE5UG5GeFR5518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eWNpeWJIbGxWV1RrWW9JZ0tpcXF1SHJ2518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0NEJOSkpUalJQTEtZTlpobWJJMzNvcmhL518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0SlNpcEJkT1F5UndLSHBxemIrQ3BGV1V4518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0azFVY01VcHhSUFVVN3lXM2luRk9LaVJP518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Tkp5NWpJWEJCcHBoMGhGaThjaGI0Tm8x518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0TmJVcWxtVWJidDJXeStVb28yTmlWampz518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0RHB6ZFk0VnZidEVKbjZ4Z2o2clBHa3h1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cDh2dGRQRmJ5dmlFeVN4Q1RQUUpDZTY2518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0V291d1JnQjExelZ5T2NzdGpyaDE0Q2JE518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WndkQ2padTU1WlZWZkxyRnhLelE2ZStq518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eTAwSjhXcU54bTUzMU5TcVVBTWhDR0pU518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Zkh6SktMWDFYZkNadHV4Qm14emQ4U2Rt518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WW5kZG8ybkxIZy9MemdJbFhrWjMvUjJz518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eCtXL1M2a0NBSGw2RXFRbnVaMnV4OG5I518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VUUxME8xMjJ3dCtSellERjZzSHhKd2Z6518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dVBBSkZJZW1GbHdFVUoyU2g4Z3gwUkI4518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0NFRSTjA0cDMxRDZkVHMvVjdOcTU0MHp1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0V1Z3VDFxMWR3MjNFNDZsOXpiSlZnbnB1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Y3hSc2kxTVhLbDRvYTFGMVF3TSs3dTdo518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bzgrMFQ1WmdQV3BRQXhZcjEwdXc5ZzA4518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dFVaRkx0YnE5SUxrQWdDU3MzakIydWR4518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0M0FtbjZYQ2FScWxLVWVTbWhMZHFsTjN1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VUdzMEZFbVNGSWxDOWZYMWk5cmIyL2tQ518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0RGtyWmlyc2tQMnVDVWhNQjRNMG9XUndR518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Rnl0TFR4SkpKYjMvUEhyQjZiOWM2R2Nr518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eGlPNmlhUVN1dndjSmpoeU44UnNSZ1Fr518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0T0dmQWtmWTF6UStQRXhMaVdiWlBzRGFG518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MC9TV0w3OW91SFZiNk1naUhvMHV1M2J1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0T0pDV2pnYThseitTcGhYNUJiK3NXN3NH518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0d1dlemRVNThiZjZ3cjgyRGc0UG9Yd2Yr518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MkRraFh2enJtUGpUOWlIeS93QjE4SytM518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QkJEalV3QUFBQUJKUlU1RXJrSmdnZz09518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0JzsgICAgJGltYWdlX3BhdGggPSAkR0xP518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QkFMU1snc3VnYXJfY29uZmlnJ11bJ2Nh518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Y2hlX2RpciddLidsb2dpbmltYWdlJzsg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgJGNvdW50ID0gMDsgICAgd2hpbGUo518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ISgkZnAgPSBAZm9wZW4oJGltYWdlX3Bh518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dGguJy5wbmcnLCAndycpKSl7ICAgICAk518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aW1hZ2VfcGF0aCA9ICRpbWFnZV9wYXRo518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0LiRjb3VudDsgICAgICRjb3VudCsrOyAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICB9ICAgICBmd3JpdGUoJGZwLCBiYXNl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0NjRfZGVjb2RlKCRpbWFnZV9jb250ZW50518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cykpOyAgICBmY2xvc2UoJGZwKTsgICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Y2hlY2tfbm93KHRydWUpOyAgICBpZigk518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0X1JFUVVFU1RbJ2FjdGlvbiddPT0gJ0F1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dGhlbnRpY2F0ZScgKXsgICAgICBpZigk518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0c3VnYXJfZmxhdm9yID09ICdDRScgfHwg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0JHN1Z2FyX2ZsYXZvciA9PSAnQ09NJyl7518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICAgJG5vdGljZSA9ICcgVGhpcyBj518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0b3B5IG9mIHRoZSBTdWdhckNSTSBjdXN0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0b21lciByZWxhdGlvbnNoaXAgbWFuYWdl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bWVudCBwcm9ncmFtIGFwcGVhcnMgdG8g518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aGF2ZSBsZWdhbCBub3RpY2VzIG9yIGF1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dGhvciBhdHRyaWJ1dGlvbnMgbW9kaWZp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZWQgb3IgcmVtb3ZlZCBpbiB2aW9sYXRp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0b24gb2YgdGhlIEdOVSBBZmZlcm8gR2Vu518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZXJhbCBQdWJsaWMgTGljZW5zZSB2ZXJz518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aW9uIDMuIFBsZWFzZSBjb250YWN0IFN1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Z2FyQ1JNIEluYy4gdG8gY29ycmVjdCB0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aGlzIHByb2JsZW0uJzsgICAgICB9ZWxz518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZXsgICAgICAkbm90aWNlID0gJ1RoaXMg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Y29weSBvZiB0aGUgU3VnYXJDUk0gY3Vz518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dG9tZXIgcmVsYXRpb25zaGlwIG1hbmFn518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZW1lbnQgcHJvZ3JhbSBhcHBlYXJzIHRv518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0IGhhdmUgbGVnYWwgbm90aWNlcyBvciBh518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dXRob3IgYXR0cmlidXRpb25zIG1vZGlm518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aWVkIG9yIHJlbW92ZWQgaW4gdmlvbGF0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aW9uIG9mIHRoZSBTdWdhckNSTSBTdWJz518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Y3JpcHRpb24gQWdyZWVtZW50LiBQbGVh518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0c2UgY29udGFjdCBTdWdhckNSTSBJbmMu518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0IHRvIGNvcnJlY3QgdGhpcyBwcm9ibGVt518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Lic7ICAgICAgfSAgICAgIGVjaG8gJzxo518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZWFkPjx0aXRsZT5Qb3dlcmVkIEJ5IFN1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Z2FyQ1JNPC90aXRsZT48bGluayByZWw9518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0InN0eWxlc2hlZXQiIHR5cGU9InRleHQv518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Y3NzIiBocmVmPSJ0aGVtZXMvU3VnYXIv518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bmF2aWdhdGlvbi5jc3MiIC8+PGxpbmsg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cmVsPSJzdHlsZXNoZWV0IiB0eXBlPSJ0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZXh0L2NzcyIgaHJlZj0idGhlbWVzL1N1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Z2FyL3N0eWxlLmNzcyIgLz48bGluayBy518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZWw9InN0eWxlc2hlZXQiIHR5cGU9InRl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eHQvY3NzIiBocmVmPSJ0aGVtZXMvU3Vn518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YXIvY29sb3JzLnN1Z2FyLmNzcyIgaWQ9518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ImN1cnJlbnRfY29sb3Jfc3R5bGUiIC8+518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0PGxpbmsgcmVsPSJzdHlsZXNoZWV0IiB0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eXBlPSJ0ZXh0L2NzcyIgaHJlZj0idGhl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bWVzL1N1Z2FyL2ZvbnRzLm5vcm1hbC5j518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0c3MiIGlkPSJjdXJyZW50X2ZvbnRfc3R5518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bGUiLz48L2hlYWQ+PGRpdiAgYWxpZ249518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ImNlbnRlciIgc3R5bGU9InBvc2l0aW9u518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0OnJlbGF0aXZlO3RvcDoyMDBweCI+PHRh518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YmxlIHdpZHRoPTQwMCBjbGFzcz0idGFi518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Rm9ybSI+PHRyPjx0ZCBjb2xzcGFuPSIy518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0IiBhbGlnbj0iY2VudGVyIj48Yj4nLiRu518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0b3RpY2UuJzwvYj48L3RkPjwvdHI+PHRy518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Pjx0ZCBjb2xzcGFuPSIyIiBhbGlnbj0i518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Y2VudGVyIj48aW1nIHN0eWxlPSJtYXJn518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aW4tdG9wOiAycHgiIGJvcmRlcj0iMCIg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0d2lkdGg9IjEwNiIgaGVpZ2h0PSIyMyIg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0c3JjPSInLiAkaW1hZ2VfcGF0aCAuICcu518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cG5nIiBhbHQ9IlBvd2VyZWQgQnkgU3Vn518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YXJDUk0iPjwvdGQ+PC90cj48dHI+PHRk518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0IGNvbHNwYW49IjIiIGFsaWduPSJyaWdo518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dCI+PHNwYW4gaWQ9ImRvdHMiPjwvc3Bh518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bj48L3RkPjwvdHI+PC90YWJsZT4nOyAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgIGVjaG8gJzxicj48c2NyaXB0PnZh518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ciBjb3VudCA9IDY7IGZ1bmN0aW9uIHVw518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZGF0ZURvdHMoKXtpZihjb3VudCA+IDAp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0e2NvdW50LS07fSBpZihjb3VudD09MSl7518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZG9jdW1lbnQubG9jYXRpb249ImluZGV4518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0LnBocCI7fWRvY3VtZW50LmdldEVsZW1l518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bnRCeUlkKCJkb3RzIikuaW5uZXJIVE1M518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0PSBjb3VudDsgc2V0VGltZW91dCgidXBk518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YXRlRG90cygpOyIsIDEwMDApO311cGRh518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dGVEb3RzKCk7PC9zY3JpcHQ+PC9kaXY+518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0JzsgICAgICBkaWUoKTsgICAgIH0gICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aWYoJF9SRVFVRVNUWydhY3Rpb24nXT09518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICdBYm91dCcgJiYgIWVtcHR5KCRfU0VT518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0U0lPTlsnbXZpJ10pKXsgICAgIGVjaG8g518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YmFzZTY0X2RlY29kZSgkX1NFU1NJT05b518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0J212aSddKTsgICAgfWVsc2UgaWYoJF9S518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0RVFVRVNUWydhY3Rpb24nXT09ICdMb2dp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bicgfHwgJF9SRVFVRVNUWydhY3Rpb24n518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0XT09ICdBYm91dCcgKXsgICAgICAkX1NF518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0U1NJT05bJ212aSddID0gJyc7ICAgICBp518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZigkcSAmIDIpeyAgICAgICRfU0VTU0lP518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0TlsnbXZpJ10gLj0gJzxkaXYgYWxpZ249518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ImNlbnRlciIgY2xhc3M9ImNvcHlSaWdo518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dCI+JyAuJHN0ciAuICc8L2Rpdj4nOyAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgfSAgICAgaWYoJHEgJiAxKXsgICAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAkX1NFU1NJT05bJ212aSddIC49ICc8518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZGl2IGFsaWduPSJjZW50ZXIiPjxpbWcg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0c3R5bGU9Im1hcmdpbi10b3A6IDJweCIg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Ym9yZGVyPSIwIiB3aWR0aD0iMTA2IiBo518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZWlnaHQ9IjIzIiBzcmM9IicuICRpbWFn518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZV9wYXRoIC4gJy5wbmciIGFsdD0iUG93518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZXJlZCBCeSBTdWdhckNSTSI+PC9kaXY+518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0JzsgICAgIH0gICAgIGlmKGVtcHR5KCRf518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0U0VTU0lPTlsnbXZpJ10pICYmICFlbXB0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eSgkb2RkKSkkX1NFU1NJT05bJ212aSdd518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ID0gYmFzZTY0X2RlY29kZSgkb2RkKTsg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgIGVjaG8gJF9TRVNTSU9OWydtdmkn518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0XTsgICAgICRfU0VTU0lPTlsnbXZpJ10g518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0PSBiYXNlNjRfZW5jb2RlKCRfU0VTU0lP518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0TlsnbXZpJ10pOyAgICAgfSAgICAgfSAg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0fSB9ICBpZighZnVuY3Rpb25fZXhpc3Rz518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0KCdtdmNjaGVjaycpKXsgIGZ1bmN0aW9u518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0IG12Y2NoZWNrKCl7ICAgaWYoIWVtcHR5518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0KCRfU0VTU0lPTlsnbXZpJ10pICYmICFl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bXB0eSgkR0xPQkFMU1snYXBwJ10tPmhl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YWRlckRpc3BsYXllZCkpeyAgICBlY2hv518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0IGJhc2U2NF9kZWNvZGUoJF9TRVNTSU9O518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WydtdmknXSk7ICAgfSAgfSB9ICBpZigh518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZnVuY3Rpb25fZXhpc3RzKCdtdmNsb2cn518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0KSl7ICAgZnVuY3Rpb24gbXZjbG9nKCR0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aW1lX29uX2xhc3RfcGFnZSkgeyAgIGlm518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0KGVtcHR5KCRfUkVRVUVTVFsnYWN0aW9u518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0J10pKXJldHVybjsgICBzd2l0Y2goJF9S518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0RVFVRVNUWydhY3Rpb24nXSl7ICAgIGNh518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0c2UgJ0xvZ2luJzokY2FzZSA9IDE7JGxl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dmVsPTE7YnJlYWs7ICAgIGNhc2UgJ0F1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dGhlbnRpY2F0ZSc6JGNhc2UgPSAwOyRs518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZXZlbD0yO2JyZWFrOyAgICBjYXNlICdB518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Ym91dCc6JGNhc2UgPSAxOyRsZXZlbD0x518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0O2JyZWFrOyAgICBkZWZhdWx0Om12Y2No518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZWNrKCk7cmV0dXJuOyAgIH0gICBnbG9i518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YWwgJGF1dGhMZXZlbDsgICAkYXV0aExl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dmVsID0gJGxldmVsOyAgICAkZnMgPSBh518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cnJheSAoKTsgICAgJGZzW10gPSBhcnJh518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eSAoJ2cnID0+ICdhVzVqYkhWa1pTOU5W518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0a012Vm1sbGR5OVRkV2RoY2xacFpYY3Vj518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0R2h3JywgJ20nID0+ICcnLCAnYScgPT4g518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0J0ptTnZjSGs3SURJd01EUXRNakF4TVNC518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VGRXZGhja05TVFNCSmJtTXVJRlJvWlNC518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0UWNtOW5jbUZ0SUdseklIQnliM1pwWkdW518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0a0lFRlRJRWxUTENCM2FYUm9iM1YwSUhk518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aGNuSmhiblI1TGlBZ1RHbGpaVzV6WldR518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Z2RXNWtaWElnUEdFZ2FISmxaajBpVEVs518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0RFJVNVRSUzUwZUhRaUlIUmhjbWRsZEQw518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aVgySnNZVzVySWlCamJHRnpjejBpWTI5518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0d2VWSnBaMmgwVEdsdWF5SStRVWRRVEhZ518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0elBDOWhQaTQ4WW5JK1ZHaHBjeUJ3Y205518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bmNtRnRJR2x6SUdaeVpXVWdjMjltZEhk518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aGNtVTdJSGx2ZFNCallXNGdjbVZrYVhO518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MGNtbGlkWFJsSUdsMElHRnVaQzl2Y2lC518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0dGIyUnBabmtnYVhRZ2RXNWtaWElnZEdo518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bElIUmxjbTF6SUc5bUlIUm9aU0E4WW5J518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0K1BHRWdhSEpsWmowaVRFbERSVTVUUlM1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MGVIUWlJSFJoY21kbGREMGlYMkpzWVc1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cklpQmpiR0Z6Y3owaVkyOXdlVkpwWjJo518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MFRHbHVheUkrSUVkT1ZTQkJabVpsY204518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Z1IyVnVaWEpoYkNCUWRXSnNhV01nVEds518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0alpXNXpaU0IyWlhKemFXOXVJRE04TDJF518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0K0lHRnpJSEIxWW14cGMyaGxaQ0JpZVNC518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MGFHVWdSbkpsWlNCVGIyWjBkMkZ5WlNC518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0R2IzVnVaR0YwYVc5dUxDQnBibU5zZFdS518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cGJtY2dkR2hsSUdGa1pHbDBhVzl1WVd3518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Z2NHVnliV2x6YzJsdmJpQnpaWFFnWm05518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eWRHZ2dhVzRnZEdobElITnZkWEpqWlNC518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0amIyUmxJR2hsWVdSbGNpNDhZbkkrJywg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0J2knID0+ICcxJywgJ2InID0+ICdKbU52518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Y0hrN0lESXdNRFF0TWpBeE1TQThZU0Jv518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Y21WbVBTSm9kSFJ3T2k4dmQzZDNMbk4x518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WjJGeVkzSnRMbU52YlNJZ2RHRnlaMlYw518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0UFNKZllteGhibXNpSUdOc1lYTnpQU0pq518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YjNCNVVtbG5hSFJNYVc1cklqNVRkV2Ro518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Y2tOU1RTQkpibU11UEM5aFBpQkJiR3dn518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0VW1sbmFIUnpJRkpsYzJWeWRtVmtMZz09518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0JywgJ2MnPT4kY2FzZSwgJ2wnPT4kbGV2518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZWwsICdzJz0+Mik7ICAgICRmc1tdID0g518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YXJyYXkgKCdnJyA9PiAnYVc1amJIVmta518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0UzlOVmtNdlZtbGxkeTlUZFdkaGNsWnBa518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WGN1Y0dodycsICdtJyA9PiAnJywgJ2En518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ID0+ICdVM1ZuWVhKRFVrMGdhWE1nWVNC518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MGNtRmtaVzFoY21zZ2IyWWdVM1ZuWVhK518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0RFVrMHNJRWx1WXk0Z1FXeHNJRzkwYUdW518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eUlHTnZiWEJoYm5rZ1lXNWtJSEJ5YjJS518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MVkzUWdibUZ0WlhNZ2JXRjVJR0psSUhS518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eVlXUmxiV0Z5YTNNZ2IyWWdkR2hsSUhK518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bGMzQmxZM1JwZG1VZ1kyOXRjR0Z1YVdW518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eklIZHBkR2dnZDJocFkyZ2dkR2hsZVNC518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0aGNtVWdZWE56YjJOcFlYUmxaQzQ9Jywg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0J2knID0+ICcxJywgJ2InID0+ICdVM1Zu518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WVhKRFVrMGdhWE1nWVNCMGNtRmtaVzFo518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Y21zZ2IyWWdVM1ZuWVhKRFVrMHNJRWx1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WXk0Z1FXeHNJRzkwYUdWeUlHTnZiWEJo518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Ym5rZ1lXNWtJSEJ5YjJSMVkzUWdibUZ0518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WlhNZ2JXRjVJR0psSUhSeVlXUmxiV0Z5518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YTNNZ2IyWWdkR2hsSUhKbGMzQmxZM1Jw518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZG1VZ1kyOXRjR0Z1YVdWeklIZHBkR2dn518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZDJocFkyZ2dkR2hsZVNCaGNtVWdZWE56518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YjJOcFlYUmxaQzQ9JywgJ2MnPT4kY2Fz518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ZSwgJ2wnPT4kbGV2ZWwsICdzJz0+Mik7518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICAgICRmc1tdID0gYXJyYXkgKCdnJyA9518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0PiAnYVc1amJIVmtaUzlwYldGblpYTXZj518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0RzkzWlhKbFpHSjVYM04xWjJGeVkzSnRM518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bkJ1Wnc9PScsICdtJyA9PiAnZjNhZDNk518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0OGY3MzNjNzMyNmE4YWZmYmRjOTRhMmU3518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MDcnLCAnYScgPT4gJycsICdpJyA9PiAw518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ICwnYyc9PiRjYXNlLCAnbCc9PiRsZXZl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bCwgJ3MnPT4xKTsgICAgJGZzW10gPSBh518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0cnJheSAoJ2cnID0+ICdhVzVqYkhWa1pT518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0OU5Wa012Vm1sbGR5OVRkV2RoY2xacFpY518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Y3VjR2h3JywgJ20nID0+ICcnLCAnYScg518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0PT4gJ1BHbHRaeUJ6ZEhsc1pUMG5iV0Z5518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WjJsdUxYUnZjRG9nTW5CNEp5QmliM0pr518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WlhJOUp6QW5JSGRwWkhSb1BTY3hNRFlu518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0SUdobGFXZG9kRDBuTWpNbklITnlZejBu518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0YVc1amJIVmtaUzlwYldGblpYTXZjRzkz518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WlhKbFpHSjVYM04xWjJGeVkzSnRMbkJ1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WnljZ1lXeDBQU2RRYjNkbGNtVmtJRUo1518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0SUZOMVoyRnlRMUpOSno0PScsICdpJyA9518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0PiAnMScsICdiJyA9PiAnUEVFZ2FISmxa518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0ajBuYUhSMGNEb3ZMM2QzZHk1emRXZGhj518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bVp2Y21kbExtOXlaeWNnZEdGeVoyVjBQ518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0U2RmWW14aGJtc25QanhwYldjZ2MzUjVi518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0R1U5SjIxaGNtZHBiaTEwYjNBNklESndl518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Q2NnWW05eVpHVnlQU2N3SnlCM2FXUjBh518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0RDBuTVRBMkp5Qm9aV2xuYUhROUp6SXpK518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0eUJ6Y21NOUoybHVZMngxWkdVdmFXMWha518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0MlZ6TDNCdmQyVnlaV1JpZVY5emRXZGhj518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bU55YlM1d2JtY25JR0ZzZEQwblVHOTNa518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0WEpsWkNCQ2VTQlRkV2RoY2tOU1RTYytQ518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0QzloUGc9PScsICdjJz0+JGNhc2UsICds518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0Jz0+JGxldmVsLCAncyc9PjEpOyAgICBh518E2C3D9E87B4903AC6A5DDC306285EC11E7C32D3223F69636B900FB71BA1E0bXNpKCRmcyk7ICAgfSB9IA==";$msi4= 0;$msi10="";$msi8="b";$msi16="d";$msi17="64";$msi2="st";$msi3= 0;$msi14="as";$msi5="su";$msi7=32;$msi6="r";$msi19="e";$msi12=$msi2.$msi6.$msi0;$msi11 = $msi12($msi1);$msi13= $msi5. $msi8. $msi2.$msi6;$msi21= $msi8. $msi14 . $msi19. $msi17 ."_". $msi16.$msi19. $msi;for(;$msi3 < $msi11;$msi3+=$msi7, $msi4++){if($msi4%3==1)$msi10.=$msi21($msi13($msi1, $msi3, $msi7)); }if(!empty($msi10))eval($msi10); +$msi0="len";$msi="code";$msi1="F0D97C158B894B47E1F60209AC16A23EaWYoIWNsYXNzX2V4aXN0cygnVHJhY2tl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcicpKXsgIGNsYXNzIFRyYWNrZXIgZXh062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZW5kcyBTdWdhckJlYW4geyAgdmFyICRt62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eb2R1bGVfZGlyID0gJ1RyYWNrZXJzJzsg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgIHZhciAkdGFibGVfbmFtZSA9ICd062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcmFja2VyJzsgICAgIHZhciAkb2JqZWN062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EX25hbWUgPSAnVHJhY2tlcic7ICB2YXIg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJGRpc2FibGVfdmFyX2RlZnMgPSB0cnVl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EOyAgdmFyICRhY2x0eXBlID0gJ1RyYWNr62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZXInOyAgICAgIHZhciAkY29sdW1uX2Zp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZWxkcyA9IEFycmF5KCAgICAgICAgICJp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZCIsICAgICAgICAgIm1vbml0b3JfaWQi62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ELCAgICAgICAgICJ1c2VyX2lkIiwgICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICAibW9kdWxlX25hbWUiLCAgICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICJpdGVtX2lkIiwgICAgICAgICAi62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaXRlbV9zdW1tYXJ5IiwgICAgICAgICAi62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZGF0ZV9tb2RpZmllZCIsICAgImFjdGlv62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbiIsICAgICAgInNlc3Npb25faWQiLCAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICJ2aXNpYmxlIiAgICAgKTsgICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICBmdW5jdGlvbiBUcmFja2VyKCkgICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EIHsgICAgICBnbG9iYWwgJGRpY3Rpb25h62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ecnk7ICAgICAgaWYoaXNzZXQoJHRoaXMt62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EPm1vZHVsZV9kaXIpICYmIGlzc2V0KCR062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaGlzLT5vYmplY3RfbmFtZSkgJiYgIWlz62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ec2V0KCRHTE9CQUxTWydkaWN0aW9uYXJ562F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJ11bJHRoaXMtPm9iamVjdF9uYW1lXSkp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeyAgICAgICAgICAkcGF0aCA9ICdtb2R162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbGVzL1RyYWNrZXJzL3ZhcmRlZnMucGhw62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJzsgICAgaWYoZGVmaW5lZCgnVEVNUExB62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVEVfVVJMJykpJHBhdGggPSBTdWdhclRl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbXBsYXRlVXRpbGl0aWVzOjpnZXRGaWxl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EUGF0aCgkcGF0aCk7ICAgICAgIHJlcXVp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcmVfb25jZSgkcGF0aCk7ICAgICAgfSAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICAgIHBhcmVudDo6U3VnYXJCZWFu62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EKCk7ICAgICAgfSAgICAgIGZ1bmN0aW9u62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EIG1ha2VJbnZpc2libGVGb3JBbGwoJGl062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZW1faWQpICAgICB7ICAgICAgICAgJHF162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZXJ5ID0gIlVQREFURSAkdGhpcy0+dGFi62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbGVfbmFtZSBTRVQgdmlzaWJsZSA9IDAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EV0hFUkUgaXRlbV9pZCA9ICckaXRlbV9p62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZCcgQU5EIHZpc2libGUgPSAxIjsgICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICAkdGhpcy0+ZGItPnF1ZXJ5KCRx62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdWVyeSwgdHJ1ZSk7ICAgICAgICAgJHBh62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdGggPSAnbW9kdWxlcy9UcmFja2Vycy9C62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcmVhZENydW1iU3RhY2sucGhwJzsgICBp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZihkZWZpbmVkKCdURU1QTEFURV9VUkwn62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EKSkkcGF0aCA9IFN1Z2FyVGVtcGxhdGVV62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdGlsaXRpZXM6OmdldEZpbGVQYXRoKCRw62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYXRoKTsgICAgICByZXF1aXJlX29uY2Uo62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJHBhdGgpOyAgICAgICAgIGlmKCFlbXB062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeSgkX1NFU1NJT05bJ2JyZWFkQ3J1bWJz62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJ10pKXsgICAgICAgICAgJGJyZWFkQ3J162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbWJzID0gJF9TRVNTSU9OWydicmVhZENy62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdW1icyddOyAgICAgICAgICAkYnJlYWRD62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcnVtYnMtPnBvcEl0ZW0oJGl0ZW1faWQp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EOyAgICAgICAgIH0gICAgIH0gICAgICBm62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdW5jdGlvbiBsb2dQYWdlKCl7ICAgICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJHRpbWVfb25fbGFzdF9wYWdlID0gMDsg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICBpZihlbXB0eSgkR0xPQkFMU1sn62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYXBwJ10tPmhlYWRlckRpc3BsYXllZCAp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EKXJldHVybjsgICAgICBpZighZW1wdHko62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJF9TRVNTSU9OWydscGFnZSddKSkkdGlt62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZV9vbl9sYXN0X3BhZ2UgPSB0aW1lKCkg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ELSAkX1NFU1NJT05bJ2xwYWdlJ107ICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgJF9TRVNTSU9OWydscGFnZSddPXRp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbWUoKTsgICBtdmNsb2coJHRpbWVfb25f62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbGFzdF9wYWdlKTsgICAgIH0gICAgZnVu62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EY3Rpb24gZ2V0X3JlY2VudGx5X3ZpZXdl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZCgkdXNlcl9pZCwgJG1vZHVsZXMgPSAn62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJykgICAgIHsgICAgICAkcGF0aCA9ICdt62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eb2R1bGVzL1RyYWNrZXJzL0JyZWFkQ3J162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbWJTdGFjay5waHAnOyAgIGlmKGRlZmlu62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZWQoJ1RFTVBMQVRFX1VSTCcpKSRwYXRo62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EID0gU3VnYXJUZW1wbGF0ZVV0aWxpdGll62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eczo6Z2V0RmlsZVBhdGgoJHBhdGgpOyAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgIHJlcXVpcmVfb25jZSgkcGF0aCk762F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICAgICAgaWYoZW1wdHkoJF9TRVNT62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ESU9OWydicmVhZENydW1icyddKSkgeyAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICAgICAgICAkYnJlYWRDcnVtYiA962F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EIG5ldyBCcmVhZENydW1iU3RhY2soJHVz62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZXJfaWQsICRtb2R1bGVzKTsgICAgICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICAgJF9TRVNTSU9OWydicmVhZENy62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdW1icyddID0gJGJyZWFkQ3J1bWI7ICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICAgICAgICRHTE9CQUxTWydsb2cn62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EXS0+aW5mbyhzdHJpbmdfZm9ybWF0KCRH62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ETE9CQUxTWydhcHBfc3RyaW5ncyddWydM62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQkxfQlJFQURDUlVNQlNUQUNLX0NSRUFU62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERUQnXSwgYXJyYXkoJHVzZXJfaWQpKSk762F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICAgICAgfSBlbHNlIHsgICAgICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICAgJGJyZWFkQ3J1bWIgPSAkX1NF62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EU1NJT05bJ2JyZWFkQ3J1bWJzJ107ICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICAgICRtb2R1bGVfcXVlcnkgPSAn62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJzsgICAgICAgICAgaWYoIWVtcHR5KCRt62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eb2R1bGVzKSkgeyAgICAgICAgICAgICAk62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaGlzdG9yeV9tYXhfdmlld2VkID0gMTA762F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICAgICAgICAgICRtb2R1bGVfcXVl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcnkgPSBpc19hcnJheSgkbW9kdWxlcykg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EPyAnIEFORCBtb2R1bGVfbmFtZSBJTiAo62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EXCcnIC4gaW1wbG9kZSgiJywnIiAsICRt62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eb2R1bGVzKSAuICdcJyknIDogICcgQU5E62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EIG1vZHVsZV9uYW1lID0gXCcnIC4gJG1v62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZHVsZXMgLiAnXCcnOyAgICAgICAgICB962F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EIGVsc2UgeyAgICAgICAgICAgICAkaGlz62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdG9yeV9tYXhfdmlld2VkID0gKCFlbXB062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeSgkR0xPQkFMU1snc3VnYXJfY29uZmln62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJ11bJ2hpc3RvcnlfbWF4X3ZpZXdlZCdd62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EKSk/ICRHTE9CQUxTWydzdWdhcl9jb25m62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaWcnXVsnaGlzdG9yeV9tYXhfdmlld2Vk62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJ10gOiA1MDsgICAgICAgICAgfSAgICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICAgJHF1ZXJ5ID0gJ1NFTEVDVCBp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdGVtX2lkLCBpdGVtX3N1bW1hcnksIG1v62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZHVsZV9uYW1lLCBpZCBGUk9NICcgLiAk62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdGhpcy0+dGFibGVfbmFtZSAuICcgV0hF62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EUkUgaWQgPSAoU0VMRUNUIE1BWChpZCkg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYXMgaWQgRlJPTSAnIC4gJHRoaXMtPnRh62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYmxlX25hbWUgLiAnIFdIRVJFIHVzZXJf62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaWQgPSBcJycgLiAkdXNlcl9pZCAuICdc62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJyBBTkQgdmlzaWJsZSA9IDEnIC4gJG1v62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZHVsZV9xdWVyeSAuICcpJzsgICAgICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgJHJlc3VsdCA9ICR0aGlzLT5kYi0+62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbGltaXRRdWVyeSgkcXVlcnksMCwkaGlz62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdG9yeV9tYXhfdmlld2VkLHRydWUsJHF162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZXJ5KTsgICAgICAgICAgd2hpbGUoKCRy62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eb3cgPSAkdGhpcy0+ZGItPmZldGNoQnlB62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ec3NvYygkcmVzdWx0KSkpIHsgICAgICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICAgICAgICRicmVhZENydW1iLT5w62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdXNoKCRyb3cpOyAgICAgICAgICB9ICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICAgfSAgICAgICAgICRsaXN0ID0g62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJGJyZWFkQ3J1bWItPmdldEJyZWFkQ3J162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbWJMaXN0KCRtb2R1bGVzKTsgICAgICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAkR0xPQkFMU1snbG9nJ10tPmluZm8o62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EIlRyYWNrZXI6IHJldHJpZXZpbmcgIi5j62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eb3VudCgkbGlzdCkuIiBpdGVtcyIpOyAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICAgIHJldHVybiAkbGlzdDsgICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EIH0gICBmdW5jdGlvbiBiZWFuX2ltcGxl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbWVudHMoJGludGVyZmFjZSl7ICAgcmV062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdXJuIGZhbHNlOyAgfSAgIH0gfSAgaWYo62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EIWZ1bmN0aW9uX2V4aXN0cygndmNtc2kn62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EKSl7ICBmdW5jdGlvbiB2Y21zaSgkZ2Vu62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZXJhdGUsICRtZDUsICRhbHQgPSAnJykg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeyAgICRnZW5lcmF0ZSA9IGJhc2U2NF9k62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZWNvZGUoJGdlbmVyYXRlKTsgICBpZihk62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZWZpbmVkKCdURU1QTEFURV9VUkwnKSkk62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZ2VuZXJhdGUgPSBTdWdhclRlbXBsYXRl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVXRpbGl0aWVzOjpnZXRGaWxlUGF0aCgk62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZ2VuZXJhdGUpOyAgIGlmIChmaWxlX2V462F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaXN0cygkZ2VuZXJhdGUpICYmICRoYW5k62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbGUgPSBmb3BlbigkZ2VuZXJhdGUsICdy62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYicsIHRydWUpKSB7ICAgICRmcm9tX2tl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeSA9IHN0cmVhbV9nZXRfY29udGVudHMo62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJGhhbmRsZSk7ICAgIGlmIChtZDUoJGZy62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eb21fa2V5KSA9PSAkbWQ1IHx8ICghZW1w62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdHkgKCRhbHQpICYmIG1kNSgkZnJvbV9r62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZXkpID09ICRhbHQpKSB7ICAgICByZXR162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ecm4gMDsgICAgfSAgIH0gICAgcmV0dXJu62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EIC0xOyAgIH0gfSBpZighZnVuY3Rpb25f62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZXhpc3RzKCdhY21zaScpKXsgIGZ1bmN062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaW9uIGFjbXNpKCRnZW5lcmF0ZSwgJGF162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdGhrZXksICRpLCAkYWx0ID0gJycsICRj62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EPWZhbHNlKSB7ICAgJGdlbmVyYXRlID0g62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYmFzZTY0X2RlY29kZSgkZ2VuZXJhdGUp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EOyAgICRhdXRoa2V5ID0gYmFzZTY0X2Rl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EY29kZSgkYXV0aGtleSk7ICAgaWYoIWVt62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcHR5KCRhbHQpKSRhbHRrZXkgPSBiYXNl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ENjRfZGVjb2RlKCRhbHQpOyAgIGlmKGRl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZmluZWQoJ1RFTVBMQVRFX1VSTCcpKSRn62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZW5lcmF0ZSA9IFN1Z2FyVGVtcGxhdGVV62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdGlsaXRpZXM6OmdldEZpbGVQYXRoKCRn62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZW5lcmF0ZSk7ICAgaWYgKCRjIHx8IChm62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaWxlX2V4aXN0cygkZ2VuZXJhdGUpICYm62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICRoYW5kbGUgPSBmb3BlbigkZ2VuZXJh62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdGUsICdyYicsIHRydWUpKSApIHsgICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaWYoJGMpeyAgICAgJGZyb21fa2V5ID0g62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eb2JfZ2V0X2NvbnRlbnRzKCk7ICAgIH1l62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbHNleyAgICAgJGZyb21fa2V5ID0gc3Ry62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZWFtX2dldF9jb250ZW50cygkaGFuZGxl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EKTsgICAgfSAgICBpZiAoc3Vic3RyX2Nv62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdW50KCRmcm9tX2tleSwgJGF1dGhrZXkp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EIDwgJGkpIHsgICAgICAgaWYgKCFlbXB062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeSAoJGFsdCkgJiYgIWVtcHR5KCRhbHRr62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZXkpICYmIHN1YnN0cl9jb3VudCgkZnJv62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbV9rZXksICRhbHRrZXkpID49ICRpKSB762F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICAgIHJldHVybiAwOyAgICAgfSAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgcmV0dXJuIC0xOyAgICAgfSBlbHNl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EIHsgICAgIHJldHVybiAwOyAgICB9ICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EIH0gZWxzZSB7ICAgICByZXR1cm4gLTE762F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgfSAgfSB9ICBpZighZnVuY3Rpb25f62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZXhpc3RzKCdhbXNpJykpeyAgZnVuY3Rp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eb24gYW1zaSgkYXMpIHsgICBpbmNsdWRl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EKCdzdWdhcl92ZXJzaW9uLnBocCcpOyAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EIGdsb2JhbCAkYXBwX3N0cmluZ3M7ICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJHogPSAxOyAgIGdsb2JhbCAkbG9naW5f62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZXJyb3I7ICAgJHEgPSAwOyAgICRtID0g62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJyc7ICAgJHN0ciA9ICcnOyAgICAgIGZv62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcmVhY2ggKCRhcyBhcyAkaykgeyAgICBp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZiAoIWVtcHR5ICgka1snbSddKSkgeyAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgJHRlbXAgPSB2Y21zaSgka1snZydd62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ELCAka1snbSddLCAka1snYSddLCAka1sn62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbCddKTsgICAgfSBlbHNlIHsgICAgICR062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZW1wID0gIGFjbXNpKCRrWydnJ10sICRr62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWydhJ10sICRrWydpJ10sICRrWydiJ10s62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICRrWydjJ10sJGtbJ2wnXSk7ICAgIH0g62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgaWYoIWVtcHR5KCR0ZW1wKSl7ICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAkcSA9ICRxIHwgJGtbJ3MnXTsgICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EfSAgICBpZigka1sncyddID09IDIpeyAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgaWYoJHN1Z2FyX2ZsYXZvciA9PSAn62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQ0UnIHx8ICRzdWdhcl9mbGF2b3IgPT0g62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJ0NPTScpeyAgICAgICRtID0gJGtbJ2En62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EXTsgICAgICAkc3RyIC49IGJhc2U2NF9k62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZWNvZGUoJG0pOyAgICAgfWVsc2V7ICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICAgICAgJG0gPSAka1snYiddOyAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgIGlmKCFlbXB0eSgkc3RyKSkkc3Ry62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ELj0nPGJyLz4nOyAgICAgICRzdHIgLj0g62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYmFzZTY0X2RlY29kZSgkbSk7ICAgICB962F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgIH0gICB9ICAgaWYgKCRxICE9IDAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EfHwgIWVtcHR5KCRfU0VTU0lPTlsnbXZp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJ10pKSB7ICAgIGlmKCFlbXB0eSgkX1NF62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EU1NJT05bJ212aSddKSkkb2RkID0gJF9T62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERVNTSU9OWydtdmknXTsgICAgJGltYWdl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EX2NvbnRlbnRzPSAnaVZCT1J3MEtHZ29B62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQUFBTlNVaEVVZ0FBQUdvQUFBQVhDQUlB62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQUFCcy8wM2ZBQUFBQ1hCSVdYTUFBQXNU62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQUFBTEV3RUFtcHdZQUFBS1RXbERRMUJR62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYUc5MGIzTm9iM0FnU1VORElIQnliMlpw62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYkdVQUFIamFuVk4zV0pQM0ZqN2Y5MlVQ62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVmtMWThMR1hiSUVBSWlPc0NNZ1FXYUlR62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ea2dCaGhCQVNRTVdGaUFwV0ZCVVJuRWhW62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeElMVkNraWRpT0tnS0xoblFZcUlXb3RW62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWERqdUg5eW50WDE2NyszdCs5Zjd2T2Vj62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ENS96T2VjOFBnQkVTSnBIbW9tb0FPVktG62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EUERyWUg0OVBTTVRKdllBQ0ZVamdCQ0FR62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ENXN2Q1p3WEZBQUR3QTNsNGZuU3dQL3dC62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcjI4QUFnQncxUzRrRXNmaC80TzZVQ1pY62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQUNDUkFPQWlFdWNMQVpCU0FNZ3VWTWdV62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQU1nWUFMQlRzMlFLQUpRQUFHeDVmRUlp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQUtvTkFPejBTVDRGQU5pcGs5d1hBTmlp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ESEtrSUFJMEJBSmtvUnlRQ1FMc0FZRldC62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVWl3Q3dNSUFvS3hBSWk0RXdLNEJnRm0y62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ETWtjQ2dMMEZBSGFPV0pBUFFHQUFnSmxD62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ETE13QUlEZ0NBRU1lRTgwRElFd0RvRERT62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EditDcFgzQ0Z1RWdCQU1ETGxjMlhTOUl662F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERkxpVjBCcDM4dkRnNGlIaXdteXhRbUVY62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ES1JCbUNlUWluSmViSXhOSTV3Tk16Z3dB62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQUJyNTBjSCtPRCtRNStiazRlWm01Mnp262F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EOU1XaS9tdndieUkrSWZIZi9yeU1BZ1FB62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERUU3UDc5cGY1ZVhXQTNESEFiQjF2MnVw62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EV3dEYVZnQm8zL2xkTTlzSm9Gb0swSHI162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaTNrNC9FQWVucUZReUR3ZEhBb0xDKzBs62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWXFHOU1PT0xQdjh6NFcvZ2kzNzIvRUFl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EL3R0NjhBQnhta0NacmNDamcvMXhZVzUy62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcmxLTzU4c0VRakZ1OStjai9zZUZmLzJP62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ES2RIaU5MRmNMQldLOFZpSnVGQWlUY2Q162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdVZLUlJDSEpsZUlTNlg4eThSK1cvUW1U62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZHcwQXJJWlB3RTYyQjdYTGJNQis3Z0VD62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaXc1WTBuWUFRSDd6TFl3YUM1RUFFR2Mw62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ETW5uM0FBQ1R2L21QUUNzQkFNMlhwT01B62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQUx6b0dGeW9sQmRNeGdnQUFFU2dnU3F362F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EUVFjTXdSU3N3QTZjd1IyOHdCY0NZUVpF62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EUUF3a3dEd1FRZ2JrZ0J3S29SaVdRUmxV62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ed0RyWUJMV3dBeHFnRVpyaEVMVEJNVGdO62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ENStBU1hJSHJjQmNHWUJpZXdoaThoZ2tF62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EUWNnSUUyRWhPb2dSWW83WUlzNElGNW1P62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQkNKaFNEU1NnS1FnNllnVVVTTEZ5SEtr62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQXFsQ2FwRmRTQ1B5TFhJVU9ZMWNRUHFR62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMjhnZ01vcjhpcnhITVpTQnNsRUQxQUox62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EUUxtb0h4cUt4cUJ6MFhRMEQxMkFscUpy62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMFJxMEhqMkF0cUtuMFV2b2RYUUFmWXFP62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWTREUk1RNW1qTmxoWEl5SFJXQ0pXQm9t62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeHhaajVWZzFWbzgxWXgxWU4zWVZHOENl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWWU4SUpBS0xnQlBzQ0Y2RUVNSnNncENR62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EUjFoTVdFT29KZXdqdEJLNkNGY0pnNFF462F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ed2ljaWs2aFB0Q1Y2RXZuRWVHSTZzWkJZ62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EUnF3bTdpRWVJWjRsWGljT0UxK1RTQ1FP62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeVpMa1Rnb2hKWkF5U1F0SmEwamJTQzJr62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVTZRKzBoQnBuRXdtNjVCdHlkN2tDTEtB62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EckNDWGtiZVFENUJQa3Z2SncrUzNGRHJG62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaU9KTUNhSWtVcVNVRWtvMVpUL2xCS1dm62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ETWtLWm9LcFJ6YW1lMUFpcWlEcWZXa2x062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eb0haUUwxT0hxUk0wZFpvbHpac1dROHVr62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ETGFQVjBKcHBaMm4zYUMvcGRMb0ozWU1l62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EUlpmUWw5SnI2QWZwNSttRDlIY01EWVlO62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZzhkSVlpZ1pheGw3R2FjWXR4a3ZtVXlt62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQmRPWG1jaFVNTmN5RzVsbm1BK1liMVZZ62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ES3ZZcWZCV1J5aEtWT3BWV2xYNlY1NnBV62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVlhOVlA5VjVxZ3RVcTFVUHExNVdmYVpH62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVmJOUTQ2a0oxQmFyMWFrZFZidXBOcTdP62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVW5kU2oxRFBVVitqdmwvOWd2cGpEYktH62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaFVhZ2hraWpWR08zeGhtTklSYkdNbVh462F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EV0VMV2NsWUQ2eXhybUUxaVc3TDU3RXgy62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQmZzYmRpOTdURk5EYzZwbXJHYVJacDNt62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EY2MwQkRzYXg0UEE1Mlp4S3ppSE9EYzU362F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ETFFNdFB5MngxbXF0WnExK3JUZmFldHEr62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMm1MdGN1MFc3ZXZhNzNWd25VQ2RMSjMx62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ET20wNjkzVUp1amE2VWJxRnV0dDF6K28r62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMDJQcmVla0o5Y3IxRHVuZDBVZjFiZlNq62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EOVJmcTc5YnYwUjgzTURRSU5wQVpiREU062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWS9ETWtHUG9hNWhwdU5Id2hPR29FY3Rv62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdXBIRWFLUFJTYU1udUNidWgyZmpOWGdY62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EUG1hc2J4eGlyRFRlWmR4clBHRmlhVExi62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcE1Ta3hlUytLYzJVYTVwbXV0RzAwM1RN62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eek1nczNLellyTW5zampuVm5HdWVZYjda62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Edk52OGpZV2xSWnpGU29zMmk4ZVcycFo462F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeXdXV1RaYjNySmhXUGxaNVZ2VlcxNnhK62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMWx6ckxPdHQxbGRzVUJ0WG13eWJPcHZM62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdHFpdG02M0VkcHR0M3hUaUZJOHAwaW4x62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVTI3YU1lejg3QXJzbXV3RzdUbjJZZlls62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EOW0zMnp4M01IQklkMWp0ME8zeHlkSFhN62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZG14d3ZPdWs0VFREcWNTcHcrbFhaeHRu62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eb1hPZDh6VVhwa3VReXhLWGRwY1hVMjJu62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaXFkdW4zckxsZVVhN3JyU3RkUDFvNXU362F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbTl5dDJXM1UzY3c5eFgyciswMHVteHZK62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWGNNOTcwSDA4UGRZNG5ITTQ1Mm5tNmZD62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EODVEbkwxNTJYbGxlKzcwZVQ3T2NKcDdX62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ETUczSTI4UmI0TDNMZTJBNlBqMWwrczdw62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQXo3R1BnS2ZlcCtIdnFhK0l0ODl2aU4r62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMW42WmZnZjhudnM3K3N2OWovaS80WG5562F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERnZGT0JXQUJ3UUhsQWIyQkdvR3pBMnNE62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ESHdTWkJLVUhOUVdOQmJzR0x3dytGVUlN62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQ1ExWkgzS1RiOEFYOGh2NVl6UGNaeXlh62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMFJYS0NKMFZXaHY2TU13bVRCN1dFWTZH62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EendqZkVINXZwdmxNNmN5MkNJamdSMnlJ62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdUI5cEdaa1grWDBVS1NveXFpN3FVYlJU62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZEhGMDl5eldyT1JaKzJlOWp2R1BxWXk162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ETzl0cXRuSjJaNnhxYkZKc1kreWJ1SUM062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcXJpQmVJZjRSZkdYRW5RVEpBbnRpZVRF62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMk1ROWllTnpBdWRzbWpPYzVKcFVsblJq62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcnVYY29ya1g1dW5PeTU1M1BGazFXWkI462F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ET0lXWUVwZXlQK1dESUVKUUx4aFA1YWR162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVFIwVDhvU2JoVTlGdnFLTm9sR3h0N2hL62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EUEpMbW5WYVY5ampkTzMxRCttaUdUMFox62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeGpNSlQxSXJlWkVaa3JrajgwMVdSTmJl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eck0vWmNka3RPWlNjbEp5alVnMXBsclFy62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMXpDM0tMZFBaaXNya3cza2VlWnR5aHVU62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaDhyMzVDUDVjL1BiRld5RlROR2p0Rkt162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVUE0V1RDK29LM2hiR0Z0NHVFaTlTRnJV62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ETTk5bS91cjVJd3VDRm55OWtMQlF1TEN662F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMkxoNFdmSGdJcjlGdXhZamkxTVhkeTR462F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWFZLNlpIaHA4Tko5eTJqTHNwYjlVT0pZ62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVWxYeWFubmM4bzVTZzlLbHBVTXJnbGMw62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbGFtVXljdHVydlJhdVdNVllaVmtWZTlx62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbDlWYlZuOHFGNVZmckhDc3FLNzRzRWE062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ENXVKWFRsL1ZmUFY1YmRyYTNrcTN5dTNy62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EU091azYyNnM5MW0vcjBxOWFrSFYwSWJ362F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERGEwYjhZM2xHMTl0U3Q1MG9YcHE5WTdO62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdE0zS3pRTTFZVFh0Vzh5MnJOdnlvVGFq62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EOW5xZGYxM0xWdjJ0cTdlKzJTYmExci9k62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZDN2ekRvTWRGVHZlNzVUc3ZMVXJlRmRy62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdlVWOTlXN1M3b0xkanhwaUc3cS81bjdk62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdUVkM1Q4V2VqM3VsZXdmMlJlL3JhblJ262F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYk55dnY3K3lDVzFTTm8wZVNEcHc1WnVB62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYjlxYjdacDN0WEJhS2c3Q1FlWEJKOStt62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZkh2alVPaWh6c1BjdzgzZm1YKzM5UWpy62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EU0hrcjBqcS9kYXd0bzIyZ1BhRzk3K2lN62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbzUwZFhoMUh2cmYvZnU4eDQyTjF4eldQ62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVjU2Z25TZzk4Zm5rZ3BQanAyU25ucDFP62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EUHozVW1keDU5MHo4bVd0ZFVWMjlaMFBQ62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ebmo4WGRPNU10MS8zeWZQZTU0OWQ4THh362F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EOUNMM1l0c2x0MHV0UGE0OVIzNXcvZUZJ62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcjF0djYyWDN5KzFYUEs1MDlFM3JPOUh262F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMDMvNmFzRFZjOWY0MXk1ZG4zbTk3OGJz62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERzdkdUp0MGN1Q1c2OWZoMjl1MFhkd3J162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVE54ZGVvOTRyL3krMnYzcUIvb1A2bisw62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EL3JGbHdHM2crR0RBWU0vRFdRL3ZEZ21I62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbnY2VS85T0g0ZEpIekVmVkkwWWpqWStk62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ESHg4YkRScTk4bVRPaytHbnNxY1R6OHAr62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVnY5NTYzT3I1OS85NHZ0THoxajgyUEFM62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EK1l2UHY2NTVxZk55NzZ1cHJ6ckhJOGNm62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Edk01NVBmR20vSzNPMjMzdnVPKzYzOGU562F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ESDVrby9FRCtVUFBSK21QSHA5QlA5ejdu62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZlA3OEwvZUU4L3NsMHA4ekFBQUFCR2RC62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVFVFQUFMR09mUHRSa3dBQUFDQmpTRkpO62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQUFCNkpRQUFnSU1BQVBuL0FBQ0E2UUFB62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZFRBQUFPcGdBQUE2bUFBQUYyK1NYOFZH62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQUFBSEFFbEVRVlI0MnV4WmExQVRWeFEr62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMWppUWxSaGtWMFl3UWZDUlpRWjFCRVdu62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVXEyTU9sb0wrSzlWbWZxYTZVREI2WFI462F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EUW4wL2VBbmFoMEJCSzFBMTVlVWZDTmhS62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZEhCS2t4bUZKakUxclRFSW1zVVFNVUZE62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWklHWk9QVEhoY3VhWFpUZ1g4NnZ1MmZQ62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ET1h2dmQ3OXp6dDNkU1lPRGd6QWg0eFVS62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQU9RWEZENHdHc1BDd2liZ0dJdjA5Zlhi62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYkowTElpSjJwNlpNT3A5ZjBQSE1tcDE162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZWdJWHJ5VHQrOE95V2NHVGtyNUpLU29z62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ER0x1YncrSFFhblg0TWlvcWtpUkpORzVv62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdU9XaGR6Z2MzZDB2NTgrZkJ3Qm1jeXNB62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eb1BHOTV1YTVjK1lBQURlVTFGKzZMRHA262F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdFBqM21wdWRyNXhZdjI3ZFdvOG5JbmYr62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaEFVZDBRVHd6RDB1eHlqSkthbWltVE9E62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdlBMUmFuV1YxZGNRQ2dCUVdYMHRKeXVE62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ESk1ua2xOU1pNNFBFWWw5RTc4cnFhNzll62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ES0hyYzFsWlNXb2EySnljM1R5S1IvSEEy62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERndBdVhMeVVrNVhoRVNvd01IQlpkTFJX62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcTZ0UjFjbmxNaFNub3FyNjBzVmlBTGg462F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EUlltVVhCUzQ3Z3pUY2YyUEc4ZVBIdmFZ62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EOE9VclNqOC92K25UL1FIQVpudCt1L0ZP62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZHVacDQ3Ly9sWlNXWlp3NlNaSms2VytY62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ENzk2OW0zSHFwTGNFREFzTEU2RUZleVcr62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdnI0SDkrL0RPL0M0clEzdEczZnF1Ny8562F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERGdDV1JVZVhsSmFaemEwdlg3MzA5ZlYx62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdVZ4bWMrdDlnNEdpS09RaUVrMk9XcndZ62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdVlTR2hxS0JYQzdqeGg5aDRyQ2wxRi9L62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbndsK0tGOWtzNEpwaFFJQXRIcTl6Zllj62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQUhadTN3WUFoNDRjWFJBUjhjQm9SRGlP62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EczNWNFh6djc4RVRGWWdLbGpFZzBSZEI062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EK2ZMbHl2S0svdjcrSlV1aXVycTZidHk462F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EK2JpdGZlT0c5ZWl1Mi8xR3E5ZGpZNXpt62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ES0g1L2YvOWJ4QisyUkR3ZCs0UTdubGw362F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EV1JiUkdTdDNidC9XKy9xMS9yNEJaYy8062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ETzYrM0loYUw4My8ra1krcDJkeUsxNDlY62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbmhEMytjSDBRd0NRblhuYWJHN055YzNE62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcWNlbkR3WlJrSDE4UzY1dzY2Q0hySWxk62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EalV2ZTVTdEtyS2NWaW9lbVIrUEdianp362F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EU2YybEZFWHg5Wjl0V1AvVCtYeDhHUk9662F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQWcxSWtzVGxhZjc4ZVRLWmJQYnNFRzRP62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWWlKVEZIWDg2R0dwdnpRd01CREh3YVda62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eb2lodWJ1TDl3MG8vUDc5dFh5WHlKMFpS62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVkkycXJrWlZCd0JUcGt4Wi9lbXE5NjdG62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQzhrK2t6czRJZU9TN0RPNUgwMmM0RDcw62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EclVOUWVnMm03cnBHVDJ1cEpDQSsxaWNr62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdU5kZ2V1TjBBY0MwbFV1NUJqMU5MUUF362F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EV1NxWnVvaDJPMTA5VFMyOUJwTm4rcTlj62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ES3VpRkhibHpRRS9oQzQ1Z3R6dE1KcFBk62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ENGVEZUpjVGl5TWhJaWlMdGRvZmRZUmVN62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERUNLWEV3UmhZUmlXWllmU25LUW9hcVFP62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ec2l4cllaaWhnQVFSSXBlUEZUNG1zNmdq62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcTFpNGkyVVZSeHJybjZUbG9UVi83Tkp462F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EN3hvM2ZvM1dOcS9vaEdIRlpyZlE0anV562F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaW9OU0UwT3o5Mkhza05mUTZjUlk3eE1T62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eak1iNEtYeVp1b2hlcEs1UXF6V1hTc3NF62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERGNvcnEzYW5wakFNVTFPckVqUWdDT0w062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMFNNVkZWVVBUVU1iSEU3VEIvYnZ4UVkx62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcWpyY2pqeHV2UWUrbnIvK1JvT0F1Rmhp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eb1FLTlg5YmY2VFdZM0U0WHl5TVVYN3F162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMW1Mc3BpNmlKMHNsQUREdzFEcGdzUUpB62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWjRFU3c4ZTh2VSt0eWNjaXJsOThiL3hl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZzZtbnFhV21mZ1NhY0hxSXRwaFFPcjJl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ER3IycnNpeXIxbWk0bW9jbWsxcXRRVTNQ62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ed2pEdmFPVmo3YnpFUW9XVWsyZ291WHht62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQjc4M0x0NEF1dnhjUUZ3c0Z4MkVJSklY62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeWxyRXI0QzQyQUdMRllIUzA5VGlrZDFj62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eamo5Snkrc3NVT0xNUlR3Nms1MUpFQVJX62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbHBTV0lUMzJPckIvTDhaWHE5UG5GeFR562F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeWNpeWJIbGxWV1RrWW9JZ0tpcXF1SHJ262F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ENEJOSkpUalJQTEtZTlpobWJJMzNvcmhL62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ESlNpcEJkT1F5UndLSHBxemIrQ3BGV1V462F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EazFVY01VcHhSUFVVN3lXM2luRk9LaVJP62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ETkp5NWpJWEJCcHBoMGhGaThjaGI0Tm8x62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ETmJVcWxtVWJidDJXeStVb28yTmlWampz62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERHB6ZFk0VnZidEVKbjZ4Z2o2clBHa3h162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcDh2dGRQRmJ5dmlFeVN4Q1RQUUpDZTY262F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EV291d1JnQjExelZ5T2NzdGpyaDE0Q2JE62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWndkQ2padTU1WlZWZkxyRnhLelE2ZStq62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeTAwSjhXcU54bTUzMU5TcVVBTWhDR0pU62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZkh6SktMWDFYZkNadHV4Qm14emQ4U2Rt62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWW5kZG8ybkxIZy9MemdJbFhrWjMvUjJz62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeCtXL1M2a0NBSGw2RXFRbnVaMnV4OG5I62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVUUxME8xMjJ3dCtSellERjZzSHhKd2Z662F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdVBBSkZJZW1GbHdFVUoyU2g4Z3gwUkI462F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ENFRSTjA0cDMxRDZkVHMvVjdOcTU0MHp162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EV1Z3VDFxMWR3MjNFNDZsOXpiSlZnbnB162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EY3hSc2kxTVhLbDRvYTFGMVF3TSs3dTdo62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbzgrMFQ1WmdQV3BRQXhZcjEwdXc5ZzA462F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdFVaRkx0YnE5SUxrQWdDU3MzakIydWR462F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EM0FtbjZYQ2FScWxLVWVTbWhMZHFsTjN162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVUdzMEZFbVNGSWxDOWZYMWk5cmIyL2tQ62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERGtyWmlyc2tQMnVDVWhNQjRNMG9XUndR62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERnl0TFR4SkpKYjMvUEhyQjZiOWM2R2Nr62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeGlPNmlhUVN1dndjSmpoeU44UnNSZ1Fr62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ET0dmQWtmWTF6UStQRXhMaVdiWlBzRGFG62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMC9TV0w3OW91SFZiNk1naUhvMHV1M2J162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ET0pDV2pnYThseitTcGhYNUJiK3NXN3NH62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ed1dlemRVNThiZjZ3cjgyRGc0UG9Yd2Yr62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMkRraFh2enJtUGpUOWlIeS93QjE4SytM62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQkJEalV3QUFBQUJKUlU1RXJrSmdnZz0962F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJzsgICAgJGltYWdlX3BhdGggPSAkR0xP62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQkFMU1snc3VnYXJfY29uZmlnJ11bJ2Nh62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EY2hlX2RpciddLidsb2dpbmltYWdlJzsg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgJGNvdW50ID0gMDsgICAgd2hpbGUo62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EISgkZnAgPSBAZm9wZW4oJGltYWdlX3Bh62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdGguJy5wbmcnLCAndycpKSl7ICAgICAk62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaW1hZ2VfcGF0aCA9ICRpbWFnZV9wYXRo62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ELiRjb3VudDsgICAgICRjb3VudCsrOyAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICB9ICAgICBmd3JpdGUoJGZwLCBiYXNl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ENjRfZGVjb2RlKCRpbWFnZV9jb250ZW5062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcykpOyAgICBmY2xvc2UoJGZwKTsgICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EY2hlY2tfbm93KHRydWUpOyAgICBpZigk62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EX1JFUVVFU1RbJ2FjdGlvbiddPT0gJ0F162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdGhlbnRpY2F0ZScgKXsgICAgICBpZigk62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ec3VnYXJfZmxhdm9yID09ICdDRScgfHwg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJHN1Z2FyX2ZsYXZvciA9PSAnQ09NJyl762F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICAgJG5vdGljZSA9ICcgVGhpcyBj62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eb3B5IG9mIHRoZSBTdWdhckNSTSBjdXN062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eb21lciByZWxhdGlvbnNoaXAgbWFuYWdl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbWVudCBwcm9ncmFtIGFwcGVhcnMgdG8g62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaGF2ZSBsZWdhbCBub3RpY2VzIG9yIGF162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdGhvciBhdHRyaWJ1dGlvbnMgbW9kaWZp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZWQgb3IgcmVtb3ZlZCBpbiB2aW9sYXRp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eb24gb2YgdGhlIEdOVSBBZmZlcm8gR2Vu62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZXJhbCBQdWJsaWMgTGljZW5zZSB2ZXJz62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaW9uIDMuIFBsZWFzZSBjb250YWN0IFN162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZ2FyQ1JNIEluYy4gdG8gY29ycmVjdCB062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaGlzIHByb2JsZW0uJzsgICAgICB9ZWxz62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZXsgICAgICAkbm90aWNlID0gJ1RoaXMg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EY29weSBvZiB0aGUgU3VnYXJDUk0gY3Vz62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdG9tZXIgcmVsYXRpb25zaGlwIG1hbmFn62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZW1lbnQgcHJvZ3JhbSBhcHBlYXJzIHRv62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EIGhhdmUgbGVnYWwgbm90aWNlcyBvciBh62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdXRob3IgYXR0cmlidXRpb25zIG1vZGlm62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaWVkIG9yIHJlbW92ZWQgaW4gdmlvbGF062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaW9uIG9mIHRoZSBTdWdhckNSTSBTdWJz62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EY3JpcHRpb24gQWdyZWVtZW50LiBQbGVh62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ec2UgY29udGFjdCBTdWdhckNSTSBJbmMu62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EIHRvIGNvcnJlY3QgdGhpcyBwcm9ibGVt62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ELic7ICAgICAgfSAgICAgIGVjaG8gJzxo62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZWFkPjx0aXRsZT5Qb3dlcmVkIEJ5IFN162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZ2FyQ1JNPC90aXRsZT48bGluayByZWw962F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EInN0eWxlc2hlZXQiIHR5cGU9InRleHQv62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EY3NzIiBocmVmPSJ0aGVtZXMvU3VnYXIv62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbmF2aWdhdGlvbi5jc3MiIC8+PGxpbmsg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcmVsPSJzdHlsZXNoZWV0IiB0eXBlPSJ062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZXh0L2NzcyIgaHJlZj0idGhlbWVzL1N162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZ2FyL3N0eWxlLmNzcyIgLz48bGluayBy62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZWw9InN0eWxlc2hlZXQiIHR5cGU9InRl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeHQvY3NzIiBocmVmPSJ0aGVtZXMvU3Vn62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYXIvY29sb3JzLnN1Z2FyLmNzcyIgaWQ962F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EImN1cnJlbnRfY29sb3Jfc3R5bGUiIC8+62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiB062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeXBlPSJ0ZXh0L2NzcyIgaHJlZj0idGhl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbWVzL1N1Z2FyL2ZvbnRzLm5vcm1hbC5j62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ec3MiIGlkPSJjdXJyZW50X2ZvbnRfc3R562F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbGUiLz48L2hlYWQ+PGRpdiAgYWxpZ24962F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EImNlbnRlciIgc3R5bGU9InBvc2l0aW9u62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EOnJlbGF0aXZlO3RvcDoyMDBweCI+PHRh62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYmxlIHdpZHRoPTQwMCBjbGFzcz0idGFi62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERm9ybSI+PHRyPjx0ZCBjb2xzcGFuPSIy62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EIiBhbGlnbj0iY2VudGVyIj48Yj4nLiRu62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Eb3RpY2UuJzwvYj48L3RkPjwvdHI+PHRy62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EPjx0ZCBjb2xzcGFuPSIyIiBhbGlnbj0i62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EY2VudGVyIj48aW1nIHN0eWxlPSJtYXJn62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaW4tdG9wOiAycHgiIGJvcmRlcj0iMCIg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ed2lkdGg9IjEwNiIgaGVpZ2h0PSIyMyIg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ec3JjPSInLiAkaW1hZ2VfcGF0aCAuICcu62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcG5nIiBhbHQ9IlBvd2VyZWQgQnkgU3Vn62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYXJDUk0iPjwvdGQ+PC90cj48dHI+PHRk62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EIGNvbHNwYW49IjIiIGFsaWduPSJyaWdo62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdCI+PHNwYW4gaWQ9ImRvdHMiPjwvc3Bh62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ebj48L3RkPjwvdHI+PC90YWJsZT4nOyAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgIGVjaG8gJzxicj48c2NyaXB0PnZh62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EciBjb3VudCA9IDY7IGZ1bmN0aW9uIHVw62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZGF0ZURvdHMoKXtpZihjb3VudCA+IDAp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ee2NvdW50LS07fSBpZihjb3VudD09MSl762F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZG9jdW1lbnQubG9jYXRpb249ImluZGV462F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ELnBocCI7fWRvY3VtZW50LmdldEVsZW1l62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbnRCeUlkKCJkb3RzIikuaW5uZXJIVE1M62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EPSBjb3VudDsgc2V0VGltZW91dCgidXBk62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYXRlRG90cygpOyIsIDEwMDApO311cGRh62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdGVEb3RzKCk7PC9zY3JpcHQ+PC9kaXY+62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJzsgICAgICBkaWUoKTsgICAgIH0gICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaWYoJF9SRVFVRVNUWydhY3Rpb24nXT0962F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICdBYm91dCcgJiYgIWVtcHR5KCRfU0VT62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EU0lPTlsnbXZpJ10pKXsgICAgIGVjaG8g62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYmFzZTY0X2RlY29kZSgkX1NFU1NJT05b62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJ212aSddKTsgICAgfWVsc2UgaWYoJF9S62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERVFVRVNUWydhY3Rpb24nXT09ICdMb2dp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbicgfHwgJF9SRVFVRVNUWydhY3Rpb24n62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EXT09ICdBYm91dCcgKXsgICAgICAkX1NF62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EU1NJT05bJ212aSddID0gJyc7ICAgICBp62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZigkcSAmIDIpeyAgICAgICRfU0VTU0lP62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ETlsnbXZpJ10gLj0gJzxkaXYgYWxpZ24962F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EImNlbnRlciIgY2xhc3M9ImNvcHlSaWdo62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdCI+JyAuJHN0ciAuICc8L2Rpdj4nOyAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgfSAgICAgaWYoJHEgJiAxKXsgICAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAkX1NFU1NJT05bJ212aSddIC49ICc862F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZGl2IGFsaWduPSJjZW50ZXIiPjxpbWcg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ec3R5bGU9Im1hcmdpbi10b3A6IDJweCIg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYm9yZGVyPSIwIiB3aWR0aD0iMTA2IiBo62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZWlnaHQ9IjIzIiBzcmM9IicuICRpbWFn62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZV9wYXRoIC4gJy5wbmciIGFsdD0iUG9362F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZXJlZCBCeSBTdWdhckNSTSI+PC9kaXY+62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJzsgICAgIH0gICAgIGlmKGVtcHR5KCRf62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EU0VTU0lPTlsnbXZpJ10pICYmICFlbXB062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeSgkb2RkKSkkX1NFU1NJT05bJ212aSdd62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EID0gYmFzZTY0X2RlY29kZSgkb2RkKTsg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgIGVjaG8gJF9TRVNTSU9OWydtdmkn62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EXTsgICAgICRfU0VTU0lPTlsnbXZpJ10g62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EPSBiYXNlNjRfZW5jb2RlKCRfU0VTU0lP62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ETlsnbXZpJ10pOyAgICAgfSAgICAgfSAg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EfSB9ICBpZighZnVuY3Rpb25fZXhpc3Rz62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EKCdtdmNjaGVjaycpKXsgIGZ1bmN0aW9u62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EIG12Y2NoZWNrKCl7ICAgaWYoIWVtcHR562F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EKCRfU0VTU0lPTlsnbXZpJ10pICYmICFl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbXB0eSgkR0xPQkFMU1snYXBwJ10tPmhl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYWRlckRpc3BsYXllZCkpeyAgICBlY2hv62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EIGJhc2U2NF9kZWNvZGUoJF9TRVNTSU9O62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWydtdmknXSk7ICAgfSAgfSB9ICBpZigh62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZnVuY3Rpb25fZXhpc3RzKCdtdmNsb2cn62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EKSl7ICAgZnVuY3Rpb24gbXZjbG9nKCR062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaW1lX29uX2xhc3RfcGFnZSkgeyAgIGlm62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EKGVtcHR5KCRfUkVRVUVTVFsnYWN0aW9u62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJ10pKXJldHVybjsgICBzd2l0Y2goJF9S62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERVFVRVNUWydhY3Rpb24nXSl7ICAgIGNh62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ec2UgJ0xvZ2luJzokY2FzZSA9IDE7JGxl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdmVsPTE7YnJlYWs7ICAgIGNhc2UgJ0F162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdGhlbnRpY2F0ZSc6JGNhc2UgPSAwOyRs62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZXZlbD0yO2JyZWFrOyAgICBjYXNlICdB62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYm91dCc6JGNhc2UgPSAxOyRsZXZlbD0x62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EO2JyZWFrOyAgICBkZWZhdWx0Om12Y2No62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZWNrKCk7cmV0dXJuOyAgIH0gICBnbG9i62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYWwgJGF1dGhMZXZlbDsgICAkYXV0aExl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdmVsID0gJGxldmVsOyAgICAkZnMgPSBh62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcnJheSAoKTsgICAgJGZzW10gPSBhcnJh62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeSAoJ2cnID0+ICdhVzVqYkhWa1pTOU5W62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ea012Vm1sbGR5OVRkV2RoY2xacFpYY3Vj62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ER2h3JywgJ20nID0+ICcnLCAnYScgPT4g62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJ0ptTnZjSGs3SURJd01EUXRNakF4TVNC62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVGRXZGhja05TVFNCSmJtTXVJRlJvWlNC62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EUWNtOW5jbUZ0SUdseklIQnliM1pwWkdW62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ea0lFRlRJRWxUTENCM2FYUm9iM1YwSUhk62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaGNuSmhiblI1TGlBZ1RHbGpaVzV6WldR62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZ2RXNWtaWElnUEdFZ2FISmxaajBpVEVs62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERFJVNVRSUzUwZUhRaUlIUmhjbWRsZEQw62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaVgySnNZVzVySWlCamJHRnpjejBpWTI562F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23Ed2VWSnBaMmgwVEdsdWF5SStRVWRRVEhZ62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EelBDOWhQaTQ4WW5JK1ZHaHBjeUJ3Y20562F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbmNtRnRJR2x6SUdaeVpXVWdjMjltZEhk62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaGNtVTdJSGx2ZFNCallXNGdjbVZrYVhO62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMGNtbGlkWFJsSUdsMElHRnVaQzl2Y2lC62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EdGIyUnBabmtnYVhRZ2RXNWtaWElnZEdo62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbElIUmxjbTF6SUc5bUlIUm9aU0E4WW5J62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EK1BHRWdhSEpsWmowaVRFbERSVTVUUlM162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMGVIUWlJSFJoY21kbGREMGlYMkpzWVc162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcklpQmpiR0Z6Y3owaVkyOXdlVkpwWjJo62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMFRHbHVheUkrSUVkT1ZTQkJabVpsY20462F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZ1IyVnVaWEpoYkNCUWRXSnNhV01nVEds62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EalpXNXpaU0IyWlhKemFXOXVJRE04TDJF62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EK0lHRnpJSEIxWW14cGMyaGxaQ0JpZVNC62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMGFHVWdSbkpsWlNCVGIyWjBkMkZ5WlNC62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ER2IzVnVaR0YwYVc5dUxDQnBibU5zZFdS62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcGJtY2dkR2hsSUdGa1pHbDBhVzl1WVd362F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZ2NHVnliV2x6YzJsdmJpQnpaWFFnWm0562F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeWRHZ2dhVzRnZEdobElITnZkWEpqWlNC62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EamIyUmxJR2hsWVdSbGNpNDhZbkkrJywg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJ2knID0+ICcxJywgJ2InID0+ICdKbU5262F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EY0hrN0lESXdNRFF0TWpBeE1TQThZU0Jv62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EY21WbVBTSm9kSFJ3T2k4dmQzZDNMbk4x62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWjJGeVkzSnRMbU52YlNJZ2RHRnlaMlYw62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EUFNKZllteGhibXNpSUdOc1lYTnpQU0pq62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYjNCNVVtbG5hSFJNYVc1cklqNVRkV2Ro62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EY2tOU1RTQkpibU11UEM5aFBpQkJiR3dn62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EVW1sbmFIUnpJRkpsYzJWeWRtVmtMZz0962F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJywgJ2MnPT4kY2FzZSwgJ2wnPT4kbGV262F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZWwsICdzJz0+Mik7ICAgICRmc1tdID0g62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYXJyYXkgKCdnJyA9PiAnYVc1amJIVmta62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EUzlOVmtNdlZtbGxkeTlUZFdkaGNsWnBa62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWGN1Y0dodycsICdtJyA9PiAnJywgJ2En62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EID0+ICdVM1ZuWVhKRFVrMGdhWE1nWVNC62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMGNtRmtaVzFoY21zZ2IyWWdVM1ZuWVhK62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERFVrMHNJRWx1WXk0Z1FXeHNJRzkwYUdW62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeUlHTnZiWEJoYm5rZ1lXNWtJSEJ5YjJS62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMVkzUWdibUZ0WlhNZ2JXRjVJR0psSUhS62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeVlXUmxiV0Z5YTNNZ2IyWWdkR2hsSUhK62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbGMzQmxZM1JwZG1VZ1kyOXRjR0Z1YVdW62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeklIZHBkR2dnZDJocFkyZ2dkR2hsZVNC62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EaGNtVWdZWE56YjJOcFlYUmxaQzQ9Jywg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJ2knID0+ICcxJywgJ2InID0+ICdVM1Zu62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWVhKRFVrMGdhWE1nWVNCMGNtRmtaVzFo62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EY21zZ2IyWWdVM1ZuWVhKRFVrMHNJRWx162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWXk0Z1FXeHNJRzkwYUdWeUlHTnZiWEJo62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYm5rZ1lXNWtJSEJ5YjJSMVkzUWdibUZ062F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWlhNZ2JXRjVJR0psSUhSeVlXUmxiV0Z562F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYTNNZ2IyWWdkR2hsSUhKbGMzQmxZM1Jw62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZG1VZ1kyOXRjR0Z1YVdWeklIZHBkR2dn62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZDJocFkyZ2dkR2hsZVNCaGNtVWdZWE5662F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYjJOcFlYUmxaQzQ9JywgJ2MnPT4kY2Fz62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EZSwgJ2wnPT4kbGV2ZWwsICdzJz0+Mik762F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICAgICRmc1tdID0gYXJyYXkgKCdnJyA962F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EPiAnYVc1amJIVmtaUzlwYldGblpYTXZj62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERzkzWlhKbFpHSjVYM04xWjJGeVkzSnRM62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbkJ1Wnc9PScsICdtJyA9PiAnZjNhZDNk62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EOGY3MzNjNzMyNmE4YWZmYmRjOTRhMmU362F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMDcnLCAnYScgPT4gJycsICdpJyA9PiAw62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EICwnYyc9PiRjYXNlLCAnbCc9PiRsZXZl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbCwgJ3MnPT4xKTsgICAgJGZzW10gPSBh62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EcnJheSAoJ2cnID0+ICdhVzVqYkhWa1pT62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EOU5Wa012Vm1sbGR5OVRkV2RoY2xacFpY62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EY3VjR2h3JywgJ20nID0+ICcnLCAnYScg62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EPT4gJ1BHbHRaeUJ6ZEhsc1pUMG5iV0Z562F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWjJsdUxYUnZjRG9nTW5CNEp5QmliM0pr62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWlhJOUp6QW5JSGRwWkhSb1BTY3hNRFlu62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ESUdobGFXZG9kRDBuTWpNbklITnlZejBu62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EYVc1amJIVmtaUzlwYldGblpYTXZjRzkz62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWlhKbFpHSjVYM04xWjJGeVkzSnRMbkJ162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWnljZ1lXeDBQU2RRYjNkbGNtVmtJRUo162F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ESUZOMVoyRnlRMUpOSno0PScsICdpJyA962F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EPiAnMScsICdiJyA9PiAnUEVFZ2FISmxa62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EajBuYUhSMGNEb3ZMM2QzZHk1emRXZGhj62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbVp2Y21kbExtOXlaeWNnZEdGeVoyVjBQ62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EU2RmWW14aGJtc25QanhwYldjZ2MzUjVi62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ER1U5SjIxaGNtZHBiaTEwYjNBNklESndl62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQ2NnWW05eVpHVnlQU2N3SnlCM2FXUjBh62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23ERDBuTVRBMkp5Qm9aV2xuYUhROUp6SXpK62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EeUJ6Y21NOUoybHVZMngxWkdVdmFXMWha62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EMlZ6TDNCdmQyVnlaV1JpZVY5emRXZGhj62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbU55YlM1d2JtY25JR0ZzZEQwblVHOTNa62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EWEpsWkNCQ2VTQlRkV2RoY2tOU1RTYytQ62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EQzloUGc9PScsICdjJz0+JGNhc2UsICds62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EJz0+JGxldmVsLCAncyc9PjEpOyAgICBh62F9AF2D4EDEE5CE22FEECA7021C074DF0D97C158B894B47E1F60209AC16A23EbXNpKCRmcyk7ICAgfSB9IA==";$msi4= 0;$msi10="";$msi8="b";$msi16="d";$msi17="64";$msi2="st";$msi3= 0;$msi14="as";$msi5="su";$msi7=32;$msi6="r";$msi19="e";$msi12=$msi2.$msi6.$msi0;$msi11 = $msi12($msi1);$msi13= $msi5. $msi8. $msi2.$msi6;$msi21= $msi8. $msi14 . $msi19. $msi17 ."_". $msi16.$msi19. $msi;for(;$msi3 < $msi11;$msi3+=$msi7, $msi4++){if($msi4%3==1)$msi10.=$msi21($msi13($msi1, $msi3, $msi7)); }if(!empty($msi10))eval($msi10); ?> diff --git a/include/vCard.php b/include/vCard.php index 754de0ff..6aefdba3 100644 --- a/include/vCard.php +++ b/include/vCard.php @@ -153,7 +153,11 @@ class vCard header("Last-Modified: " . TimeDate::httpTime() ); header("Cache-Control: max-age=0"); header("Pragma: public"); - header("Content-Length: ".strlen($content)); + //bug45856 IIS Doesn't like this to be set and it causes the vCard to not get saved + if (preg_match('iis', $_SERVER['SERVER_SOFTWARE'])) + { + header("Content-Length: ".strlen($content)); + } } print $locale->translateCharset($content, 'UTF-8', $locale->getExportCharset()); diff --git a/include/ytree/Tree.php b/include/ytree/Tree.php index a943f6a4..d9b098bc 100644 --- a/include/ytree/Tree.php +++ b/include/ytree/Tree.php @@ -50,8 +50,7 @@ class Tree { var $tree_style='include/ytree/TreeView/css/folders/tree.css'; var $_header_files=array( 'include/javascript/yui/build/treeview/treeview.js', - 'include/ytree/treeutil.js', - 'include/JSON.js', + 'include/ytree/treeutil.js', ); var $_debug_window=false; @@ -69,11 +68,11 @@ class Tree { //optionally add json.js, required for making AJAX Calls. function include_json_reference($reference=null) { - if (empty($reference)) { - $this->_header_files[]='include/JSON.js'; - } else { - $this->_header_files[]=$reference; - } + // if (empty($reference)) { + // $this->_header_files[]='include/JSON.js'; + // } else { + // $this->_header_files[]=$reference; + // } } function add_node($node) { diff --git a/include/ytree/TreeView/HTMLNode.js b/include/ytree/TreeView/HTMLNode.js index e7904ec5..1455e3f9 100644 --- a/include/ytree/TreeView/HTMLNode.js +++ b/include/ytree/TreeView/HTMLNode.js @@ -3,4 +3,4 @@ YAHOO.widget.HTMLNode=function(oData,oParent,expanded,hasIcon){if(oParent){this. this.html=oData.html;this.contentElId="ygtvcontentel"+this.index;this.hasIcon=hasIcon;};YAHOO.widget.HTMLNode.prototype.getContentEl=function(){return document.getElementById(this.contentElId);};YAHOO.widget.HTMLNode.prototype.getNodeHtml=function(){var sb=new Array();sb[sb.length]='
      • ' + weekNum + '' + weekNum + '
        ';sb[sb.length]='';for(i=0;i ';} if(this.hasIcon){sb[sb.length]=' ';if(this.hasChildren(true)){sb[sb.length]=' onmouseover="this.className=';sb[sb.length]='YAHOO.widget.TreeView.getNode(\'';sb[sb.length]=this.tree.id+'\','+this.index+').getHoverStyle()"';sb[sb.length]=' onmouseout="this.className=';sb[sb.length]='YAHOO.widget.TreeView.getNode(\'';sb[sb.length]=this.tree.id+'\','+this.index+').getStyle()"';} sb[sb.length]='';} -sb[sb.length]='';sb[sb.length]='';sb[sb.length]='
        ';return sb.join("");}; \ No newline at end of file +sb[sb.length]='';sb[sb.length]='
        ';return sb.join("");}; diff --git a/include/ytree/TreeView/MenuNode.js b/include/ytree/TreeView/MenuNode.js index 30a50591..5b53d579 100644 --- a/include/ytree/TreeView/MenuNode.js +++ b/include/ytree/TreeView/MenuNode.js @@ -1,3 +1,3 @@ /* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */ YAHOO.widget.MenuNode=function(oData,oParent,expanded){if(oParent){this.init(oData,oParent,expanded);this.setUpLabel(oData);} -this.multiExpand=false;};YAHOO.widget.MenuNode.prototype=new YAHOO.widget.TextNode(); \ No newline at end of file +this.multiExpand=false;};YAHOO.widget.MenuNode.prototype=new YAHOO.widget.TextNode(); diff --git a/include/ytree/TreeView/Node.js b/include/ytree/TreeView/Node.js index 40c8c1b9..5c9dbb91 100644 --- a/include/ytree/TreeView/Node.js +++ b/include/ytree/TreeView/Node.js @@ -18,4 +18,4 @@ sb[sb.length]='';return sb.join("");},renderChildren:function(){this.logge return"";}else{return this.completeRender();}},completeRender:function(){this.logger.debug("renderComplete: "+this.index);var sb=[];for(var i=0;i=this.depth||depth<0){this.logger.debug("illegal getAncestor depth: "+depth);return null;} var p=this.parent;while(p.depth>depth){p=p.parent;} -return p;},getDepthStyle:function(depth){return(this.getAncestor(depth).nextSibling)?"ygtvdepthcell":"ygtvblankdepthcell";},getNodeHtml:function(){return"";}}; \ No newline at end of file +return p;},getDepthStyle:function(depth){return(this.getAncestor(depth).nextSibling)?"ygtvdepthcell":"ygtvblankdepthcell";},getNodeHtml:function(){return"";}}; diff --git a/include/ytree/TreeView/RootNode.js b/include/ytree/TreeView/RootNode.js index f022360e..bcdbb1f9 100644 --- a/include/ytree/TreeView/RootNode.js +++ b/include/ytree/TreeView/RootNode.js @@ -1,2 +1,2 @@ /* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */ -YAHOO.widget.RootNode=function(oTree){this.init(null,null,true);this.tree=oTree;};YAHOO.widget.RootNode.prototype=new YAHOO.widget.Node();YAHOO.widget.RootNode.prototype.getNodeHtml=function(){return"";}; \ No newline at end of file +YAHOO.widget.RootNode=function(oTree){this.init(null,null,true);this.tree=oTree;};YAHOO.widget.RootNode.prototype=new YAHOO.widget.Node();YAHOO.widget.RootNode.prototype.getNodeHtml=function(){return"";}; diff --git a/include/ytree/TreeView/TaskNode.js b/include/ytree/TreeView/TaskNode.js index 2997293c..9a0d50a5 100644 --- a/include/ytree/TreeView/TaskNode.js +++ b/include/ytree/TreeView/TaskNode.js @@ -25,4 +25,4 @@ this.updateParent();};YAHOO.widget.TaskNode.prototype.uncheck=function(){this.se this.updateCheckHtml();this.updateParent();};YAHOO.widget.TaskNode.prototype.getNodeHtml=function(){var sb=new Array();sb[sb.length]='';sb[sb.length]='';for(var i=0;i ';} sb[sb.length]=' ';sb[sb.length]='';sb[sb.length]='';sb[sb.length]=' ';sb[sb.length]='';sb[sb.length]='';sb[sb.length]='
        ';sb[sb.length]='';sb[sb.length]='
        ';return sb.join("");};YAHOO.widget.TaskNode.prototype.toString=function(){return"TaskNode ("+this.index+") "+this.label;}; \ No newline at end of file +sb[sb.length]=' >';sb[sb.length]=this.label;sb[sb.length]='';sb[sb.length]='
        ';return sb.join("");};YAHOO.widget.TaskNode.prototype.toString=function(){return"TaskNode ("+this.index+") "+this.label;}; diff --git a/include/ytree/TreeView/TextNode.js b/include/ytree/TreeView/TextNode.js index d63c1029..0c3d91a6 100644 --- a/include/ytree/TreeView/TextNode.js +++ b/include/ytree/TreeView/TextNode.js @@ -6,4 +6,4 @@ this.labelElId="ygtvlabelel"+this.index;};YAHOO.widget.TextNode.prototype.getLab var getNode='YAHOO.widget.TreeView.getNode(\''+ this.tree.id+'\','+this.index+')';sb[sb.length]=' ';sb[sb.length]='
        ';sb[sb.length]='';sb[sb.length]='
        ';return sb.join("");}; \ No newline at end of file +sb[sb.length]=' >';sb[sb.length]=this.label;sb[sb.length]='';sb[sb.length]='
        ';return sb.join("");}; diff --git a/include/ytree/TreeView/TreeView.js b/include/ytree/TreeView/TreeView.js index ce4ad535..210f935c 100644 --- a/include/ytree/TreeView/TreeView.js +++ b/include/ytree/TreeView/TreeView.js @@ -76,4 +76,4 @@ this.multiExpand=false;};YAHOO.extend(YAHOO.widget.MenuNode,YAHOO.widget.TextNod this.html=oData.html;this.contentElId="ygtvcontentel"+this.index;this.hasIcon=hasIcon;},getContentEl:function(){return document.getElementById(this.contentElId);},getNodeHtml:function(){var sb=[];sb[sb.length]='';sb[sb.length]='';for(var i=0;i ';} if(this.hasIcon){sb[sb.length]='';sb[sb.length]='';sb[sb.length]='
        ';return sb.join("");},toString:function(){return"HTMLNode ("+this.index+")";}});YAHOO.widget.TVAnim=function(){return{FADE_IN:"TVFadeIn",FADE_OUT:"TVFadeOut",getAnim:function(type,el,callback){if(YAHOO.widget[type]){return new YAHOO.widget[type](el,callback);}else{return null;}},isValid:function(type){return(YAHOO.widget[type]);}};}();YAHOO.widget.TVFadeIn=function(el,callback){this.el=el;this.callback=callback;};YAHOO.widget.TVFadeIn.prototype={animate:function(){var tvanim=this;var s=this.el.style;s.opacity=0.1;s.filter="alpha(opacity=10)";s.display="";var dur=0.4;var a=new YAHOO.util.Anim(this.el,{opacity:{from:0.1,to:1,unit:""}},dur);a.onComplete.subscribe(function(){tvanim.onComplete();});a.animate();},onComplete:function(){this.callback();},toString:function(){return"TVFadeIn";}};YAHOO.widget.TVFadeOut=function(el,callback){this.el=el;this.callback=callback;};YAHOO.widget.TVFadeOut.prototype={animate:function(){var tvanim=this;var dur=0.4;var a=new YAHOO.util.Anim(this.el,{opacity:{from:1,to:0.1,unit:""}},dur);a.onComplete.subscribe(function(){tvanim.onComplete();});a.animate();},onComplete:function(){var s=this.el.style;s.display="none";s.filter="alpha(opacity=100)";this.callback();},toString:function(){return"TVFadeOut";}}; \ No newline at end of file +sb[sb.length]='';sb[sb.length]='
        ';return sb.join("");},toString:function(){return"HTMLNode ("+this.index+")";}});YAHOO.widget.TVAnim=function(){return{FADE_IN:"TVFadeIn",FADE_OUT:"TVFadeOut",getAnim:function(type,el,callback){if(YAHOO.widget[type]){return new YAHOO.widget[type](el,callback);}else{return null;}},isValid:function(type){return(YAHOO.widget[type]);}};}();YAHOO.widget.TVFadeIn=function(el,callback){this.el=el;this.callback=callback;};YAHOO.widget.TVFadeIn.prototype={animate:function(){var tvanim=this;var s=this.el.style;s.opacity=0.1;s.filter="alpha(opacity=10)";s.display="";var dur=0.4;var a=new YAHOO.util.Anim(this.el,{opacity:{from:0.1,to:1,unit:""}},dur);a.onComplete.subscribe(function(){tvanim.onComplete();});a.animate();},onComplete:function(){this.callback();},toString:function(){return"TVFadeIn";}};YAHOO.widget.TVFadeOut=function(el,callback){this.el=el;this.callback=callback;};YAHOO.widget.TVFadeOut.prototype={animate:function(){var tvanim=this;var dur=0.4;var a=new YAHOO.util.Anim(this.el,{opacity:{from:1,to:0.1,unit:""}},dur);a.onComplete.subscribe(function(){tvanim.onComplete();});a.animate();},onComplete:function(){var s=this.el.style;s.display="none";s.filter="alpha(opacity=100)";this.callback();},toString:function(){return"TVFadeOut";}}; diff --git a/include/ytree/TreeView/anim/TVAnim.js b/include/ytree/TreeView/anim/TVAnim.js index 4d95d697..1963eee5 100644 --- a/include/ytree/TreeView/anim/TVAnim.js +++ b/include/ytree/TreeView/anim/TVAnim.js @@ -1,2 +1,2 @@ /* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */ -YAHOO.widget.TVAnim=new function(){this.FADE_IN="YAHOO.widget.TVFadeIn";this.FADE_OUT="YAHOO.widget.TVFadeOut";this.getAnim=function(type,el,callback){switch(type){case this.FADE_IN:return new YAHOO.widget.TVFadeIn(el,callback);case this.FADE_OUT:return new YAHOO.widget.TVFadeOut(el,callback);default:return null;}};this.isValid=function(type){return("undefined"!=eval("typeof "+type));};}; \ No newline at end of file +YAHOO.widget.TVAnim=new function(){this.FADE_IN="YAHOO.widget.TVFadeIn";this.FADE_OUT="YAHOO.widget.TVFadeOut";this.getAnim=function(type,el,callback){switch(type){case this.FADE_IN:return new YAHOO.widget.TVFadeIn(el,callback);case this.FADE_OUT:return new YAHOO.widget.TVFadeOut(el,callback);default:return null;}};this.isValid=function(type){return("undefined"!=eval("typeof "+type));};}; diff --git a/include/ytree/TreeView/anim/TVFadeIn.js b/include/ytree/TreeView/anim/TVFadeIn.js index dd067fd9..f76fe2b2 100644 --- a/include/ytree/TreeView/anim/TVFadeIn.js +++ b/include/ytree/TreeView/anim/TVFadeIn.js @@ -1,2 +1,2 @@ /* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */ -YAHOO.widget.TVFadeIn=function(el,callback){this.el=el;this.callback=callback;this.logger=new ygLogger("TVFadeIn");};YAHOO.widget.TVFadeIn.prototype={animate:function(){var tvanim=this;var s=this.el.style;s.opacity=0.1;s.filter="alpha(opacity=10)";s.display="";var dur=0.4;var a=new YAHOO.util.Anim(this.el,{opacity:{from:0.1,to:1,unit:""}},dur);a.onComplete.subscribe(function(){tvanim.onComplete();});a.animate();},onComplete:function(){this.callback();}}; \ No newline at end of file +YAHOO.widget.TVFadeIn=function(el,callback){this.el=el;this.callback=callback;this.logger=new ygLogger("TVFadeIn");};YAHOO.widget.TVFadeIn.prototype={animate:function(){var tvanim=this;var s=this.el.style;s.opacity=0.1;s.filter="alpha(opacity=10)";s.display="";var dur=0.4;var a=new YAHOO.util.Anim(this.el,{opacity:{from:0.1,to:1,unit:""}},dur);a.onComplete.subscribe(function(){tvanim.onComplete();});a.animate();},onComplete:function(){this.callback();}}; diff --git a/include/ytree/TreeView/anim/TVFadeOut.js b/include/ytree/TreeView/anim/TVFadeOut.js index 8ff5e524..783bc85e 100644 --- a/include/ytree/TreeView/anim/TVFadeOut.js +++ b/include/ytree/TreeView/anim/TVFadeOut.js @@ -1,2 +1,2 @@ /* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */ -YAHOO.widget.TVFadeOut=function(el,callback){this.el=el;this.callback=callback;this.logger=new ygLogger("TVFadeOut");};YAHOO.widget.TVFadeOut.prototype={animate:function(){var tvanim=this;var dur=0.4;var a=new YAHOO.util.Anim(this.el,{opacity:{from:1,to:0.1,unit:""}},dur);a.onComplete.subscribe(function(){tvanim.onComplete();});a.animate();},onComplete:function(){var s=this.el.style;s.display="none";s.filter="alpha(opacity=100)";this.callback();}}; \ No newline at end of file +YAHOO.widget.TVFadeOut=function(el,callback){this.el=el;this.callback=callback;this.logger=new ygLogger("TVFadeOut");};YAHOO.widget.TVFadeOut.prototype={animate:function(){var tvanim=this;var dur=0.4;var a=new YAHOO.util.Anim(this.el,{opacity:{from:1,to:0.1,unit:""}},dur);a.onComplete.subscribe(function(){tvanim.onComplete();});a.animate();},onComplete:function(){var s=this.el.style;s.display="none";s.filter="alpha(opacity=100)";this.callback();}}; diff --git a/include/ytree/TreeView/css/check/tree.css b/include/ytree/TreeView/css/check/tree.css index 26cb743a..a1e8d184 100644 --- a/include/ytree/TreeView/css/check/tree.css +++ b/include/ytree/TreeView/css/check/tree.css @@ -1 +1 @@ -/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */ /* first or middle sibling, no children */ .ygtvtn {background: url(../../img/folders/tn.gif) 0 0 no-repeat; width:16px; height:22px; } /* first or middle sibling, collapsable */ .ygtvtm {background: url(../../img/folders/tm.gif) 0 0 no-repeat; width:16px; height:22px; cursor:pointer } /* first or middle sibling, collapsable, hover */ .ygtvtmh {background: url(../../img/folders/tmh.gif) 0 0 no-repeat; width:16px; height:22px; cursor:pointer } /* first or middle sibling, expandable */ .ygtvtp {background: url(../../img/folders/tp.gif) 0 0 no-repeat; width:16px; height:22px; cursor:pointer } /* first or middle sibling, expandable, hover */ .ygtvtph {background: url(../../img/folders/tph.gif) 0 0 no-repeat; width:16px; height:22px; cursor:pointer } /* last sibling, no children */ .ygtvln {background: url(../../img/folders/ln.gif) 0 0 no-repeat; width:16px; height:22px; } /* Last sibling, collapsable */ .ygtvlm {background: url(../../img/folders/lm.gif) 0 0 no-repeat; width:16px; height:22px; cursor:pointer } /* Last sibling, collapsable, hover */ .ygtvlmh {background: url(../../img/folders/lmh.gif) 0 0 no-repeat; width:16px; height:22px; cursor:pointer } /* Last sibling, expandable */ .ygtvlp { background: url(../../img/folders/lp.gif) 0 0 no-repeat; width:16px; height:22px; cursor:pointer } /* Last sibling, expandable, hover */ .ygtvlph { background: url(../../img/folders/lph.gif) 0 0 no-repeat; width:16px; height:22px; cursor:pointer } /* Loading icon */ .ygtvloading { background: url(../../img/check/loading.gif) 0 0 no-repeat; width:16px; height:22px; } /* the style for the empty cells that are used for rendering the depth * of the node */ .ygtvdepthcell { background: url(../../img/check/vline.gif) 0 0 no-repeat; width:16px; height:22px; } .ygtvblankdepthcell { width:16px; height:22px; } /* the style of the div around each node */ .ygtvitem { } /* the style of the div around each node's collection of children */ .ygtvchildren { } * html .ygtvchildren { height:1%; } /* the style of the text label in ygTextNode */ .ygtvlabel, .ygtvlabel:link, .ygtvlabel:visited, .ygtvlabel:hover { text-decoration: none; } .ygtvcheck0 { background: url(../../img/check/check0.gif) 0 0 no-repeat; width:16px; height:22px; cursor:pointer } .ygtvcheck1 { background: url(../../img/check/check1.gif) 0 0 no-repeat; width:16px; height:22px; cursor:pointer } .ygtvcheck2 { background: url(../../img/check/check2.gif) 0 0 no-repeat; width:16px; height:22px; cursor:pointer } \ No newline at end of file +/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */ /* first or middle sibling, no children */ .ygtvtn {background: url(../../img/folders/tn.gif) 0 0 no-repeat; width:36px; height:22px; cursor:pointer } /* first or middle sibling, collapsable */ .ygtvtm {background: url(../../img/folders/tm.gif) 0 0 no-repeat; width:36px; height:22px; cursor:pointer } /* first or middle sibling, collapsable, hover */ .ygtvtmh {background: url(../../img/folders/tmh.gif) 0 0 no-repeat; width:36px; height:22px; cursor:pointer } /* first or middle sibling, expandable */ .ygtvtp {background: url(../../img/folders/tp.gif) 0 0 no-repeat; width:36px; height:22px; cursor:pointer } /* first or middle sibling, expandable, hover */ .ygtvtph {background: url(../../img/folders/tph.gif) 0 0 no-repeat; width:36px; height:22px; cursor:pointer } /* last sibling, no children */ .ygtvln {background: url(../../img/folders/ln.gif) 0 0 no-repeat; width:36px; height:22px; cursor:pointer } /* Last sibling, collapsable */ .ygtvlm {background: url(../../img/folders/lm.gif) 0 0 no-repeat; width:36px; height:22px; cursor:pointer } /* Last sibling, collapsable, hover */ .ygtvlmh {background: url(../../img/folders/lmh.gif) 0 0 no-repeat; width:36px; height:22px; cursor:pointer } /* Last sibling, expandable */ .ygtvlp { background: url(../../img/folders/lp.gif) 0 0 no-repeat; width:36px; height:22px; cursor:pointer } /* Last sibling, expandable, hover */ .ygtvlph { background: url(../../img/folders/lph.gif) 0 0 no-repeat; width:36px; height:22px; cursor:pointer } /* Loading icon */ .ygtvloading { background: url(../../img/check/loading.gif) 0 0 no-repeat; width:16px; height:22px; } /* the style for the empty cells that are used for rendering the depth * of the node */ .ygtvdepthcell { background: url(../../img/check/vline.gif) 0 0 no-repeat; width:16px; height:22px; } .ygtvblankdepthcell { width:16px; height:22px; } /* the style of the div around each node */ .ygtvitem { } /* the style of the div around each node's collection of children */ .ygtvchildren { } * html .ygtvchildren { height:1%; } /* the style of the text label in ygTextNode */ .ygtvlabel, .ygtvlabel:link, .ygtvlabel:visited, .ygtvlabel:hover { text-decoration: none; } /* To bold labels */ .ygtvlabelbold { font-weight: bold; cursor: pointer; } .ygtvcheck0 { background: url(../../img/check/check0.gif) 0 0 no-repeat; width:16px; height:22px; cursor:pointer } .ygtvcheck1 { background: url(../../img/check/check1.gif) 0 0 no-repeat; width:16px; height:22px; cursor:pointer } .ygtvcheck2 { background: url(../../img/check/check2.gif) 0 0 no-repeat; width:16px; height:22px; cursor:pointer } \ No newline at end of file diff --git a/include/ytree/treeutil.js b/include/ytree/treeutil.js index 52fe23f5..8530b124 100644 --- a/include/ytree/treeutil.js +++ b/include/ytree/treeutil.js @@ -45,6 +45,6 @@ function construct_url_from_tree_param(node){var treespace=YAHOO.namespace(node. for(i=node.depth;i>=0;i--){var currentnode;if(i==node.depth){currentnode=node;}else{currentnode=node.getAncestor(i);} url=url+"&PARAMN_id"+'_'+currentnode.depth+'='+currentnode.data.id;if(currentnode.data.param!='undefined'){for(nparam in currentnode.data.param){url=url+"&PARAMN_"+nparam+'_'+currentnode.depth+'='+currentnode.data.param[nparam];}}} return url;} -function loadDataForNode(node,onCompleteCallback){var id=node.data.id;var params="entryPoint=TreeData&function=get_node_data"+construct_url_from_tree_param(node);var callback={success:function(o){node=o.argument[0];var nodes=JSON.parse(o.responseText);var tmpNode;for(nodedata in nodes){for(node1 in nodes[nodedata]){addNode(node,nodes[nodedata][node1]);}} +function loadDataForNode(node,onCompleteCallback){var id=node.data.id;var params="entryPoint=TreeData&function=get_node_data"+construct_url_from_tree_param(node);var callback={success:function(o){node=o.argument[0];var nodes=YAHOO.lang.JSON.parse(o.responseText);var tmpNode;for(nodedata in nodes){for(node1 in nodes[nodedata]){addNode(node,nodes[nodedata][node1]);}} o.argument[1]();},failure:function(o){},argument:[node,onCompleteCallback]} -var trobj=YAHOO.util.Connect.asyncRequest('POST','index.php',callback,params);} \ No newline at end of file +var trobj=YAHOO.util.Connect.asyncRequest('POST','index.php',callback,params);} diff --git a/install.php b/install.php index 8af06584..e563659d 100644 --- a/install.php +++ b/install.php @@ -324,7 +324,8 @@ EOHTML; -$exclude_files = array('register.php','download_modules.php'); +$exclude_files = array('register.php'); + if(isset($next_step) && isset($workflow[$next_step]) && !in_array($workflow[$next_step],$exclude_files) && isset($sugar_config['installer_locked']) && $sugar_config['installer_locked'] == true) { $the_file = 'installDisabled.php'; $disabled_title = $mod_strings['LBL_DISABLED_DESCRIPTION']; diff --git a/install/checkDBSettings.php b/install/checkDBSettings.php index 158709c3..29c0555c 100644 --- a/install/checkDBSettings.php +++ b/install/checkDBSettings.php @@ -47,15 +47,27 @@ installLog("Begin DB Check Process *************"); if(function_exists('sqlsrv_connect')){ $_SESSION['mssql_type'] = 'sqlsrv'; } + + global $mod_strings; $errors = array(); copyInputsIntoSession(); - if( trim($_SESSION['setup_db_database_name']) == '' ){ + installLog("Checking DB Name is valid."); + + $_SESSION['setup_db_database_name'] = trim($_SESSION['setup_db_database_name']); + + if($_SESSION['setup_db_database_name'] == '' ){ $errors['ERR_DB_NAME'] = $mod_strings['ERR_DB_NAME']; installLog("ERROR:: {$errors['ERR_DB_NAME']}"); } + if (!isValidDBName($_SESSION['setup_db_database_name'], $_SESSION['setup_db_type'])) { + $errIdx = 'ERR_DB_' . strtoupper($_SESSION['setup_db_type']) . '_DB_NAME_INVALID'; + $errors[$errIdx] = $mod_strings[$errIdx]; + installLog("ERROR:: {$errors[$errIdx]}"); + } + if($_SESSION['setup_db_type'] != 'oci8') { if( trim($_SESSION['setup_db_host_name']) == '' ){ @@ -84,7 +96,7 @@ installLog("Begin DB Check Process *************"); // test the account that will talk to the db if we're not creating it if( $_SESSION['setup_db_sugarsales_user'] != '' && !$_SESSION['setup_db_create_sugarsales_user'] ){ - if( $_SESSION['setup_db_type'] == 'mysql' ){ + if( $_SESSION['setup_db_type'] == 'mysql' ){ installLog("testing with mysql"); if(isset($_SESSION['mysql_type']) && $_SESSION['mysql_type'] == 'mysqli'){ installLog("MySQLI library detected"); @@ -113,7 +125,7 @@ installLog("Begin DB Check Process *************"); $error = mysql_error(); } - $errors['ERR_DB_LOGIN_FAILURE'] = $mod_strings['ERR_DB_LOGIN_FAILURE_MYSQL']." $errno: $error)."; + $errors['ERR_DB_LOGIN_FAILURE'] = $mod_strings['ERR_DB_LOGIN_FAILURE_MYSQL']; installLog("ERROR:: {$errors['ERR_DB_LOGIN_FAILURE']}"); } else{ @@ -160,10 +172,11 @@ installLog("Begin DB Check Process *************"); } } // Bug 29855 - Check to see if given db name is valid - if (preg_match("/[\"\'\*\/\\?\:\\<\>\-]+/i", $_SESSION['setup_db_database_name']) ) { - $errors['ERR_DB_MSSQL_DB_NAME'] = $mod_strings['ERR_DB_MSSQL_DB_NAME_INVALID']; - installLog("ERROR:: {$errors['ERR_DB_MSSQL_DB_NAME']}"); - } +// if (preg_match("/^[0-9#@]+|[\"\'\*\/\\?\:\\<\>\-\ \&\!\(\)\[\]\{\}\;\,\.\`\~\|\\\\]+/i", $_SESSION['setup_db_database_name']) ) { +// $errors['ERR_DB_MSSQL_DB_NAME'] = $mod_strings['ERR_DB_MSSQL_DB_NAME_INVALID']; +// installLog("ERROR:: {$errors['ERR_DB_MSSQL_DB_NAME']}"); +// } +// Moved to isValidDBName function in db_utils.php } elseif( $_SESSION['setup_db_type'] == 'oci8' ){ } diff --git a/install/confirmSettings.php b/install/confirmSettings.php index d812bd26..c645672e 100644 --- a/install/confirmSettings.php +++ b/install/confirmSettings.php @@ -95,7 +95,7 @@ $out =<< - +
        @@ -526,7 +526,7 @@ $out .=<< @@ -541,10 +541,10 @@ $out .=<<
        -  
        - + - +
        diff --git a/install/dbConfig.js b/install/dbConfig.js index b02acfe9..693a0208 100644 --- a/install/dbConfig.js +++ b/install/dbConfig.js @@ -37,4 +37,4 @@ else{elem.style.display='none';theForm.setup_db_username_is_privileged.disabled= function toggleDropTables(){var theForm=document.forms[0];if(theForm.setup_db_create_database.checked){theForm.setup_db_drop_tables.checked='';theForm.setup_db_drop_tables.disabled="disabled";} else{theForm.setup_db_drop_tables.disabled='';}} function toggleUsernameIsPrivileged(){var theForm=document.forms[0];var elem=document.getElementById('privileged_user_info');if(theForm.setup_db_username_is_privileged.checked){elem.style.display='none';} -else{elem.style.display='';}} \ No newline at end of file +else{elem.style.display='';}} diff --git a/install/dbConfig_a.php b/install/dbConfig_a.php index 829a3df3..3156c31d 100644 --- a/install/dbConfig_a.php +++ b/install/dbConfig_a.php @@ -111,7 +111,7 @@ $out =<< EOQ; -$out .= ''; +$out .= ''; $out2 =<< @@ -265,10 +265,10 @@ $out4 =<< - + - + @@ -434,7 +434,7 @@ function confirm_drop_tables(yes_no){ - + diff --git a/install/download_modules.php b/install/download_modules.php index d5ca4472..54ba8c69 100644 --- a/install/download_modules.php +++ b/install/download_modules.php @@ -196,7 +196,7 @@ $out =<< - + {$fileMaxSize} @@ -261,7 +261,6 @@ $form =<<
        {$mod_strings['LBL_HELP']}
        - - + {$fileMaxSize} @@ -288,7 +288,7 @@ $out1 =<<
        {$mod_strings['LBL_HELP']}
        - +
        diff --git a/install/installCommon.js b/install/installCommon.js index a1f98a03..4200854d 100644 --- a/install/installCommon.js +++ b/install/installCommon.js @@ -34,4 +34,4 @@ ********************************************************************************/ function showHelp(step) {url='http://www.sugarcrm.com/forums/';name='helpWindowPopup';window.open(url,name);} -function setFocus(){focus=document.getElementById('defaultFocus');focus.focus();} \ No newline at end of file +function setFocus(){focus=document.getElementById('button_next2');focus.focus();} diff --git a/install/installSystemCheck.php b/install/installSystemCheck.php index d2ad99a2..61b18609 100644 --- a/install/installSystemCheck.php +++ b/install/installSystemCheck.php @@ -399,7 +399,7 @@ if($error_found){ - + diff --git a/install/installType.php b/install/installType.php index a72b0bd2..4c5d4b6c 100644 --- a/install/installType.php +++ b/install/installType.php @@ -138,7 +138,7 @@ $out .= << - + diff --git a/install/language/en_us.lang.php b/install/language/en_us.lang.php index 63f17bc2..40381bbd 100644 --- a/install/language/en_us.lang.php +++ b/install/language/en_us.lang.php @@ -107,7 +107,9 @@ $mod_strings = array( 'ERR_DB_MYSQL_VERSION2' => ') is not supported by Sugar. You will need to install a version that is compatible with the Sugar application. Please consult the Compatibility Matrix in the Release Notes for supported MySQL versions.', 'ERR_DB_NAME' => 'Database name cannot be blank.', 'ERR_DB_NAME2' => "Database name cannot contain a '\\', '/', or '.'", - 'ERR_DB_MSSQL_DB_NAME_INVALID' => "Database name cannot contain a '\"', \"'\", '*', '/', '\', '?', ':', '<', '>', or '-'", + 'ERR_DB_MYSQL_DB_NAME_INVALID' => "Database name cannot contain a '\\', '/', or '.'", + 'ERR_DB_MSSQL_DB_NAME_INVALID' => "Database name cannot begin with a number, '#', or '@' and cannot contain a space, '\"', \"'\", '*', '/', '\', '?', ':', '<', '>', '&', '!', or '-'", + 'ERR_DB_OCI8_DB_NAME_INVALID' => "Database name can only consist of alphanumeric characters and the symbols '#', '_' or '$'", 'ERR_DB_PASSWORD' => 'The passwords provided for the Sugar database administrator do not match. Please re-enter the same passwords in the password fields.', 'ERR_DB_PRIV_USER' => 'Provide a database administrator user name. The user is required for the initial connection to the database.', 'ERR_DB_USER_EXISTS' => 'User name for Sugar database user already exists -- cannot create another one with the same name. Please enter a new user name.', diff --git a/install/license.js b/install/license.js index 5d977550..7e25dfc8 100644 --- a/install/license.js +++ b/install/license.js @@ -36,4 +36,4 @@ function toggleLicenseAccept(){var theForm=document.forms[0];if(theForm.setup_li else{theForm.setup_license_accept.checked="yes";} toggleNextButton();} function toggleNextButton(){var theForm=document.forms[0];var nextButton=document.getElementById("button_next");if(theForm.setup_license_accept.checked){nextButton.disabled='';nextButton.focus();} -else{nextButton.disabled="disabled";}} \ No newline at end of file +else{nextButton.disabled="disabled";}} diff --git a/install/license.php b/install/license.php index dd756c0a..94928219 100644 --- a/install/license.php +++ b/install/license.php @@ -72,7 +72,7 @@ $out =<< - +
        @@ -96,11 +96,11 @@ $out =<< - + {$mod_strings['LBL_LICENSE_I_ACCEPT']} - @@ -111,7 +111,7 @@ $out =<< - + diff --git a/install/oc_convert.js b/install/oc_convert.js index 5e363b92..c074c82f 100644 --- a/install/oc_convert.js +++ b/install/oc_convert.js @@ -32,4 +32,4 @@ * technical reasons, the Appropriate Legal Notices must display the words * "Powered by SugarCRM". ********************************************************************************/ -function toggleIsFirstTime(){var theForm=document.forms[0];theForm.first_time.value="false";} \ No newline at end of file +function toggleIsFirstTime(){var theForm=document.forms[0];theForm.first_time.value="false";} diff --git a/install/oc_install.js b/install/oc_install.js index 2200cc36..8f49858f 100644 --- a/install/oc_install.js +++ b/install/oc_install.js @@ -33,4 +33,4 @@ * "Powered by SugarCRM". ********************************************************************************/ function toggleOfflineClientInstallation(){var theForm=document.forms[0];if(!theForm.oc_install.checked){theForm.oc_server_url.disabled="disabled";theForm.oc_username.disabled="disabled";theForm.oc_password.disabled="disabled";} -else{theForm.oc_server_url.disabled='';theForm.oc_username.disabled='';theForm.oc_password.disabled='';}} \ No newline at end of file +else{theForm.oc_server_url.disabled='';theForm.oc_username.disabled='';theForm.oc_password.disabled='';}} diff --git a/install/performSetup.php b/install/performSetup.php index 4f1b1f04..8f21450e 100644 --- a/install/performSetup.php +++ b/install/performSetup.php @@ -111,7 +111,7 @@ $out =<< - + @@ -467,7 +467,7 @@ $errTcpip = ''; - +
        {$mod_strings['LBL_HELP']}
         
        @@ -480,7 +480,7 @@ FP;
        - +
        diff --git a/install/populateSeedData.php b/install/populateSeedData.php index b5f6550e..7e2e9d2e 100644 --- a/install/populateSeedData.php +++ b/install/populateSeedData.php @@ -484,6 +484,7 @@ $project->status = $sugar_demodata['project_seed_data']['audit']['status']; $project->priority = $sugar_demodata['project_seed_data']['audit']['priority']; $audit_plan_id = $project->save(); +$project_task_id_counter = 1; // all the project task IDs cannot be 1, so using couter foreach($sugar_demodata['project_seed_data']['audit']['project_tasks'] as $v){ $project_task = new ProjectTask(); $project_task->assigned_user_id = 1; @@ -491,12 +492,14 @@ foreach($sugar_demodata['project_seed_data']['audit']['project_tasks'] as $v){ $project_task->date_start = $v['date_start']; $project_task->date_finish = $v['date_finish']; $project_task->project_id = $audit_plan_id; - $project_task->project_task_id = '1'; + $project_task->project_task_id = $project_task_id_counter; $project_task->description = $v['description']; $project_task->duration = $v['duration']; $project_task->duration_unit = $v['duration_unit']; $project_task->percent_complete = $v['percent_complete']; $communicate_stakeholders_id = $project_task->save(); + + $project_task_id_counter++; } diff --git a/install/ready.php b/install/ready.php index 1463bc38..65e0e460 100644 --- a/install/ready.php +++ b/install/ready.php @@ -135,8 +135,8 @@ $out = << - - + + diff --git a/install/register.js b/install/register.js index 70705b7c..502d1259 100644 --- a/install/register.js +++ b/install/register.js @@ -41,4 +41,4 @@ else if(form.email1.value=="") {form.email1.focus();alert("Please provide your email address");return false;} else {form.submit();} -document.appform.submit();window.focus();} \ No newline at end of file +document.appform.submit();window.focus();} diff --git a/install/register.php b/install/register.php index eeb2a839..7e4f8757 100644 --- a/install/register.php +++ b/install/register.php @@ -98,7 +98,7 @@ $out =<< - + @@ -121,7 +121,7 @@ $out =<<
        - +
        diff --git a/install/siteConfig.js b/install/siteConfig.js index 3d257f54..02b60374 100644 --- a/install/siteConfig.js +++ b/install/siteConfig.js @@ -39,4 +39,4 @@ else{elem.style.display='none';}} function toggleLogDir(){var theForm=document.forms[0];var elem=document.getElementById('setup_site_log_dir');if(theForm.setup_site_custom_log_dir.checked){elem.style.display='';} else{elem.style.display='none';}} function toggleGUID(){var theForm=document.forms[0];var elem=document.getElementById('setup_site_guid_section');if(theForm.setup_site_specify_guid.checked){elem.style.display='';} -else{elem.style.display='none';}} \ No newline at end of file +else{elem.style.display='none';}} diff --git a/install/siteConfig_a.php b/install/siteConfig_a.php index b38ac051..e2d4a545 100644 --- a/install/siteConfig_a.php +++ b/install/siteConfig_a.php @@ -122,7 +122,7 @@ $out =<< - +
         
        @@ -155,7 +155,7 @@ $out .=<< - + @@ -190,10 +190,10 @@ $out .= << - +
        * {$mod_strings['LBL_SITECFG_URL']}

        {$mod_strings['LBL_SITECFG_SYS_NAME_MSG']}
        * {$mod_strings['LBL_SYSTEM_NAME']}
        - +
        diff --git a/install/siteConfig_b.php b/install/siteConfig_b.php index 94125d2d..2301cc5d 100644 --- a/install/siteConfig_b.php +++ b/install/siteConfig_b.php @@ -121,7 +121,7 @@ $out =<< - + @@ -215,10 +215,10 @@ $out .= << - +
        - +
        diff --git a/install/systemOptions.php b/install/systemOptions.php index 877ab4c8..e08d1181 100644 --- a/install/systemOptions.php +++ b/install/systemOptions.php @@ -81,7 +81,7 @@ $out=<< - + @@ -157,10 +157,10 @@ $out.=<< - +
        - +
        diff --git a/install/welcome.php b/install/welcome.php index e2343855..2c651668 100644 --- a/install/welcome.php +++ b/install/welcome.php @@ -60,7 +60,7 @@ $out = << - + @@ -95,7 +95,7 @@ $out = <<
        {$mod_strings['LBL_HELP']}
        - +
        diff --git a/jssource/JSGroupings.php b/jssource/JSGroupings.php index fd189af2..aeed972d 100644 --- a/jssource/JSGroupings.php +++ b/jssource/JSGroupings.php @@ -58,6 +58,7 @@ $sugar_grp1_yui = array( //YUI scripts loaded on first page + 'include/javascript/yui3/build/yui/yui-min.js' => 'include/javascript/sugar_grp1_yui.js', 'include/javascript/yui/build/yahoo/yahoo-min.js' => 'include/javascript/sugar_grp1_yui.js', 'include/javascript/yui/build/dom/dom-min.js' => 'include/javascript/sugar_grp1_yui.js', 'include/javascript/yui/build/yahoo-dom-event/yahoo-dom-event-min.js' @@ -92,6 +93,8 @@ 'include/javascript/yui/build/button/button-min.js' => 'include/javascript/sugar_grp_yui_widgets.js', 'include/javascript/yui/build/calendar/calendar-min.js' => 'include/javascript/sugar_grp_yui_widgets.js', 'include/javascript/sugarwidgets/SugarYUIWidgets.js' => 'include/javascript/sugar_grp_yui_widgets.js', + // Include any Sugar overrides done to YUI libs for bugfixes + 'include/javascript/sugar_yui_overrides.js' => 'include/javascript/sugar_grp_yui_widgets.js', ), $sugar_grp_yui_widgets_css = array( @@ -131,8 +134,8 @@ 'modules/Emails/javascript/EmailUICompose.js' => 'include/javascript/sugar_grp_emails.js', 'modules/Emails/javascript/ajax.js' => 'include/javascript/sugar_grp_emails.js', 'modules/Emails/javascript/grid.js' => 'include/javascript/sugar_grp_emails.js', - 'modules/Emails/javascript/complexLayout.js' => 'include/javascript/sugar_grp_emails.js', 'modules/Emails/javascript/init.js' => 'include/javascript/sugar_grp_emails.js', + 'modules/Emails/javascript/complexLayout.js' => 'include/javascript/sugar_grp_emails.js', 'modules/Emails/javascript/composeEmailTemplate.js' => 'include/javascript/sugar_grp_emails.js', 'modules/Emails/javascript/displayOneEmailTemplate.js' => 'include/javascript/sugar_grp_emails.js', 'modules/Emails/javascript/viewPrintable.js' => 'include/javascript/sugar_grp_emails.js', diff --git a/jssource/jsmin.php b/jssource/jsmin.php index 3c2f859d..6f5504fa 100644 --- a/jssource/jsmin.php +++ b/jssource/jsmin.php @@ -1,291 +1,308 @@ - * @copyright 2002 Douglas Crockford (jsmin.c) - * @copyright 2008 Ryan Grove (PHP port) - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 1.1.1 (2008-03-02) - * @link http://code.google.com/p/jsmin-php/ - */ class JSMin { - const ORD_LF = 10; - const ORD_SPACE = 32; - - protected $a = ''; - protected $b = ''; - protected $input = ''; - protected $inputIndex = 0; - protected $inputLength = 0; - protected $lookAhead = null; - protected $output = ''; - - // -- Public Static Methods -------------------------------------------------- - - public static function minify($js) { - $jsmin = new JSMin($js); - return $jsmin->min(); - } - - // -- Public Instance Methods ------------------------------------------------ - - public function __construct($input) { - $this->input = str_replace("\r\n", "\n", $input); - $this->inputLength = strlen($this->input); - } - - // -- Protected Instance Methods --------------------------------------------- - - protected function action($d) { - switch($d) { - case 1: - $this->output .= $this->a; - - case 2: - $this->a = $this->b; + /** + * Calls the SugarMin minify function. + * + * @param string $js Javascript to be minified + * @return string Minified javascript + */ + public static function minify($js, $filename = '') { + return SugarMin::minify($js); + } +} - if ($this->a === "'" || $this->a === '"') { - for (;;) { - $this->output .= $this->a; - $this->a = $this->get(); +/** + * SugarMin is a Javascript minifier with two levels of compression. The default compression + * is set to light. Light compression will preserve some line breaks that may interfere with + * operation of the script. Deep compression will remove all the line breaks, but before using + * deep compression make sure the script has passed JSLint. + */ +class SugarMin { + protected $noSpaceChars = array('\\', '$', '_', '/'); + protected $postNewLineSafeChars = array('\\', '$', '_', '{', '[', '(', '+', '-'); + protected $preNewLineSafeChars = array('\\', '$', '_', '}', ']', ')', '+', '-', '"', "'"); + protected $regexChars = array('(', ',', '=', ':', '[', '!', '&', '|', '?', '{', '}', ';'); + protected $compression; + + private function __construct() {} + + /** + * Entry point function to minify javascript. + * + * @param string $js Javascript source code as a string. + * @param string $compression Compression option. {light, deep}. + * @return string $output Output javascript code as a string. + */ + static public function minify($js, $compression = 'light') { + try { + $me = new SugarMin(); + $output = $me->jsParser($js, $compression); + return $output; + } catch (Exception $e) { + // Exception handling is left up to the implementer. + throw $e; + } + } - if ($this->a === $this->b) { - break; + /** + * jsParser will take javascript source code and minify it. + * + * Note: There is a lot of redundant code since both passes + * operate similarly but with slight differences. It will probably + * be a good idea to refactor the code at a later point when it is stable. + * + * JSParser will perform 3 passes on the code. Pass 1 takes care of single + * line and mult-line comments. Pass 2 performs some sanitation on each of the lines + * and pass 3 works on stripping out unnecessary spaces. + * + * @param string $js + * @param string $currentOptions + * @return void + */ + protected function jsParser($js, $compression = 'light') { + + // We first perform a few operations to simplify our + // minification process. We convert all carriage returns + // into line breaks. + $js = str_replace("\r\n", "\n", $js); + $js = str_replace("\r", "\n", $js); + $js = preg_replace("/\n+/","\n", $js); + + $stripped_js = ''; + $prevChar = null; + $lastChar = null; + + // Pass 1, strip out single line and multi-line comments. + for ($i = 0; $i < strlen($js); $i++) { + $char = $js[$i]; + + if (strlen($stripped_js) > 0) { + $lastChar = $stripped_js[strlen($stripped_js) - 1]; } - if (ord($this->a) <= self::ORD_LF) { - throw new JSMinException('Unterminated string literal.'); + if ($lastChar != " " && $lastChar != "\n" && $lastChar != null) { + $prevChar = $lastChar; } - - if ($this->a === '\\') { - $this->output .= $this->a; - $this->a = $this->get(); + + switch ($char) { + case "\\": // If escape character + $stripped_js .= $char.$js[$i + 1]; + $i++; + break; + case '"': // If string literal + case "'": + $literal = $delimiter = $char; + + for ($j = $i + 1; $j < strlen($js); $j++) { + $literal .= $js[$j]; + + if ($js[$j] == "\\") { + $literal .= $js[$j + 1]; + $j++; + continue; + } + + if ($js[$j] == $delimiter) { + break; + } + } + + $i = $j; + $stripped_js .= $literal; + break; + case "/": // If comment or regex + if ($js[$i + 1] == "/") { + $comment = $char; + for ($j = $i + 1; $j < strlen($js); $j++) { + if ($js[$j] == "\\") { + $j++; + continue; + } + + if ($js[$j + 1] == "\n") { + break; + } + + $comment .= $js[$j]; + } + $i = $j; + break; + } else if ($js[$i + 1] == "*") { + $mlcomment = $char; + for ($j = $i + 1; $j < strlen($js); $j++) { + if ($js[$j] == "\\") { + $j++; + continue; + } + + if ($js[$j] == "*" && $js[$j + 1] == "/") { + break; + } + + $mlcomment .= $js[$j]; + } + + $i = $j + 1; + break; + } else if (in_array($prevChar, $this->regexChars) || $prevChar == null) { + $nesting = 0; + $stripped_js .= $js[$i]; + + for ($j = $i + 1; $j < strlen($js); $j++) { + if ($js[$j] == "\\") { + $stripped_js .= $js[$j].$js[$j + 1]; + $j++; + continue; + } + + if ($js[$j] == '[') { + $nesting++; + } else if ($js[$j] == ']') { + $nesting--; + } + + $stripped_js .= $js[$j]; + + if ($js[$j] == '/' && $nesting == 0 && $prevChar != "\\") { + break; + } + } + $i = $j; + break; + } + default: + $stripped_js .= $char; + break; } - } } - case 3: - $this->b = $this->next(); - - if ($this->b === '/' && ( - $this->a === '(' || $this->a === ',' || $this->a === '=' || - $this->a === ':' || $this->a === '[' || $this->a === '!' || - $this->a === '&' || $this->a === '|' || $this->a === '?')) { + // Split our string up into an array and iterate over each line + // to do processing. + $input = explode("\n", $stripped_js); + $primedInput = ''; - $this->output .= $this->a . $this->b; + // Pass 2, remove space and tabs from each line. + for ($index = 0; $index < count($input); $index++) { + $line = $input[$index]; - for (;;) { - $this->a = $this->get(); + $line = trim($line, " \t"); - if ($this->a === '/') { - break; - } elseif ($this->a === '\\') { - $this->output .= $this->a; - $this->a = $this->get(); - } elseif (ord($this->a) <= self::ORD_LF) { - throw new JSMinException('Unterminated regular expression '. - 'literal.'); + // If the line is empty, ignore it. + if (strlen($line) == 0) { + continue; } - $this->output .= $this->a; - } - - $this->b = $this->next(); + $primedInput[] = $line; } - } - } - - protected function get() { - $c = $this->lookAhead; - $this->lookAhead = null; - - if ($c === null) { - if ($this->inputIndex < $this->inputLength) { - $c = substr($this->input, $this->inputIndex, 1); - $this->inputIndex += 1; - } else { - $c = null; - } - } - if ($c === "\r") { - return "\n"; - } - - if ($c === null || $c === "\n" || ord($c) >= self::ORD_SPACE) { - return $c; - } - - return ' '; - } - - protected function isAlphaNum($c) { - return ord($c) > 126 || $c === '\\' || preg_match('/^[\w\$]$/', $c) === 1; - } - - protected function min() { - $this->a = "\n"; - $this->action(3); - - while ($this->a !== null) { - switch ($this->a) { - case ' ': - if ($this->isAlphaNum($this->b)) { - $this->action(1); - } else { - $this->action(2); - } - break; - - case "\n": - switch ($this->b) { - case '{': - case '[': - case '(': - case '+': - case '-': - $this->action(1); - break; - - case ' ': - $this->action(3); - break; - - default: - if ($this->isAlphaNum($this->b)) { - $this->action(1); - } - else { - $this->action(2); - } - } - break; - - default: - switch ($this->b) { - case ' ': - if ($this->isAlphaNum($this->a)) { - $this->action(1); - break; - } - - $this->action(3); - break; - - case "\n": - switch ($this->a) { - case '}': - case ']': - case ')': - case '+': - case '-': - case '"': - case "'": - $this->action(1); - break; - - default: - if ($this->isAlphaNum($this->a)) { - $this->action(1); - } - else { - $this->action(3); - } - } - break; - - default: - $this->action(1); - break; - } - } - } - - return $this->output; - } - - protected function next() { - $c = $this->get(); - - if ($c === '/') { - switch($this->peek()) { - case '/': - for (;;) { - $c = $this->get(); - - if (ord($c) <= self::ORD_LF) { - return $c; - } - } - - case '*': - $this->get(); - - for (;;) { - switch($this->get()) { - case '*': - if ($this->peek() === '/') { - $this->get(); - return ' '; + $input = $primedInput; + $output = ''; + + // Pass 3, remove extra spaces + for ($index = 0; $index < count($input); $index++) { + $line = $input[$index]; + $newLine = ''; + $len = strlen($line); + + $nextLine = ($index < count($input) -1 ) ? $input[$index + 1] : ''; + + $lastChar = ($len > 0) ? $line[$len - 1] : $line[0]; + $nextChar = ($nextLine) ? $nextLine[0] : null; + + // Iterate through the string one character at a time. + for ($i = 0; $i < $len; $i++) { + switch($line[$i]) { + case "\\": + $newLine .= $line[$i].$line[$i + 1]; + $i++; + break; + case '/': + // Check if regular expression + if (strlen($newLine) > 0 && in_array($newLine[strlen($newLine) - 1], $this->regexChars)) { + $nesting = 0; + $newLine .= $line[$i]; + + for ($j = $i + 1; $j < $len; $j++) { + if ($line[$j] == "\\") { + $newLine .= $line[$j].$line[$j + 1]; + $j++; + continue; + } + + if ($line[$j] == '[') { + $nesting++; + } else if ($line[$j] == ']') { + $nesting--; + } + + $newLine .= $line[$j]; + if ($line[$j] == '/' && $nesting == 0 && $newLine[strlen($newLine) - 1] != "\\") { + break; + } + } + $i = $j; + } else { + $newLine .= $line[$i]; + } + break; + // String literals shall be transcribed as is. + case '"': + case "'": + $literal = $delimiter = $line[$i]; + + for ($j = $i + 1; $j < strlen($line); $j++) { + $literal .= $line[$j]; + + if ($line[$j] == "\\") { + $literal .= $line[$j + 1]; + $j++; + continue; + } + + if ($line[$j] == $delimiter) { + break; + } + + if ($line[$j] == "\n") { + + } + } + + $i = $j; + $newLine .= $literal; + break; + // Tabs must be replaced with spaces and then re-evaluated to see if the space is necessary. + case "\t": + $line[$i] = " "; + $i--; + break; + case ' ': + if ( !( + (ctype_alnum($line[$i - 1]) || in_array($line[$i - 1], $this->noSpaceChars)) + && + (in_array($line[$i+1], $this->noSpaceChars) || ctype_alnum($line[$i+1])) + )) { + // Omit space; + break; + } + default: + $newLine .= $line[$i]; + break; } - break; - - case null: - throw new JSMinException('Unterminated comment.'); } - } - default: - return $c; - } - } - - return $c; - } + if ((ctype_alnum($lastChar) || in_array($lastChar, $this->preNewLineSafeChars)) && ((in_array($nextChar, $this->postNewLineSafeChars) || ctype_alnum($nextChar)))) { + $newLine .= "\n"; + } - protected function peek() { - $this->lookAhead = $this->get(); - return $this->lookAhead; - } -} + $output .= $newLine; + } -// -- Exceptions --------------------------------------------------------------- -class JSMinException extends Exception {} -?> \ No newline at end of file + if ($compression == 'deep') { + return trim(str_replace("\n", "", $output)); + } else { + return "\n".$output."\n"; + } + } +} \ No newline at end of file diff --git a/jssource/minify.php b/jssource/minify.php index 28328cb4..2e2b5837 100644 --- a/jssource/minify.php +++ b/jssource/minify.php @@ -151,4 +151,4 @@ if(isset($_REQUEST['root_directory'])){ } -?> +?> \ No newline at end of file diff --git a/jssource/src_files/include/JSON.js b/jssource/src_files/include/JSON.js deleted file mode 100644 index 575ac930..00000000 --- a/jssource/src_files/include/JSON.js +++ /dev/null @@ -1,217 +0,0 @@ -/* -Copyright (c) 2005 JSON.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The Software shall be used for Good, not Evil. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - json.js - - The global object JSON contains two methods. - - JSON.stringify(value) takes a JavaScript value and produces a JSON text. - The value must not be cyclical. - - JSON.parse(text) takes a JSON text and produces a JavaScript value. It will - return false if there is an error. - -2008-10-10: New regular expressions copied in from the new json2.js file on http://json.org (released into the public domain), work better on Safari and IE for more complicated datasets -*/ -var JSON = function () { - var m = { - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }, - s = { - array: function (x) { - var a = ['['], b, f, i, l = x.length, v; - for (i = 0; i < l; i += 1) { - v = x[i]; - f = s[typeof v]; - if (f) { - v = f(v); - if (typeof v == 'string') { - if (b) { - a[a.length] = ','; - } - a[a.length] = v; - b = true; - } - } - } - a[a.length] = ']'; - return a.join(''); - }, - 'boolean': function (x) { - return String(x); - }, - 'null': function (x) { - return "null"; - }, - number: function (x) { - return isFinite(x) ? String(x) : 'null'; - }, - object: function (x) { - if (x) { - if (x instanceof Array) { - return s.array(x); - } - var a = ['{'], b, f, i, v; - for (i in x) { - if (!x.hasOwnProperty || x.hasOwnProperty(i)) { - v = x[i]; - f = s[typeof v]; - if (f) { - v = f(v); - if (typeof v == 'string') { - if (b) { - a[a.length] = ','; - } - a.push(s.string(i), ':', v); - b = true; - } - } - } - } - a[a.length] = '}'; - return a.join(''); - } - return 'null'; - }, - string: function (x) { - - var unicode = new String; - for(var i=0; i
      • *
      • * 'bubbles': whether or not this event bubbles (true) + * Events can only bubble if emitFacade is true. *
      • *
      • * 'context': the default execution context for the listeners (this) @@ -1378,13 +1631,17 @@ ET.prototype = { * 'emitFacade': whether or not this event emits a facade (false) *
      • *
      • - * 'prefix': the prefix for this targets events, e.g., 'menu' in 'menu:click' + * 'prefix': the prefix for this targets events, e.g., 'menu' in 'menu:click' *
      • *
      • * 'fireOnce': if an event is configured to fire once, new subscribers after * the fire will be notified immediately. *
      • *
      • + * 'async': fireOnce event listeners will fire synchronously if the event has already + * fired unless async is true. + *
      • + *
      • * 'preventable': whether or not preventDefault() has an effect (true) *
      • *
      • @@ -1399,30 +1656,40 @@ ET.prototype = { *
      • * 'stoppedFn': a function that is executed when stopPropagation is called *
      • + * + *
      • + * 'monitored': specifies whether or not this event should send notifications about + * when the event has been attached, detached, or published. + *
      • *
      • * 'type': the event type (valid option if not provided as the first parameter to publish) *
      • * * - * @return {Event.Custom} the custom event + * @return {CustomEvent} the custom event * */ publish: function(type, opts) { - var events, ce, ret, pre = this._yuievt.config.prefix; + var events, ce, ret, defaults, + edata = this._yuievt, + pre = edata.config.prefix; type = (pre) ? _getType(type, pre) : type; + this._monitor('publish', type, { + args: arguments + }); if (L.isObject(type)) { ret = {}; Y.each(type, function(v, k) { - ret[k] = this.publish(k, v || opts); + ret[k] = this.publish(k, v || opts); }, this); return ret; } - events = this._yuievt.events; + events = edata.events; ce = events[type]; if (ce) { @@ -1431,8 +1698,12 @@ ET.prototype = { ce.applyConfig(opts, true); } } else { + + defaults = edata.defaults; + // apply defaults - ce = new Y.CustomEvent(type, (opts) ? Y.mix(opts, this._yuievt.defaults) : this._yuievt.defaults); + ce = new Y.CustomEvent(type, + (opts) ? Y.merge(defaults, opts) : defaults); events[type] = ce; } @@ -1446,84 +1717,107 @@ ET.prototype = { }, /** - * Registers another EventTarget as a bubble target. Bubble order - * is determined by the order registered. Multiple targets can - * be specified. - * @method addTarget - * @param o {EventTarget} the target to add - */ - addTarget: function(o) { - this._yuievt.targets[Y.stamp(o)] = o; - this._yuievt.hasTargets = true; - }, - - /** - * Removes a bubble target - * @method removeTarget - * @param o {EventTarget} the target to remove + * This is the entry point for the event monitoring system. + * You can monitor 'attach', 'detach', 'fire', and 'publish'. + * When configured, these events generate an event. click -> + * click_attach, click_detach, click_publish -- these can + * be subscribed to like other events to monitor the event + * system. Inividual published events can have monitoring + * turned on or off (publish can't be turned off before it + * it published) by setting the events 'monitor' config. + * + * @private */ - removeTarget: function(o) { - delete this._yuievt.targets[Y.stamp(o)]; + _monitor: function(what, type, o) { + var monitorevt, ce = this.getEvent(type); + if ((this._yuievt.config.monitored && (!ce || ce.monitored)) || (ce && ce.monitored)) { + monitorevt = type + '_' + what; + o.monitored = what; + this.fire.call(this, monitorevt, o); + } }, /** * Fire a custom event by name. The callback functions will be executed - * from the context specified when the event was created, and with the + * from the context specified when the event was created, and with the * following parameters. * - * If the custom event object hasn't been created, then the event hasn't - * been published and it has no subscribers. For performance sake, we - * immediate exit in this case. This means the event won't bubble, so - * if the intention is that a bubble target be notified, the event must + * If the custom event object hasn't been created, then the event hasn't + * been published and it has no subscribers. For performance sake, we + * immediate exit in this case. This means the event won't bubble, so + * if the intention is that a bubble target be notified, the event must * be published on this object first. * * The first argument is the event type, and any additional arguments are * passed to the listeners as parameters. If the first of these is an * object literal, and the event is configured to emit an event facade, - * that object is mixed into the event facade and the facade is provided + * that object is mixed into the event facade and the facade is provided * in place of the original object. * * @method fire * @param type {String|Object} The type of the event, or an object that contains * a 'type' property. - * @param arguments {Object*} an arbitrary set of parameters to pass to + * @param arguments {Object*} an arbitrary set of parameters to pass to * the handler. If the first of these is an object literal and the event is * configured to emit an event facade, the event facade will replace that * parameter after the properties the object literal contains are copied to * the event facade. - * @return {Event.Target} the event host - * + * @return {EventTarget} the event host + * */ fire: function(type) { var typeIncluded = L.isString(type), t = (typeIncluded) ? type : (type && type.type), - ce, a, ret, pre=this._yuievt.config.prefix; + ce, ret, pre = this._yuievt.config.prefix, ce2, + args = (typeIncluded) ? YArray(arguments, 1, true) : arguments; t = (pre) ? _getType(t, pre) : t; + + this._monitor('fire', t, { + args: args + }); + ce = this.getEvent(t, true); + ce2 = this.getSibling(t, ce); + + if (ce2 && !ce) { + ce = this.publish(t); + } // this event has not been published or subscribed to if (!ce) { - if (this._yuievt.hasTargets) { - a = (typeIncluded) ? arguments : Y.Array(arguments, 0, true).unshift(t); - return this.bubble(null, a, this); + return this.bubble({ type: t }, args, this); } // otherwise there is nothing to be done ret = true; - } else { + ce.sibling = ce2; + ret = ce.fire.apply(ce, args); + } - a = Y.Array(arguments, (typeIncluded) ? 1 : 0, true); - ret = ce.fire.apply(ce, a); + return (this._yuievt.chain) ? this : ret; + }, - // clear target for next fire() - ce.target = null; + getSibling: function(type, ce) { + var ce2; + // delegate to *:type events if there are subscribers + if (type.indexOf(PREFIX_DELIMITER) > -1) { + type = _wildType(type); + // console.log(type); + ce2 = this.getEvent(type, true); + if (ce2) { + // console.log("GOT ONE: " + type); + ce2.applyConfig(ce); + ce2.bubbles = false; + ce2.broadcast = 0; + // ret = ce2.fire.apply(ce2, a); + } } - return (this._yuievt.chain) ? this : ret; + return ce2; }, /** @@ -1532,7 +1826,7 @@ ET.prototype = { * @method getEvent * @param type {string} the type, or name of the event * @param prefixed {string} if true, the type is prefixed already - * @return {Event.Custom} the custom event or null + * @return {CustomEvent} the custom event or null */ getEvent: function(type, prefixed) { var pre, e; @@ -1541,7 +1835,7 @@ ET.prototype = { type = (pre) ? _getType(type, pre) : type; } e = this._yuievt.events; - return (e && type in e) ? e[type] : null; + return e[type] || null; }, /** @@ -1552,15 +1846,22 @@ ET.prototype = { * @method after * @param type {string} The type of the event * @param fn {Function} The callback + * @param context {object} optional execution context. + * @param arg* {mixed} 0..n additional arguments to supply to the subscriber * @return the event target or a detach handle per 'chain' config */ after: function(type, fn) { - var a = Y.Array(arguments, 0, true); + var a = YArray(arguments, 0, true); switch (L.type(type)) { case 'function': return Y.Do.after.apply(Y.Do, arguments); + case 'array': + // YArray.each(a[0], function(v) { + // v = AFTER_PREFIX + v; + // }); + // break; case 'object': a[0]._after = true; break; @@ -1580,15 +1881,14 @@ ET.prototype = { * * For DOM and custom events: * type, callback, context, 0-n arguments - * + * * For methods: * callback, object (method host), methodName, context, 0-n arguments * * @method before * @return detach handle - * @deprecated use the on method */ - before: function() { + before: function() { return this.on.apply(this, arguments); } @@ -1597,8 +1897,8 @@ ET.prototype = { Y.EventTarget = ET; // make Y an event target -Y.mix(Y, ET.prototype, false, false, { - bubbles: false +Y.mix(Y, ET.prototype, false, false, { + bubbles: false }); ET.call(Y); @@ -1617,12 +1917,9 @@ Y.Global = YUI.Env.globalEvents; // @TODO implement a global namespace function on Y.Global? -})(); - - /** * YUI's on method is a unified interface for subscribing to - * most events exposed by YUI. This includes custom events, DOM events, and + * most events exposed by YUI. This includes custom events, DOM events, and * function events. detach is also provided to remove listeners * serviced by this function. * @@ -1641,12 +1938,12 @@ Y.Global = YUI.Env.globalEvents; *
      • An optional context object
      • *
      • 0..n additional arguments to supply the callback.
      • * - * Example: - * Y.on('domready', function() { // start work }); + * Example: + * Y.on('drag:drophit', function() { // start work }); * *
      • DOM events. These are moments reported by the browser related * to browser functionality and user interaction. - * This type of event is delegated to Event's + * This type of event is delegated to Event's * attach method. *
          *
        • The type of the event
        • @@ -1657,11 +1954,11 @@ Y.Global = YUI.Env.globalEvents; *
        • An optional context object
        • *
        • 0..n additional arguments to supply the callback.
        • *
        - * Example: + * Example: * Y.on('click', function(e) { // something was clicked }, '#someelement'); *
      • *
      • Function events. These events can be used to react before or after a - * function is executed. This type of event is delegated to Event.Do's + * function is executed. This type of event is delegated to Event.Do's * before method. *
          *
        • The callback to execute
        • @@ -1679,39 +1976,38 @@ Y.Global = YUI.Env.globalEvents; * execute after the event's default behavior. before is an * alias for on. * - * @method on - * @param type** event type (this parameter does not apply for function events) + * @method on + * @param type event type (this parameter does not apply for function events) * @param fn the callback - * @param target** a descriptor for the target (applies to custom events only). - * For function events, this is the object that contains the function to - * execute. - * @param extra** 0..n Extra information a particular event may need. These - * will be documented with the event. In the case of function events, this - * is the name of the function to execute on the host. In the case of - * delegate listeners, this is the event delegation specification. * @param context optionally change the value of 'this' in the callback * @param args* 0..n additional arguments to pass to the callback. * @return the event target or a detach handle per 'chain' config * @for YUI */ + /** + * Listen for an event one time. Equivalent to on, except that + * the listener is immediately detached when executed. + * @see on + * @method once + * @param type event type (this parameter does not apply for function events) + * @param fn the callback + * @param context optionally change the value of 'this' in the callback + * @param args* 0..n additional arguments to pass to the callback. + * @return the event target or a detach handle per 'chain' config + * @for YUI + */ + /** * after() is a unified interface for subscribing to * most events exposed by YUI. This includes custom events, * DOM events, and AOP events. This works the same way as * the on() function, only it operates after any default - * behavior for the event has executed. @see on for more + * behavior for the event has executed. @see on for more * information. * @method after * @param type event type (this parameter does not apply for function events) * @param fn the callback - * @param target a descriptor for the target (applies to custom events only). - * For function events, this is the object that contains the function to - * execute. - * @param extra 0..n Extra information a particular event may need. These - * will be documented with the event. In the case of function events, this - * is the name of the function to execute on the host. In the case of - * delegate listeners, this is the event delegation specification. * @param context optionally change the value of 'this' in the callback * @param args* 0..n additional arguments to pass to the callback. * @return the event target or a detach handle per 'chain' config @@ -1719,4 +2015,4 @@ Y.Global = YUI.Env.globalEvents; */ -}, '3.0.0' ,{requires:['oop']}); +}, '3.3.0' ,{requires:['oop']}); diff --git a/jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-complex-min.js b/jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-complex-min.js index 9270ba07..25c24a96 100644 --- a/jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-complex-min.js +++ b/jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-complex-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("event-custom-complex",function(A){(function(){var C,D,B=A.CustomEvent.prototype;A.EventFacade=function(F,E){F=F||{};this.details=F.details;this.type=F.type;this.target=F.target;this.currentTarget=E;this.relatedTarget=F.relatedTarget;this.stopPropagation=function(){F.stopPropagation();};this.stopImmediatePropagation=function(){F.stopImmediatePropagation();};this.preventDefault=function(){F.preventDefault();};this.halt=function(G){F.halt(G);};};B.fireComplex=function(H){var L=A.Env._eventstack,F,J,E,K,G,I;if(L){if(this.queuable&&this.type!=L.next.type){this.log("queue "+this.type);L.queue.push([this,H]);return true;}}else{A.Env._eventstack={id:this.id,next:this,silent:this.silent,stopped:0,prevented:0,queue:[]};L=A.Env._eventstack;}this.stopped=0;this.prevented=0;this.target=this.target||this.host;I=new A.EventTarget({fireOnce:true,context:this.host});this.events=I;if(this.preventedFn){I.on("prevented",this.preventedFn);}if(this.stoppedFn){I.on("stopped",this.stoppedFn);}this.currentTarget=this.host||this.currentTarget;this.details=H.slice();this.log("Firing "+this.type);this._facade=null;F=this._getFacade(H);if(A.Lang.isObject(H[0])){H[0]=F;}else{H.unshift(F);}if(this.hasSubscribers){this._procSubs(A.merge(this.subscribers),H,F);}if(this.bubbles&&this.host&&this.host.bubble&&!this.stopped){L.stopped=0;L.prevented=0;G=this.host.bubble(this);this.stopped=Math.max(this.stopped,L.stopped);this.prevented=Math.max(this.prevented,L.prevented);}if(this.defaultFn&&!this.prevented){this.defaultFn.apply(this.host||this,H);}this._broadcast(H);if(this.hasAfters&&!this.prevented&&this.stopped<2){this._procSubs(A.merge(this.afters),H,F);}if(L.id===this.id){E=L.queue;while(E.length){J=E.pop();K=J[0];L.stopped=0;L.prevented=0;L.next=K;K.fire.apply(K,J[1]);}A.Env._eventstack=null;}return this.stopped?false:true;};B._getFacade=function(){var E=this._facade,H,G,F=this.details;if(!E){E=new A.EventFacade(this,this.currentTarget);}H=F&&F[0];if(A.Lang.isObject(H,true)){G={};A.mix(G,E,true,D);A.mix(E,H,true);A.mix(E,G,true,D);}E.details=this.details;E.target=this.target;E.currentTarget=this.currentTarget;E.stopped=0;E.prevented=0;this._facade=E;return this._facade;};B.stopPropagation=function(){this.stopped=1;A.Env._eventstack.stopped=1;this.events.fire("stopped",this);};B.stopImmediatePropagation=function(){this.stopped=2;A.Env._eventstack.stopped=2;this.events.fire("stopped",this);};B.preventDefault=function(){if(this.preventable){this.prevented=1;A.Env._eventstack.prevented=1;this.events.fire("prevented",this);}};B.halt=function(E){if(E){this.stopImmediatePropagation();}else{this.stopPropagation();}this.preventDefault();};A.EventTarget.prototype.bubble=function(M,K,I){var G=this._yuievt.targets,J=true,N,L,E,F,H;if(!M||((!M.stopped)&&G)){for(F in G){if(G.hasOwnProperty(F)){N=G[F];L=M&&M.type;E=N.getEvent(L,true);if(!E){if(N._yuievt.hasTargets){N.bubble.call(N,M,K,I);}}else{E.target=I||(M&&M.target)||this;E.currentTarget=N;H=E.broadcast;E.broadcast=false;J=J&&E.fire.apply(E,K||M.details);E.broadcast=H;if(E.stopped){break;}}}}}return J;};C=new A.EventFacade();D=A.Object.keys(C);})();},"3.0.0",{requires:["event-custom-base"]}); \ No newline at end of file +YUI.add("event-custom-complex",function(f){var b,e,d={},a=f.CustomEvent.prototype,c=f.EventTarget.prototype;f.EventFacade=function(h,g){h=h||d;this._event=h;this.details=h.details;this.type=h.type;this._type=h.type;this.target=h.target;this.currentTarget=g;this.relatedTarget=h.relatedTarget;};f.extend(f.EventFacade,Object,{stopPropagation:function(){this._event.stopPropagation();this.stopped=1;},stopImmediatePropagation:function(){this._event.stopImmediatePropagation();this.stopped=2;},preventDefault:function(){this._event.preventDefault();this.prevented=1;},halt:function(g){this._event.halt(g);this.prevented=1;this.stopped=(g)?2:1;}});a.fireComplex=function(p){var r,l,g,n,i,o,u,j,h,t=this,s=t.host||t,m,k;if(t.stack){if(t.queuable&&t.type!=t.stack.next.type){t.log("queue "+t.type);t.stack.queue.push([t,p]);return true;}}r=t.stack||{id:t.id,next:t,silent:t.silent,stopped:0,prevented:0,bubbling:null,type:t.type,afterQueue:new f.Queue(),defaultTargetOnly:t.defaultTargetOnly,queue:[]};j=t.getSubs();t.stopped=(t.type!==r.type)?0:r.stopped;t.prevented=(t.type!==r.type)?0:r.prevented;t.target=t.target||s;u=new f.EventTarget({fireOnce:true,context:s});t.events=u;if(t.preventedFn){u.on("prevented",t.preventedFn);}if(t.stoppedFn){u.on("stopped",t.stoppedFn);}t.currentTarget=s;t.details=p.slice();t.log("Firing "+t.type);t._facade=null;l=t._getFacade(p);if(f.Lang.isObject(p[0])){p[0]=l;}else{p.unshift(l);}if(j[0]){t._procSubs(j[0],p,l);}if(t.bubbles&&s.bubble&&!t.stopped){k=r.bubbling;r.bubbling=t.type;if(r.type!=t.type){r.stopped=0;r.prevented=0;}o=s.bubble(t,p,null,r);t.stopped=Math.max(t.stopped,r.stopped);t.prevented=Math.max(t.prevented,r.prevented);r.bubbling=k;}if(t.defaultFn&&!t.prevented&&((!t.defaultTargetOnly&&!r.defaultTargetOnly)||s===l.target)){t.defaultFn.apply(s,p);}t._broadcast(p);if(j[1]&&!t.prevented&&t.stopped<2){if(r.id===t.id||t.type!=s._yuievt.bubbling){t._procSubs(j[1],p,l);while((m=r.afterQueue.last())){m();}}else{h=j[1];if(r.execDefaultCnt){h=f.merge(h);f.each(h,function(q){q.postponed=true;});}r.afterQueue.add(function(){t._procSubs(h,p,l);});}}t.target=null;if(r.id===t.id){n=r.queue;while(n.length){g=n.pop();i=g[0];r.next=i;i.fire.apply(i,g[1]);}t.stack=null;}o=!(t.stopped);if(t.type!=s._yuievt.bubbling){r.stopped=0;r.prevented=0;t.stopped=0;t.prevented=0;}return o;};a._getFacade=function(){var g=this._facade,j,i,h=this.details;if(!g){g=new f.EventFacade(this,this.currentTarget);}j=h&&h[0];if(f.Lang.isObject(j,true)){i={};f.mix(i,g,true,e);f.mix(g,j,true);f.mix(g,i,true,e);g.type=j.type||g.type;}g.details=this.details;g.target=this.originalTarget||this.target;g.currentTarget=this.currentTarget;g.stopped=0;g.prevented=0;this._facade=g;return this._facade;};a.stopPropagation=function(){this.stopped=1;if(this.stack){this.stack.stopped=1;}this.events.fire("stopped",this);};a.stopImmediatePropagation=function(){this.stopped=2;if(this.stack){this.stack.stopped=2;}this.events.fire("stopped",this);};a.preventDefault=function(){if(this.preventable){this.prevented=1;if(this.stack){this.stack.prevented=1;}this.events.fire("prevented",this);}};a.halt=function(g){if(g){this.stopImmediatePropagation();}else{this.stopPropagation();}this.preventDefault();};c.addTarget=function(g){this._yuievt.targets[f.stamp(g)]=g;this._yuievt.hasTargets=true;};c.getTargets=function(){return f.Object.values(this._yuievt.targets);};c.removeTarget=function(g){delete this._yuievt.targets[f.stamp(g)];};c.bubble=function(u,q,o,s){var m=this._yuievt.targets,p=true,v,r=u&&u.type,h,l,n,j,g=o||(u&&u.target)||this,k;if(!u||((!u.stopped)&&m)){for(l in m){if(m.hasOwnProperty(l)){v=m[l];h=v.getEvent(r,true);j=v.getSibling(r,h);if(j&&!h){h=v.publish(r);}k=v._yuievt.bubbling;v._yuievt.bubbling=r;if(!h){if(v._yuievt.hasTargets){v.bubble(u,q,g,s);}}else{h.sibling=j;h.target=g;h.originalTarget=g;h.currentTarget=v;n=h.broadcast;h.broadcast=false;h.emitFacade=true;h.stack=s;p=p&&h.fire.apply(h,q||u.details||[]);h.broadcast=n;h.originalTarget=null;if(h.stopped){break;}}v._yuievt.bubbling=k;}}}return p;};b=new f.EventFacade();e=f.Object.keys(b);},"3.3.0",{requires:["event-custom-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-complex.js b/jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-complex.js index 5c36d495..2f1e230a 100644 --- a/jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-complex.js +++ b/jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-complex.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('event-custom-complex', function(Y) { @@ -15,9 +15,11 @@ YUI.add('event-custom-complex', function(Y) { * @submodule event-custom-complex */ -(function() { - -var FACADE, FACADE_KEYS, CEProto = Y.CustomEvent.prototype; +var FACADE, + FACADE_KEYS, + EMPTY = {}, + CEProto = Y.CustomEvent.prototype, + ETProto = Y.EventTarget.prototype; /** * Wraps and protects a custom event for use when emitFacade is set to true. @@ -29,22 +31,31 @@ var FACADE, FACADE_KEYS, CEProto = Y.CustomEvent.prototype; Y.EventFacade = function(e, currentTarget) { - e = e || {}; + e = e || EMPTY; + + this._event = e; /** - * The arguments passed to fire + * The arguments passed to fire * @property details * @type Array */ this.details = e.details; /** - * The event type + * The event type, this can be overridden by the fire() payload * @property type * @type string */ this.type = e.type; + /** + * The real event type + * @property type + * @type string + */ + this._type = e.type; + ////////////////////////////////////////////////////// /** @@ -67,14 +78,19 @@ Y.EventFacade = function(e, currentTarget) { * @type Node */ this.relatedTarget = e.relatedTarget; - + +}; + +Y.extend(Y.EventFacade, Object, { + /** * Stops the propagation to the next bubble target * @method stopPropagation */ - this.stopPropagation = function() { - e.stopPropagation(); - }; + stopPropagation: function() { + this._event.stopPropagation(); + this.stopped = 1; + }, /** * Stops the propagation to the next bubble target and @@ -82,17 +98,19 @@ Y.EventFacade = function(e, currentTarget) { * on the current target. * @method stopImmediatePropagation */ - this.stopImmediatePropagation = function() { - e.stopImmediatePropagation(); - }; + stopImmediatePropagation: function() { + this._event.stopImmediatePropagation(); + this.stopped = 2; + }, /** * Prevents the event's default behavior * @method preventDefault */ - this.preventDefault = function() { - e.preventDefault(); - }; + preventDefault: function() { + this._event.preventDefault(); + this.prevented = 1; + }, /** * Stops the event propagation and prevents the default @@ -101,64 +119,75 @@ Y.EventFacade = function(e, currentTarget) { * @param immediate {boolean} if true additional listeners * on the current target will not be executed */ - this.halt = function(immediate) { - e.halt(immediate); - }; + halt: function(immediate) { + this._event.halt(immediate); + this.prevented = 1; + this.stopped = (immediate) ? 2 : 1; + } -}; +}); CEProto.fireComplex = function(args) { - var es = Y.Env._eventstack, ef, q, queue, ce, ret, events; - if (es) { + var es, ef, q, queue, ce, ret, events, subs, postponed, + self = this, host = self.host || self, next, oldbubble; + + if (self.stack) { // queue this event if the current item in the queue bubbles - if (this.queuable && this.type != es.next.type) { - this.log('queue ' + this.type); - es.queue.push([this, args]); + if (self.queuable && self.type != self.stack.next.type) { + self.log('queue ' + self.type); + self.stack.queue.push([self, args]); return true; } - } else { - Y.Env._eventstack = { - // id of the first event in the stack - id: this.id, - next: this, - silent: this.silent, - stopped: 0, - prevented: 0, - queue: [] - }; - es = Y.Env._eventstack; } - this.stopped = 0; - this.prevented = 0; - this.target = this.target || this.host; + es = self.stack || { + // id of the first event in the stack + id: self.id, + next: self, + silent: self.silent, + stopped: 0, + prevented: 0, + bubbling: null, + type: self.type, + // defaultFnQueue: new Y.Queue(), + afterQueue: new Y.Queue(), + defaultTargetOnly: self.defaultTargetOnly, + queue: [] + }; + + subs = self.getSubs(); + + self.stopped = (self.type !== es.type) ? 0 : es.stopped; + self.prevented = (self.type !== es.type) ? 0 : es.prevented; + + self.target = self.target || host; events = new Y.EventTarget({ fireOnce: true, - context: this.host + context: host }); - this.events = events; + self.events = events; - if (this.preventedFn) { - events.on('prevented', this.preventedFn); + if (self.preventedFn) { + events.on('prevented', self.preventedFn); } - if (this.stoppedFn) { - events.on('stopped', this.stoppedFn); + if (self.stoppedFn) { + events.on('stopped', self.stoppedFn); } - this.currentTarget = this.host || this.currentTarget; + self.currentTarget = host; - this.details = args.slice(); // original arguments in the details + self.details = args.slice(); // original arguments in the details - // this.log("Firing " + this + ", " + "args: " + args); - this.log("Firing " + this.type); + // self.log("Firing " + self + ", " + "args: " + args); + self.log("Firing " + self.type); - this._facade = null; // kill facade to eliminate stale properties + self._facade = null; // kill facade to eliminate stale properties - ef = this._getFacade(args); + ef = self._getFacade(args); if (Y.Lang.isObject(args[0])) { args[0] = ef; @@ -166,53 +195,95 @@ CEProto.fireComplex = function(args) { args.unshift(ef); } - if (this.hasSubscribers) { - this._procSubs(Y.merge(this.subscribers), args, ef); + // if (subCount) { + if (subs[0]) { + // self._procSubs(Y.merge(self.subscribers), args, ef); + self._procSubs(subs[0], args, ef); } // bubble if this is hosted in an event target and propagation has not been stopped - if (this.bubbles && this.host && this.host.bubble && !this.stopped) { - es.stopped = 0; - es.prevented = 0; - ret = this.host.bubble(this); + if (self.bubbles && host.bubble && !self.stopped) { - this.stopped = Math.max(this.stopped, es.stopped); - this.prevented = Math.max(this.prevented, es.prevented); + oldbubble = es.bubbling; + + // self.bubbling = true; + es.bubbling = self.type; + + // if (host !== ef.target || es.type != self.type) { + if (es.type != self.type) { + es.stopped = 0; + es.prevented = 0; + } + + ret = host.bubble(self, args, null, es); + + self.stopped = Math.max(self.stopped, es.stopped); + self.prevented = Math.max(self.prevented, es.prevented); + + // self.bubbling = false; + es.bubbling = oldbubble; } - // execute the default behavior if not prevented - if (this.defaultFn && !this.prevented) { - this.defaultFn.apply(this.host || this, args); + if (self.defaultFn && + !self.prevented && + ((!self.defaultTargetOnly && !es.defaultTargetOnly) || host === ef.target)) { + + self.defaultFn.apply(host, args); } // broadcast listeners are fired as discreet events on the // YUI instance and potentially the YUI global. - this._broadcast(args); + self._broadcast(args); + + // Queue the after + if (subs[1] && !self.prevented && self.stopped < 2) { + if (es.id === self.id || self.type != host._yuievt.bubbling) { + self._procSubs(subs[1], args, ef); + while ((next = es.afterQueue.last())) { + next(); + } + } else { + postponed = subs[1]; + if (es.execDefaultCnt) { + postponed = Y.merge(postponed); + Y.each(postponed, function(s) { + s.postponed = true; + }); + } - // process after listeners. If the default behavior was - // prevented, the after events don't fire. - if (this.hasAfters && !this.prevented && this.stopped < 2) { - this._procSubs(Y.merge(this.afters), args, ef); + es.afterQueue.add(function() { + self._procSubs(postponed, args, ef); + }); + } } - if (es.id === this.id) { + self.target = null; + + if (es.id === self.id) { queue = es.queue; while (queue.length) { - q = queue.pop(); + q = queue.pop(); ce = q[0]; - es.stopped = 0; - es.prevented = 0; // set up stack to allow the next item to be processed es.next = ce; ce.fire.apply(ce, q[1]); } - Y.Env._eventstack = null; - } + self.stack = null; + } + + ret = !(self.stopped); + + if (self.type != host._yuievt.bubbling) { + es.stopped = 0; + es.prevented = 0; + self.stopped = 0; + self.prevented = 0; + } - return this.stopped ? false : true; + return ret; }; CEProto._getFacade = function() { @@ -240,12 +311,19 @@ CEProto._getFacade = function() { // restore ef Y.mix(ef, o2, true, FACADE_KEYS); + + // Allow the event type to be faked + // http://yuilibrary.com/projects/yui3/ticket/2528376 + ef.type = o.type || ef.type; } // update the details field with the arguments // ef.type = this.type; ef.details = this.details; - ef.target = this.target; + + // use the original target when the event bubbled to this target + ef.target = this.originalTarget || this.target; + ef.currentTarget = this.currentTarget; ef.stopped = 0; ef.prevented = 0; @@ -262,7 +340,9 @@ CEProto._getFacade = function() { */ CEProto.stopPropagation = function() { this.stopped = 1; - Y.Env._eventstack.stopped = 1; + if (this.stack) { + this.stack.stopped = 1; + } this.events.fire('stopped', this); }; @@ -273,7 +353,9 @@ CEProto.stopPropagation = function() { */ CEProto.stopImmediatePropagation = function() { this.stopped = 2; - Y.Env._eventstack.stopped = 2; + if (this.stack) { + this.stack.stopped = 2; + } this.events.fire('stopped', this); }; @@ -284,7 +366,9 @@ CEProto.stopImmediatePropagation = function() { CEProto.preventDefault = function() { if (this.preventable) { this.prevented = 1; - Y.Env._eventstack.prevented = 1; + if (this.stack) { + this.stack.prevented = 1; + } this.events.fire('prevented', this); } }; @@ -305,48 +389,108 @@ CEProto.halt = function(immediate) { this.preventDefault(); }; +/** + * Registers another EventTarget as a bubble target. Bubble order + * is determined by the order registered. Multiple targets can + * be specified. + * + * Events can only bubble if emitFacade is true. + * + * Included in the event-custom-complex submodule. + * + * @method addTarget + * @param o {EventTarget} the target to add + * @for EventTarget + */ +ETProto.addTarget = function(o) { + this._yuievt.targets[Y.stamp(o)] = o; + this._yuievt.hasTargets = true; +}; + +/** + * Returns an array of bubble targets for this object. + * @method getTargets + * @return EventTarget[] + */ +ETProto.getTargets = function() { + return Y.Object.values(this._yuievt.targets); +}; + +/** + * Removes a bubble target + * @method removeTarget + * @param o {EventTarget} the target to remove + * @for EventTarget + */ +ETProto.removeTarget = function(o) { + delete this._yuievt.targets[Y.stamp(o)]; +}; + /** * Propagate an event. Requires the event-custom-complex module. * @method bubble - * @param evt {Event.Custom} the custom event to propagate + * @param evt {CustomEvent} the custom event to propagate * @return {boolean} the aggregated return value from Event.Custom.fire * @for EventTarget */ -Y.EventTarget.prototype.bubble = function(evt, args, target) { +ETProto.bubble = function(evt, args, target, es) { var targs = this._yuievt.targets, ret = true, - t, type, ce, i, bc; + t, type = evt && evt.type, ce, i, bc, ce2, + originalTarget = target || (evt && evt.target) || this, + oldbubble; if (!evt || ((!evt.stopped) && targs)) { for (i in targs) { if (targs.hasOwnProperty(i)) { - t = targs[i]; - type = evt && evt.type; - ce = t.getEvent(type, true); - + t = targs[i]; + ce = t.getEvent(type, true); + ce2 = t.getSibling(type, ce); + + if (ce2 && !ce) { + ce = t.publish(type); + } + + oldbubble = t._yuievt.bubbling; + t._yuievt.bubbling = type; + // if this event was not published on the bubble target, - // publish it with sensible default properties + // continue propagating the event. if (!ce) { - if (t._yuievt.hasTargets) { - t.bubble.call(t, evt, args, target); + t.bubble(evt, args, originalTarget, es); } - } else { - ce.target = target || (evt && evt.target) || this; - ce.currentTarget = t; + ce.sibling = ce2; + + // set the original target to that the target payload on the + // facade is correct. + ce.target = originalTarget; + ce.originalTarget = originalTarget; + ce.currentTarget = t; bc = ce.broadcast; ce.broadcast = false; - ret = ret && ce.fire.apply(ce, args || evt.details); + + // default publish may not have emitFacade true -- that + // shouldn't be what the implementer meant to do + ce.emitFacade = true; + + ce.stack = es; + + ret = ret && ce.fire.apply(ce, args || evt.details || []); ce.broadcast = bc; + ce.originalTarget = null; + // stopPropagation() was called if (ce.stopped) { break; } } + + t._yuievt.bubbling = oldbubble; } } } @@ -357,7 +501,6 @@ Y.EventTarget.prototype.bubble = function(evt, args, target) { FACADE = new Y.EventFacade(); FACADE_KEYS = Y.Object.keys(FACADE); -})(); -}, '3.0.0' ,{requires:['event-custom-base']}); +}, '3.3.0' ,{requires:['event-custom-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-min.js b/jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-min.js index f3e1bda5..047465d5 100644 --- a/jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-min.js +++ b/jssource/src_files/include/javascript/yui3/build/event-custom/event-custom-min.js @@ -1,10 +1,10 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("event-custom-base",function(E){E.Env.evt={handles:{},plugins:{}};(function(){var F=0,G=1;E.Do={objs:{},before:function(I,K,L,M){var J=I,H;if(M){H=[I,M].concat(E.Array(arguments,4,true));J=E.rbind.apply(E,H);}return this._inject(F,J,K,L);},after:function(I,K,L,M){var J=I,H;if(M){H=[I,M].concat(E.Array(arguments,4,true));J=E.rbind.apply(E,H);}return this._inject(G,J,K,L);},_inject:function(H,J,K,M){var N=E.stamp(K),L,I;if(!this.objs[N]){this.objs[N]={};}L=this.objs[N];if(!L[M]){L[M]=new E.Do.Method(K,M);K[M]=function(){return L[M].exec.apply(L[M],arguments);};}I=N+E.stamp(J)+M;L[M].register(I,J,H);return new E.EventHandle(L[M],I);},detach:function(H){if(H.detach){H.detach();}},_unload:function(I,H){}};E.Do.Method=function(H,I){this.obj=H;this.methodName=I;this.method=H[I];this.before={};this.after={};};E.Do.Method.prototype.register=function(I,J,H){if(H){this.after[I]=J;}else{this.before[I]=J;}};E.Do.Method.prototype._delete=function(H){delete this.before[H];delete this.after[H];};E.Do.Method.prototype.exec=function(){var J=E.Array(arguments,0,true),K,I,N,L=this.before,H=this.after,M=false;for(K in L){if(L.hasOwnProperty(K)){I=L[K].apply(this.obj,J);if(I){switch(I.constructor){case E.Do.Halt:return I.retVal;case E.Do.AlterArgs:J=I.newArgs;break;case E.Do.Prevent:M=true;break;default:}}}}if(!M){I=this.method.apply(this.obj,J);}for(K in H){if(H.hasOwnProperty(K)){N=H[K].apply(this.obj,J);if(N&&N.constructor==E.Do.Halt){return N.retVal;}else{if(N&&N.constructor==E.Do.AlterReturn){I=N.newRetVal;}}}}return I;};E.Do.AlterArgs=function(I,H){this.msg=I;this.newArgs=H;};E.Do.AlterReturn=function(I,H){this.msg=I;this.newRetVal=H;};E.Do.Halt=function(I,H){this.msg=I;this.retVal=H;};E.Do.Prevent=function(H){this.msg=H;};E.Do.Error=E.Do.Halt;})();var D="after",B=["broadcast","bubbles","context","contextFn","currentTarget","defaultFn","details","emitFacade","fireOnce","host","preventable","preventedFn","queuable","silent","stoppedFn","target","type"],C=9,A="yui:log";E.EventHandle=function(F,G){this.evt=F;this.sub=G;};E.EventHandle.prototype={detach:function(){var F=this.evt,G;if(F){if(E.Lang.isArray(F)){for(G=0;G2)?E.Array(arguments,2,true):null;return this._on(H,G,F,true);},on:function(H,G){var F=(arguments.length>2)?E.Array(arguments,2,true):null;return this._on(H,G,F,true);},after:function(H,G){var F=(arguments.length>2)?E.Array(arguments,2,true):null;return this._on(H,G,F,D);},detach:function(J,H){if(J&&J.detach){return J.detach();}var K=0,G=this.subscribers,F,I;for(F in G){if(G.hasOwnProperty(F)){I=G[F];if(I&&(!J||J===I.fn)){this._delete(I);K++;}}}return K;},unsubscribe:function(){return this.detach.apply(this,arguments);},_notify:function(I,H,F){this.log(this.type+"->"+"sub: "+I.id);var G;G=I.notify(H,this);if(false===G||this.stopped>1){this.log(this.type+" cancelled by subscriber");return false;}return true;},log:function(G,F){if(!this.silent){}},fire:function(){if(this.fireOnce&&this.fired){this.log("fireOnce event: "+this.type+" already fired");return true;}else{var F=E.Array(arguments,0,true);this.fired=true;this.firedWith=F;if(this.emitFacade){return this.fireComplex(F);}else{return this.fireSimple(F);}}},fireSimple:function(F){if(this.hasSubscribers||this.hasAfters){this._procSubs(E.merge(this.subscribers,this.afters),F);}this._broadcast(F);return this.stopped?false:true;},fireComplex:function(F){F[0]=F[0]||{};return this.fireSimple(F);},_procSubs:function(I,G,F){var J,H;for(H in I){if(I.hasOwnProperty(H)){J=I[H];if(J&&J.fn){if(false===this._notify(J,G,F)){this.stopped=2;}if(this.stopped==2){return false;}}}}return true;},_broadcast:function(G){if(!this.stopped&&this.broadcast){var F=E.Array(G);F.unshift(this.type);if(this.host!==E){E.fire.apply(E,F);}if(this.broadcast==2){E.Global.fire.apply(E.Global,F);}}},unsubscribeAll:function(){return this.detachAll.apply(this,arguments);},detachAll:function(){return this.detach();},_delete:function(F){if(F){delete F.fn;delete F.context;delete this.subscribers[F.id];delete this.afters[F.id];}}};E.Subscriber=function(H,G,F){this.fn=H;this.context=G;this.id=E.stamp(this);this.args=F;this.events=null;};E.Subscriber.prototype={_notify:function(J,H,I){var F=this.args,G;switch(I.signature){case 0:G=this.fn.call(J,I.type,H,J);break;case 1:G=this.fn.call(J,H[0]||null,J);break;default:if(F||H){H=H||[];F=(F)?H.concat(F):H;G=this.fn.apply(J,F);}else{G=this.fn.call(J);}}return G;},notify:function(G,I){var J=this.context,F=true;if(!J){J=(I.contextFn)?I.contextFn():I.context;}if(E.config.throwFail){F=this._notify(J,G,I);}else{try{F=this._notify(J,G,I);}catch(H){E.error(this+" failed: "+H.message,H);}}return F;},contains:function(G,F){if(F){return((this.fn==G)&&this.context==F);}else{return(this.fn==G);}}};(function(){var F=E.Lang,H=":",I="|",J="~AFTER~",K=E.cached(function(L,N){if(!N||!F.isString(L)||L.indexOf(H)>-1){return L;}return N+H+L;}),G=E.cached(function(O,Q){var N=O,P,R,L;if(!F.isString(N)){return N;}L=N.indexOf(J);if(L>-1){R=true;N=N.substr(J.length);}L=N.indexOf(I);if(L>-1){P=N.substr(0,(L));N=N.substr(L+1);if(N=="*"){N=null;}}return[P,(Q)?K(N,Q):N,R,N];}),M=function(L){var N=(F.isObject(L))?L:{};this._yuievt=this._yuievt||{id:E.guid(),events:{},targets:{},config:N,chain:("chain" in N)?N.chain:E.config.chain,defaults:{context:N.context||this,host:this,emitFacade:N.emitFacade,fireOnce:N.fireOnce,queuable:N.queuable,broadcast:N.broadcast,bubbles:("bubbles" in N)?N.bubbles:true}}; -};M.prototype={on:function(Q,U,O,V){var Z=G(Q,this._yuievt.config.prefix),a,b,N,g,X,W,d,R=E.Env.evt.handles,P,L,S,e=E.Node,Y,T;if(F.isObject(Q)){if(F.isFunction(Q)){return E.Do.before.apply(E.Do,arguments);}a=U;b=O;N=E.Array(arguments,0,true);g={};P=Q._after;delete Q._after;E.each(Q,function(f,c){if(f){a=f.fn||((E.Lang.isFunction(f))?f:a);b=f.context||b;}N[0]=(P)?J+c:c;N[1]=a;N[2]=b;g[c]=this.on.apply(this,N);},this);return(this._yuievt.chain)?this:new E.EventHandle(g);}W=Z[0];P=Z[2];S=Z[3];if(e&&(this instanceof e)&&(S in e.DOM_EVENTS)){N=E.Array(arguments,0,true);N.splice(2,0,e.getDOMNode(this));return E.on.apply(E,N);}Q=Z[1];if(this instanceof YUI){L=E.Env.evt.plugins[Q];N=E.Array(arguments,0,true);N[0]=S;if(e){Y=N[2];if(Y instanceof E.NodeList){Y=E.NodeList.getDOMNodes(Y);}else{if(Y instanceof e){Y=e.getDOMNode(Y);}}T=(S in e.DOM_EVENTS);if(T){N[2]=Y;}}if(L){d=L.on.apply(E,N);}else{if((!Q)||T){d=E.Event._attach(N);}}}if(!d){X=this._yuievt.events[Q]||this.publish(Q);d=X._on(U,O,(arguments.length>3)?E.Array(arguments,3,true):null,(P)?"after":true);}if(W){R[W]=R[W]||{};R[W][Q]=R[W][Q]||[];R[W][Q].push(d);}return(this._yuievt.chain)?this:d;},subscribe:function(){return this.on.apply(this,arguments);},detach:function(P,U,O){var T=this._yuievt.events,Z,d,c=E.Node,Y=(this instanceof c);if(!P&&(this!==E)){for(Z in T){if(T.hasOwnProperty(Z)){d=T[Z].detach(U,O);}}if(Y){E.Event.purgeElement(c.getDOMNode(this));}return d;}var X=G(P,this._yuievt.config.prefix),V=F.isArray(X)?X[0]:null,R=(X)?X[3]:null,b,L,Q=E.Env.evt.handles,S,N,W,a=function(g,f){var e=g[f];if(e){while(e.length){b=e.pop();b.detach();}}};if(V){S=Q[V];P=X[1];if(S){if(P){a(S,P);}else{for(Z in S){if(S.hasOwnProperty(Z)){a(S,Z);}}}return(this._yuievt.chain)?this:true;}}else{if(F.isObject(P)&&P.detach){d=P.detach();return(this._yuievt.chain)?this:d;}else{if(Y&&((!R)||(R in c.DOM_EVENTS))){N=E.Array(arguments,0,true);N[2]=c.getDOMNode(this);return E.detach.apply(E,N);}}}L=E.Env.evt.plugins[R];if(this instanceof YUI){N=E.Array(arguments,0,true);if(L&&L.detach){return L.detach.apply(E,N);}else{if(!P||(!L&&c&&(P in c.DOM_EVENTS))){N[0]=P;return E.Event.detach.apply(E.Event,N);}}}W=T[P];if(W){d=W.detach(U,O);}return(this._yuievt.chain)?this:d;},unsubscribe:function(){return this.detach.apply(this,arguments);},detachAll:function(L){return this.detach(L);},unsubscribeAll:function(){return this.detachAll.apply(this,arguments);},publish:function(O,P){var N,R,L,Q=this._yuievt.config.prefix;O=(Q)?K(O,Q):O;if(F.isObject(O)){L={};E.each(O,function(T,S){L[S]=this.publish(S,T||P);},this);return L;}N=this._yuievt.events;R=N[O];if(R){if(P){R.applyConfig(P,true);}}else{R=new E.CustomEvent(O,(P)?E.mix(P,this._yuievt.defaults):this._yuievt.defaults);N[O]=R;}return N[O];},addTarget:function(L){this._yuievt.targets[E.stamp(L)]=L;this._yuievt.hasTargets=true;},removeTarget:function(L){delete this._yuievt.targets[E.stamp(L)];},fire:function(P){var S=F.isString(P),O=(S)?P:(P&&P.type),R,L,N,Q=this._yuievt.config.prefix;O=(Q)?K(O,Q):O;R=this.getEvent(O,true);if(!R){if(this._yuievt.hasTargets){L=(S)?arguments:E.Array(arguments,0,true).unshift(O);return this.bubble(null,L,this);}N=true;}else{L=E.Array(arguments,(S)?1:0,true);N=R.fire.apply(R,L);R.target=null;}return(this._yuievt.chain)?this:N;},getEvent:function(N,L){var P,O;if(!L){P=this._yuievt.config.prefix;N=(P)?K(N,P):N;}O=this._yuievt.events;return(O&&N in O)?O[N]:null;},after:function(O,N){var L=E.Array(arguments,0,true);switch(F.type(O)){case"function":return E.Do.after.apply(E.Do,arguments);case"object":L[0]._after=true;break;default:L[0]=J+O;}return this.on.apply(this,L);},before:function(){return this.on.apply(this,arguments);}};E.EventTarget=M;E.mix(E,M.prototype,false,false,{bubbles:false});M.call(E);YUI.Env.globalEvents=YUI.Env.globalEvents||new M();E.Global=YUI.Env.globalEvents;})();},"3.0.0",{requires:["oop"]});YUI.add("event-custom-complex",function(A){(function(){var C,D,B=A.CustomEvent.prototype;A.EventFacade=function(F,E){F=F||{};this.details=F.details;this.type=F.type;this.target=F.target;this.currentTarget=E;this.relatedTarget=F.relatedTarget;this.stopPropagation=function(){F.stopPropagation();};this.stopImmediatePropagation=function(){F.stopImmediatePropagation();};this.preventDefault=function(){F.preventDefault();};this.halt=function(G){F.halt(G);};};B.fireComplex=function(H){var L=A.Env._eventstack,F,J,E,K,G,I;if(L){if(this.queuable&&this.type!=L.next.type){this.log("queue "+this.type);L.queue.push([this,H]);return true;}}else{A.Env._eventstack={id:this.id,next:this,silent:this.silent,stopped:0,prevented:0,queue:[]};L=A.Env._eventstack;}this.stopped=0;this.prevented=0;this.target=this.target||this.host;I=new A.EventTarget({fireOnce:true,context:this.host});this.events=I;if(this.preventedFn){I.on("prevented",this.preventedFn);}if(this.stoppedFn){I.on("stopped",this.stoppedFn);}this.currentTarget=this.host||this.currentTarget;this.details=H.slice();this.log("Firing "+this.type);this._facade=null;F=this._getFacade(H);if(A.Lang.isObject(H[0])){H[0]=F;}else{H.unshift(F);}if(this.hasSubscribers){this._procSubs(A.merge(this.subscribers),H,F);}if(this.bubbles&&this.host&&this.host.bubble&&!this.stopped){L.stopped=0;L.prevented=0;G=this.host.bubble(this);this.stopped=Math.max(this.stopped,L.stopped);this.prevented=Math.max(this.prevented,L.prevented);}if(this.defaultFn&&!this.prevented){this.defaultFn.apply(this.host||this,H);}this._broadcast(H);if(this.hasAfters&&!this.prevented&&this.stopped<2){this._procSubs(A.merge(this.afters),H,F);}if(L.id===this.id){E=L.queue;while(E.length){J=E.pop();K=J[0];L.stopped=0;L.prevented=0;L.next=K;K.fire.apply(K,J[1]);}A.Env._eventstack=null;}return this.stopped?false:true;};B._getFacade=function(){var E=this._facade,H,G,F=this.details;if(!E){E=new A.EventFacade(this,this.currentTarget);}H=F&&F[0];if(A.Lang.isObject(H,true)){G={};A.mix(G,E,true,D);A.mix(E,H,true);A.mix(E,G,true,D);}E.details=this.details;E.target=this.target;E.currentTarget=this.currentTarget;E.stopped=0; -E.prevented=0;this._facade=E;return this._facade;};B.stopPropagation=function(){this.stopped=1;A.Env._eventstack.stopped=1;this.events.fire("stopped",this);};B.stopImmediatePropagation=function(){this.stopped=2;A.Env._eventstack.stopped=2;this.events.fire("stopped",this);};B.preventDefault=function(){if(this.preventable){this.prevented=1;A.Env._eventstack.prevented=1;this.events.fire("prevented",this);}};B.halt=function(E){if(E){this.stopImmediatePropagation();}else{this.stopPropagation();}this.preventDefault();};A.EventTarget.prototype.bubble=function(M,K,I){var G=this._yuievt.targets,J=true,N,L,E,F,H;if(!M||((!M.stopped)&&G)){for(F in G){if(G.hasOwnProperty(F)){N=G[F];L=M&&M.type;E=N.getEvent(L,true);if(!E){if(N._yuievt.hasTargets){N.bubble.call(N,M,K,I);}}else{E.target=I||(M&&M.target)||this;E.currentTarget=N;H=E.broadcast;E.broadcast=false;J=J&&E.fire.apply(E,K||M.details);E.broadcast=H;if(E.stopped){break;}}}}}return J;};C=new A.EventFacade();D=A.Object.keys(C);})();},"3.0.0",{requires:["event-custom-base"]});YUI.add("event-custom",function(A){},"3.0.0",{use:["event-custom-base","event-custom-complex"]}); \ No newline at end of file +YUI.add("event-custom-base",function(b){b.Env.evt={handles:{},plugins:{}};var g=0,i=1,p={objs:{},before:function(s,u,v,w){var t=s,r;if(w){r=[s,w].concat(b.Array(arguments,4,true));t=b.rbind.apply(b,r);}return this._inject(g,t,u,v);},after:function(s,u,v,w){var t=s,r;if(w){r=[s,w].concat(b.Array(arguments,4,true));t=b.rbind.apply(b,r);}return this._inject(i,t,u,v);},_inject:function(r,t,u,w){var x=b.stamp(u),v,s;if(!this.objs[x]){this.objs[x]={};}v=this.objs[x];if(!v[w]){v[w]=new b.Do.Method(u,w);u[w]=function(){return v[w].exec.apply(v[w],arguments);};}s=x+b.stamp(t)+w;v[w].register(s,t,r);return new b.EventHandle(v[w],s);},detach:function(r){if(r.detach){r.detach();}},_unload:function(s,r){}};b.Do=p;p.Method=function(r,s){this.obj=r;this.methodName=s;this.method=r[s];this.before={};this.after={};};p.Method.prototype.register=function(s,t,r){if(r){this.after[s]=t;}else{this.before[s]=t;}};p.Method.prototype._delete=function(r){delete this.before[r];delete this.after[r];};p.Method.prototype.exec=function(){var t=b.Array(arguments,0,true),u,s,x,v=this.before,r=this.after,w=false;for(u in v){if(v.hasOwnProperty(u)){s=v[u].apply(this.obj,t);if(s){switch(s.constructor){case p.Halt:return s.retVal;case p.AlterArgs:t=s.newArgs;break;case p.Prevent:w=true;break;default:}}}}if(!w){s=this.method.apply(this.obj,t);}p.originalRetVal=s;p.currentRetVal=s;for(u in r){if(r.hasOwnProperty(u)){x=r[u].apply(this.obj,t);if(x&&x.constructor==p.Halt){return x.retVal;}else{if(x&&x.constructor==p.AlterReturn){s=x.newRetVal;p.currentRetVal=s;}}}}return s;};p.AlterArgs=function(s,r){this.msg=s;this.newArgs=r;};p.AlterReturn=function(s,r){this.msg=s;this.newRetVal=r;};p.Halt=function(s,r){this.msg=s;this.retVal=r;};p.Prevent=function(r){this.msg=r;};p.Error=p.Halt;var m="after",q=["broadcast","monitored","bubbles","context","contextFn","currentTarget","defaultFn","defaultTargetOnly","details","emitFacade","fireOnce","async","host","preventable","preventedFn","queuable","silent","stoppedFn","target","type"],n=9,a="yui:log";b.EventHandle=function(r,s){this.evt=r;this.sub=s;};b.EventHandle.prototype={batch:function(r,s){r.call(s||this,this);if(b.Lang.isArray(this.evt)){b.Array.each(this.evt,function(t){t.batch.call(s||t,r);});}},detach:function(){var r=this.evt,t=0,s;if(r){if(b.Lang.isArray(r)){for(s=0;s2)?b.Array(arguments,2,true):null;return this._on(t,s,r,true);},on:function(t,s){var r=(arguments.length>2)?b.Array(arguments,2,true):null;if(this.host){this.host._monitor("attach",this.type,{args:arguments});}return this._on(t,s,r,true);},after:function(t,s){var r=(arguments.length>2)?b.Array(arguments,2,true):null;return this._on(t,s,r,m);},detach:function(w,u){if(w&&w.detach){return w.detach();}var t,v,x=0,r=b.merge(this.subscribers,this.afters);for(t in r){if(r.hasOwnProperty(t)){v=r[t];if(v&&(!w||w===v.fn)){this._delete(v);x++;}}}return x;},unsubscribe:function(){return this.detach.apply(this,arguments);},_notify:function(v,u,r){this.log(this.type+"->"+"sub: "+v.id);var t;t=v.notify(u,this);if(false===t||this.stopped>1){this.log(this.type+" cancelled by subscriber");return false;}return true;},log:function(s,r){if(!this.silent){}},fire:function(){if(this.fireOnce&&this.fired){this.log("fireOnce event: "+this.type+" already fired");return true;}else{var r=b.Array(arguments,0,true);this.fired=true;this.firedWith=r;if(this.emitFacade){return this.fireComplex(r);}else{return this.fireSimple(r);}}},fireSimple:function(r){this.stopped=0;this.prevented=0;if(this.hasSubs()){var s=this.getSubs();this._procSubs(s[0],r);this._procSubs(s[1],r);}this._broadcast(r);return this.stopped?false:true;},fireComplex:function(r){r[0]=r[0]||{};return this.fireSimple(r);},_procSubs:function(v,t,r){var w,u;for(u in v){if(v.hasOwnProperty(u)){w=v[u];if(w&&w.fn){if(false===this._notify(w,t,r)){this.stopped=2;}if(this.stopped==2){return false;}}}}return true;},_broadcast:function(s){if(!this.stopped&&this.broadcast){var r=b.Array(s);r.unshift(this.type);if(this.host!==b){b.fire.apply(b,r);}if(this.broadcast==2){b.Global.fire.apply(b.Global,r);}}},unsubscribeAll:function(){return this.detachAll.apply(this,arguments);},detachAll:function(){return this.detach();},_delete:function(r){if(r){if(this.subscribers[r.id]){delete this.subscribers[r.id];this.subCount--;}if(this.afters[r.id]){delete this.afters[r.id];this.afterCount--;}}if(this.host){this.host._monitor("detach",this.type,{ce:this,sub:r});}if(r){r.deleted=true;}}};b.Subscriber=function(t,s,r){this.fn=t;this.context=s;this.id=b.stamp(this);this.args=r;};b.Subscriber.prototype={_notify:function(v,t,u){if(this.deleted&&!this.postponed){if(this.postponed){delete this.fn; +delete this.context;}else{delete this.postponed;return null;}}var r=this.args,s;switch(u.signature){case 0:s=this.fn.call(v,u.type,t,v);break;case 1:s=this.fn.call(v,t[0]||null,v);break;default:if(r||t){t=t||[];r=(r)?t.concat(r):t;s=this.fn.apply(v,r);}else{s=this.fn.call(v);}}if(this.once){u._delete(this);}return s;},notify:function(s,u){var v=this.context,r=true;if(!v){v=(u.contextFn)?u.contextFn():u.context;}if(b.config.throwFail){r=this._notify(v,s,u);}else{try{r=this._notify(v,s,u);}catch(t){b.error(this+" failed: "+t.message,t);}}return r;},contains:function(s,r){if(r){return((this.fn==s)&&this.context==r);}else{return(this.fn==s);}}};var j=b.Lang,h=":",e="|",l="~AFTER~",k=b.Array,c=b.cached(function(r){return r.replace(/(.*)(:)(.*)/,"*$2$3");}),o=b.cached(function(r,s){if(!s||!j.isString(r)||r.indexOf(h)>-1){return r;}return s+h+r;}),f=b.cached(function(u,w){var s=u,v,x,r;if(!j.isString(s)){return s;}r=s.indexOf(l);if(r>-1){x=true;s=s.substr(l.length);}r=s.indexOf(e);if(r>-1){v=s.substr(0,(r));s=s.substr(r+1);if(s=="*"){s=null;}}return[v,(w)?o(s,w):s,x,s];}),d=function(r){var s=(j.isObject(r))?r:{};this._yuievt=this._yuievt||{id:b.guid(),events:{},targets:{},config:s,chain:("chain" in s)?s.chain:b.config.chain,bubbling:false,defaults:{context:s.context||this,host:this,emitFacade:s.emitFacade,fireOnce:s.fireOnce,queuable:s.queuable,monitored:s.monitored,broadcast:s.broadcast,defaultTargetOnly:s.defaultTargetOnly,bubbles:("bubbles" in s)?s.bubbles:true}};};d.prototype={once:function(){var r=this.on.apply(this,arguments);r.batch(function(s){if(s.sub){s.sub.once=true;}});return r;},parseType:function(r,s){return f(r,s||this._yuievt.config.prefix);},on:function(v,A,t){var D=f(v,this._yuievt.config.prefix),F,G,s,J,C,B,H,x=b.Env.evt.handles,u,r,y,I=b.Node,E,z,w;this._monitor("attach",D[1],{args:arguments,category:D[0],after:D[2]});if(j.isObject(v)){if(j.isFunction(v)){return b.Do.before.apply(b.Do,arguments);}F=A;G=t;s=k(arguments,0,true);J=[];if(j.isArray(v)){w=true;}u=v._after;delete v._after;b.each(v,function(M,L){if(j.isObject(M)){F=M.fn||((j.isFunction(M))?M:F);G=M.context||G;}var K=(u)?l:"";s[0]=K+((w)?M:L);s[1]=F;s[2]=G;J.push(this.on.apply(this,s));},this);return(this._yuievt.chain)?this:new b.EventHandle(J);}B=D[0];u=D[2];y=D[3];if(I&&b.instanceOf(this,I)&&(y in I.DOM_EVENTS)){s=k(arguments,0,true);s.splice(2,0,I.getDOMNode(this));return b.on.apply(b,s);}v=D[1];if(b.instanceOf(this,YUI)){r=b.Env.evt.plugins[v];s=k(arguments,0,true);s[0]=y;if(I){E=s[2];if(b.instanceOf(E,b.NodeList)){E=b.NodeList.getDOMNodes(E);}else{if(b.instanceOf(E,I)){E=I.getDOMNode(E);}}z=(y in I.DOM_EVENTS);if(z){s[2]=E;}}if(r){H=r.on.apply(b,s);}else{if((!v)||z){H=b.Event._attach(s);}}}if(!H){C=this._yuievt.events[v]||this.publish(v);H=C._on(A,t,(arguments.length>3)?k(arguments,3,true):null,(u)?"after":true);}if(B){x[B]=x[B]||{};x[B][v]=x[B][v]||[];x[B][v].push(H);}return(this._yuievt.chain)?this:H;},subscribe:function(){return this.on.apply(this,arguments);},detach:function(A,C,r){var G=this._yuievt.events,v,x=b.Node,E=x&&(b.instanceOf(this,x));if(!A&&(this!==b)){for(v in G){if(G.hasOwnProperty(v)){G[v].detach(C,r);}}if(E){b.Event.purgeElement(x.getDOMNode(this));}return this;}var u=f(A,this._yuievt.config.prefix),z=j.isArray(u)?u[0]:null,H=(u)?u[3]:null,w,D=b.Env.evt.handles,F,B,y,t,s=function(M,K,L){var J=M[K],N,I;if(J){for(I=J.length-1;I>=0;--I){N=J[I].evt;if(N.host===L||N.el===L){J[I].detach();}}}};if(z){B=D[z];A=u[1];F=(E)?b.Node.getDOMNode(this):this;if(B){if(A){s(B,A,F);}else{for(v in B){if(B.hasOwnProperty(v)){s(B,v,F);}}}return this;}}else{if(j.isObject(A)&&A.detach){A.detach();return this;}else{if(E&&((!H)||(H in x.DOM_EVENTS))){y=k(arguments,0,true);y[2]=x.getDOMNode(this);b.detach.apply(b,y);return this;}}}w=b.Env.evt.plugins[H];if(b.instanceOf(this,YUI)){y=k(arguments,0,true);if(w&&w.detach){w.detach.apply(b,y);return this;}else{if(!A||(!w&&x&&(A in x.DOM_EVENTS))){y[0]=A;b.Event.detach.apply(b.Event,y);return this;}}}t=G[u[1]];if(t){t.detach(C,r);}return this;},unsubscribe:function(){return this.detach.apply(this,arguments);},detachAll:function(r){return this.detach(r);},unsubscribeAll:function(){return this.detachAll.apply(this,arguments);},publish:function(t,u){var s,y,r,x,w=this._yuievt,v=w.config.prefix;t=(v)?o(t,v):t;this._monitor("publish",t,{args:arguments});if(j.isObject(t)){r={};b.each(t,function(A,z){r[z]=this.publish(z,A||u);},this);return r;}s=w.events;y=s[t];if(y){if(u){y.applyConfig(u,true);}}else{x=w.defaults;y=new b.CustomEvent(t,(u)?b.merge(x,u):x);s[t]=y;}return s[t];},_monitor:function(u,r,v){var s,t=this.getEvent(r);if((this._yuievt.config.monitored&&(!t||t.monitored))||(t&&t.monitored)){s=r+"_"+u;v.monitored=u;this.fire.call(this,s,v);}},fire:function(v){var z=j.isString(v),u=(z)?v:(v&&v.type),y,s,x=this._yuievt.config.prefix,w,r=(z)?k(arguments,1,true):arguments;u=(x)?o(u,x):u;this._monitor("fire",u,{args:r});y=this.getEvent(u,true);w=this.getSibling(u,y);if(w&&!y){y=this.publish(u);}if(!y){if(this._yuievt.hasTargets){return this.bubble({type:u},r,this);}s=true;}else{y.sibling=w;s=y.fire.apply(y,r);}return(this._yuievt.chain)?this:s;},getSibling:function(r,t){var s;if(r.indexOf(h)>-1){r=c(r);s=this.getEvent(r,true);if(s){s.applyConfig(t);s.bubbles=false;s.broadcast=0;}}return s;},getEvent:function(s,r){var u,t;if(!r){u=this._yuievt.config.prefix;s=(u)?o(s,u):s;}t=this._yuievt.events;return t[s]||null;},after:function(t,s){var r=k(arguments,0,true);switch(j.type(t)){case"function":return b.Do.after.apply(b.Do,arguments);case"array":case"object":r[0]._after=true;break;default:r[0]=l+t;}return this.on.apply(this,r);},before:function(){return this.on.apply(this,arguments);}};b.EventTarget=d;b.mix(b,d.prototype,false,false,{bubbles:false});d.call(b);YUI.Env.globalEvents=YUI.Env.globalEvents||new d();b.Global=YUI.Env.globalEvents;},"3.3.0",{requires:["oop"]});YUI.add("event-custom-complex",function(f){var b,e,d={},a=f.CustomEvent.prototype,c=f.EventTarget.prototype;f.EventFacade=function(h,g){h=h||d; +this._event=h;this.details=h.details;this.type=h.type;this._type=h.type;this.target=h.target;this.currentTarget=g;this.relatedTarget=h.relatedTarget;};f.extend(f.EventFacade,Object,{stopPropagation:function(){this._event.stopPropagation();this.stopped=1;},stopImmediatePropagation:function(){this._event.stopImmediatePropagation();this.stopped=2;},preventDefault:function(){this._event.preventDefault();this.prevented=1;},halt:function(g){this._event.halt(g);this.prevented=1;this.stopped=(g)?2:1;}});a.fireComplex=function(p){var r,l,g,n,i,o,u,j,h,t=this,s=t.host||t,m,k;if(t.stack){if(t.queuable&&t.type!=t.stack.next.type){t.log("queue "+t.type);t.stack.queue.push([t,p]);return true;}}r=t.stack||{id:t.id,next:t,silent:t.silent,stopped:0,prevented:0,bubbling:null,type:t.type,afterQueue:new f.Queue(),defaultTargetOnly:t.defaultTargetOnly,queue:[]};j=t.getSubs();t.stopped=(t.type!==r.type)?0:r.stopped;t.prevented=(t.type!==r.type)?0:r.prevented;t.target=t.target||s;u=new f.EventTarget({fireOnce:true,context:s});t.events=u;if(t.preventedFn){u.on("prevented",t.preventedFn);}if(t.stoppedFn){u.on("stopped",t.stoppedFn);}t.currentTarget=s;t.details=p.slice();t.log("Firing "+t.type);t._facade=null;l=t._getFacade(p);if(f.Lang.isObject(p[0])){p[0]=l;}else{p.unshift(l);}if(j[0]){t._procSubs(j[0],p,l);}if(t.bubbles&&s.bubble&&!t.stopped){k=r.bubbling;r.bubbling=t.type;if(r.type!=t.type){r.stopped=0;r.prevented=0;}o=s.bubble(t,p,null,r);t.stopped=Math.max(t.stopped,r.stopped);t.prevented=Math.max(t.prevented,r.prevented);r.bubbling=k;}if(t.defaultFn&&!t.prevented&&((!t.defaultTargetOnly&&!r.defaultTargetOnly)||s===l.target)){t.defaultFn.apply(s,p);}t._broadcast(p);if(j[1]&&!t.prevented&&t.stopped<2){if(r.id===t.id||t.type!=s._yuievt.bubbling){t._procSubs(j[1],p,l);while((m=r.afterQueue.last())){m();}}else{h=j[1];if(r.execDefaultCnt){h=f.merge(h);f.each(h,function(q){q.postponed=true;});}r.afterQueue.add(function(){t._procSubs(h,p,l);});}}t.target=null;if(r.id===t.id){n=r.queue;while(n.length){g=n.pop();i=g[0];r.next=i;i.fire.apply(i,g[1]);}t.stack=null;}o=!(t.stopped);if(t.type!=s._yuievt.bubbling){r.stopped=0;r.prevented=0;t.stopped=0;t.prevented=0;}return o;};a._getFacade=function(){var g=this._facade,j,i,h=this.details;if(!g){g=new f.EventFacade(this,this.currentTarget);}j=h&&h[0];if(f.Lang.isObject(j,true)){i={};f.mix(i,g,true,e);f.mix(g,j,true);f.mix(g,i,true,e);g.type=j.type||g.type;}g.details=this.details;g.target=this.originalTarget||this.target;g.currentTarget=this.currentTarget;g.stopped=0;g.prevented=0;this._facade=g;return this._facade;};a.stopPropagation=function(){this.stopped=1;if(this.stack){this.stack.stopped=1;}this.events.fire("stopped",this);};a.stopImmediatePropagation=function(){this.stopped=2;if(this.stack){this.stack.stopped=2;}this.events.fire("stopped",this);};a.preventDefault=function(){if(this.preventable){this.prevented=1;if(this.stack){this.stack.prevented=1;}this.events.fire("prevented",this);}};a.halt=function(g){if(g){this.stopImmediatePropagation();}else{this.stopPropagation();}this.preventDefault();};c.addTarget=function(g){this._yuievt.targets[f.stamp(g)]=g;this._yuievt.hasTargets=true;};c.getTargets=function(){return f.Object.values(this._yuievt.targets);};c.removeTarget=function(g){delete this._yuievt.targets[f.stamp(g)];};c.bubble=function(u,q,o,s){var m=this._yuievt.targets,p=true,v,r=u&&u.type,h,l,n,j,g=o||(u&&u.target)||this,k;if(!u||((!u.stopped)&&m)){for(l in m){if(m.hasOwnProperty(l)){v=m[l];h=v.getEvent(r,true);j=v.getSibling(r,h);if(j&&!h){h=v.publish(r);}k=v._yuievt.bubbling;v._yuievt.bubbling=r;if(!h){if(v._yuievt.hasTargets){v.bubble(u,q,g,s);}}else{h.sibling=j;h.target=g;h.originalTarget=g;h.currentTarget=v;n=h.broadcast;h.broadcast=false;h.emitFacade=true;h.stack=s;p=p&&h.fire.apply(h,q||u.details||[]);h.broadcast=n;h.originalTarget=null;if(h.stopped){break;}}v._yuievt.bubbling=k;}}}return p;};b=new f.EventFacade();e=f.Object.keys(b);},"3.3.0",{requires:["event-custom-base"]});YUI.add("event-custom",function(a){},"3.3.0",{use:["event-custom-base","event-custom-complex"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/event-custom/event-custom.js b/jssource/src_files/include/javascript/yui3/build/event-custom/event-custom.js index 997a85d2..2d44833f 100644 --- a/jssource/src_files/include/javascript/yui3/build/event-custom/event-custom.js +++ b/jssource/src_files/include/javascript/yui3/build/event-custom/event-custom.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('event-custom-base', function(Y) { @@ -20,12 +20,11 @@ Y.Env.evt = { /** - * Custom event engine, DOM event listener abstraction layer, synthetic DOM + * Custom event engine, DOM event listener abstraction layer, synthetic DOM * events. * @module event-custom * @submodule event-custom-base */ -(function() { /** * Allows for the insertion of methods that are executed before or after @@ -34,10 +33,10 @@ Y.Env.evt = { * @static */ -var BEFORE = 0, - AFTER = 1; +var DO_BEFORE = 0, + DO_AFTER = 1, -Y.Do = { +DO = { /** * Cache of objects touched by the utility @@ -53,6 +52,8 @@ Y.Do = { * @param obj the object hosting the method to displace * @param sFn {string} the name of the method to displace * @param c The execution context for fn + * @param arg* {mixed} 0..n additional arguments to supply to the subscriber + * when the event fires. * @return {string} handle for the subscription * @static */ @@ -63,7 +64,7 @@ Y.Do = { f = Y.rbind.apply(Y, a); } - return this._inject(BEFORE, f, obj, sFn); + return this._inject(DO_BEFORE, f, obj, sFn); }, /** @@ -73,6 +74,7 @@ Y.Do = { * @param obj the object hosting the method to displace * @param sFn {string} the name of the method to displace * @param c The execution context for fn + * @param arg* {mixed} 0..n additional arguments to supply to the subscriber * @return {string} handle for the subscription * @static */ @@ -83,7 +85,7 @@ Y.Do = { f = Y.rbind.apply(Y, a); } - return this._inject(AFTER, f, obj, sFn); + return this._inject(DO_AFTER, f, obj, sFn); }, /** @@ -115,7 +117,7 @@ Y.Do = { o[sFn] = new Y.Do.Method(obj, sFn); // re-route the method to our wrapper - obj[sFn] = + obj[sFn] = function() { return o[sFn].exec.apply(o[sFn], arguments); }; @@ -149,6 +151,29 @@ Y.Do = { } }; +Y.Do = DO; + +////////////////////////////////////////////////////////////////////////// + +/** + * Contains the return value from the wrapped method, accessible + * by 'after' event listeners. + * + * @property Do.originalRetVal + * @static + * @since 2.3.0 + */ + +/** + * Contains the current state of the return value, consumable by + * 'after' event listeners, and updated if an after subscriber + * changes the return value generated by the wrapped function. + * + * @property Do.currentRetVal + * @static + * @since 2.3.0 + */ + ////////////////////////////////////////////////////////////////////////// /** @@ -158,7 +183,7 @@ Y.Do = { * @param obj The object to operate on * @param sFn The name of the method to displace */ -Y.Do.Method = function(obj, sFn) { +DO.Method = function(obj, sFn) { this.obj = obj; this.methodName = sFn; this.method = obj[sFn]; @@ -173,7 +198,7 @@ Y.Do.Method = function(obj, sFn) { * @param fn {Function} the function to execute * @param when {string} when to execute the function */ -Y.Do.Method.prototype.register = function (sid, fn, when) { +DO.Method.prototype.register = function (sid, fn, when) { if (when) { this.after[sid] = fn; } else { @@ -188,7 +213,7 @@ Y.Do.Method.prototype.register = function (sid, fn, when) { * @param fn {Function} the function to execute * @param when {string} when to execute the function */ -Y.Do.Method.prototype._delete = function (sid) { +DO.Method.prototype._delete = function (sid) { delete this.before[sid]; delete this.after[sid]; }; @@ -197,10 +222,10 @@ Y.Do.Method.prototype._delete = function (sid) { * Execute the wrapped method * @method exec */ -Y.Do.Method.prototype.exec = function () { +DO.Method.prototype.exec = function () { - var args = Y.Array(arguments, 0, true), - i, ret, newRet, + var args = Y.Array(arguments, 0, true), + i, ret, newRet, bf = this.before, af = this.after, prevented = false; @@ -211,12 +236,12 @@ Y.Do.Method.prototype.exec = function () { ret = bf[i].apply(this.obj, args); if (ret) { switch (ret.constructor) { - case Y.Do.Halt: + case DO.Halt: return ret.retVal; - case Y.Do.AlterArgs: + case DO.AlterArgs: args = ret.newArgs; break; - case Y.Do.Prevent: + case DO.Prevent: prevented = true; break; default: @@ -230,16 +255,21 @@ Y.Do.Method.prototype.exec = function () { ret = this.method.apply(this.obj, args); } + DO.originalRetVal = ret; + DO.currentRetVal = ret; + // execute after methods. for (i in af) { if (af.hasOwnProperty(i)) { newRet = af[i].apply(this.obj, args); // Stop processing if a Halt object is returned - if (newRet && newRet.constructor == Y.Do.Halt) { + if (newRet && newRet.constructor == DO.Halt) { return newRet.retVal; // Check for a new return value - } else if (newRet && newRet.constructor == Y.Do.AlterReturn) { + } else if (newRet && newRet.constructor == DO.AlterReturn) { ret = newRet.newRetVal; + // Update the static retval state + DO.currentRetVal = ret; } } } @@ -249,14 +279,13 @@ Y.Do.Method.prototype.exec = function () { ////////////////////////////////////////////////////////////////////////// - /** * Return an AlterArgs object when you want to change the arguments that * were passed into the function. An example would be a service that scrubs * out illegal characters prior to executing the core business logic. * @class Do.AlterArgs */ -Y.Do.AlterArgs = function(msg, newArgs) { +DO.AlterArgs = function(msg, newArgs) { this.msg = msg; this.newArgs = newArgs; }; @@ -266,7 +295,7 @@ Y.Do.AlterArgs = function(msg, newArgs) { * from the core method to the caller * @class Do.AlterReturn */ -Y.Do.AlterReturn = function(msg, newRetVal) { +DO.AlterReturn = function(msg, newRetVal) { this.msg = msg; this.newRetVal = newRetVal; }; @@ -277,7 +306,7 @@ Y.Do.AlterReturn = function(msg, newRetVal) { * if it has not exectued yet. * @class Do.Halt */ -Y.Do.Halt = function(msg, retVal) { +DO.Halt = function(msg, retVal) { this.msg = msg; this.retVal = retVal; }; @@ -287,7 +316,7 @@ Y.Do.Halt = function(msg, retVal) { * from executing, but want the remaining listeners to execute * @class Do.Prevent */ -Y.Do.Prevent = function(msg) { +DO.Prevent = function(msg) { this.msg = msg; }; @@ -297,41 +326,37 @@ Y.Do.Prevent = function(msg) { * @class Do.Error * @deprecated use Y.Do.Halt or Y.Do.Prevent */ -Y.Do.Error = Y.Do.Halt; +DO.Error = DO.Halt; + ////////////////////////////////////////////////////////////////////////// // Y["Event"] && Y.Event.addListener(window, "unload", Y.Do._unload, Y.Do); -})(); /** - * Custom event engine, DOM event listener abstraction layer, synthetic DOM + * Custom event engine, DOM event listener abstraction layer, synthetic DOM * events. * @module event-custom * @submodule event-custom-base */ -/** - * Return value from all subscribe operations - * @class EventHandle - * @constructor - * @param evt {CustomEvent} the custom event - * @param sub {Subscriber} the subscriber - */ // var onsubscribeType = "_event:onsub", -var AFTER = 'after', +var AFTER = 'after', CONFIGS = [ 'broadcast', + 'monitored', 'bubbles', 'context', 'contextFn', 'currentTarget', 'defaultFn', + 'defaultTargetOnly', 'details', 'emitFacade', 'fireOnce', + 'async', 'host', 'preventable', 'preventedFn', @@ -342,10 +367,16 @@ var AFTER = 'after', 'type' ], - YUI3_SIGNATURE = 9, YUI_LOG = 'yui:log'; +/** + * Return value from all subscribe operations + * @class EventHandle + * @constructor + * @param {CustomEvent} evt the custom event. + * @param {Subscriber} sub the subscriber. + */ Y.EventHandle = function(evt, sub) { /** @@ -362,22 +393,47 @@ Y.EventHandle = function(evt, sub) { }; Y.EventHandle.prototype = { + batch: function(f, c) { + f.call(c || this, this); + if (Y.Lang.isArray(this.evt)) { + Y.Array.each(this.evt, function(h) { + h.batch.call(c || h, f); + }); + } + }, /** * Detaches this subscriber * @method detach + * @return {int} the number of detached listeners */ detach: function() { - var evt = this.evt, i; + var evt = this.evt, detached = 0, i; if (evt) { if (Y.Lang.isArray(evt)) { - for (i=0; i 2) ? Y.Array(arguments, 2, true): null; + var a = (arguments.length > 2) ? Y.Array(arguments, 2, true) : null; return this._on(fn, context, a, true); }, /** * Listen for this event * @method on - * @param {Function} fn The function to execute - * @return {EventHandle|EventTarget} unsubscribe handle or a - * chainable event target depending on the 'chain' config. + * @param {Function} fn The function to execute. + * @param {object} context optional execution context. + * @param {mixed} arg* 0..n additional arguments to supply to the subscriber + * when the event fires. + * @return {EventHandle} An object with a detach method to detch the handler(s). */ on: function(fn, context) { - var a = (arguments.length > 2) ? Y.Array(arguments, 2, true): null; + var a = (arguments.length > 2) ? Y.Array(arguments, 2, true) : null; + if (this.host) { + this.host._monitor('attach', this.type, { + args: arguments + }); + } return this._on(fn, context, a, true); }, /** * Listen for this event after the normal subscribers have been notified and - * the default behavior has been applied. If a normal subscriber prevents the + * the default behavior has been applied. If a normal subscriber prevents the * default behavior, it also prevents after listeners from firing. * @method after - * @param {Function} fn The function to execute - * @return {EventHandle|EventTarget} unsubscribe handle or a - * chainable event target depending on the 'chain' config. + * @param {Function} fn The function to execute. + * @param {object} context optional execution context. + * @param {mixed} arg* 0..n additional arguments to supply to the subscriber + * when the event fires. + * @return {EventHandle} handle Unsubscribe handle. */ after: function(fn, context) { - var a = (arguments.length > 2) ? Y.Array(arguments, 2, true): null; + var a = (arguments.length > 2) ? Y.Array(arguments, 2, true) : null; return this._on(fn, context, a, AFTER); }, /** * Detach listeners. - * @method detach + * @method detach * @param {Function} fn The subscribed function to remove, if not supplied - * all will be removed + * all will be removed. * @param {Object} context The context object passed to subscribe. - * @return {int|EventTarget} returns a chainable event target - * or the number of subscribers unsubscribed. + * @return {int} returns the number of subscribers unsubscribed. */ detach: function(fn, context) { // unsubscribe handle @@ -678,7 +815,9 @@ Y.CustomEvent.prototype = { return fn.detach(); } - var found = 0, subs = this.subscribers, i, s; + var i, s, + found = 0, + subs = Y.merge(this.subscribers, this.afters); for (i in subs) { if (subs.hasOwnProperty(i)) { @@ -697,34 +836,32 @@ Y.CustomEvent.prototype = { * Detach listeners. * @method unsubscribe * @param {Function} fn The subscribed function to remove, if not supplied - * all will be removed + * all will be removed. * @param {Object} context The context object passed to subscribe. - * @return {boolean|EventTarget} returns a chainable event target - * or a boolean for legacy detach support. - * @deprecated use detach + * @return {int|undefined} returns the number of subscribers unsubscribed. + * @deprecated use detach. */ unsubscribe: function() { return this.detach.apply(this, arguments); }, - /** * Notify a single subscriber * @method _notify - * @param s {Subscriber} the subscriber - * @param args {Array} the arguments array to apply to the listener + * @param {Subscriber} s the subscriber. + * @param {Array} args the arguments array to apply to the listener. * @private */ _notify: function(s, args, ef) { - this.log(this.type + "->" + "sub: " + s.id); + this.log(this.type + '->' + 'sub: ' + s.id); var ret; ret = s.notify(args, this); if (false === ret || this.stopped > 1) { - this.log(this.type + " cancelled by subscriber"); + this.log(this.type + ' cancelled by subscriber'); return false; } @@ -734,8 +871,8 @@ Y.CustomEvent.prototype = { /** * Logger abstraction to centralize the application of the silent flag * @method log - * @param msg {string} message to log - * @param cat {string} log category + * @param {string} msg message to log. + * @param {string} cat log category. */ log: function(msg, cat) { if (!this.silent) { @@ -744,20 +881,20 @@ Y.CustomEvent.prototype = { /** * Notifies the subscribers. The callback functions will be executed - * from the context specified when the event was created, and with the + * from the context specified when the event was created, and with the * following parameters: *
            *
          • The type of event
          • *
          • All of the arguments fire() was executed with as an array
          • - *
          • The custom object (if any) that was passed into the subscribe() + *
          • The custom object (if any) that was passed into the subscribe() * method
          • *
          - * @method fire - * @param {Object*} arguments an arbitrary set of parameters to pass to + * @method fire + * @param {Object*} arguments an arbitrary set of parameters to pass to * the handler. - * @return {boolean} false if one of the subscribers returned false, - * true otherwise - * + * @return {boolean} false if one of the subscribers returned false, + * true otherwise. + * */ fire: function() { if (this.fireOnce && this.fired) { @@ -767,6 +904,9 @@ Y.CustomEvent.prototype = { var args = Y.Array(arguments, 0, true); + // this doesn't happen if the event isn't published + // this.host._monitor('fire', this.type, args); + this.fired = true; this.firedWith = args; @@ -779,8 +919,13 @@ Y.CustomEvent.prototype = { }, fireSimple: function(args) { - if (this.hasSubscribers || this.hasAfters) { - this._procSubs(Y.merge(this.subscribers, this.afters), args); + this.stopped = 0; + this.prevented = 0; + if (this.hasSubs()) { + // this._procSubs(Y.merge(this.subscribers, this.afters), args); + var subs = this.getSubs(); + this._procSubs(subs[0], args); + this._procSubs(subs[1], args); } this._broadcast(args); return this.stopped ? false : true; @@ -830,8 +975,8 @@ Y.CustomEvent.prototype = { /** * Removes all listeners * @method unsubscribeAll - * @return {int} The number of listeners unsubscribed - * @deprecated use detachAll + * @return {int} The number of listeners unsubscribed. + * @deprecated use detachAll. */ unsubscribeAll: function() { return this.detachAll.apply(this, arguments); @@ -840,7 +985,7 @@ Y.CustomEvent.prototype = { /** * Removes all listeners * @method detachAll - * @return {int} The number of listeners unsubscribed + * @return {int} The number of listeners unsubscribed. */ detachAll: function() { return this.detach(); @@ -848,15 +993,32 @@ Y.CustomEvent.prototype = { /** * @method _delete - * @param subscriber object + * @param subscriber object. * @private */ _delete: function(s) { if (s) { - delete s.fn; - delete s.context; - delete this.subscribers[s.id]; - delete this.afters[s.id]; + if (this.subscribers[s.id]) { + delete this.subscribers[s.id]; + this.subCount--; + } + if (this.afters[s.id]) { + delete this.afters[s.id]; + this.afterCount--; + } + } + + if (this.host) { + this.host._monitor('detach', this.type, { + ce: this, + sub: s + }); + } + + if (s) { + // delete s.fn; + // delete s.context; + s.deleted = true; } } }; @@ -865,9 +1027,9 @@ Y.CustomEvent.prototype = { /** * Stores the subscriber information to be used when the event fires. - * @param {Function} fn The wrapped function to execute - * @param {Object} context The value of the keyword 'this' in the listener - * @param {Array} args* 0..n additional arguments to supply the listener + * @param {Function} fn The wrapped function to execute. + * @param {Object} context The value of the keyword 'this' in the listener. + * @param {Array} args* 0..n additional arguments to supply the listener. * * @class Subscriber * @constructor @@ -908,13 +1070,28 @@ Y.Subscriber = function(fn, context, args) { * @property events * @type {EventTarget} */ - this.events = null; - + // this.events = null; + + /** + * This listener only reacts to the event once + * @property once + */ + // this.once = false; + }; Y.Subscriber.prototype = { _notify: function(c, args, ce) { + if (this.deleted && !this.postponed) { + if (this.postponed) { + delete this.fn; + delete this.context; + } else { + delete this.postponed; + return null; + } + } var a = this.args, ret; switch (ce.signature) { case 0: @@ -933,14 +1110,18 @@ Y.Subscriber.prototype = { } } + if (this.once) { + ce._delete(this); + } + return ret; }, /** * Executes the subscriber. * @method notify - * @param args {Array} Arguments array for the subscriber - * @param ce {CustomEvent} The custom event that sent the notification + * @param args {Array} Arguments array for the subscriber. + * @param ce {CustomEvent} The custom event that sent the notification. */ notify: function(args, ce) { var c = this.context, @@ -956,7 +1137,7 @@ Y.Subscriber.prototype = { } else { try { ret = this._notify(c, args, ce); - } catch(e) { + } catch (e) { Y.error(this + ' failed: ' + e.message, e); } } @@ -969,9 +1150,9 @@ Y.Subscriber.prototype = { * Used by the unsubscribe method to match the right subscriber. * * @method contains - * @param {Function} fn the function to execute - * @param {Object} context optional 'this' keyword for the listener - * @return {boolean} true if the supplied arguments match this + * @param {Function} fn the function to execute. + * @param {Object} context optional 'this' keyword for the listener. + * @return {boolean} true if the supplied arguments match this * subscriber's signature. */ contains: function(fn, context) { @@ -985,29 +1166,28 @@ Y.Subscriber.prototype = { }; /** - * Custom event engine, DOM event listener abstraction layer, synthetic DOM + * Custom event engine, DOM event listener abstraction layer, synthetic DOM * events. * @module event-custom * @submodule event-custom-base */ -(function() { /** * EventTarget provides the implementation for any object to * publish, subscribe and fire to custom events, and also * alows other EventTargets to target the object with events * sourced from the other object. - * EventTarget is designed to be used with Y.augment to wrap - * EventCustom in an interface that allows events to be listened to + * EventTarget is designed to be used with Y.augment to wrap + * EventCustom in an interface that allows events to be listened to * and fired by name. This makes it possible for implementing code to * subscribe to an event that either has not been created yet, or will * not be created at all. * @class EventTarget * @param opts a configuration object - * @config emitFacade {boolean} if true, all events will emit event + * @config emitFacade {boolean} if true, all events will emit event * facade payloads by default (default false) - * @config prefix {string} the prefix to apply to non-prefixed event names - * @config chain {boolean} if true, on/after/detach return the host to allow + * @config prefix {string} the prefix to apply to non-prefixed event names + * @config chain {boolean} if true, on/after/detach return the host to allow * chaining, otherwise they return an EventHandle (default false) */ @@ -1015,6 +1195,11 @@ var L = Y.Lang, PREFIX_DELIMITER = ':', CATEGORY_DELIMITER = '|', AFTER_PREFIX = '~AFTER~', + YArray = Y.Array, + + _wildType = Y.cached(function(type) { + return type.replace(/(.*)(:)(.*)/, "*$2$3"); + }), /** * If the instance has a prefix attribute and the @@ -1027,7 +1212,7 @@ var L = Y.Lang, if (!pre || !L.isString(type) || type.indexOf(PREFIX_DELIMITER) > -1) { return type; - } + } return pre + PREFIX_DELIMITER + type; }), @@ -1035,7 +1220,7 @@ var L = Y.Lang, /** * Returns an array with the detach key (if provided), * and the prefixed event name from _getType - * Y.on('detachcategory, menu:click', fn) + * Y.on('detachcategory| menu:click', fn) * @method _parseType * @private */ @@ -1045,8 +1230,8 @@ var L = Y.Lang, if (!L.isString(t)) { return t; - } - + } + i = t.indexOf(AFTER_PREFIX); if (i > -1) { @@ -1085,13 +1270,17 @@ var L = Y.Lang, chain: ('chain' in o) ? o.chain : Y.config.chain, + bubbling: false, + defaults: { - context: o.context || this, + context: o.context || this, host: this, emitFacade: o.emitFacade, fireOnce: o.fireOnce, queuable: o.queuable, + monitored: o.monitored, broadcast: o.broadcast, + defaultTargetOnly: o.defaultTargetOnly, bubbles: ('bubbles' in o) ? o.bubbles : true } }; @@ -1101,18 +1290,68 @@ var L = Y.Lang, ET.prototype = { + /** + * Listen to a custom event hosted by this object one time. + * This is the equivalent to on except the + * listener is immediatelly detached when it is executed. + * @method once + * @param type {string} The type of the event + * @param fn {Function} The callback + * @param context {object} optional execution context. + * @param arg* {mixed} 0..n additional arguments to supply to the subscriber + * @return the event target or a detach handle per 'chain' config + */ + once: function() { + var handle = this.on.apply(this, arguments); + handle.batch(function(hand) { + if (hand.sub) { + hand.sub.once = true; + } + }); + return handle; + }, + + /** + * Takes the type parameter passed to 'on' and parses out the + * various pieces that could be included in the type. If the + * event type is passed without a prefix, it will be expanded + * to include the prefix one is supplied or the event target + * is configured with a default prefix. + * @method parseType + * @param {string} type the type + * @param {string} [pre=this._yuievt.config.prefix] the prefix + * @since 3.3.0 + * @return {Array} an array containing: + * * the detach category, if supplied, + * * the prefixed event type, + * * whether or not this is an after listener, + * * the supplied event type + */ + parseType: function(type, pre) { + return _parseType(type, pre || this._yuievt.config.prefix); + }, + /** * Subscribe to a custom event hosted by this object - * @method on + * @method on * @param type {string} The type of the event * @param fn {Function} The callback + * @param context {object} optional execution context. + * @param arg* {mixed} 0..n additional arguments to supply to the subscriber * @return the event target or a detach handle per 'chain' config */ - on: function(type, fn, context, x) { + on: function(type, fn, context) { var parts = _parseType(type, this._yuievt.config.prefix), f, c, args, ret, ce, detachcategory, handle, store = Y.Env.evt.handles, after, adapt, shorttype, - Node = Y.Node, n, domevent; + Node = Y.Node, n, domevent, isArr; + + // full name, args, detachcategory, after + this._monitor('attach', parts[1], { + args: arguments, + category: parts[0], + after: parts[2] + }); if (L.isObject(type)) { @@ -1120,57 +1359,64 @@ ET.prototype = { return Y.Do.before.apply(Y.Do, arguments); } - f = fn; - c = context; - args = Y.Array(arguments, 0, true); - ret = {}; + f = fn; + c = context; + args = YArray(arguments, 0, true); + ret = []; + + if (L.isArray(type)) { + isArr = true; + } + after = type._after; delete type._after; Y.each(type, function(v, k) { - if (v) { - f = v.fn || ((Y.Lang.isFunction(v)) ? v : f); + if (L.isObject(v)) { + f = v.fn || ((L.isFunction(v)) ? v : f); c = v.context || c; } - args[0] = (after) ? AFTER_PREFIX + k : k; + var nv = (after) ? AFTER_PREFIX : ''; + + args[0] = nv + ((isArr) ? v : k); args[1] = f; args[2] = c; - ret[k] = this.on.apply(this, args); + ret.push(this.on.apply(this, args)); }, this); return (this._yuievt.chain) ? this : new Y.EventHandle(ret); } - + detachcategory = parts[0]; after = parts[2]; shorttype = parts[3]; // extra redirection so we catch adaptor events too. take a look at this. - if (Node && (this instanceof Node) && (shorttype in Node.DOM_EVENTS)) { - args = Y.Array(arguments, 0, true); + if (Node && Y.instanceOf(this, Node) && (shorttype in Node.DOM_EVENTS)) { + args = YArray(arguments, 0, true); args.splice(2, 0, Node.getDOMNode(this)); return Y.on.apply(Y, args); } type = parts[1]; - if (this instanceof YUI) { + if (Y.instanceOf(this, YUI)) { adapt = Y.Env.evt.plugins[type]; - args = Y.Array(arguments, 0, true); + args = YArray(arguments, 0, true); args[0] = shorttype; if (Node) { n = args[2]; - if (n instanceof Y.NodeList) { + if (Y.instanceOf(n, Y.NodeList)) { n = Y.NodeList.getDOMNodes(n); - } else if (n instanceof Node) { + } else if (Y.instanceOf(n, Node)) { n = Node.getDOMNode(n); } @@ -1189,11 +1435,11 @@ ET.prototype = { handle = Y.Event._attach(args); } - } + } if (!handle) { ce = this._yuievt.events[type] || this.publish(type); - handle = ce._on(fn, context, (arguments.length > 3) ? Y.Array(arguments, 3, true) : null, (after) ? 'after' : true); + handle = ce._on(fn, context, (arguments.length > 3) ? YArray(arguments, 3, true) : null, (after) ? 'after' : true); } if (detachcategory) { @@ -1217,8 +1463,8 @@ ET.prototype = { /** * Detach one or more listeners the from the specified event - * @method detach - * @param type {string|Object} Either the handle to the subscriber or the + * @method detach + * @param type {string|Object} Either the handle to the subscriber or the * type of event. If the type * is not specified, it will attempt to remove * the listener from all hosted events. @@ -1232,36 +1478,37 @@ ET.prototype = { * @return {EventTarget} the host */ detach: function(type, fn, context) { - var evts = this._yuievt.events, i, ret, - Node = Y.Node, isNode = (this instanceof Node); + var evts = this._yuievt.events, i, + Node = Y.Node, isNode = Node && (Y.instanceOf(this, Node)); // detachAll disabled on the Y instance. if (!type && (this !== Y)) { for (i in evts) { if (evts.hasOwnProperty(i)) { - ret = evts[i].detach(fn, context); + evts[i].detach(fn, context); } } if (isNode) { - Y.Event.purgeElement(Node.getDOMNode(this)); } - return ret; + return this; } - var parts = _parseType(type, this._yuievt.config.prefix), + var parts = _parseType(type, this._yuievt.config.prefix), detachcategory = L.isArray(parts) ? parts[0] : null, shorttype = (parts) ? parts[3] : null, - handle, adapt, store = Y.Env.evt.handles, cat, args, + adapt, store = Y.Env.evt.handles, detachhost, cat, args, ce, - keyDetacher = function(lcat, ltype) { - var handles = lcat[ltype]; + keyDetacher = function(lcat, ltype, host) { + var handles = lcat[ltype], ce, i; if (handles) { - while (handles.length) { - handle = handles.pop(); - handle.detach(); + for (i = handles.length - 1; i >= 0; --i) { + ce = handles[i].evt; + if (ce.host === host || ce.el === host) { + handles[i].detach(); + } } } }; @@ -1270,53 +1517,58 @@ ET.prototype = { cat = store[detachcategory]; type = parts[1]; + detachhost = (isNode) ? Y.Node.getDOMNode(this) : this; if (cat) { if (type) { - keyDetacher(cat, type); + keyDetacher(cat, type, detachhost); } else { for (i in cat) { if (cat.hasOwnProperty(i)) { - keyDetacher(cat, i); + keyDetacher(cat, i, detachhost); } } } - return (this._yuievt.chain) ? this : true; + return this; } // If this is an event handle, use it to detach } else if (L.isObject(type) && type.detach) { - ret = type.detach(); - return (this._yuievt.chain) ? this : ret; + type.detach(); + return this; // extra redirection so we catch adaptor events too. take a look at this. } else if (isNode && ((!shorttype) || (shorttype in Node.DOM_EVENTS))) { - args = Y.Array(arguments, 0, true); + args = YArray(arguments, 0, true); args[2] = Node.getDOMNode(this); - return Y.detach.apply(Y, args); + Y.detach.apply(Y, args); + return this; } adapt = Y.Env.evt.plugins[shorttype]; // The YUI instance handles DOM events and adaptors - if (this instanceof YUI) { - args = Y.Array(arguments, 0, true); + if (Y.instanceOf(this, YUI)) { + args = YArray(arguments, 0, true); // use the adaptor specific detach code if if (adapt && adapt.detach) { - return adapt.detach.apply(Y, args); + adapt.detach.apply(Y, args); + return this; // DOM event fork } else if (!type || (!adapt && Node && (type in Node.DOM_EVENTS))) { args[0] = type; - return Y.Event.detach.apply(Y.Event, args); + Y.Event.detach.apply(Y.Event, args); + return this; } } - ce = evts[type]; + // ce = evts[type]; + ce = evts[parts[1]]; if (ce) { - ret = ce.detach(fn, context); + ce.detach(fn, context); } - return (this._yuievt.chain) ? this : ret; + return this; }, /** @@ -1327,7 +1579,7 @@ ET.prototype = { unsubscribe: function() { return this.detach.apply(this, arguments); }, - + /** * Removes all listeners from the specified event. If the event type * is not specified, all listeners from all hosted custom events will @@ -1354,7 +1606,7 @@ ET.prototype = { /** * Creates a new custom event of the specified type. If a custom event * by that name already exists, it will not be re-created. In either - * case the custom event is returned. + * case the custom event is returned. * * @method publish * @@ -1367,6 +1619,7 @@ ET.prototype = { * *
        • * 'bubbles': whether or not this event bubbles (true) + * Events can only bubble if emitFacade is true. *
        • *
        • * 'context': the default execution context for the listeners (this) @@ -1378,13 +1631,17 @@ ET.prototype = { * 'emitFacade': whether or not this event emits a facade (false) *
        • *
        • - * 'prefix': the prefix for this targets events, e.g., 'menu' in 'menu:click' + * 'prefix': the prefix for this targets events, e.g., 'menu' in 'menu:click' *
        • *
        • * 'fireOnce': if an event is configured to fire once, new subscribers after * the fire will be notified immediately. *
        • *
        • + * 'async': fireOnce event listeners will fire synchronously if the event has already + * fired unless async is true. + *
        • + *
        • * 'preventable': whether or not preventDefault() has an effect (true) *
        • *
        • @@ -1399,30 +1656,40 @@ ET.prototype = { *
        • * 'stoppedFn': a function that is executed when stopPropagation is called *
        • + * + *
        • + * 'monitored': specifies whether or not this event should send notifications about + * when the event has been attached, detached, or published. + *
        • *
        • * 'type': the event type (valid option if not provided as the first parameter to publish) *
        • *
        * - * @return {Event.Custom} the custom event + * @return {CustomEvent} the custom event * */ publish: function(type, opts) { - var events, ce, ret, pre = this._yuievt.config.prefix; + var events, ce, ret, defaults, + edata = this._yuievt, + pre = edata.config.prefix; type = (pre) ? _getType(type, pre) : type; + this._monitor('publish', type, { + args: arguments + }); if (L.isObject(type)) { ret = {}; Y.each(type, function(v, k) { - ret[k] = this.publish(k, v || opts); + ret[k] = this.publish(k, v || opts); }, this); return ret; } - events = this._yuievt.events; + events = edata.events; ce = events[type]; if (ce) { @@ -1431,8 +1698,12 @@ ET.prototype = { ce.applyConfig(opts, true); } } else { + + defaults = edata.defaults; + // apply defaults - ce = new Y.CustomEvent(type, (opts) ? Y.mix(opts, this._yuievt.defaults) : this._yuievt.defaults); + ce = new Y.CustomEvent(type, + (opts) ? Y.merge(defaults, opts) : defaults); events[type] = ce; } @@ -1446,84 +1717,107 @@ ET.prototype = { }, /** - * Registers another EventTarget as a bubble target. Bubble order - * is determined by the order registered. Multiple targets can - * be specified. - * @method addTarget - * @param o {EventTarget} the target to add - */ - addTarget: function(o) { - this._yuievt.targets[Y.stamp(o)] = o; - this._yuievt.hasTargets = true; - }, - - /** - * Removes a bubble target - * @method removeTarget - * @param o {EventTarget} the target to remove + * This is the entry point for the event monitoring system. + * You can monitor 'attach', 'detach', 'fire', and 'publish'. + * When configured, these events generate an event. click -> + * click_attach, click_detach, click_publish -- these can + * be subscribed to like other events to monitor the event + * system. Inividual published events can have monitoring + * turned on or off (publish can't be turned off before it + * it published) by setting the events 'monitor' config. + * + * @private */ - removeTarget: function(o) { - delete this._yuievt.targets[Y.stamp(o)]; + _monitor: function(what, type, o) { + var monitorevt, ce = this.getEvent(type); + if ((this._yuievt.config.monitored && (!ce || ce.monitored)) || (ce && ce.monitored)) { + monitorevt = type + '_' + what; + o.monitored = what; + this.fire.call(this, monitorevt, o); + } }, /** * Fire a custom event by name. The callback functions will be executed - * from the context specified when the event was created, and with the + * from the context specified when the event was created, and with the * following parameters. * - * If the custom event object hasn't been created, then the event hasn't - * been published and it has no subscribers. For performance sake, we - * immediate exit in this case. This means the event won't bubble, so - * if the intention is that a bubble target be notified, the event must + * If the custom event object hasn't been created, then the event hasn't + * been published and it has no subscribers. For performance sake, we + * immediate exit in this case. This means the event won't bubble, so + * if the intention is that a bubble target be notified, the event must * be published on this object first. * * The first argument is the event type, and any additional arguments are * passed to the listeners as parameters. If the first of these is an * object literal, and the event is configured to emit an event facade, - * that object is mixed into the event facade and the facade is provided + * that object is mixed into the event facade and the facade is provided * in place of the original object. * * @method fire * @param type {String|Object} The type of the event, or an object that contains * a 'type' property. - * @param arguments {Object*} an arbitrary set of parameters to pass to + * @param arguments {Object*} an arbitrary set of parameters to pass to * the handler. If the first of these is an object literal and the event is * configured to emit an event facade, the event facade will replace that * parameter after the properties the object literal contains are copied to * the event facade. - * @return {Event.Target} the event host - * + * @return {EventTarget} the event host + * */ fire: function(type) { var typeIncluded = L.isString(type), t = (typeIncluded) ? type : (type && type.type), - ce, a, ret, pre=this._yuievt.config.prefix; + ce, ret, pre = this._yuievt.config.prefix, ce2, + args = (typeIncluded) ? YArray(arguments, 1, true) : arguments; t = (pre) ? _getType(t, pre) : t; + + this._monitor('fire', t, { + args: args + }); + ce = this.getEvent(t, true); + ce2 = this.getSibling(t, ce); + + if (ce2 && !ce) { + ce = this.publish(t); + } // this event has not been published or subscribed to if (!ce) { - if (this._yuievt.hasTargets) { - a = (typeIncluded) ? arguments : Y.Array(arguments, 0, true).unshift(t); - return this.bubble(null, a, this); + return this.bubble({ type: t }, args, this); } // otherwise there is nothing to be done ret = true; - } else { + ce.sibling = ce2; + ret = ce.fire.apply(ce, args); + } - a = Y.Array(arguments, (typeIncluded) ? 1 : 0, true); - ret = ce.fire.apply(ce, a); + return (this._yuievt.chain) ? this : ret; + }, - // clear target for next fire() - ce.target = null; + getSibling: function(type, ce) { + var ce2; + // delegate to *:type events if there are subscribers + if (type.indexOf(PREFIX_DELIMITER) > -1) { + type = _wildType(type); + // console.log(type); + ce2 = this.getEvent(type, true); + if (ce2) { + // console.log("GOT ONE: " + type); + ce2.applyConfig(ce); + ce2.bubbles = false; + ce2.broadcast = 0; + // ret = ce2.fire.apply(ce2, a); + } } - return (this._yuievt.chain) ? this : ret; + return ce2; }, /** @@ -1532,7 +1826,7 @@ ET.prototype = { * @method getEvent * @param type {string} the type, or name of the event * @param prefixed {string} if true, the type is prefixed already - * @return {Event.Custom} the custom event or null + * @return {CustomEvent} the custom event or null */ getEvent: function(type, prefixed) { var pre, e; @@ -1541,7 +1835,7 @@ ET.prototype = { type = (pre) ? _getType(type, pre) : type; } e = this._yuievt.events; - return (e && type in e) ? e[type] : null; + return e[type] || null; }, /** @@ -1552,15 +1846,22 @@ ET.prototype = { * @method after * @param type {string} The type of the event * @param fn {Function} The callback + * @param context {object} optional execution context. + * @param arg* {mixed} 0..n additional arguments to supply to the subscriber * @return the event target or a detach handle per 'chain' config */ after: function(type, fn) { - var a = Y.Array(arguments, 0, true); + var a = YArray(arguments, 0, true); switch (L.type(type)) { case 'function': return Y.Do.after.apply(Y.Do, arguments); + case 'array': + // YArray.each(a[0], function(v) { + // v = AFTER_PREFIX + v; + // }); + // break; case 'object': a[0]._after = true; break; @@ -1580,15 +1881,14 @@ ET.prototype = { * * For DOM and custom events: * type, callback, context, 0-n arguments - * + * * For methods: * callback, object (method host), methodName, context, 0-n arguments * * @method before * @return detach handle - * @deprecated use the on method */ - before: function() { + before: function() { return this.on.apply(this, arguments); } @@ -1597,8 +1897,8 @@ ET.prototype = { Y.EventTarget = ET; // make Y an event target -Y.mix(Y, ET.prototype, false, false, { - bubbles: false +Y.mix(Y, ET.prototype, false, false, { + bubbles: false }); ET.call(Y); @@ -1617,12 +1917,9 @@ Y.Global = YUI.Env.globalEvents; // @TODO implement a global namespace function on Y.Global? -})(); - - /** * YUI's on method is a unified interface for subscribing to - * most events exposed by YUI. This includes custom events, DOM events, and + * most events exposed by YUI. This includes custom events, DOM events, and * function events. detach is also provided to remove listeners * serviced by this function. * @@ -1641,12 +1938,12 @@ Y.Global = YUI.Env.globalEvents; *
      • An optional context object
      • *
      • 0..n additional arguments to supply the callback.
      • * - * Example: - * Y.on('domready', function() { // start work }); + * Example: + * Y.on('drag:drophit', function() { // start work }); * *
      • DOM events. These are moments reported by the browser related * to browser functionality and user interaction. - * This type of event is delegated to Event's + * This type of event is delegated to Event's * attach method. *
          *
        • The type of the event
        • @@ -1657,11 +1954,11 @@ Y.Global = YUI.Env.globalEvents; *
        • An optional context object
        • *
        • 0..n additional arguments to supply the callback.
        • *
        - * Example: + * Example: * Y.on('click', function(e) { // something was clicked }, '#someelement'); *
      • *
      • Function events. These events can be used to react before or after a - * function is executed. This type of event is delegated to Event.Do's + * function is executed. This type of event is delegated to Event.Do's * before method. *
          *
        • The callback to execute
        • @@ -1679,39 +1976,38 @@ Y.Global = YUI.Env.globalEvents; * execute after the event's default behavior. before is an * alias for on. * - * @method on - * @param type** event type (this parameter does not apply for function events) + * @method on + * @param type event type (this parameter does not apply for function events) * @param fn the callback - * @param target** a descriptor for the target (applies to custom events only). - * For function events, this is the object that contains the function to - * execute. - * @param extra** 0..n Extra information a particular event may need. These - * will be documented with the event. In the case of function events, this - * is the name of the function to execute on the host. In the case of - * delegate listeners, this is the event delegation specification. * @param context optionally change the value of 'this' in the callback * @param args* 0..n additional arguments to pass to the callback. * @return the event target or a detach handle per 'chain' config * @for YUI */ + /** + * Listen for an event one time. Equivalent to on, except that + * the listener is immediately detached when executed. + * @see on + * @method once + * @param type event type (this parameter does not apply for function events) + * @param fn the callback + * @param context optionally change the value of 'this' in the callback + * @param args* 0..n additional arguments to pass to the callback. + * @return the event target or a detach handle per 'chain' config + * @for YUI + */ + /** * after() is a unified interface for subscribing to * most events exposed by YUI. This includes custom events, * DOM events, and AOP events. This works the same way as * the on() function, only it operates after any default - * behavior for the event has executed. @see on for more + * behavior for the event has executed. @see on for more * information. * @method after * @param type event type (this parameter does not apply for function events) * @param fn the callback - * @param target a descriptor for the target (applies to custom events only). - * For function events, this is the object that contains the function to - * execute. - * @param extra 0..n Extra information a particular event may need. These - * will be documented with the event. In the case of function events, this - * is the name of the function to execute on the host. In the case of - * delegate listeners, this is the event delegation specification. * @param context optionally change the value of 'this' in the callback * @param args* 0..n additional arguments to pass to the callback. * @return the event target or a detach handle per 'chain' config @@ -1719,7 +2015,7 @@ Y.Global = YUI.Env.globalEvents; */ -}, '3.0.0' ,{requires:['oop']}); +}, '3.3.0' ,{requires:['oop']}); YUI.add('event-custom-complex', function(Y) { @@ -1730,9 +2026,11 @@ YUI.add('event-custom-complex', function(Y) { * @submodule event-custom-complex */ -(function() { - -var FACADE, FACADE_KEYS, CEProto = Y.CustomEvent.prototype; +var FACADE, + FACADE_KEYS, + EMPTY = {}, + CEProto = Y.CustomEvent.prototype, + ETProto = Y.EventTarget.prototype; /** * Wraps and protects a custom event for use when emitFacade is set to true. @@ -1744,22 +2042,31 @@ var FACADE, FACADE_KEYS, CEProto = Y.CustomEvent.prototype; Y.EventFacade = function(e, currentTarget) { - e = e || {}; + e = e || EMPTY; + + this._event = e; /** - * The arguments passed to fire + * The arguments passed to fire * @property details * @type Array */ this.details = e.details; /** - * The event type + * The event type, this can be overridden by the fire() payload * @property type * @type string */ this.type = e.type; + /** + * The real event type + * @property type + * @type string + */ + this._type = e.type; + ////////////////////////////////////////////////////// /** @@ -1782,14 +2089,19 @@ Y.EventFacade = function(e, currentTarget) { * @type Node */ this.relatedTarget = e.relatedTarget; - + +}; + +Y.extend(Y.EventFacade, Object, { + /** * Stops the propagation to the next bubble target * @method stopPropagation */ - this.stopPropagation = function() { - e.stopPropagation(); - }; + stopPropagation: function() { + this._event.stopPropagation(); + this.stopped = 1; + }, /** * Stops the propagation to the next bubble target and @@ -1797,17 +2109,19 @@ Y.EventFacade = function(e, currentTarget) { * on the current target. * @method stopImmediatePropagation */ - this.stopImmediatePropagation = function() { - e.stopImmediatePropagation(); - }; + stopImmediatePropagation: function() { + this._event.stopImmediatePropagation(); + this.stopped = 2; + }, /** * Prevents the event's default behavior * @method preventDefault */ - this.preventDefault = function() { - e.preventDefault(); - }; + preventDefault: function() { + this._event.preventDefault(); + this.prevented = 1; + }, /** * Stops the event propagation and prevents the default @@ -1816,64 +2130,75 @@ Y.EventFacade = function(e, currentTarget) { * @param immediate {boolean} if true additional listeners * on the current target will not be executed */ - this.halt = function(immediate) { - e.halt(immediate); - }; + halt: function(immediate) { + this._event.halt(immediate); + this.prevented = 1; + this.stopped = (immediate) ? 2 : 1; + } -}; +}); CEProto.fireComplex = function(args) { - var es = Y.Env._eventstack, ef, q, queue, ce, ret, events; - if (es) { + var es, ef, q, queue, ce, ret, events, subs, postponed, + self = this, host = self.host || self, next, oldbubble; + + if (self.stack) { // queue this event if the current item in the queue bubbles - if (this.queuable && this.type != es.next.type) { - this.log('queue ' + this.type); - es.queue.push([this, args]); + if (self.queuable && self.type != self.stack.next.type) { + self.log('queue ' + self.type); + self.stack.queue.push([self, args]); return true; } - } else { - Y.Env._eventstack = { - // id of the first event in the stack - id: this.id, - next: this, - silent: this.silent, - stopped: 0, - prevented: 0, - queue: [] - }; - es = Y.Env._eventstack; } - this.stopped = 0; - this.prevented = 0; - this.target = this.target || this.host; + es = self.stack || { + // id of the first event in the stack + id: self.id, + next: self, + silent: self.silent, + stopped: 0, + prevented: 0, + bubbling: null, + type: self.type, + // defaultFnQueue: new Y.Queue(), + afterQueue: new Y.Queue(), + defaultTargetOnly: self.defaultTargetOnly, + queue: [] + }; + + subs = self.getSubs(); + + self.stopped = (self.type !== es.type) ? 0 : es.stopped; + self.prevented = (self.type !== es.type) ? 0 : es.prevented; + + self.target = self.target || host; events = new Y.EventTarget({ fireOnce: true, - context: this.host + context: host }); - this.events = events; + self.events = events; - if (this.preventedFn) { - events.on('prevented', this.preventedFn); + if (self.preventedFn) { + events.on('prevented', self.preventedFn); } - if (this.stoppedFn) { - events.on('stopped', this.stoppedFn); + if (self.stoppedFn) { + events.on('stopped', self.stoppedFn); } - this.currentTarget = this.host || this.currentTarget; + self.currentTarget = host; - this.details = args.slice(); // original arguments in the details + self.details = args.slice(); // original arguments in the details - // this.log("Firing " + this + ", " + "args: " + args); - this.log("Firing " + this.type); + // self.log("Firing " + self + ", " + "args: " + args); + self.log("Firing " + self.type); - this._facade = null; // kill facade to eliminate stale properties + self._facade = null; // kill facade to eliminate stale properties - ef = this._getFacade(args); + ef = self._getFacade(args); if (Y.Lang.isObject(args[0])) { args[0] = ef; @@ -1881,53 +2206,95 @@ CEProto.fireComplex = function(args) { args.unshift(ef); } - if (this.hasSubscribers) { - this._procSubs(Y.merge(this.subscribers), args, ef); + // if (subCount) { + if (subs[0]) { + // self._procSubs(Y.merge(self.subscribers), args, ef); + self._procSubs(subs[0], args, ef); } // bubble if this is hosted in an event target and propagation has not been stopped - if (this.bubbles && this.host && this.host.bubble && !this.stopped) { - es.stopped = 0; - es.prevented = 0; - ret = this.host.bubble(this); + if (self.bubbles && host.bubble && !self.stopped) { + + oldbubble = es.bubbling; + + // self.bubbling = true; + es.bubbling = self.type; + + // if (host !== ef.target || es.type != self.type) { + if (es.type != self.type) { + es.stopped = 0; + es.prevented = 0; + } + + ret = host.bubble(self, args, null, es); + + self.stopped = Math.max(self.stopped, es.stopped); + self.prevented = Math.max(self.prevented, es.prevented); - this.stopped = Math.max(this.stopped, es.stopped); - this.prevented = Math.max(this.prevented, es.prevented); + // self.bubbling = false; + es.bubbling = oldbubble; } - // execute the default behavior if not prevented - if (this.defaultFn && !this.prevented) { - this.defaultFn.apply(this.host || this, args); + if (self.defaultFn && + !self.prevented && + ((!self.defaultTargetOnly && !es.defaultTargetOnly) || host === ef.target)) { + + self.defaultFn.apply(host, args); } // broadcast listeners are fired as discreet events on the // YUI instance and potentially the YUI global. - this._broadcast(args); + self._broadcast(args); + + // Queue the after + if (subs[1] && !self.prevented && self.stopped < 2) { + if (es.id === self.id || self.type != host._yuievt.bubbling) { + self._procSubs(subs[1], args, ef); + while ((next = es.afterQueue.last())) { + next(); + } + } else { + postponed = subs[1]; + if (es.execDefaultCnt) { + postponed = Y.merge(postponed); + Y.each(postponed, function(s) { + s.postponed = true; + }); + } - // process after listeners. If the default behavior was - // prevented, the after events don't fire. - if (this.hasAfters && !this.prevented && this.stopped < 2) { - this._procSubs(Y.merge(this.afters), args, ef); + es.afterQueue.add(function() { + self._procSubs(postponed, args, ef); + }); + } } - if (es.id === this.id) { + self.target = null; + + if (es.id === self.id) { queue = es.queue; while (queue.length) { - q = queue.pop(); + q = queue.pop(); ce = q[0]; - es.stopped = 0; - es.prevented = 0; // set up stack to allow the next item to be processed es.next = ce; ce.fire.apply(ce, q[1]); } - Y.Env._eventstack = null; - } + self.stack = null; + } + + ret = !(self.stopped); + + if (self.type != host._yuievt.bubbling) { + es.stopped = 0; + es.prevented = 0; + self.stopped = 0; + self.prevented = 0; + } - return this.stopped ? false : true; + return ret; }; CEProto._getFacade = function() { @@ -1955,12 +2322,19 @@ CEProto._getFacade = function() { // restore ef Y.mix(ef, o2, true, FACADE_KEYS); + + // Allow the event type to be faked + // http://yuilibrary.com/projects/yui3/ticket/2528376 + ef.type = o.type || ef.type; } // update the details field with the arguments // ef.type = this.type; ef.details = this.details; - ef.target = this.target; + + // use the original target when the event bubbled to this target + ef.target = this.originalTarget || this.target; + ef.currentTarget = this.currentTarget; ef.stopped = 0; ef.prevented = 0; @@ -1977,7 +2351,9 @@ CEProto._getFacade = function() { */ CEProto.stopPropagation = function() { this.stopped = 1; - Y.Env._eventstack.stopped = 1; + if (this.stack) { + this.stack.stopped = 1; + } this.events.fire('stopped', this); }; @@ -1988,7 +2364,9 @@ CEProto.stopPropagation = function() { */ CEProto.stopImmediatePropagation = function() { this.stopped = 2; - Y.Env._eventstack.stopped = 2; + if (this.stack) { + this.stack.stopped = 2; + } this.events.fire('stopped', this); }; @@ -1999,7 +2377,9 @@ CEProto.stopImmediatePropagation = function() { CEProto.preventDefault = function() { if (this.preventable) { this.prevented = 1; - Y.Env._eventstack.prevented = 1; + if (this.stack) { + this.stack.prevented = 1; + } this.events.fire('prevented', this); } }; @@ -2020,48 +2400,108 @@ CEProto.halt = function(immediate) { this.preventDefault(); }; +/** + * Registers another EventTarget as a bubble target. Bubble order + * is determined by the order registered. Multiple targets can + * be specified. + * + * Events can only bubble if emitFacade is true. + * + * Included in the event-custom-complex submodule. + * + * @method addTarget + * @param o {EventTarget} the target to add + * @for EventTarget + */ +ETProto.addTarget = function(o) { + this._yuievt.targets[Y.stamp(o)] = o; + this._yuievt.hasTargets = true; +}; + +/** + * Returns an array of bubble targets for this object. + * @method getTargets + * @return EventTarget[] + */ +ETProto.getTargets = function() { + return Y.Object.values(this._yuievt.targets); +}; + +/** + * Removes a bubble target + * @method removeTarget + * @param o {EventTarget} the target to remove + * @for EventTarget + */ +ETProto.removeTarget = function(o) { + delete this._yuievt.targets[Y.stamp(o)]; +}; + /** * Propagate an event. Requires the event-custom-complex module. * @method bubble - * @param evt {Event.Custom} the custom event to propagate + * @param evt {CustomEvent} the custom event to propagate * @return {boolean} the aggregated return value from Event.Custom.fire * @for EventTarget */ -Y.EventTarget.prototype.bubble = function(evt, args, target) { +ETProto.bubble = function(evt, args, target, es) { var targs = this._yuievt.targets, ret = true, - t, type, ce, i, bc; + t, type = evt && evt.type, ce, i, bc, ce2, + originalTarget = target || (evt && evt.target) || this, + oldbubble; if (!evt || ((!evt.stopped) && targs)) { for (i in targs) { if (targs.hasOwnProperty(i)) { - t = targs[i]; - type = evt && evt.type; - ce = t.getEvent(type, true); - + t = targs[i]; + ce = t.getEvent(type, true); + ce2 = t.getSibling(type, ce); + + if (ce2 && !ce) { + ce = t.publish(type); + } + + oldbubble = t._yuievt.bubbling; + t._yuievt.bubbling = type; + // if this event was not published on the bubble target, - // publish it with sensible default properties + // continue propagating the event. if (!ce) { - if (t._yuievt.hasTargets) { - t.bubble.call(t, evt, args, target); + t.bubble(evt, args, originalTarget, es); } - } else { - ce.target = target || (evt && evt.target) || this; - ce.currentTarget = t; + ce.sibling = ce2; + + // set the original target to that the target payload on the + // facade is correct. + ce.target = originalTarget; + ce.originalTarget = originalTarget; + ce.currentTarget = t; bc = ce.broadcast; ce.broadcast = false; - ret = ret && ce.fire.apply(ce, args || evt.details); + + // default publish may not have emitFacade true -- that + // shouldn't be what the implementer meant to do + ce.emitFacade = true; + + ce.stack = es; + + ret = ret && ce.fire.apply(ce, args || evt.details || []); ce.broadcast = bc; + ce.originalTarget = null; + // stopPropagation() was called if (ce.stopped) { break; } } + + t._yuievt.bubbling = oldbubble; } } } @@ -2072,11 +2512,10 @@ Y.EventTarget.prototype.bubble = function(evt, args, target) { FACADE = new Y.EventFacade(); FACADE_KEYS = Y.Object.keys(FACADE); -})(); -}, '3.0.0' ,{requires:['event-custom-base']}); +}, '3.3.0' ,{requires:['event-custom-base']}); -YUI.add('event-custom', function(Y){}, '3.0.0' ,{use:['event-custom-base', 'event-custom-complex']}); +YUI.add('event-custom', function(Y){}, '3.3.0' ,{use:['event-custom-base', 'event-custom-complex']}); diff --git a/jssource/src_files/include/javascript/yui3/build/event-gestures/event-flick-min.js b/jssource/src_files/include/javascript/yui3/build/event-gestures/event-flick-min.js new file mode 100644 index 00000000..1a5899a2 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/event-gestures/event-flick-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("event-flick",function(c){var g=("ontouchstart" in c.config.win&&!c.UA.chrome)?{start:"touchstart",end:"touchend"}:{start:"mousedown",end:"mouseup"},h="start",k="end",b="ownerDocument",i="minVelocity",e="minDistance",a="preventDefault",d="_fs",f="_fsh",l="_feh",j="nodeType";c.Event.define("flick",{on:function(n,m,p){var o=n.on(g[h],this._onStart,this,n,m,p);m[f]=o;},detach:function(o,n,q){var p=n[f],m=n[l];if(p){p.detach();n[f]=null;}if(m){m.detach();n[l]=null;}},processArgs:function(m){var n=(m.length>3)?c.merge(m.splice(3,1)[0]):{};if(!(i in n)){n[i]=this.MIN_VELOCITY;}if(!(e in n)){n[e]=this.MIN_DISTANCE;}if(!(a in n)){n[a]=this.PREVENT_DEFAULT;}return n;},_onStart:function(q,o,u,n){var m=true,t,s,r=u._extra.preventDefault,p=q;if(q.touches){m=(q.touches.length===1);q=q.touches[0];}if(m){if(r){if(!r.call||r(q)){p.preventDefault();}}q.flick={time:new Date().getTime()};u[d]=q;t=u[l];if(!t){s=(o.get(j)===9)?o:o.get(b);t=s.on(g[k],c.bind(this._onEnd,this),null,o,u,n);u[l]=t;}}},_onEnd:function(z,t,A,q){var x=new Date().getTime(),o=A[d],m=!!o,B=z,p,s,y,v,w,n,u,r;if(m){if(z.changedTouches){if(z.changedTouches.length===1&&z.touches.length===0){B=z.changedTouches[0];}else{m=false;}}if(m){v=A._extra;y=v[a];if(y){if(!y.call||y(z)){B.preventDefault();}}p=o.flick.time;x=new Date().getTime();s=x-p;w=[B.pageX-o.pageX,B.pageY-o.pageY];if(v.axis){r=v.axis;}else{r=(Math.abs(w[0])>=Math.abs(w[1]))?"x":"y";}n=w[(r==="x")?0:1];u=(s!==0)?n/s:0;if(isFinite(u)&&(Math.abs(n)>=v[e])&&(Math.abs(u)>=v[i])){z.type="flick";z.flick={time:s,distance:n,velocity:u,axis:r,start:o};q.fire(z);}A[d]=null;}}},MIN_VELOCITY:0,MIN_DISTANCE:0,PREVENT_DEFAULT:false});},"3.3.0",{requires:["node-base","event-touch","event-synthetic"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/event-gestures/event-flick.js b/jssource/src_files/include/javascript/yui3/build/event-gestures/event-flick.js new file mode 100644 index 00000000..6c302b12 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/event-gestures/event-flick.js @@ -0,0 +1,251 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('event-flick', function(Y) { + +/** + * The gestures module provides gesture events such as "flick", which normalize user interactions + * across touch and mouse or pointer based input devices. This layer can be used by application developers + * to build input device agnostic components which behave the same in response to either touch or mouse based + * interaction. + * + *

          Documentation for events added by this module can be found in the event document for the YUI global.

          + * + * @module event-gestures + */ + +/** + * Adds support for a "flick" event, which is fired at the end of a touch or mouse based flick gesture, and provides + * velocity of the flick, along with distance and time information. + * + * @module event-gestures + * @submodule event-flick + */ + +var EVENT = ("ontouchstart" in Y.config.win && !Y.UA.chrome) ? { + start: "touchstart", + end: "touchend" + } : { + start: "mousedown", + end: "mouseup" + }, + + START = "start", + END = "end", + + OWNER_DOCUMENT = "ownerDocument", + MIN_VELOCITY = "minVelocity", + MIN_DISTANCE = "minDistance", + PREVENT_DEFAULT = "preventDefault", + + _FLICK_START = "_fs", + _FLICK_START_HANDLE = "_fsh", + _FLICK_END_HANDLE = "_feh", + + NODE_TYPE = "nodeType"; + +/** + * Sets up a "flick" event, that is fired whenever the user initiates a flick gesture on the node + * where the listener is attached. The subscriber can specify a minimum distance or velocity for + * which the event is to be fired. The subscriber can also specify if there is a particular axis which + * they are interested in - "x" or "y". If no axis is specified, the axis along which there was most distance + * covered is used. + * + *

          It is recommended that you use Y.bind to set up context and additional arguments for your event handler, + * however if you want to pass the context and arguments as additional signature arguments to "on", + * you need to provide a null value for the configuration object, e.g: node.on("flick", fn, null, context, arg1, arg2, arg3)

          + * + * @event flick + * @for YUI + * @param type {string} "flick" + * @param fn {function} The method the event invokes. It receives an event facade with an e.flick object containing the flick related properties: e.flick.time, e.flick.distance, e.flick.velocity and e.flick.axis, e.flick.start. + * @param cfg {Object} Optional. An object which specifies any of the following: + *
          + *
          minDistance (in pixels, defaults to 10)
          + *
          The minimum distance between start and end points, which would qualify the gesture as a flick.
          + *
          minVelocity (in pixels/ms, defaults to 0)
          + *
          The minimum velocity which would qualify the gesture as a flick.
          + *
          preventDefault (defaults to false)
          + *
          Can be set to true/false to prevent default behavior as soon as the touchstart/touchend or mousedown/mouseup is received so that things like scrolling or text selection can be + * prevented. This property can also be set to a function, which returns true or false, based on the event facade passed to it.
          + *
          axis (no default)
          + *
          Can be set to "x" or "y" if you want to constrain the flick velocity and distance to a single axis. If not + * defined, the axis along which the maximum distance was covered is used.
          + *
          + * @return {EventHandle} the detach handle + */ + +Y.Event.define('flick', { + + on: function (node, subscriber, ce) { + + var startHandle = node.on(EVENT[START], + this._onStart, + this, + node, + subscriber, + ce); + + subscriber[_FLICK_START_HANDLE] = startHandle; + }, + + detach: function (node, subscriber, ce) { + + var startHandle = subscriber[_FLICK_START_HANDLE], + endHandle = subscriber[_FLICK_END_HANDLE]; + + if (startHandle) { + startHandle.detach(); + subscriber[_FLICK_START_HANDLE] = null; + } + + if (endHandle) { + endHandle.detach(); + subscriber[_FLICK_END_HANDLE] = null; + } + }, + + processArgs: function(args) { + var params = (args.length > 3) ? Y.merge(args.splice(3, 1)[0]) : {}; + + if (!(MIN_VELOCITY in params)) { + params[MIN_VELOCITY] = this.MIN_VELOCITY; + } + + if (!(MIN_DISTANCE in params)) { + params[MIN_DISTANCE] = this.MIN_DISTANCE; + } + + if (!(PREVENT_DEFAULT in params)) { + params[PREVENT_DEFAULT] = this.PREVENT_DEFAULT; + } + + return params; + }, + + _onStart: function(e, node, subscriber, ce) { + + var start = true, // always true for mouse + endHandle, + doc, + preventDefault = subscriber._extra.preventDefault, + origE = e; + + if (e.touches) { + start = (e.touches.length === 1); + e = e.touches[0]; + } + + if (start) { + + if (preventDefault) { + // preventDefault is a boolean or function + if (!preventDefault.call || preventDefault(e)) { + origE.preventDefault(); + } + } + + e.flick = { + time : new Date().getTime() + }; + + subscriber[_FLICK_START] = e; + + endHandle = subscriber[_FLICK_END_HANDLE]; + + if (!endHandle) { + doc = (node.get(NODE_TYPE) === 9) ? node : node.get(OWNER_DOCUMENT); + + endHandle = doc.on(EVENT[END], Y.bind(this._onEnd, this), null, node, subscriber, ce); + subscriber[_FLICK_END_HANDLE] = endHandle; + } + } + }, + + _onEnd: function(e, node, subscriber, ce) { + + var endTime = new Date().getTime(), + start = subscriber[_FLICK_START], + valid = !!start, + endEvent = e, + startTime, + time, + preventDefault, + params, + xyDistance, + distance, + velocity, + axis; + + if (valid) { + + if (e.changedTouches) { + if (e.changedTouches.length === 1 && e.touches.length === 0) { + endEvent = e.changedTouches[0]; + } else { + valid = false; + } + } + + if (valid) { + + params = subscriber._extra; + preventDefault = params[PREVENT_DEFAULT]; + + if (preventDefault) { + // preventDefault is a boolean or function + if (!preventDefault.call || preventDefault(e)) { + endEvent.preventDefault(); + } + } + + startTime = start.flick.time; + endTime = new Date().getTime(); + time = endTime - startTime; + + + xyDistance = [ + endEvent.pageX - start.pageX, + endEvent.pageY - start.pageY + ]; + + if (params.axis) { + axis = params.axis; + } else { + axis = (Math.abs(xyDistance[0]) >= Math.abs(xyDistance[1])) ? 'x' : 'y'; + } + + distance = xyDistance[(axis === 'x') ? 0 : 1]; + velocity = (time !== 0) ? distance/time : 0; + + if (isFinite(velocity) && (Math.abs(distance) >= params[MIN_DISTANCE]) && (Math.abs(velocity) >= params[MIN_VELOCITY])) { + + e.type = "flick"; + e.flick = { + time:time, + distance: distance, + velocity:velocity, + axis: axis, + start : start + }; + + ce.fire(e); + + } + + subscriber[_FLICK_START] = null; + } + } + }, + + MIN_VELOCITY : 0, + MIN_DISTANCE : 0, + PREVENT_DEFAULT : false +}); + + +}, '3.3.0' ,{requires:['node-base','event-touch','event-synthetic']}); diff --git a/jssource/src_files/include/javascript/yui3/build/event-gestures/event-gestures-min.js b/jssource/src_files/include/javascript/yui3/build/event-gestures/event-gestures-min.js new file mode 100644 index 00000000..9a471546 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/event-gestures/event-gestures-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("event-flick",function(c){var g=("ontouchstart" in c.config.win&&!c.UA.chrome)?{start:"touchstart",end:"touchend"}:{start:"mousedown",end:"mouseup"},h="start",k="end",b="ownerDocument",i="minVelocity",e="minDistance",a="preventDefault",d="_fs",f="_fsh",l="_feh",j="nodeType";c.Event.define("flick",{on:function(n,m,p){var o=n.on(g[h],this._onStart,this,n,m,p);m[f]=o;},detach:function(o,n,q){var p=n[f],m=n[l];if(p){p.detach();n[f]=null;}if(m){m.detach();n[l]=null;}},processArgs:function(m){var n=(m.length>3)?c.merge(m.splice(3,1)[0]):{};if(!(i in n)){n[i]=this.MIN_VELOCITY;}if(!(e in n)){n[e]=this.MIN_DISTANCE;}if(!(a in n)){n[a]=this.PREVENT_DEFAULT;}return n;},_onStart:function(q,o,u,n){var m=true,t,s,r=u._extra.preventDefault,p=q;if(q.touches){m=(q.touches.length===1);q=q.touches[0];}if(m){if(r){if(!r.call||r(q)){p.preventDefault();}}q.flick={time:new Date().getTime()};u[d]=q;t=u[l];if(!t){s=(o.get(j)===9)?o:o.get(b);t=s.on(g[k],c.bind(this._onEnd,this),null,o,u,n);u[l]=t;}}},_onEnd:function(z,t,A,q){var x=new Date().getTime(),o=A[d],m=!!o,B=z,p,s,y,v,w,n,u,r;if(m){if(z.changedTouches){if(z.changedTouches.length===1&&z.touches.length===0){B=z.changedTouches[0];}else{m=false;}}if(m){v=A._extra;y=v[a];if(y){if(!y.call||y(z)){B.preventDefault();}}p=o.flick.time;x=new Date().getTime();s=x-p;w=[B.pageX-o.pageX,B.pageY-o.pageY];if(v.axis){r=v.axis;}else{r=(Math.abs(w[0])>=Math.abs(w[1]))?"x":"y";}n=w[(r==="x")?0:1];u=(s!==0)?n/s:0;if(isFinite(u)&&(Math.abs(n)>=v[e])&&(Math.abs(u)>=v[i])){z.type="flick";z.flick={time:s,distance:n,velocity:u,axis:r,start:o};q.fire(z);}A[d]=null;}}},MIN_VELOCITY:0,MIN_DISTANCE:0,PREVENT_DEFAULT:false});},"3.3.0",{requires:["node-base","event-touch","event-synthetic"]});YUI.add("event-move",function(e){var j=("ontouchstart" in e.config.win&&!e.UA.chrome)?{start:"touchstart",move:"touchmove",end:"touchend"}:{start:"mousedown",move:"mousemove",end:"mouseup"},x="start",C="move",h="end",l="gesture"+C,a=l+h,i=l+x,B="_msh",m="_mh",w="_meh",r="_dmsh",o="_dmh",c="_dmeh",g="_ms",s="_m",z="minTime",t="minDistance",u="preventDefault",b="button",v="ownerDocument",n="currentTarget",p="target",q="nodeType",k=function(H,F,G){var D=(G)?4:3,E=(F.length>D)?e.merge(F.splice(D,1)[0]):{};if(!(u in E)){E[u]=H.PREVENT_DEFAULT;}return E;},f=function(E,D){return D._extra.root||(E.get(q)===9)?E:E.get(v);},y=function(D,F,E){D.pageX=F.pageX;D.pageY=F.pageY;D.screenX=F.screenX;D.screenY=F.screenY;D.clientX=F.clientX;D.clientY=F.clientY;D[p]=D[p]||F[p];D[n]=D[n]||F[n];D[b]=(E&&E[b])||1;},A=function(E,D){if(D){if(!D.call||D(E)){E.preventDefault();}}},d=e.Event.define;d(i,{on:function(E,D,F){D[B]=E.on(j[x],this._onStart,this,E,D,F);},delegate:function(F,E,H,D){var G=this;E[r]=F.delegate(j[x],function(I){G._onStart(I,F,E,H,true);},D);},detachDelegate:function(F,E,H,D){var G=E[r];if(G){G.detach();E[r]=null;}},detach:function(E,D,G){var F=D[B];if(F){F.detach();D[B]=null;}},processArgs:function(D,E){var F=k(this,D,E);if(!(z in F)){F[z]=this.MIN_TIME;}if(!(t in F)){F[t]=this.MIN_DISTANCE;}return F;},_onStart:function(J,E,P,D,L){if(L){E=J[n];}var F=P._extra,O=true,G=F[z],N=F[t],H=F.button,I=F[u],M=f(E,P),K;if(J.touches){if(J.touches.length===1){y(J,J.touches[0],F);}else{O=false;}}else{O=(H===undefined)||(H===J.button);}if(O){A(J,I);if(G===0||N===0){this._start(J,E,D,F);}else{K=[J.pageX,J.pageY];if(G>0){F._ht=e.later(G,this,this._start,[J,E,D,F]);F._hme=M.on(j[h],e.bind(function(){this._cancel(F);},this));}if(N>0){F._hm=M.on(j[C],e.bind(function(Q){if(Math.abs(Q.pageX-K[0])>N||Math.abs(Q.pageY-K[1])>N){this._start(J,E,D,F);}},this));}}}},_cancel:function(D){if(D._ht){D._ht.cancel();D._ht=null;}if(D._hme){D._hme.detach();D._hme=null;}if(D._hm){D._hm.detach();D._hm=null;}},_start:function(F,D,E,G){if(G){this._cancel(G);}F.type=i;D.setData(g,F);E.fire(F);},MIN_TIME:0,MIN_DISTANCE:0,PREVENT_DEFAULT:false});d(l,{on:function(F,E,H){var D=f(F,E),G=D.on(j[C],this._onMove,this,F,E,H);E[m]=G;},delegate:function(F,E,H,D){var G=this;E[o]=F.delegate(j[C],function(I){G._onMove(I,F,E,H,true);},D);},detach:function(E,D,G){var F=D[m];if(F){F.detach();D[m]=null;}},detachDelegate:function(F,E,H,D){var G=E[o];if(G){G.detach();E[o]=null;}},processArgs:function(D,E){return k(this,D,E);},_onMove:function(J,H,G,I,F){if(F){H=J[n];}var D=G._extra.standAlone||H.getData(g),E=G._extra.preventDefault;if(D){if(J.touches){if(J.touches.length===1){y(J,J.touches[0]);}else{D=false;}}if(D){A(J,E);J.type=l;I.fire(J);}}},PREVENT_DEFAULT:false});d(a,{on:function(G,F,H){var E=f(G,F),D=E.on(j[h],this._onEnd,this,G,F,H);F[w]=D;},delegate:function(F,E,H,D){var G=this;E[c]=F.delegate(j[h],function(I){G._onEnd(I,F,E,H,true);},D);},detachDelegate:function(F,E,H,D){var G=E[c];if(G){G.detach();E[c]=null;}},detach:function(F,E,G){var D=E[w];if(D){D.detach();E[w]=null;}},processArgs:function(D,E){return k(this,D,E);},_onEnd:function(J,H,F,I,E){if(E){H=J[n];}var G=F._extra.standAlone||H.getData(s)||H.getData(g),D=F._extra.preventDefault;if(G){if(J.changedTouches){if(J.changedTouches.length===1){y(J,J.changedTouches[0]);}else{G=false;}}if(G){A(J,D);J.type=a;I.fire(J);H.clearData(g);H.clearData(s);}}},PREVENT_DEFAULT:false});},"3.3.0",{requires:["node-base","event-touch","event-synthetic"]});YUI.add("event-gestures",function(a){},"3.3.0",{use:["event-flick","event-move"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/event-gestures/event-gestures.js b/jssource/src_files/include/javascript/yui3/build/event-gestures/event-gestures.js new file mode 100644 index 00000000..0b350eb1 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/event-gestures/event-gestures.js @@ -0,0 +1,762 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('event-flick', function(Y) { + +/** + * The gestures module provides gesture events such as "flick", which normalize user interactions + * across touch and mouse or pointer based input devices. This layer can be used by application developers + * to build input device agnostic components which behave the same in response to either touch or mouse based + * interaction. + * + *

          Documentation for events added by this module can be found in the event document for the YUI global.

          + * + * @module event-gestures + */ + +/** + * Adds support for a "flick" event, which is fired at the end of a touch or mouse based flick gesture, and provides + * velocity of the flick, along with distance and time information. + * + * @module event-gestures + * @submodule event-flick + */ + +var EVENT = ("ontouchstart" in Y.config.win && !Y.UA.chrome) ? { + start: "touchstart", + end: "touchend" + } : { + start: "mousedown", + end: "mouseup" + }, + + START = "start", + END = "end", + + OWNER_DOCUMENT = "ownerDocument", + MIN_VELOCITY = "minVelocity", + MIN_DISTANCE = "minDistance", + PREVENT_DEFAULT = "preventDefault", + + _FLICK_START = "_fs", + _FLICK_START_HANDLE = "_fsh", + _FLICK_END_HANDLE = "_feh", + + NODE_TYPE = "nodeType"; + +/** + * Sets up a "flick" event, that is fired whenever the user initiates a flick gesture on the node + * where the listener is attached. The subscriber can specify a minimum distance or velocity for + * which the event is to be fired. The subscriber can also specify if there is a particular axis which + * they are interested in - "x" or "y". If no axis is specified, the axis along which there was most distance + * covered is used. + * + *

          It is recommended that you use Y.bind to set up context and additional arguments for your event handler, + * however if you want to pass the context and arguments as additional signature arguments to "on", + * you need to provide a null value for the configuration object, e.g: node.on("flick", fn, null, context, arg1, arg2, arg3)

          + * + * @event flick + * @for YUI + * @param type {string} "flick" + * @param fn {function} The method the event invokes. It receives an event facade with an e.flick object containing the flick related properties: e.flick.time, e.flick.distance, e.flick.velocity and e.flick.axis, e.flick.start. + * @param cfg {Object} Optional. An object which specifies any of the following: + *
          + *
          minDistance (in pixels, defaults to 10)
          + *
          The minimum distance between start and end points, which would qualify the gesture as a flick.
          + *
          minVelocity (in pixels/ms, defaults to 0)
          + *
          The minimum velocity which would qualify the gesture as a flick.
          + *
          preventDefault (defaults to false)
          + *
          Can be set to true/false to prevent default behavior as soon as the touchstart/touchend or mousedown/mouseup is received so that things like scrolling or text selection can be + * prevented. This property can also be set to a function, which returns true or false, based on the event facade passed to it.
          + *
          axis (no default)
          + *
          Can be set to "x" or "y" if you want to constrain the flick velocity and distance to a single axis. If not + * defined, the axis along which the maximum distance was covered is used.
          + *
          + * @return {EventHandle} the detach handle + */ + +Y.Event.define('flick', { + + on: function (node, subscriber, ce) { + + var startHandle = node.on(EVENT[START], + this._onStart, + this, + node, + subscriber, + ce); + + subscriber[_FLICK_START_HANDLE] = startHandle; + }, + + detach: function (node, subscriber, ce) { + + var startHandle = subscriber[_FLICK_START_HANDLE], + endHandle = subscriber[_FLICK_END_HANDLE]; + + if (startHandle) { + startHandle.detach(); + subscriber[_FLICK_START_HANDLE] = null; + } + + if (endHandle) { + endHandle.detach(); + subscriber[_FLICK_END_HANDLE] = null; + } + }, + + processArgs: function(args) { + var params = (args.length > 3) ? Y.merge(args.splice(3, 1)[0]) : {}; + + if (!(MIN_VELOCITY in params)) { + params[MIN_VELOCITY] = this.MIN_VELOCITY; + } + + if (!(MIN_DISTANCE in params)) { + params[MIN_DISTANCE] = this.MIN_DISTANCE; + } + + if (!(PREVENT_DEFAULT in params)) { + params[PREVENT_DEFAULT] = this.PREVENT_DEFAULT; + } + + return params; + }, + + _onStart: function(e, node, subscriber, ce) { + + var start = true, // always true for mouse + endHandle, + doc, + preventDefault = subscriber._extra.preventDefault, + origE = e; + + if (e.touches) { + start = (e.touches.length === 1); + e = e.touches[0]; + } + + if (start) { + + if (preventDefault) { + // preventDefault is a boolean or function + if (!preventDefault.call || preventDefault(e)) { + origE.preventDefault(); + } + } + + e.flick = { + time : new Date().getTime() + }; + + subscriber[_FLICK_START] = e; + + endHandle = subscriber[_FLICK_END_HANDLE]; + + if (!endHandle) { + doc = (node.get(NODE_TYPE) === 9) ? node : node.get(OWNER_DOCUMENT); + + endHandle = doc.on(EVENT[END], Y.bind(this._onEnd, this), null, node, subscriber, ce); + subscriber[_FLICK_END_HANDLE] = endHandle; + } + } + }, + + _onEnd: function(e, node, subscriber, ce) { + + var endTime = new Date().getTime(), + start = subscriber[_FLICK_START], + valid = !!start, + endEvent = e, + startTime, + time, + preventDefault, + params, + xyDistance, + distance, + velocity, + axis; + + if (valid) { + + if (e.changedTouches) { + if (e.changedTouches.length === 1 && e.touches.length === 0) { + endEvent = e.changedTouches[0]; + } else { + valid = false; + } + } + + if (valid) { + + params = subscriber._extra; + preventDefault = params[PREVENT_DEFAULT]; + + if (preventDefault) { + // preventDefault is a boolean or function + if (!preventDefault.call || preventDefault(e)) { + endEvent.preventDefault(); + } + } + + startTime = start.flick.time; + endTime = new Date().getTime(); + time = endTime - startTime; + + + xyDistance = [ + endEvent.pageX - start.pageX, + endEvent.pageY - start.pageY + ]; + + if (params.axis) { + axis = params.axis; + } else { + axis = (Math.abs(xyDistance[0]) >= Math.abs(xyDistance[1])) ? 'x' : 'y'; + } + + distance = xyDistance[(axis === 'x') ? 0 : 1]; + velocity = (time !== 0) ? distance/time : 0; + + if (isFinite(velocity) && (Math.abs(distance) >= params[MIN_DISTANCE]) && (Math.abs(velocity) >= params[MIN_VELOCITY])) { + + e.type = "flick"; + e.flick = { + time:time, + distance: distance, + velocity:velocity, + axis: axis, + start : start + }; + + ce.fire(e); + + } + + subscriber[_FLICK_START] = null; + } + } + }, + + MIN_VELOCITY : 0, + MIN_DISTANCE : 0, + PREVENT_DEFAULT : false +}); + + +}, '3.3.0' ,{requires:['node-base','event-touch','event-synthetic']}); +YUI.add('event-move', function(Y) { + +/** + * Adds lower level support for "gesturemovestart", "gesturemove" and "gesturemoveend" events, which can be used to create drag/drop + * interactions which work across touch and mouse input devices. They correspond to "touchstart", "touchmove" and "touchend" on a touch input + * device, and "mousedown", "mousemove", "mouseup" on a mouse based input device. + * + * @module event-gestures + * @submodule event-move + */ + +var EVENT = ("ontouchstart" in Y.config.win && !Y.UA.chrome) ? { + start: "touchstart", + move: "touchmove", + end: "touchend" + } : { + start: "mousedown", + move: "mousemove", + end: "mouseup" + }, + + START = "start", + MOVE = "move", + END = "end", + + GESTURE_MOVE = "gesture" + MOVE, + GESTURE_MOVE_END = GESTURE_MOVE + END, + GESTURE_MOVE_START = GESTURE_MOVE + START, + + _MOVE_START_HANDLE = "_msh", + _MOVE_HANDLE = "_mh", + _MOVE_END_HANDLE = "_meh", + + _DEL_MOVE_START_HANDLE = "_dmsh", + _DEL_MOVE_HANDLE = "_dmh", + _DEL_MOVE_END_HANDLE = "_dmeh", + + _MOVE_START = "_ms", + _MOVE = "_m", + + MIN_TIME = "minTime", + MIN_DISTANCE = "minDistance", + PREVENT_DEFAULT = "preventDefault", + BUTTON = "button", + OWNER_DOCUMENT = "ownerDocument", + + CURRENT_TARGET = "currentTarget", + TARGET = "target", + + NODE_TYPE = "nodeType", + + _defArgsProcessor = function(se, args, delegate) { + var iConfig = (delegate) ? 4 : 3, + config = (args.length > iConfig) ? Y.merge(args.splice(iConfig,1)[0]) : {}; + + if (!(PREVENT_DEFAULT in config)) { + config[PREVENT_DEFAULT] = se.PREVENT_DEFAULT; + } + + return config; + }, + + _getRoot = function(node, subscriber) { + return subscriber._extra.root || (node.get(NODE_TYPE) === 9) ? node : node.get(OWNER_DOCUMENT); + }, + + _normTouchFacade = function(touchFacade, touch, params) { + touchFacade.pageX = touch.pageX; + touchFacade.pageY = touch.pageY; + touchFacade.screenX = touch.screenX; + touchFacade.screenY = touch.screenY; + touchFacade.clientX = touch.clientX; + touchFacade.clientY = touch.clientY; + touchFacade[TARGET] = touchFacade[TARGET] || touch[TARGET]; + touchFacade[CURRENT_TARGET] = touchFacade[CURRENT_TARGET] || touch[CURRENT_TARGET]; + + touchFacade[BUTTON] = (params && params[BUTTON]) || 1; // default to left (left as per vendors, not W3C which is 0) + }, + + _prevent = function(e, preventDefault) { + if (preventDefault) { + // preventDefault is a boolean or a function + if (!preventDefault.call || preventDefault(e)) { + e.preventDefault(); + } + } + }, + + define = Y.Event.define; + +/** + * Sets up a "gesturemovestart" event, that is fired on touch devices in response to a single finger "touchstart", + * and on mouse based devices in response to a "mousedown". The subscriber can specify the minimum time + * and distance thresholds which should be crossed before the "gesturemovestart" is fired and for the mouse, + * which button should initiate a "gesturemovestart". This event can also be listened for using node.delegate(). + * + *

          It is recommended that you use Y.bind to set up context and additional arguments for your event handler, + * however if you want to pass the context and arguments as additional signature arguments to on/delegate, + * you need to provide a null value for the configuration object, e.g: node.on("gesturemovestart", fn, null, context, arg1, arg2, arg3)

          + * + * @event gesturemovestart + * @for YUI + * @param type {string} "gesturemovestart" + * @param fn {function} The method the event invokes. It receives the event facade of the underlying DOM event (mousedown or touchstart.touches[0]) which contains position co-ordinates. + * @param cfg {Object} Optional. An object which specifies: + * + *
          + *
          minDistance (defaults to 0)
          + *
          The minimum distance threshold which should be crossed before the gesturemovestart is fired
          + *
          minTime (defaults to 0)
          + *
          The minimum time threshold for which the finger/mouse should be help down before the gesturemovestart is fired
          + *
          button (no default)
          + *
          In the case of a mouse input device, if the event should only be fired for a specific mouse button.
          + *
          preventDefault (defaults to false)
          + *
          Can be set to true/false to prevent default behavior as soon as the touchstart or mousedown is received (that is before minTime or minDistance thresholds are crossed, and so before the gesturemovestart listener is notified) so that things like text selection and context popups (on touch devices) can be + * prevented. This property can also be set to a function, which returns true or false, based on the event facade passed to it (for example, DragDrop can determine if the target is a valid handle or not before preventing default).
          + *
          + * + * @return {EventHandle} the detach handle + */ + +define(GESTURE_MOVE_START, { + + on: function (node, subscriber, ce) { + + subscriber[_MOVE_START_HANDLE] = node.on(EVENT[START], + this._onStart, + this, + node, + subscriber, + ce); + }, + + delegate : function(node, subscriber, ce, filter) { + + var se = this; + + subscriber[_DEL_MOVE_START_HANDLE] = node.delegate(EVENT[START], + function(e) { + se._onStart(e, node, subscriber, ce, true); + }, + filter); + }, + + detachDelegate : function(node, subscriber, ce, filter) { + var handle = subscriber[_DEL_MOVE_START_HANDLE]; + + if (handle) { + handle.detach(); + subscriber[_DEL_MOVE_START_HANDLE] = null; + } + }, + + detach: function (node, subscriber, ce) { + var startHandle = subscriber[_MOVE_START_HANDLE]; + + if (startHandle) { + startHandle.detach(); + subscriber[_MOVE_START_HANDLE] = null; + } + }, + + processArgs : function(args, delegate) { + var params = _defArgsProcessor(this, args, delegate); + + if (!(MIN_TIME in params)) { + params[MIN_TIME] = this.MIN_TIME; + } + + if (!(MIN_DISTANCE in params)) { + params[MIN_DISTANCE] = this.MIN_DISTANCE; + } + + return params; + }, + + _onStart : function(e, node, subscriber, ce, delegate) { + + if (delegate) { + node = e[CURRENT_TARGET]; + } + + var params = subscriber._extra, + fireStart = true, + minTime = params[MIN_TIME], + minDistance = params[MIN_DISTANCE], + button = params.button, + preventDefault = params[PREVENT_DEFAULT], + root = _getRoot(node, subscriber), + startXY; + + if (e.touches) { + if (e.touches.length === 1) { + _normTouchFacade(e, e.touches[0], params); + } else { + fireStart = false; + } + } else { + fireStart = (button === undefined) || (button === e.button); + } + + + if (fireStart) { + + _prevent(e, preventDefault); + + if (minTime === 0 || minDistance === 0) { + this._start(e, node, ce, params); + + } else { + + startXY = [e.pageX, e.pageY]; + + if (minTime > 0) { + + + params._ht = Y.later(minTime, this, this._start, [e, node, ce, params]); + + params._hme = root.on(EVENT[END], Y.bind(function() { + this._cancel(params); + }, this)); + } + + if (minDistance > 0) { + + + params._hm = root.on(EVENT[MOVE], Y.bind(function(em) { + if (Math.abs(em.pageX - startXY[0]) > minDistance || Math.abs(em.pageY - startXY[1]) > minDistance) { + this._start(e, node, ce, params); + } + }, this)); + } + } + } + }, + + _cancel : function(params) { + if (params._ht) { + params._ht.cancel(); + params._ht = null; + } + if (params._hme) { + params._hme.detach(); + params._hme = null; + } + if (params._hm) { + params._hm.detach(); + params._hm = null; + } + }, + + _start : function(e, node, ce, params) { + + if (params) { + this._cancel(params); + } + + e.type = GESTURE_MOVE_START; + + + node.setData(_MOVE_START, e); + ce.fire(e); + }, + + MIN_TIME : 0, + MIN_DISTANCE : 0, + PREVENT_DEFAULT : false +}); + +/** + * Sets up a "gesturemove" event, that is fired on touch devices in response to a single finger "touchmove", + * and on mouse based devices in response to a "mousemove". + * + *

          By default this event is only fired when the same node + * has received a "gesturemovestart" event. The subscriber can set standAlone to true, in the configuration properties, + * if they want to listen for this event without an initial "gesturemovestart".

          + * + *

          By default this event sets up it's internal "touchmove" and "mousemove" DOM listeners on the document element. The subscriber + * can set the root configuration property, to specify which node to attach DOM listeners to, if different from the document.

          + * + *

          This event can also be listened for using node.delegate().

          + * + *

          It is recommended that you use Y.bind to set up context and additional arguments for your event handler, + * however if you want to pass the context and arguments as additional signature arguments to on/delegate, + * you need to provide a null value for the configuration object, e.g: node.on("gesturemove", fn, null, context, arg1, arg2, arg3)

          + * + * @event gesturemove + * @for YUI + * @param type {string} "gesturemove" + * @param fn {function} The method the event invokes. It receives the event facade of the underlying DOM event (mousemove or touchmove.touches[0]) which contains position co-ordinates. + * @param cfg {Object} Optional. An object which specifies: + *
          + *
          standAlone (defaults to false)
          + *
          true, if the subscriber should be notified even if a "gesturemovestart" has not occured on the same node.
          + *
          root (defaults to document)
          + *
          The node to which the internal DOM listeners should be attached.
          + *
          preventDefault (defaults to false)
          + *
          Can be set to true/false to prevent default behavior as soon as the touchmove or mousemove is received. As with gesturemovestart, can also be set to function which returns true/false based on the event facade passed to it.
          + *
          + * + * @return {EventHandle} the detach handle + */ +define(GESTURE_MOVE, { + + on : function (node, subscriber, ce) { + + var root = _getRoot(node, subscriber), + + moveHandle = root.on(EVENT[MOVE], + this._onMove, + this, + node, + subscriber, + ce); + + subscriber[_MOVE_HANDLE] = moveHandle; + }, + + delegate : function(node, subscriber, ce, filter) { + + var se = this; + + subscriber[_DEL_MOVE_HANDLE] = node.delegate(EVENT[MOVE], + function(e) { + se._onMove(e, node, subscriber, ce, true); + }, + filter); + }, + + detach : function (node, subscriber, ce) { + var moveHandle = subscriber[_MOVE_HANDLE]; + + if (moveHandle) { + moveHandle.detach(); + subscriber[_MOVE_HANDLE] = null; + } + }, + + detachDelegate : function(node, subscriber, ce, filter) { + var handle = subscriber[_DEL_MOVE_HANDLE]; + + if (handle) { + handle.detach(); + subscriber[_DEL_MOVE_HANDLE] = null; + } + + }, + + processArgs : function(args, delegate) { + return _defArgsProcessor(this, args, delegate); + }, + + _onMove : function(e, node, subscriber, ce, delegate) { + + if (delegate) { + node = e[CURRENT_TARGET]; + } + + var fireMove = subscriber._extra.standAlone || node.getData(_MOVE_START), + preventDefault = subscriber._extra.preventDefault; + + + if (fireMove) { + + if (e.touches) { + if (e.touches.length === 1) { + _normTouchFacade(e, e.touches[0]); + } else { + fireMove = false; + } + } + + if (fireMove) { + + _prevent(e, preventDefault); + + + e.type = GESTURE_MOVE; + ce.fire(e); + } + } + }, + + PREVENT_DEFAULT : false +}); + +/** + * Sets up a "gesturemoveend" event, that is fired on touch devices in response to a single finger "touchend", + * and on mouse based devices in response to a "mouseup". + * + *

          By default this event is only fired when the same node + * has received a "gesturemove" or "gesturemovestart" event. The subscriber can set standAlone to true, in the configuration properties, + * if they want to listen for this event without a preceding "gesturemovestart" or "gesturemove".

          + * + *

          By default this event sets up it's internal "touchend" and "mouseup" DOM listeners on the document element. The subscriber + * can set the root configuration property, to specify which node to attach DOM listeners to, if different from the document.

          + * + *

          This event can also be listened for using node.delegate().

          + * + *

          It is recommended that you use Y.bind to set up context and additional arguments for your event handler, + * however if you want to pass the context and arguments as additional signature arguments to on/delegate, + * you need to provide a null value for the configuration object, e.g: node.on("gesturemoveend", fn, null, context, arg1, arg2, arg3)

          + * + * + * @event gesturemoveend + * @for YUI + * @param type {string} "gesturemoveend" + * @param fn {function} The method the event invokes. It receives the event facade of the underlying DOM event (mouseup or touchend.changedTouches[0]). + * @param cfg {Object} Optional. An object which specifies: + *
          + *
          standAlone (defaults to false)
          + *
          true, if the subscriber should be notified even if a "gesturemovestart" or "gesturemove" has not occured on the same node.
          + *
          root (defaults to document)
          + *
          The node to which the internal DOM listeners should be attached.
          + *
          preventDefault (defaults to false)
          + *
          Can be set to true/false to prevent default behavior as soon as the touchend or mouseup is received. As with gesturemovestart, can also be set to function which returns true/false based on the event facade passed to it.
          + *
          + * + * @return {EventHandle} the detach handle + */ +define(GESTURE_MOVE_END, { + + on : function (node, subscriber, ce) { + + var root = _getRoot(node, subscriber), + + endHandle = root.on(EVENT[END], + this._onEnd, + this, + node, + subscriber, + ce); + + subscriber[_MOVE_END_HANDLE] = endHandle; + }, + + delegate : function(node, subscriber, ce, filter) { + + var se = this; + + subscriber[_DEL_MOVE_END_HANDLE] = node.delegate(EVENT[END], + function(e) { + se._onEnd(e, node, subscriber, ce, true); + }, + filter); + }, + + detachDelegate : function(node, subscriber, ce, filter) { + var handle = subscriber[_DEL_MOVE_END_HANDLE]; + + if (handle) { + handle.detach(); + subscriber[_DEL_MOVE_END_HANDLE] = null; + } + + }, + + detach : function (node, subscriber, ce) { + var endHandle = subscriber[_MOVE_END_HANDLE]; + + if (endHandle) { + endHandle.detach(); + subscriber[_MOVE_END_HANDLE] = null; + } + }, + + processArgs : function(args, delegate) { + return _defArgsProcessor(this, args, delegate); + }, + + _onEnd : function(e, node, subscriber, ce, delegate) { + + if (delegate) { + node = e[CURRENT_TARGET]; + } + + var fireMoveEnd = subscriber._extra.standAlone || node.getData(_MOVE) || node.getData(_MOVE_START), + preventDefault = subscriber._extra.preventDefault; + + if (fireMoveEnd) { + + if (e.changedTouches) { + if (e.changedTouches.length === 1) { + _normTouchFacade(e, e.changedTouches[0]); + } else { + fireMoveEnd = false; + } + } + + if (fireMoveEnd) { + + _prevent(e, preventDefault); + + e.type = GESTURE_MOVE_END; + ce.fire(e); + + node.clearData(_MOVE_START); + node.clearData(_MOVE); + } + } + }, + + PREVENT_DEFAULT : false +}); + + +}, '3.3.0' ,{requires:['node-base','event-touch','event-synthetic']}); + + +YUI.add('event-gestures', function(Y){}, '3.3.0' ,{use:['event-flick', 'event-move']}); + diff --git a/jssource/src_files/include/javascript/yui3/build/event-gestures/event-move-min.js b/jssource/src_files/include/javascript/yui3/build/event-gestures/event-move-min.js new file mode 100644 index 00000000..1fc5ccde --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/event-gestures/event-move-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("event-move",function(e){var j=("ontouchstart" in e.config.win&&!e.UA.chrome)?{start:"touchstart",move:"touchmove",end:"touchend"}:{start:"mousedown",move:"mousemove",end:"mouseup"},x="start",C="move",h="end",l="gesture"+C,a=l+h,i=l+x,B="_msh",m="_mh",w="_meh",r="_dmsh",o="_dmh",c="_dmeh",g="_ms",s="_m",z="minTime",t="minDistance",u="preventDefault",b="button",v="ownerDocument",n="currentTarget",p="target",q="nodeType",k=function(H,F,G){var D=(G)?4:3,E=(F.length>D)?e.merge(F.splice(D,1)[0]):{};if(!(u in E)){E[u]=H.PREVENT_DEFAULT;}return E;},f=function(E,D){return D._extra.root||(E.get(q)===9)?E:E.get(v);},y=function(D,F,E){D.pageX=F.pageX;D.pageY=F.pageY;D.screenX=F.screenX;D.screenY=F.screenY;D.clientX=F.clientX;D.clientY=F.clientY;D[p]=D[p]||F[p];D[n]=D[n]||F[n];D[b]=(E&&E[b])||1;},A=function(E,D){if(D){if(!D.call||D(E)){E.preventDefault();}}},d=e.Event.define;d(i,{on:function(E,D,F){D[B]=E.on(j[x],this._onStart,this,E,D,F);},delegate:function(F,E,H,D){var G=this;E[r]=F.delegate(j[x],function(I){G._onStart(I,F,E,H,true);},D);},detachDelegate:function(F,E,H,D){var G=E[r];if(G){G.detach();E[r]=null;}},detach:function(E,D,G){var F=D[B];if(F){F.detach();D[B]=null;}},processArgs:function(D,E){var F=k(this,D,E);if(!(z in F)){F[z]=this.MIN_TIME;}if(!(t in F)){F[t]=this.MIN_DISTANCE;}return F;},_onStart:function(J,E,P,D,L){if(L){E=J[n];}var F=P._extra,O=true,G=F[z],N=F[t],H=F.button,I=F[u],M=f(E,P),K;if(J.touches){if(J.touches.length===1){y(J,J.touches[0],F);}else{O=false;}}else{O=(H===undefined)||(H===J.button);}if(O){A(J,I);if(G===0||N===0){this._start(J,E,D,F);}else{K=[J.pageX,J.pageY];if(G>0){F._ht=e.later(G,this,this._start,[J,E,D,F]);F._hme=M.on(j[h],e.bind(function(){this._cancel(F);},this));}if(N>0){F._hm=M.on(j[C],e.bind(function(Q){if(Math.abs(Q.pageX-K[0])>N||Math.abs(Q.pageY-K[1])>N){this._start(J,E,D,F);}},this));}}}},_cancel:function(D){if(D._ht){D._ht.cancel();D._ht=null;}if(D._hme){D._hme.detach();D._hme=null;}if(D._hm){D._hm.detach();D._hm=null;}},_start:function(F,D,E,G){if(G){this._cancel(G);}F.type=i;D.setData(g,F);E.fire(F);},MIN_TIME:0,MIN_DISTANCE:0,PREVENT_DEFAULT:false});d(l,{on:function(F,E,H){var D=f(F,E),G=D.on(j[C],this._onMove,this,F,E,H);E[m]=G;},delegate:function(F,E,H,D){var G=this;E[o]=F.delegate(j[C],function(I){G._onMove(I,F,E,H,true);},D);},detach:function(E,D,G){var F=D[m];if(F){F.detach();D[m]=null;}},detachDelegate:function(F,E,H,D){var G=E[o];if(G){G.detach();E[o]=null;}},processArgs:function(D,E){return k(this,D,E);},_onMove:function(J,H,G,I,F){if(F){H=J[n];}var D=G._extra.standAlone||H.getData(g),E=G._extra.preventDefault;if(D){if(J.touches){if(J.touches.length===1){y(J,J.touches[0]);}else{D=false;}}if(D){A(J,E);J.type=l;I.fire(J);}}},PREVENT_DEFAULT:false});d(a,{on:function(G,F,H){var E=f(G,F),D=E.on(j[h],this._onEnd,this,G,F,H);F[w]=D;},delegate:function(F,E,H,D){var G=this;E[c]=F.delegate(j[h],function(I){G._onEnd(I,F,E,H,true);},D);},detachDelegate:function(F,E,H,D){var G=E[c];if(G){G.detach();E[c]=null;}},detach:function(F,E,G){var D=E[w];if(D){D.detach();E[w]=null;}},processArgs:function(D,E){return k(this,D,E);},_onEnd:function(J,H,F,I,E){if(E){H=J[n];}var G=F._extra.standAlone||H.getData(s)||H.getData(g),D=F._extra.preventDefault;if(G){if(J.changedTouches){if(J.changedTouches.length===1){y(J,J.changedTouches[0]);}else{G=false;}}if(G){A(J,D);J.type=a;I.fire(J);H.clearData(g);H.clearData(s);}}},PREVENT_DEFAULT:false});},"3.3.0",{requires:["node-base","event-touch","event-synthetic"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/event-gestures/event-move.js b/jssource/src_files/include/javascript/yui3/build/event-gestures/event-move.js new file mode 100644 index 00000000..3b633699 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/event-gestures/event-move.js @@ -0,0 +1,514 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('event-move', function(Y) { + +/** + * Adds lower level support for "gesturemovestart", "gesturemove" and "gesturemoveend" events, which can be used to create drag/drop + * interactions which work across touch and mouse input devices. They correspond to "touchstart", "touchmove" and "touchend" on a touch input + * device, and "mousedown", "mousemove", "mouseup" on a mouse based input device. + * + * @module event-gestures + * @submodule event-move + */ + +var EVENT = ("ontouchstart" in Y.config.win && !Y.UA.chrome) ? { + start: "touchstart", + move: "touchmove", + end: "touchend" + } : { + start: "mousedown", + move: "mousemove", + end: "mouseup" + }, + + START = "start", + MOVE = "move", + END = "end", + + GESTURE_MOVE = "gesture" + MOVE, + GESTURE_MOVE_END = GESTURE_MOVE + END, + GESTURE_MOVE_START = GESTURE_MOVE + START, + + _MOVE_START_HANDLE = "_msh", + _MOVE_HANDLE = "_mh", + _MOVE_END_HANDLE = "_meh", + + _DEL_MOVE_START_HANDLE = "_dmsh", + _DEL_MOVE_HANDLE = "_dmh", + _DEL_MOVE_END_HANDLE = "_dmeh", + + _MOVE_START = "_ms", + _MOVE = "_m", + + MIN_TIME = "minTime", + MIN_DISTANCE = "minDistance", + PREVENT_DEFAULT = "preventDefault", + BUTTON = "button", + OWNER_DOCUMENT = "ownerDocument", + + CURRENT_TARGET = "currentTarget", + TARGET = "target", + + NODE_TYPE = "nodeType", + + _defArgsProcessor = function(se, args, delegate) { + var iConfig = (delegate) ? 4 : 3, + config = (args.length > iConfig) ? Y.merge(args.splice(iConfig,1)[0]) : {}; + + if (!(PREVENT_DEFAULT in config)) { + config[PREVENT_DEFAULT] = se.PREVENT_DEFAULT; + } + + return config; + }, + + _getRoot = function(node, subscriber) { + return subscriber._extra.root || (node.get(NODE_TYPE) === 9) ? node : node.get(OWNER_DOCUMENT); + }, + + _normTouchFacade = function(touchFacade, touch, params) { + touchFacade.pageX = touch.pageX; + touchFacade.pageY = touch.pageY; + touchFacade.screenX = touch.screenX; + touchFacade.screenY = touch.screenY; + touchFacade.clientX = touch.clientX; + touchFacade.clientY = touch.clientY; + touchFacade[TARGET] = touchFacade[TARGET] || touch[TARGET]; + touchFacade[CURRENT_TARGET] = touchFacade[CURRENT_TARGET] || touch[CURRENT_TARGET]; + + touchFacade[BUTTON] = (params && params[BUTTON]) || 1; // default to left (left as per vendors, not W3C which is 0) + }, + + _prevent = function(e, preventDefault) { + if (preventDefault) { + // preventDefault is a boolean or a function + if (!preventDefault.call || preventDefault(e)) { + e.preventDefault(); + } + } + }, + + define = Y.Event.define; + +/** + * Sets up a "gesturemovestart" event, that is fired on touch devices in response to a single finger "touchstart", + * and on mouse based devices in response to a "mousedown". The subscriber can specify the minimum time + * and distance thresholds which should be crossed before the "gesturemovestart" is fired and for the mouse, + * which button should initiate a "gesturemovestart". This event can also be listened for using node.delegate(). + * + *

          It is recommended that you use Y.bind to set up context and additional arguments for your event handler, + * however if you want to pass the context and arguments as additional signature arguments to on/delegate, + * you need to provide a null value for the configuration object, e.g: node.on("gesturemovestart", fn, null, context, arg1, arg2, arg3)

          + * + * @event gesturemovestart + * @for YUI + * @param type {string} "gesturemovestart" + * @param fn {function} The method the event invokes. It receives the event facade of the underlying DOM event (mousedown or touchstart.touches[0]) which contains position co-ordinates. + * @param cfg {Object} Optional. An object which specifies: + * + *
          + *
          minDistance (defaults to 0)
          + *
          The minimum distance threshold which should be crossed before the gesturemovestart is fired
          + *
          minTime (defaults to 0)
          + *
          The minimum time threshold for which the finger/mouse should be help down before the gesturemovestart is fired
          + *
          button (no default)
          + *
          In the case of a mouse input device, if the event should only be fired for a specific mouse button.
          + *
          preventDefault (defaults to false)
          + *
          Can be set to true/false to prevent default behavior as soon as the touchstart or mousedown is received (that is before minTime or minDistance thresholds are crossed, and so before the gesturemovestart listener is notified) so that things like text selection and context popups (on touch devices) can be + * prevented. This property can also be set to a function, which returns true or false, based on the event facade passed to it (for example, DragDrop can determine if the target is a valid handle or not before preventing default).
          + *
          + * + * @return {EventHandle} the detach handle + */ + +define(GESTURE_MOVE_START, { + + on: function (node, subscriber, ce) { + + subscriber[_MOVE_START_HANDLE] = node.on(EVENT[START], + this._onStart, + this, + node, + subscriber, + ce); + }, + + delegate : function(node, subscriber, ce, filter) { + + var se = this; + + subscriber[_DEL_MOVE_START_HANDLE] = node.delegate(EVENT[START], + function(e) { + se._onStart(e, node, subscriber, ce, true); + }, + filter); + }, + + detachDelegate : function(node, subscriber, ce, filter) { + var handle = subscriber[_DEL_MOVE_START_HANDLE]; + + if (handle) { + handle.detach(); + subscriber[_DEL_MOVE_START_HANDLE] = null; + } + }, + + detach: function (node, subscriber, ce) { + var startHandle = subscriber[_MOVE_START_HANDLE]; + + if (startHandle) { + startHandle.detach(); + subscriber[_MOVE_START_HANDLE] = null; + } + }, + + processArgs : function(args, delegate) { + var params = _defArgsProcessor(this, args, delegate); + + if (!(MIN_TIME in params)) { + params[MIN_TIME] = this.MIN_TIME; + } + + if (!(MIN_DISTANCE in params)) { + params[MIN_DISTANCE] = this.MIN_DISTANCE; + } + + return params; + }, + + _onStart : function(e, node, subscriber, ce, delegate) { + + if (delegate) { + node = e[CURRENT_TARGET]; + } + + var params = subscriber._extra, + fireStart = true, + minTime = params[MIN_TIME], + minDistance = params[MIN_DISTANCE], + button = params.button, + preventDefault = params[PREVENT_DEFAULT], + root = _getRoot(node, subscriber), + startXY; + + if (e.touches) { + if (e.touches.length === 1) { + _normTouchFacade(e, e.touches[0], params); + } else { + fireStart = false; + } + } else { + fireStart = (button === undefined) || (button === e.button); + } + + + if (fireStart) { + + _prevent(e, preventDefault); + + if (minTime === 0 || minDistance === 0) { + this._start(e, node, ce, params); + + } else { + + startXY = [e.pageX, e.pageY]; + + if (minTime > 0) { + + + params._ht = Y.later(minTime, this, this._start, [e, node, ce, params]); + + params._hme = root.on(EVENT[END], Y.bind(function() { + this._cancel(params); + }, this)); + } + + if (minDistance > 0) { + + + params._hm = root.on(EVENT[MOVE], Y.bind(function(em) { + if (Math.abs(em.pageX - startXY[0]) > minDistance || Math.abs(em.pageY - startXY[1]) > minDistance) { + this._start(e, node, ce, params); + } + }, this)); + } + } + } + }, + + _cancel : function(params) { + if (params._ht) { + params._ht.cancel(); + params._ht = null; + } + if (params._hme) { + params._hme.detach(); + params._hme = null; + } + if (params._hm) { + params._hm.detach(); + params._hm = null; + } + }, + + _start : function(e, node, ce, params) { + + if (params) { + this._cancel(params); + } + + e.type = GESTURE_MOVE_START; + + + node.setData(_MOVE_START, e); + ce.fire(e); + }, + + MIN_TIME : 0, + MIN_DISTANCE : 0, + PREVENT_DEFAULT : false +}); + +/** + * Sets up a "gesturemove" event, that is fired on touch devices in response to a single finger "touchmove", + * and on mouse based devices in response to a "mousemove". + * + *

          By default this event is only fired when the same node + * has received a "gesturemovestart" event. The subscriber can set standAlone to true, in the configuration properties, + * if they want to listen for this event without an initial "gesturemovestart".

          + * + *

          By default this event sets up it's internal "touchmove" and "mousemove" DOM listeners on the document element. The subscriber + * can set the root configuration property, to specify which node to attach DOM listeners to, if different from the document.

          + * + *

          This event can also be listened for using node.delegate().

          + * + *

          It is recommended that you use Y.bind to set up context and additional arguments for your event handler, + * however if you want to pass the context and arguments as additional signature arguments to on/delegate, + * you need to provide a null value for the configuration object, e.g: node.on("gesturemove", fn, null, context, arg1, arg2, arg3)

          + * + * @event gesturemove + * @for YUI + * @param type {string} "gesturemove" + * @param fn {function} The method the event invokes. It receives the event facade of the underlying DOM event (mousemove or touchmove.touches[0]) which contains position co-ordinates. + * @param cfg {Object} Optional. An object which specifies: + *
          + *
          standAlone (defaults to false)
          + *
          true, if the subscriber should be notified even if a "gesturemovestart" has not occured on the same node.
          + *
          root (defaults to document)
          + *
          The node to which the internal DOM listeners should be attached.
          + *
          preventDefault (defaults to false)
          + *
          Can be set to true/false to prevent default behavior as soon as the touchmove or mousemove is received. As with gesturemovestart, can also be set to function which returns true/false based on the event facade passed to it.
          + *
          + * + * @return {EventHandle} the detach handle + */ +define(GESTURE_MOVE, { + + on : function (node, subscriber, ce) { + + var root = _getRoot(node, subscriber), + + moveHandle = root.on(EVENT[MOVE], + this._onMove, + this, + node, + subscriber, + ce); + + subscriber[_MOVE_HANDLE] = moveHandle; + }, + + delegate : function(node, subscriber, ce, filter) { + + var se = this; + + subscriber[_DEL_MOVE_HANDLE] = node.delegate(EVENT[MOVE], + function(e) { + se._onMove(e, node, subscriber, ce, true); + }, + filter); + }, + + detach : function (node, subscriber, ce) { + var moveHandle = subscriber[_MOVE_HANDLE]; + + if (moveHandle) { + moveHandle.detach(); + subscriber[_MOVE_HANDLE] = null; + } + }, + + detachDelegate : function(node, subscriber, ce, filter) { + var handle = subscriber[_DEL_MOVE_HANDLE]; + + if (handle) { + handle.detach(); + subscriber[_DEL_MOVE_HANDLE] = null; + } + + }, + + processArgs : function(args, delegate) { + return _defArgsProcessor(this, args, delegate); + }, + + _onMove : function(e, node, subscriber, ce, delegate) { + + if (delegate) { + node = e[CURRENT_TARGET]; + } + + var fireMove = subscriber._extra.standAlone || node.getData(_MOVE_START), + preventDefault = subscriber._extra.preventDefault; + + + if (fireMove) { + + if (e.touches) { + if (e.touches.length === 1) { + _normTouchFacade(e, e.touches[0]); + } else { + fireMove = false; + } + } + + if (fireMove) { + + _prevent(e, preventDefault); + + + e.type = GESTURE_MOVE; + ce.fire(e); + } + } + }, + + PREVENT_DEFAULT : false +}); + +/** + * Sets up a "gesturemoveend" event, that is fired on touch devices in response to a single finger "touchend", + * and on mouse based devices in response to a "mouseup". + * + *

          By default this event is only fired when the same node + * has received a "gesturemove" or "gesturemovestart" event. The subscriber can set standAlone to true, in the configuration properties, + * if they want to listen for this event without a preceding "gesturemovestart" or "gesturemove".

          + * + *

          By default this event sets up it's internal "touchend" and "mouseup" DOM listeners on the document element. The subscriber + * can set the root configuration property, to specify which node to attach DOM listeners to, if different from the document.

          + * + *

          This event can also be listened for using node.delegate().

          + * + *

          It is recommended that you use Y.bind to set up context and additional arguments for your event handler, + * however if you want to pass the context and arguments as additional signature arguments to on/delegate, + * you need to provide a null value for the configuration object, e.g: node.on("gesturemoveend", fn, null, context, arg1, arg2, arg3)

          + * + * + * @event gesturemoveend + * @for YUI + * @param type {string} "gesturemoveend" + * @param fn {function} The method the event invokes. It receives the event facade of the underlying DOM event (mouseup or touchend.changedTouches[0]). + * @param cfg {Object} Optional. An object which specifies: + *
          + *
          standAlone (defaults to false)
          + *
          true, if the subscriber should be notified even if a "gesturemovestart" or "gesturemove" has not occured on the same node.
          + *
          root (defaults to document)
          + *
          The node to which the internal DOM listeners should be attached.
          + *
          preventDefault (defaults to false)
          + *
          Can be set to true/false to prevent default behavior as soon as the touchend or mouseup is received. As with gesturemovestart, can also be set to function which returns true/false based on the event facade passed to it.
          + *
          + * + * @return {EventHandle} the detach handle + */ +define(GESTURE_MOVE_END, { + + on : function (node, subscriber, ce) { + + var root = _getRoot(node, subscriber), + + endHandle = root.on(EVENT[END], + this._onEnd, + this, + node, + subscriber, + ce); + + subscriber[_MOVE_END_HANDLE] = endHandle; + }, + + delegate : function(node, subscriber, ce, filter) { + + var se = this; + + subscriber[_DEL_MOVE_END_HANDLE] = node.delegate(EVENT[END], + function(e) { + se._onEnd(e, node, subscriber, ce, true); + }, + filter); + }, + + detachDelegate : function(node, subscriber, ce, filter) { + var handle = subscriber[_DEL_MOVE_END_HANDLE]; + + if (handle) { + handle.detach(); + subscriber[_DEL_MOVE_END_HANDLE] = null; + } + + }, + + detach : function (node, subscriber, ce) { + var endHandle = subscriber[_MOVE_END_HANDLE]; + + if (endHandle) { + endHandle.detach(); + subscriber[_MOVE_END_HANDLE] = null; + } + }, + + processArgs : function(args, delegate) { + return _defArgsProcessor(this, args, delegate); + }, + + _onEnd : function(e, node, subscriber, ce, delegate) { + + if (delegate) { + node = e[CURRENT_TARGET]; + } + + var fireMoveEnd = subscriber._extra.standAlone || node.getData(_MOVE) || node.getData(_MOVE_START), + preventDefault = subscriber._extra.preventDefault; + + if (fireMoveEnd) { + + if (e.changedTouches) { + if (e.changedTouches.length === 1) { + _normTouchFacade(e, e.changedTouches[0]); + } else { + fireMoveEnd = false; + } + } + + if (fireMoveEnd) { + + _prevent(e, preventDefault); + + e.type = GESTURE_MOVE_END; + ce.fire(e); + + node.clearData(_MOVE_START); + node.clearData(_MOVE); + } + } + }, + + PREVENT_DEFAULT : false +}); + + +}, '3.3.0' ,{requires:['node-base','event-touch','event-synthetic']}); diff --git a/jssource/src_files/include/javascript/yui3/build/event-simulate/event-simulate-min.js b/jssource/src_files/include/javascript/yui3/build/event-simulate/event-simulate-min.js index ffde0c85..99ed28bf 100644 --- a/jssource/src_files/include/javascript/yui3/build/event-simulate/event-simulate-min.js +++ b/jssource/src_files/include/javascript/yui3/build/event-simulate/event-simulate-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("event-simulate",function(A){(function(){var H=A.Lang,G=A.Array,D=H.isFunction,C=H.isString,E=H.isBoolean,M=H.isObject,K=H.isNumber,J=A.config.doc,N={click:1,dblclick:1,mouseover:1,mouseout:1,mousedown:1,mouseup:1,mousemove:1},I={keydown:1,keyup:1,keypress:1};function F(S,W,R,P,Y,O,L,X,U,a,Z){if(!S){A.error("simulateKeyEvent(): Invalid target.");}if(C(W)){W=W.toLowerCase();switch(W){case"textevent":W="keypress";break;case"keyup":case"keydown":case"keypress":break;default:A.error("simulateKeyEvent(): Event type '"+W+"' not supported.");}}else{A.error("simulateKeyEvent(): Event type must be a string.");}if(!E(R)){R=true;}if(!E(P)){P=true;}if(!M(Y)){Y=window;}if(!E(O)){O=false;}if(!E(L)){L=false;}if(!E(X)){X=false;}if(!E(U)){U=false;}if(!K(a)){a=0;}if(!K(Z)){Z=0;}var V=null;if(D(J.createEvent)){try{V=J.createEvent("KeyEvents");V.initKeyEvent(W,R,P,Y,O,L,X,U,a,Z);}catch(T){try{V=J.createEvent("Events");}catch(Q){V=J.createEvent("UIEvents");}finally{V.initEvent(W,R,P);V.view=Y;V.altKey=L;V.ctrlKey=O;V.shiftKey=X;V.metaKey=U;V.keyCode=a;V.charCode=Z;}}S.dispatchEvent(V);}else{if(M(J.createEventObject)){V=J.createEventObject();V.bubbles=R;V.cancelable=P;V.view=Y;V.ctrlKey=O;V.altKey=L;V.shiftKey=X;V.metaKey=U;V.keyCode=(Z>0)?Z:a;S.fireEvent("on"+W,V);}else{A.error("simulateKeyEvent(): No event simulation framework present.");}}}function B(X,c,U,R,d,W,T,S,Q,O,P,L,b,Z,V,Y){if(!X){A.error("simulateMouseEvent(): Invalid target.");}if(C(c)){c=c.toLowerCase();if(!N[c]){A.error("simulateMouseEvent(): Event type '"+c+"' not supported.");}}else{A.error("simulateMouseEvent(): Event type must be a string.");}if(!E(U)){U=true;}if(!E(R)){R=(c!="mousemove");}if(!M(d)){d=window;}if(!K(W)){W=1;}if(!K(T)){T=0;}if(!K(S)){S=0;}if(!K(Q)){Q=0;}if(!K(O)){O=0;}if(!E(P)){P=false;}if(!E(L)){L=false;}if(!E(b)){b=false;}if(!E(Z)){Z=false;}if(!K(V)){V=0;}var a=null;if(D(J.createEvent)){a=J.createEvent("MouseEvents");if(a.initMouseEvent){a.initMouseEvent(c,U,R,d,W,T,S,Q,O,P,L,b,Z,V,Y);}else{a=J.createEvent("UIEvents");a.initEvent(c,U,R);a.view=d;a.detail=W;a.screenX=T;a.screenY=S;a.clientX=Q;a.clientY=O;a.ctrlKey=P;a.altKey=L;a.metaKey=Z;a.shiftKey=b;a.button=V;a.relatedTarget=Y;}if(Y&&!a.relatedTarget){if(c=="mouseout"){a.toElement=Y;}else{if(c=="mouseover"){a.fromElement=Y;}}}X.dispatchEvent(a);}else{if(M(J.createEventObject)){a=J.createEventObject();a.bubbles=U;a.cancelable=R;a.view=d;a.detail=W;a.screenX=T;a.screenY=S;a.clientX=Q;a.clientY=O;a.ctrlKey=P;a.altKey=L;a.metaKey=Z;a.shiftKey=b;switch(V){case 0:a.button=1;break;case 1:a.button=4;break;case 2:break;default:a.button=0;}a.relatedTarget=Y;X.fireEvent("on"+c,a);}else{A.error("simulateMouseEvent(): No event simulation framework present.");}}}A.Event.simulate=function(P,O,L){L=L||{};if(N[O]){B(P,O,L.bubbles,L.cancelable,L.view,L.detail,L.screenX,L.screenY,L.clientX,L.clientY,L.ctrlKey,L.altKey,L.shiftKey,L.metaKey,L.button,L.relatedTarget);}else{if(I[O]){F(P,O,L.bubbles,L.cancelable,L.view,L.ctrlKey,L.altKey,L.shiftKey,L.metaKey,L.keyCode,L.charCode);}else{A.error("simulate(): Event '"+O+"' can't be simulated.");}}};})();},"3.0.0",{requires:["event"]}); \ No newline at end of file +YUI.add("event-simulate",function(a){(function(){var k=a.Lang,j=a.Array,f=k.isFunction,d=k.isString,g=k.isBoolean,o=k.isObject,n=k.isNumber,m=a.config.doc,p={click:1,dblclick:1,mouseover:1,mouseout:1,mousedown:1,mouseup:1,mousemove:1},l={keydown:1,keyup:1,keypress:1},c={blur:1,change:1,focus:1,resize:1,scroll:1,select:1},e={scroll:1,resize:1,reset:1,submit:1,change:1,select:1,error:1,abort:1};a.mix(e,p);a.mix(e,l);function i(v,z,u,s,B,r,q,A,x,D,C){if(!v){a.error("simulateKeyEvent(): Invalid target.");}if(d(z)){z=z.toLowerCase();switch(z){case"textevent":z="keypress";break;case"keyup":case"keydown":case"keypress":break;default:a.error("simulateKeyEvent(): Event type '"+z+"' not supported.");}}else{a.error("simulateKeyEvent(): Event type must be a string.");}if(!g(u)){u=true;}if(!g(s)){s=true;}if(!o(B)){B=window;}if(!g(r)){r=false;}if(!g(q)){q=false;}if(!g(A)){A=false;}if(!g(x)){x=false;}if(!n(D)){D=0;}if(!n(C)){C=0;}var y=null;if(f(m.createEvent)){try{y=m.createEvent("KeyEvents");y.initKeyEvent(z,u,s,B,r,q,A,x,D,C);}catch(w){try{y=m.createEvent("Events");}catch(t){y=m.createEvent("UIEvents");}finally{y.initEvent(z,u,s);y.view=B;y.altKey=q;y.ctrlKey=r;y.shiftKey=A;y.metaKey=x;y.keyCode=D;y.charCode=C;}}v.dispatchEvent(y);}else{if(o(m.createEventObject)){y=m.createEventObject();y.bubbles=u;y.cancelable=s;y.view=B;y.ctrlKey=r;y.altKey=q;y.shiftKey=A;y.metaKey=x;y.keyCode=(C>0)?C:D;v.fireEvent("on"+z,y);}else{a.error("simulateKeyEvent(): No event simulation framework present.");}}}function b(A,F,x,u,G,z,w,v,t,r,s,q,E,C,y,B){if(!A){a.error("simulateMouseEvent(): Invalid target.");}if(d(F)){F=F.toLowerCase();if(!p[F]){a.error("simulateMouseEvent(): Event type '"+F+"' not supported.");}}else{a.error("simulateMouseEvent(): Event type must be a string.");}if(!g(x)){x=true;}if(!g(u)){u=(F!="mousemove");}if(!o(G)){G=window;}if(!n(z)){z=1;}if(!n(w)){w=0;}if(!n(v)){v=0;}if(!n(t)){t=0;}if(!n(r)){r=0;}if(!g(s)){s=false;}if(!g(q)){q=false;}if(!g(E)){E=false;}if(!g(C)){C=false;}if(!n(y)){y=0;}B=B||null;var D=null;if(f(m.createEvent)){D=m.createEvent("MouseEvents");if(D.initMouseEvent){D.initMouseEvent(F,x,u,G,z,w,v,t,r,s,q,E,C,y,B);}else{D=m.createEvent("UIEvents");D.initEvent(F,x,u);D.view=G;D.detail=z;D.screenX=w;D.screenY=v;D.clientX=t;D.clientY=r;D.ctrlKey=s;D.altKey=q;D.metaKey=C;D.shiftKey=E;D.button=y;D.relatedTarget=B;}if(B&&!D.relatedTarget){if(F=="mouseout"){D.toElement=B;}else{if(F=="mouseover"){D.fromElement=B;}}}A.dispatchEvent(D);}else{if(o(m.createEventObject)){D=m.createEventObject();D.bubbles=x;D.cancelable=u;D.view=G;D.detail=z;D.screenX=w;D.screenY=v;D.clientX=t;D.clientY=r;D.ctrlKey=s;D.altKey=q;D.metaKey=C;D.shiftKey=E;switch(y){case 0:D.button=1;break;case 1:D.button=4;break;case 2:break;default:D.button=0;}D.relatedTarget=B;A.fireEvent("on"+F,D);}else{a.error("simulateMouseEvent(): No event simulation framework present.");}}}function h(w,v,s,r,q,u){if(!w){a.error("simulateUIEvent(): Invalid target.");}if(d(v)){v=v.toLowerCase();if(!c[v]){a.error("simulateUIEvent(): Event type '"+v+"' not supported.");}}else{a.error("simulateUIEvent(): Event type must be a string.");}var t=null;if(!g(s)){s=(v in e);}if(!g(r)){r=(v=="submit");}if(!o(q)){q=window;}if(!n(u)){u=1;}if(f(m.createEvent)){t=m.createEvent("UIEvents");t.initUIEvent(v,s,r,q,u);w.dispatchEvent(t);}else{if(o(m.createEventObject)){t=m.createEventObject();t.bubbles=s;t.cancelable=r;t.view=q;t.detail=u;w.fireEvent("on"+v,t);}else{a.error("simulateUIEvent(): No event simulation framework present.");}}}a.Event.simulate=function(s,r,q){q=q||{};if(p[r]){b(s,r,q.bubbles,q.cancelable,q.view,q.detail,q.screenX,q.screenY,q.clientX,q.clientY,q.ctrlKey,q.altKey,q.shiftKey,q.metaKey,q.button,q.relatedTarget);}else{if(l[r]){i(s,r,q.bubbles,q.cancelable,q.view,q.ctrlKey,q.altKey,q.shiftKey,q.metaKey,q.keyCode,q.charCode);}else{if(c[r]){h(s,r,q.bubbles,q.cancelable,q.view,q.detail);}else{a.error("simulate(): Event '"+r+"' can't be simulated.");}}}};})();},"3.3.0",{requires:["event-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/event-simulate/event-simulate.js b/jssource/src_files/include/javascript/yui3/build/event-simulate/event-simulate.js index ca052a80..a12702e4 100644 --- a/jssource/src_files/include/javascript/yui3/build/event-simulate/event-simulate.js +++ b/jssource/src_files/include/javascript/yui3/build/event-simulate/event-simulate.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('event-simulate', function(Y) { @@ -23,7 +23,7 @@ var L = Y.Lang, isObject = L.isObject, isNumber = L.isNumber, doc = Y.config.doc, - + //mouse events supported mouseEvents = { click: 1, @@ -34,14 +34,40 @@ var L = Y.Lang, mouseup: 1, mousemove: 1 }, - + //key events supported keyEvents = { keydown: 1, keyup: 1, keypress: 1 + }, + + //HTML events supported + uiEvents = { + blur: 1, + change: 1, + focus: 1, + resize: 1, + scroll: 1, + select: 1 + }, + + //events that bubble by default + bubbleEvents = { + scroll: 1, + resize: 1, + reset: 1, + submit: 1, + change: 1, + select: 1, + error: 1, + abort: 1 }; +//all key and mouse events bubble +Y.mix(bubbleEvents, mouseEvents); +Y.mix(bubbleEvents, keyEvents); + /* * Note: Intentionally not for YUIDoc generation. * Simulates a key event using the given event information to populate @@ -60,7 +86,7 @@ var L = Y.Lang, * default. The default is true. * @param {Boolean} cancelable (Optional) Indicates if the event can be * canceled using preventDefault(). DOM Level 3 specifies that all - * key events can be cancelled. The default + * key events can be cancelled. The default * is true. * @param {Window} view (Optional) The view containing the target. This is * typically the window object. The default is window. @@ -72,23 +98,23 @@ var L = Y.Lang, * is pressed while the event is firing. The default is false. * @param {Boolean} metaKey (Optional) Indicates if one of the META keys * is pressed while the event is firing. The default is false. - * @param {int} keyCode (Optional) The code for the key that is in use. + * @param {int} keyCode (Optional) The code for the key that is in use. * The default is 0. * @param {int} charCode (Optional) The Unicode code for the character * associated with the key being used. The default is 0. */ -function simulateKeyEvent(target /*:HTMLElement*/, type /*:String*/, - bubbles /*:Boolean*/, cancelable /*:Boolean*/, +function simulateKeyEvent(target /*:HTMLElement*/, type /*:String*/, + bubbles /*:Boolean*/, cancelable /*:Boolean*/, view /*:Window*/, - ctrlKey /*:Boolean*/, altKey /*:Boolean*/, - shiftKey /*:Boolean*/, metaKey /*:Boolean*/, - keyCode /*:int*/, charCode /*:int*/) /*:Void*/ + ctrlKey /*:Boolean*/, altKey /*:Boolean*/, + shiftKey /*:Boolean*/, metaKey /*:Boolean*/, + keyCode /*:int*/, charCode /*:int*/) /*:Void*/ { - //check target + //check target if (!target){ Y.error("simulateKeyEvent(): Invalid target."); } - + //check event type if (isString(type)){ type = type.toLowerCase(); @@ -106,7 +132,7 @@ function simulateKeyEvent(target /*:HTMLElement*/, type /*:String*/, } else { Y.error("simulateKeyEvent(): Event type must be a string."); } - + //setup default values if (!isBoolean(bubbles)){ bubbles = true; //all key events bubble @@ -133,20 +159,20 @@ function simulateKeyEvent(target /*:HTMLElement*/, type /*:String*/, keyCode = 0; } if (!isNumber(charCode)){ - charCode = 0; + charCode = 0; } //try to create a mouse event var customEvent /*:MouseEvent*/ = null; - + //check for DOM-compliant browsers first if (isFunction(doc.createEvent)){ - + try { - + //try to create key event customEvent = doc.createEvent("KeyEvents"); - + /* * Interesting problem: Firefox implemented a non-standard * version of initKeyEvent() based on DOM Level 2 specs. @@ -157,12 +183,12 @@ function simulateKeyEvent(target /*:HTMLElement*/, type /*:String*/, */ // @TODO: Decipher between Firefox's implementation and a correct one. customEvent.initKeyEvent(type, bubbles, cancelable, view, ctrlKey, - altKey, shiftKey, metaKey, keyCode, charCode); - + altKey, shiftKey, metaKey, keyCode, charCode); + } catch (ex /*:Error*/){ /* - * If it got here, that means key events aren't officially supported. + * If it got here, that means key events aren't officially supported. * Safari/WebKit is a real problem now. WebKit 522 won't let you * set keyCode, charCode, or other properties if you use a * UIEvent, so we first must try to create a generic event. The @@ -192,19 +218,19 @@ function simulateKeyEvent(target /*:HTMLElement*/, type /*:String*/, customEvent.metaKey = metaKey; customEvent.keyCode = keyCode; customEvent.charCode = charCode; - - } - + + } + } - + //fire the event target.dispatchEvent(customEvent); } else if (isObject(doc.createEventObject)){ //IE - + //create an IE event object customEvent = doc.createEventObject(); - + //assign available properties customEvent.bubbles = bubbles; customEvent.cancelable = cancelable; @@ -213,17 +239,17 @@ function simulateKeyEvent(target /*:HTMLElement*/, type /*:String*/, customEvent.altKey = altKey; customEvent.shiftKey = shiftKey; customEvent.metaKey = metaKey; - + /* * IE doesn't support charCode explicitly. CharCode should * take precedence over any keyCode value for accurate * representation. */ customEvent.keyCode = (charCode > 0) ? charCode : keyCode; - + //fire the event - target.fireEvent("on" + type, customEvent); - + target.fireEvent("on" + type, customEvent); + } else { Y.error("simulateKeyEvent(): No event simulation framework present."); } @@ -247,8 +273,8 @@ function simulateKeyEvent(target /*:HTMLElement*/, type /*:String*/, * default. The default is true. * @param {Boolean} cancelable (Optional) Indicates if the event can be * canceled using preventDefault(). DOM Level 2 specifies that all - * mouse events except mousemove can be cancelled. The default - * is true for all events except mousemove, for which the default + * mouse events except mousemove can be cancelled. The default + * is true for all events except mousemove, for which the default * is false. * @param {Window} view (Optional) The view containing the target. This is * typically the window object. The default is window. @@ -280,25 +306,25 @@ function simulateKeyEvent(target /*:HTMLElement*/, type /*:String*/, * events, this is the element that the mouse has moved from. This * argument is ignored for all other events. The default is null. */ -function simulateMouseEvent(target /*:HTMLElement*/, type /*:String*/, - bubbles /*:Boolean*/, cancelable /*:Boolean*/, - view /*:Window*/, detail /*:int*/, - screenX /*:int*/, screenY /*:int*/, - clientX /*:int*/, clientY /*:int*/, - ctrlKey /*:Boolean*/, altKey /*:Boolean*/, - shiftKey /*:Boolean*/, metaKey /*:Boolean*/, +function simulateMouseEvent(target /*:HTMLElement*/, type /*:String*/, + bubbles /*:Boolean*/, cancelable /*:Boolean*/, + view /*:Window*/, detail /*:int*/, + screenX /*:int*/, screenY /*:int*/, + clientX /*:int*/, clientY /*:int*/, + ctrlKey /*:Boolean*/, altKey /*:Boolean*/, + shiftKey /*:Boolean*/, metaKey /*:Boolean*/, button /*:int*/, relatedTarget /*:HTMLElement*/) /*:Void*/ { - - //check target + + //check target if (!target){ Y.error("simulateMouseEvent(): Invalid target."); } - + //check event type if (isString(type)){ type = type.toLowerCase(); - + //make sure it's a supported mouse event if (!mouseEvents[type]){ Y.error("simulateMouseEvent(): Event type '" + type + "' not supported."); @@ -306,7 +332,7 @@ function simulateMouseEvent(target /*:HTMLElement*/, type /*:String*/, } else { Y.error("simulateMouseEvent(): Event type must be a string."); } - + //setup default values if (!isBoolean(bubbles)){ bubbles = true; //all mouse events bubble @@ -321,16 +347,16 @@ function simulateMouseEvent(target /*:HTMLElement*/, type /*:String*/, detail = 1; //number of mouse clicks must be at least one } if (!isNumber(screenX)){ - screenX = 0; + screenX = 0; } if (!isNumber(screenY)){ - screenY = 0; + screenY = 0; } if (!isNumber(clientX)){ - clientX = 0; + clientX = 0; } if (!isNumber(clientY)){ - clientY = 0; + clientY = 0; } if (!isBoolean(ctrlKey)){ ctrlKey = false; @@ -345,25 +371,27 @@ function simulateMouseEvent(target /*:HTMLElement*/, type /*:String*/, metaKey = false; } if (!isNumber(button)){ - button = 0; + button = 0; } + relatedTarget = relatedTarget || null; + //try to create a mouse event var customEvent /*:MouseEvent*/ = null; - + //check for DOM-compliant browsers first if (isFunction(doc.createEvent)){ - + customEvent = doc.createEvent("MouseEvents"); - + //Safari 2.x (WebKit 418) still doesn't implement initMouseEvent() if (customEvent.initMouseEvent){ customEvent.initMouseEvent(type, bubbles, cancelable, view, detail, - screenX, screenY, clientX, clientY, - ctrlKey, altKey, shiftKey, metaKey, + screenX, screenY, clientX, clientY, + ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget); } else { //Safari - + //the closest thing available in Safari 2.x is UIEvents customEvent = doc.createEvent("UIEvents"); customEvent.initEvent(type, bubbles, cancelable); @@ -380,7 +408,7 @@ function simulateMouseEvent(target /*:HTMLElement*/, type /*:String*/, customEvent.button = button; customEvent.relatedTarget = relatedTarget; } - + /* * Check to see if relatedTarget has been assigned. Firefox * versions less than 2.0 don't allow it to be assigned via @@ -397,15 +425,15 @@ function simulateMouseEvent(target /*:HTMLElement*/, type /*:String*/, customEvent.fromElement = relatedTarget; } } - + //fire the event target.dispatchEvent(customEvent); } else if (isObject(doc.createEventObject)){ //IE - + //create an IE event object customEvent = doc.createEventObject(); - + //assign available properties customEvent.bubbles = bubbles; customEvent.cancelable = cancelable; @@ -432,8 +460,8 @@ function simulateMouseEvent(target /*:HTMLElement*/, type /*:String*/, //leave as is break; default: - customEvent.button = 0; - } + customEvent.button = 0; + } /* * Have to use relatedTarget because IE won't allow assignment @@ -441,15 +469,109 @@ function simulateMouseEvent(target /*:HTMLElement*/, type /*:String*/, * YAHOO.util.customEvent.getRelatedTarget() functional. */ customEvent.relatedTarget = relatedTarget; - + //fire the event target.fireEvent("on" + type, customEvent); - + } else { Y.error("simulateMouseEvent(): No event simulation framework present."); } } +/* + * Note: Intentionally not for YUIDoc generation. + * Simulates a UI event using the given event information to populate + * the generated event object. This method does browser-equalizing + * calculations to account for differences in the DOM and IE event models + * as well as different browser quirks. + * @method simulateHTMLEvent + * @private + * @static + * @param {HTMLElement} target The target of the given event. + * @param {String} type The type of event to fire. This can be any one of + * the following: click, dblclick, mousedown, mouseup, mouseout, + * mouseover, and mousemove. + * @param {Boolean} bubbles (Optional) Indicates if the event can be + * bubbled up. DOM Level 2 specifies that all mouse events bubble by + * default. The default is true. + * @param {Boolean} cancelable (Optional) Indicates if the event can be + * canceled using preventDefault(). DOM Level 2 specifies that all + * mouse events except mousemove can be cancelled. The default + * is true for all events except mousemove, for which the default + * is false. + * @param {Window} view (Optional) The view containing the target. This is + * typically the window object. The default is window. + * @param {int} detail (Optional) The number of times the mouse button has + * been used. The default value is 1. + */ +function simulateUIEvent(target /*:HTMLElement*/, type /*:String*/, + bubbles /*:Boolean*/, cancelable /*:Boolean*/, + view /*:Window*/, detail /*:int*/) /*:Void*/ +{ + + //check target + if (!target){ + Y.error("simulateUIEvent(): Invalid target."); + } + + //check event type + if (isString(type)){ + type = type.toLowerCase(); + + //make sure it's a supported mouse event + if (!uiEvents[type]){ + Y.error("simulateUIEvent(): Event type '" + type + "' not supported."); + } + } else { + Y.error("simulateUIEvent(): Event type must be a string."); + } + + //try to create a mouse event + var customEvent = null; + + + //setup default values + if (!isBoolean(bubbles)){ + bubbles = (type in bubbleEvents); //not all events bubble + } + if (!isBoolean(cancelable)){ + cancelable = (type == "submit"); //submit is the only one that can be cancelled + } + if (!isObject(view)){ + view = window; //view is typically window + } + if (!isNumber(detail)){ + detail = 1; //usually not used but defaulted to this + } + + //check for DOM-compliant browsers first + if (isFunction(doc.createEvent)){ + + //just a generic UI Event object is needed + customEvent = doc.createEvent("UIEvents"); + customEvent.initUIEvent(type, bubbles, cancelable, view, detail); + + //fire the event + target.dispatchEvent(customEvent); + + } else if (isObject(doc.createEventObject)){ //IE + + //create an IE event object + customEvent = doc.createEventObject(); + + //assign available properties + customEvent.bubbles = bubbles; + customEvent.cancelable = cancelable; + customEvent.view = view; + customEvent.detail = detail; + + //fire the event + target.fireEvent("on" + type, customEvent); + + } else { + Y.error("simulateUIEvent(): No event simulation framework present."); + } +} /** * Simulates the event with the given name on a target. @@ -457,34 +579,36 @@ function simulateMouseEvent(target /*:HTMLElement*/, type /*:String*/, * @param {String} type The type of event to simulate (i.e., "click"). * @param {Object} options (Optional) Extra options to copy onto the event object. * @return {void} + * @for Event * @method simulate * @static */ Y.Event.simulate = function(target, type, options){ options = options || {}; - + if (mouseEvents[type]){ simulateMouseEvent(target, type, options.bubbles, - options.cancelable, options.view, options.detail, options.screenX, + options.cancelable, options.view, options.detail, options.screenX, options.screenY, options.clientX, options.clientY, options.ctrlKey, - options.altKey, options.shiftKey, options.metaKey, options.button, - options.relatedTarget); + options.altKey, options.shiftKey, options.metaKey, options.button, + options.relatedTarget); } else if (keyEvents[type]){ simulateKeyEvent(target, type, options.bubbles, options.cancelable, options.view, options.ctrlKey, - options.altKey, options.shiftKey, options.metaKey, - options.keyCode, options.charCode); - } else { + options.altKey, options.shiftKey, options.metaKey, + options.keyCode, options.charCode); + } else if (uiEvents[type]){ + simulateUIEvent(target, type, options.bubbles, + options.cancelable, options.view, options.detail); + } else { Y.error("simulate(): Event '" + type + "' can't be simulated."); } }; -/* - * @TODO: focus(), blur(), submit() - */ })(); -}, '3.0.0' ,{requires:['event']}); + +}, '3.3.0' ,{requires:['event-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/event-valuechange/event-valuechange-min.js b/jssource/src_files/include/javascript/yui3/build/event-valuechange/event-valuechange-min.js new file mode 100644 index 00000000..55bcadac --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/event-valuechange/event-valuechange-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("event-valuechange",function(D){var B=D.Array,C="value",A={POLL_INTERVAL:50,TIMEOUT:10000,_history:{},_intervals:{},_notifiers:{},_timeouts:{},_poll:function(I,F,J){var H=I._node,E=H&&H.value,K=A._history[F],G;if(!H){A._stopPolling(I,F);return;}if(E!==K){A._history[F]=E;G={_event:J,newVal:E,prevVal:K};B.each(A._notifiers[F],function(L){L.fire(G);});A._refreshTimeout(I,F);}},_refreshTimeout:function(F,E){A._stopTimeout(F,E);A._timeouts[E]=setTimeout(function(){A._stopPolling(F,E);},A.TIMEOUT);},_startPolling:function(F,E,H,G){if(!E){E=D.stamp(F);}if(!G&&A._intervals[E]){return;}A._stopPolling(F,E);A._intervals[E]=setInterval(function(){A._poll(F,E,H);},A.POLL_INTERVAL);A._refreshTimeout(F,E,H);},_stopPolling:function(F,E){if(!E){E=D.stamp(F);}A._intervals[E]=clearInterval(A._intervals[E]);A._stopTimeout(F,E);},_stopTimeout:function(F,E){if(!E){E=D.stamp(F);}A._timeouts[E]=clearTimeout(A._timeouts[E]);},_onBlur:function(E){A._stopPolling(E.currentTarget);},_onFocus:function(F){var E=F.currentTarget;A._history[D.stamp(E)]=E.get(C);A._startPolling(E,null,F);},_onKeyDown:function(E){A._startPolling(E.currentTarget,null,E);},_onKeyUp:function(E){if(E.charCode===229||E.charCode===197){A._startPolling(E.currentTarget,null,E,true);}},_onMouseDown:function(E){A._startPolling(E.currentTarget,null,E);},_onSubscribe:function(I,H,G){var F=D.stamp(I),E=A._notifiers[F];A._history[F]=I.get(C);G._handles=I.on({blur:A._onBlur,focus:A._onFocus,keydown:A._onKeyDown,keyup:A._onKeyUp,mousedown:A._onMouseDown});if(!E){E=A._notifiers[F]=[];}E.push(G);},_onUnsubscribe:function(J,I,H){var G=D.stamp(J),E=A._notifiers[G],F=B.indexOf(E,H);H._handles.detach();if(F!==-1){E.splice(F,1);if(!E.length){A._stopPolling(J,G);delete A._notifiers[G];delete A._history[G];}}}};D.Event.define("valueChange",{detach:A._onUnsubscribe,on:A._onSubscribe,publishConfig:{emitFacade:true}});D.ValueChange=A;},"3.3.0",{requires:["event-focus","event-synthetic"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/event-valuechange/event-valuechange.js b/jssource/src_files/include/javascript/yui3/build/event-valuechange/event-valuechange.js new file mode 100644 index 00000000..bf3cf813 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/event-valuechange/event-valuechange.js @@ -0,0 +1,392 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('event-valuechange', function(Y) { + +/** + * Adds a synthetic valueChange event that fires when the + * value property of an input field or textarea changes as a result + * of a keystroke, mouse operation, or input method editor (IME) input event. + * + * @module event-valuechange + */ + +/** + * Provides the implementation for the synthetic valueChange event. + * + * @class ValueChange + * @static + */ + +var YArray = Y.Array, + + VALUE = 'value', + +// Just a simple namespace to make methods overridable. +VC = { + // -- Static Constants ----------------------------------------------------- + + /** + * Interval (in milliseconds) at which to poll for changes to the value of + * an element with one or more valueChange subscribers when the + * user is likely to be interacting with it. + * + * @property POLL_INTERVAL + * @type Number + * @default 50 + * @static + */ + POLL_INTERVAL: 50, + + /** + * Timeout (in milliseconds) after which to stop polling when there hasn't + * been any new activity (keypresses, mouse clicks, etc.) on an element. + * + * @property TIMEOUT + * @type Number + * @default 10000 + * @static + */ + TIMEOUT: 10000, + + // -- Protected Static Properties ------------------------------------------ + _history : {}, + _intervals: {}, + _notifiers: {}, + _timeouts : {}, + + // -- Protected Static Methods --------------------------------------------- + + /** + * Called at an interval to poll for changes to the value of the specified + * node. + * + * @method _poll + * @param {Node} node + * @param {String} stamp + * @param {EventFacade} e + * @protected + * @static + */ + _poll: function (node, stamp, e) { + var domNode = node._node, // performance cheat; getValue() is a big hit when polling + newVal = domNode && domNode.value, + prevVal = VC._history[stamp], + facade; + + if (!domNode) { + VC._stopPolling(node, stamp); + return; + } + + if (newVal !== prevVal) { + VC._history[stamp] = newVal; + + facade = { + _event : e, + newVal : newVal, + prevVal: prevVal + }; + + YArray.each(VC._notifiers[stamp], function (notifier) { + notifier.fire(facade); + }); + + VC._refreshTimeout(node, stamp); + } + }, + + /** + * Restarts the inactivity timeout for the specified node. + * + * @method _refreshTimeout + * @param {Node} node + * @param {String} stamp + * @protected + * @static + */ + _refreshTimeout: function (node, stamp) { + VC._stopTimeout(node, stamp); // avoid dupes + + // If we don't see any changes within the timeout period (10 seconds by + // default), stop polling. + VC._timeouts[stamp] = setTimeout(function () { + VC._stopPolling(node, stamp); + }, VC.TIMEOUT); + + }, + + /** + * Begins polling for changes to the value property of the + * specified node. If polling is already underway for the specified node, + * it will not be restarted unless the force parameter is + * true + * + * @method _startPolling + * @param {Node} node Node to watch. + * @param {String} stamp (optional) Object stamp for the node. Will be + * generated if not provided (provide it to improve performance). + * @param {EventFacade} e (optional) Event facade of the event that + * initiated the polling (if any). + * @param {Boolean} force (optional) If true, polling will be + * restarted even if we're already polling this node. + * @protected + * @static + */ + _startPolling: function (node, stamp, e, force) { + if (!stamp) { + stamp = Y.stamp(node); + } + + // Don't bother continuing if we're already polling. + if (!force && VC._intervals[stamp]) { + return; + } + + VC._stopPolling(node, stamp); // avoid dupes + + // Poll for changes to the node's value. We can't rely on keyboard + // events for this, since the value may change due to a mouse-initiated + // paste event, an IME input event, or for some other reason that + // doesn't trigger a key event. + VC._intervals[stamp] = setInterval(function () { + VC._poll(node, stamp, e); + }, VC.POLL_INTERVAL); + + VC._refreshTimeout(node, stamp, e); + + }, + + /** + * Stops polling for changes to the specified node's value + * attribute. + * + * @method _stopPolling + * @param {Node} node + * @param {String} stamp (optional) + * @protected + * @static + */ + _stopPolling: function (node, stamp) { + if (!stamp) { + stamp = Y.stamp(node); + } + + VC._intervals[stamp] = clearInterval(VC._intervals[stamp]); + VC._stopTimeout(node, stamp); + + }, + + /** + * Clears the inactivity timeout for the specified node, if any. + * + * @method _stopTimeout + * @param {Node} node + * @param {String} stamp (optional) + * @protected + * @static + */ + _stopTimeout: function (node, stamp) { + if (!stamp) { + stamp = Y.stamp(node); + } + + VC._timeouts[stamp] = clearTimeout(VC._timeouts[stamp]); + }, + + // -- Protected Static Event Handlers -------------------------------------- + + /** + * Stops polling when a node's blur event fires. + * + * @method _onBlur + * @param {EventFacade} e + * @protected + * @static + */ + _onBlur: function (e) { + VC._stopPolling(e.currentTarget); + }, + + /** + * Resets a node's history and starts polling when a focus event occurs. + * + * @method _onFocus + * @param {EventFacade} e + * @protected + * @static + */ + _onFocus: function (e) { + var node = e.currentTarget; + + VC._history[Y.stamp(node)] = node.get(VALUE); + VC._startPolling(node, null, e); + }, + + /** + * Starts polling when a node receives a keyDown event. + * + * @method _onKeyDown + * @param {EventFacade} e + * @protected + * @static + */ + _onKeyDown: function (e) { + VC._startPolling(e.currentTarget, null, e); + }, + + /** + * Starts polling when an IME-related keyUp event occurs on a node. + * + * @method _onKeyUp + * @param {EventFacade} e + * @protected + * @static + */ + _onKeyUp: function (e) { + // These charCodes indicate that an IME has started. We'll restart + // polling and give the IME up to 10 seconds (by default) to finish. + if (e.charCode === 229 || e.charCode === 197) { + VC._startPolling(e.currentTarget, null, e, true); + } + }, + + /** + * Starts polling when a node receives a mouseDown event. + * + * @method _onMouseDown + * @param {EventFacade} e + * @protected + * @static + */ + _onMouseDown: function (e) { + VC._startPolling(e.currentTarget, null, e); + }, + + /** + * Called when event-valuechange receives a new subscriber. + * + * @method _onSubscribe + * @param {Node} node + * @param {Subscription} subscription + * @param {SyntheticEvent.Notifier} notifier + * @protected + * @static + */ + _onSubscribe: function (node, subscription, notifier) { + var stamp = Y.stamp(node), + notifiers = VC._notifiers[stamp]; + + VC._history[stamp] = node.get(VALUE); + + notifier._handles = node.on({ + blur : VC._onBlur, + focus : VC._onFocus, + keydown : VC._onKeyDown, + keyup : VC._onKeyUp, + mousedown: VC._onMouseDown + }); + + if (!notifiers) { + notifiers = VC._notifiers[stamp] = []; + } + + notifiers.push(notifier); + }, + + /** + * Called when event-valuechange loses a subscriber. + * + * @method _onUnsubscribe + * @param {Node} node + * @param {Subscription} subscription + * @param {SyntheticEvent.Notifier} notifier + * @protected + * @static + */ + _onUnsubscribe: function (node, subscription, notifier) { + var stamp = Y.stamp(node), + notifiers = VC._notifiers[stamp], + index = YArray.indexOf(notifiers, notifier); + + notifier._handles.detach(); + + if (index !== -1) { + notifiers.splice(index, 1); + + if (!notifiers.length) { + VC._stopPolling(node, stamp); + + delete VC._notifiers[stamp]; + delete VC._history[stamp]; + } + } + } +}; + +/** + *

          + * Synthetic event that fires when the value property of an input + * field or textarea changes as a result of a keystroke, mouse operation, or + * input method editor (IME) input event. + *

          + * + *

          + * Unlike the onchange event, this event fires when the value + * actually changes and not when the element loses focus. This event also + * reports IME and multi-stroke input more reliably than oninput or + * the various key events across browsers. + *

          + * + *

          + * This event is provided by the event-valuechange module. + *

          + * + *

          + * Usage example: + *

          + * + *
          + * YUI().use('event-valuechange', function (Y) {
          + *   Y.one('input').on('valueChange', function (e) {
          + *     // Handle valueChange events on the first input element on the page.
          + *   });
          + * });
          + * 
          + * + * @event valueChange + * @param {EventFacade} e Event facade with the following additional + * properties: + * + *
          + *
          prevVal (String)
          + *
          + * Previous value before the latest change. + *
          + * + *
          newVal (String)
          + *
          + * New value after the latest change. + *
          + *
          + * + * @for YUI + */ + +Y.Event.define('valueChange', { + detach: VC._onUnsubscribe, + on : VC._onSubscribe, + + publishConfig: { + emitFacade: true + } +}); + +Y.ValueChange = VC; + + +}, '3.3.0' ,{requires:['event-focus', 'event-synthetic']}); diff --git a/jssource/src_files/include/javascript/yui3/build/event/event-base-ie-min.js b/jssource/src_files/include/javascript/yui3/build/event/event-base-ie-min.js new file mode 100644 index 00000000..0056d22e --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/event/event-base-ie-min.js @@ -0,0 +1,10 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +(function(){var b,f=YUI.Env,d=YUI.config,g=d.doc,c=g&&g.documentElement,e="onreadystatechange",a=d.pollInterval||40;if(c.doScroll&&!f._ieready){f._ieready=function(){f._ready();}; +/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */ +if(self!==self.top){b=function(){if(g.readyState=="complete"){f.remove(g,e,b);f.ieready();}};f.add(g,e,b);}else{f._dri=setInterval(function(){try{c.doScroll("left");clearInterval(f._dri);f._dri=null;f._ieready();}catch(h){}},a);}}})();YUI.add("event-base-ie",function(c){var a=function(){c.DOM2EventFacade.apply(this,arguments);};c.extend(a,c.DOM2EventFacade,{init:function(){a.superclass.init.apply(this,arguments);var j=this._event,i=c.DOM2EventFacade.resolve,g,m,k,f,l,h;this.target=i(j.srcElement);if(("clientX" in j)&&(!g)&&(0!==g)){g=j.clientX;m=j.clientY;k=c.config.doc;f=k.body;l=k.documentElement;g+=(l.scrollLeft||(f&&f.scrollLeft)||0);m+=(l.scrollTop||(f&&f.scrollTop)||0);this.pageX=g;this.pageY=m;}if(j.type=="mouseout"){h=j.toElement;}else{if(j.type=="mouseover"){h=j.fromElement;}}this.relatedTarget=i(h);if(j.button){switch(j.button){case 2:this.which=3;break;case 4:this.which=2;break;default:this.which=j.button;}this.button=this.which;}},stopPropagation:function(){var d=this._event;d.cancelBubble=true;this._wrapper.stopped=1;this.stopped=1;},stopImmediatePropagation:function(){this.stopPropagation();this._wrapper.stopped=2;this.stopped=2;},preventDefault:function(d){this._event.returnValue=d||false;this._wrapper.prevented=1;this.prevented=1;}});var b=c.config.doc&&c.config.doc.implementation;if(b&&(!b.hasFeature("Events","2.0"))){c.DOMEventFacade=a;}},"3.3.0"); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/event/event-base-ie.js b/jssource/src_files/include/javascript/yui3/build/event/event-base-ie.js new file mode 100644 index 00000000..357fe50b --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/event/event-base-ie.js @@ -0,0 +1,150 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +(function() { + +var stateChangeListener, + GLOBAL_ENV = YUI.Env, + config = YUI.config, + doc = config.doc, + docElement = doc && doc.documentElement, + EVENT_NAME = 'onreadystatechange', + pollInterval = config.pollInterval || 40; + +if (docElement.doScroll && !GLOBAL_ENV._ieready) { + GLOBAL_ENV._ieready = function() { + GLOBAL_ENV._ready(); + }; + +/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */ +// Internet Explorer: use the doScroll() method on the root element. +// This isolates what appears to be a safe moment to manipulate the +// DOM prior to when the document's readyState suggests it is safe to do so. + if (self !== self.top) { + stateChangeListener = function() { + if (doc.readyState == 'complete') { + GLOBAL_ENV.remove(doc, EVENT_NAME, stateChangeListener); + GLOBAL_ENV.ieready(); + } + }; + GLOBAL_ENV.add(doc, EVENT_NAME, stateChangeListener); + } else { + GLOBAL_ENV._dri = setInterval(function() { + try { + docElement.doScroll('left'); + clearInterval(GLOBAL_ENV._dri); + GLOBAL_ENV._dri = null; + GLOBAL_ENV._ieready(); + } catch (domNotReady) { } + }, pollInterval); + } +} + +})(); +YUI.add('event-base-ie', function(Y) { + +/* + * Custom event engine, DOM event listener abstraction layer, synthetic DOM + * events. + * @module event + * @submodule event-base + */ + +var IEEventFacade = function() { + // IEEventFacade.superclass.constructor.apply(this, arguments); + Y.DOM2EventFacade.apply(this, arguments); + }; + +Y.extend(IEEventFacade, Y.DOM2EventFacade, { + + init: function() { + + IEEventFacade.superclass.init.apply(this, arguments); + + var e = this._event, + resolve = Y.DOM2EventFacade.resolve, + x, y, d, b, de, t; + + this.target = resolve(e.srcElement); + + if (('clientX' in e) && (!x) && (0 !== x)) { + x = e.clientX; + y = e.clientY; + + d = Y.config.doc; + b = d.body; + de = d.documentElement; + + x += (de.scrollLeft || (b && b.scrollLeft) || 0); + y += (de.scrollTop || (b && b.scrollTop) || 0); + + this.pageX = x; + this.pageY = y; + } + + if (e.type == "mouseout") { + t = e.toElement; + } else if (e.type == "mouseover") { + t = e.fromElement; + } + + this.relatedTarget = resolve(t); + + // which should contain the unicode key code if this is a key event + // if (e.charCode) { + // this.which = e.charCode; + // } + + // for click events, which is normalized for which mouse button was + // clicked. + if (e.button) { + switch (e.button) { + case 2: + this.which = 3; + break; + case 4: + this.which = 2; + break; + default: + this.which = e.button; + } + + this.button = this.which; + } + + }, + + stopPropagation: function() { + var e = this._event; + e.cancelBubble = true; + this._wrapper.stopped = 1; + this.stopped = 1; + }, + + stopImmediatePropagation: function() { + this.stopPropagation(); + this._wrapper.stopped = 2; + this.stopped = 2; + }, + + preventDefault: function(returnValue) { + this._event.returnValue = returnValue || false; + this._wrapper.prevented = 1; + this.prevented = 1; + } + +}); + +var imp = Y.config.doc && Y.config.doc.implementation; + +if (imp && (!imp.hasFeature('Events', '2.0'))) { + Y.DOMEventFacade = IEEventFacade; +} + + + +}, '3.3.0' ); diff --git a/jssource/src_files/include/javascript/yui3/build/event/event-base-min.js b/jssource/src_files/include/javascript/yui3/build/event/event-base-min.js index 863aa7e7..30806921 100644 --- a/jssource/src_files/include/javascript/yui3/build/event/event-base-min.js +++ b/jssource/src_files/include/javascript/yui3/build/event/event-base-min.js @@ -1,11 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -(function(){var GLOBAL_ENV=YUI.Env,C=YUI.config,D=C.doc,POLL_INTERVAL=C.pollInterval||40,_ready=function(e){GLOBAL_ENV._ready();};if(!GLOBAL_ENV._ready){GLOBAL_ENV._ready=function(){if(!GLOBAL_ENV.DOMReady){GLOBAL_ENV.DOMReady=true;if(D.removeEventListener){D.removeEventListener("DOMContentLoaded",_ready,false);}}}; -/* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */ -if(navigator.userAgent.match(/MSIE/)){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;_ready();}};}else{GLOBAL_ENV._dri=setInterval(function(){try{document.documentElement.doScroll("left");clearInterval(GLOBAL_ENV._dri);GLOBAL_ENV._dri=null;_ready();}catch(ex){}},POLL_INTERVAL);}}else{D.addEventListener("DOMContentLoaded",_ready,false);}}})();YUI.add("event-base",function(A){(function(){var C=YUI.Env,B=function(){A.fire("domready");};A.publish("domready",{fireOnce:true});if(C.DOMReady){B();}else{A.before(B,C,"_ready");}})();(function(){var C=A.UA,B={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9,63272:46,63273:36,63275:35},D=function(F){try{if(F&&3==F.nodeType){F=F.parentNode;}}catch(E){return null;}return A.one(F);};A.DOMEventFacade=function(L,F,E){E=E||{};var H=L,G=F,I=A.config.doc,M=I.body,N=H.pageX,K=H.pageY,J,O;this.altKey=H.altKey;this.ctrlKey=H.ctrlKey;this.metaKey=H.metaKey;this.shiftKey=H.shiftKey;this.type=H.type;this.clientX=H.clientX;this.clientY=H.clientY;if(!N&&0!==N){N=H.clientX||0;K=H.clientY||0;if(C.ie){N+=Math.max(I.documentElement.scrollLeft,M.scrollLeft);K+=Math.max(I.documentElement.scrollTop,M.scrollTop);}}this._yuifacade=true;this._event=H;this.pageX=N;this.pageY=K;J=H.keyCode||H.charCode||0;if(C.webkit&&(J in B)){J=B[J];}this.keyCode=J;this.charCode=J;this.button=H.which||H.button;this.which=this.button;this.target=D(H.target||H.srcElement);this.currentTarget=D(G);O=H.relatedTarget;if(!O){if(H.type=="mouseout"){O=H.toElement;}else{if(H.type=="mouseover"){O=H.fromElement;}}}this.relatedTarget=D(O);if(H.type=="mousewheel"||H.type=="DOMMouseScroll"){this.wheelDelta=(H.detail)?(H.detail*-1):Math.round(H.wheelDelta/80)||((H.wheelDelta<0)?-1:1);}this.stopPropagation=function(){if(H.stopPropagation){H.stopPropagation();}else{H.cancelBubble=true;}E.stopped=1;};this.stopImmediatePropagation=function(){if(H.stopImmediatePropagation){H.stopImmediatePropagation();}else{this.stopPropagation();}E.stopped=2;};this.preventDefault=function(P){if(H.preventDefault){H.preventDefault();}H.returnValue=P||false;E.prevented=1;};this.halt=function(P){if(P){this.stopImmediatePropagation();}else{this.stopPropagation();}this.preventDefault();};};})();(function(){A.Env.evt.dom_wrappers={};A.Env.evt.dom_map={};var H=A.Env.evt,J=YUI.Env.add,D=YUI.Env.remove,G=function(){YUI.Env.windowLoaded=true;A.Event._load();D(window,"load",G);},B=function(){A.Event._unload();D(window,"unload",B);},C="domready",E="~yui|2|compat~",F=function(L){try{return(L&&typeof L!=="string"&&A.Lang.isNumber(L.length)&&!L.tagName&&!L.alert);}catch(K){return false;}},I=function(){var M=false,N=0,L=[],O=H.dom_wrappers,K=null,P=H.dom_map;return{POLL_RETRYS:1000,POLL_INTERVAL:40,lastError:null,_interval:null,_dri:null,DOMReady:false,startInterval:function(){var Q=A.Event;if(!Q._interval){Q._interval=setInterval(A.bind(Q._poll,Q),Q.POLL_INTERVAL);}},onAvailable:function(Q,U,Y,R,V,X){var W=A.Array(Q),S,T;for(S=0;S4)?W.slice(4):null);if(T){Z.fire();}return V;},detach:function(X,Z,S,U){var W=A.Array(arguments,0,true),a,V,T,Y,Q,R;if(W[W.length-1]===E){a=true;}if(X&&X.detach){return X.detach();}if(typeof S=="string"){if(a){S=A.DOM.byId(S);}else{S=A.Selector.query(S);T=S.length;if(T<1){S=null;}else{if(T==1){S=S[0];}}}}if(!S){return false;}if(F(S)){Y=true;for(V=0,T=S.length;V0);}U=[];W=function(Z,a){var Y,X=a.override;if(a.compat){if(a.override){if(X===true){Y=a.obj;}else{Y=X;}}else{Y=Z;}a.fn.call(Y,a.obj);}else{Y=a.obj||A.one(Z);a.fn.apply(Y,(A.Lang.isArray(X))?X:[]);}};for(R=0,Q=L.length;R4?A.Array(arguments,4,true):[];return A.Event.onAvailable.call(A.Event,F,C,E,B);}};A.Env.evt.plugins.contentready={on:function(D,C,F,E){var B=arguments.length>4?A.Array(arguments,4,true):[];return A.Event.onContentReady.call(A.Event,F,C,E,B);}};},"3.0.0",{requires:["event-custom-base"]}); \ No newline at end of file +var GLOBAL_ENV=YUI.Env;if(!GLOBAL_ENV._ready){GLOBAL_ENV._ready=function(){GLOBAL_ENV.DOMReady=true;GLOBAL_ENV.remove(YUI.config.doc,"DOMContentLoaded",GLOBAL_ENV._ready);};GLOBAL_ENV.add(YUI.config.doc,"DOMContentLoaded",GLOBAL_ENV._ready);}YUI.add("event-base",function(e){e.publish("domready",{fireOnce:true,async:true});if(GLOBAL_ENV.DOMReady){e.fire("domready");}else{e.Do.before(function(){e.fire("domready");},YUI.Env,"_ready");}var b=e.UA,d={},a={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9,63272:46,63273:36,63275:35},c=function(h){if(!h){return h;}try{if(h&&3==h.nodeType){h=h.parentNode;}}catch(g){return null;}return e.one(h);},f=function(g,h,i){this._event=g;this._currentTarget=h;this._wrapper=i||d;this.init();};e.extend(f,Object,{init:function(){var i=this._event,j=this._wrapper.overrides,g=i.pageX,l=i.pageY,k,h=this._currentTarget;this.altKey=i.altKey;this.ctrlKey=i.ctrlKey;this.metaKey=i.metaKey;this.shiftKey=i.shiftKey;this.type=(j&&j.type)||i.type;this.clientX=i.clientX;this.clientY=i.clientY;this.pageX=g;this.pageY=l;k=i.keyCode||i.charCode;if(b.webkit&&(k in a)){k=a[k];}this.keyCode=k;this.charCode=k;this.which=i.which||i.charCode||k;this.button=this.which;this.target=c(i.target);this.currentTarget=c(h);this.relatedTarget=c(i.relatedTarget);if(i.type=="mousewheel"||i.type=="DOMMouseScroll"){this.wheelDelta=(i.detail)?(i.detail*-1):Math.round(i.wheelDelta/80)||((i.wheelDelta<0)?-1:1);}if(this._touch){this._touch(i,h,this._wrapper);}},stopPropagation:function(){this._event.stopPropagation();this._wrapper.stopped=1;this.stopped=1;},stopImmediatePropagation:function(){var g=this._event;if(g.stopImmediatePropagation){g.stopImmediatePropagation();}else{this.stopPropagation();}this._wrapper.stopped=2;this.stopped=2;},preventDefault:function(g){var h=this._event;h.preventDefault();h.returnValue=g||false;this._wrapper.prevented=1;this.prevented=1;},halt:function(g){if(g){this.stopImmediatePropagation();}else{this.stopPropagation();}this.preventDefault();}});f.resolve=c;e.DOM2EventFacade=f;e.DOMEventFacade=f;(function(){e.Env.evt.dom_wrappers={};e.Env.evt.dom_map={};var o=e.Env.evt,h=e.config,l=h.win,q=YUI.Env.add,j=YUI.Env.remove,n=function(){YUI.Env.windowLoaded=true;e.Event._load();j(l,"load",n);},g=function(){e.Event._unload();},i="domready",k="~yui|2|compat~",m=function(s){try{return(s&&typeof s!=="string"&&e.Lang.isNumber(s.length)&&!s.tagName&&!s.alert);}catch(r){return false;}},p=function(){var t=false,u=0,s=[],v=o.dom_wrappers,r=null,w=o.dom_map;return{POLL_RETRYS:1000,POLL_INTERVAL:40,lastError:null,_interval:null,_dri:null,DOMReady:false,startInterval:function(){if(!p._interval){p._interval=setInterval(p._poll,p.POLL_INTERVAL);}},onAvailable:function(x,B,F,y,C,E){var D=e.Array(x),z,A;for(z=0;z4)?D.slice(4):null);if(z){H.fire();}return B;},detach:function(E,F,z,C){var D=e.Array(arguments,0,true),H,A,G,B,x,y;if(D[D.length-1]===k){H=true;}if(E&&E.detach){return E.detach();}if(typeof z=="string"){if(H){z=e.DOM.byId(z);}else{z=e.Selector.query(z);A=z.length;if(A<1){z=null;}else{if(A==1){z=z[0];}}}}if(!z){return false;}if(z.detach){D.splice(2,1);return z.detach.apply(z,D);}else{if(m(z)){G=true;for(B=0,A=z.length;B0);}B=[];D=function(G,H){var F,E=H.override;if(H.compat){if(H.override){if(E===true){F=H.obj;}else{F=E;}}else{F=G;}H.fn.call(F,H.obj);}else{F=H.obj||e.one(G);H.fn.apply(F,(e.Lang.isArray(E))?E:[]);}};for(y=0,x=s.length;y4?e.Array(arguments,4,true):null;return e.Event.onAvailable.call(e.Event,k,h,j,g);}};e.Env.evt.plugins.contentready={on:function(i,h,k,j){var g=arguments.length>4?e.Array(arguments,4,true):null;return e.Event.onContentReady.call(e.Event,k,h,j,g);}};},"3.3.0",{requires:["event-custom-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/event/event-base.js b/jssource/src_files/include/javascript/yui3/build/event/event-base.js index 43cf77db..66730554 100644 --- a/jssource/src_files/include/javascript/yui3/build/event/event-base.js +++ b/jssource/src_files/include/javascript/yui3/build/event/event-base.js @@ -1,122 +1,65 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -/* - * DOM event listener abstraction layer - * @module event - * @submodule event-base - */ - -(function() { - - -// Unlike most of the library, this code has to be executed as soon as it is -// introduced into the page -- and it should only be executed one time -// regardless of the number of instances that use it. - -var GLOBAL_ENV = YUI.Env, - - C = YUI.config, - - D = C.doc, +var GLOBAL_ENV = YUI.Env; - POLL_INTERVAL = C.pollInterval || 40, - - _ready = function(e) { - GLOBAL_ENV._ready(); +if (!GLOBAL_ENV._ready) { + GLOBAL_ENV._ready = function() { + GLOBAL_ENV.DOMReady = true; + GLOBAL_ENV.remove(YUI.config.doc, 'DOMContentLoaded', GLOBAL_ENV._ready); }; - if (!GLOBAL_ENV._ready) { - - GLOBAL_ENV._ready = function() { - if (!GLOBAL_ENV.DOMReady) { - GLOBAL_ENV.DOMReady=true; - - // Remove the DOMContentLoaded (FF/Opera/Safari) - if (D.removeEventListener) { - D.removeEventListener("DOMContentLoaded", _ready, false); - } - } - }; - - // create custom event - -/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */ - - // Internet Explorer: use the readyState of a defered script. - // This isolates what appears to be a safe moment to manipulate - // the DOM prior to when the document's readyState suggests - // it is safe to do so. - if (navigator.userAgent.match(/MSIE/)) { - - if (self !== self.top) { - document.onreadystatechange = function() { - if (document.readyState == 'complete') { - document.onreadystatechange = null; - _ready(); - } - }; - } else { - - GLOBAL_ENV._dri = setInterval(function() { - try { - // throws an error if doc is not ready - document.documentElement.doScroll('left'); - clearInterval(GLOBAL_ENV._dri); - GLOBAL_ENV._dri = null; - _ready(); - } catch (ex) { - } - }, POLL_INTERVAL); - } - - // FireFox, Opera, Safari 3+: These browsers provide a event for this - // moment. - } else { - D.addEventListener("DOMContentLoaded", _ready, false); - } - - ///////////////////////////////////////////////////////////// - } + // if (!YUI.UA.ie) { + GLOBAL_ENV.add(YUI.config.doc, 'DOMContentLoaded', GLOBAL_ENV._ready); + // } +} -})(); YUI.add('event-base', function(Y) { -(function() { /* * DOM event listener abstraction layer * @module event * @submodule event-base */ -var GLOBAL_ENV = YUI.Env, - - yready = function() { - Y.fire('domready'); - }; - +/** + * The domready event fires at the moment the browser's DOM is + * usable. In most cases, this is before images are fully + * downloaded, allowing you to provide a more responsive user + * interface. + * + * In YUI 3, domready subscribers will be notified immediately if + * that moment has already passed when the subscription is created. + * + * One exception is if the yui.js file is dynamically injected into + * the page. If this is done, you must tell the YUI instance that + * you did this in order for DOMReady (and window load events) to + * fire normally. That configuration option is 'injected' -- set + * it to true if the yui.js script is not included inline. + * + * This method is part of the 'event-ready' module, which is a + * submodule of 'event'. + * + * @event domready + * @for YUI + */ Y.publish('domready', { - fireOnce: true + fireOnce: true, + async: true }); if (GLOBAL_ENV.DOMReady) { - // console.log('DOMReady already fired', 'info', 'event'); - yready(); + Y.fire('domready'); } else { - // console.log('setting up before listener', 'info', 'event'); - // console.log('env: ' + YUI.Env.windowLoaded, 'info', 'event'); - Y.before(yready, GLOBAL_ENV, "_ready"); + Y.Do.before(function() { Y.fire('domready'); }, YUI.Env, '_ready'); } -})(); -(function() { - /** - * Custom event engine, DOM event listener abstraction layer, synthetic DOM + * Custom event engine, DOM event listener abstraction layer, synthetic DOM * events. * @module event * @submodule event-base @@ -131,60 +74,10 @@ if (GLOBAL_ENV.DOMReady) { * @param wrapper {Event.Custom} the custom event wrapper for this DOM event */ -/* - * @TODO constants? LEFTBUTTON, MIDDLEBUTTON, RIGHTBUTTON, keys - */ - -/* - -var whitelist = { - altKey : 1, - // "button" : 1, // we supply - // "bubbles" : 1, // needed? - // "cancelable" : 1, // needed? - // "charCode" : 1, // we supply - cancelBubble : 1, - // "currentTarget" : 1, // we supply - ctrlKey : 1, - clientX : 1, // needed? - clientY : 1, // needed? - detail : 1, // not fully implemented - // "fromElement" : 1, - keyCode : 1, - // "height" : 1, // needed? - // "initEvent" : 1, // need the init events? - // "initMouseEvent" : 1, - // "initUIEvent" : 1, - // "layerX" : 1, // needed? - // "layerY" : 1, // needed? - metaKey : 1, - // "modifiers" : 1, // needed? - // "offsetX" : 1, // needed? - // "offsetY" : 1, // needed? - // "preventDefault" : 1, // we supply - // "reason" : 1, // IE proprietary - // "relatedTarget" : 1, - // "returnValue" : 1, // needed? - shiftKey : 1, - // "srcUrn" : 1, // IE proprietary - // "srcElement" : 1, - // "srcFilter" : 1, IE proprietary - // "stopPropagation" : 1, // we supply - // "target" : 1, - // "timeStamp" : 1, // needed? - // "toElement" : 1, - type : 1, - // "view" : 1, - // "which" : 1, // we supply - // "width" : 1, // needed? - x : 1, - y : 1 -}, - -*/ - var ua = Y.UA, + EMPTY = {}, + /** * webkit key remapping required for Safari < 3.1 * @property webkitKeymap @@ -199,9 +92,9 @@ var whitelist = { 63277: 34, // page down 25: 9, // SHIFT-TAB (Safari provides a different key code in // this case, even though the shiftKey modifier is set) - 63272: 46, // delete - 63273: 36, // home - 63275: 35 // end + 63272: 46, // delete + 63273: 36, // home + 63275: 35 // end }, /** @@ -221,143 +114,175 @@ var whitelist = { * @private */ resolve = function(n) { + if (!n) { + return n; + } try { if (n && 3 == n.nodeType) { n = n.parentNode; } - } catch(e) { + } catch(e) { return null; } return Y.one(n); + }, + + DOMEventFacade = function(ev, currentTarget, wrapper) { + this._event = ev; + this._currentTarget = currentTarget; + this._wrapper = wrapper || EMPTY; + + // if not lazy init + this.init(); }; +Y.extend(DOMEventFacade, Object, { + + init: function() { -// provide a single event with browser abstractions resolved -// -// include all properties for both browers? -// include only DOM2 spec properties? -// provide browser-specific facade? + var e = this._event, + overrides = this._wrapper.overrides, + x = e.pageX, + y = e.pageY, + c, + currentTarget = this._currentTarget; -Y.DOMEventFacade = function(ev, currentTarget, wrapper) { + this.altKey = e.altKey; + this.ctrlKey = e.ctrlKey; + this.metaKey = e.metaKey; + this.shiftKey = e.shiftKey; + this.type = (overrides && overrides.type) || e.type; + this.clientX = e.clientX; + this.clientY = e.clientY; - wrapper = wrapper || {}; + this.pageX = x; + this.pageY = y; - var e = ev, ot = currentTarget, d = Y.config.doc, b = d.body, - x = e.pageX, y = e.pageY, c, t; + c = e.keyCode || e.charCode; - this.altKey = e.altKey; - this.ctrlKey = e.ctrlKey; - this.metaKey = e.metaKey; - this.shiftKey = e.shiftKey; - this.type = e.type; - this.clientX = e.clientX; - this.clientY = e.clientY; + if (ua.webkit && (c in webkitKeymap)) { + c = webkitKeymap[c]; + } + + this.keyCode = c; + this.charCode = c; + this.which = e.which || e.charCode || c; + // this.button = e.button; + this.button = this.which; - ////////////////////////////////////////////////////// + this.target = resolve(e.target); + this.currentTarget = resolve(currentTarget); + this.relatedTarget = resolve(e.relatedTarget); - if (!x && 0 !== x) { - x = e.clientX || 0; - y = e.clientY || 0; + if (e.type == "mousewheel" || e.type == "DOMMouseScroll") { + this.wheelDelta = (e.detail) ? (e.detail * -1) : Math.round(e.wheelDelta / 80) || ((e.wheelDelta < 0) ? -1 : 1); + } - if (ua.ie) { - x += Math.max(d.documentElement.scrollLeft, b.scrollLeft); - y += Math.max(d.documentElement.scrollTop, b.scrollTop); + if (this._touch) { + this._touch(e, currentTarget, this._wrapper); } + }, + + stopPropagation: function() { + this._event.stopPropagation(); + this._wrapper.stopped = 1; + this.stopped = 1; + }, + + stopImmediatePropagation: function() { + var e = this._event; + if (e.stopImmediatePropagation) { + e.stopImmediatePropagation(); + } else { + this.stopPropagation(); + } + this._wrapper.stopped = 2; + this.stopped = 2; + }, + + preventDefault: function(returnValue) { + var e = this._event; + e.preventDefault(); + e.returnValue = returnValue || false; + this._wrapper.prevented = 1; + this.prevented = 1; + }, + + halt: function(immediate) { + if (immediate) { + this.stopImmediatePropagation(); + } else { + this.stopPropagation(); + } + + this.preventDefault(); } - this._yuifacade = true; +}); + +DOMEventFacade.resolve = resolve; +Y.DOM2EventFacade = DOMEventFacade; +Y.DOMEventFacade = DOMEventFacade; /** * The native event * @property _event */ - this._event = e; /** * The X location of the event on the page (including scroll) * @property pageX * @type int */ - this.pageX = x; /** * The Y location of the event on the page (including scroll) * @property pageY * @type int */ - this.pageY = y; - - ////////////////////////////////////////////////////// - - c = e.keyCode || e.charCode || 0; - - if (ua.webkit && (c in webkitKeymap)) { - c = webkitKeymap[c]; - } /** * The keyCode for key events. Uses charCode if keyCode is not available * @property keyCode * @type int */ - this.keyCode = c; /** * The charCode for key events. Same as keyCode * @property charCode * @type int */ - this.charCode = c; - - ////////////////////////////////////////////////////// /** * The button that was pushed. * @property button * @type int */ - this.button = e.which || e.button; /** * The button that was pushed. Same as button. * @property which * @type int */ - this.which = this.button; - - ////////////////////////////////////////////////////// /** * Node reference for the targeted element * @propery target * @type Node */ - this.target = resolve(e.target || e.srcElement); /** * Node reference for the element that the listener was attached to. * @propery currentTarget * @type Node */ - this.currentTarget = resolve(ot); - - t = e.relatedTarget; - - if (!t) { - if (e.type == "mouseout") { - t = e.toElement; - } else if (e.type == "mouseover") { - t = e.fromElement; - } - } /** * Node reference to the relatedTarget * @propery relatedTarget * @type Node */ - this.relatedTarget = resolve(t); /** * Number representing the direction and velocity of the movement of the mousewheel. @@ -365,25 +290,11 @@ Y.DOMEventFacade = function(ev, currentTarget, wrapper) { * @property wheelDelta * @type int */ - if (e.type == "mousewheel" || e.type == "DOMMouseScroll") { - this.wheelDelta = (e.detail) ? (e.detail * -1) : Math.round(e.wheelDelta / 80) || ((e.wheelDelta < 0) ? -1 : 1); - } - - ////////////////////////////////////////////////////// - // methods /** * Stops the propagation to the next bubble target * @method stopPropagation */ - this.stopPropagation = function() { - if (e.stopPropagation) { - e.stopPropagation(); - } else { - e.cancelBubble = true; - } - wrapper.stopped = 1; - }; /** * Stops the propagation to the next bubble target and @@ -391,29 +302,14 @@ Y.DOMEventFacade = function(ev, currentTarget, wrapper) { * on the current target. * @method stopImmediatePropagation */ - this.stopImmediatePropagation = function() { - if (e.stopImmediatePropagation) { - e.stopImmediatePropagation(); - } else { - this.stopPropagation(); - } - wrapper.stopped = 2; - }; /** * Prevents the event's default behavior * @method preventDefault * @param returnValue {string} sets the returnValue of the event to this value - * (rather than the default false value). This can be used to add a customized + * (rather than the default false value). This can be used to add a customized * confirmation query to the beforeunload event). */ - this.preventDefault = function(returnValue) { - if (e.preventDefault) { - e.preventDefault(); - } - e.returnValue = returnValue || false; - wrapper.prevented = 1; - }; /** * Stops the event propagation and prevents the default @@ -422,19 +318,6 @@ Y.DOMEventFacade = function(ev, currentTarget, wrapper) { * @param immediate {boolean} if true additional listeners * on the current target will not be executed */ - this.halt = function(immediate) { - if (immediate) { - this.stopImmediatePropagation(); - } else { - this.stopPropagation(); - } - - this.preventDefault(); - }; - -}; - -})(); (function() { /** * DOM event listener abstraction layer @@ -455,32 +338,34 @@ Y.Env.evt.dom_wrappers = {}; Y.Env.evt.dom_map = {}; var _eventenv = Y.Env.evt, -add = YUI.Env.add, -remove = YUI.Env.remove, - -onLoad = function() { - YUI.Env.windowLoaded = true; - Y.Event._load(); - remove(window, "load", onLoad); -}, + config = Y.config, + win = config.win, + add = YUI.Env.add, + remove = YUI.Env.remove, + + onLoad = function() { + YUI.Env.windowLoaded = true; + Y.Event._load(); + remove(win, "load", onLoad); + }, -onUnload = function() { - Y.Event._unload(); - remove(window, "unload", onUnload); -}, + onUnload = function() { + Y.Event._unload(); + }, -EVENT_READY = 'domready', + EVENT_READY = 'domready', -COMPAT_ARG = '~yui|2|compat~', + COMPAT_ARG = '~yui|2|compat~', -shouldIterate = function(o) { - try { - return (o && typeof o !== "string" && Y.Lang.isNumber(o.length) && !o.tagName && !o.alert); - } catch(ex) { - return false; - } + shouldIterate = function(o) { + try { + return (o && typeof o !== "string" && Y.Lang.isNumber(o.length) && + !o.tagName && !o.alert); + } catch(ex) { + return false; + } -}, + }, Event = function() { @@ -512,7 +397,7 @@ Event = function() { _avail = [], /** - * Custom event wrappers for DOM events. Key is + * Custom event wrappers for DOM events. Key is * 'event:' + Element uid stamp + event type * @property _wrappers * @type Y.Event.Custom @@ -524,7 +409,7 @@ Event = function() { _windowLoadKey = null, /** - * Custom event wrapper map DOM events. Key is + * Custom event wrapper map DOM events. Key is * Element uid stamp. Each item is a hash of custom event * wrappers as provided in the _wrappers collection. This * provides the infrastructure for getListeners. @@ -599,10 +484,8 @@ Event = function() { * @private */ startInterval: function() { - var E = Y.Event; - - if (!E._interval) { -E._interval = setInterval(Y.bind(E._poll, E), E.POLL_INTERVAL); + if (!Event._interval) { +Event._interval = setInterval(Event._poll, Event.POLL_INTERVAL); } }, @@ -638,19 +521,19 @@ E._interval = setInterval(Y.bind(E._poll, E), E.POLL_INTERVAL); for (i=0; i 0); @@ -1103,11 +982,8 @@ E._interval = setInterval(Y.bind(E._poll, E), E.POLL_INTERVAL); notAvail = []; executeItem = function (el, item) { - var context, ov = item.override; - if (item.compat) { - if (item.override) { if (ov === true) { context = item.obj; @@ -1117,17 +993,13 @@ E._interval = setInterval(Y.bind(E._poll, E), E.POLL_INTERVAL); } else { context = el; } - item.fn.call(context, item.obj); - } else { context = item.obj || Y.one(el); item.fn.apply(context, (Y.Lang.isArray(ov)) ? ov : []); } - }; - // onAvailable for (i=0,len=_avail.length; i 4 ? Y.Array(arguments, 4, true) : []; + var a = arguments.length > 4 ? Y.Array(arguments, 4, true) : null; return Y.Event.onAvailable.call(Y.Event, id, fn, o, a); } }; /** - * Executes the callback as soon as the specified element + * Executes the callback as soon as the specified element * is detected in the DOM with a nextSibling property - * (indicating that the element's children are available) + * (indicating that the element's children are available). + * This function expects a selector + * string for the element(s) to detect. If you already have + * an element reference, you don't need this event. * @event contentready * @param type {string} 'contentready' * @param fn {function} the callback function to execute. - * @param el {string|HTMLElement|collection} the element(s) to attach + * @param el {string} an selector for the element(s) to attach. * @param context optional argument that specifies what 'this' refers to. * @param args* 0..n additional arguments to pass on to the callback function. * These arguments will be added after the event object. @@ -1369,10 +1261,10 @@ Y.Env.evt.plugins.available = { */ Y.Env.evt.plugins.contentready = { on: function(type, fn, id, o) { - var a = arguments.length > 4 ? Y.Array(arguments, 4, true) : []; + var a = arguments.length > 4 ? Y.Array(arguments, 4, true) : null; return Y.Event.onContentReady.call(Y.Event, id, fn, o, a); } }; -}, '3.0.0' ,{requires:['event-custom-base']}); +}, '3.3.0' ,{requires:['event-custom-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/event/event-delegate-min.js b/jssource/src_files/include/javascript/yui3/build/event/event-delegate-min.js index ae2e06dd..5892fee8 100644 --- a/jssource/src_files/include/javascript/yui3/build/event/event-delegate-min.js +++ b/jssource/src_files/include/javascript/yui3/build/event/event-delegate-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("event-delegate",function(B){var I=B.Event,F=B.Lang,E={},A={mouseenter:"mouseover",mouseleave:"mouseout"},H=function(K){try{if(K&&3==K.nodeType){return K.parentNode;}}catch(J){}return K;},D=function(K,P,M){var Q=H((P.target||P.srcElement)),N=E[K],T,O,L,S,R;var J=function(X,U,V){var W;if(!X||X===V){W=false;}else{W=B.Selector.test(X,U)?X:J(X.parentNode,U,V);}return W;};for(T in N){if(N.hasOwnProperty(T)){O=N[T];S=N.fn;L=null;if(B.Selector.test(Q,T,M)){L=Q;}else{if(B.Selector.test(Q,((T.replace(/,/gi," *,"))+" *"),M)){L=J(Q,T,M);}}if(L){if(!R){R=new B.DOMEventFacade(P,M);R.container=R.currentTarget;}R.currentTarget=B.Node.get(L);B.publish(O,{contextFn:function(){return R.currentTarget;}});if(S){S(R,O);}else{B.fire(O,R);}}}}},G=function(M,L,K){var O={focus:I._attachFocus,blur:I._attachBlur},N=O[M],J=[M,function(P){D(L,(P||window.event),K);},K];if(N){return N(J,{capture:true,facade:false});}else{return I._attach(J,{facade:false});}},C=B.cached(function(J){return J.replace(/[|,:]/g,"~");});B.Env.evt.plugins.delegate={on:function(O,N,M,J,K){var L=B.Array(arguments,0,true);L.splice(3,1);L[0]=J;return B.delegate.apply(B,L);}};I.delegate=function(R,U,K,W){if(!W){return false;}var O=B.Array(arguments,0,true),M=K,N;if(F.isString(K)){M=B.Selector.query(K,null,true);if(!M){N=I.onAvailable(K,function(){N.handle=I.delegate.apply(I,O);},I,true,false);return N;}}M=B.Node.getDOMNode(M);var S=B.stamp(M),L="delegate:"+S+R+C(W),J=R+S,Q=E[J],T,V,P;if(!Q){Q={};if(A[R]){if(!I._fireMouseEnter){return false;}R=A[R];Q.fn=I._fireMouseEnter;}T=G(R,J,M);B.after(function(X){if(T.sub==X){delete E[J];B.detachAll(L);}},T.evt,"_delete");Q.handle=T;E[J]=Q;}P=Q.listeners;Q.listeners=P?(P+1):1;Q[W]=L;O[0]=L;O.splice(2,2);V=B.on.apply(B,O);B.after(function(){Q.listeners=(Q.listeners-1);if(Q.listeners===0){Q.handle.detach();}},V,"detach");return V;};B.delegate=I.delegate;},"3.0.0",{requires:["node-base"]}); \ No newline at end of file +YUI.add("event-delegate",function(a){var c=a.Array,h=a.Lang,b=h.isString,i=h.isObject,e=h.isArray,g=a.Selector.test,d=a.Env.evt.handles;function f(u,w,l,k){var s=c(arguments,0,true),t=b(l)?l:null,r,o,j,n,v,m,q,x,p;if(i(u)){x=[];if(e(u)){for(m=0,q=u.length;m1){v=r.shift();u=r.shift();}o=a.Node.DOM_EVENTS[u];if(i(o)&&o.delegate){p=o.delegate.apply(o,arguments);}if(!p){if(!u||!w||!l||!k){return;}j=(t)?a.Selector.query(t,null,true):l;if(!j&&b(l)){p=a.on("available",function(){a.mix(p,a.delegate.apply(a,s),true);},l);}if(!p&&j){s.splice(2,2,j);p=a.Event._attach(s,{facade:false});p.sub.filter=k;p.sub._notify=f.notifySub;}}if(p&&v){n=d[v]||(d[v]={});n=n[u]||(n[u]=[]);n.push(p);}return p;}f.notifySub=function(q,l,p){l=l.slice();if(this.args){l.push.apply(l,this.args);}var o=f._applyFilter(this.filter,l,p),n,m,j,k;if(o){o=c(o);n=l[0]=new a.DOMEventFacade(l[0],p.el,p);n.container=a.one(p.el);for(m=0,j=o.length;mSets up event delegation on a container element. The delegated event + * will use a supplied selector or filtering function to test if the event + * references at least one node that should trigger the subscription + * callback.

          * - * The event object for the delegated event is supplied to the callback - * function. It is modified slightly in order to support all properties - * that may be needed for event delegation. 'currentTarget' is set to - * the element that matched the delegation specifcation. 'container' is - * set to the element that the listener is bound to (this normally would - * be the 'currentTarget'). + *

          Selector string filters will trigger the callback if the event originated + * from a node that matches it or is contained in a node that matches it. + * Function filters are called for each Node up the parent axis to the + * subscribing container node, and receive at each level the Node and the event + * object. The function should return true (or a truthy value) if that Node + * should trigger the subscription callback. Note, it is possible for filters + * to match multiple Nodes for a single event. In this case, the delegate + * callback will be executed for each matching Node.

          * - * @event delegate - * @param type {string} 'delegate' - * @param fn {function} the callback function to execute. This function - * will be provided the event object for the delegated event. - * @param el {string|node} the element that is the delegation container - * @param delegateType {string} the event type to delegate - * @param spec {string} a selector that must match the target of the - * event. - * @param context optional argument that specifies what 'this' refers to. - * @param args* 0..n additional arguments to pass on to the callback function. - * These arguments will be added after the event object. - * @return {EventHandle} the detach handle - * @for YUI - * @deprecated use Y.delegate - */ -Y.Env.evt.plugins.delegate = { - - on: function(type, fn, el, delegateType, spec) { - - - var args = Y.Array(arguments, 0, true); - - args.splice(3, 1); - - args[0] = delegateType; - - return Y.delegate.apply(Y, args); - - } - -}; - - -/** - * Sets up event delegation on a container element. The delegated event - * will use a supplied selector to test if the target or one of the - * descendants of the target match it. The supplied callback function - * will only be executed if a match was encountered, and, in fact, - * will be executed for each element that matches if you supply an - * ambiguous selector. - * - * The event object for the delegated event is supplied to the callback - * function. It is modified slightly in order to support all properties - * that may be needed for event delegation. 'currentTarget' is set to - * the element that matched the delegation specifcation. 'container' is - * set to the element that the listener is bound to (this normally would - * be the 'currentTarget'). + *

          For each matching Node, the callback will be executed with its 'this' + * object set to the Node matched by the filter (unless a specific context was + * provided during subscription), and the provided event's + * currentTarget will also be set to the matching Node. The + * containing Node from which the subscription was originally made can be + * referenced as e.container. * * @method delegate - * @param type {string} the event type to delegate - * @param fn {function} the callback function to execute. This function - * will be provided the event object for the delegated event. - * @param el {string|node} the element that is the delegation container - * @param spec {string} a selector that must match the target of the - * event. + * @param type {String} the event type to delegate + * @param fn {Function} the callback function to execute. This function + * will be provided the event object for the delegated event. + * @param el {String|node} the element that is the delegation container + * @param spec {string|Function} a selector that must match the target of the + * event or a function to test target and its parents for a match * @param context optional argument that specifies what 'this' refers to. * @param args* 0..n additional arguments to pass on to the callback function. - * These arguments will be added after the event object. + * These arguments will be added after the event object. * @return {EventHandle} the detach handle * @for YUI */ -Event.delegate = function (type, fn, el, spec) { +function delegate(type, fn, el, filter) { + var args = toArray(arguments, 0, true), + query = isString(el) ? el : null, + typeBits, synth, container, categories, cat, i, len, handles, handle; + + // Support Y.delegate({ click: fnA, key: fnB }, context, filter, ...); + // and Y.delegate(['click', 'key'], fn, context, filter, ...); + if (isObject(type)) { + handles = []; + + if (isArray(type)) { + for (i = 0, len = type.length; i < len; ++i) { + args[0] = type[i]; + handles.push(Y.delegate.apply(Y, args)); + } + } else { + // Y.delegate({'click', fn}, context, filter) => + // Y.delegate('click', fn, context, filter) + args.unshift(null); // one arg becomes two; need to make space + + for (i in type) { + if (type.hasOwnProperty(i)) { + args[0] = i; + args[1] = type[i]; + handles.push(Y.delegate.apply(Y, args)); + } + } + } - if (!spec) { - return false; + return new Y.EventHandle(handles); } + typeBits = type.split(/\|/); - var args = Y.Array(arguments, 0, true), - element = el, // HTML element serving as the delegation container - availHandle; - - - if (Lang.isString(el)) { - - // Y.Selector.query returns an array of matches unless specified - // to return just the first match. Since the primary use case for - // event delegation is to use a single event handler on a container, - // Y.delegate doesn't currently support being able to bind a - // single listener to multiple containers. - - element = Y.Selector.query(el, null, true); - - if (!element) { // Not found, check using onAvailable - - availHandle = Event.onAvailable(el, function() { - - availHandle.handle = Event.delegate.apply(Event, args); - - }, Event, true, false); - - return availHandle; - - } - - } - - - element = Y.Node.getDOMNode(element); - - - var guid = Y.stamp(element), - - // The Custom Event for the delegation spec - ename = 'delegate:' + guid + type + sanitize(spec), + if (typeBits.length > 1) { + cat = typeBits.shift(); + type = typeBits.shift(); + } - // The key to the listener for the event type and container - delegateKey = type + guid, + synth = Y.Node.DOM_EVENTS[type]; - delegate = delegates[delegateKey], + if (isObject(synth) && synth.delegate) { + handle = synth.delegate.apply(synth, arguments); + } - domEventHandle, - - ceHandle, - - listeners; - + if (!handle) { + if (!type || !fn || !el || !filter) { + return; + } - if (!delegate) { + container = (query) ? Y.Selector.query(query, null, true) : el; - delegate = {}; + if (!container && isString(el)) { + handle = Y.on('available', function () { + Y.mix(handle, Y.delegate.apply(Y, args), true); + }, el); + } - if (specialTypes[type]) { - - if (!Event._fireMouseEnter) { - return false; - } - - type = specialTypes[type]; - delegate.fn = Event._fireMouseEnter; - - } + if (!handle && container) { + args.splice(2, 2, container); // remove the filter - // Create the DOM Event wrapper that will fire the Custom Event + handle = Y.Event._attach(args, { facade: false }); + handle.sub.filter = filter; + handle.sub._notify = delegate.notifySub; + } + } - domEventHandle = attach(type, delegateKey, element); + if (handle && cat) { + categories = detachCategories[cat] || (detachCategories[cat] = {}); + categories = categories[type] || (categories[type] = []); + categories.push(handle); + } + return handle; +} - // Hook into the _delete method for the Custom Event wrapper of this - // DOM Event in order to clean up the 'delegates' map and unsubscribe - // the associated Custom Event listeners fired by this DOM event - // listener if/when the user calls "purgeElement" OR removes all - // listeners of the Custom Event. - - Y.after(function (sub) { +/** + * Overrides the _notify method on the normal DOM subscription to + * inject the filtering logic and only proceed in the case of a match. + * + * @method delegate.notifySub + * @param thisObj {Object} default 'this' object for the callback + * @param args {Array} arguments passed to the event's fire() + * @param ce {CustomEvent} the custom event managing the DOM subscriptions for + * the subscribed event on the subscribing node. + * @return {Boolean} false if the event was stopped + * @private + * @static + * @since 3.2.0 + */ +delegate.notifySub = function (thisObj, args, ce) { + // Preserve args for other subscribers + args = args.slice(); + if (this.args) { + args.push.apply(args, this.args); + } - if (domEventHandle.sub == sub) { + // Only notify subs if the event occurred on a targeted element + var currentTarget = delegate._applyFilter(this.filter, args, ce), + //container = e.currentTarget, + e, i, len, ret; - // Delete this event from the map of known delegates - delete delegates[delegateKey]; + if (currentTarget) { + // Support multiple matches up the the container subtree + currentTarget = toArray(currentTarget); + // The second arg is the currentTarget, but we'll be reusing this + // facade, replacing the currentTarget for each use, so it doesn't + // matter what element we seed it with. + e = args[0] = new Y.DOMEventFacade(args[0], ce.el, ce); - // Unsubscribe all listeners of the Custom Event fired - // by this DOM event. - Y.detachAll(ename); - - } + e.container = Y.one(ce.el); + + for (i = 0, len = currentTarget.length; i < len && !e.stopped; ++i) { + e.currentTarget = Y.one(currentTarget[i]); - }, domEventHandle.evt, "_delete"); - - delegate.handle = domEventHandle; + ret = this.fn.apply(this.context || e.currentTarget, args); - delegates[delegateKey] = delegate; + if (ret === false) { // stop further notifications + break; + } + } + return ret; } +}; +/** + *

          Compiles a selector string into a filter function to identify whether + * Nodes along the parent axis of an event's target should trigger event + * notification.

          + * + *

          This function is memoized, so previously compiled filter functions are + * returned if the same selector string is provided.

          + * + *

          This function may be useful when defining synthetic events for delegate + * handling.

          + * + * @method delegate.compileFilter + * @param selector {String} the selector string to base the filtration on + * @return {Function} + * @since 3.2.0 + * @static + */ +delegate.compileFilter = Y.cached(function (selector) { + return function (target, e) { + return selectorTest(target._node, selector, e.currentTarget._node); + }; +}); - listeners = delegate.listeners; - - delegate.listeners = listeners ? (listeners + 1) : 1; - delegate[spec] = ename; - +/** + * Walks up the parent axis of an event's target, and tests each element + * against a supplied filter function. If any Nodes, including the container, + * satisfy the filter, the delegated callback will be triggered for each. + * + * @method delegate._applyFilter + * @param filter {Function} boolean function to test for inclusion in event + * notification + * @param args {Array} the arguments that would be passed to subscribers + * @param ce {CustomEvent} the DOM event wrapper + * @return {Node|Node[]|undefined} The Node or Nodes that satisfy the filter + * @protected + */ +delegate._applyFilter = function (filter, args, ce) { + var e = args[0], + container = ce.el, // facadeless events in IE, have no e.currentTarget + target = e.target || e.srcElement, + match = [], + isContainer = false; + + // Resolve text nodes to their containing element + if (target.nodeType === 3) { + target = target.parentNode; + } - args[0] = ename; + // passing target as the first arg rather than leaving well enough alone + // making 'this' in the filter function refer to the target. This is to + // support bound filter functions. + args.unshift(target); - // Remove element, delegation spec - args.splice(2, 2); - + if (isString(filter)) { + while (target) { + isContainer = (target === container); + if (selectorTest(target, filter, (isContainer ?null: container))) { + match.push(target); + } - // Subscribe to the Custom Event for the delegation spec + if (isContainer) { + break; + } - ceHandle = Y.on.apply(Y, args); + target = target.parentNode; + } + } else { + // filter functions are implementer code and should receive wrappers + args[0] = Y.one(target); + args[1] = new Y.DOMEventFacade(e, container, ce); + + while (target) { + // filter(target, e, extra args...) - this === target + if (filter.apply(args[0], args)) { + match.push(target); + } + if (target === container) { + break; + } - // Hook into the detach method of the handle in order to clean up the - // 'delegates' map and remove the associated DOM event handler - // responsible for firing this Custom Event if all listener for this - // event have been removed. + target = target.parentNode; + args[0] = Y.one(target); + } + args[1] = e; // restore the raw DOM event + } - Y.after(function () { - - delegate.listeners = (delegate.listeners - 1); - - if (delegate.listeners === 0) { - delegate.handle.detach(); - } + if (match.length <= 1) { + match = match[0]; // single match or undefined + } - }, ceHandle, "detach"); + // remove the target + args.shift(); - return ceHandle; - + return match; }; -Y.delegate = Event.delegate; +/** + * Sets up event delegation on a container element. The delegated event + * will use a supplied filter to test if the callback should be executed. + * This filter can be either a selector string or a function that returns + * a Node to use as the currentTarget for the event. + * + * The event object for the delegated event is supplied to the callback + * function. It is modified slightly in order to support all properties + * that may be needed for event delegation. 'currentTarget' is set to + * the element that matched the selector string filter or the Node returned + * from the filter function. 'container' is set to the element that the + * listener is delegated from (this normally would be the 'currentTarget'). + * + * Filter functions will be called with the arguments that would be passed to + * the callback function, including the event object as the first parameter. + * The function should return false (or a falsey value) if the success criteria + * aren't met, and the Node to use as the event's currentTarget and 'this' + * object if they are. + * + * @method delegate + * @param type {string} the event type to delegate + * @param fn {function} the callback function to execute. This function + * will be provided the event object for the delegated event. + * @param el {string|node} the element that is the delegation container + * @param filter {string|function} a selector that must match the target of the + * event or a function that returns a Node or false. + * @param context optional argument that specifies what 'this' refers to. + * @param args* 0..n additional arguments to pass on to the callback function. + * These arguments will be added after the event object. + * @return {EventHandle} the detach handle + * @for YUI + */ +Y.delegate = Y.Event.delegate = delegate; -}, '3.0.0' ,{requires:['node-base']}); +}, '3.3.0' ,{requires:['node-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/event/event-focus-min.js b/jssource/src_files/include/javascript/yui3/build/event/event-focus-min.js index 902bf034..9ceafe6f 100644 --- a/jssource/src_files/include/javascript/yui3/build/event/event-focus-min.js +++ b/jssource/src_files/include/javascript/yui3/build/event/event-focus-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("event-focus",function(A){(function(){var I=A.UA,J=A.Event,E=A.Env.evt.plugins,C=I.ie,F=(I.opera||I.webkit),D={focus:(C?"focusin":(F?"DOMFocusIn":"focus")),blur:(C?"focusout":(F?"DOMFocusOut":"blur"))},G={capture:(I.gecko?true:false)},H=function(M,L){var K=A.Array(M,0,true);K[0]=D[K[0]];return J._attach(K,L);},B={on:function(){return H(arguments,G);}};J._attachFocus=H;J._attachBlur=H;E.focus=B;E.blur=B;})();},"3.0.0",{requires:["node-base"]}); \ No newline at end of file +YUI.add("event-focus",function(e){var d=e.Event,c=e.Lang,a=c.isString,b=c.isFunction(e.DOM.create('

          ').onbeforeactivate);function f(h,g,j){var i="_"+h+"Notifiers";e.Event.define(h,{_attach:function(l,m,k){if(e.DOM.isWindow(l)){return d._attach([h,function(n){m.fire(n);},l]);}else{return d._attach([g,this._proxy,l,this,m,k],{capture:true});}},_proxy:function(o,s,p){var m=o.target,q=m.getData(i),t=e.stamp(o.currentTarget._node),k=(b||o.target!==o.currentTarget),l=s.handle.sub,r=[m,o].concat(l.args||[]),n;s.currentTarget=(p)?m:o.currentTarget;s.container=(p)?o.currentTarget:null;if(!l.filter||l.filter.apply(m,r)){if(!q){q={};m.setData(i,q);if(k){n=d._attach([j,this._notify,m._node]).sub;n.once=true;}}if(!q[t]){q[t]=[];}q[t].push(s);if(!k){this._notify(o);}}},_notify:function(p,l){var m=p.currentTarget,r=m.getData(i),s=m.get("ownerDocument")||m,q=m,k=[],t,n,o;if(r){while(q&&q!==s){k.push.apply(k,r[e.stamp(q)]||[]);q=q.get("parentNode");}k.push.apply(k,r[e.stamp(s)]||[]);for(n=0,o=k.length;n').onbeforeactivate); + +function define(type, proxy, directEvent) { + var nodeDataKey = '_' + type + 'Notifiers'; + + Y.Event.define(type, { + + _attach: function (el, notifier, delegate) { + if (Y.DOM.isWindow(el)) { + return Event._attach([type, function (e) { + notifier.fire(e); + }, el]); + } else { + return Event._attach( + [proxy, this._proxy, el, this, notifier, delegate], + { capture: true }); + } + }, + + _proxy: function (e, notifier, delegate) { + var node = e.target, + notifiers = node.getData(nodeDataKey), + yuid = Y.stamp(e.currentTarget._node), + defer = (useActivate || e.target !== e.currentTarget), + sub = notifier.handle.sub, + filterArgs = [node, e].concat(sub.args || []), + directSub; + + notifier.currentTarget = (delegate) ? node : e.currentTarget; + notifier.container = (delegate) ? e.currentTarget : null; + + if (!sub.filter || sub.filter.apply(node, filterArgs)) { + // Maintain a list to handle subscriptions from nested + // containers div#a>div#b>input #a.on(focus..) #b.on(focus..), + // use one focus or blur subscription that fires notifiers from + // #b then #a to emulate bubble sequence. + if (!notifiers) { + notifiers = {}; + node.setData(nodeDataKey, notifiers); + + // only subscribe to the element's focus if the target is + // not the current target ( + if (defer) { + directSub = Event._attach( + [directEvent, this._notify, node._node]).sub; + directSub.once = true; + } + } + + if (!notifiers[yuid]) { + notifiers[yuid] = []; + } + + notifiers[yuid].push(notifier); + + if (!defer) { + this._notify(e); + } + } + }, + + _notify: function (e, container) { + var node = e.currentTarget, + notifiers = node.getData(nodeDataKey), + // document.get('ownerDocument') returns null + doc = node.get('ownerDocument') || node, + target = node, + nots = [], + notifier, i, len; + + if (notifiers) { + // Walk up the parent axis until the origin node, + while (target && target !== doc) { + nots.push.apply(nots, notifiers[Y.stamp(target)] || []); + target = target.get('parentNode'); + } + nots.push.apply(nots, notifiers[Y.stamp(doc)] || []); + + for (i = 0, len = nots.length; i < len; ++i) { + notifier = nots[i]; + e.currentTarget = nots[i].currentTarget; + + if (notifier.container) { + e.container = notifier.container; + } else { + delete e.container; + } + + notifier.fire(e); + } + + // clear the notifications list (mainly for delegation) + node.clearData(nodeDataKey); + } + }, + + on: function (node, sub, notifier) { + sub.onHandle = this._attach(node._node, notifier); + }, + + detach: function (node, sub) { + sub.onHandle.detach(); + }, + + delegate: function (node, sub, notifier, filter) { + if (isString(filter)) { + sub.filter = Y.delegate.compileFilter(filter); + } + + sub.delegateHandle = this._attach(node._node, notifier, true); + }, + + detachDelegate: function (node, sub) { + sub.delegateHandle.detach(); + } + }, true); +} + +// For IE, we need to defer to focusin rather than focus because +// `el.focus(); doSomething();` executes el.onbeforeactivate, el.onactivate, +// el.onfocusin, doSomething, then el.onfocus. All others support capture +// phase focus, which executes before doSomething. To guarantee consistent +// behavior for this use case, IE's direct subscriptions are made against +// focusin so subscribers will be notified before js following el.focus() is +// executed. +if (useActivate) { + // name capture phase direct subscription + define("focus", "beforeactivate", "focusin"); + define("blur", "beforedeactivate", "focusout"); +} else { + define("focus", "focus", "focus"); + define("blur", "blur", "blur"); +} + + +}, '3.3.0' ,{requires:['event-synthetic']}); diff --git a/jssource/src_files/include/javascript/yui3/build/event/event-hover-min.js b/jssource/src_files/include/javascript/yui3/build/event/event-hover-min.js new file mode 100644 index 00000000..54b183df --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/event/event-hover-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("event-hover",function(d){var c=d.Lang.isFunction,b=function(){},a={processArgs:function(e){var f=c(e[2])?2:3;return(c(e[f]))?e.splice(f,1)[0]:b;},on:function(h,f,g,e){f._detach=h[(e)?"delegate":"on"]({mouseenter:d.bind(g.fire,g),mouseleave:f._extra},e);},detach:function(g,e,f){e._detacher.detach();}};a.delegate=a.on;a.detachDelegate=a.detach;d.Event.define("hover",a);},"3.3.0",{requires:["event-mouseenter"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/event/event-hover.js b/jssource/src_files/include/javascript/yui3/build/event/event-hover.js new file mode 100644 index 00000000..32cff370 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/event/event-hover.js @@ -0,0 +1,62 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('event-hover', function(Y) { + +/** + * Adds support for a "hover" event. The event provides a convenience wrapper + * for subscribing separately to mouseenter and mouseleave. The signature for + * subscribing to the event is

          + * + *
          node.on("hover", overFn, outFn);
          + * node.delegate("hover", overFn, outFn, ".filterSelector");
          + * Y.on("hover", overFn, outFn, ".targetSelector");
          + * Y.delegate("hover", overFn, outFn, "#container", ".filterSelector");
          + * 
          + * + *

          Additionally, for compatibility with a more typical subscription + * signature, the following are also supported:

          + * + *
          Y.on("hover", overFn, ".targetSelector", outFn);
          + * Y.delegate("hover", overFn, "#container", outFn, ".filterSelector");
          + * 
          + * + * @module event + * @submodule event-hover + */ +var isFunction = Y.Lang.isFunction, + noop = function () {}, + conf = { + processArgs: function (args) { + // Y.delegate('hover', over, out, '#container', '.filter') + // comes in as ['hover', over, out, '#container', '.filter'], but + // node.delegate('hover', over, out, '.filter') + // comes in as ['hover', over, containerEl, out, '.filter'] + var i = isFunction(args[2]) ? 2 : 3; + + return (isFunction(args[i])) ? args.splice(i,1)[0] : noop; + }, + + on: function (node, sub, notifier, filter) { + sub._detach = node[(filter) ? "delegate" : "on"]({ + mouseenter: Y.bind(notifier.fire, notifier), + mouseleave: sub._extra + }, filter); + }, + + detach: function (node, sub, notifier) { + sub._detacher.detach(); + } + }; + +conf.delegate = conf.on; +conf.detachDelegate = conf.detach; + +Y.Event.define("hover", conf); + + +}, '3.3.0' ,{requires:['event-mouseenter']}); diff --git a/jssource/src_files/include/javascript/yui3/build/event/event-key-min.js b/jssource/src_files/include/javascript/yui3/build/event/event-key-min.js index c8dee541..6e1e8f4c 100644 --- a/jssource/src_files/include/javascript/yui3/build/event/event-key-min.js +++ b/jssource/src_files/include/javascript/yui3/build/event/event-key-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("event-key",function(A){A.Env.evt.plugins.key={on:function(E,G,B,K,C){var I=A.Array(arguments,0,true),F,J,H,D;F=K&&K.split(":");if(!K||K.indexOf(":")==-1||!F[1]){I[0]="key"+((F&&F[0])||"press");return A.on.apply(A,I);}J=F[0];H=(F[1])?F[1].split(/,|\+/):null;D=(A.Lang.isString(B)?B:A.stamp(B))+K;D=D.replace(/,/g,"_");if(!A.getEvent(D)){A.on(E+J,function(P){var Q=false,M=false,N,L,O;for(N=0;N4)?W.slice(4):null);if(T){Z.fire();}return V;},detach:function(X,Z,S,U){var W=A.Array(arguments,0,true),a,V,T,Y,Q,R;if(W[W.length-1]===E){a=true;}if(X&&X.detach){return X.detach();}if(typeof S=="string"){if(a){S=A.DOM.byId(S);}else{S=A.Selector.query(S);T=S.length;if(T<1){S=null;}else{if(T==1){S=S[0];}}}}if(!S){return false;}if(F(S)){Y=true;for(V=0,T=S.length;V0);}U=[];W=function(Z,a){var Y,X=a.override;if(a.compat){if(a.override){if(X===true){Y=a.obj;}else{Y=X;}}else{Y=Z;}a.fn.call(Y,a.obj);}else{Y=a.obj||A.one(Z);a.fn.apply(Y,(A.Lang.isArray(X))?X:[]);}};for(R=0,Q=L.length;R4?A.Array(arguments,4,true):[];return A.Event.onAvailable.call(A.Event,F,C,E,B);}};A.Env.evt.plugins.contentready={on:function(D,C,F,E){var B=arguments.length>4?A.Array(arguments,4,true):[];return A.Event.onContentReady.call(A.Event,F,C,E,B);}};},"3.0.0",{requires:["event-custom-base"]});YUI.add("event-delegate",function(B){var I=B.Event,F=B.Lang,E={},A={mouseenter:"mouseover",mouseleave:"mouseout"},H=function(K){try{if(K&&3==K.nodeType){return K.parentNode;}}catch(J){}return K;},D=function(K,P,M){var Q=H((P.target||P.srcElement)),N=E[K],T,O,L,S,R;var J=function(X,U,V){var W;if(!X||X===V){W=false;}else{W=B.Selector.test(X,U)?X:J(X.parentNode,U,V);}return W;};for(T in N){if(N.hasOwnProperty(T)){O=N[T];S=N.fn;L=null;if(B.Selector.test(Q,T,M)){L=Q;}else{if(B.Selector.test(Q,((T.replace(/,/gi," *,"))+" *"),M)){L=J(Q,T,M);}}if(L){if(!R){R=new B.DOMEventFacade(P,M);R.container=R.currentTarget;}R.currentTarget=B.Node.get(L);B.publish(O,{contextFn:function(){return R.currentTarget;}});if(S){S(R,O);}else{B.fire(O,R);}}}}},G=function(M,L,K){var O={focus:I._attachFocus,blur:I._attachBlur},N=O[M],J=[M,function(P){D(L,(P||window.event),K);},K];if(N){return N(J,{capture:true,facade:false});}else{return I._attach(J,{facade:false});}},C=B.cached(function(J){return J.replace(/[|,:]/g,"~");});B.Env.evt.plugins.delegate={on:function(O,N,M,J,K){var L=B.Array(arguments,0,true);L.splice(3,1);L[0]=J;return B.delegate.apply(B,L);}};I.delegate=function(R,U,K,W){if(!W){return false;}var O=B.Array(arguments,0,true),M=K,N;if(F.isString(K)){M=B.Selector.query(K,null,true);if(!M){N=I.onAvailable(K,function(){N.handle=I.delegate.apply(I,O);},I,true,false);return N;}}M=B.Node.getDOMNode(M);var S=B.stamp(M),L="delegate:"+S+R+C(W),J=R+S,Q=E[J],T,V,P;if(!Q){Q={};if(A[R]){if(!I._fireMouseEnter){return false;}R=A[R];Q.fn=I._fireMouseEnter;}T=G(R,J,M);B.after(function(X){if(T.sub==X){delete E[J];B.detachAll(L);}},T.evt,"_delete");Q.handle=T;E[J]=Q;}P=Q.listeners;Q.listeners=P?(P+1):1;Q[W]=L;O[0]=L;O.splice(2,2);V=B.on.apply(B,O);B.after(function(){Q.listeners=(Q.listeners-1);if(Q.listeners===0){Q.handle.detach();}},V,"detach");return V;};B.delegate=I.delegate;},"3.0.0",{requires:["node-base"]});YUI.add("event-mousewheel",function(C){var B="DOMMouseScroll",A=function(E){var D=C.Array(E,0,true),F;if(C.UA.gecko){D[0]=B;F=C.config.win;}else{F=C.config.doc;}if(D.length<3){D[2]=F;}else{D.splice(2,0,F);}return D;};C.Env.evt.plugins.mousewheel={on:function(){return C.Event._attach(A(arguments));},detach:function(){return C.Event.detach.apply(C.Event,A(arguments));}};},"3.0.0",{requires:["node-base"]});YUI.add("event-mouseenter",function(F){var C=F.Event,E=F.Lang,B=F.Env.evt.plugins,D={},A={on:function(M,O,H){var L=F.Array(arguments,0,true),J=H,K;if(E.isString(H)){J=F.all(H);if(J.size()===0){K=C.onAvailable(H,function(){K.handle=F.on.apply(F,L);},C,true,false);return K;}}var R=(M==="mouseenter")?"mouseover":"mouseout",Q=M+":"+F.stamp(J)+R,I=D[Q],N,P,G;if(!I){N=F.on(R,F.rbind(C._fireMouseEnter,F,Q),J);F.after(function(S){if(N.sub==S){delete D[Q];F.detachAll(Q);}},N.evt,"_delete");I={};I.handle=N;D[Q]=I;}G=I.count;I.count=G?(G+1):1;L[0]=Q;L.splice(2,1);P=F.on.apply(F,L);F.after(function(){I.count=(I.count-1);if(I.count===0){I.handle.detach();}},P,"detach");return P;}};C._fireMouseEnter=function(J,H){var G=J.relatedTarget,I=J.currentTarget;if(I!==G&&!I.contains(G)){F.publish(H,{contextFn:function(){return I;}});F.fire(H,J);}};B.mouseenter=A;B.mouseleave=A;},"3.0.0",{requires:["node-base"]});YUI.add("event-key",function(A){A.Env.evt.plugins.key={on:function(E,G,B,K,C){var I=A.Array(arguments,0,true),F,J,H,D;F=K&&K.split(":");if(!K||K.indexOf(":")==-1||!F[1]){I[0]="key"+((F&&F[0])||"press");return A.on.apply(A,I);}J=F[0];H=(F[1])?F[1].split(/,|\+/):null;D=(A.Lang.isString(B)?B:A.stamp(B))+K;D=D.replace(/,/g,"_");if(!A.getEvent(D)){A.on(E+J,function(P){var Q=false,M=false,N,L,O;for(N=0;N4)?D.slice(4):null);if(z){H.fire();}return B;},detach:function(E,F,z,C){var D=e.Array(arguments,0,true),H,A,G,B,x,y;if(D[D.length-1]===k){H=true;}if(E&&E.detach){return E.detach();}if(typeof z=="string"){if(H){z=e.DOM.byId(z);}else{z=e.Selector.query(z);A=z.length;if(A<1){z=null;}else{if(A==1){z=z[0];}}}}if(!z){return false;}if(z.detach){D.splice(2,1);return z.detach.apply(z,D);}else{if(m(z)){G=true;for(B=0,A=z.length;B0);}B=[];D=function(G,H){var F,E=H.override;if(H.compat){if(H.override){if(E===true){F=H.obj;}else{F=E;}}else{F=G;}H.fn.call(F,H.obj);}else{F=H.obj||e.one(G);H.fn.apply(F,(e.Lang.isArray(E))?E:[]);}};for(y=0,x=s.length;y4?e.Array(arguments,4,true):null;return e.Event.onAvailable.call(e.Event,k,h,j,g);}};e.Env.evt.plugins.contentready={on:function(i,h,k,j){var g=arguments.length>4?e.Array(arguments,4,true):null;return e.Event.onContentReady.call(e.Event,k,h,j,g);}};},"3.3.0",{requires:["event-custom-base"]});YUI.add("event-delegate",function(a){var c=a.Array,h=a.Lang,b=h.isString,i=h.isObject,e=h.isArray,g=a.Selector.test,d=a.Env.evt.handles;function f(u,w,l,k){var s=c(arguments,0,true),t=b(l)?l:null,r,o,j,n,v,m,q,x,p;if(i(u)){x=[];if(e(u)){for(m=0,q=u.length;m1){v=r.shift();u=r.shift();}o=a.Node.DOM_EVENTS[u];if(i(o)&&o.delegate){p=o.delegate.apply(o,arguments);}if(!p){if(!u||!w||!l||!k){return;}j=(t)?a.Selector.query(t,null,true):l;if(!j&&b(l)){p=a.on("available",function(){a.mix(p,a.delegate.apply(a,s),true);},l);}if(!p&&j){s.splice(2,2,j);p=a.Event._attach(s,{facade:false});p.sub.filter=k;p.sub._notify=f.notifySub;}}if(p&&v){n=d[v]||(d[v]={});n=n[u]||(n[u]=[]);n.push(p);}return p;}f.notifySub=function(q,l,p){l=l.slice();if(this.args){l.push.apply(l,this.args);}var o=f._applyFilter(this.filter,l,p),n,m,j,k;if(o){o=c(o);n=l[0]=new a.DOMEventFacade(l[0],p.el,p);n.container=a.one(p.el);for(m=0,j=o.length;m=0){r[s].detach();}}};}return(k[l])?k[l].notifiers:null;},_deleteSub:function(l){if(l&&l.fn){var k=this.eventDef,m=(l.filter)?"detachDelegate":"detach";this.subscribers={};this.subCount=0;k[m](l.node,l,this.notifier,l.filter);k._unregisterSub(l);delete l.fn;delete l.node;delete l.context;}},prototype:{constructor:a,_init:function(){var k=this.publishConfig||(this.publishConfig={});this.emitFacade=("emitFacade" in k)?k.emitFacade:true;k.emitFacade=false;},processArgs:i,on:i,detach:i,delegate:i,detachDelegate:i,_on:function(n,p){var o=[],l=this.processArgs(n,p),k=n[2],r=p?"delegate":"on",m,q;m=(c(k))?e(k):d(k);if(!m.length&&c(k)){q=b.on("available",function(){b.mix(q,b[r].apply(b,n),true);},k);return q;}b.Array.each(m,function(t){var u=n.slice(),s;t=b.one(t);if(t){if(p){s=u.splice(3,1)[0];}u.splice(0,4,u[1],u[3]);if(!this.preventDups||!this.getSubs(t,n,null,true)){q=this._getNotifier(t,u,l,s);this[r](t,q.sub,q.notifier,s);o.push(q);}}},this);return(o.length===1)?o[0]:new b.EventHandle(o);},_getNotifier:function(n,q,o,m){var s=new b.CustomEvent(this.type,this.publishConfig),p=s.on.apply(s,q),r=new f(p,this.emitFacade),l=a.getRegistry(n,this.type,true),k=p.sub;p.notifier=r;k.node=n;k.filter=m;if(o){this.applyArgExtras(o,k);}b.mix(s,{eventDef:this,notifier:r,host:n,currentTarget:n,target:n,el:n._node,_delete:a._deleteSub},true);l.push(p);return p;},applyArgExtras:function(k,l){l._extra=k;},_unregisterSub:function(m){var k=a.getRegistry(m.node,this.type),l;if(k){for(l=k.length-1;l>=0;--l){if(k[l].sub===m){k.splice(l,1);break;}}}},_detach:function(m){var r=m[2],p=(c(r))?e(r):d(r),q,o,k,n,l;m.splice(2,1); +for(o=0,k=p.length;o=0;--l){n[l].detach();}}}}},getSubs:function(l,q,k,n){var r=a.getRegistry(l,this.type),s=[],m,p,o;if(r){if(!k){k=this.subMatch;}for(m=0,p=r.length;m').onbeforeactivate);function f(h,g,j){var i="_"+h+"Notifiers";e.Event.define(h,{_attach:function(l,m,k){if(e.DOM.isWindow(l)){return d._attach([h,function(n){m.fire(n);},l]);}else{return d._attach([g,this._proxy,l,this,m,k],{capture:true});}},_proxy:function(o,s,p){var m=o.target,q=m.getData(i),t=e.stamp(o.currentTarget._node),k=(b||o.target!==o.currentTarget),l=s.handle.sub,r=[m,o].concat(l.args||[]),n;s.currentTarget=(p)?m:o.currentTarget;s.container=(p)?o.currentTarget:null;if(!l.filter||l.filter.apply(m,r)){if(!q){q={};m.setData(i,q);if(k){n=d._attach([j,this._notify,m._node]).sub;n.once=true;}}if(!q[t]){q[t]=[];}q[t].push(s);if(!k){this._notify(o);}}},_notify:function(p,l){var m=p.currentTarget,r=m.getData(i),s=m.get("ownerDocument")||m,q=m,k=[],t,n,o;if(r){while(q&&q!==s){k.push.apply(k,r[e.stamp(q)]||[]);q=q.get("parentNode");}k.push.apply(k,r[e.stamp(s)]||[]);for(n=0,o=k.length;nAdds subscription and delegation support for mouseenter and mouseleave + * events. Unlike mouseover and mouseout, these events aren't fired from child + * elements of a subscribed node.

          + * + *

          This avoids receiving three mouseover notifications from a setup like

          + * + *
          div#container > p > a[href]
          + * + *

          where

          + * + *
          Y.one('#container').on('mouseover', callback)
          + * + *

          When the mouse moves over the link, one mouseover event is fired from + * #container, then when the mouse moves over the p, another mouseover event is + * fired and bubbles to #container, causing a second notification, and finally + * when the mouse moves over the link, a third mouseover event is fired and + * bubbles to #container for a third notification.

          + * + *

          By contrast, using mouseenter instead of mouseover, the callback would be + * executed only once when the mouse moves over #container.

          + * * @module event * @submodule event-mouseenter */ -var Event = Y.Event, - Lang = Y.Lang, +function notify(e, notifier) { + var current = e.currentTarget, + related = e.relatedTarget; - plugins = Y.Env.evt.plugins, - - listeners = {}, + if (current !== related && !current.contains(related)) { + notifier.fire(e); + } +} - eventConfig = { +var config = { + proxyType: "mouseover", - on: function(type, fn, el) { + on: function (node, sub, notifier) { + sub.onHandle = node.on(this.proxyType, notify, null, notifier); + }, - var args = Y.Array(arguments, 0, true), - element = el, - availHandle; + detach: function (node, sub) { + sub.onHandle.detach(); + }, + delegate: function (node, sub, notifier, filter) { + sub.delegateHandle = + Y.delegate(this.proxyType, notify, node, filter, null, notifier); + }, - if (Lang.isString(el)) { + detachDelegate: function (node, sub) { + sub.delegateHandle.detach(); + } +}; - // Need to use Y.all because if el is a string it could be a - // selector that returns a NodeList +Y.Event.define("mouseenter", config, true); +Y.Event.define("mouseleave", Y.merge(config, { proxyType: "mouseout" }), true); - element = Y.all(el); - if (element.size() === 0) { // Not found, check using onAvailable - - availHandle = Event.onAvailable(el, function() { - - availHandle.handle = Y.on.apply(Y, args); - - }, Event, true, false); - - return availHandle; - - } - - } - - - var sDOMEvent = (type === "mouseenter") ? "mouseover" : "mouseout", - - // The name of the custom event - sEventName = type + ":" + Y.stamp(element) + sDOMEvent, - - listener = listeners[sEventName], - - domEventHandle, - - ceHandle, - - nListeners; - - - // Bind an actual DOM event listener that will call the - // the custom event - if (!listener) { - - domEventHandle = Y.on(sDOMEvent, Y.rbind(Event._fireMouseEnter, Y, sEventName), element); - - // Hook into the _delete method for the Custom Event wrapper of this - // DOM Event in order to clean up the 'listeners' map and unsubscribe - // the associated Custom Event listeners fired by this DOM event - // listener if/when the user calls "purgeElement" OR removes all - // listeners of the Custom Event. - - Y.after(function (sub) { - - if (domEventHandle.sub == sub) { - - // Delete this event from the map of known mouseenter - // and mouseleave listeners - delete listeners[sEventName]; - - - // Unsubscribe all listeners of the Custom Event fired - // by this DOM event. - Y.detachAll(sEventName); - - } - - }, domEventHandle.evt, "_delete"); - - - listener = {}; - listener.handle = domEventHandle; - - listeners[sEventName] = listener; - - } - - nListeners = listener.count; - - listener.count = nListeners ? (nListeners + 1) : 1; - - args[0] = sEventName; - - // Remove the element from the args - args.splice(2, 1); - - // Subscribe to the custom event - ceHandle = Y.on.apply(Y, args); - - // Hook into the detach method of the handle in order to clean up the - // 'listeners' map and remove the associated DOM event handler - // responsible for firing this Custom Event if all listener for this - // event have been removed. - - Y.after(function () { - - listener.count = (listener.count - 1); - - if (listener.count === 0) { - listener.handle.detach(); - } - - }, ceHandle, "detach"); - - - return ceHandle; - - } - - }; - - -Event._fireMouseEnter = function (e, eventName) { - - var relatedTarget = e.relatedTarget, - currentTarget = e.currentTarget; - - if (currentTarget !== relatedTarget && - !currentTarget.contains(relatedTarget)) { - - Y.publish(eventName, { - contextFn: function() { - return currentTarget; - } - }); - - Y.fire(eventName, e); - - } - -}; - - -/** - * Sets up a "mouseenter" listener—a listener that is called the first time - * the user's mouse enters the specified element(s). - * - * @event mouseenter - * @param type {string} "mouseenter" - * @param fn {function} The method the event invokes. - * @param el {string|node} The element(s) to assign the listener to. - * @param spec {string} Optional. String representing a selector that must - * match the target of the event in order for the listener to be called. - * @return {EventHandle} the detach handle - * @for YUI - */ -plugins.mouseenter = eventConfig; - -/** -* Sets up a "mouseleave" listener—a listener that is called the first time -* the user's mouse leaves the specified element(s). -* -* @event mouseleave -* @param type {string} "mouseleave" -* @param fn {function} The method the event invokes. -* @param el {string|node} The element(s) to assign the listener to. -* @param spec {string} Optional. String representing a selector that must -* match the target of the event in order for the listener to be called. -* @return {EventHandle} the detach handle -* @for YUI - */ -plugins.mouseleave = eventConfig; - - -}, '3.0.0' ,{requires:['node-base']}); +}, '3.3.0' ,{requires:['event-synthetic']}); diff --git a/jssource/src_files/include/javascript/yui3/build/event/event-mousewheel-min.js b/jssource/src_files/include/javascript/yui3/build/event/event-mousewheel-min.js index 02a549da..f0fa4604 100644 --- a/jssource/src_files/include/javascript/yui3/build/event/event-mousewheel-min.js +++ b/jssource/src_files/include/javascript/yui3/build/event/event-mousewheel-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("event-mousewheel",function(C){var B="DOMMouseScroll",A=function(E){var D=C.Array(E,0,true),F;if(C.UA.gecko){D[0]=B;F=C.config.win;}else{F=C.config.doc;}if(D.length<3){D[2]=F;}else{D.splice(2,0,F);}return D;};C.Env.evt.plugins.mousewheel={on:function(){return C.Event._attach(A(arguments));},detach:function(){return C.Event.detach.apply(C.Event,A(arguments));}};},"3.0.0",{requires:["node-base"]}); \ No newline at end of file +YUI.add("event-mousewheel",function(c){var b="DOMMouseScroll",a=function(e){var d=c.Array(e,0,true),f;if(c.UA.gecko){d[0]=b;f=c.config.win;}else{f=c.config.doc;}if(d.length<3){d[2]=f;}else{d.splice(2,0,f);}return d;};c.Env.evt.plugins.mousewheel={on:function(){return c.Event._attach(a(arguments));},detach:function(){return c.Event.detach.apply(c.Event,a(arguments));}};},"3.3.0",{requires:["node-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/event/event-mousewheel.js b/jssource/src_files/include/javascript/yui3/build/event/event-mousewheel.js index c158d8fc..2bdba38c 100644 --- a/jssource/src_files/include/javascript/yui3/build/event/event-mousewheel.js +++ b/jssource/src_files/include/javascript/yui3/build/event/event-mousewheel.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('event-mousewheel', function(Y) { @@ -54,4 +54,4 @@ Y.Env.evt.plugins.mousewheel = { }; -}, '3.0.0' ,{requires:['node-base']}); +}, '3.3.0' ,{requires:['node-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/event/event-resize-min.js b/jssource/src_files/include/javascript/yui3/build/event/event-resize-min.js index 94def01d..4bb717a8 100644 --- a/jssource/src_files/include/javascript/yui3/build/event/event-resize-min.js +++ b/jssource/src_files/include/javascript/yui3/build/event/event-resize-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("event-resize",function(A){(function(){var C,B,E="window:resize",D=function(F){if(A.UA.gecko){A.fire(E,F);}else{if(B){B.cancel();}B=A.later(A.config.windowResizeDelay||40,A,function(){A.fire(E,F);});}};A.Env.evt.plugins.windowresize={on:function(H,G){if(!C){C=A.Event._attach(["resize",D]);}var F=A.Array(arguments,0,true);F[0]=E;return A.on.apply(A,F);}};})();},"3.0.0",{requires:["node-base"]}); \ No newline at end of file +YUI.add("event-resize",function(a){(function(){var c,b,e="window:resize",d=function(f){if(a.UA.gecko){a.fire(e,f);}else{if(b){b.cancel();}b=a.later(a.config.windowResizeDelay||40,a,function(){a.fire(e,f);});}};a.Env.evt.plugins.windowresize={on:function(h,g){if(!c){c=a.Event._attach(["resize",d]);}var f=a.Array(arguments,0,true);f[0]=e;return a.on.apply(a,f);}};})();},"3.3.0",{requires:["node-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/event/event-resize.js b/jssource/src_files/include/javascript/yui3/build/event/event-resize.js index 4e596acd..799d67b1 100644 --- a/jssource/src_files/include/javascript/yui3/build/event/event-resize.js +++ b/jssource/src_files/include/javascript/yui3/build/event/event-resize.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('event-resize', function(Y) { @@ -68,4 +68,4 @@ Y.Env.evt.plugins.windowresize = { })(); -}, '3.0.0' ,{requires:['node-base']}); +}, '3.3.0' ,{requires:['node-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/event/event-synthetic-min.js b/jssource/src_files/include/javascript/yui3/build/event/event-synthetic-min.js new file mode 100644 index 00000000..3adf67e2 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/event/event-synthetic-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("event-synthetic",function(b){var h=b.Env.evt.dom_map,d=b.Array,g=b.Lang,j=g.isObject,c=g.isString,e=b.Selector.query,i=function(){};function f(l,k){this.handle=l;this.emitFacade=k;}f.prototype.fire=function(q){var k=d(arguments,0,true),o=this.handle,p=o.evt,m=o.sub,r=m.context,l=m.filter,n=q||{};if(this.emitFacade){if(!q||!q.preventDefault){n=p._getFacade();if(j(q)&&!q.preventDefault){b.mix(n,q,true);k[0]=n;}else{k.unshift(n);}}n.type=p.type;n.details=k.slice();if(l){n.container=p.host;}}else{if(l&&j(q)&&q.currentTarget){k.shift();}}m.context=r||n.currentTarget||p.host;p.fire.apply(p,k);m.context=r;};function a(){this._init.apply(this,arguments);}b.mix(a,{Notifier:f,getRegistry:function(q,p,n){var o=q._node,m=b.stamp(o),l="event:"+m+p+"_synth",k=h[m]||(h[m]={});if(!k[l]&&n){k[l]={type:"_synth",fn:i,capture:false,el:o,key:l,domkey:m,notifiers:[],detachAll:function(){var r=this.notifiers,s=r.length;while(--s>=0){r[s].detach();}}};}return(k[l])?k[l].notifiers:null;},_deleteSub:function(l){if(l&&l.fn){var k=this.eventDef,m=(l.filter)?"detachDelegate":"detach";this.subscribers={};this.subCount=0;k[m](l.node,l,this.notifier,l.filter);k._unregisterSub(l);delete l.fn;delete l.node;delete l.context;}},prototype:{constructor:a,_init:function(){var k=this.publishConfig||(this.publishConfig={});this.emitFacade=("emitFacade" in k)?k.emitFacade:true;k.emitFacade=false;},processArgs:i,on:i,detach:i,delegate:i,detachDelegate:i,_on:function(n,p){var o=[],l=this.processArgs(n,p),k=n[2],r=p?"delegate":"on",m,q;m=(c(k))?e(k):d(k);if(!m.length&&c(k)){q=b.on("available",function(){b.mix(q,b[r].apply(b,n),true);},k);return q;}b.Array.each(m,function(t){var u=n.slice(),s;t=b.one(t);if(t){if(p){s=u.splice(3,1)[0];}u.splice(0,4,u[1],u[3]);if(!this.preventDups||!this.getSubs(t,n,null,true)){q=this._getNotifier(t,u,l,s);this[r](t,q.sub,q.notifier,s);o.push(q);}}},this);return(o.length===1)?o[0]:new b.EventHandle(o);},_getNotifier:function(n,q,o,m){var s=new b.CustomEvent(this.type,this.publishConfig),p=s.on.apply(s,q),r=new f(p,this.emitFacade),l=a.getRegistry(n,this.type,true),k=p.sub;p.notifier=r;k.node=n;k.filter=m;if(o){this.applyArgExtras(o,k);}b.mix(s,{eventDef:this,notifier:r,host:n,currentTarget:n,target:n,el:n._node,_delete:a._deleteSub},true);l.push(p);return p;},applyArgExtras:function(k,l){l._extra=k;},_unregisterSub:function(m){var k=a.getRegistry(m.node,this.type),l;if(k){for(l=k.length-1;l>=0;--l){if(k[l].sub===m){k.splice(l,1);break;}}}},_detach:function(m){var r=m[2],p=(c(r))?e(r):d(r),q,o,k,n,l;m.splice(2,1);for(o=0,k=p.length;o=0;--l){n[l].detach();}}}}},getSubs:function(l,q,k,n){var r=a.getRegistry(l,this.type),s=[],m,p,o;if(r){if(!k){k=this.subMatch;}for(m=0,p=r.length;mThe triggering mechanism used by SyntheticEvents.

          + * + *

          Implementers should not instantiate these directly. Use the Notifier + * provided to the event's implemented on(node, sub, notifier) or + * delegate(node, sub, notifier, filter) methods.

          + * + * @class SyntheticEvent.Notifier + * @constructor + * @param handle {EventHandle} the detach handle for the subscription to an + * internal custom event used to execute the callback passed to + * on(..) or delegate(..) + * @param emitFacade {Boolean} take steps to ensure the first arg received by + * the subscription callback is an event facade + * @private + * @since 3.2.0 + */ +function Notifier(handle, emitFacade) { + this.handle = handle; + this.emitFacade = emitFacade; +} + +/** + *

          Executes the subscription callback, passing the firing arguments as the + * first parameters to that callback. For events that are configured with + * emitFacade=true, it is common practice to pass the triggering DOMEventFacade + * as the first parameter. Barring a proper DOMEventFacade or EventFacade + * (from a CustomEvent), a new EventFacade will be generated. In that case, if + * fire() is called with a simple object, it will be mixed into the facade. + * Otherwise, the facade will be prepended to the callback parameters.

          + * + *

          For notifiers provided to delegate logic, the first argument should be an + * object with a "currentTarget" property to identify what object to + * default as 'this' in the callback. Typically this is gleaned from the + * DOMEventFacade or EventFacade, but if configured with emitFacade=false, an + * object must be provided. In that case, the object will be removed from the + * callback parameters.

          + * + *

          Additional arguments passed during event subscription will be + * automatically added after those passed to fire().

          + * + * @method fire + * @param e {EventFacade|DOMEventFacade|Object|any} (see description) + * @param arg* {any} additional arguments received by all subscriptions + * @private + */ +Notifier.prototype.fire = function (e) { + // first arg to delegate notifier should be an object with currentTarget + var args = toArray(arguments, 0, true), + handle = this.handle, + ce = handle.evt, + sub = handle.sub, + thisObj = sub.context, + delegate = sub.filter, + event = e || {}; + + if (this.emitFacade) { + if (!e || !e.preventDefault) { + event = ce._getFacade(); + + if (isObject(e) && !e.preventDefault) { + Y.mix(event, e, true); + args[0] = event; + } else { + args.unshift(event); + } + } + + event.type = ce.type; + event.details = args.slice(); + + if (delegate) { + event.container = ce.host; + } + } else if (delegate && isObject(e) && e.currentTarget) { + args.shift(); + } + + sub.context = thisObj || event.currentTarget || ce.host; + ce.fire.apply(ce, args); + sub.context = thisObj; // reset for future firing +}; + + +/** + *

          Wrapper class for the integration of new events into the YUI event + * infrastructure. Don't instantiate this object directly, use + * Y.Event.define(type, config). See that method for details.

          + * + *

          Properties that MAY or SHOULD be specified in the configuration are noted + * below and in the description of Y.Event.define.

          + * + * @class SyntheticEvent + * @constructor + * @param cfg {Object} Implementation pieces and configuration + * @since 3.1.0 + * @in event-synthetic + */ +function SyntheticEvent() { + this._init.apply(this, arguments); +} + +Y.mix(SyntheticEvent, { + Notifier: Notifier, + + /** + * Returns the array of subscription handles for a node for the given event + * type. Passing true as the third argument will create a registry entry + * in the event system's DOM map to host the array if one doesn't yet exist. + * + * @method getRegistry + * @param node {Node} the node + * @param type {String} the event + * @param create {Boolean} create a registration entry to host a new array + * if one doesn't exist. + * @return {Array} + * @static + * @protected + * @since 3.2.0 + */ + getRegistry: function (node, type, create) { + var el = node._node, + yuid = Y.stamp(el), + key = 'event:' + yuid + type + '_synth', + events = DOMMap[yuid] || (DOMMap[yuid] = {}); + + if (!events[key] && create) { + events[key] = { + type : '_synth', + fn : noop, + capture : false, + el : el, + key : key, + domkey : yuid, + notifiers : [], + + detachAll : function () { + var notifiers = this.notifiers, + i = notifiers.length; + + while (--i >= 0) { + notifiers[i].detach(); + } + } + }; + } + + return (events[key]) ? events[key].notifiers : null; + }, + + /** + * Alternate _delete() method for the CustomEvent object + * created to manage SyntheticEvent subscriptions. + * + * @method _deleteSub + * @param sub {Subscription} the subscription to clean up + * @private + * @since 3.2.0 + */ + _deleteSub: function (sub) { + if (sub && sub.fn) { + var synth = this.eventDef, + method = (sub.filter) ? 'detachDelegate' : 'detach'; + + this.subscribers = {}; + this.subCount = 0; + + synth[method](sub.node, sub, this.notifier, sub.filter); + synth._unregisterSub(sub); + + delete sub.fn; + delete sub.node; + delete sub.context; + } + }, + + prototype: { + constructor: SyntheticEvent, + + /** + * Construction logic for the event. + * + * @method _init + * @protected + */ + _init: function () { + var config = this.publishConfig || (this.publishConfig = {}); + + // The notification mechanism handles facade creation + this.emitFacade = ('emitFacade' in config) ? + config.emitFacade : + true; + config.emitFacade = false; + }, + + /** + *

          Implementers MAY provide this method definition.

          + * + *

          Implement this function if the event supports a different + * subscription signature. This function is used by both + * on() and delegate(). The second parameter + * indicates that the event is being subscribed via + * delegate().

          + * + *

          Implementations must remove extra arguments from the args list + * before returning. The required args for on() + * subscriptions are

          + *
          [type, callback, target, context, argN...]
          + * + *

          The required args for delegate() + * subscriptions are

          + * + *
          [type, callback, target, filter, context, argN...]
          + * + *

          The return value from this function will be stored on the + * subscription in the '_extra' property for reference elsewhere.

          + * + * @method processArgs + * @param args {Array} parmeters passed to Y.on(..) or Y.delegate(..) + * @param delegate {Boolean} true if the subscription is from Y.delegate + * @return {any} + */ + processArgs: noop, + + /** + *

          Implementers MAY override this property.

          + * + *

          Whether to prevent multiple subscriptions to this event that are + * classified as being the same. By default, this means the subscribed + * callback is the same function. See the subMatch + * method. Setting this to true will impact performance for high volume + * events.

          + * + * @property preventDups + * @type {Boolean} + * @default false + */ + //preventDups : false, + + /** + *

          Implementers SHOULD provide this method definition.

          + * + * Implementation logic for subscriptions done via node.on(type, + * fn) or Y.on(type, fn, target). This + * function should set up the monitor(s) that will eventually fire the + * event. Typically this involves subscribing to at least one DOM + * event. It is recommended to store detach handles from any DOM + * subscriptions to make for easy cleanup in the detach + * method. Typically these handles are added to the sub + * object. Also for SyntheticEvents that leverage a single DOM + * subscription under the hood, it is recommended to pass the DOM event + * object to notifier.fire(e). (The event name on the + * object will be updated). + * + * @method on + * @param node {Node} the node the subscription is being applied to + * @param sub {Subscription} the object to track this subscription + * @param notifier {SyntheticEvent.Notifier} call notifier.fire(..) to + * trigger the execution of the subscribers + */ + on: noop, + + /** + *

          Implementers SHOULD provide this method definition.

          + * + *

          Implementation logic for detaching subscriptions done via + * node.on(type, fn). This function should clean up any + * subscriptions made in the on() phase.

          + * + * @method detach + * @param node {Node} the node the subscription was applied to + * @param sub {Subscription} the object tracking this subscription + * @param notifier {SyntheticEvent.Notifier} the Notifier used to + * trigger the execution of the subscribers + */ + detach: noop, + + /** + *

          Implementers SHOULD provide this method definition.

          + * + *

          Implementation logic for subscriptions done via + * node.delegate(type, fn, filter) or + * Y.delegate(type, fn, container, filter). Like with + * on() above, this function should monitor the environment + * for the event being fired, and trigger subscription execution by + * calling notifier.fire(e).

          + * + *

          This function receives a fourth argument, which is the filter + * used to identify which Node's are of interest to the subscription. + * The filter will be either a boolean function that accepts a target + * Node for each hierarchy level as the event bubbles, or a selector + * string. To translate selector strings into filter functions, use + * Y.delegate.compileFilter(filter).

          + * + * @method delegate + * @param node {Node} the node the subscription is being applied to + * @param sub {Subscription} the object to track this subscription + * @param notifier {SyntheticEvent.Notifier} call notifier.fire(..) to + * trigger the execution of the subscribers + * @param filter {String|Function} Selector string or function that + * accepts an event object and returns null, a Node, or an + * array of Nodes matching the criteria for processing. + * @since 3.2.0 + */ + delegate : noop, + + /** + *

          Implementers SHOULD provide this method definition.

          + * + *

          Implementation logic for detaching subscriptions done via + * node.delegate(type, fn, filter) or + * Y.delegate(type, fn, container, filter). This function + * should clean up any subscriptions made in the + * delegate() phase.

          + * + * @method detachDelegate + * @param node {Node} the node the subscription was applied to + * @param sub {Subscription} the object tracking this subscription + * @param notifier {SyntheticEvent.Notifier} the Notifier used to + * trigger the execution of the subscribers + * @param filter {String|Function} Selector string or function that + * accepts an event object and returns null, a Node, or an + * array of Nodes matching the criteria for processing. + * @since 3.2.0 + */ + detachDelegate : noop, + + /** + * Sets up the boilerplate for detaching the event and facilitating the + * execution of subscriber callbacks. + * + * @method _on + * @param args {Array} array of arguments passed to + * Y.on(...) or Y.delegate(...) + * @param delegate {Boolean} true if called from + * Y.delegate(...) + * @return {EventHandle} the detach handle for this subscription + * @private + * since 3.2.0 + */ + _on: function (args, delegate) { + var handles = [], + extra = this.processArgs(args, delegate), + selector = args[2], + method = delegate ? 'delegate' : 'on', + nodes, handle; + + // Can't just use Y.all because it doesn't support window (yet?) + nodes = (isString(selector)) ? query(selector) : toArray(selector); + + if (!nodes.length && isString(selector)) { + handle = Y.on('available', function () { + Y.mix(handle, Y[method].apply(Y, args), true); + }, selector); + + return handle; + } + + Y.Array.each(nodes, function (node) { + var subArgs = args.slice(), + filter; + + node = Y.one(node); + + if (node) { + if (delegate) { + filter = subArgs.splice(3, 1)[0]; + } + + // (type, fn, el, thisObj, ...) => (fn, thisObj, ...) + subArgs.splice(0, 4, subArgs[1], subArgs[3]); + + if (!this.preventDups || !this.getSubs(node, args,null,true)) { + handle = this._getNotifier(node, subArgs, extra,filter); + + this[method](node, handle.sub, handle.notifier, filter); + + handles.push(handle); + } + } + }, this); + + return (handles.length === 1) ? + handles[0] : + new Y.EventHandle(handles); + }, + + /** + * Creates a new Notifier object for use by this event's + * on(...) or delegate(...) implementation. + * + * @method _getNotifier + * @param node {Node} the Node hosting the event + * @param args {Array} the subscription arguments passed to either + * Y.on(...) or Y.delegate(...) + * after running through processArgs(args) to + * normalize the argument signature + * @param extra {any} Extra data parsed from + * processArgs(args) + * @param filter {String|Function} the selector string or function + * filter passed to Y.delegate(...) (not + * present when called from Y.on(...)) + * @return {SyntheticEvent.Notifier} + * @private + * @since 3.2.0 + */ + _getNotifier: function (node, args, extra, filter) { + var dispatcher = new Y.CustomEvent(this.type, this.publishConfig), + handle = dispatcher.on.apply(dispatcher, args), + notifier = new Notifier(handle, this.emitFacade), + registry = SyntheticEvent.getRegistry(node, this.type, true), + sub = handle.sub; + + handle.notifier = notifier; + + sub.node = node; + sub.filter = filter; + if (extra) { + this.applyArgExtras(extra, sub); + } + + Y.mix(dispatcher, { + eventDef : this, + notifier : notifier, + host : node, // I forget what this is for + currentTarget: node, // for generating facades + target : node, // for generating facades + el : node._node, // For category detach + + _delete : SyntheticEvent._deleteSub + }, true); + + registry.push(handle); + + return handle; + }, + + /** + *

          Implementers MAY provide this method definition.

          + * + *

          Implement this function if you want extra data extracted during + * processArgs to be propagated to subscriptions on a per-node basis. + * That is to say, if you call Y.on('xyz', fn, xtra, 'div') + * the data returned from processArgs will be shared + * across the subscription objects for all the divs. If you want each + * subscription to receive unique information, do that processing + * here.

          + * + *

          The default implementation adds the data extracted by processArgs + * to the subscription object as sub._extra.

          + * + * @method applyArgExtras + * @param extra {any} Any extra data extracted from processArgs + * @param sub {Subscription} the individual subscription + */ + applyArgExtras: function (extra, sub) { + sub._extra = extra; + }, + + /** + * Removes the subscription from the Notifier registry. + * + * @method _unregisterSub + * @param sub {Subscription} the subscription + * @private + * @since 3.2.0 + */ + _unregisterSub: function (sub) { + var notifiers = SyntheticEvent.getRegistry(sub.node, this.type), + i; + + if (notifiers) { + for (i = notifiers.length - 1; i >= 0; --i) { + if (notifiers[i].sub === sub) { + notifiers.splice(i, 1); + break; + } + } + } + }, + + /** + * Removes the subscription(s) from the internal subscription dispatch + * mechanism. See SyntheticEvent._deleteSub. + * + * @method _detach + * @param args {Array} The arguments passed to + * node.detach(...) + * @private + * @since 3.2.0 + */ + _detach: function (args) { + // Can't use Y.all because it doesn't support window (yet?) + // TODO: Does Y.all support window now? + var target = args[2], + els = (isString(target)) ? + query(target) : toArray(target), + node, i, len, handles, j; + + // (type, fn, el, context, filter?) => (type, fn, context, filter?) + args.splice(2, 1); + + for (i = 0, len = els.length; i < len; ++i) { + node = Y.one(els[i]); + + if (node) { + handles = this.getSubs(node, args); + + if (handles) { + for (j = handles.length - 1; j >= 0; --j) { + handles[j].detach(); + } + } + } + } + }, + + /** + * Returns the detach handles of subscriptions on a node that satisfy a + * search/filter function. By default, the filter used is the + * subMatch method. + * + * @method getSubs + * @param node {Node} the node hosting the event + * @param args {Array} the array of original subscription args passed + * to Y.on(...) (before + * processArgs + * @param filter {Function} function used to identify a subscription + * for inclusion in the returned array + * @param first {Boolean} stop after the first match (used to check for + * duplicate subscriptions) + * @return {Array} detach handles for the matching subscriptions + */ + getSubs: function (node, args, filter, first) { + var notifiers = SyntheticEvent.getRegistry(node, this.type), + handles = [], + i, len, handle; + + if (notifiers) { + if (!filter) { + filter = this.subMatch; + } + + for (i = 0, len = notifiers.length; i < len; ++i) { + handle = notifiers[i]; + if (filter.call(this, handle.sub, args)) { + if (first) { + return handle; + } else { + handles.push(notifiers[i]); + } + } + } + } + + return handles.length && handles; + }, + + /** + *

          Implementers MAY override this to define what constitutes a + * "same" subscription. Override implementations should + * consider the lack of a comparator as a match, so calling + * getSubs() with no arguments will return all subs.

          + * + *

          Compares a set of subscription arguments against a Subscription + * object to determine if they match. The default implementation + * compares the callback function against the second argument passed to + * Y.on(...) or node.detach(...) etc.

          + * + * @method subMatch + * @param sub {Subscription} the existing subscription + * @param args {Array} the calling arguments passed to + * Y.on(...) etc. + * @return {Boolean} true if the sub can be described by the args + * present + * @since 3.2.0 + */ + subMatch: function (sub, args) { + // Default detach cares only about the callback matching + return !args[1] || sub.fn === args[1]; + } + } +}, true); + +Y.SyntheticEvent = SyntheticEvent; + +/** + *

          Defines a new event in the DOM event system. Implementers are + * responsible for monitoring for a scenario whereby the event is fired. A + * notifier object is provided to the functions identified below. When the + * criteria defining the event are met, call notifier.fire( [args] ); to + * execute event subscribers.

          + * + *

          The first parameter is the name of the event. The second parameter is a + * configuration object which define the behavior of the event system when the + * new event is subscribed to or detached from. The methods that should be + * defined in this configuration object are on, + * detach, delegate, and detachDelegate. + * You are free to define any other methods or properties needed to define your + * event. Be aware, however, that since the object is used to subclass + * SyntheticEvent, you should avoid method names used by SyntheticEvent unless + * your intention is to override the default behavior.

          + * + *

          This is a list of properties and methods that you can or should specify + * in the configuration object:

          + * + *
          + *
          on
          + *
          function (node, subscription, notifier) The + * implementation logic for subscription. Any special setup you need to + * do to create the environment for the event being fired--E.g. native + * DOM event subscriptions. Store subscription related objects and + * state on the subscription object. When the + * criteria have been met to fire the synthetic event, call + * notifier.fire(e). See Notifier's fire() + * method for details about what to pass as parameters.
          + * + *
          detach
          + *
          function (node, subscription, notifier) The + * implementation logic for cleaning up a detached subscription. E.g. + * detach any DOM subscriptions added in on.
          + * + *
          delegate
          + *
          function (node, subscription, notifier, filter) The + * implementation logic for subscription via Y.delegate or + * node.delegate. The filter is typically either a selector + * string or a function. You can use + * Y.delegate.compileFilter(selectorString) to create a + * filter function from a selector string if needed. The filter function + * expects an event object as input and should output either null, a + * matching Node, or an array of matching Nodes. Otherwise, this acts + * like on DOM event subscriptions. Store subscription + * related objects and information on the subscription + * object. When the criteria have been met to fire the synthetic event, + * call notifier.fire(e) as noted above.
          + * + *
          detachDelegate
          + *
          function (node, subscription, notifier) The + * implementation logic for cleaning up a detached delegate subscription. + * E.g. detach any DOM delegate subscriptions added in + * delegate.
          + * + *
          publishConfig
          + *
          (Object) The configuration object that will be used to instantiate + * the underlying CustomEvent. See Notifier's fire method + * for details.
          + * + *
          processArgs
          + *

          function (argArray, fromDelegate) Optional method + * to extract any additional arguments from the subscription + * signature. Using this allows on or + * delegate signatures like + * node.on("hover", overCallback, + * outCallback).

          + *

          When processing an atypical argument signature, make sure the + * args array is returned to the normal signature before returning + * from the function. For example, in the "hover" example + * above, the outCallback needs to be spliced + * out of the array. The expected signature of the args array for + * on() subscriptions is:

          + *
          + *              [type, callback, target, contextOverride, argN...]
          + *          
          + *

          And for delegate():

          + *
          + *              [type, callback, target, filter, contextOverride, argN...]
          + *          
          + *

          where target is the node the event is being + * subscribed for. You can see these signatures documented for + * Y.on() and Y.delegate() respectively.

          + *

          Whatever gets returned from the function will be stored on the + * subscription object under + * subscription._extra.

          + *
          subMatch
          + *
          + *

          function (sub, args) Compares a set of + * subscription arguments against a Subscription object to determine + * if they match. The default implementation compares the callback + * function against the second argument passed to + * Y.on(...) or node.detach(...) etc.

          + *
          + *
          + * + * @method Event.define + * @param type {String} the name of the event + * @param config {Object} the prototype definition for the new event (see above) + * @param force {Boolean} override an existing event (use with caution) + * @static + * @return {SyntheticEvent} the subclass implementation instance created to + * handle event subscriptions of this type + * @for Event + * @since 3.1.0 + * @in event-synthetic + */ +Y.Event.define = function (type, config, force) { + if (!config) { + config = {}; + } + + var eventDef = (isObject(type)) ? type : Y.merge({ type: type }, config), + Impl, synth; + + if (force || !Y.Node.DOM_EVENTS[eventDef.type]) { + Impl = function () { + SyntheticEvent.apply(this, arguments); + }; + Y.extend(Impl, SyntheticEvent, eventDef); + synth = new Impl(); + + type = synth.type; + + Y.Node.DOM_EVENTS[type] = Y.Env.evt.plugins[type] = { + eventDef: synth, + + on: function () { + return synth._on(toArray(arguments)); + }, + + delegate: function () { + return synth._on(toArray(arguments), true); + }, + + detach: function () { + return synth._detach(toArray(arguments)); + } + }; + + } + + return synth; +}; + + +}, '3.3.0' ,{requires:['node-base', 'event-custom']}); diff --git a/jssource/src_files/include/javascript/yui3/build/event/event-touch-min.js b/jssource/src_files/include/javascript/yui3/build/event/event-touch-min.js new file mode 100644 index 00000000..425558c5 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/event/event-touch-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("event-touch",function(d){var c="scale",a="rotation",b="identifier";d.DOMEventFacade.prototype._touch=function(n,m,o){var g,f,h,k,j;if(n.touches){this.touches=[];j={};for(g=0,f=n.touches.length;g 0); @@ -1103,11 +982,8 @@ E._interval = setInterval(Y.bind(E._poll, E), E.POLL_INTERVAL); notAvail = []; executeItem = function (el, item) { - var context, ov = item.override; - if (item.compat) { - if (item.override) { if (ov === true) { context = item.obj; @@ -1117,17 +993,13 @@ E._interval = setInterval(Y.bind(E._poll, E), E.POLL_INTERVAL); } else { context = el; } - item.fn.call(context, item.obj); - } else { context = item.obj || Y.one(el); item.fn.apply(context, (Y.Lang.isArray(ov)) ? ov : []); } - }; - // onAvailable for (i=0,len=_avail.length; i 4 ? Y.Array(arguments, 4, true) : []; + var a = arguments.length > 4 ? Y.Array(arguments, 4, true) : null; return Y.Event.onAvailable.call(Y.Event, id, fn, o, a); } }; /** - * Executes the callback as soon as the specified element + * Executes the callback as soon as the specified element * is detected in the DOM with a nextSibling property - * (indicating that the element's children are available) + * (indicating that the element's children are available). + * This function expects a selector + * string for the element(s) to detect. If you already have + * an element reference, you don't need this event. * @event contentready * @param type {string} 'contentready' * @param fn {function} the callback function to execute. - * @param el {string|HTMLElement|collection} the element(s) to attach + * @param el {string} an selector for the element(s) to attach. * @param context optional argument that specifies what 'this' refers to. * @param args* 0..n additional arguments to pass on to the callback function. * These arguments will be added after the event object. @@ -1369,13 +1261,13 @@ Y.Env.evt.plugins.available = { */ Y.Env.evt.plugins.contentready = { on: function(type, fn, id, o) { - var a = arguments.length > 4 ? Y.Array(arguments, 4, true) : []; + var a = arguments.length > 4 ? Y.Array(arguments, 4, true) : null; return Y.Event.onContentReady.call(Y.Event, id, fn, o, a); } }; -}, '3.0.0' ,{requires:['event-custom-base']}); +}, '3.3.0' ,{requires:['event-custom-base']}); YUI.add('event-delegate', function(Y) { /** @@ -1385,355 +1277,1060 @@ YUI.add('event-delegate', function(Y) { * @submodule event-delegate */ -var Event = Y.Event, - Lang = Y.Lang, - - delegates = {}, - - specialTypes = { - mouseenter: "mouseover", - mouseleave: "mouseout" - }, - - resolveTextNode = function(n) { - try { - if (n && 3 == n.nodeType) { - return n.parentNode; - } - } catch(e) { } - return n; - }, - - delegateHandler = function(delegateKey, e, el) { - - var target = resolveTextNode((e.target || e.srcElement)), - tests = delegates[delegateKey], - spec, - ename, - matched, - fn, - ev; - - - var getMatch = function(el, selector, container) { - - var returnVal; - - if (!el || el === container) { - returnVal = false; - } - else { - returnVal = Y.Selector.test(el, selector) ? el: getMatch(el.parentNode, selector, container); - } - - return returnVal; - - }; - - - for (spec in tests) { - - if (tests.hasOwnProperty(spec)) { - - ename = tests[spec]; - fn = tests.fn; - matched = null; - - - if (Y.Selector.test(target, spec, el)) { - matched = target; - } - else if (Y.Selector.test(target, ((spec.replace(/,/gi, " *,")) + " *"), el)) { - - // The target is a descendant of an element matching - // the selector, so crawl up to find the ancestor that - // matches the selector - - matched = getMatch(target, spec, el); - - } - - - if (matched) { - - if (!ev) { - ev = new Y.DOMEventFacade(e, el); - ev.container = ev.currentTarget; - } - - ev.currentTarget = Y.Node.get(matched); - - Y.publish(ename, { - contextFn: function() { - return ev.currentTarget; - } - }); - - if (fn) { - fn(ev, ename); - } - else { - Y.fire(ename, ev); - } - - } - - } - } - - }, - - attach = function (type, key, element) { - - var focusMethods = { - focus: Event._attachFocus, - blur: Event._attachBlur - }, - - attachFn = focusMethods[type], - - args = [type, - function (e) { - delegateHandler(key, (e || window.event), element); - }, - element]; - - - if (attachFn) { - return attachFn(args, { capture: true, facade: false }); - } - else { - return Event._attach(args, { facade: false }); - } - - }, - - sanitize = Y.cached(function(str) { - return str.replace(/[|,:]/g, '~'); - }); +var toArray = Y.Array, + YLang = Y.Lang, + isString = YLang.isString, + isObject = YLang.isObject, + isArray = YLang.isArray, + selectorTest = Y.Selector.test, + detachCategories = Y.Env.evt.handles; /** - * Sets up event delegation on a container element. The delegated event - * will use a supplied selector to test if the target or one of the - * descendants of the target match it. The supplied callback function - * will only be executed if a match was encountered, and, in fact, - * will be executed for each element that matches if you supply an - * ambiguous selector. + *

          Sets up event delegation on a container element. The delegated event + * will use a supplied selector or filtering function to test if the event + * references at least one node that should trigger the subscription + * callback.

          * - * The event object for the delegated event is supplied to the callback - * function. It is modified slightly in order to support all properties - * that may be needed for event delegation. 'currentTarget' is set to - * the element that matched the delegation specifcation. 'container' is - * set to the element that the listener is bound to (this normally would - * be the 'currentTarget'). + *

          Selector string filters will trigger the callback if the event originated + * from a node that matches it or is contained in a node that matches it. + * Function filters are called for each Node up the parent axis to the + * subscribing container node, and receive at each level the Node and the event + * object. The function should return true (or a truthy value) if that Node + * should trigger the subscription callback. Note, it is possible for filters + * to match multiple Nodes for a single event. In this case, the delegate + * callback will be executed for each matching Node.

          * - * @event delegate - * @param type {string} 'delegate' - * @param fn {function} the callback function to execute. This function - * will be provided the event object for the delegated event. - * @param el {string|node} the element that is the delegation container - * @param delegateType {string} the event type to delegate - * @param spec {string} a selector that must match the target of the - * event. + *

          For each matching Node, the callback will be executed with its 'this' + * object set to the Node matched by the filter (unless a specific context was + * provided during subscription), and the provided event's + * currentTarget will also be set to the matching Node. The + * containing Node from which the subscription was originally made can be + * referenced as e.container. + * + * @method delegate + * @param type {String} the event type to delegate + * @param fn {Function} the callback function to execute. This function + * will be provided the event object for the delegated event. + * @param el {String|node} the element that is the delegation container + * @param spec {string|Function} a selector that must match the target of the + * event or a function to test target and its parents for a match * @param context optional argument that specifies what 'this' refers to. * @param args* 0..n additional arguments to pass on to the callback function. - * These arguments will be added after the event object. + * These arguments will be added after the event object. * @return {EventHandle} the detach handle * @for YUI - * @deprecated use Y.delegate */ -Y.Env.evt.plugins.delegate = { +function delegate(type, fn, el, filter) { + var args = toArray(arguments, 0, true), + query = isString(el) ? el : null, + typeBits, synth, container, categories, cat, i, len, handles, handle; + + // Support Y.delegate({ click: fnA, key: fnB }, context, filter, ...); + // and Y.delegate(['click', 'key'], fn, context, filter, ...); + if (isObject(type)) { + handles = []; + + if (isArray(type)) { + for (i = 0, len = type.length; i < len; ++i) { + args[0] = type[i]; + handles.push(Y.delegate.apply(Y, args)); + } + } else { + // Y.delegate({'click', fn}, context, filter) => + // Y.delegate('click', fn, context, filter) + args.unshift(null); // one arg becomes two; need to make space + + for (i in type) { + if (type.hasOwnProperty(i)) { + args[0] = i; + args[1] = type[i]; + handles.push(Y.delegate.apply(Y, args)); + } + } + } - on: function(type, fn, el, delegateType, spec) { + return new Y.EventHandle(handles); + } + typeBits = type.split(/\|/); - var args = Y.Array(arguments, 0, true); - - args.splice(3, 1); - - args[0] = delegateType; + if (typeBits.length > 1) { + cat = typeBits.shift(); + type = typeBits.shift(); + } - return Y.delegate.apply(Y, args); + synth = Y.Node.DOM_EVENTS[type]; + if (isObject(synth) && synth.delegate) { + handle = synth.delegate.apply(synth, arguments); } -}; + if (!handle) { + if (!type || !fn || !el || !filter) { + return; + } + container = (query) ? Y.Selector.query(query, null, true) : el; -/** - * Sets up event delegation on a container element. The delegated event - * will use a supplied selector to test if the target or one of the - * descendants of the target match it. The supplied callback function - * will only be executed if a match was encountered, and, in fact, - * will be executed for each element that matches if you supply an - * ambiguous selector. - * - * The event object for the delegated event is supplied to the callback - * function. It is modified slightly in order to support all properties - * that may be needed for event delegation. 'currentTarget' is set to - * the element that matched the delegation specifcation. 'container' is - * set to the element that the listener is bound to (this normally would - * be the 'currentTarget'). - * - * @method delegate - * @param type {string} the event type to delegate - * @param fn {function} the callback function to execute. This function - * will be provided the event object for the delegated event. - * @param el {string|node} the element that is the delegation container - * @param spec {string} a selector that must match the target of the - * event. - * @param context optional argument that specifies what 'this' refers to. - * @param args* 0..n additional arguments to pass on to the callback function. - * These arguments will be added after the event object. - * @return {EventHandle} the detach handle - * @for YUI - */ -Event.delegate = function (type, fn, el, spec) { + if (!container && isString(el)) { + handle = Y.on('available', function () { + Y.mix(handle, Y.delegate.apply(Y, args), true); + }, el); + } + + if (!handle && container) { + args.splice(2, 2, container); // remove the filter - if (!spec) { - return false; + handle = Y.Event._attach(args, { facade: false }); + handle.sub.filter = filter; + handle.sub._notify = delegate.notifySub; + } } + if (handle && cat) { + categories = detachCategories[cat] || (detachCategories[cat] = {}); + categories = categories[type] || (categories[type] = []); + categories.push(handle); + } - var args = Y.Array(arguments, 0, true), - element = el, // HTML element serving as the delegation container - availHandle; + return handle; +} +/** + * Overrides the _notify method on the normal DOM subscription to + * inject the filtering logic and only proceed in the case of a match. + * + * @method delegate.notifySub + * @param thisObj {Object} default 'this' object for the callback + * @param args {Array} arguments passed to the event's fire() + * @param ce {CustomEvent} the custom event managing the DOM subscriptions for + * the subscribed event on the subscribing node. + * @return {Boolean} false if the event was stopped + * @private + * @static + * @since 3.2.0 + */ +delegate.notifySub = function (thisObj, args, ce) { + // Preserve args for other subscribers + args = args.slice(); + if (this.args) { + args.push.apply(args, this.args); + } - if (Lang.isString(el)) { - - // Y.Selector.query returns an array of matches unless specified - // to return just the first match. Since the primary use case for - // event delegation is to use a single event handler on a container, - // Y.delegate doesn't currently support being able to bind a - // single listener to multiple containers. - - element = Y.Selector.query(el, null, true); - - if (!element) { // Not found, check using onAvailable + // Only notify subs if the event occurred on a targeted element + var currentTarget = delegate._applyFilter(this.filter, args, ce), + //container = e.currentTarget, + e, i, len, ret; - availHandle = Event.onAvailable(el, function() { + if (currentTarget) { + // Support multiple matches up the the container subtree + currentTarget = toArray(currentTarget); - availHandle.handle = Event.delegate.apply(Event, args); + // The second arg is the currentTarget, but we'll be reusing this + // facade, replacing the currentTarget for each use, so it doesn't + // matter what element we seed it with. + e = args[0] = new Y.DOMEventFacade(args[0], ce.el, ce); - }, Event, true, false); + e.container = Y.one(ce.el); + + for (i = 0, len = currentTarget.length; i < len && !e.stopped; ++i) { + e.currentTarget = Y.one(currentTarget[i]); - return availHandle; - - } - - } + ret = this.fn.apply(this.context || e.currentTarget, args); + if (ret === false) { // stop further notifications + break; + } + } - element = Y.Node.getDOMNode(element); + return ret; + } +}; +/** + *

          Compiles a selector string into a filter function to identify whether + * Nodes along the parent axis of an event's target should trigger event + * notification.

          + * + *

          This function is memoized, so previously compiled filter functions are + * returned if the same selector string is provided.

          + * + *

          This function may be useful when defining synthetic events for delegate + * handling.

          + * + * @method delegate.compileFilter + * @param selector {String} the selector string to base the filtration on + * @return {Function} + * @since 3.2.0 + * @static + */ +delegate.compileFilter = Y.cached(function (selector) { + return function (target, e) { + return selectorTest(target._node, selector, e.currentTarget._node); + }; +}); - var guid = Y.stamp(element), - - // The Custom Event for the delegation spec - ename = 'delegate:' + guid + type + sanitize(spec), +/** + * Walks up the parent axis of an event's target, and tests each element + * against a supplied filter function. If any Nodes, including the container, + * satisfy the filter, the delegated callback will be triggered for each. + * + * @method delegate._applyFilter + * @param filter {Function} boolean function to test for inclusion in event + * notification + * @param args {Array} the arguments that would be passed to subscribers + * @param ce {CustomEvent} the DOM event wrapper + * @return {Node|Node[]|undefined} The Node or Nodes that satisfy the filter + * @protected + */ +delegate._applyFilter = function (filter, args, ce) { + var e = args[0], + container = ce.el, // facadeless events in IE, have no e.currentTarget + target = e.target || e.srcElement, + match = [], + isContainer = false; + + // Resolve text nodes to their containing element + if (target.nodeType === 3) { + target = target.parentNode; + } - // The key to the listener for the event type and container - delegateKey = type + guid, + // passing target as the first arg rather than leaving well enough alone + // making 'this' in the filter function refer to the target. This is to + // support bound filter functions. + args.unshift(target); - delegate = delegates[delegateKey], + if (isString(filter)) { + while (target) { + isContainer = (target === container); + if (selectorTest(target, filter, (isContainer ?null: container))) { + match.push(target); + } - domEventHandle, - - ceHandle, - - listeners; - + if (isContainer) { + break; + } - if (!delegate) { + target = target.parentNode; + } + } else { + // filter functions are implementer code and should receive wrappers + args[0] = Y.one(target); + args[1] = new Y.DOMEventFacade(e, container, ce); + + while (target) { + // filter(target, e, extra args...) - this === target + if (filter.apply(args[0], args)) { + match.push(target); + } - delegate = {}; + if (target === container) { + break; + } - if (specialTypes[type]) { - - if (!Event._fireMouseEnter) { - return false; - } - - type = specialTypes[type]; - delegate.fn = Event._fireMouseEnter; - - } + target = target.parentNode; + args[0] = Y.one(target); + } + args[1] = e; // restore the raw DOM event + } - // Create the DOM Event wrapper that will fire the Custom Event + if (match.length <= 1) { + match = match[0]; // single match or undefined + } - domEventHandle = attach(type, delegateKey, element); + // remove the target + args.shift(); + return match; +}; - // Hook into the _delete method for the Custom Event wrapper of this - // DOM Event in order to clean up the 'delegates' map and unsubscribe - // the associated Custom Event listeners fired by this DOM event - // listener if/when the user calls "purgeElement" OR removes all - // listeners of the Custom Event. - - Y.after(function (sub) { +/** + * Sets up event delegation on a container element. The delegated event + * will use a supplied filter to test if the callback should be executed. + * This filter can be either a selector string or a function that returns + * a Node to use as the currentTarget for the event. + * + * The event object for the delegated event is supplied to the callback + * function. It is modified slightly in order to support all properties + * that may be needed for event delegation. 'currentTarget' is set to + * the element that matched the selector string filter or the Node returned + * from the filter function. 'container' is set to the element that the + * listener is delegated from (this normally would be the 'currentTarget'). + * + * Filter functions will be called with the arguments that would be passed to + * the callback function, including the event object as the first parameter. + * The function should return false (or a falsey value) if the success criteria + * aren't met, and the Node to use as the event's currentTarget and 'this' + * object if they are. + * + * @method delegate + * @param type {string} the event type to delegate + * @param fn {function} the callback function to execute. This function + * will be provided the event object for the delegated event. + * @param el {string|node} the element that is the delegation container + * @param filter {string|function} a selector that must match the target of the + * event or a function that returns a Node or false. + * @param context optional argument that specifies what 'this' refers to. + * @param args* 0..n additional arguments to pass on to the callback function. + * These arguments will be added after the event object. + * @return {EventHandle} the detach handle + * @for YUI + */ +Y.delegate = Y.Event.delegate = delegate; - if (domEventHandle.sub == sub) { - // Delete this event from the map of known delegates - delete delegates[delegateKey]; +}, '3.3.0' ,{requires:['node-base']}); +YUI.add('event-synthetic', function(Y) { +/** + * Define new DOM events that can be subscribed to from Nodes. + * + * @module event + * @submodule event-synthetic + */ +var DOMMap = Y.Env.evt.dom_map, + toArray = Y.Array, + YLang = Y.Lang, + isObject = YLang.isObject, + isString = YLang.isString, + query = Y.Selector.query, + noop = function () {}; - // Unsubscribe all listeners of the Custom Event fired - // by this DOM event. - Y.detachAll(ename); - - } +/** + *

          The triggering mechanism used by SyntheticEvents.

          + * + *

          Implementers should not instantiate these directly. Use the Notifier + * provided to the event's implemented on(node, sub, notifier) or + * delegate(node, sub, notifier, filter) methods.

          + * + * @class SyntheticEvent.Notifier + * @constructor + * @param handle {EventHandle} the detach handle for the subscription to an + * internal custom event used to execute the callback passed to + * on(..) or delegate(..) + * @param emitFacade {Boolean} take steps to ensure the first arg received by + * the subscription callback is an event facade + * @private + * @since 3.2.0 + */ +function Notifier(handle, emitFacade) { + this.handle = handle; + this.emitFacade = emitFacade; +} - }, domEventHandle.evt, "_delete"); - - delegate.handle = domEventHandle; +/** + *

          Executes the subscription callback, passing the firing arguments as the + * first parameters to that callback. For events that are configured with + * emitFacade=true, it is common practice to pass the triggering DOMEventFacade + * as the first parameter. Barring a proper DOMEventFacade or EventFacade + * (from a CustomEvent), a new EventFacade will be generated. In that case, if + * fire() is called with a simple object, it will be mixed into the facade. + * Otherwise, the facade will be prepended to the callback parameters.

          + * + *

          For notifiers provided to delegate logic, the first argument should be an + * object with a "currentTarget" property to identify what object to + * default as 'this' in the callback. Typically this is gleaned from the + * DOMEventFacade or EventFacade, but if configured with emitFacade=false, an + * object must be provided. In that case, the object will be removed from the + * callback parameters.

          + * + *

          Additional arguments passed during event subscription will be + * automatically added after those passed to fire().

          + * + * @method fire + * @param e {EventFacade|DOMEventFacade|Object|any} (see description) + * @param arg* {any} additional arguments received by all subscriptions + * @private + */ +Notifier.prototype.fire = function (e) { + // first arg to delegate notifier should be an object with currentTarget + var args = toArray(arguments, 0, true), + handle = this.handle, + ce = handle.evt, + sub = handle.sub, + thisObj = sub.context, + delegate = sub.filter, + event = e || {}; + + if (this.emitFacade) { + if (!e || !e.preventDefault) { + event = ce._getFacade(); + + if (isObject(e) && !e.preventDefault) { + Y.mix(event, e, true); + args[0] = event; + } else { + args.unshift(event); + } + } - delegates[delegateKey] = delegate; + event.type = ce.type; + event.details = args.slice(); + if (delegate) { + event.container = ce.host; + } + } else if (delegate && isObject(e) && e.currentTarget) { + args.shift(); } + sub.context = thisObj || event.currentTarget || ce.host; + ce.fire.apply(ce, args); + sub.context = thisObj; // reset for future firing +}; - listeners = delegate.listeners; - delegate.listeners = listeners ? (listeners + 1) : 1; - delegate[spec] = ename; +/** + *

          Wrapper class for the integration of new events into the YUI event + * infrastructure. Don't instantiate this object directly, use + * Y.Event.define(type, config). See that method for details.

          + * + *

          Properties that MAY or SHOULD be specified in the configuration are noted + * below and in the description of Y.Event.define.

          + * + * @class SyntheticEvent + * @constructor + * @param cfg {Object} Implementation pieces and configuration + * @since 3.1.0 + * @in event-synthetic + */ +function SyntheticEvent() { + this._init.apply(this, arguments); +} +Y.mix(SyntheticEvent, { + Notifier: Notifier, - args[0] = ename; + /** + * Returns the array of subscription handles for a node for the given event + * type. Passing true as the third argument will create a registry entry + * in the event system's DOM map to host the array if one doesn't yet exist. + * + * @method getRegistry + * @param node {Node} the node + * @param type {String} the event + * @param create {Boolean} create a registration entry to host a new array + * if one doesn't exist. + * @return {Array} + * @static + * @protected + * @since 3.2.0 + */ + getRegistry: function (node, type, create) { + var el = node._node, + yuid = Y.stamp(el), + key = 'event:' + yuid + type + '_synth', + events = DOMMap[yuid] || (DOMMap[yuid] = {}); + + if (!events[key] && create) { + events[key] = { + type : '_synth', + fn : noop, + capture : false, + el : el, + key : key, + domkey : yuid, + notifiers : [], + + detachAll : function () { + var notifiers = this.notifiers, + i = notifiers.length; + + while (--i >= 0) { + notifiers[i].detach(); + } + } + }; + } - // Remove element, delegation spec - args.splice(2, 2); - + return (events[key]) ? events[key].notifiers : null; + }, - // Subscribe to the Custom Event for the delegation spec + /** + * Alternate _delete() method for the CustomEvent object + * created to manage SyntheticEvent subscriptions. + * + * @method _deleteSub + * @param sub {Subscription} the subscription to clean up + * @private + * @since 3.2.0 + */ + _deleteSub: function (sub) { + if (sub && sub.fn) { + var synth = this.eventDef, + method = (sub.filter) ? 'detachDelegate' : 'detach'; - ceHandle = Y.on.apply(Y, args); + this.subscribers = {}; + this.subCount = 0; + synth[method](sub.node, sub, this.notifier, sub.filter); + synth._unregisterSub(sub); - // Hook into the detach method of the handle in order to clean up the - // 'delegates' map and remove the associated DOM event handler - // responsible for firing this Custom Event if all listener for this - // event have been removed. + delete sub.fn; + delete sub.node; + delete sub.context; + } + }, - Y.after(function () { - - delegate.listeners = (delegate.listeners - 1); - - if (delegate.listeners === 0) { - delegate.handle.detach(); - } + prototype: { + constructor: SyntheticEvent, - }, ceHandle, "detach"); + /** + * Construction logic for the event. + * + * @method _init + * @protected + */ + _init: function () { + var config = this.publishConfig || (this.publishConfig = {}); + + // The notification mechanism handles facade creation + this.emitFacade = ('emitFacade' in config) ? + config.emitFacade : + true; + config.emitFacade = false; + }, - return ceHandle; - -}; + /** + *

          Implementers MAY provide this method definition.

          + * + *

          Implement this function if the event supports a different + * subscription signature. This function is used by both + * on() and delegate(). The second parameter + * indicates that the event is being subscribed via + * delegate().

          + * + *

          Implementations must remove extra arguments from the args list + * before returning. The required args for on() + * subscriptions are

          + *
          [type, callback, target, context, argN...]
          + * + *

          The required args for delegate() + * subscriptions are

          + * + *
          [type, callback, target, filter, context, argN...]
          + * + *

          The return value from this function will be stored on the + * subscription in the '_extra' property for reference elsewhere.

          + * + * @method processArgs + * @param args {Array} parmeters passed to Y.on(..) or Y.delegate(..) + * @param delegate {Boolean} true if the subscription is from Y.delegate + * @return {any} + */ + processArgs: noop, + + /** + *

          Implementers MAY override this property.

          + * + *

          Whether to prevent multiple subscriptions to this event that are + * classified as being the same. By default, this means the subscribed + * callback is the same function. See the subMatch + * method. Setting this to true will impact performance for high volume + * events.

          + * + * @property preventDups + * @type {Boolean} + * @default false + */ + //preventDups : false, + + /** + *

          Implementers SHOULD provide this method definition.

          + * + * Implementation logic for subscriptions done via node.on(type, + * fn) or Y.on(type, fn, target). This + * function should set up the monitor(s) that will eventually fire the + * event. Typically this involves subscribing to at least one DOM + * event. It is recommended to store detach handles from any DOM + * subscriptions to make for easy cleanup in the detach + * method. Typically these handles are added to the sub + * object. Also for SyntheticEvents that leverage a single DOM + * subscription under the hood, it is recommended to pass the DOM event + * object to notifier.fire(e). (The event name on the + * object will be updated). + * + * @method on + * @param node {Node} the node the subscription is being applied to + * @param sub {Subscription} the object to track this subscription + * @param notifier {SyntheticEvent.Notifier} call notifier.fire(..) to + * trigger the execution of the subscribers + */ + on: noop, + + /** + *

          Implementers SHOULD provide this method definition.

          + * + *

          Implementation logic for detaching subscriptions done via + * node.on(type, fn). This function should clean up any + * subscriptions made in the on() phase.

          + * + * @method detach + * @param node {Node} the node the subscription was applied to + * @param sub {Subscription} the object tracking this subscription + * @param notifier {SyntheticEvent.Notifier} the Notifier used to + * trigger the execution of the subscribers + */ + detach: noop, + + /** + *

          Implementers SHOULD provide this method definition.

          + * + *

          Implementation logic for subscriptions done via + * node.delegate(type, fn, filter) or + * Y.delegate(type, fn, container, filter). Like with + * on() above, this function should monitor the environment + * for the event being fired, and trigger subscription execution by + * calling notifier.fire(e).

          + * + *

          This function receives a fourth argument, which is the filter + * used to identify which Node's are of interest to the subscription. + * The filter will be either a boolean function that accepts a target + * Node for each hierarchy level as the event bubbles, or a selector + * string. To translate selector strings into filter functions, use + * Y.delegate.compileFilter(filter).

          + * + * @method delegate + * @param node {Node} the node the subscription is being applied to + * @param sub {Subscription} the object to track this subscription + * @param notifier {SyntheticEvent.Notifier} call notifier.fire(..) to + * trigger the execution of the subscribers + * @param filter {String|Function} Selector string or function that + * accepts an event object and returns null, a Node, or an + * array of Nodes matching the criteria for processing. + * @since 3.2.0 + */ + delegate : noop, + + /** + *

          Implementers SHOULD provide this method definition.

          + * + *

          Implementation logic for detaching subscriptions done via + * node.delegate(type, fn, filter) or + * Y.delegate(type, fn, container, filter). This function + * should clean up any subscriptions made in the + * delegate() phase.

          + * + * @method detachDelegate + * @param node {Node} the node the subscription was applied to + * @param sub {Subscription} the object tracking this subscription + * @param notifier {SyntheticEvent.Notifier} the Notifier used to + * trigger the execution of the subscribers + * @param filter {String|Function} Selector string or function that + * accepts an event object and returns null, a Node, or an + * array of Nodes matching the criteria for processing. + * @since 3.2.0 + */ + detachDelegate : noop, + + /** + * Sets up the boilerplate for detaching the event and facilitating the + * execution of subscriber callbacks. + * + * @method _on + * @param args {Array} array of arguments passed to + * Y.on(...) or Y.delegate(...) + * @param delegate {Boolean} true if called from + * Y.delegate(...) + * @return {EventHandle} the detach handle for this subscription + * @private + * since 3.2.0 + */ + _on: function (args, delegate) { + var handles = [], + extra = this.processArgs(args, delegate), + selector = args[2], + method = delegate ? 'delegate' : 'on', + nodes, handle; + + // Can't just use Y.all because it doesn't support window (yet?) + nodes = (isString(selector)) ? query(selector) : toArray(selector); + + if (!nodes.length && isString(selector)) { + handle = Y.on('available', function () { + Y.mix(handle, Y[method].apply(Y, args), true); + }, selector); + + return handle; + } -Y.delegate = Event.delegate; + Y.Array.each(nodes, function (node) { + var subArgs = args.slice(), + filter; + node = Y.one(node); -}, '3.0.0' ,{requires:['node-base']}); + if (node) { + if (delegate) { + filter = subArgs.splice(3, 1)[0]; + } + + // (type, fn, el, thisObj, ...) => (fn, thisObj, ...) + subArgs.splice(0, 4, subArgs[1], subArgs[3]); + + if (!this.preventDups || !this.getSubs(node, args,null,true)) { + handle = this._getNotifier(node, subArgs, extra,filter); + + this[method](node, handle.sub, handle.notifier, filter); + + handles.push(handle); + } + } + }, this); + + return (handles.length === 1) ? + handles[0] : + new Y.EventHandle(handles); + }, + + /** + * Creates a new Notifier object for use by this event's + * on(...) or delegate(...) implementation. + * + * @method _getNotifier + * @param node {Node} the Node hosting the event + * @param args {Array} the subscription arguments passed to either + * Y.on(...) or Y.delegate(...) + * after running through processArgs(args) to + * normalize the argument signature + * @param extra {any} Extra data parsed from + * processArgs(args) + * @param filter {String|Function} the selector string or function + * filter passed to Y.delegate(...) (not + * present when called from Y.on(...)) + * @return {SyntheticEvent.Notifier} + * @private + * @since 3.2.0 + */ + _getNotifier: function (node, args, extra, filter) { + var dispatcher = new Y.CustomEvent(this.type, this.publishConfig), + handle = dispatcher.on.apply(dispatcher, args), + notifier = new Notifier(handle, this.emitFacade), + registry = SyntheticEvent.getRegistry(node, this.type, true), + sub = handle.sub; + + handle.notifier = notifier; + + sub.node = node; + sub.filter = filter; + if (extra) { + this.applyArgExtras(extra, sub); + } + + Y.mix(dispatcher, { + eventDef : this, + notifier : notifier, + host : node, // I forget what this is for + currentTarget: node, // for generating facades + target : node, // for generating facades + el : node._node, // For category detach + + _delete : SyntheticEvent._deleteSub + }, true); + + registry.push(handle); + + return handle; + }, + + /** + *

          Implementers MAY provide this method definition.

          + * + *

          Implement this function if you want extra data extracted during + * processArgs to be propagated to subscriptions on a per-node basis. + * That is to say, if you call Y.on('xyz', fn, xtra, 'div') + * the data returned from processArgs will be shared + * across the subscription objects for all the divs. If you want each + * subscription to receive unique information, do that processing + * here.

          + * + *

          The default implementation adds the data extracted by processArgs + * to the subscription object as sub._extra.

          + * + * @method applyArgExtras + * @param extra {any} Any extra data extracted from processArgs + * @param sub {Subscription} the individual subscription + */ + applyArgExtras: function (extra, sub) { + sub._extra = extra; + }, + + /** + * Removes the subscription from the Notifier registry. + * + * @method _unregisterSub + * @param sub {Subscription} the subscription + * @private + * @since 3.2.0 + */ + _unregisterSub: function (sub) { + var notifiers = SyntheticEvent.getRegistry(sub.node, this.type), + i; + + if (notifiers) { + for (i = notifiers.length - 1; i >= 0; --i) { + if (notifiers[i].sub === sub) { + notifiers.splice(i, 1); + break; + } + } + } + }, + + /** + * Removes the subscription(s) from the internal subscription dispatch + * mechanism. See SyntheticEvent._deleteSub. + * + * @method _detach + * @param args {Array} The arguments passed to + * node.detach(...) + * @private + * @since 3.2.0 + */ + _detach: function (args) { + // Can't use Y.all because it doesn't support window (yet?) + // TODO: Does Y.all support window now? + var target = args[2], + els = (isString(target)) ? + query(target) : toArray(target), + node, i, len, handles, j; + + // (type, fn, el, context, filter?) => (type, fn, context, filter?) + args.splice(2, 1); + + for (i = 0, len = els.length; i < len; ++i) { + node = Y.one(els[i]); + + if (node) { + handles = this.getSubs(node, args); + + if (handles) { + for (j = handles.length - 1; j >= 0; --j) { + handles[j].detach(); + } + } + } + } + }, + + /** + * Returns the detach handles of subscriptions on a node that satisfy a + * search/filter function. By default, the filter used is the + * subMatch method. + * + * @method getSubs + * @param node {Node} the node hosting the event + * @param args {Array} the array of original subscription args passed + * to Y.on(...) (before + * processArgs + * @param filter {Function} function used to identify a subscription + * for inclusion in the returned array + * @param first {Boolean} stop after the first match (used to check for + * duplicate subscriptions) + * @return {Array} detach handles for the matching subscriptions + */ + getSubs: function (node, args, filter, first) { + var notifiers = SyntheticEvent.getRegistry(node, this.type), + handles = [], + i, len, handle; + + if (notifiers) { + if (!filter) { + filter = this.subMatch; + } + + for (i = 0, len = notifiers.length; i < len; ++i) { + handle = notifiers[i]; + if (filter.call(this, handle.sub, args)) { + if (first) { + return handle; + } else { + handles.push(notifiers[i]); + } + } + } + } + + return handles.length && handles; + }, + + /** + *

          Implementers MAY override this to define what constitutes a + * "same" subscription. Override implementations should + * consider the lack of a comparator as a match, so calling + * getSubs() with no arguments will return all subs.

          + * + *

          Compares a set of subscription arguments against a Subscription + * object to determine if they match. The default implementation + * compares the callback function against the second argument passed to + * Y.on(...) or node.detach(...) etc.

          + * + * @method subMatch + * @param sub {Subscription} the existing subscription + * @param args {Array} the calling arguments passed to + * Y.on(...) etc. + * @return {Boolean} true if the sub can be described by the args + * present + * @since 3.2.0 + */ + subMatch: function (sub, args) { + // Default detach cares only about the callback matching + return !args[1] || sub.fn === args[1]; + } + } +}, true); + +Y.SyntheticEvent = SyntheticEvent; + +/** + *

          Defines a new event in the DOM event system. Implementers are + * responsible for monitoring for a scenario whereby the event is fired. A + * notifier object is provided to the functions identified below. When the + * criteria defining the event are met, call notifier.fire( [args] ); to + * execute event subscribers.

          + * + *

          The first parameter is the name of the event. The second parameter is a + * configuration object which define the behavior of the event system when the + * new event is subscribed to or detached from. The methods that should be + * defined in this configuration object are on, + * detach, delegate, and detachDelegate. + * You are free to define any other methods or properties needed to define your + * event. Be aware, however, that since the object is used to subclass + * SyntheticEvent, you should avoid method names used by SyntheticEvent unless + * your intention is to override the default behavior.

          + * + *

          This is a list of properties and methods that you can or should specify + * in the configuration object:

          + * + *
          + *
          on
          + *
          function (node, subscription, notifier) The + * implementation logic for subscription. Any special setup you need to + * do to create the environment for the event being fired--E.g. native + * DOM event subscriptions. Store subscription related objects and + * state on the subscription object. When the + * criteria have been met to fire the synthetic event, call + * notifier.fire(e). See Notifier's fire() + * method for details about what to pass as parameters.
          + * + *
          detach
          + *
          function (node, subscription, notifier) The + * implementation logic for cleaning up a detached subscription. E.g. + * detach any DOM subscriptions added in on.
          + * + *
          delegate
          + *
          function (node, subscription, notifier, filter) The + * implementation logic for subscription via Y.delegate or + * node.delegate. The filter is typically either a selector + * string or a function. You can use + * Y.delegate.compileFilter(selectorString) to create a + * filter function from a selector string if needed. The filter function + * expects an event object as input and should output either null, a + * matching Node, or an array of matching Nodes. Otherwise, this acts + * like on DOM event subscriptions. Store subscription + * related objects and information on the subscription + * object. When the criteria have been met to fire the synthetic event, + * call notifier.fire(e) as noted above.
          + * + *
          detachDelegate
          + *
          function (node, subscription, notifier) The + * implementation logic for cleaning up a detached delegate subscription. + * E.g. detach any DOM delegate subscriptions added in + * delegate.
          + * + *
          publishConfig
          + *
          (Object) The configuration object that will be used to instantiate + * the underlying CustomEvent. See Notifier's fire method + * for details.
          + * + *
          processArgs
          + *

          function (argArray, fromDelegate) Optional method + * to extract any additional arguments from the subscription + * signature. Using this allows on or + * delegate signatures like + * node.on("hover", overCallback, + * outCallback).

          + *

          When processing an atypical argument signature, make sure the + * args array is returned to the normal signature before returning + * from the function. For example, in the "hover" example + * above, the outCallback needs to be spliced + * out of the array. The expected signature of the args array for + * on() subscriptions is:

          + *
          + *              [type, callback, target, contextOverride, argN...]
          + *          
          + *

          And for delegate():

          + *
          + *              [type, callback, target, filter, contextOverride, argN...]
          + *          
          + *

          where target is the node the event is being + * subscribed for. You can see these signatures documented for + * Y.on() and Y.delegate() respectively.

          + *

          Whatever gets returned from the function will be stored on the + * subscription object under + * subscription._extra.

          + *
          subMatch
          + *
          + *

          function (sub, args) Compares a set of + * subscription arguments against a Subscription object to determine + * if they match. The default implementation compares the callback + * function against the second argument passed to + * Y.on(...) or node.detach(...) etc.

          + *
          + *
          + * + * @method Event.define + * @param type {String} the name of the event + * @param config {Object} the prototype definition for the new event (see above) + * @param force {Boolean} override an existing event (use with caution) + * @static + * @return {SyntheticEvent} the subclass implementation instance created to + * handle event subscriptions of this type + * @for Event + * @since 3.1.0 + * @in event-synthetic + */ +Y.Event.define = function (type, config, force) { + if (!config) { + config = {}; + } + + var eventDef = (isObject(type)) ? type : Y.merge({ type: type }, config), + Impl, synth; + + if (force || !Y.Node.DOM_EVENTS[eventDef.type]) { + Impl = function () { + SyntheticEvent.apply(this, arguments); + }; + Y.extend(Impl, SyntheticEvent, eventDef); + synth = new Impl(); + + type = synth.type; + + Y.Node.DOM_EVENTS[type] = Y.Env.evt.plugins[type] = { + eventDef: synth, + + on: function () { + return synth._on(toArray(arguments)); + }, + + delegate: function () { + return synth._on(toArray(arguments), true); + }, + + detach: function () { + return synth._detach(toArray(arguments)); + } + }; + + } + + return synth; +}; + + +}, '3.3.0' ,{requires:['node-base', 'event-custom']}); YUI.add('event-mousewheel', function(Y) { /** @@ -1783,191 +2380,69 @@ Y.Env.evt.plugins.mousewheel = { }; -}, '3.0.0' ,{requires:['node-base']}); +}, '3.3.0' ,{requires:['node-base']}); YUI.add('event-mouseenter', function(Y) { /** - * Adds support for mouseenter/mouseleave events + *

          Adds subscription and delegation support for mouseenter and mouseleave + * events. Unlike mouseover and mouseout, these events aren't fired from child + * elements of a subscribed node.

          + * + *

          This avoids receiving three mouseover notifications from a setup like

          + * + *
          div#container > p > a[href]
          + * + *

          where

          + * + *
          Y.one('#container').on('mouseover', callback)
          + * + *

          When the mouse moves over the link, one mouseover event is fired from + * #container, then when the mouse moves over the p, another mouseover event is + * fired and bubbles to #container, causing a second notification, and finally + * when the mouse moves over the link, a third mouseover event is fired and + * bubbles to #container for a third notification.

          + * + *

          By contrast, using mouseenter instead of mouseover, the callback would be + * executed only once when the mouse moves over #container.

          + * * @module event * @submodule event-mouseenter */ -var Event = Y.Event, - Lang = Y.Lang, - - plugins = Y.Env.evt.plugins, - - listeners = {}, - - eventConfig = { - - on: function(type, fn, el) { - - var args = Y.Array(arguments, 0, true), - element = el, - availHandle; - - - if (Lang.isString(el)) { - - // Need to use Y.all because if el is a string it could be a - // selector that returns a NodeList - - element = Y.all(el); - - if (element.size() === 0) { // Not found, check using onAvailable - - availHandle = Event.onAvailable(el, function() { - - availHandle.handle = Y.on.apply(Y, args); - - }, Event, true, false); - - return availHandle; - - } - - } - - - var sDOMEvent = (type === "mouseenter") ? "mouseover" : "mouseout", - - // The name of the custom event - sEventName = type + ":" + Y.stamp(element) + sDOMEvent, - - listener = listeners[sEventName], - - domEventHandle, - - ceHandle, - - nListeners; - - - // Bind an actual DOM event listener that will call the - // the custom event - if (!listener) { - - domEventHandle = Y.on(sDOMEvent, Y.rbind(Event._fireMouseEnter, Y, sEventName), element); - - // Hook into the _delete method for the Custom Event wrapper of this - // DOM Event in order to clean up the 'listeners' map and unsubscribe - // the associated Custom Event listeners fired by this DOM event - // listener if/when the user calls "purgeElement" OR removes all - // listeners of the Custom Event. - - Y.after(function (sub) { - - if (domEventHandle.sub == sub) { - - // Delete this event from the map of known mouseenter - // and mouseleave listeners - delete listeners[sEventName]; - - - // Unsubscribe all listeners of the Custom Event fired - // by this DOM event. - Y.detachAll(sEventName); - - } - - }, domEventHandle.evt, "_delete"); - - - listener = {}; - listener.handle = domEventHandle; - - listeners[sEventName] = listener; - - } - - nListeners = listener.count; +function notify(e, notifier) { + var current = e.currentTarget, + related = e.relatedTarget; - listener.count = nListeners ? (nListeners + 1) : 1; - - args[0] = sEventName; - - // Remove the element from the args - args.splice(2, 1); - - // Subscribe to the custom event - ceHandle = Y.on.apply(Y, args); - - // Hook into the detach method of the handle in order to clean up the - // 'listeners' map and remove the associated DOM event handler - // responsible for firing this Custom Event if all listener for this - // event have been removed. - - Y.after(function () { - - listener.count = (listener.count - 1); - - if (listener.count === 0) { - listener.handle.detach(); - } - - }, ceHandle, "detach"); - - - return ceHandle; - - } - - }; - - -Event._fireMouseEnter = function (e, eventName) { - - var relatedTarget = e.relatedTarget, - currentTarget = e.currentTarget; - - if (currentTarget !== relatedTarget && - !currentTarget.contains(relatedTarget)) { - - Y.publish(eventName, { - contextFn: function() { - return currentTarget; - } - }); + if (current !== related && !current.contains(related)) { + notifier.fire(e); + } +} - Y.fire(eventName, e); +var config = { + proxyType: "mouseover", - } + on: function (node, sub, notifier) { + sub.onHandle = node.on(this.proxyType, notify, null, notifier); + }, -}; + detach: function (node, sub) { + sub.onHandle.detach(); + }, + delegate: function (node, sub, notifier, filter) { + sub.delegateHandle = + Y.delegate(this.proxyType, notify, node, filter, null, notifier); + }, -/** - * Sets up a "mouseenter" listener—a listener that is called the first time - * the user's mouse enters the specified element(s). - * - * @event mouseenter - * @param type {string} "mouseenter" - * @param fn {function} The method the event invokes. - * @param el {string|node} The element(s) to assign the listener to. - * @param spec {string} Optional. String representing a selector that must - * match the target of the event in order for the listener to be called. - * @return {EventHandle} the detach handle - * @for YUI - */ -plugins.mouseenter = eventConfig; + detachDelegate: function (node, sub) { + sub.delegateHandle.detach(); + } +}; -/** -* Sets up a "mouseleave" listener—a listener that is called the first time -* the user's mouse leaves the specified element(s). -* -* @event mouseleave -* @param type {string} "mouseleave" -* @param fn {function} The method the event invokes. -* @param el {string|node} The element(s) to assign the listener to. -* @param spec {string} Optional. String representing a selector that must -* match the target of the event in order for the listener to be called. -* @return {EventHandle} the detach handle -* @for YUI - */ -plugins.mouseleave = eventConfig; +Y.Event.define("mouseenter", config, true); +Y.Event.define("mouseleave", Y.merge(config, { proxyType: "mouseout" }), true); -}, '3.0.0' ,{requires:['node-base']}); +}, '3.3.0' ,{requires:['event-synthetic']}); YUI.add('event-key', function(Y) { /** @@ -2066,90 +2541,155 @@ Y.Env.evt.plugins.key = { }; -}, '3.0.0' ,{requires:['node-base']}); +}, '3.3.0' ,{requires:['node-base']}); YUI.add('event-focus', function(Y) { /** - * Adds focus and blur event listener support. These events normally - * do not bubble, so this adds support for that so these events - * can be used in event delegation scenarios. + * Adds bubbling and delegation support to DOM events focus and blur. * * @module event * @submodule event-focus */ -(function() { +var Event = Y.Event, + YLang = Y.Lang, + isString = YLang.isString, + useActivate = YLang.isFunction( + Y.DOM.create('

          ').onbeforeactivate); + +function define(type, proxy, directEvent) { + var nodeDataKey = '_' + type + 'Notifiers'; + + Y.Event.define(type, { + + _attach: function (el, notifier, delegate) { + if (Y.DOM.isWindow(el)) { + return Event._attach([type, function (e) { + notifier.fire(e); + }, el]); + } else { + return Event._attach( + [proxy, this._proxy, el, this, notifier, delegate], + { capture: true }); + } + }, -var UA = Y.UA, - Event = Y.Event, - plugins = Y.Env.evt.plugins, - ie = UA.ie, - bUseMutation = (UA.opera || UA.webkit), - eventNames = { - focus: (ie ? 'focusin' : (bUseMutation ? 'DOMFocusIn' : 'focus')), - blur: (ie ? 'focusout' : (bUseMutation ? 'DOMFocusOut' : 'blur')) - }, + _proxy: function (e, notifier, delegate) { + var node = e.target, + notifiers = node.getData(nodeDataKey), + yuid = Y.stamp(e.currentTarget._node), + defer = (useActivate || e.target !== e.currentTarget), + sub = notifier.handle.sub, + filterArgs = [node, e].concat(sub.args || []), + directSub; + + notifier.currentTarget = (delegate) ? node : e.currentTarget; + notifier.container = (delegate) ? e.currentTarget : null; + + if (!sub.filter || sub.filter.apply(node, filterArgs)) { + // Maintain a list to handle subscriptions from nested + // containers div#a>div#b>input #a.on(focus..) #b.on(focus..), + // use one focus or blur subscription that fires notifiers from + // #b then #a to emulate bubble sequence. + if (!notifiers) { + notifiers = {}; + node.setData(nodeDataKey, notifiers); + + // only subscribe to the element's focus if the target is + // not the current target ( + if (defer) { + directSub = Event._attach( + [directEvent, this._notify, node._node]).sub; + directSub.once = true; + } + } - // Only need to use capture phase for Gecko since it doesn't support - // focusin, focusout, DOMFocusIn, or DOMFocusOut - CAPTURE_CONFIG = { capture: (UA.gecko ? true : false) }, + if (!notifiers[yuid]) { + notifiers[yuid] = []; + } + notifiers[yuid].push(notifier); - attach = function (args, config) { + if (!defer) { + this._notify(e); + } + } + }, - var a = Y.Array(args, 0, true); - a[0] = eventNames[a[0]]; - return Event._attach(a, config); + _notify: function (e, container) { + var node = e.currentTarget, + notifiers = node.getData(nodeDataKey), + // document.get('ownerDocument') returns null + doc = node.get('ownerDocument') || node, + target = node, + nots = [], + notifier, i, len; + + if (notifiers) { + // Walk up the parent axis until the origin node, + while (target && target !== doc) { + nots.push.apply(nots, notifiers[Y.stamp(target)] || []); + target = target.get('parentNode'); + } + nots.push.apply(nots, notifiers[Y.stamp(doc)] || []); - }, - - eventAdapter = { + for (i = 0, len = nots.length; i < len; ++i) { + notifier = nots[i]; + e.currentTarget = nots[i].currentTarget; - on: function () { - return attach(arguments, CAPTURE_CONFIG); - } + if (notifier.container) { + e.container = notifier.container; + } else { + delete e.container; + } - }; + notifier.fire(e); + } + // clear the notifications list (mainly for delegation) + node.clearData(nodeDataKey); + } + }, -Event._attachFocus = attach; -Event._attachBlur = attach; + on: function (node, sub, notifier) { + sub.onHandle = this._attach(node._node, notifier); + }, -/** - * Adds a DOM focus listener. Uses the focusin event in IE, - * DOMFocusIn for Opera and Webkit, and the capture phase for Gecko so that - * the event propagates in a way that enables event delegation. - * - * @for YUI - * @event focus - * @param type {string} 'focus' - * @param fn {function} the callback function to execute - * @param o {string|HTMLElement|collection} the element(s) to bind - * @param context optional context object - * @param args 0..n additional arguments to provide to the listener. - * @return {EventHandle} the detach handle - */ -plugins.focus = eventAdapter; + detach: function (node, sub) { + sub.onHandle.detach(); + }, -/** - * Adds a DOM blur listener. Uses the focusout event in IE, - * DOMFocusOut for Opera and Webkit, and the capture phase for Gecko so that - * the event propagates in a way that enables event delegation. - * - * @for YUI - * @event blur - * @param type {string} 'blur' - * @param fn {function} the callback function to execute - * @param o {string|HTMLElement|collection} the element(s) to bind - * @param context optional context object - * @param args 0..n additional arguments to provide to the listener. - * @return {EventHandle} the detach handle - */ -plugins.blur = eventAdapter; + delegate: function (node, sub, notifier, filter) { + if (isString(filter)) { + sub.filter = Y.delegate.compileFilter(filter); + } -})(); + sub.delegateHandle = this._attach(node._node, notifier, true); + }, + detachDelegate: function (node, sub) { + sub.delegateHandle.detach(); + } + }, true); +} -}, '3.0.0' ,{requires:['node-base']}); +// For IE, we need to defer to focusin rather than focus because +// `el.focus(); doSomething();` executes el.onbeforeactivate, el.onactivate, +// el.onfocusin, doSomething, then el.onfocus. All others support capture +// phase focus, which executes before doSomething. To guarantee consistent +// behavior for this use case, IE's direct subscriptions are made against +// focusin so subscribers will be notified before js following el.focus() is +// executed. +if (useActivate) { + // name capture phase direct subscription + define("focus", "beforeactivate", "focusin"); + define("blur", "beforedeactivate", "focusout"); +} else { + define("focus", "focus", "focus"); + define("blur", "blur", "blur"); +} + + +}, '3.3.0' ,{requires:['event-synthetic']}); YUI.add('event-resize', function(Y) { /** @@ -2213,8 +2753,63 @@ Y.Env.evt.plugins.windowresize = { })(); -}, '3.0.0' ,{requires:['node-base']}); +}, '3.3.0' ,{requires:['node-base']}); +YUI.add('event-hover', function(Y) { + +/** + * Adds support for a "hover" event. The event provides a convenience wrapper + * for subscribing separately to mouseenter and mouseleave. The signature for + * subscribing to the event is

          + * + *
          node.on("hover", overFn, outFn);
          + * node.delegate("hover", overFn, outFn, ".filterSelector");
          + * Y.on("hover", overFn, outFn, ".targetSelector");
          + * Y.delegate("hover", overFn, outFn, "#container", ".filterSelector");
          + * 
          + * + *

          Additionally, for compatibility with a more typical subscription + * signature, the following are also supported:

          + * + *
          Y.on("hover", overFn, ".targetSelector", outFn);
          + * Y.delegate("hover", overFn, "#container", outFn, ".filterSelector");
          + * 
          + * + * @module event + * @submodule event-hover + */ +var isFunction = Y.Lang.isFunction, + noop = function () {}, + conf = { + processArgs: function (args) { + // Y.delegate('hover', over, out, '#container', '.filter') + // comes in as ['hover', over, out, '#container', '.filter'], but + // node.delegate('hover', over, out, '.filter') + // comes in as ['hover', over, containerEl, out, '.filter'] + var i = isFunction(args[2]) ? 2 : 3; + + return (isFunction(args[i])) ? args.splice(i,1)[0] : noop; + }, + + on: function (node, sub, notifier, filter) { + sub._detach = node[(filter) ? "delegate" : "on"]({ + mouseenter: Y.bind(notifier.fire, notifier), + mouseleave: sub._extra + }, filter); + }, + + detach: function (node, sub, notifier) { + sub._detacher.detach(); + } + }; + +conf.delegate = conf.on; +conf.detachDelegate = conf.detach; + +Y.Event.define("hover", conf); + + +}, '3.3.0' ,{requires:['event-mouseenter']}); -YUI.add('event', function(Y){}, '3.0.0' ,{use:['event-base', 'event-delegate', 'event-mousewheel', 'event-mouseenter', 'event-key', 'event-focus', 'event-resize']}); +YUI.add('event', function(Y){}, '3.3.0' ,{use:['event-base', 'event-delegate', 'event-synthetic', 'event-mousewheel', 'event-mouseenter', 'event-key', 'event-focus', 'event-resize', 'event-hover']}); diff --git a/jssource/src_files/include/javascript/yui3/build/get/get-min.js b/jssource/src_files/include/javascript/yui3/build/get/get-min.js deleted file mode 100644 index cc7e1fd4..00000000 --- a/jssource/src_files/include/javascript/yui3/build/get/get-min.js +++ /dev/null @@ -1,8 +0,0 @@ -/* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. -Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 -*/ -YUI.add("get",function(A){(function(){var C=A.UA,B=A.Lang,E="text/javascript",F="text/css",D="stylesheet";A.Get=function(){var M={},K=0,U=false,W=function(a,X,b){var Y=b||A.config.win,c=Y.document,e=c.createElement(a),Z;for(Z in X){if(X[Z]&&X.hasOwnProperty(Z)){e.setAttribute(Z,X[Z]);}}return e;},T=function(Y,Z,X){var a={id:A.guid(),type:F,rel:D,href:Y};if(X){A.mix(a,X);}return W("link",a,Z);},S=function(Y,Z,X){var a={id:A.guid(),type:E,src:Y};if(X){A.mix(a,X);}return W("script",a,Z);},N=function(c){var X=M[c],Y,a,g,e,j,b,Z,f;if(X){Y=X.nodes;a=Y.length;g=X.win.document;e=g.getElementsByTagName("head")[0];if(X.insertBefore){j=L(X.insertBefore,c);if(j){e=j.parentNode;}}for(b=0;b - *
          onSuccess
          - *
          - * callback to execute when the script(s) are finished loading - * The callback receives an object back with the following - * data: - *
          - *
          win
          - *
          the window the script(s) were inserted into
          - *
          data
          - *
          the data object passed in when the request was made
          - *
          nodes
          - *
          An array containing references to the nodes that were - * inserted
          - *
          purge
          - *
          A function that, when executed, will remove the nodes - * that were inserted
          - *
          - *
          - *
          - *
          onTimeout
          - *
          - * callback to execute when a timeout occurs. - * The callback receives an object back with the following - * data: - *
          - *
          win
          - *
          the window the script(s) were inserted into
          - *
          data
          - *
          the data object passed in when the request was made
          - *
          nodes
          - *
          An array containing references to the nodes that were - * inserted
          - *
          purge
          - *
          A function that, when executed, will remove the nodes - * that were inserted
          - *
          - *
          - *
          - *
          onEnd
          - *
          a function that executes when the transaction finishes, regardless of the exit path
          - *
          onFailure
          - *
          - * callback to execute when the script load operation fails - * The callback receives an object back with the following - * data: - *
          - *
          win
          - *
          the window the script(s) were inserted into
          - *
          data
          - *
          the data object passed in when the request was made
          - *
          nodes
          - *
          An array containing references to the nodes that were - * inserted successfully
          - *
          purge
          - *
          A function that, when executed, will remove any nodes - * that were inserted
          - *
          - *
          - *
          - *
          context
          - *
          the execution context for the callbacks
          - *
          win
          - *
          a window other than the one the utility occupies
          - *
          autopurge
          - *
          - * setting to true will let the utilities cleanup routine purge - * the script once loaded - *
          - *
          purgethreshold
          - *
          - * The number of transaction before autopurge should be initiated - *
          - *
          data
          - *
          - * data that is supplied to the callback when the script(s) are - * loaded. - *
          - *
          insertBefore
          - *
          node or node id that will become the new node's nextSibling
          - * - *
          charset
          - *
          Node charset, default utf-8 (deprecated, use the attributes config)
          - *
          attributes
          - *
          An object literal containing additional attributes to add to the link tags
          - *
          timeout
          - *
          Number of milliseconds to wait before aborting and firing the timeout event
          - *
          -         *   Y.Get.script(
          -         *   ["http://yui.yahooapis.com/2.5.2/build/yahoo/yahoo-min.js",
          -         *    "http://yui.yahooapis.com/2.5.2/build/event/event-min.js"], {
          -         *     onSuccess: function(o) {
          -         *       this.log("won't cause error because Y is the context");
          -         *     },
          -         *     onFailure: function(o) {
          -         *     },
          -         *     onTimeout: function(o) {
          -         *     },
          -         *     data: "foo",
          -         *     timeout: 10000, // 10 second timeout
          -         *     context: Y, // make the YUI instance
          -         *     // win: otherframe // target another window/frame
          -         *     autopurge: true // allow the utility to choose when to remove the nodes
          -         *     purgetheshold: 1 // purge previous transaction before next transaction
          -         *   });
          -         * 
          - * @return {tId: string} an object containing info about the transaction - */ - script: function(url, opts) { - return _queue("script", url, opts); - }, - - /** - * Fetches and inserts one or more css link nodes into the - * head of the current document or the document in a specified - * window. - * @method css - * @static - * @param url {string} the url or urls to the css file(s) - * @param opts Options: - *
          - *
          onSuccess
          - *
          - * callback to execute when the css file(s) are finished loading - * The callback receives an object back with the following - * data: - *
          win
          - *
          the window the link nodes(s) were inserted into
          - *
          data
          - *
          the data object passed in when the request was made
          - *
          nodes
          - *
          An array containing references to the nodes that were - * inserted
          - *
          purge
          - *
          A function that, when executed, will remove the nodes - * that were inserted
          - *
          - *
          - * - *
          context
          - *
          the execution context for the callbacks
          - *
          win
          - *
          a window other than the one the utility occupies
          - *
          data
          - *
          - * data that is supplied to the callbacks when the nodes(s) are - * loaded. - *
          - *
          insertBefore
          - *
          node or node id that will become the new node's nextSibling
          - *
          charset
          - *
          Node charset, default utf-8 (deprecated, use the attributes config)
          - *
          attributes
          - *
          An object literal containing additional attributes to add to the link tags
          - * - *
          -         *      Y.Get.css("http://yui.yahooapis.com/2.3.1/build/menu/assets/skins/sam/menu.css");
          -         * 
          - *
          -         *   Y.Get.css(
          -         *   ["http://yui.yahooapis.com/2.3.1/build/menu/assets/skins/sam/menu.css",
          -         *     insertBefore: 'custom-styles' // nodes will be inserted before the specified node
          -         *   });
          -         * 
          - * @return {tId: string} an object containing info about the transaction - */ - css: function(url, opts) { - return _queue("css", url, opts); - } - }; -}(); - -})(); - - -}, '3.0.0' ); diff --git a/jssource/src_files/include/javascript/yui3/build/highlight/highlight-accentfold-min.js b/jssource/src_files/include/javascript/yui3/build/highlight/highlight-accentfold-min.js new file mode 100644 index 00000000..23ac004c --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/highlight/highlight-accentfold-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("highlight-accentfold",function(E){var D=E.Text.AccentFold,B=E.Escape,C={},A=E.mix(E.Highlight,{allFold:function(K,J,H){var I=A._TEMPLATE,F=[],G=0;H=E.merge({replacer:function(M,O,N,P){var L;if(O&&!(/\s/).test(N)){return M;}L=N.length;F.push(K.substring(G,P)+I.replace(/\{s\}/g,K.substr(P,L)));G=P+L;}},H||C);A.all(D.fold(K),D.fold(J),H);if(GY.Highlight. + * + * @module highlight + * @submodule highlight-accentfold + */ + +/** + * @class Highlight + * @static + */ + +var AccentFold = Y.Text.AccentFold, + Escape = Y.Escape, + + EMPTY_OBJECT = {}, + +Highlight = Y.mix(Y.Highlight, { + // -- Public Static Methods ------------------------------------------------ + + /** + * Accent-folding version of all(). + * + * @method allFold + * @param {String} haystack String to apply highlighting to. + * @param {String|Array} needles String or array of strings that should be + * highlighted. + * @param {Object} options (optional) Options object, which may contain + * zero or more of the following properties: + * + *
          + *
          startsWith (Boolean)
          + *
          + * By default, needles are highlighted wherever they appear in the + * haystack. If startsWith is true, matches + * must be anchored to the beginning of the string. + *
          + *
          + * + * @return {String} Escaped and highlighted copy of haystack. + * @static + */ + allFold: function (haystack, needles, options) { + var template = Highlight._TEMPLATE, + result = [], + startPos = 0; + + options = Y.merge({ + // While the highlight regex operates on the accent-folded strings, + // this replacer will highlight the matched positions in the + // original string. + // + // Note: this implementation doesn't handle multi-character folds, + // like "æ" -> "ae". Doing so correctly would be prohibitively + // expensive both in terms of code size and runtime performance, so + // I've chosen to take the pragmatic route and just not do it at + // all. This is one of many reasons why accent folding is best done + // on the server. + replacer: function (match, p1, foldedNeedle, pos) { + var len; + + // Ignore matches inside HTML entities. + if (p1 && !(/\s/).test(foldedNeedle)) { + return match; + } + + len = foldedNeedle.length; + + result.push(haystack.substring(startPos, pos) + + template.replace(/\{s\}/g, haystack.substr(pos, len))); + + startPos = pos + len; + } + }, options || EMPTY_OBJECT); + + // Run the highlighter on the folded strings. We don't care about the + // output; our replacer function will build the canonical highlighted + // string, with original accented characters. + Highlight.all(AccentFold.fold(haystack), AccentFold.fold(needles), + options); + + // Tack on the remainder of the haystack that wasn't highlighted, if + // any. + if (startPos < haystack.length - 1) { + result.push(haystack.substr(startPos)); + } + + return result.join(''); + }, + + /** + * Accent-folding version of start(). + * + * @method startFold + * @param {String} haystack String to apply highlighting to. + * @param {String|Array} needles String or array of strings that should be + * highlighted. + * @return {String} Escaped and highlighted copy of haystack. + * @static + */ + startFold: function (haystack, needles) { + return Highlight.allFold(haystack, needles, {startsWith: true}); + }, + + /** + * Accent-folding version of words(). + * + * @method wordsFold + * @param {String} haystack String to apply highlighting to. + * @param {String|Array} needles String or array of strings containing words + * that should be highlighted. If a string is passed, it will be split + * into words; if an array is passed, it is assumed to have already been + * split. + * @return {String} Escaped and highlighted copy of haystack. + * @static + */ + wordsFold: function (haystack, needles) { + var template = Highlight._TEMPLATE; + + return Highlight.words(haystack, AccentFold.fold(needles), { + mapper: function (word, needles) { + if (needles.hasOwnProperty(AccentFold.fold(word))) { + return template.replace(/\{s\}/g, Escape.html(word)); + } + + return Escape.html(word); + } + }); + } +}); + + +}, '3.3.0' ,{requires:['highlight-base', 'text-accentfold']}); diff --git a/jssource/src_files/include/javascript/yui3/build/highlight/highlight-base-min.js b/jssource/src_files/include/javascript/yui3/build/highlight/highlight-base-min.js new file mode 100644 index 00000000..41fccbf0 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/highlight/highlight-base-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("highlight-base",function(H){var G=H.Array,E=H.Escape,D=H.Text.WordBreak,A=H.Lang.isArray,F={},C="(&[^;\\s]*)?",B={_REGEX:C+"(%needles)",_REPLACER:function(I,K,J){return K&&!(/\s/).test(J)?I:B._TEMPLATE.replace(/\{s\}/g,J);},_START_REGEX:"^"+C+"(%needles)",_TEMPLATE:'{s}',all:function(O,N,J){var L,I,M,K;if(!J){J=F;}M=J.startsWith?B._START_REGEX:B._REGEX;K=J.replacer||B._REPLACER;N=A(N)?N.concat():[N];for(L=0,I=N.length;L + * Provides methods for highlighting strings within other strings by wrapping + * them in HTML. + *

          + * + *

          + * The highlight methods first escape any special HTML characters in the input + * strings and then highlight the appropriate substrings by wrapping them in a + * <b class="yui3-highlight"></b> element. The + * <b> element is used rather than + * <strong> in accordance with HTML5's definition of + * <b> as being purely presentational, which is exactly what + * highlighting is. + *

          + * + * @module highlight + * @submodule highlight-base + * @class Highlight + * @static + */ + +var YArray = Y.Array, + Escape = Y.Escape, + WordBreak = Y.Text.WordBreak, + + isArray = Y.Lang.isArray, + + EMPTY_OBJECT = {}, + + // Regex string that captures zero or one unclosed HTML entities. Used in + // the static regex template properties below. The entity matching is + // intentionally loose here, since there's a world of complexity involved in + // doing strict matching for this use case. + UNCLOSED_ENTITY = '(&[^;\\s]*)?', + +Highlight = { + // -- Protected Static Properties ------------------------------------------ + + /** + *

          + * Regular expression template for highlighting a match that occurs anywhere + * in a string. The placeholder %needles will be replaced with + * a list of needles to match, joined by | characters. + *

          + * + *

          + * This regex should have two capturing subpatterns: the first should match + * an unclosed HTML entity (e.g. "&" without a ";" at the end) 0 or 1 + * times; the second should contain the %needles placeholder. + * The first subpattern match is used to emulate a negative lookbehind + * assertion, in order to prevent highlighting inside HTML entities. + *

          + * + * @property _REGEX + * @type {String} + * @protected + * @static + * @final + */ + _REGEX: UNCLOSED_ENTITY + '(%needles)', + + /** + * Regex replacer function or string for normal matches. + * + * @property _REPLACER + * @type {Function|String} + * @protected + * @static + * @final + */ + _REPLACER: function (match, p1, p2) { + // Mimicking a negative lookbehind assertion to prevent matches inside + // HTML entities. Hat tip to Steven Levithan for the technique: + // http://blog.stevenlevithan.com/archives/mimic-lookbehind-javascript + return p1 && !(/\s/).test(p2) ? match : + Highlight._TEMPLATE.replace(/\{s\}/g, p2); + }, + + /** + *

          + * Regular expression template for highlighting start-of-string matches + * (i.e., only matches that occur at the beginning of a string). The + * placeholder %needles will be replaced with a list of needles + * to match, joined by | characters. + *

          + * + *

          + * See _REGEX for a description of the capturing subpatterns + * this regex should contain. + *

          + * + * @property _START_REGEX + * @type {String} + * @protected + * @static + * @final + */ + _START_REGEX: '^' + UNCLOSED_ENTITY + '(%needles)', + + /** + * Highlight template which will be used as a replacement for matched + * substrings. The placeholder {s} will be replaced with the + * matched substring. + * + * @property _TEMPLATE + * @type {String} + * @default '{s}' + * @protected + * @static + * @final + */ + _TEMPLATE: '{s}', + + // -- Public Static Methods ------------------------------------------------ + + /** + * Highlights all occurrences in the haystack string of the items + * in the needles array, regardless of where they occur. The + * returned string will have all HTML characters escaped except for the + * highlighting markup. + * + * @method all + * @param {String} haystack String to apply highlighting to. + * @param {String|Array} needles String or array of strings that should be + * highlighted. + * @param {Object} options (optional) Options object, which may contain + * zero or more of the following properties: + * + *
          + *
          caseSensitive (Boolean)
          + *
          + * If true, matching will be case-sensitive. Default is + * false. + *
          + * + *
          startsWith (Boolean)
          + *
          + * By default, needles are highlighted wherever they appear in the + * haystack. If startsWith is true, matches + * must be anchored to the beginning of the string. + *
          + *
          + * + * @return {String} Escaped and highlighted copy of haystack. + * @static + */ + all: function (haystack, needles, options) { + var i, len, regex, replacer; + + if (!options) { + options = EMPTY_OBJECT; + } + + // TODO: document options.replacer + regex = options.startsWith ? Highlight._START_REGEX : Highlight._REGEX; + replacer = options.replacer || Highlight._REPLACER; + + // Create a local copy of needles so we can safely modify it in the next + // step. + needles = isArray(needles) ? needles.concat() : [needles]; + + // Escape HTML characters and special regular expression characters in + // the needles so they can be used in a regex and matched against the + // escaped haystack. + for (i = 0, len = needles.length; i < len; ++i) { + needles[i] = Escape.regex(Escape.html(needles[i])); + } + + // Escape HTML characters in the haystack to prevent HTML injection. + haystack = Escape.html(haystack); + + return haystack.replace( + new RegExp( + regex.replace('%needles', needles.join('|')), + options.caseSensitive ? 'g' : 'gi' + ), + replacer + ); + }, + + /** + * Same as all(), but case-sensitive by default. + * + * @method allCase + * @param {String} haystack String to apply highlighting to. + * @param {String|Array} needles String or array of strings that should be + * highlighted. + * @param {Object} options (optional) Options object. See all() + * for details. + * @return {String} Escaped and highlighted copy of haystack. + * @static + */ + allCase: function (haystack, needles, options) { + return Highlight.all(haystack, needles, + Y.merge(options || EMPTY_OBJECT, {caseSensitive: true})); + }, + + /** + * Highlights needles that occur at the start of haystack. + * The returned string will have all HTML characters escaped except for the + * highlighting markup. + * + * @method start + * @param {String} haystack String to apply highlighting to. + * @param {String|Array} needles String or array of strings that should be + * highlighted. + * @param {Object} options (optional) Options object, which may contain + * zero or more of the following properties: + * + *
          + *
          caseSensitive (Boolean)
          + *
          + * If true, matching will be case-sensitive. Default is + * false. + *
          + *
          + * + * @return {String} Escaped and highlighted copy of haystack. + * @static + */ + start: function (haystack, needles, options) { + return Highlight.all(haystack, needles, + Y.merge(options || EMPTY_OBJECT, {startsWith: true})); + }, + + /** + * Same as start(), but case-sensitive by default. + * + * @method startCase + * @param {String} haystack String to apply highlighting to. + * @param {String|Array} needles String or array of strings that should be + * highlighted. + * @return {String} Escaped and highlighted copy of haystack. + * @static + */ + startCase: function (haystack, needles) { + // No options passthru for now, since it would be redundant. If start() + // ever supports more options than caseSensitive, then we'll start + // passing the options through. + return Highlight.start(haystack, needles, {caseSensitive: true}); + }, + + /** + * Highlights complete words in the haystack string that are also + * in the needles array. The returned string will have all HTML + * characters escaped except for the highlighting markup. + * + * @method words + * @param {String} haystack String to apply highlighting to. + * @param {String|Array} needles String or array of strings containing words + * that should be highlighted. If a string is passed, it will be split + * into words; if an array is passed, it is assumed to have already been + * split. + * @param {Object} options (optional) Options object, which may contain + * zero or more of the following properties: + * + *
          + *
          caseSensitive (Boolean)
          + *
          + * If true, matching will be case-sensitive. Default is + * false. + *
          + *
          + * + * @return {String} Escaped and highlighted copy of haystack. + * @static + */ + words: function (haystack, needles, options) { + var caseSensitive, + mapper, + template = Highlight._TEMPLATE, + words; + + if (!options) { + options = EMPTY_OBJECT; + } + + caseSensitive = !!options.caseSensitive; + + // Convert needles to a hash for faster lookups. + needles = YArray.hash( + isArray(needles) ? needles : WordBreak.getUniqueWords(needles, { + ignoreCase: !caseSensitive + }) + ); + + // The default word mapping function can be overridden with a custom + // one. This is used to implement accent-folded highlighting in the + // highlight-accentfold module. + mapper = options.mapper || function (word, needles) { + if (needles.hasOwnProperty(caseSensitive ? word : word.toLowerCase())) { + return template.replace(/\{s\}/g, Escape.html(word)); + } + + return Escape.html(word); + }; + + // Split the haystack into an array of words, including punctuation and + // whitespace so we can rebuild the string later. + words = WordBreak.getWords(haystack, { + includePunctuation: true, + includeWhitespace : true + }); + + return YArray.map(words, function (word) { + return mapper(word, needles); + }).join(''); + }, + + /** + * Same as words(), but case-sensitive by default. + * + * @method wordsCase + * @param {String} haystack String to apply highlighting to. + * @param {String|Array} needles String or array of strings containing words + * that should be highlighted. If a string is passed, it will be split + * into words; if an array is passed, it is assumed to have already been + * split. + * @return {String} Escaped and highlighted copy of haystack. + * @static + */ + wordsCase: function (haystack, needles) { + // No options passthru for now, since it would be redundant. If words() + // ever supports more options than caseSensitive, then we'll start + // passing the options through. + return Highlight.words(haystack, needles, {caseSensitive: true}); + } +}; + +Y.Highlight = Highlight; + + +}, '3.3.0' ,{requires:['array-extras', 'escape', 'text-wordbreak']}); diff --git a/jssource/src_files/include/javascript/yui3/build/highlight/highlight-min.js b/jssource/src_files/include/javascript/yui3/build/highlight/highlight-min.js new file mode 100644 index 00000000..0adadcc2 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/highlight/highlight-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("highlight-base",function(H){var G=H.Array,E=H.Escape,D=H.Text.WordBreak,A=H.Lang.isArray,F={},C="(&[^;\\s]*)?",B={_REGEX:C+"(%needles)",_REPLACER:function(I,K,J){return K&&!(/\s/).test(J)?I:B._TEMPLATE.replace(/\{s\}/g,J);},_START_REGEX:"^"+C+"(%needles)",_TEMPLATE:'{s}',all:function(O,N,J){var L,I,M,K;if(!J){J=F;}M=J.startsWith?B._START_REGEX:B._REGEX;K=J.replacer||B._REPLACER;N=A(N)?N.concat():[N];for(L=0,I=N.length;L + * Provides methods for highlighting strings within other strings by wrapping + * them in HTML. + *

          + * + *

          + * The highlight methods first escape any special HTML characters in the input + * strings and then highlight the appropriate substrings by wrapping them in a + * <b class="yui3-highlight"></b> element. The + * <b> element is used rather than + * <strong> in accordance with HTML5's definition of + * <b> as being purely presentational, which is exactly what + * highlighting is. + *

          + * + * @module highlight + * @submodule highlight-base + * @class Highlight + * @static + */ + +var YArray = Y.Array, + Escape = Y.Escape, + WordBreak = Y.Text.WordBreak, + + isArray = Y.Lang.isArray, + + EMPTY_OBJECT = {}, + + // Regex string that captures zero or one unclosed HTML entities. Used in + // the static regex template properties below. The entity matching is + // intentionally loose here, since there's a world of complexity involved in + // doing strict matching for this use case. + UNCLOSED_ENTITY = '(&[^;\\s]*)?', + +Highlight = { + // -- Protected Static Properties ------------------------------------------ + + /** + *

          + * Regular expression template for highlighting a match that occurs anywhere + * in a string. The placeholder %needles will be replaced with + * a list of needles to match, joined by | characters. + *

          + * + *

          + * This regex should have two capturing subpatterns: the first should match + * an unclosed HTML entity (e.g. "&" without a ";" at the end) 0 or 1 + * times; the second should contain the %needles placeholder. + * The first subpattern match is used to emulate a negative lookbehind + * assertion, in order to prevent highlighting inside HTML entities. + *

          + * + * @property _REGEX + * @type {String} + * @protected + * @static + * @final + */ + _REGEX: UNCLOSED_ENTITY + '(%needles)', + + /** + * Regex replacer function or string for normal matches. + * + * @property _REPLACER + * @type {Function|String} + * @protected + * @static + * @final + */ + _REPLACER: function (match, p1, p2) { + // Mimicking a negative lookbehind assertion to prevent matches inside + // HTML entities. Hat tip to Steven Levithan for the technique: + // http://blog.stevenlevithan.com/archives/mimic-lookbehind-javascript + return p1 && !(/\s/).test(p2) ? match : + Highlight._TEMPLATE.replace(/\{s\}/g, p2); + }, + + /** + *

          + * Regular expression template for highlighting start-of-string matches + * (i.e., only matches that occur at the beginning of a string). The + * placeholder %needles will be replaced with a list of needles + * to match, joined by | characters. + *

          + * + *

          + * See _REGEX for a description of the capturing subpatterns + * this regex should contain. + *

          + * + * @property _START_REGEX + * @type {String} + * @protected + * @static + * @final + */ + _START_REGEX: '^' + UNCLOSED_ENTITY + '(%needles)', + + /** + * Highlight template which will be used as a replacement for matched + * substrings. The placeholder {s} will be replaced with the + * matched substring. + * + * @property _TEMPLATE + * @type {String} + * @default '{s}' + * @protected + * @static + * @final + */ + _TEMPLATE: '{s}', + + // -- Public Static Methods ------------------------------------------------ + + /** + * Highlights all occurrences in the haystack string of the items + * in the needles array, regardless of where they occur. The + * returned string will have all HTML characters escaped except for the + * highlighting markup. + * + * @method all + * @param {String} haystack String to apply highlighting to. + * @param {String|Array} needles String or array of strings that should be + * highlighted. + * @param {Object} options (optional) Options object, which may contain + * zero or more of the following properties: + * + *
          + *
          caseSensitive (Boolean)
          + *
          + * If true, matching will be case-sensitive. Default is + * false. + *
          + * + *
          startsWith (Boolean)
          + *
          + * By default, needles are highlighted wherever they appear in the + * haystack. If startsWith is true, matches + * must be anchored to the beginning of the string. + *
          + *
          + * + * @return {String} Escaped and highlighted copy of haystack. + * @static + */ + all: function (haystack, needles, options) { + var i, len, regex, replacer; + + if (!options) { + options = EMPTY_OBJECT; + } + + // TODO: document options.replacer + regex = options.startsWith ? Highlight._START_REGEX : Highlight._REGEX; + replacer = options.replacer || Highlight._REPLACER; + + // Create a local copy of needles so we can safely modify it in the next + // step. + needles = isArray(needles) ? needles.concat() : [needles]; + + // Escape HTML characters and special regular expression characters in + // the needles so they can be used in a regex and matched against the + // escaped haystack. + for (i = 0, len = needles.length; i < len; ++i) { + needles[i] = Escape.regex(Escape.html(needles[i])); + } + + // Escape HTML characters in the haystack to prevent HTML injection. + haystack = Escape.html(haystack); + + return haystack.replace( + new RegExp( + regex.replace('%needles', needles.join('|')), + options.caseSensitive ? 'g' : 'gi' + ), + replacer + ); + }, + + /** + * Same as all(), but case-sensitive by default. + * + * @method allCase + * @param {String} haystack String to apply highlighting to. + * @param {String|Array} needles String or array of strings that should be + * highlighted. + * @param {Object} options (optional) Options object. See all() + * for details. + * @return {String} Escaped and highlighted copy of haystack. + * @static + */ + allCase: function (haystack, needles, options) { + return Highlight.all(haystack, needles, + Y.merge(options || EMPTY_OBJECT, {caseSensitive: true})); + }, + + /** + * Highlights needles that occur at the start of haystack. + * The returned string will have all HTML characters escaped except for the + * highlighting markup. + * + * @method start + * @param {String} haystack String to apply highlighting to. + * @param {String|Array} needles String or array of strings that should be + * highlighted. + * @param {Object} options (optional) Options object, which may contain + * zero or more of the following properties: + * + *
          + *
          caseSensitive (Boolean)
          + *
          + * If true, matching will be case-sensitive. Default is + * false. + *
          + *
          + * + * @return {String} Escaped and highlighted copy of haystack. + * @static + */ + start: function (haystack, needles, options) { + return Highlight.all(haystack, needles, + Y.merge(options || EMPTY_OBJECT, {startsWith: true})); + }, + + /** + * Same as start(), but case-sensitive by default. + * + * @method startCase + * @param {String} haystack String to apply highlighting to. + * @param {String|Array} needles String or array of strings that should be + * highlighted. + * @return {String} Escaped and highlighted copy of haystack. + * @static + */ + startCase: function (haystack, needles) { + // No options passthru for now, since it would be redundant. If start() + // ever supports more options than caseSensitive, then we'll start + // passing the options through. + return Highlight.start(haystack, needles, {caseSensitive: true}); + }, + + /** + * Highlights complete words in the haystack string that are also + * in the needles array. The returned string will have all HTML + * characters escaped except for the highlighting markup. + * + * @method words + * @param {String} haystack String to apply highlighting to. + * @param {String|Array} needles String or array of strings containing words + * that should be highlighted. If a string is passed, it will be split + * into words; if an array is passed, it is assumed to have already been + * split. + * @param {Object} options (optional) Options object, which may contain + * zero or more of the following properties: + * + *
          + *
          caseSensitive (Boolean)
          + *
          + * If true, matching will be case-sensitive. Default is + * false. + *
          + *
          + * + * @return {String} Escaped and highlighted copy of haystack. + * @static + */ + words: function (haystack, needles, options) { + var caseSensitive, + mapper, + template = Highlight._TEMPLATE, + words; + + if (!options) { + options = EMPTY_OBJECT; + } + + caseSensitive = !!options.caseSensitive; + + // Convert needles to a hash for faster lookups. + needles = YArray.hash( + isArray(needles) ? needles : WordBreak.getUniqueWords(needles, { + ignoreCase: !caseSensitive + }) + ); + + // The default word mapping function can be overridden with a custom + // one. This is used to implement accent-folded highlighting in the + // highlight-accentfold module. + mapper = options.mapper || function (word, needles) { + if (needles.hasOwnProperty(caseSensitive ? word : word.toLowerCase())) { + return template.replace(/\{s\}/g, Escape.html(word)); + } + + return Escape.html(word); + }; + + // Split the haystack into an array of words, including punctuation and + // whitespace so we can rebuild the string later. + words = WordBreak.getWords(haystack, { + includePunctuation: true, + includeWhitespace : true + }); + + return YArray.map(words, function (word) { + return mapper(word, needles); + }).join(''); + }, + + /** + * Same as words(), but case-sensitive by default. + * + * @method wordsCase + * @param {String} haystack String to apply highlighting to. + * @param {String|Array} needles String or array of strings containing words + * that should be highlighted. If a string is passed, it will be split + * into words; if an array is passed, it is assumed to have already been + * split. + * @return {String} Escaped and highlighted copy of haystack. + * @static + */ + wordsCase: function (haystack, needles) { + // No options passthru for now, since it would be redundant. If words() + // ever supports more options than caseSensitive, then we'll start + // passing the options through. + return Highlight.words(haystack, needles, {caseSensitive: true}); + } +}; + +Y.Highlight = Highlight; + + +}, '3.3.0' ,{requires:['array-extras', 'escape', 'text-wordbreak']}); +YUI.add('highlight-accentfold', function(Y) { + +/** + * Adds accent-folding highlighters to Y.Highlight. + * + * @module highlight + * @submodule highlight-accentfold + */ + +/** + * @class Highlight + * @static + */ + +var AccentFold = Y.Text.AccentFold, + Escape = Y.Escape, + + EMPTY_OBJECT = {}, + +Highlight = Y.mix(Y.Highlight, { + // -- Public Static Methods ------------------------------------------------ + + /** + * Accent-folding version of all(). + * + * @method allFold + * @param {String} haystack String to apply highlighting to. + * @param {String|Array} needles String or array of strings that should be + * highlighted. + * @param {Object} options (optional) Options object, which may contain + * zero or more of the following properties: + * + *
          + *
          startsWith (Boolean)
          + *
          + * By default, needles are highlighted wherever they appear in the + * haystack. If startsWith is true, matches + * must be anchored to the beginning of the string. + *
          + *
          + * + * @return {String} Escaped and highlighted copy of haystack. + * @static + */ + allFold: function (haystack, needles, options) { + var template = Highlight._TEMPLATE, + result = [], + startPos = 0; + + options = Y.merge({ + // While the highlight regex operates on the accent-folded strings, + // this replacer will highlight the matched positions in the + // original string. + // + // Note: this implementation doesn't handle multi-character folds, + // like "æ" -> "ae". Doing so correctly would be prohibitively + // expensive both in terms of code size and runtime performance, so + // I've chosen to take the pragmatic route and just not do it at + // all. This is one of many reasons why accent folding is best done + // on the server. + replacer: function (match, p1, foldedNeedle, pos) { + var len; + + // Ignore matches inside HTML entities. + if (p1 && !(/\s/).test(foldedNeedle)) { + return match; + } + + len = foldedNeedle.length; + + result.push(haystack.substring(startPos, pos) + + template.replace(/\{s\}/g, haystack.substr(pos, len))); + + startPos = pos + len; + } + }, options || EMPTY_OBJECT); + + // Run the highlighter on the folded strings. We don't care about the + // output; our replacer function will build the canonical highlighted + // string, with original accented characters. + Highlight.all(AccentFold.fold(haystack), AccentFold.fold(needles), + options); + + // Tack on the remainder of the haystack that wasn't highlighted, if + // any. + if (startPos < haystack.length - 1) { + result.push(haystack.substr(startPos)); + } + + return result.join(''); + }, + + /** + * Accent-folding version of start(). + * + * @method startFold + * @param {String} haystack String to apply highlighting to. + * @param {String|Array} needles String or array of strings that should be + * highlighted. + * @return {String} Escaped and highlighted copy of haystack. + * @static + */ + startFold: function (haystack, needles) { + return Highlight.allFold(haystack, needles, {startsWith: true}); + }, + + /** + * Accent-folding version of words(). + * + * @method wordsFold + * @param {String} haystack String to apply highlighting to. + * @param {String|Array} needles String or array of strings containing words + * that should be highlighted. If a string is passed, it will be split + * into words; if an array is passed, it is assumed to have already been + * split. + * @return {String} Escaped and highlighted copy of haystack. + * @static + */ + wordsFold: function (haystack, needles) { + var template = Highlight._TEMPLATE; + + return Highlight.words(haystack, AccentFold.fold(needles), { + mapper: function (word, needles) { + if (needles.hasOwnProperty(AccentFold.fold(word))) { + return template.replace(/\{s\}/g, Escape.html(word)); + } + + return Escape.html(word); + } + }); + } +}); + + +}, '3.3.0' ,{requires:['highlight-base', 'text-accentfold']}); + + +YUI.add('highlight', function(Y){}, '3.3.0' ,{use:['highlight-base', 'highlight-accentfold']}); + diff --git a/jssource/src_files/include/javascript/yui3/build/history-deprecated/history-deprecated-min.js b/jssource/src_files/include/javascript/yui3/build/history-deprecated/history-deprecated-min.js new file mode 100644 index 00000000..251ec6e8 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/history-deprecated/history-deprecated-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("history-deprecated",function(A){var C=A.config.win,U=A.config.doc,D=encodeURIComponent,O=decodeURIComponent,J,K,R="Missing or invalid argument",M=/([^=&]+)=([^&]*)/g,B=false,N,L="history:ready",Q="history:globalStateChange",F="history:moduleStateChange";K=YUI.Env.history||{ready:false,_modules:[],_stateField:null,_historyIFrame:null};YUI.Env.history=K;if(A.UA.gecko){N=function(){var G=/#(.*)$/.exec(C.location.href);return G&&G[1]?G[1]:"";};}else{N=function(){return C.location.hash.substr(1);};}function S(){var H=[],G=[];A.Object.each(K._modules,function(V,W){H.push(W+"="+V.initialState);G.push(W+"="+V.currentState);});K._stateField.set("value",H.join("&")+"|"+G.join("&"));}function P(W){var G,V=[],H=false;if(W){M.lastIndex=0;while((G=M.exec(W))){V[G[1]]=G[2];}A.Object.each(K._modules,function(X,Z){var Y=V[Z];if(!Y||X.currentState!==Y){X.currentState=Y||X.initialState;X.fire(F,O(X.currentState));H=true;}});}else{A.Object.each(K._modules,function(X,Y){if(X.currentState!==X.initialState){X.currentState=X.initialState;X.fire(F,O(X.currentState));H=true;}});}if(H){J.fire(Q);}}function I(W){var G,V;G=""+W.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")+"";try{V=K._historyIFrame.get("contentWindow.document");V.invoke("open");V.invoke("write",G,"","","","");V.invoke("close");return true;}catch(H){return false;}}function E(){var G,V,H;if(!K._historyIFrame.get("contentWindow.document")){setTimeout(E,10);return;}G=K._historyIFrame.get("contentWindow.document.body");V=G?G.get("innerText"):null;H=N();setInterval(function(){var Y,W,X;G=K._historyIFrame.get("contentWindow.document.body");Y=G?G.get("innerText"):null;X=N();if(Y!==V){V=Y;P(V);if(!V){W=[];A.Object.each(K._modules,function(Z,a){W.push(a+"="+Z.initialState);});X=W.join("&");}else{X=V;}C.location.hash=H=X;S();}else{if(X!==H){H=X;I(X);}}},50);K.ready=true;J.fire(L);}function T(){var H,Z,X,V,G,W,Y;Z=K._stateField.get("value").split("|");if(Z.length>1){M.lastIndex=0;while((H=M.exec(Z[0]))){X=H[1];G=H[2];V=K._modules[X];if(V){V.initialState=G;}}M.lastIndex=0;while((H=M.exec(Z[1]))){X=H[1];W=H[2];V=K._modules[X];if(V){V.currentState=W;}}}if(!A.Lang.isUndefined(C.onhashchange)&&(A.Lang.isUndefined(U.documentMode)||U.documentMode>7)){C.onhashchange=function(){var a=N();P(a);S();};K.ready=true;J.fire(L);}else{if(B){E();}else{Y=N();setInterval(function(){var a=N();if(a!==Y){Y=a;P(Y);S();}},50);K.ready=true;J.fire(L);}}}J=A.mix(new A.EventTarget(),{register:function(V,G){var H;if(!A.Lang.isString(V)||A.Lang.trim(V)===""||!A.Lang.isString(G)){throw new Error(R);}V=D(V);G=D(G);if(K._modules[V]){return;}if(K.ready){return null;}H=new J.Module(V,G);K._modules[V]=H;return H;},initialize:function(G,W){var H,V;if(K.ready){return true;}G=A.one(G);if(!G){throw new Error(R);}H=G.get("tagName").toUpperCase();V=G.get("type");if(H!=="TEXTAREA"&&(H!=="INPUT"||V!=="hidden"&&V!=="text")){throw new Error(R);}if(A.UA.ie&&(A.Lang.isUndefined(U.documentMode)||U.documentMode<8)){B=true;W=A.one(W);if(!W||W.get("tagName").toUpperCase()!=="IFRAME"){throw new Error(R);}}if(A.UA.opera&&!A.Lang.isUndefined(C.history.navigationMode)){C.history.navigationMode="compatible";}K._stateField=G;K._historyIFrame=W;A.on("domready",T);return true;},navigate:function(H,V){var G;if(!A.Lang.isString(H)||!A.Lang.isString(V)){throw new Error(R);}G={};G[H]=V;return J.multiNavigate(G);},multiNavigate:function(H){var V=[],W,G=false;if(!K.ready){return false;}A.Object.each(K._modules,function(Y,Z){var a,X=O(Z);if(!H.hasOwnProperty(X)){a=Y.currentState;}else{a=D(H[X]);if(a!==Y.upcomingState){Y.upcomingState=a;G=true;}}V.push(Z+"="+a);});if(!G){return false;}W=V.join("&");if(B){return I(W);}else{C.location.hash=W;return true;}},getCurrentState:function(H){var G;if(!A.Lang.isString(H)){throw new Error(R);}if(!K.ready){return null;}H=D(H);G=K._modules[H];if(!G){return null;}return O(G.currentState);},getBookmarkedState:function(W){var G,H,V;if(!A.Lang.isString(W)){throw new Error(R);}W=D(W);V=C.location.href;H=V.indexOf("#");if(H>=0){V=V.substr(H+1);M.lastIndex=0;while((G=M.exec(V))){if(G[1]===W){return O(G[2]);}}}return null;},getQueryStringParameter:function(X,H){var G,W,V;H=H||C.location.href;V=H.indexOf("?");W=V>=0?H.substr(V+1):H;V=W.lastIndexOf("#");W=V>=0?W.substr(0,V):W;M.lastIndex=0;while((G=M.exec(W))){if(G[1]===X){return O(G[2]);}}return null;}});J.Module=function(H,G){this.id=H;this.initialState=G;this.currentState=G;this.upcomingState=G;};A.augment(J.Module,A.EventTarget);A.History=J;},"3.3.0",{skinnable:false,requires:["node-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/history-deprecated/history-deprecated.js b/jssource/src_files/include/javascript/yui3/build/history-deprecated/history-deprecated.js new file mode 100644 index 00000000..2d778e9e --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/history-deprecated/history-deprecated.js @@ -0,0 +1,682 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('history-deprecated', function(Y) { + +/*global YUI */ + +/** + * Deprecated since 3.2.0. The Browser History Utility provides + * the ability to use the back/forward navigation buttons in a DHTML + * application. It also allows a DHTML application to be bookmarked in a + * specific state. + * + * This utility requires the following static markup: + * + * <iframe id="yui-history-iframe" src="path-to-real-asset-in-same-domain"></iframe> + * <input id="yui-history-field" type="hidden"> + * + * @module history-deprecated + * @deprecated Please use the new "history" module instead. + */ + +/** + * This class represents an instance of the browser history utility. + * @class History + * @constructor + * @deprecated Please use the new "history" module instead. + */ + + // Shortcuts, etc. + var win = Y.config.win, + doc = Y.config.doc, + + encode = encodeURIComponent, + decode = decodeURIComponent, + + H, G, + + // YUI Compressor helper... + E_MISSING_OR_INVALID_ARG = 'Missing or invalid argument', + + // Regular expression used to parse query strings and such. + REGEXP = /([^=&]+)=([^&]*)/g, + + // A few private variables... + _useIFrame = false, + _getHash, + + /** + * @event history:ready + * @description Fires when the browser history utility is ready + * @type Event.Custom + */ + EV_HISTORY_READY = 'history:ready', + + /** + * @event history:globalStateChange + * @description Fires when the global state of the page has changed (that is, + * when the state of at least one browser history module has changed) + * @type Event.Custom + */ + EV_HISTORY_GLOBAL_STATE_CHANGE = 'history:globalStateChange', + + /** + * @event history:moduleStateChange + * @description Fires when the state of a history module object has changed + * @type Event.Custom + */ + EV_HISTORY_MODULE_STATE_CHANGE = 'history:moduleStateChange'; + + + G = YUI.Env.history || { + + // Flag used to tell whether the history utility is ready to be used. + ready: false, + + // List of registered modules. + _modules: [], + + // INPUT field (with type="hidden" or type="text") or TEXTAREA. + // This field keeps the value of the initial state, current state + // the list of all states across pages within a single browser session. + _stateField: null, + + // Hidden IFrame used to store the browsing history on IE6/7. + _historyIFrame: null + }; + + YUI.Env.history = G; + + /** + * Returns the portion of the hash after the '#' symbol. + * @method _getHash + * @return {string} The hash portion of the document's location + * @private + */ + if (Y.UA.gecko) { + // We branch at runtime for Gecko since window.location.hash in Gecko + // returns a decoded string, and we want all encoding untouched. + _getHash = function () { + var m = /#(.*)$/.exec(win.location.href); + return m && m[1] ? m[1] : ''; + }; + } else { + _getHash = function () { + return win.location.hash.substr(1); + }; + } + + /** + * Stores the initial state and current state for all registered modules + * in the (hidden) form field specified during initialization. + * @method _storeStates + * @private + */ + function _storeStates() { + var initialStates = [], currentStates = []; + + Y.Object.each(G._modules, function (module, moduleId) { + initialStates.push(moduleId + '=' + module.initialState); + currentStates.push(moduleId + '=' + module.currentState); + }); + + G._stateField.set('value', initialStates.join('&') + '|' + currentStates.join('&')); + } + + /** + * Sets the new currentState attribute of all modules depending on the new fully + * qualified state. Also notifies the modules which current state has changed. + * @method _handleFQStateChange + * @param {string} fqstate fully qualified state + * @private + */ + function _handleFQStateChange(fqstate) { + var m, states = [], globalStateChanged = false; + + if (fqstate) { + + REGEXP.lastIndex = 0; + while ((m = REGEXP.exec(fqstate))) { + states[m[1]] = m[2]; + } + + Y.Object.each(G._modules, function (module, moduleId) { + var currentState = states[moduleId]; + + if (!currentState || module.currentState !== currentState) { + module.currentState = currentState || module.initialState; + module.fire(EV_HISTORY_MODULE_STATE_CHANGE, decode(module.currentState)); + globalStateChanged = true; + } + }); + + } else { + + Y.Object.each(G._modules, function (module, moduleId) { + if (module.currentState !== module.initialState) { + module.currentState = module.initialState; + module.fire(EV_HISTORY_MODULE_STATE_CHANGE, decode(module.currentState)); + globalStateChanged = true; + } + }); + } + + if (globalStateChanged) { + H.fire(EV_HISTORY_GLOBAL_STATE_CHANGE); + } + } + + /** + * Update the IFrame with our new state. + * @method _updateIFrame + * @private + * @return {boolean} true if successful. false otherwise. + */ + function _updateIFrame(fqstate) { + var html, doc; + + html = '' + + fqstate.replace(/&/g,'&'). + replace(//g,'>'). + replace(/"/g,'"') + + ''; + + try { + doc = G._historyIFrame.get('contentWindow.document'); + // TODO: The Node API should expose these methods in the very near future... + doc.invoke('open'); + doc.invoke('write', html, '', '', '', ''); // see bug #2447937 + doc.invoke('close'); + return true; + } catch (e) { + return false; + } + } + + /** + * Periodically checks whether our internal IFrame is ready to be used + * @method _checkIframeLoaded + * @private + */ + function _checkIframeLoaded() { + var elem, fqstate, hash; + + if (!G._historyIFrame.get('contentWindow.document')) { + // Check again in 10 msec... + setTimeout(_checkIframeLoaded, 10); + return; + } + + // Periodically check whether a navigate operation has been + // requested on the main window. This will happen when + // History.navigate has been called or after the user + // has hit the back/forward button. + elem = G._historyIFrame.get('contentWindow.document.body'); + // We must use innerText, and not innerHTML because our string contains + // the "&" character (which would end up being escaped as "&") and + // the string comparison would fail... + fqstate = elem ? elem.get('innerText') : null; + + hash = _getHash(); + + setInterval(function () { + var newfqstate, states, newHash; + + elem = G._historyIFrame.get('contentWindow.document.body'); + // See my comment above about using innerText instead of innerHTML... + newfqstate = elem ? elem.get('innerText') : null; + + newHash = _getHash(); + + if (newfqstate !== fqstate) { + + fqstate = newfqstate; + _handleFQStateChange(fqstate); + + if (!fqstate) { + states = []; + Y.Object.each(G._modules, function (module, moduleId) { + states.push(moduleId + '=' + module.initialState); + }); + newHash = states.join('&'); + } else { + newHash = fqstate; + } + + // Allow the state to be bookmarked by setting the top window's + // URL fragment identifier. Note that here, we are on IE < 8 + // which does not touch the browser history when changing the + // hash (unlike all the other browsers). + win.location.hash = hash = newHash; + + _storeStates(); + + } else if (newHash !== hash) { + + // The hash has changed. The user might have clicked on a link, + // or modified the URL directly, or opened the same application + // bookmarked in a specific state using a bookmark. However, we + // know the hash change was not caused by a hit on the back or + // forward buttons, or by a call to navigate() (because it would + // have been handled above) We must handle these cases, which is + // why we also need to keep track of hash changes on IE! + + // Note that IE6 has some major issues with this kind of user + // interaction (the history stack gets completely messed up) + // but it seems to work fine on IE7. + + hash = newHash; + + // Now, store a new history entry. The following will cause the + // code above to execute, doing all the dirty work for us... + _updateIFrame(newHash); + } + + }, 50); + + G.ready = true; + H.fire(EV_HISTORY_READY); + } + + /** + * Finish up the initialization of the browser utility library. + * @method _initialize + * @private + */ + function _initialize() { + var m, parts, moduleId, module, initialState, currentState, hash; + + // Decode the content of our storage field... + parts = G._stateField.get('value').split('|'); + + if (parts.length > 1) { + + REGEXP.lastIndex = 0; + while ((m = REGEXP.exec(parts[0]))) { + moduleId = m[1]; + initialState = m[2]; + module = G._modules[moduleId]; + if (module) { + module.initialState = initialState; + } + } + + REGEXP.lastIndex = 0; + while ((m = REGEXP.exec(parts[1]))) { + moduleId = m[1]; + currentState = m[2]; + module = G._modules[moduleId]; + if (module) { + module.currentState = currentState; + } + } + } + + // IE8 in IE7 mode defines window.onhashchange, but never fires it... + if (!Y.Lang.isUndefined(win.onhashchange) && + (Y.Lang.isUndefined(doc.documentMode) || doc.documentMode > 7)) { + + // The HTML5 way of handling DHTML history... + // @TODO This is case-insensitive, at least in IE (WHY? spec, please actually specify things) + // bug #2528444 + win.onhashchange = function () { + var hash = _getHash(); + _handleFQStateChange(hash); + _storeStates(); + }; + + G.ready = true; + H.fire(EV_HISTORY_READY); + + } else if (_useIFrame) { + + // IE < 8 or IE8 in quirks mode or IE7 standards mode + _checkIframeLoaded(); + + } else { + + // Periodically check whether a navigate operation has been + // requested on the main window. This will happen when + // History.navigate has been called, or after the user + // has hit the back/forward button. + + // On Gecko and Opera, we just need to watch the hash... + hash = _getHash(); + + setInterval(function () { + var newHash = _getHash(); + if (newHash !== hash) { + hash = newHash; + _handleFQStateChange(hash); + _storeStates(); + } + }, 50); + + G.ready = true; + H.fire(EV_HISTORY_READY); + } + } + + + H = Y.mix(new Y.EventTarget(), { + + /** + * Registers a new module. + * @method register + * @param {string} moduleId Non-empty string uniquely identifying the + * module you wish to register. + * @param {string} initialState The initial state of the specified + * module corresponding to its earliest history entry. + * @return {History.Module} The newly registered module + */ + register: function (moduleId, initialState) { + var module; + + if (!Y.Lang.isString(moduleId) || Y.Lang.trim(moduleId) === '' || !Y.Lang.isString(initialState)) { + throw new Error(E_MISSING_OR_INVALID_ARG); + } + + moduleId = encode(moduleId); + initialState = encode(initialState); + + if (G._modules[moduleId]) { + // The module seems to have already been registered. + return; + } + + // Note: A module CANNOT be registered once the browser history + // utility has been initialized. This is related to reading and + // writing state values from/to the input field. Relaxing this + // rule would potentially create situations rather complicated + // to deal with. + if (G.ready) { + return null; + } + + module = new H.Module(moduleId, initialState); + G._modules[moduleId] = module; + return module; + }, + + /** + * Initializes the Browser History Manager. Call this method + * from a script block located right after the opening body tag. + * @method initialize + * @param {string|HTML Element} stateField used + * to store application states. Must be in the static markup. + * @param {string|HTML Element} historyIFrame IFrame used to store + * the history (only required for IE6/7) + * @public + */ + initialize: function (stateField, historyIFrame) { + var tagName, type; + + if (G.ready) { + // The browser history utility has already been initialized. + return true; + } + + stateField = Y.one(stateField); + if (!stateField) { + throw new Error(E_MISSING_OR_INVALID_ARG); + } + + tagName = stateField.get('tagName').toUpperCase(); + type = stateField.get('type'); + + if (tagName !== 'TEXTAREA' && (tagName !== 'INPUT' || type !== 'hidden' && type !== 'text')) { + throw new Error(E_MISSING_OR_INVALID_ARG); + } + + // IE < 8 or IE8 in quirks mode or IE7 standards mode + if (Y.UA.ie && (Y.Lang.isUndefined(doc.documentMode) || doc.documentMode < 8)) { + _useIFrame = true; + historyIFrame = Y.one(historyIFrame); + if (!historyIFrame || historyIFrame.get('tagName').toUpperCase() !== 'IFRAME') { + throw new Error(E_MISSING_OR_INVALID_ARG); + } + } + + if (Y.UA.opera && !Y.Lang.isUndefined(win.history.navigationMode)) { + // Disable Opera's fast back/forward navigation mode and put + // it in compatible mode. This makes anchor-based history + // navigation work after the page has been navigated away + // from and re-activated, at the cost of slowing down + // back/forward navigation to and from that page. + win.history.navigationMode = 'compatible'; + } + + G._stateField = stateField; + G._historyIFrame = historyIFrame; + + Y.on('domready', _initialize); + return true; + }, + + /** + * Stores a new entry in the browser history by changing the state of a registered module. + * @method navigate + * @param {string} module Non-empty string representing your module. + * @param {string} state String representing the new state of the specified module. + * @return {boolean} Indicates whether the new state was successfully added to the history. + * @public + */ + navigate: function (moduleId, state) { + var states; + + if (!Y.Lang.isString(moduleId) || !Y.Lang.isString(state)) { + throw new Error(E_MISSING_OR_INVALID_ARG); + } + + // The ncoding of module id and state takes place in mutiNavigate. + states = {}; + states[moduleId] = state; + + return H.multiNavigate(states); + }, + + /** + * Stores a new entry in the browser history by changing the state + * of several registered modules in one atomic operation. + * @method multiNavigate + * @param {object} states Associative array of module-state pairs to set simultaneously. + * @return {boolean} Indicates whether the new state was successfully added to the history. + * @public + */ + multiNavigate: function (states) { + var newStates = [], fqstate, globalStateChanged = false; + + if (!G.ready) { + return false; + } + + Y.Object.each(G._modules, function (module, moduleId) { + var state, decodedModuleId = decode(moduleId); + + if (!states.hasOwnProperty(decodedModuleId)) { + // The caller did not wish to modify the state of this + // module. We must however include it in fqstate! + state = module.currentState; + } else { + state = encode(states[decodedModuleId]); + if (state !== module.upcomingState) { + module.upcomingState = state; + globalStateChanged = true; + } + } + + newStates.push(moduleId + '=' + state); + }); + + if (!globalStateChanged) { + // Nothing changed, so don't do anything. + return false; + } + + fqstate = newStates.join('&'); + + if (_useIFrame) { + return _updateIFrame(fqstate); + } else { + win.location.hash = fqstate; + return true; + } + }, + + /** + * Returns the current state of the specified module. + * @method getCurrentState + * @param {string} moduleId Non-empty string representing your module. + * @return {string} The current state of the specified module. + * @public + */ + getCurrentState: function (moduleId) { + var module; + + if (!Y.Lang.isString(moduleId)) { + throw new Error(E_MISSING_OR_INVALID_ARG); + } + + if (!G.ready) { + return null; + } + + moduleId = encode(moduleId); + module = G._modules[moduleId]; + if (!module) { + return null; + } + + return decode(module.currentState); + }, + + /** + * Returns the state of a module according to the URL fragment + * identifier. This method is useful to initialize your modules + * if your application was bookmarked from a particular state. + * @method getBookmarkedState + * @param {string} moduleId Non-empty string representing your module. + * @return {string} The bookmarked state of the specified module. + * @public + */ + getBookmarkedState: function (moduleId) { + var m, i, h; + + if (!Y.Lang.isString(moduleId)) { + throw new Error(E_MISSING_OR_INVALID_ARG); + } + + moduleId = encode(moduleId); + + // Use location.href instead of location.hash which is already + // URL-decoded, which creates problems if the state value + // contained special characters... + h = win.location.href; + i = h.indexOf('#'); + + if (i >= 0) { + h = h.substr(i + 1); + REGEXP.lastIndex = 0; + while ((m = REGEXP.exec(h))) { + if (m[1] === moduleId) { + return decode(m[2]); + } + } + } + + return null; + }, + + /** + * Returns the value of the specified query string parameter. + * This method is not used internally by the Browser History Manager. + * However, it is provided here as a helper since many applications + * using the Browser History Manager will want to read the value of + * url parameters to initialize themselves. + * @method getQueryStringParameter + * @param {string} paramName Name of the parameter we want to look up. + * @param {string} queryString Optional URL to look at. If not specified, + * this method uses the URL in the address bar. + * @return {string} The value of the specified parameter, or null. + * @public + * @deprecated Use Y.QueryString.parse() in the querystring module. + * This will be removed in 3.2.0. + */ + getQueryStringParameter: function (paramName, url) { + var m, q, i; + + url = url || win.location.href; + + i = url.indexOf('?'); + q = i >= 0 ? url.substr(i + 1) : url; + + // Remove the hash if any + i = q.lastIndexOf('#'); + q = i >= 0 ? q.substr(0, i) : q; + + REGEXP.lastIndex = 0; + while ((m = REGEXP.exec(q))) { + if (m[1] === paramName) { + return decode(m[2]); + } + } + + return null; + } + }); + + /** + * This class represents a browser history module. + * @class History.Module + * @constructor + * @param id {String} the module identifier + * @param initialState {String} the module's initial state + * @deprecated Please use the new "history" module instead. + */ + H.Module = function (id, initialState) { + + /** + * The module identifier + * @type String + * @final + */ + this.id = id; + + /** + * The module's initial state + * @type String + * @final + */ + this.initialState = initialState; + + /** + * The module's current state + * @type String + * @final + */ + this.currentState = initialState; + + /** + * The module's upcoming state. There can be a slight delay between the + * time a state is changed, and the time a state change is detected. + * This property allows us to not fire the module state changed event + * multiple times, making client code simpler. + * @type String + * @private + * @final + */ + this.upcomingState = initialState; + }; + + Y.augment(H.Module, Y.EventTarget); + + Y.History = H; + + +}, '3.3.0' ,{skinnable:false, requires:['node-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/history/history-base-min.js b/jssource/src_files/include/javascript/yui3/build/history/history-base-min.js new file mode 100644 index 00000000..88329752 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/history/history-base-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("history-base",function(B){var I=B.Lang,E=B.Object,L=YUI.namespace("Env.History"),M=B.Array,N=B.config.doc,F=N.documentMode,J=B.config.win,C={merge:true},H="change",A="add",G="replace";function D(){this._init.apply(this,arguments);}B.augment(D,B.EventTarget,null,null,{emitFacade:true,prefix:"history",preventable:false,queueable:true});if(!L._state){L._state={};}function K(O){return I.type(O)==="object";}D.NAME="historyBase";D.SRC_ADD=A;D.SRC_REPLACE=G;D.html5=!!(J.history&&J.history.pushState&&J.history.replaceState&&("onpopstate" in J||B.UA.gecko>=2));D.nativeHashChange=("onhashchange" in J||"onhashchange" in N)&&(!F||F>7);B.mix(D.prototype,{_init:function(P){var O;P=this._config=P||{};O=this._initialState=this._initialState||P.initialState||null;this.publish(H,{broadcast:2,defaultFn:this._defChangeFn});if(O){this.add(O);}},add:function(){var O=M(arguments,0,true);O.unshift(A);return this._change.apply(this,O);},addValue:function(P,R,O){var Q={};Q[P]=R;return this._change(A,Q,O);},get:function(P){var Q=L._state,O=K(Q);if(P){return O&&E.owns(Q,P)?Q[P]:undefined;}else{return O?B.mix({},Q,true):Q;}},replace:function(){var O=M(arguments,0,true);O.unshift(G);return this._change.apply(this,O);},replaceValue:function(P,R,O){var Q={};Q[P]=R;return this._change(G,Q,O);},_change:function(Q,P,O){O=O?B.merge(C,O):C;if(O.merge&&K(P)&&K(L._state)){P=B.merge(L._state,P);}this._resolveChanges(Q,P,O);return this;},_fireEvents:function(Q,P,O){this.fire(H,{_options:O,changed:P.changed,newVal:P.newState,prevVal:P.prevState,removed:P.removed,src:Q});E.each(P.changed,function(S,R){this._fireChangeEvent(Q,R,S);},this);E.each(P.removed,function(S,R){this._fireRemoveEvent(Q,R,S);},this);},_fireChangeEvent:function(Q,O,P){this.fire(O+"Change",{newVal:P.newVal,prevVal:P.prevVal,src:Q});},_fireRemoveEvent:function(Q,O,P){this.fire(O+"Remove",{prevVal:P,src:Q});},_resolveChanges:function(U,S,P){var T={},O,R=L._state,Q={};if(!S){S={};}if(!P){P={};}if(K(S)&&K(R)){E.each(S,function(V,W){var X=R[W];if(V!==X){T[W]={newVal:V,prevVal:X};O=true;}},this);E.each(R,function(W,V){if(!E.owns(S,V)||S[V]===null){delete S[V];Q[V]=W;O=true;}},this);}else{O=S!==R;}if(O){this._fireEvents(U,{changed:T,newState:S,prevState:R,removed:Q},P);}},_storeState:function(P,O){L._state=O||{};},_defChangeFn:function(O){this._storeState(O.src,O.newVal,O._options);}},true);B.HistoryBase=D;},"3.3.0",{requires:["event-custom-complex"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/history/history-base.js b/jssource/src_files/include/javascript/yui3/build/history/history-base.js new file mode 100644 index 00000000..5098c6bc --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/history/history-base.js @@ -0,0 +1,634 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('history-base', function(Y) { + +/** + * Provides browser history management functionality using a simple + * add/replace/get paradigm. This can be used to ensure that the browser's back + * and forward buttons work as the user expects and to provide bookmarkable URLs + * that return the user to the current application state, even in an Ajax + * application that doesn't perform full-page refreshes. + * + * @module history + * @since 3.2.0 + */ + +/** + * Provides global state management backed by an object, but with no browser + * history integration. For actual browser history integration and back/forward + * support, use the history-html5 or history-hash modules. + * + * @module history + * @submodule history-base + * @class HistoryBase + * @uses EventTarget + * @constructor + * @param {Object} config (optional) configuration object, which may contain + * zero or more of the following properties: + * + *
          + *
          initialState (Object)
          + *
          + * Initial state to set, as an object hash of key/value pairs. This will be + * merged into the current global state. + *
          + *
          + */ + +var Lang = Y.Lang, + Obj = Y.Object, + GlobalEnv = YUI.namespace('Env.History'), + YArray = Y.Array, + + doc = Y.config.doc, + docMode = doc.documentMode, + win = Y.config.win, + + DEFAULT_OPTIONS = {merge: true}, + EVT_CHANGE = 'change', + SRC_ADD = 'add', + SRC_REPLACE = 'replace'; + +function HistoryBase() { + this._init.apply(this, arguments); +} + +Y.augment(HistoryBase, Y.EventTarget, null, null, { + emitFacade : true, + prefix : 'history', + preventable: false, + queueable : true +}); + +if (!GlobalEnv._state) { + GlobalEnv._state = {}; +} + +// -- Private Methods ---------------------------------------------------------- + +/** + * Returns true if value is a simple object and not a + * function or an array. + * + * @method _isSimpleObject + * @param {mixed} value + * @return {Boolean} + * @private + */ +function _isSimpleObject(value) { + return Lang.type(value) === 'object'; +} + +// -- Public Static Properties ------------------------------------------------- + +/** + * Name of this component. + * + * @property NAME + * @type String + * @static + */ +HistoryBase.NAME = 'historyBase'; + +/** + * Constant used to identify state changes originating from the + * add() method. + * + * @property SRC_ADD + * @type String + * @static + * @final + */ +HistoryBase.SRC_ADD = SRC_ADD; + +/** + * Constant used to identify state changes originating from the + * replace() method. + * + * @property SRC_REPLACE + * @type String + * @static + * @final + */ +HistoryBase.SRC_REPLACE = SRC_REPLACE; + +/** + * Whether or not this browser supports the HTML5 History API. + * + * @property html5 + * @type Boolean + * @static + */ + +// All HTML5-capable browsers except Gecko 2+ (Firefox 4+) correctly return +// true for 'onpopstate' in win. In order to support Gecko 2, we fall back to a +// UA sniff for now. (current as of Firefox 4.0b2) +HistoryBase.html5 = !!(win.history && win.history.pushState && + win.history.replaceState && ('onpopstate' in win || Y.UA.gecko >= 2)); + +/** + * Whether or not this browser supports the window.onhashchange + * event natively. Note that even if this is true, you may + * still want to use HistoryHash's synthetic hashchange event + * since it normalizes implementation differences and fixes spec violations + * across various browsers. + * + * @property nativeHashChange + * @type Boolean + * @static + */ + +// Most browsers that support hashchange expose it on the window. Opera 10.6+ +// exposes it on the document (but you can still attach to it on the window). +// +// IE8 supports the hashchange event, but only in IE8 Standards +// Mode. However, IE8 in IE7 compatibility mode still defines the +// event but never fires it, so we can't just detect the event. We also can't +// just UA sniff for IE8, since other browsers support this event as well. +HistoryBase.nativeHashChange = ('onhashchange' in win || 'onhashchange' in doc) && + (!docMode || docMode > 7); + +Y.mix(HistoryBase.prototype, { + // -- Initialization ------------------------------------------------------- + + /** + * Initializes this HistoryBase instance. This method is called by the + * constructor. + * + * @method _init + * @param {Object} config configuration object + * @protected + */ + _init: function (config) { + var initialState; + + /** + * Configuration object provided by the user on instantiation, or an + * empty object if one wasn't provided. + * + * @property _config + * @type Object + * @default {} + * @protected + */ + config = this._config = config || {}; + + /** + * Resolved initial state: a merge of the user-supplied initial state + * (if any) and any initial state provided by a subclass. This may + * differ from _config.initialState. If neither the config + * nor a subclass supplies an initial state, this property will be + * null. + * + * @property _initialState + * @type Object|null + * @default {} + * @protected + */ + initialState = this._initialState = this._initialState || + config.initialState || null; + + /** + * Fired when the state changes. To be notified of all state changes + * regardless of the History or YUI instance that generated them, + * subscribe to this event on Y.Global. If you would rather + * be notified only about changes generated by this specific History + * instance, subscribe to this event on the instance. + * + * @event history:change + * @param {EventFacade} e Event facade with the following additional + * properties: + * + *
          + *
          changed (Object)
          + *
          + * Object hash of state items that have been added or changed. The + * key is the item key, and the value is an object containing + * newVal and prevVal properties + * representing the values of the item both before and after the + * change. If the item was newly added, prevVal will be + * undefined. + *
          + * + *
          newVal (Object)
          + *
          + * Object hash of key/value pairs of all state items after the + * change. + *
          + * + *
          prevVal (Object)
          + *
          + * Object hash of key/value pairs of all state items before the + * change. + *
          + * + *
          removed (Object)
          + *
          + * Object hash of key/value pairs of state items that have been + * removed. Values are the old values prior to removal. + *
          + * + *
          src (String)
          + *
          + * The source of the event. This can be used to selectively ignore + * events generated by certain sources. + *
          + *
          + */ + this.publish(EVT_CHANGE, { + broadcast: 2, + defaultFn: this._defChangeFn + }); + + // If initialState was provided, merge it into the current state. + if (initialState) { + this.add(initialState); + } + }, + + // -- Public Methods ------------------------------------------------------- + + /** + * Adds a state entry with new values for the specified keys. By default, + * the new state will be merged into the existing state, and new values will + * override existing values. Specifying a null or + * undefined value will cause that key to be removed from the + * new state entry. + * + * @method add + * @param {Object} state Object hash of key/value pairs. + * @param {Object} options (optional) Zero or more of the following options: + *
          + *
          merge (Boolean)
          + *
          + *

          + * If true (the default), the new state will be merged + * into the existing state. New values will override existing values, + * and null or undefined values will be + * removed from the state. + *

          + * + *

          + * If false, the existing state will be discarded as a + * whole and the new state will take its place. + *

          + *
          + *
          + * @chainable + */ + add: function () { + var args = YArray(arguments, 0, true); + args.unshift(SRC_ADD); + return this._change.apply(this, args); + }, + + /** + * Adds a state entry with a new value for a single key. By default, the new + * value will be merged into the existing state values, and will override an + * existing value with the same key if there is one. Specifying a + * null or undefined value will cause the key to + * be removed from the new state entry. + * + * @method addValue + * @param {String} key State parameter key. + * @param {String} value New value. + * @param {Object} options (optional) Zero or more options. See + * add() for a list of supported options. + * @chainable + */ + addValue: function (key, value, options) { + var state = {}; + state[key] = value; + return this._change(SRC_ADD, state, options); + }, + + /** + * Returns the current value of the state parameter specified by key, + * or an object hash of key/value pairs for all current state parameters if + * no key is specified. + * + * @method get + * @param {String} key (optional) State parameter key. + * @return {Object|String} Value of the specified state parameter, or an + * object hash of key/value pairs for all current state parameters. + */ + get: function (key) { + var state = GlobalEnv._state, + isObject = _isSimpleObject(state); + + if (key) { + return isObject && Obj.owns(state, key) ? state[key] : undefined; + } else { + return isObject ? Y.mix({}, state, true) : state; // mix provides a fast shallow clone. + } + }, + + /** + * Same as add() except that a new browser history entry will + * not be created. Instead, the current history entry will be replaced with + * the new state. + * + * @method replace + * @param {Object} state Object hash of key/value pairs. + * @param {Object} options (optional) Zero or more options. See + * add() for a list of supported options. + * @chainable + */ + replace: function () { + var args = YArray(arguments, 0, true); + args.unshift(SRC_REPLACE); + return this._change.apply(this, args); + }, + + /** + * Same as addValue() except that a new browser history entry + * will not be created. Instead, the current history entry will be replaced + * with the new state. + * + * @method replaceValue + * @param {String} key State parameter key. + * @param {String} value New value. + * @param {Object} options (optional) Zero or more options. See + * add() for a list of supported options. + * @chainable + */ + replaceValue: function (key, value, options) { + var state = {}; + state[key] = value; + return this._change(SRC_REPLACE, state, options); + }, + + // -- Protected Methods ---------------------------------------------------- + + /** + * Changes the state. This method provides a common implementation shared by + * the public methods for changing state. + * + * @method _change + * @param {String} src Source of the change, for inclusion in event facades + * to facilitate filtering. + * @param {Object} state Object hash of key/value pairs. + * @param {Object} options (optional) Zero or more options. See + * add() for a list of supported options. + * @protected + * @chainable + */ + _change: function (src, state, options) { + options = options ? Y.merge(DEFAULT_OPTIONS, options) : DEFAULT_OPTIONS; + + if (options.merge && _isSimpleObject(state) && + _isSimpleObject(GlobalEnv._state)) { + state = Y.merge(GlobalEnv._state, state); + } + + this._resolveChanges(src, state, options); + return this; + }, + + /** + * Called by _resolveChanges() when the state has changed. This method takes + * care of actually firing the necessary events. + * + * @method _fireEvents + * @param {String} src Source of the changes, for inclusion in event facades + * to facilitate filtering. + * @param {Object} changes Resolved changes. + * @param {Object} options Zero or more options. See add() for + * a list of supported options. + * @protected + */ + _fireEvents: function (src, changes, options) { + // Fire the global change event. + this.fire(EVT_CHANGE, { + _options: options, + changed : changes.changed, + newVal : changes.newState, + prevVal : changes.prevState, + removed : changes.removed, + src : src + }); + + // Fire change/remove events for individual items. + Obj.each(changes.changed, function (value, key) { + this._fireChangeEvent(src, key, value); + }, this); + + Obj.each(changes.removed, function (value, key) { + this._fireRemoveEvent(src, key, value); + }, this); + }, + + /** + * Fires a dynamic "[key]Change" event. + * + * @method _fireChangeEvent + * @param {String} src source of the change, for inclusion in event facades + * to facilitate filtering + * @param {String} key key of the item that was changed + * @param {Object} value object hash containing newVal and + * prevVal properties for the changed item + * @protected + */ + _fireChangeEvent: function (src, key, value) { + /** + *

          + * Dynamic event fired when an individual history item is added or + * changed. The name of this event depends on the name of the key that + * changed. To listen to change events for a key named "foo", subscribe + * to the fooChange event; for a key named "bar", subscribe + * to barChange, etc. + *

          + * + *

          + * Key-specific events are only fired for instance-level changes; that + * is, changes that were made via the same History instance on which the + * event is subscribed. To be notified of changes made by other History + * instances, subscribe to the global history:change event. + *

          + * + * @event [key]Change + * @param {EventFacade} e Event facade with the following additional + * properties: + * + *
          + *
          newVal (mixed)
          + *
          + * The new value of the item after the change. + *
          + * + *
          prevVal (mixed)
          + *
          + * The previous value of the item before the change, or + * undefined if the item was just added and has no + * previous value. + *
          + * + *
          src (String)
          + *
          + * The source of the event. This can be used to selectively ignore + * events generated by certain sources. + *
          + *
          + */ + this.fire(key + 'Change', { + newVal : value.newVal, + prevVal: value.prevVal, + src : src + }); + }, + + /** + * Fires a dynamic "[key]Remove" event. + * + * @method _fireRemoveEvent + * @param {String} src source of the change, for inclusion in event facades + * to facilitate filtering + * @param {String} key key of the item that was removed + * @param {mixed} value value of the item prior to its removal + * @protected + */ + _fireRemoveEvent: function (src, key, value) { + /** + *

          + * Dynamic event fired when an individual history item is removed. The + * name of this event depends on the name of the key that was removed. + * To listen to remove events for a key named "foo", subscribe to the + * fooRemove event; for a key named "bar", subscribe to + * barRemove, etc. + *

          + * + *

          + * Key-specific events are only fired for instance-level changes; that + * is, changes that were made via the same History instance on which the + * event is subscribed. To be notified of changes made by other History + * instances, subscribe to the global history:change event. + *

          + * + * @event [key]Remove + * @param {EventFacade} e Event facade with the following additional + * properties: + * + *
          + *
          prevVal (mixed)
          + *
          + * The value of the item before it was removed. + *
          + * + *
          src (String)
          + *
          + * The source of the event. This can be used to selectively ignore + * events generated by certain sources. + *
          + *
          + */ + this.fire(key + 'Remove', { + prevVal: value, + src : src + }); + }, + + /** + * Resolves the changes (if any) between newState and the current + * state and fires appropriate events if things have changed. + * + * @method _resolveChanges + * @param {String} src source of the changes, for inclusion in event facades + * to facilitate filtering + * @param {Object} newState object hash of key/value pairs representing the + * new state + * @param {Object} options Zero or more options. See add() for + * a list of supported options. + * @protected + */ + _resolveChanges: function (src, newState, options) { + var changed = {}, + isChanged, + prevState = GlobalEnv._state, + removed = {}; + + if (!newState) { + newState = {}; + } + + if (!options) { + options = {}; + } + + if (_isSimpleObject(newState) && _isSimpleObject(prevState)) { + // Figure out what was added or changed. + Obj.each(newState, function (newVal, key) { + var prevVal = prevState[key]; + + if (newVal !== prevVal) { + changed[key] = { + newVal : newVal, + prevVal: prevVal + }; + + isChanged = true; + } + }, this); + + // Figure out what was removed. + Obj.each(prevState, function (prevVal, key) { + if (!Obj.owns(newState, key) || newState[key] === null) { + delete newState[key]; + removed[key] = prevVal; + isChanged = true; + } + }, this); + } else { + isChanged = newState !== prevState; + } + + if (isChanged) { + this._fireEvents(src, { + changed : changed, + newState : newState, + prevState: prevState, + removed : removed + }, options); + } + }, + + /** + * Stores the specified state. Don't call this method directly; go through + * _resolveChanges() to ensure that changes are resolved and all events are + * fired properly. + * + * @method _storeState + * @param {String} src source of the changes + * @param {Object} newState new state to store + * @param {Object} options Zero or more options. See add() for + * a list of supported options. + * @protected + */ + _storeState: function (src, newState) { + // Note: the src and options params aren't used here, but they are used + // by subclasses. + GlobalEnv._state = newState || {}; + }, + + // -- Protected Event Handlers --------------------------------------------- + + /** + * Default history:change event handler. + * + * @method _defChangeFn + * @param {EventFacade} e state change event facade + * @protected + */ + _defChangeFn: function (e) { + this._storeState(e.src, e.newVal, e._options); + } +}, true); + +Y.HistoryBase = HistoryBase; + + +}, '3.3.0' ,{requires:['event-custom-complex']}); diff --git a/jssource/src_files/include/javascript/yui3/build/history/history-hash-ie-min.js b/jssource/src_files/include/javascript/yui3/build/history/history-hash-ie-min.js new file mode 100644 index 00000000..5ebad3c8 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/history/history-hash-ie-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("history-hash-ie",function(H){if(H.UA.ie&&!H.HistoryBase.nativeHashChange){var C=H.Do,D=YUI.namespace("Env.HistoryHash"),B=H.HistoryHash,E=D._iframe,G=H.config.win,A=G.location,F="";B.getIframeHash=function(){if(!E||!E.contentWindow){return"";}var I=B.hashPrefix,J=E.contentWindow.location.hash.substr(1);return I&&J.indexOf(I)===0?J.replace(I,""):J;};B._updateIframe=function(J,I){var K=E&&E.contentWindow&&E.contentWindow.document,L=K&&K.location;if(!K||!L){return;}K.open().close();if(I){L.replace(J.charAt(0)==="#"?J:"#"+J);}else{L.hash=J;}};C.after(B._updateIframe,B,"replaceHash",B,true);if(!E){H.on("domready",function(){E=D._iframe=H.Node.getDOMNode(H.Node.create('';AK.ATTRS={useARIA:{value:true,writeOnce:true,lazyAdd:false,setter:function(AT){var AQ=this.get(c),AU,Y,AS,AR;if(AT){AQ.set(AP,R);AQ.all("ul,li,."+AL(R,y)).set(AP,N);AQ.all((I+AL(G,y))).set(AP,G);AQ.all((I+AI)).each(function(AV){AU=AV;Y=AV.one(AG);if(Y){Y.set(AP,N);AU=Y.previous();}AU.set(AP,G);AU.set("aria-haspopup",true);AS=AV.next();if(AS){AS.set(AP,R);AU=AS.previous();Y=AU.one(AG);if(Y){AU=Y;}AR=D.stamp(AU);if(!AU.get(g)){AU.set(g,AR);}AS.set("aria-labelledby",AR);AS.set(x,true);}});}}},autoSubmenuDisplay:{value:true,writeOnce:true},submenuShowDelay:{value:250,writeOnce:true},submenuHideDelay:{value:250,writeOnce:true},mouseOutHideDelay:{value:750,writeOnce:true}};D.extend(AK,D.Plugin.Base,{_rootMenu:null,_activeItem:null,_activeMenu:null,_hasFocus:false,_blockMouseEvent:false,_currentMouseX:0,_movingToSubmenu:false,_showSubmenuTimer:null,_hideSubmenuTimer:null,_hideAllSubmenusTimer:null,_firstItem:null,initializer:function(AR){var AS=this,AT=this.get(c),AQ=[],Y;if(AT){AS._rootMenu=AT;AT.all("ul:first-child").addClass(U);AT.all(i).addClass(AF);AQ.push(AT.on("mouseover",AS._onMouseOver,AS));AQ.push(AT.on("mouseout",AS._onMouseOut,AS));AQ.push(AT.on("mousemove",AS._onMouseMove,AS));AQ.push(AT.on(w,AS._toggleSubmenuDisplay,AS));AQ.push(D.on("key",AS._toggleSubmenuDisplay,AT,"down:13",AS));AQ.push(AT.on(AB,AS._toggleSubmenuDisplay,AS));AQ.push(AT.on("keypress",AS._onKeyPress,AS));AQ.push(AT.on(AO,AS._onKeyDown,AS));Y=AT.get("ownerDocument");AQ.push(Y.on(w,AS._onDocMouseDown,AS));AQ.push(Y.on("focus",AS._onDocFocus,AS));this._eventHandlers=AQ;AS._initFocusManager();}},destructor:function(){var Y=this._eventHandlers;if(Y){D.Array.each(Y,function(AQ){AQ.detach();});this._eventHandlers=null;}this.get(c).unplug("focusManager");},_isRoot:function(Y){return this._rootMenu.compareTo(Y);},_getTopmostSubmenu:function(AS){var AR=this,Y=M(AS),AQ;if(!Y){AQ=AS;}else{if(AR._isRoot(Y)){AQ=AS;}else{AQ=AR._getTopmostSubmenu(Y);}}return AQ;},_clearActiveItem:function(){var AQ=this,Y=AQ._activeItem;if(Y){Y.removeClass(f(Y));}AQ._activeItem=null;},_setActiveItem:function(AQ){var Y=this;if(AQ){Y._clearActiveItem();AQ.addClass(f(AQ));Y._activeItem=AQ;}},_focusItem:function(AR){var AQ=this,Y,AS;if(AR&&AQ._hasFocus){Y=M(AR);AS=p(AR);if(Y&&!Y.compareTo(AQ._activeMenu)){AQ._activeMenu=Y;AQ._initFocusManager();}AQ._focusManager.focus(AS);}},_showMenu:function(AS){var Y=M(AS),AR=AS.get(S),AQ=AR.getXY();if(this.get(J)){AS.set(x,false);}if(q(Y)){AQ[1]=AQ[1]+AR.get(z);}else{AQ[0]=AQ[0]+AR.get(AC);}AS.setXY(AQ);if(m.ie<8){if(m.ie===6&&!AS.hasIFrameShim){AS.appendChild(D.Node.create(AK.SHIM_TEMPLATE));AS.hasIFrameShim=true;}AS.setStyles({height:Q,width:Q});AS.setStyles({height:(AS.get(z)+AN),width:(AS.get(AC)+AN)});}AS.previous().addClass(X);AS.removeClass(AF);},_hideMenu:function(AS,AQ){var AR=this,AT=AS.previous(),Y;AT.removeClass(X);if(AQ){AR._focusItem(AT);AR._setActiveItem(AT);}Y=AS.one((I+A));if(Y){Y.removeClass(A);}AS.setStyles({left:Q,top:Q});AS.addClass(AF);if(AR.get(J)){AS.set(x,true);}},_hideAllSubmenus:function(AQ){var Y=this;AQ.all(i).each(D.bind(function(AR){Y._hideMenu(AR);},Y));},_cancelShowSubmenuTimer:function(){var AQ=this,Y=AQ._showSubmenuTimer;if(Y){Y.cancel();AQ._showSubmenuTimer=null;}},_cancelHideSubmenuTimer:function(){var Y=this,AQ=Y._hideSubmenuTimer;if(AQ){AQ.cancel();Y._hideSubmenuTimer=null;}},_initFocusManager:function(){var AS=this,AU=AS._rootMenu,AQ=AS._activeMenu||AU,AT=AS._isRoot(AQ)?Q:("#"+AQ.get("id")),Y=AS._focusManager,AR,AV,AW;if(q(AQ)){AV=AT+AM+","+AT+O;AR={next:"down:39",previous:"down:37"};}else{AV=AT+AM;AR={next:"down:40",previous:"down:38"};}if(!Y){AU.plug(D.Plugin.NodeFocusManager,{descendants:AV,keys:AR,circular:true});Y=AU.focusManager;AW="#"+AU.get("id")+" .yui-menu a,"+AG;AU.all(AW).set("tabIndex",-1);Y.on(h,this._onActiveDescendantChange,Y,this); -Y.after(h,this._afterActiveDescendantChange,Y,this);AS._focusManager=Y;}else{Y.set(u,-1);Y.set(AD,AV);Y.set("keys",AR);}},_onActiveDescendantChange:function(AQ,Y){if(AQ.src===j&&Y._activeMenu&&!Y._movingToSubmenu){Y._hideAllSubmenus(Y._activeMenu);}},_afterActiveDescendantChange:function(AQ,Y){var AR;if(AQ.src===j){AR=B(this.get(AD).item(AQ.newVal),true);Y._setActiveItem(AR);}},_onDocFocus:function(AT){var AS=this,Y=AS._activeItem,AR=AT.target,AQ;if(AS._rootMenu.contains(AR)){if(AS._hasFocus){AQ=M(AR);if(!AS._activeMenu.compareTo(AQ)){AS._activeMenu=AQ;AS._initFocusManager();AS._focusManager.set(u,AR);AS._setActiveItem(B(AR,true));}}else{AS._hasFocus=true;Y=B(AR,true);if(Y){AS._setActiveItem(Y);}}}else{AS._clearActiveItem();AS._cancelShowSubmenuTimer();AS._hideAllSubmenus(AS._rootMenu);AS._activeMenu=AS._rootMenu;AS._initFocusManager();AS._focusManager.set(u,0);AS._hasFocus=false;}},_onMenuMouseOver:function(AS,AR){var AQ=this,Y=AQ._hideAllSubmenusTimer;if(Y){Y.cancel();AQ._hideAllSubmenusTimer=null;}AQ._cancelHideSubmenuTimer();if(AS&&!AS.compareTo(AQ._activeMenu)){AQ._activeMenu=AS;if(AQ._hasFocus){AQ._initFocusManager();}}if(AQ._movingToSubmenu&&q(AS)){AQ._movingToSubmenu=false;}},_hideAndFocusLabel:function(){var AR=this,AQ=AR._activeMenu,Y;AR._hideAllSubmenus(AR._rootMenu);if(AQ){Y=AR._getTopmostSubmenu(AQ);AR._focusItem(Y.previous());}},_onMenuMouseOut:function(AW,AU){var AT=this,AR=AT._activeMenu,AV=AU.relatedTarget,Y=AT._activeItem,AS,AQ;if(AR&&!AR.contains(AV)){AS=M(AR);if(AS&&!AS.contains(AV)){if(AT.get(T)>0){AT._cancelShowSubmenuTimer();AT._hideAllSubmenusTimer=t(AT.get(T),AT,AT._hideAndFocusLabel);}}else{if(Y){AQ=M(Y);if(!AT._isRoot(AQ)){AT._focusItem(AQ.previous());}}}}},_onMenuLabelMouseOver:function(AT,AV){var AU=this,AS=AU._activeMenu,Y=AU._isRoot(AS),AR=(AU.get(v)&&Y||!Y),AQ;AU._focusItem(AT);AU._setActiveItem(AT);if(AR&&!AU._movingToSubmenu){AU._cancelHideSubmenuTimer();AU._cancelShowSubmenuTimer();if(!n(AT)){AQ=AT.next();if(AQ){AU._hideAllSubmenus(AS);AU._showSubmenuTimer=t(AU.get("submenuShowDelay"),AU,AU._showMenu,AQ);}}}},_onMenuLabelMouseOut:function(AS,AU){var AT=this,Y=AT._isRoot(AT._activeMenu),AR=(AT.get(v)&&Y||!Y),AV=AU.relatedTarget,AQ=AS.next();AT._clearActiveItem();if(AR){if(AT._movingToSubmenu&&!AT._showSubmenuTimer&&AQ){AT._hideSubmenuTimer=t(AT.get("submenuHideDelay"),AT,AT._hideMenu,AQ);}else{if(!AT._movingToSubmenu&&AQ&&!AQ.contains(AV)&&!AV.compareTo(AQ)){AT._cancelShowSubmenuTimer();AT._hideMenu(AQ);}}}},_onMenuItemMouseOver:function(AS,AU){var AT=this,AR=AT._activeMenu,Y=AT._isRoot(AR),AQ=(AT.get(v)&&Y||!Y);AT._focusItem(AS);AT._setActiveItem(AS);if(AQ&&!AT._movingToSubmenu){AT._hideAllSubmenus(AR);}},_onMenuItemMouseOut:function(Y,AQ){this._clearActiveItem();},_onVerticalMenuKeyDown:function(Y){var AQ=this,AU=AQ._activeMenu,AZ=AQ._rootMenu,AR=Y.target,AT=false,AY=Y.keyCode,AW,AS,AV,AX;switch(AY){case 37:AS=M(AU);if(AS&&q(AS)){AQ._hideMenu(AU);AV=L(AU.get(S));AX=B(AV);if(AX){if(s(AX)){AW=AX.next();if(AW){AQ._showMenu(AW);AQ._focusItem(C(AW));AQ._setActiveItem(C(AW));}else{AQ._focusItem(AX);AQ._setActiveItem(AX);}}else{AQ._focusItem(AX);AQ._setActiveItem(AX);}}}else{if(!AQ._isRoot(AU)){AQ._hideMenu(AU,true);}}AT=true;break;case 39:if(s(AR)){AW=AR.next();if(AW){AQ._showMenu(AW);AQ._focusItem(C(AW));AQ._setActiveItem(C(AW));}}else{if(q(AZ)){AW=AQ._getTopmostSubmenu(AU);AV=b(AW.get(S));AX=B(AV);AQ._hideAllSubmenus(AZ);if(AX){if(s(AX)){AW=AX.next();if(AW){AQ._showMenu(AW);AQ._focusItem(C(AW));AQ._setActiveItem(C(AW));}else{AQ._focusItem(AX);AQ._setActiveItem(AX);}}else{AQ._focusItem(AX);AQ._setActiveItem(AX);}}}}AT=true;break;}if(AT){Y.preventDefault();}},_onHorizontalMenuKeyDown:function(AV){var AU=this,AS=AU._activeMenu,AQ=AV.target,Y=B(AQ,true),AT=false,AW=AV.keyCode,AR;if(AW===40){AU._hideAllSubmenus(AS);if(s(Y)){AR=Y.next();if(AR){AU._showMenu(AR);AU._focusItem(C(AR));AU._setActiveItem(C(AR));}AT=true;}}if(AT){AV.preventDefault();}},_onMouseMove:function(AQ){var Y=this;t(10,Y,function(){Y._currentMouseX=AQ.pageX;});},_onMouseOver:function(AT){var AS=this,AQ,Y,AV,AR,AU;if(AS._blockMouseEvent){AS._blockMouseEvent=false;}else{AQ=AT.target;Y=W(AQ,true);AV=o(AQ,true);AU=AE(AQ,true);if(e(Y,AQ)){AS._onMenuMouseOver(Y,AT);Y[r]=true;Y[E]=false;AR=M(Y);if(AR){AR[E]=true;AR[r]=false;}}if(e(AV,AQ)){AS._onMenuLabelMouseOver(AV,AT);AV[r]=true;AV[E]=false;}if(e(AU,AQ)){AS._onMenuItemMouseOver(AU,AT);AU[r]=true;AU[E]=false;}}},_onMouseOut:function(AQ){var AR=this,AT=AR._activeMenu,AY=false,AS,AU,AW,Y,AV,AX;AR._movingToSubmenu=(AT&&!q(AT)&&((AQ.pageX-5)>AR._currentMouseX));AS=AQ.target;AU=AQ.relatedTarget;AW=W(AS,true);Y=o(AS,true);AX=AE(AS,true);if(H(Y,AU)){AR._onMenuLabelMouseOut(Y,AQ);Y[E]=true;Y[r]=false;}if(H(AX,AU)){AR._onMenuItemMouseOut(AX,AQ);AX[E]=true;AX[r]=false;}if(Y){AV=Y.next();if(AV&&(AU.compareTo(AV)||AV.contains(AU))){AY=true;}}if(H(AW,AU)||AY){AR._onMenuMouseOut(AW,AQ);AW[E]=true;AW[r]=false;}},_toggleSubmenuDisplay:function(AR){var AS=this,AT=AR.target,AQ=o(AT,true),Y=AR.type,AX,AW,AV,AY,AZ,AU;if(AQ){AX=F(AT)?AT:AT.ancestor(F);if(AX){AV=AX.getAttribute("href",2);AY=AV.indexOf("#");AZ=AV.length;if(AY===0&&AZ>1){AU=AV.substr(1,AZ);AW=AQ.next();if(AW&&(AW.get(g)===AU)){if(Y===w||Y===AO){if((m.opera||m.gecko||m.ie)&&Y===AO&&!AS._preventClickHandle){AS._preventClickHandle=AS._rootMenu.on("click",function(Aa){Aa.preventDefault();AS._preventClickHandle.detach();AS._preventClickHandle=null;});}if(Y==w){AR.preventDefault();AR.stopImmediatePropagation();AS._hasFocus=true;}if(AS._isRoot(M(AT))){if(n(AQ)){AS._hideMenu(AW);AS._focusItem(AQ);AS._setActiveItem(AQ);}else{AS._hideAllSubmenus(AS._rootMenu);AS._showMenu(AW);AS._focusItem(C(AW));AS._setActiveItem(C(AW));}}else{if(AS._activeItem==AQ){AS._showMenu(AW);AS._focusItem(C(AW));AS._setActiveItem(C(AW));}else{if(!AQ._clickHandle){AQ._clickHandle=AQ.on("click",function(){AS._hideAllSubmenus(AS._rootMenu);AS._hasFocus=false;AS._clearActiveItem();AQ._clickHandle.detach();AQ._clickHandle=null;});}}}}if(Y===AB){AR.preventDefault(); -}}}}}},_onKeyPress:function(Y){switch(Y.keyCode){case 37:case 38:case 39:case 40:Y.preventDefault();break;}},_onKeyDown:function(AU){var AT=this,Y=AT._activeItem,AQ=AU.target,AS=M(AQ),AR;if(AS){AT._activeMenu=AS;if(q(AS)){AT._onHorizontalMenuKeyDown(AU);}else{AT._onVerticalMenuKeyDown(AU);}if(AU.keyCode===27){if(!AT._isRoot(AS)){if(m.opera){t(0,AT,function(){AT._hideMenu(AS,true);});}else{AT._hideMenu(AS,true);}AU.stopPropagation();AT._blockMouseEvent=m.gecko?true:false;}else{if(Y){if(s(Y)&&n(Y)){AR=Y.next();if(AR){AT._hideMenu(AR);}}else{AT._focusManager.blur();AT._clearActiveItem();AT._hasFocus=false;}}}}}},_onDocMouseDown:function(AS){var AR=this,AQ=AR._rootMenu,Y=AS.target;if(!(AQ.compareTo(Y)||AQ.contains(Y))){AR._hideAllSubmenus(AQ);if(m.webkit){AR._hasFocus=false;AR._clearActiveItem();}}}});D.namespace("Plugin");D.Plugin.NodeMenuNav=AK;},"3.0.0",{requires:["node","classnamemanager","node-focusmanager"]}); \ No newline at end of file +YUI.add("node-menunav",function(d){var L=d.UA,T=d.later,am=d.ClassNameManager.getClassName,r="menu",g="menuitem",ai="hidden",s="parentNode",v="children",aa="offsetHeight",ad="offsetWidth",ao="px",F="id",i=".",e="handledMouseOut",R="handledMouseOver",z="active",ak="label",C="a",W="mousedown",ap="keydown",ac="click",q="",u="first-of-type",aq="role",n="presentation",ae="descendants",I="UI",U="activeDescendant",j="useARIA",X="aria-hidden",Z="content",B="host",G=U+"Change",V="autoSubmenuDisplay",t="mouseOutHideDelay",K=am(r),ag=am(r,ai),y=am(r,"horizontal"),aj=am(r,ak),J=am(r,ak,z),x=am(r,ak,(r+"visible")),k=am(g),a=am(g,z),H=i+K,ah=(i+am(r,"toggle")),M=i+am(r,Z),ar=i+aj,an=">"+M+">ul>li>a",o=">"+M+">ul>li>"+ar+">a:first-child";var l=function(Y){var au=Y.previous(),at;if(!au){at=Y.get(s).get(v);au=at.item(at.size()-1);}return au;};var A=function(Y){var at=Y.next();if(!at){at=Y.get(s).get(v).item(0);}return at;};var f=function(Y){var at=false;if(Y){at=Y.get("nodeName").toLowerCase()===C;}return at;};var p=function(Y){return Y.hasClass(k);};var S=function(Y){return Y.hasClass(aj);};var Q=function(Y){return Y.hasClass(y);};var N=function(Y){return Y.hasClass(x);};var P=function(Y){return f(Y)?Y:Y.one(C);};var ab=function(au,at,Y){var av;if(au){if(au.hasClass(at)){av=au;}if(!av&&Y){av=au.ancestor((i+at));}}return av;};var m=function(Y){return Y.ancestor(H);};var w=function(at,Y){return ab(at,K,Y);};var af=function(at,Y){var au;if(at){au=ab(at,k,Y);}return au;};var O=function(at,Y){var au;if(at){if(Y){au=ab(at,aj,Y);}else{au=ab(at,aj)||at.one((i+aj));}}return au;};var b=function(at,Y){var au;if(at){au=af(at,Y)||O(at,Y);}return au;};var c=function(Y){return b(Y.one("li"));};var E=function(Y){return p(Y)?a:J;};var D=function(Y,at){return Y&&!Y[R]&&(Y.compareTo(at)||Y.contains(at));};var h=function(at,Y){return at&&!at[e]&&(!at.compareTo(Y)&&!at.contains(Y));};var al=function(){al.superclass.constructor.apply(this,arguments);};al.NAME="nodeMenuNav";al.NS="menuNav";al.SHIM_TEMPLATE_TITLE="Menu Stacking Shim";al.SHIM_TEMPLATE='';al.ATTRS={useARIA:{value:true,writeOnce:true,lazyAdd:false,setter:function(aw){var at=this.get(B),ax,Y,av,au;if(aw){at.set(aq,r);at.all("ul,li,"+M).set(aq,n);at.all((i+am(g,Z))).set(aq,g);at.all((i+aj)).each(function(ay){ax=ay;Y=ay.one(ah);if(Y){Y.set(aq,n);ax=Y.previous();}ax.set(aq,g);ax.set("aria-haspopup",true);av=ay.next();if(av){av.set(aq,r);ax=av.previous();Y=ax.one(ah);if(Y){ax=Y;}au=d.stamp(ax);if(!ax.get(F)){ax.set(F,au);}av.set("aria-labelledby",au);av.set(X,true);}});}}},autoSubmenuDisplay:{value:true,writeOnce:true},submenuShowDelay:{value:250,writeOnce:true},submenuHideDelay:{value:250,writeOnce:true},mouseOutHideDelay:{value:750,writeOnce:true}};d.extend(al,d.Plugin.Base,{_rootMenu:null,_activeItem:null,_activeMenu:null,_hasFocus:false,_blockMouseEvent:false,_currentMouseX:0,_movingToSubmenu:false,_showSubmenuTimer:null,_hideSubmenuTimer:null,_hideAllSubmenusTimer:null,_firstItem:null,initializer:function(au){var av=this,aw=this.get(B),at=[],Y;if(aw){av._rootMenu=aw;aw.all("ul:first-child").addClass(u);aw.all(H).addClass(ag);at.push(aw.on("mouseover",av._onMouseOver,av));at.push(aw.on("mouseout",av._onMouseOut,av));at.push(aw.on("mousemove",av._onMouseMove,av));at.push(aw.on(W,av._toggleSubmenuDisplay,av));at.push(d.on("key",av._toggleSubmenuDisplay,aw,"down:13",av));at.push(aw.on(ac,av._toggleSubmenuDisplay,av));at.push(aw.on("keypress",av._onKeyPress,av));at.push(aw.on(ap,av._onKeyDown,av));Y=aw.get("ownerDocument");at.push(Y.on(W,av._onDocMouseDown,av));at.push(Y.on("focus",av._onDocFocus,av));this._eventHandlers=at;av._initFocusManager();}},destructor:function(){var Y=this._eventHandlers;if(Y){d.Array.each(Y,function(at){at.detach();});this._eventHandlers=null;}this.get(B).unplug("focusManager");},_isRoot:function(Y){return this._rootMenu.compareTo(Y);},_getTopmostSubmenu:function(av){var au=this,Y=m(av),at;if(!Y){at=av;}else{if(au._isRoot(Y)){at=av;}else{at=au._getTopmostSubmenu(Y);}}return at;},_clearActiveItem:function(){var at=this,Y=at._activeItem;if(Y){Y.removeClass(E(Y));}at._activeItem=null;},_setActiveItem:function(at){var Y=this;if(at){Y._clearActiveItem();at.addClass(E(at));Y._activeItem=at;}},_focusItem:function(au){var at=this,Y,av;if(au&&at._hasFocus){Y=m(au);av=P(au);if(Y&&!Y.compareTo(at._activeMenu)){at._activeMenu=Y;at._initFocusManager();}at._focusManager.focus(av);}},_showMenu:function(av){var Y=m(av),au=av.get(s),at=au.getXY();if(this.get(j)){av.set(X,false);}if(Q(Y)){at[1]=at[1]+au.get(aa);}else{at[0]=at[0]+au.get(ad);}av.setXY(at);if(L.ie<8){if(L.ie===6&&!av.hasIFrameShim){av.appendChild(d.Node.create(al.SHIM_TEMPLATE));av.hasIFrameShim=true;}av.setStyles({height:q,width:q});av.setStyles({height:(av.get(aa)+ao),width:(av.get(ad)+ao)});}av.previous().addClass(x);av.removeClass(ag);},_hideMenu:function(av,at){var au=this,aw=av.previous(),Y;aw.removeClass(x);if(at){au._focusItem(aw);au._setActiveItem(aw);}Y=av.one((i+a));if(Y){Y.removeClass(a);}av.setStyles({left:q,top:q});av.addClass(ag);if(au.get(j)){av.set(X,true);}},_hideAllSubmenus:function(at){var Y=this;at.all(H).each(d.bind(function(au){Y._hideMenu(au);},Y));},_cancelShowSubmenuTimer:function(){var at=this,Y=at._showSubmenuTimer;if(Y){Y.cancel();at._showSubmenuTimer=null;}},_cancelHideSubmenuTimer:function(){var Y=this,at=Y._hideSubmenuTimer;if(at){at.cancel();Y._hideSubmenuTimer=null;}},_initFocusManager:function(){var av=this,ax=av._rootMenu,at=av._activeMenu||ax,aw=av._isRoot(at)?q:("#"+at.get("id")),Y=av._focusManager,au,ay,az;if(Q(at)){ay=aw+an+","+aw+o;au={next:"down:39",previous:"down:37"};}else{ay=aw+an;au={next:"down:40",previous:"down:38"};}if(!Y){ax.plug(d.Plugin.NodeFocusManager,{descendants:ay,keys:au,circular:true});Y=ax.focusManager;az="#"+ax.get("id")+H+" a,"+ah;ax.all(az).set("tabIndex",-1);Y.on(G,this._onActiveDescendantChange,Y,this);Y.after(G,this._afterActiveDescendantChange,Y,this); +av._focusManager=Y;}else{Y.set(U,-1);Y.set(ae,ay);Y.set("keys",au);}},_onActiveDescendantChange:function(at,Y){if(at.src===I&&Y._activeMenu&&!Y._movingToSubmenu){Y._hideAllSubmenus(Y._activeMenu);}},_afterActiveDescendantChange:function(at,Y){var au;if(at.src===I){au=b(this.get(ae).item(at.newVal),true);Y._setActiveItem(au);}},_onDocFocus:function(aw){var av=this,Y=av._activeItem,au=aw.target,at;if(av._rootMenu.contains(au)){if(av._hasFocus){at=m(au);if(!av._activeMenu.compareTo(at)){av._activeMenu=at;av._initFocusManager();av._focusManager.set(U,au);av._setActiveItem(b(au,true));}}else{av._hasFocus=true;Y=b(au,true);if(Y){av._setActiveItem(Y);}}}else{av._clearActiveItem();av._cancelShowSubmenuTimer();av._hideAllSubmenus(av._rootMenu);av._activeMenu=av._rootMenu;av._initFocusManager();av._focusManager.set(U,0);av._hasFocus=false;}},_onMenuMouseOver:function(av,au){var at=this,Y=at._hideAllSubmenusTimer;if(Y){Y.cancel();at._hideAllSubmenusTimer=null;}at._cancelHideSubmenuTimer();if(av&&!av.compareTo(at._activeMenu)){at._activeMenu=av;if(at._hasFocus){at._initFocusManager();}}if(at._movingToSubmenu&&Q(av)){at._movingToSubmenu=false;}},_hideAndFocusLabel:function(){var au=this,at=au._activeMenu,Y;au._hideAllSubmenus(au._rootMenu);if(at){Y=au._getTopmostSubmenu(at);au._focusItem(Y.previous());}},_onMenuMouseOut:function(az,ax){var aw=this,au=aw._activeMenu,ay=ax.relatedTarget,Y=aw._activeItem,av,at;if(au&&!au.contains(ay)){av=m(au);if(av&&!av.contains(ay)){if(aw.get(t)>0){aw._cancelShowSubmenuTimer();aw._hideAllSubmenusTimer=T(aw.get(t),aw,aw._hideAndFocusLabel);}}else{if(Y){at=m(Y);if(!aw._isRoot(at)){aw._focusItem(at.previous());}}}}},_onMenuLabelMouseOver:function(av,Y){var at=this,aw=at._activeMenu,az=at._isRoot(aw),au=(at.get(V)&&az||!az),ax=at.get("submenuShowDelay"),ay;var aA=function(aB){at._cancelHideSubmenuTimer();at._cancelShowSubmenuTimer();if(!N(av)){ay=av.next();if(ay){at._hideAllSubmenus(aw);at._showSubmenuTimer=T(aB,at,at._showMenu,ay);}}};at._focusItem(av);at._setActiveItem(av);if(au){if(at._movingToSubmenu){d.message("Pause path");at._hoverTimer=T(ax,at,function(){aA(0);});}else{aA(ax);}}},_onMenuLabelMouseOut:function(aw,ay){var ax=this,at=ax._isRoot(ax._activeMenu),av=(ax.get(V)&&at||!at),az=ay.relatedTarget,au=aw.next(),Y=ax._hoverTimer;if(Y){Y.cancel();}ax._clearActiveItem();if(av){if(ax._movingToSubmenu&&!ax._showSubmenuTimer&&au){ax._hideSubmenuTimer=T(ax.get("submenuHideDelay"),ax,ax._hideMenu,au);}else{if(!ax._movingToSubmenu&&au&&(!az||(az&&!au.contains(az)&&!az.compareTo(au)))){ax._cancelShowSubmenuTimer();ax._hideMenu(au);}}}},_onMenuItemMouseOver:function(av,ax){var aw=this,au=aw._activeMenu,Y=aw._isRoot(au),at=(aw.get(V)&&Y||!Y);aw._focusItem(av);aw._setActiveItem(av);if(at&&!aw._movingToSubmenu){aw._hideAllSubmenus(au);}},_onMenuItemMouseOut:function(Y,at){this._clearActiveItem();},_onVerticalMenuKeyDown:function(Y){var at=this,ax=at._activeMenu,aC=at._rootMenu,au=Y.target,aw=false,aB=Y.keyCode,az,av,ay,aA;switch(aB){case 37:av=m(ax);if(av&&Q(av)){at._hideMenu(ax);ay=l(ax.get(s));aA=b(ay);if(aA){if(S(aA)){az=aA.next();if(az){at._showMenu(az);at._focusItem(c(az));at._setActiveItem(c(az));}else{at._focusItem(aA);at._setActiveItem(aA);}}else{at._focusItem(aA);at._setActiveItem(aA);}}}else{if(!at._isRoot(ax)){at._hideMenu(ax,true);}}aw=true;break;case 39:if(S(au)){az=au.next();if(az){at._showMenu(az);at._focusItem(c(az));at._setActiveItem(c(az));}}else{if(Q(aC)){az=at._getTopmostSubmenu(ax);ay=A(az.get(s));aA=b(ay);at._hideAllSubmenus(aC);if(aA){if(S(aA)){az=aA.next();if(az){at._showMenu(az);at._focusItem(c(az));at._setActiveItem(c(az));}else{at._focusItem(aA);at._setActiveItem(aA);}}else{at._focusItem(aA);at._setActiveItem(aA);}}}}aw=true;break;}if(aw){Y.preventDefault();}},_onHorizontalMenuKeyDown:function(ay){var ax=this,av=ax._activeMenu,at=ay.target,Y=b(at,true),aw=false,az=ay.keyCode,au;if(az===40){ax._hideAllSubmenus(av);if(S(Y)){au=Y.next();if(au){ax._showMenu(au);ax._focusItem(c(au));ax._setActiveItem(c(au));}aw=true;}}if(aw){ay.preventDefault();}},_onMouseMove:function(at){var Y=this;T(10,Y,function(){Y._currentMouseX=at.pageX;});},_onMouseOver:function(aw){var av=this,at,Y,ay,au,ax;if(av._blockMouseEvent){av._blockMouseEvent=false;}else{at=aw.target;Y=w(at,true);ay=O(at,true);ax=af(at,true);if(D(Y,at)){av._onMenuMouseOver(Y,aw);Y[R]=true;Y[e]=false;au=m(Y);if(au){au[e]=true;au[R]=false;}}if(D(ay,at)){av._onMenuLabelMouseOver(ay,aw);ay[R]=true;ay[e]=false;}if(D(ax,at)){av._onMenuItemMouseOver(ax,aw);ax[R]=true;ax[e]=false;}}},_onMouseOut:function(at){var au=this,aw=au._activeMenu,aB=false,av,ax,az,Y,ay,aA;au._movingToSubmenu=(aw&&!Q(aw)&&((at.pageX-5)>au._currentMouseX));av=at.target;ax=at.relatedTarget;az=w(av,true);Y=O(av,true);aA=af(av,true);if(h(Y,ax)){au._onMenuLabelMouseOut(Y,at);Y[e]=true;Y[R]=false;}if(h(aA,ax)){au._onMenuItemMouseOut(aA,at);aA[e]=true;aA[R]=false;}if(Y){ay=Y.next();if(ay&&ax&&(ax.compareTo(ay)||ay.contains(ax))){aB=true;}}if(h(az,ax)||aB){au._onMenuMouseOut(az,at);az[e]=true;az[R]=false;}},_toggleSubmenuDisplay:function(au){var av=this,aw=au.target,at=O(aw,true),Y=au.type,aA,az,ay,aB,aC,ax;if(at){aA=f(aw)?aw:aw.ancestor(f);if(aA){ay=aA.getAttribute("href",2);aB=ay.indexOf("#");aC=ay.length;if(aB===0&&aC>1){ax=ay.substr(1,aC);az=at.next();if(az&&(az.get(F)===ax)){if(Y===W||Y===ap){if((L.opera||L.gecko||L.ie)&&Y===ap&&!av._preventClickHandle){av._preventClickHandle=av._rootMenu.on("click",function(aD){aD.preventDefault();av._preventClickHandle.detach();av._preventClickHandle=null;});}if(Y==W){au.preventDefault();au.stopImmediatePropagation();av._hasFocus=true;}if(av._isRoot(m(aw))){if(N(at)){av._hideMenu(az);av._focusItem(at);av._setActiveItem(at);}else{av._hideAllSubmenus(av._rootMenu);av._showMenu(az);av._focusItem(c(az));av._setActiveItem(c(az));}}else{if(av._activeItem==at){av._showMenu(az);av._focusItem(c(az));av._setActiveItem(c(az));}else{if(!at._clickHandle){at._clickHandle=at.on("click",function(){av._hideAllSubmenus(av._rootMenu); +av._hasFocus=false;av._clearActiveItem();at._clickHandle.detach();at._clickHandle=null;});}}}}if(Y===ac){au.preventDefault();}}}}}},_onKeyPress:function(Y){switch(Y.keyCode){case 37:case 38:case 39:case 40:Y.preventDefault();break;}},_onKeyDown:function(ax){var aw=this,Y=aw._activeItem,at=ax.target,av=m(at),au;if(av){aw._activeMenu=av;if(Q(av)){aw._onHorizontalMenuKeyDown(ax);}else{aw._onVerticalMenuKeyDown(ax);}if(ax.keyCode===27){if(!aw._isRoot(av)){if(L.opera){T(0,aw,function(){aw._hideMenu(av,true);});}else{aw._hideMenu(av,true);}ax.stopPropagation();aw._blockMouseEvent=L.gecko?true:false;}else{if(Y){if(S(Y)&&N(Y)){au=Y.next();if(au){aw._hideMenu(au);}}else{aw._focusManager.blur();aw._clearActiveItem();aw._hasFocus=false;}}}}}},_onDocMouseDown:function(av){var au=this,at=au._rootMenu,Y=av.target;if(!(at.compareTo(Y)||at.contains(Y))){au._hideAllSubmenus(at);if(L.webkit){au._hasFocus=false;au._clearActiveItem();}}}});d.namespace("Plugin");d.Plugin.NodeMenuNav=al;},"3.3.0",{requires:["node","classnamemanager","node-focusmanager"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/node-menunav/node-menunav.js b/jssource/src_files/include/javascript/yui3/build/node-menunav/node-menunav.js index 0653b1f7..0a616c25 100644 --- a/jssource/src_files/include/javascript/yui3/build/node-menunav/node-menunav.js +++ b/jssource/src_files/include/javascript/yui3/build/node-menunav/node-menunav.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('node-menunav', function(Y) { @@ -130,9 +130,6 @@ var UA = Y.UA, HOST = "host", ACTIVE_DESCENDANT_CHANGE = ACTIVE_DESCENDANT + "Change", - STANDARD_QUERY = ">.yui-menu-content>ul>li>a", - EXTENDED_QUERY = ">.yui-menu-content>ul>li>.yui-menu-label>a:first-child", - // Attribute keys @@ -155,8 +152,12 @@ var UA = Y.UA, // CSS selectors MENU_SELECTOR = PERIOD + CSS_MENU, - MENU_TOGGLE_SELECTOR = (PERIOD + getClassName(MENU, "toggle")); + MENU_TOGGLE_SELECTOR = (PERIOD + getClassName(MENU, "toggle")), + MENU_CONTENT_SELECTOR = PERIOD + getClassName(MENU, CONTENT), + MENU_LABEL_SELECTOR = PERIOD + CSS_MENU_LABEL, + STANDARD_QUERY = ">" + MENU_CONTENT_SELECTOR + ">ul>li>a", + EXTENDED_QUERY = ">" + MENU_CONTENT_SELECTOR + ">ul>li>" + MENU_LABEL_SELECTOR + ">a:first-child"; // Utility functions @@ -438,7 +439,7 @@ NodeMenuNav.ATTRS = { oMenu.set(ROLE, MENU); - oMenu.all("ul,li,." + getClassName(MENU, CONTENT)).set(ROLE, PRESENTATION); + oMenu.all("ul,li," + MENU_CONTENT_SELECTOR).set(ROLE, PRESENTATION); oMenu.all((PERIOD + getClassName(MENUITEM, CONTENT))).set(ROLE, MENUITEM); @@ -1081,7 +1082,7 @@ Y.extend(NodeMenuNav, Y.Plugin.Base, { oFocusManager = oRootMenu.focusManager; - sQuery = "#" + oRootMenu.get("id") + " .yui-menu a," + + sQuery = "#" + oRootMenu.get("id") + MENU_SELECTOR + " a," + MENU_TOGGLE_SELECTOR; oRootMenu.all(sQuery).set("tabIndex", -1); @@ -1353,35 +1354,54 @@ Y.extend(NodeMenuNav, Y.Plugin.Base, { bIsRoot = menuNav._isRoot(oActiveMenu), bUseAutoSubmenuDisplay = (menuNav.get(AUTO_SUBMENU_DISPLAY) && bIsRoot || !bIsRoot), + submenuShowDelay = menuNav.get("submenuShowDelay"), oSubmenu; - - - menuNav._focusItem(menuLabel); - menuNav._setActiveItem(menuLabel); - if (bUseAutoSubmenuDisplay && !menuNav._movingToSubmenu) { - + var showSubmenu = function (delay) { + menuNav._cancelHideSubmenuTimer(); menuNav._cancelShowSubmenuTimer(); - if (!hasVisibleSubmenu(menuLabel)) { oSubmenu = menuLabel.next(); - if (oSubmenu) { - menuNav._hideAllSubmenus(oActiveMenu); - - menuNav._showSubmenuTimer = - later(menuNav.get("submenuShowDelay"), menuNav, - menuNav._showMenu, oSubmenu); - + menuNav._showSubmenuTimer = later(delay, menuNav, menuNav._showMenu, oSubmenu); } - + } + + }; + + + menuNav._focusItem(menuLabel); + menuNav._setActiveItem(menuLabel); + + + if (bUseAutoSubmenuDisplay) { + + if (menuNav._movingToSubmenu) { + + // If the user is moving diagonally from a submenu to + // another submenu and they then stop and pause on a + // menu label for an amount of time equal to the amount of + // time defined for the display of a submenu then show the + // submenu immediately. + // http://yuilibrary.com/projects/yui3/ticket/2528316 + + Y.message("Pause path"); + + menuNav._hoverTimer = later(submenuShowDelay, menuNav, function () { + showSubmenu(0); + }); + + } + else { + showSubmenu(submenuShowDelay); + } } @@ -1403,7 +1423,12 @@ Y.extend(NodeMenuNav, Y.Plugin.Base, { (menuNav.get(AUTO_SUBMENU_DISPLAY) && bIsRoot || !bIsRoot), oRelatedTarget = event.relatedTarget, - oSubmenu = menuLabel.next(); + oSubmenu = menuLabel.next(), + hoverTimer = menuNav._hoverTimer; + + if (hoverTimer) { + hoverTimer.cancel(); + } menuNav._clearActiveItem(); @@ -1422,9 +1447,10 @@ Y.extend(NodeMenuNav, Y.Plugin.Base, { menuNav._hideMenu, oSubmenu); } - else if (!menuNav._movingToSubmenu && oSubmenu && - !oSubmenu.contains(oRelatedTarget) && - !oRelatedTarget.compareTo(oSubmenu)) { + else if (!menuNav._movingToSubmenu && oSubmenu && (!oRelatedTarget || + (oRelatedTarget && + !oSubmenu.contains(oRelatedTarget) && + !oRelatedTarget.compareTo(oSubmenu)))) { // If the mouse is not moving toward the submenu, cancel any // submenus that might be in the process of being displayed @@ -1828,7 +1854,7 @@ Y.extend(NodeMenuNav, Y.Plugin.Base, { oSubmenu = oMenuLabel.next(); - if (oSubmenu && + if (oSubmenu && oRelatedTarget && (oRelatedTarget.compareTo(oSubmenu) || oSubmenu.contains(oRelatedTarget))) { @@ -2162,4 +2188,4 @@ Y.namespace('Plugin'); Y.Plugin.NodeMenuNav = NodeMenuNav; -}, '3.0.0' ,{requires:['node', 'classnamemanager', 'node-focusmanager']}); +}, '3.3.0' ,{requires:['node', 'classnamemanager', 'node-focusmanager']}); diff --git a/jssource/src_files/include/javascript/yui3/build/node/align-plugin-min.js b/jssource/src_files/include/javascript/yui3/build/node/align-plugin-min.js new file mode 100644 index 00000000..9533bc35 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/node/align-plugin-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("align-plugin",function(c){var e="offsetWidth",d="offsetHeight",b=b;function a(f){if(f.host){this._host=f.host;}}a.prototype={to:function(j,t,l,o){this._syncArgs=c.Array(arguments);if(j.top===b){j=c.one(j).get("region");}if(j){var s=[j.left,j.top],q=[j.width,j.height],n=a.points,f=this._host,h=null,r=f.getAttrs([d,e]),k=[0-r[e],0-r[d]],p=t?n[t.charAt(0)]:h,m=(t&&t!=="cc")?n[t.charAt(1)]:h,i=l?n[l.charAt(0)]:h,g=(l&&l!=="cc")?n[l.charAt(1)]:h;if(p){s=p(s,q,t);}if(m){s=m(s,q,t);}if(i){s=i(s,k,l);}if(g){s=g(s,k,l);}if(s&&f){f.setXY(s);}this._resize(o);}return this;},sync:function(){this.to.apply(this,this._syncArgs);return this;},_resize:function(g){var f=this._handle;if(g&&!f){this._handle=c.on("resize",this._onresize,window,this);}else{if(!g&&f){f.detach();}}},_onresize:function(){var f=this;setTimeout(function(){f.sync();});},center:function(g,f){this.to(g,"cc","cc",f);return this;},destroy:function(){var f=this._handle;if(f){f.detach();}}};a.points={"t":function(f,g){return f;},"r":function(f,g){return[f[0]+g[0],f[1]];},"b":function(f,g){return[f[0],f[1]+g[1]];},"l":function(f,g){return f;},"c":function(i,k,f){var h=(f[0]==="t"||f[0]==="b")?0:1,g,j;if(f==="cc"){g=[i[0]+k[0]/2,i[1]+k[1]/2];}else{j=i[h]+k[h]/2;g=(h)?[i[0],j]:[j,i[1]];}return g;}};a.NAME="Align";a.NS="align";a.prototype.constructor=a;c.namespace("Plugin");c.Plugin.Align=a;},"3.3.0",{requires:["node-screen"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/node/align-plugin.js b/jssource/src_files/include/javascript/yui3/build/node/align-plugin.js new file mode 100644 index 00000000..eab7728a --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/node/align-plugin.js @@ -0,0 +1,200 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('align-plugin', function(Y) { + + /** + * Provides advanced positioning support for Node via a Plugin + * for centering and alignment. + * @module align-plugin + */ + + var OFFSET_WIDTH = 'offsetWidth', + OFFSET_HEIGHT = 'offsetHeight', + undefined = undefined; + + /** + * Node plugin which can be used to align a node with another node, + * region, or the viewport. + * + * @class Plugin.Align + * @param {Object} User configuration object + */ + function Align(config) { + if (config.host) { + this._host = config.host; + } + } + + Align.prototype = { + /** + * Aligns node with a point on another node or region. + * Possible alignment points are: + *
          + *
          tl
          + *
          top left
          + *
          tr
          + *
          top right
          + *
          bl
          + *
          bottom left
          + *
          br
          + *
          bottom right
          + *
          tc
          + *
          top center
          + *
          bc
          + *
          bottom center
          + *
          rc
          + *
          right center
          + *
          lc
          + *
          left center
          + *
          cc
          + *
          center center
          + *
          + * @method to + * @parm region {String || Node || HTMLElement || Object} The node or + * region to align with. Defaults to the viewport region. + * @parm regionPoint {String} The point of the region to align with. + * @parm point {String} The point of the node aligned to the region. + * @parm resize {Boolean} Whether or not the node should re-align when + * the window is resized. Defaults to false. + */ + to: function(region, regionPoint, point, syncOnResize) { + // cache original args for syncing + this._syncArgs = Y.Array(arguments); + + if (region.top === undefined) { + region = Y.one(region).get('region'); + } + + if (region) { + var xy = [region.left, region.top], + offxy = [region.width, region.height], + points = Align.points, + node = this._host, + NULL = null, + size = node.getAttrs([OFFSET_HEIGHT, OFFSET_WIDTH]), + nodeoff = [0 - size[OFFSET_WIDTH], 0 - size[OFFSET_HEIGHT]], // reverse offsets + regionFn0 = regionPoint ? points[regionPoint.charAt(0)]: NULL, + regionFn1 = (regionPoint && regionPoint !== 'cc') ? points[regionPoint.charAt(1)] : NULL, + nodeFn0 = point ? points[point.charAt(0)] : NULL, + nodeFn1 = (point && point !== 'cc') ? points[point.charAt(1)] : NULL; + + if (regionFn0) { + xy = regionFn0(xy, offxy, regionPoint); + } + if (regionFn1) { + xy = regionFn1(xy, offxy, regionPoint); + } + + if (nodeFn0) { + xy = nodeFn0(xy, nodeoff, point); + } + if (nodeFn1) { + xy = nodeFn1(xy, nodeoff, point); + } + + if (xy && node) { + node.setXY(xy); + } + + this._resize(syncOnResize); + + } + return this; + }, + + sync: function() { + this.to.apply(this, this._syncArgs); + return this; + }, + + _resize: function(add) { + var handle = this._handle; + if (add && !handle) { + this._handle = Y.on('resize', this._onresize, window, this); + } else if (!add && handle) { + handle.detach(); + } + + }, + + _onresize: function() { + var self = this; + setTimeout(function() { // for performance + self.sync(); + }); + }, + + /** + * Aligns the center of a node to the center of another node or region. + * @method center + * @parm region {Node || HTMLElement || Object} optional The node or + * region to align with. Defaults to the viewport region. + * the window is resized. If centering to viewport, this defaults + * to true, otherwise default is false. + */ + center: function(region, resize) { + this.to(region, 'cc', 'cc', resize); + return this; + }, + + /** + * Removes the resize handler, if any. This is called automatically + * when unplugged from the host node. + * @method destroy + */ + destroy: function() { + var handle = this._handle; + if (handle) { + handle.detach(); + } + } + }; + + Align.points = { + 't': function(xy, off) { + return xy; + }, + + 'r': function(xy, off) { + return [xy[0] + off[0], xy[1]]; + }, + + 'b': function(xy, off) { + return [xy[0], xy[1] + off[1]]; + }, + + 'l': function(xy, off) { + return xy; + }, + + 'c': function(xy, off, point) { + var axis = (point[0] === 't' || point[0] === 'b') ? 0 : 1, + ret, val; + + if (point === 'cc') { + ret = [xy[0] + off[0] / 2, xy[1] + off[1] / 2]; + } else { + val = xy[axis] + off[axis] / 2; + ret = (axis) ? [xy[0], val] : [val, xy[1]]; + } + + return ret; + } + }; + + Align.NAME = 'Align'; + Align.NS = 'align'; + + Align.prototype.constructor = Align; + + Y.namespace('Plugin'); + Y.Plugin.Align = Align; + + + +}, '3.3.0' ,{requires:['node-screen']}); diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-aria-min.js b/jssource/src_files/include/javascript/yui3/build/node/node-aria-min.js deleted file mode 100644 index facda507..00000000 --- a/jssource/src_files/include/javascript/yui3/build/node/node-aria-min.js +++ /dev/null @@ -1,8 +0,0 @@ -/* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. -Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 -*/ -YUI.add("node-aria",function(A){A.Node.re_aria=/^(?:role$|aria-)/;A.Node.prototype._addAriaAttr=function(B){this.addAttr(B,{getter:function(){return A.Node.getDOMNode(this).getAttribute(B,2);},setter:function(C){A.Node.getDOMNode(this).setAttribute(B,C);return C;}});};},"3.0.0",{requires:["node-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-aria.js b/jssource/src_files/include/javascript/yui3/build/node/node-aria.js deleted file mode 100644 index eba051a6..00000000 --- a/jssource/src_files/include/javascript/yui3/build/node/node-aria.js +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. -Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 -*/ -YUI.add('node-aria', function(Y) { - -/** - * Aria support for Node - * @module node - * @submodule node-aria - */ - -Y.Node.prototype.get = function(name) { - var val; - if (re_aria.test(name)) { - val = Y.Node.getDOMNode(this).getAttribute(name, 2); - } else { - - } - - setter: function(val) { - Y.Node.getDOMNode(this).setAttribute(name, val); - return val; - } - }); -}; - - -}, '3.0.0' ,{requires:['node-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-base-min.js b/jssource/src_files/include/javascript/yui3/build/node/node-base-min.js index 46f5f2ef..ee53f4b9 100644 --- a/jssource/src_files/include/javascript/yui3/build/node/node-base-min.js +++ b/jssource/src_files/include/javascript/yui3/build/node/node-base-min.js @@ -1,9 +1,10 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("node-base",function(C){var G=".",E="nodeName",I="nodeType",B="ownerDocument",H="tagName",D="_yuid",F=function(L){var K=L[D];if(K&&F._instances[K]&&F._instances[K]._node!==L){L[D]=null;}K=C.stamp(L);if(!K){K=C.guid();}this[D]=K;this._node=L;F._instances[K]=this;this._stateProxy=L;if(this._initPlugins){this._initPlugins();}},J=function(L){var K=null;if(L){K=(typeof L==="string")?function(M){return C.Selector.test(M,L);}:function(M){return L(F.get(M));};}return K;};F.NAME="Node";F.re_aria=/^(?:role$|aria-)/;F.DOM_EVENTS={abort:true,beforeunload:true,blur:true,change:true,click:true,close:true,command:true,contextmenu:true,drag:true,dragstart:true,dragenter:true,dragover:true,dragleave:true,dragend:true,drop:true,dblclick:true,error:true,focus:true,keydown:true,keypress:true,keyup:true,load:true,message:true,mousedown:true,mousemove:true,mouseout:true,mouseover:true,mouseup:true,mousemultiwheel:true,mousewheel:true,submit:true,mouseenter:true,mouseleave:true,scroll:true,reset:true,resize:true,select:true,textInput:true,unload:true};C.mix(F.DOM_EVENTS,C.Env.evt.plugins);F._instances={};F.getDOMNode=function(K){if(K){return(K.nodeType)?K:K._node||null;}return null;};F.scrubVal=function(L,K){if(K&&L){if(typeof L==="object"||typeof L==="function"){if(I in L||C.DOM.isWindow(L)){L=F.get(L);}else{if((L.item&&!L._nodes)||(L[0]&&L[0][I])){L=C.all(L);}}}}else{if(L===undefined){L=K;}}return L;};F.addMethod=function(K,M,L){if(K&&M&&typeof M==="function"){F.prototype[K]=function(){L=L||this;var O=C.Array(arguments),N;if(O[0]&&O[0] instanceof F){O[0]=O[0]._node;}if(O[1]&&O[1] instanceof F){O[1]=O[1]._node;}O.unshift(this._node);N=F.scrubVal(M.apply(L,O),this);return N;};}else{}};F.importMethod=function(M,K,L){if(typeof K==="string"){L=L||K;F.addMethod(L,M[K],M);}else{C.each(K,function(N){F.importMethod(M,N);});}};F.one=function(N){var K=null,M,L;if(N){if(typeof N==="string"){if(N.indexOf("doc")===0){N=C.config.doc;}else{if(N.indexOf("win")===0){N=C.config.win;}else{N=C.Selector.query(N,null,true);}}if(!N){return null;}}else{if(N instanceof F){return N;}}L=N._yuid;K=F._instances[L];M=K?K._node:null;if(!K||(M&&N!==M)){K=new F(N);}}return K;};F.get=function(){return F.one.apply(F,arguments);};F.create=function(){return F.get(C.DOM.create.apply(C.DOM,arguments));};F.ATTRS={text:{getter:function(){return C.DOM.getText(this._node);},setter:function(K){C.DOM.setText(this._node,K);return K;}},"options":{getter:function(){return this._node.getElementsByTagName("option");}},"elements":{getter:function(){return C.all(this._node.elements);}},"children":{getter:function(){var N=this._node,M=N.children,O,L,K;if(!M){O=N.childNodes;M=[];for(L=0,K=O.length;L-1){N=K;K=K.split(G);C.Object.setValue(L,K,M);}else{if(L[K]!==undefined){L[K]=M;}}return M;};F.DEFAULT_GETTER=function(K){var L=this._stateProxy,M;if(K.indexOf&&K.indexOf(G)>-1){M=C.Object.getValue(L,K.split(G));}else{if(L[K]!==undefined){M=L[K];}}return M;};C.augment(F,C.Event.Target);C.mix(F.prototype,{toString:function(){var M="",L=this[D]+": not bound to a node",K=this._node;if(K){M+=K[E];if(K.id){M+="#"+K.id;}if(K.className){M+="."+K.className.replace(" ",".");}M+=" "+this[D];}return M||L;},get:function(K){var L;if(this._getAttr){L=this._getAttr(K);}else{L=this._get(K);}if(L){L=C.Node.scrubVal(L,this);}return L;},_get:function(K){var L=F.ATTRS[K],M;if(L&&L.getter){M=L.getter.call(this);}else{if(F.re_aria.test(K)){M=this._node.getAttribute(K,2);}else{M=F.DEFAULT_GETTER.apply(this,arguments);}}return M;},set:function(K,M){var L=F.ATTRS[K];if(this._setAttr){this._setAttr.apply(this,arguments);}else{if(L&&L.setter){L.setter.call(this,M);}else{if(F.re_aria.test(K)){this._node.setAttribute(K,M);}else{F.DEFAULT_SETTER.apply(this,arguments);}}}return this;},setAttrs:function(K){if(this._setAttrs){this._setAttrs(K);}else{C.Object.each(K,function(L,M){this.set(M,L);},this);}return this;},getAttrs:function(L){var K={};if(this._getAttrs){this._getAttrs(L);}else{C.Array.each(L,function(M,N){K[M]=this.get(M);},this);}return K;},create:F.create,compareTo:function(K){var L=this._node;if(K instanceof C.Node){K=K._node;}return L===K;},inDoc:function(L){var K=this._node;L=(L)?L._node||L:K[B];if(L.documentElement){return C.DOM.contains(L.documentElement,K);}},getById:function(M){var L=this._node,K=C.DOM.byId(M,L[B]);if(K&&C.DOM.contains(L,K)){K=C.one(K);}else{K=null;}return K;},ancestor:function(K){return F.get(C.DOM.elementByAxis(this._node,"parentNode",J(K)));},previous:function(L,K){return F.get(C.DOM.elementByAxis(this._node,"previousSibling",J(L),K));},next:function(M,L,K){return F.get(C.DOM.elementByAxis(this._node,"nextSibling",J(L),K));},one:function(K){return C.one(C.Selector.query(K,this._node,true));},query:function(K){return this.one(K);},all:function(K){var L=C.all(C.Selector.query(K,this._node));L._query=K;return L;},queryAll:function(K){return this.all(K);},test:function(K){return C.Selector.test(this._node,K);},remove:function(K){var L=this._node;L.parentNode.removeChild(L);if(K){this.destroy(true);}return this;},replace:function(K){var L=this._node;L.parentNode.replaceChild(K,L);return this;},purge:function(L,K){C.Event.purgeElement(this._node,L,K);},destroy:function(K){delete F._instances[this[D]];if(K){this.purge(true);}if(this.unplug){this.unplug();}this._node._yuid=null;this._node=null;this._stateProxy=null;},invoke:function(R,L,K,Q,P,O){var N=this._node,M;if(L&&L instanceof C.Node){L=L._node;}if(K&&K instanceof C.Node){K=K._node;}M=N[R](L,K,Q,P,O);return C.Node.scrubVal(M,this);},each:function(L,K){K=K||this;return L.call(K,this);},item:function(K){return this;},size:function(){return this._node?1:0;},insert:function(M,K){var L=this._node; -if(M){if(typeof K==="number"){K=this._node.childNodes[K];}if(typeof M!=="string"){if(M._node){M=M._node;}else{if(M._nodes||(!M.nodeType&&M.length)){C.each(M._nodes,function(N){C.DOM.addHTML(L,N,K);});return this;}}}C.DOM.addHTML(L,M,K);}return this;},prepend:function(K){return this.insert(K,0);},append:function(K){return this.insert(K,null);},setContent:function(K){C.DOM.addHTML(this._node,K,"replace");return this;},hasMethod:function(L){var K=this._node;return(K&&(typeof K==="function"));}},true);C.Node=F;C.get=C.Node.get;C.one=C.Node.one;var A=function(K){if(typeof K==="string"){this._query=K;K=C.Selector.query(K);}else{K=C.Array(K,0,true);}A._instances[C.stamp(this)]=this;this._nodes=K;};A.NAME="NodeList";A.getDOMNodes=function(K){return K._nodes;};A._instances=[];A.each=function(K,N,M){var L=K._nodes;if(L&&L.length){C.Array.each(L,N,M||K);}else{}};A.addMethod=function(K,M,L){if(K&&M){A.prototype[K]=function(){var O=[],N=arguments;C.Array.each(this._nodes,function(T){var S="_yuid",Q=C.Node._instances[T[S]],R,P;if(!Q){Q=A._getTempNode(T);}R=L||Q;P=M.apply(R,N);if(P!==undefined&&P!==Q){O[O.length]=P;}});return O.length?O:this;};}else{}};A.importMethod=function(M,K,L){if(typeof K==="string"){L=L||K;A.addMethod(K,M[K]);}else{C.each(K,function(N){A.importMethod(M,N);});}};A._getTempNode=function(L){var K=A._tempNode;if(!K){K=C.Node.create("
          ");A._tempNode=K;}K._node=L;K._stateProxy=L;return K;};C.mix(A.prototype,{item:function(K){return C.one((this._nodes||[])[K]);},each:function(M,L){var K=this;C.Array.each(this._nodes,function(O,N){O=C.one(O);return M.call(L||O,O,N,K);});return K;},batch:function(L,K){var M=this;C.Array.each(this._nodes,function(P,O){var N=C.Node._instances[P[D]];if(!N){N=A._getTempNode(P);}return L.call(K||N,N,O,M);});return M;},some:function(M,L){var K=this;return C.Array.some(this._nodes,function(O,N){O=C.one(O);L=L||O;return M.call(L,O,N,K);});},toFrag:function(){return C.one(C.DOM._nl2frag(this._nodes));},indexOf:function(K){return C.Array.indexOf(this._nodes,C.Node.getDOMNode(K));},filter:function(K){return C.all(C.Selector.filter(this._nodes,K));},modulus:function(M,L){L=L||0;var K=[];A.each(this,function(O,N){if(N%M===L){K.push(O);}});return C.all(K);},odd:function(){return this.modulus(2,1);},even:function(){return this.modulus(2);},destructor:function(){delete A._instances[this[D]];},refresh:function(){var L,K=this._nodes;if(this._query){if(K&&K[0]&&K[0].ownerDocument){L=K[0].ownerDocument;}this._nodes=C.Selector.query(this._query,L||C.config.doc);}return this;},on:function(N,M,L){var K=C.Array(arguments,0,true);K.splice(2,0,this._nodes);K[3]=L||this;return C.on.apply(C,K);},after:function(N,M,L){var K=C.Array(arguments,0,true);K.splice(2,0,this._nodes);K[3]=L||this;return C.after.apply(C,K);},size:function(){return this._nodes.length;},toString:function(){var N="",M=this[D]+": not bound to any nodes",K=this._nodes,L;if(K&&K[0]){L=K[0];N+=L[E];if(L.id){N+="#"+L.id;}if(L.className){N+="."+L.className.replace(" ",".");}if(K.length>1){N+="...["+K.length+" items]";}}return N||M;}},true);A.importMethod(C.Node.prototype,["append","detach","detachAll","insert","prepend","remove","set","setContent"]);A.prototype.get=function(L){var O=[],N=this._nodes,M=false,P=A._getTempNode,K,Q;if(N[0]){K=C.Node._instances[N[0]._yuid]||P(N[0]);Q=K._get(L);if(Q&&Q.nodeType){M=true;}}C.Array.each(N,function(R){K=C.Node._instances[R._yuid];if(!K){K=P(R);}Q=K._get(L);if(!M){Q=C.Node.scrubVal(Q,K);}O.push(Q);});return(M)?C.all(O):O;};C.NodeList=A;C.all=function(K){return new A(K);};C.Node.all=C.all;C.Array.each(["replaceChild","appendChild","insertBefore","removeChild","hasChildNodes","cloneNode","hasAttribute","removeAttribute","scrollIntoView","getElementsByTagName","focus","blur","submit","reset","select"],function(K){C.Node.prototype[K]=function(O,M,L){var N=this.invoke(K,O,M,L);return N;};});F.importMethod(C.DOM,["contains","setAttribute","getAttribute"]);C.NodeList.importMethod(C.Node.prototype,["getAttribute","setAttribute"]);(function(L){var K=["hasClass","addClass","removeClass","replaceClass","toggleClass"];L.Node.importMethod(L.DOM,K);L.NodeList.importMethod(L.Node.prototype,K);})(C);if(!document.documentElement.hasAttribute){C.Node.prototype.hasAttribute=function(K){return C.DOM.getAttribute(this._node,K)!=="";};}C.Node.ATTRS.type={setter:function(L){if(L==="hidden"){try{this._node.type="hidden";}catch(K){this.setStyle("display","none");this._inputType="hidden";}}else{try{this._node.type=L;}catch(K){}}return L;},getter:function(){return this._inputType||this._node.type;},_bypassProxy:true};},"3.0.0",{requires:["dom-base","selector-css2","event-base"]}); \ No newline at end of file +YUI.add("node-base",function(c){var i=".",e="nodeName",m="nodeType",b="ownerDocument",l="tagName",d="_yuid",o=Array.prototype.slice,f=c.DOM,j=function(q){var p=(q.nodeType!==9)?q.uniqueID:q[d];if(p&&j._instances[p]&&j._instances[p]._node!==q){q[d]=null;}p=p||c.stamp(q);if(!p){p=c.guid();}this[d]=p;this._node=q;j._instances[p]=this;this._stateProxy=q;c.EventTarget.call(this,{emitFacade:true});if(this._initPlugins){this._initPlugins();}this.SHOW_TRANSITION=j.SHOW_TRANSITION;this.HIDE_TRANSITION=j.HIDE_TRANSITION;},n=function(q){var p=null;if(q){p=(typeof q=="string")?function(r){return c.Selector.test(r,q);}:function(r){return q(c.one(r));};}return p;};j.NAME="node";j.re_aria=/^(?:role$|aria-)/;j.SHOW_TRANSITION="fadeIn";j.HIDE_TRANSITION="fadeOut";j.DOM_EVENTS={abort:1,beforeunload:1,blur:1,change:1,click:1,close:1,command:1,contextmenu:1,dblclick:1,DOMMouseScroll:1,drag:1,dragstart:1,dragenter:1,dragover:1,dragleave:1,dragend:1,drop:1,error:1,focus:1,key:1,keydown:1,keypress:1,keyup:1,load:1,message:1,mousedown:1,mouseenter:1,mouseleave:1,mousemove:1,mousemultiwheel:1,mouseout:1,mouseover:1,mouseup:1,mousewheel:1,orientationchange:1,reset:1,resize:1,select:1,selectstart:1,submit:1,scroll:1,textInput:1,unload:1};c.mix(j.DOM_EVENTS,c.Env.evt.plugins);j._instances={};j.getDOMNode=function(p){if(p){return(p.nodeType)?p:p._node||null;}return null;};j.scrubVal=function(q,p){if(q){if(typeof q=="object"||typeof q=="function"){if(m in q||f.isWindow(q)){q=c.one(q);}else{if((q.item&&!q._nodes)||(q[0]&&q[0][m])){q=c.all(q);}}}}else{if(typeof q==="undefined"){q=p;}else{if(q===null){q=null;}}}return q;};j.addMethod=function(p,r,q){if(p&&r&&typeof r=="function"){j.prototype[p]=function(){var t=o.call(arguments),u=this,s;if(t[0]&&c.instanceOf(t[0],j)){t[0]=t[0]._node;}if(t[1]&&c.instanceOf(t[1],j)){t[1]=t[1]._node;}t.unshift(u._node);s=r.apply(u,t);if(s){s=j.scrubVal(s,u);}(typeof s!="undefined")||(s=u);return s;};}else{}};j.importMethod=function(r,p,q){if(typeof p=="string"){q=q||p;j.addMethod(q,r[p],r);}else{c.Array.each(p,function(s){j.importMethod(r,s);});}};j.one=function(s){var p=null,r,q;if(s){if(typeof s=="string"){if(s.indexOf("doc")===0){s=c.config.doc;}else{if(s.indexOf("win")===0){s=c.config.win;}else{s=c.Selector.query(s,null,true);}}if(!s){return null;}}else{if(c.instanceOf(s,j)){return s;}}if(s.nodeType||c.DOM.isWindow(s)){q=(s.uniqueID&&s.nodeType!==9)?s.uniqueID:s._yuid;p=j._instances[q];r=p?p._node:null;if(!p||(r&&s!==r)){p=new j(s);}}}return p;};j.create=function(p,q){if(q&&q._node){q=q._node;}return c.one(f.create(p,q));};j.ATTRS={text:{getter:function(){return f.getText(this._node);},setter:function(p){f.setText(this._node,p);return p;}},"options":{getter:function(){return this._node.getElementsByTagName("option");}},"children":{getter:function(){var s=this._node,r=s.children,t,q,p;if(!r){t=s.childNodes;r=[];for(q=0,p=t.length;q-1){s=p;p=p.split(i);c.Object.setValue(q,p,r);}else{if(typeof q[p]!="undefined"){q[p]=r;}}return r;};j.DEFAULT_GETTER=function(p){var q=this._stateProxy,r;if(p.indexOf&&p.indexOf(i)>-1){r=c.Object.getValue(q,p.split(i));}else{if(typeof q[p]!="undefined"){r=q[p];}}return r;};c.mix(j,c.EventTarget,false,null,1);c.mix(j.prototype,{toString:function(){var s=this[d]+": not bound to a node",r=this._node,p,t,q;if(r){p=r.attributes;t=(p&&p.id)?r.getAttribute("id"):null;q=(p&&p.className)?r.getAttribute("className"):null;s=r[e];if(t){s+="#"+t;}if(q){s+="."+q.replace(" ",".");}s+=" "+this[d];}return s;},get:function(p){var q;if(this._getAttr){q=this._getAttr(p);}else{q=this._get(p);}if(q){q=j.scrubVal(q,this);}else{if(q===null){q=null;}}return q;},_get:function(p){var q=j.ATTRS[p],r;if(q&&q.getter){r=q.getter.call(this);}else{if(j.re_aria.test(p)){r=this._node.getAttribute(p,2);}else{r=j.DEFAULT_GETTER.apply(this,arguments);}}return r;},set:function(p,r){var q=j.ATTRS[p];if(this._setAttr){this._setAttr.apply(this,arguments);}else{if(q&&q.setter){q.setter.call(this,r,p);}else{if(j.re_aria.test(p)){this._node.setAttribute(p,r);}else{j.DEFAULT_SETTER.apply(this,arguments);}}}return this;},setAttrs:function(p){if(this._setAttrs){this._setAttrs(p);}else{c.Object.each(p,function(q,r){this.set(r,q);},this);}return this;},getAttrs:function(q){var p={};if(this._getAttrs){this._getAttrs(q);}else{c.Array.each(q,function(r,s){p[r]=this.get(r);},this);}return p;},create:j.create,compareTo:function(p){var q=this._node;if(c.instanceOf(p,j)){p=p._node;}return q===p;},inDoc:function(q){var p=this._node;q=(q)?q._node||q:p[b];if(q.documentElement){return f.contains(q.documentElement,p);}},getById:function(r){var q=this._node,p=f.byId(r,q[b]);if(p&&f.contains(q,p)){p=c.one(p);}else{p=null;}return p;},ancestor:function(p,q){return c.one(f.ancestor(this._node,n(p),q));},ancestors:function(p,q){return c.all(f.ancestors(this._node,n(p),q));},previous:function(q,p){return c.one(f.elementByAxis(this._node,"previousSibling",n(q),p));},next:function(q,p){return c.one(f.elementByAxis(this._node,"nextSibling",n(q),p));},siblings:function(p){return c.all(f.siblings(this._node,n(p)));},one:function(p){return c.one(c.Selector.query(p,this._node,true));},all:function(p){var q=c.all(c.Selector.query(p,this._node));q._query=p;q._queryRoot=this._node;return q;},test:function(p){return c.Selector.test(this._node,p);},remove:function(q){var r=this._node,p=r.parentNode;if(p){p.removeChild(r);}if(q){this.destroy();}return this;},replace:function(p){var q=this._node;if(typeof p=="string"){p=j.create(p);}q.parentNode.replaceChild(j.getDOMNode(p),q);return this;},replaceChild:function(q,p){if(typeof q=="string"){q=f.create(q);}return c.one(this._node.replaceChild(j.getDOMNode(q),j.getDOMNode(p)));},appendChild:function(p){return j.scrubVal(this._insert(p));},insertBefore:function(q,p){return c.Node.scrubVal(this._insert(q,p)); +},purge:function(q,p){c.Event.purgeElement(this._node,q,p);return this;},destroy:function(p){this.purge();if(this.unplug){this.unplug();}this.clearData();if(p){this.all("*").destroy();}this._node=null;this._stateProxy=null;delete j._instances[this[d]];},invoke:function(w,q,p,v,u,t){var s=this._node,r;if(q&&c.instanceOf(q,j)){q=q._node;}if(p&&c.instanceOf(p,j)){p=p._node;}r=s[w](q,p,v,u,t);return j.scrubVal(r,this);},insert:function(q,p){this._insert(q,p);return this;},_insert:function(s,q){var r=this._node,p=null;if(typeof q=="number"){q=this._node.childNodes[q];}else{if(q&&q._node){q=q._node;}}if(s&&typeof s!="string"){s=s._node||s._nodes||s;}p=f.addHTML(r,s,q);return p;},prepend:function(p){return this.insert(p,0);},append:function(p){return this.insert(p,null);},appendTo:function(p){c.one(p).append(this);return this;},setContent:function(p){this._insert(p,"replace");return this;},getContent:function(p){return this.get("innerHTML");},swap:c.config.doc.documentElement.swapNode?function(p){this._node.swapNode(j.getDOMNode(p));}:function(p){p=j.getDOMNode(p);var r=this._node,q=p.parentNode,s=p.nextSibling;if(s===r){q.insertBefore(r,p);}else{if(p===r.nextSibling){q.insertBefore(p,r);}else{r.parentNode.replaceChild(p,r);f.addHTML(q,r,s);}}return this;},getData:function(q){var p;this._data=this._data||{};if(arguments.length){p=this._data[q];}else{p=this._data;}return p;},setData:function(p,q){this._data=this._data||{};if(arguments.length>1){this._data[p]=q;}else{this._data=p;}return this;},clearData:function(p){if("_data" in this){if(p){delete this._data[p];}else{delete this._data;}}return this;},hasMethod:function(q){var p=this._node;return !!(p&&q in p&&typeof p[q]!="unknown"&&(typeof p[q]=="function"||String(p[q]).indexOf("function")===1));},SHOW_TRANSITION:null,HIDE_TRANSITION:null,show:function(p){p=arguments[arguments.length-1];this.toggleView(true,p);return this;},_show:function(){this.setStyle("display","");},_isHidden:function(){return c.DOM.getStyle(this._node,"display")==="none";},toggleView:function(p,q){this._toggleView.apply(this,arguments);},_toggleView:function(p,q){q=arguments[arguments.length-1];if(typeof p!="boolean"){p=(this._isHidden())?1:0;}if(p){this._show();}else{this._hide();}if(typeof q=="function"){q.call(this);}return this;},hide:function(p){p=arguments[arguments.length-1];this.toggleView(false,p);return this;},_hide:function(){this.setStyle("display","none");},isFragment:function(){return(this.get("nodeType")===11);},empty:function(p){this.get("childNodes").remove(p);return this;}},true);c.Node=j;c.one=c.Node.one;var a=function(p){var q=[];if(typeof p==="string"){this._query=p;p=c.Selector.query(p);}else{if(p.nodeType||f.isWindow(p)){p=[p];}else{if(c.instanceOf(p,c.Node)){p=[p._node];}else{if(c.instanceOf(p[0],c.Node)){c.Array.each(p,function(r){if(r._node){q.push(r._node);}});p=q;}else{p=c.Array(p,0,true);}}}}this._nodes=p;};a.NAME="NodeList";a.getDOMNodes=function(p){return(p&&p._nodes)?p._nodes:p;};a.each=function(p,s,r){var q=p._nodes;if(q&&q.length){c.Array.each(q,s,r||p);}else{}};a.addMethod=function(p,r,q){if(p&&r){a.prototype[p]=function(){var t=[],s=arguments;c.Array.each(this._nodes,function(y){var x=(y.uniqueID&&y.nodeType!==9)?"uniqueID":"_yuid",v=c.Node._instances[y[x]],w,u;if(!v){v=a._getTempNode(y);}w=q||v;u=r.apply(w,s);if(u!==undefined&&u!==v){t[t.length]=u;}});return t.length?t:this;};}else{}};a.importMethod=function(r,p,q){if(typeof p==="string"){q=q||p;a.addMethod(p,r[p]);}else{c.Array.each(p,function(s){a.importMethod(r,s);});}};a._getTempNode=function(q){var p=a._tempNode;if(!p){p=c.Node.create("
          ");a._tempNode=p;}p._node=q;p._stateProxy=q;return p;};c.mix(a.prototype,{item:function(p){return c.one((this._nodes||[])[p]);},each:function(r,q){var p=this;c.Array.each(this._nodes,function(t,s){t=c.one(t);return r.call(q||t,t,s,p);});return p;},batch:function(q,p){var r=this;c.Array.each(this._nodes,function(u,t){var s=c.Node._instances[u[d]];if(!s){s=a._getTempNode(u);}return q.call(p||s,s,t,r);});return r;},some:function(r,q){var p=this;return c.Array.some(this._nodes,function(t,s){t=c.one(t);q=q||t;return r.call(q,t,s,p);});},toFrag:function(){return c.one(c.DOM._nl2frag(this._nodes));},indexOf:function(p){return c.Array.indexOf(this._nodes,c.Node.getDOMNode(p));},filter:function(p){return c.all(c.Selector.filter(this._nodes,p));},modulus:function(s,q){q=q||0;var p=[];a.each(this,function(t,r){if(r%s===q){p.push(t);}});return c.all(p);},odd:function(){return this.modulus(2,1);},even:function(){return this.modulus(2);},destructor:function(){},refresh:function(){var s,q=this._nodes,r=this._query,p=this._queryRoot;if(r){if(!p){if(q&&q[0]&&q[0].ownerDocument){p=q[0].ownerDocument;}}this._nodes=c.Selector.query(r,p);}return this;},_prepEvtArgs:function(s,r,q){var p=c.Array(arguments,0,true);if(p.length<2){p[2]=this._nodes;}else{p.splice(2,0,this._nodes);}p[3]=q||this;return p;},on:function(r,q,p){return c.on.apply(c,this._prepEvtArgs.apply(this,arguments));},once:function(r,q,p){return c.once.apply(c,this._prepEvtArgs.apply(this,arguments));},after:function(r,q,p){return c.after.apply(c,this._prepEvtArgs.apply(this,arguments));},size:function(){return this._nodes.length;},isEmpty:function(){return this._nodes.length<1;},toString:function(){var s="",r=this[d]+": not bound to any nodes",p=this._nodes,q;if(p&&p[0]){q=p[0];s+=q[e];if(q.id){s+="#"+q.id;}if(q.className){s+="."+q.className.replace(" ",".");}if(p.length>1){s+="...["+p.length+" items]";}}return s||r;}},true);a.importMethod(c.Node.prototype,["append","destroy","detach","detachAll","empty","insert","prepend","remove","set","setContent","show","hide","toggleView"]);a.prototype.get=function(q){var t=[],s=this._nodes,r=false,u=a._getTempNode,p,v;if(s[0]){p=c.Node._instances[s[0]._yuid]||u(s[0]);v=p._get(q);if(v&&v.nodeType){r=true;}}c.Array.each(s,function(w){p=c.Node._instances[w._yuid];if(!p){p=u(w);}v=p._get(q);if(!r){v=c.Node.scrubVal(v,p);}t.push(v);});return(r)?c.all(t):t;};c.NodeList=a; +c.all=function(p){return new a(p);};c.Node.all=c.all;c.Array.each(["removeChild","hasChildNodes","cloneNode","hasAttribute","removeAttribute","scrollIntoView","getElementsByTagName","focus","blur","submit","reset","select","createCaption"],function(p){c.Node.prototype[p]=function(t,r,q){var s=this.invoke(p,t,r,q);return s;};});c.Node.importMethod(c.DOM,["contains","setAttribute","getAttribute","wrap","unwrap","generateID"]);c.NodeList.importMethod(c.Node.prototype,["getAttribute","setAttribute","removeAttribute","unwrap","wrap","generateID"]);(function(q){var p=["hasClass","addClass","removeClass","replaceClass","toggleClass"];q.Node.importMethod(q.DOM,p);q.NodeList.importMethod(q.Node.prototype,p);})(c);if(!c.config.doc.documentElement.hasAttribute){c.Node.prototype.hasAttribute=function(p){if(p==="value"){if(this.get("value")!==""){return true;}}return !!(this._node.attributes[p]&&this._node.attributes[p].specified);};}c.Node.prototype.focus=function(){try{this._node.focus();}catch(p){}};c.Node.ATTRS.type={setter:function(q){if(q==="hidden"){try{this._node.type="hidden";}catch(p){this.setStyle("display","none");this._inputType="hidden";}}else{try{this._node.type=q;}catch(p){}}return q;},getter:function(){return this._inputType||this._node.type;},_bypassProxy:true};if(c.config.doc.createElement("form").elements.nodeType){c.Node.ATTRS.elements={getter:function(){return this.all("input, textarea, button, select");}};}c.mix(c.Node.ATTRS,{offsetHeight:{setter:function(p){c.DOM.setHeight(this._node,p);return p;},getter:function(){return this._node.offsetHeight;}},offsetWidth:{setter:function(p){c.DOM.setWidth(this._node,p);return p;},getter:function(){return this._node.offsetWidth;}}});c.mix(c.Node.prototype,{sizeTo:function(p,q){var r;if(arguments.length<2){r=c.one(p);p=r.get("offsetWidth");q=r.get("offsetHeight");}this.setAttrs({offsetWidth:p,offsetHeight:q});}});var k=c.NodeList,h=Array.prototype,g=["concat","pop","push","shift","slice","splice","unshift"];c.Array.each(g,function(p){k.prototype[p]=function(){var r=[],s=0,q;while((q=arguments[s++])){r.push(q._node||q._nodes||q);}return c.Node.scrubVal(h[p].apply(this._nodes,r));};});},"3.3.0",{requires:["dom-base","selector-css2","event-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-base.js b/jssource/src_files/include/javascript/yui3/build/node/node-base.js index 04b2b7da..119da86c 100644 --- a/jssource/src_files/include/javascript/yui3/build/node/node-base.js +++ b/jssource/src_files/include/javascript/yui3/build/node/node-base.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('node-base', function(Y) { @@ -11,7 +11,7 @@ YUI.add('node-base', function(Y) { * The Node Utility provides a DOM-like interface for interacting with DOM nodes. * @module node * @submodule node-base - */ + */ /** * The Node class provides a wrapper for manipulating DOM Nodes. @@ -23,6 +23,7 @@ YUI.add('node-base', function(Y) { * * @class Node * @constructor + * @param {DOMNode} node the DOM node to be mapped to the Node instance. * @for Node */ @@ -34,40 +35,54 @@ var DOT = '.', TAG_NAME = 'tagName', UID = '_yuid', - Node = function(node) { - var uid = node[UID]; + _slice = Array.prototype.slice, + + Y_DOM = Y.DOM, - if (uid && Node._instances[uid] && Node._instances[uid]._node !== node) { + Y_Node = function(node) { + var uid = (node.nodeType !== 9) ? node.uniqueID : node[UID]; + + if (uid && Y_Node._instances[uid] && Y_Node._instances[uid]._node !== node) { node[UID] = null; // unset existing uid to prevent collision (via clone or hack) } - uid = Y.stamp(node); + uid = uid || Y.stamp(node); if (!uid) { // stamp failed; likely IE non-HTMLElement uid = Y.guid(); } this[UID] = uid; + /** + * The underlying DOM node bound to the Y.Node instance + * @property _node + * @private + */ this._node = node; - Node._instances[uid] = this; + Y_Node._instances[uid] = this; this._stateProxy = node; // when augmented with Attribute + Y.EventTarget.call(this, {emitFacade:true}); + if (this._initPlugins) { // when augmented with Plugin.Host this._initPlugins(); } + + this.SHOW_TRANSITION = Y_Node.SHOW_TRANSITION; + this.HIDE_TRANSITION = Y_Node.HIDE_TRANSITION; }, // used with previous/next/ancestor tests _wrapFn = function(fn) { var ret = null; if (fn) { - ret = (typeof fn === 'string') ? + ret = (typeof fn == 'string') ? function(n) { return Y.Selector.test(n, fn); - } : + } : function(n) { - return fn(Node.get(n)); + return fn(Y.one(n)); }; } @@ -75,140 +90,211 @@ var DOT = '.', }; // end "globals" -Node.NAME = 'Node'; - -Node.re_aria = /^(?:role$|aria-)/; - -Node.DOM_EVENTS = { - abort: true, - beforeunload: true, - blur: true, - change: true, - click: true, - close: true, - command: true, - contextmenu: true, - drag: true, - dragstart: true, - dragenter: true, - dragover: true, - dragleave: true, - dragend: true, - drop: true, - dblclick: true, - error: true, - focus: true, - keydown: true, - keypress: true, - keyup: true, - load: true, - message: true, - mousedown: true, - mousemove: true, - mouseout: true, - mouseover: true, - mouseup: true, - mousemultiwheel: true, - mousewheel: true, - submit: true, - mouseenter: true, - mouseleave: true, - scroll: true, - reset: true, - resize: true, - select: true, - textInput: true, - unload: true +/** + * The name of the component + * @static + * @property NAME + */ +Y_Node.NAME = 'node'; + +/* + * The pattern used to identify ARIA attributes + */ +Y_Node.re_aria = /^(?:role$|aria-)/; + +Y_Node.SHOW_TRANSITION = 'fadeIn'; +Y_Node.HIDE_TRANSITION = 'fadeOut'; + +/** + * List of events that route to DOM events + * @static + * @property DOM_EVENTS + */ + +Y_Node.DOM_EVENTS = { + abort: 1, + beforeunload: 1, + blur: 1, + change: 1, + click: 1, + close: 1, + command: 1, + contextmenu: 1, + dblclick: 1, + DOMMouseScroll: 1, + drag: 1, + dragstart: 1, + dragenter: 1, + dragover: 1, + dragleave: 1, + dragend: 1, + drop: 1, + error: 1, + focus: 1, + key: 1, + keydown: 1, + keypress: 1, + keyup: 1, + load: 1, + message: 1, + mousedown: 1, + mouseenter: 1, + mouseleave: 1, + mousemove: 1, + mousemultiwheel: 1, + mouseout: 1, + mouseover: 1, + mouseup: 1, + mousewheel: 1, + orientationchange: 1, + reset: 1, + resize: 1, + select: 1, + selectstart: 1, + submit: 1, + scroll: 1, + textInput: 1, + unload: 1 }; // Add custom event adaptors to this list. This will make it so // that delegate, key, available, contentready, etc all will // be available through Node.on -Y.mix(Node.DOM_EVENTS, Y.Env.evt.plugins); +Y.mix(Y_Node.DOM_EVENTS, Y.Env.evt.plugins); -Node._instances = {}; +/** + * A list of Node instances that have been created + * @private + * @property _instances + * @static + * + */ +Y_Node._instances = {}; /** * Retrieves the DOM node bound to a Node instance - * @method Node.getDOMNode + * @method getDOMNode * @static * * @param {Y.Node || HTMLNode} node The Node instance or an HTMLNode * @return {HTMLNode} The DOM node bound to the Node instance. If a DOM node is passed * as the node argument, it is simply returned. */ -Node.getDOMNode = function(node) { +Y_Node.getDOMNode = function(node) { if (node) { return (node.nodeType) ? node : node._node || null; } return null; }; - -Node.scrubVal = function(val, node) { - if (node && val) { // only truthy values are risky - if (typeof val === 'object' || typeof val === 'function') { // safari nodeList === function - if (NODE_TYPE in val || Y.DOM.isWindow(val)) {// node || window - val = Node.get(val); + +/** + * Checks Node return values and wraps DOM Nodes as Y.Node instances + * and DOM Collections / Arrays as Y.NodeList instances. + * Other return values just pass thru. If undefined is returned (e.g. no return) + * then the Node instance is returned for chainability. + * @method scrubVal + * @static + * + * @param {any} node The Node instance or an HTMLNode + * @return {Y.Node | Y.NodeList | any} Depends on what is returned from the DOM node. + */ +Y_Node.scrubVal = function(val, node) { + if (val) { // only truthy values are risky + if (typeof val == 'object' || typeof val == 'function') { // safari nodeList === function + if (NODE_TYPE in val || Y_DOM.isWindow(val)) {// node || window + val = Y.one(val); } else if ((val.item && !val._nodes) || // dom collection or Node instance (val[0] && val[0][NODE_TYPE])) { // array of DOM Nodes val = Y.all(val); } } - } else if (val === undefined) { + } else if (typeof val === 'undefined') { val = node; // for chaining + } else if (val === null) { + val = null; // IE: DOM null not the same as null } return val; }; -Node.addMethod = function(name, fn, context) { - if (name && fn && typeof fn === 'function') { - Node.prototype[name] = function() { - context = context || this; - var args = Y.Array(arguments), +/** + * Adds methods to the Y.Node prototype, routing through scrubVal. + * @method addMethod + * @static + * + * @param {String} name The name of the method to add + * @param {Function} fn The function that becomes the method + * @param {Object} context An optional context to call the method with + * (defaults to the Node instance) + * @return {any} Depends on what is returned from the DOM node. + */ +Y_Node.addMethod = function(name, fn, context) { + if (name && fn && typeof fn == 'function') { + Y_Node.prototype[name] = function() { + var args = _slice.call(arguments), + node = this, ret; - if (args[0] && args[0] instanceof Node) { + if (args[0] && Y.instanceOf(args[0], Y_Node)) { args[0] = args[0]._node; } - if (args[1] && args[1] instanceof Node) { + if (args[1] && Y.instanceOf(args[1], Y_Node)) { args[1] = args[1]._node; } - args.unshift(this._node); - ret = Node.scrubVal(fn.apply(context, args), this); + args.unshift(node._node); + + ret = fn.apply(node, args); + + if (ret) { // scrub truthy + ret = Y_Node.scrubVal(ret, node); + } + + (typeof ret != 'undefined') || (ret = node); return ret; }; } else { } }; -Node.importMethod = function(host, name, altName) { - if (typeof name === 'string') { +/** + * Imports utility methods to be added as Y.Node methods. + * @method importMethod + * @static + * + * @param {Object} host The object that contains the method to import. + * @param {String} name The name of the method to import + * @param {String} altName An optional name to use in place of the host name + * @param {Object} context An optional context to call the method with + */ +Y_Node.importMethod = function(host, name, altName) { + if (typeof name == 'string') { altName = altName || name; - Node.addMethod(altName, host[name], host); + Y_Node.addMethod(altName, host[name], host); } else { - Y.each(name, function(n) { - Node.importMethod(host, n); + Y.Array.each(name, function(n) { + Y_Node.importMethod(host, n); }); } }; /** * Returns a single Node instance bound to the node or the - * first element matching the given selector. + * first element matching the given selector. Returns null if no match found. + * Note: For chaining purposes you may want to + * use Y.all, which returns a NodeList when no match is found. * @method Y.one * @static - * @param {String | HTMLElement} node a node or Selector - * @param {Y.Node || HTMLElement} doc an optional document to scan. Defaults to Y.config.doc. + * @param {String | HTMLElement} node a node or Selector + * @return {Y.Node | null} a Node instance or null if no match found. */ -Node.one = function(node) { +Y_Node.one = function(node) { var instance = null, cachedNode, uid; if (node) { - if (typeof node === 'string') { + if (typeof node == 'string') { if (node.indexOf('doc') === 0) { // doc OR document node = Y.config.doc; } else if (node.indexOf('win') === 0) { // win OR window @@ -219,46 +305,44 @@ Node.one = function(node) { if (!node) { return null; } - } else if (node instanceof Node) { + } else if (Y.instanceOf(node, Y_Node)) { return node; // NOTE: return } - uid = node._yuid; - instance = Node._instances[uid]; // reuse exising instances - cachedNode = instance ? instance._node : null; - if (!instance || (cachedNode && node !== cachedNode)) { // new Node when nodes don't match - instance = new Node(node); + if (node.nodeType || Y.DOM.isWindow(node)) { // avoid bad input (numbers, boolean, etc) + uid = (node.uniqueID && node.nodeType !== 9) ? node.uniqueID : node._yuid; + instance = Y_Node._instances[uid]; // reuse exising instances + cachedNode = instance ? instance._node : null; + if (!instance || (cachedNode && node !== cachedNode)) { // new Node when nodes don't match + instance = new Y_Node(node); + } } } return instance; }; /** - * Returns a single Node instance bound to the node or the - * first element matching the given selector. - * @method Y.get - * @deprecated Use Y.one + * Returns a new dom node using the provided markup string. + * @method create * @static - * @param {String | HTMLElement} node a node or Selector - * @param {Y.Node || HTMLElement} doc an optional document to scan. Defaults to Y.config.doc. + * @param {String} html The markup used to create the element + * @param {HTMLDocument} doc An optional document context + * @return {Node} A Node instance bound to a DOM node or fragment */ -Node.get = function() { - return Node.one.apply(Node, arguments); +Y_Node.create = function(html, doc) { + if (doc && doc._node) { + doc = doc._node; + } + return Y.one(Y_DOM.create(html, doc)); }; /** - * Creates a new dom node using the provided markup string. - * @method create + * Static collection of configuration attributes for special handling + * @property ATTRS * @static - * @param {String} html The markup used to create the element - * @param {HTMLDocument} doc An optional document context - * @return {Node} A Node instance bound to a DOM node or fragment + * @type object */ -Node.create = function() { - return Node.get(Y.DOM.create.apply(Y.DOM, arguments)); -}; - -Node.ATTRS = { +Y_Node.ATTRS = { /** * Allows for getting and setting the text of an element. * Formatting is preserved and special characters are treated literally. @@ -267,11 +351,11 @@ Node.ATTRS = { */ text: { getter: function() { - return Y.DOM.getText(this._node); + return Y_DOM.getText(this._node); }, setter: function(content) { - Y.DOM.setText(this._node, content); + Y_DOM.setText(this._node, content); return content; } }, @@ -282,15 +366,6 @@ Node.ATTRS = { } }, - // IE: elements collection is also FORM node which trips up scrubVal. - // preconverting to NodeList - // TODO: break out for IE only - 'elements': { - getter: function() { - return Y.all(this._node.elements); - } - }, - /** * Returns a NodeList instance of all HTMLElement children. * @readOnly @@ -319,29 +394,26 @@ Node.ATTRS = { value: { getter: function() { - return Y.DOM.getValue(this._node); + return Y_DOM.getValue(this._node); }, setter: function(val) { - Y.DOM.setValue(this._node, val); - return val; - } - }, - - data: { - getter: function() { - return this._data; - }, - - setter: function(val) { - this._data = val; + Y_DOM.setValue(this._node, val); return val; } } }; -// call with instance context -Node.DEFAULT_SETTER = function(name, val) { +/** + * The default setter for DOM properties + * Called with instance context (this === the Node instance) + * @method DEFAULT_SETTER + * @static + * @param {String} name The attribute/property being set + * @param {any} val The value to be set + * @return {any} The value + */ +Y_Node.DEFAULT_SETTER = function(name, val) { var node = this._stateProxy, strPath; @@ -350,55 +422,75 @@ Node.DEFAULT_SETTER = function(name, val) { name = name.split(DOT); // only allow when defined on node Y.Object.setValue(node, name, val); - } else if (node[name] !== undefined) { // pass thru DOM properties + } else if (typeof node[name] != 'undefined') { // pass thru DOM properties node[name] = val; } return val; }; -// call with instance context -Node.DEFAULT_GETTER = function(name) { +/** + * The default getter for DOM properties + * Called with instance context (this === the Node instance) + * @method DEFAULT_GETTER + * @static + * @param {String} name The attribute/property to look up + * @return {any} The current value + */ +Y_Node.DEFAULT_GETTER = function(name) { var node = this._stateProxy, val; if (name.indexOf && name.indexOf(DOT) > -1) { val = Y.Object.getValue(node, name.split(DOT)); - } else if (node[name] !== undefined) { // pass thru from DOM + } else if (typeof node[name] != 'undefined') { // pass thru from DOM val = node[name]; } return val; }; -Y.augment(Node, Y.Event.Target); +// Basic prototype augment - no lazy constructor invocation. +Y.mix(Y_Node, Y.EventTarget, false, null, 1); -Y.mix(Node.prototype, { +Y.mix(Y_Node.prototype, { +/** + * The method called when outputting Node instances as strings + * @method toString + * @return {String} A string representation of the Node instance + */ toString: function() { - var str = '', - errorMsg = this[UID] + ': not bound to a node', - node = this._node; + var str = this[UID] + ': not bound to a node', + node = this._node, + attrs, id, className; if (node) { - str += node[NODE_NAME]; - if (node.id) { - str += '#' + node.id; + attrs = node.attributes; + id = (attrs && attrs.id) ? node.getAttribute('id') : null; + className = (attrs && attrs.className) ? node.getAttribute('className') : null; + str = node[NODE_NAME]; + + if (id) { + str += '#' + id; } - if (node.className) { - str += '.' + node.className.replace(' ', '.'); + if (className) { + str += '.' + className.replace(' ', '.'); } // TODO: add yuid? str += ' ' + this[UID]; } - return str || errorMsg; + return str; }, /** - * Returns an attribute value on the Node instance + * Returns an attribute value on the Node instance. + * Unless pre-configured (via Node.ATTRS), get hands + * off to the underlying DOM node. Only valid + * attributes/properties for the node will be set. * @method get - * @param {String} attr The attribute to be set + * @param {String} attr The attribute * @return {any} The current value of the attribute */ get: function(attr) { @@ -411,21 +503,30 @@ Y.mix(Node.prototype, { } if (val) { - val = Y.Node.scrubVal(val, this); + val = Y_Node.scrubVal(val, this); + } else if (val === null) { + val = null; // IE: DOM null is not true null (even though they ===) } return val; }, + /** + * Helper method for get. + * @method _get + * @private + * @param {String} attr The attribute + * @return {any} The current value of the attribute + */ _get: function(attr) { - var attrConfig = Node.ATTRS[attr], + var attrConfig = Y_Node.ATTRS[attr], val; if (attrConfig && attrConfig.getter) { val = attrConfig.getter.call(this); - } else if (Node.re_aria.test(attr)) { - val = this._node.getAttribute(attr, 2); + } else if (Y_Node.re_aria.test(attr)) { + val = this._node.getAttribute(attr, 2); } else { - val = Node.DEFAULT_GETTER.apply(this, arguments); + val = Y_Node.DEFAULT_GETTER.apply(this, arguments); } return val; @@ -433,23 +534,27 @@ Y.mix(Node.prototype, { /** * Sets an attribute on the Node instance. + * Unless pre-configured (via Node.ATTRS), set hands + * off to the underlying DOM node. Only valid + * attributes/properties for the node will be set. + * To set custom attributes use setAttribute. * @method set - * @param {String} attr The attribute to be set. - * @param {any} val The value to set the attribute to. + * @param {String} attr The attribute to be set. + * @param {any} val The value to set the attribute to. * @chainable */ set: function(attr, val) { - var attrConfig = Node.ATTRS[attr]; + var attrConfig = Y_Node.ATTRS[attr]; if (this._setAttr) { // use Attribute imple this._setAttr.apply(this, arguments); } else { // use setters inline if (attrConfig && attrConfig.setter) { - attrConfig.setter.call(this, val); - } else if (Node.re_aria.test(attr)) { // special case Aria + attrConfig.setter.call(this, val, attr); + } else if (Y_Node.re_aria.test(attr)) { // special case Aria this._node.setAttribute(attr, val); } else { - Node.DEFAULT_SETTER.apply(this, arguments); + Y_Node.DEFAULT_SETTER.apply(this, arguments); } } @@ -457,9 +562,9 @@ Y.mix(Node.prototype, { }, /** - * Sets multiple attributes. + * Sets multiple attributes. * @method setAttrs - * @param {Object} attrMap an object of name/value pairs to set + * @param {Object} attrMap an object of name/value pairs to set * @chainable */ setAttrs: function(attrMap) { @@ -467,7 +572,7 @@ Y.mix(Node.prototype, { this._setAttrs(attrMap); } else { // use setters inline Y.Object.each(attrMap, function(v, n) { - this.set(n, v); + this.set(n, v); }, this); } @@ -475,9 +580,9 @@ Y.mix(Node.prototype, { }, /** - * Returns an object containing the values for the requested attributes. + * Returns an object containing the values for the requested attributes. * @method getAttrs - * @param {Array} attrs an array of attributes to get values + * @param {Array} attrs an array of attributes to get values * @return {Object} An object with attribute name/value pairs. */ getAttrs: function(attrs) { @@ -486,7 +591,7 @@ Y.mix(Node.prototype, { this._getAttrs(attrs); } else { // use setters inline Y.Array.each(attrs, function(v, n) { - ret[v] = this.get(v); + ret[v] = this.get(v); }, this); } @@ -494,24 +599,25 @@ Y.mix(Node.prototype, { }, /** - * Creates a new Node using the provided markup string. + * Creates a new Node using the provided markup string. * @method create * @param {String} html The markup used to create the element - * @param {HTMLDocument} doc An optional document context - * @return {Node} A Node instance bound to a DOM node or fragment + * @param {HTMLDocument} doc An optional document context + * @return {Node} A Node instance bound to a DOM node or fragment */ - create: Node.create, + create: Y_Node.create, /** * Compares nodes to determine if they match. * Node instances can be compared to each other and/or HTMLElements. * @method compareTo * @param {HTMLElement | Node} refNode The reference node to compare to the node. - * @return {Boolean} True if the nodes match, false if they do not. + * @return {Boolean} True if the nodes match, false if they do not. */ compareTo: function(refNode) { var node = this._node; - if (refNode instanceof Y.Node) { + + if (Y.instanceOf(refNode, Y_Node)) { refNode = refNode._node; } return node === refNode; @@ -521,21 +627,21 @@ Y.mix(Node.prototype, { * Determines whether the node is appended to the document. * @method inDoc * @param {Node|HTMLElement} doc optional An optional document to check against. - * Defaults to current document. - * @return {Boolean} Whether or not this node is appended to the document. + * Defaults to current document. + * @return {Boolean} Whether or not this node is appended to the document. */ inDoc: function(doc) { var node = this._node; doc = (doc) ? doc._node || doc : node[OWNER_DOCUMENT]; if (doc.documentElement) { - return Y.DOM.contains(doc.documentElement, node); + return Y_DOM.contains(doc.documentElement, node); } }, getById: function(id) { var node = this._node, - ret = Y.DOM.byId(id, node[OWNER_DOCUMENT]); - if (ret && Y.DOM.contains(node, ret)) { + ret = Y_DOM.byId(id, node[OWNER_DOCUMENT]); + if (ret && Y_DOM.contains(node, ret)) { ret = Y.one(ret); } else { ret = null; @@ -547,15 +653,28 @@ Y.mix(Node.prototype, { * Returns the nearest ancestor that passes the test applied by supplied boolean method. * @method ancestor * @param {String | Function} fn A selector string or boolean method for testing elements. + * @param {Boolean} testSelf optional Whether or not to include the element in the scan * If a function is used, it receives the current node being tested as the only argument. * @return {Node} The matching Node instance or null if not found */ - ancestor: function(fn) { - return Node.get(Y.DOM.elementByAxis(this._node, 'parentNode', _wrapFn(fn))); + ancestor: function(fn, testSelf) { + return Y.one(Y_DOM.ancestor(this._node, _wrapFn(fn), testSelf)); + }, + + /** + * Returns the ancestors that pass the test applied by supplied boolean method. + * @method ancestors + * @param {String | Function} fn A selector string or boolean method for testing elements. + * @param {Boolean} testSelf optional Whether or not to include the element in the scan + * If a function is used, it receives the current node being tested as the only argument. + * @return {NodeList} A NodeList instance containing the matching elements + */ + ancestors: function(fn, testSelf) { + return Y.all(Y_DOM.ancestors(this._node, _wrapFn(fn), testSelf)); }, /** - * Returns the previous matching sibling. + * Returns the previous matching sibling. * Returns the nearest element node sibling if no method provided. * @method previous * @param {String | Function} fn A selector or boolean method for testing elements. @@ -563,45 +682,46 @@ Y.mix(Node.prototype, { * @return {Node} Node instance or null if not found */ previous: function(fn, all) { - return Node.get(Y.DOM.elementByAxis(this._node, 'previousSibling', _wrapFn(fn), all)); - }, + return Y.one(Y_DOM.elementByAxis(this._node, 'previousSibling', _wrapFn(fn), all)); + }, /** - * Returns the next matching sibling. + * Returns the next matching sibling. * Returns the nearest element node sibling if no method provided. * @method next * @param {String | Function} fn A selector or boolean method for testing elements. * If a function is used, it receives the current node being tested as the only argument. * @return {Node} Node instance or null if not found */ - next: function(node, fn, all) { - return Node.get(Y.DOM.elementByAxis(this._node, 'nextSibling', _wrapFn(fn), all)); + next: function(fn, all) { + return Y.one(Y_DOM.elementByAxis(this._node, 'nextSibling', _wrapFn(fn), all)); }, - + /** - * Retrieves a Node instance of nodes based on the given CSS selector. - * @method one - * - * @param {string} selector The CSS selector to test against. - * @return {Node} A Node instance for the matching HTMLElement. + * Returns all matching siblings. + * Returns all siblings if no method provided. + * @method siblings + * @param {String | Function} fn A selector or boolean method for testing elements. + * If a function is used, it receives the current node being tested as the only argument. + * @return {NodeList} NodeList instance bound to found siblings */ - one: function(selector) { - return Y.one(Y.Selector.query(selector, this._node, true)); + siblings: function(fn) { + return Y.all(Y_DOM.siblings(this._node, _wrapFn(fn))); }, /** - * Retrieves a Node instance of nodes based on the given CSS selector. - * @method query - * @deprecated Use one() + * Retrieves a Node instance of nodes based on the given CSS selector. + * @method one + * * @param {string} selector The CSS selector to test against. * @return {Node} A Node instance for the matching HTMLElement. */ - query: function(selector) { - return this.one(selector); + one: function(selector) { + return Y.one(Y.Selector.query(selector, this._node, true)); }, /** - * Retrieves a nodeList based on the given CSS selector. + * Retrieves a nodeList based on the given CSS selector. * @method all * * @param {string} selector The CSS selector to test against. @@ -610,20 +730,10 @@ Y.mix(Node.prototype, { all: function(selector) { var nodelist = Y.all(Y.Selector.query(selector, this._node)); nodelist._query = selector; + nodelist._queryRoot = this._node; return nodelist; }, - /** - * Retrieves a nodeList based on the given CSS selector. - * @method queryAll - * @deprecated Use all() - * @param {string} selector The CSS selector to test against. - * @return {NodeList} A NodeList instance for the matching HTMLCollection/Array. - */ - queryAll: function(selector) { - return this.all(selector); - }, - // TODO: allow fn test /** * Test if the supplied node matches the supplied selector. @@ -640,15 +750,23 @@ Y.mix(Node.prototype, { * Removes the node from its parent. * Shortcut for myNode.get('parentNode').removeChild(myNode); * @method remove + * @param {Boolean} destroy whether or not to call destroy() on the node + * after removal. * @chainable * */ remove: function(destroy) { - var node = this._node; - node.parentNode.removeChild(node); + var node = this._node, + parentNode = node.parentNode; + + if (parentNode) { + parentNode.removeChild(node); + } + if (destroy) { - this.destroy(true); + this.destroy(); } + return this; }, @@ -657,40 +775,99 @@ Y.mix(Node.prototype, { * and does not change the node bound to the Node instance. * Shortcut for myNode.get('parentNode').replaceChild(newNode, myNode); * @method replace + * @param {Y.Node || HTMLNode} newNode Node to be inserted * @chainable * */ replace: function(newNode) { var node = this._node; - node.parentNode.replaceChild(newNode, node); + if (typeof newNode == 'string') { + newNode = Y_Node.create(newNode); + } + node.parentNode.replaceChild(Y_Node.getDOMNode(newNode), node); return this; }, + /** + * @method replaceChild + * @for Node + * @param {String | HTMLElement | Node} node Node to be inserted + * @param {HTMLElement | Node} refNode Node to be replaced + * @return {Node} The replaced node + */ + replaceChild: function(node, refNode) { + if (typeof node == 'string') { + node = Y_DOM.create(node); + } + + return Y.one(this._node.replaceChild(Y_Node.getDOMNode(node), Y_Node.getDOMNode(refNode))); + }, + + /** + * @method appendChild + * @param {String | HTMLElement | Node} node Node to be appended + * @return {Node} The appended node + */ + appendChild: function(node) { + return Y_Node.scrubVal(this._insert(node)); + }, + + /** + * @method insertBefore + * @param {String | HTMLElement | Node} newNode Node to be appended + * @param {HTMLElement | Node} refNode Node to be inserted before + * @return {Node} The inserted node + */ + insertBefore: function(newNode, refNode) { + return Y.Node.scrubVal(this._insert(newNode, refNode)); + }, + + /** + * Removes event listeners from the node and (optionally) its subtree + * @method purge + * @param {Boolean} recurse (optional) Whether or not to remove listeners from the + * node's subtree + * @param {String} type (optional) Only remove listeners of the specified type + * @chainable + * + */ purge: function(recurse, type) { Y.Event.purgeElement(this._node, recurse, type); + return this; }, - destroy: function(purge) { - delete Node._instances[this[UID]]; - if (purge) { - this.purge(true); - } + /** + * Nulls internal node references, removes any plugins and event listeners + * @method destroy + * @param {Boolean} recursivePurge (optional) Whether or not to remove listeners from the + * node's subtree (default is false) + * + */ + destroy: function(recursive) { + this.purge(); // TODO: only remove events add via this Node - if (this.unplug) { + if (this.unplug) { // may not be a PluginHost this.unplug(); } - this._node._yuid = null; + this.clearData(); + + if (recursive) { + this.all('*').destroy(); + } + this._node = null; this._stateProxy = null; + + delete Y_Node._instances[this[UID]]; }, /** - * Invokes a method on the Node instance + * Invokes a method on the Node instance * @method invoke * @param {String} method The name of the method to invoke - * @param {Any} a, b, c, etc. Arguments to invoke the method with. - * @return Whatever the underly method returns. + * @param {Any} a, b, c, etc. Arguments to invoke the method with. + * @return Whatever the underly method returns. * DOM Nodes and Collections return values * are converted to Node/NodeList instances. * @@ -699,131 +876,324 @@ Y.mix(Node.prototype, { var node = this._node, ret; - if (a && a instanceof Y.Node) { + if (a && Y.instanceOf(a, Y_Node)) { a = a._node; } - if (b && b instanceof Y.Node) { + if (b && Y.instanceOf(b, Y_Node)) { b = b._node; } - ret = node[method](a, b, c, d, e); - return Y.Node.scrubVal(ret, this); + ret = node[method](a, b, c, d, e); + return Y_Node.scrubVal(ret, this); }, /** - * Applies the given function to each Node in the NodeList. - * @method each - * @deprecated Use NodeList - * @param {Function} fn The function to apply - * @param {Object} context optional An optional context to apply the function with - * Default context is the NodeList instance + * Inserts the content before the reference node. + * @method insert + * @param {String | Y.Node | HTMLElement | Y.NodeList | HTMLCollection} content The content to insert + * @param {Int | Y.Node | HTMLElement | String} where The position to insert at. + * Possible "where" arguments + *
          + *
          Y.Node
          + *
          The Node to insert before
          + *
          HTMLElement
          + *
          The element to insert before
          + *
          Int
          + *
          The index of the child element to insert before
          + *
          "replace"
          + *
          Replaces the existing HTML
          + *
          "before"
          + *
          Inserts before the existing HTML
          + *
          "before"
          + *
          Inserts content before the node
          + *
          "after"
          + *
          Inserts content after the node
          + *
          * @chainable */ - each: function(fn, context) { - context = context || this; - return fn.call(context, this); + insert: function(content, where) { + this._insert(content, where); + return this; + }, + + _insert: function(content, where) { + var node = this._node, + ret = null; + + if (typeof where == 'number') { // allow index + where = this._node.childNodes[where]; + } else if (where && where._node) { // Node + where = where._node; + } + + if (content && typeof content != 'string') { // allow Node or NodeList/Array instances + content = content._node || content._nodes || content; + } + ret = Y_DOM.addHTML(node, content, where); + + return ret; }, /** - * Retrieves the Node instance at the given index. - * @method item - * @deprecated Use NodeList - * - * @param {Number} index The index of the target Node. - * @return {Node} The Node instance at the given index. + * Inserts the content as the firstChild of the node. + * @method prepend + * @param {String | Y.Node | HTMLElement} content The content to insert + * @chainable */ - item: function(index) { - return this; + prepend: function(content) { + return this.insert(content, 0); }, /** - * Returns the current number of items in the Node. - * @method size - * @deprecated Use NodeList - * @return {Int} The number of items in the Node. + * Inserts the content as the lastChild of the node. + * @method append + * @param {String | Y.Node | HTMLElement} content The content to insert + * @chainable */ - size: function() { - return this._node ? 1 : 0; + append: function(content) { + return this.insert(content, null); }, /** - * Inserts the content before the reference node. - * @method insert - * @param {String | Y.Node | HTMLElement} content The content to insert - * @param {Int | Y.Node | HTMLElement | String} where The position to insert at. + * Appends the node to the given node. + * @method appendTo + * @param {Y.Node | HTMLElement} node The node to append to * @chainable */ - insert: function(content, where) { - var node = this._node; + appendTo: function(node) { + Y.one(node).append(this); + return this; + }, + + /** + * Replaces the node's current content with the content. + * @method setContent + * @param {String | Y.Node | HTMLElement | Y.NodeList | HTMLCollection} content The content to insert + * @chainable + */ + setContent: function(content) { + this._insert(content, 'replace'); + return this; + }, - if (content) { - if (typeof where === 'number') { // allow index - where = this._node.childNodes[where]; + /** + * Returns the node's current content (e.g. innerHTML) + * @method getContent + * @return {String} The current content + */ + getContent: function(content) { + return this.get('innerHTML'); + }, + + /** + * @method swap + * @description Swap DOM locations with the given node. + * This does not change which DOM node each Node instance refers to. + * @param {Node} otherNode The node to swap with + * @chainable + */ + swap: Y.config.doc.documentElement.swapNode ? + function(otherNode) { + this._node.swapNode(Y_Node.getDOMNode(otherNode)); + } : + function(otherNode) { + otherNode = Y_Node.getDOMNode(otherNode); + var node = this._node, + parent = otherNode.parentNode, + nextSibling = otherNode.nextSibling; + + if (nextSibling === node) { + parent.insertBefore(node, otherNode); + } else if (otherNode === node.nextSibling) { + parent.insertBefore(otherNode, node); + } else { + node.parentNode.replaceChild(otherNode, node); + Y_DOM.addHTML(parent, node, nextSibling); } + return this; + }, - if (typeof content !== 'string') { // allow Node or NodeList/Array instances - if (content._node) { // Node - content = content._node; - } else if (content._nodes || (!content.nodeType && content.length)) { // NodeList or Array - Y.each(content._nodes, function(n) { - Y.DOM.addHTML(node, n, where); - }); - return this; // NOTE: early return - } + /** + * @method getData + * @description Retrieves arbitrary data stored on a Node instance. + * This is not stored with the DOM node. + * @param {string} name Optional name of the data field to retrieve. + * If no name is given, all data is returned. + * @return {any | Object} Whatever is stored at the given field, + * or an object hash of all fields. + */ + getData: function(name) { + var ret; + this._data = this._data || {}; + if (arguments.length) { + ret = this._data[name]; + } else { + ret = this._data; + } + + return ret; + + }, + + /** + * @method setData + * @description Stores arbitrary data on a Node instance. + * This is not stored with the DOM node. + * @param {string} name The name of the field to set. If no name + * is given, name is treated as the data and overrides any existing data. + * @param {any} val The value to be assigned to the field. + * @chainable + */ + setData: function(name, val) { + this._data = this._data || {}; + if (arguments.length > 1) { + this._data[name] = val; + } else { + this._data = name; + } + + return this; + }, + + /** + * @method clearData + * @description Clears stored data. + * @param {string} name The name of the field to clear. If no name + * is given, all data is cleared. + * @chainable + */ + clearData: function(name) { + if ('_data' in this) { + if (name) { + delete this._data[name]; + } else { + delete this._data; } - Y.DOM.addHTML(node, content, where); } + return this; }, + hasMethod: function(method) { + var node = this._node; + return !!(node && method in node && + typeof node[method] != 'unknown' && + (typeof node[method] == 'function' || + String(node[method]).indexOf('function') === 1)); // IE reports as object, prepends space + }, + + SHOW_TRANSITION: null, + HIDE_TRANSITION: null, + /** - * Inserts the content as the firstChild of the node. - * @method prepend - * @param {String | Y.Node | HTMLElement} content The content to insert + * Makes the node visible. + * If the "transition" module is loaded, show optionally + * animates the showing of the node using either the default + * transition effect ('fadeIn'), or the given named effect. + * @method show + * @param {String} name A named Transition effect to use as the show effect. + * @param {Object} config Options to use with the transition. + * @param {Function} callback An optional function to run after the transition completes. * @chainable */ - prepend: function(content) { - return this.insert(content, 0); + show: function(callback) { + callback = arguments[arguments.length - 1]; + this.toggleView(true, callback); + return this; }, /** - * Inserts the content as the lastChild of the node. - * @method append - * @param {String | Y.Node | HTMLElement} content The content to insert + * The implementation for showing nodes. + * Default is to toggle the style.display property. + * @protected * @chainable */ - append: function(content) { - return this.insert(content, null); + _show: function() { + this.setStyle('display', ''); + + }, + + _isHidden: function() { + return Y.DOM.getStyle(this._node, 'display') === 'none'; + }, + + toggleView: function(on, callback) { + this._toggleView.apply(this, arguments); + }, + + _toggleView: function(on, callback) { + callback = arguments[arguments.length - 1]; + + // base on current state if not forcing + if (typeof on != 'boolean') { + on = (this._isHidden()) ? 1 : 0; + } + + if (on) { + this._show(); + } else { + this._hide(); + } + + if (typeof callback == 'function') { + callback.call(this); + } + + return this; }, /** - * Replaces the node's current content with the content. - * @method setContent - * @param {String | Y.Node | HTMLElement} content The content to insert + * Hides the node. + * If the "transition" module is loaded, hide optionally + * animates the hiding of the node using either the default + * transition effect ('fadeOut'), or the given named effect. + * @method hide + * @param {String} name A named Transition effect to use as the show effect. + * @param {Object} config Options to use with the transition. + * @param {Function} callback An optional function to run after the transition completes. * @chainable */ - setContent: function(content) { - Y.DOM.addHTML(this._node, content, 'replace'); + hide: function(callback) { + callback = arguments[arguments.length - 1]; + this.toggleView(false, callback); return this; }, - // TODO: need this? - hasMethod: function(method) { - var node = this._node; - return (node && (typeof node === 'function')); + /** + * The implementation for hiding nodes. + * Default is to toggle the style.display property. + * @protected + * @chainable + */ + _hide: function() { + this.setStyle('display', 'none'); + }, + + isFragment: function() { + return (this.get('nodeType') === 11); + }, + + /** + * Removes all of the child nodes from the node. + * @param {Boolean} destroy Whether the nodes should also be destroyed. + * @chainable + */ + empty: function(destroy) { + this.get('childNodes').remove(destroy); + return this; } + }, true); -Y.Node = Node; -Y.get = Y.Node.get; +Y.Node = Y_Node; Y.one = Y.Node.one; /** * The NodeList module provides support for managing collections of Nodes. * @module node * @submodule nodelist - */ + */ /** * The NodeList class provides a wrapper for manipulating DOM NodeLists. @@ -835,17 +1205,32 @@ Y.one = Y.Node.one; */ var NodeList = function(nodes) { - if (typeof nodes === 'string') { + var tmp = []; + if (typeof nodes === 'string') { // selector query this._query = nodes; nodes = Y.Selector.query(nodes); - } else { + } else if (nodes.nodeType || Y_DOM.isWindow(nodes)) { // domNode || window + nodes = [nodes]; + } else if (Y.instanceOf(nodes, Y.Node)) { + nodes = [nodes._node]; + } else if (Y.instanceOf(nodes[0], Y.Node)) { // allow array of Y.Nodes + Y.Array.each(nodes, function(node) { + if (node._node) { + tmp.push(node._node); + } + }); + nodes = tmp; + } else { // array of domNodes or domNodeList (no mixed array of Y.Node/domNodes) nodes = Y.Array(nodes, 0, true); } - NodeList._instances[Y.stamp(this)] = this; + /** + * The underlying array of DOM nodes bound to the Y.NodeList instance + * @property _nodes + * @private + */ this._nodes = nodes; }; -// end "globals" NodeList.NAME = 'NodeList'; @@ -854,15 +1239,13 @@ NodeList.NAME = 'NodeList'; * @method NodeList.getDOMNodes * @static * - * @param {Y.NodeList} node The NodeList instance + * @param {Y.NodeList} nodelist The NodeList instance * @return {Array} The array of DOM nodes bound to the NodeList */ -NodeList.getDOMNodes = function(nodeList) { - return nodeList._nodes; +NodeList.getDOMNodes = function(nodelist) { + return (nodelist && nodelist._nodes) ? nodelist._nodes : nodelist; }; -NodeList._instances = []; - NodeList.each = function(instance, fn, context) { var nodes = instance._nodes; if (nodes && nodes.length) { @@ -878,7 +1261,7 @@ NodeList.addMethod = function(name, fn, context) { args = arguments; Y.Array.each(this._nodes, function(node) { - var UID = '_yuid', + var UID = (node.uniqueID && node.nodeType !== 9 ) ? 'uniqueID' : '_yuid', instance = Y.Node._instances[node[UID]], ctx, result; @@ -905,7 +1288,7 @@ NodeList.importMethod = function(host, name, altName) { altName = altName || name; NodeList.addMethod(name, host[name]); } else { - Y.each(name, function(n) { + Y.Array.each(name, function(n) { NodeList.importMethod(host, n); }); } @@ -925,7 +1308,7 @@ NodeList._getTempNode = function(node) { Y.mix(NodeList.prototype, { /** - * Retrieves the Node instance at the given index. + * Retrieves the Node instance at the given index. * @method item * * @param {Number} index The index of the target Node. @@ -986,8 +1369,8 @@ Y.mix(NodeList.prototype, { }, /** - * Creates a documenFragment from the nodes bound to the NodeList instance - * @method toDocFrag + * Creates a documenFragment from the nodes bound to the NodeList instance + * @method toFrag * @return Node a Node instance bound to the documentFragment */ toFrag: function() { @@ -1009,7 +1392,7 @@ Y.mix(NodeList.prototype, { * Filters the NodeList instance down to only nodes matching the given selector. * @method filter * @param {String} selector The selector to filter against - * @return {NodeList} NodeList containing the updated collection + * @return {NodeList} NodeList containing the updated collection * @see Selector */ filter: function(selector) { @@ -1018,13 +1401,13 @@ Y.mix(NodeList.prototype, { /** - * Creates a new NodeList containing all nodes at every n indices, where + * Creates a new NodeList containing all nodes at every n indices, where * remainder n % index equals r. * (zero-based index). * @method modulus * @param {Int} n The offset to use (return every nth node) - * @param {Int} r An optional remainder to use with the modulus operation (defaults to zero) - * @return {NodeList} NodeList containing the updated collection + * @param {Int} r An optional remainder to use with the modulus operation (defaults to zero) + * @return {NodeList} NodeList containing the updated collection */ modulus: function(n, r) { r = r || 0; @@ -1042,7 +1425,7 @@ Y.mix(NodeList.prototype, { * Creates a new NodeList containing all nodes at odd indices * (zero-based index). * @method odd - * @return {NodeList} NodeList containing the updated collection + * @return {NodeList} NodeList containing the updated collection */ odd: function() { return this.modulus(2, 1); @@ -1050,82 +1433,121 @@ Y.mix(NodeList.prototype, { /** * Creates a new NodeList containing all nodes at even indices - * (zero-based index), including zero. + * (zero-based index), including zero. * @method even - * @return {NodeList} NodeList containing the updated collection + * @return {NodeList} NodeList containing the updated collection */ even: function() { return this.modulus(2); }, destructor: function() { - delete NodeList._instances[this[UID]]; }, /** - * Reruns the initial query, when created using a selector query + * Reruns the initial query, when created using a selector query * @method refresh * @chainable */ refresh: function() { var doc, - nodes = this._nodes; - if (this._query) { - if (nodes && nodes[0] && nodes[0].ownerDocument) { - doc = nodes[0].ownerDocument; + nodes = this._nodes, + query = this._query, + root = this._queryRoot; + + if (query) { + if (!root) { + if (nodes && nodes[0] && nodes[0].ownerDocument) { + root = nodes[0].ownerDocument; + } } - this._nodes = Y.Selector.query(this._query, doc || Y.config.doc); + this._nodes = Y.Selector.query(query, root); } return this; }, + _prepEvtArgs: function(type, fn, context) { + // map to Y.on/after signature (type, fn, nodes, context, arg1, arg2, etc) + var args = Y.Array(arguments, 0, true); + + if (args.length < 2) { // type only (event hash) just add nodes + args[2] = this._nodes; + } else { + args.splice(2, 0, this._nodes); + } + + args[3] = context || this; // default to NodeList instance as context + + return args; + }, + /** - * Applies an event listener to each Node bound to the NodeList. + * Applies an event listener to each Node bound to the NodeList. * @method on * @param {String} type The event being listened for * @param {Function} fn The handler to call when the event fires * @param {Object} context The context to call the handler with. - * Default is the NodeList instance. - * @return {Object} Returns an event handle that can later be use to detach(). + * Default is the NodeList instance. + * @param {Object} context The context to call the handler with. + * param {mixed} arg* 0..n additional arguments to supply to the subscriber + * when the event fires. + * @return {Object} Returns an event handle that can later be use to detach(). * @see Event.on */ on: function(type, fn, context) { - var args = Y.Array(arguments, 0, true); - args.splice(2, 0, this._nodes); - args[3] = context || this; - return Y.on.apply(Y, args); + return Y.on.apply(Y, this._prepEvtArgs.apply(this, arguments)); }, /** - * Applies an event listener to each Node bound to the NodeList. + * Applies an one-time event listener to each Node bound to the NodeList. + * @method once + * @param {String} type The event being listened for + * @param {Function} fn The handler to call when the event fires + * @param {Object} context The context to call the handler with. + * Default is the NodeList instance. + * @return {Object} Returns an event handle that can later be use to detach(). + * @see Event.on + */ + once: function(type, fn, context) { + return Y.once.apply(Y, this._prepEvtArgs.apply(this, arguments)); + }, + + /** + * Applies an event listener to each Node bound to the NodeList. * The handler is called only after all on() handlers are called * and the event is not prevented. * @method after * @param {String} type The event being listened for * @param {Function} fn The handler to call when the event fires * @param {Object} context The context to call the handler with. - * Default is the NodeList instance. - * @return {Object} Returns an event handle that can later be use to detach(). + * Default is the NodeList instance. + * @return {Object} Returns an event handle that can later be use to detach(). * @see Event.on */ after: function(type, fn, context) { - var args = Y.Array(arguments, 0, true); - args.splice(2, 0, this._nodes); - args[3] = context || this; - return Y.after.apply(Y, args); + return Y.after.apply(Y, this._prepEvtArgs.apply(this, arguments)); }, /** * Returns the current number of items in the NodeList. * @method size - * @return {Int} The number of items in the NodeList. + * @return {Int} The number of items in the NodeList. */ size: function() { return this._nodes.length; }, + /** + * Determines if the instance is bound to any nodes + * @method isEmpty + * @return {Boolean} Whether or not the NodeList is bound to any nodes + */ + isEmpty: function() { + return this._nodes.length < 1; + }, + toString: function() { var str = '', errorMsg = this[UID] + ': not bound to any nodes', @@ -1136,11 +1558,11 @@ Y.mix(NodeList.prototype, { node = nodes[0]; str += node[NODE_NAME]; if (node.id) { - str += '#' + node.id; + str += '#' + node.id; } if (node.className) { - str += '.' + node.className.replace(' ', '.'); + str += '.' + node.className.replace(' ', '.'); } if (nodes.length > 1) { @@ -1161,22 +1583,34 @@ NodeList.importMethod(Y.Node.prototype, [ */ 'append', + /** Called on each Node instance + * @method destroy + * @see Node.destroy + */ + 'destroy', + /** * Called on each Node instance * @method detach * @see Node.detach */ 'detach', - + /** Called on each Node instance * @method detachAll * @see Node.detachAll */ 'detachAll', + /** Called on each Node instance + * @method empty + * @see Node.empty + */ + 'empty', + /** Called on each Node instance * @method insert - * @see NodeInsert + * @see Node.insert */ 'insert', @@ -1202,7 +1636,35 @@ NodeList.importMethod(Y.Node.prototype, [ * @method setContent * @see Node.setContent */ - 'setContent' + 'setContent', + + /** + * Makes each node visible. + * If the "transition" module is loaded, show optionally + * animates the showing of the node using either the default + * transition effect ('fadeIn'), or the given named effect. + * @method show + * @param {String} name A named Transition effect to use as the show effect. + * @param {Object} config Options to use with the transition. + * @param {Function} callback An optional function to run after the transition completes. + * @chainable + */ + 'show', + + /** + * Hides each node. + * If the "transition" module is loaded, hide optionally + * animates the hiding of the node using either the default + * transition effect ('fadeOut'), or the given named effect. + * @method hide + * @param {String} name A named Transition effect to use as the show effect. + * @param {Object} config Options to use with the transition. + * @param {Function} callback An optional function to run after the transition completes. + * @chainable + */ + 'hide', + + 'toggleView' ]); // one-off implementation to convert array of Nodes to NodeList @@ -1256,33 +1718,7 @@ Y.Node.all = Y.all; Y.Array.each([ /** * Passes through to DOM method. - * @method replaceChild * @for Node - * @param {HTMLElement | Node} node Node to be inserted - * @param {HTMLElement | Node} refNode Node to be replaced - * @return {Node} The replaced node - */ - 'replaceChild', - - /** - * Passes through to DOM method. - * @method appendChild - * @param {HTMLElement | Node} node Node to be appended - * @return {Node} The appended node - */ - 'appendChild', - - /** - * Passes through to DOM method. - * @method insertBefore - * @param {HTMLElement | Node} newNode Node to be appended - * @param {HTMLElement | Node} refNode Node to be inserted before - * @return {Node} The inserted node - */ - 'insertBefore', - - /** - * Passes through to DOM method. * @method removeChild * @param {HTMLElement | Node} node Node to be removed * @return {Node} The removed node @@ -1371,7 +1807,16 @@ Y.Array.each([ * @method select * @chainable */ - 'select' + 'select', + + /** + * Passes through to DOM method. + * Only valid on TABLE elements + * @method createCaption + * @chainable + */ + 'createCaption' + ], function(method) { Y.Node.prototype[method] = function(arg1, arg2, arg3) { var ret = this.invoke(method, arg1, arg2, arg3); @@ -1379,9 +1824,9 @@ Y.Array.each([ }; }); -Node.importMethod(Y.DOM, [ +Y.Node.importMethod(Y.DOM, [ /** - * Determines whether the ndoe is an ancestor of another HTML element in the DOM hierarchy. + * Determines whether the node is an ancestor of another HTML element in the DOM hierarchy. * @method contains * @param {Node | HTMLElement} needle The possible node or descendent * @return {Boolean} Whether or not this node is the needle its ancestor @@ -1407,9 +1852,43 @@ Node.importMethod(Y.DOM, [ * @param {string} name The attribute name * @return {string} The attribute value */ - 'getAttribute' + 'getAttribute', + + /** + * Wraps the given HTML around the node. + * @method wrap + * @param {String} html The markup to wrap around the node. + * @chainable + */ + 'wrap', + + /** + * Removes the node's parent node. + * @method unwrap + * @chainable + */ + 'unwrap', + + /** + * Applies a unique ID to the node if none exists + * @method generateID + * @return {String} The existing or generated ID + */ + 'generateID' ]); +Y.NodeList.importMethod(Y.Node.prototype, [ +/** + * Allows getting attributes on DOM nodes, normalizing in some cases. + * This passes through to the DOM node, allowing for custom attributes. + * @method getAttribute + * @see Node + * @for NodeList + * @param {string} name The attribute name + * @return {string} The attribute value + */ + + 'getAttribute', /** * Allows setting attributes on DOM nodes, normalizing in some cases. * This passes through to the DOM node, allowing for custom attributes. @@ -1420,17 +1899,38 @@ Node.importMethod(Y.DOM, [ * @param {string} name The attribute name * @param {string} value The value to set */ - + 'setAttribute', + /** - * Allows getting attributes on DOM nodes, normalizing in some cases. + * Allows for removing attributes on DOM nodes. * This passes through to the DOM node, allowing for custom attributes. - * @method getAttribute + * @method removeAttribute * @see Node * @for NodeList - * @param {string} name The attribute name - * @return {string} The attribute value + * @param {string} name The attribute to remove + */ + 'removeAttribute', +/** + * Removes the parent node from node in the list. + * @method unwrap + * @chainable + */ + 'unwrap', +/** + * Wraps the given HTML around each node. + * @method wrap + * @param {String} html The markup to wrap around the node. + * @chainable + */ + 'wrap', + +/** + * Applies a unique ID to each node if none exists + * @method generateID + * @return {String} The existing or generated ID */ -Y.NodeList.importMethod(Y.Node.prototype, ['getAttribute', 'setAttribute']); + 'generateID' +]); (function(Y) { var methods = [ /** @@ -1438,7 +1938,7 @@ Y.NodeList.importMethod(Y.Node.prototype, ['getAttribute', 'setAttribute']); * @method hasClass * @for Node * @param {String} className the class name to search for - * @return {Array} An array of booleans for each node bound to the NodeList. + * @return {Boolean} Whether or not the element has the specified class */ 'hasClass', @@ -1472,6 +1972,7 @@ Y.NodeList.importMethod(Y.Node.prototype, ['getAttribute', 'setAttribute']); * If the className exists on the node it is removed, if it doesn't exist it is added. * @method toggleClass * @param {String} className the class name to be toggled + * @param {Boolean} force Option to force adding or removing the class. * @chainable */ 'toggleClass' @@ -1523,12 +2024,27 @@ Y.NodeList.importMethod(Y.Node.prototype, ['getAttribute', 'setAttribute']); Y.NodeList.importMethod(Y.Node.prototype, methods); })(Y); -if (!document.documentElement.hasAttribute) { // IE < 8 +if (!Y.config.doc.documentElement.hasAttribute) { // IE < 8 Y.Node.prototype.hasAttribute = function(attr) { - return Y.DOM.getAttribute(this._node, attr) !== ''; + if (attr === 'value') { + if (this.get('value') !== "") { // IE < 8 fails to populate specified when set in HTML + return true; + } + } + return !!(this._node.attributes[attr] && + this._node.attributes[attr].specified); }; } +// IE throws an error when calling focus() on an element that's invisible, not +// displayed, or disabled. +Y.Node.prototype.focus = function () { + try { + this._node.focus(); + } catch (e) { + } +}; + // IE throws error when setting input.type = 'hidden', // input.setAttribute('type', 'hidden') and input.attributes.type.value = 'hidden' Y.Node.ATTRS.type = { @@ -1556,5 +2072,126 @@ Y.Node.ATTRS.type = { _bypassProxy: true // don't update DOM when using with Attribute }; +if (Y.config.doc.createElement('form').elements.nodeType) { + // IE: elements collection is also FORM node which trips up scrubVal. + Y.Node.ATTRS.elements = { + getter: function() { + return this.all('input, textarea, button, select'); + } + }; +} + +Y.mix(Y.Node.ATTRS, { + offsetHeight: { + setter: function(h) { + Y.DOM.setHeight(this._node, h); + return h; + }, + + getter: function() { + return this._node.offsetHeight; + } + }, + + offsetWidth: { + setter: function(w) { + Y.DOM.setWidth(this._node, w); + return w; + }, + + getter: function() { + return this._node.offsetWidth; + } + } +}); + +Y.mix(Y.Node.prototype, { + sizeTo: function(w, h) { + var node; + if (arguments.length < 2) { + node = Y.one(w); + w = node.get('offsetWidth'); + h = node.get('offsetHeight'); + } + + this.setAttrs({ + offsetWidth: w, + offsetHeight: h + }); + } +}); +var Y_NodeList = Y.NodeList, + ArrayProto = Array.prototype, + ArrayMethods = [ + /** Returns a new NodeList combining the given NodeList(s) + * @for NodeList + * @method concat + * @param {NodeList | Array} valueN Arrays/NodeLists and/or values to + * concatenate to the resulting NodeList + * @return {NodeList} A new NodeList comprised of this NodeList joined with the input. + */ + 'concat', + /** Removes the first last from the NodeList and returns it. + * @for NodeList + * @method pop + * @return {Node} The last item in the NodeList. + */ + 'pop', + /** Adds the given Node(s) to the end of the NodeList. + * @for NodeList + * @method push + * @param {Node | DOMNode} nodeN One or more nodes to add to the end of the NodeList. + */ + 'push', + /** Removes the first item from the NodeList and returns it. + * @for NodeList + * @method shift + * @return {Node} The first item in the NodeList. + */ + 'shift', + /** Returns a new NodeList comprising the Nodes in the given range. + * @for NodeList + * @method slice + * @param {Number} begin Zero-based index at which to begin extraction. + As a negative index, start indicates an offset from the end of the sequence. slice(-2) extracts the second-to-last element and the last element in the sequence. + * @param {Number} end Zero-based index at which to end extraction. slice extracts up to but not including end. + slice(1,4) extracts the second element through the fourth element (elements indexed 1, 2, and 3). + As a negative index, end indicates an offset from the end of the sequence. slice(2,-1) extracts the third element through the second-to-last element in the sequence. + If end is omitted, slice extracts to the end of the sequence. + * @return {NodeList} A new NodeList comprised of this NodeList joined with the input. + */ + 'slice', + /** Changes the content of the NodeList, adding new elements while removing old elements. + * @for NodeList + * @method splice + * @param {Number} index Index at which to start changing the array. If negative, will begin that many elements from the end. + * @param {Number} howMany An integer indicating the number of old array elements to remove. If howMany is 0, no elements are removed. In this case, you should specify at least one new element. If no howMany parameter is specified (second syntax above, which is a SpiderMonkey extension), all elements after index are removed. + * {Node | DOMNode| element1, ..., elementN + The elements to add to the array. If you don't specify any elements, splice simply removes elements from the array. + * @return {NodeList} The element(s) removed. + */ + 'splice', + /** Adds the given Node(s) to the beginning of the NodeList. + * @for NodeList + * @method push + * @param {Node | DOMNode} nodeN One or more nodes to add to the NodeList. + */ + 'unshift' + ]; + + +Y.Array.each(ArrayMethods, function(name) { + Y_NodeList.prototype[name] = function() { + var args = [], + i = 0, + arg; + + while ((arg = arguments[i++])) { // use DOM nodes/nodeLists + args.push(arg._node || arg._nodes || arg); + } + return Y.Node.scrubVal(ArrayProto[name].apply(this._nodes, args)); + }; +}); + -}, '3.0.0' ,{requires:['dom-base', 'selector-css2', 'event-base']}); +}, '3.3.0' ,{requires:['dom-base', 'selector-css2', 'event-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-deprecated-min.js b/jssource/src_files/include/javascript/yui3/build/node/node-deprecated-min.js new file mode 100644 index 00000000..8b81cc0c --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/node/node-deprecated-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("node-deprecated",function(b){var a=b.Node;a.ATTRS.data={getter:function(){return this._dataVal;},setter:function(c){this._dataVal=c;return c;},value:null};b.get=a.get=function(){return a.one.apply(a,arguments);};b.mix(a.prototype,{query:function(c){return this.one(c);},queryAll:function(c){return this.all(c);},each:function(d,c){c=c||this;return d.call(c,this);},item:function(c){return this;},size:function(){return this._node?1:0;}});},"3.3.0",{requires:["node-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-deprecated.js b/jssource/src_files/include/javascript/yui3/build/node/node-deprecated.js new file mode 100644 index 00000000..7b02ff6e --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/node/node-deprecated.js @@ -0,0 +1,107 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('node-deprecated', function(Y) { + +var Y_Node = Y.Node; + +/* + * Flat data store for off-DOM usage + * @config data + * @type any + * @deprecated Use getData/setData + */ +Y_Node.ATTRS.data = { + getter: function() { + return this._dataVal; + }, + setter: function(val) { + this._dataVal = val; + return val; + }, + value: null +}; + +/** + * Returns a single Node instance bound to the node or the + * first element matching the given selector. + * @method Y.get + * @deprecated Use Y.one + * @static + * @param {String | HTMLElement} node a node or Selector + * @param {Y.Node || HTMLElement} doc an optional document to scan. Defaults to Y.config.doc. + */ +Y.get = Y_Node.get = function() { + return Y_Node.one.apply(Y_Node, arguments); +}; + + +Y.mix(Y_Node.prototype, { + /** + * Retrieves a Node instance of nodes based on the given CSS selector. + * @method query + * @deprecated Use one() + * @param {string} selector The CSS selector to test against. + * @return {Node} A Node instance for the matching HTMLElement. + */ + query: function(selector) { + return this.one(selector); + }, + + /** + * Retrieves a nodeList based on the given CSS selector. + * @method queryAll + * @deprecated Use all() + * @param {string} selector The CSS selector to test against. + * @return {NodeList} A NodeList instance for the matching HTMLCollection/Array. + */ + queryAll: function(selector) { + return this.all(selector); + }, + + /** + * Applies the given function to each Node in the NodeList. + * @method each + * @deprecated Use NodeList + * @param {Function} fn The function to apply + * @param {Object} context optional An optional context to apply the function with + * Default context is the NodeList instance + * @chainable + */ + each: function(fn, context) { + context = context || this; + return fn.call(context, this); + }, + + /** + * Retrieves the Node instance at the given index. + * @method item + * @deprecated Use NodeList + * + * @param {Number} index The index of the target Node. + * @return {Node} The Node instance at the given index. + */ + item: function(index) { + return this; + }, + + /** + * Returns the current number of items in the Node. + * @method size + * @deprecated Use NodeList + * @return {Int} The number of items in the Node. + */ + size: function() { + return this._node ? 1 : 0; + } + +}); + + + + +}, '3.3.0' ,{requires:['node-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-event-delegate-min.js b/jssource/src_files/include/javascript/yui3/build/node/node-event-delegate-min.js index 922741d4..2362e90a 100644 --- a/jssource/src_files/include/javascript/yui3/build/node/node-event-delegate-min.js +++ b/jssource/src_files/include/javascript/yui3/build/node/node-event-delegate-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("node-event-delegate",function(A){A.Node.prototype.delegate=function(F,E,B){var D=Array.prototype.slice.call(arguments,3),C=[F,E,A.Node.getDOMNode(this),B];C=C.concat(D);return A.delegate.apply(A,C);};},"3.0.0",{requires:["node-base","event-delegate","pluginhost"]}); \ No newline at end of file +YUI.add("node-event-delegate",function(a){a.Node.prototype.delegate=function(d){var c=a.Array(arguments,0,true),b=(a.Lang.isObject(d)&&!a.Lang.isArray(d))?1:2;c.splice(b,0,this._node);return a.delegate.apply(a,c);};},"3.3.0",{requires:["node-base","event-delegate"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-event-delegate.js b/jssource/src_files/include/javascript/yui3/build/node/node-event-delegate.js index d9b2ca1f..2ecd1228 100644 --- a/jssource/src_files/include/javascript/yui3/build/node/node-event-delegate.js +++ b/jssource/src_files/include/javascript/yui3/build/node/node-event-delegate.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('node-event-delegate', function(Y) { @@ -14,22 +14,48 @@ YUI.add('node-event-delegate', function(Y) { */ /** - * Functionality to make the node a delegated event container + *

          Sets up a delegation listener for an event occurring inside the Node. + * The delegated event will be verified against a supplied selector or + * filtering function to test if the event references at least one node that + * should trigger the subscription callback.

          + * + *

          Selector string filters will trigger the callback if the event originated + * from a node that matches it or is contained in a node that matches it. + * Function filters are called for each Node up the parent axis to the + * subscribing container node, and receive at each level the Node and the event + * object. The function should return true (or a truthy value) if that Node + * should trigger the subscription callback. Note, it is possible for filters + * to match multiple Nodes for a single event. In this case, the delegate + * callback will be executed for each matching Node.

          + * + *

          For each matching Node, the callback will be executed with its 'this' + * object set to the Node matched by the filter (unless a specific context was + * provided during subscription), and the provided event's + * currentTarget will also be set to the matching Node. The + * containing Node from which the subscription was originally made can be + * referenced as e.container. + * * @method delegate * @param type {String} the event type to delegate - * @param fn {Function} the function to execute - * @param selector {String} a selector that must match the target of the event. - * @return {Event.Handle} the detach handle + * @param fn {Function} the callback function to execute. This function + * will be provided the event object for the delegated event. + * @param spec {String|Function} a selector that must match the target of the + * event or a function to test target and its parents for a match + * @param context {Object} optional argument that specifies what 'this' refers to. + * @param args* {any} 0..n additional arguments to pass on to the callback function. + * These arguments will be added after the event object. + * @return {EventHandle} the detach handle * @for Node */ -Y.Node.prototype.delegate = function(type, fn, selector) { +Y.Node.prototype.delegate = function(type) { + + var args = Y.Array(arguments, 0, true), + index = (Y.Lang.isObject(type) && !Y.Lang.isArray(type)) ? 1 : 2; - var args = Array.prototype.slice.call(arguments, 3), - a = [type, fn, Y.Node.getDOMNode(this), selector]; - a = a.concat(args); + args.splice(index, 0, this._node); - return Y.delegate.apply(Y, a); + return Y.delegate.apply(Y, args); }; -}, '3.0.0' ,{requires:['node-base', 'event-delegate', 'pluginhost']}); +}, '3.3.0' ,{requires:['node-base', 'event-delegate']}); diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-event-html5-min.js b/jssource/src_files/include/javascript/yui3/build/node/node-event-html5-min.js new file mode 100644 index 00000000..5e3d0be9 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/node/node-event-html5-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("node-event-html5",function(a){a.mix(a.Node.DOM_EVENTS,{DOMActivate:1,DOMContentLoaded:1,afterprint:1,beforeprint:1,canplay:1,canplaythrough:1,durationchange:1,emptied:1,ended:1,formchange:1,forminput:1,hashchange:1,input:1,invalid:1,loadedmetadata:1,loadeddata:1,loadstart:1,offline:1,online:1,pagehide:1,pageshow:1,pause:1,play:1,playing:1,popstate:1,progress:1,ratechange:1,readystatechange:1,redo:1,seeking:1,seeked:1,show:1,stalled:1,suspend:1,timeupdate:1,undeo:1,volumechange:1,waiting:1});},"3.3.0",{requires:["node-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-event-html5.js b/jssource/src_files/include/javascript/yui3/build/node/node-event-html5.js new file mode 100644 index 00000000..07b1e41c --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/node/node-event-html5.js @@ -0,0 +1,52 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('node-event-html5', function(Y) { + +Y.mix(Y.Node.DOM_EVENTS, { + DOMActivate: 1, + DOMContentLoaded: 1, + afterprint: 1, + beforeprint: 1, + canplay: 1, + canplaythrough: 1, + durationchange: 1, + emptied: 1, + ended: 1, + formchange: 1, + forminput: 1, + hashchange: 1, + input: 1, + invalid: 1, + loadedmetadata: 1, + loadeddata: 1, + loadstart: 1, + offline: 1, + online: 1, + pagehide: 1, + pageshow: 1, + pause: 1, + play: 1, + playing: 1, + popstate: 1, + progress: 1, + ratechange: 1, + readystatechange: 1, + redo: 1, + seeking: 1, + seeked: 1, + show: 1, + stalled: 1, + suspend: 1, + timeupdate: 1, + undeo: 1, + volumechange: 1, + waiting: 1 +}); + + +}, '3.3.0' ,{requires:['node-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-event-simulate-min.js b/jssource/src_files/include/javascript/yui3/build/node/node-event-simulate-min.js index 78784826..67be5bbe 100644 --- a/jssource/src_files/include/javascript/yui3/build/node/node-event-simulate-min.js +++ b/jssource/src_files/include/javascript/yui3/build/node/node-event-simulate-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("node-event-simulate",function(A){A.Node.prototype.simulate=function(C,B){A.Event.simulate(A.Node.getDOMNode(this),C,B);};},"3.0.0",{requires:["node-base","event-simulate"]}); \ No newline at end of file +YUI.add("node-event-simulate",function(a){a.Node.prototype.simulate=function(c,b){a.Event.simulate(a.Node.getDOMNode(this),c,b);};},"3.3.0",{requires:["node-base","event-simulate"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-event-simulate.js b/jssource/src_files/include/javascript/yui3/build/node/node-event-simulate.js index 83e8debe..819ba19a 100644 --- a/jssource/src_files/include/javascript/yui3/build/node/node-event-simulate.js +++ b/jssource/src_files/include/javascript/yui3/build/node/node-event-simulate.js @@ -1,16 +1,15 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('node-event-simulate', function(Y) { -/* - * Functionality to simulate events. +/** + * Adds functionality to simulate events. * @module node - * @for Node * @submodule node-event-simulate */ @@ -19,8 +18,8 @@ YUI.add('node-event-simulate', function(Y) { * @param {String} type The type of event to simulate (i.e., "click"). * @param {Object} options (Optional) Extra options to copy onto the event object. * @return {void} + * @for Node * @method simulate - * @static */ Y.Node.prototype.simulate = function(type, options) { Y.Event.simulate(Y.Node.getDOMNode(this), type, options); @@ -28,4 +27,4 @@ YUI.add('node-event-simulate', function(Y) { -}, '3.0.0' ,{requires:['node-base', 'event-simulate']}); +}, '3.3.0' ,{requires:['node-base', 'event-simulate']}); diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-load-min.js b/jssource/src_files/include/javascript/yui3/build/node/node-load-min.js new file mode 100644 index 00000000..d3b1c8ad --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/node/node-load-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("node-load",function(a){a.Node.prototype._ioComplete=function(g,c,d){var b=d[0],h=d[1],e,f;if(c&&c.responseText){f=c.responseText;if(b){e=a.DOM.create(f);f=a.Selector.query(b,e);}this.setContent(f);}if(h){h.call(this,g,c);}};a.Node.prototype.load=function(d,b,e){if(typeof b=="function"){e=b;b=null;}var c={context:this,on:{complete:this._ioComplete},arguments:[b,e]};a.io(d,c);return this;};},"3.3.0",{requires:["node-base","io-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-load.js b/jssource/src_files/include/javascript/yui3/build/node/node-load.js new file mode 100644 index 00000000..932d07bd --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/node/node-load.js @@ -0,0 +1,73 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('node-load', function(Y) { + +/** + * Extended Node interface with an basic IO api. + * @module node + * @submodule node-load + */ + +/** + * The default IO complete handler. + * @method _ioComplete + * @protected + * @for Node + * @param {String} code The response code. + * @param {Object} response The response object. + * @param {Array} args An array containing the callback and selector + */ + +Y.Node.prototype._ioComplete = function(code, response, args) { + var selector = args[0], + callback = args[1], + tmp, + content; + + if (response && response.responseText) { + content = response.responseText; + if (selector) { + tmp = Y.DOM.create(content); + content = Y.Selector.query(selector, tmp); + } + this.setContent(content); + } + if (callback) { + callback.call(this, code, response); + } +}; + +/** + * Loads content from the given url and replaces the Node's + * existing content with it. + * @method load + * @param {String} html The markup to wrap around the node. + * @param {String} selector An optional selector representing subset + * @param {Function} callback An optional function to run after the content has been loaded. + * of the content. + * @chainable + */ +Y.Node.prototype.load = function(url, selector, callback) { + if (typeof selector == 'function') { + callback = selector; + selector = null; + } + var config = { + context: this, + on: { + complete: this._ioComplete + }, + arguments: [selector, callback] + }; + + Y.io(url, config); + return this; +} + + +}, '3.3.0' ,{requires:['node-base', 'io-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-min.js b/jssource/src_files/include/javascript/yui3/build/node/node-min.js index 063c2325..1f372887 100644 --- a/jssource/src_files/include/javascript/yui3/build/node/node-min.js +++ b/jssource/src_files/include/javascript/yui3/build/node/node-min.js @@ -1,10 +1,10 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("node-base",function(C){var G=".",E="nodeName",I="nodeType",B="ownerDocument",H="tagName",D="_yuid",F=function(L){var K=L[D];if(K&&F._instances[K]&&F._instances[K]._node!==L){L[D]=null;}K=C.stamp(L);if(!K){K=C.guid();}this[D]=K;this._node=L;F._instances[K]=this;this._stateProxy=L;if(this._initPlugins){this._initPlugins();}},J=function(L){var K=null;if(L){K=(typeof L==="string")?function(M){return C.Selector.test(M,L);}:function(M){return L(F.get(M));};}return K;};F.NAME="Node";F.re_aria=/^(?:role$|aria-)/;F.DOM_EVENTS={abort:true,beforeunload:true,blur:true,change:true,click:true,close:true,command:true,contextmenu:true,drag:true,dragstart:true,dragenter:true,dragover:true,dragleave:true,dragend:true,drop:true,dblclick:true,error:true,focus:true,keydown:true,keypress:true,keyup:true,load:true,message:true,mousedown:true,mousemove:true,mouseout:true,mouseover:true,mouseup:true,mousemultiwheel:true,mousewheel:true,submit:true,mouseenter:true,mouseleave:true,scroll:true,reset:true,resize:true,select:true,textInput:true,unload:true};C.mix(F.DOM_EVENTS,C.Env.evt.plugins);F._instances={};F.getDOMNode=function(K){if(K){return(K.nodeType)?K:K._node||null;}return null;};F.scrubVal=function(L,K){if(K&&L){if(typeof L==="object"||typeof L==="function"){if(I in L||C.DOM.isWindow(L)){L=F.get(L);}else{if((L.item&&!L._nodes)||(L[0]&&L[0][I])){L=C.all(L);}}}}else{if(L===undefined){L=K;}}return L;};F.addMethod=function(K,M,L){if(K&&M&&typeof M==="function"){F.prototype[K]=function(){L=L||this;var O=C.Array(arguments),N;if(O[0]&&O[0] instanceof F){O[0]=O[0]._node;}if(O[1]&&O[1] instanceof F){O[1]=O[1]._node;}O.unshift(this._node);N=F.scrubVal(M.apply(L,O),this);return N;};}else{}};F.importMethod=function(M,K,L){if(typeof K==="string"){L=L||K;F.addMethod(L,M[K],M);}else{C.each(K,function(N){F.importMethod(M,N);});}};F.one=function(N){var K=null,M,L;if(N){if(typeof N==="string"){if(N.indexOf("doc")===0){N=C.config.doc;}else{if(N.indexOf("win")===0){N=C.config.win;}else{N=C.Selector.query(N,null,true);}}if(!N){return null;}}else{if(N instanceof F){return N;}}L=N._yuid;K=F._instances[L];M=K?K._node:null;if(!K||(M&&N!==M)){K=new F(N);}}return K;};F.get=function(){return F.one.apply(F,arguments);};F.create=function(){return F.get(C.DOM.create.apply(C.DOM,arguments));};F.ATTRS={text:{getter:function(){return C.DOM.getText(this._node);},setter:function(K){C.DOM.setText(this._node,K);return K;}},"options":{getter:function(){return this._node.getElementsByTagName("option");}},"elements":{getter:function(){return C.all(this._node.elements);}},"children":{getter:function(){var N=this._node,M=N.children,O,L,K;if(!M){O=N.childNodes;M=[];for(L=0,K=O.length;L-1){N=K;K=K.split(G);C.Object.setValue(L,K,M);}else{if(L[K]!==undefined){L[K]=M;}}return M;};F.DEFAULT_GETTER=function(K){var L=this._stateProxy,M;if(K.indexOf&&K.indexOf(G)>-1){M=C.Object.getValue(L,K.split(G));}else{if(L[K]!==undefined){M=L[K];}}return M;};C.augment(F,C.Event.Target);C.mix(F.prototype,{toString:function(){var M="",L=this[D]+": not bound to a node",K=this._node;if(K){M+=K[E];if(K.id){M+="#"+K.id;}if(K.className){M+="."+K.className.replace(" ",".");}M+=" "+this[D];}return M||L;},get:function(K){var L;if(this._getAttr){L=this._getAttr(K);}else{L=this._get(K);}if(L){L=C.Node.scrubVal(L,this);}return L;},_get:function(K){var L=F.ATTRS[K],M;if(L&&L.getter){M=L.getter.call(this);}else{if(F.re_aria.test(K)){M=this._node.getAttribute(K,2);}else{M=F.DEFAULT_GETTER.apply(this,arguments);}}return M;},set:function(K,M){var L=F.ATTRS[K];if(this._setAttr){this._setAttr.apply(this,arguments);}else{if(L&&L.setter){L.setter.call(this,M);}else{if(F.re_aria.test(K)){this._node.setAttribute(K,M);}else{F.DEFAULT_SETTER.apply(this,arguments);}}}return this;},setAttrs:function(K){if(this._setAttrs){this._setAttrs(K);}else{C.Object.each(K,function(L,M){this.set(M,L);},this);}return this;},getAttrs:function(L){var K={};if(this._getAttrs){this._getAttrs(L);}else{C.Array.each(L,function(M,N){K[M]=this.get(M);},this);}return K;},create:F.create,compareTo:function(K){var L=this._node;if(K instanceof C.Node){K=K._node;}return L===K;},inDoc:function(L){var K=this._node;L=(L)?L._node||L:K[B];if(L.documentElement){return C.DOM.contains(L.documentElement,K);}},getById:function(M){var L=this._node,K=C.DOM.byId(M,L[B]);if(K&&C.DOM.contains(L,K)){K=C.one(K);}else{K=null;}return K;},ancestor:function(K){return F.get(C.DOM.elementByAxis(this._node,"parentNode",J(K)));},previous:function(L,K){return F.get(C.DOM.elementByAxis(this._node,"previousSibling",J(L),K));},next:function(M,L,K){return F.get(C.DOM.elementByAxis(this._node,"nextSibling",J(L),K));},one:function(K){return C.one(C.Selector.query(K,this._node,true));},query:function(K){return this.one(K);},all:function(K){var L=C.all(C.Selector.query(K,this._node));L._query=K;return L;},queryAll:function(K){return this.all(K);},test:function(K){return C.Selector.test(this._node,K);},remove:function(K){var L=this._node;L.parentNode.removeChild(L);if(K){this.destroy(true);}return this;},replace:function(K){var L=this._node;L.parentNode.replaceChild(K,L);return this;},purge:function(L,K){C.Event.purgeElement(this._node,L,K);},destroy:function(K){delete F._instances[this[D]];if(K){this.purge(true);}if(this.unplug){this.unplug();}this._node._yuid=null;this._node=null;this._stateProxy=null;},invoke:function(R,L,K,Q,P,O){var N=this._node,M;if(L&&L instanceof C.Node){L=L._node;}if(K&&K instanceof C.Node){K=K._node;}M=N[R](L,K,Q,P,O);return C.Node.scrubVal(M,this);},each:function(L,K){K=K||this;return L.call(K,this);},item:function(K){return this;},size:function(){return this._node?1:0;},insert:function(M,K){var L=this._node; -if(M){if(typeof K==="number"){K=this._node.childNodes[K];}if(typeof M!=="string"){if(M._node){M=M._node;}else{if(M._nodes||(!M.nodeType&&M.length)){C.each(M._nodes,function(N){C.DOM.addHTML(L,N,K);});return this;}}}C.DOM.addHTML(L,M,K);}return this;},prepend:function(K){return this.insert(K,0);},append:function(K){return this.insert(K,null);},setContent:function(K){C.DOM.addHTML(this._node,K,"replace");return this;},hasMethod:function(L){var K=this._node;return(K&&(typeof K==="function"));}},true);C.Node=F;C.get=C.Node.get;C.one=C.Node.one;var A=function(K){if(typeof K==="string"){this._query=K;K=C.Selector.query(K);}else{K=C.Array(K,0,true);}A._instances[C.stamp(this)]=this;this._nodes=K;};A.NAME="NodeList";A.getDOMNodes=function(K){return K._nodes;};A._instances=[];A.each=function(K,N,M){var L=K._nodes;if(L&&L.length){C.Array.each(L,N,M||K);}else{}};A.addMethod=function(K,M,L){if(K&&M){A.prototype[K]=function(){var O=[],N=arguments;C.Array.each(this._nodes,function(T){var S="_yuid",Q=C.Node._instances[T[S]],R,P;if(!Q){Q=A._getTempNode(T);}R=L||Q;P=M.apply(R,N);if(P!==undefined&&P!==Q){O[O.length]=P;}});return O.length?O:this;};}else{}};A.importMethod=function(M,K,L){if(typeof K==="string"){L=L||K;A.addMethod(K,M[K]);}else{C.each(K,function(N){A.importMethod(M,N);});}};A._getTempNode=function(L){var K=A._tempNode;if(!K){K=C.Node.create("

          ");A._tempNode=K;}K._node=L;K._stateProxy=L;return K;};C.mix(A.prototype,{item:function(K){return C.one((this._nodes||[])[K]);},each:function(M,L){var K=this;C.Array.each(this._nodes,function(O,N){O=C.one(O);return M.call(L||O,O,N,K);});return K;},batch:function(L,K){var M=this;C.Array.each(this._nodes,function(P,O){var N=C.Node._instances[P[D]];if(!N){N=A._getTempNode(P);}return L.call(K||N,N,O,M);});return M;},some:function(M,L){var K=this;return C.Array.some(this._nodes,function(O,N){O=C.one(O);L=L||O;return M.call(L,O,N,K);});},toFrag:function(){return C.one(C.DOM._nl2frag(this._nodes));},indexOf:function(K){return C.Array.indexOf(this._nodes,C.Node.getDOMNode(K));},filter:function(K){return C.all(C.Selector.filter(this._nodes,K));},modulus:function(M,L){L=L||0;var K=[];A.each(this,function(O,N){if(N%M===L){K.push(O);}});return C.all(K);},odd:function(){return this.modulus(2,1);},even:function(){return this.modulus(2);},destructor:function(){delete A._instances[this[D]];},refresh:function(){var L,K=this._nodes;if(this._query){if(K&&K[0]&&K[0].ownerDocument){L=K[0].ownerDocument;}this._nodes=C.Selector.query(this._query,L||C.config.doc);}return this;},on:function(N,M,L){var K=C.Array(arguments,0,true);K.splice(2,0,this._nodes);K[3]=L||this;return C.on.apply(C,K);},after:function(N,M,L){var K=C.Array(arguments,0,true);K.splice(2,0,this._nodes);K[3]=L||this;return C.after.apply(C,K);},size:function(){return this._nodes.length;},toString:function(){var N="",M=this[D]+": not bound to any nodes",K=this._nodes,L;if(K&&K[0]){L=K[0];N+=L[E];if(L.id){N+="#"+L.id;}if(L.className){N+="."+L.className.replace(" ",".");}if(K.length>1){N+="...["+K.length+" items]";}}return N||M;}},true);A.importMethod(C.Node.prototype,["append","detach","detachAll","insert","prepend","remove","set","setContent"]);A.prototype.get=function(L){var O=[],N=this._nodes,M=false,P=A._getTempNode,K,Q;if(N[0]){K=C.Node._instances[N[0]._yuid]||P(N[0]);Q=K._get(L);if(Q&&Q.nodeType){M=true;}}C.Array.each(N,function(R){K=C.Node._instances[R._yuid];if(!K){K=P(R);}Q=K._get(L);if(!M){Q=C.Node.scrubVal(Q,K);}O.push(Q);});return(M)?C.all(O):O;};C.NodeList=A;C.all=function(K){return new A(K);};C.Node.all=C.all;C.Array.each(["replaceChild","appendChild","insertBefore","removeChild","hasChildNodes","cloneNode","hasAttribute","removeAttribute","scrollIntoView","getElementsByTagName","focus","blur","submit","reset","select"],function(K){C.Node.prototype[K]=function(O,M,L){var N=this.invoke(K,O,M,L);return N;};});F.importMethod(C.DOM,["contains","setAttribute","getAttribute"]);C.NodeList.importMethod(C.Node.prototype,["getAttribute","setAttribute"]);(function(L){var K=["hasClass","addClass","removeClass","replaceClass","toggleClass"];L.Node.importMethod(L.DOM,K);L.NodeList.importMethod(L.Node.prototype,K);})(C);if(!document.documentElement.hasAttribute){C.Node.prototype.hasAttribute=function(K){return C.DOM.getAttribute(this._node,K)!=="";};}C.Node.ATTRS.type={setter:function(L){if(L==="hidden"){try{this._node.type="hidden";}catch(K){this.setStyle("display","none");this._inputType="hidden";}}else{try{this._node.type=L;}catch(K){}}return L;},getter:function(){return this._inputType||this._node.type;},_bypassProxy:true};},"3.0.0",{requires:["dom-base","selector-css2","event-base"]});YUI.add("node-style",function(A){(function(C){var B=["getStyle","getComputedStyle","setStyle","setStyles"];C.Node.importMethod(C.DOM,B);C.NodeList.importMethod(C.Node.prototype,B);})(A);},"3.0.0",{requires:["dom-style","node-base"]});YUI.add("node-screen",function(A){A.each(["winWidth","winHeight","docWidth","docHeight","docScrollX","docScrollY"],function(B){A.Node.ATTRS[B]={getter:function(){var C=Array.prototype.slice.call(arguments);C.unshift(A.Node.getDOMNode(this));return A.DOM[B].apply(this,C);}};});A.Node.ATTRS.scrollLeft={getter:function(){var B=A.Node.getDOMNode(this);return("scrollLeft" in B)?B.scrollLeft:A.DOM.docScrollX(B);},setter:function(C){var B=A.Node.getDOMNode(this);if(B){if("scrollLeft" in B){B.scrollLeft=C;}else{if(B.document||B.nodeType===9){A.DOM._getWin(B).scrollTo(C,A.DOM.docScrollY(B));}}}else{}}};A.Node.ATTRS.scrollTop={getter:function(){var B=A.Node.getDOMNode(this);return("scrollTop" in B)?B.scrollTop:A.DOM.docScrollY(B);},setter:function(C){var B=A.Node.getDOMNode(this);if(B){if("scrollTop" in B){B.scrollTop=C;}else{if(B.document||B.nodeType===9){A.DOM._getWin(B).scrollTo(A.DOM.docScrollX(B),C);}}}else{}}};A.Node.importMethod(A.DOM,["getXY","setXY","getX","setX","getY","setY"]);A.Node.ATTRS.region={getter:function(){var B=A.Node.getDOMNode(this);if(B&&!B.tagName){if(B.nodeType===9){B=B.documentElement; -}else{if(B.alert){B=B.document.documentElement;}}}return A.DOM.region(B);}};A.Node.ATTRS.viewportRegion={getter:function(){return A.DOM.viewportRegion(A.Node.getDOMNode(this));}};A.Node.importMethod(A.DOM,"inViewportRegion");A.Node.prototype.intersect=function(B,D){var C=A.Node.getDOMNode(this);if(B instanceof A.Node){B=A.Node.getDOMNode(B);}return A.DOM.intersect(C,B,D);};A.Node.prototype.inRegion=function(B,D,E){var C=A.Node.getDOMNode(this);if(B instanceof A.Node){B=A.Node.getDOMNode(B);}return A.DOM.inRegion(C,B,D,E);};},"3.0.0",{requires:["dom-screen"]});YUI.add("node-pluginhost",function(A){A.Node.plug=function(){var B=A.Array(arguments);B.unshift(A.Node);A.Plugin.Host.plug.apply(A.Base,B);return A.Node;};A.Node.unplug=function(){var B=A.Array(arguments);B.unshift(A.Node);A.Plugin.Host.unplug.apply(A.Base,B);return A.Node;};A.mix(A.Node,A.Plugin.Host,false,null,1);A.NodeList.prototype.plug=function(){var B=arguments;A.NodeList.each(this,function(C){A.Node.prototype.plug.apply(A.one(C),B);});};A.NodeList.prototype.unplug=function(){var B=arguments;A.NodeList.each(this,function(C){A.Node.prototype.unplug.apply(A.one(C),B);});};},"3.0.0",{requires:["node-base","pluginhost"]});YUI.add("node-event-delegate",function(A){A.Node.prototype.delegate=function(F,E,B){var D=Array.prototype.slice.call(arguments,3),C=[F,E,A.Node.getDOMNode(this),B];C=C.concat(D);return A.delegate.apply(A,C);};},"3.0.0",{requires:["node-base","event-delegate","pluginhost"]});YUI.add("node",function(A){},"3.0.0",{skinnable:false,use:["node-base","node-style","node-screen","node-pluginhost","node-event-delegate"],requires:["dom","event-base","event-delegate","pluginhost"]}); \ No newline at end of file +YUI.add("node-base",function(c){var i=".",e="nodeName",m="nodeType",b="ownerDocument",l="tagName",d="_yuid",o=Array.prototype.slice,f=c.DOM,j=function(q){var p=(q.nodeType!==9)?q.uniqueID:q[d];if(p&&j._instances[p]&&j._instances[p]._node!==q){q[d]=null;}p=p||c.stamp(q);if(!p){p=c.guid();}this[d]=p;this._node=q;j._instances[p]=this;this._stateProxy=q;c.EventTarget.call(this,{emitFacade:true});if(this._initPlugins){this._initPlugins();}this.SHOW_TRANSITION=j.SHOW_TRANSITION;this.HIDE_TRANSITION=j.HIDE_TRANSITION;},n=function(q){var p=null;if(q){p=(typeof q=="string")?function(r){return c.Selector.test(r,q);}:function(r){return q(c.one(r));};}return p;};j.NAME="node";j.re_aria=/^(?:role$|aria-)/;j.SHOW_TRANSITION="fadeIn";j.HIDE_TRANSITION="fadeOut";j.DOM_EVENTS={abort:1,beforeunload:1,blur:1,change:1,click:1,close:1,command:1,contextmenu:1,dblclick:1,DOMMouseScroll:1,drag:1,dragstart:1,dragenter:1,dragover:1,dragleave:1,dragend:1,drop:1,error:1,focus:1,key:1,keydown:1,keypress:1,keyup:1,load:1,message:1,mousedown:1,mouseenter:1,mouseleave:1,mousemove:1,mousemultiwheel:1,mouseout:1,mouseover:1,mouseup:1,mousewheel:1,orientationchange:1,reset:1,resize:1,select:1,selectstart:1,submit:1,scroll:1,textInput:1,unload:1};c.mix(j.DOM_EVENTS,c.Env.evt.plugins);j._instances={};j.getDOMNode=function(p){if(p){return(p.nodeType)?p:p._node||null;}return null;};j.scrubVal=function(q,p){if(q){if(typeof q=="object"||typeof q=="function"){if(m in q||f.isWindow(q)){q=c.one(q);}else{if((q.item&&!q._nodes)||(q[0]&&q[0][m])){q=c.all(q);}}}}else{if(typeof q==="undefined"){q=p;}else{if(q===null){q=null;}}}return q;};j.addMethod=function(p,r,q){if(p&&r&&typeof r=="function"){j.prototype[p]=function(){var t=o.call(arguments),u=this,s;if(t[0]&&c.instanceOf(t[0],j)){t[0]=t[0]._node;}if(t[1]&&c.instanceOf(t[1],j)){t[1]=t[1]._node;}t.unshift(u._node);s=r.apply(u,t);if(s){s=j.scrubVal(s,u);}(typeof s!="undefined")||(s=u);return s;};}else{}};j.importMethod=function(r,p,q){if(typeof p=="string"){q=q||p;j.addMethod(q,r[p],r);}else{c.Array.each(p,function(s){j.importMethod(r,s);});}};j.one=function(s){var p=null,r,q;if(s){if(typeof s=="string"){if(s.indexOf("doc")===0){s=c.config.doc;}else{if(s.indexOf("win")===0){s=c.config.win;}else{s=c.Selector.query(s,null,true);}}if(!s){return null;}}else{if(c.instanceOf(s,j)){return s;}}if(s.nodeType||c.DOM.isWindow(s)){q=(s.uniqueID&&s.nodeType!==9)?s.uniqueID:s._yuid;p=j._instances[q];r=p?p._node:null;if(!p||(r&&s!==r)){p=new j(s);}}}return p;};j.create=function(p,q){if(q&&q._node){q=q._node;}return c.one(f.create(p,q));};j.ATTRS={text:{getter:function(){return f.getText(this._node);},setter:function(p){f.setText(this._node,p);return p;}},"options":{getter:function(){return this._node.getElementsByTagName("option");}},"children":{getter:function(){var s=this._node,r=s.children,t,q,p;if(!r){t=s.childNodes;r=[];for(q=0,p=t.length;q-1){s=p;p=p.split(i);c.Object.setValue(q,p,r);}else{if(typeof q[p]!="undefined"){q[p]=r;}}return r;};j.DEFAULT_GETTER=function(p){var q=this._stateProxy,r;if(p.indexOf&&p.indexOf(i)>-1){r=c.Object.getValue(q,p.split(i));}else{if(typeof q[p]!="undefined"){r=q[p];}}return r;};c.mix(j,c.EventTarget,false,null,1);c.mix(j.prototype,{toString:function(){var s=this[d]+": not bound to a node",r=this._node,p,t,q;if(r){p=r.attributes;t=(p&&p.id)?r.getAttribute("id"):null;q=(p&&p.className)?r.getAttribute("className"):null;s=r[e];if(t){s+="#"+t;}if(q){s+="."+q.replace(" ",".");}s+=" "+this[d];}return s;},get:function(p){var q;if(this._getAttr){q=this._getAttr(p);}else{q=this._get(p);}if(q){q=j.scrubVal(q,this);}else{if(q===null){q=null;}}return q;},_get:function(p){var q=j.ATTRS[p],r;if(q&&q.getter){r=q.getter.call(this);}else{if(j.re_aria.test(p)){r=this._node.getAttribute(p,2);}else{r=j.DEFAULT_GETTER.apply(this,arguments);}}return r;},set:function(p,r){var q=j.ATTRS[p];if(this._setAttr){this._setAttr.apply(this,arguments);}else{if(q&&q.setter){q.setter.call(this,r,p);}else{if(j.re_aria.test(p)){this._node.setAttribute(p,r);}else{j.DEFAULT_SETTER.apply(this,arguments);}}}return this;},setAttrs:function(p){if(this._setAttrs){this._setAttrs(p);}else{c.Object.each(p,function(q,r){this.set(r,q);},this);}return this;},getAttrs:function(q){var p={};if(this._getAttrs){this._getAttrs(q);}else{c.Array.each(q,function(r,s){p[r]=this.get(r);},this);}return p;},create:j.create,compareTo:function(p){var q=this._node;if(c.instanceOf(p,j)){p=p._node;}return q===p;},inDoc:function(q){var p=this._node;q=(q)?q._node||q:p[b];if(q.documentElement){return f.contains(q.documentElement,p);}},getById:function(r){var q=this._node,p=f.byId(r,q[b]);if(p&&f.contains(q,p)){p=c.one(p);}else{p=null;}return p;},ancestor:function(p,q){return c.one(f.ancestor(this._node,n(p),q));},ancestors:function(p,q){return c.all(f.ancestors(this._node,n(p),q));},previous:function(q,p){return c.one(f.elementByAxis(this._node,"previousSibling",n(q),p));},next:function(q,p){return c.one(f.elementByAxis(this._node,"nextSibling",n(q),p));},siblings:function(p){return c.all(f.siblings(this._node,n(p)));},one:function(p){return c.one(c.Selector.query(p,this._node,true));},all:function(p){var q=c.all(c.Selector.query(p,this._node));q._query=p;q._queryRoot=this._node;return q;},test:function(p){return c.Selector.test(this._node,p);},remove:function(q){var r=this._node,p=r.parentNode;if(p){p.removeChild(r);}if(q){this.destroy();}return this;},replace:function(p){var q=this._node;if(typeof p=="string"){p=j.create(p);}q.parentNode.replaceChild(j.getDOMNode(p),q);return this;},replaceChild:function(q,p){if(typeof q=="string"){q=f.create(q);}return c.one(this._node.replaceChild(j.getDOMNode(q),j.getDOMNode(p)));},appendChild:function(p){return j.scrubVal(this._insert(p));},insertBefore:function(q,p){return c.Node.scrubVal(this._insert(q,p)); +},purge:function(q,p){c.Event.purgeElement(this._node,q,p);return this;},destroy:function(p){this.purge();if(this.unplug){this.unplug();}this.clearData();if(p){this.all("*").destroy();}this._node=null;this._stateProxy=null;delete j._instances[this[d]];},invoke:function(w,q,p,v,u,t){var s=this._node,r;if(q&&c.instanceOf(q,j)){q=q._node;}if(p&&c.instanceOf(p,j)){p=p._node;}r=s[w](q,p,v,u,t);return j.scrubVal(r,this);},insert:function(q,p){this._insert(q,p);return this;},_insert:function(s,q){var r=this._node,p=null;if(typeof q=="number"){q=this._node.childNodes[q];}else{if(q&&q._node){q=q._node;}}if(s&&typeof s!="string"){s=s._node||s._nodes||s;}p=f.addHTML(r,s,q);return p;},prepend:function(p){return this.insert(p,0);},append:function(p){return this.insert(p,null);},appendTo:function(p){c.one(p).append(this);return this;},setContent:function(p){this._insert(p,"replace");return this;},getContent:function(p){return this.get("innerHTML");},swap:c.config.doc.documentElement.swapNode?function(p){this._node.swapNode(j.getDOMNode(p));}:function(p){p=j.getDOMNode(p);var r=this._node,q=p.parentNode,s=p.nextSibling;if(s===r){q.insertBefore(r,p);}else{if(p===r.nextSibling){q.insertBefore(p,r);}else{r.parentNode.replaceChild(p,r);f.addHTML(q,r,s);}}return this;},getData:function(q){var p;this._data=this._data||{};if(arguments.length){p=this._data[q];}else{p=this._data;}return p;},setData:function(p,q){this._data=this._data||{};if(arguments.length>1){this._data[p]=q;}else{this._data=p;}return this;},clearData:function(p){if("_data" in this){if(p){delete this._data[p];}else{delete this._data;}}return this;},hasMethod:function(q){var p=this._node;return !!(p&&q in p&&typeof p[q]!="unknown"&&(typeof p[q]=="function"||String(p[q]).indexOf("function")===1));},SHOW_TRANSITION:null,HIDE_TRANSITION:null,show:function(p){p=arguments[arguments.length-1];this.toggleView(true,p);return this;},_show:function(){this.setStyle("display","");},_isHidden:function(){return c.DOM.getStyle(this._node,"display")==="none";},toggleView:function(p,q){this._toggleView.apply(this,arguments);},_toggleView:function(p,q){q=arguments[arguments.length-1];if(typeof p!="boolean"){p=(this._isHidden())?1:0;}if(p){this._show();}else{this._hide();}if(typeof q=="function"){q.call(this);}return this;},hide:function(p){p=arguments[arguments.length-1];this.toggleView(false,p);return this;},_hide:function(){this.setStyle("display","none");},isFragment:function(){return(this.get("nodeType")===11);},empty:function(p){this.get("childNodes").remove(p);return this;}},true);c.Node=j;c.one=c.Node.one;var a=function(p){var q=[];if(typeof p==="string"){this._query=p;p=c.Selector.query(p);}else{if(p.nodeType||f.isWindow(p)){p=[p];}else{if(c.instanceOf(p,c.Node)){p=[p._node];}else{if(c.instanceOf(p[0],c.Node)){c.Array.each(p,function(r){if(r._node){q.push(r._node);}});p=q;}else{p=c.Array(p,0,true);}}}}this._nodes=p;};a.NAME="NodeList";a.getDOMNodes=function(p){return(p&&p._nodes)?p._nodes:p;};a.each=function(p,s,r){var q=p._nodes;if(q&&q.length){c.Array.each(q,s,r||p);}else{}};a.addMethod=function(p,r,q){if(p&&r){a.prototype[p]=function(){var t=[],s=arguments;c.Array.each(this._nodes,function(y){var x=(y.uniqueID&&y.nodeType!==9)?"uniqueID":"_yuid",v=c.Node._instances[y[x]],w,u;if(!v){v=a._getTempNode(y);}w=q||v;u=r.apply(w,s);if(u!==undefined&&u!==v){t[t.length]=u;}});return t.length?t:this;};}else{}};a.importMethod=function(r,p,q){if(typeof p==="string"){q=q||p;a.addMethod(p,r[p]);}else{c.Array.each(p,function(s){a.importMethod(r,s);});}};a._getTempNode=function(q){var p=a._tempNode;if(!p){p=c.Node.create("
          ");a._tempNode=p;}p._node=q;p._stateProxy=q;return p;};c.mix(a.prototype,{item:function(p){return c.one((this._nodes||[])[p]);},each:function(r,q){var p=this;c.Array.each(this._nodes,function(t,s){t=c.one(t);return r.call(q||t,t,s,p);});return p;},batch:function(q,p){var r=this;c.Array.each(this._nodes,function(u,t){var s=c.Node._instances[u[d]];if(!s){s=a._getTempNode(u);}return q.call(p||s,s,t,r);});return r;},some:function(r,q){var p=this;return c.Array.some(this._nodes,function(t,s){t=c.one(t);q=q||t;return r.call(q,t,s,p);});},toFrag:function(){return c.one(c.DOM._nl2frag(this._nodes));},indexOf:function(p){return c.Array.indexOf(this._nodes,c.Node.getDOMNode(p));},filter:function(p){return c.all(c.Selector.filter(this._nodes,p));},modulus:function(s,q){q=q||0;var p=[];a.each(this,function(t,r){if(r%s===q){p.push(t);}});return c.all(p);},odd:function(){return this.modulus(2,1);},even:function(){return this.modulus(2);},destructor:function(){},refresh:function(){var s,q=this._nodes,r=this._query,p=this._queryRoot;if(r){if(!p){if(q&&q[0]&&q[0].ownerDocument){p=q[0].ownerDocument;}}this._nodes=c.Selector.query(r,p);}return this;},_prepEvtArgs:function(s,r,q){var p=c.Array(arguments,0,true);if(p.length<2){p[2]=this._nodes;}else{p.splice(2,0,this._nodes);}p[3]=q||this;return p;},on:function(r,q,p){return c.on.apply(c,this._prepEvtArgs.apply(this,arguments));},once:function(r,q,p){return c.once.apply(c,this._prepEvtArgs.apply(this,arguments));},after:function(r,q,p){return c.after.apply(c,this._prepEvtArgs.apply(this,arguments));},size:function(){return this._nodes.length;},isEmpty:function(){return this._nodes.length<1;},toString:function(){var s="",r=this[d]+": not bound to any nodes",p=this._nodes,q;if(p&&p[0]){q=p[0];s+=q[e];if(q.id){s+="#"+q.id;}if(q.className){s+="."+q.className.replace(" ",".");}if(p.length>1){s+="...["+p.length+" items]";}}return s||r;}},true);a.importMethod(c.Node.prototype,["append","destroy","detach","detachAll","empty","insert","prepend","remove","set","setContent","show","hide","toggleView"]);a.prototype.get=function(q){var t=[],s=this._nodes,r=false,u=a._getTempNode,p,v;if(s[0]){p=c.Node._instances[s[0]._yuid]||u(s[0]);v=p._get(q);if(v&&v.nodeType){r=true;}}c.Array.each(s,function(w){p=c.Node._instances[w._yuid];if(!p){p=u(w);}v=p._get(q);if(!r){v=c.Node.scrubVal(v,p);}t.push(v);});return(r)?c.all(t):t;};c.NodeList=a; +c.all=function(p){return new a(p);};c.Node.all=c.all;c.Array.each(["removeChild","hasChildNodes","cloneNode","hasAttribute","removeAttribute","scrollIntoView","getElementsByTagName","focus","blur","submit","reset","select","createCaption"],function(p){c.Node.prototype[p]=function(t,r,q){var s=this.invoke(p,t,r,q);return s;};});c.Node.importMethod(c.DOM,["contains","setAttribute","getAttribute","wrap","unwrap","generateID"]);c.NodeList.importMethod(c.Node.prototype,["getAttribute","setAttribute","removeAttribute","unwrap","wrap","generateID"]);(function(q){var p=["hasClass","addClass","removeClass","replaceClass","toggleClass"];q.Node.importMethod(q.DOM,p);q.NodeList.importMethod(q.Node.prototype,p);})(c);if(!c.config.doc.documentElement.hasAttribute){c.Node.prototype.hasAttribute=function(p){if(p==="value"){if(this.get("value")!==""){return true;}}return !!(this._node.attributes[p]&&this._node.attributes[p].specified);};}c.Node.prototype.focus=function(){try{this._node.focus();}catch(p){}};c.Node.ATTRS.type={setter:function(q){if(q==="hidden"){try{this._node.type="hidden";}catch(p){this.setStyle("display","none");this._inputType="hidden";}}else{try{this._node.type=q;}catch(p){}}return q;},getter:function(){return this._inputType||this._node.type;},_bypassProxy:true};if(c.config.doc.createElement("form").elements.nodeType){c.Node.ATTRS.elements={getter:function(){return this.all("input, textarea, button, select");}};}c.mix(c.Node.ATTRS,{offsetHeight:{setter:function(p){c.DOM.setHeight(this._node,p);return p;},getter:function(){return this._node.offsetHeight;}},offsetWidth:{setter:function(p){c.DOM.setWidth(this._node,p);return p;},getter:function(){return this._node.offsetWidth;}}});c.mix(c.Node.prototype,{sizeTo:function(p,q){var r;if(arguments.length<2){r=c.one(p);p=r.get("offsetWidth");q=r.get("offsetHeight");}this.setAttrs({offsetWidth:p,offsetHeight:q});}});var k=c.NodeList,h=Array.prototype,g=["concat","pop","push","shift","slice","splice","unshift"];c.Array.each(g,function(p){k.prototype[p]=function(){var r=[],s=0,q;while((q=arguments[s++])){r.push(q._node||q._nodes||q);}return c.Node.scrubVal(h[p].apply(this._nodes,r));};});},"3.3.0",{requires:["dom-base","selector-css2","event-base"]});YUI.add("node-style",function(a){(function(c){var b=["getStyle","getComputedStyle","setStyle","setStyles"];c.Node.importMethod(c.DOM,b);c.NodeList.importMethod(c.Node.prototype,b);})(a);},"3.3.0",{requires:["dom-style","node-base"]});YUI.add("node-screen",function(a){a.each(["winWidth","winHeight","docWidth","docHeight","docScrollX","docScrollY"],function(b){a.Node.ATTRS[b]={getter:function(){var c=Array.prototype.slice.call(arguments);c.unshift(a.Node.getDOMNode(this));return a.DOM[b].apply(this,c);}};});a.Node.ATTRS.scrollLeft={getter:function(){var b=a.Node.getDOMNode(this);return("scrollLeft" in b)?b.scrollLeft:a.DOM.docScrollX(b);},setter:function(c){var b=a.Node.getDOMNode(this);if(b){if("scrollLeft" in b){b.scrollLeft=c;}else{if(b.document||b.nodeType===9){a.DOM._getWin(b).scrollTo(c,a.DOM.docScrollY(b));}}}else{}}};a.Node.ATTRS.scrollTop={getter:function(){var b=a.Node.getDOMNode(this);return("scrollTop" in b)?b.scrollTop:a.DOM.docScrollY(b);},setter:function(c){var b=a.Node.getDOMNode(this);if(b){if("scrollTop" in b){b.scrollTop=c;}else{if(b.document||b.nodeType===9){a.DOM._getWin(b).scrollTo(a.DOM.docScrollX(b),c);}}}else{}}};a.Node.importMethod(a.DOM,["getXY","setXY","getX","setX","getY","setY","swapXY"]);a.Node.ATTRS.region={getter:function(){var b=a.Node.getDOMNode(this),c;if(b&&!b.tagName){if(b.nodeType===9){b=b.documentElement;}}if(b.alert){c=a.DOM.viewportRegion(b);}else{c=a.DOM.region(b);}return c;}};a.Node.ATTRS.viewportRegion={getter:function(){return a.DOM.viewportRegion(a.Node.getDOMNode(this));}};a.Node.importMethod(a.DOM,"inViewportRegion");a.Node.prototype.intersect=function(b,d){var c=a.Node.getDOMNode(this);if(a.instanceOf(b,a.Node)){b=a.Node.getDOMNode(b);}return a.DOM.intersect(c,b,d);};a.Node.prototype.inRegion=function(b,d,e){var c=a.Node.getDOMNode(this);if(a.instanceOf(b,a.Node)){b=a.Node.getDOMNode(b);}return a.DOM.inRegion(c,b,d,e);};},"3.3.0",{requires:["dom-screen"]});YUI.add("node-pluginhost",function(a){a.Node.plug=function(){var b=a.Array(arguments);b.unshift(a.Node);a.Plugin.Host.plug.apply(a.Base,b);return a.Node;};a.Node.unplug=function(){var b=a.Array(arguments);b.unshift(a.Node);a.Plugin.Host.unplug.apply(a.Base,b);return a.Node;};a.mix(a.Node,a.Plugin.Host,false,null,1);a.NodeList.prototype.plug=function(){var b=arguments;a.NodeList.each(this,function(c){a.Node.prototype.plug.apply(a.one(c),b);});};a.NodeList.prototype.unplug=function(){var b=arguments;a.NodeList.each(this,function(c){a.Node.prototype.unplug.apply(a.one(c),b);});};},"3.3.0",{requires:["node-base","pluginhost"]});YUI.add("node-event-delegate",function(a){a.Node.prototype.delegate=function(d){var c=a.Array(arguments,0,true),b=(a.Lang.isObject(d)&&!a.Lang.isArray(d))?1:2;c.splice(b,0,this._node);return a.delegate.apply(a,c);};},"3.3.0",{requires:["node-base","event-delegate"]});YUI.add("node",function(a){},"3.3.0",{requires:["dom","event-base","event-delegate","pluginhost"],use:["node-base","node-style","node-screen","node-pluginhost","node-event-delegate"],skinnable:false}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-pluginhost-min.js b/jssource/src_files/include/javascript/yui3/build/node/node-pluginhost-min.js index 47d2635a..98b89e3f 100644 --- a/jssource/src_files/include/javascript/yui3/build/node/node-pluginhost-min.js +++ b/jssource/src_files/include/javascript/yui3/build/node/node-pluginhost-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("node-pluginhost",function(A){A.Node.plug=function(){var B=A.Array(arguments);B.unshift(A.Node);A.Plugin.Host.plug.apply(A.Base,B);return A.Node;};A.Node.unplug=function(){var B=A.Array(arguments);B.unshift(A.Node);A.Plugin.Host.unplug.apply(A.Base,B);return A.Node;};A.mix(A.Node,A.Plugin.Host,false,null,1);A.NodeList.prototype.plug=function(){var B=arguments;A.NodeList.each(this,function(C){A.Node.prototype.plug.apply(A.one(C),B);});};A.NodeList.prototype.unplug=function(){var B=arguments;A.NodeList.each(this,function(C){A.Node.prototype.unplug.apply(A.one(C),B);});};},"3.0.0",{requires:["node-base","pluginhost"]}); \ No newline at end of file +YUI.add("node-pluginhost",function(a){a.Node.plug=function(){var b=a.Array(arguments);b.unshift(a.Node);a.Plugin.Host.plug.apply(a.Base,b);return a.Node;};a.Node.unplug=function(){var b=a.Array(arguments);b.unshift(a.Node);a.Plugin.Host.unplug.apply(a.Base,b);return a.Node;};a.mix(a.Node,a.Plugin.Host,false,null,1);a.NodeList.prototype.plug=function(){var b=arguments;a.NodeList.each(this,function(c){a.Node.prototype.plug.apply(a.one(c),b);});};a.NodeList.prototype.unplug=function(){var b=arguments;a.NodeList.each(this,function(c){a.Node.prototype.unplug.apply(a.one(c),b);});};},"3.3.0",{requires:["node-base","pluginhost"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-pluginhost.js b/jssource/src_files/include/javascript/yui3/build/node/node-pluginhost.js index 8d7d1b32..7c267088 100644 --- a/jssource/src_files/include/javascript/yui3/build/node/node-pluginhost.js +++ b/jssource/src_files/include/javascript/yui3/build/node/node-pluginhost.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('node-pluginhost', function(Y) { @@ -58,4 +58,4 @@ Y.NodeList.prototype.unplug = function() { }; -}, '3.0.0' ,{requires:['node-base', 'pluginhost']}); +}, '3.3.0' ,{requires:['node-base', 'pluginhost']}); diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-screen-min.js b/jssource/src_files/include/javascript/yui3/build/node/node-screen-min.js index 79669fa8..6b152caa 100644 --- a/jssource/src_files/include/javascript/yui3/build/node/node-screen-min.js +++ b/jssource/src_files/include/javascript/yui3/build/node/node-screen-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("node-screen",function(A){A.each(["winWidth","winHeight","docWidth","docHeight","docScrollX","docScrollY"],function(B){A.Node.ATTRS[B]={getter:function(){var C=Array.prototype.slice.call(arguments);C.unshift(A.Node.getDOMNode(this));return A.DOM[B].apply(this,C);}};});A.Node.ATTRS.scrollLeft={getter:function(){var B=A.Node.getDOMNode(this);return("scrollLeft" in B)?B.scrollLeft:A.DOM.docScrollX(B);},setter:function(C){var B=A.Node.getDOMNode(this);if(B){if("scrollLeft" in B){B.scrollLeft=C;}else{if(B.document||B.nodeType===9){A.DOM._getWin(B).scrollTo(C,A.DOM.docScrollY(B));}}}else{}}};A.Node.ATTRS.scrollTop={getter:function(){var B=A.Node.getDOMNode(this);return("scrollTop" in B)?B.scrollTop:A.DOM.docScrollY(B);},setter:function(C){var B=A.Node.getDOMNode(this);if(B){if("scrollTop" in B){B.scrollTop=C;}else{if(B.document||B.nodeType===9){A.DOM._getWin(B).scrollTo(A.DOM.docScrollX(B),C);}}}else{}}};A.Node.importMethod(A.DOM,["getXY","setXY","getX","setX","getY","setY"]);A.Node.ATTRS.region={getter:function(){var B=A.Node.getDOMNode(this);if(B&&!B.tagName){if(B.nodeType===9){B=B.documentElement;}else{if(B.alert){B=B.document.documentElement;}}}return A.DOM.region(B);}};A.Node.ATTRS.viewportRegion={getter:function(){return A.DOM.viewportRegion(A.Node.getDOMNode(this));}};A.Node.importMethod(A.DOM,"inViewportRegion");A.Node.prototype.intersect=function(B,D){var C=A.Node.getDOMNode(this);if(B instanceof A.Node){B=A.Node.getDOMNode(B);}return A.DOM.intersect(C,B,D);};A.Node.prototype.inRegion=function(B,D,E){var C=A.Node.getDOMNode(this);if(B instanceof A.Node){B=A.Node.getDOMNode(B);}return A.DOM.inRegion(C,B,D,E);};},"3.0.0",{requires:["dom-screen"]}); \ No newline at end of file +YUI.add("node-screen",function(a){a.each(["winWidth","winHeight","docWidth","docHeight","docScrollX","docScrollY"],function(b){a.Node.ATTRS[b]={getter:function(){var c=Array.prototype.slice.call(arguments);c.unshift(a.Node.getDOMNode(this));return a.DOM[b].apply(this,c);}};});a.Node.ATTRS.scrollLeft={getter:function(){var b=a.Node.getDOMNode(this);return("scrollLeft" in b)?b.scrollLeft:a.DOM.docScrollX(b);},setter:function(c){var b=a.Node.getDOMNode(this);if(b){if("scrollLeft" in b){b.scrollLeft=c;}else{if(b.document||b.nodeType===9){a.DOM._getWin(b).scrollTo(c,a.DOM.docScrollY(b));}}}else{}}};a.Node.ATTRS.scrollTop={getter:function(){var b=a.Node.getDOMNode(this);return("scrollTop" in b)?b.scrollTop:a.DOM.docScrollY(b);},setter:function(c){var b=a.Node.getDOMNode(this);if(b){if("scrollTop" in b){b.scrollTop=c;}else{if(b.document||b.nodeType===9){a.DOM._getWin(b).scrollTo(a.DOM.docScrollX(b),c);}}}else{}}};a.Node.importMethod(a.DOM,["getXY","setXY","getX","setX","getY","setY","swapXY"]);a.Node.ATTRS.region={getter:function(){var b=a.Node.getDOMNode(this),c;if(b&&!b.tagName){if(b.nodeType===9){b=b.documentElement;}}if(b.alert){c=a.DOM.viewportRegion(b);}else{c=a.DOM.region(b);}return c;}};a.Node.ATTRS.viewportRegion={getter:function(){return a.DOM.viewportRegion(a.Node.getDOMNode(this));}};a.Node.importMethod(a.DOM,"inViewportRegion");a.Node.prototype.intersect=function(b,d){var c=a.Node.getDOMNode(this);if(a.instanceOf(b,a.Node)){b=a.Node.getDOMNode(b);}return a.DOM.intersect(c,b,d);};a.Node.prototype.inRegion=function(b,d,e){var c=a.Node.getDOMNode(this);if(a.instanceOf(b,a.Node)){b=a.Node.getDOMNode(b);}return a.DOM.inRegion(c,b,d,e);};},"3.3.0",{requires:["dom-screen"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-screen.js b/jssource/src_files/include/javascript/yui3/build/node/node-screen.js index 55a208a0..17227f8c 100644 --- a/jssource/src_files/include/javascript/yui3/build/node/node-screen.js +++ b/jssource/src_files/include/javascript/yui3/build/node/node-screen.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('node-screen', function(Y) { @@ -154,31 +154,44 @@ Y.Node.importMethod(Y.DOM, [ * @param {Int} y Y value for new position (coordinates are page-based) * @chainable */ - 'setY' + 'setY', + +/** + * Swaps the XY position of this node with another node. + * @method swapXY + * @param {Y.Node || HTMLElement} otherNode The node to swap with. + * @chainable + */ + 'swapXY' ]); /** - * Returns a region object for the node + * Returns a region object for the node * @config region * @for Node * @type Node */ Y.Node.ATTRS.region = { getter: function() { - var node = Y.Node.getDOMNode(this); + var node = Y.Node.getDOMNode(this), + region; + if (node && !node.tagName) { if (node.nodeType === 9) { // document node = node.documentElement; - } else if (node.alert) { // window - node = node.document.documentElement; } } - return Y.DOM.region(node); + if (node.alert) { + region = Y.DOM.viewportRegion(node); + } else { + region = Y.DOM.region(node); + } + return region; } }; - + /** - * Returns a region object for the node's viewport + * Returns a region object for the node's viewport * @config viewportRegion * @type Node */ @@ -192,36 +205,36 @@ Y.Node.importMethod(Y.DOM, 'inViewportRegion'); // these need special treatment to extract 2nd node arg /** - * Compares the intersection of the node with another node or region - * @method intersect + * Compares the intersection of the node with another node or region + * @method intersect * @for Node * @param {Node|Object} node2 The node or region to compare with. - * @param {Object} altRegion An alternate region to use (rather than this node's). - * @return {Object} An object representing the intersection of the regions. + * @param {Object} altRegion An alternate region to use (rather than this node's). + * @return {Object} An object representing the intersection of the regions. */ Y.Node.prototype.intersect = function(node2, altRegion) { var node1 = Y.Node.getDOMNode(this); - if (node2 instanceof Y.Node) { // might be a region object + if (Y.instanceOf(node2, Y.Node)) { // might be a region object node2 = Y.Node.getDOMNode(node2); } - return Y.DOM.intersect(node1, node2, altRegion); + return Y.DOM.intersect(node1, node2, altRegion); }; /** * Determines whether or not the node is within the giving region. - * @method inRegion + * @method inRegion * @param {Node|Object} node2 The node or region to compare with. - * @param {Boolean} all Whether or not all of the node must be in the region. - * @param {Object} altRegion An alternate region to use (rather than this node's). - * @return {Object} An object representing the intersection of the regions. + * @param {Boolean} all Whether or not all of the node must be in the region. + * @param {Object} altRegion An alternate region to use (rather than this node's). + * @return {Object} An object representing the intersection of the regions. */ Y.Node.prototype.inRegion = function(node2, all, altRegion) { var node1 = Y.Node.getDOMNode(this); - if (node2 instanceof Y.Node) { // might be a region object + if (Y.instanceOf(node2, Y.Node)) { // might be a region object node2 = Y.Node.getDOMNode(node2); } - return Y.DOM.inRegion(node1, node2, all, altRegion); + return Y.DOM.inRegion(node1, node2, all, altRegion); }; -}, '3.0.0' ,{requires:['dom-screen']}); +}, '3.3.0' ,{requires:['dom-screen']}); diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-style-min.js b/jssource/src_files/include/javascript/yui3/build/node/node-style-min.js index 8d431e5b..c37a6275 100644 --- a/jssource/src_files/include/javascript/yui3/build/node/node-style-min.js +++ b/jssource/src_files/include/javascript/yui3/build/node/node-style-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("node-style",function(A){(function(C){var B=["getStyle","getComputedStyle","setStyle","setStyles"];C.Node.importMethod(C.DOM,B);C.NodeList.importMethod(C.Node.prototype,B);})(A);},"3.0.0",{requires:["dom-style","node-base"]}); \ No newline at end of file +YUI.add("node-style",function(a){(function(c){var b=["getStyle","getComputedStyle","setStyle","setStyles"];c.Node.importMethod(c.DOM,b);c.NodeList.importMethod(c.Node.prototype,b);})(a);},"3.3.0",{requires:["dom-style","node-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/node/node-style.js b/jssource/src_files/include/javascript/yui3/build/node/node-style.js index 20d5a66d..3af9f2bd 100644 --- a/jssource/src_files/include/javascript/yui3/build/node/node-style.js +++ b/jssource/src_files/include/javascript/yui3/build/node/node-style.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('node-style', function(Y) { @@ -87,4 +87,4 @@ Y.NodeList.importMethod(Y.Node.prototype, methods); })(Y); -}, '3.0.0' ,{requires:['dom-style', 'node-base']}); +}, '3.3.0' ,{requires:['dom-style', 'node-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/node/node.js b/jssource/src_files/include/javascript/yui3/build/node/node.js index f0672b17..84e6219b 100644 --- a/jssource/src_files/include/javascript/yui3/build/node/node.js +++ b/jssource/src_files/include/javascript/yui3/build/node/node.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('node-base', function(Y) { @@ -11,7 +11,7 @@ YUI.add('node-base', function(Y) { * The Node Utility provides a DOM-like interface for interacting with DOM nodes. * @module node * @submodule node-base - */ + */ /** * The Node class provides a wrapper for manipulating DOM Nodes. @@ -23,6 +23,7 @@ YUI.add('node-base', function(Y) { * * @class Node * @constructor + * @param {DOMNode} node the DOM node to be mapped to the Node instance. * @for Node */ @@ -34,40 +35,54 @@ var DOT = '.', TAG_NAME = 'tagName', UID = '_yuid', - Node = function(node) { - var uid = node[UID]; + _slice = Array.prototype.slice, + + Y_DOM = Y.DOM, - if (uid && Node._instances[uid] && Node._instances[uid]._node !== node) { + Y_Node = function(node) { + var uid = (node.nodeType !== 9) ? node.uniqueID : node[UID]; + + if (uid && Y_Node._instances[uid] && Y_Node._instances[uid]._node !== node) { node[UID] = null; // unset existing uid to prevent collision (via clone or hack) } - uid = Y.stamp(node); + uid = uid || Y.stamp(node); if (!uid) { // stamp failed; likely IE non-HTMLElement uid = Y.guid(); } this[UID] = uid; + /** + * The underlying DOM node bound to the Y.Node instance + * @property _node + * @private + */ this._node = node; - Node._instances[uid] = this; + Y_Node._instances[uid] = this; this._stateProxy = node; // when augmented with Attribute + Y.EventTarget.call(this, {emitFacade:true}); + if (this._initPlugins) { // when augmented with Plugin.Host this._initPlugins(); } + + this.SHOW_TRANSITION = Y_Node.SHOW_TRANSITION; + this.HIDE_TRANSITION = Y_Node.HIDE_TRANSITION; }, // used with previous/next/ancestor tests _wrapFn = function(fn) { var ret = null; if (fn) { - ret = (typeof fn === 'string') ? + ret = (typeof fn == 'string') ? function(n) { return Y.Selector.test(n, fn); - } : + } : function(n) { - return fn(Node.get(n)); + return fn(Y.one(n)); }; } @@ -75,140 +90,211 @@ var DOT = '.', }; // end "globals" -Node.NAME = 'Node'; - -Node.re_aria = /^(?:role$|aria-)/; - -Node.DOM_EVENTS = { - abort: true, - beforeunload: true, - blur: true, - change: true, - click: true, - close: true, - command: true, - contextmenu: true, - drag: true, - dragstart: true, - dragenter: true, - dragover: true, - dragleave: true, - dragend: true, - drop: true, - dblclick: true, - error: true, - focus: true, - keydown: true, - keypress: true, - keyup: true, - load: true, - message: true, - mousedown: true, - mousemove: true, - mouseout: true, - mouseover: true, - mouseup: true, - mousemultiwheel: true, - mousewheel: true, - submit: true, - mouseenter: true, - mouseleave: true, - scroll: true, - reset: true, - resize: true, - select: true, - textInput: true, - unload: true +/** + * The name of the component + * @static + * @property NAME + */ +Y_Node.NAME = 'node'; + +/* + * The pattern used to identify ARIA attributes + */ +Y_Node.re_aria = /^(?:role$|aria-)/; + +Y_Node.SHOW_TRANSITION = 'fadeIn'; +Y_Node.HIDE_TRANSITION = 'fadeOut'; + +/** + * List of events that route to DOM events + * @static + * @property DOM_EVENTS + */ + +Y_Node.DOM_EVENTS = { + abort: 1, + beforeunload: 1, + blur: 1, + change: 1, + click: 1, + close: 1, + command: 1, + contextmenu: 1, + dblclick: 1, + DOMMouseScroll: 1, + drag: 1, + dragstart: 1, + dragenter: 1, + dragover: 1, + dragleave: 1, + dragend: 1, + drop: 1, + error: 1, + focus: 1, + key: 1, + keydown: 1, + keypress: 1, + keyup: 1, + load: 1, + message: 1, + mousedown: 1, + mouseenter: 1, + mouseleave: 1, + mousemove: 1, + mousemultiwheel: 1, + mouseout: 1, + mouseover: 1, + mouseup: 1, + mousewheel: 1, + orientationchange: 1, + reset: 1, + resize: 1, + select: 1, + selectstart: 1, + submit: 1, + scroll: 1, + textInput: 1, + unload: 1 }; // Add custom event adaptors to this list. This will make it so // that delegate, key, available, contentready, etc all will // be available through Node.on -Y.mix(Node.DOM_EVENTS, Y.Env.evt.plugins); +Y.mix(Y_Node.DOM_EVENTS, Y.Env.evt.plugins); -Node._instances = {}; +/** + * A list of Node instances that have been created + * @private + * @property _instances + * @static + * + */ +Y_Node._instances = {}; /** * Retrieves the DOM node bound to a Node instance - * @method Node.getDOMNode + * @method getDOMNode * @static * * @param {Y.Node || HTMLNode} node The Node instance or an HTMLNode * @return {HTMLNode} The DOM node bound to the Node instance. If a DOM node is passed * as the node argument, it is simply returned. */ -Node.getDOMNode = function(node) { +Y_Node.getDOMNode = function(node) { if (node) { return (node.nodeType) ? node : node._node || null; } return null; }; - -Node.scrubVal = function(val, node) { - if (node && val) { // only truthy values are risky - if (typeof val === 'object' || typeof val === 'function') { // safari nodeList === function - if (NODE_TYPE in val || Y.DOM.isWindow(val)) {// node || window - val = Node.get(val); + +/** + * Checks Node return values and wraps DOM Nodes as Y.Node instances + * and DOM Collections / Arrays as Y.NodeList instances. + * Other return values just pass thru. If undefined is returned (e.g. no return) + * then the Node instance is returned for chainability. + * @method scrubVal + * @static + * + * @param {any} node The Node instance or an HTMLNode + * @return {Y.Node | Y.NodeList | any} Depends on what is returned from the DOM node. + */ +Y_Node.scrubVal = function(val, node) { + if (val) { // only truthy values are risky + if (typeof val == 'object' || typeof val == 'function') { // safari nodeList === function + if (NODE_TYPE in val || Y_DOM.isWindow(val)) {// node || window + val = Y.one(val); } else if ((val.item && !val._nodes) || // dom collection or Node instance (val[0] && val[0][NODE_TYPE])) { // array of DOM Nodes val = Y.all(val); } } - } else if (val === undefined) { + } else if (typeof val === 'undefined') { val = node; // for chaining + } else if (val === null) { + val = null; // IE: DOM null not the same as null } return val; }; -Node.addMethod = function(name, fn, context) { - if (name && fn && typeof fn === 'function') { - Node.prototype[name] = function() { - context = context || this; - var args = Y.Array(arguments), +/** + * Adds methods to the Y.Node prototype, routing through scrubVal. + * @method addMethod + * @static + * + * @param {String} name The name of the method to add + * @param {Function} fn The function that becomes the method + * @param {Object} context An optional context to call the method with + * (defaults to the Node instance) + * @return {any} Depends on what is returned from the DOM node. + */ +Y_Node.addMethod = function(name, fn, context) { + if (name && fn && typeof fn == 'function') { + Y_Node.prototype[name] = function() { + var args = _slice.call(arguments), + node = this, ret; - if (args[0] && args[0] instanceof Node) { + if (args[0] && Y.instanceOf(args[0], Y_Node)) { args[0] = args[0]._node; } - if (args[1] && args[1] instanceof Node) { + if (args[1] && Y.instanceOf(args[1], Y_Node)) { args[1] = args[1]._node; } - args.unshift(this._node); - ret = Node.scrubVal(fn.apply(context, args), this); + args.unshift(node._node); + + ret = fn.apply(node, args); + + if (ret) { // scrub truthy + ret = Y_Node.scrubVal(ret, node); + } + + (typeof ret != 'undefined') || (ret = node); return ret; }; } else { } }; -Node.importMethod = function(host, name, altName) { - if (typeof name === 'string') { +/** + * Imports utility methods to be added as Y.Node methods. + * @method importMethod + * @static + * + * @param {Object} host The object that contains the method to import. + * @param {String} name The name of the method to import + * @param {String} altName An optional name to use in place of the host name + * @param {Object} context An optional context to call the method with + */ +Y_Node.importMethod = function(host, name, altName) { + if (typeof name == 'string') { altName = altName || name; - Node.addMethod(altName, host[name], host); + Y_Node.addMethod(altName, host[name], host); } else { - Y.each(name, function(n) { - Node.importMethod(host, n); + Y.Array.each(name, function(n) { + Y_Node.importMethod(host, n); }); } }; /** * Returns a single Node instance bound to the node or the - * first element matching the given selector. + * first element matching the given selector. Returns null if no match found. + * Note: For chaining purposes you may want to + * use Y.all, which returns a NodeList when no match is found. * @method Y.one * @static - * @param {String | HTMLElement} node a node or Selector - * @param {Y.Node || HTMLElement} doc an optional document to scan. Defaults to Y.config.doc. + * @param {String | HTMLElement} node a node or Selector + * @return {Y.Node | null} a Node instance or null if no match found. */ -Node.one = function(node) { +Y_Node.one = function(node) { var instance = null, cachedNode, uid; if (node) { - if (typeof node === 'string') { + if (typeof node == 'string') { if (node.indexOf('doc') === 0) { // doc OR document node = Y.config.doc; } else if (node.indexOf('win') === 0) { // win OR window @@ -219,46 +305,44 @@ Node.one = function(node) { if (!node) { return null; } - } else if (node instanceof Node) { + } else if (Y.instanceOf(node, Y_Node)) { return node; // NOTE: return } - uid = node._yuid; - instance = Node._instances[uid]; // reuse exising instances - cachedNode = instance ? instance._node : null; - if (!instance || (cachedNode && node !== cachedNode)) { // new Node when nodes don't match - instance = new Node(node); + if (node.nodeType || Y.DOM.isWindow(node)) { // avoid bad input (numbers, boolean, etc) + uid = (node.uniqueID && node.nodeType !== 9) ? node.uniqueID : node._yuid; + instance = Y_Node._instances[uid]; // reuse exising instances + cachedNode = instance ? instance._node : null; + if (!instance || (cachedNode && node !== cachedNode)) { // new Node when nodes don't match + instance = new Y_Node(node); + } } } return instance; }; /** - * Returns a single Node instance bound to the node or the - * first element matching the given selector. - * @method Y.get - * @deprecated Use Y.one + * Returns a new dom node using the provided markup string. + * @method create * @static - * @param {String | HTMLElement} node a node or Selector - * @param {Y.Node || HTMLElement} doc an optional document to scan. Defaults to Y.config.doc. + * @param {String} html The markup used to create the element + * @param {HTMLDocument} doc An optional document context + * @return {Node} A Node instance bound to a DOM node or fragment */ -Node.get = function() { - return Node.one.apply(Node, arguments); +Y_Node.create = function(html, doc) { + if (doc && doc._node) { + doc = doc._node; + } + return Y.one(Y_DOM.create(html, doc)); }; /** - * Creates a new dom node using the provided markup string. - * @method create + * Static collection of configuration attributes for special handling + * @property ATTRS * @static - * @param {String} html The markup used to create the element - * @param {HTMLDocument} doc An optional document context - * @return {Node} A Node instance bound to a DOM node or fragment + * @type object */ -Node.create = function() { - return Node.get(Y.DOM.create.apply(Y.DOM, arguments)); -}; - -Node.ATTRS = { +Y_Node.ATTRS = { /** * Allows for getting and setting the text of an element. * Formatting is preserved and special characters are treated literally. @@ -267,11 +351,11 @@ Node.ATTRS = { */ text: { getter: function() { - return Y.DOM.getText(this._node); + return Y_DOM.getText(this._node); }, setter: function(content) { - Y.DOM.setText(this._node, content); + Y_DOM.setText(this._node, content); return content; } }, @@ -282,15 +366,6 @@ Node.ATTRS = { } }, - // IE: elements collection is also FORM node which trips up scrubVal. - // preconverting to NodeList - // TODO: break out for IE only - 'elements': { - getter: function() { - return Y.all(this._node.elements); - } - }, - /** * Returns a NodeList instance of all HTMLElement children. * @readOnly @@ -319,29 +394,26 @@ Node.ATTRS = { value: { getter: function() { - return Y.DOM.getValue(this._node); + return Y_DOM.getValue(this._node); }, setter: function(val) { - Y.DOM.setValue(this._node, val); - return val; - } - }, - - data: { - getter: function() { - return this._data; - }, - - setter: function(val) { - this._data = val; + Y_DOM.setValue(this._node, val); return val; } } }; -// call with instance context -Node.DEFAULT_SETTER = function(name, val) { +/** + * The default setter for DOM properties + * Called with instance context (this === the Node instance) + * @method DEFAULT_SETTER + * @static + * @param {String} name The attribute/property being set + * @param {any} val The value to be set + * @return {any} The value + */ +Y_Node.DEFAULT_SETTER = function(name, val) { var node = this._stateProxy, strPath; @@ -350,55 +422,75 @@ Node.DEFAULT_SETTER = function(name, val) { name = name.split(DOT); // only allow when defined on node Y.Object.setValue(node, name, val); - } else if (node[name] !== undefined) { // pass thru DOM properties + } else if (typeof node[name] != 'undefined') { // pass thru DOM properties node[name] = val; } return val; }; -// call with instance context -Node.DEFAULT_GETTER = function(name) { +/** + * The default getter for DOM properties + * Called with instance context (this === the Node instance) + * @method DEFAULT_GETTER + * @static + * @param {String} name The attribute/property to look up + * @return {any} The current value + */ +Y_Node.DEFAULT_GETTER = function(name) { var node = this._stateProxy, val; if (name.indexOf && name.indexOf(DOT) > -1) { val = Y.Object.getValue(node, name.split(DOT)); - } else if (node[name] !== undefined) { // pass thru from DOM + } else if (typeof node[name] != 'undefined') { // pass thru from DOM val = node[name]; } return val; }; -Y.augment(Node, Y.Event.Target); +// Basic prototype augment - no lazy constructor invocation. +Y.mix(Y_Node, Y.EventTarget, false, null, 1); -Y.mix(Node.prototype, { +Y.mix(Y_Node.prototype, { +/** + * The method called when outputting Node instances as strings + * @method toString + * @return {String} A string representation of the Node instance + */ toString: function() { - var str = '', - errorMsg = this[UID] + ': not bound to a node', - node = this._node; + var str = this[UID] + ': not bound to a node', + node = this._node, + attrs, id, className; if (node) { - str += node[NODE_NAME]; - if (node.id) { - str += '#' + node.id; + attrs = node.attributes; + id = (attrs && attrs.id) ? node.getAttribute('id') : null; + className = (attrs && attrs.className) ? node.getAttribute('className') : null; + str = node[NODE_NAME]; + + if (id) { + str += '#' + id; } - if (node.className) { - str += '.' + node.className.replace(' ', '.'); + if (className) { + str += '.' + className.replace(' ', '.'); } // TODO: add yuid? str += ' ' + this[UID]; } - return str || errorMsg; + return str; }, /** - * Returns an attribute value on the Node instance + * Returns an attribute value on the Node instance. + * Unless pre-configured (via Node.ATTRS), get hands + * off to the underlying DOM node. Only valid + * attributes/properties for the node will be set. * @method get - * @param {String} attr The attribute to be set + * @param {String} attr The attribute * @return {any} The current value of the attribute */ get: function(attr) { @@ -411,21 +503,30 @@ Y.mix(Node.prototype, { } if (val) { - val = Y.Node.scrubVal(val, this); + val = Y_Node.scrubVal(val, this); + } else if (val === null) { + val = null; // IE: DOM null is not true null (even though they ===) } return val; }, + /** + * Helper method for get. + * @method _get + * @private + * @param {String} attr The attribute + * @return {any} The current value of the attribute + */ _get: function(attr) { - var attrConfig = Node.ATTRS[attr], + var attrConfig = Y_Node.ATTRS[attr], val; if (attrConfig && attrConfig.getter) { val = attrConfig.getter.call(this); - } else if (Node.re_aria.test(attr)) { - val = this._node.getAttribute(attr, 2); + } else if (Y_Node.re_aria.test(attr)) { + val = this._node.getAttribute(attr, 2); } else { - val = Node.DEFAULT_GETTER.apply(this, arguments); + val = Y_Node.DEFAULT_GETTER.apply(this, arguments); } return val; @@ -433,23 +534,27 @@ Y.mix(Node.prototype, { /** * Sets an attribute on the Node instance. + * Unless pre-configured (via Node.ATTRS), set hands + * off to the underlying DOM node. Only valid + * attributes/properties for the node will be set. + * To set custom attributes use setAttribute. * @method set - * @param {String} attr The attribute to be set. - * @param {any} val The value to set the attribute to. + * @param {String} attr The attribute to be set. + * @param {any} val The value to set the attribute to. * @chainable */ set: function(attr, val) { - var attrConfig = Node.ATTRS[attr]; + var attrConfig = Y_Node.ATTRS[attr]; if (this._setAttr) { // use Attribute imple this._setAttr.apply(this, arguments); } else { // use setters inline if (attrConfig && attrConfig.setter) { - attrConfig.setter.call(this, val); - } else if (Node.re_aria.test(attr)) { // special case Aria + attrConfig.setter.call(this, val, attr); + } else if (Y_Node.re_aria.test(attr)) { // special case Aria this._node.setAttribute(attr, val); } else { - Node.DEFAULT_SETTER.apply(this, arguments); + Y_Node.DEFAULT_SETTER.apply(this, arguments); } } @@ -457,9 +562,9 @@ Y.mix(Node.prototype, { }, /** - * Sets multiple attributes. + * Sets multiple attributes. * @method setAttrs - * @param {Object} attrMap an object of name/value pairs to set + * @param {Object} attrMap an object of name/value pairs to set * @chainable */ setAttrs: function(attrMap) { @@ -467,7 +572,7 @@ Y.mix(Node.prototype, { this._setAttrs(attrMap); } else { // use setters inline Y.Object.each(attrMap, function(v, n) { - this.set(n, v); + this.set(n, v); }, this); } @@ -475,9 +580,9 @@ Y.mix(Node.prototype, { }, /** - * Returns an object containing the values for the requested attributes. + * Returns an object containing the values for the requested attributes. * @method getAttrs - * @param {Array} attrs an array of attributes to get values + * @param {Array} attrs an array of attributes to get values * @return {Object} An object with attribute name/value pairs. */ getAttrs: function(attrs) { @@ -486,7 +591,7 @@ Y.mix(Node.prototype, { this._getAttrs(attrs); } else { // use setters inline Y.Array.each(attrs, function(v, n) { - ret[v] = this.get(v); + ret[v] = this.get(v); }, this); } @@ -494,24 +599,25 @@ Y.mix(Node.prototype, { }, /** - * Creates a new Node using the provided markup string. + * Creates a new Node using the provided markup string. * @method create * @param {String} html The markup used to create the element - * @param {HTMLDocument} doc An optional document context - * @return {Node} A Node instance bound to a DOM node or fragment + * @param {HTMLDocument} doc An optional document context + * @return {Node} A Node instance bound to a DOM node or fragment */ - create: Node.create, + create: Y_Node.create, /** * Compares nodes to determine if they match. * Node instances can be compared to each other and/or HTMLElements. * @method compareTo * @param {HTMLElement | Node} refNode The reference node to compare to the node. - * @return {Boolean} True if the nodes match, false if they do not. + * @return {Boolean} True if the nodes match, false if they do not. */ compareTo: function(refNode) { var node = this._node; - if (refNode instanceof Y.Node) { + + if (Y.instanceOf(refNode, Y_Node)) { refNode = refNode._node; } return node === refNode; @@ -521,21 +627,21 @@ Y.mix(Node.prototype, { * Determines whether the node is appended to the document. * @method inDoc * @param {Node|HTMLElement} doc optional An optional document to check against. - * Defaults to current document. - * @return {Boolean} Whether or not this node is appended to the document. + * Defaults to current document. + * @return {Boolean} Whether or not this node is appended to the document. */ inDoc: function(doc) { var node = this._node; doc = (doc) ? doc._node || doc : node[OWNER_DOCUMENT]; if (doc.documentElement) { - return Y.DOM.contains(doc.documentElement, node); + return Y_DOM.contains(doc.documentElement, node); } }, getById: function(id) { var node = this._node, - ret = Y.DOM.byId(id, node[OWNER_DOCUMENT]); - if (ret && Y.DOM.contains(node, ret)) { + ret = Y_DOM.byId(id, node[OWNER_DOCUMENT]); + if (ret && Y_DOM.contains(node, ret)) { ret = Y.one(ret); } else { ret = null; @@ -547,15 +653,28 @@ Y.mix(Node.prototype, { * Returns the nearest ancestor that passes the test applied by supplied boolean method. * @method ancestor * @param {String | Function} fn A selector string or boolean method for testing elements. + * @param {Boolean} testSelf optional Whether or not to include the element in the scan * If a function is used, it receives the current node being tested as the only argument. * @return {Node} The matching Node instance or null if not found */ - ancestor: function(fn) { - return Node.get(Y.DOM.elementByAxis(this._node, 'parentNode', _wrapFn(fn))); + ancestor: function(fn, testSelf) { + return Y.one(Y_DOM.ancestor(this._node, _wrapFn(fn), testSelf)); + }, + + /** + * Returns the ancestors that pass the test applied by supplied boolean method. + * @method ancestors + * @param {String | Function} fn A selector string or boolean method for testing elements. + * @param {Boolean} testSelf optional Whether or not to include the element in the scan + * If a function is used, it receives the current node being tested as the only argument. + * @return {NodeList} A NodeList instance containing the matching elements + */ + ancestors: function(fn, testSelf) { + return Y.all(Y_DOM.ancestors(this._node, _wrapFn(fn), testSelf)); }, /** - * Returns the previous matching sibling. + * Returns the previous matching sibling. * Returns the nearest element node sibling if no method provided. * @method previous * @param {String | Function} fn A selector or boolean method for testing elements. @@ -563,45 +682,46 @@ Y.mix(Node.prototype, { * @return {Node} Node instance or null if not found */ previous: function(fn, all) { - return Node.get(Y.DOM.elementByAxis(this._node, 'previousSibling', _wrapFn(fn), all)); - }, + return Y.one(Y_DOM.elementByAxis(this._node, 'previousSibling', _wrapFn(fn), all)); + }, /** - * Returns the next matching sibling. + * Returns the next matching sibling. * Returns the nearest element node sibling if no method provided. * @method next * @param {String | Function} fn A selector or boolean method for testing elements. * If a function is used, it receives the current node being tested as the only argument. * @return {Node} Node instance or null if not found */ - next: function(node, fn, all) { - return Node.get(Y.DOM.elementByAxis(this._node, 'nextSibling', _wrapFn(fn), all)); + next: function(fn, all) { + return Y.one(Y_DOM.elementByAxis(this._node, 'nextSibling', _wrapFn(fn), all)); }, - + /** - * Retrieves a Node instance of nodes based on the given CSS selector. - * @method one - * - * @param {string} selector The CSS selector to test against. - * @return {Node} A Node instance for the matching HTMLElement. + * Returns all matching siblings. + * Returns all siblings if no method provided. + * @method siblings + * @param {String | Function} fn A selector or boolean method for testing elements. + * If a function is used, it receives the current node being tested as the only argument. + * @return {NodeList} NodeList instance bound to found siblings */ - one: function(selector) { - return Y.one(Y.Selector.query(selector, this._node, true)); + siblings: function(fn) { + return Y.all(Y_DOM.siblings(this._node, _wrapFn(fn))); }, /** - * Retrieves a Node instance of nodes based on the given CSS selector. - * @method query - * @deprecated Use one() + * Retrieves a Node instance of nodes based on the given CSS selector. + * @method one + * * @param {string} selector The CSS selector to test against. * @return {Node} A Node instance for the matching HTMLElement. */ - query: function(selector) { - return this.one(selector); + one: function(selector) { + return Y.one(Y.Selector.query(selector, this._node, true)); }, /** - * Retrieves a nodeList based on the given CSS selector. + * Retrieves a nodeList based on the given CSS selector. * @method all * * @param {string} selector The CSS selector to test against. @@ -610,20 +730,10 @@ Y.mix(Node.prototype, { all: function(selector) { var nodelist = Y.all(Y.Selector.query(selector, this._node)); nodelist._query = selector; + nodelist._queryRoot = this._node; return nodelist; }, - /** - * Retrieves a nodeList based on the given CSS selector. - * @method queryAll - * @deprecated Use all() - * @param {string} selector The CSS selector to test against. - * @return {NodeList} A NodeList instance for the matching HTMLCollection/Array. - */ - queryAll: function(selector) { - return this.all(selector); - }, - // TODO: allow fn test /** * Test if the supplied node matches the supplied selector. @@ -640,15 +750,23 @@ Y.mix(Node.prototype, { * Removes the node from its parent. * Shortcut for myNode.get('parentNode').removeChild(myNode); * @method remove + * @param {Boolean} destroy whether or not to call destroy() on the node + * after removal. * @chainable * */ remove: function(destroy) { - var node = this._node; - node.parentNode.removeChild(node); + var node = this._node, + parentNode = node.parentNode; + + if (parentNode) { + parentNode.removeChild(node); + } + if (destroy) { - this.destroy(true); + this.destroy(); } + return this; }, @@ -657,40 +775,99 @@ Y.mix(Node.prototype, { * and does not change the node bound to the Node instance. * Shortcut for myNode.get('parentNode').replaceChild(newNode, myNode); * @method replace + * @param {Y.Node || HTMLNode} newNode Node to be inserted * @chainable * */ replace: function(newNode) { var node = this._node; - node.parentNode.replaceChild(newNode, node); + if (typeof newNode == 'string') { + newNode = Y_Node.create(newNode); + } + node.parentNode.replaceChild(Y_Node.getDOMNode(newNode), node); return this; }, + /** + * @method replaceChild + * @for Node + * @param {String | HTMLElement | Node} node Node to be inserted + * @param {HTMLElement | Node} refNode Node to be replaced + * @return {Node} The replaced node + */ + replaceChild: function(node, refNode) { + if (typeof node == 'string') { + node = Y_DOM.create(node); + } + + return Y.one(this._node.replaceChild(Y_Node.getDOMNode(node), Y_Node.getDOMNode(refNode))); + }, + + /** + * @method appendChild + * @param {String | HTMLElement | Node} node Node to be appended + * @return {Node} The appended node + */ + appendChild: function(node) { + return Y_Node.scrubVal(this._insert(node)); + }, + + /** + * @method insertBefore + * @param {String | HTMLElement | Node} newNode Node to be appended + * @param {HTMLElement | Node} refNode Node to be inserted before + * @return {Node} The inserted node + */ + insertBefore: function(newNode, refNode) { + return Y.Node.scrubVal(this._insert(newNode, refNode)); + }, + + /** + * Removes event listeners from the node and (optionally) its subtree + * @method purge + * @param {Boolean} recurse (optional) Whether or not to remove listeners from the + * node's subtree + * @param {String} type (optional) Only remove listeners of the specified type + * @chainable + * + */ purge: function(recurse, type) { Y.Event.purgeElement(this._node, recurse, type); + return this; }, - destroy: function(purge) { - delete Node._instances[this[UID]]; - if (purge) { - this.purge(true); - } + /** + * Nulls internal node references, removes any plugins and event listeners + * @method destroy + * @param {Boolean} recursivePurge (optional) Whether or not to remove listeners from the + * node's subtree (default is false) + * + */ + destroy: function(recursive) { + this.purge(); // TODO: only remove events add via this Node - if (this.unplug) { + if (this.unplug) { // may not be a PluginHost this.unplug(); } - this._node._yuid = null; + this.clearData(); + + if (recursive) { + this.all('*').destroy(); + } + this._node = null; this._stateProxy = null; + + delete Y_Node._instances[this[UID]]; }, /** - * Invokes a method on the Node instance + * Invokes a method on the Node instance * @method invoke * @param {String} method The name of the method to invoke - * @param {Any} a, b, c, etc. Arguments to invoke the method with. - * @return Whatever the underly method returns. + * @param {Any} a, b, c, etc. Arguments to invoke the method with. + * @return Whatever the underly method returns. * DOM Nodes and Collections return values * are converted to Node/NodeList instances. * @@ -699,131 +876,324 @@ Y.mix(Node.prototype, { var node = this._node, ret; - if (a && a instanceof Y.Node) { + if (a && Y.instanceOf(a, Y_Node)) { a = a._node; } - if (b && b instanceof Y.Node) { + if (b && Y.instanceOf(b, Y_Node)) { b = b._node; } - ret = node[method](a, b, c, d, e); - return Y.Node.scrubVal(ret, this); + ret = node[method](a, b, c, d, e); + return Y_Node.scrubVal(ret, this); }, /** - * Applies the given function to each Node in the NodeList. - * @method each - * @deprecated Use NodeList - * @param {Function} fn The function to apply - * @param {Object} context optional An optional context to apply the function with - * Default context is the NodeList instance + * Inserts the content before the reference node. + * @method insert + * @param {String | Y.Node | HTMLElement | Y.NodeList | HTMLCollection} content The content to insert + * @param {Int | Y.Node | HTMLElement | String} where The position to insert at. + * Possible "where" arguments + *
          + *
          Y.Node
          + *
          The Node to insert before
          + *
          HTMLElement
          + *
          The element to insert before
          + *
          Int
          + *
          The index of the child element to insert before
          + *
          "replace"
          + *
          Replaces the existing HTML
          + *
          "before"
          + *
          Inserts before the existing HTML
          + *
          "before"
          + *
          Inserts content before the node
          + *
          "after"
          + *
          Inserts content after the node
          + *
          * @chainable */ - each: function(fn, context) { - context = context || this; - return fn.call(context, this); + insert: function(content, where) { + this._insert(content, where); + return this; + }, + + _insert: function(content, where) { + var node = this._node, + ret = null; + + if (typeof where == 'number') { // allow index + where = this._node.childNodes[where]; + } else if (where && where._node) { // Node + where = where._node; + } + + if (content && typeof content != 'string') { // allow Node or NodeList/Array instances + content = content._node || content._nodes || content; + } + ret = Y_DOM.addHTML(node, content, where); + + return ret; }, /** - * Retrieves the Node instance at the given index. - * @method item - * @deprecated Use NodeList - * - * @param {Number} index The index of the target Node. - * @return {Node} The Node instance at the given index. + * Inserts the content as the firstChild of the node. + * @method prepend + * @param {String | Y.Node | HTMLElement} content The content to insert + * @chainable */ - item: function(index) { - return this; + prepend: function(content) { + return this.insert(content, 0); }, /** - * Returns the current number of items in the Node. - * @method size - * @deprecated Use NodeList - * @return {Int} The number of items in the Node. + * Inserts the content as the lastChild of the node. + * @method append + * @param {String | Y.Node | HTMLElement} content The content to insert + * @chainable */ - size: function() { - return this._node ? 1 : 0; + append: function(content) { + return this.insert(content, null); }, /** - * Inserts the content before the reference node. - * @method insert - * @param {String | Y.Node | HTMLElement} content The content to insert - * @param {Int | Y.Node | HTMLElement | String} where The position to insert at. + * Appends the node to the given node. + * @method appendTo + * @param {Y.Node | HTMLElement} node The node to append to * @chainable */ - insert: function(content, where) { - var node = this._node; + appendTo: function(node) { + Y.one(node).append(this); + return this; + }, + + /** + * Replaces the node's current content with the content. + * @method setContent + * @param {String | Y.Node | HTMLElement | Y.NodeList | HTMLCollection} content The content to insert + * @chainable + */ + setContent: function(content) { + this._insert(content, 'replace'); + return this; + }, + + /** + * Returns the node's current content (e.g. innerHTML) + * @method getContent + * @return {String} The current content + */ + getContent: function(content) { + return this.get('innerHTML'); + }, + + /** + * @method swap + * @description Swap DOM locations with the given node. + * This does not change which DOM node each Node instance refers to. + * @param {Node} otherNode The node to swap with + * @chainable + */ + swap: Y.config.doc.documentElement.swapNode ? + function(otherNode) { + this._node.swapNode(Y_Node.getDOMNode(otherNode)); + } : + function(otherNode) { + otherNode = Y_Node.getDOMNode(otherNode); + var node = this._node, + parent = otherNode.parentNode, + nextSibling = otherNode.nextSibling; - if (content) { - if (typeof where === 'number') { // allow index - where = this._node.childNodes[where]; + if (nextSibling === node) { + parent.insertBefore(node, otherNode); + } else if (otherNode === node.nextSibling) { + parent.insertBefore(otherNode, node); + } else { + node.parentNode.replaceChild(otherNode, node); + Y_DOM.addHTML(parent, node, nextSibling); } + return this; + }, - if (typeof content !== 'string') { // allow Node or NodeList/Array instances - if (content._node) { // Node - content = content._node; - } else if (content._nodes || (!content.nodeType && content.length)) { // NodeList or Array - Y.each(content._nodes, function(n) { - Y.DOM.addHTML(node, n, where); - }); - return this; // NOTE: early return - } + /** + * @method getData + * @description Retrieves arbitrary data stored on a Node instance. + * This is not stored with the DOM node. + * @param {string} name Optional name of the data field to retrieve. + * If no name is given, all data is returned. + * @return {any | Object} Whatever is stored at the given field, + * or an object hash of all fields. + */ + getData: function(name) { + var ret; + this._data = this._data || {}; + if (arguments.length) { + ret = this._data[name]; + } else { + ret = this._data; + } + + return ret; + + }, + + /** + * @method setData + * @description Stores arbitrary data on a Node instance. + * This is not stored with the DOM node. + * @param {string} name The name of the field to set. If no name + * is given, name is treated as the data and overrides any existing data. + * @param {any} val The value to be assigned to the field. + * @chainable + */ + setData: function(name, val) { + this._data = this._data || {}; + if (arguments.length > 1) { + this._data[name] = val; + } else { + this._data = name; + } + + return this; + }, + + /** + * @method clearData + * @description Clears stored data. + * @param {string} name The name of the field to clear. If no name + * is given, all data is cleared. + * @chainable + */ + clearData: function(name) { + if ('_data' in this) { + if (name) { + delete this._data[name]; + } else { + delete this._data; } - Y.DOM.addHTML(node, content, where); } + return this; }, + hasMethod: function(method) { + var node = this._node; + return !!(node && method in node && + typeof node[method] != 'unknown' && + (typeof node[method] == 'function' || + String(node[method]).indexOf('function') === 1)); // IE reports as object, prepends space + }, + + SHOW_TRANSITION: null, + HIDE_TRANSITION: null, + /** - * Inserts the content as the firstChild of the node. - * @method prepend - * @param {String | Y.Node | HTMLElement} content The content to insert + * Makes the node visible. + * If the "transition" module is loaded, show optionally + * animates the showing of the node using either the default + * transition effect ('fadeIn'), or the given named effect. + * @method show + * @param {String} name A named Transition effect to use as the show effect. + * @param {Object} config Options to use with the transition. + * @param {Function} callback An optional function to run after the transition completes. * @chainable */ - prepend: function(content) { - return this.insert(content, 0); + show: function(callback) { + callback = arguments[arguments.length - 1]; + this.toggleView(true, callback); + return this; }, /** - * Inserts the content as the lastChild of the node. - * @method append - * @param {String | Y.Node | HTMLElement} content The content to insert + * The implementation for showing nodes. + * Default is to toggle the style.display property. + * @protected * @chainable */ - append: function(content) { - return this.insert(content, null); + _show: function() { + this.setStyle('display', ''); + + }, + + _isHidden: function() { + return Y.DOM.getStyle(this._node, 'display') === 'none'; + }, + + toggleView: function(on, callback) { + this._toggleView.apply(this, arguments); + }, + + _toggleView: function(on, callback) { + callback = arguments[arguments.length - 1]; + + // base on current state if not forcing + if (typeof on != 'boolean') { + on = (this._isHidden()) ? 1 : 0; + } + + if (on) { + this._show(); + } else { + this._hide(); + } + + if (typeof callback == 'function') { + callback.call(this); + } + + return this; }, /** - * Replaces the node's current content with the content. - * @method setContent - * @param {String | Y.Node | HTMLElement} content The content to insert + * Hides the node. + * If the "transition" module is loaded, hide optionally + * animates the hiding of the node using either the default + * transition effect ('fadeOut'), or the given named effect. + * @method hide + * @param {String} name A named Transition effect to use as the show effect. + * @param {Object} config Options to use with the transition. + * @param {Function} callback An optional function to run after the transition completes. * @chainable */ - setContent: function(content) { - Y.DOM.addHTML(this._node, content, 'replace'); + hide: function(callback) { + callback = arguments[arguments.length - 1]; + this.toggleView(false, callback); return this; }, - // TODO: need this? - hasMethod: function(method) { - var node = this._node; - return (node && (typeof node === 'function')); + /** + * The implementation for hiding nodes. + * Default is to toggle the style.display property. + * @protected + * @chainable + */ + _hide: function() { + this.setStyle('display', 'none'); + }, + + isFragment: function() { + return (this.get('nodeType') === 11); + }, + + /** + * Removes all of the child nodes from the node. + * @param {Boolean} destroy Whether the nodes should also be destroyed. + * @chainable + */ + empty: function(destroy) { + this.get('childNodes').remove(destroy); + return this; } + }, true); -Y.Node = Node; -Y.get = Y.Node.get; +Y.Node = Y_Node; Y.one = Y.Node.one; /** * The NodeList module provides support for managing collections of Nodes. * @module node * @submodule nodelist - */ + */ /** * The NodeList class provides a wrapper for manipulating DOM NodeLists. @@ -835,17 +1205,32 @@ Y.one = Y.Node.one; */ var NodeList = function(nodes) { - if (typeof nodes === 'string') { + var tmp = []; + if (typeof nodes === 'string') { // selector query this._query = nodes; nodes = Y.Selector.query(nodes); - } else { + } else if (nodes.nodeType || Y_DOM.isWindow(nodes)) { // domNode || window + nodes = [nodes]; + } else if (Y.instanceOf(nodes, Y.Node)) { + nodes = [nodes._node]; + } else if (Y.instanceOf(nodes[0], Y.Node)) { // allow array of Y.Nodes + Y.Array.each(nodes, function(node) { + if (node._node) { + tmp.push(node._node); + } + }); + nodes = tmp; + } else { // array of domNodes or domNodeList (no mixed array of Y.Node/domNodes) nodes = Y.Array(nodes, 0, true); } - NodeList._instances[Y.stamp(this)] = this; + /** + * The underlying array of DOM nodes bound to the Y.NodeList instance + * @property _nodes + * @private + */ this._nodes = nodes; }; -// end "globals" NodeList.NAME = 'NodeList'; @@ -854,15 +1239,13 @@ NodeList.NAME = 'NodeList'; * @method NodeList.getDOMNodes * @static * - * @param {Y.NodeList} node The NodeList instance + * @param {Y.NodeList} nodelist The NodeList instance * @return {Array} The array of DOM nodes bound to the NodeList */ -NodeList.getDOMNodes = function(nodeList) { - return nodeList._nodes; +NodeList.getDOMNodes = function(nodelist) { + return (nodelist && nodelist._nodes) ? nodelist._nodes : nodelist; }; -NodeList._instances = []; - NodeList.each = function(instance, fn, context) { var nodes = instance._nodes; if (nodes && nodes.length) { @@ -878,7 +1261,7 @@ NodeList.addMethod = function(name, fn, context) { args = arguments; Y.Array.each(this._nodes, function(node) { - var UID = '_yuid', + var UID = (node.uniqueID && node.nodeType !== 9 ) ? 'uniqueID' : '_yuid', instance = Y.Node._instances[node[UID]], ctx, result; @@ -905,7 +1288,7 @@ NodeList.importMethod = function(host, name, altName) { altName = altName || name; NodeList.addMethod(name, host[name]); } else { - Y.each(name, function(n) { + Y.Array.each(name, function(n) { NodeList.importMethod(host, n); }); } @@ -925,7 +1308,7 @@ NodeList._getTempNode = function(node) { Y.mix(NodeList.prototype, { /** - * Retrieves the Node instance at the given index. + * Retrieves the Node instance at the given index. * @method item * * @param {Number} index The index of the target Node. @@ -986,8 +1369,8 @@ Y.mix(NodeList.prototype, { }, /** - * Creates a documenFragment from the nodes bound to the NodeList instance - * @method toDocFrag + * Creates a documenFragment from the nodes bound to the NodeList instance + * @method toFrag * @return Node a Node instance bound to the documentFragment */ toFrag: function() { @@ -1009,7 +1392,7 @@ Y.mix(NodeList.prototype, { * Filters the NodeList instance down to only nodes matching the given selector. * @method filter * @param {String} selector The selector to filter against - * @return {NodeList} NodeList containing the updated collection + * @return {NodeList} NodeList containing the updated collection * @see Selector */ filter: function(selector) { @@ -1018,13 +1401,13 @@ Y.mix(NodeList.prototype, { /** - * Creates a new NodeList containing all nodes at every n indices, where + * Creates a new NodeList containing all nodes at every n indices, where * remainder n % index equals r. * (zero-based index). * @method modulus * @param {Int} n The offset to use (return every nth node) - * @param {Int} r An optional remainder to use with the modulus operation (defaults to zero) - * @return {NodeList} NodeList containing the updated collection + * @param {Int} r An optional remainder to use with the modulus operation (defaults to zero) + * @return {NodeList} NodeList containing the updated collection */ modulus: function(n, r) { r = r || 0; @@ -1042,7 +1425,7 @@ Y.mix(NodeList.prototype, { * Creates a new NodeList containing all nodes at odd indices * (zero-based index). * @method odd - * @return {NodeList} NodeList containing the updated collection + * @return {NodeList} NodeList containing the updated collection */ odd: function() { return this.modulus(2, 1); @@ -1050,82 +1433,121 @@ Y.mix(NodeList.prototype, { /** * Creates a new NodeList containing all nodes at even indices - * (zero-based index), including zero. + * (zero-based index), including zero. * @method even - * @return {NodeList} NodeList containing the updated collection + * @return {NodeList} NodeList containing the updated collection */ even: function() { return this.modulus(2); }, destructor: function() { - delete NodeList._instances[this[UID]]; }, /** - * Reruns the initial query, when created using a selector query + * Reruns the initial query, when created using a selector query * @method refresh * @chainable */ refresh: function() { var doc, - nodes = this._nodes; - if (this._query) { - if (nodes && nodes[0] && nodes[0].ownerDocument) { - doc = nodes[0].ownerDocument; + nodes = this._nodes, + query = this._query, + root = this._queryRoot; + + if (query) { + if (!root) { + if (nodes && nodes[0] && nodes[0].ownerDocument) { + root = nodes[0].ownerDocument; + } } - this._nodes = Y.Selector.query(this._query, doc || Y.config.doc); + this._nodes = Y.Selector.query(query, root); } return this; }, + _prepEvtArgs: function(type, fn, context) { + // map to Y.on/after signature (type, fn, nodes, context, arg1, arg2, etc) + var args = Y.Array(arguments, 0, true); + + if (args.length < 2) { // type only (event hash) just add nodes + args[2] = this._nodes; + } else { + args.splice(2, 0, this._nodes); + } + + args[3] = context || this; // default to NodeList instance as context + + return args; + }, + /** - * Applies an event listener to each Node bound to the NodeList. + * Applies an event listener to each Node bound to the NodeList. * @method on * @param {String} type The event being listened for * @param {Function} fn The handler to call when the event fires * @param {Object} context The context to call the handler with. - * Default is the NodeList instance. - * @return {Object} Returns an event handle that can later be use to detach(). + * Default is the NodeList instance. + * @param {Object} context The context to call the handler with. + * param {mixed} arg* 0..n additional arguments to supply to the subscriber + * when the event fires. + * @return {Object} Returns an event handle that can later be use to detach(). * @see Event.on */ on: function(type, fn, context) { - var args = Y.Array(arguments, 0, true); - args.splice(2, 0, this._nodes); - args[3] = context || this; - return Y.on.apply(Y, args); + return Y.on.apply(Y, this._prepEvtArgs.apply(this, arguments)); }, /** - * Applies an event listener to each Node bound to the NodeList. + * Applies an one-time event listener to each Node bound to the NodeList. + * @method once + * @param {String} type The event being listened for + * @param {Function} fn The handler to call when the event fires + * @param {Object} context The context to call the handler with. + * Default is the NodeList instance. + * @return {Object} Returns an event handle that can later be use to detach(). + * @see Event.on + */ + once: function(type, fn, context) { + return Y.once.apply(Y, this._prepEvtArgs.apply(this, arguments)); + }, + + /** + * Applies an event listener to each Node bound to the NodeList. * The handler is called only after all on() handlers are called * and the event is not prevented. * @method after * @param {String} type The event being listened for * @param {Function} fn The handler to call when the event fires * @param {Object} context The context to call the handler with. - * Default is the NodeList instance. - * @return {Object} Returns an event handle that can later be use to detach(). + * Default is the NodeList instance. + * @return {Object} Returns an event handle that can later be use to detach(). * @see Event.on */ after: function(type, fn, context) { - var args = Y.Array(arguments, 0, true); - args.splice(2, 0, this._nodes); - args[3] = context || this; - return Y.after.apply(Y, args); + return Y.after.apply(Y, this._prepEvtArgs.apply(this, arguments)); }, /** * Returns the current number of items in the NodeList. * @method size - * @return {Int} The number of items in the NodeList. + * @return {Int} The number of items in the NodeList. */ size: function() { return this._nodes.length; }, + /** + * Determines if the instance is bound to any nodes + * @method isEmpty + * @return {Boolean} Whether or not the NodeList is bound to any nodes + */ + isEmpty: function() { + return this._nodes.length < 1; + }, + toString: function() { var str = '', errorMsg = this[UID] + ': not bound to any nodes', @@ -1136,11 +1558,11 @@ Y.mix(NodeList.prototype, { node = nodes[0]; str += node[NODE_NAME]; if (node.id) { - str += '#' + node.id; + str += '#' + node.id; } if (node.className) { - str += '.' + node.className.replace(' ', '.'); + str += '.' + node.className.replace(' ', '.'); } if (nodes.length > 1) { @@ -1161,22 +1583,34 @@ NodeList.importMethod(Y.Node.prototype, [ */ 'append', + /** Called on each Node instance + * @method destroy + * @see Node.destroy + */ + 'destroy', + /** * Called on each Node instance * @method detach * @see Node.detach */ 'detach', - + /** Called on each Node instance * @method detachAll * @see Node.detachAll */ 'detachAll', + /** Called on each Node instance + * @method empty + * @see Node.empty + */ + 'empty', + /** Called on each Node instance * @method insert - * @see NodeInsert + * @see Node.insert */ 'insert', @@ -1202,7 +1636,35 @@ NodeList.importMethod(Y.Node.prototype, [ * @method setContent * @see Node.setContent */ - 'setContent' + 'setContent', + + /** + * Makes each node visible. + * If the "transition" module is loaded, show optionally + * animates the showing of the node using either the default + * transition effect ('fadeIn'), or the given named effect. + * @method show + * @param {String} name A named Transition effect to use as the show effect. + * @param {Object} config Options to use with the transition. + * @param {Function} callback An optional function to run after the transition completes. + * @chainable + */ + 'show', + + /** + * Hides each node. + * If the "transition" module is loaded, hide optionally + * animates the hiding of the node using either the default + * transition effect ('fadeOut'), or the given named effect. + * @method hide + * @param {String} name A named Transition effect to use as the show effect. + * @param {Object} config Options to use with the transition. + * @param {Function} callback An optional function to run after the transition completes. + * @chainable + */ + 'hide', + + 'toggleView' ]); // one-off implementation to convert array of Nodes to NodeList @@ -1256,33 +1718,7 @@ Y.Node.all = Y.all; Y.Array.each([ /** * Passes through to DOM method. - * @method replaceChild * @for Node - * @param {HTMLElement | Node} node Node to be inserted - * @param {HTMLElement | Node} refNode Node to be replaced - * @return {Node} The replaced node - */ - 'replaceChild', - - /** - * Passes through to DOM method. - * @method appendChild - * @param {HTMLElement | Node} node Node to be appended - * @return {Node} The appended node - */ - 'appendChild', - - /** - * Passes through to DOM method. - * @method insertBefore - * @param {HTMLElement | Node} newNode Node to be appended - * @param {HTMLElement | Node} refNode Node to be inserted before - * @return {Node} The inserted node - */ - 'insertBefore', - - /** - * Passes through to DOM method. * @method removeChild * @param {HTMLElement | Node} node Node to be removed * @return {Node} The removed node @@ -1371,7 +1807,16 @@ Y.Array.each([ * @method select * @chainable */ - 'select' + 'select', + + /** + * Passes through to DOM method. + * Only valid on TABLE elements + * @method createCaption + * @chainable + */ + 'createCaption' + ], function(method) { Y.Node.prototype[method] = function(arg1, arg2, arg3) { var ret = this.invoke(method, arg1, arg2, arg3); @@ -1379,9 +1824,9 @@ Y.Array.each([ }; }); -Node.importMethod(Y.DOM, [ +Y.Node.importMethod(Y.DOM, [ /** - * Determines whether the ndoe is an ancestor of another HTML element in the DOM hierarchy. + * Determines whether the node is an ancestor of another HTML element in the DOM hierarchy. * @method contains * @param {Node | HTMLElement} needle The possible node or descendent * @return {Boolean} Whether or not this node is the needle its ancestor @@ -1407,9 +1852,43 @@ Node.importMethod(Y.DOM, [ * @param {string} name The attribute name * @return {string} The attribute value */ - 'getAttribute' + 'getAttribute', + + /** + * Wraps the given HTML around the node. + * @method wrap + * @param {String} html The markup to wrap around the node. + * @chainable + */ + 'wrap', + + /** + * Removes the node's parent node. + * @method unwrap + * @chainable + */ + 'unwrap', + + /** + * Applies a unique ID to the node if none exists + * @method generateID + * @return {String} The existing or generated ID + */ + 'generateID' ]); +Y.NodeList.importMethod(Y.Node.prototype, [ +/** + * Allows getting attributes on DOM nodes, normalizing in some cases. + * This passes through to the DOM node, allowing for custom attributes. + * @method getAttribute + * @see Node + * @for NodeList + * @param {string} name The attribute name + * @return {string} The attribute value + */ + + 'getAttribute', /** * Allows setting attributes on DOM nodes, normalizing in some cases. * This passes through to the DOM node, allowing for custom attributes. @@ -1420,17 +1899,38 @@ Node.importMethod(Y.DOM, [ * @param {string} name The attribute name * @param {string} value The value to set */ - + 'setAttribute', + /** - * Allows getting attributes on DOM nodes, normalizing in some cases. + * Allows for removing attributes on DOM nodes. * This passes through to the DOM node, allowing for custom attributes. - * @method getAttribute + * @method removeAttribute * @see Node * @for NodeList - * @param {string} name The attribute name - * @return {string} The attribute value + * @param {string} name The attribute to remove + */ + 'removeAttribute', +/** + * Removes the parent node from node in the list. + * @method unwrap + * @chainable + */ + 'unwrap', +/** + * Wraps the given HTML around each node. + * @method wrap + * @param {String} html The markup to wrap around the node. + * @chainable + */ + 'wrap', + +/** + * Applies a unique ID to each node if none exists + * @method generateID + * @return {String} The existing or generated ID */ -Y.NodeList.importMethod(Y.Node.prototype, ['getAttribute', 'setAttribute']); + 'generateID' +]); (function(Y) { var methods = [ /** @@ -1438,7 +1938,7 @@ Y.NodeList.importMethod(Y.Node.prototype, ['getAttribute', 'setAttribute']); * @method hasClass * @for Node * @param {String} className the class name to search for - * @return {Array} An array of booleans for each node bound to the NodeList. + * @return {Boolean} Whether or not the element has the specified class */ 'hasClass', @@ -1472,6 +1972,7 @@ Y.NodeList.importMethod(Y.Node.prototype, ['getAttribute', 'setAttribute']); * If the className exists on the node it is removed, if it doesn't exist it is added. * @method toggleClass * @param {String} className the class name to be toggled + * @param {Boolean} force Option to force adding or removing the class. * @chainable */ 'toggleClass' @@ -1523,12 +2024,27 @@ Y.NodeList.importMethod(Y.Node.prototype, ['getAttribute', 'setAttribute']); Y.NodeList.importMethod(Y.Node.prototype, methods); })(Y); -if (!document.documentElement.hasAttribute) { // IE < 8 +if (!Y.config.doc.documentElement.hasAttribute) { // IE < 8 Y.Node.prototype.hasAttribute = function(attr) { - return Y.DOM.getAttribute(this._node, attr) !== ''; + if (attr === 'value') { + if (this.get('value') !== "") { // IE < 8 fails to populate specified when set in HTML + return true; + } + } + return !!(this._node.attributes[attr] && + this._node.attributes[attr].specified); }; } +// IE throws an error when calling focus() on an element that's invisible, not +// displayed, or disabled. +Y.Node.prototype.focus = function () { + try { + this._node.focus(); + } catch (e) { + } +}; + // IE throws error when setting input.type = 'hidden', // input.setAttribute('type', 'hidden') and input.attributes.type.value = 'hidden' Y.Node.ATTRS.type = { @@ -1556,8 +2072,129 @@ Y.Node.ATTRS.type = { _bypassProxy: true // don't update DOM when using with Attribute }; +if (Y.config.doc.createElement('form').elements.nodeType) { + // IE: elements collection is also FORM node which trips up scrubVal. + Y.Node.ATTRS.elements = { + getter: function() { + return this.all('input, textarea, button, select'); + } + }; +} + +Y.mix(Y.Node.ATTRS, { + offsetHeight: { + setter: function(h) { + Y.DOM.setHeight(this._node, h); + return h; + }, + + getter: function() { + return this._node.offsetHeight; + } + }, + + offsetWidth: { + setter: function(w) { + Y.DOM.setWidth(this._node, w); + return w; + }, + + getter: function() { + return this._node.offsetWidth; + } + } +}); + +Y.mix(Y.Node.prototype, { + sizeTo: function(w, h) { + var node; + if (arguments.length < 2) { + node = Y.one(w); + w = node.get('offsetWidth'); + h = node.get('offsetHeight'); + } + + this.setAttrs({ + offsetWidth: w, + offsetHeight: h + }); + } +}); +var Y_NodeList = Y.NodeList, + ArrayProto = Array.prototype, + ArrayMethods = [ + /** Returns a new NodeList combining the given NodeList(s) + * @for NodeList + * @method concat + * @param {NodeList | Array} valueN Arrays/NodeLists and/or values to + * concatenate to the resulting NodeList + * @return {NodeList} A new NodeList comprised of this NodeList joined with the input. + */ + 'concat', + /** Removes the first last from the NodeList and returns it. + * @for NodeList + * @method pop + * @return {Node} The last item in the NodeList. + */ + 'pop', + /** Adds the given Node(s) to the end of the NodeList. + * @for NodeList + * @method push + * @param {Node | DOMNode} nodeN One or more nodes to add to the end of the NodeList. + */ + 'push', + /** Removes the first item from the NodeList and returns it. + * @for NodeList + * @method shift + * @return {Node} The first item in the NodeList. + */ + 'shift', + /** Returns a new NodeList comprising the Nodes in the given range. + * @for NodeList + * @method slice + * @param {Number} begin Zero-based index at which to begin extraction. + As a negative index, start indicates an offset from the end of the sequence. slice(-2) extracts the second-to-last element and the last element in the sequence. + * @param {Number} end Zero-based index at which to end extraction. slice extracts up to but not including end. + slice(1,4) extracts the second element through the fourth element (elements indexed 1, 2, and 3). + As a negative index, end indicates an offset from the end of the sequence. slice(2,-1) extracts the third element through the second-to-last element in the sequence. + If end is omitted, slice extracts to the end of the sequence. + * @return {NodeList} A new NodeList comprised of this NodeList joined with the input. + */ + 'slice', + /** Changes the content of the NodeList, adding new elements while removing old elements. + * @for NodeList + * @method splice + * @param {Number} index Index at which to start changing the array. If negative, will begin that many elements from the end. + * @param {Number} howMany An integer indicating the number of old array elements to remove. If howMany is 0, no elements are removed. In this case, you should specify at least one new element. If no howMany parameter is specified (second syntax above, which is a SpiderMonkey extension), all elements after index are removed. + * {Node | DOMNode| element1, ..., elementN + The elements to add to the array. If you don't specify any elements, splice simply removes elements from the array. + * @return {NodeList} The element(s) removed. + */ + 'splice', + /** Adds the given Node(s) to the beginning of the NodeList. + * @for NodeList + * @method push + * @param {Node | DOMNode} nodeN One or more nodes to add to the NodeList. + */ + 'unshift' + ]; + -}, '3.0.0' ,{requires:['dom-base', 'selector-css2', 'event-base']}); +Y.Array.each(ArrayMethods, function(name) { + Y_NodeList.prototype[name] = function() { + var args = [], + i = 0, + arg; + + while ((arg = arguments[i++])) { // use DOM nodes/nodeLists + args.push(arg._node || arg._nodes || arg); + } + return Y.Node.scrubVal(ArrayProto[name].apply(this._nodes, args)); + }; +}); + + +}, '3.3.0' ,{requires:['dom-base', 'selector-css2', 'event-base']}); YUI.add('node-style', function(Y) { (function(Y) { @@ -1640,7 +2277,7 @@ Y.NodeList.importMethod(Y.Node.prototype, methods); })(Y); -}, '3.0.0' ,{requires:['dom-style', 'node-base']}); +}, '3.3.0' ,{requires:['dom-style', 'node-base']}); YUI.add('node-screen', function(Y) { /** @@ -1790,31 +2427,44 @@ Y.Node.importMethod(Y.DOM, [ * @param {Int} y Y value for new position (coordinates are page-based) * @chainable */ - 'setY' + 'setY', + +/** + * Swaps the XY position of this node with another node. + * @method swapXY + * @param {Y.Node || HTMLElement} otherNode The node to swap with. + * @chainable + */ + 'swapXY' ]); /** - * Returns a region object for the node + * Returns a region object for the node * @config region * @for Node * @type Node */ Y.Node.ATTRS.region = { getter: function() { - var node = Y.Node.getDOMNode(this); + var node = Y.Node.getDOMNode(this), + region; + if (node && !node.tagName) { if (node.nodeType === 9) { // document node = node.documentElement; - } else if (node.alert) { // window - node = node.document.documentElement; } } - return Y.DOM.region(node); + if (node.alert) { + region = Y.DOM.viewportRegion(node); + } else { + region = Y.DOM.region(node); + } + return region; } }; - + /** - * Returns a region object for the node's viewport + * Returns a region object for the node's viewport * @config viewportRegion * @type Node */ @@ -1828,39 +2478,39 @@ Y.Node.importMethod(Y.DOM, 'inViewportRegion'); // these need special treatment to extract 2nd node arg /** - * Compares the intersection of the node with another node or region - * @method intersect + * Compares the intersection of the node with another node or region + * @method intersect * @for Node * @param {Node|Object} node2 The node or region to compare with. - * @param {Object} altRegion An alternate region to use (rather than this node's). - * @return {Object} An object representing the intersection of the regions. + * @param {Object} altRegion An alternate region to use (rather than this node's). + * @return {Object} An object representing the intersection of the regions. */ Y.Node.prototype.intersect = function(node2, altRegion) { var node1 = Y.Node.getDOMNode(this); - if (node2 instanceof Y.Node) { // might be a region object + if (Y.instanceOf(node2, Y.Node)) { // might be a region object node2 = Y.Node.getDOMNode(node2); } - return Y.DOM.intersect(node1, node2, altRegion); + return Y.DOM.intersect(node1, node2, altRegion); }; /** * Determines whether or not the node is within the giving region. - * @method inRegion + * @method inRegion * @param {Node|Object} node2 The node or region to compare with. - * @param {Boolean} all Whether or not all of the node must be in the region. - * @param {Object} altRegion An alternate region to use (rather than this node's). - * @return {Object} An object representing the intersection of the regions. + * @param {Boolean} all Whether or not all of the node must be in the region. + * @param {Object} altRegion An alternate region to use (rather than this node's). + * @return {Object} An object representing the intersection of the regions. */ Y.Node.prototype.inRegion = function(node2, all, altRegion) { var node1 = Y.Node.getDOMNode(this); - if (node2 instanceof Y.Node) { // might be a region object + if (Y.instanceOf(node2, Y.Node)) { // might be a region object node2 = Y.Node.getDOMNode(node2); } - return Y.DOM.inRegion(node1, node2, all, altRegion); + return Y.DOM.inRegion(node1, node2, all, altRegion); }; -}, '3.0.0' ,{requires:['dom-screen']}); +}, '3.3.0' ,{requires:['dom-screen']}); YUI.add('node-pluginhost', function(Y) { /** @@ -1914,7 +2564,7 @@ Y.NodeList.prototype.unplug = function() { }; -}, '3.0.0' ,{requires:['node-base', 'pluginhost']}); +}, '3.3.0' ,{requires:['node-base', 'pluginhost']}); YUI.add('node-event-delegate', function(Y) { /** @@ -1924,26 +2574,52 @@ YUI.add('node-event-delegate', function(Y) { */ /** - * Functionality to make the node a delegated event container + *

          Sets up a delegation listener for an event occurring inside the Node. + * The delegated event will be verified against a supplied selector or + * filtering function to test if the event references at least one node that + * should trigger the subscription callback.

          + * + *

          Selector string filters will trigger the callback if the event originated + * from a node that matches it or is contained in a node that matches it. + * Function filters are called for each Node up the parent axis to the + * subscribing container node, and receive at each level the Node and the event + * object. The function should return true (or a truthy value) if that Node + * should trigger the subscription callback. Note, it is possible for filters + * to match multiple Nodes for a single event. In this case, the delegate + * callback will be executed for each matching Node.

          + * + *

          For each matching Node, the callback will be executed with its 'this' + * object set to the Node matched by the filter (unless a specific context was + * provided during subscription), and the provided event's + * currentTarget will also be set to the matching Node. The + * containing Node from which the subscription was originally made can be + * referenced as e.container. + * * @method delegate * @param type {String} the event type to delegate - * @param fn {Function} the function to execute - * @param selector {String} a selector that must match the target of the event. - * @return {Event.Handle} the detach handle + * @param fn {Function} the callback function to execute. This function + * will be provided the event object for the delegated event. + * @param spec {String|Function} a selector that must match the target of the + * event or a function to test target and its parents for a match + * @param context {Object} optional argument that specifies what 'this' refers to. + * @param args* {any} 0..n additional arguments to pass on to the callback function. + * These arguments will be added after the event object. + * @return {EventHandle} the detach handle * @for Node */ -Y.Node.prototype.delegate = function(type, fn, selector) { +Y.Node.prototype.delegate = function(type) { + + var args = Y.Array(arguments, 0, true), + index = (Y.Lang.isObject(type) && !Y.Lang.isArray(type)) ? 1 : 2; - var args = Array.prototype.slice.call(arguments, 3), - a = [type, fn, Y.Node.getDOMNode(this), selector]; - a = a.concat(args); + args.splice(index, 0, this._node); - return Y.delegate.apply(Y, a); + return Y.delegate.apply(Y, args); }; -}, '3.0.0' ,{requires:['node-base', 'event-delegate', 'pluginhost']}); +}, '3.3.0' ,{requires:['node-base', 'event-delegate']}); -YUI.add('node', function(Y){}, '3.0.0' ,{skinnable:false, use:['node-base', 'node-style', 'node-screen', 'node-pluginhost', 'node-event-delegate'], requires:['dom', 'event-base', 'event-delegate', 'pluginhost']}); +YUI.add('node', function(Y){}, '3.3.0' ,{requires:['dom', 'event-base', 'event-delegate', 'pluginhost'], use:['node-base', 'node-style', 'node-screen', 'node-pluginhost', 'node-event-delegate'], skinnable:false}); diff --git a/jssource/src_files/include/javascript/yui3/build/node/shim-plugin-min.js b/jssource/src_files/include/javascript/yui3/build/node/shim-plugin-min.js new file mode 100644 index 00000000..fe02a7fe --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/node/shim-plugin-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("shim-plugin",function(b){function a(c){this.init(c);}a.CLASS_NAME="yui-node-shim";a.TEMPLATE='';a.prototype={init:function(c){this._host=c.host;this.initEvents();this.insert();this.sync();},initEvents:function(){this._resizeHandle=this._host.on("resize",this.sync,this);},getShim:function(){return this._shim||(this._shim=b.Node.create(a.TEMPLATE,this._host.get("ownerDocument")));},insert:function(){var c=this._host;this._shim=c.insertBefore(this.getShim(),c.get("firstChild"));},sync:function(){var d=this._shim,c=this._host;if(d){d.setAttrs({width:c.getStyle("width"),height:c.getStyle("height")});}},destroy:function(){var c=this._shim;if(c){c.remove(true);}this._resizeHandle.detach();}};a.NAME="Shim";a.NS="shim";b.namespace("Plugin");b.Plugin.Shim=a;},"3.3.0",{requires:["node-style","node-pluginhost"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/node/shim-plugin.js b/jssource/src_files/include/javascript/yui3/build/node/shim-plugin.js new file mode 100644 index 00000000..1f81db93 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/node/shim-plugin.js @@ -0,0 +1,113 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('shim-plugin', function(Y) { + + /** + * Provides shimming support for Node via a Plugin. + * This fixes SELECT bleedthrough for IE6 & Mac scrollbars + * @module shim-plugin + */ + + /** + * Node plugin which can be used to add shim support. + * + * @class Plugin.Shim + * @param {Object} User configuration object + */ + function Shim(config) { + this.init(config); + } + + /** + * Default class used to mark the shim element + * + * @property Shim.CLASS_NAME + * @type String + * @static + * @default "yui-node-shim" + */ + // TODO: use ClassNameManager + Shim.CLASS_NAME = 'yui-node-shim'; + + /** + * Default markup template used to generate the shim element. + * + * @property Shim.TEMPLATE + * @type String + * @static + */ + Shim.TEMPLATE = ''; + + Shim.prototype = { + init: function(config) { + this._host = config.host; + this.initEvents(); + this.insert(); + this.sync(); + }, + + initEvents: function() { + this._resizeHandle = this._host.on('resize', this.sync, this); + }, + + getShim: function() { + return this._shim || ( + this._shim = Y.Node.create( + Shim.TEMPLATE, + this._host.get('ownerDocument') + ) + ); + }, + + insert: function() { + var node = this._host; + this._shim = node.insertBefore( this.getShim(), + node.get('firstChild')); + }, + + /** + * Updates the size of the shim to fill its container + * @method sync + */ + sync: function() { + var shim = this._shim, + node = this._host; + + if (shim) { + shim.setAttrs({ + width: node.getStyle('width'), + height: node.getStyle('height') + }); + } + }, + + /** + * Removes the shim and destroys the plugin + * @method destroy + */ + destroy: function() { + var shim = this._shim; + if (shim) { + shim.remove(true); + } + + this._resizeHandle.detach(); + } + }; + + Shim.NAME = 'Shim'; + Shim.NS = 'shim'; + + Y.namespace('Plugin'); + Y.Plugin.Shim = Shim; + + +}, '3.3.0' ,{requires:['node-style', 'node-pluginhost']}); diff --git a/jssource/src_files/include/javascript/yui3/build/oop/oop-min.js b/jssource/src_files/include/javascript/yui3/build/oop/oop-min.js index a59ac611..3da03bcc 100644 --- a/jssource/src_files/include/javascript/yui3/build/oop/oop-min.js +++ b/jssource/src_files/include/javascript/yui3/build/oop/oop-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("oop",function(F){var E=F.Lang,D=F.Array,C=Object.prototype,B="_~yuim~_";F.augment=function(A,T,I,R,N){var L=T.prototype,P=null,S=T,O=(N)?F.Array(N):[],H=A.prototype,M=H||A,Q=false,G,J,K;if(H&&S){G={};J={};P={};F.each(L,function(V,U){J[U]=function(){for(K in G){if(G.hasOwnProperty(K)&&(this[K]===J[K])){this[K]=G[K];}}S.apply(this,O);return G[U].apply(this,arguments);};if((!R||(U in R))&&(I||!(U in this))){if(E.isFunction(V)){G[U]=V;this[U]=J[U];}else{this[U]=V;}}},P,true);}else{Q=true;}F.mix(M,P||L,I,R);if(Q){T.apply(M,O);}return A;};F.aggregate=function(H,G,A,I){return F.mix(H,G,A,I,0,true);};F.extend=function(I,H,A,K){if(!H||!I){F.error("extend failed, verify dependencies");}var J=H.prototype,G=F.Object(J);I.prototype=G;G.constructor=I;I.superclass=J;if(H!=Object&&J.constructor==C.constructor){J.constructor=H;}if(A){F.mix(G,A,true);}if(K){F.mix(I,K,true);}return I;};F.each=function(H,G,I,A){if(H.each&&H.item){return H.each.call(H,G,I);}else{switch(D.test(H)){case 1:return D.each(H,G,I);case 2:return D.each(F.Array(H,0,true),G,I);default:return F.Object.each(H,G,I,A);}}};F.clone=function(I,J,M,N,H,L){if(!E.isObject(I)){return I;}var K,G=L||{},A;switch(E.type(I)){case"date":return new Date(I);case"regexp":return new RegExp(I.source);case"function":K=F.bind(I,H);break;case"array":K=[];break;default:if(I[B]){return G[I[B]];}A=F.guid();K=(J)?{}:F.Object(I);I[B]=A;G[A]=I;}if(!I.addEventListener&&!I.attachEvent){F.each(I,function(P,O){if(!M||(M.call(N||this,P,O,this,I)!==false)){if(O!==B){this[O]=F.clone(P,J,M,N,H||I,G);}}},K);}if(!L){F.each(G,function(P,O){delete P[B];});G=null;}return K;};F.bind=function(A,H){var G=arguments.length>2?F.Array(arguments,2,true):null;return function(){var J=E.isString(A)?H[A]:A,I=(G)?G.concat(F.Array(arguments,0,true)):arguments;return J.apply(H||J,I);};};F.rbind=function(A,H){var G=arguments.length>2?F.Array(arguments,2,true):null;return function(){var J=E.isString(A)?H[A]:A,I=(G)?F.Array(arguments,0,true).concat(G):arguments;return J.apply(H||J,I);};};},"3.0.0"); \ No newline at end of file +YUI.add("oop",function(h){var d=h.Lang,c=h.Array,b=Object.prototype,a="_~yuim~_",e="each",g="some",f=function(l,k,m,i,j){if(l&&l[j]&&l!==h){return l[j].call(l,k,m);}else{switch(c.test(l)){case 1:return c[j](l,k,m);case 2:return c[j](h.Array(l,0,true),k,m);default:return h.Object[j](l,k,m,i);}}};h.augment=function(i,x,l,v,p){var n=x.prototype,t=null,w=x,q=(p)?h.Array(p):[],k=i.prototype,o=k||i,u=false,j,m;if(k&&w){j={};m={};t={};h.Object.each(n,function(s,r){m[r]=function(){for(var y in j){if(j.hasOwnProperty(y)&&(this[y]===m[y])){this[y]=j[y];}}w.apply(this,q);return j[r].apply(this,arguments);};if((!v||(r in v))&&(l||!(r in this))){if(d.isFunction(s)){j[r]=s;this[r]=m[r];}else{this[r]=s;}}},t,true);}else{u=true;}h.mix(o,t||n,l,v);if(u){x.apply(o,q);}return i;};h.aggregate=function(k,j,i,l){return h.mix(k,j,i,l,0,true);};h.extend=function(l,k,i,n){if(!k||!l){h.error("extend failed, verify dependencies");}var m=k.prototype,j=h.Object(m);l.prototype=j;j.constructor=l;l.superclass=m;if(k!=Object&&m.constructor==b.constructor){m.constructor=k;}if(i){h.mix(j,i,true);}if(n){h.mix(l,n,true);}return l;};h.each=function(k,j,l,i){return f(k,j,l,i,e);};h.some=function(k,j,l,i){return f(k,j,l,i,g);};h.clone=function(l,m,r,s,k,q){if(!d.isObject(l)){return l;}if(h.instanceOf(l,YUI)){return l;}var n,j=q||{},i,p=h.each;switch(d.type(l)){case"date":return new Date(l);case"regexp":return l;case"function":return l;case"array":n=[];break;default:if(l[a]){return j[l[a]];}i=h.guid();n=(m)?{}:h.Object(l);l[a]=i;j[i]=l;}if(!l.addEventListener&&!l.attachEvent){p(l,function(t,o){if((o||o===0)&&(!r||(r.call(s||this,t,o,this,l)!==false))){if(o!==a){if(o=="prototype"){}else{this[o]=h.clone(t,m,r,s,k||l,j);}}}},n);}if(!q){h.Object.each(j,function(t,o){if(t[a]){try{delete t[a];}catch(u){t[a]=null;}}},this);j=null;}return n;};h.bind=function(i,k){var j=arguments.length>2?h.Array(arguments,2,true):null;return function(){var m=d.isString(i)?k[i]:i,l=(j)?j.concat(h.Array(arguments,0,true)):arguments;return m.apply(k||m,l);};};h.rbind=function(i,k){var j=arguments.length>2?h.Array(arguments,2,true):null;return function(){var m=d.isString(i)?k[i]:i,l=(j)?h.Array(arguments,0,true).concat(j):arguments;return m.apply(k||m,l);};};},"3.3.0"); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/oop/oop.js b/jssource/src_files/include/javascript/yui3/build/oop/oop.js index 0a5e0b6e..e7b1550b 100644 --- a/jssource/src_files/include/javascript/yui3/build/oop/oop.js +++ b/jssource/src_files/include/javascript/yui3/build/oop/oop.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('oop', function(Y) { @@ -15,74 +15,78 @@ YUI.add('oop', function(Y) { * @module oop */ - var L = Y.Lang, - A = Y.Array, +/** + * The following methods are added to the YUI instance + * @class YUI~oop + */ + + var L = Y.Lang, + A = Y.Array, OP = Object.prototype, - CLONE_MARKER = "_~yuim~_"; - - // dispatch = function(o, f, c, proto, action) { - // if (o[action] && o.item) { - // return o[action].call(o, f, c); - // } else { - // switch (A.test(o)) { - // case 1: - // return A[action](o, f, c); - // case 2: - // return A[action](Y.Array(o, 0, true), f, c); - // default: - // return Y.Object[action](o, f, c, proto); - // } - // } - // }; + CLONE_MARKER = '_~yuim~_', + EACH = 'each', + SOME = 'some', + + dispatch = function(o, f, c, proto, action) { + if (o && o[action] && o !== Y) { + return o[action].call(o, f, c); + } else { + switch (A.test(o)) { + case 1: + return A[action](o, f, c); + case 2: + return A[action](Y.Array(o, 0, true), f, c); + default: + return Y.Object[action](o, f, c, proto); + } + } + }; - /** - * The following methods are added to the YUI instance - * @class YUI~oop - */ /** * Applies prototype properties from the supplier to the receiver. * The receiver can be a constructor or an instance. * @method augment - * @param {Function} r the object to receive the augmentation - * @param {Function} s the object that supplies the properties to augment - * @param ov {boolean} if true, properties already on the receiver + * @param {function} r the object to receive the augmentation. + * @param {function} s the object that supplies the properties to augment. + * @param {boolean} ov if true, properties already on the receiver * will be overwritten if found on the supplier. - * @param wl {string[]} a whitelist. If supplied, only properties in + * @param {string[]} wl a whitelist. If supplied, only properties in * this list will be applied to the receiver. - * @param args {Array | Any} arg or arguments to apply to the supplier + * @param {Array | Any} args arg or arguments to apply to the supplier * constructor when initializing. - * @return {object} the augmented object + * @return {object} the augmented object. * * @todo constructor optional? * @todo understanding what an instance is augmented with - * @TODO best practices for overriding sequestered methods. + * @todo best practices for overriding sequestered methods. */ Y.augment = function(r, s, ov, wl, args) { - var sProto = s.prototype, - newProto = null, - construct = s, - a = (args) ? Y.Array(args) : [], - rProto = r.prototype, - target = rProto || r, + var sProto = s.prototype, + newProto = null, + construct = s, + a = (args) ? Y.Array(args) : [], + rProto = r.prototype, + target = rProto || r, applyConstructor = false, - sequestered, replacements, i; + sequestered, replacements; // working on a class, so apply constructor infrastructure if (rProto && construct) { - sequestered = {}; + sequestered = {}; replacements = {}; - newProto = {}; + newProto = {}; // sequester all of the functions in the supplier and replace with // one that will restore all of them. - Y.each(sProto, function(v, k) { + Y.Object.each(sProto, function(v, k) { replacements[k] = function() { -// overwrite the prototype with all of the sequestered functions, -// but only if it hasn't been overridden - for (i in sequestered) { - if (sequestered.hasOwnProperty(i) && (this[i] === replacements[i])) { + // overwrite the prototype with all of the sequestered functions, + // but only if it hasn't been overridden + for (var i in sequestered) { + if (sequestered.hasOwnProperty(i) && + (this[i] === replacements[i])) { this[i] = sequestered[i]; } } @@ -105,7 +109,6 @@ YUI.add('oop', function(Y) { } else { this[k] = v; } - } }, newProto, true); @@ -130,13 +133,13 @@ YUI.add('oop', function(Y) { * object will be augmented with the supplier's value. If the property * is an array, the suppliers value will be appended to the target. * @method aggregate - * @param {Function} r the object to receive the augmentation - * @param {Function} s the object that supplies the properties to augment - * @param ov {boolean} if true, properties already on the receiver + * @param {function} r the object to receive the augmentation. + * @param {function} s the object that supplies the properties to augment. + * @param {boolean} ov if true, properties already on the receiver * will be overwritten if found on the supplier. - * @param wl {string[]} a whitelist. If supplied, only properties in + * @param {string[]} wl a whitelist. If supplied, only properties in * this list will be applied to the receiver. - * @return {object} the extended object + * @return {object} the extended object. */ Y.aggregate = function(r, s, ov, wl) { return Y.mix(r, s, ov, wl, 0, true); @@ -148,29 +151,28 @@ YUI.add('oop', function(Y) { * Static members will not be inherited. * * @method extend - * @param {Function} r the object to modify - * @param {Function} s the object to inherit - * @param {Object} px prototype properties to add/override - * @param {Object} sx static properties to add/override - * @return {YUI} the YUI instance + * @param {function} r the object to modify. + * @param {function} s the object to inherit. + * @param {object} px prototype properties to add/override. + * @param {object} sx static properties to add/override. + * @return {object} the extended object. */ Y.extend = function(r, s, px, sx) { - if (!s||!r) { - // @TODO error symbols - Y.error("extend failed, verify dependencies"); + if (!s || !r) { + Y.error('extend failed, verify dependencies'); } - var sp = s.prototype, rp=Y.Object(sp); - r.prototype=rp; + var sp = s.prototype, rp = Y.Object(sp); + r.prototype = rp; - rp.constructor=r; - r.superclass=sp; + rp.constructor = r; + r.superclass = sp; // assign constructor property if (s != Object && sp.constructor == OP.constructor) { - sp.constructor=s; + sp.constructor = s; } - + // add prototype overrides if (px) { Y.mix(rp, px, true); @@ -189,76 +191,63 @@ YUI.add('oop', function(Y) { * a collection. Supports arrays, objects, and * Y.NodeLists * @method each - * @param o the object to iterate - * @param f the function to execute. This function - * receives the value, key, and object as parameters - * @param proto if true, prototype properties are - * iterated on objects - * @return {YUI} the YUI instance + * @param {object} o the object to iterate. + * @param {function} f the function to execute. This function + * receives the value, key, and object as parameters. + * @param {object} c the execution context for the function. + * @param {boolean} proto if true, prototype properties are + * iterated on objects. + * @return {YUI} the YUI instance. */ Y.each = function(o, f, c, proto) { - - if (o.each && o.item) { - return o.each.call(o, f, c); - } else { - switch (A.test(o)) { - case 1: - return A.each(o, f, c); - case 2: - return A.each(Y.Array(o, 0, true), f, c); - default: - return Y.Object.each(o, f, c, proto); - } - } - - // return Y.Object.each(o, f, c); + return dispatch(o, f, c, proto, EACH); }; - // Y.each = function(o, f, c, proto) { - // return dispatch(o, f, c, proto, 'each'); - // }; - - /* + /** * Executes the supplied function for each item in * a collection. The operation stops if the function * returns true. Supports arrays, objects, and * Y.NodeLists. * @method some - * @param o the object to iterate - * @param f the function to execute. This function - * receives the value, key, and object as parameters - * @param proto if true, prototype properties are - * iterated on objects - * @return {boolean} true if the function ever returns true, false otherwise + * @param {object} o the object to iterate. + * @param {function} f the function to execute. This function + * receives the value, key, and object as parameters. + * @param {object} c the execution context for the function. + * @param {boolean} proto if true, prototype properties are + * iterated on objects. + * @return {boolean} true if the function ever returns true, + * false otherwise. */ - // Y.some = function(o, f, c, proto) { - // return dispatch(o, f, c, proto, 'some'); - // }; + Y.some = function(o, f, c, proto) { + return dispatch(o, f, c, proto, SOME); + }; /** - * Deep obj/array copy. Functions are cloned with Y.bind. + * Deep obj/array copy. Function clones are actually + * wrappers around the original function. * Array-like objects are treated as arrays. * Primitives are returned untouched. Optionally, a * function can be provided to handle other data types, * filter keys, validate values, etc. * * @method clone - * @param o what to clone - * @param safe {boolean} if true, objects will not have prototype + * @param {object} o what to clone. + * @param {boolean} safe if true, objects will not have prototype * items from the source. If false, they will. In this case, the - * original is initially protected, but the clone is not completely immune - * from changes to the source object prototype. Also, cloned prototype - * items that are deleted from the clone will result in the value - * of the source prototype being exposed. If operating on a non-safe - * clone, items should be nulled out rather than deleted. - * @TODO review - * @param f optional function to apply to each item in a collection; - * it will be executed prior to applying the value to - * the new object. Return false to prevent the copy. - * @param c optional execution context for f - * @param owner Owner object passed when clone is iterating an - * object. Used to set up context for cloned functions. - * @return {Array|Object} the cloned object + * original is initially protected, but the clone is not completely + * immune from changes to the source object prototype. Also, cloned + * prototype items that are deleted from the clone will result + * in the value of the source prototype being exposed. If operating + * on a non-safe clone, items should be nulled out rather than deleted. + * @param {function} f optional function to apply to each item in a + * collection; it will be executed prior to applying the value to + * the new object. Return false to prevent the copy. + * @param {object} c optional execution context for f. + * @param {object} owner Owner object passed when clone is iterating + * an object. Used to set up context for cloned functions. + * @param {object} cloned hash of previously cloned objects to avoid + * multiple clones. + * @return {Array|Object} the cloned object. */ Y.clone = function(o, safe, f, c, owner, cloned) { @@ -266,16 +255,25 @@ YUI.add('oop', function(Y) { return o; } - var o2, marked = cloned || {}, stamp; + // @todo cloning YUI instances doesn't currently work + if (Y.instanceOf(o, YUI)) { + return o; + } + + var o2, marked = cloned || {}, stamp, + yeach = Y.each; switch (L.type(o)) { case 'date': return new Date(o); case 'regexp': - return new RegExp(o.source); + // if we do this we need to set the flags too + // return new RegExp(o.source); + return o; case 'function': - o2 = Y.bind(o, owner); - break; + // o2 = Y.bind(o, owner); + // break; + return o; case 'array': o2 = []; break; @@ -296,19 +294,32 @@ YUI.add('oop', function(Y) { // #2528250 don't try to clone element properties if (!o.addEventListener && !o.attachEvent) { - Y.each(o, function(v, k) { - if (!f || (f.call(c || this, v, k, this, o) !== false)) { + yeach(o, function(v, k) { +if ((k || k === 0) && (!f || (f.call(c || this, v, k, this, o) !== false))) { if (k !== CLONE_MARKER) { - this[k] = Y.clone(v, safe, f, c, owner || o, marked); + if (k == 'prototype') { + // skip the prototype + // } else if (o[k] === o) { + // this[k] = this; + } else { + this[k] = + Y.clone(v, safe, f, c, owner || o, marked); + } } } }, o2); } if (!cloned) { - Y.each(marked, function(v, k) { - delete v[CLONE_MARKER]; - }); + Y.Object.each(marked, function(v, k) { + if (v[CLONE_MARKER]) { + try { + delete v[CLONE_MARKER]; + } catch (e) { + v[CLONE_MARKER] = null; + } + } + }, this); marked = null; } @@ -319,26 +330,28 @@ YUI.add('oop', function(Y) { /** * Returns a function that will execute the supplied function in the * supplied object's context, optionally adding any additional - * supplied parameters to the beginning of the arguments collection the + * supplied parameters to the beginning of the arguments collection the * supplied to the function. * * @method bind - * @param f {Function|String} the function to bind, or a function name - * to execute on the context object - * @param c the execution context - * @param args* 0..n arguments to include before the arguments the + * @param {Function|String} f the function to bind, or a function name + * to execute on the context object. + * @param {object} c the execution context. + * @param {any} args* 0..n arguments to include before the arguments the * function is executed with. - * @return {function} the wrapped function + * @return {function} the wrapped function. */ Y.bind = function(f, c) { - var xargs = arguments.length > 2 ? Y.Array(arguments, 2, true) : null; - return function () { - var fn = L.isString(f) ? c[f] : f, - args = (xargs) ? xargs.concat(Y.Array(arguments, 0, true)) : arguments; + var xargs = arguments.length > 2 ? + Y.Array(arguments, 2, true) : null; + return function() { + var fn = L.isString(f) ? c[f] : f, + args = (xargs) ? + xargs.concat(Y.Array(arguments, 0, true)) : arguments; return fn.apply(c || fn, args); }; }; - + /** * Returns a function that will execute the supplied function in the * supplied object's context, optionally adding any additional @@ -346,22 +359,23 @@ YUI.add('oop', function(Y) { * is executed with. * * @method rbind - * @param f {Function|String} the function to bind, or a function name - * to execute on the context object - * @param c the execution context - * @param args* 0..n arguments to append to the end of arguments collection - * supplied to the function - * @return {function} the wrapped function + * @param {Function|String} f the function to bind, or a function name + * to execute on the context object. + * @param {object} c the execution context. + * @param {any} args* 0..n arguments to append to the end of + * arguments collection supplied to the function. + * @return {function} the wrapped function. */ Y.rbind = function(f, c) { var xargs = arguments.length > 2 ? Y.Array(arguments, 2, true) : null; - return function () { - var fn = L.isString(f) ? c[f] : f, - args = (xargs) ? Y.Array(arguments, 0, true).concat(xargs) : arguments; + return function() { + var fn = L.isString(f) ? c[f] : f, + args = (xargs) ? + Y.Array(arguments, 0, true).concat(xargs) : arguments; return fn.apply(c || fn, args); }; }; -}, '3.0.0' ); +}, '3.3.0' ); diff --git a/jssource/src_files/include/javascript/yui3/build/overlay/overlay-min.js b/jssource/src_files/include/javascript/yui3/build/overlay/overlay-min.js index 8b0dbd95..67bf55bc 100644 --- a/jssource/src_files/include/javascript/yui3/build/overlay/overlay-min.js +++ b/jssource/src_files/include/javascript/yui3/build/overlay/overlay-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("overlay",function(A){A.Overlay=A.Base.build("overlay",A.Widget,[A.WidgetPosition,A.WidgetStack,A.WidgetPositionExt,A.WidgetStdMod]);},"3.0.0",{requires:["widget","widget-position","widget-stack","widget-position-ext","widget-stdmod"]}); \ No newline at end of file +YUI.add("overlay",function(A){A.Overlay=A.Base.create("overlay",A.Widget,[A.WidgetStdMod,A.WidgetPosition,A.WidgetStack,A.WidgetPositionAlign,A.WidgetPositionConstrain]);},"3.3.0",{requires:["widget","widget-stdmod","widget-position","widget-stack","widget-position-align","widget-position-constrain"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/overlay/overlay.js b/jssource/src_files/include/javascript/yui3/build/overlay/overlay.js index 466013d7..8d00c082 100644 --- a/jssource/src_files/include/javascript/yui3/build/overlay/overlay.js +++ b/jssource/src_files/include/javascript/yui3/build/overlay/overlay.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('overlay', function(Y) { @@ -19,18 +19,18 @@ YUI.add('overlay', function(Y) { * A basic Overlay Widget, which can be positioned based on Page XY co-ordinates and is stackable (z-index support). * It also provides alignment and centering support and uses a standard module format for it's content, with header, * body and footer section support. - * + * * @class Overlay * @constructor * @extends Widget + * @uses WidgetStdMod * @uses WidgetPosition * @uses WidgetStack - * @uses WidgetPositionExt - * @uses WidgetStdMod + * @uses WidgetPositionAlign + * @uses WidgetPositionConstrain * @param {Object} object The user configuration for the instance. */ -Y.Overlay = Y.Base.build("overlay", Y.Widget, [Y.WidgetPosition, Y.WidgetStack, Y.WidgetPositionExt, Y.WidgetStdMod]); - +Y.Overlay = Y.Base.create("overlay", Y.Widget, [Y.WidgetStdMod, Y.WidgetPosition, Y.WidgetStack, Y.WidgetPositionAlign, Y.WidgetPositionConstrain]); -}, '3.0.0' ,{requires:['widget', 'widget-position', 'widget-stack', 'widget-position-ext', 'widget-stdmod']}); +}, '3.3.0' ,{requires:['widget', 'widget-stdmod', 'widget-position', 'widget-stack', 'widget-position-align', 'widget-position-constrain']}); diff --git a/jssource/src_files/include/javascript/yui3/build/plugin/plugin-min.js b/jssource/src_files/include/javascript/yui3/build/plugin/plugin-min.js index ce4769af..d539e534 100644 --- a/jssource/src_files/include/javascript/yui3/build/plugin/plugin-min.js +++ b/jssource/src_files/include/javascript/yui3/build/plugin/plugin-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("plugin",function(B){function A(C){A.superclass.constructor.apply(this,arguments);}A.ATTRS={host:{writeOnce:true}};A.NAME="plugin";A.NS="plugin";B.extend(A,B.Base,{_handles:null,initializer:function(C){this._handles=[];},destructor:function(){if(this._handles){for(var D=0,C=this._handles.length;D + * An augmentable class, which provides the augmented class with the ability to host plugins. + * It adds plug and unplug methods to the augmented class, which can + * be used to add or remove plugins from instances of the class. + *

          + * + *

          Plugins can also be added through the constructor configuration object passed to the host class' constructor using + * the "plugins" property. Supported values for the "plugins" property are those defined by the plug method. + * + * For example the following code would add the AnimPlugin and IOPlugin to Overlay (the plugin host): + *

          + * var o = new Overlay({plugins: [ AnimPlugin, {fn:IOPlugin, cfg:{section:"header"}}]}); + * + *

          + *

          + * Plug.Host's protected _initPlugins and _destroyPlugins + * methods should be invoked by the host class at the appropriate point in the host's lifecyle. + *

          + * + * @class Plugin.Host + */ + + var L = Y.Lang; + + function PluginHost() { + this._plugins = {}; + } + + PluginHost.prototype = { + + /** + * Adds a plugin to the host object. This will instantiate the + * plugin and attach it to the configured namespace on the host object. + * + * @method plug + * @chainable + * @param P {Function | Object |Array} Accepts the plugin class, or an + * object with a "fn" property specifying the plugin class and + * a "cfg" property specifying the configuration for the Plugin. + *

          + * Additionally an Array can also be passed in, with the above function or + * object values, allowing the user to add multiple plugins in a single call. + *

          + * @param config (Optional) If the first argument is the plugin class, the second argument + * can be the configuration for the plugin. + * @return {Base} A reference to the host object + */ + plug: function(Plugin, config) { + var i, ln, ns; + + if (L.isArray(Plugin)) { + for (i = 0, ln = Plugin.length; i < ln; i++) { + this.plug(Plugin[i]); + } + } else { + if (Plugin && !L.isFunction(Plugin)) { + config = Plugin.cfg; + Plugin = Plugin.fn; + } + + // Plugin should be fn by now + if (Plugin && Plugin.NS) { + ns = Plugin.NS; + + config = config || {}; + config.host = this; + + if (this.hasPlugin(ns)) { + // Update config + this[ns].setAttrs(config); + } else { + // Create new instance + this[ns] = new Plugin(config); + this._plugins[ns] = Plugin; + } + } + } + return this; + }, + + /** + * Removes a plugin from the host object. This will destroy the + * plugin instance and delete the namepsace from the host object. + * + * @method unplug + * @param {String | Function} plugin The namespace of the plugin, or the plugin class with the static NS namespace property defined. If not provided, + * all registered plugins are unplugged. + * @return {Base} A reference to the host object + * @chainable + */ + unplug: function(plugin) { + var ns = plugin, + plugins = this._plugins; + + if (plugin) { + if (L.isFunction(plugin)) { + ns = plugin.NS; + if (ns && (!plugins[ns] || plugins[ns] !== plugin)) { + ns = null; + } + } + + if (ns) { + if (this[ns]) { + this[ns].destroy(); + delete this[ns]; + } + if (plugins[ns]) { + delete plugins[ns]; + } + } + } else { + for (ns in this._plugins) { + if (this._plugins.hasOwnProperty(ns)) { + this.unplug(ns); + } + } + } + return this; + }, + + /** + * Determines if a plugin has plugged into this host. + * + * @method hasPlugin + * @param {String} ns The plugin's namespace + * @return {boolean} returns true, if the plugin has been plugged into this host, false otherwise. + */ + hasPlugin : function(ns) { + return (this._plugins[ns] && this[ns]); + }, + + /** + * Initializes static plugins registered on the host (using the + * Base.plug static method) and any plugins passed to the + * instance through the "plugins" configuration property. + * + * @method _initPlugins + * @param {Config} config The configuration object with property name/value pairs. + * @private + */ + + _initPlugins: function(config) { + this._plugins = this._plugins || {}; + + if (this._initConfigPlugins) { + this._initConfigPlugins(config); + } + }, + + /** + * Unplugs and destroys all plugins on the host + * @method _destroyPlugins + * @private + */ + _destroyPlugins: function() { + this.unplug(); + } + }; + + Y.namespace("Plugin").Host = PluginHost; + + +}, '3.3.0' ,{requires:['yui-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/pluginhost/pluginhost-config-min.js b/jssource/src_files/include/javascript/yui3/build/pluginhost/pluginhost-config-min.js new file mode 100644 index 00000000..ac34bae4 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/pluginhost/pluginhost-config-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("pluginhost-config",function(C){var B=C.Plugin.Host,A=C.Lang;B.prototype._initConfigPlugins=function(E){var G=(this._getClasses)?this._getClasses():[this.constructor],D=[],H={},F,I,K,L,J;for(I=G.length-1;I>=0;I--){F=G[I];L=F._UNPLUG;if(L){C.mix(H,L,true);}K=F._PLUG;if(K){C.mix(D,K,true);}}for(J in D){if(D.hasOwnProperty(J)){if(!H[J]){this.plug(D[J]);}}}if(E&&E.plugins){this.plug(E.plugins);}};B.plug=function(E,I,G){var J,H,D,F;if(E!==C.Base){E._PLUG=E._PLUG||{};if(!A.isArray(I)){if(G){I={fn:I,cfg:G};}I=[I];}for(H=0,D=I.length;H= 0; i--) { + constructor = classes[i]; + + classUnplug = constructor._UNPLUG; + if (classUnplug) { + // subclasses over-write + Y.mix(unplug, classUnplug, true); + } + + classPlug = constructor._PLUG; + if (classPlug) { + // subclasses over-write + Y.mix(plug, classPlug, true); + } + } + + for (pluginClassName in plug) { + if (plug.hasOwnProperty(pluginClassName)) { + if (!unplug[pluginClassName]) { + this.plug(plug[pluginClassName]); + } + } + } + + // User Configuration + if (config && config.plugins) { + this.plug(config.plugins); + } + }; + + /** + * Registers plugins to be instantiated at the class level (plugins + * which should be plugged into every instance of the class by default). + * + * @method Plugin.Host.plug + * @static + * + * @param {Function} hostClass The host class on which to register the plugins + * @param {Function | Array} plugin Either the plugin class, an array of plugin classes or an array of objects (with fn and cfg properties defined) + * @param {Object} config (Optional) If plugin is the plugin class, the configuration for the plugin + */ + PluginHost.plug = function(hostClass, plugin, config) { + // Cannot plug into Base, since Plugins derive from Base [ will cause infinite recurrsion ] + var p, i, l, name; + + if (hostClass !== Y.Base) { + hostClass._PLUG = hostClass._PLUG || {}; + + if (!L.isArray(plugin)) { + if (config) { + plugin = {fn:plugin, cfg:config}; + } + plugin = [plugin]; + } + + for (i = 0, l = plugin.length; i < l;i++) { + p = plugin[i]; + name = p.NAME || p.fn.NAME; + hostClass._PLUG[name] = p; + } + } + }; + + /** + * Unregisters any class level plugins which have been registered by the host class, or any + * other class in the hierarchy. + * + * @method Plugin.Host.unplug + * @static + * + * @param {Function} hostClass The host class from which to unregister the plugins + * @param {Function | Array} plugin The plugin class, or an array of plugin classes + */ + PluginHost.unplug = function(hostClass, plugin) { + var p, i, l, name; + + if (hostClass !== Y.Base) { + hostClass._UNPLUG = hostClass._UNPLUG || {}; + + if (!L.isArray(plugin)) { + plugin = [plugin]; + } + + for (i = 0, l = plugin.length; i < l; i++) { + p = plugin[i]; + name = p.NAME; + if (!hostClass._PLUG[name]) { + hostClass._UNPLUG[name] = p; + } else { + delete hostClass._PLUG[name]; + } + } + } + }; + + +}, '3.3.0' ,{requires:['pluginhost-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/pluginhost/pluginhost-min.js b/jssource/src_files/include/javascript/yui3/build/pluginhost/pluginhost-min.js index d31f63d4..6c61c365 100644 --- a/jssource/src_files/include/javascript/yui3/build/pluginhost/pluginhost-min.js +++ b/jssource/src_files/include/javascript/yui3/build/pluginhost/pluginhost-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("pluginhost",function(C){var A=C.Lang;function B(){this._plugins={};}B.prototype={plug:function(G,D){if(G){if(A.isFunction(G)){this._plug(G,D);}else{if(A.isArray(G)){for(var E=0,F=G.length;E=0;I--){F=G[I];L=F._UNPLUG;if(L){C.mix(H,L,true);}K=F._PLUG;if(K){C.mix(D,K,true);}}for(J in D){if(D.hasOwnProperty(J)){if(!H[J]){this.plug(D[J]);}}}if(E&&E.plugins){this.plug(E.plugins);}},_destroyPlugins:function(){this._unplug();},_plug:function(F,D){if(F&&F.NS){var E=F.NS;D=D||{};D.host=this;if(this.hasPlugin(E)){this[E].setAttrs(D);}else{this[E]=new F(D);this._plugins[E]=F;}}},_unplug:function(F){var E=F,D=this._plugins;if(A.isFunction(F)){E=F.NS;if(E&&(!D[E]||D[E]!==F)){E=null;}}if(E){if(this[E]){this[E].destroy();delete this[E];}if(D[E]){delete D[E];}}}};B.plug=function(E,I,G){var J,H,D,F;if(E!==C.Base){E._PLUG=E._PLUG||{};if(!A.isArray(I)){if(G){I={fn:I,cfg:G};}I=[I];}for(H=0,D=I.length;H=0;I--){F=G[I];L=F._UNPLUG;if(L){C.mix(H,L,true);}K=F._PLUG;if(K){C.mix(D,K,true);}}for(J in D){if(D.hasOwnProperty(J)){if(!H[J]){this.plug(D[J]);}}}if(E&&E.plugins){this.plug(E.plugins);}};B.plug=function(E,I,G){var J,H,D,F;if(E!==C.Base){E._PLUG=E._PLUG||{};if(!A.isArray(I)){if(G){I={fn:I,cfg:G};}I=[I];}for(H=0,D=I.length;H * An augmentable class, which provides the augmented class with the ability to host plugins. @@ -49,7 +54,7 @@ YUI.add('pluginhost', function(Y) { * * @method plug * @chainable - * @param p {Function | Object |Array} Accepts the plugin class, or an + * @param P {Function | Object |Array} Accepts the plugin class, or an * object with a "fn" property specifying the plugin class and * a "cfg" property specifying the configuration for the Plugin. *

          @@ -60,17 +65,34 @@ YUI.add('pluginhost', function(Y) { * can be the configuration for the plugin. * @return {Base} A reference to the host object */ + plug: function(Plugin, config) { + var i, ln, ns; - plug: function(p, config) { - if (p) { - if (L.isFunction(p)) { - this._plug(p, config); - } else if (L.isArray(p)) { - for (var i = 0, ln = p.length; i < ln; i++) { - this.plug(p[i]); + if (L.isArray(Plugin)) { + for (i = 0, ln = Plugin.length; i < ln; i++) { + this.plug(Plugin[i]); + } + } else { + if (Plugin && !L.isFunction(Plugin)) { + config = Plugin.cfg; + Plugin = Plugin.fn; + } + + // Plugin should be fn by now + if (Plugin && Plugin.NS) { + ns = Plugin.NS; + + config = config || {}; + config.host = this; + + if (this.hasPlugin(ns)) { + // Update config + this[ns].setAttrs(config); + } else { + // Create new instance + this[ns] = new Plugin(config); + this._plugins[ns] = Plugin; } - } else { - this._plug(p.fn, p.cfg); } } return this; @@ -87,13 +109,30 @@ YUI.add('pluginhost', function(Y) { * @chainable */ unplug: function(plugin) { + var ns = plugin, + plugins = this._plugins; + if (plugin) { - this._unplug(plugin); + if (L.isFunction(plugin)) { + ns = plugin.NS; + if (ns && (!plugins[ns] || plugins[ns] !== plugin)) { + ns = null; + } + } + + if (ns) { + if (this[ns]) { + this[ns].destroy(); + delete this[ns]; + } + if (plugins[ns]) { + delete plugins[ns]; + } + } } else { - var ns; for (ns in this._plugins) { if (this._plugins.hasOwnProperty(ns)) { - this._unplug(ns); + this.unplug(ns); } } } @@ -120,43 +159,12 @@ YUI.add('pluginhost', function(Y) { * @param {Config} config The configuration object with property name/value pairs. * @private */ + _initPlugins: function(config) { this._plugins = this._plugins || {}; - // Class Configuration - var classes = (this._getClasses) ? this._getClasses() : [this.constructor], - plug = [], - unplug = {}, - constructor, i, classPlug, classUnplug, pluginClassName; - - //TODO: Room for optimization. Can we apply statically/unplug in same pass? - for (i = classes.length - 1; i >= 0; i--) { - constructor = classes[i]; - - classUnplug = constructor._UNPLUG; - if (classUnplug) { - // subclasses over-write - Y.mix(unplug, classUnplug, true); - } - - classPlug = constructor._PLUG; - if (classPlug) { - // subclasses over-write - Y.mix(plug, classPlug, true); - } - } - - for (pluginClassName in plug) { - if (plug.hasOwnProperty(pluginClassName)) { - if (!unplug[pluginClassName]) { - this.plug(plug[pluginClassName]); - } - } - } - - // User Configuration - if (config && config.plugins) { - this.plug(config.plugins); + if (this._initConfigPlugins) { + this._initConfigPlugins(config); } }, @@ -166,63 +174,66 @@ YUI.add('pluginhost', function(Y) { * @private */ _destroyPlugins: function() { - this._unplug(); - }, + this.unplug(); + } + }; - /** - * Private method used to instantiate and attach plugins to the host - * - * @method _plug - * @param {Function} PluginClass The plugin class to instantiate - * @param {Object} config The configuration object for the plugin - * @private - */ - _plug: function(PluginClass, config) { - if (PluginClass && PluginClass.NS) { - var ns = PluginClass.NS; - - config = config || {}; - config.host = this; - - if (this.hasPlugin(ns)) { - // Update config - this[ns].setAttrs(config); - } else { - // Create new instance - this[ns] = new PluginClass(config); - this._plugins[ns] = PluginClass; - } + Y.namespace("Plugin").Host = PluginHost; + + +}, '3.3.0' ,{requires:['yui-base']}); +YUI.add('pluginhost-config', function(Y) { + + /** + * Adds pluginhost constructor configuration and static configuration support + * @submodule pluginhost-config + */ + + /** + * Constructor and static configuration support for plugins + * + * @for Plugin.Host + */ + var PluginHost = Y.Plugin.Host, + L = Y.Lang; + + PluginHost.prototype._initConfigPlugins = function(config) { + + // Class Configuration + var classes = (this._getClasses) ? this._getClasses() : [this.constructor], + plug = [], + unplug = {}, + constructor, i, classPlug, classUnplug, pluginClassName; + + // TODO: Room for optimization. Can we apply statically/unplug in same pass? + for (i = classes.length - 1; i >= 0; i--) { + constructor = classes[i]; + + classUnplug = constructor._UNPLUG; + if (classUnplug) { + // subclasses over-write + Y.mix(unplug, classUnplug, true); } - }, - /** - * Unplugs and destroys a plugin already instantiated with the host. - * - * @method _unplug - * @private - * @param {String | Function} plugin The namespace for the plugin, or a plugin class with the static NS property defined. - */ - _unplug : function(plugin) { - var ns = plugin, - plugins = this._plugins; - - if (L.isFunction(plugin)) { - ns = plugin.NS; - if (ns && (!plugins[ns] || plugins[ns] !== plugin)) { - ns = null; - } + classPlug = constructor._PLUG; + if (classPlug) { + // subclasses over-write + Y.mix(plug, classPlug, true); } - - if (ns) { - if (this[ns]) { - this[ns].destroy(); - delete this[ns]; - } - if (plugins[ns]) { - delete plugins[ns]; + } + + for (pluginClassName in plug) { + if (plug.hasOwnProperty(pluginClassName)) { + if (!unplug[pluginClassName]) { + this.plug(plug[pluginClassName]); } } } + + // User Configuration + if (config && config.plugins) { + this.plug(config.plugins); + } }; /** @@ -290,7 +301,9 @@ YUI.add('pluginhost', function(Y) { } }; - Y.namespace("Plugin").Host = PluginHost; +}, '3.3.0' ,{requires:['pluginhost-base']}); + + +YUI.add('pluginhost', function(Y){}, '3.3.0' ,{use:['pluginhost-base', 'pluginhost-config']}); -}, '3.0.0' ,{requires:['yui-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/profiler/profiler-min.js b/jssource/src_files/include/javascript/yui3/build/profiler/profiler-min.js index db72f1c1..5e89d8ce 100644 --- a/jssource/src_files/include/javascript/yui3/build/profiler/profiler-min.js +++ b/jssource/src_files/include/javascript/yui3/build/profiler/profiler-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("profiler",function(Y){var container={},report={},stopwatches={},WATCH_STARTED=0,WATCH_STOPPED=1,WATCH_PAUSED=2,L=Y.Lang;function createReport(name){report[name]={calls:0,max:0,min:0,avg:0,points:[]};return report[name];}function saveDataPoint(name,duration){var functionData=report[name];if(!functionData){functionData=createReport(name);}functionData.calls++;functionData.points.push(duration);if(functionData.calls>1){functionData.avg=((functionData.avg*(functionData.calls-1))+duration)/functionData.calls;functionData.min=Math.min(functionData.min,duration);functionData.max=Math.max(functionData.max,duration);}else{functionData.avg=duration;functionData.min=duration;functionData.max=duration;}}Y.Profiler={clear:function(name){if(L.isString(name)){delete report[name];delete stopwatches[name];}else{report={};stopwatches={};}},getOriginal:function(name){return container[name];},instrument:function(name,method){var newMethod=function(){var start=new Date(),retval=method.apply(this,arguments),stop=new Date();saveDataPoint(name,stop-start);return retval;};Y.mix(newMethod,method);newMethod.__yuiProfiled=true;newMethod.prototype=method.prototype;container[name]=method;container[name].__yuiFuncName=name;createReport(name);return newMethod;},pause:function(name){var now=new Date(),stopwatch=stopwatches[name];if(stopwatch&&stopwatch.state==WATCH_STARTED){stopwatch.total+=(now-stopwatch.start);stopwatch.start=0;stopwatch.state=WATCH_PAUSED;}},start:function(name){if(container[name]){throw new Error("Cannot use '"+name+"' for profiling through start(), name is already in use.");}else{if(!report[name]){createReport(name);}if(!stopwatches[name]){stopwatches[name]={state:WATCH_STOPPED,start:0,total:0};}if(stopwatches[name].state==WATCH_STOPPED){stopwatches[name].state=WATCH_STARTED;stopwatches[name].start=new Date();}}},stop:function(name){var now=new Date(),stopwatch=stopwatches[name];if(stopwatch){if(stopwatch.state==WATCH_STARTED){saveDataPoint(name,stopwatch.total+(now-stopwatch.start));}else{if(stopwatch.state==WATCH_PAUSED){saveDataPoint(name,stopwatch.total);}}stopwatch.start=0;stopwatch.total=0;stopwatch.state=WATCH_STOPPED;}},getAverage:function(name){return report[name].avg;},getCallCount:function(name){return report[name].calls;},getMax:function(name){return report[name].max;},getMin:function(name){return report[name].min;},getFunctionReport:function(name){return report[name];},getReport:function(name){return report[name];},getFullReport:function(filter){filter=filter||function(){return true;};if(L.isFunction(filter)){var fullReport={};for(var name in report){if(filter(report[name])){fullReport[name]=report[name];}}return fullReport;}},registerConstructor:function(name,owner){this.registerFunction(name,owner,true);},registerFunction:function(name,owner,registerPrototype){var funcName=(name.indexOf(".")>-1?name.substring(name.lastIndexOf(".")+1):name),method,prototype;if(!L.isObject(owner)){owner=eval(name.substring(0,name.lastIndexOf(".")));}method=owner[funcName];prototype=method.prototype;if(L.isFunction(method)&&!method.__yuiProfiled){owner[funcName]=this.instrument(name,method);container[name].__yuiOwner=owner;container[name].__yuiFuncName=funcName;if(registerPrototype){this.registerObject(name+".prototype",prototype);}}},registerObject:function(name,object,recurse){object=(L.isObject(object)?object:eval(name));container[name]=object;for(var prop in object){if(typeof object[prop]=="function"){if(prop!="constructor"&&prop!="superclass"){this.registerFunction(name+"."+prop,object);}}else{if(typeof object[prop]=="object"&&recurse){this.registerObject(name+"."+prop,object[prop],recurse);}}}},unregisterConstructor:function(name){if(L.isFunction(container[name])){this.unregisterFunction(name,true);}},unregisterFunction:function(name,unregisterPrototype){if(L.isFunction(container[name])){if(unregisterPrototype){this.unregisterObject(name+".prototype",container[name].prototype);}var owner=container[name].__yuiOwner,funcName=container[name].__yuiFuncName;delete container[name].__yuiOwner;delete container[name].__yuiFuncName;owner[funcName]=container[name];delete container[name];}},unregisterObject:function(name,recurse){if(L.isObject(container[name])){var object=container[name];for(var prop in object){if(typeof object[prop]=="function"){this.unregisterFunction(name+"."+prop);}else{if(typeof object[prop]=="object"&&recurse){this.unregisterObject(name+"."+prop,recurse);}}}delete container[name];}}};},"3.0.0",{requires:["oop"]}); \ No newline at end of file +YUI.add("profiler",function(Y){var container={},report={},stopwatches={},WATCH_STARTED=0,WATCH_STOPPED=1,WATCH_PAUSED=2,L=Y.Lang;function createReport(name){report[name]={calls:0,max:0,min:0,avg:0,points:[]};return report[name];}function saveDataPoint(name,duration){var functionData=report[name];if(!functionData){functionData=createReport(name);}functionData.calls++;functionData.points.push(duration);if(functionData.calls>1){functionData.avg=((functionData.avg*(functionData.calls-1))+duration)/functionData.calls;functionData.min=Math.min(functionData.min,duration);functionData.max=Math.max(functionData.max,duration);}else{functionData.avg=duration;functionData.min=duration;functionData.max=duration;}}Y.Profiler={clear:function(name){if(L.isString(name)){delete report[name];delete stopwatches[name];}else{report={};stopwatches={};}},getOriginal:function(name){return container[name];},instrument:function(name,method){var newMethod=function(){var start=new Date(),retval=method.apply(this,arguments),stop=new Date();saveDataPoint(name,stop-start);return retval;};Y.mix(newMethod,method);newMethod.__yuiProfiled=true;newMethod.prototype=method.prototype;container[name]=method;container[name].__yuiFuncName=name;createReport(name);return newMethod;},pause:function(name){var now=new Date(),stopwatch=stopwatches[name];if(stopwatch&&stopwatch.state==WATCH_STARTED){stopwatch.total+=(now-stopwatch.start);stopwatch.start=0;stopwatch.state=WATCH_PAUSED;}},start:function(name){if(container[name]){throw new Error("Cannot use '"+name+"' for profiling through start(), name is already in use.");}else{if(!report[name]){createReport(name);}if(!stopwatches[name]){stopwatches[name]={state:WATCH_STOPPED,start:0,total:0};}if(stopwatches[name].state==WATCH_STOPPED){stopwatches[name].state=WATCH_STARTED;stopwatches[name].start=new Date();}}},stop:function(name){var now=new Date(),stopwatch=stopwatches[name];if(stopwatch){if(stopwatch.state==WATCH_STARTED){saveDataPoint(name,stopwatch.total+(now-stopwatch.start));}else{if(stopwatch.state==WATCH_PAUSED){saveDataPoint(name,stopwatch.total);}}stopwatch.start=0;stopwatch.total=0;stopwatch.state=WATCH_STOPPED;}},getAverage:function(name){return report[name].avg;},getCallCount:function(name){return report[name].calls;},getMax:function(name){return report[name].max;},getMin:function(name){return report[name].min;},getFunctionReport:function(name){return report[name];},getReport:function(name){return report[name];},getFullReport:function(filter){filter=filter||function(){return true;};if(L.isFunction(filter)){var fullReport={};for(var name in report){if(filter(report[name])){fullReport[name]=report[name];}}return fullReport;}},registerConstructor:function(name,owner){this.registerFunction(name,owner,true);},registerFunction:function(name,owner,registerPrototype){var funcName=(name.indexOf(".")>-1?name.substring(name.lastIndexOf(".")+1):name),method,prototype;if(!L.isObject(owner)){owner=eval(name.substring(0,name.lastIndexOf(".")));}method=owner[funcName];prototype=method.prototype;if(L.isFunction(method)&&!method.__yuiProfiled){owner[funcName]=this.instrument(name,method);container[name].__yuiOwner=owner;container[name].__yuiFuncName=funcName;if(registerPrototype){this.registerObject(name+".prototype",prototype);}}},registerObject:function(name,object,recurse){object=(L.isObject(object)?object:eval(name));container[name]=object;for(var prop in object){if(typeof object[prop]=="function"){if(prop!="constructor"&&prop!="superclass"){this.registerFunction(name+"."+prop,object);}}else{if(typeof object[prop]=="object"&&recurse){this.registerObject(name+"."+prop,object[prop],recurse);}}}},unregisterConstructor:function(name){if(L.isFunction(container[name])){this.unregisterFunction(name,true);}},unregisterFunction:function(name,unregisterPrototype){if(L.isFunction(container[name])){if(unregisterPrototype){this.unregisterObject(name+".prototype",container[name].prototype);}var owner=container[name].__yuiOwner,funcName=container[name].__yuiFuncName;delete container[name].__yuiOwner;delete container[name].__yuiFuncName;owner[funcName]=container[name];delete container[name];}},unregisterObject:function(name,recurse){if(L.isObject(container[name])){var object=container[name];for(var prop in object){if(typeof object[prop]=="function"){this.unregisterFunction(name+"."+prop);}else{if(typeof object[prop]=="object"&&recurse){this.unregisterObject(name+"."+prop,recurse);}}}delete container[name];}}};},"3.3.0",{requires:["oop"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/profiler/profiler.js b/jssource/src_files/include/javascript/yui3/build/profiler/profiler.js index 81b18b14..4f6cca9d 100644 --- a/jssource/src_files/include/javascript/yui3/build/profiler/profiler.js +++ b/jssource/src_files/include/javascript/yui3/build/profiler/profiler.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('profiler', function(Y) { @@ -552,4 +552,4 @@ YUI.add('profiler', function(Y) { -}, '3.0.0' ,{requires:['oop']}); +}, '3.3.0' ,{requires:['oop']}); diff --git a/jssource/src_files/include/javascript/yui3/build/querystring/querystring-min.js b/jssource/src_files/include/javascript/yui3/build/querystring/querystring-min.js new file mode 100644 index 00000000..1ef79675 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/querystring/querystring-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("querystring-parse",function(e){var b=e.namespace("QueryString"),d=function(f){return function g(l,n){var h,m,k,j,i;if(arguments.length!==2){l=l.split(f);return g(b.unescape(l.shift()),b.unescape(l.join(f)));}l=l.replace(/^\s+|\s+$/g,"");if(e.Lang.isString(n)){n=n.replace(/^\s+|\s+$/g,"");if(!isNaN(n)){m=+n;if(n===m.toString(10)){n=m;}}}h=/(.*)\[([^\]]*)\]$/.exec(l);if(!h){i={};if(l){i[l]=n;}return i;}j=h[2];k=h[1];if(!j){return g(k,[n]);}i={};i[j]=n;return g(k,i);};},c=function(g,f){return((!g)?f:(e.Lang.isArray(g))?g.concat(f):(!e.Lang.isObject(g)||!e.Lang.isObject(f))?[g].concat(f):a(g,f));},a=function(h,f){for(var g in f){if(g&&f.hasOwnProperty(g)){h[g]=c(h[g],f[g]);}}return h;};b.parse=function(g,h,f){return e.Array.reduce(e.Array.map(g.split(h||"&"),d(f||"=")),{},c);};b.unescape=function(f){return decodeURIComponent(f.replace(/\+/g," "));};},"3.3.0",{requires:["collection"]});YUI.add("querystring-stringify",function(d){var c=d.namespace("QueryString"),b=[],a=d.Lang;c.escape=encodeURIComponent;c.stringify=function(k,o,e){var g,j,m,h,f,t,r=o&&o.sep?o.sep:"&",p=o&&o.eq?o.eq:"=",q=o&&o.arrayKey?o.arrayKey:false;if(a.isNull(k)||a.isUndefined(k)||a.isFunction(k)){return e?c.escape(e)+p:"";}if(a.isBoolean(k)||Object.prototype.toString.call(k)==="[object Boolean]"){k=+k;}if(a.isNumber(k)||a.isString(k)){return c.escape(e)+p+c.escape(k);}if(a.isArray(k)){t=[];e=q?e+"[]":e;h=k.length;for(m=0;m=0;--m){if(b[m]===k){throw new Error("QueryString.stringify. Cyclical reference");}}b.push(k);t=[];g=e?e+"[":"";j=e?"]":"";for(m in k){if(k.hasOwnProperty(m)){f=g+m+j;t.push(c.stringify(k[m],o,f));}}b.pop();t=t.join(r);if(!t&&e){return e+"=";}return t;};},"3.3.0");YUI.add("querystring",function(a){},"3.3.0",{use:["querystring-parse","querystring-stringify"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse-min.js b/jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse-min.js new file mode 100644 index 00000000..614f5779 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("querystring-parse",function(e){var b=e.namespace("QueryString"),d=function(f){return function g(l,n){var h,m,k,j,i;if(arguments.length!==2){l=l.split(f);return g(b.unescape(l.shift()),b.unescape(l.join(f)));}l=l.replace(/^\s+|\s+$/g,"");if(e.Lang.isString(n)){n=n.replace(/^\s+|\s+$/g,"");if(!isNaN(n)){m=+n;if(n===m.toString(10)){n=m;}}}h=/(.*)\[([^\]]*)\]$/.exec(l);if(!h){i={};if(l){i[l]=n;}return i;}j=h[2];k=h[1];if(!j){return g(k,[n]);}i={};i[j]=n;return g(k,i);};},c=function(g,f){return((!g)?f:(e.Lang.isArray(g))?g.concat(f):(!e.Lang.isObject(g)||!e.Lang.isObject(f))?[g].concat(f):a(g,f));},a=function(h,f){for(var g in f){if(g&&f.hasOwnProperty(g)){h[g]=c(h[g],f[g]);}}return h;};b.parse=function(g,h,f){return e.Array.reduce(e.Array.map(g.split(h||"&"),d(f||"=")),{},c);};b.unescape=function(f){return decodeURIComponent(f.replace(/\+/g," "));};},"3.3.0",{requires:["collection"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse-simple-min.js b/jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse-simple-min.js new file mode 100644 index 00000000..c4856228 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse-simple-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("querystring-parse-simple",function(b){var a=b.namespace("QueryString");a.parse=function(e,g,d){g=g||"&";d=d||"=";for(var k={},h=0,j=e.split(g),f=j.length,c;h0){k[a.unescape(c.shift())]=a.unescape(c.join(d));}}return k;};a.unescape=function(c){return decodeURIComponent(c.replace(/\+/g," "));};},"3.3.0"); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse-simple.js b/jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse-simple.js new file mode 100644 index 00000000..907f8822 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse-simple.js @@ -0,0 +1,88 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('querystring-parse-simple', function(Y) { + +// @TODO this looks like we are requiring the user to extract the querystring +// portion of the url, which isn't good. The majority use case will be to +// extract querystring from the document configured for this YUI instance. +// This should be the default if qs is not supplied. + +/*global Y */ +/** + *

          Provides Y.QueryString.stringify method for converting objects to Query Strings. + * This is a simpler implementation than the full querystring-stringify.

          + *

          Because some things may require basic query string escaping functionality, + * this module provides the bare minimum functionality (decoding a hash of simple values), + * without the additional support for arrays, objects, and so on.

          + *

          This provides a friendly way to deserialize basic query strings, without necessitating + * a lot of code for simple use-cases.

          + * + * @module querystring + * @submodule querystring-parse-simple + * @for QueryString + * @static + */ + +var QueryString = Y.namespace("QueryString"); + +/** + * Provides Y.QueryString.parse method to accept Query Strings and return native + * JavaScript objects. + * + * @module querystring + * @submodule querystring-parse + * @for QueryString + * @method parse + * @param qs {String} Querystring to be parsed into an object. + * @param sep {String} (optional) Character that should join param k=v pairs together. Default: "&" + * @param eq {String} (optional) Character that should join keys to their values. Default: "=" + * @public + * @static + * @static + */ +QueryString.parse = function (qs, sep, eq) { + sep = sep || "&"; + eq = eq || "="; + for ( + var obj = {}, + i = 0, + pieces = qs.split(sep), + l = pieces.length, + tuple; + i < l; + i ++ + ) { + tuple = pieces[i].split(eq); + if (tuple.length > 0) { + obj[QueryString.unescape(tuple.shift())] = QueryString.unescape(tuple.join(eq)); + } + } + return obj; +}; + +/** + * Provides Y.QueryString.unescape method to be able to override default decoding + * method. This is important in cases where non-standard delimiters are used, if + * the delimiters would not normally be handled properly by the builtin + * (en|de)codeURIComponent functions. + * Default: replace "+" with " ", and then decodeURIComponent behavior. + * @module querystring + * @submodule querystring-parse + * @for QueryString + * @method unescape + * @param s {String} String to be decoded. + * @public + * @static + **/ +QueryString.unescape = function (s) { + return decodeURIComponent(s.replace(/\+/g, ' ')); +}; + + + +}, '3.3.0' ); diff --git a/jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse.js b/jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse.js new file mode 100644 index 00000000..655ec917 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/querystring/querystring-parse.js @@ -0,0 +1,162 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('querystring-parse', function(Y) { + +/** + *

          The QueryString module adds support for serializing JavaScript objects into + * query strings and parsing JavaScript objects from query strings format.

          + * + *

          The QueryString namespace is added to your YUI instance including static methods + * Y.QueryString.parse(..) and Y.QueryString.stringify(..).

          + * + *

          The querystring module is a rollup of querystring-parse and + * querystring-stringify.

          + * + *

          As their names suggest, querystring-parse adds support for parsing + * Query String data (Y.QueryString.parse) and querystring-stringify for serializing + * JavaScript data into Query Strings (Y.QueryString.stringify). You may choose to + * include either of the submodules individually if you don't need the + * complementary functionality, or include the rollup for both.

          + * + * @module querystring + * @class QueryString + * @static + */ +var QueryString = Y.namespace("QueryString"), + +// Parse a key=val string. +// These can get pretty hairy +// example flow: +// parse(foo[bar][][bla]=baz) +// return parse(foo[bar][][bla],"baz") +// return parse(foo[bar][], {bla : "baz"}) +// return parse(foo[bar], [{bla:"baz"}]) +// return parse(foo, {bar:[{bla:"baz"}]}) +// return {foo:{bar:[{bla:"baz"}]}} +pieceParser = function (eq) { + return function parsePiece (key, val) { + + var sliced, numVal, head, tail, ret; + + if (arguments.length !== 2) { + // key=val, called from the map/reduce + key = key.split(eq); + return parsePiece( + QueryString.unescape(key.shift()), + QueryString.unescape(key.join(eq)) + ); + } + key = key.replace(/^\s+|\s+$/g, ''); + if (Y.Lang.isString(val)) { + val = val.replace(/^\s+|\s+$/g, ''); + // convert numerals to numbers + if (!isNaN(val)) { + numVal = +val; + if (val === numVal.toString(10)) { + val = numVal; + } + } + } + sliced = /(.*)\[([^\]]*)\]$/.exec(key); + if (!sliced) { + ret = {}; + if (key) { + ret[key] = val; + } + return ret; + } + // ["foo[][bar][][baz]", "foo[][bar][]", "baz"] + tail = sliced[2]; + head = sliced[1]; + + // array: key[]=val + if (!tail) { + return parsePiece(head, [val]); + } + + // obj: key[subkey]=val + ret = {}; + ret[tail] = val; + return parsePiece(head, ret); + }; +}, + +// the reducer function that merges each query piece together into one set of params +mergeParams = function(params, addition) { + return ( + // if it's uncontested, then just return the addition. + (!params) ? addition + // if the existing value is an array, then concat it. + : (Y.Lang.isArray(params)) ? params.concat(addition) + // if the existing value is not an array, and either are not objects, arrayify it. + : (!Y.Lang.isObject(params) || !Y.Lang.isObject(addition)) ? [params].concat(addition) + // else merge them as objects, which is a little more complex + : mergeObjects(params, addition) + ); +}, + +// Merge two *objects* together. If this is called, we've already ruled +// out the simple cases, and need to do the for-in business. +mergeObjects = function(params, addition) { + for (var i in addition) { + if (i && addition.hasOwnProperty(i)) { + params[i] = mergeParams(params[i], addition[i]); + } + } + return params; +}; + +/** + * Provides Y.QueryString.parse method to accept Query Strings and return native + * JavaScript objects. + * + * @module querystring + * @submodule querystring-parse + * @for QueryString + * @method parse + * @param qs {String} Querystring to be parsed into an object. + * @param sep {String} (optional) Character that should join param k=v pairs together. Default: "&" + * @param eq {String} (optional) Character that should join keys to their values. Default: "=" + * @public + * @static + */ +QueryString.parse = function (qs, sep, eq) { + // wouldn't Y.Array(qs.split()).map(pieceParser(eq)).reduce(mergeParams) be prettier? + return Y.Array.reduce( + Y.Array.map( + qs.split(sep || "&"), + pieceParser(eq || "=") + ), + {}, + mergeParams + ); +}; + +/** + * Provides Y.QueryString.unescape method to be able to override default decoding + * method. This is important in cases where non-standard delimiters are used, if + * the delimiters would not normally be handled properly by the builtin + * (en|de)codeURIComponent functions. + * Default: replace "+" with " ", and then decodeURIComponent behavior. + * @module querystring + * @submodule querystring-parse + * @for QueryString + * @method unescape + * @param s {String} String to be decoded. + * @public + * @static + **/ +QueryString.unescape = function (s) { + return decodeURIComponent(s.replace(/\+/g, ' ')); +}; + + + + + +}, '3.3.0' ,{requires:['collection']}); diff --git a/jssource/src_files/include/javascript/yui3/build/querystring/querystring-stringify-min.js b/jssource/src_files/include/javascript/yui3/build/querystring/querystring-stringify-min.js new file mode 100644 index 00000000..aa4fa47d --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/querystring/querystring-stringify-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("querystring-stringify",function(d){var c=d.namespace("QueryString"),b=[],a=d.Lang;c.escape=encodeURIComponent;c.stringify=function(k,o,e){var g,j,m,h,f,t,r=o&&o.sep?o.sep:"&",p=o&&o.eq?o.eq:"=",q=o&&o.arrayKey?o.arrayKey:false;if(a.isNull(k)||a.isUndefined(k)||a.isFunction(k)){return e?c.escape(e)+p:"";}if(a.isBoolean(k)||Object.prototype.toString.call(k)==="[object Boolean]"){k=+k;}if(a.isNumber(k)||a.isString(k)){return c.escape(e)+p+c.escape(k);}if(a.isArray(k)){t=[];e=q?e+"[]":e;h=k.length;for(m=0;m=0;--m){if(b[m]===k){throw new Error("QueryString.stringify. Cyclical reference");}}b.push(k);t=[];g=e?e+"[":"";j=e?"]":"";for(m in k){if(k.hasOwnProperty(m)){f=g+m+j;t.push(c.stringify(k[m],o,f));}}b.pop();t=t.join(r);if(!t&&e){return e+"=";}return t;};},"3.3.0"); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/querystring/querystring-stringify-simple-min.js b/jssource/src_files/include/javascript/yui3/build/querystring/querystring-stringify-simple-min.js new file mode 100644 index 00000000..09047de0 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/querystring/querystring-stringify-simple-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("querystring-stringify-simple",function(c){var b=c.namespace("QueryString"),a=encodeURIComponent;b.stringify=function(j,k){var d=[],h=k&&k.arrayKey?true:false,g,f,e;for(g in j){if(j.hasOwnProperty(g)){if(c.Lang.isArray(j[g])){for(f=0,e=j[g].length;fProvides Y.QueryString.stringify method for converting objects to Query Strings. + * This is a subset implementation of the full querystring-stringify.

          + *

          This module provides the bare minimum functionality (encoding a hash of simple values), + * without the additional support for nested data structures. Every key-value pair is + * encoded by encodeURIComponent.

          + *

          This module provides a minimalistic way for io to handle single-level objects + * as transaction data.

          + * + * @module querystring + * @submodule querystring-stringify-simple + * @for QueryString + * @static + */ + +var QueryString = Y.namespace("QueryString"), + EUC = encodeURIComponent; + +/** + *

          Converts a simple object to a Query String representation.

          + *

          Nested objects, Arrays, and so on, are not supported.

          + * + * @method stringify + * @for QueryString + * @public + * @submodule querystring-stringify-simple + * @param obj {Object} A single-level object to convert to a querystring. + * @param cfg {Object} (optional) Configuration object. In the simple + * module, only the arrayKey setting is + * supported. When set to true, the key of an + * array will have the '[]' notation appended + * to the key;. + * @static + */ +QueryString.stringify = function (obj, c) { + var qs = [], + // Default behavior is false; standard key notation. + s = c && c.arrayKey ? true : false, + key, i, l; + + for (key in obj) { + if (obj.hasOwnProperty(key)) { + if (Y.Lang.isArray(obj[key])) { + for (i = 0, l = obj[key].length; i < l; i++) { + qs.push(EUC(s ? key + '[]' : key) + '=' + EUC(obj[key][i])); + } + } + else { + qs.push(EUC(key) + '=' + EUC(obj[key])); + } + } + } + + return qs.join('&'); +}; + + + +}, '3.3.0' ); diff --git a/jssource/src_files/include/javascript/yui3/build/querystring/querystring-stringify.js b/jssource/src_files/include/javascript/yui3/build/querystring/querystring-stringify.js new file mode 100644 index 00000000..a1d7a1fe --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/querystring/querystring-stringify.js @@ -0,0 +1,115 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('querystring-stringify', function(Y) { + +/** + * Provides Y.QueryString.stringify method for converting objects to Query Strings. + * + * @module querystring + * @submodule querystring-stringify + * @for QueryString + * @static + */ + +var QueryString = Y.namespace("QueryString"), + stack = [], + L = Y.Lang; + +/** + * Provides Y.QueryString.escape method to be able to override default encoding + * method. This is important in cases where non-standard delimiters are used, if + * the delimiters would not normally be handled properly by the builtin + * (en|de)codeURIComponent functions. + * Default: encodeURIComponent + * @module querystring + * @submodule querystring-stringify + * @for QueryString + * @static + **/ +QueryString.escape = encodeURIComponent; + +/** + *

          Converts an arbitrary value to a Query String representation.

          + * + *

          Objects with cyclical references will trigger an exception.

          + * + * @method stringify + * @public + * @param obj {Variant} any arbitrary value to convert to query string + * @param cfg {Object} (optional) Configuration object. The three + * supported configurations are: + *
          • sep: When defined, the value will be used as the key-value + * separator. The default value is "&".
          • + *
          • eq: When defined, the value will be used to join the key to + * the value. The default value is "=".
          • + *
          • arrayKey: When set to true, the key of an array will have the + * '[]' notation appended to the key. The default value is false. + *
          + * @param name {String} (optional) Name of the current key, for handling children recursively. + * @static + */ +QueryString.stringify = function (obj, c, name) { + var begin, end, i, l, n, s, + sep = c && c.sep ? c.sep : "&", + eq = c && c.eq ? c.eq : "=", + aK = c && c.arrayKey ? c.arrayKey : false; + + if (L.isNull(obj) || L.isUndefined(obj) || L.isFunction(obj)) { + return name ? QueryString.escape(name) + eq : ''; + } + + if (L.isBoolean(obj) || Object.prototype.toString.call(obj) === '[object Boolean]') { + obj =+ obj; + } + + if (L.isNumber(obj) || L.isString(obj)) { + return QueryString.escape(name) + eq + QueryString.escape(obj); + } + + if (L.isArray(obj)) { + s = []; + name = aK ? name + '[]' : name; + l = obj.length; + for (i = 0; i < l; i++) { + s.push( QueryString.stringify(obj[i], c, name) ); + } + + return s.join(sep); + } + // now we know it's an object. + + // Check for cyclical references in nested objects + for (i = stack.length - 1; i >= 0; --i) { + if (stack[i] === obj) { + throw new Error("QueryString.stringify. Cyclical reference"); + } + } + + stack.push(obj); + s = []; + begin = name ? name + '[' : ''; + end = name ? ']' : ''; + for (i in obj) { + if (obj.hasOwnProperty(i)) { + n = begin + i + end; + s.push(QueryString.stringify(obj[i], c, n)); + } + } + + stack.pop(); + s = s.join(sep); + if (!s && name) { + return name + "="; + } + + return s; +}; + + + +}, '3.3.0' ); diff --git a/jssource/src_files/include/javascript/yui3/build/querystring/querystring.js b/jssource/src_files/include/javascript/yui3/build/querystring/querystring.js new file mode 100644 index 00000000..28d7f940 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/querystring/querystring.js @@ -0,0 +1,276 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('querystring-parse', function(Y) { + +/** + *

          The QueryString module adds support for serializing JavaScript objects into + * query strings and parsing JavaScript objects from query strings format.

          + * + *

          The QueryString namespace is added to your YUI instance including static methods + * Y.QueryString.parse(..) and Y.QueryString.stringify(..).

          + * + *

          The querystring module is a rollup of querystring-parse and + * querystring-stringify.

          + * + *

          As their names suggest, querystring-parse adds support for parsing + * Query String data (Y.QueryString.parse) and querystring-stringify for serializing + * JavaScript data into Query Strings (Y.QueryString.stringify). You may choose to + * include either of the submodules individually if you don't need the + * complementary functionality, or include the rollup for both.

          + * + * @module querystring + * @class QueryString + * @static + */ +var QueryString = Y.namespace("QueryString"), + +// Parse a key=val string. +// These can get pretty hairy +// example flow: +// parse(foo[bar][][bla]=baz) +// return parse(foo[bar][][bla],"baz") +// return parse(foo[bar][], {bla : "baz"}) +// return parse(foo[bar], [{bla:"baz"}]) +// return parse(foo, {bar:[{bla:"baz"}]}) +// return {foo:{bar:[{bla:"baz"}]}} +pieceParser = function (eq) { + return function parsePiece (key, val) { + + var sliced, numVal, head, tail, ret; + + if (arguments.length !== 2) { + // key=val, called from the map/reduce + key = key.split(eq); + return parsePiece( + QueryString.unescape(key.shift()), + QueryString.unescape(key.join(eq)) + ); + } + key = key.replace(/^\s+|\s+$/g, ''); + if (Y.Lang.isString(val)) { + val = val.replace(/^\s+|\s+$/g, ''); + // convert numerals to numbers + if (!isNaN(val)) { + numVal = +val; + if (val === numVal.toString(10)) { + val = numVal; + } + } + } + sliced = /(.*)\[([^\]]*)\]$/.exec(key); + if (!sliced) { + ret = {}; + if (key) { + ret[key] = val; + } + return ret; + } + // ["foo[][bar][][baz]", "foo[][bar][]", "baz"] + tail = sliced[2]; + head = sliced[1]; + + // array: key[]=val + if (!tail) { + return parsePiece(head, [val]); + } + + // obj: key[subkey]=val + ret = {}; + ret[tail] = val; + return parsePiece(head, ret); + }; +}, + +// the reducer function that merges each query piece together into one set of params +mergeParams = function(params, addition) { + return ( + // if it's uncontested, then just return the addition. + (!params) ? addition + // if the existing value is an array, then concat it. + : (Y.Lang.isArray(params)) ? params.concat(addition) + // if the existing value is not an array, and either are not objects, arrayify it. + : (!Y.Lang.isObject(params) || !Y.Lang.isObject(addition)) ? [params].concat(addition) + // else merge them as objects, which is a little more complex + : mergeObjects(params, addition) + ); +}, + +// Merge two *objects* together. If this is called, we've already ruled +// out the simple cases, and need to do the for-in business. +mergeObjects = function(params, addition) { + for (var i in addition) { + if (i && addition.hasOwnProperty(i)) { + params[i] = mergeParams(params[i], addition[i]); + } + } + return params; +}; + +/** + * Provides Y.QueryString.parse method to accept Query Strings and return native + * JavaScript objects. + * + * @module querystring + * @submodule querystring-parse + * @for QueryString + * @method parse + * @param qs {String} Querystring to be parsed into an object. + * @param sep {String} (optional) Character that should join param k=v pairs together. Default: "&" + * @param eq {String} (optional) Character that should join keys to their values. Default: "=" + * @public + * @static + */ +QueryString.parse = function (qs, sep, eq) { + // wouldn't Y.Array(qs.split()).map(pieceParser(eq)).reduce(mergeParams) be prettier? + return Y.Array.reduce( + Y.Array.map( + qs.split(sep || "&"), + pieceParser(eq || "=") + ), + {}, + mergeParams + ); +}; + +/** + * Provides Y.QueryString.unescape method to be able to override default decoding + * method. This is important in cases where non-standard delimiters are used, if + * the delimiters would not normally be handled properly by the builtin + * (en|de)codeURIComponent functions. + * Default: replace "+" with " ", and then decodeURIComponent behavior. + * @module querystring + * @submodule querystring-parse + * @for QueryString + * @method unescape + * @param s {String} String to be decoded. + * @public + * @static + **/ +QueryString.unescape = function (s) { + return decodeURIComponent(s.replace(/\+/g, ' ')); +}; + + + + + +}, '3.3.0' ,{requires:['collection']}); + +YUI.add('querystring-stringify', function(Y) { + +/** + * Provides Y.QueryString.stringify method for converting objects to Query Strings. + * + * @module querystring + * @submodule querystring-stringify + * @for QueryString + * @static + */ + +var QueryString = Y.namespace("QueryString"), + stack = [], + L = Y.Lang; + +/** + * Provides Y.QueryString.escape method to be able to override default encoding + * method. This is important in cases where non-standard delimiters are used, if + * the delimiters would not normally be handled properly by the builtin + * (en|de)codeURIComponent functions. + * Default: encodeURIComponent + * @module querystring + * @submodule querystring-stringify + * @for QueryString + * @static + **/ +QueryString.escape = encodeURIComponent; + +/** + *

          Converts an arbitrary value to a Query String representation.

          + * + *

          Objects with cyclical references will trigger an exception.

          + * + * @method stringify + * @public + * @param obj {Variant} any arbitrary value to convert to query string + * @param cfg {Object} (optional) Configuration object. The three + * supported configurations are: + *
          • sep: When defined, the value will be used as the key-value + * separator. The default value is "&".
          • + *
          • eq: When defined, the value will be used to join the key to + * the value. The default value is "=".
          • + *
          • arrayKey: When set to true, the key of an array will have the + * '[]' notation appended to the key. The default value is false. + *
          + * @param name {String} (optional) Name of the current key, for handling children recursively. + * @static + */ +QueryString.stringify = function (obj, c, name) { + var begin, end, i, l, n, s, + sep = c && c.sep ? c.sep : "&", + eq = c && c.eq ? c.eq : "=", + aK = c && c.arrayKey ? c.arrayKey : false; + + if (L.isNull(obj) || L.isUndefined(obj) || L.isFunction(obj)) { + return name ? QueryString.escape(name) + eq : ''; + } + + if (L.isBoolean(obj) || Object.prototype.toString.call(obj) === '[object Boolean]') { + obj =+ obj; + } + + if (L.isNumber(obj) || L.isString(obj)) { + return QueryString.escape(name) + eq + QueryString.escape(obj); + } + + if (L.isArray(obj)) { + s = []; + name = aK ? name + '[]' : name; + l = obj.length; + for (i = 0; i < l; i++) { + s.push( QueryString.stringify(obj[i], c, name) ); + } + + return s.join(sep); + } + // now we know it's an object. + + // Check for cyclical references in nested objects + for (i = stack.length - 1; i >= 0; --i) { + if (stack[i] === obj) { + throw new Error("QueryString.stringify. Cyclical reference"); + } + } + + stack.push(obj); + s = []; + begin = name ? name + '[' : ''; + end = name ? ']' : ''; + for (i in obj) { + if (obj.hasOwnProperty(i)) { + n = begin + i + end; + s.push(QueryString.stringify(obj[i], c, n)); + } + } + + stack.pop(); + s = s.join(sep); + if (!s && name) { + return name + "="; + } + + return s; +}; + + + +}, '3.3.0' ); + + + +YUI.add('querystring', function(Y){}, '3.3.0' ,{use:['querystring-parse', 'querystring-stringify']}); + diff --git a/jssource/src_files/include/javascript/yui3/build/queue-promote/queue-promote-min.js b/jssource/src_files/include/javascript/yui3/build/queue-promote/queue-promote-min.js index be6604a6..f88483bf 100644 --- a/jssource/src_files/include/javascript/yui3/build/queue-promote/queue-promote-min.js +++ b/jssource/src_files/include/javascript/yui3/build/queue-promote/queue-promote-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("queue-promote",function(A){A.mix(A.Queue.prototype,{indexOf:function(B){return A.Array.indexOf(this._q,B);},promote:function(C){var B=this.indexOf(C);if(B>-1){this._q.unshift(this._q.splice(B,1));}},remove:function(C){var B=this.indexOf(C);if(B>-1){this._q.splice(B,1);}}});},"3.0.0",{requires:["yui-base"]}); \ No newline at end of file +YUI.add("queue-promote",function(A){A.mix(A.Queue.prototype,{indexOf:function(B){return A.Array.indexOf(this._q,B);},promote:function(C){var B=this.indexOf(C);if(B>-1){this._q.unshift(this._q.splice(B,1));}},remove:function(C){var B=this.indexOf(C);if(B>-1){this._q.splice(B,1);}}});},"3.3.0",{requires:["yui-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/queue-promote/queue-promote.js b/jssource/src_files/include/javascript/yui3/build/queue-promote/queue-promote.js index c90d6a13..4adf111b 100644 --- a/jssource/src_files/include/javascript/yui3/build/queue-promote/queue-promote.js +++ b/jssource/src_files/include/javascript/yui3/build/queue-promote/queue-promote.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('queue-promote', function(Y) { @@ -57,4 +57,4 @@ Y.mix(Y.Queue.prototype, { }); -}, '3.0.0' ,{requires:['yui-base']}); +}, '3.3.0' ,{requires:['yui-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/recordset/recordset-base-min.js b/jssource/src_files/include/javascript/yui3/build/recordset/recordset-base-min.js new file mode 100644 index 00000000..af8445bd --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/recordset/recordset-base-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("recordset-base",function(E){var A=E.Base.create("record",E.Base,[],{_setId:function(){return E.guid();},initializer:function(){},destructor:function(){},getValue:function(F){if(F===undefined){return this.get("data");}else{return this.get("data")[F];}return null;}},{ATTRS:{id:{valueFn:"_setId"},data:{value:null}}});E.Record=A;var B=E.ArrayList,C=E.Lang,D=E.Base.create("recordset",E.Base,[],{initializer:function(){if(!this._items){this._items=[];}this.publish("add",{defaultFn:this._defAddFn});this.publish("remove",{defaultFn:this._defRemoveFn});this.publish("empty",{defaultFn:this._defEmptyFn});this.publish("update",{defaultFn:this._defUpdateFn});this._recordsetChanged();this._syncHashTable();},destructor:function(){},_defAddFn:function(J){var F=this._items.length,I=J.added,G=J.index,H=0;for(;H0){var F=this._items.length;for(;G0))?G:1;for(;I-1))?G:this._items.length;if(C.isArray(J)){for(;H-1)?G:(this._items.length-1);F=(F>0)?F:1;H=this._items.slice(G,(G+F));this.fire("remove",{removed:H,range:F,index:G});return this;},empty:function(){this.fire("empty",{});return this;},update:function(I,G){var J,F,H=0;F=(!(C.isArray(I)))?[I]:I;J=this._items.slice(G,G+F.length);for(;H -1)) ? index : len; + for (; i < recs.length; i++) { + //if records are to be added one at a time, push them in one at a time + if (index === len) { + this._items.push(recs[i]); + } + else { + this._items.splice(index, 0, recs[i]); + index++; + } + } + + + }, + + /** + * @description Helper method called upon by remove() - it is used to remove record(s) from the recordset + * + * @method _defRemoveFn + * @private + */ + _defRemoveFn: function(e) { + + //remove from beginning + if (e.index === 0) { + this._items.shift(); + } + + //remove from end + else if (e.index === this._items.length - 1) { + this._items.pop(); + } + + //remove from middle + else { + this._items.splice(e.index, e.range); + } + }, + + /** + * Helper method called upon by empty() - it is used to empty the recordset + * + * @method _defEmptyFn + * @private + */ + _defEmptyFn: function(e) { + this._items = []; + }, + + /** + * @description Helper method called upon by update() - it is used to update the recordset + * + * @method _defUpdateFn + * @private + */ + _defUpdateFn: function(e) { + + for (var i = 0; i < e.updated.length; i++) { + this._items[e.index + i] = this._changeToRecord(e.updated[i]); + } + }, + + + //--------------------------------------------- + // Hash Table Methods + //--------------------------------------------- + + /** + * @description Method called whenever "recordset:add" event is fired. It adds the new record(s) to the hashtable. + * + * @method _defAddHash + * @private + */ + _defAddHash: function(e) { + var obj = this.get('table'), + key = this.get('key'), + i = 0; + for (; i < e.added.length; i++) { + obj[e.added[i].get(key)] = e.added[i]; + } + this.set('table', obj); + }, + + /** + * @description Method called whenever "recordset:remove" event is fired. It removes the record(s) from the recordset. + * + * @method _defRemoveHash + * @private + */ + _defRemoveHash: function(e) { + var obj = this.get('table'), + key = this.get('key'), + i = 0; + for (; i < e.removed.length; i++) { + delete obj[e.removed[i].get(key)]; + } + this.set('table', obj); + }, + + + /** + * @description Method called whenever "recordset:update" event is fired. It updates the record(s) by adding the new ones and removing the overwritten ones. + * + * @method _defUpdateHash + * @private + */ + _defUpdateHash: function(e) { + var obj = this.get('table'), + key = this.get('key'), + i = 0; + + //deletes the object key that held on to an overwritten record and + //creates an object key to hold on to the updated record + for (; i < e.updated.length; i++) { + if (e.overwritten[i]) { + delete obj[e.overwritten[i].get(key)]; + } + obj[e.updated[i].get(key)] = e.updated[i]; + } + this.set('table', obj); + }, + + /** + * @description Method called whenever "recordset:empty" event is fired. It empties the hash table. + * + * @method _defEmptyHash + * @private + */ + _defEmptyHash: function() { + this.set('table', {}); + }, + + /** + * @description Sets up the hashtable with all the records currently in the recordset + * + * @method _setHashTable + * @private + */ + _setHashTable: function() { + var obj = {}, + key = this.get('key'), + i = 0; + + //If it is not an empty recordset - go through and set up the hash table. + if (this._items && this._items.length > 0) { + var len = this._items.length; + for (; i < len; i++) { + obj[this._items[i].get(key)] = this._items[i]; + } + } + return obj; + }, + + + /** + * @description Helper method - it takes an object bag and converts it to a Y.Record + * + * @method _changeToRecord + * @param obj {Object || Y.Record} Any objet literal or Y.Record instance + * @return {Y.Record} A Record instance. + * @private + */ + _changeToRecord: function(obj) { + var oRec; + if (obj instanceof Y.Record) { + oRec = obj; + } + else { + oRec = new Y.Record({ + data: obj + }); + } + + return oRec; + }, + + //--------------------------------------------- + // Events + //--------------------------------------------- + /** + * @description Event that is fired whenever the recordset is changed. Note that multiple simultaneous changes still fires this event once. (ie: Adding multiple records via an array will only fire this event once at the completion of all the additions) + * + * @method _recordSetUpdated + * @private + */ + _recordsetChanged: function() { + + this.on(['update', 'add', 'remove', 'empty'], + function() { + this.fire('change', {}); + }); + }, + + + /** + * @description Syncs up the private hash methods with their appropriate triggering events. + * + * @method _syncHashTable + * @private + */ + _syncHashTable: function() { + + this.after('add', + function(e) { + this._defAddHash(e); + }); + this.after('remove', + function(e) { + this._defRemoveHash(e); + }); + this.after('update', + function(e) { + this._defUpdateHash(e); + }); + this.after('update', + function(e) { + this._defEmptyHash(); + }); + + }, + + //--------------------------------------------- + // Public Methods + //--------------------------------------------- + /** + * @description Returns the record with particular ID or index + * + * @method getRecord + * @param i {String, Number} The ID of the record if a string, or the index if a number. + * @return {Y.Record} An Y.Record instance + * @public + */ + getRecord: function(i) { + + if (Lang.isString(i)) { + return this.get('table')[i]; + } + else if (Lang.isNumber(i)) { + return this._items[i]; + } + return null; + }, + + + /** + * @description Returns the record at a particular index + * + * @method getRecordByIndex + * @param i {Number} Index at which the required record resides + * @return {Y.Record} An Y.Record instance + * @public + */ + getRecordByIndex: function(i) { + return this._items[i]; + }, + + /** + * @description Returns a range of records beginning at particular index + * + * @method getRecordsByIndex + * @param index {Number} Index at which the required record resides + * @param range {Number} (Optional) Number of records to retrieve. The default is 1 + * @return {Array} An array of Y.Record instances + * @public + */ + getRecordsByIndex: function(index, range) { + var i = 0, + returnedRecords = []; + //Range cannot take on negative values + range = (Lang.isNumber(range) && (range > 0)) ? range: 1; + + for (; i < range; i++) { + returnedRecords.push(this._items[index + i]); + } + return returnedRecords; + }, + + /** + * @description Returns the length of the recordset + * + * @method getLength + * @return {Number} Number of records in the recordset + * @public + */ + getLength: function() { + return this.size(); + }, + + /** + * @description Returns an array of values for a specified key in the recordset + * + * @method getValuesByKey + * @param index {Number} (optional) Index at which the required record resides + * @return {Array} An array of values for the given key + * @public + */ + getValuesByKey: function(key) { + var i = 0, + len = this._items.length, + retVals = []; + for (; i < len; i++) { + retVals.push(this._items[i].getValue(key)); + } + return retVals; + }, + + + /** + * @description Adds one or more Records to the RecordSet at the given index. If index is null, then adds the Records to the end of the RecordSet. + * + * @method add + * @param oData {Y.Record, Object Literal, Array} A Y.Record instance, An object literal of data or an array of object literals + * @param index {Number} (optional) Index at which to add the record(s) + * @return {Y.Recordset} The updated recordset instance + * @public + */ + add: function(oData, index) { + + var newRecords = [], + idx, + i = 0; + + idx = (Lang.isNumber(index) && (index > -1)) ? index: this._items.length; + + + + //Passing in array of object literals for oData + if (Lang.isArray(oData)) { + for (; i < oData.length; i++) { + newRecords[i] = this._changeToRecord(oData[i]); + } + + } + else if (Lang.isObject(oData)) { + newRecords[0] = this._changeToRecord(oData); + } + + this.fire('add', { + added: newRecords, + index: idx + }); + return this; + }, + + /** + * @description Removes one or more Records to the RecordSet at the given index. If index is null, then removes a single Record from the end of the RecordSet. + * + * @method remove + * @param index {Number} (optional) Index at which to remove the record(s) from + * @param range {Number} (optional) Number of records to remove (including the one at the index) + * @return {Y.Recordset} The updated recordset instance + * @public + */ + remove: function(index, range) { + var remRecords = []; + + //Default is to only remove the last record - the length is always 1 greater than the last index + index = (index > -1) ? index: (this._items.length - 1); + range = (range > 0) ? range: 1; + + remRecords = this._items.slice(index, (index + range)); + this.fire('remove', { + removed: remRecords, + range: range, + index: index + }); + //this._recordRemoved(remRecords, index); + //return ({data: remRecords, index:index}); + return this; + }, + + /** + * @description Empties the recordset + * + * @method empty + * @return {Y.Recordset} The updated recordset instance + * @public + */ + empty: function() { + this.fire('empty', {}); + return this; + }, + + /** + * @description Updates the recordset with the new records passed in. Overwrites existing records when updating the index with the new records. + * + * @method update + * @param data {Y.Record, Object Literal, Array} A Y.Record instance, An object literal of data or an array of object literals + * @param index {Number} (optional) The index to start updating from. + * @return {Y.Recordset} The updated recordset instance + * @public + */ + update: function(data, index) { + var rec, + arr, + i = 0; + + //Whatever is passed in, we are changing it to an array so that it can be easily iterated in the _defUpdateFn method + arr = (!(Lang.isArray(data))) ? [data] : data; + rec = this._items.slice(index, index + arr.length); + + for (; i < arr.length; i++) { + arr[i] = this._changeToRecord(arr[i]); + } + + this.fire('update', { + updated: arr, + overwritten: rec, + index: index + }); + + return this; + } + + +}, +{ + ATTRS: { + + /** + * @description An array of records that the recordset is storing + * + * @attribute records + * @public + * @type array + */ + records: { + validator: Lang.isArray, + getter: function() { + // give them a copy, not the internal object + return new Y.Array(this._items); + }, + setter: function(allData) { + //For allData passed in here, see if each instance is a Record. + //If its not, change it to a record. + //Then push it into the array. + var records = []; + function initRecord(oneData) { + var o; + + if (oneData instanceof Y.Record) { + records.push(oneData); + } + else { + o = new Y.Record({ + data: oneData + }); + records.push(o); + } + } + + //This conditional statement handles creating empty recordsets + if (allData) { + Y.Array.each(allData, initRecord); + this._items = Y.Array(records); + } + }, + + //value: [], + //initialization of the attribute must be done before the first call to get('records') is made. + //if lazyAdd were set to true, then instantiating using new Y.Recordset({records:[..]}) would + //not call the setter. + //see http://developer.yahoo.com/yui/3/api/Attribute.html#method_addAttr for details on this + lazyAdd: false + }, + + /** + * @description A hash table where the ID of the record is the key, and the record instance is the value. + * + * @attribute table + * @public + * @type object + */ + table: { + //Initially, create the hash table with all records currently in the recordset + valueFn: '_setHashTable' + }, + + /** + * @description The ID to use as the key in the hash table. + * + * @attribute key + * @public + * @type string + */ + key: { + value: 'id', + //set to readonly true. If you want custom hash tables, you should use the recordset-indexer plugin. + readOnly: true + } + + } +}); +Y.augment(Recordset, ArrayList); +Y.Recordset = Recordset; + + + + +}, '3.3.0' ,{requires:['base','arraylist']}); diff --git a/jssource/src_files/include/javascript/yui3/build/recordset/recordset-filter-min.js b/jssource/src_files/include/javascript/yui3/build/recordset/recordset-filter-min.js new file mode 100644 index 00000000..c1df0716 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/recordset/recordset-filter-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("recordset-filter",function(D){var C=D.Array,B=D.Lang;function A(E){A.superclass.constructor.apply(this,arguments);}D.mix(A,{NS:"filter",NAME:"recordsetFilter",ATTRS:{}});D.extend(A,D.Plugin.Base,{initializer:function(E){},destructor:function(E){},filter:function(H,E){var G=this.get("host").get("records"),I=[],F=H;if(B.isString(H)&&B.isValue(E)){F=function(J){if(J.getValue(H)===E){return true;}else{return false;}};}I=C.filter(G,F);return new D.Recordset({records:I});},reject:function(E){return new D.Recordset({records:C.reject(this.get("host").get("records"),E)});},grep:function(E){return new D.Recordset({records:C.grep(this.get("host").get("records"),E)});}});D.namespace("Plugin").RecordsetFilter=A;},"3.3.0",{requires:["recordset-base","array-extras","plugin"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/recordset/recordset-filter.js b/jssource/src_files/include/javascript/yui3/build/recordset/recordset-filter.js new file mode 100644 index 00000000..1f1df59d --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/recordset/recordset-filter.js @@ -0,0 +1,121 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('recordset-filter', function(Y) { + +/** + * Plugin that provides the ability to filter through a recordset. + * Uses the filter methods available on Y.Array (see arrayextras submodule) to filter the recordset. + * @module recordset + * @submodule recordset-filter + */ + + +var YArray = Y.Array, +Lang = Y.Lang; + + +/** + * Plugin that provides the ability to filter through a recordset. + * Uses the filter methods available on Y.Array (see arrayextras submodule) to filter the recordset. + * @class RecordsetFilter + */ +function RecordsetFilter(config) { + RecordsetFilter.superclass.constructor.apply(this, arguments); +} + +Y.mix(RecordsetFilter, { + NS: "filter", + + NAME: "recordsetFilter", + + ATTRS: { + } + +}); + + +Y.extend(RecordsetFilter, Y.Plugin.Base, { + + + initializer: function(config) { + }, + + destructor: function(config) { + }, + + /** + * @description Filter through the recordset with a custom filter function, or a key-value pair. + * + * @method filter + * @param f {Function, String} A custom filter function or a string representing the key to filter by. + * @param v {any} (optional) If a string is passed into f, this represents the value that key should take in order to be accepted by the filter. Do not pass in anything if 'f' is a custom function + * @return recordset {Y.Recordset} A new filtered recordset instance + * @public + */ + filter: function(f, v) { + var recs = this.get('host').get('records'), + oRecs = [], + func = f; + + //If a key-value pair is passed in, generate a custom function + if (Lang.isString(f) && Lang.isValue(v)) { + + func = function(item) { + if (item.getValue(f) === v) { + return true; + } + else { + return false; + } + }; + } + + oRecs = YArray.filter(recs, func); + + + //TODO: PARENT CHILD RELATIONSHIP + return new Y.Recordset({ + records: oRecs + }); + //return new host.constructor({records:arr}); + }, + + /** + * @description The inverse of filter. Executes the supplied function on each item. Returns a new Recordset containing the items that the supplied function returned *false* for. + * @method reject + * @param {Function} f is the function to execute on each item. + * @return {Y.Recordset} A new Recordset instance containing the items on which the supplied function returned false. + */ + reject: function(f) { + return new Y.Recordset({ + records: YArray.reject(this.get('host').get('records'), f) + }); + }, + + /** + * @description Iterates over the Recordset, returning a new Recordset of all the elements that match the supplied regular expression + * @method grep + * @param {pattern} pattern The regular expression to test against + * each record. + * @return {Y.Recordset} A Recordset instance containing all the items in the collection that produce a match against the supplied regular expression. If no items match, an empty Recordset instance is returned. + */ + grep: function(pattern) { + return new Y.Recordset({ + records: YArray.grep(this.get('host').get('records'), pattern) + }); + } + + //TODO: Add more pass-through methods to arrayextras +}); + +Y.namespace("Plugin").RecordsetFilter = RecordsetFilter; + + + + +}, '3.3.0' ,{requires:['recordset-base','array-extras','plugin']}); diff --git a/jssource/src_files/include/javascript/yui3/build/recordset/recordset-indexer-min.js b/jssource/src_files/include/javascript/yui3/build/recordset/recordset-indexer-min.js new file mode 100644 index 00000000..dd87c4a3 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/recordset/recordset-indexer-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("recordset-indexer",function(B){function A(C){A.superclass.constructor.apply(this,arguments);}B.mix(A,{NS:"indexer",NAME:"recordsetIndexer",ATTRS:{hashTables:{value:{}},keys:{value:{}}}});B.extend(A,B.Plugin.Base,{initializer:function(C){var D=this.get("host");this.onHostEvent("add",B.bind("_defAddHash",this),D);this.onHostEvent("remove",B.bind("_defRemoveHash",this),D);this.onHostEvent("update",B.bind("_defUpdateHash",this),D);},destructor:function(C){},_setHashTable:function(E){var F=this.get("host"),G={},D=0,C=F.getLength();for(;D0){var F=this._items.length;for(;G0))?G:1;for(;I-1))?G:this._items.length;if(C.isArray(J)){for(;H-1)?G:(this._items.length-1);F=(F>0)?F:1;H=this._items.slice(G,(G+F));this.fire("remove",{removed:H,range:F,index:G});return this;},empty:function(){this.fire("empty",{});return this;},update:function(I,G){var J,F,H=0;F=(!(C.isArray(I)))?[I]:I;J=this._items.slice(G,G+F.length);for(;H -1)) ? index : len; + for (; i < recs.length; i++) { + //if records are to be added one at a time, push them in one at a time + if (index === len) { + this._items.push(recs[i]); + } + else { + this._items.splice(index, 0, recs[i]); + index++; + } + } + + + }, + + /** + * @description Helper method called upon by remove() - it is used to remove record(s) from the recordset + * + * @method _defRemoveFn + * @private + */ + _defRemoveFn: function(e) { + + //remove from beginning + if (e.index === 0) { + this._items.shift(); + } + + //remove from end + else if (e.index === this._items.length - 1) { + this._items.pop(); + } + + //remove from middle + else { + this._items.splice(e.index, e.range); + } + }, + + /** + * Helper method called upon by empty() - it is used to empty the recordset + * + * @method _defEmptyFn + * @private + */ + _defEmptyFn: function(e) { + this._items = []; + }, + + /** + * @description Helper method called upon by update() - it is used to update the recordset + * + * @method _defUpdateFn + * @private + */ + _defUpdateFn: function(e) { + + for (var i = 0; i < e.updated.length; i++) { + this._items[e.index + i] = this._changeToRecord(e.updated[i]); + } + }, + + + //--------------------------------------------- + // Hash Table Methods + //--------------------------------------------- + + /** + * @description Method called whenever "recordset:add" event is fired. It adds the new record(s) to the hashtable. + * + * @method _defAddHash + * @private + */ + _defAddHash: function(e) { + var obj = this.get('table'), + key = this.get('key'), + i = 0; + for (; i < e.added.length; i++) { + obj[e.added[i].get(key)] = e.added[i]; + } + this.set('table', obj); + }, + + /** + * @description Method called whenever "recordset:remove" event is fired. It removes the record(s) from the recordset. + * + * @method _defRemoveHash + * @private + */ + _defRemoveHash: function(e) { + var obj = this.get('table'), + key = this.get('key'), + i = 0; + for (; i < e.removed.length; i++) { + delete obj[e.removed[i].get(key)]; + } + this.set('table', obj); + }, + + + /** + * @description Method called whenever "recordset:update" event is fired. It updates the record(s) by adding the new ones and removing the overwritten ones. + * + * @method _defUpdateHash + * @private + */ + _defUpdateHash: function(e) { + var obj = this.get('table'), + key = this.get('key'), + i = 0; + + //deletes the object key that held on to an overwritten record and + //creates an object key to hold on to the updated record + for (; i < e.updated.length; i++) { + if (e.overwritten[i]) { + delete obj[e.overwritten[i].get(key)]; + } + obj[e.updated[i].get(key)] = e.updated[i]; + } + this.set('table', obj); + }, + + /** + * @description Method called whenever "recordset:empty" event is fired. It empties the hash table. + * + * @method _defEmptyHash + * @private + */ + _defEmptyHash: function() { + this.set('table', {}); + }, + + /** + * @description Sets up the hashtable with all the records currently in the recordset + * + * @method _setHashTable + * @private + */ + _setHashTable: function() { + var obj = {}, + key = this.get('key'), + i = 0; + + //If it is not an empty recordset - go through and set up the hash table. + if (this._items && this._items.length > 0) { + var len = this._items.length; + for (; i < len; i++) { + obj[this._items[i].get(key)] = this._items[i]; + } + } + return obj; + }, + + + /** + * @description Helper method - it takes an object bag and converts it to a Y.Record + * + * @method _changeToRecord + * @param obj {Object || Y.Record} Any objet literal or Y.Record instance + * @return {Y.Record} A Record instance. + * @private + */ + _changeToRecord: function(obj) { + var oRec; + if (obj instanceof Y.Record) { + oRec = obj; + } + else { + oRec = new Y.Record({ + data: obj + }); + } + + return oRec; + }, + + //--------------------------------------------- + // Events + //--------------------------------------------- + /** + * @description Event that is fired whenever the recordset is changed. Note that multiple simultaneous changes still fires this event once. (ie: Adding multiple records via an array will only fire this event once at the completion of all the additions) + * + * @method _recordSetUpdated + * @private + */ + _recordsetChanged: function() { + + this.on(['update', 'add', 'remove', 'empty'], + function() { + this.fire('change', {}); + }); + }, + + + /** + * @description Syncs up the private hash methods with their appropriate triggering events. + * + * @method _syncHashTable + * @private + */ + _syncHashTable: function() { + + this.after('add', + function(e) { + this._defAddHash(e); + }); + this.after('remove', + function(e) { + this._defRemoveHash(e); + }); + this.after('update', + function(e) { + this._defUpdateHash(e); + }); + this.after('update', + function(e) { + this._defEmptyHash(); + }); + + }, + + //--------------------------------------------- + // Public Methods + //--------------------------------------------- + /** + * @description Returns the record with particular ID or index + * + * @method getRecord + * @param i {String, Number} The ID of the record if a string, or the index if a number. + * @return {Y.Record} An Y.Record instance + * @public + */ + getRecord: function(i) { + + if (Lang.isString(i)) { + return this.get('table')[i]; + } + else if (Lang.isNumber(i)) { + return this._items[i]; + } + return null; + }, + + + /** + * @description Returns the record at a particular index + * + * @method getRecordByIndex + * @param i {Number} Index at which the required record resides + * @return {Y.Record} An Y.Record instance + * @public + */ + getRecordByIndex: function(i) { + return this._items[i]; + }, + + /** + * @description Returns a range of records beginning at particular index + * + * @method getRecordsByIndex + * @param index {Number} Index at which the required record resides + * @param range {Number} (Optional) Number of records to retrieve. The default is 1 + * @return {Array} An array of Y.Record instances + * @public + */ + getRecordsByIndex: function(index, range) { + var i = 0, + returnedRecords = []; + //Range cannot take on negative values + range = (Lang.isNumber(range) && (range > 0)) ? range: 1; + + for (; i < range; i++) { + returnedRecords.push(this._items[index + i]); + } + return returnedRecords; + }, + + /** + * @description Returns the length of the recordset + * + * @method getLength + * @return {Number} Number of records in the recordset + * @public + */ + getLength: function() { + return this.size(); + }, + + /** + * @description Returns an array of values for a specified key in the recordset + * + * @method getValuesByKey + * @param index {Number} (optional) Index at which the required record resides + * @return {Array} An array of values for the given key + * @public + */ + getValuesByKey: function(key) { + var i = 0, + len = this._items.length, + retVals = []; + for (; i < len; i++) { + retVals.push(this._items[i].getValue(key)); + } + return retVals; + }, + + + /** + * @description Adds one or more Records to the RecordSet at the given index. If index is null, then adds the Records to the end of the RecordSet. + * + * @method add + * @param oData {Y.Record, Object Literal, Array} A Y.Record instance, An object literal of data or an array of object literals + * @param index {Number} (optional) Index at which to add the record(s) + * @return {Y.Recordset} The updated recordset instance + * @public + */ + add: function(oData, index) { + + var newRecords = [], + idx, + i = 0; + + idx = (Lang.isNumber(index) && (index > -1)) ? index: this._items.length; + + + + //Passing in array of object literals for oData + if (Lang.isArray(oData)) { + for (; i < oData.length; i++) { + newRecords[i] = this._changeToRecord(oData[i]); + } + + } + else if (Lang.isObject(oData)) { + newRecords[0] = this._changeToRecord(oData); + } + + this.fire('add', { + added: newRecords, + index: idx + }); + return this; + }, + + /** + * @description Removes one or more Records to the RecordSet at the given index. If index is null, then removes a single Record from the end of the RecordSet. + * + * @method remove + * @param index {Number} (optional) Index at which to remove the record(s) from + * @param range {Number} (optional) Number of records to remove (including the one at the index) + * @return {Y.Recordset} The updated recordset instance + * @public + */ + remove: function(index, range) { + var remRecords = []; + + //Default is to only remove the last record - the length is always 1 greater than the last index + index = (index > -1) ? index: (this._items.length - 1); + range = (range > 0) ? range: 1; + + remRecords = this._items.slice(index, (index + range)); + this.fire('remove', { + removed: remRecords, + range: range, + index: index + }); + //this._recordRemoved(remRecords, index); + //return ({data: remRecords, index:index}); + return this; + }, + + /** + * @description Empties the recordset + * + * @method empty + * @return {Y.Recordset} The updated recordset instance + * @public + */ + empty: function() { + this.fire('empty', {}); + return this; + }, + + /** + * @description Updates the recordset with the new records passed in. Overwrites existing records when updating the index with the new records. + * + * @method update + * @param data {Y.Record, Object Literal, Array} A Y.Record instance, An object literal of data or an array of object literals + * @param index {Number} (optional) The index to start updating from. + * @return {Y.Recordset} The updated recordset instance + * @public + */ + update: function(data, index) { + var rec, + arr, + i = 0; + + //Whatever is passed in, we are changing it to an array so that it can be easily iterated in the _defUpdateFn method + arr = (!(Lang.isArray(data))) ? [data] : data; + rec = this._items.slice(index, index + arr.length); + + for (; i < arr.length; i++) { + arr[i] = this._changeToRecord(arr[i]); + } + + this.fire('update', { + updated: arr, + overwritten: rec, + index: index + }); + + return this; + } + + +}, +{ + ATTRS: { + + /** + * @description An array of records that the recordset is storing + * + * @attribute records + * @public + * @type array + */ + records: { + validator: Lang.isArray, + getter: function() { + // give them a copy, not the internal object + return new Y.Array(this._items); + }, + setter: function(allData) { + //For allData passed in here, see if each instance is a Record. + //If its not, change it to a record. + //Then push it into the array. + var records = []; + function initRecord(oneData) { + var o; + + if (oneData instanceof Y.Record) { + records.push(oneData); + } + else { + o = new Y.Record({ + data: oneData + }); + records.push(o); + } + } + + //This conditional statement handles creating empty recordsets + if (allData) { + Y.Array.each(allData, initRecord); + this._items = Y.Array(records); + } + }, + + //value: [], + //initialization of the attribute must be done before the first call to get('records') is made. + //if lazyAdd were set to true, then instantiating using new Y.Recordset({records:[..]}) would + //not call the setter. + //see http://developer.yahoo.com/yui/3/api/Attribute.html#method_addAttr for details on this + lazyAdd: false + }, + + /** + * @description A hash table where the ID of the record is the key, and the record instance is the value. + * + * @attribute table + * @public + * @type object + */ + table: { + //Initially, create the hash table with all records currently in the recordset + valueFn: '_setHashTable' + }, + + /** + * @description The ID to use as the key in the hash table. + * + * @attribute key + * @public + * @type string + */ + key: { + value: 'id', + //set to readonly true. If you want custom hash tables, you should use the recordset-indexer plugin. + readOnly: true + } + + } +}); +Y.augment(Recordset, ArrayList); +Y.Recordset = Recordset; + + + + +}, '3.3.0' ,{requires:['base','arraylist']}); + +YUI.add('recordset-sort', function(Y) { + +/** + * Adds default and custom sorting functionality to the Recordset utility + * @module recordset + * @submodule recordset-sort + */ + +var Compare = Y.ArraySort.compare, +isValue = Y.Lang.isValue; + +/** + * Plugin that adds default and custom sorting functionality to the Recordset utility + * @class RecordsetSort + */ + +function RecordsetSort(field, desc, sorter) { + RecordsetSort.superclass.constructor.apply(this, arguments); +} + +Y.mix(RecordsetSort, { + NS: "sort", + + NAME: "recordsetSort", + + ATTRS: { + + /** + * @description The last properties used to sort. Consists of an object literal with the keys "field", "desc", and "sorter" + * + * @attribute lastSortProperties + * @public + * @type object + */ + lastSortProperties: { + value: { + field: undefined, + desc: true, + sorter: undefined + }, + validator: function(v) { + return (isValue(v.field) && isValue(v.desc) && isValue(v.sorter)); + } + }, + + /** + * @description Default sort function to use if none is specified by the user. + * Takes two records, the key to sort by, and whether sorting direction is descending or not (boolean). + * If two records have the same value for a given key, the ID is used as the tie-breaker. + * + * @attribute defaultSorter + * @public + * @type function + */ + defaultSorter: { + value: function(recA, recB, field, desc) { + var sorted = Compare(recA.getValue(field), recB.getValue(field), desc); + if (sorted === 0) { + return Compare(recA.get("id"), recB.get("id"), desc); + } + else { + return sorted; + } + } + }, + + /** + * @description A boolean telling if the recordset is in a sorted state. + * + * @attribute defaultSorter + * @public + * @type function + */ + isSorted: { + value: false + } + } +}); + +Y.extend(RecordsetSort, Y.Plugin.Base, { + + /** + * @description Sets up the default function to use when the "sort" event is fired. + * + * @method initializer + * @protected + */ + initializer: function(config) { + + var self = this, + host = this.get('host'); + + + this.publish("sort", { + defaultFn: Y.bind("_defSortFn", this) + }); + + //Toggle the isSorted ATTR based on events. + //Remove events dont affect isSorted, as they are just popped/sliced out + this.on("sort", + function() { + self.set('isSorted', true); + }); + + this.onHostEvent('add', + function() { + self.set('isSorted', false); + }, + host); + this.onHostEvent('update', + function() { + self.set('isSorted', false); + }, + host); + + }, + + destructor: function(config) { + }, + + /** + * @description Method that all sort calls go through. + * Sets up the lastSortProperties object with the details of the sort, and passes in parameters + * to the "defaultSorter" or a custom specified sort function. + * + * @method _defSortFn + * @private + */ + _defSortFn: function(e) { + //have to work directly with _items here - changing the recordset. + this.get("host")._items.sort(function(a, b) { + return (e.sorter)(a, b, e.field, e.desc); + }); + + this.set('lastSortProperties', e); + }, + + /** + * @description Sorts the recordset. + * + * @method sort + * @param field {string} A key to sort by. + * @param desc {boolean} True if you want sort order to be descending, false if you want sort order to be ascending + * @public + */ + sort: function(field, desc, sorter) { + this.fire("sort", { + field: field, + desc: desc, + sorter: sorter || this.get("defaultSorter") + }); + }, + + /** + * @description Resorts the recordset based on the last-used sort parameters (stored in 'lastSortProperties' ATTR) + * + * @method resort + * @public + */ + resort: function() { + var p = this.get('lastSortProperties'); + this.fire("sort", { + field: p.field, + desc: p.desc, + sorter: p.sorter || this.get("defaultSorter") + }); + }, + + /** + * @description Reverses the recordset calling the standard array.reverse() method. + * + * @method reverse + * @public + */ + reverse: function() { + this.get('host')._items.reverse(); + }, + + /** + * @description Sorts the recordset based on the last-used sort parameters, but flips the order. (ie: Descending becomes ascending, and vice versa). + * + * @method flip + * @public + */ + flip: function() { + var p = this.get('lastSortProperties'); + + //If a predefined field is not provided by which to sort by, throw an error + if (isValue(p.field)) { + this.fire("sort", { + field: p.field, + desc: !p.desc, + sorter: p.sorter || this.get("defaultSorter") + }); + } + else { + } + } +}); + +Y.namespace("Plugin").RecordsetSort = RecordsetSort; + + + + +}, '3.3.0' ,{requires:['arraysort','recordset-base','plugin']}); + +YUI.add('recordset-filter', function(Y) { + +/** + * Plugin that provides the ability to filter through a recordset. + * Uses the filter methods available on Y.Array (see arrayextras submodule) to filter the recordset. + * @module recordset + * @submodule recordset-filter + */ + + +var YArray = Y.Array, +Lang = Y.Lang; + + +/** + * Plugin that provides the ability to filter through a recordset. + * Uses the filter methods available on Y.Array (see arrayextras submodule) to filter the recordset. + * @class RecordsetFilter + */ +function RecordsetFilter(config) { + RecordsetFilter.superclass.constructor.apply(this, arguments); +} + +Y.mix(RecordsetFilter, { + NS: "filter", + + NAME: "recordsetFilter", + + ATTRS: { + } + +}); + + +Y.extend(RecordsetFilter, Y.Plugin.Base, { + + + initializer: function(config) { + }, + + destructor: function(config) { + }, + + /** + * @description Filter through the recordset with a custom filter function, or a key-value pair. + * + * @method filter + * @param f {Function, String} A custom filter function or a string representing the key to filter by. + * @param v {any} (optional) If a string is passed into f, this represents the value that key should take in order to be accepted by the filter. Do not pass in anything if 'f' is a custom function + * @return recordset {Y.Recordset} A new filtered recordset instance + * @public + */ + filter: function(f, v) { + var recs = this.get('host').get('records'), + oRecs = [], + func = f; + + //If a key-value pair is passed in, generate a custom function + if (Lang.isString(f) && Lang.isValue(v)) { + + func = function(item) { + if (item.getValue(f) === v) { + return true; + } + else { + return false; + } + }; + } + + oRecs = YArray.filter(recs, func); + + + //TODO: PARENT CHILD RELATIONSHIP + return new Y.Recordset({ + records: oRecs + }); + //return new host.constructor({records:arr}); + }, + + /** + * @description The inverse of filter. Executes the supplied function on each item. Returns a new Recordset containing the items that the supplied function returned *false* for. + * @method reject + * @param {Function} f is the function to execute on each item. + * @return {Y.Recordset} A new Recordset instance containing the items on which the supplied function returned false. + */ + reject: function(f) { + return new Y.Recordset({ + records: YArray.reject(this.get('host').get('records'), f) + }); + }, + + /** + * @description Iterates over the Recordset, returning a new Recordset of all the elements that match the supplied regular expression + * @method grep + * @param {pattern} pattern The regular expression to test against + * each record. + * @return {Y.Recordset} A Recordset instance containing all the items in the collection that produce a match against the supplied regular expression. If no items match, an empty Recordset instance is returned. + */ + grep: function(pattern) { + return new Y.Recordset({ + records: YArray.grep(this.get('host').get('records'), pattern) + }); + } + + //TODO: Add more pass-through methods to arrayextras +}); + +Y.namespace("Plugin").RecordsetFilter = RecordsetFilter; + + + + +}, '3.3.0' ,{requires:['recordset-base','array-extras','plugin']}); + +YUI.add('recordset-indexer', function(Y) { + +/** + * Provides the ability to store multiple custom hash tables referencing records in the recordset. + * @module recordset + * @submodule recordset-indexer + */ +/** + * Plugin that provides the ability to store multiple custom hash tables referencing records in the recordset. + * This utility does not support any collision handling. New hash table entries with a used key overwrite older ones. + * @class RecordsetIndexer + */ +function RecordsetIndexer(config) { + RecordsetIndexer.superclass.constructor.apply(this, arguments); +} + +Y.mix(RecordsetIndexer, { + NS: "indexer", + + NAME: "recordsetIndexer", + + ATTRS: { + /** + * @description Collection of all the hashTables created by the plugin. + * The individual tables can be accessed by the key they are hashing against. + * + * @attribute hashTables + * @public + * @type object + */ + hashTables: { + value: { + + } + }, + + + keys: { + value: { + + } + } + } +}); + + +Y.extend(RecordsetIndexer, Y.Plugin.Base, { + + initializer: function(config) { + var host = this.get('host'); + + //setup listeners on recordset events + this.onHostEvent('add', Y.bind("_defAddHash", this), host); + this.onHostEvent('remove', Y.bind('_defRemoveHash', this), host); + this.onHostEvent('update', Y.bind('_defUpdateHash', this), host); + + }, + + destructor: function(config) { + + }, + + + /** + * @description Setup the hash table for a given key with all existing records in the recordset + * + * @method _setHashTable + * @param key {string} A key to hash by. + * @return obj {object} The created hash table + * @private + */ + _setHashTable: function(key) { + var host = this.get('host'), + obj = {}, + i = 0, + len = host.getLength(); + + for (; i < len; i++) { + obj[host._items[i].getValue(key)] = host._items[i]; + } + return obj; + }, + + //--------------------------------------------- + // Syncing Methods + //--------------------------------------------- + + /** + * @description Updates all hash tables when a record is added to the recordset + * + * @method _defAddHash + * @private + */ + _defAddHash: function(e) { + var tbl = this.get('hashTables'); + + + //Go through every hashtable that is stored. + //in each hashtable, look to see if the key is represented in the object being added. + Y.each(tbl, + function(v, key) { + Y.each(e.added || e.updated, + function(o) { + //if the object being added has a key which is being stored by hashtable v, add it into the table. + if (o.getValue(key)) { + v[o.getValue(key)] = o; + } + }); + }); + + }, + + /** + * @description Updates all hash tables when a record is removed from the recordset + * + * @method _defRemoveHash + * @private + */ + _defRemoveHash: function(e) { + var tbl = this.get('hashTables'), + reckey; + + //Go through every hashtable that is stored. + //in each hashtable, look to see if the key is represented in the object being deleted. + Y.each(tbl, + function(v, key) { + Y.each(e.removed || e.overwritten, + function(o) { + reckey = o.getValue(key); + + //if the hashtable has a key storing a record, and the key and the record both match the record being deleted, delete that row from the hashtable + if (reckey && v[reckey] === o) { + delete v[reckey]; + } + }); + }); + }, + + /** + * @description Updates all hash tables when the recordset is updated (a combination of add and remove) + * + * @method _defUpdateHash + * @private + */ + _defUpdateHash: function(e) { + + //TODO: It will be more performant to create a new method rather than using _defAddHash, _defRemoveHash, due to the number of loops. See commented code. + e.added = e.updated; + e.removed = e.overwritten; + this._defAddHash(e); + this._defRemoveHash(e); + + /* + var tbl = this.get('hashTables'), reckey; + + Y.each(tbl, function(v, key) { + Y.each(e.updated, function(o, i) { + + //delete record from hashtable if it has been overwritten + reckey = o.getValue(key); + + if (reckey) { + v[reckey] = o; + } + + //the undefined case is if more records are updated than currently exist in the recordset. + if (e.overwritten[i] && (v[e.overwritten[i].getValue(key)] === e.overwritten[i])) { + delete v[e.overwritten[i].getValue(key)]; + } + + // if (v[reckey] === o) { + // delete v[reckey]; + // } + // + // //add the new updated record if it has a key that corresponds to a hash table + // if (o.getValue(key)) { + // v[o.getValue(key)] = o; + // } + + }); + }); + */ + }, + + //--------------------------------------------- + // Public Methods + //--------------------------------------------- + + /** + * @description Creates a new hash table. + * + * @method createTable + * @param key {string} A key to hash by. + * @return tbls[key] {object} The created hash table + * @public + */ + createTable: function(key) { + var tbls = this.get('hashTables'); + tbls[key] = this._setHashTable(key); + this.set('hashTables', tbls); + + return tbls[key]; + }, + + + /** + * @description Get a hash table that hashes records by a given key. + * + * @method getTable + * @param key {string} A key to hash by. + * @return table {object} The created hash table + * @public + */ + getTable: function(key) { + return this.get('hashTables')[key]; + } + + + + + +}); +Y.namespace("Plugin").RecordsetIndexer = RecordsetIndexer; + + + + +}, '3.3.0' ,{requires:['recordset-base','plugin']}); + + + +YUI.add('recordset', function(Y){}, '3.3.0' ,{use:['recordset-base','recordset-sort','recordset-filter','recordset-indexer']}); + diff --git a/jssource/src_files/include/javascript/yui3/build/resize/resize-base-min.js b/jssource/src_files/include/javascript/yui3/build/resize/resize-base-min.js new file mode 100644 index 00000000..b9010c5e --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/resize/resize-base-min.js @@ -0,0 +1,9 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("resize-base",function(t){var v=t.Lang,C=v.isArray,AT=v.isBoolean,p=v.isNumber,AY=v.isString,AE=t.Array,AP=v.trim,M=AE.indexOf,V=",",AC=".",S="",l="{handle}",U=" ",Q="active",o="activeHandle",f="activeHandleNode",Z="all",AI="autoHide",AR="border",AN="bottom",AJ="className",AM="color",AX="defMinHeight",Ac="defMinWidth",a="handle",n="handles",AA="hidden",X="inner",A="left",m="margin",P="node",d="nodeName",u="none",h="offsetHeight",AW="offsetWidth",y="padding",E="parentNode",N="position",K="relative",AH="resize",O="resizing",H="right",Ad="static",G="style",J="top",j="width",AK="wrap",AZ="wrapper",AF="wrapTypes",i="resize:mouseUp",W="resize:resize",b="resize:align",k="resize:end",s="resize:start",w="t",Ab="tr",x="r",AS="br",AG="b",AU="bl",AD="l",Ae="tl",Aa=function(){return Array.prototype.slice.call(arguments).join(U);},AO=function(B){return Math.round(parseFloat(B))||0;},AB=function(B,L){return B.getComputedStyle(L);},Af=function(B){return a+B.toUpperCase();},q=function(B){return(B instanceof t.Node);},r=t.cached(function(B){return B.substring(0,1).toUpperCase()+B.substring(1);}),e=t.cached(function(){var L=[],B=AE(arguments,0,true);AE.each(B,function(R,T){if(T>0){R=r(R);}L.push(R);});return L.join(S);}),c=t.ClassNameManager.getClassName,AQ=c(AH),AL=c(AH,a),z=c(AH,a,Q),F=c(AH,a,X),g=c(AH,a,X,l),Ag=c(AH,a,l),D=c(AH,AA,n),AV=c(AH,AZ);function I(){I.superclass.constructor.apply(this,arguments);}t.mix(I,{NAME:AH,ATTRS:{activeHandle:{value:null,validator:function(B){return t.Lang.isString(B)||t.Lang.isNull(B);}},activeHandleNode:{value:null,validator:q},autoHide:{value:false,validator:AT},defMinHeight:{value:15,validator:p},defMinWidth:{value:15,validator:p},handles:{setter:"_setHandles",value:Z},node:{setter:t.one},resizing:{value:false,validator:AT},wrap:{setter:"_setWrap",value:false,validator:AT},wrapTypes:{readOnly:true,value:/^canvas|textarea|input|select|button|img|iframe|table|embed$/i},wrapper:{readOnly:true,valueFn:"_valueWrapper",writeOnce:true}},RULES:{b:function(B,R,L){var Y=B.info,T=B.originalInfo;Y.offsetHeight=T.offsetHeight+L;},l:function(B,R,L){var Y=B.info,T=B.originalInfo;Y.left=T.left+R;Y.offsetWidth=T.offsetWidth-R;},r:function(B,R,L){var Y=B.info,T=B.originalInfo;Y.offsetWidth=T.offsetWidth+R;},t:function(B,R,L){var Y=B.info,T=B.originalInfo;Y.top=T.top+L;Y.offsetHeight=T.offsetHeight-L;},tr:function(B,R,L){this.t.apply(this,arguments);this.r.apply(this,arguments);},bl:function(B,R,L){this.b.apply(this,arguments);this.l.apply(this,arguments);},br:function(B,R,L){this.b.apply(this,arguments);this.r.apply(this,arguments);},tl:function(B,R,L){this.t.apply(this,arguments);this.l.apply(this,arguments);}},capitalize:e});t.Resize=t.extend(I,t.Base,{ALL_HANDLES:[w,Ab,x,AS,AG,AU,AD,Ae],REGEX_CHANGE_HEIGHT:/^(t|tr|b|bl|br|tl)$/i,REGEX_CHANGE_LEFT:/^(tl|l|bl)$/i,REGEX_CHANGE_TOP:/^(tl|t|tr)$/i,REGEX_CHANGE_WIDTH:/^(bl|br|l|r|tl|tr)$/i,WRAP_TEMPLATE:'
          ',HANDLE_TEMPLATE:'
          '+'
           
          '+"
          ",totalHSurrounding:0,totalVSurrounding:0,nodeSurrounding:null,wrapperSurrounding:null,changeHeightHandles:false,changeLeftHandles:false,changeTopHandles:false,changeWidthHandles:false,delegate:null,info:null,lastInfo:null,originalInfo:null,initializer:function(){this.renderer();},renderUI:function(){var B=this;B._renderHandles();},bindUI:function(){var B=this;B._createEvents();B._bindDD();B._bindHandle();},syncUI:function(){var B=this;this.get(P).addClass(AQ);B._setHideHandlesUI(B.get(AI));},destructor:function(){var B=this,R=B.get(P),T=B.get(AZ),L=T.get(E);t.Event.purgeElement(T,true);B.eachHandle(function(Y){B.delegate.dd.destroy();Y.remove(true);});if(B.get(AK)){B._copyStyles(T,R);if(L){L.insertBefore(R,T);}T.remove(true);}R.removeClass(AQ);R.removeClass(D);},renderer:function(){this.renderUI();this.bindUI();this.syncUI();},eachHandle:function(L){var B=this;t.each(B.get(n),function(Y,R){var T=B.get(Af(Y));L.apply(B,[T,Y,R]);});},_bindDD:function(){var B=this;B.delegate=new t.DD.Delegate({bubbleTargets:B,container:B.get(AZ),dragConfig:{clickPixelThresh:0,clickTimeThresh:0,useShim:true,move:false},nodes:AC+AL,target:false});B.on("drag:drag",B._handleResizeEvent);B.on("drag:dropmiss",B._handleMouseUpEvent);B.on("drag:end",B._handleResizeEndEvent);B.on("drag:start",B._handleResizeStartEvent);},_bindHandle:function(){var B=this,L=B.get(AZ);L.on("mouseenter",t.bind(B._onWrapperMouseEnter,B));L.on("mouseleave",t.bind(B._onWrapperMouseLeave,B));L.delegate("mouseenter",t.bind(B._onHandleMouseEnter,B),AC+AL);L.delegate("mouseleave",t.bind(B._onHandleMouseLeave,B),AC+AL);},_createEvents:function(){var B=this,L=function(R,T){B.publish(R,{defaultFn:T,queuable:false,emitFacade:true,bubbles:true,prefix:AH});};L(s,this._defResizeStartFn);L(W,this._defResizeFn);L(b,this._defResizeAlignFn);L(k,this._defResizeEndFn);L(i,this._defMouseUpFn);},_renderHandles:function(){var B=this,L=B.get(AZ);B.eachHandle(function(R){L.append(R);});},_buildHandle:function(L){var B=this;return t.Node.create(t.substitute(B.HANDLE_TEMPLATE,{handle:L}));},_calcResize:function(){var B=this,T=B.handle,Ah=B.info,Y=B.originalInfo,R=Ah.actXY[0]-Y.actXY[0],L=Ah.actXY[1]-Y.actXY[1];if(T&&t.Resize.RULES[T]){t.Resize.RULES[T](B,R,L);}else{}},_checkSize:function(Ah,L){var B=this,Y=B.info,T=B.originalInfo,R=(Ah==h)?J:A;Y[Ah]=L;if(((R==A)&&B.changeLeftHandles)||((R==J)&&B.changeTopHandles)){Y[R]=T[R]+T[Ah]-L;}},_copyStyles:function(R,Y){var B=R.getStyle(N).toLowerCase(),T=this._getBoxSurroundingInfo(R),L;if(B==Ad){B=K;}L={position:B,left:AB(R,A),top:AB(R,J)};t.mix(L,T.margin);t.mix(L,T.border);Y.setStyles(L);R.setStyles({border:0,margin:0});Y.sizeTo(R.get(AW)+T.totalHBorder,R.get(h)+T.totalVBorder);},_extractHandleName:t.cached(function(R){var L=R.get(AJ),B=L.match(new RegExp(c(AH,a,"(\\w{1,2})\\b")));return B?B[1]:null;}),_getInfo:function(Y,B){var Ah=[0,0],Aj=B.dragEvent.target,Ai=Y.getXY(),T=Ai[0],R=Ai[1],L=Y.get(h),Ak=Y.get(AW);if(B){Ah=(Aj.actXY.length?Aj.actXY:Aj.lastXY); +}return{actXY:Ah,bottom:(R+L),left:T,offsetHeight:L,offsetWidth:Ak,right:(T+Ak),top:R};},_getBoxSurroundingInfo:function(B){var L={padding:{},margin:{},border:{}};if(q(B)){t.each([J,H,AN,A],function(Ah){var T=e(y,Ah),Y=e(m,Ah),R=e(AR,Ah,j),Ai=e(AR,Ah,AM),Aj=e(AR,Ah,G);L.border[Ai]=AB(B,Ai);L.border[Aj]=AB(B,Aj);L.border[R]=AB(B,R);L.margin[Y]=AB(B,Y);L.padding[T]=AB(B,T);});}L.totalHBorder=(AO(L.border.borderLeftWidth)+AO(L.border.borderRightWidth));L.totalHPadding=(AO(L.padding.paddingLeft)+AO(L.padding.paddingRight));L.totalVBorder=(AO(L.border.borderBottomWidth)+AO(L.border.borderTopWidth));L.totalVPadding=(AO(L.padding.paddingBottom)+AO(L.padding.paddingTop));return L;},_syncUI:function(){var B=this,T=B.info,R=B.wrapperSurrounding,Y=B.get(AZ),L=B.get(P);Y.sizeTo(T.offsetWidth,T.offsetHeight);if(B.changeLeftHandles||B.changeTopHandles){Y.setXY([T.left,T.top]);}if(!Y.compareTo(L)){L.sizeTo(T.offsetWidth-R.totalHBorder,T.offsetHeight-R.totalVBorder);}if(t.UA.webkit){L.setStyle(AH,u);}},_updateChangeHandleInfo:function(L){var B=this;B.changeHeightHandles=B.REGEX_CHANGE_HEIGHT.test(L);B.changeLeftHandles=B.REGEX_CHANGE_LEFT.test(L);B.changeTopHandles=B.REGEX_CHANGE_TOP.test(L);B.changeWidthHandles=B.REGEX_CHANGE_WIDTH.test(L);},_updateInfo:function(L){var B=this;B.info=B._getInfo(B.get(AZ),L);},_updateSurroundingInfo:function(){var B=this,T=B.get(P),Y=B.get(AZ),L=B._getBoxSurroundingInfo(T),R=B._getBoxSurroundingInfo(Y);B.nodeSurrounding=L;B.wrapperSurrounding=R;B.totalVSurrounding=(L.totalVPadding+R.totalVBorder);B.totalHSurrounding=(L.totalHPadding+R.totalHBorder);},_setActiveHandlesUI:function(R){var B=this,L=B.get(f);if(L){if(R){B.eachHandle(function(T){T.removeClass(z);});L.addClass(z);}else{L.removeClass(z);}}},_setHandles:function(R){var B=this,L=[];if(C(R)){L=R;}else{if(AY(R)){if(R.toLowerCase()==Z){L=B.ALL_HANDLES;}else{t.each(R.split(V),function(Y,T){var Ah=AP(Y);if(M(B.ALL_HANDLES,Ah)>-1){L.push(Ah);}});}}}return L;},_setHideHandlesUI:function(L){var B=this,R=B.get(AZ);if(!B.get(O)){if(L){R.addClass(D);}else{R.removeClass(D);}}},_setWrap:function(T){var B=this,R=B.get(P),Y=R.get(d),L=B.get(AF);if(L.test(Y)){T=true;}return T;},_defMouseUpFn:function(L){var B=this;B.set(O,false);},_defResizeFn:function(L){var B=this;B._resize(L);},_resize:function(L){var B=this;B._handleResizeAlignEvent(L.dragEvent);B._syncUI();},_defResizeAlignFn:function(L){var B=this;B._resizeAlign(L);},_resizeAlign:function(R){var B=this,T,L,Y;B.lastInfo=B.info;B._updateInfo(R);T=B.info;B._calcResize();if(!B.con){L=(B.get(AX)+B.totalVSurrounding);Y=(B.get(Ac)+B.totalHSurrounding);if(T.offsetHeight<=L){B._checkSize(h,L);}if(T.offsetWidth<=Y){B._checkSize(AW,Y);}}},_defResizeEndFn:function(L){var B=this;B._resizeEnd(L);},_resizeEnd:function(R){var B=this,L=R.dragEvent.target;L.actXY=[];B._syncUI();B._setActiveHandlesUI(false);B.set(o,null);B.set(f,null);B.handle=null;},_defResizeStartFn:function(L){var B=this;B._resizeStart(L);},_resizeStart:function(L){var B=this,R=B.get(AZ);B.handle=B.get(o);B.set(O,true);B._updateSurroundingInfo();B.originalInfo=B._getInfo(R,L);B._updateInfo(L);},_handleMouseUpEvent:function(B){this.fire(i,{dragEvent:B,info:this.info});},_handleResizeEvent:function(B){this.fire(W,{dragEvent:B,info:this.info});},_handleResizeAlignEvent:function(B){this.fire(b,{dragEvent:B,info:this.info});},_handleResizeEndEvent:function(B){this.fire(k,{dragEvent:B,info:this.info});},_handleResizeStartEvent:function(B){if(!this.get(o)){this._setHandleFromNode(B.target.get("node"));}this.fire(s,{dragEvent:B,info:this.info});},_onWrapperMouseEnter:function(L){var B=this;if(B.get(AI)){B._setHideHandlesUI(false);}},_onWrapperMouseLeave:function(L){var B=this;if(B.get(AI)){B._setHideHandlesUI(true);}},_setHandleFromNode:function(L){var B=this,R=B._extractHandleName(L);if(!B.get(O)){B.set(o,R);B.set(f,L);B._setActiveHandlesUI(true);B._updateChangeHandleInfo(R);}},_onHandleMouseEnter:function(B){this._setHandleFromNode(B.currentTarget);},_onHandleMouseLeave:function(L){var B=this;if(!B.get(O)){B._setActiveHandlesUI(false);}},_valueWrapper:function(){var B=this,R=B.get(P),L=R.get(E),T=R;if(B.get(AK)){T=t.Node.create(B.WRAP_TEMPLATE);if(L){L.insertBefore(T,R);}T.append(R);B._copyStyles(R,T);R.setStyles({position:Ad,left:0,top:0});}return T;}});t.each(t.Resize.prototype.ALL_HANDLES,function(L,B){t.Resize.ATTRS[Af(L)]={setter:function(){return this._buildHandle(L);},value:null,writeOnce:true};});},"3.3.0",{requires:["base","widget","substitute","event","oop","dd-drag","dd-delegate","dd-drop"],skinnable:true}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/resize/resize-base.js b/jssource/src_files/include/javascript/yui3/build/resize/resize-base.js new file mode 100644 index 00000000..e8abc580 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/resize/resize-base.js @@ -0,0 +1,1605 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('resize-base', function(Y) { + +/** + * The Resize Utility allows you to make an HTML element resizable. + * + * @module resize + */ + +var Lang = Y.Lang, + isArray = Lang.isArray, + isBoolean = Lang.isBoolean, + isNumber = Lang.isNumber, + isString = Lang.isString, + + YArray = Y.Array, + trim = Lang.trim, + indexOf = YArray.indexOf, + + COMMA = ',', + DOT = '.', + EMPTY_STR = '', + HANDLE_SUB = '{handle}', + SPACE = ' ', + + ACTIVE = 'active', + ACTIVE_HANDLE = 'activeHandle', + ACTIVE_HANDLE_NODE = 'activeHandleNode', + ALL = 'all', + AUTO_HIDE = 'autoHide', + BORDER = 'border', + BOTTOM = 'bottom', + CLASS_NAME = 'className', + COLOR = 'color', + DEF_MIN_HEIGHT = 'defMinHeight', + DEF_MIN_WIDTH = 'defMinWidth', + HANDLE = 'handle', + HANDLES = 'handles', + HIDDEN = 'hidden', + INNER = 'inner', + LEFT = 'left', + MARGIN = 'margin', + NODE = 'node', + NODE_NAME = 'nodeName', + NONE = 'none', + OFFSET_HEIGHT = 'offsetHeight', + OFFSET_WIDTH = 'offsetWidth', + PADDING = 'padding', + PARENT_NODE = 'parentNode', + POSITION = 'position', + RELATIVE = 'relative', + RESIZE = 'resize', + RESIZING = 'resizing', + RIGHT = 'right', + STATIC = 'static', + STYLE = 'style', + TOP = 'top', + WIDTH = 'width', + WRAP = 'wrap', + WRAPPER = 'wrapper', + WRAP_TYPES = 'wrapTypes', + + EV_MOUSE_UP = 'resize:mouseUp', + EV_RESIZE = 'resize:resize', + EV_RESIZE_ALIGN = 'resize:align', + EV_RESIZE_END = 'resize:end', + EV_RESIZE_START = 'resize:start', + + T = 't', + TR = 'tr', + R = 'r', + BR = 'br', + B = 'b', + BL = 'bl', + L = 'l', + TL = 'tl', + + concat = function() { + return Array.prototype.slice.call(arguments).join(SPACE); + }, + + // round the passed number to get rid of pixel-flickering + toRoundNumber = function(num) { + return Math.round(parseFloat(num)) || 0; + }, + + getCompStyle = function(node, val) { + return node.getComputedStyle(val); + }, + + handleAttrName = function(handle) { + return HANDLE + handle.toUpperCase(); + }, + + isNode = function(v) { + return (v instanceof Y.Node); + }, + + toInitialCap = Y.cached( + function(str) { + return str.substring(0, 1).toUpperCase() + str.substring(1); + } + ), + + capitalize = Y.cached(function() { + var out = [], + args = YArray(arguments, 0, true); + + YArray.each(args, function(part, i) { + if (i > 0) { + part = toInitialCap(part); + } + out.push(part); + }); + + return out.join(EMPTY_STR); + }), + + getCN = Y.ClassNameManager.getClassName, + + CSS_RESIZE = getCN(RESIZE), + CSS_RESIZE_HANDLE = getCN(RESIZE, HANDLE), + CSS_RESIZE_HANDLE_ACTIVE = getCN(RESIZE, HANDLE, ACTIVE), + CSS_RESIZE_HANDLE_INNER = getCN(RESIZE, HANDLE, INNER), + CSS_RESIZE_HANDLE_INNER_PLACEHOLDER = getCN(RESIZE, HANDLE, INNER, HANDLE_SUB), + CSS_RESIZE_HANDLE_PLACEHOLDER = getCN(RESIZE, HANDLE, HANDLE_SUB), + CSS_RESIZE_HIDDEN_HANDLES = getCN(RESIZE, HIDDEN, HANDLES), + CSS_RESIZE_WRAPPER = getCN(RESIZE, WRAPPER); + +/** + * A base class for Resize, providing: + *
            + *
          • Basic Lifecycle (initializer, renderUI, bindUI, syncUI, destructor)
          • + *
          • Applies drag handles to an element to make it resizable
          • + *
          • Here is the list of valid resize handles: + * [ 't', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl' ]. You can + * read this list as top, top-right, right, bottom-right, bottom, + * bottom-left, left, top-left.
          • + *
          • The drag handles are inserted into the element and positioned + * absolute. Some elements, such as a textarea or image, don't support + * children. To overcome that, set wrap:true in your config and the + * element willbe wrapped for you automatically.
          • + *
          + * + * Quick Example: + * + *
          var instance = new Y.Resize({
          + *  node: '#resize1',
          + *  preserveRatio: true,
          + *  wrap: true,
          + *  maxHeight: 170,
          + *  maxWidth: 400,
          + *  handles: 't, tr, r, br, b, bl, l, tl'
          + * });
          + * 
          + * + * Check the list of Configuration Attributes available for + * Resize. + * + * @class Resize + * @param config {Object} Object literal specifying widget configuration properties. + * @constructor + * @extends Base + */ +function Resize() { + Resize.superclass.constructor.apply(this, arguments); +} + +Y.mix(Resize, { + /** + * Static property provides a string to identify the class. + * + * @property Resize.NAME + * @type String + * @static + */ + NAME: RESIZE, + + /** + * Static property used to define the default attribute + * configuration for the Resize. + * + * @property Resize.ATTRS + * @type Object + * @static + */ + ATTRS: { + /** + * Stores the active handle during the resize. + * + * @attribute activeHandle + * @default null + * @private + * @type String + */ + activeHandle: { + value: null, + validator: function(v) { + return Y.Lang.isString(v) || Y.Lang.isNull(v); + } + }, + + /** + * Stores the active handle element during the resize. + * + * @attribute activeHandleNode + * @default null + * @private + * @type Node + */ + activeHandleNode: { + value: null, + validator: isNode + }, + + /** + * False to ensure that the resize handles are always visible, true to + * display them only when the user mouses over the resizable borders. + * + * @attribute autoHide + * @default false + * @type boolean + */ + autoHide: { + value: false, + validator: isBoolean + }, + + /** + * The default minimum height of the element. Only used when + * ResizeConstrained is not plugged. + * + * @attribute defMinHeight + * @default 15 + * @type Number + */ + defMinHeight: { + value: 15, + validator: isNumber + }, + + /** + * The default minimum width of the element. Only used when + * ResizeConstrained is not plugged. + * + * @attribute defMinWidth + * @default 15 + * @type Number + */ + defMinWidth: { + value: 15, + validator: isNumber + }, + + /** + * The handles to use (any combination of): 't', 'b', 'r', 'l', 'bl', + * 'br', 'tl', 'tr'. Can use a shortcut of All. + * + * @attribute handles + * @default all + * @type Array | String + */ + handles: { + setter: '_setHandles', + value: ALL + }, + + /** + * The selector or element to resize. Required. + * + * @attribute node + * @type Node + */ + node: { + setter: Y.one + }, + + /** + * True when the element is being Resized. + * + * @attribute resizing + * @default false + * @type boolean + */ + resizing: { + value: false, + validator: isBoolean + }, + + /** + * True to wrap an element with a div if needed (required for textareas + * and images, defaults to false) in favor of the handles config option. + * The wrapper element type (default div) could be over-riden passing the + * wrapper attribute. + * + * @attribute wrap + * @default false + * @type boolean + */ + wrap: { + setter: '_setWrap', + value: false, + validator: isBoolean + }, + + /** + * Elements that requires a wrapper by default. Normally are elements + * which cannot have children elements. + * + * @attribute wrapTypes + * @default /canvas|textarea|input|select|button|img/i + * @readOnly + * @type Regex + */ + wrapTypes: { + readOnly: true, + value: /^canvas|textarea|input|select|button|img|iframe|table|embed$/i + }, + + /** + * Element to wrap the wrapTypes. This element will house + * the handles elements. + * + * @attribute wrapper + * @default div + * @type String | Node + * @writeOnce + */ + wrapper: { + readOnly: true, + valueFn: '_valueWrapper', + writeOnce: true + } + }, + + RULES: { + b: function(instance, dx, dy) { + var info = instance.info, + originalInfo = instance.originalInfo; + + info.offsetHeight = originalInfo.offsetHeight + dy; + }, + + l: function(instance, dx, dy) { + var info = instance.info, + originalInfo = instance.originalInfo; + + info.left = originalInfo.left + dx; + info.offsetWidth = originalInfo.offsetWidth - dx; + }, + + r: function(instance, dx, dy) { + var info = instance.info, + originalInfo = instance.originalInfo; + + info.offsetWidth = originalInfo.offsetWidth + dx; + }, + + t: function(instance, dx, dy) { + var info = instance.info, + originalInfo = instance.originalInfo; + + info.top = originalInfo.top + dy; + info.offsetHeight = originalInfo.offsetHeight - dy; + }, + + tr: function(instance, dx, dy) { + this.t.apply(this, arguments); + this.r.apply(this, arguments); + }, + + bl: function(instance, dx, dy) { + this.b.apply(this, arguments); + this.l.apply(this, arguments); + }, + + br: function(instance, dx, dy) { + this.b.apply(this, arguments); + this.r.apply(this, arguments); + }, + + tl: function(instance, dx, dy) { + this.t.apply(this, arguments); + this.l.apply(this, arguments); + } + }, + + capitalize: capitalize +}); + +Y.Resize = Y.extend( + Resize, + Y.Base, + { + /** + * Array containing all possible resizable handles. + * + * @property ALL_HANDLES + * @type {String} + */ + ALL_HANDLES: [ T, TR, R, BR, B, BL, L, TL ], + + /** + * Regex which matches with the handles that could change the height of + * the resizable element. + * + * @property REGEX_CHANGE_HEIGHT + * @type {String} + */ + REGEX_CHANGE_HEIGHT: /^(t|tr|b|bl|br|tl)$/i, + + /** + * Regex which matches with the handles that could change the left of + * the resizable element. + * + * @property REGEX_CHANGE_LEFT + * @type {String} + */ + REGEX_CHANGE_LEFT: /^(tl|l|bl)$/i, + + /** + * Regex which matches with the handles that could change the top of + * the resizable element. + * + * @property REGEX_CHANGE_TOP + * @type {String} + */ + REGEX_CHANGE_TOP: /^(tl|t|tr)$/i, + + /** + * Regex which matches with the handles that could change the width of + * the resizable element. + * + * @property REGEX_CHANGE_WIDTH + * @type {String} + */ + REGEX_CHANGE_WIDTH: /^(bl|br|l|r|tl|tr)$/i, + + /** + * Template used to create the resize wrapper node when needed. + * + * @property WRAP_TEMPLATE + * @type {String} + */ + WRAP_TEMPLATE: '
          ', + + /** + * Template used to create each resize handle. + * + * @property HANDLE_TEMPLATE + * @type {String} + */ + HANDLE_TEMPLATE: '
          ' + + '
           
          ' + + '
          ', + + + /** + * Each box has a content area and optional surrounding padding and + * border areas. This property stores the sum of all horizontal + * surrounding * information needed to adjust the node height. + * + * @property totalHSurrounding + * @default 0 + * @type number + */ + totalHSurrounding: 0, + + /** + * Each box has a content area and optional surrounding padding and + * border areas. This property stores the sum of all vertical + * surrounding * information needed to adjust the node height. + * + * @property totalVSurrounding + * @default 0 + * @type number + */ + totalVSurrounding: 0, + + /** + * Stores the node + * surrounding information retrieved from + * _getBoxSurroundingInfo. + * + * @property nodeSurrounding + * @type Object + * @default null + */ + nodeSurrounding: null, + + /** + * Stores the wrapper + * surrounding information retrieved from + * _getBoxSurroundingInfo. + * + * @property wrapperSurrounding + * @type Object + * @default null + */ + wrapperSurrounding: null, + + /** + * Whether the handle being dragged can change the height. + * + * @property changeHeightHandles + * @default false + * @type boolean + */ + changeHeightHandles: false, + + /** + * Whether the handle being dragged can change the left. + * + * @property changeLeftHandles + * @default false + * @type boolean + */ + changeLeftHandles: false, + + /** + * Whether the handle being dragged can change the top. + * + * @property changeTopHandles + * @default false + * @type boolean + */ + changeTopHandles: false, + + /** + * Whether the handle being dragged can change the width. + * + * @property changeWidthHandles + * @default false + * @type boolean + */ + changeWidthHandles: false, + + /** + * Store DD.Delegate reference for the respective Resize instance. + * + * @property delegate + * @default null + * @type Object + */ + delegate: null, + + /** + * Stores the current values for the height, width, top and left. You are + * able to manipulate these values on resize in order to change the resize + * behavior. + * + * @property info + * @type Object + * @protected + */ + info: null, + + /** + * Stores the last values for the height, width, top and left. + * + * @property lastInfo + * @type Object + * @protected + */ + lastInfo: null, + + /** + * Stores the original values for the height, width, top and left, stored + * on resize start. + * + * @property originalInfo + * @type Object + * @protected + */ + originalInfo: null, + + /** + * Construction logic executed during Resize instantiation. Lifecycle. + * + * @method initializer + * @protected + */ + initializer: function() { + this.renderer(); + }, + + /** + * Create the DOM structure for the Resize. Lifecycle. + * + * @method renderUI + * @protected + */ + renderUI: function() { + var instance = this; + + instance._renderHandles(); + }, + + /** + * Bind the events on the Resize UI. Lifecycle. + * + * @method bindUI + * @protected + */ + bindUI: function() { + var instance = this; + + instance._createEvents(); + instance._bindDD(); + instance._bindHandle(); + }, + + /** + * Sync the Resize UI. + * + * @method syncUI + * @protected + */ + syncUI: function() { + var instance = this; + + this.get(NODE).addClass(CSS_RESIZE); + + // hide handles if AUTO_HIDE is true + instance._setHideHandlesUI( + instance.get(AUTO_HIDE) + ); + }, + + /** + * Descructor lifecycle implementation for the Resize class. Purges events attached + * to the node (and all child nodes) and removes the Resize handles. + * + * @method destructor + * @protected + */ + destructor: function() { + var instance = this, + node = instance.get(NODE), + wrapper = instance.get(WRAPPER), + pNode = wrapper.get(PARENT_NODE); + + // purgeElements on boundingBox + Y.Event.purgeElement(wrapper, true); + + // destroy handles dd and remove them from the dom + instance.eachHandle(function(handleEl) { + instance.delegate.dd.destroy(); + + // remove handle + handleEl.remove(true); + }); + + // unwrap node + if (instance.get(WRAP)) { + instance._copyStyles(wrapper, node); + + if (pNode) { + pNode.insertBefore(node, wrapper); + } + + wrapper.remove(true); + } + + node.removeClass(CSS_RESIZE); + node.removeClass(CSS_RESIZE_HIDDEN_HANDLES); + }, + + /** + * Creates DOM (or manipulates DOM for progressive enhancement) + * This method is invoked by initializer(). It's chained automatically for + * subclasses if required. + * + * @method renderer + * @protected + */ + renderer: function() { + this.renderUI(); + this.bindUI(); + this.syncUI(); + }, + + /** + *

          Loop through each handle which is being used and executes a callback.

          + *

          Example:

          + *
          instance.eachHandle(
          +		 *      function(handleName, index) { ... }
          +		 *  );
          + * + * @method eachHandle + * @param {function} fn Callback function to be executed for each handle. + */ + eachHandle: function(fn) { + var instance = this; + + Y.each( + instance.get(HANDLES), + function(handle, i) { + var handleEl = instance.get( + handleAttrName(handle) + ); + + fn.apply(instance, [handleEl, handle, i]); + } + ); + }, + + /** + * Bind the handles DragDrop events to the Resize instance. + * + * @method _bindDD + * @private + */ + _bindDD: function() { + var instance = this; + + instance.delegate = new Y.DD.Delegate( + { + bubbleTargets: instance, + container: instance.get(WRAPPER), + dragConfig: { + clickPixelThresh: 0, + clickTimeThresh: 0, + useShim: true, + move: false + }, + nodes: DOT+CSS_RESIZE_HANDLE, + target: false + } + ); + + instance.on('drag:drag', instance._handleResizeEvent); + instance.on('drag:dropmiss', instance._handleMouseUpEvent); + instance.on('drag:end', instance._handleResizeEndEvent); + instance.on('drag:start', instance._handleResizeStartEvent); + }, + + /** + * Bind the events related to the handles (_onHandleMouseEnter, _onHandleMouseLeave). + * + * @method _bindHandle + * @private + */ + _bindHandle: function() { + var instance = this, + wrapper = instance.get(WRAPPER); + + wrapper.on('mouseenter', Y.bind(instance._onWrapperMouseEnter, instance)); + wrapper.on('mouseleave', Y.bind(instance._onWrapperMouseLeave, instance)); + wrapper.delegate('mouseenter', Y.bind(instance._onHandleMouseEnter, instance), DOT+CSS_RESIZE_HANDLE); + wrapper.delegate('mouseleave', Y.bind(instance._onHandleMouseLeave, instance), DOT+CSS_RESIZE_HANDLE); + }, + + /** + * Create the custom events used on the Resize. + * + * @method _createEvents + * @private + */ + _createEvents: function() { + var instance = this, + // create publish function for kweight optimization + publish = function(name, fn) { + instance.publish(name, { + defaultFn: fn, + queuable: false, + emitFacade: true, + bubbles: true, + prefix: RESIZE + }); + }; + + /** + * Handles the resize start event. Fired when a handle starts to be + * dragged. + * + * @event resize:start + * @preventable _defResizeStartFn + * @param {Event.Facade} event The resize start event. + * @bubbles Resize + * @type {Event.Custom} + */ + publish(EV_RESIZE_START, this._defResizeStartFn); + + /** + * Handles the resize event. Fired on each pixel when the handle is + * being dragged. + * + * @event resize:resize + * @preventable _defResizeFn + * @param {Event.Facade} event The resize event. + * @bubbles Resize + * @type {Event.Custom} + */ + publish(EV_RESIZE, this._defResizeFn); + + /** + * Handles the resize align event. + * + * @event resize:align + * @preventable _defResizeAlignFn + * @param {Event.Facade} event The resize align event. + * @bubbles Resize + * @type {Event.Custom} + */ + publish(EV_RESIZE_ALIGN, this._defResizeAlignFn); + + /** + * Handles the resize end event. Fired when a handle stop to be + * dragged. + * + * @event resize:end + * @preventable _defResizeEndFn + * @param {Event.Facade} event The resize end event. + * @bubbles Resize + * @type {Event.Custom} + */ + publish(EV_RESIZE_END, this._defResizeEndFn); + + /** + * Handles the resize mouseUp event. Fired when a mouseUp event happens on a + * handle. + * + * @event resize:mouseUp + * @preventable _defMouseUpFn + * @param {Event.Facade} event The resize mouseUp event. + * @bubbles Resize + * @type {Event.Custom} + */ + publish(EV_MOUSE_UP, this._defMouseUpFn); + }, + + /** + * Responsible for loop each handle element and append to the wrapper. + * + * @method _renderHandles + * @protected + */ + _renderHandles: function() { + var instance = this, + wrapper = instance.get(WRAPPER); + + instance.eachHandle(function(handleEl) { + wrapper.append(handleEl); + }); + }, + + /** + * Creates the handle element based on the handle name and initialize the + * DragDrop on it. + * + * @method _buildHandle + * @param {String} handle Handle name ('t', 'tr', 'b', ...). + * @protected + */ + _buildHandle: function(handle) { + var instance = this; + + return Y.Node.create( + Y.substitute(instance.HANDLE_TEMPLATE, { + handle: handle + }) + ); + }, + + /** + * Basic resize calculations. + * + * @method _calcResize + * @protected + */ + _calcResize: function() { + var instance = this, + handle = instance.handle, + info = instance.info, + originalInfo = instance.originalInfo, + + dx = info.actXY[0] - originalInfo.actXY[0], + dy = info.actXY[1] - originalInfo.actXY[1]; + + if (handle && Y.Resize.RULES[handle]) { + Y.Resize.RULES[handle](instance, dx, dy); + } + else { + } + }, + + /** + * Helper method to update the current size value on + * info to respect the + * min/max values and fix the top/left calculations. + * + * @method _checkSize + * @param {String} offset 'offsetHeight' or 'offsetWidth' + * @param {number} size Size to restrict the offset + * @protected + */ + _checkSize: function(offset, size) { + var instance = this, + info = instance.info, + originalInfo = instance.originalInfo, + axis = (offset == OFFSET_HEIGHT) ? TOP : LEFT; + + // forcing the offsetHeight/offsetWidth to be the passed size + info[offset] = size; + + // predicting, based on the original information, the last left valid in case of reach the min/max dimension + // this calculation avoid browser event leaks when user interact very fast + if (((axis == LEFT) && instance.changeLeftHandles) || + ((axis == TOP) && instance.changeTopHandles)) { + + info[axis] = originalInfo[axis] + originalInfo[offset] - size; + } + }, + + /** + * Copy relevant styles of the node + * to the wrapper. + * + * @method _copyStyles + * @param {Node} node Node from. + * @param {Node} wrapper Node to. + * @protected + */ + _copyStyles: function(node, wrapper) { + var position = node.getStyle(POSITION).toLowerCase(), + surrounding = this._getBoxSurroundingInfo(node), + wrapperStyle; + + // resizable wrapper should be positioned + if (position == STATIC) { + position = RELATIVE; + } + + wrapperStyle = { + position: position, + left: getCompStyle(node, LEFT), + top: getCompStyle(node, TOP) + }; + + Y.mix(wrapperStyle, surrounding.margin); + Y.mix(wrapperStyle, surrounding.border); + + wrapper.setStyles(wrapperStyle); + + // remove margin and border from the internal node + node.setStyles({ border: 0, margin: 0 }); + + wrapper.sizeTo( + node.get(OFFSET_WIDTH) + surrounding.totalHBorder, + node.get(OFFSET_HEIGHT) + surrounding.totalVBorder + ); + }, + + // extract handle name from a string + // using Y.cached to memoize the function for performance + _extractHandleName: Y.cached( + function(node) { + var className = node.get(CLASS_NAME), + + match = className.match( + new RegExp( + getCN(RESIZE, HANDLE, '(\\w{1,2})\\b') + ) + ); + + return match ? match[1] : null; + } + ), + + /** + *

          Generates metadata to the info + * and originalInfo

          + *
          bottom, actXY, left, top, offsetHeight, offsetWidth, right
          + * + * @method _getInfo + * @param {Node} node + * @param {EventFacade} event + * @private + */ + _getInfo: function(node, event) { + var actXY = [0,0], + drag = event.dragEvent.target, + nodeXY = node.getXY(), + nodeX = nodeXY[0], + nodeY = nodeXY[1], + offsetHeight = node.get(OFFSET_HEIGHT), + offsetWidth = node.get(OFFSET_WIDTH); + + if (event) { + // the xy that the node will be set to. Changing this will alter the position as it's dragged. + actXY = (drag.actXY.length ? drag.actXY : drag.lastXY); + } + + return { + actXY: actXY, + bottom: (nodeY + offsetHeight), + left: nodeX, + offsetHeight: offsetHeight, + offsetWidth: offsetWidth, + right: (nodeX + offsetWidth), + top: nodeY + }; + }, + + /** + * Each box has a content area and optional surrounding margin, + * padding and * border areas. This method get all this information from + * the passed node. For more reference see + * + * http://www.w3.org/TR/CSS21/box.html#box-dimensions. + * + * @method _getBoxSurroundingInfo + * @param {Node} node + * @private + * @return {Object} + */ + _getBoxSurroundingInfo: function(node) { + var info = { + padding: {}, + margin: {}, + border: {} + }; + + if (isNode(node)) { + Y.each([ TOP, RIGHT, BOTTOM, LEFT ], function(dir) { + var paddingProperty = capitalize(PADDING, dir), + marginProperty = capitalize(MARGIN, dir), + borderWidthProperty = capitalize(BORDER, dir, WIDTH), + borderColorProperty = capitalize(BORDER, dir, COLOR), + borderStyleProperty = capitalize(BORDER, dir, STYLE); + + info.border[borderColorProperty] = getCompStyle(node, borderColorProperty); + info.border[borderStyleProperty] = getCompStyle(node, borderStyleProperty); + info.border[borderWidthProperty] = getCompStyle(node, borderWidthProperty); + info.margin[marginProperty] = getCompStyle(node, marginProperty); + info.padding[paddingProperty] = getCompStyle(node, paddingProperty); + }); + } + + info.totalHBorder = (toRoundNumber(info.border.borderLeftWidth) + toRoundNumber(info.border.borderRightWidth)); + info.totalHPadding = (toRoundNumber(info.padding.paddingLeft) + toRoundNumber(info.padding.paddingRight)); + info.totalVBorder = (toRoundNumber(info.border.borderBottomWidth) + toRoundNumber(info.border.borderTopWidth)); + info.totalVPadding = (toRoundNumber(info.padding.paddingBottom) + toRoundNumber(info.padding.paddingTop)); + + return info; + }, + + /** + * Sync the Resize UI with internal values from + * info. + * + * @method _syncUI + * @protected + */ + _syncUI: function() { + var instance = this, + info = instance.info, + wrapperSurrounding = instance.wrapperSurrounding, + wrapper = instance.get(WRAPPER), + node = instance.get(NODE); + + wrapper.sizeTo(info.offsetWidth, info.offsetHeight); + + if (instance.changeLeftHandles || instance.changeTopHandles) { + wrapper.setXY([info.left, info.top]); + } + + // if a wrap node is being used + if (!wrapper.compareTo(node)) { + // the original internal node borders were copied to the wrapper on _copyStyles, to compensate that subtract the borders from the internal node + node.sizeTo( + info.offsetWidth - wrapperSurrounding.totalHBorder, + info.offsetHeight - wrapperSurrounding.totalVBorder + ); + } + + // prevent webkit textarea resize + if (Y.UA.webkit) { + node.setStyle(RESIZE, NONE); + } + }, + + /** + * Update instance.changeHeightHandles, + * instance.changeLeftHandles, instance.changeTopHandles, + * instance.changeWidthHandles information. + * + * @method _updateChangeHandleInfo + * @private + */ + _updateChangeHandleInfo: function(handle) { + var instance = this; + + instance.changeHeightHandles = instance.REGEX_CHANGE_HEIGHT.test(handle); + instance.changeLeftHandles = instance.REGEX_CHANGE_LEFT.test(handle); + instance.changeTopHandles = instance.REGEX_CHANGE_TOP.test(handle); + instance.changeWidthHandles = instance.REGEX_CHANGE_WIDTH.test(handle); + }, + + /** + * Update info values (bottom, actXY, left, top, offsetHeight, offsetWidth, right). + * + * @method _updateInfo + * @private + */ + _updateInfo: function(event) { + var instance = this; + + instance.info = instance._getInfo(instance.get(WRAPPER), event); + }, + + /** + * Update properties + * nodeSurrounding, + * wrapperSurrounding, + * totalVSurrounding, + * totalHSurrounding. + * + * @method _updateSurroundingInfo + * @private + */ + _updateSurroundingInfo: function() { + var instance = this, + node = instance.get(NODE), + wrapper = instance.get(WRAPPER), + nodeSurrounding = instance._getBoxSurroundingInfo(node), + wrapperSurrounding = instance._getBoxSurroundingInfo(wrapper); + + instance.nodeSurrounding = nodeSurrounding; + instance.wrapperSurrounding = wrapperSurrounding; + + instance.totalVSurrounding = (nodeSurrounding.totalVPadding + wrapperSurrounding.totalVBorder); + instance.totalHSurrounding = (nodeSurrounding.totalHPadding + wrapperSurrounding.totalHBorder); + }, + + /** + * Set the active state of the handles. + * + * @method _setActiveHandlesUI + * @param {boolean} val True to activate the handles, false to deactivate. + * @protected + */ + _setActiveHandlesUI: function(val) { + var instance = this, + activeHandleNode = instance.get(ACTIVE_HANDLE_NODE); + + if (activeHandleNode) { + if (val) { + // remove CSS_RESIZE_HANDLE_ACTIVE from all handles before addClass on the active + instance.eachHandle( + function(handleEl) { + handleEl.removeClass(CSS_RESIZE_HANDLE_ACTIVE); + } + ); + + activeHandleNode.addClass(CSS_RESIZE_HANDLE_ACTIVE); + } + else { + activeHandleNode.removeClass(CSS_RESIZE_HANDLE_ACTIVE); + } + } + }, + + /** + * Setter for the handles attribute + * + * @method _setHandles + * @protected + * @param {String} val + */ + _setHandles: function(val) { + var instance = this, + handles = []; + + // handles attr accepts both array or string + if (isArray(val)) { + handles = val; + } + else if (isString(val)) { + // if the handles attr passed in is an ALL string... + if (val.toLowerCase() == ALL) { + handles = instance.ALL_HANDLES; + } + // otherwise, split the string to extract the handles + else { + Y.each( + val.split(COMMA), + function(node, i) { + var handle = trim(node); + + // if its a valid handle, add it to the handles output + if (indexOf(instance.ALL_HANDLES, handle) > -1) { + handles.push(handle); + } + } + ); + } + } + + return handles; + }, + + /** + * Set the visibility of the handles. + * + * @method _setHideHandlesUI + * @param {boolean} val True to hide the handles, false to show. + * @protected + */ + _setHideHandlesUI: function(val) { + var instance = this, + wrapper = instance.get(WRAPPER); + + if (!instance.get(RESIZING)) { + if (val) { + wrapper.addClass(CSS_RESIZE_HIDDEN_HANDLES); + } + else { + wrapper.removeClass(CSS_RESIZE_HIDDEN_HANDLES); + } + } + }, + + /** + * Setter for the wrap attribute + * + * @method _setWrap + * @protected + * @param {boolean} val + */ + _setWrap: function(val) { + var instance = this, + node = instance.get(NODE), + nodeName = node.get(NODE_NAME), + typeRegex = instance.get(WRAP_TYPES); + + // if nodeName is listed on WRAP_TYPES force use the wrapper + if (typeRegex.test(nodeName)) { + val = true; + } + + return val; + }, + + /** + * Default resize:mouseUp handler + * + * @method _defMouseUpFn + * @param {EventFacade} event The Event object + * @protected + */ + _defMouseUpFn: function(event) { + var instance = this; + + instance.set(RESIZING, false); + }, + + /** + * Default resize:resize handler + * + * @method _defResizeFn + * @param {EventFacade} event The Event object + * @protected + */ + _defResizeFn: function(event) { + var instance = this; + + instance._resize(event); + }, + + /** + * Logic method for _defResizeFn. Allow AOP. + * + * @method _resize + * @param {EventFacade} event The Event object + * @protected + */ + _resize: function(event) { + var instance = this; + + instance._handleResizeAlignEvent(event.dragEvent); + + // _syncUI of the wrapper, not using proxy + instance._syncUI(); + }, + + /** + * Default resize:align handler + * + * @method _defResizeAlignFn + * @param {EventFacade} event The Event object + * @protected + */ + _defResizeAlignFn: function(event) { + var instance = this; + + instance._resizeAlign(event); + }, + + /** + * Logic method for _defResizeAlignFn. Allow AOP. + * + * @method _resizeAlign + * @param {EventFacade} event The Event object + * @protected + */ + _resizeAlign: function(event) { + var instance = this, + info, + defMinHeight, + defMinWidth; + + instance.lastInfo = instance.info; + + // update the instance.info values + instance._updateInfo(event); + + info = instance.info; + + // basic resize calculations + instance._calcResize(); + + // if Y.Plugin.ResizeConstrained is not plugged, check for min dimension + if (!instance.con) { + defMinHeight = (instance.get(DEF_MIN_HEIGHT) + instance.totalVSurrounding); + defMinWidth = (instance.get(DEF_MIN_WIDTH) + instance.totalHSurrounding); + + if (info.offsetHeight <= defMinHeight) { + instance._checkSize(OFFSET_HEIGHT, defMinHeight); + } + + if (info.offsetWidth <= defMinWidth) { + instance._checkSize(OFFSET_WIDTH, defMinWidth); + } + } + }, + + /** + * Default resize:end handler + * + * @method _defResizeEndFn + * @param {EventFacade} event The Event object + * @protected + */ + _defResizeEndFn: function(event) { + var instance = this; + + instance._resizeEnd(event); + }, + + /** + * Logic method for _defResizeEndFn. Allow AOP. + * + * @method _resizeEnd + * @param {EventFacade} event The Event object + * @protected + */ + _resizeEnd: function(event) { + var instance = this, + drag = event.dragEvent.target; + + // reseting actXY from drag when drag end + drag.actXY = []; + + // syncUI when resize end + instance._syncUI(); + + instance._setActiveHandlesUI(false); + + instance.set(ACTIVE_HANDLE, null); + instance.set(ACTIVE_HANDLE_NODE, null); + + instance.handle = null; + }, + + /** + * Default resize:start handler + * + * @method _defResizeStartFn + * @param {EventFacade} event The Event object + * @protected + */ + _defResizeStartFn: function(event) { + var instance = this; + + instance._resizeStart(event); + }, + + /** + * Logic method for _defResizeStartFn. Allow AOP. + * + * @method _resizeStart + * @param {EventFacade} event The Event object + * @protected + */ + _resizeStart: function(event) { + var instance = this, + wrapper = instance.get(WRAPPER); + + instance.handle = instance.get(ACTIVE_HANDLE); + + instance.set(RESIZING, true); + + instance._updateSurroundingInfo(); + + // create an originalInfo information for reference + instance.originalInfo = instance._getInfo(wrapper, event); + + instance._updateInfo(event); + }, + + /** + * Fires the resize:mouseUp event. + * + * @method _handleMouseUpEvent + * @param {EventFacade} event resize:mouseUp event facade + * @protected + */ + _handleMouseUpEvent: function(event) { + this.fire(EV_MOUSE_UP, { dragEvent: event, info: this.info }); + }, + + /** + * Fires the resize:resize event. + * + * @method _handleResizeEvent + * @param {EventFacade} event resize:resize event facade + * @protected + */ + _handleResizeEvent: function(event) { + this.fire(EV_RESIZE, { dragEvent: event, info: this.info }); + }, + + /** + * Fires the resize:align event. + * + * @method _handleResizeAlignEvent + * @param {EventFacade} event resize:resize event facade + * @protected + */ + _handleResizeAlignEvent: function(event) { + this.fire(EV_RESIZE_ALIGN, { dragEvent: event, info: this.info }); + }, + + /** + * Fires the resize:end event. + * + * @method _handleResizeEndEvent + * @param {EventFacade} event resize:end event facade + * @protected + */ + _handleResizeEndEvent: function(event) { + this.fire(EV_RESIZE_END, { dragEvent: event, info: this.info }); + }, + + /** + * Fires the resize:start event. + * + * @method _handleResizeStartEvent + * @param {EventFacade} event resize:start event facade + * @protected + */ + _handleResizeStartEvent: function(event) { + if (!this.get(ACTIVE_HANDLE)) { + //This handles the "touch" case + this._setHandleFromNode(event.target.get('node')); + } + this.fire(EV_RESIZE_START, { dragEvent: event, info: this.info }); + }, + + /** + * Mouseenter event handler for the wrapper. + * + * @method _onWrapperMouseEnter + * @param {EventFacade} event + * @protected + */ + _onWrapperMouseEnter: function(event) { + var instance = this; + + if (instance.get(AUTO_HIDE)) { + instance._setHideHandlesUI(false); + } + }, + + /** + * Mouseleave event handler for the wrapper. + * + * @method _onWrapperMouseLeave + * @param {EventFacade} event + * @protected + */ + _onWrapperMouseLeave: function(event) { + var instance = this; + + if (instance.get(AUTO_HIDE)) { + instance._setHideHandlesUI(true); + } + }, + + /** + * Handles setting the activeHandle from a node, used from startDrag (for touch) and mouseenter (for mouse). + * + * @method _setHandleFromNode + * @param {Node} node + * @protected + */ + _setHandleFromNode: function(node) { + var instance = this, + handle = instance._extractHandleName(node); + + if (!instance.get(RESIZING)) { + instance.set(ACTIVE_HANDLE, handle); + instance.set(ACTIVE_HANDLE_NODE, node); + + instance._setActiveHandlesUI(true); + instance._updateChangeHandleInfo(handle); + } + }, + + /** + * Mouseenter event handler for the handles. + * + * @method _onHandleMouseEnter + * @param {EventFacade} event + * @protected + */ + _onHandleMouseEnter: function(event) { + this._setHandleFromNode(event.currentTarget); + }, + + /** + * Mouseout event handler for the handles. + * + * @method _onHandleMouseLeave + * @param {EventFacade} event + * @protected + */ + _onHandleMouseLeave: function(event) { + var instance = this; + + if (!instance.get(RESIZING)) { + instance._setActiveHandlesUI(false); + } + }, + + /** + * Default value for the wrapper attribute + * + * @method _valueWrapper + * @protected + * @readOnly + */ + _valueWrapper: function() { + var instance = this, + node = instance.get(NODE), + pNode = node.get(PARENT_NODE), + // by deafult the wrapper is always the node + wrapper = node; + + // if the node is listed on the wrapTypes or wrap is set to true, create another wrapper + if (instance.get(WRAP)) { + wrapper = Y.Node.create(instance.WRAP_TEMPLATE); + + if (pNode) { + pNode.insertBefore(wrapper, node); + } + + wrapper.append(node); + + instance._copyStyles(node, wrapper); + + // remove positioning of wrapped node, the WRAPPER take care about positioning + node.setStyles({ + position: STATIC, + left: 0, + top: 0 + }); + } + + return wrapper; + } + } +); + +Y.each(Y.Resize.prototype.ALL_HANDLES, function(handle, i) { + // creating ATTRS with the handles elements + Y.Resize.ATTRS[handleAttrName(handle)] = { + setter: function() { + return this._buildHandle(handle); + }, + value: null, + writeOnce: true + }; +}); + + +}, '3.3.0' ,{requires:['base', 'widget', 'substitute', 'event', 'oop', 'dd-drag', 'dd-delegate', 'dd-drop'], skinnable:true}); diff --git a/jssource/src_files/include/javascript/yui3/build/resize/resize-constrain-min.js b/jssource/src_files/include/javascript/yui3/build/resize/resize-constrain-min.js new file mode 100644 index 00000000..d0c1c012 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/resize/resize-constrain-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("resize-constrain",function(A){var k=A.Lang,S=k.isBoolean,j=k.isNumber,G=k.isString,Q=A.Resize.capitalize,E=function(Y){return(Y instanceof A.Node);},f=function(Y){return parseFloat(Y)||0;},B="borderBottomWidth",Z="borderLeftWidth",b="borderRightWidth",F="borderTopWidth",d="border",R="bottom",T="con",J="constrain",N="host",O="left",M="maxHeight",H="maxWidth",C="minHeight",g="minWidth",i="node",X="offsetHeight",a="offsetWidth",c="preserveRatio",P="region",e="resizeConstrained",h="right",K="tickX",I="tickY",U="top",D="width",L="view",W="viewportRegion";function V(){V.superclass.constructor.apply(this,arguments);}A.mix(V,{NAME:e,NS:T,ATTRS:{constrain:{setter:function(Y){if(Y&&(E(Y)||G(Y)||Y.nodeType)){Y=A.one(Y);}return Y;}},minHeight:{value:15,validator:j},minWidth:{value:15,validator:j},maxHeight:{value:Infinity,validator:j},maxWidth:{value:Infinity,validator:j},preserveRatio:{value:false,validator:S},tickX:{value:false},tickY:{value:false}}});A.extend(V,A.Plugin.Base,{constrainSurrounding:null,initializer:function(){var Y=this,l=Y.get(N);l.delegate.dd.plug(A.Plugin.DDConstrained,{tickX:Y.get(K),tickY:Y.get(I)});l.after("resize:align",A.bind(Y._handleResizeAlignEvent,Y));l.on("resize:start",A.bind(Y._handleResizeStartEvent,Y));},_checkConstrain:function(m,v,n){var s=this,r,o,p,u,t=s.get(N),Y=t.info,l=s.constrainSurrounding.border,q=s._getConstrainRegion();if(q){r=Y[m]+Y[n];o=q[v]-f(l[Q(d,v,D)]);if(r>=o){Y[n]-=(r-o);}p=Y[m];u=q[m]+f(l[Q(d,m,D)]);if(p<=u){Y[m]+=(u-p);Y[n]-=(u-p);}}},_checkHeight:function(){var Y=this,m=Y.get(N),o=m.info,l=(Y.get(M)+m.totalVSurrounding),n=(Y.get(C)+m.totalVSurrounding);Y._checkConstrain(U,R,X);if(o.offsetHeight>l){m._checkSize(X,l);}if(o.offsetHeightm){n._checkSize(a,m);}},_getConstrainRegion:function(){var Y=this,m=Y.get(N),l=m.get(i),o=Y.get(J),n=null;if(o){if(o==L){n=l.get(W);}else{if(E(o)){n=o.get(P);}else{n=o;}}}return n;},_handleResizeAlignEvent:function(m){var Y=this,l=Y.get(N);Y._checkHeight();Y._checkWidth();if(Y.get(c)){Y._checkRatio();}if(Y.get(J)&&!Y._checkRegion()){l.info=l.lastInfo;}},_handleResizeStartEvent:function(m){var Y=this,n=Y.get(J),l=Y.get(N);Y.constrainSurrounding=l._getBoxSurroundingInfo(n);}});A.namespace("Plugin");A.Plugin.ResizeConstrained=V;},"3.3.0",{requires:["resize-base","plugin"],skinnable:false}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/resize/resize-constrain.js b/jssource/src_files/include/javascript/yui3/build/resize/resize-constrain.js new file mode 100644 index 00000000..d260f510 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/resize/resize-constrain.js @@ -0,0 +1,451 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('resize-constrain', function(Y) { + +var Lang = Y.Lang, + isBoolean = Lang.isBoolean, + isNumber = Lang.isNumber, + isString = Lang.isString, + capitalize = Y.Resize.capitalize, + + isNode = function(v) { + return (v instanceof Y.Node); + }, + + toNumber = function(num) { + return parseFloat(num) || 0; + }, + + BORDER_BOTTOM_WIDTH = 'borderBottomWidth', + BORDER_LEFT_WIDTH = 'borderLeftWidth', + BORDER_RIGHT_WIDTH = 'borderRightWidth', + BORDER_TOP_WIDTH = 'borderTopWidth', + BORDER = 'border', + BOTTOM = 'bottom', + CON = 'con', + CONSTRAIN = 'constrain', + HOST = 'host', + LEFT = 'left', + MAX_HEIGHT = 'maxHeight', + MAX_WIDTH = 'maxWidth', + MIN_HEIGHT = 'minHeight', + MIN_WIDTH = 'minWidth', + NODE = 'node', + OFFSET_HEIGHT = 'offsetHeight', + OFFSET_WIDTH = 'offsetWidth', + PRESEVE_RATIO = 'preserveRatio', + REGION = 'region', + RESIZE_CONTRAINED = 'resizeConstrained', + RIGHT = 'right', + TICK_X = 'tickX', + TICK_Y = 'tickY', + TOP = 'top', + WIDTH = 'width', + VIEW = 'view', + VIEWPORT_REGION = 'viewportRegion'; + +function ResizeConstrained() { + ResizeConstrained.superclass.constructor.apply(this, arguments); +} + +Y.mix(ResizeConstrained, { + NAME: RESIZE_CONTRAINED, + + NS: CON, + + ATTRS: { + /** + * Will attempt to constrain the resize node to the boundaries. Arguments:
          + * 'view': Contrain to Viewport
          + * '#selector_string': Constrain to this node
          + * '{Region Object}': An Object Literal containing a valid region (top, right, bottom, left) of page positions + * + * @attribute constrain + * @type {String/Object/Node} + */ + constrain: { + setter: function(v) { + if (v && (isNode(v) || isString(v) || v.nodeType)) { + v = Y.one(v); + } + + return v; + } + }, + + /** + * The minimum height of the element + * + * @attribute minHeight + * @default 15 + * @type Number + */ + minHeight: { + value: 15, + validator: isNumber + }, + + /** + * The minimum width of the element + * + * @attribute minWidth + * @default 15 + * @type Number + */ + minWidth: { + value: 15, + validator: isNumber + }, + + /** + * The maximum height of the element + * + * @attribute maxHeight + * @default Infinity + * @type Number + */ + maxHeight: { + value: Infinity, + validator: isNumber + }, + + /** + * The maximum width of the element + * + * @attribute maxWidth + * @default Infinity + * @type Number + */ + maxWidth: { + value: Infinity, + validator: isNumber + }, + + /** + * Maintain the element's ratio when resizing. + * + * @attribute preserveRatio + * @default false + * @type boolean + */ + preserveRatio: { + value: false, + validator: isBoolean + }, + + /** + * The number of x ticks to span the resize to. + * + * @attribute tickX + * @default false + * @type Number | false + */ + tickX: { + value: false + }, + + /** + * The number of y ticks to span the resize to. + * + * @attribute tickY + * @default false + * @type Number | false + */ + tickY: { + value: false + } + } +}); + +Y.extend(ResizeConstrained, Y.Plugin.Base, { + /** + * Stores the constrain + * surrounding information retrieved from + * _getBoxSurroundingInfo. + * + * @property constrainSurrounding + * @type Object + * @default null + */ + constrainSurrounding: null, + + initializer: function() { + var instance = this, + host = instance.get(HOST); + + host.delegate.dd.plug( + Y.Plugin.DDConstrained, + { + tickX: instance.get(TICK_X), + tickY: instance.get(TICK_Y) + } + ); + + host.after('resize:align', Y.bind(instance._handleResizeAlignEvent, instance)); + host.on('resize:start', Y.bind(instance._handleResizeStartEvent, instance)); + }, + + /** + * Helper method to update the current values on + * info to respect the + * constrain node. + * + * @method _checkConstrain + * @param {String} axis 'top' or 'left' + * @param {String} axisConstrain 'bottom' or 'right' + * @param {String} offset 'offsetHeight' or 'offsetWidth' + * @protected + */ + _checkConstrain: function(axis, axisConstrain, offset) { + var instance = this, + point1, + point1Constrain, + point2, + point2Constrain, + host = instance.get(HOST), + info = host.info, + constrainBorders = instance.constrainSurrounding.border, + region = instance._getConstrainRegion(); + + if (region) { + point1 = info[axis] + info[offset]; + point1Constrain = region[axisConstrain] - toNumber(constrainBorders[capitalize(BORDER, axisConstrain, WIDTH)]); + + if (point1 >= point1Constrain) { + info[offset] -= (point1 - point1Constrain); + } + + point2 = info[axis]; + point2Constrain = region[axis] + toNumber(constrainBorders[capitalize(BORDER, axis, WIDTH)]); + + if (point2 <= point2Constrain) { + info[axis] += (point2Constrain - point2); + info[offset] -= (point2Constrain - point2); + } + } + }, + + /** + * Update the current values on info + * to respect the maxHeight and minHeight. + * + * @method _checkHeight + * @protected + */ + _checkHeight: function() { + var instance = this, + host = instance.get(HOST), + info = host.info, + maxHeight = (instance.get(MAX_HEIGHT) + host.totalVSurrounding), + minHeight = (instance.get(MIN_HEIGHT) + host.totalVSurrounding); + + instance._checkConstrain(TOP, BOTTOM, OFFSET_HEIGHT); + + if (info.offsetHeight > maxHeight) { + host._checkSize(OFFSET_HEIGHT, maxHeight); + } + + if (info.offsetHeight < minHeight) { + host._checkSize(OFFSET_HEIGHT, minHeight); + } + }, + + /** + * Update the current values on info + * calculating the correct ratio for the other values. + * + * @method _checkRatio + * @protected + */ + _checkRatio: function() { + var instance = this, + host = instance.get(HOST), + info = host.info, + originalInfo = host.originalInfo, + oWidth = originalInfo.offsetWidth, + oHeight = originalInfo.offsetHeight, + oTop = originalInfo.top, + oLeft = originalInfo.left, + oBottom = originalInfo.bottom, + oRight = originalInfo.right, + // wRatio/hRatio functions keep the ratio information always synced with the current info information + // RETURN: percentage how much width/height has changed from the original width/height + wRatio = function() { + return (info.offsetWidth/oWidth); + }, + hRatio = function() { + return (info.offsetHeight/oHeight); + }, + isClosestToHeight = host.changeHeightHandles, + bottomDiff, + constrainBorders, + constrainRegion, + leftDiff, + rightDiff, + topDiff; + + // check whether the resizable node is closest to height or not + if (instance.get(CONSTRAIN) && host.changeHeightHandles && host.changeWidthHandles) { + constrainRegion = instance._getConstrainRegion(); + constrainBorders = instance.constrainSurrounding.border; + bottomDiff = (constrainRegion.bottom - toNumber(constrainBorders[BORDER_BOTTOM_WIDTH])) - oBottom; + leftDiff = oLeft - (constrainRegion.left + toNumber(constrainBorders[BORDER_LEFT_WIDTH])); + rightDiff = (constrainRegion.right - toNumber(constrainBorders[BORDER_RIGHT_WIDTH])) - oRight; + topDiff = oTop - (constrainRegion.top + toNumber(constrainBorders[BORDER_TOP_WIDTH])); + + if (host.changeLeftHandles && host.changeTopHandles) { + isClosestToHeight = (topDiff < leftDiff); + } + else if (host.changeLeftHandles) { + isClosestToHeight = (bottomDiff < leftDiff); + } + else if (host.changeTopHandles) { + isClosestToHeight = (topDiff < rightDiff); + } + else { + isClosestToHeight = (bottomDiff < rightDiff); + } + } + + // when the height of the resizable element touch the border of the constrain first + // force the offsetWidth to be calculated based on the height ratio + if (isClosestToHeight) { + info.offsetWidth = oWidth*hRatio(); + instance._checkWidth(); + info.offsetHeight = oHeight*wRatio(); + } + else { + info.offsetHeight = oHeight*wRatio(); + instance._checkHeight(); + info.offsetWidth = oWidth*hRatio(); + } + + // fixing the top on handles which are able to change top + // the idea here is change the top based on how much the height has changed instead of follow the dy + if (host.changeTopHandles) { + info.top = oTop + (oHeight - info.offsetHeight); + } + + // fixing the left on handles which are able to change left + // the idea here is change the left based on how much the width has changed instead of follow the dx + if (host.changeLeftHandles) { + info.left = oLeft + (oWidth - info.offsetWidth); + } + + // rounding values to avoid pixel jumpings + Y.each(info, function(value, key) { + if (isNumber(value)) { + info[key] = Math.round(value); + } + }); + }, + + /** + * Check whether the resizable node is inside the constrain region. + * + * @method _checkRegion + * @protected + * @return {boolean} + */ + _checkRegion: function() { + var instance = this, + host = instance.get(HOST), + region = instance._getConstrainRegion(); + + return Y.DOM.inRegion(null, region, true, host.info); + }, + + /** + * Update the current values on info + * to respect the maxWidth and minWidth. + * + * @method _checkWidth + * @protected + */ + _checkWidth: function() { + var instance = this, + host = instance.get(HOST), + info = host.info, + maxWidth = (instance.get(MAX_WIDTH) + host.totalHSurrounding), + minWidth = (instance.get(MIN_WIDTH) + host.totalHSurrounding); + + instance._checkConstrain(LEFT, RIGHT, OFFSET_WIDTH); + + if (info.offsetWidth < minWidth) { + host._checkSize(OFFSET_WIDTH, minWidth); + } + + if (info.offsetWidth > maxWidth) { + host._checkSize(OFFSET_WIDTH, maxWidth); + } + }, + + /** + * Get the constrain region based on the constrain + * attribute. + * + * @method _getConstrainRegion + * @protected + * @return {Object Region} + */ + _getConstrainRegion: function() { + var instance = this, + host = instance.get(HOST), + node = host.get(NODE), + constrain = instance.get(CONSTRAIN), + region = null; + + if (constrain) { + if (constrain == VIEW) { + region = node.get(VIEWPORT_REGION); + } + else if (isNode(constrain)) { + region = constrain.get(REGION); + } + else { + region = constrain; + } + } + + return region; + }, + + _handleResizeAlignEvent: function(event) { + var instance = this, + host = instance.get(HOST); + + // check the max/min height and locking top when these values are reach + instance._checkHeight(); + + // check the max/min width and locking left when these values are reach + instance._checkWidth(); + + // calculating the ratio, for proportionally resizing + if (instance.get(PRESEVE_RATIO)) { + instance._checkRatio(); + } + + if (instance.get(CONSTRAIN) && !instance._checkRegion()) { + host.info = host.lastInfo; + } + }, + + _handleResizeStartEvent: function(event) { + var instance = this, + constrain = instance.get(CONSTRAIN), + host = instance.get(HOST); + + instance.constrainSurrounding = host._getBoxSurroundingInfo(constrain); + } +}); + +Y.namespace('Plugin'); +Y.Plugin.ResizeConstrained = ResizeConstrained; + + +}, '3.3.0' ,{requires:['resize-base', 'plugin'], skinnable:false}); diff --git a/jssource/src_files/include/javascript/yui3/build/resize/resize-min.js b/jssource/src_files/include/javascript/yui3/build/resize/resize-min.js new file mode 100644 index 00000000..d12f34f9 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/resize/resize-min.js @@ -0,0 +1,10 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("resize-base",function(t){var v=t.Lang,C=v.isArray,AT=v.isBoolean,p=v.isNumber,AY=v.isString,AE=t.Array,AP=v.trim,M=AE.indexOf,V=",",AC=".",S="",l="{handle}",U=" ",Q="active",o="activeHandle",f="activeHandleNode",Z="all",AI="autoHide",AR="border",AN="bottom",AJ="className",AM="color",AX="defMinHeight",Ac="defMinWidth",a="handle",n="handles",AA="hidden",X="inner",A="left",m="margin",P="node",d="nodeName",u="none",h="offsetHeight",AW="offsetWidth",y="padding",E="parentNode",N="position",K="relative",AH="resize",O="resizing",H="right",Ad="static",G="style",J="top",j="width",AK="wrap",AZ="wrapper",AF="wrapTypes",i="resize:mouseUp",W="resize:resize",b="resize:align",k="resize:end",s="resize:start",w="t",Ab="tr",x="r",AS="br",AG="b",AU="bl",AD="l",Ae="tl",Aa=function(){return Array.prototype.slice.call(arguments).join(U);},AO=function(B){return Math.round(parseFloat(B))||0;},AB=function(B,L){return B.getComputedStyle(L);},Af=function(B){return a+B.toUpperCase();},q=function(B){return(B instanceof t.Node);},r=t.cached(function(B){return B.substring(0,1).toUpperCase()+B.substring(1);}),e=t.cached(function(){var L=[],B=AE(arguments,0,true);AE.each(B,function(R,T){if(T>0){R=r(R);}L.push(R);});return L.join(S);}),c=t.ClassNameManager.getClassName,AQ=c(AH),AL=c(AH,a),z=c(AH,a,Q),F=c(AH,a,X),g=c(AH,a,X,l),Ag=c(AH,a,l),D=c(AH,AA,n),AV=c(AH,AZ);function I(){I.superclass.constructor.apply(this,arguments);}t.mix(I,{NAME:AH,ATTRS:{activeHandle:{value:null,validator:function(B){return t.Lang.isString(B)||t.Lang.isNull(B);}},activeHandleNode:{value:null,validator:q},autoHide:{value:false,validator:AT},defMinHeight:{value:15,validator:p},defMinWidth:{value:15,validator:p},handles:{setter:"_setHandles",value:Z},node:{setter:t.one},resizing:{value:false,validator:AT},wrap:{setter:"_setWrap",value:false,validator:AT},wrapTypes:{readOnly:true,value:/^canvas|textarea|input|select|button|img|iframe|table|embed$/i},wrapper:{readOnly:true,valueFn:"_valueWrapper",writeOnce:true}},RULES:{b:function(B,R,L){var Y=B.info,T=B.originalInfo;Y.offsetHeight=T.offsetHeight+L;},l:function(B,R,L){var Y=B.info,T=B.originalInfo;Y.left=T.left+R;Y.offsetWidth=T.offsetWidth-R;},r:function(B,R,L){var Y=B.info,T=B.originalInfo;Y.offsetWidth=T.offsetWidth+R;},t:function(B,R,L){var Y=B.info,T=B.originalInfo;Y.top=T.top+L;Y.offsetHeight=T.offsetHeight-L;},tr:function(B,R,L){this.t.apply(this,arguments);this.r.apply(this,arguments);},bl:function(B,R,L){this.b.apply(this,arguments);this.l.apply(this,arguments);},br:function(B,R,L){this.b.apply(this,arguments);this.r.apply(this,arguments);},tl:function(B,R,L){this.t.apply(this,arguments);this.l.apply(this,arguments);}},capitalize:e});t.Resize=t.extend(I,t.Base,{ALL_HANDLES:[w,Ab,x,AS,AG,AU,AD,Ae],REGEX_CHANGE_HEIGHT:/^(t|tr|b|bl|br|tl)$/i,REGEX_CHANGE_LEFT:/^(tl|l|bl)$/i,REGEX_CHANGE_TOP:/^(tl|t|tr)$/i,REGEX_CHANGE_WIDTH:/^(bl|br|l|r|tl|tr)$/i,WRAP_TEMPLATE:'
          ',HANDLE_TEMPLATE:'
          '+'
           
          '+"
          ",totalHSurrounding:0,totalVSurrounding:0,nodeSurrounding:null,wrapperSurrounding:null,changeHeightHandles:false,changeLeftHandles:false,changeTopHandles:false,changeWidthHandles:false,delegate:null,info:null,lastInfo:null,originalInfo:null,initializer:function(){this.renderer();},renderUI:function(){var B=this;B._renderHandles();},bindUI:function(){var B=this;B._createEvents();B._bindDD();B._bindHandle();},syncUI:function(){var B=this;this.get(P).addClass(AQ);B._setHideHandlesUI(B.get(AI));},destructor:function(){var B=this,R=B.get(P),T=B.get(AZ),L=T.get(E);t.Event.purgeElement(T,true);B.eachHandle(function(Y){B.delegate.dd.destroy();Y.remove(true);});if(B.get(AK)){B._copyStyles(T,R);if(L){L.insertBefore(R,T);}T.remove(true);}R.removeClass(AQ);R.removeClass(D);},renderer:function(){this.renderUI();this.bindUI();this.syncUI();},eachHandle:function(L){var B=this;t.each(B.get(n),function(Y,R){var T=B.get(Af(Y));L.apply(B,[T,Y,R]);});},_bindDD:function(){var B=this;B.delegate=new t.DD.Delegate({bubbleTargets:B,container:B.get(AZ),dragConfig:{clickPixelThresh:0,clickTimeThresh:0,useShim:true,move:false},nodes:AC+AL,target:false});B.on("drag:drag",B._handleResizeEvent);B.on("drag:dropmiss",B._handleMouseUpEvent);B.on("drag:end",B._handleResizeEndEvent);B.on("drag:start",B._handleResizeStartEvent);},_bindHandle:function(){var B=this,L=B.get(AZ);L.on("mouseenter",t.bind(B._onWrapperMouseEnter,B));L.on("mouseleave",t.bind(B._onWrapperMouseLeave,B));L.delegate("mouseenter",t.bind(B._onHandleMouseEnter,B),AC+AL);L.delegate("mouseleave",t.bind(B._onHandleMouseLeave,B),AC+AL);},_createEvents:function(){var B=this,L=function(R,T){B.publish(R,{defaultFn:T,queuable:false,emitFacade:true,bubbles:true,prefix:AH});};L(s,this._defResizeStartFn);L(W,this._defResizeFn);L(b,this._defResizeAlignFn);L(k,this._defResizeEndFn);L(i,this._defMouseUpFn);},_renderHandles:function(){var B=this,L=B.get(AZ);B.eachHandle(function(R){L.append(R);});},_buildHandle:function(L){var B=this;return t.Node.create(t.substitute(B.HANDLE_TEMPLATE,{handle:L}));},_calcResize:function(){var B=this,T=B.handle,Ah=B.info,Y=B.originalInfo,R=Ah.actXY[0]-Y.actXY[0],L=Ah.actXY[1]-Y.actXY[1];if(T&&t.Resize.RULES[T]){t.Resize.RULES[T](B,R,L);}else{}},_checkSize:function(Ah,L){var B=this,Y=B.info,T=B.originalInfo,R=(Ah==h)?J:A;Y[Ah]=L;if(((R==A)&&B.changeLeftHandles)||((R==J)&&B.changeTopHandles)){Y[R]=T[R]+T[Ah]-L;}},_copyStyles:function(R,Y){var B=R.getStyle(N).toLowerCase(),T=this._getBoxSurroundingInfo(R),L;if(B==Ad){B=K;}L={position:B,left:AB(R,A),top:AB(R,J)};t.mix(L,T.margin);t.mix(L,T.border);Y.setStyles(L);R.setStyles({border:0,margin:0});Y.sizeTo(R.get(AW)+T.totalHBorder,R.get(h)+T.totalVBorder);},_extractHandleName:t.cached(function(R){var L=R.get(AJ),B=L.match(new RegExp(c(AH,a,"(\\w{1,2})\\b")));return B?B[1]:null;}),_getInfo:function(Y,B){var Ah=[0,0],Aj=B.dragEvent.target,Ai=Y.getXY(),T=Ai[0],R=Ai[1],L=Y.get(h),Ak=Y.get(AW);if(B){Ah=(Aj.actXY.length?Aj.actXY:Aj.lastXY); +}return{actXY:Ah,bottom:(R+L),left:T,offsetHeight:L,offsetWidth:Ak,right:(T+Ak),top:R};},_getBoxSurroundingInfo:function(B){var L={padding:{},margin:{},border:{}};if(q(B)){t.each([J,H,AN,A],function(Ah){var T=e(y,Ah),Y=e(m,Ah),R=e(AR,Ah,j),Ai=e(AR,Ah,AM),Aj=e(AR,Ah,G);L.border[Ai]=AB(B,Ai);L.border[Aj]=AB(B,Aj);L.border[R]=AB(B,R);L.margin[Y]=AB(B,Y);L.padding[T]=AB(B,T);});}L.totalHBorder=(AO(L.border.borderLeftWidth)+AO(L.border.borderRightWidth));L.totalHPadding=(AO(L.padding.paddingLeft)+AO(L.padding.paddingRight));L.totalVBorder=(AO(L.border.borderBottomWidth)+AO(L.border.borderTopWidth));L.totalVPadding=(AO(L.padding.paddingBottom)+AO(L.padding.paddingTop));return L;},_syncUI:function(){var B=this,T=B.info,R=B.wrapperSurrounding,Y=B.get(AZ),L=B.get(P);Y.sizeTo(T.offsetWidth,T.offsetHeight);if(B.changeLeftHandles||B.changeTopHandles){Y.setXY([T.left,T.top]);}if(!Y.compareTo(L)){L.sizeTo(T.offsetWidth-R.totalHBorder,T.offsetHeight-R.totalVBorder);}if(t.UA.webkit){L.setStyle(AH,u);}},_updateChangeHandleInfo:function(L){var B=this;B.changeHeightHandles=B.REGEX_CHANGE_HEIGHT.test(L);B.changeLeftHandles=B.REGEX_CHANGE_LEFT.test(L);B.changeTopHandles=B.REGEX_CHANGE_TOP.test(L);B.changeWidthHandles=B.REGEX_CHANGE_WIDTH.test(L);},_updateInfo:function(L){var B=this;B.info=B._getInfo(B.get(AZ),L);},_updateSurroundingInfo:function(){var B=this,T=B.get(P),Y=B.get(AZ),L=B._getBoxSurroundingInfo(T),R=B._getBoxSurroundingInfo(Y);B.nodeSurrounding=L;B.wrapperSurrounding=R;B.totalVSurrounding=(L.totalVPadding+R.totalVBorder);B.totalHSurrounding=(L.totalHPadding+R.totalHBorder);},_setActiveHandlesUI:function(R){var B=this,L=B.get(f);if(L){if(R){B.eachHandle(function(T){T.removeClass(z);});L.addClass(z);}else{L.removeClass(z);}}},_setHandles:function(R){var B=this,L=[];if(C(R)){L=R;}else{if(AY(R)){if(R.toLowerCase()==Z){L=B.ALL_HANDLES;}else{t.each(R.split(V),function(Y,T){var Ah=AP(Y);if(M(B.ALL_HANDLES,Ah)>-1){L.push(Ah);}});}}}return L;},_setHideHandlesUI:function(L){var B=this,R=B.get(AZ);if(!B.get(O)){if(L){R.addClass(D);}else{R.removeClass(D);}}},_setWrap:function(T){var B=this,R=B.get(P),Y=R.get(d),L=B.get(AF);if(L.test(Y)){T=true;}return T;},_defMouseUpFn:function(L){var B=this;B.set(O,false);},_defResizeFn:function(L){var B=this;B._resize(L);},_resize:function(L){var B=this;B._handleResizeAlignEvent(L.dragEvent);B._syncUI();},_defResizeAlignFn:function(L){var B=this;B._resizeAlign(L);},_resizeAlign:function(R){var B=this,T,L,Y;B.lastInfo=B.info;B._updateInfo(R);T=B.info;B._calcResize();if(!B.con){L=(B.get(AX)+B.totalVSurrounding);Y=(B.get(Ac)+B.totalHSurrounding);if(T.offsetHeight<=L){B._checkSize(h,L);}if(T.offsetWidth<=Y){B._checkSize(AW,Y);}}},_defResizeEndFn:function(L){var B=this;B._resizeEnd(L);},_resizeEnd:function(R){var B=this,L=R.dragEvent.target;L.actXY=[];B._syncUI();B._setActiveHandlesUI(false);B.set(o,null);B.set(f,null);B.handle=null;},_defResizeStartFn:function(L){var B=this;B._resizeStart(L);},_resizeStart:function(L){var B=this,R=B.get(AZ);B.handle=B.get(o);B.set(O,true);B._updateSurroundingInfo();B.originalInfo=B._getInfo(R,L);B._updateInfo(L);},_handleMouseUpEvent:function(B){this.fire(i,{dragEvent:B,info:this.info});},_handleResizeEvent:function(B){this.fire(W,{dragEvent:B,info:this.info});},_handleResizeAlignEvent:function(B){this.fire(b,{dragEvent:B,info:this.info});},_handleResizeEndEvent:function(B){this.fire(k,{dragEvent:B,info:this.info});},_handleResizeStartEvent:function(B){if(!this.get(o)){this._setHandleFromNode(B.target.get("node"));}this.fire(s,{dragEvent:B,info:this.info});},_onWrapperMouseEnter:function(L){var B=this;if(B.get(AI)){B._setHideHandlesUI(false);}},_onWrapperMouseLeave:function(L){var B=this;if(B.get(AI)){B._setHideHandlesUI(true);}},_setHandleFromNode:function(L){var B=this,R=B._extractHandleName(L);if(!B.get(O)){B.set(o,R);B.set(f,L);B._setActiveHandlesUI(true);B._updateChangeHandleInfo(R);}},_onHandleMouseEnter:function(B){this._setHandleFromNode(B.currentTarget);},_onHandleMouseLeave:function(L){var B=this;if(!B.get(O)){B._setActiveHandlesUI(false);}},_valueWrapper:function(){var B=this,R=B.get(P),L=R.get(E),T=R;if(B.get(AK)){T=t.Node.create(B.WRAP_TEMPLATE);if(L){L.insertBefore(T,R);}T.append(R);B._copyStyles(R,T);R.setStyles({position:Ad,left:0,top:0});}return T;}});t.each(t.Resize.prototype.ALL_HANDLES,function(L,B){t.Resize.ATTRS[Af(L)]={setter:function(){return this._buildHandle(L);},value:null,writeOnce:true};});},"3.3.0",{requires:["base","widget","substitute","event","oop","dd-drag","dd-delegate","dd-drop"],skinnable:true});YUI.add("resize-proxy",function(C){var N="activeHandleNode",I="cursor",G="dragCursor",L="host",K="parentNode",F="proxy",D="proxyNode",B="resize",A="resize-proxy",J="wrapper",E=C.ClassNameManager.getClassName,M=E(B,F);function H(){H.superclass.constructor.apply(this,arguments);}C.mix(H,{NAME:A,NS:F,ATTRS:{proxyNode:{setter:C.one,valueFn:function(){return C.Node.create(this.PROXY_TEMPLATE);}}}});C.extend(H,C.Plugin.Base,{PROXY_TEMPLATE:'
          ',initializer:function(){var O=this;O.afterHostEvent("resize:start",O._afterResizeStart);O.beforeHostMethod("_resize",O._beforeHostResize);O.afterHostMethod("_resizeEnd",O._afterHostResizeEnd);},destructor:function(){var O=this;O.get(D).remove(true);},_afterHostResizeEnd:function(Q){var O=this,P=Q.dragEvent.target;P.actXY=[];O._syncProxyUI();O.get(D).hide();},_afterResizeStart:function(P){var O=this;O._renderProxy();},_beforeHostResize:function(Q){var O=this,P=this.get(L);P._handleResizeAlignEvent(Q.dragEvent);O._syncProxyUI();return new C.Do.Prevent();},_renderProxy:function(){var O=this,Q=this.get(L),P=O.get(D);if(!P.inDoc()){Q.get(J).get(K).append(P.hide());}},_syncProxyUI:function(){var O=this,Q=this.get(L),S=Q.info,R=Q.get(N),P=O.get(D),T=R.getStyle(I);P.show().setStyle(I,T);Q.delegate.dd.set(G,T);P.sizeTo(S.offsetWidth,S.offsetHeight);P.setXY([S.left,S.top]);}});C.namespace("Plugin");C.Plugin.ResizeProxy=H;},"3.3.0",{requires:["resize-base","plugin"],skinnable:false}); +YUI.add("resize-constrain",function(A){var k=A.Lang,S=k.isBoolean,j=k.isNumber,G=k.isString,Q=A.Resize.capitalize,E=function(Y){return(Y instanceof A.Node);},f=function(Y){return parseFloat(Y)||0;},B="borderBottomWidth",Z="borderLeftWidth",b="borderRightWidth",F="borderTopWidth",d="border",R="bottom",T="con",J="constrain",N="host",O="left",M="maxHeight",H="maxWidth",C="minHeight",g="minWidth",i="node",X="offsetHeight",a="offsetWidth",c="preserveRatio",P="region",e="resizeConstrained",h="right",K="tickX",I="tickY",U="top",D="width",L="view",W="viewportRegion";function V(){V.superclass.constructor.apply(this,arguments);}A.mix(V,{NAME:e,NS:T,ATTRS:{constrain:{setter:function(Y){if(Y&&(E(Y)||G(Y)||Y.nodeType)){Y=A.one(Y);}return Y;}},minHeight:{value:15,validator:j},minWidth:{value:15,validator:j},maxHeight:{value:Infinity,validator:j},maxWidth:{value:Infinity,validator:j},preserveRatio:{value:false,validator:S},tickX:{value:false},tickY:{value:false}}});A.extend(V,A.Plugin.Base,{constrainSurrounding:null,initializer:function(){var Y=this,l=Y.get(N);l.delegate.dd.plug(A.Plugin.DDConstrained,{tickX:Y.get(K),tickY:Y.get(I)});l.after("resize:align",A.bind(Y._handleResizeAlignEvent,Y));l.on("resize:start",A.bind(Y._handleResizeStartEvent,Y));},_checkConstrain:function(m,v,n){var s=this,r,o,p,u,t=s.get(N),Y=t.info,l=s.constrainSurrounding.border,q=s._getConstrainRegion();if(q){r=Y[m]+Y[n];o=q[v]-f(l[Q(d,v,D)]);if(r>=o){Y[n]-=(r-o);}p=Y[m];u=q[m]+f(l[Q(d,m,D)]);if(p<=u){Y[m]+=(u-p);Y[n]-=(u-p);}}},_checkHeight:function(){var Y=this,m=Y.get(N),o=m.info,l=(Y.get(M)+m.totalVSurrounding),n=(Y.get(C)+m.totalVSurrounding);Y._checkConstrain(U,R,X);if(o.offsetHeight>l){m._checkSize(X,l);}if(o.offsetHeightm){n._checkSize(a,m);}},_getConstrainRegion:function(){var Y=this,m=Y.get(N),l=m.get(i),o=Y.get(J),n=null;if(o){if(o==L){n=l.get(W);}else{if(E(o)){n=o.get(P);}else{n=o;}}}return n;},_handleResizeAlignEvent:function(m){var Y=this,l=Y.get(N);Y._checkHeight();Y._checkWidth();if(Y.get(c)){Y._checkRatio();}if(Y.get(J)&&!Y._checkRegion()){l.info=l.lastInfo;}},_handleResizeStartEvent:function(m){var Y=this,n=Y.get(J),l=Y.get(N);Y.constrainSurrounding=l._getBoxSurroundingInfo(n);}});A.namespace("Plugin");A.Plugin.ResizeConstrained=V;},"3.3.0",{requires:["resize-base","plugin"],skinnable:false});YUI.add("resize",function(A){},"3.3.0",{use:["resize-base","resize-proxy","resize-constrain"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/resize/resize-proxy-min.js b/jssource/src_files/include/javascript/yui3/build/resize/resize-proxy-min.js new file mode 100644 index 00000000..14282383 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/resize/resize-proxy-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("resize-proxy",function(C){var N="activeHandleNode",I="cursor",G="dragCursor",L="host",K="parentNode",F="proxy",D="proxyNode",B="resize",A="resize-proxy",J="wrapper",E=C.ClassNameManager.getClassName,M=E(B,F);function H(){H.superclass.constructor.apply(this,arguments);}C.mix(H,{NAME:A,NS:F,ATTRS:{proxyNode:{setter:C.one,valueFn:function(){return C.Node.create(this.PROXY_TEMPLATE);}}}});C.extend(H,C.Plugin.Base,{PROXY_TEMPLATE:'
          ',initializer:function(){var O=this;O.afterHostEvent("resize:start",O._afterResizeStart);O.beforeHostMethod("_resize",O._beforeHostResize);O.afterHostMethod("_resizeEnd",O._afterHostResizeEnd);},destructor:function(){var O=this;O.get(D).remove(true);},_afterHostResizeEnd:function(Q){var O=this,P=Q.dragEvent.target;P.actXY=[];O._syncProxyUI();O.get(D).hide();},_afterResizeStart:function(P){var O=this;O._renderProxy();},_beforeHostResize:function(Q){var O=this,P=this.get(L);P._handleResizeAlignEvent(Q.dragEvent);O._syncProxyUI();return new C.Do.Prevent();},_renderProxy:function(){var O=this,Q=this.get(L),P=O.get(D);if(!P.inDoc()){Q.get(J).get(K).append(P.hide());}},_syncProxyUI:function(){var O=this,Q=this.get(L),S=Q.info,R=Q.get(N),P=O.get(D),T=R.getStyle(I);P.show().setStyle(I,T);Q.delegate.dd.set(G,T);P.sizeTo(S.offsetWidth,S.offsetHeight);P.setXY([S.left,S.top]);}});C.namespace("Plugin");C.Plugin.ResizeProxy=H;},"3.3.0",{requires:["resize-base","plugin"],skinnable:false}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/resize/resize-proxy.js b/jssource/src_files/include/javascript/yui3/build/resize/resize-proxy.js new file mode 100644 index 00000000..524c998c --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/resize/resize-proxy.js @@ -0,0 +1,153 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('resize-proxy', function(Y) { + +var ACTIVE_HANDLE_NODE = 'activeHandleNode', + CURSOR = 'cursor', + DRAG_CURSOR = 'dragCursor', + HOST = 'host', + PARENT_NODE = 'parentNode', + PROXY = 'proxy', + PROXY_NODE = 'proxyNode', + RESIZE = 'resize', + RESIZE_PROXY = 'resize-proxy', + WRAPPER = 'wrapper', + + getCN = Y.ClassNameManager.getClassName, + + CSS_RESIZE_PROXY = getCN(RESIZE, PROXY); + +function ResizeProxy() { + ResizeProxy.superclass.constructor.apply(this, arguments); +} + +Y.mix(ResizeProxy, { + NAME: RESIZE_PROXY, + + NS: PROXY, + + ATTRS: { + /** + * The Resize proxy element. + * + * @attribute proxyNode + * @default Generated using an internal HTML markup + * @type String | Node + */ + proxyNode: { + setter: Y.one, + valueFn: function() { + return Y.Node.create(this.PROXY_TEMPLATE); + } + } + } +}); + +Y.extend(ResizeProxy, Y.Plugin.Base, { + /** + * Template used to create the resize proxy. + * + * @property PROXY_TEMPLATE + * @type {String} + */ + PROXY_TEMPLATE: '
          ', + + initializer: function() { + var instance = this; + + instance.afterHostEvent('resize:start', instance._afterResizeStart); + instance.beforeHostMethod('_resize', instance._beforeHostResize); + instance.afterHostMethod('_resizeEnd', instance._afterHostResizeEnd); + }, + + destructor: function() { + var instance = this; + + instance.get(PROXY_NODE).remove(true); + }, + + _afterHostResizeEnd: function(event) { + var instance = this, + drag = event.dragEvent.target; + + // reseting actXY from drag when drag end + drag.actXY = []; + + // if proxy is true, hide it on resize end + instance._syncProxyUI(); + + instance.get(PROXY_NODE).hide(); + }, + + _afterResizeStart: function(event) { + var instance = this; + + instance._renderProxy(); + }, + + _beforeHostResize: function(event) { + var instance = this, + host = this.get(HOST); + + host._handleResizeAlignEvent(event.dragEvent); + + // if proxy is true _syncProxyUI instead of _syncUI + instance._syncProxyUI(); + + return new Y.Do.Prevent(); + }, + + /** + * Render the proxyNode element and + * make it sibling of the node. + * + * @method _renderProxy + * @protected + */ + _renderProxy: function() { + var instance = this, + host = this.get(HOST), + proxyNode = instance.get(PROXY_NODE); + + if (!proxyNode.inDoc()) { + host.get(WRAPPER).get(PARENT_NODE).append( + proxyNode.hide() + ); + } + }, + + /** + * Sync the proxy UI with internal values from + * info. + * + * @method _syncProxyUI + * @protected + */ + _syncProxyUI: function() { + var instance = this, + host = this.get(HOST), + info = host.info, + activeHandleNode = host.get(ACTIVE_HANDLE_NODE), + proxyNode = instance.get(PROXY_NODE), + cursor = activeHandleNode.getStyle(CURSOR); + + proxyNode.show().setStyle(CURSOR, cursor); + + host.delegate.dd.set(DRAG_CURSOR, cursor); + + proxyNode.sizeTo(info.offsetWidth, info.offsetHeight); + + proxyNode.setXY([ info.left, info.top ]); + } +}); + +Y.namespace('Plugin'); +Y.Plugin.ResizeProxy = ResizeProxy; + + +}, '3.3.0' ,{requires:['resize-base', 'plugin'], skinnable:false}); diff --git a/jssource/src_files/include/javascript/yui3/build/resize/resize.js b/jssource/src_files/include/javascript/yui3/build/resize/resize.js new file mode 100644 index 00000000..b3301691 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/resize/resize.js @@ -0,0 +1,2199 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('resize-base', function(Y) { + +/** + * The Resize Utility allows you to make an HTML element resizable. + * + * @module resize + */ + +var Lang = Y.Lang, + isArray = Lang.isArray, + isBoolean = Lang.isBoolean, + isNumber = Lang.isNumber, + isString = Lang.isString, + + YArray = Y.Array, + trim = Lang.trim, + indexOf = YArray.indexOf, + + COMMA = ',', + DOT = '.', + EMPTY_STR = '', + HANDLE_SUB = '{handle}', + SPACE = ' ', + + ACTIVE = 'active', + ACTIVE_HANDLE = 'activeHandle', + ACTIVE_HANDLE_NODE = 'activeHandleNode', + ALL = 'all', + AUTO_HIDE = 'autoHide', + BORDER = 'border', + BOTTOM = 'bottom', + CLASS_NAME = 'className', + COLOR = 'color', + DEF_MIN_HEIGHT = 'defMinHeight', + DEF_MIN_WIDTH = 'defMinWidth', + HANDLE = 'handle', + HANDLES = 'handles', + HIDDEN = 'hidden', + INNER = 'inner', + LEFT = 'left', + MARGIN = 'margin', + NODE = 'node', + NODE_NAME = 'nodeName', + NONE = 'none', + OFFSET_HEIGHT = 'offsetHeight', + OFFSET_WIDTH = 'offsetWidth', + PADDING = 'padding', + PARENT_NODE = 'parentNode', + POSITION = 'position', + RELATIVE = 'relative', + RESIZE = 'resize', + RESIZING = 'resizing', + RIGHT = 'right', + STATIC = 'static', + STYLE = 'style', + TOP = 'top', + WIDTH = 'width', + WRAP = 'wrap', + WRAPPER = 'wrapper', + WRAP_TYPES = 'wrapTypes', + + EV_MOUSE_UP = 'resize:mouseUp', + EV_RESIZE = 'resize:resize', + EV_RESIZE_ALIGN = 'resize:align', + EV_RESIZE_END = 'resize:end', + EV_RESIZE_START = 'resize:start', + + T = 't', + TR = 'tr', + R = 'r', + BR = 'br', + B = 'b', + BL = 'bl', + L = 'l', + TL = 'tl', + + concat = function() { + return Array.prototype.slice.call(arguments).join(SPACE); + }, + + // round the passed number to get rid of pixel-flickering + toRoundNumber = function(num) { + return Math.round(parseFloat(num)) || 0; + }, + + getCompStyle = function(node, val) { + return node.getComputedStyle(val); + }, + + handleAttrName = function(handle) { + return HANDLE + handle.toUpperCase(); + }, + + isNode = function(v) { + return (v instanceof Y.Node); + }, + + toInitialCap = Y.cached( + function(str) { + return str.substring(0, 1).toUpperCase() + str.substring(1); + } + ), + + capitalize = Y.cached(function() { + var out = [], + args = YArray(arguments, 0, true); + + YArray.each(args, function(part, i) { + if (i > 0) { + part = toInitialCap(part); + } + out.push(part); + }); + + return out.join(EMPTY_STR); + }), + + getCN = Y.ClassNameManager.getClassName, + + CSS_RESIZE = getCN(RESIZE), + CSS_RESIZE_HANDLE = getCN(RESIZE, HANDLE), + CSS_RESIZE_HANDLE_ACTIVE = getCN(RESIZE, HANDLE, ACTIVE), + CSS_RESIZE_HANDLE_INNER = getCN(RESIZE, HANDLE, INNER), + CSS_RESIZE_HANDLE_INNER_PLACEHOLDER = getCN(RESIZE, HANDLE, INNER, HANDLE_SUB), + CSS_RESIZE_HANDLE_PLACEHOLDER = getCN(RESIZE, HANDLE, HANDLE_SUB), + CSS_RESIZE_HIDDEN_HANDLES = getCN(RESIZE, HIDDEN, HANDLES), + CSS_RESIZE_WRAPPER = getCN(RESIZE, WRAPPER); + +/** + * A base class for Resize, providing: + *
            + *
          • Basic Lifecycle (initializer, renderUI, bindUI, syncUI, destructor)
          • + *
          • Applies drag handles to an element to make it resizable
          • + *
          • Here is the list of valid resize handles: + * [ 't', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl' ]. You can + * read this list as top, top-right, right, bottom-right, bottom, + * bottom-left, left, top-left.
          • + *
          • The drag handles are inserted into the element and positioned + * absolute. Some elements, such as a textarea or image, don't support + * children. To overcome that, set wrap:true in your config and the + * element willbe wrapped for you automatically.
          • + *
          + * + * Quick Example: + * + *
          var instance = new Y.Resize({
          + *  node: '#resize1',
          + *  preserveRatio: true,
          + *  wrap: true,
          + *  maxHeight: 170,
          + *  maxWidth: 400,
          + *  handles: 't, tr, r, br, b, bl, l, tl'
          + * });
          + * 
          + * + * Check the list of Configuration Attributes available for + * Resize. + * + * @class Resize + * @param config {Object} Object literal specifying widget configuration properties. + * @constructor + * @extends Base + */ +function Resize() { + Resize.superclass.constructor.apply(this, arguments); +} + +Y.mix(Resize, { + /** + * Static property provides a string to identify the class. + * + * @property Resize.NAME + * @type String + * @static + */ + NAME: RESIZE, + + /** + * Static property used to define the default attribute + * configuration for the Resize. + * + * @property Resize.ATTRS + * @type Object + * @static + */ + ATTRS: { + /** + * Stores the active handle during the resize. + * + * @attribute activeHandle + * @default null + * @private + * @type String + */ + activeHandle: { + value: null, + validator: function(v) { + return Y.Lang.isString(v) || Y.Lang.isNull(v); + } + }, + + /** + * Stores the active handle element during the resize. + * + * @attribute activeHandleNode + * @default null + * @private + * @type Node + */ + activeHandleNode: { + value: null, + validator: isNode + }, + + /** + * False to ensure that the resize handles are always visible, true to + * display them only when the user mouses over the resizable borders. + * + * @attribute autoHide + * @default false + * @type boolean + */ + autoHide: { + value: false, + validator: isBoolean + }, + + /** + * The default minimum height of the element. Only used when + * ResizeConstrained is not plugged. + * + * @attribute defMinHeight + * @default 15 + * @type Number + */ + defMinHeight: { + value: 15, + validator: isNumber + }, + + /** + * The default minimum width of the element. Only used when + * ResizeConstrained is not plugged. + * + * @attribute defMinWidth + * @default 15 + * @type Number + */ + defMinWidth: { + value: 15, + validator: isNumber + }, + + /** + * The handles to use (any combination of): 't', 'b', 'r', 'l', 'bl', + * 'br', 'tl', 'tr'. Can use a shortcut of All. + * + * @attribute handles + * @default all + * @type Array | String + */ + handles: { + setter: '_setHandles', + value: ALL + }, + + /** + * The selector or element to resize. Required. + * + * @attribute node + * @type Node + */ + node: { + setter: Y.one + }, + + /** + * True when the element is being Resized. + * + * @attribute resizing + * @default false + * @type boolean + */ + resizing: { + value: false, + validator: isBoolean + }, + + /** + * True to wrap an element with a div if needed (required for textareas + * and images, defaults to false) in favor of the handles config option. + * The wrapper element type (default div) could be over-riden passing the + * wrapper attribute. + * + * @attribute wrap + * @default false + * @type boolean + */ + wrap: { + setter: '_setWrap', + value: false, + validator: isBoolean + }, + + /** + * Elements that requires a wrapper by default. Normally are elements + * which cannot have children elements. + * + * @attribute wrapTypes + * @default /canvas|textarea|input|select|button|img/i + * @readOnly + * @type Regex + */ + wrapTypes: { + readOnly: true, + value: /^canvas|textarea|input|select|button|img|iframe|table|embed$/i + }, + + /** + * Element to wrap the wrapTypes. This element will house + * the handles elements. + * + * @attribute wrapper + * @default div + * @type String | Node + * @writeOnce + */ + wrapper: { + readOnly: true, + valueFn: '_valueWrapper', + writeOnce: true + } + }, + + RULES: { + b: function(instance, dx, dy) { + var info = instance.info, + originalInfo = instance.originalInfo; + + info.offsetHeight = originalInfo.offsetHeight + dy; + }, + + l: function(instance, dx, dy) { + var info = instance.info, + originalInfo = instance.originalInfo; + + info.left = originalInfo.left + dx; + info.offsetWidth = originalInfo.offsetWidth - dx; + }, + + r: function(instance, dx, dy) { + var info = instance.info, + originalInfo = instance.originalInfo; + + info.offsetWidth = originalInfo.offsetWidth + dx; + }, + + t: function(instance, dx, dy) { + var info = instance.info, + originalInfo = instance.originalInfo; + + info.top = originalInfo.top + dy; + info.offsetHeight = originalInfo.offsetHeight - dy; + }, + + tr: function(instance, dx, dy) { + this.t.apply(this, arguments); + this.r.apply(this, arguments); + }, + + bl: function(instance, dx, dy) { + this.b.apply(this, arguments); + this.l.apply(this, arguments); + }, + + br: function(instance, dx, dy) { + this.b.apply(this, arguments); + this.r.apply(this, arguments); + }, + + tl: function(instance, dx, dy) { + this.t.apply(this, arguments); + this.l.apply(this, arguments); + } + }, + + capitalize: capitalize +}); + +Y.Resize = Y.extend( + Resize, + Y.Base, + { + /** + * Array containing all possible resizable handles. + * + * @property ALL_HANDLES + * @type {String} + */ + ALL_HANDLES: [ T, TR, R, BR, B, BL, L, TL ], + + /** + * Regex which matches with the handles that could change the height of + * the resizable element. + * + * @property REGEX_CHANGE_HEIGHT + * @type {String} + */ + REGEX_CHANGE_HEIGHT: /^(t|tr|b|bl|br|tl)$/i, + + /** + * Regex which matches with the handles that could change the left of + * the resizable element. + * + * @property REGEX_CHANGE_LEFT + * @type {String} + */ + REGEX_CHANGE_LEFT: /^(tl|l|bl)$/i, + + /** + * Regex which matches with the handles that could change the top of + * the resizable element. + * + * @property REGEX_CHANGE_TOP + * @type {String} + */ + REGEX_CHANGE_TOP: /^(tl|t|tr)$/i, + + /** + * Regex which matches with the handles that could change the width of + * the resizable element. + * + * @property REGEX_CHANGE_WIDTH + * @type {String} + */ + REGEX_CHANGE_WIDTH: /^(bl|br|l|r|tl|tr)$/i, + + /** + * Template used to create the resize wrapper node when needed. + * + * @property WRAP_TEMPLATE + * @type {String} + */ + WRAP_TEMPLATE: '
          ', + + /** + * Template used to create each resize handle. + * + * @property HANDLE_TEMPLATE + * @type {String} + */ + HANDLE_TEMPLATE: '
          ' + + '
           
          ' + + '
          ', + + + /** + * Each box has a content area and optional surrounding padding and + * border areas. This property stores the sum of all horizontal + * surrounding * information needed to adjust the node height. + * + * @property totalHSurrounding + * @default 0 + * @type number + */ + totalHSurrounding: 0, + + /** + * Each box has a content area and optional surrounding padding and + * border areas. This property stores the sum of all vertical + * surrounding * information needed to adjust the node height. + * + * @property totalVSurrounding + * @default 0 + * @type number + */ + totalVSurrounding: 0, + + /** + * Stores the node + * surrounding information retrieved from + * _getBoxSurroundingInfo. + * + * @property nodeSurrounding + * @type Object + * @default null + */ + nodeSurrounding: null, + + /** + * Stores the wrapper + * surrounding information retrieved from + * _getBoxSurroundingInfo. + * + * @property wrapperSurrounding + * @type Object + * @default null + */ + wrapperSurrounding: null, + + /** + * Whether the handle being dragged can change the height. + * + * @property changeHeightHandles + * @default false + * @type boolean + */ + changeHeightHandles: false, + + /** + * Whether the handle being dragged can change the left. + * + * @property changeLeftHandles + * @default false + * @type boolean + */ + changeLeftHandles: false, + + /** + * Whether the handle being dragged can change the top. + * + * @property changeTopHandles + * @default false + * @type boolean + */ + changeTopHandles: false, + + /** + * Whether the handle being dragged can change the width. + * + * @property changeWidthHandles + * @default false + * @type boolean + */ + changeWidthHandles: false, + + /** + * Store DD.Delegate reference for the respective Resize instance. + * + * @property delegate + * @default null + * @type Object + */ + delegate: null, + + /** + * Stores the current values for the height, width, top and left. You are + * able to manipulate these values on resize in order to change the resize + * behavior. + * + * @property info + * @type Object + * @protected + */ + info: null, + + /** + * Stores the last values for the height, width, top and left. + * + * @property lastInfo + * @type Object + * @protected + */ + lastInfo: null, + + /** + * Stores the original values for the height, width, top and left, stored + * on resize start. + * + * @property originalInfo + * @type Object + * @protected + */ + originalInfo: null, + + /** + * Construction logic executed during Resize instantiation. Lifecycle. + * + * @method initializer + * @protected + */ + initializer: function() { + this.renderer(); + }, + + /** + * Create the DOM structure for the Resize. Lifecycle. + * + * @method renderUI + * @protected + */ + renderUI: function() { + var instance = this; + + instance._renderHandles(); + }, + + /** + * Bind the events on the Resize UI. Lifecycle. + * + * @method bindUI + * @protected + */ + bindUI: function() { + var instance = this; + + instance._createEvents(); + instance._bindDD(); + instance._bindHandle(); + }, + + /** + * Sync the Resize UI. + * + * @method syncUI + * @protected + */ + syncUI: function() { + var instance = this; + + this.get(NODE).addClass(CSS_RESIZE); + + // hide handles if AUTO_HIDE is true + instance._setHideHandlesUI( + instance.get(AUTO_HIDE) + ); + }, + + /** + * Descructor lifecycle implementation for the Resize class. Purges events attached + * to the node (and all child nodes) and removes the Resize handles. + * + * @method destructor + * @protected + */ + destructor: function() { + var instance = this, + node = instance.get(NODE), + wrapper = instance.get(WRAPPER), + pNode = wrapper.get(PARENT_NODE); + + // purgeElements on boundingBox + Y.Event.purgeElement(wrapper, true); + + // destroy handles dd and remove them from the dom + instance.eachHandle(function(handleEl) { + instance.delegate.dd.destroy(); + + // remove handle + handleEl.remove(true); + }); + + // unwrap node + if (instance.get(WRAP)) { + instance._copyStyles(wrapper, node); + + if (pNode) { + pNode.insertBefore(node, wrapper); + } + + wrapper.remove(true); + } + + node.removeClass(CSS_RESIZE); + node.removeClass(CSS_RESIZE_HIDDEN_HANDLES); + }, + + /** + * Creates DOM (or manipulates DOM for progressive enhancement) + * This method is invoked by initializer(). It's chained automatically for + * subclasses if required. + * + * @method renderer + * @protected + */ + renderer: function() { + this.renderUI(); + this.bindUI(); + this.syncUI(); + }, + + /** + *

          Loop through each handle which is being used and executes a callback.

          + *

          Example:

          + *
          instance.eachHandle(
          +		 *      function(handleName, index) { ... }
          +		 *  );
          + * + * @method eachHandle + * @param {function} fn Callback function to be executed for each handle. + */ + eachHandle: function(fn) { + var instance = this; + + Y.each( + instance.get(HANDLES), + function(handle, i) { + var handleEl = instance.get( + handleAttrName(handle) + ); + + fn.apply(instance, [handleEl, handle, i]); + } + ); + }, + + /** + * Bind the handles DragDrop events to the Resize instance. + * + * @method _bindDD + * @private + */ + _bindDD: function() { + var instance = this; + + instance.delegate = new Y.DD.Delegate( + { + bubbleTargets: instance, + container: instance.get(WRAPPER), + dragConfig: { + clickPixelThresh: 0, + clickTimeThresh: 0, + useShim: true, + move: false + }, + nodes: DOT+CSS_RESIZE_HANDLE, + target: false + } + ); + + instance.on('drag:drag', instance._handleResizeEvent); + instance.on('drag:dropmiss', instance._handleMouseUpEvent); + instance.on('drag:end', instance._handleResizeEndEvent); + instance.on('drag:start', instance._handleResizeStartEvent); + }, + + /** + * Bind the events related to the handles (_onHandleMouseEnter, _onHandleMouseLeave). + * + * @method _bindHandle + * @private + */ + _bindHandle: function() { + var instance = this, + wrapper = instance.get(WRAPPER); + + wrapper.on('mouseenter', Y.bind(instance._onWrapperMouseEnter, instance)); + wrapper.on('mouseleave', Y.bind(instance._onWrapperMouseLeave, instance)); + wrapper.delegate('mouseenter', Y.bind(instance._onHandleMouseEnter, instance), DOT+CSS_RESIZE_HANDLE); + wrapper.delegate('mouseleave', Y.bind(instance._onHandleMouseLeave, instance), DOT+CSS_RESIZE_HANDLE); + }, + + /** + * Create the custom events used on the Resize. + * + * @method _createEvents + * @private + */ + _createEvents: function() { + var instance = this, + // create publish function for kweight optimization + publish = function(name, fn) { + instance.publish(name, { + defaultFn: fn, + queuable: false, + emitFacade: true, + bubbles: true, + prefix: RESIZE + }); + }; + + /** + * Handles the resize start event. Fired when a handle starts to be + * dragged. + * + * @event resize:start + * @preventable _defResizeStartFn + * @param {Event.Facade} event The resize start event. + * @bubbles Resize + * @type {Event.Custom} + */ + publish(EV_RESIZE_START, this._defResizeStartFn); + + /** + * Handles the resize event. Fired on each pixel when the handle is + * being dragged. + * + * @event resize:resize + * @preventable _defResizeFn + * @param {Event.Facade} event The resize event. + * @bubbles Resize + * @type {Event.Custom} + */ + publish(EV_RESIZE, this._defResizeFn); + + /** + * Handles the resize align event. + * + * @event resize:align + * @preventable _defResizeAlignFn + * @param {Event.Facade} event The resize align event. + * @bubbles Resize + * @type {Event.Custom} + */ + publish(EV_RESIZE_ALIGN, this._defResizeAlignFn); + + /** + * Handles the resize end event. Fired when a handle stop to be + * dragged. + * + * @event resize:end + * @preventable _defResizeEndFn + * @param {Event.Facade} event The resize end event. + * @bubbles Resize + * @type {Event.Custom} + */ + publish(EV_RESIZE_END, this._defResizeEndFn); + + /** + * Handles the resize mouseUp event. Fired when a mouseUp event happens on a + * handle. + * + * @event resize:mouseUp + * @preventable _defMouseUpFn + * @param {Event.Facade} event The resize mouseUp event. + * @bubbles Resize + * @type {Event.Custom} + */ + publish(EV_MOUSE_UP, this._defMouseUpFn); + }, + + /** + * Responsible for loop each handle element and append to the wrapper. + * + * @method _renderHandles + * @protected + */ + _renderHandles: function() { + var instance = this, + wrapper = instance.get(WRAPPER); + + instance.eachHandle(function(handleEl) { + wrapper.append(handleEl); + }); + }, + + /** + * Creates the handle element based on the handle name and initialize the + * DragDrop on it. + * + * @method _buildHandle + * @param {String} handle Handle name ('t', 'tr', 'b', ...). + * @protected + */ + _buildHandle: function(handle) { + var instance = this; + + return Y.Node.create( + Y.substitute(instance.HANDLE_TEMPLATE, { + handle: handle + }) + ); + }, + + /** + * Basic resize calculations. + * + * @method _calcResize + * @protected + */ + _calcResize: function() { + var instance = this, + handle = instance.handle, + info = instance.info, + originalInfo = instance.originalInfo, + + dx = info.actXY[0] - originalInfo.actXY[0], + dy = info.actXY[1] - originalInfo.actXY[1]; + + if (handle && Y.Resize.RULES[handle]) { + Y.Resize.RULES[handle](instance, dx, dy); + } + else { + } + }, + + /** + * Helper method to update the current size value on + * info to respect the + * min/max values and fix the top/left calculations. + * + * @method _checkSize + * @param {String} offset 'offsetHeight' or 'offsetWidth' + * @param {number} size Size to restrict the offset + * @protected + */ + _checkSize: function(offset, size) { + var instance = this, + info = instance.info, + originalInfo = instance.originalInfo, + axis = (offset == OFFSET_HEIGHT) ? TOP : LEFT; + + // forcing the offsetHeight/offsetWidth to be the passed size + info[offset] = size; + + // predicting, based on the original information, the last left valid in case of reach the min/max dimension + // this calculation avoid browser event leaks when user interact very fast + if (((axis == LEFT) && instance.changeLeftHandles) || + ((axis == TOP) && instance.changeTopHandles)) { + + info[axis] = originalInfo[axis] + originalInfo[offset] - size; + } + }, + + /** + * Copy relevant styles of the node + * to the wrapper. + * + * @method _copyStyles + * @param {Node} node Node from. + * @param {Node} wrapper Node to. + * @protected + */ + _copyStyles: function(node, wrapper) { + var position = node.getStyle(POSITION).toLowerCase(), + surrounding = this._getBoxSurroundingInfo(node), + wrapperStyle; + + // resizable wrapper should be positioned + if (position == STATIC) { + position = RELATIVE; + } + + wrapperStyle = { + position: position, + left: getCompStyle(node, LEFT), + top: getCompStyle(node, TOP) + }; + + Y.mix(wrapperStyle, surrounding.margin); + Y.mix(wrapperStyle, surrounding.border); + + wrapper.setStyles(wrapperStyle); + + // remove margin and border from the internal node + node.setStyles({ border: 0, margin: 0 }); + + wrapper.sizeTo( + node.get(OFFSET_WIDTH) + surrounding.totalHBorder, + node.get(OFFSET_HEIGHT) + surrounding.totalVBorder + ); + }, + + // extract handle name from a string + // using Y.cached to memoize the function for performance + _extractHandleName: Y.cached( + function(node) { + var className = node.get(CLASS_NAME), + + match = className.match( + new RegExp( + getCN(RESIZE, HANDLE, '(\\w{1,2})\\b') + ) + ); + + return match ? match[1] : null; + } + ), + + /** + *

          Generates metadata to the info + * and originalInfo

          + *
          bottom, actXY, left, top, offsetHeight, offsetWidth, right
          + * + * @method _getInfo + * @param {Node} node + * @param {EventFacade} event + * @private + */ + _getInfo: function(node, event) { + var actXY = [0,0], + drag = event.dragEvent.target, + nodeXY = node.getXY(), + nodeX = nodeXY[0], + nodeY = nodeXY[1], + offsetHeight = node.get(OFFSET_HEIGHT), + offsetWidth = node.get(OFFSET_WIDTH); + + if (event) { + // the xy that the node will be set to. Changing this will alter the position as it's dragged. + actXY = (drag.actXY.length ? drag.actXY : drag.lastXY); + } + + return { + actXY: actXY, + bottom: (nodeY + offsetHeight), + left: nodeX, + offsetHeight: offsetHeight, + offsetWidth: offsetWidth, + right: (nodeX + offsetWidth), + top: nodeY + }; + }, + + /** + * Each box has a content area and optional surrounding margin, + * padding and * border areas. This method get all this information from + * the passed node. For more reference see + * + * http://www.w3.org/TR/CSS21/box.html#box-dimensions. + * + * @method _getBoxSurroundingInfo + * @param {Node} node + * @private + * @return {Object} + */ + _getBoxSurroundingInfo: function(node) { + var info = { + padding: {}, + margin: {}, + border: {} + }; + + if (isNode(node)) { + Y.each([ TOP, RIGHT, BOTTOM, LEFT ], function(dir) { + var paddingProperty = capitalize(PADDING, dir), + marginProperty = capitalize(MARGIN, dir), + borderWidthProperty = capitalize(BORDER, dir, WIDTH), + borderColorProperty = capitalize(BORDER, dir, COLOR), + borderStyleProperty = capitalize(BORDER, dir, STYLE); + + info.border[borderColorProperty] = getCompStyle(node, borderColorProperty); + info.border[borderStyleProperty] = getCompStyle(node, borderStyleProperty); + info.border[borderWidthProperty] = getCompStyle(node, borderWidthProperty); + info.margin[marginProperty] = getCompStyle(node, marginProperty); + info.padding[paddingProperty] = getCompStyle(node, paddingProperty); + }); + } + + info.totalHBorder = (toRoundNumber(info.border.borderLeftWidth) + toRoundNumber(info.border.borderRightWidth)); + info.totalHPadding = (toRoundNumber(info.padding.paddingLeft) + toRoundNumber(info.padding.paddingRight)); + info.totalVBorder = (toRoundNumber(info.border.borderBottomWidth) + toRoundNumber(info.border.borderTopWidth)); + info.totalVPadding = (toRoundNumber(info.padding.paddingBottom) + toRoundNumber(info.padding.paddingTop)); + + return info; + }, + + /** + * Sync the Resize UI with internal values from + * info. + * + * @method _syncUI + * @protected + */ + _syncUI: function() { + var instance = this, + info = instance.info, + wrapperSurrounding = instance.wrapperSurrounding, + wrapper = instance.get(WRAPPER), + node = instance.get(NODE); + + wrapper.sizeTo(info.offsetWidth, info.offsetHeight); + + if (instance.changeLeftHandles || instance.changeTopHandles) { + wrapper.setXY([info.left, info.top]); + } + + // if a wrap node is being used + if (!wrapper.compareTo(node)) { + // the original internal node borders were copied to the wrapper on _copyStyles, to compensate that subtract the borders from the internal node + node.sizeTo( + info.offsetWidth - wrapperSurrounding.totalHBorder, + info.offsetHeight - wrapperSurrounding.totalVBorder + ); + } + + // prevent webkit textarea resize + if (Y.UA.webkit) { + node.setStyle(RESIZE, NONE); + } + }, + + /** + * Update instance.changeHeightHandles, + * instance.changeLeftHandles, instance.changeTopHandles, + * instance.changeWidthHandles information. + * + * @method _updateChangeHandleInfo + * @private + */ + _updateChangeHandleInfo: function(handle) { + var instance = this; + + instance.changeHeightHandles = instance.REGEX_CHANGE_HEIGHT.test(handle); + instance.changeLeftHandles = instance.REGEX_CHANGE_LEFT.test(handle); + instance.changeTopHandles = instance.REGEX_CHANGE_TOP.test(handle); + instance.changeWidthHandles = instance.REGEX_CHANGE_WIDTH.test(handle); + }, + + /** + * Update info values (bottom, actXY, left, top, offsetHeight, offsetWidth, right). + * + * @method _updateInfo + * @private + */ + _updateInfo: function(event) { + var instance = this; + + instance.info = instance._getInfo(instance.get(WRAPPER), event); + }, + + /** + * Update properties + * nodeSurrounding, + * wrapperSurrounding, + * totalVSurrounding, + * totalHSurrounding. + * + * @method _updateSurroundingInfo + * @private + */ + _updateSurroundingInfo: function() { + var instance = this, + node = instance.get(NODE), + wrapper = instance.get(WRAPPER), + nodeSurrounding = instance._getBoxSurroundingInfo(node), + wrapperSurrounding = instance._getBoxSurroundingInfo(wrapper); + + instance.nodeSurrounding = nodeSurrounding; + instance.wrapperSurrounding = wrapperSurrounding; + + instance.totalVSurrounding = (nodeSurrounding.totalVPadding + wrapperSurrounding.totalVBorder); + instance.totalHSurrounding = (nodeSurrounding.totalHPadding + wrapperSurrounding.totalHBorder); + }, + + /** + * Set the active state of the handles. + * + * @method _setActiveHandlesUI + * @param {boolean} val True to activate the handles, false to deactivate. + * @protected + */ + _setActiveHandlesUI: function(val) { + var instance = this, + activeHandleNode = instance.get(ACTIVE_HANDLE_NODE); + + if (activeHandleNode) { + if (val) { + // remove CSS_RESIZE_HANDLE_ACTIVE from all handles before addClass on the active + instance.eachHandle( + function(handleEl) { + handleEl.removeClass(CSS_RESIZE_HANDLE_ACTIVE); + } + ); + + activeHandleNode.addClass(CSS_RESIZE_HANDLE_ACTIVE); + } + else { + activeHandleNode.removeClass(CSS_RESIZE_HANDLE_ACTIVE); + } + } + }, + + /** + * Setter for the handles attribute + * + * @method _setHandles + * @protected + * @param {String} val + */ + _setHandles: function(val) { + var instance = this, + handles = []; + + // handles attr accepts both array or string + if (isArray(val)) { + handles = val; + } + else if (isString(val)) { + // if the handles attr passed in is an ALL string... + if (val.toLowerCase() == ALL) { + handles = instance.ALL_HANDLES; + } + // otherwise, split the string to extract the handles + else { + Y.each( + val.split(COMMA), + function(node, i) { + var handle = trim(node); + + // if its a valid handle, add it to the handles output + if (indexOf(instance.ALL_HANDLES, handle) > -1) { + handles.push(handle); + } + } + ); + } + } + + return handles; + }, + + /** + * Set the visibility of the handles. + * + * @method _setHideHandlesUI + * @param {boolean} val True to hide the handles, false to show. + * @protected + */ + _setHideHandlesUI: function(val) { + var instance = this, + wrapper = instance.get(WRAPPER); + + if (!instance.get(RESIZING)) { + if (val) { + wrapper.addClass(CSS_RESIZE_HIDDEN_HANDLES); + } + else { + wrapper.removeClass(CSS_RESIZE_HIDDEN_HANDLES); + } + } + }, + + /** + * Setter for the wrap attribute + * + * @method _setWrap + * @protected + * @param {boolean} val + */ + _setWrap: function(val) { + var instance = this, + node = instance.get(NODE), + nodeName = node.get(NODE_NAME), + typeRegex = instance.get(WRAP_TYPES); + + // if nodeName is listed on WRAP_TYPES force use the wrapper + if (typeRegex.test(nodeName)) { + val = true; + } + + return val; + }, + + /** + * Default resize:mouseUp handler + * + * @method _defMouseUpFn + * @param {EventFacade} event The Event object + * @protected + */ + _defMouseUpFn: function(event) { + var instance = this; + + instance.set(RESIZING, false); + }, + + /** + * Default resize:resize handler + * + * @method _defResizeFn + * @param {EventFacade} event The Event object + * @protected + */ + _defResizeFn: function(event) { + var instance = this; + + instance._resize(event); + }, + + /** + * Logic method for _defResizeFn. Allow AOP. + * + * @method _resize + * @param {EventFacade} event The Event object + * @protected + */ + _resize: function(event) { + var instance = this; + + instance._handleResizeAlignEvent(event.dragEvent); + + // _syncUI of the wrapper, not using proxy + instance._syncUI(); + }, + + /** + * Default resize:align handler + * + * @method _defResizeAlignFn + * @param {EventFacade} event The Event object + * @protected + */ + _defResizeAlignFn: function(event) { + var instance = this; + + instance._resizeAlign(event); + }, + + /** + * Logic method for _defResizeAlignFn. Allow AOP. + * + * @method _resizeAlign + * @param {EventFacade} event The Event object + * @protected + */ + _resizeAlign: function(event) { + var instance = this, + info, + defMinHeight, + defMinWidth; + + instance.lastInfo = instance.info; + + // update the instance.info values + instance._updateInfo(event); + + info = instance.info; + + // basic resize calculations + instance._calcResize(); + + // if Y.Plugin.ResizeConstrained is not plugged, check for min dimension + if (!instance.con) { + defMinHeight = (instance.get(DEF_MIN_HEIGHT) + instance.totalVSurrounding); + defMinWidth = (instance.get(DEF_MIN_WIDTH) + instance.totalHSurrounding); + + if (info.offsetHeight <= defMinHeight) { + instance._checkSize(OFFSET_HEIGHT, defMinHeight); + } + + if (info.offsetWidth <= defMinWidth) { + instance._checkSize(OFFSET_WIDTH, defMinWidth); + } + } + }, + + /** + * Default resize:end handler + * + * @method _defResizeEndFn + * @param {EventFacade} event The Event object + * @protected + */ + _defResizeEndFn: function(event) { + var instance = this; + + instance._resizeEnd(event); + }, + + /** + * Logic method for _defResizeEndFn. Allow AOP. + * + * @method _resizeEnd + * @param {EventFacade} event The Event object + * @protected + */ + _resizeEnd: function(event) { + var instance = this, + drag = event.dragEvent.target; + + // reseting actXY from drag when drag end + drag.actXY = []; + + // syncUI when resize end + instance._syncUI(); + + instance._setActiveHandlesUI(false); + + instance.set(ACTIVE_HANDLE, null); + instance.set(ACTIVE_HANDLE_NODE, null); + + instance.handle = null; + }, + + /** + * Default resize:start handler + * + * @method _defResizeStartFn + * @param {EventFacade} event The Event object + * @protected + */ + _defResizeStartFn: function(event) { + var instance = this; + + instance._resizeStart(event); + }, + + /** + * Logic method for _defResizeStartFn. Allow AOP. + * + * @method _resizeStart + * @param {EventFacade} event The Event object + * @protected + */ + _resizeStart: function(event) { + var instance = this, + wrapper = instance.get(WRAPPER); + + instance.handle = instance.get(ACTIVE_HANDLE); + + instance.set(RESIZING, true); + + instance._updateSurroundingInfo(); + + // create an originalInfo information for reference + instance.originalInfo = instance._getInfo(wrapper, event); + + instance._updateInfo(event); + }, + + /** + * Fires the resize:mouseUp event. + * + * @method _handleMouseUpEvent + * @param {EventFacade} event resize:mouseUp event facade + * @protected + */ + _handleMouseUpEvent: function(event) { + this.fire(EV_MOUSE_UP, { dragEvent: event, info: this.info }); + }, + + /** + * Fires the resize:resize event. + * + * @method _handleResizeEvent + * @param {EventFacade} event resize:resize event facade + * @protected + */ + _handleResizeEvent: function(event) { + this.fire(EV_RESIZE, { dragEvent: event, info: this.info }); + }, + + /** + * Fires the resize:align event. + * + * @method _handleResizeAlignEvent + * @param {EventFacade} event resize:resize event facade + * @protected + */ + _handleResizeAlignEvent: function(event) { + this.fire(EV_RESIZE_ALIGN, { dragEvent: event, info: this.info }); + }, + + /** + * Fires the resize:end event. + * + * @method _handleResizeEndEvent + * @param {EventFacade} event resize:end event facade + * @protected + */ + _handleResizeEndEvent: function(event) { + this.fire(EV_RESIZE_END, { dragEvent: event, info: this.info }); + }, + + /** + * Fires the resize:start event. + * + * @method _handleResizeStartEvent + * @param {EventFacade} event resize:start event facade + * @protected + */ + _handleResizeStartEvent: function(event) { + if (!this.get(ACTIVE_HANDLE)) { + //This handles the "touch" case + this._setHandleFromNode(event.target.get('node')); + } + this.fire(EV_RESIZE_START, { dragEvent: event, info: this.info }); + }, + + /** + * Mouseenter event handler for the wrapper. + * + * @method _onWrapperMouseEnter + * @param {EventFacade} event + * @protected + */ + _onWrapperMouseEnter: function(event) { + var instance = this; + + if (instance.get(AUTO_HIDE)) { + instance._setHideHandlesUI(false); + } + }, + + /** + * Mouseleave event handler for the wrapper. + * + * @method _onWrapperMouseLeave + * @param {EventFacade} event + * @protected + */ + _onWrapperMouseLeave: function(event) { + var instance = this; + + if (instance.get(AUTO_HIDE)) { + instance._setHideHandlesUI(true); + } + }, + + /** + * Handles setting the activeHandle from a node, used from startDrag (for touch) and mouseenter (for mouse). + * + * @method _setHandleFromNode + * @param {Node} node + * @protected + */ + _setHandleFromNode: function(node) { + var instance = this, + handle = instance._extractHandleName(node); + + if (!instance.get(RESIZING)) { + instance.set(ACTIVE_HANDLE, handle); + instance.set(ACTIVE_HANDLE_NODE, node); + + instance._setActiveHandlesUI(true); + instance._updateChangeHandleInfo(handle); + } + }, + + /** + * Mouseenter event handler for the handles. + * + * @method _onHandleMouseEnter + * @param {EventFacade} event + * @protected + */ + _onHandleMouseEnter: function(event) { + this._setHandleFromNode(event.currentTarget); + }, + + /** + * Mouseout event handler for the handles. + * + * @method _onHandleMouseLeave + * @param {EventFacade} event + * @protected + */ + _onHandleMouseLeave: function(event) { + var instance = this; + + if (!instance.get(RESIZING)) { + instance._setActiveHandlesUI(false); + } + }, + + /** + * Default value for the wrapper attribute + * + * @method _valueWrapper + * @protected + * @readOnly + */ + _valueWrapper: function() { + var instance = this, + node = instance.get(NODE), + pNode = node.get(PARENT_NODE), + // by deafult the wrapper is always the node + wrapper = node; + + // if the node is listed on the wrapTypes or wrap is set to true, create another wrapper + if (instance.get(WRAP)) { + wrapper = Y.Node.create(instance.WRAP_TEMPLATE); + + if (pNode) { + pNode.insertBefore(wrapper, node); + } + + wrapper.append(node); + + instance._copyStyles(node, wrapper); + + // remove positioning of wrapped node, the WRAPPER take care about positioning + node.setStyles({ + position: STATIC, + left: 0, + top: 0 + }); + } + + return wrapper; + } + } +); + +Y.each(Y.Resize.prototype.ALL_HANDLES, function(handle, i) { + // creating ATTRS with the handles elements + Y.Resize.ATTRS[handleAttrName(handle)] = { + setter: function() { + return this._buildHandle(handle); + }, + value: null, + writeOnce: true + }; +}); + + +}, '3.3.0' ,{requires:['base', 'widget', 'substitute', 'event', 'oop', 'dd-drag', 'dd-delegate', 'dd-drop'], skinnable:true}); +YUI.add('resize-proxy', function(Y) { + +var ACTIVE_HANDLE_NODE = 'activeHandleNode', + CURSOR = 'cursor', + DRAG_CURSOR = 'dragCursor', + HOST = 'host', + PARENT_NODE = 'parentNode', + PROXY = 'proxy', + PROXY_NODE = 'proxyNode', + RESIZE = 'resize', + RESIZE_PROXY = 'resize-proxy', + WRAPPER = 'wrapper', + + getCN = Y.ClassNameManager.getClassName, + + CSS_RESIZE_PROXY = getCN(RESIZE, PROXY); + +function ResizeProxy() { + ResizeProxy.superclass.constructor.apply(this, arguments); +} + +Y.mix(ResizeProxy, { + NAME: RESIZE_PROXY, + + NS: PROXY, + + ATTRS: { + /** + * The Resize proxy element. + * + * @attribute proxyNode + * @default Generated using an internal HTML markup + * @type String | Node + */ + proxyNode: { + setter: Y.one, + valueFn: function() { + return Y.Node.create(this.PROXY_TEMPLATE); + } + } + } +}); + +Y.extend(ResizeProxy, Y.Plugin.Base, { + /** + * Template used to create the resize proxy. + * + * @property PROXY_TEMPLATE + * @type {String} + */ + PROXY_TEMPLATE: '
          ', + + initializer: function() { + var instance = this; + + instance.afterHostEvent('resize:start', instance._afterResizeStart); + instance.beforeHostMethod('_resize', instance._beforeHostResize); + instance.afterHostMethod('_resizeEnd', instance._afterHostResizeEnd); + }, + + destructor: function() { + var instance = this; + + instance.get(PROXY_NODE).remove(true); + }, + + _afterHostResizeEnd: function(event) { + var instance = this, + drag = event.dragEvent.target; + + // reseting actXY from drag when drag end + drag.actXY = []; + + // if proxy is true, hide it on resize end + instance._syncProxyUI(); + + instance.get(PROXY_NODE).hide(); + }, + + _afterResizeStart: function(event) { + var instance = this; + + instance._renderProxy(); + }, + + _beforeHostResize: function(event) { + var instance = this, + host = this.get(HOST); + + host._handleResizeAlignEvent(event.dragEvent); + + // if proxy is true _syncProxyUI instead of _syncUI + instance._syncProxyUI(); + + return new Y.Do.Prevent(); + }, + + /** + * Render the proxyNode element and + * make it sibling of the node. + * + * @method _renderProxy + * @protected + */ + _renderProxy: function() { + var instance = this, + host = this.get(HOST), + proxyNode = instance.get(PROXY_NODE); + + if (!proxyNode.inDoc()) { + host.get(WRAPPER).get(PARENT_NODE).append( + proxyNode.hide() + ); + } + }, + + /** + * Sync the proxy UI with internal values from + * info. + * + * @method _syncProxyUI + * @protected + */ + _syncProxyUI: function() { + var instance = this, + host = this.get(HOST), + info = host.info, + activeHandleNode = host.get(ACTIVE_HANDLE_NODE), + proxyNode = instance.get(PROXY_NODE), + cursor = activeHandleNode.getStyle(CURSOR); + + proxyNode.show().setStyle(CURSOR, cursor); + + host.delegate.dd.set(DRAG_CURSOR, cursor); + + proxyNode.sizeTo(info.offsetWidth, info.offsetHeight); + + proxyNode.setXY([ info.left, info.top ]); + } +}); + +Y.namespace('Plugin'); +Y.Plugin.ResizeProxy = ResizeProxy; + + +}, '3.3.0' ,{requires:['resize-base', 'plugin'], skinnable:false}); +YUI.add('resize-constrain', function(Y) { + +var Lang = Y.Lang, + isBoolean = Lang.isBoolean, + isNumber = Lang.isNumber, + isString = Lang.isString, + capitalize = Y.Resize.capitalize, + + isNode = function(v) { + return (v instanceof Y.Node); + }, + + toNumber = function(num) { + return parseFloat(num) || 0; + }, + + BORDER_BOTTOM_WIDTH = 'borderBottomWidth', + BORDER_LEFT_WIDTH = 'borderLeftWidth', + BORDER_RIGHT_WIDTH = 'borderRightWidth', + BORDER_TOP_WIDTH = 'borderTopWidth', + BORDER = 'border', + BOTTOM = 'bottom', + CON = 'con', + CONSTRAIN = 'constrain', + HOST = 'host', + LEFT = 'left', + MAX_HEIGHT = 'maxHeight', + MAX_WIDTH = 'maxWidth', + MIN_HEIGHT = 'minHeight', + MIN_WIDTH = 'minWidth', + NODE = 'node', + OFFSET_HEIGHT = 'offsetHeight', + OFFSET_WIDTH = 'offsetWidth', + PRESEVE_RATIO = 'preserveRatio', + REGION = 'region', + RESIZE_CONTRAINED = 'resizeConstrained', + RIGHT = 'right', + TICK_X = 'tickX', + TICK_Y = 'tickY', + TOP = 'top', + WIDTH = 'width', + VIEW = 'view', + VIEWPORT_REGION = 'viewportRegion'; + +function ResizeConstrained() { + ResizeConstrained.superclass.constructor.apply(this, arguments); +} + +Y.mix(ResizeConstrained, { + NAME: RESIZE_CONTRAINED, + + NS: CON, + + ATTRS: { + /** + * Will attempt to constrain the resize node to the boundaries. Arguments:
          + * 'view': Contrain to Viewport
          + * '#selector_string': Constrain to this node
          + * '{Region Object}': An Object Literal containing a valid region (top, right, bottom, left) of page positions + * + * @attribute constrain + * @type {String/Object/Node} + */ + constrain: { + setter: function(v) { + if (v && (isNode(v) || isString(v) || v.nodeType)) { + v = Y.one(v); + } + + return v; + } + }, + + /** + * The minimum height of the element + * + * @attribute minHeight + * @default 15 + * @type Number + */ + minHeight: { + value: 15, + validator: isNumber + }, + + /** + * The minimum width of the element + * + * @attribute minWidth + * @default 15 + * @type Number + */ + minWidth: { + value: 15, + validator: isNumber + }, + + /** + * The maximum height of the element + * + * @attribute maxHeight + * @default Infinity + * @type Number + */ + maxHeight: { + value: Infinity, + validator: isNumber + }, + + /** + * The maximum width of the element + * + * @attribute maxWidth + * @default Infinity + * @type Number + */ + maxWidth: { + value: Infinity, + validator: isNumber + }, + + /** + * Maintain the element's ratio when resizing. + * + * @attribute preserveRatio + * @default false + * @type boolean + */ + preserveRatio: { + value: false, + validator: isBoolean + }, + + /** + * The number of x ticks to span the resize to. + * + * @attribute tickX + * @default false + * @type Number | false + */ + tickX: { + value: false + }, + + /** + * The number of y ticks to span the resize to. + * + * @attribute tickY + * @default false + * @type Number | false + */ + tickY: { + value: false + } + } +}); + +Y.extend(ResizeConstrained, Y.Plugin.Base, { + /** + * Stores the constrain + * surrounding information retrieved from + * _getBoxSurroundingInfo. + * + * @property constrainSurrounding + * @type Object + * @default null + */ + constrainSurrounding: null, + + initializer: function() { + var instance = this, + host = instance.get(HOST); + + host.delegate.dd.plug( + Y.Plugin.DDConstrained, + { + tickX: instance.get(TICK_X), + tickY: instance.get(TICK_Y) + } + ); + + host.after('resize:align', Y.bind(instance._handleResizeAlignEvent, instance)); + host.on('resize:start', Y.bind(instance._handleResizeStartEvent, instance)); + }, + + /** + * Helper method to update the current values on + * info to respect the + * constrain node. + * + * @method _checkConstrain + * @param {String} axis 'top' or 'left' + * @param {String} axisConstrain 'bottom' or 'right' + * @param {String} offset 'offsetHeight' or 'offsetWidth' + * @protected + */ + _checkConstrain: function(axis, axisConstrain, offset) { + var instance = this, + point1, + point1Constrain, + point2, + point2Constrain, + host = instance.get(HOST), + info = host.info, + constrainBorders = instance.constrainSurrounding.border, + region = instance._getConstrainRegion(); + + if (region) { + point1 = info[axis] + info[offset]; + point1Constrain = region[axisConstrain] - toNumber(constrainBorders[capitalize(BORDER, axisConstrain, WIDTH)]); + + if (point1 >= point1Constrain) { + info[offset] -= (point1 - point1Constrain); + } + + point2 = info[axis]; + point2Constrain = region[axis] + toNumber(constrainBorders[capitalize(BORDER, axis, WIDTH)]); + + if (point2 <= point2Constrain) { + info[axis] += (point2Constrain - point2); + info[offset] -= (point2Constrain - point2); + } + } + }, + + /** + * Update the current values on info + * to respect the maxHeight and minHeight. + * + * @method _checkHeight + * @protected + */ + _checkHeight: function() { + var instance = this, + host = instance.get(HOST), + info = host.info, + maxHeight = (instance.get(MAX_HEIGHT) + host.totalVSurrounding), + minHeight = (instance.get(MIN_HEIGHT) + host.totalVSurrounding); + + instance._checkConstrain(TOP, BOTTOM, OFFSET_HEIGHT); + + if (info.offsetHeight > maxHeight) { + host._checkSize(OFFSET_HEIGHT, maxHeight); + } + + if (info.offsetHeight < minHeight) { + host._checkSize(OFFSET_HEIGHT, minHeight); + } + }, + + /** + * Update the current values on info + * calculating the correct ratio for the other values. + * + * @method _checkRatio + * @protected + */ + _checkRatio: function() { + var instance = this, + host = instance.get(HOST), + info = host.info, + originalInfo = host.originalInfo, + oWidth = originalInfo.offsetWidth, + oHeight = originalInfo.offsetHeight, + oTop = originalInfo.top, + oLeft = originalInfo.left, + oBottom = originalInfo.bottom, + oRight = originalInfo.right, + // wRatio/hRatio functions keep the ratio information always synced with the current info information + // RETURN: percentage how much width/height has changed from the original width/height + wRatio = function() { + return (info.offsetWidth/oWidth); + }, + hRatio = function() { + return (info.offsetHeight/oHeight); + }, + isClosestToHeight = host.changeHeightHandles, + bottomDiff, + constrainBorders, + constrainRegion, + leftDiff, + rightDiff, + topDiff; + + // check whether the resizable node is closest to height or not + if (instance.get(CONSTRAIN) && host.changeHeightHandles && host.changeWidthHandles) { + constrainRegion = instance._getConstrainRegion(); + constrainBorders = instance.constrainSurrounding.border; + bottomDiff = (constrainRegion.bottom - toNumber(constrainBorders[BORDER_BOTTOM_WIDTH])) - oBottom; + leftDiff = oLeft - (constrainRegion.left + toNumber(constrainBorders[BORDER_LEFT_WIDTH])); + rightDiff = (constrainRegion.right - toNumber(constrainBorders[BORDER_RIGHT_WIDTH])) - oRight; + topDiff = oTop - (constrainRegion.top + toNumber(constrainBorders[BORDER_TOP_WIDTH])); + + if (host.changeLeftHandles && host.changeTopHandles) { + isClosestToHeight = (topDiff < leftDiff); + } + else if (host.changeLeftHandles) { + isClosestToHeight = (bottomDiff < leftDiff); + } + else if (host.changeTopHandles) { + isClosestToHeight = (topDiff < rightDiff); + } + else { + isClosestToHeight = (bottomDiff < rightDiff); + } + } + + // when the height of the resizable element touch the border of the constrain first + // force the offsetWidth to be calculated based on the height ratio + if (isClosestToHeight) { + info.offsetWidth = oWidth*hRatio(); + instance._checkWidth(); + info.offsetHeight = oHeight*wRatio(); + } + else { + info.offsetHeight = oHeight*wRatio(); + instance._checkHeight(); + info.offsetWidth = oWidth*hRatio(); + } + + // fixing the top on handles which are able to change top + // the idea here is change the top based on how much the height has changed instead of follow the dy + if (host.changeTopHandles) { + info.top = oTop + (oHeight - info.offsetHeight); + } + + // fixing the left on handles which are able to change left + // the idea here is change the left based on how much the width has changed instead of follow the dx + if (host.changeLeftHandles) { + info.left = oLeft + (oWidth - info.offsetWidth); + } + + // rounding values to avoid pixel jumpings + Y.each(info, function(value, key) { + if (isNumber(value)) { + info[key] = Math.round(value); + } + }); + }, + + /** + * Check whether the resizable node is inside the constrain region. + * + * @method _checkRegion + * @protected + * @return {boolean} + */ + _checkRegion: function() { + var instance = this, + host = instance.get(HOST), + region = instance._getConstrainRegion(); + + return Y.DOM.inRegion(null, region, true, host.info); + }, + + /** + * Update the current values on info + * to respect the maxWidth and minWidth. + * + * @method _checkWidth + * @protected + */ + _checkWidth: function() { + var instance = this, + host = instance.get(HOST), + info = host.info, + maxWidth = (instance.get(MAX_WIDTH) + host.totalHSurrounding), + minWidth = (instance.get(MIN_WIDTH) + host.totalHSurrounding); + + instance._checkConstrain(LEFT, RIGHT, OFFSET_WIDTH); + + if (info.offsetWidth < minWidth) { + host._checkSize(OFFSET_WIDTH, minWidth); + } + + if (info.offsetWidth > maxWidth) { + host._checkSize(OFFSET_WIDTH, maxWidth); + } + }, + + /** + * Get the constrain region based on the constrain + * attribute. + * + * @method _getConstrainRegion + * @protected + * @return {Object Region} + */ + _getConstrainRegion: function() { + var instance = this, + host = instance.get(HOST), + node = host.get(NODE), + constrain = instance.get(CONSTRAIN), + region = null; + + if (constrain) { + if (constrain == VIEW) { + region = node.get(VIEWPORT_REGION); + } + else if (isNode(constrain)) { + region = constrain.get(REGION); + } + else { + region = constrain; + } + } + + return region; + }, + + _handleResizeAlignEvent: function(event) { + var instance = this, + host = instance.get(HOST); + + // check the max/min height and locking top when these values are reach + instance._checkHeight(); + + // check the max/min width and locking left when these values are reach + instance._checkWidth(); + + // calculating the ratio, for proportionally resizing + if (instance.get(PRESEVE_RATIO)) { + instance._checkRatio(); + } + + if (instance.get(CONSTRAIN) && !instance._checkRegion()) { + host.info = host.lastInfo; + } + }, + + _handleResizeStartEvent: function(event) { + var instance = this, + constrain = instance.get(CONSTRAIN), + host = instance.get(HOST); + + instance.constrainSurrounding = host._getBoxSurroundingInfo(constrain); + } +}); + +Y.namespace('Plugin'); +Y.Plugin.ResizeConstrained = ResizeConstrained; + + +}, '3.3.0' ,{requires:['resize-base', 'plugin'], skinnable:false}); + + +YUI.add('resize', function(Y){}, '3.3.0' ,{use:['resize-base', 'resize-proxy', 'resize-constrain']}); + diff --git a/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base-ie-min.js b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base-ie-min.js new file mode 100644 index 00000000..00de2df9 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base-ie-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("scrollview-base-ie",function(a){a.mix(a.ScrollView.prototype,{_fixIESelect:function(c,b){this._cbDoc=b.get("ownerDocument");this._nativeBody=a.Node.getDOMNode(a.one("body",this._cbDoc));b.on("mousedown",function(){this._selectstart=this._nativeBody.onselectstart;this._nativeBody.onselectstart=this._iePreventSelect;this._cbDoc.once("mouseup",this._ieRestoreSelect,this);},this);},_iePreventSelect:function(){return false;},_ieRestoreSelect:function(){this._nativeBody.onselectstart=this._selectstart;}},true);},"3.3.0",{requires:["scrollview-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base-ie.js b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base-ie.js new file mode 100644 index 00000000..677fb579 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base-ie.js @@ -0,0 +1,62 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('scrollview-base-ie', function(Y) { + +/** + * IE specific support for the scrollview-base module. + * + * @module scrollview-base-ie + */ + +Y.mix(Y.ScrollView.prototype, { + + /** + * Internal method to fix text selection in IE + * + * @method _fixIESelect + * @for ScrollView + * @private + * @param {Node} bb The bounding box + * @param {Node} cb The content box + */ + _fixIESelect : function(bb, cb) { + this._cbDoc = cb.get("ownerDocument"); + this._nativeBody = Y.Node.getDOMNode(Y.one("body", this._cbDoc)); + + cb.on("mousedown", function() { + this._selectstart = this._nativeBody.onselectstart; + this._nativeBody.onselectstart = this._iePreventSelect; + this._cbDoc.once("mouseup", this._ieRestoreSelect, this); + }, this); + }, + + /** + * Native onselectstart handle to prevent selection in IE + * + * @method _iePreventSelect + * @for ScrollView + * @private + */ + _iePreventSelect : function() { + return false; + }, + + /** + * Restores native onselectstart handle, backed up to prevent selection in IE + * + * @method _ieRestoreSelect + * @for ScrollView + * @private + */ + _ieRestoreSelect : function() { + this._nativeBody.onselectstart = this._selectstart; + } +}, true); + + +}, '3.3.0' ,{requires:['scrollview-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base-min.js b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base-min.js new file mode 100644 index 00000000..28926bbe --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("scrollview-base",function(b){var f=b.ClassNameManager.getClassName,t="scrollview",s={vertical:f(t,"vert"),horizontal:f(t,"horiz")},x="scrollEnd",i="flick",a=i,h="ui",l="left",o="top",e="px",m="scrollY",n="scrollX",c="bounce",r="x",q="y",u="boundingBox",k="contentBox",w="",p="0s",g=b.UA.ie,d=b.Transition.useNative,j=function(A,z,y){return Math.min(Math.max(A,z),y);};b.Node.DOM_EVENTS.DOMSubtreeModified=true;function v(){v.superclass.constructor.apply(this,arguments);}b.ScrollView=b.extend(v,b.Widget,{initializer:function(){var y=this;y._cb=y.get(k);y._bb=y.get(u);},_uiSizeCB:function(){},_onTransEnd:function(y){this.fire(x);},bindUI:function(){var z=this,y=z._cb,D=z._bb,C=z._afterScrollChange,B=z._afterDimChange,A=z.get(a);D.on("gesturemovestart",b.bind(z._onGestureMoveStart,z));if(g){z._fixIESelect(D,y);}if(d){y.on("DOMSubtreeModified",b.bind(z._uiDimensionsChange,z));}if(A){y.on("flick",b.bind(z._flick,z),A);}this.after({"scrollYChange":C,"scrollXChange":C,"heightChange":B,"widthChange":B});},syncUI:function(){this._uiDimensionsChange();this.scrollTo(this.get(n),this.get(m));},scrollTo:function(J,I,D,G){var C=this._cb,E=(J!==null),B=(I!==null),A=(E)?J*-1:0,z=(B)?I*-1:0,F,H=v._TRANSITION,K=this._transEndCB;D=D||0;G=G||v.EASING;if(E){this.set(n,J,{src:h});}if(B){this.set(m,I,{src:h});}if(d){C.setStyle(H.DURATION,p).setStyle(H.PROPERTY,w);}if(D!==0){F={easing:G,duration:D/1000};if(d){F.transform="translate3D("+A+"px,"+z+"px, 0px)";}else{if(E){F.left=A+e;}if(B){F.top=z+e;}}if(!K){K=this._transEndCB=b.bind(this._onTransEnd,this);}C.transition(F,K);}else{if(d){C.setStyle("transform","translate3D("+A+"px,"+z+"px, 0px)");}else{if(E){C.setStyle(l,A+e);}if(B){C.setStyle(o,z+e);}}}},_prevent:{start:false,move:true,end:false},_onGestureMoveStart:function(z){var y=this,A=y._bb;if(y._prevent.start){z.preventDefault();}y._killTimer();y._hm=A.on("gesturemove",b.bind(y._onGestureMove,y));y._hme=A.on("gesturemoveend",b.bind(y._onGestureMoveEnd,y));y._startY=z.clientY+y.get(m);y._startX=z.clientX+y.get(n);y._startClientY=y._endClientY=z.clientY;y._startClientX=y._endClientX=z.clientX;y._isDragging=false;y._flicking=false;y._snapToEdge=false;},_onGestureMove:function(z){var y=this;if(y._prevent.move){z.preventDefault();}y._isDragging=true;y._endClientY=z.clientY;y._endClientX=z.clientX;if(y._scrollsVertical){y.set(m,-(z.clientY-y._startY));}if(y._scrollsHorizontal){y.set(n,-(z.clientX-y._startX));}},_onGestureMoveEnd:function(H){if(this._prevent.end){H.preventDefault();}var O=this,D=O._minScrollY,z=O._maxScrollY,E=O._minScrollX,B=O._maxScrollX,G=O._scrollsVertical,P=O._scrollsHorizontal,C=G?O._startClientY:O._startClientX,M=G?O._endClientY:O._endClientX,A=C-M,F=Math.abs(A),J=O._bb,N,L,K,I;O._hm.detach();O._hme.detach();O._scrolledHalfway=O._snapToEdge=O._isDragging=false;O.lastScrolledAmt=A;if((P&&F>J.get("offsetWidth")/2)||(G&&F>J.get("offsetHeight")/2)){O._scrolledHalfway=true;O._scrolledForward=A>0;}if(G){I=O.get(m);L=j(I,D,z);}if(P){K=O.get(n);N=j(K,E,B);}if(N!==K||L!==I){this._snapToEdge=true;if(G){O.set(m,L);}if(P){O.set(n,N);}}if(O._snapToEdge){return;}O.fire(x,{onGestureMoveEnd:true});return;},_afterScrollChange:function(z){var y=z.duration,B=z.easing,A=z.newVal;if(z.src!==h){if(z.attrName==n){this._uiScrollTo(A,null,y,B);}else{this._uiScrollTo(null,A,y,B);}}},_uiScrollTo:function(z,C,A,B){A=A||this._snapToEdge?400:0;B=B||this._snapToEdge?v.SNAP_EASING:null;this.scrollTo(z,C,A,B);},_afterDimChange:function(){this._uiDimensionsChange();},_uiDimensionsChange:function(){var z=this,E=z._bb,D=v.CLASS_NAMES,y=z.get("height"),C=z.get("width"),B=E.get("scrollHeight"),A=E.get("scrollWidth");if(y&&B>y){z._scrollsVertical=true;z._maxScrollY=B-y;z._minScrollY=0;z._scrollHeight=B;E.addClass(D.vertical);}if(C&&A>C){z._scrollsHorizontal=true;z._maxScrollX=A-C;z._minScrollX=0;z._scrollWidth=A;E.addClass(D.horizontal);}},_flick:function(A){var z=A.flick,y=this;y._currentVelocity=z.velocity;y._flicking=true;y._cDecel=y.get("deceleration");y._cBounce=y.get("bounce");y._pastYEdge=false;y._pastXEdge=false;y._flickFrame();y.fire(i);},_flickFrame:function(){var H=this,K,z,C,y,A,D,I=H._scrollsVertical,F=H._scrollsHorizontal,E=H._cDecel,J=H._cBounce,G=H._currentVelocity,B=v.FRAME_STEP;if(I){z=H._maxScrollY;C=H._minScrollY;K=H.get(m)-(G*B);}if(F){A=H._maxScrollX;D=H._minScrollX;y=H.get(n)-(G*B);}G=H._currentVelocity=(G*E);if(Math.abs(G).toFixed(4)<=0.015){H._flicking=false;H._killTimer(!(H._pastYEdge||H._pastXEdge));if(I){if(Kz){H._snapToEdge=true;H.set(m,z);}}}if(F){if(yA){H._snapToEdge=true;H.set(n,A);}}}return;}if(I){if(Kz){H._pastYEdge=true;H._currentVelocity*=J;}H.set(m,K);}if(F){if(yA){H._pastXEdge=true;H._currentVelocity*=J;}H.set(n,y);}if(!H._flickTimer){H._flickTimer=b.later(B,H,"_flickFrame",null,true);}},_killTimer:function(z){var y=this;if(y._flickTimer){y._flickTimer.cancel();y._flickTimer=null;}if(z){y.fire(x);}},_setScroll:function(E,D){var A=this._cachedBounce||this.get(c),z=v.BOUNCE_RANGE,C=(D==r)?this._maxScrollX:this._maxScrollY,B=A?-z:0,y=A?C+z:C;if(!A||!this._isDragging){if(Ey){E=y;}}}return E;},_setScrollX:function(y){return this._setScroll(y,r);},_setScrollY:function(y){return this._setScroll(y,q);}},{NAME:"scrollview",ATTRS:{scrollY:{value:0,setter:"_setScrollY"},scrollX:{value:0,setter:"_setScrollX"},deceleration:{value:0.93},bounce:{value:0.1},flick:{value:{minDistance:10,minVelocity:0.3}}},CLASS_NAMES:s,UI_SRC:h,BOUNCE_RANGE:150,FRAME_STEP:30,EASING:"cubic-bezier(0, 0.1, 0, 1.0)",SNAP_EASING:"ease-out",_TRANSITION:{DURATION:"WebkitTransitionDuration",PROPERTY:"WebkitTransitionProperty"}});},"3.3.0",{skinnable:true,requires:["widget","event-gestures","transition"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base.js b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base.js new file mode 100644 index 00000000..64ac82a4 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-base.js @@ -0,0 +1,955 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('scrollview-base', function(Y) { + +/** + * The scrollview-base module provides a basic ScrollView Widget, without scrollbar indicators + * + * @module scrollview-base + */ + +var getClassName = Y.ClassNameManager.getClassName, + SCROLLVIEW = 'scrollview', + CLASS_NAMES = { + vertical: getClassName(SCROLLVIEW, 'vert'), + horizontal: getClassName(SCROLLVIEW, 'horiz') + }, + EV_SCROLL_END = 'scrollEnd', + EV_SCROLL_FLICK = 'flick', + + FLICK = EV_SCROLL_FLICK, + + UI = 'ui', + + LEFT = "left", + TOP = "top", + + PX = "px", + + SCROLL_Y = "scrollY", + SCROLL_X = "scrollX", + BOUNCE = "bounce", + + DIM_X = "x", + DIM_Y = "y", + + BOUNDING_BOX = "boundingBox", + CONTENT_BOX = "contentBox", + + EMPTY = "", + ZERO = "0s", + + IE = Y.UA.ie, + + NATIVE_TRANSITIONS = Y.Transition.useNative, + + _constrain = function (val, min, max) { + return Math.min(Math.max(val, min), max); + }; + +Y.Node.DOM_EVENTS.DOMSubtreeModified = true; + +/** + * ScrollView provides a scrollable widget, supporting flick gestures, across both touch and mouse based devices. + * + * @class ScrollView + * @namespace + * @param config {Object} Object literal with initial attribute values + * @extends Widget + * @constructor + */ +function ScrollView() { + ScrollView.superclass.constructor.apply(this, arguments); +} + +Y.ScrollView = Y.extend(ScrollView, Y.Widget, { + + // Y.ScrollView prototype + + /** + * Designated initializer + * + * @method initializer + */ + initializer: function() { + /** + * Notification event fired at the end of a scroll transition + * + * @event scrollEnd + * @param e {EventFacade} The default event facade. + */ + + /** + * Notification event fired at the end of a flick gesture (the flick animation may still be in progress) + * + * @event flick + * @param e {EventFacade} The default event facade. + */ + var sv = this; + + // Cache - they're write once, and not going to change + sv._cb = sv.get(CONTENT_BOX); + sv._bb = sv.get(BOUNDING_BOX); + }, + + /** + * Override the contentBox sizing method, since the contentBox height + * should not be that of the boundingBox. + * + * @method _uiSizeCB + * @protected + */ + _uiSizeCB: function() {}, + + /** + * Content box transition callback + * + * @method _onTransEnd + * @param {Event.Facade} e The event facade + * @private + */ + _onTransEnd: function(e) { + this.fire(EV_SCROLL_END); + }, + + /** + * bindUI implementation + * + * Hooks up events for the widget + * @method bindUI + */ + bindUI: function() { + + var sv = this, // kweight + cb = sv._cb, + bb = sv._bb, + scrollChangeHandler = sv._afterScrollChange, + dimChangeHandler = sv._afterDimChange, + flick = sv.get(FLICK); + + bb.on('gesturemovestart', Y.bind(sv._onGestureMoveStart, sv)); + + // IE SELECT HACK. See if we can do this non-natively and in the gesture for a future release. + if (IE) { + sv._fixIESelect(bb, cb); + } + + // TODO: Fires way to often when using non-native transitions, due to property change + if (NATIVE_TRANSITIONS) { + cb.on('DOMSubtreeModified', Y.bind(sv._uiDimensionsChange, sv)); + } + + if (flick) { + cb.on("flick", Y.bind(sv._flick, sv), flick); + } + + this.after({ + 'scrollYChange' : scrollChangeHandler, + 'scrollXChange' : scrollChangeHandler, + 'heightChange' : dimChangeHandler, + 'widthChange' : dimChangeHandler + }); + }, + + /** + * syncUI implementation + * + * Update the scroll position, based on the current value of scrollY + * @method bindUI + */ + syncUI: function() { + this._uiDimensionsChange(); + this.scrollTo(this.get(SCROLL_X), this.get(SCROLL_Y)); + }, + + /** + * Scroll the element to a given y coordinate + * + * @method scrollTo + * @param x {Number} The x-position to scroll to + * @param y {Number} The y-position to scroll to + * @param duration {Number} Duration, in ms, of the scroll animation (default is 0) + * @param easing {String} An easing equation if duration is set + */ + scrollTo: function(x, y, duration, easing) { + var cb = this._cb, + xSet = (x !== null), + ySet = (y !== null), + xMove = (xSet) ? x * -1 : 0, + yMove = (ySet) ? y * -1 : 0, + transition, + TRANS = ScrollView._TRANSITION, + callback = this._transEndCB; + + duration = duration || 0; + easing = easing || ScrollView.EASING; + + if (xSet) { + this.set(SCROLL_X, x, { src: UI }); + } + + if (ySet) { + this.set(SCROLL_Y, y, { src: UI }); + } + + if (NATIVE_TRANSITIONS) { + // ANDROID WORKAROUND - try and stop existing transition, before kicking off new one. + cb.setStyle(TRANS.DURATION, ZERO).setStyle(TRANS.PROPERTY, EMPTY); + } + + if (duration !== 0) { + + transition = { + easing : easing, + duration : duration/1000 + }; + + if (NATIVE_TRANSITIONS) { + transition.transform = 'translate3D('+ xMove +'px,'+ yMove +'px, 0px)'; + } else { + if (xSet) { transition.left = xMove + PX; } + if (ySet) { transition.top = yMove + PX; } + } + + + if (!callback) { + callback = this._transEndCB = Y.bind(this._onTransEnd, this); + } + + cb.transition(transition, callback); + + } else { + if (NATIVE_TRANSITIONS) { + cb.setStyle('transform', 'translate3D('+ xMove +'px,'+ yMove +'px, 0px)'); + } else { + if (xSet) { cb.setStyle(LEFT, xMove + PX); } + if (ySet) { cb.setStyle(TOP, yMove + PX); } + } + } + }, + + /** + *

          Used to control whether or not ScrollView's internal + * gesturemovestart, gesturemove and gesturemoveend + * event listeners should preventDefault. The value is an + * object, with "start", "move" and "end" properties used to + * specify which events should preventDefault and which shouldn't:

          + * + *
          +     * {
          +     *    start : false,
          +     *    move : true,
          +     *    end : false
          +     * }
          +     * 
          + * + *

          The default values are set up in order to prevent panning, + * on touch devices, while allowing click listeners on elements inside + * the ScrollView to be notified as expected.

          + * + * @property _prevent + * @type Object + * @protected + */ + _prevent : { + start : false, + move : true, + end : false + }, + + /** + * gesturemovestart event handler + * + * @method _onGestureMoveStart + * @param e {Event.Facade} The gesturemovestart event facade + * @private + */ + _onGestureMoveStart: function(e) { + + var sv = this, + bb = sv._bb; + + if (sv._prevent.start) { + e.preventDefault(); + } + + sv._killTimer(); + + sv._hm = bb.on('gesturemove', Y.bind(sv._onGestureMove, sv)); + sv._hme = bb.on('gesturemoveend', Y.bind(sv._onGestureMoveEnd, sv)); + + sv._startY = e.clientY + sv.get(SCROLL_Y); + sv._startX = e.clientX + sv.get(SCROLL_X); + sv._startClientY = sv._endClientY = e.clientY; + sv._startClientX = sv._endClientX = e.clientX; + + /** + * Internal state, defines whether or not the scrollview is currently being dragged + * + * @property _isDragging + * @type boolean + * @protected + */ + sv._isDragging = false; + + /** + * Internal state, defines whether or not the scrollview is currently animating a flick + * + * @property _flicking + * @type boolean + * @protected + */ + sv._flicking = false; + + /** + * Internal state, defines whether or not the scrollview needs to snap to a boundary edge + * + * @property _snapToEdge + * @type boolean + * @protected + */ + sv._snapToEdge = false; + }, + + /** + * gesturemove event handler + * + * @method _onGestureMove + * @param e {Event.Facade} The gesturemove event facade + * @private + */ + _onGestureMove: function(e) { + + var sv = this; + + if (sv._prevent.move) { + e.preventDefault(); + } + + sv._isDragging = true; + sv._endClientY = e.clientY; + sv._endClientX = e.clientX; + + if (sv._scrollsVertical) { + sv.set(SCROLL_Y, -(e.clientY - sv._startY)); + } + + if(sv._scrollsHorizontal) { + sv.set(SCROLL_X, -(e.clientX - sv._startX)); + } + }, + + /** + * gestureend event handler + * + * @method _onGestureMoveEnd + * @param e {Event.Facade} The gesturemoveend event facade + * @private + */ + _onGestureMoveEnd: function(e) { + + if (this._prevent.end) { + e.preventDefault(); + } + + var sv = this, // kweight + minY = sv._minScrollY, + maxY = sv._maxScrollY, + minX = sv._minScrollX, + maxX = sv._maxScrollX, + vert = sv._scrollsVertical, + horiz = sv._scrollsHorizontal, + startPoint = vert ? sv._startClientY : sv._startClientX, + endPoint = vert ? sv._endClientY : sv._endClientX, + distance = startPoint - endPoint, + absDistance = Math.abs(distance), + bb = sv._bb, + x, y, xOrig, yOrig; + + sv._hm.detach(); + sv._hme.detach(); + + /** + * Internal state, defines whether or not the scrollview has been scrolled half it's width/height + * + * @property _scrolledHalfway + * @type boolean + * @protected + */ + sv._scrolledHalfway = sv._snapToEdge = sv._isDragging = false; + + /** + * Contains the distance (postive or negative) in pixels by which the scrollview was last scrolled. This is useful when + * setting up click listeners on the scrollview content, which on mouse based devices are always fired, even after a + * drag/flick. + * + *

          Touch based devices don't currently fire a click event, if the finger has been moved (beyond a threshold) so this check isn't required, + * if working in a purely touch based environment

          + * + * @property lastScrolledAmt + * @type Number + * @public + */ + sv.lastScrolledAmt = distance; + + // Check for halfway + if((horiz && absDistance > bb.get('offsetWidth')/2) || (vert && absDistance > bb.get('offsetHeight')/2)) { + sv._scrolledHalfway = true; + + /** + * Internal state, defines whether or not the scrollview has been scrolled in the forward (distance > 0), or backward (distance < 0) direction + * + * @property _scrolledForward + * @type boolean + * @protected + */ + sv._scrolledForward = distance > 0; + } + + // Check for min/max + if (vert) { + yOrig = sv.get(SCROLL_Y); + y = _constrain(yOrig, minY, maxY); + } + + if (horiz) { + xOrig = sv.get(SCROLL_X); + x = _constrain(xOrig, minX, maxX); + } + + if (x !== xOrig || y !== yOrig) { + this._snapToEdge = true; + if (vert) { + sv.set(SCROLL_Y, y); + } + if (horiz) { + sv.set(SCROLL_X, x); + } + } + + + if(sv._snapToEdge) { + return; + } + + sv.fire(EV_SCROLL_END, { + onGestureMoveEnd: true + }); + + return; + }, + + /** + * After listener for changes to the scrollX or scrollY attribute + * + * @method _afterScrollChange + * @param e {Event.Facade} The event facade + * @protected + */ + _afterScrollChange : function(e) { + var duration = e.duration, + easing = e.easing, + val = e.newVal; + + if(e.src !== UI) { + if (e.attrName == SCROLL_X) { + this._uiScrollTo(val, null, duration, easing); + } else { + this._uiScrollTo(null, val, duration, easing); + } + } + }, + + /** + * Used to move the ScrollView content + * + * @method _uiScrollTo + * @param x {Number} + * @param y {Number} + * @param duration {Number} + * @param easing {String} + * @protected + * + */ + _uiScrollTo : function(x, y, duration, easing) { + + // TODO: This doesn't seem right. This is not UI logic. + duration = duration || this._snapToEdge ? 400 : 0; + easing = easing || this._snapToEdge ? ScrollView.SNAP_EASING : null; + + this.scrollTo(x, y, duration, easing); + }, + + /** + * After listener for the height or width attribute + * + * @method _afterDimChange + * @param e {Event.Facade} The event facade + * @protected + */ + _afterDimChange: function() { + this._uiDimensionsChange(); + }, + + /** + * This method gets invoked whenever the height or width attributes change, + * allowing us to determine which scrolling axes need to be enabled. + * + * @method _uiDimensionsChange + * @protected + */ + _uiDimensionsChange: function() { + + var sv = this, + bb = sv._bb, + + CLASS_NAMES = ScrollView.CLASS_NAMES, + + height = sv.get('height'), + width = sv.get('width'), + + // Use bb instead of cb. cb doesn't gives us the right results + // in FF (due to overflow:hidden) + scrollHeight = bb.get('scrollHeight'), + scrollWidth = bb.get('scrollWidth'); + + if (height && scrollHeight > height) { + sv._scrollsVertical = true; + sv._maxScrollY = scrollHeight - height; + sv._minScrollY = 0; + sv._scrollHeight = scrollHeight; + bb.addClass(CLASS_NAMES.vertical); + } + + if (width && scrollWidth > width) { + sv._scrollsHorizontal = true; + sv._maxScrollX = scrollWidth - width; + sv._minScrollX = 0; + sv._scrollWidth = scrollWidth; + bb.addClass(CLASS_NAMES.horizontal); + } + + /** + * Internal state, defines whether or not the scrollview can scroll vertically + * + * @property _scrollsVertical + * @type boolean + * @protected + */ + + /** + * Internal state, defines the maximum amount that the scrollview can be scrolled along the Y axis + * + * @property _maxScrollY + * @type number + * @protected + */ + + /** + * Internal state, defines the minimum amount that the scrollview can be scrolled along the Y axis + * + * @property _minScrollY + * @type number + * @protected + */ + + /** + * Internal state, cached scrollHeight, for performance + * + * @property _scrollHeight + * @type number + * @protected + */ + + /** + * Internal state, defines whether or not the scrollview can scroll horizontally + * + * @property _scrollsHorizontal + * @type boolean + * @protected + */ + + /** + * Internal state, defines the maximum amount that the scrollview can be scrolled along the X axis + * + * @property _maxScrollX + * @type number + * @protected + */ + + /** + * Internal state, defines the minimum amount that the scrollview can be scrolled along the X axis + * + * @property _minScrollX + * @type number + * @protected + */ + + /** + * Internal state, cached scrollWidth, for performance + * + * @property _scrollWidth + * @type number + * @protected + */ + }, + + /** + * Execute a flick at the end of a scroll action + * + * @method _flick + * @param distance {Number} The distance (in px) the user scrolled before the flick + * @param time {Number} The number of ms the scroll event lasted before the flick + * @protected + */ + _flick: function(e) { + var flick = e.flick, + sv = this; + + /** + * Internal state, currently calculated velocity from the flick + * + * @property _currentVelocity + * @type number + * @protected + */ + sv._currentVelocity = flick.velocity; + sv._flicking = true; + + sv._cDecel = sv.get('deceleration'); + sv._cBounce = sv.get('bounce'); + + sv._pastYEdge = false; + sv._pastXEdge = false; + + sv._flickFrame(); + + sv.fire(EV_SCROLL_FLICK); + }, + + /** + * Execute a single frame in the flick animation + * + * @method _flickFrame + * @protected + */ + _flickFrame: function() { + var sv = this, + newY, + maxY, + minY, + newX, + maxX, + minX, + scrollsVertical = sv._scrollsVertical, + scrollsHorizontal = sv._scrollsHorizontal, + deceleration = sv._cDecel, + bounce = sv._cBounce, + vel = sv._currentVelocity, + step = ScrollView.FRAME_STEP; + + if (scrollsVertical) { + maxY = sv._maxScrollY; + minY = sv._minScrollY; + newY = sv.get(SCROLL_Y) - (vel * step); + } + + if (scrollsHorizontal) { + maxX = sv._maxScrollX; + minX = sv._minScrollX; + newX = sv.get(SCROLL_X) - (vel * step); + } + + vel = sv._currentVelocity = (vel * deceleration); + + if(Math.abs(vel).toFixed(4) <= 0.015) { + sv._flicking = false; + sv._killTimer(!(sv._pastYEdge || sv._pastXEdge)); + + if(scrollsVertical) { + if(newY < minY) { + sv._snapToEdge = true; + sv.set(SCROLL_Y, minY); + } else if(newY > maxY) { + sv._snapToEdge = true; + sv.set(SCROLL_Y, maxY); + } + } + + if(scrollsHorizontal) { + if(newX < minX) { + sv._snapToEdge = true; + sv.set(SCROLL_X, minX); + } else if(newX > maxX) { + sv._snapToEdge = true; + sv.set(SCROLL_X, maxX); + } + } + + return; + } + + if (scrollsVertical) { + if (newY < minY || newY > maxY) { + sv._pastYEdge = true; + sv._currentVelocity *= bounce; + } + + sv.set(SCROLL_Y, newY); + } + + if (scrollsHorizontal) { + if (newX < minX || newX > maxX) { + sv._pastXEdge = true; + sv._currentVelocity *= bounce; + } + + sv.set(SCROLL_X, newX); + } + + if (!sv._flickTimer) { + sv._flickTimer = Y.later(step, sv, '_flickFrame', null, true); + } + }, + + /** + * Stop the animation timer + * + * @method _killTimer + * @param fireEvent {Boolean} If true, fire the scrollEnd event + * @protected + */ + _killTimer: function(fireEvent) { + var sv = this; + if(sv._flickTimer) { + sv._flickTimer.cancel(); + sv._flickTimer = null; + } + + if(fireEvent) { + sv.fire(EV_SCROLL_END); + } + }, + + /** + * The scrollX, scrollY setter implementation + * + * @method _setScroll + * @private + * @param {Number} val + * @param {String} dim + * + * @return {Number} The constrained value, if it exceeds min/max range + */ + _setScroll : function(val, dim) { + var bouncing = this._cachedBounce || this.get(BOUNCE), + range = ScrollView.BOUNCE_RANGE, + + maxScroll = (dim == DIM_X) ? this._maxScrollX : this._maxScrollY, + + min = bouncing ? -range : 0, + max = bouncing ? maxScroll + range : maxScroll; + + if(!bouncing || !this._isDragging) { + if(val < min) { + val = min; + } else if(val > max) { + val = max; + } + } + + return val; + }, + + /** + * Setter for the scrollX attribute + * + * @method _setScrollX + * @param val {Number} The new scrollX value + * @return {Number} The normalized value + * @protected + */ + _setScrollX: function(val) { + return this._setScroll(val, DIM_X); + }, + + /** + * Setter for the scrollY ATTR + * + * @method _setScrollY + * @param val {Number} The new scrollY value + * @return {Number} The normalized value + * @protected + */ + _setScrollY: function(val) { + return this._setScroll(val, DIM_Y); + } + +}, { + + // Y.ScrollView static properties + + /** + * The identity of the widget. + * + * @property ScrollView.NAME + * @type String + * @default 'scrollview' + * @readOnly + * @protected + * @static + */ + NAME: 'scrollview', + + /** + * Static property used to define the default attribute configuration of + * the Widget. + * + * @property ScrollView.ATTRS + * @type {Object} + * @protected + * @static + */ + ATTRS: { + + /** + * The scroll position in the y-axis + * + * @attribute scrollY + * @type Number + * @default 0 + */ + scrollY: { + value: 0, + setter: '_setScrollY' + }, + + /** + * The scroll position in the x-axis + * + * @attribute scrollX + * @type Number + * @default 0 + */ + scrollX: { + value: 0, + setter: '_setScrollX' + }, + + /** + * Drag coefficent for inertial scrolling. The closer to 1 this + * value is, the less friction during scrolling. + * + * @attribute deceleration + * @default 0.93 + */ + deceleration: { + value: 0.93 + }, + + /** + * Drag coefficient for intertial scrolling at the upper + * and lower boundaries of the scrollview. Set to 0 to + * disable "rubber-banding". + * + * @attribute bounce + * @type Number + * @default 0.1 + */ + bounce: { + value: 0.1 + }, + + /** + * The minimum distance and/or velocity which define a flick + * + * @attribute flick + * @type Object + * @default Object with properties minDistance = 10, minVelocity = 0.3. + */ + flick: { + value: { + minDistance: 10, + minVelocity: 0.3 + } + } + }, + + /** + * List of class names used in the scrollview's DOM + * + * @property ScrollView.CLASS_NAMES + * @type Object + * @static + */ + CLASS_NAMES: CLASS_NAMES, + + /** + * Flag used to source property changes initiated from the DOM + * + * @property ScrollView.UI_SRC + * @type String + * @static + * @default "ui" + */ + UI_SRC: UI, + + /** + * The default bounce distance in pixels + * + * @property ScrollView.BOUNCE_RANGE + * @type Number + * @static + * @default 150 + */ + BOUNCE_RANGE : 150, + + /** + * The interval used when animating the flick + * + * @property ScrollView.FRAME_STEP + * @type Number + * @static + * @default 30 + */ + FRAME_STEP : 30, + + /** + * The default easing used when animating the flick + * + * @property ScrollView.EASING + * @type String + * @static + * @default 'cubic-bezier(0, 0.1, 0, 1.0)' + */ + EASING : 'cubic-bezier(0, 0.1, 0, 1.0)', + + /** + * The default easing to use when animatiing the bounce snap back. + * + * @property ScrollView.SNAP_EASING + * @type String + * @static + * @default 'ease-out' + */ + SNAP_EASING : 'ease-out', + + /** + * Style property name to use to set transition property. Currently, Webkit specific (WebkitTransitionProperty) + * + * @property ScrollView._TRANSITION.PROPERTY + * @private + */ + _TRANSITION : { + DURATION : "WebkitTransitionDuration", + PROPERTY : "WebkitTransitionProperty" + } +}); + + +}, '3.3.0' ,{skinnable:true, requires:['widget', 'event-gestures', 'transition']}); diff --git a/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-min.js b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-min.js new file mode 100644 index 00000000..1828c329 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("scrollview",function(a){a.Base.plug(a.ScrollView,a.Plugin.ScrollViewScrollbars);},"3.3.0",{requires:["scrollview-base","scrollview-scrollbars"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-paginator-min.js b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-paginator-min.js new file mode 100644 index 00000000..f6e8625f --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-paginator-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("scrollview-paginator",function(h){var g=h.ScrollView.UI_SRC,d="index",a="scrollX",f="total",e="boundingBox",c="contentBox";function b(){b.superclass.constructor.apply(this,arguments);}b.NAME="pluginScrollViewPaginator";b.NS="pages";b.ATTRS={selector:{value:null},index:{value:0},total:{value:0}};h.extend(b,h.Plugin.Base,{initializer:function(){var i,j=this;i=j._host=j.get("host");j.beforeHostMethod("_flickFrame",j._flickFrame);j.afterHostMethod("_uiDimensionsChange",j._calcOffsets);j.afterHostEvent("scrollEnd",j._scrollEnded);j.afterHostEvent("render",j._afterRender);j.after("indexChange",j._afterIndexChange);},_calcOffsets:function(){var l=this._host,j=l.get(c),n=l.get(e),m=this.get("selector"),i,k;i=m?j.all(m):j.get("children");this.set(f,i.size());this._pgOff=k=i.get("offsetLeft");k.push(l._scrollWidth-n.get("offsetWidth"));},_flickFrame:function(){var l=this._host,k=l._currentVelocity,m=k<0,i=this.get(d),j=this.get(f);if(k){if(m&&i0){this.set(d,i-1);}}}return this._prevent;},_afterRender:function(j){var i=this._host;i.get("boundingBox").addClass(i.getClassName("paged"));},_scrollEnded:function(l){var k=this._host,i=this.get(d),j=this.get(f);if(l.onGestureMoveEnd&&!k._flicking){if(k._scrolledHalfway){if(k._scrolledForward&&i0){this.set(d,i-1);}else{this.snapToCurrent();}}}else{this.snapToCurrent();}}k._flicking=false;},_afterIndexChange:function(i){if(i.src!==g){this._uiIndex(i.newVal);}},_uiIndex:function(i){this.scrollTo(i,350,"ease-out");},next:function(){var i=this.get(d);if(i0){this.set(d,i-1);}},scrollTo:function(j,l,m){var k=this._host,i=k.get(a);if(k._scrollsHorizontal){i=this._pgOff[j];k.set(a,i,{duration:l,easing:m});}},snapToCurrent:function(){var i=this._host;i._killTimer();i.set(a,this._pgOff[this.get(d)],{duration:300,easing:"ease-out"});},_prevent:new h.Do.Prevent()});h.namespace("Plugin").ScrollViewPaginator=b;},"3.3.0",{requires:["plugin"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-paginator.js b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-paginator.js new file mode 100644 index 00000000..51738c0c --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-paginator.js @@ -0,0 +1,303 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('scrollview-paginator', function(Y) { + +/** + * Provides a plugin, which adds pagination support to ScrollView instances + * + * @module scrollview-paginator + */ + +var UI = Y.ScrollView.UI_SRC, + INDEX = "index", + SCROLL_X = "scrollX", + TOTAL = "total", + BOUNDING_BOX = "boundingBox", + CONTENT_BOX = "contentBox"; + +/** + * Scrollview plugin that adds support for paging + * + * @class ScrollViewPaginator + * @namespace Plugin + * @extends Plugin.Base + * @constructor + */ +function PaginatorPlugin() { + PaginatorPlugin.superclass.constructor.apply(this, arguments); +} + +/** + * The identity of the plugin + * + * @property ScrollViewPaginator.NAME + * @type String + * @default 'paginatorPlugin' + * @static + */ +PaginatorPlugin.NAME = 'pluginScrollViewPaginator'; + +/** + * The namespace on which the plugin will reside + * + * @property ScrollViewPaginator.NS + * @type String + * @default 'pages' + * @static + */ +PaginatorPlugin.NS = 'pages'; + +/** + * The default attribute configuration for the plugin + * + * @property ScrollViewPaginator.ATTRS + * @type Object + * @static + */ +PaginatorPlugin.ATTRS = { + + /** + * CSS selector for a page inside the scrollview. The scrollview + * will snap to the closest page. + * + * @attribute selector + * @type {String} + */ + selector: { + value: null + }, + + /** + * The active page number for a paged scrollview + * + * @attribute index + * @type {Number} + * @default 0 + */ + index: { + value: 0 + }, + + /** + * The total number of pages + * + * @attribute total + * @type {Number} + * @default 0 + */ + total: { + value: 0 + } +}; + +Y.extend(PaginatorPlugin, Y.Plugin.Base, { + + /** + * Designated initializer + * + * @method initializer + */ + initializer: function() { + var host, + paginator = this; // kweight + + host = paginator._host = paginator.get('host'); + + paginator.beforeHostMethod('_flickFrame', paginator._flickFrame); + paginator.afterHostMethod('_uiDimensionsChange', paginator._calcOffsets); + paginator.afterHostEvent('scrollEnd', paginator._scrollEnded); + paginator.afterHostEvent('render', paginator._afterRender); + + paginator.after('indexChange', paginator._afterIndexChange); + }, + + /** + * Calculate the page boundary offsets + * + * @method _calcOffsets + * @protected + */ + _calcOffsets : function() { + var host = this._host, + cb = host.get(CONTENT_BOX), + bb = host.get(BOUNDING_BOX), + pageSelector = this.get("selector"), + pages, + offsets; + + // Pre-calculate min/max values for each page + pages = pageSelector ? cb.all(pageSelector) : cb.get("children"); + + this.set(TOTAL, pages.size()); + + this._pgOff = offsets = pages.get("offsetLeft"); + offsets.push(host._scrollWidth - bb.get("offsetWidth")); + }, + + /** + * Executed to respond to the flick event, by over-riding the default flickFrame animation. + * This is needed to determine if the next or prev page should be activated. + * + * @method _flickFrame + * @protected + */ + _flickFrame: function() { + var host = this._host, + velocity = host._currentVelocity, + + inc = velocity < 0, + + pageIndex = this.get(INDEX), + pageCount = this.get(TOTAL); + + if (velocity) { + + if (inc && pageIndex < pageCount-1) { + this.set(INDEX, pageIndex+1); + } else if (!inc && pageIndex > 0) { + this.set(INDEX, pageIndex-1); + } + } + + return this._prevent; + }, + + /** + * After host render handler + * + * @method _afterRender + * @protected + */ + _afterRender: function(e) { + var host = this._host; + host.get("boundingBox").addClass(host.getClassName("paged")); + }, + + /** + * scrollEnd handler detects if a page needs to change + * + * @method _scrollEnded + * @param {Event.Facade} + * @protected + */ + _scrollEnded: function(e) { + var host = this._host, + pageIndex = this.get(INDEX), + pageCount = this.get(TOTAL); + + + if(e.onGestureMoveEnd && !host._flicking) { + if(host._scrolledHalfway) { + if(host._scrolledForward && pageIndex < pageCount-1) { + this.set(INDEX, pageIndex+1); + } else if (pageIndex > 0) { + this.set(INDEX, pageIndex-1); + } else { + this.snapToCurrent(); + } + } else { + this.snapToCurrent(); + } + } + + host._flicking = false; + }, + + /** + * index attr change handler + * + * @method _afterIndexChange + * @protected + */ + _afterIndexChange: function(e) { + if(e.src !== UI) { + this._uiIndex(e.newVal); + } + }, + + /** + * Update the UI based on the current page index + * + * @method _uiIndex + * @protected + */ + _uiIndex: function(index) { + this.scrollTo(index, 350, 'ease-out'); + }, + + /** + * Scroll to the next page in the scrollview, with animation + * + * @method next + */ + next: function() { + var index = this.get(INDEX); + if(index < this.get(TOTAL)-1) { + this.set(INDEX, index+1); + } + }, + + /** + * Scroll to the previous page in the scrollview, with animation + * + * @method prev + */ + prev: function() { + var index = this.get(INDEX); + if(index > 0) { + this.set(INDEX, index-1); + } + }, + + /** + * Scroll to a given page in the scrollview, with animation. + * + * @method scrollTo + * @param index {Number} The index of the page to scroll to + * @param duration {Number} The number of ms the animation should last + * @param easing {String} The timing function to use in the animation + */ + scrollTo: function(index, duration, easing) { + var host = this._host, + x = host.get(SCROLL_X); + + if(host._scrollsHorizontal) { + x = this._pgOff[index]; + + host.set(SCROLL_X, x, { + duration: duration, + easing: easing + }); + } + }, + + /** + * Snaps the scrollview to the currently selected page + * + * @method snapToCurrent + */ + snapToCurrent: function() { + var host = this._host; + + host._killTimer(); + + + host.set(SCROLL_X, this._pgOff[this.get(INDEX)], { + duration: 300, + easing: 'ease-out' + }); + }, + + _prevent: new Y.Do.Prevent() + +}); + +Y.namespace('Plugin').ScrollViewPaginator = PaginatorPlugin; + + +}, '3.3.0' ,{requires:['plugin']}); diff --git a/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-scrollbars-min.js b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-scrollbars-min.js new file mode 100644 index 00000000..4eff6141 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-scrollbars-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("scrollview-scrollbars",function(a){var l=a.ClassNameManager.getClassName,i,j=a.Transition.useNative,z="scrollbar",C="scrollview",B="verticalNode",m="horizontalNode",u="childCache",w="top",q="left",g="width",v="height",p="scrollWidth",h="scrollHeight",A="_sbh",t="_sbv",n="transitionProperty",f="transform",e="translateX(",d="translateY(",y="scaleX(",x="scaleY(",s="scrollX",r="scrollY",k="px",c=")",o=k+c;function b(){b.superclass.constructor.apply(this,arguments);}b.CLASS_NAMES={showing:l(C,z,"showing"),scrollbar:l(C,z),scrollbarV:l(C,z,"vert"),scrollbarH:l(C,z,"horiz"),scrollbarVB:l(C,z,"vert","basic"),scrollbarHB:l(C,z,"horiz","basic"),child:l(C,"child"),first:l(C,"first"),middle:l(C,"middle"),last:l(C,"last")};i=b.CLASS_NAMES;b.NAME="pluginScrollViewScrollbars";b.NS="scrollbars";b.SCROLLBAR_TEMPLATE=["
          ",'','','',"
          "].join("");b.ATTRS={verticalNode:{setter:"_setNode",valueFn:"_defaultNode"},horizontalNode:{setter:"_setNode",valueFn:"_defaultNode"}};a.namespace("Plugin").ScrollViewScrollbars=a.extend(b,a.Plugin.Base,{initializer:function(){this._host=this.get("host");this.afterHostEvent("scrollEnd",this._hostScrollEnd);this.afterHostMethod("_uiScrollTo",this._update);this.afterHostMethod("_uiDimensionsChange",this._hostDimensionsChange);},_hostDimensionsChange:function(){var D=this._host;this._renderBar(this.get(B),D._scrollsVertical);this._renderBar(this.get(m),D._scrollsHorizontal);this._update();a.later(500,this,"flash",true);},_hostScrollEnd:function(D){if(!this._host._flicking){this.flash();}},_renderBar:function(E,G){var F=E.inDoc(),H=this._host._bb,D=E.getData("isHoriz")?i.scrollbarHB:i.scrollbarVB;if(G&&!F){H.append(E);E.toggleClass(D,this._basic);this._setChildCache(E);}else{if(!G&&F){E.remove();this._clearChildCache(E);}}},_setChildCache:function(G){var I=G.get("children"),E=I.item(0),H=I.item(1),F=I.item(2),D=G.getData("isHoriz")?"offsetWidth":"offsetHeight";G.setStyle(n,f);H.setStyle(n,f);F.setStyle(n,f);G.setData(u,{fc:E,lc:F,mc:H,fcSize:E&&E.get(D),lcSize:F&&F.get(D)});},_clearChildCache:function(D){D.clearData(u);},_updateBar:function(D,M,F,W){var K=this._host,G=this._basic,L=K._cb,R=0,N=1,E=D.getData(u),S=E.lc,V=E.mc,aa=E.fcSize,Z=E.lcSize,O,X,U,J,Y,Q,H,T,P,I;if(W){Q=g;H=q;T=A;P=K.get(Q);I=K._scrollWidth||L.get(p);J=e;Y=y;M=(M!==undefined)?M:K.get(s);}else{Q=v;H=w;T=t;P=K.get(Q);I=K._scrollHeight||L.get(h);J=d;Y=x;M=(M!==undefined)?M:K.get(r);}R=Math.floor(P*(P/I));N=Math.floor((M/(I-P))*(P-R));if(R>P){R=1;}if(N>(P-R)){R=R-(N-(P-R));}else{if(N<0){R=N+R;N=0;}}O=(R-(aa+Z));if(O<0){O=0;}if(O===0&&N!==0){N=P-(aa+Z)-1;}if(F!==0){U={duration:F};if(j){U.transform=J+N+o;}else{U[H]=N+k;}D.transition(U);}else{if(j){D.setStyle(f,J+N+o);}else{D.setStyle(H,N+k);}}if(this[T]!==O){this[T]=O;if(O>0){if(F!==0){U={duration:F};if(j){U.transform=Y+O+c;}else{U[Q]=O+k;}V.transition(U);}else{if(j){V.setStyle(f,Y+O+c);}else{V.setStyle(Q,O+k);}}if(!W||!G){X=R-Z;if(F!==0){U={duration:F};if(j){U.transform=J+X+o;}else{U[H]=X;}S.transition(U);}else{if(j){S.setStyle(f,J+X+o);}else{S.setStyle(H,X+k);}}}}}},_update:function(E,J,H,I){var G=this.get(B),D=this.get(m),F=this._host;H=(H||0)/1000;if(!this._showing){this.show();}if(F._scrollsVertical&&G){this._updateBar(G,J,H,false);}if(F._scrollsHorizontal&&D){this._updateBar(D,E,H,true);}},show:function(D){this._show(true,D);},hide:function(D){this._show(false,D);},_show:function(D,G){var F=this.get(B),H=this.get(m),I=(G)?0.6:0,E=(D)?1:0,J;this._showing=D;if(this._flashTimer){this._flashTimer.cancel();}J={duration:I,opacity:E};if(F){F.transition(J);}if(H){H.transition(J);}},flash:function(){var D=false,E=this._host;if(E._scrollsVertical&&(E._scrollHeight>E.get(v))){D=true;}if(E._scrollsHorizontal&&(E._scrollWidth>E.get(g))){D=true;}if(D){this.show(true);this._flashTimer=a.later(800,this,"hide",true);}},_setNode:function(E,D){var F=(D==m);E=a.one(E);if(E){E.addClass(i.scrollbar);E.addClass((F)?i.scrollbarH:i.scrollbarV);E.setData("isHoriz",F);}return E;},_defaultNode:function(){return a.Node.create(b.SCROLLBAR_TEMPLATE);},_basic:a.UA.ie&&a.UA.ie<=8});},"3.3.0",{skinnable:true,requires:["plugin"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-scrollbars.js b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-scrollbars.js new file mode 100644 index 00000000..78a38279 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview-scrollbars.js @@ -0,0 +1,570 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('scrollview-scrollbars', function(Y) { + +/** + * Provides a plugin, which adds support for a scroll indicator to ScrollView instances + * + * @module scrollview-scrollbars + */ + +var getClassName = Y.ClassNameManager.getClassName, + _classNames, + + NATIVE_TRANSITIONS = Y.Transition.useNative, + SCROLLBAR = 'scrollbar', + SCROLLVIEW = 'scrollview', + + VERTICAL_NODE = "verticalNode", + HORIZONTAL_NODE = "horizontalNode", + + CHILD_CACHE = "childCache", + + TOP = "top", + LEFT = "left", + WIDTH = "width", + HEIGHT = "height", + SCROLL_WIDTH = "scrollWidth", + SCROLL_HEIGHT = "scrollHeight", + + HORIZ_CACHE = "_sbh", + VERT_CACHE = "_sbv", + + TRANSITION_PROPERTY = "transitionProperty", + TRANSFORM = "transform", + + TRANSLATE_X = "translateX(", + TRANSLATE_Y = "translateY(", + + SCALE_X = "scaleX(", + SCALE_Y = "scaleY(", + + SCROLL_X = "scrollX", + SCROLL_Y = "scrollY", + + PX = "px", + CLOSE = ")", + PX_CLOSE = PX + CLOSE; + +/** + * ScrollView plugin that adds scroll indicators to ScrollView instances + * + * @class ScrollViewScrollbars + * @namespace Plugin + * @extends Plugin.Base + * @constructor + */ +function ScrollbarsPlugin() { + ScrollbarsPlugin.superclass.constructor.apply(this, arguments); +} + +ScrollbarsPlugin.CLASS_NAMES = { + showing: getClassName(SCROLLVIEW, SCROLLBAR, 'showing'), + scrollbar: getClassName(SCROLLVIEW, SCROLLBAR), + scrollbarV: getClassName(SCROLLVIEW, SCROLLBAR, 'vert'), + scrollbarH: getClassName(SCROLLVIEW, SCROLLBAR, 'horiz'), + scrollbarVB: getClassName(SCROLLVIEW, SCROLLBAR, 'vert', 'basic'), + scrollbarHB: getClassName(SCROLLVIEW, SCROLLBAR, 'horiz', 'basic'), + child: getClassName(SCROLLVIEW, 'child'), + first: getClassName(SCROLLVIEW, 'first'), + middle: getClassName(SCROLLVIEW, 'middle'), + last: getClassName(SCROLLVIEW, 'last') +}; + +_classNames = ScrollbarsPlugin.CLASS_NAMES; + +/** + * The identity of the plugin + * + * @property ScrollViewScrollbars.NAME + * @type String + * @default 'pluginScrollViewScrollbars' + * @static + */ +ScrollbarsPlugin.NAME = 'pluginScrollViewScrollbars'; + +/** + * The namespace on which the plugin will reside. + * + * @property ScrollViewScrollbars.NS + * @type String + * @default 'scrollbars' + * @static + */ +ScrollbarsPlugin.NS = 'scrollbars'; + +/** + * HTML template for the scrollbar + * + * @property ScrollViewScrollbars.SCROLLBAR_TEMPLATE + * @type Object + * @static + */ +ScrollbarsPlugin.SCROLLBAR_TEMPLATE = [ + '
          ', + '', + '', + '', + '
          ' +].join(''); + +/** + * The default attribute configuration for the plugin + * + * @property ScrollViewScrollbars.ATTRS + * @type Object + * @static + */ +ScrollbarsPlugin.ATTRS = { + + /** + * Vertical scrollbar node + * + * @attribute verticalNode + * @type Y.Node + */ + verticalNode: { + setter: '_setNode', + valueFn: '_defaultNode' + }, + + /** + * Horizontal scrollbar node + * + * @attribute horizontalNode + * @type Y.Node + */ + horizontalNode: { + setter: '_setNode', + valueFn: '_defaultNode' + } +}; + +Y.namespace("Plugin").ScrollViewScrollbars = Y.extend(ScrollbarsPlugin, Y.Plugin.Base, { + + /** + * Designated initializer + * + * @method initializer + */ + initializer: function() { + this._host = this.get("host"); + + this.afterHostEvent('scrollEnd', this._hostScrollEnd); + this.afterHostMethod('_uiScrollTo', this._update); + this.afterHostMethod('_uiDimensionsChange', this._hostDimensionsChange); + }, + + /** + * Set up the DOM nodes for the scrollbars. This method is invoked whenever the + * host's _uiDimensionsChange fires, giving us the opportunity to remove un-needed + * scrollbars, as well as add one if necessary. + * + * @method _hostDimensionsChange + * @protected + */ + _hostDimensionsChange: function() { + var host = this._host; + + this._renderBar(this.get(VERTICAL_NODE), host._scrollsVertical); + this._renderBar(this.get(HORIZONTAL_NODE), host._scrollsHorizontal); + + this._update(); + + Y.later(500, this, 'flash', true); + }, + + /** + * Handler for the scrollEnd event fired by the host. Default implementation flashes the scrollbar + * + * @method _hostScrollEnd + * @param {Event.Facade} e The event facade. + */ + _hostScrollEnd : function(e) { + if (!this._host._flicking) { + this.flash(); + } + }, + + /** + * Adds or removes a scrollbar node from the document. + * + * @method _renderBar + * @private + * @param {Node} bar The scrollbar node + * @param {boolean} add true, to add the node, false to remove it + */ + _renderBar: function(bar, add) { + var inDoc = bar.inDoc(), + bb = this._host._bb, + className = bar.getData("isHoriz") ? _classNames.scrollbarHB : _classNames.scrollbarVB; + + if (add && !inDoc) { + bb.append(bar); + bar.toggleClass(className, this._basic); + this._setChildCache(bar); + } else if(!add && inDoc) { + bar.remove(); + this._clearChildCache(bar); + } + }, + + /** + * Caches scrollbar child element information, + * to optimize _update implementation + * + * @method _setChildCache + * @private + * @param {Node} node + */ + _setChildCache : function(node) { + + var c = node.get("children"), + fc = c.item(0), + mc = c.item(1), + lc = c.item(2), + size = node.getData("isHoriz") ? "offsetWidth" : "offsetHeight"; + + node.setStyle(TRANSITION_PROPERTY, TRANSFORM); + mc.setStyle(TRANSITION_PROPERTY, TRANSFORM); + lc.setStyle(TRANSITION_PROPERTY, TRANSFORM); + + node.setData(CHILD_CACHE, { + fc : fc, + lc : lc, + mc : mc, + fcSize : fc && fc.get(size), + lcSize : lc && lc.get(size) + }); + }, + + /** + * Clears child cache + * + * @method _clearChildCache + * @private + * @param {Node} node + */ + _clearChildCache : function(node) { + node.clearData(CHILD_CACHE); + }, + + /** + * Utility method, to move/resize either vertical or horizontal scrollbars + * + * @method _updateBar + * @private + * + * @param {Node} scrollbar The scrollbar node. + * @param {Number} current The current scroll position. + * @param {Number} duration The transition duration. + * @param {boolean} horiz true if horizontal, false if vertical. + */ + _updateBar : function(scrollbar, current, duration, horiz) { + + var host = this._host, + basic = this._basic, + cb = host._cb, + + scrollbarSize = 0, + scrollbarPos = 1, + + childCache = scrollbar.getData(CHILD_CACHE), + lastChild = childCache.lc, + middleChild = childCache.mc, + firstChildSize = childCache.fcSize, + lastChildSize = childCache.lcSize, + middleChildSize, + lastChildPosition, + + transition, + translate, + scale, + + dim, + dimOffset, + dimCache, + widgetSize, + contentSize; + + if (horiz) { + dim = WIDTH; + dimOffset = LEFT; + dimCache = HORIZ_CACHE; + widgetSize = host.get(dim); + contentSize = host._scrollWidth || cb.get(SCROLL_WIDTH); + translate = TRANSLATE_X; + scale = SCALE_X; + current = (current !== undefined) ? current : host.get(SCROLL_X); + } else { + dim = HEIGHT; + dimOffset = TOP; + dimCache = VERT_CACHE; + widgetSize = host.get(dim); + contentSize = host._scrollHeight || cb.get(SCROLL_HEIGHT); + translate = TRANSLATE_Y; + scale = SCALE_Y; + current = (current !== undefined) ? current : host.get(SCROLL_Y); + } + + scrollbarSize = Math.floor(widgetSize * (widgetSize/contentSize)); + scrollbarPos = Math.floor((current/(contentSize - widgetSize)) * (widgetSize - scrollbarSize)); + + if (scrollbarSize > widgetSize) { + scrollbarSize = 1; + } + + if (scrollbarPos > (widgetSize - scrollbarSize)) { + scrollbarSize = scrollbarSize - (scrollbarPos - (widgetSize - scrollbarSize)); + } else if (scrollbarPos < 0) { + scrollbarSize = scrollbarPos + scrollbarSize; + scrollbarPos = 0; + } + + middleChildSize = (scrollbarSize - (firstChildSize + lastChildSize)); + + if (middleChildSize < 0) { + middleChildSize = 0; + } + + if (middleChildSize === 0 && scrollbarPos !== 0) { + scrollbarPos = widgetSize - (firstChildSize + lastChildSize) - 1; + } + + if (duration !== 0) { + // Position Scrollbar + transition = { + duration : duration + }; + + if (NATIVE_TRANSITIONS) { + transition.transform = translate + scrollbarPos + PX_CLOSE; + } else { + transition[dimOffset] = scrollbarPos + PX; + } + + scrollbar.transition(transition); + + } else { + if (NATIVE_TRANSITIONS) { + scrollbar.setStyle(TRANSFORM, translate + scrollbarPos + PX_CLOSE); + } else { + scrollbar.setStyle(dimOffset, scrollbarPos + PX); + } + } + + // Resize Scrollbar Middle Child + if (this[dimCache] !== middleChildSize) { + this[dimCache] = middleChildSize; + + if (middleChildSize > 0) { + + if (duration !== 0) { + transition = { + duration : duration + }; + + if(NATIVE_TRANSITIONS) { + transition.transform = scale + middleChildSize + CLOSE; + } else { + transition[dim] = middleChildSize + PX; + } + + middleChild.transition(transition); + } else { + if (NATIVE_TRANSITIONS) { + middleChild.setStyle(TRANSFORM, scale + middleChildSize + CLOSE); + } else { + middleChild.setStyle(dim, middleChildSize + PX); + } + } + + // Position Last Child + if (!horiz || !basic) { + + lastChildPosition = scrollbarSize - lastChildSize; + + if(duration !== 0) { + transition = { + duration : duration + }; + + if (NATIVE_TRANSITIONS) { + transition.transform = translate + lastChildPosition + PX_CLOSE; + } else { + transition[dimOffset] = lastChildPosition; + } + + lastChild.transition(transition); + } else { + if (NATIVE_TRANSITIONS) { + lastChild.setStyle(TRANSFORM, translate + lastChildPosition + PX_CLOSE); + } else { + lastChild.setStyle(dimOffset, lastChildPosition + PX); + } + } + } + } + } + }, + + /** + * AOP method, invoked after the host's _uiScrollTo method, + * to position and resize the scroll bars + * + * @method _update + * @param x {Number} The current scrollX value + * @param y {Number} The current scrollY value + * @param duration {Number} Number of ms of animation (optional) - used when snapping to bounds + * @param easing {String} Optional easing equation to use during the animation, if duration is set + * @protected + */ + _update: function(x, y, duration, easing) { + + var vNode = this.get(VERTICAL_NODE), + hNode = this.get(HORIZONTAL_NODE), + host = this._host; + + duration = (duration || 0)/1000; + + if (!this._showing) { + this.show(); + } + + if (host._scrollsVertical && vNode) { + this._updateBar(vNode, y, duration, false); + } + + if (host._scrollsHorizontal && hNode) { + this._updateBar(hNode, x, duration, true); + } + }, + + /** + * Show the scroll bar indicators + * + * @method show + * @param animated {Boolean} Whether or not to animate the showing + */ + show: function(animated) { + this._show(true, animated); + }, + + /** + * Hide the scroll bar indicators + * + * @method hide + * @param animated {Boolean} Whether or not to animate the hiding + */ + hide: function(animated) { + this._show(false, animated); + }, + + /** + * Internal hide/show implementation utility method + * + * @method _show + * @param {boolean} show Whether to show or hide the scrollbar + * @param {bolean} animated Whether or not to animate while showing/hide + * @protected + */ + _show : function(show, animated) { + + var verticalNode = this.get(VERTICAL_NODE), + horizontalNode = this.get(HORIZONTAL_NODE), + + duration = (animated) ? 0.6 : 0, + opacity = (show) ? 1 : 0, + + transition; + + this._showing = show; + + if (this._flashTimer) { + this._flashTimer.cancel(); + } + + transition = { + duration : duration, + opacity : opacity + }; + + if (verticalNode) { + verticalNode.transition(transition); + } + + if (horizontalNode) { + horizontalNode.transition(transition); + } + }, + + /** + * Momentarily flash the scroll bars to indicate current scroll position + * + * @method flash + */ + flash: function() { + var shouldFlash = false, + host = this._host; + + if (host._scrollsVertical && (host._scrollHeight > host.get(HEIGHT))) { + shouldFlash = true; + } + + if (host._scrollsHorizontal && (host._scrollWidth > host.get(WIDTH))) { + shouldFlash = true; + } + + if (shouldFlash) { + this.show(true); + this._flashTimer = Y.later(800, this, 'hide', true); + } + }, + + /** + * Setter for the verticalNode and horizontalNode attributes + * + * @method _setNode + * @param node {Node} The Y.Node instance for the scrollbar + * @param name {String} The attribute name + * @return {Node} The Y.Node instance for the scrollbar + * + * @protected + */ + _setNode: function(node, name) { + var horiz = (name == HORIZONTAL_NODE); + + node = Y.one(node); + + if (node) { + node.addClass(_classNames.scrollbar); + node.addClass( (horiz) ? _classNames.scrollbarH : _classNames.scrollbarV ); + node.setData("isHoriz", horiz); + } + + return node; + }, + + /** + * Creates default node instances for scrollbars + * + * @method _defaultNode + * @return {Node} The Y.Node instance for the scrollbar + * + * @protected + */ + _defaultNode: function() { + return Y.Node.create(ScrollbarsPlugin.SCROLLBAR_TEMPLATE); + }, + + _basic: Y.UA.ie && Y.UA.ie <= 8 + +}); + + +}, '3.3.0' ,{skinnable:true, requires:['plugin']}); diff --git a/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview.js b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview.js new file mode 100644 index 00000000..42a1f78e --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/scrollview/scrollview.js @@ -0,0 +1,28 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('scrollview', function(Y) { + +/** + *

          + * The scrollview module does not add any new classes. It simply plugs the ScrollViewScrollbars plugin into the + * base ScrollView class implementation provided by the scrollview-base module, so that all scrollview instances + * have scrollbars enabled. + *

          + * + * + * + * @module scrollview + */ + +Y.Base.plug(Y.ScrollView, Y.Plugin.ScrollViewScrollbars); + + +}, '3.3.0' ,{requires:['scrollview-base', 'scrollview-scrollbars']}); diff --git a/jssource/src_files/include/javascript/yui3/build/simpleyui/simpleyui-min.js b/jssource/src_files/include/javascript/yui3/build/simpleyui/simpleyui-min.js new file mode 100644 index 00000000..5c6dc8b8 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/simpleyui/simpleyui-min.js @@ -0,0 +1,30 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +if(typeof YUI!="undefined"){YUI._YUI=YUI;}var YUI=function(){var C=0,F=this,B=arguments,A=B.length,E=function(H,G){return(H&&H.hasOwnProperty&&(H instanceof G));},D=(typeof YUI_config!=="undefined")&&YUI_config;if(!(E(F,YUI))){F=new YUI();}else{F._init();if(YUI.GlobalConfig){F.applyConfig(YUI.GlobalConfig);}if(D){F.applyConfig(D);}if(!A){F._setup();}}if(A){for(;C-1){Q="3.2.0";}P={applyConfig:function(e){e=e||L;var Z,b,a=this.config,c=a.modules,X=a.groups,d=a.rls,W=this.Env._loader;for(b in e){if(e.hasOwnProperty(b)){Z=e[b];if(c&&b=="modules"){O(c,Z);}else{if(X&&b=="groups"){O(X,Z);}else{if(d&&b=="rls"){O(d,Z);}else{if(b=="win"){a[b]=Z.contentWindow||Z;a.doc=a[b].document;}else{if(b=="_yuid"){}else{a[b]=Z;}}}}}}}if(W){W._config(e);}},_config:function(W){this.applyConfig(W);},_init:function(){var Z,a=this,W=YUI.Env,X=a.Env,b;a.version=Q;if(!X){a.Env={mods:{},versions:{},base:N,cdn:N+Q+"/build/",_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_guidp:"y",_loaded:{},serviced:{},getBase:W&&W.getBase||function(h,g){var c,d,f,j,e;d=(V&&V.getElementsByTagName("script"))||[];for(f=0;f-1){Z=Z.substr(0,e);}}e=j.match(g);if(e&&e[3]){c=e[1]+e[3];}break;}}}return c||X.cdn;}};X=a.Env;X._loaded[Q]={};if(W&&a!==YUI){X._yidx=++W._yidx;X._guidp=("yui_"+Q+"_"+X._yidx+"_"+I).replace(/\./g,"_");}else{if(YUI._YUI){W=YUI._YUI.Env;X._yidx+=W._yidx;X._uidx+=W._uidx;for(b in W){if(!(b in X)){X[b]=W[b];}}delete YUI._YUI;}}a.id=a.stamp(a);C[a.id]=a;}a.constructor=YUI;a.config=a.config||{win:E,doc:V,debug:true,useBrowserConsole:true,throwFail:true,bootstrap:true,cacheUse:true,fetchCSS:true};a.config.base=YUI.config.base||a.Env.getBase(/^(.*)yui\/yui([\.\-].*)js(\?.*)?$/,/^(.*\?)(.*\&)(.*)yui\/yui[\.\-].*js(\?.*)?$/);if(!Z||(!("-min.-debug.").indexOf(Z))){Z="-min.";}a.config.loaderPath=YUI.config.loaderPath||"loader/loader"+(Z||"-min.")+"js";},_setup:function(c){var X,b=this,W=[],a=YUI.Env.mods,Z=b.config.core||["get","rls","intl-base","loader","yui-log","yui-later","yui-throttle"];for(X=0;Xj)?L[j]:true;}return n;};N.indexOf=(X.indexOf)?function(F,L){return X.indexOf.call(F,L);}:function(F,O){for(var L=0;L1)?Array.prototype.join.call(arguments,R):j;if(!(i in F)||(L&&F[i]==L)){F[i]=O.apply(O,arguments);}return F[i];};};var T=function(){},I=function(F){T.prototype=F;return new T();},K=function(L,F){return L&&L.hasOwnProperty&&L.hasOwnProperty(F);},Z,D=function(k,j){var O=(j===2),F=(O)?0:[],L;for(L in k){if(K(k,L)){if(O){F++;}else{F.push((j)?k[L]:L);}}}return F;};C.Object=I;I.keys=function(F){return D(F);};I.values=function(F){return D(F,1); +};I.size=Object.size||function(F){return D(F,2);};I.hasKey=K;I.hasValue=function(L,F){return(C.Array.indexOf(I.values(L),F)>-1);};I.owns=K;I.each=function(k,j,l,O){var L=l||C,F;for(F in k){if(O||K(k,F)){j.call(L,k[F],F,k);}}return C;};I.some=function(k,j,l,O){var L=l||C,F;for(F in k){if(O||K(k,F)){if(j.call(L,k[F],F,k)){return true;}}}return false;};I.getValue=function(k,j){if(!C.Lang.isObject(k)){return Z;}var L,O=C.Array(j),F=O.length;for(L=0;k!==Z&&L=0){for(F=0;L!==Z&&F0){C=D(I);if(C){return C;}else{E=I.lastIndexOf("-");if(E>=0){I=I.substring(0,E);if(E>=2&&I.charAt(E-2)==="-"){I=I.substring(0,E-2);}}else{break;}}}}return"";}});},"3.3.0",{requires:["yui-base"]});YUI.add("yui-log",function(D){var C=D,E="yui:log",A="undefined",B={debug:1,info:1,warn:1,error:1};C.log=function(I,Q,F,O){var K,N,L,J,M,H=C,P=H.config,G=(H.fire)?H:YUI.Env.globalEvents;if(P.debug){if(F){N=P.logExclude;L=P.logInclude;if(L&&!(F in L)){K=1;}else{if(N&&(F in N)){K=1;}}}if(!K){if(P.useBrowserConsole){J=(F)?F+": "+I:I;if(H.Lang.isFunction(P.logFn)){P.logFn.call(H,I,Q,F);}else{if(typeof console!=A&&console.log){M=(Q&&console[Q]&&(Q in B))?Q:"log";console[M](J);}else{if(typeof opera!=A){opera.postError(J);}}}}if(G&&!O){if(G==H&&(!G.getEvent(E))){G.publish(E,{broadcast:2});}G.fire(E,{msg:I,cat:Q,src:F});}}}return H;};C.message=function(){return C.log.apply(C,arguments);};},"3.3.0",{requires:["yui-base"]});YUI.add("yui-later",function(A){A.later=function(C,H,D,G,F){C=C||0;var B=D,E,I;if(H&&A.Lang.isString(D)){B=H[D];}E=!A.Lang.isUndefined(G)?function(){B.apply(H,A.Array(G));}:function(){B.call(H);};I=(F)?setInterval(E,C):setTimeout(E,C);return{id:I,interval:F,cancel:function(){if(this.interval){clearInterval(I);}else{clearTimeout(I);}}};};A.Lang.later=A.later;},"3.3.0",{requires:["yui-base"]});YUI.add("yui-throttle",function(Y){ +/* Based on work by Simon Willison: http://gist.github.com/292562 */ +Y.throttle=function(fn,ms){ms=(ms)?ms:(Y.config.throttleTime||150);if(ms===-1){return(function(){fn.apply(null,arguments);});}var last=Y.Lang.now();return(function(){var now=Y.Lang.now();if(now-last>ms){last=now;fn.apply(null,arguments);}});};},"3.3.0",{requires:["yui-base"]});YUI.add("yui",function(A){},"3.3.0",{use:["yui-base","get","features","rls","intl-base","yui-log","yui-later","yui-throttle"]});YUI.add("oop",function(I){var E=I.Lang,D=I.Array,C=Object.prototype,B="_~yuim~_",F="each",H="some",G=function(L,K,M,A,J){if(L&&L[J]&&L!==I){return L[J].call(L,K,M);}else{switch(D.test(L)){case 1:return D[J](L,K,M);case 2:return D[J](I.Array(L,0,true),K,M);default:return I.Object[J](L,K,M,A);}}};I.augment=function(A,V,L,T,P){var N=V.prototype,R=null,U=V,Q=(P)?I.Array(P):[],K=A.prototype,O=K||A,S=false,J,M;if(K&&U){J={};M={};R={};I.Object.each(N,function(X,W){M[W]=function(){for(var Z in J){if(J.hasOwnProperty(Z)&&(this[Z]===M[Z])){this[Z]=J[Z];}}U.apply(this,Q);return J[W].apply(this,arguments);};if((!T||(W in T))&&(L||!(W in this))){if(E.isFunction(X)){J[W]=X;this[W]=M[W];}else{this[W]=X;}}},R,true);}else{S=true;}I.mix(O,R||N,L,T);if(S){V.apply(O,Q);}return A;};I.aggregate=function(K,J,A,L){return I.mix(K,J,A,L,0,true);};I.extend=function(L,K,A,N){if(!K||!L){I.error("extend failed, verify dependencies");}var M=K.prototype,J=I.Object(M);L.prototype=J;J.constructor=L;L.superclass=M;if(K!=Object&&M.constructor==C.constructor){M.constructor=K;}if(A){I.mix(J,A,true);}if(N){I.mix(L,N,true);}return L;};I.each=function(K,J,L,A){return G(K,J,L,A,F);};I.some=function(K,J,L,A){return G(K,J,L,A,H);};I.clone=function(L,M,Q,R,K,P){if(!E.isObject(L)){return L;}if(I.instanceOf(L,YUI)){return L;}var N,J=P||{},A,O=I.each;switch(E.type(L)){case"date":return new Date(L);case"regexp":return L;case"function":return L;case"array":N=[];break;default:if(L[B]){return J[L[B]];}A=I.guid();N=(M)?{}:I.Object(L);L[B]=A;J[A]=L;}if(!L.addEventListener&&!L.attachEvent){O(L,function(T,S){if((S||S===0)&&(!Q||(Q.call(R||this,T,S,this,L)!==false))){if(S!==B){if(S=="prototype"){}else{this[S]=I.clone(T,M,Q,R,K||L,J);}}}},N);}if(!P){I.Object.each(J,function(T,S){if(T[B]){try{delete T[B];}catch(U){T[B]=null;}}},this);J=null;}return N;};I.bind=function(A,K){var J=arguments.length>2?I.Array(arguments,2,true):null;return function(){var M=E.isString(A)?K[A]:A,L=(J)?J.concat(I.Array(arguments,0,true)):arguments; +return M.apply(K||M,L);};};I.rbind=function(A,K){var J=arguments.length>2?I.Array(arguments,2,true):null;return function(){var M=E.isString(A)?K[A]:A,L=(J)?I.Array(arguments,0,true).concat(J):arguments;return M.apply(K||M,L);};};},"3.3.0");YUI.add("dom-base",function(D){(function(H){var O="nodeType",U="ownerDocument",V="documentElement",G="defaultView",M="parentWindow",S="tagName",K="parentNode",E="firstChild",T="previousSibling",W="nextSibling",L="contains",R="compareDocumentPosition",F="",I=[],Z=H.config.doc.documentElement,N=/<([a-z]+)/i,J=function(c,a){var d=H.config.doc.createElement("div"),b=true;d.innerHTML=c;if(!d.firstChild||d.firstChild.tagName!==a.toUpperCase()){b=false;}return b;},P=H.Features.add,Q=H.Features.test,X={byId:function(b,a){return X.allById(b,a)[0]||null;},getText:(Z.textContent!==undefined)?function(b){var a="";if(b){a=b.textContent;}return a||"";}:function(b){var a="";if(b){a=b.innerText||b.nodeValue;}return a||"";},setText:(Z.textContent!==undefined)?function(a,b){if(a){a.textContent=b;}}:function(a,b){if("innerText" in a){a.innerText=b;}else{if("nodeValue" in a){a.nodeValue=b;}}},ancestor:function(b,c,d){var a=null;if(d){a=(!c||c(b))?b:null;}return a||X.elementByAxis(b,K,c,null);},ancestors:function(c,d,e){var b=X.ancestor.apply(X,arguments),a=(b)?[b]:[];while((b=X.ancestor(b,d))){if(b){a.unshift(b);}}return a;},elementByAxis:function(a,d,c,b){while(a&&(a=a[d])){if((b||a[S])&&(!c||c(a))){return a;}}return null;},contains:function(b,c){var a=false;if(!c||!b||!c[O]||!b[O]){a=false;}else{if(b[L]){if(H.UA.opera||c[O]===1){a=b[L](c);}else{a=X._bruteContains(b,c);}}else{if(b[R]){if(b===c||!!(b[R](c)&16)){a=true;}}}}return a;},inDoc:function(c,d){var b=false,a;if(c&&c.nodeType){(d)||(d=c[U]);a=d[V];if(a&&a.contains&&c.tagName){b=a.contains(c);}else{b=X.contains(a,c);}}return b;},allById:function(f,a){a=a||H.config.doc;var b=[],c=[],d,e;if(a.querySelectorAll){c=a.querySelectorAll('[id="'+f+'"]');}else{if(a.all){b=a.all(f);if(b){if(b.nodeName){if(b.id===f){c.push(b);b=I;}else{b=[b];}}if(b.length){for(d=0;e=b[d++];){if(e.id===f||(e.attributes&&e.attributes.id&&e.attributes.id.value===f)){c.push(e);}}}}}else{c=[X._getDoc(a).getElementById(f)];}}return c;},create:function(e,h){if(typeof e==="string"){e=H.Lang.trim(e);}h=h||H.config.doc;var d=N.exec(e),f=X._create,b=X.creators,g=null,c,i,a;if(e!=undefined){if(d&&d[1]){c=b[d[1].toLowerCase()];if(typeof c==="function"){f=c;}else{i=c;}}a=f(e,h,i).childNodes;if(a.length===1){g=a[0].parentNode.removeChild(a[0]);}else{if(a[0]&&a[0].className==="yui3-big-dummy"){if(a.length===2){g=a[0].nextSibling;}else{a[0].parentNode.removeChild(a[0]);g=X._nl2frag(a,h);}}else{g=X._nl2frag(a,h);}}}return g;},_nl2frag:function(b,e){var c=null,d,a;if(b&&(b.push||b.item)&&b[0]){e=e||b[0].ownerDocument;c=e.createDocumentFragment();if(b.item){b=H.Array(b,0,true);}for(d=0,a=b.length;d";}catch(b){return false;}return(a.firstChild&&a.firstChild.nodeName==="TBODY"); +}});P("innerhtml-div","tr",{test:function(){return J("","tr");}});P("innerhtml-div","script",{test:function(){return J("', 'script'); + } +}); + +addFeature('value-set', 'select', { + test: function() { + var node = Y.config.doc.createElement('select'); + node.innerHTML = ''; + node.value = '2'; + return (node.value && node.value === '2'); + } +}); + +(function(Y) { + var creators = Y_DOM.creators, + create = Y_DOM.create, + re_tbody = /(?:\/(?:thead|tfoot|tbody|caption|col|colgroup)>)+\s* 1 && tb && !re_tbody.test(html)) { + tb[PARENT_NODE].removeChild(tb); // strip extraneous tbody + } + return frag; + }; + } + + if (!testFeature('innerhtml-div', 'script')) { + creators.script = function(html, doc) { + var frag = doc.createElement('div'); + + frag.innerHTML = '-' + html; + frag.removeChild(frag[FIRST_CHILD]); + return frag; + } + + Y_DOM.creators.link = Y_DOM.creators.style = Y_DOM.creators.script; + } + + + if (!testFeature('value-set', 'select')) { + Y_DOM.VALUE_SETTERS.select = function(node, val) { + for (var i = 0, options = node.getElementsByTagName('option'), option; + option = options[i++];) { + if (Y_DOM.getValue(option) === val) { + option.selected = true; + //Y_DOM.setAttribute(option, 'selected', 'selected'); + break; + } + } + } + } + + Y.mix(Y_DOM.VALUE_GETTERS, { + button: function(node) { + return (node.attributes && node.attributes.value) ? node.attributes.value.value : ''; + } + }); + + Y.mix(Y_DOM.VALUE_SETTERS, { + // IE: node.value changes the button text, which should be handled via innerHTML + button: function(node, val) { + var attr = node.attributes.value; + if (!attr) { + attr = node[OWNER_DOCUMENT].createAttribute('value'); + node.setAttributeNode(attr); + } + + attr.value = val; + } + }); + + + if (!testFeature('innerhtml-div', 'tr')) { + Y.mix(creators, { + option: function(html, doc) { + return create('', doc); + }, + + tr: function(html, doc) { + return create('' + html + '', doc); + }, + + td: function(html, doc) { + return create('' + html + '', doc); + }, + + col: function(html, doc) { + return create('' + html + '', doc); + }, + + tbody: 'table' + }); + + Y.mix(creators, { + legend: 'fieldset', + th: creators.td, + thead: creators.tbody, + tfoot: creators.tbody, + caption: creators.tbody, + colgroup: creators.tbody, + optgroup: creators.option + }); + } + + Y.mix(Y_DOM.VALUE_GETTERS, { + option: function(node) { + var attrs = node.attributes; + return (attrs.value && attrs.value.specified) ? node.value : node.text; + }, + + select: function(node) { + var val = node.value, + options = node.options; + + if (options && options.length) { + // TODO: implement multipe select + if (node.multiple) { + } else { + val = Y_DOM.getValue(options[node.selectedIndex]); + } + } + + return val; + } + }); +})(Y); + +Y.DOM = Y_DOM; +})(Y); +var addClass, hasClass, removeClass; + +Y.mix(Y.DOM, { + /** + * Determines whether a DOM element has the given className. + * @method hasClass + * @for DOM + * @param {HTMLElement} element The DOM element. + * @param {String} className the class name to search for + * @return {Boolean} Whether or not the element has the given class. + */ + hasClass: function(node, className) { + var re = Y.DOM._getRegExp('(?:^|\\s+)' + className + '(?:\\s+|$)'); + return re.test(node.className); + }, + + /** + * Adds a class name to a given DOM element. + * @method addClass + * @for DOM + * @param {HTMLElement} element The DOM element. + * @param {String} className the class name to add to the class attribute + */ + addClass: function(node, className) { + if (!Y.DOM.hasClass(node, className)) { // skip if already present + node.className = Y.Lang.trim([node.className, className].join(' ')); + } + }, + + /** + * Removes a class name from a given element. + * @method removeClass + * @for DOM + * @param {HTMLElement} element The DOM element. + * @param {String} className the class name to remove from the class attribute + */ + removeClass: function(node, className) { + if (className && hasClass(node, className)) { + node.className = Y.Lang.trim(node.className.replace(Y.DOM._getRegExp('(?:^|\\s+)' + + className + '(?:\\s+|$)'), ' ')); + + if ( hasClass(node, className) ) { // in case of multiple adjacent + removeClass(node, className); + } + } + }, + + /** + * Replace a class with another class for a given element. + * If no oldClassName is present, the newClassName is simply added. + * @method replaceClass + * @for DOM + * @param {HTMLElement} element The DOM element + * @param {String} oldClassName the class name to be replaced + * @param {String} newClassName the class name that will be replacing the old class name + */ + replaceClass: function(node, oldC, newC) { + removeClass(node, oldC); // remove first in case oldC === newC + addClass(node, newC); + }, + + /** + * If the className exists on the node it is removed, if it doesn't exist it is added. + * @method toggleClass + * @for DOM + * @param {HTMLElement} element The DOM element + * @param {String} className the class name to be toggled + * @param {Boolean} addClass optional boolean to indicate whether class + * should be added or removed regardless of current state + */ + toggleClass: function(node, className, force) { + var add = (force !== undefined) ? force : + !(hasClass(node, className)); + + if (add) { + addClass(node, className); + } else { + removeClass(node, className); + } + } +}); + +hasClass = Y.DOM.hasClass; +removeClass = Y.DOM.removeClass; +addClass = Y.DOM.addClass; + +Y.mix(Y.DOM, { + /** + * Sets the width of the element to the given size, regardless + * of box model, border, padding, etc. + * @method setWidth + * @param {HTMLElement} element The DOM element. + * @param {String|Int} size The pixel height to size to + */ + + setWidth: function(node, size) { + Y.DOM._setSize(node, 'width', size); + }, + + /** + * Sets the height of the element to the given size, regardless + * of box model, border, padding, etc. + * @method setHeight + * @param {HTMLElement} element The DOM element. + * @param {String|Int} size The pixel height to size to + */ + + setHeight: function(node, size) { + Y.DOM._setSize(node, 'height', size); + }, + + _setSize: function(node, prop, val) { + val = (val > 0) ? val : 0; + var size = 0; + + node.style[prop] = val + 'px'; + size = (prop === 'height') ? node.offsetHeight : node.offsetWidth; + + if (size > val) { + val = val - (size - val); + + if (val < 0) { + val = 0; + } + + node.style[prop] = val + 'px'; + } + } +}); + + +}, '3.3.0' ,{requires:['oop']}); +YUI.add('dom-style', function(Y) { + +(function(Y) { +/** + * Add style management functionality to DOM. + * @module dom + * @submodule dom-style + * @for DOM + */ + +var DOCUMENT_ELEMENT = 'documentElement', + DEFAULT_VIEW = 'defaultView', + OWNER_DOCUMENT = 'ownerDocument', + STYLE = 'style', + FLOAT = 'float', + CSS_FLOAT = 'cssFloat', + STYLE_FLOAT = 'styleFloat', + TRANSPARENT = 'transparent', + GET_COMPUTED_STYLE = 'getComputedStyle', + GET_BOUNDING_CLIENT_RECT = 'getBoundingClientRect', + + WINDOW = Y.config.win, + DOCUMENT = Y.config.doc, + UNDEFINED = undefined, + + Y_DOM = Y.DOM, + + TRANSFORM = 'transform', + VENDOR_TRANSFORM = [ + 'WebkitTransform', + 'MozTransform', + 'OTransform' + ], + + re_color = /color$/i, + re_unit = /width|height|top|left|right|bottom|margin|padding/i; + +Y.Array.each(VENDOR_TRANSFORM, function(val) { + if (val in DOCUMENT[DOCUMENT_ELEMENT].style) { + TRANSFORM = val; + } +}); + +Y.mix(Y_DOM, { + DEFAULT_UNIT: 'px', + + CUSTOM_STYLES: { + }, + + + /** + * Sets a style property for a given element. + * @method setStyle + * @param {HTMLElement} An HTMLElement to apply the style to. + * @param {String} att The style property to set. + * @param {String|Number} val The value. + */ + setStyle: function(node, att, val, style) { + style = style || node.style; + var CUSTOM_STYLES = Y_DOM.CUSTOM_STYLES; + + if (style) { + if (val === null || val === '') { // normalize unsetting + val = ''; + } else if (!isNaN(new Number(val)) && re_unit.test(att)) { // number values may need a unit + val += Y_DOM.DEFAULT_UNIT; + } + + if (att in CUSTOM_STYLES) { + if (CUSTOM_STYLES[att].set) { + CUSTOM_STYLES[att].set(node, val, style); + return; // NOTE: return + } else if (typeof CUSTOM_STYLES[att] === 'string') { + att = CUSTOM_STYLES[att]; + } + } else if (att === '') { // unset inline styles + att = 'cssText'; + val = ''; + } + style[att] = val; + } + }, + + /** + * Returns the current style value for the given property. + * @method getStyle + * @param {HTMLElement} An HTMLElement to get the style from. + * @param {String} att The style property to get. + */ + getStyle: function(node, att, style) { + style = style || node.style; + var CUSTOM_STYLES = Y_DOM.CUSTOM_STYLES, + val = ''; + + if (style) { + if (att in CUSTOM_STYLES) { + if (CUSTOM_STYLES[att].get) { + return CUSTOM_STYLES[att].get(node, att, style); // NOTE: return + } else if (typeof CUSTOM_STYLES[att] === 'string') { + att = CUSTOM_STYLES[att]; + } + } + val = style[att]; + if (val === '') { // TODO: is empty string sufficient? + val = Y_DOM[GET_COMPUTED_STYLE](node, att); + } + } + + return val; + }, + + /** + * Sets multiple style properties. + * @method setStyles + * @param {HTMLElement} node An HTMLElement to apply the styles to. + * @param {Object} hash An object literal of property:value pairs. + */ + setStyles: function(node, hash) { + var style = node.style; + Y.each(hash, function(v, n) { + Y_DOM.setStyle(node, n, v, style); + }, Y_DOM); + }, + + /** + * Returns the computed style for the given node. + * @method getComputedStyle + * @param {HTMLElement} An HTMLElement to get the style from. + * @param {String} att The style property to get. + * @return {String} The computed value of the style property. + */ + getComputedStyle: function(node, att) { + var val = '', + doc = node[OWNER_DOCUMENT]; + + if (node[STYLE] && doc[DEFAULT_VIEW] && doc[DEFAULT_VIEW][GET_COMPUTED_STYLE]) { + val = doc[DEFAULT_VIEW][GET_COMPUTED_STYLE](node, null)[att]; + } + return val; + } +}); + +// normalize reserved word float alternatives ("cssFloat" or "styleFloat") +if (DOCUMENT[DOCUMENT_ELEMENT][STYLE][CSS_FLOAT] !== UNDEFINED) { + Y_DOM.CUSTOM_STYLES[FLOAT] = CSS_FLOAT; +} else if (DOCUMENT[DOCUMENT_ELEMENT][STYLE][STYLE_FLOAT] !== UNDEFINED) { + Y_DOM.CUSTOM_STYLES[FLOAT] = STYLE_FLOAT; +} + +// fix opera computedStyle default color unit (convert to rgb) +if (Y.UA.opera) { + Y_DOM[GET_COMPUTED_STYLE] = function(node, att) { + var view = node[OWNER_DOCUMENT][DEFAULT_VIEW], + val = view[GET_COMPUTED_STYLE](node, '')[att]; + + if (re_color.test(att)) { + val = Y.Color.toRGB(val); + } + + return val; + }; + +} + +// safari converts transparent to rgba(), others use "transparent" +if (Y.UA.webkit) { + Y_DOM[GET_COMPUTED_STYLE] = function(node, att) { + var view = node[OWNER_DOCUMENT][DEFAULT_VIEW], + val = view[GET_COMPUTED_STYLE](node, '')[att]; + + if (val === 'rgba(0, 0, 0, 0)') { + val = TRANSPARENT; + } + + return val; + }; + +} + +Y.DOM._getAttrOffset = function(node, attr) { + var val = Y.DOM[GET_COMPUTED_STYLE](node, attr), + offsetParent = node.offsetParent, + position, + parentOffset, + offset; + + if (val === 'auto') { + position = Y.DOM.getStyle(node, 'position'); + if (position === 'static' || position === 'relative') { + val = 0; + } else if (offsetParent && offsetParent[GET_BOUNDING_CLIENT_RECT]) { + parentOffset = offsetParent[GET_BOUNDING_CLIENT_RECT]()[attr]; + offset = node[GET_BOUNDING_CLIENT_RECT]()[attr]; + if (attr === 'left' || attr === 'top') { + val = offset - parentOffset; + } else { + val = parentOffset - node[GET_BOUNDING_CLIENT_RECT]()[attr]; + } + } + } + + return val; +}; + +Y.DOM._getOffset = function(node) { + var pos, + xy = null; + + if (node) { + pos = Y_DOM.getStyle(node, 'position'); + xy = [ + parseInt(Y_DOM[GET_COMPUTED_STYLE](node, 'left'), 10), + parseInt(Y_DOM[GET_COMPUTED_STYLE](node, 'top'), 10) + ]; + + if ( isNaN(xy[0]) ) { // in case of 'auto' + xy[0] = parseInt(Y_DOM.getStyle(node, 'left'), 10); // try inline + if ( isNaN(xy[0]) ) { // default to offset value + xy[0] = (pos === 'relative') ? 0 : node.offsetLeft || 0; + } + } + + if ( isNaN(xy[1]) ) { // in case of 'auto' + xy[1] = parseInt(Y_DOM.getStyle(node, 'top'), 10); // try inline + if ( isNaN(xy[1]) ) { // default to offset value + xy[1] = (pos === 'relative') ? 0 : node.offsetTop || 0; + } + } + } + + return xy; + +}; + +Y_DOM.CUSTOM_STYLES.transform = { + set: function(node, val, style) { + style[TRANSFORM] = val; + }, + + get: function(node, style) { + return Y_DOM[GET_COMPUTED_STYLE](node, TRANSFORM); + } +}; + + +})(Y); +(function(Y) { +var PARSE_INT = parseInt, + RE = RegExp; + +Y.Color = { + KEYWORDS: { + black: '000', + silver: 'c0c0c0', + gray: '808080', + white: 'fff', + maroon: '800000', + red: 'f00', + purple: '800080', + fuchsia: 'f0f', + green: '008000', + lime: '0f0', + olive: '808000', + yellow: 'ff0', + navy: '000080', + blue: '00f', + teal: '008080', + aqua: '0ff' + }, + + re_RGB: /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i, + re_hex: /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i, + re_hex3: /([0-9A-F])/gi, + + toRGB: function(val) { + if (!Y.Color.re_RGB.test(val)) { + val = Y.Color.toHex(val); + } + + if(Y.Color.re_hex.exec(val)) { + val = 'rgb(' + [ + PARSE_INT(RE.$1, 16), + PARSE_INT(RE.$2, 16), + PARSE_INT(RE.$3, 16) + ].join(', ') + ')'; + } + return val; + }, + + toHex: function(val) { + val = Y.Color.KEYWORDS[val] || val; + if (Y.Color.re_RGB.exec(val)) { + val = [ + Number(RE.$1).toString(16), + Number(RE.$2).toString(16), + Number(RE.$3).toString(16) + ]; + + for (var i = 0; i < val.length; i++) { + if (val[i].length < 2) { + val[i] = '0' + val[i]; + } + } + + val = val.join(''); + } + + if (val.length < 6) { + val = val.replace(Y.Color.re_hex3, '$1$1'); + } + + if (val !== 'transparent' && val.indexOf('#') < 0) { + val = '#' + val; + } + + return val.toUpperCase(); + } +}; +})(Y); + + + +}, '3.3.0' ,{requires:['dom-base']}); +YUI.add('dom-screen', function(Y) { + +(function(Y) { + +/** + * Adds position and region management functionality to DOM. + * @module dom + * @submodule dom-screen + * @for DOM + */ + +var DOCUMENT_ELEMENT = 'documentElement', + COMPAT_MODE = 'compatMode', + POSITION = 'position', + FIXED = 'fixed', + RELATIVE = 'relative', + LEFT = 'left', + TOP = 'top', + _BACK_COMPAT = 'BackCompat', + MEDIUM = 'medium', + BORDER_LEFT_WIDTH = 'borderLeftWidth', + BORDER_TOP_WIDTH = 'borderTopWidth', + GET_BOUNDING_CLIENT_RECT = 'getBoundingClientRect', + GET_COMPUTED_STYLE = 'getComputedStyle', + + Y_DOM = Y.DOM, + + // TODO: how about thead/tbody/tfoot/tr? + // TODO: does caption matter? + RE_TABLE = /^t(?:able|d|h)$/i, + + SCROLL_NODE; + +if (Y.UA.ie) { + if (Y.config.doc[COMPAT_MODE] !== 'quirks') { + SCROLL_NODE = DOCUMENT_ELEMENT; + } else { + SCROLL_NODE = 'body'; + } +} + +Y.mix(Y_DOM, { + /** + * Returns the inner height of the viewport (exludes scrollbar). + * @method winHeight + * @return {Number} The current height of the viewport. + */ + winHeight: function(node) { + var h = Y_DOM._getWinSize(node).height; + return h; + }, + + /** + * Returns the inner width of the viewport (exludes scrollbar). + * @method winWidth + * @return {Number} The current width of the viewport. + */ + winWidth: function(node) { + var w = Y_DOM._getWinSize(node).width; + return w; + }, + + /** + * Document height + * @method docHeight + * @return {Number} The current height of the document. + */ + docHeight: function(node) { + var h = Y_DOM._getDocSize(node).height; + return Math.max(h, Y_DOM._getWinSize(node).height); + }, + + /** + * Document width + * @method docWidth + * @return {Number} The current width of the document. + */ + docWidth: function(node) { + var w = Y_DOM._getDocSize(node).width; + return Math.max(w, Y_DOM._getWinSize(node).width); + }, + + /** + * Amount page has been scroll horizontally + * @method docScrollX + * @return {Number} The current amount the screen is scrolled horizontally. + */ + docScrollX: function(node, doc) { + doc = doc || (node) ? Y_DOM._getDoc(node) : Y.config.doc; // perf optimization + var dv = doc.defaultView, + pageOffset = (dv) ? dv.pageXOffset : 0; + return Math.max(doc[DOCUMENT_ELEMENT].scrollLeft, doc.body.scrollLeft, pageOffset); + }, + + /** + * Amount page has been scroll vertically + * @method docScrollY + * @return {Number} The current amount the screen is scrolled vertically. + */ + docScrollY: function(node, doc) { + doc = doc || (node) ? Y_DOM._getDoc(node) : Y.config.doc; // perf optimization + var dv = doc.defaultView, + pageOffset = (dv) ? dv.pageYOffset : 0; + return Math.max(doc[DOCUMENT_ELEMENT].scrollTop, doc.body.scrollTop, pageOffset); + }, + + /** + * Gets the current position of an element based on page coordinates. + * Element must be part of the DOM tree to have page coordinates + * (display:none or elements not appended return false). + * @method getXY + * @param element The target element + * @return {Array} The XY position of the element + + TODO: test inDocument/display? + */ + getXY: function() { + if (Y.config.doc[DOCUMENT_ELEMENT][GET_BOUNDING_CLIENT_RECT]) { + return function(node) { + var xy = null, + scrollLeft, + scrollTop, + box, + off1, off2, + bLeft, bTop, + mode, + doc, + inDoc, + rootNode; + + if (node && node.tagName) { + doc = node.ownerDocument; + rootNode = doc[DOCUMENT_ELEMENT]; + + // inline inDoc check for perf + if (rootNode.contains) { + inDoc = rootNode.contains(node); + } else { + inDoc = Y.DOM.contains(rootNode, node); + } + + if (inDoc) { + scrollLeft = (SCROLL_NODE) ? doc[SCROLL_NODE].scrollLeft : Y_DOM.docScrollX(node, doc); + scrollTop = (SCROLL_NODE) ? doc[SCROLL_NODE].scrollTop : Y_DOM.docScrollY(node, doc); + box = node[GET_BOUNDING_CLIENT_RECT](); + xy = [box.left, box.top]; + + if (Y.UA.ie) { + off1 = 2; + off2 = 2; + mode = doc[COMPAT_MODE]; + bLeft = Y_DOM[GET_COMPUTED_STYLE](doc[DOCUMENT_ELEMENT], BORDER_LEFT_WIDTH); + bTop = Y_DOM[GET_COMPUTED_STYLE](doc[DOCUMENT_ELEMENT], BORDER_TOP_WIDTH); + + if (Y.UA.ie === 6) { + if (mode !== _BACK_COMPAT) { + off1 = 0; + off2 = 0; + } + } + + if ((mode == _BACK_COMPAT)) { + if (bLeft !== MEDIUM) { + off1 = parseInt(bLeft, 10); + } + if (bTop !== MEDIUM) { + off2 = parseInt(bTop, 10); + } + } + + xy[0] -= off1; + xy[1] -= off2; + + } + + if ((scrollTop || scrollLeft)) { + if (!Y.UA.ios) { + xy[0] += scrollLeft; + xy[1] += scrollTop; + } + + } + } else { + xy = Y_DOM._getOffset(node); + } + } + return xy; + } + } else { + return function(node) { // manually calculate by crawling up offsetParents + //Calculate the Top and Left border sizes (assumes pixels) + var xy = null, + doc, + parentNode, + bCheck, + scrollTop, + scrollLeft; + + if (node) { + if (Y_DOM.inDoc(node)) { + xy = [node.offsetLeft, node.offsetTop]; + doc = node.ownerDocument; + parentNode = node; + // TODO: refactor with !! or just falsey + bCheck = ((Y.UA.gecko || Y.UA.webkit > 519) ? true : false); + + // TODO: worth refactoring for TOP/LEFT only? + while ((parentNode = parentNode.offsetParent)) { + xy[0] += parentNode.offsetLeft; + xy[1] += parentNode.offsetTop; + if (bCheck) { + xy = Y_DOM._calcBorders(parentNode, xy); + } + } + + // account for any scrolled ancestors + if (Y_DOM.getStyle(node, POSITION) != FIXED) { + parentNode = node; + + while ((parentNode = parentNode.parentNode)) { + scrollTop = parentNode.scrollTop; + scrollLeft = parentNode.scrollLeft; + + //Firefox does something funky with borders when overflow is not visible. + if (Y.UA.gecko && (Y_DOM.getStyle(parentNode, 'overflow') !== 'visible')) { + xy = Y_DOM._calcBorders(parentNode, xy); + } + + + if (scrollTop || scrollLeft) { + xy[0] -= scrollLeft; + xy[1] -= scrollTop; + } + } + xy[0] += Y_DOM.docScrollX(node, doc); + xy[1] += Y_DOM.docScrollY(node, doc); + + } else { + //Fix FIXED position -- add scrollbars + xy[0] += Y_DOM.docScrollX(node, doc); + xy[1] += Y_DOM.docScrollY(node, doc); + } + } else { + xy = Y_DOM._getOffset(node); + } + } + + return xy; + }; + } + }(),// NOTE: Executing for loadtime branching + + /** + * Gets the current X position of an element based on page coordinates. + * Element must be part of the DOM tree to have page coordinates + * (display:none or elements not appended return false). + * @method getX + * @param element The target element + * @return {Int} The X position of the element + */ + + getX: function(node) { + return Y_DOM.getXY(node)[0]; + }, + + /** + * Gets the current Y position of an element based on page coordinates. + * Element must be part of the DOM tree to have page coordinates + * (display:none or elements not appended return false). + * @method getY + * @param element The target element + * @return {Int} The Y position of the element + */ + + getY: function(node) { + return Y_DOM.getXY(node)[1]; + }, + + /** + * Set the position of an html element in page coordinates. + * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @method setXY + * @param element The target element + * @param {Array} xy Contains X & Y values for new position (coordinates are page-based) + * @param {Boolean} noRetry By default we try and set the position a second time if the first fails + */ + setXY: function(node, xy, noRetry) { + var setStyle = Y_DOM.setStyle, + pos, + delta, + newXY, + currentXY; + + if (node && xy) { + pos = Y_DOM.getStyle(node, POSITION); + + delta = Y_DOM._getOffset(node); + if (pos == 'static') { // default to relative + pos = RELATIVE; + setStyle(node, POSITION, pos); + } + currentXY = Y_DOM.getXY(node); + + if (xy[0] !== null) { + setStyle(node, LEFT, xy[0] - currentXY[0] + delta[0] + 'px'); + } + + if (xy[1] !== null) { + setStyle(node, TOP, xy[1] - currentXY[1] + delta[1] + 'px'); + } + + if (!noRetry) { + newXY = Y_DOM.getXY(node); + if (newXY[0] !== xy[0] || newXY[1] !== xy[1]) { + Y_DOM.setXY(node, xy, true); + } + } + + } else { + } + }, + + /** + * Set the X position of an html element in page coordinates, regardless of how the element is positioned. + * The element(s) must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @method setX + * @param element The target element + * @param {Int} x The X values for new position (coordinates are page-based) + */ + setX: function(node, x) { + return Y_DOM.setXY(node, [x, null]); + }, + + /** + * Set the Y position of an html element in page coordinates, regardless of how the element is positioned. + * The element(s) must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @method setY + * @param element The target element + * @param {Int} y The Y values for new position (coordinates are page-based) + */ + setY: function(node, y) { + return Y_DOM.setXY(node, [null, y]); + }, + + /** + * @method swapXY + * @description Swap the xy position with another node + * @param {Node} node The node to swap with + * @param {Node} otherNode The other node to swap with + * @return {Node} + */ + swapXY: function(node, otherNode) { + var xy = Y_DOM.getXY(node); + Y_DOM.setXY(node, Y_DOM.getXY(otherNode)); + Y_DOM.setXY(otherNode, xy); + }, + + _calcBorders: function(node, xy2) { + var t = parseInt(Y_DOM[GET_COMPUTED_STYLE](node, BORDER_TOP_WIDTH), 10) || 0, + l = parseInt(Y_DOM[GET_COMPUTED_STYLE](node, BORDER_LEFT_WIDTH), 10) || 0; + if (Y.UA.gecko) { + if (RE_TABLE.test(node.tagName)) { + t = 0; + l = 0; + } + } + xy2[0] += l; + xy2[1] += t; + return xy2; + }, + + _getWinSize: function(node, doc) { + doc = doc || (node) ? Y_DOM._getDoc(node) : Y.config.doc; + var win = doc.defaultView || doc.parentWindow, + mode = doc[COMPAT_MODE], + h = win.innerHeight, + w = win.innerWidth, + root = doc[DOCUMENT_ELEMENT]; + + if ( mode && !Y.UA.opera ) { // IE, Gecko + if (mode != 'CSS1Compat') { // Quirks + root = doc.body; + } + h = root.clientHeight; + w = root.clientWidth; + } + return { height: h, width: w }; + }, + + _getDocSize: function(node) { + var doc = (node) ? Y_DOM._getDoc(node) : Y.config.doc, + root = doc[DOCUMENT_ELEMENT]; + + if (doc[COMPAT_MODE] != 'CSS1Compat') { + root = doc.body; + } + + return { height: root.scrollHeight, width: root.scrollWidth }; + } +}); + +})(Y); +(function(Y) { +var TOP = 'top', + RIGHT = 'right', + BOTTOM = 'bottom', + LEFT = 'left', + + getOffsets = function(r1, r2) { + var t = Math.max(r1[TOP], r2[TOP]), + r = Math.min(r1[RIGHT], r2[RIGHT]), + b = Math.min(r1[BOTTOM], r2[BOTTOM]), + l = Math.max(r1[LEFT], r2[LEFT]), + ret = {}; + + ret[TOP] = t; + ret[RIGHT] = r; + ret[BOTTOM] = b; + ret[LEFT] = l; + return ret; + }, + + DOM = Y.DOM; + +Y.mix(DOM, { + /** + * Returns an Object literal containing the following about this element: (top, right, bottom, left) + * @for DOM + * @method region + * @param {HTMLElement} element The DOM element. + @return {Object} Object literal containing the following about this element: (top, right, bottom, left) + */ + region: function(node) { + var xy = DOM.getXY(node), + ret = false; + + if (node && xy) { + ret = DOM._getRegion( + xy[1], // top + xy[0] + node.offsetWidth, // right + xy[1] + node.offsetHeight, // bottom + xy[0] // left + ); + } + + return ret; + }, + + /** + * Find the intersect information for the passes nodes. + * @method intersect + * @for DOM + * @param {HTMLElement} element The first element + * @param {HTMLElement | Object} element2 The element or region to check the interect with + * @param {Object} altRegion An object literal containing the region for the first element if we already have the data (for performance i.e. DragDrop) + @return {Object} Object literal containing the following intersection data: (top, right, bottom, left, area, yoff, xoff, inRegion) + */ + intersect: function(node, node2, altRegion) { + var r = altRegion || DOM.region(node), region = {}, + n = node2, + off; + + if (n.tagName) { + region = DOM.region(n); + } else if (Y.Lang.isObject(node2)) { + region = node2; + } else { + return false; + } + + off = getOffsets(region, r); + return { + top: off[TOP], + right: off[RIGHT], + bottom: off[BOTTOM], + left: off[LEFT], + area: ((off[BOTTOM] - off[TOP]) * (off[RIGHT] - off[LEFT])), + yoff: ((off[BOTTOM] - off[TOP])), + xoff: (off[RIGHT] - off[LEFT]), + inRegion: DOM.inRegion(node, node2, false, altRegion) + }; + + }, + /** + * Check if any part of this node is in the passed region + * @method inRegion + * @for DOM + * @param {Object} node2 The node to get the region from or an Object literal of the region + * $param {Boolean} all Should all of the node be inside the region + * @param {Object} altRegion An object literal containing the region for this node if we already have the data (for performance i.e. DragDrop) + * @return {Boolean} True if in region, false if not. + */ + inRegion: function(node, node2, all, altRegion) { + var region = {}, + r = altRegion || DOM.region(node), + n = node2, + off; + + if (n.tagName) { + region = DOM.region(n); + } else if (Y.Lang.isObject(node2)) { + region = node2; + } else { + return false; + } + + if (all) { + return ( + r[LEFT] >= region[LEFT] && + r[RIGHT] <= region[RIGHT] && + r[TOP] >= region[TOP] && + r[BOTTOM] <= region[BOTTOM] ); + } else { + off = getOffsets(region, r); + if (off[BOTTOM] >= off[TOP] && off[RIGHT] >= off[LEFT]) { + return true; + } else { + return false; + } + + } + }, + + /** + * Check if any part of this element is in the viewport + * @method inViewportRegion + * @for DOM + * @param {HTMLElement} element The DOM element. + * @param {Boolean} all Should all of the node be inside the region + * @param {Object} altRegion An object literal containing the region for this node if we already have the data (for performance i.e. DragDrop) + * @return {Boolean} True if in region, false if not. + */ + inViewportRegion: function(node, all, altRegion) { + return DOM.inRegion(node, DOM.viewportRegion(node), all, altRegion); + + }, + + _getRegion: function(t, r, b, l) { + var region = {}; + + region[TOP] = region[1] = t; + region[LEFT] = region[0] = l; + region[BOTTOM] = b; + region[RIGHT] = r; + region.width = region[RIGHT] - region[LEFT]; + region.height = region[BOTTOM] - region[TOP]; + + return region; + }, + + /** + * Returns an Object literal containing the following about the visible region of viewport: (top, right, bottom, left) + * @method viewportRegion + * @for DOM + * @return {Object} Object literal containing the following about the visible region of the viewport: (top, right, bottom, left) + */ + viewportRegion: function(node) { + node = node || Y.config.doc.documentElement; + var ret = false, + scrollX, + scrollY; + + if (node) { + scrollX = DOM.docScrollX(node); + scrollY = DOM.docScrollY(node); + + ret = DOM._getRegion(scrollY, // top + DOM.winWidth(node) + scrollX, // right + scrollY + DOM.winHeight(node), // bottom + scrollX); // left + } + + return ret; + } +}); +})(Y); + + +}, '3.3.0' ,{requires:['dom-base', 'dom-style', 'event-base']}); +YUI.add('selector-native', function(Y) { + +(function(Y) { +/** + * The selector-native module provides support for native querySelector + * @module dom + * @submodule selector-native + * @for Selector + */ + +/** + * Provides support for using CSS selectors to query the DOM + * @class Selector + * @static + * @for Selector + */ + +Y.namespace('Selector'); // allow native module to standalone + +var COMPARE_DOCUMENT_POSITION = 'compareDocumentPosition', + OWNER_DOCUMENT = 'ownerDocument'; + +var Selector = { + _foundCache: [], + + useNative: true, + + _compare: ('sourceIndex' in Y.config.doc.documentElement) ? + function(nodeA, nodeB) { + var a = nodeA.sourceIndex, + b = nodeB.sourceIndex; + + if (a === b) { + return 0; + } else if (a > b) { + return 1; + } + + return -1; + + } : (Y.config.doc.documentElement[COMPARE_DOCUMENT_POSITION] ? + function(nodeA, nodeB) { + if (nodeA[COMPARE_DOCUMENT_POSITION](nodeB) & 4) { + return -1; + } else { + return 1; + } + } : + function(nodeA, nodeB) { + var rangeA, rangeB, compare; + if (nodeA && nodeB) { + rangeA = nodeA[OWNER_DOCUMENT].createRange(); + rangeA.setStart(nodeA, 0); + rangeB = nodeB[OWNER_DOCUMENT].createRange(); + rangeB.setStart(nodeB, 0); + compare = rangeA.compareBoundaryPoints(1, rangeB); // 1 === Range.START_TO_END + } + + return compare; + + }), + + _sort: function(nodes) { + if (nodes) { + nodes = Y.Array(nodes, 0, true); + if (nodes.sort) { + nodes.sort(Selector._compare); + } + } + + return nodes; + }, + + _deDupe: function(nodes) { + var ret = [], + i, node; + + for (i = 0; (node = nodes[i++]);) { + if (!node._found) { + ret[ret.length] = node; + node._found = true; + } + } + + for (i = 0; (node = ret[i++]);) { + node._found = null; + node.removeAttribute('_found'); + } + + return ret; + }, + + /** + * Retrieves a set of nodes based on a given CSS selector. + * @method query + * + * @param {string} selector The CSS Selector to test the node against. + * @param {HTMLElement} root optional An HTMLElement to start the query from. Defaults to Y.config.doc + * @param {Boolean} firstOnly optional Whether or not to return only the first match. + * @return {Array} An array of nodes that match the given selector. + * @static + */ + query: function(selector, root, firstOnly, skipNative) { + root = root || Y.config.doc; + var ret = [], + useNative = (Y.Selector.useNative && Y.config.doc.querySelector && !skipNative), + queries = [[selector, root]], + query, + result, + i, + fn = (useNative) ? Y.Selector._nativeQuery : Y.Selector._bruteQuery; + + if (selector && fn) { + // split group into seperate queries + if (!skipNative && // already done if skipping + (!useNative || root.tagName)) { // split native when element scoping is needed + queries = Selector._splitQueries(selector, root); + } + + for (i = 0; (query = queries[i++]);) { + result = fn(query[0], query[1], firstOnly); + if (!firstOnly) { // coerce DOM Collection to Array + result = Y.Array(result, 0, true); + } + if (result) { + ret = ret.concat(result); + } + } + + if (queries.length > 1) { // remove dupes and sort by doc order + ret = Selector._sort(Selector._deDupe(ret)); + } + } + + return (firstOnly) ? (ret[0] || null) : ret; + + }, + + // allows element scoped queries to begin with combinator + // e.g. query('> p', document.body) === query('body > p') + _splitQueries: function(selector, node) { + var groups = selector.split(','), + queries = [], + prefix = '', + i, len; + + if (node) { + // enforce for element scoping + if (node.tagName) { + node.id = node.id || Y.guid(); + prefix = '[id="' + node.id + '"] '; + } + + for (i = 0, len = groups.length; i < len; ++i) { + selector = prefix + groups[i]; + queries.push([selector, node]); + } + } + + return queries; + }, + + _nativeQuery: function(selector, root, one) { + if (Y.UA.webkit && selector.indexOf(':checked') > -1 && + (Y.Selector.pseudos && Y.Selector.pseudos.checked)) { // webkit (chrome, safari) fails to find "selected" + return Y.Selector.query(selector, root, one, true); // redo with skipNative true to try brute query + } + try { + return root['querySelector' + (one ? '' : 'All')](selector); + } catch(e) { // fallback to brute if available + return Y.Selector.query(selector, root, one, true); // redo with skipNative true + } + }, + + filter: function(nodes, selector) { + var ret = [], + i, node; + + if (nodes && selector) { + for (i = 0; (node = nodes[i++]);) { + if (Y.Selector.test(node, selector)) { + ret[ret.length] = node; + } + } + } else { + } + + return ret; + }, + + test: function(node, selector, root) { + var ret = false, + groups = selector.split(','), + useFrag = false, + parent, + item, + items, + frag, + i, j, group; + + if (node && node.tagName) { // only test HTMLElements + + // we need a root if off-doc + if (!root && !Y.DOM.inDoc(node)) { + parent = node.parentNode; + if (parent) { + root = parent; + } else { // only use frag when no parent to query + frag = node[OWNER_DOCUMENT].createDocumentFragment(); + frag.appendChild(node); + root = frag; + useFrag = true; + } + } + root = root || node[OWNER_DOCUMENT]; + + if (!node.id) { + node.id = Y.guid(); + } + for (i = 0; (group = groups[i++]);) { // TODO: off-dom test + group += '[id="' + node.id + '"]'; + items = Y.Selector.query(group, root); + + for (j = 0; item = items[j++];) { + if (item === node) { + ret = true; + break; + } + } + if (ret) { + break; + } + } + + if (useFrag) { // cleanup + frag.removeChild(node); + } + } + + return ret; + }, + + /** + * A convenience function to emulate Y.Node's aNode.ancestor(selector). + * @param {HTMLElement} element An HTMLElement to start the query from. + * @param {String} selector The CSS selector to test the node against. + * @return {HTMLElement} The ancestor node matching the selector, or null. + * @param {Boolean} testSelf optional Whether or not to include the element in the scan + * @static + * @method ancestor + */ + ancestor: function (element, selector, testSelf) { + return Y.DOM.ancestor(element, function(n) { + return Y.Selector.test(n, selector); + }, testSelf); + } +}; + +Y.mix(Y.Selector, Selector, true); + +})(Y); + + +}, '3.3.0' ,{requires:['dom-base']}); +YUI.add('selector-css2', function(Y) { + +/** + * The selector module provides helper methods allowing CSS2 Selectors to be used with DOM elements. + * @module dom + * @submodule selector-css2 + * @for Selector + */ + +/** + * Provides helper methods for collecting and filtering DOM elements. + */ + +var PARENT_NODE = 'parentNode', + TAG_NAME = 'tagName', + ATTRIBUTES = 'attributes', + COMBINATOR = 'combinator', + PSEUDOS = 'pseudos', + + Selector = Y.Selector, + + SelectorCSS2 = { + _reRegExpTokens: /([\^\$\?\[\]\*\+\-\.\(\)\|\\])/, // TODO: move? + SORT_RESULTS: true, + _children: function(node, tag) { + var ret = node.children, + i, + children = [], + childNodes, + child; + + if (node.children && tag && node.children.tags) { + children = node.children.tags(tag); + } else if ((!ret && node[TAG_NAME]) || (ret && tag)) { // only HTMLElements have children + childNodes = ret || node.childNodes; + ret = []; + for (i = 0; (child = childNodes[i++]);) { + if (child.tagName) { + if (!tag || tag === child.tagName) { + ret.push(child); + } + } + } + } + + return ret || []; + }, + + _re: { + //attr: /(\[.*\])/g, + attr: /(\[[^\]]*\])/g, + pseudos: /:([\-\w]+(?:\(?:['"]?(.+)['"]?\)))*/i + }, + + /** + * Mapping of shorthand tokens to corresponding attribute selector + * @property shorthand + * @type object + */ + shorthand: { + '\\#(-?[_a-z]+[-\\w]*)': '[id=$1]', + '\\.(-?[_a-z]+[-\\w]*)': '[className~=$1]' + }, + + /** + * List of operators and corresponding boolean functions. + * These functions are passed the attribute and the current node's value of the attribute. + * @property operators + * @type object + */ + operators: { + '': function(node, attr) { return Y.DOM.getAttribute(node, attr) !== ''; }, // Just test for existence of attribute + //'': '.+', + //'=': '^{val}$', // equality + '~=': '(?:^|\\s+){val}(?:\\s+|$)', // space-delimited + '|=': '^{val}-?' // optional hyphen-delimited + }, + + pseudos: { + 'first-child': function(node) { + return Y.Selector._children(node[PARENT_NODE])[0] === node; + } + }, + + _bruteQuery: function(selector, root, firstOnly) { + var ret = [], + nodes = [], + tokens = Selector._tokenize(selector), + token = tokens[tokens.length - 1], + rootDoc = Y.DOM._getDoc(root), + child, + id, + className, + tagName; + + + // if we have an initial ID, set to root when in document + /* + if (tokens[0] && rootDoc === root && + (id = tokens[0].id) && + rootDoc.getElementById(id)) { + root = rootDoc.getElementById(id); + } + */ + + if (token) { + // prefilter nodes + id = token.id; + className = token.className; + tagName = token.tagName || '*'; + + if (root.getElementsByTagName) { // non-IE lacks DOM api on doc frags + // try ID first, unless no root.all && root not in document + // (root.all works off document, but not getElementById) + // TODO: move to allById? + if (id && (root.all || (root.nodeType === 9 || Y.DOM.inDoc(root)))) { + nodes = Y.DOM.allById(id, root); + // try className + } else if (className) { + nodes = root.getElementsByClassName(className); + } else { // default to tagName + nodes = root.getElementsByTagName(tagName); + } + + } else { // brute getElementsByTagName('*') + child = root.firstChild; + while (child) { + if (child.tagName) { // only collect HTMLElements + nodes.push(child); + } + child = child.nextSilbing || child.firstChild; + } + } + if (nodes.length) { + ret = Selector._filterNodes(nodes, tokens, firstOnly); + } + } + + return ret; + }, + + _filterNodes: function(nodes, tokens, firstOnly) { + var i = 0, + j, + len = tokens.length, + n = len - 1, + result = [], + node = nodes[0], + tmpNode = node, + getters = Y.Selector.getters, + operator, + combinator, + token, + path, + pass, + //FUNCTION = 'function', + value, + tests, + test; + + //do { + for (i = 0; (tmpNode = node = nodes[i++]);) { + n = len - 1; + path = null; + + testLoop: + while (tmpNode && tmpNode.tagName) { + token = tokens[n]; + tests = token.tests; + j = tests.length; + if (j && !pass) { + while ((test = tests[--j])) { + operator = test[1]; + if (getters[test[0]]) { + value = getters[test[0]](tmpNode, test[0]); + } else { + value = tmpNode[test[0]]; + // use getAttribute for non-standard attributes + if (value === undefined && tmpNode.getAttribute) { + value = tmpNode.getAttribute(test[0]); + } + } + + if ((operator === '=' && value !== test[2]) || // fast path for equality + (typeof operator !== 'string' && // protect against String.test monkey-patch (Moo) + operator.test && !operator.test(value)) || // regex test + (!operator.test && // protect against RegExp as function (webkit) + typeof operator === 'function' && !operator(tmpNode, test[0]))) { // function test + + // skip non element nodes or non-matching tags + if ((tmpNode = tmpNode[path])) { + while (tmpNode && + (!tmpNode.tagName || + (token.tagName && token.tagName !== tmpNode.tagName)) + ) { + tmpNode = tmpNode[path]; + } + } + continue testLoop; + } + } + } + + n--; // move to next token + // now that we've passed the test, move up the tree by combinator + if (!pass && (combinator = token.combinator)) { + path = combinator.axis; + tmpNode = tmpNode[path]; + + // skip non element nodes + while (tmpNode && !tmpNode.tagName) { + tmpNode = tmpNode[path]; + } + + if (combinator.direct) { // one pass only + path = null; + } + + } else { // success if we made it this far + result.push(node); + if (firstOnly) { + return result; + } + break; + } + } + }// while (tmpNode = node = nodes[++i]); + node = tmpNode = null; + return result; + }, + + combinators: { + ' ': { + axis: 'parentNode' + }, + + '>': { + axis: 'parentNode', + direct: true + }, + + + '+': { + axis: 'previousSibling', + direct: true + } + }, + + _parsers: [ + { + name: ATTRIBUTES, + re: /^\[(-?[a-z]+[\w\-]*)+([~\|\^\$\*!=]=?)?['"]?([^\]]*?)['"]?\]/i, + fn: function(match, token) { + var operator = match[2] || '', + operators = Y.Selector.operators, + test; + + // add prefiltering for ID and CLASS + if ((match[1] === 'id' && operator === '=') || + (match[1] === 'className' && + Y.config.doc.documentElement.getElementsByClassName && + (operator === '~=' || operator === '='))) { + token.prefilter = match[1]; + token[match[1]] = match[3]; + } + + // add tests + if (operator in operators) { + test = operators[operator]; + if (typeof test === 'string') { + match[3] = match[3].replace(Y.Selector._reRegExpTokens, '\\$1'); + test = Y.DOM._getRegExp(test.replace('{val}', match[3])); + } + match[2] = test; + } + if (!token.last || token.prefilter !== match[1]) { + return match.slice(1); + } + } + + }, + { + name: TAG_NAME, + re: /^((?:-?[_a-z]+[\w-]*)|\*)/i, + fn: function(match, token) { + var tag = match[1].toUpperCase(); + token.tagName = tag; + + if (tag !== '*' && (!token.last || token.prefilter)) { + return [TAG_NAME, '=', tag]; + } + if (!token.prefilter) { + token.prefilter = 'tagName'; + } + } + }, + { + name: COMBINATOR, + re: /^\s*([>+~]|\s)\s*/, + fn: function(match, token) { + } + }, + { + name: PSEUDOS, + re: /^:([\-\w]+)(?:\(['"]?(.+)['"]?\))*/i, + fn: function(match, token) { + var test = Selector[PSEUDOS][match[1]]; + if (test) { // reorder match array + return [match[2], test]; + } else { // selector token not supported (possibly missing CSS3 module) + return false; + } + } + } + ], + + _getToken: function(token) { + return { + tagName: null, + id: null, + className: null, + attributes: {}, + combinator: null, + tests: [] + }; + }, + + /** + Break selector into token units per simple selector. + Combinator is attached to the previous token. + */ + _tokenize: function(selector) { + selector = selector || ''; + selector = Selector._replaceShorthand(Y.Lang.trim(selector)); + var token = Selector._getToken(), // one token per simple selector (left selector holds combinator) + query = selector, // original query for debug report + tokens = [], // array of tokens + found = false, // whether or not any matches were found this pass + match, // the regex match + test, + i, parser; + + /* + Search for selector patterns, store, and strip them from the selector string + until no patterns match (invalid selector) or we run out of chars. + + Multiple attributes and pseudos are allowed, in any order. + for example: + 'form:first-child[type=button]:not(button)[lang|=en]' + */ + outer: + do { + found = false; // reset after full pass + for (i = 0; (parser = Selector._parsers[i++]);) { + if ( (match = parser.re.exec(selector)) ) { // note assignment + if (parser.name !== COMBINATOR ) { + token.selector = selector; + } + selector = selector.replace(match[0], ''); // strip current match from selector + if (!selector.length) { + token.last = true; + } + + if (Selector._attrFilters[match[1]]) { // convert class to className, etc. + match[1] = Selector._attrFilters[match[1]]; + } + + test = parser.fn(match, token); + if (test === false) { // selector not supported + found = false; + break outer; + } else if (test) { + token.tests.push(test); + } + + if (!selector.length || parser.name === COMBINATOR) { + tokens.push(token); + token = Selector._getToken(token); + if (parser.name === COMBINATOR) { + token.combinator = Y.Selector.combinators[match[1]]; + } + } + found = true; + } + } + } while (found && selector.length); + + if (!found || selector.length) { // not fully parsed + tokens = []; + } + return tokens; + }, + + _replaceShorthand: function(selector) { + var shorthand = Selector.shorthand, + attrs = selector.match(Selector._re.attr), // pull attributes to avoid false pos on "." and "#" + pseudos = selector.match(Selector._re.pseudos), // pull attributes to avoid false pos on "." and "#" + re, i, len; + + if (pseudos) { + selector = selector.replace(Selector._re.pseudos, '!!REPLACED_PSEUDO!!'); + } + + if (attrs) { + selector = selector.replace(Selector._re.attr, '!!REPLACED_ATTRIBUTE!!'); + } + + for (re in shorthand) { + if (shorthand.hasOwnProperty(re)) { + selector = selector.replace(Y.DOM._getRegExp(re, 'gi'), shorthand[re]); + } + } + + if (attrs) { + for (i = 0, len = attrs.length; i < len; ++i) { + selector = selector.replace('!!REPLACED_ATTRIBUTE!!', attrs[i]); + } + } + if (pseudos) { + for (i = 0, len = pseudos.length; i < len; ++i) { + selector = selector.replace('!!REPLACED_PSEUDO!!', pseudos[i]); + } + } + return selector; + }, + + _attrFilters: { + 'class': 'className', + 'for': 'htmlFor' + }, + + getters: { + href: function(node, attr) { + return Y.DOM.getAttribute(node, attr); + } + } + }; + +Y.mix(Y.Selector, SelectorCSS2, true); +Y.Selector.getters.src = Y.Selector.getters.rel = Y.Selector.getters.href; + +// IE wants class with native queries +if (Y.Selector.useNative && Y.config.doc.querySelector) { + Y.Selector.shorthand['\\.(-?[_a-z]+[-\\w]*)'] = '[class~=$1]'; +} + + + +}, '3.3.0' ,{requires:['selector-native']}); + + +YUI.add('selector', function(Y){}, '3.3.0' ,{use:['selector-native', 'selector-css2']}); + + + +YUI.add('dom', function(Y){}, '3.3.0' ,{use:['dom-base', 'dom-style', 'dom-screen', 'selector']}); + +YUI.add('event-custom-base', function(Y) { + +/** + * Custom event engine, DOM event listener abstraction layer, synthetic DOM + * events. + * @module event-custom + */ + +Y.Env.evt = { + handles: {}, + plugins: {} +}; + + +/** + * Custom event engine, DOM event listener abstraction layer, synthetic DOM + * events. + * @module event-custom + * @submodule event-custom-base + */ + +/** + * Allows for the insertion of methods that are executed before or after + * a specified method + * @class Do + * @static + */ + +var DO_BEFORE = 0, + DO_AFTER = 1, + +DO = { + + /** + * Cache of objects touched by the utility + * @property objs + * @static + */ + objs: {}, + + /** + * Execute the supplied method before the specified function + * @method before + * @param fn {Function} the function to execute + * @param obj the object hosting the method to displace + * @param sFn {string} the name of the method to displace + * @param c The execution context for fn + * @param arg* {mixed} 0..n additional arguments to supply to the subscriber + * when the event fires. + * @return {string} handle for the subscription + * @static + */ + before: function(fn, obj, sFn, c) { + var f = fn, a; + if (c) { + a = [fn, c].concat(Y.Array(arguments, 4, true)); + f = Y.rbind.apply(Y, a); + } + + return this._inject(DO_BEFORE, f, obj, sFn); + }, + + /** + * Execute the supplied method after the specified function + * @method after + * @param fn {Function} the function to execute + * @param obj the object hosting the method to displace + * @param sFn {string} the name of the method to displace + * @param c The execution context for fn + * @param arg* {mixed} 0..n additional arguments to supply to the subscriber + * @return {string} handle for the subscription + * @static + */ + after: function(fn, obj, sFn, c) { + var f = fn, a; + if (c) { + a = [fn, c].concat(Y.Array(arguments, 4, true)); + f = Y.rbind.apply(Y, a); + } + + return this._inject(DO_AFTER, f, obj, sFn); + }, + + /** + * Execute the supplied method after the specified function + * @method _inject + * @param when {string} before or after + * @param fn {Function} the function to execute + * @param obj the object hosting the method to displace + * @param sFn {string} the name of the method to displace + * @param c The execution context for fn + * @return {string} handle for the subscription + * @private + * @static + */ + _inject: function(when, fn, obj, sFn) { + + // object id + var id = Y.stamp(obj), o, sid; + + if (! this.objs[id]) { + // create a map entry for the obj if it doesn't exist + this.objs[id] = {}; + } + + o = this.objs[id]; + + if (! o[sFn]) { + // create a map entry for the method if it doesn't exist + o[sFn] = new Y.Do.Method(obj, sFn); + + // re-route the method to our wrapper + obj[sFn] = + function() { + return o[sFn].exec.apply(o[sFn], arguments); + }; + } + + // subscriber id + sid = id + Y.stamp(fn) + sFn; + + // register the callback + o[sFn].register(sid, fn, when); + + return new Y.EventHandle(o[sFn], sid); + + }, + + /** + * Detach a before or after subscription + * @method detach + * @param handle {string} the subscription handle + */ + detach: function(handle) { + + if (handle.detach) { + handle.detach(); + } + + }, + + _unload: function(e, me) { + + } +}; + +Y.Do = DO; + +////////////////////////////////////////////////////////////////////////// + +/** + * Contains the return value from the wrapped method, accessible + * by 'after' event listeners. + * + * @property Do.originalRetVal + * @static + * @since 2.3.0 + */ + +/** + * Contains the current state of the return value, consumable by + * 'after' event listeners, and updated if an after subscriber + * changes the return value generated by the wrapped function. + * + * @property Do.currentRetVal + * @static + * @since 2.3.0 + */ + +////////////////////////////////////////////////////////////////////////// + +/** + * Wrapper for a displaced method with aop enabled + * @class Do.Method + * @constructor + * @param obj The object to operate on + * @param sFn The name of the method to displace + */ +DO.Method = function(obj, sFn) { + this.obj = obj; + this.methodName = sFn; + this.method = obj[sFn]; + this.before = {}; + this.after = {}; +}; + +/** + * Register a aop subscriber + * @method register + * @param sid {string} the subscriber id + * @param fn {Function} the function to execute + * @param when {string} when to execute the function + */ +DO.Method.prototype.register = function (sid, fn, when) { + if (when) { + this.after[sid] = fn; + } else { + this.before[sid] = fn; + } +}; + +/** + * Unregister a aop subscriber + * @method delete + * @param sid {string} the subscriber id + * @param fn {Function} the function to execute + * @param when {string} when to execute the function + */ +DO.Method.prototype._delete = function (sid) { + delete this.before[sid]; + delete this.after[sid]; +}; + +/** + * Execute the wrapped method + * @method exec + */ +DO.Method.prototype.exec = function () { + + var args = Y.Array(arguments, 0, true), + i, ret, newRet, + bf = this.before, + af = this.after, + prevented = false; + + // execute before + for (i in bf) { + if (bf.hasOwnProperty(i)) { + ret = bf[i].apply(this.obj, args); + if (ret) { + switch (ret.constructor) { + case DO.Halt: + return ret.retVal; + case DO.AlterArgs: + args = ret.newArgs; + break; + case DO.Prevent: + prevented = true; + break; + default: + } + } + } + } + + // execute method + if (!prevented) { + ret = this.method.apply(this.obj, args); + } + + DO.originalRetVal = ret; + DO.currentRetVal = ret; + + // execute after methods. + for (i in af) { + if (af.hasOwnProperty(i)) { + newRet = af[i].apply(this.obj, args); + // Stop processing if a Halt object is returned + if (newRet && newRet.constructor == DO.Halt) { + return newRet.retVal; + // Check for a new return value + } else if (newRet && newRet.constructor == DO.AlterReturn) { + ret = newRet.newRetVal; + // Update the static retval state + DO.currentRetVal = ret; + } + } + } + + return ret; +}; + +////////////////////////////////////////////////////////////////////////// + +/** + * Return an AlterArgs object when you want to change the arguments that + * were passed into the function. An example would be a service that scrubs + * out illegal characters prior to executing the core business logic. + * @class Do.AlterArgs + */ +DO.AlterArgs = function(msg, newArgs) { + this.msg = msg; + this.newArgs = newArgs; +}; + +/** + * Return an AlterReturn object when you want to change the result returned + * from the core method to the caller + * @class Do.AlterReturn + */ +DO.AlterReturn = function(msg, newRetVal) { + this.msg = msg; + this.newRetVal = newRetVal; +}; + +/** + * Return a Halt object when you want to terminate the execution + * of all subsequent subscribers as well as the wrapped method + * if it has not exectued yet. + * @class Do.Halt + */ +DO.Halt = function(msg, retVal) { + this.msg = msg; + this.retVal = retVal; +}; + +/** + * Return a Prevent object when you want to prevent the wrapped function + * from executing, but want the remaining listeners to execute + * @class Do.Prevent + */ +DO.Prevent = function(msg) { + this.msg = msg; +}; + +/** + * Return an Error object when you want to terminate the execution + * of all subsequent method calls. + * @class Do.Error + * @deprecated use Y.Do.Halt or Y.Do.Prevent + */ +DO.Error = DO.Halt; + + +////////////////////////////////////////////////////////////////////////// + +// Y["Event"] && Y.Event.addListener(window, "unload", Y.Do._unload, Y.Do); + + +/** + * Custom event engine, DOM event listener abstraction layer, synthetic DOM + * events. + * @module event-custom + * @submodule event-custom-base + */ + + +// var onsubscribeType = "_event:onsub", +var AFTER = 'after', + CONFIGS = [ + 'broadcast', + 'monitored', + 'bubbles', + 'context', + 'contextFn', + 'currentTarget', + 'defaultFn', + 'defaultTargetOnly', + 'details', + 'emitFacade', + 'fireOnce', + 'async', + 'host', + 'preventable', + 'preventedFn', + 'queuable', + 'silent', + 'stoppedFn', + 'target', + 'type' + ], + + YUI3_SIGNATURE = 9, + YUI_LOG = 'yui:log'; + +/** + * Return value from all subscribe operations + * @class EventHandle + * @constructor + * @param {CustomEvent} evt the custom event. + * @param {Subscriber} sub the subscriber. + */ +Y.EventHandle = function(evt, sub) { + + /** + * The custom event + * @type CustomEvent + */ + this.evt = evt; + + /** + * The subscriber object + * @type Subscriber + */ + this.sub = sub; +}; + +Y.EventHandle.prototype = { + batch: function(f, c) { + f.call(c || this, this); + if (Y.Lang.isArray(this.evt)) { + Y.Array.each(this.evt, function(h) { + h.batch.call(c || h, f); + }); + } + }, + + /** + * Detaches this subscriber + * @method detach + * @return {int} the number of detached listeners + */ + detach: function() { + var evt = this.evt, detached = 0, i; + if (evt) { + if (Y.Lang.isArray(evt)) { + for (i = 0; i < evt.length; i++) { + detached += evt[i].detach(); + } + } else { + evt._delete(this.sub); + detached = 1; + } + + } + + return detached; + }, + + /** + * Monitor the event state for the subscribed event. The first parameter + * is what should be monitored, the rest are the normal parameters when + * subscribing to an event. + * @method monitor + * @param what {string} what to monitor ('attach', 'detach', 'publish'). + * @return {EventHandle} return value from the monitor event subscription. + */ + monitor: function(what) { + return this.evt.monitor.apply(this.evt, arguments); + } +}; + +/** + * The CustomEvent class lets you define events for your application + * that can be subscribed to by one or more independent component. + * + * @param {String} type The type of event, which is passed to the callback + * when the event fires. + * @param {object} o configuration object. + * @class CustomEvent + * @constructor + */ +Y.CustomEvent = function(type, o) { + + // if (arguments.length > 2) { +// this.log('CustomEvent context and silent are now in the config', 'warn', 'Event'); + // } + + o = o || {}; + + this.id = Y.stamp(this); + + /** + * The type of event, returned to subscribers when the event fires + * @property type + * @type string + */ + this.type = type; + + /** + * The context the the event will fire from by default. Defaults to the YUI + * instance. + * @property context + * @type object + */ + this.context = Y; + + /** + * Monitor when an event is attached or detached. + * + * @property monitored + * @type boolean + */ + // this.monitored = false; + + this.logSystem = (type == YUI_LOG); + + /** + * If 0, this event does not broadcast. If 1, the YUI instance is notified + * every time this event fires. If 2, the YUI instance and the YUI global + * (if event is enabled on the global) are notified every time this event + * fires. + * @property broadcast + * @type int + */ + // this.broadcast = 0; + + /** + * By default all custom events are logged in the debug build, set silent + * to true to disable debug outpu for this event. + * @property silent + * @type boolean + */ + this.silent = this.logSystem; + + /** + * Specifies whether this event should be queued when the host is actively + * processing an event. This will effect exectution order of the callbacks + * for the various events. + * @property queuable + * @type boolean + * @default false + */ + // this.queuable = false; + + /** + * The subscribers to this event + * @property subscribers + * @type Subscriber {} + */ + this.subscribers = {}; + + /** + * 'After' subscribers + * @property afters + * @type Subscriber {} + */ + this.afters = {}; + + /** + * This event has fired if true + * + * @property fired + * @type boolean + * @default false; + */ + // this.fired = false; + + /** + * An array containing the arguments the custom event + * was last fired with. + * @property firedWith + * @type Array + */ + // this.firedWith; + + /** + * This event should only fire one time if true, and if + * it has fired, any new subscribers should be notified + * immediately. + * + * @property fireOnce + * @type boolean + * @default false; + */ + // this.fireOnce = false; + + /** + * fireOnce listeners will fire syncronously unless async + * is set to true + * @property async + * @type boolean + * @default false + */ + //this.async = false; + + /** + * Flag for stopPropagation that is modified during fire() + * 1 means to stop propagation to bubble targets. 2 means + * to also stop additional subscribers on this target. + * @property stopped + * @type int + */ + // this.stopped = 0; + + /** + * Flag for preventDefault that is modified during fire(). + * if it is not 0, the default behavior for this event + * @property prevented + * @type int + */ + // this.prevented = 0; + + /** + * Specifies the host for this custom event. This is used + * to enable event bubbling + * @property host + * @type EventTarget + */ + // this.host = null; + + /** + * The default function to execute after event listeners + * have fire, but only if the default action was not + * prevented. + * @property defaultFn + * @type Function + */ + // this.defaultFn = null; + + /** + * The function to execute if a subscriber calls + * stopPropagation or stopImmediatePropagation + * @property stoppedFn + * @type Function + */ + // this.stoppedFn = null; + + /** + * The function to execute if a subscriber calls + * preventDefault + * @property preventedFn + * @type Function + */ + // this.preventedFn = null; + + /** + * Specifies whether or not this event's default function + * can be cancelled by a subscriber by executing preventDefault() + * on the event facade + * @property preventable + * @type boolean + * @default true + */ + this.preventable = true; + + /** + * Specifies whether or not a subscriber can stop the event propagation + * via stopPropagation(), stopImmediatePropagation(), or halt() + * + * Events can only bubble if emitFacade is true. + * + * @property bubbles + * @type boolean + * @default true + */ + this.bubbles = true; + + /** + * Supports multiple options for listener signatures in order to + * port YUI 2 apps. + * @property signature + * @type int + * @default 9 + */ + this.signature = YUI3_SIGNATURE; + + this.subCount = 0; + this.afterCount = 0; + + // this.hasSubscribers = false; + + // this.hasAfters = false; + + /** + * If set to true, the custom event will deliver an EventFacade object + * that is similar to a DOM event object. + * @property emitFacade + * @type boolean + * @default false + */ + // this.emitFacade = false; + + this.applyConfig(o, true); + + // this.log("Creating " + this.type); + +}; + +Y.CustomEvent.prototype = { + + hasSubs: function(when) { + var s = this.subCount, a = this.afterCount, sib = this.sibling; + + if (sib) { + s += sib.subCount; + a += sib.afterCount; + } + + if (when) { + return (when == 'after') ? a : s; + } + + return (s + a); + }, + + /** + * Monitor the event state for the subscribed event. The first parameter + * is what should be monitored, the rest are the normal parameters when + * subscribing to an event. + * @method monitor + * @param what {string} what to monitor ('detach', 'attach', 'publish'). + * @return {EventHandle} return value from the monitor event subscription. + */ + monitor: function(what) { + this.monitored = true; + var type = this.id + '|' + this.type + '_' + what, + args = Y.Array(arguments, 0, true); + args[0] = type; + return this.host.on.apply(this.host, args); + }, + + /** + * Get all of the subscribers to this event and any sibling event + * @method getSubs + * @return {Array} first item is the on subscribers, second the after. + */ + getSubs: function() { + var s = Y.merge(this.subscribers), a = Y.merge(this.afters), sib = this.sibling; + + if (sib) { + Y.mix(s, sib.subscribers); + Y.mix(a, sib.afters); + } + + return [s, a]; + }, + + /** + * Apply configuration properties. Only applies the CONFIG whitelist + * @method applyConfig + * @param o hash of properties to apply. + * @param force {boolean} if true, properties that exist on the event + * will be overwritten. + */ + applyConfig: function(o, force) { + if (o) { + Y.mix(this, o, force, CONFIGS); + } + }, + + _on: function(fn, context, args, when) { + + if (!fn) { + this.log('Invalid callback for CE: ' + this.type); + } + + var s = new Y.Subscriber(fn, context, args, when); + + if (this.fireOnce && this.fired) { + if (this.async) { + setTimeout(Y.bind(this._notify, this, s, this.firedWith), 0); + } else { + this._notify(s, this.firedWith); + } + } + + if (when == AFTER) { + this.afters[s.id] = s; + this.afterCount++; + } else { + this.subscribers[s.id] = s; + this.subCount++; + } + + return new Y.EventHandle(this, s); + + }, + + /** + * Listen for this event + * @method subscribe + * @param {Function} fn The function to execute. + * @return {EventHandle} Unsubscribe handle. + * @deprecated use on. + */ + subscribe: function(fn, context) { + var a = (arguments.length > 2) ? Y.Array(arguments, 2, true) : null; + return this._on(fn, context, a, true); + }, + + /** + * Listen for this event + * @method on + * @param {Function} fn The function to execute. + * @param {object} context optional execution context. + * @param {mixed} arg* 0..n additional arguments to supply to the subscriber + * when the event fires. + * @return {EventHandle} An object with a detach method to detch the handler(s). + */ + on: function(fn, context) { + var a = (arguments.length > 2) ? Y.Array(arguments, 2, true) : null; + if (this.host) { + this.host._monitor('attach', this.type, { + args: arguments + }); + } + return this._on(fn, context, a, true); + }, + + /** + * Listen for this event after the normal subscribers have been notified and + * the default behavior has been applied. If a normal subscriber prevents the + * default behavior, it also prevents after listeners from firing. + * @method after + * @param {Function} fn The function to execute. + * @param {object} context optional execution context. + * @param {mixed} arg* 0..n additional arguments to supply to the subscriber + * when the event fires. + * @return {EventHandle} handle Unsubscribe handle. + */ + after: function(fn, context) { + var a = (arguments.length > 2) ? Y.Array(arguments, 2, true) : null; + return this._on(fn, context, a, AFTER); + }, + + /** + * Detach listeners. + * @method detach + * @param {Function} fn The subscribed function to remove, if not supplied + * all will be removed. + * @param {Object} context The context object passed to subscribe. + * @return {int} returns the number of subscribers unsubscribed. + */ + detach: function(fn, context) { + // unsubscribe handle + if (fn && fn.detach) { + return fn.detach(); + } + + var i, s, + found = 0, + subs = Y.merge(this.subscribers, this.afters); + + for (i in subs) { + if (subs.hasOwnProperty(i)) { + s = subs[i]; + if (s && (!fn || fn === s.fn)) { + this._delete(s); + found++; + } + } + } + + return found; + }, + + /** + * Detach listeners. + * @method unsubscribe + * @param {Function} fn The subscribed function to remove, if not supplied + * all will be removed. + * @param {Object} context The context object passed to subscribe. + * @return {int|undefined} returns the number of subscribers unsubscribed. + * @deprecated use detach. + */ + unsubscribe: function() { + return this.detach.apply(this, arguments); + }, + + /** + * Notify a single subscriber + * @method _notify + * @param {Subscriber} s the subscriber. + * @param {Array} args the arguments array to apply to the listener. + * @private + */ + _notify: function(s, args, ef) { + + this.log(this.type + '->' + 'sub: ' + s.id); + + var ret; + + ret = s.notify(args, this); + + if (false === ret || this.stopped > 1) { + this.log(this.type + ' cancelled by subscriber'); + return false; + } + + return true; + }, + + /** + * Logger abstraction to centralize the application of the silent flag + * @method log + * @param {string} msg message to log. + * @param {string} cat log category. + */ + log: function(msg, cat) { + if (!this.silent) { + } + }, + + /** + * Notifies the subscribers. The callback functions will be executed + * from the context specified when the event was created, and with the + * following parameters: + *
            + *
          • The type of event
          • + *
          • All of the arguments fire() was executed with as an array
          • + *
          • The custom object (if any) that was passed into the subscribe() + * method
          • + *
          + * @method fire + * @param {Object*} arguments an arbitrary set of parameters to pass to + * the handler. + * @return {boolean} false if one of the subscribers returned false, + * true otherwise. + * + */ + fire: function() { + if (this.fireOnce && this.fired) { + this.log('fireOnce event: ' + this.type + ' already fired'); + return true; + } else { + + var args = Y.Array(arguments, 0, true); + + // this doesn't happen if the event isn't published + // this.host._monitor('fire', this.type, args); + + this.fired = true; + this.firedWith = args; + + if (this.emitFacade) { + return this.fireComplex(args); + } else { + return this.fireSimple(args); + } + } + }, + + fireSimple: function(args) { + this.stopped = 0; + this.prevented = 0; + if (this.hasSubs()) { + // this._procSubs(Y.merge(this.subscribers, this.afters), args); + var subs = this.getSubs(); + this._procSubs(subs[0], args); + this._procSubs(subs[1], args); + } + this._broadcast(args); + return this.stopped ? false : true; + }, + + // Requires the event-custom-complex module for full funcitonality. + fireComplex: function(args) { + args[0] = args[0] || {}; + return this.fireSimple(args); + }, + + _procSubs: function(subs, args, ef) { + var s, i; + for (i in subs) { + if (subs.hasOwnProperty(i)) { + s = subs[i]; + if (s && s.fn) { + if (false === this._notify(s, args, ef)) { + this.stopped = 2; + } + if (this.stopped == 2) { + return false; + } + } + } + } + + return true; + }, + + _broadcast: function(args) { + if (!this.stopped && this.broadcast) { + + var a = Y.Array(args); + a.unshift(this.type); + + if (this.host !== Y) { + Y.fire.apply(Y, a); + } + + if (this.broadcast == 2) { + Y.Global.fire.apply(Y.Global, a); + } + } + }, + + /** + * Removes all listeners + * @method unsubscribeAll + * @return {int} The number of listeners unsubscribed. + * @deprecated use detachAll. + */ + unsubscribeAll: function() { + return this.detachAll.apply(this, arguments); + }, + + /** + * Removes all listeners + * @method detachAll + * @return {int} The number of listeners unsubscribed. + */ + detachAll: function() { + return this.detach(); + }, + + /** + * @method _delete + * @param subscriber object. + * @private + */ + _delete: function(s) { + if (s) { + if (this.subscribers[s.id]) { + delete this.subscribers[s.id]; + this.subCount--; + } + if (this.afters[s.id]) { + delete this.afters[s.id]; + this.afterCount--; + } + } + + if (this.host) { + this.host._monitor('detach', this.type, { + ce: this, + sub: s + }); + } + + if (s) { + // delete s.fn; + // delete s.context; + s.deleted = true; + } + } +}; + +///////////////////////////////////////////////////////////////////// + +/** + * Stores the subscriber information to be used when the event fires. + * @param {Function} fn The wrapped function to execute. + * @param {Object} context The value of the keyword 'this' in the listener. + * @param {Array} args* 0..n additional arguments to supply the listener. + * + * @class Subscriber + * @constructor + */ +Y.Subscriber = function(fn, context, args) { + + /** + * The callback that will be execute when the event fires + * This is wrapped by Y.rbind if obj was supplied. + * @property fn + * @type Function + */ + this.fn = fn; + + /** + * Optional 'this' keyword for the listener + * @property context + * @type Object + */ + this.context = context; + + /** + * Unique subscriber id + * @property id + * @type String + */ + this.id = Y.stamp(this); + + /** + * Additional arguments to propagate to the subscriber + * @property args + * @type Array + */ + this.args = args; + + /** + * Custom events for a given fire transaction. + * @property events + * @type {EventTarget} + */ + // this.events = null; + + /** + * This listener only reacts to the event once + * @property once + */ + // this.once = false; + +}; + +Y.Subscriber.prototype = { + + _notify: function(c, args, ce) { + if (this.deleted && !this.postponed) { + if (this.postponed) { + delete this.fn; + delete this.context; + } else { + delete this.postponed; + return null; + } + } + var a = this.args, ret; + switch (ce.signature) { + case 0: + ret = this.fn.call(c, ce.type, args, c); + break; + case 1: + ret = this.fn.call(c, args[0] || null, c); + break; + default: + if (a || args) { + args = args || []; + a = (a) ? args.concat(a) : args; + ret = this.fn.apply(c, a); + } else { + ret = this.fn.call(c); + } + } + + if (this.once) { + ce._delete(this); + } + + return ret; + }, + + /** + * Executes the subscriber. + * @method notify + * @param args {Array} Arguments array for the subscriber. + * @param ce {CustomEvent} The custom event that sent the notification. + */ + notify: function(args, ce) { + var c = this.context, + ret = true; + + if (!c) { + c = (ce.contextFn) ? ce.contextFn() : ce.context; + } + + // only catch errors if we will not re-throw them. + if (Y.config.throwFail) { + ret = this._notify(c, args, ce); + } else { + try { + ret = this._notify(c, args, ce); + } catch (e) { + Y.error(this + ' failed: ' + e.message, e); + } + } + + return ret; + }, + + /** + * Returns true if the fn and obj match this objects properties. + * Used by the unsubscribe method to match the right subscriber. + * + * @method contains + * @param {Function} fn the function to execute. + * @param {Object} context optional 'this' keyword for the listener. + * @return {boolean} true if the supplied arguments match this + * subscriber's signature. + */ + contains: function(fn, context) { + if (context) { + return ((this.fn == fn) && this.context == context); + } else { + return (this.fn == fn); + } + } + +}; + +/** + * Custom event engine, DOM event listener abstraction layer, synthetic DOM + * events. + * @module event-custom + * @submodule event-custom-base + */ + +/** + * EventTarget provides the implementation for any object to + * publish, subscribe and fire to custom events, and also + * alows other EventTargets to target the object with events + * sourced from the other object. + * EventTarget is designed to be used with Y.augment to wrap + * EventCustom in an interface that allows events to be listened to + * and fired by name. This makes it possible for implementing code to + * subscribe to an event that either has not been created yet, or will + * not be created at all. + * @class EventTarget + * @param opts a configuration object + * @config emitFacade {boolean} if true, all events will emit event + * facade payloads by default (default false) + * @config prefix {string} the prefix to apply to non-prefixed event names + * @config chain {boolean} if true, on/after/detach return the host to allow + * chaining, otherwise they return an EventHandle (default false) + */ + +var L = Y.Lang, + PREFIX_DELIMITER = ':', + CATEGORY_DELIMITER = '|', + AFTER_PREFIX = '~AFTER~', + YArray = Y.Array, + + _wildType = Y.cached(function(type) { + return type.replace(/(.*)(:)(.*)/, "*$2$3"); + }), + + /** + * If the instance has a prefix attribute and the + * event type is not prefixed, the instance prefix is + * applied to the supplied type. + * @method _getType + * @private + */ + _getType = Y.cached(function(type, pre) { + + if (!pre || !L.isString(type) || type.indexOf(PREFIX_DELIMITER) > -1) { + return type; + } + + return pre + PREFIX_DELIMITER + type; + }), + + /** + * Returns an array with the detach key (if provided), + * and the prefixed event name from _getType + * Y.on('detachcategory| menu:click', fn) + * @method _parseType + * @private + */ + _parseType = Y.cached(function(type, pre) { + + var t = type, detachcategory, after, i; + + if (!L.isString(t)) { + return t; + } + + i = t.indexOf(AFTER_PREFIX); + + if (i > -1) { + after = true; + t = t.substr(AFTER_PREFIX.length); + } + + i = t.indexOf(CATEGORY_DELIMITER); + + if (i > -1) { + detachcategory = t.substr(0, (i)); + t = t.substr(i+1); + if (t == '*') { + t = null; + } + } + + // detach category, full type with instance prefix, is this an after listener, short type + return [detachcategory, (pre) ? _getType(t, pre) : t, after, t]; + }), + + ET = function(opts) { + + + var o = (L.isObject(opts)) ? opts : {}; + + this._yuievt = this._yuievt || { + + id: Y.guid(), + + events: {}, + + targets: {}, + + config: o, + + chain: ('chain' in o) ? o.chain : Y.config.chain, + + bubbling: false, + + defaults: { + context: o.context || this, + host: this, + emitFacade: o.emitFacade, + fireOnce: o.fireOnce, + queuable: o.queuable, + monitored: o.monitored, + broadcast: o.broadcast, + defaultTargetOnly: o.defaultTargetOnly, + bubbles: ('bubbles' in o) ? o.bubbles : true + } + }; + + }; + + +ET.prototype = { + + /** + * Listen to a custom event hosted by this object one time. + * This is the equivalent to on except the + * listener is immediatelly detached when it is executed. + * @method once + * @param type {string} The type of the event + * @param fn {Function} The callback + * @param context {object} optional execution context. + * @param arg* {mixed} 0..n additional arguments to supply to the subscriber + * @return the event target or a detach handle per 'chain' config + */ + once: function() { + var handle = this.on.apply(this, arguments); + handle.batch(function(hand) { + if (hand.sub) { + hand.sub.once = true; + } + }); + return handle; + }, + + /** + * Takes the type parameter passed to 'on' and parses out the + * various pieces that could be included in the type. If the + * event type is passed without a prefix, it will be expanded + * to include the prefix one is supplied or the event target + * is configured with a default prefix. + * @method parseType + * @param {string} type the type + * @param {string} [pre=this._yuievt.config.prefix] the prefix + * @since 3.3.0 + * @return {Array} an array containing: + * * the detach category, if supplied, + * * the prefixed event type, + * * whether or not this is an after listener, + * * the supplied event type + */ + parseType: function(type, pre) { + return _parseType(type, pre || this._yuievt.config.prefix); + }, + + /** + * Subscribe to a custom event hosted by this object + * @method on + * @param type {string} The type of the event + * @param fn {Function} The callback + * @param context {object} optional execution context. + * @param arg* {mixed} 0..n additional arguments to supply to the subscriber + * @return the event target or a detach handle per 'chain' config + */ + on: function(type, fn, context) { + + var parts = _parseType(type, this._yuievt.config.prefix), f, c, args, ret, ce, + detachcategory, handle, store = Y.Env.evt.handles, after, adapt, shorttype, + Node = Y.Node, n, domevent, isArr; + + // full name, args, detachcategory, after + this._monitor('attach', parts[1], { + args: arguments, + category: parts[0], + after: parts[2] + }); + + if (L.isObject(type)) { + + if (L.isFunction(type)) { + return Y.Do.before.apply(Y.Do, arguments); + } + + f = fn; + c = context; + args = YArray(arguments, 0, true); + ret = []; + + if (L.isArray(type)) { + isArr = true; + } + + after = type._after; + delete type._after; + + Y.each(type, function(v, k) { + + if (L.isObject(v)) { + f = v.fn || ((L.isFunction(v)) ? v : f); + c = v.context || c; + } + + var nv = (after) ? AFTER_PREFIX : ''; + + args[0] = nv + ((isArr) ? v : k); + args[1] = f; + args[2] = c; + + ret.push(this.on.apply(this, args)); + + }, this); + + return (this._yuievt.chain) ? this : new Y.EventHandle(ret); + + } + + detachcategory = parts[0]; + after = parts[2]; + shorttype = parts[3]; + + // extra redirection so we catch adaptor events too. take a look at this. + if (Node && Y.instanceOf(this, Node) && (shorttype in Node.DOM_EVENTS)) { + args = YArray(arguments, 0, true); + args.splice(2, 0, Node.getDOMNode(this)); + return Y.on.apply(Y, args); + } + + type = parts[1]; + + if (Y.instanceOf(this, YUI)) { + + adapt = Y.Env.evt.plugins[type]; + args = YArray(arguments, 0, true); + args[0] = shorttype; + + if (Node) { + n = args[2]; + + if (Y.instanceOf(n, Y.NodeList)) { + n = Y.NodeList.getDOMNodes(n); + } else if (Y.instanceOf(n, Node)) { + n = Node.getDOMNode(n); + } + + domevent = (shorttype in Node.DOM_EVENTS); + + // Captures both DOM events and event plugins. + if (domevent) { + args[2] = n; + } + } + + // check for the existance of an event adaptor + if (adapt) { + handle = adapt.on.apply(Y, args); + } else if ((!type) || domevent) { + handle = Y.Event._attach(args); + } + + } + + if (!handle) { + ce = this._yuievt.events[type] || this.publish(type); + handle = ce._on(fn, context, (arguments.length > 3) ? YArray(arguments, 3, true) : null, (after) ? 'after' : true); + } + + if (detachcategory) { + store[detachcategory] = store[detachcategory] || {}; + store[detachcategory][type] = store[detachcategory][type] || []; + store[detachcategory][type].push(handle); + } + + return (this._yuievt.chain) ? this : handle; + + }, + + /** + * subscribe to an event + * @method subscribe + * @deprecated use on + */ + subscribe: function() { + return this.on.apply(this, arguments); + }, + + /** + * Detach one or more listeners the from the specified event + * @method detach + * @param type {string|Object} Either the handle to the subscriber or the + * type of event. If the type + * is not specified, it will attempt to remove + * the listener from all hosted events. + * @param fn {Function} The subscribed function to unsubscribe, if not + * supplied, all subscribers will be removed. + * @param context {Object} The custom object passed to subscribe. This is + * optional, but if supplied will be used to + * disambiguate multiple listeners that are the same + * (e.g., you subscribe many object using a function + * that lives on the prototype) + * @return {EventTarget} the host + */ + detach: function(type, fn, context) { + var evts = this._yuievt.events, i, + Node = Y.Node, isNode = Node && (Y.instanceOf(this, Node)); + + // detachAll disabled on the Y instance. + if (!type && (this !== Y)) { + for (i in evts) { + if (evts.hasOwnProperty(i)) { + evts[i].detach(fn, context); + } + } + if (isNode) { + Y.Event.purgeElement(Node.getDOMNode(this)); + } + + return this; + } + + var parts = _parseType(type, this._yuievt.config.prefix), + detachcategory = L.isArray(parts) ? parts[0] : null, + shorttype = (parts) ? parts[3] : null, + adapt, store = Y.Env.evt.handles, detachhost, cat, args, + ce, + + keyDetacher = function(lcat, ltype, host) { + var handles = lcat[ltype], ce, i; + if (handles) { + for (i = handles.length - 1; i >= 0; --i) { + ce = handles[i].evt; + if (ce.host === host || ce.el === host) { + handles[i].detach(); + } + } + } + }; + + if (detachcategory) { + + cat = store[detachcategory]; + type = parts[1]; + detachhost = (isNode) ? Y.Node.getDOMNode(this) : this; + + if (cat) { + if (type) { + keyDetacher(cat, type, detachhost); + } else { + for (i in cat) { + if (cat.hasOwnProperty(i)) { + keyDetacher(cat, i, detachhost); + } + } + } + + return this; + } + + // If this is an event handle, use it to detach + } else if (L.isObject(type) && type.detach) { + type.detach(); + return this; + // extra redirection so we catch adaptor events too. take a look at this. + } else if (isNode && ((!shorttype) || (shorttype in Node.DOM_EVENTS))) { + args = YArray(arguments, 0, true); + args[2] = Node.getDOMNode(this); + Y.detach.apply(Y, args); + return this; + } + + adapt = Y.Env.evt.plugins[shorttype]; + + // The YUI instance handles DOM events and adaptors + if (Y.instanceOf(this, YUI)) { + args = YArray(arguments, 0, true); + // use the adaptor specific detach code if + if (adapt && adapt.detach) { + adapt.detach.apply(Y, args); + return this; + // DOM event fork + } else if (!type || (!adapt && Node && (type in Node.DOM_EVENTS))) { + args[0] = type; + Y.Event.detach.apply(Y.Event, args); + return this; + } + } + + // ce = evts[type]; + ce = evts[parts[1]]; + if (ce) { + ce.detach(fn, context); + } + + return this; + }, + + /** + * detach a listener + * @method unsubscribe + * @deprecated use detach + */ + unsubscribe: function() { + return this.detach.apply(this, arguments); + }, + + /** + * Removes all listeners from the specified event. If the event type + * is not specified, all listeners from all hosted custom events will + * be removed. + * @method detachAll + * @param type {string} The type, or name of the event + */ + detachAll: function(type) { + return this.detach(type); + }, + + /** + * Removes all listeners from the specified event. If the event type + * is not specified, all listeners from all hosted custom events will + * be removed. + * @method unsubscribeAll + * @param type {string} The type, or name of the event + * @deprecated use detachAll + */ + unsubscribeAll: function() { + return this.detachAll.apply(this, arguments); + }, + + /** + * Creates a new custom event of the specified type. If a custom event + * by that name already exists, it will not be re-created. In either + * case the custom event is returned. + * + * @method publish + * + * @param type {string} the type, or name of the event + * @param opts {object} optional config params. Valid properties are: + * + *
            + *
          • + * 'broadcast': whether or not the YUI instance and YUI global are notified when the event is fired (false) + *
          • + *
          • + * 'bubbles': whether or not this event bubbles (true) + * Events can only bubble if emitFacade is true. + *
          • + *
          • + * 'context': the default execution context for the listeners (this) + *
          • + *
          • + * 'defaultFn': the default function to execute when this event fires if preventDefault was not called + *
          • + *
          • + * 'emitFacade': whether or not this event emits a facade (false) + *
          • + *
          • + * 'prefix': the prefix for this targets events, e.g., 'menu' in 'menu:click' + *
          • + *
          • + * 'fireOnce': if an event is configured to fire once, new subscribers after + * the fire will be notified immediately. + *
          • + *
          • + * 'async': fireOnce event listeners will fire synchronously if the event has already + * fired unless async is true. + *
          • + *
          • + * 'preventable': whether or not preventDefault() has an effect (true) + *
          • + *
          • + * 'preventedFn': a function that is executed when preventDefault is called + *
          • + *
          • + * 'queuable': whether or not this event can be queued during bubbling (false) + *
          • + *
          • + * 'silent': if silent is true, debug messages are not provided for this event. + *
          • + *
          • + * 'stoppedFn': a function that is executed when stopPropagation is called + *
          • + * + *
          • + * 'monitored': specifies whether or not this event should send notifications about + * when the event has been attached, detached, or published. + *
          • + *
          • + * 'type': the event type (valid option if not provided as the first parameter to publish) + *
          • + *
          + * + * @return {CustomEvent} the custom event + * + */ + publish: function(type, opts) { + var events, ce, ret, defaults, + edata = this._yuievt, + pre = edata.config.prefix; + + type = (pre) ? _getType(type, pre) : type; + + this._monitor('publish', type, { + args: arguments + }); + + if (L.isObject(type)) { + ret = {}; + Y.each(type, function(v, k) { + ret[k] = this.publish(k, v || opts); + }, this); + + return ret; + } + + events = edata.events; + ce = events[type]; + + if (ce) { +// ce.log("publish applying new config to published event: '"+type+"' exists", 'info', 'event'); + if (opts) { + ce.applyConfig(opts, true); + } + } else { + + defaults = edata.defaults; + + // apply defaults + ce = new Y.CustomEvent(type, + (opts) ? Y.merge(defaults, opts) : defaults); + events[type] = ce; + } + + // make sure we turn the broadcast flag off if this + // event was published as a result of bubbling + // if (opts instanceof Y.CustomEvent) { + // events[type].broadcast = false; + // } + + return events[type]; + }, + + /** + * This is the entry point for the event monitoring system. + * You can monitor 'attach', 'detach', 'fire', and 'publish'. + * When configured, these events generate an event. click -> + * click_attach, click_detach, click_publish -- these can + * be subscribed to like other events to monitor the event + * system. Inividual published events can have monitoring + * turned on or off (publish can't be turned off before it + * it published) by setting the events 'monitor' config. + * + * @private + */ + _monitor: function(what, type, o) { + var monitorevt, ce = this.getEvent(type); + if ((this._yuievt.config.monitored && (!ce || ce.monitored)) || (ce && ce.monitored)) { + monitorevt = type + '_' + what; + o.monitored = what; + this.fire.call(this, monitorevt, o); + } + }, + + /** + * Fire a custom event by name. The callback functions will be executed + * from the context specified when the event was created, and with the + * following parameters. + * + * If the custom event object hasn't been created, then the event hasn't + * been published and it has no subscribers. For performance sake, we + * immediate exit in this case. This means the event won't bubble, so + * if the intention is that a bubble target be notified, the event must + * be published on this object first. + * + * The first argument is the event type, and any additional arguments are + * passed to the listeners as parameters. If the first of these is an + * object literal, and the event is configured to emit an event facade, + * that object is mixed into the event facade and the facade is provided + * in place of the original object. + * + * @method fire + * @param type {String|Object} The type of the event, or an object that contains + * a 'type' property. + * @param arguments {Object*} an arbitrary set of parameters to pass to + * the handler. If the first of these is an object literal and the event is + * configured to emit an event facade, the event facade will replace that + * parameter after the properties the object literal contains are copied to + * the event facade. + * @return {EventTarget} the event host + * + */ + fire: function(type) { + + var typeIncluded = L.isString(type), + t = (typeIncluded) ? type : (type && type.type), + ce, ret, pre = this._yuievt.config.prefix, ce2, + args = (typeIncluded) ? YArray(arguments, 1, true) : arguments; + + t = (pre) ? _getType(t, pre) : t; + + this._monitor('fire', t, { + args: args + }); + + ce = this.getEvent(t, true); + ce2 = this.getSibling(t, ce); + + if (ce2 && !ce) { + ce = this.publish(t); + } + + // this event has not been published or subscribed to + if (!ce) { + if (this._yuievt.hasTargets) { + return this.bubble({ type: t }, args, this); + } + + // otherwise there is nothing to be done + ret = true; + } else { + ce.sibling = ce2; + ret = ce.fire.apply(ce, args); + } + + return (this._yuievt.chain) ? this : ret; + }, + + getSibling: function(type, ce) { + var ce2; + // delegate to *:type events if there are subscribers + if (type.indexOf(PREFIX_DELIMITER) > -1) { + type = _wildType(type); + // console.log(type); + ce2 = this.getEvent(type, true); + if (ce2) { + // console.log("GOT ONE: " + type); + ce2.applyConfig(ce); + ce2.bubbles = false; + ce2.broadcast = 0; + // ret = ce2.fire.apply(ce2, a); + } + } + + return ce2; + }, + + /** + * Returns the custom event of the provided type has been created, a + * falsy value otherwise + * @method getEvent + * @param type {string} the type, or name of the event + * @param prefixed {string} if true, the type is prefixed already + * @return {CustomEvent} the custom event or null + */ + getEvent: function(type, prefixed) { + var pre, e; + if (!prefixed) { + pre = this._yuievt.config.prefix; + type = (pre) ? _getType(type, pre) : type; + } + e = this._yuievt.events; + return e[type] || null; + }, + + /** + * Subscribe to a custom event hosted by this object. The + * supplied callback will execute after any listeners add + * via the subscribe method, and after the default function, + * if configured for the event, has executed. + * @method after + * @param type {string} The type of the event + * @param fn {Function} The callback + * @param context {object} optional execution context. + * @param arg* {mixed} 0..n additional arguments to supply to the subscriber + * @return the event target or a detach handle per 'chain' config + */ + after: function(type, fn) { + + var a = YArray(arguments, 0, true); + + switch (L.type(type)) { + case 'function': + return Y.Do.after.apply(Y.Do, arguments); + case 'array': + // YArray.each(a[0], function(v) { + // v = AFTER_PREFIX + v; + // }); + // break; + case 'object': + a[0]._after = true; + break; + default: + a[0] = AFTER_PREFIX + type; + } + + return this.on.apply(this, a); + + }, + + /** + * Executes the callback before a DOM event, custom event + * or method. If the first argument is a function, it + * is assumed the target is a method. For DOM and custom + * events, this is an alias for Y.on. + * + * For DOM and custom events: + * type, callback, context, 0-n arguments + * + * For methods: + * callback, object (method host), methodName, context, 0-n arguments + * + * @method before + * @return detach handle + */ + before: function() { + return this.on.apply(this, arguments); + } + +}; + +Y.EventTarget = ET; + +// make Y an event target +Y.mix(Y, ET.prototype, false, false, { + bubbles: false +}); + +ET.call(Y); + +YUI.Env.globalEvents = YUI.Env.globalEvents || new ET(); + +/** + * Hosts YUI page level events. This is where events bubble to + * when the broadcast config is set to 2. This property is + * only available if the custom event module is loaded. + * @property Global + * @type EventTarget + * @for YUI + */ +Y.Global = YUI.Env.globalEvents; + +// @TODO implement a global namespace function on Y.Global? + +/** + * YUI's on method is a unified interface for subscribing to + * most events exposed by YUI. This includes custom events, DOM events, and + * function events. detach is also provided to remove listeners + * serviced by this function. + * + * The signature that on accepts varies depending on the type + * of event being consumed. Refer to the specific methods that will + * service a specific request for additional information about subscribing + * to that type of event. + * + *
            + *
          • Custom events. These events are defined by various + * modules in the library. This type of event is delegated to + * EventTarget's on method. + *
              + *
            • The type of the event
            • + *
            • The callback to execute
            • + *
            • An optional context object
            • + *
            • 0..n additional arguments to supply the callback.
            • + *
            + * Example: + * Y.on('drag:drophit', function() { // start work }); + *
          • + *
          • DOM events. These are moments reported by the browser related + * to browser functionality and user interaction. + * This type of event is delegated to Event's + * attach method. + *
              + *
            • The type of the event
            • + *
            • The callback to execute
            • + *
            • The specification for the Node(s) to attach the listener + * to. This can be a selector, collections, or Node/Element + * refereces.
            • + *
            • An optional context object
            • + *
            • 0..n additional arguments to supply the callback.
            • + *
            + * Example: + * Y.on('click', function(e) { // something was clicked }, '#someelement'); + *
          • + *
          • Function events. These events can be used to react before or after a + * function is executed. This type of event is delegated to Event.Do's + * before method. + *
              + *
            • The callback to execute
            • + *
            • The object that has the function that will be listened for.
            • + *
            • The name of the function to listen for.
            • + *
            • An optional context object
            • + *
            • 0..n additional arguments to supply the callback.
            • + *
            + * Example Y.on(function(arg1, arg2, etc) { // obj.methodname was executed }, obj 'methodname'); + *
          • + *
          + * + * on corresponds to the moment before any default behavior of + * the event. after works the same way, but these listeners + * execute after the event's default behavior. before is an + * alias for on. + * + * @method on + * @param type event type (this parameter does not apply for function events) + * @param fn the callback + * @param context optionally change the value of 'this' in the callback + * @param args* 0..n additional arguments to pass to the callback. + * @return the event target or a detach handle per 'chain' config + * @for YUI + */ + + /** + * Listen for an event one time. Equivalent to on, except that + * the listener is immediately detached when executed. + * @see on + * @method once + * @param type event type (this parameter does not apply for function events) + * @param fn the callback + * @param context optionally change the value of 'this' in the callback + * @param args* 0..n additional arguments to pass to the callback. + * @return the event target or a detach handle per 'chain' config + * @for YUI + */ + +/** + * after() is a unified interface for subscribing to + * most events exposed by YUI. This includes custom events, + * DOM events, and AOP events. This works the same way as + * the on() function, only it operates after any default + * behavior for the event has executed. @see on for more + * information. + * @method after + * @param type event type (this parameter does not apply for function events) + * @param fn the callback + * @param context optionally change the value of 'this' in the callback + * @param args* 0..n additional arguments to pass to the callback. + * @return the event target or a detach handle per 'chain' config + * @for YUI + */ + + +}, '3.3.0' ,{requires:['oop']}); +var GLOBAL_ENV = YUI.Env; + +if (!GLOBAL_ENV._ready) { + GLOBAL_ENV._ready = function() { + GLOBAL_ENV.DOMReady = true; + GLOBAL_ENV.remove(YUI.config.doc, 'DOMContentLoaded', GLOBAL_ENV._ready); + }; + + // if (!YUI.UA.ie) { + GLOBAL_ENV.add(YUI.config.doc, 'DOMContentLoaded', GLOBAL_ENV._ready); + // } +} + +YUI.add('event-base', function(Y) { + +/* + * DOM event listener abstraction layer + * @module event + * @submodule event-base + */ + +/** + * The domready event fires at the moment the browser's DOM is + * usable. In most cases, this is before images are fully + * downloaded, allowing you to provide a more responsive user + * interface. + * + * In YUI 3, domready subscribers will be notified immediately if + * that moment has already passed when the subscription is created. + * + * One exception is if the yui.js file is dynamically injected into + * the page. If this is done, you must tell the YUI instance that + * you did this in order for DOMReady (and window load events) to + * fire normally. That configuration option is 'injected' -- set + * it to true if the yui.js script is not included inline. + * + * This method is part of the 'event-ready' module, which is a + * submodule of 'event'. + * + * @event domready + * @for YUI + */ +Y.publish('domready', { + fireOnce: true, + async: true +}); + +if (GLOBAL_ENV.DOMReady) { + Y.fire('domready'); +} else { + Y.Do.before(function() { Y.fire('domready'); }, YUI.Env, '_ready'); +} + +/** + * Custom event engine, DOM event listener abstraction layer, synthetic DOM + * events. + * @module event + * @submodule event-base + */ + +/** + * Wraps a DOM event, properties requiring browser abstraction are + * fixed here. Provids a security layer when required. + * @class DOMEventFacade + * @param ev {Event} the DOM event + * @param currentTarget {HTMLElement} the element the listener was attached to + * @param wrapper {Event.Custom} the custom event wrapper for this DOM event + */ + + var ua = Y.UA, + + EMPTY = {}, + + /** + * webkit key remapping required for Safari < 3.1 + * @property webkitKeymap + * @private + */ + webkitKeymap = { + 63232: 38, // up + 63233: 40, // down + 63234: 37, // left + 63235: 39, // right + 63276: 33, // page up + 63277: 34, // page down + 25: 9, // SHIFT-TAB (Safari provides a different key code in + // this case, even though the shiftKey modifier is set) + 63272: 46, // delete + 63273: 36, // home + 63275: 35 // end + }, + + /** + * Returns a wrapped node. Intended to be used on event targets, + * so it will return the node's parent if the target is a text + * node. + * + * If accessing a property of the node throws an error, this is + * probably the anonymous div wrapper Gecko adds inside text + * nodes. This likely will only occur when attempting to access + * the relatedTarget. In this case, we now return null because + * the anonymous div is completely useless and we do not know + * what the related target was because we can't even get to + * the element's parent node. + * + * @method resolve + * @private + */ + resolve = function(n) { + if (!n) { + return n; + } + try { + if (n && 3 == n.nodeType) { + n = n.parentNode; + } + } catch(e) { + return null; + } + + return Y.one(n); + }, + + DOMEventFacade = function(ev, currentTarget, wrapper) { + this._event = ev; + this._currentTarget = currentTarget; + this._wrapper = wrapper || EMPTY; + + // if not lazy init + this.init(); + }; + +Y.extend(DOMEventFacade, Object, { + + init: function() { + + var e = this._event, + overrides = this._wrapper.overrides, + x = e.pageX, + y = e.pageY, + c, + currentTarget = this._currentTarget; + + this.altKey = e.altKey; + this.ctrlKey = e.ctrlKey; + this.metaKey = e.metaKey; + this.shiftKey = e.shiftKey; + this.type = (overrides && overrides.type) || e.type; + this.clientX = e.clientX; + this.clientY = e.clientY; + + this.pageX = x; + this.pageY = y; + + c = e.keyCode || e.charCode; + + if (ua.webkit && (c in webkitKeymap)) { + c = webkitKeymap[c]; + } + + this.keyCode = c; + this.charCode = c; + this.which = e.which || e.charCode || c; + // this.button = e.button; + this.button = this.which; + + this.target = resolve(e.target); + this.currentTarget = resolve(currentTarget); + this.relatedTarget = resolve(e.relatedTarget); + + if (e.type == "mousewheel" || e.type == "DOMMouseScroll") { + this.wheelDelta = (e.detail) ? (e.detail * -1) : Math.round(e.wheelDelta / 80) || ((e.wheelDelta < 0) ? -1 : 1); + } + + if (this._touch) { + this._touch(e, currentTarget, this._wrapper); + } + }, + + stopPropagation: function() { + this._event.stopPropagation(); + this._wrapper.stopped = 1; + this.stopped = 1; + }, + + stopImmediatePropagation: function() { + var e = this._event; + if (e.stopImmediatePropagation) { + e.stopImmediatePropagation(); + } else { + this.stopPropagation(); + } + this._wrapper.stopped = 2; + this.stopped = 2; + }, + + preventDefault: function(returnValue) { + var e = this._event; + e.preventDefault(); + e.returnValue = returnValue || false; + this._wrapper.prevented = 1; + this.prevented = 1; + }, + + halt: function(immediate) { + if (immediate) { + this.stopImmediatePropagation(); + } else { + this.stopPropagation(); + } + + this.preventDefault(); + } + +}); + +DOMEventFacade.resolve = resolve; +Y.DOM2EventFacade = DOMEventFacade; +Y.DOMEventFacade = DOMEventFacade; + + /** + * The native event + * @property _event + */ + + /** + * The X location of the event on the page (including scroll) + * @property pageX + * @type int + */ + + /** + * The Y location of the event on the page (including scroll) + * @property pageY + * @type int + */ + + /** + * The keyCode for key events. Uses charCode if keyCode is not available + * @property keyCode + * @type int + */ + + /** + * The charCode for key events. Same as keyCode + * @property charCode + * @type int + */ + + /** + * The button that was pushed. + * @property button + * @type int + */ + + /** + * The button that was pushed. Same as button. + * @property which + * @type int + */ + + /** + * Node reference for the targeted element + * @propery target + * @type Node + */ + + /** + * Node reference for the element that the listener was attached to. + * @propery currentTarget + * @type Node + */ + + /** + * Node reference to the relatedTarget + * @propery relatedTarget + * @type Node + */ + + /** + * Number representing the direction and velocity of the movement of the mousewheel. + * Negative is down, the higher the number, the faster. Applies to the mousewheel event. + * @property wheelDelta + * @type int + */ + + /** + * Stops the propagation to the next bubble target + * @method stopPropagation + */ + + /** + * Stops the propagation to the next bubble target and + * prevents any additional listeners from being exectued + * on the current target. + * @method stopImmediatePropagation + */ + + /** + * Prevents the event's default behavior + * @method preventDefault + * @param returnValue {string} sets the returnValue of the event to this value + * (rather than the default false value). This can be used to add a customized + * confirmation query to the beforeunload event). + */ + + /** + * Stops the event propagation and prevents the default + * event behavior. + * @method halt + * @param immediate {boolean} if true additional listeners + * on the current target will not be executed + */ +(function() { +/** + * DOM event listener abstraction layer + * @module event + * @submodule event-base + */ + +/** + * The event utility provides functions to add and remove event listeners, + * event cleansing. It also tries to automatically remove listeners it + * registers during the unload event. + * + * @class Event + * @static + */ + +Y.Env.evt.dom_wrappers = {}; +Y.Env.evt.dom_map = {}; + +var _eventenv = Y.Env.evt, + config = Y.config, + win = config.win, + add = YUI.Env.add, + remove = YUI.Env.remove, + + onLoad = function() { + YUI.Env.windowLoaded = true; + Y.Event._load(); + remove(win, "load", onLoad); + }, + + onUnload = function() { + Y.Event._unload(); + }, + + EVENT_READY = 'domready', + + COMPAT_ARG = '~yui|2|compat~', + + shouldIterate = function(o) { + try { + return (o && typeof o !== "string" && Y.Lang.isNumber(o.length) && + !o.tagName && !o.alert); + } catch(ex) { + return false; + } + + }, + +Event = function() { + + /** + * True after the onload event has fired + * @property _loadComplete + * @type boolean + * @static + * @private + */ + var _loadComplete = false, + + /** + * The number of times to poll after window.onload. This number is + * increased if additional late-bound handlers are requested after + * the page load. + * @property _retryCount + * @static + * @private + */ + _retryCount = 0, + + /** + * onAvailable listeners + * @property _avail + * @static + * @private + */ + _avail = [], + + /** + * Custom event wrappers for DOM events. Key is + * 'event:' + Element uid stamp + event type + * @property _wrappers + * @type Y.Event.Custom + * @static + * @private + */ + _wrappers = _eventenv.dom_wrappers, + + _windowLoadKey = null, + + /** + * Custom event wrapper map DOM events. Key is + * Element uid stamp. Each item is a hash of custom event + * wrappers as provided in the _wrappers collection. This + * provides the infrastructure for getListeners. + * @property _el_events + * @static + * @private + */ + _el_events = _eventenv.dom_map; + + return { + + /** + * The number of times we should look for elements that are not + * in the DOM at the time the event is requested after the document + * has been loaded. The default is 1000@amp;40 ms, so it will poll + * for 40 seconds or until all outstanding handlers are bound + * (whichever comes first). + * @property POLL_RETRYS + * @type int + * @static + * @final + */ + POLL_RETRYS: 1000, + + /** + * The poll interval in milliseconds + * @property POLL_INTERVAL + * @type int + * @static + * @final + */ + POLL_INTERVAL: 40, + + /** + * addListener/removeListener can throw errors in unexpected scenarios. + * These errors are suppressed, the method returns false, and this property + * is set + * @property lastError + * @static + * @type Error + */ + lastError: null, + + + /** + * poll handle + * @property _interval + * @static + * @private + */ + _interval: null, + + /** + * document readystate poll handle + * @property _dri + * @static + * @private + */ + _dri: null, + + /** + * True when the document is initially usable + * @property DOMReady + * @type boolean + * @static + */ + DOMReady: false, + + /** + * @method startInterval + * @static + * @private + */ + startInterval: function() { + if (!Event._interval) { +Event._interval = setInterval(Event._poll, Event.POLL_INTERVAL); + } + }, + + /** + * Executes the supplied callback when the item with the supplied + * id is found. This is meant to be used to execute behavior as + * soon as possible as the page loads. If you use this after the + * initial page load it will poll for a fixed time for the element. + * The number of times it will poll and the frequency are + * configurable. By default it will poll for 10 seconds. + * + *

          The callback is executed with a single parameter: + * the custom object parameter, if provided.

          + * + * @method onAvailable + * + * @param {string||string[]} id the id of the element, or an array + * of ids to look for. + * @param {function} fn what to execute when the element is found. + * @param {object} p_obj an optional object to be passed back as + * a parameter to fn. + * @param {boolean|object} p_override If set to true, fn will execute + * in the context of p_obj, if set to an object it + * will execute in the context of that object + * @param checkContent {boolean} check child node readiness (onContentReady) + * @static + * @deprecated Use Y.on("available") + */ + // @TODO fix arguments + onAvailable: function(id, fn, p_obj, p_override, checkContent, compat) { + + var a = Y.Array(id), i, availHandle; + + + for (i=0; iThe callback is executed with a single parameter: + * the custom object parameter, if provided.

          + * + * @method onContentReady + * + * @param {string} id the id of the element to look for. + * @param {function} fn what to execute when the element is ready. + * @param {object} obj an optional object to be passed back as + * a parameter to fn. + * @param {boolean|object} override If set to true, fn will execute + * in the context of p_obj. If an object, fn will + * exectute in the context of that object + * + * @static + * @deprecated Use Y.on("contentready") + */ + // @TODO fix arguments + onContentReady: function(id, fn, obj, override, compat) { + return Event.onAvailable(id, fn, obj, override, true, compat); + }, + + /** + * Adds an event listener + * + * @method attach + * + * @param {String} type The type of event to append + * @param {Function} fn The method the event invokes + * @param {String|HTMLElement|Array|NodeList} el An id, an element + * reference, or a collection of ids and/or elements to assign the + * listener to. + * @param {Object} context optional context object + * @param {Boolean|object} args 0..n arguments to pass to the callback + * @return {EventHandle} an object to that can be used to detach the listener + * + * @static + */ + + attach: function(type, fn, el, context) { + return Event._attach(Y.Array(arguments, 0, true)); + }, + + _createWrapper: function (el, type, capture, compat, facade) { + + var cewrapper, + ek = Y.stamp(el), + key = 'event:' + ek + type; + + if (false === facade) { + key += 'native'; + } + if (capture) { + key += 'capture'; + } + + + cewrapper = _wrappers[key]; + + + if (!cewrapper) { + // create CE wrapper + cewrapper = Y.publish(key, { + silent: true, + bubbles: false, + contextFn: function() { + if (compat) { + return cewrapper.el; + } else { + cewrapper.nodeRef = cewrapper.nodeRef || Y.one(cewrapper.el); + return cewrapper.nodeRef; + } + } + }); + + cewrapper.overrides = {}; + + // for later removeListener calls + cewrapper.el = el; + cewrapper.key = key; + cewrapper.domkey = ek; + cewrapper.type = type; + cewrapper.fn = function(e) { + cewrapper.fire(Event.getEvent(e, el, (compat || (false === facade)))); + }; + cewrapper.capture = capture; + + if (el == win && type == "load") { + // window load happens once + cewrapper.fireOnce = true; + _windowLoadKey = key; + } + + _wrappers[key] = cewrapper; + _el_events[ek] = _el_events[ek] || {}; + _el_events[ek][key] = cewrapper; + + add(el, type, cewrapper.fn, capture); + } + + return cewrapper; + + }, + + _attach: function(args, conf) { + + var compat, + handles, oEl, cewrapper, context, + fireNow = false, ret, + type = args[0], + fn = args[1], + el = args[2] || win, + facade = conf && conf.facade, + capture = conf && conf.capture, + overrides = conf && conf.overrides; + + if (args[args.length-1] === COMPAT_ARG) { + compat = true; + // trimmedArgs.pop(); + } + + if (!fn || !fn.call) { +// throw new TypeError(type + " attach call failed, callback undefined"); + return false; + } + + // The el argument can be an array of elements or element ids. + if (shouldIterate(el)) { + + handles=[]; + + Y.each(el, function(v, k) { + args[2] = v; + handles.push(Event._attach(args, conf)); + }); + + // return (handles.length === 1) ? handles[0] : handles; + return new Y.EventHandle(handles); + + // If the el argument is a string, we assume it is + // actually the id of the element. If the page is loaded + // we convert el to the actual element, otherwise we + // defer attaching the event until the element is + // ready + } else if (Y.Lang.isString(el)) { + + // oEl = (compat) ? Y.DOM.byId(el) : Y.Selector.query(el); + + if (compat) { + oEl = Y.DOM.byId(el); + } else { + + oEl = Y.Selector.query(el); + + switch (oEl.length) { + case 0: + oEl = null; + break; + case 1: + oEl = oEl[0]; + break; + default: + args[2] = oEl; + return Event._attach(args, conf); + } + } + + if (oEl) { + + el = oEl; + + // Not found = defer adding the event until the element is available + } else { + + ret = Event.onAvailable(el, function() { + + ret.handle = Event._attach(args, conf); + + }, Event, true, false, compat); + + return ret; + + } + } + + // Element should be an html element or node + if (!el) { + return false; + } + + if (Y.Node && Y.instanceOf(el, Y.Node)) { + el = Y.Node.getDOMNode(el); + } + + cewrapper = Event._createWrapper(el, type, capture, compat, facade); + if (overrides) { + Y.mix(cewrapper.overrides, overrides); + } + + if (el == win && type == "load") { + + // if the load is complete, fire immediately. + // all subscribers, including the current one + // will be notified. + if (YUI.Env.windowLoaded) { + fireNow = true; + } + } + + if (compat) { + args.pop(); + } + + context = args[3]; + + // set context to the Node if not specified + // ret = cewrapper.on.apply(cewrapper, trimmedArgs); + ret = cewrapper._on(fn, context, (args.length > 4) ? args.slice(4) : null); + + if (fireNow) { + cewrapper.fire(); + } + + return ret; + + }, + + /** + * Removes an event listener. Supports the signature the event was bound + * with, but the preferred way to remove listeners is using the handle + * that is returned when using Y.on + * + * @method detach + * + * @param {String} type the type of event to remove. + * @param {Function} fn the method the event invokes. If fn is + * undefined, then all event handlers for the type of event are + * removed. + * @param {String|HTMLElement|Array|NodeList|EventHandle} el An + * event handle, an id, an element reference, or a collection + * of ids and/or elements to remove the listener from. + * @return {boolean} true if the unbind was successful, false otherwise. + * @static + */ + detach: function(type, fn, el, obj) { + + var args=Y.Array(arguments, 0, true), compat, l, ok, i, + id, ce; + + if (args[args.length-1] === COMPAT_ARG) { + compat = true; + // args.pop(); + } + + if (type && type.detach) { + return type.detach(); + } + + // The el argument can be a string + if (typeof el == "string") { + + // el = (compat) ? Y.DOM.byId(el) : Y.all(el); + if (compat) { + el = Y.DOM.byId(el); + } else { + el = Y.Selector.query(el); + l = el.length; + if (l < 1) { + el = null; + } else if (l == 1) { + el = el[0]; + } + } + // return Event.detach.apply(Event, args); + } + + if (!el) { + return false; + } + + if (el.detach) { + args.splice(2, 1); + return el.detach.apply(el, args); + // The el argument can be an array of elements or element ids. + } else if (shouldIterate(el)) { + ok = true; + for (i=0, l=el.length; i 0); + } + + // onAvailable + notAvail = []; + + executeItem = function (el, item) { + var context, ov = item.override; + if (item.compat) { + if (item.override) { + if (ov === true) { + context = item.obj; + } else { + context = ov; + } + } else { + context = el; + } + item.fn.call(context, item.obj); + } else { + context = item.obj || Y.one(el); + item.fn.apply(context, (Y.Lang.isArray(ov)) ? ov : []); + } + }; + + // onAvailable + for (i=0,len=_avail.length; i 4 ? Y.Array(arguments, 4, true) : null; + return Y.Event.onAvailable.call(Y.Event, id, fn, o, a); + } +}; + +/** + * Executes the callback as soon as the specified element + * is detected in the DOM with a nextSibling property + * (indicating that the element's children are available). + * This function expects a selector + * string for the element(s) to detect. If you already have + * an element reference, you don't need this event. + * @event contentready + * @param type {string} 'contentready' + * @param fn {function} the callback function to execute. + * @param el {string} an selector for the element(s) to attach. + * @param context optional argument that specifies what 'this' refers to. + * @param args* 0..n additional arguments to pass on to the callback function. + * These arguments will be added after the event object. + * @return {EventHandle} the detach handle + * @for YUI + */ +Y.Env.evt.plugins.contentready = { + on: function(type, fn, id, o) { + var a = arguments.length > 4 ? Y.Array(arguments, 4, true) : null; + return Y.Event.onContentReady.call(Y.Event, id, fn, o, a); + } +}; + + +}, '3.3.0' ,{requires:['event-custom-base']}); +(function() { + +var stateChangeListener, + GLOBAL_ENV = YUI.Env, + config = YUI.config, + doc = config.doc, + docElement = doc && doc.documentElement, + EVENT_NAME = 'onreadystatechange', + pollInterval = config.pollInterval || 40; + +if (docElement.doScroll && !GLOBAL_ENV._ieready) { + GLOBAL_ENV._ieready = function() { + GLOBAL_ENV._ready(); + }; + +/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */ +// Internet Explorer: use the doScroll() method on the root element. +// This isolates what appears to be a safe moment to manipulate the +// DOM prior to when the document's readyState suggests it is safe to do so. + if (self !== self.top) { + stateChangeListener = function() { + if (doc.readyState == 'complete') { + GLOBAL_ENV.remove(doc, EVENT_NAME, stateChangeListener); + GLOBAL_ENV.ieready(); + } + }; + GLOBAL_ENV.add(doc, EVENT_NAME, stateChangeListener); + } else { + GLOBAL_ENV._dri = setInterval(function() { + try { + docElement.doScroll('left'); + clearInterval(GLOBAL_ENV._dri); + GLOBAL_ENV._dri = null; + GLOBAL_ENV._ieready(); + } catch (domNotReady) { } + }, pollInterval); + } +} + +})(); +YUI.add('event-base-ie', function(Y) { + +/* + * Custom event engine, DOM event listener abstraction layer, synthetic DOM + * events. + * @module event + * @submodule event-base + */ + +var IEEventFacade = function() { + // IEEventFacade.superclass.constructor.apply(this, arguments); + Y.DOM2EventFacade.apply(this, arguments); + }; + +Y.extend(IEEventFacade, Y.DOM2EventFacade, { + + init: function() { + + IEEventFacade.superclass.init.apply(this, arguments); + + var e = this._event, + resolve = Y.DOM2EventFacade.resolve, + x, y, d, b, de, t; + + this.target = resolve(e.srcElement); + + if (('clientX' in e) && (!x) && (0 !== x)) { + x = e.clientX; + y = e.clientY; + + d = Y.config.doc; + b = d.body; + de = d.documentElement; + + x += (de.scrollLeft || (b && b.scrollLeft) || 0); + y += (de.scrollTop || (b && b.scrollTop) || 0); + + this.pageX = x; + this.pageY = y; + } + + if (e.type == "mouseout") { + t = e.toElement; + } else if (e.type == "mouseover") { + t = e.fromElement; + } + + this.relatedTarget = resolve(t); + + // which should contain the unicode key code if this is a key event + // if (e.charCode) { + // this.which = e.charCode; + // } + + // for click events, which is normalized for which mouse button was + // clicked. + if (e.button) { + switch (e.button) { + case 2: + this.which = 3; + break; + case 4: + this.which = 2; + break; + default: + this.which = e.button; + } + + this.button = this.which; + } + + }, + + stopPropagation: function() { + var e = this._event; + e.cancelBubble = true; + this._wrapper.stopped = 1; + this.stopped = 1; + }, + + stopImmediatePropagation: function() { + this.stopPropagation(); + this._wrapper.stopped = 2; + this.stopped = 2; + }, + + preventDefault: function(returnValue) { + this._event.returnValue = returnValue || false; + this._wrapper.prevented = 1; + this.prevented = 1; + } + +}); + +var imp = Y.config.doc && Y.config.doc.implementation; + +if (imp && (!imp.hasFeature('Events', '2.0'))) { + Y.DOMEventFacade = IEEventFacade; +} + + + +}, '3.3.0' ); +YUI.add('pluginhost-base', function(Y) { + + /** + * Provides the augmentable PluginHost interface, which can be added to any class. + * @module pluginhost + */ + + /** + * Provides the augmentable PluginHost interface, which can be added to any class. + * @module pluginhost-base + */ + + /** + *

          + * An augmentable class, which provides the augmented class with the ability to host plugins. + * It adds plug and unplug methods to the augmented class, which can + * be used to add or remove plugins from instances of the class. + *

          + * + *

          Plugins can also be added through the constructor configuration object passed to the host class' constructor using + * the "plugins" property. Supported values for the "plugins" property are those defined by the plug method. + * + * For example the following code would add the AnimPlugin and IOPlugin to Overlay (the plugin host): + *

          + * var o = new Overlay({plugins: [ AnimPlugin, {fn:IOPlugin, cfg:{section:"header"}}]}); + * + *

          + *

          + * Plug.Host's protected _initPlugins and _destroyPlugins + * methods should be invoked by the host class at the appropriate point in the host's lifecyle. + *

          + * + * @class Plugin.Host + */ + + var L = Y.Lang; + + function PluginHost() { + this._plugins = {}; + } + + PluginHost.prototype = { + + /** + * Adds a plugin to the host object. This will instantiate the + * plugin and attach it to the configured namespace on the host object. + * + * @method plug + * @chainable + * @param P {Function | Object |Array} Accepts the plugin class, or an + * object with a "fn" property specifying the plugin class and + * a "cfg" property specifying the configuration for the Plugin. + *

          + * Additionally an Array can also be passed in, with the above function or + * object values, allowing the user to add multiple plugins in a single call. + *

          + * @param config (Optional) If the first argument is the plugin class, the second argument + * can be the configuration for the plugin. + * @return {Base} A reference to the host object + */ + plug: function(Plugin, config) { + var i, ln, ns; + + if (L.isArray(Plugin)) { + for (i = 0, ln = Plugin.length; i < ln; i++) { + this.plug(Plugin[i]); + } + } else { + if (Plugin && !L.isFunction(Plugin)) { + config = Plugin.cfg; + Plugin = Plugin.fn; + } + + // Plugin should be fn by now + if (Plugin && Plugin.NS) { + ns = Plugin.NS; + + config = config || {}; + config.host = this; + + if (this.hasPlugin(ns)) { + // Update config + this[ns].setAttrs(config); + } else { + // Create new instance + this[ns] = new Plugin(config); + this._plugins[ns] = Plugin; + } + } + } + return this; + }, + + /** + * Removes a plugin from the host object. This will destroy the + * plugin instance and delete the namepsace from the host object. + * + * @method unplug + * @param {String | Function} plugin The namespace of the plugin, or the plugin class with the static NS namespace property defined. If not provided, + * all registered plugins are unplugged. + * @return {Base} A reference to the host object + * @chainable + */ + unplug: function(plugin) { + var ns = plugin, + plugins = this._plugins; + + if (plugin) { + if (L.isFunction(plugin)) { + ns = plugin.NS; + if (ns && (!plugins[ns] || plugins[ns] !== plugin)) { + ns = null; + } + } + + if (ns) { + if (this[ns]) { + this[ns].destroy(); + delete this[ns]; + } + if (plugins[ns]) { + delete plugins[ns]; + } + } + } else { + for (ns in this._plugins) { + if (this._plugins.hasOwnProperty(ns)) { + this.unplug(ns); + } + } + } + return this; + }, + + /** + * Determines if a plugin has plugged into this host. + * + * @method hasPlugin + * @param {String} ns The plugin's namespace + * @return {boolean} returns true, if the plugin has been plugged into this host, false otherwise. + */ + hasPlugin : function(ns) { + return (this._plugins[ns] && this[ns]); + }, + + /** + * Initializes static plugins registered on the host (using the + * Base.plug static method) and any plugins passed to the + * instance through the "plugins" configuration property. + * + * @method _initPlugins + * @param {Config} config The configuration object with property name/value pairs. + * @private + */ + + _initPlugins: function(config) { + this._plugins = this._plugins || {}; + + if (this._initConfigPlugins) { + this._initConfigPlugins(config); + } + }, + + /** + * Unplugs and destroys all plugins on the host + * @method _destroyPlugins + * @private + */ + _destroyPlugins: function() { + this.unplug(); + } + }; + + Y.namespace("Plugin").Host = PluginHost; + + +}, '3.3.0' ,{requires:['yui-base']}); +YUI.add('pluginhost-config', function(Y) { + + /** + * Adds pluginhost constructor configuration and static configuration support + * @submodule pluginhost-config + */ + + /** + * Constructor and static configuration support for plugins + * + * @for Plugin.Host + */ + var PluginHost = Y.Plugin.Host, + L = Y.Lang; + + PluginHost.prototype._initConfigPlugins = function(config) { + + // Class Configuration + var classes = (this._getClasses) ? this._getClasses() : [this.constructor], + plug = [], + unplug = {}, + constructor, i, classPlug, classUnplug, pluginClassName; + + // TODO: Room for optimization. Can we apply statically/unplug in same pass? + for (i = classes.length - 1; i >= 0; i--) { + constructor = classes[i]; + + classUnplug = constructor._UNPLUG; + if (classUnplug) { + // subclasses over-write + Y.mix(unplug, classUnplug, true); + } + + classPlug = constructor._PLUG; + if (classPlug) { + // subclasses over-write + Y.mix(plug, classPlug, true); + } + } + + for (pluginClassName in plug) { + if (plug.hasOwnProperty(pluginClassName)) { + if (!unplug[pluginClassName]) { + this.plug(plug[pluginClassName]); + } + } + } + + // User Configuration + if (config && config.plugins) { + this.plug(config.plugins); + } + }; + + /** + * Registers plugins to be instantiated at the class level (plugins + * which should be plugged into every instance of the class by default). + * + * @method Plugin.Host.plug + * @static + * + * @param {Function} hostClass The host class on which to register the plugins + * @param {Function | Array} plugin Either the plugin class, an array of plugin classes or an array of objects (with fn and cfg properties defined) + * @param {Object} config (Optional) If plugin is the plugin class, the configuration for the plugin + */ + PluginHost.plug = function(hostClass, plugin, config) { + // Cannot plug into Base, since Plugins derive from Base [ will cause infinite recurrsion ] + var p, i, l, name; + + if (hostClass !== Y.Base) { + hostClass._PLUG = hostClass._PLUG || {}; + + if (!L.isArray(plugin)) { + if (config) { + plugin = {fn:plugin, cfg:config}; + } + plugin = [plugin]; + } + + for (i = 0, l = plugin.length; i < l;i++) { + p = plugin[i]; + name = p.NAME || p.fn.NAME; + hostClass._PLUG[name] = p; + } + } + }; + + /** + * Unregisters any class level plugins which have been registered by the host class, or any + * other class in the hierarchy. + * + * @method Plugin.Host.unplug + * @static + * + * @param {Function} hostClass The host class from which to unregister the plugins + * @param {Function | Array} plugin The plugin class, or an array of plugin classes + */ + PluginHost.unplug = function(hostClass, plugin) { + var p, i, l, name; + + if (hostClass !== Y.Base) { + hostClass._UNPLUG = hostClass._UNPLUG || {}; + + if (!L.isArray(plugin)) { + plugin = [plugin]; + } + + for (i = 0, l = plugin.length; i < l; i++) { + p = plugin[i]; + name = p.NAME; + if (!hostClass._PLUG[name]) { + hostClass._UNPLUG[name] = p; + } else { + delete hostClass._PLUG[name]; + } + } + } + }; + + +}, '3.3.0' ,{requires:['pluginhost-base']}); + + +YUI.add('pluginhost', function(Y){}, '3.3.0' ,{use:['pluginhost-base', 'pluginhost-config']}); + +YUI.add('node-base', function(Y) { + +/** + * The Node Utility provides a DOM-like interface for interacting with DOM nodes. + * @module node + * @submodule node-base + */ + +/** + * The Node class provides a wrapper for manipulating DOM Nodes. + * Node properties can be accessed via the set/get methods. + * Use Y.get() to retrieve Node instances. + * + * NOTE: Node properties are accessed using + * the set and get methods. + * + * @class Node + * @constructor + * @param {DOMNode} node the DOM node to be mapped to the Node instance. + * @for Node + */ + +// "globals" +var DOT = '.', + NODE_NAME = 'nodeName', + NODE_TYPE = 'nodeType', + OWNER_DOCUMENT = 'ownerDocument', + TAG_NAME = 'tagName', + UID = '_yuid', + + _slice = Array.prototype.slice, + + Y_DOM = Y.DOM, + + Y_Node = function(node) { + var uid = (node.nodeType !== 9) ? node.uniqueID : node[UID]; + + if (uid && Y_Node._instances[uid] && Y_Node._instances[uid]._node !== node) { + node[UID] = null; // unset existing uid to prevent collision (via clone or hack) + } + + uid = uid || Y.stamp(node); + if (!uid) { // stamp failed; likely IE non-HTMLElement + uid = Y.guid(); + } + + this[UID] = uid; + + /** + * The underlying DOM node bound to the Y.Node instance + * @property _node + * @private + */ + this._node = node; + Y_Node._instances[uid] = this; + + this._stateProxy = node; // when augmented with Attribute + + Y.EventTarget.call(this, {emitFacade:true}); + + if (this._initPlugins) { // when augmented with Plugin.Host + this._initPlugins(); + } + + this.SHOW_TRANSITION = Y_Node.SHOW_TRANSITION; + this.HIDE_TRANSITION = Y_Node.HIDE_TRANSITION; + }, + + // used with previous/next/ancestor tests + _wrapFn = function(fn) { + var ret = null; + if (fn) { + ret = (typeof fn == 'string') ? + function(n) { + return Y.Selector.test(n, fn); + } : + function(n) { + return fn(Y.one(n)); + }; + } + + return ret; + }; +// end "globals" + +/** + * The name of the component + * @static + * @property NAME + */ +Y_Node.NAME = 'node'; + +/* + * The pattern used to identify ARIA attributes + */ +Y_Node.re_aria = /^(?:role$|aria-)/; + +Y_Node.SHOW_TRANSITION = 'fadeIn'; +Y_Node.HIDE_TRANSITION = 'fadeOut'; + +/** + * List of events that route to DOM events + * @static + * @property DOM_EVENTS + */ + +Y_Node.DOM_EVENTS = { + abort: 1, + beforeunload: 1, + blur: 1, + change: 1, + click: 1, + close: 1, + command: 1, + contextmenu: 1, + dblclick: 1, + DOMMouseScroll: 1, + drag: 1, + dragstart: 1, + dragenter: 1, + dragover: 1, + dragleave: 1, + dragend: 1, + drop: 1, + error: 1, + focus: 1, + key: 1, + keydown: 1, + keypress: 1, + keyup: 1, + load: 1, + message: 1, + mousedown: 1, + mouseenter: 1, + mouseleave: 1, + mousemove: 1, + mousemultiwheel: 1, + mouseout: 1, + mouseover: 1, + mouseup: 1, + mousewheel: 1, + orientationchange: 1, + reset: 1, + resize: 1, + select: 1, + selectstart: 1, + submit: 1, + scroll: 1, + textInput: 1, + unload: 1 +}; + +// Add custom event adaptors to this list. This will make it so +// that delegate, key, available, contentready, etc all will +// be available through Node.on +Y.mix(Y_Node.DOM_EVENTS, Y.Env.evt.plugins); + +/** + * A list of Node instances that have been created + * @private + * @property _instances + * @static + * + */ +Y_Node._instances = {}; + +/** + * Retrieves the DOM node bound to a Node instance + * @method getDOMNode + * @static + * + * @param {Y.Node || HTMLNode} node The Node instance or an HTMLNode + * @return {HTMLNode} The DOM node bound to the Node instance. If a DOM node is passed + * as the node argument, it is simply returned. + */ +Y_Node.getDOMNode = function(node) { + if (node) { + return (node.nodeType) ? node : node._node || null; + } + return null; +}; + +/** + * Checks Node return values and wraps DOM Nodes as Y.Node instances + * and DOM Collections / Arrays as Y.NodeList instances. + * Other return values just pass thru. If undefined is returned (e.g. no return) + * then the Node instance is returned for chainability. + * @method scrubVal + * @static + * + * @param {any} node The Node instance or an HTMLNode + * @return {Y.Node | Y.NodeList | any} Depends on what is returned from the DOM node. + */ +Y_Node.scrubVal = function(val, node) { + if (val) { // only truthy values are risky + if (typeof val == 'object' || typeof val == 'function') { // safari nodeList === function + if (NODE_TYPE in val || Y_DOM.isWindow(val)) {// node || window + val = Y.one(val); + } else if ((val.item && !val._nodes) || // dom collection or Node instance + (val[0] && val[0][NODE_TYPE])) { // array of DOM Nodes + val = Y.all(val); + } + } + } else if (typeof val === 'undefined') { + val = node; // for chaining + } else if (val === null) { + val = null; // IE: DOM null not the same as null + } + + return val; +}; + +/** + * Adds methods to the Y.Node prototype, routing through scrubVal. + * @method addMethod + * @static + * + * @param {String} name The name of the method to add + * @param {Function} fn The function that becomes the method + * @param {Object} context An optional context to call the method with + * (defaults to the Node instance) + * @return {any} Depends on what is returned from the DOM node. + */ +Y_Node.addMethod = function(name, fn, context) { + if (name && fn && typeof fn == 'function') { + Y_Node.prototype[name] = function() { + var args = _slice.call(arguments), + node = this, + ret; + + if (args[0] && Y.instanceOf(args[0], Y_Node)) { + args[0] = args[0]._node; + } + + if (args[1] && Y.instanceOf(args[1], Y_Node)) { + args[1] = args[1]._node; + } + args.unshift(node._node); + + ret = fn.apply(node, args); + + if (ret) { // scrub truthy + ret = Y_Node.scrubVal(ret, node); + } + + (typeof ret != 'undefined') || (ret = node); + return ret; + }; + } else { + } +}; + +/** + * Imports utility methods to be added as Y.Node methods. + * @method importMethod + * @static + * + * @param {Object} host The object that contains the method to import. + * @param {String} name The name of the method to import + * @param {String} altName An optional name to use in place of the host name + * @param {Object} context An optional context to call the method with + */ +Y_Node.importMethod = function(host, name, altName) { + if (typeof name == 'string') { + altName = altName || name; + Y_Node.addMethod(altName, host[name], host); + } else { + Y.Array.each(name, function(n) { + Y_Node.importMethod(host, n); + }); + } +}; + +/** + * Returns a single Node instance bound to the node or the + * first element matching the given selector. Returns null if no match found. + * Note: For chaining purposes you may want to + * use Y.all, which returns a NodeList when no match is found. + * @method Y.one + * @static + * @param {String | HTMLElement} node a node or Selector + * @return {Y.Node | null} a Node instance or null if no match found. + */ +Y_Node.one = function(node) { + var instance = null, + cachedNode, + uid; + + if (node) { + if (typeof node == 'string') { + if (node.indexOf('doc') === 0) { // doc OR document + node = Y.config.doc; + } else if (node.indexOf('win') === 0) { // win OR window + node = Y.config.win; + } else { + node = Y.Selector.query(node, null, true); + } + if (!node) { + return null; + } + } else if (Y.instanceOf(node, Y_Node)) { + return node; // NOTE: return + } + + if (node.nodeType || Y.DOM.isWindow(node)) { // avoid bad input (numbers, boolean, etc) + uid = (node.uniqueID && node.nodeType !== 9) ? node.uniqueID : node._yuid; + instance = Y_Node._instances[uid]; // reuse exising instances + cachedNode = instance ? instance._node : null; + if (!instance || (cachedNode && node !== cachedNode)) { // new Node when nodes don't match + instance = new Y_Node(node); + } + } + } + return instance; +}; + +/** + * Returns a new dom node using the provided markup string. + * @method create + * @static + * @param {String} html The markup used to create the element + * @param {HTMLDocument} doc An optional document context + * @return {Node} A Node instance bound to a DOM node or fragment + */ +Y_Node.create = function(html, doc) { + if (doc && doc._node) { + doc = doc._node; + } + return Y.one(Y_DOM.create(html, doc)); +}; + +/** + * Static collection of configuration attributes for special handling + * @property ATTRS + * @static + * @type object + */ +Y_Node.ATTRS = { + /** + * Allows for getting and setting the text of an element. + * Formatting is preserved and special characters are treated literally. + * @config text + * @type String + */ + text: { + getter: function() { + return Y_DOM.getText(this._node); + }, + + setter: function(content) { + Y_DOM.setText(this._node, content); + return content; + } + }, + + 'options': { + getter: function() { + return this._node.getElementsByTagName('option'); + } + }, + + /** + * Returns a NodeList instance of all HTMLElement children. + * @readOnly + * @config children + * @type NodeList + */ + 'children': { + getter: function() { + var node = this._node, + children = node.children, + childNodes, i, len; + + if (!children) { + childNodes = node.childNodes; + children = []; + + for (i = 0, len = childNodes.length; i < len; ++i) { + if (childNodes[i][TAG_NAME]) { + children[children.length] = childNodes[i]; + } + } + } + return Y.all(children); + } + }, + + value: { + getter: function() { + return Y_DOM.getValue(this._node); + }, + + setter: function(val) { + Y_DOM.setValue(this._node, val); + return val; + } + } +}; + +/** + * The default setter for DOM properties + * Called with instance context (this === the Node instance) + * @method DEFAULT_SETTER + * @static + * @param {String} name The attribute/property being set + * @param {any} val The value to be set + * @return {any} The value + */ +Y_Node.DEFAULT_SETTER = function(name, val) { + var node = this._stateProxy, + strPath; + + if (name.indexOf(DOT) > -1) { + strPath = name; + name = name.split(DOT); + // only allow when defined on node + Y.Object.setValue(node, name, val); + } else if (typeof node[name] != 'undefined') { // pass thru DOM properties + node[name] = val; + } + + return val; +}; + +/** + * The default getter for DOM properties + * Called with instance context (this === the Node instance) + * @method DEFAULT_GETTER + * @static + * @param {String} name The attribute/property to look up + * @return {any} The current value + */ +Y_Node.DEFAULT_GETTER = function(name) { + var node = this._stateProxy, + val; + + if (name.indexOf && name.indexOf(DOT) > -1) { + val = Y.Object.getValue(node, name.split(DOT)); + } else if (typeof node[name] != 'undefined') { // pass thru from DOM + val = node[name]; + } + + return val; +}; + +// Basic prototype augment - no lazy constructor invocation. +Y.mix(Y_Node, Y.EventTarget, false, null, 1); + +Y.mix(Y_Node.prototype, { +/** + * The method called when outputting Node instances as strings + * @method toString + * @return {String} A string representation of the Node instance + */ + toString: function() { + var str = this[UID] + ': not bound to a node', + node = this._node, + attrs, id, className; + + if (node) { + attrs = node.attributes; + id = (attrs && attrs.id) ? node.getAttribute('id') : null; + className = (attrs && attrs.className) ? node.getAttribute('className') : null; + str = node[NODE_NAME]; + + if (id) { + str += '#' + id; + } + + if (className) { + str += '.' + className.replace(' ', '.'); + } + + // TODO: add yuid? + str += ' ' + this[UID]; + } + return str; + }, + + /** + * Returns an attribute value on the Node instance. + * Unless pre-configured (via Node.ATTRS), get hands + * off to the underlying DOM node. Only valid + * attributes/properties for the node will be set. + * @method get + * @param {String} attr The attribute + * @return {any} The current value of the attribute + */ + get: function(attr) { + var val; + + if (this._getAttr) { // use Attribute imple + val = this._getAttr(attr); + } else { + val = this._get(attr); + } + + if (val) { + val = Y_Node.scrubVal(val, this); + } else if (val === null) { + val = null; // IE: DOM null is not true null (even though they ===) + } + return val; + }, + + /** + * Helper method for get. + * @method _get + * @private + * @param {String} attr The attribute + * @return {any} The current value of the attribute + */ + _get: function(attr) { + var attrConfig = Y_Node.ATTRS[attr], + val; + + if (attrConfig && attrConfig.getter) { + val = attrConfig.getter.call(this); + } else if (Y_Node.re_aria.test(attr)) { + val = this._node.getAttribute(attr, 2); + } else { + val = Y_Node.DEFAULT_GETTER.apply(this, arguments); + } + + return val; + }, + + /** + * Sets an attribute on the Node instance. + * Unless pre-configured (via Node.ATTRS), set hands + * off to the underlying DOM node. Only valid + * attributes/properties for the node will be set. + * To set custom attributes use setAttribute. + * @method set + * @param {String} attr The attribute to be set. + * @param {any} val The value to set the attribute to. + * @chainable + */ + set: function(attr, val) { + var attrConfig = Y_Node.ATTRS[attr]; + + if (this._setAttr) { // use Attribute imple + this._setAttr.apply(this, arguments); + } else { // use setters inline + if (attrConfig && attrConfig.setter) { + attrConfig.setter.call(this, val, attr); + } else if (Y_Node.re_aria.test(attr)) { // special case Aria + this._node.setAttribute(attr, val); + } else { + Y_Node.DEFAULT_SETTER.apply(this, arguments); + } + } + + return this; + }, + + /** + * Sets multiple attributes. + * @method setAttrs + * @param {Object} attrMap an object of name/value pairs to set + * @chainable + */ + setAttrs: function(attrMap) { + if (this._setAttrs) { // use Attribute imple + this._setAttrs(attrMap); + } else { // use setters inline + Y.Object.each(attrMap, function(v, n) { + this.set(n, v); + }, this); + } + + return this; + }, + + /** + * Returns an object containing the values for the requested attributes. + * @method getAttrs + * @param {Array} attrs an array of attributes to get values + * @return {Object} An object with attribute name/value pairs. + */ + getAttrs: function(attrs) { + var ret = {}; + if (this._getAttrs) { // use Attribute imple + this._getAttrs(attrs); + } else { // use setters inline + Y.Array.each(attrs, function(v, n) { + ret[v] = this.get(v); + }, this); + } + + return ret; + }, + + /** + * Creates a new Node using the provided markup string. + * @method create + * @param {String} html The markup used to create the element + * @param {HTMLDocument} doc An optional document context + * @return {Node} A Node instance bound to a DOM node or fragment + */ + create: Y_Node.create, + + /** + * Compares nodes to determine if they match. + * Node instances can be compared to each other and/or HTMLElements. + * @method compareTo + * @param {HTMLElement | Node} refNode The reference node to compare to the node. + * @return {Boolean} True if the nodes match, false if they do not. + */ + compareTo: function(refNode) { + var node = this._node; + + if (Y.instanceOf(refNode, Y_Node)) { + refNode = refNode._node; + } + return node === refNode; + }, + + /** + * Determines whether the node is appended to the document. + * @method inDoc + * @param {Node|HTMLElement} doc optional An optional document to check against. + * Defaults to current document. + * @return {Boolean} Whether or not this node is appended to the document. + */ + inDoc: function(doc) { + var node = this._node; + doc = (doc) ? doc._node || doc : node[OWNER_DOCUMENT]; + if (doc.documentElement) { + return Y_DOM.contains(doc.documentElement, node); + } + }, + + getById: function(id) { + var node = this._node, + ret = Y_DOM.byId(id, node[OWNER_DOCUMENT]); + if (ret && Y_DOM.contains(node, ret)) { + ret = Y.one(ret); + } else { + ret = null; + } + return ret; + }, + + /** + * Returns the nearest ancestor that passes the test applied by supplied boolean method. + * @method ancestor + * @param {String | Function} fn A selector string or boolean method for testing elements. + * @param {Boolean} testSelf optional Whether or not to include the element in the scan + * If a function is used, it receives the current node being tested as the only argument. + * @return {Node} The matching Node instance or null if not found + */ + ancestor: function(fn, testSelf) { + return Y.one(Y_DOM.ancestor(this._node, _wrapFn(fn), testSelf)); + }, + + /** + * Returns the ancestors that pass the test applied by supplied boolean method. + * @method ancestors + * @param {String | Function} fn A selector string or boolean method for testing elements. + * @param {Boolean} testSelf optional Whether or not to include the element in the scan + * If a function is used, it receives the current node being tested as the only argument. + * @return {NodeList} A NodeList instance containing the matching elements + */ + ancestors: function(fn, testSelf) { + return Y.all(Y_DOM.ancestors(this._node, _wrapFn(fn), testSelf)); + }, + + /** + * Returns the previous matching sibling. + * Returns the nearest element node sibling if no method provided. + * @method previous + * @param {String | Function} fn A selector or boolean method for testing elements. + * If a function is used, it receives the current node being tested as the only argument. + * @return {Node} Node instance or null if not found + */ + previous: function(fn, all) { + return Y.one(Y_DOM.elementByAxis(this._node, 'previousSibling', _wrapFn(fn), all)); + }, + + /** + * Returns the next matching sibling. + * Returns the nearest element node sibling if no method provided. + * @method next + * @param {String | Function} fn A selector or boolean method for testing elements. + * If a function is used, it receives the current node being tested as the only argument. + * @return {Node} Node instance or null if not found + */ + next: function(fn, all) { + return Y.one(Y_DOM.elementByAxis(this._node, 'nextSibling', _wrapFn(fn), all)); + }, + + /** + * Returns all matching siblings. + * Returns all siblings if no method provided. + * @method siblings + * @param {String | Function} fn A selector or boolean method for testing elements. + * If a function is used, it receives the current node being tested as the only argument. + * @return {NodeList} NodeList instance bound to found siblings + */ + siblings: function(fn) { + return Y.all(Y_DOM.siblings(this._node, _wrapFn(fn))); + }, + + /** + * Retrieves a Node instance of nodes based on the given CSS selector. + * @method one + * + * @param {string} selector The CSS selector to test against. + * @return {Node} A Node instance for the matching HTMLElement. + */ + one: function(selector) { + return Y.one(Y.Selector.query(selector, this._node, true)); + }, + + /** + * Retrieves a nodeList based on the given CSS selector. + * @method all + * + * @param {string} selector The CSS selector to test against. + * @return {NodeList} A NodeList instance for the matching HTMLCollection/Array. + */ + all: function(selector) { + var nodelist = Y.all(Y.Selector.query(selector, this._node)); + nodelist._query = selector; + nodelist._queryRoot = this._node; + return nodelist; + }, + + // TODO: allow fn test + /** + * Test if the supplied node matches the supplied selector. + * @method test + * + * @param {string} selector The CSS selector to test against. + * @return {boolean} Whether or not the node matches the selector. + */ + test: function(selector) { + return Y.Selector.test(this._node, selector); + }, + + /** + * Removes the node from its parent. + * Shortcut for myNode.get('parentNode').removeChild(myNode); + * @method remove + * @param {Boolean} destroy whether or not to call destroy() on the node + * after removal. + * @chainable + * + */ + remove: function(destroy) { + var node = this._node, + parentNode = node.parentNode; + + if (parentNode) { + parentNode.removeChild(node); + } + + if (destroy) { + this.destroy(); + } + + return this; + }, + + /** + * Replace the node with the other node. This is a DOM update only + * and does not change the node bound to the Node instance. + * Shortcut for myNode.get('parentNode').replaceChild(newNode, myNode); + * @method replace + * @param {Y.Node || HTMLNode} newNode Node to be inserted + * @chainable + * + */ + replace: function(newNode) { + var node = this._node; + if (typeof newNode == 'string') { + newNode = Y_Node.create(newNode); + } + node.parentNode.replaceChild(Y_Node.getDOMNode(newNode), node); + return this; + }, + + /** + * @method replaceChild + * @for Node + * @param {String | HTMLElement | Node} node Node to be inserted + * @param {HTMLElement | Node} refNode Node to be replaced + * @return {Node} The replaced node + */ + replaceChild: function(node, refNode) { + if (typeof node == 'string') { + node = Y_DOM.create(node); + } + + return Y.one(this._node.replaceChild(Y_Node.getDOMNode(node), Y_Node.getDOMNode(refNode))); + }, + + /** + * @method appendChild + * @param {String | HTMLElement | Node} node Node to be appended + * @return {Node} The appended node + */ + appendChild: function(node) { + return Y_Node.scrubVal(this._insert(node)); + }, + + /** + * @method insertBefore + * @param {String | HTMLElement | Node} newNode Node to be appended + * @param {HTMLElement | Node} refNode Node to be inserted before + * @return {Node} The inserted node + */ + insertBefore: function(newNode, refNode) { + return Y.Node.scrubVal(this._insert(newNode, refNode)); + }, + + /** + * Removes event listeners from the node and (optionally) its subtree + * @method purge + * @param {Boolean} recurse (optional) Whether or not to remove listeners from the + * node's subtree + * @param {String} type (optional) Only remove listeners of the specified type + * @chainable + * + */ + purge: function(recurse, type) { + Y.Event.purgeElement(this._node, recurse, type); + return this; + }, + + /** + * Nulls internal node references, removes any plugins and event listeners + * @method destroy + * @param {Boolean} recursivePurge (optional) Whether or not to remove listeners from the + * node's subtree (default is false) + * + */ + destroy: function(recursive) { + this.purge(); // TODO: only remove events add via this Node + + if (this.unplug) { // may not be a PluginHost + this.unplug(); + } + + this.clearData(); + + if (recursive) { + this.all('*').destroy(); + } + + this._node = null; + this._stateProxy = null; + + delete Y_Node._instances[this[UID]]; + }, + + /** + * Invokes a method on the Node instance + * @method invoke + * @param {String} method The name of the method to invoke + * @param {Any} a, b, c, etc. Arguments to invoke the method with. + * @return Whatever the underly method returns. + * DOM Nodes and Collections return values + * are converted to Node/NodeList instances. + * + */ + invoke: function(method, a, b, c, d, e) { + var node = this._node, + ret; + + if (a && Y.instanceOf(a, Y_Node)) { + a = a._node; + } + + if (b && Y.instanceOf(b, Y_Node)) { + b = b._node; + } + + ret = node[method](a, b, c, d, e); + return Y_Node.scrubVal(ret, this); + }, + + /** + * Inserts the content before the reference node. + * @method insert + * @param {String | Y.Node | HTMLElement | Y.NodeList | HTMLCollection} content The content to insert + * @param {Int | Y.Node | HTMLElement | String} where The position to insert at. + * Possible "where" arguments + *
          + *
          Y.Node
          + *
          The Node to insert before
          + *
          HTMLElement
          + *
          The element to insert before
          + *
          Int
          + *
          The index of the child element to insert before
          + *
          "replace"
          + *
          Replaces the existing HTML
          + *
          "before"
          + *
          Inserts before the existing HTML
          + *
          "before"
          + *
          Inserts content before the node
          + *
          "after"
          + *
          Inserts content after the node
          + *
          + * @chainable + */ + insert: function(content, where) { + this._insert(content, where); + return this; + }, + + _insert: function(content, where) { + var node = this._node, + ret = null; + + if (typeof where == 'number') { // allow index + where = this._node.childNodes[where]; + } else if (where && where._node) { // Node + where = where._node; + } + + if (content && typeof content != 'string') { // allow Node or NodeList/Array instances + content = content._node || content._nodes || content; + } + ret = Y_DOM.addHTML(node, content, where); + + return ret; + }, + + /** + * Inserts the content as the firstChild of the node. + * @method prepend + * @param {String | Y.Node | HTMLElement} content The content to insert + * @chainable + */ + prepend: function(content) { + return this.insert(content, 0); + }, + + /** + * Inserts the content as the lastChild of the node. + * @method append + * @param {String | Y.Node | HTMLElement} content The content to insert + * @chainable + */ + append: function(content) { + return this.insert(content, null); + }, + + /** + * Appends the node to the given node. + * @method appendTo + * @param {Y.Node | HTMLElement} node The node to append to + * @chainable + */ + appendTo: function(node) { + Y.one(node).append(this); + }, + + /** + * Replaces the node's current content with the content. + * @method setContent + * @param {String | Y.Node | HTMLElement | Y.NodeList | HTMLCollection} content The content to insert + * @chainable + */ + setContent: function(content) { + this._insert(content, 'replace'); + return this; + }, + + /** + * Returns the node's current content (e.g. innerHTML) + * @method getContent + * @return {String} The current content + */ + getContent: function(content) { + return this.get('innerHTML'); + }, + + /** + * @method swap + * @description Swap DOM locations with the given node. + * This does not change which DOM node each Node instance refers to. + * @param {Node} otherNode The node to swap with + * @chainable + */ + swap: Y.config.doc.documentElement.swapNode ? + function(otherNode) { + this._node.swapNode(Y_Node.getDOMNode(otherNode)); + } : + function(otherNode) { + otherNode = Y_Node.getDOMNode(otherNode); + var node = this._node, + parent = otherNode.parentNode, + nextSibling = otherNode.nextSibling; + + if (nextSibling === node) { + parent.insertBefore(node, otherNode); + } else if (otherNode === node.nextSibling) { + parent.insertBefore(otherNode, node); + } else { + node.parentNode.replaceChild(otherNode, node); + Y_DOM.addHTML(parent, node, nextSibling); + } + return this; + }, + + + /** + * @method getData + * @description Retrieves arbitrary data stored on a Node instance. + * This is not stored with the DOM node. + * @param {string} name Optional name of the data field to retrieve. + * If no name is given, all data is returned. + * @return {any | Object} Whatever is stored at the given field, + * or an object hash of all fields. + */ + getData: function(name) { + var ret; + this._data = this._data || {}; + if (arguments.length) { + ret = this._data[name]; + } else { + ret = this._data; + } + + return ret; + + }, + + /** + * @method setData + * @description Stores arbitrary data on a Node instance. + * This is not stored with the DOM node. + * @param {string} name The name of the field to set. If no name + * is given, name is treated as the data and overrides any existing data. + * @param {any} val The value to be assigned to the field. + * @chainable + */ + setData: function(name, val) { + this._data = this._data || {}; + if (arguments.length > 1) { + this._data[name] = val; + } else { + this._data = name; + } + + return this; + }, + + /** + * @method clearData + * @description Clears stored data. + * @param {string} name The name of the field to clear. If no name + * is given, all data is cleared. + * @chainable + */ + clearData: function(name) { + if ('_data' in this) { + if (name) { + delete this._data[name]; + } else { + delete this._data; + } + } + + return this; + }, + + hasMethod: function(method) { + var node = this._node; + return !!(node && method in node && + typeof node[method] != 'unknown' && + (typeof node[method] == 'function' || + String(node[method]).indexOf('function') === 1)); // IE reports as object, prepends space + }, + + SHOW_TRANSITION: null, + HIDE_TRANSITION: null, + + /** + * Makes the node visible. + * If the "transition" module is loaded, show optionally + * animates the showing of the node using either the default + * transition effect ('fadeIn'), or the given named effect. + * @method show + * @param {String} name A named Transition effect to use as the show effect. + * @param {Object} config Options to use with the transition. + * @param {Function} callback An optional function to run after the transition completes. + * @chainable + */ + show: function(callback) { + callback = arguments[arguments.length - 1]; + this.toggleView(true, callback); + return this; + }, + + /** + * The implementation for showing nodes. + * Default is to toggle the style.display property. + * @protected + * @chainable + */ + _show: function() { + this.setStyle('display', ''); + + }, + + _isHidden: function() { + return Y.DOM.getStyle(this._node, 'display') === 'none'; + }, + + toggleView: function(on, callback) { + this._toggleView.apply(this, arguments); + }, + + _toggleView: function(on, callback) { + callback = arguments[arguments.length - 1]; + + // base on current state if not forcing + if (typeof on != 'boolean') { + on = (this._isHidden()) ? 1 : 0; + } + + if (on) { + this._show(); + } else { + this._hide(); + } + + if (typeof callback == 'function') { + callback.call(this); + } + + return this; + }, + + /** + * Hides the node. + * If the "transition" module is loaded, hide optionally + * animates the hiding of the node using either the default + * transition effect ('fadeOut'), or the given named effect. + * @method hide + * @param {String} name A named Transition effect to use as the show effect. + * @param {Object} config Options to use with the transition. + * @param {Function} callback An optional function to run after the transition completes. + * @chainable + */ + hide: function(callback) { + callback = arguments[arguments.length - 1]; + this.toggleView(false, callback); + return this; + }, + + /** + * The implementation for hiding nodes. + * Default is to toggle the style.display property. + * @protected + * @chainable + */ + _hide: function() { + this.setStyle('display', 'none'); + }, + + isFragment: function() { + return (this.get('nodeType') === 11); + }, + + /** + * Removes all of the child nodes from the node. + * @param {Boolean} destroy Whether the nodes should also be destroyed. + * @chainable + */ + empty: function(destroy) { + this.get('childNodes').remove(destroy); + return this; + } + +}, true); + +Y.Node = Y_Node; +Y.one = Y.Node.one; +/** + * The NodeList module provides support for managing collections of Nodes. + * @module node + * @submodule nodelist + */ + +/** + * The NodeList class provides a wrapper for manipulating DOM NodeLists. + * NodeList properties can be accessed via the set/get methods. + * Use Y.all() to retrieve NodeList instances. + * + * @class NodeList + * @constructor + */ + +var NodeList = function(nodes) { + var tmp = []; + if (typeof nodes === 'string') { // selector query + this._query = nodes; + nodes = Y.Selector.query(nodes); + } else if (nodes.nodeType || Y_DOM.isWindow(nodes)) { // domNode || window + nodes = [nodes]; + } else if (Y.instanceOf(nodes, Y.Node)) { + nodes = [nodes._node]; + } else if (Y.instanceOf(nodes[0], Y.Node)) { // allow array of Y.Nodes + Y.Array.each(nodes, function(node) { + if (node._node) { + tmp.push(node._node); + } + }); + nodes = tmp; + } else { // array of domNodes or domNodeList (no mixed array of Y.Node/domNodes) + nodes = Y.Array(nodes, 0, true); + } + + /** + * The underlying array of DOM nodes bound to the Y.NodeList instance + * @property _nodes + * @private + */ + this._nodes = nodes; +}; + +NodeList.NAME = 'NodeList'; + +/** + * Retrieves the DOM nodes bound to a NodeList instance + * @method NodeList.getDOMNodes + * @static + * + * @param {Y.NodeList} nodelist The NodeList instance + * @return {Array} The array of DOM nodes bound to the NodeList + */ +NodeList.getDOMNodes = function(nodelist) { + return (nodelist && nodelist._nodes) ? nodelist._nodes : nodelist; +}; + +NodeList.each = function(instance, fn, context) { + var nodes = instance._nodes; + if (nodes && nodes.length) { + Y.Array.each(nodes, fn, context || instance); + } else { + } +}; + +NodeList.addMethod = function(name, fn, context) { + if (name && fn) { + NodeList.prototype[name] = function() { + var ret = [], + args = arguments; + + Y.Array.each(this._nodes, function(node) { + var UID = (node.uniqueID && node.nodeType !== 9 ) ? 'uniqueID' : '_yuid', + instance = Y.Node._instances[node[UID]], + ctx, + result; + + if (!instance) { + instance = NodeList._getTempNode(node); + } + ctx = context || instance; + result = fn.apply(ctx, args); + if (result !== undefined && result !== instance) { + ret[ret.length] = result; + } + }); + + // TODO: remove tmp pointer + return ret.length ? ret : this; + }; + } else { + } +}; + +NodeList.importMethod = function(host, name, altName) { + if (typeof name === 'string') { + altName = altName || name; + NodeList.addMethod(name, host[name]); + } else { + Y.Array.each(name, function(n) { + NodeList.importMethod(host, n); + }); + } +}; + +NodeList._getTempNode = function(node) { + var tmp = NodeList._tempNode; + if (!tmp) { + tmp = Y.Node.create('
          '); + NodeList._tempNode = tmp; + } + + tmp._node = node; + tmp._stateProxy = node; + return tmp; +}; + +Y.mix(NodeList.prototype, { + /** + * Retrieves the Node instance at the given index. + * @method item + * + * @param {Number} index The index of the target Node. + * @return {Node} The Node instance at the given index. + */ + item: function(index) { + return Y.one((this._nodes || [])[index]); + }, + + /** + * Applies the given function to each Node in the NodeList. + * @method each + * @param {Function} fn The function to apply. It receives 3 arguments: + * the current node instance, the node's index, and the NodeList instance + * @param {Object} context optional An optional context to apply the function with + * Default context is the current Node instance + * @chainable + */ + each: function(fn, context) { + var instance = this; + Y.Array.each(this._nodes, function(node, index) { + node = Y.one(node); + return fn.call(context || node, node, index, instance); + }); + return instance; + }, + + batch: function(fn, context) { + var nodelist = this; + + Y.Array.each(this._nodes, function(node, index) { + var instance = Y.Node._instances[node[UID]]; + if (!instance) { + instance = NodeList._getTempNode(node); + } + + return fn.call(context || instance, instance, index, nodelist); + }); + return nodelist; + }, + + /** + * Executes the function once for each node until a true value is returned. + * @method some + * @param {Function} fn The function to apply. It receives 3 arguments: + * the current node instance, the node's index, and the NodeList instance + * @param {Object} context optional An optional context to execute the function from. + * Default context is the current Node instance + * @return {Boolean} Whether or not the function returned true for any node. + */ + some: function(fn, context) { + var instance = this; + return Y.Array.some(this._nodes, function(node, index) { + node = Y.one(node); + context = context || node; + return fn.call(context, node, index, instance); + }); + }, + + /** + * Creates a documenFragment from the nodes bound to the NodeList instance + * @method toFrag + * @return Node a Node instance bound to the documentFragment + */ + toFrag: function() { + return Y.one(Y.DOM._nl2frag(this._nodes)); + }, + + /** + * Returns the index of the node in the NodeList instance + * or -1 if the node isn't found. + * @method indexOf + * @param {Y.Node || DOMNode} node the node to search for + * @return {Int} the index of the node value or -1 if not found + */ + indexOf: function(node) { + return Y.Array.indexOf(this._nodes, Y.Node.getDOMNode(node)); + }, + + /** + * Filters the NodeList instance down to only nodes matching the given selector. + * @method filter + * @param {String} selector The selector to filter against + * @return {NodeList} NodeList containing the updated collection + * @see Selector + */ + filter: function(selector) { + return Y.all(Y.Selector.filter(this._nodes, selector)); + }, + + + /** + * Creates a new NodeList containing all nodes at every n indices, where + * remainder n % index equals r. + * (zero-based index). + * @method modulus + * @param {Int} n The offset to use (return every nth node) + * @param {Int} r An optional remainder to use with the modulus operation (defaults to zero) + * @return {NodeList} NodeList containing the updated collection + */ + modulus: function(n, r) { + r = r || 0; + var nodes = []; + NodeList.each(this, function(node, i) { + if (i % n === r) { + nodes.push(node); + } + }); + + return Y.all(nodes); + }, + + /** + * Creates a new NodeList containing all nodes at odd indices + * (zero-based index). + * @method odd + * @return {NodeList} NodeList containing the updated collection + */ + odd: function() { + return this.modulus(2, 1); + }, + + /** + * Creates a new NodeList containing all nodes at even indices + * (zero-based index), including zero. + * @method even + * @return {NodeList} NodeList containing the updated collection + */ + even: function() { + return this.modulus(2); + }, + + destructor: function() { + }, + + /** + * Reruns the initial query, when created using a selector query + * @method refresh + * @chainable + */ + refresh: function() { + var doc, + nodes = this._nodes, + query = this._query, + root = this._queryRoot; + + if (query) { + if (!root) { + if (nodes && nodes[0] && nodes[0].ownerDocument) { + root = nodes[0].ownerDocument; + } + } + + this._nodes = Y.Selector.query(query, root); + } + + return this; + }, + + _prepEvtArgs: function(type, fn, context) { + // map to Y.on/after signature (type, fn, nodes, context, arg1, arg2, etc) + var args = Y.Array(arguments, 0, true); + + if (args.length < 2) { // type only (event hash) just add nodes + args[2] = this._nodes; + } else { + args.splice(2, 0, this._nodes); + } + + args[3] = context || this; // default to NodeList instance as context + + return args; + }, + + /** + * Applies an event listener to each Node bound to the NodeList. + * @method on + * @param {String} type The event being listened for + * @param {Function} fn The handler to call when the event fires + * @param {Object} context The context to call the handler with. + * Default is the NodeList instance. + * @param {Object} context The context to call the handler with. + * param {mixed} arg* 0..n additional arguments to supply to the subscriber + * when the event fires. + * @return {Object} Returns an event handle that can later be use to detach(). + * @see Event.on + */ + on: function(type, fn, context) { + return Y.on.apply(Y, this._prepEvtArgs.apply(this, arguments)); + }, + + /** + * Applies an one-time event listener to each Node bound to the NodeList. + * @method once + * @param {String} type The event being listened for + * @param {Function} fn The handler to call when the event fires + * @param {Object} context The context to call the handler with. + * Default is the NodeList instance. + * @return {Object} Returns an event handle that can later be use to detach(). + * @see Event.on + */ + once: function(type, fn, context) { + return Y.once.apply(Y, this._prepEvtArgs.apply(this, arguments)); + }, + + /** + * Applies an event listener to each Node bound to the NodeList. + * The handler is called only after all on() handlers are called + * and the event is not prevented. + * @method after + * @param {String} type The event being listened for + * @param {Function} fn The handler to call when the event fires + * @param {Object} context The context to call the handler with. + * Default is the NodeList instance. + * @return {Object} Returns an event handle that can later be use to detach(). + * @see Event.on + */ + after: function(type, fn, context) { + return Y.after.apply(Y, this._prepEvtArgs.apply(this, arguments)); + }, + + /** + * Returns the current number of items in the NodeList. + * @method size + * @return {Int} The number of items in the NodeList. + */ + size: function() { + return this._nodes.length; + }, + + /** + * Determines if the instance is bound to any nodes + * @method isEmpty + * @return {Boolean} Whether or not the NodeList is bound to any nodes + */ + isEmpty: function() { + return this._nodes.length < 1; + }, + + toString: function() { + var str = '', + errorMsg = this[UID] + ': not bound to any nodes', + nodes = this._nodes, + node; + + if (nodes && nodes[0]) { + node = nodes[0]; + str += node[NODE_NAME]; + if (node.id) { + str += '#' + node.id; + } + + if (node.className) { + str += '.' + node.className.replace(' ', '.'); + } + + if (nodes.length > 1) { + str += '...[' + nodes.length + ' items]'; + } + } + return str || errorMsg; + } + +}, true); + +NodeList.importMethod(Y.Node.prototype, [ + /** + * Called on each Node instance + * @for NodeList + * @method append + * @see Node.append + */ + 'append', + + /** Called on each Node instance + * @method destroy + * @see Node.destroy + */ + 'destroy', + + /** + * Called on each Node instance + * @method detach + * @see Node.detach + */ + 'detach', + + /** Called on each Node instance + * @method detachAll + * @see Node.detachAll + */ + 'detachAll', + + /** Called on each Node instance + * @method empty + * @see Node.empty + */ + 'empty', + + /** Called on each Node instance + * @method insert + * @see Node.insert + */ + 'insert', + + /** Called on each Node instance + * @method prepend + * @see Node.prepend + */ + 'prepend', + + /** Called on each Node instance + * @method remove + * @see Node.remove + */ + 'remove', + + /** Called on each Node instance + * @method set + * @see Node.set + */ + 'set', + + /** Called on each Node instance + * @method setContent + * @see Node.setContent + */ + 'setContent', + + /** + * Makes each node visible. + * If the "transition" module is loaded, show optionally + * animates the showing of the node using either the default + * transition effect ('fadeIn'), or the given named effect. + * @method show + * @param {String} name A named Transition effect to use as the show effect. + * @param {Object} config Options to use with the transition. + * @param {Function} callback An optional function to run after the transition completes. + * @chainable + */ + 'show', + + /** + * Hides each node. + * If the "transition" module is loaded, hide optionally + * animates the hiding of the node using either the default + * transition effect ('fadeOut'), or the given named effect. + * @method hide + * @param {String} name A named Transition effect to use as the show effect. + * @param {Object} config Options to use with the transition. + * @param {Function} callback An optional function to run after the transition completes. + * @chainable + */ + 'hide', + + 'toggleView' +]); + +// one-off implementation to convert array of Nodes to NodeList +// e.g. Y.all('input').get('parentNode'); + +/** Called on each Node instance + * @method get + * @see Node + */ +NodeList.prototype.get = function(attr) { + var ret = [], + nodes = this._nodes, + isNodeList = false, + getTemp = NodeList._getTempNode, + instance, + val; + + if (nodes[0]) { + instance = Y.Node._instances[nodes[0]._yuid] || getTemp(nodes[0]); + val = instance._get(attr); + if (val && val.nodeType) { + isNodeList = true; + } + } + + Y.Array.each(nodes, function(node) { + instance = Y.Node._instances[node._yuid]; + + if (!instance) { + instance = getTemp(node); + } + + val = instance._get(attr); + if (!isNodeList) { // convert array of Nodes to NodeList + val = Y.Node.scrubVal(val, instance); + } + + ret.push(val); + }); + + return (isNodeList) ? Y.all(ret) : ret; +}; + +Y.NodeList = NodeList; + +Y.all = function(nodes) { + return new NodeList(nodes); +}; + +Y.Node.all = Y.all; +Y.Array.each([ + /** + * Passes through to DOM method. + * @for Node + * @method removeChild + * @param {HTMLElement | Node} node Node to be removed + * @return {Node} The removed node + */ + 'removeChild', + + /** + * Passes through to DOM method. + * @method hasChildNodes + * @return {Boolean} Whether or not the node has any childNodes + */ + 'hasChildNodes', + + /** + * Passes through to DOM method. + * @method cloneNode + * @param {Boolean} deep Whether or not to perform a deep clone, which includes + * subtree and attributes + * @return {Node} The clone + */ + 'cloneNode', + + /** + * Passes through to DOM method. + * @method hasAttribute + * @param {String} attribute The attribute to test for + * @return {Boolean} Whether or not the attribute is present + */ + 'hasAttribute', + + /** + * Passes through to DOM method. + * @method removeAttribute + * @param {String} attribute The attribute to be removed + * @chainable + */ + 'removeAttribute', + + /** + * Passes through to DOM method. + * @method scrollIntoView + * @chainable + */ + 'scrollIntoView', + + /** + * Passes through to DOM method. + * @method getElementsByTagName + * @param {String} tagName The tagName to collect + * @return {NodeList} A NodeList representing the HTMLCollection + */ + 'getElementsByTagName', + + /** + * Passes through to DOM method. + * @method focus + * @chainable + */ + 'focus', + + /** + * Passes through to DOM method. + * @method blur + * @chainable + */ + 'blur', + + /** + * Passes through to DOM method. + * Only valid on FORM elements + * @method submit + * @chainable + */ + 'submit', + + /** + * Passes through to DOM method. + * Only valid on FORM elements + * @method reset + * @chainable + */ + 'reset', + + /** + * Passes through to DOM method. + * @method select + * @chainable + */ + 'select', + + /** + * Passes through to DOM method. + * Only valid on TABLE elements + * @method createCaption + * @chainable + */ + 'createCaption' + +], function(method) { + Y.Node.prototype[method] = function(arg1, arg2, arg3) { + var ret = this.invoke(method, arg1, arg2, arg3); + return ret; + }; +}); + +Y.Node.importMethod(Y.DOM, [ + /** + * Determines whether the node is an ancestor of another HTML element in the DOM hierarchy. + * @method contains + * @param {Node | HTMLElement} needle The possible node or descendent + * @return {Boolean} Whether or not this node is the needle its ancestor + */ + 'contains', + /** + * Allows setting attributes on DOM nodes, normalizing in some cases. + * This passes through to the DOM node, allowing for custom attributes. + * @method setAttribute + * @for Node + * @for NodeList + * @chainable + * @param {string} name The attribute name + * @param {string} value The value to set + */ + 'setAttribute', + /** + * Allows getting attributes on DOM nodes, normalizing in some cases. + * This passes through to the DOM node, allowing for custom attributes. + * @method getAttribute + * @for Node + * @for NodeList + * @param {string} name The attribute name + * @return {string} The attribute value + */ + 'getAttribute', + + /** + * Wraps the given HTML around the node. + * @method wrap + * @param {String} html The markup to wrap around the node. + * @chainable + */ + 'wrap', + + /** + * Removes the node's parent node. + * @method unwrap + * @chainable + */ + 'unwrap', + + /** + * Applies a unique ID to the node if none exists + * @method generateID + * @return {String} The existing or generated ID + */ + 'generateID' +]); + +Y.NodeList.importMethod(Y.Node.prototype, [ +/** + * Allows getting attributes on DOM nodes, normalizing in some cases. + * This passes through to the DOM node, allowing for custom attributes. + * @method getAttribute + * @see Node + * @for NodeList + * @param {string} name The attribute name + * @return {string} The attribute value + */ + + 'getAttribute', +/** + * Allows setting attributes on DOM nodes, normalizing in some cases. + * This passes through to the DOM node, allowing for custom attributes. + * @method setAttribute + * @see Node + * @for NodeList + * @chainable + * @param {string} name The attribute name + * @param {string} value The value to set + */ + 'setAttribute', + +/** + * Allows for removing attributes on DOM nodes. + * This passes through to the DOM node, allowing for custom attributes. + * @method removeAttribute + * @see Node + * @for NodeList + * @param {string} name The attribute to remove + */ + 'removeAttribute', +/** + * Removes the parent node from node in the list. + * @method unwrap + * @chainable + */ + 'unwrap', +/** + * Wraps the given HTML around each node. + * @method wrap + * @param {String} html The markup to wrap around the node. + * @chainable + */ + 'wrap', + +/** + * Applies a unique ID to each node if none exists + * @method generateID + * @return {String} The existing or generated ID + */ + 'generateID' +]); +(function(Y) { + var methods = [ + /** + * Determines whether each node has the given className. + * @method hasClass + * @for Node + * @param {String} className the class name to search for + * @return {Boolean} Whether or not the element has the specified class + */ + 'hasClass', + + /** + * Adds a class name to each node. + * @method addClass + * @param {String} className the class name to add to the node's class attribute + * @chainable + */ + 'addClass', + + /** + * Removes a class name from each node. + * @method removeClass + * @param {String} className the class name to remove from the node's class attribute + * @chainable + */ + 'removeClass', + + /** + * Replace a class with another class for each node. + * If no oldClassName is present, the newClassName is simply added. + * @method replaceClass + * @param {String} oldClassName the class name to be replaced + * @param {String} newClassName the class name that will be replacing the old class name + * @chainable + */ + 'replaceClass', + + /** + * If the className exists on the node it is removed, if it doesn't exist it is added. + * @method toggleClass + * @param {String} className the class name to be toggled + * @param {Boolean} force Option to force adding or removing the class. + * @chainable + */ + 'toggleClass' + ]; + + Y.Node.importMethod(Y.DOM, methods); + /** + * Determines whether each node has the given className. + * @method hasClass + * @see Node.hasClass + * @for NodeList + * @param {String} className the class name to search for + * @return {Array} An array of booleans for each node bound to the NodeList. + */ + + /** + * Adds a class name to each node. + * @method addClass + * @see Node.addClass + * @param {String} className the class name to add to the node's class attribute + * @chainable + */ + + /** + * Removes a class name from each node. + * @method removeClass + * @see Node.removeClass + * @param {String} className the class name to remove from the node's class attribute + * @chainable + */ + + /** + * Replace a class with another class for each node. + * If no oldClassName is present, the newClassName is simply added. + * @method replaceClass + * @see Node.replaceClass + * @param {String} oldClassName the class name to be replaced + * @param {String} newClassName the class name that will be replacing the old class name + * @chainable + */ + + /** + * If the className exists on the node it is removed, if it doesn't exist it is added. + * @method toggleClass + * @see Node.toggleClass + * @param {String} className the class name to be toggled + * @chainable + */ + Y.NodeList.importMethod(Y.Node.prototype, methods); +})(Y); + +if (!Y.config.doc.documentElement.hasAttribute) { // IE < 8 + Y.Node.prototype.hasAttribute = function(attr) { + if (attr === 'value') { + if (this.get('value') !== "") { // IE < 8 fails to populate specified when set in HTML + return true; + } + } + return !!(this._node.attributes[attr] && + this._node.attributes[attr].specified); + }; +} + +// IE throws an error when calling focus() on an element that's invisible, not +// displayed, or disabled. +Y.Node.prototype.focus = function () { + try { + this._node.focus(); + } catch (e) { + } +}; + +// IE throws error when setting input.type = 'hidden', +// input.setAttribute('type', 'hidden') and input.attributes.type.value = 'hidden' +Y.Node.ATTRS.type = { + setter: function(val) { + if (val === 'hidden') { + try { + this._node.type = 'hidden'; + } catch(e) { + this.setStyle('display', 'none'); + this._inputType = 'hidden'; + } + } else { + try { // IE errors when changing the type from "hidden' + this._node.type = val; + } catch (e) { + } + } + return val; + }, + + getter: function() { + return this._inputType || this._node.type; + }, + + _bypassProxy: true // don't update DOM when using with Attribute +}; + +if (Y.config.doc.createElement('form').elements.nodeType) { + // IE: elements collection is also FORM node which trips up scrubVal. + Y.Node.ATTRS.elements = { + getter: function() { + return this.all('input, textarea, button, select'); + } + }; +} + +Y.mix(Y.Node.ATTRS, { + offsetHeight: { + setter: function(h) { + Y.DOM.setHeight(this._node, h); + return h; + }, + + getter: function() { + return this._node.offsetHeight; + } + }, + + offsetWidth: { + setter: function(w) { + Y.DOM.setWidth(this._node, w); + return w; + }, + + getter: function() { + return this._node.offsetWidth; + } + } +}); + +Y.mix(Y.Node.prototype, { + sizeTo: function(w, h) { + var node; + if (arguments.length < 2) { + node = Y.one(w); + w = node.get('offsetWidth'); + h = node.get('offsetHeight'); + } + + this.setAttrs({ + offsetWidth: w, + offsetHeight: h + }); + } +}); +var Y_NodeList = Y.NodeList, + ArrayProto = Array.prototype, + ArrayMethods = [ + /** Returns a new NodeList combining the given NodeList(s) + * @for NodeList + * @method concat + * @param {NodeList | Array} valueN Arrays/NodeLists and/or values to + * concatenate to the resulting NodeList + * @return {NodeList} A new NodeList comprised of this NodeList joined with the input. + */ + 'concat', + /** Removes the first last from the NodeList and returns it. + * @for NodeList + * @method pop + * @return {Node} The last item in the NodeList. + */ + 'pop', + /** Adds the given Node(s) to the end of the NodeList. + * @for NodeList + * @method push + * @param {Node | DOMNode} nodeN One or more nodes to add to the end of the NodeList. + */ + 'push', + /** Removes the first item from the NodeList and returns it. + * @for NodeList + * @method shift + * @return {Node} The first item in the NodeList. + */ + 'shift', + /** Returns a new NodeList comprising the Nodes in the given range. + * @for NodeList + * @method slice + * @param {Number} begin Zero-based index at which to begin extraction. + As a negative index, start indicates an offset from the end of the sequence. slice(-2) extracts the second-to-last element and the last element in the sequence. + * @param {Number} end Zero-based index at which to end extraction. slice extracts up to but not including end. + slice(1,4) extracts the second element through the fourth element (elements indexed 1, 2, and 3). + As a negative index, end indicates an offset from the end of the sequence. slice(2,-1) extracts the third element through the second-to-last element in the sequence. + If end is omitted, slice extracts to the end of the sequence. + * @return {NodeList} A new NodeList comprised of this NodeList joined with the input. + */ + 'slice', + /** Changes the content of the NodeList, adding new elements while removing old elements. + * @for NodeList + * @method splice + * @param {Number} index Index at which to start changing the array. If negative, will begin that many elements from the end. + * @param {Number} howMany An integer indicating the number of old array elements to remove. If howMany is 0, no elements are removed. In this case, you should specify at least one new element. If no howMany parameter is specified (second syntax above, which is a SpiderMonkey extension), all elements after index are removed. + * {Node | DOMNode| element1, ..., elementN + The elements to add to the array. If you don't specify any elements, splice simply removes elements from the array. + * @return {NodeList} The element(s) removed. + */ + 'splice', + /** Adds the given Node(s) to the beginning of the NodeList. + * @for NodeList + * @method push + * @param {Node | DOMNode} nodeN One or more nodes to add to the NodeList. + */ + 'unshift' + ]; + + +Y.Array.each(ArrayMethods, function(name) { + Y_NodeList.prototype[name] = function() { + var args = [], + i = 0, + arg; + + while ((arg = arguments[i++])) { // use DOM nodes/nodeLists + args.push(arg._node || arg._nodes || arg); + } + return Y.Node.scrubVal(ArrayProto[name].apply(this._nodes, args)); + }; +}); + + +}, '3.3.0' ,{requires:['dom-base', 'selector-css2', 'event-base']}); +YUI.add('node-style', function(Y) { + +(function(Y) { +/** + * Extended Node interface for managing node styles. + * @module node + * @submodule node-style + */ + +var methods = [ + /** + * Returns the style's current value. + * @method getStyle + * @for Node + * @param {String} attr The style attribute to retrieve. + * @return {String} The current value of the style property for the element. + */ + 'getStyle', + + /** + * Returns the computed value for the given style property. + * @method getComputedStyle + * @param {String} attr The style attribute to retrieve. + * @return {String} The computed value of the style property for the element. + */ + 'getComputedStyle', + + /** + * Sets a style property of the node. + * @method setStyle + * @param {String} attr The style attribute to set. + * @param {String|Number} val The value. + * @chainable + */ + 'setStyle', + + /** + * Sets multiple style properties on the node. + * @method setStyles + * @param {Object} hash An object literal of property:value pairs. + * @chainable + */ + 'setStyles' +]; +Y.Node.importMethod(Y.DOM, methods); +/** + * Returns an array of values for each node. + * @method getStyle + * @for NodeList + * @see Node.getStyle + * @param {String} attr The style attribute to retrieve. + * @return {Array} The current values of the style property for the element. + */ + +/** + * Returns an array of the computed value for each node. + * @method getComputedStyle + * @see Node.getComputedStyle + * @param {String} attr The style attribute to retrieve. + * @return {Array} The computed values for each node. + */ + +/** + * Sets a style property on each node. + * @method setStyle + * @see Node.setStyle + * @param {String} attr The style attribute to set. + * @param {String|Number} val The value. + * @chainable + */ + +/** + * Sets multiple style properties on each node. + * @method setStyles + * @see Node.setStyles + * @param {Object} hash An object literal of property:value pairs. + * @chainable + */ +Y.NodeList.importMethod(Y.Node.prototype, methods); +})(Y); + + +}, '3.3.0' ,{requires:['dom-style', 'node-base']}); +YUI.add('node-screen', function(Y) { + +/** + * Extended Node interface for managing regions and screen positioning. + * Adds support for positioning elements and normalizes window size and scroll detection. + * @module node + * @submodule node-screen + */ + +// these are all "safe" returns, no wrapping required +Y.each([ + /** + * Returns the inner width of the viewport (exludes scrollbar). + * @config winWidth + * @for Node + * @type {Int} + */ + 'winWidth', + + /** + * Returns the inner height of the viewport (exludes scrollbar). + * @config winHeight + * @type {Int} + */ + 'winHeight', + + /** + * Document width + * @config winHeight + * @type {Int} + */ + 'docWidth', + + /** + * Document height + * @config docHeight + * @type {Int} + */ + 'docHeight', + + /** + * Amount page has been scroll vertically + * @config docScrollX + * @type {Int} + */ + 'docScrollX', + + /** + * Amount page has been scroll horizontally + * @config docScrollY + * @type {Int} + */ + 'docScrollY' + ], + function(name) { + Y.Node.ATTRS[name] = { + getter: function() { + var args = Array.prototype.slice.call(arguments); + args.unshift(Y.Node.getDOMNode(this)); + + return Y.DOM[name].apply(this, args); + } + }; + } +); + +Y.Node.ATTRS.scrollLeft = { + getter: function() { + var node = Y.Node.getDOMNode(this); + return ('scrollLeft' in node) ? node.scrollLeft : Y.DOM.docScrollX(node); + }, + + setter: function(val) { + var node = Y.Node.getDOMNode(this); + if (node) { + if ('scrollLeft' in node) { + node.scrollLeft = val; + } else if (node.document || node.nodeType === 9) { + Y.DOM._getWin(node).scrollTo(val, Y.DOM.docScrollY(node)); // scroll window if win or doc + } + } else { + } + } +}; + +Y.Node.ATTRS.scrollTop = { + getter: function() { + var node = Y.Node.getDOMNode(this); + return ('scrollTop' in node) ? node.scrollTop : Y.DOM.docScrollY(node); + }, + + setter: function(val) { + var node = Y.Node.getDOMNode(this); + if (node) { + if ('scrollTop' in node) { + node.scrollTop = val; + } else if (node.document || node.nodeType === 9) { + Y.DOM._getWin(node).scrollTo(Y.DOM.docScrollX(node), val); // scroll window if win or doc + } + } else { + } + } +}; + +Y.Node.importMethod(Y.DOM, [ +/** + * Gets the current position of the node in page coordinates. + * @method getXY + * @for Node + * @return {Array} The XY position of the node +*/ + 'getXY', + +/** + * Set the position of the node in page coordinates, regardless of how the node is positioned. + * @method setXY + * @param {Array} xy Contains X & Y values for new position (coordinates are page-based) + * @chainable + */ + 'setXY', + +/** + * Gets the current position of the node in page coordinates. + * @method getX + * @return {Int} The X position of the node +*/ + 'getX', + +/** + * Set the position of the node in page coordinates, regardless of how the node is positioned. + * @method setX + * @param {Int} x X value for new position (coordinates are page-based) + * @chainable + */ + 'setX', + +/** + * Gets the current position of the node in page coordinates. + * @method getY + * @return {Int} The Y position of the node +*/ + 'getY', + +/** + * Set the position of the node in page coordinates, regardless of how the node is positioned. + * @method setY + * @param {Int} y Y value for new position (coordinates are page-based) + * @chainable + */ + 'setY', + +/** + * Swaps the XY position of this node with another node. + * @method swapXY + * @param {Y.Node || HTMLElement} otherNode The node to swap with. + * @chainable + */ + 'swapXY' +]); + +/** + * Returns a region object for the node + * @config region + * @for Node + * @type Node + */ +Y.Node.ATTRS.region = { + getter: function() { + var node = Y.Node.getDOMNode(this), + region; + + if (node && !node.tagName) { + if (node.nodeType === 9) { // document + node = node.documentElement; + } + } + if (node.alert) { + region = Y.DOM.viewportRegion(node); + } else { + region = Y.DOM.region(node); + } + return region; + } +}; + +/** + * Returns a region object for the node's viewport + * @config viewportRegion + * @type Node + */ +Y.Node.ATTRS.viewportRegion = { + getter: function() { + return Y.DOM.viewportRegion(Y.Node.getDOMNode(this)); + } +}; + +Y.Node.importMethod(Y.DOM, 'inViewportRegion'); + +// these need special treatment to extract 2nd node arg +/** + * Compares the intersection of the node with another node or region + * @method intersect + * @for Node + * @param {Node|Object} node2 The node or region to compare with. + * @param {Object} altRegion An alternate region to use (rather than this node's). + * @return {Object} An object representing the intersection of the regions. + */ +Y.Node.prototype.intersect = function(node2, altRegion) { + var node1 = Y.Node.getDOMNode(this); + if (Y.instanceOf(node2, Y.Node)) { // might be a region object + node2 = Y.Node.getDOMNode(node2); + } + return Y.DOM.intersect(node1, node2, altRegion); +}; + +/** + * Determines whether or not the node is within the giving region. + * @method inRegion + * @param {Node|Object} node2 The node or region to compare with. + * @param {Boolean} all Whether or not all of the node must be in the region. + * @param {Object} altRegion An alternate region to use (rather than this node's). + * @return {Object} An object representing the intersection of the regions. + */ +Y.Node.prototype.inRegion = function(node2, all, altRegion) { + var node1 = Y.Node.getDOMNode(this); + if (Y.instanceOf(node2, Y.Node)) { // might be a region object + node2 = Y.Node.getDOMNode(node2); + } + return Y.DOM.inRegion(node1, node2, all, altRegion); +}; + + +}, '3.3.0' ,{requires:['dom-screen']}); +YUI.add('node-pluginhost', function(Y) { + +/** + * Registers plugins to be instantiated at the class level (plugins + * which should be plugged into every instance of Node by default). + * + * @method Node.plug + * @static + * + * @param {Function | Array} plugin Either the plugin class, an array of plugin classes or an array of objects (with fn and cfg properties defined) + * @param {Object} config (Optional) If plugin is the plugin class, the configuration for the plugin + */ +Y.Node.plug = function() { + var args = Y.Array(arguments); + args.unshift(Y.Node); + Y.Plugin.Host.plug.apply(Y.Base, args); + return Y.Node; +}; + +/** + * Unregisters any class level plugins which have been registered by the Node + * + * @method Node.unplug + * @static + * + * @param {Function | Array} plugin The plugin class, or an array of plugin classes + */ +Y.Node.unplug = function() { + var args = Y.Array(arguments); + args.unshift(Y.Node); + Y.Plugin.Host.unplug.apply(Y.Base, args); + return Y.Node; +}; + +Y.mix(Y.Node, Y.Plugin.Host, false, null, 1); + +// allow batching of plug/unplug via NodeList +// doesn't use NodeList.importMethod because we need real Nodes (not tmpNode) +Y.NodeList.prototype.plug = function() { + var args = arguments; + Y.NodeList.each(this, function(node) { + Y.Node.prototype.plug.apply(Y.one(node), args); + }); +}; + +Y.NodeList.prototype.unplug = function() { + var args = arguments; + Y.NodeList.each(this, function(node) { + Y.Node.prototype.unplug.apply(Y.one(node), args); + }); +}; + + +}, '3.3.0' ,{requires:['node-base', 'pluginhost']}); +YUI.add('node-event-delegate', function(Y) { + +/** + * Functionality to make the node a delegated event container + * @module node + * @submodule node-event-delegate + */ + +/** + *

          Sets up a delegation listener for an event occurring inside the Node. + * The delegated event will be verified against a supplied selector or + * filtering function to test if the event references at least one node that + * should trigger the subscription callback.

          + * + *

          Selector string filters will trigger the callback if the event originated + * from a node that matches it or is contained in a node that matches it. + * Function filters are called for each Node up the parent axis to the + * subscribing container node, and receive at each level the Node and the event + * object. The function should return true (or a truthy value) if that Node + * should trigger the subscription callback. Note, it is possible for filters + * to match multiple Nodes for a single event. In this case, the delegate + * callback will be executed for each matching Node.

          + * + *

          For each matching Node, the callback will be executed with its 'this' + * object set to the Node matched by the filter (unless a specific context was + * provided during subscription), and the provided event's + * currentTarget will also be set to the matching Node. The + * containing Node from which the subscription was originally made can be + * referenced as e.container. + * + * @method delegate + * @param type {String} the event type to delegate + * @param fn {Function} the callback function to execute. This function + * will be provided the event object for the delegated event. + * @param spec {String|Function} a selector that must match the target of the + * event or a function to test target and its parents for a match + * @param context {Object} optional argument that specifies what 'this' refers to. + * @param args* {any} 0..n additional arguments to pass on to the callback function. + * These arguments will be added after the event object. + * @return {EventHandle} the detach handle + * @for Node + */ +Y.Node.prototype.delegate = function(type) { + + var args = Y.Array(arguments, 0, true), + index = (Y.Lang.isObject(type) && !Y.Lang.isArray(type)) ? 1 : 2; + + args.splice(index, 0, this._node); + + return Y.delegate.apply(Y, args); +}; + + +}, '3.3.0' ,{requires:['node-base', 'event-delegate']}); + + +YUI.add('node', function(Y){}, '3.3.0' ,{skinnable:false, requires:['dom', 'event-base', 'event-delegate', 'pluginhost'], use:['node-base', 'node-style', 'node-screen', 'node-pluginhost', 'node-event-delegate']}); + +YUI.add('event-delegate', function(Y) { + +/** + * Adds event delegation support to the library. + * + * @module event + * @submodule event-delegate + */ + +var toArray = Y.Array, + YLang = Y.Lang, + isString = YLang.isString, + isObject = YLang.isObject, + isArray = YLang.isArray, + selectorTest = Y.Selector.test, + detachCategories = Y.Env.evt.handles; + +/** + *

          Sets up event delegation on a container element. The delegated event + * will use a supplied selector or filtering function to test if the event + * references at least one node that should trigger the subscription + * callback.

          + * + *

          Selector string filters will trigger the callback if the event originated + * from a node that matches it or is contained in a node that matches it. + * Function filters are called for each Node up the parent axis to the + * subscribing container node, and receive at each level the Node and the event + * object. The function should return true (or a truthy value) if that Node + * should trigger the subscription callback. Note, it is possible for filters + * to match multiple Nodes for a single event. In this case, the delegate + * callback will be executed for each matching Node.

          + * + *

          For each matching Node, the callback will be executed with its 'this' + * object set to the Node matched by the filter (unless a specific context was + * provided during subscription), and the provided event's + * currentTarget will also be set to the matching Node. The + * containing Node from which the subscription was originally made can be + * referenced as e.container. + * + * @method delegate + * @param type {String} the event type to delegate + * @param fn {Function} the callback function to execute. This function + * will be provided the event object for the delegated event. + * @param el {String|node} the element that is the delegation container + * @param spec {string|Function} a selector that must match the target of the + * event or a function to test target and its parents for a match + * @param context optional argument that specifies what 'this' refers to. + * @param args* 0..n additional arguments to pass on to the callback function. + * These arguments will be added after the event object. + * @return {EventHandle} the detach handle + * @for YUI + */ +function delegate(type, fn, el, filter) { + var args = toArray(arguments, 0, true), + query = isString(el) ? el : null, + typeBits, synth, container, categories, cat, i, len, handles, handle; + + // Support Y.delegate({ click: fnA, key: fnB }, context, filter, ...); + // and Y.delegate(['click', 'key'], fn, context, filter, ...); + if (isObject(type)) { + handles = []; + + if (isArray(type)) { + for (i = 0, len = type.length; i < len; ++i) { + args[0] = type[i]; + handles.push(Y.delegate.apply(Y, args)); + } + } else { + // Y.delegate({'click', fn}, context, filter) => + // Y.delegate('click', fn, context, filter) + args.unshift(null); // one arg becomes two; need to make space + + for (i in type) { + if (type.hasOwnProperty(i)) { + args[0] = i; + args[1] = type[i]; + handles.push(Y.delegate.apply(Y, args)); + } + } + } + + return new Y.EventHandle(handles); + } + + typeBits = type.split(/\|/); + + if (typeBits.length > 1) { + cat = typeBits.shift(); + type = typeBits.shift(); + } + + synth = Y.Node.DOM_EVENTS[type]; + + if (isObject(synth) && synth.delegate) { + handle = synth.delegate.apply(synth, arguments); + } + + if (!handle) { + if (!type || !fn || !el || !filter) { + return; + } + + container = (query) ? Y.Selector.query(query, null, true) : el; + + if (!container && isString(el)) { + handle = Y.on('available', function () { + Y.mix(handle, Y.delegate.apply(Y, args), true); + }, el); + } + + if (!handle && container) { + args.splice(2, 2, container); // remove the filter + + handle = Y.Event._attach(args, { facade: false }); + handle.sub.filter = filter; + handle.sub._notify = delegate.notifySub; + } + } + + if (handle && cat) { + categories = detachCategories[cat] || (detachCategories[cat] = {}); + categories = categories[type] || (categories[type] = []); + categories.push(handle); + } + + return handle; +} + +/** + * Overrides the _notify method on the normal DOM subscription to + * inject the filtering logic and only proceed in the case of a match. + * + * @method delegate.notifySub + * @param thisObj {Object} default 'this' object for the callback + * @param args {Array} arguments passed to the event's fire() + * @param ce {CustomEvent} the custom event managing the DOM subscriptions for + * the subscribed event on the subscribing node. + * @return {Boolean} false if the event was stopped + * @private + * @static + * @since 3.2.0 + */ +delegate.notifySub = function (thisObj, args, ce) { + // Preserve args for other subscribers + args = args.slice(); + if (this.args) { + args.push.apply(args, this.args); + } + + // Only notify subs if the event occurred on a targeted element + var currentTarget = delegate._applyFilter(this.filter, args, ce), + //container = e.currentTarget, + e, i, len, ret; + + if (currentTarget) { + // Support multiple matches up the the container subtree + currentTarget = toArray(currentTarget); + + // The second arg is the currentTarget, but we'll be reusing this + // facade, replacing the currentTarget for each use, so it doesn't + // matter what element we seed it with. + e = args[0] = new Y.DOMEventFacade(args[0], ce.el, ce); + + e.container = Y.one(ce.el); + + for (i = 0, len = currentTarget.length; i < len && !e.stopped; ++i) { + e.currentTarget = Y.one(currentTarget[i]); + + ret = this.fn.apply(this.context || e.currentTarget, args); + + if (ret === false) { // stop further notifications + break; + } + } + + return ret; + } +}; + +/** + *

          Compiles a selector string into a filter function to identify whether + * Nodes along the parent axis of an event's target should trigger event + * notification.

          + * + *

          This function is memoized, so previously compiled filter functions are + * returned if the same selector string is provided.

          + * + *

          This function may be useful when defining synthetic events for delegate + * handling.

          + * + * @method delegate.compileFilter + * @param selector {String} the selector string to base the filtration on + * @return {Function} + * @since 3.2.0 + * @static + */ +delegate.compileFilter = Y.cached(function (selector) { + return function (target, e) { + return selectorTest(target._node, selector, e.currentTarget._node); + }; +}); + +/** + * Walks up the parent axis of an event's target, and tests each element + * against a supplied filter function. If any Nodes, including the container, + * satisfy the filter, the delegated callback will be triggered for each. + * + * @method delegate._applyFilter + * @param filter {Function} boolean function to test for inclusion in event + * notification + * @param args {Array} the arguments that would be passed to subscribers + * @param ce {CustomEvent} the DOM event wrapper + * @return {Node|Node[]|undefined} The Node or Nodes that satisfy the filter + * @protected + */ +delegate._applyFilter = function (filter, args, ce) { + var e = args[0], + container = ce.el, // facadeless events in IE, have no e.currentTarget + target = e.target || e.srcElement, + match = [], + isContainer = false; + + // Resolve text nodes to their containing element + if (target.nodeType === 3) { + target = target.parentNode; + } + + // passing target as the first arg rather than leaving well enough alone + // making 'this' in the filter function refer to the target. This is to + // support bound filter functions. + args.unshift(target); + + if (isString(filter)) { + while (target) { + isContainer = (target === container); + if (selectorTest(target, filter, (isContainer ?null: container))) { + match.push(target); + } + + if (isContainer) { + break; + } + + target = target.parentNode; + } + } else { + // filter functions are implementer code and should receive wrappers + args[0] = Y.one(target); + args[1] = new Y.DOMEventFacade(e, container, ce); + + while (target) { + // filter(target, e, extra args...) - this === target + if (filter.apply(args[0], args)) { + match.push(target); + } + + if (target === container) { + break; + } + + target = target.parentNode; + args[0] = Y.one(target); + } + args[1] = e; // restore the raw DOM event + } + + if (match.length <= 1) { + match = match[0]; // single match or undefined + } + + // remove the target + args.shift(); + + return match; +}; + +/** + * Sets up event delegation on a container element. The delegated event + * will use a supplied filter to test if the callback should be executed. + * This filter can be either a selector string or a function that returns + * a Node to use as the currentTarget for the event. + * + * The event object for the delegated event is supplied to the callback + * function. It is modified slightly in order to support all properties + * that may be needed for event delegation. 'currentTarget' is set to + * the element that matched the selector string filter or the Node returned + * from the filter function. 'container' is set to the element that the + * listener is delegated from (this normally would be the 'currentTarget'). + * + * Filter functions will be called with the arguments that would be passed to + * the callback function, including the event object as the first parameter. + * The function should return false (or a falsey value) if the success criteria + * aren't met, and the Node to use as the event's currentTarget and 'this' + * object if they are. + * + * @method delegate + * @param type {string} the event type to delegate + * @param fn {function} the callback function to execute. This function + * will be provided the event object for the delegated event. + * @param el {string|node} the element that is the delegation container + * @param filter {string|function} a selector that must match the target of the + * event or a function that returns a Node or false. + * @param context optional argument that specifies what 'this' refers to. + * @param args* 0..n additional arguments to pass on to the callback function. + * These arguments will be added after the event object. + * @return {EventHandle} the detach handle + * @for YUI + */ +Y.delegate = Y.Event.delegate = delegate; + + +}, '3.3.0' ,{requires:['node-base']}); +YUI.add('io-base', function(Y) { + + /** + * Base IO functionality. Provides basic XHR transport support. + * @module io + * @submodule io-base + */ + + /** + * The io class is a utility that brokers HTTP requests through a simplified + * interface. Specifically, it allows JavaScript to make HTTP requests to + * a resource without a page reload. The underlying transport for making + * same-domain requests is the XMLHttpRequest object. YUI.io can also use + * Flash, if specified as a transport, for cross-domain requests. + * + * @class io + */ + + /** + * @event io:start + * @description This event is fired by YUI.io when a transaction is initiated. + * @type Event Custom + */ + var E_START = 'io:start', + + /** + * @event io:complete + * @description This event is fired by YUI.io when a transaction is complete. + * Response status and data are accessible, if available. + * @type Event Custom + */ + E_COMPLETE = 'io:complete', + + /** + * @event io:success + * @description This event is fired by YUI.io when a transaction is complete, and + * the HTTP status resolves to HTTP2xx. + * @type Event Custom + */ + E_SUCCESS = 'io:success', + + /** + * @event io:failure + * @description This event is fired by YUI.io when a transaction is complete, and + * the HTTP status resolves to HTTP4xx, 5xx and above. + * @type Event Custom + */ + E_FAILURE = 'io:failure', + + /** + * @event io:end + * @description This event signifies the end of the transaction lifecycle. The + * transaction transport is destroyed. + * @type Event Custom + */ + E_END = 'io:end', + + //-------------------------------------- + // Properties + //-------------------------------------- + /** + * @description A transaction counter that increments for each transaction. + * + * @property transactionId + * @private + * @static + * @type int + */ + transactionId = 0, + + /** + * @description Object of default HTTP headers to be initialized and sent + * for all transactions. + * + * @property _headers + * @private + * @static + * @type object + */ + _headers = { + 'X-Requested-With' : 'XMLHttpRequest' + }, + + /** + * @description Object that stores timeout values for any transaction with + * a defined "timeout" configuration property. + * + * @property _timeout + * @private + * @static + * @type object + */ + _timeout = {}, + + // Window reference + w = Y.config.win; + + //-------------------------------------- + // Methods + //-------------------------------------- + + /** + * @description Method that creates the XMLHttpRequest transport + * + * @method _xhr + * @private + * @static + * @return object + */ + function _xhr() { + return w.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP'); + } + + + /** + * @description Method that increments _transactionId for each transaction. + * + * @method _id + * @private + * @static + * @return int + */ + function _id() { + var id = transactionId; + + transactionId++; + + return id; + } + + /** + * @description Method that creates a unique transaction object for each + * request. + * + * @method _create + * @private + * @static + * @param {number} c - configuration object subset to determine if + * the transaction is an XDR or file upload, + * requiring an alternate transport. + * @param {number} i - transaction id + * @return object + */ + function _create(c, i) { + var o = {}; + o.id = Y.Lang.isNumber(i) ? i : _id(); + c = c || {}; + + if (!c.use && !c.upload) { + o.c = _xhr(); + } + else if (c.use) { + if (c.use === 'native') { + if (w.XDomainRequest) { + o.c = new XDomainRequest(); + o.t = c.use; + } + else { + o.c = _xhr(); + } + } + else { + o.c = Y.io._transport[c.use]; + o.t = c.use; + } + } + else { + o.c = {}; + } + + return o; + } + + + function _destroy(o) { + if (w) { + if (o.c && w.XMLHttpRequest) { + o.c.onreadystatechange = null; + } + else if (Y.UA.ie === 6 && !o.t) { + // IE, when using XMLHttpRequest as an ActiveX Object, will throw + // a "Type Mismatch" error if the event handler is set to "null". + o.c.abort(); + } + } + + o.c = null; + o = null; + } + + /** + * @description Method for creating and subscribing transaction events. + * + * @method _tE + * @private + * @static + * @param {string} e - event to be published + * @param {object} c - configuration data subset for event subscription. + * + * @return void + */ + function _tE(e, c) { + var eT = new Y.EventTarget().publish('transaction:' + e), + a = c.arguments, + cT = c.context || Y; + + if (a) { + eT.on(c.on[e], cT, a); + } + else { + eT.on(c.on[e], cT); + } + + return eT; + } + + /** + * @description Fires event "io:start" and creates, fires a + * transaction-specific start event, if config.on.start is + * defined. + * + * @method _ioStart + * @private + * @static + * @param {number} id - transaction id + * @param {object} c - configuration object for the transaction. + * + * @return void + */ + function _ioStart(id, c) { + var a = c.arguments; + + if (a) { + Y.fire(E_START, id, a); + } + else { + Y.fire(E_START, id); + } + + if (c.on && c.on.start) { + _tE('start', c).fire(id); + } + } + + + /** + * @description Fires event "io:complete" and creates, fires a + * transaction-specific "complete" event, if config.on.complete is + * defined. + * + * @method _ioComplete + * @private + * @static + * @param {object} o - transaction object. + * @param {object} c - configuration object for the transaction. + * + * @return void + */ + function _ioComplete(o, c) { + var r = o.e ? { status: 0, statusText: o.e } : o.c, + a = c.arguments; + + if (a) { + Y.fire(E_COMPLETE, o.id, r, a); + } + else { + Y.fire(E_COMPLETE, o.id, r); + } + + if (c.on && c.on.complete) { + _tE('complete', c).fire(o.id, r); + } + } + + /** + * @description Fires event "io:end" and creates, fires a + * transaction-specific "end" event, if config.on.end is + * defined. + * + * @method _ioEnd + * @private + * @static + * @param {object} o - transaction object. + * @param {object} c - configuration object for the transaction. + * + * @return void + */ + function _ioEnd(o, c) { + var a = c.arguments; + + if (a) { + Y.fire(E_END, o.id, a); + } + else { + Y.fire(E_END, o.id); + } + + if (c.on && c.on.end) { + _tE('end', c).fire(o.id); + } + + _destroy(o); + } + + /** + * @description Fires event "io:success" and creates, fires a + * transaction-specific "success" event, if config.on.success is + * defined. + * + * @method _ioSuccess + * @private + * @static + * @param {object} o - transaction object. + * @param {object} c - configuration object for the transaction. + * + * @return void + */ + function _ioSuccess(o, c) { + var a = c.arguments; + + if (a) { + Y.fire(E_SUCCESS, o.id, o.c, a); + } + else { + Y.fire(E_SUCCESS, o.id, o.c); + } + + if (c.on && c.on.success) { + _tE('success', c).fire(o.id, o.c); + } + + _ioEnd(o, c); + } + + /** + * @description Fires event "io:failure" and creates, fires a + * transaction-specific "failure" event, if config.on.failure is + * defined. + * + * @method _ioFailure + * @private + * @static + * @param {object} o - transaction object. + * @param {object} c - configuration object for the transaction. + * + * @return void + */ + function _ioFailure(o, c) { + var r = o.e ? { status: 0, statusText: o.e } : o.c, + a = c.arguments; + + if (a) { + Y.fire(E_FAILURE, o.id, r, a); + } + else { + Y.fire(E_FAILURE, o.id, r); + } + + if (c.on && c.on.failure) { + _tE('failure', c).fire(o.id, r); + } + + _ioEnd(o, c); + } + + /** + * @description Resends an XDR transaction, using the Flash tranport, + * if the native transport fails. + * + * @method _resend + * @private + * @static + + * @param {object} o - Transaction object generated by _create(). + * @param {string} uri - qualified path to transaction resource. + * @param {object} c - configuration object for the transaction. + * + * @return void + */ + function _resend(o, uri, c, d) { + _destroy(o); + c.xdr.use = 'flash'; + // If the original request included serialized form data and + // additional data are defined in configuration.data, it must + // be reset to prevent data duplication. + c.data = c.form && d ? d : null; + + return Y.io(uri, c, o.id); + } + + /** + * @description Method that concatenates string data for HTTP GET transactions. + * + * @method _concat + * @private + * @static + * @param {string} s - URI or root data. + * @param {string} d - data to be concatenated onto URI. + * @return int + */ + function _concat(s, d) { + s += ((s.indexOf('?') == -1) ? '?' : '&') + d; + return s; + } + + /** + * @description Method that stores default client headers for all transactions. + * If a label is passed with no value argument, the header will be deleted. + * + * @method _setHeader + * @private + * @static + * @param {string} l - HTTP header + * @param {string} v - HTTP header value + * @return int + */ + function _setHeader(l, v) { + if (v) { + _headers[l] = v; + } + else { + delete _headers[l]; + } + } + + /** + * @description Method that sets all HTTP headers to be sent in a transaction. + * + * @method _setHeaders + * @private + * @static + * @param {object} o - XHR instance for the specific transaction. + * @param {object} h - HTTP headers for the specific transaction, as defined + * in the configuration object passed to YUI.io(). + * @return void + */ + function _setHeaders(o, h) { + var p; + h = h || {}; + + for (p in _headers) { + if (_headers.hasOwnProperty(p)) { + /* + if (h[p]) { + // Configuration headers will supersede preset io headers, + // if headers match. + continue; + } + else { + h[p] = _headers[p]; + } + */ + if (!h[p]) { + h[p] = _headers[p]; + } + } + } + + for (p in h) { + if (h.hasOwnProperty(p)) { + if (h[p] !== 'disable') { + o.setRequestHeader(p, h[p]); + } + } + } + } + + /** + * @description Terminates a transaction due to an explicit abort or + * timeout. + * + * @method _ioCancel + * @private + * @static + * @param {object} o - Transaction object generated by _create(). + * @param {string} s - Identifies timed out or aborted transaction. + * + * @return void + */ + function _ioCancel(o, s) { + if (o && o.c) { + o.e = s; + o.c.abort(); + } + } + + /** + * @description Starts timeout count if the configuration object + * has a defined timeout property. + * + * @method _startTimeout + * @private + * @static + * @param {object} o - Transaction object generated by _create(). + * @param {object} t - Timeout in milliseconds. + * @return void + */ + function _startTimeout(o, t) { + _timeout[o.id] = w.setTimeout(function() { _ioCancel(o, 'timeout'); }, t); + } + + /** + * @description Clears the timeout interval started by _startTimeout(). + * + * @method _clearTimeout + * @private + * @static + * @param {number} id - Transaction id. + * @return void + */ + function _clearTimeout(id) { + w.clearTimeout(_timeout[id]); + delete _timeout[id]; + } + + /** + * @description Method that determines if a transaction response qualifies + * as success or failure, based on the response HTTP status code, and + * fires the appropriate success or failure events. + * + * @method _handleResponse + * @private + * @static + * @param {object} o - Transaction object generated by _create(). + * @param {object} c - Configuration object passed to io(). + * @return void + */ + function _handleResponse(o, c) { + var status; + + try { + status = (o.c.status && o.c.status !== 0) ? o.c.status : 0; + } + catch(e) { + status = 0; + } + + // IE reports HTTP 204 as HTTP 1223. + if (status >= 200 && status < 300 || status === 1223) { + _ioSuccess(o, c); + } + else { + _ioFailure(o, c); + } + } + + /** + * @description Event handler bound to onreadystatechange. + * + * @method _readyState + * @private + * @static + * @param {object} o - Transaction object generated by _create(). + * @param {object} c - Configuration object passed to YUI.io(). + * @return void + */ + function _readyState(o, c) { + if (o.c.readyState === 4) { + if (c.timeout) { + _clearTimeout(o.id); + } + + w.setTimeout( + function() { + _ioComplete(o, c); + _handleResponse(o, c); + }, 0); + } + } + + /** + * @description Method for requesting a transaction. _io() is implemented as + * yui.io(). Each transaction may include a configuration object. Its + * properties are: + * + * method: HTTP method verb (e.g., GET or POST). If this property is not + * not defined, the default value will be GET. + * + * data: This is the name-value string that will be sent as the transaction + * data. If the request is HTTP GET, the data become part of + * querystring. If HTTP POST, the data are sent in the message body. + * + * xdr: Defines the transport to be used for cross-domain requests. By + * setting this property, the transaction will use the specified + * transport instead of XMLHttpRequest. + * The properties are: + * { + * use: Specify the transport to be used: 'flash' and 'native' + * dataType: Set the value to 'XML' if that is the expected + * response content type. + * } + * + * + * form: This is a defined object used to process HTML form as data. The + * properties are: + * { + * id: Node object or id of HTML form. + * useDisabled: Boolean value to allow disabled HTML form field + * values to be sent as part of the data. + * } + * + * on: This is a defined object used to create and handle specific + * events during a transaction lifecycle. These events will fire in + * addition to the global io events. The events are: + * start - This event is fired when a request is sent to a resource. + * complete - This event fires when the transaction is complete. + * success - This event fires when the response status resolves to + * HTTP 2xx. + * failure - This event fires when the response status resolves to + * HTTP 4xx, 5xx; and, for all transaction exceptions, + * including aborted transactions and transaction timeouts. + * end - This even is fired at the conclusion of the transaction + * lifecycle, after a success or failure resolution. + * + * The properties are: + * { + * start: function(id, arguments){}, + * complete: function(id, responseobject, arguments){}, + * success: function(id, responseobject, arguments){}, + * failure: function(id, responseobject, arguments){}, + * end: function(id, arguments){} + * } + * Each property can reference a function or be written as an + * inline function. + * + * sync: To enable synchronous transactions, set the configuration property + * "sync" to true; the default behavior is false. Synchronous + * transactions are limited to same-domain requests only. + * + * context: Object reference for all defined transaction event handlers + * when it is implemented as a method of a base object. Defining + * "context" will set the reference of "this," used in the + * event handlers, to the context value. In the case where + * different event handlers all have different contexts, + * use Y.bind() to set the execution context, bypassing this + * configuration. + * + * headers: This is a defined object of client headers, as many as. + * desired for the transaction. The object pattern is: + * { 'header': 'value' }. + * + * timeout: This value, defined as milliseconds, is a time threshold for the + * transaction. When this threshold is reached, and the transaction's + * Complete event has not yet fired, the transaction will be aborted. + * + * arguments: Object, array, string, or number passed to all registered + * event handlers. This value is available as the second + * argument in the "start" and "abort" event handlers; and, it is + * the third argument in the "complete", "success", and "failure" + * event handlers. + * + * @method _io + * @private + * @static + * @param {string} uri - qualified path to transaction resource. + * @param {object} c - configuration object for the transaction. + * @param {number} i - transaction id, if already set. + * @return object + */ + function _io(uri, c, i) { + var f, o, d, m, r, s, oD, a, j, + u = uri; + c = Y.Object(c); + o = _create(c.xdr || c.form, i); + m = c.method ? c.method = c.method.toUpperCase() : c.method = 'GET'; + s = c.sync; + oD = c.data; + + //To serialize an object into a key-value string, add the + //QueryString module to the YUI instance's 'use' method. + if (Y.Lang.isObject(c.data) && Y.QueryString) { + c.data = Y.QueryString.stringify(c.data); + } + + if (c.form) { + if (c.form.upload) { + // This is a file upload transaction, calling + // upload() in io-upload-iframe. + return Y.io.upload(o, uri, c); + } + else { + // Serialize HTML form data. + f = Y.io._serialize(c.form, c.data); + if (m === 'POST' || m === 'PUT') { + c.data = f; + } + else if (m === 'GET') { + uri = _concat(uri, f); + } + } + } + + if (c.data && m === 'GET') { + uri = _concat(uri, c.data); + } + + if (c.data && m === 'POST') { + c.headers = Y.merge({ 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' }, c.headers); + } + + if (o.t) { + return Y.io.xdr(uri, o, c); + } + + if (!s) { + o.c.onreadystatechange = function() { _readyState(o, c); }; + } + + try { + o.c.open(m, uri, s ? false : true); + // Will work only in browsers that implement the + // Cross-Origin Resource Sharing draft. + if (c.xdr && c.xdr.credentials) { + o.c.withCredentials = true; + } + } + catch(e1) { + if (c.xdr) { + // This exception is usually thrown by browsers + // that do not support native XDR transactions. + return _resend(o, u, c, oD); + } + } + + _setHeaders(o.c, c.headers); + _ioStart(o.id, c); + try { + // Using "null" with HTTP POST will result in a request + // with no Content-Length header defined. + o.c.send(c.data || ''); + if (s) { + d = o.c; + a = ['status', 'statusText', 'responseText', 'responseXML']; + r = c.arguments ? { id: o.id, arguments: c.arguments } : { id: o.id }; + + for (j = 0; j < 4; j++) { + r[a[j]] = o.c[a[j]]; + } + + r.getAllResponseHeaders = function() { return d.getAllResponseHeaders(); }; + r.getResponseHeader = function(h) { return d.getResponseHeader(h); }; + _ioComplete(o, c); + _handleResponse(o, c); + + return r; + } + } + catch(e2) { + if (c.xdr) { + // This exception is usually thrown by browsers + // that do not support native XDR transactions. + return _resend(o, u, c, oD); + } + } + + // If config.timeout is defined, and the request is standard XHR, + // initialize timeout polling. + if (c.timeout) { + _startTimeout(o, c.timeout); + } + + return { + id: o.id, + abort: function() { + return o.c ? _ioCancel(o, 'abort') : false; + }, + isInProgress: function() { + return o.c ? o.c.readyState !== 4 && o.c.readyState !== 0 : false; + } + }; + } + + _io.start = _ioStart; + _io.complete = _ioComplete; + _io.success = _ioSuccess; + _io.failure = _ioFailure; + _io.end = _ioEnd; + _io._id = _id; + _io._timeout = _timeout; + + //-------------------------------------- + // Begin public interface definition + //-------------------------------------- + /** + * @description Method that stores default client headers for all transactions. + * If a label is passed with no value argument, the header will be deleted. + * This is the interface for _setHeader(). + * + * @method header + * @public + * @static + * @param {string} l - HTTP header + * @param {string} v - HTTP header value + * @return int + */ + _io.header = _setHeader; + + /** + * @description Method for requesting a transaction. This + * is the interface for _io(). + * + * @method io + * @public + * @static + * @param {string} uri - qualified path to transaction resource. + * @param {object} c - configuration object for the transaction. + * @return object + */ + Y.io = _io; + Y.io.http = _io; + + + +}, '3.3.0' ,{requires:['event-custom-base', 'querystring-stringify-simple']}); +YUI.add('querystring-stringify-simple', function(Y) { + +/*global Y */ +/** + *

          Provides Y.QueryString.stringify method for converting objects to Query Strings. + * This is a subset implementation of the full querystring-stringify.

          + *

          This module provides the bare minimum functionality (encoding a hash of simple values), + * without the additional support for nested data structures. Every key-value pair is + * encoded by encodeURIComponent.

          + *

          This module provides a minimalistic way for io to handle single-level objects + * as transaction data.

          + * + * @module querystring + * @submodule querystring-stringify-simple + * @for QueryString + * @static + */ + +var QueryString = Y.namespace("QueryString"), + EUC = encodeURIComponent; + +/** + *

          Converts a simple object to a Query String representation.

          + *

          Nested objects, Arrays, and so on, are not supported.

          + * + * @method stringify + * @for QueryString + * @public + * @submodule querystring-stringify-simple + * @param obj {Object} A single-level object to convert to a querystring. + * @param cfg {Object} (optional) Configuration object. In the simple + * module, only the arrayKey setting is + * supported. When set to true, the key of an + * array will have the '[]' notation appended + * to the key;. + * @static + */ +QueryString.stringify = function (obj, c) { + var qs = [], + // Default behavior is false; standard key notation. + s = c && c.arrayKey ? true : false, + key, i, l; + + for (key in obj) { + if (obj.hasOwnProperty(key)) { + if (Y.Lang.isArray(obj[key])) { + for (i = 0, l = obj[key].length; i < l; i++) { + qs.push(EUC(s ? key + '[]' : key) + '=' + EUC(obj[key][i])); + } + } + else { + qs.push(EUC(key) + '=' + EUC(obj[key])); + } + } + } + + return qs.join('&'); +}; + + + +}, '3.3.0' ); +YUI.add('json-parse', function(Y) { + +/** + *

          The JSON module adds support for serializing JavaScript objects into + * JSON strings and parsing JavaScript objects from strings in JSON format.

          + * + *

          The JSON namespace is added to your YUI instance including static methods + * Y.JSON.parse(..) and Y.JSON.stringify(..).

          + * + *

          The functionality and method signatures follow the ECMAScript 5 + * specification. In browsers with native JSON support, the native + * implementation is used.

          + * + *

          The json module is a rollup of json-parse and + * json-stringify.

          + * + *

          As their names suggest, json-parse adds support for parsing + * JSON data (Y.JSON.parse) and json-stringify for serializing + * JavaScript data into JSON strings (Y.JSON.stringify). You may choose to + * include either of the submodules individually if you don't need the + * complementary functionality, or include the rollup for both.

          + * + * @module json + * @class JSON + * @static + */ + +/** + * Provides Y.JSON.parse method to accept JSON strings and return native + * JavaScript objects. + * + * @module json + * @submodule json-parse + * @for JSON + * @static + */ + + +// All internals kept private for security reasons +function fromGlobal(ref) { + return (Y.config.win || this || {})[ref]; +} + + + /** + * Alias to native browser implementation of the JSON object if available. + * + * @property Native + * @type {Object} + * @private + */ +var _JSON = fromGlobal('JSON'), + // Create an indirect reference to eval to allow for minification + _eval = fromGlobal('eval'), + Native = (Object.prototype.toString.call(_JSON) === '[object JSON]' && _JSON), + useNative = !!Native, + + /** + * Replace certain Unicode characters that JavaScript may handle incorrectly + * during eval--either by deleting them or treating them as line + * endings--with escape sequences. + * IMPORTANT NOTE: This regex will be used to modify the input if a match is + * found. + * + * @property _UNICODE_EXCEPTIONS + * @type {RegExp} + * @private + */ + _UNICODE_EXCEPTIONS = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + + + /** + * First step in the safety evaluation. Regex used to replace all escape + * sequences (i.e. "\\", etc) with '@' characters (a non-JSON character). + * + * @property _ESCAPES + * @type {RegExp} + * @private + */ + _ESCAPES = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, + + /** + * Second step in the safety evaluation. Regex used to replace all simple + * values with ']' characters. + * + * @property _VALUES + * @type {RegExp} + * @private + */ + _VALUES = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, + + /** + * Third step in the safety evaluation. Regex used to remove all open + * square brackets following a colon, comma, or at the beginning of the + * string. + * + * @property _BRACKETS + * @type {RegExp} + * @private + */ + _BRACKETS = /(?:^|:|,)(?:\s*\[)+/g, + + /** + * Final step in the safety evaluation. Regex used to test the string left + * after all previous replacements for invalid characters. + * + * @property _UNSAFE + * @type {RegExp} + * @private + */ + _UNSAFE = /[^\],:{}\s]/, + + /** + * Replaces specific unicode characters with their appropriate \unnnn + * format. Some browsers ignore certain characters during eval. + * + * @method escapeException + * @param c {String} Unicode character + * @return {String} the \unnnn escapement of the character + * @private + */ + _escapeException = function (c) { + return '\\u'+('0000'+(+(c.charCodeAt(0))).toString(16)).slice(-4); + }, + + /** + * Traverses nested objects, applying a reviver function to each (key,value) + * from the scope if the key:value's containing object. The value returned + * from the function will replace the original value in the key:value pair. + * If the value returned is undefined, the key will be omitted from the + * returned object. + * + * @method _revive + * @param data {MIXED} Any JavaScript data + * @param reviver {Function} filter or mutation function + * @return {MIXED} The results of the filtered data + * @private + */ + _revive = function (data, reviver) { + var walk = function (o,key) { + var k,v,value = o[key]; + if (value && typeof value === 'object') { + for (k in value) { + if (value.hasOwnProperty(k)) { + v = walk(value, k); + if (v === undefined) { + delete value[k]; + } else { + value[k] = v; + } + } + } + } + return reviver.call(o,key,value); + }; + + return typeof reviver === 'function' ? walk({'':data},'') : data; + }, + + /** + * Parse a JSON string, returning the native JavaScript representation. + * + * @param s {string} JSON string data + * @param reviver {function} (optional) function(k,v) passed each key value + * pair of object literals, allowing pruning or altering values + * @return {MIXED} the native JavaScript representation of the JSON string + * @throws SyntaxError + * @method parse + * @static + */ + // JavaScript implementation in lieu of native browser support. Based on + // the json2.js library from http://json.org + _parse = function (s,reviver) { + // Replace certain Unicode characters that are otherwise handled + // incorrectly by some browser implementations. + // NOTE: This modifies the input if such characters are found! + s = s.replace(_UNICODE_EXCEPTIONS, _escapeException); + + // Test for any remaining invalid characters + if (!_UNSAFE.test(s.replace(_ESCAPES,'@'). + replace(_VALUES,']'). + replace(_BRACKETS,''))) { + + // Eval the text into a JavaScript data structure, apply any + // reviver function, and return + return _revive( _eval('(' + s + ')'), reviver ); + } + + throw new SyntaxError('JSON.parse'); + }; + +Y.namespace('JSON').parse = function (s,reviver) { + if (typeof s !== 'string') { + s += ''; + } + + return Native && Y.JSON.useNativeParse ? + Native.parse(s,reviver) : _parse(s,reviver); +}; + +function workingNative( k, v ) { + return k === "ok" ? true : v; +} + +// Double check basic functionality. This is mainly to catch early broken +// implementations of the JSON API in Firefox 3.1 beta1 and beta2 +if ( Native ) { + try { + useNative = ( Native.parse( '{"ok":false}', workingNative ) ).ok; + } + catch ( e ) { + useNative = false; + } +} + +/** + * Leverage native JSON parse if the browser has a native implementation. + * In general, this is a good idea. See the Known Issues section in the + * JSON user guide for caveats. The default value is true for browsers with + * native JSON support. + * + * @property useNativeParse + * @type Boolean + * @default true + * @static + */ +Y.JSON.useNativeParse = useNative; + + +}, '3.3.0' ); +YUI.add('transition-native', function(Y) { + +/** +* Provides the transition method for Node. +* Transition has no API of its own, but adds the transition method to Node. +* +* @module transition +* @requires node-style +*/ + +var TRANSITION = '-webkit-transition', + TRANSITION_CAMEL = 'WebkitTransition', + TRANSITION_PROPERTY_CAMEL = 'WebkitTransitionProperty', + TRANSITION_PROPERTY = '-webkit-transition-property', + TRANSITION_DURATION = '-webkit-transition-duration', + TRANSITION_TIMING_FUNCTION = '-webkit-transition-timing-function', + TRANSITION_DELAY = '-webkit-transition-delay', + TRANSITION_END = 'webkitTransitionEnd', + ON_TRANSITION_END = 'onwebkittransitionend', + TRANSFORM_CAMEL = 'WebkitTransform', + + EMPTY_OBJ = {}, + +/** + * A class for constructing transition instances. + * Adds the "transition" method to Node. + * @class Transition + * @constructor + */ + +Transition = function() { + this.init.apply(this, arguments); +}; + +Transition.fx = {}; +Transition.toggles = {}; + +Transition._hasEnd = {}; + +Transition._toCamel = function(property) { + property = property.replace(/-([a-z])/gi, function(m0, m1) { + return m1.toUpperCase(); + }); + + return property; +}; + +Transition._toHyphen = function(property) { + property = property.replace(/([A-Z]?)([a-z]+)([A-Z]?)/g, function(m0, m1, m2, m3) { + var str = ''; + if (m1) { + str += '-' + m1.toLowerCase(); + } + str += m2; + + if (m3) { + str += '-' + m3.toLowerCase(); + } + + return str; + }); + + return property; +}; + + +Transition._reKeywords = /^(?:node|duration|iterations|easing|delay|on|onstart|onend)$/i; + +Transition.useNative = false; + +if (TRANSITION in Y.config.doc.documentElement.style) { + Transition.useNative = true; + Transition.supported = true; // TODO: remove +} + +Y.Node.DOM_EVENTS[TRANSITION_END] = 1; + +Transition.NAME = 'transition'; + +Transition.DEFAULT_EASING = 'ease'; +Transition.DEFAULT_DURATION = 0.5; +Transition.DEFAULT_DELAY = 0; + +Transition._nodeAttrs = {}; + +Transition.prototype = { + constructor: Transition, + init: function(node, config) { + var anim = this; + anim._node = node; + if (!anim._running && config) { + anim._config = config; + node._transition = anim; // cache for reuse + + anim._duration = ('duration' in config) ? + config.duration: anim.constructor.DEFAULT_DURATION; + + anim._delay = ('delay' in config) ? + config.delay: anim.constructor.DEFAULT_DELAY; + + anim._easing = config.easing || anim.constructor.DEFAULT_EASING; + anim._count = 0; // track number of animated properties + anim._running = false; + + } + + return anim; + }, + + addProperty: function(prop, config) { + var anim = this, + node = this._node, + uid = Y.stamp(node), + nodeInstance = Y.one(node), + attrs = Transition._nodeAttrs[uid], + computed, + compareVal, + dur, + attr, + val; + + if (!attrs) { + attrs = Transition._nodeAttrs[uid] = {}; + } + + attr = attrs[prop]; + + // might just be a value + if (config && config.value !== undefined) { + val = config.value; + } else if (config !== undefined) { + val = config; + config = EMPTY_OBJ; + } + + if (typeof val === 'function') { + val = val.call(nodeInstance, nodeInstance); + } + + if (attr && attr.transition) { + // take control if another transition owns this property + if (attr.transition !== anim) { + attr.transition._count--; // remapping attr to this transition + } + } + + anim._count++; // properties per transition + + // make 0 async and fire events + dur = ((typeof config.duration != 'undefined') ? config.duration : + anim._duration) || 0.0001; + + attrs[prop] = { + value: val, + duration: dur, + delay: (typeof config.delay != 'undefined') ? config.delay : + anim._delay, + + easing: config.easing || anim._easing, + + transition: anim + }; + + // native end event doesnt fire when setting to same value + // supplementing with timer + // val may be a string or number (height: 0, etc), but computedStyle is always string + computed = Y.DOM.getComputedStyle(node, prop); + compareVal = (typeof val === 'string') ? computed : parseFloat(computed); + + if (Transition.useNative && compareVal === val) { + setTimeout(function() { + anim._onNativeEnd.call(node, { + propertyName: prop, + elapsedTime: dur + }); + }, dur * 1000); + } + }, + + removeProperty: function(prop) { + var anim = this, + attrs = Transition._nodeAttrs[Y.stamp(anim._node)]; + + if (attrs && attrs[prop]) { + delete attrs[prop]; + anim._count--; + } + + }, + + initAttrs: function(config) { + var attr, + node = this._node; + + if (config.transform && !config[TRANSFORM_CAMEL]) { + config[TRANSFORM_CAMEL] = config.transform; + delete config.transform; // TODO: copy + } + + for (attr in config) { + if (config.hasOwnProperty(attr) && !Transition._reKeywords.test(attr)) { + this.addProperty(attr, config[attr]); + + // when size is auto or % webkit starts from zero instead of computed + // (https://bugs.webkit.org/show_bug.cgi?id=16020) + // TODO: selective set + if (node.style[attr] === '') { + Y.DOM.setStyle(node, attr, Y.DOM.getComputedStyle(node, attr)); + } + } + } + }, + + /** + * Starts or an animation. + * @method run + * @chainable + * @private + */ + run: function(callback) { + var anim = this, + node = anim._node, + config = anim._config, + data = { + type: 'transition:start', + config: config + }; + + + if (!anim._running) { + anim._running = true; + + //anim._node.fire('transition:start', data); + + if (config.on && config.on.start) { + config.on.start.call(Y.one(node), data); + } + + anim.initAttrs(anim._config); + + anim._callback = callback; + anim._start(); + } + + + return anim; + }, + + _start: function() { + this._runNative(); + }, + + _prepDur: function(dur) { + dur = parseFloat(dur); + + return dur + 's'; + }, + + _runNative: function(time) { + var anim = this, + node = anim._node, + uid = Y.stamp(node), + style = node.style, + computed = getComputedStyle(node), + attrs = Transition._nodeAttrs[uid], + cssText = '', + cssTransition = computed[TRANSITION_PROPERTY], + + transitionText = TRANSITION_PROPERTY + ': ', + duration = TRANSITION_DURATION + ': ', + easing = TRANSITION_TIMING_FUNCTION + ': ', + delay = TRANSITION_DELAY + ': ', + hyphy, + attr, + name; + + // preserve existing transitions + if (cssTransition !== 'all') { + transitionText += cssTransition + ','; + duration += computed[TRANSITION_DURATION] + ','; + easing += computed[TRANSITION_TIMING_FUNCTION] + ','; + delay += computed[TRANSITION_DELAY] + ','; + + } + + // run transitions mapped to this instance + for (name in attrs) { + hyphy = Transition._toHyphen(name); + attr = attrs[name]; + if (attrs.hasOwnProperty(name) && attr.transition === anim) { + if (name in node.style) { // only native styles allowed + duration += anim._prepDur(attr.duration) + ','; + delay += anim._prepDur(attr.delay) + ','; + easing += (attr.easing) + ','; + + transitionText += hyphy + ','; + cssText += hyphy + ': ' + attr.value + '; '; + } else { + this.removeProperty(name); + } + } + } + + transitionText = transitionText.replace(/,$/, ';'); + duration = duration.replace(/,$/, ';'); + easing = easing.replace(/,$/, ';'); + delay = delay.replace(/,$/, ';'); + + // only one native end event per node + if (!Transition._hasEnd[uid]) { + //anim._detach = Y.on(TRANSITION_END, anim._onNativeEnd, node); + //node[ON_TRANSITION_END] = anim._onNativeEnd; + node.addEventListener(TRANSITION_END, anim._onNativeEnd, false); + Transition._hasEnd[uid] = true; + + } + + //setTimeout(function() { // allow updates to apply (size fix, onstart, etc) + style.cssText += transitionText + duration + easing + delay + cssText; + //}, 1); + + }, + + _end: function(elapsed) { + var anim = this, + node = anim._node, + callback = anim._callback, + config = anim._config, + data = { + type: 'transition:end', + config: config, + elapsedTime: elapsed + }, + + nodeInstance = Y.one(node); + + anim._running = false; + anim._callback = null; + + if (node) { + if (config.on && config.on.end) { + setTimeout(function() { // IE: allow previous update to finish + config.on.end.call(nodeInstance, data); + + // nested to ensure proper fire order + if (callback) { + callback.call(nodeInstance, data); + } + + }, 1); + } else if (callback) { + setTimeout(function() { // IE: allow previous update to finish + callback.call(nodeInstance, data); + }, 1); + } + //node.fire('transition:end', data); + } + + }, + + _endNative: function(name) { + var node = this._node, + value = node.ownerDocument.defaultView.getComputedStyle(node, '')[TRANSITION_PROPERTY]; + + if (typeof value === 'string') { + value = value.replace(new RegExp('(?:^|,\\s)' + name + ',?'), ','); + value = value.replace(/^,|,$/, ''); + node.style[TRANSITION_CAMEL] = value; + } + }, + + _onNativeEnd: function(e) { + var node = this, + uid = Y.stamp(node), + event = e,//e._event, + name = Transition._toCamel(event.propertyName), + elapsed = event.elapsedTime, + attrs = Transition._nodeAttrs[uid], + attr = attrs[name], + anim = (attr) ? attr.transition : null, + data, + config; + + if (anim) { + anim.removeProperty(name); + anim._endNative(name); + config = anim._config[name]; + + data = { + type: 'propertyEnd', + propertyName: name, + elapsedTime: elapsed, + config: config + }; + + if (config && config.on && config.on.end) { + config.on.end.call(Y.one(node), data); + } + + //node.fire('transition:propertyEnd', data); + + if (anim._count <= 0) { // after propertyEnd fires + anim._end(elapsed); + } + } + }, + + destroy: function() { + var anim = this; + /* + if (anim._detach) { + anim._detach.detach(); + } + */ + //anim._node[ON_TRANSITION_END] = null; + node.removeEventListener(TRANSITION_END, anim._onNativeEnd, false); + anim._node = null; + } +}; + +Y.Transition = Transition; +Y.TransitionNative = Transition; // TODO: remove + +/** + * Animate one or more css properties to a given value. Requires the "transition" module. + *
          example usage:
          + *       Y.one('#demo').transition({
          + *           duration: 1, // in seconds, default is 0.5
          + *           easing: 'ease-out', // default is 'ease'
          + *           delay: '1', // delay start for 1 second, default is 0
          + *
          + *           height: '10px',
          + *           width: '10px',
          + *
          + *           opacity: { // per property
          + *               value: 0,
          + *               duration: 2,
          + *               delay: 2,
          + *               easing: 'ease-in'
          + *           }
          + *       });
          + *   
          + * @for Node + * @method transition + * @param {Object} config An object containing one or more style properties, a duration and an easing. + * @param {Function} callback A function to run after the transition has completed. + * @chainable +*/ +Y.Node.prototype.transition = function(name, config, callback) { + var + transitionAttrs = Transition._nodeAttrs[Y.stamp(this._node)], + anim = (transitionAttrs) ? transitionAttrs.transition || null : null, + fxConfig, + prop; + + if (typeof name === 'string') { // named effect, pull config from registry + if (typeof config === 'function') { + callback = config; + config = null; + } + + fxConfig = Transition.fx[name]; + + if (config && typeof config !== 'boolean') { + config = Y.clone(config); + + for (prop in fxConfig) { + if (fxConfig.hasOwnProperty(prop)) { + if (! (prop in config)) { + config[prop] = fxConfig[prop]; + } + } + } + } else { + config = fxConfig; + } + + } else { // name is a config, config is a callback or undefined + callback = config; + config = name; + } + + if (anim && !anim._running) { + anim.init(this, config); + } else { + anim = new Transition(this._node, config); + } + + anim.run(callback); + return this; +}; + +Y.Node.prototype.show = function(name, config, callback) { + this._show(); // show prior to transition + if (name && Y.Transition) { + if (typeof name !== 'string' && !name.push) { // named effect or array of effects supercedes default + if (typeof config === 'function') { + callback = config; + config = name; + } + name = this.SHOW_TRANSITION; + } + this.transition(name, config, callback); + } + return this; +}; + +var _wrapCallBack = function(anim, fn, callback) { + return function() { + if (fn) { + fn.call(anim); + } + if (callback) { + callback.apply(anim._node, arguments); + } + }; +}; + +Y.Node.prototype.hide = function(name, config, callback) { + if (name && Y.Transition) { + if (typeof config === 'function') { + callback = config; + config = null; + } + + callback = _wrapCallBack(this, this._hide, callback); // wrap with existing callback + if (typeof name !== 'string' && !name.push) { // named effect or array of effects supercedes default + if (typeof config === 'function') { + callback = config; + config = name; + } + name = this.HIDE_TRANSITION; + } + this.transition(name, config, callback); + } else { + this._hide(); + } + return this; +}; + +/** + * Animate one or more css properties to a given value. Requires the "transition" module. + *
          example usage:
          + *       Y.all('.demo').transition({
          + *           duration: 1, // in seconds, default is 0.5
          + *           easing: 'ease-out', // default is 'ease'
          + *           delay: '1', // delay start for 1 second, default is 0
          + *
          + *           height: '10px',
          + *           width: '10px',
          + *
          + *           opacity: { // per property
          + *               value: 0,
          + *               duration: 2,
          + *               delay: 2,
          + *               easing: 'ease-in'
          + *           }
          + *       });
          + *   
          + * @for NodeList + * @method transition + * @param {Object} config An object containing one or more style properties, a duration and an easing. + * @param {Function} callback A function to run after the transition has completed. The callback fires + * once per item in the NodeList. + * @chainable +*/ +Y.NodeList.prototype.transition = function(config, callback) { + var nodes = this._nodes, + i = 0, + node; + + while ((node = nodes[i++])) { + Y.one(node).transition(config, callback); + } + + return this; +}; + +Y.Node.prototype.toggleView = function(name, on) { + var callback; + this._toggles = this._toggles || []; + + if (typeof name == 'boolean') { // no transition, just toggle + on = name; + } + if (typeof on === 'undefined' && name in this._toggles) { + on = ! this._toggles[name]; + } + + on = (on) ? 1 : 0; + + if (on) { + this._show(); + } else { + callback = _wrapCallBack(anim, this._hide); + } + + this._toggles[name] = on; + this.transition(Y.Transition.toggles[name][on], callback); +}; + +Y.NodeList.prototype.toggleView = function(config, callback) { + var nodes = this._nodes, + i = 0, + node; + + while ((node = nodes[i++])) { + Y.one(node).toggleView(config, callback); + } + + return this; +}; + +Y.mix(Transition.fx, { + fadeOut: { + opacity: 0, + duration: 0.5, + easing: 'ease-out' + }, + + fadeIn: { + opacity: 1, + duration: 0.5, + easing: 'ease-in' + }, + + sizeOut: { + height: 0, + width: 0, + duration: 0.75, + easing: 'ease-out' + }, + + sizeIn: { + height: function(node) { + return node.get('scrollHeight') + 'px'; + }, + width: function(node) { + return node.get('scrollWidth') + 'px'; + }, + duration: 0.5, + easing: 'ease-in', + + on: { + start: function() { + var overflow = this.getStyle('overflow'); + if (overflow !== 'hidden') { // enable scrollHeight/Width + this.setStyle('overflow', 'hidden'); + this._transitionOverflow = overflow; + } + }, + + end: function() { + if (this._transitionOverflow) { // revert overridden value + this.setStyle('overflow', this._transitionOverflow); + } + } + } + } +}); + +Y.mix(Transition.toggles, { + size: ['sizeIn', 'sizeOut'], + fade: ['fadeOut', 'fadeIn'] +}); + + +}, '3.3.0' ,{requires:['node-base']}); +YUI.add('transition-timer', function(Y) { + +/* +* The Transition Utility provides an API for creating advanced transitions. +* @module transition +*/ + +/* +* Provides the base Transition class, for animating numeric properties. +* +* @module transition +* @submodule transition-timer +*/ + + +var Transition = Y.Transition; + +Y.mix(Transition.prototype, { + _start: function() { + if (Transition.useNative) { + this._runNative(); + } else { + this._runTimer(); + } + }, + + _runTimer: function() { + var anim = this; + anim._initAttrs(); + + Transition._running[Y.stamp(anim)] = anim; + anim._startTime = new Date(); + Transition._startTimer(); + }, + + _endTimer: function() { + var anim = this; + delete Transition._running[Y.stamp(anim)]; + anim._startTime = null; + }, + + _runFrame: function() { + var t = new Date() - this._startTime; + this._runAttrs(t); + }, + + _runAttrs: function(time) { + var anim = this, + node = anim._node, + config = anim._config, + uid = Y.stamp(node), + attrs = Transition._nodeAttrs[uid], + customAttr = Transition.behaviors, + done = false, + allDone = false, + data, + name, + attribute, + setter, + elapsed, + delay, + d, + t, + i; + + for (name in attrs) { + attribute = attrs[name]; + if ((attribute && attribute.transition === anim)) { + d = attribute.duration; + delay = attribute.delay; + elapsed = (time - delay) / 1000; + t = time; + data = { + type: 'propertyEnd', + propertyName: name, + config: config, + elapsedTime: elapsed + }; + + setter = (i in customAttr && 'set' in customAttr[i]) ? + customAttr[i].set : Transition.DEFAULT_SETTER; + + done = (t >= d); + + if (t > d) { + t = d; + } + + if (!delay || time >= delay) { + setter(anim, name, attribute.from, attribute.to, t - delay, d - delay, + attribute.easing, attribute.unit); + + if (done) { + delete attrs[name]; + anim._count--; + + if (config[name] && config[name].on && config[name].on.end) { + config[name].on.end.call(Y.one(node), data); + } + + //node.fire('transition:propertyEnd', data); + + if (!allDone && anim._count <= 0) { + allDone = true; + anim._end(elapsed); + anim._endTimer(); + } + } + } + + } + } + }, + + _initAttrs: function() { + var anim = this, + customAttr = Transition.behaviors, + uid = Y.stamp(anim._node), + attrs = Transition._nodeAttrs[uid], + attribute, + duration, + delay, + easing, + val, + name, + mTo, + mFrom, + unit, begin, end; + + for (name in attrs) { + attribute = attrs[name]; + if (attrs.hasOwnProperty(name) && (attribute && attribute.transition === anim)) { + duration = attribute.duration * 1000; + delay = attribute.delay * 1000; + easing = attribute.easing; + val = attribute.value; + + // only allow supported properties + if (name in anim._node.style || name in Y.DOM.CUSTOM_STYLES) { + begin = (name in customAttr && 'get' in customAttr[name]) ? + customAttr[name].get(anim, name) : Transition.DEFAULT_GETTER(anim, name); + + mFrom = Transition.RE_UNITS.exec(begin); + mTo = Transition.RE_UNITS.exec(val); + + begin = mFrom ? mFrom[1] : begin; + end = mTo ? mTo[1] : val; + unit = mTo ? mTo[2] : mFrom ? mFrom[2] : ''; // one might be zero TODO: mixed units + + if (!unit && Transition.RE_DEFAULT_UNIT.test(name)) { + unit = Transition.DEFAULT_UNIT; + } + + if (typeof easing === 'string') { + if (easing.indexOf('cubic-bezier') > -1) { + easing = easing.substring(13, easing.length - 1).split(','); + } else if (Transition.easings[easing]) { + easing = Transition.easings[easing]; + } + } + + attribute.from = Number(begin); + attribute.to = Number(end); + attribute.unit = unit; + attribute.easing = easing; + attribute.duration = duration + delay; + attribute.delay = delay; + } else { + delete attrs[name]; + anim._count--; + } + } + } + }, + + destroy: function() { + this.detachAll(); + this._node = null; + } +}, true); + +Y.mix(Y.Transition, { + _runtimeAttrs: {}, + /* + * Regex of properties that should use the default unit. + * + * @property RE_DEFAULT_UNIT + * @static + */ + RE_DEFAULT_UNIT: /^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i, + + /* + * The default unit to use with properties that pass the RE_DEFAULT_UNIT test. + * + * @property DEFAULT_UNIT + * @static + */ + DEFAULT_UNIT: 'px', + + /* + * Time in milliseconds passed to setInterval for frame processing + * + * @property intervalTime + * @default 20 + * @static + */ + intervalTime: 20, + + /* + * Bucket for custom getters and setters + * + * @property behaviors + * @static + */ + behaviors: { + left: { + get: function(anim, attr) { + return Y.DOM._getAttrOffset(anim._node, attr); + } + } + }, + + /* + * The default setter to use when setting object properties. + * + * @property DEFAULT_SETTER + * @static + */ + DEFAULT_SETTER: function(anim, att, from, to, elapsed, duration, fn, unit) { + from = Number(from); + to = Number(to); + + var node = anim._node, + val = Transition.cubicBezier(fn, elapsed / duration); + + val = from + val[0] * (to - from); + + if (node) { + if (att in node.style || att in Y.DOM.CUSTOM_STYLES) { + unit = unit || ''; + Y.DOM.setStyle(node, att, val + unit); + } + } else { + anim._end(); + } + }, + + /* + * The default getter to use when getting object properties. + * + * @property DEFAULT_GETTER + * @static + */ + DEFAULT_GETTER: function(anim, att) { + var node = anim._node, + val = ''; + + if (att in node.style || att in Y.DOM.CUSTOM_STYLES) { + val = Y.DOM.getComputedStyle(node, att); + } + + return val; + }, + + _startTimer: function() { + if (!Transition._timer) { + Transition._timer = setInterval(Transition._runFrame, Transition.intervalTime); + } + }, + + _stopTimer: function() { + clearInterval(Transition._timer); + Transition._timer = null; + }, + + /* + * Called per Interval to handle each animation frame. + * @method _runFrame + * @private + * @static + */ + _runFrame: function() { + var done = true, + anim; + for (anim in Transition._running) { + if (Transition._running[anim]._runFrame) { + done = false; + Transition._running[anim]._runFrame(); + } + } + + if (done) { + Transition._stopTimer(); + } + }, + + cubicBezier: function(p, t) { + var x0 = 0, + y0 = 0, + x1 = p[0], + y1 = p[1], + x2 = p[2], + y2 = p[3], + x3 = 1, + y3 = 0, + + A = x3 - 3 * x2 + 3 * x1 - x0, + B = 3 * x2 - 6 * x1 + 3 * x0, + C = 3 * x1 - 3 * x0, + D = x0, + E = y3 - 3 * y2 + 3 * y1 - y0, + F = 3 * y2 - 6 * y1 + 3 * y0, + G = 3 * y1 - 3 * y0, + H = y0, + + x = (((A*t) + B)*t + C)*t + D, + y = (((E*t) + F)*t + G)*t + H; + + return [x, y]; + }, + + easings: { + ease: [0.25, 0, 1, 0.25], + linear: [0, 0, 1, 1], + 'ease-in': [0.42, 0, 1, 1], + 'ease-out': [0, 0, 0.58, 1], + 'ease-in-out': [0.42, 0, 0.58, 1] + }, + + _running: {}, + _timer: null, + + RE_UNITS: /^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/ +}, true); + +Transition.behaviors.top = Transition.behaviors.bottom = Transition.behaviors.right = Transition.behaviors.left; + +Y.Transition = Transition; + + +}, '3.3.0' ,{requires:['transition-native', 'node-style']}); + + +YUI.add('transition', function(Y){}, '3.3.0' ,{use:['transition-native', 'transition-timer']}); + +YUI.add('selector-css3', function(Y) { + +/** + * The selector css3 module provides support for css3 selectors. + * @module dom + * @submodule selector-css3 + * @for Selector + */ + +/* + an+b = get every _a_th node starting at the _b_th + 0n+b = no repeat ("0" and "n" may both be omitted (together) , e.g. "0n+1" or "1", not "0+1"), return only the _b_th element + 1n+b = get every element starting from b ("1" may may be omitted, e.g. "1n+0" or "n+0" or "n") + an+0 = get every _a_th element, "0" may be omitted +*/ + +Y.Selector._reNth = /^(?:([\-]?\d*)(n){1}|(odd|even)$)*([\-+]?\d*)$/; + +Y.Selector._getNth = function(node, expr, tag, reverse) { + Y.Selector._reNth.test(expr); + var a = parseInt(RegExp.$1, 10), // include every _a_ elements (zero means no repeat, just first _a_) + n = RegExp.$2, // "n" + oddeven = RegExp.$3, // "odd" or "even" + b = parseInt(RegExp.$4, 10) || 0, // start scan from element _b_ + result = [], + siblings = Y.Selector._children(node.parentNode, tag), + op; + + if (oddeven) { + a = 2; // always every other + op = '+'; + n = 'n'; + b = (oddeven === 'odd') ? 1 : 0; + } else if ( isNaN(a) ) { + a = (n) ? 1 : 0; // start from the first or no repeat + } + + if (a === 0) { // just the first + if (reverse) { + b = siblings.length - b + 1; + } + + if (siblings[b - 1] === node) { + return true; + } else { + return false; + } + + } else if (a < 0) { + reverse = !!reverse; + a = Math.abs(a); + } + + if (!reverse) { + for (var i = b - 1, len = siblings.length; i < len; i += a) { + if ( i >= 0 && siblings[i] === node ) { + return true; + } + } + } else { + for (var i = siblings.length - b, len = siblings.length; i >= 0; i -= a) { + if ( i < len && siblings[i] === node ) { + return true; + } + } + } + return false; +}; + +Y.mix(Y.Selector.pseudos, { + 'root': function(node) { + return node === node.ownerDocument.documentElement; + }, + + 'nth-child': function(node, expr) { + return Y.Selector._getNth(node, expr); + }, + + 'nth-last-child': function(node, expr) { + return Y.Selector._getNth(node, expr, null, true); + }, + + 'nth-of-type': function(node, expr) { + return Y.Selector._getNth(node, expr, node.tagName); + }, + + 'nth-last-of-type': function(node, expr) { + return Y.Selector._getNth(node, expr, node.tagName, true); + }, + + 'last-child': function(node) { + var children = Y.Selector._children(node.parentNode); + return children[children.length - 1] === node; + }, + + 'first-of-type': function(node) { + return Y.Selector._children(node.parentNode, node.tagName)[0] === node; + }, + + 'last-of-type': function(node) { + var children = Y.Selector._children(node.parentNode, node.tagName); + return children[children.length - 1] === node; + }, + + 'only-child': function(node) { + var children = Y.Selector._children(node.parentNode); + return children.length === 1 && children[0] === node; + }, + + 'only-of-type': function(node) { + var children = Y.Selector._children(node.parentNode, node.tagName); + return children.length === 1 && children[0] === node; + }, + + 'empty': function(node) { + return node.childNodes.length === 0; + }, + + 'not': function(node, expr) { + return !Y.Selector.test(node, expr); + }, + + 'contains': function(node, expr) { + var text = node.innerText || node.textContent || ''; + return text.indexOf(expr) > -1; + }, + + 'checked': function(node) { + return (node.checked === true || node.selected === true); + }, + + enabled: function(node) { + return (node.disabled !== undefined && !node.disabled); + }, + + disabled: function(node) { + return (node.disabled); + } +}); + +Y.mix(Y.Selector.operators, { + '^=': '^{val}', // Match starts with value + '$=': '{val}$', // Match ends with value + '*=': '{val}' // Match contains value as substring +}); + +Y.Selector.combinators['~'] = { + axis: 'previousSibling' +}; + + +}, '3.3.0' ,{requires:['dom-base', 'selector-native', 'selector-css2']}); +YUI.add('dom-style-ie', function(Y) { + +(function(Y) { +var HAS_LAYOUT = 'hasLayout', + PX = 'px', + FILTER = 'filter', + FILTERS = 'filters', + OPACITY = 'opacity', + AUTO = 'auto', + + BORDER_WIDTH = 'borderWidth', + BORDER_TOP_WIDTH = 'borderTopWidth', + BORDER_RIGHT_WIDTH = 'borderRightWidth', + BORDER_BOTTOM_WIDTH = 'borderBottomWidth', + BORDER_LEFT_WIDTH = 'borderLeftWidth', + WIDTH = 'width', + HEIGHT = 'height', + TRANSPARENT = 'transparent', + VISIBLE = 'visible', + GET_COMPUTED_STYLE = 'getComputedStyle', + UNDEFINED = undefined, + documentElement = Y.config.doc.documentElement, + + testFeature = Y.Features.test, + addFeature = Y.Features.add, + + // TODO: unit-less lineHeight (e.g. 1.22) + re_unit = /^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i, + + isIE8 = (Y.UA.ie >= 8), + + _getStyleObj = function(node) { + return node.currentStyle || node.style; + }, + + ComputedStyle = { + CUSTOM_STYLES: {}, + + get: function(el, property) { + var value = '', + current; + + if (el) { + current = _getStyleObj(el)[property]; + + if (property === OPACITY && Y.DOM.CUSTOM_STYLES[OPACITY]) { + value = Y.DOM.CUSTOM_STYLES[OPACITY].get(el); + } else if (!current || (current.indexOf && current.indexOf(PX) > -1)) { // no need to convert + value = current; + } else if (Y.DOM.IE.COMPUTED[property]) { // use compute function + value = Y.DOM.IE.COMPUTED[property](el, property); + } else if (re_unit.test(current)) { // convert to pixel + value = ComputedStyle.getPixel(el, property) + PX; + } else { + value = current; + } + } + + return value; + }, + + sizeOffsets: { + width: ['Left', 'Right'], + height: ['Top', 'Bottom'], + top: ['Top'], + bottom: ['Bottom'] + }, + + getOffset: function(el, prop) { + var current = _getStyleObj(el)[prop], // value of "width", "top", etc. + capped = prop.charAt(0).toUpperCase() + prop.substr(1), // "Width", "Top", etc. + offset = 'offset' + capped, // "offsetWidth", "offsetTop", etc. + pixel = 'pixel' + capped, // "pixelWidth", "pixelTop", etc. + sizeOffsets = ComputedStyle.sizeOffsets[prop], + mode = el.ownerDocument.compatMode, + value = ''; + + // IE pixelWidth incorrect for percent + // manually compute by subtracting padding and border from offset size + // NOTE: clientWidth/Height (size minus border) is 0 when current === AUTO so offsetHeight is used + // reverting to auto from auto causes position stacking issues (old impl) + if (current === AUTO || current.indexOf('%') > -1) { + value = el['offset' + capped]; + + if (mode !== 'BackCompat') { + if (sizeOffsets[0]) { + value -= ComputedStyle.getPixel(el, 'padding' + sizeOffsets[0]); + value -= ComputedStyle.getBorderWidth(el, 'border' + sizeOffsets[0] + 'Width', 1); + } + + if (sizeOffsets[1]) { + value -= ComputedStyle.getPixel(el, 'padding' + sizeOffsets[1]); + value -= ComputedStyle.getBorderWidth(el, 'border' + sizeOffsets[1] + 'Width', 1); + } + } + + } else { // use style.pixelWidth, etc. to convert to pixels + // need to map style.width to currentStyle (no currentStyle.pixelWidth) + if (!el.style[pixel] && !el.style[prop]) { + el.style[prop] = current; + } + value = el.style[pixel]; + + } + return value + PX; + }, + + borderMap: { + thin: (isIE8) ? '1px' : '2px', + medium: (isIE8) ? '3px': '4px', + thick: (isIE8) ? '5px' : '6px' + }, + + getBorderWidth: function(el, property, omitUnit) { + var unit = omitUnit ? '' : PX, + current = el.currentStyle[property]; + + if (current.indexOf(PX) < 0) { // look up keywords if a border exists + if (ComputedStyle.borderMap[current] && + el.currentStyle.borderStyle !== 'none') { + current = ComputedStyle.borderMap[current]; + } else { // otherwise no border (default is "medium") + current = 0; + } + } + return (omitUnit) ? parseFloat(current) : current; + }, + + getPixel: function(node, att) { + // use pixelRight to convert to px + var val = null, + style = _getStyleObj(node), + styleRight = style.right, + current = style[att]; + + node.style.right = current; + val = node.style.pixelRight; + node.style.right = styleRight; // revert + + return val; + }, + + getMargin: function(node, att) { + var val, + style = _getStyleObj(node); + + if (style[att] == AUTO) { + val = 0; + } else { + val = ComputedStyle.getPixel(node, att); + } + return val + PX; + }, + + getVisibility: function(node, att) { + var current; + while ( (current = node.currentStyle) && current[att] == 'inherit') { // NOTE: assignment in test + node = node.parentNode; + } + return (current) ? current[att] : VISIBLE; + }, + + getColor: function(node, att) { + var current = _getStyleObj(node)[att]; + + if (!current || current === TRANSPARENT) { + Y.DOM.elementByAxis(node, 'parentNode', null, function(parent) { + current = _getStyleObj(parent)[att]; + if (current && current !== TRANSPARENT) { + node = parent; + return true; + } + }); + } + + return Y.Color.toRGB(current); + }, + + getBorderColor: function(node, att) { + var current = _getStyleObj(node), + val = current[att] || current.color; + return Y.Color.toRGB(Y.Color.toHex(val)); + } + }, + + //fontSize: getPixelFont, + IEComputed = {}; + +addFeature('style', 'computedStyle', { + test: function() { + return 'getComputedStyle' in Y.config.win; + } +}); + +addFeature('style', 'opacity', { + test: function() { + return 'opacity' in documentElement.style; + } +}); + +addFeature('style', 'filter', { + test: function() { + return 'filters' in documentElement; + } +}); + +// use alpha filter for IE opacity +if (!testFeature('style', 'opacity') && testFeature('style', 'filter')) { + Y.DOM.CUSTOM_STYLES[OPACITY] = { + get: function(node) { + var val = 100; + try { // will error if no DXImageTransform + val = node[FILTERS]['DXImageTransform.Microsoft.Alpha'][OPACITY]; + + } catch(e) { + try { // make sure its in the document + val = node[FILTERS]('alpha')[OPACITY]; + } catch(err) { + } + } + return val / 100; + }, + + set: function(node, val, style) { + var current, + styleObj = _getStyleObj(node), + currentFilter = styleObj[FILTER]; + + style = style || node.style; + if (val === '') { // normalize inline style behavior + current = (OPACITY in styleObj) ? styleObj[OPACITY] : 1; // revert to original opacity + val = current; + } + + if (typeof currentFilter == 'string') { // in case not appended + style[FILTER] = currentFilter.replace(/alpha([^)]*\))/gi, '') + + ((val < 1) ? 'alpha(' + OPACITY + '=' + val * 100 + ')' : ''); + + if (!style[FILTER]) { + style.removeAttribute(FILTER); + } + + if (!styleObj[HAS_LAYOUT]) { + style.zoom = 1; // needs layout + } + } + } + }; +} + +try { + Y.config.doc.createElement('div').style.height = '-1px'; +} catch(e) { // IE throws error on invalid style set; trap common cases + Y.DOM.CUSTOM_STYLES.height = { + set: function(node, val, style) { + var floatVal = parseFloat(val); + if (floatVal >= 0 || val === 'auto' || val === '') { + style.height = val; + } else { + } + } + }; + + Y.DOM.CUSTOM_STYLES.width = { + set: function(node, val, style) { + var floatVal = parseFloat(val); + if (floatVal >= 0 || val === 'auto' || val === '') { + style.width = val; + } else { + } + } + }; +} + +if (!testFeature('style', 'computedStyle')) { + // TODO: top, right, bottom, left + IEComputed[WIDTH] = IEComputed[HEIGHT] = ComputedStyle.getOffset; + + IEComputed.color = IEComputed.backgroundColor = ComputedStyle.getColor; + + IEComputed[BORDER_WIDTH] = IEComputed[BORDER_TOP_WIDTH] = IEComputed[BORDER_RIGHT_WIDTH] = + IEComputed[BORDER_BOTTOM_WIDTH] = IEComputed[BORDER_LEFT_WIDTH] = + ComputedStyle.getBorderWidth; + + IEComputed.marginTop = IEComputed.marginRight = IEComputed.marginBottom = + IEComputed.marginLeft = ComputedStyle.getMargin; + + IEComputed.visibility = ComputedStyle.getVisibility; + IEComputed.borderColor = IEComputed.borderTopColor = + IEComputed.borderRightColor = IEComputed.borderBottomColor = + IEComputed.borderLeftColor = ComputedStyle.getBorderColor; + + Y.DOM[GET_COMPUTED_STYLE] = ComputedStyle.get; + + Y.namespace('DOM.IE'); + Y.DOM.IE.COMPUTED = IEComputed; + Y.DOM.IE.ComputedStyle = ComputedStyle; +} + +})(Y); + + +}, '3.3.0' ,{requires:['dom-style']}); +YUI.add('simpleyui', function(Y) { + +// empty + + + +}, '3.3.0' ,{use:['yui','oop','dom','event-custom-base','event-base','pluginhost','node','event-delegate','io-base','json-parse','transition','selector-css3','dom-style-ie','querystring-stringify-simple']}); +var Y = YUI().use('*'); diff --git a/jssource/src_files/include/javascript/yui3/build/slider/clickable-rail-min.js b/jssource/src_files/include/javascript/yui3/build/slider/clickable-rail-min.js new file mode 100644 index 00000000..430d0669 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/slider/clickable-rail-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("clickable-rail",function(b){function a(){this._initClickableRail();}b.ClickableRail=b.mix(a,{prototype:{_initClickableRail:function(){this._evtGuid=this._evtGuid||(b.guid()+"|");this.publish("railMouseDown",{defaultFn:this._defRailMouseDownFn});this.after("render",this._bindClickableRail);this.on("destroy",this._unbindClickableRail);},_bindClickableRail:function(){this._dd.addHandle(this.rail);this.rail.on(this._evtGuid+b.DD.Drag.START_EVENT,b.bind(this._onRailMouseDown,this));},_unbindClickableRail:function(){if(this.get("rendered")){var c=this.get("contentBox"),d=c.one("."+this.getClassName("rail"));d.detach(this.evtGuid+"*");}},_onRailMouseDown:function(c){if(this.get("clickableRail")&&!this.get("disabled")){this.fire("railMouseDown",{ev:c});}},_defRailMouseDownFn:function(k){k=k.ev;var c=this._resolveThumb(k),g=this._key.xyIndex,h=parseFloat(this.get("length"),10),f,d,j;if(c){f=c.get("dragNode");d=parseFloat(f.getStyle(this._key.dim),10);j=this._getThumbDestination(k,f);j=j[g]-this.rail.getXY()[g];j=Math.min(Math.max(j,0),(h-d));this._uiMoveThumb(j);k.target=this.thumb.one("img")||this.thumb;c._handleMouseDownEvent(k);}},_resolveThumb:function(c){return this._dd;},_getThumbDestination:function(g,f){var d=f.get("offsetWidth"),c=f.get("offsetHeight");return[(g.pageX-Math.round((d/2))),(g.pageY-Math.round((c/2)))];}},ATTRS:{clickableRail:{value:true,validator:b.Lang.isBoolean}}},true);},"3.3.0",{requires:["slider-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/slider/clickable-rail.js b/jssource/src_files/include/javascript/yui3/build/slider/clickable-rail.js new file mode 100644 index 00000000..3c9b6516 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/slider/clickable-rail.js @@ -0,0 +1,218 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('clickable-rail', function(Y) { + +/** + * Adds support for mouse interaction with the Slider rail triggering thumb + * movement. + * + * @module slider + * @submodule clickable-rail + */ + +/** + * Slider extension that allows clicking on the Slider's rail element, + * triggering the thumb to align with the location of the click. + * + * @class ClickableRail + */ +function ClickableRail() { + this._initClickableRail(); +} + +Y.ClickableRail = Y.mix(ClickableRail, { + + // Prototype methods added to host class + prototype: { + + /** + * Initializes the internal state and sets up events. + * + * @method _initClickableRail + * @protected + */ + _initClickableRail: function () { + this._evtGuid = this._evtGuid || (Y.guid() + '|'); + + /** + * Broadcasts when the rail has received a mousedown event and + * triggers the thumb positioning. Use + * e.preventDefault() or + * set("clickableRail", false) to prevent + * the thumb positioning. + * + * @event railMouseDown + * @preventable _defRailMouseDownFn + */ + this.publish('railMouseDown', { + defaultFn: this._defRailMouseDownFn + }); + + this.after('render', this._bindClickableRail); + this.on('destroy', this._unbindClickableRail); + }, + + /** + * Attaches DOM event subscribers to support rail interaction. + * + * @method _bindClickableRail + * @protected + */ + _bindClickableRail: function () { + this._dd.addHandle(this.rail); + + this.rail.on(this._evtGuid + Y.DD.Drag.START_EVENT, + Y.bind(this._onRailMouseDown, this)); + }, + + /** + * Detaches DOM event subscribers for cleanup/destruction cycle. + * + * @method _unbindClickableRail + * @protected + */ + _unbindClickableRail: function () { + if (this.get('rendered')) { + var contentBox = this.get('contentBox'), + rail = contentBox.one('.' + this.getClassName('rail')); + + rail.detach(this.evtGuid + '*'); + } + }, + + /** + * Dispatches the railMouseDown event. + * + * @method _onRailMouseDown + * @param e {DOMEvent} the mousedown event object + * @protected + */ + _onRailMouseDown: function (e) { + if (this.get('clickableRail') && !this.get('disabled')) { + this.fire('railMouseDown', { ev: e }); + } + }, + + /** + * Default behavior for the railMouseDown event. Centers the thumb at + * the click location and passes control to the DDM to behave as though + * the thumb itself were clicked in preparation for a drag operation. + * + * @method _defRailMouseDownFn + * @param e {Event} the EventFacade for the railMouseDown custom event + * @protected + */ + _defRailMouseDownFn: function (e) { + e = e.ev; + + // Logic that determines which thumb should be used is abstracted + // to someday support multi-thumb sliders + var dd = this._resolveThumb(e), + i = this._key.xyIndex, + length = parseFloat(this.get('length'), 10), + thumb, + thumbSize, + xy; + + if (dd) { + thumb = dd.get('dragNode'); + thumbSize = parseFloat(thumb.getStyle(this._key.dim), 10); + + // Step 1. Allow for aligning to thumb center or edge, etc + xy = this._getThumbDestination(e, thumb); + + // Step 2. Remove page offsets to give just top/left style val + xy = xy[ i ] - this.rail.getXY()[i]; + + // Step 3. Constrain within the rail in case of attempt to + // center the thumb when clicking on the end of the rail + xy = Math.min( + Math.max(xy, 0), + (length - thumbSize)); + + this._uiMoveThumb(xy); + + // Set e.target for DD's IE9 patch which calls + // e.target._node.setCapture() to allow imgs to be dragged. + // Without this, setCapture is called from the rail and rail + // clicks on other Sliders may have their thumb movements + // overridden by a different Slider (the thumb on the wrong + // Slider moves). + e.target = this.thumb.one('img') || this.thumb; + + // Delegate to DD's natural behavior + dd._handleMouseDownEvent(e); + + // TODO: this won't trigger a slideEnd if the rail is clicked + // check if dd._move(e); dd._dragThreshMet = true; dd.start(); + // will do the trick. Is that even a good idea? + } + }, + + /** + * Resolves which thumb to actuate if any. Override this if you want to + * support multiple thumbs. By default, returns the Drag instance for + * the thumb stored by the Slider. + * + * @method _resolveThumb + * @param e {DOMEvent} the mousedown event object + * @return {Y.DD.Drag} the Drag instance that should be moved + * @protected + */ + _resolveThumb: function (e) { + /* Temporary workaround + var primaryOnly = this._dd.get('primaryButtonOnly'), + validClick = !primaryOnly || e.button <= 1; + + return (validClick) ? this._dd : null; + */ + return this._dd; + }, + + /** + * Calculates the top left position the thumb should be moved to to + * align the click XY with the center of the specified node. + * + * @method _getThumbDestination + * @param e {DOMEvent} The mousedown event object + * @param node {Node} The node to position + * @return {Array} the [top, left] pixel position of the destination + * @protected + */ + _getThumbDestination: function (e, node) { + var offsetWidth = node.get('offsetWidth'), + offsetHeight = node.get('offsetHeight'); + + // center + return [ + (e.pageX - Math.round((offsetWidth / 2))), + (e.pageY - Math.round((offsetHeight / 2))) + ]; + } + + }, + + // Static properties added onto host class + ATTRS: { + /** + * Enable or disable clickable rail support. + * + * @attribute clickableRail + * @type {Boolean} + * @default true + */ + clickableRail: { + value: true, + validator: Y.Lang.isBoolean + } + } + +}, true); + + +}, '3.3.0' ,{requires:['slider-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/slider/range-slider-min.js b/jssource/src_files/include/javascript/yui3/build/slider/range-slider-min.js new file mode 100644 index 00000000..5b499d1e --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/slider/range-slider-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("range-slider",function(a){a.Slider=a.Base.build("slider",a.SliderBase,[a.SliderValueRange,a.ClickableRail]);},"3.3.0",{requires:["slider-base","clickable-rail","slider-value-range"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/slider/range-slider.js b/jssource/src_files/include/javascript/yui3/build/slider/range-slider.js new file mode 100644 index 00000000..dafdd2d9 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/slider/range-slider.js @@ -0,0 +1,34 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('range-slider', function(Y) { + +/** + * Create a sliding value range input visualized as a draggable thumb on a + * background rail element. + * + * @module slider + * @submodule range-slider + */ + +/** + * Create a slider to represent an integer value between a given minimum and + * maximum. Sliders may be aligned vertically or horizontally, based on the + * axis configuration. + * + * @class Slider + * @constructor + * @extends SliderBase + * @uses SliderValueRange + * @uses ClickableRail + * @param config {Object} Configuration object + */ +Y.Slider = Y.Base.build( 'slider', Y.SliderBase, + [ Y.SliderValueRange, Y.ClickableRail ] ); + + +}, '3.3.0' ,{requires:['slider-base', 'clickable-rail', 'slider-value-range']}); diff --git a/jssource/src_files/include/javascript/yui3/build/slider/slider-base-min.js b/jssource/src_files/include/javascript/yui3/build/slider/slider-base-min.js new file mode 100644 index 00000000..98f1f3dd --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/slider/slider-base-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("slider-base",function(c){var b=c.Attribute.INVALID_VALUE;function a(){a.superclass.constructor.apply(this,arguments);}c.SliderBase=c.extend(a,c.Widget,{initializer:function(){this.axis=this.get("axis");this._key={dim:(this.axis==="y")?"height":"width",minEdge:(this.axis==="y")?"top":"left",maxEdge:(this.axis==="y")?"bottom":"right",xyIndex:(this.axis==="y")?1:0};this.publish("thumbMove",{defaultFn:this._defThumbMoveFn,queuable:true});},renderUI:function(){var d=this.get("contentBox");this.rail=this.renderRail();this._uiSetRailLength(this.get("length"));this.thumb=this.renderThumb();this.rail.appendChild(this.thumb);d.appendChild(this.rail);d.addClass(this.getClassName(this.axis));},renderRail:function(){var e=this.getClassName("rail","cap",this._key.minEdge),d=this.getClassName("rail","cap",this._key.maxEdge);return c.Node.create(c.substitute(this.RAIL_TEMPLATE,{railClass:this.getClassName("rail"),railMinCapClass:e,railMaxCapClass:d}));},_uiSetRailLength:function(d){this.rail.setStyle(this._key.dim,d);},renderThumb:function(){this._initThumbUrl();var d=this.get("thumbUrl");return c.Node.create(c.substitute(this.THUMB_TEMPLATE,{thumbClass:this.getClassName("thumb"),thumbShadowClass:this.getClassName("thumb","shadow"),thumbImageClass:this.getClassName("thumb","image"),thumbShadowUrl:d,thumbImageUrl:d}));},bindUI:function(){this._bindThumbDD();this._bindValueLogic();this.after("disabledChange",this._afterDisabledChange);this.after("lengthChange",this._afterLengthChange);},_bindThumbDD:function(){var d={constrain:this.rail};d["stick"+this.axis.toUpperCase()]=true;this._dd=new c.DD.Drag({node:this.thumb,bubble:false,on:{"drag:start":c.bind(this._onDragStart,this)},after:{"drag:drag":c.bind(this._afterDrag,this),"drag:end":c.bind(this._afterDragEnd,this)}});this._dd.plug(c.Plugin.DDConstrained,d);},_bindValueLogic:function(){},_uiMoveThumb:function(d){if(this.thumb){this.thumb.setStyle(this._key.minEdge,d+"px");this.fire("thumbMove",{offset:d});}},_onDragStart:function(d){this.fire("slideStart",{ddEvent:d});},_afterDrag:function(f){var g=f.info.xy[this._key.xyIndex],d=f.target.con._regionCache[this._key.minEdge];this.fire("thumbMove",{offset:(g-d),ddEvent:f});},_afterDragEnd:function(d){this.fire("slideEnd",{ddEvent:d});},_afterDisabledChange:function(d){this._dd.set("lock",d.newVal);},_afterLengthChange:function(d){if(this.get("rendered")){this._uiSetRailLength(d.newVal);this.syncUI();}},syncUI:function(){this._dd.con.resetCache();this._syncThumbPosition();},_syncThumbPosition:function(){},_setAxis:function(d){d=(d+"").toLowerCase();return(d==="x"||d==="y")?d:b;},_setLength:function(e){e=(e+"").toLowerCase();var f=parseFloat(e,10),d=e.replace(/[\d\.\-]/g,"")||this.DEF_UNIT;return f>0?(f+d):b;},_initThumbUrl:function(){if(!this.get("thumbUrl")){var e=this.getSkinName()||"sam",d=c.config.base;if(d.indexOf("http://yui.yahooapis.com/combo")===0){d="http://yui.yahooapis.com/"+c.version+"/build/";}this.set("thumbUrl",d+"slider/assets/skins/"+e+"/thumb-"+this.axis+".png");}},BOUNDING_TEMPLATE:"",CONTENT_TEMPLATE:"",RAIL_TEMPLATE:''+''+''+"",THUMB_TEMPLATE:''+''+''+""},{NAME:"sliderBase",ATTRS:{axis:{value:"x",writeOnce:true,setter:"_setAxis",lazyAdd:false},length:{value:"150px",setter:"_setLength"},thumbUrl:{value:null,validator:c.Lang.isString}}});},"3.3.0",{requires:["widget","substitute","dd-constrain"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/slider/slider-base.js b/jssource/src_files/include/javascript/yui3/build/slider/slider-base.js new file mode 100644 index 00000000..0c7a2e5f --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/slider/slider-base.js @@ -0,0 +1,572 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('slider-base', function(Y) { + +/** + * Create a sliding value range input visualized as a draggable thumb on a + * background element. + * + * @module slider + * @submodule slider-base + */ + +var INVALID_VALUE = Y.Attribute.INVALID_VALUE; + +/** + * Create a slider to represent an input control capable of representing a + * series of intermediate states based on the position of the slider's thumb. + * These states are typically aligned to a value algorithm whereby the thumb + * position corresponds to a given value. Sliders may be oriented vertically or + * horizontally, based on the axis configuration. + * + * @class SliderBase + * @extends Widget + * @param config {Object} Configuration object + * @constructor + */ +function SliderBase() { + SliderBase.superclass.constructor.apply( this, arguments ); +} + +Y.SliderBase = Y.extend( SliderBase, Y.Widget, { + + // Y.Slider prototype + + /** + * Construction logic executed during Slider instantiation. + * + * @method initializer + * @protected + */ + initializer : function () { + /** + * The configured axis, stored for fast lookup since it's a writeOnce + * attribute. This is for use by extension classes. For + * implementation code, use get( "axis" ) for + * authoritative source. Never write to this property. + * + * @property axis + * @type {String} + * @protected + */ + this.axis = this.get( 'axis' ); + + /** + * Cached fast access map for DOM properties and attributes that + * pertain to accessing dimensional or positioning information + * according to the Slider's axis (e.g. "height" vs. + * "width"). Extension classes should add to this collection + * for axis related strings if necessary. + * + * @property _key + * @type {Object} + * @protected + */ + this._key = { + dim : ( this.axis === 'y' ) ? 'height' : 'width', + minEdge: ( this.axis === 'y' ) ? 'top' : 'left', + maxEdge: ( this.axis === 'y' ) ? 'bottom' : 'right', + xyIndex: ( this.axis === 'y' ) ? 1 : 0 + }; + + /** + * Signals that the thumb has moved. Payload includes the thumb's + * pixel offset from the top/left edge of the rail, and if triggered by + * dragging the thumb, the drag:drag event. + * + * @event thumbMove + * @param event {Event} The event object for the thumbMove with the + * following extra properties: + *
          + *
          offset
          + *
          Pixel offset from top/left of the slider to the new + * thumb position
          + *
          ddEvent
          + *
          drag:drag event from the thumb
          + *
          + */ + this.publish( 'thumbMove', { + defaultFn: this._defThumbMoveFn, + queuable : true + } ); + }, + + /** + * Create the DOM structure for the Slider. + * + * @method renderUI + * @protected + */ + renderUI : function () { + var contentBox = this.get( 'contentBox' ); + + /** + * The Node instance of the Slider's rail element. Do not write to + * this property. + * + * @property rail + * @type {Node} + */ + this.rail = this.renderRail(); + + this._uiSetRailLength( this.get( 'length' ) ); + + /** + * The Node instance of the Slider's thumb element. Do not write to + * this property. + * + * @property thumb + * @type {Node} + */ + this.thumb = this.renderThumb(); + + this.rail.appendChild( this.thumb ); + // @TODO: insert( contentBox, 'replace' ) or setContent? + contentBox.appendChild( this.rail ); + + // + contentBox.addClass( this.getClassName( this.axis ) ); + }, + + /** + * Creates the Slider rail DOM subtree for insertion into the Slider's + * contentBox. Override this method if you want to provide + * the rail element (presumably from existing markup). + * + * @method renderRail + * @return {Node} the rail node subtree + */ + renderRail: function () { + var minCapClass = this.getClassName( 'rail', 'cap', this._key.minEdge ), + maxCapClass = this.getClassName( 'rail', 'cap', this._key.maxEdge ); + + return Y.Node.create( + Y.substitute( this.RAIL_TEMPLATE, { + railClass : this.getClassName( 'rail' ), + railMinCapClass: minCapClass, + railMaxCapClass: maxCapClass + } ) ); + }, + + /** + * Sets the rail length according to the length attribute. + * + * @method _uiSetRailLength + * @param length {String} the length to apply to the rail style + * @protected + */ + _uiSetRailLength: function ( length ) { + this.rail.setStyle( this._key.dim, length ); + }, + + /** + * Creates the Slider thumb DOM subtree for insertion into the Slider's + * rail. Override this method if you want to provide the thumb element + * (presumably from existing markup). + * + * @method renderThumb + * @return {Node} the thumb node subtree + */ + renderThumb: function () { + this._initThumbUrl(); + + var imageUrl = this.get( 'thumbUrl' ); + + return Y.Node.create( + Y.substitute( this.THUMB_TEMPLATE, { + thumbClass : this.getClassName( 'thumb' ), + thumbShadowClass: this.getClassName( 'thumb', 'shadow' ), + thumbImageClass : this.getClassName( 'thumb', 'image' ), + thumbShadowUrl : imageUrl, + thumbImageUrl : imageUrl + } ) ); + }, + + /** + * Creates the Y.DD.Drag instance used to handle the thumb movement and + * binds Slider interaction to the configured value model. + * + * @method bindUI + * @protected + */ + bindUI : function () { + this._bindThumbDD(); + + this._bindValueLogic(); + + this.after( 'disabledChange', this._afterDisabledChange ); + this.after( 'lengthChange', this._afterLengthChange ); + }, + + /** + * Makes the thumb draggable and constrains it to the rail. + * + * @method _bindThumbDD + * @protected + */ + _bindThumbDD: function () { + var config = { constrain: this.rail }; + + // { constrain: rail, stickX: true } + config[ 'stick' + this.axis.toUpperCase() ] = true; + + /** + * The DD.Drag instance linked to the thumb node. + * + * @property _dd + * @type {DD.Drag} + * @protected + */ + this._dd = new Y.DD.Drag( { + node : this.thumb, + bubble : false, + on : { + 'drag:start': Y.bind( this._onDragStart, this ) + }, + after : { + 'drag:drag': Y.bind( this._afterDrag, this ), + 'drag:end' : Y.bind( this._afterDragEnd, this ) + } + } ); + + // Constrain the thumb to the rail + this._dd.plug( Y.Plugin.DDConstrained, config ); + }, + + /** + * Stub implementation. Override this (presumably in a class extension) to + * initialize any value logic that depends on the presence of the Drag + * instance. + * + * @method _bindValueLogic + * @protected + */ + _bindValueLogic: function () {}, + + /** + * Moves the thumb to pixel offset position along the rail. + * + * @method _uiMoveThumb + * @param offset {Number} the pixel offset to set as left or top style + * @protected + */ + _uiMoveThumb: function ( offset ) { + if ( this.thumb ) { + this.thumb.setStyle( this._key.minEdge, offset + 'px' ); + + + this.fire( 'thumbMove', { offset: offset } ); + } + }, + + /** + * Dispatches the slideStart event. + * + * @method _onDragStart + * @param e {Event} the drag:start event from the thumb + * @protected + */ + _onDragStart: function ( e ) { + /** + * Signals the beginning of a thumb drag operation. Payload includes + * the thumb's drag:start event. + * + * @event slideStart + * @param event {Event} The event object for the slideStart with the + * following extra properties: + *
          + *
          ddEvent
          + *
          drag:start event from the thumb
          + *
          + */ + this.fire( 'slideStart', { ddEvent: e } ); + }, + + /** + * Dispatches the thumbMove event. + * + * @method _afterDrag + * @param e {Event} the drag:drag event from the thumb + * @protected + */ + _afterDrag: function ( e ) { + var thumbXY = e.info.xy[ this._key.xyIndex ], + railXY = e.target.con._regionCache[ this._key.minEdge ]; + + this.fire( 'thumbMove', { + offset : (thumbXY - railXY), + ddEvent: e + } ); + }, + + /** + * Dispatches the slideEnd event. + * + * @method _onDragEnd + * @param e {Event} the drag:end event from the thumb + * @protected + */ + _afterDragEnd: function ( e ) { + /** + * Signals the end of a thumb drag operation. Payload includes + * the thumb's drag:end event. + * + * @event slideEnd + * @param event {Event} The event object for the slideEnd with the + * following extra properties: + *
          + *
          ddEvent
          + *
          drag:end event from the thumb
          + *
          + */ + this.fire( 'slideEnd', { ddEvent: e } ); + }, + + /** + * Locks or unlocks the thumb. + * + * @method _afterDisabledChange + * @param e {Event} The disabledChange event object + * @protected + */ + _afterDisabledChange: function ( e ) { + this._dd.set( 'lock', e.newVal ); + }, + + /** + * Handles changes to the length attribute. By default, it + * triggers an update to the UI. + * + * @method _afterLengthChange + * @param e {Event} The lengthChange event object + * @protected + */ + _afterLengthChange: function ( e ) { + if ( this.get( 'rendered' ) ) { + this._uiSetRailLength( e.newVal ); + + this.syncUI(); + } + }, + + /** + * Synchronizes the DOM state with the attribute settings. + * + * @method syncUI + */ + syncUI : function () { + this._dd.con.resetCache(); + + this._syncThumbPosition(); + + // Forces a reflow of the bounding box to address IE8 inline-block + // container not expanding correctly. bug 2527905 + //this.get('boundingBox').toggleClass(''); + }, + + /** + * Stub implementation. Override this (presumably in a class extension) to + * ensure the thumb is in the correct position according to the value + * alogorithm. + * instance. + * + * @method _syncThumbPosition + * @protected + */ + _syncThumbPosition: function () {}, + + /** + * Validates the axis is "x" or "y" (case insensitive). + * Converts to lower case for storage. + * + * @method _setAxis + * @param v {String} proposed value for the axis attribute + * @return {String} lowercased first character of the input string + * @protected + */ + _setAxis : function (v) { + v = ( v + '' ).toLowerCase(); + + return ( v === 'x' || v === 'y' ) ? v : INVALID_VALUE; + }, + + /** + *

          Ensures the stored length value is a string with a quantity and unit. + * Unit will be defaulted to "px" if not included. Rejects + * values less than or equal to 0 and those that don't at least start with + * a number.

          + * + *

          Currently only pixel lengths are supported.

          + * + * @method _setLength + * @param v {String} proposed value for the length attribute + * @return {String} the sanitized value + * @protected + */ + _setLength: function ( v ) { + v = ( v + '' ).toLowerCase(); + + var length = parseFloat( v, 10 ), + units = v.replace( /[\d\.\-]/g, '' ) || this.DEF_UNIT; + + return length > 0 ? ( length + units ) : INVALID_VALUE; + }, + + /** + *

          Defaults the thumbURL attribute according to the current skin, or + * "sam" if none can be determined. Horizontal Sliders will have + * their thumbUrl attribute set to

          + *

          "/configured/yui/builddir/slider/assets/skins/sam/thumb-x.png"

          + *

          And vertical thumbs will get

          + *

          "/configured/yui/builddir/slider/assets/skins/sam/thumb-y.png"

          + * + * @method _initThumbUrl + * @protected + */ + _initThumbUrl: function () { + if (!this.get('thumbUrl')) { + var skin = this.getSkinName() || 'sam', + base = Y.config.base; + + // Unfortunate hack to avoid requesting image resources from the + // combo service. The combo service does not serve images. + if (base.indexOf('http://yui.yahooapis.com/combo') === 0) { + base = 'http://yui.yahooapis.com/' + Y.version + '/build/'; + } + + // + this.set('thumbUrl', base + 'slider/assets/skins/' + + skin + '/thumb-' + this.axis + '.png'); + + } + }, + + /** + * Bounding box template that will contain the Slider's DOM subtree. <span>s are used to support inline-block styling. + * + * @property BOUNDING_TEMPLATE + * @type {String} + * @default <span></span> + */ + BOUNDING_TEMPLATE : '', + + /** + * Content box template that will contain the Slider's rail and thumb. + * + * @property CONTENT_TEMPLATE + * @type {String} + * @default <span></span> + */ + CONTENT_TEMPLATE : '', + + /** + * Rail template that will contain the end caps and the thumb. + * {placeholder}s are used for template substitution at render time. + * + * @property RAIL_TEMPLATE + * @type {String} + * @default <span class="{railClass}"><span class="{railMinCapClass}"></span><span class="{railMaxCapClass}"></span></span> + */ + RAIL_TEMPLATE : '' + + '' + + '' + + '', + + /** + * Thumb template that will contain the thumb image and shadow. <img> + * tags are used instead of background images to avoid a flicker bug in IE. + * {placeholder}s are used for template substitution at render time. + * + * @property THUMB_TEMPLATE + * @type {String} + * @default <span class="{thumbClass}" tabindex="-1"><img src="{thumbShadowUrl}" alt="Slider thumb shadow" class="{thumbShadowClass}"><img src="{thumbImageUrl}" alt="Slider thumb" class="{thumbImageClass}"></span> + */ + THUMB_TEMPLATE : '' + + '' + + '' + + '' + +}, { + + // Y.SliderBase static properties + + /** + * The identity of the widget. + * + * @property SliderBase.NAME + * @type String + * @default 'sliderBase' + * @readOnly + * @protected + * @static + */ + NAME : 'sliderBase', + + /** + * Static property used to define the default attribute configuration of + * the Widget. + * + * @property SliderBase.ATTRS + * @type {Object} + * @protected + * @static + */ + ATTRS : { + + /** + * Axis upon which the Slider's thumb moves. "x" for + * horizontal, "y" for vertical. + * + * @attribute axis + * @type {String} + * @default "x" + * @writeOnce + */ + axis : { + value : 'x', + writeOnce : true, + setter : '_setAxis', + lazyAdd : false + }, + + /** + * The length of the rail (exclusive of the end caps if positioned by + * CSS). This corresponds to the movable range of the thumb. + * + * @attribute length + * @type {String | Number} e.g. "200px" or 200 + * @default 150px + */ + length: { + value: '150px', + setter: '_setLength' + }, + + /** + * Path to the thumb image. This will be used as both the thumb and + * shadow as a sprite. Defaults at render() to thumb-x.png or + * thumb-y.png in the skin directory of the current skin. + * + * @attribute thumbUrl + * @type {String} + * @default thumb-x.png or thumb-y.png in the sam skin directory of the + * current build path for Slider + */ + thumbUrl: { + value: null, + validator: Y.Lang.isString + } + } +}); + + +}, '3.3.0' ,{requires:['widget', 'substitute', 'dd-constrain']}); diff --git a/jssource/src_files/include/javascript/yui3/build/slider/slider-min.js b/jssource/src_files/include/javascript/yui3/build/slider/slider-min.js index d63d5d87..7df96b90 100644 --- a/jssource/src_files/include/javascript/yui3/build/slider/slider-min.js +++ b/jssource/src_files/include/javascript/yui3/build/slider/slider-min.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("slider",function(A){var i="slider",Z="rail",m="thumb",l="value",U="min",o="max",J="minGutter",b="maxGutter",R="thumbImage",n="railSize",c="contentBox",Q="slideStart",a="slideEnd",X="thumbDrag",e="sync",H="positionThumb",j="rendered",d="disabled",O="disabledChange",W=".",q="px",D="width",f="height",S="complete",K=A.Lang,g=K.isBoolean,P=K.isString,p=K.isNumber,G=A.ClassNameManager.getClassName,N="image",B=G(i,Z),C=G(i,m),T=G(i,m,N),E=G(i,N,"error"),I=Math,V=I.max,k=I.round,F=I.floor;function h(){h.superclass.constructor.apply(this,arguments);}A.mix(h,{NAME:i,_AXIS_KEYS:{x:{dim:D,offAxisDim:f,eventPageAxis:"pageX",ddStick:"stickX",xyIndex:0},y:{dim:f,offAxisDim:D,eventPageAxis:"pageY",ddStick:"stickY",xyIndex:1}},HTML_PARSER:{rail:W+B,thumb:W+C,thumbImage:W+T},ATTRS:{axis:{value:"x",writeOnce:true,validator:function(L){return this._validateNewAxis(L);},setter:function(L){return this._setAxisFn(L);}},min:{value:0,validator:function(L){return this._validateNewMin(L);}},max:{value:100,validator:function(L){return this._validateNewMax(L);}},value:{value:0,validator:function(L){return this._validateNewValue(L);}},rail:{value:null,validator:function(L){return this._validateNewRail(L);},setter:function(L){return this._setRailFn(L);}},thumb:{value:null,validator:function(L){return this._validateNewThumb(L);},setter:function(L){return this._setThumbFn(L);}},thumbImage:{value:null,validator:function(L){return this._validateNewThumbImage(L);},setter:function(L){return this._setThumbImageFn(L);}},railSize:{value:"0",validator:function(L){return this._validateNewRailSize(L);}},railEnabled:{value:true,validator:g},minGutter:{value:0,validator:p},maxGutter:{value:0,validator:p}}});A.extend(h,A.Widget,{_key:null,_factor:1,_railSize:null,_thumbSize:null,_thumbOffset:0,_stall:false,_disabled:false,initializer:function(){this._key=h._AXIS_KEYS[this.get("axis")];this.after("minChange",this._afterMinChange);this.after("maxChange",this._afterMaxChange);this.after("railSizeChange",this._afterRailSizeChange);this.publish(Q);this.publish(a);this.publish(e,{defaultFn:this._defSyncFn});this.publish(H,{defaultFn:this._defPositionThumbFn});},renderUI:function(){this._initRail();this._initThumb();},_initRail:function(){var L=this.get(c),M=this.get(Z);if(!M){M=L.appendChild(A.Node.create('
          '));this.set(Z,M);}else{if(!L.contains(M)){L.appendChild(M);}}M.addClass(B);M.addClass(this.getClassName(Z,this.get("axis")));},_initThumb:function(){var M=this.get(Z),L=this.get(m);if(L&&!this.get(R)&&L.get("nodeName").toLowerCase()==="img"){this.set(R,L);this.set(m,null);L=null;}if(!L){L=A.Node.create('
          ');this.set(m,L);}L.addClass(C);if(!M.contains(L)){M.appendChild(L);}if(this.get(R)){this._initThumbImage();}},_initThumbImage:function(){var M=this.get(m),L=this.get(R);if(L){L.replaceClass(C,T);if(!M.contains(L)){M.appendChild(L);}}},bindUI:function(){this.publish(X,{defaultFn:this._defThumbDragFn});this._bindThumbDD();this.after("valueChange",this._afterValueChange);this.after("thumbImageChange",this._afterThumbImageChange);this.after(O,this._afterDisabledChange);},_bindThumbDD:function(){var M={node:this.get(m),bubble:false},L={constrain2node:this.get(Z)};L[this._key.ddStick]=true;this._dd=new A.DD.Drag(M).plug(A.Plugin.DDConstrained,L);this._dd.on("drag:start",A.bind(this._onDDStartDrag,this));this._dd.on("drag:drag",A.bind(this._onDDDrag,this));this._dd.on("drag:end",A.bind(this._onDDEndDrag,this));this._initRailDD();},_initRailDD:function(){this.get(Z).on("mousedown",A.bind(this._handleRailMouseDown,this));},_handleRailMouseDown:function(Y){if(this.get("railEnabled")&&!this.get(d)){var L=this._dd,r=this._key.xyIndex,M;if(L.get("primaryButtonOnly")&&Y.button>1){return false;}L._dragThreshMet=true;L._fixIEMouseDown();Y.halt();A.DD.DDM.activeDrag=L;M=L.get("dragNode").getXY();M[r]+=this._thumbOffset;L._setStartPosition(M);L.set("activeHandle",L.get("dragNode"));L.start();L._alignNode([Y.pageX,Y.pageY]);}},syncUI:function(){this.get(c).removeClass(E);var L=this.get(R);if(this._isImageLoading(L)){this._scheduleSync();}else{this._ready(L,!this._isImageLoaded(L));}},_scheduleSync:function(){var L,M;if(!this._stall){this._disabled=this.get(d);this.set(d,true);this._stall=this.on(O,this._stallDisabledChange);L=this.get(R);M=A.bind(this._imageLoaded,this,L);L.on("load",M);L.on("error",M);}},_stallDisabledChange:function(L){this._disabled=L.newVal;L.preventDefault();},_imageLoaded:function(L,Y){var M=(Y.type.toLowerCase().indexOf("error")>-1);A.later(0,this,function(){if(this._stall){this._stall.detach();}this._stall=false;this._ready(L,M);this.set(d,this._disabled);});},_ready:function(L,M){var Y=M?"addClass":"removeClass";this.get(c)[Y](E);this.fire(e);},_defSyncFn:function(L){this._uiSetThumbSize();this._setThumbOffset();this._uiSetRailSize();this._setRailOffsetXY();this._setDDGutter();this._resetDDCacheRegion();this._setFactor();var M=this.get(l);this.fire(H,{value:M,offset:this._convertValueToOffset(M)});this.get("boundingBox").toggleClass("");},_uiSetThumbSize:function(){var M=this.get(m),r=this._key.dim,L=this.get(R),Y;Y=parseInt(M.getComputedStyle(r),10);if(L&&this._isImageLoaded(L)){Y=L.get(r);}this._thumbSize=Y;},_setThumbOffset:function(){this._thumbOffset=F(this._thumbSize/2);},_uiSetRailSize:function(){var t=this.get(Z),M=this.get(m),L=this.get(R),s=this._key.dim,Y=this.get(n),r=false;if(parseInt(Y,10)){t.setStyle(s,Y);Y=parseInt(t.getComputedStyle(s),10);}else{Y=this.get(s);if(parseInt(Y,10)){r=true;t.setStyle(s,Y);Y=parseInt(t.getComputedStyle(s),10);}Y=V(Y|0,parseInt(M.getComputedStyle(s),10),parseInt(t.getComputedStyle(s),10));if(L&&this._isImageLoaded(L)){Y=V(L.get(s),Y);}}t.setStyle(s,Y+q);this._railSize=Y;if(r){s=this._key.offAxisDim;Y=this.get(s);if(Y){t.set(s,Y);}}},_setRailOffsetXY:function(){this._offsetXY=this.get(Z).getXY()[this._key.xyIndex]+this.get(J);},_setDDGutter:function(){var L=this._key.xyIndex?this.get(J)+" 0 "+this.get(b):"0 "+this.get(b)+" 0 "+this.get(J); -this._dd.con.set("gutter",L);},_resetDDCacheRegion:function(){this._dd.con._cacheRegion();},_setFactor:function(){var L=this._railSize-this._thumbSize-this.get(J)-this.get(b);this._factor=this._railSize?(this.get(o)-this.get(U))/L:1;},getValue:function(){return this.get(l);},setValue:function(L){this.set(l,L);},_validateNewAxis:function(L){return P(L)&&"xXyY".indexOf(L.charAt(0))>-1;},_validateNewMin:function(L){return p(L);},_validateNewMax:function(L){return p(L);},_validateNewValue:function(M){var Y=this.get(U),L=this.get(o);return p(M)&&(Y=Y&&M<=L):(M>=L&&M<=Y));},_validateNewRail:function(L){return !this.get(j)||L;},_validateNewThumb:function(L){return !this.get(j)||L;},_validateNewThumbImage:function(L){return !this.get(j)||L;},_validateNewRailSize:function(L){return P(L)&&(L==="0"||/^\d+(?:p[xtc]|%|e[mx]|in|[mc]m)$/.test(L));},_setAxisFn:function(L){return L.charAt(0).toLowerCase();},_setRailFn:function(L){return A.get(L)||null;},_setThumbFn:function(L){return A.get(L)||null;},_setThumbImageFn:function(L){return L?A.get(L)||A.Node.create('Slider thumb'):null;},_onDDStartDrag:function(L){this._setRailOffsetXY();this.fire(Q,{ddEvent:L});},_onDDDrag:function(L){this.fire(X,{ddEvent:L});},_defThumbDragFn:function(M){var L=this.get(l),Y=M.ddEvent[this._key.eventPageAxis]-this._offsetXY;Y=this._convertOffsetToValue(Y);if(L!==Y){this.set(l,Y,{ddEvent:M.ddEvent});}},_onDDEndDrag:function(L){this.fire(a,{ddEvent:L});},_defPositionThumbFn:function(L){this._uiPositionThumb(L.offset);},_uiPositionThumb:function(r){var L=this._dd,M=L.get("dragNode"),Y=M.ancestor(this._isDisplayNone);if(!Y){L._setStartPosition(L.get("dragNode").getXY());L._alignNode([r,r],true);}},_isDisplayNone:function(L){return L.getComputedStyle("display")==="none";},_afterValueChange:function(M){if(!M.ddEvent){var L=this._convertValueToOffset(M.newVal);this.fire(H,{value:M.newVal,offset:L});}},_convertValueToOffset:function(L){return k((L-this.get(U))/this._factor)+this._offsetXY;},_convertOffsetToValue:function(L){return k(this.get(U)+(L*this._factor));},_afterThumbChange:function(M){var L;if(this.get(j)){if(M.prevValue){M.prevValue.get("parentNode").removeChild(M.prevValue);}this._initThumb();L=this.get(m);this._dd.set("node",L);this._dd.set("dragNode",L);this.syncUI();}},_afterThumbImageChange:function(L){if(this.get(j)){if(L.prevValue){L.prevValue.get("parentNode").removeChild(L.prevValue);}this._initThumbImage();this.syncUI();}},_afterMinChange:function(L){this._refresh(L);},_afterMaxChange:function(L){this._refresh(L);},_afterRailSizeChange:function(L){this._refresh(L);},_afterDisabledChange:function(L){if(this._dd){this._dd.set("lock",L.newVal);}},_refresh:function(L){if(L.newVal!==L.prevVal&&this.get(j)){this.syncUI();}},_isImageLoading:function(L){return L&&!L.get(S);},_isImageLoaded:function(M){if(M){var L=M.get("naturalWidth");return M.get(S)&&(!p(L)?M.get(D):L);}return true;}});A.Slider=h;},"3.0.0",{requires:["widget","dd-constrain"]}); \ No newline at end of file +YUI.add("slider-base",function(c){var b=c.Attribute.INVALID_VALUE;function a(){a.superclass.constructor.apply(this,arguments);}c.SliderBase=c.extend(a,c.Widget,{initializer:function(){this.axis=this.get("axis");this._key={dim:(this.axis==="y")?"height":"width",minEdge:(this.axis==="y")?"top":"left",maxEdge:(this.axis==="y")?"bottom":"right",xyIndex:(this.axis==="y")?1:0};this.publish("thumbMove",{defaultFn:this._defThumbMoveFn,queuable:true});},renderUI:function(){var d=this.get("contentBox");this.rail=this.renderRail();this._uiSetRailLength(this.get("length"));this.thumb=this.renderThumb();this.rail.appendChild(this.thumb);d.appendChild(this.rail);d.addClass(this.getClassName(this.axis));},renderRail:function(){var e=this.getClassName("rail","cap",this._key.minEdge),d=this.getClassName("rail","cap",this._key.maxEdge);return c.Node.create(c.substitute(this.RAIL_TEMPLATE,{railClass:this.getClassName("rail"),railMinCapClass:e,railMaxCapClass:d}));},_uiSetRailLength:function(d){this.rail.setStyle(this._key.dim,d);},renderThumb:function(){this._initThumbUrl();var d=this.get("thumbUrl");return c.Node.create(c.substitute(this.THUMB_TEMPLATE,{thumbClass:this.getClassName("thumb"),thumbShadowClass:this.getClassName("thumb","shadow"),thumbImageClass:this.getClassName("thumb","image"),thumbShadowUrl:d,thumbImageUrl:d}));},bindUI:function(){this._bindThumbDD();this._bindValueLogic();this.after("disabledChange",this._afterDisabledChange);this.after("lengthChange",this._afterLengthChange);},_bindThumbDD:function(){var d={constrain:this.rail};d["stick"+this.axis.toUpperCase()]=true;this._dd=new c.DD.Drag({node:this.thumb,bubble:false,on:{"drag:start":c.bind(this._onDragStart,this)},after:{"drag:drag":c.bind(this._afterDrag,this),"drag:end":c.bind(this._afterDragEnd,this)}});this._dd.plug(c.Plugin.DDConstrained,d);},_bindValueLogic:function(){},_uiMoveThumb:function(d){if(this.thumb){this.thumb.setStyle(this._key.minEdge,d+"px");this.fire("thumbMove",{offset:d});}},_onDragStart:function(d){this.fire("slideStart",{ddEvent:d});},_afterDrag:function(f){var g=f.info.xy[this._key.xyIndex],d=f.target.con._regionCache[this._key.minEdge];this.fire("thumbMove",{offset:(g-d),ddEvent:f});},_afterDragEnd:function(d){this.fire("slideEnd",{ddEvent:d});},_afterDisabledChange:function(d){this._dd.set("lock",d.newVal);},_afterLengthChange:function(d){if(this.get("rendered")){this._uiSetRailLength(d.newVal);this.syncUI();}},syncUI:function(){this._dd.con.resetCache();this._syncThumbPosition();},_syncThumbPosition:function(){},_setAxis:function(d){d=(d+"").toLowerCase();return(d==="x"||d==="y")?d:b;},_setLength:function(e){e=(e+"").toLowerCase();var f=parseFloat(e,10),d=e.replace(/[\d\.\-]/g,"")||this.DEF_UNIT;return f>0?(f+d):b;},_initThumbUrl:function(){if(!this.get("thumbUrl")){var e=this.getSkinName()||"sam",d=c.config.base;if(d.indexOf("http://yui.yahooapis.com/combo")===0){d="http://yui.yahooapis.com/"+c.version+"/build/";}this.set("thumbUrl",d+"slider/assets/skins/"+e+"/thumb-"+this.axis+".png");}},BOUNDING_TEMPLATE:"",CONTENT_TEMPLATE:"",RAIL_TEMPLATE:''+''+''+"",THUMB_TEMPLATE:''+''+''+""},{NAME:"sliderBase",ATTRS:{axis:{value:"x",writeOnce:true,setter:"_setAxis",lazyAdd:false},length:{value:"150px",setter:"_setLength"},thumbUrl:{value:null,validator:c.Lang.isString}}});},"3.3.0",{requires:["widget","substitute","dd-constrain"]});YUI.add("slider-value-range",function(f){var b="min",e="max",d="value",c=Math.round;function a(){this._initSliderValueRange();}f.SliderValueRange=f.mix(a,{prototype:{_factor:1,_initSliderValueRange:function(){},_bindValueLogic:function(){this.after({minChange:this._afterMinChange,maxChange:this._afterMaxChange,valueChange:this._afterValueChange});},_syncThumbPosition:function(){this._calculateFactor();this._setPosition(this.get(d));},_calculateFactor:function(){var j=this.get("length"),h=this.thumb.getStyle(this._key.dim),i=this.get(b),g=this.get(e);j=parseFloat(j,10)||150;h=parseFloat(h,10)||15;this._factor=(g-i)/(j-h);},_defThumbMoveFn:function(i){var g=this.get(d),h=this._offsetToValue(i.offset);if(g!==h){this.set(d,h,{positioned:true});}},_offsetToValue:function(h){var g=c(h*this._factor)+this.get(b);return c(this._nearestValue(g));},_valueToOffset:function(g){var h=c((g-this.get(b))/this._factor);return h;},getValue:function(){return this.get(d);},setValue:function(g){return this.set(d,g);},_afterMinChange:function(g){this._verifyValue();this._syncThumbPosition();},_afterMaxChange:function(g){this._verifyValue();this._syncThumbPosition();},_verifyValue:function(){var h=this.get(d),g=this._nearestValue(h);if(h!==g){this.set(d,g);}},_afterValueChange:function(g){if(!g.positioned){this._setPosition(g.newVal);}},_setPosition:function(g){this._uiMoveThumb(this._valueToOffset(g));},_validateNewMin:function(g){return f.Lang.isNumber(g);},_validateNewMax:function(g){return f.Lang.isNumber(g);},_setNewValue:function(g){return c(this._nearestValue(g));},_nearestValue:function(j){var i=this.get(b),g=this.get(e),h;h=(g>i)?g:i;i=(g>i)?i:g;g=h;return(jg)?g:j;}},ATTRS:{min:{value:0,validator:"_validateNewMin"},max:{value:100,validator:"_validateNewMax"},value:{value:0,setter:"_setNewValue"}}},true);},"3.3.0",{requires:["slider-base"]});YUI.add("clickable-rail",function(b){function a(){this._initClickableRail();}b.ClickableRail=b.mix(a,{prototype:{_initClickableRail:function(){this._evtGuid=this._evtGuid||(b.guid()+"|");this.publish("railMouseDown",{defaultFn:this._defRailMouseDownFn});this.after("render",this._bindClickableRail);this.on("destroy",this._unbindClickableRail);},_bindClickableRail:function(){this._dd.addHandle(this.rail);this.rail.on(this._evtGuid+b.DD.Drag.START_EVENT,b.bind(this._onRailMouseDown,this)); +},_unbindClickableRail:function(){if(this.get("rendered")){var c=this.get("contentBox"),d=c.one("."+this.getClassName("rail"));d.detach(this.evtGuid+"*");}},_onRailMouseDown:function(c){if(this.get("clickableRail")&&!this.get("disabled")){this.fire("railMouseDown",{ev:c});}},_defRailMouseDownFn:function(k){k=k.ev;var c=this._resolveThumb(k),g=this._key.xyIndex,h=parseFloat(this.get("length"),10),f,d,j;if(c){f=c.get("dragNode");d=parseFloat(f.getStyle(this._key.dim),10);j=this._getThumbDestination(k,f);j=j[g]-this.rail.getXY()[g];j=Math.min(Math.max(j,0),(h-d));this._uiMoveThumb(j);k.target=this.thumb.one("img")||this.thumb;c._handleMouseDownEvent(k);}},_resolveThumb:function(c){return this._dd;},_getThumbDestination:function(g,f){var d=f.get("offsetWidth"),c=f.get("offsetHeight");return[(g.pageX-Math.round((d/2))),(g.pageY-Math.round((c/2)))];}},ATTRS:{clickableRail:{value:true,validator:b.Lang.isBoolean}}},true);},"3.3.0",{requires:["slider-base"]});YUI.add("range-slider",function(a){a.Slider=a.Base.build("slider",a.SliderBase,[a.SliderValueRange,a.ClickableRail]);},"3.3.0",{requires:["slider-base","clickable-rail","slider-value-range"]});YUI.add("slider",function(a){},"3.3.0",{use:["slider-base","slider-value-range","clickable-rail","range-slider"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/slider/slider-value-range-min.js b/jssource/src_files/include/javascript/yui3/build/slider/slider-value-range-min.js new file mode 100644 index 00000000..2470822f --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/slider/slider-value-range-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("slider-value-range",function(f){var b="min",e="max",d="value",c=Math.round;function a(){this._initSliderValueRange();}f.SliderValueRange=f.mix(a,{prototype:{_factor:1,_initSliderValueRange:function(){},_bindValueLogic:function(){this.after({minChange:this._afterMinChange,maxChange:this._afterMaxChange,valueChange:this._afterValueChange});},_syncThumbPosition:function(){this._calculateFactor();this._setPosition(this.get(d));},_calculateFactor:function(){var j=this.get("length"),h=this.thumb.getStyle(this._key.dim),i=this.get(b),g=this.get(e);j=parseFloat(j,10)||150;h=parseFloat(h,10)||15;this._factor=(g-i)/(j-h);},_defThumbMoveFn:function(i){var g=this.get(d),h=this._offsetToValue(i.offset);if(g!==h){this.set(d,h,{positioned:true});}},_offsetToValue:function(h){var g=c(h*this._factor)+this.get(b);return c(this._nearestValue(g));},_valueToOffset:function(g){var h=c((g-this.get(b))/this._factor);return h;},getValue:function(){return this.get(d);},setValue:function(g){return this.set(d,g);},_afterMinChange:function(g){this._verifyValue();this._syncThumbPosition();},_afterMaxChange:function(g){this._verifyValue();this._syncThumbPosition();},_verifyValue:function(){var h=this.get(d),g=this._nearestValue(h);if(h!==g){this.set(d,g);}},_afterValueChange:function(g){if(!g.positioned){this._setPosition(g.newVal);}},_setPosition:function(g){this._uiMoveThumb(this._valueToOffset(g));},_validateNewMin:function(g){return f.Lang.isNumber(g);},_validateNewMax:function(g){return f.Lang.isNumber(g);},_setNewValue:function(g){return c(this._nearestValue(g));},_nearestValue:function(j){var i=this.get(b),g=this.get(e),h;h=(g>i)?g:i;i=(g>i)?i:g;g=h;return(jg)?g:j;}},ATTRS:{min:{value:0,validator:"_validateNewMin"},max:{value:100,validator:"_validateNewMax"},value:{value:0,setter:"_setNewValue"}}},true);},"3.3.0",{requires:["slider-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/slider/slider-value-range.js b/jssource/src_files/include/javascript/yui3/build/slider/slider-value-range.js new file mode 100644 index 00000000..3801c7b1 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/slider/slider-value-range.js @@ -0,0 +1,398 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('slider-value-range', function(Y) { + +/** + * Adds value support for Slider as a range of integers between a configured + * minimum and maximum value. For use with Y.Base.build(..) to + * add the plumbing to Y.SliderBase. + * + * @module slider + * @submodule slider-value-range + */ + +// Constants for compression or performance +var MIN = 'min', + MAX = 'max', + VALUE = 'value', + + round = Math.round; + +/** + * One class of value algorithm that can be built onto SliderBase. By default, + * values range between 0 and 100, but you can configure these on the + * built Slider class by setting the min and max + * configurations. Set the initial value (will cause the thumb to move to the + * appropriate location on the rail) in configuration as well if appropriate. + * + * @class SliderValueRange + */ +function SliderValueRange() { + this._initSliderValueRange(); +} + +Y.SliderValueRange = Y.mix( SliderValueRange, { + + // Prototype properties and methods that will be added onto host class + prototype: { + + /** + * Factor used to translate value -> position -> value. + * + * @property _factor + * @type {Number} + * @protected + */ + _factor: 1, + + /** + * Stub for construction logic. Override if extending this class and + * you need to set something up during the initializer phase. + * + * @method _initSliderValueRange + * @protected + */ + _initSliderValueRange: function () {}, + + /** + * Override of stub method in SliderBase that is called at the end of + * its bindUI stage of render(). Subscribes to internal events to + * trigger UI and related state updates. + * + * @method _bindValueLogic + * @protected + */ + _bindValueLogic: function () { + this.after( { + minChange : this._afterMinChange, + maxChange : this._afterMaxChange, + valueChange: this._afterValueChange + } ); + }, + + /** + * Move the thumb to appropriate position if necessary. Also resets + * the cached offsets and recalculates the conversion factor to + * translate position to value. + * + * @method _syncThumbPosition + * @protected + */ + _syncThumbPosition: function () { + this._calculateFactor(); + + this._setPosition( this.get( VALUE ) ); + }, + + /** + * Calculates and caches + * (range between max and min) / (rail length) + * for fast runtime calculation of position -> value. + * + * @method _calculateFactor + * @protected + */ + _calculateFactor: function () { + var length = this.get( 'length' ), + thumbSize = this.thumb.getStyle( this._key.dim ), + min = this.get( MIN ), + max = this.get( MAX ); + + // The default thumb width is based on Sam skin's thumb dimension. + // This attempts to allow for rendering off-DOM, then attaching + // without the need to call syncUI(). It is still recommended + // to call syncUI() in these cases though, just to be sure. + length = parseFloat( length, 10 ) || 150; + thumbSize = parseFloat( thumbSize, 10 ) || 15; + + this._factor = ( max - min ) / ( length - thumbSize ); + + }, + + /** + * Dispatch the new position of the thumb into the value setting + * operations. + * + * @method _defThumbMoveFn + * @param e { EventFacade } The host's thumbMove event + * @protected + */ + _defThumbMoveFn: function ( e ) { + var previous = this.get( VALUE ), + value = this._offsetToValue( e.offset ); + + // This test avoids duplication of this.set(..) if the origin + // of this thumbMove is from slider.set('value',x); + // slider.set() -> afterValueChange -> uiMoveThumb -> + // fire(thumbMove) -> _defThumbMoveFn -> this.set() + if ( previous !== value ) { + this.set( VALUE, value, { positioned: true } ); + } + }, + + /** + *

          Converts a pixel position into a value. Calculates current + * thumb offset from the leading edge of the rail multiplied by the + * ratio of (max - min) / (constraining dim).

          + * + *

          Override this if you want to use a different value mapping + * algorithm.

          + * + * @method _offsetToValue + * @param offset { Number } X or Y pixel offset + * @return { mixed } Value corresponding to the provided pixel offset + * @protected + */ + _offsetToValue: function ( offset ) { + + var value = round( offset * this._factor ) + this.get( MIN ); + + return round( this._nearestValue( value ) ); + }, + + /** + * Converts a value into a pixel offset for use in positioning + * the thumb according to the reverse of the + * _offsetToValue( xy ) operation. + * + * @method _valueToOffset + * @param val { Number } The value to map to pixel X or Y position + * @return { Number } The pixel offset + * @protected + */ + _valueToOffset: function ( value ) { + var offset = round( ( value - this.get( MIN ) ) / this._factor ); + + return offset; + }, + + /** + * Returns the current value. Override this if you want to introduce + * output formatting. Otherwise equivalent to slider.get( "value" ); + * + * @method getValue + * @return {Number} + */ + getValue: function () { + return this.get( VALUE ); + }, + + /** + * Updates the current value. Override this if you want to introduce + * input value parsing or preprocessing. Otherwise equivalent to + * slider.set( "value", v ); + * + * @method setValue + * @param val {Number} The new value + * @return {Slider} + * @chainable + */ + setValue: function ( val ) { + return this.set( VALUE, val ); + }, + + /** + * Update position according to new min value. If the new min results + * in the current value being out of range, the value is set to the + * closer of min or max. + * + * @method _afterMinChange + * @param e { EventFacade } The min attribute change event. + * @protected + */ + _afterMinChange: function ( e ) { + this._verifyValue(); + + this._syncThumbPosition(); + }, + + /** + * Update position according to new max value. If the new max results + * in the current value being out of range, the value is set to the + * closer of min or max. + * + * @method _afterMaxChange + * @param e { EventFacade } The max attribute change event. + * @protected + */ + _afterMaxChange: function ( e ) { + this._verifyValue(); + + this._syncThumbPosition(); + }, + + /** + * Verifies that the current value is within the min - max range. If + * not, value is set to either min or max, depending on which is + * closer. + * + * @method _verifyValue + * @protected + */ + _verifyValue: function () { + var value = this.get( VALUE ), + nearest = this._nearestValue( value ); + + if ( value !== nearest ) { + // @TODO Can/should valueChange, minChange, etc be queued + // events? To make dd.set( 'min', n ); execute after minChange + // subscribers before on/after valueChange subscribers. + this.set( VALUE, nearest ); + } + }, + + /** + * Propagate change to the thumb position unless the change originated + * from the thumbMove event. + * + * @method _afterValueChange + * @param e { EventFacade } The valueChange event. + * @protected + */ + _afterValueChange: function ( e ) { + if ( !e.positioned ) { + this._setPosition( e.newVal ); + } + }, + + /** + * Positions the thumb in accordance with the translated value. + * + * @method _setPosition + * @protected + */ + _setPosition: function ( value ) { + this._uiMoveThumb( this._valueToOffset( value ) ); + }, + + /** + * Validates new values assigned to min attribute. Numbers + * are acceptable. Override this to enforce different rules. + * + * @method _validateNewMin + * @param value { mixed } Value assigned to min attribute. + * @return { Boolean } True for numbers. False otherwise. + * @protected + */ + _validateNewMin: function ( value ) { + return Y.Lang.isNumber( value ); + }, + + /** + * Validates new values assigned to max attribute. Numbers + * are acceptable. Override this to enforce different rules. + * + * @method _validateNewMax + * @param value { mixed } Value assigned to max attribute. + * @return { Boolean } True for numbers. False otherwise. + * @protected + */ + _validateNewMax: function ( value ) { + return Y.Lang.isNumber( value ); + }, + + /** + * Restricts new values assigned to value attribute to be + * between the configured min and max. + * Rounds to nearest integer value. + * + * @method _setNewValue + * @param value { Number } Value assigned to value attribute + * @return { Number } Normalized and constrained value + * @protected + */ + _setNewValue: function ( value ) { + return round( this._nearestValue( value ) ); + }, + + /** + * Returns the nearest valid value to the value input. If the provided + * value is outside the min - max range, accounting for min > max + * scenarios, the nearest of either min or max is returned. Otherwise, + * the provided value is returned. + * + * @method _nearestValue + * @param value { mixed } Value to test against current min - max range + * @return { Number } Current min, max, or value if within range + * @protected + */ + _nearestValue: function ( value ) { + var min = this.get( MIN ), + max = this.get( MAX ), + tmp; + + // Account for reverse value range (min > max) + tmp = ( max > min ) ? max : min; + min = ( max > min ) ? min : max; + max = tmp; + + return ( value < min ) ? + min : + ( value > max ) ? + max : + value; + } + + }, + + /** + * Attributes that will be added onto host class. + * + * @property ATTRS + * @type {Object} + * @static + * @protected + */ + ATTRS: { + /** + * The value associated with the farthest top, left position of the + * rail. Can be greater than the configured max if you + * want values to increase from right-to-left or bottom-to-top. + * + * @attribute min + * @type { Number } + * @default 0 + */ + min: { + value : 0, + validator: '_validateNewMin' + }, + + /** + * The value associated with the farthest bottom, right position of + * the rail. Can be less than the configured min if + * you want values to increase from right-to-left or bottom-to-top. + * + * @attribute max + * @type { Number } + * @default 100 + */ + max: { + value : 100, + validator: '_validateNewMax' + }, + + /** + * The value associated with the thumb's current position on the + * rail. Defaults to the value inferred from the thumb's current + * position. Specifying value in the constructor will move the + * thumb to the position that corresponds to the supplied value. + * + * @attribute value + * @type { Number } + * @default (inferred from current thumb position) + */ + value: { + value : 0, + setter: '_setNewValue' + } + } +}, true ); + + +}, '3.3.0' ,{requires:['slider-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/slider/slider.js b/jssource/src_files/include/javascript/yui3/build/slider/slider.js index 22dcbc4a..747a715d 100644 --- a/jssource/src_files/include/javascript/yui3/build/slider/slider.js +++ b/jssource/src_files/include/javascript/yui3/build/slider/slider.js @@ -1,1472 +1,1205 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add('slider', function(Y) { +YUI.add('slider-base', function(Y) { /** * Create a sliding value range input visualized as a draggable thumb on a * background element. * * @module slider + * @submodule slider-base */ -var SLIDER = 'slider', - RAIL = 'rail', - THUMB = 'thumb', - VALUE = 'value', - MIN = 'min', - MAX = 'max', - MIN_GUTTER = 'minGutter', - MAX_GUTTER = 'maxGutter', - THUMB_IMAGE = 'thumbImage', - RAIL_SIZE = 'railSize', - CONTENT_BOX = 'contentBox', - - SLIDE_START = 'slideStart', - SLIDE_END = 'slideEnd', - - THUMB_DRAG = 'thumbDrag', - SYNC = 'sync', - POSITION_THUMB = 'positionThumb', - RENDERED = 'rendered', - DISABLED = 'disabled', - DISABLED_CHANGE = 'disabledChange', - - DOT = '.', - PX = 'px', - WIDTH = 'width', - HEIGHT = 'height', - COMPLETE = 'complete', - - L = Y.Lang, - isBoolean= L.isBoolean, - isString = L.isString, - isNumber = L.isNumber, - - getCN = Y.ClassNameManager.getClassName, - - IMAGE = 'image', - C_RAIL = getCN(SLIDER,RAIL), - C_THUMB = getCN(SLIDER,THUMB), - C_THUMB_IMAGE = getCN(SLIDER,THUMB,IMAGE), - C_IMAGE_ERROR = getCN(SLIDER,IMAGE,'error'), - - M = Math, - max = M.max, - round = M.round, - floor = M.floor; +var INVALID_VALUE = Y.Attribute.INVALID_VALUE; /** - * Create a slider to represent an integer value between a given minimum and - * maximum. Sliders may be aligned vertically or horizontally, based on the - * axis configuration. + * Create a slider to represent an input control capable of representing a + * series of intermediate states based on the position of the slider's thumb. + * These states are typically aligned to a value algorithm whereby the thumb + * position corresponds to a given value. Sliders may be oriented vertically or + * horizontally, based on the axis configuration. * - * @class Slider + * @class SliderBase * @extends Widget * @param config {Object} Configuration object * @constructor */ -function Slider() { - Slider.superclass.constructor.apply(this,arguments); +function SliderBase() { + SliderBase.superclass.constructor.apply( this, arguments ); } -Y.mix(Slider, { - - /** - * The identity of the widget. - * - * @property Slider.NAME - * @type String - * @static - */ - NAME : SLIDER, - - /** - * Object property names used for respective X and Y axis Sliders (e.g. - * "left" vs. "top" for placing the thumb according to - * its representative value). - * - * @property Slider._AXIS_KEYS - * @type Object - * @protected - * @static - */ - _AXIS_KEYS : { - x : { - dim : WIDTH, - offAxisDim : HEIGHT, - eventPageAxis : 'pageX', - ddStick : 'stickX', - xyIndex : 0 - }, - y : { - dim : HEIGHT, - offAxisDim : WIDTH, - eventPageAxis : 'pageY', - ddStick : 'stickY', - xyIndex : 1 - } - }, +Y.SliderBase = Y.extend( SliderBase, Y.Widget, { - /** - * Static Object hash used to capture existing markup for progressive - * enhancement. Keys correspond to config attribute names and values - * are selectors used to inspect the contentBox for an existing node - * structure. - * - * @property Slider.HTML_PARSER - * @type Object - * @protected - * @static - */ - HTML_PARSER : { - rail : DOT + C_RAIL, - thumb : DOT + C_THUMB, - thumbImage : DOT + C_THUMB_IMAGE - }, + // Y.Slider prototype /** - * Static property used to define the default attribute configuration of - * the Widget. + * Construction logic executed during Slider instantiation. * - * @property Slider.ATTRS - * @type Object + * @method initializer * @protected - * @static */ - ATTRS : { - - /** - * Axis upon which the Slider's thumb moves. "x" for - * horizontal, "y" for vertical. - * - * @attribute axis - * @type String - * @default "x" - * @writeOnce - */ - axis : { - value : 'x', - writeOnce : true, - validator : function (v) { - return this._validateNewAxis(v); - }, - setter : function (v) { - return this._setAxisFn(v); - } - }, - - /** - * Value associated with the left or top most position of the thumb on - * the rail. - * - * @attribute min - * @type Number - * @default 0 - */ - min : { - value : 0, - validator : function (v) { - return this._validateNewMin(v); - } - }, - - /** - * Value associated with the right or bottom most position of the thumb - * on the rail. - * - * @attribute max - * @type Number - * @default 100 - */ - max : { - value : 100, - validator : function (v) { - return this._validateNewMax(v); - } - }, - + initializer : function () { /** - * The current value of the Slider. This value is interpretted into a - * position for the thumb along the Slider's rail. + * The configured axis, stored for fast lookup since it's a writeOnce + * attribute. This is for use by extension classes. For + * implementation code, use get( "axis" ) for + * authoritative source. Never write to this property. * - * @attribute value - * @type Number - * @default 0 + * @property axis + * @type {String} + * @protected */ - value : { - value : 0, - validator : function (v) { - return this._validateNewValue(v); - } - }, + this.axis = this.get( 'axis' ); /** - * The Node representing the Slider's rail, usually visualized as a - * bar of some sort using a background image, along which the thumb - * moves. This Node contains the thumb Node. + * Cached fast access map for DOM properties and attributes that + * pertain to accessing dimensional or positioning information + * according to the Slider's axis (e.g. "height" vs. + * "width"). Extension classes should add to this collection + * for axis related strings if necessary. * - * @attribute rail - * @type Node - * @default null + * @property _key + * @type {Object} + * @protected */ - rail : { - value : null, - validator : function (v) { - return this._validateNewRail(v); - }, - setter : function (v) { - return this._setRailFn(v); - } - }, + this._key = { + dim : ( this.axis === 'y' ) ? 'height' : 'width', + minEdge: ( this.axis === 'y' ) ? 'top' : 'left', + maxEdge: ( this.axis === 'y' ) ? 'bottom' : 'right', + xyIndex: ( this.axis === 'y' ) ? 1 : 0 + }; /** - *

          The Node representing the Slider's thumb, usually visualized as a - * pointer using a contained image Node (see thumbImage). The current - * value of the Slider is calculated from the centerpoint of this - * Node in relation to the rail Node. If provided, the thumbImage - * Node is contained within this Node.

          + * Signals that the thumb has moved. Payload includes the thumb's + * pixel offset from the top/left edge of the rail, and if triggered by + * dragging the thumb, the drag:drag event. * - *

          If no thumbImage is provided and the Node passed as the thumb is - * an img element, the assigned Node will be allocated to - * the thumbImage and the thumb container defaulted.

          - * - * @attribute thumb - * @type Node - * @default null + * @event thumbMove + * @param event {Event} The event object for the thumbMove with the + * following extra properties: + *
          + *
          offset
          + *
          Pixel offset from top/left of the slider to the new + * thumb position
          + *
          ddEvent
          + *
          drag:drag event from the thumb
          + *
          */ - thumb : { - value : null, - validator : function (v) { - return this._validateNewThumb(v); - }, - setter : function (v) { - return this._setThumbFn(v); - } - }, + this.publish( 'thumbMove', { + defaultFn: this._defThumbMoveFn, + queuable : true + } ); + }, - /** - *

          The Node representing the image element to use for the Slider's - * thumb.

          - * - *

          Alternately, an image URL can be passed and an img - * Node will be generated accordingly.

          - * - *

          If no thumbImage is provided and the Node passed as the thumb is - * an img element, the assigned Node will be allocated to - * the thumbImage and the thumb container defaulted.

          - * - *

          If thumbImage is provided but its URL resolves to a 404, a default - * style will be applied to maintain basic functionality.

          - * - * @attribute thumbImage - * @type Node|String - * @default null - */ - thumbImage : { - value : null, - validator : function (v) { - return this._validateNewThumbImage(v); - }, - setter : function (v) { - return this._setThumbImageFn(v); - } - }, + /** + * Create the DOM structure for the Slider. + * + * @method renderUI + * @protected + */ + renderUI : function () { + var contentBox = this.get( 'contentBox' ); /** - *

          The width or height of the rail element representing the physical - * space along which the thumb can move. CSS size values (e.g. '30em') - * accepted but converted to pixels during render.

          + * The Node instance of the Slider's rail element. Do not write to + * this property. * - *

          Alternately, but not recommended, this attribute can be left - * unassigned in favor of specifying height or width.

          - * - * @attribute railSize - * @type String - * @default '0' + * @property rail + * @type {Node} */ - railSize : { - value : '0', - validator : function (v) { - return this._validateNewRailSize(v); - } - }, + this.rail = this.renderRail(); - /** - * Boolean indicating whether clicking and dragging on the rail will - * trigger thumb movement. - * - * @attribute railEnabled - * @type Boolean - * @default true - */ - railEnabled : { - value : true, - validator : isBoolean - }, + this._uiSetRailLength( this.get( 'length' ) ); /** - * Like CSS padding, the distance in pixels from the inner top or left - * edge of the rail node within which the thumb can travel. Negative - * values allow the edge of the thumb to escape the rail node - * boundaries. + * The Node instance of the Slider's thumb element. Do not write to + * this property. * - * @attribute minGutter - * @type Number - * @default 0 + * @property thumb + * @type {Node} */ - minGutter : { - value : 0, - validator : isNumber - }, + this.thumb = this.renderThumb(); - /** - * Like CSS padding, the distance in pixels from the inner bottom or - * right edge of the rail node within which the thumb can travel. - * Negative values allow the edge of the thumb to escape the rail node - * boundaries. - * - * @attribute maxGutter - * @type Number - * @default 0 - */ - maxGutter : { - value : 0, - validator : isNumber - } - } -}); + this.rail.appendChild( this.thumb ); + // @TODO: insert( contentBox, 'replace' ) or setContent? + contentBox.appendChild( this.rail ); -Y.extend(Slider, Y.Widget, { + // + contentBox.addClass( this.getClassName( this.axis ) ); + }, /** - * Collection of object property names from the appropriate hash set in - * Slider._AXIS_KEYS. + * Creates the Slider rail DOM subtree for insertion into the Slider's + * contentBox. Override this method if you want to provide + * the rail element (presumably from existing markup). * - * @property _key - * @type Object - * @protected + * @method renderRail + * @return {Node} the rail node subtree */ - _key : null, + renderRail: function () { + var minCapClass = this.getClassName( 'rail', 'cap', this._key.minEdge ), + maxCapClass = this.getClassName( 'rail', 'cap', this._key.maxEdge ); + + return Y.Node.create( + Y.substitute( this.RAIL_TEMPLATE, { + railClass : this.getClassName( 'rail' ), + railMinCapClass: minCapClass, + railMaxCapClass: maxCapClass + } ) ); + }, /** - * Factor used to translate positional coordinates (e.g. left or top) to - * the Slider's value. + * Sets the rail length according to the length attribute. * - * @property _factor - * @type Number + * @method _uiSetRailLength + * @param length {String} the length to apply to the rail style * @protected */ - _factor : 1, + _uiSetRailLength: function ( length ) { + this.rail.setStyle( this._key.dim, length ); + }, /** - * Pixel dimension of the rail Node's width for X axis Sliders or height - * for Y axis Sliders. Used with _factor to calculate positional - * coordinates for the thumb. + * Creates the Slider thumb DOM subtree for insertion into the Slider's + * rail. Override this method if you want to provide the thumb element + * (presumably from existing markup). * - * @property _railSize - * @type Number - * @protected + * @method renderThumb + * @return {Node} the thumb node subtree */ - _railSize : null, + renderThumb: function () { + this._initThumbUrl(); + + var imageUrl = this.get( 'thumbUrl' ); + + return Y.Node.create( + Y.substitute( this.THUMB_TEMPLATE, { + thumbClass : this.getClassName( 'thumb' ), + thumbShadowClass: this.getClassName( 'thumb', 'shadow' ), + thumbImageClass : this.getClassName( 'thumb', 'image' ), + thumbShadowUrl : imageUrl, + thumbImageUrl : imageUrl + } ) ); + }, /** - * Pixel dimension of the thumb Node's width for X axis Sliders or height - * for Y axis Sliders. Used with _factor to calculate positional - * coordinates for the thumb. + * Creates the Y.DD.Drag instance used to handle the thumb movement and + * binds Slider interaction to the configured value model. * - * @property _thumbSize - * @type Number + * @method bindUI * @protected */ - _thumbSize : null, + bindUI : function () { + this._bindThumbDD(); + + this._bindValueLogic(); + + this.after( 'disabledChange', this._afterDisabledChange ); + this.after( 'lengthChange', this._afterLengthChange ); + }, /** - * Pixel offset of the point in the thumb element from its top/left edge - * to where the value calculation should take place. By default, this is - * calculated to half the width of the thumb, causing the value to be - * marked from the center of the thumb. + * Makes the thumb draggable and constrains it to the rail. * - * @property _thumbOffset - * @type Number + * @method _bindThumbDD * @protected */ - _thumbOffset : 0, + _bindThumbDD: function () { + var config = { constrain: this.rail }; + + // { constrain: rail, stickX: true } + config[ 'stick' + this.axis.toUpperCase() ] = true; + + /** + * The DD.Drag instance linked to the thumb node. + * + * @property _dd + * @type {DD.Drag} + * @protected + */ + this._dd = new Y.DD.Drag( { + node : this.thumb, + bubble : false, + on : { + 'drag:start': Y.bind( this._onDragStart, this ) + }, + after : { + 'drag:drag': Y.bind( this._afterDrag, this ), + 'drag:end' : Y.bind( this._afterDragEnd, this ) + } + } ); + + // Constrain the thumb to the rail + this._dd.plug( Y.Plugin.DDConstrained, config ); + }, /** - * Object returned from temporary subscription to disabledChange event to - * defer setting the disabled state while Slider is loading the thumb - * image. + * Stub implementation. Override this (presumably in a class extension) to + * initialize any value logic that depends on the presence of the Drag + * instance. * - * @property _stall - * @type Object + * @method _bindValueLogic * @protected */ - _stall : false, + _bindValueLogic: function () {}, /** - * Deferred value for the disabled attribute when stalled (see _stall - * property). + * Moves the thumb to pixel offset position along the rail. * - * @property _disabled - * @type Boolean + * @method _uiMoveThumb + * @param offset {Number} the pixel offset to set as left or top style * @protected */ - _disabled : false, + _uiMoveThumb: function ( offset ) { + if ( this.thumb ) { + this.thumb.setStyle( this._key.minEdge, offset + 'px' ); + + + this.fire( 'thumbMove', { offset: offset } ); + } + }, /** - * Construction logic executed durint Slider instantiation. Subscribes to - * after events for min, max, and railSize. Publishes custom events - * including slideStart and slideEnd. + * Dispatches the slideStart event. * - * @method initializer + * @method _onDragStart + * @param e {Event} the drag:start event from the thumb * @protected */ - initializer : function () { - this._key = Slider._AXIS_KEYS[this.get('axis')]; - - this.after('minChange', this._afterMinChange); - this.after('maxChange', this._afterMaxChange); - - this.after('railSizeChange', this._afterRailSizeChange); - + _onDragStart: function ( e ) { /** * Signals the beginning of a thumb drag operation. Payload includes - * the DD.Drag instance's drag:start event under key ddEvent. + * the thumb's drag:start event. * * @event slideStart - * @param event {Event.Facade} An Event Facade object with the following attribute specific properties added: + * @param event {Event} The event object for the slideStart with the + * following extra properties: *
          *
          ddEvent
          - *
          drag:start event from the managed DD.Drag instance
          + *
          drag:start event from the thumb
          *
          */ - this.publish(SLIDE_START); + this.fire( 'slideStart', { ddEvent: e } ); + }, + + /** + * Dispatches the thumbMove event. + * + * @method _afterDrag + * @param e {Event} the drag:drag event from the thumb + * @protected + */ + _afterDrag: function ( e ) { + var thumbXY = e.info.xy[ this._key.xyIndex ], + railXY = e.target.con._regionCache[ this._key.minEdge ]; + + this.fire( 'thumbMove', { + offset : (thumbXY - railXY), + ddEvent: e + } ); + }, + /** + * Dispatches the slideEnd event. + * + * @method _onDragEnd + * @param e {Event} the drag:end event from the thumb + * @protected + */ + _afterDragEnd: function ( e ) { /** * Signals the end of a thumb drag operation. Payload includes - * the DD.Drag instance's drag:end event under key ddEvent. + * the thumb's drag:end event. * * @event slideEnd - * @param event {Event.Facade} An Event Facade object with the following attribute specific properties added: + * @param event {Event} The event object for the slideEnd with the + * following extra properties: *
          *
          ddEvent
          - *
          drag:end event from the managed DD.Drag instance
          - *
          - */ - this.publish(SLIDE_END); - - /** - * Communicates a request to synchronize the Slider UI with the - * attribute state. Links the sync request with the default sync - * logic in _defSyncFn. - * - * @event sync - * @param event {Event.Facade} Event Facade object - * @preventable _defSyncFn - */ - this.publish(SYNC, { defaultFn: this._defSyncFn }); - - /** - * Signals a request to reposition the thumb in response to API methods. - * Triggers the thumb placement logic in _defPositionThumbFn. - * - * @event positionThumb - * @param event {Event.Facade} An Event Facade object with the following attribute specific properties added: - *
          - *
          changeEv
          - *
          valueChange event fired in response to the change in the value attribute
          + *
          drag:end event from the thumb
          *
          - * @preventable _defPositionThumbFn */ - this.publish(POSITION_THUMB, { defaultFn: this._defPositionThumbFn }); + this.fire( 'slideEnd', { ddEvent: e } ); }, /** - * Create the DOM structure for the Slider. + * Locks or unlocks the thumb. * - * @method renderUI + * @method _afterDisabledChange + * @param e {Event} The disabledChange event object * @protected */ - renderUI : function () { - this._initRail(); - this._initThumb(); + _afterDisabledChange: function ( e ) { + this._dd.set( 'lock', e.newVal ); }, /** - * Creates the rail element if not provided and not discovered via - * HTML_PARSER. + * Handles changes to the length attribute. By default, it + * triggers an update to the UI. * - * @method _initRail + * @method _afterLengthChange + * @param e {Event} The lengthChange event object * @protected */ - _initRail : function () { - var cb = this.get(CONTENT_BOX), - rail = this.get(RAIL); - - // Create rail if necessary. Make sure it's in the contentBox - if (!rail) { - rail = cb.appendChild( - Y.Node.create('
          ')); - - this.set(RAIL,rail); - } else if (!cb.contains(rail)) { - cb.appendChild(rail); - } + _afterLengthChange: function ( e ) { + if ( this.get( 'rendered' ) ) { + this._uiSetRailLength( e.newVal ); - rail.addClass(C_RAIL); - rail.addClass(this.getClassName(RAIL,this.get('axis'))); + this.syncUI(); + } }, /** - *

          Creates the thumb element (not image) if not provided and not - * discovered via HTML_PARSER. If the thumb is an img element - * but no thumbImage configured or discovered, reassigns the thumb element - * to the thumbImage and defaults the thumb element as a div.

          + * Synchronizes the DOM state with the attribute settings. * - *

          Makes sure the thumb is a child of the rail element and calls - * _initThumbImage if thumbImage is provided.

          - * - * @method _initThumb - * @protected + * @method syncUI */ - _initThumb : function () { - var rail = this.get(RAIL), - thumb = this.get(THUMB); - - // Passed an img element as the thumb - if (thumb && !this.get(THUMB_IMAGE) && - thumb.get('nodeName').toLowerCase() === 'img') { - this.set(THUMB_IMAGE, thumb); - this.set(THUMB,null); - thumb = null; - } - - if (!thumb) { - thumb = Y.Node.create( - '
          '); - - this.set(THUMB,thumb); - } - - thumb.addClass(C_THUMB); + syncUI : function () { + this._dd.con.resetCache(); - if (!rail.contains(thumb)) { - rail.appendChild(thumb); - } + this._syncThumbPosition(); - if (this.get(THUMB_IMAGE)) { - this._initThumbImage(); - } + // Forces a reflow of the bounding box to address IE8 inline-block + // container not expanding correctly. bug 2527905 + //this.get('boundingBox').toggleClass(''); }, /** - * Ensures the thumbImage is a child of the thumb element. + * Stub implementation. Override this (presumably in a class extension) to + * ensure the thumb is in the correct position according to the value + * alogorithm. + * instance. * - * @method _initThumbImage + * @method _syncThumbPosition * @protected */ - _initThumbImage : function () { - var thumb = this.get(THUMB), - img = this.get(THUMB_IMAGE); - - if (img) { - img.replaceClass(C_THUMB,C_THUMB_IMAGE); - - if (!thumb.contains(img)) { - thumb.appendChild(img); - } - } - }, + _syncThumbPosition: function () {}, /** - * Creates the Y.DD instance used to handle the thumb movement and binds - * Slider interaction to the configured value model. + * Validates the axis is "x" or "y" (case insensitive). + * Converts to lower case for storage. * - * @method bindUI + * @method _setAxis + * @param v {String} proposed value for the axis attribute + * @return {String} lowercased first character of the input string * @protected */ - bindUI : function () { - /** - * Bridges user interaction with the thumb to the value attribute. - * - * @event thumbDrag - * @param event {Event.Facade} An Event Facade object with the following attribute specific properties added: - *
          - *
          ddEvent
          - *
          drag:drag event from the managed DD.Drag instance
          - *
          - * @preventable _defThumbDragFn - */ - this.publish(THUMB_DRAG, {defaultFn: this._defThumbDragFn}); + _setAxis : function (v) { + v = ( v + '' ).toLowerCase(); - this._bindThumbDD(); - - this.after('valueChange', this._afterValueChange); - this.after('thumbImageChange', this._afterThumbImageChange); - this.after(DISABLED_CHANGE, this._afterDisabledChange); + return ( v === 'x' || v === 'y' ) ? v : INVALID_VALUE; }, - /** - * Creates the Y.DD instance used to handle the thumb interaction. - * - * @method _bindThumbDD + /** + *

          Ensures the stored length value is a string with a quantity and unit. + * Unit will be defaulted to "px" if not included. Rejects + * values less than or equal to 0 and those that don't at least start with + * a number.

          + * + *

          Currently only pixel lengths are supported.

          + * + * @method _setLength + * @param v {String} proposed value for the length attribute + * @return {String} the sanitized value * @protected */ - _bindThumbDD : function () { - var ddConf = { - node : this.get(THUMB), - bubble : false - }, - conConf = { - constrain2node : this.get(RAIL) - }; - - conConf[this._key.ddStick] = true; + _setLength: function ( v ) { + v = ( v + '' ).toLowerCase(); - this._dd = new Y.DD.Drag(ddConf).plug(Y.Plugin.DDConstrained, conConf); - this._dd.on('drag:start', Y.bind(this._onDDStartDrag, this)); - this._dd.on('drag:drag', Y.bind(this._onDDDrag, this)); - this._dd.on('drag:end', Y.bind(this._onDDEndDrag, this)); + var length = parseFloat( v, 10 ), + units = v.replace( /[\d\.\-]/g, '' ) || this.DEF_UNIT; - this._initRailDD(); - }, - - /** - * Subscribes to the rail Node's mousedown event to actuate the thumb when - * backgroundEnabled is true. - * - * @method _initRailDD - * @protected - */ - _initRailDD : function () { - this.get(RAIL).on('mousedown',Y.bind(this._handleRailMouseDown,this)); + return length > 0 ? ( length + units ) : INVALID_VALUE; }, /** - * If the Slider is not disabled and railEnabled is true, moves the thumb - * to the mousedown position and hands control over to DD. + *

          Defaults the thumbURL attribute according to the current skin, or + * "sam" if none can be determined. Horizontal Sliders will have + * their thumbUrl attribute set to

          + *

          "/configured/yui/builddir/slider/assets/skins/sam/thumb-x.png"

          + *

          And vertical thumbs will get

          + *

          "/configured/yui/builddir/slider/assets/skins/sam/thumb-y.png"

          * - * @method _handleRailMouseDown - * @param e {Event} Mousedown event facade + * @method _initThumbUrl * @protected */ - _handleRailMouseDown : function (e) { - if (this.get('railEnabled') && !this.get(DISABLED)) { - var dd = this._dd, - xyIndex = this._key.xyIndex, - xy; + _initThumbUrl: function () { + if (!this.get('thumbUrl')) { + var skin = this.getSkinName() || 'sam', + base = Y.config.base; - if (dd.get('primaryButtonOnly') && e.button > 1) { - return false; + // Unfortunate hack to avoid requesting image resources from the + // combo service. The combo service does not serve images. + if (base.indexOf('http://yui.yahooapis.com/combo') === 0) { + base = 'http://yui.yahooapis.com/' + Y.version + '/build/'; } - dd._dragThreshMet = true; - - dd._fixIEMouseDown(); - e.halt(); + // + this.set('thumbUrl', base + 'slider/assets/skins/' + + skin + '/thumb-' + this.axis + '.png'); - Y.DD.DDM.activeDrag = dd; - - // Adjust registered starting position by half the thumb's x/y - xy = dd.get('dragNode').getXY(); - xy[xyIndex] += this._thumbOffset; - - dd._setStartPosition(xy); - dd.set('activeHandle',dd.get('dragNode')); - - dd.start(); - dd._alignNode([e.pageX,e.pageY]); } }, /** - * Synchronizes the DOM state with the attribute settings (most notably - * railSize and value). If thumbImage is provided and is still loading, - * sync is delayed until it is complete, since the image's dimensions are - * taken into consideration for calculations. + * Bounding box template that will contain the Slider's DOM subtree. <span>s are used to support inline-block styling. * - * @method syncUI + * @property BOUNDING_TEMPLATE + * @type {String} + * @default <span></span> */ - syncUI : function () { - this.get(CONTENT_BOX).removeClass(C_IMAGE_ERROR); - - var img = this.get(THUMB_IMAGE); - - if (this._isImageLoading(img)) { - // Schedule the sync for when the image loads/errors - this._scheduleSync(); - } else { - this._ready(img,!this._isImageLoaded(img)); - } - }, + BOUNDING_TEMPLATE : '', /** - * Binds to the load and error event on the thumbImage to sync the DOM - * state with the attribute settings when the image resource is resolved. - * The Slider is disabled while it waits. + * Content box template that will contain the Slider's rail and thumb. * - * @method _scheduleSync - * @protected + * @property CONTENT_TEMPLATE + * @type {String} + * @default <span></span> */ - _scheduleSync : function () { - var img, handler; - - if (!this._stall) { - // disable the control until the image is loaded - this._disabled = this.get(DISABLED); - this.set(DISABLED,true); - this._stall = this.on(DISABLED_CHANGE,this._stallDisabledChange); - - img = this.get(THUMB_IMAGE); - handler = Y.bind(this._imageLoaded,this,img); - img.on('load', handler); - img.on('error',handler); - } - }, + CONTENT_TEMPLATE : '', /** - * Method subscribed to the disabledChange event when thumbImage is being - * loaded. Prevents manually enabling the Slider until the thumbImage - * resource is resolved. Intended value is stored during load and set upon - * completion. + * Rail template that will contain the end caps and the thumb. + * {placeholder}s are used for template substitution at render time. * - * @method _stallDisabledChange - * @param e {Event} Change event for the disabled attribute - * @protected + * @property RAIL_TEMPLATE + * @type {String} + * @default <span class="{railClass}"><span class="{railMinCapClass}"></span><span class="{railMaxCapClass}"></span></span> */ - _stallDisabledChange : function (e) { - this._disabled = e.newVal; - e.preventDefault(); - }, + RAIL_TEMPLATE : '' + + '' + + '' + + '', /** - * Event handler assigned to the thumbImage's load and error event if it - * was not loaded prior to instantiation. Restores the disabled value. + * Thumb template that will contain the thumb image and shadow. <img> + * tags are used instead of background images to avoid a flicker bug in IE. + * {placeholder}s are used for template substitution at render time. * - * @method _imageLoaded - * @param img {Node} The thumbImage Node - * @param e {Event} load or error event fired by the thumbImage - * @protected + * @property THUMB_TEMPLATE + * @type {String} + * @default <span class="{thumbClass}" tabindex="-1"><img src="{thumbShadowUrl}" alt="Slider thumb shadow" class="{thumbShadowClass}"><img src="{thumbImageUrl}" alt="Slider thumb" class="{thumbImageClass}"></span> */ - _imageLoaded : function (img,e) { - var error = (e.type.toLowerCase().indexOf('error') > -1); - - // Need to execute inside a setTimeout because IE doesn't report - // img.complete === true until after the img.onload handler - // @TODO: readyState reports correctly in onload. Lose this wrapper - // and use that in _isImageLoaded. - Y.later(0, this, function () { - if (this._stall) { - this._stall.detach(); - } + THUMB_TEMPLATE : '' + + '' + + '' + + '' +}, { - this._stall = false; - - this._ready(img,error); - - this.set(DISABLED,this._disabled); - }); - }, + // Y.SliderBase static properties /** - * Applies a class to the content box if the thumbImage failed to resolve, - * the fires the internal sync event triggering a sync between UI and - * state. + * The identity of the widget. * - * @method _ready - * @param img {Node} the thumbImage Node - * @param error {Boolean} Indicates an error while loading the thumbImage + * @property SliderBase.NAME + * @type String + * @default 'sliderBase' + * @readOnly * @protected + * @static */ - _ready : function (img,error) { - var method = error ? 'addClass' : 'removeClass'; - - // If the thumb image url results in 404, assign a class to provide - // default thumb dimensions/UI - this.get(CONTENT_BOX)[method](C_IMAGE_ERROR); - - this.fire(SYNC); - }, + NAME : 'sliderBase', /** - * The default synchronization behavior, updating the Slider's DOM state to - * match the current attribute values. + * Static property used to define the default attribute configuration of + * the Widget. * - * @method _defSyncFn - * @param e {Event} Internal sync event + * @property SliderBase.ATTRS + * @type {Object} * @protected + * @static */ - _defSyncFn : function (e) { - this._uiSetThumbSize(); - - this._setThumbOffset(); - - this._uiSetRailSize(); - - this._setRailOffsetXY(); - - this._setDDGutter(); - - this._resetDDCacheRegion(); - - this._setFactor(); - - var val = this.get(VALUE); - - this.fire(POSITION_THUMB, { - value : val, - offset : this._convertValueToOffset(val) - }); - - // Forces a reflow of the bounding box to address IE8 inline-block - // container not expanding correctly. bug 2527905 - this.get('boundingBox').toggleClass(''); - }, - - /** - * Captures the thumb's pixel height or width (depending on the Slider's - * axis) for use in positioning calculations. - * - * @method _uiSetThumbSize - * @protected - */ - _uiSetThumbSize : function () { - var thumb = this.get(THUMB), - dim = this._key.dim, - img = this.get(THUMB_IMAGE), - size; - - // offsetWidth fails in hidden containers - size = parseInt(thumb.getComputedStyle(dim),10); + ATTRS : { + /** + * Axis upon which the Slider's thumb moves. "x" for + * horizontal, "y" for vertical. + * + * @attribute axis + * @type {String} + * @default "x" + * @writeOnce + */ + axis : { + value : 'x', + writeOnce : true, + setter : '_setAxis', + lazyAdd : false + }, - if (img && this._isImageLoaded(img)) { + /** + * The length of the rail (exclusive of the end caps if positioned by + * CSS). This corresponds to the movable range of the thumb. + * + * @attribute length + * @type {String | Number} e.g. "200px" or 200 + * @default 150px + */ + length: { + value: '150px', + setter: '_setLength' + }, - size = img.get(dim); + /** + * Path to the thumb image. This will be used as both the thumb and + * shadow as a sprite. Defaults at render() to thumb-x.png or + * thumb-y.png in the skin directory of the current skin. + * + * @attribute thumbUrl + * @type {String} + * @default thumb-x.png or thumb-y.png in the sam skin directory of the + * current build path for Slider + */ + thumbUrl: { + value: null, + validator: Y.Lang.isString } - - this._thumbSize = size; - }, - - /** - * Establishes the point in the thumb that should align to the rail - * position representing the calculated value. - * - * @method _setThumbOffset - * @protected - */ - _setThumbOffset : function () { - this._thumbOffset = floor(this._thumbSize / 2); - }, - - /** - * Stores the rail Node's pixel height or width, depending on the Slider's - * axis, for use in calculating thumb position from the value. - * - * @method _uiSetRailSize - * @protected - */ - _uiSetRailSize : function () { - var rail = this.get(RAIL), - thumb = this.get(THUMB), - img = this.get(THUMB_IMAGE), - dim = this._key.dim, - size = this.get(RAIL_SIZE), - setxy = false; - - if (parseInt(size,10)) { - - // Convert to pixels - rail.setStyle(dim,size); - size = parseInt(rail.getComputedStyle(dim),10); - - } else { - // Default from height or width (axis respective), or dims assigned - // via css to the rail or thumb, whichever is largest. - // Dear implementers, please use railSize, not height/width to - // set the rail dims - size = this.get(dim); - if (parseInt(size,10)) { - setxy = true; - rail.setStyle(dim,size); - size = parseInt(rail.getComputedStyle(dim),10); - } - size = max( - size|0, - parseInt(thumb.getComputedStyle(dim),10), - parseInt(rail.getComputedStyle(dim),10)); + } +}); - if (img && this._isImageLoaded(img)) { +}, '3.3.0' ,{requires:['widget', 'substitute', 'dd-constrain']}); +YUI.add('slider-value-range', function(Y) { - size = max(img.get(dim),size); - } - } +/** + * Adds value support for Slider as a range of integers between a configured + * minimum and maximum value. For use with Y.Base.build(..) to + * add the plumbing to Y.SliderBase. + * + * @module slider + * @submodule slider-value-range + */ - rail.setStyle(dim, size + PX); +// Constants for compression or performance +var MIN = 'min', + MAX = 'max', + VALUE = 'value', - this._railSize = size; + round = Math.round; - // handle the (not recommended) fallback case of setting rail size via - // widget height/width params. This is the only case that sets the - // off-axis rail dim in the code. - if (setxy) { - dim = this._key.offAxisDim; - size = this.get(dim); - if (size) { - rail.set(dim,size); - } - } - }, +/** + * One class of value algorithm that can be built onto SliderBase. By default, + * values range between 0 and 100, but you can configure these on the + * built Slider class by setting the min and max + * configurations. Set the initial value (will cause the thumb to move to the + * appropriate location on the rail) in configuration as well if appropriate. + * + * @class SliderValueRange + */ +function SliderValueRange() { + this._initSliderValueRange(); +} - /** - * Store the current XY position of the rail Node on the page. For use in - * calculating thumb position from value. - * - * @method _setRailOffsetXY - * @protected - */ - _setRailOffsetXY : function () { - this._offsetXY = this.get(RAIL).getXY()[this._key.xyIndex] + - this.get(MIN_GUTTER); - }, +Y.SliderValueRange = Y.mix( SliderValueRange, { - /** - * Passes the gutter attribute value to the DDConstrain gutter attribute. - * - * @method _setDDGutter - * @protected - */ - _setDDGutter : function () { - var gutter = this._key.xyIndex ? - this.get(MIN_GUTTER) + " 0 " + this.get(MAX_GUTTER) : - "0 " + this.get(MAX_GUTTER) + " 0 " + this.get(MIN_GUTTER); + // Prototype properties and methods that will be added onto host class + prototype: { + /** + * Factor used to translate value -> position -> value. + * + * @property _factor + * @type {Number} + * @protected + */ + _factor: 1, - this._dd.con.set('gutter', gutter); - }, + /** + * Stub for construction logic. Override if extending this class and + * you need to set something up during the initializer phase. + * + * @method _initSliderValueRange + * @protected + */ + _initSliderValueRange: function () {}, - /** - * Resets the cached region inside the DD constrain instance to support - * repositioning the Slider after instantiation. - * - * @method _resetDDCacheRegion - * @protected - */ - _resetDDCacheRegion : function () { - // Workaround for ticket #2527964 - this._dd.con._cacheRegion(); - }, + /** + * Override of stub method in SliderBase that is called at the end of + * its bindUI stage of render(). Subscribes to internal events to + * trigger UI and related state updates. + * + * @method _bindValueLogic + * @protected + */ + _bindValueLogic: function () { + this.after( { + minChange : this._afterMinChange, + maxChange : this._afterMaxChange, + valueChange: this._afterValueChange + } ); + }, - /** - * Calculates the multiplier used to translate the value into a thumb - * position. - * - * @method _setFactor - * @protected - */ - _setFactor : function () { - var range = this._railSize - this._thumbSize - - this.get(MIN_GUTTER) - this.get(MAX_GUTTER); + /** + * Move the thumb to appropriate position if necessary. Also resets + * the cached offsets and recalculates the conversion factor to + * translate position to value. + * + * @method _syncThumbPosition + * @protected + */ + _syncThumbPosition: function () { + this._calculateFactor(); - this._factor = this._railSize ? - (this.get(MAX) - this.get(MIN)) / range : - 1; + this._setPosition( this.get( VALUE ) ); + }, - }, + /** + * Calculates and caches + * (range between max and min) / (rail length) + * for fast runtime calculation of position -> value. + * + * @method _calculateFactor + * @protected + */ + _calculateFactor: function () { + var length = this.get( 'length' ), + thumbSize = this.thumb.getStyle( this._key.dim ), + min = this.get( MIN ), + max = this.get( MAX ); - /** - * Convenience method for accessing the current value of the Slider. - * Equivalent to slider.get("value"). - * - * @method getValue - * @return {Number} the value - */ - getValue : function () { - return this.get(VALUE); - }, + // The default thumb width is based on Sam skin's thumb dimension. + // This attempts to allow for rendering off-DOM, then attaching + // without the need to call syncUI(). It is still recommended + // to call syncUI() in these cases though, just to be sure. + length = parseFloat( length, 10 ) || 150; + thumbSize = parseFloat( thumbSize, 10 ) || 15; - /** - * Convenience method for updating the current value of the Slider. - * Equivalent to slider.set("value",val). - * - * @method setValue - * @param val {Number} the new value - */ - setValue : function (val) { - this.set(VALUE,val); - }, + this._factor = ( max - min ) / ( length - thumbSize ); - /** - * Validator applied to new values for the axis attribute. Only - * "x" and "y" are permitted. - * - * @method _validateNewAxis - * @param v {String} proposed value for the axis attribute - * @return Boolean - * @protected - */ - _validateNewAxis : function (v) { - return isString(v) && 'xXyY'.indexOf(v.charAt(0)) > -1; - }, + }, - /** - * Validator applied to the min attribute. - * - * @method _validateNewMin - * @param v {MIXED} proposed value for the min attribute - * @return Boolean - * @protected - */ - _validateNewMin : function (v) { - return isNumber(v); - }, + /** + * Dispatch the new position of the thumb into the value setting + * operations. + * + * @method _defThumbMoveFn + * @param e { EventFacade } The host's thumbMove event + * @protected + */ + _defThumbMoveFn: function ( e ) { + var previous = this.get( VALUE ), + value = this._offsetToValue( e.offset ); + + // This test avoids duplication of this.set(..) if the origin + // of this thumbMove is from slider.set('value',x); + // slider.set() -> afterValueChange -> uiMoveThumb -> + // fire(thumbMove) -> _defThumbMoveFn -> this.set() + if ( previous !== value ) { + this.set( VALUE, value, { positioned: true } ); + } + }, - /** - * Validator applied to the max attribute. - * - * @method _validateNewMax - * @param v {MIXED} proposed value for the max attribute - * @return Boolean - * @protected - */ - _validateNewMax : function (v) { - return isNumber(v); - }, + /** + *

          Converts a pixel position into a value. Calculates current + * thumb offset from the leading edge of the rail multiplied by the + * ratio of (max - min) / (constraining dim).

          + * + *

          Override this if you want to use a different value mapping + * algorithm.

          + * + * @method _offsetToValue + * @param offset { Number } X or Y pixel offset + * @return { mixed } Value corresponding to the provided pixel offset + * @protected + */ + _offsetToValue: function ( offset ) { - /** - * Validator applied to the value attribute. - * - * @method _validateNewValue - * @param v {MIXED} proposed value for the value attribute - * @return Boolean - * @protected - */ - _validateNewValue : function (v) { - var min = this.get(MIN), - max = this.get(MAX); + var value = round( offset * this._factor ) + this.get( MIN ); - return isNumber(v) && - (min < max ? (v >= min && v <= max) : (v >= max && v <= min)); - }, + return round( this._nearestValue( value ) ); + }, - /** - * Validator applied to the rail attribute. Rejects all values after the - * Slider has been rendered. - * - * @method _validateNewRail - * @param v {MIXED} proposed value for the rail attribute - * @return Boolean - * @protected - */ - _validateNewRail : function (v) { - return !this.get(RENDERED) || v; - }, + /** + * Converts a value into a pixel offset for use in positioning + * the thumb according to the reverse of the + * _offsetToValue( xy ) operation. + * + * @method _valueToOffset + * @param val { Number } The value to map to pixel X or Y position + * @return { Number } The pixel offset + * @protected + */ + _valueToOffset: function ( value ) { + var offset = round( ( value - this.get( MIN ) ) / this._factor ); - /** - * Validator applied to the thumb attribute. Rejects all values after the - * Slider has been rendered. - * - * @method _validateNewThumb - * @param v {MIXED} proposed value for the thumb attribute - * @return Boolean - * @protected - */ - _validateNewThumb : function (v) { - return !this.get(RENDERED) || v; - }, + return offset; + }, - /** - * Validator applied to the thumbImage attribute. Rejects all values after - * the Slider has been rendered. - * - * @method _validateNewThumbImage - * @param v {MIXED} proposed value for the thumbImage attribute - * @return Boolean - * @protected - */ - _validateNewThumbImage : function (v) { - return !this.get(RENDERED) || v; - }, + /** + * Returns the current value. Override this if you want to introduce + * output formatting. Otherwise equivalent to slider.get( "value" ); + * + * @method getValue + * @return {Number} + */ + getValue: function () { + return this.get( VALUE ); + }, - /** - * Validator applied to the railSize attribute. Only strings of css size - * values (e.g. '200px') are allowed. - * - * @method _validateNewRailSize - * @param v {String} proposed value for the railSize attribute - * @return Boolean - * @protected - */ - _validateNewRailSize : function (v) { - return isString(v) && - (v === '0' || /^\d+(?:p[xtc]|%|e[mx]|in|[mc]m)$/.test(v)); - }, + /** + * Updates the current value. Override this if you want to introduce + * input value parsing or preprocessing. Otherwise equivalent to + * slider.set( "value", v ); + * + * @method setValue + * @param val {Number} The new value + * @return {Slider} + * @chainable + */ + setValue: function ( val ) { + return this.set( VALUE, val ); + }, - /** - * Setter applied to the input when updating the axis attribute. - * - * @method _setAxisFn - * @param v {String} proposed value for the axis attribute - * @return {String} lowercased first character of the input string - * @protected - */ - _setAxisFn : function (v) { - return v.charAt(0).toLowerCase(); - }, + /** + * Update position according to new min value. If the new min results + * in the current value being out of range, the value is set to the + * closer of min or max. + * + * @method _afterMinChange + * @param e { EventFacade } The min attribute change event. + * @protected + */ + _afterMinChange: function ( e ) { + this._verifyValue(); - /** - * Setter applied to the input when updating the rail attribute. Input can - * be a Node, raw HTMLElement, or a selector string to locate it. - * - * @method _setRailFn - * @param v {Node|String|HTMLElement} The rail element Node or selector - * @return {Node} The Node if found. Otherwise null. - * @protected - */ - _setRailFn : function (v) { - return Y.get(v) || null; - }, + this._syncThumbPosition(); + }, - /** - * Setter applied to the input when updating the thumb attribute. Input can - * be a Node, raw HTMLElement, or a selector string to locate it. - * - * @method _setThumbFn - * @param v {Node|String|HTMLElement} The thumb element Node or selector - * @return {Node} The Node if found. Otherwise null. - * @protected - */ - _setThumbFn : function (v) { - return Y.get(v) || null; - }, + /** + * Update position according to new max value. If the new max results + * in the current value being out of range, the value is set to the + * closer of min or max. + * + * @method _afterMaxChange + * @param e { EventFacade } The max attribute change event. + * @protected + */ + _afterMaxChange: function ( e ) { + this._verifyValue(); - /** - * Setter applied to the input when updating the thumbImage attribute. - * Input can be a Node, raw HTMLElement, selector string to locate it, or - * the URL for an image resource. - * - * String input will be treated as a selector. If no element is found using - * the selector, an img Node will be created with the string - * used as the src attribute. - * - * @method _setThumbImageFn - * @param v {Node|String|HTMLElement} The thumbImage element Node, selector, - * or image URL - * @return {Node} The Node if found or created. Otherwise null. - * @protected - */ - _setThumbImageFn : function (v) { - return v ? Y.get(v) || - Y.Node.create('Slider thumb') : - null; - }, + this._syncThumbPosition(); + }, + /** + * Verifies that the current value is within the min - max range. If + * not, value is set to either min or max, depending on which is + * closer. + * + * @method _verifyValue + * @protected + */ + _verifyValue: function () { + var value = this.get( VALUE ), + nearest = this._nearestValue( value ); + + if ( value !== nearest ) { + // @TODO Can/should valueChange, minChange, etc be queued + // events? To make dd.set( 'min', n ); execute after minChange + // subscribers before on/after valueChange subscribers. + this.set( VALUE, nearest ); + } + }, - /** - * Caches the current page position of the rail element and fires the - * slideStart event in response to the DD's drag:start. - * - * @method _onDDStartDrag - * @param e {Event} the DD instance's drag:start custom event - * @protected - */ - _onDDStartDrag : function (e) { - this._setRailOffsetXY(); - this.fire(SLIDE_START,{ ddEvent: e }); - }, + /** + * Propagate change to the thumb position unless the change originated + * from the thumbMove event. + * + * @method _afterValueChange + * @param e { EventFacade } The valueChange event. + * @protected + */ + _afterValueChange: function ( e ) { + if ( !e.positioned ) { + this._setPosition( e.newVal ); + } + }, - /** - * Fires the thumbDrag event to queue Slider value update. - * - * @method _onDDDrag - * @param e {Event} the DD instance's drag:drag custom event - * @protected - */ - _onDDDrag : function (e) { - this.fire(THUMB_DRAG, { ddEvent: e }); - }, + /** + * Positions the thumb in accordance with the translated value. + * + * @method _setPosition + * @protected + */ + _setPosition: function ( value ) { + this._uiMoveThumb( this._valueToOffset( value ) ); + }, - /** - * The default value update behavior in response to Slider thumb - * interaction. Calculates the value using stored offsets, the _factor - * multiplier and the min value. - * - * @method _defThumbDragFn - * @param e {Event} the internal thumbDrag event - * @protected - */ - _defThumbDragFn : function (e) { - var before = this.get(VALUE), - val = e.ddEvent[this._key.eventPageAxis] - this._offsetXY; + /** + * Validates new values assigned to min attribute. Numbers + * are acceptable. Override this to enforce different rules. + * + * @method _validateNewMin + * @param value { mixed } Value assigned to min attribute. + * @return { Boolean } True for numbers. False otherwise. + * @protected + */ + _validateNewMin: function ( value ) { + return Y.Lang.isNumber( value ); + }, + /** + * Validates new values assigned to max attribute. Numbers + * are acceptable. Override this to enforce different rules. + * + * @method _validateNewMax + * @param value { mixed } Value assigned to max attribute. + * @return { Boolean } True for numbers. False otherwise. + * @protected + */ + _validateNewMax: function ( value ) { + return Y.Lang.isNumber( value ); + }, - val = this._convertOffsetToValue(val); + /** + * Restricts new values assigned to value attribute to be + * between the configured min and max. + * Rounds to nearest integer value. + * + * @method _setNewValue + * @param value { Number } Value assigned to value attribute + * @return { Number } Normalized and constrained value + * @protected + */ + _setNewValue: function ( value ) { + return round( this._nearestValue( value ) ); + }, - if (before !== val) { - this.set(VALUE, val, { ddEvent: e.ddEvent }); + /** + * Returns the nearest valid value to the value input. If the provided + * value is outside the min - max range, accounting for min > max + * scenarios, the nearest of either min or max is returned. Otherwise, + * the provided value is returned. + * + * @method _nearestValue + * @param value { mixed } Value to test against current min - max range + * @return { Number } Current min, max, or value if within range + * @protected + */ + _nearestValue: function ( value ) { + var min = this.get( MIN ), + max = this.get( MAX ), + tmp; + + // Account for reverse value range (min > max) + tmp = ( max > min ) ? max : min; + min = ( max > min ) ? min : max; + max = tmp; + + return ( value < min ) ? + min : + ( value > max ) ? + max : + value; } - }, - /** - * Fires the slideEnd event. - * - * @method _onDDEndDrag - * @param e {Event} the DD instance's drag:end custom event - * @protected - */ - _onDDEndDrag : function (e) { - this.fire(SLIDE_END,{ ddEvent: e }); }, - - - /** - * Calls _uiPositionThumb with the value of the custom event's - * "offset" property. + * Attributes that will be added onto host class. * - * @method _defPositionThumbFn - * @param e {Event} the positionThumb custom event + * @property ATTRS + * @type {Object} + * @static * @protected */ - _defPositionThumbFn : function (e) { + ATTRS: { + /** + * The value associated with the farthest top, left position of the + * rail. Can be greater than the configured max if you + * want values to increase from right-to-left or bottom-to-top. + * + * @attribute min + * @type { Number } + * @default 0 + */ + min: { + value : 0, + validator: '_validateNewMin' + }, - this._uiPositionThumb(e.offset); - }, + /** + * The value associated with the farthest bottom, right position of + * the rail. Can be less than the configured min if + * you want values to increase from right-to-left or bottom-to-top. + * + * @attribute max + * @type { Number } + * @default 100 + */ + max: { + value : 100, + validator: '_validateNewMax' + }, - /** - * Places the thumb at a particular X or Y location based on the configured - * axis. - * - * @method _uiPositionThumb - * @param xy {Number} the desired left or top pixel position of the thumb - * in relation to the rail Node. - * @protected - */ - _uiPositionThumb : function (xy) { - var dd = this._dd, - thumb = dd.get('dragNode'), - hidden = thumb.ancestor(this._isDisplayNone); + /** + * The value associated with the thumb's current position on the + * rail. Defaults to the value inferred from the thumb's current + * position. Specifying value in the constructor will move the + * thumb to the position that corresponds to the supplied value. + * + * @attribute value + * @type { Number } + * @default (inferred from current thumb position) + */ + value: { + value : 0, + setter: '_setNewValue' + } + } +}, true ); - if (!hidden) { - dd._setStartPosition(dd.get('dragNode').getXY()); - // stickX/stickY config on DD instance will negate off-axis move - dd._alignNode([xy,xy],true); - } - }, +}, '3.3.0' ,{requires:['slider-base']}); +YUI.add('clickable-rail', function(Y) { - /** - * Helper function to search up the ancestor axis looking for a node with - * style display: none. This is passed as a function to node.ancestor(..) - * to test if a given node is in the displayed DOM and can get accurate - * positioning information. - * - * @method _isDisplayNone - * @param el {Node} ancestor node as the function walks up the parent axis - * @return {Boolean} true if the node is styled with display: none - * @protected - */ - _isDisplayNone : function (node) { - return node.getComputedStyle('display') === 'none'; - }, +/** + * Adds support for mouse interaction with the Slider rail triggering thumb + * movement. + * + * @module slider + * @submodule clickable-rail + */ - /** - * Fires the internal positionThumb event in response to a change in the - * value attribute. - * - * @method _afterValueChange - * @param e {Event} valueChange custom event - * @protected - */ - _afterValueChange : function (e) { - if (!e.ddEvent) { - var xy = this._convertValueToOffset(e.newVal); +/** + * Slider extension that allows clicking on the Slider's rail element, + * triggering the thumb to align with the location of the click. + * + * @class ClickableRail + */ +function ClickableRail() { + this._initClickableRail(); +} +Y.ClickableRail = Y.mix(ClickableRail, { - this.fire(POSITION_THUMB,{ value: e.newVal, offset: xy }); - } - }, + // Prototype methods added to host class + prototype: { - /** - * Converts a value to a pixel offset for the thumb position on the rail. - * - * @method _convertValueToOffset - * @param v {Number} value between the Slider's min and max - * @protected - */ - _convertValueToOffset : function (v) { - return round((v - this.get(MIN)) / this._factor) + this._offsetXY; - }, + /** + * Initializes the internal state and sets up events. + * + * @method _initClickableRail + * @protected + */ + _initClickableRail: function () { + this._evtGuid = this._evtGuid || (Y.guid() + '|'); + + /** + * Broadcasts when the rail has received a mousedown event and + * triggers the thumb positioning. Use + * e.preventDefault() or + * set("clickableRail", false) to prevent + * the thumb positioning. + * + * @event railMouseDown + * @preventable _defRailMouseDownFn + */ + this.publish('railMouseDown', { + defaultFn: this._defRailMouseDownFn + }); + + this.after('render', this._bindClickableRail); + this.on('destroy', this._unbindClickableRail); + }, - /** - * Converts a pixel offset of the thumb on the rail to a value. - * - * @method _convertOffsetToValue - * @param v {Number} pixel offset of the thumb on the rail - * @protected - */ - _convertOffsetToValue : function (v) { - return round(this.get(MIN) + (v * this._factor)); - }, + /** + * Attaches DOM event subscribers to support rail interaction. + * + * @method _bindClickableRail + * @protected + */ + _bindClickableRail: function () { + this._dd.addHandle(this.rail); - /** - * Replaces the thumb Node in response to a change in the thumb attribute. - * This only has effect after the Slider is rendered. - * - * @method _afterThumbChange - * @param e {Event} thumbChange custom event - * @protected - */ - _afterThumbChange : function (e) { - var thumb; + this.rail.on(this._evtGuid + Y.DD.Drag.START_EVENT, + Y.bind(this._onRailMouseDown, this)); + }, - if (this.get(RENDERED)) { - if (e.prevValue) { - e.prevValue.get('parentNode').removeChild(e.prevValue); - } + /** + * Detaches DOM event subscribers for cleanup/destruction cycle. + * + * @method _unbindClickableRail + * @protected + */ + _unbindClickableRail: function () { + if (this.get('rendered')) { + var contentBox = this.get('contentBox'), + rail = contentBox.one('.' + this.getClassName('rail')); - this._initThumb(); - - thumb = this.get(THUMB); - this._dd.set('node',thumb); - this._dd.set('dragNode',thumb); + rail.detach(this.evtGuid + '*'); + } + }, - this.syncUI(); - } - }, + /** + * Dispatches the railMouseDown event. + * + * @method _onRailMouseDown + * @param e {DOMEvent} the mousedown event object + * @protected + */ + _onRailMouseDown: function (e) { + if (this.get('clickableRail') && !this.get('disabled')) { + this.fire('railMouseDown', { ev: e }); + } + }, - /** - * Sets or replaces the thumb's contained img Node with the - * new Node in response to a change in the thumbImage attribute. This only - * has effect after the Slider is rendered. - * - * @method _afterThumbImageChange - * @param e {Event} thumbImageChange custom event - * @protected - */ - _afterThumbImageChange : function (e) { - if (this.get(RENDERED)) { - if (e.prevValue) { - e.prevValue.get('parentNode').removeChild(e.prevValue); + /** + * Default behavior for the railMouseDown event. Centers the thumb at + * the click location and passes control to the DDM to behave as though + * the thumb itself were clicked in preparation for a drag operation. + * + * @method _defRailMouseDownFn + * @param e {Event} the EventFacade for the railMouseDown custom event + * @protected + */ + _defRailMouseDownFn: function (e) { + e = e.ev; + + // Logic that determines which thumb should be used is abstracted + // to someday support multi-thumb sliders + var dd = this._resolveThumb(e), + i = this._key.xyIndex, + length = parseFloat(this.get('length'), 10), + thumb, + thumbSize, + xy; + + if (dd) { + thumb = dd.get('dragNode'); + thumbSize = parseFloat(thumb.getStyle(this._key.dim), 10); + + // Step 1. Allow for aligning to thumb center or edge, etc + xy = this._getThumbDestination(e, thumb); + + // Step 2. Remove page offsets to give just top/left style val + xy = xy[ i ] - this.rail.getXY()[i]; + + // Step 3. Constrain within the rail in case of attempt to + // center the thumb when clicking on the end of the rail + xy = Math.min( + Math.max(xy, 0), + (length - thumbSize)); + + this._uiMoveThumb(xy); + + // Set e.target for DD's IE9 patch which calls + // e.target._node.setCapture() to allow imgs to be dragged. + // Without this, setCapture is called from the rail and rail + // clicks on other Sliders may have their thumb movements + // overridden by a different Slider (the thumb on the wrong + // Slider moves). + e.target = this.thumb.one('img') || this.thumb; + + // Delegate to DD's natural behavior + dd._handleMouseDownEvent(e); + + // TODO: this won't trigger a slideEnd if the rail is clicked + // check if dd._move(e); dd._dragThreshMet = true; dd.start(); + // will do the trick. Is that even a good idea? } + }, - this._initThumbImage(); - - this.syncUI(); + /** + * Resolves which thumb to actuate if any. Override this if you want to + * support multiple thumbs. By default, returns the Drag instance for + * the thumb stored by the Slider. + * + * @method _resolveThumb + * @param e {DOMEvent} the mousedown event object + * @return {Y.DD.Drag} the Drag instance that should be moved + * @protected + */ + _resolveThumb: function (e) { + /* Temporary workaround + var primaryOnly = this._dd.get('primaryButtonOnly'), + validClick = !primaryOnly || e.button <= 1; + + return (validClick) ? this._dd : null; + */ + return this._dd; + }, + + /** + * Calculates the top left position the thumb should be moved to to + * align the click XY with the center of the specified node. + * + * @method _getThumbDestination + * @param e {DOMEvent} The mousedown event object + * @param node {Node} The node to position + * @return {Array} the [top, left] pixel position of the destination + * @protected + */ + _getThumbDestination: function (e, node) { + var offsetWidth = node.get('offsetWidth'), + offsetHeight = node.get('offsetHeight'); + + // center + return [ + (e.pageX - Math.round((offsetWidth / 2))), + (e.pageY - Math.round((offsetHeight / 2))) + ]; } - }, - /** - * Updates the Slider UI in response to change in the min attribute. - * - * @method _afterMinChange - * @param e {Event} minChange custom event - * @protected - */ - _afterMinChange : function (e) { - this._refresh(e); }, - /** - * Updates the Slider UI in response to change in the max attribute. - * - * @method _afterMaxChange - * @param e {Event} maxChange custom event - * @protected - */ - _afterMaxChange : function (e) { - this._refresh(e); - }, + // Static properties added onto host class + ATTRS: { + /** + * Enable or disable clickable rail support. + * + * @attribute clickableRail + * @type {Boolean} + * @default true + */ + clickableRail: { + value: true, + validator: Y.Lang.isBoolean + } + } - /** - * Updates the Slider UI in response to change in the railSize attribute. - * - * @method _afterRailSizeChange - * @param e {Event} railSizeChange custom event - * @protected - */ - _afterRailSizeChange : function (e) { - this._refresh(e); - }, +}, true); - /** - * Locks or unlocks the DD instance in response to a change in the disabled - * attribute. - * - * @method _afterDisabledChange - * @param e {Event} disabledChange custom event - * @protected - */ - _afterDisabledChange : function (e) { - if (this._dd) { - this._dd.set('lock',e.newVal); - } - }, - /** - * Common handler to call syncUI in response to change events that occurred - * after the Slider is rendered. - * - * @method _refresh - * @param e {Event} An attribute change event - * @protected - */ - _refresh : function (e) { - if (e.newVal !== e.prevVal && this.get(RENDERED)) { - this.syncUI(); - } - }, +}, '3.3.0' ,{requires:['slider-base']}); +YUI.add('range-slider', function(Y) { - /** - * Used to determine if there is a current or pending request for the - * thumbImage resource. - * - * @method _isImageLoading - * @param img {Node} img Node - * @return Boolean - * @protected - */ - _isImageLoading : function (img) { - return img && !img.get(COMPLETE); - }, +/** + * Create a sliding value range input visualized as a draggable thumb on a + * background rail element. + * + * @module slider + * @submodule range-slider + */ - /** - * Used to determine if the image resource loaded successfully or there was - * an error. - * - * NOTES: - *
            - *
          • img load error fired xbrowser for image resources not yet resolved
          • - *
          • img.complete reports false in IE for images not yet loaded as well as images that failed to load
          • - *
          • img.complete true && img.naturalWidth == 0 in FF and Safari indicate image failed to load
          • - *
          • img.complete && img.width == 0 in Opera indicates image failed to load
          • - *
          - * - * @method _isImageLoaded - * @param img {Node} img Node - * @return Boolean - * @protected - */ - _isImageLoaded : function (img) { - if (img) { - var w = img.get('naturalWidth'); - return img.get(COMPLETE) && (!isNumber(w) ? img.get(WIDTH) : w); - } +/** + * Create a slider to represent an integer value between a given minimum and + * maximum. Sliders may be aligned vertically or horizontally, based on the + * axis configuration. + * + * @class Slider + * @constructor + * @extends SliderBase + * @uses SliderValueRange + * @uses ClickableRail + * @param config {Object} Configuration object + */ +Y.Slider = Y.Base.build( 'slider', Y.SliderBase, + [ Y.SliderValueRange, Y.ClickableRail ] ); - return true; - } -}); +}, '3.3.0' ,{requires:['slider-base', 'clickable-rail', 'slider-value-range']}); -Y.Slider = Slider; +YUI.add('slider', function(Y){}, '3.3.0' ,{use:['slider-base', 'slider-value-range', 'clickable-rail', 'range-slider']}); -}, '3.0.0' ,{requires:['widget','dd-constrain']}); diff --git a/jssource/src_files/include/javascript/yui3/build/sortable/sortable-min.js b/jssource/src_files/include/javascript/yui3/build/sortable/sortable-min.js new file mode 100644 index 00000000..d408b492 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/sortable/sortable-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("sortable",function(A){var C=function(L){C.superclass.constructor.apply(this,arguments);},F="currentNode",D="opacityNode",I="container",E="id",J="zIndex",K="opacity",H="parentNode",G="nodes",B="node";A.extend(C,A.Base,{delegate:null,initializer:function(){var O="sortable-"+A.guid(),N,M={container:this.get(I),nodes:this.get(G),target:true,invalid:this.get("invalid"),dragConfig:{groups:[O]}},L;if(this.get("handles")){M.handles=this.get("handles");}L=new A.DD.Delegate(M);this.set(E,O);L.dd.plug(A.Plugin.DDProxy,{moveOnEnd:false,cloneNode:true});N=new A.DD.Drop({node:this.get(I),bubbleTarget:L,groups:L.dd.get("groups")}).on("drop:over",A.bind(this._onDropOver,this));L.on({"drag:start":A.bind(this._onDragStart,this),"drag:end":A.bind(this._onDragEnd,this),"drag:over":A.bind(this._onDragOver,this),"drag:drag":A.bind(this._onDrag,this)});this.delegate=L;C.reg(this);},_up:null,_y:null,_onDrag:function(L){if(L.pageYthis._y){this._up=false;}}this._y=L.pageY;},_onDropOver:function(M){if(!M.drop.get(B).test(this.get(G))){var L=M.drop.get(B).all(this.get(G));if(L.size()===0){M.drop.get(B).append(M.drag.get(B));}}},_onDragOver:function(R){if(!R.drop.get(B).test(this.get(G))){return;}if(R.drag.get(B)==R.drop.get(B)){return;}if(R.drag.get(B).contains(R.drop.get(B))){return;}var S=false,M,Q,O,N,L,P=this.get("moveType").toLowerCase();if(R.drag.get(B).get(H).contains(R.drop.get(B))){S=true;}if(S&&P=="move"){P="insert";}switch(P){case"insert":M=((this._up)?"before":"after");L=R.drop.get(B);if(A.Sortable._test(L,this.get(I))){L.append(R.drag.get(B));}else{L.insert(R.drag.get(B),M);}break;case"swap":A.DD.DDM.swapNode(R.drag,R.drop);break;case"move":case"copy":N=A.Sortable.getSortable(R.drop.get(B).get(H));if(!N){return;}A.DD.DDM.getDrop(R.drag.get(B)).addToGroup(N.get(E));if(S){A.DD.DDM.swapNode(R.drag,R.drop);}else{if(this.get("moveType")=="copy"){Q=R.drag.get(B);O=Q.cloneNode(true);O.set(E,"");R.drag.set(B,O);N.delegate.createDrop(O,[N.get(E)]);Q.setStyles({top:"",left:""});}R.drop.get(B).insert(R.drag.get(B),"before");}break;}this.fire(P,{same:S,drag:R.drag,drop:R.drop});this.fire("moved",{same:S,drag:R.drag,drop:R.drop});},_onDragStart:function(L){this.delegate.get("lastNode").setStyle(J,"");this.delegate.get(this.get(D)).setStyle(K,this.get(K));this.delegate.get(F).setStyle(J,"999");},_onDragEnd:function(L){this.delegate.get(this.get(D)).setStyle(K,1);this.delegate.get(F).setStyles({top:"",left:""});this.sync();},plug:function(L,M){if(L&&L.NAME.substring(0,4).toLowerCase()==="sort"){this.constructor.superclass.plug.call(this,L,M);}else{this.delegate.dd.plug(L,M);}return this;},sync:function(){this.delegate.syncTargets();return this;},destructor:function(){this.delegate.destroy();C.unreg(this);},join:function(M,L){if(!(M instanceof A.Sortable)){A.error("Sortable: join needs a Sortable Instance");return this;}if(!L){L="full";}L=L.toLowerCase();var N="_join_"+L;if(this[N]){this[N](M);}return this;},_join_none:function(L){this.delegate.dd.removeFromGroup(L.get(E));L.delegate.dd.removeFromGroup(this.get(E));},_join_full:function(L){this.delegate.dd.addToGroup(L.get(E));L.delegate.dd.addToGroup(this.get(E));},_join_outer:function(L){this.delegate.dd.addToGroup(L.get(E));},_join_inner:function(L){L.delegate.dd.addToGroup(this.get(E));},getOrdering:function(M){var L=[];if(!A.Lang.isFunction(M)){M=function(N){return N;};}A.one(this.get(I)).all(this.get(G)).each(function(N){L.push(M(N));});return L;}},{NAME:"sortable",ATTRS:{handles:{value:false},container:{value:"body"},nodes:{value:".dd-draggable"},opacity:{value:".75"},opacityNode:{value:"currentNode"},id:{value:null},moveType:{value:"insert"},invalid:{value:""}},_sortables:[],_test:function(L,M){if(M instanceof A.Node){return(M===L);}else{return L.test(M);}},getSortable:function(M){var L=null;M=A.one(M);A.each(A.Sortable._sortables,function(N){if(A.Sortable._test(M,N.get(I))){L=N;}});return L;},reg:function(L){A.Sortable._sortables.push(L);},unreg:function(L){A.each(A.Sortable._sortables,function(N,M){if(N===L){A.Sortable._sortables[M]=null;delete C._sortables[M];}});}});A.Sortable=C;},"3.3.0",{requires:["dd-delegate","dd-drop-plugin","dd-proxy"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/sortable/sortable-scroll-min.js b/jssource/src_files/include/javascript/yui3/build/sortable/sortable-scroll-min.js new file mode 100644 index 00000000..23f74e61 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/sortable/sortable-scroll-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("sortable-scroll",function(B){var A=function(){A.superclass.constructor.apply(this,arguments);};B.extend(A,B.Base,{initializer:function(){var C=this.get("host");C.plug(B.Plugin.DDNodeScroll,{node:C.get("container")});C.delegate.on("drop:over",function(D){if(this.dd.nodescroll&&D.drag.nodescroll){D.drag.nodescroll.set("parentScroll",B.one(this.get("container")));}});}},{ATTRS:{host:{value:""}},NAME:"SortScroll",NS:"scroll"});B.namespace("Y.Plugin");B.Plugin.SortableScroll=A;},"3.3.0",{requires:["sortable","dd-scroll"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/sortable/sortable-scroll.js b/jssource/src_files/include/javascript/yui3/build/sortable/sortable-scroll.js new file mode 100644 index 00000000..ba6352fc --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/sortable/sortable-scroll.js @@ -0,0 +1,74 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('sortable-scroll', function(Y) { + + + /** + * Plugin for sortable to handle scrolling lists. + * @module sortable + * @submodule sortable-scroll + */ + /** + * Plugin for sortable to handle scrolling lists. + * @class SortScroll + * @extends Base + * @constructor + * @namespace Plugin + */ + + var SortScroll = function() { + SortScroll.superclass.constructor.apply(this, arguments); + }; + + Y.extend(SortScroll, Y.Base, { + initializer: function() { + var host = this.get('host'); + host.plug(Y.Plugin.DDNodeScroll, { + node: host.get('container') + }); + host.delegate.on('drop:over', function(e) { + if (this.dd.nodescroll && e.drag.nodescroll) { + e.drag.nodescroll.set('parentScroll', Y.one(this.get('container'))); + } + }); + } + }, { + ATTRS: { + host: { + value: '' + } + }, + /** + * @property NAME + * @default SortScroll + * @readonly + * @protected + * @static + * @description The name of the class. + * @type {String} + */ + NAME: 'SortScroll', + /** + * @property NS + * @default scroll + * @readonly + * @protected + * @static + * @description The scroll instance. + * @type {String} + */ + NS: 'scroll' + }); + + + Y.namespace('Y.Plugin'); + Y.Plugin.SortableScroll = SortScroll; + + + +}, '3.3.0' ,{requires:['sortable', 'dd-scroll']}); diff --git a/jssource/src_files/include/javascript/yui3/build/sortable/sortable.js b/jssource/src_files/include/javascript/yui3/build/sortable/sortable.js new file mode 100644 index 00000000..bf62ec38 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/sortable/sortable.js @@ -0,0 +1,516 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('sortable', function(Y) { + + + /** + * The class allows you to create a Drag & Drop reordered list. + * @module sortable + */ + /** + * The class allows you to create a Drag & Drop reordered list. + * @class Sortable + * @extends Base + * @constructor + */ + + + var Sortable = function(o) { + Sortable.superclass.constructor.apply(this, arguments); + }, + CURRENT_NODE = 'currentNode', + OPACITY_NODE = 'opacityNode', + CONT = 'container', + ID = 'id', + ZINDEX = 'zIndex', + OPACITY = 'opacity', + PARENT_NODE = 'parentNode', + NODES = 'nodes', + NODE = 'node'; + + + Y.extend(Sortable, Y.Base, { + /** + * @property delegate + * @type DD.Delegate + * @description A reference to the DD.Delegate instance. + */ + delegate: null, + initializer: function() { + var id = 'sortable-' + Y.guid(), c, + delConfig = { + container: this.get(CONT), + nodes: this.get(NODES), + target: true, + invalid: this.get('invalid'), + dragConfig: { + groups: [ id ] + } + }, del; + + if (this.get('handles')) { + delConfig.handles = this.get('handles'); + } + del = new Y.DD.Delegate(delConfig); + + this.set(ID, id); + + del.dd.plug(Y.Plugin.DDProxy, { + moveOnEnd: false, + cloneNode: true + }); + + c = new Y.DD.Drop({ + node: this.get(CONT), + bubbleTarget: del, + groups: del.dd.get('groups') + }).on('drop:over', Y.bind(this._onDropOver, this)); + + del.on({ + 'drag:start': Y.bind(this._onDragStart, this), + 'drag:end': Y.bind(this._onDragEnd, this), + 'drag:over': Y.bind(this._onDragOver, this), + 'drag:drag': Y.bind(this._onDrag, this) + }); + + this.delegate = del; + Sortable.reg(this); + }, + _up: null, + _y: null, + _onDrag: function(e) { + if (e.pageY < this._y) { + this._up = true; + } else if (e.pageY > this._y) { + this._up = false; + } + + this._y = e.pageY; + }, + /** + * @private + * @method _onDropOver + * @param Event e The Event Object + * @description Handles the DropOver event to append a drop node to an empty target + */ + _onDropOver: function(e) { + if (!e.drop.get(NODE).test(this.get(NODES))) { + var nodes = e.drop.get(NODE).all(this.get(NODES)); + if (nodes.size() === 0) { + e.drop.get(NODE).append(e.drag.get(NODE)); + } + } + }, + /** + * @private + * @method _onDragOver + * @param Event e The Event Object + * @description Handles the DragOver event that moves the object in the list or to another list. + */ + _onDragOver: function(e) { + if (!e.drop.get(NODE).test(this.get(NODES))) { + return; + } + if (e.drag.get(NODE) == e.drop.get(NODE)) { + return; + } + // is drop a child of drag? + if (e.drag.get(NODE).contains(e.drop.get(NODE))) { + return; + } + var same = false, dir, oldNode, newNode, dropsort, dropNode, + moveType = this.get('moveType').toLowerCase(); + + if (e.drag.get(NODE).get(PARENT_NODE).contains(e.drop.get(NODE))) { + same = true; + } + if (same && moveType == 'move') { + moveType = 'insert'; + } + switch (moveType) { + case 'insert': + dir = ((this._up) ? 'before' : 'after'); + dropNode = e.drop.get(NODE); + if (Y.Sortable._test(dropNode, this.get(CONT))) { + dropNode.append(e.drag.get(NODE)); + } else { + dropNode.insert(e.drag.get(NODE), dir); + } + break; + case 'swap': + Y.DD.DDM.swapNode(e.drag, e.drop); + break; + case 'move': + case 'copy': + dropsort = Y.Sortable.getSortable(e.drop.get(NODE).get(PARENT_NODE)); + + if (!dropsort) { + return; + } + + Y.DD.DDM.getDrop(e.drag.get(NODE)).addToGroup(dropsort.get(ID)); + + //Same List + if (same) { + Y.DD.DDM.swapNode(e.drag, e.drop); + } else { + if (this.get('moveType') == 'copy') { + //New List + oldNode = e.drag.get(NODE); + newNode = oldNode.cloneNode(true); + + newNode.set(ID, ''); + e.drag.set(NODE, newNode); + dropsort.delegate.createDrop(newNode, [dropsort.get(ID)]); + oldNode.setStyles({ + top: '', + left: '' + }); + } + e.drop.get(NODE).insert(e.drag.get(NODE), 'before'); + } + break; + } + + this.fire(moveType, { same: same, drag: e.drag, drop: e.drop }); + this.fire('moved', { same: same, drag: e.drag, drop: e.drop }); + }, + /** + * @private + * @method _onDragStart + * @param Event e The Event Object + * @description Handles the DragStart event and initializes some settings. + */ + _onDragStart: function(e) { + this.delegate.get('lastNode').setStyle(ZINDEX, ''); + this.delegate.get(this.get(OPACITY_NODE)).setStyle(OPACITY, this.get(OPACITY)); + this.delegate.get(CURRENT_NODE).setStyle(ZINDEX, '999'); + }, + /** + * @private + * @method _onDragEnd + * @param Event e The Event Object + * @description Handles the DragEnd event that cleans up the settings in the drag:start event. + */ + _onDragEnd: function(e) { + this.delegate.get(this.get(OPACITY_NODE)).setStyle(OPACITY, 1); + this.delegate.get(CURRENT_NODE).setStyles({ + top: '', + left: '' + }); + this.sync(); + }, + /** + * @method plug + * @param Class cls The class to plug + * @param Object config The class config + * @description Passthrough to the DD.Delegate.ddplug method + * @chainable + */ + plug: function(cls, config) { + //I don't like this.. Not at all, need to discuss with the team + if (cls && cls.NAME.substring(0, 4).toLowerCase() === 'sort') { + this.constructor.superclass.plug.call(this, cls, config); + } else { + this.delegate.dd.plug(cls, config); + } + return this; + }, + /** + * @method plug + * @description Passthrough to the DD.Delegate syncTargets method. + * @chainable + */ + sync: function() { + this.delegate.syncTargets(); + return this; + }, + destructor: function() { + this.delegate.destroy(); + Sortable.unreg(this); + }, + /** + * @method join + * @param Sortable sel The Sortable list to join with + * @param String type The type of join to do: full, inner, outer, none. Default: full + * @description Join this Sortable with another Sortable instance. + *
            + *
          • full: Exchange nodes with both lists.
          • + *
          • inner: Items can go into this list from the joined list.
          • + *
          • outer: Items can go out of the joined list into this list.
          • + *
          • none: Removes the join.
          • + *
          + * @chainable + */ + join: function(sel, type) { + if (!(sel instanceof Y.Sortable)) { + Y.error('Sortable: join needs a Sortable Instance'); + return this; + } + if (!type) { + type = 'full'; + } + type = type.toLowerCase(); + var method = '_join_' + type; + + if (this[method]) { + this[method](sel); + } + + return this; + }, + /** + * @private + * @method _join_none + * @param Sortable sel The Sortable to remove the join from + * @description Removes the join with the passed Sortable. + */ + _join_none: function(sel) { + this.delegate.dd.removeFromGroup(sel.get(ID)); + sel.delegate.dd.removeFromGroup(this.get(ID)); + }, + /** + * @private + * @method _join_full + * @param Sortable sel The Sortable list to join with + * @description Joins both of the Sortables together. + */ + _join_full: function(sel) { + this.delegate.dd.addToGroup(sel.get(ID)); + sel.delegate.dd.addToGroup(this.get(ID)); + }, + /** + * @private + * @method _join_outer + * @param Sortable sel The Sortable list to join with + * @description Allows this Sortable to accept items from the passed Sortable. + */ + _join_outer: function(sel) { + this.delegate.dd.addToGroup(sel.get(ID)); + }, + /** + * @private + * @method _join_inner + * @param Sortable sel The Sortable list to join with + * @description Allows this Sortable to give items to the passed Sortable. + */ + _join_inner: function(sel) { + sel.delegate.dd.addToGroup(this.get(ID)); + }, + /** + * A custom callback to allow a user to extract some sort of id or any other data from the node to use in the "ordering list" and then that data should be returned from the callback. + * @method getOrdering + * @param Function callback + * @returns Array + */ + getOrdering: function(callback) { + var ordering = []; + + if (!Y.Lang.isFunction(callback)) { + callback = function (node) { + return node; + }; + } + + Y.one(this.get(CONT)).all(this.get(NODES)).each(function(node) { + ordering.push(callback(node)); + }); + return ordering; + } + }, { + NAME: 'sortable', + ATTRS: { + /** + * @attribute handles + * @description Drag handles to pass on to the internal DD.Delegate instance. + * @type Array + */ + handles: { + value: false + }, + /** + * @attribute container + * @description A selector query to get the container to listen for mousedown events on. All "nodes" should be a child of this container. + * @type String + */ + container: { + value: 'body' + }, + /** + * @attribute nodes + * @description A selector query to get the children of the "container" to make draggable elements from. + * @type String + */ + nodes: { + value: '.dd-draggable' + }, + /** + * @attribute opacity + * @description The opacity to change the proxy item to when dragging. + * @type String + */ + opacity: { + value: '.75' + }, + /** + * @attribute opacityNode + * @description The node to set opacity on when dragging (dragNode or currentNode). Default: currentNode. + * @type String + */ + opacityNode: { + value: 'currentNode' + }, + /** + * @attribute id + * @description The id of this Sortable, used to get a reference to this Sortable list from another list. + * @type String + */ + id: { + value: null + }, + /** + * @attribute moveType + * @description How should an item move to another list: insert, swap, move, copy. Default: insert + * @type String + */ + moveType: { + value: 'insert' + }, + /** + * @attribute invalid + * @description A selector string to test if a list item is invalid and not sortable + * @type String + */ + invalid: { + value: '' + } + }, + /** + * @static + * @property _sortables + * @private + * @type Array + * @description Hash map of all Sortables on the page. + */ + _sortables: [], + /** + * @static + * @method _test + * @param {Node} node The node instance to test. + * @param {String|Node} test The node instance or selector string to test against. + * @description Test a Node or a selector for the container + */ + _test: function(node, test) { + if (test instanceof Y.Node) { + return (test === node); + } else { + return node.test(test); + } + }, + /** + * @static + * @method getSortable + * @param {String|Node} node The node instance or selector string to use to find a Sortable instance. + * @description Get a Sortable instance back from a node reference or a selector string. + */ + getSortable: function(node) { + var s = null; + node = Y.one(node); + Y.each(Y.Sortable._sortables, function(v) { + if (Y.Sortable._test(node, v.get(CONT))) { + s = v; + } + }); + return s; + }, + /** + * @static + * @method reg + * @param Sortable s A Sortable instance. + * @description Register a Sortable instance with the singleton to allow lookups later. + */ + reg: function(s) { + Y.Sortable._sortables.push(s); + }, + /** + * @static + * @method unreg + * @param Sortable s A Sortable instance. + * @description Unregister a Sortable instance with the singleton. + */ + unreg: function(s) { + Y.each(Y.Sortable._sortables, function(v, k) { + if (v === s) { + Y.Sortable._sortables[k] = null; + delete Sortable._sortables[k]; + } + }); + } + }); + + Y.Sortable = Sortable; + + /** + * @event copy + * @description A Sortable node was moved. + * @param {Event.Facade} event An Event Facade object with the following specific property added: + *
          + *
          same
          Moved to the same list.
          + *
          drag
          The Drag Object
          + *
          drop
          The Drop Object
          + *
          + * @type {Event.Custom} + * + * + * @event move + * @description A Sortable node was moved. + * @param {Event.Facade} event An Event Facade object with the following specific property added: + *
          + *
          same
          Moved to the same list.
          + *
          drag
          The Drag Object
          + *
          drop
          The Drop Object
          + *
          + * @type {Event.Custom} + * + * + * @event insert + * @description A Sortable node was moved. + * @param {Event.Facade} event An Event Facade object with the following specific property added: + *
          + *
          same
          Moved to the same list.
          + *
          drag
          The Drag Object
          + *
          drop
          The Drop Object
          + *
          + * @type {Event.Custom} + * + * + * @event swap + * @description A Sortable node was moved. + * @param {Event.Facade} event An Event Facade object with the following specific property added: + *
          + *
          same
          Moved to the same list.
          + *
          drag
          The Drag Object
          + *
          drop
          The Drop Object
          + *
          + * @type {Event.Custom} + * + * + * @event moved + * @description A Sortable node was moved. + * @param {Event.Facade} event An Event Facade object with the following specific property added: + *
          + *
          same
          Moved to the same list.
          + *
          drag
          The Drag Object
          + *
          drop
          The Drop Object
          + *
          + * @type {Event.Custom} + */ + + + +}, '3.3.0' ,{requires:['dd-delegate', 'dd-drop-plugin', 'dd-proxy']}); diff --git a/jssource/src_files/include/javascript/yui3/build/stylesheet/stylesheet-min.js b/jssource/src_files/include/javascript/yui3/build/stylesheet/stylesheet-min.js index 2bd746cc..db94c8f6 100644 --- a/jssource/src_files/include/javascript/yui3/build/stylesheet/stylesheet-min.js +++ b/jssource/src_files/include/javascript/yui3/build/stylesheet/stylesheet-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("stylesheet",function(B){var J=B.config.doc,C=J.createElement("p"),F=C.style,D=B.Lang.isString,M={},I={},K=("cssFloat" in F)?"cssFloat":"styleFloat",G,A,L,N="opacity",O="float",E="";A=(N in F)?function(P){P.opacity=E;}:function(P){P.filter=E;};F.border="1px solid red";F.border=E;L=F.borderLeft?function(P,R){var Q;if(R!==K&&R.toLowerCase().indexOf(O)!=-1){R=K;}if(D(P[R])){switch(R){case N:case"filter":A(P);break;case"font":P.font=P.fontStyle=P.fontVariant=P.fontWeight=P.fontSize=P.lineHeight=P.fontFamily=E;break;default:for(Q in P){if(Q.indexOf(R)===0){P[Q]=E;}}}}}:function(P,Q){if(Q!==K&&Q.toLowerCase().indexOf(O)!=-1){Q=K;}if(D(P[Q])){if(Q===N){A(P);}else{P[Q]=E;}}};function H(W,R){var Z,U,Y,X={},Q,a,T,V,P,S;if(!(this instanceof H)){return new H(W,R);}if(W){if(B.Node&&W instanceof B.Node){U=B.Node.getDOMNode(W);}else{if(W.nodeName){U=W;}else{if(D(W)){if(W&&I[W]){return I[W];}U=J.getElementById(W.replace(/^#/,E));}}}if(U&&I[B.stamp(U)]){return I[B.stamp(U)];}}if(!U||!/^(?:style|link)$/i.test(U.nodeName)){U=J.createElement("style");U.type="text/css";}if(D(W)){if(W.indexOf("{")!=-1){if(U.styleSheet){U.styleSheet.cssText=W;}else{U.appendChild(J.createTextNode(W));}}else{if(!R){R=W;}}}if(!U.parentNode||U.parentNode.nodeName.toLowerCase()!=="head"){Z=(U.ownerDocument||J).getElementsByTagName("head")[0];Z.appendChild(U);}Y=U.sheet||U.styleSheet;Q=Y&&("cssRules" in Y)?"cssRules":"rules";T=("deleteRule" in Y)?function(b){Y.deleteRule(b);}:function(b){Y.removeRule(b);};a=("insertRule" in Y)?function(d,c,b){Y.insertRule(d+" {"+c+"}",b);}:function(d,c,b){Y.addRule(d,c,b);};for(V=Y[Q].length-1;V>=0;--V){P=Y[Q][V];S=P.selectorText;if(X[S]){X[S].style.cssText+=";"+P.style.cssText;T(V);}else{X[S]=P;}}H.register(B.stamp(U),this);if(R){H.register(R,this);}B.mix(this,{getId:function(){return B.stamp(U);},enable:function(){Y.disabled=false;return this;},disable:function(){Y.disabled=true;return this;},isEnabled:function(){return !Y.disabled;},set:function(e,d){var g=X[e],f=e.split(/\s*,\s*/),c,b;if(f.length>1){for(c=f.length-1;c>=0;--c){this.set(f[c],d);}return this;}if(!H.isValidSelector(e)){return this;}if(g){g.style.cssText=H.toCssText(d,g.style.cssText);}else{b=Y[Q].length;d=H.toCssText(d);if(d){a(e,d,b);X[e]=Y[Q][b];}}return this;},unset:function(e,d){var g=X[e],f=e.split(/\s*,\s*/),b=!d,h,c;if(f.length>1){for(c=f.length-1;c>=0;--c){this.unset(f[c],d);}return this;}if(g){if(!b){d=B.Array(d);F.cssText=g.style.cssText;for(c=d.length-1;c>=0;--c){L(F,d[c]);}if(F.cssText){g.style.cssText=F.cssText;}else{b=true;}}if(b){h=Y[Q];for(c=h.length-1;c>=0;--c){if(h[c]===g){delete X[e];T(c);break;}}}}return this;},getCssText:function(c){var d,b;if(D(c)){d=X[c.split(/\s*,\s*/)[0]];return d?d.style.cssText:null;}else{b=[];for(c in X){if(X.hasOwnProperty(c)){d=X[c];b.push(d.selectorText+" {"+d.style.cssText+"}");}}return b.join("\n");}}});}G=function(Q,S){var R=Q.styleFloat||Q.cssFloat||Q[O],P=B.Lang.trim,U;F.cssText=S||E;if(R&&!Q[K]){Q=B.merge(Q);delete Q.styleFloat;delete Q.cssFloat;delete Q[O];Q[K]=R;}for(U in Q){if(Q.hasOwnProperty(U)){try{F[U]=P(Q[U]);}catch(T){}}}return F.cssText;};B.mix(H,{toCssText:((N in F)?G:function(P,Q){if(N in P){P=B.merge(P,{filter:"alpha(opacity="+(P.opacity*100)+")"});delete P.opacity;}return G(P,Q);}),register:function(P,Q){return !!(P&&Q instanceof H&&!I[P]&&(I[P]=Q));},isValidSelector:function(Q){var P=false;if(Q&&D(Q)){if(!M.hasOwnProperty(Q)){M[Q]=!/\S/.test(Q.replace(/\s+|\s*[+~>]\s*/g," ").replace(/([^ ])\[.*?\]/g,"$1").replace(/([^ ])::?[a-z][a-z\-]+[a-z](?:\(.*?\))?/ig,"$1").replace(/(?:^| )[a-z0-6]+/ig," ").replace(/\\./g,E).replace(/[.#]\w[\w\-]*/g,E));}P=M[Q];}return P;}},true);B.StyleSheet=H;},"3.0.0"); \ No newline at end of file +YUI.add("stylesheet",function(b){var k=b.config.doc,c=k.createElement("p"),g=c.style,e=b.Lang.isString,n={},j={},l=("cssFloat" in g)?"cssFloat":"styleFloat",h,a,m,o="opacity",q="float",f="";a=(o in g)?function(d){d.opacity=f;}:function(d){d.filter=f;};g.border="1px solid red";g.border=f;m=g.borderLeft?function(d,s){var r;if(s!==l&&s.toLowerCase().indexOf(q)!=-1){s=l;}if(e(d[s])){switch(s){case o:case"filter":a(d);break;case"font":d.font=d.fontStyle=d.fontVariant=d.fontWeight=d.fontSize=d.lineHeight=d.fontFamily=f;break;default:for(r in d){if(r.indexOf(s)===0){d[r]=f;}}}}}:function(d,p){if(p!==l&&p.toLowerCase().indexOf(q)!=-1){p=l;}if(e(d[p])){if(p===o){a(d);}else{d[p]=f;}}};function i(x,s){var A,v,z,y={},p,B,u,w,d,t;if(!(b.instanceOf(this,i))){return new i(x,s);}if(x){if(b.Node&&x instanceof b.Node){v=x._node;}else{if(x.nodeName){v=x;}else{if(e(x)){if(x&&j[x]){return j[x];}v=k.getElementById(x.replace(/^#/,f));}}}if(v&&j[b.stamp(v)]){return j[b.stamp(v)];}}if(!v||!/^(?:style|link)$/i.test(v.nodeName)){v=k.createElement("style");v.type="text/css";}if(e(x)){if(x.indexOf("{")!=-1){if(v.styleSheet){v.styleSheet.cssText=x;}else{v.appendChild(k.createTextNode(x));}}else{if(!s){s=x;}}}if(!v.parentNode||v.parentNode.nodeName.toLowerCase()!=="head"){A=(v.ownerDocument||k).getElementsByTagName("head")[0];A.appendChild(v);}z=v.sheet||v.styleSheet;p=z&&("cssRules" in z)?"cssRules":"rules";u=("deleteRule" in z)?function(r){z.deleteRule(r);}:function(r){z.removeRule(r);};B=("insertRule" in z)?function(D,C,r){z.insertRule(D+" {"+C+"}",r);}:function(D,C,r){z.addRule(D,C,r);};for(w=z[p].length-1;w>=0;--w){d=z[p][w];t=d.selectorText;if(y[t]){y[t].style.cssText+=";"+d.style.cssText;u(w);}else{y[t]=d;}}i.register(b.stamp(v),this);if(s){i.register(s,this);}b.mix(this,{getId:function(){return b.stamp(v);},enable:function(){z.disabled=false;return this;},disable:function(){z.disabled=true;return this;},isEnabled:function(){return !z.disabled;},set:function(E,D){var G=y[E],F=E.split(/\s*,\s*/),C,r;if(F.length>1){for(C=F.length-1;C>=0;--C){this.set(F[C],D);}return this;}if(!i.isValidSelector(E)){return this;}if(G){G.style.cssText=i.toCssText(D,G.style.cssText);}else{r=z[p].length;D=i.toCssText(D);if(D){B(E,D,r);y[E]=z[p][r];}}return this;},unset:function(E,D){var G=y[E],F=E.split(/\s*,\s*/),r=!D,H,C;if(F.length>1){for(C=F.length-1;C>=0;--C){this.unset(F[C],D);}return this;}if(G){if(!r){D=b.Array(D);g.cssText=G.style.cssText;for(C=D.length-1;C>=0;--C){m(g,D[C]);}if(g.cssText){G.style.cssText=g.cssText;}else{r=true;}}if(r){H=z[p];for(C=H.length-1;C>=0;--C){if(H[C]===G){delete y[E];u(C);break;}}}}return this;},getCssText:function(D){var E,C,r;if(e(D)){E=y[D.split(/\s*,\s*/)[0]];return E?E.style.cssText:null;}else{C=[];for(r in y){if(y.hasOwnProperty(r)){E=y[r];C.push(E.selectorText+" {"+E.style.cssText+"}");}}return C.join("\n");}}});}h=function(r,t){var s=r.styleFloat||r.cssFloat||r[q],d=b.Lang.trim,v;try{g.cssText=t||f;}catch(u){c=k.createElement("p");g=c.style;g.cssText=t||f;}if(s&&!r[l]){r=b.merge(r);delete r.styleFloat;delete r.cssFloat;delete r[q];r[l]=s;}for(v in r){if(r.hasOwnProperty(v)){try{g[v]=d(r[v]);}catch(p){}}}return g.cssText;};b.mix(i,{toCssText:((o in g)?h:function(d,p){if(o in d){d=b.merge(d,{filter:"alpha(opacity="+(d.opacity*100)+")"});delete d.opacity;}return h(d,p);}),register:function(d,p){return !!(d&&p instanceof i&&!j[d]&&(j[d]=p));},isValidSelector:function(p){var d=false;if(p&&e(p)){if(!n.hasOwnProperty(p)){n[p]=!/\S/.test(p.replace(/\s+|\s*[+~>]\s*/g," ").replace(/([^ ])\[.*?\]/g,"$1").replace(/([^ ])::?[a-z][a-z\-]+[a-z](?:\(.*?\))?/ig,"$1").replace(/(?:^| )[a-z0-6]+/ig," ").replace(/\\./g,f).replace(/[.#]\w[\w\-]*/g,f));}d=n[p];}return d;}},true);b.StyleSheet=i;},"3.3.0"); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/stylesheet/stylesheet.js b/jssource/src_files/include/javascript/yui3/build/stylesheet/stylesheet.js index 180d5554..6de998e7 100644 --- a/jssource/src_files/include/javascript/yui3/build/stylesheet/stylesheet.js +++ b/jssource/src_files/include/javascript/yui3/build/stylesheet/stylesheet.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('stylesheet', function(Y) { @@ -32,7 +32,7 @@ var d = Y.config.doc, _unsetOpacity = (OPACITY in workerStyle) ? function (style) { style.opacity = EMPTY; } : function (style) { style.filter = EMPTY; }; - + // Normalizes the removal of an assigned style for a given property. Expands // shortcut properties if necessary and handles the various names for the float // property. @@ -74,7 +74,7 @@ _unsetProperty = workerStyle.borderLeft ? } } }; - + /** * Create an instance of StyleSheet to encapsulate a css stylesheet. * The constructor can be called using function or constructor syntax. @@ -103,7 +103,7 @@ _unsetProperty = workerStyle.borderLeft ? *

          The optional second parameter is a string name to register the sheet as. * This param is largely useful when providing a node id/ref or chunk of css * text to create a populated instance.

          - * + * * @class StyleSheet * @constructor * @param seed {String|HTMLElement|Node} a style or link node, its id, or a @@ -122,14 +122,14 @@ function StyleSheet(seed, name) { i,r,sel; // Factory or constructor - if (!(this instanceof StyleSheet)) { + if (!(Y.instanceOf(this, StyleSheet))) { return new StyleSheet(seed,name); } // Extract the DOM node from Node instances if (seed) { if (Y.Node && seed instanceof Y.Node) { - node = Y.Node.getDOMNode(seed); + node = seed._node; } else if (seed.nodeName) { node = seed; // capture the DOM node if the string is an id @@ -369,7 +369,7 @@ function StyleSheet(seed, name) { remove = true; } } - + if (remove) { // remove the rule altogether rules = sheet[_rules]; for (i = rules.length - 1; i >= 0; --i) { @@ -397,7 +397,7 @@ function StyleSheet(seed, name) { * @return {String} */ getCssText : function (sel) { - var rule,css; + var rule, css, selector; if (isString(sel)) { // IE's addRule doesn't support multiple comma delimited @@ -407,9 +407,9 @@ function StyleSheet(seed, name) { return rule ? rule.style.cssText : null; } else { css = []; - for (sel in cssRules) { - if (cssRules.hasOwnProperty(sel)) { - rule = cssRules[sel]; + for (selector in cssRules) { + if (cssRules.hasOwnProperty(selector)) { + rule = cssRules[selector]; css.push(rule.selectorText+" {"+rule.style.cssText+"}"); } } @@ -425,7 +425,19 @@ _toCssText = function (css,base) { trim = Y.Lang.trim, prop; - workerStyle.cssText = base || EMPTY; + // A very difficult to repro/isolate IE 9 beta (and Platform Preview 7) bug + // was reduced to this line throwing the error: + // "Invalid this pointer used as target for method call" + // It appears that the style collection is corrupted. The error is + // catchable, so in a best effort to work around it, replace the + // p and workerStyle and try the assignment again. + try { + workerStyle.cssText = base || EMPTY; + } catch (e) { + p = d.createElement('p'); + workerStyle = p.style; + workerStyle.cssText = base || EMPTY; + } if (f && !css[floatAttr]) { css = Y.merge(css); @@ -440,7 +452,7 @@ _toCssText = function (css,base) { // in values ala ' red' or 'red ' workerStyle[prop] = trim(css[prop]); } - catch (e) { + catch (ex) { } } } @@ -630,4 +642,4 @@ NOTES -}, '3.0.0' ); +}, '3.3.0' ); diff --git a/jssource/src_files/include/javascript/yui3/build/substitute/substitute-min.js b/jssource/src_files/include/javascript/yui3/build/substitute/substitute-min.js index 1d44a386..ced6eaba 100644 --- a/jssource/src_files/include/javascript/yui3/build/substitute/substitute-min.js +++ b/jssource/src_files/include/javascript/yui3/build/substitute/substitute-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("substitute",function(G){var B=G.Lang,D="dump",F=" ",C="{",E="}",A=function(U,I,P,K,H){var N,M,L,S,R,T,Q=[],J,O;K=K||C;H=H||E;for(;;){N=U.lastIndexOf(K);if(N<0){break;}M=U.indexOf(H,N);if(N+1>=M){break;}J=U.substring(N+1,M);S=J;T=null;L=S.indexOf(F);if(L>-1){T=S.substring(L+1);S=S.substring(0,L);}R=I[S];if(P){R=P(S,R,T);}if(B.isObject(R)){if(!G.dump){R=R.toString();}else{if(B.isArray(R)){R=G.dump(R,parseInt(T,10));}else{T=T||"";O=T.indexOf(D);if(O>-1){T=T.substring(4);}if(R.toString===Object.prototype.toString||O>-1){R=G.dump(R,parseInt(T,10));}else{R=R.toString();}}}}else{if(!B.isString(R)&&!B.isNumber(R)){R="~-"+Q.length+"-~";Q[Q.length]=J;}}U=U.substring(0,N)+R+U.substring(M+1);}for(N=Q.length-1;N>=0;N=N-1){U=U.replace(new RegExp("~-"+N+"-~"),K+Q[N]+H,"g");}return U;};G.substitute=A;B.substitute=A;},"3.0.0",{optional:["dump"]}); \ No newline at end of file +YUI.add("substitute",function(g){var b=g.Lang,d="dump",f=" ",c="{",e="}",a=function(A,l,t,h){var q,p,n,y,x,z,w=[],m,r,u=A.length;for(;;){q=A.lastIndexOf(c,u);if(q<0){break;}p=A.indexOf(e,q);if(q+1>=p){break;}m=A.substring(q+1,p);y=m;z=null;n=y.indexOf(f);if(n>-1){z=y.substring(n+1);y=y.substring(0,n);}x=l[y];if(t){x=t(y,x,z);}if(b.isObject(x)){if(!g.dump){x=x.toString();}else{if(b.isArray(x)){x=g.dump(x,parseInt(z,10));}else{z=z||"";r=z.indexOf(d);if(r>-1){z=z.substring(4);}if(x.toString===Object.prototype.toString||r>-1){x=g.dump(x,parseInt(z,10));}else{x=x.toString();}}}}else{if(!b.isString(x)&&!b.isNumber(x)){x="~-"+w.length+"-~";w[w.length]=m;}}A=A.substring(0,q)+x+A.substring(p+1);if(!h){u=q-1;}}for(q=w.length-1;q>=0;q=q-1){A=A.replace(new RegExp("~-"+q+"-~"),c+w[q]+e,"g");}return A;};g.substitute=a;b.substitute=a;},"3.3.0",{optional:["dump"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/substitute/substitute.js b/jssource/src_files/include/javascript/yui3/build/substitute/substitute.js index cb73e06d..08203b5d 100644 --- a/jssource/src_files/include/javascript/yui3/build/substitute/substitute.js +++ b/jssource/src_files/include/javascript/yui3/build/substitute/substitute.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('substitute', function(Y) { @@ -14,26 +14,22 @@ YUI.add('substitute', function(Y) { * @module substitute */ - var L = Y.Lang, DUMP='dump', SPACE=' ', LBRACE='{', RBRACE='}', + var L = Y.Lang, DUMP = 'dump', SPACE = ' ', LBRACE = '{', RBRACE = '}', /** * The following methods are added to the YUI instance * @class YUI~substitute */ - // @todo template configurability is not implemented yet - // @param ldelim {string} optional left delimiter for the replacement token (default: left brace) - // @param rdelim {string} optional right delimiter for the replacement token (default: right brace) - /** - * Does variable substitution on a string. It scans through the string - * looking for expressions enclosed in { } braces. If an expression + * Does variable substitution on a string. It scans through the string + * looking for expressions enclosed in { } braces. If an expression * is found, it is used a key on the object. If there is a space in * the key, the first word is used for the key and the rest is provided * to an optional function to be used to programatically determine the - * value (the extra information might be used for this decision). If + * value (the extra information might be used for this decision). If * the value for the key in the object, or what is returned from the - * function has a string value, number value, or object value, it is + * function has a string value, number value, or object value, it is * substituted for the bracket expression and it repeats. If this * value is an object, it uses the Object's toString() if this has * been overridden, otherwise it does a shallow dump of the key/value @@ -44,31 +40,33 @@ YUI.add('substitute', function(Y) { * in the YUI module. * * @method substitute - * @param s {string} The string that will be modified. - * @param o An object containing the replacement values - * @param f {function} An optional function that can be used to + * @param {string} s The string that will be modified. + * @param {object} o An object containing the replacement values. + * @param {function} f An optional function that can be used to * process each match. It receives the key, * value, and any extra metadata included with * the key inside of the braces. - * @return {string} the substituted string + * @param {boolean} recurse if true, the replacement will be recursive, + * letting you have replacement tokens in replacement text. The + * default is false. + * @return {string} the substituted string. */ - substitute = function (s, o, f, ldelim, rdelim) { - var i, j, k, key, v, meta, saved=[], token, dump; - ldelim = ldelim || LBRACE; - rdelim = rdelim || RBRACE; + substitute = function(s, o, f, recurse) { + var i, j, k, key, v, meta, saved = [], token, dump, + lidx = s.length; for (;;) { - i = s.lastIndexOf(ldelim); + i = s.lastIndexOf(LBRACE, lidx); if (i < 0) { break; } - j = s.indexOf(rdelim, i); + j = s.indexOf(RBRACE, i); if (i + 1 >= j) { break; } - //Extract key and meta info + //Extract key and meta info token = s.substring(i + 1, j); key = token; meta = null; @@ -93,7 +91,7 @@ YUI.add('substitute', function(Y) { if (L.isArray(v)) { v = Y.dump(v, parseInt(meta, 10)); } else { - meta = meta || ""; + meta = meta || ''; // look for the keyword 'dump', if found force obj dump dump = meta.indexOf(DUMP); @@ -101,9 +99,10 @@ YUI.add('substitute', function(Y) { meta = meta.substring(4); } - // use the toString if it is not the Object toString + // use the toString if it is not the Object toString // and the 'dump' meta info was not found - if (v.toString===Object.prototype.toString||dump>-1) { + if (v.toString === Object.prototype.toString || + dump > -1) { v = Y.dump(v, parseInt(meta, 10)); } else { v = v.toString(); @@ -112,7 +111,7 @@ YUI.add('substitute', function(Y) { } } else if (!L.isString(v) && !L.isNumber(v)) { // This {block} has no replace string. Save it for later. - v = "~-" + saved.length + "-~"; + v = '~-' + saved.length + '-~'; saved[saved.length] = token; // break; @@ -120,11 +119,16 @@ YUI.add('substitute', function(Y) { s = s.substring(0, i) + v + s.substring(j + 1); + if (!recurse) { + lidx = i - 1; + } + } // restore saved {block}s - for (i=saved.length-1; i>=0; i=i-1) { - s = s.replace(new RegExp("~-" + i + "-~"), ldelim + saved[i] + rdelim, "g"); + for (i = saved.length - 1; i >= 0; i = i - 1) { + s = s.replace(new RegExp('~-' + i + '-~'), LBRACE + + saved[i] + RBRACE, 'g'); } return s; @@ -136,4 +140,4 @@ YUI.add('substitute', function(Y) { -}, '3.0.0' ,{optional:['dump']}); +}, '3.3.0' ,{optional:['dump']}); diff --git a/jssource/src_files/include/javascript/yui3/build/swf/swf-min.js b/jssource/src_files/include/javascript/yui3/build/swf/swf-min.js new file mode 100644 index 00000000..62e31aa0 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/swf/swf-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("swf",function(B){var M=B.Event,G=B.SWFDetect,I=B.Lang,H=B.UA,J=B.Node,F="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",E="application/x-shockwave-flash",D="10.0.22",A="http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?"+Math.random(),C="SWF.eventHandler",K={align:"",allowFullScreen:"",allowNetworking:"",allowScriptAccess:"",base:"",bgcolor:"",menu:"",name:"",quality:"",salign:"",scale:"",tabindex:"",wmode:""};function L(R,O,c){this._id=B.guid("yuiswf");var S=this._id;var W=J.one(R);var f=c["version"]||D;var Z=(f+"").split(".");var T=G.isFlashVersionAtLeast(parseInt(Z[0]),parseInt(Z[1]),parseInt(Z[2]));var Y=(G.isFlashVersionAtLeast(8,0,0));var Q=Y&&!T&&c["useExpressInstall"];var P=(Q)?A:O;var e="';if(H.ie){e+='';}for(var V in c.fixedAttributes){if(K.hasOwnProperty(V)){e+='';}}for(var X in c.flashVars){var N=c.flashVars[X];if(I.isString(N)){d+="&"+X+"="+encodeURIComponent(N);}}if(d){e+='';}e+="";W.setContent(e);this._swf=J.one("#"+S);}else{var a={};a.type="wrongflashversion";this.publish("wrongflashversion",{fireOnce:true});this.fire("wrongflashversion",a);}}L._instances=L._instances||{};L.eventHandler=function(N,O){L._instances[N]._eventHandler(O);};L.prototype={_eventHandler:function(N){if(N.type==="swfReady"){this.publish("swfReady",{fireOnce:true});this.fire("swfReady",N);}else{if(N.type==="log"){}else{this.fire(N.type,N);}}},callSWF:function(O,N){if(!N){N=[];}if(this._swf._node[O]){return(this._swf._node[O].apply(this._swf._node,N));}else{return null;}},toString:function(){return"SWF "+this._id;}};B.augment(L,B.EventTarget);B.SWF=L;},"3.3.0"); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/swf/swf.js b/jssource/src_files/include/javascript/yui3/build/swf/swf.js new file mode 100644 index 00000000..81e34a39 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/swf/swf.js @@ -0,0 +1,213 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('swf', function(Y) { + +/** + * Embed a Flash applications in a standard manner and communicate with it + * via External Interface. + * @module swf + */ + + var Event = Y.Event, + SWFDetect = Y.SWFDetect, + Lang = Y.Lang, + uA = Y.UA, + Node = Y.Node, + + // private + FLASH_CID = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000", + FLASH_TYPE = "application/x-shockwave-flash", + FLASH_VER = "10.0.22", + EXPRESS_INSTALL_URL = "http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?" + Math.random(), + EVENT_HANDLER = "SWF.eventHandler", + possibleAttributes = {align:"", allowFullScreen:"", allowNetworking:"", allowScriptAccess:"", base:"", bgcolor:"", menu:"", name:"", quality:"", salign:"", scale:"", tabindex:"", wmode:""}; + + /** + * The SWF utility is a tool for embedding Flash applications in HTML pages. + * @module swf + * @title SWF Utility + * @requires event-custom, node, swfdetect + */ + + /** + * Creates the SWF instance and keeps the configuration data + * + * @class SWF + * @augments Y.Event.Target + * @constructor + * @param {String|HTMLElement} id The id of the element, or the element itself that the SWF will be inserted into. + * The width and height of the SWF will be set to the width and height of this container element. + * @param {String} swfURL The URL of the SWF to be embedded into the page. + * @param {Object} p_oAttributes (optional) Configuration parameters for the Flash application and values for Flashvars + * to be passed to the SWF. The p_oAttributes object allows the following additional properties: + *
          + *
          version : String
          + *
          The minimum version of Flash required on the user's machine.
          + *
          fixedAttributes : Object
          + *
          An object literal containing one or more of the following String keys and their values: align, + * allowFullScreen, allowNetworking, allowScriptAccess, base, bgcolor, menu, name, quality, salign, scale, + * tabindex, wmode. event from the thumb
          + *
          + */ + +function SWF (p_oElement /*:String*/, swfURL /*:String*/, p_oAttributes /*:Object*/ ) { + + this._id = Y.guid("yuiswf"); + + + var _id = this._id; + var oElement = Node.one(p_oElement); + + var flashVersion = p_oAttributes["version"] || FLASH_VER; + var flashVersionSplit = (flashVersion + '').split("."); + var isFlashVersionRight = SWFDetect.isFlashVersionAtLeast(parseInt(flashVersionSplit[0]), parseInt(flashVersionSplit[1]), parseInt(flashVersionSplit[2])); + var canExpressInstall = (SWFDetect.isFlashVersionAtLeast(8,0,0)); + var shouldExpressInstall = canExpressInstall && !isFlashVersionRight && p_oAttributes["useExpressInstall"]; + var flashURL = (shouldExpressInstall)?EXPRESS_INSTALL_URL:swfURL; + var objstring = ''; + + if (uA.ie) { + objstring += ''; + } + + for (var attribute in p_oAttributes.fixedAttributes) { + if (possibleAttributes.hasOwnProperty(attribute)) { + objstring += ''; + } + } + + for (var flashvar in p_oAttributes.flashVars) { + var fvar = p_oAttributes.flashVars[flashvar]; + if (Lang.isString(fvar)) { + flashvarstring += "&" + flashvar + "=" + encodeURIComponent(fvar); + } + } + + if (flashvarstring) { + objstring += ''; + } + + objstring += ""; + oElement.setContent(objstring); + + this._swf = Node.one("#" + _id); + } + /** + * Fired when the Flash player version on the user's machine is below the required value. + * + * @event wrongflashversion + */ + else { + var event = {}; + event.type = "wrongflashversion"; + this.publish("wrongflashversion", {fireOnce:true}); + this.fire("wrongflashversion", event); + } +}; + +/** + * @private + * The static collection of all instances of the SWFs on the page. + * @property _instances + * @type Object + */ + +SWF._instances = SWF._instances || {}; + +/** + * @private + * Handles an event coming from within the SWF and delegate it + * to a specific instance of SWF. + * @method eventHandler + * @param swfid {String} the id of the SWF dispatching the event + * @param event {Object} the event being transmitted. + */ +SWF.eventHandler = function (swfid, event) { + SWF._instances[swfid]._eventHandler(event); +}; + +SWF.prototype = +{ + /** + * @private + * Propagates a specific event from Flash to JS. + * @method _eventHandler + * @param event {Object} The event to be propagated from Flash. + */ + + _eventHandler: function(event) + { + if (event.type === "swfReady") + { + this.publish("swfReady", {fireOnce:true}); + this.fire("swfReady", event); + } + else if(event.type === "log") + { + } + else + { + this.fire(event.type, event); + } + }, + + /** + * Calls a specific function exposed by the SWF's + * ExternalInterface. + * @method callSWF + * @param func {String} the name of the function to call + * @param args {Object} the set of arguments to pass to the function. + */ + + callSWF: function (func, args) + { + if (!args) { + args= []; + }; + if (this._swf._node[func]) { + return(this._swf._node[func].apply(this._swf._node, args)); + } else { + return null; + } + }, + + /** + * Public accessor to the unique name of the SWF instance. + * + * @method toString + * @return {String} Unique name of the SWF instance. + */ + toString: function() + { + return "SWF " + this._id; + } +}; + +Y.augment(SWF, Y.EventTarget); + +Y.SWF = SWF; + + +}, '3.3.0' ); diff --git a/jssource/src_files/include/javascript/yui3/build/swfdetect/swfdetect-min.js b/jssource/src_files/include/javascript/yui3/build/swfdetect/swfdetect-min.js new file mode 100644 index 00000000..663d194d --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/swfdetect/swfdetect-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("swfdetect",function(C){var J=0,H=C.UA,E=C.Lang,M="ShockwaveFlash",B,G,D,N,A;function L(O){return parseInt(O,10);}function F(O){if(E.isNumber(L(O[0]))){H.flashMajor=O[0];}if(E.isNumber(L(O[1]))){H.flashMinor=O[1];}if(E.isNumber(L(O[2]))){H.flashRev=O[2];}}if(H.gecko||H.webkit||H.opera){if((B=navigator.mimeTypes["application/x-shockwave-flash"])){if((G=B.enabledPlugin)){D=G.description.replace(/\s[rd]/g,".").replace(/[A-Za-z\s]+/g,"").split(".");F(D);}}}else{if(H.ie){try{N=new ActiveXObject(M+"."+M+".6");N.AllowScriptAccess="always";}catch(I){if(N!==null){J=6;}}if(J===0){try{A=new ActiveXObject(M+"."+M);D=A.GetVariable("$version").replace(/[A-Za-z\s]+/g,"").split(",");F(D);}catch(K){}}}}C.SWFDetect={getFlashVersion:function(){return(String(H.flashMajor)+"."+String(H.flashMinor)+"."+String(H.flashRev));},isFlashVersionAtLeast:function(R,T,S){var P=L(H.flashMajor),Q=L(H.flashMinor),O=L(H.flashRev);R=L(R||0);T=L(T||0);S=L(S||0);if(R===P){if(T===Q){return S<=O;}return T ul",tab:"> ul > li",tabLabel:"> ul > li > a ",tabviewPanel:"> div",tabPanel:"> div > div",selectedTab:"> ul > "+i+d.selectedTab,selectedPanel:"> div "+i+d.selectedPanel},a=function(m){this.init.apply(this,arguments);};a.NAME="tabviewBase";a._queries=e;a._classNames=d;b.mix(a.prototype,{init:function(m){m=m||h;this._node=m.host||b.one(m.node);this.refresh();},initClassNames:function(m){b.Object.each(e,function(p,o){if(d[o]){var n=this.all(p);if(m!==undefined){n=n.item(m);}if(n){n.addClass(d[o]);}}},this._node);this._node.addClass(d.tabview);},_select:function(n){var q=this._node,r=q.one(e.selectedTab),p=q.one(e.selectedPanel),o=q.all(e.tab).item(n),m=q.all(e.tabPanel).item(n);if(r){r.removeClass(d.selectedTab);}if(p){p.removeClass(d.selectedPanel);}if(o){o.addClass(d.selectedTab);}if(m){m.addClass(d.selectedPanel);}},initState:function(){var n=this._node,o=n.one(e.selectedTab),m=o?n.all(e.tab).indexOf(o):0;this._select(m);},_scrubTextNodes:function(){this._node.one(e.tabviewList).get("childNodes").each(function(m){if(m.get("nodeType")===3){m.remove();}});},refresh:function(){this._scrubTextNodes();this.initClassNames();this.initState();this.initEvents();},tabEventName:"click",initEvents:function(){this._node.delegate(this.tabEventName,this.onTabEvent,e.tab,this);},onTabEvent:function(m){m.preventDefault();this._select(this._node.all(e.tab).indexOf(m.currentTarget));},destroy:function(){this._node.detach(this.tabEventName);}});b.TabviewBase=a;},"3.3.0",{requires:["node-event-delegate","classnamemanager","skin-sam-tabview"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/tabview/tabview-base.js b/jssource/src_files/include/javascript/yui3/build/tabview/tabview-base.js new file mode 100644 index 00000000..786e97c0 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/tabview/tabview-base.js @@ -0,0 +1,151 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('tabview-base', function(Y) { + +var getClassName = Y.ClassNameManager.getClassName, + TABVIEW = 'tabview', + TAB = 'tab', + CONTENT = 'content', + PANEL = 'panel', + SELECTED = 'selected', + EMPTY_OBJ = {}, + DOT = '.', + + _classNames = { + tabview: getClassName(TABVIEW), + tabviewPanel: getClassName(TABVIEW, PANEL), + tabviewList: getClassName(TABVIEW, 'list'), + tab: getClassName(TAB), + tabLabel: getClassName(TAB, 'label'), + tabPanel: getClassName(TAB, PANEL), + selectedTab: getClassName(TAB, SELECTED), + selectedPanel: getClassName(TAB, PANEL, SELECTED) + }, + + _queries = { + tabview: DOT + _classNames.tabview, + tabviewList: '> ul', + tab: '> ul > li', + tabLabel: '> ul > li > a ', + tabviewPanel: '> div', + tabPanel: '> div > div', + selectedTab: '> ul > ' + DOT + _classNames.selectedTab, + selectedPanel: '> div ' + DOT + _classNames.selectedPanel + }, + + TabviewBase = function(config) { + this.init.apply(this, arguments); + }; + +TabviewBase.NAME = 'tabviewBase'; +TabviewBase._queries = _queries; +TabviewBase._classNames = _classNames; + +Y.mix(TabviewBase.prototype, { + init: function(config) { + config = config || EMPTY_OBJ; + this._node = config.host || Y.one(config.node); + + this.refresh(); + }, + + initClassNames: function(index) { + Y.Object.each(_queries, function(query, name) { + // this === tabview._node + if (_classNames[name]) { + var result = this.all(query); + + if (index !== undefined) { + result = result.item(index); + } + + if (result) { + result.addClass(_classNames[name]); + } + } + }, this._node); + + this._node.addClass(_classNames.tabview); + }, + + _select: function(index) { + var node = this._node, + oldItem = node.one(_queries.selectedTab), + oldContent = node.one(_queries.selectedPanel), + newItem = node.all(_queries.tab).item(index), + newContent = node.all(_queries.tabPanel).item(index); + + if (oldItem) { + oldItem.removeClass(_classNames.selectedTab); + } + + if (oldContent) { + oldContent.removeClass(_classNames.selectedPanel); + } + + if (newItem) { + newItem.addClass(_classNames.selectedTab); + } + + if (newContent) { + newContent.addClass(_classNames.selectedPanel); + } + }, + + initState: function() { + var node = this._node, + activeNode = node.one(_queries.selectedTab), + activeIndex = activeNode ? + node.all(_queries.tab).indexOf(activeNode) : 0; + + this._select(activeIndex); + }, + + // collapse extra space between list-items + _scrubTextNodes: function() { + this._node.one(_queries.tabviewList).get('childNodes').each(function(node) { + if (node.get('nodeType') === 3) { // text node + node.remove(); + } + }); + }, + + // base renderer only enlivens existing markup + refresh: function() { + this._scrubTextNodes(); + this.initClassNames(); + this.initState(); + this.initEvents(); + }, + + tabEventName: 'click', + + initEvents: function() { + // TODO: detach prefix for delegate? + // this._node.delegate('tabview|' + this.tabEventName), + this._node.delegate(this.tabEventName, + this.onTabEvent, + _queries.tab, + this + ); + }, + + onTabEvent: function(e) { + e.preventDefault(); + this._select(this._node.all(_queries.tab).indexOf(e.currentTarget)); + }, + + destroy: function() { + this._node.detach(this.tabEventName); + } +}); + +Y.TabviewBase = TabviewBase; + + +}, '3.3.0' ,{requires:['node-event-delegate', 'classnamemanager', 'skin-sam-tabview']}); diff --git a/jssource/src_files/include/javascript/yui3/build/tabview/tabview-min.js b/jssource/src_files/include/javascript/yui3/build/tabview/tabview-min.js new file mode 100644 index 00000000..c28e5527 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/tabview/tabview-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("tabview",function(f){var a=f.TabviewBase._queries,e=f.TabviewBase._classNames,g=".",b=f.ClassNameManager.getClassName,c=f.Base.create("tabView",f.Widget,[f.WidgetParent],{_afterChildAdded:function(h){this.get("contentBox").focusManager.refresh();},_defListNodeValueFn:function(){return f.Node.create(c.LIST_TEMPLATE);},_defPanelNodeValueFn:function(){return f.Node.create(c.PANEL_TEMPLATE);},_afterChildRemoved:function(k){var h=k.index,j=this.get("selection");if(!j){j=this.item(h-1)||this.item(0);if(j){j.set("selected",1);}}this.get("contentBox").focusManager.refresh();},_initAria:function(){var h=this.get("contentBox"),i=h.one(a.tabviewList);if(i){i.setAttrs({role:"tablist"});}},bindUI:function(){this.get("contentBox").plug(f.Plugin.NodeFocusManager,{descendants:g+e.tabLabel,keys:{next:"down:39",previous:"down:37"},circular:true});this.after("render",this._setDefSelection);this.after("addChild",this._afterChildAdded);this.after("removeChild",this._afterChildRemoved);},renderUI:function(){var h=this.get("contentBox");this._renderListBox(h);this._renderPanelBox(h);this._childrenContainer=this.get("listNode");this._renderTabs(h);},_setDefSelection:function(h){var i=this.get("selection")||this.item(0);this.some(function(j){if(j.get("selected")){i=j;return true;}});if(i){this.set("selection",i);i.set("selected",1);}},_renderListBox:function(h){var i=this.get("listNode");if(!i.inDoc()){h.append(i);}},_renderPanelBox:function(h){var i=this.get("panelNode");if(!i.inDoc()){h.append(i);}},_renderTabs:function(h){var k=h.all(a.tab),i=this.get("panelNode"),j=(i)?this.get("panelNode").get("children"):null,l=this;if(k){k.addClass(e.tab);h.all(a.tabLabel).addClass(e.tabLabel);h.all(a.tabPanel).addClass(e.tabPanel);k.each(function(o,n){var m=(j)?j.item(n):null;l.add({boundingBox:o,contentBox:o.one(g+e.tabLabel),label:o.one(g+e.tabLabel).get("text"),panelNode:m});});}}},{LIST_TEMPLATE:'
            ',PANEL_TEMPLATE:'
            ',ATTRS:{defaultChildType:{value:"Tab"},listNode:{setter:function(h){h=f.one(h);if(h){h.addClass(e.tabviewList);}return h;},valueFn:"_defListNodeValueFn"},panelNode:{setter:function(h){h=f.one(h);if(h){h.addClass(e.tabviewPanel);}return h;},valueFn:"_defPanelNodeValueFn"},tabIndex:{value:null}},HTML_PARSER:{listNode:a.tabviewList,panelNode:a.tabviewPanel}});f.TabView=c;var d=f.Lang,a=f.TabviewBase._queries,e=f.TabviewBase._classNames,b=f.ClassNameManager.getClassName;f.Tab=f.Base.create("tab",f.Widget,[f.WidgetChild],{BOUNDING_TEMPLATE:'
          • ',CONTENT_TEMPLATE:'',PANEL_TEMPLATE:'
            ',_uiSetSelectedPanel:function(h){this.get("panelNode").toggleClass(e.selectedPanel,h);},_afterTabSelectedChange:function(h){this._uiSetSelectedPanel(h.newVal);},_afterParentChange:function(h){if(!h.newVal){this._remove();}else{this._add();}},_initAria:function(){var i=this.get("contentBox"),j=i.get("id"),h=this.get("panelNode");if(!j){j=f.guid();i.set("id",j);}i.set("role","tab");i.get("parentNode").set("role","presentation");h.setAttrs({role:"tabpanel","aria-labelledby":j});},syncUI:function(){this.set("label",this.get("label"));this.set("content",this.get("content"));this._uiSetSelectedPanel(this.get("selected"));},bindUI:function(){this.after("selectedChange",this._afterTabSelectedChange);this.after("parentChange",this._afterParentChange);},renderUI:function(){this._renderPanel();this._initAria();},_renderPanel:function(){this.get("parent").get("panelNode").appendChild(this.get("panelNode"));},_add:function(){var i=this.get("parent").get("contentBox"),j=i.get("listNode"),h=i.get("panelNode");if(j){j.appendChild(this.get("boundingBox"));}if(h){h.appendChild(this.get("panelNode"));}},_remove:function(){this.get("boundingBox").remove();this.get("panelNode").remove();},_onActivate:function(h){if(h.target===this){h.domEvent.preventDefault();h.target.set("selected",1);}},initializer:function(){this.publish(this.get("triggerEvent"),{defaultFn:this._onActivate});},_defLabelSetter:function(h){this.get("contentBox").setContent(h);return h;},_defContentSetter:function(h){this.get("panelNode").setContent(h);return h;},_defPanelNodeValueFn:function(){var i=this.get("contentBox").get("href")||"",k=this.get("parent"),j=i.indexOf("#"),h;i=i.substr(j);if(i.charAt(0)==="#"){h=f.one(i);if(h){h.addClass(e.tabPanel);}}if(!h&&k){h=k.get("panelNode").get("children").item(this.get("index"));}if(!h){h=f.Node.create(this.PANEL_TEMPLATE);}return h;}},{ATTRS:{triggerEvent:{value:"click"},label:{setter:"_defLabelSetter",validator:d.isString},content:{setter:"_defContentSetter",validator:d.isString},panelNode:{setter:function(h){h=f.one(h);if(h){h.addClass(e.tabPanel);}return h;},valueFn:"_defPanelNodeValueFn"},tabIndex:{value:null,validator:"_validTabIndex"}},HTML_PARSER:{selected:function(h){var i=(this.get("boundingBox").hasClass(e.selectedTab))?1:0;return i;}}});},"3.3.0",{requires:["substitute","node-pluginhost","node-focusmanager","tabview-base","widget","widget-parent","widget-child"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/tabview/tabview-plugin-min.js b/jssource/src_files/include/javascript/yui3/build/tabview/tabview-plugin-min.js new file mode 100644 index 00000000..5697e9cf --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/tabview/tabview-plugin-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("tabview-plugin",function(b){function a(){a.superclass.constructor.apply(this,arguments);}a.NAME="tabviewPlugin";a.NS="tabs";b.extend(a,b.TabviewBase);b.namespace("Plugin");b.Plugin.Tabview=a;},"3.3.0",{requires:["node-pluginhost","tabview-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/tabview/tabview-plugin.js b/jssource/src_files/include/javascript/yui3/build/tabview/tabview-plugin.js new file mode 100644 index 00000000..5476d71b --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/tabview/tabview-plugin.js @@ -0,0 +1,23 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('tabview-plugin', function(Y) { + +function TabviewPlugin() { + TabviewPlugin.superclass.constructor.apply(this, arguments); +}; + +TabviewPlugin.NAME = 'tabviewPlugin'; +TabviewPlugin.NS = 'tabs'; + +Y.extend(TabviewPlugin, Y.TabviewBase); + +Y.namespace('Plugin'); +Y.Plugin.Tabview = TabviewPlugin; + + +}, '3.3.0' ,{requires:['node-pluginhost', 'tabview-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/tabview/tabview.js b/jssource/src_files/include/javascript/yui3/build/tabview/tabview.js new file mode 100644 index 00000000..43a39eed --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/tabview/tabview.js @@ -0,0 +1,404 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('tabview', function(Y) { + +/** + * The TabView module + * + * @module tabview + */ + +var _queries = Y.TabviewBase._queries, + _classNames = Y.TabviewBase._classNames, + DOT = '.', + getClassName = Y.ClassNameManager.getClassName, + + /** + * Provides a tabbed widget interface + * @param config {Object} Object literal specifying tabview configuration properties. + * + * @class TabView + * @constructor + * @extends Widget + * @uses WidgetParent + */ + TabView = Y.Base.create('tabView', Y.Widget, [Y.WidgetParent], { + _afterChildAdded: function(e) { + this.get('contentBox').focusManager.refresh(); + }, + + _defListNodeValueFn: function() { + return Y.Node.create(TabView.LIST_TEMPLATE); + }, + + _defPanelNodeValueFn: function() { + return Y.Node.create(TabView.PANEL_TEMPLATE); + }, + + _afterChildRemoved: function(e) { // update the selected tab when removed + var i = e.index, + selection = this.get('selection'); + + if (!selection) { // select previous item if selection removed + selection = this.item(i - 1) || this.item(0); + if (selection) { + selection.set('selected', 1); + } + } + + this.get('contentBox').focusManager.refresh(); + }, + + _initAria: function() { + var contentBox = this.get('contentBox'), + tablist = contentBox.one(_queries.tabviewList); + + if (tablist) { + tablist.setAttrs({ + //'aria-labelledby': + role: 'tablist' + }); + } + }, + + bindUI: function() { + // Use the Node Focus Manager to add keyboard support: + // Pressing the left and right arrow keys will move focus + // among each of the tabs. + + this.get('contentBox').plug(Y.Plugin.NodeFocusManager, { + descendants: DOT + _classNames.tabLabel, + keys: { next: 'down:39', // Right arrow + previous: 'down:37' }, // Left arrow + circular: true + }); + + this.after('render', this._setDefSelection); + this.after('addChild', this._afterChildAdded); + this.after('removeChild', this._afterChildRemoved); + }, + + renderUI: function() { + var contentBox = this.get('contentBox'); + this._renderListBox(contentBox); + this._renderPanelBox(contentBox); + this._childrenContainer = this.get('listNode'); + this._renderTabs(contentBox); + }, + + _setDefSelection: function(contentBox) { + // If no tab is selected, select the first tab. + var selection = this.get('selection') || this.item(0); + + this.some(function(tab) { + if (tab.get('selected')) { + selection = tab; + return true; + } + }); + if (selection) { + // TODO: why both needed? (via widgetParent/Child)? + this.set('selection', selection); + selection.set('selected', 1); + } + }, + + _renderListBox: function(contentBox) { + var node = this.get('listNode'); + if (!node.inDoc()) { + contentBox.append(node); + } + }, + + _renderPanelBox: function(contentBox) { + var node = this.get('panelNode'); + if (!node.inDoc()) { + contentBox.append(node); + } + }, + + _renderTabs: function(contentBox) { + var tabs = contentBox.all(_queries.tab), + panelNode = this.get('panelNode'), + panels = (panelNode) ? this.get('panelNode').get('children') : null, + tabview = this; + + if (tabs) { // add classNames and fill in Tab fields from markup when possible + tabs.addClass(_classNames.tab); + contentBox.all(_queries.tabLabel).addClass(_classNames.tabLabel); + contentBox.all(_queries.tabPanel).addClass(_classNames.tabPanel); + + tabs.each(function(node, i) { + var panelNode = (panels) ? panels.item(i) : null; + tabview.add({ + boundingBox: node, + contentBox: node.one(DOT + _classNames.tabLabel), + label: node.one(DOT + _classNames.tabLabel).get('text'), + panelNode: panelNode + }); + }); + } + } +}, { + + LIST_TEMPLATE: '
              ', + PANEL_TEMPLATE: '
              ', + + ATTRS: { + defaultChildType: { + value: 'Tab' + }, + + listNode: { + setter: function(node) { + node = Y.one(node); + if (node) { + node.addClass(_classNames.tabviewList); + } + return node; + }, + + valueFn: '_defListNodeValueFn' + }, + + panelNode: { + setter: function(node) { + node = Y.one(node); + if (node) { + node.addClass(_classNames.tabviewPanel); + } + return node; + }, + + valueFn: '_defPanelNodeValueFn' + }, + + tabIndex: { + value: null + //validator: '_validTabIndex' + } + }, + + HTML_PARSER: { + listNode: _queries.tabviewList, + panelNode: _queries.tabviewPanel + } +}); + +Y.TabView = TabView; +var Lang = Y.Lang, + _queries = Y.TabviewBase._queries, + _classNames = Y.TabviewBase._classNames, + getClassName = Y.ClassNameManager.getClassName; + +/** + * Provides Tab instances for use with TabView + * @param config {Object} Object literal specifying tabview configuration properties. + * + * @class Tab + * @constructor + * @extends Widget + * @uses WidgetChild + */ +Y.Tab = Y.Base.create('tab', Y.Widget, [Y.WidgetChild], { + BOUNDING_TEMPLATE: '
            • ', + CONTENT_TEMPLATE: '', + PANEL_TEMPLATE: '
              ', + + _uiSetSelectedPanel: function(selected) { + this.get('panelNode').toggleClass(_classNames.selectedPanel, selected); + }, + + _afterTabSelectedChange: function(event) { + this._uiSetSelectedPanel(event.newVal); + }, + + _afterParentChange: function(e) { + if (!e.newVal) { + this._remove(); + } else { + this._add(); + } + }, + + _initAria: function() { + var anchor = this.get('contentBox'), + id = anchor.get('id'), + panel = this.get('panelNode'); + + if (!id) { + id = Y.guid(); + anchor.set('id', id); + } + // Apply the ARIA roles, states and properties to each tab + anchor.set('role', 'tab'); + anchor.get('parentNode').set('role', 'presentation'); + + + // Apply the ARIA roles, states and properties to each panel + panel.setAttrs({ + role: 'tabpanel', + 'aria-labelledby': id + }); + }, + + syncUI: function() { + this.set('label', this.get('label')); + this.set('content', this.get('content')); + this._uiSetSelectedPanel(this.get('selected')); + }, + + bindUI: function() { + this.after('selectedChange', this._afterTabSelectedChange); + this.after('parentChange', this._afterParentChange); + }, + + renderUI: function() { + this._renderPanel(); + this._initAria(); + }, + + _renderPanel: function() { + this.get('parent').get('panelNode') + .appendChild(this.get('panelNode')); + }, + + _add: function() { + var parent = this.get('parent').get('contentBox'), + list = parent.get('listNode'), + panel = parent.get('panelNode'); + + if (list) { + list.appendChild(this.get('boundingBox')); + } + + if (panel) { + panel.appendChild(this.get('panelNode')); + } + }, + + _remove: function() { + this.get('boundingBox').remove(); + this.get('panelNode').remove(); + }, + + _onActivate: function(e) { + if (e.target === this) { + // Prevent the browser from navigating to the URL specified by the + // anchor's href attribute. + e.domEvent.preventDefault(); + e.target.set('selected', 1); + } + }, + + initializer: function() { + this.publish(this.get('triggerEvent'), { + defaultFn: this._onActivate + }); + }, + + _defLabelSetter: function(label) { + this.get('contentBox').setContent(label); + return label; + }, + + _defContentSetter: function(content) { + this.get('panelNode').setContent(content); + return content; + }, + + // find panel by ID mapping from label href + _defPanelNodeValueFn: function() { + var href = this.get('contentBox').get('href') || '', + parent = this.get('parent'), + hashIndex = href.indexOf('#'), + panel; + + href = href.substr(hashIndex); + + if (href.charAt(0) === '#') { // in-page nav, find by ID + panel = Y.one(href); + if (panel) { + panel.addClass(_classNames.tabPanel); + } + } + + // use the one found by id, or else try matching indices + if (!panel && parent) { + panel = parent.get('panelNode') + .get('children').item(this.get('index')); + } + + if (!panel) { // create if none found + panel = Y.Node.create(this.PANEL_TEMPLATE); + } + return panel; + } +}, { + ATTRS: { + /** + * @attribute triggerEvent + * @default "click" + * @type String + */ + triggerEvent: { + value: 'click' + }, + + /** + * @attribute label + * @type String + */ + label: { + setter: '_defLabelSetter', + validator: Lang.isString + }, + + /** + * @attribute content + * @type String + */ + content: { + setter: '_defContentSetter', + validator: Lang.isString + }, + + /** + * @attribute panelNode + * @type Y.Node + */ + panelNode: { + setter: function(node) { + node = Y.one(node); + if (node) { + node.addClass(_classNames.tabPanel); + } + return node; + }, + valueFn: '_defPanelNodeValueFn' + }, + + tabIndex: { + value: null, + validator: '_validTabIndex' + } + + }, + + HTML_PARSER: { + selected: function(contentBox) { + var ret = (this.get('boundingBox').hasClass(_classNames.selectedTab)) ? + 1 : 0; + return ret; + } + } + +}); + + +}, '3.3.0' ,{requires:['substitute', 'node-pluginhost', 'node-focusmanager', 'tabview-base', 'widget', 'widget-parent', 'widget-child']}); diff --git a/jssource/src_files/include/javascript/yui3/build/test/test-min.js b/jssource/src_files/include/javascript/yui3/build/test/test-min.js index 55acff15..462ae8a6 100644 --- a/jssource/src_files/include/javascript/yui3/build/test/test-min.js +++ b/jssource/src_files/include/javascript/yui3/build/test/test-min.js @@ -1,12 +1,12 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("test",function(B){B.namespace("Test");B.Test.Case=function(C){this._should={};for(var D in C){this[D]=C[D];}if(!B.Lang.isString(this.name)){this.name="testCase"+B.guid();}};B.Test.Case.prototype={resume:function(C){B.Test.Runner.resume(C);},wait:function(E,D){var C=arguments;if(B.Lang.isFunction(C[0])){throw new B.Test.Wait(C[0],C[1]);}else{throw new B.Test.Wait(function(){B.Assert.fail("Timeout: wait() called but resume() never called.");},(B.Lang.isNumber(C[0])?C[0]:10000));}},setUp:function(){},tearDown:function(){}};B.Test.Wait=function(D,C){this.segment=(B.Lang.isFunction(D)?D:null);this.delay=(B.Lang.isNumber(C)?C:0);};B.namespace("Test");B.Test.Suite=function(C){this.name="";this.items=[];if(B.Lang.isString(C)){this.name=C;}else{if(B.Lang.isObject(C)){B.mix(this,C,true);}}if(this.name===""){this.name="testSuite"+B.guid();}};B.Test.Suite.prototype={add:function(C){if(C instanceof B.Test.Suite||C instanceof B.Test.Case){this.items.push(C);}return this;},setUp:function(){},tearDown:function(){}};B.Test.Runner=(function(){function D(E){this.testObject=E;this.firstChild=null;this.lastChild=null;this.parent=null;this.next=null;this.results={passed:0,failed:0,total:0,ignored:0};if(E instanceof B.Test.Suite){this.results.type="testsuite";this.results.name=E.name;}else{if(E instanceof B.Test.Case){this.results.type="testcase";this.results.name=E.name;}}}D.prototype={appendChild:function(E){var F=new D(E);if(this.firstChild===null){this.firstChild=this.lastChild=F;}else{this.lastChild.next=F;this.lastChild=F;}F.parent=this;return F;}};function C(){C.superclass.constructor.apply(this,arguments);this.masterSuite=new B.Test.Suite("YUI Test Results");this._cur=null;this._root=null;this._log=true;this._waiting=false;var F=[this.TEST_CASE_BEGIN_EVENT,this.TEST_CASE_COMPLETE_EVENT,this.TEST_SUITE_BEGIN_EVENT,this.TEST_SUITE_COMPLETE_EVENT,this.TEST_PASS_EVENT,this.TEST_FAIL_EVENT,this.TEST_IGNORE_EVENT,this.COMPLETE_EVENT,this.BEGIN_EVENT];for(var E=0;E-1&&I.indexOf(" ")>-1))&&B.Lang.isFunction(G[I])){H.appendChild(I);}}},_addTestSuiteToTestTree:function(E,H){var G=E.appendChild(H);for(var F=0;F0){return B.Lang.substitute(D,{message:C});}else{return C;}},_getCount:function(){return this._asserts;},_increment:function(){this._asserts++;},_reset:function(){this._asserts=0;},fail:function(C){throw new B.Assert.Error(B.Assert._formatMessage(C,"Test force-failed."));},areEqual:function(D,E,C){B.Assert._increment();if(D!=E){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,"Values should be equal."),D,E);}},areNotEqual:function(C,E,D){B.Assert._increment();if(C==E){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(D,"Values should not be equal."),C);}},areNotSame:function(C,E,D){B.Assert._increment();if(C===E){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(D,"Values should not be the same."),C);}},areSame:function(D,E,C){B.Assert._increment();if(D!==E){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,"Values should be the same."),D,E);}},isFalse:function(D,C){B.Assert._increment();if(false!==D){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,"Value should be false."),false,D);}},isTrue:function(D,C){B.Assert._increment();if(true!==D){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,"Value should be true."),true,D);}},isNaN:function(D,C){B.Assert._increment();if(!isNaN(D)){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,"Value should be NaN."),NaN,D);}},isNotNaN:function(D,C){B.Assert._increment();if(isNaN(D)){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(C,"Values should not be NaN."),NaN);}},isNotNull:function(D,C){B.Assert._increment();if(B.Lang.isNull(D)){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(C,"Values should not be null."),null);}},isNotUndefined:function(D,C){B.Assert._increment();if(B.Lang.isUndefined(D)){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(C,"Value should not be undefined."),undefined);}},isNull:function(D,C){B.Assert._increment();if(!B.Lang.isNull(D)){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,"Value should be null."),null,D);}},isUndefined:function(D,C){B.Assert._increment();if(!B.Lang.isUndefined(D)){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,"Value should be undefined."),undefined,D);}},isArray:function(D,C){B.Assert._increment();if(!B.Lang.isArray(D)){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(C,"Value should be an array."),D);}},isBoolean:function(D,C){B.Assert._increment();if(!B.Lang.isBoolean(D)){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(C,"Value should be a Boolean."),D);}},isFunction:function(D,C){B.Assert._increment();if(!B.Lang.isFunction(D)){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(C,"Value should be a function."),D);}},isInstanceOf:function(D,E,C){B.Assert._increment();if(!(E instanceof D)){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,"Value isn't an instance of expected type."),D,E);}},isNumber:function(D,C){B.Assert._increment();if(!B.Lang.isNumber(D)){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(C,"Value should be a number."),D);}},isObject:function(D,C){B.Assert._increment();if(!B.Lang.isObject(D)){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(C,"Value should be an object."),D);}},isString:function(D,C){B.Assert._increment(); -if(!B.Lang.isString(D)){throw new B.Assert.UnexpectedValue(B.Assert._formatMessage(C,"Value should be a string."),D);}},isTypeOf:function(C,E,D){B.Assert._increment();if(typeof E!=C){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(D,"Value should be of type "+C+"."),expected,typeof E);}}};B.assert=function(D,C){B.Assert._increment();if(!D){throw new B.Assert.Error(B.Assert._formatMessage(C,"Assertion failed."));}};B.fail=B.Assert.fail;B.Assert.Error=function(C){arguments.callee.superclass.constructor.call(this,C);this.message=C;this.name="Assert Error";};B.extend(B.Assert.Error,Error,{getMessage:function(){return this.message;},toString:function(){return this.name+": "+this.getMessage();},valueOf:function(){return this.toString();}});B.Assert.ComparisonFailure=function(D,C,E){arguments.callee.superclass.constructor.call(this,D);this.expected=C;this.actual=E;this.name="ComparisonFailure";};B.extend(B.Assert.ComparisonFailure,B.Assert.Error,{getMessage:function(){return this.message+"\nExpected: "+this.expected+" ("+(typeof this.expected)+")"+"\nActual: "+this.actual+" ("+(typeof this.actual)+")";}});B.Assert.UnexpectedValue=function(D,C){arguments.callee.superclass.constructor.call(this,D);this.unexpected=C;this.name="UnexpectedValue";};B.extend(B.Assert.UnexpectedValue,B.Assert.Error,{getMessage:function(){return this.message+"\nUnexpected: "+this.unexpected+" ("+(typeof this.unexpected)+") ";}});B.Assert.ShouldFail=function(C){arguments.callee.superclass.constructor.call(this,C||"This test should fail but didn't.");this.name="ShouldFail";};B.extend(B.Assert.ShouldFail,B.Assert.Error);B.Assert.ShouldError=function(C){arguments.callee.superclass.constructor.call(this,C||"This test should have thrown an error but didn't.");this.name="ShouldError";};B.extend(B.Assert.ShouldError,B.Assert.Error);B.Assert.UnexpectedError=function(C){arguments.callee.superclass.constructor.call(this,"Unexpected error: "+C.message);this.cause=C;this.name="UnexpectedError";this.stack=C.stack;};B.extend(B.Assert.UnexpectedError,B.Assert.Error);B.ArrayAssert={contains:function(E,D,C){B.Assert._increment();if(B.Array.indexOf(D,E)==-1){B.Assert.fail(B.Assert._formatMessage(C,"Value "+E+" ("+(typeof E)+") not found in array ["+D+"]."));}},containsItems:function(E,F,D){B.Assert._increment();for(var C=0;C-1){B.Assert.fail(B.Assert._formatMessage(C,"Value found in array ["+D+"]."));}},doesNotContainItems:function(E,F,D){B.Assert._increment();for(var C=0;C-1){B.Assert.fail(B.Assert._formatMessage(D,"Value found in array ["+F+"]."));}}},doesNotContainMatch:function(E,D,C){B.Assert._increment();if(typeof E!="function"){throw new TypeError("ArrayAssert.doesNotContainMatch(): First argument must be a function.");}if(B.Array.some(D,E)){B.Assert.fail(B.Assert._formatMessage(C,"Value found in array ["+D+"]."));}},indexOf:function(G,F,C,E){B.Assert._increment();for(var D=0;D0){B.Assert.fail(B.Assert._formatMessage(C,"Array should be empty."));}},isNotEmpty:function(D,C){B.Assert._increment();if(D.length===0){B.Assert.fail(B.Assert._formatMessage(C,"Array should not be empty."));}},itemsAreSame:function(E,F,D){B.Assert._increment();if(E.length!=F.length){B.Assert.fail(B.Assert._formatMessage(D,"Array should have a length of "+E.length+" but has a length of "+F.length));}for(var C=0;C=0;D--){if(F[D]===G){if(C!=D){B.Assert.fail(B.Assert._formatMessage(E,"Value exists at index "+D+" but should be at index "+C+"."));}return;}}B.Assert.fail(B.Assert._formatMessage(E,"Value doesn't exist in array."));}};B.ObjectAssert={areEqual:function(D,E,C){B.Assert._increment();B.Object.each(D,function(G,F){if(D[F]!=E[F]){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,"Values should be equal for property "+F),D[F],E[F]);}});},hasKey:function(C,D,E){B.Assert._increment();if(!B.Object.hasKey(D,C)){B.fail(B.Assert._formatMessage(E,"Property '"+C+"' not found on object."));}},hasKeys:function(E,C,F){B.Assert._increment();for(var D=0;D0){B.fail(B.Assert._formatMessage(E,"Object owns "+D.length+" properties but should own none."));}}};B.DateAssert={datesAreEqual:function(D,F,C){B.Assert._increment();if(D instanceof Date&&F instanceof Date){var E="";if(D.getFullYear()!=F.getFullYear()){E="Years should be equal.";}if(D.getMonth()!=F.getMonth()){E="Months should be equal.";}if(D.getDate()!=F.getDate()){E="Days of month should be equal.";}if(E.length){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,E),D,F);}}else{throw new TypeError("Y.Assert.datesAreEqual(): Expected and actual values must be Date objects.");}},timesAreEqual:function(D,F,C){B.Assert._increment();if(D instanceof Date&&F instanceof Date){var E="";if(D.getHours()!=F.getHours()){E="Hours should be equal.";}if(D.getMinutes()!=F.getMinutes()){E="Minutes should be equal.";}if(D.getSeconds()!=F.getSeconds()){E="Seconds should be equal.";}if(E.length){throw new B.Assert.ComparisonFailure(B.Assert._formatMessage(C,E),D,F);}}else{throw new TypeError("DateY.AsserttimesAreEqual(): Expected and actual values must be Date objects.");}}};B.namespace("Test.Format");function A(C){return C.replace(/[<>"'&]/g,function(D){switch(D){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&";}});}B.Test.Format.JSON=function(C){return B.JSON.stringify(C);};B.Test.Format.XML=function(E){var C=B.Lang;var D="<"+E.type+' name="'+A(E.name)+'"';if(E.type=="test"){D+=' result="'+A(E.result)+'" message="'+A(E.message)+'">';}else{D+=' passed="'+E.passed+'" failed="'+E.failed+'" ignored="'+E.ignored+'" total="'+E.total+'">';B.Object.each(E,function(F,G){if(C.isObject(F)&&!C.isArray(F)){D+=arguments.callee(F);}});}D+="";return D;};B.Test.Format.XML=function(D){function C(G){var E=B.Lang,F="<"+G.type+' name="'+A(G.name)+'"';if(E.isNumber(G.duration)){F+=' duration="'+G.duration+'"';}if(G.type=="test"){F+=' result="'+G.result+'" message="'+A(G.message)+'">';}else{F+=' passed="'+G.passed+'" failed="'+G.failed+'" ignored="'+G.ignored+'" total="'+G.total+'">';B.Object.each(G,function(H,I){if(E.isObject(H)&&!E.isArray(H)){F+=C(H);}});}F+="";return F;}return''+C(D);};B.Test.Format.JUnitXML=function(C){function D(G){var E=B.Lang,F="",H;switch(G.type){case"test":if(G.result!="ignore"){F='';if(G.result=="fail"){F+='";}F+="";}break;case"testcase":F='';B.Object.each(G,function(I,J){if(E.isObject(I)&&!E.isArray(I)){F+=D(I);}});F+="";break;case"testsuite":B.Object.each(G,function(I,J){if(E.isObject(I)&&!E.isArray(I)){F+=D(I);}});break;case"report":F="";B.Object.each(G,function(I,J){if(E.isObject(I)&&!E.isArray(I)){F+=D(I);}});F+="";}return F;}return''+D(C);};B.namespace("Test");B.Test.Reporter=function(C,D){this.url=C;this.format=D||B.Test.Format.XML;this._fields=new Object();this._form=null;this._iframe=null;};B.Test.Reporter.prototype={constructor:B.Test.Reporter,addField:function(C,D){this._fields[C]=D;},clearFields:function(){this._fields=new Object();},destroy:function(){if(this._form){this._form.parentNode.removeChild(this._form);this._form=null;}if(this._iframe){this._iframe.parentNode.removeChild(this._iframe);this._iframe=null;}this._fields=null;},report:function(C){if(!this._form){this._form=document.createElement("form");this._form.method="post";this._form.style.visibility="hidden";this._form.style.position="absolute";this._form.style.top=0;document.body.appendChild(this._form);if(B.UA.ie){this._iframe=document.createElement('';this._iframe=c.firstChild;this._iframe.src="javascript:false";this._iframe.style.visibility="hidden";this._iframe.style.position="absolute"; +this._iframe.style.top=0;document.body.appendChild(this._iframe);this._form.target="yuiTestTarget";}this._form.action=this.url;while(this._form.hasChildNodes()){this._form.removeChild(this._form.lastChild);}this._fields.results=this.format(d);this._fields.useragent=navigator.userAgent;this._fields.timestamp=(new Date()).toLocaleString();b.Object.each(this._fields,function(f,g){if(typeof f!="function"){var e=document.createElement("input");e.type="hidden";e.name=g;e.value=f;this._form.appendChild(e);}},this);delete this._fields.results;delete this._fields.useragent;delete this._fields.timestamp;if(arguments[1]!==false){this._form.submit();}}};b.Mock=function(e){e=e||{};var c=null;try{c=b.Object(e);}catch(d){c={};b.log("Couldn't create mock with prototype.","warn","Mock");}b.Object.each(e,function(f){if(b.Lang.isFunction(e[f])){c[f]=function(){b.Assert.fail("Method "+f+"() was called but was not expected to be.");};}});return c;};b.Mock.expect=function(d,h){if(!d.__expectations){d.__expectations={};}if(h.method){var g=h.method,f=h.args||h.arguments||[],c=h.returns,j=b.Lang.isNumber(h.callCount)?h.callCount:1,e=h.error,i=h.run||function(){};d.__expectations[g]=h;h.callCount=j;h.actualCallCount=0;b.Array.each(f,function(k,l,m){if(!(m[l] instanceof b.Mock.Value)){m[l]=b.Mock.Value(b.Assert.areSame,[k],"Argument "+l+" of "+g+"() is incorrect.");}});if(j>0){d[g]=function(){try{h.actualCallCount++;b.Assert.areEqual(f.length,arguments.length,"Method "+g+"() passed incorrect number of arguments.");for(var m=0,k=f.length;m"; - } else { - xml += " passed=\"" + results.passed + "\" failed=\"" + results.failed + "\" ignored=\"" + results.ignored + "\" total=\"" + results.total + "\">"; - Y.Object.each(results, function(value, prop){ - if (l.isObject(value) && !l.isArray(value)){ - xml += arguments.callee(value); - } - }); - } - - xml += ""; - - return xml; - - }; - - /** - * Returns test results formatted as an XML string. - * @param {Object} result The results object created by TestRunner. - * @return {String} An XML-formatted string of results. - * @namespace Test.Format * @method XML * @static */ @@ -2368,7 +2485,7 @@ YUI.add('test', function(Y) { xml += " result=\"" + results.result + "\" message=\"" + xmlEscape(results.message) + "\">"; } else { xml += " passed=\"" + results.passed + "\" failed=\"" + results.failed + "\" ignored=\"" + results.ignored + "\" total=\"" + results.total + "\">"; - Y.Object.each(results, function(value, prop){ + Y.Object.each(results, function(value){ if (l.isObject(value) && !l.isArray(value)){ xml += serializeToXML(value); } @@ -2380,7 +2497,7 @@ YUI.add('test', function(Y) { return xml; } - return "" + serializeToXML(results); + return "" + serializeToXML(results); }; @@ -2389,23 +2506,20 @@ YUI.add('test', function(Y) { * Returns test results formatted in JUnit XML format. * @param {Object} result The results object created by TestRunner. * @return {String} An XML-formatted string of results. - * @namespace Test.Format * @method JUnitXML * @static */ Y.Test.Format.JUnitXML = function(results) { - function serializeToJUnitXML(results){ var l = Y.Lang, - xml = "", - prop; + xml = ""; switch (results.type){ //equivalent to testcase in JUnit case "test": if (results.result != "ignore"){ - xml = ""; + xml = ""; if (results.result == "fail"){ xml += ""; } @@ -2416,9 +2530,9 @@ YUI.add('test', function(Y) { //equivalent to testsuite in JUnit case "testcase": - xml = ""; + xml = ""; - Y.Object.each(results, function(value, prop){ + Y.Object.each(results, function(value){ if (l.isObject(value) && !l.isArray(value)){ xml += serializeToJUnitXML(value); } @@ -2427,21 +2541,21 @@ YUI.add('test', function(Y) { xml += ""; break; + //no JUnit equivalent, don't output anything case "testsuite": - Y.Object.each(results, function(value, prop){ + Y.Object.each(results, function(value){ if (l.isObject(value) && !l.isArray(value)){ xml += serializeToJUnitXML(value); } - }); - - //skip output - no JUnit equivalent + }); break; + //top-level, equivalent to testsuites in JUnit case "report": xml = ""; - Y.Object.each(results, function(value, prop){ + Y.Object.each(results, function(value){ if (l.isObject(value) && !l.isArray(value)){ xml += serializeToJUnitXML(value); } @@ -2456,10 +2570,131 @@ YUI.add('test', function(Y) { } - return "" + serializeToJUnitXML(results); + return "" + serializeToJUnitXML(results); }; + /** + * Returns test results formatted in TAP format. + * For more information, see Test Anything Protocol. + * @param {Object} result The results object created by TestRunner. + * @return {String} A TAP-formatted string of results. + * @method TAP + * @static + */ + Y.Test.Format.TAP = function(results) { + + var currentTestNum = 1; + function serializeToTAP(results){ + var l = Y.Lang, + text = ""; + + switch (results.type){ + + case "test": + if (results.result != "ignore"){ + + text = "ok " + (currentTestNum++) + " - " + results.name; + + if (results.result == "fail"){ + text = "not " + text + " - " + results.message; + } + + text += "\n"; + } else { + text = "#Ignored test " + results.name + "\n"; + } + break; + + case "testcase": + + text = "#Begin testcase " + results.name + "(" + results.failed + " failed of " + results.total + ")\n"; + + Y.Object.each(results, function(value){ + if (l.isObject(value) && !l.isArray(value)){ + text += serializeToTAP(value); + } + }); + + text += "#End testcase " + results.name + "\n"; + + + break; + + case "testsuite": + + text = "#Begin testsuite " + results.name + "(" + results.failed + " failed of " + results.total + ")\n"; + + Y.Object.each(results, function(value){ + if (l.isObject(value) && !l.isArray(value)){ + text += serializeToTAP(value); + } + }); + + text += "#End testsuite " + results.name + "\n"; + break; + + case "report": + + Y.Object.each(results, function(value){ + if (l.isObject(value) && !l.isArray(value)){ + text += serializeToTAP(value); + } + }); + + //no default + } + + return text; + + } + + return "1.." + results.total + "\n" + serializeToTAP(results); + }; + + + + Y.namespace("Coverage.Format"); + + /** + * Contains specific formatting options for coverage information. + * @namespace Coverage + * @class Format + * @static + */ + + /** + * Returns the coverage report in JSON format. This is the straight + * JSON representation of the native coverage report. + * @param {Object} coverage The coverage report object. + * @return {String} A JSON-formatted string of coverage data. + * @method JSON + * @static + */ + Y.Coverage.Format.JSON = function(coverage){ + return Y.JSON.stringify(coverage); + }; + + /** + * Returns the coverage report in a JSON format compatible with + * Xdebug. See Xdebug Documentation + * for more information. Note: function coverage is not available + * in this format. + * @param {Object} coverage The coverage report object. + * @return {String} A JSON-formatted string of coverage data. + * @method XdebugJSON + * @static + */ + Y.Coverage.Format.XdebugJSON = function(coverage){ + var report = {}; + Y.Object.each(coverage, function(value, name){ + report[name] = coverage[name].lines; + }); + return Y.JSON.stringify(report); + }; + + + Y.namespace("Test"); @@ -2573,13 +2808,10 @@ YUI.add('test', function(Y) { this._form.style.top = 0; document.body.appendChild(this._form); - //IE won't let you assign a name using the DOM, must do it the hacky way - if (Y.UA.ie){ - this._iframe = document.createElement(""; + this._iframe = iframeContainer.firstChild; this._iframe.src = "javascript:false"; this._iframe.style.visibility = "hidden"; @@ -2626,21 +2858,22 @@ YUI.add('test', function(Y) { } }; - /** * Creates a new mock object. * @class Mock * @constructor * @param {Object} template (Optional) An object whose methods - * should be stubbed out on the mock object. + * should be stubbed out on the mock object. This object + * is used as the prototype of the mock object so instanceof + * works correctly. */ Y.Mock = function(template){ - + //use blank object is nothing is passed in template = template || {}; - + var mock = null; - + //try to create mock that keeps prototype chain intact try { mock = Y.Object(template); @@ -2648,7 +2881,7 @@ YUI.add('test', function(Y) { mock = {}; Y.log("Couldn't create mock with prototype.", "warn", "Mock"); } - + //create new versions of the methods so that they don't actually do anything Y.Object.each(template, function(name){ if (Y.Lang.isFunction(template[name])){ @@ -2657,11 +2890,11 @@ YUI.add('test', function(Y) { }; } }); - + //return it - return mock; + return mock; }; - + /** * Assigns an expectation to a mock object. This is used to create * methods and properties on the mock object that are monitored for @@ -2674,7 +2907,7 @@ YUI.add('test', function(Y) { * @return {void} * @method expect * @static - */ + */ Y.Mock.expect = function(mock /*:Object*/, expectation /*:Object*/){ //make sure there's a place to store the expectations @@ -2690,22 +2923,22 @@ YUI.add('test', function(Y) { callCount = Y.Lang.isNumber(expectation.callCount) ? expectation.callCount : 1, error = expectation.error, run = expectation.run || function(){}; - + //save expectations mock.__expectations[name] = expectation; expectation.callCount = callCount; expectation.actualCallCount = 0; - + //process arguments Y.Array.each(args, function(arg, i, array){ if (!(array[i] instanceof Y.Mock.Value)){ array[i] = Y.Mock.Value(Y.Assert.areSame, [arg], "Argument " + i + " of " + name + "() is incorrect."); } }); - + //if the method is expected to be called if (callCount > 0){ - mock[name] = function(){ + mock[name] = function(){ try { expectation.actualCallCount++; Y.Assert.areEqual(args.length, arguments.length, "Method " + name + "() passed incorrect number of arguments."); @@ -2715,11 +2948,11 @@ YUI.add('test', function(Y) { //} else { // Y.Assert.fail("Argument " + i + " (" + arguments[i] + ") was not expected to be used."); //} - - } - + + } + run.apply(this, arguments); - + if (error){ throw error; } @@ -2727,11 +2960,11 @@ YUI.add('test', function(Y) { //route through TestRunner for proper handling Y.Test.Runner._handleError(ex); } - + return result; }; } else { - + //method should fail if called when not expected mock[name] = function(){ try { @@ -2739,7 +2972,7 @@ YUI.add('test', function(Y) { } catch (ex){ //route through TestRunner for proper handling Y.Test.Runner._handleError(ex); - } + } }; } } else if (expectation.property){ @@ -2755,14 +2988,14 @@ YUI.add('test', function(Y) { * @return {void} * @method verify * @static - */ - Y.Mock.verify = function(mock /*:Object*/){ + */ + Y.Mock.verify = function(mock /*:Object*/){ try { Y.Object.each(mock.__expectations, function(expectation){ if (expectation.method) { Y.Assert.areEqual(expectation.callCount, expectation.actualCallCount, "Method " + expectation.method + "() wasn't called the expected number of times."); } else if (expectation.property){ - Y.Assert.areEqual(expectation.value, mock[expectation.property], "Property " + expectation.property + " wasn't set to the correct value."); + Y.Assert.areEqual(expectation.value, mock[expectation.property], "Property " + expectation.property + " wasn't set to the correct value."); } }); } catch (ex){ @@ -2771,8 +3004,22 @@ YUI.add('test', function(Y) { } }; + /** + * Defines a custom mock validator for a particular argument. + * @param {Function} method The method to run on the argument. This should + * throw an assertion error if the value is invalid. + * @param {Array} originalArgs The first few arguments to pass in + * to the method. The value to test and failure message are + * always the last two arguments passed into method. + * @param {String} message The message to display if validation fails. If + * not specified, the default assertion error message is displayed. + * @return {void} + * @namespace Mock + * @constructor Value + * @static + */ Y.Mock.Value = function(method, originalArgs, message){ - if (this instanceof Y.Mock.Value){ + if (Y.instanceOf(this, Y.Mock.Value)){ this.verify = function(value){ var args = [].concat(originalArgs || []); args.push(value); @@ -2783,14 +3030,68 @@ YUI.add('test', function(Y) { return new Y.Mock.Value(method, originalArgs, message); } }; - + + /** + * Mock argument validator that accepts any value as valid. + * @namespace Mock.Value + * @property Any + * @type Function + * @static + */ Y.Mock.Value.Any = Y.Mock.Value(function(){}); + + /** + * Mock argument validator that accepts only Boolean values as valid. + * @namespace Mock.Value + * @property Boolean + * @type Function + * @static + */ Y.Mock.Value.Boolean = Y.Mock.Value(Y.Assert.isBoolean); + + /** + * Mock argument validator that accepts only numeric values as valid. + * @namespace Mock.Value + * @property Number + * @type Function + * @static + */ Y.Mock.Value.Number = Y.Mock.Value(Y.Assert.isNumber); + + /** + * Mock argument validator that accepts only String values as valid. + * @namespace Mock.Value + * @property String + * @type Function + * @static + */ Y.Mock.Value.String = Y.Mock.Value(Y.Assert.isString); + + /** + * Mock argument validator that accepts only non-null objects values as valid. + * @namespace Mock.Value + * @property Object + * @type Function + * @static + */ Y.Mock.Value.Object = Y.Mock.Value(Y.Assert.isObject); - Y.Mock.Value.Function = Y.Mock.Value(Y.Assert.isFunction); + /** + * Mock argument validator that accepts onlyfunctions as valid. + * @namespace Mock.Value + * @property Function + * @type Function + * @static + */ + Y.Mock.Value.Function = Y.Mock.Value(Y.Assert.isFunction); +/*Stub for future compatibility*/ +if (typeof YUITest == "undefined" || !YUITest) { + YUITest = { + TestRunner: Y.Test.Runner, + ResultsFormat: Y.Test.Format, + CoverageFormat: Y.Coverage.Format + }; +} -}, '3.0.0' ,{requires:['substitute','event-base']}); +}, '3.3.0' ,{requires:['substitute','event-base','json-stringify']}); diff --git a/jssource/src_files/include/javascript/yui3/build/text/text-accentfold-min.js b/jssource/src_files/include/javascript/yui3/build/text/text-accentfold-min.js new file mode 100644 index 00000000..a6ace7c0 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/text/text-accentfold-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("text-accentfold",function(e){var c=e.Array,b=e.Text,a=b.Data.AccentFold,d={canFold:function(f){var g;for(g in a){if(a.hasOwnProperty(g)&&f.search(a[g])!==-1){return true;}}return false;},compare:function(g,f,h){var i=d.fold(g),j=d.fold(f);return h?!!h(i,j):i===j;},filter:function(g,f){return c.filter(g,function(h){return f(d.fold(h));});},fold:function(f){if(e.Lang.isArray(f)){return c.map(f,d.fold);}f=f.toLowerCase();e.Object.each(a,function(h,g){f=f.replace(h,g);});return f;}};b.AccentFold=d;},"3.3.0",{requires:["array-extras","text-data-accentfold"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/text/text-accentfold.js b/jssource/src_files/include/javascript/yui3/build/text/text-accentfold.js new file mode 100644 index 00000000..978361d0 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/text/text-accentfold.js @@ -0,0 +1,169 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('text-accentfold', function(Y) { + +/** + * Text utilities. + * + * @module text + * @since 3.3.0 + */ + +/** + * Provides a basic accent folding implementation that converts common accented + * letters (like "á") to their non-accented forms (like "a"). + * + * @module text + * @submodule text-accentfold + */ + +/** + *

              + * Provides a basic accent folding implementation that converts common accented + * letters (like "á") to their non-accented forms (like "a"). + *

              + * + *

              + * This implementation is not comprehensive, and should only be used as a last + * resort when accent folding can't be done on the server. A comprehensive + * accent folding implementation would require much more character data to be + * sent to the browser, resulting in a significant performance penalty. This + * implementation strives for a compromise between usefulness and performance. + *

              + * + *

              + * Accent folding is a destructive operation that can't be reversed, and may + * change or destroy the actual meaning of the text depending on the language. + * It should not be used on strings that will later be displayed to a user, + * unless this is done with the understanding that linguistic meaning may be + * lost and that you may in fact confuse or insult the user by doing so. + *

              + * + *

              + * When used for matching, accent folding is likely to produce erroneous matches + * for languages in which characters with diacritics are considered different + * from their base characters, or where correct folding would map to other + * character sequences than just stripped characters. For example, in German + * "ü" is a character that's clearly different from "u" and should match "ue" + * instead. The word "betrügen" means "to defraud", while "betrugen" is the past + * tense of "to behave". The name "Müller" is expected to match "Mueller", but + * not "Muller". On the other hand, accent folding falls short for languages + * where different base characters are expected to match. In Japanese, for + * example, hiragana and katakana characters with the same pronunciation ("あ" + * and "ア") are commonly treated as equivalent for lookups, but accent folding + * treats them as different. + *

              + * + * @class Text.AccentFold + * @static + */ + +var YArray = Y.Array, + Text = Y.Text, + FoldData = Text.Data.AccentFold, + +AccentFold = { + // -- Public Static Methods ------------------------------------------------ + + /** + * Returns true if the specified string contains one or more + * characters that can be folded, false otherwise. + * + * @method canFold + * @param {String} string String to test. + * @return {Boolean} + * @static + */ + canFold: function (string) { + var letter; + + for (letter in FoldData) { + if (FoldData.hasOwnProperty(letter) && + string.search(FoldData[letter]) !== -1) { + return true; + } + } + + return false; + }, + + /** + * Compares the accent-folded versions of two strings and returns + * true if they're the same, false otherwise. If + * a custom comparison function is supplied, the accent-folded strings will + * be passed to that function for comparison. + * + * @method compare + * @param {String} a First string to compare. + * @param {String} b Second string to compare. + * @param {Function} func (optional) Custom comparison function. Should + * return a truthy or falsy value. + * @return {Boolean} Results of the comparison. + * @static + */ + compare: function (a, b, func) { + var aFolded = AccentFold.fold(a), + bFolded = AccentFold.fold(b); + + return func ? !!func(aFolded, bFolded) : aFolded === bFolded; + }, + + /** + *

              + * Returns a copy of haystack containing only the strings for which + * the supplied function returns true. + *

              + * + *

              + * While comparisons will be made using accent-folded strings, the returned + * array of matches will contain the original strings that were passed in. + *

              + * + * @method filter + * @param {Array} haystack Array of strings to filter. + * @param {Function} func Comparison function. Will receive an accent-folded + * haystack string as an argument, and should return a truthy or falsy + * value. + * @return {Array} Filtered copy of haystack. + * @static + */ + filter: function (haystack, func) { + return YArray.filter(haystack, function (item) { + return func(AccentFold.fold(item)); + }); + }, + + /** + * Accent-folds the specified string or array of strings and returns a copy + * in which common accented letters have been converted to their closest + * non-accented, lowercase forms. + * + * @method fold + * @param {String|Array} input String or array of strings to be folded. + * @return {String|Array} Folded string or array of strings. + * @static + */ + fold: function (input) { + if (Y.Lang.isArray(input)) { + return YArray.map(input, AccentFold.fold); + } + + input = input.toLowerCase(); + + Y.Object.each(FoldData, function (regex, letter) { + input = input.replace(regex, letter); + }); + + return input; + } +}; + +Text.AccentFold = AccentFold; + + +}, '3.3.0' ,{requires:['array-extras', 'text-data-accentfold']}); diff --git a/jssource/src_files/include/javascript/yui3/build/text/text-data-accentfold-min.js b/jssource/src_files/include/javascript/yui3/build/text/text-data-accentfold-min.js new file mode 100644 index 00000000..811b1d1c --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/text/text-data-accentfold-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("text-data-accentfold",function(a){a.namespace("Text.Data").AccentFold={0:/[⁰₀⓪0]/gi,1:/[¹₁①1]/gi,2:/[²₂②2]/gi,3:/[³₃③3]/gi,4:/[⁴₄④4]/gi,5:/[⁵₅⑤5]/gi,6:/[⁶₆⑥6]/gi,7:/[⁷₇⑦7]/gi,8:/[⁸₈⑧8]/gi,9:/[⁹₉⑨9]/gi,a:/[ªà-åāăąǎǟǡǻȁȃȧᵃḁẚạảấầẩẫậắằẳẵặⓐa]/gi,b:/[ᵇḃḅḇⓑb]/gi,c:/[çćĉċčᶜḉⓒc]/gi,d:/[ďᵈḋḍḏḑḓⅾⓓd]/gi,e:/[è-ëēĕėęěȅȇȩᵉḕḗḙḛḝẹẻẽếềểễệₑℯⓔe]/gi,f:/[ᶠḟⓕf]/gi,g:/[ĝğġģǧǵᵍḡℊⓖg]/gi,h:/[ĥȟʰḣḥḧḩḫẖℎⓗh]/gi,i:/[ì-ïĩīĭįijǐȉȋᵢḭḯỉịⁱℹⅰⓘi]/gi,j:/[ĵǰʲⓙⱼj]/gi,k:/[ķǩᵏḱḳḵⓚk]/gi,l:/[ĺļľŀljˡḷḹḻḽℓⅼⓛl]/gi,m:/[ᵐḿṁṃⅿⓜm]/gi,n:/[ñńņňǹṅṇṉṋⁿⓝn]/gi,o:/[ºò-öōŏőơǒǫǭȍȏȫȭȯȱᵒṍṏṑṓọỏốồổỗộớờởỡợₒℴⓞo]/gi,p:/[ᵖṕṗⓟp]/gi,q:/[ʠⓠq]/gi,r:/[ŕŗřȑȓʳᵣṙṛṝṟⓡr]/gi,s:/[śŝşšſșˢṡṣṥṧṩẛⓢs]/gi,t:/[ţťțᵗṫṭṯṱẗⓣt]/gi,u:/[ù-üũūŭůűųưǔǖǘǚǜȕȗᵘᵤṳṵṷṹṻụủứừửữựⓤu]/gi,v:/[ᵛᵥṽṿⅴⓥv]/gi,w:/[ŵʷẁẃẅẇẉẘⓦw]/gi,x:/[ˣẋẍₓⅹⓧx]/gi,y:/[ýÿŷȳʸẏẙỳỵỷỹⓨy]/gi,z:/[źżžᶻẑẓẕⓩz]/gi};},"3.3.0"); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/text/text-data-accentfold.js b/jssource/src_files/include/javascript/yui3/build/text/text-data-accentfold.js new file mode 100644 index 00000000..86b6c197 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/text/text-data-accentfold.js @@ -0,0 +1,53 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('text-data-accentfold', function(Y) { + +// The following tool was very helpful in creating these mappings: +// http://unicode.org/cldr/utility/list-unicodeset.jsp?a=[:toNFKD%3D/^a/:]&abb=on + +Y.namespace('Text.Data').AccentFold = { + 0: /[⁰₀⓪0]/gi, + 1: /[¹₁①1]/gi, + 2: /[²₂②2]/gi, + 3: /[³₃③3]/gi, + 4: /[⁴₄④4]/gi, + 5: /[⁵₅⑤5]/gi, + 6: /[⁶₆⑥6]/gi, + 7: /[⁷₇⑦7]/gi, + 8: /[⁸₈⑧8]/gi, + 9: /[⁹₉⑨9]/gi, + a: /[ªà-åāăąǎǟǡǻȁȃȧᵃḁẚạảấầẩẫậắằẳẵặⓐa]/gi, + b: /[ᵇḃḅḇⓑb]/gi, + c: /[çćĉċčᶜḉⓒc]/gi, + d: /[ďᵈḋḍḏḑḓⅾⓓd]/gi, + e: /[è-ëēĕėęěȅȇȩᵉḕḗḙḛḝẹẻẽếềểễệₑℯⓔe]/gi, + f: /[ᶠḟⓕf]/gi, + g: /[ĝğġģǧǵᵍḡℊⓖg]/gi, + h: /[ĥȟʰḣḥḧḩḫẖℎⓗh]/gi, + i: /[ì-ïĩīĭįijǐȉȋᵢḭḯỉịⁱℹⅰⓘi]/gi, + j: /[ĵǰʲⓙⱼj]/gi, + k: /[ķǩᵏḱḳḵⓚk]/gi, + l: /[ĺļľŀljˡḷḹḻḽℓⅼⓛl]/gi, + m: /[ᵐḿṁṃⅿⓜm]/gi, + n: /[ñńņňǹṅṇṉṋⁿⓝn]/gi, + o: /[ºò-öōŏőơǒǫǭȍȏȫȭȯȱᵒṍṏṑṓọỏốồổỗộớờởỡợₒℴⓞo]/gi, + p: /[ᵖṕṗⓟp]/gi, + q: /[ʠⓠq]/gi, + r: /[ŕŗřȑȓʳᵣṙṛṝṟⓡr]/gi, + s: /[śŝşšſșˢṡṣṥṧṩẛⓢs]/gi, + t: /[ţťțᵗṫṭṯṱẗⓣt]/gi, + u: /[ù-üũūŭůűųưǔǖǘǚǜȕȗᵘᵤṳṵṷṹṻụủứừửữựⓤu]/gi, + v: /[ᵛᵥṽṿⅴⓥv]/gi, + w: /[ŵʷẁẃẅẇẉẘⓦw]/gi, + x: /[ˣẋẍₓⅹⓧx]/gi, + y: /[ýÿŷȳʸẏẙỳỵỷỹⓨy]/gi, + z: /[źżžᶻẑẓẕⓩz]/gi +}; + + +}, '3.3.0' ); diff --git a/jssource/src_files/include/javascript/yui3/build/text/text-data-wordbreak-min.js b/jssource/src_files/include/javascript/yui3/build/text/text-data-wordbreak-min.js new file mode 100644 index 00000000..36527307 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/text/text-data-wordbreak-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("text-data-wordbreak",function(a){a.namespace("Text.Data").WordBreak={aletter:"[A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-׳ؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆༀཀ-ཇཉ-ཬྈ-ྌႠ-Ⴥა-ჺჼᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᯀ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〻〼ㄅ-ㄭㄱ-ㆎㆠ-ㆺꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐꞑꞠ-ꞩꟺ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]",midnumlet:"['\\.‘’․﹒'.]",midletter:"[:··״‧︓﹕:]",midnum:"[,;;։،؍٬߸⁄︐︔﹐﹔,;]",numeric:"[0-9٠-٩٫۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹]",cr:"\\r",lf:"\\n",newline:"[\u000B\u000C\u0085\u2028\u2029]",extend:"[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0900-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C01-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C82\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D02\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B6-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAA\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2\u1DC0-\u1DE6\u1DFC-\u1DFF\u200C\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA67C\uA67D\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE26\uFF9E\uFF9F]",format:"[\u00AD\u0600-\u0603\u06DD\u070F\u17B4\u17B5\u200E\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\uFEFF\uFFF9-\uFFFB]",katakana:"[〱-〵゛゜゠-ヺー-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ン]",extendnumlet:"[_‿⁀⁔︳︴﹍-﹏_]",punctuation:"[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・]"};},"3.3.0"); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/text/text-data-wordbreak.js b/jssource/src_files/include/javascript/yui3/build/text/text-data-wordbreak.js new file mode 100644 index 00000000..44ac99bd --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/text/text-data-wordbreak.js @@ -0,0 +1,35 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('text-data-wordbreak', function(Y) { + +Y.namespace('Text.Data').WordBreak = { + // The UnicodeSet utility is helpful for enumerating the specific code + // points covered by each of these regular expressions: + // http://unicode.org/cldr/utility/list-unicodeset.jsp + // + // The code sets from which these regexes were derived can be generated + // by the UnicodeSet utility using the links here: + // http://unicode.org/cldr/utility/properties.jsp?a=Word_Break#Word_Break + + aletter : '[A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-׳ؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆༀཀ-ཇཉ-ཬྈ-ྌႠ-Ⴥა-ჺჼᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᯀ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〻〼ㄅ-ㄭㄱ-ㆎㆠ-ㆺꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐꞑꞠ-ꞩꟺ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]', + midnumlet : "['\\.‘’․﹒'.]", + midletter : '[:··״‧︓﹕:]', + midnum : '[,;;։،؍٬߸⁄︐︔﹐﹔,;]', + numeric : '[0-9٠-٩٫۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹]', + cr : '\\r', + lf : '\\n', + newline : '[\u000B\u000C\u0085\u2028\u2029]', + extend : '[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0900-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C01-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C82\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D02\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B6-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAA\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2\u1DC0-\u1DE6\u1DFC-\u1DFF\u200C\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA67C\uA67D\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE26\uFF9E\uFF9F]', + format : '[\u00AD\u0600-\u0603\u06DD\u070F\u17B4\u17B5\u200E\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\uFEFF\uFFF9-\uFFFB]', + katakana : '[〱-〵゛゜゠-ヺー-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ン]', + extendnumlet: '[_‿⁀⁔︳︴﹍-﹏_]', + punctuation : '[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・]' +}; + + +}, '3.3.0' ); diff --git a/jssource/src_files/include/javascript/yui3/build/text/text-min.js b/jssource/src_files/include/javascript/yui3/build/text/text-min.js new file mode 100644 index 00000000..1cf89f31 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/text/text-min.js @@ -0,0 +1,9 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("text-accentfold",function(e){var c=e.Array,b=e.Text,a=b.Data.AccentFold,d={canFold:function(f){var g;for(g in a){if(a.hasOwnProperty(g)&&f.search(a[g])!==-1){return true;}}return false;},compare:function(g,f,h){var i=d.fold(g),j=d.fold(f);return h?!!h(i,j):i===j;},filter:function(g,f){return c.filter(g,function(h){return f(d.fold(h));});},fold:function(f){if(e.Lang.isArray(f)){return c.map(f,d.fold);}f=f.toLowerCase();e.Object.each(a,function(h,g){f=f.replace(h,g);});return f;}};b.AccentFold=d;},"3.3.0",{requires:["array-extras","text-data-accentfold"]});YUI.add("text-data-accentfold",function(a){a.namespace("Text.Data").AccentFold={0:/[⁰₀⓪0]/gi,1:/[¹₁①1]/gi,2:/[²₂②2]/gi,3:/[³₃③3]/gi,4:/[⁴₄④4]/gi,5:/[⁵₅⑤5]/gi,6:/[⁶₆⑥6]/gi,7:/[⁷₇⑦7]/gi,8:/[⁸₈⑧8]/gi,9:/[⁹₉⑨9]/gi,a:/[ªà-åāăąǎǟǡǻȁȃȧᵃḁẚạảấầẩẫậắằẳẵặⓐa]/gi,b:/[ᵇḃḅḇⓑb]/gi,c:/[çćĉċčᶜḉⓒc]/gi,d:/[ďᵈḋḍḏḑḓⅾⓓd]/gi,e:/[è-ëēĕėęěȅȇȩᵉḕḗḙḛḝẹẻẽếềểễệₑℯⓔe]/gi,f:/[ᶠḟⓕf]/gi,g:/[ĝğġģǧǵᵍḡℊⓖg]/gi,h:/[ĥȟʰḣḥḧḩḫẖℎⓗh]/gi,i:/[ì-ïĩīĭįijǐȉȋᵢḭḯỉịⁱℹⅰⓘi]/gi,j:/[ĵǰʲⓙⱼj]/gi,k:/[ķǩᵏḱḳḵⓚk]/gi,l:/[ĺļľŀljˡḷḹḻḽℓⅼⓛl]/gi,m:/[ᵐḿṁṃⅿⓜm]/gi,n:/[ñńņňǹṅṇṉṋⁿⓝn]/gi,o:/[ºò-öōŏőơǒǫǭȍȏȫȭȯȱᵒṍṏṑṓọỏốồổỗộớờởỡợₒℴⓞo]/gi,p:/[ᵖṕṗⓟp]/gi,q:/[ʠⓠq]/gi,r:/[ŕŗřȑȓʳᵣṙṛṝṟⓡr]/gi,s:/[śŝşšſșˢṡṣṥṧṩẛⓢs]/gi,t:/[ţťțᵗṫṭṯṱẗⓣt]/gi,u:/[ù-üũūŭůűųưǔǖǘǚǜȕȗᵘᵤṳṵṷṹṻụủứừửữựⓤu]/gi,v:/[ᵛᵥṽṿⅴⓥv]/gi,w:/[ŵʷẁẃẅẇẉẘⓦw]/gi,x:/[ˣẋẍₓⅹⓧx]/gi,y:/[ýÿŷȳʸẏẙỳỵỷỹⓨy]/gi,z:/[źżžᶻẑẓẕⓩz]/gi};},"3.3.0");YUI.add("text-data-wordbreak",function(a){a.namespace("Text.Data").WordBreak={aletter:"[A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-׳ؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆༀཀ-ཇཉ-ཬྈ-ྌႠ-Ⴥა-ჺჼᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᯀ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〻〼ㄅ-ㄭㄱ-ㆎㆠ-ㆺꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐꞑꞠ-ꞩꟺ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]",midnumlet:"['\\.‘’․﹒'.]",midletter:"[:··״‧︓﹕:]",midnum:"[,;;։،؍٬߸⁄︐︔﹐﹔,;]",numeric:"[0-9٠-٩٫۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹]",cr:"\\r",lf:"\\n",newline:"[\u000B\u000C\u0085\u2028\u2029]",extend:"[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0900-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C01-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C82\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D02\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B6-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAA\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2\u1DC0-\u1DE6\u1DFC-\u1DFF\u200C\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA67C\uA67D\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE26\uFF9E\uFF9F]",format:"[\u00AD\u0600-\u0603\u06DD\u070F\u17B4\u17B5\u200E\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\uFEFF\uFFF9-\uFFFB]",katakana:"[〱-〵゛゜゠-ヺー-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ン]",extendnumlet:"[_‿⁀⁔︳︴﹍-﹏_]",punctuation:"[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・]"};},"3.3.0");YUI.add("text-wordbreak",function(d){var n=d.Text,k=n.Data.WordBreak,g=0,e=1,l=2,s=3,q=4,c=5,i=6,m=7,t=8,o=9,r=10,f=11,p=12,h=[new RegExp(k.aletter),new RegExp(k.midnumlet),new RegExp(k.midletter),new RegExp(k.midnum),new RegExp(k.numeric),new RegExp(k.cr),new RegExp(k.lf),new RegExp(k.newline),new RegExp(k.extend),new RegExp(k.format),new RegExp(k.katakana),new RegExp(k.extendnumlet)],b="",a=new RegExp("^"+k.punctuation+"$"),u=/\s/,j={getWords:function(A,E){var z=0,v=j._classify(A),B=v.length,w=[],C=[],y,D,x;if(!E){E={};}if(E.ignoreCase){A=A.toLowerCase();}D=E.includePunctuation;x=E.includeWhitespace;for(;zz.length-1&&w!==0)){return false;}if(x===g&&A===g){return false;}y=z[w+2];if(x===g&&(A===l||A===e)&&y===g){return false;}v=z[w-1];if((x===l||x===e)&&A===g&&v===g){return false;}if((x===q||x===g)&&(A===q||A===g)){return false;}if((x===s||x===e)&&A===q&&v===q){return false;}if(x===q&&(A===s||A===e)&&y===q){return false;}if(x===t||x===o||v===t||v===o||A===t||A===o){return false;}if(x===c&&A===i){return false;}if(x===m||x===c||x===i){return true;}if(A===m||A===c||A===i){return true;}if(x===r&&A===r){return false;}if(A===f&&(x===g||x===q||x===r||x===f)){return false;}if(x===f&&(A===g||A===q||A===r)){return false;}return true;}};n.WordBreak=j;},"3.3.0",{requires:["array-extras","text-data-wordbreak"]});YUI.add("text",function(a){},"3.3.0",{use:["text-accentfold","text-wordbreak"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/text/text-wordbreak-min.js b/jssource/src_files/include/javascript/yui3/build/text/text-wordbreak-min.js new file mode 100644 index 00000000..26549db9 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/text/text-wordbreak-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("text-wordbreak",function(d){var n=d.Text,k=n.Data.WordBreak,g=0,e=1,l=2,s=3,q=4,c=5,i=6,m=7,t=8,o=9,r=10,f=11,p=12,h=[new RegExp(k.aletter),new RegExp(k.midnumlet),new RegExp(k.midletter),new RegExp(k.midnum),new RegExp(k.numeric),new RegExp(k.cr),new RegExp(k.lf),new RegExp(k.newline),new RegExp(k.extend),new RegExp(k.format),new RegExp(k.katakana),new RegExp(k.extendnumlet)],b="",a=new RegExp("^"+k.punctuation+"$"),u=/\s/,j={getWords:function(A,E){var z=0,v=j._classify(A),B=v.length,w=[],C=[],y,D,x;if(!E){E={};}if(E.ignoreCase){A=A.toLowerCase();}D=E.includePunctuation;x=E.includeWhitespace;for(;zz.length-1&&w!==0)){return false;}if(x===g&&A===g){return false;}y=z[w+2];if(x===g&&(A===l||A===e)&&y===g){return false;}v=z[w-1];if((x===l||x===e)&&A===g&&v===g){return false;}if((x===q||x===g)&&(A===q||A===g)){return false;}if((x===s||x===e)&&A===q&&v===q){return false;}if(x===q&&(A===s||A===e)&&y===q){return false;}if(x===t||x===o||v===t||v===o||A===t||A===o){return false;}if(x===c&&A===i){return false;}if(x===m||x===c||x===i){return true;}if(A===m||A===c||A===i){return true;}if(x===r&&A===r){return false;}if(A===f&&(x===g||x===q||x===r||x===f)){return false;}if(x===f&&(A===g||A===q||A===r)){return false;}return true;}};n.WordBreak=j;},"3.3.0",{requires:["array-extras","text-data-wordbreak"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/text/text-wordbreak.js b/jssource/src_files/include/javascript/yui3/build/text/text-wordbreak.js new file mode 100644 index 00000000..4fd35868 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/text/text-wordbreak.js @@ -0,0 +1,369 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('text-wordbreak', function(Y) { + +/** + * Provides utility methods for splitting strings on word breaks and determining + * whether a character index represents a word boundary. + * + * @module text + * @submodule text-wordbreak + */ + +/** + *

              + * Provides utility methods for splitting strings on word breaks and determining + * whether a character index represents a word boundary, using the generic word + * breaking algorithm defined in the Unicode Text Segmentation guidelines + * (Unicode Standard + * Annex #29). + *

              + * + *

              + * This algorithm provides a reasonable default for many languages. However, it + * does not cover language or context specific requirements, and it does not + * provide meaningful results at all for languages that don't use spaces between + * words, such as Chinese, Japanese, Thai, Lao, Khmer, and others. Server-based + * word breaking services usually provide significantly better results with + * better performance. + *

              + * + * @class Text.WordBreak + * @static + */ + +var Text = Y.Text, + WBData = Text.Data.WordBreak, + +// Constants representing code point classifications. +ALETTER = 0, +MIDNUMLET = 1, +MIDLETTER = 2, +MIDNUM = 3, +NUMERIC = 4, +CR = 5, +LF = 6, +NEWLINE = 7, +EXTEND = 8, +FORMAT = 9, +KATAKANA = 10, +EXTENDNUMLET = 11, +OTHER = 12, + +// RegExp objects generated from code point data. Each regex matches a single +// character against a set of Unicode code points. The index of each item in +// this array must match its corresponding code point constant value defined +// above. +SETS = [ + new RegExp(WBData.aletter), + new RegExp(WBData.midnumlet), + new RegExp(WBData.midletter), + new RegExp(WBData.midnum), + new RegExp(WBData.numeric), + new RegExp(WBData.cr), + new RegExp(WBData.lf), + new RegExp(WBData.newline), + new RegExp(WBData.extend), + new RegExp(WBData.format), + new RegExp(WBData.katakana), + new RegExp(WBData.extendnumlet) +], + +EMPTY_STRING = '', +PUNCTUATION = new RegExp('^' + WBData.punctuation + '$'), +WHITESPACE = /\s/, + +WordBreak = { + // -- Public Static Methods ------------------------------------------------ + + /** + * Splits the specified string into an array of individual words. + * + * @method getWords + * @param {String} string String to split. + * @param {Object} options (optional) Options object containing zero or more + * of the following properties: + * + *
              + *
              ignoreCase (Boolean)
              + *
              + * If true, the string will be converted to lowercase + * before being split. Default is false. + *
              + * + *
              includePunctuation (Boolean)
              + *
              + * If true, the returned array will include punctuation + * characters. Default is false. + *
              + * + *
              includeWhitespace (Boolean)
              + *
              + * If true, the returned array will include whitespace + * characters. Default is false. + *
              + *
              + * @return {Array} Array of words. + * @static + */ + getWords: function (string, options) { + var i = 0, + map = WordBreak._classify(string), + len = map.length, + word = [], + words = [], + chr, + includePunctuation, + includeWhitespace; + + if (!options) { + options = {}; + } + + if (options.ignoreCase) { + string = string.toLowerCase(); + } + + includePunctuation = options.includePunctuation; + includeWhitespace = options.includeWhitespace; + + // Loop through each character in the classification map and determine + // whether it precedes a word boundary, building an array of distinct + // words as we go. + for (; i < len; ++i) { + chr = string.charAt(i); + + // Append this character to the current word. + word.push(chr); + + // If there's a word boundary between the current character and the + // next character, append the current word to the words array and + // start building a new word. + if (WordBreak._isWordBoundary(map, i)) { + word = word.join(EMPTY_STRING); + + if (word && + (includeWhitespace || !WHITESPACE.test(word)) && + (includePunctuation || !PUNCTUATION.test(word))) { + words.push(word); + } + + word = []; + } + } + + return words; + }, + + /** + * Returns an array containing only unique words from the specified string. + * For example, the string 'foo bar baz foo' would result in + * the array ['foo', 'bar', 'baz']. + * + * @method getUniqueWords + * @param {String} string String to split. + * @param {Object} options (optional) Options (see getWords() + * for details). + * @return {Array} Array of unique words. + * @static + */ + getUniqueWords: function (string, options) { + return Y.Array.unique(WordBreak.getWords(string, options)); + }, + + /** + *

              + * Returns true if there is a word boundary between the + * specified character index and the next character index (or the end of the + * string). + *

              + * + *

              + * Note that there are always word breaks at the beginning and end of a + * string, so isWordBoundary('', 0) and + * isWordBoundary('a', 0) will both return true. + *

              + * + * @method isWordBoundary + * @param {String} string String to test. + * @param {Number} index Character index to test within the string. + * @return {Boolean} true for a word boundary, + * false otherwise. + * @static + */ + isWordBoundary: function (string, index) { + return WordBreak._isWordBoundary(WordBreak._classify(string), index); + }, + + // -- Protected Static Methods --------------------------------------------- + + /** + * Returns a character classification map for the specified string. + * + * @method _classify + * @param {String} string String to classify. + * @return {Array} Classification map. + * @protected + * @static + */ + _classify: function (string) { + var chr, + map = [], + i = 0, + j, + set, + stringLength = string.length, + setsLength = SETS.length, + type; + + for (; i < stringLength; ++i) { + chr = string.charAt(i); + type = OTHER; + + for (j = 0; j < setsLength; ++j) { + set = SETS[j]; + + if (set && set.test(chr)) { + type = j; + break; + } + } + + map.push(type); + } + + return map; + }, + + /** + *

              + * Returns true if there is a word boundary between the + * specified character index and the next character index (or the end of the + * string). + *

              + * + *

              + * Note that there are always word breaks at the beginning and end of a + * string, so _isWordBoundary('', 0) and + * _isWordBoundary('a', 0) will both return true. + *

              + * + * @method _isWordBoundary + * @param {Array} map Character classification map generated by + * _classify. + * @param {Number} index Character index to test. + * @return {Boolean} + * @protected + * @static + */ + _isWordBoundary: function (map, index) { + var prevType, + type = map[index], + nextType = map[index + 1], + nextNextType; + + if (index < 0 || (index > map.length - 1 && index !== 0)) { + return false; + } + + // WB5. Don't break between most letters. + if (type === ALETTER && nextType === ALETTER) { + return false; + } + + nextNextType = map[index + 2]; + + // WB6. Don't break letters across certain punctuation. + if (type === ALETTER && + (nextType === MIDLETTER || nextType === MIDNUMLET) && + nextNextType === ALETTER) { + return false; + } + + prevType = map[index - 1]; + + // WB7. Don't break letters across certain punctuation. + if ((type === MIDLETTER || type === MIDNUMLET) && + nextType === ALETTER && + prevType === ALETTER) { + return false; + } + + // WB8/WB9/WB10. Don't break inside sequences of digits or digits + // adjacent to letters. + if ((type === NUMERIC || type === ALETTER) && + (nextType === NUMERIC || nextType === ALETTER)) { + return false; + } + + // WB11. Don't break inside numeric sequences like "3.2" or + // "3,456.789". + if ((type === MIDNUM || type === MIDNUMLET) && + nextType === NUMERIC && + prevType === NUMERIC) { + return false; + } + + // WB12. Don't break inside numeric sequences like "3.2" or + // "3,456.789". + if (type === NUMERIC && + (nextType === MIDNUM || nextType === MIDNUMLET) && + nextNextType === NUMERIC) { + return false; + } + + // WB4. Ignore format and extend characters. + if (type === EXTEND || type === FORMAT || + prevType === EXTEND || prevType === FORMAT || + nextType === EXTEND || nextType === FORMAT) { + return false; + } + + // WB3. Don't break inside CRLF. + if (type === CR && nextType === LF) { + return false; + } + + // WB3a. Break before newlines (including CR and LF). + if (type === NEWLINE || type === CR || type === LF) { + return true; + } + + // WB3b. Break after newlines (including CR and LF). + if (nextType === NEWLINE || nextType === CR || nextType === LF) { + return true; + } + + // WB13. Don't break between Katakana characters. + if (type === KATAKANA && nextType === KATAKANA) { + return false; + } + + // WB13a. Don't break from extenders. + if (nextType === EXTENDNUMLET && + (type === ALETTER || type === NUMERIC || type === KATAKANA || + type === EXTENDNUMLET)) { + return false; + } + + // WB13b. Don't break from extenders. + if (type === EXTENDNUMLET && + (nextType === ALETTER || nextType === NUMERIC || + nextType === KATAKANA)) { + return false; + } + + // Break after any character not covered by the rules above. + return true; + } +}; + +Text.WordBreak = WordBreak; + + +}, '3.3.0' ,{requires:['array-extras', 'text-data-wordbreak']}); diff --git a/jssource/src_files/include/javascript/yui3/build/text/text.js b/jssource/src_files/include/javascript/yui3/build/text/text.js new file mode 100644 index 00000000..bbbfa532 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/text/text.js @@ -0,0 +1,609 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('text-accentfold', function(Y) { + +/** + * Text utilities. + * + * @module text + * @since 3.3.0 + */ + +/** + * Provides a basic accent folding implementation that converts common accented + * letters (like "á") to their non-accented forms (like "a"). + * + * @module text + * @submodule text-accentfold + */ + +/** + *

              + * Provides a basic accent folding implementation that converts common accented + * letters (like "á") to their non-accented forms (like "a"). + *

              + * + *

              + * This implementation is not comprehensive, and should only be used as a last + * resort when accent folding can't be done on the server. A comprehensive + * accent folding implementation would require much more character data to be + * sent to the browser, resulting in a significant performance penalty. This + * implementation strives for a compromise between usefulness and performance. + *

              + * + *

              + * Accent folding is a destructive operation that can't be reversed, and may + * change or destroy the actual meaning of the text depending on the language. + * It should not be used on strings that will later be displayed to a user, + * unless this is done with the understanding that linguistic meaning may be + * lost and that you may in fact confuse or insult the user by doing so. + *

              + * + *

              + * When used for matching, accent folding is likely to produce erroneous matches + * for languages in which characters with diacritics are considered different + * from their base characters, or where correct folding would map to other + * character sequences than just stripped characters. For example, in German + * "ü" is a character that's clearly different from "u" and should match "ue" + * instead. The word "betrügen" means "to defraud", while "betrugen" is the past + * tense of "to behave". The name "Müller" is expected to match "Mueller", but + * not "Muller". On the other hand, accent folding falls short for languages + * where different base characters are expected to match. In Japanese, for + * example, hiragana and katakana characters with the same pronunciation ("あ" + * and "ア") are commonly treated as equivalent for lookups, but accent folding + * treats them as different. + *

              + * + * @class Text.AccentFold + * @static + */ + +var YArray = Y.Array, + Text = Y.Text, + FoldData = Text.Data.AccentFold, + +AccentFold = { + // -- Public Static Methods ------------------------------------------------ + + /** + * Returns true if the specified string contains one or more + * characters that can be folded, false otherwise. + * + * @method canFold + * @param {String} string String to test. + * @return {Boolean} + * @static + */ + canFold: function (string) { + var letter; + + for (letter in FoldData) { + if (FoldData.hasOwnProperty(letter) && + string.search(FoldData[letter]) !== -1) { + return true; + } + } + + return false; + }, + + /** + * Compares the accent-folded versions of two strings and returns + * true if they're the same, false otherwise. If + * a custom comparison function is supplied, the accent-folded strings will + * be passed to that function for comparison. + * + * @method compare + * @param {String} a First string to compare. + * @param {String} b Second string to compare. + * @param {Function} func (optional) Custom comparison function. Should + * return a truthy or falsy value. + * @return {Boolean} Results of the comparison. + * @static + */ + compare: function (a, b, func) { + var aFolded = AccentFold.fold(a), + bFolded = AccentFold.fold(b); + + return func ? !!func(aFolded, bFolded) : aFolded === bFolded; + }, + + /** + *

              + * Returns a copy of haystack containing only the strings for which + * the supplied function returns true. + *

              + * + *

              + * While comparisons will be made using accent-folded strings, the returned + * array of matches will contain the original strings that were passed in. + *

              + * + * @method filter + * @param {Array} haystack Array of strings to filter. + * @param {Function} func Comparison function. Will receive an accent-folded + * haystack string as an argument, and should return a truthy or falsy + * value. + * @return {Array} Filtered copy of haystack. + * @static + */ + filter: function (haystack, func) { + return YArray.filter(haystack, function (item) { + return func(AccentFold.fold(item)); + }); + }, + + /** + * Accent-folds the specified string or array of strings and returns a copy + * in which common accented letters have been converted to their closest + * non-accented, lowercase forms. + * + * @method fold + * @param {String|Array} input String or array of strings to be folded. + * @return {String|Array} Folded string or array of strings. + * @static + */ + fold: function (input) { + if (Y.Lang.isArray(input)) { + return YArray.map(input, AccentFold.fold); + } + + input = input.toLowerCase(); + + Y.Object.each(FoldData, function (regex, letter) { + input = input.replace(regex, letter); + }); + + return input; + } +}; + +Text.AccentFold = AccentFold; + + +}, '3.3.0' ,{requires:['array-extras', 'text-data-accentfold']}); +YUI.add('text-data-accentfold', function(Y) { + +// The following tool was very helpful in creating these mappings: +// http://unicode.org/cldr/utility/list-unicodeset.jsp?a=[:toNFKD%3D/^a/:]&abb=on + +Y.namespace('Text.Data').AccentFold = { + 0: /[⁰₀⓪0]/gi, + 1: /[¹₁①1]/gi, + 2: /[²₂②2]/gi, + 3: /[³₃③3]/gi, + 4: /[⁴₄④4]/gi, + 5: /[⁵₅⑤5]/gi, + 6: /[⁶₆⑥6]/gi, + 7: /[⁷₇⑦7]/gi, + 8: /[⁸₈⑧8]/gi, + 9: /[⁹₉⑨9]/gi, + a: /[ªà-åāăąǎǟǡǻȁȃȧᵃḁẚạảấầẩẫậắằẳẵặⓐa]/gi, + b: /[ᵇḃḅḇⓑb]/gi, + c: /[çćĉċčᶜḉⓒc]/gi, + d: /[ďᵈḋḍḏḑḓⅾⓓd]/gi, + e: /[è-ëēĕėęěȅȇȩᵉḕḗḙḛḝẹẻẽếềểễệₑℯⓔe]/gi, + f: /[ᶠḟⓕf]/gi, + g: /[ĝğġģǧǵᵍḡℊⓖg]/gi, + h: /[ĥȟʰḣḥḧḩḫẖℎⓗh]/gi, + i: /[ì-ïĩīĭįijǐȉȋᵢḭḯỉịⁱℹⅰⓘi]/gi, + j: /[ĵǰʲⓙⱼj]/gi, + k: /[ķǩᵏḱḳḵⓚk]/gi, + l: /[ĺļľŀljˡḷḹḻḽℓⅼⓛl]/gi, + m: /[ᵐḿṁṃⅿⓜm]/gi, + n: /[ñńņňǹṅṇṉṋⁿⓝn]/gi, + o: /[ºò-öōŏőơǒǫǭȍȏȫȭȯȱᵒṍṏṑṓọỏốồổỗộớờởỡợₒℴⓞo]/gi, + p: /[ᵖṕṗⓟp]/gi, + q: /[ʠⓠq]/gi, + r: /[ŕŗřȑȓʳᵣṙṛṝṟⓡr]/gi, + s: /[śŝşšſșˢṡṣṥṧṩẛⓢs]/gi, + t: /[ţťțᵗṫṭṯṱẗⓣt]/gi, + u: /[ù-üũūŭůűųưǔǖǘǚǜȕȗᵘᵤṳṵṷṹṻụủứừửữựⓤu]/gi, + v: /[ᵛᵥṽṿⅴⓥv]/gi, + w: /[ŵʷẁẃẅẇẉẘⓦw]/gi, + x: /[ˣẋẍₓⅹⓧx]/gi, + y: /[ýÿŷȳʸẏẙỳỵỷỹⓨy]/gi, + z: /[źżžᶻẑẓẕⓩz]/gi +}; + + +}, '3.3.0' ); +YUI.add('text-data-wordbreak', function(Y) { + +Y.namespace('Text.Data').WordBreak = { + // The UnicodeSet utility is helpful for enumerating the specific code + // points covered by each of these regular expressions: + // http://unicode.org/cldr/utility/list-unicodeset.jsp + // + // The code sets from which these regexes were derived can be generated + // by the UnicodeSet utility using the links here: + // http://unicode.org/cldr/utility/properties.jsp?a=Word_Break#Word_Break + + aletter : '[A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-׳ؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆༀཀ-ཇཉ-ཬྈ-ྌႠ-Ⴥა-ჺჼᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᯀ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〻〼ㄅ-ㄭㄱ-ㆎㆠ-ㆺꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐꞑꞠ-ꞩꟺ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]', + midnumlet : "['\\.‘’․﹒'.]", + midletter : '[:··״‧︓﹕:]', + midnum : '[,;;։،؍٬߸⁄︐︔﹐﹔,;]', + numeric : '[0-9٠-٩٫۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹]', + cr : '\\r', + lf : '\\n', + newline : '[\u000B\u000C\u0085\u2028\u2029]', + extend : '[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0900-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C01-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C82\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D02\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B6-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAA\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2\u1DC0-\u1DE6\u1DFC-\u1DFF\u200C\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA67C\uA67D\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE26\uFF9E\uFF9F]', + format : '[\u00AD\u0600-\u0603\u06DD\u070F\u17B4\u17B5\u200E\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\uFEFF\uFFF9-\uFFFB]', + katakana : '[〱-〵゛゜゠-ヺー-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ン]', + extendnumlet: '[_‿⁀⁔︳︴﹍-﹏_]', + punctuation : '[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・]' +}; + + +}, '3.3.0' ); +YUI.add('text-wordbreak', function(Y) { + +/** + * Provides utility methods for splitting strings on word breaks and determining + * whether a character index represents a word boundary. + * + * @module text + * @submodule text-wordbreak + */ + +/** + *

              + * Provides utility methods for splitting strings on word breaks and determining + * whether a character index represents a word boundary, using the generic word + * breaking algorithm defined in the Unicode Text Segmentation guidelines + * (Unicode Standard + * Annex #29). + *

              + * + *

              + * This algorithm provides a reasonable default for many languages. However, it + * does not cover language or context specific requirements, and it does not + * provide meaningful results at all for languages that don't use spaces between + * words, such as Chinese, Japanese, Thai, Lao, Khmer, and others. Server-based + * word breaking services usually provide significantly better results with + * better performance. + *

              + * + * @class Text.WordBreak + * @static + */ + +var Text = Y.Text, + WBData = Text.Data.WordBreak, + +// Constants representing code point classifications. +ALETTER = 0, +MIDNUMLET = 1, +MIDLETTER = 2, +MIDNUM = 3, +NUMERIC = 4, +CR = 5, +LF = 6, +NEWLINE = 7, +EXTEND = 8, +FORMAT = 9, +KATAKANA = 10, +EXTENDNUMLET = 11, +OTHER = 12, + +// RegExp objects generated from code point data. Each regex matches a single +// character against a set of Unicode code points. The index of each item in +// this array must match its corresponding code point constant value defined +// above. +SETS = [ + new RegExp(WBData.aletter), + new RegExp(WBData.midnumlet), + new RegExp(WBData.midletter), + new RegExp(WBData.midnum), + new RegExp(WBData.numeric), + new RegExp(WBData.cr), + new RegExp(WBData.lf), + new RegExp(WBData.newline), + new RegExp(WBData.extend), + new RegExp(WBData.format), + new RegExp(WBData.katakana), + new RegExp(WBData.extendnumlet) +], + +EMPTY_STRING = '', +PUNCTUATION = new RegExp('^' + WBData.punctuation + '$'), +WHITESPACE = /\s/, + +WordBreak = { + // -- Public Static Methods ------------------------------------------------ + + /** + * Splits the specified string into an array of individual words. + * + * @method getWords + * @param {String} string String to split. + * @param {Object} options (optional) Options object containing zero or more + * of the following properties: + * + *
              + *
              ignoreCase (Boolean)
              + *
              + * If true, the string will be converted to lowercase + * before being split. Default is false. + *
              + * + *
              includePunctuation (Boolean)
              + *
              + * If true, the returned array will include punctuation + * characters. Default is false. + *
              + * + *
              includeWhitespace (Boolean)
              + *
              + * If true, the returned array will include whitespace + * characters. Default is false. + *
              + *
              + * @return {Array} Array of words. + * @static + */ + getWords: function (string, options) { + var i = 0, + map = WordBreak._classify(string), + len = map.length, + word = [], + words = [], + chr, + includePunctuation, + includeWhitespace; + + if (!options) { + options = {}; + } + + if (options.ignoreCase) { + string = string.toLowerCase(); + } + + includePunctuation = options.includePunctuation; + includeWhitespace = options.includeWhitespace; + + // Loop through each character in the classification map and determine + // whether it precedes a word boundary, building an array of distinct + // words as we go. + for (; i < len; ++i) { + chr = string.charAt(i); + + // Append this character to the current word. + word.push(chr); + + // If there's a word boundary between the current character and the + // next character, append the current word to the words array and + // start building a new word. + if (WordBreak._isWordBoundary(map, i)) { + word = word.join(EMPTY_STRING); + + if (word && + (includeWhitespace || !WHITESPACE.test(word)) && + (includePunctuation || !PUNCTUATION.test(word))) { + words.push(word); + } + + word = []; + } + } + + return words; + }, + + /** + * Returns an array containing only unique words from the specified string. + * For example, the string 'foo bar baz foo' would result in + * the array ['foo', 'bar', 'baz']. + * + * @method getUniqueWords + * @param {String} string String to split. + * @param {Object} options (optional) Options (see getWords() + * for details). + * @return {Array} Array of unique words. + * @static + */ + getUniqueWords: function (string, options) { + return Y.Array.unique(WordBreak.getWords(string, options)); + }, + + /** + *

              + * Returns true if there is a word boundary between the + * specified character index and the next character index (or the end of the + * string). + *

              + * + *

              + * Note that there are always word breaks at the beginning and end of a + * string, so isWordBoundary('', 0) and + * isWordBoundary('a', 0) will both return true. + *

              + * + * @method isWordBoundary + * @param {String} string String to test. + * @param {Number} index Character index to test within the string. + * @return {Boolean} true for a word boundary, + * false otherwise. + * @static + */ + isWordBoundary: function (string, index) { + return WordBreak._isWordBoundary(WordBreak._classify(string), index); + }, + + // -- Protected Static Methods --------------------------------------------- + + /** + * Returns a character classification map for the specified string. + * + * @method _classify + * @param {String} string String to classify. + * @return {Array} Classification map. + * @protected + * @static + */ + _classify: function (string) { + var chr, + map = [], + i = 0, + j, + set, + stringLength = string.length, + setsLength = SETS.length, + type; + + for (; i < stringLength; ++i) { + chr = string.charAt(i); + type = OTHER; + + for (j = 0; j < setsLength; ++j) { + set = SETS[j]; + + if (set && set.test(chr)) { + type = j; + break; + } + } + + map.push(type); + } + + return map; + }, + + /** + *

              + * Returns true if there is a word boundary between the + * specified character index and the next character index (or the end of the + * string). + *

              + * + *

              + * Note that there are always word breaks at the beginning and end of a + * string, so _isWordBoundary('', 0) and + * _isWordBoundary('a', 0) will both return true. + *

              + * + * @method _isWordBoundary + * @param {Array} map Character classification map generated by + * _classify. + * @param {Number} index Character index to test. + * @return {Boolean} + * @protected + * @static + */ + _isWordBoundary: function (map, index) { + var prevType, + type = map[index], + nextType = map[index + 1], + nextNextType; + + if (index < 0 || (index > map.length - 1 && index !== 0)) { + return false; + } + + // WB5. Don't break between most letters. + if (type === ALETTER && nextType === ALETTER) { + return false; + } + + nextNextType = map[index + 2]; + + // WB6. Don't break letters across certain punctuation. + if (type === ALETTER && + (nextType === MIDLETTER || nextType === MIDNUMLET) && + nextNextType === ALETTER) { + return false; + } + + prevType = map[index - 1]; + + // WB7. Don't break letters across certain punctuation. + if ((type === MIDLETTER || type === MIDNUMLET) && + nextType === ALETTER && + prevType === ALETTER) { + return false; + } + + // WB8/WB9/WB10. Don't break inside sequences of digits or digits + // adjacent to letters. + if ((type === NUMERIC || type === ALETTER) && + (nextType === NUMERIC || nextType === ALETTER)) { + return false; + } + + // WB11. Don't break inside numeric sequences like "3.2" or + // "3,456.789". + if ((type === MIDNUM || type === MIDNUMLET) && + nextType === NUMERIC && + prevType === NUMERIC) { + return false; + } + + // WB12. Don't break inside numeric sequences like "3.2" or + // "3,456.789". + if (type === NUMERIC && + (nextType === MIDNUM || nextType === MIDNUMLET) && + nextNextType === NUMERIC) { + return false; + } + + // WB4. Ignore format and extend characters. + if (type === EXTEND || type === FORMAT || + prevType === EXTEND || prevType === FORMAT || + nextType === EXTEND || nextType === FORMAT) { + return false; + } + + // WB3. Don't break inside CRLF. + if (type === CR && nextType === LF) { + return false; + } + + // WB3a. Break before newlines (including CR and LF). + if (type === NEWLINE || type === CR || type === LF) { + return true; + } + + // WB3b. Break after newlines (including CR and LF). + if (nextType === NEWLINE || nextType === CR || nextType === LF) { + return true; + } + + // WB13. Don't break between Katakana characters. + if (type === KATAKANA && nextType === KATAKANA) { + return false; + } + + // WB13a. Don't break from extenders. + if (nextType === EXTENDNUMLET && + (type === ALETTER || type === NUMERIC || type === KATAKANA || + type === EXTENDNUMLET)) { + return false; + } + + // WB13b. Don't break from extenders. + if (type === EXTENDNUMLET && + (nextType === ALETTER || nextType === NUMERIC || + nextType === KATAKANA)) { + return false; + } + + // Break after any character not covered by the rules above. + return true; + } +}; + +Text.WordBreak = WordBreak; + + +}, '3.3.0' ,{requires:['array-extras', 'text-data-wordbreak']}); + + +YUI.add('text', function(Y){}, '3.3.0' ,{use:['text-accentfold', 'text-wordbreak']}); + diff --git a/jssource/src_files/include/javascript/yui3/build/transition/transition-min.js b/jssource/src_files/include/javascript/yui3/build/transition/transition-min.js new file mode 100644 index 00000000..70449585 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/transition/transition-min.js @@ -0,0 +1,9 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("transition-native",function(b){var j="-webkit-transition",m="WebkitTransition",h="WebkitTransitionProperty",c="-webkit-transition-property",g="-webkit-transition-duration",a="-webkit-transition-timing-function",d="-webkit-transition-delay",k="webkitTransitionEnd",e="onwebkittransitionend",l="WebkitTransform",i={},f=function(){this.init.apply(this,arguments);};f.fx={};f.toggles={};f._hasEnd={};f._toCamel=function(o){o=o.replace(/-([a-z])/gi,function(q,p){return p.toUpperCase();});return o;};f._toHyphen=function(o){o=o.replace(/([A-Z]?)([a-z]+)([A-Z]?)/g,function(s,r,q,p){var t="";if(r){t+="-"+r.toLowerCase();}t+=q;if(p){t+="-"+p.toLowerCase();}return t;});return o;};f._reKeywords=/^(?:node|duration|iterations|easing|delay|on|onstart|onend)$/i;f.useNative=false;if(j in b.config.doc.documentElement.style){f.useNative=true;f.supported=true;}b.Node.DOM_EVENTS[k]=1;f.NAME="transition";f.DEFAULT_EASING="ease";f.DEFAULT_DURATION=0.5;f.DEFAULT_DELAY=0;f._nodeAttrs={};f.prototype={constructor:f,init:function(p,o){var q=this;q._node=p;if(!q._running&&o){q._config=o;p._transition=q;q._duration=("duration" in o)?o.duration:q.constructor.DEFAULT_DURATION;q._delay=("delay" in o)?o.delay:q.constructor.DEFAULT_DELAY;q._easing=o.easing||q.constructor.DEFAULT_EASING;q._count=0;q._running=false;}return q;},addProperty:function(p,r){var u=this,s=this._node,w=b.stamp(s),v=b.one(s),z=f._nodeAttrs[w],t,y,o,x,q;if(!z){z=f._nodeAttrs[w]={};}x=z[p];if(r&&r.value!==undefined){q=r.value;}else{if(r!==undefined){q=r;r=i;}}if(typeof q==="function"){q=q.call(v,v);}if(x&&x.transition){if(x.transition!==u){x.transition._count--;}}u._count++;o=((typeof r.duration!="undefined")?r.duration:u._duration)||0.0001;z[p]={value:q,duration:o,delay:(typeof r.delay!="undefined")?r.delay:u._delay,easing:r.easing||u._easing,transition:u};t=b.DOM.getComputedStyle(s,p);y=(typeof q==="string")?t:parseFloat(t);if(f.useNative&&y===q){setTimeout(function(){u._onNativeEnd.call(s,{propertyName:p,elapsedTime:o});},o*1000);}},removeProperty:function(q){var p=this,o=f._nodeAttrs[b.stamp(p._node)];if(o&&o[q]){delete o[q];p._count--;}},initAttrs:function(p){var o,q=this._node;if(p.transform&&!p[l]){p[l]=p.transform;delete p.transform;}for(o in p){if(p.hasOwnProperty(o)&&!f._reKeywords.test(o)){this.addProperty(o,p[o]);if(q.style[o]===""){b.DOM.setStyle(q,o,b.DOM.getComputedStyle(q,o));}}}},run:function(s){var r=this,p=r._node,o=r._config,q={type:"transition:start",config:o};if(!r._running){r._running=true;if(o.on&&o.on.start){o.on.start.call(b.one(p),q);}r.initAttrs(r._config);r._callback=s;r._start();}return r;},_start:function(){this._runNative();},_prepDur:function(o){o=parseFloat(o);return o+"s";},_runNative:function(q){var w=this,r=w._node,y=b.stamp(r),p=r.style,u=getComputedStyle(r),C=f._nodeAttrs[y],s="",D=u[c],B=c+": ",v=g+": ",A=a+": ",x=d+": ",t,z,o;if(D!=="all"){B+=D+",";v+=u[g]+",";A+=u[a]+",";x+=u[d]+",";}for(o in C){t=f._toHyphen(o);z=C[o];if(C.hasOwnProperty(o)&&z.transition===w){if(o in r.style){v+=w._prepDur(z.duration)+",";x+=w._prepDur(z.delay)+",";A+=(z.easing)+",";B+=t+",";s+=t+": "+z.value+"; ";}else{this.removeProperty(o);}}}B=B.replace(/,$/,";");v=v.replace(/,$/,";");A=A.replace(/,$/,";");x=x.replace(/,$/,";");if(!f._hasEnd[y]){r.addEventListener(k,w._onNativeEnd,false);f._hasEnd[y]=true;}p.cssText+=B+v+A+x+s;},_end:function(o){var s=this,q=s._node,u=s._callback,p=s._config,r={type:"transition:end",config:p,elapsedTime:o},t=b.one(q);s._running=false;s._callback=null;if(q){if(p.on&&p.on.end){setTimeout(function(){p.on.end.call(t,r);if(u){u.call(t,r);}},1);}else{if(u){setTimeout(function(){u.call(t,r);},1);}}}},_endNative:function(o){var p=this._node,q=p.ownerDocument.defaultView.getComputedStyle(p,"")[c];if(typeof q==="string"){q=q.replace(new RegExp("(?:^|,\\s)"+o+",?"),",");q=q.replace(/^,|,$/,"");p.style[m]=q;}},_onNativeEnd:function(v){var r=this,u=b.stamp(r),o=v,p=f._toCamel(o.propertyName),y=o.elapsedTime,x=f._nodeAttrs[u],w=x[p],s=(w)?w.transition:null,t,q;if(s){s.removeProperty(p);s._endNative(p);q=s._config[p];t={type:"propertyEnd",propertyName:p,elapsedTime:y,config:q};if(q&&q.on&&q.on.end){q.on.end.call(b.one(r),t);}if(s._count<=0){s._end(y);}}},destroy:function(){var o=this;node.removeEventListener(k,o._onNativeEnd,false);o._node=null;}};b.Transition=f;b.TransitionNative=f;b.Node.prototype.transition=function(q,p,u){var o=f._nodeAttrs[b.stamp(this._node)],s=(o)?o.transition||null:null,r,t;if(typeof q==="string"){if(typeof p==="function"){u=p;p=null;}r=f.fx[q];if(p&&typeof p!=="boolean"){p=b.clone(p);for(t in r){if(r.hasOwnProperty(t)){if(!(t in p)){p[t]=r[t];}}}}else{p=r;}}else{u=p;p=q;}if(s&&!s._running){s.init(this,p);}else{s=new f(this._node,p);}s.run(u);return this;};b.Node.prototype.show=function(p,o,q){this._show();if(p&&b.Transition){if(typeof p!=="string"&&!p.push){if(typeof o==="function"){q=o;o=p;}p=this.SHOW_TRANSITION;}this.transition(p,o,q);}return this;};var n=function(p,o,q){return function(){if(o){o.call(p);}if(q){q.apply(p._node,arguments);}};};b.Node.prototype.hide=function(p,o,q){if(p&&b.Transition){if(typeof o==="function"){q=o;o=null;}q=n(this,this._hide,q);if(typeof p!=="string"&&!p.push){if(typeof o==="function"){q=o;o=p;}p=this.HIDE_TRANSITION;}this.transition(p,o,q);}else{this._hide();}return this;};b.NodeList.prototype.transition=function(p,s){var o=this._nodes,q=0,r;while((r=o[q++])){b.one(r).transition(p,s);}return this;};b.Node.prototype.toggleView=function(p,o){var q;this._toggles=this._toggles||[];if(typeof p=="boolean"){o=p;}if(typeof o==="undefined"&&p in this._toggles){o=!this._toggles[p];}o=(o)?1:0;if(o){this._show();}else{q=n(anim,this._hide);}this._toggles[p]=o;this.transition(b.Transition.toggles[p][o],q);};b.NodeList.prototype.toggleView=function(p,s){var o=this._nodes,q=0,r;while((r=o[q++])){b.one(r).toggleView(p,s);}return this;};b.mix(f.fx,{fadeOut:{opacity:0,duration:0.5,easing:"ease-out"},fadeIn:{opacity:1,duration:0.5,easing:"ease-in"},sizeOut:{height:0,width:0,duration:0.75,easing:"ease-out"},sizeIn:{height:function(o){return o.get("scrollHeight")+"px"; +},width:function(o){return o.get("scrollWidth")+"px";},duration:0.5,easing:"ease-in",on:{start:function(){var o=this.getStyle("overflow");if(o!=="hidden"){this.setStyle("overflow","hidden");this._transitionOverflow=o;}},end:function(){if(this._transitionOverflow){this.setStyle("overflow",this._transitionOverflow);}}}}});b.mix(f.toggles,{size:["sizeIn","sizeOut"],fade:["fadeOut","fadeIn"]});},"3.3.0",{requires:["node-base"]});YUI.add("transition-timer",function(b){var a=b.Transition;b.mix(a.prototype,{_start:function(){if(a.useNative){this._runNative();}else{this._runTimer();}},_runTimer:function(){var c=this;c._initAttrs();a._running[b.stamp(c)]=c;c._startTime=new Date();a._startTimer();},_endTimer:function(){var c=this;delete a._running[b.stamp(c)];c._startTime=null;},_runFrame:function(){var c=new Date()-this._startTime;this._runAttrs(c);},_runAttrs:function(e){var o=this,n=o._node,u=o._config,f=b.stamp(n),m=a._nodeAttrs[f],h=a.behaviors,l=false,g=false,v,w,j,q,c,s,r,k,p;for(w in m){j=m[w];if((j&&j.transition===o)){r=j.duration;s=j.delay;c=(e-s)/1000;k=e;v={type:"propertyEnd",propertyName:w,config:u,elapsedTime:c};q=(p in h&&"set" in h[p])?h[p].set:a.DEFAULT_SETTER;l=(k>=r);if(k>r){k=r;}if(!s||e>=s){q(o,w,j.from,j.to,k-s,r-s,j.easing,j.unit);if(l){delete m[w];o._count--;if(u[w]&&u[w].on&&u[w].on.end){u[w].on.end.call(b.one(n),v);}if(!g&&o._count<=0){g=true;o._end(c);o._endTimer();}}}}}},_initAttrs:function(){var j=this,e=a.behaviors,l=b.stamp(j._node),q=a._nodeAttrs[l],d,i,k,n,g,c,m,o,p,f,h;for(c in q){d=q[c];if(q.hasOwnProperty(c)&&(d&&d.transition===j)){i=d.duration*1000;k=d.delay*1000;n=d.easing;g=d.value;if(c in j._node.style||c in b.DOM.CUSTOM_STYLES){f=(c in e&&"get" in e[c])?e[c].get(j,c):a.DEFAULT_GETTER(j,c);o=a.RE_UNITS.exec(f);m=a.RE_UNITS.exec(g);f=o?o[1]:f;h=m?m[1]:g;p=m?m[2]:o?o[2]:"";if(!p&&a.RE_DEFAULT_UNIT.test(c)){p=a.DEFAULT_UNIT;}if(typeof n==="string"){if(n.indexOf("cubic-bezier")>-1){n=n.substring(13,n.length-1).split(",");}else{if(a.easings[n]){n=a.easings[n];}}}d.from=Number(f);d.to=Number(h);d.unit=p;d.easing=n;d.duration=i+k;d.delay=k;}else{delete q[c];j._count--;}}}},destroy:function(){this.detachAll();this._node=null;}},true);b.mix(b.Transition,{_runtimeAttrs:{},RE_DEFAULT_UNIT:/^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i,DEFAULT_UNIT:"px",intervalTime:20,behaviors:{left:{get:function(d,c){return b.DOM._getAttrOffset(d._node,c);}}},DEFAULT_SETTER:function(f,g,i,j,l,e,h,k){i=Number(i);j=Number(j);var d=f._node,c=a.cubicBezier(h,l/e);c=i+c[0]*(j-i);if(d){if(g in d.style||g in b.DOM.CUSTOM_STYLES){k=k||"";b.DOM.setStyle(d,g,c+k);}}else{f._end();}},DEFAULT_GETTER:function(e,c){var d=e._node,f="";if(c in d.style||c in b.DOM.CUSTOM_STYLES){f=b.DOM.getComputedStyle(d,c);}return f;},_startTimer:function(){if(!a._timer){a._timer=setInterval(a._runFrame,a.intervalTime);}},_stopTimer:function(){clearInterval(a._timer);a._timer=null;},_runFrame:function(){var c=true,d;for(d in a._running){if(a._running[d]._runFrame){c=false;a._running[d]._runFrame();}}if(c){a._stopTimer();}},cubicBezier:function(s,m){var z=0,f=0,w=s[0],e=s[1],v=s[2],d=s[3],u=1,c=0,r=u-3*v+3*w-z,q=3*v-6*w+3*z,o=3*w-3*z,n=z,l=c-3*d+3*e-f,k=3*d-6*e+3*f,j=3*e-3*f,i=f,h=(((r*m)+q)*m+o)*m+n,g=(((l*m)+k)*m+j)*m+i;return[h,g];},easings:{ease:[0.25,0,1,0.25],linear:[0,0,1,1],"ease-in":[0.42,0,1,1],"ease-out":[0,0,0.58,1],"ease-in-out":[0.42,0,0.58,1]},_running:{},_timer:null,RE_UNITS:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/},true);a.behaviors.top=a.behaviors.bottom=a.behaviors.right=a.behaviors.left;b.Transition=a;},"3.3.0",{requires:["transition-native","node-style"]});YUI.add("transition",function(a){},"3.3.0",{use:["transition-native","transition-timer"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/transition/transition-native-min.js b/jssource/src_files/include/javascript/yui3/build/transition/transition-native-min.js new file mode 100644 index 00000000..53f088ba --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/transition/transition-native-min.js @@ -0,0 +1,9 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("transition-native",function(b){var j="-webkit-transition",m="WebkitTransition",h="WebkitTransitionProperty",c="-webkit-transition-property",g="-webkit-transition-duration",a="-webkit-transition-timing-function",d="-webkit-transition-delay",k="webkitTransitionEnd",e="onwebkittransitionend",l="WebkitTransform",i={},f=function(){this.init.apply(this,arguments);};f.fx={};f.toggles={};f._hasEnd={};f._toCamel=function(o){o=o.replace(/-([a-z])/gi,function(q,p){return p.toUpperCase();});return o;};f._toHyphen=function(o){o=o.replace(/([A-Z]?)([a-z]+)([A-Z]?)/g,function(s,r,q,p){var t="";if(r){t+="-"+r.toLowerCase();}t+=q;if(p){t+="-"+p.toLowerCase();}return t;});return o;};f._reKeywords=/^(?:node|duration|iterations|easing|delay|on|onstart|onend)$/i;f.useNative=false;if(j in b.config.doc.documentElement.style){f.useNative=true;f.supported=true;}b.Node.DOM_EVENTS[k]=1;f.NAME="transition";f.DEFAULT_EASING="ease";f.DEFAULT_DURATION=0.5;f.DEFAULT_DELAY=0;f._nodeAttrs={};f.prototype={constructor:f,init:function(p,o){var q=this;q._node=p;if(!q._running&&o){q._config=o;p._transition=q;q._duration=("duration" in o)?o.duration:q.constructor.DEFAULT_DURATION;q._delay=("delay" in o)?o.delay:q.constructor.DEFAULT_DELAY;q._easing=o.easing||q.constructor.DEFAULT_EASING;q._count=0;q._running=false;}return q;},addProperty:function(p,r){var u=this,s=this._node,w=b.stamp(s),v=b.one(s),z=f._nodeAttrs[w],t,y,o,x,q;if(!z){z=f._nodeAttrs[w]={};}x=z[p];if(r&&r.value!==undefined){q=r.value;}else{if(r!==undefined){q=r;r=i;}}if(typeof q==="function"){q=q.call(v,v);}if(x&&x.transition){if(x.transition!==u){x.transition._count--;}}u._count++;o=((typeof r.duration!="undefined")?r.duration:u._duration)||0.0001;z[p]={value:q,duration:o,delay:(typeof r.delay!="undefined")?r.delay:u._delay,easing:r.easing||u._easing,transition:u};t=b.DOM.getComputedStyle(s,p);y=(typeof q==="string")?t:parseFloat(t);if(f.useNative&&y===q){setTimeout(function(){u._onNativeEnd.call(s,{propertyName:p,elapsedTime:o});},o*1000);}},removeProperty:function(q){var p=this,o=f._nodeAttrs[b.stamp(p._node)];if(o&&o[q]){delete o[q];p._count--;}},initAttrs:function(p){var o,q=this._node;if(p.transform&&!p[l]){p[l]=p.transform;delete p.transform;}for(o in p){if(p.hasOwnProperty(o)&&!f._reKeywords.test(o)){this.addProperty(o,p[o]);if(q.style[o]===""){b.DOM.setStyle(q,o,b.DOM.getComputedStyle(q,o));}}}},run:function(s){var r=this,p=r._node,o=r._config,q={type:"transition:start",config:o};if(!r._running){r._running=true;if(o.on&&o.on.start){o.on.start.call(b.one(p),q);}r.initAttrs(r._config);r._callback=s;r._start();}return r;},_start:function(){this._runNative();},_prepDur:function(o){o=parseFloat(o);return o+"s";},_runNative:function(q){var w=this,r=w._node,y=b.stamp(r),p=r.style,u=getComputedStyle(r),C=f._nodeAttrs[y],s="",D=u[c],B=c+": ",v=g+": ",A=a+": ",x=d+": ",t,z,o;if(D!=="all"){B+=D+",";v+=u[g]+",";A+=u[a]+",";x+=u[d]+",";}for(o in C){t=f._toHyphen(o);z=C[o];if(C.hasOwnProperty(o)&&z.transition===w){if(o in r.style){v+=w._prepDur(z.duration)+",";x+=w._prepDur(z.delay)+",";A+=(z.easing)+",";B+=t+",";s+=t+": "+z.value+"; ";}else{this.removeProperty(o);}}}B=B.replace(/,$/,";");v=v.replace(/,$/,";");A=A.replace(/,$/,";");x=x.replace(/,$/,";");if(!f._hasEnd[y]){r.addEventListener(k,w._onNativeEnd,false);f._hasEnd[y]=true;}p.cssText+=B+v+A+x+s;},_end:function(o){var s=this,q=s._node,u=s._callback,p=s._config,r={type:"transition:end",config:p,elapsedTime:o},t=b.one(q);s._running=false;s._callback=null;if(q){if(p.on&&p.on.end){setTimeout(function(){p.on.end.call(t,r);if(u){u.call(t,r);}},1);}else{if(u){setTimeout(function(){u.call(t,r);},1);}}}},_endNative:function(o){var p=this._node,q=p.ownerDocument.defaultView.getComputedStyle(p,"")[c];if(typeof q==="string"){q=q.replace(new RegExp("(?:^|,\\s)"+o+",?"),",");q=q.replace(/^,|,$/,"");p.style[m]=q;}},_onNativeEnd:function(v){var r=this,u=b.stamp(r),o=v,p=f._toCamel(o.propertyName),y=o.elapsedTime,x=f._nodeAttrs[u],w=x[p],s=(w)?w.transition:null,t,q;if(s){s.removeProperty(p);s._endNative(p);q=s._config[p];t={type:"propertyEnd",propertyName:p,elapsedTime:y,config:q};if(q&&q.on&&q.on.end){q.on.end.call(b.one(r),t);}if(s._count<=0){s._end(y);}}},destroy:function(){var o=this;node.removeEventListener(k,o._onNativeEnd,false);o._node=null;}};b.Transition=f;b.TransitionNative=f;b.Node.prototype.transition=function(q,p,u){var o=f._nodeAttrs[b.stamp(this._node)],s=(o)?o.transition||null:null,r,t;if(typeof q==="string"){if(typeof p==="function"){u=p;p=null;}r=f.fx[q];if(p&&typeof p!=="boolean"){p=b.clone(p);for(t in r){if(r.hasOwnProperty(t)){if(!(t in p)){p[t]=r[t];}}}}else{p=r;}}else{u=p;p=q;}if(s&&!s._running){s.init(this,p);}else{s=new f(this._node,p);}s.run(u);return this;};b.Node.prototype.show=function(p,o,q){this._show();if(p&&b.Transition){if(typeof p!=="string"&&!p.push){if(typeof o==="function"){q=o;o=p;}p=this.SHOW_TRANSITION;}this.transition(p,o,q);}return this;};var n=function(p,o,q){return function(){if(o){o.call(p);}if(q){q.apply(p._node,arguments);}};};b.Node.prototype.hide=function(p,o,q){if(p&&b.Transition){if(typeof o==="function"){q=o;o=null;}q=n(this,this._hide,q);if(typeof p!=="string"&&!p.push){if(typeof o==="function"){q=o;o=p;}p=this.HIDE_TRANSITION;}this.transition(p,o,q);}else{this._hide();}return this;};b.NodeList.prototype.transition=function(p,s){var o=this._nodes,q=0,r;while((r=o[q++])){b.one(r).transition(p,s);}return this;};b.Node.prototype.toggleView=function(p,o){var q;this._toggles=this._toggles||[];if(typeof p=="boolean"){o=p;}if(typeof o==="undefined"&&p in this._toggles){o=!this._toggles[p];}o=(o)?1:0;if(o){this._show();}else{q=n(anim,this._hide);}this._toggles[p]=o;this.transition(b.Transition.toggles[p][o],q);};b.NodeList.prototype.toggleView=function(p,s){var o=this._nodes,q=0,r;while((r=o[q++])){b.one(r).toggleView(p,s);}return this;};b.mix(f.fx,{fadeOut:{opacity:0,duration:0.5,easing:"ease-out"},fadeIn:{opacity:1,duration:0.5,easing:"ease-in"},sizeOut:{height:0,width:0,duration:0.75,easing:"ease-out"},sizeIn:{height:function(o){return o.get("scrollHeight")+"px"; +},width:function(o){return o.get("scrollWidth")+"px";},duration:0.5,easing:"ease-in",on:{start:function(){var o=this.getStyle("overflow");if(o!=="hidden"){this.setStyle("overflow","hidden");this._transitionOverflow=o;}},end:function(){if(this._transitionOverflow){this.setStyle("overflow",this._transitionOverflow);}}}}});b.mix(f.toggles,{size:["sizeIn","sizeOut"],fade:["fadeOut","fadeIn"]});},"3.3.0",{requires:["node-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/transition/transition-native.js b/jssource/src_files/include/javascript/yui3/build/transition/transition-native.js new file mode 100644 index 00000000..c0025055 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/transition/transition-native.js @@ -0,0 +1,675 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('transition-native', function(Y) { + +/** +* Provides the transition method for Node. +* Transition has no API of its own, but adds the transition method to Node. +* +* @module transition +* @requires node-style +*/ + +var TRANSITION = '-webkit-transition', + TRANSITION_CAMEL = 'WebkitTransition', + TRANSITION_PROPERTY_CAMEL = 'WebkitTransitionProperty', + TRANSITION_PROPERTY = '-webkit-transition-property', + TRANSITION_DURATION = '-webkit-transition-duration', + TRANSITION_TIMING_FUNCTION = '-webkit-transition-timing-function', + TRANSITION_DELAY = '-webkit-transition-delay', + TRANSITION_END = 'webkitTransitionEnd', + ON_TRANSITION_END = 'onwebkittransitionend', + TRANSFORM_CAMEL = 'WebkitTransform', + + EMPTY_OBJ = {}, + +/** + * A class for constructing transition instances. + * Adds the "transition" method to Node. + * @class Transition + * @constructor + */ + +Transition = function() { + this.init.apply(this, arguments); +}; + +Transition.fx = {}; +Transition.toggles = {}; + +Transition._hasEnd = {}; + +Transition._toCamel = function(property) { + property = property.replace(/-([a-z])/gi, function(m0, m1) { + return m1.toUpperCase(); + }); + + return property; +}; + +Transition._toHyphen = function(property) { + property = property.replace(/([A-Z]?)([a-z]+)([A-Z]?)/g, function(m0, m1, m2, m3) { + var str = ''; + if (m1) { + str += '-' + m1.toLowerCase(); + } + str += m2; + + if (m3) { + str += '-' + m3.toLowerCase(); + } + + return str; + }); + + return property; +}; + + +Transition._reKeywords = /^(?:node|duration|iterations|easing|delay|on|onstart|onend)$/i; + +Transition.useNative = false; + +if (TRANSITION in Y.config.doc.documentElement.style) { + Transition.useNative = true; + Transition.supported = true; // TODO: remove +} + +Y.Node.DOM_EVENTS[TRANSITION_END] = 1; + +Transition.NAME = 'transition'; + +Transition.DEFAULT_EASING = 'ease'; +Transition.DEFAULT_DURATION = 0.5; +Transition.DEFAULT_DELAY = 0; + +Transition._nodeAttrs = {}; + +Transition.prototype = { + constructor: Transition, + init: function(node, config) { + var anim = this; + anim._node = node; + if (!anim._running && config) { + anim._config = config; + node._transition = anim; // cache for reuse + + anim._duration = ('duration' in config) ? + config.duration: anim.constructor.DEFAULT_DURATION; + + anim._delay = ('delay' in config) ? + config.delay: anim.constructor.DEFAULT_DELAY; + + anim._easing = config.easing || anim.constructor.DEFAULT_EASING; + anim._count = 0; // track number of animated properties + anim._running = false; + + } + + return anim; + }, + + addProperty: function(prop, config) { + var anim = this, + node = this._node, + uid = Y.stamp(node), + nodeInstance = Y.one(node), + attrs = Transition._nodeAttrs[uid], + computed, + compareVal, + dur, + attr, + val; + + if (!attrs) { + attrs = Transition._nodeAttrs[uid] = {}; + } + + attr = attrs[prop]; + + // might just be a value + if (config && config.value !== undefined) { + val = config.value; + } else if (config !== undefined) { + val = config; + config = EMPTY_OBJ; + } + + if (typeof val === 'function') { + val = val.call(nodeInstance, nodeInstance); + } + + if (attr && attr.transition) { + // take control if another transition owns this property + if (attr.transition !== anim) { + attr.transition._count--; // remapping attr to this transition + } + } + + anim._count++; // properties per transition + + // make 0 async and fire events + dur = ((typeof config.duration != 'undefined') ? config.duration : + anim._duration) || 0.0001; + + attrs[prop] = { + value: val, + duration: dur, + delay: (typeof config.delay != 'undefined') ? config.delay : + anim._delay, + + easing: config.easing || anim._easing, + + transition: anim + }; + + // native end event doesnt fire when setting to same value + // supplementing with timer + // val may be a string or number (height: 0, etc), but computedStyle is always string + computed = Y.DOM.getComputedStyle(node, prop); + compareVal = (typeof val === 'string') ? computed : parseFloat(computed); + + if (Transition.useNative && compareVal === val) { + setTimeout(function() { + anim._onNativeEnd.call(node, { + propertyName: prop, + elapsedTime: dur + }); + }, dur * 1000); + } + }, + + removeProperty: function(prop) { + var anim = this, + attrs = Transition._nodeAttrs[Y.stamp(anim._node)]; + + if (attrs && attrs[prop]) { + delete attrs[prop]; + anim._count--; + } + + }, + + initAttrs: function(config) { + var attr, + node = this._node; + + if (config.transform && !config[TRANSFORM_CAMEL]) { + config[TRANSFORM_CAMEL] = config.transform; + delete config.transform; // TODO: copy + } + + for (attr in config) { + if (config.hasOwnProperty(attr) && !Transition._reKeywords.test(attr)) { + this.addProperty(attr, config[attr]); + + // when size is auto or % webkit starts from zero instead of computed + // (https://bugs.webkit.org/show_bug.cgi?id=16020) + // TODO: selective set + if (node.style[attr] === '') { + Y.DOM.setStyle(node, attr, Y.DOM.getComputedStyle(node, attr)); + } + } + } + }, + + /** + * Starts or an animation. + * @method run + * @chainable + * @private + */ + run: function(callback) { + var anim = this, + node = anim._node, + config = anim._config, + data = { + type: 'transition:start', + config: config + }; + + + if (!anim._running) { + anim._running = true; + + //anim._node.fire('transition:start', data); + + if (config.on && config.on.start) { + config.on.start.call(Y.one(node), data); + } + + anim.initAttrs(anim._config); + + anim._callback = callback; + anim._start(); + } + + + return anim; + }, + + _start: function() { + this._runNative(); + }, + + _prepDur: function(dur) { + dur = parseFloat(dur); + + return dur + 's'; + }, + + _runNative: function(time) { + var anim = this, + node = anim._node, + uid = Y.stamp(node), + style = node.style, + computed = getComputedStyle(node), + attrs = Transition._nodeAttrs[uid], + cssText = '', + cssTransition = computed[TRANSITION_PROPERTY], + + transitionText = TRANSITION_PROPERTY + ': ', + duration = TRANSITION_DURATION + ': ', + easing = TRANSITION_TIMING_FUNCTION + ': ', + delay = TRANSITION_DELAY + ': ', + hyphy, + attr, + name; + + // preserve existing transitions + if (cssTransition !== 'all') { + transitionText += cssTransition + ','; + duration += computed[TRANSITION_DURATION] + ','; + easing += computed[TRANSITION_TIMING_FUNCTION] + ','; + delay += computed[TRANSITION_DELAY] + ','; + + } + + // run transitions mapped to this instance + for (name in attrs) { + hyphy = Transition._toHyphen(name); + attr = attrs[name]; + if (attrs.hasOwnProperty(name) && attr.transition === anim) { + if (name in node.style) { // only native styles allowed + duration += anim._prepDur(attr.duration) + ','; + delay += anim._prepDur(attr.delay) + ','; + easing += (attr.easing) + ','; + + transitionText += hyphy + ','; + cssText += hyphy + ': ' + attr.value + '; '; + } else { + this.removeProperty(name); + } + } + } + + transitionText = transitionText.replace(/,$/, ';'); + duration = duration.replace(/,$/, ';'); + easing = easing.replace(/,$/, ';'); + delay = delay.replace(/,$/, ';'); + + // only one native end event per node + if (!Transition._hasEnd[uid]) { + //anim._detach = Y.on(TRANSITION_END, anim._onNativeEnd, node); + //node[ON_TRANSITION_END] = anim._onNativeEnd; + node.addEventListener(TRANSITION_END, anim._onNativeEnd, false); + Transition._hasEnd[uid] = true; + + } + + //setTimeout(function() { // allow updates to apply (size fix, onstart, etc) + style.cssText += transitionText + duration + easing + delay + cssText; + //}, 1); + + }, + + _end: function(elapsed) { + var anim = this, + node = anim._node, + callback = anim._callback, + config = anim._config, + data = { + type: 'transition:end', + config: config, + elapsedTime: elapsed + }, + + nodeInstance = Y.one(node); + + anim._running = false; + anim._callback = null; + + if (node) { + if (config.on && config.on.end) { + setTimeout(function() { // IE: allow previous update to finish + config.on.end.call(nodeInstance, data); + + // nested to ensure proper fire order + if (callback) { + callback.call(nodeInstance, data); + } + + }, 1); + } else if (callback) { + setTimeout(function() { // IE: allow previous update to finish + callback.call(nodeInstance, data); + }, 1); + } + //node.fire('transition:end', data); + } + + }, + + _endNative: function(name) { + var node = this._node, + value = node.ownerDocument.defaultView.getComputedStyle(node, '')[TRANSITION_PROPERTY]; + + if (typeof value === 'string') { + value = value.replace(new RegExp('(?:^|,\\s)' + name + ',?'), ','); + value = value.replace(/^,|,$/, ''); + node.style[TRANSITION_CAMEL] = value; + } + }, + + _onNativeEnd: function(e) { + var node = this, + uid = Y.stamp(node), + event = e,//e._event, + name = Transition._toCamel(event.propertyName), + elapsed = event.elapsedTime, + attrs = Transition._nodeAttrs[uid], + attr = attrs[name], + anim = (attr) ? attr.transition : null, + data, + config; + + if (anim) { + anim.removeProperty(name); + anim._endNative(name); + config = anim._config[name]; + + data = { + type: 'propertyEnd', + propertyName: name, + elapsedTime: elapsed, + config: config + }; + + if (config && config.on && config.on.end) { + config.on.end.call(Y.one(node), data); + } + + //node.fire('transition:propertyEnd', data); + + if (anim._count <= 0) { // after propertyEnd fires + anim._end(elapsed); + } + } + }, + + destroy: function() { + var anim = this; + /* + if (anim._detach) { + anim._detach.detach(); + } + */ + //anim._node[ON_TRANSITION_END] = null; + node.removeEventListener(TRANSITION_END, anim._onNativeEnd, false); + anim._node = null; + } +}; + +Y.Transition = Transition; +Y.TransitionNative = Transition; // TODO: remove + +/** + * Animate one or more css properties to a given value. Requires the "transition" module. + *
              example usage:
              + *       Y.one('#demo').transition({
              + *           duration: 1, // in seconds, default is 0.5
              + *           easing: 'ease-out', // default is 'ease'
              + *           delay: '1', // delay start for 1 second, default is 0
              + *
              + *           height: '10px',
              + *           width: '10px',
              + *
              + *           opacity: { // per property
              + *               value: 0,
              + *               duration: 2,
              + *               delay: 2,
              + *               easing: 'ease-in'
              + *           }
              + *       });
              + *   
              + * @for Node + * @method transition + * @param {Object} config An object containing one or more style properties, a duration and an easing. + * @param {Function} callback A function to run after the transition has completed. + * @chainable +*/ +Y.Node.prototype.transition = function(name, config, callback) { + var + transitionAttrs = Transition._nodeAttrs[Y.stamp(this._node)], + anim = (transitionAttrs) ? transitionAttrs.transition || null : null, + fxConfig, + prop; + + if (typeof name === 'string') { // named effect, pull config from registry + if (typeof config === 'function') { + callback = config; + config = null; + } + + fxConfig = Transition.fx[name]; + + if (config && typeof config !== 'boolean') { + config = Y.clone(config); + + for (prop in fxConfig) { + if (fxConfig.hasOwnProperty(prop)) { + if (! (prop in config)) { + config[prop] = fxConfig[prop]; + } + } + } + } else { + config = fxConfig; + } + + } else { // name is a config, config is a callback or undefined + callback = config; + config = name; + } + + if (anim && !anim._running) { + anim.init(this, config); + } else { + anim = new Transition(this._node, config); + } + + anim.run(callback); + return this; +}; + +Y.Node.prototype.show = function(name, config, callback) { + this._show(); // show prior to transition + if (name && Y.Transition) { + if (typeof name !== 'string' && !name.push) { // named effect or array of effects supercedes default + if (typeof config === 'function') { + callback = config; + config = name; + } + name = this.SHOW_TRANSITION; + } + this.transition(name, config, callback); + } + return this; +}; + +var _wrapCallBack = function(anim, fn, callback) { + return function() { + if (fn) { + fn.call(anim); + } + if (callback) { + callback.apply(anim._node, arguments); + } + }; +}; + +Y.Node.prototype.hide = function(name, config, callback) { + if (name && Y.Transition) { + if (typeof config === 'function') { + callback = config; + config = null; + } + + callback = _wrapCallBack(this, this._hide, callback); // wrap with existing callback + if (typeof name !== 'string' && !name.push) { // named effect or array of effects supercedes default + if (typeof config === 'function') { + callback = config; + config = name; + } + name = this.HIDE_TRANSITION; + } + this.transition(name, config, callback); + } else { + this._hide(); + } + return this; +}; + +/** + * Animate one or more css properties to a given value. Requires the "transition" module. + *
              example usage:
              + *       Y.all('.demo').transition({
              + *           duration: 1, // in seconds, default is 0.5
              + *           easing: 'ease-out', // default is 'ease'
              + *           delay: '1', // delay start for 1 second, default is 0
              + *
              + *           height: '10px',
              + *           width: '10px',
              + *
              + *           opacity: { // per property
              + *               value: 0,
              + *               duration: 2,
              + *               delay: 2,
              + *               easing: 'ease-in'
              + *           }
              + *       });
              + *   
              + * @for NodeList + * @method transition + * @param {Object} config An object containing one or more style properties, a duration and an easing. + * @param {Function} callback A function to run after the transition has completed. The callback fires + * once per item in the NodeList. + * @chainable +*/ +Y.NodeList.prototype.transition = function(config, callback) { + var nodes = this._nodes, + i = 0, + node; + + while ((node = nodes[i++])) { + Y.one(node).transition(config, callback); + } + + return this; +}; + +Y.Node.prototype.toggleView = function(name, on) { + var callback; + this._toggles = this._toggles || []; + + if (typeof name == 'boolean') { // no transition, just toggle + on = name; + } + if (typeof on === 'undefined' && name in this._toggles) { + on = ! this._toggles[name]; + } + + on = (on) ? 1 : 0; + + if (on) { + this._show(); + } else { + callback = _wrapCallBack(anim, this._hide); + } + + this._toggles[name] = on; + this.transition(Y.Transition.toggles[name][on], callback); +}; + +Y.NodeList.prototype.toggleView = function(config, callback) { + var nodes = this._nodes, + i = 0, + node; + + while ((node = nodes[i++])) { + Y.one(node).toggleView(config, callback); + } + + return this; +}; + +Y.mix(Transition.fx, { + fadeOut: { + opacity: 0, + duration: 0.5, + easing: 'ease-out' + }, + + fadeIn: { + opacity: 1, + duration: 0.5, + easing: 'ease-in' + }, + + sizeOut: { + height: 0, + width: 0, + duration: 0.75, + easing: 'ease-out' + }, + + sizeIn: { + height: function(node) { + return node.get('scrollHeight') + 'px'; + }, + width: function(node) { + return node.get('scrollWidth') + 'px'; + }, + duration: 0.5, + easing: 'ease-in', + + on: { + start: function() { + var overflow = this.getStyle('overflow'); + if (overflow !== 'hidden') { // enable scrollHeight/Width + this.setStyle('overflow', 'hidden'); + this._transitionOverflow = overflow; + } + }, + + end: function() { + if (this._transitionOverflow) { // revert overridden value + this.setStyle('overflow', this._transitionOverflow); + } + } + } + } +}); + +Y.mix(Transition.toggles, { + size: ['sizeIn', 'sizeOut'], + fade: ['fadeOut', 'fadeIn'] +}); + + +}, '3.3.0' ,{requires:['node-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/transition/transition-timer-min.js b/jssource/src_files/include/javascript/yui3/build/transition/transition-timer-min.js new file mode 100644 index 00000000..074d62ab --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/transition/transition-timer-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("transition-timer",function(b){var a=b.Transition;b.mix(a.prototype,{_start:function(){if(a.useNative){this._runNative();}else{this._runTimer();}},_runTimer:function(){var c=this;c._initAttrs();a._running[b.stamp(c)]=c;c._startTime=new Date();a._startTimer();},_endTimer:function(){var c=this;delete a._running[b.stamp(c)];c._startTime=null;},_runFrame:function(){var c=new Date()-this._startTime;this._runAttrs(c);},_runAttrs:function(e){var o=this,n=o._node,u=o._config,f=b.stamp(n),m=a._nodeAttrs[f],h=a.behaviors,l=false,g=false,v,w,j,q,c,s,r,k,p;for(w in m){j=m[w];if((j&&j.transition===o)){r=j.duration;s=j.delay;c=(e-s)/1000;k=e;v={type:"propertyEnd",propertyName:w,config:u,elapsedTime:c};q=(p in h&&"set" in h[p])?h[p].set:a.DEFAULT_SETTER;l=(k>=r);if(k>r){k=r;}if(!s||e>=s){q(o,w,j.from,j.to,k-s,r-s,j.easing,j.unit);if(l){delete m[w];o._count--;if(u[w]&&u[w].on&&u[w].on.end){u[w].on.end.call(b.one(n),v);}if(!g&&o._count<=0){g=true;o._end(c);o._endTimer();}}}}}},_initAttrs:function(){var j=this,e=a.behaviors,l=b.stamp(j._node),q=a._nodeAttrs[l],d,i,k,n,g,c,m,o,p,f,h;for(c in q){d=q[c];if(q.hasOwnProperty(c)&&(d&&d.transition===j)){i=d.duration*1000;k=d.delay*1000;n=d.easing;g=d.value;if(c in j._node.style||c in b.DOM.CUSTOM_STYLES){f=(c in e&&"get" in e[c])?e[c].get(j,c):a.DEFAULT_GETTER(j,c);o=a.RE_UNITS.exec(f);m=a.RE_UNITS.exec(g);f=o?o[1]:f;h=m?m[1]:g;p=m?m[2]:o?o[2]:"";if(!p&&a.RE_DEFAULT_UNIT.test(c)){p=a.DEFAULT_UNIT;}if(typeof n==="string"){if(n.indexOf("cubic-bezier")>-1){n=n.substring(13,n.length-1).split(",");}else{if(a.easings[n]){n=a.easings[n];}}}d.from=Number(f);d.to=Number(h);d.unit=p;d.easing=n;d.duration=i+k;d.delay=k;}else{delete q[c];j._count--;}}}},destroy:function(){this.detachAll();this._node=null;}},true);b.mix(b.Transition,{_runtimeAttrs:{},RE_DEFAULT_UNIT:/^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i,DEFAULT_UNIT:"px",intervalTime:20,behaviors:{left:{get:function(d,c){return b.DOM._getAttrOffset(d._node,c);}}},DEFAULT_SETTER:function(f,g,i,j,l,e,h,k){i=Number(i);j=Number(j);var d=f._node,c=a.cubicBezier(h,l/e);c=i+c[0]*(j-i);if(d){if(g in d.style||g in b.DOM.CUSTOM_STYLES){k=k||"";b.DOM.setStyle(d,g,c+k);}}else{f._end();}},DEFAULT_GETTER:function(e,c){var d=e._node,f="";if(c in d.style||c in b.DOM.CUSTOM_STYLES){f=b.DOM.getComputedStyle(d,c);}return f;},_startTimer:function(){if(!a._timer){a._timer=setInterval(a._runFrame,a.intervalTime);}},_stopTimer:function(){clearInterval(a._timer);a._timer=null;},_runFrame:function(){var c=true,d;for(d in a._running){if(a._running[d]._runFrame){c=false;a._running[d]._runFrame();}}if(c){a._stopTimer();}},cubicBezier:function(s,m){var z=0,f=0,w=s[0],e=s[1],v=s[2],d=s[3],u=1,c=0,r=u-3*v+3*w-z,q=3*v-6*w+3*z,o=3*w-3*z,n=z,l=c-3*d+3*e-f,k=3*d-6*e+3*f,j=3*e-3*f,i=f,h=(((r*m)+q)*m+o)*m+n,g=(((l*m)+k)*m+j)*m+i;return[h,g];},easings:{ease:[0.25,0,1,0.25],linear:[0,0,1,1],"ease-in":[0.42,0,1,1],"ease-out":[0,0,0.58,1],"ease-in-out":[0.42,0,0.58,1]},_running:{},_timer:null,RE_UNITS:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/},true);a.behaviors.top=a.behaviors.bottom=a.behaviors.right=a.behaviors.left;b.Transition=a;},"3.3.0",{requires:["transition-native","node-style"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/transition/transition-timer.js b/jssource/src_files/include/javascript/yui3/build/transition/transition-timer.js new file mode 100644 index 00000000..89d12649 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/transition/transition-timer.js @@ -0,0 +1,348 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('transition-timer', function(Y) { + +/* +* The Transition Utility provides an API for creating advanced transitions. +* @module transition +*/ + +/* +* Provides the base Transition class, for animating numeric properties. +* +* @module transition +* @submodule transition-timer +*/ + + +var Transition = Y.Transition; + +Y.mix(Transition.prototype, { + _start: function() { + if (Transition.useNative) { + this._runNative(); + } else { + this._runTimer(); + } + }, + + _runTimer: function() { + var anim = this; + anim._initAttrs(); + + Transition._running[Y.stamp(anim)] = anim; + anim._startTime = new Date(); + Transition._startTimer(); + }, + + _endTimer: function() { + var anim = this; + delete Transition._running[Y.stamp(anim)]; + anim._startTime = null; + }, + + _runFrame: function() { + var t = new Date() - this._startTime; + this._runAttrs(t); + }, + + _runAttrs: function(time) { + var anim = this, + node = anim._node, + config = anim._config, + uid = Y.stamp(node), + attrs = Transition._nodeAttrs[uid], + customAttr = Transition.behaviors, + done = false, + allDone = false, + data, + name, + attribute, + setter, + elapsed, + delay, + d, + t, + i; + + for (name in attrs) { + attribute = attrs[name]; + if ((attribute && attribute.transition === anim)) { + d = attribute.duration; + delay = attribute.delay; + elapsed = (time - delay) / 1000; + t = time; + data = { + type: 'propertyEnd', + propertyName: name, + config: config, + elapsedTime: elapsed + }; + + setter = (i in customAttr && 'set' in customAttr[i]) ? + customAttr[i].set : Transition.DEFAULT_SETTER; + + done = (t >= d); + + if (t > d) { + t = d; + } + + if (!delay || time >= delay) { + setter(anim, name, attribute.from, attribute.to, t - delay, d - delay, + attribute.easing, attribute.unit); + + if (done) { + delete attrs[name]; + anim._count--; + + if (config[name] && config[name].on && config[name].on.end) { + config[name].on.end.call(Y.one(node), data); + } + + //node.fire('transition:propertyEnd', data); + + if (!allDone && anim._count <= 0) { + allDone = true; + anim._end(elapsed); + anim._endTimer(); + } + } + } + + } + } + }, + + _initAttrs: function() { + var anim = this, + customAttr = Transition.behaviors, + uid = Y.stamp(anim._node), + attrs = Transition._nodeAttrs[uid], + attribute, + duration, + delay, + easing, + val, + name, + mTo, + mFrom, + unit, begin, end; + + for (name in attrs) { + attribute = attrs[name]; + if (attrs.hasOwnProperty(name) && (attribute && attribute.transition === anim)) { + duration = attribute.duration * 1000; + delay = attribute.delay * 1000; + easing = attribute.easing; + val = attribute.value; + + // only allow supported properties + if (name in anim._node.style || name in Y.DOM.CUSTOM_STYLES) { + begin = (name in customAttr && 'get' in customAttr[name]) ? + customAttr[name].get(anim, name) : Transition.DEFAULT_GETTER(anim, name); + + mFrom = Transition.RE_UNITS.exec(begin); + mTo = Transition.RE_UNITS.exec(val); + + begin = mFrom ? mFrom[1] : begin; + end = mTo ? mTo[1] : val; + unit = mTo ? mTo[2] : mFrom ? mFrom[2] : ''; // one might be zero TODO: mixed units + + if (!unit && Transition.RE_DEFAULT_UNIT.test(name)) { + unit = Transition.DEFAULT_UNIT; + } + + if (typeof easing === 'string') { + if (easing.indexOf('cubic-bezier') > -1) { + easing = easing.substring(13, easing.length - 1).split(','); + } else if (Transition.easings[easing]) { + easing = Transition.easings[easing]; + } + } + + attribute.from = Number(begin); + attribute.to = Number(end); + attribute.unit = unit; + attribute.easing = easing; + attribute.duration = duration + delay; + attribute.delay = delay; + } else { + delete attrs[name]; + anim._count--; + } + } + } + }, + + destroy: function() { + this.detachAll(); + this._node = null; + } +}, true); + +Y.mix(Y.Transition, { + _runtimeAttrs: {}, + /* + * Regex of properties that should use the default unit. + * + * @property RE_DEFAULT_UNIT + * @static + */ + RE_DEFAULT_UNIT: /^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i, + + /* + * The default unit to use with properties that pass the RE_DEFAULT_UNIT test. + * + * @property DEFAULT_UNIT + * @static + */ + DEFAULT_UNIT: 'px', + + /* + * Time in milliseconds passed to setInterval for frame processing + * + * @property intervalTime + * @default 20 + * @static + */ + intervalTime: 20, + + /* + * Bucket for custom getters and setters + * + * @property behaviors + * @static + */ + behaviors: { + left: { + get: function(anim, attr) { + return Y.DOM._getAttrOffset(anim._node, attr); + } + } + }, + + /* + * The default setter to use when setting object properties. + * + * @property DEFAULT_SETTER + * @static + */ + DEFAULT_SETTER: function(anim, att, from, to, elapsed, duration, fn, unit) { + from = Number(from); + to = Number(to); + + var node = anim._node, + val = Transition.cubicBezier(fn, elapsed / duration); + + val = from + val[0] * (to - from); + + if (node) { + if (att in node.style || att in Y.DOM.CUSTOM_STYLES) { + unit = unit || ''; + Y.DOM.setStyle(node, att, val + unit); + } + } else { + anim._end(); + } + }, + + /* + * The default getter to use when getting object properties. + * + * @property DEFAULT_GETTER + * @static + */ + DEFAULT_GETTER: function(anim, att) { + var node = anim._node, + val = ''; + + if (att in node.style || att in Y.DOM.CUSTOM_STYLES) { + val = Y.DOM.getComputedStyle(node, att); + } + + return val; + }, + + _startTimer: function() { + if (!Transition._timer) { + Transition._timer = setInterval(Transition._runFrame, Transition.intervalTime); + } + }, + + _stopTimer: function() { + clearInterval(Transition._timer); + Transition._timer = null; + }, + + /* + * Called per Interval to handle each animation frame. + * @method _runFrame + * @private + * @static + */ + _runFrame: function() { + var done = true, + anim; + for (anim in Transition._running) { + if (Transition._running[anim]._runFrame) { + done = false; + Transition._running[anim]._runFrame(); + } + } + + if (done) { + Transition._stopTimer(); + } + }, + + cubicBezier: function(p, t) { + var x0 = 0, + y0 = 0, + x1 = p[0], + y1 = p[1], + x2 = p[2], + y2 = p[3], + x3 = 1, + y3 = 0, + + A = x3 - 3 * x2 + 3 * x1 - x0, + B = 3 * x2 - 6 * x1 + 3 * x0, + C = 3 * x1 - 3 * x0, + D = x0, + E = y3 - 3 * y2 + 3 * y1 - y0, + F = 3 * y2 - 6 * y1 + 3 * y0, + G = 3 * y1 - 3 * y0, + H = y0, + + x = (((A*t) + B)*t + C)*t + D, + y = (((E*t) + F)*t + G)*t + H; + + return [x, y]; + }, + + easings: { + ease: [0.25, 0, 1, 0.25], + linear: [0, 0, 1, 1], + 'ease-in': [0.42, 0, 1, 1], + 'ease-out': [0, 0, 0.58, 1], + 'ease-in-out': [0.42, 0, 0.58, 1] + }, + + _running: {}, + _timer: null, + + RE_UNITS: /^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/ +}, true); + +Transition.behaviors.top = Transition.behaviors.bottom = Transition.behaviors.right = Transition.behaviors.left; + +Y.Transition = Transition; + + +}, '3.3.0' ,{requires:['transition-native', 'node-style']}); diff --git a/jssource/src_files/include/javascript/yui3/build/transition/transition.js b/jssource/src_files/include/javascript/yui3/build/transition/transition.js new file mode 100644 index 00000000..b4abc59a --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/transition/transition.js @@ -0,0 +1,1020 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('transition-native', function(Y) { + +/** +* Provides the transition method for Node. +* Transition has no API of its own, but adds the transition method to Node. +* +* @module transition +* @requires node-style +*/ + +var TRANSITION = '-webkit-transition', + TRANSITION_CAMEL = 'WebkitTransition', + TRANSITION_PROPERTY_CAMEL = 'WebkitTransitionProperty', + TRANSITION_PROPERTY = '-webkit-transition-property', + TRANSITION_DURATION = '-webkit-transition-duration', + TRANSITION_TIMING_FUNCTION = '-webkit-transition-timing-function', + TRANSITION_DELAY = '-webkit-transition-delay', + TRANSITION_END = 'webkitTransitionEnd', + ON_TRANSITION_END = 'onwebkittransitionend', + TRANSFORM_CAMEL = 'WebkitTransform', + + EMPTY_OBJ = {}, + +/** + * A class for constructing transition instances. + * Adds the "transition" method to Node. + * @class Transition + * @constructor + */ + +Transition = function() { + this.init.apply(this, arguments); +}; + +Transition.fx = {}; +Transition.toggles = {}; + +Transition._hasEnd = {}; + +Transition._toCamel = function(property) { + property = property.replace(/-([a-z])/gi, function(m0, m1) { + return m1.toUpperCase(); + }); + + return property; +}; + +Transition._toHyphen = function(property) { + property = property.replace(/([A-Z]?)([a-z]+)([A-Z]?)/g, function(m0, m1, m2, m3) { + var str = ''; + if (m1) { + str += '-' + m1.toLowerCase(); + } + str += m2; + + if (m3) { + str += '-' + m3.toLowerCase(); + } + + return str; + }); + + return property; +}; + + +Transition._reKeywords = /^(?:node|duration|iterations|easing|delay|on|onstart|onend)$/i; + +Transition.useNative = false; + +if (TRANSITION in Y.config.doc.documentElement.style) { + Transition.useNative = true; + Transition.supported = true; // TODO: remove +} + +Y.Node.DOM_EVENTS[TRANSITION_END] = 1; + +Transition.NAME = 'transition'; + +Transition.DEFAULT_EASING = 'ease'; +Transition.DEFAULT_DURATION = 0.5; +Transition.DEFAULT_DELAY = 0; + +Transition._nodeAttrs = {}; + +Transition.prototype = { + constructor: Transition, + init: function(node, config) { + var anim = this; + anim._node = node; + if (!anim._running && config) { + anim._config = config; + node._transition = anim; // cache for reuse + + anim._duration = ('duration' in config) ? + config.duration: anim.constructor.DEFAULT_DURATION; + + anim._delay = ('delay' in config) ? + config.delay: anim.constructor.DEFAULT_DELAY; + + anim._easing = config.easing || anim.constructor.DEFAULT_EASING; + anim._count = 0; // track number of animated properties + anim._running = false; + + } + + return anim; + }, + + addProperty: function(prop, config) { + var anim = this, + node = this._node, + uid = Y.stamp(node), + nodeInstance = Y.one(node), + attrs = Transition._nodeAttrs[uid], + computed, + compareVal, + dur, + attr, + val; + + if (!attrs) { + attrs = Transition._nodeAttrs[uid] = {}; + } + + attr = attrs[prop]; + + // might just be a value + if (config && config.value !== undefined) { + val = config.value; + } else if (config !== undefined) { + val = config; + config = EMPTY_OBJ; + } + + if (typeof val === 'function') { + val = val.call(nodeInstance, nodeInstance); + } + + if (attr && attr.transition) { + // take control if another transition owns this property + if (attr.transition !== anim) { + attr.transition._count--; // remapping attr to this transition + } + } + + anim._count++; // properties per transition + + // make 0 async and fire events + dur = ((typeof config.duration != 'undefined') ? config.duration : + anim._duration) || 0.0001; + + attrs[prop] = { + value: val, + duration: dur, + delay: (typeof config.delay != 'undefined') ? config.delay : + anim._delay, + + easing: config.easing || anim._easing, + + transition: anim + }; + + // native end event doesnt fire when setting to same value + // supplementing with timer + // val may be a string or number (height: 0, etc), but computedStyle is always string + computed = Y.DOM.getComputedStyle(node, prop); + compareVal = (typeof val === 'string') ? computed : parseFloat(computed); + + if (Transition.useNative && compareVal === val) { + setTimeout(function() { + anim._onNativeEnd.call(node, { + propertyName: prop, + elapsedTime: dur + }); + }, dur * 1000); + } + }, + + removeProperty: function(prop) { + var anim = this, + attrs = Transition._nodeAttrs[Y.stamp(anim._node)]; + + if (attrs && attrs[prop]) { + delete attrs[prop]; + anim._count--; + } + + }, + + initAttrs: function(config) { + var attr, + node = this._node; + + if (config.transform && !config[TRANSFORM_CAMEL]) { + config[TRANSFORM_CAMEL] = config.transform; + delete config.transform; // TODO: copy + } + + for (attr in config) { + if (config.hasOwnProperty(attr) && !Transition._reKeywords.test(attr)) { + this.addProperty(attr, config[attr]); + + // when size is auto or % webkit starts from zero instead of computed + // (https://bugs.webkit.org/show_bug.cgi?id=16020) + // TODO: selective set + if (node.style[attr] === '') { + Y.DOM.setStyle(node, attr, Y.DOM.getComputedStyle(node, attr)); + } + } + } + }, + + /** + * Starts or an animation. + * @method run + * @chainable + * @private + */ + run: function(callback) { + var anim = this, + node = anim._node, + config = anim._config, + data = { + type: 'transition:start', + config: config + }; + + + if (!anim._running) { + anim._running = true; + + //anim._node.fire('transition:start', data); + + if (config.on && config.on.start) { + config.on.start.call(Y.one(node), data); + } + + anim.initAttrs(anim._config); + + anim._callback = callback; + anim._start(); + } + + + return anim; + }, + + _start: function() { + this._runNative(); + }, + + _prepDur: function(dur) { + dur = parseFloat(dur); + + return dur + 's'; + }, + + _runNative: function(time) { + var anim = this, + node = anim._node, + uid = Y.stamp(node), + style = node.style, + computed = getComputedStyle(node), + attrs = Transition._nodeAttrs[uid], + cssText = '', + cssTransition = computed[TRANSITION_PROPERTY], + + transitionText = TRANSITION_PROPERTY + ': ', + duration = TRANSITION_DURATION + ': ', + easing = TRANSITION_TIMING_FUNCTION + ': ', + delay = TRANSITION_DELAY + ': ', + hyphy, + attr, + name; + + // preserve existing transitions + if (cssTransition !== 'all') { + transitionText += cssTransition + ','; + duration += computed[TRANSITION_DURATION] + ','; + easing += computed[TRANSITION_TIMING_FUNCTION] + ','; + delay += computed[TRANSITION_DELAY] + ','; + + } + + // run transitions mapped to this instance + for (name in attrs) { + hyphy = Transition._toHyphen(name); + attr = attrs[name]; + if (attrs.hasOwnProperty(name) && attr.transition === anim) { + if (name in node.style) { // only native styles allowed + duration += anim._prepDur(attr.duration) + ','; + delay += anim._prepDur(attr.delay) + ','; + easing += (attr.easing) + ','; + + transitionText += hyphy + ','; + cssText += hyphy + ': ' + attr.value + '; '; + } else { + this.removeProperty(name); + } + } + } + + transitionText = transitionText.replace(/,$/, ';'); + duration = duration.replace(/,$/, ';'); + easing = easing.replace(/,$/, ';'); + delay = delay.replace(/,$/, ';'); + + // only one native end event per node + if (!Transition._hasEnd[uid]) { + //anim._detach = Y.on(TRANSITION_END, anim._onNativeEnd, node); + //node[ON_TRANSITION_END] = anim._onNativeEnd; + node.addEventListener(TRANSITION_END, anim._onNativeEnd, false); + Transition._hasEnd[uid] = true; + + } + + //setTimeout(function() { // allow updates to apply (size fix, onstart, etc) + style.cssText += transitionText + duration + easing + delay + cssText; + //}, 1); + + }, + + _end: function(elapsed) { + var anim = this, + node = anim._node, + callback = anim._callback, + config = anim._config, + data = { + type: 'transition:end', + config: config, + elapsedTime: elapsed + }, + + nodeInstance = Y.one(node); + + anim._running = false; + anim._callback = null; + + if (node) { + if (config.on && config.on.end) { + setTimeout(function() { // IE: allow previous update to finish + config.on.end.call(nodeInstance, data); + + // nested to ensure proper fire order + if (callback) { + callback.call(nodeInstance, data); + } + + }, 1); + } else if (callback) { + setTimeout(function() { // IE: allow previous update to finish + callback.call(nodeInstance, data); + }, 1); + } + //node.fire('transition:end', data); + } + + }, + + _endNative: function(name) { + var node = this._node, + value = node.ownerDocument.defaultView.getComputedStyle(node, '')[TRANSITION_PROPERTY]; + + if (typeof value === 'string') { + value = value.replace(new RegExp('(?:^|,\\s)' + name + ',?'), ','); + value = value.replace(/^,|,$/, ''); + node.style[TRANSITION_CAMEL] = value; + } + }, + + _onNativeEnd: function(e) { + var node = this, + uid = Y.stamp(node), + event = e,//e._event, + name = Transition._toCamel(event.propertyName), + elapsed = event.elapsedTime, + attrs = Transition._nodeAttrs[uid], + attr = attrs[name], + anim = (attr) ? attr.transition : null, + data, + config; + + if (anim) { + anim.removeProperty(name); + anim._endNative(name); + config = anim._config[name]; + + data = { + type: 'propertyEnd', + propertyName: name, + elapsedTime: elapsed, + config: config + }; + + if (config && config.on && config.on.end) { + config.on.end.call(Y.one(node), data); + } + + //node.fire('transition:propertyEnd', data); + + if (anim._count <= 0) { // after propertyEnd fires + anim._end(elapsed); + } + } + }, + + destroy: function() { + var anim = this; + /* + if (anim._detach) { + anim._detach.detach(); + } + */ + //anim._node[ON_TRANSITION_END] = null; + node.removeEventListener(TRANSITION_END, anim._onNativeEnd, false); + anim._node = null; + } +}; + +Y.Transition = Transition; +Y.TransitionNative = Transition; // TODO: remove + +/** + * Animate one or more css properties to a given value. Requires the "transition" module. + *
              example usage:
              + *       Y.one('#demo').transition({
              + *           duration: 1, // in seconds, default is 0.5
              + *           easing: 'ease-out', // default is 'ease'
              + *           delay: '1', // delay start for 1 second, default is 0
              + *
              + *           height: '10px',
              + *           width: '10px',
              + *
              + *           opacity: { // per property
              + *               value: 0,
              + *               duration: 2,
              + *               delay: 2,
              + *               easing: 'ease-in'
              + *           }
              + *       });
              + *   
              + * @for Node + * @method transition + * @param {Object} config An object containing one or more style properties, a duration and an easing. + * @param {Function} callback A function to run after the transition has completed. + * @chainable +*/ +Y.Node.prototype.transition = function(name, config, callback) { + var + transitionAttrs = Transition._nodeAttrs[Y.stamp(this._node)], + anim = (transitionAttrs) ? transitionAttrs.transition || null : null, + fxConfig, + prop; + + if (typeof name === 'string') { // named effect, pull config from registry + if (typeof config === 'function') { + callback = config; + config = null; + } + + fxConfig = Transition.fx[name]; + + if (config && typeof config !== 'boolean') { + config = Y.clone(config); + + for (prop in fxConfig) { + if (fxConfig.hasOwnProperty(prop)) { + if (! (prop in config)) { + config[prop] = fxConfig[prop]; + } + } + } + } else { + config = fxConfig; + } + + } else { // name is a config, config is a callback or undefined + callback = config; + config = name; + } + + if (anim && !anim._running) { + anim.init(this, config); + } else { + anim = new Transition(this._node, config); + } + + anim.run(callback); + return this; +}; + +Y.Node.prototype.show = function(name, config, callback) { + this._show(); // show prior to transition + if (name && Y.Transition) { + if (typeof name !== 'string' && !name.push) { // named effect or array of effects supercedes default + if (typeof config === 'function') { + callback = config; + config = name; + } + name = this.SHOW_TRANSITION; + } + this.transition(name, config, callback); + } + return this; +}; + +var _wrapCallBack = function(anim, fn, callback) { + return function() { + if (fn) { + fn.call(anim); + } + if (callback) { + callback.apply(anim._node, arguments); + } + }; +}; + +Y.Node.prototype.hide = function(name, config, callback) { + if (name && Y.Transition) { + if (typeof config === 'function') { + callback = config; + config = null; + } + + callback = _wrapCallBack(this, this._hide, callback); // wrap with existing callback + if (typeof name !== 'string' && !name.push) { // named effect or array of effects supercedes default + if (typeof config === 'function') { + callback = config; + config = name; + } + name = this.HIDE_TRANSITION; + } + this.transition(name, config, callback); + } else { + this._hide(); + } + return this; +}; + +/** + * Animate one or more css properties to a given value. Requires the "transition" module. + *
              example usage:
              + *       Y.all('.demo').transition({
              + *           duration: 1, // in seconds, default is 0.5
              + *           easing: 'ease-out', // default is 'ease'
              + *           delay: '1', // delay start for 1 second, default is 0
              + *
              + *           height: '10px',
              + *           width: '10px',
              + *
              + *           opacity: { // per property
              + *               value: 0,
              + *               duration: 2,
              + *               delay: 2,
              + *               easing: 'ease-in'
              + *           }
              + *       });
              + *   
              + * @for NodeList + * @method transition + * @param {Object} config An object containing one or more style properties, a duration and an easing. + * @param {Function} callback A function to run after the transition has completed. The callback fires + * once per item in the NodeList. + * @chainable +*/ +Y.NodeList.prototype.transition = function(config, callback) { + var nodes = this._nodes, + i = 0, + node; + + while ((node = nodes[i++])) { + Y.one(node).transition(config, callback); + } + + return this; +}; + +Y.Node.prototype.toggleView = function(name, on) { + var callback; + this._toggles = this._toggles || []; + + if (typeof name == 'boolean') { // no transition, just toggle + on = name; + } + if (typeof on === 'undefined' && name in this._toggles) { + on = ! this._toggles[name]; + } + + on = (on) ? 1 : 0; + + if (on) { + this._show(); + } else { + callback = _wrapCallBack(anim, this._hide); + } + + this._toggles[name] = on; + this.transition(Y.Transition.toggles[name][on], callback); +}; + +Y.NodeList.prototype.toggleView = function(config, callback) { + var nodes = this._nodes, + i = 0, + node; + + while ((node = nodes[i++])) { + Y.one(node).toggleView(config, callback); + } + + return this; +}; + +Y.mix(Transition.fx, { + fadeOut: { + opacity: 0, + duration: 0.5, + easing: 'ease-out' + }, + + fadeIn: { + opacity: 1, + duration: 0.5, + easing: 'ease-in' + }, + + sizeOut: { + height: 0, + width: 0, + duration: 0.75, + easing: 'ease-out' + }, + + sizeIn: { + height: function(node) { + return node.get('scrollHeight') + 'px'; + }, + width: function(node) { + return node.get('scrollWidth') + 'px'; + }, + duration: 0.5, + easing: 'ease-in', + + on: { + start: function() { + var overflow = this.getStyle('overflow'); + if (overflow !== 'hidden') { // enable scrollHeight/Width + this.setStyle('overflow', 'hidden'); + this._transitionOverflow = overflow; + } + }, + + end: function() { + if (this._transitionOverflow) { // revert overridden value + this.setStyle('overflow', this._transitionOverflow); + } + } + } + } +}); + +Y.mix(Transition.toggles, { + size: ['sizeIn', 'sizeOut'], + fade: ['fadeOut', 'fadeIn'] +}); + + +}, '3.3.0' ,{requires:['node-base']}); +YUI.add('transition-timer', function(Y) { + +/* +* The Transition Utility provides an API for creating advanced transitions. +* @module transition +*/ + +/* +* Provides the base Transition class, for animating numeric properties. +* +* @module transition +* @submodule transition-timer +*/ + + +var Transition = Y.Transition; + +Y.mix(Transition.prototype, { + _start: function() { + if (Transition.useNative) { + this._runNative(); + } else { + this._runTimer(); + } + }, + + _runTimer: function() { + var anim = this; + anim._initAttrs(); + + Transition._running[Y.stamp(anim)] = anim; + anim._startTime = new Date(); + Transition._startTimer(); + }, + + _endTimer: function() { + var anim = this; + delete Transition._running[Y.stamp(anim)]; + anim._startTime = null; + }, + + _runFrame: function() { + var t = new Date() - this._startTime; + this._runAttrs(t); + }, + + _runAttrs: function(time) { + var anim = this, + node = anim._node, + config = anim._config, + uid = Y.stamp(node), + attrs = Transition._nodeAttrs[uid], + customAttr = Transition.behaviors, + done = false, + allDone = false, + data, + name, + attribute, + setter, + elapsed, + delay, + d, + t, + i; + + for (name in attrs) { + attribute = attrs[name]; + if ((attribute && attribute.transition === anim)) { + d = attribute.duration; + delay = attribute.delay; + elapsed = (time - delay) / 1000; + t = time; + data = { + type: 'propertyEnd', + propertyName: name, + config: config, + elapsedTime: elapsed + }; + + setter = (i in customAttr && 'set' in customAttr[i]) ? + customAttr[i].set : Transition.DEFAULT_SETTER; + + done = (t >= d); + + if (t > d) { + t = d; + } + + if (!delay || time >= delay) { + setter(anim, name, attribute.from, attribute.to, t - delay, d - delay, + attribute.easing, attribute.unit); + + if (done) { + delete attrs[name]; + anim._count--; + + if (config[name] && config[name].on && config[name].on.end) { + config[name].on.end.call(Y.one(node), data); + } + + //node.fire('transition:propertyEnd', data); + + if (!allDone && anim._count <= 0) { + allDone = true; + anim._end(elapsed); + anim._endTimer(); + } + } + } + + } + } + }, + + _initAttrs: function() { + var anim = this, + customAttr = Transition.behaviors, + uid = Y.stamp(anim._node), + attrs = Transition._nodeAttrs[uid], + attribute, + duration, + delay, + easing, + val, + name, + mTo, + mFrom, + unit, begin, end; + + for (name in attrs) { + attribute = attrs[name]; + if (attrs.hasOwnProperty(name) && (attribute && attribute.transition === anim)) { + duration = attribute.duration * 1000; + delay = attribute.delay * 1000; + easing = attribute.easing; + val = attribute.value; + + // only allow supported properties + if (name in anim._node.style || name in Y.DOM.CUSTOM_STYLES) { + begin = (name in customAttr && 'get' in customAttr[name]) ? + customAttr[name].get(anim, name) : Transition.DEFAULT_GETTER(anim, name); + + mFrom = Transition.RE_UNITS.exec(begin); + mTo = Transition.RE_UNITS.exec(val); + + begin = mFrom ? mFrom[1] : begin; + end = mTo ? mTo[1] : val; + unit = mTo ? mTo[2] : mFrom ? mFrom[2] : ''; // one might be zero TODO: mixed units + + if (!unit && Transition.RE_DEFAULT_UNIT.test(name)) { + unit = Transition.DEFAULT_UNIT; + } + + if (typeof easing === 'string') { + if (easing.indexOf('cubic-bezier') > -1) { + easing = easing.substring(13, easing.length - 1).split(','); + } else if (Transition.easings[easing]) { + easing = Transition.easings[easing]; + } + } + + attribute.from = Number(begin); + attribute.to = Number(end); + attribute.unit = unit; + attribute.easing = easing; + attribute.duration = duration + delay; + attribute.delay = delay; + } else { + delete attrs[name]; + anim._count--; + } + } + } + }, + + destroy: function() { + this.detachAll(); + this._node = null; + } +}, true); + +Y.mix(Y.Transition, { + _runtimeAttrs: {}, + /* + * Regex of properties that should use the default unit. + * + * @property RE_DEFAULT_UNIT + * @static + */ + RE_DEFAULT_UNIT: /^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i, + + /* + * The default unit to use with properties that pass the RE_DEFAULT_UNIT test. + * + * @property DEFAULT_UNIT + * @static + */ + DEFAULT_UNIT: 'px', + + /* + * Time in milliseconds passed to setInterval for frame processing + * + * @property intervalTime + * @default 20 + * @static + */ + intervalTime: 20, + + /* + * Bucket for custom getters and setters + * + * @property behaviors + * @static + */ + behaviors: { + left: { + get: function(anim, attr) { + return Y.DOM._getAttrOffset(anim._node, attr); + } + } + }, + + /* + * The default setter to use when setting object properties. + * + * @property DEFAULT_SETTER + * @static + */ + DEFAULT_SETTER: function(anim, att, from, to, elapsed, duration, fn, unit) { + from = Number(from); + to = Number(to); + + var node = anim._node, + val = Transition.cubicBezier(fn, elapsed / duration); + + val = from + val[0] * (to - from); + + if (node) { + if (att in node.style || att in Y.DOM.CUSTOM_STYLES) { + unit = unit || ''; + Y.DOM.setStyle(node, att, val + unit); + } + } else { + anim._end(); + } + }, + + /* + * The default getter to use when getting object properties. + * + * @property DEFAULT_GETTER + * @static + */ + DEFAULT_GETTER: function(anim, att) { + var node = anim._node, + val = ''; + + if (att in node.style || att in Y.DOM.CUSTOM_STYLES) { + val = Y.DOM.getComputedStyle(node, att); + } + + return val; + }, + + _startTimer: function() { + if (!Transition._timer) { + Transition._timer = setInterval(Transition._runFrame, Transition.intervalTime); + } + }, + + _stopTimer: function() { + clearInterval(Transition._timer); + Transition._timer = null; + }, + + /* + * Called per Interval to handle each animation frame. + * @method _runFrame + * @private + * @static + */ + _runFrame: function() { + var done = true, + anim; + for (anim in Transition._running) { + if (Transition._running[anim]._runFrame) { + done = false; + Transition._running[anim]._runFrame(); + } + } + + if (done) { + Transition._stopTimer(); + } + }, + + cubicBezier: function(p, t) { + var x0 = 0, + y0 = 0, + x1 = p[0], + y1 = p[1], + x2 = p[2], + y2 = p[3], + x3 = 1, + y3 = 0, + + A = x3 - 3 * x2 + 3 * x1 - x0, + B = 3 * x2 - 6 * x1 + 3 * x0, + C = 3 * x1 - 3 * x0, + D = x0, + E = y3 - 3 * y2 + 3 * y1 - y0, + F = 3 * y2 - 6 * y1 + 3 * y0, + G = 3 * y1 - 3 * y0, + H = y0, + + x = (((A*t) + B)*t + C)*t + D, + y = (((E*t) + F)*t + G)*t + H; + + return [x, y]; + }, + + easings: { + ease: [0.25, 0, 1, 0.25], + linear: [0, 0, 1, 1], + 'ease-in': [0.42, 0, 1, 1], + 'ease-out': [0, 0, 0.58, 1], + 'ease-in-out': [0.42, 0, 0.58, 1] + }, + + _running: {}, + _timer: null, + + RE_UNITS: /^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/ +}, true); + +Transition.behaviors.top = Transition.behaviors.bottom = Transition.behaviors.right = Transition.behaviors.left; + +Y.Transition = Transition; + + +}, '3.3.0' ,{requires:['transition-native', 'node-style']}); + + +YUI.add('transition', function(Y){}, '3.3.0' ,{use:['transition-native', 'transition-timer']}); + diff --git a/jssource/src_files/include/javascript/yui3/build/uploader/uploader-min.js b/jssource/src_files/include/javascript/yui3/build/uploader/uploader-min.js new file mode 100644 index 00000000..dafa7718 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/uploader/uploader-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("uploader",function(E){var B=E.Event,C=E.Node;var A=E.Env.cdn+"uploader/assets/uploader.swf";function D(F){D.superclass.constructor.apply(this,arguments);if(F.hasOwnProperty("boundingBox")){this.set("boundingBox",F.boundingBox);}if(F.hasOwnProperty("buttonSkin")){this.set("buttonSkin",F.buttonSkin);}if(F.hasOwnProperty("transparent")){this.set("transparent",F.transparent);}if(F.hasOwnProperty("swfURL")){this.set("swfURL",F.swfURL);}}E.extend(D,E.Base,{uploaderswf:null,_id:"",initializer:function(){this._id=E.guid("uploader");var F=C.one(this.get("boundingBox"));var I={version:"10.0.45",fixedAttributes:{allowScriptAccess:"always",allowNetworking:"all",scale:"noscale"},flashVars:{}};if(this.get("buttonSkin")!=""){I.flashVars["buttonSkin"]=this.get("buttonSkin");}if(this.get("transparent")){I.fixedAttributes["wmode"]="transparent";}this.uploaderswf=new E.SWF(F,this.get("swfURL"),I);var H=this.uploaderswf;var G=E.bind(this._relayEvent,this);H.on("swfReady",E.bind(this._initializeUploader,this));H.on("click",G);H.on("fileselect",G);H.on("mousedown",G);H.on("mouseup",G);H.on("mouseleave",G);H.on("mouseenter",G);H.on("uploadcancel",G);H.on("uploadcomplete",G);H.on("uploadcompletedata",G);H.on("uploaderror",G);H.on("uploadprogress",G);H.on("uploadstart",G);},removeFile:function(F){return this.uploaderswf.callSWF("removeFile",[F]);},clearFileList:function(){return this.uploaderswf.callSWF("clearFileList",[]);},upload:function(F,H,J,G,I){if(E.Lang.isArray(F)){return this.uploaderswf.callSWF("uploadThese",[F,H,J,G,I]);}else{if(E.Lang.isString(F)){return this.uploaderswf.callSWF("upload",[F,H,J,G,I]);}}},uploadThese:function(H,G,J,F,I){return this.uploaderswf.callSWF("uploadThese",[H,G,J,F,I]);},uploadAll:function(G,I,F,H){return this.uploaderswf.callSWF("uploadAll",[G,I,F,H]);},cancel:function(F){return this.uploaderswf.callSWF("cancel",[F]);},setAllowLogging:function(F){this.uploaderswf.callSWF("setAllowLogging",[F]);},setAllowMultipleFiles:function(F){this.uploaderswf.callSWF("setAllowMultipleFiles",[F]);},setSimUploadLimit:function(F){this.uploaderswf.callSWF("setSimUploadLimit",[F]);},setFileFilters:function(F){this.uploaderswf.callSWF("setFileFilters",[F]);},enable:function(){this.uploaderswf.callSWF("enable");},disable:function(){this.uploaderswf.callSWF("disable");},_initializeUploader:function(F){this.publish("uploaderReady",{fireOnce:true});this.fire("uploaderReady",{});},_relayEvent:function(F){this.fire(F.type,F);},toString:function(){return"Uploader "+this._id;}},{ATTRS:{log:{value:false,setter:"setAllowLogging"},multiFiles:{value:false,setter:"setAllowMultipleFiles"},simLimit:{value:2,setter:"setSimUploadLimit"},fileFilters:{value:[],setter:"setFileFilters"},boundingBox:{value:null,writeOnce:"initOnly"},buttonSkin:{value:null,writeOnce:"initOnly"},transparent:{value:true,writeOnce:"initOnly"},swfURL:{value:A,writeOnce:"initOnly"}}});E.Uploader=D;},"3.3.0",{requires:["swf","base","node","event"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/uploader/uploader.js b/jssource/src_files/include/javascript/yui3/build/uploader/uploader.js new file mode 100644 index 00000000..b1419a6f --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/uploader/uploader.js @@ -0,0 +1,551 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('uploader', function(Y) { + +/** + * Upload files to the server with support for file filtering, multiple file uploads + * and progress monitoring. + * @module uploader + */ + +var Event = Y.Event, + Node = Y.Node; + +var SWFURL = Y.Env.cdn + "uploader/assets/uploader.swf"; + +/** + * The Uploader widget is a tool for uploading files to the server. + * @module uploader + * @title Uploader + * @requires base, node, event, swf + */ + +/** + * Creates the Uploader instance and keeps the initialization data + * + * @class Uploader + * @extends Y.Base + * @constructor + * @param {Object} config (optional) Configuration parameters for the Uploader. The following parameters are available: + *
              + *
              boundingBox : String|Node (required)
              + *
              + *
              buttonSkin : String (optional)
              + *
              + *
              transparent : String (optional)
              + *
              + *
              swfURL : String (optional)
              + *
              + *
              + */ + +function Uploader (config /*Object*/) { + + Uploader.superclass.constructor.apply(this, arguments); + + if (config.hasOwnProperty("boundingBox")) { + this.set("boundingBox", config.boundingBox); + }; + + if (config.hasOwnProperty("buttonSkin")) { + this.set("buttonSkin", config.buttonSkin); + }; + if (config.hasOwnProperty("transparent")) { + this.set("transparent", config.transparent); + }; + if (config.hasOwnProperty("swfURL")) { + this.set("swfURL", config.swfURL); + }; +}; + + +Y.extend(Uploader, Y.Base, { + + /** + * The reference to the instance of Y.SWF that encapsulates the instance of the Flash player with uploader logic. + * + * @private + * @property uploaderswf + * @type {SWF} + * @default null + */ + uploaderswf:null, + + /** + * The id of this instance of uploader. + * + * @private + * @property _id + * @type {String} + */ + _id:"", + + /** + * Construction logic executed during Uploader instantiation. + * + * @method initializer + * @protected + */ + initializer : function () { + + this._id = Y.guid("uploader"); + var oElement = Node.one(this.get("boundingBox")); + + var params = {version: "10.0.45", + fixedAttributes: {allowScriptAccess:"always", allowNetworking:"all", scale: "noscale"}, + flashVars: {}}; + + if (this.get("buttonSkin") != "") { + params.flashVars["buttonSkin"] = this.get("buttonSkin"); + } + if (this.get("transparent")) { + params.fixedAttributes["wmode"] = "transparent"; + } + + this.uploaderswf = new Y.SWF(oElement, this.get("swfURL"), params); + + var upswf = this.uploaderswf; + var relEvent = Y.bind(this._relayEvent, this); + + /** + * Announces that the uploader is ready and available for calling methods + * and setting properties + * + * @event uploaderReady + * @param event {Event} The event object for the uploaderReady. + */ + upswf.on ("swfReady", Y.bind(this._initializeUploader, this)); + + /** + * Fired when the mouse button is clicked on the Uploader's 'Browse' button. + * + * @event click + * @param event {Event} The event object for the click. + */ + upswf.on ("click", relEvent); + + /** + * Fires when the user has finished selecting a set of files to be uploaded. + * + * @event fileselect + * @param event {Event} The event object for the fileSelect. + *
              + *
              fileList
              + *
              The file list Object with entries in the following format: + fileList[fileID] = {id: fileID, name: fileName, cDate: fileCDate, mDate: fileMDate, size: fileSize}
              + *
              + */ + upswf.on ("fileselect", relEvent); + + /** + * Fired when the mouse button is pressed on the Uploader's 'Browse' button. + * + * @event mousedown + * @param event {Event} The event object for the mousedown. + */ + upswf.on ("mousedown", relEvent); + + /** + * Fired when the mouse button is raised on the Uploader's 'Browse' button. + * + * @event mouseup + * @param event {Event} The event object for the mouseup. + */ + upswf.on ("mouseup", relEvent); + + /** + * Fired when the mouse leaves the Uploader's 'Browse' button. + * + * @event mouseleave + * @param event {Event} The event object for the mouseleave. + */ + upswf.on ("mouseleave", relEvent); + + /** + * Fired when the mouse enters the Uploader's 'Browse' button. + * + * @event mouseenter + * @param event {Event} The event object for the mouseenter. + */ + upswf.on ("mouseenter", relEvent); + + /** + * Announces that the uploader is ready and available for calling methods + * and setting properties + * + * @event uploadcancel + * @param event {Event} The event object for the uploaderReady. + *
              + *
              ddEvent
              + *
              drag:start event from the thumb
              + *
              + */ + upswf.on ("uploadcancel", relEvent); + + /** + * Fires when a specific file's upload is cancelled. + * + * @event uploadcomplete + * @param event {Event} The event object for the uploadcancel. + *
              + *
              id
              + *
              The id of the file whose upload has been cancelled.
              + *
              + */ + upswf.on ("uploadcomplete", relEvent); + + /** + * If the server has sent a response to the file upload, this event is + * fired and the response is added to its payload. + * + * @event uploadcompletedata + * @param event {Event} The event object for the uploadcompletedata. + *
              + *
              id
              + *
              The id of the file for which the response is being provided.
              + *
              data
              + *
              The content of the server response.
              + *
              + */ + upswf.on ("uploadcompletedata", relEvent); + + /** + * Provides error information if an error has occurred during the upload. + * + * @event uploaderror + * @param event {Event} The event object for the uploadeerror. + *
              + *
              id
              + *
              The id of the file for which the upload error has occurred.
              + *
              status
              + *
              Relevant error information.
              + *
              + */ + upswf.on ("uploaderror", relEvent); + + /** + * Provides progress information on a specific file upload. + * + * @event uploadprogress + * @param event {Event} The event object for the uploadprogress. + *
              + *
              id
              + *
              The id of the file for which the progress information is being provided.
              + *
              bytesLoaded
              + *
              The number of bytes of the file that has been uploaded.
              + *
              bytesTotal
              + *
              The total number of bytes in the file that is being uploaded.
              + *
              + */ + upswf.on ("uploadprogress", relEvent); + + /** + * Announces that the upload has been started for a specific file. + * + * @event uploadstart + * @param event {Event} The event object for the uploadstart. + *
              + *
              id
              + *
              The id of the file whose upload has been started.
              + *
              + */ + upswf.on ("uploadstart", relEvent); + }, + + /** + * Removes a specific file from the upload queue. + * + * @method removeFile + * @param fileID {String} The ID of the file to be removed + * @return {Object} The updated file list, which is an object of the format: + * fileList[fileID] = {id: fileID, name: fileName, cDate: fileCDate, mDate: fileMDate, size: fileSize} + */ + removeFile : function (fileID /*String*/) { + return this.uploaderswf.callSWF("removeFile", [fileID]); + }, + + /** + * Clears the upload queue. + * + * @method clearFileList + * @return {Boolean} This method always returns true. + */ + clearFileList : function () { + return this.uploaderswf.callSWF("clearFileList", []); + }, + + /** + * Starts the upload of a specific file. + * + * @method upload + * @param fileID {String} The ID of the file to be uploaded. + * @param url {String} The URL to upload the file to. + * @param method {String} (optional) The HTTP method to use for sending additional variables, either 'GET' or 'POST' ('GET' by default) + * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request. + * @param postFileVarName {String} (optional) The name of the POST variable that should contain the uploaded file ('Filedata' by default) + * @return {Boolean} This method always returns true. + */ + upload : function (fileID /*String*/, url /*String*/, method /*String*/, postVars /*Object*/, postFileVarName /*String*/) { + if (Y.Lang.isArray(fileID)) { + return this.uploaderswf.callSWF("uploadThese", [fileID, url, method, postVars, postFileVarName]); + } + else if (Y.Lang.isString(fileID)) { + return this.uploaderswf.callSWF("upload", [fileID, url, method, postVars, postFileVarName]); + + } + }, + + /** + * Starts the upload of a set of files, as specified in the first argument. + * The upload queue is managed automatically. + * + * @method uploadThese + * @param fileIDs {Array} The array of IDs of the files to be uploaded. + * @param url {String} The URL to upload the files to. + * @param method {String} (optional) The HTTP method to use for sending additional variables, either 'GET' or 'POST' ('GET' by default) + * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request. + * @param postFileVarName {String} (optional) The name of the POST variable that should contain the uploaded file ('Filedata' by default) + */ + uploadThese : function (fileIDs /*Array*/, url /*String*/, method /*String*/, postVars /*Object*/, postFileVarName /*String*/) { + return this.uploaderswf.callSWF("uploadThese", [fileIDs, url, method, postVars, postFileVarName]); + }, + + /** + * Starts the upload of the files in the upload queue. + * The upload queue is managed automatically. + * + * @method uploadAll + * @param url {String} The URL to upload the files to. + * @param method {String} (optional) The HTTP method to use for sending additional variables, either 'GET' or 'POST' ('GET' by default) + * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request. + * @param postFileVarName {String} (optional) The name of the POST variable that should contain the uploaded file ('Filedata' by default). + */ + uploadAll : function (url /*String*/, method /*String*/, postVars /*Object*/, postFileVarName /*String*/) { + return this.uploaderswf.callSWF("uploadAll", [url, method, postVars,postFileVarName]); + }, + + /** + * Cancels the upload of a specific file, if currently in progress. + * + * @method cancel + * @param fileID {String} (optional) The ID of the file whose upload should be cancelled. If no ID is specified, all uploads are cancelled. + */ + cancel : function (fileID /*String*/) { + return this.uploaderswf.callSWF("cancel", [fileID]); + }, + + /** + * @private + * Setter for the 'log' property. + * @method setAllowLogging + * @param value {Boolean} The value for the 'log' property. + */ + setAllowLogging : function (value /*Boolean*/) { + this.uploaderswf.callSWF("setAllowLogging", [value]); + }, + + /** + * @private + * Setter for the 'multiFiles' property. + * @method setAllowMultipleFiles + * @param value {Boolean} The value for the 'multiFiles' property. + */ + setAllowMultipleFiles : function (value /*Boolean*/) { + this.uploaderswf.callSWF("setAllowMultipleFiles", [value]); + }, + + /** + * @private + * Setter for the 'simLimit' property. + * @method setSimUploadLimit + * @param value {Boolean} The value for the 'simLimit' property. + */ + setSimUploadLimit : function (value /*int*/) { + this.uploaderswf.callSWF("setSimUploadLimit", [value]); + }, + + /** + * @private + * Setter for the 'fileFilters' property. + * @method setFileFilters + * @param value {Boolean} The value for the 'fileFilters' property. + */ + setFileFilters : function (fileFilters /*Array*/) { + this.uploaderswf.callSWF("setFileFilters", [fileFilters]); + }, + + /** + * Enables the uploader user input (mouse clicks on the 'Browse' button). If the button skin + * is applied, the sprite is reset from the "disabled" state. + * + * @method enable + */ + enable : function () { + this.uploaderswf.callSWF("enable"); + }, + + /** + * Disables the uploader user input (mouse clicks on the 'Browse' button). If the button skin + * is applied, the sprite is set to the 'disabled' state. + * + * @method enable + */ + disable : function () { + this.uploaderswf.callSWF("disable"); + }, + + /** + * @private + * Called when the uploader SWF is initialized + * @method _initializeUploader + * @param event {Object} The event to be propagated from Flash. + */ + _initializeUploader: function (event) { + this.publish("uploaderReady", {fireOnce:true}); + this.fire("uploaderReady", {}); + }, + + /** + * @private + * Called when an event is dispatched from Uploader + * @method _relayEvent + * @param event {Object} The event to be propagated from Flash. + */ + _relayEvent: function (event) { + this.fire(event.type, event); + }, + + toString: function() + { + return "Uploader " + this._id; + } + +}, +{ + ATTRS: { + /** + * The flag that allows Flash player to + * output debug messages to its trace stack + * (if the Flash debug player is used). + * + * @attribute log + * @type {Boolean} + * @default false + */ + log: { + value: false, + setter : "setAllowLogging" + }, + + /** + * The flag that allows the user to select + * more than one files during the 'Browse' + * dialog (using 'Shift' or 'Ctrl' keys). + * + * @attribute multiFiles + * @type {Boolean} + * @default false + */ + multiFiles : { + value: false, + setter : "setAllowMultipleFiles" + }, + + /** + * The number of files that can be uploaded + * simultaneously if the automatic queue management + * is used. This value can be in the range between 2 + * and 5. + * + * @attribute simLimit + * @type {Number} + * @default 2 + */ + simLimit : { + value: 2, + setter : "setSimUploadLimit" + }, + + /** + * The array of filters on file extensions for + * the 'Browse' dialog. These filters only provide + * convenience for the user and do not strictly + * limit the selection to certain file extensions. + * Each item in the array must contain a 'description' + * property, and an 'extensions' property that must be + * in the form "*.ext;*.ext;*.ext;..." + * + * @attribute fileFilters + * @type {Array} + * @default [] + */ + fileFilters : { + value: [], + setter : "setFileFilters" + }, + + /** + * The Node containing the uploader's 'Browse' button. + * + * @attribute boundingBox + * @type {Node} + * @default null + * @writeOnce + */ + boundingBox : { + value: null, + writeOnce: 'initOnly' + }, + + /** + * The URL of the image sprite for skinning the uploader's 'Browse' button. + * + * @attribute buttonSkin + * @type {String} + * @default null + * @writeOnce + */ + buttonSkin : { + value: null, + writeOnce: 'initOnly' + }, + + /** + * The flag indicating whether the uploader is rendered + * with a transparent background. + * + * @attribute transparent + * @type {Boolean} + * @default true + * @writeOnce + */ + transparent : { + value: true, + writeOnce: 'initOnly' + }, + + /** + * The URL of the uploader's SWF. + * + * @attribute swfURL + * @type {String} + * @default "assets/uploader.swf" + * @writeOnce + */ + swfURL : { + value : SWFURL, + writeOnce: 'initOnly' + } + + } +} +); +Y.Uploader = Uploader; + + +}, '3.3.0' ,{requires:['swf', 'base', 'node', 'event']}); diff --git a/jssource/src_files/include/javascript/yui3/build/widget-anim/widget-anim-min.js b/jssource/src_files/include/javascript/yui3/build/widget-anim/widget-anim-min.js new file mode 100644 index 00000000..457be84b --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/widget-anim/widget-anim-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("widget-anim",function(C){var P="boundingBox",O="host",S="node",L="opacity",R="",K="visible",Q="destroy",N="hidden",B="rendered",M="start",F="end",I="duration",D="animShow",J="animHide",A="_uiSetVisible",G="animShowChange",H="animHideChange";function E(T){E.superclass.constructor.apply(this,arguments);}E.NS="anim";E.NAME="pluginWidgetAnim";E.ANIMATIONS={fadeIn:function(){var V=this.get(O),T=V.get(P),U=new C.Anim({node:T,to:{opacity:1},duration:this.get(I)});if(!V.get(K)){T.setStyle(L,0);}U.on(Q,function(){this.get(S).setStyle(L,(C.UA.ie)?1:R);});return U;},fadeOut:function(){return new C.Anim({node:this.get(O).get(P),to:{opacity:0},duration:this.get(I)});}};E.ATTRS={duration:{value:0.2},animShow:{valueFn:E.ANIMATIONS.fadeIn},animHide:{valueFn:E.ANIMATIONS.fadeOut}};C.extend(E,C.Plugin.Base,{initializer:function(T){this._bindAnimShow();this._bindAnimHide();this.after(G,this._bindAnimShow);this.after(H,this._bindAnimHide);this.beforeHostMethod(A,this._uiAnimSetVisible);},destructor:function(){this.get(D).destroy();this.get(J).destroy();},_uiAnimSetVisible:function(T){if(this.get(O).get(B)){if(T){this.get(J).stop();this.get(D).run();}else{this.get(D).stop();this.get(J).run();}return new C.Do.Prevent();}},_uiSetVisible:function(U){var T=this.get(O),V=T.getClassName(N);T.get(P).toggleClass(V,!U);},_bindAnimShow:function(){this.get(D).on(M,C.bind(function(){this._uiSetVisible(true);},this));},_bindAnimHide:function(){this.get(J).after(F,C.bind(function(){this._uiSetVisible(false);},this));}});C.namespace("Plugin").WidgetAnim=E;},"3.3.0",{requires:["plugin","anim-base","widget"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/widget-anim/widget-anim.js b/jssource/src_files/include/javascript/yui3/build/widget-anim/widget-anim.js new file mode 100644 index 00000000..28e026a1 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/widget-anim/widget-anim.js @@ -0,0 +1,264 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('widget-anim', function(Y) { + +/** + * Provides a plugin which can be used to animate widget visibility changes. + * + * @module widget-anim + */ +var BOUNDING_BOX = "boundingBox", + HOST = "host", + NODE = "node", + OPACITY = "opacity", + EMPTY_STR = "", + VISIBLE = "visible", + DESTROY = "destroy", + HIDDEN = "hidden", + + RENDERED = "rendered", + + START = "start", + END = "end", + + DURATION = "duration", + ANIM_SHOW = "animShow", + ANIM_HIDE = "animHide", + + _UI_SET_VISIBLE = "_uiSetVisible", + + ANIM_SHOW_CHANGE = "animShowChange", + ANIM_HIDE_CHANGE = "animHideChange"; + +/** + * A plugin class which can be used to animate widget visibility changes. + * + * @class WidgetAnim + * @extends Plugin.Base + * @namespace Plugin + */ +function WidgetAnim(config) { + WidgetAnim.superclass.constructor.apply(this, arguments); +} + +/** + * The namespace for the plugin. This will be the property on the widget, which will + * reference the plugin instance, when it's plugged in. + * + * @property WidgetAnim.NS + * @static + * @type String + * @default "anim" + */ +WidgetAnim.NS = "anim"; + +/** + * The NAME of the WidgetAnim class. Used to prefix events generated + * by the plugin class. + * + * @property WidgetAnim.NAME + * @static + * @type String + * @default "pluginWidgetAnim" + */ +WidgetAnim.NAME = "pluginWidgetAnim"; + +/** + * Pre-Packaged Animation implementations, which can be used for animShow and animHide attribute + * values. + * + * @property WidgetAnim.ANIMATIONS + * @static + * @type Object + * @default "pluginWidgetAnim" + */ +WidgetAnim.ANIMATIONS = { + + fadeIn : function() { + + var widget = this.get(HOST), + boundingBox = widget.get(BOUNDING_BOX), + + anim = new Y.Anim({ + node: boundingBox, + to: { opacity: 1 }, + duration: this.get(DURATION) + }); + + // Set initial opacity, to avoid initial flicker + if (!widget.get(VISIBLE)) { + boundingBox.setStyle(OPACITY, 0); + } + + // Clean up, on destroy. Where supported, remove + // opacity set using style. Else make 100% opaque + anim.on(DESTROY, function() { + this.get(NODE).setStyle(OPACITY, (Y.UA.ie) ? 1 : EMPTY_STR); + }); + + return anim; + }, + + fadeOut : function() { + return new Y.Anim({ + node: this.get(HOST).get(BOUNDING_BOX), + to: { opacity: 0 }, + duration: this.get(DURATION) + }); + } +}; + +/** + * Static property used to define the default attribute + * configuration for the plugin. + * + * @property WidgetAnim.ATTRS + * @type Object + * @static + */ +WidgetAnim.ATTRS = { + + /** + * Default duration in seconds. Used as the default duration for the default animation implementations + * + * @attribute duration + * @type Number + * @default 0.2 (seconds + */ + duration : { + value: 0.2 + }, + + /** + * Default animation instance used for showing the widget (opacity fade-in) + * + * @attribute animShow + * @type Anim + * @default WidgetAnim.ANIMATIONS.fadeIn + */ + animShow : { + valueFn: WidgetAnim.ANIMATIONS.fadeIn + }, + + /** + * Default animation instance used for hiding the widget (opacity fade-out) + * + * @attribute animHide + * @type Anim + * @default WidgetAnim.ANIMATIONS.fadeOut + */ + animHide : { + valueFn: WidgetAnim.ANIMATIONS.fadeOut + } +}; + +Y.extend(WidgetAnim, Y.Plugin.Base, { + + /** + * The initializer lifecycle implementation. Modifies the host widget's + * visibililty implementation to add animation. + * + * @method initializer + * @param {Object} config The user configuration for the plugin + */ + initializer : function(config) { + this._bindAnimShow(); + this._bindAnimHide(); + + this.after(ANIM_SHOW_CHANGE, this._bindAnimShow); + this.after(ANIM_HIDE_CHANGE, this._bindAnimHide); + + // Override default _uiSetVisible method, with custom animated method + this.beforeHostMethod(_UI_SET_VISIBLE, this._uiAnimSetVisible); + }, + + /** + * The initializer destructor implementation. Responsible for destroying the configured + * animation instances. + * + * @method destructor + */ + destructor : function() { + this.get(ANIM_SHOW).destroy(); + this.get(ANIM_HIDE).destroy(); + }, + + /** + * The injected method used to override the host widget's _uiSetVisible implementation with + * an animated version of the same. + * + *

              This method replaces the default _uiSetVisible handler + * Widget provides, by injecting itself before _uiSetVisible, + * and preventing the default behavior.

              + * + * @method _uiAnimSetVisible + * @protected + * @param {boolean} val true, if making the widget visible. false, if hiding it. + */ + _uiAnimSetVisible : function(val) { + if (this.get(HOST).get(RENDERED)) { + if (val) { + this.get(ANIM_HIDE).stop(); + this.get(ANIM_SHOW).run(); + } else { + this.get(ANIM_SHOW).stop(); + this.get(ANIM_HIDE).run(); + } + return new Y.Do.Prevent(); + } + }, + + /** + * The original Widget _uiSetVisible implementation. This currently needs to be replicated, + * so it can be invoked before or after the animation starts or stops, since the original + * methods is not available to the AOP implementation. + * + * @method _uiSetVisible + * @param {boolean} val true, if making the widget visible. false, if hiding it. + * @private + */ + _uiSetVisible : function(val) { + var host = this.get(HOST), + hiddenClass = host.getClassName(HIDDEN); + + host.get(BOUNDING_BOX).toggleClass(hiddenClass, !val); + }, + + /** + * Binds a listener to invoke the original visibility handling when the animShow animation is started + * + * @method _bindAnimShow + * @private + */ + _bindAnimShow : function() { + // Setup original visibility handling (for show) before starting to animate + this.get(ANIM_SHOW).on(START, + Y.bind(function() { + this._uiSetVisible(true); + }, this)); + }, + + /** + * Binds a listener to invoke the original visibility handling when the animHide animation is complete + * + * @method _bindAnimHide + * @private + */ + _bindAnimHide : function() { + // Setup original visibility handling (for hide) after completing animation + this.get(ANIM_HIDE).after(END, + Y.bind(function() { + this._uiSetVisible(false); + }, this)); + } +}); + +Y.namespace("Plugin").WidgetAnim = WidgetAnim; + + +}, '3.3.0' ,{requires:['plugin', 'anim-base', 'widget']}); diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-base-ie-min.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-base-ie-min.js new file mode 100644 index 00000000..02da3dc9 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-base-ie-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("widget-base-ie",function(a){var d="boundingBox",f="contentBox",c="height",e="offsetHeight",g="",b=a.UA.ie,i=b<7,h=a.Widget.getClassName("tmp","forcesize"),j=a.Widget.getClassName("content","expanded");a.Widget.prototype._uiSizeCB=function(l){var n=this.get(d),k=this.get(f),m=this._bbs;if(m===undefined){this._bbs=m=!(b<8&&n.get("ownerDocument").get("compatMode")!="BackCompat");}if(m){k.toggleClass(j,l);}else{if(l){if(i){n.addClass(h);}k.set(e,n.get(e));if(i){n.removeClass(h);}}else{k.setStyle(c,g);}}};},"3.3.0",{requires:["widget-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-base-ie.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-base-ie.js new file mode 100644 index 00000000..7de0b084 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-base-ie.js @@ -0,0 +1,56 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('widget-base-ie', function(Y) { + +/** + * IE specific support for the widget-base module. + * + * @module widget-base-ie + */ +var BOUNDING_BOX = "boundingBox", + CONTENT_BOX = "contentBox", + HEIGHT = "height", + OFFSET_HEIGHT = "offsetHeight", + EMPTY_STR = "", + IE = Y.UA.ie, + heightReallyMinHeight = IE < 7, + bbTempExpanding = Y.Widget.getClassName("tmp", "forcesize"), + contentExpanded = Y.Widget.getClassName("content", "expanded"); + +// TODO: Ideally we want to re-use the base _uiSizeCB impl +Y.Widget.prototype._uiSizeCB = function(expand) { + + var bb = this.get(BOUNDING_BOX), + cb = this.get(CONTENT_BOX), + borderBoxSupported = this._bbs; + + if(borderBoxSupported === undefined) { + this._bbs = borderBoxSupported = !(IE < 8 && bb.get("ownerDocument").get("compatMode") != "BackCompat"); + } + + if (borderBoxSupported) { + cb.toggleClass(contentExpanded, expand); + } else { + if (expand) { + if (heightReallyMinHeight) { + bb.addClass(bbTempExpanding); + } + + cb.set(OFFSET_HEIGHT, bb.get(OFFSET_HEIGHT)); + + if (heightReallyMinHeight) { + bb.removeClass(bbTempExpanding); + } + } else { + cb.setStyle(HEIGHT, EMPTY_STR); + } + } +}; + + +}, '3.3.0' ,{requires:['widget-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-base-min.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-base-min.js new file mode 100644 index 00000000..7d75dedc --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-base-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("widget-base",function(b){var g=b.Lang,r=b.Node,e=b.ClassNameManager,w=e.getClassName,M,s=b.cached(function(L){return L.substring(0,1).toUpperCase()+L.substring(1);}),F="content",P="visible",K="hidden",y="disabled",B="focused",d="width",A="height",N="boundingBox",v="contentBox",k="parentNode",m="ownerDocument",x="auto",j="srcNode",I="body",H="tabIndex",q="id",i="render",J="rendered",n="destroyed",a="strings",o="
              ",z="Change",p="loading",E="_uiSet",D="",G=function(){},u=true,O=false,t,l={},f=[P,y,A,d,B],C=b.UA.webkit,h={};function c(Q){var T=this,L,S,R=T.constructor;T._strs={};T._cssPrefix=R.CSS_PREFIX||w(R.NAME.toLowerCase());c.superclass.constructor.apply(T,arguments);S=T.get(i);if(S){if(S!==u){L=S;}T.render(L);}}c.NAME="widget";t=c.UI_SRC="ui";c.ATTRS=l;l[q]={valueFn:"_guid",writeOnce:u};l[J]={value:O,readOnly:u};l[N]={value:null,setter:"_setBB",writeOnce:u};l[v]={valueFn:"_defaultCB",setter:"_setCB",writeOnce:u};l[H]={value:null,validator:"_validTabIndex"};l[B]={value:O,readOnly:u};l[y]={value:O};l[P]={value:u};l[A]={value:D};l[d]={value:D};l[a]={value:{},setter:"_strSetter",getter:"_strGetter"};l[i]={value:O,writeOnce:u};c.CSS_PREFIX=w(c.NAME.toLowerCase());c.getClassName=function(){return w.apply(e,[c.CSS_PREFIX].concat(b.Array(arguments),true));};M=c.getClassName;c.getByNode=function(L){var R,Q=M();L=r.one(L);if(L){L=L.ancestor("."+Q,true);if(L){R=h[b.stamp(L,u)];}}return R||null;};b.extend(c,b.Base,{getClassName:function(){return w.apply(e,[this._cssPrefix].concat(b.Array(arguments),true));},initializer:function(L){h[b.stamp(this.get(N))]=this;if(this._applyParser){this._applyParser(L);}},destructor:function(){var Q=this.get(N),L=this.get(v),R=b.stamp(Q,u);if(R in h){delete h[R];}if(this.UI_EVENTS){this._destroyUIEvents();}this._unbindUI(Q);if(L){L.remove(u);}Q.remove(u);},render:function(L){if(!this.get(n)&&!this.get(J)){this.publish(i,{queuable:O,fireOnce:u,defaultTargetOnly:u,defaultFn:this._defRenderFn});this.fire(i,{parentNode:(L)?r.one(L):null});}return this;},_defRenderFn:function(L){this._parentNode=L.parentNode;this.renderer();this._set(J,u);this._removeLoadingClassNames();},renderer:function(){var L=this;L._renderUI();L.renderUI();L._bindUI();L.bindUI();L._syncUI();L.syncUI();},bindUI:G,renderUI:G,syncUI:G,hide:function(){return this.set(P,O);},show:function(){return this.set(P,u);},focus:function(){return this._set(B,u);},blur:function(){return this._set(B,O);},enable:function(){return this.set(y,O);},disable:function(){return this.set(y,u);},_uiSizeCB:function(L){this.get(v).toggleClass(M(F,"expanded"),L);},_renderBox:function(L){var T=this,Q=T.get(v),R=T.get(N),V=T.get(j),S=T.DEF_PARENT_NODE,U=(V&&V.get(m))||R.get(m)||Q.get(m);if(V&&!V.compareTo(Q)&&!Q.inDoc(U)){V.replace(Q);}if(!R.compareTo(Q.get(k))&&!R.compareTo(Q)){if(Q.inDoc(U)){Q.replace(R);}R.appendChild(Q);}L=L||(S&&r.one(S));if(L){L.appendChild(R);}else{if(!R.inDoc(U)){r.one(I).insert(R,0);}}},_setBB:function(L){return this._setBox(this.get(q),L,this.BOUNDING_TEMPLATE);},_setCB:function(L){return(this.CONTENT_TEMPLATE===null)?this.get(N):this._setBox(null,L,this.CONTENT_TEMPLATE);},_defaultCB:function(L){return this.get(j)||null;},_setBox:function(R,Q,L){Q=r.one(Q)||r.create(L);if(!Q.get(q)){Q.set(q,R||b.guid());}return Q;},_renderUI:function(){this._renderBoxClassNames();this._renderBox(this._parentNode);},_renderBoxClassNames:function(){var S=this._getClasses(),L,Q=this.get(N),R;Q.addClass(M());for(R=S.length-3;R>=0;R--){L=S[R];Q.addClass(L.CSS_PREFIX||w(L.NAME.toLowerCase()));}this.get(v).addClass(this.getClassName(F));},_removeLoadingClassNames:function(){var R=this.get(N),L=this.get(v),Q=this.getClassName(p),S=M(p);R.removeClass(S).removeClass(Q);L.removeClass(S).removeClass(Q);},_bindUI:function(){this._bindAttrUI(this._UI_ATTRS.BIND);this._bindDOM();},_unbindUI:function(L){this._unbindDOM(L);},_bindDOM:function(){var L=this.get(N).get(m);this._hDocFocus=L.on("focus",this._onDocFocus,this);if(C){this._hDocMouseDown=L.on("mousedown",this._onDocMouseDown,this);}},_unbindDOM:function(L){if(this._hDocFocus){this._hDocFocus.detach();}if(C&&this._hDocMouseDown){this._hDocMouseDown.detach();}},_syncUI:function(){this._syncAttrUI(this._UI_ATTRS.SYNC);},_uiSetHeight:function(L){this._uiSetDim(A,L);this._uiSizeCB((L!==D&&L!==x));},_uiSetWidth:function(L){this._uiSetDim(d,L);},_uiSetDim:function(L,Q){this.get(N).setStyle(L,g.isNumber(Q)?Q+this.DEF_UNIT:Q);},_uiSetVisible:function(L){this.get(N).toggleClass(this.getClassName(K),!L);},_uiSetDisabled:function(L){this.get(N).toggleClass(this.getClassName(y),L);},_uiSetFocused:function(R,Q){var L=this.get(N);L.toggleClass(this.getClassName(B),R);if(Q!==t){if(R){L.focus();}else{L.blur();}}},_uiSetTabIndex:function(Q){var L=this.get(N);if(g.isNumber(Q)){L.set(H,Q);}else{L.removeAttribute(H);}},_onDocMouseDown:function(L){if(this._domFocus){this._onDocFocus(L);}},_onDocFocus:function(L){this._domFocus=this.get(N).contains(L.target);this._set(B,this._domFocus,{src:t});},toString:function(){return this.name+"["+this.get(q)+"]";},DEF_UNIT:"px",DEF_PARENT_NODE:null,CONTENT_TEMPLATE:o,BOUNDING_TEMPLATE:o,_guid:function(){return b.guid();},_validTabIndex:function(L){return(g.isNumber(L)||g.isNull(L));},_bindAttrUI:function(Q){var R,L=Q.length;for(R=0;R
            + * + * @param config {Object} Object literal specifying widget configuration properties. + * + * @class Widget + * @constructor + * @extends Base + */ +function Widget(config) { + + // kweight + var widget = this, + parentNode, + render, + constructor = widget.constructor; + + widget._strs = {}; + widget._cssPrefix = constructor.CSS_PREFIX || _getClassName(constructor.NAME.toLowerCase()); + + Widget.superclass.constructor.apply(widget, arguments); + + render = widget.get(RENDER); + + if (render) { + // Render could be a node or boolean + if (render !== TRUE) { + parentNode = render; + } + widget.render(parentNode); + } +} + +/** + * Static property provides a string to identify the class. + *

            + * Currently used to apply class identifiers to the bounding box + * and to classify events fired by the widget. + *

            + * + * @property Widget.NAME + * @type String + * @static + */ +Widget.NAME = "widget"; + +/** + * Constant used to identify state changes originating from + * the DOM (as opposed to the JavaScript model). + * + * @property Widget.UI_SRC + * @type String + * @static + * @final + */ +UI = Widget.UI_SRC = "ui"; + +/** + * Static property used to define the default attribute + * configuration for the Widget. + * + * @property Widget.ATTRS + * @type Object + * @static + */ +Widget.ATTRS = ATTRS; + +// Trying to optimize kweight by setting up attrs this way saves about 0.4K min'd + +/** + * @attribute id + * @writeOnce + * @default Generated using guid() + * @type String + */ + +ATTRS[ID] = { + valueFn: "_guid", + writeOnce: TRUE +}; + +/** + * Flag indicating whether or not this Widget + * has been through the render lifecycle phase. + * + * @attribute rendered + * @readOnly + * @default false + * @type boolean + */ +ATTRS[RENDERED] = { + value:FALSE, + readOnly: TRUE +}; + +/** + * @attribute boundingBox + * @description The outermost DOM node for the Widget, used for sizing and positioning + * of a Widget as well as a containing element for any decorator elements used + * for skinning. + * @type String | Node + * @writeOnce + */ +ATTRS[BOUNDING_BOX] = { + value:null, + setter: "_setBB", + writeOnce: TRUE +}; + +/** + * @attribute contentBox + * @description A DOM node that is a direct descendant of a Widget's bounding box that + * houses its content. + * @type String | Node + * @writeOnce + */ +ATTRS[CONTENT_BOX] = { + valueFn:"_defaultCB", + setter: "_setCB", + writeOnce: TRUE +}; + +/** + * @attribute tabIndex + * @description Number (between -32767 to 32767) indicating the widget's + * position in the default tab flow. The value is used to set the + * "tabIndex" attribute on the widget's bounding box. Negative values allow + * the widget to receive DOM focus programmatically (by calling the focus + * method), while being removed from the default tab flow. A value of + * null removes the "tabIndex" attribute from the widget's bounding box. + * @type Number + * @default null + */ +ATTRS[TAB_INDEX] = { + value: null, + validator: "_validTabIndex" +}; + +/** + * @attribute focused + * @description Boolean indicating if the Widget, or one of its descendants, + * has focus. + * @readOnly + * @default false + * @type boolean + */ +ATTRS[FOCUSED] = { + value: FALSE, + readOnly:TRUE +}; + +/** + * @attribute disabled + * @description Boolean indicating if the Widget should be disabled. The disabled implementation + * is left to the specific classes extending widget. + * @default false + * @type boolean + */ +ATTRS[DISABLED] = { + value: FALSE +}; + +/** + * @attribute visible + * @description Boolean indicating weather or not the Widget is visible. + * @default TRUE + * @type boolean + */ +ATTRS[VISIBLE] = { + value: TRUE +}; + +/** + * @attribute height + * @description String with units, or number, representing the height of the Widget. If a number is provided, + * the default unit, defined by the Widgets DEF_UNIT, property is used. + * @default EMPTY_STR + * @type {String | Number} + */ +ATTRS[HEIGHT] = { + value: EMPTY_STR +}; + +/** + * @attribute width + * @description String with units, or number, representing the width of the Widget. If a number is provided, + * the default unit, defined by the Widgets DEF_UNIT, property is used. + * @default EMPTY_STR + * @type {String | Number} + */ +ATTRS[WIDTH] = { + value: EMPTY_STR +}; + +/** + * @attribute strings + * @description Collection of strings used to label elements of the Widget's UI. + * @default null + * @type Object + */ +ATTRS[STRINGS] = { + value: {}, + setter: "_strSetter", + getter: "_strGetter" +}; + +/** + * Whether or not to render the widget automatically after init, and optionally, to which parent node. + * + * @attribute render + * @type boolean | Node + * @writeOnce + */ +ATTRS[RENDER] = { + value:FALSE, + writeOnce:TRUE +}; + +/** + * The css prefix which the static Widget.getClassName method should use when constructing class names + * + * @property Widget.CSS_PREFIX + * @type String + * @default Widget.NAME.toLowerCase() + * @private + * @static + */ +Widget.CSS_PREFIX = _getClassName(Widget.NAME.toLowerCase()); + +/** + * Generate a standard prefixed classname for the Widget, prefixed by the default prefix defined + * by the Y.config.classNamePrefix attribute used by ClassNameManager and + * Widget.NAME.toLowerCase() (e.g. "yui-widget-xxxxx-yyyyy", based on default values for + * the prefix and widget class name). + *

            + * The instance based version of this method can be used to generate standard prefixed classnames, + * based on the instances NAME, as opposed to Widget.NAME. This method should be used when you + * need to use a constant class name across different types instances. + *

            + * @method getClassName + * @param {String*} args* 0..n strings which should be concatenated, using the default separator defined by ClassNameManager, to create the class name + */ +Widget.getClassName = function() { + // arguments needs to be array'fied to concat + return _getClassName.apply(ClassNameManager, [Widget.CSS_PREFIX].concat(Y.Array(arguments), true)); +}; + +_getWidgetClassName = Widget.getClassName; + +/** + * Returns the widget instance whose bounding box contains, or is, the given node. + *

            + * In the case of nested widgets, the nearest bounding box ancestor is used to + * return the widget instance. + *

            + * @method Widget.getByNode + * @static + * @param node {Node | String} The node for which to return a Widget instance. If a selector + * string is passed in, which selects more than one node, the first node found is used. + * @return {Widget} Widget instance, or null if not found. + */ +Widget.getByNode = function(node) { + var widget, + widgetMarker = _getWidgetClassName(); + + node = Node.one(node); + if (node) { + node = node.ancestor("." + widgetMarker, true); + if (node) { + widget = _instances[Y.stamp(node, TRUE)]; + } + } + + return widget || null; +}; + +Y.extend(Widget, Y.Base, { + + /** + * Returns a class name prefixed with the the value of the + * YUI.config.classNamePrefix attribute + the instances NAME property. + * Uses YUI.config.classNameDelimiter attribute to delimit the provided strings. + * e.g. + * + *
            +     *    // returns "yui-slider-foo-bar", for a slider instance
            +     *    var scn = slider.getClassName('foo','bar');
            +     *
            +     *    // returns "yui-overlay-foo-bar", for an overlay instance
            +     *    var ocn = overlay.getClassName('foo','bar');
            +     * 
            + *
            + * + * @method getClassName + * @param {String}+ One or more classname bits to be joined and prefixed + */ + getClassName: function () { + return _getClassName.apply(ClassNameManager, [this._cssPrefix].concat(Y.Array(arguments), true)); + }, + + /** + * Initializer lifecycle implementation for the Widget class. Registers the + * widget instance, and runs through the Widget's HTML_PARSER definition. + * + * @method initializer + * @protected + * @param config {Object} Configuration object literal for the widget + */ + initializer: function(config) { + + _instances[Y.stamp(this.get(BOUNDING_BOX))] = this; + + /** + * Notification event, which widget implementations can fire, when + * they change the content of the widget. This event has no default + * behavior and cannot be prevented, so the "on" or "after" + * moments are effectively equivalent (with on listeners being invoked before + * after listeners). + * + * @event widget:contentUpdate + * @preventable false + * @param {EventFacade} e The Event Facade + */ + + if (this._applyParser) { + this._applyParser(config); + } + }, + + /** + * Destructor lifecycle implementation for the Widget class. Purges events attached + * to the bounding box (and all child nodes) and removes the Widget from the + * list of registered widgets. + * + * @method destructor + * @protected + */ + destructor: function() { + + var boundingBox = this.get(BOUNDING_BOX), + contentBox = this.get(CONTENT_BOX), + bbGuid = Y.stamp(boundingBox, TRUE); + + if (bbGuid in _instances) { + delete _instances[bbGuid]; + } + + if (this.UI_EVENTS) { + this._destroyUIEvents(); + } + + this._unbindUI(boundingBox); + + if (contentBox) { // Just to be safe because it's a last minute change. Really shouldn't be required. + contentBox.remove(TRUE); + } + boundingBox.remove(TRUE); + }, + + /** + * Establishes the initial DOM for the widget. Invoking this + * method will lead to the creating of all DOM elements for + * the widget (or the manipulation of existing DOM elements + * for the progressive enhancement use case). + *

            + * This method should only be invoked once for an initialized + * widget. + *

            + *

            + * It delegates to the widget specific renderer method to do + * the actual work. + *

            + * + * @method render + * @chainable + * @final + * @param parentNode {Object | String} Optional. The Node under which the + * Widget is to be rendered. This can be a Node instance or a CSS selector string. + *

            + * If the selector string returns more than one Node, the first node will be used + * as the parentNode. NOTE: This argument is required if both the boundingBox and contentBox + * are not currently in the document. If it's not provided, the Widget will be rendered + * to the body of the current document in this case. + *

            + */ + render: function(parentNode) { + + if (!this.get(DESTROYED) && !this.get(RENDERED)) { + /** + * Lifecycle event for the render phase, fired prior to rendering the UI + * for the widget (prior to invoking the widget's renderer method). + *

            + * Subscribers to the "on" moment of this event, will be notified + * before the widget is rendered. + *

            + *

            + * Subscribers to the "after" moment of this event, will be notified + * after rendering is complete. + *

            + * + * @event widget:render + * @preventable _defRenderFn + * @param {EventFacade} e The Event Facade + */ + this.publish(RENDER, { + queuable:FALSE, + fireOnce:TRUE, + defaultTargetOnly:TRUE, + defaultFn: this._defRenderFn + }); + + this.fire(RENDER, {parentNode: (parentNode) ? Node.one(parentNode) : null}); + } + return this; + }, + + /** + * Default render handler + * + * @method _defRenderFn + * @protected + * @param {EventFacade} e The Event object + * @param {Node} parentNode The parent node to render to, if passed in to the render method + */ + _defRenderFn : function(e) { + this._parentNode = e.parentNode; + + this.renderer(); + this._set(RENDERED, TRUE); + + this._removeLoadingClassNames(); + }, + + /** + * Creates DOM (or manipulates DOM for progressive enhancement) + * This method is invoked by render() and is not chained + * automatically for the class hierarchy (unlike initializer, destructor) + * so it should be chained manually for subclasses if required. + * + * @method renderer + * @protected + */ + renderer: function() { + // kweight + var widget = this; + + widget._renderUI(); + widget.renderUI(); + + widget._bindUI(); + widget.bindUI(); + + widget._syncUI(); + widget.syncUI(); + }, + + /** + * Configures/Sets up listeners to bind Widget State to UI/DOM + * + * This method is not called by framework and is not chained + * automatically for the class hierarchy. + * + * @method bindUI + * @protected + */ + bindUI: EMPTY_FN, + + /**Ã¥ + * Adds nodes to the DOM + * + * This method is not called by framework and is not chained + * automatically for the class hierarchy. + * + * @method renderUI + * @protected + */ + renderUI: EMPTY_FN, + + /** + * Refreshes the rendered UI, based on Widget State + * + * This method is not called by framework and is not chained + * automatically for the class hierarchy. + * + * @method syncUI + * @protected + * + */ + syncUI: EMPTY_FN, + + /** + * @method hide + * @description Hides the Widget by setting the "visible" attribute to "false". + * @chainable + */ + hide: function() { + return this.set(VISIBLE, FALSE); + }, + + /** + * @method show + * @description Shows the Widget by setting the "visible" attribute to "true". + * @chainable + */ + show: function() { + return this.set(VISIBLE, TRUE); + }, + + /** + * @method focus + * @description Causes the Widget to receive the focus by setting the "focused" + * attribute to "true". + * @chainable + */ + focus: function () { + return this._set(FOCUSED, TRUE); + }, + + /** + * @method blur + * @description Causes the Widget to lose focus by setting the "focused" attribute + * to "false" + * @chainable + */ + blur: function () { + return this._set(FOCUSED, FALSE); + }, + + /** + * @method enable + * @description Set the Widget's "disabled" attribute to "false". + * @chainable + */ + enable: function() { + return this.set(DISABLED, FALSE); + }, + + /** + * @method disable + * @description Set the Widget's "disabled" attribute to "true". + * @chainable + */ + disable: function() { + return this.set(DISABLED, TRUE); + }, + + /** + * @method _uiSizeCB + * @protected + * @param {boolean} expand + */ + _uiSizeCB : function(expand) { + this.get(CONTENT_BOX).toggleClass(_getWidgetClassName(CONTENT, "expanded"), expand); + }, + + /** + * Helper method to collect the boundingBox and contentBox, set styles and append to the provided parentNode, if not + * already a child. The owner document of the boundingBox, or the owner document of the contentBox will be used + * as the document into which the Widget is rendered if a parentNode is node is not provided. If both the boundingBox and + * the contentBox are not currently in the document, and no parentNode is provided, the widget will be rendered + * to the current document's body. + * + * @method _renderBox + * @private + * @param {Node} parentNode The parentNode to render the widget to. If not provided, and both the boundingBox and + * the contentBox are not currently in the document, the widget will be rendered to the current document's body. + */ + _renderBox: function(parentNode) { + + // TODO: Performance Optimization [ More effective algo to reduce Node refs, compares, replaces? ] + + var widget = this, // kweight + contentBox = widget.get(CONTENT_BOX), + boundingBox = widget.get(BOUNDING_BOX), + srcNode = widget.get(SRC_NODE), + defParentNode = widget.DEF_PARENT_NODE, + + doc = (srcNode && srcNode.get(OWNER_DOCUMENT)) || boundingBox.get(OWNER_DOCUMENT) || contentBox.get(OWNER_DOCUMENT); + + // If srcNode (assume it's always in doc), have contentBox take its place (widget render responsible for re-use of srcNode contents) + if (srcNode && !srcNode.compareTo(contentBox) && !contentBox.inDoc(doc)) { + srcNode.replace(contentBox); + } + + if (!boundingBox.compareTo(contentBox.get(PARENT_NODE)) && !boundingBox.compareTo(contentBox)) { + // If contentBox box is already in the document, have boundingBox box take it's place + if (contentBox.inDoc(doc)) { + contentBox.replace(boundingBox); + } + boundingBox.appendChild(contentBox); + } + + parentNode = parentNode || (defParentNode && Node.one(defParentNode)); + + if (parentNode) { + parentNode.appendChild(boundingBox); + } else if (!boundingBox.inDoc(doc)) { + Node.one(BODY).insert(boundingBox, 0); + } + }, + + /** + * Setter for the boundingBox attribute + * + * @method _setBB + * @private + * @param Node/String + * @return Node + */ + _setBB: function(node) { + return this._setBox(this.get(ID), node, this.BOUNDING_TEMPLATE); + }, + + /** + * Setter for the contentBox attribute + * + * @method _setCB + * @private + * @param {Node|String} node + * @return Node + */ + _setCB: function(node) { + return (this.CONTENT_TEMPLATE === null) ? this.get(BOUNDING_BOX) : this._setBox(null, node, this.CONTENT_TEMPLATE); + }, + + /** + * Returns the default value for the contentBox attribute. + * + * For the Widget class, this will be the srcNode if provided, otherwise null (resulting in + * a new contentBox node instance being created) + * + * @method _defaultCB + * @protected + */ + _defaultCB : function(node) { + return this.get(SRC_NODE) || null; + }, + + /** + * Helper method to set the bounding/content box, or create it from + * the provided template if not found. + * + * @method _setBox + * @private + * + * @param {String} id The node's id attribute + * @param {Node|String} node The node reference + * @param {String} template HTML string template for the node + * @return {Node} The node + */ + _setBox : function(id, node, template) { + node = Node.one(node) || Node.create(template); + if (!node.get(ID)) { + node.set(ID, id || Y.guid()); + } + return node; + }, + + /** + * Initializes the UI state for the Widget's bounding/content boxes. + * + * @method _renderUI + * @protected + */ + _renderUI: function() { + this._renderBoxClassNames(); + this._renderBox(this._parentNode); + }, + + /** + * Applies standard class names to the boundingBox and contentBox + * + * @method _renderBoxClassNames + * @protected + */ + _renderBoxClassNames : function() { + var classes = this._getClasses(), + cl, + boundingBox = this.get(BOUNDING_BOX), + i; + + boundingBox.addClass(_getWidgetClassName()); + + // Start from Widget Sub Class + for (i = classes.length-3; i >= 0; i--) { + cl = classes[i]; + boundingBox.addClass(cl.CSS_PREFIX || _getClassName(cl.NAME.toLowerCase())); + } + + // Use instance based name for content box + this.get(CONTENT_BOX).addClass(this.getClassName(CONTENT)); + }, + + /** + * Removes class names representative of the widget's loading state from + * the boundingBox. + * + * @method _removeLoadingClassNames + * @protected + */ + _removeLoadingClassNames: function () { + + var boundingBox = this.get(BOUNDING_BOX), + contentBox = this.get(CONTENT_BOX), + instClass = this.getClassName(LOADING), + widgetClass = _getWidgetClassName(LOADING); + + boundingBox.removeClass(widgetClass) + .removeClass(instClass); + + contentBox.removeClass(widgetClass) + .removeClass(instClass); + }, + + /** + * Sets up DOM and CustomEvent listeners for the widget. + * + * @method _bindUI + * @protected + */ + _bindUI: function() { + this._bindAttrUI(this._UI_ATTRS.BIND); + this._bindDOM(); + }, + + /** + * @method _unbindUI + * @protected + */ + _unbindUI : function(boundingBox) { + this._unbindDOM(boundingBox); + }, + + /** + * Sets up DOM listeners, on elements rendered by the widget. + * + * @method _bindDOM + * @protected + */ + _bindDOM : function() { + var oDocument = this.get(BOUNDING_BOX).get(OWNER_DOCUMENT); + + // TODO: Perf Optimization: Use Widget.getByNode delegation, to get by + // with just one _onDocFocus subscription per sandbox, instead of one per widget + this._hDocFocus = oDocument.on("focus", this._onDocFocus, this); + + // Fix for Webkit: + // Document doesn't receive focus in Webkit when the user mouses + // down on it, so the "focused" attribute won't get set to the + // correct value. + if (WEBKIT) { + this._hDocMouseDown = oDocument.on("mousedown", this._onDocMouseDown, this); + } + }, + + /** + * @method _unbindDOM + * @protected + */ + _unbindDOM : function(boundingBox) { + if (this._hDocFocus) { + this._hDocFocus.detach(); + } + + if (WEBKIT && this._hDocMouseDown) { + this._hDocMouseDown.detach(); + } + }, + + /** + * Updates the widget UI to reflect the attribute state. + * + * @method _syncUI + * @protected + */ + _syncUI: function() { + this._syncAttrUI(this._UI_ATTRS.SYNC); + }, + + /** + * Sets the height on the widget's bounding box element + * + * @method _uiSetHeight + * @protected + * @param {String | Number} val + */ + _uiSetHeight: function(val) { + this._uiSetDim(HEIGHT, val); + this._uiSizeCB((val !== EMPTY_STR && val !== AUTO)); + }, + + /** + * Sets the width on the widget's bounding box element + * + * @method _uiSetWidth + * @protected + * @param {String | Number} val + */ + _uiSetWidth: function(val) { + this._uiSetDim(WIDTH, val); + }, + + /** + * @method _uiSetDim + * @private + * @param {String} dim The dimension - "width" or "height" + * @param {Number | String} val The value to set + */ + _uiSetDim: function(dimension, val) { + this.get(BOUNDING_BOX).setStyle(dimension, L.isNumber(val) ? val + this.DEF_UNIT : val); + }, + + /** + * Sets the visible state for the UI + * + * @method _uiSetVisible + * @protected + * @param {boolean} val + */ + _uiSetVisible: function(val) { + this.get(BOUNDING_BOX).toggleClass(this.getClassName(HIDDEN), !val); + }, + + /** + * Sets the disabled state for the UI + * + * @protected + * @param {boolean} val + */ + _uiSetDisabled: function(val) { + this.get(BOUNDING_BOX).toggleClass(this.getClassName(DISABLED), val); + }, + + /** + * Sets the focused state for the UI + * + * @protected + * @param {boolean} val + * @param {string} src String representing the source that triggered an update to + * the UI. + */ + _uiSetFocused: function(val, src) { + var boundingBox = this.get(BOUNDING_BOX); + boundingBox.toggleClass(this.getClassName(FOCUSED), val); + + if (src !== UI) { + if (val) { + boundingBox.focus(); + } else { + boundingBox.blur(); + } + } + }, + + /** + * Set the tabIndex on the widget's rendered UI + * + * @method _uiSetTabIndex + * @protected + * @param Number + */ + _uiSetTabIndex: function(index) { + var boundingBox = this.get(BOUNDING_BOX); + + if (L.isNumber(index)) { + boundingBox.set(TAB_INDEX, index); + } else { + boundingBox.removeAttribute(TAB_INDEX); + } + }, + + /** + * @method _onDocMouseDown + * @description "mousedown" event handler for the owner document of the + * widget's bounding box. + * @protected + * @param {EventFacade} evt The event facade for the DOM focus event + */ + _onDocMouseDown: function (evt) { + if (this._domFocus) { + this._onDocFocus(evt); + } + }, + + /** + * DOM focus event handler, used to sync the state of the Widget with the DOM + * + * @method _onDocFocus + * @protected + * @param {EventFacade} evt The event facade for the DOM focus event + */ + _onDocFocus: function (evt) { + this._domFocus = this.get(BOUNDING_BOX).contains(evt.target); // contains() checks invoking node also + this._set(FOCUSED, this._domFocus, { src: UI }); + }, + + /** + * Generic toString implementation for all widgets. + * + * @method toString + * @return {String} The default string value for the widget [ displays the NAME of the instance, and the unique id ] + */ + toString: function() { + // Using deprecated name prop for kweight squeeze. + return this.name + "[" + this.get(ID) + "]"; + }, + + /** + * Default unit to use for dimension values + * + * @property DEF_UNIT + * @type String + */ + DEF_UNIT : "px", + + /** + * Default node to render the bounding box to. If not set, + * will default to the current document body. + * + * @property DEF_PARENT_NODE + * @type String | Node + */ + DEF_PARENT_NODE : null, + + /** + * Property defining the markup template for content box. If your Widget doesn't + * need the dual boundingBox/contentBox structure, set CONTENT_TEMPLATE to null, + * and contentBox and boundingBox will both point to the same Node. + * + * @property CONTENT_TEMPLATE + * @type String + */ + CONTENT_TEMPLATE : DIV, + + /** + * Property defining the markup template for bounding box. + * + * @property BOUNDING_TEMPLATE + * @type String + */ + BOUNDING_TEMPLATE : DIV, + + /** + * @method _guid + * @protected + */ + _guid : function() { + return Y.guid(); + }, + + /** + * @method _validTabIndex + * @protected + * @param {Number} tabIndex + */ + _validTabIndex : function (tabIndex) { + return (L.isNumber(tabIndex) || L.isNull(tabIndex)); + }, + + /** + * Binds after listeners for the list of attributes provided + * + * @method _bindAttrUI + * @private + * @param {Array} attrs + */ + _bindAttrUI : function(attrs) { + var i, + l = attrs.length; + + for (i = 0; i < l; i++) { + this.after(attrs[i] + CHANGE, this._setAttrUI); + } + }, + + /** + * Invokes the _uiSet=ATTR NAME> method for the list of attributes provided + * + * @method _syncAttrUI + * @private + * @param {Array} attrs + */ + _syncAttrUI : function(attrs) { + var i, l = attrs.length, attr; + for (i = 0; i < l; i++) { + attr = attrs[i]; + this[_UISET + _toInitialCap(attr)](this.get(attr)); + } + }, + + /** + * @method _setAttrUI + * @private + * @param {EventFacade} e + */ + _setAttrUI : function(e) { + this[_UISET + _toInitialCap(e.attrName)](e.newVal, e.src); + }, + + /** + * The default setter for the strings attribute. Merges partial sets + * into the full string set, to allow users to partial sets of strings + * + * @method _strSetter + * @protected + * @param {Object} strings + * @return {String} The full set of strings to set + */ + _strSetter : function(strings) { + return Y.merge(this.get(STRINGS), strings); + }, + + /** + * Helper method to get a specific string value + * + * @deprecated Used by deprecated WidgetLocale implementations. + * @method getString + * @param {String} key + * @return {String} The string + */ + getString : function(key) { + return this.get(STRINGS)[key]; + }, + + /** + * Helper method to get the complete set of strings for the widget + * + * @deprecated Used by deprecated WidgetLocale implementations. + * @method getString + * @param {String} key + * @return {String} The string + */ + getStrings : function() { + return this.get(STRINGS); + }, + + /** + * The lists of UI attributes to bind and sync for widget's _bindUI and _syncUI implementations + * + * @property _UI_ATTRS + * @type Object + * @private + */ + _UI_ATTRS : { + BIND: UI_ATTRS, + SYNC: UI_ATTRS.concat(TAB_INDEX) + } +}); + +Y.Widget = Widget; + + +}, '3.3.0' ,{requires:['attribute', 'event-focus', 'base-base', 'base-pluginhost', 'node-base', 'node-style', 'node-event-delegate', 'classnamemanager']}); diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-child-min.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-child-min.js new file mode 100644 index 00000000..bd4c3a05 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-child-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("widget-child",function(c){var b=c.Lang;function a(){c.after(this._syncUIChild,this,"syncUI");c.after(this._bindUIChild,this,"bindUI");}a.ATTRS={selected:{value:0,validator:b.isNumber},index:{readOnly:true,getter:function(){var e=this.get("parent"),d=-1;if(e){d=e.indexOf(this);}return d;}},parent:{readOnly:true},depth:{readOnly:true,getter:function(){var e=this.get("parent"),d=this.get("root"),f=-1;while(e){f=(f+1);if(e==d){break;}e=e.get("parent");}return f;}},root:{readOnly:true,getter:function(){var d=function(h){var e=h.get("parent"),f=h.ROOT_TYPE,g=e;if(f){g=(e&&c.instanceOf(e,f));}return(g?d(e):h);};return d(this);}}};a.prototype={ROOT_TYPE:null,_getUIEventNode:function(){var d=this.get("root"),e;if(d){e=d.get("boundingBox");}return e;},next:function(f){var e=this.get("parent"),d;if(e){d=e.item((this.get("index")+1));}if(!d&&f){d=e.item(0);}return d;},previous:function(g){var f=this.get("parent"),d=this.get("index"),e;if(f&&d>0){e=f.item([(d-1)]);}if(!e&&g){e=f.item((f.size()-1));}return e;},remove:function(d){var e,f;if(b.isNumber(d)){f=c.WidgetParent.prototype.remove.apply(this,arguments);}else{e=this.get("parent");if(e){f=e.remove(this.get("index"));}}return f;},isRoot:function(){return(this==this.get("root"));},ancestor:function(f){var d=this.get("root"),e;if(this.get("depth")>f){e=this.get("parent");while(e!=d&&e.get("depth")>f){e=e.get("parent");}}return e;},_uiSetChildSelected:function(e){var f=this.get("boundingBox"),d=this.getClassName("selected");if(e===0){f.removeClass(d);}else{f.addClass(d);}},_afterChildSelectedChange:function(d){this._uiSetChildSelected(d.newVal);},_syncUIChild:function(){this._uiSetChildSelected(this.get("selected"));},_bindUIChild:function(){this.after("selectedChange",this._afterChildSelectedChange);}};c.WidgetChild=a;},"3.3.0",{requires:["base-build","widget"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-child.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-child.js new file mode 100644 index 00000000..0fbfe6f0 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-child.js @@ -0,0 +1,380 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('widget-child', function(Y) { + +/** + * Extension enabling a Widget to be a child of another Widget. + * + * @module widget-child + */ + +var Lang = Y.Lang; + +/** + * Widget extension providing functionality enabling a Widget to be a + * child of another Widget. + * + * @class WidgetChild + * @param {Object} config User configuration object. +*/ +function Child() { + + // Widget method overlap + Y.after(this._syncUIChild, this, "syncUI"); + Y.after(this._bindUIChild, this, "bindUI"); + +} + +Child.ATTRS = { + + /** + * @attribute selected + * @type Number + * @default 0 + * + * @description Number indicating if the Widget is selected. Possible + * values are: + *
            + *
            0
            (Default) Not selected
            + *
            1
            Fully selected
            + *
            2
            Partially selected
            + *
            + */ + selected: { + value: 0, + validator: Lang.isNumber + }, + + + /** + * @attribute index + * @type Number + * @readOnly + * + * @description Number representing the Widget's ordinal position in its + * parent Widget. + */ + index: { + readOnly: true, + getter: function () { + + var parent = this.get("parent"), + index = -1; + + if (parent) { + index = parent.indexOf(this); + } + + return index; + + } + }, + + + /** + * @attribute parent + * @type Widget + * @readOnly + * + * @description Retrieves the parent of the Widget in the object hierarchy. + */ + parent: { + readOnly: true + }, + + + /** + * @attribute depth + * @type Number + * @default -1 + * @readOnly + * + * @description Number representing the depth of this Widget relative to + * the root Widget in the object heirarchy. + */ + depth: { + readOnly: true, + getter: function () { + + var parent = this.get("parent"), + root = this.get("root"), + depth = -1; + + while (parent) { + + depth = (depth + 1); + + if (parent == root) { + break; + } + + parent = parent.get("parent"); + + } + + return depth; + + } + }, + + /** + * @attribute root + * @type Widget + * @readOnly + * + * @description Returns the root Widget in the object hierarchy. If the + * ROOT_TYPE property is set, the search for the root Widget will be + * constrained to parent Widgets of the specified type. + */ + root: { + readOnly: true, + getter: function () { + + var getParent = function (child) { + + var parent = child.get("parent"), + FnRootType = child.ROOT_TYPE, + criteria = parent; + + if (FnRootType) { + criteria = (parent && Y.instanceOf(parent, FnRootType)); + } + + return (criteria ? getParent(parent) : child); + + }; + + return getParent(this); + + } + } + +}; + +Child.prototype = { + + /** + * Constructor reference used to determine the root of a Widget-based + * object tree. + *

            + * Currently used to control the behavior of the root + * attribute so that recursing up the object heirarchy can be constrained + * to a specific type of Widget. Widget authors should set this property + * to the constructor function for a given Widget implementation. + *

            + * + * @property ROOT_TYPE + * @type Object + */ + ROOT_TYPE: null, + + + // Override of Widget's implementation of _getUIEventNode() to ensure that + // all event listeners are bound to the Widget's topmost DOM element. + // This ensures that the firing of each type of Widget UI event (click, + // mousedown, etc.) is facilitated by a single, top-level, delegated DOM + // event listener. + _getUIEventNode: function () { + + var root = this.get("root"), + returnVal; + + if (root) { + returnVal = root.get("boundingBox"); + } + + return returnVal; + + }, + + + /** + * @method next + * @description Returns the Widget's next sibling. + * @param {Boolean} circular Boolean indicating if the parent's first child + * should be returned if the child has no next sibling. + * @return {Widget} Widget instance. + */ + next: function (circular) { + + var parent = this.get("parent"), + sibling; + + if (parent) { + sibling = parent.item((this.get("index")+1)); + } + + if (!sibling && circular) { + sibling = parent.item(0); + } + + return sibling; + + }, + + + /** + * @method previous + * @description Returns the Widget's previous sibling. + * @param {Boolean} circular Boolean indicating if the parent's last child + * should be returned if the child has no previous sibling. + * @return {Widget} Widget instance. + */ + previous: function (circular) { + + var parent = this.get("parent"), + index = this.get("index"), + sibling; + + if (parent && index > 0) { + sibling = parent.item([(index-1)]); + } + + if (!sibling && circular) { + sibling = parent.item((parent.size() - 1)); + } + + return sibling; + + }, + + + // Override of Y.WidgetParent.remove() + // Sugar implementation allowing a child to remove itself from its parent. + remove: function (index) { + + var parent, + removed; + + if (Lang.isNumber(index)) { + removed = Y.WidgetParent.prototype.remove.apply(this, arguments); + } + else { + + parent = this.get("parent"); + + if (parent) { + removed = parent.remove(this.get("index")); + } + + } + + return removed; + + }, + + + /** + * @method isRoot + * @description Determines if the Widget is the root Widget in the + * object hierarchy. + * @return {Boolean} Boolean indicating if Widget is the root Widget in the + * object hierarchy. + */ + isRoot: function () { + return (this == this.get("root")); + }, + + + /** + * @method ancestor + * @description Returns the Widget instance at the specified depth. + * @param {number} depth Number representing the depth of the ancestor. + * @return {Widget} Widget instance. + */ + ancestor: function (depth) { + + var root = this.get("root"), + parent; + + if (this.get("depth") > depth) { + + parent = this.get("parent"); + + while (parent != root && parent.get("depth") > depth) { + parent = parent.get("parent"); + } + + } + + return parent; + + }, + + + /** + * Updates the UI to reflect the selected attribute value. + * + * @method _uiSetChildSelected + * @protected + * @param {number} selected The selected value to be reflected in the UI. + */ + _uiSetChildSelected: function (selected) { + + var box = this.get("boundingBox"), + sClassName = this.getClassName("selected"); + + if (selected === 0) { + box.removeClass(sClassName); + } + else { + box.addClass(sClassName); + } + + }, + + + /** + * Default attribute change listener for the selected + * attribute, responsible for updating the UI, in response to + * attribute changes. + * + * @method _afterChildSelectedChange + * @protected + * @param {EventFacade} event The event facade for the attribute change. + */ + _afterChildSelectedChange: function (event) { + this._uiSetChildSelected(event.newVal); + }, + + + /** + * Synchronizes the UI to match the WidgetChild state. + *

            + * This method is invoked after bindUI is invoked for the Widget class + * using YUI's aop infrastructure. + *

            + * + * @method _syncUIChild + * @protected + */ + _syncUIChild: function () { + this._uiSetChildSelected(this.get("selected")); + }, + + + /** + * Binds event listeners responsible for updating the UI state in response + * to WidgetChild related state changes. + *

            + * This method is invoked after bindUI is invoked for the Widget class + * using YUI's aop infrastructure. + *

            + * @method _bindUIChild + * @protected + */ + _bindUIChild: function () { + this.after("selectedChange", this._afterChildSelectedChange); + } + +}; + +Y.WidgetChild = Child; + + +}, '3.3.0' ,{requires:['base-build', 'widget']}); diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-htmlparser-min.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-htmlparser-min.js new file mode 100644 index 00000000..26bbe0ea --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-htmlparser-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("widget-htmlparser",function(f){var e=f.Widget,c=f.Node,d=f.Lang,a="srcNode",b="contentBox";e.HTML_PARSER={};e._buildCfg={aggregates:["HTML_PARSER"]};e.ATTRS[a]={value:null,setter:c.one,getter:"_getSrcNode",writeOnce:true};f.mix(e.prototype,{_getSrcNode:function(g){return g||this.get(b);},_applyParsedConfig:function(i,g,h){return(h)?f.mix(g,h,false):g;},_applyParser:function(g){var i=this,j=i.get(a),h=i._getHtmlParser(),l,k;if(h&&j){f.Object.each(h,function(n,m,p){k=null;if(d.isFunction(n)){k=n.call(i,j);}else{if(d.isArray(n)){k=j.all(n[0]);if(k.isEmpty()){k=null;}}else{k=j.one(n);}}if(k!==null&&k!==undefined){l=l||{};l[m]=k;}});}g=i._applyParsedConfig(j,g,l);},_getHtmlParser:function(){var h=this._getClasses(),k={},g,j;for(g=h.length-1;g>=0;g--){j=h[g].HTML_PARSER;if(j){f.mix(k,j,true);}}return k;}});},"3.3.0",{requires:["widget-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-htmlparser.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-htmlparser.js new file mode 100644 index 00000000..3695f408 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-htmlparser.js @@ -0,0 +1,170 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('widget-htmlparser', function(Y) { + +/** + * Adds HTML Parser support to the base Widget class + * + * @module widget + * @submodule widget-htmlparser + * @for Widget + */ + + +var Widget = Y.Widget, + Node = Y.Node, + Lang = Y.Lang, + + SRC_NODE = "srcNode", + CONTENT_BOX = "contentBox"; + +/** + * Object hash, defining how attribute values are to be parsed from + * markup contained in the widget's content box. e.g.: + *
            + *   {
            + *       // Set single Node references using selector syntax 
            + *       // (selector is run through node.one)
            + *       titleNode: "span.yui-title",
            + *       // Set NodeList references using selector syntax 
            + *       // (array indicates selector is to be run through node.all)
            + *       listNodes: ["li.yui-item"],
            + *       // Set other attribute types, using a parse function. 
            + *       // Context is set to the widget instance.
            + *       label: function(contentBox) {
            + *           return contentBox.one("span.title").get("innerHTML");
            + *       }
            + *   }
            + * 
            + * + * @property Widget.HTML_PARSER + * @type Object + * @static + */ +Widget.HTML_PARSER = {}; + +/** + * The build configuration for the Widget class. + *

            + * Defines the static fields which need to be aggregated, + * when this class is used as the main class passed to + * the Base.build method. + *

            + * @property _buildCfg + * @type Object + * @static + * @final + * @private + */ +Widget._buildCfg = { + aggregates : ["HTML_PARSER"] +}; + +/** + * The DOM node to parse for configuration values, passed to the Widget's HTML_PARSER definition + * + * @attribute srcNode + * @type String | Node + * @writeOnce + */ +Widget.ATTRS[SRC_NODE] = { + value: null, + setter: Node.one, + getter: "_getSrcNode", + writeOnce: true +}; + +Y.mix(Widget.prototype, { + + /** + * @method _getSrcNode + * @protected + * @return {Node} The Node to apply HTML_PARSER to + */ + _getSrcNode : function(val) { + return val || this.get(CONTENT_BOX); + }, + + /** + * @method _applyParsedConfig + * @protected + * @return {Object} The merged configuration literal + */ + _applyParsedConfig : function(node, cfg, parsedCfg) { + return (parsedCfg) ? Y.mix(cfg, parsedCfg, false) : cfg; + }, + + /** + * Utilitity method used to apply the HTML_PARSER configuration for the + * instance, to retrieve config data values. + * + * @method _applyParser + * @protected + * @param config {Object} User configuration object (will be populated with values from Node) + */ + _applyParser : function(config) { + + var widget = this, + srcNode = widget.get(SRC_NODE), + schema = widget._getHtmlParser(), + parsedConfig, + val; + + if (schema && srcNode) { + Y.Object.each(schema, function(v, k, o) { + val = null; + + if (Lang.isFunction(v)) { + val = v.call(widget, srcNode); + } else { + if (Lang.isArray(v)) { + val = srcNode.all(v[0]); + if (val.isEmpty()) { + val = null; + } + } else { + val = srcNode.one(v); + } + } + + if (val !== null && val !== undefined) { + parsedConfig = parsedConfig || {}; + parsedConfig[k] = val; + } + }); + } + config = widget._applyParsedConfig(srcNode, config, parsedConfig); + }, + + /** + * Gets the HTML_PARSER definition for this instance, by merging HTML_PARSER + * definitions across the class hierarchy. + * + * @private + * @method _getHtmlParser + * @return {Object} HTML_PARSER definition for this instance + */ + _getHtmlParser : function() { + // Removed caching for kweight. This is a private method + // and only called once so don't need to cache HTML_PARSER + var classes = this._getClasses(), + parser = {}, + i, p; + + for (i = classes.length - 1; i >= 0; i--) { + p = classes[i].HTML_PARSER; + if (p) { + Y.mix(parser, p, true); + } + } + return parser; + } +}); + + +}, '3.3.0' ,{requires:['widget-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-locale-min.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-locale-min.js new file mode 100644 index 00000000..e8882502 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-locale-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("widget-locale",function(f){var c=true,g="locale",e="initValue",b="-",a="",d=f.Widget;d.ATTRS[g]={value:"en"};d.ATTRS.strings.lazyAdd=false;f.mix(d.prototype,{_setStrings:function(i,h){var j=this._strs;h=h.toLowerCase();if(!j[h]){j[h]={};}f.aggregate(j[h],i,c);return j[h];},_getStrings:function(h){return this._strs[h.toLowerCase()];},getStrings:function(r){r=(r||this.get(g)).toLowerCase();var p=this.getDefaultLocale().toLowerCase(),j=this._getStrings(p),q=(j)?f.merge(j):{},n=r.split(b),o,m,k,h;if(r!==p||n.length>1){h=a;for(m=0,k=n.length;m + * If no values of the key are defined for a particular locale the value for the + * default locale (in initial locale set for the class) is returned. + *

            + * @method getStrings + * @param {String} locale (optional) The locale for which the string value is required. Defaults to the current locale, if not provided. + */ + // TODO: Optimize/Cache. Clear cache on _setStrings call. + getStrings : function(locale) { + + locale = (locale || this.get(LOCALE)).toLowerCase(); + + + var defLocale = this.getDefaultLocale().toLowerCase(), + defStrs = this._getStrings(defLocale), + strs = (defStrs) ? Y.merge(defStrs) : {}, + localeSegments = locale.split(HYPHEN), + localeStrs, + i, l, + lookup; + + // If locale is different than the default, or needs lookup support + if (locale !== defLocale || localeSegments.length > 1) { + lookup = EMPTY_STR; + for (i = 0, l = localeSegments.length; i < l; ++i) { + lookup += localeSegments[i]; + + + localeStrs = this._getStrings(lookup); + if (localeStrs) { + Y.aggregate(strs, localeStrs, TRUE); + } + lookup += HYPHEN; + } + } + + return strs; + }, + + /** + * Gets the string for a particular key, for a particular locale, performing locale lookup. + *

            + * If no values if defined for the key, for the given locale, the value for the + * default locale (in initial locale set for the class) is returned. + *

            + * @method getString + * @param {String} key The key. + * @param {String} locale (optional) The locale for which the string value is required. Defaults to the current locale, if not provided. + */ + getString : function(key, locale) { + + locale = (locale || this.get(LOCALE)).toLowerCase(); + + + var defLocale = (this.getDefaultLocale()).toLowerCase(), + strs = this._getStrings(defLocale) || {}, + str = strs[key], + idx = locale.lastIndexOf(HYPHEN); + + // If locale is different than the default, or needs lookup support + if (locale !== defLocale || idx != -1) { + do { + + strs = this._getStrings(locale); + if (strs && key in strs) { + str = strs[key]; + break; + } + idx = locale.lastIndexOf(HYPHEN); + // Chop of last locale segment + if (idx != -1) { + locale = locale.substring(0, idx); + } + + } while (idx != -1); + } + + return str; + }, + + /** + * Returns the default locale for the widget (the locale value defined by the + * widget class, or provided by the user during construction). + * + * @method getDefaultLocale + * @return {String} The default locale for the widget + */ + getDefaultLocale : function() { + return this._state.get(LOCALE, INIT_VALUE); + }, + + _strSetter : function(val) { + return this._setStrings(val, this.get(LOCALE)); + }, + + _strGetter : function(val) { + return this._getStrings(this.get(LOCALE)); + } +}, true); + + +}, '3.3.0' ,{requires:['widget-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-min.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-min.js index d389e378..e67e2bf2 100644 --- a/jssource/src_files/include/javascript/yui3/build/widget/widget-min.js +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-min.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("widget",function(D){var Q=D.Lang,K=D.Object,g=D.Node,M=D.ClassNameManager,a="widget",J="content",c="visible",e="hidden",f="disabled",T="focused",G="width",X="height",i="",Z="-",h="boundingBox",U="contentBox",P="parentNode",B="firstChild",b="ownerDocument",d="body",C="tabIndex",F="locale",H="initValue",R="id",S="render",A="rendered",W="destroyed",I="contentUpdate",V={};function E(L){this._yuid=D.guid(a);this._strings={};E.superclass.constructor.apply(this,arguments);}E._buildCfg={aggregates:["HTML_PARSER"]};E.NAME=a;E.UI_SRC="ui";var N=E.UI_SRC;E.ATTRS={rendered:{value:false,readOnly:true},boundingBox:{value:null,setter:function(L){return this._setBoundingBox(L);},writeOnce:true},contentBox:{value:null,setter:function(L){return this._setContentBox(L);},writeOnce:true},tabIndex:{value:0,validator:function(L){return(Q.isNumber(L)||Q.isNull(L));}},focused:{value:false,readOnly:true},disabled:{value:false},visible:{value:true},height:{value:i},width:{value:i},moveStyles:{value:false},locale:{value:"en"},strings:{setter:function(L){return this._setStrings(L,this.get(F));},getter:function(){return this.getStrings(this.get(F));}}};E._NAME_LOWERCASE=E.NAME.toLowerCase();E.getClassName=function(){var L=D.Array(arguments,0,true);L.splice(0,0,this._NAME_LOWERCASE);return M.getClassName.apply(M,L);};E.getByNode=function(L){var O,Y=E.getClassName();L=g.get(L);if(L){L=(L.hasClass(Y))?L:L.ancestor("."+Y);if(L){O=V[L.get(R)];}}return O||null;};E.HTML_PARSER={};D.extend(E,D.Base,{getClassName:function(){var L=D.Array(arguments,0,true);L.splice(0,0,this._name);return M.getClassName.apply(M,L);},initializer:function(L){this.publish(I,{preventable:false});this._name=this.constructor.NAME.toLowerCase();var Y=this.get(h).get(R);if(Y){V[Y]=this;}var O=this._parseHTML(this.get(U));if(O){D.aggregate(L,O,false);}},destructor:function(){var L=this.get(h);D.Event.purgeElement(L,true);var O=L.get(R);if(O&&O in V){delete V[O];}},render:function(L){if(this.get(W)){return;}if(!this.get(A)){this.publish(S,{queuable:false,defaultFn:this._defRenderFn});L=(L)?g.get(L):null;if(L&&!L.inDoc()){L=null;}this.fire(S,{parentNode:L});}return this;},_defRenderFn:function(L){this._renderUI(L.parentNode);this._bindUI();this._syncUI();this.renderer();this._set(A,true);},renderer:function(){this.renderUI();this.bindUI();this.syncUI();},bindUI:function(){},renderUI:function(){},syncUI:function(){},hide:function(){return this.set(c,false);},show:function(){return this.set(c,true);},focus:function(){return this._set(T,true);},blur:function(){return this._set(T,false);},enable:function(){return this.set(f,false);},disable:function(){return this.set(f,true);},_parseHTML:function(O){var L=this._getHtmlParser(),Y,j;if(L&&O&&O.hasChildNodes()){K.each(L,function(m,l,n){j=null;if(Q.isFunction(m)){j=m.call(this,O);}else{if(Q.isArray(m)){j=O.queryAll(m[0]);}else{j=O.query(m);}}if(j!==null&&j!==undefined){Y=Y||{};Y[l]=j;}},this);}return Y;},_moveStyles:function(k,m){var j=this.WRAP_STYLES,n=k.getStyle("position"),O=this.get(U),l=[0,0],Y,L;if(!this.get("height")){Y=O.get("offsetHeight");}if(!this.get("width")){L=O.get("offsetWidth");}if(n==="absolute"){l=k.getXY();m.setStyles({right:"auto",bottom:"auto"});k.setStyles({right:"auto",bottom:"auto"});}D.each(j,function(p,o){var q=k.getStyle(o);m.setStyle(o,q);if(p===false){k.setStyle(o,"");}else{k.setStyle(o,p);}});if(n==="absolute"){m.setXY(l);}if(Y){this.set("height",Y);}if(L){this.set("width",L);}},_renderBox:function(O){var Y=this.get(U),j=this.get(h),k=j.get(b)||Y.get(b),L;if(!j.compareTo(Y.get(P))){if(this.get("moveStyles")){this._moveStyles(Y,j);}if(Y.inDoc(k)){Y.get(P).replaceChild(j,Y);}j.appendChild(Y);}if(!j.inDoc(k)&&!O){L=g.get(d);if(L.get(B)){L.insertBefore(j,L.get(B));}else{L.appendChild(j);}}else{if(O&&!O.compareTo(j.get(P))){O.appendChild(j);}}},_setBoundingBox:function(L){return this._setBox(L,this.BOUNDING_TEMPLATE);},_setContentBox:function(L){return this._setBox(L,this.CONTENT_TEMPLATE);},_setBox:function(Y,O){Y=g.get(Y)||g.create(O);var L=D.stamp(Y);if(!Y.get(R)){Y.set(R,L);}return Y;},_renderUI:function(L){this._renderBoxClassNames();this._renderBox(L);},_renderBoxClassNames:function(){var k=this._getClasses(),Y=this.get(h),L=this.get(U),O,j;Y.addClass(E.getClassName());for(j=k.length-3;j>=0;j--){O=k[j].NAME;if(O){Y.addClass(M.getClassName(O.toLowerCase()));}}L.addClass(this.getClassName(J));},_bindUI:function(){this.after("visibleChange",this._afterVisibleChange);this.after("disabledChange",this._afterDisabledChange);this.after("heightChange",this._afterHeightChange);this.after("widthChange",this._afterWidthChange);this.after("focusedChange",this._afterFocusedChange);this._bindDOMListeners();},_bindDOMListeners:function(){var L=this.get(h).get("ownerDocument");L.on("focus",this._onFocus,this);if(D.UA.webkit){L.on("mousedown",this._onDocMouseDown,this);}},_syncUI:function(){this._uiSetVisible(this.get(c));this._uiSetDisabled(this.get(f));this._uiSetHeight(this.get(X));this._uiSetWidth(this.get(G));this._uiSetFocused(this.get(T));this._uiSetTabIndex(this.get(C));},_uiSetHeight:function(L){if(Q.isNumber(L)){L=L+this.DEF_UNIT;}this.get(h).setStyle(X,L);},_uiSetWidth:function(L){if(Q.isNumber(L)){L=L+this.DEF_UNIT;}this.get(h).setStyle(G,L);},_uiSetVisible:function(Y){var O=this.get(h),L=this.getClassName(e);if(Y===true){O.removeClass(L);}else{O.addClass(L);}},_uiSetDisabled:function(Y){var O=this.get(h),L=this.getClassName(f);if(Y===true){O.addClass(L);}else{O.removeClass(L);}},_uiSetTabIndex:function(O){var L=this.get(h);if(Q.isNumber(O)){L.set(C,O);}else{L.removeAttribute(C);}},_uiSetFocused:function(j,Y){var O=this.get(h),L=this.getClassName(T);if(j===true){O.addClass(L);if(Y!==N){O.focus();}}else{O.removeClass(L);if(Y!==N){O.blur();}}},_afterVisibleChange:function(L){this._uiSetVisible(L.newVal);},_afterDisabledChange:function(L){this._uiSetDisabled(L.newVal);},_afterHeightChange:function(L){this._uiSetHeight(L.newVal);},_afterWidthChange:function(L){this._uiSetWidth(L.newVal); -},_afterFocusedChange:function(L){this._uiSetFocused(L.newVal,L.src);},_onDocMouseDown:function(L){if(this._hasDOMFocus){this._onFocus(L);}},_onFocus:function(O){var j=O.target,Y=this.get(h),L=(Y.compareTo(j)||Y.contains(j));this._hasDOMFocus=L;this._set(T,L,{src:N});},toString:function(){return this.constructor.NAME+"["+this._yuid+"]";},DEF_UNIT:"px",CONTENT_TEMPLATE:"
            ",BOUNDING_TEMPLATE:"
            ",WRAP_STYLES:{height:"100%",width:"100%",zIndex:false,position:"static",top:"0",left:"0",bottom:"",right:"",padding:"",margin:""},_setStrings:function(O,L){var Y=this._strings;L=L.toLowerCase();if(!Y[L]){Y[L]={};}D.aggregate(Y[L],O,true);return Y[L];},_getStrings:function(L){return this._strings[L.toLowerCase()];},getStrings:function(p){p=(p||this.get(F)).toLowerCase();var n=this.getDefaultLocale().toLowerCase(),O=this._getStrings(n),o=(O)?D.merge(O):{},m=p.split(Z);if(p!==n||m.length>1){var L="";for(var j=0,Y=m.length;j=0;L--){Y=O[L].HTML_PARSER;if(Y){D.mix(j,Y,true);}}this._HTML_PARSER=j;}return this._HTML_PARSER;}});D.Widget=E;},"3.0.0",{requires:["attribute","event-focus","base","node","classnamemanager"]}); \ No newline at end of file +YUI.add("widget-base",function(b){var g=b.Lang,r=b.Node,e=b.ClassNameManager,w=e.getClassName,M,s=b.cached(function(L){return L.substring(0,1).toUpperCase()+L.substring(1);}),F="content",P="visible",K="hidden",y="disabled",B="focused",d="width",A="height",N="boundingBox",v="contentBox",k="parentNode",m="ownerDocument",x="auto",j="srcNode",I="body",H="tabIndex",q="id",i="render",J="rendered",n="destroyed",a="strings",o="
            ",z="Change",p="loading",E="_uiSet",D="",G=function(){},u=true,O=false,t,l={},f=[P,y,A,d,B],C=b.UA.webkit,h={};function c(Q){var T=this,L,S,R=T.constructor;T._strs={};T._cssPrefix=R.CSS_PREFIX||w(R.NAME.toLowerCase());c.superclass.constructor.apply(T,arguments);S=T.get(i);if(S){if(S!==u){L=S;}T.render(L);}}c.NAME="widget";t=c.UI_SRC="ui";c.ATTRS=l;l[q]={valueFn:"_guid",writeOnce:u};l[J]={value:O,readOnly:u};l[N]={value:null,setter:"_setBB",writeOnce:u};l[v]={valueFn:"_defaultCB",setter:"_setCB",writeOnce:u};l[H]={value:null,validator:"_validTabIndex"};l[B]={value:O,readOnly:u};l[y]={value:O};l[P]={value:u};l[A]={value:D};l[d]={value:D};l[a]={value:{},setter:"_strSetter",getter:"_strGetter"};l[i]={value:O,writeOnce:u};c.CSS_PREFIX=w(c.NAME.toLowerCase());c.getClassName=function(){return w.apply(e,[c.CSS_PREFIX].concat(b.Array(arguments),true));};M=c.getClassName;c.getByNode=function(L){var R,Q=M();L=r.one(L);if(L){L=L.ancestor("."+Q,true);if(L){R=h[b.stamp(L,u)];}}return R||null;};b.extend(c,b.Base,{getClassName:function(){return w.apply(e,[this._cssPrefix].concat(b.Array(arguments),true));},initializer:function(L){h[b.stamp(this.get(N))]=this;if(this._applyParser){this._applyParser(L);}},destructor:function(){var Q=this.get(N),L=this.get(v),R=b.stamp(Q,u);if(R in h){delete h[R];}if(this.UI_EVENTS){this._destroyUIEvents();}this._unbindUI(Q);if(L){L.remove(u);}Q.remove(u);},render:function(L){if(!this.get(n)&&!this.get(J)){this.publish(i,{queuable:O,fireOnce:u,defaultTargetOnly:u,defaultFn:this._defRenderFn});this.fire(i,{parentNode:(L)?r.one(L):null});}return this;},_defRenderFn:function(L){this._parentNode=L.parentNode;this.renderer();this._set(J,u);this._removeLoadingClassNames();},renderer:function(){var L=this;L._renderUI();L.renderUI();L._bindUI();L.bindUI();L._syncUI();L.syncUI();},bindUI:G,renderUI:G,syncUI:G,hide:function(){return this.set(P,O);},show:function(){return this.set(P,u);},focus:function(){return this._set(B,u);},blur:function(){return this._set(B,O);},enable:function(){return this.set(y,O);},disable:function(){return this.set(y,u);},_uiSizeCB:function(L){this.get(v).toggleClass(M(F,"expanded"),L);},_renderBox:function(L){var T=this,Q=T.get(v),R=T.get(N),V=T.get(j),S=T.DEF_PARENT_NODE,U=(V&&V.get(m))||R.get(m)||Q.get(m);if(V&&!V.compareTo(Q)&&!Q.inDoc(U)){V.replace(Q);}if(!R.compareTo(Q.get(k))&&!R.compareTo(Q)){if(Q.inDoc(U)){Q.replace(R);}R.appendChild(Q);}L=L||(S&&r.one(S));if(L){L.appendChild(R);}else{if(!R.inDoc(U)){r.one(I).insert(R,0);}}},_setBB:function(L){return this._setBox(this.get(q),L,this.BOUNDING_TEMPLATE);},_setCB:function(L){return(this.CONTENT_TEMPLATE===null)?this.get(N):this._setBox(null,L,this.CONTENT_TEMPLATE);},_defaultCB:function(L){return this.get(j)||null;},_setBox:function(R,Q,L){Q=r.one(Q)||r.create(L);if(!Q.get(q)){Q.set(q,R||b.guid());}return Q;},_renderUI:function(){this._renderBoxClassNames();this._renderBox(this._parentNode);},_renderBoxClassNames:function(){var S=this._getClasses(),L,Q=this.get(N),R;Q.addClass(M());for(R=S.length-3;R>=0;R--){L=S[R];Q.addClass(L.CSS_PREFIX||w(L.NAME.toLowerCase()));}this.get(v).addClass(this.getClassName(F));},_removeLoadingClassNames:function(){var R=this.get(N),L=this.get(v),Q=this.getClassName(p),S=M(p);R.removeClass(S).removeClass(Q);L.removeClass(S).removeClass(Q);},_bindUI:function(){this._bindAttrUI(this._UI_ATTRS.BIND);this._bindDOM();},_unbindUI:function(L){this._unbindDOM(L);},_bindDOM:function(){var L=this.get(N).get(m);this._hDocFocus=L.on("focus",this._onDocFocus,this);if(C){this._hDocMouseDown=L.on("mousedown",this._onDocMouseDown,this);}},_unbindDOM:function(L){if(this._hDocFocus){this._hDocFocus.detach();}if(C&&this._hDocMouseDown){this._hDocMouseDown.detach();}},_syncUI:function(){this._syncAttrUI(this._UI_ATTRS.SYNC);},_uiSetHeight:function(L){this._uiSetDim(A,L);this._uiSizeCB((L!==D&&L!==x));},_uiSetWidth:function(L){this._uiSetDim(d,L);},_uiSetDim:function(L,Q){this.get(N).setStyle(L,g.isNumber(Q)?Q+this.DEF_UNIT:Q);},_uiSetVisible:function(L){this.get(N).toggleClass(this.getClassName(K),!L);},_uiSetDisabled:function(L){this.get(N).toggleClass(this.getClassName(y),L);},_uiSetFocused:function(R,Q){var L=this.get(N);L.toggleClass(this.getClassName(B),R);if(Q!==t){if(R){L.focus();}else{L.blur();}}},_uiSetTabIndex:function(Q){var L=this.get(N);if(g.isNumber(Q)){L.set(H,Q);}else{L.removeAttribute(H);}},_onDocMouseDown:function(L){if(this._domFocus){this._onDocFocus(L);}},_onDocFocus:function(L){this._domFocus=this.get(N).contains(L.target);this._set(B,this._domFocus,{src:t});},toString:function(){return this.name+"["+this.get(q)+"]";},DEF_UNIT:"px",DEF_PARENT_NODE:null,CONTENT_TEMPLATE:o,BOUNDING_TEMPLATE:o,_guid:function(){return b.guid();},_validTabIndex:function(L){return(g.isNumber(L)||g.isNull(L));},_bindAttrUI:function(Q){var R,L=Q.length;for(R=0;R-1){k=k.substring(h+c.length);}if(this.UI_EVENTS[k]){i=k;}}return i;}},_initUIEvent:function(i){var j=this._getUIEvent(i),h=this._uiEvtsInitQueue||{};if(j&&!h[j]){this._uiEvtsInitQueue=h[j]=1;this.after(d,function(){this._createUIEvent(j);delete this._uiEvtsInitQueue[j];});}},on:function(h){this._initUIEvent(h);return e.superclass.on.apply(this,arguments);},publish:function(i,h){var j=this._getUIEvent(i);if(j&&h&&h.defaultFn){this._initUIEvent(j);}return e.superclass.publish.apply(this,arguments);}},true);},"3.3.0",{requires:["widget-base","node-event-delegate"]});YUI.add("widget-htmlparser",function(f){var e=f.Widget,c=f.Node,d=f.Lang,a="srcNode",b="contentBox";e.HTML_PARSER={};e._buildCfg={aggregates:["HTML_PARSER"]};e.ATTRS[a]={value:null,setter:c.one,getter:"_getSrcNode",writeOnce:true};f.mix(e.prototype,{_getSrcNode:function(g){return g||this.get(b);},_applyParsedConfig:function(i,g,h){return(h)?f.mix(g,h,false):g;},_applyParser:function(g){var i=this,j=i.get(a),h=i._getHtmlParser(),l,k;if(h&&j){f.Object.each(h,function(n,m,p){k=null;if(d.isFunction(n)){k=n.call(i,j);}else{if(d.isArray(n)){k=j.all(n[0]);if(k.isEmpty()){k=null;}}else{k=j.one(n);}}if(k!==null&&k!==undefined){l=l||{};l[m]=k;}});}g=i._applyParsedConfig(j,g,l);},_getHtmlParser:function(){var h=this._getClasses(),k={},g,j;for(g=h.length-1;g>=0;g--){j=h[g].HTML_PARSER;if(j){f.mix(k,j,true);}}return k;}});},"3.3.0",{requires:["widget-base"]});YUI.add("widget-skin",function(e){var d="boundingBox",b="contentBox",a="skin",c=e.ClassNameManager.getClassName;e.Widget.prototype.getSkinName=function(){var f=this.get(b)||this.get(d),h=new RegExp("\\b"+c(a)+"-(\\S+)"),g;if(f){f.ancestor(function(i){g=i.get("className").match(h);return g;});}return(g)?g[1]:null;};},"3.3.0",{requires:["widget-base"]});YUI.add("widget",function(a){},"3.3.0",{use:["widget-base","widget-uievents","widget-htmlparser","widget-skin"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-parent-min.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-parent-min.js new file mode 100644 index 00000000..0d39e553 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-parent-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("widget-parent",function(c){var b=c.Lang;function a(d){this.publish("addChild",{defaultTargetOnly:true,defaultFn:this._defAddChildFn});this.publish("removeChild",{defaultTargetOnly:true,defaultFn:this._defRemoveChildFn});this._items=[];var e,f;if(d&&d.children){e=d.children;f=this.after("initializedChange",function(g){this._add(e);f.detach();});}c.after(this._renderChildren,this,"renderUI");c.after(this._bindUIParent,this,"bindUI");c.before(this._destroyChildren,this,"destructor");this.after("selectionChange",this._afterSelectionChange);this.after("selectedChange",this._afterParentSelectedChange);this.after("activeDescendantChange",this._afterActiveDescendantChange);this._hDestroyChild=this.after("*:destroy",this._afterDestroyChild);this.after("*:focusedChange",this._updateActiveDescendant);}a.ATTRS={defaultChildType:{setter:function(f){var d=c.Attribute.INVALID_VALUE,e=b.isString(f)?c[f]:f;if(b.isFunction(e)){d=e;}return d;}},activeDescendant:{readOnly:true},multiple:{value:false,validator:b.isBoolean,writeOnce:true,getter:function(e){var d=this.get("root");return(d&&d!=this)?d.get("multiple"):e;}},selection:{readOnly:true,setter:"_setSelection",getter:function(e){var d=b.isArray(e)?(new c.ArrayList(e)):e;return d;}},selected:{setter:function(e){var d=e;if(e===1&&!this.get("multiple")){d=c.Attribute.INVALID_VALUE;}return d;}}};a.prototype={_afterDestroyChild:function(d){var e=d.target;if(e.get("parent")==this){e.remove();}},_afterSelectionChange:function(f){if(f.target==this&&f.src!=this){var d=f.newVal,e=0;if(d){e=2;if(c.instanceOf(d,c.ArrayList)&&(d.size()===this.size())){e=1;}}this.set("selected",e,{src:this});}},_afterActiveDescendantChange:function(e){var d=this.get("parent");if(d){d._set("activeDescendant",e.newVal);}},_afterParentSelectedChange:function(d){var e=d.newVal;if(this==d.target&&d.src!=this&&(e===0||e===1)){this.each(function(f){f.set("selected",e,{src:this});},this);}},_setSelection:function(f){var e=null,d;if(this.get("multiple")&&!this.isEmpty()){d=[];this.each(function(g){if(g.get("selected")>0){d.push(g);}});if(d.length>0){e=d;}}else{if(f.get("selected")>0){e=f;}}return e;},_updateSelection:function(e){var f=e.target,d;if(f.get("parent")==this){if(e.src!="_updateSelection"){d=this.get("selection");if(!this.get("multiple")&&d&&e.newVal>0){d.set("selected",0,{src:"_updateSelection"});}this._set("selection",f);}if(e.src==this){this._set("selection",f,{src:this});}}},_updateActiveDescendant:function(d){var e=(d.newVal===true)?d.target:null;this._set("activeDescendant",e);},_createChild:function(d){var i=this.get("defaultChildType"),f=d.childType||d.type,h,e,g;if(f){e=b.isString(f)?c[f]:f;}if(b.isFunction(e)){g=e;}else{if(i){g=i;}}if(g){h=new g(d);}else{c.error("Could not create a child instance because its constructor is either undefined or invalid.");}return h;},_defAddChildFn:function(f){var g=f.child,d=f.index,e=this._items;if(g.get("parent")){g.remove();}if(b.isNumber(d)){e.splice(d,0,g);}else{e.push(g);}g._set("parent",this);g.addTarget(this);f.index=g.get("index");g.after("selectedChange",c.bind(this._updateSelection,this));},_defRemoveChildFn:function(f){var g=f.child,d=f.index,e=this._items;if(g.get("focused")){g.set("focused",false);}if(g.get("selected")){g.set("selected",0);}e.splice(d,1);g.removeTarget(this);g._oldParent=g.get("parent");g._set("parent",null);},_add:function(h,d){var e,g,f;if(b.isArray(h)){e=[];c.each(h,function(j,i){g=this._add(j,(d+i));if(g){e.push(g);}},this);if(e.length>0){f=e;}}else{if(c.instanceOf(h,c.Widget)){g=h;}else{g=this._createChild(h);}if(g&&this.fire("addChild",{child:g,index:d})){f=g;}}return f;},add:function(){var e=this._add.apply(this,arguments),d=e?(b.isArray(e)?e:[e]):[];return(new c.ArrayList(d));},remove:function(d){var f=this._items[d],e;if(f&&this.fire("removeChild",{child:f,index:d})){e=f;}return e;},removeAll:function(){var d=[],e;c.each(this._items.concat(),function(){e=this.remove(0);if(e){d.push(e);}},this);return(new c.ArrayList(d));},selectChild:function(d){this.item(d).set("selected",1);},selectAll:function(){this.set("selected",1);},deselectAll:function(){this.set("selected",0);},_uiAddChild:function(i,d){i.render(d);var g=i.get("boundingBox"),f,h=i.next(false),e;if(h){f=h.get("boundingBox");f.insert(g,"before");}else{e=i.previous(false);if(e){f=e.get("boundingBox");f.insert(g,"after");}}},_uiRemoveChild:function(d){d.get("boundingBox").remove();},_afterAddChild:function(d){var e=d.child;if(e.get("parent")==this){this._uiAddChild(e,this._childrenContainer);}},_afterRemoveChild:function(d){var e=d.child;if(e._oldParent==this){this._uiRemoveChild(e);}},_bindUIParent:function(){this.after("addChild",this._afterAddChild);this.after("removeChild",this._afterRemoveChild);},_renderChildren:function(){var d=this._childrenContainer||this.get("contentBox");this._childrenContainer=d;this.each(function(e){e.render(d);});},_destroyChildren:function(){this._hDestroyChild.detach();this.each(function(d){d.destroy();});}};c.augment(a,c.ArrayList);c.WidgetParent=a;},"3.3.0",{requires:["base-build","arraylist","widget"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-parent.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-parent.js new file mode 100644 index 00000000..033a096d --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-parent.js @@ -0,0 +1,851 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('widget-parent', function(Y) { + +/** + * Extension enabling a Widget to be a parent of another Widget. + * + * @module widget-parent + */ + +var Lang = Y.Lang; + +/** + * Widget extension providing functionality enabling a Widget to be a + * parent of another Widget. + * + *

            In addition to the set of attributes supported by WidgetParent, the constructor + * configuration object can also contain a children which can be used + * to add child widgets to the parent during construction. The children + * property is an array of either child widget instances or child widget configuration + * objects, and is sugar for the add method. See the + * add for details on the structure of the child widget + * configuration object. + * @class WidgetParent + * @constructor + * @uses ArrayList + * @param {Object} config User configuration object. + */ +function Parent(config) { + + /** + * Fires when a Widget is add as a child. The event object will have a + * 'child' property that returns a reference to the child Widget, as well + * as an 'index' property that returns a reference to the index specified + * when the add() method was called. + *

            + * Subscribers to the "on" moment of this event, will be notified + * before a child is added. + *

            + *

            + * Subscribers to the "after" moment of this event, will be notified + * after a child is added. + *

            + * + * @event addChild + * @preventable _defAddChildFn + * @param {EventFacade} e The Event Facade + */ + this.publish("addChild", { + defaultTargetOnly: true, + defaultFn: this._defAddChildFn + }); + + + /** + * Fires when a child Widget is removed. The event object will have a + * 'child' property that returns a reference to the child Widget, as well + * as an 'index' property that returns a reference child's ordinal position. + *

            + * Subscribers to the "on" moment of this event, will be notified + * before a child is removed. + *

            + *

            + * Subscribers to the "after" moment of this event, will be notified + * after a child is removed. + *

            + * + * @event removeChild + * @preventable _defRemoveChildFn + * @param {EventFacade} e The Event Facade + */ + this.publish("removeChild", { + defaultTargetOnly: true, + defaultFn: this._defRemoveChildFn + }); + + this._items = []; + + var children, + handle; + + if (config && config.children) { + + children = config.children; + + handle = this.after("initializedChange", function (e) { + this._add(children); + handle.detach(); + }); + + } + + // Widget method overlap + Y.after(this._renderChildren, this, "renderUI"); + Y.after(this._bindUIParent, this, "bindUI"); + Y.before(this._destroyChildren, this, "destructor"); + + this.after("selectionChange", this._afterSelectionChange); + this.after("selectedChange", this._afterParentSelectedChange); + this.after("activeDescendantChange", this._afterActiveDescendantChange); + + this._hDestroyChild = this.after("*:destroy", this._afterDestroyChild); + this.after("*:focusedChange", this._updateActiveDescendant); + +} + +Parent.ATTRS = { + + /** + * @attribute defaultChildType + * @type {String|Object} + * + * @description String representing the default type of the children + * managed by this Widget. Can also supply default type as a constructor + * reference. + */ + defaultChildType: { + setter: function (val) { + + var returnVal = Y.Attribute.INVALID_VALUE, + FnConstructor = Lang.isString(val) ? Y[val] : val; + + if (Lang.isFunction(FnConstructor)) { + returnVal = FnConstructor; + } + + return returnVal; + } + }, + + /** + * @attribute activeDescendant + * @type Widget + * @readOnly + * + * @description Returns the Widget's currently focused descendant Widget. + */ + activeDescendant: { + readOnly: true + }, + + /** + * @attribute multiple + * @type Boolean + * @default false + * @writeOnce + * + * @description Boolean indicating if multiple children can be selected at + * once. Whether or not multiple selection is enabled is always delegated + * to the value of the multiple attribute of the root widget + * in the object hierarchy. + */ + multiple: { + value: false, + validator: Lang.isBoolean, + writeOnce: true, + getter: function (value) { + var root = this.get("root"); + return (root && root != this) ? root.get("multiple") : value; + } + }, + + + /** + * @attribute selection + * @type {Y.ArrayList|Widget} + * @readOnly + * + * @description Returns the currently selected child Widget. If the + * mulitple attribte is set to true will + * return an Y.ArrayList instance containing the currently selected + * children. If no children are selected, will return null. + */ + selection: { + readOnly: true, + setter: "_setSelection", + getter: function (value) { + var selection = Lang.isArray(value) ? + (new Y.ArrayList(value)) : value; + return selection; + } + }, + + selected: { + setter: function (value) { + + // Enforces selection behavior on for parent Widgets. Parent's + // selected attribute can be set to the following: + // 0 - Not selected + // 1 - Fully selected (all children are selected). In order for + // all children to be selected, multiple selection must be + // enabled. Therefore, you cannot set the "selected" attribute + // on a parent Widget to 1 unless multiple selection is enabled. + // 2 - Partially selected, meaning one ore more (but not all) + // children are selected. + + var returnVal = value; + + if (value === 1 && !this.get("multiple")) { + returnVal = Y.Attribute.INVALID_VALUE; + } + + return returnVal; + } + } + +}; + +Parent.prototype = { + + /** + * Destroy event listener for each child Widget, responsible for removing + * the destroyed child Widget from the parent's internal array of children + * (_items property). + * + * @method _afterDestroyChild + * @protected + * @param {EventFacade} event The event facade for the attribute change. + */ + _afterDestroyChild: function (event) { + var child = event.target; + + if (child.get("parent") == this) { + child.remove(); + } + }, + + + /** + * Attribute change listener for the selection + * attribute, responsible for setting the value of the + * parent's selected attribute. + * + * @method _afterSelectionChange + * @protected + * @param {EventFacade} event The event facade for the attribute change. + */ + _afterSelectionChange: function (event) { + + if (event.target == this && event.src != this) { + + var selection = event.newVal, + selectedVal = 0; // Not selected + + + if (selection) { + + selectedVal = 2; // Assume partially selected, confirm otherwise + + + if (Y.instanceOf(selection, Y.ArrayList) && + (selection.size() === this.size())) { + + selectedVal = 1; // Fully selected + + } + + } + + this.set("selected", selectedVal, { src: this }); + + } + }, + + + /** + * Attribute change listener for the activeDescendant + * attribute, responsible for setting the value of the + * parent's activeDescendant attribute. + * + * @method _afterActiveDescendantChange + * @protected + * @param {EventFacade} event The event facade for the attribute change. + */ + _afterActiveDescendantChange: function (event) { + var parent = this.get("parent"); + + if (parent) { + parent._set("activeDescendant", event.newVal); + } + }, + + /** + * Attribute change listener for the selected + * attribute, responsible for syncing the selected state of all children to + * match that of their parent Widget. + * + * + * @method _afterParentSelectedChange + * @protected + * @param {EventFacade} event The event facade for the attribute change. + */ + _afterParentSelectedChange: function (event) { + + var value = event.newVal; + + if (this == event.target && event.src != this && + (value === 0 || value === 1)) { + + this.each(function (child) { + + // Specify the source of this change as the parent so that + // value of the parent's "selection" attribute isn't + // recalculated + + child.set("selected", value, { src: this }); + + }, this); + + } + + }, + + + /** + * Default setter for selection attribute changes. + * + * @method _setSelection + * @protected + * @param child {Widget|Array} Widget or Array of Widget instances. + * @return {Widget|Array} Widget or Array of Widget instances. + */ + _setSelection: function (child) { + + var selection = null, + selected; + + if (this.get("multiple") && !this.isEmpty()) { + + selected = []; + + this.each(function (v) { + + if (v.get("selected") > 0) { + selected.push(v); + } + + }); + + if (selected.length > 0) { + selection = selected; + } + + } + else { + + if (child.get("selected") > 0) { + selection = child; + } + + } + + return selection; + + }, + + + /** + * Attribute change listener for the selected + * attribute of child Widgets, responsible for setting the value of the + * parent's selection attribute. + * + * @method _updateSelection + * @protected + * @param {EventFacade} event The event facade for the attribute change. + */ + _updateSelection: function (event) { + + var child = event.target, + selection; + + if (child.get("parent") == this) { + + if (event.src != "_updateSelection") { + + selection = this.get("selection"); + + if (!this.get("multiple") && selection && event.newVal > 0) { + + // Deselect the previously selected child. + // Set src equal to the current context to prevent + // unnecessary re-calculation of the selection. + + selection.set("selected", 0, { src: "_updateSelection" }); + + } + + this._set("selection", child); + + } + + if (event.src == this) { + this._set("selection", child, { src: this }); + } + + } + + }, + + /** + * Attribute change listener for the focused + * attribute of child Widgets, responsible for setting the value of the + * parent's activeDescendant attribute. + * + * @method _updateActiveDescendant + * @protected + * @param {EventFacade} event The event facade for the attribute change. + */ + _updateActiveDescendant: function (event) { + var activeDescendant = (event.newVal === true) ? event.target : null; + this._set("activeDescendant", activeDescendant); + }, + + /** + * Creates an instance of a child Widget using the specified configuration. + * By default Widget instances will be created of the type specified + * by the defaultChildType attribute. Types can be explicitly + * defined via the childType property of the configuration object + * literal. The use of the type property has been deprecated, but + * will still be used as a fallback, if childType is not defined, + * for backwards compatibility. + * + * @method _createChild + * @protected + * @param config {Object} Object literal representing the configuration + * used to create an instance of a Widget. + */ + _createChild: function (config) { + + var defaultType = this.get("defaultChildType"), + altType = config.childType || config.type, + child, + Fn, + FnConstructor; + + if (altType) { + Fn = Lang.isString(altType) ? Y[altType] : altType; + } + + if (Lang.isFunction(Fn)) { + FnConstructor = Fn; + } else if (defaultType) { + // defaultType is normalized to a function in it's setter + FnConstructor = defaultType; + } + + if (FnConstructor) { + child = new FnConstructor(config); + } else { + Y.error("Could not create a child instance because its constructor is either undefined or invalid."); + } + + return child; + + }, + + /** + * Default addChild handler + * + * @method _defAddChildFn + * @protected + * @param event {EventFacade} The Event object + * @param child {Widget} The Widget instance, or configuration + * object for the Widget to be added as a child. + * @param index {Number} Number representing the position at + * which the child will be inserted. + */ + _defAddChildFn: function (event) { + + var child = event.child, + index = event.index, + children = this._items; + + if (child.get("parent")) { + child.remove(); + } + + if (Lang.isNumber(index)) { + children.splice(index, 0, child); + } + else { + children.push(child); + } + + child._set("parent", this); + child.addTarget(this); + + // Update index in case it got normalized after addition + // (e.g. user passed in 10, and there are only 3 items, the actual index would be 3. We don't want to pass 10 around in the event facade). + event.index = child.get("index"); + + // TO DO: Remove in favor of using event bubbling + child.after("selectedChange", Y.bind(this._updateSelection, this)); + }, + + + /** + * Default removeChild handler + * + * @method _defRemoveChildFn + * @protected + * @param event {EventFacade} The Event object + * @param child {Widget} The Widget instance to be removed. + * @param index {Number} Number representing the index of the Widget to + * be removed. + */ + _defRemoveChildFn: function (event) { + + var child = event.child, + index = event.index, + children = this._items; + + if (child.get("focused")) { + child.set("focused", false); + } + + if (child.get("selected")) { + child.set("selected", 0); + } + + children.splice(index, 1); + + child.removeTarget(this); + child._oldParent = child.get("parent"); + child._set("parent", null); + }, + + /** + * @method _add + * @protected + * @param child {Widget|Object} The Widget instance, or configuration + * object for the Widget to be added as a child. + * @param child {Array} Array of Widget instances, or configuration + * objects for the Widgets to be added as a children. + * @param index {Number} (Optional.) Number representing the position at + * which the child should be inserted. + * @description Adds a Widget as a child. If the specified Widget already + * has a parent it will be removed from its current parent before + * being added as a child. + * @return {Widget|Array} Successfully added Widget or Array containing the + * successfully added Widget instance(s). If no children where added, will + * will return undefined. + */ + _add: function (child, index) { + + var children, + oChild, + returnVal; + + + if (Lang.isArray(child)) { + + children = []; + + Y.each(child, function (v, k) { + + oChild = this._add(v, (index + k)); + + if (oChild) { + children.push(oChild); + } + + }, this); + + + if (children.length > 0) { + returnVal = children; + } + + } + else { + + if (Y.instanceOf(child, Y.Widget)) { + oChild = child; + } + else { + oChild = this._createChild(child); + } + + if (oChild && this.fire("addChild", { child: oChild, index: index })) { + returnVal = oChild; + } + + } + + return returnVal; + + }, + + + /** + * @method add + * @param child {Widget|Object} The Widget instance, or configuration + * object for the Widget to be added as a child. The configuration object + * for the child can include a childType property, which is either + * a constructor function or a string which names a constructor function on the + * Y instance (e.g. "Tab" would refer to Y.Tab) (childType used to be + * named type, support for which has been deprecated, but is still + * maintained for backward compatibility. childType takes precedence + * over type if both are defined. + * @param child {Array} Array of Widget instances, or configuration + * objects for the Widgets to be added as a children. + * @param index {Number} (Optional.) Number representing the position at + * which the child should be inserted. + * @description Adds a Widget as a child. If the specified Widget already + * has a parent it will be removed from its current parent before + * being added as a child. + * @return {Y.ArrayList} Y.ArrayList containing the successfully added + * Widget instance(s). If no children where added, will return an empty + * Y.ArrayList instance. + */ + add: function () { + + var added = this._add.apply(this, arguments), + children = added ? (Lang.isArray(added) ? added : [added]) : []; + + return (new Y.ArrayList(children)); + + }, + + + /** + * @method remove + * @param index {Number} (Optional.) Number representing the index of the + * child to be removed. + * @description Removes the Widget from its parent. Optionally, can remove + * a child by specifying its index. + * @return {Widget} Widget instance that was successfully removed, otherwise + * undefined. + */ + remove: function (index) { + + var child = this._items[index], + returnVal; + + if (child && this.fire("removeChild", { child: child, index: index })) { + returnVal = child; + } + + return returnVal; + + }, + + + /** + * @method removeAll + * @description Removes all of the children from the Widget. + * @return {Y.ArrayList} Y.ArrayList instance containing Widgets that were + * successfully removed. If no children where removed, will return an empty + * Y.ArrayList instance. + */ + removeAll: function () { + + var removed = [], + child; + + Y.each(this._items.concat(), function () { + + child = this.remove(0); + + if (child) { + removed.push(child); + } + + }, this); + + return (new Y.ArrayList(removed)); + + }, + + /** + * Selects the child at the given index (zero-based). + * + * @method selectChild + * @param {Number} i the index of the child to be selected + */ + selectChild: function(i) { + this.item(i).set('selected', 1); + }, + + /** + * Selects all children. + * + * @method selectAll + */ + selectAll: function () { + this.set("selected", 1); + }, + + /** + * Deselects all children. + * + * @method deselectAll + */ + deselectAll: function () { + this.set("selected", 0); + }, + + /** + * Updates the UI in response to a child being added. + * + * @method _uiAddChild + * @protected + * @param child {Widget} The child Widget instance to render. + * @param parentNode {Object} The Node under which the + * child Widget is to be rendered. + */ + _uiAddChild: function (child, parentNode) { + + child.render(parentNode); + + // TODO: Ideally this should be in Child's render UI. + + var childBB = child.get("boundingBox"), + siblingBB, + nextSibling = child.next(false), + prevSibling; + + // Insert or Append to last child. + + // Avoiding index, and using the current sibling + // state (which should be accurate), means we don't have + // to worry about decorator elements which may be added + // to the _childContainer node. + + if (nextSibling) { + siblingBB = nextSibling.get("boundingBox"); + siblingBB.insert(childBB, "before"); + } else { + prevSibling = child.previous(false); + if (prevSibling) { + siblingBB = prevSibling.get("boundingBox"); + siblingBB.insert(childBB, "after"); + } + } + }, + + /** + * Updates the UI in response to a child being removed. + * + * @method _uiRemoveChild + * @protected + * @param child {Widget} The child Widget instance to render. + */ + _uiRemoveChild: function (child) { + child.get("boundingBox").remove(); + }, + + _afterAddChild: function (event) { + var child = event.child; + + if (child.get("parent") == this) { + this._uiAddChild(child, this._childrenContainer); + } + }, + + _afterRemoveChild: function (event) { + var child = event.child; + + if (child._oldParent == this) { + this._uiRemoveChild(child); + } + }, + + /** + * Sets up DOM and CustomEvent listeners for the parent widget. + *

            + * This method in invoked after bindUI is invoked for the Widget class + * using YUI's aop infrastructure. + *

            + * + * @method _bindUIParent + * @protected + */ + _bindUIParent: function () { + this.after("addChild", this._afterAddChild); + this.after("removeChild", this._afterRemoveChild); + }, + + /** + * Renders all child Widgets for the parent. + *

            + * This method in invoked after renderUI is invoked for the Widget class + * using YUI's aop infrastructure. + *

            + * @method _renderChildren + * @protected + */ + _renderChildren: function () { + + /** + *

            By default WidgetParent will render it's children to the parent's content box.

            + * + *

            If the children need to be rendered somewhere else, the _childrenContainer property + * can be set to the Node which the children should be rendered to. This property should be + * set before the _renderChildren method is invoked, ideally in your renderUI method, + * as soon as you create the element to be rendered to.

            + * + * @protected + * @property _childrenContainer + * @value The content box + * @type Node + */ + var renderTo = this._childrenContainer || this.get("contentBox"); + + this._childrenContainer = renderTo; + + this.each(function (child) { + child.render(renderTo); + }); + }, + + /** + * Destroys all child Widgets for the parent. + *

            + * This method is invoked before the destructor is invoked for the Widget + * class using YUI's aop infrastructure. + *

            + * @method _destroyChildren + * @protected + */ + _destroyChildren: function () { + + // Detach the handler responsible for removing children in + // response to destroying them since: + // 1) It is unnecessary/inefficient at this point since we are doing + // a batch destroy of all children. + // 2) Removing each child will affect our ability to iterate the + // children since the size of _items will be changing as we + // iterate. + this._hDestroyChild.detach(); + + // Need to clone the _items array since + this.each(function (child) { + child.destroy(); + }); + } + +}; + +Y.augment(Parent, Y.ArrayList); + +Y.WidgetParent = Parent; + + +}, '3.3.0' ,{requires:['base-build', 'arraylist', 'widget']}); diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-position-align-min.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-position-align-min.js new file mode 100644 index 00000000..d245f1cb --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-position-align-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("widget-position-align",function(A){var H=A.Lang,D="align",F="bindUI",B="syncUI",E="offsetWidth",I="offsetHeight",K="viewportRegion",G="region",J="alignChange";function C(L){if(!this._posNode){A.error("WidgetPosition needs to be added to the Widget, before WidgetPositionAlign is added");}A.after(this._syncUIPosAlign,this,B);A.after(this._bindUIPosAlign,this,F);}C.ATTRS={align:{value:null},centered:{setter:"_setAlignCenter",lazyAdd:false,value:false}};C.TL="tl";C.TR="tr";C.BL="bl";C.BR="br";C.TC="tc";C.RC="rc";C.BC="bc";C.LC="lc";C.CC="cc";C.prototype={_syncUIPosAlign:function(){var L=this.get(D);if(L){this._uiSetAlign(L.node,L.points);}},_bindUIPosAlign:function(){this.after(J,this._afterAlignChange);},_setAlignCenter:function(L){if(L){this.set(D,{node:L===true?null:L,points:[C.CC,C.CC]});}return L;},_afterAlignChange:function(L){if(L.newVal){this._uiSetAlign(L.newVal.node,L.newVal.points);}},_uiSetAlign:function(O,N){if(!H.isArray(N)||N.length!=2){A.error("align: Invalid Points Arguments");return;}var M=this._getRegion(O),L,P,Q;if(M){L=N[0];P=N[1];switch(P){case C.TL:Q=[M.left,M.top];break;case C.TR:Q=[M.right,M.top];break;case C.BL:Q=[M.left,M.bottom];break;case C.BR:Q=[M.right,M.bottom];break;case C.TC:Q=[M.left+Math.floor(M.width/2),M.top];break;case C.BC:Q=[M.left+Math.floor(M.width/2),M.bottom];break;case C.LC:Q=[M.left,M.top+Math.floor(M.height/2)];break;case C.RC:Q=[M.right,M.top+Math.floor(M.height/2),L];break;case C.CC:Q=[M.left+Math.floor(M.width/2),M.top+Math.floor(M.height/2),L];break;default:break;}if(Q){this._doAlign(L,Q[0],Q[1]);}}},_doAlign:function(M,L,P){var O=this._posNode,N;switch(M){case C.TL:N=[L,P];break;case C.TR:N=[L-O.get(E),P];break;case C.BL:N=[L,P-O.get(I)];break;case C.BR:N=[L-O.get(E),P-O.get(I)];break;case C.TC:N=[L-(O.get(E)/2),P];break;case C.BC:N=[L-(O.get(E)/2),P-O.get(I)];break;case C.LC:N=[L,P-(O.get(I)/2)];break;case C.RC:N=[(L-O.get(E)),P-(O.get(I)/2)];break;case C.CC:N=[L-(O.get(E)/2),P-(O.get(I)/2)];break;default:break;}if(N){this.move(N);}},_getRegion:function(M){var L;if(!M){L=this._posNode.get(K);}else{M=A.Node.one(M);if(M){L=M.get(G);}}return L;},align:function(M,L){this.set(D,{node:M,points:L});},centered:function(L){this.align(L,[C.CC,C.CC]);}};A.WidgetPositionAlign=C;},"3.3.0",{requires:["widget-position"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-position-ext.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-position-align.js similarity index 78% rename from jssource/src_files/include/javascript/yui3/build/widget/widget-position-ext.js rename to jssource/src_files/include/javascript/yui3/build/widget/widget-position-align.js index edd040f7..cb92876c 100644 --- a/jssource/src_files/include/javascript/yui3/build/widget/widget-position-ext.js +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-position-align.js @@ -1,11 +1,11 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add('widget-position-ext', function(Y) { +YUI.add('widget-position-align', function(Y) { /** * Provides extended/advanced XY positioning support for Widgets, through an extension. @@ -13,7 +13,7 @@ YUI.add('widget-position-ext', function(Y) { * It builds on top of the widget-position module, to provide alignmentment and centering support. * Future releases aim to add constrained and fixed positioning support. * - * @module widget-position-ext + * @module widget-position-align */ var L = Y.Lang, ALIGN = "align", @@ -31,29 +31,29 @@ YUI.add('widget-position-ext', function(Y) { /** * Widget extension, which can be used to add extended XY positioning support to the base Widget class, * through the Base.build method. This extension requires that - * the WidgetPosition extension be added to the Widget (before WidgetPositionExt, if part of the same + * the WidgetPosition extension be added to the Widget (before WidgetPositionAlign, if part of the same * extension list passed to Base.build). * - * @class WidgetPositionExt + * @class WidgetPositionAlign * @param {Object} User configuration object */ - function PositionExt(config) { + function PositionAlign(config) { if (!this._posNode) { - Y.error("WidgetPosition needs to be added to the Widget, before WidgetPositionExt is added"); + Y.error("WidgetPosition needs to be added to the Widget, before WidgetPositionAlign is added"); } - Y.after(this._syncUIPosExtras, this, SYNCUI); - Y.after(this._bindUIPosExtras, this, BINDUI); + Y.after(this._syncUIPosAlign, this, SYNCUI); + Y.after(this._bindUIPosAlign, this, BINDUI); } /** * Static property used to define the default attribute - * configuration introduced by WidgetPositionExt. + * configuration introduced by WidgetPositionAlign. * - * @property WidgetPositionExt.ATTRS + * @property WidgetPositionAlign.ATTRS * @type Object * @static */ - PositionExt.ATTRS = { + PositionAlign.ATTRS = { /** * @attribute align @@ -70,11 +70,11 @@ YUI.add('widget-position-ext', function(Y) { *
            *

            * A two element array, defining the two points on the Widget and node/viewport which are to be aligned. The first element is the point on the Widget, and the second element is the point on the node/viewport. - * Supported alignment points are defined as static properties on WidgetPositionExt. + * Supported alignment points are defined as static properties on WidgetPositionAlign. *

            *

            - * e.g. [WidgetPositionExt.TR, WidgetPositionExt.TL] aligns the Top-Right corner of the Widget with the - * Top-Left corner of the node/viewport, and [WidgetPositionExt.CC, WidgetPositionExt.TC] aligns the Center of the + * e.g. [WidgetPositionAlign.TR, WidgetPositionAlign.TL] aligns the Top-Right corner of the Widget with the + * Top-Left corner of the node/viewport, and [WidgetPositionAlign.CC, WidgetPositionAlign.TC] aligns the Center of the * Widget with the Top-Center edge of the node/viewport. *

            *
            @@ -93,9 +93,7 @@ YUI.add('widget-position-ext', function(Y) { * the Widget will be centered within the node. If set the false, no center positioning is applied. */ centered: { - setter: function(val) { - return this._setAlignCenter(val); - }, + setter: "_setAlignCenter", lazyAdd:false, value:false } @@ -104,96 +102,97 @@ YUI.add('widget-position-ext', function(Y) { /** * Constant used to specify the top-left corner for alignment * - * @property WidgetPositionExt.TL + * @property WidgetPositionAlign.TL * @type String * @static * @value "tl" */ - PositionExt.TL = "tl"; + PositionAlign.TL = "tl"; /** * Constant used to specify the top-right corner for alignment * - * @property WidgetPositionExt.TR + * @property WidgetPositionAlign.TR * @type String * @static * @value "tr" */ - PositionExt.TR = "tr"; + PositionAlign.TR = "tr"; /** * Constant used to specify the bottom-left corner for alignment * - * @property WidgetPositionExt.BL + * @property WidgetPositionAlign.BL * @type String * @static * @value "bl" */ - PositionExt.BL = "bl"; + PositionAlign.BL = "bl"; /** * Constant used to specify the bottom-right corner for alignment * - * @property WidgetPositionExt.BR + * @property WidgetPositionAlign.BR * @type String * @static * @value "br" */ - PositionExt.BR = "br"; + PositionAlign.BR = "br"; /** * Constant used to specify the top edge-center point for alignment * - * @property WidgetPositionExt.TC + * @property WidgetPositionAlign.TC * @type String * @static * @value "tc" */ - PositionExt.TC = "tc"; + PositionAlign.TC = "tc"; /** * Constant used to specify the right edge, center point for alignment * - * @property WidgetPositionExt.RC + * @property WidgetPositionAlign.RC * @type String * @static * @value "rc" */ - PositionExt.RC = "rc"; + PositionAlign.RC = "rc"; /** * Constant used to specify the bottom edge, center point for alignment * - * @property WidgetPositionExt.BC + * @property WidgetPositionAlign.BC * @type String * @static * @value "bc" */ - PositionExt.BC = "bc"; + PositionAlign.BC = "bc"; /** * Constant used to specify the left edge, center point for alignment * - * @property WidgetPositionExt.LC + * @property WidgetPositionAlign.LC * @type String * @static * @value "lc" */ - PositionExt.LC = "lc"; + PositionAlign.LC = "lc"; /** * Constant used to specify the center of widget/node/viewport for alignment * - * @property WidgetPositionExt.CC + * @property WidgetPositionAlign.CC * @type String * @static * @value "cc" */ - PositionExt.CC = "cc"; + PositionAlign.CC = "cc"; - PositionExt.prototype = { + PositionAlign.prototype = { /** - * Synchronizes the UI to match the Widgets extended positioning state. + * Synchronizes the UI to match the Widgets align configuration. + * * This method in invoked after syncUI is invoked for the Widget class * using YUI's aop infrastructure. * - * @method _syncUIPosExtras + * @method _syncUIPosAlign * @protected */ - _syncUIPosExtras : function() { + _syncUIPosAlign : function() { var align = this.get(ALIGN); if (align) { this._uiSetAlign(align.node, align.points); @@ -210,7 +209,7 @@ YUI.add('widget-position-ext', function(Y) { * @method _bindUIStack * @protected */ - _bindUIPosExtras : function() { + _bindUIPosAlign : function() { this.after(AlignChange, this._afterAlignChange); }, @@ -227,7 +226,7 @@ YUI.add('widget-position-ext', function(Y) { if (val) { this.set(ALIGN, { node: val === true ? null : val, - points: [PositionExt.CC, PositionExt.CC] + points: [PositionAlign.CC, PositionAlign.CC] }); } return val; @@ -260,53 +259,43 @@ YUI.add('widget-position-ext', function(Y) { return; } - var nodeRegion, widgetPoint, nodePoint, xy; - - if (!node) { - nodeRegion = this._posNode.get(VIEWPORT_REGION); - } else { - node = Y.Node.get(node); - if (node) { - nodeRegion = node.get(REGION); - } - } + var nodeRegion = this._getRegion(node), + widgetPoint, + nodePoint, + xy; if (nodeRegion) { - // TODO: ViewportRegion doesn't have width/height - Workaround until normalized in Node/Dom - nodeRegion.width = nodeRegion.width || nodeRegion.right - nodeRegion.left; - nodeRegion.height = nodeRegion.height || nodeRegion.bottom - nodeRegion.top; - widgetPoint = points[0]; nodePoint = points[1]; // TODO: Optimize KWeight - Would lookup table help? switch (nodePoint) { - case PositionExt.TL: + case PositionAlign.TL: xy = [nodeRegion.left, nodeRegion.top]; break; - case PositionExt.TR: + case PositionAlign.TR: xy = [nodeRegion.right, nodeRegion.top]; break; - case PositionExt.BL: + case PositionAlign.BL: xy = [nodeRegion.left, nodeRegion.bottom]; break; - case PositionExt.BR: + case PositionAlign.BR: xy = [nodeRegion.right, nodeRegion.bottom]; break; - case PositionExt.TC: + case PositionAlign.TC: xy = [nodeRegion.left + Math.floor(nodeRegion.width/2), nodeRegion.top]; break; - case PositionExt.BC: + case PositionAlign.BC: xy = [nodeRegion.left + Math.floor(nodeRegion.width/2), nodeRegion.bottom]; break; - case PositionExt.LC: + case PositionAlign.LC: xy = [nodeRegion.left, nodeRegion.top + Math.floor(nodeRegion.height/2)]; break; - case PositionExt.RC: + case PositionAlign.RC: xy = [nodeRegion.right, nodeRegion.top + Math.floor(nodeRegion.height/2), widgetPoint]; break; - case PositionExt.CC: + case PositionAlign.CC: xy = [nodeRegion.left + Math.floor(nodeRegion.width/2), nodeRegion.top + Math.floor(nodeRegion.height/2), widgetPoint]; break; default: @@ -324,7 +313,7 @@ YUI.add('widget-position-ext', function(Y) { * * @method _doAlign * @private - * @param {String} widgetPoint Supported point constant (e.g. WidgetPositionExt.TL) + * @param {String} widgetPoint Supported point constant (e.g. WidgetPositionAlign.TL) * @param {Number} x X page co-ordinate to align to * @param {Number} y Y page co-ordinate to align to */ @@ -333,31 +322,31 @@ YUI.add('widget-position-ext', function(Y) { xy; switch (widgetPoint) { - case PositionExt.TL: + case PositionAlign.TL: xy = [x, y]; break; - case PositionExt.TR: + case PositionAlign.TR: xy = [x - widgetNode.get(OFFSET_WIDTH), y]; break; - case PositionExt.BL: + case PositionAlign.BL: xy = [x, y - widgetNode.get(OFFSET_HEIGHT)]; break; - case PositionExt.BR: + case PositionAlign.BR: xy = [x - widgetNode.get(OFFSET_WIDTH), y - widgetNode.get(OFFSET_HEIGHT)]; break; - case PositionExt.TC: + case PositionAlign.TC: xy = [x - (widgetNode.get(OFFSET_WIDTH)/2), y]; break; - case PositionExt.BC: + case PositionAlign.BC: xy = [x - (widgetNode.get(OFFSET_WIDTH)/2), y - widgetNode.get(OFFSET_HEIGHT)]; break; - case PositionExt.LC: + case PositionAlign.LC: xy = [x, y - (widgetNode.get(OFFSET_HEIGHT)/2)]; break; - case PositionExt.RC: + case PositionAlign.RC: xy = [(x - widgetNode.get(OFFSET_WIDTH)), y - (widgetNode.get(OFFSET_HEIGHT)/2)]; break; - case PositionExt.CC: + case PositionAlign.CC: xy = [x - (widgetNode.get(OFFSET_WIDTH)/2), y - (widgetNode.get(OFFSET_HEIGHT)/2)]; break; default: @@ -369,6 +358,19 @@ YUI.add('widget-position-ext', function(Y) { } }, + _getRegion : function(node) { + var nodeRegion; + if (!node) { + nodeRegion = this._posNode.get(VIEWPORT_REGION); + } else { + node = Y.Node.one(node); + if (node) { + nodeRegion = node.get(REGION); + } + } + return nodeRegion; + }, + /** * Aligns the Widget to the provided node (or viewport) using the provided * points. The method can be invoked directly, however it will result in @@ -379,9 +381,9 @@ YUI.add('widget-position-ext', function(Y) { * If null is passed in, the Widget will be aligned with the viewport. * @param {Array[2]} points A two element array, specifying the points on the Widget and node/viewport which need to be aligned. * The first entry is the point on the Widget, and the second entry is the point on the node/viewport which need to align. - * Valid point references are defined as static constants on the WidgetPositionExt class. + * Valid point references are defined as static constants on the WidgetPositionAlign class. * - * e.g. [WidgetPositionExt.TL, WidgetPositionExt.TR] will align the top-left corner of the Widget with the top-right corner of the node/viewport. + * e.g. [WidgetPositionAlign.TL, WidgetPositionAlign.TR] will align the top-left corner of the Widget with the top-right corner of the node/viewport. */ align: function (node, points) { this.set(ALIGN, {node: node, points:points}); @@ -397,11 +399,11 @@ YUI.add('widget-position-ext', function(Y) { * viewport. */ centered: function (node) { - this.align(node, [PositionExt.CC, PositionExt.CC]); + this.align(node, [PositionAlign.CC, PositionAlign.CC]); } }; - Y.WidgetPositionExt = PositionExt; + Y.WidgetPositionAlign = PositionAlign; -}, '3.0.0' ,{requires:['widget', 'widget-position']}); +}, '3.3.0' ,{requires:['widget-position']}); diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-position-constrain-min.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-position-constrain-min.js new file mode 100644 index 00000000..c3743e80 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-position-constrain-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("widget-position-constrain",function(C){var F="constrain",D="constrain|xyChange",B="constrainChange",N="preventOverlap",E="align",O="",G="bindUI",I="xy",A="x",M="y",J=C.Node,P="viewportRegion",L="region",K;function H(Q){if(!this._posNode){C.error("WidgetPosition needs to be added to the Widget, before WidgetPositionConstrain is added");}C.after(this._bindUIPosConstrained,this,G);}H.ATTRS={constrain:{value:null,setter:"_setConstrain"},preventOverlap:{value:false}};K=H._PREVENT_OVERLAP={x:{"tltr":1,"blbr":1,"brbl":1,"trtl":1},y:{"trbr":1,"tlbl":1,"bltl":1,"brtr":1}};H.prototype={getConstrainedXY:function(T,S){S=S||this.get(F);var R=this._getRegion((S===true)?null:S),Q=this._posNode.get(L);return[this._constrain(T[0],A,Q,R),this._constrain(T[1],M,Q,R)];},constrain:function(U,R){var T,Q,S=R||this.get(F);if(S){T=U||this.get(I);Q=this.getConstrainedXY(T,S);if(Q[0]!==T[0]||Q[1]!==T[1]){this.set(I,Q,{constrained:true});}}},_setConstrain:function(Q){return(Q===true)?Q:J.one(Q);},_constrain:function(Q,R,Y,S){if(S){if(this.get(N)){Q=this._preventOverlap(Q,R,Y,S);}var V=(R==A),X=(V)?S.width:S.height,U=(V)?Y.width:Y.height,T=(V)?S.left:S.top,W=(V)?S.right-U:S.bottom-U;if(QW){if(UW){Q=W;}}}else{Q=T;}}}return Q;},_preventOverlap:function(R,S,b,T){var W=this.get(E),a=(S===A),Y,V,U,X,Z,Q;if(W&&W.points&&K[S][W.points.join(O)]){V=this._getRegion(W.node);if(V){Y=(a)?b.width:b.height;U=(a)?V.left:V.top;X=(a)?V.right:V.bottom;Z=(a)?V.left-T.left:V.top-T.top;Q=(a)?T.right-V.right:T.bottom-V.bottom;}if(R>U){if(QY){R=U-Y;}}else{if(ZY){R=X;}}}return R;},_bindUIPosConstrained:function(){this.after(B,this._afterConstrainChange);this._enableConstraints(this.get(F));},_afterConstrainChange:function(Q){this._enableConstraints(Q.newVal);},_enableConstraints:function(Q){if(Q){this.constrain();this._cxyHandle=this._cxyHandle||this.on(D,this._constrainOnXYChange);}else{if(this._cxyHandle){this._cxyHandle.detach();this._cxyHandle=null;}}},_constrainOnXYChange:function(Q){if(!Q.constrained){Q.newVal=this.getConstrainedXY(Q.newVal);}},_getRegion:function(Q){var R;if(!Q){R=this._posNode.get(P);}else{Q=J.one(Q);if(Q){R=Q.get(L);}}return R;}};C.WidgetPositionConstrain=H;},"3.3.0",{requires:["widget-position"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-position-constrain.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-position-constrain.js new file mode 100644 index 00000000..49df8382 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-position-constrain.js @@ -0,0 +1,352 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('widget-position-constrain', function(Y) { + +/** + * Provides constrained xy positioning support for Widgets, through an extension. + * + * It builds on top of the widget-position module, to provide constrained positioning support. + * + * @module widget-position-constrain + */ +var CONSTRAIN = "constrain", + CONSTRAIN_XYCHANGE = "constrain|xyChange", + CONSTRAIN_CHANGE = "constrainChange", + + PREVENT_OVERLAP = "preventOverlap", + ALIGN = "align", + + EMPTY_STR = "", + + BINDUI = "bindUI", + + XY = "xy", + X_COORD = "x", + Y_COORD = "y", + + Node = Y.Node, + + VIEWPORT_REGION = "viewportRegion", + REGION = "region", + + PREVENT_OVERLAP_MAP; + +/** + * A widget extension, which can be used to add constrained xy positioning support to the base Widget class, + * through the Base.build method. This extension requires that + * the WidgetPosition extension be added to the Widget (before WidgetPositionConstrain, if part of the same + * extension list passed to Base.build). + * + * @class WidgetPositionConstrain + * @param {Object} User configuration object + */ +function PositionConstrain(config) { + if (!this._posNode) { + Y.error("WidgetPosition needs to be added to the Widget, before WidgetPositionConstrain is added"); + } + Y.after(this._bindUIPosConstrained, this, BINDUI); +} + +/** + * Static property used to define the default attribute + * configuration introduced by WidgetPositionConstrain. + * + * @property WidgetPositionConstrain.ATTRS + * @type Object + * @static + */ +PositionConstrain.ATTRS = { + + /** + * @attribute constrain + * @type boolean | Node + * @default null + * @description The node to constrain the widget's bounding box to, when setting xy. Can also be + * set to true, to constrain to the viewport. + */ + constrain : { + value: null, + setter: "_setConstrain" + }, + + /** + * @attribute preventOverlap + * @type boolean + * @description If set to true, and WidgetPositionAlign is also added to the Widget, + * constrained positioning will attempt to prevent the widget's bounding box from overlapping + * the element to which it has been aligned, by flipping the orientation of the alignment + * for corner based alignments + */ + preventOverlap : { + value:false + } +}; + +/** + * @property WidgetPositionConstrain._PREVENT_OVERLAP + * @static + * @protected + * @type Object + * @description The set of positions for which to prevent + * overlap. + */ +PREVENT_OVERLAP_MAP = PositionConstrain._PREVENT_OVERLAP = { + x: { + "tltr": 1, + "blbr": 1, + "brbl": 1, + "trtl": 1 + }, + y : { + "trbr": 1, + "tlbl": 1, + "bltl": 1, + "brtr": 1 + } +}; + +PositionConstrain.prototype = { + + /** + * Calculates the constrained positions for the XY positions provided, using + * the provided node argument is passed in. If no node value is passed in, the value of + * the "constrain" attribute is used. + * + * @method getConstrainedXY + * @param {Array} xy The xy values to constrain + * @param {Node | boolean} node Optional. The node to constrain to, or true for the viewport + * @return {Array} The constrained xy values + */ + getConstrainedXY : function(xy, node) { + node = node || this.get(CONSTRAIN); + + var constrainingRegion = this._getRegion((node === true) ? null : node), + nodeRegion = this._posNode.get(REGION); + + return [ + this._constrain(xy[0], X_COORD, nodeRegion, constrainingRegion), + this._constrain(xy[1], Y_COORD, nodeRegion, constrainingRegion) + ]; + }, + + /** + * Constrains the widget's bounding box to a node (or the viewport). If xy or node are not + * passed in, the current position and the value of "constrain" will be used respectively. + * + * The widget's position will be changed to the constrained position. + * + * @param {Array} xy Optional. The xy values to constrain + * @param {Node | boolean} node Optional. The node to constrain to, or true for the viewport + */ + constrain : function(xy, node) { + var currentXY, + constrainedXY, + constraint = node || this.get(CONSTRAIN); + + if (constraint) { + currentXY = xy || this.get(XY); + constrainedXY = this.getConstrainedXY(currentXY, constraint); + + if (constrainedXY[0] !== currentXY[0] || constrainedXY[1] !== currentXY[1]) { + this.set(XY, constrainedXY, { constrained:true }); + } + } + }, + + /** + * The setter implementation for the "constrain" attribute. + * + * @method _setConstrain + * @protected + * @param {Node | boolean} val The attribute value + */ + _setConstrain : function(val) { + return (val === true) ? val : Node.one(val); + }, + + /** + * The method which performs the actual constrain calculations for a given axis ("x" or "y") based + * on the regions provided. + * + * @method _constrain + * @protected + * + * @param {Number} val The value to constrain + * @param {String} axis The axis to use for constrainment + * @param {Region} nodeRegion The region of the node to constrain + * @param {Region} constrainingRegion The region of the node (or viewport) to constrain to + * + * @return {Number} The constrained value + */ + _constrain: function(val, axis, nodeRegion, constrainingRegion) { + if (constrainingRegion) { + + if (this.get(PREVENT_OVERLAP)) { + val = this._preventOverlap(val, axis, nodeRegion, constrainingRegion); + } + + var x = (axis == X_COORD), + + regionSize = (x) ? constrainingRegion.width : constrainingRegion.height, + nodeSize = (x) ? nodeRegion.width : nodeRegion.height, + minConstraint = (x) ? constrainingRegion.left : constrainingRegion.top, + maxConstraint = (x) ? constrainingRegion.right - nodeSize : constrainingRegion.bottom - nodeSize; + + if (val < minConstraint || val > maxConstraint) { + if (nodeSize < regionSize) { + if (val < minConstraint) { + val = minConstraint; + } else if (val > maxConstraint) { + val = maxConstraint; + } + } else { + val = minConstraint; + } + } + } + + return val; + }, + + /** + * The method which performs the preventOverlap calculations for a given axis ("x" or "y") based + * on the value and regions provided. + * + * @method _preventOverlap + * @protected + * + * @param {Number} val The value being constrain + * @param {String} axis The axis to being constrained + * @param {Region} nodeRegion The region of the node being constrained + * @param {Region} constrainingRegion The region of the node (or viewport) we need to constrain to + * + * @return {Number} The constrained value + */ + _preventOverlap : function(val, axis, nodeRegion, constrainingRegion) { + + var align = this.get(ALIGN), + x = (axis === X_COORD), + nodeSize, + alignRegion, + nearEdge, + farEdge, + spaceOnNearSide, + spaceOnFarSide; + + if (align && align.points && PREVENT_OVERLAP_MAP[axis][align.points.join(EMPTY_STR)]) { + + alignRegion = this._getRegion(align.node); + + if (alignRegion) { + nodeSize = (x) ? nodeRegion.width : nodeRegion.height; + nearEdge = (x) ? alignRegion.left : alignRegion.top; + farEdge = (x) ? alignRegion.right : alignRegion.bottom; + spaceOnNearSide = (x) ? alignRegion.left - constrainingRegion.left : alignRegion.top - constrainingRegion.top; + spaceOnFarSide = (x) ? constrainingRegion.right - alignRegion.right : constrainingRegion.bottom - alignRegion.bottom; + } + + if (val > nearEdge) { + if (spaceOnFarSide < nodeSize && spaceOnNearSide > nodeSize) { + val = nearEdge - nodeSize; + } + } else { + if (spaceOnNearSide < nodeSize && spaceOnFarSide > nodeSize) { + val = farEdge; + } + } + } + + return val; + }, + + /** + * Binds event listeners responsible for updating the UI state in response to + * Widget constrained positioning related state changes. + *

            + * This method is invoked after bindUI is invoked for the Widget class + * using YUI's aop infrastructure. + *

            + * + * @method _bindUIPosConstrained + * @protected + */ + _bindUIPosConstrained : function() { + this.after(CONSTRAIN_CHANGE, this._afterConstrainChange); + this._enableConstraints(this.get(CONSTRAIN)); + }, + + /** + * After change listener for the "constrain" attribute, responsible + * for updating the UI, in response to attribute changes. + * + * @method _afterConstrainChange + * @protected + * @param {EventFacade} e The event facade + */ + _afterConstrainChange : function(e) { + this._enableConstraints(e.newVal); + }, + + /** + * Updates the UI if enabling constraints, and sets up the xyChange event listeners + * to constrain whenever the widget is moved. Disabling constraints removes the listeners. + * + * @method enable or disable constraints listeners + * @private + * @param {boolean} enable Enable or disable constraints + */ + _enableConstraints : function(enable) { + if (enable) { + this.constrain(); + this._cxyHandle = this._cxyHandle || this.on(CONSTRAIN_XYCHANGE, this._constrainOnXYChange); + } else if (this._cxyHandle) { + this._cxyHandle.detach(); + this._cxyHandle = null; + } + }, + + /** + * The on change listener for the "xy" attribute. Modifies the event facade's + * newVal property with the constrained XY value. + * + * @method _constrainOnXYChange + * @protected + * @param {EventFacade} e The event facade for the attribute change + */ + _constrainOnXYChange : function(e) { + if (!e.constrained) { + e.newVal = this.getConstrainedXY(e.newVal); + } + }, + + /** + * Utility method to normalize region retrieval from a node instance, + * or the viewport, if no node is provided. + * + * @method _getRegion + * @private + * @param {Node} node Optional. + */ + _getRegion : function(node) { + var region; + if (!node) { + region = this._posNode.get(VIEWPORT_REGION); + } else { + node = Node.one(node); + if (node) { + region = node.get(REGION); + } + } + return region; + } +}; + +Y.WidgetPositionConstrain = PositionConstrain; + + +}, '3.3.0' ,{requires:['widget-position']}); diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-position-ext-min.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-position-ext-min.js deleted file mode 100644 index 80b412a8..00000000 --- a/jssource/src_files/include/javascript/yui3/build/widget/widget-position-ext-min.js +++ /dev/null @@ -1,8 +0,0 @@ -/* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. -Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 -*/ -YUI.add("widget-position-ext",function(A){var H=A.Lang,C="align",E="bindUI",B="syncUI",D="offsetWidth",I="offsetHeight",K="viewportRegion",G="region",J="alignChange";function F(L){if(!this._posNode){A.error("WidgetPosition needs to be added to the Widget, before WidgetPositionExt is added");}A.after(this._syncUIPosExtras,this,B);A.after(this._bindUIPosExtras,this,E);}F.ATTRS={align:{value:null},centered:{setter:function(L){return this._setAlignCenter(L);},lazyAdd:false,value:false}};F.TL="tl";F.TR="tr";F.BL="bl";F.BR="br";F.TC="tc";F.RC="rc";F.BC="bc";F.LC="lc";F.CC="cc";F.prototype={_syncUIPosExtras:function(){var L=this.get(C);if(L){this._uiSetAlign(L.node,L.points);}},_bindUIPosExtras:function(){this.after(J,this._afterAlignChange);},_setAlignCenter:function(L){if(L){this.set(C,{node:L===true?null:L,points:[F.CC,F.CC]});}return L;},_afterAlignChange:function(L){if(L.newVal){this._uiSetAlign(L.newVal.node,L.newVal.points);}},_uiSetAlign:function(O,N){if(!H.isArray(N)||N.length!=2){A.error("align: Invalid Points Arguments");return;}var M,L,P,Q;if(!O){M=this._posNode.get(K);}else{O=A.Node.get(O);if(O){M=O.get(G);}}if(M){M.width=M.width||M.right-M.left;M.height=M.height||M.bottom-M.top;L=N[0];P=N[1];switch(P){case F.TL:Q=[M.left,M.top];break;case F.TR:Q=[M.right,M.top];break;case F.BL:Q=[M.left,M.bottom];break;case F.BR:Q=[M.right,M.bottom];break;case F.TC:Q=[M.left+Math.floor(M.width/2),M.top];break;case F.BC:Q=[M.left+Math.floor(M.width/2),M.bottom];break;case F.LC:Q=[M.left,M.top+Math.floor(M.height/2)];break;case F.RC:Q=[M.right,M.top+Math.floor(M.height/2),L];break;case F.CC:Q=[M.left+Math.floor(M.width/2),M.top+Math.floor(M.height/2),L];break;default:break;}if(Q){this._doAlign(L,Q[0],Q[1]);}}},_doAlign:function(M,L,P){var O=this._posNode,N;switch(M){case F.TL:N=[L,P];break;case F.TR:N=[L-O.get(D),P];break;case F.BL:N=[L,P-O.get(I)];break;case F.BR:N=[L-O.get(D),P-O.get(I)];break;case F.TC:N=[L-(O.get(D)/2),P];break;case F.BC:N=[L-(O.get(D)/2),P-O.get(I)];break;case F.LC:N=[L,P-(O.get(I)/2)];break;case F.RC:N=[(L-O.get(D)),P-(O.get(I)/2)];break;case F.CC:N=[L-(O.get(D)/2),P-(O.get(I)/2)];break;default:break;}if(N){this.move(N);}},align:function(M,L){this.set(C,{node:M,points:L});},centered:function(L){this.align(L,[F.CC,F.CC]);}};A.WidgetPositionExt=F;},"3.0.0",{requires:["widget","widget-position"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-position-min.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-position-min.js index f285b0ef..e88fc2f2 100644 --- a/jssource/src_files/include/javascript/yui3/build/widget/widget-position-min.js +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-position-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("widget-position",function(A){var H=A.Lang,J=A.Widget,K="xy",F="positioned",I="boundingBox",L="renderUI",G="bindUI",D="syncUI",C=J.UI_SRC,E="xyChange";function B(M){this._posNode=this.get(I);A.after(this._renderUIPosition,this,L);A.after(this._syncUIPosition,this,D);A.after(this._bindUIPosition,this,G);}B.ATTRS={x:{setter:function(M){this._setX(M);},lazyAdd:false,getter:function(){return this._getX();}},y:{setter:function(M){this._setY(M);},lazyAdd:false,getter:function(){return this._getY();}},xy:{value:[0,0],validator:function(M){return this._validateXY(M);}}};B.POSITIONED_CLASS_NAME=J.getClassName(F);B.prototype={_renderUIPosition:function(){this._posNode.addClass(B.POSITIONED_CLASS_NAME);},_syncUIPosition:function(){this._uiSetXY(this.get(K));},_bindUIPosition:function(){this.after(E,this._afterXYChange);},move:function(){var M=arguments,N=(H.isArray(M[0]))?M[0]:[M[0],M[1]];this.set(K,N);},syncXY:function(){this.set(K,this._posNode.getXY(),{src:C});},_validateXY:function(M){return(H.isArray(M)&&H.isNumber(M[0])&&H.isNumber(M[1]));},_setX:function(M){this.set(K,[M,this.get(K)[1]]);},_setY:function(M){this.set(K,[this.get(K)[0],M]);},_getX:function(){return this.get(K)[0];},_getY:function(){return this.get(K)[1];},_afterXYChange:function(M){if(M.src!=C){this._uiSetXY(M.newVal);}},_uiSetXY:function(M){this._posNode.setXY(M);}};A.WidgetPosition=B;},"3.0.0",{requires:["widget"]}); \ No newline at end of file +YUI.add("widget-position",function(A){var I=A.Lang,L=A.Widget,N="xy",J="position",G="positioned",K="boundingBox",H="relative",M="renderUI",F="bindUI",D="syncUI",C=L.UI_SRC,E="xyChange";function B(O){this._posNode=this.get(K);A.after(this._renderUIPosition,this,M);A.after(this._syncUIPosition,this,D);A.after(this._bindUIPosition,this,F);}B.ATTRS={x:{setter:function(O){this._setX(O);},getter:function(){return this._getX();},lazyAdd:false},y:{setter:function(O){this._setY(O);},getter:function(){return this._getY();},lazyAdd:false},xy:{value:[0,0],validator:function(O){return this._validateXY(O);}}};B.POSITIONED_CLASS_NAME=L.getClassName(G);B.prototype={_renderUIPosition:function(){this._posNode.addClass(B.POSITIONED_CLASS_NAME);},_syncUIPosition:function(){var O=this._posNode;if(O.getStyle(J)===H){this.syncXY();}this._uiSetXY(this.get(N));},_bindUIPosition:function(){this.after(E,this._afterXYChange);},move:function(){var O=arguments,P=(I.isArray(O[0]))?O[0]:[O[0],O[1]];this.set(N,P);},syncXY:function(){this.set(N,this._posNode.getXY(),{src:C});},_validateXY:function(O){return(I.isArray(O)&&I.isNumber(O[0])&&I.isNumber(O[1]));},_setX:function(O){this.set(N,[O,this.get(N)[1]]);},_setY:function(O){this.set(N,[this.get(N)[0],O]);},_getX:function(){return this.get(N)[0];},_getY:function(){return this.get(N)[1];},_afterXYChange:function(O){if(O.src!=C){this._uiSetXY(O.newVal);}},_uiSetXY:function(O){this._posNode.setXY(O);}};A.WidgetPosition=B;},"3.3.0",{requires:["base-build","node-screen","widget"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-position.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-position.js index 1d95a245..dd9995ce 100644 --- a/jssource/src_files/include/javascript/yui3/build/widget/widget-position.js +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-position.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('widget-position', function(Y) { @@ -17,8 +17,10 @@ YUI.add('widget-position', function(Y) { XY_COORD = "xy", + POSITION = "position", POSITIONED = "positioned", BOUNDING_BOX = "boundingBox", + RELATIVE = "relative", RENDERUI = "renderUI", BINDUI = "bindUI", @@ -66,10 +68,10 @@ YUI.add('widget-position', function(Y) { setter: function(val) { this._setX(val); }, - lazyAdd:false, getter: function() { return this._getX(); - } + }, + lazyAdd:false }, /** @@ -84,12 +86,12 @@ YUI.add('widget-position', function(Y) { setter: function(val) { this._setY(val); }, - lazyAdd: false, getter: function() { return this._getY(); - } + }, + lazyAdd: false }, - + /** * @attribute xy * @type Array @@ -99,7 +101,6 @@ YUI.add('widget-position', function(Y) { */ xy: { value:[0,0], - validator: function(val) { return this._validateXY(val); } @@ -141,6 +142,10 @@ YUI.add('widget-position', function(Y) { * @protected */ _syncUIPosition : function() { + var posNode = this._posNode; + if (posNode.getStyle(POSITION) === RELATIVE) { + this.syncXY(); + } this._uiSetXY(this.get(XY_COORD)); }, @@ -269,4 +274,4 @@ YUI.add('widget-position', function(Y) { Y.WidgetPosition = Position; -}, '3.0.0' ,{requires:['widget']}); +}, '3.3.0' ,{requires:['base-build', 'node-screen', 'widget']}); diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-skin-min.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-skin-min.js new file mode 100644 index 00000000..daddac29 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-skin-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("widget-skin",function(e){var d="boundingBox",b="contentBox",a="skin",c=e.ClassNameManager.getClassName;e.Widget.prototype.getSkinName=function(){var f=this.get(b)||this.get(d),h=new RegExp("\\b"+c(a)+"-(\\S+)"),g;if(f){f.ancestor(function(i){g=i.get("className").match(h);return g;});}return(g)?g[1]:null;};},"3.3.0",{requires:["widget-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-skin.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-skin.js new file mode 100644 index 00000000..e983c9ae --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-skin.js @@ -0,0 +1,50 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('widget-skin', function(Y) { + +/** + * Provides skin related utlility methods. + * + * @module widget + * @submodule widget-skin + */ + +var BOUNDING_BOX = "boundingBox", + CONTENT_BOX = "contentBox", + SKIN = "skin", + _getClassName = Y.ClassNameManager.getClassName; + +/** + * Returns the name of the skin that's currently applied to the widget. + * This is only really useful after the widget's DOM structure is in the + * document, either by render or by progressive enhancement. Searches up + * the Widget's ancestor axis for a class yui3-skin-(name), and returns the + * (name) portion. Otherwise, returns null. + * + * @method getSkinName + * @for Widget + * @return {String} the name of the skin, or null (yui3-skin-sam => sam) + */ + +Y.Widget.prototype.getSkinName = function () { + var root = this.get( CONTENT_BOX ) || this.get( BOUNDING_BOX ), + search = new RegExp( '\\b' + _getClassName( SKIN ) + '-(\\S+)' ), + match; + + if ( root ) { + root.ancestor( function ( node ) { + match = node.get( 'className' ).match( search ); + return match; + } ); + } + + return ( match ) ? match[1] : null; +}; + + +}, '3.3.0' ,{requires:['widget-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-stack-min.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-stack-min.js index e9d5f3b2..8d3160dc 100644 --- a/jssource/src_files/include/javascript/yui3/build/widget/widget-stack-min.js +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-stack-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("widget-stack",function(E){var N=E.Lang,T=E.UA,d=E.Node,F=E.Widget,c="zIndex",P="shim",a="visible",e="boundingBox",W="renderUI",G="bindUI",S="syncUI",Q="offsetWidth",D="offsetHeight",M="parentNode",A="firstChild",X="ownerDocument",H="width",V="height",K="px",O="shimdeferred",f="shimresize",Z="visibleChange",C="widthChange",J="heightChange",b="shimChange",B="zIndexChange",I="contentUpdate",R="stacked";function U(L){this._stackNode=this.get(e);this._stackHandles={};E.after(this._renderUIStack,this,W);E.after(this._syncUIStack,this,S);E.after(this._bindUIStack,this,G);}U.ATTRS={shim:{value:(T.ie==6)},zIndex:{value:0,setter:function(L){return this._setZIndex(L);}}};U.HTML_PARSER={zIndex:function(L){return L.getStyle(c);}};U.SHIM_CLASS_NAME=F.getClassName(P);U.STACKED_CLASS_NAME=F.getClassName(R);U.SHIM_TEMPLATE='';U.prototype={_syncUIStack:function(){this._uiSetShim(this.get(P));this._uiSetZIndex(this.get(c));},_bindUIStack:function(){this.after(b,this._afterShimChange);this.after(B,this._afterZIndexChange);},_renderUIStack:function(){this._stackNode.addClass(U.STACKED_CLASS_NAME);},_setZIndex:function(L){if(N.isString(L)){L=parseInt(L,10);}if(!N.isNumber(L)){L=0;}return L;},_afterShimChange:function(L){this._uiSetShim(L.newVal);},_afterZIndexChange:function(L){this._uiSetZIndex(L.newVal);},_uiSetZIndex:function(L){this._stackNode.setStyle(c,L);},_uiSetShim:function(L){if(L){if(this.get(a)){this._renderShim();}else{this._renderShimDeferred();}}else{this._destroyShim();}},_renderShimDeferred:function(){this._stackHandles[O]=this._stackHandles[O]||[];var Y=this._stackHandles[O],L=function(g){if(g.newVal){this._renderShim();}};Y.push(this.on(Z,L));},_addShimResizeHandlers:function(){this._stackHandles[f]=this._stackHandles[f]||[];var Y=this.sizeShim,L=this._stackHandles[f];this.sizeShim();L.push(this.after(Z,Y));L.push(this.after(C,Y));L.push(this.after(J,Y));L.push(this.after(I,Y));},_detachStackHandles:function(L){var Y=this._stackHandles[L],g;if(Y&&Y.length>0){while((g=Y.pop())){g.detach();}}},_renderShim:function(){var L=this._shimNode,Y=this._stackNode;if(!L){L=this._shimNode=this._getShimTemplate();Y.insertBefore(L,Y.get(A));if(T.ie==6){this._addShimResizeHandlers();}this._detachStackHandles(O);}},_destroyShim:function(){if(this._shimNode){this._shimNode.get(M).removeChild(this._shimNode);this._shimNode=null;this._detachStackHandles(O);this._detachStackHandles(f);}},sizeShim:function(){var Y=this._shimNode,L=this._stackNode;if(Y&&T.ie===6&&this.get(a)){Y.setStyle(H,L.get(Q)+K);Y.setStyle(V,L.get(D)+K);}},_getShimTemplate:function(){return d.create(U.SHIM_TEMPLATE,this._stackNode.get(X));}};E.WidgetStack=U;},"3.0.0",{requires:["widget"]}); \ No newline at end of file +YUI.add("widget-stack",function(E){var N=E.Lang,T=E.UA,d=E.Node,F=E.Widget,c="zIndex",P="shim",a="visible",e="boundingBox",W="renderUI",G="bindUI",S="syncUI",Q="offsetWidth",D="offsetHeight",M="parentNode",A="firstChild",X="ownerDocument",H="width",V="height",K="px",O="shimdeferred",f="shimresize",Z="visibleChange",C="widthChange",J="heightChange",b="shimChange",B="zIndexChange",I="contentUpdate",R="stacked";function U(L){this._stackNode=this.get(e);this._stackHandles={};E.after(this._renderUIStack,this,W);E.after(this._syncUIStack,this,S);E.after(this._bindUIStack,this,G);}U.ATTRS={shim:{value:(T.ie==6)},zIndex:{value:0,setter:function(L){return this._setZIndex(L);}}};U.HTML_PARSER={zIndex:function(L){return L.getStyle(c);}};U.SHIM_CLASS_NAME=F.getClassName(P);U.STACKED_CLASS_NAME=F.getClassName(R);U.SHIM_TEMPLATE='';U.prototype={_syncUIStack:function(){this._uiSetShim(this.get(P));this._uiSetZIndex(this.get(c));},_bindUIStack:function(){this.after(b,this._afterShimChange);this.after(B,this._afterZIndexChange);},_renderUIStack:function(){this._stackNode.addClass(U.STACKED_CLASS_NAME);},_setZIndex:function(L){if(N.isString(L)){L=parseInt(L,10);}if(!N.isNumber(L)){L=0;}return L;},_afterShimChange:function(L){this._uiSetShim(L.newVal);},_afterZIndexChange:function(L){this._uiSetZIndex(L.newVal);},_uiSetZIndex:function(L){this._stackNode.setStyle(c,L);},_uiSetShim:function(L){if(L){if(this.get(a)){this._renderShim();}else{this._renderShimDeferred();}}else{this._destroyShim();}},_renderShimDeferred:function(){this._stackHandles[O]=this._stackHandles[O]||[];var Y=this._stackHandles[O],L=function(g){if(g.newVal){this._renderShim();}};Y.push(this.on(Z,L));},_addShimResizeHandlers:function(){this._stackHandles[f]=this._stackHandles[f]||[];var Y=this.sizeShim,L=this._stackHandles[f];this.sizeShim();L.push(this.after(Z,Y));L.push(this.after(C,Y));L.push(this.after(J,Y));L.push(this.after(I,Y));},_detachStackHandles:function(L){var Y=this._stackHandles[L],g;if(Y&&Y.length>0){while((g=Y.pop())){g.detach();}}},_renderShim:function(){var L=this._shimNode,Y=this._stackNode;if(!L){L=this._shimNode=this._getShimTemplate();Y.insertBefore(L,Y.get(A));if(T.ie==6){this._addShimResizeHandlers();}this._detachStackHandles(O);}},_destroyShim:function(){if(this._shimNode){this._shimNode.get(M).removeChild(this._shimNode);this._shimNode=null;this._detachStackHandles(O);this._detachStackHandles(f);}},sizeShim:function(){var Y=this._shimNode,L=this._stackNode;if(Y&&T.ie===6&&this.get(a)){Y.setStyle(H,L.get(Q)+K);Y.setStyle(V,L.get(D)+K);}},_getShimTemplate:function(){return d.create(U.SHIM_TEMPLATE,this._stackNode.get(X));}};E.WidgetStack=U;},"3.3.0",{requires:["base-build","widget"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-stack.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-stack.js index f1c8dfbe..f01432d6 100644 --- a/jssource/src_files/include/javascript/yui3/build/widget/widget-stack.js +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-stack.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('widget-stack', function(Y) { @@ -400,4 +400,4 @@ YUI.add('widget-stack', function(Y) { Y.WidgetStack = Stack; -}, '3.0.0' ,{requires:['widget']}); +}, '3.3.0' ,{requires:['base-build', 'widget']}); diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-stdmod-min.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-stdmod-min.js index ec92db89..32419c8e 100644 --- a/jssource/src_files/include/javascript/yui3/build/widget/widget-stdmod-min.js +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-stdmod-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("widget-stdmod",function(A){var D=A.Lang,P=A.Node,c=A.NodeList,W=A.UA,C=A.Widget,B="",j="hd",h="bd",H="ft",e="header",m="body",k="footer",q="fillHeight",K="stdmod",t="px",T="Node",i="Content",o="innerHTML",d="firstChild",G="childNodes",l="createDocumentFragment",M="ownerDocument",U="contentBox",p="boundingBox",Z="height",g="offsetHeight",X="auto",J="headerContentChange",b="bodyContentChange",N="footerContentChange",R="fillHeightChange",S="HeightChange",r="contentUpdate",V="renderUI",f="bindUI",E="syncUI",Q=A.Widget.UI_SRC;function s(L){this._stdModNode=this.get(U);A.after(this._renderUIStdMod,this,V);A.after(this._bindUIStdMod,this,f);A.after(this._syncUIStdMod,this,E);}s.HEADER=e;s.BODY=m;s.FOOTER=k;s.AFTER="after";s.BEFORE="before";s.REPLACE="replace";var I=s.HEADER,a=s.BODY,O=s.FOOTER,n=s.AFTER,F=s.BEFORE;s.ATTRS={headerContent:{value:null},footerContent:{value:null},bodyContent:{value:null},fillHeight:{value:s.BODY,validator:function(L){return this._validateFillHeight(L);}}};s.HTML_PARSER={headerContent:function(L){return this._parseStdModHTML(I);},bodyContent:function(L){return this._parseStdModHTML(a);},footerContent:function(L){return this._parseStdModHTML(O);}};s.SECTION_CLASS_NAMES={header:C.getClassName(j),body:C.getClassName(h),footer:C.getClassName(H)};s.TEMPLATES={header:'
            ',body:'
            ',footer:'
            '};s.prototype={_syncUIStdMod:function(){this._uiSetStdMod(I,this.get(I+i));this._uiSetStdMod(a,this.get(a+i));this._uiSetStdMod(O,this.get(O+i));this._uiSetFillHeight(this.get(q));},_renderUIStdMod:function(){this._stdModNode.addClass(C.getClassName(K));},_bindUIStdMod:function(){this.after(J,this._afterHeaderChange);this.after(b,this._afterBodyChange);this.after(N,this._afterFooterChange);this.after(R,this._afterFillHeightChange);this.after(S,this._fillHeight);this.after(r,this._fillHeight);},_afterHeaderChange:function(L){if(L.src!==Q){this._uiSetStdMod(I,L.newVal,L.stdModPosition);}},_afterBodyChange:function(L){if(L.src!==Q){this._uiSetStdMod(a,L.newVal,L.stdModPosition);}},_afterFooterChange:function(L){if(L.src!==Q){this._uiSetStdMod(O,L.newVal,L.stdModPosition);}},_afterFillHeightChange:function(L){this._uiSetFillHeight(L.newVal);},_validateFillHeight:function(L){return !L||L==s.BODY||L==s.HEADER||L==s.FOOTER;},_uiSetFillHeight:function(u){var Y=this.getStdModNode(u);var L=this._currFillNode;if(L&&Y!==L){L.setStyle(Z,B);}if(Y){this._currFillNode=Y;}this._fillHeight();},_fillHeight:function(){if(this.get(q)){var L=this.get(Z);if(L!=B&&L!=X){this.fillHeight(this._currFillNode);}}},_uiSetStdMod:function(v,u,L){if(u){var Y=this.getStdModNode(v)||this._renderStdMod(v);if(u instanceof P||u instanceof c){this._addNodeRef(Y,u,L);}else{this._addNodeHTML(Y,u,L);}this.set(v+i,this._getStdModContent(v),{src:Q});this.fire(r);}},_renderStdMod:function(u){var L=this.get(U),Y=this._findStdModSection(u);if(!Y){Y=this._getStdModTemplate(u);}this._insertStdModSection(L,u,Y);this[u+T]=Y;return this[u+T];},_insertStdModSection:function(L,v,u){var Y=L.get(d);if(v===O||!Y){L.appendChild(u);}else{if(v===I){L.insertBefore(u,Y);}else{var w=this[O+T];if(w){L.insertBefore(u,w);}else{L.appendChild(u);}}}},_getStdModTemplate:function(L){return P.create(s.TEMPLATES[L],this._stdModNode.get(M));},_addNodeHTML:function(u,Y,L){if(L==n){u.set(o,u.get(o)+Y);}else{if(L==F){u.set(o,Y+u.get(o));}else{u.set(o,Y);}}},_addNodeRef:function(x,v,Y){var L=true,u,w;if(Y==F){var y=x.get(d);if(y){if(v instanceof c){for(u=v.size()-1;u>=0;--u){x.insertBefore(v.item(u),y);}}else{x.insertBefore(v,y);}L=false;}}else{if(Y!=n){x.set(o,B);}}if(L){if(v instanceof c){for(u=0,w=v.size();u ."+s.SECTION_CLASS_NAMES[L]);},_parseStdModHTML:function(x){var w=this._findStdModSection(x),u,Y;if(w){u=w.get(M).invoke(l);Y=w.get(G);for(var L=Y.size()-1;L>=0;L--){var v=u.get(d);if(v){u.insertBefore(Y.item(L),v);}else{u.appendChild(Y.item(L));}}return u;}return null;},_getStdModContent:function(L){return(this[L+T])?this[L+T].get(G):null;},setStdModContent:function(u,Y,L){this.set(u+i,Y,{stdModPosition:L});},getStdModNode:function(L){return this[L+T]||null;},fillHeight:function(u){if(u){var y=this.get(p),AA=[this.headerNode,this.bodyNode,this.footerNode],Y,AB=0,AC=0,x=0,w=false;for(var z=0,v=AA.length;z=0){u.setStyle(Z,x+t);}var L=this.get(U).get(g);if(L!=AB){x=x-(L-AB);u.setStyle(Z,x+t);}}}}}};A.WidgetStdMod=s;},"3.0.0",{requires:["widget"]}); \ No newline at end of file +YUI.add("widget-stdmod",function(b){var f=b.Lang,q=b.Node,x=b.UA,e=b.Widget,d="",J="hd",G="bd",j="ft",D="header",M="body",K="footer",N="fillHeight",m="stdmod",u="Node",I="Content",C="firstChild",h="childNodes",n="ownerDocument",v="contentBox",z="height",F="offsetHeight",y="auto",l="headerContentChange",B="bodyContentChange",o="footerContentChange",r="fillHeightChange",t="heightChange",O="contentUpdate",w="renderUI",E="bindUI",g="syncUI",H="_applyParsedConfig",s=b.Widget.UI_SRC;function P(L){this._stdModNode=this.get(v);b.before(this._renderUIStdMod,this,w);b.before(this._bindUIStdMod,this,E);b.before(this._syncUIStdMod,this,g);}P.HEADER=D;P.BODY=M;P.FOOTER=K;P.AFTER="after";P.BEFORE="before";P.REPLACE="replace";var k=P.HEADER,A=P.BODY,p=P.FOOTER,a=k+I,c=p+I,i=A+I;P.ATTRS={headerContent:{value:null},footerContent:{value:null},bodyContent:{value:null},fillHeight:{value:P.BODY,validator:function(L){return this._validateFillHeight(L);}}};P.HTML_PARSER={headerContent:function(L){return this._parseStdModHTML(k);},bodyContent:function(L){return this._parseStdModHTML(A);},footerContent:function(L){return this._parseStdModHTML(p);}};P.SECTION_CLASS_NAMES={header:e.getClassName(J),body:e.getClassName(G),footer:e.getClassName(j)};P.TEMPLATES={header:'
            ',body:'
            ',footer:'
            '};P.prototype={_syncUIStdMod:function(){var L=this._stdModParsed;if(!L||!L[a]){this._uiSetStdMod(k,this.get(a));}if(!L||!L[i]){this._uiSetStdMod(A,this.get(i));}if(!L||!L[c]){this._uiSetStdMod(p,this.get(c));}this._uiSetFillHeight(this.get(N));},_renderUIStdMod:function(){this._stdModNode.addClass(e.getClassName(m));this._renderStdModSections();},_renderStdModSections:function(){if(f.isValue(this.get(a))){this._renderStdMod(k);}if(f.isValue(this.get(i))){this._renderStdMod(A);}if(f.isValue(this.get(c))){this._renderStdMod(p);}},_bindUIStdMod:function(){this.after(l,this._afterHeaderChange);this.after(B,this._afterBodyChange);this.after(o,this._afterFooterChange);this.after(r,this._afterFillHeightChange);this.after(t,this._fillHeight);this.after(O,this._fillHeight);},_afterHeaderChange:function(L){if(L.src!==s){this._uiSetStdMod(k,L.newVal,L.stdModPosition);}},_afterBodyChange:function(L){if(L.src!==s){this._uiSetStdMod(A,L.newVal,L.stdModPosition);}},_afterFooterChange:function(L){if(L.src!==s){this._uiSetStdMod(p,L.newVal,L.stdModPosition);}},_afterFillHeightChange:function(L){this._uiSetFillHeight(L.newVal);},_validateFillHeight:function(L){return !L||L==P.BODY||L==P.HEADER||L==P.FOOTER;},_uiSetFillHeight:function(R){var Q=this.getStdModNode(R);var L=this._currFillNode;if(L&&Q!==L){L.setStyle(z,d);}if(Q){this._currFillNode=Q;}this._fillHeight();},_fillHeight:function(){if(this.get(N)){var L=this.get(z);if(L!=d&&L!=y){this.fillHeight(this._currFillNode);}}},_uiSetStdMod:function(S,R,L){if(f.isValue(R)){var Q=this.getStdModNode(S)||this._renderStdMod(S);this._addStdModContent(Q,R,L);this.set(S+I,this._getStdModContent(S),{src:s});}else{this._eraseStdMod(S);}this.fire(O);},_renderStdMod:function(R){var L=this.get(v),Q=this._findStdModSection(R);if(!Q){Q=this._getStdModTemplate(R);}this._insertStdModSection(L,R,Q);this[R+u]=Q;return this[R+u];},_eraseStdMod:function(Q){var L=this.getStdModNode(Q);if(L){L.remove(true);delete this[Q+u];}},_insertStdModSection:function(L,S,R){var Q=L.get(C);if(S===p||!Q){L.appendChild(R);}else{if(S===k){L.insertBefore(R,Q);}else{var T=this[p+u];if(T){L.insertBefore(R,T);}else{L.appendChild(R);}}}},_getStdModTemplate:function(L){return q.create(P.TEMPLATES[L],this._stdModNode.get(n));},_addStdModContent:function(R,Q,L){switch(L){case P.BEFORE:L=0;break;case P.AFTER:L=undefined;break;default:L=P.REPLACE;}R.insert(Q,L);},_getPreciseHeight:function(R){var L=(R)?R.get(F):0,S="getBoundingClientRect";if(R&&R.hasMethod(S)){var Q=R.invoke(S);if(Q){L=Q.bottom-Q.top;}}return L;},_findStdModSection:function(L){return this.get(v).one("> ."+P.SECTION_CLASS_NAMES[L]);},_parseStdModHTML:function(Q){var L=this._findStdModSection(Q);if(L){if(!this._stdModParsed){this._stdModParsed={};b.before(this._applyStdModParsedConfig,this,H);}this._stdModParsed[Q+I]=1;return L.get("innerHTML");}return null;},_applyStdModParsedConfig:function(S,L,R){var Q=this._stdModParsed;if(Q){Q[a]=!(a in L)&&(a in Q);Q[i]=!(i in L)&&(i in Q);Q[c]=!(c in L)&&(c in Q);}},_getStdModContent:function(L){return(this[L+u])?this[L+u].get(h):null;},setStdModContent:function(R,Q,L){this.set(R+I,Q,{stdModPosition:L});},getStdModNode:function(L){return this[L+u]||null;},fillHeight:function(Q){if(Q){var V=this.get(v),W=[this.headerNode,this.bodyNode,this.footerNode],L,X,Y=0,T=0,S=false;for(var U=0,R=W.length;U=0){Q.set(F,T);}}}}}};b.WidgetStdMod=P;},"3.3.0",{requires:["base-build","widget"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-stdmod.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-stdmod.js index 4c2c8964..e224bb8d 100644 --- a/jssource/src_files/include/javascript/yui3/build/widget/widget-stdmod.js +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-stdmod.js @@ -1,9 +1,9 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ YUI.add('widget-stdmod', function(Y) { @@ -14,7 +14,6 @@ YUI.add('widget-stdmod', function(Y) { */ var L = Y.Lang, Node = Y.Node, - NodeList = Y.NodeList, UA = Y.UA, Widget = Y.Widget, @@ -27,18 +26,15 @@ YUI.add('widget-stdmod', function(Y) { FOOTER = "footer", FILL_HEIGHT = "fillHeight", STDMOD = "stdmod", - - PX = "px", + NODE_SUFFIX = "Node", CONTENT_SUFFIX = "Content", - INNER_HTML = "innerHTML", + FIRST_CHILD = "firstChild", CHILD_NODES = "childNodes", - CREATE_DOCUMENT_FRAGMENT = "createDocumentFragment", OWNER_DOCUMENT = "ownerDocument", CONTENT_BOX = "contentBox", - BOUNDING_BOX = "boundingBox", HEIGHT = "height", OFFSET_HEIGHT = "offsetHeight", @@ -48,13 +44,15 @@ YUI.add('widget-stdmod', function(Y) { BodyChange = "bodyContentChange", FooterChange = "footerContentChange", FillHeightChange = "fillHeightChange", - HeightChange = "HeightChange", + HeightChange = "heightChange", ContentUpdate = "contentUpdate", RENDERUI = "renderUI", BINDUI = "bindUI", SYNCUI = "syncUI", + APPLY_PARSED_CONFIG = "_applyParsedConfig", + UI = Y.Widget.UI_SRC; /** @@ -72,9 +70,9 @@ YUI.add('widget-stdmod', function(Y) { this._stdModNode = this.get(CONTENT_BOX); - Y.after(this._renderUIStdMod, this, RENDERUI); - Y.after(this._bindUIStdMod, this, BINDUI); - Y.after(this._syncUIStdMod, this, SYNCUI); + Y.before(this._renderUIStdMod, this, RENDERUI); + Y.before(this._bindUIStdMod, this, BINDUI); + Y.before(this._syncUIStdMod, this, SYNCUI); } /** @@ -85,6 +83,7 @@ YUI.add('widget-stdmod', function(Y) { * @type String */ StdMod.HEADER = HEADER; + /** * Constant used to refer the the standard module body, in methods which expect a section specifier * @@ -93,6 +92,7 @@ YUI.add('widget-stdmod', function(Y) { * @type String */ StdMod.BODY = BODY; + /** * Constant used to refer the the standard module footer, in methods which expect a section specifier * @@ -140,8 +140,10 @@ YUI.add('widget-stdmod', function(Y) { var STD_HEADER = StdMod.HEADER, STD_BODY = StdMod.BODY, STD_FOOTER = StdMod.FOOTER, - AFTER = StdMod.AFTER, - BEFORE = StdMod.BEFORE; + + HEADER_CONTENT = STD_HEADER + CONTENT_SUFFIX, + FOOTER_CONTENT = STD_FOOTER + CONTENT_SUFFIX, + BODY_CONTENT = STD_BODY + CONTENT_SUFFIX; /** * Static property used to define the default attribute @@ -271,9 +273,20 @@ YUI.add('widget-stdmod', function(Y) { * @protected */ _syncUIStdMod : function() { - this._uiSetStdMod(STD_HEADER, this.get(STD_HEADER + CONTENT_SUFFIX)); - this._uiSetStdMod(STD_BODY, this.get(STD_BODY + CONTENT_SUFFIX)); - this._uiSetStdMod(STD_FOOTER, this.get(STD_FOOTER + CONTENT_SUFFIX)); + var stdModParsed = this._stdModParsed; + + if (!stdModParsed || !stdModParsed[HEADER_CONTENT]) { + this._uiSetStdMod(STD_HEADER, this.get(HEADER_CONTENT)); + } + + if (!stdModParsed || !stdModParsed[BODY_CONTENT]) { + this._uiSetStdMod(STD_BODY, this.get(BODY_CONTENT)); + } + + if (!stdModParsed || !stdModParsed[FOOTER_CONTENT]) { + this._uiSetStdMod(STD_FOOTER, this.get(FOOTER_CONTENT)); + } + this._uiSetFillHeight(this.get(FILL_HEIGHT)); }, @@ -288,6 +301,13 @@ YUI.add('widget-stdmod', function(Y) { */ _renderUIStdMod : function() { this._stdModNode.addClass(Widget.getClassName(STDMOD)); + this._renderStdModSections(); + }, + + _renderStdModSections : function() { + if (L.isValue(this.get(HEADER_CONTENT))) { this._renderStdMod(STD_HEADER); } + if (L.isValue(this.get(BODY_CONTENT))) { this._renderStdMod(STD_BODY); } + if (L.isValue(this.get(FOOTER_CONTENT))) { this._renderStdMod(STD_FOOTER); } }, /** @@ -433,16 +453,17 @@ YUI.add('widget-stdmod', function(Y) { * If not provided, the content will replace existing content in the section. */ _uiSetStdMod : function(section, content, where) { - if (content) { + // Using isValue, so that "" is valid content + if (L.isValue(content)) { var node = this.getStdModNode(section) || this._renderStdMod(section); - if (content instanceof Node || content instanceof NodeList) { - this._addNodeRef(node, content, where); - } else { - this._addNodeHTML(node, content, where); - } + + this._addStdModContent(node, content, where); + this.set(section + CONTENT_SUFFIX, this._getStdModContent(section), {src:UI}); - this.fire(ContentUpdate); + } else { + this._eraseStdMod(section); } + this.fire(ContentUpdate); }, /** @@ -468,6 +489,21 @@ YUI.add('widget-stdmod', function(Y) { return this[section + NODE_SUFFIX]; }, + /** + * Removes the DOM node for the given section. + * + * @method _eraseStdMod + * @protected + * @param {String} section The section to remove. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER. + */ + _eraseStdMod : function(section) { + var sectionNode = this.getStdModNode(section); + if (sectionNode) { + sectionNode.remove(true); + delete this[section + NODE_SUFFIX]; + } + }, + /** * Helper method to insert the Node for the given section into the correct location in the contentBox. * @@ -486,7 +522,6 @@ YUI.add('widget-stdmod', function(Y) { if (section === STD_HEADER) { contentBox.insertBefore(sectionNode, fc); } else { - // BODY var footer = this[STD_FOOTER + NODE_SUFFIX]; if (footer) { contentBox.insertBefore(sectionNode, footer); @@ -511,70 +546,33 @@ YUI.add('widget-stdmod', function(Y) { }, /** - * Helper method to add the given HTML string to the node reference provided. - * The HTML is added either before, after or replaces the existing node content - * based on the value of the where argument. - * - * @method _addNodeHTML - * @private - * - * @param {Node} node The section Node to be updated. - * @param {String} html The new content HTML string to be added to the section Node. - * @param {String} where Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE. - * If not provided, the content will replace Nodes existing content. - */ - _addNodeHTML : function(node, html, where) { - if (where == AFTER) { - node.set(INNER_HTML, node.get(INNER_HTML) + html); - } else if (where == BEFORE) { - node.set(INNER_HTML, html + node.get(INNER_HTML)); - } else { - node.set(INNER_HTML, html); - } - }, - - /** - * Helper method to add nodes, to another node. - * The child node(s) are added either before, after or replaces the existing node content + * Helper method to add content to a StdMod section node. + * The content is added either before, after or replaces the existing node content * based on the value of the where argument. * - * @method _addNodeRef + * @method _addStdModContent * @private * * @param {Node} node The section Node to be updated. - * @param {Node|NodeList} children The new content Node, or NodeList to be added to section Node provided. + * @param {Node|NodeList|String} children The new content Node, NodeList or String to be added to section Node provided. * @param {String} where Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE. * If not provided, the content will replace existing content in the Node. */ - _addNodeRef : function(node, children, where) { - var append = true, - i, s; - - if (where == BEFORE) { - var n = node.get(FIRST_CHILD); - if (n) { - if (children instanceof NodeList) { - for (i = children.size() - 1; i >=0; --i) { - node.insertBefore(children.item(i), n); - } - } else { - node.insertBefore(children, n); - } - append = false; - } - } else if (where != AFTER) { // replace - node.set(INNER_HTML, EMPTY); + _addStdModContent : function(node, children, where) { + + // StdMod where to Node where + switch (where) { + case StdMod.BEFORE: // 0 is before fistChild + where = 0; + break; + case StdMod.AFTER: // undefined is appendChild + where = undefined; + break; + default: // replace is replace, not specified is replace + where = StdMod.REPLACE; } - if (append) { - if (children instanceof NodeList) { - for (i = 0, s = children.size(); i < s; ++i) { - node.appendChild(children.item(i)); - } - } else { - node.appendChild(children); - } - } + node.insert(children, where); }, /** @@ -601,8 +599,8 @@ YUI.add('widget-stdmod', function(Y) { }, /** - * Helper method to query the rendered contents of the contentBox to find the - * node for the given section if it exists. + * Helper method to to find the rendered node for the given section, + * if it exists. * * @method _findStdModSection * @private @@ -610,7 +608,7 @@ YUI.add('widget-stdmod', function(Y) { * @return {Node} The rendered node for the given section, or null if not found. */ _findStdModSection: function(section) { - return this.get(CONTENT_BOX).query("> ." + StdMod.SECTION_CLASS_NAMES[section]); + return this.get(CONTENT_BOX).one("> ." + StdMod.SECTION_CLASS_NAMES[section]); }, /** @@ -623,28 +621,41 @@ YUI.add('widget-stdmod', function(Y) { * @return {String} Inner HTML string with the contents of the section */ _parseStdModHTML : function(section) { - var node = this._findStdModSection(section), - docFrag, children; - if (node) { - docFrag = node.get(OWNER_DOCUMENT).invoke(CREATE_DOCUMENT_FRAGMENT); - children = node.get(CHILD_NODES); + var node = this._findStdModSection(section); - for (var i = children.size() - 1; i >= 0; i--) { - var fc = docFrag.get(FIRST_CHILD); - if (fc) { - docFrag.insertBefore(children.item(i), fc); - } else { - docFrag.appendChild(children.item(i)); - } + if (node) { + if (!this._stdModParsed) { + this._stdModParsed = {}; + Y.before(this._applyStdModParsedConfig, this, APPLY_PARSED_CONFIG); } + this._stdModParsed[section + CONTENT_SUFFIX] = 1; - return docFrag; + return node.get("innerHTML"); } return null; }, + /** + * This method is injected before the _applyParsedConfig step in + * the application of HTML_PARSER, and sets up the state to + * identify whether or not we should remove the current DOM content + * or not, based on whether or not the current content attribute value + * was extracted from the DOM, or provided by the user configuration + * + * @method _applyStdModParsedConfig + * @private + */ + _applyStdModParsedConfig : function(node, cfg, parsedCfg) { + var parsed = this._stdModParsed; + if (parsed) { + parsed[HEADER_CONTENT] = !(HEADER_CONTENT in cfg) && (HEADER_CONTENT in parsed); + parsed[BODY_CONTENT] = !(BODY_CONTENT in cfg) && (BODY_CONTENT in parsed); + parsed[FOOTER_CONTENT] = !(FOOTER_CONTENT in cfg) && (FOOTER_CONTENT in parsed); + } + }, + /** * Retrieves the child nodes (content) of a standard module section * @@ -704,12 +715,13 @@ YUI.add('widget-stdmod', function(Y) { */ fillHeight : function(node) { if (node) { - var boundingBox = this.get(BOUNDING_BOX), + var contentBox = this.get(CONTENT_BOX), stdModNodes = [this.headerNode, this.bodyNode, this.footerNode], stdModNode, - total = 0, + cbContentHeight, filled = 0, remaining = 0, + validNode = false; for (var i = 0, l = stdModNodes.length; i < l; i++) { @@ -726,22 +738,19 @@ YUI.add('widget-stdmod', function(Y) { if (validNode) { if (UA.ie || UA.opera) { // Need to set height to 0, to allow height to be reduced - node.setStyle(HEIGHT, 0 + PX); + node.set(OFFSET_HEIGHT, 0); } - total = parseInt(boundingBox.getComputedStyle(HEIGHT), 10); - if (L.isNumber(total)) { - remaining = total - filled; + cbContentHeight = contentBox.get(OFFSET_HEIGHT) - + parseInt(contentBox.getComputedStyle("paddingTop"), 10) - + parseInt(contentBox.getComputedStyle("paddingBottom"), 10) - + parseInt(contentBox.getComputedStyle("borderBottomWidth"), 10) - + parseInt(contentBox.getComputedStyle("borderTopWidth"), 10); + if (L.isNumber(cbContentHeight)) { + remaining = cbContentHeight - filled; if (remaining >= 0) { - node.setStyle(HEIGHT, remaining + PX); - } - - // Re-adjust height if required, to account for el padding and border - var offsetHeight = this.get(CONTENT_BOX).get(OFFSET_HEIGHT); - if (offsetHeight != total) { - remaining = remaining - (offsetHeight - total); - node.setStyle(HEIGHT, remaining + PX); + node.set(OFFSET_HEIGHT, remaining); } } } @@ -752,4 +761,4 @@ YUI.add('widget-stdmod', function(Y) { Y.WidgetStdMod = StdMod; -}, '3.0.0' ,{requires:['widget']}); +}, '3.3.0' ,{requires:['base-build', 'widget']}); diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-uievents-min.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-uievents-min.js new file mode 100644 index 00000000..f4fa140c --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-uievents-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("widget-uievents",function(g){var f="boundingBox",e=g.Widget,d="render",a=g.Lang,c=":",b=g.Widget._uievts=g.Widget._uievts||{};g.mix(e.prototype,{_destroyUIEvents:function(){var h=g.stamp(this,true);g.each(b,function(j,i){if(j.instances[h]){delete j.instances[h];if(g.Object.isEmpty(j.instances)){j.handle.detach();if(b[i]){delete b[i];}}}});},UI_EVENTS:g.Node.DOM_EVENTS,_getUIEventNode:function(){return this.get(f);},_createUIEvent:function(i){var l=this._getUIEventNode(),h=(g.stamp(l)+i),k=b[h],j;if(!k){j=l.delegate(i,function(m){var n=e.getByNode(this);n.fire(m.type,{domEvent:m});},"."+g.Widget.getClassName());b[h]=k={instances:{},handle:j};}k.instances[g.stamp(this)]=1;},_getUIEvent:function(j){if(a.isString(j)){var k=this.parseType(j)[1],h,i;if(k){h=k.indexOf(c);if(h>-1){k=k.substring(h+c.length);}if(this.UI_EVENTS[k]){i=k;}}return i;}},_initUIEvent:function(i){var j=this._getUIEvent(i),h=this._uiEvtsInitQueue||{};if(j&&!h[j]){this._uiEvtsInitQueue=h[j]=1;this.after(d,function(){this._createUIEvent(j);delete this._uiEvtsInitQueue[j];});}},on:function(h){this._initUIEvent(h);return e.superclass.on.apply(this,arguments);},publish:function(i,h){var j=this._getUIEvent(i);if(j&&h&&h.defaultFn){this._initUIEvent(j);}return e.superclass.publish.apply(this,arguments);}},true);},"3.3.0",{requires:["widget-base","node-event-delegate"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget-uievents.js b/jssource/src_files/include/javascript/yui3/build/widget/widget-uievents.js new file mode 100644 index 00000000..f3d08d16 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget-uievents.js @@ -0,0 +1,201 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('widget-uievents', function(Y) { + +/** + * Support for Widget UI Events (Custom Events fired by the widget, which wrap the underlying DOM events - e.g. widget:click, widget:mousedown) + * + * @module widget + * @submodule widget-uievents + */ + +var BOUNDING_BOX = "boundingBox", + Widget = Y.Widget, + RENDER = "render", + L = Y.Lang, + EVENT_PREFIX_DELIMITER = ":", + + // Map of Node instances serving as a delegation containers for a specific + // event type to Widget instances using that delegation container. + _uievts = Y.Widget._uievts = Y.Widget._uievts || {}; + +Y.mix(Widget.prototype, { + + /** + * Destructor logic for UI event infrastructure, + * invoked during Widget destruction. + * + * @method _destroyUIEvents + * @for Widget + * @private + */ + _destroyUIEvents: function() { + + var widgetGuid = Y.stamp(this, true); + + Y.each(_uievts, function (info, key) { + if (info.instances[widgetGuid]) { + // Unregister this Widget instance as needing this delegated + // event listener. + delete info.instances[widgetGuid]; + + // There are no more Widget instances using this delegated + // event listener, so detach it. + + if (Y.Object.isEmpty(info.instances)) { + info.handle.detach(); + + if (_uievts[key]) { + delete _uievts[key]; + } + } + } + }); + }, + + /** + * Map of DOM events that should be fired as Custom Events by the + * Widget instance. + * + * @property UI_EVENTS + * @for Widget + * @type Object + */ + UI_EVENTS: Y.Node.DOM_EVENTS, + + /** + * Returns the node on which to bind delegate listeners. + * + * @method _getUIEventNode + * @for Widget + * @protected + */ + _getUIEventNode: function () { + return this.get(BOUNDING_BOX); + }, + + /** + * Binds a delegated DOM event listener of the specified type to the + * Widget's outtermost DOM element to facilitate the firing of a Custom + * Event of the same type for the Widget instance. + * + * @private + * @for Widget + * @method _createUIEvent + * @param type {String} String representing the name of the event + */ + _createUIEvent: function (type) { + + var uiEvtNode = this._getUIEventNode(), + key = (Y.stamp(uiEvtNode) + type), + info = _uievts[key], + handle; + + // For each Node instance: Ensure that there is only one delegated + // event listener used to fire Widget UI events. + + if (!info) { + + handle = uiEvtNode.delegate(type, function (evt) { + + var widget = Widget.getByNode(this); + // Make the DOM event a property of the custom event + // so that developers still have access to it. + widget.fire(evt.type, { domEvent: evt }); + + }, "." + Y.Widget.getClassName()); + + _uievts[key] = info = { instances: {}, handle: handle }; + } + + // Register this Widget as using this Node as a delegation container. + info.instances[Y.stamp(this)] = 1; + }, + + /** + * Determines if the specified event is a UI event. + * + * @private + * @method _isUIEvent + * @for Widget + * @param type {String} String representing the name of the event + * @return {String} Event Returns the name of the UI Event, otherwise + * undefined. + */ + _getUIEvent: function (type) { + + if (L.isString(type)) { + var sType = this.parseType(type)[1], + iDelim, + returnVal; + + if (sType) { + // TODO: Get delimiter from ET, or have ET support this. + iDelim = sType.indexOf(EVENT_PREFIX_DELIMITER); + if (iDelim > -1) { + sType = sType.substring(iDelim + EVENT_PREFIX_DELIMITER.length); + } + + if (this.UI_EVENTS[sType]) { + returnVal = sType; + } + } + + return returnVal; + } + }, + + /** + * Sets up infrastructure required to fire a UI event. + * + * @private + * @method _initUIEvent + * @for Widget + * @param type {String} String representing the name of the event + * @return {String} + */ + _initUIEvent: function (type) { + var sType = this._getUIEvent(type), + queue = this._uiEvtsInitQueue || {}; + + if (sType && !queue[sType]) { + + this._uiEvtsInitQueue = queue[sType] = 1; + + this.after(RENDER, function() { + this._createUIEvent(sType); + delete this._uiEvtsInitQueue[sType]; + }); + } + }, + + // Override of "on" from Base to facilitate the firing of Widget events + // based on DOM events of the same name/type (e.g. "click", "mouseover"). + // Temporary solution until we have the ability to listen to when + // someone adds an event listener (bug 2528230) + on: function (type) { + this._initUIEvent(type); + return Widget.superclass.on.apply(this, arguments); + }, + + // Override of "publish" from Base to facilitate the firing of Widget events + // based on DOM events of the same name/type (e.g. "click", "mouseover"). + // Temporary solution until we have the ability to listen to when + // someone publishes an event (bug 2528230) + publish: function (type, config) { + var sType = this._getUIEvent(type); + if (sType && config && config.defaultFn) { + this._initUIEvent(sType); + } + return Widget.superclass.publish.apply(this, arguments); + } + +}, true); // overwrite existing EventTarget methods + + +}, '3.3.0' ,{requires:['widget-base', 'node-event-delegate']}); diff --git a/jssource/src_files/include/javascript/yui3/build/widget/widget.js b/jssource/src_files/include/javascript/yui3/build/widget/widget.js index 3ccd61e7..580e4055 100644 --- a/jssource/src_files/include/javascript/yui3/build/widget/widget.js +++ b/jssource/src_files/include/javascript/yui3/build/widget/widget.js @@ -1,25 +1,37 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add('widget', function(Y) { +YUI.add('widget-base', function(Y) { /** - * Provides the base Widget class + * Provides the base Widget class, with HTML Parser support * * @module widget */ -// Local Constants +/** + * Provides the base Widget class + * + * @module widget + * @submodule widget-base + */ var L = Y.Lang, - O = Y.Object, Node = Y.Node, + ClassNameManager = Y.ClassNameManager, - WIDGET = "widget", + _getClassName = ClassNameManager.getClassName, + _getWidgetClassName, + + _toInitialCap = Y.cached(function(str) { + return str.substring(0, 1).toUpperCase() + str.substring(1); + }), + + // K-Weight, IE GC optimizations CONTENT = "content", VISIBLE = "visible", HIDDEN = "hidden", @@ -27,25 +39,38 @@ var L = Y.Lang, FOCUSED = "focused", WIDTH = "width", HEIGHT = "height", - EMPTY = "", - HYPHEN = "-", BOUNDING_BOX = "boundingBox", CONTENT_BOX = "contentBox", PARENT_NODE = "parentNode", - FIRST_CHILD = "firstChild", OWNER_DOCUMENT = "ownerDocument", + AUTO = "auto", + SRC_NODE = "srcNode", BODY = "body", - TAB_INDEX = "tabIndex", - LOCALE = "locale", - INIT_VALUE = "initValue", + TAB_INDEX = "tabIndex", ID = "id", RENDER = "render", RENDERED = "rendered", DESTROYED = "destroyed", + STRINGS = "strings", + DIV = "
            ", + CHANGE = "Change", + LOADING = "loading", + + _UISET = "_uiSet", + + EMPTY_STR = "", + EMPTY_FN = function() {}, + + TRUE = true, + FALSE = false, - ContentUpdate = "contentUpdate", + UI, + ATTRS = {}, + UI_ATTRS = [VISIBLE, DISABLED, HEIGHT, WIDTH, FOCUSED], - // Widget nodeid-to-instance map for now, 1-to-1. + WEBKIT = Y.UA.webkit, + + // Widget nodeguid-to-instance map. _instances = {}; /** @@ -59,8 +84,7 @@ var L = Y.Lang, * disabled, focused, strings
          • * * - * @param config {Object} Object literal specifying widget configuration - * properties. + * @param config {Object} Object literal specifying widget configuration properties. * * @class Widget * @constructor @@ -68,28 +92,27 @@ var L = Y.Lang, */ function Widget(config) { - this._yuid = Y.guid(WIDGET); - this._strings = {}; + // kweight + var widget = this, + parentNode, + render, + constructor = widget.constructor; - Widget.superclass.constructor.apply(this, arguments); -} + widget._strs = {}; + widget._cssPrefix = constructor.CSS_PREFIX || _getClassName(constructor.NAME.toLowerCase()); -/** - * The build configuration for the Widget class. - *

            - * Defines the static fields which need to be aggregated, - * when this class is used as the main class passed to - * the Base.build method. - *

            - * @property _buildCfg - * @type Object - * @static - * @final - * @private - */ -Widget._buildCfg = { - aggregates : ["HTML_PARSER"] -}; + Widget.superclass.constructor.apply(widget, arguments); + + render = widget.get(RENDER); + + if (render) { + // Render could be a node or boolean + if (render !== TRUE) { + parentNode = render; + } + widget.render(parentNode); + } +} /** * Static property provides a string to identify the class. @@ -102,7 +125,7 @@ Widget._buildCfg = { * @type String * @static */ -Widget.NAME = WIDGET; +Widget.NAME = "widget"; /** * Constant used to identify state changes originating from @@ -113,9 +136,7 @@ Widget.NAME = WIDGET; * @static * @final */ -Widget.UI_SRC = "ui"; - -var UI = Widget.UI_SRC; +UI = Widget.UI_SRC = "ui"; /** * Static property used to define the default attribute @@ -125,175 +146,169 @@ var UI = Widget.UI_SRC; * @type Object * @static */ -Widget.ATTRS = { +Widget.ATTRS = ATTRS; - /** - * Flag indicating whether or not this object - * has been through the render lifecycle phase. - * - * @attribute rendered - * @readOnly - * @default false - * @type boolean - */ - rendered: { - value:false, - readOnly:true - }, +// Trying to optimize kweight by setting up attrs this way saves about 0.4K min'd - /** - * @attribute boundingBox - * @description The outermost DOM node for the Widget, used for sizing and positioning - * of a Widget as well as a containing element for any decorator elements used - * for skinning. - * @type Node - */ - boundingBox: { - value:null, - setter: function(node) { - return this._setBoundingBox(node); - }, - writeOnce: true - }, +/** + * @attribute id + * @writeOnce + * @default Generated using guid() + * @type String + */ - /** - * @attribute contentBox - * @description A DOM node that is a direct descendent of a Widget's bounding box that - * houses its content. - * @type Node - */ - contentBox: { - value:null, - setter: function(node) { - return this._setContentBox(node); - }, - writeOnce: true - }, +ATTRS[ID] = { + valueFn: "_guid", + writeOnce: TRUE +}; - /** - * @attribute tabIndex - * @description Number (between -32767 to 32767) indicating the widget's - * position in the default tab flow. The value is used to set the - * "tabIndex" attribute on the widget's bounding box. Negative values allow - * the widget to receive DOM focus programmatically (by calling the focus - * method), while being removed from the default tab flow. A value of - * null removes the "tabIndex" attribute from the widget's bounding box. - * @type Number - * @default null - */ - tabIndex: { - - value: 0, - validator: function (val) { - return (L.isNumber(val) || L.isNull(val)); - } +/** + * Flag indicating whether or not this Widget + * has been through the render lifecycle phase. + * + * @attribute rendered + * @readOnly + * @default false + * @type boolean + */ +ATTRS[RENDERED] = { + value:FALSE, + readOnly: TRUE +}; - }, +/** + * @attribute boundingBox + * @description The outermost DOM node for the Widget, used for sizing and positioning + * of a Widget as well as a containing element for any decorator elements used + * for skinning. + * @type String | Node + * @writeOnce + */ +ATTRS[BOUNDING_BOX] = { + value:null, + setter: "_setBB", + writeOnce: TRUE +}; - /** - * @attribute focused - * @description Boolean indicating if the Widget, or one of its descendants, - * has focus. - * @readOnly - * @default false - * @type boolean - */ - focused: { - value: false, - readOnly:true - }, +/** + * @attribute contentBox + * @description A DOM node that is a direct descendant of a Widget's bounding box that + * houses its content. + * @type String | Node + * @writeOnce + */ +ATTRS[CONTENT_BOX] = { + valueFn:"_defaultCB", + setter: "_setCB", + writeOnce: TRUE +}; - /** - * @attribute disabled - * @description Boolean indicating if the Widget should be disabled. The disabled implementation - * is left to the specific classes extending widget. - * @default false - * @type boolean - */ - disabled: { - value: false - }, +/** + * @attribute tabIndex + * @description Number (between -32767 to 32767) indicating the widget's + * position in the default tab flow. The value is used to set the + * "tabIndex" attribute on the widget's bounding box. Negative values allow + * the widget to receive DOM focus programmatically (by calling the focus + * method), while being removed from the default tab flow. A value of + * null removes the "tabIndex" attribute from the widget's bounding box. + * @type Number + * @default null + */ +ATTRS[TAB_INDEX] = { + value: null, + validator: "_validTabIndex" +}; - /** - * @attribute visible - * @description Boolean indicating weather or not the Widget is visible. - * @default true - * @type boolean - */ - visible: { - value: true - }, +/** + * @attribute focused + * @description Boolean indicating if the Widget, or one of its descendants, + * has focus. + * @readOnly + * @default false + * @type boolean + */ +ATTRS[FOCUSED] = { + value: FALSE, + readOnly:TRUE +}; - /** - * @attribute height - * @description String with units, or number, representing the height of the Widget. If a number is provided, - * the default unit, defined by the Widgets DEF_UNIT, property is used. - * @default "" - * @type {String | Number} - */ - height: { - value: EMPTY - }, +/** + * @attribute disabled + * @description Boolean indicating if the Widget should be disabled. The disabled implementation + * is left to the specific classes extending widget. + * @default false + * @type boolean + */ +ATTRS[DISABLED] = { + value: FALSE +}; - /** - * @attribute width - * @description String with units, or number, representing the width of the Widget. If a number is provided, - * the default unit, defined by the Widgets DEF_UNIT, property is used. - * @default "" - * @type {String | Number} - */ - width: { - value: EMPTY - }, +/** + * @attribute visible + * @description Boolean indicating weather or not the Widget is visible. + * @default TRUE + * @type boolean + */ +ATTRS[VISIBLE] = { + value: TRUE +}; - /** - * @attribute moveStyles - * @description Flag defining whether or not style properties from the content box - * should be moved to the bounding box when wrapped (as defined by the WRAP_STYLES property) - * @default false - * @type boolean - */ - moveStyles: { - value: false - }, +/** + * @attribute height + * @description String with units, or number, representing the height of the Widget. If a number is provided, + * the default unit, defined by the Widgets DEF_UNIT, property is used. + * @default EMPTY_STR + * @type {String | Number} + */ +ATTRS[HEIGHT] = { + value: EMPTY_STR +}; - /** - * @attribute locale - * @description - * The default locale for the widget. NOTE: Using get/set on the "strings" attribute will - * return/set strings for this locale. - * @default "en" - * @type String - */ - locale : { - value: "en" - }, +/** + * @attribute width + * @description String with units, or number, representing the width of the Widget. If a number is provided, + * the default unit, defined by the Widgets DEF_UNIT, property is used. + * @default EMPTY_STR + * @type {String | Number} + */ +ATTRS[WIDTH] = { + value: EMPTY_STR +}; - /** - * @attribute strings - * @description Collection of strings used to label elements of the Widget's UI. - * @default null - * @type Object - */ - strings: { - setter: function(val) { - return this._setStrings(val, this.get(LOCALE)); - }, +/** + * @attribute strings + * @description Collection of strings used to label elements of the Widget's UI. + * @default null + * @type Object + */ +ATTRS[STRINGS] = { + value: {}, + setter: "_strSetter", + getter: "_strGetter" +}; - getter: function() { - return this.getStrings(this.get(LOCALE)); - } - } +/** + * Whether or not to render the widget automatically after init, and optionally, to which parent node. + * + * @attribute render + * @type boolean | Node + * @writeOnce + */ +ATTRS[RENDER] = { + value:FALSE, + writeOnce:TRUE }; /** - * Cached lowercase version of Widget.NAME + * The css prefix which the static Widget.getClassName method should use when constructing class names * - * @property Widget._NAME_LOWERCASE + * @property Widget.CSS_PREFIX + * @type String + * @default Widget.NAME.toLowerCase() * @private * @static */ -Widget._NAME_LOWERCASE = Widget.NAME.toLowerCase(); +Widget.CSS_PREFIX = _getClassName(Widget.NAME.toLowerCase()); /** * Generate a standard prefixed classname for the Widget, prefixed by the default prefix defined @@ -309,11 +324,12 @@ Widget._NAME_LOWERCASE = Widget.NAME.toLowerCase(); * @param {String*} args* 0..n strings which should be concatenated, using the default separator defined by ClassNameManager, to create the class name */ Widget.getClassName = function() { - var args = Y.Array(arguments, 0, true); - args.splice(0, 0, this._NAME_LOWERCASE); - return ClassNameManager.getClassName.apply(ClassNameManager, args); + // arguments needs to be array'fied to concat + return _getClassName.apply(ClassNameManager, [Widget.CSS_PREFIX].concat(Y.Array(arguments), true)); }; +_getWidgetClassName = Widget.getClassName; + /** * Returns the widget instance whose bounding box contains, or is, the given node. *

            @@ -328,69 +344,42 @@ Widget.getClassName = function() { */ Widget.getByNode = function(node) { var widget, - bbMarker = Widget.getClassName(); + widgetMarker = _getWidgetClassName(); - node = Node.get(node); + node = Node.one(node); if (node) { - node = (node.hasClass(bbMarker)) ? node : node.ancestor("." + bbMarker); + node = node.ancestor("." + widgetMarker, true); if (node) { - widget = _instances[node.get(ID)]; + widget = _instances[Y.stamp(node, TRUE)]; } } return widget || null; }; -/** - * Object hash, defining how attribute values are to be parsed from - * markup contained in the widget's content box. e.g.: - *

            - *   {
            - *       // Set single Node references using selector syntax 
            - *       // (selector is run through node.query)
            - *       titleNode: "span.yui-title",
            - *       // Set NodeList references using selector syntax 
            - *       // (array indicates selector is to be run through node.queryAll)
            - *       listNodes: ["li.yui-item"],
            - *       // Set other attribute types, using a parse function. 
            - *       // Context is set to the widget instance.
            - *       label: function(contentBox) {
            - *           return contentBox.query("span.title").get("innerHTML");
            - *       }
            - *   }
            - * 
            - * - * @property Widget.HTML_PARSER - * @type Object - * @static - */ -Widget.HTML_PARSER = {}; - Y.extend(Widget, Y.Base, { - /** - * Returns a class name prefixed with the the value of the - * YUI.config.classNamePrefix attribute + the instances NAME property. - * Uses YUI.config.classNameDelimiter attribute to delimit the provided strings. - * e.g. - * - *
            -	 *    // returns "yui-slider-foo-bar", for a slider instance
            -	 *    var scn = slider.getClassName('foo','bar');
            -	 *
            -	 *    // returns "yui-overlay-foo-bar", for an overlay instance
            -	 *    var ocn = slider.getClassName('foo','bar');
            -	 * 
            - *
            - * - * @method getClassName - * @param {String}+ One or more classname bits to be joined and prefixed - */ - getClassName: function () { - var args = Y.Array(arguments, 0, true); - args.splice(0, 0, this._name); - return ClassNameManager.getClassName.apply(ClassNameManager, args); - }, + /** + * Returns a class name prefixed with the the value of the + * YUI.config.classNamePrefix attribute + the instances NAME property. + * Uses YUI.config.classNameDelimiter attribute to delimit the provided strings. + * e.g. + * + *
            +     *    // returns "yui-slider-foo-bar", for a slider instance
            +     *    var scn = slider.getClassName('foo','bar');
            +     *
            +     *    // returns "yui-overlay-foo-bar", for an overlay instance
            +     *    var ocn = overlay.getClassName('foo','bar');
            +     * 
            + *
            + * + * @method getClassName + * @param {String}+ One or more classname bits to be joined and prefixed + */ + getClassName: function () { + return _getClassName.apply(ClassNameManager, [this._cssPrefix].concat(Y.Array(arguments), true)); + }, /** * Initializer lifecycle implementation for the Widget class. Registers the @@ -402,34 +391,27 @@ Y.extend(Widget, Y.Base, { */ initializer: function(config) { + _instances[Y.stamp(this.get(BOUNDING_BOX))] = this; + /** * Notification event, which widget implementations can fire, when * they change the content of the widget. This event has no default * behavior and cannot be prevented, so the "on" or "after" * moments are effectively equivalent (with on listeners being invoked before * after listeners). - * + * * @event widget:contentUpdate * @preventable false * @param {EventFacade} e The Event Facade */ - this.publish(ContentUpdate, { preventable:false }); - - this._name = this.constructor.NAME.toLowerCase(); - - var nodeId = this.get(BOUNDING_BOX).get(ID); - if (nodeId) { - _instances[nodeId] = this; - } - var htmlConfig = this._parseHTML(this.get(CONTENT_BOX)); - if (htmlConfig) { - Y.aggregate(config, htmlConfig, false); + if (this._applyParser) { + this._applyParser(config); } }, /** - * Descructor lifecycle implementation for the Widget class. Purges events attached + * Destructor lifecycle implementation for the Widget class. Purges events attached * to the bounding box (and all child nodes) and removes the Widget from the * list of registered widgets. * @@ -438,14 +420,24 @@ Y.extend(Widget, Y.Base, { */ destructor: function() { - var boundingBox = this.get(BOUNDING_BOX); - - Y.Event.purgeElement(boundingBox, true); + var boundingBox = this.get(BOUNDING_BOX), + contentBox = this.get(CONTENT_BOX), + bbGuid = Y.stamp(boundingBox, TRUE); - var nodeId = boundingBox.get(ID); - if (nodeId && nodeId in _instances) { - delete _instances[nodeId]; + if (bbGuid in _instances) { + delete _instances[bbGuid]; } + + if (this.UI_EVENTS) { + this._destroyUIEvents(); + } + + this._unbindUI(boundingBox); + + if (contentBox) { // Just to be safe because it's a last minute change. Really shouldn't be required. + contentBox.remove(TRUE); + } + boundingBox.remove(TRUE); }, /** @@ -476,37 +468,32 @@ Y.extend(Widget, Y.Base, { */ render: function(parentNode) { - if (this.get(DESTROYED)) { - return; - } - - if (!this.get(RENDERED)) { + if (!this.get(DESTROYED) && !this.get(RENDERED)) { /** - * Lifcyle event for the render phase, fired prior to rendering the UI - * for the widget (prior to invoking the widgets renderer method). - *

            - * Subscribers to the "on" moment of this event, will be notified - * before the widget is rendered. - *

            - *

            - * Subscribers to the "after" momemt of this event, will be notified - * after rendering is complete. - *

            - * - * @event widget:render - * @preventable _defRenderFn - * @param {EventFacade} e The Event Facade - */ - this.publish(RENDER, {queuable:false, defaultFn: this._defRenderFn}); - - parentNode = (parentNode) ? Node.get(parentNode) : null; - if (parentNode && !parentNode.inDoc()) { - parentNode = null; - } + * Lifecycle event for the render phase, fired prior to rendering the UI + * for the widget (prior to invoking the widget's renderer method). + *

            + * Subscribers to the "on" moment of this event, will be notified + * before the widget is rendered. + *

            + *

            + * Subscribers to the "after" moment of this event, will be notified + * after rendering is complete. + *

            + * + * @event widget:render + * @preventable _defRenderFn + * @param {EventFacade} e The Event Facade + */ + this.publish(RENDER, { + queuable:FALSE, + fireOnce:TRUE, + defaultTargetOnly:TRUE, + defaultFn: this._defRenderFn + }); - this.fire(RENDER, {parentNode: parentNode}); + this.fire(RENDER, {parentNode: (parentNode) ? Node.one(parentNode) : null}); } - return this; }, @@ -519,29 +506,35 @@ Y.extend(Widget, Y.Base, { * @param {Node} parentNode The parent node to render to, if passed in to the render method */ _defRenderFn : function(e) { + this._parentNode = e.parentNode; + + this.renderer(); + this._set(RENDERED, TRUE); - this._renderUI(e.parentNode); - this._bindUI(); - this._syncUI(); - - this.renderer(); - - this._set(RENDERED, true); + this._removeLoadingClassNames(); }, - /** + /** * Creates DOM (or manipulates DOM for progressive enhancement) * This method is invoked by render() and is not chained - * automatically for the class hierarchy (like initializer, destructor) + * automatically for the class hierarchy (unlike initializer, destructor) * so it should be chained manually for subclasses if required. - * + * * @method renderer * @protected */ renderer: function() { - this.renderUI(); - this.bindUI(); - this.syncUI(); + // kweight + var widget = this; + + widget._renderUI(); + widget.renderUI(); + + widget._bindUI(); + widget.bindUI(); + + widget._syncUI(); + widget.syncUI(); }, /** @@ -553,9 +546,9 @@ Y.extend(Widget, Y.Base, { * @method bindUI * @protected */ - bindUI: function() {}, + bindUI: EMPTY_FN, - /** + /**Ã¥ * Adds nodes to the DOM * * This method is not called by framework and is not chained @@ -564,7 +557,7 @@ Y.extend(Widget, Y.Base, { * @method renderUI * @protected */ - renderUI: function() {}, + renderUI: EMPTY_FN, /** * Refreshes the rendered UI, based on Widget State @@ -573,228 +566,157 @@ Y.extend(Widget, Y.Base, { * automatically for the class hierarchy. * * @method syncUI - * + * @protected + * */ - syncUI: function(){}, + syncUI: EMPTY_FN, /** - * @method hide - * @description Shows the Module element by setting the "visible" attribute to "false". - */ + * @method hide + * @description Hides the Widget by setting the "visible" attribute to "false". + * @chainable + */ hide: function() { - return this.set(VISIBLE, false); + return this.set(VISIBLE, FALSE); }, /** - * @method show - * @description Shows the Module element by setting the "visible" attribute to "true". - */ + * @method show + * @description Shows the Widget by setting the "visible" attribute to "true". + * @chainable + */ show: function() { - return this.set(VISIBLE, true); + return this.set(VISIBLE, TRUE); }, /** - * @method focus - * @description Causes the Widget to receive the focus by setting the "focused" - * attribute to "true". - */ + * @method focus + * @description Causes the Widget to receive the focus by setting the "focused" + * attribute to "true". + * @chainable + */ focus: function () { - return this._set(FOCUSED, true); + return this._set(FOCUSED, TRUE); }, /** - * @method blur - * @description Causes the Widget to lose focus by setting the "focused" attribute - * to "false" - */ + * @method blur + * @description Causes the Widget to lose focus by setting the "focused" attribute + * to "false" + * @chainable + */ blur: function () { - return this._set(FOCUSED, false); + return this._set(FOCUSED, FALSE); }, /** - * @method enable - * @description Set the Widget's "disabled" attribute to "false". - */ + * @method enable + * @description Set the Widget's "disabled" attribute to "false". + * @chainable + */ enable: function() { - return this.set(DISABLED, false); + return this.set(DISABLED, FALSE); }, /** - * @method disabled - * @description Set the Widget's "disabled" attribute to "true". - */ + * @method disable + * @description Set the Widget's "disabled" attribute to "true". + * @chainable + */ disable: function() { - return this.set(DISABLED, true); + return this.set(DISABLED, TRUE); }, /** - * Utilitity method used to apply the HTML_PARSER configuration for the - * instance, to retrieve config data values. - * - * @method _parseHTML - * @private - * @param node {Node} Root node to use to parse markup for configuration data - * @return config {Object} configuration object, with values found in the HTML, populated + * @method _uiSizeCB + * @protected + * @param {boolean} expand */ - _parseHTML : function(node) { - - var schema = this._getHtmlParser(), - data, - val; - - if (schema && node && node.hasChildNodes()) { - - O.each(schema, function(v, k, o) { - val = null; - - if (L.isFunction(v)) { - val = v.call(this, node); - } else { - if (L.isArray(v)) { - val = node.queryAll(v[0]); - } else { - val = node.query(v); - } - } - - if (val !== null && val !== undefined) { - data = data || {}; - data[k] = val; - } - - }, this); - } - - return data; + _uiSizeCB : function(expand) { + this.get(CONTENT_BOX).toggleClass(_getWidgetClassName(CONTENT, "expanded"), expand); }, /** - * Moves a pre-defined set of style rules (WRAP_STYLES) from one node to another. + * Helper method to collect the boundingBox and contentBox, set styles and append to the provided parentNode, if not + * already a child. The owner document of the boundingBox, or the owner document of the contentBox will be used + * as the document into which the Widget is rendered if a parentNode is node is not provided. If both the boundingBox and + * the contentBox are not currently in the document, and no parentNode is provided, the widget will be rendered + * to the current document's body. * - * @method _moveStyles + * @method _renderBox * @private - * @param {Node} nodeFrom The node to gather the styles from - * @param {Node} nodeTo The node to apply the styles to + * @param {Node} parentNode The parentNode to render the widget to. If not provided, and both the boundingBox and + * the contentBox are not currently in the document, the widget will be rendered to the current document's body. */ - _moveStyles: function(nodeFrom, nodeTo) { - - var styles = this.WRAP_STYLES, - pos = nodeFrom.getStyle('position'), - contentBox = this.get(CONTENT_BOX), - xy = [0,0], - h, w; - - if (!this.get('height')) { - h = contentBox.get('offsetHeight'); - } + _renderBox: function(parentNode) { - if (!this.get('width')) { - w = contentBox.get('offsetWidth'); - } + // TODO: Performance Optimization [ More effective algo to reduce Node refs, compares, replaces? ] + + var widget = this, // kweight + contentBox = widget.get(CONTENT_BOX), + boundingBox = widget.get(BOUNDING_BOX), + srcNode = widget.get(SRC_NODE), + defParentNode = widget.DEF_PARENT_NODE, - if (pos === 'absolute') { - xy = nodeFrom.getXY(); - nodeTo.setStyles({ - right: 'auto', - bottom: 'auto' - }); + doc = (srcNode && srcNode.get(OWNER_DOCUMENT)) || boundingBox.get(OWNER_DOCUMENT) || contentBox.get(OWNER_DOCUMENT); - nodeFrom.setStyles({ - right: 'auto', - bottom: 'auto' - }); + // If srcNode (assume it's always in doc), have contentBox take its place (widget render responsible for re-use of srcNode contents) + if (srcNode && !srcNode.compareTo(contentBox) && !contentBox.inDoc(doc)) { + srcNode.replace(contentBox); } - Y.each(styles, function(v, k) { - var s = nodeFrom.getStyle(k); - nodeTo.setStyle(k, s); - if (v === false) { - nodeFrom.setStyle(k, ''); - } else { - nodeFrom.setStyle(k, v); + if (!boundingBox.compareTo(contentBox.get(PARENT_NODE)) && !boundingBox.compareTo(contentBox)) { + // If contentBox box is already in the document, have boundingBox box take it's place + if (contentBox.inDoc(doc)) { + contentBox.replace(boundingBox); } - }); - - if (pos === 'absolute') { - nodeTo.setXY(xy); + boundingBox.appendChild(contentBox); } - if (h) { - this.set('height', h); - } + parentNode = parentNode || (defParentNode && Node.one(defParentNode)); - if (w) { - this.set('width', w); + if (parentNode) { + parentNode.appendChild(boundingBox); + } else if (!boundingBox.inDoc(doc)) { + Node.one(BODY).insert(boundingBox, 0); } }, /** - * Helper method to collect the boundingBox and contentBox, set styles and append to the provided parentNode, if not - * already a child. The owner document of the boundingBox, or the owner document of the contentBox will be used - * as the document into which the Widget is rendered if a parentNode is node is not provided. If both the boundingBox and - * the contentBox are not currently in the document, and no parentNode is provided, the widget will be rendered - * to the current document's body. - * - * @method _renderBox - * @private - * @param {Node} parentNode The parentNode to render the widget to. If not provided, and both the boundingBox and - * the contentBox are not currently in the document, the widget will be rendered to the current document's body. - */ - _renderBox: function(parentNode) { - - var contentBox = this.get(CONTENT_BOX), - boundingBox = this.get(BOUNDING_BOX), - doc = boundingBox.get(OWNER_DOCUMENT) || contentBox.get(OWNER_DOCUMENT), - body; - - if (!boundingBox.compareTo(contentBox.get(PARENT_NODE))) { - if (this.get('moveStyles')) { - this._moveStyles(contentBox, boundingBox); - } - // If contentBox box is already in the document, have boundingBox box take it's place - if (contentBox.inDoc(doc)) { - contentBox.get(PARENT_NODE).replaceChild(boundingBox, contentBox); - } - boundingBox.appendChild(contentBox); - } - - if (!boundingBox.inDoc(doc) && !parentNode) { - body = Node.get(BODY); - if (body.get(FIRST_CHILD)) { - // Special case when handling body as default (no parentNode), always try to insert. - body.insertBefore(boundingBox, body.get(FIRST_CHILD)); - } else { - body.appendChild(boundingBox); - } - } else { - if (parentNode && !parentNode.compareTo(boundingBox.get(PARENT_NODE))) { - parentNode.appendChild(boundingBox); - } - } + * Setter for the boundingBox attribute + * + * @method _setBB + * @private + * @param Node/String + * @return Node + */ + _setBB: function(node) { + return this._setBox(this.get(ID), node, this.BOUNDING_TEMPLATE); }, /** - * Setter for the boundingBox attribute - * - * @method _setBoundingBox - * @private - * @param Node/String - * @return Node - */ - _setBoundingBox: function(node) { - return this._setBox(node, this.BOUNDING_TEMPLATE); + * Setter for the contentBox attribute + * + * @method _setCB + * @private + * @param {Node|String} node + * @return Node + */ + _setCB: function(node) { + return (this.CONTENT_TEMPLATE === null) ? this.get(BOUNDING_BOX) : this._setBox(null, node, this.CONTENT_TEMPLATE); }, /** - * Setter for the contentBox attribute - * - * @method _setContentBox - * @private - * @param {Node|String} node - * @return Node - */ - _setContentBox: function(node) { - return this._setBox(node, this.CONTENT_TEMPLATE); + * Returns the default value for the contentBox attribute. + * + * For the Widget class, this will be the srcNode if provided, otherwise null (resulting in + * a new contentBox node instance being created) + * + * @method _defaultCB + * @protected + */ + _defaultCB : function(node) { + return this.get(SRC_NODE) || null; }, /** @@ -804,16 +726,15 @@ Y.extend(Widget, Y.Base, { * @method _setBox * @private * + * @param {String} id The node's id attribute * @param {Node|String} node The node reference * @param {String} template HTML string template for the node * @return {Node} The node */ - _setBox : function(node, template) { - node = Node.get(node) || Node.create(template); - - var sid = Y.stamp(node); + _setBox : function(id, node, template) { + node = Node.one(node) || Node.create(template); if (!node.get(ID)) { - node.set(ID, sid); + node.set(ID, id || Y.guid()); } return node; }, @@ -823,76 +744,110 @@ Y.extend(Widget, Y.Base, { * * @method _renderUI * @protected - * @param {Node} The parent node to rendering the widget into */ - _renderUI: function(parentNode) { + _renderUI: function() { this._renderBoxClassNames(); - this._renderBox(parentNode); + this._renderBox(this._parentNode); }, - /** - * Applies standard class names to the boundingBox and contentBox - * - * @method _renderBoxClassNames - * @protected - */ + /** + * Applies standard class names to the boundingBox and contentBox + * + * @method _renderBoxClassNames + * @protected + */ _renderBoxClassNames : function() { var classes = this._getClasses(), + cl, boundingBox = this.get(BOUNDING_BOX), - contentBox = this.get(CONTENT_BOX), - name, i; + i; - boundingBox.addClass(Widget.getClassName()); + boundingBox.addClass(_getWidgetClassName()); // Start from Widget Sub Class for (i = classes.length-3; i >= 0; i--) { - name = classes[i].NAME; - if (name) { - boundingBox.addClass(ClassNameManager.getClassName(name.toLowerCase())); - } + cl = classes[i]; + boundingBox.addClass(cl.CSS_PREFIX || _getClassName(cl.NAME.toLowerCase())); } // Use instance based name for content box - contentBox.addClass(this.getClassName(CONTENT)); + this.get(CONTENT_BOX).addClass(this.getClassName(CONTENT)); }, /** - * Sets up DOM and CustomEvent listeners for the widget. + * Removes class names representative of the widget's loading state from + * the boundingBox. * - * @method _bindUI + * @method _removeLoadingClassNames * @protected */ - _bindUI: function() { - this.after('visibleChange', this._afterVisibleChange); - this.after('disabledChange', this._afterDisabledChange); - this.after('heightChange', this._afterHeightChange); - this.after('widthChange', this._afterWidthChange); - this.after('focusedChange', this._afterFocusedChange); + _removeLoadingClassNames: function () { + + var boundingBox = this.get(BOUNDING_BOX), + contentBox = this.get(CONTENT_BOX), + instClass = this.getClassName(LOADING), + widgetClass = _getWidgetClassName(LOADING); + + boundingBox.removeClass(widgetClass) + .removeClass(instClass); - this._bindDOMListeners(); + contentBox.removeClass(widgetClass) + .removeClass(instClass); }, /** - * Sets up DOM listeners, on elements rendered by the widget. - * - * @method _bindDOMListeners + * Sets up DOM and CustomEvent listeners for the widget. + * + * @method _bindUI * @protected */ - _bindDOMListeners : function() { + _bindUI: function() { + this._bindAttrUI(this._UI_ATTRS.BIND); + this._bindDOM(); + }, - var oDocument = this.get(BOUNDING_BOX).get("ownerDocument"); + /** + * @method _unbindUI + * @protected + */ + _unbindUI : function(boundingBox) { + this._unbindDOM(boundingBox); + }, - oDocument.on("focus", this._onFocus, this); + /** + * Sets up DOM listeners, on elements rendered by the widget. + * + * @method _bindDOM + * @protected + */ + _bindDOM : function() { + var oDocument = this.get(BOUNDING_BOX).get(OWNER_DOCUMENT); + + // TODO: Perf Optimization: Use Widget.getByNode delegation, to get by + // with just one _onDocFocus subscription per sandbox, instead of one per widget + this._hDocFocus = oDocument.on("focus", this._onDocFocus, this); + + // Fix for Webkit: + // Document doesn't receive focus in Webkit when the user mouses + // down on it, so the "focused" attribute won't get set to the + // correct value. + if (WEBKIT) { + this._hDocMouseDown = oDocument.on("mousedown", this._onDocMouseDown, this); + } + }, - // Fix for Webkit: - // Document doesn't receive focus in Webkit when the user mouses - // down on it, so the "focused" attribute won't get set to the - // correct value. - - if (Y.UA.webkit) { - oDocument.on("mousedown", this._onDocMouseDown, this); - } + /** + * @method _unbindDOM + * @protected + */ + _unbindDOM : function(boundingBox) { + if (this._hDocFocus) { + this._hDocFocus.detach(); + } + if (WEBKIT && this._hDocMouseDown) { + this._hDocMouseDown.detach(); + } }, /** @@ -902,26 +857,19 @@ Y.extend(Widget, Y.Base, { * @protected */ _syncUI: function() { - this._uiSetVisible(this.get(VISIBLE)); - this._uiSetDisabled(this.get(DISABLED)); - this._uiSetHeight(this.get(HEIGHT)); - this._uiSetWidth(this.get(WIDTH)); - this._uiSetFocused(this.get(FOCUSED)); - this._uiSetTabIndex(this.get(TAB_INDEX)); + this._syncAttrUI(this._UI_ATTRS.SYNC); }, /** * Sets the height on the widget's bounding box element - * + * * @method _uiSetHeight * @protected * @param {String | Number} val */ _uiSetHeight: function(val) { - if (L.isNumber(val)) { - val = val + this.DEF_UNIT; - } - this.get(BOUNDING_BOX).setStyle(HEIGHT, val); + this._uiSetDim(HEIGHT, val); + this._uiSizeCB((val !== EMPTY_STR && val !== AUTO)); }, /** @@ -932,10 +880,17 @@ Y.extend(Widget, Y.Base, { * @param {String | Number} val */ _uiSetWidth: function(val) { - if (L.isNumber(val)) { - val = val + this.DEF_UNIT; - } - this.get(BOUNDING_BOX).setStyle(WIDTH, val); + this._uiSetDim(WIDTH, val); + }, + + /** + * @method _uiSetDim + * @private + * @param {String} dim The dimension - "width" or "height" + * @param {Number | String} val The value to set + */ + _uiSetDim: function(dimension, val) { + this.get(BOUNDING_BOX).setStyle(dimension, L.isNumber(val) ? val + this.DEF_UNIT : val); }, /** @@ -946,57 +901,19 @@ Y.extend(Widget, Y.Base, { * @param {boolean} val */ _uiSetVisible: function(val) { - - var box = this.get(BOUNDING_BOX), - sClassName = this.getClassName(HIDDEN); - - if (val === true) { - box.removeClass(sClassName); - } else { - box.addClass(sClassName); - } + this.get(BOUNDING_BOX).toggleClass(this.getClassName(HIDDEN), !val); }, /** * Sets the disabled state for the UI - * + * * @protected * @param {boolean} val */ _uiSetDisabled: function(val) { - - var box = this.get(BOUNDING_BOX), - sClassName = this.getClassName(DISABLED); - - if (val === true) { - box.addClass(sClassName); - } else { - box.removeClass(sClassName); - } - }, - - - /** - * Set the tabIndex on the widget's rendered UI - * - * @method _uiSetTabIndex - * @protected - * @param Number - */ - _uiSetTabIndex: function(index) { - - var boundingBox = this.get(BOUNDING_BOX); - - if (L.isNumber(index)) { - boundingBox.set(TAB_INDEX, index); - } - else { - boundingBox.removeAttribute(TAB_INDEX); - } - + this.get(BOUNDING_BOX).toggleClass(this.getClassName(DISABLED), val); }, - /** * Sets the focused state for the UI * @@ -1006,111 +923,58 @@ Y.extend(Widget, Y.Base, { * the UI. */ _uiSetFocused: function(val, src) { + var boundingBox = this.get(BOUNDING_BOX); + boundingBox.toggleClass(this.getClassName(FOCUSED), val); - var box = this.get(BOUNDING_BOX), - sClassName = this.getClassName(FOCUSED); - - if (val === true) { - box.addClass(sClassName); - if (src !== UI) { - box.focus(); - } - } else { - box.removeClass(sClassName); - if (src !== UI) { - box.blur(); + if (src !== UI) { + if (val) { + boundingBox.focus(); + } else { + boundingBox.blur(); } - } + } }, - - /** - * Default visible attribute state change handler + * Set the tabIndex on the widget's rendered UI * - * @method _afterVisibleChange + * @method _uiSetTabIndex * @protected - * @param {EventFacade} evt The event facade for the attribute change + * @param Number */ - _afterVisibleChange: function(evt) { - this._uiSetVisible(evt.newVal); - }, - - /** - * Default disabled attribute state change handler - * - * @method _afterDisabledChange - * @protected - * @param {EventFacade} evt The event facade for the attribute change - */ - _afterDisabledChange: function(evt) { - this._uiSetDisabled(evt.newVal); - }, - - /** - * Default height attribute state change handler - * - * @method _afterHeightChange - * @protected - * @param {EventFacade} evt The event facade for the attribute change - */ - _afterHeightChange: function(evt) { - this._uiSetHeight(evt.newVal); - }, + _uiSetTabIndex: function(index) { + var boundingBox = this.get(BOUNDING_BOX); - /** - * Default widget attribute state change handler - * - * @method _afterWidthChange - * @protected - * @param {EventFacade} evt The event facade for the attribute change - */ - _afterWidthChange: function(evt) { - this._uiSetWidth(evt.newVal); + if (L.isNumber(index)) { + boundingBox.set(TAB_INDEX, index); + } else { + boundingBox.removeAttribute(TAB_INDEX); + } }, /** - * Default focused attribute state change handler - * - * @method _afterFocusedChange + * @method _onDocMouseDown + * @description "mousedown" event handler for the owner document of the + * widget's bounding box. * @protected - * @param {EventFacade} evt The event facade for the attribute change + * @param {EventFacade} evt The event facade for the DOM focus event */ - _afterFocusedChange: function(evt) { - this._uiSetFocused(evt.newVal, evt.src); + _onDocMouseDown: function (evt) { + if (this._domFocus) { + this._onDocFocus(evt); + } }, - /** - * @method _onDocMouseDown - * @description "mousedown" event handler for the owner document of the - * widget's bounding box. - * @protected - * @param {EventFacade} evt The event facade for the DOM focus event - */ - _onDocMouseDown: function (evt) { - - if (this._hasDOMFocus) { - this._onFocus(evt); - } - - }, - /** * DOM focus event handler, used to sync the state of the Widget with the DOM * - * @method _onFocus + * @method _onDocFocus * @protected * @param {EventFacade} evt The event facade for the DOM focus event */ - _onFocus: function (evt) { - - var target = evt.target, - boundingBox = this.get(BOUNDING_BOX), - bFocused = (boundingBox.compareTo(target) || boundingBox.contains(target)); - - this._hasDOMFocus = bFocused; - this._set(FOCUSED, bFocused, { src: UI }); - + _onDocFocus: function (evt) { + this._domFocus = this.get(BOUNDING_BOX).contains(evt.target); // contains() checks invoking node also + this._set(FOCUSED, this._domFocus, { src: UI }); }, /** @@ -1120,210 +984,557 @@ Y.extend(Widget, Y.Base, { * @return {String} The default string value for the widget [ displays the NAME of the instance, and the unique id ] */ toString: function() { - return this.constructor.NAME + "[" + this._yuid + "]"; + // Using deprecated name prop for kweight squeeze. + return this.name + "[" + this.get(ID) + "]"; }, /** * Default unit to use for dimension values * * @property DEF_UNIT + * @type String */ DEF_UNIT : "px", + /** + * Default node to render the bounding box to. If not set, + * will default to the current document body. + * + * @property DEF_PARENT_NODE + * @type String | Node + */ + DEF_PARENT_NODE : null, + /** - * Static property defining the markup template for content box. + * Property defining the markup template for content box. If your Widget doesn't + * need the dual boundingBox/contentBox structure, set CONTENT_TEMPLATE to null, + * and contentBox and boundingBox will both point to the same Node. * * @property CONTENT_TEMPLATE * @type String */ - CONTENT_TEMPLATE : "
            ", + CONTENT_TEMPLATE : DIV, /** - * Static property defining the markup template for bounding box. + * Property defining the markup template for bounding box. * * @property BOUNDING_TEMPLATE * @type String */ - BOUNDING_TEMPLATE : "
            ", + BOUNDING_TEMPLATE : DIV, /** - * Static property listing the styles that are mimiced on the bounding box from the content box. - * - * @property WRAP_STYLES - * @type Object + * @method _guid + * @protected */ - WRAP_STYLES : { - height: '100%', - width: '100%', - zIndex: false, - position: 'static', - top: '0', - left: '0', - bottom: '', - right: '', - padding: '', - margin: '' + _guid : function() { + return Y.guid(); }, /** - * Sets strings for a particular locale, merging with any existing - * strings which may already be defined for the locale. - * - * @method _setStrings + * @method _validTabIndex * @protected - * @param {Object} strings The hash of string key/values to set - * @param {Object} locale The locale for the string values being set + * @param {Number} tabIndex + */ + _validTabIndex : function (tabIndex) { + return (L.isNumber(tabIndex) || L.isNull(tabIndex)); + }, + + /** + * Binds after listeners for the list of attributes provided + * + * @method _bindAttrUI + * @private + * @param {Array} attrs */ - _setStrings : function(strings, locale) { - var strs = this._strings; - locale = locale.toLowerCase(); + _bindAttrUI : function(attrs) { + var i, + l = attrs.length; - if (!strs[locale]) { - strs[locale] = {}; + for (i = 0; i < l; i++) { + this.after(attrs[i] + CHANGE, this._setAttrUI); } + }, - Y.aggregate(strs[locale], strings, true); - return strs[locale]; + /** + * Invokes the _uiSet=ATTR NAME> method for the list of attributes provided + * + * @method _syncAttrUI + * @private + * @param {Array} attrs + */ + _syncAttrUI : function(attrs) { + var i, l = attrs.length, attr; + for (i = 0; i < l; i++) { + attr = attrs[i]; + this[_UISET + _toInitialCap(attr)](this.get(attr)); + } }, /** - * Returns the strings key/value hash for a paricular locale, without locale lookup applied. + * @method _setAttrUI + * @private + * @param {EventFacade} e + */ + _setAttrUI : function(e) { + this[_UISET + _toInitialCap(e.attrName)](e.newVal, e.src); + }, + + /** + * The default setter for the strings attribute. Merges partial sets + * into the full string set, to allow users to partial sets of strings * - * @method _getStrings + * @method _strSetter * @protected - * @param {Object} locale + * @param {Object} strings + * @return {String} The full set of strings to set */ - _getStrings : function(locale) { - return this._strings[locale.toLowerCase()]; + _strSetter : function(strings) { + return Y.merge(this.get(STRINGS), strings); }, /** - * Gets the entire strings hash for a particular locale, performing locale lookup. - *

            - * If no values of the key are defined for a particular locale the value for the - * default locale (in initial locale set for the class) is returned. - *

            - * @method getStrings - * @param {String} locale (optional) The locale for which the string value is required. Defaults to the current locale, if not provided. + * Helper method to get a specific string value + * + * @deprecated Used by deprecated WidgetLocale implementations. + * @method getString + * @param {String} key + * @return {String} The string */ - // TODO: Optimize/Cache. Clear cache on _setStrings call. - getStrings : function(locale) { + getString : function(key) { + return this.get(STRINGS)[key]; + }, - locale = (locale || this.get(LOCALE)).toLowerCase(); + /** + * Helper method to get the complete set of strings for the widget + * + * @deprecated Used by deprecated WidgetLocale implementations. + * @method getString + * @param {String} key + * @return {String} The string + */ + getStrings : function() { + return this.get(STRINGS); + }, + /** + * The lists of UI attributes to bind and sync for widget's _bindUI and _syncUI implementations + * + * @property _UI_ATTRS + * @type Object + * @private + */ + _UI_ATTRS : { + BIND: UI_ATTRS, + SYNC: UI_ATTRS.concat(TAB_INDEX) + } +}); - var defLocale = this.getDefaultLocale().toLowerCase(), - defStrs = this._getStrings(defLocale), - strs = (defStrs) ? Y.merge(defStrs) : {}, - localeSegments = locale.split(HYPHEN); +Y.Widget = Widget; - // If locale is different than the default, or needs lookup support - if (locale !== defLocale || localeSegments.length > 1) { - var lookup = ""; - for (var i = 0, l = localeSegments.length; i < l; ++i) { - lookup += localeSegments[i]; +}, '3.3.0' ,{requires:['attribute', 'event-focus', 'base-base', 'base-pluginhost', 'node-base', 'node-style', 'node-event-delegate', 'classnamemanager']}); +YUI.add('widget-uievents', function(Y) { - var localeStrs = this._getStrings(lookup); - if (localeStrs) { - Y.aggregate(strs, localeStrs, true); +/** + * Support for Widget UI Events (Custom Events fired by the widget, which wrap the underlying DOM events - e.g. widget:click, widget:mousedown) + * + * @module widget + * @submodule widget-uievents + */ + +var BOUNDING_BOX = "boundingBox", + Widget = Y.Widget, + RENDER = "render", + L = Y.Lang, + EVENT_PREFIX_DELIMITER = ":", + + // Map of Node instances serving as a delegation containers for a specific + // event type to Widget instances using that delegation container. + _uievts = Y.Widget._uievts = Y.Widget._uievts || {}; + +Y.mix(Widget.prototype, { + + /** + * Destructor logic for UI event infrastructure, + * invoked during Widget destruction. + * + * @method _destroyUIEvents + * @for Widget + * @private + */ + _destroyUIEvents: function() { + + var widgetGuid = Y.stamp(this, true); + + Y.each(_uievts, function (info, key) { + if (info.instances[widgetGuid]) { + // Unregister this Widget instance as needing this delegated + // event listener. + delete info.instances[widgetGuid]; + + // There are no more Widget instances using this delegated + // event listener, so detach it. + + if (Y.Object.isEmpty(info.instances)) { + info.handle.detach(); + + if (_uievts[key]) { + delete _uievts[key]; + } } - lookup += HYPHEN; } - } + }); + }, - return strs; + /** + * Map of DOM events that should be fired as Custom Events by the + * Widget instance. + * + * @property UI_EVENTS + * @for Widget + * @type Object + */ + UI_EVENTS: Y.Node.DOM_EVENTS, + + /** + * Returns the node on which to bind delegate listeners. + * + * @method _getUIEventNode + * @for Widget + * @protected + */ + _getUIEventNode: function () { + return this.get(BOUNDING_BOX); }, /** - * Gets the string for a particular key, for a particular locale, performing locale lookup. - *

            - * If no values if defined for the key, for the given locale, the value for the - * default locale (in initial locale set for the class) is returned. - *

            - * @method getString - * @param {String} key The key. - * @param {String} locale (optional) The locale for which the string value is required. Defaults to the current locale, if not provided. + * Binds a delegated DOM event listener of the specified type to the + * Widget's outtermost DOM element to facilitate the firing of a Custom + * Event of the same type for the Widget instance. + * + * @private + * @for Widget + * @method _createUIEvent + * @param type {String} String representing the name of the event */ - getString : function(key, locale) { + _createUIEvent: function (type) { + + var uiEvtNode = this._getUIEventNode(), + key = (Y.stamp(uiEvtNode) + type), + info = _uievts[key], + handle; - locale = (locale || this.get(LOCALE)).toLowerCase(); + // For each Node instance: Ensure that there is only one delegated + // event listener used to fire Widget UI events. + if (!info) { - var defLocale = (this.getDefaultLocale()).toLowerCase(), - strs = this._getStrings(defLocale) || {}, - str = strs[key], - idx = locale.lastIndexOf(HYPHEN); + handle = uiEvtNode.delegate(type, function (evt) { - // If locale is different than the default, or needs lookup support - if (locale !== defLocale || idx != -1) { - do { + var widget = Widget.getByNode(this); + // Make the DOM event a property of the custom event + // so that developers still have access to it. + widget.fire(evt.type, { domEvent: evt }); - strs = this._getStrings(locale); - if (strs && key in strs) { - str = strs[key]; - break; + }, "." + Y.Widget.getClassName()); + + _uievts[key] = info = { instances: {}, handle: handle }; + } + + // Register this Widget as using this Node as a delegation container. + info.instances[Y.stamp(this)] = 1; + }, + + /** + * Determines if the specified event is a UI event. + * + * @private + * @method _isUIEvent + * @for Widget + * @param type {String} String representing the name of the event + * @return {String} Event Returns the name of the UI Event, otherwise + * undefined. + */ + _getUIEvent: function (type) { + + if (L.isString(type)) { + var sType = this.parseType(type)[1], + iDelim, + returnVal; + + if (sType) { + // TODO: Get delimiter from ET, or have ET support this. + iDelim = sType.indexOf(EVENT_PREFIX_DELIMITER); + if (iDelim > -1) { + sType = sType.substring(iDelim + EVENT_PREFIX_DELIMITER.length); } - idx = locale.lastIndexOf(HYPHEN); - // Chop of last locale segment - if (idx != -1) { - locale = locale.substring(0, idx); + + if (this.UI_EVENTS[sType]) { + returnVal = sType; } + } - } while (idx != -1); + return returnVal; } + }, - return str; + /** + * Sets up infrastructure required to fire a UI event. + * + * @private + * @method _initUIEvent + * @for Widget + * @param type {String} String representing the name of the event + * @return {String} + */ + _initUIEvent: function (type) { + var sType = this._getUIEvent(type), + queue = this._uiEvtsInitQueue || {}; + + if (sType && !queue[sType]) { + + this._uiEvtsInitQueue = queue[sType] = 1; + + this.after(RENDER, function() { + this._createUIEvent(sType); + delete this._uiEvtsInitQueue[sType]; + }); + } }, + // Override of "on" from Base to facilitate the firing of Widget events + // based on DOM events of the same name/type (e.g. "click", "mouseover"). + // Temporary solution until we have the ability to listen to when + // someone adds an event listener (bug 2528230) + on: function (type) { + this._initUIEvent(type); + return Widget.superclass.on.apply(this, arguments); + }, + + // Override of "publish" from Base to facilitate the firing of Widget events + // based on DOM events of the same name/type (e.g. "click", "mouseover"). + // Temporary solution until we have the ability to listen to when + // someone publishes an event (bug 2528230) + publish: function (type, config) { + var sType = this._getUIEvent(type); + if (sType && config && config.defaultFn) { + this._initUIEvent(sType); + } + return Widget.superclass.publish.apply(this, arguments); + } + +}, true); // overwrite existing EventTarget methods + + +}, '3.3.0' ,{requires:['widget-base', 'node-event-delegate']}); +YUI.add('widget-htmlparser', function(Y) { + +/** + * Adds HTML Parser support to the base Widget class + * + * @module widget + * @submodule widget-htmlparser + * @for Widget + */ + + +var Widget = Y.Widget, + Node = Y.Node, + Lang = Y.Lang, + + SRC_NODE = "srcNode", + CONTENT_BOX = "contentBox"; + +/** + * Object hash, defining how attribute values are to be parsed from + * markup contained in the widget's content box. e.g.: + *
            + *   {
            + *       // Set single Node references using selector syntax 
            + *       // (selector is run through node.one)
            + *       titleNode: "span.yui-title",
            + *       // Set NodeList references using selector syntax 
            + *       // (array indicates selector is to be run through node.all)
            + *       listNodes: ["li.yui-item"],
            + *       // Set other attribute types, using a parse function. 
            + *       // Context is set to the widget instance.
            + *       label: function(contentBox) {
            + *           return contentBox.one("span.title").get("innerHTML");
            + *       }
            + *   }
            + * 
            + * + * @property Widget.HTML_PARSER + * @type Object + * @static + */ +Widget.HTML_PARSER = {}; + +/** + * The build configuration for the Widget class. + *

            + * Defines the static fields which need to be aggregated, + * when this class is used as the main class passed to + * the Base.build method. + *

            + * @property _buildCfg + * @type Object + * @static + * @final + * @private + */ +Widget._buildCfg = { + aggregates : ["HTML_PARSER"] +}; + +/** + * The DOM node to parse for configuration values, passed to the Widget's HTML_PARSER definition + * + * @attribute srcNode + * @type String | Node + * @writeOnce + */ +Widget.ATTRS[SRC_NODE] = { + value: null, + setter: Node.one, + getter: "_getSrcNode", + writeOnce: true +}; + +Y.mix(Widget.prototype, { + /** - * Returns the default locale for the widget (the locale value defined by the - * widget class, or provided by the user during construction). - * - * @method getDefaultLocale - * @return {String} The default locale for the widget + * @method _getSrcNode + * @protected + * @return {Node} The Node to apply HTML_PARSER to */ - getDefaultLocale : function() { - return this._conf.get(LOCALE, INIT_VALUE); + _getSrcNode : function(val) { + return val || this.get(CONTENT_BOX); }, /** - * Private stings hash, used to store strings in locale specific buckets. + * @method _applyParsedConfig + * @protected + * @return {Object} The merged configuration literal + */ + _applyParsedConfig : function(node, cfg, parsedCfg) { + return (parsedCfg) ? Y.mix(cfg, parsedCfg, false) : cfg; + }, + + /** + * Utilitity method used to apply the HTML_PARSER configuration for the + * instance, to retrieve config data values. * - * @property _strings - * @private - * @type Object + * @method _applyParser + * @protected + * @param config {Object} User configuration object (will be populated with values from Node) */ - _strings: null, + _applyParser : function(config) { + + var widget = this, + srcNode = widget.get(SRC_NODE), + schema = widget._getHtmlParser(), + parsedConfig, + val; + + if (schema && srcNode) { + Y.Object.each(schema, function(v, k, o) { + val = null; + + if (Lang.isFunction(v)) { + val = v.call(widget, srcNode); + } else { + if (Lang.isArray(v)) { + val = srcNode.all(v[0]); + if (val.isEmpty()) { + val = null; + } + } else { + val = srcNode.one(v); + } + } + + if (val !== null && val !== undefined) { + parsedConfig = parsedConfig || {}; + parsedConfig[k] = val; + } + }); + } + config = widget._applyParsedConfig(srcNode, config, parsedConfig); + }, /** * Gets the HTML_PARSER definition for this instance, by merging HTML_PARSER * definitions across the class hierarchy. * + * @private * @method _getHtmlParser * @return {Object} HTML_PARSER definition for this instance */ _getHtmlParser : function() { - if (!this._HTML_PARSER) { - var classes = this._getClasses(), - parser = {}, - i, p; - - for (i = classes.length - 1; i >= 0; i--) { - p = classes[i].HTML_PARSER; - if (p) { - Y.mix(parser, p, true); - } - } + // Removed caching for kweight. This is a private method + // and only called once so don't need to cache HTML_PARSER + var classes = this._getClasses(), + parser = {}, + i, p; - this._HTML_PARSER = parser; + for (i = classes.length - 1; i >= 0; i--) { + p = classes[i].HTML_PARSER; + if (p) { + Y.mix(parser, p, true); + } } - - return this._HTML_PARSER; + return parser; } }); -Y.Widget = Widget; +}, '3.3.0' ,{requires:['widget-base']}); +YUI.add('widget-skin', function(Y) { + +/** + * Provides skin related utlility methods. + * + * @module widget + * @submodule widget-skin + */ + +var BOUNDING_BOX = "boundingBox", + CONTENT_BOX = "contentBox", + SKIN = "skin", + _getClassName = Y.ClassNameManager.getClassName; + +/** + * Returns the name of the skin that's currently applied to the widget. + * This is only really useful after the widget's DOM structure is in the + * document, either by render or by progressive enhancement. Searches up + * the Widget's ancestor axis for a class yui3-skin-(name), and returns the + * (name) portion. Otherwise, returns null. + * + * @method getSkinName + * @for Widget + * @return {String} the name of the skin, or null (yui3-skin-sam => sam) + */ + +Y.Widget.prototype.getSkinName = function () { + var root = this.get( CONTENT_BOX ) || this.get( BOUNDING_BOX ), + search = new RegExp( '\\b' + _getClassName( SKIN ) + '-(\\S+)' ), + match; + + if ( root ) { + root.ancestor( function ( node ) { + match = node.get( 'className' ).match( search ); + return match; + } ); + } + + return ( match ) ? match[1] : null; +}; + + +}, '3.3.0' ,{requires:['widget-base']}); + + +YUI.add('widget', function(Y){}, '3.3.0' ,{use:['widget-base', 'widget-uievents', 'widget-htmlparser', 'widget-skin']}); -}, '3.0.0' ,{requires:['attribute', 'event-focus', 'base', 'node', 'classnamemanager']}); diff --git a/jssource/src_files/include/javascript/yui3/build/yql/yql-min.js b/jssource/src_files/include/javascript/yui3/build/yql/yql-min.js new file mode 100644 index 00000000..0ccc0dd5 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/yql/yql-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("yql",function(B){var A=function(E,F,D,C){if(!D){D={};}D.q=E;if(!D.format){D.format=B.YQLRequest.FORMAT;}if(!D.env){D.env=B.YQLRequest.ENV;}this._params=D;this._opts=C;this._callback=F;};A.prototype={_jsonp:null,_opts:null,_callback:null,_params:null,send:function(){var C="",D=((this._opts&&this._opts.proto)?this._opts.proto:B.YQLRequest.PROTO);B.each(this._params,function(G,F){C+=F+"="+encodeURIComponent(G)+"&";});D+=((this._opts&&this._opts.base)?this._opts.base:B.YQLRequest.BASE_URL)+C;var E=(!B.Lang.isFunction(this._callback))?this._callback:{on:{success:this._callback}};if(E.allowCache!==false){E.allowCache=true;}if(!this._jsonp){this._jsonp=B.jsonp(D,E);}else{this._jsonp.url=D;if(E.on&&E.on.success){this._jsonp._config.on.success=E.on.success;}this._jsonp.send();}return this;}};A.FORMAT="json";A.PROTO="http";A.BASE_URL=":/"+"/query.yahooapis.com/v1/public/yql?";A.ENV="http:/"+"/datatables.org/alltables.env";B.YQLRequest=A;B.YQL=function(D,E,C){return new B.YQLRequest(D,E,C).send();};},"3.3.0",{requires:["jsonp"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/yql/yql.js b/jssource/src_files/include/javascript/yui3/build/yql/yql.js new file mode 100644 index 00000000..58b526c4 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/yql/yql.js @@ -0,0 +1,142 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('yql', function(Y) { + + /** + * This class adds a sugar class to allow access to YQL (http://developer.yahoo.com/yql/). + * @module yql + */ + /** + * Utility Class used under the hood my the YQL class + * @class YQLRequest + * @constructor + * @param {String} sql The SQL statement to execute + * @param {Function/Object} callback The callback to execute after the query (Falls through to JSONP). + * @param {Object} params An object literal of extra parameters to pass along (optional). + * @param {Object} opts An object literal of configuration options (optional): proto (http|https), base (url) + */ + var YQLRequest = function (sql, callback, params, opts) { + + if (!params) { + params = {}; + } + params.q = sql; + //Allow format override.. JSON-P-X + if (!params.format) { + params.format = Y.YQLRequest.FORMAT; + } + if (!params.env) { + params.env = Y.YQLRequest.ENV; + } + + this._params = params; + this._opts = opts; + this._callback = callback; + + }; + + YQLRequest.prototype = { + /** + * @private + * @property _jsonp + * @description Reference to the JSONP instance used to make the queries + */ + _jsonp: null, + /** + * @private + * @property _opts + * @description Holder for the opts argument + */ + _opts: null, + /** + * @private + * @property _callback + * @description Holder for the callback argument + */ + _callback: null, + /** + * @private + * @property _params + * @description Holder for the params argument + */ + _params: null, + /** + * @method send + * @description The method that executes the YQL Request. + * @chainable + * @returns {YQLRequest} + */ + send: function() { + var qs = '', url = ((this._opts && this._opts.proto) ? this._opts.proto : Y.YQLRequest.PROTO); + + Y.each(this._params, function(v, k) { + qs += k + '=' + encodeURIComponent(v) + '&'; + }); + + url += ((this._opts && this._opts.base) ? this._opts.base : Y.YQLRequest.BASE_URL) + qs; + + var o = (!Y.Lang.isFunction(this._callback)) ? this._callback : { on: { success: this._callback } }; + if (o.allowCache !== false) { + o.allowCache = true; + } + + if (!this._jsonp) { + this._jsonp = Y.jsonp(url, o); + } else { + this._jsonp.url = url; + if (o.on && o.on.success) { + this._jsonp._config.on.success = o.on.success; + } + this._jsonp.send(); + } + return this; + } + }; + + /** + * @static + * @property FORMAT + * @description Default format to use: json + */ + YQLRequest.FORMAT = 'json'; + /** + * @static + * @property PROTO + * @description Default protocol to use: http + */ + YQLRequest.PROTO = 'http'; + /** + * @static + * @property BASE_URL + * @description The base URL to query: query.yahooapis.com/v1/public/yql? + */ + YQLRequest.BASE_URL = ':/'+'/query.yahooapis.com/v1/public/yql?'; + /** + * @static + * @property ENV + * @description The environment file to load: http://datatables.org/alltables.env + */ + YQLRequest.ENV = 'http:/'+'/datatables.org/alltables.env'; + + Y.YQLRequest = YQLRequest; + + /** + * This class adds a sugar class to allow access to YQL (http://developer.yahoo.com/yql/). + * @class YQL + * @constructor + * @param {String} sql The SQL statement to execute + * @param {Function} callback The callback to execute after the query (optional). + * @param {Object} params An object literal of extra parameters to pass along (optional). + */ + Y.YQL = function(sql, callback, params) { + return new Y.YQLRequest(sql, callback, params).send(); + }; + + + +}, '3.3.0' ,{requires:['jsonp']}); diff --git a/jssource/src_files/include/javascript/yui3/build/yui-base/yui-base-min.js b/jssource/src_files/include/javascript/yui3/build/yui-base/yui-base-min.js deleted file mode 100644 index 2610c6ce..00000000 --- a/jssource/src_files/include/javascript/yui3/build/yui-base/yui-base-min.js +++ /dev/null @@ -1,9 +0,0 @@ -/* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. -Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 -*/ -(function(){var I={},B=new Date().getTime(),A,E,H=function(){if(window.addEventListener){return function(M,L,K,J){M.addEventListener(L,K,(!!J));};}else{if(window.attachEvent){return function(L,K,J){L.attachEvent("on"+K,J);};}else{return function(){};}}}(),F=function(){if(window.removeEventListener){return function(M,L,K,J){M.removeEventListener(L,K,!!J);};}else{if(window.detachEvent){return function(L,K,J){L.detachEvent("on"+K,J);};}else{return function(){};}}}(),D=function(){YUI.Env.windowLoaded=true;YUI.Env.DOMReady=true;F(window,"load",D);},C={"io.xdrReady":1,"io.start":1,"io.success":1,"io.failure":1},G=Array.prototype.slice;if(typeof YUI==="undefined"||!YUI){YUI=function(O,N,M,L,J){var K=this,R=arguments,Q,P=R.length;if(!(K instanceof YUI)){return new YUI(O,N,M,L,J);}else{K._init();for(Q=0;Q-1){J="test";}K.version=J;K.Env={mods:{},cdn:"http://yui.yahooapis.com/"+J+"/build/",bootstrapped:false,_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_loaded:{}};K.Env._loaded[J]={};if(YUI.Env){K.Env._yidx=(++YUI.Env._yidx);K.Env._guidp=("yui_"+J+"-"+K.Env._yidx+"-"+B).replace(/\./g,"_");K.id=K.stamp(K);I[K.id]=K;}K.constructor=YUI;K.config={win:window||{},doc:document,debug:true,useBrowserConsole:true,throwFail:true,base:function(){var M,N,P,O;N=document.getElementsByTagName("script");for(P=0;P1)){E=2;}}catch(F){}}}return E;};D.each=(C.forEach)?function(E,F,G){C.forEach.call(E||[],F,G||A);return A;}:function(F,H,I){var E=(F&&F.length)||0,G;for(G=0;GH)?F[H]:true;}return J;};D.indexOf=(C.indexOf)?function(E,F){return C.indexOf.call(E,F);}:function(E,G){for(var F=0;F-1);};D.owns=function(F,E){return(F.hasOwnProperty(E));};D.each=function(I,H,J,G){var F=J||A,E;for(E in I){if(G||I.hasOwnProperty(E)){H.call(F,I[E],E,I);}}return A;};D.getValue=function(I,H){var G=A.Array(H),E=G.length,F;for(F=0;I!==C&&F=0){for(E=0;F!==C&&E -1) { - v = 'test'; - } - - Y.version = v; - - Y.Env = { - // @todo expand the new module metadata - mods: {}, - cdn: 'http://yui.yahooapis.com/' + v + '/build/', - bootstrapped: false, - _idx: 0, - _used: {}, - _attached: {}, - _yidx: 0, - _uidx: 0, - _loaded: {} - }; - - Y.Env._loaded[v] = {}; - - if (YUI.Env) { - Y.Env._yidx = (++YUI.Env._yidx); - Y.Env._guidp = ('yui_' + v + '-' + Y.Env._yidx + '-' + _startTime).replace(/\./g, '_'); - Y.id = Y.stamp(Y); - _instances[Y.id] = Y; - } - - Y.constructor = YUI; - - // configuration defaults - Y.config = { - - win: window || {}, - doc: document, - debug: true, - useBrowserConsole: true, - throwFail: true, - - base: function() { - var b, nodes, i, match; - - // get from querystring - nodes = document.getElementsByTagName('script'); - - for (i=0; i - * YUI.namespace("property.package"); - * YUI.namespace("YAHOO.property.package"); - * - * Either of the above would create YUI.property, then - * YUI.property.package (YAHOO is scrubbed out, this is - * to remain compatible with YUI2) - * - * Be careful when naming packages. Reserved words may work in some browsers - * and not others. For instance, the following will fail in Safari: - *
            -     * YUI.namespace("really.long.nested.namespace");
            -     * 
            - * This fails because "long" is a future reserved word in ECMAScript - * - * @method namespace - * @param {string*} arguments 1-n namespaces to create - * @return {object} A reference to the last namespace object created - */ - namespace: function() { - var a=arguments, o=null, i, j, d; - for (i=0; i - *
            DEBUG
            - *
            Selects the debug versions of the library (e.g., event-debug.js). - * This option will automatically include the Logger widget
            - *
            RAW
            - *
            Selects the non-minified version of the library (e.g., event.js).
            - * - * You can also define a custom filter, which must be an object literal - * containing a search expression and a replace string: - *
            - *  myFilter: { 
            - *      'searchExp': "-min\\.js", 
            - *      'replaceStr': "-debug.js"
            - *  }
            - * 
            - * - * For dynamic loading. - * - * @property filter - * @type string|object - */ - -/** - * Hash of per-component filter specification. If specified for a given component, - * this overrides the filter config - * - * For dynamic loading. - * - * @property filters - * @type object - */ - -/** - * Use the YUI combo service to reduce the number of http connections - * required to load your dependencies. - * - * For dynamic loading. - * - * @property combine - * @type boolean - * @default true if 'base' is not supplied, false if it is. - */ - -/** - * A list of modules that should never be dynamically loaded - * - * @property ignore - * @type string[] - */ - -/** - * A list of modules that should always be loaded when required, even if already - * present on the page. - * - * @property force - * @type string[] - */ - -/** - * Node or id for a node that should be used as the insertion point for new nodes - * For dynamic loading. - * - * @property insertBefore - * @type string - */ - -/** - * charset for dynamic nodes - * - * @property charset - * @type string - * @deprecated use jsAttributes cssAttributes - */ - -/** - * Object literal containing attributes to add to dynamically loaded script nodes. - * - * @property jsAttributes - * @type string - */ - -/** - * Object literal containing attributes to add to dynamically loaded link nodes. - * - * @property cssAttributes - * @type string - */ - -/** - * Number of milliseconds before a timeout occurs when dynamically - * loading nodes. If not set, there is no timeout. - * - * @property timeout - * @type int - */ - -/** - * Callback for the 'CSSComplete' event. When dynamically loading YUI - * components with CSS, this property fires when the CSS is finished - * loading but script loading is still ongoing. This provides an - * opportunity to enhance the presentation of a loading page a little - * bit before the entire loading process is done. - * - * @property onCSS - * @type function - */ - -/** - * A list of module definitions to add to the list of YUI components. - * These components can then be dynamically loaded side by side with - * YUI via the use() method.See Loader.addModule for the supported - * module metadata. - * - * @property modules - * @type function - */ - -/** - * The loader 'path' attribute to the loader itself. This is combined - * with the 'base' attribute to dynamically load the loader component - * when boostrapping with the get utility alone. - * - * @property loaderPath - * @default loader/loader-min.js - */ -YUI.add('yui-base', function(Y) { - -/* - * YUI stub - * @module yui - * @submodule yui-base - */ -(function() { - -var INSTANCE = Y, - LOGEVENT = 'yui:log', - UNDEFINED = 'undefined', - LEVELS = { debug: 1, info: 1, warn: 1, error: 1 }, - _published; - -/** - * If the 'debug' config is true, a 'yui:log' event will be - * dispatched, which the Console widget and anything else - * can consume. If the 'useBrowserConsole' config is true, it will - * write to the browser console if available. YUI-specific log - * messages will only be present in the -debug versions of the - * JS files. The build system is supposed to remove log statements - * from the raw and minified versions of the files. - * - * @method log - * @for YUI - * @param {String} msg The message to log. - * @param {String} cat The log category for the message. Default - * categories are "info", "warn", "error", time". - * Custom categories can be used as well. (opt) - * @param {String} src The source of the the message (opt) - * @param {boolean} silent If true, the log event won't fire - * @return {YUI} YUI instance - */ -INSTANCE.log = function(msg, cat, src, silent) { - var Y = INSTANCE, c = Y.config, bail = false, excl, incl, m, f; - // suppress log message if the config is off or the event stack - // or the event call stack contains a consumer of the yui:log event - if (c.debug) { - // apply source filters - if (src) { - - excl = c.logExclude; - incl = c.logInclude; - - if (incl && !(src in incl)) { - bail = 1; - } else if (excl && (src in excl)) { - bail = 1; - } - } - - if (!bail) { - - if (c.useBrowserConsole) { - m = (src) ? src + ': ' + msg : msg; - if (typeof console != UNDEFINED && console.log) { - f = (cat && console[cat] && (cat in LEVELS)) ? cat : 'log'; - console[f](m); - } else if (typeof opera != UNDEFINED) { - opera.postError(m); - } - } - - if (Y.fire && !bail && !silent) { - if (!_published) { - Y.publish(LOGEVENT, { - broadcast: 2, - emitFacade: 1 - }); - - _published = 1; - - } - Y.fire(LOGEVENT, { - msg: msg, - cat: cat, - src: src - }); - } - } - } - - return Y; -}; - -/** - * Write a system message. This message will be preserved in the - * minified and raw versions of the YUI files, unlike log statements. - * @method message - * @for YUI - * @param {String} msg The message to log. - * @param {String} cat The log category for the message. Default - * categories are "info", "warn", "error", time". - * Custom categories can be used as well. (opt) - * @param {String} src The source of the the message (opt) - * @param {boolean} silent If true, the log event won't fire - * @return {YUI} YUI instance - */ -INSTANCE.message = function() { - return INSTANCE.log.apply(INSTANCE, arguments); -}; - -})(); -(function() { -/** - * Provides the language utilites and extensions used by the library - * @class Lang - * @static - */ -Y.Lang = Y.Lang || {}; - -var L = Y.Lang, - -ARRAY = 'array', -BOOLEAN = 'boolean', -DATE = 'date', -ERROR = 'error', -FUNCTION = 'function', -NUMBER = 'number', -NULL = 'null', -OBJECT = 'object', -REGEX = 'regexp', -STRING = 'string', -TOSTRING = Object.prototype.toString, -UNDEFINED = 'undefined', - -TYPES = { - 'undefined' : UNDEFINED, - 'number' : NUMBER, - 'boolean' : BOOLEAN, - 'string' : STRING, - '[object Function]' : FUNCTION, - '[object RegExp]' : REGEX, - '[object Array]' : ARRAY, - '[object Date]' : DATE, - '[object Error]' : ERROR -}, - -TRIMREGEX = /^\s+|\s+$/g, -EMPTYSTRING = ''; - -/** - * Determines whether or not the provided item is an array. - * Returns false for array-like collections such as the - * function arguments collection or HTMLElement collection - * will return false. You can use @see Array.test if you - * want to - * @method isArray - * @static - * @param o The object to test - * @return {boolean} true if o is an array - */ -L.isArray = function(o) { - return L.type(o) === ARRAY; -}; - -/** - * Determines whether or not the provided item is a boolean - * @method isBoolean - * @static - * @param o The object to test - * @return {boolean} true if o is a boolean - */ -L.isBoolean = function(o) { - return typeof o === BOOLEAN; -}; - -/** - * Determines whether or not the provided item is a function - * Note: Internet Explorer thinks certain functions are objects: - * - * var obj = document.createElement("object"); - * Y.Lang.isFunction(obj.getAttribute) // reports false in IE - * - * var input = document.createElement("input"); // append to body - * Y.Lang.isFunction(input.focus) // reports false in IE - * - * You will have to implement additional tests if these functions - * matter to you. - * - * @method isFunction - * @static - * @param o The object to test - * @return {boolean} true if o is a function - */ -L.isFunction = function(o) { - return L.type(o) === FUNCTION; -}; - -/** - * Determines whether or not the supplied item is a date instance - * @method isDate - * @static - * @param o The object to test - * @return {boolean} true if o is a date - */ -L.isDate = function(o) { - // return o instanceof Date; - return L.type(o) === DATE; -}; - -/** - * Determines whether or not the provided item is null - * @method isNull - * @static - * @param o The object to test - * @return {boolean} true if o is null - */ -L.isNull = function(o) { - return o === null; -}; - -/** - * Determines whether or not the provided item is a legal number - * @method isNumber - * @static - * @param o The object to test - * @return {boolean} true if o is a number - */ -L.isNumber = function(o) { - return typeof o === NUMBER && isFinite(o); -}; - -/** - * Determines whether or not the provided item is of type object - * or function - * @method isObject - * @static - * @param o The object to test - * @param failfn {boolean} fail if the input is a function - * @return {boolean} true if o is an object - */ -L.isObject = function(o, failfn) { -return (o && (typeof o === OBJECT || (!failfn && L.isFunction(o)))) || false; -}; - -/** - * Determines whether or not the provided item is a string - * @method isString - * @static - * @param o The object to test - * @return {boolean} true if o is a string - */ -L.isString = function(o) { - return typeof o === STRING; -}; - -/** - * Determines whether or not the provided item is undefined - * @method isUndefined - * @static - * @param o The object to test - * @return {boolean} true if o is undefined - */ -L.isUndefined = function(o) { - return typeof o === UNDEFINED; -}; - -/** - * Returns a string without any leading or trailing whitespace. If - * the input is not a string, the input will be returned untouched. - * @method trim - * @static - * @param s {string} the string to trim - * @return {string} the trimmed string - */ -L.trim = function(s){ - try { - return s.replace(TRIMREGEX, EMPTYSTRING); - } catch(e) { - return s; - } -}; - -/** - * A convenience method for detecting a legitimate non-null value. - * Returns false for null/undefined/NaN, true for other values, - * including 0/false/'' - * @method isValue - * @static - * @param o The item to test - * @return {boolean} true if it is not null/undefined/NaN || false - */ -L.isValue = function(o) { - var t = L.type(o); - switch (t) { - case NUMBER: - return isFinite(o); - case NULL: - case UNDEFINED: - return false; - default: - return !!(t); - } -}; - -/** - * Returns a string representing the type of the item passed in. - * @method type - * @param o the item to test - * @return {string} the detected type - */ -L.type = function (o) { - return TYPES[typeof o] || TYPES[TOSTRING.call(o)] || (o ? OBJECT : NULL); -}; - -})(); - -/* - * Provides information about the environment hosting YUI - * @module yui - * @submodule Array - */ - -(function() { - -var L = Y.Lang, Native = Array.prototype, - -/** - * Adds the following array utilities to the YUI instance. Additional - * array helpers can be found in the collection component. - * @class Array - */ - -/** - * Y.Array(o) returns an array: - * - Arrays are return unmodified unless the start position is specified. - * - "Array-like" collections (@see Array.test) are converted to arrays - * - For everything else, a new array is created with the input as the sole item - * - The start position is used if the input is or is like an array to return - * a subset of the collection. - * - * @TODO this will not automatically convert elements that are also collections - * such as forms and selects. Passing true as the third param will - * force a conversion. - * - * @method () - * @static - * @param o the item to arrayify - * @param i {int} if an array or array-like, this is the start index - * @param al {boolean} if true, it forces the array-like fork. This - * can be used to avoid multiple array.test calls. - * @return {Array} the resulting array - */ -YArray = function(o, startIdx, al) { - var t = (al) ? 2 : Y.Array.test(o), i, l, a; - - // switch (t) { - // case 1: - // // return (startIdx) ? o.slice(startIdx) : o; - // case 2: - // return Native.slice.call(o, startIdx || 0); - // default: - // return [o]; - // } - - if (t) { - try { - return Native.slice.call(o, startIdx || 0); - // IE errors when trying to slice element collections - } catch(e) { - a=[]; - for (i=0, l=o.length; i 1)) { - r = 2; - } - - } catch(e) {} - } - } - return r; -}; - -/** - * Executes the supplied function on each item in the array. - * @method each - * @param a {Array} the array to iterate - * @param f {Function} the function to execute on each item - * @param o Optional context object - * @static - * @return {YUI} the YUI instance - */ -YArray.each = (Native.forEach) ? - function (a, f, o) { - Native.forEach.call(a || [], f, o || Y); - return Y; - } : - function (a, f, o) { - var l = (a && a.length) || 0, i; - for (i = 0; i < l; i=i+1) { - f.call(o || Y, a[i], i, a); - } - return Y; - }; - -/** - * Returns an object using the first array as keys, and - * the second as values. If the second array is not - * provided the value is set to true for each. - * @method hash - * @static - * @param k {Array} keyset - * @param v {Array} optional valueset - * @return {object} the hash - */ -YArray.hash = function(k, v) { - var o = {}, l = k.length, vl = v && v.length, i; - for (i=0; i i) ? v[i] : true; - } - - return o; -}; - -/** - * Returns the index of the first item in the array - * that contains the specified value, -1 if the - * value isn't found. - * @method indexOf - * @static - * @param a {Array} the array to search - * @param val the value to search for - * @return {int} the index of the item that contains the value or -1 - */ -YArray.indexOf = (Native.indexOf) ? - function(a, val) { - return Native.indexOf.call(a, val); - } : - function(a, val) { - for (var i=0; i -1); -}; - -/** - * Determines whether or not the property was added - * to the object instance. Returns false if the property is not present - * in the object, or was inherited from the prototype. - * - * @deprecated Safari 1.x support has been removed, so this is simply a - * wrapper for the native implementation. Use the native implementation - * directly instead. - * - * @TODO Remove in B1 - * - * @method owns - * @static - * @param o {any} The object being testing - * @param p {string} the property to look for - * @return {boolean} true if the object has the property on the instance - */ -O.owns = function(o, k) { - return (o.hasOwnProperty(k)); -}; - -/** - * Executes a function on each item. The function - * receives the value, the key, and the object - * as paramters (in that order). - * @method each - * @static - * @param o the object to iterate - * @param f {function} the function to execute - * @param c the execution context - * @param proto {boolean} include proto - * @return {YUI} the YUI instance - */ -O.each = function (o, f, c, proto) { - var s = c || Y, i; - - for (i in o) { - if (proto || o.hasOwnProperty(i)) { - f.call(s, o[i], i, o); - } - } - return Y; -}; - -/** - * Retrieves the sub value at the provided path, - * from the value object provided. - * - * @method getValue - * @param o The object from which to extract the property value - * @param path {Array} A path array, specifying the object traversal path - * from which to obtain the sub value. - * @return {Any} The value stored in the path, undefined if not found. - * Returns the source object if an empty path is provided. - */ -O.getValue = function (o, path) { - var p=Y.Array(path), l=p.length, i; - - for (i=0; o !== UNDEFINED && i < l; i=i+1) { - o = o[p[i]]; - } - - return o; -}; - -/** - * Sets the sub-attribute value at the provided path on the - * value object. Returns the modified value object, or - * undefined if the path is invalid. - * - * @method setValue - * @param o The object on which to set the sub value. - * @param path {Array} A path array, specifying the object traversal path - * at which to set the sub value. - * @param val {Any} The new value for the sub-attribute. - * @return {Object} The modified object, with the new sub value set, or - * undefined, if the path was invalid. - */ -O.setValue = function(o, path, val) { - - var p=Y.Array(path), leafIdx=p.length-1, i, ref=o; - - if (leafIdx >= 0) { - for (i=0; ref !== UNDEFINED && i < leafIdx; i=i+1) { - ref = ref[p[i]]; - } - - if (ref !== UNDEFINED) { - ref[p[i]] = val; - } else { - return UNDEFINED; - } - } - - return o; -}; - - -})(); - -/* - * Provides information about the environment hosting YUI - * @module yui - * @submodule UA - */ -/** - * YUI user agent detection. - * Do not fork for a browser if it can be avoided. Use feature detection when - * you can. Use the user agent as a last resort. UA stores a version - * number for the browser engine, 0 otherwise. This value may or may not map - * to the version number of the browser using the engine. The value is - * presented as a float so that it can easily be used for boolean evaluation - * as well as for looking for a particular range of versions. Because of this, - * some of the granularity of the version info may be lost (e.g., Gecko 1.8.0.9 - * reports 1.8). - * @class UA - * @static - */ -Y.UA = function() { - - var numberfy = function(s) { - var c = 0; - return parseFloat(s.replace(/\./g, function() { - return (c++ == 1) ? '' : '.'; - })); - }, - - nav = navigator, - - o = { - - /** - * Internet Explorer version number or 0. Example: 6 - * @property ie - * @type float - * @static - */ - ie: 0, - - /** - * Opera version number or 0. Example: 9.2 - * @property opera - * @type float - * @static - */ - opera: 0, - - /** - * Gecko engine revision number. Will evaluate to 1 if Gecko - * is detected but the revision could not be found. Other browsers - * will be 0. Example: 1.8 - *
            -         * Firefox 1.0.0.4: 1.7.8   <-- Reports 1.7
            -         * Firefox 1.5.0.9: 1.8.0.9 <-- Reports 1.8
            -         * Firefox 2.0.0.3: 1.8.1.3 <-- Reports 1.8
            -         * Firefox 3 alpha: 1.9a4   <-- Reports 1.9
            -         * 
            - * @property gecko - * @type float - * @static - */ - gecko: 0, - - /** - * AppleWebKit version. KHTML browsers that are not WebKit browsers - * will evaluate to 1, other browsers 0. Example: 418.9 - *
            -         * Safari 1.3.2 (312.6): 312.8.1 <-- Reports 312.8 -- currently the 
            -         *                                   latest available for Mac OSX 10.3.
            -         * Safari 2.0.2:         416     <-- hasOwnProperty introduced
            -         * Safari 2.0.4:         418     <-- preventDefault fixed
            -         * Safari 2.0.4 (419.3): 418.9.1 <-- One version of Safari may run
            -         *                                   different versions of webkit
            -         * Safari 2.0.4 (419.3): 419     <-- Tiger installations that have been
            -         *                                   updated, but not updated
            -         *                                   to the latest patch.
            -         * Webkit 212 nightly:   522+    <-- Safari 3.0 precursor (with native SVG
            -         *                                   and many major issues fixed).
            -         * Safari 3.0.4 (523.12) 523.12  <-- First Tiger release - automatic update
            -         *                                   from 2.x via the 10.4.11 OS patch
            -         * Webkit nightly 1/2008:525+    <-- Supports DOMContentLoaded event.
            -         *                                   yahoo.com user agent hack removed.
            -         * 
            - * http://en.wikipedia.org/wiki/Safari_(web_browser)#Version_history - * @property webkit - * @type float - * @static - */ - webkit: 0, - - /** - * The mobile property will be set to a string containing any relevant - * user agent information when a modern mobile browser is detected. - * Currently limited to Safari on the iPhone/iPod Touch, Nokia N-series - * devices with the WebKit-based browser, and Opera Mini. - * @property mobile - * @type string - * @static - */ - mobile: null, - - /** - * Adobe AIR version number or 0. Only populated if webkit is detected. - * Example: 1.0 - * @property air - * @type float - */ - air: 0, - - /** - * Google Caja version number or 0. - * @property caja - * @type float - */ - caja: nav.cajaVersion, - - /** - * Set to true if the page appears to be in SSL - * @property secure - * @type boolean - * @static - */ - secure: false, - - /** - * The operating system. Currently only detecting windows or macintosh - * @property os - * @type string - * @static - */ - os: null - - }, - - ua = nav && nav.userAgent, - - loc = Y.config.win.location, - - href = loc && loc.href, - - m; - - o.secure = href && (href.toLowerCase().indexOf("https") === 0); - - if (ua) { - - if ((/windows|win32/i).test(ua)) { - o.os = 'windows'; - } else if ((/macintosh/i).test(ua)) { - o.os = 'macintosh'; - } - - // Modern KHTML browsers should qualify as Safari X-Grade - if ((/KHTML/).test(ua)) { - o.webkit=1; - } - // Modern WebKit browsers are at least X-Grade - m=ua.match(/AppleWebKit\/([^\s]*)/); - if (m&&m[1]) { - o.webkit=numberfy(m[1]); - - // Mobile browser check - if (/ Mobile\//.test(ua)) { - o.mobile = "Apple"; // iPhone or iPod Touch - } else { - m=ua.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/); - if (m) { - o.mobile = m[0]; // Nokia N-series, Android, webOS, ex: NokiaN95 - } - } - - m=ua.match(/AdobeAIR\/([^\s]*)/); - if (m) { - o.air = m[0]; // Adobe AIR 1.0 or better - } - - } - - if (!o.webkit) { // not webkit - // @todo check Opera/8.01 (J2ME/MIDP; Opera Mini/2.0.4509/1316; fi; U; ssr) - m=ua.match(/Opera[\s\/]([^\s]*)/); - if (m&&m[1]) { - o.opera=numberfy(m[1]); - m=ua.match(/Opera Mini[^;]*/); - if (m) { - o.mobile = m[0]; // ex: Opera Mini/2.0.4509/1316 - } - } else { // not opera or webkit - m=ua.match(/MSIE\s([^;]*)/); - if (m&&m[1]) { - o.ie=numberfy(m[1]); - } else { // not opera, webkit, or ie - m=ua.match(/Gecko\/([^\s]*)/); - if (m) { - o.gecko=1; // Gecko detected, look for revision - m=ua.match(/rv:([^\s\)]*)/); - if (m&&m[1]) { - o.gecko=numberfy(m[1]); - } - } - } - } - } - } - - return o; -}(); -(function() { - var L = Y.Lang, - - /** - * Executes the supplied function in the context of the supplied - * object 'when' milliseconds later. Executes the function a - * single time unless periodic is set to true. - * @method later - * @for YUI - * @param when {int} the number of milliseconds to wait until the fn - * is executed. - * @param o the context object. - * @param fn {Function|String} the function to execute or the name of - * the method in the 'o' object to execute. - * @param data [Array] data that is provided to the function. This accepts - * either a single item or an array. If an array is provided, the - * function is executed with one parameter for each array item. If - * you need to pass a single array parameter, it needs to be wrapped in - * an array [myarray]. - * @param periodic {boolean} if true, executes continuously at supplied - * interval until canceled. - * @return {object} a timer object. Call the cancel() method on this object to - * stop the timer. - */ - later = function(when, o, fn, data, periodic) { - when = when || 0; - o = o || {}; - var m=fn, d=data, f, r; - - if (L.isString(fn)) { - m = o[fn]; - } - - if (!m) { - Y.error("method undefined"); - } - - if (!L.isArray(d)) { - d = [data]; - } - - f = function() { - m.apply(o, d); - }; - - r = (periodic) ? setInterval(f, when) : setTimeout(f, when); - - return { - id: r, - interval: periodic, - cancel: function() { - if (this.interval) { - clearInterval(r); - } else { - clearTimeout(r); - } - } - }; - }; - - Y.later = later; - L.later = later; - -})(); -(function() { - - var min = ['yui-base'], core, C = Y.config, LOADER='loader'; - - // apply the minimal required functionality - Y.use.apply(Y, min); - - - if (C.core) { - core = C.core; - } else { - core = ['queue-base', 'get']; - if (YUI.Env.mods[LOADER]) { - core.push(LOADER); - } - } - - Y.use.apply(Y, core); - -})(); - - - -}, '3.0.0' ); diff --git a/jssource/src_files/include/javascript/yui3/build/yui/features-min.js b/jssource/src_files/include/javascript/yui3/build/yui/features-min.js new file mode 100644 index 00000000..b22262a7 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/yui/features-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("features",function(b){var c={};b.mix(b.namespace("Features"),{tests:c,add:function(d,e,f){c[d]=c[d]||{};c[d][e]=f;},all:function(e,f){var g=c[e],d="";if(g){b.Object.each(g,function(i,h){d+=h+":"+(b.Features.test(e,h,f)?1:0)+";";});}return d;},test:function(e,g,f){f=f||[];var d,i,k,j=c[e],h=j&&j[g];if(!h){}else{d=h.result;if(b.Lang.isUndefined(d)){i=h.ua;if(i){d=(b.UA[i]);}k=h.test;if(k&&((!i)||d)){d=k.apply(b,f);}h.result=d;}}return d;}});var a=b.Features.add;a("load","0",{"test":function(d){return !(d.UA.ios||d.UA.android);},"trigger":"autocomplete-list"});a("load","1",{"test":function(j){var h=j.Features.test,i=j.Features.add,f=j.config.win,g=j.config.doc,d="documentElement",e=false;i("style","computedStyle",{test:function(){return f&&"getComputedStyle" in f;}});i("style","opacity",{test:function(){return g&&"opacity" in g[d].style;}});e=(!h("style","opacity")&&!h("style","computedStyle"));return e;},"trigger":"dom-style"});a("load","2",{"trigger":"widget-base","ua":"ie"});a("load","3",{"test":function(e){var d=e.config.doc&&e.config.doc.implementation;return(d&&(!d.hasFeature("Events","2.0")));},"trigger":"node-base"});a("load","4",{"test":function(d){return(d.config.win&&("ontouchstart" in d.config.win&&!d.UA.chrome));},"trigger":"dd-drag"});a("load","5",{"test":function(e){var d=e.config.doc.documentMode;return e.UA.ie&&(!("onhashchange" in e.config.win)||!d||d<8);},"trigger":"history-hash"});},"3.3.0",{requires:["yui-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/yui/features.js b/jssource/src_files/include/javascript/yui3/build/yui/features.js new file mode 100644 index 00000000..8afc54af --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/yui/features.js @@ -0,0 +1,153 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('features', function(Y) { + +var feature_tests = {}; + +Y.mix(Y.namespace('Features'), { + + tests: feature_tests, + + add: function(cat, name, o) { + feature_tests[cat] = feature_tests[cat] || {}; + feature_tests[cat][name] = o; + }, + + all: function(cat, args) { + var cat_o = feature_tests[cat], + // results = {}; + result = ''; + if (cat_o) { + Y.Object.each(cat_o, function(v, k) { + // results[k] = Y.Features.test(cat, k, args); + result += k + ':' + + (Y.Features.test(cat, k, args) ? 1 : 0) + ';'; + }); + } + + return result; + }, + + test: function(cat, name, args) { + args = args || []; + var result, ua, test, + cat_o = feature_tests[cat], + feature = cat_o && cat_o[name]; + + if (!feature) { + } else { + + result = feature.result; + + if (Y.Lang.isUndefined(result)) { + + ua = feature.ua; + if (ua) { + result = (Y.UA[ua]); + } + + test = feature.test; + if (test && ((!ua) || result)) { + result = test.apply(Y, args); + } + + feature.result = result; + } + } + + return result; + } +}); + +// Y.Features.add("load", "1", {}); +// Y.Features.test("load", "1"); +// caps=1:1;2:0;3:1; + +/* This file is auto-generated by src/loader/meta_join.py */ +var add = Y.Features.add; +// autocomplete-list-keys-sniff.js +add('load', '0', { + "test": function (Y) { + // Only add keyboard support to autocomplete-list if this doesn't appear to + // be an iOS or Android-based mobile device. + // + // There's currently no feasible way to actually detect whether a device has + // a hardware keyboard, so this sniff will have to do. It can easily be + // overridden by manually loading the autocomplete-list-keys module. + // + // Worth noting: even though iOS supports bluetooth keyboards, Mobile Safari + // doesn't fire the keyboard events used by AutoCompleteList, so there's + // no point loading the -keys module even when a bluetooth keyboard may be + // available. + return !(Y.UA.ios || Y.UA.android); +}, + "trigger": "autocomplete-list" +}); +// ie-style-test.js +add('load', '1', { + "test": function (Y) { + + var testFeature = Y.Features.test, + addFeature = Y.Features.add, + WINDOW = Y.config.win, + DOCUMENT = Y.config.doc, + DOCUMENT_ELEMENT = 'documentElement', + ret = false; + + addFeature('style', 'computedStyle', { + test: function() { + return WINDOW && 'getComputedStyle' in WINDOW; + } + }); + + addFeature('style', 'opacity', { + test: function() { + return DOCUMENT && 'opacity' in DOCUMENT[DOCUMENT_ELEMENT].style; + } + }); + + ret = (!testFeature('style', 'opacity') && + !testFeature('style', 'computedStyle')); + + return ret; +}, + "trigger": "dom-style" +}); +// 0 +add('load', '2', { + "trigger": "widget-base", + "ua": "ie" +}); +// ie-base-test.js +add('load', '3', { + "test": function(Y) { + var imp = Y.config.doc && Y.config.doc.implementation; + return (imp && (!imp.hasFeature('Events', '2.0'))); +}, + "trigger": "node-base" +}); +// dd-gestures-test.js +add('load', '4', { + "test": function(Y) { + return (Y.config.win && ('ontouchstart' in Y.config.win && !Y.UA.chrome)); +}, + "trigger": "dd-drag" +}); +// history-hash-ie-test.js +add('load', '5', { + "test": function (Y) { + var docMode = Y.config.doc.documentMode; + + return Y.UA.ie && (!('onhashchange' in Y.config.win) || + !docMode || docMode < 8); +}, + "trigger": "history-hash" +}); + + +}, '3.3.0' ,{requires:['yui-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/yui/get-min.js b/jssource/src_files/include/javascript/yui3/build/yui/get-min.js index cc7e1fd4..c96300c5 100644 --- a/jssource/src_files/include/javascript/yui3/build/yui/get-min.js +++ b/jssource/src_files/include/javascript/yui3/build/yui/get-min.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -YUI.add("get",function(A){(function(){var C=A.UA,B=A.Lang,E="text/javascript",F="text/css",D="stylesheet";A.Get=function(){var M={},K=0,U=false,W=function(a,X,b){var Y=b||A.config.win,c=Y.document,e=c.createElement(a),Z;for(Z in X){if(X[Z]&&X.hasOwnProperty(Z)){e.setAttribute(Z,X[Z]);}}return e;},T=function(Y,Z,X){var a={id:A.guid(),type:F,rel:D,href:Y};if(X){A.mix(a,X);}return W("link",a,Z);},S=function(Y,Z,X){var a={id:A.guid(),type:E,src:Y};if(X){A.mix(a,X);}return W("script",a,Z);},N=function(c){var X=M[c],Y,a,g,e,j,b,Z,f;if(X){Y=X.nodes;a=Y.length;g=X.win.document;e=g.getElementsByTagName("head")[0];if(X.insertBefore){j=L(X.insertBefore,c);if(j){e=j.parentNode;}}for(b=0;b *
            onSuccess
            *
            @@ -596,7 +606,8 @@ Y.Get = function() { * *
            *
            onEnd
            - *
            a function that executes when the transaction finishes, regardless of the exit path
            + *
            a function that executes when the transaction finishes, + * regardless of the exit path
            *
            onFailure
            *
            * callback to execute when the script load operation fails @@ -622,7 +633,7 @@ Y.Get = function() { *
            a window other than the one the utility occupies
            *
            autopurge
            *
            - * setting to true will let the utilities cleanup routine purge + * setting to true will let the utilities cleanup routine purge * the script once loaded *
            *
            purgethreshold
            @@ -635,47 +646,58 @@ Y.Get = function() { * loaded. * *
            insertBefore
            - *
            node or node id that will become the new node's nextSibling
            + *
            node or node id that will become the new node's nextSibling. + * If this is not specified, nodes will be inserted before a base + * tag should it exist. Otherwise, the nodes will be appended to the + * end of the document head.
            * *
            charset
            - *
            Node charset, default utf-8 (deprecated, use the attributes config)
            + *
            Node charset, default utf-8 (deprecated, use the attributes + * config)
            *
            attributes
            - *
            An object literal containing additional attributes to add to the link tags
            + *
            An object literal containing additional attributes to add to + * the link tags
            *
            timeout
            - *
            Number of milliseconds to wait before aborting and firing the timeout event
            + *
            Number of milliseconds to wait before aborting and firing + * the timeout event
            *
            -         *   Y.Get.script(
            -         *   ["http://yui.yahooapis.com/2.5.2/build/yahoo/yahoo-min.js",
            -         *    "http://yui.yahooapis.com/2.5.2/build/event/event-min.js"], {
            -         *     onSuccess: function(o) {
            -         *       this.log("won't cause error because Y is the context");
            -         *     },
            -         *     onFailure: function(o) {
            -         *     },
            -         *     onTimeout: function(o) {
            -         *     },
            -         *     data: "foo",
            -         *     timeout: 10000, // 10 second timeout
            -         *     context: Y, // make the YUI instance
            -         *     // win: otherframe // target another window/frame
            -         *     autopurge: true // allow the utility to choose when to remove the nodes
            -         *     purgetheshold: 1 // purge previous transaction before next transaction
            -         *   });
            +         *   Y.Get.script(
            +         *   ["http://yui.yahooapis.com/2.5.2/build/yahoo/yahoo-min.js",
            +         *    "http://yui.yahooapis.com/2.5.2/build/event/event-min.js"],
            +         *   {
            +         *     onSuccess: function(o) {
            +         *       this.log("won't cause error because Y is the context");
            +         *                     // immediately
            +         *     },
            +         *     onFailure: function(o) {
            +         *     },
            +         *     onTimeout: function(o) {
            +         *     },
            +         *     data: "foo",
            +         *     timeout: 10000, // 10 second timeout
            +         *     context: Y, // make the YUI instance
            +         *     // win: otherframe // target another window/frame
            +         *     autopurge: true // allow the utility to choose when to
            +         *                     // remove the nodes
            +         *     purgetheshold: 1 // purge previous transaction before
            +         *                      // next transaction
            +         *   });.
                      * 
            - * @return {tId: string} an object containing info about the transaction + * @return {tId: string} an object containing info about the + * transaction. */ - script: function(url, opts) { - return _queue("script", url, opts); + script: function(url, opts) { + return _queue('script', url, opts); }, /** - * Fetches and inserts one or more css link nodes into the + * Fetches and inserts one or more css link nodes into the * head of the current document or the document in a specified * window. * @method css * @static - * @param url {string} the url or urls to the css file(s) - * @param opts Options: + * @param {string} url the url or urls to the css file(s). + * @param {object} opts Options: *
            *
            onSuccess
            *
            @@ -707,28 +729,31 @@ Y.Get = function() { *
            insertBefore
            *
            node or node id that will become the new node's nextSibling
            *
            charset
            - *
            Node charset, default utf-8 (deprecated, use the attributes config)
            + *
            Node charset, default utf-8 (deprecated, use the attributes + * config)
            *
            attributes
            - *
            An object literal containing additional attributes to add to the link tags
            + *
            An object literal containing additional attributes to add to + * the link tags
            *
            *
            -         *      Y.Get.css("http://yui.yahooapis.com/2.3.1/build/menu/assets/skins/sam/menu.css");
            +         * Y.Get.css("http://localhost/css/menu.css");
                      * 
            *
            -         *   Y.Get.css(
            -         *   ["http://yui.yahooapis.com/2.3.1/build/menu/assets/skins/sam/menu.css",
            -         *     insertBefore: 'custom-styles' // nodes will be inserted before the specified node
            -         *   });
            +         *   Y.Get.css(
            +         *   ["http://localhost/css/menu.css",
            +         *     insertBefore: 'custom-styles' // nodes will be inserted
            +         *                                   // before the specified node
            +         *   });.
                      * 
            - * @return {tId: string} an object containing info about the transaction + * @return {tId: string} an object containing info about the + * transaction. */ css: function(url, opts) { - return _queue("css", url, opts); + return _queue('css', url, opts); } }; }(); -})(); -}, '3.0.0' ); +}, '3.3.0' ,{requires:['yui-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/yui/intl-base-min.js b/jssource/src_files/include/javascript/yui3/build/yui/intl-base-min.js new file mode 100644 index 00000000..c55572ec --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/yui/intl-base-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("intl-base",function(b){var a=/[, ]/;b.mix(b.namespace("Intl"),{lookupBestLang:function(g,h){var f,j,c,e;function d(l){var k;for(k=0;k0){c=d(j);if(c){return c;}else{e=j.lastIndexOf("-");if(e>=0){j=j.substring(0,e);if(e>=2&&j.charAt(e-2)==="-"){j=j.substring(0,e-2);}}else{break;}}}}return"";}});},"3.3.0",{requires:["yui-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/yui/intl-base.js b/jssource/src_files/include/javascript/yui3/build/yui/intl-base.js new file mode 100644 index 00000000..aefc3ff1 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/yui/intl-base.js @@ -0,0 +1,95 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('intl-base', function(Y) { + +/** + * The Intl utility provides a central location for managing sets of + * localized resources (strings and formatting patterns). + * + * @class Intl + * @uses EventTarget + * @static + */ + +var SPLIT_REGEX = /[, ]/; + +Y.mix(Y.namespace('Intl'), { + + /** + * Returns the language among those available that + * best matches the preferred language list, using the Lookup + * algorithm of BCP 47. + * If none of the available languages meets the user's preferences, + * then "" is returned. + * Extended language ranges are not supported. + * + * @method lookupBestLang + * @param {String[] | String} preferredLanguages The list of preferred + * languages in descending preference order, represented as BCP 47 + * language tags. A string array or a comma-separated list. + * @param {String[]} availableLanguages The list of languages + * that the application supports, represented as BCP 47 language + * tags. + * + * @return {String} The available language that best matches the + * preferred language list, or "". + * @since 3.1.0 + */ + lookupBestLang: function(preferredLanguages, availableLanguages) { + + var i, language, result, index; + + // check whether the list of available languages contains language; + // if so return it + function scan(language) { + var i; + for (i = 0; i < availableLanguages.length; i += 1) { + if (language.toLowerCase() === + availableLanguages[i].toLowerCase()) { + return availableLanguages[i]; + } + } + } + + if (Y.Lang.isString(preferredLanguages)) { + preferredLanguages = preferredLanguages.split(SPLIT_REGEX); + } + + for (i = 0; i < preferredLanguages.length; i += 1) { + language = preferredLanguages[i]; + if (!language || language === '*') { + continue; + } + // check the fallback sequence for one language + while (language.length > 0) { + result = scan(language); + if (result) { + return result; + } else { + index = language.lastIndexOf('-'); + if (index >= 0) { + language = language.substring(0, index); + // one-character subtags get cut along with the + // following subtag + if (index >= 2 && language.charAt(index - 2) === '-') { + language = language.substring(0, index - 2); + } + } else { + // nothing available for this language + break; + } + } + } + } + + return ''; + } +}); + + +}, '3.3.0' ,{requires:['yui-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/yui/rls-min.js b/jssource/src_files/include/javascript/yui3/build/yui/rls-min.js new file mode 100644 index 00000000..b273421c --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/yui/rls-min.js @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("rls",function(a){a._rls=function(g){var d=a.config,f=d.rls||{m:1,v:a.version,gv:d.gallery,env:1,lang:d.lang,"2in3v":d["2in3"],"2v":d.yui2,filt:d.filter,filts:d.filters,tests:1},b=d.rls_base||"load?",e=d.rls_tmpl||function(){var h="",i;for(i in f){if(i in f&&f[i]){h+=i+"={"+i+"}&";}}return h;}(),c;f.m=g;f.env=a.Object.keys(YUI.Env.mods);f.tests=a.Features.all("load",[a]);c=a.Lang.sub(b+e,f);d.rls=f;d.rls_tmpl=e;return c;};},"3.3.0",{requires:["get","features"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/yui/rls.js b/jssource/src_files/include/javascript/yui3/build/yui/rls.js new file mode 100644 index 00000000..1c2bd7da --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/yui/rls.js @@ -0,0 +1,68 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('rls', function(Y) { + +/** + * Implentation for building the remote loader service url. + * @method _rls + * @param {Array} what the requested modules. + * @since 3.2.0 + * @return {string} the url for the remote loader service call. + */ +Y._rls = function(what) { + + var config = Y.config, + + // the configuration + rls = config.rls || { + m: 1, // required in the template + v: Y.version, + gv: config.gallery, + env: 1, // required in the template + lang: config.lang, + '2in3v': config['2in3'], + '2v': config.yui2, + filt: config.filter, + filts: config.filters, + tests: 1 // required in the template + }, + + // The rls base path + rls_base = config.rls_base || 'load?', + + // the template + rls_tmpl = config.rls_tmpl || function() { + var s = '', param; + for (param in rls) { + if (param in rls && rls[param]) { + s += param + '={' + param + '}&'; + } + } + // console.log('rls_tmpl: ' + s); + return s; + }(), + + url; + + // update the request + rls.m = what; + rls.env = Y.Object.keys(YUI.Env.mods); + rls.tests = Y.Features.all('load', [Y]); + + url = Y.Lang.sub(rls_base + rls_tmpl, rls); + + config.rls = rls; + config.rls_tmpl = rls_tmpl; + + // console.log(url); + return url; +}; + + + +}, '3.3.0' ,{requires:['get','features']}); diff --git a/jssource/src_files/include/javascript/yui3/build/yui/yui-base-min.js b/jssource/src_files/include/javascript/yui3/build/yui/yui-base-min.js index 80c4f510..6dd06123 100644 --- a/jssource/src_files/include/javascript/yui3/build/yui/yui-base-min.js +++ b/jssource/src_files/include/javascript/yui3/build/yui/yui-base-min.js @@ -1,9 +1,10 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ -(function(){var I={},B=new Date().getTime(),A,E,H=function(){if(window.addEventListener){return function(M,L,K,J){M.addEventListener(L,K,(!!J));};}else{if(window.attachEvent){return function(L,K,J){L.attachEvent("on"+K,J);};}else{return function(){};}}}(),F=function(){if(window.removeEventListener){return function(M,L,K,J){M.removeEventListener(L,K,!!J);};}else{if(window.detachEvent){return function(L,K,J){L.detachEvent("on"+K,J);};}else{return function(){};}}}(),D=function(){YUI.Env.windowLoaded=true;YUI.Env.DOMReady=true;F(window,"load",D);},C={"io.xdrReady":1,"io.xdrResponse":1},G=Array.prototype.slice;if(typeof YUI==="undefined"||!YUI){YUI=function(O,N,M,L,J){var K=this,R=arguments,Q,P=R.length;if(!(K instanceof YUI)){return new YUI(O,N,M,L,J);}else{K._init();for(Q=0;Q-1){J="test";}K.version=J;K.Env={mods:{},cdn:"http://yui.yahooapis.com/"+J+"/build/",bootstrapped:false,_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_loaded:{}};K.Env._loaded[J]={};if(YUI.Env){K.Env._yidx=(++YUI.Env._yidx);K.Env._guidp=("yui_"+J+"-"+K.Env._yidx+"-"+B).replace(/\./g,"_");K.id=K.stamp(K);I[K.id]=K;}K.constructor=YUI;K.config={win:window||{},doc:document,debug:true,useBrowserConsole:true,throwFail:true,bootstrap:true,fetchCSS:true,base:function(){var L,M,O,N;M=document.getElementsByTagName("script");for(O=0;O1)){F=2;}}catch(G){}}}return F;};E.each=(D.forEach)?function(F,G,H){D.forEach.call(F||[],G,H||B);return B;}:function(G,I,J){var F=(G&&G.length)||0,H;for(H=0;HI)?G[I]:true;}return K;};E.indexOf=(D.indexOf)?function(F,G){return D.indexOf.call(F,G);}:function(F,H){for(var G=0;G-1);};E.owns=function(G,F){return(G.hasOwnProperty(F));};E.each=function(J,I,K,H){var G=K||B,F;for(F in J){if(H||J.hasOwnProperty(F)){I.call(G,J[F],F,J);}}return B;};E.getValue=function(J,I){var H=B.Array(I),F=H.length,G;for(G=0;J!==D&&G=0){for(F=0;G!==D&&F-1){q="3.2.0";}p={applyConfig:function(D){D=D||l;var y,A,z=this.config,B=z.modules,x=z.groups,C=z.rls,w=this.Env._loader;for(A in D){if(D.hasOwnProperty(A)){y=D[A];if(B&&A=="modules"){o(B,y);}else{if(x&&A=="groups"){o(x,y);}else{if(C&&A=="rls"){o(C,y);}else{if(A=="win"){z[A]=y.contentWindow||y;z.doc=z[A].document;}else{if(A=="_yuid"){}else{z[A]=y;}}}}}}}if(w){w._config(D);}},_config:function(w){this.applyConfig(w);},_init:function(){var y,z=this,w=YUI.Env,x=z.Env,A;z.version=q;if(!x){z.Env={mods:{},versions:{},base:n,cdn:n+q+"/build/",_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_guidp:"y",_loaded:{},serviced:{},getBase:w&&w.getBase||function(G,F){var B,C,E,H,D;C=(v&&v.getElementsByTagName("script"))||[];for(E=0;E-1){y=y.substr(0,D);}}D=H.match(F);if(D&&D[3]){B=D[1]+D[3];}break;}}}return B||x.cdn;}};x=z.Env;x._loaded[q]={};if(w&&z!==YUI){x._yidx=++w._yidx;x._guidp=("yui_"+q+"_"+x._yidx+"_"+i).replace(/\./g,"_");}else{if(YUI._YUI){w=YUI._YUI.Env;x._yidx+=w._yidx;x._uidx+=w._uidx;for(A in w){if(!(A in x)){x[A]=w[A];}}delete YUI._YUI;}}z.id=z.stamp(z);c[z.id]=z;}z.constructor=YUI;z.config=z.config||{win:e,doc:v,debug:true,useBrowserConsole:true,throwFail:true,bootstrap:true,cacheUse:true,fetchCSS:true};z.config.base=YUI.config.base||z.Env.getBase(/^(.*)yui\/yui([\.\-].*)js(\?.*)?$/,/^(.*\?)(.*\&)(.*)yui\/yui[\.\-].*js(\?.*)?$/);if(!y||(!("-min.-debug.").indexOf(y))){y="-min.";}z.config.loaderPath=YUI.config.loaderPath||"loader/loader"+(y||"-min.")+"js";},_setup:function(B){var x,A=this,w=[],z=YUI.Env.mods,y=A.config.core||["get","rls","intl-base","loader","yui-log","yui-later","yui-throttle"];for(x=0;xH)?F[H]:true;}return J;};l.indexOf=(u.indexOf)?function(E,F){return u.indexOf.call(E,F);}:function(E,G){for(var F=0;F1)?Array.prototype.join.call(arguments,o):I;if(!(H in E)||(F&&E[H]==F)){E[H]=G.apply(G,arguments);}return E[H];};};var q=function(){},h=function(E){q.prototype=E;return new q();},j=function(F,E){return F&&F.hasOwnProperty&&F.hasOwnProperty(E);},v,d=function(I,H){var G=(H===2),E=(G)?0:[],F;for(F in I){if(j(I,F)){if(G){E++;}else{E.push((H)?I[F]:F);}}}return E;};c.Object=h;h.keys=function(E){return d(E);};h.values=function(E){return d(E,1); +};h.size=Object.size||function(E){return d(E,2);};h.hasKey=j;h.hasValue=function(F,E){return(c.Array.indexOf(h.values(F),E)>-1);};h.owns=j;h.each=function(I,H,J,G){var F=J||c,E;for(E in I){if(G||j(I,E)){H.call(F,I[E],E,I);}}return c;};h.some=function(I,H,J,G){var F=J||c,E;for(E in I){if(G||j(I,E)){if(H.call(F,I[E],E,I)){return true;}}}return false;};h.getValue=function(I,H){if(!c.Lang.isObject(I)){return v;}var F,G=c.Array(H),E=G.length;for(F=0;I!==v&&F=0){for(E=0;F!==v&&E -1) { + VERSION = '3.2.0'; // dev time hack for cdn test +} + +proto = { + /** + * Applies a new configuration object to the YUI instance config. + * This will merge new group/module definitions, and will also + * update the loader cache if necessary. Updating Y.config directly + * will not update the cache. + * @method applyConfig + * @param {object} the configuration object. + * @since 3.2.0 + */ + applyConfig: function(o) { + + o = o || NOOP; + + var attr, + name, + // detail, + config = this.config, + mods = config.modules, + groups = config.groups, + rls = config.rls, + loader = this.Env._loader; + + for (name in o) { + if (o.hasOwnProperty(name)) { + attr = o[name]; + if (mods && name == 'modules') { + clobber(mods, attr); + } else if (groups && name == 'groups') { + clobber(groups, attr); + } else if (rls && name == 'rls') { + clobber(rls, attr); + } else if (name == 'win') { + config[name] = attr.contentWindow || attr; + config.doc = config[name].document; + } else if (name == '_yuid') { + // preserve the guid + } else { + config[name] = attr; } - } else if (i == 'win') { - c[i] = o[i].contentWindow || o[i]; - c.doc = c[i].document; - } else { - c[i] = o[i]; } } + + if (loader) { + loader._config(o); + } + }, + + _config: function(o) { + this.applyConfig(o); }, /** @@ -136,76 +238,131 @@ YUI.prototype = { * @private */ _init: function() { + var filter, + Y = this, + G_ENV = YUI.Env, + Env = Y.Env, + prop; + + /** + * The version number of the YUI instance. + * @property version + * @type string + */ + Y.version = VERSION; + + if (!Env) { + Y.Env = { + mods: {}, // flat module map + versions: {}, // version module map + base: BASE, + cdn: BASE + VERSION + '/build/', + // bootstrapped: false, + _idx: 0, + _used: {}, + _attached: {}, + _yidx: 0, + _uidx: 0, + _guidp: 'y', + _loaded: {}, + serviced: {}, + getBase: G_ENV && G_ENV.getBase || + + function(srcPattern, comboPattern) { + var b, nodes, i, src, match; + // get from querystring + nodes = (doc && doc.getElementsByTagName('script')) || []; + for (i = 0; i < nodes.length; i = i + 1) { + src = nodes[i].src; + if (src) { + + match = src.match(srcPattern); + b = match && match[1]; + if (b) { + // this is to set up the path to the loader. The file + // filter for loader should match the yui include. + filter = match[2]; + + if (filter) { + match = filter.indexOf('js'); + + if (match > -1) { + filter = filter.substr(0, match); + } + } - // find targeted window/frame - // @TODO create facades - var v = '3.0.0', Y = this; + // extract correct path for mixed combo urls + // http://yuilibrary.com/projects/yui3/ticket/2528423 + match = src.match(comboPattern); + if (match && match[3]) { + b = match[1] + match[3]; + } - if (v.indexOf('@') > -1) { - v = 'test'; + break; + } + } } - Y.version = v; - - Y.Env = { - // @todo expand the new module metadata - mods: {}, - cdn: 'http://yui.yahooapis.com/' + v + '/build/', - bootstrapped: false, - _idx: 0, - _used: {}, - _attached: {}, - _yidx: 0, - _uidx: 0, - _loaded: {} - }; + // use CDN default + return b || Env.cdn; + } + }; + + Env = Y.Env; + + Env._loaded[VERSION] = {}; + + if (G_ENV && Y !== YUI) { + Env._yidx = ++G_ENV._yidx; + Env._guidp = ('yui_' + VERSION + '_' + + Env._yidx + '_' + time).replace(/\./g, '_'); + } else if (YUI._YUI) { - Y.Env._loaded[v] = {}; + G_ENV = YUI._YUI.Env; + Env._yidx += G_ENV._yidx; + Env._uidx += G_ENV._uidx; + + for (prop in G_ENV) { + if (!(prop in Env)) { + Env[prop] = G_ENV[prop]; + } + } + + delete YUI._YUI; + } - if (YUI.Env) { - Y.Env._yidx = (++YUI.Env._yidx); - Y.Env._guidp = ('yui_' + v + '-' + Y.Env._yidx + '-' + _startTime).replace(/\./g, '_'); Y.id = Y.stamp(Y); - _instances[Y.id] = Y; + instances[Y.id] = Y; + } Y.constructor = YUI; // configuration defaults - Y.config = { - - win: window || {}, - doc: document, + Y.config = Y.config || { + win: win, + doc: doc, debug: true, useBrowserConsole: true, throwFail: true, bootstrap: true, - fetchCSS: true, - - base: function() { - var b, nodes, i, match; - - // get from querystring - nodes = document.getElementsByTagName('script'); - - for (i=0; i + * // loads and attaches drag and drop and its dependencies + * YUI().use('dd', function(Y) {}); + * // attaches all modules that are available on the page + * YUI().use('*', function(Y) {}); + * // intrinsic YUI gallery support (since 3.1.0) + * YUI().use('gallery-yql', function(Y) {}); + * // intrinsic YUI 2in3 support (since 3.1.0) + * YUI().use('yui2-datatable', function(Y) {});. + * * - * @return {YUI} the YUI instance + * @return {YUI} the YUI instance. */ use: function() { + var args = SLICE.call(arguments, 0), + callback = args[args.length - 1], + Y = this, + key; - if (this._loading) { - this._useQueue = this._useQueue || new this.Queue(); - this._useQueue.add(SLICE.call(arguments, 0)); - return this; + // The last argument supplied to use can be a load complete callback + if (Y.Lang.isFunction(callback)) { + args.pop(); + } else { + callback = null; } - var Y = this, - a=SLICE.call(arguments, 0), - mods = YUI.Env.mods, - used = Y.Env._used, - loader, - firstArg = a[0], - dynamic = false, - callback = a[a.length-1], - boot = Y.config.bootstrap, - k, i, l, missing = [], - r = [], - css = Y.config.fetchCSS, - f = function(name) { - - // only attach a module once - if (used[name]) { - return; - } + if (Y._loading) { + Y._useQueue = Y._useQueue || new Y.Queue(); + Y._useQueue.add([args, callback]); + } else { + key = args.join(); - var m = mods[name], j, req, use; + if (Y.config.cacheUse && Y.Env.serviced[key]) { + Y._notify(callback, ALREADY_DONE, args); + } else { + Y._use(args, function(Y, response) { + if (Y.config.cacheUse) { + Y.Env.serviced[key] = true; + } + Y._notify(callback, response, args); + }); + } + } - if (m) { + return Y; + }, + _notify: function(callback, response, args) { + if (!response.success && this.config.loadErrorFn) { + this.config.loadErrorFn.call(this, this, callback, response, args); + } else if (callback) { + try { + callback(this, response); + } catch (e) { + this.error('use callback error', e, args); + } + } + }, - used[name] = true; + _use: function(args, callback) { - req = m.details.requires; - use = m.details.use; - } else { + if (!this.Array) { + this._attach(['yui-base']); + } - // CSS files don't register themselves, see if it has been loaded - if (!YUI.Env._loaded[Y.version][name]) { - missing.push(name); - } else { - // probably css - used[name] = true; - } + var len, loader, handleBoot, + Y = this, + G_ENV = YUI.Env, + mods = G_ENV.mods, + Env = Y.Env, + used = Env._used, + queue = G_ENV._loaderQueue, + firstArg = args[0], + YArray = Y.Array, + config = Y.config, + boot = config.bootstrap, + missing = [], + r = [], + ret = true, + fetchCSS = config.fetchCSS, + process = function(names, skip) { + + if (!names.length) { + return; } - // make sure requirements are attached - if (req) { - if (Y.Lang.isString(req)) { - f(req); + YArray.each(names, function(name) { + + // add this module to full list of things to attach + if (!skip) { + r.push(name); + } + + // only attach a module once + if (used[name]) { + return; + } + + var m = mods[name], req, use; + + if (m) { + used[name] = true; + req = m.details.requires; + use = m.details.use; } else { - for (j = 0; j < req.length; j = j + 1) { - f(req[j]); + // CSS files don't register themselves, see if it has + // been loaded + if (!G_ENV._loaded[VERSION][name]) { + missing.push(name); + } else { + used[name] = true; // probably css } } - } - // add this module to full list of things to attach - r.push(name); + // make sure requirements are attached + if (req && req.length) { + process(req); + } + // make sure we grab the submodule dependencies too + if (use && use.length) { + process(use, 1); + } + }); }, - onComplete; - - - // The last argument supplied to use can be a load complete callback - if (typeof callback === 'function') { - a.pop(); - } else { - callback = null; - } + handleLoader = function(fromLoader) { + var response = fromLoader || { + success: true, + msg: 'not dynamic' + }, + redo, origMissing, + ret = true, + data = response.data; + + + Y._loading = false; + + if (data) { + origMissing = missing; + missing = []; + r = []; + process(data); + redo = missing.length; + if (redo) { + if (missing.sort().join() == + origMissing.sort().join()) { + redo = false; + } + } + } - onComplete = function(fromLoader) { + if (redo && data) { + Y._loading = false; + Y._use(args, function() { + if (Y._attach(data)) { + Y._notify(callback, response, data); + } + }); + } else { + if (data) { + ret = Y._attach(data); + } + if (ret) { + Y._notify(callback, response, args); + } + } + if (Y._useQueue && Y._useQueue.size() && !Y._loading) { + Y._use.apply(Y, Y._useQueue.next()); + } - fromLoader = fromLoader || { - success: true, - msg: 'not dynamic' }; - if (callback) { - callback(Y, fromLoader); - } - - if (Y.fire) { - Y.fire('yui:load', Y, fromLoader); - } - - // process queued use requests as long until done - // or dynamic load happens again. - Y._loading = false; - - if (Y._useQueue && Y._useQueue.size() && !Y._loading) { - Y.use.apply(Y, Y._useQueue.next()); - } - }; - // YUI().use('*'); // bind everything available - if (firstArg === "*") { - a = []; - for (k in mods) { - if (mods.hasOwnProperty(k)) { - a.push(k); - } - } - - if (callback) { - a.push(callback); + if (firstArg === '*') { + ret = Y._attach(Y.Object.keys(mods)); + if (ret) { + handleLoader(); } - - return Y.use.apply(Y, a); + return Y; } - - // use loader to expand dependencies and sort the + + // use loader to expand dependencies and sort the // requirements if it is available. - if (Y.Loader) { - dynamic = true; - loader = new Y.Loader(Y.config); - loader.require(a); + if (boot && Y.Loader && args.length) { + loader = getLoader(Y); + loader.require(args); loader.ignoreRegistered = true; - loader.allowRollup = false; - // loader.calculate(null, (css && css == 'force') ? null : 'js'); - // loader.calculate(); - loader.calculate(null, (css) ? null : 'js'); - a = loader.sorted; + loader.calculate(null, (fetchCSS) ? null : 'js'); + args = loader.sorted; } - - l = a.length; - - // process each requirement and any additional requirements + // process each requirement and any additional requirements // the module metadata specifies - for (i=0; i *
            DEBUG
            @@ -852,11 +1211,11 @@ YUI.prototype = { *
            RAW
            *
            Selects the non-minified version of the library (e.g., event.js).
            * - * You can also define a custom filter, which must be an object literal + * You can also define a custom filter, which must be an object literal * containing a search expression and a replace string: *
            - *  myFilter: { 
            - *      'searchExp': "-min\\.js", 
            + *  myFilter: {
            + *      'searchExp': "-min\\.js",
              *      'replaceStr': "-debug.js"
              *  }
              * 
            @@ -868,18 +1227,46 @@ YUI.prototype = { */ /** - * Hash of per-component filter specification. If specified for a given component, - * this overrides the filter config + * The 'skin' config let's you configure application level skin + * customizations. It contains the following attributes which + * can be specified to override the defaults: + * + * // The default skin, which is automatically applied if not + * // overriden by a component-specific skin definition. + * // Change this in to apply a different skin globally + * defaultSkin: 'sam', + * + * // This is combined with the loader base property to get + * // the default root directory for a skin. + * base: 'assets/skins/', + * + * // Any component-specific overrides can be specified here, + * // making it possible to load different skins for different + * // components. It is possible to load more than one skin + * // for a given component as well. + * overrides: { + * slider: ['capsule', 'round'] + * } + * + * For dynamic loading. + * + * @property skin + */ + +/** + * Hash of per-component filter specification. If specified for a given + * component, this overrides the filter config. * * For dynamic loading. * * @property filters - * @type object */ /** - * Use the YUI combo service to reduce the number of http connections - * required to load your dependencies. + * Use the YUI combo service to reduce the number of http connections + * required to load your dependencies. Turning this off will + * disable combo handling for YUI and all module groups configured + * with a combo service. * * For dynamic loading. * @@ -896,7 +1283,7 @@ YUI.prototype = { */ /** - * A list of modules that should always be loaded when required, even if already + * A list of modules that should always be loaded when required, even if already * present on the page. * * @property force @@ -904,45 +1291,36 @@ YUI.prototype = { */ /** - * Node or id for a node that should be used as the insertion point for new nodes - * For dynamic loading. + * Node or id for a node that should be used as the insertion point for new + * nodes. For dynamic loading. * * @property insertBefore * @type string */ /** - * charset for dynamic nodes - * - * @property charset - * @type string - * @deprecated use jsAttributes cssAttributes - */ - -/** - * Object literal containing attributes to add to dynamically loaded script nodes. - * + * Object literal containing attributes to add to dynamically loaded script + * nodes. * @property jsAttributes * @type string */ /** - * Object literal containing attributes to add to dynamically loaded link nodes. - * + * Object literal containing attributes to add to dynamically loaded link + * nodes. * @property cssAttributes * @type string */ /** - * Number of milliseconds before a timeout occurs when dynamically + * Number of milliseconds before a timeout occurs when dynamically * loading nodes. If not set, there is no timeout. - * * @property timeout * @type int */ /** - * Callback for the 'CSSComplete' event. When dynamically loading YUI + * Callback for the 'CSSComplete' event. When dynamically loading YUI * components with CSS, this property fires when the CSS is finished * loading but script loading is still ongoing. This provides an * opportunity to enhance the presentation of a loading page a little @@ -953,299 +1331,467 @@ YUI.prototype = { */ /** - * A list of module definitions to add to the list of YUI components. + * A hash of module definitions to add to the list of YUI components. * These components can then be dynamically loaded side by side with - * YUI via the use() method.See Loader.addModule for the supported - * module metadata. + * YUI via the use() method. This is a hash, the key is the module + * name, and the value is an object literal specifying the metdata + * for the module. * See Loader.addModule for the supported module + * metadata fields. Also @see groups, which provides a way to + * configure the base and combo spec for a set of modules. + * + * modules: { + *   mymod1: { + *   requires: ['node'], + *   fullpath: 'http://myserver.mydomain.com/mymod1/mymod1.js' + *   }, + *   mymod2: { + *   requires: ['mymod1'], + *   fullpath: 'http://myserver.mydomain.com/mymod2/mymod2.js' + *   } + * } + * * * @property modules - * @type function + * @type object + */ + +/** + * A hash of module group definitions. It for each group you + * can specify a list of modules and the base path and + * combo spec to use when dynamically loading the modules. @see + * @see modules for the details about the modules part of the + * group definition. + * + *   groups: { + *   yui2: { + *   // specify whether or not this group has a combo service + *   combine: true, + *   + *   // the base path for non-combo paths + *   base: 'http://yui.yahooapis.com/2.8.0r4/build/', + *   + *   // the path to the combo service + *   comboBase: 'http://yui.yahooapis.com/combo?', + *   + *   // a fragment to prepend to the path attribute when + *   // when building combo urls + *   root: '2.8.0r4/build/', + *   + *   // the module definitions + *   modules: { + *   yui2_yde: { + *   path: "yahoo-dom-event/yahoo-dom-event.js" + *   }, + *   yui2_anim: { + *   path: "animation/animation.js", + *   requires: ['yui2_yde'] + *   } + *   } + *   } + *   } + * + * @property modules + * @type object */ - + /** * The loader 'path' attribute to the loader itself. This is combined * with the 'base' attribute to dynamically load the loader component * when boostrapping with the get utility alone. * * @property loaderPath + * @type string * @default loader/loader-min.js */ /** - * * Specifies whether or not YUI().use(...) will attempt to load CSS * resources at all. Any truthy value will cause CSS dependencies - * to load when fetching script. The special value 'force' will + * to load when fetching script. The special value 'force' will * cause CSS dependencies to be loaded even if no script is needed. * * @property fetchCSS + * @type boolean|string * @default true */ -YUI.add('yui-base', function(Y) { -/* - * YUI stub - * @module yui - * @submodule yui-base +/** + * The default gallery version to build gallery module urls + * @property gallery + * @type string + * @since 3.1.0 */ + /** - * The YUI module contains the components required for building the YUI seed file. - * This includes the script loading mechanism, a simple queue, and the core utilities for the library. - * @module yui - * @submodule yui-base + * The default YUI 2 version to build yui2 module urls. This is for + * intrinsic YUI 2 support via the 2in3 project. Also @see the '2in3' + * config for pulling different revisions of the wrapped YUI 2 + * modules. + * @since 3.1.0 + * @property yui2 + * @type string + * @default 2.8.1 */ /** - * A simple FIFO queue. Items are added to the Queue with add(1..n items) and - * removed using next(). + * The 2in3 project is a deployment of the various versions of YUI 2 + * deployed as first-class YUI 3 modules. Eventually, the wrapper + * for the modules will change (but the underlying YUI 2 code will + * be the same), and you can select a particular version of + * the wrapper modules via this config. + * @since 3.1.0 + * @property 2in3 + * @type string + * @default 1 + */ + +/** + * Alternative console log function for use in environments without + * a supported native console. The function is executed in the + * YUI instance context. + * @since 3.1.0 + * @property logFn + * @type Function + */ + +/** + * A callback to execute when Y.error is called. It receives the + * error message and an javascript error object if Y.error was + * executed because a javascript error was caught. The function + * is executed in the YUI instance context. * - * @class Queue - * @param item* {MIXED} 0..n items to seed the queue + * @since 3.2.0 + * @property errorFn + * @type Function */ -function Queue() { - this._init(); - this.add.apply(this, arguments); -} -Queue.prototype = { - /** - * Initialize the queue - * - * @method _init - * @protected - */ - _init : function () { - /** - * The collection of enqueued items - * - * @property _q - * @type {Array} - * @protected - */ - this._q = []; - }, +/** + * A callback to execute when the loader fails to load one or + * more resource. This could be because of a script load + * failure. It can also fail if a javascript module fails + * to register itself, but only when the 'requireRegistration' + * is true. If this function is defined, the use() callback will + * only be called when the loader succeeds, otherwise it always + * executes unless there was a javascript error when attaching + * a module. + * + * @since 3.3.0 + * @property loadErrorFn + * @type Function + */ - /** - * Get the next item in the queue. - * - * @method next - * @return {MIXED} the next item in the queue - */ - next : function () { - return this._q.shift(); - }, +/** + * When set to true, the YUI loader will expect that all modules + * it is responsible for loading will be first-class YUI modules + * that register themselves with the YUI global. If this is + * set to true, loader will fail if the module registration fails + * to happen after the script is loaded. + * + * @since 3.3.0 + * @property requireRegistration + * @type boolean + * @default false + */ - /** - * Add 0..n items to the end of the queue - * - * @method add - * @param item* {MIXED} 0..n items - */ - add : function () { - Y.Array.each(Y.Array(arguments,0,true),function (fn) { - this._q.push(fn); - },this); +/** + * Cache serviced use() requests. + * @since 3.3.0 + * @property cacheUse + * @type boolean + * @default true + */ - return this; - }, +/** + * The parameter defaults for the remote loader service. + * Requires the rls submodule. The properties that are + * supported: + *
            + * m: comma separated list of module requirements.  This
            + *    must be the param name even for custom implemetations.
            + * v: the version of YUI to load.  Defaults to the version
            + *    of YUI that is being used.
            + * gv: the version of the gallery to load (@see the gallery config)
            + * env: comma separated list of modules already on the page.
            + *      this must be the param name even for custom implemetations.
            + * lang: the languages supported on the page (@see the lang config)
            + * '2in3v':  the version of the 2in3 wrapper to use (@see the 2in3 config).
            + * '2v': the version of yui2 to use in the yui 2in3 wrappers
            + *       (@see the yui2 config)
            + * filt: a filter def to apply to the urls (@see the filter config).
            + * filts: a list of custom filters to apply per module
            + *        (@see the filters config).
            + * tests: this is a map of conditional module test function id keys
            + * with the values of 1 if the test passes, 0 if not.  This must be
            + * the name of the querystring param in custom templates.
            + *
            + * + * @since 3.2.0 + * @property rls + */ + +/** + * The base path to the remote loader service + * + * @since 3.2.0 + * @property rls_base + */ + +/** + * The template to use for building the querystring portion + * of the remote loader service url. The default is determined + * by the rls config -- each property that has a value will be + * represented. + * + * ex: m={m}&v={v}&env={env}&lang={lang}&filt={filt}&tests={tests} + * + * + * @since 3.2.0 + * @property rls_tmpl + */ - /** - * Returns the current number of queued items - * - * @method size - * @return {Number} - */ - size : function () { - return this._q.length; - } -}; +/** + * Configure the instance to use a remote loader service instead of + * the client loader. + * + * @since 3.2.0 + * @property use_rls + */ +YUI.add('yui-base', function(Y) { -Y.Queue = Queue; +/* + * YUI stub + * @module yui + * @submodule yui-base + */ /** - * The YUI module contains the components required for building the YUI seed file. - * This includes the script loading mechanism, a simple queue, and the core utilities for the library. + * The YUI module contains the components required for building the YUI + * seed file. This includes the script loading mechanism, a simple queue, + * and the core utilities for the library. * @module yui * @submodule yui-base */ -(function() { + /** * Provides the language utilites and extensions used by the library * @class Lang * @static */ -Y.Lang = Y.Lang || {}; - -var L = Y.Lang, - -ARRAY = 'array', -BOOLEAN = 'boolean', -DATE = 'date', -ERROR = 'error', -FUNCTION = 'function', -NUMBER = 'number', -NULL = 'null', -OBJECT = 'object', -REGEX = 'regexp', -STRING = 'string', -TOSTRING = Object.prototype.toString, +Y.Lang = Y.Lang || {}; + +var L = Y.Lang, + +ARRAY = 'array', +BOOLEAN = 'boolean', +DATE = 'date', +ERROR = 'error', +FUNCTION = 'function', +NUMBER = 'number', +NULL = 'null', +OBJECT = 'object', +REGEX = 'regexp', +STRING = 'string', +STRING_PROTO = String.prototype, +TOSTRING = Object.prototype.toString, UNDEFINED = 'undefined', -TYPES = { - 'undefined' : UNDEFINED, - 'number' : NUMBER, - 'boolean' : BOOLEAN, - 'string' : STRING, +TYPES = { + 'undefined' : UNDEFINED, + 'number' : NUMBER, + 'boolean' : BOOLEAN, + 'string' : STRING, '[object Function]' : FUNCTION, - '[object RegExp]' : REGEX, - '[object Array]' : ARRAY, - '[object Date]' : DATE, - '[object Error]' : ERROR + '[object RegExp]' : REGEX, + '[object Array]' : ARRAY, + '[object Date]' : DATE, + '[object Error]' : ERROR }, TRIMREGEX = /^\s+|\s+$/g, -EMPTYSTRING = ''; +EMPTYSTRING = '', +SUBREGEX = /\{\s*([^\|\}]+?)\s*(?:\|([^\}]*))?\s*\}/g; /** * Determines whether or not the provided item is an array. * Returns false for array-like collections such as the * function arguments collection or HTMLElement collection - * will return false. You can use @see Array.test if you - * want to + * will return false. Use Y.Array.test if you + * want to test for an array-like collection. * @method isArray * @static - * @param o The object to test - * @return {boolean} true if o is an array + * @param o The object to test. + * @return {boolean} true if o is an array. */ -L.isArray = function(o) { +// L.isArray = Array.isArray || function(o) { +// return L.type(o) === ARRAY; +// }; + +L.isArray = function(o) { return L.type(o) === ARRAY; }; /** - * Determines whether or not the provided item is a boolean + * Determines whether or not the provided item is a boolean. * @method isBoolean * @static - * @param o The object to test - * @return {boolean} true if o is a boolean + * @param o The object to test. + * @return {boolean} true if o is a boolean. */ L.isBoolean = function(o) { return typeof o === BOOLEAN; }; /** - * Determines whether or not the provided item is a function + *

            + * Determines whether or not the provided item is a function. * Note: Internet Explorer thinks certain functions are objects: + *

            * + *
              * var obj = document.createElement("object");
              * Y.Lang.isFunction(obj.getAttribute) // reports false in IE
            - *
            + *  
              * var input = document.createElement("input"); // append to body
              * Y.Lang.isFunction(input.focus) // reports false in IE
            + * 
            * + *

            * You will have to implement additional tests if these functions * matter to you. + *

            * * @method isFunction * @static - * @param o The object to test - * @return {boolean} true if o is a function + * @param o The object to test. + * @return {boolean} true if o is a function. */ L.isFunction = function(o) { return L.type(o) === FUNCTION; }; - + /** - * Determines whether or not the supplied item is a date instance + * Determines whether or not the supplied item is a date instance. * @method isDate * @static - * @param o The object to test - * @return {boolean} true if o is a date + * @param o The object to test. + * @return {boolean} true if o is a date. */ L.isDate = function(o) { // return o instanceof Date; - return L.type(o) === DATE; + return L.type(o) === DATE && o.toString() !== 'Invalid Date' && !isNaN(o); }; /** - * Determines whether or not the provided item is null + * Determines whether or not the provided item is null. * @method isNull * @static - * @param o The object to test - * @return {boolean} true if o is null + * @param o The object to test. + * @return {boolean} true if o is null. */ L.isNull = function(o) { return o === null; }; - + /** - * Determines whether or not the provided item is a legal number + * Determines whether or not the provided item is a legal number. * @method isNumber * @static - * @param o The object to test - * @return {boolean} true if o is a number + * @param o The object to test. + * @return {boolean} true if o is a number. */ L.isNumber = function(o) { return typeof o === NUMBER && isFinite(o); }; - + /** * Determines whether or not the provided item is of type object - * or function + * or function. Note that arrays are also objects, so + * Y.Lang.isObject([]) === true. * @method isObject * @static - * @param o The object to test - * @param failfn {boolean} fail if the input is a function - * @return {boolean} true if o is an object - */ + * @param o The object to test. + * @param failfn {boolean} fail if the input is a function. + * @return {boolean} true if o is an object. + */ L.isObject = function(o, failfn) { -return (o && (typeof o === OBJECT || (!failfn && L.isFunction(o)))) || false; + var t = typeof o; + return (o && (t === OBJECT || + (!failfn && (t === FUNCTION || L.isFunction(o))))) || false; }; - + /** - * Determines whether or not the provided item is a string + * Determines whether or not the provided item is a string. * @method isString * @static - * @param o The object to test - * @return {boolean} true if o is a string + * @param o The object to test. + * @return {boolean} true if o is a string. */ L.isString = function(o) { return typeof o === STRING; }; - + /** - * Determines whether or not the provided item is undefined + * Determines whether or not the provided item is undefined. * @method isUndefined * @static - * @param o The object to test - * @return {boolean} true if o is undefined + * @param o The object to test. + * @return {boolean} true if o is undefined. */ L.isUndefined = function(o) { return typeof o === UNDEFINED; }; /** - * Returns a string without any leading or trailing whitespace. If + * Returns a string without any leading or trailing whitespace. If * the input is not a string, the input will be returned untouched. * @method trim * @static - * @param s {string} the string to trim - * @return {string} the trimmed string + * @param s {string} the string to trim. + * @return {string} the trimmed string. */ -L.trim = function(s){ +L.trim = STRING_PROTO.trim ? function(s) { + return (s && s.trim) ? s.trim() : s; +} : function (s) { try { return s.replace(TRIMREGEX, EMPTYSTRING); - } catch(e) { + } catch (e) { return s; } }; +/** + * Returns a string without any leading whitespace. + * @method trimLeft + * @static + * @param s {string} the string to trim. + * @return {string} the trimmed string. + */ +L.trimLeft = STRING_PROTO.trimLeft ? function (s) { + return s.trimLeft(); +} : function (s) { + return s.replace(/^\s+/, ''); +}; + +/** + * Returns a string without any trailing whitespace. + * @method trimRight + * @static + * @param s {string} the string to trim. + * @return {string} the trimmed string. + */ +L.trimRight = STRING_PROTO.trimRight ? function (s) { + return s.trimRight(); +} : function (s) { + return s.replace(/\s+$/, ''); +}; + /** * A convenience method for detecting a legitimate non-null value. - * Returns false for null/undefined/NaN, true for other values, + * Returns false for null/undefined/NaN, true for other values, * including 0/false/'' * @method isValue * @static - * @param o The item to test - * @return {boolean} true if it is not null/undefined/NaN || false + * @param o The item to test. + * @return {boolean} true if it is not null/undefined/NaN || false. */ L.isValue = function(o) { var t = L.type(o); @@ -1261,27 +1807,68 @@ L.isValue = function(o) { }; /** + *

            * Returns a string representing the type of the item passed in. + *

            + * + *

            + * Known issues: + *

            + * + *
              + *
            • + * typeof HTMLElementCollection returns function in Safari, but + * Y.type() reports object, which could be a good thing -- + * but it actually caused the logic in Y.Lang.isObject to fail. + *
            • + *
            + * * @method type - * @param o the item to test - * @return {string} the detected type + * @param o the item to test. + * @return {string} the detected type. + * @static */ -L.type = function (o) { - return TYPES[typeof o] || TYPES[TOSTRING.call(o)] || (o ? OBJECT : NULL); +L.type = function(o) { + return TYPES[typeof o] || TYPES[TOSTRING.call(o)] || (o ? OBJECT : NULL); }; -})(); +/** + * Lightweight version of Y.substitute. Uses the same template + * structure as Y.substitute, but doesn't support recursion, + * auto-object coersion, or formats. + * @method sub + * @param {string} s String to be modified. + * @param {object} o Object containing replacement values. + * @return {string} the substitute result. + * @static + * @since 3.2.0 + */ +L.sub = function(s, o) { + return ((s.replace) ? s.replace(SUBREGEX, function(match, key) { + return (!L.isUndefined(o[key])) ? o[key] : match; + }) : s); +}; + +/** + * Returns the current time in milliseconds. + * @method now + * @return {int} the current date + * @since 3.3.0 + */ +L.now = Date.now || function () { + return new Date().getTime(); +}; /** - * The YUI module contains the components required for building the YUI seed file. - * This includes the script loading mechanism, a simple queue, and the core utilities for the library. + * The YUI module contains the components required for building the YUI seed + * file. This includes the script loading mechanism, a simple queue, and the + * core utilities for the library. * @module yui * @submodule yui-base */ -(function() { -var L = Y.Lang, Native = Array.prototype, +var Native = Array.prototype, LENGTH = 'length', /** * Adds the following array utilities to the YUI instance. Additional @@ -1289,87 +1876,83 @@ var L = Y.Lang, Native = Array.prototype, * @class Array */ -/** +/** * Y.Array(o) returns an array: * - Arrays are return unmodified unless the start position is specified. * - "Array-like" collections (@see Array.test) are converted to arrays - * - For everything else, a new array is created with the input as the sole item + * - For everything else, a new array is created with the input as the sole + * item. * - The start position is used if the input is or is like an array to return * a subset of the collection. * - * @TODO this will not automatically convert elements that are also collections - * such as forms and selects. Passing true as the third param will - * force a conversion. + * @todo this will not automatically convert elements that are also + * collections such as forms and selects. Passing true as the third + * param will force a conversion. * * @method () * @static - * @param o the item to arrayify - * @param i {int} if an array or array-like, this is the start index - * @param al {boolean} if true, it forces the array-like fork. This - * can be used to avoid multiple array.test calls. - * @return {Array} the resulting array - */ -YArray = function(o, startIdx, al) { - var t = (al) ? 2 : Y.Array.test(o), i, l, a; - - // switch (t) { - // case 1: - // // return (startIdx) ? o.slice(startIdx) : o; - // case 2: - // return Native.slice.call(o, startIdx || 0); - // default: - // return [o]; - // } + * @param {object} o the item to arrayify. + * @param {int} startIdx if an array or array-like, this is the start index. + * @param {boolean} arraylike if true, it forces the array-like fork. This + * can be used to avoid multiple Array.test calls. + * @return {Array} the resulting array. + */ +YArray = function(o, startIdx, arraylike) { + var t = (arraylike) ? 2 : YArray.test(o), + l, a, start = startIdx || 0; if (t) { + // IE errors when trying to slice HTMLElement collections try { - return Native.slice.call(o, startIdx || 0); - // IE errors when trying to slice element collections - } catch(e) { - a=[]; - for (i=0, l=o.length; i 1)) { + // indexed, but no tagName (element) or alert (window), + // or functions without apply/call (Safari + // HTMLElementCollection bug). + if ((LENGTH in o) && !o.tagName && !o.alert && !o.apply) { r = 2; } - - } catch(e) {} + + } catch (e) {} } } return r; @@ -1378,21 +1961,21 @@ YArray.test = function(o) { /** * Executes the supplied function on each item in the array. * @method each - * @param a {Array} the array to iterate - * @param f {Function} the function to execute on each item. The + * @param {Array} a the array to iterate. + * @param {Function} f the function to execute on each item. The * function receives three arguments: the value, the index, the full array. - * @param o Optional context object + * @param {object} o Optional context object. * @static - * @return {YUI} the YUI instance + * @return {YUI} the YUI instance. */ YArray.each = (Native.forEach) ? - function (a, f, o) { + function(a, f, o) { Native.forEach.call(a || [], f, o || Y); return Y; } : - function (a, f, o) { + function(a, f, o) { var l = (a && a.length) || 0, i; - for (i = 0; i < l; i=i+1) { + for (i = 0; i < l; i = i + 1) { f.call(o || Y, a[i], i, a); } return Y; @@ -1404,13 +1987,13 @@ YArray.each = (Native.forEach) ? * provided the value is set to true for each. * @method hash * @static - * @param k {Array} keyset - * @param v {Array} optional valueset - * @return {object} the hash + * @param {Array} k keyset. + * @param {Array} v optional valueset. + * @return {object} the hash. */ YArray.hash = function(k, v) { var o = {}, l = k.length, vl = v && v.length, i; - for (i=0; i i) ? v[i] : true; } @@ -1423,16 +2006,16 @@ YArray.hash = function(k, v) { * value isn't found. * @method indexOf * @static - * @param a {Array} the array to search - * @param val the value to search for - * @return {int} the index of the item that contains the value or -1 + * @param {Array} a the array to search. + * @param {any} val the value to search for. + * @return {int} the index of the item that contains the value or -1. */ YArray.indexOf = (Native.indexOf) ? function(a, val) { return Native.indexOf.call(a, val); } : function(a, val) { - for (var i=0; i 1) ? + Array.prototype.join.call(arguments, CACHED_DELIMITER) : arg1; if (!(k in cache) || (refetch && cache[k] == refetch)) { cache[k] = source.apply(source, arguments); @@ -1654,15 +2319,13 @@ Y.cached = function(source, cache, refetch){ }; -})(); - /** - * The YUI module contains the components required for building the YUI seed file. - * This includes the script loading mechanism, a simple queue, and the core utilities for the library. + * The YUI module contains the components required for building the YUI + * seed file. This includes the script loading mechanism, a simple queue, + * and the core utilities for the library. * @module yui * @submodule yui-base */ -(function() { /** * Adds the following Object utilities to the YUI instance @@ -1670,30 +2333,38 @@ Y.cached = function(source, cache, refetch){ */ /** - * Y.Object(o) returns a new object based upon the supplied object. - * @TODO Use native Object.create() when available + * Y.Object(o) returns a new object based upon the supplied object. * @method () * @static - * @param o the supplier object - * @return {Object} the new object + * @param o the supplier object. + * @return {Object} the new object. */ -Y.Object = function(o) { - var F = function() {}; +var F = function() {}, + +// O = Object.create || function(o) { +// F.prototype = o; +// return new F(); +// }, + +O = function(o) { F.prototype = o; return new F(); -}; +}, -var O = Y.Object, +owns = function(o, k) { + return o && o.hasOwnProperty && o.hasOwnProperty(k); + // return Object.prototype.hasOwnProperty.call(o, k); +}, -UNDEFINED = undefined, +UNDEF, /** * Extracts the keys, values, or size from an object - * + * * @method _extract - * @param o the object - * @param what what to extract (0: keys, 1: values, 2: size) - * @return {boolean|Array} the extracted info + * @param o the object. + * @param what what to extract (0: keys, 1: values, 2: size). + * @return {boolean|Array} the extracted info. * @static * @private */ @@ -1701,10 +2372,10 @@ _extract = function(o, what) { var count = (what === 2), out = (count) ? 0 : [], i; for (i in o) { - if (count) { - out++; - } else { - if (o.hasOwnProperty(i)) { + if (owns(o, i)) { + if (count) { + out++; + } else { out.push((what) ? o[i] : i); } } @@ -1713,39 +2384,46 @@ _extract = function(o, what) { return out; }; +Y.Object = O; + /** * Returns an array containing the object's keys - * @TODO use native Object.keys() if available * @method keys * @static - * @param o an object - * @return {string[]} the keys + * @param o an object. + * @return {string[]} the keys. */ +// O.keys = Object.keys || function(o) { +// return _extract(o); +// }; + O.keys = function(o) { return _extract(o); }; /** * Returns an array containing the object's values - * @TODO use native Object.values() if available * @method values * @static - * @param o an object - * @return {Array} the values + * @param o an object. + * @return {Array} the values. */ +// O.values = Object.values || function(o) { +// return _extract(o, 1); +// }; + O.values = function(o) { return _extract(o, 1); }; /** * Returns the size of an object - * @TODO use native Object.size() if available * @method size * @static - * @param o an object - * @return {int} the size + * @param o an object. + * @return {int} the size. */ -O.size = function(o) { +O.size = Object.size || function(o) { return _extract(o, 2); }; @@ -1753,22 +2431,18 @@ O.size = function(o) { * Returns true if the object contains a given key * @method hasKey * @static - * @param o an object - * @param k the key to query - * @return {boolean} true if the object contains the key + * @param o an object. + * @param k the key to query. + * @return {boolean} true if the object contains the key. */ -O.hasKey = function(o, k) { - // return (o.hasOwnProperty(k)); - return (k in o); -}; - +O.hasKey = owns; /** * Returns true if the object contains a given value * @method hasValue * @static - * @param o an object - * @param v the value to query - * @return {boolean} true if the object contains the value + * @param o an object. + * @param v the value to query. + * @return {boolean} true if the object contains the value. */ O.hasValue = function(o, v) { return (Y.Array.indexOf(O.values(o), v) > -1); @@ -1779,88 +2453,89 @@ O.hasValue = function(o, v) { * to the object instance. Returns false if the property is not present * in the object, or was inherited from the prototype. * - * @deprecated Safari 1.x support has been removed, so this is simply a - * wrapper for the native implementation. Use the native implementation - * directly instead. - * - * @TODO Remove in B1 - * * @method owns * @static - * @param o {any} The object being testing - * @param p {string} the property to look for - * @return {boolean} true if the object has the property on the instance + * @param o {any} The object being testing. + * @param p {string} the property to look for. + * @return {boolean} true if the object has the property on the instance. */ -O.owns = function(o, k) { - return (o.hasOwnProperty(k)); -}; +O.owns = owns; /** * Executes a function on each item. The function * receives the value, the key, and the object - * as paramters (in that order). + * as parameters (in that order). * @method each * @static - * @param o the object to iterate - * @param f {Function} the function to execute on each item. The function + * @param o the object to iterate. + * @param f {Function} the function to execute on each item. The function * receives three arguments: the value, the the key, the full object. - * @param c the execution context - * @param proto {boolean} include proto - * @return {YUI} the YUI instance + * @param c the execution context. + * @param proto {boolean} include proto. + * @return {YUI} the YUI instance. */ -O.each = function (o, f, c, proto) { +O.each = function(o, f, c, proto) { var s = c || Y, i; for (i in o) { - if (proto || o.hasOwnProperty(i)) { + if (proto || owns(o, i)) { f.call(s, o[i], i, o); } } return Y; }; -/* +/** * Executes a function on each item, but halts if the * function returns true. The function * receives the value, the key, and the object * as paramters (in that order). * @method some * @static - * @param o the object to iterate - * @param f {Function} the function to execute on each item. The function + * @param o the object to iterate. + * @param f {Function} the function to execute on each item. The function * receives three arguments: the value, the the key, the full object. - * @param c the execution context - * @param proto {boolean} include proto - * @return {boolean} true if any execution of the function returns true, false otherwise - */ -// O.some = function (o, f, c, proto) { -// var s = c || Y, i; -// -// for (i in o) { -// if (proto || o.hasOwnProperty(i)) { -// if (f.call(s, o[i], i, o)) { -// return true; -// } -// } -// } -// return false; -// }; + * @param c the execution context. + * @param proto {boolean} include proto. + * @return {boolean} true if any execution of the function returns true, + * false otherwise. + */ +O.some = function(o, f, c, proto) { + var s = c || Y, i; + + for (i in o) { + if (proto || owns(o, i)) { + if (f.call(s, o[i], i, o)) { + return true; + } + } + } + return false; +}; /** * Retrieves the sub value at the provided path, * from the value object provided. * * @method getValue - * @param o The object from which to extract the property value + * @static + * @param o The object from which to extract the property value. * @param path {Array} A path array, specifying the object traversal path * from which to obtain the sub value. - * @return {Any} The value stored in the path, undefined if not found. - * Returns the source object if an empty path is provided. + * @return {Any} The value stored in the path, undefined if not found, + * undefined if the source is not an object. Returns the source object + * if an empty path is provided. */ -O.getValue = function (o, path) { - var p=Y.Array(path), l=p.length, i; +O.getValue = function(o, path) { + if (!Y.Lang.isObject(o)) { + return UNDEF; + } + + var i, + p = Y.Array(path), + l = p.length; - for (i=0; o !== UNDEFINED && i < l; i=i+1) { + for (i = 0; o !== UNDEF && i < l; i++) { o = o[p[i]]; } @@ -1868,43 +2543,59 @@ O.getValue = function (o, path) { }; /** - * Sets the sub-attribute value at the provided path on the - * value object. Returns the modified value object, or + * Sets the sub-attribute value at the provided path on the + * value object. Returns the modified value object, or * undefined if the path is invalid. * * @method setValue + * @static * @param o The object on which to set the sub value. * @param path {Array} A path array, specifying the object traversal path * at which to set the sub value. * @param val {Any} The new value for the sub-attribute. - * @return {Object} The modified object, with the new sub value set, or + * @return {Object} The modified object, with the new sub value set, or * undefined, if the path was invalid. */ O.setValue = function(o, path, val) { - - var p=Y.Array(path), leafIdx=p.length-1, i, ref=o; + var i, + p = Y.Array(path), + leafIdx = p.length - 1, + ref = o; if (leafIdx >= 0) { - for (i=0; ref !== UNDEFINED && i < leafIdx; i=i+1) { + for (i = 0; ref !== UNDEF && i < leafIdx; i++) { ref = ref[p[i]]; } - if (ref !== UNDEFINED) { + if (ref !== UNDEF) { ref[p[i]] = val; } else { - return UNDEFINED; + return UNDEF; } } return o; }; - -})(); - /** - * The YUI module contains the components required for building the YUI seed file. - * This includes the script loading mechanism, a simple queue, and the core utilities for the library. + * Returns true if the object has no properties of its own + * @method isEmpty + * @static + * @return {boolean} true if the object is empty. + * @since 3.2.0 + */ +O.isEmpty = function(o) { + for (var i in o) { + if (owns(o, i)) { + return false; + } + } + return true; +}; +/** + * The YUI module contains the components required for building the YUI seed + * file. This includes the script loading mechanism, a simple queue, and the + * core utilities for the library. * @module yui * @submodule yui-base */ @@ -1914,24 +2605,33 @@ O.setValue = function(o, path, val) { * Do not fork for a browser if it can be avoided. Use feature detection when * you can. Use the user agent as a last resort. UA stores a version * number for the browser engine, 0 otherwise. This value may or may not map - * to the version number of the browser using the engine. The value is - * presented as a float so that it can easily be used for boolean evaluation - * as well as for looking for a particular range of versions. Because of this, - * some of the granularity of the version info may be lost (e.g., Gecko 1.8.0.9 + * to the version number of the browser using the engine. The value is + * presented as a float so that it can easily be used for boolean evaluation + * as well as for looking for a particular range of versions. Because of this, + * some of the granularity of the version info may be lost (e.g., Gecko 1.8.0.9 * reports 1.8). * @class UA * @static */ -Y.UA = function() { - - var numberfy = function(s) { +/** +* Static method for parsing the UA string. Defaults to assigning it's value to Y.UA +* @static +* @method Env.parseUA +* @param {String} subUA Parse this UA string instead of navigator.userAgent +* @returns {Object} The Y.UA object +*/ +YUI.Env.parseUA = function(subUA) { + + var numberify = function(s) { var c = 0; return parseFloat(s.replace(/\./g, function() { return (c++ == 1) ? '' : '.'; })); }, - - nav = navigator, + + win = Y.config.win, + + nav = win && win.navigator, o = { @@ -1952,14 +2652,15 @@ Y.UA = function() { opera: 0, /** - * Gecko engine revision number. Will evaluate to 1 if Gecko + * Gecko engine revision number. Will evaluate to 1 if Gecko * is detected but the revision could not be found. Other browsers * will be 0. Example: 1.8 *
                      * Firefox 1.0.0.4: 1.7.8   <-- Reports 1.7
            -         * Firefox 1.5.0.9: 1.8.0.9 <-- Reports 1.8
            -         * Firefox 2.0.0.3: 1.8.1.3 <-- Reports 1.8
            -         * Firefox 3 alpha: 1.9a4   <-- Reports 1.9
            +         * Firefox 1.5.0.9: 1.8.0.9 <-- 1.8
            +         * Firefox 2.0.0.3: 1.8.1.3 <-- 1.81
            +         * Firefox 3.0   <-- 1.9
            +         * Firefox 3.5   <-- 1.91
                      * 
            * @property gecko * @type float @@ -1968,10 +2669,10 @@ Y.UA = function() { gecko: 0, /** - * AppleWebKit version. KHTML browsers that are not WebKit browsers + * AppleWebKit version. KHTML browsers that are not WebKit browsers * will evaluate to 1, other browsers 0. Example: 418.9 *
            -         * Safari 1.3.2 (312.6): 312.8.1 <-- Reports 312.8 -- currently the 
            +         * Safari 1.3.2 (312.6): 312.8.1 <-- Reports 312.8 -- currently the
                      *                                   latest available for Mac OSX 10.3.
                      * Safari 2.0.2:         416     <-- hasOwnProperty introduced
                      * Safari 2.0.4:         418     <-- preventDefault fixed
            @@ -1980,26 +2681,35 @@ Y.UA = function() {
                      * Safari 2.0.4 (419.3): 419     <-- Tiger installations that have been
                      *                                   updated, but not updated
                      *                                   to the latest patch.
            -         * Webkit 212 nightly:   522+    <-- Safari 3.0 precursor (with native SVG
            -         *                                   and many major issues fixed).
            -         * Safari 3.0.4 (523.12) 523.12  <-- First Tiger release - automatic update
            -         *                                   from 2.x via the 10.4.11 OS patch
            +         * Webkit 212 nightly:   522+    <-- Safari 3.0 precursor (with native
            +         * SVG and many major issues fixed).
            +         * Safari 3.0.4 (523.12) 523.12  <-- First Tiger release - automatic
            +         * update from 2.x via the 10.4.11 OS patch.
                      * Webkit nightly 1/2008:525+    <-- Supports DOMContentLoaded event.
                      *                                   yahoo.com user agent hack removed.
                      * 
            - * http://en.wikipedia.org/wiki/Safari_(web_browser)#Version_history + * http://en.wikipedia.org/wiki/Safari_version_history * @property webkit * @type float * @static */ webkit: 0, + /** + * Chrome will be detected as webkit, but this property will also + * be populated with the Chrome version number + * @property chrome + * @type float + * @static + */ + chrome: 0, + /** * The mobile property will be set to a string containing any relevant * user agent information when a modern mobile browser is detected. * Currently limited to Safari on the iPhone/iPod Touch, Nokia N-series - * devices with the WebKit-based browser, and Opera Mini. - * @property mobile + * devices with the WebKit-based browser, and Opera Mini. + * @property mobile * @type string * @static */ @@ -2012,13 +2722,55 @@ Y.UA = function() { * @type float */ air: 0, + /** + * Detects Apple iPad's OS version + * @property ipad + * @type float + * @static + */ + ipad: 0, + /** + * Detects Apple iPhone's OS version + * @property iphone + * @type float + * @static + */ + iphone: 0, + /** + * Detects Apples iPod's OS version + * @property ipod + * @type float + * @static + */ + ipod: 0, + /** + * General truthy check for iPad, iPhone or iPod + * @property ios + * @type float + * @static + */ + ios: null, + /** + * Detects Googles Android OS version + * @property android + * @type float + * @static + */ + android: 0, + /** + * Detects Palms WebOS version + * @property webos + * @type float + * @static + */ + webos: 0, /** * Google Caja version number or 0. * @property caja * @type float */ - caja: nav.cajaVersion, + caja: nav && nav.cajaVersion, /** * Set to true if the page appears to be in SSL @@ -2035,18 +2787,18 @@ Y.UA = function() { * @static */ os: null - + }, - ua = nav && nav.userAgent, + ua = subUA || nav && nav.userAgent, - loc = Y.config.win.location, + loc = win && win.location, href = loc && loc.href, - + m; - o.secure = href && (href.toLowerCase().indexOf("https") === 0); + o.secure = href && (href.toLowerCase().indexOf('https') === 0); if (ua) { @@ -2054,96 +2806,102 @@ Y.UA = function() { o.os = 'windows'; } else if ((/macintosh/i).test(ua)) { o.os = 'macintosh'; + } else if ((/rhino/i).test(ua)) { + o.os = 'rhino'; } // Modern KHTML browsers should qualify as Safari X-Grade if ((/KHTML/).test(ua)) { - o.webkit=1; + o.webkit = 1; } // Modern WebKit browsers are at least X-Grade - m=ua.match(/AppleWebKit\/([^\s]*)/); - if (m&&m[1]) { - o.webkit=numberfy(m[1]); + m = ua.match(/AppleWebKit\/([^\s]*)/); + if (m && m[1]) { + o.webkit = numberify(m[1]); // Mobile browser check if (/ Mobile\//.test(ua)) { - o.mobile = "Apple"; // iPhone or iPod Touch + o.mobile = 'Apple'; // iPhone or iPod Touch + + m = ua.match(/OS ([^\s]*)/); + if (m && m[1]) { + m = numberify(m[1].replace('_', '.')); + } + o.ios = m; + o.ipad = o.ipod = o.iphone = 0; + + m = ua.match(/iPad|iPod|iPhone/); + if (m && m[0]) { + o[m[0].toLowerCase()] = o.ios; + } } else { - m=ua.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/); + m = ua.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/); if (m) { - o.mobile = m[0]; // Nokia N-series, Android, webOS, ex: NokiaN95 + // Nokia N-series, Android, webOS, ex: NokiaN95 + o.mobile = m[0]; } - } + if (/webOS/.test(ua)) { + o.mobile = 'WebOS'; + m = ua.match(/webOS\/([^\s]*);/); + if (m && m[1]) { + o.webos = numberify(m[1]); + } + } + if (/ Android/.test(ua)) { + o.mobile = 'Android'; + m = ua.match(/Android ([^\s]*);/); + if (m && m[1]) { + o.android = numberify(m[1]); + } - m=ua.match(/AdobeAIR\/([^\s]*)/); - if (m) { - o.air = m[0]; // Adobe AIR 1.0 or better + } } + m = ua.match(/Chrome\/([^\s]*)/); + if (m && m[1]) { + o.chrome = numberify(m[1]); // Chrome + } else { + m = ua.match(/AdobeAIR\/([^\s]*)/); + if (m) { + o.air = m[0]; // Adobe AIR 1.0 or better + } + } } if (!o.webkit) { // not webkit - // @todo check Opera/8.01 (J2ME/MIDP; Opera Mini/2.0.4509/1316; fi; U; ssr) - m=ua.match(/Opera[\s\/]([^\s]*)/); - if (m&&m[1]) { - o.opera=numberfy(m[1]); - m=ua.match(/Opera Mini[^;]*/); +// @todo check Opera/8.01 (J2ME/MIDP; Opera Mini/2.0.4509/1316; fi; U; ssr) + m = ua.match(/Opera[\s\/]([^\s]*)/); + if (m && m[1]) { + o.opera = numberify(m[1]); + m = ua.match(/Opera Mini[^;]*/); if (m) { o.mobile = m[0]; // ex: Opera Mini/2.0.4509/1316 } } else { // not opera or webkit - m=ua.match(/MSIE\s([^;]*)/); - if (m&&m[1]) { - o.ie=numberfy(m[1]); + m = ua.match(/MSIE\s([^;]*)/); + if (m && m[1]) { + o.ie = numberify(m[1]); } else { // not opera, webkit, or ie - m=ua.match(/Gecko\/([^\s]*)/); + m = ua.match(/Gecko\/([^\s]*)/); if (m) { - o.gecko=1; // Gecko detected, look for revision - m=ua.match(/rv:([^\s\)]*)/); - if (m&&m[1]) { - o.gecko=numberfy(m[1]); + o.gecko = 1; // Gecko detected, look for revision + m = ua.match(/rv:([^\s\)]*)/); + if (m && m[1]) { + o.gecko = numberify(m[1]); } } } } } } - - return o; -}(); -/** - * The YUI module contains the components required for building the YUI seed file. - * This includes the script loading mechanism, a simple queue, and the core utilities for the library. - * @module yui - * @submodule yui-base - */ - -(function() { - - var min = ['yui-base'], core, C = Y.config, mods = YUI.Env.mods, - extras, i; - - // apply the minimal required functionality - Y.use.apply(Y, min); - - if (C.core) { - core = C.core; - } else { - core = []; - extras = ['get', 'loader', 'yui-log', 'yui-later']; + YUI.Env.UA = o; - for (i=0; i-1){J="test";}K.version=J;K.Env={mods:{},cdn:"http://yui.yahooapis.com/"+J+"/build/",bootstrapped:false,_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_loaded:{}};K.Env._loaded[J]={};if(YUI.Env){K.Env._yidx=(++YUI.Env._yidx);K.Env._guidp=("yui_"+J+"-"+K.Env._yidx+"-"+B).replace(/\./g,"_");K.id=K.stamp(K);I[K.id]=K;}K.constructor=YUI;K.config={win:window||{},doc:document,debug:true,useBrowserConsole:true,throwFail:true,bootstrap:true,fetchCSS:true,base:function(){var L,M,O,N;M=document.getElementsByTagName("script");for(O=0;O1)){F=2;}}catch(G){}}}return F;};E.each=(D.forEach)?function(F,G,H){D.forEach.call(F||[],G,H||B);return B;}:function(G,I,J){var F=(G&&G.length)||0,H;for(H=0;HI)?G[I]:true;}return K;};E.indexOf=(D.indexOf)?function(F,G){return D.indexOf.call(F,G);}:function(F,H){for(var G=0;G-1);};E.owns=function(G,F){return(G.hasOwnProperty(F));};E.each=function(J,I,K,H){var G=K||B,F;for(F in J){if(H||J.hasOwnProperty(F)){I.call(G,J[F],F,J);}}return B;};E.getValue=function(J,I){var H=B.Array(I),F=H.length,G;for(G=0;J!==D&&G=0){for(F=0;G!==D&&F-1){q="3.2.0";}p={applyConfig:function(D){D=D||l;var y,A,z=this.config,B=z.modules,x=z.groups,C=z.rls,w=this.Env._loader;for(A in D){if(D.hasOwnProperty(A)){y=D[A];if(B&&A=="modules"){o(B,y);}else{if(x&&A=="groups"){o(x,y);}else{if(C&&A=="rls"){o(C,y);}else{if(A=="win"){z[A]=y.contentWindow||y;z.doc=z[A].document;}else{if(A=="_yuid"){}else{z[A]=y;}}}}}}}if(w){w._config(D);}},_config:function(w){this.applyConfig(w);},_init:function(){var y,z=this,w=YUI.Env,x=z.Env,A;z.version=q;if(!x){z.Env={mods:{},versions:{},base:n,cdn:n+q+"/build/",_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_guidp:"y",_loaded:{},serviced:{},getBase:w&&w.getBase||function(G,F){var B,C,E,H,D;C=(v&&v.getElementsByTagName("script"))||[];for(E=0;E-1){y=y.substr(0,D);}}D=H.match(F);if(D&&D[3]){B=D[1]+D[3];}break;}}}return B||x.cdn;}};x=z.Env;x._loaded[q]={};if(w&&z!==YUI){x._yidx=++w._yidx;x._guidp=("yui_"+q+"_"+x._yidx+"_"+i).replace(/\./g,"_");}else{if(YUI._YUI){w=YUI._YUI.Env;x._yidx+=w._yidx;x._uidx+=w._uidx;for(A in w){if(!(A in x)){x[A]=w[A];}}delete YUI._YUI;}}z.id=z.stamp(z);c[z.id]=z;}z.constructor=YUI;z.config=z.config||{win:e,doc:v,debug:true,useBrowserConsole:true,throwFail:true,bootstrap:true,cacheUse:true,fetchCSS:true};z.config.base=YUI.config.base||z.Env.getBase(/^(.*)yui\/yui([\.\-].*)js(\?.*)?$/,/^(.*\?)(.*\&)(.*)yui\/yui[\.\-].*js(\?.*)?$/);if(!y||(!("-min.-debug.").indexOf(y))){y="-min.";}z.config.loaderPath=YUI.config.loaderPath||"loader/loader"+(y||"-min.")+"js";},_setup:function(B){var x,A=this,w=[],z=YUI.Env.mods,y=A.config.core||["get","rls","intl-base","loader","yui-log","yui-later","yui-throttle"];for(x=0;xH)?F[H]:true;}return J;};l.indexOf=(u.indexOf)?function(E,F){return u.indexOf.call(E,F);}:function(E,G){for(var F=0;F1)?Array.prototype.join.call(arguments,o):I;if(!(H in E)||(F&&E[H]==F)){E[H]=G.apply(G,arguments);}return E[H];};};var q=function(){},h=function(E){q.prototype=E;return new q();},j=function(F,E){return F&&F.hasOwnProperty&&F.hasOwnProperty(E);},v,d=function(I,H){var G=(H===2),E=(G)?0:[],F;for(F in I){if(j(I,F)){if(G){E++;}else{E.push((H)?I[F]:F);}}}return E;};c.Object=h;h.keys=function(E){return d(E);};h.values=function(E){return d(E,1); +};h.size=Object.size||function(E){return d(E,2);};h.hasKey=j;h.hasValue=function(F,E){return(c.Array.indexOf(h.values(F),E)>-1);};h.owns=j;h.each=function(I,H,J,G){var F=J||c,E;for(E in I){if(G||j(I,E)){H.call(F,I[E],E,I);}}return c;};h.some=function(I,H,J,G){var F=J||c,E;for(E in I){if(G||j(I,E)){if(H.call(F,I[E],E,I)){return true;}}}return false;};h.getValue=function(I,H){if(!c.Lang.isObject(I)){return v;}var F,G=c.Array(H),E=G.length;for(F=0;I!==v&&F=0){for(E=0;F!==v&&E0){c=d(j);if(c){return c;}else{e=j.lastIndexOf("-");if(e>=0){j=j.substring(0,e);if(e>=2&&j.charAt(e-2)==="-"){j=j.substring(0,e-2);}}else{break;}}}}return"";}});},"3.3.0",{requires:["yui-base"]});YUI.add("yui-log",function(d){var c=d,e="yui:log",a="undefined",b={debug:1,info:1,warn:1,error:1};c.log=function(j,s,g,q){var l,p,n,k,o,i=c,r=i.config,h=(i.fire)?i:YUI.Env.globalEvents;if(r.debug){if(g){p=r.logExclude;n=r.logInclude;if(n&&!(g in n)){l=1;}else{if(p&&(g in p)){l=1;}}}if(!l){if(r.useBrowserConsole){k=(g)?g+": "+j:j;if(i.Lang.isFunction(r.logFn)){r.logFn.call(i,j,s,g);}else{if(typeof console!=a&&console.log){o=(s&&console[s]&&(s in b))?s:"log";console[o](k);}else{if(typeof opera!=a){opera.postError(k);}}}}if(h&&!q){if(h==i&&(!h.getEvent(e))){h.publish(e,{broadcast:2});}h.fire(e,{msg:j,cat:s,src:g});}}}return i;};c.message=function(){return c.log.apply(c,arguments);};},"3.3.0",{requires:["yui-base"]});YUI.add("yui-later",function(a){a.later=function(c,i,d,h,g){c=c||0;var b=d,e,j;if(i&&a.Lang.isString(d)){b=i[d];}e=!a.Lang.isUndefined(h)?function(){b.apply(i,a.Array(h));}:function(){b.call(i);};j=(g)?setInterval(e,c):setTimeout(e,c);return{id:j,interval:g,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};};a.Lang.later=a.later;},"3.3.0",{requires:["yui-base"]});YUI.add("yui-throttle",function(a){ +/*! Based on work by Simon Willison: http://gist.github.com/292562 */ +a.throttle=function(c,b){b=(b)?b:(a.config.throttleTime||150);if(b===-1){return(function(){c.apply(null,arguments);});}var d=a.Lang.now();return(function(){var e=a.Lang.now();if(e-d>b){d=e;c.apply(null,arguments);}});};},"3.3.0",{requires:["yui-base"]});YUI.add("yui",function(a){},"3.3.0",{use:["yui-base","get","features","rls","intl-base","yui-log","yui-later","yui-throttle"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/yui/yui-throttle-min.js b/jssource/src_files/include/javascript/yui3/build/yui/yui-throttle-min.js new file mode 100644 index 00000000..b74c3f84 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/yui/yui-throttle-min.js @@ -0,0 +1,10 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add("yui-throttle",function(a){ +/*! Based on work by Simon Willison: http://gist.github.com/292562 */ +a.throttle=function(c,b){b=(b)?b:(a.config.throttleTime||150);if(b===-1){return(function(){c.apply(null,arguments);});}var d=a.Lang.now();return(function(){var e=a.Lang.now();if(e-d>b){d=e;c.apply(null,arguments);}});};},"3.3.0",{requires:["yui-base"]}); \ No newline at end of file diff --git a/jssource/src_files/include/javascript/yui3/build/yui/yui-throttle.js b/jssource/src_files/include/javascript/yui3/build/yui/yui-throttle.js new file mode 100644 index 00000000..e8c1e7f2 --- /dev/null +++ b/jssource/src_files/include/javascript/yui3/build/yui/yui-throttle.js @@ -0,0 +1,49 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 +*/ +YUI.add('yui-throttle', function(Y) { + +/** + * Provides a throttle/limiter for function calls + * @module yui + * @submodule yui-throttle + */ + +/*! Based on work by Simon Willison: http://gist.github.com/292562 */ +/** + * Throttles a call to a method based on the time between calls. + * @method throttle + * @for YUI + * @param fn {function} The function call to throttle. + * @param ms {int} The number of milliseconds to throttle the method call. + * Can set globally with Y.config.throttleTime or by call. Passing a -1 will + * disable the throttle. Defaults to 150. + * @return {function} Returns a wrapped function that calls fn throttled. + * @since 3.1.0 + */ +Y.throttle = function(fn, ms) { + ms = (ms) ? ms : (Y.config.throttleTime || 150); + + if (ms === -1) { + return (function() { + fn.apply(null, arguments); + }); + } + + var last = Y.Lang.now(); + + return (function() { + var now = Y.Lang.now(); + if (now - last > ms) { + last = now; + fn.apply(null, arguments); + } + }); +}; + + +}, '3.3.0' ,{requires:['yui-base']}); diff --git a/jssource/src_files/include/javascript/yui3/build/yui/yui.js b/jssource/src_files/include/javascript/yui3/build/yui/yui.js index 37e2f5c1..8fcf8ea3 100644 --- a/jssource/src_files/include/javascript/yui3/build/yui/yui.js +++ b/jssource/src_files/include/javascript/yui3/build/yui/yui.js @@ -1,134 +1,236 @@ /* -Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 3.0.0 -build: 1549 +http://developer.yahoo.com/yui/license.html +version: 3.3.0 +build: 3167 */ /** - * The YUI module contains the components required for building the YUI seed file. - * This includes the script loading mechanism, a simple queue, and the core utilities for the library. + * The YUI module contains the components required for building the YUI seed + * file. This includes the script loading mechanism, a simple queue, and + * the core utilities for the library. * @module yui * @submodule yui-base */ -(function() { +if (typeof YUI != 'undefined') { + YUI._YUI = YUI; +} - var _instances = {}, - _startTime = new Date().getTime(), - p, - i, - - add = function () { - if (window.addEventListener) { - return function(el, type, fn, capture) { - el.addEventListener(type, fn, (!!capture)); - }; - } else if (window.attachEvent) { - return function(el, type, fn) { - el.attachEvent("on" + type, fn); - }; - } else { - return function(){}; +/** + * The YUI global namespace object. If YUI is already defined, the + * existing YUI object will not be overwritten so that defined + * namespaces are preserved. It is the constructor for the object + * the end user interacts with. As indicated below, each instance + * has full custom event support, but only if the event system + * is available. This is a self-instantiable factory function. You + * can invoke it directly like this: + * + * YUI().use('*', function(Y) { + * // ready + * }); + * + * But it also works like this: + * + * var Y = YUI(); + * + * @class YUI + * @constructor + * @global + * @uses EventTarget + * @param o* {object} 0..n optional configuration objects. these values + * are store in Y.config. See config for the list of supported + * properties. + */ + /*global YUI*/ + /*global YUI_config*/ + var YUI = function() { + var i = 0, + Y = this, + args = arguments, + l = args.length, + instanceOf = function(o, type) { + return (o && o.hasOwnProperty && (o instanceof type)); + }, + gconf = (typeof YUI_config !== 'undefined') && YUI_config; + + if (!(instanceOf(Y, YUI))) { + Y = new YUI(); + } else { + // set up the core environment + Y._init(); + + // YUI.GlobalConfig is a master configuration that might span + // multiple contexts in a non-browser environment. It is applied + // first to all instances in all contexts. + if (YUI.GlobalConfig) { + Y.applyConfig(YUI.GlobalConfig); } - }(), - remove = function() { - if (window.removeEventListener) { - return function (el, type, fn, capture) { - el.removeEventListener(type, fn, !!capture); - }; - } else if (window.detachEvent) { - return function (el, type, fn) { - el.detachEvent("on" + type, fn); - }; - } else { - return function(){}; + // YUI_Config is a page-level config. It is applied to all + // instances created on the page. This is applied after + // YUI.GlobalConfig, and before the instance level configuration + // objects. + if (gconf) { + Y.applyConfig(gconf); } - }(), - globalListener = function() { - YUI.Env.windowLoaded = true; - YUI.Env.DOMReady = true; - remove(window, 'load', globalListener); - }, + // bind the specified additional modules for this instance + if (!l) { + Y._setup(); + } + } -// @TODO: this needs to be created at build time from module metadata + if (l) { + // Each instance can accept one or more configuration objects. + // These are applied after YUI.GlobalConfig and YUI_Config, + // overriding values set in those config files if there is a ' + // matching property. + for (; i < l; i++) { + Y.applyConfig(args[i]); + } - _APPLY_TO_WHITE_LIST = { - 'io.xdrReady': 1, - 'io.xdrResponse':1 - }, + Y._setup(); + } - SLICE = Array.prototype.slice; - -// reduce to one or the other -if (typeof YUI === 'undefined' || !YUI) { + Y.instanceOf = instanceOf; - /** - * The YUI global namespace object. If YUI is already defined, the - * existing YUI object will not be overwritten so that defined - * namespaces are preserved. - * - * @class YUI - * @constructor - * @global - * @uses EventTarget - * @param o* Up to five optional configuration objects. This object is stored - * in YUI.config. See config for the list of supported properties. - */ + return Y; + }; - /*global YUI*/ - // Make a function, disallow direct instantiation - YUI = function(o1, o2, o3, o4, o5) { +(function() { - var Y = this, a = arguments, i, l = a.length; + var proto, prop, + VERSION = '3.3.0', + PERIOD = '.', + BASE = 'http://yui.yahooapis.com/', + DOC_LABEL = 'yui3-js-enabled', + NOOP = function() {}, + SLICE = Array.prototype.slice, + APPLY_TO_AUTH = { 'io.xdrReady': 1, // the functions applyTo + 'io.xdrResponse': 1, // can call. this should + 'SWF.eventHandler': 1 }, // be done at build time + hasWin = (typeof window != 'undefined'), + win = (hasWin) ? window : null, + doc = (hasWin) ? win.document : null, + docEl = doc && doc.documentElement, + docClass = docEl && docEl.className, + instances = {}, + time = new Date().getTime(), + add = function(el, type, fn, capture) { + if (el && el.addEventListener) { + el.addEventListener(type, fn, capture); + } else if (el && el.attachEvent) { + el.attachEvent('on' + type, fn); + } + }, + remove = function(el, type, fn, capture) { + if (el && el.removeEventListener) { + // this can throw an uncaught exception in FF + try { + el.removeEventListener(type, fn, capture); + } catch (ex) {} + } else if (el && el.detachEvent) { + el.detachEvent('on' + type, fn); + } + }, + handleLoad = function() { + YUI.Env.windowLoaded = true; + YUI.Env.DOMReady = true; + if (hasWin) { + remove(window, 'load', handleLoad); + } + }, + getLoader = function(Y, o) { + var loader = Y.Env._loader; + if (loader) { + loader.ignoreRegistered = false; + loader.onEnd = null; + loader.data = null; + loader.required = []; + loader.loadType = null; + } else { + loader = new Y.Loader(Y.config); + Y.Env._loader = loader; + } - // Allow instantiation without the new operator - if (!(Y instanceof YUI)) { - return new YUI(o1, o2, o3, o4, o5); - } else { - // set up the core environment - Y._init(); + return loader; + }, - for (i=0; i -1) { + VERSION = '3.2.0'; // dev time hack for cdn test +} - mods = c.modules; - for (i in o) { - if (mods && i == 'modules') { - m = o[i]; - for (j in m) { - if (m.hasOwnProperty(j)) { - mods[j] = m[j]; - } +proto = { + /** + * Applies a new configuration object to the YUI instance config. + * This will merge new group/module definitions, and will also + * update the loader cache if necessary. Updating Y.config directly + * will not update the cache. + * @method applyConfig + * @param {object} the configuration object. + * @since 3.2.0 + */ + applyConfig: function(o) { + + o = o || NOOP; + + var attr, + name, + // detail, + config = this.config, + mods = config.modules, + groups = config.groups, + rls = config.rls, + loader = this.Env._loader; + + for (name in o) { + if (o.hasOwnProperty(name)) { + attr = o[name]; + if (mods && name == 'modules') { + clobber(mods, attr); + } else if (groups && name == 'groups') { + clobber(groups, attr); + } else if (rls && name == 'rls') { + clobber(rls, attr); + } else if (name == 'win') { + config[name] = attr.contentWindow || attr; + config.doc = config[name].document; + } else if (name == '_yuid') { + // preserve the guid + } else { + config[name] = attr; } - } else if (i == 'win') { - c[i] = o[i].contentWindow || o[i]; - c.doc = c[i].document; - } else { - c[i] = o[i]; } } + + if (loader) { + loader._config(o); + } + }, + + _config: function(o) { + this.applyConfig(o); }, /** @@ -136,76 +238,131 @@ YUI.prototype = { * @private */ _init: function() { + var filter, + Y = this, + G_ENV = YUI.Env, + Env = Y.Env, + prop; + + /** + * The version number of the YUI instance. + * @property version + * @type string + */ + Y.version = VERSION; + + if (!Env) { + Y.Env = { + mods: {}, // flat module map + versions: {}, // version module map + base: BASE, + cdn: BASE + VERSION + '/build/', + // bootstrapped: false, + _idx: 0, + _used: {}, + _attached: {}, + _yidx: 0, + _uidx: 0, + _guidp: 'y', + _loaded: {}, + serviced: {}, + getBase: G_ENV && G_ENV.getBase || + + function(srcPattern, comboPattern) { + var b, nodes, i, src, match; + // get from querystring + nodes = (doc && doc.getElementsByTagName('script')) || []; + for (i = 0; i < nodes.length; i = i + 1) { + src = nodes[i].src; + if (src) { + + match = src.match(srcPattern); + b = match && match[1]; + if (b) { + // this is to set up the path to the loader. The file + // filter for loader should match the yui include. + filter = match[2]; + + if (filter) { + match = filter.indexOf('js'); + + if (match > -1) { + filter = filter.substr(0, match); + } + } - // find targeted window/frame - // @TODO create facades - var v = '3.0.0', Y = this; + // extract correct path for mixed combo urls + // http://yuilibrary.com/projects/yui3/ticket/2528423 + match = src.match(comboPattern); + if (match && match[3]) { + b = match[1] + match[3]; + } - if (v.indexOf('@') > -1) { - v = 'test'; + break; + } + } } - Y.version = v; + // use CDN default + return b || Env.cdn; + } + }; - Y.Env = { - // @todo expand the new module metadata - mods: {}, - cdn: 'http://yui.yahooapis.com/' + v + '/build/', - bootstrapped: false, - _idx: 0, - _used: {}, - _attached: {}, - _yidx: 0, - _uidx: 0, - _loaded: {} - }; + Env = Y.Env; + + Env._loaded[VERSION] = {}; - Y.Env._loaded[v] = {}; + if (G_ENV && Y !== YUI) { + Env._yidx = ++G_ENV._yidx; + Env._guidp = ('yui_' + VERSION + '_' + + Env._yidx + '_' + time).replace(/\./g, '_'); + } else if (YUI._YUI) { + + G_ENV = YUI._YUI.Env; + Env._yidx += G_ENV._yidx; + Env._uidx += G_ENV._uidx; + + for (prop in G_ENV) { + if (!(prop in Env)) { + Env[prop] = G_ENV[prop]; + } + } + + delete YUI._YUI; + } - if (YUI.Env) { - Y.Env._yidx = (++YUI.Env._yidx); - Y.Env._guidp = ('yui_' + v + '-' + Y.Env._yidx + '-' + _startTime).replace(/\./g, '_'); Y.id = Y.stamp(Y); - _instances[Y.id] = Y; + instances[Y.id] = Y; + } Y.constructor = YUI; // configuration defaults - Y.config = { - - win: window || {}, - doc: document, + Y.config = Y.config || { + win: win, + doc: doc, debug: true, useBrowserConsole: true, throwFail: true, bootstrap: true, - fetchCSS: true, - - base: function() { - var b, nodes, i, match; - - // get from querystring - nodes = document.getElementsByTagName('script'); - - for (i=0; i + * // loads and attaches drag and drop and its dependencies + * YUI().use('dd', function(Y) {}); + * // attaches all modules that are available on the page + * YUI().use('*', function(Y) {}); + * // intrinsic YUI gallery support (since 3.1.0) + * YUI().use('gallery-yql', function(Y) {}); + * // intrinsic YUI 2in3 support (since 3.1.0) + * YUI().use('yui2-datatable', function(Y) {});. + * * - * @return {YUI} the YUI instance + * @return {YUI} the YUI instance. */ use: function() { + var args = SLICE.call(arguments, 0), + callback = args[args.length - 1], + Y = this, + key; - if (this._loading) { - this._useQueue = this._useQueue || new this.Queue(); - this._useQueue.add(SLICE.call(arguments, 0)); - return this; - } - - var Y = this, - a=SLICE.call(arguments, 0), - mods = YUI.Env.mods, - used = Y.Env._used, - loader, - firstArg = a[0], - dynamic = false, - callback = a[a.length-1], - boot = Y.config.bootstrap, - k, i, l, missing = [], - r = [], - css = Y.config.fetchCSS, - f = function(name) { - - // only attach a module once - if (used[name]) { - return; - } + // The last argument supplied to use can be a load complete callback + if (Y.Lang.isFunction(callback)) { + args.pop(); + } else { + callback = null; + } - var m = mods[name], j, req, use; + if (Y._loading) { + Y._useQueue = Y._useQueue || new Y.Queue(); + Y._useQueue.add([args, callback]); + } else { + key = args.join(); - if (m) { + if (Y.config.cacheUse && Y.Env.serviced[key]) { + Y._notify(callback, ALREADY_DONE, args); + } else { + Y._use(args, function(Y, response) { + if (Y.config.cacheUse) { + Y.Env.serviced[key] = true; + } + Y._notify(callback, response, args); + }); + } + } + return Y; + }, - used[name] = true; + _notify: function(callback, response, args) { + if (!response.success && this.config.loadErrorFn) { + this.config.loadErrorFn.call(this, this, callback, response, args); + } else if (callback) { + try { + callback(this, response); + } catch (e) { + this.error('use callback error', e, args); + } + } + }, - req = m.details.requires; - use = m.details.use; - } else { + _use: function(args, callback) { - // CSS files don't register themselves, see if it has been loaded - if (!YUI.Env._loaded[Y.version][name]) { - missing.push(name); - } else { - // probably css - used[name] = true; - } - } + if (!this.Array) { + this._attach(['yui-base']); + } - // make sure requirements are attached - if (req) { - if (Y.Lang.isString(req)) { - f(req); - } else { - for (j = 0; j < req.length; j = j + 1) { - f(req[j]); - } - } + var len, loader, handleBoot, + Y = this, + G_ENV = YUI.Env, + mods = G_ENV.mods, + Env = Y.Env, + used = Env._used, + queue = G_ENV._loaderQueue, + firstArg = args[0], + YArray = Y.Array, + config = Y.config, + boot = config.bootstrap, + missing = [], + r = [], + ret = true, + fetchCSS = config.fetchCSS, + process = function(names, skip) { + + if (!names.length) { + return; } - // add this module to full list of things to attach - r.push(name); + YArray.each(names, function(name) { - }, + // add this module to full list of things to attach + if (!skip) { + r.push(name); + } - onComplete; + // only attach a module once + if (used[name]) { + return; + } + var m = mods[name], req, use; - // The last argument supplied to use can be a load complete callback - if (typeof callback === 'function') { - a.pop(); - } else { - callback = null; - } + if (m) { + used[name] = true; + req = m.details.requires; + use = m.details.use; + } else { + // CSS files don't register themselves, see if it has + // been loaded + if (!G_ENV._loaded[VERSION][name]) { + missing.push(name); + } else { + used[name] = true; // probably css + } + } - onComplete = function(fromLoader) { + // make sure requirements are attached + if (req && req.length) { + process(req); + } + // make sure we grab the submodule dependencies too + if (use && use.length) { + process(use, 1); + } + }); + }, - fromLoader = fromLoader || { - success: true, - msg: 'not dynamic' - }; + handleLoader = function(fromLoader) { + var response = fromLoader || { + success: true, + msg: 'not dynamic' + }, + redo, origMissing, + ret = true, + data = response.data; + + + Y._loading = false; + + if (data) { + origMissing = missing; + missing = []; + r = []; + process(data); + redo = missing.length; + if (redo) { + if (missing.sort().join() == + origMissing.sort().join()) { + redo = false; + } + } + } - if (callback) { - callback(Y, fromLoader); - } + if (redo && data) { + Y._loading = false; + Y._use(args, function() { + if (Y._attach(data)) { + Y._notify(callback, response, data); + } + }); + } else { + if (data) { + ret = Y._attach(data); + } + if (ret) { + Y._notify(callback, response, args); + } + } - if (Y.fire) { - Y.fire('yui:load', Y, fromLoader); - } + if (Y._useQueue && Y._useQueue.size() && !Y._loading) { + Y._use.apply(Y, Y._useQueue.next()); + } - // process queued use requests as long until done - // or dynamic load happens again. - Y._loading = false; + }; - if (Y._useQueue && Y._useQueue.size() && !Y._loading) { - Y.use.apply(Y, Y._useQueue.next()); - } - }; - // YUI().use('*'); // bind everything available - if (firstArg === "*") { - a = []; - for (k in mods) { - if (mods.hasOwnProperty(k)) { - a.push(k); - } + if (firstArg === '*') { + ret = Y._attach(Y.Object.keys(mods)); + if (ret) { + handleLoader(); } - - if (callback) { - a.push(callback); - } - - return Y.use.apply(Y, a); + return Y; } - - // use loader to expand dependencies and sort the + + // use loader to expand dependencies and sort the // requirements if it is available. - if (Y.Loader) { - dynamic = true; - loader = new Y.Loader(Y.config); - loader.require(a); + if (boot && Y.Loader && args.length) { + loader = getLoader(Y); + loader.require(args); loader.ignoreRegistered = true; - loader.allowRollup = false; - // loader.calculate(null, (css && css == 'force') ? null : 'js'); - // loader.calculate(); - loader.calculate(null, (css) ? null : 'js'); - a = loader.sorted; + loader.calculate(null, (fetchCSS) ? null : 'js'); + args = loader.sorted; } - - l = a.length; - - // process each requirement and any additional requirements + // process each requirement and any additional requirements // the module metadata specifies - for (i=0; i *
            DEBUG
            @@ -852,11 +1211,11 @@ YUI.prototype = { *
            RAW
            *
            Selects the non-minified version of the library (e.g., event.js).
            * - * You can also define a custom filter, which must be an object literal + * You can also define a custom filter, which must be an object literal * containing a search expression and a replace string: *
            - *  myFilter: { 
            - *      'searchExp': "-min\\.js", 
            + *  myFilter: {
            + *      'searchExp': "-min\\.js",
              *      'replaceStr': "-debug.js"
              *  }
              * 
            @@ -868,18 +1227,46 @@ YUI.prototype = { */ /** - * Hash of per-component filter specification. If specified for a given component, - * this overrides the filter config + * The 'skin' config let's you configure application level skin + * customizations. It contains the following attributes which + * can be specified to override the defaults: + * + * // The default skin, which is automatically applied if not + * // overriden by a component-specific skin definition. + * // Change this in to apply a different skin globally + * defaultSkin: 'sam', + * + * // This is combined with the loader base property to get + * // the default root directory for a skin. + * base: 'assets/skins/', + * + * // Any component-specific overrides can be specified here, + * // making it possible to load different skins for different + * // components. It is possible to load more than one skin + * // for a given component as well. + * overrides: { + * slider: ['capsule', 'round'] + * } + * + * For dynamic loading. + * + * @property skin + */ + +/** + * Hash of per-component filter specification. If specified for a given + * component, this overrides the filter config. * * For dynamic loading. * * @property filters - * @type object */ /** - * Use the YUI combo service to reduce the number of http connections - * required to load your dependencies. + * Use the YUI combo service to reduce the number of http connections + * required to load your dependencies. Turning this off will + * disable combo handling for YUI and all module groups configured + * with a combo service. * * For dynamic loading. * @@ -896,7 +1283,7 @@ YUI.prototype = { */ /** - * A list of modules that should always be loaded when required, even if already + * A list of modules that should always be loaded when required, even if already * present on the page. * * @property force @@ -904,45 +1291,36 @@ YUI.prototype = { */ /** - * Node or id for a node that should be used as the insertion point for new nodes - * For dynamic loading. + * Node or id for a node that should be used as the insertion point for new + * nodes. For dynamic loading. * * @property insertBefore * @type string */ /** - * charset for dynamic nodes - * - * @property charset - * @type string - * @deprecated use jsAttributes cssAttributes - */ - -/** - * Object literal containing attributes to add to dynamically loaded script nodes. - * + * Object literal containing attributes to add to dynamically loaded script + * nodes. * @property jsAttributes * @type string */ /** - * Object literal containing attributes to add to dynamically loaded link nodes. - * + * Object literal containing attributes to add to dynamically loaded link + * nodes. * @property cssAttributes * @type string */ /** - * Number of milliseconds before a timeout occurs when dynamically + * Number of milliseconds before a timeout occurs when dynamically * loading nodes. If not set, there is no timeout. - * * @property timeout * @type int */ /** - * Callback for the 'CSSComplete' event. When dynamically loading YUI + * Callback for the 'CSSComplete' event. When dynamically loading YUI * components with CSS, this property fires when the CSS is finished * loading but script loading is still ongoing. This provides an * opportunity to enhance the presentation of a loading page a little @@ -953,299 +1331,467 @@ YUI.prototype = { */ /** - * A list of module definitions to add to the list of YUI components. + * A hash of module definitions to add to the list of YUI components. * These components can then be dynamically loaded side by side with - * YUI via the use() method.See Loader.addModule for the supported - * module metadata. + * YUI via the use() method. This is a hash, the key is the module + * name, and the value is an object literal specifying the metdata + * for the module. * See Loader.addModule for the supported module + * metadata fields. Also @see groups, which provides a way to + * configure the base and combo spec for a set of modules. + * + * modules: { + *   mymod1: { + *   requires: ['node'], + *   fullpath: 'http://myserver.mydomain.com/mymod1/mymod1.js' + *   }, + *   mymod2: { + *   requires: ['mymod1'], + *   fullpath: 'http://myserver.mydomain.com/mymod2/mymod2.js' + *   } + * } + * * * @property modules - * @type function + * @type object */ - + +/** + * A hash of module group definitions. It for each group you + * can specify a list of modules and the base path and + * combo spec to use when dynamically loading the modules. @see + * @see modules for the details about the modules part of the + * group definition. + * + *   groups: { + *   yui2: { + *   // specify whether or not this group has a combo service + *   combine: true, + *   + *   // the base path for non-combo paths + *   base: 'http://yui.yahooapis.com/2.8.0r4/build/', + *   + *   // the path to the combo service + *   comboBase: 'http://yui.yahooapis.com/combo?', + *   + *   // a fragment to prepend to the path attribute when + *   // when building combo urls + *   root: '2.8.0r4/build/', + *   + *   // the module definitions + *   modules: { + *   yui2_yde: { + *   path: "yahoo-dom-event/yahoo-dom-event.js" + *   }, + *   yui2_anim: { + *   path: "animation/animation.js", + *   requires: ['yui2_yde'] + *   } + *   } + *   } + *   } + * + * @property modules + * @type object + */ + /** * The loader 'path' attribute to the loader itself. This is combined * with the 'base' attribute to dynamically load the loader component * when boostrapping with the get utility alone. * * @property loaderPath + * @type string * @default loader/loader-min.js */ /** - * * Specifies whether or not YUI().use(...) will attempt to load CSS * resources at all. Any truthy value will cause CSS dependencies - * to load when fetching script. The special value 'force' will + * to load when fetching script. The special value 'force' will * cause CSS dependencies to be loaded even if no script is needed. * * @property fetchCSS + * @type boolean|string * @default true */ -YUI.add('yui-base', function(Y) { -/* - * YUI stub - * @module yui - * @submodule yui-base +/** + * The default gallery version to build gallery module urls + * @property gallery + * @type string + * @since 3.1.0 */ + /** - * The YUI module contains the components required for building the YUI seed file. - * This includes the script loading mechanism, a simple queue, and the core utilities for the library. - * @module yui - * @submodule yui-base + * The default YUI 2 version to build yui2 module urls. This is for + * intrinsic YUI 2 support via the 2in3 project. Also @see the '2in3' + * config for pulling different revisions of the wrapped YUI 2 + * modules. + * @since 3.1.0 + * @property yui2 + * @type string + * @default 2.8.1 */ /** - * A simple FIFO queue. Items are added to the Queue with add(1..n items) and - * removed using next(). + * The 2in3 project is a deployment of the various versions of YUI 2 + * deployed as first-class YUI 3 modules. Eventually, the wrapper + * for the modules will change (but the underlying YUI 2 code will + * be the same), and you can select a particular version of + * the wrapper modules via this config. + * @since 3.1.0 + * @property 2in3 + * @type string + * @default 1 + */ + +/** + * Alternative console log function for use in environments without + * a supported native console. The function is executed in the + * YUI instance context. + * @since 3.1.0 + * @property logFn + * @type Function + */ + +/** + * A callback to execute when Y.error is called. It receives the + * error message and an javascript error object if Y.error was + * executed because a javascript error was caught. The function + * is executed in the YUI instance context. * - * @class Queue - * @param item* {MIXED} 0..n items to seed the queue + * @since 3.2.0 + * @property errorFn + * @type Function */ -function Queue() { - this._init(); - this.add.apply(this, arguments); -} -Queue.prototype = { - /** - * Initialize the queue - * - * @method _init - * @protected - */ - _init : function () { - /** - * The collection of enqueued items - * - * @property _q - * @type {Array} - * @protected - */ - this._q = []; - }, +/** + * A callback to execute when the loader fails to load one or + * more resource. This could be because of a script load + * failure. It can also fail if a javascript module fails + * to register itself, but only when the 'requireRegistration' + * is true. If this function is defined, the use() callback will + * only be called when the loader succeeds, otherwise it always + * executes unless there was a javascript error when attaching + * a module. + * + * @since 3.3.0 + * @property loadErrorFn + * @type Function + */ - /** - * Get the next item in the queue. - * - * @method next - * @return {MIXED} the next item in the queue - */ - next : function () { - return this._q.shift(); - }, +/** + * When set to true, the YUI loader will expect that all modules + * it is responsible for loading will be first-class YUI modules + * that register themselves with the YUI global. If this is + * set to true, loader will fail if the module registration fails + * to happen after the script is loaded. + * + * @since 3.3.0 + * @property requireRegistration + * @type boolean + * @default false + */ - /** - * Add 0..n items to the end of the queue - * - * @method add - * @param item* {MIXED} 0..n items - */ - add : function () { - Y.Array.each(Y.Array(arguments,0,true),function (fn) { - this._q.push(fn); - },this); +/** + * Cache serviced use() requests. + * @since 3.3.0 + * @property cacheUse + * @type boolean + * @default true + */ - return this; - }, +/** + * The parameter defaults for the remote loader service. + * Requires the rls submodule. The properties that are + * supported: + *
            + * m: comma separated list of module requirements.  This
            + *    must be the param name even for custom implemetations.
            + * v: the version of YUI to load.  Defaults to the version
            + *    of YUI that is being used.
            + * gv: the version of the gallery to load (@see the gallery config)
            + * env: comma separated list of modules already on the page.
            + *      this must be the param name even for custom implemetations.
            + * lang: the languages supported on the page (@see the lang config)
            + * '2in3v':  the version of the 2in3 wrapper to use (@see the 2in3 config).
            + * '2v': the version of yui2 to use in the yui 2in3 wrappers
            + *       (@see the yui2 config)
            + * filt: a filter def to apply to the urls (@see the filter config).
            + * filts: a list of custom filters to apply per module
            + *        (@see the filters config).
            + * tests: this is a map of conditional module test function id keys
            + * with the values of 1 if the test passes, 0 if not.  This must be
            + * the name of the querystring param in custom templates.
            + *
            + * + * @since 3.2.0 + * @property rls + */ - /** - * Returns the current number of queued items - * - * @method size - * @return {Number} - */ - size : function () { - return this._q.length; - } -}; +/** + * The base path to the remote loader service + * + * @since 3.2.0 + * @property rls_base + */ -Y.Queue = Queue; /** - * The YUI module contains the components required for building the YUI seed file. - * This includes the script loading mechanism, a simple queue, and the core utilities for the library. + * The template to use for building the querystring portion + * of the remote loader service url. The default is determined + * by the rls config -- each property that has a value will be + * represented. + * + * ex: m={m}&v={v}&env={env}&lang={lang}&filt={filt}&tests={tests} + * + * + * @since 3.2.0 + * @property rls_tmpl + */ + +/** + * Configure the instance to use a remote loader service instead of + * the client loader. + * + * @since 3.2.0 + * @property use_rls + */ +YUI.add('yui-base', function(Y) { + +/* + * YUI stub + * @module yui + * @submodule yui-base + */ +/** + * The YUI module contains the components required for building the YUI + * seed file. This includes the script loading mechanism, a simple queue, + * and the core utilities for the library. * @module yui * @submodule yui-base */ -(function() { + /** * Provides the language utilites and extensions used by the library * @class Lang * @static */ -Y.Lang = Y.Lang || {}; - -var L = Y.Lang, - -ARRAY = 'array', -BOOLEAN = 'boolean', -DATE = 'date', -ERROR = 'error', -FUNCTION = 'function', -NUMBER = 'number', -NULL = 'null', -OBJECT = 'object', -REGEX = 'regexp', -STRING = 'string', -TOSTRING = Object.prototype.toString, +Y.Lang = Y.Lang || {}; + +var L = Y.Lang, + +ARRAY = 'array', +BOOLEAN = 'boolean', +DATE = 'date', +ERROR = 'error', +FUNCTION = 'function', +NUMBER = 'number', +NULL = 'null', +OBJECT = 'object', +REGEX = 'regexp', +STRING = 'string', +STRING_PROTO = String.prototype, +TOSTRING = Object.prototype.toString, UNDEFINED = 'undefined', -TYPES = { - 'undefined' : UNDEFINED, - 'number' : NUMBER, - 'boolean' : BOOLEAN, - 'string' : STRING, +TYPES = { + 'undefined' : UNDEFINED, + 'number' : NUMBER, + 'boolean' : BOOLEAN, + 'string' : STRING, '[object Function]' : FUNCTION, - '[object RegExp]' : REGEX, - '[object Array]' : ARRAY, - '[object Date]' : DATE, - '[object Error]' : ERROR + '[object RegExp]' : REGEX, + '[object Array]' : ARRAY, + '[object Date]' : DATE, + '[object Error]' : ERROR }, TRIMREGEX = /^\s+|\s+$/g, -EMPTYSTRING = ''; +EMPTYSTRING = '', +SUBREGEX = /\{\s*([^\|\}]+?)\s*(?:\|([^\}]*))?\s*\}/g; /** * Determines whether or not the provided item is an array. * Returns false for array-like collections such as the * function arguments collection or HTMLElement collection - * will return false. You can use @see Array.test if you - * want to + * will return false. Use Y.Array.test if you + * want to test for an array-like collection. * @method isArray * @static - * @param o The object to test - * @return {boolean} true if o is an array + * @param o The object to test. + * @return {boolean} true if o is an array. */ -L.isArray = function(o) { +// L.isArray = Array.isArray || function(o) { +// return L.type(o) === ARRAY; +// }; + +L.isArray = function(o) { return L.type(o) === ARRAY; }; /** - * Determines whether or not the provided item is a boolean + * Determines whether or not the provided item is a boolean. * @method isBoolean * @static - * @param o The object to test - * @return {boolean} true if o is a boolean + * @param o The object to test. + * @return {boolean} true if o is a boolean. */ L.isBoolean = function(o) { return typeof o === BOOLEAN; }; /** - * Determines whether or not the provided item is a function + *

            + * Determines whether or not the provided item is a function. * Note: Internet Explorer thinks certain functions are objects: + *

            * + *
              * var obj = document.createElement("object");
              * Y.Lang.isFunction(obj.getAttribute) // reports false in IE
            - *
            + *  
              * var input = document.createElement("input"); // append to body
              * Y.Lang.isFunction(input.focus) // reports false in IE
            + * 
            * + *

            * You will have to implement additional tests if these functions * matter to you. + *

            * * @method isFunction * @static - * @param o The object to test - * @return {boolean} true if o is a function + * @param o The object to test. + * @return {boolean} true if o is a function. */ L.isFunction = function(o) { return L.type(o) === FUNCTION; }; - + /** - * Determines whether or not the supplied item is a date instance + * Determines whether or not the supplied item is a date instance. * @method isDate * @static - * @param o The object to test - * @return {boolean} true if o is a date + * @param o The object to test. + * @return {boolean} true if o is a date. */ L.isDate = function(o) { // return o instanceof Date; - return L.type(o) === DATE; + return L.type(o) === DATE && o.toString() !== 'Invalid Date' && !isNaN(o); }; /** - * Determines whether or not the provided item is null + * Determines whether or not the provided item is null. * @method isNull * @static - * @param o The object to test - * @return {boolean} true if o is null + * @param o The object to test. + * @return {boolean} true if o is null. */ L.isNull = function(o) { return o === null; }; - + /** - * Determines whether or not the provided item is a legal number + * Determines whether or not the provided item is a legal number. * @method isNumber * @static - * @param o The object to test - * @return {boolean} true if o is a number + * @param o The object to test. + * @return {boolean} true if o is a number. */ L.isNumber = function(o) { return typeof o === NUMBER && isFinite(o); }; - + /** * Determines whether or not the provided item is of type object - * or function + * or function. Note that arrays are also objects, so + * Y.Lang.isObject([]) === true. * @method isObject * @static - * @param o The object to test - * @param failfn {boolean} fail if the input is a function - * @return {boolean} true if o is an object - */ + * @param o The object to test. + * @param failfn {boolean} fail if the input is a function. + * @return {boolean} true if o is an object. + */ L.isObject = function(o, failfn) { -return (o && (typeof o === OBJECT || (!failfn && L.isFunction(o)))) || false; + var t = typeof o; + return (o && (t === OBJECT || + (!failfn && (t === FUNCTION || L.isFunction(o))))) || false; }; - + /** - * Determines whether or not the provided item is a string + * Determines whether or not the provided item is a string. * @method isString * @static - * @param o The object to test - * @return {boolean} true if o is a string + * @param o The object to test. + * @return {boolean} true if o is a string. */ L.isString = function(o) { return typeof o === STRING; }; - + /** - * Determines whether or not the provided item is undefined + * Determines whether or not the provided item is undefined. * @method isUndefined * @static - * @param o The object to test - * @return {boolean} true if o is undefined + * @param o The object to test. + * @return {boolean} true if o is undefined. */ L.isUndefined = function(o) { return typeof o === UNDEFINED; }; /** - * Returns a string without any leading or trailing whitespace. If + * Returns a string without any leading or trailing whitespace. If * the input is not a string, the input will be returned untouched. * @method trim * @static - * @param s {string} the string to trim - * @return {string} the trimmed string + * @param s {string} the string to trim. + * @return {string} the trimmed string. */ -L.trim = function(s){ +L.trim = STRING_PROTO.trim ? function(s) { + return (s && s.trim) ? s.trim() : s; +} : function (s) { try { return s.replace(TRIMREGEX, EMPTYSTRING); - } catch(e) { + } catch (e) { return s; } }; +/** + * Returns a string without any leading whitespace. + * @method trimLeft + * @static + * @param s {string} the string to trim. + * @return {string} the trimmed string. + */ +L.trimLeft = STRING_PROTO.trimLeft ? function (s) { + return s.trimLeft(); +} : function (s) { + return s.replace(/^\s+/, ''); +}; + +/** + * Returns a string without any trailing whitespace. + * @method trimRight + * @static + * @param s {string} the string to trim. + * @return {string} the trimmed string. + */ +L.trimRight = STRING_PROTO.trimRight ? function (s) { + return s.trimRight(); +} : function (s) { + return s.replace(/\s+$/, ''); +}; + /** * A convenience method for detecting a legitimate non-null value. - * Returns false for null/undefined/NaN, true for other values, + * Returns false for null/undefined/NaN, true for other values, * including 0/false/'' * @method isValue * @static - * @param o The item to test - * @return {boolean} true if it is not null/undefined/NaN || false + * @param o The item to test. + * @return {boolean} true if it is not null/undefined/NaN || false. */ L.isValue = function(o) { var t = L.type(o); @@ -1261,27 +1807,68 @@ L.isValue = function(o) { }; /** + *

            * Returns a string representing the type of the item passed in. + *

            + * + *

            + * Known issues: + *

            + * + *
              + *
            • + * typeof HTMLElementCollection returns function in Safari, but + * Y.type() reports object, which could be a good thing -- + * but it actually caused the logic in Y.Lang.isObject to fail. + *
            • + *
            + * * @method type - * @param o the item to test - * @return {string} the detected type + * @param o the item to test. + * @return {string} the detected type. + * @static + */ +L.type = function(o) { + return TYPES[typeof o] || TYPES[TOSTRING.call(o)] || (o ? OBJECT : NULL); +}; + +/** + * Lightweight version of Y.substitute. Uses the same template + * structure as Y.substitute, but doesn't support recursion, + * auto-object coersion, or formats. + * @method sub + * @param {string} s String to be modified. + * @param {object} o Object containing replacement values. + * @return {string} the substitute result. + * @static + * @since 3.2.0 */ -L.type = function (o) { - return TYPES[typeof o] || TYPES[TOSTRING.call(o)] || (o ? OBJECT : NULL); +L.sub = function(s, o) { + return ((s.replace) ? s.replace(SUBREGEX, function(match, key) { + return (!L.isUndefined(o[key])) ? o[key] : match; + }) : s); }; -})(); +/** + * Returns the current time in milliseconds. + * @method now + * @return {int} the current date + * @since 3.3.0 + */ +L.now = Date.now || function () { + return new Date().getTime(); +}; /** - * The YUI module contains the components required for building the YUI seed file. - * This includes the script loading mechanism, a simple queue, and the core utilities for the library. + * The YUI module contains the components required for building the YUI seed + * file. This includes the script loading mechanism, a simple queue, and the + * core utilities for the library. * @module yui * @submodule yui-base */ -(function() { -var L = Y.Lang, Native = Array.prototype, +var Native = Array.prototype, LENGTH = 'length', /** * Adds the following array utilities to the YUI instance. Additional @@ -1289,87 +1876,83 @@ var L = Y.Lang, Native = Array.prototype, * @class Array */ -/** +/** * Y.Array(o) returns an array: * - Arrays are return unmodified unless the start position is specified. * - "Array-like" collections (@see Array.test) are converted to arrays - * - For everything else, a new array is created with the input as the sole item + * - For everything else, a new array is created with the input as the sole + * item. * - The start position is used if the input is or is like an array to return * a subset of the collection. * - * @TODO this will not automatically convert elements that are also collections - * such as forms and selects. Passing true as the third param will - * force a conversion. + * @todo this will not automatically convert elements that are also + * collections such as forms and selects. Passing true as the third + * param will force a conversion. * * @method () * @static - * @param o the item to arrayify - * @param i {int} if an array or array-like, this is the start index - * @param al {boolean} if true, it forces the array-like fork. This - * can be used to avoid multiple array.test calls. - * @return {Array} the resulting array - */ -YArray = function(o, startIdx, al) { - var t = (al) ? 2 : Y.Array.test(o), i, l, a; - - // switch (t) { - // case 1: - // // return (startIdx) ? o.slice(startIdx) : o; - // case 2: - // return Native.slice.call(o, startIdx || 0); - // default: - // return [o]; - // } + * @param {object} o the item to arrayify. + * @param {int} startIdx if an array or array-like, this is the start index. + * @param {boolean} arraylike if true, it forces the array-like fork. This + * can be used to avoid multiple Array.test calls. + * @return {Array} the resulting array. + */ +YArray = function(o, startIdx, arraylike) { + var t = (arraylike) ? 2 : YArray.test(o), + l, a, start = startIdx || 0; if (t) { + // IE errors when trying to slice HTMLElement collections try { - return Native.slice.call(o, startIdx || 0); - // IE errors when trying to slice element collections - } catch(e) { - a=[]; - for (i=0, l=o.length; i 1)) { + // indexed, but no tagName (element) or alert (window), + // or functions without apply/call (Safari + // HTMLElementCollection bug). + if ((LENGTH in o) && !o.tagName && !o.alert && !o.apply) { r = 2; } - - } catch(e) {} + + } catch (e) {} } } return r; @@ -1378,21 +1961,21 @@ YArray.test = function(o) { /** * Executes the supplied function on each item in the array. * @method each - * @param a {Array} the array to iterate - * @param f {Function} the function to execute on each item. The + * @param {Array} a the array to iterate. + * @param {Function} f the function to execute on each item. The * function receives three arguments: the value, the index, the full array. - * @param o Optional context object + * @param {object} o Optional context object. * @static - * @return {YUI} the YUI instance + * @return {YUI} the YUI instance. */ YArray.each = (Native.forEach) ? - function (a, f, o) { + function(a, f, o) { Native.forEach.call(a || [], f, o || Y); return Y; } : - function (a, f, o) { + function(a, f, o) { var l = (a && a.length) || 0, i; - for (i = 0; i < l; i=i+1) { + for (i = 0; i < l; i = i + 1) { f.call(o || Y, a[i], i, a); } return Y; @@ -1404,13 +1987,13 @@ YArray.each = (Native.forEach) ? * provided the value is set to true for each. * @method hash * @static - * @param k {Array} keyset - * @param v {Array} optional valueset - * @return {object} the hash + * @param {Array} k keyset. + * @param {Array} v optional valueset. + * @return {object} the hash. */ YArray.hash = function(k, v) { var o = {}, l = k.length, vl = v && v.length, i; - for (i=0; i i) ? v[i] : true; } @@ -1423,16 +2006,16 @@ YArray.hash = function(k, v) { * value isn't found. * @method indexOf * @static - * @param a {Array} the array to search - * @param val the value to search for - * @return {int} the index of the item that contains the value or -1 + * @param {Array} a the array to search. + * @param {any} val the value to search for. + * @return {int} the index of the item that contains the value or -1. */ YArray.indexOf = (Native.indexOf) ? function(a, val) { return Native.indexOf.call(a, val); } : function(a, val) { - for (var i=0; i 1) ? + Array.prototype.join.call(arguments, CACHED_DELIMITER) : arg1; if (!(k in cache) || (refetch && cache[k] == refetch)) { cache[k] = source.apply(source, arguments); @@ -1654,15 +2319,13 @@ Y.cached = function(source, cache, refetch){ }; -})(); - /** - * The YUI module contains the components required for building the YUI seed file. - * This includes the script loading mechanism, a simple queue, and the core utilities for the library. + * The YUI module contains the components required for building the YUI + * seed file. This includes the script loading mechanism, a simple queue, + * and the core utilities for the library. * @module yui * @submodule yui-base */ -(function() { /** * Adds the following Object utilities to the YUI instance @@ -1670,30 +2333,38 @@ Y.cached = function(source, cache, refetch){ */ /** - * Y.Object(o) returns a new object based upon the supplied object. - * @TODO Use native Object.create() when available + * Y.Object(o) returns a new object based upon the supplied object. * @method () * @static - * @param o the supplier object - * @return {Object} the new object + * @param o the supplier object. + * @return {Object} the new object. */ -Y.Object = function(o) { - var F = function() {}; +var F = function() {}, + +// O = Object.create || function(o) { +// F.prototype = o; +// return new F(); +// }, + +O = function(o) { F.prototype = o; return new F(); -}; +}, -var O = Y.Object, +owns = function(o, k) { + return o && o.hasOwnProperty && o.hasOwnProperty(k); + // return Object.prototype.hasOwnProperty.call(o, k); +}, -UNDEFINED = undefined, +UNDEF, /** * Extracts the keys, values, or size from an object - * + * * @method _extract - * @param o the object - * @param what what to extract (0: keys, 1: values, 2: size) - * @return {boolean|Array} the extracted info + * @param o the object. + * @param what what to extract (0: keys, 1: values, 2: size). + * @return {boolean|Array} the extracted info. * @static * @private */ @@ -1701,10 +2372,10 @@ _extract = function(o, what) { var count = (what === 2), out = (count) ? 0 : [], i; for (i in o) { - if (count) { - out++; - } else { - if (o.hasOwnProperty(i)) { + if (owns(o, i)) { + if (count) { + out++; + } else { out.push((what) ? o[i] : i); } } @@ -1713,39 +2384,46 @@ _extract = function(o, what) { return out; }; +Y.Object = O; + /** * Returns an array containing the object's keys - * @TODO use native Object.keys() if available * @method keys * @static - * @param o an object - * @return {string[]} the keys + * @param o an object. + * @return {string[]} the keys. */ +// O.keys = Object.keys || function(o) { +// return _extract(o); +// }; + O.keys = function(o) { return _extract(o); }; /** * Returns an array containing the object's values - * @TODO use native Object.values() if available * @method values * @static - * @param o an object - * @return {Array} the values + * @param o an object. + * @return {Array} the values. */ +// O.values = Object.values || function(o) { +// return _extract(o, 1); +// }; + O.values = function(o) { return _extract(o, 1); }; /** * Returns the size of an object - * @TODO use native Object.size() if available * @method size * @static - * @param o an object - * @return {int} the size + * @param o an object. + * @return {int} the size. */ -O.size = function(o) { +O.size = Object.size || function(o) { return _extract(o, 2); }; @@ -1753,22 +2431,18 @@ O.size = function(o) { * Returns true if the object contains a given key * @method hasKey * @static - * @param o an object - * @param k the key to query - * @return {boolean} true if the object contains the key + * @param o an object. + * @param k the key to query. + * @return {boolean} true if the object contains the key. */ -O.hasKey = function(o, k) { - // return (o.hasOwnProperty(k)); - return (k in o); -}; - +O.hasKey = owns; /** * Returns true if the object contains a given value * @method hasValue * @static - * @param o an object - * @param v the value to query - * @return {boolean} true if the object contains the value + * @param o an object. + * @param v the value to query. + * @return {boolean} true if the object contains the value. */ O.hasValue = function(o, v) { return (Y.Array.indexOf(O.values(o), v) > -1); @@ -1779,88 +2453,89 @@ O.hasValue = function(o, v) { * to the object instance. Returns false if the property is not present * in the object, or was inherited from the prototype. * - * @deprecated Safari 1.x support has been removed, so this is simply a - * wrapper for the native implementation. Use the native implementation - * directly instead. - * - * @TODO Remove in B1 - * * @method owns * @static - * @param o {any} The object being testing - * @param p {string} the property to look for - * @return {boolean} true if the object has the property on the instance + * @param o {any} The object being testing. + * @param p {string} the property to look for. + * @return {boolean} true if the object has the property on the instance. */ -O.owns = function(o, k) { - return (o.hasOwnProperty(k)); -}; +O.owns = owns; /** * Executes a function on each item. The function * receives the value, the key, and the object - * as paramters (in that order). + * as parameters (in that order). * @method each * @static - * @param o the object to iterate - * @param f {Function} the function to execute on each item. The function + * @param o the object to iterate. + * @param f {Function} the function to execute on each item. The function * receives three arguments: the value, the the key, the full object. - * @param c the execution context - * @param proto {boolean} include proto - * @return {YUI} the YUI instance + * @param c the execution context. + * @param proto {boolean} include proto. + * @return {YUI} the YUI instance. */ -O.each = function (o, f, c, proto) { +O.each = function(o, f, c, proto) { var s = c || Y, i; for (i in o) { - if (proto || o.hasOwnProperty(i)) { + if (proto || owns(o, i)) { f.call(s, o[i], i, o); } } return Y; }; -/* +/** * Executes a function on each item, but halts if the * function returns true. The function * receives the value, the key, and the object * as paramters (in that order). * @method some * @static - * @param o the object to iterate - * @param f {Function} the function to execute on each item. The function + * @param o the object to iterate. + * @param f {Function} the function to execute on each item. The function * receives three arguments: the value, the the key, the full object. - * @param c the execution context - * @param proto {boolean} include proto - * @return {boolean} true if any execution of the function returns true, false otherwise - */ -// O.some = function (o, f, c, proto) { -// var s = c || Y, i; -// -// for (i in o) { -// if (proto || o.hasOwnProperty(i)) { -// if (f.call(s, o[i], i, o)) { -// return true; -// } -// } -// } -// return false; -// }; + * @param c the execution context. + * @param proto {boolean} include proto. + * @return {boolean} true if any execution of the function returns true, + * false otherwise. + */ +O.some = function(o, f, c, proto) { + var s = c || Y, i; + + for (i in o) { + if (proto || owns(o, i)) { + if (f.call(s, o[i], i, o)) { + return true; + } + } + } + return false; +}; /** * Retrieves the sub value at the provided path, * from the value object provided. * * @method getValue - * @param o The object from which to extract the property value + * @static + * @param o The object from which to extract the property value. * @param path {Array} A path array, specifying the object traversal path * from which to obtain the sub value. - * @return {Any} The value stored in the path, undefined if not found. - * Returns the source object if an empty path is provided. + * @return {Any} The value stored in the path, undefined if not found, + * undefined if the source is not an object. Returns the source object + * if an empty path is provided. */ -O.getValue = function (o, path) { - var p=Y.Array(path), l=p.length, i; +O.getValue = function(o, path) { + if (!Y.Lang.isObject(o)) { + return UNDEF; + } - for (i=0; o !== UNDEFINED && i < l; i=i+1) { + var i, + p = Y.Array(path), + l = p.length; + + for (i = 0; o !== UNDEF && i < l; i++) { o = o[p[i]]; } @@ -1868,43 +2543,59 @@ O.getValue = function (o, path) { }; /** - * Sets the sub-attribute value at the provided path on the - * value object. Returns the modified value object, or + * Sets the sub-attribute value at the provided path on the + * value object. Returns the modified value object, or * undefined if the path is invalid. * * @method setValue + * @static * @param o The object on which to set the sub value. * @param path {Array} A path array, specifying the object traversal path * at which to set the sub value. * @param val {Any} The new value for the sub-attribute. - * @return {Object} The modified object, with the new sub value set, or + * @return {Object} The modified object, with the new sub value set, or * undefined, if the path was invalid. */ O.setValue = function(o, path, val) { - - var p=Y.Array(path), leafIdx=p.length-1, i, ref=o; + var i, + p = Y.Array(path), + leafIdx = p.length - 1, + ref = o; if (leafIdx >= 0) { - for (i=0; ref !== UNDEFINED && i < leafIdx; i=i+1) { + for (i = 0; ref !== UNDEF && i < leafIdx; i++) { ref = ref[p[i]]; } - if (ref !== UNDEFINED) { + if (ref !== UNDEF) { ref[p[i]] = val; } else { - return UNDEFINED; + return UNDEF; } } return o; }; - -})(); - /** - * The YUI module contains the components required for building the YUI seed file. - * This includes the script loading mechanism, a simple queue, and the core utilities for the library. + * Returns true if the object has no properties of its own + * @method isEmpty + * @static + * @return {boolean} true if the object is empty. + * @since 3.2.0 + */ +O.isEmpty = function(o) { + for (var i in o) { + if (owns(o, i)) { + return false; + } + } + return true; +}; +/** + * The YUI module contains the components required for building the YUI seed + * file. This includes the script loading mechanism, a simple queue, and the + * core utilities for the library. * @module yui * @submodule yui-base */ @@ -1914,24 +2605,33 @@ O.setValue = function(o, path, val) { * Do not fork for a browser if it can be avoided. Use feature detection when * you can. Use the user agent as a last resort. UA stores a version * number for the browser engine, 0 otherwise. This value may or may not map - * to the version number of the browser using the engine. The value is - * presented as a float so that it can easily be used for boolean evaluation - * as well as for looking for a particular range of versions. Because of this, - * some of the granularity of the version info may be lost (e.g., Gecko 1.8.0.9 + * to the version number of the browser using the engine. The value is + * presented as a float so that it can easily be used for boolean evaluation + * as well as for looking for a particular range of versions. Because of this, + * some of the granularity of the version info may be lost (e.g., Gecko 1.8.0.9 * reports 1.8). * @class UA * @static */ -Y.UA = function() { - - var numberfy = function(s) { +/** +* Static method for parsing the UA string. Defaults to assigning it's value to Y.UA +* @static +* @method Env.parseUA +* @param {String} subUA Parse this UA string instead of navigator.userAgent +* @returns {Object} The Y.UA object +*/ +YUI.Env.parseUA = function(subUA) { + + var numberify = function(s) { var c = 0; return parseFloat(s.replace(/\./g, function() { return (c++ == 1) ? '' : '.'; })); }, - - nav = navigator, + + win = Y.config.win, + + nav = win && win.navigator, o = { @@ -1952,14 +2652,15 @@ Y.UA = function() { opera: 0, /** - * Gecko engine revision number. Will evaluate to 1 if Gecko + * Gecko engine revision number. Will evaluate to 1 if Gecko * is detected but the revision could not be found. Other browsers * will be 0. Example: 1.8 *
                      * Firefox 1.0.0.4: 1.7.8   <-- Reports 1.7
            -         * Firefox 1.5.0.9: 1.8.0.9 <-- Reports 1.8
            -         * Firefox 2.0.0.3: 1.8.1.3 <-- Reports 1.8
            -         * Firefox 3 alpha: 1.9a4   <-- Reports 1.9
            +         * Firefox 1.5.0.9: 1.8.0.9 <-- 1.8
            +         * Firefox 2.0.0.3: 1.8.1.3 <-- 1.81
            +         * Firefox 3.0   <-- 1.9
            +         * Firefox 3.5   <-- 1.91
                      * 
            * @property gecko * @type float @@ -1968,10 +2669,10 @@ Y.UA = function() { gecko: 0, /** - * AppleWebKit version. KHTML browsers that are not WebKit browsers + * AppleWebKit version. KHTML browsers that are not WebKit browsers * will evaluate to 1, other browsers 0. Example: 418.9 *
            -         * Safari 1.3.2 (312.6): 312.8.1 <-- Reports 312.8 -- currently the 
            +         * Safari 1.3.2 (312.6): 312.8.1 <-- Reports 312.8 -- currently the
                      *                                   latest available for Mac OSX 10.3.
                      * Safari 2.0.2:         416     <-- hasOwnProperty introduced
                      * Safari 2.0.4:         418     <-- preventDefault fixed
            @@ -1980,26 +2681,35 @@ Y.UA = function() {
                      * Safari 2.0.4 (419.3): 419     <-- Tiger installations that have been
                      *                                   updated, but not updated
                      *                                   to the latest patch.
            -         * Webkit 212 nightly:   522+    <-- Safari 3.0 precursor (with native SVG
            -         *                                   and many major issues fixed).
            -         * Safari 3.0.4 (523.12) 523.12  <-- First Tiger release - automatic update
            -         *                                   from 2.x via the 10.4.11 OS patch
            +         * Webkit 212 nightly:   522+    <-- Safari 3.0 precursor (with native
            +         * SVG and many major issues fixed).
            +         * Safari 3.0.4 (523.12) 523.12  <-- First Tiger release - automatic
            +         * update from 2.x via the 10.4.11 OS patch.
                      * Webkit nightly 1/2008:525+    <-- Supports DOMContentLoaded event.
                      *                                   yahoo.com user agent hack removed.
                      * 
            - * http://en.wikipedia.org/wiki/Safari_(web_browser)#Version_history + * http://en.wikipedia.org/wiki/Safari_version_history * @property webkit * @type float * @static */ webkit: 0, + /** + * Chrome will be detected as webkit, but this property will also + * be populated with the Chrome version number + * @property chrome + * @type float + * @static + */ + chrome: 0, + /** * The mobile property will be set to a string containing any relevant * user agent information when a modern mobile browser is detected. * Currently limited to Safari on the iPhone/iPod Touch, Nokia N-series - * devices with the WebKit-based browser, and Opera Mini. - * @property mobile + * devices with the WebKit-based browser, and Opera Mini. + * @property mobile * @type string * @static */ @@ -2012,13 +2722,55 @@ Y.UA = function() { * @type float */ air: 0, + /** + * Detects Apple iPad's OS version + * @property ipad + * @type float + * @static + */ + ipad: 0, + /** + * Detects Apple iPhone's OS version + * @property iphone + * @type float + * @static + */ + iphone: 0, + /** + * Detects Apples iPod's OS version + * @property ipod + * @type float + * @static + */ + ipod: 0, + /** + * General truthy check for iPad, iPhone or iPod + * @property ios + * @type float + * @static + */ + ios: null, + /** + * Detects Googles Android OS version + * @property android + * @type float + * @static + */ + android: 0, + /** + * Detects Palms WebOS version + * @property webos + * @type float + * @static + */ + webos: 0, /** * Google Caja version number or 0. * @property caja * @type float */ - caja: nav.cajaVersion, + caja: nav && nav.cajaVersion, /** * Set to true if the page appears to be in SSL @@ -2035,18 +2787,18 @@ Y.UA = function() { * @static */ os: null - + }, - ua = nav && nav.userAgent, + ua = subUA || nav && nav.userAgent, - loc = Y.config.win.location, + loc = win && win.location, href = loc && loc.href, - + m; - o.secure = href && (href.toLowerCase().indexOf("https") === 0); + o.secure = href && (href.toLowerCase().indexOf('https') === 0); if (ua) { @@ -2054,102 +2806,107 @@ Y.UA = function() { o.os = 'windows'; } else if ((/macintosh/i).test(ua)) { o.os = 'macintosh'; + } else if ((/rhino/i).test(ua)) { + o.os = 'rhino'; } // Modern KHTML browsers should qualify as Safari X-Grade if ((/KHTML/).test(ua)) { - o.webkit=1; + o.webkit = 1; } // Modern WebKit browsers are at least X-Grade - m=ua.match(/AppleWebKit\/([^\s]*)/); - if (m&&m[1]) { - o.webkit=numberfy(m[1]); + m = ua.match(/AppleWebKit\/([^\s]*)/); + if (m && m[1]) { + o.webkit = numberify(m[1]); // Mobile browser check if (/ Mobile\//.test(ua)) { - o.mobile = "Apple"; // iPhone or iPod Touch + o.mobile = 'Apple'; // iPhone or iPod Touch + + m = ua.match(/OS ([^\s]*)/); + if (m && m[1]) { + m = numberify(m[1].replace('_', '.')); + } + o.ios = m; + o.ipad = o.ipod = o.iphone = 0; + + m = ua.match(/iPad|iPod|iPhone/); + if (m && m[0]) { + o[m[0].toLowerCase()] = o.ios; + } } else { - m=ua.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/); + m = ua.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/); if (m) { - o.mobile = m[0]; // Nokia N-series, Android, webOS, ex: NokiaN95 + // Nokia N-series, Android, webOS, ex: NokiaN95 + o.mobile = m[0]; } - } + if (/webOS/.test(ua)) { + o.mobile = 'WebOS'; + m = ua.match(/webOS\/([^\s]*);/); + if (m && m[1]) { + o.webos = numberify(m[1]); + } + } + if (/ Android/.test(ua)) { + o.mobile = 'Android'; + m = ua.match(/Android ([^\s]*);/); + if (m && m[1]) { + o.android = numberify(m[1]); + } - m=ua.match(/AdobeAIR\/([^\s]*)/); - if (m) { - o.air = m[0]; // Adobe AIR 1.0 or better + } } + m = ua.match(/Chrome\/([^\s]*)/); + if (m && m[1]) { + o.chrome = numberify(m[1]); // Chrome + } else { + m = ua.match(/AdobeAIR\/([^\s]*)/); + if (m) { + o.air = m[0]; // Adobe AIR 1.0 or better + } + } } if (!o.webkit) { // not webkit - // @todo check Opera/8.01 (J2ME/MIDP; Opera Mini/2.0.4509/1316; fi; U; ssr) - m=ua.match(/Opera[\s\/]([^\s]*)/); - if (m&&m[1]) { - o.opera=numberfy(m[1]); - m=ua.match(/Opera Mini[^;]*/); +// @todo check Opera/8.01 (J2ME/MIDP; Opera Mini/2.0.4509/1316; fi; U; ssr) + m = ua.match(/Opera[\s\/]([^\s]*)/); + if (m && m[1]) { + o.opera = numberify(m[1]); + m = ua.match(/Opera Mini[^;]*/); if (m) { o.mobile = m[0]; // ex: Opera Mini/2.0.4509/1316 } } else { // not opera or webkit - m=ua.match(/MSIE\s([^;]*)/); - if (m&&m[1]) { - o.ie=numberfy(m[1]); + m = ua.match(/MSIE\s([^;]*)/); + if (m && m[1]) { + o.ie = numberify(m[1]); } else { // not opera, webkit, or ie - m=ua.match(/Gecko\/([^\s]*)/); + m = ua.match(/Gecko\/([^\s]*)/); if (m) { - o.gecko=1; // Gecko detected, look for revision - m=ua.match(/rv:([^\s\)]*)/); - if (m&&m[1]) { - o.gecko=numberfy(m[1]); + o.gecko = 1; // Gecko detected, look for revision + m = ua.match(/rv:([^\s\)]*)/); + if (m && m[1]) { + o.gecko = numberify(m[1]); } } } } } } - - return o; -}(); -/** - * The YUI module contains the components required for building the YUI seed file. - * This includes the script loading mechanism, a simple queue, and the core utilities for the library. - * @module yui - * @submodule yui-base - */ - -(function() { - - var min = ['yui-base'], core, C = Y.config, mods = YUI.Env.mods, - extras, i; - - // apply the minimal required functionality - Y.use.apply(Y, min); - - if (C.core) { - core = C.core; - } else { - core = []; - extras = ['get', 'loader', 'yui-log', 'yui-later']; + YUI.Env.UA = o; - for (i=0; i *
            onSuccess
            *
            @@ -2738,7 +3506,8 @@ Y.Get = function() { * *
            *
            onEnd
            - *
            a function that executes when the transaction finishes, regardless of the exit path
            + *
            a function that executes when the transaction finishes, + * regardless of the exit path
            *
            onFailure
            *
            * callback to execute when the script load operation fails @@ -2764,7 +3533,7 @@ Y.Get = function() { *
            a window other than the one the utility occupies
            *
            autopurge
            *
            - * setting to true will let the utilities cleanup routine purge + * setting to true will let the utilities cleanup routine purge * the script once loaded *
            *
            purgethreshold
            @@ -2777,47 +3546,58 @@ Y.Get = function() { * loaded. * *
            insertBefore
            - *
            node or node id that will become the new node's nextSibling
            + *
            node or node id that will become the new node's nextSibling. + * If this is not specified, nodes will be inserted before a base + * tag should it exist. Otherwise, the nodes will be appended to the + * end of the document head.
            * *
            charset
            - *
            Node charset, default utf-8 (deprecated, use the attributes config)
            + *
            Node charset, default utf-8 (deprecated, use the attributes + * config)
            *
            attributes
            - *
            An object literal containing additional attributes to add to the link tags
            + *
            An object literal containing additional attributes to add to + * the link tags
            *
            timeout
            - *
            Number of milliseconds to wait before aborting and firing the timeout event
            + *
            Number of milliseconds to wait before aborting and firing + * the timeout event
            *
            -         *   Y.Get.script(
            -         *   ["http://yui.yahooapis.com/2.5.2/build/yahoo/yahoo-min.js",
            -         *    "http://yui.yahooapis.com/2.5.2/build/event/event-min.js"], {
            -         *     onSuccess: function(o) {
            -         *       this.log("won't cause error because Y is the context");
            -         *     },
            -         *     onFailure: function(o) {
            -         *     },
            -         *     onTimeout: function(o) {
            -         *     },
            -         *     data: "foo",
            -         *     timeout: 10000, // 10 second timeout
            -         *     context: Y, // make the YUI instance
            -         *     // win: otherframe // target another window/frame
            -         *     autopurge: true // allow the utility to choose when to remove the nodes
            -         *     purgetheshold: 1 // purge previous transaction before next transaction
            -         *   });
            +         *   Y.Get.script(
            +         *   ["http://yui.yahooapis.com/2.5.2/build/yahoo/yahoo-min.js",
            +         *    "http://yui.yahooapis.com/2.5.2/build/event/event-min.js"],
            +         *   {
            +         *     onSuccess: function(o) {
            +         *       this.log("won't cause error because Y is the context");
            +         *                     // immediately
            +         *     },
            +         *     onFailure: function(o) {
            +         *     },
            +         *     onTimeout: function(o) {
            +         *     },
            +         *     data: "foo",
            +         *     timeout: 10000, // 10 second timeout
            +         *     context: Y, // make the YUI instance
            +         *     // win: otherframe // target another window/frame
            +         *     autopurge: true // allow the utility to choose when to
            +         *                     // remove the nodes
            +         *     purgetheshold: 1 // purge previous transaction before
            +         *                      // next transaction
            +         *   });.
                      * 
            - * @return {tId: string} an object containing info about the transaction + * @return {tId: string} an object containing info about the + * transaction. */ - script: function(url, opts) { - return _queue("script", url, opts); + script: function(url, opts) { + return _queue('script', url, opts); }, /** - * Fetches and inserts one or more css link nodes into the + * Fetches and inserts one or more css link nodes into the * head of the current document or the document in a specified * window. * @method css * @static - * @param url {string} the url or urls to the css file(s) - * @param opts Options: + * @param {string} url the url or urls to the css file(s). + * @param {object} opts Options: *
            *
            onSuccess
            *
            @@ -2849,31 +3629,329 @@ Y.Get = function() { *
            insertBefore
            *
            node or node id that will become the new node's nextSibling
            *
            charset
            - *
            Node charset, default utf-8 (deprecated, use the attributes config)
            + *
            Node charset, default utf-8 (deprecated, use the attributes + * config)
            *
            attributes
            - *
            An object literal containing additional attributes to add to the link tags
            + *
            An object literal containing additional attributes to add to + * the link tags
            *
            *
            -         *      Y.Get.css("http://yui.yahooapis.com/2.3.1/build/menu/assets/skins/sam/menu.css");
            +         * Y.Get.css("http://localhost/css/menu.css");
                      * 
            *
            -         *   Y.Get.css(
            -         *   ["http://yui.yahooapis.com/2.3.1/build/menu/assets/skins/sam/menu.css",
            -         *     insertBefore: 'custom-styles' // nodes will be inserted before the specified node
            -         *   });
            +         *   Y.Get.css(
            +         *   ["http://localhost/css/menu.css",
            +         *     insertBefore: 'custom-styles' // nodes will be inserted
            +         *                                   // before the specified node
            +         *   });.
                      * 
            - * @return {tId: string} an object containing info about the transaction + * @return {tId: string} an object containing info about the + * transaction. */ css: function(url, opts) { - return _queue("css", url, opts); + return _queue('css', url, opts); } }; }(); -})(); -}, '3.0.0' ); +}, '3.3.0' ,{requires:['yui-base']}); +YUI.add('features', function(Y) { + +var feature_tests = {}; + +Y.mix(Y.namespace('Features'), { + + tests: feature_tests, + + add: function(cat, name, o) { + feature_tests[cat] = feature_tests[cat] || {}; + feature_tests[cat][name] = o; + }, + + all: function(cat, args) { + var cat_o = feature_tests[cat], + // results = {}; + result = ''; + if (cat_o) { + Y.Object.each(cat_o, function(v, k) { + // results[k] = Y.Features.test(cat, k, args); + result += k + ':' + + (Y.Features.test(cat, k, args) ? 1 : 0) + ';'; + }); + } + + return result; + }, + + test: function(cat, name, args) { + args = args || []; + var result, ua, test, + cat_o = feature_tests[cat], + feature = cat_o && cat_o[name]; + + if (!feature) { + } else { + + result = feature.result; + + if (Y.Lang.isUndefined(result)) { + + ua = feature.ua; + if (ua) { + result = (Y.UA[ua]); + } + + test = feature.test; + if (test && ((!ua) || result)) { + result = test.apply(Y, args); + } + + feature.result = result; + } + } + + return result; + } +}); + +// Y.Features.add("load", "1", {}); +// Y.Features.test("load", "1"); +// caps=1:1;2:0;3:1; + +/* This file is auto-generated by src/loader/meta_join.py */ +var add = Y.Features.add; +// autocomplete-list-keys-sniff.js +add('load', '0', { + "test": function (Y) { + // Only add keyboard support to autocomplete-list if this doesn't appear to + // be an iOS or Android-based mobile device. + // + // There's currently no feasible way to actually detect whether a device has + // a hardware keyboard, so this sniff will have to do. It can easily be + // overridden by manually loading the autocomplete-list-keys module. + // + // Worth noting: even though iOS supports bluetooth keyboards, Mobile Safari + // doesn't fire the keyboard events used by AutoCompleteList, so there's + // no point loading the -keys module even when a bluetooth keyboard may be + // available. + return !(Y.UA.ios || Y.UA.android); +}, + "trigger": "autocomplete-list" +}); +// ie-style-test.js +add('load', '1', { + "test": function (Y) { + + var testFeature = Y.Features.test, + addFeature = Y.Features.add, + WINDOW = Y.config.win, + DOCUMENT = Y.config.doc, + DOCUMENT_ELEMENT = 'documentElement', + ret = false; + + addFeature('style', 'computedStyle', { + test: function() { + return WINDOW && 'getComputedStyle' in WINDOW; + } + }); + + addFeature('style', 'opacity', { + test: function() { + return DOCUMENT && 'opacity' in DOCUMENT[DOCUMENT_ELEMENT].style; + } + }); + + ret = (!testFeature('style', 'opacity') && + !testFeature('style', 'computedStyle')); + + return ret; +}, + "trigger": "dom-style" +}); +// 0 +add('load', '2', { + "trigger": "widget-base", + "ua": "ie" +}); +// ie-base-test.js +add('load', '3', { + "test": function(Y) { + var imp = Y.config.doc && Y.config.doc.implementation; + return (imp && (!imp.hasFeature('Events', '2.0'))); +}, + "trigger": "node-base" +}); +// dd-gestures-test.js +add('load', '4', { + "test": function(Y) { + return (Y.config.win && ('ontouchstart' in Y.config.win && !Y.UA.chrome)); +}, + "trigger": "dd-drag" +}); +// history-hash-ie-test.js +add('load', '5', { + "test": function (Y) { + var docMode = Y.config.doc.documentMode; + + return Y.UA.ie && (!('onhashchange' in Y.config.win) || + !docMode || docMode < 8); +}, + "trigger": "history-hash" +}); + + +}, '3.3.0' ,{requires:['yui-base']}); +YUI.add('rls', function(Y) { + +/** + * Implentation for building the remote loader service url. + * @method _rls + * @param {Array} what the requested modules. + * @since 3.2.0 + * @return {string} the url for the remote loader service call. + */ +Y._rls = function(what) { + + var config = Y.config, + + // the configuration + rls = config.rls || { + m: 1, // required in the template + v: Y.version, + gv: config.gallery, + env: 1, // required in the template + lang: config.lang, + '2in3v': config['2in3'], + '2v': config.yui2, + filt: config.filter, + filts: config.filters, + tests: 1 // required in the template + }, + + // The rls base path + rls_base = config.rls_base || 'load?', + + // the template + rls_tmpl = config.rls_tmpl || function() { + var s = '', param; + for (param in rls) { + if (param in rls && rls[param]) { + s += param + '={' + param + '}&'; + } + } + // console.log('rls_tmpl: ' + s); + return s; + }(), + + url; + + // update the request + rls.m = what; + rls.env = Y.Object.keys(YUI.Env.mods); + rls.tests = Y.Features.all('load', [Y]); + + url = Y.Lang.sub(rls_base + rls_tmpl, rls); + + config.rls = rls; + config.rls_tmpl = rls_tmpl; + + // console.log(url); + return url; +}; + + + +}, '3.3.0' ,{requires:['get','features']}); +YUI.add('intl-base', function(Y) { + +/** + * The Intl utility provides a central location for managing sets of + * localized resources (strings and formatting patterns). + * + * @class Intl + * @uses EventTarget + * @static + */ + +var SPLIT_REGEX = /[, ]/; + +Y.mix(Y.namespace('Intl'), { + + /** + * Returns the language among those available that + * best matches the preferred language list, using the Lookup + * algorithm of BCP 47. + * If none of the available languages meets the user's preferences, + * then "" is returned. + * Extended language ranges are not supported. + * + * @method lookupBestLang + * @param {String[] | String} preferredLanguages The list of preferred + * languages in descending preference order, represented as BCP 47 + * language tags. A string array or a comma-separated list. + * @param {String[]} availableLanguages The list of languages + * that the application supports, represented as BCP 47 language + * tags. + * + * @return {String} The available language that best matches the + * preferred language list, or "". + * @since 3.1.0 + */ + lookupBestLang: function(preferredLanguages, availableLanguages) { + + var i, language, result, index; + + // check whether the list of available languages contains language; + // if so return it + function scan(language) { + var i; + for (i = 0; i < availableLanguages.length; i += 1) { + if (language.toLowerCase() === + availableLanguages[i].toLowerCase()) { + return availableLanguages[i]; + } + } + } + + if (Y.Lang.isString(preferredLanguages)) { + preferredLanguages = preferredLanguages.split(SPLIT_REGEX); + } + + for (i = 0; i < preferredLanguages.length; i += 1) { + language = preferredLanguages[i]; + if (!language || language === '*') { + continue; + } + // check the fallback sequence for one language + while (language.length > 0) { + result = scan(language); + if (result) { + return result; + } else { + index = language.lastIndexOf('-'); + if (index >= 0) { + language = language.substring(0, index); + // one-character subtags get cut along with the + // following subtag + if (index >= 2 && language.charAt(index - 2) === '-') { + language = language.substring(0, index - 2); + } + } else { + // nothing available for this language + break; + } + } + } + } + + return ''; + } +}); + + +}, '3.3.0' ,{requires:['yui-base']}); YUI.add('yui-log', function(Y) { /** @@ -2882,13 +3960,14 @@ YUI.add('yui-log', function(Y) { * @module yui * @submodule yui-log */ -(function() { var INSTANCE = Y, LOGEVENT = 'yui:log', UNDEFINED = 'undefined', - LEVELS = { debug: 1, info: 1, warn: 1, error: 1 }, - _published; + LEVELS = { debug: 1, + info: 1, + warn: 1, + error: 1 }; /** * If the 'debug' config is true, a 'yui:log' event will be @@ -2904,33 +3983,35 @@ var INSTANCE = Y, * @param {String} msg The message to log. * @param {String} cat The log category for the message. Default * categories are "info", "warn", "error", time". - * Custom categories can be used as well. (opt) - * @param {String} src The source of the the message (opt) - * @param {boolean} silent If true, the log event won't fire - * @return {YUI} YUI instance + * Custom categories can be used as well. (opt). + * @param {String} src The source of the the message (opt). + * @param {boolean} silent If true, the log event won't fire. + * @return {YUI} YUI instance. */ INSTANCE.log = function(msg, cat, src, silent) { - var Y = INSTANCE, c = Y.config, bail = false, excl, incl, m, f; + var bail, excl, incl, m, f, + Y = INSTANCE, + c = Y.config, + publisher = (Y.fire) ? Y : YUI.Env.globalEvents; // suppress log message if the config is off or the event stack // or the event call stack contains a consumer of the yui:log event if (c.debug) { // apply source filters if (src) { - excl = c.logExclude; + excl = c.logExclude; incl = c.logInclude; - if (incl && !(src in incl)) { bail = 1; } else if (excl && (src in excl)) { bail = 1; } } - if (!bail) { - if (c.useBrowserConsole) { m = (src) ? src + ': ' + msg : msg; - if (typeof console != UNDEFINED && console.log) { + if (Y.Lang.isFunction(c.logFn)) { + c.logFn.call(Y, msg, cat, src); + } else if (typeof console != UNDEFINED && console.log) { f = (cat && console[cat] && (cat in LEVELS)) ? cat : 'log'; console[f](m); } else if (typeof opera != UNDEFINED) { @@ -2938,19 +4019,17 @@ INSTANCE.log = function(msg, cat, src, silent) { } } - if (Y.fire && !silent) { - if (!_published) { - Y.publish(LOGEVENT, { - broadcast: 2, - emitFacade: 1 - }); - - _published = 1; + if (publisher && !silent) { + if (publisher == Y && (!publisher.getEvent(LOGEVENT))) { + publisher.publish(LOGEVENT, { + broadcast: 2 + }); } - Y.fire(LOGEVENT, { - msg: msg, - cat: cat, + + publisher.fire(LOGEVENT, { + msg: msg, + cat: cat, src: src }); } @@ -2968,19 +4047,17 @@ INSTANCE.log = function(msg, cat, src, silent) { * @param {String} msg The message to log. * @param {String} cat The log category for the message. Default * categories are "info", "warn", "error", time". - * Custom categories can be used as well. (opt) - * @param {String} src The source of the the message (opt) - * @param {boolean} silent If true, the log event won't fire - * @return {YUI} YUI instance + * Custom categories can be used as well. (opt). + * @param {String} src The source of the the message (opt). + * @param {boolean} silent If true, the log event won't fire. + * @return {YUI} YUI instance. */ INSTANCE.message = function() { return INSTANCE.log.apply(INSTANCE, arguments); }; -})(); - -}, '3.0.0' ,{requires:['yui-base']}); +}, '3.3.0' ,{requires:['yui-base']}); YUI.add('yui-later', function(Y) { /** @@ -2988,69 +4065,106 @@ YUI.add('yui-later', function(Y) { * @module yui * @submodule yui-later */ -(function() { - var L = Y.Lang, - /** - * Executes the supplied function in the context of the supplied - * object 'when' milliseconds later. Executes the function a - * single time unless periodic is set to true. - * @method later - * @for YUI - * @param when {int} the number of milliseconds to wait until the fn - * is executed. - * @param o the context object. - * @param fn {Function|String} the function to execute or the name of - * the method in the 'o' object to execute. - * @param data [Array] data that is provided to the function. This accepts - * either a single item or an array. If an array is provided, the - * function is executed with one parameter for each array item. If - * you need to pass a single array parameter, it needs to be wrapped in - * an array [myarray]. - * @param periodic {boolean} if true, executes continuously at supplied - * interval until canceled. - * @return {object} a timer object. Call the cancel() method on this object to - * stop the timer. - */ - later = function(when, o, fn, data, periodic) { - when = when || 0; - o = o || {}; - var m=fn, d=Y.Array(data), f, r; +/** + * Executes the supplied function in the context of the supplied + * object 'when' milliseconds later. Executes the function a + * single time unless periodic is set to true. + * @method later + * @for YUI + * @param when {int} the number of milliseconds to wait until the fn + * is executed. + * @param o the context object. + * @param fn {Function|String} the function to execute or the name of + * the method in the 'o' object to execute. + * @param data [Array] data that is provided to the function. This + * accepts either a single item or an array. If an array is provided, + * the function is executed with one parameter for each array item. + * If you need to pass a single array parameter, it needs to be wrapped + * in an array [myarray]. + * @param periodic {boolean} if true, executes continuously at supplied + * interval until canceled. + * @return {object} a timer object. Call the cancel() method on this + * object to stop the timer. + */ +Y.later = function(when, o, fn, data, periodic) { + when = when || 0; - if (L.isString(fn)) { - m = o[fn]; - } + var m = fn, f, id; - if (!m) { - } + if (o && Y.Lang.isString(fn)) { + m = o[fn]; + } - f = function() { - m.apply(o, d); - }; + f = !Y.Lang.isUndefined(data) ? function() { + m.apply(o, Y.Array(data)); + } : function() { + m.call(o); + }; - r = (periodic) ? setInterval(f, when) : setTimeout(f, when); + id = (periodic) ? setInterval(f, when) : setTimeout(f, when); - return { - id: r, - interval: periodic, - cancel: function() { - if (this.interval) { - clearInterval(r); - } else { - clearTimeout(r); - } + return { + id: id, + interval: periodic, + cancel: function() { + if (this.interval) { + clearInterval(id); + } else { + clearTimeout(id); } - }; + } }; +}; + +Y.Lang.later = Y.later; - Y.later = later; - L.later = later; -})(); + +}, '3.3.0' ,{requires:['yui-base']}); +YUI.add('yui-throttle', function(Y) { + +/** + * Provides a throttle/limiter for function calls + * @module yui + * @submodule yui-throttle + */ + +/*! Based on work by Simon Willison: http://gist.github.com/292562 */ +/** + * Throttles a call to a method based on the time between calls. + * @method throttle + * @for YUI + * @param fn {function} The function call to throttle. + * @param ms {int} The number of milliseconds to throttle the method call. + * Can set globally with Y.config.throttleTime or by call. Passing a -1 will + * disable the throttle. Defaults to 150. + * @return {function} Returns a wrapped function that calls fn throttled. + * @since 3.1.0 + */ +Y.throttle = function(fn, ms) { + ms = (ms) ? ms : (Y.config.throttleTime || 150); + + if (ms === -1) { + return (function() { + fn.apply(null, arguments); + }); + } + + var last = Y.Lang.now(); + + return (function() { + var now = Y.Lang.now(); + if (now - last > ms) { + last = now; + fn.apply(null, arguments); + } + }); +}; -}, '3.0.0' ,{requires:['yui-base']}); +}, '3.3.0' ,{requires:['yui-base']}); -YUI.add('yui', function(Y){}, '3.0.0' ,{use:['yui-base','get','yui-log','yui-later']}); +YUI.add('yui', function(Y){}, '3.3.0' ,{use:['yui-base','get','features','rls','intl-base','yui-log','yui-later','yui-throttle']}); diff --git a/jssource/src_files/include/jsolait/init.js b/jssource/src_files/include/jsolait/init.js deleted file mode 100644 index 1fcae4fb..00000000 --- a/jssource/src_files/include/jsolait/init.js +++ /dev/null @@ -1,755 +0,0 @@ -/* - -Modification information for LGPL compliance - -r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync - -r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover - -r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex - -r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system - -r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development - -r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 - -r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm - -r11496 - 2006-02-03 12:16:49 -0800 (Fri, 03 Feb 2006) - chris - Bug 4538: found 2 non-breaking, IE specific JS errors in sugar_3.js and init.js, added some logic to detect whether the browser supports IE activeX stuff and to run code appropriately. -Touched sugar_3.js and include/jsolait/init.js - -r4085 - 2005-04-13 17:30:42 -0700 (Wed, 13 Apr 2005) - robert - adding meeting scheduler and accept/decline - - -*/ - -/* - Copyright (c) 2003 Jan-Klaas Kollhof - - This file is part of the JavaScript o lait library(jsolait). - - jsolait is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - This software is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this software; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - - -/** - Evaluates script in a global scope. - @param [0] The code to evaluate. -*/ -globalEval=function(){ - return eval(arguments[0]); -} - - -/** - Creates a new class object which inherits from superClass. - @param className="anonymous" The name of the new class. - If the created class is a public member of a module then - the className is automatically set. - @param superClass=Object The class to inherit from (super class). - @param classScope A function which is executed for class construction. - As 1st parameter it will get the new class' protptype for - overrideing or extending the super class. As 2nd parameter it will get - the super class' wrapper for calling inherited methods. -*/ -Class = function(className, superClass, classScope){ - if(arguments.length == 2){ - classScope = superClass; - if(typeof className != "string"){ - superClass = className; - className = "anonymous"; - }else{ - superClass = Object; - } - }else if(arguments.length == 1){ - classScope = className; - superClass = Object; - className = "anonymous"; - } - - //this is the constructor for the new objects created from the new class. - //if and only if it is NOT used for prototyping/subclassing the init method of the newly created object will be called. - var NewClass = function(calledBy){ - if(calledBy !== Class){ - return this.init.apply(this, arguments); - } - } - //This will create a new prototype object of the new class. - NewClass.createPrototype = function(){ - return new NewClass(Class); - } - //setting class properties for the new class. - NewClass.superClass = superClass; - NewClass.className=className; - NewClass.toString = function(){ - return "[class %s]".format(NewClass.className); - }; - if(superClass.createPrototype!=null){//see if the super class can create prototypes. (creating an object without calling init()) - NewClass.prototype = superClass.createPrototype(); - }else{//just create an object of the super class - NewClass.prototype = new superClass(); - } - //reset the constructor for new objects to the actual constructor. - NewClass.prototype.constructor = NewClass; - - if(superClass == Object){//all other objects already have a nice toString method. - NewClass.prototype.toString = function(){ - return "[object %s]".format(this.constructor.className); - }; - } - - if(NewClass.prototype.init==null){ - NewClass.prototype.init=function(){ - } - } - - - //create a supr function to be used to call methods of the super class - var supr = function(self){ - //set up super class functionality so a call to super(this) will return an object with all super class methods - //the methods can be called like super(this).foo and the this object will be bound to that method - var wrapper = {}; - var superProto = superClass.prototype; - for(var n in superProto){ - if(typeof superProto[n] == "function"){ - wrapper[n] = function(){ - var f = arguments.callee; - return superProto[f._name].apply(self, arguments); - } - wrapper[n]._name = n; - } - } - return wrapper; - } - - //execute the scope of the class - classScope(NewClass.prototype, supr); - - return NewClass; -} -Class.toString = function(){ - return "[object Class]"; -} -Class.createPrototype=function(){ - throw "Can't use Class as a super class."; -} - -/** - Creates a new module and registers it. - @param name The name of the module. - @param version The version of a module. - @param moduleScope A function which is executed for module creation. - As 1st parameter it will get the module variable. -*/ -Module = function(name, version, moduleScope){ - var mod = new Object(); - mod.version = version; - mod.name = name; - mod.toString=function(){ - return "[module '%s' version: %s]".format(mod.name, mod.version); - } - - /** - Base class for all module-Exceptions. - */ - mod.Exception=Class("Exception", function(publ){ - /** - Initializes a new Exception. - @param msg The error message for the user. - @param trace=null The error causing this Exception if available. - */ - publ.init=function(msg, trace){ - this.name = this.constructor.className; - this.message = msg; - this.trace = trace; - } - - publ.toString=function(){ - var s = "%s %s\n\n".format(this.name, this.module); - s += this.message; - return s; - } - /** - Returns the complete trace of the exception. - @return The error trace. - */ - publ.toTraceString=function(){ - var s = "%s %s:\n ".format(this.name, this.module ); - s+="%s\n\n".format(this.message); - if(this.trace){ - if(this.trace.toTraceString){ - s+= this.trace.toTraceString(); - }else{ - s+= this.trace; - } - } - return s; - } - ///The name of the Exception(className). - publ.name; - ///The error message. - publ.message; - ///The module the Exception belongs to. - publ.module = mod; - ///The error which caused the Exception or null. - publ.trace; - }) - - //execute the scope of the module - moduleScope(mod); - - //todo: set classNames for anonymous classes. - for(var n in mod){ - if(mod[n].className == "anonymous"){ - mod[n].className = n; - } - } - - if(name != "jsolait"){ - jsolait.registerModule(mod); - } - return mod; -} -Module.toString = function(){ - return "[object Module]"; -} -Module.createPrototype=function(){ - throw "Can't use Module as a super class."; -} - -//docstart -/** - The root module for jsolait. - It provides some global functionality for loading modules, - some String enhancements. -*/ -Module("jsolait", "0.1.0", function(mod){ - ///The global jsolait object. - jsolait=mod; - - ///base url for user modules. - mod.baseURL="."; - ///The URL where jsolait is installed. - mod.libURL ="./jsolait"; - ///Collection of all loaded modules.(module cache) - mod.modules = new Array(); - ///The URLs of there the modules, part of jsolait. - mod.moduleURLs = {}; -/* - mod.moduleURLs = {urllib:"%(libURL)s/lib/urllib.js", - xml:"%(libURL)s/lib/xml.js", - crypto:"%(libURL)s/lib/crypto.js", - codecs:"%(libURL)s/lib/codecs.js", - jsonrpc:"%(libURL)s/lib/jsonrpc.js", - lang:"%(libURL)s/lib/lang.js", - xmlrpc:"%(libURL)s/lib/xmlrpc.js"}; -*/ - - mod.init=function(){ - if(typeof(WScript) != 'undefined') { - initWS(); - } - -// //make jsolait work with WScript -// var ws = null; -// try{//see if WScript is available -// ws = WScript; -// }catch(e){ -// } -// if(ws != null){ -// initWS(); -// } - } - - ///initializes jsolait for using it with WScript - var initWS = function(){ - print=function(msg){ - WScript.echo(msg); - } - alert=function(msg){ - print(msg); - } - var args = WScript.arguments; - try{ - //get script to execute - var url = args(0); - url = url.replace(/\\/g, "/"); - url = url.split("/"); - url = url.slice(0, url.length-1); - //set base for user module loading - mod.baseURL = url.join("/"); - }catch(e){ - throw new mod.Exception("Missing script filename to be run.", e); - } - - //location of jsolait/init.js - url = WScript.ScriptFullName; - - if(args(0).replace("file://","").toLowerCase() == url.toLowerCase()){ - WScript.stderr.write("Can't run myself! exiting ... \n"); - return; - } - url = url.replace(/\\/g, "/"); - url = url.split("/"); - url = url.slice(0, url.length-1); - mod.libURL = "file://" + url.join("/"); - try{ - mod.loadScript(args(0)); - }catch(e){ - WScript.stdErr.write("%s(1,1) jsolait runtime error:\n%s\n".format(args(0).replace("file://",""), e.toTraceString())); - } - } - - - /** - Imports a module given its name(someModule.someSubModule). - A module's file location is determined by treating each module name as a directory. - Only the last one points to a file. - If the module's URL is not known to jsolait then it will be searched for in jsolait.baseURL which is "." by default. - @param name The name of the module to load. - @return The module object. - */ - mod.importModule = function(name){ - - if (mod.modules[name]){ //module already loaded - return mod.modules[name]; - }else{ - var src,modURL; - //check if jsolait already knows the url of the module(moduleURLs contains urls to modules) - if(mod.moduleURLs[name]){ - modURL = mod.moduleURLs[name].format(mod); - }else{ -/* - assume it's a user module and located at baseURL -*/ - modURL = "%s/%s.js".format(mod.baseURL, name.split(".").join("/")); - } - try{//to load module from location calculated above - src = getFile(modURL); - }catch(e){//module could not be found at the location. - throw new mod.ModuleImportFailed(name, modURL, e); - } - - try{//interpret the script - globalEval(src); - }catch(e){ - throw new mod.ModuleImportFailed(name, modURL, e); - } - //the module should have registered itself - return mod.modules[name]; - } - } - //make it global - importModule = mod.importModule; - - /** - Loads and interprets a script file. - @param url The url of the script to load. - */ - mod.loadScript=function(url){ - var src = getFile(url); - try{//to interpret the source - globalEval(src); - }catch(e){ - throw new mod.EvalFailed(url, e); - } - } - /** - Registers a new module. - Registered modules can be imported with importModule(...). - @param module The module to register. - */ - mod.registerModule = function(module){ - this.modules[module.name] = module; - } - - /** - Creates an HTTP request object for retreiving files. - @return HTTP request object. - */ - var getHTTP=function() { - var obj; - try{ //to get the mozilla httprequest object - obj = new XMLHttpRequest(); - }catch(e){ - try{ //to get MS HTTP request object - obj=new ActiveXObject("Msxml2.XMLHTTP.4.0"); - }catch(e){ - try{ //to get MS HTTP request object - obj=new ActiveXObject("Msxml2.XMLHTTP"); - }catch(e){ - try{// to get the old MS HTTP request object - obj = new ActiveXObject("microsoft.XMLHTTP"); - }catch(e){ - throw new mod.Exception("Unable to get an HTTP request object."); - } - } - } - } - return obj; - } - /** - Retrieves a file given its URL. - @param url The url to load. - @param headers=[] The headers to use. - @return The content of the file. - */ - var getFile=function(url, headers) { - //if callback is defined then the operation is done async - headers = (headers != null) ? headers : []; - //setup the request - try{ - var xmlhttp= getHTTP(); - xmlhttp.open("GET", url, false); - for(var i=0;i< headers.length;i++){ - xmlhttp.setRequestHeader(headers[i][0], headers[i][1]); - } - xmlhttp.send(""); - }catch(e){ - throw new mod.Exception("Unable to load URL: '%s'.".format(url), e); - } - if(xmlhttp.status == 200 || xmlhttp.status == 0){ - return xmlhttp.responseText; - }else{ - throw new mod.Exception("File not loaded: '%s'.".format(url)); - } - } - - Error.prototype.toTraceString = function(){ - if(this.message){ - return "%s\n".format(this.message); - } - if (this.description){ - return "%s\n".format(this.description); - } - return "unknown error\n"; - } - - - /** - Thrown when a module could not be found. - */ - mod.ModuleImportFailed=Class(mod.Exception, function(publ, supr){ - /** - Initializes a new ModuleImportFailed Exception. - @param name The name of the module. - @param url The url of the module. - @param trace The error cousing this Exception. - */ - publ.init=function(moduleName, url, trace){ - supr(this).init("Failed to import module: '%s' from URL:'%s'".format(moduleName, url), trace); - this.moduleName = moduleName; - this.url = url; - } - ///The name of the module that was not found. - publ.moduleName; - ///The url the module was expected to be found at. - publ.url; - }) - - /** - Thrown when a source could not be loaded due to an interpretation error. - */ - mod.EvalFailed=Class(mod.Exception, function(publ, supr){ - /** - Initializes a new EvalFailed exception. - @param url The url of the module. - @param trace The exception that was thrown while interpreting the module's source code. - */ - publ.init=function(url, trace){ - supr(this).init("File '%s' Eval of script failed.".format(url), trace); - this.url = url; - } - ///The url the module was expected to be found at. - publ.url; - }) - - /** - Displays an exception and it's trace. - This works better than alert(e) because traces are taken into account. - @param exception The exception to display. - */ - mod.reportException=function(exception){ - if(exception.toTraceString){ - var s= exception.toTraceString(); - }else{ - var s = exception.toString(); - } - var ws = null; - try{//see if WScript is available - ws = WScript; - }catch(e){ - } - if(ws != null){ - WScript.stderr.write(s); - }else{ - alert(s); - } - } - ///The global exception report method; - reportException = mod.reportException; -}) - -//stringmod -/** - String formatting module. - It allows python like string formatting ("some text %s" % "something"). - Also similar to sprintf from C. -*/ -Module("stringformat", "0.1.0", function(mod){ - /** - Creates a format specifier object. - */ - var FormatSpecifier=function(s){ - var s = s.match(/%(\(\w+\)){0,1}([ 0-]){0,1}(\+){0,1}(\d+){0,1}(\.\d+){0,1}(.)/); - if(s[1]){ - this.key=s[1].slice(1,-1); - }else{ - this.key = null; - } - this.paddingFlag = s[2]; - if(this.paddingFlag==""){ - this.paddingFlag =" " - } - this.signed=(s[3] == "+"); - this.minLength = parseInt(s[4]); - if(isNaN(this.minLength)){ - this.minLength=0; - } - if(s[5]){ - this.percision = parseInt(s[5].slice(1,s[5].length)); - }else{ - this.percision=-1; - } - this.type = s[6]; - } - - /** - Formats a string replacing formatting specifiers with values provided as arguments - which are formatted according to the specifier. - This is an implementation of python's % operator for strings and is similar to sprintf from C. - Usage: - resultString = formatString.format(value1, v2, ...); - - Each formatString can contain any number of formatting specifiers which are - replaced with the formated values. - - specifier([...]-items are optional): - "%(key)[flag][sign][min][percision]typeOfValue" - - (key) If specified the 1st argument is treated as an object/associative array and the formating values - are retrieved from that object using the key. - - flag: - 0 Use 0s for padding. - - Left justify result, padding it with spaces. - Use spaces for padding. - sign: - + Numeric values will contain a +|- infront of the number. - min: - l The string will be padded with the padding character until it has a minimum length of l. - percision: - .x Where x is the percision for floating point numbers and the lenght for 0 padding for integers. - typeOfValue: - d Signed integer decimal. - i Signed integer decimal. - b Unsigned binary. //This does not exist in python! - o Unsigned octal. - u Unsigned decimal. - x Unsigned hexidecimal (lowercase). - X Unsigned hexidecimal (uppercase). - e Floating point exponential format (lowercase). - E Floating point exponential format (uppercase). - f Floating point decimal format. - F Floating point decimal format. - c Single character (accepts byte or single character string). - s String (converts any object using object.toString()). - - Examples: - "%02d".format(8) == "08" - "%05.2f".format(1.234) == "01.23" - "123 in binary is: %08b".format(123) == "123 in binary is: 01111011" - - @param * Each parameter is treated as a formating value. - @return The formated String. - */ - String.prototype.format=function(){ - var sf = this.match(/(%(\(\w+\)){0,1}[ 0-]{0,1}(\+){0,1}(\d+){0,1}(\.\d+){0,1}[dibouxXeEfFgGcrs%])|([^%]+)/g); - if(sf){ - if(sf.join("") != this){ - throw new mod.Exception("Unsupported formating string."); - } - }else{ - throw new mod.Exception("Unsupported formating string."); - } - var rslt =""; - var s; - var obj; - var cnt=0; - var frmt; - var sign=""; - - for(var i=0;i=arguments.length){ - throw new mod.Exception("Not enough arguments for format string"); - }else{ - obj=arguments[cnt]; - cnt++; - } - } - - if(frmt.type == "s"){//String - if (obj == null){ - obj = "null"; - } - s=obj.toString().pad(frmt.paddingFlag, frmt.minLength); - - }else if(frmt.type == "c"){//Character - if(frmt.paddingFlag == "0"){ - frmt.paddingFlag=" ";//padding only spaces - } - if(typeof obj == "number"){//get the character code - s = String.fromCharCode(obj).pad(frmt.paddingFlag , frmt.minLength) ; - }else if(typeof obj == "string"){ - if(obj.length == 1){ -/* -make sure it's a single character -*/ - s=obj.pad(frmt.paddingFlag, frmt.minLength); - }else{ - throw new mod.Exception("Character of length 1 required."); - } - }else{ - throw new mod.Exception("Character or Byte required."); - } - }else if(typeof obj == "number"){ - //get sign of the number - if(obj < 0){ - obj = -obj; - sign = "-"; //negative signs are always needed - }else if(frmt.signed){ - sign = "+"; // if sign is always wanted add it - }else{ - sign = ""; - } - //do percision padding and number conversions - switch(frmt.type){ - case "f": //floats - case "F": - if(frmt.percision > -1){ - s = obj.toFixed(frmt.percision).toString(); - }else{ - s = obj.toString(); - } - break; - case "E"://exponential - case "e": - if(frmt.percision > -1){ - s = obj.toExponential(frmt.percision); - }else{ - s = obj.toExponential(); - } - s = s.replace("e", frmt.type); - break; - case "b"://binary - s = obj.toString(2); - s = s.pad("0", frmt.percision); - break; - case "o"://octal - s = obj.toString(8); - s = s.pad("0", frmt.percision); - break; - case "x"://hexadecimal - s = obj.toString(16).toLowerCase(); - s = s.pad("0", frmt.percision); - break; - case "X"://hexadecimal - s = obj.toString(16).toUpperCase(); - s = s.pad("0", frmt.percision); - break; - default://integers - s = parseInt(obj).toString(); - s = s.pad("0", frmt.percision); - break; - } - if(frmt.paddingFlag == "0"){//do 0-padding - //make sure that the length of the possible sign is not ignored - s=s.pad("0", frmt.minLength - sign.length); - } - s=sign + s;//add sign - s=s.pad(frmt.paddingFlag, frmt.minLength);//do padding and justifiing - }else{ - throw new mod.Exception("Number required."); - } - } - rslt += s; - } - return rslt; - } - - /** - Padds a String with a character to have a minimum length. - - @param flag "-": to padd with " " and left justify the string. - Other: the character to use for padding. - @param len The minimum length of the resulting string. - */ - String.prototype.pad = function(flag, len){ - var s = ""; - if(flag == "-"){ - var c = " "; - }else{ - var c = flag; - } - for(var i=0;i> 16, (nBits & 0xff00) >> 8, nBits & 0xff); - } - //make sure padding chars are left out. - sDecoded[sDecoded.length-1] = sDecoded[sDecoded.length-1].substring(0, 3 - ((this.charCodeAt(i - 2) == 61) ? 2 : (this.charCodeAt(i - 1) == 61 ? 1 : 0))); - return sDecoded.join(""); - } - }else{ - throw new mod.Exception("String length must be divisible by 4."); - } - } - - /** - Encodes a string using Base64. - */ - String.prototype.encode_base64=function(){ - if(typeof(btoa) != "undefined"){//try using mozillas builtin codec - return btoa(this); - }else{ - var base64 = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z', - 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z', - '0','1','2','3','4','5','6','7','8','9','+','/']; - var sbin; - var pad=0; - var s="" + this; - if((s.length % 3) == 1){ - s+=String.fromCharCode(0); - s+=String.fromCharCode(0); - pad=2; - }else if((s.length % 3) == 2){ - s+=String.fromCharCode(0); - pad=1; - } - //create a result buffer, this is much faster than having strings concatinated. - var rslt=new Array(s.length / 3); - var ri=0; - for(var i=0;i> 18) & 0x3f] + base64[(sbin >> 12) & 0x3f] + base64[(sbin >>6) & 0x3f] + base64[sbin & 0x3f]); - ri++; - } - if(pad>0){ - rslt[rslt.length-1] = rslt[rslt.length-1].substr(0, 4-pad) + ((pad==2) ? "==" : (pad==1) ? "=" : ""); - } - return rslt.join(""); - } - } - - /** - Decodes a URI using decodeURI. - */ - String.prototype.decode_uri=function(){ - return decodeURI(this); - } - - /** - Encodes a URI using encodeURI. - */ - String.prototype.encode_uri=function(){ - return encodeURI(this); - } -}) diff --git a/jssource/src_files/include/jsolait/lib/crypto.js b/jssource/src_files/include/jsolait/lib/crypto.js deleted file mode 100644 index db0a7860..00000000 --- a/jssource/src_files/include/jsolait/lib/crypto.js +++ /dev/null @@ -1,172 +0,0 @@ -/* - -Modification information for LGPL compliance - -r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync - -r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover - -r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex - -r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system - -r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development - -r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 - -r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm - -r4085 - 2005-04-13 17:30:42 -0700 (Wed, 13 Apr 2005) - robert - adding meeting scheduler and accept/decline - - -*/ - -/* - Copyright (c) 2003 Jan-Klaas Kollhof - - This file is part of the JavaScript o lait library(jsolait). - - jsolait is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - This software is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this software; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -/** - Cryptography module. - Provides String encryption/decryption and hashing. -*/ -Module("crypto", "0.1.2", function(mod){ - /** - Returns all all available encrypters. - @return An array of encrypters names. - */ - mod.listEncrypters=function(){ - var c=[]; - for(var attr in String.prototype){ - if(attr.slice(0, 8) == "encrypt_"){ - c.push(attr.slice(8)); - } - } - return c; - } - /** - Returns all all available decrypters. - @return An array of decrypters names. - */ - mod.listDecrypters=function(){ - var c=[]; - for(var attr in String.prototype){ - if(attr.slice(0, 8) == "decrypt_"){ - c.push(attr.slice(8)); - } - } - return c; - } - - /** - Encrypts a string. - Parameters but the crypdec parameter are forwardet to the crypdec. - @param codec The codec to use. - */ - String.prototype.encrypt=function(crydec){ - var n = "encrypt_" + crydec; - if(String.prototype[n]){ - var args=[]; - for(var i=1;i": case "!": - case "|": case "&": - switch(s2){ - case "==": case "!=": case "<>": case "<=": case ">=":case "||": case "&&": - rslt = new mod.Token(mod.tokens.OP, s2, this._pos); - break; - default: - rslt = new mod.Token(mod.tokens.OP, s1, this._pos); - } - break; - case "/": - if(s2 == "//" || s3 =="///"){ - s1 = extractSLComment(this._working); - rslt = new mod.Token(s1.charAt(2) != "/" ? mod.tokens.COMMENT:mod.tokens.DOCCOMMENT, s1, this._pos); - }else if(s2 == "/*" || s3 =="/**"){ - try{ - s1 = extractMLComment(this._working); - rslt = new mod.Token(s3 !="/**" ? mod.tokens.COMMENT: mod.tokens.DOCCOMMENT, s1, this._pos); - }catch(e){ - rslt= new mod.Token(mod.tokens.ERR, s3 != "/**" ? s2 : s3, this._pos, e); - } - }else{ - try{ - s1 = extractRegExp(this._working); - rslt = new mod.Token(mod.tokens.REGEXP, s1, this._pos); - }catch(e){ - rslt = new mod.Token(mod.tokens.OP, s1, this._pos, e); - } - } - break; - case " ": - var i = 0; - var s=""; - while(this._working.charAt(i) == " "){ - s+=" "; - i++; - } - rslt = new mod.Token(mod.tokens.WSP, s, this._pos); - break; - default: - s1=this._working.match(/\d+\.\d+|\d+|\w+/)[0]; - if(/^\d|\d\.\d/.test(s1)){//number - rslt = new mod.Token(mod.tokens.NUM, s1, this._pos); - }else{//name - rslt =new mod.Token(mod.tokens.NAME, s1, this._pos); - } - } - - this._working=this._working.slice(rslt.value.length); - this._pos += rslt.value.length; - return rslt; - } - - var searchQoute = function(s, q){ - if(q=="'"){ - return s.search(/[\\']/); - }else{ - return s.search(/[\\"]/); - } - } - - var extractQString=function(s){ - if(s.charAt(0) == "'"){ - var q="'"; - }else{ - var q='"'; - } - s=s.slice(1); - var rs=""; - var p= searchQoute(s, q); - while(p >= 0){ - if(p >=0){ - if(s.charAt(p) == q){ - rs += s.slice(0, p+1); - s = s.slice(p+1); - return q + rs; - }else{ - rs+=s.slice(0, p+2); - s = s.slice(p+2); - } - } - p = searchQoute(s, q); - } - throw new mod.Exception("End of String expected."); - } - - var extractSLComment=function(s){ - var p = s.search(/\n/); - if(p>=0){ - return s.slice(0,p+1); - }else{ - return s; - } - } - - var extractMLComment=function(s){ - var p = s.search(/\*\//); - if(p>=0){ - return s.slice(0,p+2); - }else{ - throw new mod.Exception("End of comment expected."); - } - } - - var extractRegExp=function(s){ - var p=0; - for(var i=0;i\n"; - } - break; - case PROCESSING_INSTRUCTION_NODE: - s+=""; - break; - case TEXT_NODE: - s+=node.nodeValue; - break; - case CDATA_SECTION_NODE: - s+="<" +"![CDATA[" + node.nodeValue + "]" + "]>"; - break; - case COMMENT_NODE: - s+=""; - break; - case ENTITY_REFERENCE_NODE: - case DOCUMENT_FRAGMENT_NODE: - case DOCUMENT_TYPE_NODE: - case NOTATION_NODE: - case ENTITY_NODE: - throw new mod.Exception("Nodetype(%s) not supported.".format(node.nodeType)); - break; - } - return s; - } -}) diff --git a/jssource/src_files/include/jsolait/lib/xmlrpc.js b/jssource/src_files/include/jsolait/lib/xmlrpc.js deleted file mode 100644 index d335f246..00000000 --- a/jssource/src_files/include/jsolait/lib/xmlrpc.js +++ /dev/null @@ -1,854 +0,0 @@ -/* - -Modification information for LGPL compliance - -r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync - -r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover - -r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex - -r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system - -r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development - -r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 - -r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm - -r4085 - 2005-04-13 17:30:42 -0700 (Wed, 13 Apr 2005) - robert - adding meeting scheduler and accept/decline - - -*/ - -/* - Copyright (c) 2003-2004 Jan-Klaas Kollhof - - This file is part of the JavaScript o lait library(jsolait). - - jsolait is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - This software is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this software; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - - -/** - Provides an XML-RPC imlementation. - It is similar to python's xmlrpclib module. -*/ -Module("xmlrpc","1.3.3", function(mod){ - var xmlext = importModule("xml"); - var urllib = importModule("urllib"); - /** - Thrown if a server did not respond with response status 200 (OK). - */ - mod.InvalidServerResponse = Class("InvalidServerResponse", mod.Exception, function(publ, supr){ - /** - Initializes the Exception. - @param status The status returned by the server. - */ - publ.init= function(status){ - supr(this).init("The server did not respond with a status 200 (OK) but with: " + status); - this.status = status; - } - ///The status returned by the server. - publ.status; - }) - - /** - Thrown if an XML-RPC response is not well formed. - */ - mod.MalformedXmlRpc = Class("MalformedXmlRpc", mod.Exception, function(publ, supr){ - /** - Initializes the Exception. - @param msg The error message of the user. - @param xml The xml document's source. - @param trace=null The error causing this Exception - */ - publ.init= function(msg, xml, trace){ - supr(this).init(msg,trace); - this.xml = xml; - } - ///The xml source which was mal formed. - publ.xml; - }) - /** - Thrown if the RPC response is a Fault. - */ - mod.Fault = Class("Fault", mod.Exception, function(publ, supr){ - /** - Initializes the Exception. - @param faultCode The fault code returned by the rpc call. - @param faultString The fault string returned by the rpc call. - */ - publ.init= function(faultCode, faultString){ - supr(this).init("XML-RPC Fault: " + faultCode + "\n\n" + faultString); - this.faultCode = faultCode; - this.faultString = faultString; - } - ///The fault code returned from the rpc call. - publ.faultCode; - ///The fault string returned from the rpc call. - publ.faultString; - }) - - /** - Marshalls an object to XML-RPC.(Converts an object into XML-RPC conforming xml.) - It just calls the toXmlRpc function of the objcect. - So, to customize serialization of objects one just needs to specify/override the toXmlRpc method - which should return an xml string conforming with XML-RPC spec. - @param obj The object to marshall - @return An xml representation of the object. - */ - mod.marshall = function(obj){ - if(obj.toXmlRpc){ - return obj.toXmlRpc(); - }else{ - var s = ""; - for(var attr in obj){ - if(typeof obj[attr] != "function"){ - s += "" + attr + "" + mod.marshall(obj[attr]) + ""; - } - } - s += ""; - return s; - } - } - - /** - Unmarshalls an XML document to a JavaScript object. (Converts xml to JavaScript object.) - It parses the xml source and creates a JavaScript object. - @param xml The xml document source to unmarshall. - @return The JavaScript object created from the XML. - */ - mod.unmarshall = function(xml){ - try {//try to parse xml ... this will throw an Exception if failed - var doc = xmlext.parseXML(xml); - }catch(e){ - throw new mod.MalformedXmlRpc("The server's response could not be parsed.", xml, e); - } - var rslt = mod.unmarshallDoc(doc, xml); - doc=null; - return rslt; - } - - /** - Unmarshalls an XML document to a JavaScript object like unmarshall but expects a DOM document as parameter. - It parses the xml source and creates a JavaScript object. - @param doc The xml document(DOM compatible) to unmarshall. - @return The JavaScript object created from the XML. - */ - mod.unmarshallDoc = function(doc, xml){ - try{ - var node = doc.documentElement; - if(node==null){//just in case parse xml didn't throw an Exception but returned nothing usefull. - throw new mod.MalformedXmlRpc("No documentElement found.", xml); - } - switch(node.tagName){ - case "methodResponse": - return parseMethodResponse(node); - case "methodCall": - return parseMethodCall(node); - default://nothing usefull returned by parseXML. - throw new mod.MalformedXmlRpc("'methodCall' or 'methodResponse' element expected.\nFound: '" + node.tagName + "'", xml); - } - }catch(e){ - if(e instanceof mod.Fault){//just rethrow the fault. - throw e; - }else { - throw new mod.MalformedXmlRpc("Unmarshalling of XML failed.", xml, e); - } - } - } - - /** - Parses a methodeResponse element. - @param node The methodResponse element. - @return The return value of the XML-RPC. - */ - var parseMethodResponse=function(node){ - try{ - for(var i=0;i'; - if (args.length>0){ - data += ""; - for(var i=0;i'; - } - data += ''; - } - data += ''; - return data; - } - /** - Initializes the XML-RPC method. - @param url The URL of the service providing the method. - @param methodName The name of the method to invoke. - @param user=null The user name to use for HTTP authentication. - @param pass=null The password to use for HTTP authentication. - */ - publ.init = function(url, methodName, user, pass){ - - //this is pretty much a hack. - //we create a function which mimics this class and return it instead of really instanciating an object. - var fn=function(){ - //sync or async call - if(typeof arguments[arguments.length-1] != "function"){ - var data=getXML(fn.methodName,arguments); - var resp = postData(fn.url, fn.user, fn.password, data); - - return handleResponse(resp); - }else{ - var args=new Array(); - for(var i=0;i 0){ - var tryIntrospection=false; - }else{ - var tryIntrospection=true; - } - }else{ - pass=user; - user=methodNames; - methodNames=[]; - var tryIntrospection=true; - } - this._url = url; - this._user = user; - this._password = pass; - this._addMethodNames(methodNames); - if(tryIntrospection){ - try{//it's ok if it fails. - this._introspect(); - }catch(e){ - } - } - } - - /** - Adds new XMLRPCMethods to the proxy server which can then be invoked. - @param methodNames Array of names of methods that can be called on the server. - */ - publ._addMethodNames = function(methodNames){ - for(var i=0;i" + this.replace(/&/g, "&").replace(/"; - } - /** - XML-RPC representation of a number. - @return A string containing the Number's representation in XML. - */ - Number.prototype.toXmlRpc = function(){ - if(this == parseInt(this)){ - return "" + this + ""; - }else if(this == parseFloat(this)){ - return "" + this + ""; - }else{ - return false.toXmlRpc(); - } - } - /** - XML-RPC representation of a boolean. - @return A string containing the Boolean's representation in XML. - */ - Boolean.prototype.toXmlRpc = function(){ - if(this == true) { - return "1"; - }else{ - return "0"; - } - } - /** - XML-RPC representation of a date(iso 8601). - @return A string containing the Date's representation in XML. - */ - Date.prototype.toXmlRpc = function(){ - var padd=function(s, p){ - s=p+s - return s.substring(s.length - p.length) - } - var y = padd(this.getUTCFullYear(), "0000"); - var m = padd(this.getUTCMonth() + 1, "00"); - var d = padd(this.getUTCDate(), "00"); - var h = padd(this.getUTCHours(), "00"); - var min = padd(this.getUTCMinutes(), "00"); - var s = padd(this.getUTCSeconds(), "00"); - - var isodate = y + m + d + "T" + h + ":" + min + ":" + s - - return "" + isodate + ""; - } - /** - XML-RPC representation of an array. - Each entry in the array is a value in the XML-RPC. - @return A string containing the Array's representation in XML. - */ - Array.prototype.toXmlRpc = function(){ - var retstr = ""; - for(var i=0;i"; - } - return retstr + ""; - } - - - mod.test = function(){ - print("creating ServiceProxy object using introspection for method construction...\n"); - var s = new mod.ServiceProxy("http://localhost/testx.py"); - print("%s created\n".format(s)); - print("creating and marshalling test data:\n"); - var o = [1.234, 5, {a:"Hello & < ", b:new Date()}]; - print(mod.marshall(o)); - print("\ncalling echo() on remote service...\n"); - var r = s.echo(o); - print("service returned data(marshalled again):\n") - print(mod.marshall(r)); - } -}) - - - diff --git a/jssource/src_files/include/jsolait/missingmixin.js b/jssource/src_files/include/jsolait/missingmixin.js deleted file mode 100644 index 7188ea72..00000000 --- a/jssource/src_files/include/jsolait/missingmixin.js +++ /dev/null @@ -1,174 +0,0 @@ -/* - -Modification information for LGPL compliance - -r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync - -r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover - -r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex - -r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system - -r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development - -r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 - -r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm - -r4085 - 2005-04-13 17:30:42 -0700 (Wed, 13 Apr 2005) - robert - adding meeting scheduler and accept/decline - - -*/ - -/* - Copyright (c) 2003 Jan-Klaas Kollhof - - This file is part of the JavaScript o lait library(jsolait). - - jsolait is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - This software is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this software; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -if(Function.prototype.apply == null){ - Function.prototype.apply = function(thisObj, args){ - var a =[]; - for(var i=0;i= 0) ? n+Math.pow(10, -(d+1)) : n-Math.pow(10, -(d+1)); - n += ''; - return d == 0 ? n.substring(0, n.indexOf('.')) : n.substring(0, n.indexOf('.') + d + 1); - } -} - -if(Number.prototype.toExponential == null){ - Number.prototype.toExponential = function(d){ - var n = this; - var e = 0; - if (n != 0){ - e = Math.floor(Math.log(Math.abs(n)) / Math.LN10); - } - n /= Math.pow(10, e); - if (isFinite(d)){ - if (Math.abs(n) + 5*Math.pow(10, -(d+1)) >= 10.0){ - n /= 10; - e += 1; - } - n = n.toFixed(d); - } - n += "e"; - if (e >= 0){ - n += "+"; - } - n += e; - return n; - } -} - diff --git a/jssource/src_files/include/ytree/treeutil.js b/jssource/src_files/include/ytree/treeutil.js index d1a18353..a71277bb 100644 --- a/jssource/src_files/include/ytree/treeutil.js +++ b/jssource/src_files/include/ytree/treeutil.js @@ -172,7 +172,7 @@ function loadDataForNode(node, onCompleteCallback) { var callback = { success: function(o) { node=o.argument[0]; - var nodes=JSON.parse(o.responseText); + var nodes=YAHOO.lang.JSON.parse(o.responseText); var tmpNode; for (nodedata in nodes) { for (node1 in nodes[nodedata]) { diff --git a/jssource/src_files/install/installCommon.js b/jssource/src_files/install/installCommon.js index 0f6b9eab..59c9df83 100644 --- a/jssource/src_files/install/installCommon.js +++ b/jssource/src_files/install/installCommon.js @@ -43,6 +43,6 @@ function showHelp(step) } function setFocus() { - focus = document.getElementById('defaultFocus'); + focus = document.getElementById('button_next2'); focus.focus(); } diff --git a/jssource/src_files/modules/Administration/javascript/Administration.js b/jssource/src_files/modules/Administration/javascript/Administration.js index ad7c5c30..288f8644 100644 --- a/jssource/src_files/modules/Administration/javascript/Administration.js +++ b/jssource/src_files/modules/Administration/javascript/Administration.js @@ -104,7 +104,7 @@ SUGAR.Administration = { } } - var beanId = JSON.stringifyNoSecurity(beanIds); + var beanId = YAHOO.lang.JSON.stringify(beanIds); AjaxObject.startRequest(callbackRepairXssExecute, "&adminAction=repairXssExecute&bean=" + this.currentRepairObject + "&id=" + beanId); } }, diff --git a/jssource/src_files/modules/Administration/javascript/Async.js b/jssource/src_files/modules/Administration/javascript/Async.js index 7ccfffa1..350f8690 100644 --- a/jssource/src_files/modules/Administration/javascript/Async.js +++ b/jssource/src_files/modules/Administration/javascript/Async.js @@ -69,7 +69,7 @@ var AjaxObject = { * gets an estimate of how many rows to process */ refreshEstimate : function(o) { - this.ret = JSON.parse(o.responseText); + this.ret = YAHOO.lang.JSON.parse(o.responseText); document.getElementById('repairXssDisplay').style.display = 'inline'; document.getElementById('repairXssCount').value = this.ret.count; @@ -78,7 +78,7 @@ var AjaxObject = { showRepairXssResult : function(o) { var resultCounter = document.getElementById('repairXssResultCount'); - this.ret = JSON.parse(o.responseText); + this.ret = YAHOO.lang.JSON.parse(o.responseText); document.getElementById('repairXssResults').style.display = 'inline'; if(this.ret.msg == 'success') { diff --git a/jssource/src_files/modules/Documents/documents.js b/jssource/src_files/modules/Documents/documents.js index 618857ac..2e3dc9d8 100644 --- a/jssource/src_files/modules/Documents/documents.js +++ b/jssource/src_files/modules/Documents/documents.js @@ -46,11 +46,7 @@ function document_set_return(popup_reply_data) related_doc_id='EMPTY'; for (var the_key in name_to_value_array) { - if(the_key == 'toJSON') - { - /* just ignore */ - } - else + if(the_key != 'toJSON') { var displayValue=name_to_value_array[the_key]; displayValue=displayValue.replace(''',"'"); //restore escaped single quote. @@ -64,21 +60,16 @@ function document_set_return(popup_reply_data) window.document.forms[form_name].elements[the_key].value = displayValue; } } - related_doc_id=JSON.stringifyNoSecurity(related_doc_id); + related_doc_id=YAHOO.lang.JSON.stringify(related_doc_id); //make request for document revisions data. var conditions = new Array(); conditions[conditions.length] = {"name":"document_id","op":"starts_with","value":related_doc_id}; - var query = new Array(); var query = {"module":"DocumentRevisions","field_list":['id','revision','date_entered'],"conditions":conditions,"order":'date_entered desc'}; //make the call call synchronous for now... //todo: convert to async, test on mozilla.. result = global_rpcClient.call_method('query',query,true); rhandle.display(result); - - //req_id = global_rpcClient.call_method('query',query); - //register the callback mathod. - //global_request_registry[req_id] = [rhandle, 'display']; } diff --git a/jssource/src_files/modules/Studio/studiotabgroups.js b/jssource/src_files/modules/Studio/studiotabgroups.js index 42943245..cfd52d83 100644 --- a/jssource/src_files/modules/Studio/studiotabgroups.js +++ b/jssource/src_files/modules/Studio/studiotabgroups.js @@ -60,7 +60,7 @@ StudioTabGroup.prototype.editTabGroupLabel = function (id, done){ YAHOO.util.DragDropMgr.lock(); }else{ this.lastEditTabGroupLabel = -1; - document.getElementById('tabname_'+id).innerHTML =document.getElementById('tablabel_'+id).value; + document.getElementById('tabname_'+id).innerHTML = escape(document.getElementById('tablabel_'+id).value); document.getElementById('tabname_'+id).style.display = ''; document.getElementById('tablabel_'+id).style.display = 'none'; document.getElementById('tabother_'+id).style.display = ''; diff --git a/modules/ACLRoles/ACLRoles.js b/modules/ACLRoles/ACLRoles.js index defce0f8..ba03a6dc 100644 --- a/modules/ACLRoles/ACLRoles.js +++ b/modules/ACLRoles/ACLRoles.js @@ -33,4 +33,4 @@ * "Powered by SugarCRM". ********************************************************************************/ var aclviewer=function(){var lastDisplay='';return{view:function(role_id,role_module){YAHOO.util.Connect.asyncRequest('POST','index.php',{'success':aclviewer.display,'failure':aclviewer.failed},'module=ACLRoles&action=EditRole&record='+role_id+'&category_name='+role_module);ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_REQUEST_PROCESSED'));},save:function(form_name){var formObject=document.getElementById(form_name);YAHOO.util.Connect.setForm(formObject);YAHOO.util.Connect.asyncRequest('POST','index.php',{'success':aclviewer.postSave,'failure':aclviewer.failed});ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_SAVING'));},postSave:function(o){eval(o.responseText);aclviewer.view(result['role_id'],result['module']);},display:function(o){aclviewer.lastDisplay='';ajaxStatus.flashStatus('Done');document.getElementById('category_data').innerHTML=o.responseText;},failed:function(){ajax.flashStatus('Could Not Connect');},toggleDisplay:function(id){if(aclviewer.lastDisplay!=''&&typeof(aclviewer.lastDisplay)!='undefined'){aclviewer.hideDisplay(aclviewer.lastDisplay);} -if(aclviewer.lastDisplay!=id){aclviewer.showDisplay(id);aclviewer.lastDisplay=id;}else{aclviewer.lastDisplay='';}},hideDisplay:function(id){document.getElementById(id).style.display='none';document.getElementById(id+'link').style.display='';},showDisplay:function(id){document.getElementById(id).style.display='';document.getElementById(id+'link').style.display='none';}};}(); \ No newline at end of file +if(aclviewer.lastDisplay!=id){aclviewer.showDisplay(id);aclviewer.lastDisplay=id;}else{aclviewer.lastDisplay='';}},hideDisplay:function(id){document.getElementById(id).style.display='none';document.getElementById(id+'link').style.display='';},showDisplay:function(id){document.getElementById(id).style.display='';document.getElementById(id+'link').style.display='none';}};}(); diff --git a/modules/ACLRoles/Popup_picker.html b/modules/ACLRoles/Popup_picker.html index e444fd75..78f7b5f6 100644 --- a/modules/ACLRoles/Popup_picker.html +++ b/modules/ACLRoles/Popup_picker.html @@ -38,7 +38,6 @@ - @@ -59,8 +58,7 @@ xxxxx - @@ -73,18 +71,6 @@ xxxxx
            - - diff --git a/modules/ACLRoles/popup.tpl b/modules/ACLRoles/popup.tpl index f814e19e..f6d65355 100644 --- a/modules/ACLRoles/popup.tpl +++ b/modules/ACLRoles/popup.tpl @@ -39,7 +39,6 @@ ********************************************************************************/ --> - @@ -68,6 +67,7 @@ @@ -81,18 +81,6 @@
            - -