From 8ea6d5bfc3076f2f47fb814eb538343064809a67 Mon Sep 17 00:00:00 2001 From: John Mertic Date: Thu, 22 Sep 2011 16:55:57 +0200 Subject: [PATCH] Release 6.2.3 --- ModuleInstall/ModuleInstaller.php | 4 +- cron.php | 4 +- data/Link.php | 1 + data/SugarBean.php | 27 +- download.php | 3 +- files.md5 | 706 +++--- include/DetailView/DetailView.tpl | 5 +- include/EditView/EditView2.php | 955 ++++---- include/EditView/SubpanelQuickCreate.php | 8 +- include/EditView/footer.tpl | 2 +- include/ListView/ListViewDisplay.php | 2 +- include/ListView/ListViewGeneric.tpl | 6 +- include/ListView/ListViewSmarty.php | 17 +- include/Localization/Localization.php | 15 +- include/MVC/Controller/SugarController.php | 6 + include/MVC/View/SugarView.php | 30 +- include/MVC/View/ViewFactory.php | 6 +- include/MVC/View/views/view.edit.php | 1 + include/MVC/View/views/view.quickcreate.php | 4 + include/MassUpdate.php | 111 +- include/MySugar/javascript/MySugar.js | 2 +- include/OutboundEmail/OutboundEmail.php | 17 +- include/Popups/PopupSmarty.php | 6 +- include/QuickSearchDefaults.php | 39 +- include/SearchForm/SearchForm2.php | 201 +- .../tpls/SearchFormGenericAdvanced.tpl | 8 +- include/SubPanel/SubPanelDynamic.html | 2 +- .../Jit/FlashCanvas/flashcanvas.js | 2 +- include/SugarCharts/Jit/js/Jit/jit.js | 2 +- include/SugarCharts/JsChart.php | 13 +- include/SugarCharts/SugarChart.php | 5 +- .../SugarEmailAddress/SugarEmailAddress.js | 9 +- .../SugarEmailAddress/SugarEmailAddress.php | 9 +- .../templates/forEditView.tpl | 2 +- .../templates/forWideFormBodyView.tpl | 2 +- .../Fields/Address/en_us.EditView.tpl | 2 +- .../Fields/Base/SugarFieldBase.php | 98 +- .../SugarFields/Fields/Currency/EditView.tpl | 2 +- .../Fields/Encrypt/SugarFieldEncrypt.php | 60 + include/SugarFields/Fields/File/EditView.tpl | 2 +- .../Fields/File/SugarFieldFile.php | 62 + include/SugarFields/Fields/Float/EditView.tpl | 2 +- include/SugarFields/Fields/Int/EditView.tpl | 2 +- .../SugarFields/Fields/Parent/SearchView.tpl | 6 +- .../Fields/Parent/SugarFieldParent.php | 36 + .../SugarObjects/templates/basic/vardefs.php | 1 + .../templates/company/vardefs.php | 3 +- .../SugarObjects/templates/file/vardefs.php | 1 + .../templates/file/views/view.edit.php | 9 +- .../SugarObjects/templates/issue/vardefs.php | 1 + .../templates/person/language/en_us.lang.php | 2 + .../SugarObjects/templates/person/vardefs.php | 4 +- .../SugarObjects/templates/sale/vardefs.php | 1 + include/Sugarpdf/Sugarpdf.php | 5 + include/TemplateHandler/TemplateHandler.php | 8 +- include/VarDefHandler/listvardefoverride.php | 7 +- include/VarDefHandler/vardef_meta_arrays.php | 14 +- include/connectors/sources/default/source.php | 268 ++- include/connectors/sources/ext/rest/rest.php | 18 +- include/connectors/sources/ext/soap/soap.php | 21 +- include/connectors/sources/loc/xml.php | 10 - include/database/DBHelper.php | 18 +- include/database/DBManager.php | 11 +- include/database/FreeTDSHelper.php | 6 +- include/database/MssqlHelper.php | 8 +- include/database/MssqlManager.php | 2 +- include/database/MysqlHelper.php | 6 +- include/externalAPI/Base/OAuthPluginBase.php | 19 +- include/externalAPI/ExternalAPIFactory.php | 7 +- include/formbase.php | 20 +- include/generic/Save2.php | 4 +- .../SugarWidgets/SugarWidgetFielddecimal.php | 11 +- .../SugarWidgets/SugarWidgetFieldenum.php | 24 +- .../SugarWidgets/SugarWidgetFieldint.php | 12 + .../SugarWidgetFieldmultienum.php | 18 +- .../SugarWidgets/SugarWidgetFieldurl.php | 13 +- .../SugarWidgets/SugarWidgetReportField.php | 3 +- .../SugarWidgetSubPanelDetailViewLink.php | 70 +- ...SugarWidgetSubPanelRemoveButtonAccount.php | 20 +- ...ugarWidgetSubPanelRemoveButtonProjects.php | 2 +- .../SugarWidgetSubPanelTopButton.php | 4 +- ...garWidgetSubPanelTopComposeEmailButton.php | 4 +- ...arWidgetSubPanelTopSelectAccountButton.php | 61 + include/javascript/jsclass_async.js | 5 +- include/javascript/popup_helper.js | 3 +- include/javascript/sugar_3.js | 29 +- include/javascript/sugar_grp1.js | 29 +- include/javascript/sugar_grp_emails.js | 36 +- include/javascript/sugar_grp_quickcomp.js | 27 +- .../tiny_mce/classes/AddOnManager.js | 73 +- .../tiny_mce/classes/ControlManager.js | 2 +- include/javascript/tiny_mce/classes/Editor.js | 449 ++-- .../tiny_mce/classes/EditorCommands.js | 205 +- .../tiny_mce/classes/ForceBlocks.js | 268 +-- .../javascript/tiny_mce/classes/Formatter.js | 126 +- include/javascript/tiny_mce/classes/Popup.js | 2 +- .../tiny_mce/classes/UndoManager.js | 10 +- .../classes/adapter/jquery/adapter.js | 5 +- .../tiny_mce/classes/dom/DOMUtils.js | 40 +- .../tiny_mce/classes/dom/EventUtils.js | 2 +- .../tiny_mce/classes/dom/Selection.js | 103 +- .../tiny_mce/classes/dom/TridentSelection.js | 421 +++- .../tiny_mce/classes/html/DomParser.js | 90 +- .../tiny_mce/classes/html/Entities.js | 8 +- .../javascript/tiny_mce/classes/html/Node.js | 11 + .../tiny_mce/classes/html/SaxParser.js | 13 +- .../tiny_mce/classes/html/Schema.js | 64 +- .../tiny_mce/classes/html/Styles.js | 14 +- .../javascript/tiny_mce/classes/tinymce.js | 38 +- .../javascript/tiny_mce/classes/ui/Button.js | 3 +- .../javascript/tiny_mce/classes/ui/ListBox.js | 3 +- .../tiny_mce/classes/util/Quirks.js | 25 + .../javascript/tiny_mce/classes/util/URI.js | 8 +- .../javascript/tiny_mce/classes/util/VK.js | 12 + .../plugins/advimage/editor_plugin.js | 2 +- .../plugins/advimage/editor_plugin_src.js | 2 +- .../tiny_mce/plugins/advimage/js/image.js | 10 +- .../tiny_mce/plugins/advlist/editor_plugin.js | 2 +- .../plugins/advlist/editor_plugin_src.js | 31 +- .../plugins/autolink/editor_plugin.js | 2 +- .../plugins/autolink/editor_plugin_src.js | 7 +- .../plugins/autoresize/editor_plugin.js | 2 +- .../plugins/autoresize/editor_plugin_src.js | 25 +- .../plugins/autosave/editor_plugin.js | 2 +- .../plugins/autosave/editor_plugin_src.js | 2 +- .../plugins/contextmenu/editor_plugin.js | 2 +- .../plugins/contextmenu/editor_plugin_src.js | 11 +- .../emotions/img/smiley-foot-in-mouth.gif | Bin 344 -> 342 bytes .../plugins/emotions/img/smiley-laughing.gif | Bin 344 -> 343 bytes .../plugins/emotions/img/smiley-sealed.gif | Bin 325 -> 323 bytes .../plugins/emotions/img/smiley-smile.gif | Bin 345 -> 344 bytes .../plugins/emotions/img/smiley-surprised.gif | Bin 342 -> 338 bytes .../plugins/emotions/img/smiley-wink.gif | Bin 351 -> 350 bytes .../example_dependency/editor_plugin.js | 1 + .../example_dependency/editor_plugin_src.js | 50 + .../plugins/fullpage/editor_plugin.js | 2 +- .../plugins/fullpage/editor_plugin_src.js | 2 +- .../plugins/inlinepopups/editor_plugin.js | 2 +- .../plugins/inlinepopups/editor_plugin_src.js | 5 +- .../skins/clearlooks2/img/alert.gif | Bin 818 -> 810 bytes .../skins/clearlooks2/img/button.gif | Bin 280 -> 272 bytes .../skins/clearlooks2/img/confirm.gif | Bin 915 -> 907 bytes .../skins/clearlooks2/img/corners.gif | Bin 911 -> 909 bytes .../skins/clearlooks2/img/vertical.gif | Bin 92 -> 84 bytes .../tiny_mce/plugins/lists/editor_plugin.js | 2 +- .../plugins/lists/editor_plugin_src.js | 326 ++- .../tiny_mce/plugins/media/editor_plugin.js | 2 +- .../plugins/media/editor_plugin_src.js | 102 +- .../tiny_mce/plugins/media/js/media.js | 75 +- .../tiny_mce/plugins/media/langs/en_dlg.js | 5 +- .../tiny_mce/plugins/media/media.htm | 97 +- .../plugins/noneditable/editor_plugin.js | 2 +- .../plugins/noneditable/editor_plugin_src.js | 7 +- .../tiny_mce/plugins/paste/editor_plugin.js | 2 +- .../plugins/paste/editor_plugin_src.js | 33 +- .../plugins/spellchecker/editor_plugin.js | 2 +- .../plugins/spellchecker/editor_plugin_src.js | 3 +- .../tiny_mce/plugins/style/js/props.js | 2 +- .../tiny_mce/plugins/style/props.htm | 4 +- .../plugins/tabfocus/editor_plugin.js | 2 +- .../plugins/tabfocus/editor_plugin_src.js | 30 +- .../tiny_mce/plugins/table/cell.htm | 6 +- .../tiny_mce/plugins/table/editor_plugin.js | 2 +- .../plugins/table/editor_plugin_src.js | 175 +- .../tiny_mce/plugins/table/js/cell.js | 35 + .../tiny_mce/plugins/table/js/row.js | 5 + .../tiny_mce/plugins/table/langs/en_dlg.js | 1 + .../javascript/tiny_mce/plugins/table/row.htm | 3 +- .../tiny_mce/plugins/table/table.htm | 4 +- .../plugins/wordcount/editor_plugin.js | 2 +- .../plugins/wordcount/editor_plugin_src.js | 4 +- .../themes/advanced/editor_template.js | 2 +- .../themes/advanced/editor_template_src.js | 16 +- .../themes/advanced/img/colorpicker.jpg | Bin 3189 -> 2584 bytes .../tiny_mce/themes/advanced/img/flash.gif | Bin 241 -> 239 bytes .../tiny_mce/themes/advanced/img/icons.gif | Bin 11794 -> 11790 bytes .../themes/advanced/img/quicktime.gif | Bin 303 -> 301 bytes .../themes/advanced/img/shockwave.gif | Bin 387 -> 384 bytes .../tiny_mce/themes/advanced/js/image.js | 4 +- .../themes/advanced/skins/default/content.css | 3 +- .../advanced/skins/default/img/buttons.png | Bin 3274 -> 3133 bytes .../advanced/skins/default/img/items.gif | Bin 70 -> 64 bytes .../advanced/skins/default/img/tabs.gif | Bin 1326 -> 1322 bytes .../themes/advanced/skins/default/ui.css | 1 + .../themes/advanced/skins/highcontrast/ui.css | 1 + .../themes/advanced/skins/o2k7/content.css | 1 + .../advanced/skins/o2k7/img/button_bg.png | Bin 5859 -> 2766 bytes .../skins/o2k7/img/button_bg_black.png | Bin 3736 -> 651 bytes .../skins/o2k7/img/button_bg_silver.png | Bin 5358 -> 2084 bytes .../themes/advanced/skins/o2k7/ui.css | 5 +- .../tiny_mce/themes/simple/img/icons.gif | Bin 1440 -> 806 bytes include/javascript/tiny_mce/tiny_mce.js | 2 +- include/javascript/tiny_mce/tiny_mce_dev.js | 4 +- .../javascript/tiny_mce/tiny_mce_jquery.js | 2 +- .../tiny_mce/tiny_mce_jquery_src.js | 1957 +++++++++++------ .../javascript/tiny_mce/tiny_mce_prototype.js | 2 +- .../tiny_mce/tiny_mce_prototype_src.js | 1954 ++++++++++------ include/javascript/tiny_mce/tiny_mce_src.js | 1954 ++++++++++------ include/language/en_us.lang.php | 4 + include/tcpdf/tcpdf.php | 4 + include/timezone/timezones.php | 4 + include/utils.php | 29 +- include/utils/db_utils.php | 27 - include/utils/mvc_utils.php | 13 +- include/vCard.php | 3 +- install.php | 2 +- install/checkDBSettings.php | 25 +- install/confirmSettings.php | 4 +- install/download_modules.php | 3 +- install/language/en_us.lang.php | 6 +- .../include/MySugar/javascript/MySugar.js | 3 +- .../Jit/FlashCanvas/flashcanvas.js | 3 +- .../include/SugarCharts/Jit/js/Jit/jit.js | 2 +- .../SugarEmailAddress/SugarEmailAddress.js | 17 +- .../include/javascript/jsclass_async.js | 28 +- .../include/javascript/popup_helper.js | 8 +- .../src_files/include/javascript/sugar_3.js | 75 +- modules/Accounts/metadata/subpaneldefs.php | 4 +- .../Accounts/metadata/subpanels/default.php | 4 +- modules/Administration/Locale.tpl | 2 +- modules/Administration/SupportPortal.php | 71 +- modules/Administration/SupportPortal.tpl | 53 +- modules/Administration/UpgradeHistory.php | 2 +- modules/Administration/index.php | 7 +- modules/Administration/index.tpl | 8 +- modules/Bugs/views/view.detail.php | 8 - modules/Bugs/views/view.edit.php | 10 - modules/Calendar/Calendar.php | 7 +- .../Calendar/templates/templates_calendar.php | 17 +- modules/Calls/CallFormBase.php | 4 +- .../MyCallsDashlet/MyCallsDashlet.data.php | 7 +- .../MyCallsDashlet/MyCallsDashlet.php | 6 +- modules/Calls/vardefs.php | 4 +- modules/Calls/views/view.edit.php | 9 - modules/CampaignLog/CampaignLog.php | 7 +- modules/Campaigns/Campaign.php | 9 +- modules/Campaigns/GenerateWebToLeadForm.php | 55 +- modules/Campaigns/Save.php | 18 + modules/Campaigns/WizardHome.php | 14 +- modules/Campaigns/WizardNewsletter.php | 26 +- .../Campaigns/tpls/WizardCampaignHeader.tpl | 2 +- modules/Campaigns/utils.php | 14 + modules/Configurator/tpls/EditView.tpl | 1 + modules/Configurator/views/view.edit.php | 1 - .../sources/ext/rest/linkedin/linkedin.php | 15 +- .../Connectors/tpls/display_properties.tpl | 6 +- .../Connectors/tpls/mapping_properties.tpl | 2 +- modules/Connectors/tpls/search_properties.tpl | 4 +- .../views/view.searchproperties.php | 8 - .../views/view.sourceproperties.php | 8 - modules/Contacts/ContactFormBase.php | 15 +- modules/Contacts/views/view.edit.php | 10 - modules/Currencies/Currency.php | 2 +- modules/Currencies/ListCurrency.php | 10 +- modules/Documents/Document.php | 6 +- modules/Documents/views/view.detail.php | 8 - modules/Documents/views/view.edit.php | 10 - modules/Documents/views/view.extdoc.php | 17 +- modules/DynamicFields/DynamicField.php | 14 +- .../templates/Fields/Forms/html.tpl | 8 +- modules/EAPM/views/view.edit.php | 10 - modules/EmailMan/EmailManDelivery.php | 4 + modules/EmailMan/Save.php | 120 - modules/EmailMan/controller.php | 126 ++ modules/EmailMan/testOutboundEmail.php | 2 +- modules/EmailMan/tpls/config.tpl | 8 +- modules/EmailTemplates/DetailView.php | 6 +- modules/EmailTemplates/EditView.php | 5 + modules/Emails/Email.php | 15 +- modules/Emails/EmailUIAjax.php | 2 +- modules/Emails/Save.php | 8 + modules/Emails/javascript/EmailUICompose.js | 27 +- modules/Employees/Save.php | 13 - modules/Employees/views/view.detail.php | 8 - modules/Employees/views/view.edit.php | 10 - .../Dashlets/JotPadDashlet/JotPadDashlet.php | 2 +- modules/Home/SubpanelCreates.php | 10 +- modules/Home/index.php | 2 +- .../views/view.additionaldetailsretrieve.php | 12 +- modules/Import/ImportFieldSanitize.php | 9 +- modules/Import/tpls/step1.tpl | 29 +- modules/Import/views/view.step1.php | 49 +- modules/Import/views/view.step4.php | 2 +- modules/InboundEmail/InboundEmail.php | 8 +- modules/Leads/LeadFormBase.php | 2 + modules/Leads/tpls/ConvertLead.tpl | 4 +- modules/Leads/views/view.convertlead.php | 5 + modules/MailMerge/Step2.html | 54 +- modules/MailMerge/Step2.php | 4 +- .../MyMeetingsDashlet.data.php | 7 +- .../MyMeetingsDashlet/MyMeetingsDashlet.php | 6 +- modules/Meetings/metadata/editviewdefs.php | 4 +- modules/Meetings/vardefs.php | 8 +- modules/Meetings/views/view.edit.php | 9 - modules/MergeRecords/MergeRecord.php | 4 +- modules/MergeRecords/Step2.php | 2 + modules/ModuleBuilder/MB/MBLanguage.php | 15 +- modules/ModuleBuilder/MB/MBModule.php | 8 + modules/ModuleBuilder/MB/MBPackage.php | 35 +- modules/ModuleBuilder/MB/MBVardefs.php | 6 + modules/ModuleBuilder/controller.php | 28 +- .../ModuleBuilder/javascript/ModuleBuilder.js | 1 + .../ModuleBuilder/parsers/parser.dropdown.php | 3 +- .../parsers/parser.modifylistview.php | 1 - .../relationships/ActivitiesRelationship.php | 1 - .../views/GridLayoutMetaDataParser.php | 11 +- .../views/ListLayoutMetaDataParser.php | 39 +- .../parsers/views/SubpanelMetaDataParser.php | 9 +- .../ModuleBuilder/tpls/MBModule/dropdown.tpl | 2 +- modules/ModuleBuilder/tpls/layoutView.tpl | 7 +- modules/ModuleBuilder/views/view.dropdown.php | 7 +- .../ModuleBuilder/views/view.layoutview.php | 10 +- modules/ModuleBuilder/views/view.listview.php | 6 +- .../ModuleBuilder/views/view.modulefield.php | 14 +- .../ModuleBuilder/views/view.modulelabels.php | 4 +- modules/Notes/metadata/quickcreatedefs.php | 2 +- modules/Notes/metadata/subpanels/ForTasks.php | 127 ++ modules/Notes/vardefs.php | 10 +- modules/Opportunities/views/view.edit.php | 2 - modules/Project/Project.php | 36 + modules/Project/gantt.css | 221 ++ modules/Project/views/view.edit.php | 2 - modules/Project/views/view.templatesedit.php | 2 - modules/ProjectTask/Popup.html | 116 - modules/ProjectTask/ProjectTask.php | 3 +- modules/ProjectTask/vardefs.php | 12 +- modules/ProspectLists/ProspectList.php | 33 +- modules/ProspectLists/Save.php | 24 +- modules/Prospects/views/view.detail.php | 8 - modules/Schedulers/Scheduler.php | 51 +- modules/SchedulersJobs/SchedulersJob.php | 39 +- modules/Studio/DropDowns/DropDownHelper.php | 2 +- modules/Studio/DropDowns/EditView.tpl | 8 +- modules/Studio/parsers/StudioParser.php | 2 +- .../SugarFeedDashlet/SugarFeedDashlet.php | 2 +- .../MyTasksDashlet/MyTasksDashlet.data.php | 14 +- modules/Tasks/Task.php | 4 +- modules/Tasks/language/en_us.lang.php | 1 + modules/Tasks/metadata/quickcreatedefs.php | 4 +- modules/Tasks/metadata/subpaneldefs.php | 67 + modules/Tasks/vardefs.php | 24 +- modules/Tasks/views/view.edit.php | 10 - .../store/TrackerSessionsDatabaseStore.php | 8 +- modules/UpgradeWizard/uw_utils.php | 59 +- modules/UserPreferences/UserPreference.php | 2 + modules/Users/User.php | 7 +- .../EmailAuthenticateUser.php | 36 +- .../SAMLAuthenticate/SAMLAuthenticateUser.php | 4 +- .../lib/onelogin/saml/authrequest.php | 6 +- modules/Users/metadata/SearchFields.php | 3 +- modules/Users/tpls/wizard.tpl | 4 +- modules/vCals/vCal.php | 2 +- service/core/webservice.php | 1 + sugar_version.php | 8 +- tests/SugarTestProspectUtilities.php | 85 + tests/data/Bug40989Test.php | 15 +- tests/include/Bug23816Test.php | 67 + tests/include/EditView/Bug46365Test.php | 123 ++ tests/include/ListView/Bug45566Test.php | 78 + .../MVC/Controller/SugarControllerTest.php | 82 + tests/include/MVC/View/Bug44831Test.php | 147 ++ tests/include/MVC/View/LoadMenuTest.php | 68 +- tests/include/MassUpdate/Bug40597Test.php | 0 tests/include/MassUpdate/Bug42193Test.php | 68 + tests/include/MassUpdate/Bug46276Test.php | 102 + tests/include/OutboundEmail/Bug23140Test.php | 21 +- tests/include/Popup/Bug36329Test.php | 8 +- tests/include/Popup/Bug44324Test.php | 2 + tests/include/SearchForm/Bug43452Test.php | 81 + tests/include/SearchForm/Bug44858Test.php | 91 + tests/include/SearchForm/Bug45709Test.php | 103 + tests/include/SearchForm/Bug45966Test.php | 386 ++++ tests/include/SearchForm/RangeSearchTest.php | 37 - tests/include/SugarCharts/Bug42326Test.php | 80 + .../SugarEmailAddress/Bug42706Test.php | 71 + .../SugarEmailAddressRegexTest.php | 32 +- .../Fields/Currency/Bug38424CurrencyTest.php | 56 + .../Fields/Encrypt/SugarFieldEncryptTest.php | 75 + .../SugarFields/Fields/File/Bug22505Test.php | 98 + .../Fields/Float/Bug38424FloatTest.php | 57 + .../Fields/Int/Bug38424IntTest.php | 56 + .../Fields/Parent/Bug44018Test.php | 61 + tests/include/ValidDBNameTest.php | 43 - tests/include/database/Bug42475Test.php | 74 + tests/include/database/Bug43466Test.php | 580 +++++ tests/include/database/Bug44291.php | 77 + tests/include/utils/Bug46122Test.php | 136 ++ tests/include/utils/CleanStringTest.php | 70 + tests/modules/Administration/Bug36008Test.php | 0 .../Administration/Bugs39819_39820.php | 104 + .../Administration/UpgradeHistoryTest.php | 9 + tests/modules/Calendar/Bug37953Test.php | 77 + tests/modules/Contracts/Bug44836Test.php | 66 + tests/modules/DynamicFields/Bug43471Test.php | 141 ++ tests/modules/EmailMan/Bug44113Test.php | 134 ++ tests/modules/Emails/Bug40911Test.php | 85 + tests/modules/Emails/EmailUITest.php | 19 +- tests/modules/Home/Bug39610Test.php | 99 + tests/modules/Home/Bug43395Test.php | 4 +- tests/modules/Leads/Bug44522Test.php | 130 ++ tests/modules/Meetings/Bug45287Test.php | 195 ++ tests/modules/Meetings/Bug45287_2Test.php | 195 ++ tests/modules/ModuleBuilder/Bug46941Test.php | 115 + .../modules/ModuleBuilder/MB/Bug39598Test.php | 69 + .../modules/ModuleBuilder/MB/Bug40450Test.php | 68 + .../ModuleBuilder/Module/StudioModuleTest.php | 2 + .../ModuleBuilder/parsers/Bug10329Test.php | 74 + .../ModuleBuilder/views/Bug45683Test.php | 23 +- .../ModuleBuilder/views/Bug47010Test.php | 69 + .../Bug44515-WithoutCustom.php | 63 + tests/modules/ProductTemplates/Bug44515.php | 89 + tests/modules/Project/Bug37123Test.php | 114 + tests/modules/ProspectLists/Bug41569Test.php | 141 ++ tests/modules/ProspectLists/Bug43478Test.php | 147 ++ tests/modules/ProspectLists/Bug43805Test.php | 145 ++ .../Bug36246Test.php} | 31 +- tests/modules/SubPanel/Bug40434Test.php | 66 + tests/modules/Tasks/Bug45715Test.php | 63 + tests/modules/Trackers/store/Bug41051Test.php | 114 + tests/modules/UpgradeWizard/Bug36845Test.php | 3 +- tests/modules/UpgradeWizard/Bug40793Test.php | 75 + themes/Sugar5/css/style.css | 4 +- themes/Sugar5/tpls/_headerShortcuts.tpl | 9 +- themes/default/css/style.css | 59 +- 424 files changed, 15296 insertions(+), 5524 deletions(-) create mode 100644 include/SugarFields/Fields/Encrypt/SugarFieldEncrypt.php rename modules/ProjectTask/Popup.php => include/generic/SugarWidgets/SugarWidgetSubPanelRemoveButtonAccount.php (84%) create mode 100644 include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectAccountButton.php create mode 100644 include/javascript/tiny_mce/classes/util/Quirks.js create mode 100644 include/javascript/tiny_mce/classes/util/VK.js create mode 100644 include/javascript/tiny_mce/plugins/example_dependency/editor_plugin.js create mode 100644 include/javascript/tiny_mce/plugins/example_dependency/editor_plugin_src.js delete mode 100644 modules/EmailMan/Save.php create mode 100644 modules/EmailMan/controller.php create mode 100644 modules/Notes/metadata/subpanels/ForTasks.php create mode 100644 modules/Project/gantt.css delete mode 100644 modules/ProjectTask/Popup.html create mode 100644 modules/Tasks/metadata/subpaneldefs.php create mode 100755 tests/SugarTestProspectUtilities.php create mode 100755 tests/include/Bug23816Test.php create mode 100755 tests/include/EditView/Bug46365Test.php create mode 100755 tests/include/ListView/Bug45566Test.php create mode 100755 tests/include/MVC/View/Bug44831Test.php create mode 100755 tests/include/MassUpdate/Bug40597Test.php create mode 100755 tests/include/MassUpdate/Bug42193Test.php create mode 100755 tests/include/MassUpdate/Bug46276Test.php create mode 100755 tests/include/SearchForm/Bug43452Test.php create mode 100755 tests/include/SearchForm/Bug44858Test.php create mode 100755 tests/include/SearchForm/Bug45709Test.php create mode 100755 tests/include/SearchForm/Bug45966Test.php create mode 100755 tests/include/SugarCharts/Bug42326Test.php create mode 100755 tests/include/SugarEmailAddress/Bug42706Test.php create mode 100755 tests/include/SugarFields/Fields/Currency/Bug38424CurrencyTest.php create mode 100755 tests/include/SugarFields/Fields/Encrypt/SugarFieldEncryptTest.php create mode 100755 tests/include/SugarFields/Fields/File/Bug22505Test.php create mode 100755 tests/include/SugarFields/Fields/Float/Bug38424FloatTest.php create mode 100755 tests/include/SugarFields/Fields/Int/Bug38424IntTest.php create mode 100755 tests/include/SugarFields/Fields/Parent/Bug44018Test.php create mode 100755 tests/include/database/Bug42475Test.php create mode 100755 tests/include/database/Bug43466Test.php create mode 100755 tests/include/database/Bug44291.php create mode 100755 tests/include/utils/Bug46122Test.php create mode 100755 tests/include/utils/CleanStringTest.php create mode 100755 tests/modules/Administration/Bug36008Test.php create mode 100755 tests/modules/Administration/Bugs39819_39820.php create mode 100755 tests/modules/Calendar/Bug37953Test.php create mode 100755 tests/modules/Contracts/Bug44836Test.php create mode 100755 tests/modules/DynamicFields/Bug43471Test.php create mode 100755 tests/modules/EmailMan/Bug44113Test.php create mode 100755 tests/modules/Emails/Bug40911Test.php create mode 100755 tests/modules/Home/Bug39610Test.php create mode 100755 tests/modules/Leads/Bug44522Test.php create mode 100755 tests/modules/Meetings/Bug45287Test.php create mode 100755 tests/modules/Meetings/Bug45287_2Test.php create mode 100755 tests/modules/ModuleBuilder/Bug46941Test.php create mode 100755 tests/modules/ModuleBuilder/MB/Bug39598Test.php create mode 100755 tests/modules/ModuleBuilder/MB/Bug40450Test.php create mode 100755 tests/modules/ModuleBuilder/parsers/Bug10329Test.php create mode 100755 tests/modules/ModuleBuilder/views/Bug47010Test.php create mode 100755 tests/modules/ProductTemplates/Bug44515-WithoutCustom.php create mode 100755 tests/modules/ProductTemplates/Bug44515.php create mode 100755 tests/modules/Project/Bug37123Test.php create mode 100755 tests/modules/ProspectLists/Bug41569Test.php create mode 100755 tests/modules/ProspectLists/Bug43478Test.php create mode 100755 tests/modules/ProspectLists/Bug43805Test.php rename tests/modules/{ModuleBuilder/parsers/Bug44712Test.php => Reports/Bug36246Test.php} (72%) create mode 100755 tests/modules/SubPanel/Bug40434Test.php create mode 100755 tests/modules/Tasks/Bug45715Test.php create mode 100755 tests/modules/Trackers/store/Bug41051Test.php create mode 100755 tests/modules/UpgradeWizard/Bug40793Test.php diff --git a/ModuleInstall/ModuleInstaller.php b/ModuleInstall/ModuleInstaller.php index 64ca749d..91db83af 100644 --- a/ModuleInstall/ModuleInstaller.php +++ b/ModuleInstall/ModuleInstaller.php @@ -1049,7 +1049,7 @@ class ModuleInstaller{ $basepath = "custom/Extension/application/Ext/"; } - foreach (array($filename , "custom" . $filename) as $fn) { + foreach (array($filename , "custom" . $filename, $rel_name ."_". $mod. ".php") as $fn) { //remove any vardefs $path = $basepath . "Vardefs/$fn" ; if (file_exists( $path )) @@ -1064,7 +1064,7 @@ class ModuleInstaller{ } } - foreach (array($filename , "custom" . $filename) as $fn) { + foreach (array($filename , "custom" . $filename, $rel_name ."_". $mod. ".php") as $fn) { // remove the table dictionary extension if ( file_exists("custom/Extension/application/Ext/TableDictionary/$fn")) unlink("custom/Extension/application/Ext/TableDictionary/$fn"); diff --git a/cron.php b/cron.php index 8f3e8a21..4cb4b6d9 100644 --- a/cron.php +++ b/cron.php @@ -93,9 +93,7 @@ if(!is_file($cachePath.'/'.$pid)) { /////////////////////////////////////////////////////////////////////////////// //// EXECUTE IF VALID TIME (NOT DDOS) -// 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($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/data/Link.php b/data/Link.php index 6e9f8c6d..f0b84ed4 100644 --- a/data/Link.php +++ b/data/Link.php @@ -94,6 +94,7 @@ class Link { $this->_db = DBManagerFactory::getInstance(); + //Following behavior is tied to a property(ignore_role) value in the vardef. It alters the values of 2 properties, ignore_role_filter and add_distinct. //the property values can be altered again before any requests are made. if (!empty($fieldDef) && is_array($fieldDef)) { diff --git a/data/SugarBean.php b/data/SugarBean.php index 20dbeb50..268058a6 100644 --- a/data/SugarBean.php +++ b/data/SugarBean.php @@ -1662,7 +1662,7 @@ class SugarBean if($sendEmail && !$notify_mail->Send()) { $GLOBALS['log']->fatal("Notifications: error sending e-mail (method: {$notify_mail->Mailer}), (error: {$notify_mail->ErrorInfo})"); } else { - $GLOBALS['log']->fatal("Notifications: e-mail successfully sent"); + $GLOBALS['log']->info("Notifications: e-mail successfully sent"); } } @@ -2678,6 +2678,8 @@ function save_relationship_changes($is_update, $exclude=array()) unset($list_fields[$list_key]); } } + + if(!$subpanel_def->isCollection() && isset($list_fields[$order_by]) && isset($submodule->field_defs[$order_by])&& (!isset($submodule->field_defs[$order_by]['source']) || $submodule->field_defs[$order_by]['source'] == 'db')) { $order_by = $submodule->table_name .'.'. $order_by; @@ -2690,7 +2692,7 @@ function save_relationship_changes($is_update, $exclude=array()) $params['joined_tables'] = $query_array['join_tables']; $params['include_custom_fields'] = !$subpanel_def->isCollection(); $params['collection_list'] = $subpanel_def->get_inst_prop_value('collection_list'); - + $subquery = $submodule->create_new_list_query('',$subwhere ,$list_fields,$params, 0,'', true,$parentbean); $subquery['select'] = $subquery['select']." , '$panel_name' panel_name "; @@ -2941,7 +2943,7 @@ function save_relationship_changes($is_update, $exclude=array()) * @param boolean $singleSelect Optional, default false. * @return String select query string, optionally an array value will be returned if $return_array= true. */ - function create_new_list_query($order_by, $where,$filter=array(),$params=array(), $show_deleted = 0,$join_type='', $return_array = false,$parentbean=null, $singleSelect = false) + function create_new_list_query($order_by, $where,$filter=array(),$params=array(), $show_deleted = 0,$join_type='', $return_array = false,$parentbean=null, $singleSelect = false, $ifListForExport = false) { global $beanFiles, $beanList; $selectedFields = array(); @@ -3370,6 +3372,14 @@ function save_relationship_changes($is_update, $exclude=array()) } } + + if ($ifListForExport) { + if(isset($this->field_defs['email1'])) { + $ret_array['select'].= " ,email_addresses.email_address email1"; + $ret_array['from'].= " LEFT JOIN email_addr_bean_rel on {$this->table_name}.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module='{$this->module_dir}' and email_addr_bean_rel.deleted=0 and email_addr_bean_rel.primary_address=1 LEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id "; + } + } + $where_auto = '1=1'; if($show_deleted == 0) { @@ -3955,8 +3965,10 @@ function save_relationship_changes($is_update, $exclude=array()) } if(!empty($sugar_config['disable_count_query']) && !empty($limit)) { - $rows_found = $row_offset + count($list); - + + //C.L. Bug 43535 - Use the $index value to set the $rows_found value here + $rows_found = isset($index) ? $index : $row_offset + count($list); + if(count($list) >= $limit) { array_pop($list); @@ -4315,9 +4327,8 @@ 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); @@ -5481,6 +5492,6 @@ function save_relationship_changes($is_update, $exclude=array()) */ public function create_export_query($order_by, $where) { - return $this->create_new_list_query($order_by, $where, array(), array(), 0, '', false, $this, true); + return $this->create_new_list_query($order_by, $where, array(), array(), 0, '', false, $this, true, true); } } diff --git a/download.php b/download.php index 78a800a0..834f74d8 100644 --- a/download.php +++ b/download.php @@ -168,7 +168,8 @@ else { header("Content-Type: image/png"); } } else { - header("Content-Type: application/force-download"); + header("Content-Type: application/force-download"); + header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"".$name."\";"); } // disable content type sniffing in MSIE diff --git a/files.md5 b/files.md5 index 84847d99..a5a9965b 100644 --- a/files.md5 +++ b/files.md5 @@ -1,5 +1,5 @@ 'd3f150e4a5bed444763ebe8a81742a95', './.htaccess' => 'd41d8cd98f00b204e9800998ecf8427e', @@ -584,14 +584,14 @@ $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' => '47a12cae4fc92e9991341df7da4b4366', + './themes/default/css/style.css' => '810809a8dd81abe5607913587254ecf9', './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' => 'c9adf92eb78e5268a40390531cd44249', - './themes/Sugar5/tpls/_headerShortcuts.tpl' => '8eae0ef23647e74007306f10a4698e32', + './themes/Sugar5/tpls/_headerShortcuts.tpl' => '1f6e19fd72259b505b07aaa278da7a82', './themes/Sugar5/tpls/_headerSearch.tpl' => '7547626048dd04c24f45768fc234a9f2', './themes/Sugar5/tpls/_headerModuleList.tpl' => '25a5b4a62638870961c36d2ddf036a48', './themes/Sugar5/tpls/_headerLastViewed.tpl' => '4395b403630b8edfe43d7c9520ea15c4', @@ -1165,11 +1165,11 @@ $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' => '69b721a579625713bcc0a7b95a42a015', + './themes/Sugar5/css/style.css' => 'eeb6f7e7a87a81c1dfdddcc2fc02fbb1', './themes/Sugar5/css/print.css' => '041ba7c460d78a693301c7061139af89', './themes/Sugar5/css/deprecated.css' => '872d2ee2f45eb595825646cb39a82fab', './themes/Sugar5/css/chart.css' => '493edb0e181f685fd595c483d09012fb', - './sugar_version.php' => 'b9f7fcb9d344440a1cdb08bb387d72ce', + './sugar_version.php' => 'fab53e4e5da1121b88038d36dad26d8b', './soap/SoapTypes.php' => 'f38a0ac79874c8a3e126d728bd05e00a', './soap/SoapSugarUsers.php' => 'aec5ba181325721fa9e6da7e6a787687', './soap/SoapStudio.php' => '2f424bab502055acae4131df64465e0c', @@ -1209,7 +1209,7 @@ $md5_string = array ( './service/example/test.html' => '246f909ed8e9d7767943b8385cb6b70c', './service/example/example.html' => '7f52c3e2a89236447f60fbabfb71a74d', './service/example/Rest_Proxy.php' => 'f8873a8fe88e4a7be8576f379e4963bc', - './service/core/webservice.php' => 'f91a0b1c2712e575cdeb54a5095c0328', + './service/core/webservice.php' => '6fb48213b39f1b4da200929397c3deb1', './service/core/WSDL.tpl' => 'd41d8cd98f00b204e9800998ecf8427e', './service/core/SugarWebServiceImpl.php' => '5cacfba48983139749b098d4dbdf9647', './service/core/SugarWebService.php' => '4b77cfb754dcdebed48f0697b3c9f67a', @@ -1230,7 +1230,7 @@ $md5_string = array ( './pdf.php' => 'cc6788d5e02f50b1812ddb2ff3eb3703', './crossdomain.xml' => 'f35e9d412587c466e3f240f71fa12040', './modules/EAPM/EAPMEdit.js' => '5d9c244a0fde31b7a287f3d5294655f2', - './modules/EAPM/views/view.edit.php' => '7545cbbf67a11557a2e21481d46b0051', + './modules/EAPM/views/view.edit.php' => '15756095257d4123efda59d447bd8f52', './modules/EAPM/views/view.detail.php' => 'aae5c942090aae0a47451d0552da15a4', './modules/EAPM/vardefs.php' => '52ef1650cfb9a14662033502dfea3b57', './modules/EAPM/tpls/EditViewHeader.tpl' => 'f6ceb4157ff4001f30ce573ab9eb1988', @@ -1251,7 +1251,7 @@ $md5_string = array ( './modules/EAPM/EAPM.php' => '9eb7cedb8893fa5bd6eb7d981b054062', './modules/EAPM/CheckLogins.php' => 'db39640dbf662aea7f548788a6eddc92', './modules/vCals/vardefs.php' => '34085f31c8ae80e7ca93127271689e3e', - './modules/vCals/vCal.php' => '4f22a30fb70320ffb6a94bc79c020e6e', + './modules/vCals/vCal.php' => '47ef1f33681a3e03f01b0007f04d411e', './modules/vCals/field_arrays.php' => 'af767daaea141ca2bcf6daa70d9f4da2', './modules/vCals/Server.php' => 'b42524c5bb21266d5911fefe7fd690d2', './modules/vCals/HTTP_WebDAV_Server_vCal.php' => 'a3a618d76c2282378b62ab673e2d3933', @@ -1271,7 +1271,7 @@ $md5_string = array ( './modules/Users/views/view.wizard.php' => '835338a6bbf0fd03bd9827492cf19337', './modules/Users/views/view.list.php' => '8bc5a879644c94372a52d240cb7ecb03', './modules/Users/vardefs.php' => 'fb892f832936653d5321bedcfb653507', - './modules/Users/tpls/wizard.tpl' => '32bdfbbd3953c7841f9067ad4bbd0e08', + './modules/Users/tpls/wizard.tpl' => 'ee3dbe723e09fe6626a4c77084a8eedb', './modules/Users/reassignUserRecords.php' => 'cd6548bd2a6d23217f065a4223071983', './modules/Users/password_utils.php' => '614d9ea87a83d7c210bbfe585908b870', './modules/Users/metadata/subpanels/default.php' => '8ccd5a2436c48f152588bd59e6c6bcb0', @@ -1286,7 +1286,7 @@ $md5_string = array ( './modules/Users/metadata/reassignScriptMetadata.php' => 'c3b8c884116a57082ac615416176b294', './modules/Users/metadata/popupdefs.php' => '0372e0370745358af86d41aef6451901', './modules/Users/metadata/listviewdefs.php' => '95332a36771e76e5e2edd4cdcaf4f604', - './modules/Users/metadata/SearchFields.php' => '6bb90a4e4763513c406ee426d61b7e35', + './modules/Users/metadata/SearchFields.php' => '110f0aa503a041056fdfd3c20bbb18fc', './modules/Users/login.tpl' => '6de6b9ab4e1ddf56997fcfa66ca08ac2', './modules/Users/login.css' => '12d8483e8f6da8e1a95d54b1b50d0ec9', './modules/Users/language/en_us.lang.php' => '22a5e8386ce20959eb167d62aea2c2e0', @@ -1300,20 +1300,20 @@ $md5_string = array ( './modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml/xmlsec.php' => '0804d079f7dd5b88a810d3b2f13b54a1', './modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml/settings.php' => 'bf420ca408bb2c25ee04d6d24651306c', './modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml/response.php' => 'fe50684dde6449668ec090969855ed59', - './modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml/authrequest.php' => 'd7a4ffc11bed1fc0d0879199b4f43051', + './modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml/authrequest.php' => '96705df3ae615cdb2c75b2ca6bed6d05', './modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml.php' => '881ac527f24c2cd34b2565dcca59834a', './modules/Users/authentication/SAMLAuthenticate/index.php' => 'ef9efccd250f104fc518337da1df0ac3', - './modules/Users/authentication/SAMLAuthenticate/SAMLAuthenticateUser.php' => '1018414a0257107a46213d6b918e3e06', + './modules/Users/authentication/SAMLAuthenticate/SAMLAuthenticateUser.php' => '169dfa09e9528d378e2986a32d240473', './modules/Users/authentication/SAMLAuthenticate/SAMLAuthenticate.php' => 'e00db2472c9854080c4e2cd3cca7d226', './modules/Users/authentication/LDAPAuthenticate/LDAPConfigs/default.php' => 'e5c699efd1987e53c13b82f30bc1a13e', './modules/Users/authentication/LDAPAuthenticate/LDAPAuthenticateUser.php' => '3f5cd804d8fc3c150abf3a6321705259', './modules/Users/authentication/LDAPAuthenticate/LDAPAuthenticate.php' => '47e3c1b71adb5a4fa07e118c515c0454', - './modules/Users/authentication/EmailAuthenticate/EmailAuthenticateUser.php' => '9bd8dd09eb2287851c88a96753486262', + './modules/Users/authentication/EmailAuthenticate/EmailAuthenticateUser.php' => '1655ef872cdf2eb968f09bf76ea1a430', './modules/Users/authentication/EmailAuthenticate/EmailAuthenticate.php' => '7d7daae067c8d3ca623ce35d97633ecf', './modules/Users/authentication/AuthenticationController.php' => 'aaf8b1b02587242110c14e247fda5c1e', './modules/Users/UserSignatureEditView.html' => '892d745adb145d74bde512c71e30732c', './modules/Users/UserSignature.php' => '23592719467cc4e04be189c6fa2d30db', - './modules/Users/User.php' => '2ea74cca9333c2d56c500ff768a71077', + './modules/Users/User.php' => '2b71ffe04948e23f5b1558af3781e5f9', './modules/Users/SetTimezone.tpl' => 'f76851063b5129bcae41e7bef962636f', './modules/Users/SetTimezone.php' => '2fc96607e206886451fb5fe55f5526fd', './modules/Users/SaveTimezone.php' => 'c12559f852fb8d89a269814e808dadc5', @@ -1344,11 +1344,11 @@ $md5_string = array ( './modules/UserPreferences/index.php' => '993e1ee9cc1e95be441522e211e05429', './modules/UserPreferences/field_arrays.php' => 'd109e5473ca3fe844fcc8787c47b3561', './modules/UserPreferences/controller.php' => '6022bf66d58876257bf96523b5c01953', - './modules/UserPreferences/UserPreference.php' => '28ada4d1638677de694ec517fde20791', + './modules/UserPreferences/UserPreference.php' => 'fab4ba13ad4684781c516eb290463d45', './modules/UpgradeWizard/upgradeWizard.js' => '3ca941da793c30a8a4e913624071166e', './modules/UpgradeWizard/UpgradeRemoval.php' => 'f8f4d6102a0cdc17d48444372a6ed2d8', './modules/UpgradeWizard/uw_main.tpl' => '898039c49451aefbef0bfdece6c43f3b', - './modules/UpgradeWizard/uw_utils.php' => 'cd2a82e832e636cd3d713d2224240bdf', + './modules/UpgradeWizard/uw_utils.php' => '42f4f591431dc2dbc45762d01f7f6f66', './modules/UpgradeWizard/uw_emptyFunctions.php' => 'fc09ce5db1b1aacd792140ceadc9ccd2', './modules/UpgradeWizard/uw_files.php' => '0b16b9d7181ac363d19aa43b8c50090b', './modules/UpgradeWizard/upload.php' => 'dcc4f893338f9ad97e236b7b39bd28cc', @@ -1387,7 +1387,7 @@ $md5_string = array ( './modules/UpgradeWizard/SILENTUPGRADE.txt' => 'b47a5fe95eb81ed4b97d238283adc60d', './modules/UpgradeWizard/Menu.php' => '7b9b594383354f8d4900954d04536b18', './modules/Trackers/vardefs.php' => '0d727a4b31a2f34e133f9b6e32ea6a74', - './modules/Trackers/store/TrackerSessionsDatabaseStore.php' => '25ea950fa31c88f5af4c119b0d229c54', + './modules/Trackers/store/TrackerSessionsDatabaseStore.php' => '668b9260d84f0b120ce3bb101eae1e36', './modules/Trackers/store/TrackerQueriesDatabaseStore.php' => 'bdf296977265dcdaab4c2e2cc77828ef', './modules/Trackers/store/SugarLogStore.php' => 'a3feecc0fb2a31e58896971fceabe67c', './modules/Trackers/store/Store.php' => 'def825fa5e38cc20539adf0651b30d16', @@ -1403,32 +1403,33 @@ $md5_string = array ( './modules/Trackers/Trackable.php' => '625d62167dfeec77822ab640f23cc2f6', './modules/Trackers/Metric.php' => 'b2fe3a0da872c9b6b22c208f356dc6f7', './modules/Trackers/BreadCrumbStack.php' => '7358bcb903cd158938ddce8d855c748a', - './modules/Tasks/views/view.edit.php' => 'ec70c3c2704d619c7e1307f36aaf846e', - './modules/Tasks/vardefs.php' => '6f0cb409e3724a6ecdb1ab8e78502eb8', + './modules/Tasks/views/view.edit.php' => 'b3407d67d7c3cc4b835bd66b2e802c86', + './modules/Tasks/vardefs.php' => 'fc2ec749de6e290b7e6e882dcf1fdd83', './modules/Tasks/tpls/QuickCreate.tpl' => 'cc473787ebe1f4c7dfba17268bd2e1e1', + './modules/Tasks/metadata/subpaneldefs.php' => 'b55eba643229a90c021abfa15caccf37', './modules/Tasks/metadata/subpanels/default.php' => '6aa5aad5295409fc898bae85d5c501d0', './modules/Tasks/metadata/subpanels/ForHistory.php' => 'ae1db4f5b75711e1ed1668b1c726380b', './modules/Tasks/metadata/subpanels/ForEmails.php' => '576d3f43cd5359f4bc1b743011abc1ce', './modules/Tasks/metadata/subpanels/ForActivities.php' => '9012409e0a59eeb665e8d594cd27e933', './modules/Tasks/metadata/studio.php' => '657f0443c9c5b2d654ffd5f35b34be93', './modules/Tasks/metadata/searchdefs.php' => 'ebcea5484c63a735f7f9a6458c75e408', - './modules/Tasks/metadata/quickcreatedefs.php' => '2749bb316bbc8153b3f51a580cc62e0b', + './modules/Tasks/metadata/quickcreatedefs.php' => 'df8ebf40ecaf29bc81ff00ece66551a6', './modules/Tasks/metadata/listviewdefs.php' => '10cacb8f8331503da374e81ca9efd04b', './modules/Tasks/metadata/editviewdefs.php' => '92f8b359f450330d6543fa49145eeb77', './modules/Tasks/metadata/detailviewdefs.php' => '8d9dee7836946ab99b59c23f1f6eb4f2', './modules/Tasks/metadata/additionalDetails.php' => '7253182a0b7133b102ab653de7d067a5', './modules/Tasks/metadata/SearchFields.php' => 'fdff23f9fd818c206f89f3a5344ad7a4', - './modules/Tasks/language/en_us.lang.php' => 'a28ced9a527c5daba189232bb6d489bf', + './modules/Tasks/language/en_us.lang.php' => 'ec9bfc50f2edafae18884f490b1521bc', './modules/Tasks/field_arrays.php' => '9869facdbe32bc0551b9ec7429671848', './modules/Tasks/TasksQuickCreate.php' => '8df028b5cde8de961c6d94574f3c860e', - './modules/Tasks/Task.php' => 'e66450f9ca151b9be4e5cfed61a7ea19', + './modules/Tasks/Task.php' => '2d387c6beb66bd72d55a2c520ba27338', './modules/Tasks/Save.php' => '87926f8aefc476572a32c4af581298af', './modules/Tasks/MyTasks.php' => 'b8da620a87eee61e0b6b50421eb9590b', './modules/Tasks/MyTasks.html' => '58c3695222bf9a745f2b2f4f5d52ae90', './modules/Tasks/Menu.php' => '3060a3ed23131a88e1fb628e1797e901', './modules/Tasks/Dashlets/MyTasksDashlet/MyTasksDashlet.php' => '03df49cfe18a8bedb7e751204ac1f33c', './modules/Tasks/Dashlets/MyTasksDashlet/MyTasksDashlet.meta.php' => 'aee8b2e51d869bdc6e9ec4bded092817', - './modules/Tasks/Dashlets/MyTasksDashlet/MyTasksDashlet.data.php' => '584b9d697e36804740c9c51806bac305', + './modules/Tasks/Dashlets/MyTasksDashlet/MyTasksDashlet.data.php' => '5e5a4990c4eecefeea7e306a56f760ca', './modules/TableDictionary.php' => 'c6e25d006ba573da551c50da41810f2f', './modules/SugarFeed/views/view.adminsettings.php' => '18adcc9cbf9aa005a8e8b77526e2d4cc', './modules/SugarFeed/action_view_map.php' => '8171b3d43e34d470cc5a0cdfb8155ad1', @@ -1453,7 +1454,7 @@ $md5_string = array ( './modules/SugarFeed/Forms.php' => 'd41d8cd98f00b204e9800998ecf8427e', './modules/SugarFeed/Dashlets/SugarFeedDashlet/UserPostForm.tpl' => '2c55e30b66f70ca146eec8a9f4506621', './modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedScript.tpl' => '95aef9663dc3396435295619ceb7ba43', - './modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php' => '805d47dbe270c64b3a11bd89c043597d', + './modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php' => '42f88163229b5c61f6f366392994bb59', './modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.meta.php' => 'c318d9d7b4d1b544dae1b8b1cd1bab8a', './modules/SugarFeed/Dashlets/SugarFeedDashlet/Options.tpl' => '6d29b70f748200a3f7aa9b86dbddd14f', './modules/SugarFeed/SugarFeed.php' => '74c08d6b75e5be2bd36bbf63827f00bc', @@ -1466,7 +1467,7 @@ $md5_string = array ( './modules/Studio/wizards/StudioWizard.php' => '35b096e82adffc3f73d81ae407ff968b', './modules/Studio/wizards/EditDropDownWizard.php' => '47997b18f2d0eed6613e4e8ee3bec245', './modules/Studio/wizard.php' => '1eb1fe073c5a846796636d94ce0a246c', - './modules/Studio/parsers/StudioParser.php' => 'cf521d0476cbde82a06188615d61edac', + './modules/Studio/parsers/StudioParser.php' => '140b8ac9f5a6822166ed53096aae21a8', './modules/Studio/language/en_us.lang.php' => '8481dff368a6bf290f374b9106a7928c', './modules/Studio/language/en_us.Portal.html' => '01a47f295a288ac42c5d346253609e15', './modules/Studio/config.php' => '3dfa02691501162caf33bb620c4134ad', @@ -1476,14 +1477,14 @@ $md5_string = array ( './modules/Studio/TabGroups.php' => '028fd651b7e45ce986fb653eeff5cd88', './modules/Studio/SaveTabs.php' => 'f70c1415779c3d9745151aedb3b63c72', './modules/Studio/Forms.php' => '643a41668f378fdfcf340eacff957880', - './modules/Studio/DropDowns/EditView.tpl' => 'ddcdaab3f4908ef226f9fb914b06536d', + './modules/Studio/DropDowns/EditView.tpl' => 'cba2195e86a4f1480dfbb1c189c58c3d', './modules/Studio/DropDowns/EditView.php' => 'cfa36bf9fb56414ee9706fe4be586ce2', - './modules/Studio/DropDowns/DropDownHelper.php' => '9ffefd795d77aa2d4e8651ac0998aa13', + './modules/Studio/DropDowns/DropDownHelper.php' => 'a57838b57c14a159939b0cac2bfdf41f', './modules/SchedulersJobs/vardefs.php' => 'a01a32929146b1fcffc1f344cac76b65', './modules/SchedulersJobs/metadata/subpanels/default.php' => 'f3cf4560886a3feb95495607613f83e4', './modules/SchedulersJobs/language/en_us.lang.php' => 'e2ad9c5aa5d9411f633472ad5a833825', './modules/SchedulersJobs/field_arrays.php' => 'f0decfc7674132c67f7bc2679d2fa798', - './modules/SchedulersJobs/SchedulersJob.php' => '3be95324760e89778e14df802dd414a7', + './modules/SchedulersJobs/SchedulersJob.php' => '856369cc8b873f74325d5300797aad3d', './modules/Schedulers/vardefs.php' => 'b22dc28f445bd76192a98b92eb5a1c9f', './modules/Schedulers/metadata/subpanels/default.php' => '0fa97427b4326367097ceca6bf17071f', './modules/Schedulers/metadata/subpaneldefs.php' => '11cf00d568cc8990f83b9c72282571ee', @@ -1492,7 +1493,7 @@ $md5_string = array ( './modules/Schedulers/field_arrays.php' => 'd4dd0e9a487e50cc1e3937edf28d4851', './modules/Schedulers/_AddJobsHere.php' => 'deb98781e316c0883b0e1cc6813cd5e3', './modules/Schedulers/SchedulerDaemon.php' => '0fe85dd3ab4b9dc4132e0ae782ebce90', - './modules/Schedulers/Scheduler.php' => '3a49be1be9cf2f1fb9a09045b53593c8', + './modules/Schedulers/Scheduler.php' => '4dd4935781983afef13aae5b749ffb29', './modules/Schedulers/Scheduled.php' => 'a4f070fb20dde6617eb49fceefbb195f', './modules/Schedulers/Scheduled.html' => '998aaba0c83416168b78a2cc0124d678', './modules/Schedulers/Save.php' => '9ae861c83f40d3ac45083f796b2ac97c', @@ -1559,7 +1560,7 @@ $md5_string = array ( './modules/Relationships/RelationshipHandler.php' => 'c410a6e0b5b8461854911163c68197ac', './modules/Relationships/Relationship.php' => '388a05505b328fd9999be88aae2a11d2', './modules/Prospects/views/view.list.php' => '68d9be3fca96a61f9399a076f68477c4', - './modules/Prospects/views/view.detail.php' => '617168ff9738bfaa7982f3f279b5916c', + './modules/Prospects/views/view.detail.php' => 'ae26b90ab79aa7eb11ffafd1b08c4311', './modules/Prospects/vardefs.php' => 'bd3c7deea05dbe26f1667e2030a5b5db', './modules/Prospects/tpls/DetailViewHeader.tpl' => 'ac21eaebc7f6c9f81636f9e933c19e89', './modules/Prospects/metadata/subpanels/default.php' => '5a2c8d4f0f511e8fccf8af973d9c32e0', @@ -1596,9 +1597,9 @@ $md5_string = array ( './modules/ProspectLists/TargetListUpdate.php' => '20eae2a794576eef4e6f42084945d990', './modules/ProspectLists/SubPanelView.php' => 'cdeb64078656d4c1311359bd98227dde', './modules/ProspectLists/SubPanelView.html' => '0f85fa011831af642f37e9229361e8c1', - './modules/ProspectLists/Save.php' => '6a5af39415534fb72207662a54f8e591', + './modules/ProspectLists/Save.php' => 'bc35b9e5c86a6c10ece3e46baec6d649', './modules/ProspectLists/ProspectListFormBase.php' => 'c233f6c49c1ab9f5108eb9d2ebb4cea3', - './modules/ProspectLists/ProspectList.php' => '32ea7fb83a6a11ce86cb0c3b2815fa6b', + './modules/ProspectLists/ProspectList.php' => 'ce89e40112f2551c13b4ae0ea5471372', './modules/ProspectLists/Popup_picker.html' => '19f9f5f32facaf5e8919535e6d84a7d5', './modules/ProspectLists/Menu.php' => '8fec51700001baa9b7c8c774c69186c1', './modules/ProspectLists/Forms.php' => '9b5c7ac088edd7441f51b9b0bb41a41f', @@ -1606,9 +1607,7 @@ $md5_string = array ( './modules/ProspectLists/Duplicate.php' => '2b274f8567f9699b49c702e490ba54ea', './modules/ProspectLists/Delete.php' => '1f2697eaad06aabc4f7090442266a9b8', './modules/ProjectTask/ProjectTask.js' => '38dcec6935963b0a4a6e41068e2f25c6', - './modules/ProjectTask/Popup.php' => '0f2d23669aeb979a3b8c109bea942fe9', './modules/ProjectTask/views/view.list.php' => '900cee4d5274c9c79b4ffddbc42144fe', - './modules/ProjectTask/Popup.html' => 'ec4956dfe4adc6be2ede8cba165ffb66', './modules/ProjectTask/tpls/QuickCreate.tpl' => 'f48d8bfc531c4019d545bc7f239e6fbf', './modules/ProjectTask/metadata/subpanels/default.php' => '9f31af58ab7169184e5b689aed416acc', './modules/ProjectTask/metadata/subpaneldefs.php' => 'ed31b5f838b6ab8135ac1f3916a663fd', @@ -1627,8 +1626,8 @@ $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/vardefs.php' => '5b4cf6dad9a98cc9ca0d125f9a72fcaf', + './modules/ProjectTask/ProjectTask.php' => '5330b1754f27ff2013e5d11a98e41dc3', './modules/ProjectTask/Popup_picker.html' => '361f855dacedadd41f50b2305ef63ef9', './modules/ProjectTask/MyProjectTasks.php' => 'beb50630e8c111fc22db6c99bc24e7cb', './modules/ProjectTask/MyProjectTasks.html' => 'ffd4e103720ddbbc0841c63fdc16128f', @@ -1639,10 +1638,10 @@ $md5_string = array ( './modules/ProjectTask/Dashlets/MyProjectTaskDashlet/MyProjectTaskDashlet.meta.php' => '2b29bb6785ded41dd2363a70570d80fb', './modules/ProjectTask/Dashlets/MyProjectTaskDashlet/MyProjectTaskDashlet.data.php' => 'b3f7f25834cc1a15c35a730c36adfc2e', './modules/Project/Project.js' => 'a6d204b0afbb113e4ab19448204aed07', - './modules/Project/views/view.templatesedit.php' => '751e5952518fe4e3dc24571aad2f4278', + './modules/Project/views/view.templatesedit.php' => '457c84c81d4318cee695780410403a05', './modules/Project/views/view.templatesdetail.php' => '311eaf39518ba87ba447feebe0d93dea', './modules/Project/views/view.list.php' => '243927d29b3b1ba6f4d60412af94e4e2', - './modules/Project/views/view.edit.php' => '0affe1382e18473267b9363490921d84', + './modules/Project/views/view.edit.php' => 'd9c6df225012077df31dce45beb67a69', './modules/Project/views/view.detail.php' => 'c70ad353d784da094a324ff451235c3c', './modules/Project/vardefs.php' => '89960abf5715c3f9e5f50d9a50d8881d', './modules/Project/tpls/QuickCreate.tpl' => '9bd0ad2db9c8b577fba7888d8ced2aba', @@ -1660,20 +1659,21 @@ $md5_string = array ( './modules/Project/metadata/additionalDetails.php' => '4da1e430fcca6ec985567aac8eb695e6', './modules/Project/metadata/SearchFields.php' => 'ca8b58e6c4afd5d254e1fd7110202786', './modules/Project/language/en_us.lang.php' => '4ee764cdd17fdf9de8860ea0ca0bb00c', + './modules/Project/gantt.css' => 'ec0de246bbacdb5b8831ae45f1160f84', './modules/Project/field_arrays.php' => 'd8e855b0d74739d70979073507e6be70', './modules/Project/action_view_map.php' => 'a7a8e30d48d654d43b19c11a883339dc', './modules/Project/SubPanelView.php' => '634feb071966461b4db22fc2bd058386', './modules/Project/SubPanelView.html' => '0d7f5812ed91a6f88179c6bc641206d9', './modules/Project/Save.php' => 'e78d6d5e757d697c3d1c25efa2e131e2', './modules/Project/ProjectQuickCreate.php' => 'b2d231ec62615a2925986988c09cec41', - './modules/Project/Project.php' => 'b5ccb918e3ebe0a130a16111650606b6', + './modules/Project/Project.php' => '0e6e8db056b5ca52351b8e8478d35b6a', './modules/Project/Menu.php' => '2ee32f39c59cc7d0192630c911dc2e68', './modules/Project/Delete.php' => 'a8b8f6de83039d776adee0d1972098e3', './modules/OptimisticLock/language/en_us.lang.php' => '02febbc1ec08289e3a10535fe4d486a1', './modules/OptimisticLock/Menu.php' => '107c6cd9a5d0ccb8f5daecc0d8d31e84', './modules/OptimisticLock/LockResolve.php' => '550a3b7e15aba1d8171d8dc34e3806b6', './modules/OptimisticLock/Forms.php' => '2a29f4ec451b7e19e8212eac749fd709', - './modules/Opportunities/views/view.edit.php' => '4c8dfcabf23872eac215baad9d8dfa8a', + './modules/Opportunities/views/view.edit.php' => 'e992ed0d268cf0c4e20fa8c1e1cb02e7', './modules/Opportunities/views/view.detail.php' => '1ed7886c066a84021d61e26290acc502', './modules/Opportunities/vardefs.php' => 'd8e5afe13fbbe921dda33706536f9df3', './modules/Opportunities/tpls/QuickCreate.tpl' => '09a5f1c1af35584137b310e1c1dfc7b7', @@ -1718,16 +1718,17 @@ $md5_string = array ( './modules/Notes/Dashlets/MyNotesDashlet/MyNotesDashlet.php' => '9a3ac349a7dd37b5bf57d7ed27c5902a', './modules/Notes/Dashlets/MyNotesDashlet/MyNotesDashlet.meta.php' => '47901f5e7393bfe5d8a4e5fb992850d9', './modules/Notes/Dashlets/MyNotesDashlet/MyNotesDashlet.data.php' => 'f7b4f295a3e38dfa599f57dff0299fbd', - './modules/Notes/vardefs.php' => '3f6c4c2dd3a437bf1e0f9676ea45941b', + './modules/Notes/vardefs.php' => 'cab6df212bfef2b7576355d5206a3cc7', './modules/Notes/tpls/QuickCreate.tpl' => '882303cea97bf47f4c2438a3f1cdc340', './modules/Notes/tpls/EditViewHeader.tpl' => 'e4453755f80418d6058bb0fff135ef45', + './modules/Notes/metadata/subpanels/ForTasks.php' => '5adc05c6f569c423443c642ebf0b635b', './modules/Notes/metadata/subpanels/ForMeetings.php' => '5adc05c6f569c423443c642ebf0b635b', './modules/Notes/metadata/subpanels/ForCalls.php' => '5adc05c6f569c423443c642ebf0b635b', './modules/Notes/metadata/subpanels/default.php' => '95de5ea759961356b3221bd39abf977e', './modules/Notes/metadata/subpanels/ForHistory.php' => 'dad1addf6074a5e893cb6e425fbc31c4', './modules/Notes/metadata/studio.php' => '97fb182348172339a2e6c240dcf1e604', './modules/Notes/metadata/searchdefs.php' => '261de884a79200bd98731c5f540eca03', - './modules/Notes/metadata/quickcreatedefs.php' => '582fd06449e85aa8cda3f0c9a13536f5', + './modules/Notes/metadata/quickcreatedefs.php' => 'cb7f0142cb071cf3e89cf301b43418a4', './modules/Notes/metadata/listviewdefs.php' => '34550d6fffdc0f5767404e1583b006d3', './modules/Notes/metadata/editviewdefs.php' => '4199826de1152224e850269887796e35', './modules/Notes/metadata/detailviewdefs.php' => 'c9991544e69bc5369b9771a432354a4c', @@ -1755,19 +1756,19 @@ $md5_string = array ( './modules/ModuleBuilder/views/view.property.php' => 'ada60407ef07a2779f954f9b7837f591', './modules/ModuleBuilder/views/view.popupview.php' => '3acdfeeaa6ec776168cea15cb46425a2', './modules/ModuleBuilder/views/view.package.php' => '94886f989c71b501e16733aa6f635ab7', - './modules/ModuleBuilder/views/view.modulelabels.php' => '946ac2cafcfcac5d20265ffab8f0805a', + './modules/ModuleBuilder/views/view.modulelabels.php' => '2e1ffb46d80e3b98bd8c79cbf367cda4', './modules/ModuleBuilder/views/view.modulefields.php' => '13771ba7d654c9e7ad9c38e85235a562', - './modules/ModuleBuilder/views/view.modulefield.php' => '7b5961de975c17b6bb296660a490f47e', + './modules/ModuleBuilder/views/view.modulefield.php' => '906ec198e407249c16fe086ac02a96d1', './modules/ModuleBuilder/views/view.module.php' => 'e87f77f4bb936006ad94103cd0f1c453', './modules/ModuleBuilder/views/view.main.php' => '88123a5ca806fadac53f609b09959e25', - './modules/ModuleBuilder/views/view.listview.php' => 'dc91490cc2381300c65ec6cc6f45e2b6', - './modules/ModuleBuilder/views/view.layoutview.php' => '8924b7ed186d75872c6cf061bc5e2fe1', + './modules/ModuleBuilder/views/view.listview.php' => '0d70872f0ffe52ed395017e5bf059214', + './modules/ModuleBuilder/views/view.layoutview.php' => '53ad225344c66683791aa20d3550c9eb', './modules/ModuleBuilder/views/view.labels.php' => 'e528ce648ca02258f6aa71be1e3f1337', './modules/ModuleBuilder/views/view.home.php' => '37dd89b67de55a72b8426b9bd440c3c7', './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' => 'f908c135780a672a41c3de88ba44a463', + './modules/ModuleBuilder/views/view.dropdown.php' => '4c8666bc0c4890d26d8d09cc1d4bdb7d', './modules/ModuleBuilder/views/view.displaydeployresult.php' => '5ff19a90f22526f716b3d04786866df3', './modules/ModuleBuilder/views/view.displaydeploy.php' => '8332a24883139fea55d72d31946f06ff', './modules/ModuleBuilder/views/view.deletepackage.php' => 'b7f1f95e796e255ed58da1721d6366ff', @@ -1780,7 +1781,7 @@ $md5_string = array ( './modules/ModuleBuilder/tpls/resetModule.tpl' => '61597ccd042c1e6ff988fc904e6519ed', './modules/ModuleBuilder/tpls/main.tpl' => '8862d14b4c6989a99013640a9a1f4c02', './modules/ModuleBuilder/tpls/listView.tpl' => '7ca848e3ae581e3c293883dbec267751', - './modules/ModuleBuilder/tpls/layoutView.tpl' => '7f4500a6dcc10110b1d79dca9255ca1b', + './modules/ModuleBuilder/tpls/layoutView.tpl' => '2d9ce0eb871c8ecd7665a3c3580db17b', './modules/ModuleBuilder/tpls/labels.tpl' => 'd5108823a1248fbf1e52c770f00e332e', './modules/ModuleBuilder/tpls/index.tpl' => '74b88786aaa5254e0ef3ef98ec2a727d', './modules/ModuleBuilder/tpls/includes.tpl' => '308f7703d505391d03d58b592c919152', @@ -1801,7 +1802,7 @@ $md5_string = array ( './modules/ModuleBuilder/tpls/MBModule/fields.tpl' => '621f333eda513a6eecc82683318fcfb5', './modules/ModuleBuilder/tpls/MBModule/field.tpl' => 'a4c3c6dd716e828df4e7a4c0faa7528f', './modules/ModuleBuilder/tpls/MBModule/dropdowns.tpl' => '85df013133007c4ba1c9b729d5fedaa8', - './modules/ModuleBuilder/tpls/MBModule/dropdown.tpl' => 'ab700d554f3cc79ad5a70365f4ec26bb', + './modules/ModuleBuilder/tpls/MBModule/dropdown.tpl' => 'e5c0b405d76c53d937a53208e28a79be', './modules/ModuleBuilder/tpls/MBModule/dropdown.css' => '81912532da99fd1480fd72e7326bef6a', './modules/ModuleBuilder/tpls/MBModule/Studio.tpl' => '443a93ba34b0eaa946d342e618c9e6e7', './modules/ModuleBuilder/tpls/MBModule/Menu.tpl' => 'fd135ae7421be28ee6bc26501605c331', @@ -1812,15 +1813,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' => '5306a647fd32a766d36bd6cf634c063f', + './modules/ModuleBuilder/parsers/views/SubpanelMetaDataParser.php' => 'a658fb64f32eae269f0aeec0cc271f22', './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' => 'b26b1bea6e30e122ab919c9ed1e48ea9', + './modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php' => 'c49e5a25670037e3e8b8d081df924ee4', './modules/ModuleBuilder/parsers/views/HistoryInterface.php' => 'c1583f28fddb4c33c920f92a20e2c935', './modules/ModuleBuilder/parsers/views/History.php' => 'cb762b148ad023d6ec3ba6440ea9df5e', - './modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php' => 'be7da1b4e7452c73003a7e2f9c9c0df5', + './modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php' => 'dde15ca691e9b28a988a3b47dd0e37c3', './modules/ModuleBuilder/parsers/views/DeployedSubpanelImplementation.php' => '24a957dc22e693e21dd18541e3584807', './modules/ModuleBuilder/parsers/views/DeployedMetaDataImplementation.php' => 'f038a0d67cfb341d627e5a1c9e8607c3', './modules/ModuleBuilder/parsers/views/DashletMetaDataParser.php' => '8fca44b08dc035a1d23463b26344df72', @@ -1834,14 +1835,14 @@ $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' => 'e54641d4126d374f494a6f7f76c2176b', + './modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php' => 'd478536f9d79c1e1cb16c558c23ff98e', './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.modifylistview.php' => 'cb76fbefd131ce1e5d71c19d565df204', './modules/ModuleBuilder/parsers/parser.modifylayoutview.php' => 'd5383c342e65fcde7a628c339d0d6502', './modules/ModuleBuilder/parsers/parser.label.php' => '9985c9d1016f9d16e1cb1a3b81b3ccc4', - './modules/ModuleBuilder/parsers/parser.dropdown.php' => '2c15e411a528ae234414bc49f70d5277', + './modules/ModuleBuilder/parsers/parser.dropdown.php' => 'b8daa4da875806fb37456c17c4d42840', './modules/ModuleBuilder/parsers/constants.php' => '0d876db28d336cabe3c44a06b8a8f780', './modules/ModuleBuilder/parsers/StandardField.php' => 'de8b8168336744386faa4fcd8eb3a8fa', './modules/ModuleBuilder/parsers/ParserFactory.php' => 'f0fad2af770157777e4088e174233de0', @@ -1855,9 +1856,9 @@ $md5_string = array ( './modules/ModuleBuilder/javascript/studio2FieldDD.js' => 'd776d412e631abf40c5b9227989669a7', './modules/ModuleBuilder/javascript/studio2.js' => 'a3d19505c924a863ab7656b50d9bb466', './modules/ModuleBuilder/javascript/SimpleList.js' => '2e347d21f35b115b36469b3cda00d930', - './modules/ModuleBuilder/javascript/ModuleBuilder.js' => '2edabc112129c6a57b8f2a550ab847c5', + './modules/ModuleBuilder/javascript/ModuleBuilder.js' => 'e877187d8e2151829c8cd90eca514532', './modules/ModuleBuilder/javascript/JSTransaction.js' => '2f20a4a72eaa8cbdf3053e24c5772ee5', - './modules/ModuleBuilder/controller.php' => 'eb76b36d095cc5b801991769b0036f42', + './modules/ModuleBuilder/controller.php' => '4075b2ed603582fc10b049773a1cac63', './modules/ModuleBuilder/action_view_map.php' => 'fd1e0b87f5d325f06b2b743afa057999', './modules/ModuleBuilder/Module/StudioTree.php' => 'e29fed9b1f81766bda975d938eecd3ec', './modules/ModuleBuilder/Module/StudioModuleFactory.php' => '5860a0e60d39a69303a39df4ea188336', @@ -1868,12 +1869,12 @@ $md5_string = array ( './modules/ModuleBuilder/Module/DropDownBrowser.php' => '7cd759094f2018b86eb030b2f6286516', './modules/ModuleBuilder/MB/header.php' => 'a24068f5c6bb44f9b000ecfac9dbd21c', './modules/ModuleBuilder/MB/ModuleBuilder.php' => '39bdea636bbf913d8ade851a4a070939', - './modules/ModuleBuilder/MB/MBVardefs.php' => '90db2891009c6ea4e9a293cc9115e94c', + './modules/ModuleBuilder/MB/MBVardefs.php' => 'ee248dce677f0d9c85ae5f98e9bfb0e6', './modules/ModuleBuilder/MB/MBRelationship.php' => 'bc5653efb1243f8c7f37ab28a6c1cfa0', './modules/ModuleBuilder/MB/MBPackageTree.php' => '4f7961d0ec0fb7aeb5fed050d88af8a3', - './modules/ModuleBuilder/MB/MBPackage.php' => '7c24d275756cb113f3e234ff9e9ecbf0', - './modules/ModuleBuilder/MB/MBModule.php' => '7f883828316cb5f5f9078d05c057e649', - './modules/ModuleBuilder/MB/MBLanguage.php' => 'a202b7685d69a11e650c3f4e9aa863b6', + './modules/ModuleBuilder/MB/MBPackage.php' => '31926b307f13743bde453ad07d702a36', + './modules/ModuleBuilder/MB/MBModule.php' => '9da7ac59238d8a59e5f8dca2dea4a10c', + './modules/ModuleBuilder/MB/MBLanguage.php' => 'f3fd6415b7a1c5cd56187ad8ed5fd813', './modules/ModuleBuilder/MB/MBField.php' => '2e3561d71f00c42e88f323c0fff72a4b', './modules/ModuleBuilder/MB/AjaxCompose.php' => 'ca3deaa4d15341b882af6cc33f6cc962', './modules/ModuleBuilder/Forms.php' => '2a94c4a8f697121796f53413911131f6', @@ -1884,21 +1885,21 @@ $md5_string = array ( './modules/MergeRecords/controller.php' => '78dfc9325902e3f60ff86fd4560c84df', './modules/MergeRecords/Step3.php' => '7d52628fdc63c97b9375c86ff6d92d79', './modules/MergeRecords/Step3.html' => '76e9b2e18245ba1e7d36b966f11d52b4', - './modules/MergeRecords/Step2.php' => '4eceb63578ecfd75370678aa66904a78', + './modules/MergeRecords/Step2.php' => '753be79ba9046cabc0006dc1e291c507', './modules/MergeRecords/Step2.html' => '3aaf16054c16cd602b5307556ef4bba4', './modules/MergeRecords/Step1.php' => '8af484acb42f60d45c49e536975133dd', './modules/MergeRecords/Step1.html' => 'f03881270ee14fbcded722a641b05c86', './modules/MergeRecords/SearchForm.html' => '939e7b5a111ac0f99950f0ca1c019b64', './modules/MergeRecords/SaveMerge.php' => '88236bdafc6373b8d0a8602e149441c2', - './modules/MergeRecords/MergeRecord.php' => '64858899ce7a7cf98f387caa3c26ccd3', + './modules/MergeRecords/MergeRecord.php' => '0ed1f373514d78b619f6698a55edb950', './modules/MergeRecords/MergeField.html' => 'a13ad4e3f3ab1e65050987e622859f30', './modules/MergeRecords/Menu.php' => '281930dcf94a918eb64f8435ad77f248', './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', - './modules/Meetings/views/view.edit.php' => 'faea03473e9ff50ed5dbf19d2b4edee9', - './modules/Meetings/vardefs.php' => 'b6e5a9926f5abb53fdeb6b850b9a44e6', + './modules/Meetings/views/view.edit.php' => '48fdb56b365e914a085aaaed7e9bf4d1', + './modules/Meetings/vardefs.php' => '207b75a5ef4fe44cfd92afccf0fbf012', './modules/Meetings/tpls/extMeetingNotInvited.tpl' => '5d05c208909ebfb8b425c4a9a57265bd', './modules/Meetings/tpls/extMeetingNoStart.tpl' => '01740b23224ca1e36be97c81091acc53', './modules/Meetings/tpls/header.tpl' => 'e443fd4d94fddde4cab75fc0ca33c863', @@ -1912,7 +1913,7 @@ $md5_string = array ( './modules/Meetings/metadata/searchdefs.php' => '2bc913f3f67b7fa29cdab7e2623de325', './modules/Meetings/metadata/quickcreatedefs.php' => 'a88880e2e8f010ce030a947aaa33db30', './modules/Meetings/metadata/listviewdefs.php' => '5973b2f25ca38dba5645037276ee0b9d', - './modules/Meetings/metadata/editviewdefs.php' => 'a44a2094c78b2d9c05538ca37e441766', + './modules/Meetings/metadata/editviewdefs.php' => '5c3aa33bba534dc21482704fc29de38c', './modules/Meetings/metadata/detailviewdefs.php' => '7b516d8760f5116e112601c34b6a0e66', './modules/Meetings/metadata/additionalDetails.php' => 'b2b466a61eef5f8369d9587631399b3c', './modules/Meetings/metadata/SearchFields.php' => '8fb6299f50de078c3578938a29e6fc57', @@ -1925,9 +1926,9 @@ $md5_string = array ( './modules/Meetings/MeetingsQuickCreate.php' => '818e55e261c5e74cb385f835311944fa', './modules/Meetings/MeetingFormBase.php' => '3d15b0c970848917b794542f6b460aa6', './modules/Meetings/Meeting.php' => '390b291d07b1009d49f883ad2029bb03', - './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php' => 'b8aaf79cc25c1230c20e1bbfbcb656d1', + './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php' => '6b020716c6c45705abf481f65ef7328b', './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.meta.php' => 'e47f5ffe63b5a0fa7d7de49e41602428', - './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.data.php' => 'da144e46c3f9a91f6bf149ebdf644e94', + './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.data.php' => '93411ffd890d557e5f97ed68b946f097', './modules/MailMerge/modules_array.php' => 'af9991bc9b3ff44c85e1b3f7b58999b0', './modules/MailMerge/language/en_us.lang.php' => '3b63d532d3c99f4a1335cd336b7601d6', './modules/MailMerge/index.php' => '21076a939d7bf08f11baf16d6d625a9a', @@ -1938,8 +1939,8 @@ $md5_string = array ( './modules/MailMerge/Step4.html' => 'dd4b428cd3af6e6075af67072d762913', './modules/MailMerge/Step3.php' => 'bfbc79b0927f0b615963d1118b96ddba', './modules/MailMerge/Step3.html' => '24d26c3c8eb46ded0f2adad4da479fea', - './modules/MailMerge/Step2.php' => '7b1174b7a6c4c4ddc4ce71b0e2520091', - './modules/MailMerge/Step2.html' => '9dc2da5d59037c09d9ca4c40ca624dd4', + './modules/MailMerge/Step2.php' => '6eff88823954aa10701d0c8526005868', + './modules/MailMerge/Step2.html' => '37f07d70fb1a00a8ccb77eb526b75458', './modules/MailMerge/Step1.php' => 'f6ddfe7ec04be708a4b6251c25b1bd95', './modules/MailMerge/Step1.html' => 'e47775cad8089fafc1ff8102632c9ab8', './modules/MailMerge/Save.php' => '6d3ccf9c3fc315c2001314975d9718fb', @@ -1951,13 +1952,13 @@ $md5_string = array ( './modules/MailMerge/DetailView.php' => '9657298f898e97dbc221c34f861a0f98', './modules/Leads/Lead.js' => '63dad96eb6c7c57fbb34dda409f790ce', './modules/Leads/views/view.list.php' => 'd716f0c0d6e4bb6118c811c0bbcd903c', - './modules/Leads/views/view.convertlead.php' => '54bb3e560ccb555186e7aa13aee3c49c', + './modules/Leads/views/view.convertlead.php' => '0789be96d83f8248ea8ae4cb170ba9b6', './modules/Leads/vardefs.php' => '24b064d465c8e10f58f37c73655ca718', './modules/Leads/tpls/QuickCreate.tpl' => 'f68b199a7a4b23111fa98042b0670859', './modules/Leads/tpls/DetailViewHeader.tpl' => 'ff0301b5f7beef3671e1174a249048ba', './modules/Leads/tpls/ConvertLeadHeader.tpl' => 'c85ad2735645cd40842d5b77a26ad997', './modules/Leads/tpls/ConvertLeadFooter.tpl' => '6af977d010658f42fcbe03615220d3be', - './modules/Leads/tpls/ConvertLead.tpl' => '869e2a491d61cf9e29e21e04002245a4', + './modules/Leads/tpls/ConvertLead.tpl' => 'ed8ab01ab8c4dee1d6a30c2494ab93bd', './modules/Leads/metadata/subpanels/default.php' => 'd10b56acc074aefcad6ee5fb27eb436d', './modules/Leads/metadata/subpanels/ForMeetings.php' => '7c73f4dc11531df7da6e6df7cbc24b20', './modules/Leads/metadata/subpanels/ForEmails.php' => '1b38f45c8243ce013ee7b03560d4a3b6', @@ -1986,7 +1987,7 @@ $md5_string = array ( './modules/Leads/MyLeads.html' => '4405e61344262cb85243c148d748a465', './modules/Leads/Menu.php' => '80008b8d1fbe777e77848179b9b3dea0', './modules/Leads/LeadsQuickCreate.php' => '2483d2f18680dba279b25a833f720758', - './modules/Leads/LeadFormBase.php' => 'cfe9c53f698795fe2292db848f5e4c96', + './modules/Leads/LeadFormBase.php' => 'ecf99a2c2298b71aec2c7d0ae674f650', './modules/Leads/Lead.php' => '35ad479b2aabdf8596be04c1f23cb9e1', './modules/Leads/Dashlets/MyLeadsDashlet/MyLeadsDashlet.php' => '06ad52c30e91928daa3f149de30465db', './modules/Leads/Dashlets/MyLeadsDashlet/MyLeadsDashlet.meta.php' => '9349a94a67dea2c068a21fd2b086b5b3', @@ -2013,7 +2014,7 @@ $md5_string = array ( './modules/InboundEmail/ListView.php' => 'c610da376126d3bb44f7dc780a6d13d7', './modules/InboundEmail/ListView.html' => '7e5d8d426d0a6833fe5caa3fb3ccc471', './modules/InboundEmail/InboundEmailTest.php' => '702038f3171c1bb612d4fff7cf0f765e', - './modules/InboundEmail/InboundEmail.php' => 'a483b157dc3b54bb407faf510d9a0868', + './modules/InboundEmail/InboundEmail.php' => '0f2e98db1f8f4388111f735b93326f2e', './modules/InboundEmail/EditView.php' => 'aef594532aa6ab776c4b3cc30b20a04d', './modules/InboundEmail/EditView.html' => '7252f37c5372a5dd9989c212728cca98', './modules/InboundEmail/EditGroupFolder.php' => '6c6ba0d835901e8e9a8e87056d0479b6', @@ -2022,17 +2023,17 @@ $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' => '28f9c6e10e08dbd858e9e8c092f26326', + './modules/Import/views/view.step4.php' => 'b14ce839e39d3e834f2775356cfc6c22', './modules/Import/views/view.step3.php' => '37847270b3445e2254096b3e4c9385fb', './modules/Import/views/view.step2.php' => '1836dd43ff036bf2396110df4a50eac2', - './modules/Import/views/view.step1.php' => '997520f56e4ce49a625771a5d9a40ba2', + './modules/Import/views/view.step1.php' => '5b07a3d7fa23553973e1ad802b04b667', './modules/Import/views/view.last.php' => 'a1c30d3cf0c21343cc03c856a8d2911a', './modules/Import/views/view.error.php' => '4a9ef123c90511298bac72b55405f2f1', './modules/Import/vardefs.php' => 'f091139c8e775f0208605ed6a832463b', './modules/Import/tpls/undo.tpl' => '65cd1d29e39dc8487d9e558623461843', './modules/Import/tpls/step3.tpl' => 'f776acfe9d35a87237985bb1be16d292', './modules/Import/tpls/step2.tpl' => 'f7db6057913e3fcd8405e53677d16430', - './modules/Import/tpls/step1.tpl' => '7e87b09f3d5c3f13369864b38822541d', + './modules/Import/tpls/step1.tpl' => 'b435795f4726a12a3076f47feaff3b92', './modules/Import/tpls/last.tpl' => '84bb779c391262ad2fbb41a38e50cbd6', './modules/Import/tpls/error.tpl' => '8bfbddd3c2424d4a1b3670bd79c88e16', './modules/Import/language/en_us.lang.php' => '2e3bb401c11dc3f8cdc5a571c1f17ec1', @@ -2047,13 +2048,13 @@ $md5_string = array ( './modules/Import/UsersLastImport.php' => '2dae79ebe11ad6e559407bc79e47b8a2', './modules/Import/ImportFileSplitter.php' => 'f64c6d4e292c45f4d806da5d2300d14f', './modules/Import/ImportFile.php' => '0cff4a5dbe28838cccdc68d1ef5a0920', - './modules/Import/ImportFieldSanitize.php' => 'da057b84f590f3cca5a82118f6b936d7', + './modules/Import/ImportFieldSanitize.php' => '6113879bb0bce6b0693325a7f0dbc790', './modules/Import/ImportDuplicateCheck.php' => '5c5903744d183926748fac59ca5a8e90', './modules/Import/ImportCacheFiles.php' => 'c575f0ecbcbc98bd46ea8a10f6ee6c8a', './modules/Import/Forms.php' => '5fc35f1ae98fff8224af294bfb562a69', './modules/Home/about.js' => 'af9365ee4df93485a1e9cb89752d4e85', './modules/Home/action_view_map.php' => '7562b37c19b699d7cd79efaa6ef17205', - './modules/Home/views/view.additionaldetailsretrieve.php' => '7890a0201c58b736b64d8e8ef5be3437', + './modules/Home/views/view.additionaldetailsretrieve.php' => '153cfd5b0056493551f0e8a395cfcf8b', './modules/Home/views/view.modulelistmenu.php' => '799bca31c2b99c8be86c3c53712c802a', './modules/Home/views/view.list.php' => 'b1213448edbef90a40061dbdfb6e432c', './modules/Home/sitemap.tpl' => 'a0145732b2b2154506eae54e3b66b851', @@ -2063,7 +2064,7 @@ $md5_string = array ( './modules/Home/dashlets.php' => 'a88f1d512af748e1a4aa34bfdb34f883', './modules/Home/UnifiedSearchAdvancedResults.tpl' => '65b6695a4b79dff0c7564665ac45355f', './modules/Home/UnifiedSearchAdvancedForm.tpl' => '69e1fc48e68332a049be43ba4d09eec1', - './modules/Home/index.php' => '4583ee499dcf4d574fe6957d3ad20af5', + './modules/Home/index.php' => '9ab0944014426f3507a5b1214a1ecb3b', './modules/Home/UnifiedSearchAdvanced.tpl' => '4d77c658b82caabfe76d1e9e6aab7249', './modules/Home/UnifiedSearchAdvanced.php' => '1a9ae3dd850dbd0ec8947caf548e01b1', './modules/Home/TrainingPortal.tpl' => '484626736f0965c1c08cc8448f9f66f6', @@ -2091,7 +2092,7 @@ $md5_string = array ( './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', + './modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.php' => 'a62754815ebd325a4bcc425a1c1c0b39', './modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.meta.php' => '3a55e5ed102ac43b238ab9549ee45463', './modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.en_us.lang.php' => 'b90b45b8916fd2da50a646cab47c8fad', './modules/Home/Dashlets/InvadersDashlet/sprites/player.png' => 'e5cac3126e8afc4a33374c12651669ab', @@ -2109,7 +2110,7 @@ $md5_string = array ( './modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.php' => 'b3b1100c35333cf011af5d394478d7e7', './modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.meta.php' => '2cd846563521b3de61bde5de6b0f6fcf', './modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.en_us.lang.php' => '862477d3835816ea73a5b0b245f500fb', - './modules/Home/SubpanelCreates.php' => '984eeda3c3ce4863795a21b6d4f2fe90', + './modules/Home/SubpanelCreates.php' => '780d3a94a7cbad31ec1e0f9c764384ba', './modules/Home/AddToFavorites.php' => '36f3b6729a6c08afa63d7614e68f23ef', './modules/Home/About.php' => '858f6f1d26ff200447dcc5631d012993', './modules/History/metadata/subpaneldefs.php' => 'd25da6b3dc2a98b53fe168e5805fe262', @@ -2133,8 +2134,8 @@ $md5_string = array ( './modules/Groups/Delete.php' => '62a025db67afb0688f26ac1dd2e6b855', './modules/Employees/EmployeeStatus.php' => 'e15246545f162fbb5ea4126eae907d7f', './modules/Employees/views/view.list.php' => '3971f6b0047923b2b1a49f6af37c58f2', - './modules/Employees/views/view.edit.php' => 'a5838c257968be170c2bf2e26990adde', - './modules/Employees/views/view.detail.php' => 'f4debcac776d253b840ab0737fb1527e', + './modules/Employees/views/view.edit.php' => '5dc44b9fa6a75acecc1253c07e61e6db', + './modules/Employees/views/view.detail.php' => 'fc5cd2083d774ad347669dcf7f907b58', './modules/Employees/vardefs.php' => 'fbc0faa3310c46fda6e9022793b4173d', './modules/Employees/metadata/searchdefs.php' => 'b88ed48339d529934d31e521577a3995', './modules/Employees/metadata/listviewdefs.php' => 'ebe83948298f79b75a68b6c39b013ff6', @@ -2151,7 +2152,7 @@ $md5_string = array ( './modules/Employees/Menu.php' => 'd243cd0453202d101d515f3337d786e3', './modules/Employees/Forms.php' => 'dcb0eca9d5e3c8d92c17b66976ddcf13', './modules/Employees/Error.php' => 'ce78eb822cb1508b923493e55f053122', - './modules/Employees/Save.php' => '0a02115ace66b8d69960b0d4660fdfa3', + './modules/Employees/Save.php' => 'c40cd43574e4999569ab04c5c1ba2434', './modules/Employees/Employee.php' => '19d7b5023b16ca97b1f4f3dde4b485b7', './modules/Emails/views/view.quickcreate.php' => '1baef44186ab0bc84e3d575c5537ccb5', './modules/Emails/views/view.modulelistmenu.php' => '647ceefc2936595192f0683ff27ce3d2', @@ -2207,7 +2208,7 @@ $md5_string = array ( './modules/Emails/javascript/complexLayout.js' => 'fbcdb2d153ed8d495d095067ac792a47', './modules/Emails/javascript/ajax.js' => '62f8c69d48c09895c5b2f84f10279751', './modules/Emails/javascript/EmailUIShared.js' => 'e29adedf1480382aacc62d8aa7cebbca', - './modules/Emails/javascript/EmailUICompose.js' => '9a99014ca67c7ad59e63275732190baa', + './modules/Emails/javascript/EmailUICompose.js' => '2d77c38749d40d5a9d78cfdfe523aa4e', './modules/Emails/javascript/EmailUI.js' => '1fb6751344ba44c13a4207aeac09006b', './modules/Emails/javascript/Email.js' => '0171973017954855cacf4d6131e3cb34', './modules/Emails/index.php' => '6aff206a9821e1259275602982d900b8', @@ -2232,7 +2233,7 @@ $md5_string = array ( './modules/Emails/SearchFormMyInbox.html' => 'aa22a1b305bade600c30cb3e9f8885d2', './modules/Emails/SearchFormGroupInbox.html' => '4b2f99a5397e5f07fdc500d621cc23da', './modules/Emails/SearchForm.html' => '60561bf737698077131d1adc93936b01', - './modules/Emails/Save.php' => '55f862acdd9d69b3a9d37d2d2c4cb02b', + './modules/Emails/Save.php' => 'a705062f91571a2606e9f4362493fbda', './modules/Emails/Popup_picker.php' => '0a565ac706b2a2adba1a92e451e2861b', './modules/Emails/Popup_picker.html' => 'e1007fcf6df3f84a04b243925f2ab397', './modules/Emails/PopupDocuments.php' => '620740641da9b96fb68e4331a89d7072', @@ -2250,10 +2251,10 @@ $md5_string = array ( './modules/Emails/ListViewDrafts.html' => 'f2596e8874ce149f0849ba620a47059e', './modules/Emails/Grab.php' => '1a2ae928706722eb9f4c7ffb4d975d88', './modules/Emails/GenerateQuickComposeFrame.php' => '9fa2162d2750f8dbc20a705909c353b3', - './modules/Emails/EmailUIAjax.php' => '4bf08e94d91b5efa0c944027dbc0b4c5', + './modules/Emails/EmailUIAjax.php' => '9f1ccc5be981ff3803f5f7407f8bed72', './modules/Emails/EmailUI.php' => '4a84724f5f101fcd4e9f2e5a4ba360e5', './modules/Emails/EmailUI.css' => '6f93388627148bdc54c9458c434d7ec1', - './modules/Emails/Email.php' => 'f5d67b0049592d97428c75cc6f9d6ecd', + './modules/Emails/Email.php' => '41d07af157ef12df023cee3d06209145', './modules/Emails/EditViewArchive.html' => '4542138077a248dc2c1bf1a48d0f283a', './modules/Emails/EditView.php' => 'bbf3c6d659a6cb696cabe233db2bd313', './modules/Emails/EditView.html' => '0610849d790684a1035c35fd8f48733f', @@ -2280,9 +2281,9 @@ $md5_string = array ( './modules/EmailTemplates/EmailTemplateFormBase.php' => 'ffc958e5b7d90e6b5d80b1775973ad9a', './modules/EmailTemplates/EmailTemplate.php' => 'a1b2da557cb1680e5386da341ab42cbb', './modules/EmailTemplates/EditViewMain.html' => '2524b1d15a0f49b2ae59a068ae0e49af', - './modules/EmailTemplates/EditView.php' => '22465c185f440ae7e4c2bf4591eb997e', + './modules/EmailTemplates/EditView.php' => '5b1f18d2e1f70de4881ba497b5611a5e', './modules/EmailTemplates/EditView.html' => '1fc9440b3824a5b62b989e1ef1e7e524', - './modules/EmailTemplates/DetailView.php' => 'eb2765b757394ff6383ab60e4161c35b', + './modules/EmailTemplates/DetailView.php' => 'db07295b7aa677874acba993c6f092fc', './modules/EmailTemplates/DetailView.html' => '45aae47f2d182de3335e72abe975e7f2', './modules/EmailTemplates/Delete.php' => 'be4a379f832093ad36ce54cd95553ac1', './modules/EmailTemplates/CheckDeletable.php' => '6ead90762f5f5ffa27c60af51a5c65d6', @@ -2304,14 +2305,15 @@ $md5_string = array ( './modules/EmailMarketing/DetailView.php' => '34354f70fb63917246723f3ca728eeb4', './modules/EmailMarketing/DetailView.html' => 'fa059c2dc675788d4afb9b7b1e61dbfa', './modules/EmailMarketing/Delete.php' => 'c086cb4ea3c7c61a9feb8e9ff7037aab', + './modules/EmailMan/controller.php' => '4108eee5588ca2719a2861f1c7544b1d', './modules/EmailMan/EmailImage.php' => 'a31ccf962c840f3c613fac8cd397cf86', './modules/EmailMan/views/view.list.php' => 'd5de096088dccaf7dae5527489ab5825', './modules/EmailMan/views/view.config.php' => '57b38635350c47bd0fe995348d940c9b', './modules/EmailMan/views/view.campaignconfig.php' => '929db4bba124ff947bc67ee3599341c6', './modules/EmailMan/vardefs.php' => '3eda37221e3162a777a73f1186af76b0', - './modules/EmailMan/tpls/config.tpl' => 'd0f4df4f302917bb56b5ecd09540bcd4', + './modules/EmailMan/tpls/config.tpl' => 'd93824d0a2016da003f59e53392419b9', './modules/EmailMan/tpls/campaignconfig.tpl' => '44623eab12e9006cae2d08f74f3394f9', - './modules/EmailMan/testOutboundEmail.php' => '41174af3752e344ce9be8185ab406115', + './modules/EmailMan/testOutboundEmail.php' => '30691acf8389d15dc1a5013b9aff2361', './modules/EmailMan/subpanels/default.php' => '38725d5f2e105fd9167b6395d81d23d4', './modules/EmailMan/metadata/subpanels/default.php' => '38725d5f2e105fd9167b6395d81d23d4', './modules/EmailMan/metadata/searchdefs.php' => '094f44c3ebe19d0d3c7d9ffcdc67290a', @@ -2320,10 +2322,9 @@ $md5_string = array ( './modules/EmailMan/language/en_us.lang.php' => '772cdb3bafe9c1cd6d44e71f73ab814b', './modules/EmailMan/field_arrays.php' => 'b974342fdb34e2cfb4bfb30792da5f79', './modules/EmailMan/action_view_map.php' => 'cc9cf5e580d8486dd2adfb84b964d30b', - './modules/EmailMan/Save.php' => 'e2398487d75feb6bb20e345404bba92f', './modules/EmailMan/Menu.php' => '0c6088479556b57257a7dcf8cd439940', './modules/EmailMan/Forms.php' => '82708d6c997b31f39fd29e2083af8624', - './modules/EmailMan/EmailManDelivery.php' => 'e82ffdebd5c4b09155d318af0d7502ec', + './modules/EmailMan/EmailManDelivery.php' => '2e1b60ab177c049d21a35f3c65394503', './modules/EmailMan/EmailMan.php' => '12fbff7e02401ea17c978f1294c0f944', './modules/EmailAddresses/vardefs.php' => '465f3658bdc23c92e57c76217e5bb4eb', './modules/EmailAddresses/language/en_us.lang.php' => 'db372ac43705b32cb262af2e0ba5277d', @@ -2377,7 +2378,7 @@ $md5_string = array ( './modules/DynamicFields/templates/Fields/Forms/image.php' => '37e234e9c601132616726840809963ca', './modules/DynamicFields/templates/Fields/Forms/iframe.tpl' => 'c853636028bad8b1820a0bdfbaf45229', './modules/DynamicFields/templates/Fields/Forms/iframe.php' => '8ce332f6605d6705b3fcb334faba4885', - './modules/DynamicFields/templates/Fields/Forms/html.tpl' => 'bcc7daf5ce4cd66f3191cb7d3c181749', + './modules/DynamicFields/templates/Fields/Forms/html.tpl' => 'ed3ba2cedb8cd1224176d91c1ac82c15', './modules/DynamicFields/templates/Fields/Forms/html.php' => 'd50340efec5c1c7ee9af87f7ba2dcc06', './modules/DynamicFields/templates/Fields/Forms/float.tpl' => 'e03b1d68ea4aa2fa56699f41ab25702e', './modules/DynamicFields/templates/Fields/Forms/enum2.php' => '02576867740b851d0230313096252d2c', @@ -2399,14 +2400,14 @@ $md5_string = array ( './modules/DynamicFields/FieldsMetaData.php' => '31881094e9dfef9a0579622e0768d69f', './modules/DynamicFields/FieldViewer.php' => '53f662eab9401fd5a0b9f90c035fb13a', './modules/DynamicFields/FieldCases.php' => '7e9c75d4fcefca29f24033a0e8687f3c', - './modules/DynamicFields/DynamicField.php' => '140c9f4cbbd8b9c7654c5bf7fabe334a', + './modules/DynamicFields/DynamicField.php' => '077660ef7d2af1cac486da687cc628f2', './modules/Documents/documents.js' => '27b2aedb1597d9f13ee4410d295e45bd', './modules/Documents/tpls/view.extdoc.tpl' => '5566d78f1a66a4a38d1d3dc93ece9c01', './modules/Documents/action_view_map.php' => '0994fe5e38b73c985fff200f9edb2129', './modules/Documents/DocumentExternalApiDropDown.php' => '05c03dc10f85d98ddc4c512d809f886a', - './modules/Documents/views/view.extdoc.php' => '88ca012b3c34e5c22adb434d93ac10d7', - './modules/Documents/views/view.edit.php' => '1ffa7033c3b9762f87350fb3ecaa7361', - './modules/Documents/views/view.detail.php' => 'd5fde3177ceca20dd808fbc5b3097936', + './modules/Documents/views/view.extdoc.php' => '3348a550e4e6a7d4e4ed7712a5cf74af', + './modules/Documents/views/view.edit.php' => 'a428296858015ae9aa9722a58f579015', + './modules/Documents/views/view.detail.php' => 'e304a2abe7de36903ff6326746313616', './modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.php' => '35404688fc59eb3737d89ca7432c3e76', './modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.meta.php' => '0fd71adbdb97e05acfa9e37f517fd47b', './modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.data.php' => '3842f658a0da2ca0f18564e6f7683bcd', @@ -2430,7 +2431,7 @@ $md5_string = array ( './modules/Documents/Menu.php' => 'd0c29949cf8e50922b32b92a424cb3dc', './modules/Documents/GetLatestRevision.php' => '8f75739c607a8958d54b65e91b1e6167', './modules/Documents/DocumentSoap.php' => '1f20ba3768c0a063f3edd2f1ba95d347', - './modules/Documents/Document.php' => 'ded7c825a3e454f865347cf5ff242f3f', + './modules/Documents/Document.php' => 'ca47fe2cb3894c4570c772031f379ce6', './modules/Documents/Delete.php' => 'fe07bfd994a8d39da43f79fbf4aac64e', './modules/DocumentRevisions/subpanels/default.php' => 'c2961928cfb28cd4b9336444ea7843d3', './modules/DocumentRevisions/metadata/editviewdefs.php' => '38b36f4bf7e06b78187659f9fa1b9b9c', @@ -2451,17 +2452,17 @@ $md5_string = array ( './modules/Currencies/field_arrays.php' => '7056fae2e726c3379987317ad48ded12', './modules/Currencies/Menu.php' => '09e8126a80e45173bba81616eb8ca537', './modules/Currencies/ListView.html' => 'd0e01d1fdc6fbfb9067a190642473738', - './modules/Currencies/ListCurrency.php' => '504bc5564ef60e0da0b991205ba832fc', + './modules/Currencies/ListCurrency.php' => 'c97b9d0c12dac03337de7bc6734cfbd7', './modules/Currencies/Forms.php' => '6d7619156646796d8463bb1e4e5acd01', './modules/Currencies/EditView.tpl' => '509a24e75df8bc565847458bf541f7fa', './modules/Currencies/EditCurrency.php' => 'dfe9ae276fb02bdae956146ee96edca0', - './modules/Currencies/Currency.php' => '4338c4bc0160d6c22eb25b6896ab76c6', + './modules/Currencies/Currency.php' => '8836a6a317a3b4ba4cb0aea00a5998e0', './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', './modules/Contacts/views/view.mailmergepopup.php' => '13cf36b3fa24bade42630f6e34ef8cd3', - './modules/Contacts/views/view.edit.php' => '30f636adb9862b853756074c742e8cc7', + './modules/Contacts/views/view.edit.php' => '6e294dcbe1d540171cab488df87197e5', './modules/Contacts/views/view.detail.php' => '48058ccfb21592ee5abe894b77939ab7', './modules/Contacts/views/view.contactaddresspopup.php' => '6b850ba3f32ae2254e441302c844631f', './modules/Contacts/views/view.closecontactaddresspopup.php' => '760a824c3e06fa3df9827896a2b7fa05', @@ -2507,15 +2508,15 @@ $md5_string = array ( './modules/Contacts/ContactOpportunityRelationshipEdit.php' => 'ca0574bfc40855f7c170f3e2912fc445', './modules/Contacts/ContactOpportunityRelationshipEdit.html' => '063f65d9dbe6f7f58367d99f2af65210', './modules/Contacts/ContactOpportunityRelationship.php' => 'ec6fac16e09199dc26550e84cca523cf', - './modules/Contacts/ContactFormBase.php' => '0c0bf18973d25a15dd66bcca256112a7', + './modules/Contacts/ContactFormBase.php' => '9b139e31c8b95fa3e5b7fec497143e9d', './modules/Contacts/Contact.php' => 'b66ed57efe60e3774f09e25ca8ffc997', './modules/Contacts/BusinessCard.php' => '6791cfe02546533166a04d27d143eb49', './modules/Contacts/BusinessCard.html' => '2ad1f1578e7c6f85791f97656576a3a8', './modules/Contacts/Address_picker.html' => '7d072ff9f9bc06d2373ba2dee5a7086c', './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.sourceproperties.php' => '3e6da0a30c1123aa73c07e96657215fa', + './modules/Connectors/views/view.searchproperties.php' => '1acd895b65a875a45ff09515436186b0', './modules/Connectors/views/view.modifysearch.php' => '6d780a252feacfec34763b6aa82023a7', './modules/Connectors/views/view.modifyproperties.php' => 'dcc0b716091162d4c0bd2358cc36c75e', './modules/Connectors/views/view.modifymapping.php' => 'f6e46213597c80cf956d096a2b7eff07', @@ -2525,15 +2526,15 @@ $md5_string = array ( './modules/Connectors/views/view.connectorsettings.php' => '4a73c3d0a244650188fbb5028b8d15dd', './modules/Connectors/tpls/tabs.css' => 'b69adf86332cf9ef4dcec4af9b9867cd', './modules/Connectors/tpls/source_properties.tpl' => '4e474ab4f798b0cabc9f3a224a6bece6', - './modules/Connectors/tpls/search_properties.tpl' => '0c4239e46da4e0ee56a67bb970a8b0e4', + './modules/Connectors/tpls/search_properties.tpl' => '62ec56ef73cb4425e95b3e99d5928dfb', './modules/Connectors/tpls/search_form.tpl' => '0bd2dc6a534804b59b12edd9b9d1ad3c', './modules/Connectors/tpls/modify_search.tpl' => 'a981d9b741c73e644ffc2bbf3b0b7251', './modules/Connectors/tpls/modify_properties.tpl' => '6247de30aa6549c6a7ac158a6b783cd9', './modules/Connectors/tpls/modify_mapping.tpl' => '4becbec84593b80b63b9193c42991c14', './modules/Connectors/tpls/modify_display.tpl' => '68a4c7d1a802fd4d5e8a96ee05af8586', - './modules/Connectors/tpls/mapping_properties.tpl' => '39fc3a0b6628db14b5b84aa8fc4feda9', + './modules/Connectors/tpls/mapping_properties.tpl' => 'bc2761367e1d8ec45a6415fe30fe422d', './modules/Connectors/tpls/listview.tpl' => 'c69a43df5f9b91829ca2befe7485d5d2', - './modules/Connectors/tpls/display_properties.tpl' => '42318cabb7bc88a9d6fe1b389e81a27f', + './modules/Connectors/tpls/display_properties.tpl' => 'ad2a85adbb24b80a3864b84d2ff299fa', './modules/Connectors/tpls/administration.tpl' => '08c82fb2efe9da0793e676ba61cfd4da', './modules/Connectors/metadata/searchdefs.php' => '0a7b0c3175045ed95ffba4266f5aa88c', './modules/Connectors/language/en_us.lang.php' => '7a098f6e82147b7f1b78548c73e6396d', @@ -2551,7 +2552,7 @@ $md5_string = array ( './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', + './modules/Connectors/connectors/sources/ext/rest/linkedin/linkedin.php' => '3c034995f01419372ddcefb3f7842c2c', './modules/Connectors/connectors/sources/ext/rest/linkedin/language/en_us.lang.php' => 'fe986fa2444e2b3ac9ef55b4306b7e64', './modules/Connectors/connectors/sources/ext/rest/linkedin/config.php' => '4c1aae6b5d7732a570061e0cbd6f4c47', './modules/Connectors/connectors/formatters/ext/rest/twitter/tpls/twitter.gif' => '025ad081fbafed4577cc09c9eddb9a8d', @@ -2565,7 +2566,7 @@ $md5_string = array ( './modules/Connectors/ConnectorRecord.php' => '452d382859384f44b912abd25f727268', './modules/Configurator/views/view.sugarpdfsettings.php' => 'dc1f025773e789eb3960bed66382b4ac', './modules/Configurator/views/view.fontmanager.php' => '1aedd49b5e0e5fcafc9f03dfeccae74d', - './modules/Configurator/views/view.edit.php' => '837152ef721d2780c4f1bd35595ede2e', + './modules/Configurator/views/view.edit.php' => '40acba3d9447e502810745f66125b4c9', './modules/Configurator/views/view.adminwizard.php' => '01519ec9822c5e390de25e9cefac6a63', './modules/Configurator/views/view.addfontview.php' => '32bb28602335b418eafcd8bafb5e6fa9', './modules/Configurator/views/view.addfontresult.php' => '70babb45791ab15c7e7395aaa0ac8494', @@ -2575,7 +2576,7 @@ $md5_string = array ( './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/tpls/EditView.tpl' => '64eb722a88a6cf3a6b53d635b88f26fd', './modules/Configurator/metadata/SugarpdfSettingsdefs.php' => 'df5f687816312360b828d6d9efab2b71', './modules/Configurator/language/en_us.lang.php' => '5f8de482b351b8762d48a1204b4cbb1d', './modules/Configurator/controller.php' => '4161172c9a598fde3a057a880d4e4ff0', @@ -2659,13 +2660,13 @@ $md5_string = array ( './modules/Campaigns/views/view.detail.php' => 'c00b5e16a5c761196bd4762f3b2f0389', './modules/Campaigns/views/view.classic.php' => '0d3eac4f8c4861e67698368ccd62ecea', './modules/Campaigns/vardefs.php' => '053a1bf0ebd864ddbd5fd0e357390483', - './modules/Campaigns/utils.php' => '03dde983812d707f9da915feaffce86d', + './modules/Campaigns/utils.php' => '2e3ca09bb30d563df260e655beb4fc6f', './modules/Campaigns/tpls/WizardNewsletter.tpl' => 'a4aee7ecb98109063a28081685e1e58e', './modules/Campaigns/tpls/WizardHomeStart.tpl' => '3f0224431419e586fa3fe04cc76398b7', './modules/Campaigns/tpls/WizardCampaignTracker.tpl' => 'e8b4d6ac425ada43709dcbd17cadc7e8', './modules/Campaigns/tpls/WizardCampaignTargetListForNonNewsLetter.tpl' => '8f0e2499f1a2096ea6a962c4c5b80e73', './modules/Campaigns/tpls/WizardCampaignTargetList.tpl' => '427acb7396d167de88e5c32011615384', - './modules/Campaigns/tpls/WizardCampaignHeader.tpl' => '8fa287dee6f07d876d0443e9ab1f3e35', + './modules/Campaigns/tpls/WizardCampaignHeader.tpl' => 'a80da63ece6cd05144ac6241ae151ccc', './modules/Campaigns/tpls/WizardCampaignBudget.tpl' => '0595913f20a65f5c581bd0e78ed72ecc', './modules/Campaigns/metadata/subpanels/default.php' => '6efbfe0285830b2d26650ec657ad0d19', './modules/Campaigns/metadata/subpanels/ForEmailMarketing.php' => '67dcd0c05bbc29608c51611c73c2f442', @@ -2685,12 +2686,12 @@ $md5_string = array ( './modules/Campaigns/chart.tpl' => '0b05f75e6db080065bcfcce9c39a6e3a', './modules/Campaigns/action_file_map.php' => 'da2561f213e8ea3a051a1495e640f505', './modules/Campaigns/WizardNewsletterSave.php' => 'c6b5cd71cd8d8f93030ed8ca98852c3b', - './modules/Campaigns/WizardNewsletter.php' => 'bb31d4e1e596dfab6601d787eb7349fc', + './modules/Campaigns/WizardNewsletter.php' => 'd040893fcb8261e17da48755f002d8e3', './modules/Campaigns/WizardNewsletter.html' => 'cd4b436c4ad368b74911d522e62b9763', './modules/Campaigns/WizardMarketingSave.php' => 'c122b586cb62994b94470fca94ea7e15', './modules/Campaigns/WizardMarketing.php' => '98f5e34fa2d8e532b9cb397b70a99222', './modules/Campaigns/WizardMarketing.html' => 'abd84c813ee375647c4e9f7f07286a3b', - './modules/Campaigns/WizardHome.php' => '43bd2fbd7b3521a76132d9dda1f29133', + './modules/Campaigns/WizardHome.php' => 'f41655b9526245ef101b63d4306c25d3', './modules/Campaigns/WizardHome.html' => '498f6846c3e963ec60ca0fd9cd7b496b', './modules/Campaigns/WizardEmailSetupSave.php' => 'e58eb32256b562aa5d9a4dda9173cb6c', './modules/Campaigns/WizardEmailSetup.php' => 'a599a67497a6d6b00b96a2880645d149', @@ -2711,7 +2712,7 @@ $md5_string = array ( './modules/Campaigns/SearchForm_NewsLetter.html' => '8ad7f22ed622f85c674c72f47145cacb', './modules/Campaigns/Schedule.php' => '7a99bbcba282ca73314848daec30c653', './modules/Campaigns/Schedule.html' => '915b5758057b0e585f19c8d587093673', - './modules/Campaigns/Save.php' => 'bc087316c52c6f114fc1c8d15f3b7598', + './modules/Campaigns/Save.php' => '1d2216c2c0ef070d32ed5b068325812a', './modules/Campaigns/RoiDetailView.tpl' => '37196dd6f4253e25d2e12751900bdd8d', './modules/Campaigns/RoiDetailView.php' => 'dc249ef1ba62b68f627d9ff9fe5ad590', './modules/Campaigns/RemoveMe.php' => 'e4791a0df39d1ad2f6ed7d869f74ada7', @@ -2723,7 +2724,7 @@ $md5_string = array ( './modules/Campaigns/PopupCampaignRoi.html' => '0e91e877876feab8957cec5827247816', './modules/Campaigns/Menu.php' => '83af5f3dc4b71a10fd25f11f6dc907c4', './modules/Campaigns/MailMerge.php' => 'b635266e87c4a14f7930e1e988a7e7d0', - './modules/Campaigns/GenerateWebToLeadForm.php' => '859d24d36df8de8d6d2cfd14f581915f', + './modules/Campaigns/GenerateWebToLeadForm.php' => '0d2ab31545e632fdecbb8fc464d9f27d', './modules/Campaigns/EmailQueue.php' => '1635f40ea97a9cb22f922d6ee0d94652', './modules/Campaigns/Delete.php' => '453d68affba5006c3fbec936394e632c', './modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashletConfigure.tpl' => '612ad35fc9906cb2bda949756465b375', @@ -2735,7 +2736,7 @@ $md5_string = array ( './modules/Campaigns/CaptchaValidate.php' => '0329a3f4efd52fe128507f4d2c64c60f', './modules/Campaigns/CampaignDiagnostic.php' => '55b8c25896e40a7ff3316ff046b99c08', './modules/Campaigns/CampaignDiagnostic.html' => 'a001a2abe39b1cacd656dd4bc386afbb', - './modules/Campaigns/Campaign.php' => '92ff3d212bf6703173911c52d12ac8c9', + './modules/Campaigns/Campaign.php' => '0e18377220a985e9f418e97ec336ce32', './modules/CampaignTrackers/vardefs.php' => '2b1e5526138d9ce5fd9dc3c52d048608', './modules/CampaignTrackers/metadata/subpanels/default.php' => '7ff4226afd7940a03aa66fc25d043520', './modules/CampaignTrackers/language/en_us.lang.php' => 'c3822f18555758addc6e33731be2ef6e', @@ -2755,9 +2756,9 @@ $md5_string = array ( './modules/CampaignLog/Popup_picker.php' => '5cfbc593eb62651c9b5fddbb2e365093', './modules/CampaignLog/Popup_picker.html' => '5352231f402a624f048d9bfa812fa3d7', './modules/CampaignLog/Menu.php' => '9a144af6bd83a06aee1415594bd13e35', - './modules/CampaignLog/CampaignLog.php' => '3a17faa3d29a69fb19cc00a381008238', - './modules/Calls/views/view.edit.php' => '0074a5ec03aea28d0059f1120b385ee6', - './modules/Calls/vardefs.php' => 'ed846b42d84ffbb6971fac2bf03d528b', + './modules/CampaignLog/CampaignLog.php' => '065c904b90f20cc3e4570530b791c05a', + './modules/Calls/views/view.edit.php' => '98773bd63784a336938d8c74b5be8e17', + './modules/Calls/vardefs.php' => 'a77a5d26638f7cfbd8358193e569c1ff', './modules/Calls/tpls/footer.tpl' => '95e468f85ad0f4a0a9b3e3903b97d0a4', './modules/Calls/tpls/QuickCreate.tpl' => '85798db63f4a49547d76aa14f6fa19a5', './modules/Calls/metadata/subpanels/default.php' => '446247ed1b8a39cbfaf65b2b97c61a4e', @@ -2778,15 +2779,15 @@ $md5_string = array ( './modules/Calls/SubPanelViewInvitees.html' => '4aa44ffe3919c55fcb61e17f6b2fb757', './modules/Calls/Save.php' => 'be147699eb6834e0db87fc2e910c1d3a', './modules/Calls/Menu.php' => '4739c2d258953f89a8b84b7f7261c4e2', - './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php' => '30ff304f71f9f0733ad38c3a2c9f249b', + './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php' => 'da94ac16a9c64e48c9412fac2de659fd', './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.meta.php' => 'e34d7b77796de05737356c6945580966', - './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.data.php' => '9987cffa4c96e33bc0409bbccec4c188', + './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.data.php' => '577c8b018b6249972abd8ce81061c6af', './modules/Calls/CallsQuickCreate.php' => '1a526db285df01bcdda25ef861e25323', './modules/Calls/CallHelper.php' => '821c104aef4b2d64666fa94bb7cf7d88', - './modules/Calls/CallFormBase.php' => 'be71a4f2de40b336544e559bcab7678c', + './modules/Calls/CallFormBase.php' => '64d168d630e819fa3360c90eda48becf', './modules/Calls/Call.php' => 'ccbaa320b0cf524fb41196a5af954b73', './modules/Calendar/views/view.list.php' => 'e8dd64409e0ac2eacd506fcb7bb81fd9', - './modules/Calendar/templates/templates_calendar.php' => '065f96f74236c7dc02b019dea7ffbbad', + './modules/Calendar/templates/templates_calendar.php' => 'a6b1f92745bd8921e9a3522a54b2ef9e', './modules/Calendar/templates/template_shared_calendar.php' => 'b851af6632f3a7af5c5923bb561b6124', './modules/Calendar/small_month.php' => '2d0b75b3b5f6f31b7208dcdf3903950b', './modules/Calendar/metadata/listviewdefs.php' => '6b515c79d389fe940735497abf92f7ae', @@ -2798,9 +2799,9 @@ $md5_string = array ( './modules/Calendar/Forms.php' => 'ffff02189d6764e4b2ec3449d7a51c9a', './modules/Calendar/Menu.php' => '62609bfe10c90bce8db9c684c921640b', './modules/Calendar/DateTimeUtil.php' => '94546928e6055eba2aad970b867d4c3f', - './modules/Calendar/Calendar.php' => 'bfadc66eb3249b1bebdbb3844efc598f', - './modules/Bugs/views/view.edit.php' => '61e77620213b69bb29da063d8d8f26b0', - './modules/Bugs/views/view.detail.php' => 'bc6a5bec931dffb09db4ddfa1eb0847c', + './modules/Calendar/Calendar.php' => 'bfa1ffcb44550f04fb2429faa38549f1', + './modules/Bugs/views/view.edit.php' => 'f3758cc5fb82c65a163b9dfcb10e7b6b', + './modules/Bugs/views/view.detail.php' => 'effc34a9f7844b8339a5b4efa9c3cbfe', './modules/Bugs/vardefs.php' => '01f32339403525cdab96f4057c20422e', './modules/Bugs/tpls/QuickCreate.tpl' => 'e6f85f560bffc302c85114a0ec574a41', './modules/Bugs/metadata/subpanels/default.php' => '112c2dc86b254af66d0c7af331059b35', @@ -2857,10 +2858,10 @@ $md5_string = array ( './modules/Administration/javascript/Administration.js' => '5c983c8146d2f8e537f0f826d0239834', './modules/Administration/javascript/Async.js' => '6201560d3cc38a32a3300606bce92541', './modules/Administration/index.html' => '2cc05387b7f392ee9891f97ff24e8f66', + './modules/Administration/DstFix.php' => '3c1cfac3316ffc8ebfd4ecda81ca40f0', './modules/Administration/Diagnostic.tpl' => 'a46eed78fd43c51c6df8e3e6a0e7ae86', - './modules/Administration/repairUniSearch.php' => 'e25cdf52b928d0ea05e4a2b25acf8a66', './modules/Administration/callJSRepair.php' => '097ad94cdd7cddd45fe0f247df360f26', - './modules/Administration/index.tpl' => '3855c92a682bda5946fc7bf6ff775f39', + './modules/Administration/repairUniSearch.php' => 'e25cdf52b928d0ea05e4a2b25acf8a66', './modules/Administration/clear_chart_cache.php' => '95585a99d6928cc158475308324e8270', './modules/Administration/UpgradeWizard_prepare.php' => 'fcd2cd294ca89b83d07b6ab1320be5e8', './modules/Administration/UpgradeWizard_commit.php' => '79b11156566b725fcfc3ef0a6e654e23', @@ -2872,18 +2873,18 @@ $md5_string = array ( './modules/Administration/UpgradeAccess.php' => 'd5b662f01ae6c5a8ec6ef7f7cfa6e4cd', './modules/Administration/expandDatabase.php' => 'db6782337c424a5aea39932c6c74b52a', './modules/Administration/UpgradeWizardCommon.php' => 'd6c694064904b67eaefdef81b4912b97', - './modules/Administration/SupportPortal.tpl' => 'ca19a599f5e708f2ab909b9b34317ff2', - './modules/Administration/DstFix.php' => '3c1cfac3316ffc8ebfd4ecda81ca40f0', + './modules/Administration/SupportPortal.tpl' => '25d5c2ffefc8becee74e0f45b196ca64', + './modules/Administration/index.tpl' => '606ad7ab8d4dcab1715bc455dab35989', './modules/Administration/repairDatabase.php' => '8de7ecd350e5516b099fa6dd0f0bfecd', './modules/Administration/Save.php' => '4152bf2003831091369d76b24495386f', - './modules/Administration/index.php' => 'c376fc0c269ebccf75b73f3e391a1259', + './modules/Administration/index.php' => '54b4ed0b4645006346d676b85cb3bbd3', './modules/Administration/controller.php' => '83da0c6bf53f19c7347e656188f1db7d', './modules/Administration/RepairSeedUsers.php' => 'b9c8937676633e2860b38b3c5ab77f0c', './modules/Administration/RepairJSFile.php' => '43ac52009b5ee4364b2194b7d672d740', './modules/Administration/RepairXSS.php' => '2d56fb5ebf47019f684ddc0329d4ffa5', './modules/Administration/RepairIE.php' => '4d2065ceb6ff00779c187de7a38b93b1', './modules/Administration/action_view_map.php' => 'a35695d1f72f0a3750618341ea6f9edb', - './modules/Administration/UpgradeHistory.php' => 'c8ad1608fb9e6d3cf345145bf6710cd1', + './modules/Administration/UpgradeHistory.php' => 'c1cfbee38c2d4c00bfcd97f79dda267c', './modules/Administration/RebuildSchedulers.php' => '87ba4d901c73481d50e7f43aa526c5c3', './modules/Administration/RebuildRelationship.php' => 'a405752d10246296741e191ad01bf1f1', './modules/Administration/RebuildJSLang.php' => '77a853cac31de893caa29aafd8fab626', @@ -2897,7 +2898,7 @@ $md5_string = array ( './modules/Administration/PasswordManager.tpl' => 'd60c9df9a4d6cf63168fefa53f9b07de', './modules/Administration/Upgrade.php' => '595882b60b47ea6b775205823044dcb4', './modules/Administration/Updater.php' => '6245521e1b0c45638d1fd5cfc3fea19b', - './modules/Administration/SupportPortal.php' => '03f335144dd32334518d3f0ebf58adbf', + './modules/Administration/SupportPortal.php' => '29a746ac29392464d1b28d9588395e7b', './modules/Administration/Menu.php' => '96b575a9cdd9b92b4411aa316f57d1a3', './modules/Administration/RepairIndex.php' => 'cdc4da4fec0cef9a351dec1e7aa75f33', './modules/Administration/RepairFieldCasing.php' => '9ef826eb314c0086f7bb43b40a82276f', @@ -2905,7 +2906,7 @@ $md5_string = array ( './modules/Administration/PasswordManager.php' => '6e3ca5f53adbb0144bf4f053671cf45d', './modules/Administration/ImportCustomFieldStructure.php' => '8f483d883bfa449cce0ca0afe782b6cc', './modules/Administration/Forms.php' => 'fb76fa135d6210b0e25abf6b2f10376d', - './modules/Administration/Locale.tpl' => '5c7bf9be0bc69970c4349f57559f086a', + './modules/Administration/Locale.tpl' => 'c84e7541508099330a44296d460fabaf', './modules/Administration/ExportCustomFieldStructure.php' => '6f55e973d20ab72b29f0fc74d793ad5b', './modules/Administration/DisplayWarnings.php' => '70d6a5d17f5690de605ec1b11bf75781', './modules/Administration/DiagnosticRun.php' => '9d199a55c9c8a35648c56dfa40dca063', @@ -2937,10 +2938,10 @@ $md5_string = array ( './modules/Accounts/views/view.detail.php' => 'f9ae2b995b3658a78a2ce5db2135c66b', './modules/Accounts/vardefs.php' => '369286f1a75e7b5e8c3c6afd9e150416', './modules/Accounts/tpls/QuickCreate.tpl' => '994fcab80f63cc0f59f111fc30bf0430', - './modules/Accounts/metadata/subpanels/default.php' => 'cd176e8e9cacfc19b11212062211e9dc', + './modules/Accounts/metadata/subpanels/default.php' => '066e3a2fb842892fbcae8009ce9576c4', './modules/Accounts/metadata/subpanels/ForProspectLists.php' => 'b6d33485aa7f8fa00f22677ff2d1f001', './modules/Accounts/metadata/subpanels/ForEmails.php' => '0a45c17da8fcbce4e784ad7113909141', - './modules/Accounts/metadata/subpaneldefs.php' => '5bf499eb14a69d511f607d4b54a7f7dd', + './modules/Accounts/metadata/subpaneldefs.php' => 'ef800bededd816594742e07969471ecf', './modules/Accounts/metadata/studio.php' => 'd1d79777052d975c08429b48fe02e235', './modules/Accounts/metadata/searchdefs.php' => '0f888761dac4782e8c6368377911b2ef', './modules/Accounts/metadata/quickcreatedefs.php' => '9b4038cd84095adb5001c92f9b6da280', @@ -3079,15 +3080,15 @@ $md5_string = array ( './log_file_restricted.html' => 'f20a0bfe3ac44ba88f520fb8203a70e4', './log4php/LoggerManager.php' => 'fa34194306cd50c01b71d8d5060ee362', './leadCapture.php' => '39f9c34cbfb01f585a6c04227823c65f', - './jssource/src_files/include/MySugar/javascript/MySugar.js' => '6b09da2f9e4d14e2cd01e93247af99ed', + './jssource/src_files/include/MySugar/javascript/MySugar.js' => '345a40c52beb881a6ad33b8ea526b248', './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', - './jssource/src_files/include/SugarCharts/Jit/js/Jit/jit.js' => '6f27b1641c7d1d80182978bf4230e257', + './jssource/src_files/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js' => '72c44a4bca6418bb7ee5e7c5b7781e3f', + './jssource/src_files/include/SugarCharts/Jit/js/Jit/jit.js' => 'eafefe546e88997558054191c83a00e2', './jssource/src_files/include/SugarCharts/Jit/js/mySugarCharts.js' => 'bbbca8b9bb44d0f107a2783fe1cf861d', './jssource/src_files/include/SugarCharts/Jit/js/sugarCharts.js' => '72eba4ec918665ffa582c6fec16d2c78', './jssource/src_files/include/SugarDependentDropdown/javascript/SugarDependentDropdown.js' => '82905de42674faa12e819f99d3db0610', - './jssource/src_files/include/SugarEmailAddress/SugarEmailAddress.js' => '80df53c11d7653e87488d48ce49e2b76', + './jssource/src_files/include/SugarEmailAddress/SugarEmailAddress.js' => 'b96f3de51a2e1de560cb1bc688ea5597', './jssource/src_files/include/SugarFields/Fields/Address/SugarFieldAddress.js' => '2e39ad35e6759c407fae5b35b230d34b', './jssource/src_files/include/SugarFields/Fields/Collection/SugarFieldCollection.js' => '99af73a152a0cc58ac14e895ba569fa6', './jssource/src_files/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js' => '7f93acedc02d390800eaad0e5fc22cae', @@ -3096,17 +3097,17 @@ $md5_string = array ( './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' => 'a7c6d57a4fbb59c5ba052d969518e594', + './jssource/src_files/include/javascript/jsclass_async.js' => '62999963ba1982cc5582cd0c89d509f3', './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' => '6f89a69a9d38d451a1d104973785f2ff', + './jssource/src_files/include/javascript/popup_helper.js' => '39c5944f361b4b1ff1e7c74d8bb000be', './jssource/src_files/include/javascript/popup_parent_helper.js' => 'e7daf641d1691db7dfa7464efab1a706', './jssource/src_files/include/javascript/quickCompose.js' => '2ae2e20213ad5341de324c92bb5035d3', './jssource/src_files/include/javascript/quicksearch.js' => '751e98b3b4c21b2585d3d706249c800b', './jssource/src_files/include/javascript/report_additionals.js' => '134d3cd895ad1e0470f9dd07c7b34ad1', - './jssource/src_files/include/javascript/sugar_3.js' => '34519764fd69c94b894020b8ca32ef75', + './jssource/src_files/include/javascript/sugar_3.js' => '3d1b35a31520cbf604dfce1ff7a4b2f8', './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' => 'eb797deed072e18109821ab136366c49', @@ -3949,7 +3950,7 @@ $md5_string = array ( './install/siteConfig_a.php' => '17e8c6a41d5f4d3469e123ee98f93f7d', './install/licensePrint.php' => 'f569be1d51e52d0067ec1b2845a4c9b1', './install/license.php' => '6739f461680a5a40971d83bc7b66b7ef', - './install/language/en_us.lang.php' => 'd2f2498a4b73469abe33a89f3bd61440', + './install/language/en_us.lang.php' => '79754e24ff24b84400ec2fd00ffceda2', './install/performSetup.php' => '4b55e2fef4f08b9b586556ee7537c56f', './install/install_defaults.php' => '3c67b082c1709e909dd1aaf051e9c589', './install/installType.php' => 'cc447dd870b6eb51027abeb4d4674087', @@ -3958,23 +3959,23 @@ $md5_string = array ( './install/installDisabled.php' => '99893d6cd92bef3120ccfe5d3dab127c', './install/install.css' => '862e23df1815d0138cf0a367d92a372d', './install/download_patches.php' => 'c1942d9e73b9ce80eb645e4ec925a5e0', - './install/download_modules.php' => '021ce0af2484d89e13474a9b5cef7039', + './install/download_modules.php' => '4623d65fa913da9559e1bdd296f4e887', './install/install_utils.php' => '458c1122a57a0b8bf56188844bef7567', './install/populateSeedData.php' => '8867869db5ca3f45cef110ec4515152d', './install/demoData.en_us.php' => 'ab6d0dc87a9f421e843ac454aec4546a', './install/dbConfig_a.php' => 'ea11513c27fe2c5cdc0241a1fe744cfb', './install/data/disc_client.php' => 'e4574285e612f49e6a5b002e3bf0b6c9', - './install/confirmSettings.php' => 'a04b54ee667cd223b473ce970297b9b2', - './install/checkDBSettings.php' => '5b5e8721730cd6f5b1097869a6dc9541', + './install/confirmSettings.php' => '44341f2a4081476ef4afbfa8c28754c7', + './install/checkDBSettings.php' => 'a71be2058378c686abd7a54bd33ce171', './install/UserDemoData.php' => '50640057634782bb6f0cf4e34313346c', './install/UploadLangFileCheck.php' => '011b7ae7a9711e6eb231155e24c66e63', './install/TeamDemoData.php' => '1cf512bcb6834cdac2c154b2f42d14cd', './index.php' => '85d2f32e8b794128592f116a91fcef72', - './include/externalAPI/ExternalAPIFactory.php' => 'b94ed8c1a24578abe4e5b30f484ccfbe', + './include/externalAPI/ExternalAPIFactory.php' => 'a94627b0b015083319f1df55b37b652e', './include/externalAPI/Base/WebMeeting.php' => '53cbdd0ac77fde2542711093c64f83b9', './include/externalAPI/Base/WebFeed.php' => '6ce8b5213a9f52991c30a9597686aa9a', './include/externalAPI/Base/WebDocument.php' => '728f703b0dd2bcf9845b033142532416', - './include/externalAPI/Base/OAuthPluginBase.php' => 'cf751e1481dc8cb1f12bdf0605427a9c', + './include/externalAPI/Base/OAuthPluginBase.php' => 'cb6be82d3c58c7594eb92f364fe909f0', './include/externalAPI/Base/ExternalOAuthAPIPlugin.php' => '68a07294ba03848f6d8c0e7185218e7d', './include/externalAPI/Base/ExternalAPIPlugin.php' => 'bb7ebb6a9a077b5566301e1e91d7ac46', './include/externalAPI/Base/ExternalAPIBase.php' => '1cf9620929e1bee7faf4b0983b82acb2', @@ -4049,7 +4050,7 @@ $md5_string = array ( './include/ytree/Tree.php' => '9a55f8e48383e926804d684cba925d18', './include/ytree/Node.php' => '537ea99369cc451f6d02e6ccd33c4eec', './include/ytree/ExtNode.php' => 'f4bcdda0640f5ad72e95835419b59435', - './include/vCard.php' => '3cb853936dcf59576fcf7043e7ab0061', + './include/vCard.php' => 'b0fd80da757645cadc8c9cb11e69aa6a', './include/utils/php_zip_utils.php' => '776cdb257fd48ca212940f60687cd149', './include/utils/sugar_file_utils.php' => '5dbecfc86fec0dcd5c15d69c9c68758e', './include/utils/security_utils.php' => '5848837442f97823077e87a384e7e691', @@ -4059,21 +4060,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' => 'bf0021ce03ee55d732bcee4fa792b5e0', + './include/utils/mvc_utils.php' => '30ef87e173ab4d861fbbee996f11d6c4', './include/utils/encryption_utils.php' => '060b4fa727c1d48fa8ec2809e2fb58cf', - './include/utils/db_utils.php' => '9b3d1516d07438b8cac025baf539fcc0', + './include/utils/db_utils.php' => '644b02b4ed5db4a3ede75ed11368b773', './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' => 'e2809b9a9a72c05fc36d95b2474db9cf', + './include/utils.php' => 'cc387bf31e7ff14093d2f9653b0b92cd', './include/upload_file.php' => '177f5eb2032e0c7797e11f93efb759f3', - './include/timezone/timezones.php' => '0b0ffe9ce81f1652daec48cf2fbdd688', + './include/timezone/timezones.php' => '68c833b6b839c9e4d80a3bb21740d6e5', './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' => '4decba8197a91edb47e45f95da9cfc0b', + './include/tcpdf/tcpdf.php' => '5910187df5ca596767e5a384279c3f0b', './include/tcpdf/htmlcolors.php' => '0015bab537767d694b0304d91a87c5f1', './include/tcpdf/fonts/utils/makefont.php' => '07068b0cd9415eaa2c4165f0bc980e7d', './include/tcpdf/fonts/utils/enc/koi8-u.map' => '9046b7222af56cb6bbc349cac9dbabdf', @@ -4164,30 +4165,30 @@ $md5_string = array ( './include/modules.php' => 'b016b295433b3b4d54c08eca90a566b4', './include/language/jsLanguage.php' => 'f39b23266c5f25d253082afb6a210fe2', './include/language/en_us.notify_template.html' => '4e90b0343ac29bf12687dddb15afea7d', - './include/language/en_us.lang.php' => '73f8214fa78457568c881183534d1911', + './include/language/en_us.lang.php' => 'f2b2332a9bc1ba04b65d01b76b66a64c', './include/json_config.php' => '73219c3de81147aa2e18580b497353e6', - './include/javascript/sugar_grp_quickcomp.js' => 'fa9afd6c1945da32fa0d19b10fdad7a3', - './include/javascript/sugar_grp_emails.js' => 'e19ec1a275b5e11233c46e1f24c1aba1', + './include/javascript/sugar_grp_quickcomp.js' => '98d3378cc7d03a6aaaa7ecc20ee46ccb', + './include/javascript/sugar_grp_emails.js' => '67d2cf6199edb7301d9581145fb5d602', './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/sugar_grp1.js' => '3f2c674a52b8136ce6d81ae0db366f86', './include/javascript/cookie.js' => '4f95a2872a549573149d035633086662', './include/javascript/dashlets.js' => '208d5f32d367390faadda8e899f99b77', './include/javascript/include.js' => '1b6f04c9cdbc1f25b3c4de8e049a2433', - './include/javascript/jsclass_async.js' => 'e3b7af84fca3494ffaf12eea764078e5', + './include/javascript/jsclass_async.js' => 'c915de28d467e6a5c715fa8a60f9aa6b', './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_helper.js' => 'c1cd07f47d71096559968844fe675a7e', './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_3.js' => 'd159ab21ef865443f1524cae52d39e3a', './include/javascript/sugar_connection_event_listener.js' => '4a3c4a128bbbcd0817a07cb0e7423d92', './include/javascript/swfobject.js' => 'e83d1ca12de8ee2787c9189119cbd959', './include/javascript/calendar.js' => '74e959df9c5364713a6b3bca6ea926ad', @@ -5535,14 +5536,16 @@ $md5_string = array ( './include/javascript/yui/build/animation/animation-min.js' => 'aa8aedcf06eeea23d975b99cec53ad18', './include/javascript/yui/README' => '4dc7cd50545b8e539199a9d582f711ed', './include/javascript/yui/LICENSE.txt' => '8836083506dadbf2735da1d444429ede', - './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/tiny_mce_prototype_src.js' => '8ba740f08664680f55445eb42fa9b400', + './include/javascript/tiny_mce/tiny_mce_prototype.js' => 'dcbbf33e9f10a0c6d32bc6f6454edc95', + './include/javascript/tiny_mce/tiny_mce_jquery_src.js' => 'a175f3acbdf3b9b54c22894fe77ff1f8', + './include/javascript/tiny_mce/tiny_mce_jquery.js' => '5321add170943547a016932eaba0bc1b', + './include/javascript/tiny_mce/tiny_mce_dev.js' => '1688bdfb91dfc0b32a59685cba03f715', './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/VK.js' => '39744f9d725f76b44252abd455a8e0b8', + './include/javascript/tiny_mce/classes/util/URI.js' => 'c20b6a4a9eba55ce736f1a9d1a36ba0a', + './include/javascript/tiny_mce/classes/util/Quirks.js' => 'e06b5451249ebb8fe8eb1db6bac16ae8', './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', @@ -5556,93 +5559,93 @@ $md5_string = array ( './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/ListBox.js' => 'a2c19c0fe1811306924216fdfd7454b2', './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/ui/Button.js' => '7af531f3be40b3be1dae1c788149bcde', + './include/javascript/tiny_mce/classes/tinymce.js' => 'feefd3ac6f74f087e64dc8fc3d16bc45', './include/javascript/tiny_mce/classes/html/Writer.js' => '9831ca7a112896f3cc0bd456387cccdb', - './include/javascript/tiny_mce/classes/html/Styles.js' => '65e7b83454437113797807be35349b93', + './include/javascript/tiny_mce/classes/html/Styles.js' => 'eed0dcf2a1ff384548fb9296c35995e0', './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/html/Schema.js' => 'a6334eccaf14dc1e27850173aef97c8b', + './include/javascript/tiny_mce/classes/html/SaxParser.js' => '1786a481b7d7b68805c4b1b18bd2c2bd', + './include/javascript/tiny_mce/classes/html/Node.js' => '5740d0d65b1c1f738c8b697df3eb2ddf', + './include/javascript/tiny_mce/classes/html/Entities.js' => 'f34da53565120c3529289ca5aaaa395b', + './include/javascript/tiny_mce/classes/html/DomParser.js' => 'a76a753dce5c9709cb2bd68d64977a37', './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/TridentSelection.js' => '94c5c5dd6d6d181d4d8a6532accc4a2d', './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/Selection.js' => '65328ecd000b72bdc0a5cb6f0f7374a7', './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/EventUtils.js' => 'a54b9766d69788ab2aa07d0d72d435f5', './include/javascript/tiny_mce/classes/dom/Element.js' => 'd7e14ecb7ab535b9f2179fd1a78a6ed1', - './include/javascript/tiny_mce/classes/dom/DOMUtils.js' => 'de0be75cbe0eea8966e003b5711743c6', + './include/javascript/tiny_mce/classes/dom/DOMUtils.js' => '40643d1da458c7fb4340b0df5f63691f', './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/adapter/jquery/adapter.js' => '3d8d0d3bfa5e988465fbf4ee39d1942a', './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/UndoManager.js' => 'b5b94aad64c24447a63147f96ba26cbe', + './include/javascript/tiny_mce/classes/Popup.js' => 'c894afefdffdda99e49bb75dbf37c3e2', './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/Formatter.js' => '1e024358bb0db884e1c0b60ea35e3de3', + './include/javascript/tiny_mce/classes/ForceBlocks.js' => 'c81738f78ff6e428fd2927346593b67a', './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/classes/EditorCommands.js' => 'e985fd1a8d0493a4335a83109739201f', + './include/javascript/tiny_mce/classes/Editor.js' => 'd43a1f82553e974bd20c27bbd4205b94', + './include/javascript/tiny_mce/classes/ControlManager.js' => 'b33c41d8eacc5d52852b74f3d41ef23c', + './include/javascript/tiny_mce/classes/AddOnManager.js' => '2364557e5542d57007c7fcdbe76ddcee', './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_src.js' => '18b45d0806e6c4b1a7408e507d7dbc87', './include/javascript/tiny_mce/tiny_mce_popup.js' => '9a9c125814b9715982d246a1ee78084f', - './include/javascript/tiny_mce/tiny_mce.js' => '048a6a57718e56a7844b6291052b7f67', + './include/javascript/tiny_mce/tiny_mce.js' => '2192ee1b557660fe152f031cea4ff4c2', './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', './include/javascript/tiny_mce/themes/simple/skins/default/ui.css' => '8f5fb8a371d03eb652b1d14e4b879c24', './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/img/icons.gif' => '273dad62be4d114c5d52210b50a5838f', './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/ui.css' => 'cd943049a33bbda3d7c53c16c3b644cc', './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/ui.css' => '5a48c21bde270739664e9dab7c1143ad', + './include/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png' => '15fbf2b4a20dbaa86205af6764f4fee4', + './include/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png' => '9645f90b37102a3618a52be18b74b02b', + './include/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png' => '36fd9fbd748860f515df259443367163', './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/o2k7/content.css' => 'edddc4114133b51fe4e7a1192c27541a', + './include/javascript/tiny_mce/themes/advanced/skins/default/ui.css' => '642e4f5b08ac1ccc1f1d6d956171ee34', + './include/javascript/tiny_mce/themes/advanced/skins/default/img/tabs.gif' => '6473bbcd0a011e9fcdd9f777ef437410', './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/img/items.gif' => 'd201498a710fc8aac6e117820b9814b7', + './include/javascript/tiny_mce/themes/advanced/skins/default/img/buttons.png' => '33b2f2e08cc3ade5254fec64c4183558', './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/skins/default/content.css' => 'a2108a9578b582bda92f6fc02c15323b', './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/image.js' => '2b6f5401ef9c91ea259317273d307cbe', './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', @@ -5650,31 +5653,33 @@ $md5_string = array ( './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/shockwave.gif' => '1ce7d48784981aac9d4375cf2effdc4d', './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/quicktime.gif' => '61da1ff8729ca5016344c4e8eb173369', './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/img/flash.gif' => '33adee48d32bbbba3e6412cc54ecf335', + './include/javascript/tiny_mce/themes/advanced/img/icons.gif' => '7316b39211892b53eac6f76da7615461', + './include/javascript/tiny_mce/themes/advanced/img/colorpicker.jpg' => '9bcc36292defe94bca5a013a1736c7d7', './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/editor_template_src.js' => 'dabb70015e66296676620e5c86fa6116', + './include/javascript/tiny_mce/themes/advanced/editor_template.js' => 'fd2835b5c1610d37e4f546cd45bdbbda', './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/wordcount/editor_plugin_src.js' => '65bf40850c57d68468e9ee85c4c090d6', + './include/javascript/tiny_mce/plugins/wordcount/editor_plugin.js' => '75fdb73201de4a1d80aa66a6c8e0bb5d', + './include/javascript/tiny_mce/plugins/tabfocus/editor_plugin_src.js' => '8cf50fd7b506d6ee501f58d19c68eedf', + './include/javascript/tiny_mce/plugins/tabfocus/editor_plugin.js' => 'dccf6d391c252e2571f2ed4b15fba889', + './include/javascript/tiny_mce/plugins/lists/editor_plugin_src.js' => '132aff7d5392ae425a7c52abdf63424f', + './include/javascript/tiny_mce/plugins/lists/editor_plugin.js' => '5f759a6fb9a91d23298c37963fdc4db0', './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/example_dependency/editor_plugin_src.js' => '473878118b45efe326d335f992ff9943', + './include/javascript/tiny_mce/plugins/example_dependency/editor_plugin.js' => '405d190ae03384a9acb00533568b2cfd', + './include/javascript/tiny_mce/plugins/autoresize/editor_plugin_src.js' => '05046c505c39c3d1d827dc6b5ff13c7c', + './include/javascript/tiny_mce/plugins/autoresize/editor_plugin.js' => 'ed6fd391a8b5ecedd913c263da2136b8', './include/javascript/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js' => 'e845f30954520a5113ca623b017fb723', './include/javascript/tiny_mce/plugins/xhtmlxtras/js/ins.js' => 'f659a3cf2fca7086e37718beb9dd2ff9', './include/javascript/tiny_mce/plugins/xhtmlxtras/js/element_common.js' => '7821e436f23c6f22f171c1c857e5f70b', @@ -5702,29 +5707,29 @@ $md5_string = array ( './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' => 'e68e146f8a82860f6c2ffd2b819ff558', - './include/javascript/tiny_mce/plugins/table/row.htm' => 'de747b50d5ff435e55edd22d5797cf6b', + './include/javascript/tiny_mce/plugins/table/table.htm' => 'b5db9b4ce4e1c0c24b56a4d586fe217b', + './include/javascript/tiny_mce/plugins/table/row.htm' => '61bb0c341b0340cac359caf291ac2870', './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/langs/en_dlg.js' => '478092fb7116d16cbdbfd8e93eade4b6', './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/row.js' => '6208b61ed204f297a0fd8d03b6a4a796', './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/js/cell.js' => '28c1534522fb130e3b2b6dd7566e8b6f', + './include/javascript/tiny_mce/plugins/table/editor_plugin_src.js' => '8660876cb4413ebecb29058b7edb9e20', + './include/javascript/tiny_mce/plugins/table/editor_plugin.js' => 'c27c6cdaa00b059c339cb9012e2e0eb2', './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' => 'bcbb2c7f052d57c09de52cdd2ea54f26', - './include/javascript/tiny_mce/plugins/style/props.htm' => '95402f155b275eff21e943d6c458f80a', + './include/javascript/tiny_mce/plugins/table/cell.htm' => '6cd8be69058df3f1110b2fae917370fc', + './include/javascript/tiny_mce/plugins/style/props.htm' => '14ad0e0ff0597b5749541b3acc3b0e60', './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/js/props.js' => '390388b029c271efb62d6f6d41bfa59a', './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' => 'adc3232ee6b50543563afda8aaa4a3d1', - './include/javascript/tiny_mce/plugins/spellchecker/editor_plugin.js' => '97e2cf10a3e4e3fe74f9aaf06d62eb8d', + './include/javascript/tiny_mce/plugins/spellchecker/editor_plugin_src.js' => 'd0f9fc820177fa8dba829391916cbd1d', + './include/javascript/tiny_mce/plugins/spellchecker/editor_plugin.js' => '97c64a025f1de8502726db617702626c', './include/javascript/tiny_mce/plugins/spellchecker/css/content.css' => 'd236d4333281b4eae7a1e2b514b691f4', './include/javascript/tiny_mce/plugins/searchreplace/searchreplace.htm' => '5dfa098e68c1da6de9bedcb817322c58', './include/javascript/tiny_mce/plugins/searchreplace/langs/en_dlg.js' => '8d4507bdc22c3d39fa0b1537172c8af3', @@ -5734,8 +5739,8 @@ $md5_string = array ( './include/javascript/tiny_mce/plugins/searchreplace/css/searchreplace.css' => 'd4f8026713b4f1394d9977196a9de1bd', './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/autolink/editor_plugin_src.js' => '02670af2c9ce3b9179331e1ffb5c80b8', + './include/javascript/tiny_mce/plugins/autolink/editor_plugin.js' => '56885f39a7a8b93578a50c359c02a83b', './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', @@ -5748,21 +5753,21 @@ $md5_string = array ( './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/paste/editor_plugin_src.js' => '3cf41fadde401a7a83de95dec5f3238f', + './include/javascript/tiny_mce/plugins/paste/editor_plugin.js' => '93a17a989ee7f9ae5bfa23a8f62a95b0', './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/noneditable/editor_plugin_src.js' => 'a94356d5ac2d884fe5546fc1a7b9572e', + './include/javascript/tiny_mce/plugins/noneditable/editor_plugin.js' => '8b2a33f3e54cc33b64b2b68e8cc46fe0', './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/media.htm' => '92ef47e70d9144ab49aeb668e5bfcb6d', + './include/javascript/tiny_mce/plugins/media/langs/en_dlg.js' => 'bfcfbd54b61946881eb41b3f97719474', + './include/javascript/tiny_mce/plugins/media/js/media.js' => '1303c105ad0a1ce44c27e106825a3eda', './include/javascript/tiny_mce/plugins/media/js/embed.js' => '5df3783492b848adde42124a1e9cf383', - './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/editor_plugin_src.js' => '162fca4dfa3b14636dd69cf55dd714ed', + './include/javascript/tiny_mce/plugins/media/editor_plugin.js' => '81e16046103fb1776f30838d2bb4a378', './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', @@ -5770,15 +5775,15 @@ $md5_string = array ( './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' => 'f715affab9da63bc26f8c6362a989395', - './include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif' => '193884a332e91059643448ed4bde2e04', + './include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif' => '0261136fac58ce77bdbd96aa0194947e', './include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif' => '0365e75dd4a9ad61dc98dcb641207c21', - './include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif' => '2e89a17a473f0e488f3e789ce998f064', - './include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif' => '44f1d55b14fbc66b98f3899d90611c3c', + './include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif' => '55298b5baaecb7e06a251db9f0a4b14c', + './include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif' => '1bc337a20c319e531cda6ced531827d0', './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' => '2d2a2d837d41a86d0fd9bcd311611da4', - './include/javascript/tiny_mce/plugins/inlinepopups/editor_plugin.js' => '89c9d4511cd7b90c00fdd9aa30c3bc18', + './include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif' => '19f864cb81177840dcd534df4d537ea3', + './include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif' => '568d4cf84413656fb72fe39d1dd60f8d', + './include/javascript/tiny_mce/plugins/inlinepopups/editor_plugin_src.js' => '50960b97a8030fd80d582166fef4ab57', + './include/javascript/tiny_mce/plugins/inlinepopups/editor_plugin.js' => 'cbfebda03eef4bd608a86827948c4224', './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', @@ -5787,8 +5792,8 @@ $md5_string = array ( './include/javascript/tiny_mce/plugins/fullpage/langs/en_dlg.js' => '785c97d3367c6d1e38ef0992b1353bdf', './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/editor_plugin_src.js' => '15f73280d42ac9e9e942a8b6b3f151d0', + './include/javascript/tiny_mce/plugins/fullpage/editor_plugin.js' => 'd1032356ddc776fd7e532608d31491cb', './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', @@ -5800,18 +5805,18 @@ $md5_string = array ( './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', - './include/javascript/tiny_mce/plugins/emotions/img/smiley-wink.gif' => '4ae6aa98aa63363c16ea74f927696bd9', + './include/javascript/tiny_mce/plugins/emotions/img/smiley-wink.gif' => '897275ac7d07032b4d93fb83a0d2a41b', './include/javascript/tiny_mce/plugins/emotions/img/smiley-undecided.gif' => '3c0c011d16b1a2331385ed97e160a42a', './include/javascript/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif' => '5ec3bb4781c8e43a51d3a1a948b98fc0', - './include/javascript/tiny_mce/plugins/emotions/img/smiley-surprised.gif' => 'eff5a6fbfb80ca2d3ae929b0a1c15638', - './include/javascript/tiny_mce/plugins/emotions/img/smiley-smile.gif' => 'c676407db519bdf42481870746f097d8', - './include/javascript/tiny_mce/plugins/emotions/img/smiley-sealed.gif' => '28b9401b59fb7ad10b96f57aaa2630c4', + './include/javascript/tiny_mce/plugins/emotions/img/smiley-surprised.gif' => '2e136ebd637bf3e6c9fc6bdc20cbe73e', + './include/javascript/tiny_mce/plugins/emotions/img/smiley-smile.gif' => '2968a664098d9580079c66d628dad1a8', + './include/javascript/tiny_mce/plugins/emotions/img/smiley-sealed.gif' => 'bb828cb46b377d1589927a02f8fd1762', './include/javascript/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif' => '11c14bd1496afd0e21df115d25b68e96', - './include/javascript/tiny_mce/plugins/emotions/img/smiley-laughing.gif' => 'b691cfd07d8181059f8a4b041d534cc4', + './include/javascript/tiny_mce/plugins/emotions/img/smiley-laughing.gif' => 'c37f405db4e13cbebf24e745534687bf', './include/javascript/tiny_mce/plugins/emotions/img/smiley-kiss.gif' => '4ae8945f3960751b5d294f18242e144d', './include/javascript/tiny_mce/plugins/emotions/img/smiley-innocent.gif' => 'ec0477c8a206ff250782e40f9bae4b4c', './include/javascript/tiny_mce/plugins/emotions/img/smiley-frown.gif' => '59930208822fe755f651a67ef4b70530', - './include/javascript/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif' => '905294088277f201be5a8e0285fb7998', + './include/javascript/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif' => 'c12d9db6a14ad0b52f66f1e2cf2a38e7', './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', @@ -5820,15 +5825,15 @@ $md5_string = array ( './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/contextmenu/editor_plugin_src.js' => 'ec4c8ad26b5d4ca5b2797af7368d7923', + './include/javascript/tiny_mce/plugins/contextmenu/editor_plugin.js' => '80e3dfe19d1114b5d9f43681d7ca257d', + './include/javascript/tiny_mce/plugins/advlist/editor_plugin_src.js' => '092569e368c90e1fec73ae8fcefb7482', + './include/javascript/tiny_mce/plugins/advlist/editor_plugin.js' => '5f1c8625c04a6b0f4567c1c8d5e28ff9', './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/autosave/editor_plugin_src.js' => '04e075006476697b388dcb67d08faa2d', + './include/javascript/tiny_mce/plugins/autosave/editor_plugin.js' => 'b507e5eb5194814fcbe4a15fbb33ba11', './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', @@ -5836,11 +5841,11 @@ $md5_string = array ( './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' => 'da974094779f1ac765c18a11c4d712e4', - './include/javascript/tiny_mce/plugins/advimage/js/image.js' => 'dc0a67431bd013f8c3f70808e3c2ba26', + './include/javascript/tiny_mce/plugins/advimage/js/image.js' => 'e7b6df597c4dff20bf4dd0a5e5b541c6', './include/javascript/tiny_mce/plugins/advimage/img/sample.gif' => 'b9c7057c46716340e8967340ad11766e', './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/editor_plugin_src.js' => '009b379ce06642840f3124613afc7653', + './include/javascript/tiny_mce/plugins/advimage/editor_plugin.js' => '8af1f904909820d132bc0cbeb6469130', './include/javascript/tiny_mce/plugins/advimage/css/advimage.css' => 'cce2bc7334ac52894124133d62c8d09c', './include/javascript/tiny_mce/plugins/advhr/rule.htm' => '2f9aa46095b089e2f6ebad2ffc0a91fd', './include/javascript/tiny_mce/plugins/advhr/langs/en_dlg.js' => 'e391a69cc61c4e4b53a4d9d5bd802762', @@ -5888,6 +5893,8 @@ $md5_string = array ( './include/images/blank.gif' => 'fc94fb0c3ed8a8f909dbc7630a0987ff', './include/images/SugarPlanet.swf' => '5af57f2ee896225c65d9411aa2a1b971', './include/globalControlLinks.php' => 'e799fcdc1c62c64cad1e510c27ec4eb0', + './include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectAccountButton.php' => 'c2e868618957d4ca35672856c08c84a2', + './include/generic/SugarWidgets/SugarWidgetSubPanelRemoveButtonAccount.php' => '503004a448632edb80bf9e300af04e15', './include/generic/SugarWidgets/SugarWidgetFieldfile.php' => '505f0a17d9490b2ad3d1b9aba1796b5f', './include/generic/SugarWidgets/SugarWidgetSubPanelTopSummaryButton.php' => '9c9f46e0a17dbaa7e9fbe95d670306fa', './include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectUsersButton.php' => '5e1402674ccb9c3db535a3627f45836f', @@ -5900,11 +5907,11 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateLeadNameButton.php' => '667eb6757dbf32f9c181eab154c2117a', './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateCampaignLogEntryButton.php' => 'd26f66486c121b664a807625689b9337', './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateAccountNameButton.php' => 'c0e334312940ac4df14233c337ce2249', - './include/generic/SugarWidgets/SugarWidgetSubPanelTopComposeEmailButton.php' => 'aedcca5671c18f0bd81a58b3fbddf655', + './include/generic/SugarWidgets/SugarWidgetSubPanelTopComposeEmailButton.php' => 'c5cef239d43214b5330216cd38cd48e3', './include/generic/SugarWidgets/SugarWidgetSubPanelTopButtonQuickCreate.php' => 'f851bb2972ae86b210ae24d47f7e1e60', - './include/generic/SugarWidgets/SugarWidgetSubPanelTopButton.php' => '01ef3b0c348eeaf1b16d0ab294680ff6', + './include/generic/SugarWidgets/SugarWidgetSubPanelTopButton.php' => '69a503feb3570b9d7c041d9b2df1bce7', './include/generic/SugarWidgets/SugarWidgetSubPanelTopArchiveEmailButton.php' => '39e39d2fe63a6a1f9c726e44d8c76d52', - './include/generic/SugarWidgets/SugarWidgetSubPanelRemoveButtonProjects.php' => '747eefd9e49f8bbf00d0b017f397d7d5', + './include/generic/SugarWidgets/SugarWidgetSubPanelRemoveButtonProjects.php' => '3a1863e4e6e47e4929afbfe5b6b5fac9', './include/generic/SugarWidgets/SugarWidgetSubPanelRemoveButtonMeetings.php' => '675f3e0fbf1b9260e8a281033e8fc495', './include/generic/SugarWidgets/SugarWidgetSubPanelRemoveButton.php' => 'dc58eae598d1940f370fc9c3774cfd43', './include/generic/SugarWidgets/SugarWidgetSubPanelLoadSignedButton.php' => 'c6dd95bef731b4c920d3801c3e59a5c8', @@ -5913,14 +5920,14 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetSubPanelEmailLink.php' => '3e1767379cc708fd6451dc367c02676a', './include/generic/SugarWidgets/SugarWidgetSubPanelEditRoleButton.php' => '064b42a25e85e539c56b8dcffbcf1403', './include/generic/SugarWidgets/SugarWidgetSubPanelEditButton.php' => 'e1173f56588c330420087f88e2948333', - './include/generic/SugarWidgets/SugarWidgetSubPanelDetailViewLink.php' => '4ccb3b4212c2f5e8b63e52d17b9f5c5d', + './include/generic/SugarWidgets/SugarWidgetSubPanelDetailViewLink.php' => '7daed673f7686bc2eaa7a52239a021f0', './include/generic/SugarWidgets/SugarWidgetSubPanelConcat.php' => '93792be841b1072969c664df3f9afddd', './include/generic/SugarWidgets/SugarWidgetSubPanelCloseButton.php' => '335cea49a5878381f30799a25c657710', './include/generic/SugarWidgets/SugarWidgetSubPanelActivitiesStatusField.php' => 'e44858a1a49a853de8d4653f3cc3fd97', - './include/generic/SugarWidgets/SugarWidgetReportField.php' => '092db9ad91835c2f1fda5aa2c63ecb10', + './include/generic/SugarWidgets/SugarWidgetReportField.php' => '2f7caf21939edeca0625447a75e46bd3', './include/generic/SugarWidgets/SugarWidgetFieldvarchar.php' => '0559010aef7286a3dd1a9acbd1e3ef95', './include/generic/SugarWidgets/SugarWidgetFielduser_name.php' => '5c0d58c825aec0607c90f0fa9c9368a0', - './include/generic/SugarWidgets/SugarWidgetFieldurl.php' => 'c0badd2d5a706169fa99ecdfad5732fc', + './include/generic/SugarWidgets/SugarWidgetFieldurl.php' => '56876b67d48c659338febb7f469f7e20', './include/generic/SugarWidgets/SugarWidgetFieldtime.php' => 'f51d1cb46b1404f1316c82836918f586', './include/generic/SugarWidgets/SugarWidgetFieldtext.php' => '54198ef510dc205f6cd0a8c21b627798', './include/generic/SugarWidgets/SugarWidgetFieldsingleenum.php' => 'f060510b8fa83e0cfcc7eb5f663e5f8d', @@ -5930,17 +5937,17 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetFieldparent_type.php' => '010d41fbf45e91e770669568a5145ee0', './include/generic/SugarWidgets/SugarWidgetFieldnum.php' => 'b24e524abcf7997e95865021f1b87d60', './include/generic/SugarWidgets/SugarWidgetFieldname.php' => '9efe843670aed09679879a66d10fcb27', - './include/generic/SugarWidgets/SugarWidgetFieldmultienum.php' => '4d8ad52ef0773e1a16b22c769a6f1857', + './include/generic/SugarWidgets/SugarWidgetFieldmultienum.php' => 'be240e4da2ea9b4543886fd8b974346e', './include/generic/SugarWidgets/SugarWidgetFieldlongtext.php' => 'db9f5ce68ae366c538edd147d9082e0d', - './include/generic/SugarWidgets/SugarWidgetFieldint.php' => '8d2f566c01ab32be7ed2c8fdc720bf7c', + './include/generic/SugarWidgets/SugarWidgetFieldint.php' => '8f0285935954f5c4dd9a16ceeeee2567', './include/generic/SugarWidgets/SugarWidgetFieldimage.php' => '3f9a938aa9933db633f38c97e50b9983', './include/generic/SugarWidgets/SugarWidgetFieldid.php' => 'ebd4da373e066e3db5753f653363a298', './include/generic/SugarWidgets/SugarWidgetFieldfullname.php' => '54bd4fbf0e32e4c3a053867815d0bf9e', './include/generic/SugarWidgets/SugarWidgetFieldfloat.php' => '2e6a7dfb394741ed2063b0f3e4313e41', - './include/generic/SugarWidgets/SugarWidgetFieldenum.php' => 'eb1e087197e324d78527315b741022ca', + './include/generic/SugarWidgets/SugarWidgetFieldenum.php' => 'f3bce63670b3871add632a21b82d976a', './include/generic/SugarWidgets/SugarWidgetFieldemail.php' => 'c0f3220ad4123ae1d8307f08a476ee84', './include/generic/SugarWidgets/SugarWidgetFielddouble.php' => '78b80591d1f30667c3ae4ec25711b3e7', - './include/generic/SugarWidgets/SugarWidgetFielddecimal.php' => 'a3578ea81adeb5ba4e39998e300753cd', + './include/generic/SugarWidgets/SugarWidgetFielddecimal.php' => '85891b39c359f08f06ca5be4c49b4ce1', './include/generic/SugarWidgets/SugarWidgetFielddatetimecombo.php' => 'bdb2e2a0a7defcd305f1a09c062f37fa', './include/generic/SugarWidgets/SugarWidgetFielddatetime.php' => '3f38fd47b01da7d82094fea7f3be3a8c', './include/generic/SugarWidgets/SugarWidgetFielddatepicker.php' => '086e5a71312fe06f267e43d37145bf46', @@ -5950,10 +5957,10 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetFieldbool.php' => 'f204856e09e4559462cafd9db01846cc', './include/generic/SugarWidgets/SugarWidgetField.php' => '606c1ac30b3a5f786c4d7c8d3e0e374f', './include/generic/SugarWidgets/SugarWidget.php' => '4edff0b5fec741dc5ec5212a9b3c1465', - './include/generic/Save2.php' => '0314379008eb288d200406e362a5dd13', + './include/generic/Save2.php' => '7361b0d73455ce238553a2bc166517cb', './include/generic/LayoutManager.php' => 'a87b35af9f4ce6e851797f94b6772425', './include/generic/DeleteRelationship.php' => '1c38fca0d35f81fb923b9271d4f96be3', - './include/formbase.php' => 'ea5ba7e5d169135ec0dc3bad62fdb790', + './include/formbase.php' => '74d113e09f1fbf583c20b5d5208cba57', './include/fonts/License.html' => '8a22bc6b773aeb68f9748fd1920f84d4', './include/fonts/Times-Roman.afm' => 'f257a72c31f6a864f4e0994b1771628c', './include/fonts/Times-Italic.afm' => 'c41212e70e19627889aefef85212a47d', @@ -5973,27 +5980,27 @@ $md5_string = array ( './include/database/SqlsrvHelper.php' => '6cf5af120c1644866c0687ba1773d69e', './include/database/PearDatabase.php' => '029e54b3c4a2c9da75bdab75b906232e', './include/database/MysqliHelper.php' => '8824aa4be4b5946c8a6ad53d55d43adc', - './include/database/MysqlHelper.php' => 'da8cdfc7ed211c2efe150076a5c97f92', - './include/database/MssqlHelper.php' => '727598ad9e35def5757640a2818c3c77', - './include/database/FreeTDSHelper.php' => '9ae636614787b3c3b81fcaa7a2657c4b', - './include/database/DBHelper.php' => '5156f8c5e4e26056eedbddfd17fdb74b', + './include/database/MysqlHelper.php' => 'ca56e3517a8cbce5581085683c8da6c9', + './include/database/MssqlHelper.php' => '816ee7b712d115590aa69eabead42f52', + './include/database/FreeTDSHelper.php' => '443a191f7dd5794fbe60c440dce3e426', + './include/database/DBHelper.php' => '6c59be06ba61855d107155620dfe59e5', './include/database/SqlsrvManager.php' => '659363159024ac1885d50f8a8e3c31e3', './include/database/MysqliManager.php' => '4b7748362a9ffbd38288cbd8619c0f89', './include/database/MysqlManager.php' => '2fb21197c234df9ffca41ff9ab486a8a', - './include/database/MssqlManager.php' => '8bb36894e819615ac08d9ea42ae6f713', + './include/database/MssqlManager.php' => '26cd1d5982d91a3287ba8a9f96c1cd2f', './include/database/FreeTDSManager.php' => '72cca97832b03356146faa2d49a2cbed', './include/database/DBManagerFactory.php' => 'dbea844f739891e4bc59806f29775819', - './include/database/DBManager.php' => 'e5856bae54b077021258ed8825d3ad72', + './include/database/DBManager.php' => 'a7e65da839eb59f20b505eca1da80959', './include/controller/Controller.php' => '154eadef52691f5edbbd7b17eb72b406', './include/contextMenus/menuDefs/sugarPerson.php' => '1978579cd6c1b4b54e070f81ddc7a166', './include/contextMenus/menuDefs/sugarObject.php' => 'c89b133cb16a4a1ea664ea79785331c4', './include/contextMenus/menuDefs/sugarAccount.php' => '0db8d49b43485da49eaafb4da4ce1bef', './include/contextMenus/contextMenu.php' => 'f4625bd3cef2c3579343ac734b7e2b75', './include/connectors/utils/ConnectorUtils.php' => '81d0d28d7490e653c90037956bb77083', - './include/connectors/sources/loc/xml.php' => 'd75aa5e0e08d2ea04b283ed397235e40', - './include/connectors/sources/ext/soap/soap.php' => 'f15da7e57e8dac314c819cccaed3933d', - './include/connectors/sources/ext/rest/rest.php' => '223d5dbdcaa38397c1606a493b935ee1', - './include/connectors/sources/default/source.php' => '158741672bd0289e33fd97fbd2fe5938', + './include/connectors/sources/loc/xml.php' => '9de23526c28a913c11b7d2094f2fdc26', + './include/connectors/sources/ext/soap/soap.php' => 'fbb8e1f311a85c341c3645cf3beec5b9', + './include/connectors/sources/ext/rest/rest.php' => 'ee574d1a601e2926cb5a3cc66f28e36c', + './include/connectors/sources/default/source.php' => '7634f7b8fdc70842eebc463ef8f1c591', './include/connectors/sources/SourceFactory.php' => '8e2a76bda89e905821aee0568cb65fed', './include/connectors/formatters/ext/soap/tpls/default.tpl' => '30ac6e34be2b90079b7fa67e9916439b', './include/connectors/formatters/ext/rest/tpls/default.tpl' => 'a775bb54d09a292b0c3940f30758199a', @@ -6004,17 +6011,17 @@ $md5_string = array ( './include/connectors/filters/FilterFactory.php' => 'd53cd8955943d64505bb4ecdc91a566a', './include/connectors/component.php' => 'fadbde05bb43c748780f2d435bf506dc', './include/connectors/ConnectorFactory.php' => '2d0e0081aefc3f1f68bd386ef6c525fc', - './include/VarDefHandler/vardef_meta_arrays.php' => '72c7c2d7a7f384b8f9c0c8bdc5dad8bc', - './include/VarDefHandler/listvardefoverride.php' => '9e156066bd3f24d00b62844589162ab1', + './include/VarDefHandler/vardef_meta_arrays.php' => 'ef9152d645fc0e97041e4d6e9f8174a2', + './include/VarDefHandler/listvardefoverride.php' => 'd79b73457de94f7d3c2d485d7643b501', './include/VarDefHandler/VarDefHandler.php' => 'ed481a168b11ed8306efdce0725e7b1f', './include/TimeDate.php' => '2bfe3be6536522e4e4a749efe3fda4ac', - './include/TemplateHandler/TemplateHandler.php' => '9e4ebefacb3c26d214b7d101ed3d5b16', + './include/TemplateHandler/TemplateHandler.php' => '9fc0236df420bb0bd910d632dbc31d27', './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' => 'bb65ce6b8e936d7cbd10b2f66bcd0ab4', + './include/Sugarpdf/Sugarpdf.php' => '2740d9331dc458a155f4daae744d2814', './include/Sugarpdf/FontManager.php' => '2d3b8e82caaa71e278519755dacadc9f', './include/Sugar_Smarty.php' => '7318c3410d439cf41bc59faae6cce89a', './include/SugarTinyMCE.php' => '2cf04b4dca0e7c5f258f0b9d6745a0fb', @@ -6033,7 +6040,7 @@ $md5_string = array ( './include/SugarCache/SugarCacheAbstract.php' => '17c685bba109994950cdc66be58c4460', './include/SugarCache/SugarCacheAPC.php' => '0a237e55d4dc674145da1648576cbd28', './include/SugarCache/SugarCache.php' => '94c075853d48cea91295e3bc45327f69', - './include/SugarObjects/templates/sale/vardefs.php' => 'c165fdc44aee37fdaa6918544b1f8fdc', + './include/SugarObjects/templates/sale/vardefs.php' => '881b5f93e8c668224b60137bfec03b08', './include/SugarObjects/templates/sale/metadata/subpanels/default.php' => 'e2ca78fec0686be0c1d1e6400a5c272a', './include/SugarObjects/templates/sale/metadata/searchdefs.php' => '02f9d5317fb7b44bfa9a1a965512e295', './include/SugarObjects/templates/sale/metadata/quickcreatedefs.php' => '79e142c2d4123c34583433beb29a23bf', @@ -6055,7 +6062,7 @@ $md5_string = array ( './include/SugarObjects/templates/sale/config.php' => '3bbc93005435531e82a062995275aa73', './include/SugarObjects/templates/sale/Sale.php' => 'ede92e3a280a4e7e867f74f820a5203a', './include/SugarObjects/templates/sale/Chance.php' => 'cd3cd899960aad0b6d8a5923945ce1d8', - './include/SugarObjects/templates/person/vardefs.php' => 'f06952ce3baa085dca19cfc81c464147', + './include/SugarObjects/templates/person/vardefs.php' => '67fe770573dd11e94d6098db5a4d4ade', './include/SugarObjects/templates/person/metadata/subpanels/default.php' => '3b440daa07cb13eed84d9f17fe760247', './include/SugarObjects/templates/person/metadata/searchdefs.php' => 'f93632d572c037bcaabf57e6235c3b93', './include/SugarObjects/templates/person/metadata/quickcreatedefs.php' => '0440e58a5af79ebdaf0fbc22bea4d06d', @@ -6066,13 +6073,13 @@ $md5_string = array ( './include/SugarObjects/templates/person/metadata/detailviewdefs.php' => '9950f07eec92ea20ff547aa124fd66ac', './include/SugarObjects/templates/person/metadata/dashletviewdefs.php' => 'f0fc642c2ddf3806d4991dff03fc8ebe', './include/SugarObjects/templates/person/metadata/SearchFields.php' => '93a6bbb32c383e0521d4919c7f5c31ed', - './include/SugarObjects/templates/person/language/en_us.lang.php' => 'f88a4783490d03a765fe3319803fa368', + './include/SugarObjects/templates/person/language/en_us.lang.php' => '9fb161421e76265f4356e8c478f9e4a0', './include/SugarObjects/templates/person/icons/person_32.gif' => '1550c24a793910550200679be1c5c078', './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' => 'abe4936804e3a8a7a83cebb32e7c828a', - './include/SugarObjects/templates/issue/vardefs.php' => '9bd9c6c69cd4833ce5bb3713e0eb7d0b', + './include/SugarObjects/templates/issue/vardefs.php' => '2cde5d7c79db04f5ba31b51a733be453', './include/SugarObjects/templates/issue/metadata/subpanels/default.php' => 'c4ad08eb6c1a932e1a26fc844def6b5e', './include/SugarObjects/templates/issue/metadata/searchdefs.php' => '8b387defff2b8da8873d8201281a7357', './include/SugarObjects/templates/issue/metadata/quickcreatedefs.php' => '8fa0c1441c7f5adc5e3431a0f6a4d2dd', @@ -6090,8 +6097,8 @@ $md5_string = array ( './include/SugarObjects/templates/issue/icons/Createissue.gif' => '269352232732ae705318612e960b9eba', './include/SugarObjects/templates/issue/config.php' => 'e03e19e958bd61c5964a0cf4f2f0304a', './include/SugarObjects/templates/issue/Issue.php' => '6f554147a4971954c1b42295b965949c', - './include/SugarObjects/templates/file/views/view.edit.php' => '16d99d3314bdaafd0d14d3bf3be827b5', - './include/SugarObjects/templates/file/vardefs.php' => 'e84fc8b69f07435478228715a06a5cba', + './include/SugarObjects/templates/file/views/view.edit.php' => '406460b40a8b5a92898c44695f1d8289', + './include/SugarObjects/templates/file/vardefs.php' => '7dfb1be511028f2da373b1e3abd2caab', './include/SugarObjects/templates/file/metadata/subpanels/default.php' => 'dd9fa46c03bcd7e6b11fd34e08d6e462', './include/SugarObjects/templates/file/metadata/searchdefs.php' => '7160ba30d43ad69e3ffbcae530ef3fba', './include/SugarObjects/templates/file/metadata/quickcreatedefs.php' => 'a9bfc0f4a6b648ff7b67131337d2869a', @@ -6108,7 +6115,7 @@ $md5_string = array ( './include/SugarObjects/templates/file/icons/Createfile.gif' => '3ed1d93938f715b1af93c0e99e900af5', './include/SugarObjects/templates/file/controller.php' => '247d2ff4c926c2cbcd3335122af88011', './include/SugarObjects/templates/file/File.php' => '1b0e94e667d3931269e050b3678dcdca', - './include/SugarObjects/templates/company/vardefs.php' => '25ad92fbdecc4b97a28c59a75ac255e8', + './include/SugarObjects/templates/company/vardefs.php' => '32f7c89c0de6e3fc0042d42de6cca085', './include/SugarObjects/templates/company/metadata/subpanels/default.php' => '50d50dfbe4537790622a3672973e664c', './include/SugarObjects/templates/company/metadata/searchdefs.php' => '8957871d61cfa25e93848382477010e3', './include/SugarObjects/templates/company/metadata/quickcreatedefs.php' => '543bc8145e2188442c70d8ba5c0dd4ac', @@ -6126,7 +6133,7 @@ $md5_string = array ( './include/SugarObjects/templates/company/icons/Createcompany.gif' => '3978b32e01cbeb974d86b1da0617dae9', './include/SugarObjects/templates/company/config.php' => 'd825515c26de5dd1e6da23bb80c40e9b', './include/SugarObjects/templates/company/Company.php' => '224fba6fa8057e01c94336de9dad822b', - './include/SugarObjects/templates/basic/vardefs.php' => '06281a692bd246a9e372dd6fc130f715', + './include/SugarObjects/templates/basic/vardefs.php' => '5c3029d1b35fcbf96eb7e90fb7c25251', './include/SugarObjects/templates/basic/metadata/subpanels/default.php' => '7ac8c114426f72d48d14aa4c938268d9', './include/SugarObjects/templates/basic/metadata/searchdefs.php' => '27309077aeef0138ee27a5e0ddccffbc', './include/SugarObjects/templates/basic/metadata/quickcreatedefs.php' => 'db11e319cfbfb8499fca0d8bcf684233', @@ -6186,6 +6193,7 @@ $md5_string = array ( './include/SugarFields/Parsers/EditViewMetaParser.php' => '6342568256e9006675e9f55120476233', './include/SugarFields/Parsers/DetailViewMetaParser.php' => '3e1e3f8fc88bced68ec463990130b0f6', './include/SugarFields/Fields/Id/SugarFieldId.php' => 'e0d77e459779dd4113cd30baf249f94c', + './include/SugarFields/Fields/Encrypt/SugarFieldEncrypt.php' => '747a791c00fe34a50ece329b63ce056a', './include/SugarFields/Fields/Username/SugarFieldUsername.php' => '88d57b736369475093c1246e0867101b', './include/SugarFields/Fields/Username/DetailView.tpl' => '6c170bb644283c0f1833d7910b470eaa', './include/SugarFields/Fields/URL/ListView.tpl' => '339dd0886ba39dc5c9f31aeb5ffef2fc', @@ -6208,8 +6216,8 @@ $md5_string = array ( './include/SugarFields/Fields/Phone/DetailView.tpl' => '42d01015f6eec00ba51dcd84945497cd', './include/SugarFields/Fields/Password/SugarFieldPassword.php' => '6324890226f616bf1444c1c743d3e576', './include/SugarFields/Fields/Password/EditView.tpl' => '5a8b8690e57bc38dda46bb6a0e61d864', - './include/SugarFields/Fields/Parent/SugarFieldParent.php' => '41f8fa5900cc4c38e584782fd8a6fdeb', - './include/SugarFields/Fields/Parent/SearchView.tpl' => 'c78ab4f783dd046f3d3a7635bac557db', + './include/SugarFields/Fields/Parent/SugarFieldParent.php' => '3cd6c6b732cd5c3781a3e0375df622e7', + './include/SugarFields/Fields/Parent/SearchView.tpl' => '62dab5bae7fca5e88b270e3971b2188d', './include/SugarFields/Fields/Parent/EditView.tpl' => '974c1f9429b7b0bfd9ff10a82ff524a9', './include/SugarFields/Fields/Parent/DetailView.tpl' => '43c0b59004d5c2d581d0ce431923cbbb', './include/SugarFields/Fields/Multienum/SugarFieldMultienum.php' => '7a2f80ebff62388de1a1218dc7ebc914', @@ -6224,7 +6232,7 @@ $md5_string = array ( './include/SugarFields/Fields/Int/RangeSearchForm.tpl' => 'd8c7c0a12155d6c95f1e1b6f0b7990ec', './include/SugarFields/Fields/Int/SugarFieldInt.php' => 'fcb2406fdd3252bdb905236dcff14ea8', './include/SugarFields/Fields/Int/SearchForm.tpl' => '328db9c1f6d608f6c4b55c9528170463', - './include/SugarFields/Fields/Int/EditView.tpl' => '53e2dbab0d2830fa6fc05433d7cf2027', + './include/SugarFields/Fields/Int/EditView.tpl' => 'd16865271017dbc85870f320566e2fa5', './include/SugarFields/Fields/Int/DetailView.tpl' => '470958235306be68471cc439fab4888c', './include/SugarFields/Fields/Iframe/EditView.tpl' => 'bacaa9dc02c75000eaed3724023dbfd1', './include/SugarFields/Fields/Iframe/DetailView.tpl' => 'a17f569da4dcfe2fb401ae6e295b23aa', @@ -6233,13 +6241,13 @@ $md5_string = array ( './include/SugarFields/Fields/Fullname/SugarFieldFullname.php' => '223fee90ff8e764b5de216b44c4c110d', './include/SugarFields/Fields/Fullname/DetailView.tpl' => 'a3b5737d00b4370070fdcb2947f12e5c', './include/SugarFields/Fields/Float/SugarFieldFloat.php' => '2e986db8221d8381094a0cfc55b37c3f', - './include/SugarFields/Fields/Float/EditView.tpl' => '2d68a06fdf2c1e032fc144905af33437', + './include/SugarFields/Fields/Float/EditView.tpl' => '9cffce33ce46cfdbbddd9803eb0b5fda', './include/SugarFields/Fields/Float/DetailView.tpl' => '82f280a7d4e3f74d2ab0cd481021fe3d', './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', - './include/SugarFields/Fields/File/EditView.tpl' => '76ef95550d9f50581f43fdaa2af3cc77', + './include/SugarFields/Fields/File/SugarFieldFile.php' => '5178a493455ac17bde7305e19325473f', + './include/SugarFields/Fields/File/EditView.tpl' => '028da6704e78020d9bd75c2554d5d907', './include/SugarFields/Fields/File/DetailView.tpl' => 'b2b300b0591fd73e4ea65f597ea0235c', './include/SugarFields/Fields/Enum/SugarFieldEnum.php' => '01b94cd983a49a9e5e3a293a6cdec390', './include/SugarFields/Fields/Enum/SearchView.tpl' => '98e0ef529a1f684b9ee2a0dab4e1c340', @@ -6258,7 +6266,7 @@ $md5_string = array ( './include/SugarFields/Fields/Datetime/EditView.tpl' => '5b9f0dae101531713a87513ae0a8cf91', './include/SugarFields/Fields/Currency/SugarFieldCurrency.php' => '634092129fd9a7cddb7cd8cefeaa1c6c', './include/SugarFields/Fields/Currency/ListView.tpl' => 'c62e2997785bf58a314576d5a69fb6f9', - './include/SugarFields/Fields/Currency/EditView.tpl' => 'df0a9a55388c72e731733fa6744569f9', + './include/SugarFields/Fields/Currency/EditView.tpl' => '2a8d5393da74d525587fe93e6081ad28', './include/SugarFields/Fields/Currency/DetailView.tpl' => '07b10accc2d817376b207b935182c60b', './include/SugarFields/Fields/Collection/SugarFieldCollection.js' => '5ffc9d59b804433cc7eb773ccb74c2de', './include/SugarFields/Fields/Collection/view.sugarfieldcollection.php' => '626c0b184463b413735031b6c051db97', @@ -6277,7 +6285,7 @@ $md5_string = array ( './include/SugarFields/Fields/Bool/EditView.tpl' => 'e30bc5db71990f5f1b6e8f9a0511bb30', './include/SugarFields/Fields/Bool/DetailView.tpl' => '6d8a2d953312d93623be3c4f53d2307f', './include/SugarFields/Fields/Base/ImportViewFunction.tpl' => '5b76f6e87fe309b025410c85ae4c748b', - './include/SugarFields/Fields/Base/SugarFieldBase.php' => '776accbfec8e34e9e7736936a98b6d0c', + './include/SugarFields/Fields/Base/SugarFieldBase.php' => '36032eae7229583ca0cdc1bb93924ba7', './include/SugarFields/Fields/Base/SearchForm.tpl' => '3d1bf0d12f4169c071b0a0e7bd7c6965', './include/SugarFields/Fields/Base/ListView.tpl' => 'f91fe91fef2adda8dcd3e2b3dd5fa8ea', './include/SugarFields/Fields/Base/InlineEditView.tpl' => 'e4c0cf52300a9cf39d0f1b1d0b1ce10a', @@ -6290,17 +6298,17 @@ $md5_string = array ( './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' => 'b2ee11d877f46a9daf5853f7296afe6e', - './include/SugarFields/Fields/Address/en_us.EditView.tpl' => '40eaefd79f8905ebdf00a50c70ba584d', + './include/SugarFields/Fields/Address/en_us.EditView.tpl' => '3b56e6a7f0bce108036f6f397ee096f5', './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' => '0f23e3cb81fd179a58808f826ab0290f', - './include/SugarEmailAddress/templates/forWideFormBodyView.tpl' => 'efe15e918b67fd104ecd8fd0c2f73d51', - './include/SugarEmailAddress/templates/forEditView.tpl' => 'eb5333b8735f14017df0d04ded51a009', + './include/SugarEmailAddress/SugarEmailAddress.js' => 'a71eae238abbb142e667873aa62a9d02', + './include/SugarEmailAddress/templates/forWideFormBodyView.tpl' => '6d07e3db7e16d09cc2e4b3752169fbd4', + './include/SugarEmailAddress/templates/forEditView.tpl' => 'ab460b18fc7f4307b2491ed83461417c', './include/SugarEmailAddress/templates/forDuplicatesView.tpl' => '48529a015533cdd2ce8db08a826dd09c', './include/SugarEmailAddress/templates/forDetailView.tpl' => '75be62dc812205b17178d2aebecd2f19', - './include/SugarEmailAddress/SugarEmailAddress.php' => '41a1050b9e16c0bd648fe322c3912b53', + './include/SugarEmailAddress/SugarEmailAddress.php' => '2e4f5009d68fc82b3f5ff1d477ae1547', './include/SugarDependentDropdown/metadata/dependentDropdown.php' => 'ef0d061a5bfb5641e65f55560213e209', './include/SugarDependentDropdown/javascript/SugarDependentDropdown.js' => '480bc0db43abac0ec4ddcde0db5f1014', './include/SugarDependentDropdown/SugarDependentDropdown.php' => 'c27f9273801a6686f233b4ed1100b369', @@ -6313,21 +6321,21 @@ $md5_string = array ( './include/SugarCharts/swf/pieChart.swf' => 'c8a528dc470ac904864ea88549b3adc9', './include/SugarCharts/swf/stackedGroupByChart.swf' => '0d524ea04b2c56d1c7cdc86194f59ed1', './include/SugarCharts/SugarChartFactory.php' => 'ff55d866d2c0fde548e7666aff189ebc', - './include/SugarCharts/JsChart.php' => '05f53698530fa26980b46fcf38ea39e0', + './include/SugarCharts/JsChart.php' => 'd64efdcda7729a78d897f0d283dbb017', './include/SugarCharts/Jit/tpls/chart.tpl' => 'e224555cacd075ed49e115b7b6d0049e', './include/SugarCharts/Jit/tpls/DashletGenericChartScript.tpl' => '5197cef3a47d67ee627e15446d287a46', './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/js/Jit/jit.js' => '36abd719897cd5133ee2c6d058ac0766', './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' => '798a1cd52de13f7a2efc0e341aa75ab3', - './include/SugarCharts/Jit/FlashCanvas/flashcanvas.js' => 'b18d4e7c945e2d63ae1045a2739f20e8', + './include/SugarCharts/Jit/FlashCanvas/flashcanvas.js' => '86de320aa1b95f1cd645f03b76edd237', './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/SugarCharts/SugarChart.php' => 'f54b507f2d04cfcb2b670f408dfd9192', './include/SubPanel/SubPanelTiles.js' => '50e304ca37344ff17a4a07100aaa0b34', './include/SubPanel/tpls/singletabmenu.tpl' => '61d073f56fa3fbee90daa84950fb60a3', './include/SubPanel/subpanels.txt' => '8b89c0ee2426d40916d98a646ec26e7a', @@ -6336,7 +6344,7 @@ $md5_string = array ( './include/SubPanel/SubPanelViewer.php' => '90e1b9be158b208af3fdd4224621dc63', './include/SubPanel/SubPanelTilesTabs.php' => '1cb4c27d253c46049261c2468f7135bc', './include/SubPanel/SubPanelTiles.php' => '93eadec16e9185ec3db437dd0e8b9a28', - './include/SubPanel/SubPanelDynamic.html' => 'f50e7154970810e879e6711d74e1c33c', + './include/SubPanel/SubPanelDynamic.html' => '1abd391224e145ca37f1ad9debf8fb71', './include/SubPanel/SubPanelDefinitions.php' => 'fbb751b4996caed6034ceeb36edf7ccd', './include/SubPanel/SubPanel.php' => '903b340cbcbd48face10f17625b57b41', './include/Smarty/plugins/shared.make_timestamp.php' => '2d98e1b8ae60c93316d90bf152d3f5a5', @@ -6445,17 +6453,17 @@ $md5_string = array ( './include/Smarty/COPYING.lib' => '8c2e1ec1540fb3e0beb68361344cba7e', './include/SearchForm/tpls/header.tpl' => '6fd75109a10398c760c2b4c42063c9e5', './include/SearchForm/tpls/footer.tpl' => '6b6c94cb29d2ab3259a6a17a9078f16e', - './include/SearchForm/tpls/SearchFormGenericAdvanced.tpl' => '6c503de6635ffff0d7a3cf913add9a70', + './include/SearchForm/tpls/SearchFormGenericAdvanced.tpl' => '8513d66e5e35f7a5d8e6aa10bcdaa00a', './include/SearchForm/tpls/SearchFormGeneric.tpl' => '6bd324f8c9145e9a100aa6f99efc5a20', './include/SearchForm/SugarSpot.php' => '0536606cc025c51415010ff7ea4c307b', - './include/SearchForm/SearchForm2.php' => '4688db6c2a243ef6a03c6f8f2e772783', + './include/SearchForm/SearchForm2.php' => '97133d2d69719b427141a77246850b3b', './include/SearchForm/SearchForm.php' => '021ef820b8e6de5685cce6e79cdb1648', - './include/QuickSearchDefaults.php' => '3f9a7c6b166894971f7cc0b4cf5b19c7', + './include/QuickSearchDefaults.php' => '88b97ced88d3731c401b56b94c91e775', './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', + './include/Popups/PopupSmarty.php' => '5d98043dfed17471253b101177a6ae7e', './include/Pear/XML_HTMLSax3/LICENSE' => 'a45bb1bbeed9e26b26c5763df1d3913d', './include/Pear/XML_HTMLSax3/HTMLSax3/States.php' => '5b528baa84631f85349a7183597d2fb3', './include/Pear/XML_HTMLSax3/HTMLSax3/Decorators.php' => '34a9a95566c891f013584073fbadaf7e', @@ -6465,23 +6473,23 @@ $md5_string = array ( './include/Pear/Crypt_Blowfish/license.txt' => 'a45bb1bbeed9e26b26c5763df1d3913d', './include/Pear/Crypt_Blowfish/Blowfish/DefaultKey.php' => '8274b556662cc178342ea96940b36514', './include/Pear/Crypt_Blowfish/Blowfish.php' => 'b391980575340d0fe5bf2df72bc13932', - './include/OutboundEmail/OutboundEmail.php' => '37e5683633001d3cc76759d494ccc948', + './include/OutboundEmail/OutboundEmail.php' => '6ce7befed23ccff901113d8336100c62', './include/MySugar/tpls/retrieveReportCharts.tpl' => '8d16a5e11f1c08ac4b6b362f20c68add', './include/MySugar/tpls/retrievePage.tpl' => '2154171130e87a814aa990d1e9bf3403', './include/MySugar/tpls/dashletsSearchResults.tpl' => '7bf094ad0bb191aa01959486e7cd6444', './include/MySugar/tpls/chartDashletsSearchResults.tpl' => '025432deb422b2675876a8c4d27cb15c', './include/MySugar/tpls/addDashletsDialog.tpl' => '6c91f3cefcd2a8e9997631bc2cbb4c65', './include/MySugar/tpls/MySugar.tpl' => '10c556f20699f03dcbb213e5c629e877', - './include/MySugar/javascript/MySugar.js' => '0b016da5053fc36e5ee7ae05c74ae04e', + './include/MySugar/javascript/MySugar.js' => 'b35073d24f6fa5b2046eba37e9aeb14f', './include/MySugar/MySugar.php' => '49a8305a2193bbe445ac092d22ff854d', './include/MySugar/DashletsDialog/DashletsDialog.php' => 'e16fcfab4cb76f1cbfb4d8d4fb53100a', - './include/MassUpdate.php' => 'c3f2e6188f5b6afff2958a08ac95afcb', + './include/MassUpdate.php' => '9a5b3903de0deb19f3f0860a5fd32c8b', './include/MVC/View/views/view.xml.php' => '028d18c71c2dae2db826d0cc6d32306c', './include/MVC/View/views/view.vcard.php' => '32fa32960fe82caee39fcb8833541ad5', './include/MVC/View/views/view.sugarpdf.php' => '334694668f28d954182d05c196eef396', './include/MVC/View/views/view.sugarpdf.config.php' => 'e98d6968b4b8a70797d07b311553e7f0', './include/MVC/View/views/view.serialized.php' => '6746e128e8dacee78ecbf70ea3559cbb', - './include/MVC/View/views/view.quickcreate.php' => 'b5d1b6e53d0aee0462eef68463a8a333', + './include/MVC/View/views/view.quickcreate.php' => 'a284e9d16d7b9b6d641b93c77edc117b', './include/MVC/View/views/view.quick.php' => '9a1fa9ad8fce5230124ee320fcc42266', './include/MVC/View/views/view.popup.php' => '840037771e14e3a828783d8ac486c725', './include/MVC/View/views/view.noaccess.php' => '1cab33d38afb080ca5dbfaa70a05e69a', @@ -6492,7 +6500,7 @@ $md5_string = array ( './include/MVC/View/views/view.importvcardsave.php' => 'fbea5f0d4e39e924fb0186e4ad3efc21', './include/MVC/View/views/view.importvcard.php' => '6c25b128b492aee11c09a127b55d38e0', './include/MVC/View/views/view.html.php' => '4269cd69a757967dfadf0d1505ab8302', - './include/MVC/View/views/view.edit.php' => 'c91e1de04dad2d5c5cbd1291f80f0b9b', + './include/MVC/View/views/view.edit.php' => 'd6d369b764db7f13873ea7a2fd7bb4d5', './include/MVC/View/views/view.detail.php' => 'a41326fbffb6ca8424e8a1e097aa4c1b', './include/MVC/View/views/view.config.php' => '518f2096065672246f0f7da885e63ef0', './include/MVC/View/views/view.classic.php' => '6be217537624ef09bf66eccdfbc8eb3c', @@ -6501,25 +6509,25 @@ $md5_string = array ( './include/MVC/View/tpls/xsrf.tpl' => '6359a868325fd6381d0022f84a732621', './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' => 'b3336f1025dd8fd68964dd95447fba08', + './include/MVC/View/ViewFactory.php' => '8c19d770416ea69207b10f71d6a09e65', + './include/MVC/View/SugarView.php' => '3ba5c97ad3a5c2173544fdfede2a672e', './include/MVC/SugarModule.php' => 'ce58476e24ad1717fe30192d10e28adc', './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', './include/MVC/Controller/action_file_map.php' => 'c35918d4fb518bb6f3c682efbabc10a4', - './include/MVC/Controller/SugarController.php' => 'b5282938e4490ca8d23b6193094f8194', + './include/MVC/Controller/SugarController.php' => '32152f62c684bbb63bda849427c5dabb', './include/MVC/Controller/ControllerFactory.php' => '52b59a09b463a19eff7f34203b425447', - './include/Localization/Localization.php' => 'de0035fc0f86167c97302fd381e0fcca', + './include/Localization/Localization.php' => '7703c0441d1391a48a84ffc5db363e62', './include/ListView/ListViewDCMenu.tpl' => '106226bf74c3da2aab933ae8869b69bd', './include/ListView/ListViewXTPL.php' => 'e70a4929a6e81eb2f63d60a5302c0780', - './include/ListView/ListViewSmarty.php' => 'dc37b331de2c2423b6b001f3f3c6eec5', + './include/ListView/ListViewSmarty.php' => 'c3b44cb91aba732ed13888f0b219a672', './include/ListView/ListViewPagination.tpl' => 'bcb4adbaea266d27495ac72fa7a4721d', './include/ListView/ListViewNoMassUpdate.tpl' => 'b67e393107c9d80223e4abb21eec261a', - './include/ListView/ListViewGeneric.tpl' => '21ea92d29f7096ef2e3e47e4fb6e90c3', + './include/ListView/ListViewGeneric.tpl' => 'd8089d8dc41ef1428076eefff2ab9e69', './include/ListView/ListViewFacade.php' => 'eca289f7cf40a7e503255644bec57716', - './include/ListView/ListViewDisplay.php' => 'f043bb8443a23bc1bf14114ba1ee3200', + './include/ListView/ListViewDisplay.php' => '6279278167a630ab00dcc634b634eb54', './include/ListView/ListViewData.php' => '57d87d2efe1c5d174c015147058be1ce', './include/ListView/ListView.php' => '6ee1ea0c48f42256d43a41e79ecbfb53', './include/JSON.php' => '419327255daae457ef1765ec305148f3', @@ -6532,19 +6540,19 @@ $md5_string = array ( './include/HTTP_WebDAV_Server/README' => 'e6f0ca3d7e4fa2b20310995f269c3ef2', './include/GroupedTabs/GroupedTabStructure.php' => '387bbcd7327931d43dd1e88b6b1bf70e', './include/EditView/header.tpl' => 'e0da0b7602a8503a5487e63aef9720d2', - './include/EditView/footer.tpl' => '9e3a520b4e8ddd3dc82eef582e24db45', + './include/EditView/footer.tpl' => '7514ad752e638256db617b92df7d577a', './include/EditView/SugarVCR.php' => '459abe407efe354afd1e53451f968017', - './include/EditView/SubpanelQuickCreate.php' => 'abfc9ee1592fcc54210341f062c72370', + './include/EditView/SubpanelQuickCreate.php' => 'c2ab8cbf9eebd99a7a934db4c2b28820', './include/EditView/QuickCreate.tpl' => '7b5551dd497dfb15af7ae2732db18e44', './include/EditView/QuickCreate.php' => '20043843a73497bc94bda42a3a54b38e', './include/EditView/PopupQuickCreate.php' => 'e7347241af58af0d28b86fde19695946', - './include/EditView/EditView2.php' => 'a790d348eec5489febe5103d9ae33ca2', + './include/EditView/EditView2.php' => '33cade11e03b7b0ac59845c8fed4517d', './include/EditView/EditView.tpl' => '09d53d334288cfa0b41bdc929d98dd22', './include/EditView/EditView.php' => '0666ea6e21db2c8ef2a6a7615ea010c7', './include/DetailView/header.tpl' => '784a15901fbebe39f7495c56df41a758', './include/DetailView/footer.tpl' => '552e0313c998b223dd6242e5c5678b72', './include/DetailView/DetailView2.php' => '9478bef6cdad4af70878d6be5962909d', - './include/DetailView/DetailView.tpl' => '1058c91ce17689ca96031d2167be971e', + './include/DetailView/DetailView.tpl' => 'a7e16e70f76c420076b72ad3305b77b2', './include/DetailView/DetailView.php' => '35d047b596e7d3c9e122703c9c0c9c2b', './include/Dashlets/DashletGenericAutoRefreshDynamic.tpl' => 'f769c32f17ac26313b340fec2861112e', './include/Dashlets/DashletGenericDisplay.tpl' => 'd6afdb7417234d0bb5e82388d3b69c84', @@ -6565,7 +6573,7 @@ $md5_string = array ( './examples/ExampleLeadCapture.php' => 'd6deb45572959e642fb019253c5703dc', './examples/EXAMPLES_README.txt' => 'b55744b5e2684d91f6d3f98db4553673', './emailmandelivery.php' => 'eddfad677960438dfe1584bca8718acf', - './download.php' => 'a1e49368b20004edcca04db646ae35e3', + './download.php' => '75ddbbfdca6a719c7369089cedd6ce72', './dictionary.php' => '42619156f21102938b4da79d2cf9cb48', './Zend/Version.php' => '7ed9dea03172b0f8fb11f085a17f100b', './Zend/Validate/Ip.php' => '05326c26a0f419d8dac8c168f6cb7f12', @@ -6956,14 +6964,14 @@ $md5_string = array ( './Zend/Crypt/DiffieHellman/Exception.php' => '767330f408c58b089aa082d990b73099', './Zend/Crypt/DiffieHellman.php' => 'ec0a4f522b732f7fcbb9c4ab94d926e1', './Zend/Crypt.php' => '0e72fd104506094fd2c7682b0b924542', - './install.php' => '969b88bd1db96c2193cd8e37d96dee5c', + './install.php' => '19729b83b5d2ea947763f56f264a88e8', './export.php' => '44550cd8bb3c34fc7b8dac67b549b6db', './data/upload/index.html' => '9cd784063d39b18d308932c28c385853', './data/Tracker.php' => '5dfc3f390ecccd8cbb1229e01f878593', - './data/SugarBean.php' => '4d0d8806c36883c851878736d984413f', - './data/Link.php' => '0eb776610e6f09640760c67412d69184', + './data/SugarBean.php' => '8b9772c47053ac6d18e610e664d3c87f', + './data/Link.php' => '4274e59a6547b8022ebbdf70120d916e', './custom/index.html' => 'b0070a296647b6026d1800db14510e3c', - './cron.php' => '3d65f5cc08d20790387c79a761c776f7', + './cron.php' => '99055ca0a11c9810e9d3d655c4fb32d2', './campaign_trackerv2.php' => '66ca6f16d0d670bcaf528f4b9d95494b', './campaign_tracker.php' => 'e0f56c0cc526128e1b931f120b00460a', './cache/xml/index.html' => '9cd784063d39b18d308932c28c385853', @@ -6993,7 +7001,7 @@ $md5_string = array ( './ModuleInstall/PackageManager/PackageController.php' => '425566c9378597c7990692fe993b5dc4', './ModuleInstall/PackageManager/ListViewPackages.php' => 'e4641f286e0b5c4e0aad030159d14a2d', './ModuleInstall/ModuleScanner.php' => 'b7d0d4df51b9b531020fab6f37239157', - './ModuleInstall/ModuleInstaller.php' => '646a6b0f25b4edd1379161d3251c293b', + './ModuleInstall/ModuleInstaller.php' => 'b30c2b24c43efb8d53b1a829b78f832d', './HandleAjaxCall.php' => 'cc43ac1ae1b3545ae98e79f12da47d14', ); ?> diff --git a/include/DetailView/DetailView.tpl b/include/DetailView/DetailView.tpl index b446a9d9..e617d993 100644 --- a/include/DetailView/DetailView.tpl +++ b/include/DetailView/DetailView.tpl @@ -159,7 +159,7 @@ class="yui-navset detailview_tabs" {{/if}} -{if $panelFieldCount == 0} +{if $panelFieldCount == 0 && !$useTabs}} {/if} @@ -167,9 +167,10 @@ class="yui-navset detailview_tabs" {{include file=$footerTpl}} {{if $useTabs}} + -{{/if}} \ No newline at end of file +{{/if}} diff --git a/include/EditView/EditView2.php b/include/EditView/EditView2.php index 8daa5f2d..23b5be37 100644 --- a/include/EditView/EditView2.php +++ b/include/EditView/EditView2.php @@ -41,33 +41,33 @@ require_once('include/EditView/SugarVCR.php'); class EditView { - var $th; - var $tpl; - var $notes; - var $id; - var $metadataFile; - var $headerTpl; - var $footerTpl; - var $returnAction; - var $returnModule; - var $returnId; - var $isDuplicate; - var $focus; - var $module; - var $fieldDefs; - var $sectionPanels; - var $view = 'EditView'; - var $formatFields = true; - var $showDetailData = true; - var $showVCRControl = true; - var $showSectionPanelsTitles = true; - var $quickSearchCode; - var $ss; - var $offset = 0; - var $populateBean = true; - var $moduleTitleKey; - var $viewObject = null; - var $formName = ''; + public $th; + public $tpl; + public $notes; + public $id; + public $metadataFile; + public $headerTpl; + public $footerTpl; + public $returnAction; + public $returnModule; + public $returnId; + public $isDuplicate; + public $focus; + public $module; + public $fieldDefs; + public $sectionPanels; + public $view = 'EditView'; + public $formatFields = true; + public $showDetailData = true; + public $showVCRControl = true; + public $showSectionPanelsTitles = true; + public $quickSearchCode; + public $ss; + public $offset = 0; + public $populateBean = true; + public $moduleTitleKey; + public $viewObject = null; + public $formName = ''; /** * EditView constructor @@ -92,44 +92,59 @@ class EditView //this logic checks if the focus has an id and if it does not then it will create a new instance of the focus bean //but in convert lead we do not want to create a new instance and do not want to populate id. - if($createFocus) + if ($createFocus) { - $this->createFocus(); + $this->createFocus(); } - if(empty($GLOBALS['sugar_config']['showDetailData'])) { - $this->showDetailData = false; + + if (empty($GLOBALS['sugar_config']['showDetailData'])) + { + $this->showDetailData = false; } $this->metadataFile = $metadataFile; - if(isset($GLOBALS['sugar_config']['disable_vcr'])) { + if (isset($GLOBALS['sugar_config']['disable_vcr'])) + { $this->showVCRControl = !$GLOBALS['sugar_config']['disable_vcr']; } - if(!empty($this->metadataFile) && file_exists($this->metadataFile)){ - include($this->metadataFile); - }else { - //If file doesn't exist we create a best guess - if(!file_exists("modules/$this->module/metadata/editviewdefs.php") && - file_exists("modules/$this->module/EditView.html")) { - require_once('include/SugarFields/Parsers/EditViewMetaParser.php'); + + if (!empty($this->metadataFile) && file_exists($this->metadataFile)) + { + include($this->metadataFile); + } + else + { + //If file doesn't exist we create a best guess + if (!file_exists("modules/$this->module/metadata/editviewdefs.php") + && file_exists("modules/$this->module/EditView.html")) + { + require_once('include/SugarFields/Parsers/EditViewMetaParser.php'); + global $dictionary; - $htmlFile = "modules/" . $this->module . "/EditView.html"; - $parser = new EditViewMetaParser(); - if(!file_exists('modules/'.$this->module.'/metadata')) { - sugar_mkdir('modules/'.$this->module.'/metadata'); - } - $fp = sugar_fopen('modules/'.$this->module.'/metadata/editviewdefs.php', 'w'); - fwrite($fp, $parser->parse($htmlFile, $dictionary[$focus->object_name]['fields'], $this->module)); - fclose($fp); - } - - //Flag an error... we couldn't create the best guess meta-data file - if(!file_exists("modules/$this->module/metadata/editviewdefs.php")) { - global $app_strings; - $error = str_replace("[file]", "modules/$this->module/metadata/editviewdefs.php", $app_strings['ERR_CANNOT_CREATE_METADATA_FILE']); - $GLOBALS['log']->fatal($error); - echo $error; - die(); - } + + $htmlFile = "modules/" . $this->module . "/EditView.html"; + $parser = new EditViewMetaParser(); + if (!file_exists('modules/'.$this->module.'/metadata')) + { + sugar_mkdir('modules/'.$this->module.'/metadata'); + } + + $fp = sugar_fopen('modules/'.$this->module.'/metadata/editviewdefs.php', 'w'); + fwrite($fp, $parser->parse($htmlFile, $dictionary[$focus->object_name]['fields'], $this->module)); + fclose($fp); + } + + //Flag an error... we couldn't create the best guess meta-data file + if (!file_exists("modules/$this->module/metadata/editviewdefs.php")) + { + global $app_strings; + + $error = str_replace("[file]", "modules/$this->module/metadata/editviewdefs.php", $app_strings['ERR_CANNOT_CREATE_METADATA_FILE']); + $GLOBALS['log']->fatal($error); + echo $error; + die(); + } + require_once("modules/$this->module/metadata/editviewdefs.php"); } @@ -141,32 +156,39 @@ class EditView { global $beanList, $beanFiles; - if(empty($beanList[$this->module]))return; - if(!$this->focus ){ + if (empty($beanList[$this->module])) return; + if(!$this->focus ) + { $bean = $beanList[$this->module]; - require_once($beanFiles[$bean]); + require_once($beanFiles[$bean]); $obj = new $bean(); $this->focus = $obj; - } - - //If there is no idea, assume we are creating a new instance - //and call the fill_in_additional_detail_fields where initialization - //code has been moved to - if(empty($this->focus->id)) { - global $current_user; - $this->focus->fill_in_additional_detail_fields(); - $this->focus->assigned_user_id = $current_user->id; - } + } + + //If there is no idea, assume we are creating a new instance + //and call the fill_in_additional_detail_fields where initialization + //code has been moved to + if (empty($this->focus->id)) + { + global $current_user; + + $this->focus->fill_in_additional_detail_fields(); + $this->focus->assigned_user_id = $current_user->id; + } } function populateBean() { - if(!empty($_REQUEST['record']) && $this->populateBean) { + if (!empty($_REQUEST['record']) && $this->populateBean) + { global $beanList; + $bean = $beanList[$this->module]; $obj = new $bean(); $this->focus = $obj->retrieve($_REQUEST['record']); - } else { + } + else + { $GLOBALS['log']->debug("Unable to populate bean, no record parameter found"); } } @@ -176,128 +198,137 @@ class EditView * This method is used to manually turn on/off the field formatting * @param $format boolean value to turn on/off field formatting */ - function enableFormatting( - $format = true - ) + function enableFormatting($format = true) { $this->formatFields = $format; } - + /** + * Enter description here ... + */ function requiredFirst() { - $panels = array('required'=>array()); - $reqCol = -1; - $reqRow = 0; - foreach($this->defs['panels'] as $key=>$p){ - - foreach($p as $row=>$rowDef) { - foreach($rowDef as $col => $colDef) { - $field = (is_array($p[$row][$col])) ? $p[$row][$col]['name'] : $p[$row][$col]; - if((!empty($this->focus->field_defs[$field]) - && !empty($this->focus->field_defs[$field]['required'])) - || ( !empty($p[$row][$col]['displayParams']['required']) )) { - $reqCol++; - if($reqCol == $this->defs['templateMeta']['maxColumns']) { - $reqCol = -1; - $reqRow++; - } - $panels['required'][$reqRow][$reqCol] = $p[$row][$col]; - }else{ - $panels[$key][$row][$col] = $p[$row][$col]; - } - - } //foreach - } //foreach - + $panels = array('required'=>array()); + $reqCol = -1; + $reqRow = 0; + foreach($this->defs['panels'] as $key=>$p) + { + foreach ($p as $row=>$rowDef) + { + foreach($rowDef as $col => $colDef) + { + $field = (is_array($p[$row][$col])) ? $p[$row][$col]['name'] : $p[$row][$col]; + if ((!empty($this->focus->field_defs[$field]) + && !empty($this->focus->field_defs[$field]['required'])) + || (!empty($p[$row][$col]['displayParams']['required']))) + { + $reqCol++; + if ($reqCol == $this->defs['templateMeta']['maxColumns']) + { + $reqCol = -1; + $reqRow++; + } + + $panels['required'][$reqRow][$reqCol] = $p[$row][$col]; + } + else + { + $panels[$key][$row][$col] = $p[$row][$col]; + } + } + } + } - } //foreach - $this->defs['panels'] = $panels; + $this->defs['panels'] = $panels; } function render() { $totalWidth = 0; - foreach($this->defs['templateMeta']['widths'] as $col => $def) { - foreach($def as $k => $value) $totalWidth += $value; + foreach ($this->defs['templateMeta']['widths'] as $col => $def) { + foreach ($def as $k => $value) { + $totalWidth += $value; + } } + // calculate widths - foreach($this->defs['templateMeta']['widths'] as $col => $def) { - foreach($def as $k => $value) + foreach ($this->defs['templateMeta']['widths'] as $col => $def) { + foreach ($def as $k => $value) { $this->defs['templateMeta']['widths'][$col][$k] = round($value / ($totalWidth / 100), 2); + } } $this->sectionPanels = array(); $this->sectionLabels = array(); - if(!empty($this->defs['panels']) && count($this->defs['panels']) > 0) { + if (!empty($this->defs['panels']) && count($this->defs['panels']) > 0) + { $keys = array_keys($this->defs['panels']); - if(is_numeric($keys[0])) { - $defaultPanel = $this->defs['panels']; - unset($this->defs['panels']); //blow away current value - $this->defs['panels'][''] = $defaultPanel; + if (is_numeric($keys[0])) + { + $defaultPanel = $this->defs['panels']; + unset($this->defs['panels']); //blow away current value + $this->defs['panels'][''] = $defaultPanel; } } - if($this->view == 'EditView' && !empty($GLOBALS['sugar_config']['forms']['requireFirst'])){ - $this->requiredFirst(); + + if ($this->view == 'EditView' && !empty($GLOBALS['sugar_config']['forms']['requireFirst'])){ + $this->requiredFirst(); } $maxColumns = isset($this->defs['templateMeta']['maxColumns']) ? $this->defs['templateMeta']['maxColumns'] : 2; $panelCount = 0; - static $itemCount = 100; //Start the generated tab indexes at 100 so they don't step on custom ones. - - /* loop all the panels */ - foreach($this->defs['panels'] as $key=>$p) - { - $panel = array(); + static $itemCount = 100; //Start the generated tab indexes at 100 so they don't step on custom ones. - if(!is_array($this->defs['panels'][$key])) { - $this->sectionPanels[strtoupper($key)] = $p; - } else { - - foreach($p as $row=>$rowDef) { - $columnsInRows = count($rowDef); - $columnsUsed = 0; - foreach($rowDef as $col => $colDef) { - $panel[$row][$col] = is_array($p[$row][$col]) ? array('field' => $p[$row][$col]) : array('field' => array('name'=>$p[$row][$col])); - $panel[$row][$col]['field']['tabindex'] = (isset($p[$row][$col]['tabindex']) && is_numeric($p[$row][$col]['tabindex'])) ? $p[$row][$col]['tabindex'] : $itemCount; - - if($columnsInRows < $maxColumns) { - if($col == $columnsInRows - 1) { - $panel[$row][$col]['colspan'] = 2 * $maxColumns - ($columnsUsed + 1); - } else { - $panel[$row][$col]['colspan'] = floor(($maxColumns * 2 - $columnsInRows) / $columnsInRows); - $columnsUsed = $panel[$row][$col]['colspan']; - } - } - - //Set address types to have colspan value of 2 if colspan is not already defined - if(is_array($colDef) && !empty($colDef['hideLabel']) && !isset($panel[$row][$col]['colspan'])) { - $panel[$row][$col]['colspan'] = 2; - } - - $itemCount++; - - } //foreach - } //foreach - - // Panel alignment will be off if the panel doesn't have a row with the max columns - // It will not be aligned to the other panels so we fill out the columns in the last row - $addFiller = true; - foreach($panel as $row) { - if(count($row) == $this->defs['templateMeta']['maxColumns']) { - $addFiller = false; - break; - } - } - - if($addFiller) { - $rowCount = count($panel); - $filler = count($panel[$rowCount-1]); - while($filler < $this->defs['templateMeta']['maxColumns']) { - $panel[$rowCount - 1][$filler++] = array('field'=>array('name'=>'')); - } //while - } + /* loop all the panels */ + foreach ($this->defs['panels'] as $key=>$p) + { + $panel = array(); + + if (!is_array($this->defs['panels'][$key])) { + $this->sectionPanels[strtoupper($key)] = $p; + } + else + { + foreach ($p as $row=>$rowDef) + { + $columnsInRows = count($rowDef); + $columnsUsed = 0; + foreach ($rowDef as $col => $colDef) + { + $panel[$row][$col] = is_array($p[$row][$col]) + ? array('field' => $p[$row][$col]) + : array('field' => array('name'=>$p[$row][$col])); + + $panel[$row][$col]['field']['tabindex'] = + (isset($p[$row][$col]['tabindex']) && is_numeric($p[$row][$col]['tabindex'])) + ? $p[$row][$col]['tabindex'] + : $itemCount; + + if ($columnsInRows < $maxColumns) + { + if ($col == $columnsInRows - 1) + { + $panel[$row][$col]['colspan'] = 2 * $maxColumns - ($columnsUsed + 1); + } + else + { + $panel[$row][$col]['colspan'] = floor(($maxColumns * 2 - $columnsInRows) / $columnsInRows); + $columnsUsed = $panel[$row][$col]['colspan']; + } + } + + //Set address types to have colspan value of 2 if colspan is not already defined + if (is_array($colDef) && !empty($colDef['hideLabel']) && !isset($panel[$row][$col]['colspan'])) + { + $panel[$row][$col]['colspan'] = 2; + } + + $itemCount++; + + } + } + $panel = $this->getPanelWithFillers($panel); $this->sectionPanels[strtoupper($key)] = $panel; } @@ -307,113 +338,162 @@ class EditView } //foreach } - function process( - $checkFormName = false, - $formName = '' - ) + /** + * Adds fillers to each row if required + * + * Panel alignment will be off if the panel doesn't have a row with the max column + * It will not be aligned to the other panels so we fill out the columns in the last row + * + * @param array $panel + * @return array + */ + protected function getPanelWithFillers($panel) + { + $addFiller = true; + foreach($panel as $row) + { + if (count($row) == $this->defs['templateMeta']['maxColumns'] + || 1 == count($panel)) + { + $addFiller = false; + break; + } + } + + if ($addFiller) + { + $rowCount = count($panel); + $filler = count($panel[$rowCount-1]); + while ($filler < $this->defs['templateMeta']['maxColumns']) + { + $panel[$rowCount - 1][$filler++] = array('field' => array('name' => '')); + } + } + + return $panel; + } + + function process($checkFormName = false, $formName = '') { global $mod_strings, $sugar_config, $app_strings, $app_list_strings; - //the retrieve already did this work; - //$this->focus->fill_in_relationship_fields(); - - if(!$this->th->checkTemplate($this->module, $this->view, $checkFormName, $formName)){ - $this->render(); - } - if(isset($_REQUEST['offset'])) { - $this->offset = $_REQUEST['offset'] - 1; - } //if - if($this->showVCRControl) { - $this->th->ss->assign('PAGINATION', SugarVCR::menu($this->module, $this->offset, $this->focus->is_AuditEnabled(), ($this->view == 'EditView'))); - } //if - if(isset($_REQUEST['return_module'])) $this->returnModule = $_REQUEST['return_module']; - if(isset($_REQUEST['return_action'])) $this->returnAction = $_REQUEST['return_action']; - if(isset($_REQUEST['return_id'])) $this->returnId = $_REQUEST['return_id']; - if(isset($_REQUEST['return_relationship'])) $this->returnRelationship = $_REQUEST['return_relationship']; - if(isset($_REQUEST['return_name'])) $this->returnName = $this->getValueFromRequest($_REQUEST, 'return_name' ) ; - - // handle Create $module then Cancel - if (empty($this->returnId)) { - $this->returnAction = 'index'; - } + //the retrieve already did this work; + //$this->focus->fill_in_relationship_fields(); + + if (!$this->th->checkTemplate($this->module, $this->view, $checkFormName, $formName)) + { + $this->render(); + } + + if (isset($_REQUEST['offset'])) + { + $this->offset = $_REQUEST['offset'] - 1; + } + + if ($this->showVCRControl) + { + $this->th->ss->assign('PAGINATION', SugarVCR::menu($this->module, $this->offset, $this->focus->is_AuditEnabled(), ($this->view == 'EditView'))); + } + + if (isset($_REQUEST['return_module'])) $this->returnModule = $_REQUEST['return_module']; + if (isset($_REQUEST['return_action'])) $this->returnAction = $_REQUEST['return_action']; + if (isset($_REQUEST['return_id'])) $this->returnId = $_REQUEST['return_id']; + if (isset($_REQUEST['return_relationship'])) $this->returnRelationship = $_REQUEST['return_relationship']; + if (isset($_REQUEST['return_name'])) $this->returnName = $this->getValueFromRequest($_REQUEST, 'return_name' ) ; + + // handle Create $module then Cancel + if (empty($this->returnId)) + { + $this->returnAction = 'index'; + } $is_owner = $this->focus->isOwner($GLOBALS['current_user']->id); $this->fieldDefs = array(); - if($this->focus){ + if ($this->focus) + { + global $current_user; - global $current_user; + if (!empty($this->focus->assigned_user_id)) + { + $this->focus->assigned_user_name = get_assigned_user_name($this->focus->assigned_user_id); + } - /*if(empty($this->focus->assigned_user_id) ){ - $this->focus->assigned_user_id = $current_user->id; - }*/ - if(!empty($this->focus->assigned_user_id)) { + foreach ($this->focus->toArray() as $name => $value) + { + $valueFormatted = false; + //if ($this->focus->field_defs[$name]['type']=='link')continue; - $this->focus->assigned_user_name = get_assigned_user_name($this->focus->assigned_user_id); - } - foreach($this->focus->toArray() as $name => $value) { + $this->fieldDefs[$name] = (!empty($this->fieldDefs[$name]) && !empty($this->fieldDefs[$name]['value'])) + ? array_merge($this->focus->field_defs[$name], $this->fieldDefs[$name]) + : $this->focus->field_defs[$name]; - $valueFormatted = false; - //if($this->focus->field_defs[$name]['type']=='link')continue; + foreach (array("formula", "default", "comments", "help") as $toEscape) + { + if (!empty($this->fieldDefs[$name][$toEscape])) + { + $this->fieldDefs[$name][$toEscape] = htmlentities($this->fieldDefs[$name][$toEscape], ENT_QUOTES, 'UTF-8'); + } + } - if (!empty($this->fieldDefs[$name]) && !empty($this->fieldDefs[$name]['value'])) - $this->fieldDefs[$name] = array_merge($this->focus->field_defs[$name] , $this->fieldDefs[$name] ) ; - else - $this->fieldDefs[$name] = $this->focus->field_defs[$name]; + if (isset($this->fieldDefs[$name]['options']) && isset($app_list_strings[$this->fieldDefs[$name]['options']])) + { + $this->fieldDefs[$name]['options'] = $app_list_strings[$this->fieldDefs[$name]['options']]; + } + if (isset($this->fieldDefs[$name]['function'])) + { + $function = $this->fieldDefs[$name]['function']; + $function = (is_array($function) && isset($function['name'])) + ? $this->fieldDefs[$name]['function']['name'] + : $this->fieldDefs[$name]['function']; + + if (!empty($this->fieldDefs[$name]['function']['returns']) && $this->fieldDefs[$name]['function']['returns'] == 'html') + { + if (!empty($this->fieldDefs[$name]['function']['include'])) + { + require_once($this->fieldDefs[$name]['function']['include']); + } + + $value = $function($this->focus, $name, $value, $this->view); + $valueFormatted = true; + } + else + { + $this->fieldDefs[$name]['options'] = $function($this->focus, $name, $value, $this->view); + } + } - foreach(array("formula", "default", "comments", "help") as $toEscape) - { - if (!empty($this->fieldDefs[$name][$toEscape])) { - $this->fieldDefs[$name][$toEscape] = htmlentities($this->fieldDefs[$name][$toEscape], ENT_QUOTES, 'UTF-8'); - } - } + if (isset($this->fieldDefs[$name]['type']) && $this->fieldDefs[$name]['type'] == 'function' && isset($this->fieldDefs[$name]['function_name'])) + { + $value = $this->callFunction($this->fieldDefs[$name]); + $valueFormatted = true; + } - if(isset($this->fieldDefs[$name]['options']) && isset($app_list_strings[$this->fieldDefs[$name]['options']])) { - $this->fieldDefs[$name]['options'] = $app_list_strings[$this->fieldDefs[$name]['options']]; // fill in enums - } //if - - if(isset($this->fieldDefs[$name]['function'])) { - $function = $this->fieldDefs[$name]['function']; - if(is_array($function) && isset($function['name'])){ - $function = $this->fieldDefs[$name]['function']['name']; - }else{ - $function = $this->fieldDefs[$name]['function']; - } - if(!empty($this->fieldDefs[$name]['function']['returns']) && $this->fieldDefs[$name]['function']['returns'] == 'html'){ - if(!empty($this->fieldDefs[$name]['function']['include'])){ - require_once($this->fieldDefs[$name]['function']['include']); - } - $value = $function($this->focus, $name, $value, $this->view); - $valueFormatted = true; - }else{ - $this->fieldDefs[$name]['options'] = $function($this->focus, $name, $value, $this->view); - } - } - - if(isset($this->fieldDefs[$name]['type']) && $this->fieldDefs[$name]['type'] == 'function' && isset($this->fieldDefs[$name]['function_name'])){ - $value = $this->callFunction($this->fieldDefs[$name]); - $valueFormatted = true; - } - - if(!$valueFormatted) { + if (!$valueFormatted) + { // $this->focus->format_field($this->focus->field_defs[$name]); $value = isset($this->focus->$name) ? $this->focus->$name : ''; - } + } - if (empty($this->fieldDefs[$name]['value'])) - { - $this->fieldDefs[$name]['value'] = $value; - } + if (empty($this->fieldDefs[$name]['value'])) + { + $this->fieldDefs[$name]['value'] = $value; + } - //This code is used for QuickCreates that go to Full Form view - if($this->populateBean && empty($this->focus->id) && (isset($this->fieldDefs[$name]['function']['returns']) ? $this->fieldDefs[$name]['function']['returns'] != 'html' : true) && isset($_REQUEST[$name])) { - $this->fieldDefs[$name]['value'] = $this->getValueFromRequest($_REQUEST, $name); - } //if + //This code is used for QuickCreates that go to Full Form view + if ($this->populateBean && empty($this->focus->id) + && (isset($this->fieldDefs[$name]['function']['returns']) + ? $this->fieldDefs[$name]['function']['returns'] != 'html' + : true) + && isset($_REQUEST[$name])) + { + $this->fieldDefs[$name]['value'] = $this->getValueFromRequest($_REQUEST, $name); + } - /* + /* * Populate any relate fields that are linked by a relationship to the calling module. * Clicking the create button on a subpanel for example will populate three values in the $_REQUEST: * 1. return_module => the name of the calling module @@ -421,37 +501,41 @@ class EditView * 3. return_name => the display value of the return_id record - the value to show in any relate field in this EditView * Only do if this fieldDef does not already have a value; if it does it will have been explicitly set, and that should overrule this less specific mechanism */ - if (isset($this->returnModule) && isset($this->returnName) && empty($this->focus->id) && empty($this->fieldDefs['name']['value']) ) + if (isset($this->returnModule) && isset($this->returnName) + && empty($this->focus->id) && empty($this->fieldDefs['name']['value']) ) { - if ( ($this->focus->field_defs[$name]['type'] == 'relate') && isset($this->focus->field_defs[$name][ 'module' ]) && $this->focus->field_defs[$name][ 'module' ] == $this->returnModule ) - { + if (($this->focus->field_defs[$name]['type'] == 'relate') + && isset($this->focus->field_defs[$name][ 'module' ]) + && $this->focus->field_defs[$name][ 'module' ] == $this->returnModule) + { if (isset( $this->fieldDefs[$name]['id_name']) && !empty($this->returnRelationship) && isset($this->focus->field_defs[$this->fieldDefs[$name]['id_name']]['relationship']) && ($this->returnRelationship == $this->focus->field_defs[$this->fieldDefs[$name]['id_name']]['relationship'])) - { - $this->fieldDefs[$name]['value'] = $this->returnName ; - // set the hidden id field for this relate field to the correct value i.e., return_id - $this->fieldDefs[$this->fieldDefs[$name]['id_name']]['value'] = $this->returnId ; - } - } + { + $this->fieldDefs[$name]['value'] = $this->returnName ; + // set the hidden id field for this relate field to the correct value i.e., return_id + $this->fieldDefs[$this->fieldDefs[$name]['id_name']]['value'] = $this->returnId ; + } + } } + } + } - } //foreach - - } //if - - if(isset($this->focus->additional_meta_fields)) { - $this->fieldDefs = array_merge($this->fieldDefs, $this->focus->additional_meta_fields); - } + if (isset($this->focus->additional_meta_fields)) + { + $this->fieldDefs = array_merge($this->fieldDefs, $this->focus->additional_meta_fields); + } - if($this->isDuplicate) { - foreach($this->fieldDefs as $name=>$defs) { - if(!empty($defs['auto_increment'])) { - $this->fieldDefs[$name]['value'] = ''; - } - } - } + if ($this->isDuplicate) + { + foreach ($this->fieldDefs as $name=>$defs) { + if (!empty($defs['auto_increment'])) + { + $this->fieldDefs[$name]['value'] = ''; + } + } + } } /** @@ -462,20 +546,21 @@ class EditView * @param $ajaxSave boolean value indicating whether or not the operation is an Ajax save request * @return HTML display for view as String */ - function display( - $showTitle = true, - $ajaxSave = false - ) + function display($showTitle = true, $ajaxSave = false) { global $mod_strings, $sugar_config, $app_strings, $app_list_strings, $theme, $current_user; - - if(isset($this->defs['templateMeta']['javascript'])) { - if(is_array($this->defs['templateMeta']['javascript'])) { - $this->th->ss->assign('externalJSFile', 'modules/' . $this->module . '/metadata/editvewdefs.js'); - } else { - $this->th->ss->assign('scriptBlocks', $this->defs['templateMeta']['javascript']); - } + if(isset($this->defs['templateMeta']['javascript'])) + { + if(is_array($this->defs['templateMeta']['javascript'])) + { + //$this->th->ss->assign('externalJSFile', 'modules/' . $this->module . '/metadata/editvewdefs.js'); + $this->th->ss->assign('externalJSFile', $this->defs['templateMeta']['javascript']); + } + else + { + $this->th->ss->assign('scriptBlocks', $this->defs['templateMeta']['javascript']); + } } $this->th->ss->assign('id', $this->fieldDefs['id']['value']); @@ -501,154 +586,190 @@ class EditView global $js_custom_version; global $sugar_version; + $this->th->ss->assign('SUGAR_VERSION', $sugar_version); $this->th->ss->assign('JS_CUSTOM_VERSION', $js_custom_version); //this is used for multiple forms on one page - if ( !empty($this->formName) ) { + if (!empty($this->formName)) { $form_id = $this->formName; $form_name = $this->formName; } - else { + else + { $form_id = $this->view; $form_name = $this->view; } - if($ajaxSave && empty($this->formName)){ - $form_id = 'form_'.$this->view .'_'.$this->module; - $form_name = $form_id; - $this->view = $form_name; - //$this->defs['templateMeta']['form']['buttons'] = array(); - //$this->defs['templateMeta']['form']['buttons']['ajax_save'] = array('id' => 'AjaxSave', 'customCode'=>''); + + if ($ajaxSave && empty($this->formName)) + { + $form_id = 'form_'.$this->view .'_'.$this->module; + $form_name = $form_id; + $this->view = $form_name; + //$this->defs['templateMeta']['form']['buttons'] = array(); + //$this->defs['templateMeta']['form']['buttons']['ajax_save'] = array('id' => 'AjaxSave', 'customCode'=>''); } - $form_name = $form_name == "QuickCreate" ? "QuickCreate_{$this->module}" : $form_name; - $form_id = $form_id == "QuickCreate" ? "QuickCreate_{$this->module}" : $form_id; + $form_name = $form_name == 'QuickCreate' ? "QuickCreate_{$this->module}" : $form_name; + $form_id = $form_id == 'QuickCreate' ? "QuickCreate_{$this->module}" : $form_id; - if(isset($this->defs['templateMeta']['preForm'])) { - $this->th->ss->assign('preForm', $this->defs['templateMeta']['preForm']); - } //if - if(isset($this->defs['templateMeta']['form']['closeFormBeforeCustomButtons'])) { - $this->th->ss->assign('closeFormBeforeCustomButtons', $this->defs['templateMeta']['form']['closeFormBeforeCustomButtons']); + if (isset($this->defs['templateMeta']['preForm'])) + { + $this->th->ss->assign('preForm', $this->defs['templateMeta']['preForm']); + } + + if (isset($this->defs['templateMeta']['form']['closeFormBeforeCustomButtons'])) + { + $this->th->ss->assign('closeFormBeforeCustomButtons', $this->defs['templateMeta']['form']['closeFormBeforeCustomButtons']); } - if(isset($this->defs['templateMeta']['form']['enctype'])) { - $this->th->ss->assign('enctype', 'enctype="'.$this->defs['templateMeta']['form']['enctype'].'"'); + + if(isset($this->defs['templateMeta']['form']['enctype'])) + { + $this->th->ss->assign('enctype', 'enctype="'.$this->defs['templateMeta']['form']['enctype'].'"'); } + //for SugarFieldImage, we must set form enctype to "multipart/form-data" - foreach($this->fieldDefs as $field){ - if(isset($field['type']) && $field['type'] == 'image'){ - $this->th->ss->assign('enctype', 'enctype="multipart/form-data"'); - break; - } + foreach ($this->fieldDefs as $field) + { + if (isset($field['type']) && $field['type'] == 'image') + { + $this->th->ss->assign('enctype', 'enctype="multipart/form-data"'); + break; + } } + $this->th->ss->assign('showDetailData', $this->showDetailData); $this->th->ss->assign('showSectionPanelsTitles', $this->showSectionPanelsTitles); $this->th->ss->assign('form_id', $form_id); $this->th->ss->assign('form_name', $form_name); - $this->th->ss->assign('set_focus_block', get_set_focus_js()); + $this->th->ss->assign('set_focus_block', get_set_focus_js()); $this->th->ss->assign('form', isset($this->defs['templateMeta']['form']) ? $this->defs['templateMeta']['form'] : null); $this->th->ss->assign('includes', isset($this->defs['templateMeta']['includes']) ? $this->defs['templateMeta']['includes'] : null); - $this->th->ss->assign('view', $this->view); + $this->th->ss->assign('view', $this->view); + //Calculate time & date formatting (may need to calculate this depending on a setting) global $timedate; + $this->th->ss->assign('CALENDAR_DATEFORMAT', $timedate->get_cal_date_format()); $this->th->ss->assign('USER_DATEFORMAT', $timedate->get_user_date_format()); $time_format = $timedate->get_user_time_format(); $this->th->ss->assign('TIME_FORMAT', $time_format); $date_format = $timedate->get_cal_date_format(); - $time_separator = ":"; - if(preg_match('/\d+([^\d])\d+([^\d]*)/s', $time_format, $match)) { - $time_separator = $match[1]; + $time_separator = ':'; + if (preg_match('/\d+([^\d])\d+([^\d]*)/s', $time_format, $match)) + { + $time_separator = $match[1]; } // Create Smarty variables for the Calendar picker widget $t23 = strpos($time_format, '23') !== false ? '%H' : '%I'; - if(!isset($match[2]) || $match[2] == '') { - $this->th->ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . "%M"); - } else { - $pm = $match[2] == "pm" ? "%P" : "%p"; - $this->th->ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . "%M" . $pm); + if (!isset($match[2]) || $match[2] == '') + { + $this->th->ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . '%M'); + } + else + { + $pm = $match[2] == 'pm' ? '%P' : '%p'; + $this->th->ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . '%M' . $pm); } $this->th->ss->assign('TIME_SEPARATOR', $time_separator); - $seps = get_number_seperators(); - $this->th->ss->assign('NUM_GRP_SEP', $seps[0]); - $this->th->ss->assign('DEC_SEP', $seps[1]); + $seps = get_number_seperators(); + $this->th->ss->assign('NUM_GRP_SEP', $seps[0]); + $this->th->ss->assign('DEC_SEP', $seps[1]); - if($this->view == 'EditView') { - $height = $current_user->getPreference('text_editor_height'); - $width = $current_user->getPreference('text_editor_width'); - $height = isset($height) ? $height : '300px'; - $width = isset($width) ? $width : '95%'; - $this->th->ss->assign('RICH_TEXT_EDITOR_HEIGHT', $height); - $this->th->ss->assign('RICH_TEXT_EDITOR_WIDTH', $width); - } else { - $this->th->ss->assign('RICH_TEXT_EDITOR_HEIGHT', '100px'); - $this->th->ss->assign('RICH_TEXT_EDITOR_WIDTH', '95%'); - } + if ($this->view == 'EditView') + { + $height = $current_user->getPreference('text_editor_height'); + $width = $current_user->getPreference('text_editor_width'); + $height = isset($height) ? $height : '300px'; + $width = isset($width) ? $width : '95%'; - $this->th->ss->assign('SHOW_VCR_CONTROL', $this->showVCRControl); + $this->th->ss->assign('RICH_TEXT_EDITOR_HEIGHT', $height); + $this->th->ss->assign('RICH_TEXT_EDITOR_WIDTH', $width); + } + else + { + $this->th->ss->assign('RICH_TEXT_EDITOR_HEIGHT', '100px'); + $this->th->ss->assign('RICH_TEXT_EDITOR_WIDTH', '95%'); + } - //$str=''; + $this->th->ss->assign('SHOW_VCR_CONTROL', $this->showVCRControl); $str = $this->showTitle($showTitle); //Use the output filter to trim the whitespace $this->th->ss->load_filter('output', 'trimwhitespace'); $str .= $this->th->displayTemplate($this->module, $form_name, $this->tpl, $ajaxSave, $this->defs); - return $str; + + return $str; } - function insertJavascript( - $javascript - ) + function insertJavascript($javascript) { $this->ss->assign('javascript', $javascript); } - function callFunction( - $vardef - ) + function callFunction($vardef) { - $can_execute = true; - $execute_function = array(); - $execute_params = array(); - if(!empty($vardef['function_class'])){ - $execute_function[] = $vardef['function_class']; - $execute_function[] = $vardef['function_name']; - }else{ - $execute_function = $vardef['function_name']; - } - foreach($vardef['function_params'] as $param ){ - if (empty($vardef['function_params_source']) or $vardef['function_params_source']=='parent'){ - if(empty($this->focus->$param)){ - $can_execute = false; - }else{ - $execute_params[] = $this->focus->$param; - } - }else if ($vardef['function_params_source']=='this'){ - if(empty($this->focus->$param)){ - $can_execute = false; - }else{ - $execute_params[] = $this->focus->$param; - } - }else{ - $can_execute = false; - } - - } - $value = ''; - if($can_execute){ - if(!empty($vardef['function_require'])){ - require_once($vardef['function_require']); - } - $value = call_user_func_array($execute_function, $execute_params); - } - return $value; + $can_execute = true; + $execute_function = array(); + $execute_params = array(); + if (!empty($vardef['function_class'])) + { + $execute_function[] = $vardef['function_class']; + $execute_function[] = $vardef['function_name']; + } + else + { + $execute_function = $vardef['function_name']; + } + + foreach ($vardef['function_params'] as $param ) + { + if (empty($vardef['function_params_source']) or $vardef['function_params_source']=='parent') + { + if (empty($this->focus->$param)) + { + $can_execute = false; + } + else + { + $execute_params[] = $this->focus->$param; + } + } + else if ($vardef['function_params_source']=='this') + { + if (empty($this->focus->$param)) + { + $can_execute = false; + } else { + $execute_params[] = $this->focus->$param; + } + } + else + { + $can_execute = false; + } + } + + $value = ''; + if ($can_execute) + { + if (!empty($vardef['function_require'])) + { + require_once($vardef['function_require']); + } + + $value = call_user_func_array($execute_function, $execute_params); + } + + return $value; } /** @@ -662,55 +783,77 @@ class EditView * @param name The field name to extract value for * @return String value for given name */ - function getValueFromRequest( - $request, - $name - ) + function getValueFromRequest($request, $name) { //Special processing for date values (combine to one field) - if(preg_match('/^date_(.*)$/s', $name, $matches)) { - $d = $request[$name]; - - if(isset($request['time_' . $matches[1]])) { - $d .= ' ' . $request['time_' . $matches[1]]; - if(isset($request[$matches[1] . '_meridiem'])) { - $d .= $request[$matches[1] . '_meridiem']; - } - } else { - if(isset($request['time_hour_' . $matches[1]]) && - isset($request['time_minute_' . $matches[1]])) { - $d .= ' ' . $request['time_hour_' . $matches[1]] . ':' . $request['time_minute_' . $matches[1]]; - } - if(isset($request['meridiem'])) { - $d .= $request['meridiem']; - } + if (preg_match('/^date_(.*)$/s', $name, $matches)) + { + $d = $request[$name]; + + if (isset($request['time_' . $matches[1]])) + { + $d .= ' ' . $request['time_' . $matches[1]]; + if (isset($request[$matches[1] . '_meridiem'])) + { + $d .= $request[$matches[1] . '_meridiem']; + } + } + else + { + if (isset($request['time_hour_' . $matches[1]]) + && isset($request['time_minute_' . $matches[1]])) + { + $d .= sprintf(' %s:%s', $request['time_hour_' . $matches[1]], $request['time_minute_' . $matches[1]]); + } + + if (isset($request['meridiem'])) + { + $d .= $request['meridiem']; + } } + return $d; } - return $request[$name]; + if (empty($request[$name]) || !isset($this->fieldDefs[$name])) + { + return $request[$name]; + } + + //if it's a bean field - unformat it + require_once('include/SugarFields/SugarFieldHandler.php'); + + $sfh = new SugarFieldHandler(); + $type = !empty($this->fieldDefs[$name]['custom_type']) + ? $this->fieldDefs[$name]['custom_type'] + : $this->fieldDefs[$name]['type']; + $sf = $sfh->getSugarField($type); + + return $sf ? $sf->unformatField($request[$name], $this->fieldDefs[$name]) : $request[$name]; } + /** * Allow Subviews to overwrite this method to show custom titles. * Examples: Projects & Project Templates. * params: $showTitle: boolean for backwards compatibility. */ - public function showTitle( - $showTitle = false - ) + public function showTitle($showTitle = false) { global $mod_strings, $app_strings; if (is_null($this->viewObject)) - if (!empty($GLOBALS['current_view'])) - $this->viewObject = $GLOBALS['current_view']; - else - $this->viewObject = new SugarView(); + { + $this->viewObject = (!empty($GLOBALS['current_view'])) + ? $GLOBALS['current_view'] + : new SugarView(); + } if ($showTitle) - return $this->viewObject->getModuleTitle(); + { + return $this->viewObject->getModuleTitle(); + } - return ''; + return ''; } -} \ No newline at end of file +} diff --git a/include/EditView/SubpanelQuickCreate.php b/include/EditView/SubpanelQuickCreate.php index dab4e7a0..0c0b394b 100644 --- a/include/EditView/SubpanelQuickCreate.php +++ b/include/EditView/SubpanelQuickCreate.php @@ -70,7 +70,8 @@ class SubpanelQuickCreate{ $this->ev->defs['templateMeta']['form']['footerTpl'] = 'include/EditView/footer.tpl'; $this->ev->defs['templateMeta']['form']['buttons'] = array('SUBPANELSAVE', 'SUBPANELCANCEL', 'SUBPANELFULLFORM'); - + //Load the parent view class if it exists. Check for custom file first + loadParentView('edit'); $viewEditSource = 'modules/'.$module.'/views/view.edit.php'; if (file_exists('custom/'. $viewEditSource)) { @@ -80,6 +81,11 @@ class SubpanelQuickCreate{ if(file_exists($viewEditSource) && !$proccessOverride) { include($viewEditSource); $c = $module . 'ViewEdit'; + + $customClass = 'Custom' . $c; + if(class_exists($customClass)) { + $c = $customClass; + } if(class_exists($c)) { $view = new $c; diff --git a/include/EditView/footer.tpl b/include/EditView/footer.tpl index 115e0b22..754ccbe0 100644 --- a/include/EditView/footer.tpl +++ b/include/EditView/footer.tpl @@ -52,7 +52,7 @@ {{/if}} {{if $externalJSFile}} -require_once("'".$externalJSFile."'"); +{sugar_include include=$externalJSFile} {{/if}} {$set_focus_block} diff --git a/include/ListView/ListViewDisplay.php b/include/ListView/ListViewDisplay.php index 69201cf0..3b33ae6b 100644 --- a/include/ListView/ListViewDisplay.php +++ b/include/ListView/ListViewDisplay.php @@ -255,7 +255,7 @@ class ListViewDisplay { } $str = ''; - if ($this->multiSelect == true && $this->show_mass_update_form) { + if ($this->show_mass_update_form) { $str = $this->mass->getDisplayMassUpdateForm(true, $this->multi_select_popup).$this->mass->getMassUpdateFormHeader($this->multi_select_popup); } diff --git a/include/ListView/ListViewGeneric.tpl b/include/ListView/ListViewGeneric.tpl index a19efd0c..0d435a83 100644 --- a/include/ListView/ListViewGeneric.tpl +++ b/include/ListView/ListViewGeneric.tpl @@ -46,9 +46,9 @@ {/if} -{if $prerow} - {$multiSelectData} -{/if} + +{$multiSelectData} + {include file='include/ListView/ListViewPagination.tpl'} diff --git a/include/ListView/ListViewSmarty.php b/include/ListView/ListViewSmarty.php index c36128c9..8cb12a6d 100644 --- a/include/ListView/ListViewSmarty.php +++ b/include/ListView/ListViewSmarty.php @@ -131,17 +131,14 @@ class ListViewSmarty extends ListViewDisplay{ $this->ss->assign('quickViewLinks', $this->quickViewLinks); // handle save checks and stuff - if($this->multiSelect) { - - //if($this->data['pageData']['bean']['moduleDir']== 'KBDocuments') - //{ - // $this->ss->assign('selectedObjectsSpan', $this->buildSelectedObjectsSpan(true, $this->data['pageData']['offsets']['current'])); - //} else { + if($this->multiSelect) + { $this->ss->assign('selectedObjectsSpan', $this->buildSelectedObjectsSpan(true, $this->data['pageData']['offsets']['total'])); - //} - - $this->ss->assign('multiSelectData', $this->getMultiSelectData()); - } + $this->ss->assign('multiSelectData', $this->getMultiSelectData()); + } else { + $this->ss->assign('multiSelectData', ''); + } + // include button for Adding to Target List if in one of four applicable modules if ( isset ( $_REQUEST['module']) && in_array ( $_REQUEST['module'] , array ( 'Contacts','Prospects','Leads','Accounts' )) && ACLController::checkAccess('ProspectLists','edit',true)) { diff --git a/include/Localization/Localization.php b/include/Localization/Localization.php index 6d1e53d6..74f3b9f3 100644 --- a/include/Localization/Localization.php +++ b/include/Localization/Localization.php @@ -173,6 +173,13 @@ class Localization { $load = sugar_cache_retrieve('currency_list'); if ( !is_array($load) ) { + // load default from config.php + $this->currencies['-99'] = array( + 'name' => $sugar_config['default_currency_name'], + 'symbol' => $sugar_config['default_currency_symbol'], + 'conversion_rate' => 1 + ); + $q = "SELECT id, name, symbol, conversion_rate FROM currencies WHERE status = 'Active' and deleted = 0"; $r = $db->query($q); @@ -189,13 +196,7 @@ class Localization { $this->currencies = $load; } - // load default from config.php - $this->currencies['-99'] = array( - 'name' => $sugar_config['default_currency_name'], - 'symbol' => $sugar_config['default_currency_symbol'], - 'conversion_rate' => 1 - ); - + } /** diff --git a/include/MVC/Controller/SugarController.php b/include/MVC/Controller/SugarController.php index e03a65e8..a2a96f45 100644 --- a/include/MVC/Controller/SugarController.php +++ b/include/MVC/Controller/SugarController.php @@ -540,6 +540,12 @@ class SugarController{ $_REQUEST['return_id'] : ''; $url = "index.php?module=".$return_module."&action=".$return_action."&record=".$return_id; + + //eggsurplus Bug 23816: maintain VCR after an edit/save. If it is a duplicate then don't worry about it. The offset is now worthless. + if(isset($_REQUEST['offset']) && empty($_REQUEST['duplicateSave'])) { + $url .= "&offset=".$_REQUEST['offset']; + } + $this->set_redirect($url); } /** diff --git a/include/MVC/View/SugarView.php b/include/MVC/View/SugarView.php index 32373fd2..48febf5a 100644 --- a/include/MVC/View/SugarView.php +++ b/include/MVC/View/SugarView.php @@ -127,8 +127,9 @@ class SugarView $this->display(); if ( !empty($this->module) ) { $GLOBALS['logic_hook']->call_custom_logic($this->module, 'after_ui_frame'); + } else { + $GLOBALS['logic_hook']->call_custom_logic('', 'after_ui_frame'); } - $GLOBALS['logic_hook']->call_custom_logic('', 'after_ui_frame'); if ($this->_getOption('show_subpanels')) $this->_displaySubPanels(); if ($this->action === 'Login') { //this is needed for a faster loading login page ie won't render unless the tables are closed @@ -717,6 +718,9 @@ EOHTML; if ( isset($sugar_config['quicksearch_querydelay']) ) { echo ""; } + if ( isset($sugar_config['email_sugarclient_listviewmaxselect']) ) { + echo ""; + } $image_server = (defined('TEMPLATE_URL'))?TEMPLATE_URL . '/':''; echo ''; // cn: bug 12274 - create session-stored key to defend against CSRF @@ -964,46 +968,42 @@ EOHTML; $module = null ) { - global $current_language, $current_user, $mod_strings, $app_strings; + global $current_language, $current_user, $mod_strings, $app_strings, $module_menu; if ( empty($module) ) $module = $this->module; - $final_module_menu = array(); + $module_menu = array(); if (file_exists('modules/' . $module . '/Menu.php')) { - $GLOBALS['module_menu'] = $module_menu = array(); require('modules/' . $module . '/Menu.php'); - $final_module_menu = array_merge($final_module_menu,$GLOBALS['module_menu'],$module_menu); } if (file_exists('custom/modules/' . $module . '/Ext/Menus/menu.ext.php')) { - $GLOBALS['module_menu'] = $module_menu = array(); require('custom/modules/' . $module . '/Ext/Menus/menu.ext.php'); - $final_module_menu = array_merge($final_module_menu,$GLOBALS['module_menu'],$module_menu); } if (!file_exists('modules/' . $module . '/Menu.php') && !file_exists('custom/modules/' . $module . '/Ext/Menus/menu.ext.php') && !empty($GLOBALS['mod_strings']['LNK_NEW_RECORD'])) { - $final_module_menu[] = array("index.php?module=$module&action=EditView&return_module=$module&return_action=DetailView", + $module_menu[] = array("index.php?module=$module&action=EditView&return_module=$module&return_action=DetailView", $GLOBALS['mod_strings']['LNK_NEW_RECORD'],"{$GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL']}$module" ,$module ); - $final_module_menu[] = array("index.php?module=$module&action=index", $GLOBALS['mod_strings']['LNK_LIST'], + $module_menu[] = array("index.php?module=$module&action=index", $GLOBALS['mod_strings']['LNK_LIST'], $module, $module); if ( ($this->bean instanceOf SugarBean) && !empty($this->bean->importable) ) if ( !empty($mod_strings['LNK_IMPORT_'.strtoupper($module)]) ) - $final_module_menu[] = array("index.php?module=Import&action=Step1&import_module=$module&return_module=$module&return_action=index", + $module_menu[] = array("index.php?module=Import&action=Step1&import_module=$module&return_module=$module&return_action=index", $mod_strings['LNK_IMPORT_'.strtoupper($module)], "Import", $module); else - $final_module_menu[] = array("index.php?module=Import&action=Step1&import_module=$module&return_module=$module&return_action=index", + $module_menu[] = array("index.php?module=Import&action=Step1&import_module=$module&return_module=$module&return_action=index", $app_strings['LBL_IMPORT'], "Import", $module); } if (file_exists('custom/application/Ext/Menus/menu.ext.php')) { - $GLOBALS['module_menu'] = $module_menu = array(); require('custom/application/Ext/Menus/menu.ext.php'); - $final_module_menu = array_merge($final_module_menu,$GLOBALS['module_menu'],$module_menu); } - $module_menu = $final_module_menu; + + $builtModuleMenu = $module_menu; + unset($module_menu); - return $module_menu; + return $builtModuleMenu; } /** diff --git a/include/MVC/View/ViewFactory.php b/include/MVC/View/ViewFactory.php index 18139383..ae81184e 100644 --- a/include/MVC/View/ViewFactory.php +++ b/include/MVC/View/ViewFactory.php @@ -54,8 +54,10 @@ class ViewFactory{ //first let's check if the module handles this view $view = null; - - $view = null; + + //Check to see if we should load a custom parent view instance + loadParentView($type); + if(!empty($target_module)) { if(file_exists('custom/modules/'.$target_module.'/views/view.'.$type.'.php')){ $view = ViewFactory::_buildFromFile('custom/modules/'.$target_module.'/views/view.'.$type.'.php', $bean, $view_object_map, $type, $target_module); diff --git a/include/MVC/View/views/view.edit.php b/include/MVC/View/views/view.edit.php index 2d6aa475..0a065420 100644 --- a/include/MVC/View/views/view.edit.php +++ b/include/MVC/View/views/view.edit.php @@ -40,6 +40,7 @@ * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ + require_once('include/EditView/EditView2.php'); class ViewEdit extends SugarView{ var $ev; diff --git a/include/MVC/View/views/view.quickcreate.php b/include/MVC/View/views/view.quickcreate.php index 513a2e99..063b7ac3 100644 --- a/include/MVC/View/views/view.quickcreate.php +++ b/include/MVC/View/views/view.quickcreate.php @@ -129,6 +129,10 @@ class ViewQuickcreate extends ViewAjax $this->ev->defs['templateMeta']['form']['hidden'] = ''; $this->ev->defs['templateMeta']['form']['hidden'] .= ''; $defaultProcess = true; + + //Load the parent view class if it exists. Check for custom file first + loadParentView('edit'); + if(file_exists('modules/'.$module.'/views/view.edit.php')) { include('modules/'.$module.'/views/view.edit.php'); $c = $module . 'ViewEdit'; diff --git a/include/MassUpdate.php b/include/MassUpdate.php index 3cbe5791..4179fc3e 100644 --- a/include/MassUpdate.php +++ b/include/MassUpdate.php @@ -157,10 +157,12 @@ eoq; } }elseif(strlen($value) == 0){ if( isset($this->sugarbean->field_defs[$post]) && $this->sugarbean->field_defs[$post]['type'] == 'radioenum' && isset($_POST[$post]) ){ - $_POST[$post] = ''; + $_POST[$post] = ''; }else{ - unset($_POST[$post]); - } + unset($_POST[$post]); + } + }elseif ( $value == '--null--'){ //Bug36693 MassUpdate for ENUM with Option '0' + $_POST[$post] = ''; } if(is_string($value) && isset($this->sugarbean->field_defs[$post])) { if(($this->sugarbean->field_defs[$post]['type'] == 'bool' @@ -179,7 +181,7 @@ eoq; $this->checkClearField($post, $value); } if($this->sugarbean->field_defs[$post]['type'] == 'date' && !empty($_POST[$post])){ - $_POST[$post] = $timedate->to_db_date($_POST[$post]); + $_POST[$post] = $timedate->to_db_date($_POST[$post], false); } if($this->sugarbean->field_defs[$post]['type'] == 'datetime' && !empty($_POST[$post])){ $_POST[$post] = $timedate->to_db($this->date_to_dateTime($post, $value)); @@ -351,6 +353,7 @@ eoq; if($this->sugarbean->bean_implements('ACL') && !ACLController::checkAccess($this->sugarbean->module_dir, 'edit', true)){ return ''; } + $lang_delete = translate('LBL_DELETE'); $lang_update = translate('LBL_UPDATE'); $lang_confirm= translate('NTC_DELETE_CONFIRMATION_MULTIPLE'); @@ -360,70 +363,74 @@ eoq; $lang_archive = translate('LBL_ARCHIVE'); $lang_optout_primaryemail = $app_strings['LBL_OPT_OUT_FLAG_PRIMARY']; - - -// if(!isset($this->sugarbean->field_defs) || count($this->sugarbean->field_defs) == 0) { -// $html = "
"; -// -// if($this->sugarbean->ACLAccess('Delete', true) ){ -// $html .= ""; -// } -// $html .= "
"; -// return $html; -// } - - - $should_use = false; + $field_count = 0; + $html = ""; } + return $html; } } @@ -955,6 +971,13 @@ EOQ; $new_options[$key] = $value; } $options = $new_options; + }else{ #Bug36693 MassUpdate for ENUM with Option '0' + $new_options[''] = ''; + $new_options['--null--'] = isset($options['']) ? $options[''] : $options['0']; + foreach($options as $key=>$value) { + $new_options[$key] = $value; + } + $options = $new_options; } $options = get_select_options_with_id_separate_key($options, $options, '', true);; $html .= ''; @@ -1140,6 +1163,12 @@ EOQ; } else { $oldTime = $timedate->now(); } + $oldTime = explode(" ", $oldTime); + if (isset($oldTime[1])) { + $oldTime = $oldTime[1]; + } else { + $oldTime = $oldTime[0]; + } $value = explode(" ", $value); $value = $value[0]; return $value." ".$oldTime; diff --git a/include/MySugar/javascript/MySugar.js b/include/MySugar/javascript/MySugar.js index 61c8520a..9fd0675e 100644 --- a/include/MySugar/javascript/MySugar.js +++ b/include/MySugar/javascript/MySugar.js @@ -63,7 +63,7 @@ if(type=='module'||type=='web'){url=null;type='module';} else if(type=='predefined_chart'){url='predefined_chart';type='predefined_chart';} else if(type=='chart'){url='chart';type='chart';} SUGAR.mySugar.retrieveDashlet(data.responseText,url,finishRetrieve,true);} -var cObj=YAHOO.util.Connect.asyncRequest('GET','index.php?to_pdf=1&module='+module+'&action=DynamicAction&DynamicAction=addDashlet&activeTab='+activeTab+'&id='+id+'&type='+type+'&type_module='+type_module,{success:success,failure:success},null);return false;},showDashletsDialog:function(){columns=SUGAR.mySugar.getLayout();if(this.closeDashletsDialogTimer!=null){window.clearTimeout(this.closeDashletsDialogTimer);} +var cObj=YAHOO.util.Connect.asyncRequest('GET','index.php?to_pdf=1&module='+module+'&action=DynamicAction&DynamicAction=addDashlet&activeTab='+activeTab+'&id='+id+'&type='+type+'&type_module='+escape(type_module),{success:success,failure:success},null);return false;},showDashletsDialog:function(){columns=SUGAR.mySugar.getLayout();if(this.closeDashletsDialogTimer!=null){window.clearTimeout(this.closeDashletsDialogTimer);} var num_dashlets=0;var i=0;for(i=0;i<3;i++){if(typeof columns[i]!="undefined"){num_dashlets=num_dashlets+columns[i].length;}} if((num_dashlets)>=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();} diff --git a/include/OutboundEmail/OutboundEmail.php b/include/OutboundEmail/OutboundEmail.php index e6efdddb..1c1e3ba2 100644 --- a/include/OutboundEmail/OutboundEmail.php +++ b/include/OutboundEmail/OutboundEmail.php @@ -446,6 +446,7 @@ class OutboundEmail { $values .= ", "; } $cols .= $def; + $pattern = '\\'; if ($def == 'mail_smtppass' && !empty($this->$def)) { $this->$def = blowfishEncode(blowfishGetKey('OutBoundEmail'), $this->$def); } // if @@ -454,9 +455,15 @@ class OutboundEmail { $this->$def = 0; } $values .= $this->$def; + }elseif($def == 'mail_smtpuser' && strpos($this->$def, '\\' )){ //bug 41766: taking care of '\' in username + $temp = explode('\\', $this->$def); + $this->$def = $temp[0] . '\\\\' .$temp[1]; + $values .= "{$def} = '{$this->$def}'"; }else{ $values .= "'{$this->$def}'"; } + + } $q = "INSERT INTO outbound_email ($cols) VALUES ({$values})"; @@ -476,16 +483,24 @@ class OutboundEmail { if(!empty($values)) { $values .= ", "; } - + $pattern = "\\"; if($def == 'mail_smtpauth_req' || $def == 'mail_smtpssl'){ if(empty($this->$def)){ $this->$def = 0; } $values .= "{$def} = {$this->$def}"; + }elseif($def == 'mail_smtpuser' && strpos($this->$def, '\\' )){ //bug 41766: taking care of '\' in username + $temp = explode('\\', $this->$def); + $this->$def = $temp[0] . '\\\\' .$temp[1]; + $values .= "{$def} = '{$this->$def}'"; }else{ $values .= "{$def} = '{$this->$def}'"; } + + + } + $q = "UPDATE outbound_email SET {$values} WHERE id = '{$this->id}'"; } diff --git a/include/Popups/PopupSmarty.php b/include/Popups/PopupSmarty.php index a8edfb8b..971406c0 100644 --- a/include/Popups/PopupSmarty.php +++ b/include/Popups/PopupSmarty.php @@ -422,7 +422,11 @@ class PopupSmarty extends ListViewSmarty{ { $where = ''; $where_clauses = $this->searchForm->generateSearchWhere(true, $this->seed->module_dir); - if (count($where_clauses) > 0 )$where= implode(' and ', $where_clauses); + // Bug 43452 - FG - Changed the way generated Where array is imploded into the string. + // Now it's imploding in the same way view.list.php do. + if (count($where_clauses) > 0 ) { + $where = '( ' . implode(' and ', $where_clauses) . ' )'; + } // Need to include the default whereStatement if(!empty($this->_popupMeta['whereStatement'])){ diff --git a/include/QuickSearchDefaults.php b/include/QuickSearchDefaults.php index fc1a2c64..67b8ea6f 100644 --- a/include/QuickSearchDefaults.php +++ b/include/QuickSearchDefaults.php @@ -158,7 +158,7 @@ class QuickSearchDefaults { 'limit' => '30','no_match_text' => $app_strings['ERR_SQS_NO_MATCH']); return $qsUser; } - function getQSCampaigns() { + function getQSCampaigns($c_name = 'campaign_name', $c_id = 'campaign_id') { global $app_strings; $qsCampaign = array('form' => $this->form_name, @@ -166,7 +166,7 @@ class QuickSearchDefaults { 'modules'=> array('Campaigns'), 'group' => 'or', 'field_list' => array('name', 'id'), - 'populate_list' => array('campaign_name', 'campaign_id'), + 'populate_list' => array($c_name, $c_id), 'conditions' => array(array('name'=>'name','op'=>'like_custom','end'=>'%','value'=>'')), 'required_list' => array('campaign_id'), 'order' => 'name', @@ -175,6 +175,41 @@ class QuickSearchDefaults { return $qsCampaign; } + + /** + * Loads Quick Search Object for any object (if suitable method is defined) + * + * @param string $module the given module we want to load the vardefs for + * @param string $object the given object we wish to load the vardefs for + * @param string $relationName the name of the relation between entities + * @param type $nameField the name of the field to populate + * @param type $idField the id of the field to populate + */ + function loadQSObject($module, $object, $relationName, $nameField, $idField) + { + $result = array(); + VardefManager::loadVardef($module, $object); + if (isset($GLOBALS['dictionary'][$object]['relationships']) && array_key_exists($relationName, $GLOBALS['dictionary'][$object]['relationships'])) + { + if (method_exists($this, 'getQS' . $module)) + { + $result = $this->{'getQS' . $module}; + } elseif (method_exists($this, 'getQS' . $object)) + { + $result = $this->{'getQS' . $object}; + } + } else + { + if (method_exists($this, 'getQS' . $module)) + { + $result = $this->{'getQS' . $module}($nameField, $idField); + } elseif (method_exists($this, 'getQS' . $object)) + { + $result = $this->{'getQS' . $object}($nameField, $idField); + } + } + return $result; + } // BEGIN QuickSearch functions for 4.5.x backwards compatibility support function getQSScripts() { diff --git a/include/SearchForm/SearchForm2.php b/include/SearchForm/SearchForm2.php index fe8a7a37..b8075daa 100644 --- a/include/SearchForm/SearchForm2.php +++ b/include/SearchForm/SearchForm2.php @@ -440,7 +440,7 @@ require_once('include/EditView/EditView2.php'); $long_name = $name.'_'.$SearchName; /*nsingh 21648: Add additional check for bool values=0. empty() considers 0 to be empty Only repopulates if value is 0 or 1:( */ if(isset($array[$long_name]) && !$this->isEmptyDropdownField($long_name, $array[$long_name]) && ( $array[$long_name] !== '' || (isset($this->fieldDefs[$long_name]['type']) && $this->fieldDefs[$long_name]['type'] == 'bool'&& ($array[$long_name]=='0' || $array[$long_name]=='1')))) - { //advanced*/ + { $this->searchFields[$name]['value'] = $array[$long_name]; if(empty($this->fieldDefs[$long_name]['value'])) { $this->fieldDefs[$long_name]['value'] = $array[$long_name]; @@ -463,7 +463,8 @@ require_once('include/EditView/EditView2.php'); if(!empty($params['is_date_field']) && isset($this->searchFields[$name]['value'])) { global $timedate; - $date_value = $timedate->to_db_date($this->searchFields[$name]['value']); + // FG - bug 45287 - to db conversion is ok, but don't adjust timezone (not now), otherwise you'll jump to the day before (if at GMT-xx) + $date_value = $timedate->to_db_date($this->searchFields[$name]['value'], false); $this->searchFields[$name]['value'] = $date_value == '' ? $this->searchFields[$name]['value'] : $date_value; } } @@ -482,8 +483,12 @@ require_once('include/EditView/EditView2.php'); if (!empty($params['type']) && $params['type'] == 'parent' && !empty($params['type_name']) && !empty($this->searchFields[$key]['value'])) { + require_once('include/SugarFields/SugarFieldHandler.php'); + $sfh = new SugarFieldHandler(); + $sf = $sfh->getSugarField('Parent'); + $this->searchFields[$params['type_name']] = array('query_type' => 'default', - 'value' => $array[$params['type_name']]); + 'value' => $sf->getSearchInput($params['type_name'], $array)); } if(empty($this->fieldDefs[$long_name]['value'])) { @@ -552,6 +557,13 @@ require_once('include/EditView/EditView2.php'); $this->searchFields[$real_field]['operator'] = 'between'; $parms['value'] = $this->searchFields[$real_field]['value']; $parms['operator'] = 'between'; + + $field_type = isset($this->seed->field_name_map[$real_field]['type']) ? $this->seed->field_name_map[$real_field]['type'] : ''; + if($field_type == 'datetimecombo' || $field_type == 'datetime') + { + $type = $field_type; + } + $field = $real_field; unset($this->searchFields[$end_field]['value']); } @@ -777,9 +789,25 @@ require_once('include/EditView/EditView2.php'); if($type == 'datetime' || $type == 'datetimecombo') { try { - $dates = $timedate->getDayStartEndGMT($field_value); - $field_value = $dates["start"] . "<>" . $dates["end"]; - $operator = 'between'; + // FG - bug45287 - If User asked for a range, takes edges from it. + $placeholderPos = strpos($field_value, "<>"); + if ($placeholderPos !== FALSE && $placeholderPos > 0) + { + $datesLimit = explode("<>", $field_value); + $dateStart = $timedate->getDayStartEndGMT($datesLimit[0]); + $dateEnd = $timedate->getDayStartEndGMT($datesLimit[1]); + $dates = $dateStart; + $dates['end'] = $dateEnd['end']; + $dates['enddate'] = $dateEnd['enddate']; + $dates['endtime'] = $dateEnd['endtime']; + } + else + { + $dates = $timedate->getDayStartEndGMT($field_value); + } + // FG - bug45287 - Note "start" and "end" are the correct interval at GMT timezone + $field_value = $dates["start"] . "<>" . $dates["end"]; + $operator = 'between'; } catch(Exception $timeException) { //In the event that a date value is given that cannot be correctly processed by getDayStartEndGMT method, //just skip searching on this field and continue. This may occur if user switches locale date formats @@ -788,6 +816,71 @@ require_once('include/EditView/EditView2.php'); continue; } } + + // adjust date searches to take account for user timezone + // 'equals' and 'is between' cases are handled above. + if ($type =='' && !empty($parms['enable_range_search']) && $parms['enable_range_search']==true) { + // check if value is a db date or db datetime format + if (preg_match('/^(\d{4}-\d{2}-\d{2})( \d{2}:\d{2}:\d{2})?$/', $field_value)) { + if ($operator == 'not_equal') { + $adjDate = $timedate->getDayStartEndGMT($field_value); + $field_value = $adjDate['start'] . '<>' . $adjDate['end']; + $operator = 'date_not_equal'; + } elseif ($operator == 'greater_than' || $operator == 'less_than_equals') { + $adjDate = $timedate->getDayStartEndGMT($field_value); + $field_value = $adjDate['end']; + } elseif ($operator == 'less_than' || $operator == 'greater_than_equals') { + $adjDate = $timedate->getDayStartEndGMT($field_value); + $field_value = $adjDate['start']; + } + // check if value is something like [last_month]|[next_7_days]|[this_year]|etc... + } elseif (preg_match('/^\[[(this|last|next)_][_a-z0-9]*\]$/', $field_value)) { + switch($operator) { + case 'last_7_days': + $startDate = $timedate->getDayStartEndGMT(date('m/d/Y', time() - (7 * 24 * 60 * 60))); + $endDate = $timedate->getDayStartEndGMT(date('m/d/Y')); + break; + case 'next_7_days': + $startDate = $timedate->getDayStartEndGMT(date('m/d/Y')); + $endDate = $timedate->getDayStartEndGMT(date('m/d/Y', time() + (7 * 24 * 60 * 60))); + break; + case 'next_month': + $startDate = $timedate->getDayStartEndGMT(date('m/d/Y', mktime(0, 0, 0, date("m")+1, 01, date("Y")))); + $endDate = $timedate->getDayStartEndGMT(date('m/d/Y', mktime(0, 0, -1, date("m")+2, 01, date("Y")))); + break; + case 'last_month': + $startDate = $timedate->getDayStartEndGMT(date('m/d/Y', mktime(0, 0, 0, date("m")-1, 01, date("Y")))); + $endDate = $timedate->getDayStartEndGMT(date('m/d/Y', mktime(0, 0, -1, date("m"), 01, date("Y")))); + break; + case 'this_month': + $startDate = $timedate->getDayStartEndGMT(date('m/d/Y', mktime(0, 0, 0, date("m"), 01, date("Y")))); + $endDate = $timedate->getDayStartEndGMT(date('m/d/Y', mktime(0, 0, -1, date("m")+1, 01, date("Y")))); + break; + case 'last_30_days': + $startDate = $timedate->getDayStartEndGMT(date('m/d/Y', time() - (30 * 24 * 60 * 60))); + $endDate = $timedate->getDayStartEndGMT(date('m/d/Y')); + break; + case 'next_30_days': + $startDate = $timedate->getDayStartEndGMT(date('m/d/Y')); + $endDate = $timedate->getDayStartEndGMT(date('m/d/Y', time() + (30 * 24 * 60 * 60))); + break; + case 'this_year': + $startDate = $timedate->getDayStartEndGMT(date('m/d/Y', mktime(0, 0, 0, 01, 01, date("Y")))); + $endDate = $timedate->getDayStartEndGMT(date('m/d/Y', mktime(0, 0, 0, 12, 31, date("Y")))); + break; + case 'last_year': + $startDate = $timedate->getDayStartEndGMT(date('m/d/Y', mktime(0, 0, 0, 01, 01, date("Y")-1))); + $endDate = $timedate->getDayStartEndGMT(date('m/d/Y', mktime(0, 0, 0, 12, 31, date("Y")-1))); + break; + case 'next_year': + $startDate = $timedate->getDayStartEndGMT(date('m/d/Y', mktime(0, 0, 0, 01, 01, date("Y")+1))); + $endDate = $timedate->getDayStartEndGMT(date('m/d/Y', mktime(0, 0, 0, 12, 31, date("Y")+1))); + break; + } + $field_value = $startDate['start'] . "<>" . $endDate['end']; + $operator = 'between'; + } + } if($type == 'decimal' || $type == 'float' || $type == 'currency' || (!empty($parms['enable_range_search']) && empty($parms['is_date_field']))) { require_once('modules/Currencies/Currency.php'); @@ -880,7 +973,8 @@ require_once('include/EditView/EditView2.php'); case 'like': if($type == 'bool' && $field_value == 0) { - $where .= $db_field . " = '0' OR " . $db_field . " IS NULL"; + // Bug 43452 - FG - Added parenthesis surrounding the OR (without them the WHERE clause would be broken) + $where .= "( " . $db_field . " = '0' OR " . $db_field . " IS NULL )"; } else { //check to see if this is coming from unified search or not @@ -889,8 +983,8 @@ require_once('include/EditView/EditView2.php'); $UnifiedSearch = true; } - //check to see if this is a universal search, AND the field name is "last_name" - if($UnifiedSearch && strpos($db_field, 'last_name') !== false){ + //check to see if this is a universal search OR the field has db_concat_fields set in vardefs, AND the field name is "last_name" + if(($UnifiedSearch || !empty($this->seed->field_name_map[$field]['db_concat_fields'])) && strpos($db_field, 'last_name') !== false){ //split the string value, and the db field name $string = explode(' ', $field_value); $column_name = explode('.', $db_field); @@ -904,7 +998,8 @@ require_once('include/EditView/EditView2.php'); $where .= $db_field . " like '".$field_value.$like_char."'"; } - }else { + } + else { //Check if this is a first_name, last_name search if(isset($this->seed->field_name_map) && isset($this->seed->field_name_map[$db_field])) @@ -965,6 +1060,10 @@ require_once('include/EditView/EditView2.php'); $field_value = explode('<>', $field_value); $where .= $db_field . " >= '".$field_value[0] . "' AND " .$db_field . " <= '".$field_value[1]."'"; break; + case 'date_not_equal': + $field_value = explode('<>', $field_value); + $where .= $db_field . " < '".$field_value[0] . "' OR " .$db_field . " > '".$field_value[1]."'"; + break; case 'innerjoin': $this->seed->listview_inner_join[] = $parms['innerjoin'] . " '" . $parms['value'] . "%')"; break; @@ -983,86 +1082,6 @@ require_once('include/EditView/EditView2.php'); case 'less_than_equals': $where .= $db_field . " <= '". $field_value . "'"; break; - case 'last_7_days': - if($GLOBALS['db']->dbType == 'mysql') { - $where .= "LEFT(" . $db_field . ",10) BETWEEN LEFT((current_date - interval '7' day),10) AND LEFT(current_date,10)"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "DATEDIFF ( d , " . $db_field . " , GETDATE() ) <= 7 and DATEDIFF ( d , " . $db_field . " , GETDATE() ) >= 0"; - } - break; - case 'next_7_days': - if($GLOBALS['db']->dbType == 'mysql') { - $where .= "LEFT(" . $db_field . ",10) BETWEEN LEFT(current_date,10) AND LEFT((current_date + interval '7' day),10)"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "DATEDIFF ( d , GETDATE() , " . $db_field . " ) <= 7 and DATEDIFF ( d , GETDATE() , " . $db_field . " ) >= 0"; - } - break; - case 'next_month': - if ($GLOBALS['db']->dbType == 'mysql') { - $where .= "LEFT(" . $db_field . ",7) = LEFT( (current_date + interval '1' month),7)"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "(LEFT( ".$db_field.",4) = LEFT( (DATEADD(mm,1,GETDATE())),4)) and (DATEPART(yy, DATEADD(mm,1,GETDATE())) = DATEPART(yy, DATEADD(mm,1,".$db_field.")))"; - } - break; - case 'last_month': - if ($GLOBALS['db']->dbType == 'mysql') { - $where .= "LEFT(" . $db_field . ",7) = LEFT( (current_date - interval '1' month),7)"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "LEFT(" . $db_field . ",4) = LEFT((DATEADD(mm,-1,GETDATE())),4) and DATEPART(yy," . $db_field . ") = DATEPART(yy, GETDATE())"; - } - break; - case 'this_month': - if ($GLOBALS['db']->dbType == 'mysql') { - $where .= "LEFT(" . $db_field . ",7) = LEFT( current_date,7)"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "LEFT (" . $db_field . ",4) = LEFT( GETDATE(),4) and DATEPART(yy," . $db_field . ") = DATEPART(yy, GETDATE())"; - } - break; - case 'last_30_days': - if ($GLOBALS['db']->dbType == 'mysql') { - $where .= "LEFT(" . $db_field . ",10) BETWEEN LEFT((current_date - interval '30' day),10) AND LEFT(current_date,10)"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "DATEDIFF ( d , " . $db_field . " , GETDATE() ) <= 30 and DATEDIFF ( d , " . $db_field . " , GETDATE() ) >= 0"; - } - break; - case 'next_30_days': - if ($GLOBALS['db']->dbType == 'mysql') { - $where .= $db_field . " BETWEEN (current_date) AND (current_date + interval '1' month)"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "DATEDIFF ( d , GETDATE() , " . $db_field . " ) <= 30 and DATEDIFF ( d , GETDATE() , " . $db_field . " ) >= 0"; - } - break; - case 'this_year': - if ($GLOBALS['db']->dbType == 'mysql') { - $where .= "LEFT(" . $db_field . ",4) = EXTRACT(YEAR FROM ( current_date ))"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "DATEPART(yy," . $db_field . ") = DATEPART(yy, GETDATE())"; - } - break; - case 'last_year': - if ($GLOBALS['db']->dbType == 'mysql') { - $where .= "LEFT(" . $db_field . ",4) = EXTRACT(YEAR FROM ( current_date - interval '1' year))"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "DATEPART(yy," . $db_field . ") = DATEPART(yy,( dateadd(yy,-1,GETDATE())))"; - } - break; - case 'next_year': - if ($GLOBALS['db']->dbType == 'mysql') { - $where .= "LEFT(" . $db_field . ",4) = EXTRACT(YEAR FROM ( current_date + interval '1' year))"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "DATEPART(yy," . $db_field . ") = DATEPART(yy,( dateadd(yy, 1,GETDATE())))"; - } - break; case 'isnull': // OOTB fields are NULL, custom fields are blank $where .= '('.$db_field . ' IS NULL or ' . $db_field . "='')"; @@ -1103,4 +1122,4 @@ require_once('include/EditView/EditView2.php'); return $result; } } -?> \ No newline at end of file +?> diff --git a/include/SearchForm/tpls/SearchFormGenericAdvanced.tpl b/include/SearchForm/tpls/SearchFormGenericAdvanced.tpl index 9d916a70..2e88eeff 100644 --- a/include/SearchForm/tpls/SearchFormGenericAdvanced.tpl +++ b/include/SearchForm/tpls/SearchFormGenericAdvanced.tpl @@ -9,6 +9,12 @@ assign=modVal } {if ($index % $templateMeta.maxColumns == 1 && $index != 1)} + {if $isHelperShown==0} + {assign var="isHelperShown" value="1"} + + {else} +   + {/if} {/if} @@ -46,7 +52,7 @@ - + {sugar_translate label='LBL_MODIFY_CURRENT_SEARCH' module='SavedSearch'}: diff --git a/include/SubPanel/SubPanelDynamic.html b/include/SubPanel/SubPanelDynamic.html index 25e00673..c154b11c 100644 --- a/include/SubPanel/SubPanelDynamic.html +++ b/include/SubPanel/SubPanelDynamic.html @@ -50,7 +50,7 @@ -{CELL} +{CELL} diff --git a/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js b/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js index 02d8f557..51d6e0d4 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); +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 fa4f1ab9..dd0903db 100644 --- a/include/SugarCharts/Jit/js/Jit/jit.js +++ b/include/SugarCharts/Jit/js/Jit/jit.js @@ -59,7 +59,7 @@ elem.parentNode.removeChild(elem);if(elem.clearAttributes) elem.clearAttributes();};$.clean=function(elem){for(var ch=elem.childNodes,i=0,l=ch.length;i-1;};$.addClass=function(obj,klass){if(!$.hasClass(obj,klass)) -obj.className=(obj.className+" "+klass);};$.removeClass=function(obj,klass){obj.className=obj.className.replace(new RegExp('(^|\\s)'+klass+'(?:\\s|$)'),'$1');};$.getPos=function(elem){var offset=getOffsets(elem);var scroll=getScrolls(elem);return{x:offset.x-scroll.x,y:offset.y-scroll.y};function getOffsets(elem){var position={x:0,y:0};while(elem&&!isBody(elem)){position.x+=elem.offsetLeft;position.y+=elem.offsetTop;elem=elem.offsetParent;} +obj.className=(obj.className+" "+klass);};$.removeClass=function(obj,klass){obj.className=obj.className.replace(new RegExp('(^|\\s)'+klass+'(?:\\s|$)'),'$1');};$.getPos=function(elem){var offset=getOffsets(elem);var scroll=getScrolls(elem);return{x:offset.x-scroll.x,y:offset.y-scroll.y};function getOffsets(elem){var position={x:0,y:0};while(elem&&!isBody(elem)){position.x+=elem.offsetLeft;position.y+=elem.offsetTop;try{elem=elem.offsetParent;}catch(e){elem=document.body;}} 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;} diff --git a/include/SugarCharts/JsChart.php b/include/SugarCharts/JsChart.php index 94ea348a..1fbac7d2 100644 --- a/include/SugarCharts/JsChart.php +++ b/include/SugarCharts/JsChart.php @@ -266,9 +266,18 @@ class JsChart extends SugarChart { } function buildLabelsBarChart($xmlstr) { - $content = $this->tab("'label': [\n",1); + + // fix for bug42326: if there is label data that is deeper than that of a normal bar chart, render the labels + // like a stacked bar chart, this applies when a stacked chart has been converted in templates_chart.php to a bar chart due to it + // having nothing but single value columns + $xml = new SimpleXMLElement($xmlstr); + if (count($xml->data->group[0]->subgroups->group) > 0) { + return $this->buildLabelsBarChartStacked($xmlstr); + } + + $content = $this->tab("'label': [\n",1); $labels = array(); - $xml = new SimpleXMLElement($xmlstr); + foreach($xml->data->group as $group) { $labels[] = $this->tab("'".$this->processSpecialChars($group->title)."'",2); } diff --git a/include/SugarCharts/SugarChart.php b/include/SugarCharts/SugarChart.php index 2fec5325..1d2587fe 100644 --- a/include/SugarCharts/SugarChart.php +++ b/include/SugarCharts/SugarChart.php @@ -479,8 +479,9 @@ class SugarChart { if (isset($drill_down) && $drill_down){ if ($this->group_by[0] == 'm'){ $additional_param = '&date_closed_advanced=' . urlencode($key); - } - else{ + } else if ( $this->group_by[0] == 'sales_stage' ) { + $additional_param = '&sales_stage_advanced[]='.urlencode(array_search($key,$GLOBALS['app_list_strings']['sales_stage_dom'])); + } else{ $additional_param = "&" . $this->group_by[0] . "=" . urlencode($key); } $url = $this->constructURL() . $additional_param; diff --git a/include/SugarEmailAddress/SugarEmailAddress.js b/include/SugarEmailAddress/SugarEmailAddress.js index 64035ee6..0b554b9a 100644 --- a/include/SugarEmailAddress/SugarEmailAddress.js +++ b/include/SugarEmailAddress/SugarEmailAddress.js @@ -37,13 +37,13 @@ document.getElementById(module+'_email_widget_id').value=this.id;SUGAR.EmailAddr SUGAR.EmailAddressWidget.instances={};SUGAR.EmailAddressWidget.count={};SUGAR.EmailAddressWidget.prototype={emailTemplate:''+''+' '+''+''+''+''+'',numberEmailAddresses:0,replyToFlagObject:new Object(),verifying:false,enterPressed:false,tabPressed:false,emailView:"",emailIsRequired:false,tabIndex:-1,prefillEmailAddresses:function(tableId,o){for(i=0;i1){verifyElementFlag.parentNode.removeChild(verifyElementFlag.parentNode.lastChild);} -var verifiedTextNode=document.createElement('span');verifiedTextNode.innerHTML='';verifyElementFlag.parentNode.appendChild(verifiedTextNode);verifyElementFlag.value="true";this.verifyElementValue=Dom.get(this.id+'emailAddressVerifiedValue'+index);this.verifyElementValue.value=Dom.get(this.id+'emailAddress'+index).value;this.verifying=false;var savePressed=false;if(event){var elm=document.activeElement||event.explicitOriginalTarget;if(typeof elm.type!='undefined'&&/submit|button/.test(elm.type.toLowerCase())){savePressed=true;}} +var verifiedTextNode=document.createElement('span');verifiedTextNode.innerHTML='';verifyElementFlag.parentNode.appendChild(verifiedTextNode);verifyElementFlag.value="true";this.verifyElementValue=Dom.get(this.id+'emailAddressVerifiedValue'+index);this.verifyElementValue.value=Dom.get(this.id+'emailAddress'+index).value;this.verifying=false;var savePressed=false;if(event){var elm=document.activeElement||event.explicitOriginalTarget;if(typeof elm.type!='undefined'&&!(/_email_widget_add/.test(elm.id.toLowerCase()))&&/submit|button/.test(elm.type.toLowerCase())){savePressed=true;}} if(savePressed||this.enterPressed){setTimeout("SUGAR.EmailAddressWidget.instances."+this.id+".forceSubmit()",2100);}else if(this.tabPressed){Dom.get(this.id+'emailAddressPrimaryFlag'+index).focus();}} var event=this.getEvent(event);var targetEl=this.getEventElement(event);var index=/[a-z]*\d?emailAddress(\d+)/i.exec(targetEl.id)[1];var verifyElementFlag=Dom.get(this.id+'emailAddressVerifiedFlag'+index);this.verifyElementValue=Dom.get(this.id+'emailAddressVerifiedValue'+index);verifyElementFlag.value=(trim(targetEl.value)==''||targetEl.value==this.verifyElementValue.value)?"true":"false" if(verifyElementFlag.parentNode.childNodes.length>1){verifyElementFlag.parentNode.removeChild(verifyElementFlag.parentNode.lastChild);} if(/emailAddress\d+$/.test(targetEl.id)&&isValidEmail(targetEl.value)&&!this.verifying&&verifyElementFlag.value=="false"){verifiedTextNode=document.createElement('span');verifyElementFlag.parentNode.appendChild(verifiedTextNode);verifiedTextNode.innerHTML=SUGAR.language.get('app_strings','LBL_VERIFY_EMAIL_ADDRESS');this.verifying=true;var cObj=YAHOO.util.Connect.asyncRequest('GET','index.php?module=Contacts&action=RetrieveEmail&target='+targetEl.id+'&email='+targetEl.value,{success:callbackFunction,failure:callbackFunction,scope:this});}},handleKeyDown:function(event){var e=this.getEvent(event);var eL=this.getEventElement(e);if((kc=e["keyCode"])){this.enterPressed=(kc==13)?true:false;this.tabPressed=(kc==9)?true:false;if(this.enterPressed||this.tabPressed){this.retrieveEmailAddress(e);if(this.enterPressed);this.freezeEvent(e);}}},getEvent:function(event){return(event?event:window.event);},getEventElement:function(e){return(e.srcElement?e.srcElement:(e.target?e.target:e.currentTarget));},freezeEvent:function(e){if(e.preventDefault)e.preventDefault();e.returnValue=false;e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();return false;},addEmailAddress:function(tableId,address,primaryFlag,replyToFlag,optOutFlag,invalidFlag){if(this.addInProgress) return;this.addInProgress=true;if(!address) -address="";var insertInto=Dom.get(tableId);var parentObj=insertInto.parentNode;var newContent=document.createElement("input");var nav=new String(navigator.appVersion);var newContentPrimaryFlag;if(SUGAR.isIE){newContentPrimaryFlag=document.createElement("");}else{newContentPrimaryFlag=document.createElement("input");} +address="";var insertInto=Dom.get(tableId);var parentObj=insertInto.parentNode;var newContent=document.createElement("input");var nav=new String(navigator.appVersion);var newContentPrimaryFlag;if(YAHOO.env.ua.ie){newContentPrimaryFlag=document.createElement("");}else{newContentPrimaryFlag=document.createElement("input");} var newContentReplyToFlag=document.createElement("input");var newContentOptOutFlag=document.createElement("input");var newContentInvalidFlag=document.createElement("input");var newContentVerifiedFlag=document.createElement("input");var newContentVerifiedValue=document.createElement("input");var removeButton=document.createElement("img");var tbody=document.createElement("tbody");var tr=document.createElement("tr");var td1=document.createElement("td");var td2=document.createElement("td");var td3=document.createElement("td");var td4=document.createElement("td");var td5=document.createElement("td");var td6=document.createElement("td");var td7=document.createElement("td");var td8=document.createElement("td");newContent.setAttribute("type","text");newContent.setAttribute("name",this.id+"emailAddress"+this.numberEmailAddresses);newContent.setAttribute("id",this.id+"emailAddress"+this.numberEmailAddresses);newContent.setAttribute("tabindex",this.tabIndex);newContent.setAttribute("size","30");if(address!=''){newContent.setAttribute("value",address);} removeButton.setAttribute("id",this.id+"removeButton"+this.numberEmailAddresses);removeButton.setAttribute("class","id-ff-remove");removeButton.setAttribute("name",this.numberEmailAddresses);removeButton.eaw=this;removeButton.setAttribute("src","index.php?entryPoint=getImage&themeName="+SUGAR.themes.theme_name+"&imageName=id-ff-remove.png");removeButton.onclick=function(){this.eaw.removeEmailAddress(this.name);};newContentPrimaryFlag.setAttribute("type","radio");newContentPrimaryFlag.setAttribute("name",this.id+"emailAddressPrimaryFlag");newContentPrimaryFlag.setAttribute("id",this.id+"emailAddressPrimaryFlag"+this.numberEmailAddresses);newContentPrimaryFlag.setAttribute("value",this.id+"emailAddress"+this.numberEmailAddresses);newContentPrimaryFlag.setAttribute("enabled","true");newContentReplyToFlag.setAttribute("type","radio");newContentReplyToFlag.setAttribute("name",this.id+"emailAddressReplyToFlag");newContentReplyToFlag.setAttribute("id",this.id+"emailAddressReplyToFlag"+this.numberEmailAddresses);newContentReplyToFlag.setAttribute("value",this.id+"emailAddress"+this.numberEmailAddresses);newContentReplyToFlag.setAttribute("enabled","true");newContentReplyToFlag.eaw=this;newContentReplyToFlag['onclick']=function(){var form=document.forms[this.eaw.emailView];if(!form){form=document.forms['editContactForm'];} var nav=new String(navigator.appVersion);if(nav.match(/MSIE/gim)){for(i=0;idb->limitQuery($q, 0, 1); $a = $this->db->fetchByAssoc($r); @@ -665,6 +671,7 @@ class SugarEmailAddress extends SugarBean { WHERE ear.bean_module = '{$focus->module_dir}' AND ear.bean_id = '{$focus->id}' AND ear.deleted = 0 + AND ea.invalid_email = 0 ORDER BY ear.reply_to_address DESC"; $r = $this->db->query($q); $a = $this->db->fetchByAssoc($r); diff --git a/include/SugarEmailAddress/templates/forEditView.tpl b/include/SugarEmailAddress/templates/forEditView.tpl index 8125f9b6..e1972386 100644 --- a/include/SugarEmailAddress/templates/forEditView.tpl +++ b/include/SugarEmailAddress/templates/forEditView.tpl @@ -61,7 +61,7 @@ var emailAddressWidgetLoaded = false; - diff --git a/include/SugarEmailAddress/templates/forWideFormBodyView.tpl b/include/SugarEmailAddress/templates/forWideFormBodyView.tpl index 3074248d..9bd4ba06 100644 --- a/include/SugarEmailAddress/templates/forWideFormBodyView.tpl +++ b/include/SugarEmailAddress/templates/forWideFormBodyView.tpl @@ -54,7 +54,7 @@ - diff --git a/include/SugarFields/Fields/Address/en_us.EditView.tpl b/include/SugarFields/Fields/Address/en_us.EditView.tpl index 5db40e46..cc404ede 100644 --- a/include/SugarFields/Fields/Address/en_us.EditView.tpl +++ b/include/SugarFields/Fields/Address/en_us.EditView.tpl @@ -47,7 +47,7 @@ '+''+''+''+''+''+''+'',numberEmailAddresses:0,replyToFlagObject:new Object(),verifying:false,enterPressed:false,tabPressed:false,emailView:"",emailIsRequired:false,tabIndex:-1,prefillEmailAddresses:function(tableId,o){for(i=0;i1){verifyElementFlag.parentNode.removeChild(verifyElementFlag.parentNode.lastChild);} -var verifiedTextNode=document.createElement('span');verifiedTextNode.innerHTML='';verifyElementFlag.parentNode.appendChild(verifiedTextNode);verifyElementFlag.value="true";this.verifyElementValue=Dom.get(this.id+'emailAddressVerifiedValue'+index);this.verifyElementValue.value=Dom.get(this.id+'emailAddress'+index).value;this.verifying=false;var savePressed=false;if(event){var elm=document.activeElement||event.explicitOriginalTarget;if(typeof elm.type!='undefined'&&/submit|button/.test(elm.type.toLowerCase())){savePressed=true;}} +var verifiedTextNode=document.createElement('span');verifiedTextNode.innerHTML='';verifyElementFlag.parentNode.appendChild(verifiedTextNode);verifyElementFlag.value="true";this.verifyElementValue=Dom.get(this.id+'emailAddressVerifiedValue'+index);this.verifyElementValue.value=Dom.get(this.id+'emailAddress'+index).value;this.verifying=false;var savePressed=false;if(event){var elm=document.activeElement||event.explicitOriginalTarget;if(typeof elm.type!='undefined'&&!(/_email_widget_add/.test(elm.id.toLowerCase()))&&/submit|button/.test(elm.type.toLowerCase())){savePressed=true;}} if(savePressed||this.enterPressed){setTimeout("SUGAR.EmailAddressWidget.instances."+this.id+".forceSubmit()",2100);}else if(this.tabPressed){Dom.get(this.id+'emailAddressPrimaryFlag'+index).focus();}} var event=this.getEvent(event);var targetEl=this.getEventElement(event);var index=/[a-z]*\d?emailAddress(\d+)/i.exec(targetEl.id)[1];var verifyElementFlag=Dom.get(this.id+'emailAddressVerifiedFlag'+index);this.verifyElementValue=Dom.get(this.id+'emailAddressVerifiedValue'+index);verifyElementFlag.value=(trim(targetEl.value)==''||targetEl.value==this.verifyElementValue.value)?"true":"false" if(verifyElementFlag.parentNode.childNodes.length>1){verifyElementFlag.parentNode.removeChild(verifyElementFlag.parentNode.lastChild);} if(/emailAddress\d+$/.test(targetEl.id)&&isValidEmail(targetEl.value)&&!this.verifying&&verifyElementFlag.value=="false"){verifiedTextNode=document.createElement('span');verifyElementFlag.parentNode.appendChild(verifiedTextNode);verifiedTextNode.innerHTML=SUGAR.language.get('app_strings','LBL_VERIFY_EMAIL_ADDRESS');this.verifying=true;var cObj=YAHOO.util.Connect.asyncRequest('GET','index.php?module=Contacts&action=RetrieveEmail&target='+targetEl.id+'&email='+targetEl.value,{success:callbackFunction,failure:callbackFunction,scope:this});}},handleKeyDown:function(event){var e=this.getEvent(event);var eL=this.getEventElement(e);if((kc=e["keyCode"])){this.enterPressed=(kc==13)?true:false;this.tabPressed=(kc==9)?true:false;if(this.enterPressed||this.tabPressed){this.retrieveEmailAddress(e);if(this.enterPressed);this.freezeEvent(e);}}},getEvent:function(event){return(event?event:window.event);},getEventElement:function(e){return(e.srcElement?e.srcElement:(e.target?e.target:e.currentTarget));},freezeEvent:function(e){if(e.preventDefault)e.preventDefault();e.returnValue=false;e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();return false;},addEmailAddress:function(tableId,address,primaryFlag,replyToFlag,optOutFlag,invalidFlag){if(this.addInProgress) return;this.addInProgress=true;if(!address) -address="";var insertInto=Dom.get(tableId);var parentObj=insertInto.parentNode;var newContent=document.createElement("input");var nav=new String(navigator.appVersion);var newContentPrimaryFlag;if(SUGAR.isIE){newContentPrimaryFlag=document.createElement("");}else{newContentPrimaryFlag=document.createElement("input");} +address="";var insertInto=Dom.get(tableId);var parentObj=insertInto.parentNode;var newContent=document.createElement("input");var nav=new String(navigator.appVersion);var newContentPrimaryFlag;if(YAHOO.env.ua.ie){newContentPrimaryFlag=document.createElement("");}else{newContentPrimaryFlag=document.createElement("input");} var newContentReplyToFlag=document.createElement("input");var newContentOptOutFlag=document.createElement("input");var newContentInvalidFlag=document.createElement("input");var newContentVerifiedFlag=document.createElement("input");var newContentVerifiedValue=document.createElement("input");var removeButton=document.createElement("img");var tbody=document.createElement("tbody");var tr=document.createElement("tr");var td1=document.createElement("td");var td2=document.createElement("td");var td3=document.createElement("td");var td4=document.createElement("td");var td5=document.createElement("td");var td6=document.createElement("td");var td7=document.createElement("td");var td8=document.createElement("td");newContent.setAttribute("type","text");newContent.setAttribute("name",this.id+"emailAddress"+this.numberEmailAddresses);newContent.setAttribute("id",this.id+"emailAddress"+this.numberEmailAddresses);newContent.setAttribute("tabindex",this.tabIndex);newContent.setAttribute("size","30");if(address!=''){newContent.setAttribute("value",address);} removeButton.setAttribute("id",this.id+"removeButton"+this.numberEmailAddresses);removeButton.setAttribute("class","id-ff-remove");removeButton.setAttribute("name",this.numberEmailAddresses);removeButton.eaw=this;removeButton.setAttribute("src","index.php?entryPoint=getImage&themeName="+SUGAR.themes.theme_name+"&imageName=id-ff-remove.png");removeButton.onclick=function(){this.eaw.removeEmailAddress(this.name);};newContentPrimaryFlag.setAttribute("type","radio");newContentPrimaryFlag.setAttribute("name",this.id+"emailAddressPrimaryFlag");newContentPrimaryFlag.setAttribute("id",this.id+"emailAddressPrimaryFlag"+this.numberEmailAddresses);newContentPrimaryFlag.setAttribute("value",this.id+"emailAddress"+this.numberEmailAddresses);newContentPrimaryFlag.setAttribute("enabled","true");newContentReplyToFlag.setAttribute("type","radio");newContentReplyToFlag.setAttribute("name",this.id+"emailAddressReplyToFlag");newContentReplyToFlag.setAttribute("id",this.id+"emailAddressReplyToFlag"+this.numberEmailAddresses);newContentReplyToFlag.setAttribute("value",this.id+"emailAddress"+this.numberEmailAddresses);newContentReplyToFlag.setAttribute("enabled","true");newContentReplyToFlag.eaw=this;newContentReplyToFlag['onclick']=function(){var form=document.forms[this.eaw.emailView];if(!form){form=document.forms['editContactForm'];} var nav=new String(navigator.appVersion);if(nav.match(/MSIE/gim)){for(i=0;i"; + } + + var subj = document.getElementById('emailSubject' + idx).value; var to = trim(document.getElementById('addressTO' + idx).value); var cc = trim(document.getElementById('addressCC' + idx).value); var bcc = trim(document.getElementById('addressBCC' + idx).value); diff --git a/include/javascript/sugar_grp_quickcomp.js b/include/javascript/sugar_grp_quickcomp.js index f0778f5e..5fc98555 100644 --- a/include/javascript/sugar_grp_quickcomp.js +++ b/include/javascript/sugar_grp_quickcomp.js @@ -3405,8 +3405,8 @@ SE.composeLayout = { SE.composeLayout._initComposeOptionTabs(idx); SE.composeLayout[idx].getUnitByPosition("right").collapse(); //Initialize tinyMCE - if (!SUGAR.util.isTouchScreen()) - SE.composeLayout._1_tiny(false); + SE.composeLayout._1_tiny(false); + //Init templates and address book SE.composeLayout._2_final(); @@ -3604,13 +3604,17 @@ SE.composeLayout = { var elId = SE.tinyInstances.currentHtmleditor = 'htmleditor' + idx; SE.tinyInstances[elId] = { }; SE.tinyInstances[elId].ready = false; - var t = tinyMCE.getInstanceById(elId); + if (!SUGAR.util.isTouchScreen()) { + var t = tinyMCE.getInstanceById(elId); + } if(typeof(t) == 'undefined') { - tinyMCE.execCommand('mceAddControl', false, elId); + if (!SUGAR.util.isTouchScreen()) { + tinyMCE.execCommand('mceAddControl', false, elId); + } YAHOO.util.Event.onAvailable(elId + "_parent", function() { SE.composeLayout.resizeEditorSetSignature(idx,!isReplyForward); - }, this); + }, this); } }, @@ -3692,7 +3696,7 @@ SE.composeLayout = { if (!retry) { this._0_yui(); } - if (typeof(tinyMCE) == 'undefined' || typeof(tinyMCE.settings) == 'undefined'){ + if (!SUGAR.util.isTouchScreen() && (typeof(tinyMCE) == 'undefined' || typeof(tinyMCE.settings) == 'undefined')){ setTimeout("SE.composeLayout.c1_composeEmail(" + isReplyForward + ", true);", 500); } else { this._1_tiny(isReplyForward); @@ -4253,9 +4257,16 @@ SE.composeLayout = { var form = document.getElementById('emailCompose' + idx); var composeOptionsFormName = "composeOptionsForm" + idx; + + var t = SE.util.getTiny(SE.tinyInstances.currentHtmleditor); - var html = t.getContent(); - var subj = document.getElementById('emailSubject' + idx).value; + if (t != null || typeof(t) != "undefined") { + var html = t.getContent(); + } else { + var html = "

" + document.getElementById('htmleditor' + idx).value + "

"; + } + + var subj = document.getElementById('emailSubject' + idx).value; var to = trim(document.getElementById('addressTO' + idx).value); var cc = trim(document.getElementById('addressCC' + idx).value); var bcc = trim(document.getElementById('addressBCC' + idx).value); diff --git a/include/javascript/tiny_mce/classes/AddOnManager.js b/include/javascript/tiny_mce/classes/AddOnManager.js index 15a4ba80..18954e1a 100644 --- a/include/javascript/tiny_mce/classes/AddOnManager.js +++ b/include/javascript/tiny_mce/classes/AddOnManager.js @@ -40,7 +40,19 @@ * @return {tinymce.Theme/tinymce.Plugin} Theme or plugin add-on instance or undefined. */ get : function(n) { - return this.lookup[n]; + if (this.lookup[n]) { + return this.lookup[n].instance; + } else { + return undefined; + } + }, + + dependencies : function(n) { + var result; + if (this.lookup[n]) { + result = this.lookup[n].dependencies; + } + return result || []; }, /** @@ -82,13 +94,34 @@ * plugins : '-test' // Init the plugin but don't try to load it * }); */ - add : function(id, o) { + add : function(id, o, dependencies) { this.items.push(o); - this.lookup[id] = o; + this.lookup[id] = {instance:o, dependencies:dependencies}; this.onAdd.dispatch(this, id, o); return o; }, + createUrl: function(baseUrl, dep) { + if (typeof dep === "object") { + return dep + } else { + return {prefix: baseUrl.prefix, resource: dep, suffix: baseUrl.suffix}; + } + }, + + /** + * Add a set of components that will make up the add-on. Using the url of the add-on name as the base url. + * This should be used in development mode. A new compressor/javascript munger process will ensure that the + * components are put together into the editor_plugin.js file and compressed correctly. + * @param pluginName {String} name of the plugin to load scripts from (will be used to get the base url for the plugins). + * @param scripts {Array} Array containing the names of the scripts to load. + */ + addComponents: function(pluginName, scripts) { + var pluginUrl = this.urls[pluginName]; + tinymce.each(scripts, function(script){ + tinymce.ScriptLoader.add(pluginUrl+"/"+script); + }); + }, /** * Loads an add-on from a specific url. @@ -101,7 +134,7 @@ * @example * // Loads a plugin from an external URL * tinymce.PluginManager.load('myplugin', '/some/dir/someplugin/editor_plugin.js'); - * + * * // Initialize TinyMCE * tinyMCE.init({ * ... @@ -109,18 +142,38 @@ * }); */ load : function(n, u, cb, s) { - var t = this; + var t = this, url = u; + + function loadDependencies() { + var dependencies = t.dependencies(n); + tinymce.each(dependencies, function(dep) { + var newUrl = t.createUrl(u, dep); + t.load(newUrl.resource, newUrl, undefined, undefined); + }); + if (cb) { + if (s) { + cb.call(s); + } else { + cb.call(tinymce.ScriptLoader); + } + } + } if (t.urls[n]) return; + if (typeof u === "object") + url = u.prefix + u.resource + u.suffix; - if (u.indexOf('/') != 0 && u.indexOf('://') == -1) - u = tinymce.baseURL + '/' + u; + if (url.indexOf('/') != 0 && url.indexOf('://') == -1) + url = tinymce.baseURL + '/' + url; - t.urls[n] = u.substring(0, u.lastIndexOf('/')); + t.urls[n] = url.substring(0, url.lastIndexOf('/')); - if (!t.lookup[n]) - tinymce.ScriptLoader.add(u, cb, s); + if (t.lookup[n]) { + loadDependencies(); + } else { + tinymce.ScriptLoader.add(url, loadDependencies, s); + } } }); diff --git a/include/javascript/tiny_mce/classes/ControlManager.js b/include/javascript/tiny_mce/classes/ControlManager.js index 460cfc1f..a39c9c7f 100644 --- a/include/javascript/tiny_mce/classes/ControlManager.js +++ b/include/javascript/tiny_mce/classes/ControlManager.js @@ -307,7 +307,7 @@ ed.onMouseDown.add(c.hideMenu, c); } else { cls = t._cls.button || tinymce.ui.Button; - c = new cls(id, s); + c = new cls(id, s, ed); } return t.add(c); diff --git a/include/javascript/tiny_mce/classes/Editor.js b/include/javascript/tiny_mce/classes/Editor.js index 11687a40..a59eb42c 100644 --- a/include/javascript/tiny_mce/classes/Editor.js +++ b/include/javascript/tiny_mce/classes/Editor.js @@ -889,10 +889,10 @@ 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) + // Is a iPad/iPhone and not on iOS5, 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 && !tinymce.isIOS5) return; // Add hidden input for non input elements inside form elements @@ -983,12 +983,23 @@ 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'); + if (p &&!PluginManager.urls[p]) { + if (p.charAt(0) == '-') { + p = p.substr(1, p.length); + var dependencies = PluginManager.dependencies(p); + each(dependencies, function(dep) { + var defaultSettings = {prefix:'plugins/', resource: dep, suffix:'/editor_plugin' + tinymce.suffix + '.js'}; + var dep = PluginManager.createUrl(defaultSettings, dep); + PluginManager.load(dep.resource, dep); + + }); + } else { + // Skip safari plugin, since it is removed as of 3.3b1 + if (p == 'safari') { + return; + } + PluginManager.load(p, {prefix:'plugins/', resource: p, suffix:'/editor_plugin' + tinymce.suffix + '.js'}); + } } }); @@ -1010,7 +1021,7 @@ * @method init */ init : function() { - var n, t = this, s = t.settings, w, h, e = t.getElement(), o, ti, u, bi, bc, re, i; + var n, t = this, s = t.settings, w, h, e = t.getElement(), o, ti, u, bi, bc, re, i, initializedPlugins = []; tinymce.add(t); @@ -1033,20 +1044,25 @@ 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) { + function initPlugin(p) { var c = PluginManager.get(p), u = PluginManager.urls[p] || tinymce.documentBaseURL.replace(/\/$/, ''), po; - - if (c) { + if (c && tinymce.inArray(initializedPlugins,p) === -1) { + each(PluginManager.dependencies(p), function(dep){ + initPlugin(dep); + }); po = new c(t, u); t.plugins[p] = po; - if (po.init) + if (po.init) { po.init(t, u); + initializedPlugins.push(p); + } } - }); + } + + // Create all plugins + each(explode(s.plugins.replace(/\-/g, '')), initPlugin); // Setup popup CSS path(s) if (s.popup_css !== false) { @@ -1207,7 +1223,8 @@ n = DOM.add(o.iframeContainer, 'iframe', { id : t.id + "_ifr", src : u || 'javascript:""', // Workaround for HTTPS warning in IE6/7 - frameBorder : '0', + frameBorder : '0', + allowTransparency : "true", title : s.aria_label, style : { width : '100%', @@ -1233,41 +1250,72 @@ * * @method setupIframe */ - setupIframe : function() { + setupIframe : function(filled) { var t = this, s = t.settings, e = DOM.get(t.id), d = t.getDoc(), h, b; // Setup iframe body - if (!isIE || !tinymce.relaxedDomain) { + if ((!isIE || !tinymce.relaxedDomain) && !filled) { + // We need to wait for the load event on Gecko + if (isGecko && !s.readonly) { + t.getWin().addEventListener("DOMContentLoaded", function() { + window.setTimeout(function() { + var b = t.getBody(), undef; + + // Editable element needs to have some contents or backspace/delete won't work properly for some odd reason on FF 3.6 or older + b.innerHTML = '
'; + + // Check if Gecko supports contentEditable mode FF2 doesn't + if (b.contentEditable !== undef) { + // Setting the contentEditable off/on seems to force caret mode in the editor and enabled auto focus + b.contentEditable = false; + b.contentEditable = true; + + // Caret doesn't get rendered when you mousedown on the HTML element on FF 3.x + t.onMouseDown.add(function(ed, e) { + if (e.target.nodeName === "HTML") { + // Setting the contentEditable off/on seems to force caret mode in the editor and enabled auto focus + b.contentEditable = false; + b.contentEditable = true; + + d.designMode = 'on'; // Render the caret + + // Remove design mode again after a while so it has some time to execute + window.setTimeout(function() { + d.designMode = 'off'; + t.getBody().focus(); + }, 1); + } + }); + } else + d.designMode = 'on'; + + // Call setup frame once the contentEditable/designMode has been initialized + // since the caret won't be rendered some times otherwise. + t.setupIframe(true); + }, 1); + }, false); + } + 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 - } + // Wait for iframe onload event on Gecko + if (isGecko && !s.readonly) + return; } - // 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); + // It will not steal focus while setting contentEditable + b = t.getBody(); + b.disabled = true; - if (!s.readonly) - b.contentEditable = true; + if (!isGecko && !s.readonly) + b.contentEditable = true; - DOM.show(b); - } + b.disabled = false; /** * Schema instance, enables you to validate elements and it's children. @@ -1305,38 +1353,44 @@ */ 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); + // Force anchor names closed, unless the setting "allow_html_in_named_anchor" is explicitly included. + if (!t.settings.allow_html_in_named_anchor) { + 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; + var i = nodes.length, node, dom = t.dom, value, internalName; while (i--) { node = nodes[i]; value = node.attr(name); + internalName = 'data-mce-' + 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)); + // Add internal attribute if we need to we don't on a refresh of the document + if (!node.attributes.map[internalName]) { + if (name === "style") + node.attr(internalName, dom.serializeStyle(dom.parseStyle(value), node.name)); + else + node.attr(internalName, t.convertURL(value, name, node.name)); + } } }); @@ -1525,6 +1579,8 @@ t.controlManager.onPostRender.dispatch(t, t.controlManager); t.onPostRender.dispatch(t); + t.quirks = new tinymce.util.Quirks(this); + if (s.directionality) t.getBody().dir = s.directionality; @@ -1674,53 +1730,36 @@ }); 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.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}); - 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); + }); - // 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); - // 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.getBody().focus(); + ed.getWin().focus(); + }, 100); + } - ed.selection.select(ed.getBody(), 1); - ed.selection.collapse(1); - ed.getWin().focus(); - }, 100); - } - }, 1); - e = null; }, @@ -1832,19 +1871,26 @@ * @param {Boolean} sf Skip DOM focus. Just set is as the active editor. */ focus : function(sf) { - var oed, t = this, ce = t.settings.content_editable, ieRng, controlElm, doc = t.getDoc(); + var oed, t = this, selection = t.selection, ce = t.settings.content_editable, ieRng, controlElm, doc = t.getDoc(); if (!sf) { // Get selected control element - ieRng = t.selection.getRng(); + ieRng = selection.getRng(); if (ieRng.item) { controlElm = ieRng.item(0); } + selection.normalize(); + // Is not content editable if (!ce) t.getWin().focus(); + // Focus the body as well since it's contentEditable + if (tinymce.isGecko) { + t.getBody().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 @@ -2496,7 +2542,7 @@ * tinyMCE.activeEditor.setContent('[b]some[/b] html', {format : 'bbcode'}); */ setContent : function(content, args) { - var self = this, rootNode, body = self.getBody(); + var self = this, rootNode, body = self.getBody(), forcedRootBlockName; // Setup args object args = args || {}; @@ -2513,7 +2559,15 @@ // 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 = '
'; + forcedRootBlockName = self.settings.forced_root_block; + if (forcedRootBlockName) + content = '<' + forcedRootBlockName + '>
'; + else + content = '
'; + + body.innerHTML = content; + self.selection.select(body, true); + self.selection.collapse(true); return; } @@ -2532,6 +2586,8 @@ if (!args.no_events) self.onSetContent.dispatch(self, args); + self.selection.normalize(); + return args.content; }, @@ -2927,8 +2983,10 @@ if (isGecko && !s.readonly) { if (t._isHidden()) { try { - if (!s.content_editable) - d.designMode = 'On'; + if (!s.content_editable) { + d.body.contentEditable = false; + d.body.contentEditable = true; + } } catch (ex) { // Fails if it's hidden } @@ -2955,20 +3013,20 @@ 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; + 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(); - } - }); - } + // Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250 + // WebKit can't even do simple things like selecting an image + // Needs tobe the setBaseAndExtend or it will fail to select floated images + if (tinymce.isWebKit && e.nodeName == 'IMG') + t.selection.getSel().setBaseAndExtent(e, 0, e, 1); + + if (e.nodeName == 'A' && dom.hasClass(e, 'mceItemAnchor')) + t.selection.select(e); + + t.nodeChanged(); + }); // Add node change handlers t.onMouseUp.add(t.nodeChanged); @@ -2980,6 +3038,35 @@ t.nodeChanged(); }); + + // Add block quote deletion handler + t.onKeyDown.add(function(ed, e) { + // Was the BACKSPACE key pressed? + if (e.keyCode != 8) + return; + + var n = ed.selection.getRng().startContainer; + var offset = ed.selection.getRng().startOffset; + + while (n && n.nodeType && n.nodeType != 1 && n.parentNode) + n = n.parentNode; + + // Is the cursor at the beginning of a blockquote? + if (n && n.parentNode && n.parentNode.tagName === 'BLOCKQUOTE' && n.parentNode.firstChild == n && offset == 0) { + // Remove the blockquote + ed.formatter.toggle('blockquote', null, n.parentNode); + + // Move the caret to the beginning of n + var rng = ed.selection.getRng(); + rng.setStart(n, 0); + rng.setEnd(n, 0); + ed.selection.setRng(rng); + ed.selection.collapse(false); + } + }); + + + // Add reset handler t.onReset.add(function() { t.setContent(t.startContent, {format : 'raw'}); @@ -3001,9 +3088,9 @@ 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, '
']); + t.addShortcut('ctrl+7', '', ['FormatBlock', false, 'p']); + t.addShortcut('ctrl+8', '', ['FormatBlock', false, 'div']); + t.addShortcut('ctrl+9', '', ['FormatBlock', false, 'address']); function find(e) { var v = null; @@ -3099,21 +3186,6 @@ 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) { @@ -3140,69 +3212,25 @@ }); 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); - } - } + var keyCode = e.keyCode; - if ((e.keyCode >= 33 && e.keyCode <= 36) || (e.keyCode >= 37 && e.keyCode <= 40) || e.keyCode == 13 || e.keyCode == 45 || e.ctrlKey) + if ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode == 13 || 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(); + var keyCode = e.keyCode, sel; - 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 - } + if (keyCode == 8) { + sel = t.getDoc().selection; - // Restore the caret position - t.selection.moveToBookmark(bookmark); - } + // Fix IE control + backspace browser bug + if (sel && sel.createRange && sel.createRange().item) { + t.undoManager.beforeChange(); + ed.dom.remove(sel.createRange().item(0)); + addUndo(); - // Block the default delete behavior since it might be broken - e.preventDefault(); - return; + return Event.cancel(e); } } @@ -3222,8 +3250,8 @@ // 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.undoManager.add(); } }); @@ -3232,7 +3260,22 @@ addUndo(); }); } - + + // Fire a nodeChanged when the selection is changed on WebKit this fixes selection issues on iOS5 + // It only fires the nodeChange event every 50ms since it would other wise update the UI when you type and it hogs the CPU + if (tinymce.isWebKit) { + dom.bind(t.getDoc(), 'selectionchange', function() { + if (t.selectionTimer) { + window.clearTimeout(t.selectionTimer); + t.selectionTimer = 0; + } + + t.selectionTimer = window.setTimeout(function() { + t.nodeChanged(); + }, 50); + }); + } + // Bug fix for FireFox keeping styles from end of selection instead of start. if (tinymce.isGecko) { function getAttributeApplyFunction() { @@ -3240,10 +3283,14 @@ return function() { var target = t.selection.getStart(); - t.dom.removeAllAttribs(target); - each(template, function(attr) { - target.setAttributeNode(attr.cloneNode(true)); - }); + + if (target !== t.getBody()) { + t.dom.removeAllAttribs(target); + + each(template, function(attr) { + target.setAttributeNode(attr.cloneNode(true)); + }); + } }; } diff --git a/include/javascript/tiny_mce/classes/EditorCommands.js b/include/javascript/tiny_mce/classes/EditorCommands.js index f620230f..5bd7b4c8 100644 --- a/include/javascript/tiny_mce/classes/EditorCommands.js +++ b/include/javascript/tiny_mce/classes/EditorCommands.js @@ -285,22 +285,15 @@ }, mceInsertContent : function(command, ui, value) { - var caretNode, rng, rootNode, parent, node, rng, nodeRect, viewPortRect, args; + var parser, serializer, parentNode, rootNode, fragment, args, + marker, nodeRect, viewPortRect, rng, node, node2, bookmarkHtml, viewportBodyElement; - 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(); - } - }; + // Setup parser and serializer + parser = editor.parser; + serializer = new tinymce.html.Serializer({}, editor.schema); + bookmarkHtml = '\uFEFF'; + // Run beforeSetContent handlers on the HTML to be inserted args = {content: value, format: 'html'}; selection.onBeforeSetContent.dispatch(selection, args); value = args.content; @@ -309,89 +302,114 @@ 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); + // Replace the caret marker with a span bookmark element + value = value.replace(/\{\$caret\}/, bookmarkHtml); + + // Insert node maker where we will insert the new HTML and get it's parent + if (!selection.isCollapsed()) + editor.getDoc().execCommand('Delete', false, null); + + parentNode = selection.getNode(); + + // Parse the fragment within the context of the parent node + args = {context : parentNode.nodeName.toLowerCase()}; + fragment = parser.parse(value, args); + + // Move the caret to a more suitable location + node = fragment.lastChild; + if (node.attr('id') == 'mce_marker') { + marker = node; + + for (node = node.prev; node; node = node.walk(true)) { + if (node.type == 3 || !dom.isBlock(node.name)) { + node.parent.insert(marker, node, node.name === 'br'); + 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)) - ) - ); - - break; + // If parser says valid we can insert the contents into that parent + if (!args.invalid) { + value = serializer.serialize(fragment); + + // Check if parent is empty or only has one BR element then set the innerHTML of that parent + node = parentNode.firstChild; + node2 = parentNode.lastChild; + if (!node || (node === node2 && node.nodeName === 'BR')) + dom.setHTML(parentNode, value); + else + selection.setContent(value); + } else { + // If the fragment was invalid within that context then we need + // to parse and process the parent it's inserted into + + // Insert bookmark node and get the parent + selection.setContent(bookmarkHtml); + parentNode = editor.selection.getNode(); + rootNode = editor.getBody(); + + // Opera will return the document node when selection is in root + if (parentNode.nodeType == 9) + parentNode = node = rootNode; + else + node = parentNode; + + // Find the ancestor just before the root element + while (node !== rootNode) { + parentNode = node; + node = node.parentNode; } - parent = caretNode; - caretNode = caretNode.parentNode; + // Get the outer/inner HTML depending on if we are in the root and parser and serialize that + value = parentNode == rootNode ? rootNode.innerHTML : dom.getOuterHTML(parentNode); + value = serializer.serialize( + parser.parse( + // Need to replace by using a function since $ in the contents would otherwise be a problem + value.replace(//i, function() { + return serializer.serialize(fragment); + }) + ) + ); + + // Set the inner/outer HTML depending on if we are in the root or not + if (parentNode == rootNode) + dom.setHTML(rootNode, value); + else + dom.setOuterHTML(parentNode, value); } - // 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); + marker = dom.get('mce_marker'); - // 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()); + // Scroll range into view scrollIntoView on element can't be used since it will scroll the main view port as well + nodeRect = dom.getRect(marker); + 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; - } + // Check if node is out side the viewport if it is then scroll to it + if ((nodeRect.y + nodeRect.h > viewPortRect.y + viewPortRect.h || nodeRect.y < viewPortRect.y) || + (nodeRect.x > viewPortRect.x + viewPortRect.w || nodeRect.x < viewPortRect.x)) { + viewportBodyElement = tinymce.isIE ? editor.getDoc().documentElement : editor.getBody(); + viewportBodyElement.scrollLeft = nodeRect.x; + viewportBodyElement.scrollTop = nodeRect.y - viewPortRect.h + 25; + } - dom.remove(node); - } + // Move selection before marker and remove it + rng = dom.createRng(); - // 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); - } + // If previous sibling is a text node set the selection to the end of that node + node = marker.previousSibling; + if (node && node.nodeType == 3) { + rng.setStart(node, node.nodeValue.length); + } else { + // If the previous sibling isn't a text node or doesn't exist set the selection before the marker node + rng.setStartBefore(marker); + rng.setEndBefore(marker); } + // Remove the marker node and set the new range + dom.remove(marker); + selection.setRng(rng); + + // Dispatch after event and add any visual elements needed selection.onSetContent.dispatch(selection, args); editor.addVisual(); }, @@ -461,7 +479,7 @@ }, mceInsertLink : function(command, ui, value) { - var link = dom.getParent(selection.getNode(), 'a'), img, floatVal; + var link = dom.getParent(selection.getNode(), 'a'), img, style, cls; if (tinymce.is(value, 'string')) value = {href : value}; @@ -470,21 +488,26 @@ 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 + // WebKit can't create links on floated images for some odd reason + // So, just remove styles and restore it later if (tinymce.isWebKit) { img = dom.getParent(selection.getNode(), 'img'); if (img) { - floatVal = img.style.cssFloat; - img.style.cssFloat = null; + style = img.style.cssText; + cls = img.className; + img.style.cssText = null; + img.className = null; } } execNativeCommand('CreateLink', FALSE, 'javascript:mctmp(0);'); - // Restore float value - if (floatVal) - img.style.cssFloat = floatVal; + // Restore styles + if (style) + img.style.cssText = style; + if (cls) + img.className = cls; each(dom.select("a[href='javascript:mctmp(0);']"), function(link) { dom.setAttribs(link, value); diff --git a/include/javascript/tiny_mce/classes/ForceBlocks.js b/include/javascript/tiny_mce/classes/ForceBlocks.js index 94911f0c..39b41ff7 100644 --- a/include/javascript/tiny_mce/classes/ForceBlocks.js +++ b/include/javascript/tiny_mce/classes/ForceBlocks.js @@ -83,28 +83,94 @@ 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; + var t = this, ed = t.editor, s = ed.settings, dom = ed.dom, selection = ed.selection, blockElements = ed.schema.getBlockElements(); - // Force root blocks when typing and when getting output + // Force root blocks if (s.forced_root_block) { - ed.onBeforeExecCommand.add(t.forceRoots, t); - ed.onKeyUp.add(t.forceRoots, t); - ed.onPreProcess.add(t.forceRoots, t); + function addRootBlocks() { + var node = selection.getStart(), rootNode = ed.getBody(), rng, startContainer, startOffset, endContainer, endOffset, rootBlockNode, tempNode, offset = -0xFFFFFF; + + if (!node || node.nodeType !== 1) + return; + + // Check if node is wrapped in block + while (node != rootNode) { + if (blockElements[node.nodeName]) + return; + + node = node.parentNode; + } + + // Get current selection + rng = selection.getRng(); + if (rng.setStart) { + startContainer = rng.startContainer; + startOffset = rng.startOffset; + endContainer = rng.endContainer; + endOffset = rng.endOffset; + } else { + // Force control range into text range + if (rng.item) { + rng = ed.getDoc().body.createTextRange(); + rng.moveToElementText(rng.item(0)); + } + + tmpRng = rng.duplicate(); + tmpRng.collapse(true); + startOffset = tmpRng.move('character', offset) * -1; + + if (!tmpRng.collapsed) { + tmpRng = rng.duplicate(); + tmpRng.collapse(false); + endOffset = (tmpRng.move('character', offset) * -1) - startOffset; + } + } + + // Wrap non block elements and text nodes + for (node = rootNode.firstChild; node; node) { + if (node.nodeType === 3 || (node.nodeType == 1 && !blockElements[node.nodeName])) { + if (!rootBlockNode) { + rootBlockNode = dom.create(s.forced_root_block); + node.parentNode.insertBefore(rootBlockNode, node); + } + + tempNode = node; + node = node.nextSibling; + rootBlockNode.appendChild(tempNode); + } else { + rootBlockNode = null; + node = node.nextSibling; + } + } + + if (rng.setStart) { + rng.setStart(startContainer, startOffset); + rng.setEnd(endContainer, endOffset); + selection.setRng(rng); + } else { + try { + rng = ed.getDoc().body.createTextRange(); + rng.moveToElementText(rootNode); + rng.collapse(true); + rng.moveStart('character', startOffset); + + if (endOffset > 0) + rng.moveEnd('character', endOffset); + + rng.select(); + } catch (ex) { + // Ignore + } + } + + ed.nodeChanged(); + }; + + ed.onKeyUp.add(addRootBlocks); + ed.onClick.add(addRootBlocks); } if (s.force_br_newlines) { @@ -251,155 +317,6 @@ } }, - 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; @@ -587,10 +504,6 @@ 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; @@ -620,6 +533,10 @@ } else e.innerHTML = isOpera ? '\u00a0' : '
'; // Extra space for Opera so that the caret can move there }; + + // Padd empty blocks + if (dom.isEmpty(bef)) + appendStyles(bef, sn); // Fill empty afterblook with current style if (dom.isEmpty(aft)) @@ -638,16 +555,9 @@ 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); + ed.selection.select(aft, true); + ed.selection.collapse(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; diff --git a/include/javascript/tiny_mce/classes/Formatter.js b/include/javascript/tiny_mce/classes/Formatter.js index 7ed8175c..f158b83f 100644 --- a/include/javascript/tiny_mce/classes/Formatter.js +++ b/include/javascript/tiny_mce/classes/Formatter.js @@ -201,8 +201,74 @@ }); } }; + function adjustSelectionToVisibleSelection() { - function applyRngStyle(rng) { + function findSelectionEnd(start, end) { + var walker = new TreeWalker(end); + for (node = walker.current(); node; node = walker.prev()) { + if (node.childNodes.length > 1 || node == start) { + return node; + } + } + } + + // Adjust selection so that a end container with a end offset of zero is not included in the selection + // as this isn't visible to the user. + var rng = ed.selection.getRng(); + var start = rng.startContainer; + var end = rng.endContainer; + if (start != end && rng.endOffset == 0) { + var newEnd = findSelectionEnd(start, end); + var endOffset = newEnd.nodeType == 3 ? newEnd.length : newEnd.childNodes.length; + rng.setEnd(newEnd, endOffset); + } + return rng; + } + + function applyStyleToList(node, bookmark, wrapElm, newWrappers, process){ + var nodes =[], listIndex =-1, list, startIndex = -1, endIndex = -1, currentWrapElm; + + // find the index of the first child list. + each(node.childNodes, function(n, index) { + if (n.nodeName==="UL"||n.nodeName==="OL") {listIndex = index; list=n; return false; } + }); + + // get the index of the bookmarks + each(node.childNodes, function(n, index) { + if (n.nodeName==="SPAN" &&dom.getAttrib(n, "data-mce-type")=="bookmark" && n.id==bookmark.id+"_start") {startIndex=index} + if (n.nodeName==="SPAN" &&dom.getAttrib(n, "data-mce-type")=="bookmark" && n.id==bookmark.id+"_end") {endIndex=index} + }); + + // if the selection spans across an embedded list, or there isn't an embedded list - handle processing normally + if (listIndex<=0 || (startIndexlistIndex)) { + each(tinymce.grep(node.childNodes), process); + return 0; + } else { + currentWrapElm = wrapElm.cloneNode(FALSE); + + // create a list of the nodes on the same side of the list as the selection + each(tinymce.grep(node.childNodes), function(n, index) { + if ((startIndexlistIndex && index >listIndex)) { + nodes.push(n); + n.parentNode.removeChild(n); + } + }); + + // insert the wrapping element either before or after the list. + if (startIndexlistIndex) { + node.insertBefore(currentWrapElm, list.nextSibling); + } + + // add the new nodes to the list. + newWrappers.push(currentWrapElm); + each(nodes, function(node){currentWrapElm.appendChild(node)}); + return currentWrapElm; + } + }; + + function applyRngStyle(rng, bookmark) { var newWrappers = [], wrapName, wrapElm; // Setup wrapper element @@ -279,6 +345,9 @@ } currentWrapElm.appendChild(node); + } else if (nodeName == 'li' && bookmark) { + // Start wrapping - if we are in a list node and have a bookmark, then we will always begin by wrapping in a new element. + currentWrapElm = applyStyleToList(node, bookmark, wrapElm, newWrappers, process); } else { // Start a new wrapper for possible children currentWrapElm = 0; @@ -433,8 +502,9 @@ var curSelNode = ed.selection.getNode(); // Apply formatting to selection + ed.selection.setRng(adjustSelectionToVisibleSelection()); bookmark = selection.getBookmark(); - applyRngStyle(expandRng(selection.getRng(TRUE), formatList)); + applyRngStyle(expandRng(selection.getRng(TRUE), formatList), bookmark); // 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)) { @@ -461,7 +531,6 @@ */ function remove(name, vars, node) { var formatList = get(name), format = formatList[0], bookmark, i, rng; - /** * Moves the start to the first suitable text node. */ @@ -1666,34 +1735,67 @@ // Only register listeners once if we need to if (!pendingFormats.isListening && hasPending()) { pendingFormats.isListening = true; + function performPendingFormat(node, textNode) { + var rng = dom.createRng(); + perform(node); + + rng.setStart(textNode, textNode.nodeValue.length); + rng.setEnd(textNode, textNode.nodeValue.length); + selection.setRng(rng); + ed.nodeChanged(); + } + var enterKeyPressed = false; each('onKeyDown,onKeyUp,onKeyPress,onMouseUp'.split(','), function(event) { ed[event].addToTop(function(ed, e) { + if (e.keyCode==13 && !e.shiftKey) { + enterKeyPressed = true; + return; + } // Do we have pending formats and is the selection moved has moved if (hasPending() && !tinymce.dom.RangeUtils.compareRanges(pendingFormats.lastRng, selection.getRng())) { + var foundCaret = false; each(dom.select('font,span'), function(node) { var textNode, rng; // Look for marker if (isCaretNode(node)) { + foundCaret = true; textNode = node.firstChild; - if (textNode) { - perform(node); + // Find the first text node within node + while (textNode && textNode.nodeType != 3) + textNode = textNode.firstChild; - rng = dom.createRng(); - rng.setStart(textNode, textNode.nodeValue.length); - rng.setEnd(textNode, textNode.nodeValue.length); - selection.setRng(rng); - ed.nodeChanged(); - } else + if (textNode) + performPendingFormat(node, textNode); + else dom.remove(node); } }); + + // no caret - so we are + if (enterKeyPressed && !foundCaret) { + var node = selection.getNode(); + var textNode = node; + + // Find the first text node within node + while (textNode && textNode.nodeType != 3) + textNode = textNode.firstChild; + if (textNode) { + node=textNode.parentNode; + while (!isBlock(node)){ + node=node.parentNode; + } + performPendingFormat(node, textNode); + } + } // Always unbind and clear pending styles on keyup - if (e.type == 'keyup' || e.type == 'mouseup') + if (e.type == 'keyup' || e.type == 'mouseup') { resetPending(); + enterKeyPressed=false; + } } }); }); diff --git a/include/javascript/tiny_mce/classes/Popup.js b/include/javascript/tiny_mce/classes/Popup.js index a9d322ce..0537c7c7 100644 --- a/include/javascript/tiny_mce/classes/Popup.js +++ b/include/javascript/tiny_mce/classes/Popup.js @@ -432,7 +432,7 @@ tinyMCEPopup = { return; try { - // If IE is used, use the trick by Diego Perini + // If IE is used, use the trick by Diego Perini licensed under MIT by request to the author. // http://javascript.nwbox.com/IEContentLoaded/ document.documentElement.doScroll("left"); } catch (ex) { diff --git a/include/javascript/tiny_mce/classes/UndoManager.js b/include/javascript/tiny_mce/classes/UndoManager.js index 0ddbc3f3..045aa839 100644 --- a/include/javascript/tiny_mce/classes/UndoManager.js +++ b/include/javascript/tiny_mce/classes/UndoManager.js @@ -17,7 +17,7 @@ * @class tinymce.UndoManager */ tinymce.UndoManager = function(editor) { - var self, index = 0, data = []; + var self, index = 0, data = [], beforeBookmark; function getContent() { return tinymce.trim(editor.getContent({format : 'raw', no_events : 1})); @@ -66,9 +66,7 @@ * @method beforeChange */ beforeChange : function() { - // Set before bookmark on previous level - if (data[index]) - data[index].beforeBookmark = editor.selection.getBookmark(2, true); + beforeBookmark = editor.selection.getBookmark(2, true); }, /** @@ -89,6 +87,10 @@ if (lastLevel && lastLevel.content == level.content) return null; + // Set before bookmark on previous level + if (data[index]) + data[index].beforeBookmark = beforeBookmark; + // Time to compress if (settings.custom_undo_redo_levels) { if (data.length > settings.custom_undo_redo_levels) { diff --git a/include/javascript/tiny_mce/classes/adapter/jquery/adapter.js b/include/javascript/tiny_mce/classes/adapter/jquery/adapter.js index 80399451..adae9dc7 100644 --- a/include/javascript/tiny_mce/classes/adapter/jquery/adapter.js +++ b/include/javascript/tiny_mce/classes/adapter/jquery/adapter.js @@ -14,8 +14,9 @@ var is = tinymce.is, attrRegExp = /^(href|src|style)$/i, undefined; // jQuery is undefined - if (!$) - return alert("Load jQuery first!"); + if (!$ && window.console) { + return console.log("Load jQuery first!"); + } // Stick jQuery into the tinymce namespace tinymce.$ = $; diff --git a/include/javascript/tiny_mce/classes/dom/DOMUtils.js b/include/javascript/tiny_mce/classes/dom/DOMUtils.js index 4fbc5df6..8fb3d342 100644 --- a/include/javascript/tiny_mce/classes/dom/DOMUtils.js +++ b/include/javascript/tiny_mce/classes/dom/DOMUtils.js @@ -59,7 +59,7 @@ * @param {settings} s Optional settings collection. */ DOMUtils : function(d, s) { - var t = this, globalStyle; + var t = this, globalStyle, name; t.doc = d; t.win = window; @@ -90,7 +90,7 @@ } } - if (isIE) { + if (isIE && s.schema) { // Add missing HTML 4/5 elements to IE ('abbr article aside audio canvas ' + 'details figcaption figure footer ' + @@ -99,6 +99,11 @@ 'time video').replace(/\w+/g, function(name) { d.createElement(name); }); + + // Create all custom elements + for (name in s.schema.getCustomElements()) { + d.createElement(name); + } } tinymce.addUnload(t.destroy, t); @@ -732,12 +737,12 @@ * @return {String} Attribute value string, default value or null if the attribute wasn't found. */ getAttrib : function(e, n, dv) { - var v, t = this; + var v, t = this, undef; e = t.get(e); if (!e || e.nodeType !== 1) - return false; + return dv === undef ? false : dv; if (!is(dv)) dv = ''; @@ -849,7 +854,7 @@ } } - return (v !== undefined && v !== null && v !== '') ? '' + v : dv; + return (v !== undef && v !== null && v !== '') ? '' + v : dv; }, /** @@ -867,14 +872,17 @@ ro = ro || d.body; if (n) { - // Use getBoundingClientRect on IE, Opera has it but it's not perfect - if (isIE && !t.stdMode) { + // Use getBoundingClientRect if it exists since it's faster than looping offset nodes + if (n.getBoundingClientRect) { 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}; + // Add scroll offsets from documentElement or body since IE with the wrong box model will use d.body and so do WebKit + // Also remove the body/documentelement clientTop/clientLeft on IE 6, 7 since they offset the position + x = n.left + (d.documentElement.scrollLeft || d.body.scrollLeft) - e.clientTop; + y = n.top + (d.documentElement.scrollTop || d.body.scrollTop) - e.clientLeft; + + return {x : x, y : y}; } r = n; @@ -1580,12 +1588,12 @@ if (elements && elements[node.nodeName.toLowerCase()]) return false; - // Keep elements with data attributes or name attribute like + // Keep elements with data-bookmark 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) + if (name === "name" || name === 'data-mce-bookmark') return false; } } @@ -1641,7 +1649,7 @@ * @return {Number} Index of the specified node. */ nodeIndex : function(node, normalized) { - var idx = 0, lastNodeType, lastNode, nodeType, nodeValueExists; + var idx = 0, lastNodeType, lastNode, nodeType; if (node) { for (lastNodeType = node.nodeType, node = node.previousSibling, lastNode = node; node; node = node.previousSibling) { @@ -1649,11 +1657,7 @@ // 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) + if (nodeType == lastNodeType || !node.nodeValue.length) continue; } idx++; diff --git a/include/javascript/tiny_mce/classes/dom/EventUtils.js b/include/javascript/tiny_mce/classes/dom/EventUtils.js index 67e116e4..f1a183c9 100644 --- a/include/javascript/tiny_mce/classes/dom/EventUtils.js +++ b/include/javascript/tiny_mce/classes/dom/EventUtils.js @@ -330,7 +330,7 @@ return; try { - // If IE is used, use the trick by Diego Perini + // If IE is used, use the trick by Diego Perini licensed under MIT by request to the author. // http://javascript.nwbox.com/IEContentLoaded/ doc.documentElement.doScroll("left"); } catch (ex) { diff --git a/include/javascript/tiny_mce/classes/dom/Selection.js b/include/javascript/tiny_mce/classes/dom/Selection.js index 966c50ff..acbe0b7d 100644 --- a/include/javascript/tiny_mce/classes/dom/Selection.js +++ b/include/javascript/tiny_mce/classes/dom/Selection.js @@ -94,6 +94,18 @@ tinymce.addUnload(t.destroy, t); }, + /** + * Move the selection cursor range to the specified node and offset. + * @param node Node to put the cursor in. + * @param offset Offset from the start of the node to put the cursor at. + */ + setCursorLocation: function(node, offset) { + var t = this; var r = t.dom.createRng(); + r.setStart(node, offset); + r.setEnd(node, offset); + t.setRng(r); + t.collapse(false); + }, /** * Returns the selected contents using the DOM serializer passed in to this class. * @@ -114,6 +126,7 @@ wb = wa = ''; s.get = true; s.format = s.format || 'html'; + s.forced_root_block = ''; t.onBeforeGetContent.dispatch(t, s); if (s.format == 'text') @@ -210,7 +223,12 @@ // Remove the caret position self.dom.remove('__caret'); - self.setRng(rng); + + try { + self.setRng(rng); + } catch (ex) { + // Might fail on Opera for some odd reason + } } else { if (rng.item) { // Delete content and get caret text selection @@ -377,6 +395,9 @@ return bookmark; }; + if (t.tridentSel) + return t.tridentSel.getBookmark(type); + return getLocation(); } @@ -464,10 +485,6 @@ 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(); @@ -507,6 +524,9 @@ return true; }; + if (t.tridentSel) + return t.tridentSel.moveToBookmark(bookmark); + if (setEndPoint(true) && setEndPoint()) { t.setRng(rng); } @@ -905,14 +925,81 @@ return bl; }, + normalize : function() { + var self = this, rng, normalized; + + // Normalize only on non IE browsers for now + if (tinymce.isIE) + return; + + function normalizeEndPoint(start) { + var container, offset, walker, dom = self.dom, body = dom.getRoot(), node; + + container = rng[(start ? 'start' : 'end') + 'Container']; + offset = rng[(start ? 'start' : 'end') + 'Offset']; + + // If the container is a document move it to the body element + if (container.nodeType === 9) { + container = container.body; + offset = 0; + } + + // If the container is body try move it into the closest text node or position + // TODO: Add more logic here to handle element selection cases + if (container === body) { + // Resolve the index + if (container.hasChildNodes()) { + container = container.childNodes[Math.min(!start && offset > 0 ? offset - 1 : offset, container.childNodes.length - 1)]; + offset = 0; + + // Walk the DOM to find a text node to place the caret at or a BR + node = container; + walker = new tinymce.dom.TreeWalker(container, body); + do { + // Found a text node use that position + if (node.nodeType === 3) { + offset = start ? 0 : node.nodeValue.length - 1; + container = node; + break; + } + + // Found a BR element that we can place the caret before + if (node.nodeName === 'BR') { + offset = dom.nodeIndex(node); + container = node.parentNode; + break; + } + } while (node = (start ? walker.next() : walker.prev())); + + normalized = true; + } + } + + // Set endpoint if it was normalized + if (normalized) + rng['set' + (start ? 'Start' : 'End')](container, offset); + }; + + rng = self.getRng(); + + // Normalize the end points + normalizeEndPoint(true); + + if (rng.collapsed) + normalizeEndPoint(); + + // Set the selection if it was normalized + if (normalized) { + //console.log(self.dom.dumpRng(rng)); + self.setRng(rng); + } + }, + 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); diff --git a/include/javascript/tiny_mce/classes/dom/TridentSelection.js b/include/javascript/tiny_mce/classes/dom/TridentSelection.js index 9d5eb4fc..e51e9383 100644 --- a/include/javascript/tiny_mce/classes/dom/TridentSelection.js +++ b/include/javascript/tiny_mce/classes/dom/TridentSelection.js @@ -10,11 +10,97 @@ (function() { function Selection(selection) { - var t = this, invisibleChar = '\uFEFF', range, lastIERng, dom = selection.dom, TRUE = true, FALSE = false; + var self = this, dom = selection.dom, TRUE = true, FALSE = false; + + function getPosition(rng, start) { + var checkRng, startIndex = 0, endIndex, inside, + children, child, offset, index, position = -1, parent; + + // Setup test range, collapse it and get the parent + checkRng = rng.duplicate(); + checkRng.collapse(start); + parent = checkRng.parentElement(); + + // Check if the selection is within the right document + if (parent.ownerDocument !== selection.dom.doc) + return; + + // IE will report non editable elements as it's parent so look for an editable one + while (parent.contentEditable === "false") { + parent = parent.parentNode; + } + + // If parent doesn't have any children then return that we are inside the element + if (!parent.hasChildNodes()) { + return {node : parent, inside : 1}; + } + + // Setup node list and endIndex + children = parent.children; + endIndex = children.length - 1; + + // Perform a binary search for the position + while (startIndex <= endIndex) { + index = Math.floor((startIndex + endIndex) / 2); + + // Move selection to node and compare the ranges + child = children[index]; + checkRng.moveToElementText(child); + position = checkRng.compareEndPoints(start ? 'StartToStart' : 'EndToEnd', rng); + + // Before/after or an exact match + if (position > 0) { + endIndex = index - 1; + } else if (position < 0) { + startIndex = index + 1; + } else { + return {node : child}; + } + } + + // Check if child position is before or we didn't find a position + if (position < 0) { + // No element child was found use the parent element and the offset inside that + if (!child) { + checkRng.moveToElementText(parent); + checkRng.collapse(true); + child = parent; + inside = true; + } else + checkRng.collapse(false); + + checkRng.setEndPoint(start ? 'EndToStart' : 'EndToEnd', rng); + + // Fix for edge case:
-{sugar_translate label='LBL_STREET' module='{{$module}}'}: +{sugar_translate label='LBL_{{$key}}_STREET' module='{{$module}}'}: {if $fields.{{$street}}.required || {{if $street|lower|in_array:$displayParams.required}}true{{else}}false{{/if}}} {$APP.LBL_REQUIRED_SYMBOL} {/if} diff --git a/include/SugarFields/Fields/Base/SugarFieldBase.php b/include/SugarFields/Fields/Base/SugarFieldBase.php index 0b8f2878..db5888fc 100644 --- a/include/SugarFields/Fields/Base/SugarFieldBase.php +++ b/include/SugarFields/Fields/Base/SugarFieldBase.php @@ -124,26 +124,8 @@ class SugarFieldBase { } function getListViewSmarty($parentFieldArray, $vardef, $displayParams, $col) { - // FIXME: Rework the listview to use two-pass rendering like the DetailView - $tabindex = 1; - $isArray = is_array($parentFieldArray); - $fieldName = $vardef['name']; - - if ( $isArray ) { - $fieldNameUpper = strtoupper($fieldName); - if ( isset($parentFieldArray[$fieldNameUpper])) { - $parentFieldArray[$fieldName] = $this->formatField($parentFieldArray[$fieldNameUpper],$vardef); - } else { - $parentFieldArray[$fieldName] = ''; - } - } else { - if ( isset($parentFieldArray->$fieldName) ) { - $parentFieldArray->$fieldName = $this->formatField($parentFieldArray->$fieldName,$vardef); - } else { - $parentFieldArray->$fieldName = ''; - } - } + $parentFieldArray = $this->setupFieldArray($parentFieldArray, $vardef); $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex, false); $this->ss->left_delimiter = '{'; @@ -275,10 +257,29 @@ class SugarFieldBase { function getEditView() { } - function getSearchInput() { + /** + * getSearchInput + * + * This function allows the SugarFields to handle returning the search input value given arguments (typically from $_REQUEST/$_POST) + * and a search string. + * + * @param $key String value of key to search for + * @param $args Mixed value containing haystack to search for value in + * @return $value Mixed value that the SugarField should return + */ + function getSearchInput($key='', $args=array()) + { + //Nothing specified return empty string + if(empty($key) || empty($args)) + { + return ''; + } + + return isset($args[$key]) ? $args[$key] : ''; } function getQueryLike() { + } function getQueryIn() { @@ -340,22 +341,32 @@ class SugarFieldBase { } - /** + /** * This should be called when the bean is saved. The bean itself will be passed by reference * @param SugarBean bean - the bean performing the save * @param array params - an array of paramester relevant to the save, most likely will be $_REQUEST */ - public function save($bean, $params, $field, $properties, $prefix = ''){ + public function save($bean, $params, $field, $properties, $prefix = '') { if ( isset($params[$prefix.$field]) ) { - if(isset($properties['len']) && isset($properties['type']) && 'varchar' == $properties['type']){ - $bean->$field = trim($this->unformatField($params[$prefix.$field],$properties)); + if(isset($properties['len']) && isset($properties['type']) && $this->isTrimmable($properties['type'])){ + $bean->$field = trim($this->unformatField($params[$prefix.$field], $properties)); } - else { - $bean->$field = $this->unformatField($params[$prefix.$field],$properties); + else { + $bean->$field = $this->unformatField($params[$prefix.$field], $properties); } } } + /** + * Check if the field is allowed to be trimmed + * + * @param string $type + * @return boolean + */ + protected function isTrimmable($type) { + return in_array($type, array('varchar', 'name')); + } + /** * Handles import field sanitizing for an field type * @@ -390,4 +401,39 @@ class SugarFieldBase { { return !empty($vardef['enable_range_search']) && !empty($_REQUEST['action']) && $_REQUEST['action']!='Popup'; } + + /** + * setupFieldArray + * This method takes the $parentFieldArray mixed variable which may be an Array or object and attempts + * to call any custom fieldSpecific formatting to the value depending on the field type. + * + * @see SugarFieldEnum.php, SugarFieldInt.php, SugarFieldFloat.php, SugarFieldRelate.php + * @param mixed $parentFieldArray Array or Object of data where the field's value comes from + * @param array $vardef The vardef entry linked to the SugarField instance + * @return array $parentFieldArray The formatted $parentFieldArray with the formatField method possibly applied + */ + protected function setupFieldArray($parentFieldArray, $vardef) + { + $fieldName = $vardef['name']; + if ( is_array($parentFieldArray) ) + { + $fieldNameUpper = strtoupper($fieldName); + if ( isset($parentFieldArray[$fieldNameUpper])) + { + $parentFieldArray[$fieldName] = $this->formatField($parentFieldArray[$fieldNameUpper],$vardef); + } else { + $parentFieldArray[$fieldName] = ''; + } + } elseif (is_object($parentFieldArray)) { + if ( isset($parentFieldArray->$fieldName) ) + { + $parentFieldArray->$fieldName = $this->formatField($parentFieldArray->$fieldName,$vardef); + } else { + $parentFieldArray->$fieldName = ''; + } + } + return $parentFieldArray; + } + } +?> \ No newline at end of file diff --git a/include/SugarFields/Fields/Currency/EditView.tpl b/include/SugarFields/Fields/Currency/EditView.tpl index 53ddf9c5..7144a59d 100644 --- a/include/SugarFields/Fields/Currency/EditView.tpl +++ b/include/SugarFields/Fields/Currency/EditView.tpl @@ -41,4 +41,4 @@ {assign var="value" value={{sugarvar key='value' string=true}} } {/if} +id='{{if empty($displayParams.idName)}}{{sugarvar key='name'}}{{else}}{{$displayParams.idName}}{{/if}}' size='{{$displayParams.size|default:30}}' {{if isset($displayParams.maxlength)}}maxlength='{{$displayParams.maxlength}}'{{elseif isset($vardef.len)}}maxlength='{{$vardef.len}}'{{/if}} value='{sugar_number_format var=$value}' title='{{$vardef.help}}' tabindex='{{$tabindex}}' {{$displayParams.field}}> diff --git a/include/SugarFields/Fields/Encrypt/SugarFieldEncrypt.php b/include/SugarFields/Fields/Encrypt/SugarFieldEncrypt.php new file mode 100644 index 00000000..3e44f552 --- /dev/null +++ b/include/SugarFields/Fields/Encrypt/SugarFieldEncrypt.php @@ -0,0 +1,60 @@ +decrypt_after_retrieve($inputField); + } +/** CAPTIVEA CORE END **/ +} +?> diff --git a/include/SugarFields/Fields/File/EditView.tpl b/include/SugarFields/Fields/File/EditView.tpl index 09ee2e89..e1eb47b4 100644 --- a/include/SugarFields/Fields/File/EditView.tpl +++ b/include/SugarFields/Fields/File/EditView.tpl @@ -100,7 +100,7 @@ type="file" title='{{$vardef.help}}' size="{{$displayParams.size|default:30}}" maxlength="255" {{/if}} {{$displayParams.field}}> - +( < {{$displayParams.max_fileupload_size}} ) {{if isset($vardef.allowEapm) && $vardef.allowEapm}}
 
..
ab|c + if (checkRng.compareEndPoints(start ? 'StartToStart' : 'StartToEnd', rng) > 0) { + checkRng = rng.duplicate(); + checkRng.collapse(start); + + offset = -1; + while (parent == checkRng.parentElement()) { + if (checkRng.move('character', -1) == 0) + break; + + offset++; + } + } + + offset = offset || checkRng.text.replace('\r\n', ' ').length; + } else { + // Child position is after the selection endpoint + checkRng.collapse(true); + checkRng.setEndPoint(start ? 'StartToStart' : 'StartToEnd', rng); + + // Get the length of the text to find where the endpoint is relative to it's container + offset = checkRng.text.replace('\r\n', ' ').length; + } + + return {node : child, position : position, offset : offset, inside : inside}; + }; // Returns a W3C DOM compatible range object by using the IE Range API function getRange() { - var ieRange = selection.getRng(), domRange = dom.createRng(), element, collapsed; + var ieRange = selection.getRng(), domRange = dom.createRng(), element, collapsed, tmpRange, element2, bookmark, fail; // If selection is outside the current document just return an empty range element = ieRange.item ? ieRange.item(0) : ieRange.parentElement(); @@ -23,111 +109,258 @@ 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); - } + // Handle control selection + if (ieRange.item) { + 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; + var endPoint = getPosition(ieRange, start), container, offset, textNodeOffset = 0, sibling, undef, nodeValue; - // Setup temp range and collapse it - checkRng = ieRange.duplicate(); - checkRng.collapse(start); + container = endPoint.node; + offset = endPoint.offset; - // 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); + if (endPoint.inside && !container.hasChildNodes()) { + domRange[start ? 'setStart' : 'setEnd'](container, 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); + if (offset === undef) { + domRange[start ? 'setStartBefore' : 'setEndAfter'](container); 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; + if (endPoint.position < 0) { + sibling = endPoint.inside ? container.firstChild : container.nextSibling; + + if (!sibling) { + domRange[start ? 'setStartAfter' : 'setEndAfter'](container); + return; } - } - // Setup container - container = position > 0 || index == 0 ? marker.nextSibling : marker.previousSibling; + if (!offset) { + if (sibling.nodeType == 3) + domRange[start ? 'setStart' : 'setEnd'](sibling, 0); + else + domRange[start ? 'setStartBefore' : 'setEndBefore'](sibling); - // Handle element selection - if (container.nodeType == 1) { - dom.remove(marker); + return; + } - // Find offset and container - offset = dom.nodeIndex(container); - container = container.parentNode; + // Find the text node and offset + while (sibling) { + nodeValue = sibling.nodeValue; + textNodeOffset += nodeValue.length; + + // We are at or passed the position we where looking for + if (textNodeOffset >= offset) { + container = sibling; + textNodeOffset -= offset; + textNodeOffset = nodeValue.length - textNodeOffset; + break; + } - // Move the offset if we are setting the end or the position is after an element - if (!start || index > 0) - offset++; + sibling = sibling.nextSibling; + } } 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; + // Find the text node and offset + sibling = container.previousSibling; + + if (!sibling) + return domRange[start ? 'setStartBefore' : 'setEndBefore'](container); + + // If there isn't any text to loop then use the first position + if (!offset) { + if (container.nodeType == 3) + domRange[start ? 'setStart' : 'setEnd'](sibling, container.nodeValue.length); + else + domRange[start ? 'setStartAfter' : 'setEndAfter'](sibling); + + return; } - dom.remove(marker); + while (sibling) { + textNodeOffset += sibling.nodeValue.length; + + // We are at or passed the position we where looking for + if (textNodeOffset >= offset) { + container = sibling; + textNodeOffset -= offset; + break; + } + + sibling = sibling.previousSibling; + } } - domRange[start ? 'setStart' : 'setEnd'](container, offset); + domRange[start ? 'setStart' : 'setEnd'](container, textNodeOffset); }; - // Find start point - findEndPoint(true); + try { + // Find start point + findEndPoint(true); + + // Find end point if needed + if (!collapsed) + findEndPoint(); + } catch (ex) { + // IE has a nasty bug where text nodes might throw "invalid argument" when you + // access the nodeValue or other properties of text nodes. This seems to happend when + // text nodes are split into two nodes by a delete/backspace call. So lets detect it and try to fix it. + if (ex.number == -2147024809) { + // Get the current selection + bookmark = self.getBookmark(2); + + // Get start element + tmpRange = ieRange.duplicate(); + tmpRange.collapse(true); + element = tmpRange.parentElement(); + + // Get end element + if (!collapsed) { + tmpRange = ieRange.duplicate(); + tmpRange.collapse(false); + element2 = tmpRange.parentElement(); + element2.innerHTML = element2.innerHTML; + } + + // Remove the broken elements + element.innerHTML = element.innerHTML; + + // Restore the selection + self.moveToBookmark(bookmark); - // Find end point if needed - if (!collapsed) - findEndPoint(); + // Since the range has moved we need to re-get it + ieRange = selection.getRng(); + + // Find start point + findEndPoint(true); + + // Find end point if needed + if (!collapsed) + findEndPoint(); + } else + throw ex; // Throw other errors + } return domRange; }; + this.getBookmark = function(type) { + var rng = selection.getRng(), start, end, bookmark = {}; + + function getIndexes(node) { + var node, parent, root, children, i, indexes = []; + + parent = node.parentNode; + root = dom.getRoot().parentNode; + + while (parent != root) { + children = parent.children; + + i = children.length; + while (i--) { + if (node === children[i]) { + indexes.push(i); + break; + } + } + + node = parent; + parent = parent.parentNode; + } + + return indexes; + }; + + function getBookmarkEndPoint(start) { + var position; + + position = getPosition(rng, start); + if (position) { + return { + position : position.position, + offset : position.offset, + indexes : getIndexes(position.node), + inside : position.inside + }; + } + }; + + // Non ubstructive bookmark + if (type === 2) { + // Handle text selection + if (!rng.item) { + bookmark.start = getBookmarkEndPoint(true); + + if (!selection.isCollapsed()) + bookmark.end = getBookmarkEndPoint(); + } else + bookmark.start = {ctrl : true, indexes : getIndexes(rng.item(0))}; + } + + return bookmark; + }; + + this.moveToBookmark = function(bookmark) { + var rng, body = dom.doc.body; + + function resolveIndexes(indexes) { + var node, i, idx, children; + + node = dom.getRoot(); + for (i = indexes.length - 1; i >= 0; i--) { + children = node.children; + idx = indexes[i]; + + if (idx <= children.length - 1) { + node = children[idx]; + } + } + + return node; + }; + + function setBookmarkEndPoint(start) { + var endPoint = bookmark[start ? 'start' : 'end'], moveLeft, moveRng, undef; + + if (endPoint) { + moveLeft = endPoint.position > 0; + + moveRng = body.createTextRange(); + moveRng.moveToElementText(resolveIndexes(endPoint.indexes)); + + offset = endPoint.offset; + if (offset !== undef) { + moveRng.collapse(endPoint.inside || moveLeft); + moveRng.moveStart('character', moveLeft ? -offset : offset); + } else + moveRng.collapse(start); + + rng.setEndPoint(start ? 'StartToStart' : 'EndToStart', moveRng); + + if (start) + rng.collapse(true); + } + }; + + if (bookmark.start) { + if (bookmark.start.ctrl) { + rng = body.createControlRange(); + rng.addElement(resolveIndexes(bookmark.start.indexes)); + rng.select(); + } else { + rng = body.createTextRange(); + setBookmarkEndPoint(true); + setBookmarkEndPoint(); + rng.select(); + } + } + }; + this.addRange = function(rng) { var ieRng, ctrlRng, startContainer, startOffset, endContainer, endOffset, doc = selection.dom.doc, body = doc.body; @@ -163,7 +396,7 @@ tmpRng.moveToElementText(marker); } else { // Empty node selection for example
|
- marker = doc.createTextNode(invisibleChar); + marker = doc.createTextNode('\uFEFF'); container.appendChild(marker); tmpRng.moveToElementText(marker.parentNode); tmpRng.collapse(TRUE); @@ -174,9 +407,6 @@ } } - // Destroy cached range - this.destroy(); - // Setup some shorter versions startContainer = rng.startContainer; startOffset = rng.startOffset; @@ -206,33 +436,8 @@ 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 range method + this.getRangeAt = getRange; }; // Expose the selection object diff --git a/include/javascript/tiny_mce/classes/html/DomParser.js b/include/javascript/tiny_mce/classes/html/DomParser.js index 9c07626f..aa516de1 100644 --- a/include/javascript/tiny_mce/classes/html/DomParser.js +++ b/include/javascript/tiny_mce/classes/html/DomParser.js @@ -232,7 +232,7 @@ 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; + endWhiteSpaceRegExp, allWhiteSpaceRegExp, whiteSpaceElements, children, nonEmptyElements, rootBlockName; args = args || {}; matchedNodes = {}; @@ -241,12 +241,35 @@ nonEmptyElements = schema.getNonEmptyElements(); children = schema.children; validate = settings.validate; + rootBlockName = "forced_root_block" in args ? args.forced_root_block : settings.forced_root_block; whiteSpaceElements = schema.getWhiteSpaceElements(); startWhiteSpaceRegExp = /^[ \t\r\n]+/; endWhiteSpaceRegExp = /[ \t\r\n]+$/; allWhiteSpaceRegExp = /[ \t\r\n]+/g; + function addRootBlocks() { + var node = rootNode.firstChild, next, rootBlockNode; + + while (node) { + next = node.next; + + if (node.type == 3 || (node.type == 1 && node.name !== 'p' && !blockElements[node.name] && !node.attr('data-mce-type'))) { + if (!rootBlockNode) { + // Create a new root block element + rootBlockNode = createNode(rootBlockName, 1); + rootNode.insert(rootBlockNode, node); + rootBlockNode.append(node); + } else + rootBlockNode.append(node); + } else { + rootBlockNode = null; + } + + node = next; + }; + }; + function createNode(name, type) { var node = new Node(name, type), list; @@ -434,35 +457,28 @@ } }, schema); - rootNode = node = new Node(settings.root_name, 11); + rootNode = node = new Node(args.context || 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); + // Fix invalid children or report invalid children in a contextual parsing + if (validate && invalidChildren.length) { + if (!args.context) + fixInvalidChildren(invalidChildren); + else + args.invalid = true; } - // Run attribute filters - for (i = 0, l = attributeFilters.length; i < l; i++) { - list = attributeFilters[i]; + // Wrap nodes in the root into block elements if the root is body + if (rootBlockName && rootNode.name == 'body') + addRootBlocks(); - if (list.name in matchedAttributes) { - nodes = matchedAttributes[list.name]; + // Run filters only when the contents is valid + if (!args.invalid) { + // Run node filters + for (name in matchedNodes) { + list = nodeFilters[name]; + nodes = matchedNodes[name]; // Remove already removed children fi = nodes.length; @@ -471,8 +487,27 @@ nodes.splice(fi, 1); } - for (fi = 0, fl = list.callbacks.length; fi < fl; fi++) - list.callbacks[fi](nodes, list.name, args); + 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); + } } } @@ -487,6 +522,9 @@ var i, l = nodes.length, node, blockElements = schema.getBlockElements(), nonEmptyElements = schema.getNonEmptyElements(), parent, prev, prevName; + // Remove brs from body element as well + blockElements.body = 1; + // Must loop forwards since it will otherwise remove all brs in

a


for (i = 0; i < l; i++) { node = nodes[i]; diff --git a/include/javascript/tiny_mce/classes/html/Entities.js b/include/javascript/tiny_mce/classes/html/Entities.js index f0d4391e..b03a0b14 100644 --- a/include/javascript/tiny_mce/classes/html/Entities.js +++ b/include/javascript/tiny_mce/classes/html/Entities.js @@ -10,10 +10,10 @@ (function(tinymce) { var namedEntities, baseEntities, reverseEntities, - attrsCharsRegExp = /[&\"\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + attrsCharsRegExp = /[&<>\"\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, textCharsRegExp = /[<>&\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, rawCharsRegExp = /[<>&\"\']/g, - entityRegExp = /&(#)?([\w]+);/g, + entityRegExp = /&(#x|#)?([\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", @@ -24,7 +24,7 @@ // Raw entities baseEntities = { - '"' : '"', + '\"' : '"', // Needs to be escaped since the YUI compressor would otherwise break the code "'" : ''', '<' : '<', '>' : '>', @@ -235,7 +235,7 @@ decode : function(text) { return text.replace(entityRegExp, function(all, numeric, value) { if (numeric) { - value = parseInt(value); + value = parseInt(value, numeric.length === 2 ? 16 : 10); // Support upper UTF if (value > 0xFFFF) { diff --git a/include/javascript/tiny_mce/classes/html/Node.js b/include/javascript/tiny_mce/classes/html/Node.js index f5c6083c..41cc0d98 100644 --- a/include/javascript/tiny_mce/classes/html/Node.js +++ b/include/javascript/tiny_mce/classes/html/Node.js @@ -431,6 +431,17 @@ } return true; + }, + + /** + * Walks to the next or previous node and returns that node or null if it wasn't found. + * + * @method walk + * @param {Boolean} prev Optional previous node state defaults to false. + * @return {tinymce.html.Node} Node that is next to or previous of the current node. + */ + walk : function(prev) { + return walk(this, null, prev); } }); diff --git a/include/javascript/tiny_mce/classes/html/SaxParser.js b/include/javascript/tiny_mce/classes/html/SaxParser.js index dae341e8..0eeefc31 100644 --- a/include/javascript/tiny_mce/classes/html/SaxParser.js +++ b/include/javascript/tiny_mce/classes/html/SaxParser.js @@ -82,7 +82,7 @@ * @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, + var self = this, matches, index = 0, value, endRegExp, stack = [], attrList, i, text, name, isInternalElement, removeInternalElements, 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; @@ -134,6 +134,7 @@ selfClosing = schema.getSelfClosingElements(); fillAttrsMap = schema.getBoolAttrs(); validate = settings.validate; + removeInternalElements = settings.remove_internals; fixSelfClosing = settings.fix_self_closing; while (matches = tokenRegExp.exec(html)) { @@ -163,6 +164,12 @@ // Parse attributes if (attribsValue = matches[8]) { + isInternalElement = attribsValue.indexOf('data-mce-type') !== -1; // Check if the element is an internal element + + // If the element has internal attributes then remove it if we are told to do so + if (isInternalElement && removeInternalElements) + isValidElement = false; + attrList = []; attrList.map = {}; @@ -173,7 +180,7 @@ 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) { + if (validate && !isInternalElement && name.indexOf('data-') !== 0) { attrRule = validAttributesMap[name]; // Find rule by pattern matching @@ -212,7 +219,7 @@ } // Process attributes if validation is enabled - if (validate) { + if (validate && !isInternalElement) { attributesRequired = elementRule.attributesRequired; attributesDefault = elementRule.attributesDefault; attributesForced = elementRule.attributesForced; diff --git a/include/javascript/tiny_mce/classes/html/Schema.js b/include/javascript/tiny_mce/classes/html/Schema.js index dbe43fd2..81f67d3e 100644 --- a/include/javascript/tiny_mce/classes/html/Schema.js +++ b/include/javascript/tiny_mce/classes/html/Schema.js @@ -9,7 +9,7 @@ */ (function(tinymce) { - var transitional = {}, boolAttrMap, blockElementsMap, shortEndedElementsMap, nonEmptyElementsMap, + var transitional = {}, boolAttrMap, blockElementsMap, shortEndedElementsMap, nonEmptyElementsMap, customElementsMap = {}, whiteSpaceElementsMap, selfClosingElementsMap, makeMap = tinymce.makeMap, each = tinymce.each; function split(str, delim) { @@ -175,10 +175,10 @@ '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'); + boolAttrMap = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,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'); + nonEmptyElementsMap = tinymce.extend(makeMap('td,th,iframe,video,audio,object'), shortEndedElementsMap); + whiteSpaceElementsMap = makeMap('pre,script,style,textarea'); selfClosingElementsMap = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); /** @@ -386,10 +386,16 @@ if (custom_elements) { each(split(custom_elements), function(rule) { var matches = customElementRegExp.exec(rule), - cloneName = matches[1] === '~' ? 'span' : 'div', + inline = matches[1] === '~', + cloneName = inline ? 'span' : 'div', name = matches[2]; children[name] = children[cloneName]; + customElementsMap[name] = cloneName; + + // If it's not marked as inline then add it to valid block elements + if (!inline) + blockElementsMap[name] = {}; // Add custom elements at span/div positions each(children, function(element, child) { @@ -428,7 +434,24 @@ } }); } - } + }; + + function getElementRule(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; + } + }; if (!settings.valid_elements) { // No valid elements defined then clone the elements from the transitional spec @@ -451,7 +474,7 @@ 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) { + each(split('ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr'), function(name) { elements[name].removeEmpty = true; }); @@ -469,6 +492,10 @@ // Todo: Remove this when we fix list handling to be valid addValidChildren('+ol[ul|ol],+ul[ul|ol]'); + // If the user didn't allow span only allow internal spans + if (!getElementRule('span')) + addValidElements('span[!data-mce-type|*]'); + // Delete invalid elements if (settings.invalid_elements) { tinymce.each(tinymce.explode(settings.invalid_elements), function(item) { @@ -581,21 +608,16 @@ * @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]; + self.getElementRule = getElementRule; - if (element.pattern.test(name)) - return element; - } + /** + * Returns an map object of all custom elements. + * + * @method getCustomElements + * @return {Object} Name/value map object of all custom elements. + */ + self.getCustomElements = function() { + return customElementsMap; }; /** diff --git a/include/javascript/tiny_mce/classes/html/Styles.js b/include/javascript/tiny_mce/classes/html/Styles.js index c7e7eba9..edf1e13a 100644 --- a/include/javascript/tiny_mce/classes/html/Styles.js +++ b/include/javascript/tiny_mce/classes/html/Styles.js @@ -36,10 +36,10 @@ tinymce.html.Styles = function(settings, schema) { settings = settings || {}; - encodingItems = '\\" \\\' \\; \\: ; : _'.split(' '); + encodingItems = '\\" \\\' \\; \\: ; : \uFEFF'.split(' '); for (i = 0; i < encodingItems.length; i++) { - encodingLookup[encodingItems[i]] = '_' + i; - encodingLookup['_' + i] = encodingItems[i]; + encodingLookup[encodingItems[i]] = '\uFEFF' + i; + encodingLookup['\uFEFF' + i] = encodingItems[i]; } function toHex(match, r, g, b) { @@ -156,7 +156,7 @@ tinymce.html.Styles = function(settings, schema) { // 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) { + str = str.replace(/\uFEFF[0-9]/g, function(str) { return encodingLookup[str]; }); } @@ -169,7 +169,7 @@ tinymce.html.Styles = function(settings, schema) { 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) { + css = css.replace(/\\[\"\';:\uFEFF]/g, encode).replace(/\"[^\"]+\"|\'[^\']+\'/g, function(str) { return str.replace(/[;:]/g, encode); }); @@ -244,7 +244,7 @@ tinymce.html.Styles = function(settings, schema) { var css = '', name, value; function serializeStyles(name) { - var styleList, i, l, name, value; + var styleList, i, l, value; styleList = schema.styles[name]; if (styleList) { @@ -262,7 +262,7 @@ tinymce.html.Styles = function(settings, schema) { if (element_name && schema && schema.styles) { // Serialize global styles and element specific styles serializeStyles('*'); - serializeStyles(name); + serializeStyles(element_name); } else { // Output the styles in the order they are inside the object for (name in styles) { diff --git a/include/javascript/tiny_mce/classes/tinymce.js b/include/javascript/tiny_mce/classes/tinymce.js index 977b7059..6afea2fe 100644 --- a/include/javascript/tiny_mce/classes/tinymce.js +++ b/include/javascript/tiny_mce/classes/tinymce.js @@ -94,6 +94,33 @@ */ t.isIE6 = t.isIE && /MSIE [56]/.test(ua); + /** + * Constant that is true if the browser is IE 7. + * + * @property isIE7 + * @type Boolean + * @final + */ + t.isIE7 = t.isIE && /MSIE [7]/.test(ua); + + /** + * Constant that is true if the browser is IE 8. + * + * @property isIE8 + * @type Boolean + * @final + */ + t.isIE8 = t.isIE && /MSIE [8]/.test(ua); + + /** + * Constant that is true if the browser is IE 9. + * + * @property isIE9 + * @type Boolean + * @final + */ + t.isIE9 = t.isIE && /MSIE [9]/.test(ua); + /** * Constant that is true if the browser is Gecko. * @@ -129,6 +156,15 @@ * @final */ t.isIDevice = /(iPad|iPhone)/.test(ua); + + /** + * Constant that is true if the current browser is running on iOS 5 or greater. + * + * @property isIOS5 + * @type Boolean + * @final + */ + t.isIOS5 = t.isIDevice && ua.match(/AppleWebKit\/(\d*)/)[1]>=534; // TinyMCE .NET webcontrol might be setting the values for TinyMCE if (win.tinyMCEPreInit) { @@ -830,4 +866,4 @@ * * @namespace tinymce.plugins */ -})(window); \ No newline at end of file +})(window); diff --git a/include/javascript/tiny_mce/classes/ui/Button.js b/include/javascript/tiny_mce/classes/ui/Button.js index 2e8cd45b..433b9f2f 100644 --- a/include/javascript/tiny_mce/classes/ui/Button.js +++ b/include/javascript/tiny_mce/classes/ui/Button.js @@ -45,8 +45,7 @@ l = DOM.encode(s.label || ''); h = ''; - - if (s.image) + if (s.image && !(this.editor &&this.editor.forcedHighContrastMode) ) h += '' + DOM.encode(s.title) + '' + l; else h += '' + (l ? '' + l + '' : ''); diff --git a/include/javascript/tiny_mce/classes/ui/ListBox.js b/include/javascript/tiny_mce/classes/ui/ListBox.js index dee9fba7..d8bcc39d 100644 --- a/include/javascript/tiny_mce/classes/ui/ListBox.js +++ b/include/javascript/tiny_mce/classes/ui/ListBox.js @@ -231,7 +231,7 @@ * @method showMenu */ showMenu : function() { - var t = this, p1, p2, e = DOM.get(this.id), m; + var t = this, p2, e = DOM.get(this.id), m; if (t.isDisabled() || t.items.length == 0) return; @@ -244,7 +244,6 @@ t.isMenuRendered = true; } - p1 = DOM.getPos(this.settings.menu_container); p2 = DOM.getPos(e); m = t.menu; diff --git a/include/javascript/tiny_mce/classes/util/Quirks.js b/include/javascript/tiny_mce/classes/util/Quirks.js new file mode 100644 index 00000000..c46e169c --- /dev/null +++ b/include/javascript/tiny_mce/classes/util/Quirks.js @@ -0,0 +1,25 @@ +(function(tinymce) { + function cleanupStylesWhenDeleting(ed) { + var dom = ed.dom, selection = ed.selection, VK= tinymce.VK; + ed.onKeyUp.add(function(ed, e) { + if (e.keyCode == VK.DELETE ||e.keyCode == VK.BACKSPACE) { + var startContainer = selection.getRng().startContainer; + var blockElement = startContainer; + while (!dom.isBlock(blockElement)) { + blockElement = blockElement.parentNode; + } + var spans = dom.select("span.Apple-style-span", blockElement); + dom.remove(spans, true); + } + }); + } + + tinymce.create('tinymce.util.Quirks', { + Quirks: function(ed) { + if (tinymce.isWebKit) { + cleanupStylesWhenDeleting(ed); + } + + } + }); +})(tinymce); diff --git a/include/javascript/tiny_mce/classes/util/URI.js b/include/javascript/tiny_mce/classes/util/URI.js index f07aa82e..3f255a35 100644 --- a/include/javascript/tiny_mce/classes/util/URI.js +++ b/include/javascript/tiny_mce/classes/util/URI.js @@ -25,7 +25,7 @@ * @param {Object} s Optional settings object. */ URI : function(u, s) { - var t = this, o, a, b; + var t = this, o, a, b, base_url; // Trim whitespace u = tinymce.trim(u); @@ -44,8 +44,10 @@ 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); + if (!/^[\w-]*:?\/\//.test(u)) { + base_url = s.base_uri ? s.base_uri.path : new tinymce.util.URI(location.href).directory; + u = ((s.base_uri && s.base_uri.protocol) || 'http') + '://mce_host' + t.toAbsPath(base_url, 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 diff --git a/include/javascript/tiny_mce/classes/util/VK.js b/include/javascript/tiny_mce/classes/util/VK.js new file mode 100644 index 00000000..8f845c20 --- /dev/null +++ b/include/javascript/tiny_mce/classes/util/VK.js @@ -0,0 +1,12 @@ +/** + * This file exposes a set of the common KeyCodes for use. Please grow it as needed. + */ + +(function(tinymce){ + tinymce.VK = { + DELETE:46, + BACKSPACE:8 + + } + +})(tinymce); diff --git a/include/javascript/tiny_mce/plugins/advimage/editor_plugin.js b/include/javascript/tiny_mce/plugins/advimage/editor_plugin.js index 4c7a9c3a..d613a613 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(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 +(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 351542f6..76df89a3 100644 --- a/include/javascript/tiny_mce/plugins/advimage/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/advimage/editor_plugin_src.js @@ -14,7 +14,7 @@ // Register commands ed.addCommand('mceAdvImage', function() { // Internal image object like a flash placeholder - if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1) + if (ed.dom.getAttrib(ed.selection.getNode(), 'class', '').indexOf('mceItem') != -1) return; ed.windowManager.open({ diff --git a/include/javascript/tiny_mce/plugins/advimage/js/image.js b/include/javascript/tiny_mce/plugins/advimage/js/image.js index 870c9609..3d1dee62 100644 --- a/include/javascript/tiny_mce/plugins/advimage/js/image.js +++ b/include/javascript/tiny_mce/plugins/advimage/js/image.js @@ -9,13 +9,13 @@ var ImageDialog = { }, init : function(ed) { - var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode(); + var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode(), fl = tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList'); tinyMCEPopup.resizeToInnerSize(); this.fillClassList('class_list'); - this.fillFileList('src_list', 'tinyMCEImageList'); - this.fillFileList('over_list', 'tinyMCEImageList'); - this.fillFileList('out_list', 'tinyMCEImageList'); + this.fillFileList('src_list', fl); + this.fillFileList('over_list', fl); + this.fillFileList('out_list', fl); TinyMCE_EditableSelects.init(); if (n.nodeName == 'IMG') { @@ -287,7 +287,7 @@ var ImageDialog = { fillFileList : function(id, l) { var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; - l = window[l]; + l = typeof(l) === 'function' ? l() : window[l]; lst.options.length = 0; if (l && l.length > 0) { diff --git a/include/javascript/tiny_mce/plugins/advlist/editor_plugin.js b/include/javascript/tiny_mce/plugins/advlist/editor_plugin.js index 8895112b..57ecce6e 100644 --- a/include/javascript/tiny_mce/plugins/advlist/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/advlist/editor_plugin.js @@ -1 +1 @@ -(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.AdvListPlugin",{init:function(b,c){var d=this;d.editor=b;function e(g){var f=[];a(g.split(/,/),function(h){f.push({title:"advlist."+(h=="default"?"def":h.replace(/-/g,"_")),styles:{listStyleType:h=="default"?"":h}})});return f}d.numlist=b.getParam("advlist_number_styles")||e("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");d.bullist=b.getParam("advlist_bullet_styles")||e("default,circle,disc,square");if(tinymce.isIE&&/MSIE [2-7]/.test(navigator.userAgent)){d.isIE7=true}},createControl:function(d,b){var f=this,e,h;if(d=="numlist"||d=="bullist"){if(f[d][0].title=="advlist.def"){h=f[d][0]}function c(i,k){var j=true;a(k.styles,function(m,l){if(f.editor.dom.getStyle(i,l)!=m){j=false;return false}});return j}function g(){var k,i=f.editor,l=i.dom,j=i.selection;k=l.getParent(j.getNode(),"ol,ul");if(!k||k.nodeName==(d=="bullist"?"OL":"UL")||c(k,h)){i.execCommand(d=="bullist"?"InsertUnorderedList":"InsertOrderedList")}if(h){k=l.getParent(j.getNode(),"ol,ul");if(k){l.setStyles(k,h.styles);k.removeAttribute("data-mce-style")}}i.focus()}e=b.createSplitButton(d,{title:"advanced."+d+"_desc","class":"mce_"+d,onclick:function(){g()}});e.onRenderMenu.add(function(i,j){j.onShowMenu.add(function(){var m=f.editor.dom,l=m.getParent(f.editor.selection.getNode(),"ol,ul"),k;if(l||h){k=f[d];a(j.items,function(n){var o=true;n.setSelected(0);if(l&&!n.isDisabled()){a(k,function(p){if(p.id==n.id){if(!c(l,p)){o=false;return false}}});if(o){n.setSelected(1)}}});if(!l){j.items[h.id].setSelected(1)}}});j.add({id:f.editor.dom.uniqueId(),title:"advlist.types","class":"mceMenuItemTitle",titleItem:true}).setDisabled(1);a(f[d],function(k){if(f.isIE7&&k.styles.listStyleType=="lower-greek"){return}k.id=f.editor.dom.uniqueId();j.add({id:k.id,title:k.title,onclick:function(){h=k;g()}})})});return e}},getInfo:function(){return{longname:"Advanced lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlist",tinymce.plugins.AdvListPlugin)})(); \ No newline at end of file +(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.AdvListPlugin",{init:function(b,c){var d=this;d.editor=b;function e(g){var f=[];a(g.split(/,/),function(h){f.push({title:"advlist."+(h=="default"?"def":h.replace(/-/g,"_")),styles:{listStyleType:h=="default"?"":h}})});return f}d.numlist=b.getParam("advlist_number_styles")||e("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");d.bullist=b.getParam("advlist_bullet_styles")||e("default,circle,disc,square");if(tinymce.isIE&&/MSIE [2-7]/.test(navigator.userAgent)){d.isIE7=true}},createControl:function(d,b){var f=this,e,i,g=f.editor;if(d=="numlist"||d=="bullist"){if(f[d][0].title=="advlist.def"){i=f[d][0]}function c(j,l){var k=true;a(l.styles,function(n,m){if(g.dom.getStyle(j,m)!=n){k=false;return false}});return k}function h(){var k,l=g.dom,j=g.selection;k=l.getParent(j.getNode(),"ol,ul");if(!k||k.nodeName==(d=="bullist"?"OL":"UL")||c(k,i)){g.execCommand(d=="bullist"?"InsertUnorderedList":"InsertOrderedList")}if(i){k=l.getParent(j.getNode(),"ol,ul");if(k){l.setStyles(k,i.styles);k.removeAttribute("data-mce-style")}}g.focus()}e=b.createSplitButton(d,{title:"advanced."+d+"_desc","class":"mce_"+d,onclick:function(){h()}});e.onRenderMenu.add(function(j,k){k.onHideMenu.add(function(){if(f.bookmark){g.selection.moveToBookmark(f.bookmark);f.bookmark=0}});k.onShowMenu.add(function(){var n=g.dom,m=n.getParent(g.selection.getNode(),"ol,ul"),l;if(m||i){l=f[d];a(k.items,function(o){var p=true;o.setSelected(0);if(m&&!o.isDisabled()){a(l,function(q){if(q.id==o.id){if(!c(m,q)){p=false;return false}}});if(p){o.setSelected(1)}}});if(!m){k.items[i.id].setSelected(1)}}g.focus();if(tinymce.isIE){f.bookmark=g.selection.getBookmark(1)}});k.add({id:g.dom.uniqueId(),title:"advlist.types","class":"mceMenuItemTitle",titleItem:true}).setDisabled(1);a(f[d],function(l){if(f.isIE7&&l.styles.listStyleType=="lower-greek"){return}l.id=g.dom.uniqueId();k.add({id:l.id,title:l.title,onclick:function(){i=l;h()}})})});return e}},getInfo:function(){return{longname:"Advanced lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlist",tinymce.plugins.AdvListPlugin)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/advlist/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/advlist/editor_plugin_src.js index 804355a7..4ee4d34c 100644 --- a/include/javascript/tiny_mce/plugins/advlist/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/advlist/editor_plugin_src.js @@ -41,7 +41,7 @@ }, createControl: function(name, cm) { - var t = this, btn, format; + var t = this, btn, format, editor = t.editor; if (name == 'numlist' || name == 'bullist') { // Default to first item if it's a default item @@ -53,7 +53,7 @@ each(format.styles, function(value, name) { // Format doesn't match - if (t.editor.dom.getStyle(node, name) != value) { + if (editor.dom.getStyle(node, name) != value) { state = false; return false; } @@ -63,14 +63,14 @@ }; function applyListFormat() { - var list, ed = t.editor, dom = ed.dom, sel = ed.selection; + var list, dom = editor.dom, sel = editor.selection; // Check for existing list element list = dom.getParent(sel.getNode(), 'ol,ul'); // Switch/add list type if needed if (!list || list.nodeName == (name == 'bullist' ? 'OL' : 'UL') || hasFormat(list, format)) - ed.execCommand(name == 'bullist' ? 'InsertUnorderedList' : 'InsertOrderedList'); + editor.execCommand(name == 'bullist' ? 'InsertUnorderedList' : 'InsertOrderedList'); // Append styles to new list element if (format) { @@ -80,7 +80,8 @@ list.removeAttribute('data-mce-style'); } } - ed.focus(); + + editor.focus(); }; btn = cm.createSplitButton(name, { @@ -92,8 +93,15 @@ }); btn.onRenderMenu.add(function(btn, menu) { + menu.onHideMenu.add(function() { + if (t.bookmark) { + editor.selection.moveToBookmark(t.bookmark); + t.bookmark = 0; + } + }); + menu.onShowMenu.add(function() { - var dom = t.editor.dom, list = dom.getParent(t.editor.selection.getNode(), 'ol,ul'), fmtList; + var dom = editor.dom, list = dom.getParent(editor.selection.getNode(), 'ol,ul'), fmtList; if (list || format) { fmtList = t[name]; @@ -123,16 +131,23 @@ if (!list) menu.items[format.id].setSelected(1); } + + editor.focus(); + + // IE looses it's selection so store it away and restore it later + if (tinymce.isIE) { + t.bookmark = editor.selection.getBookmark(1); + } }); - menu.add({id : t.editor.dom.uniqueId(), title : 'advlist.types', 'class' : 'mceMenuItemTitle', titleItem: true}).setDisabled(1); + menu.add({id : editor.dom.uniqueId(), title : 'advlist.types', 'class' : 'mceMenuItemTitle', titleItem: true}).setDisabled(1); each(t[name], function(item) { // IE<8 doesn't support lower-greek, skip it if (t.isIE7 && item.styles.listStyleType == 'lower-greek') return; - item.id = t.editor.dom.uniqueId(); + item.id = editor.dom.uniqueId(); menu.add({id : item.id, title : item.title, onclick : function() { format = item; diff --git a/include/javascript/tiny_mce/plugins/autolink/editor_plugin.js b/include/javascript/tiny_mce/plugins/autolink/editor_plugin.js index de56d96f..c0f683a8 100644 --- a/include/javascript/tiny_mce/plugins/autolink/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/autolink/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create("tinymce.plugins.AutolinkPlugin",{init:function(a,b){var c=this;if(tinyMCE.isIE){return}a.onKeyDown.add(function(d,f){if(f.keyCode==13){return c.handleEnter(d)}if(f.shiftKey&&f.keyCode==48){return c.handleEclipse(d)}});a.onKeyUp.add(function(d,f){if(f.keyCode==32){return c.handleSpacebar(d)}})},handleEclipse:function(a){this.parseCurrentLine(a,-1,"(",true)},handleSpacebar:function(a){this.parseCurrentLine(a,0,"",true)},handleEnter:function(a){this.parseCurrentLine(a,-1,"",false)},parseCurrentLine:function(i,d,b,g){var a,f,c,n,k,m,h,e,j;a=i.selection.getRng().cloneRange();if(a.startOffset<5){e=a.endContainer.previousSibling;if(e==null){if(a.endContainer.firstChild==null||a.endContainer.firstChild.nextSibling==null){return}e=a.endContainer.firstChild.nextSibling}j=e.length;a.setStart(e,j);a.setEnd(e,j);if(a.endOffset<5){return}f=a.endOffset;n=e}else{n=a.endContainer;if(n.nodeType!=3&&n.firstChild){while(n.nodeType!=3&&n.firstChild){n=n.firstChild}a.setStart(n,0);a.setEnd(n,n.nodeValue.length)}if(a.endOffset==1){f=2}else{f=a.endOffset-1-d}}c=f;do{a.setStart(n,f-2);a.setEnd(n,f-1);f-=1}while(a.toString()!=" "&&a.toString()!=""&&a.toString().charCodeAt(0)!=160&&(f-2)>=0&&a.toString()!=b);if(a.toString()==b||a.toString().charCodeAt(0)==160){a.setStart(n,f);a.setEnd(n,c);f+=1}else{if(a.startOffset==0){a.setStart(n,0);a.setEnd(n,c)}else{a.setStart(n,f);a.setEnd(n,c)}}m=a.toString();h=m.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.)(.+)$/i);if(h){if(h[1]=="www."){h[1]="http://www."}k=i.selection.getBookmark();i.selection.setRng(a);tinyMCE.execCommand("mceInsertLink",false,h[1]+h[2]);i.selection.moveToBookmark(k);if(tinyMCE.isWebKit){i.selection.collapse(false);var l=Math.min(n.length,c+1);a.setStart(n,l);a.setEnd(n,l);i.selection.setRng(a)}}},getInfo:function(){return{longname:"Autolink",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autolink",tinymce.plugins.AutolinkPlugin)})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.AutolinkPlugin",{init:function(a,b){var c=this;if(tinyMCE.isIE){return}a.onKeyDown.add(function(d,f){if(f.keyCode==13){return c.handleEnter(d)}});a.onKeyPress.add(function(d,f){if(f.which==41){return c.handleEclipse(d)}});a.onKeyUp.add(function(d,f){if(f.keyCode==32){return c.handleSpacebar(d)}})},handleEclipse:function(a){this.parseCurrentLine(a,-1,"(",true)},handleSpacebar:function(a){this.parseCurrentLine(a,0,"",true)},handleEnter:function(a){this.parseCurrentLine(a,-1,"",false)},parseCurrentLine:function(i,d,b,g){var a,f,c,n,k,m,h,e,j;a=i.selection.getRng().cloneRange();if(a.startOffset<5){e=a.endContainer.previousSibling;if(e==null){if(a.endContainer.firstChild==null||a.endContainer.firstChild.nextSibling==null){return}e=a.endContainer.firstChild.nextSibling}j=e.length;a.setStart(e,j);a.setEnd(e,j);if(a.endOffset<5){return}f=a.endOffset;n=e}else{n=a.endContainer;if(n.nodeType!=3&&n.firstChild){while(n.nodeType!=3&&n.firstChild){n=n.firstChild}a.setStart(n,0);a.setEnd(n,n.nodeValue.length)}if(a.endOffset==1){f=2}else{f=a.endOffset-1-d}}c=f;do{a.setStart(n,f-2);a.setEnd(n,f-1);f-=1}while(a.toString()!=" "&&a.toString()!=""&&a.toString().charCodeAt(0)!=160&&(f-2)>=0&&a.toString()!=b);if(a.toString()==b||a.toString().charCodeAt(0)==160){a.setStart(n,f);a.setEnd(n,c);f+=1}else{if(a.startOffset==0){a.setStart(n,0);a.setEnd(n,c)}else{a.setStart(n,f);a.setEnd(n,c)}}m=a.toString();h=m.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.)(.+)$/i);if(h){if(h[1]=="www."){h[1]="http://www."}k=i.selection.getBookmark();i.selection.setRng(a);tinyMCE.execCommand("mceInsertLink",false,h[1]+h[2]);i.selection.moveToBookmark(k);if(tinyMCE.isWebKit){i.selection.collapse(false);var l=Math.min(n.length,c+1);a.setStart(n,l);a.setEnd(n,l);i.selection.setRng(a)}}},getInfo:function(){return{longname:"Autolink",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autolink",tinymce.plugins.AutolinkPlugin)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/autolink/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/autolink/editor_plugin_src.js index 4917edc5..ddfe0494 100644 --- a/include/javascript/tiny_mce/plugins/autolink/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/autolink/editor_plugin_src.js @@ -30,10 +30,13 @@ ed.onKeyDown.add(function(ed, e) { if (e.keyCode == 13) return t.handleEnter(ed); - if (e.shiftKey && e.keyCode == 48) - return t.handleEclipse(ed); }); + ed.onKeyPress.add(function(ed, e) { + if (e.which == 41) + return t.handleEclipse(ed); + }); + // Add a key up handler ed.onKeyUp.add(function(ed, e) { if (e.keyCode == 32) diff --git a/include/javascript/tiny_mce/plugins/autoresize/editor_plugin.js b/include/javascript/tiny_mce/plugins/autoresize/editor_plugin.js index 10687a92..6c4ff0d5 100644 --- a/include/javascript/tiny_mce/plugins/autoresize/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/autoresize/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create("tinymce.plugins.AutoResizePlugin",{init:function(a,c){var d=this,e=0;if(a.getParam("fullscreen_is_enabled")){return}function b(){var i=a.getDoc(),f=i.body,k=i.documentElement,h=tinymce.DOM,j=d.autoresize_min_height,g;g=tinymce.isIE?f.scrollHeight:k.offsetHeight;g=d.bottom_margin+g;if(g>d.autoresize_min_height){j=g}if(j!==e){h.setStyle(h.get(a.id+"_ifr"),"height",j+"px");e=j}if(d.throbbing){a.setProgressState(false);a.setProgressState(true)}}d.editor=a;d.autoresize_min_height=a.getElement().offsetHeight;d.bottom_margin=parseInt(a.getParam("autoresize_bottom_margin",50));a.onChange.add(b);a.onSetContent.add(b);a.onPaste.add(b);a.onKeyUp.add(b);a.onPostRender.add(b);if(a.getParam("autoresize_on_init",true)){a.onInit.add(function(g,f){g.setProgressState(true);d.throbbing=true;g.getBody().style.overflowY="hidden"});a.onLoadContent.add(function(g,f){b();setTimeout(function(){b();g.setProgressState(false);d.throbbing=false},1250)})}a.addCommand("mceAutoResize",b)},getInfo:function(){return{longname:"Auto Resize",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autoresize",tinymce.plugins.AutoResizePlugin)})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.AutoResizePlugin",{init:function(a,c){var d=this,e=0;if(a.getParam("fullscreen_is_enabled")){return}function b(){var i=a.getDoc(),f=i.body,k=i.documentElement,h=tinymce.DOM,j=d.autoresize_min_height,g;g=tinymce.isIE?f.scrollHeight:i.body.offsetHeight;if(g>d.autoresize_min_height){j=g}if(d.autoresize_max_height&&g>d.autoresize_max_height){j=d.autoresize_max_height;a.getBody().style.overflowY="auto"}else{a.getBody().style.overflowY="hidden"}if(j!==e){h.setStyle(h.get(a.id+"_ifr"),"height",j+"px");e=j}if(d.throbbing){a.setProgressState(false);a.setProgressState(true)}}d.editor=a;d.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight));d.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0));a.onInit.add(function(f){f.dom.setStyle(f.getBody(),"paddingBottom",f.getParam("autoresize_bottom_margin",50)+"px")});a.onChange.add(b);a.onSetContent.add(b);a.onPaste.add(b);a.onKeyUp.add(b);a.onPostRender.add(b);if(a.getParam("autoresize_on_init",true)){a.onInit.add(function(g,f){g.setProgressState(true);d.throbbing=true;g.getBody().style.overflowY="hidden"});a.onLoadContent.add(function(g,f){b();setTimeout(function(){b();g.setProgressState(false);d.throbbing=false},1250)})}a.addCommand("mceAutoResize",b)},getInfo:function(){return{longname:"Auto Resize",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autoresize",tinymce.plugins.AutoResizePlugin)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/autoresize/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/autoresize/editor_plugin_src.js index 50af21aa..7d113419 100644 --- a/include/javascript/tiny_mce/plugins/autoresize/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/autoresize/editor_plugin_src.js @@ -38,17 +38,21 @@ var d = ed.getDoc(), b = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight; // Get height differently depending on the browser used - myHeight = tinymce.isIE ? b.scrollHeight : de.offsetHeight; - - // Bottom margin - myHeight = t.bottom_margin + myHeight; + myHeight = tinymce.isIE ? b.scrollHeight : d.body.offsetHeight; // Don't make it smaller than the minimum height if (myHeight > t.autoresize_min_height) resizeHeight = myHeight; + // If a maximum height has been defined don't exceed this height + if (t.autoresize_max_height && myHeight > t.autoresize_max_height) { + resizeHeight = t.autoresize_max_height; + ed.getBody().style.overflowY = "auto"; + } else + ed.getBody().style.overflowY = "hidden"; + // Resize content element - if ( resizeHeight !== oldSize ) { + if (resizeHeight !== oldSize) { DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px'); oldSize = resizeHeight; } @@ -63,10 +67,15 @@ t.editor = ed; // Define minimum height - t.autoresize_min_height = ed.getElement().offsetHeight; + t.autoresize_min_height = parseInt( ed.getParam('autoresize_min_height', ed.getElement().offsetHeight) ); + + // Define maximum height + t.autoresize_max_height = parseInt( ed.getParam('autoresize_max_height', 0) ); - // Add margin at the bottom for better UX - t.bottom_margin = parseInt( ed.getParam('autoresize_bottom_margin', 50) ); + // Add padding at the bottom for better UX + ed.onInit.add(function(ed){ + ed.dom.setStyle(ed.getBody(), 'paddingBottom', ed.getParam('autoresize_bottom_margin', 50) + 'px'); + }); // Add appropriate listeners for resizing content area ed.onChange.add(resize); diff --git a/include/javascript/tiny_mce/plugins/autosave/editor_plugin.js b/include/javascript/tiny_mce/plugins/autosave/editor_plugin.js index 7f49107e..f7d05760 100644 --- a/include/javascript/tiny_mce/plugins/autosave/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/autosave/editor_plugin.js @@ -1 +1 @@ -(function(e){var c="autosave",g="restoredraft",b=true,f,d,a=e.util.Dispatcher;e.create("tinymce.plugins.AutoSave",{init:function(i,j){var h=this,l=i.settings;h.editor=i;function k(n){var m={s:1000,m:60000};n=/^(\d+)([ms]?)$/.exec(""+n);return(n[2]?m[n[2]]:1)*parseInt(n)}e.each({ask_before_unload:b,interval:"30s",retention:"20m",minlength:50},function(n,m){m=c+"_"+m;if(l[m]===f){l[m]=n}});l.autosave_interval=k(l.autosave_interval);l.autosave_retention=k(l.autosave_retention);i.addButton(g,{title:c+".restore_content",onclick:function(){if(i.getContent({draft:true}).replace(/\s| |<\/?p[^>]*>|]*>/gi,"").length>0){i.windowManager.confirm(c+".warning_message",function(m){if(m){h.restoreDraft()}})}else{h.restoreDraft()}}});i.onNodeChange.add(function(){var m=i.controlManager;if(m.get(g)){m.setDisabled(g,!h.hasDraft())}});i.onInit.add(function(){if(i.controlManager.get(g)){h.setupStorage(i);setInterval(function(){h.storeDraft();i.nodeChanged()},l.autosave_interval)}});h.onStoreDraft=new a(h);h.onRestoreDraft=new a(h);h.onRemoveDraft=new a(h);if(!d){window.onbeforeunload=e.plugins.AutoSave._beforeUnloadHandler;d=b}},getInfo:function(){return{longname:"Auto save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave",version:e.majorVersion+"."+e.minorVersion}},getExpDate:function(){return new Date(new Date().getTime()+this.editor.settings.autosave_retention).toUTCString()},setupStorage:function(i){var h=this,k=c+"_test",j="OK";h.key=c+i.id;e.each([function(){if(localStorage){localStorage.setItem(k,j);if(localStorage.getItem(k)===j){localStorage.removeItem(k);return localStorage}}},function(){if(sessionStorage){sessionStorage.setItem(k,j);if(sessionStorage.getItem(k)===j){sessionStorage.removeItem(k);return sessionStorage}}},function(){if(e.isIE){i.getElement().style.behavior="url('#default#userData')";return{autoExpires:b,setItem:function(l,n){var m=i.getElement();m.setAttribute(l,n);m.expires=h.getExpDate();try{m.save("TinyMCE")}catch(o){}},getItem:function(l){var m=i.getElement();try{m.load("TinyMCE");return m.getAttribute(l)}catch(n){return null}},removeItem:function(l){i.getElement().removeAttribute(l)}}}},],function(l){try{h.storage=l();if(h.storage){return false}}catch(m){}})},storeDraft:function(){var i=this,l=i.storage,j=i.editor,h,k;if(l){if(!l.getItem(i.key)&&!j.isDirty()){return}k=j.getContent({draft:true});if(k.length>j.settings.autosave_minlength){h=i.getExpDate();if(!i.storage.autoExpires){i.storage.setItem(i.key+"_expires",h)}i.storage.setItem(i.key,k);i.onStoreDraft.dispatch(i,{expires:h,content:k})}}},restoreDraft:function(){var h=this,i=h.storage;if(i){content=i.getItem(h.key);if(content){h.editor.setContent(content);h.onRestoreDraft.dispatch(h,{content:content})}}},hasDraft:function(){var h=this,k=h.storage,i,j;if(k){j=!!k.getItem(h.key);if(j){if(!h.storage.autoExpires){i=new Date(k.getItem(h.key+"_expires"));if(new Date().getTime()]*>|]*>/gi,"").length>0){i.windowManager.confirm(c+".warning_message",function(m){if(m){h.restoreDraft()}})}else{h.restoreDraft()}}});i.onNodeChange.add(function(){var m=i.controlManager;if(m.get(g)){m.setDisabled(g,!h.hasDraft())}});i.onInit.add(function(){if(i.controlManager.get(g)){h.setupStorage(i);setInterval(function(){h.storeDraft();i.nodeChanged()},l.autosave_interval)}});h.onStoreDraft=new a(h);h.onRestoreDraft=new a(h);h.onRemoveDraft=new a(h);if(!d){window.onbeforeunload=e.plugins.AutoSave._beforeUnloadHandler;d=b}},getInfo:function(){return{longname:"Auto save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave",version:e.majorVersion+"."+e.minorVersion}},getExpDate:function(){return new Date(new Date().getTime()+this.editor.settings.autosave_retention).toUTCString()},setupStorage:function(i){var h=this,k=c+"_test",j="OK";h.key=c+i.id;e.each([function(){if(localStorage){localStorage.setItem(k,j);if(localStorage.getItem(k)===j){localStorage.removeItem(k);return localStorage}}},function(){if(sessionStorage){sessionStorage.setItem(k,j);if(sessionStorage.getItem(k)===j){sessionStorage.removeItem(k);return sessionStorage}}},function(){if(e.isIE){i.getElement().style.behavior="url('#default#userData')";return{autoExpires:b,setItem:function(l,n){var m=i.getElement();m.setAttribute(l,n);m.expires=h.getExpDate();try{m.save("TinyMCE")}catch(o){}},getItem:function(l){var m=i.getElement();try{m.load("TinyMCE");return m.getAttribute(l)}catch(n){return null}},removeItem:function(l){i.getElement().removeAttribute(l)}}}},],function(l){try{h.storage=l();if(h.storage){return false}}catch(m){}})},storeDraft:function(){var i=this,l=i.storage,j=i.editor,h,k;if(l){if(!l.getItem(i.key)&&!j.isDirty()){return}k=j.getContent({draft:true});if(k.length>j.settings.autosave_minlength){h=i.getExpDate();if(!i.storage.autoExpires){i.storage.setItem(i.key+"_expires",h)}i.storage.setItem(i.key,k);i.onStoreDraft.dispatch(i,{expires:h,content:k})}}},restoreDraft:function(){var h=this,j=h.storage,i;if(j){i=j.getItem(h.key);if(i){h.editor.setContent(i);h.onRestoreDraft.dispatch(h,{content:i})}}},hasDraft:function(){var h=this,k=h.storage,i,j;if(k){j=!!k.getItem(h.key);if(j){if(!h.storage.autoExpires){i=new Date(k.getItem(h.key+"_expires"));if(new Date().getTime() zLM9f)qQm8C1c`;hGBJ_}h73g_p=1mM^9RXLyb^bpf>AvH6dpB#1`P%p2?GxRIXezw z7zGP+3jz%k3l2poa}fvt8yf%!5pp93KMDvH92^x0V-7i+EDszR8Bewx4-y8WehLpR z33wR8E)NQeD=m2M7#-8v+{*T!alCd#3 z1p^Ir4Fi-428xUrkd&O950`xk9-RXQ4F(zs0}qJ@2n?ee0ving0HzHddj}8`MGLmU z8UhImO%o-q#)2Cf00I^Q4_>?<5El-{nhOg84HOFw7eOBf7YG&%hkqFs2p3Q(*Aoat UP6!j@HP+?<{sHjFeFy;nJK@hu1^@s6 diff --git a/include/javascript/tiny_mce/plugins/emotions/img/smiley-laughing.gif b/include/javascript/tiny_mce/plugins/emotions/img/smiley-laughing.gif index 1606c119e75678c4031f384e0d50849906e8f533..82c5b182e61d32bd394acae551eff180f1eebd26 100644 GIT binary patch delta 269 zcmV+o0rLLX0@nf%M@dFFIbjk25&-lc0K%p+kq}gWQaug+`&s}103rDV1poja04x9i z000sI5&%F2)ZizIQ)!l?Xh>A$7VskoPwh#@I9<*GEDONFahaqh2L%Pf;kcR*isE3L zI2Im3A3bNpK_?^9QN%xH_GCzT(kPR|yLU7KDX_2pAAJa~A*# z2^9-;8v_d!2?_v3DRU7A5(5Jg2N7~31{ezo9uTY$9)TD+oGcI(4STm0Q4*wpwG|r; zF2ODk2{(g0w~m91nJ)p)P~b0v=TXuJkV0)pK%`hRH&5(aq`SQQ0|4*~)Y zj~;||h6NmskCzV%0uYjV3kVjWqM-;FoP`G(WCRQW7Z(8x1b=r16AlX=0u2`oB@7o0 z3LXm%B?eNu8w9Vj0v=tq9}^cH3JDbp8v_d!2?`w-K_3Pe2MZcXM;Z$U7f&hF4hJ0z U3mpdz;x*Id4FABSjR*k%I|lSgp8x;= diff --git a/include/javascript/tiny_mce/plugins/emotions/img/smiley-sealed.gif b/include/javascript/tiny_mce/plugins/emotions/img/smiley-sealed.gif index b33d3cca1e7b8e62dc689880074d5c61f619520d..fe66220c24b4da4526818a5d68f75a06d9985a29 100644 GIT binary patch delta 249 zcmVc6jM@dFFIbjk25&-lc0Klpjkq}gWQauaR#xDQ>03rDV1poja04x9i z000sI5&%F2z~Co}Q)!l?s2E!2QdA zP6EM+V$0o5egPxNVelL@nuEvS5Py&l$*VJWNgmaeBy#Fc3>i3Y6%ZGOhlmgrZX^W= z8v_Gi8wdrADnAk!5DyO!7!pA_ZyYQc4;~&as7@LN99jl)E**3kv`;r%EDsR|k-xtS zxe5rp69ipb1YdXxI|zjY71PuN7Z3uIlM@dFFIbjk25&+Z_08%{*kq}gWz^WJ3#xDQ>03rDV0RR9W04x9i z000sI5&!@N!r&*0Q)!lCN*2gA3>#8RD(M*Bp=pO_IJA@^(ve^wj|T)J=|mKx31Xqy zL>`%J1fp3WXcLY>lX-YN*)vvS;FJ&#NtObb*E5pGS7DH60e65|cm@i5WOEb=0u&Si zj}nDqhYt}3FPE1Kk%oN{C!Z4r8Io|G1cs;z1QS;X3KIcN6RD}J9RVd52oM(p6~Dj) z7Z3;+U=_R<%FD|T6+s^g3=I$w7#0>7TMZ0QDH9g~2t-Z@0md~SvlqY>7q2NH06S3N BNLv5^ diff --git a/include/javascript/tiny_mce/plugins/emotions/img/smiley-smile.gif b/include/javascript/tiny_mce/plugins/emotions/img/smiley-smile.gif index e6a9e60d5ddd1243fbbf2197b4dc6cd9c1b58b93..fd27edfaaa29a70a8c4563c0eab9f18c74d374fd 100644 GIT binary patch delta 270 zcmV+p0rCFX0@wl&M@dFFIbjk25&-lc0C`{zkq}gWCJF+oiUI%t03rDV1poja04x9i z000sI5&%F2)!-+JP-&K7%&eE7zha(Mk#X<1{oe683qw@BL@`@2pbbn6B`H)6*`?PtqlrLxC~PZrGN+% zE&vU~#TXL^jVmoMhlVv1IR^#>3>*Rg2{s7;0vrr}2N2W=TMrHb0uEwT<0=*g4h65Q U1r7!lv`7aQ0sjH?nF;{_JD=x5hyVZp delta 271 zcmV+q0r39V0@(r(M@dFFIbjk25&+Z?0453okq}gWd0-BziUI%t03rDV0RR9W04x9i z000sI5&!@N*5D_KP-&K9N=8QJd6^MGDoHFCB1y=#5VX{x;y`RB48~-Ga8wQ>h#?`F zTrSD$M3OMjAdy9t(NHAIO37j-Eo?9tg#s>zZwlT+1~Gwm8h(Hn69^dx2V!s-3=a<+ z0|Oj(k{b($iHwq&l93aYdI$^y9-5LK0}m612L=TU90DB)k_jCG91M5|5EKp@jU52N z03D4R4iqJ;3BC^w0s;=jUAi9-78(f%i;WBz2niY%K_3Se1`Y*FM+FWB7EmeH6b2d& V4jKj&;x*Of0sjHsjr$M+06RN6NSOct diff --git a/include/javascript/tiny_mce/plugins/emotions/img/smiley-surprised.gif b/include/javascript/tiny_mce/plugins/emotions/img/smiley-surprised.gif index cb99cdd9136fa30462a9f57aa6a0adeb7e4124e7..0cc9bb71cca4cdeafbb248ce7e07c3708c1cbd64 100644 GIT binary patch delta 264 zcmV+j0r&pa0@4ByM@dFFIbjk25&-lc0Q=+`kq}gWC=3F`xI_Q|03rDV1poja04x9i z000sI5&%F2&)_GDP-&KpRzaw7*n2_6C!6#^a!K{=W%7!?bX615c=6B?o`2^cO2 zcoM=c7zsElEfNF+&d-7v$p#C7H3(h^g0}_-5C=(GGudGrRNg8V1`i7u92^)64+a;o OM+X-H`T_N$Apkpuj7YZt delta 268 zcmV+n0rURS0@eZ$M@dFFIbjk25&+Z?04NLskq}gW`{WwLxI_Q|03rDV0RR9W04x9i z000sI5&!@N)8HqHP-&K9N=AmpFq#oTDp_dDHci{26|~f$@kn?Cm5RWVcr*?ph(R$C zG%6BFr6HIo3^YhYGr?3AiY&T{^|8V7w7SrQHo z1RaiZ6q6i?idh5$nwygp7?wp6oeuy28l4>&4~Yf~qLT=v2%Qpp2M`ty9FQFur2rir z1RM_*B?nWxk+Q-ZU$-9+7Yzyt5(*g^X$cAq7eOBf7X}Xt7#tiJ3l9btP$|+D21HH< S7T-0|;sN{t?%*Fn0028#VNAdP diff --git a/include/javascript/tiny_mce/plugins/emotions/img/smiley-wink.gif b/include/javascript/tiny_mce/plugins/emotions/img/smiley-wink.gif index 9faf1aff8f4b28e02f4f414975fe1859c43b6b54..0631c7616ec8624ddeee02b633326f697ee72f80 100644 GIT binary patch delta 276 zcmV+v0qg$X0^R};M@dFFIbjk25&-lc0MWuJkq}gWC=CMr@j3ti03rDV1poja04x9i z000sI5&%F2+u$dPQfZc>h%k}mS_`xd!)9v?GD=uwG!#n1P{Bx25L@HjmHz$20{ z93>Ts1_E((z8wcwL#Z4|1qR^|i5v)w!ugXVXaI_D!lF>PGz3-%90v;n3^s`y30029B7)0Cv delta 277 zcmV+w0qXwV0^b4"}i=f.getAll("title")[0];if(i&&i.firstChild){h.metatitle=i.firstChild.value}b(f.getAll("meta"),function(m){var k=m.attr("name"),j=m.attr("http-equiv"),l;if(k){h["meta"+k.toLowerCase()]=m.attr("content")}else{if(j=="Content-Type"){l=/charset\s*=\s*(.*)\s*/gi.exec(m.attr("content"));if(l){h.docencoding=l[1]}}}});i=f.getAll("html")[0];if(i){h.langcode=d(i,"lang")||d(i,"xml:lang")}i=f.getAll("link")[0];if(i&&i.attr("rel")=="stylesheet"){h.stylesheet=i.attr("href")}i=f.getAll("body")[0];if(i){h.langdir=d(i,"dir");h.style=d(i,"style");h.visited_color=d(i,"vlink");h.link_color=d(i,"link");h.active_color=d(i,"alink")}return h},_dataToHtml:function(g){var f,d,h,j,k,e=this.editor.dom;function c(n,l,m){n.attr(l,m?m:undefined)}function i(l){if(d.firstChild){d.insert(l,d.firstChild)}else{d.append(l)}}f=this._parseHeader();d=f.getAll("head")[0];if(!d){j=f.getAll("html")[0];d=new a("head",1);if(j.firstChild){j.insert(d,j.firstChild,true)}else{j.append(d)}}j=f.firstChild;if(g.xml_pi){k='version="1.0"';if(g.docencoding){k+=' encoding="'+g.docencoding+'"'}if(j.type!=7){j=new a("xml",7);f.insert(j,f.firstChild,true)}j.value=k}else{if(j&&j.type==7){j.remove()}}j=f.getAll("#doctype")[0];if(g.doctype){if(!j){j=new a("#doctype",10);if(g.xml_pi){f.insert(j,f.firstChild)}else{i(j)}}j.value=g.doctype.substring(9,g.doctype.length-1)}else{if(j){j.remove()}}j=f.getAll("title")[0];if(g.metatitle){if(!j){j=new a("title",1);j.append(new a("#text",3)).value=g.metatitle;i(j)}}if(g.docencoding){j=null;b(f.getAll("meta"),function(l){if(l.attr("http-equiv")=="Content-Type"){j=l}});if(!j){j=new a("meta",1);j.attr("http-equiv","Content-Type");j.shortEnded=true;i(j)}j.attr("content","text/html; charset="+g.docencoding)}b("keywords,description,author,copyright,robots".split(","),function(m){var l=f.getAll("meta"),n,p,o=g["meta"+m];for(n=0;n"))},_parseHeader:function(){return new tinymce.html.DomParser({validate:false,root_name:"#document"}).parse(this.head)},_setContent:function(g,d){var m=this,i,c,h=d.content,f,l="",e=m.editor.dom,j;function k(n){return n.replace(/<\/?[A-Z]+/g,function(o){return o.toLowerCase()})}if(d.format=="raw"&&m.head){return}if(d.source_view&&g.getParam("fullpage_hide_in_source_view")){return}h=h.replace(/<(\/?)BODY/gi,"<$1body");i=h.indexOf("",i);m.head=k(h.substring(0,i+1));c=h.indexOf("\n"}f=m._parseHeader();b(f.getAll("style"),function(n){if(n.firstChild){l+=n.firstChild.value}});j=f.getAll("body")[0];if(j){e.setAttribs(m.editor.getBody(),{style:j.attr("style")||"",dir:j.attr("dir")||"",vLink:j.attr("vlink")||"",link:j.attr("link")||"",aLink:j.attr("alink")||""})}if(l){e.add(m.editor.getDoc().getElementsByTagName("head")[0],"style",{id:"fullpage_styles"},l)}else{e.remove("fullpage_styles")}},_getDefaultHeader:function(){var f="",c=this.editor,e,d="";if(c.getParam("fullpage_default_xml_pi")){f+='\n'}f+=c.getParam("fullpage_default_doctype",'');f+="\n\n\n";if(e=c.getParam("fullpage_default_title")){f+=""+v+"\n"}if(e=c.getParam("fullpage_default_encoding")){f+='\n'}if(e=c.getParam("fullpage_default_font_family")){d+="font-family: "+e+";"}if(e=c.getParam("fullpage_default_font_size")){d+="font-size: "+e+";"}if(e=c.getParam("fullpage_default_text_color")){d+="color: "+e+";"}f+="\n\n";return f},_getContent:function(d,e){var c=this;if(!e.source_view||!d.getParam("fullpage_hide_in_source_view")){e.content=tinymce.trim(c.head)+"\n"+tinymce.trim(e.content)+"\n"+tinymce.trim(c.foot)}}});tinymce.PluginManager.add("fullpage",tinymce.plugins.FullPagePlugin)})(); \ No newline at end of file +(function(){var b=tinymce.each,a=tinymce.html.Node;tinymce.create("tinymce.plugins.FullPagePlugin",{init:function(c,d){var e=this;e.editor=c;c.addCommand("mceFullPageProperties",function(){c.windowManager.open({file:d+"/fullpage.htm",width:430+parseInt(c.getLang("fullpage.delta_width",0)),height:495+parseInt(c.getLang("fullpage.delta_height",0)),inline:1},{plugin_url:d,data:e._htmlToData()})});c.addButton("fullpage",{title:"fullpage.desc",cmd:"mceFullPageProperties"});c.onBeforeSetContent.add(e._setContent,e);c.onGetContent.add(e._getContent,e)},getInfo:function(){return{longname:"Fullpage",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_htmlToData:function(){var f=this._parseHeader(),h={},c,i,g,e=this.editor;function d(l,j){var k=l.attr(j);return k||""}h.fontface=e.getParam("fullpage_default_fontface","");h.fontsize=e.getParam("fullpage_default_fontsize","");i=f.firstChild;if(i.type==7){h.xml_pi=true;g=/encoding="([^"]+)"/.exec(i.value);if(g){h.docencoding=g[1]}}i=f.getAll("#doctype")[0];if(i){h.doctype=""}i=f.getAll("title")[0];if(i&&i.firstChild){h.metatitle=i.firstChild.value}b(f.getAll("meta"),function(m){var k=m.attr("name"),j=m.attr("http-equiv"),l;if(k){h["meta"+k.toLowerCase()]=m.attr("content")}else{if(j=="Content-Type"){l=/charset\s*=\s*(.*)\s*/gi.exec(m.attr("content"));if(l){h.docencoding=l[1]}}}});i=f.getAll("html")[0];if(i){h.langcode=d(i,"lang")||d(i,"xml:lang")}i=f.getAll("link")[0];if(i&&i.attr("rel")=="stylesheet"){h.stylesheet=i.attr("href")}i=f.getAll("body")[0];if(i){h.langdir=d(i,"dir");h.style=d(i,"style");h.visited_color=d(i,"vlink");h.link_color=d(i,"link");h.active_color=d(i,"alink")}return h},_dataToHtml:function(g){var f,d,h,j,k,e=this.editor.dom;function c(n,l,m){n.attr(l,m?m:undefined)}function i(l){if(d.firstChild){d.insert(l,d.firstChild)}else{d.append(l)}}f=this._parseHeader();d=f.getAll("head")[0];if(!d){j=f.getAll("html")[0];d=new a("head",1);if(j.firstChild){j.insert(d,j.firstChild,true)}else{j.append(d)}}j=f.firstChild;if(g.xml_pi){k='version="1.0"';if(g.docencoding){k+=' encoding="'+g.docencoding+'"'}if(j.type!=7){j=new a("xml",7);f.insert(j,f.firstChild,true)}j.value=k}else{if(j&&j.type==7){j.remove()}}j=f.getAll("#doctype")[0];if(g.doctype){if(!j){j=new a("#doctype",10);if(g.xml_pi){f.insert(j,f.firstChild)}else{i(j)}}j.value=g.doctype.substring(9,g.doctype.length-1)}else{if(j){j.remove()}}j=f.getAll("title")[0];if(g.metatitle){if(!j){j=new a("title",1);j.append(new a("#text",3)).value=g.metatitle;i(j)}}if(g.docencoding){j=null;b(f.getAll("meta"),function(l){if(l.attr("http-equiv")=="Content-Type"){j=l}});if(!j){j=new a("meta",1);j.attr("http-equiv","Content-Type");j.shortEnded=true;i(j)}j.attr("content","text/html; charset="+g.docencoding)}b("keywords,description,author,copyright,robots".split(","),function(m){var l=f.getAll("meta"),n,p,o=g["meta"+m];for(n=0;n"))},_parseHeader:function(){return new tinymce.html.DomParser({validate:false,root_name:"#document"}).parse(this.head)},_setContent:function(g,d){var m=this,i,c,h=d.content,f,l="",e=m.editor.dom,j;function k(n){return n.replace(/<\/?[A-Z]+/g,function(o){return o.toLowerCase()})}if(d.format=="raw"&&m.head){return}if(d.source_view&&g.getParam("fullpage_hide_in_source_view")){return}h=h.replace(/<(\/?)BODY/gi,"<$1body");i=h.indexOf("",i);m.head=k(h.substring(0,i+1));c=h.indexOf("\n"}f=m._parseHeader();b(f.getAll("style"),function(n){if(n.firstChild){l+=n.firstChild.value}});j=f.getAll("body")[0];if(j){e.setAttribs(m.editor.getBody(),{style:j.attr("style")||"",dir:j.attr("dir")||"",vLink:j.attr("vlink")||"",link:j.attr("link")||"",aLink:j.attr("alink")||""})}if(l){e.add(m.editor.getDoc().getElementsByTagName("head")[0],"style",{id:"fullpage_styles"},l)}else{e.remove("fullpage_styles")}},_getDefaultHeader:function(){var f="",c=this.editor,e,d="";if(c.getParam("fullpage_default_xml_pi")){f+='\n'}f+=c.getParam("fullpage_default_doctype",'');f+="\n\n\n";if(e=c.getParam("fullpage_default_title")){f+=""+e+"\n"}if(e=c.getParam("fullpage_default_encoding")){f+='\n'}if(e=c.getParam("fullpage_default_font_family")){d+="font-family: "+e+";"}if(e=c.getParam("fullpage_default_font_size")){d+="font-size: "+e+";"}if(e=c.getParam("fullpage_default_text_color")){d+="color: "+e+";"}f+="\n\n";return f},_getContent:function(d,e){var c=this;if(!e.source_view||!d.getParam("fullpage_hide_in_source_view")){e.content=tinymce.trim(c.head)+"\n"+tinymce.trim(e.content)+"\n"+tinymce.trim(c.foot)}}});tinymce.PluginManager.add("fullpage",tinymce.plugins.FullPagePlugin)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/fullpage/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/fullpage/editor_plugin_src.js index 4f2b5e07..ac6bec40 100644 --- a/include/javascript/tiny_mce/plugins/fullpage/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/fullpage/editor_plugin_src.js @@ -367,7 +367,7 @@ header += '\n\n\n'; if (value = editor.getParam('fullpage_default_title')) - header += '' + v + '\n'; + header += '' + value + '\n'; if (value = editor.getParam('fullpage_default_encoding')) header += '\n'; diff --git a/include/javascript/tiny_mce/plugins/inlinepopups/editor_plugin.js b/include/javascript/tiny_mce/plugins/inlinepopups/editor_plugin.js index ef648174..8bb96f9c 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 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 +(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=="mceClose"){z.close(null,i);return a.cancel(t)}else{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 28b151d5..2a6f3ad2 100644 --- a/include/javascript/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/inlinepopups/editor_plugin_src.js @@ -219,7 +219,10 @@ t.focus(id); if (n.nodeName == 'A' || n.nodeName == 'a') { - if (n.className == 'mceMax') { + if (n.className == 'mceClose') { + t.close(null, id); + return Event.cancel(e); + } else if (n.className == 'mceMax') { w.oldPos = w.element.getXY(); w.oldSize = w.element.getSize(); diff --git a/include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif b/include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif index 94abd08763fffdaa0dd5c5afb470a97294f2b94d..219139857ead162c6c83fa92e4a36eb978359b70 100644 GIT binary patch delta 483 zcmV<90UZ9a2C4=SM@dFFH(?+EAOQAz0RR90kq}6cTdtD~0VfRAd3n>x$I{c$;Cy_O zMFB#8*4Nd&cXj{(0000000000001li0000W03ZMW2mgS2f`f#GhKGoWii?bmj)i*y z0vL~sYcX*aF)x*hasf6YZZK1whj$Vv93Ch|d!~g4Fcc~@G&~jpIe9R>sgxMT^y0(oi_Ifh7o z$E;fb0W@inbw`OH0<0jyAcaV_tY`tu;Q-}9nL~DuW|c$BfB{+;EgA@rVMxoncy#S% z&Cx=|gM5Uj%<`AEF#ro5b_h^H$lZ~%j?uQsqv1gcLINnz$V0lc>C>q5v`E0^fS@#T z44@D}8^s49D{>FmJ;a6Y1;88FsF46Nj*$$nAsE5Kyt(t|(3=~9AZE~+89$yR+0MPY Z_wPSuAdlq)iTU&B)2Bz{8kwU&06THt!_oi% delta 493 zcmVs zdDF?q($mr4e0LVy4N|JK*lA^8LV00000EC2ui03ZM$000O7fPaF6goTEO zh>41ejE#5-A-YDMkRMg$FSdD>XGe76Lo4 zg8*}CVz9!&q4^fSEeWx z3mqrteiI)z3O}7!1ZFM~^UvhC$m3&6r5{p|xR~&a1BY`aq9_oN!_g8EBR)7d=kVNx z4@3xXYNR4S6a@1+o(r;~1t~^uBn;^=CgsC(VY-QUwdhkVfGW@R*w8|kA}t;U1Ov!~ z3BUq9**peWhSy}S4CKxiP3^(2Y;^XSv3XX6@~qd)*V9ZJ+K diff --git a/include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif b/include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif index e671094cb0eb210b756117f992cf5ca2caa698fd..f957e49a3dda34867982d54bdbbf46e5b6c11298 100644 GIT binary patch delta 106 zcmbQiG=a&&-P6s&JTZVlj^Q&0!?hdNl9Q9KUBCM1@x%M~?>&9?l!1Za|NsA|PM-iW zP{2e78OFkiu~LjS6Dzc27~lQaQ+NLT@Ba<;9A%BIZS5UZ%}SlUef{O#>=XAz0RSuG BEY|=4 delta 136 zcmbQhG=s^(-P6s&GBJQbj$tzc!>Q9Jl9Q9KUBCM1@x%M~?>&9?l!1Za+Kp@f|NjRv zFoEJvmWdWJGL1bcne#GMt$UN@ldE&S#OrFsy6NBF{a+(j;Ndc{KubpU-H$zW=imSS b-%!s`*4WzC-ci-8)Y;qDU*63zaa$As?VUSS diff --git a/include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif b/include/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif index 497307a85ad32e00b67c5f27d6f3b46ac566d89b..20acbbf7aec8a3fccbffbbb894f973241a045732 100644 GIT binary patch delta 642 zcmV-|0)73H2a5*~M@dFFH(?+EAOQAx0QZ$Qkq~N*PzU?Pk@%)n^?L;Pn>YKbIh9Zd`n!L)xwovX ztM+^Z^?3l+*VWI-zyJUM0000000000000000000i00000AOIi$00;koc!Gn3cnt*( zPXZtUPYwkQg_4taT@C^fNLwRjBU?xj0)Gx&l$1#VUuGE{0IjYW2VVk75T%0+1Q8<= zO0K@HMI#Xek);g`Mh92F%&$fa#ghcdz0KAc8w9nIO}f?A*AY#Uc?QbO3RLO});$J! zg;5v0=nMAj%^ep}gir!z-+rO6w*Un=4+5YJDiFZ~I2Q!xfRmu3z#s=|ihz4T@P7rk z8fqL2dQzeWxHAO7d@S)~(7%AcBoOTIgT{{l%wz~~3GgF98+U>RrJ>>#8<#y`y85vq zh&`cD-~4E$b0i0oz5)OZnqWbKs8MNfXer3S2RN;?+KJl1O$V@1@X3f2R6s)uxKOv^ zy_2KjEddBl>{YO!%-%ag5)z6sAb-bRrwdl#CGvqEp>l!o&Y{v~?~r%gbYwmZ7lw{; z(gqB9Lpo}U0oo`XQ%#|D&>;h$*$P8IgNPYx_vR3xfdB?8QzltS!KK0xHmX|?F(G*9 z3fB!u|!i5$l=*5EEt?`|5`|%KA3=`I|!-*TFfrWil caN(dW5Jx3B|_5`I#m9xO)1s zZqn1yk)5A^_nANZ*R%V$UiqnAsh^Usu&>>ZG1Ju2$H>N*PzU?Pk@%)n^?L;Pn>VPb zr~9ipl~4%!yMO=v{J6QdtgWl|d<6A*0QZ$Q*4Nb``2+v}0000i00000AOIi$00;ko ze}aRAe+>l=Q34AJM0 zj(~%IK@bMG8*Lm6ic;bRI5h;td@K=V(7%AcBoOQn#72++%xDO33GgF99DRZYwXxzA z9G5>}x(dQ#h&`cD=LBh`b0i0oz5)OZnqWbKs8MZjXer3S2Rf~^@`>6(P6x12@Xd%6 zR6v6ZxKOv^?X#oeEddBl>{YM;&E7sm5)zt!GGNDErwdr%HS&QUp>l!o;;|BEZ;^N0 zcw{~dR|b!9(gqZnLprL90oo`XQ%#|D&>{n%*&0JYgNPby_wEp(fdB?9RVHCc;iW*ta2oRR?veB0W1r;3$_w50S3D)tB#Pdj*CeJG$qZ-LnP77B{YT6Btwd< z#;=znBS?`i2;>L>E(Ylaf8_`-!0IlvO*Dr8)3al5#Ygvn->D` zz`zp&&I=C$^u)jeCOt_5k_K=vq3MJGGZaWw;BG=+TFV(;f=gh`>4mY7agNw2ok-ts}pE3*3Of8$y5}8G>i% z4dF%s;TeM1MsgH~e}m^&cTkv40lEVm0jN{hvHa+`a_7{oE9XvpJdH;I8|lElLx37n z6}0bQ1gq2<%kBNJz~2I{T?_PQ!4JR)lV2h+fS@1;Wk^u&PA^8LW z002ni_};J|6KN1vU}(5%L~B1@{p)0n=3V5>hL8|$6fl_~2u5G5ssR9kq=C%_ z0di>Aso`b=BtUp-$ni2=FPQ;wI9Tc+zzzyfDKK?_BS2INJBn%qfb_wCg|8O^@W4P8 z1K0}>0+hwTLn~4O1MK1kc!8iUf&eZI=rv#$!HWQU4Y+U{vy@@FcJT)8`#135fHD^a zFw&uNhX6GcXjWjkgAu@+YY^@w*};U<69UZGtN`_drUo|880|>%4-2?01YohC_k!FO zegO8(f;IrjF(fFLu-o^4g5?ro4DVeWGAraDvV#bqB82x4+CfM+@Lh#*$qhcJ|G-^@ zdlBnD;56{wymiuvS{&GaAV7}<04BiS0WAa&U;;gym*0Q^5OLsu1s+I*f`bGg0|OW` x5P%RIbjU%549F0Gha3nIKwNRDf}&&>G5`Y%h8gxEh9bsTN0}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 +(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(A,y){var w=0;var t=1;var H=2;var J=3;var z=J;function C(M){return M.keyCode===9&&(A.queryCommandState("InsertUnorderedList")||A.queryCommandState("InsertOrderedList"))}function x(){var M=B();var O=M.parentNode.parentNode;var N=M.parentNode.lastChild===M;return N&&!u(O)&&K(M)}function u(M){if(n(M)){return M.parentNode&&M.parentNode.tagName==="LI"}else{return M.tagName==="LI"}}function D(){return A.selection.isCollapsed()&&K(B())}function B(){var M=A.selection.getStart();return((M.tagName=="BR"||M.tagName=="")&&M.parentNode.tagName=="LI")?M.parentNode:M}function K(M){var N=M.childNodes.length;if(M.tagName==="LI"){return N==0?true:N==1&&(M.firstChild.tagName==""||F(M)||G(M))}return false}function F(M){return tinymce.isWebKit&&M.firstChild.nodeName=="BR"}function G(M){var N=tinymce.grep(M.parentNode.childNodes,function(Q){return Q.nodeName=="LI"});var O=M==N[N.length-1];var P=M.firstChild;return tinymce.isIE9&&O&&(P.nodeValue==String.fromCharCode(160)||P.nodeValue==String.fromCharCode(32))}function L(M){return M.keyCode===13}function I(M){if(C(M)){return w}else{if(L(M)&&x()){return H}else{if(L(M)&&D()){return t}else{return J}}}}function s(M,N){if(z==w||z==t){return r.cancel(N)}}function v(P,R){var U;if(!tinymce.isGecko){return}var N=P.selection.getStart();if(R.keyCode!=8||N.tagName!=="IMG"){return}function O(Y){var Z=Y.firstChild;var X=null;do{if(!Z){break}if(Z.tagName==="LI"){X=Z}}while(Z=Z.nextSibling);return X}function W(Y,X){while(Y.childNodes.length>0){X.appendChild(Y.childNodes[0])}}U=N.parentNode.previousSibling;if(!U){return}var S;if(U.tagName==="UL"||U.tagName==="OL"){S=U}else{if(U.previousSibling&&(U.previousSibling.tagName==="UL"||U.previousSibling.tagName==="OL")){S=U.previousSibling}else{return}}var V=O(S);var M=P.dom.createRng();M.setStart(V,1);M.setEnd(V,1);P.selection.setRng(M);P.selection.collapse(true);var Q=P.selection.getBookmark();var T=N.parentNode.cloneNode(true);if(T.tagName==="P"||T.tagName==="DIV"){W(T,V)}else{V.appendChild(T)}N.parentNode.parentNode.removeChild(N.parentNode);P.selection.moveToBookmark(Q)}function E(M){var N=A.dom.getParent(M,"ol,ul");if(N!=null){var O=N.lastChild;O.appendChild(A.getDoc().createElement(""));A.selection.setCursorLocation(O,0)}}this.ed=A;A.addCommand("Indent",this.indent,this);A.addCommand("Outdent",this.outdent,this);A.addCommand("InsertUnorderedList",function(){this.applyList("UL","OL")},this);A.addCommand("InsertOrderedList",function(){this.applyList("OL","UL")},this);A.onInit.add(function(){A.editorCommands.addCommands({outdent:function(){var N=A.selection,O=A.dom;function M(P){P=O.getParent(P,O.isBlock);return P&&(parseInt(A.dom.getStyle(P,"margin-left")||0,10)+parseInt(A.dom.getStyle(P,"padding-left")||0,10))>0}return M(N.getStart())||M(N.getEnd())||A.queryCommandState("InsertOrderedList")||A.queryCommandState("InsertUnorderedList")}},"state")});A.onKeyUp.add(function(N,O){if(z==w){N.execCommand(O.shiftKey?"Outdent":"Indent",true,null);return r.cancel(O)}else{if(z==t){var M=B();var Q=N.settings.list_outdent_on_enter===true||O.shiftKey;N.execCommand(Q?"Outdent":"Indent",true,null);if(tinymce.isIE){E(M)}return r.cancel(O)}else{if(z==H){if(tinymce.isIE8){var P=N.getDoc().createTextNode("\uFEFF");N.selection.getNode().appendChild(P)}else{if(tinymce.isIE9){N.execCommand("Outdent");return r.cancel(O)}}}}}});A.onKeyDown.add(function(M,N){z=I(N)});A.onKeyDown.add(s);A.onKeyDown.add(v);A.onKeyPress.add(s)},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 index b7ca762c..272aa416 100644 --- a/include/javascript/tiny_mce/plugins/lists/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/lists/editor_plugin_src.js @@ -18,25 +18,29 @@ } return e; } - + function skipWhitespaceNodesBackwards(e) { - return skipWhitespaceNodes(e, function(e) { return e.previousSibling; }); + return skipWhitespaceNodes(e, function(e) { + return e.previousSibling; + }); } - + function skipWhitespaceNodesForwards(e) { - return skipWhitespaceNodes(e, function(e) { return e.nextSibling; }); + 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); @@ -54,12 +58,12 @@ } 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) { @@ -68,7 +72,7 @@ return e; } } - + function attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs) { var next = skipWhitespaceNodesForwards(e.nextSibling); if (next) { @@ -77,7 +81,7 @@ return e; } } - + function attemptMerge(e1, e2, differentStylesMasterElement, mergeParagraphs) { if (canMerge(e1, e2, !!differentStylesMasterElement, mergeParagraphs)) { return merge(e1, e2, differentStylesMasterElement); @@ -87,7 +91,7 @@ } return e2; } - + function canMerge(e1, e2, allowDifferentListStyles, mergeParagraphs) { if (!e1 || !e2) { return false; @@ -101,17 +105,17 @@ 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)); + 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') { @@ -127,7 +131,7 @@ attemptMerge(lastOriginal, firstNew, false); return e1; } - + function findItemToOperateOn(e, dom) { var item; if (!dom.is(e, 'li,ol,ul')) { @@ -138,27 +142,165 @@ } return e; } - + tinymce.create('tinymce.plugins.Lists', { init: function(ed, url) { - var enterDownInEmptyList = false; - function isTriggerKey(e) { + var LIST_TABBING = 0; + var LIST_EMPTY_ITEM = 1; + var LIST_ESCAPE = 2; + var LIST_UNKNOWN = 3; + var state = LIST_UNKNOWN; + + function isTabInList(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 isOnLastListItem() { + var li = getLi(); + var grandParent = li.parentNode.parentNode; + var isLastItem = li.parentNode.lastChild === li; + return isLastItem && !isNestedList(grandParent) && isEmptyListItem(li); + } + + function isNestedList(grandParent) { + if (isList(grandParent)) { + return grandParent.parentNode && grandParent.parentNode.tagName === 'LI'; + } else { + return grandParent.tagName === 'LI'; + } + } + + function isInEmptyListItem() { + return ed.selection.isCollapsed() && isEmptyListItem(getLi()); + } + + function getLi() { + var n = ed.selection.getStart(); + // Get start will return BR if the LI only contains a BR or an empty element as we use these to fix caret position + return ((n.tagName == 'BR' || n.tagName == '') && n.parentNode.tagName == 'LI') ? n.parentNode : n; + } + + function isEmptyListItem(li) { + var numChildren = li.childNodes.length; + if (li.tagName === 'LI') { + return numChildren == 0 ? true : numChildren == 1 && (li.firstChild.tagName == '' || isEmptyWebKitLi(li) || isEmptyIE9Li(li)); + } + return false; + } + + function isEmptyWebKitLi(li) { + // Check for empty LI or a LI with just a child that is a BR since Gecko and WebKit uses BR elements to place the caret + return tinymce.isWebKit && li.firstChild.nodeName == 'BR'; + } + + function isEmptyIE9Li(li) { + // only consider this to be last item if there is no list item content or that content is nbsp or space since IE9 creates these + var lis = tinymce.grep(li.parentNode.childNodes, function(n) {return n.nodeName == 'LI'}); + var isLastLi = li == lis[lis.length - 1]; + var child = li.firstChild; + return tinymce.isIE9 && isLastLi && (child.nodeValue == String.fromCharCode(160) || child.nodeValue == String.fromCharCode(32)); + } + + function isEnter(e) { + return e.keyCode === 13; + } + + function getListKeyState(e) { + if (isTabInList(e)) { + return LIST_TABBING; + } else if (isEnter(e) && isOnLastListItem()) { + return LIST_ESCAPE; + } else if (isEnter(e) && isInEmptyListItem()) { + return LIST_EMPTY_ITEM; + } else { + return LIST_UNKNOWN; } } - function cancelKeys(ed, e) { - if (isTriggerKey(e) || isEnterInEmptyListItem(ed, e)) { + + function cancelEnterAndTab(_, e) { + if (state == LIST_TABBING || state == LIST_EMPTY_ITEM) { return Event.cancel(e); } } - + + function imageJoiningListItem(ed, e) { + var prevSibling; + + if (!tinymce.isGecko) + return; + + var n = ed.selection.getStart(); + if (e.keyCode != 8 || n.tagName !== 'IMG') + return; + + function lastLI(node) { + var child = node.firstChild; + var li = null; + do { + if (!child) + break; + + if (child.tagName === 'LI') + li = child; + } while (child = child.nextSibling); + + return li; + } + + function addChildren(parentNode, destination) { + while (parentNode.childNodes.length > 0) + destination.appendChild(parentNode.childNodes[0]); + } + + // Check if there is a previous sibling + prevSibling = n.parentNode.previousSibling; + if (!prevSibling) + return; + + var ul; + if (prevSibling.tagName === 'UL' || prevSibling.tagName === 'OL') + ul = prevSibling; + else if (prevSibling.previousSibling && (prevSibling.previousSibling.tagName === 'UL' || prevSibling.previousSibling.tagName === 'OL')) + ul = prevSibling.previousSibling; + else + return; + + var li = lastLI(ul); + + // move the caret to the end of the list item + var rng = ed.dom.createRng(); + rng.setStart(li, 1); + rng.setEnd(li, 1); + ed.selection.setRng(rng); + ed.selection.collapse(true); + + // save a bookmark at the end of the list item + var bookmark = ed.selection.getBookmark(); + + // copy the image an its text to the list item + var clone = n.parentNode.cloneNode(true); + if (clone.tagName === 'P' || clone.tagName === 'DIV') + addChildren(clone, li); + else + li.appendChild(clone); + + // remove the old copy of the image + n.parentNode.parentNode.removeChild(n.parentNode); + + // move the caret where we saved the bookmark + ed.selection.moveToBookmark(bookmark); + } + + // fix the cursor position to ensure it is correct in IE + function setCursorPositionToOriginalLi(li) { + var list = ed.dom.getParent(li, 'ol,ul'); + if (list != null) { + var lastLi = list.lastChild; + lastLi.appendChild(ed.getDoc().createElement('')); + ed.selection.setCursorLocation(lastLi, 0); + } + } + this.ed = ed; ed.addCommand('Indent', this.indent, this); ed.addCommand('Outdent', this.outdent, this); @@ -168,71 +310,74 @@ 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)) { + if (state == LIST_TABBING) { 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); - } + } else if (state == LIST_EMPTY_ITEM) { + var li = getLi(); + var shouldOutdent = ed.settings.list_outdent_on_enter === true || e.shiftKey; + ed.execCommand(shouldOutdent ? 'Outdent' : 'Indent', true, null); + if (tinymce.isIE) { + setCursorPositionToOriginalLi(li); } return Event.cancel(e); + } else if (state == LIST_ESCAPE) { + if (tinymce.isIE8) { + // append a zero sized nbsp so that caret is positioned correctly in IE8 after escaping and applying formatting. + // if there is no text then applying formatting for e.g a H1 to the P tag immediately following list after + // escaping from it will cause the caret to be positioned on the last li instead of staying the in P tag. + var n = ed.getDoc().createTextNode('\uFEFF'); + ed.selection.getNode().appendChild(n); + } else if (tinymce.isIE9) { + // IE9 does not escape the list so we use outdent to do this and cancel the default behaviour + ed.execCommand('Outdent'); + return Event.cancel(e); + } } }); - ed.onKeyPress.add(cancelKeys); - ed.onKeyDown.add(cancelKeys); + ed.onKeyDown.add(function(_, e) { state = getListKeyState(e); }); + ed.onKeyDown.add(cancelEnterAndTab); + ed.onKeyDown.add(imageJoiningListItem); + ed.onKeyPress.add(cancelEnterAndTab); }, - + 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(); - + 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') { @@ -260,7 +405,7 @@ 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()) { @@ -287,10 +432,11 @@ } 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'; + 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; @@ -304,12 +450,14 @@ 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. @@ -344,7 +492,7 @@ callback(startSection, undefined, previousBR); } } - + function wrapList(element) { processBrs(element, function(startSection, br, previousBR) { // Need to indent this part @@ -353,7 +501,7 @@ cleanupBr(previousBR); }); } - + function changeList(element) { if (tinymce.inArray(applied, element) !== -1) { return; @@ -365,7 +513,7 @@ } applied.push(element); } - + function convertListItemToParagraph(element) { var child, nextChild, mergedElement, splitLast; if (tinymce.inArray(applied, element) !== -1) { @@ -387,7 +535,7 @@ if (dom.isBlock(child)) { child = dom.split(child.parentNode, child); splitLast = true; - nextChild = child.nextSibling && child.nextSibling.firstChild; + nextChild = child.nextSibling && child.nextSibling.firstChild; } else { nextChild = child.nextSibling; if (splitLast && child.tagName === 'BR') { @@ -399,7 +547,7 @@ } } } - + each(selectedBlocks, function(e) { e = findItemToOperateOn(e, dom); if (e.tagName === oppositeListType || (e.tagName === 'LI' && e.parentNode.tagName === oppositeListType)) { @@ -432,23 +580,23 @@ } 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; + 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 + ';'; } @@ -456,7 +604,7 @@ wrapItem.appendChild(wrapList); return wrapList; } - + function indentLI(element) { if (!hasParentInList(ed, element, indented)) { element = splitNestedLists(element, dom); @@ -467,17 +615,17 @@ 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)) { @@ -506,17 +654,18 @@ 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) { @@ -529,13 +678,16 @@ } 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() ]; @@ -560,7 +712,7 @@ // 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))) { @@ -569,7 +721,7 @@ each(elements, f); } }, - + classBasedEach: function(elements, f) { var dom = this.ed.dom, nodes, element; // Mark nodes @@ -584,7 +736,7 @@ nodes = dom.select('._mce_act_on'); } }, - + adjustPaddingFunction: function(isIndent) { var indentAmount, indentUnits, ed = this.ed; indentAmount = ed.settings.indentation; @@ -602,7 +754,7 @@ ed.dom.setStyle(element, 'margin-left', newIndentAmount > 0 ? newIndentAmount + indentUnits : ''); }; }, - + getInfo: function() { return { longname : 'Lists', diff --git a/include/javascript/tiny_mce/plugins/media/editor_plugin.js b/include/javascript/tiny_mce/plugins/media/editor_plugin.js index 66219078..f89959e2 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 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;y0){M+=(M?"&":"")+N+"="+escape(O)}});if(M.length){E.params.flashvars=M}J=o.getParam("flash_video_player_params",{allowfullscreen:true,allowscriptaccess:true});tinymce.each(J,function(O,N){E.params[N]=""+O})}}E=x.attr("data-mce-json");if(!E){return}E=g.parse(E);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 H=x.attr(i);if(i=="class"&&H){H=H.replace(/mceItem.+ ?/g,"")}if(H&&H.length>0){v.attr(i,H)}});for(G in E.params){v.attr(G,E.params[G])}v.attr({style:z,src:E.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(E.params,{width:x.attr("width"),height:x.attr("height")}))+");";v.append(w);x.replace(v);return}if(p.name==="Video"&&E.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},E.video.attrs));if(E.video.attrs){l=E.video.attrs.poster}k=E.video.sources=c(E.video.sources);for(y=0;y + + + + + + @@ -175,8 +187,80 @@ + + + + + +
- - + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + +
+ {#media_dlg.html5_audio_options} + + + + + + + + + + + + + + + + +
+ + + + + +
 
+
+ + + + + +
 
+
+ +
+ + + + @@ -184,8 +268,8 @@ @@ -193,8 +277,8 @@ @@ -202,6 +286,7 @@
+ + + +
- - + +
- - + +
+
{#media_dlg.flash_options} diff --git a/include/javascript/tiny_mce/plugins/noneditable/editor_plugin.js b/include/javascript/tiny_mce/plugins/noneditable/editor_plugin.js index cc7de784..2d60138e 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 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 +(function(){var a=tinymce.dom.Event;tinymce.create("tinymce.plugins.NonEditablePlugin",{init:function(d,e){var f=this,c,b,g;f.editor=d;c=d.getParam("noneditable_editable_class","mceEditable");b=d.getParam("noneditable_noneditable_class","mceNonEditable");d.onNodeChange.addToTop(function(i,h,l){var k,j;k=i.dom.getParent(i.selection.getStart(),function(m){return i.dom.hasClass(m,b)});j=i.dom.getParent(i.selection.getEnd(),function(m){return i.dom.hasClass(m,b)});if(k||j){g=1;f._setDisabled(1);return false}else{if(g==1){f._setDisabled(0);g=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 d6d1d91b..47b8a3be 100644 --- a/include/javascript/tiny_mce/plugins/noneditable/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/noneditable/editor_plugin_src.js @@ -13,7 +13,7 @@ tinymce.create('tinymce.plugins.NonEditablePlugin', { init : function(ed, url) { - var t = this, editClass, nonEditClass; + var t = this, editClass, nonEditClass, state; t.editor = ed; editClass = ed.getParam("noneditable_editable_class", "mceEditable"); @@ -33,10 +33,13 @@ // Block or unblock if (sc || ec) { + state = 1; t._setDisabled(1); return false; - } else + } else if (state == 1) { t._setDisabled(0); + state = 0; + } }); }, diff --git a/include/javascript/tiny_mce/plugins/paste/editor_plugin.js b/include/javascript/tiny_mce/plugins/paste/editor_plugin.js index 6c65069f..9ebc2b2b 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 c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"p",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(m,k){var l=d.dom,i,j;f.onPreProcess.dispatch(f,m);m.node=l.create("div",0,m.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){j=l.select("p,h1,h2,h3,h4,h5,h6,pre",m.node);if(j.length==1&&m.content.indexOf("__MCE_ITEM__")===-1){l.remove(j.reverse(),true)}}}f.onPostProcess.dispatch(f,m);m.content=d.serializer.serialize(m.node,{getInner:1});if((!k)&&(d.pasteAsPlainText)){f._insertPlainText(d,l,m.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(m.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:r.replace(/\r?\n/g,"
")});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")});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(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,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\r?\n/g,"

").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"]]);d([[/

/g,"

"],[/
/g," "],[/

/g,"
"],])}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') + ''; + // Found WebKit weirdness so force the content into paragraphs this seems to happen when you paste plain text from Nodepad etc + // So this logic will replace double enter with paragraphs and single enter with br so it kind of looks the same + h = '

' + dom.encode(textContent).replace(/\r?\n\r?\n/g, '

').replace(/\r?\n/g, '
') + '

'; } // Remove the nodes @@ -359,9 +359,18 @@ } // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser - if (tinymce.isIE && document.documentMode >= 9) + if (tinymce.isIE && document.documentMode >= 9) { + // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser 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']]); + // IE9 also adds an extra BR element for each soft-linefeed and it also adds a BR for each word wrap break + process([ + [/

/g, '

'], // Replace multiple BR elements with uppercase BR to keep them intact + [/
/g, ' '], // Replace single br elements with space since they are word wrap BR:s + [/

/g, '
'], // Replace back the double brs but into a single BR + ]); + } + // 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 diff --git a/include/javascript/tiny_mce/plugins/spellchecker/editor_plugin.js b/include/javascript/tiny_mce/plugins/spellchecker/editor_plugin.js index 90cde6a5..0c42739c 100644 --- a/include/javascript/tiny_mce/plugins/spellchecker/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/spellchecker/editor_plugin.js @@ -1 +1 @@ -(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url","{backend}");if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});if(e.settings.content_css!==false){e.contentCSS.push(f+"/css/content.css")}e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){if(n==f.selectedLang){return}l.setSelected(1);f.selectedItem.setSelected(0);f.selectedItem=l;f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);if(n==f.selectedLang){f.selectedItem=l}})});return g}},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');for(d=0;d$2");while((s=p.indexOf(""))!=-1){o=p.substring(0,s);if(o.length){r=j.createTextNode(f.decode(o));q.appendChild(r)}p=p.substring(s+10);s=p.indexOf("");o=p.substring(0,s);p=p.substring(s+11);q.appendChild(f.create("span",{"class":"mceItemHiddenSpellWord"},o))}if(p.length){r=j.createTextNode(f.decode(p));q.appendChild(r)}}else{q.innerHTML=p.replace(e,'$1$2')}f.replace(q,t)}});h.moveToBookmark(i)},_showMenu:function(h,j){var i=this,h=i.editor,d=i._menu,l,k=h.dom,g=k.getViewPort(h.getWin()),f=j.target;j=0;if(!d){d=h.controlManager.createDropMenu("spellcheckermenu",{"class":"mceNoIcons"});i._menu=d}if(k.hasClass(f,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);i._sendRPC("getSuggestions",[i.selectedLang,k.decode(f.innerHTML)],function(m){var e;d.removeAll();if(m.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(m,function(n){d.add({title:n,onclick:function(){k.replace(h.getDoc().createTextNode(n),f);i._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}e=i.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var n=f.innerHTML;i._removeWords(k.decode(n));i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWords",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});if(i.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();h.setProgressState(1);i._sendRPC("learnWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}})}d.update()});l=k.getPos(h.getContentAreaContainer());d.settings.offset_x=l.x;d.settings.offset_y=l.y;h.selection.select(f);l=k.getPos(f);d.showMenu(l.x,l.y+f.offsetHeight-g.y);return tinymce.dom.Event.cancel(j)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})(); \ No newline at end of file +(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url","{backend}");if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});if(e.settings.content_css!==false){e.contentCSS.push(f+"/css/content.css")}e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){if(n==f.selectedLang){return}l.setSelected(1);f.selectedItem.setSelected(0);f.selectedItem=l;f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);if(n==f.selectedLang){f.selectedItem=l}})});return g}},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');for(d=0;d$2");while((s=p.indexOf(""))!=-1){o=p.substring(0,s);if(o.length){r=j.createTextNode(f.decode(o));q.appendChild(r)}p=p.substring(s+10);s=p.indexOf("");o=p.substring(0,s);p=p.substring(s+11);q.appendChild(f.create("span",{"class":"mceItemHiddenSpellWord"},o))}if(p.length){r=j.createTextNode(f.decode(p));q.appendChild(r)}}else{q.innerHTML=p.replace(e,'$1$2')}f.replace(q,t)}});h.moveToBookmark(i)},_showMenu:function(h,j){var i=this,h=i.editor,d=i._menu,l,k=h.dom,g=k.getViewPort(h.getWin()),f=j.target;j=0;if(!d){d=h.controlManager.createDropMenu("spellcheckermenu",{"class":"mceNoIcons"});i._menu=d}if(k.hasClass(f,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);i._sendRPC("getSuggestions",[i.selectedLang,k.decode(f.innerHTML)],function(m){var e;d.removeAll();if(m.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(m,function(n){d.add({title:n,onclick:function(){k.replace(h.getDoc().createTextNode(n),f);i._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}e=i.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var n=f.innerHTML;i._removeWords(k.decode(n));i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWords",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});if(i.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();h.setProgressState(1);i._sendRPC("learnWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}})}d.update()});l=b.getPos(h.getContentAreaContainer());d.settings.offset_x=l.x;d.settings.offset_y=l.y;h.selection.select(f);l=k.getPos(f);d.showMenu(l.x,l.y+f.offsetHeight-g.y);return tinymce.dom.Event.cancel(j)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})(); \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/spellchecker/editor_plugin_src.js b/include/javascript/tiny_mce/plugins/spellchecker/editor_plugin_src.js index f679358c..50df7343 100644 --- a/include/javascript/tiny_mce/plugins/spellchecker/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/spellchecker/editor_plugin_src.js @@ -351,7 +351,6 @@ } }); - if (t.editor.getParam("spellchecker_enable_learn_rpc")) { m.add({ title : 'spellchecker.learn_word', @@ -372,7 +371,7 @@ m.update(); }); - p1 = dom.getPos(ed.getContentAreaContainer()); + p1 = DOM.getPos(ed.getContentAreaContainer()); m.settings.offset_x = p1.x; m.settings.offset_y = p1.y; diff --git a/include/javascript/tiny_mce/plugins/style/js/props.js b/include/javascript/tiny_mce/plugins/style/js/props.js index c1cf6be8..99983163 100644 --- a/include/javascript/tiny_mce/plugins/style/js/props.js +++ b/include/javascript/tiny_mce/plugins/style/js/props.js @@ -372,7 +372,7 @@ function applyAction() { generateCSS(); tinyMCEPopup.restoreSelection(); - ed.dom.setAttrib(ed.selection.getNode(), 'style', tinyMCEPopup.editor.dom.serializeStyle(tinyMCEPopup.editor.dom.parseStyle(ce.style.cssText))); + ed.dom.setAttrib(ed.selection.getSelectedBlocks(), 'style', tinyMCEPopup.editor.dom.serializeStyle(tinyMCEPopup.editor.dom.parseStyle(ce.style.cssText))); } function updateAction() { diff --git a/include/javascript/tiny_mce/plugins/style/props.htm b/include/javascript/tiny_mce/plugins/style/props.htm index b5a3d15d..76ab68d8 100644 --- a/include/javascript/tiny_mce/plugins/style/props.htm +++ b/include/javascript/tiny_mce/plugins/style/props.htm @@ -316,6 +316,8 @@ +
+
{#style_dlg.padding} @@ -672,6 +674,7 @@ +
@@ -820,7 +823,6 @@

-
diff --git a/include/javascript/tiny_mce/plugins/tabfocus/editor_plugin.js b/include/javascript/tiny_mce/plugins/tabfocus/editor_plugin.js index d18689dd..42a82d11 100644 --- a/include/javascript/tiny_mce/plugins/tabfocus/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/tabfocus/editor_plugin.js @@ -1 +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 +(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(t){n=c.select(":input:enabled,*[tabindex]");function s(v){return v.nodeName==="BODY"||(v.type!="hidden"&&!(v.style.display=="none")&&!(v.style.visibility=="hidden")&&s(v.parentNode))}function i(v){return v.attributes.tabIndex.specified||v.nodeName=="INPUT"||v.nodeName=="TEXTAREA"}function u(){return tinymce.isIE6||tinymce.isIE7}function r(v){return((!u()||i(v)))&&v.getAttribute("tabindex")!="-1"&&s(v)}d(n,function(w,v){if(w.id==l.id){j=v;return false}});if(t>0){for(m=j+1;m=0;m--){if(r(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 index 1be152c7..a1579c85 100644 --- a/include/javascript/tiny_mce/plugins/tabfocus/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/tabfocus/editor_plugin_src.js @@ -16,19 +16,28 @@ 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"); - } + + function canSelectRecursive(e) { + return e.nodeName==="BODY" || (e.type != 'hidden' && + !(e.style.display == "none") && + !(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode)); + } + function canSelectInOldIe(el) { + return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA"; + } + function isOldIe() { + return tinymce.isIE6 || tinymce.isIE7; + } + function canSelect(el) { + return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el); + } each(el, function(e, i) { if (e.id == ed.id) { @@ -36,7 +45,6 @@ return false; } }); - if (d > 0) { for (i = x + 1; i < el.length; i++) { if (canSelect(el[i])) @@ -50,7 +58,7 @@ } return null; - }; + } if (e.keyCode === 9) { v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next'))); @@ -86,7 +94,7 @@ return Event.cancel(e); } } - }; + } ed.onKeyUp.add(tabCancel); @@ -111,4 +119,4 @@ // 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 b62fa547..2922f7a2 100644 --- a/include/javascript/tiny_mce/plugins/table/cell.htm +++ b/include/javascript/tiny_mce/plugins/table/cell.htm @@ -5,6 +5,7 @@ + @@ -70,10 +71,10 @@ - + - + @@ -166,6 +167,7 @@
diff --git a/include/javascript/tiny_mce/plugins/table/editor_plugin.js b/include/javascript/tiny_mce/plugins/table/editor_plugin.js index 727ae4e7..0d756c25 100644 --- a/include/javascript/tiny_mce/plugins/table/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/table/editor_plugin.js @@ -1 +1 @@ -(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 +(function(d){var e=d.each;function c(g,h){var j=h.ownerDocument,f=j.createRange(),k;f.setStartBefore(h);f.setEnd(g.endContainer,g.endOffset);k=j.createElement("body");k.appendChild(f.cloneContents());return k.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(g,f){return parseInt(g.getAttribute(f)||1)}function b(H,G,K){var g,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;g=[];e(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);e(O,function(P,Q){Q+=M;e(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(g[Q]){while(g[Q][R]){R++}}U=a(W,"rowspan");V=a(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(!d.isIE){M.innerHTML='
'}}return M}function q(){var M=G.createRng();e(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}e(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=g[Math.min(g.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=g[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=g[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(f(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(f(P.cells[0]),P.cells[0])}}}}}function C(){e(g,function(M,N){e(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=a(P,"colspan");R=a(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&&g[M-1][R]){V=g[M-1][R].elm;O=a(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=f(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 h(N){var O,M;e(g,function(P,Q){e(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});e(g,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=a(P,"colspan");Q=a(P,"rowspan");if(R==1){if(!N){G.insertAfter(f(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(f(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];e(g,function(N,O){e(N,function(Q,P){if(j(Q)&&d.inArray(M,P)===-1){e(g,function(T){var R=T[P].elm,S;S=a(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");e(Q.cells,function(S){var T=a(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]);e(g[R.y],function(S){var T;S=S.elm;if(S!=O){T=a(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();e(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();e(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;e(g,function(S){var R;Q=0;e(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()}e(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=g[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(g[y][x]){G.addClass(g[y][x].elm,"mceSelected")}}}}}d.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:h,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}d.create("tinymce.plugins.TablePlugin",{init:function(g,h){var f,m,j=true;function l(p){var o=g.selection,n=g.dom.getParent(p||o.getNode(),"table");if(n){return new b(n,g.dom,o)}}function k(){g.getBody().style.webkitUserSelect="";if(j){g.dom.removeClass(g.dom.select("td.mceSelected,th.mceSelected"),"mceSelected");j=false}}e([["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(n){g.addButton(n[0],{title:n[1],cmd:n[2],ui:n[3]})});if(!d.isIE){g.onClick.add(function(n,o){o=o.target;if(o.nodeName==="TABLE"){n.selection.select(o);n.nodeChanged()}})}g.onPreProcess.add(function(o,p){var n,q,r,t=o.dom,s;n=t.select("table",p.node);q=n.length;while(q--){r=n[q];t.setAttrib(r,"data-mce-style","");if((s=t.getAttrib(r,"width"))){t.setStyle(r,"width",s);t.setAttrib(r,"width","")}if((s=t.getAttrib(r,"height"))){t.setStyle(r,"height",s);t.setAttrib(r,"height","")}}});g.onNodeChange.add(function(q,o,s){var r;s=q.selection.getStart();r=q.dom.getParent(s,"td,th,caption");o.setActive("table",s.nodeName==="TABLE"||!!r);if(r&&r.nodeName==="CAPTION"){r=0}o.setDisabled("delete_table",!r);o.setDisabled("delete_col",!r);o.setDisabled("delete_table",!r);o.setDisabled("delete_row",!r);o.setDisabled("col_after",!r);o.setDisabled("col_before",!r);o.setDisabled("row_after",!r);o.setDisabled("row_before",!r);o.setDisabled("row_props",!r);o.setDisabled("cell_props",!r);o.setDisabled("split_cells",!r);o.setDisabled("merge_cells",!r)});g.onInit.add(function(r){var p,t,q=r.dom,u;f=r.windowManager;r.onMouseDown.add(function(w,z){if(z.button!=2){k();t=q.getParent(z.target,"td,th");p=q.getParent(t,"table")}});q.bind(r.getDoc(),"mouseover",function(C){var A,z,B=C.target;if(t&&(u||B!=t)&&(B.nodeName=="TD"||B.nodeName=="TH")){z=q.getParent(B,"table");if(z==p){if(!u){u=l(z);u.setStartCell(t);r.getBody().style.webkitUserSelect="none"}u.setEndCell(B);j=true}A=r.selection.getSel();try{if(A.removeAllRanges){A.removeAllRanges()}else{A.empty()}}catch(w){}C.preventDefault()}});r.onMouseUp.add(function(F,G){var z,B=F.selection,H,I=B.getSel(),w,C,A,E;if(t){if(u){F.getBody().style.webkitUserSelect=""}function D(J,L){var K=new d.dom.TreeWalker(J,J);do{if(J.nodeType==3&&d.trim(J.nodeValue).length!=0){if(L){z.setStart(J,0)}else{z.setEnd(J,J.nodeValue.length)}return}if(J.nodeName=="BR"){if(L){z.setStartBefore(J)}else{z.setEndBefore(J)}return}}while(J=(L?K.next():K.prev()))}H=q.select("td.mceSelected,th.mceSelected");if(H.length>0){z=q.createRng();C=H[0];E=H[H.length-1];z.setStartBefore(C);z.setEndAfter(C);D(C,1);w=new d.dom.TreeWalker(C,q.getParent(H[0],"table"));do{if(C.nodeName=="TD"||C.nodeName=="TH"){if(!q.hasClass(C,"mceSelected")){break}A=C}}while(C=w.next());D(A);B.setRng(z)}F.nodeChanged();t=u=p=null}});r.onKeyUp.add(function(w,z){k()});r.onKeyDown.add(function(w,z){n(w)});r.onMouseDown.add(function(w,z){if(z.button!=2){n(w)}});function o(D,z,A,F){var B=3,G=D.dom.getParent(z.startContainer,"TABLE"),C,w,E;if(G){C=G.parentNode}w=z.startContainer.nodeType==B&&z.startOffset==0&&z.endOffset==0&&F&&(A.nodeName=="TR"||A==C);E=(A.nodeName=="TD"||A.nodeName=="TH")&&!F;return w||E}function n(A){if(!d.isWebKit){return}var z=A.selection.getRng();var C=A.selection.getNode();var B=A.dom.getParent(z.startContainer,"TD");if(!o(A,z,C,B)){return}if(!B){B=C}var w=B.lastChild;while(w.lastChild){w=w.lastChild}z.setEnd(w,w.nodeValue.length);A.selection.setRng(z)}r.plugins.table.fixTableCellSelection=n;if(r&&r.plugins.contextmenu){r.plugins.contextmenu.onContextMenu.add(function(A,w,C){var D,B=r.selection,z=B.getNode()||r.getBody();if(r.dom.getParent(C,"td")||r.dom.getParent(C,"th")||r.dom.select("td.mceSelected,th.mceSelected").length){w.removeAll();if(z.nodeName=="A"&&!r.dom.getAttrib(z,"name")){w.add({title:"advanced.link_desc",icon:"link",cmd:r.plugins.advlink?"mceAdvLink":"mceLink",ui:true});w.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});w.addSeparator()}if(z.nodeName=="IMG"&&z.className.indexOf("mceItem")==-1){w.add({title:"advanced.image_desc",icon:"image",cmd:r.plugins.advimage?"mceAdvImage":"mceImage",ui:true});w.addSeparator()}w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});w.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});w.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});w.addSeparator();D=w.addMenu({title:"table.cell"});D.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});D.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});D.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});D=w.addMenu({title:"table.row"});D.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});D.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});D.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});D.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});D.addSeparator();D.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});D.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});D.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!m);D.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!m);D=w.addMenu({title:"table.col"});D.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});D.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});D.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(d.isWebKit){function v(B,M){function F(Q){B.selection.setCursorLocation(Q,0)}function H(R,Q){return R.keyCode==z?Q.previousSibling:Q.nextSibling}function G(R,S){var Q=H(R,S);return Q!==null&&Q.tagName==="TR"?Q:null}function C(Q,R){return Q.dom.getParent(R,"table")}function O(Q){var R=C(B,Q);return H(M,R)}function A(Q){return Q.keyCode==z||Q.keyCode==I}function D(Q){var S=Q.selection.getNode();var R=Q.dom.getParent(S,"tr");return R!==null}function N(R){var Q=0;var S=R;while(S.previousSibling){S=S.previousSibling;Q=Q+a(S,"colspan")}return Q}function E(S,Q){var T=0;var R=0;e(S.children,function(U,V){T=T+a(U,"colspan");R=V;if(T>Q){return false}});return R}function w(S,T,V){var U=N(S.dom.getParent(T,"td"));var R=E(V,U);var Q=V.childNodes[R];F(Q)}function L(R,T){var Q=O(R);if(Q!==null){F(Q);return d.dom.Event.cancel(T)}else{var S=T.keyCode==z?R.firstChild:R.lastChild;F(S);return true}}var z=38;var I=40;if(A(M)&&D(B)){var J=B.selection.getNode();var P=B.dom.getParent(J,"tr");var K=G(M,P);if(K==null){return L(P,M)}else{w(B,J,K);d.dom.Event.cancel(M);return true}}}r.onKeyDown.add(v)}if(!d.isIE){function s(){var w;for(w=r.getBody().lastChild;w&&w.nodeType==3&&!w.nodeValue.length;w=w.previousSibling){}if(w&&w.nodeName=="TABLE"){r.dom.add(r.getBody(),"p",null,'
')}}if(d.isGecko){r.onKeyDown.add(function(z,B){var w,A,C=z.dom;if(B.keyCode==37||B.keyCode==38){w=z.selection.getRng();A=C.getParent(w.startContainer,"table");if(A&&z.getBody().firstChild==A){if(c(w,A)){w=C.createRng();w.setStartBefore(A);w.setEndBefore(A);z.selection.setRng(w);B.preventDefault()}}}})}r.onKeyUp.add(s);r.onSetContent.add(s);r.onVisualAid.add(s);r.onPreProcess.add(function(w,A){var z=A.node.lastChild;if(z&&z.childNodes.length==1&&z.firstChild.nodeName=="BR"){w.dom.remove(z)}});s()}});e({mceTableSplitCells:function(n){n.split()},mceTableMergeCells:function(o){var p,q,n;n=g.dom.getParent(g.selection.getNode(),"th,td");if(n){p=n.rowSpan;q=n.colSpan}if(!g.dom.select("td.mceSelected,th.mceSelected").length){f.open({url:h+"/merge_cells.htm",width:240+parseInt(g.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(g.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:p,cols:q,onaction:function(r){o.merge(n,r.cols,r.rows)},plugin_url:h})}else{o.merge()}},mceTableInsertRowBefore:function(n){n.insertRow(true)},mceTableInsertRowAfter:function(n){n.insertRow()},mceTableInsertColBefore:function(n){n.insertCol(true)},mceTableInsertColAfter:function(n){n.insertCol()},mceTableDeleteCol:function(n){n.deleteCols()},mceTableDeleteRow:function(n){n.deleteRows()},mceTableCutRow:function(n){m=n.cutRows()},mceTableCopyRow:function(n){m=n.copyRows()},mceTablePasteRowBefore:function(n){n.pasteRows(m,true)},mceTablePasteRowAfter:function(n){n.pasteRows(m)},mceTableDelete:function(n){n.deleteTable()}},function(o,n){g.addCommand(n,function(){var p=l();if(p){o(p);g.execCommand("mceRepaint");k()}})});e({mceInsertTable:function(n){f.open({url:h+"/table.htm",width:400+parseInt(g.getLang("table.table_delta_width",0)),height:320+parseInt(g.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:n?n.action:0})},mceTableRowProps:function(){f.open({url:h+"/row.htm",width:400+parseInt(g.getLang("table.rowprops_delta_width",0)),height:295+parseInt(g.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})},mceTableCellProps:function(){f.open({url:h+"/cell.htm",width:400+parseInt(g.getLang("table.cellprops_delta_width",0)),height:295+parseInt(g.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}},function(o,n){g.addCommand(n,function(p,q){o(q)})})}});d.PluginManager.add("table",d.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 9565b378..60cc567d 100644 --- a/include/javascript/tiny_mce/plugins/table/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/table/editor_plugin_src.js @@ -25,6 +25,10 @@ return elm.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi, '-').replace(/<[^>]+>/g, '').length == 0; }; + function getSpanVal(td, name) { + return parseInt(td.getAttribute(name) || 1); + } + /** * Table Grid class. */ @@ -100,10 +104,6 @@ return row[x]; }; - function getSpanVal(td, name) { - return parseInt(td.getAttribute(name) || 1); - }; - function setSpanVal(td, name, val) { if (td) { val = parseInt(val); @@ -752,7 +752,7 @@ tinymce.create('tinymce.plugins.TablePlugin', { init : function(ed, url) { - var winMan, clipboardRows; + var winMan, clipboardRows, hasCellSelection = true; // Might be selected cells on reload function createTableGrid(node) { var selection = ed.selection, tblElm = ed.dom.getParent(node || selection.getNode(), 'table'); @@ -764,7 +764,11 @@ function cleanup() { // Restore selection possibilities ed.getBody().style.webkitUserSelect = ''; - ed.dom.removeClass(ed.dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); + + if (hasCellSelection) { + ed.dom.removeClass(ed.dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); + hasCellSelection = false; + } }; // Register buttons @@ -873,6 +877,7 @@ } tableGrid.setEndCell(target); + hasCellSelection = true; } // Remove current selection @@ -923,7 +928,7 @@ return; } } while (node = (start ? walker.next() : walker.prev())); - }; + } // Try to expand text selection as much as we can only Gecko supports cell selection selectedCells = dom.select('td.mceSelected,th.mceSelected'); @@ -931,6 +936,8 @@ rng = dom.createRng(); node = selectedCells[0]; endNode = selectedCells[selectedCells.length - 1]; + rng.setStartBefore(node); + rng.setEndAfter(node); setPoint(node, 1); walker = new tinymce.dom.TreeWalker(node, dom.getParent(selectedCells[0], 'table')); @@ -958,6 +965,60 @@ cleanup(); }); + ed.onKeyDown.add(function (ed, e) { + fixTableCellSelection(ed); + }); + + ed.onMouseDown.add(function (ed, e) { + if (e.button != 2) { + fixTableCellSelection(ed); + } + }); + function tableCellSelected(ed, rng, n, currentCell) { + // The decision of when a table cell is selected is somewhat involved. The fact that this code is + // required is actually a pointer to the root cause of this bug. A cell is selected when the start + // and end offsets are 0, the start container is a text, and the selection node is either a TR (most cases) + // or the parent of the table (in the case of the selection containing the last cell of a table). + var TEXT_NODE = 3, table = ed.dom.getParent(rng.startContainer, 'TABLE'), + tableParent, allOfCellSelected, tableCellSelection; + if (table) + tableParent = table.parentNode; + allOfCellSelected =rng.startContainer.nodeType == TEXT_NODE && + rng.startOffset == 0 && + rng.endOffset == 0 && + currentCell && + (n.nodeName=="TR" || n==tableParent); + tableCellSelection = (n.nodeName=="TD"||n.nodeName=="TH")&& !currentCell; + return allOfCellSelected || tableCellSelection; + // return false; + } + + // this nasty hack is here to work around some WebKit selection bugs. + function fixTableCellSelection(ed) { + if (!tinymce.isWebKit) + return; + + var rng = ed.selection.getRng(); + var n = ed.selection.getNode(); + var currentCell = ed.dom.getParent(rng.startContainer, 'TD'); + + if (!tableCellSelected(ed, rng, n, currentCell)) + return; + if (!currentCell) { + currentCell=n; + } + + // Get the very last node inside the table cell + var end = currentCell.lastChild; + while (end.lastChild) + end = end.lastChild; + + // Select the entire table cell. Nothing outside of the table cell should be selected. + rng.setEnd(end, end.nodeValue.length); + ed.selection.setRng(rng); + } + ed.plugins.table.fixTableCellSelection=fixTableCellSelection; + // Add context menu if (ed && ed.plugins.contextmenu) { ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) { @@ -1010,6 +1071,106 @@ }); } + // Fix to allow navigating up and down in a table in WebKit browsers. + if (tinymce.isWebKit) { + function moveSelection(ed, e) { + + function moveCursorToStartOfElement(n) { + ed.selection.setCursorLocation(n, 0); + } + + function getSibling(event, element) { + return event.keyCode == UP_ARROW ? element.previousSibling : element.nextSibling; + } + + function getNextRow(e, row) { + var sibling = getSibling(e, row); + return sibling !== null && sibling.tagName === 'TR' ? sibling : null; + } + + function getTable(ed, currentRow) { + return ed.dom.getParent(currentRow, 'table'); + } + + function getTableSibling(currentRow) { + var table = getTable(ed, currentRow); + return getSibling(e, table); + } + + function isVerticalMovement(event) { + return event.keyCode == UP_ARROW || event.keyCode == DOWN_ARROW; + } + + function isInTable(ed) { + var node = ed.selection.getNode(); + var currentRow = ed.dom.getParent(node, 'tr'); + return currentRow !== null; + } + + function columnIndex(column) { + var colIndex = 0; + var c = column; + while (c.previousSibling) { + c = c.previousSibling; + colIndex = colIndex + getSpanVal(c, "colspan"); + } + return colIndex; + } + + function findColumn(rowElement, columnIndex) { + var c = 0; + var r = 0; + each(rowElement.children, function(cell, i) { + c = c + getSpanVal(cell, "colspan"); + r = i; + if (c > columnIndex) + return false; + }); + return r; + } + + function moveCursorToRow(ed, node, row) { + var srcColumnIndex = columnIndex(ed.dom.getParent(node, 'td')); + var tgtColumnIndex = findColumn(row, srcColumnIndex) + var tgtNode = row.childNodes[tgtColumnIndex]; + moveCursorToStartOfElement(tgtNode); + } + + function escapeTable(currentRow, e) { + var tableSiblingElement = getTableSibling(currentRow); + if (tableSiblingElement !== null) { + moveCursorToStartOfElement(tableSiblingElement); + return tinymce.dom.Event.cancel(e); + } else { + var element = e.keyCode == UP_ARROW ? currentRow.firstChild : currentRow.lastChild; + // rely on default behaviour to escape table after we are in the last cell of the last row + moveCursorToStartOfElement(element); + return true; + } + } + + var UP_ARROW = 38; + var DOWN_ARROW = 40; + + if (isVerticalMovement(e) && isInTable(ed)) { + var node = ed.selection.getNode(); + var currentRow = ed.dom.getParent(node, 'tr'); + var nextRow = getNextRow(e, currentRow); + + // If we're at the first or last row in the table, we should move the caret outside of the table + if (nextRow == null) { + return escapeTable(currentRow, e); + } else { + moveCursorToRow(ed, node, nextRow); + tinymce.dom.Event.cancel(e); + return true; + } + } + } + + ed.onKeyDown.add(moveSelection); + } + // Fixes an issue on Gecko where it's impossible to place the caret behind a table // This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled if (!tinymce.isIE) { diff --git a/include/javascript/tiny_mce/plugins/table/js/cell.js b/include/javascript/tiny_mce/plugins/table/js/cell.js index 38bbe79f..53bdb54b 100644 --- a/include/javascript/tiny_mce/plugins/table/js/cell.js +++ b/include/javascript/tiny_mce/plugins/table/js/cell.js @@ -63,6 +63,11 @@ function init() { function updateAction() { var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0]; + if (!AutoValidator.validate(formObj)) { + tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.'); + return false; + } + tinyMCEPopup.restoreSelection(); el = ed.selection.getStart(); tdElm = ed.dom.getParent(el, "td,th"); @@ -123,6 +128,36 @@ function updateAction() { break; + case "col": + var curr, col = 0, cell = trElm.firstChild, rows = tableElm.getElementsByTagName("tr"); + + if (cell.nodeName != "TD" && cell.nodeName != "TH") + cell = nextCell(cell); + + do { + if (cell == tdElm) + break; + col += cell.getAttribute("colspan"); + } while ((cell = nextCell(cell)) != null); + + for (var i=0; i + @@ -70,7 +71,7 @@ - + diff --git a/include/javascript/tiny_mce/plugins/table/table.htm b/include/javascript/tiny_mce/plugins/table/table.htm index fea75b09..a72e356c 100644 --- a/include/javascript/tiny_mce/plugins/table/table.htm +++ b/include/javascript/tiny_mce/plugins/table/table.htm @@ -50,9 +50,9 @@ - + - + diff --git a/include/javascript/tiny_mce/plugins/wordcount/editor_plugin.js b/include/javascript/tiny_mce/plugins/wordcount/editor_plugin.js index e769d09f..a752ad32 100644 --- a/include/javascript/tiny_mce/plugins/wordcount/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/wordcount/editor_plugin.js @@ -1 +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 +(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(){if(!a.destroyed){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 index b51b6075..032a3f67 100644 --- a/include/javascript/tiny_mce/plugins/wordcount/editor_plugin_src.js +++ b/include/javascript/tiny_mce/plugins/wordcount/editor_plugin_src.js @@ -91,11 +91,11 @@ t.block = 1; setTimeout(function() { + if (!ed.destroyed) { var tc = t._getCount(ed); - tinymce.DOM.setHTML(t.id, tc.toString()); - setTimeout(function() {t.block = 0;}, 2000); + } }, 1); }, diff --git a/include/javascript/tiny_mce/themes/advanced/editor_template.js b/include/javascript/tiny_mce/themes/advanced/editor_template.js index ba8dd4c3..7f30c18e 100644 --- a/include/javascript/tiny_mce/themes/advanced/editor_template.js +++ b/include/javascript/tiny_mce/themes/advanced/editor_template.js @@ -1 +1 @@ -(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 +(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){window.focus();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",tabIndex:"-1"});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,k=j.undoManager;i.setDisabled("undo",!k.hasUndo()&&!k.typing);i.setDisabled("redo",!k.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 0564baf9..4cbdb93b 100644 --- a/include/javascript/tiny_mce/themes/advanced/editor_template_src.js +++ b/include/javascript/tiny_mce/themes/advanced/editor_template_src.js @@ -593,6 +593,7 @@ if (evt.altKey) { if (evt.keyCode === DOM_VK_F10) { + window.focus(); t.toolbarGroup.focus(); return Event.cancel(evt); } else if (evt.keyCode === DOM_VK_F11) { @@ -869,7 +870,7 @@ if (s.theme_advanced_resizing) { - DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize'}); + DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize', tabIndex:"-1"}); if (s.theme_advanced_resizing_use_cookie) { ed.onPostRender.add(function() { @@ -936,10 +937,10 @@ }, _updateUndoStatus : function(ed) { - var cm = ed.controlManager; + var cm = ed.controlManager, um = ed.undoManager; - cm.setDisabled('undo', !ed.undoManager.hasUndo() && !ed.typing); - cm.setDisabled('redo', !ed.undoManager.hasRedo()); + cm.setDisabled('undo', !um.hasUndo() && !um.typing); + cm.setDisabled('redo', !um.hasRedo()); }, _nodeChanged : function(ed, cm, n, co, ob) { @@ -1095,11 +1096,8 @@ 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'))) + // Ignore non element and bogus/hidden elements + if (n.nodeType != 1 || na === 'br' || n.getAttribute('data-mce-bogus') || DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved')) return; // Handle prefix diff --git a/include/javascript/tiny_mce/themes/advanced/img/colorpicker.jpg b/include/javascript/tiny_mce/themes/advanced/img/colorpicker.jpg index b4c542d107b25f68a9d4f9d7a109d0565d1f1437..b1a377aba7784d3a0a0fabb4d22b8114cde25ace 100644 GIT binary patch delta 2365 zcmYjO3pmqzAD>I9aMlowjp#C>)aEu~#cYyDxlQJt%Q?biYTo#tN~-`!P7ZFtr#nbAadE%ze9HDSzJMmFK4-1(Z9?%`+We=EjEv|W8 z!>fdSp#4VT&;i*tOEuLrFX!SvV5H)yQ$M{NTKU}Rsefh3dVL?o0U74_i)ZpjwWnX6 z6^GWUCyvDw8vI51WW6>*;PC!a;G{L3-)U)nS4+Mz!|^Nm96;x!$DzG3Jg0jb`V-hT z!RX58Qg_~Hsn)#>vYGK5Cq(JfK-%aRXp7MeN&Rl53iw{+L-+)W-WD?_Gv)rlC}&nC zch!w<-^aJ@-bXR16@ZXoZ~3np zHkJWU^yj*MC@S4CIAgtc)vERJ4#=w=c+x!dem~k9`*nt*JjoffY`OboyxPRP%Mp{o z3Is?qbu6n_(|p={5t(PxygI_$Ki%gJ3y86r22ZDXMbgbic+$jl@tct8aDGX^P8!5py0G(Y*e#hDL&adl}yF;&k=#MEQU?%wx7lj zg^D@iej=|$udQ;j$Y1u^zY&>rQP;i^ny}sb(MkyS^{Avxui{9St*d5QRuoe&vw$RE zP`P<}Ncy#QG=nPKM&5dVQ)wId<$bVOT??<&g0+x8xGtRC`12NY#>OFV_7*T09&zsL z$6JHpw~f9AFw<)B2$mIpy3fZdjzLS$Uyis3_x*H`v6FzN8P#9b2*N+pXh^Jp%< zz3=id_o{p`@dx!kNv6xdkh)!+r};VKp+81TQAtfJA$uPhjO16p$i=Pcb7qyFpUFM6 zXh>#7zZRNa?>}H--9-52_OSz4;D6Tgn<8GBk53x#-fy?Vuk56y^f59&d*(4bIYY00ZBdgfF#EuHHg( z-H;=%Gix(awxAypdOXi&u4L12N-yjqU%m}^LZL(2_cEC<8=?3Qff&iq${y@ zFYHZ8Zl6w}eQ6eK8+tW>tIlYTPzL6W=f4C+-eHM4GYxNYlbW?m2 zv%;g{S-F$|HG>Ed?QTs_%o#rHlh>vpG*rZ=ylRM7Kmr#65dLy#i?anDgQ}X^;>1~a zZck+}Q?VO0g;EfAEp%qzo>G;58DemHBwt@`H_tIb8QH%QjPuY;jrPuQ!_bXa>PS7+ zCaQ@Ogwiw)olB};8EQHb>)b?dAkC*9Dowu-4yq4o<8-aFiScSxs4FtRc(Q-wxKz27 zg8-xRADQKrR~tN^f`sQKX+|{ke1E0!^Nb3+(;j2w+`+fii%N0+&WuEHDS8DAKHlaS z?@2h$5%-+CDxab-pzt_@k!kV?6?MVcFOQ$hIR57;Sl-?!Z69h&Q7|G%A8m?u9*e&r zv8C|x7SsYfkkF6fbj*S|J;oOV@lt?q7_wswj0>wIQfvBT{NfXtsWp~R|5lk0ZtYmw zVZ^~LREbm!M)7dv7)Hg??v$Y7P_cU8uNZZ|D~e&mWU*ohW?@;);f?foEc?f5;ZjJU zlE9PwF=ZG1AgWk8uIO{K=)!MuCud}f7F~2$QoVYYmf~m$^t~}|b8Ut|v1?*G-R$Dx$TjdIOKcDK;mX@fH`!@w!LQ-p7}+gw+iH%#vd;c^>d>F zTrft9^Z7>o^Na*_ASiuZtWgMXI(|P{*mbX7wR~uTn{WVIZ^Hhifeczd?%Cc|P@jj4 z)cR==&S_jt*^-;slnb4tpqEkHb@wsy^*$YHECM(8+}PzN5^<#fmu9`LUSX0I^wtI$ z!!65Z1qrEnu+%&ix`kWiZaTea-x6IC~5 z*wI#uCo1&6l8=0_Yo?zsNR-n(!giGee;g)2ri9}6Xu!9b(LNjQ8&3CV7Oo+Hu!Kys@+D&1vNPYp$8X7kaM9`Kwp~Cx%94s{@0{2Sd9bYI*FY>E8Af!vsJOb`u+5UM zQ3W)7!-xd3PPi+Q-20;M#SNhvQcrH%T^RT1gzUYCM1*5pj*Cm`e4HUWKD9zl@;9b1 zEqikpFxXJ5j(H-uWIi9e2`<5UXf)auA+U?>!}WM`GpDrz$paBOarF7Yf-;CXS^$BV zBkb_-GlLW_p39MxymIwAl(O(=8lXK?9#&m!xHS`JOpBa W2*l#|Pa-Y~b(9+&nY$I(8UGuz^kRPi literal 3189 zcmbW0dsLEX8o)utyLkf>vO+8cOg9wF%x1j+p@RkpsHC1z^8%LRB~9&2XDqEGG)XNW za}>Dv$PIyhNYo}DFE8{K%%;saJRZN^Z|nBZpzy$8e9+2Iz;a<8Kk+#d^3T1~%eX+Yocd57U@)iBS;Lz~Rksn75)5aOo z?47y!`{oCW4<9{#^7PrO*Kd~J{`T(uhu>GYz#z*%v4Hp|*ne=j0$dhWR+d&aD_mfU z{lIJKY6bDeS-VBjZPE+fQ9+fq&?sTsg&TH0!Hk!%jG`%fj}7?y8(*!UeJ1mKAkW+N+qrtJ``cfL69@8V&h4pSlYZct zdbj(JoO9O?Qsypg_fMOg z#rMbU1sg3&fUGhub|uS1yIT&?FK_29gtOKhHhq6|)$&^OfnnC|ikp{TaNez5@_lf< zVtK=Xq%zSvAMNgxI$d``m?>^#DeXGE<=1t-8%N)&Uj?N0rRmZL=i-Ck?cDEJW9D3T zQNPlr2-xo8nJClmdhOM!G zSxEgwFp>mhr9k%KF1;r^Lf?*3q*Hw)AAX54&QN>v!`Sj4coX05(}r$KJj?NGNXrKD z8NeX+XC1e{BJniG?|2&dIw0`UbHjy&?fwkwr)jCV>jFx1PkkVvaTKR0CyLX7_nCecUzMp7ZL}O4zG~}I+CyvTeU-TI-o>tMCfOfLfd}6{ zn-VTf)-(a;Sp7?!H+8zxp-X96c*~5f=$(V9wU)QI1jM{4!5`D}1JYcRmW=fTf+e4QuYi-${T5Wl!DOA;{Oo23HgADWZ0p6&DQlQq?3y&OLbGnI?ce`qz*7HE3Q&J0yE1{KY(ay2sM|HXSio`Q) zzXlFjW+UfD{LLS0Y3NDMZ+bLSxya70{JN19=17g3?)?e9FZ5ZnrErV zvc9TlZ?yq&c7k1;y1CMvfr`2*p>dU3G~uVHuoh;U3XOlsL-Hc><_FsSENHw4o(p$j zw)bdIf$wKuY_M5uY7jo7*N8)xlDq44D&RA{O83Md zUZRt!OQyD3-d!M)y58T8o^7r1;Q)?=Jbggc))teO1jnW^(b!S@M~%0?c1D#A#m!42 z6EgV^RRPY~f@L299EO4F{YM6aRn%jA0bj&VhnX{+pd%E8D?>;{UE_=;kb=g2yfqfAsCc65n7)rm9R;0fugG!a?6I`}*+F&TF6jg!YbNSM&6n z!>=Ksh-cuFCLM#PT%OLR31*# zS!FN80v&b?Q9xLl3|=v$!KrSTHPk$lOz&cBC(uMCnl~&v&7{(2O78wex~cmSOpaE& z@n0x|jdJ&(EI@;CjEQDIz&KHWb$avInqg_#umE)7H0pr@iwQbrk>en z79En`gx%hnTVYhT!J&F=6h@YKI{B>qZeoJ13eb^8$|MD$Fd|@Xz9!KyjAO3$S7A&6 zYeXZFhR=5gk`glrvDnM5U17rT-%tL9$Xkv}o|0U3PlQp{eM3$Ocx?e|u{ujx6p2chSy@+SHkN##WBa9ifCVH+`fLyi`WHu2S0Ro<$2jyxdslxi%sXK_EHhD>M5VFx3b4`Flh zIc+g;!#Pf^N9TwRp)FB8seslma>NhVnFKcGYRfSYt`m)MKVN zJFFM37S4z!if;L>jai*Z;Dx9uyz#v$-IYW1Q)7knZia`sJ-gGm3ULV6Au?R(5Si3A z5F(+LINUNU&E#}=!BCsu%B>|82L8R~_$}at>B^3wP{a$xih^b*veU}^%SvA!+$lzK zBsz66-IK>Ysg7aaQ~#J+Ae@Vb#6Xz!tXUW*GLZDfkf66tq!{&32#Rm+|vJii{`y-7cV5enl_GL(c= z{?V^}q$&*ST0{H+~kYM|3uYAs#ozCy(?T>GWX{31NhEwAXaj z$-4<~)zvKkig3>%>7H#88haoT&KLQ(p^}5wZDdLx6KuYt)#=5@obg1ET z!{g_qB0WaNtYWyPG+?L#;E<_|jLW|K#~bMh0c5F+bE?jc+QiEu*c*>0hl)mt&v;q9 zPKAu!+3dJ`Y)zlylp^0O;m9NO(KQNpN*rDyx3ok0O5&`hV>Gm_4_)o#6CnbVu%_YL zkA_EL0QME}wev(ESKLmxMjDBc)Yb-aJM+rU(|mZh4tM?0}d<^7HhJa22mwL*EptRLFpXUAn5J_@V diff --git a/include/javascript/tiny_mce/themes/advanced/img/flash.gif b/include/javascript/tiny_mce/themes/advanced/img/flash.gif index cb192e6ceda8d19ad8e7d08dd1cfde0aa72ead2a..dec3f7c7028df98657860529461af29b8793601c 100644 GIT binary patch delta 213 zcmV;`04o3S0q+42M@dFFIbjq46ae!N0BU`Xkq{(*0w_v~o38)>03rDV1pojK04x9i z000yK6aYX3obbs>t9?iul6o^np&bljkCM*=1jEoo(=a$PVKNDBfzM};)6 P7dQ?G2z`opz!3mD03rDV0RR9G04x9i z000yK6aWAOp76;@tGzfsvf3EULTH5GG)_^RjxbsT(-gvC3q{Agl+e_Kpa1|c$OIKa z>p(~(2nvP4a4_*6g$C1^a7Y8T!;FFea*GCFfmIF%6$~8;01YK!1Pu%p2RSYeq@@L%s0^D;Pm>I= R7&s0H2q{P!z`?;006Tr;MC||o diff --git a/include/javascript/tiny_mce/themes/advanced/img/icons.gif b/include/javascript/tiny_mce/themes/advanced/img/icons.gif index e46de5333082869b9bdab2576a554a2f9d01a966..641a9e3d314f4ea051692a2274aeb281456f5df9 100644 GIT binary patch delta 5712 zcmWlb_g_+r!+;NPfFmw6S5DldS!g*@OWe4%%#jUTiI!!SSIg=gjvz>=I7%9~NE=jI zq?J}$xC(7)Wm;BO8#kKQ%t2Q2e&3&-f8hB%pQn0##d>mRScun(R3*+Am{kL^W6aCs zDXcakldnkc0sz4JCx~y+!}VjZY`>aU;OIisFVXGFJxuXjgVjmw_rAfF9S%VpI&bc6 z%^-dP`(I2;H=z-Ofm`yRYz+3jZp)}fD;6`~Qlo|ZKMZtNYQR+_i3AVqfVytOCq#MH zViD7(w8-34IgnL)a+T~jHBu!Vz7yT?dRich%HU*}EOf{h>pzkhyKG|GDgEn~U@ey$ z_=GSWqQtlM&XE?x8%Nd$tE0qYXZ($YjDv3Of*qal=i{0jz62DU?{c*bu>+3M?-MvK!(t$v-|or{|~Z33pgBtLH* zC=3h--3*kG4OD~Q@93hS=8Tx*_bVv5rr1yQrp4O3hp0I9zw|ifzP7}Y5*8Z$Y8U4C z+RyP)Qt0U%y)i2^V)k1BvbJ_bqjFH)u`swtV-PlUjE+29ZA&crKGtzbE_OV&e80{O zSuxpfRjVVcQDJ?GsclWB=$O;wfDOu&-{Qopi2jCTJC?sae-8?R(8!xICR#Su<+6Oa zNMf;dqD+^tmB}pEGnIt{ZVBt-*d!-vIH<9idXl5<0esK|>#M6m%yv9=J@5Fg<`GP= z+4(`L{&M+_+0K`PQYX0Qu@mSExoEh)I(L=;dQr~n|D5d15D`c8 zC^)T=9eCS?_97_ai3m$JiTuNl_ikTK6lZc=OH!% zW+#>aJ^!R^5QS9Z8WkPk<*0tL3BLvXo`%mdrq2!;3)e5Bybu3)fD2*^Fj!fh6 z&V0T)viaV9kC(gNx>(1Me|^a2sjYYSEN0j>yvS)-UwoIFyOn>kDsq)Pm2Em7cD9P+ zV3Kt#bsGa$OZis^wy9mI#Rw#d*O_G28hOi4mPRny7o~X*8!IGVLfGg{j2x%CFheY9 zpIk5yp)_y|)@V3EIJIN5aJ9knQ>!jc{|pOfnELh3E(-P{*f8wB{- z=sG!M7gp4;m)q~>_a||P`OiLXhH(Gfr{3ZD{ol4vS*lc_1|TCxgBV01`XUZuX|~SJ zB=9H!%pUr_O=Z{037)ZS$=h zT%8gRpW)=OqrOr!xvEmLzXr~)UW;=`K`{2U5YAI6(aaYG8Z#w0@uHptH~GPfMbp?# zou^1$X%UwzPM7;pFyyN2gt!no6!5ZZK|4anjwtVJ4GZC3GYO2N@8CDrzPAcxaVY~_ zy@F{?VpP$vhfUtK=LI%cy;u!P?{P&a2c}uaj2Yj~!5j!41B|qng)bAZ7hr>W9Zl)> zPNB(KvGakfMQ;7hQ6CqWjf};MeulYh-)&eqjm@yNeGY3OEm12btL_TrcD7`Vh}WT; zt$)48P<8-mWc34x_`a$pGTuO}>=-;eSfvD_$h)ANd*_Q96 z|E9F{G)6bS!HhZ~DmBweuhUq;p?gnM>U@#caGgm$T~%$Ly*l;EOZrHbp4`5*56?!n z9SfM0RjkX8ws05edU~8BjlF`21r*AV>8Trp;U??dK~=B5aU%j?&@%z zeaKzWZTi|lxH=?r_scPYbJBMx#o)BovbH#lo7Q-(T{eV;3VMoR{&4%A|BB63TbO-W zw^Wi!qWV%bL4(00{n7*Xmml1e;h2()l8un!uUpda&H?RM8i{A<0%II|G0(2e;LKI@ zBbIuE-XL;7LA!>u!r^uO`&!zXd9r$S)LSyvQiCrOlss6Ip24_TaPCWcCL_f z{U0tkTqsQq_9nAKY58lmmc8?sdlHW_cGWM)y}UMPx3FZP{Xx%U`^thr|2|qNHRO<5 z%O#BSI{8^OCekB(X)mpL2(LI&XBTkjYI~;5fXb>Phyy3;BXu3(-lZ#w5!)+coZS4b z2ghjLo}DY&B*FG6&rKCWbIFN4iW*8`G~@03PhDy5`9nNHO7PMnBIwtX!4DiD%|S1_ zfj@4erbS3Drezlf(4Vy2dlwSWRpL|h)5@Dsf|((cZs0Knb`~L{4nR!{HPo8ZQW3|R ztK8`YW6qjgFU9aTl}iB#zYQA!pF zV{89)-K8b;;_%h}Z+4g6FovX<#n=3E)~LH7T0$61A5&*W-q`rGWvP3I`tn;#W4yv^ ze8(iu?ct!}@xe#=Ztyul`a$I~=3LzMeM`@nH#?aj20!lb_1b**FU_*jvkB~h`4~(Z zIUQvE)pcYv(#gwDa#6PTR$S3#H7x#NrHnrt@N1b@IKObUBjmqa-xZfFEiqsm5Buy0 zfzj=^d1Zb(Iqw<)s_j;2S1;Y8mY7tTxbGP--w@efb{OVg#dWa`4KN zQo;mao8#lmT03aMX)!OI!!AHeTQ}L?d{t;eI;Efb8_sSBfccXF1J3F0k{( zGHkfO?!a!Wtx{C;g z^&g21L2{P$PNt_Vj9e_96Ub z(y9S+f=R2(2zC`2ScQZ+d_)LTZj~MZ&*xdR30Ab@tYsi^z@H0XL5M?VfjVNOrynq% zK>Xjus54w%B3z8iK=*IIoh zkZUxsiXrmeO2cROK%YP1x3+W4Zh%(&Qj5tY+%epS=LFB#ZbufNL&vF?(?iiboL16O z=QhkvCB{fplEDvM2P+L}1IXMS%)$X+;h5n&H;UjgT} zbEyB5kioBIh)r;gUK|q3!fk@sFC@|DK$LvyvG0SYQ{m5cJ(x(>EEl`JstFU)qMpV_ zC6xF7K6?7ZL|KBHK!Z|+#U!lm8+r{r!<#(A`uCqw!Q~$t#N{g%eHrCv>z@Ix_Z#U& zT;qe5W6vDN5-i0-O~(@4-fCV+0HJ-=c!Fde~1vJEK2JBtN~DV19uDXoeWNIRY^>E$2(;JA9Q`Jh^l>gHtqyQ%C_#89x~eh3BdQ;ot#uc4vw{l5+iY%FW)C3$dfkxhZn{lxtCgrgHWx za*Z9OMt1^8kAxz{xJ45el6|>a05&m?ZH31!rE?$UA}lE6jwsk9_AyoU@=?L#tlALA z5q@?gKO_|~Xj^SfIrMGrF$Y>RCFH7;pu0mP&Qb|+xhMujd=F7>}wze{Zz%6+icMN0m$RNZ+lEMc}JqZ1PvK3Gf`_kX%!ccwubq2?)2T zoa&f@Aof*haIU`gzs$_u+Zs$H)uePe1IJa^rwD{!j-CO&-`esZys5UI_%CMr`)7Gg z;~T|iW=g;->k-4<1l3M#>lcS@&9^T|m(>P8NA_X&(Mo#aBYh^A2x@xnBRz%Ba|%Z) zzK;A_%Ll|pOJ>s618>!E-dK4N=b+tloG99%^lcX0$MI0<91kG;V3kDj&sliktymz5 zj|CvmTl%Dl0sU6$t}Z)&uKN7D@o38%|I32l%quj44_vB#S3iRBlwx)@vEOtENHTm1 zHEo_WT0g+P>Yn0BAGM3mv|_&Rt;RJ`PmGT>P9DxYFU?%HEfZyAc9v&eP-R}z-YitX zh^Yzy11L%SmGyE?E}v}y@#v>E>yEs%!mn2UMhLVew$qyx1?&(OM^^<5N7WAZLJONY zxfuv+1h=hcLnve^U5^m*a3G80MSe|Z@LgDIwiA?ZU!e8;jm67ZpIu0HWM66EPz{+`M$$=F3^! zFk4Bsg#-WK#ZqL{P*55?(v4yaWKlS&{TVADFL>b#B zNlx$`iDz(~Dzw5UUJNeVxP4Xn+X7%8`3o%J+}?dj>|I?ALB$yM7}8xZBt$&6;VEXzOzly3puJvzTGMP zkMN(Dq@{beaoqp#To4;-^OK*~p0IkMbp!NuG(mi2r??=VaHZZw-c9+G*o!e|2nKN#W)9F<(2iPC8$joHEV7eLSC+jan%{k_3rVVbpJgT6!wr zap~j`y!or;f0LfPA6{0bBh}YADr8jj!`JFajtZE4_QR_pJ}i^($16*qO$CPT3OqaH z!b|^Xp05yp9?sZdcw(1HoiMy|hhd%2aCrvml^Z~ujy0Z+b1aB6_F_9v$0ts&&6-Xq zoKECTC)G_SpPgRUI-PQNdj0V9h7Z#lXQww2;Tfj!OseBdn&(V<=uAf9OlH>1=E9jQ z-VCd5Cj0D6PV3B;yE9vdXL8|!Q+u}9e8d~So!Q|yo9{WhGjw)W;;d&VvfWXC6Vpe` z;04eTNX$)cdr&YuyYIv7{@GcWSd@H;y)m!wC%KTzKttNF&SRKp3R@jB@()s{Dmx3S z1g)wAbw%I=7p<%;ih+!&9A`N(A=NgZ2v^ags!jZPFze@`!rdEYXHeZjF#~lTLs)X6 zhns#l1M$q8tRv1zjOR`|&eabeGURrg3f*(+>`!NaU`7FL$Jt2;@w%X>;qF}H@Lbb} zIY|skr*d|U0sq@QvoTJLbPo2Bp-FVk#ll~$ykBi~#c6f;WEJnmrC&Gi7I!@Q)$Yi* zOG1r0IBUl+`UtO^N3=$GJx71tDg1qx_giskIshouO~Om}aEecGgPKZatA9Tt{uwa- zGZ+J%_WX02x3a#Cvw@5!$gu6v@ewjkj7iSp)<2_n|9pOFHOKb*0KfJtLW}MV$2<+P zPtH~Ceib_ZE^+?-KZT&2SOEi-p0AUnk4BcxCrkJJJ3RmO!~D1HGvdP8!@P-5SHS?ZZb(|>&^+AEsxk3?b^m>d-tq}V_EK|MdKRulO!mZ-m&H9_fu-S@0y zDJM>Ln`)>ZJnrR!2QF$Xs5$9k5WDr`r2T!dTh`;o>>myfk9ikP`j*L!dnDR=Q;Tz^ zsE<#D*SY0>np*T!y87(urkrV~XN~Jx^S^$Yb{>(X-K}=nGPC%_m7L+`+|M&#pCEwG F{{atF+}!{G delta 5709 zcmWlbc|6mN1INGn?)qAeInt2K5$kd#Br*5gXPP5T$Vgd=mZR@?hgpu04!TT+C1s%} z6*ZEp!=gi_nyBQdr`6-Bbv^q%zrQ|zeg68qUhmKQP~zc4VnCq3>-yw5v^($(0M@7U zUm`AmTGCStL@HCO)#l$Zs7_tnlz{@VK<9IfEB{qHYc!Gnhk?#U4H!i{N6lD|nSOOMoYuWG zm2LmP$6Z%z@7&s35oYvoW5>dWcT!rCKIQvO#yWa;ROsmYr5;R|FRHb3UbY|#UV_pw zE;Y4e{QWj$t5;F6dFzh1kz%!V2x~%gXRs->-ugwiY<^Q~oKfD@%*)fYx|Vw7q2$5U zRy5*6+ev0$iXB`PCJ*S4%!`-HE+M?C%VEu@ z9)7%Tz8o|n>}`%TARNdc)1t0+*o0>UoC?!QUN?TISJ0DrBzccoM3H(-o$qT{=#%Wa zrupvKqxpw|#;D7XQm3z};G3Jw`^Qql+@XdbxPs)&(oW;?&^mb zd*ZiDZWM*rKiBWW4-uoJ0wP4zc9j8WA;jhUB1KKtV>i*2Wc*Rrc?~@xnNeoL)vyM& zuFTo@@$#hR6c3V=!&&FgB(FjZvmW?iS4w~tx>mIfd_Ct$;FKLv)H-OgXX;Ww>lsPA zhY8G9-6pKF06v>pRu+;+mY*!tqb<#yeJ~`J8syw*BPx+DtI@qJXN-vog(PVH4!*`~ z86yDEv}X(*t;jq=jt5EqPBL|ZNt2CBmJ->AcuAyg znVz|G{_Bct!iYuL-aH0^@|dD#E(-bs9)9yEu}#X=TR$brZC>J3jnbqiALSd`r#_RI zrc}|LjAQw79Kp&eYt9Q7`ZFC9ekO8}Ubvq0*pdwOgR|I#rLLo3L~QV%WUKf%X7i-~ zeA>xUTP}7H$+~cnRW;2q@KA-t{#9JqM>gvgV&&6nbees36fH2xo8;{>a%98J2W<*w zt8LCON*&ABCY5$LxCbe4hl6i;$xvQ<|7=W}Ek$fsSSY@&st#V(Fq@9CLJttc3vmu& z+x;OOrIyY=Y@aeaD>|q0{`}}7aF6?7cFt0uo~`a8pZhT1R#W=Xbjcr=%mx0A-+>Zr zrpo5DKj{SH)Na95bFB!jbb}C%_-aqqGTok;d?Ye{4k$6U<)pcZ`y=(Q^SVv2rJr!5 zZ1>cvZoD2d$&RqC60X)RJiIbJeUxQ_${e;Q zc@!!e1Z(JlMV21?Oc5`-WJTInLHv<%t|9XX`Ht4L_trWd)*_#h#ec)6l7`owRap=} zUVSA5!1+$=z_>cAX{`kl@2y2&(>BfgR++R`=l^-h?q~ zvq8A)^N-q-h;4N-4fJfUV;x(Rp=W$zPTBPyinLp;?_UmE3WN=NNkB!B5NDp?L)lmP~yoPZJS}Fs#1!nj= zQ)X87V%sgBx&pX{ug{E98>S9pYg+ z%*$)xNFQen=S$W1vX~p7=Wo{^%mWw5XKML2l32O8oT{m2A@KuEi;Eo}HqiF>J05=u z={+>xiPy#ZOp&iRDH?X|Lt~eXvv|p>!{#Lv8vfr098cH)%^QQQmpjOvPlPLyv)w1M8;v>m8H}7N@F~SKOAft_t9X<=APm~8M z(cI-9zK;jg|MQuujvXhXG(xIx^6u(%{L|Q$=1@>|OIzNKq-7-scRxY-dtGYU2#cCr zmGP4Y5VRR%0&PtJ@?xsO^7?E34Pprl#!(TVPyn=%5l9A{NSkCB#8CK#ggy;#BHCj6 zFfq_?)bi+fvYl%#$AFz_636s6pOPV#gCL^G@oJwkSvAe5Hjke@+s?4iNM7e#e*2m~ z+@Rd*l;l&fHhCuXe&o;|nDW}FhZq3fWi9e!gG)>|j#?Ujf!372ChD9%Xh`ZCf?Zz| zJDIn2yBV|s+rPD42WWT;r7$3We$A0793slEDvf`5*8YCbipmD5SQ=$>@z*6=D!p!K z>GF}I>Z@-KKHd?W=%^S8L^YE_-nxNl(KWt`oa4PAd=oXgRtUkt;Mdp3yD)-u9Twm4 zlp-{2piX}~@tvzyfKw~0ECKhxnELrzZT>RfF-^`Xs@h>)_;l2Rlv@&iBkyU%KmIh4 ze%Fd}+Q5N1YnEYtB-YV19NPOV@6-Ym$Yzz;t9|ep_OfN(yRVRu*Wz2qbIkU$$KE>4 zvYrNxhN^dK+rS_8S}N*5{aA8L%373>Z<IcD(`1z&}}m-RIh`MtvD@?3u;4 z#pos`@i!kq&>n1s|Fc=npldU(R^oMfn>;}vR9v~gco$G^ivTj}`>r+9@?I(myWouq zv&TAr05r@QGm+Jx0iH;#_$walIYv&hJyWISa_ZYAP5GdH_d}wKv{Wyg|C-fI@?*lw ze9L-r+BK7qSN6uYND~t8>1r0+D$z#+edaEgiYoQZ^3{D7waAX;6|log_64_IykeYz zU*yS!QdwNxDzLZY5J$I!^4T*it3B!)h+2o-b`Co|50jDy*Pw_{zq)5+^7yl_k{jPV z3pG>4n)_`$x8I1on{gt3Fe*OM174id;a!BI*RQ&~Q=V6p5gS&#sGh;%gwZK_L$p$IjA!Fqx zNq<(f=`J7L^V>{W`YzyeA-L)aV-g&SxWZ6!f*Dvn+By#*R(<~PNfRQ@zqX@}tQo6t zF;}{X0j`z^^!x>Sz;nQ0KWeG{dXEL4l`7CLkt4A5t@&F&u~qL-8R8OwDL<)aQZ-O| ze!yn^fT!kw*Xn^f<$!PEfWN`*Itk}hb;5{7T;tLC zS}a>TCa_8f#CctWXxHfOSGO*3Tgu#gS)hXqXCo6N$zeC+!v;ZhSDD>>(^7$fvZ3Qn zvFRjA$A0l269SwPvEpu6#kN~zkKe;Utr)!y%Pq9nivz3pn;!u2Ku-mgn?ZK(Fdnvz za9>V!fEox9ETMp9xt3~gj}ScOh_Uup)=YvPM8KnV#O6JMqhM=vaaduAshqH(2W>9J;OF`T0EmJ3 zR3=8d78o1_mMQ_CUt>Vgg%=1G?H3_z)U%%Mc44E_r328W!y5M_gkE`AOayAVyf0sl z!A79q(-#U@a`d{ZFs;Uz#`R`jwP45_Ar4+uypsxOPDW}5Os`?ggg7%oyFkH9dWv&l-m+l=+EldK zi9W<*p*2}{tGZEp=1_)Jyi`#@JPa7x%Yk3{C?h#wq*`oLtAVWUF(x9xM9_Q=TuyiA z`x2OO!?4g@K$Sve!w1`j>quxDS3UtTbp((*;!>|4d>+N>VNB>_%{x!ZL%$T19g<#p zd48mVcJEQvz0FNQ|8_2KfC%)UQVmyKjM3xh=}ijqW2}8FCN8L%2y6d&om3fl?&IIk zj+NHngCNq1J6D95Wva(Es@P@HP3>Ke*ZwTKOb0;ro$e!Re{}}O_upxh2j4f5`TV@| zpYa2~@D%w8n9<^MvYJ`|`lSH)5RL)4WXPBB-@byTyXVf`tq@@#5nnB!Vn7+TRYWgK zgB)boisJ5Fzv0-J>*$?w9Q|nM(TZBLh0s(;%Tolrj_I#s;4#A!#&bN12qY_!@<_Ko zV-Q=D#UHy)8Y;c*HOG_&W032Z4Qb55>b$hS*L@De5^>*C`D_JmL;@_50(dAPPBA7H z@%k)$b(AQ>7f|OqIeJrq@cil^Cu}si#6g9D{p8^HvIM=_=hu3l_q=%C#!Toce%`n7 z`IWQ>#xm3^N{y9kjgAsYO@%^g(JP?U3GT(30JxcjGRJ~;RP2MD2$MWGB=I9L$0@`u z4=SQE+Wc*l(2i7ymW&w4qs(0mm3q+v^29&o#cDb^;0b|mC&D{P#(1^Y^NuWrHOWSX z?3eD3Zty0f?UmPS=K|s>F+R(CR#HykBwF~h<9LM9Y)v{CXjrYs8z zVqhr$DFXmd<|ao}{Mg!Jo{I1723G$AW%q8Z@q7Ao`bH9)|FVD^kJTlS;?N#Xk5oKq zQ#}$vJVuj*k^pcw>ZZcQhqeDzY=3c6gMlQI1Wq)bK+%+VR`ah;Yf!^;=bO=sZ9y7u zIjrBYIk%^iq}D1P|8gR*WWV719&R_LC41EKf~@oCmN;$^SY(eL%nI26O><71XhnG? z2=S|ffGTX<@0~(GddyBcC6P3vhJ}nuHs-kdQ?%s1&6$)8c!cjvtgQDIEHHT?qI0IM zSTiPuAmko^FmAHwc82gbP!-*<@_g&cx8LuZjsJ%Qg5(7^ScphlQ^k`g7YQf#0&4bA zDM5-&puSdHB#7mxE1?N4^aSgyG&6SE&|%(1s@aTc^}?k$=Vfma1aEkZH~md-+K6wj zEPq>}f)QgCf{iEBMZJwO{!Sss6vBJ=Y}ZjHnwyRTzY!emqLtRWkz9^Hldq#fCesX_ zz7QIBV6syY<|HqBYD)n5%(+Aa$3kP6d{@d#DnqyinP4qrzIg_UMK23O=05lltSIi3 zZvO7J2yNOM^_S3LTp+)=D<*iO@arS^A!g4jXD;G{a50i{ONux*^0>awBLQOudmv?} za0YY0A>(wQW%v7K9?#-T@$E91Bm)f&#SbWA34}fCZ>5+(eank&2lM|Iu z$reztp?{_gFS!yyjLu9ii9}31AWN3DbZPLZ`|qco&tER|R9PYxINg3#9c&pV`CaDW zc19B~84-btVJCmh# z<%4$1@}c3BV^5!-{vLxlFF zUoK8UIdbsav~~2ZoCG58@E??*7X7v@Itc3!{tP#3Q_&F$F2EcP!Z%+e=wG| z*Kg~B@6Ani^)vHMUq+-mo)&&Kys}`_t{Kwu*|1%6NyscO;-imQZj@bawC6ujcHLZ` z+}P~g&2TQgGB>V1H@-bL;bv~)Snifrxk;aLx2kg)I(f-vaNah%ycEy8)bPBtt$EwC z^U~owW@TPReO_jJ-j17jSz~!SU*+xkl$U+{pQgiqTD~tP{mk3rxo>ayzTB<*^0N1> z4*+(1>TP9TucMWCQxT}PI8GkA@6$e5y${i0bIern?VKdxw;z;m0vgx98(gJ8g^@Yx zaOGBRJG<;A%q|~eSG2P+N-V!cCqErpLgBBHm2BQ`>CNU`RjudV!^q_dB2 z^R14?U8O*nvJ#gdy&xLmBFw2X%Rg(E-{_ey{$#l1^v33`KbmfSUj^Vy$b7454jn1E zc2*^Rm4ES5e!DvVY&e%n;qO%d%x;W{f*&sX0dJ6U=~Rrgvfyfc!L|0EDaWyKDtymS zLGP=dH{KQ8@Dy6nK~gV&lLDoO;BS}U%@O=yXTfk~;YfYq=+HmjfIx>{d@dhTRFCz) zfd1ZE_`s}a+^%RMUDzC6)KcHu*v;QU#Nwpf-t95LQhvDo{KQz%i&sUTUb^J-HmAdi z%_?41@YD1d|BZ1wi9cR$J@7XBz`JkzFtUNtcB`3-~uq_WRwZ1E16flqGp5 zD)*hNR|X7^%{~z%O#Z9PhQGnE>Rm2d%`TK2xEq3m(@>czj4uFfQRDPhGnM3iK4FPt z)|}FOK&WRE)yDj6F<5TwlJjBiv!~^7l|{he)fr!`MvtuA+|fmEe8Q`BOdoB##5!hc zo47ZW`TlPkxyZXjZ%yU`Wn3I|+;Qi;fhD-rsb$btxlr@h8WX)WQ{6f5#xLynX8W=y K-wuZXHvA7eh13lI diff --git a/include/javascript/tiny_mce/themes/advanced/img/quicktime.gif b/include/javascript/tiny_mce/themes/advanced/img/quicktime.gif index 3b0499145b16138249f653a1a3f2c80230fb292c..8f10e7aa6b6ab40ee69a1a41a961c092168d6fda 100644 GIT binary patch delta 227 zcmV<90383X0<8iNM@dFFIbje05CHTa0Nm#Ekq}gWH>m6klH~vY{~`GV1poja04x9i z000mG5CA|0s^BMzM*(5QF^Yq?aN-pZm-u*0bYu(CX`{kJ09hzR8jA1nFc=;I1i}-* zh&UN3gQ8>%6atZA!Po>HhybADGDxNw$Vz1J-~b~4p~2^O5(#_*c~2V=8yik4BM=j0 z4Fr)&0UZz>8F&&49te0MLTPLh0xd5h7HDc85iSo73?2?62a7v62?ql{3KA9~00s(D d4vQKM6cruG6&1$_3`Z*mL>d5#90?pD06V#$L8AZw delta 229 zcmZ3>w4O=8-P6s&GEsm*fZ>QdgZYX#69q!*?>zg$GwI3y|Nj+#vM@3*$TR3L00Br1 z1M8Xx>Rs-PiAN3B#i!duZ^><2xGttmfyebDb87<2OdSc{CL@Lh2BW#>6*oIDm@Gcz z%n+$zH>s6fP&8A}=e)}Ti@Z&ICF~C(CD=;)P6+Y4D3|hAa97ETGqQ*)@yqcD^6|*| z@F}yK2lsLcamYyu=*Y9l^~$m{hj9ssDd}-p^Jz)hGw}19@-te?F-j;&@rsBt91;~h dU=zQZh4=Jn22Re?%sT8bQcIL%IAs(WtN~2fJoo?r diff --git a/include/javascript/tiny_mce/themes/advanced/img/shockwave.gif b/include/javascript/tiny_mce/themes/advanced/img/shockwave.gif index 5f235dfc7363bd4957b5fe352e16a7eee9a38574..9314d044709c9845876e08003cf94526fd69177f 100644 GIT binary patch delta 218 zcmV<0044u}1Aqe%M@dFFIbjt55CHWl0OscAkrr|W-rnB-)-sWiJdvOYeo?*EZTUZ7tDk<92FZP8zC7cZ6^!{5foA=r&#fcxVU~k zkzl3Pmw7nO^&k&BzaYPWxU7n-vb2V~CTl)7XS1?E=X7Z`1ywiAMv*2#VFBd|85LYgvAzXDQhZMuiDu+PfJKkO-ozTRZ&Y$(O*kb)7e9F Tb;v#W 0) { lst.options[lst.options.length] = new Option('', ''); 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 842d52d4..3e5c1ce8 100644 --- a/include/javascript/tiny_mce/themes/advanced/skins/default/content.css +++ b/include/javascript/tiny_mce/themes/advanced/skins/default/content.css @@ -9,7 +9,7 @@ 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(img/items.gif) no-repeat 0 0;} +a.mceItemAnchor {display:inline-block; -webkit-user-select:all; -webkit-user-modify:read-only; -moz-user-select:all; -moz-user-modify:read-only; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat center center} span.mceItemNbsp {background: #DDD} td.mceSelected, th.mceSelected {background-color:#3399ff !important} img {border:0;} @@ -43,5 +43,6 @@ font[face=mceinline] {font-family:inherit !important} .mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)} .mceItemRealMedia {background-image:url(../../img/realmedia.gif)} .mceItemVideo {background-image:url(../../img/video.gif)} +.mceItemAudio {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/img/buttons.png b/include/javascript/tiny_mce/themes/advanced/skins/default/img/buttons.png index 7dd58418ba7cfe58ae7efdf174e0b223fe3aa6a0..1e53560e0aa7bb1b9a0373fc2f330acab7d1d51f 100644 GIT binary patch delta 2525 zcmV<32_p8&8NC>gBe7Up0)GjqNklW6KNnY z5Dmy?f+RtfI3miXgUZ$l3N2OYxbJnZTdVCj)}{MCZD&hL34hpp-*fJkN9^6-rttRd_kS0lKeglM98q|x zSXg)|clwtWRQ;MY1qEx?toa>1R4`M3mjVKlOJfdD-oUKKN?soPS!gqP#L^XT4aOn{ z<|RX4N|~K3sI#VE=T7#D$4&spi{!Bt^$m?o{QUC{rr%gvO7{Aqylm?0S+zX;7S)5x zYH`$|q9m`!4|np5D1R_fYSKe+^>SWz0Y7FK1ysuqN>D&2@AB2F{;N0@haxPiQCh0& zhw4lG5r0WZQ4t;*Lqq;NdgWD1{6j!LBHsQN0n-H)T^-WjVH5Nl`Db5R>T*R~PM05_ zz&}62x_GwK&EQ;@DGPWTGSzxvULAk)dDV>VGDjevLnadS|zjKJgNr z`bf8#+LA20zq{MdV;qyd)>%W;u2b1cxN5qol8KVq;TnzZb$VIutgWfp%2Ix?b*q1c zp^rpdy`U!2+}vDCtV5;l-Wsivb|!ywlycE%FI3t1UC}6o*QwN+^e&e(+6tmh&IV$* zwKr1BS*PP_Wq6=`xrq%|~+T_C5$Ej&(aBhffVASe$q7B6G zIup%|XhSd0Mu0Qgpy>-sR}42bHT5AGzmv^*wAx7)^Unf>~5$T9%lO1CJm!P4FXMOHKz$z zM=wnfkZ6UWhyVA>%nC?#J^af}srE1Jej#Va#*O+2?4ajYUZim8X-e~b+=1AA=!;Li z{LVWs=YIfLPf;Us>ZKfUYN0sSZPfdXhr^3GA$+*;eW5Y@_20p3+g{(S@;An7+c>-4 zzH{fVD(lz(Woh*EW|q5i=WXKKaHDYeKe^uY^@!eVA} zU?3JNw_3}~%v4||MYYOBD+pBBK=CiB2=GM=ZK74QsnEWGf%6%rzj!7P2v}t?l}eTC zl$E#0Ct|T!SuA#?$iibMaNC?>Kiw?CEKd zzJCvBq=2zAM1~_he8t?66 zfn&!4^f)$wyn6yk5sZ(EV*dOH)4w{O@AEl)KA*H@%a$t8Lb%;&pMYYFvGMV7tDQ2w z^uMR<7J&^Nb)p7@Ek2(-Hpb#JGc#^?{(Oh7_Y#hyQXS{kEm_{u>HP%tcr7sFmVeV; zGlCm7l_N*oN4?%UH-)z_WRu>~d7~W&AKja>6GxBYOY^mRsgg|aEiHo5uHm)287)vU zr_lbNqZGYW2PCP^q)&h2+XLDKi)GP5+_T)9>fh5og-X&n zYuzV%<`96qIK=6}-Q;lqal;oUona*U5Yva9&^5?HCzQCBYQePB^} z1G^QI{#~E1|9S|__B%kDaVhkfLtwn|hPKge|6hpk+D-7KxzMN35)ad9$LArF{=NSG z{!d2}qobpb=6s;j0hH0v{xnBWfu(a4gfKE85W&$|9{#7pap|+sgr+|~pMU?=SC_nV zeSOzIPT)Rt_LyM34W+BD~pYLNtW_A6!EA8z!ZnXCe z{-Cr!8XWBV0fzy~;NTt~fi0#gpAQZWzL(Ahi@v_WS(w3%#Nc3J&U@vYs=s*VZae6k zo>dfO@8IF5}l ze2%BrIIn|UoVTuFde>WwT^d-P#5C>en7nrF8d*jxYW`2>4Sop9r3$7^9D z0|tV3X(>MKmaTjdTktrvwvFjGojrtexg~ch8%eTiL$?HEDrQFQ(o|zg&NduBtLhIO zr!H+##_1SX!$S-&LZ~82VT&b<_XeVjKkdaT)8&MZn3s@_Ho}t76Fe-_-RMhe8N;d)Q7$ zgh%o6N^}7$y zR~4_W4h0it*_&N5iO~AmA~pIUX&|1-eOHt8eKM$d&WQn~arrTISYK3<2LI5tZb~ra4Vor00000NkvXXu0mjf6xaGA delta 2666 zcmV-w3YGP}7|I!tBQpR5XF*Lt006JZHwB960000PbVXQnQ*UN;cVTj606}DLVr3vn zZDD6+Qe|Oed2z{QJh35N0)GktNklOuzigg*>~3$W~EbK zkJI3gRag&Pk;36h;(u!ibKpZf$s%$Un3eX0^;fTCr3YA`hg=wxWdVv6yUWeGa`md^ zYPZydB%+pJHp})s^~DyqrMS4T5Pd~@dMsJ!Oj3(2J%GGL`1xNDC>B(BwMYI1lfb@) zTzj)wuXpQpdJ9~Ee*nbvVdZyBfC9gXDU5y?>5fdiK8l)c-n4+B;1rlzK9#2!fM3|C1>(w;0$9;EYl!lG3Qi{9fw zVrhld3VXd?=YR169vz_+(dP}js|kB#^j=K3^ni>w0`h8!(x#?9g}qC!cX=BCuM6&( zm{HZxpeuFbq|$0R$Ae@IeR~u%VLT0CqICm0PlIHiXU^_(xm;m9ufe020DG5mHvqWk zv8uF52_Ex?yhN-=D+`4b_He8EJfV;`4BcMHBKDz>n13aP=+L^rCKL*n%DC}jfrgM* zj~-Vb3=*%x-h&8rgsVIa9UY-C+KkIp)zOjKN-D+E(b3VTO9zdHI=n;%MjatfU&@~N z!#M213$q)l`uecF*CmlkfbI_0Z>#|qtPY)A$N-G8753)rKWsDEX0yWHoW0$crGIJn z#nJPOdwtjmu*fKZ%u>cXgG^6d`tnH)&sRp%WhF|=p(lZ|$`~53maBoH z-%@TRgV0nnG@}+l^J1|}>)3v2-fFed9Fs^S%4AB)nz{2npRdH{JKxN49BoCRYH@$W zp?{o#0q%5JIs7UqY368gX)vp#Y<}rDwr^itVY<4S*`KWv351npCs7VWCVpmtHLEXu zgA50~9E00sJ|D+6!*ZnMSyvXvi2Z8Ld4^_ha?A+2j12SC`joL+yT)&F2`hXO|9YNa z*qbWVI0T^SJ`BU%+!()E`5c@1%FZU(@qg22pO=Ztdper4`U2YzuI5l&vnHuBOb-uF zPos-DGCVvyLM1h$3^2-!T1Q7KRa7#WWNC4O22B!vYlf|7&sx#<>?r6Bqo71nMn)JW zXLS(UA79NenY1R8iEU|VsRWu421C+BkuaJb9vK;-HArJh{(D@bqHt4N$HFYWvR_B)x^!$Fg+_ z`{WO%UZ9OqsWw!Id#Zcm(cU%)JAcDM6xkEU)v0D5_CCZ?wnbbe7$VoYFM4M|%;M#Z zkKa=%?1Mq=>``DA?q2fIqem1%I66bA2rpl1L`+99GgO_7II?{7p{Q1!g4w*n{(;F9 zz3u>JqFNw{S$2G-#W~ceQ_@6@=6^`$5Ht$N(5&OjQ$+qKnbdymP}qMIjekbJ9108# z4LzPk&qNS~@IymU5|pGwz$FNxA&0ar0v@vs%@FZFwc6#ch60lPrPZA8zFQV%Ba!Q$ z2jCz?AD{>mABo%u27~f$#FXoiNTioa2Ms=s%z!aWFqu9F$&75jxYE{k<3?K~{tMss zI3ADuf;JP4^6_{t&ItyUDSuzbA;{V5}yfT`Het49+(wY7DfA|`Mc;*i%iY% zJbyGkHT9SmAYu90l#T3zM4$`yYck1CO+7QEoPR~#FdBU}^$>IqqBbzN&M)7cUm}0C zmtwKiyWjq4Tlx0xYAlBBFJFS!$^1&rwz4u0uag(>I&rT5c#<&IK7UBw$JdSzwzm(C zy@10B!n?p>!u!{t`|$gi!xAt&2Hj|0``EQ>*O1F#`}goNoV@Vrv(H{-0C0s@d86~f z`sMWuaC!X#6e1Zeqtt3TQ}(o4O{twvP-&J|k+(mMyb40z{=L7CtX7KmKXIxl+Sa~WQrB0pi^&f|09 zya82dI7=<>51&YtmLS~*j+Ryi+Qh`}R%~CpFai5Au!clBEPqQ&O#`aZI25KttkOis z1efk`Zb7u4IESjV4GwmPfid_p&J9l1GOSaja&pS)3G6@e;EDw5##NmZJ(A5x{!DLc>`uo9qQq30%Q$+e$2XEbV!Mk8BEAO(yeX`~ck zG*oGzF(xS|s(;c@Q_H5RG+3C?$caikUABMkn2}UztOUAam0CfY%0g_a(o)e-rLls* zVi{Q@ckDgcUZv#`lt$ykr3KC~@`9KIS!7!jFC$fHB9)aeM#SP0752#=jDCQZt2B*D z<23qtrM&atqW=vISyu-0YmF9m_mF9QYPRUh|*6$cNCff^OZwnwCe*8?} zDlHH&Zm!a_ShZD^7O=@h5AO&BWcwon=vMjdc84th2b6{2?RFmLq*rMUyWQ^JqDphv zZA1+#wSU_Kwt*u`dmh~UJRd-l1<4+7h3rL6fo0f*%~hH)0QO`acm(`{!hRRBhjBPU zvfaT80=BmqB~l5{Z8xS{<26faV!-c8*&jKw>zhArE8pw_Q(|8Mt$|(J%mA38e`(J3 zC*o_kwYE0Zs;zBB$Gpu{Y~792WS(eJTl)lFhAXt~RmOlB(02E9v#?C$X5eP{z{CIq|Noy+{K>+~z`(?y1LA{Z9GJviddkHn8j1n{4_XQ! literal 70 zcmZ?wbhEHb{{R300000000000 z000000000000000000000000X`2+<305$+D00000ECE^oKnDLnl0#7_8jr}Na>;Bu zpU|juO08P2*sL~N;aI-luy{-^o6qR9dd+UT-|)D6PL~%bkGy`*@B9CNfr5jCg@%WS ziHeJijgEhf1p$(il$Dm3l{K21oSmMZprN9pq@|{(sHv)}tgWu4k(jcxnXk6DxVgH! zyuGeAz`?@9#Kp$P$jQpf%+1cv(9zP<)Ya26Dh1Zt+}+;a;Njxq$|x+_0PICJXU$+M@=|DQm87Klf*sL`WHlPX=x zw5ijlP@_tnO0}xht5~zfqQw=HudiUkiXBU~6~nV=)3!^{fP~t&aN|}}@q(Y+yLj^k zYq5XAuHL_Z&+ZFMxNyS3h7&7Z%($`RWC{+>)y?~x9{J;g9{%XyugJE7?LYr&b+zv=g^}|pH98H z_3PNPYv0bjyLavdR!$gCzP$PK=+moT&%S@X`}gqU%b!obzWw|7?K5y7puhkB00t=F zfCLt3;DHDxsNjMOHt67k5Jo6rgj;oG;Ur~csNsejc9{Q4g%?`r;fN%bXksrQhRD^4 zEVk(4i=L#Y;*2!bXyc7I=BVS2Jobp=V?YK8&I}7EAmouqPLo0lekJMTlf;w&Lz90{ zR_P=PE>LOZmO%>O00UfxnIvLjmiZW&W~QkanrgNg7@Ka!Dd(JY)@kRRc;=aq0|XcV z`m}aW!rkr-_>81sY;K8V*mTKy$ zsHUpws;su^>Z`EED(kGY)@tjmxZZzSfNK@>>g%t-1}p5a#1?DpvB)N??6S-@>+G}8 zMk_6}1$=Sbwb*8>?Y7)@>+QGThAZy4TttntPickF-h#~^!L zz<3mtZ1Tw{r>yeIEVu0P%P_|*^UO5YZ1c@H=d3f%TlDPn&p-z)^w2~XEd_sBC9U+* zOgHWH(@;n4l#DwLYW3AvvqH6wS$FOA*PLvfBiLk@EvVQynyvQQC!&2L+i=INq1!gf zZTH>2&|M?meE0o|-aZB{_~3tp7jF3BI_jzTK?o4wz~Yb()PW3IMsE2#F`!WS<(#Xt zeOJVI_t1MV?tlC*KSAq?EnqnCGNaK1848R8}obc#0N8c z@x&jGJn+gd&wKOE-wu8BwNFp|_1I^x{r22<@BR1ShcEv4;BupU|juO08P2*sK-{DI5ae zuy{-^o6qR9dd+UT-|)D6POr}wh?;)S@B9CNfr5jCg@%WSiHeJijgF6w1|lLhBbJw# znVOrNot~edp`xRtrKYE-sj91}1~(+Iv9f=&w6(UkxVgH!yuH4^z`?@9#Kpu0B_PVn z%+1cv(9zP<)YaD4*xB0K+}+;a-UcBd9p&cd=;`X~?CtLF@bU8V^!4`l`1$(y2IUw3 z00RmfNU)&6g9sBUT*$DY!-o(fN}NbhqJaw@FlgM!v7^V2AVZ2ANwTELlPFWFT*-g3 zrOTHs4QR|jv!>0PICJXU$+M@=|DQmE3LQ$csL`WHlO8odQ-jl|P@_tnO0}xht5~yY z-O9DA*RNp1iX9u)fCLE>(yCp{wyoQ@aO29IOSi7wyLj{J-OIPHU%m#?QW#9Qu;Igq z6DwZKxUu8MkRwZ;Ou4e<%a|=2*sy)y?~x9{J;g9{%{ytwh>$dfBy&b;|@1Gp_npH98H_3PNPYv0bjyZ7(l!;2qJ zzP$PK)+46zyJRL1_8GHE8V0AGPATfCs76X^sZplt>Z^dR%IcG_ z)@rMqvd((zuDp7gE33T*D{LLV&T8zj$R?}ovdlK?EUU#nEA6z@R%?Ilwb%-P!?xUZ z>+QGThAZy4w0tntPicT58d7HlKo2~ZR?V`{^+HA)y_qZ>-J@?&s=dJhN>ka^c1AGUL zHvxVNZg|`(!hQJSOFyYN*03sFQqp z>a1_Pdh4)D{Ce!PCp=4g?YI+sd+xmNyL<1z+xvU)#J4+q@yI8y{PN5<@BH)7M=$;K r)K_o)_1I^x{r22<@BR1ShcEv4aEJp$8AWOiVm@@lvn$rkBQx*((~wsDsti)R;g_q_hM}13`8R z%WhE?HvHLHm=)%o_xbs5_kGLD@ND0HKK6+LR9qKlBIArR%La&c!H|Fanm&VkVwq2b z6veEvozK@1tz4~PDOfjs8H#3Dwd(eAxFPokvl|z;9<9QDxC_4zt4&aoeHTKh8Fo0 zLV@66`D25_aF_4Ff*CyQ?z1f#&OoctYS5z5qSZJV>lW_Q zFCkZ_z~Nz8VOo53`hS6V>ZLT9eRgHd;}d*74}ikgBzqaP+))Se~}=;ILEfx$KtWs zfF58lRUXlUgGb=tQ6dTynv>A{0|oZ9jU!aL5i{Za=t@8wX^aDeei6KN@W{cpB2H1T z4Nf;Fo2Rz{vt;aS6rnM6qo`|Dx}b4%&q#Zn&~Gbn?%=ttFiOE?;Bxc#Jj5~{Bm{F$ z1xb|5jRtgsB$|I2>}pLD`puAmmITa$^+C z;9<7}M;k4mp+{+;0mFpGz+!`!Gdq*PR#0hLR8fS2eOlG{wdc|7bat~+}#x@QKK2OT2!9E0};PT@0! zkHg2_d>wyA7VeHMzz7S7GO{qTfY+;oWR6qt10MJ#8Te7<^T-F!76H81n{ zMH^UkZ4X5exh^?7GGCK+jU`#PR9zB<8tocu7-rS*Eecf0DLFf1uETPWbf6;vJv&dZ zkl=ObT{3$qay-gz3PpLCD1OI#WR8EG0_9Ow$7Fwc2cUd74v2~(tYIUWTNDf=* zgmFMccYq2Ypm?d08Kh`{Tujb}F)2|}f&!wfB1AQY654d6)%6DH136EeIK*;LSbc-Xv#(-Ok`JAj%3=LGaqRKt?EI!@J-_hZd!_ zggBwr7R7JglKJ~C9vHOb2FY2y08E?*CZ>N#O}t0ytN1uWW`u$p)8uZDvoo8V(dkf; z4?}QfIuI57bORZoKrA^SXSwzTJ|+rS6_mB;Eml3bpMu5|xyEZ`>}`w0-JgCGG>Rz&zY zR>@Z=V+S#$oCqWV4&#hV@X{}mag=|tfWv@*3!K3?+@so@qV<1eCE|Qi^~|*EpkUSj&0=o+V`{W6hG*+M+5bL)?F%wm8IE z7AzS<8T%eZ6X#j+B3>J>k{P3n4N-9hCqio4s!;^L`EfFH6O^zYIHOK90CgBuBRJiM zmkY^kql{IP1Ocj&7~?P~s>a}@hRlDzObJV36x0BM3aDc(dWls}7|Ph6{!EQS6hu@= zIo9&Fl6mI@C2ak-D8k$*Dxe?&bEA6X6h6oJ?EVk>E^TIJem(5~0000eq7#CI)kVp&dhaEO-g|J7 zDA`T4Z}0ccIcJ`k`De~~&-2bR6AarT?|2XZsh76JD*zzB|DWRlxgVGTfXv7R0(tVp z+0)nam9wW8mktEN<>lk)83z#7%0lEzGy2ROI@2C&ebFA>fqVT$WQy=M(gwX?PLCNZ+fSM*=SbjF2 zDNslN*p9xi-v*wD0Ji)H#NG@LmXFN|#se(Vxf$>ZQvt5~j&T}*vm#J6`844%022r3 zo%H(TfdvsjT*ur=8~D-$bWPBZ*8?OJfVgp7v>-qb4A>6w@B{!+IRL%pnYq$0p&FWf z5Uy4^^-5@7`N!dwBqH9#=H{ZD0uwq+LiDnB_v~`jM0)}eIV_Ul($pL0V*pT?%7DxF z{3c+6s%BzBHW@`_BXZbDboapCe*1QJveHWp05*L?r*4JC8d$>=iNf4(iyxj4I6o&Z z^ur`N)l;i|1qu(A%+J04tIp%1cj(2%-JP8U-9B|oyAkt{TX>I6m-)@hKcPz3n9Gfh zE#7cRgmt(U0d}Kj>_WeUeeykNl>N$Hiq>@#`Q0_g%!581do&D0zimwCove|YbS_!) zAYT2wVE@DEJBO`x;VXQVbs6A`s|sFlsz{mj3;f@D{4_A%t}P4zoV9v(e-|LZ4|9&( zobAd#_fae;#qR^2B)j<*j0B973gT8>-F1ne8yNKAk30JzwuWeQWb{)$%yNiHZ6(t@OoqA?-XAl=rTFhD9vK>Zw|f^xhaf=dEa~*S(TGyi}t@& zI#VyDs6YnAyM8beOZB}J7aizTuX`j+n)YI}?m-nr--7m!XI~$ z$`bgibJ=l%wPE@&!v*a!E_PmN+9gti94UU3aS#84v@*R$z82a)ea!Zf60tCCVV*g< zl>1^d!Eum2IbOPWh$KJy-94SU&(LYQY0YU56P^R%@;qs6R-UxsB?q^9V)=AoE}^05 zo&25N9jP6*9quzrvV40r@6TA%Edi4eS6!A}nqBE#BFAh=u-T_vlhv{!D6I@4<(YbQ z5z3_2IJWG*v|q0LcqF5aUP*Ov#tf@7lQYJp_J?l^?P><6Vb(YE>CpqNA6Y-}FZ?Me zV;CX_^RDZ3A57FIXA^gt^@)D`Wh^W%~H)#uwkb2DN72aI_{WSCkjY zL!@-2%o|M3)16d_x3j&mAAAi-_XUty=b;H}^rwPbf^4PI`e+G9D>p<%W>zMwQoGW) zQtPN)w&oa_U)uh-)#56g3OuOGZ^f?#PnjUh-#1+}T}6^184Z*bE^9<9+)CJrS~dJT zJ&-5a1s%`B3iLgZYk}?if7wICZlE{rf03736fmL&3SOdRiV0?=ei?61B@VH{s~cTiCuH8Zo8xX;$;CCUug_fYmndw)=qlz$ZQ;K5jlegF}OpToVIysbHz1 zzM}r%_}F;y_*{-mp0dQeip`5bFI~_NLnP?FwL;CU=H5<ao^gb}YV@I3c&f0LJMrN}HKhL{^FRy^o1~dsklIGw9~JC# z$v4fL(SkF<(XS%U;}YZbB1T2CR7CUG23CjKcXWL(y{$KcrZ4mJ8uEIM%a&_TWKUd9 zVpl$nNq-b9Kv+n<`qn!H*)ZOnQYHVGA?~(b6>0=A3WtB)=Mj4$mTF!-|D~zKzXD@- z%B1pJ#pmO;%C?f+n&g^=&6r$Q(@@i>QLkr#P4qeh!E@(u7j!oTAj2Nw!SUn6!Qqzo zuCPIGxI2?o6_y=;*DoG}lM2yb25?G5b;NFWHMjE+;@@}G+?f6BiPQ-fs^}-7Kjyv> z+wIvU_J&gMN5@8+$EYTI#lcvoB(h}ur&b`Z);0cWWNNJC!6l63YejTrKq?iYu1ZUC zEz&Kj1ENkAW3#Y)n9fT*c6m`yjjYGZj`i!~^VqHYE%NPPrfjhxYp=kfiJpsSBxAWK zov=bCLQOx;@KO3tFb$}TG3nviegB8aWPv>#J@5x&Q?gTW3lJ+1r{S44$ROzbzo~69 zfxP`vCBnPtDE{(yZTgh@t9c3qjJdD5+$EJ2+9e|2r@r%6ui!RFL%|Q>drq%Ms~n^2 zZ~HwGo5VOXh=<)8-c=D=h>)SwOMgJ03Cx3t5%q9KbEnSn_!0Tc$^xPBMM(@qC_Ya#`fRGAf7ds$Q-l#5G^lI+dE+9FfBl2$8vllvhYB^1{yxhwtqe6unG-tFq8j|C z<2L`)UxZSY((LVrfh`^{jli7)4Cy+ClTu;nby9HECh^QauQ}ixVy^1BXSterrny&^ z_LeP1V=7Z~higICTFd`Xe~?zP2-H1?4!bNJM9ieY&nA=dGx9@1MgOeWE*GPM5&JJD z)?KMRPg`hwH>V%pCGIP>DNb0OHT#~`FYn$rZ#K`ZRj_eC^gUF%O`9O&vE)`o!V&U4HrV-&iPN>rRg{1RT@iL+8qIY_WAV-RVk5W000Q! zU;{7!)Fr>UGET#-xn5|S7yv-fLjVYi1b{zxxcLA8{KNs^&=vp`vH^g}^Sw>KW*s*x z0fKl>M*|EESW2HqSh2x5x_;FlMbw{#z?!Xxb^P!U?hP=H8YyOQF)d=+$Ew@rMHTAl4iHTYE0SO6V9J(;W z9FdzCNXf?h_xbsGUYkpqt!JJ?<&{;V!(p`Ol ztyDSZw48y5&^SpGzve4rv!w%9=+J5q??}9UWBi1zM;-oI$1r!kr0qvI7TJxiwiy^0@Blyn z1On-He{7*#jFD%>;Wk$h-5sa+g7!&*L!#!x|2Pp*- ziXSEKv3b!yrWELqtE~GCdrD;W42LBsF66$BWPYppDOHvg7il95oYIEd)*WOs@-TU$ zqXtf#&Mbz%tO&h zO%^eZh#hx~9UU1N8#cGdK~pSO2cR>C8P*7_%>0@wKxiljqmAceQ4(~oVJqL~G!tgf-vDN;bl50PFhP&uocVxE^353}ii64% z;SLU(tWWX@THZ)@qF&Ev-EIQ#4lOZh1XmnganvJi8Vyn~4A+{H8%-tCoTWh_HHNjL z<8ucMmuPg;q2J-vpX=koE%sefzd$!kpO)hc4-C%oeU zq0vG9#~9u2lThkyJLb}+_N)U(9M##cV~k_+6w_qnkli-vksF}{GZO(y#|6(zvs~cJ z1KV~=oDA5;?{aq7Zm}Wd?1+Cn}}Hp@*-OkIBN?{F>5 zV4T+}m6zs`6#gwG3Nss%BM7jUr}%}o06iIDWC}rKx2*s(84-k=0qb2(#q4q0W+m0Q z{RFoc9Wg9JPZ6zNR4BRfEBkx7G`7-*W<^dGhu6=oCiOm=ZRnJHI`&JWeEw1Us=)tPEJlS1vxl`Z%l1&Ho#+JV<)MosZ}L}ODJqQ zxcmeuZxL^;6qG(tsd_)9?7&Ku>oBWaDxysV1CsLgoBsqRZ{Lo1vk!WcpOce+ki7m^ z>~m-}W$fPGo)b^Q)S|XDT~6Lxjp9_awgyXwm+>J1#mC$Bl>>Tqb`}c)M8TC{5S}$9W_m=nf z@b&eDvV{IMsTVT0#iEfr1(BLF-mUG?sF~l4OKT65GcllE>JW>=wMI);SAOXdYC3|{ zEUmcR-CbIZ=LM2)#4~=28}QQI>G0m>Y4i3OiQzs$edJ^YgXtR?E$(j=H)IoEH%x3=SpS zvFp0!U8d{rbHB&TKb@b$*==15C=_OGZE0y1uDA=nwRR6k-46`?1)4lhRGPedyB}Dv zKfB?{e>G9txEWwYLjaCL+?mou?GtiyGHt0}2WCuNn3mhD(X*$Jt6R}T1srM-s)${_ za(_gckjT}y9l_OSwlNWoYbF36-^jIhRBu!dXSgwZ`?amH3bh@M#|o&e)3aMz#P>h7 zN2K)I*JWfZ=nA9i=}iA@8&FYEO^0!^vtPLMn&a*g=xvR#+6lY`ARvA62(r!>rz2ANhRI*qH;b7AwQ7nN8@TH#Ws&GcSz85IM7W=p+9@ zRI74y*H;0$iA=)}@wHcH>)3TL_cxy(uBoX>Tjg*4KU!L#8?ha{ezmgtG#WajIMLFG m$9hVqYNgZs*94epU`y6#e2-qmp8{7)K diff --git a/include/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png b/include/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png index 8996c7493e8a58c9c40845cbe8abdc3e6730716d..7fc57f2bc2d63a3ad6fbf98b663f336539f011ec 100644 GIT binary patch delta 618 zcmV-w0+s!k9g78!83+Ra0086$;ro#x7k>cEP)t-s0002HySo4Y08>*_a&~-=k(7~{ zq?n(no1(0rrmv!@vZk!Hsjs-Lv%9dizO=c)x4gu=z{b14$GpMFzQf7C#LL0P%)`gc z#L3Ub%FxKn(aFuz%g@yRt3Us-P5-h`|Fl&9wO9YQTmQIT|GHxTyJi2qY5%`%|9`=9 z|HF3w#e4t9fd9#a|I3O0&5r-ub^qLY|J{H8--Q3*iT~k_|KpSYd|L3Cr z=%)YbtN-h;|LwH@@45f*zW?&W|MbWI_00eO|F&Wq@&Et;0(4SNQveU|I_8w5<1)+Sxjy>khxmTZ^UMAPuDhl=nJ%xacLVXE zN31WKSh0P^hawhnw)jf}#5_+GPu2e^5c51aiV00%6xVrr#$!*$V|i{OPJb2GYE{RI zUk${E_f%7X#d{l5O*06LqA`1W{A{z-KcE#qKx)lR6a_=R{wHo}S^x<1c*Pfemr)l5 zdENxVv+rLvA{OzVh(9zy{H9446TMvi`r@7X*kwhrq7{r{OWVwhm!6C_^4vrmA^ryB ziMy8mgg|d`WSser1qE6f|5sqVKRBqtZ!0b!I11C^6r?oOYvK8FsKs4z{;LqNh=&nh z+Biyl2i(R3MA5bJ5E*aeRfzb1#Gw{<#77AJa-hW>&Xefx-T2hw#sB~S07*qoM6N<$ Eg3||6=l}o! delta 3727 zcmV;A4sh{{1(+R>83+ad007h25y_Du7k>&*X+uL$P-t&-Z*ypGa3D!TLm+T+Z)Rz1 zWdHzp+MQEpR8#2|J@?-9LQ9B%luK_?6$l_wLW_VDktQl32@pz%A)(n7QNa;KMFbnj zpojyGj)066Q7jCK3fKqaA)=0hqlk*i`{8?|Yu3E?=FR@K*FNX0^PRKL2fzpnmVZby zQ8j=JsX`tR;Dg7+#^K~HK!FM*Z~zbpvt%K2{UZSY_f59&ghTmgWD0l;*TI7e|ZE3OddDgXd@nX){&BsoQa zTL>+22Uk}v9w^R97b_GtVFF>AKrX_0nHe&HG!NkO%m4tOkrff(gY*4(&VLTB&dxTD zwhmt{>c0m6B4T3W{^ifBa6kY6;dFk{{wy!E8h|?nfNlPwCGG@hUJIag_lst-4?wj5 zpy}FI^KkfnJUm6Akh$5}<>chpO2k52Vaiv1{%68pz*qfj`F=e7_x0eu;v|7GU4cgg z_~63K^h~83&yop*V%+ABM}Pdc3;+Bb(;~!4V!2o<6ys46agIcqjPo+3B8fthDa9qy z|77CdEc*jK-!%ZRYCZvbku9iQV*~a}ClFY4z~c7+0P?$U!PF=S1Au6Q;m>#f??3%V zpd|o+W=WE9003S@Bra6Svp>fO002awfhw>;8}z{#EWidF!3EsG3xE7zHiSYX#KJ-l zLJDMn9CBbOtb#%)hRv`YDqt_vKpix|QD}yfa1JiQRk#j4a1Z)n2%fLC6Rb zVIkUx0b+_+BaR3cnT7Zv!AJxWizFb)h!jyGOOZ85F;a?DAXP{m@;!0_Ifqlp|(=5QHQ7# zGr)$3XMd?XsE4X&sBct1q<&fbi3VB2 zOv6t@q*0);U*o*SAPZv|vv@2aYYnT0b%8a+Cb7-ge0D0knEf5Qi#@8Tp*ce{N;6lp zQuCB%KL_KOarm5cP6_8IrP_yNQcbz0DW*G2J50yT z%*~?B)|oY%Ju%lZ=bPu7*PGwBU|M)uEVih&xMfMQuC{HqePL%}7iYJ{uEXw=y_0>q zeSeMpJqHbk*$%56S{;6Kv~mM9!g3B(KJ}#RZ#@)!hR=4N)wtYw9={>5&K zw=W)*2gz%*kgNq+Eef_mrsz~!DAy_nvS(#iX1~pe$~l&+o-57m%(KedkbgIv@1Ote z62cPUlD4IWOIIx&SmwQ~YB{nzae3Pc;}r!fhE@iwJh+OsDs9zItL;~pu715HdQEGA zUct(O!LkCy1<%NCg+}G`0PgpNm-?d@-hMgNe6^V+j6x$b<6@S<$+<4_1hi}Ti zncS4LsjI}fWY1>OX6feMEq|U{4wkBy=9dm`4cXeX4c}I@?e+FW+b@^RDBHV(wnMq2 zzdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i&_B8C(+grT%{XWUQ+f@NoP1R=A zW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01)YTo*JycSU)_*JOM-ImyzW$x> zcP$Mz4ONYt#^NJzM0w=t_X*$k9t}F$c8q(h;Rn+nb{%IOFKR-X@|s4QQ=0o*Vq3aT z%s$c9>fU<%N829{oHRUHc}nwC$!Xf@g42^{^3RN&m7RTlF8SPG+oHC6=VQ*_Y7cMk zx)5~X(nbG^=R3SR&VO9;xODQe+vO8ixL2C5I$v$-bm~0*lhaSfyPUh4uDM)mx$b(s zwR>jw=^LIm&fWCAdGQwi*43UlJ>9+YdT;l|_x0Zv-F|W>{m#p~*>@-It-MdXU-Urj zLD@syht)q@{@mE_+<$7occAmp+(-8Yg@e!jk@b%cLj{kSkAKUC4TkHUI6gT!;y-fz z>HMcd&t%Ugo)`Y2{>!cx7B7DI)$7;J(U{Spm-3gBzioV_{p!H$8L!*M!p0uH$#^p{ zUi4P`?ZJ24cOCDe-w#jZd?0@)|7iKK^;6KN`;!@ylm7$*nDhK&GcDTy000DMK}|sb z0I`mI`%#ks0Dk}=V@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z000BCNkl%`Zo(Y1Aj?R|BwL*lGFS%byy z6<_PB?8gMKt#y$3n#Pv>Rr3?i;C|+)$6!Au23uMOnXhSV*-V3Q@xhOu1K)$MU%g`FFW0215ys%%osV6|Va)Tq5mdhUN6U~J-AM~#pUO%r%hKW> zB7eusX0zWr)GVVYyceilo$(Yz}V4nP`(d_C!HvOqs3Ng zayGsi@d6C|wnfB2sVXyr<6toNU~muS7Jp%5!G7Wx>|A`%&Y)*EBQp3H z2j^7#-9YRw^5q6F@uMxC7i4t%>0n!!hpD9ts>D$Uth zU#de?8&_dbEojxLRFxCA$%)qMsCas#?K7L3ocQuk8=uZsWj;k%IYs!L-$f*s!GD8v zieLt#8SD=Oz(@w;URN@MZQ$V7nZbQx@b0(d0Q~o0U;$RD%K5zvB-b1urssJhJBPP$ z>+c;#%1@;#JE-3(oBmc<*HFJzMwzRv(wbTrRaXZ%Z590fKye~-XQQ}NT^<@TI z+2lmEK+fpwvFbapEke{2MBvsQY@+%ygNODMkt7E5DS{b1R6Up(%q@Z$j0YI0)Y`Tr tDd0rp<~3DXQ_F!8)>XlC0|M~B0RV7?*50eEtCs)(002ovPDHLkV1i_X4a@)l diff --git a/include/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png b/include/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png index bd5d2550c06d83c1141b78c5af7217e89559fc32..c0dcc6cac2003f7405fff3ea5df7bcf276243596 100644 GIT binary patch delta 2072 zcmV+z2bL86o&f`_+2dMjNDlznH&TyHd_URN{##*Ml(GE~%a^)cgqM3rM6 zy{bondNjd$e}A~n3(q}gq4ulxA1GMAU&Onw&G(G!`w1>rDpD?2qyj2sDOZq}vmEsd z@}xM$9V2sUnzinX>{lh^hXjQ<)2Nkx*%9e)zkkSD0CoV{iZJ)DasnENC6 zO3eKu1`Fo?3BIrvYh2$;@cjI|BpLJbiDbD&l4LPSRIcEBvIVYz{%C^DeJ19f%sg1I zUXySwx9qiQ?A_Q?s9^K`6JE!_ z_bH;j`G1t4avR;FV7+1Waz2(|Uc;urnCmH`!L@zx6WnSxrP*vrv(=JThRQ)R8*>hQ zYQ71wvFg#UXH>6?^{X=WplEV0ExjMW`9Q(y{i(G;wl>F@)APzl%kNj^PNyxMPDk49 z4x$C>ZH`GBSan^CCfK|VA>41MV6M?-$Q72-@G>9egXySHG$4qGvBl01NZ;Wk5IlbdYjLYHBI{RmBx^I0qP8}!GuogJYk_!zN2?;k z|>^JhLf(MIk(!X*D?q~AKKA_i6@c2i;>U72h zvW9WSnu*;0QO^O4*~dEac!Gy3nZTYC^nc|OJm-VIVBBrPr70OKP9f&UTqC03W&Esn zg1&r$XMOM&jBoqFjW1=Rb4L0Z8{5Df=WS8%`SX1EkC7(aeCzViXS5bXT0 z2Y0X`bDP|q>h>IK@dQKM?V6iGFQ4GmFMaSAjBn?D{e;CvrjbbpH> zSZYT^etAG~1(C3BM?2T-$2jhfh{bQl9C+a~3q2=)T?-eCKNy!z0Io?;*Pz!=a9Vwv zk|v7WZ;3Q>ikAq_KzC(jyDTxBt>P zqC_AX^<0AcU6Jcg6Rxes1igNO1%HB#yVN1hs1uGO3tlT{0;dchz^bkOo>TB)1FX$4 z@fJL4d?<45u`#3BM*(u9hDaVqbP-Q5?#$)y-K>@K37&i2hg^a|xM0@N8(;9sjL6Mt zH|t5bU_9FW@rn=V^%IOos`TpNOv*EeI^P_#_N>k=WLEVf0@R`jzIjpP)_)~8>(yci z#xDlx+^gjJD>70sgX1hm1V$g{P-jmx!T9!HnQ=1eH*yGG6iMFnW8nE0u<=`0n!IH& z%5c2D`Dk-1N-F?tx)JaWF4V-Q(z_RnP(IMpbK;H$@Emx17@r^@NAX(zIt z6hrXnr`JS&eq9i){L&j3gULPiTx7w^UMJk?>Rd4d4}W-CMi)#}?T}S7#@|21u}O5n zgI>wO*OIQx7DMphi+=+GAY~h>er9{^LFRm|5z!O#$Y`T|%E|EN<>CouPJxzizZh3= zDECwMgVgrwg-IR-gkeh`tcmwk2}cXHfQ1*&W$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}000UJNklsV|cYlY&q4zsSqY(=s&=iZ>cW|Jxv$MmG9zDvBot+(KW~|_7TD<6H{cAkN3K|aG zcrux+oO=g@0Ya4~{cSpH8q)S^C!RJ4&uZ})*9T~k*=eimkK)R(5Tt1);2fRB?TM})FJ3}Q5GXUb8Lk){FF_3Wx z=iJIUQx^{h5)s+dB4+IF?&d(;*xttO?zotV+(ty0F%iZKw08@d%-%zcDVt0A1Sf#Z z!$i550O_}rB?3rfgC(+rO4veFh#~^8Hy-20_BQs$V=WfUeQHPBy1+Q2J>DBT_nOd; zg%BBtmQXJ}Okfa+99U7I2a5MoP!1ME*2}cE*xTO+2~p?`YNwur5G5ud?C!LPP@KOm{BB z#+D0KgT?0I#e@*i(sz&zP75$15rJ3S|2QI{O)t_@pSjQy1b~?`xvW2-u@wmfCWc_c z)13c;fEO-bc3xDzZd;8l6W9w42 zW<`}u<0ZaeC@-Kijls+P(6(Jz6qgLJDBi=ii9)_II9f8%T4>=@up99}kB^U{(Z*SusdxZ;9thpIi5|i%i*z7$Q42&#_|A+Sh|kzjQ25$CH1E&}eROqug=T&4vm5K@rO%+N(%@`EF2u{BU z2Qnvsn%2zW93s5e7jCOIXrWnutK12sf9DVsIqQl!K zhoN|xb6z?(C(OXNeio?91RU=H0IvOZk=t(m;#^_H#4j{gps5xS*M76PNc)#Z#YNxG ziV!N#^i_O(Q*TlwRk0u{wdK&9Q_#P8{fY~KbKOP@%m6t7Q#fr z6(&y=#~QAtQ!vp0V0x&ttt5csqa28v*RKG_N5#EX2FeV0Jl4nlM=tICkBWPb$GWXo z+@j2iWlp6fpqDxQv_v1P%!ka5<0Jz&aqHWHjHo#FZ)M=#a_bw+j+mn}px!qeOTe}Q zY!hrb(x+I|44{$-^&C&VxQs>Iq8|c?*8SU-N@Z4=h=ATktzooG$I%jf zM^9NqP`kBL{y`K^Q5aM2ED-e}OpJ=ndH@$KuK0e+hz~1_tWL#>s0WxKT0l$@h4C8d{u@yJ}>WAE3Fd(@KviX7h9|z;NfuiI1EEH+t=KPgTM3Aw^tS8%B9EP z^FIQ3GY}A4!0e!2MEv!BH|*f^eOPO4vn>O8GOk!rNj0Vl^C`K{oB$@Vy3__9;QQZu zsT%p6nI|0@Px#?8vwI>zRXr6&qMS=T9077Cn~IJ)5MpqpvI zv*Y?!y^a9vbgF8avwNRNI6?R_xcWD=lsNK`)oC{XE_1H47NP>Y@&~8_J8U8J9{vFU zaP8Kjt$p*SAL^5fKL#$m)&YR~8wE(E1t_M@-d$N4PclpTv(-N;ISMKwaxkx7!L@h) z?Ofv@=u{EZUkCL!fwc{Yb$ys~>ThPh>-m8-eczl@e;u@L&NuaSNK0aRs52VW1Ma=! zW`6IzQ`|$`4H1F0bD)atgv*kf_TDsm_bxeM`GEfvi4`EMXxeA*;pX*U0iV6+){Bk+ z%x6ReTe}PSOr2szl;!Ry`!)GE+Z)6|z#gj^AWExl?*DF~j;SAfiH08s_s-@COXCse zt1K&4O)3x&A>UQ0%;Mqbl!n9UBEXfN+*(&e#D=3fmi?ZrZcfuxmO$jOUxm5?aMX7! zfjl>t#TnF+1%XC-2r6=Uu4xg9gQtKvc9uisyY6kqWefa}R)j}lGU^Bi!vc^> z9-S($V$V6bv=SaqzQ4o2%)s%DcQ3_4T)pHJ_8n&Rr~9ROG-5#LxX)wLf6NO|fq`uOj7mdgJI0H2v4wf~~Kng9R* M07*qoM6N<$f@g#ZbN~PV 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 91edecad..c0156d2c 100644 --- a/include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui.css +++ b/include/javascript/tiny_mce/themes/advanced/skins/o2k7/ui.css @@ -51,14 +51,14 @@ .o2k7Skin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px} /* ListBox */ -.o2k7Skin .mceListBox {margin-left:3px} +.o2k7Skin .mceListBox {padding-left: 3px} .o2k7Skin .mceListBox, .o2k7Skin .mceListBox a {display:block} .o2k7Skin .mceListBox .mceText {padding-left:4px; text-align:left; width:70px; border:1px solid #b3c7e1; border-right:0; background:#eaf2fb; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden} .o2k7Skin .mceListBox .mceOpen {width:14px; height:22px; background:url(img/button_bg.png) -66px 0} .o2k7Skin table.mceListBoxEnabled:hover .mceText, .o2k7Skin .mceListBoxHover .mceText, .o2k7Skin .mceListBoxSelected .mceText {background:#FFF} .o2k7Skin table.mceListBoxEnabled:hover .mceOpen, .o2k7Skin .mceListBoxHover .mceOpen, .o2k7Skin .mceListBoxSelected .mceOpen {background-position:-66px -22px} .o2k7Skin .mceListBoxDisabled .mceText {color:gray} -.o2k7Skin .mceListBoxMenu {overflow:auto; overflow-x:hidden} +.o2k7Skin .mceListBoxMenu {overflow:auto; overflow-x:hidden; margin-left:3px} .o2k7Skin .mceOldBoxModel .mceListBox .mceText {height:22px} .o2k7Skin select.mceListBox {font-family:Tahoma,Verdana,Arial,Helvetica; font-size:12px; border:1px solid #b3c7e1; background:#FFF;} @@ -106,6 +106,7 @@ .o2k7Skin .mceNoIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center} .o2k7Skin .mceMenu span.mceMenuLine {display:none} .o2k7Skin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;} +.o2k7Skin .mceMenuItem td, .o2k7Skin .mceMenuItem th {line-height: normal} /* 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} diff --git a/include/javascript/tiny_mce/themes/simple/img/icons.gif b/include/javascript/tiny_mce/themes/simple/img/icons.gif index 16af141ff0eea376a889b1e8d28e9c1cacaaab16..6fcbcb5dedf16a5fa1d15c2aa127bceb612f1e71 100644 GIT binary patch literal 806 zcmZ?wbhEHbJi#Es@KuxH{{08bHy>kQU|4+kcV*u?6Yu2z|Nk2X_I-c9E~4fBsnb_x z&7Ngzq1inB@Woqi-rnfiGF7yw9zM z^p;~=3MY4TT)2AY!iC=7fBwej_wPS(UDm1P!}|}9?`#au+qhx#R?Fl=KuakHia%Lc z85lGfbU;Rd{N%v)|G<<24;`ug6HAIt=2*?Yu%d)ZG@><(acbwmDSj%f4MMZ#%vkt3 z%+g~)i8kP^LLB_(WJHBo z)4eilyozQ8a&qqSt%<6xpa0;xA7k;M?mchbzI*>+`RnL~M?L!{MDwZt;o_B2F2$0=pQSpQ!u@RcUGT{(44KaY91N#ws_nDH9G%Qf=ZF z5o_THWH`G~`GwyilS^z$ZvV~I`dh4Lx_8c>?R@8gr-07UIgFjp0y#A&c{B)cE>2kS zL5I1;i$zoEA)6qV`HGJvVWE!{8MZ6ST|PC}d%Kid7{KiD{l18xziSGKuWtj9AkWy-*`}#c~0`Lrjq> z-;O-o=3A#@&dst%_SasuJq0xZW;OwR3vM!diY%Es?;J~Pp}LYununP(i|XxU>#u=* zSvNC^0?cJ=S?=UK4&2DdcCO^BsHxjWc4vR-Z64x&8r#>V9!JMd4O!Z*d@mNrgX=jUy;0|T>ZntHjDU$=-I8y`|tN~Y9 literal 1440 zcmV;R1z-9{Nk%w1VaNa!0QUd@Ib*`7v&H}b0P*i`B{WZ*I4YI8{iDPCZ*XyWj;?N! z&ooP8CcKTM%}ImAk&d@bUef&=iA% zhPA3sm56OYcjMRI^s}jof~E0n!SIozxs`y)bZpaM%~elOt(xIz_1F@`xREtxwxO@X zElsNLx;f_MIwnTOux@bk@5r<-;@s){f~fMSskU>S&vlpdmZGk)n^Ks084*pfMo5}`Y)@uBrt7q^ z_xb)XxI@^-XhLVQWPPfUtMQSg&Xb6UQhU2=S3pa1!Lhs1Kwz1)!P59aI6r5pthLM4 zE-ud4`aC>8zybolqcQ$sRq*)W>+kl^)!br%x2LJkVv+Dui1Oh7|6z>ag023Luhg%= z;=sbh)RP30t>V}2$H?fg=;-%zOTU8v0MO8l85I$+z}bYP#G9DS_#hs}n3hj*tissz zAwYQh{QX~VkH5&*9YTcu{{H^`{_yYcW|;u|{Qilm^upTyi?sd!nVG)6{{LrW`s5%! zQETJeu@Y0sB3Qy+jGVB@-BWO)C1U{h_4v@?@UEu*S8lPiucH6>|4vxO2|0#LaF@v0 z@ZaCy@c8hkxVXaB{z|fT@U~;Hv$d$T$J*xpqPpE8TH+G^0=vlI+KzIEuZN}B@UYO} z&dtoGp5{=vw)ErQRcDJbQgSxGf8JYL_`X^{uFH_9uqY`f`}_Of)zF}&w4mVd!0r05 zoM3>k!2kdMA^8LW00930EC2ui0LTCo000R80RIUbNU)&6g9sBUT*$DY!-o(fN}Ncs zqQ#3CGiuz(v7^V2AVW@EluM+^lPFV4B&kwhfCK?JZW}S8Lq-x8D(>2KU{_0tBn}8A zagb%p1Q&P-6u`78(}*2LRH3FT;{^Z%ooYoWl!#X%K7Tem@Rf*AgGMWAZK^N;uLKrJ zgqs_6Dufyfw<06~AZA3KR{>nO09GJYj!yq2Mo2^;St0-;UpPxp*8_}f6+Z>JE!?&a z+dPb*b~hYDra%-%J`C}|)xna%9$;-yz|zc`Z6DmMS)p07fiENwe4t=jwVQEwY|=zo zxL=@s=&E6Qp)TGXT_1)l*emUVx)m?~6;Hl)c5^2e&KlH&3v877L9rfP;Fp}T4iu?af8AOXd@5C0(U&fK3z8Av u{UxbK=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="";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+=""+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)+"";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'');i+=""+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)+"";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+=''+k.renderHTML()+""}else{f+=""+k.renderHTML()+""}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 +(function(d){var a=/^\s*|\s*$/g,e,c="B".replace(/A(.)|B/,"$1")==="$1";var b={majorVersion:"3",minorVersion:"4.4",releaseDate:"2011-08-04",_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.isIE7=s.isIE&&/MSIE [7]/.test(g);s.isIE8=s.isIE&&/MSIE [8]/.test(g);s.isIE9=s.isIE&&/MSIE [9]/.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);s.isIOS5=s.isIDevice&&g.match(/AppleWebKit\/(\d*)/)[1]>=534;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(a){a.VK={DELETE:46,BACKSPACE:8}})(tinymce);(function(b){function a(c){var f=c.dom,d=c.selection,e=b.VK;c.onKeyUp.add(function(g,j){if(j.keyCode==e.DELETE||j.keyCode==e.BACKSPACE){var i=d.getRng().startContainer;var k=i;while(!f.isBlock(k)){k=k.parentNode}var h=f.select("span.Apple-style-span",k);f.remove(h,true)}})}b.create("tinymce.util.Quirks",{Quirks:function(c){if(b.isWebKit){a(c)}}})})(tinymce);(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=/&(#x|#)?([\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,m.length===2?16:10);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="\\\" \\' \\; \\: ; : \uFEFF".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(/\uFEFF[0-9]/g,function(C){return a[C]})}if(!A){B=B.replace(/\\([\'\";:])/g,"$1")}return B}if(r){r=r.replace(/\\[\"\';:\uFEFF]/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,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(r)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(m){var h={},j,l,g,f,c={},b,e,d=m.makeMap,k=m.each;function i(o,n){return o.split(n||",")}function a(r,q){var o,p={};function n(s){return s.replace(/[A-Z]+/g,function(t){return n(r[t])})}for(o in r){if(r.hasOwnProperty(o)){r[o]=n(r[o])}}n(q).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(v,t,s,u){s=i(s,"|");p[t]={attributes:d(s),attributesOrder:s,children:d(u,"|",{"#comment":{}})}});return p}l="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";l=d(l,",",d(l.toUpperCase()));h=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]");j=d("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,autoplay,loop,controls");g=d("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,source");f=m.extend(d("td,th,iframe,video,audio,object"),g);b=d("pre,script,style,textarea");e=d("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");m.html.Schema=function(q){var z=this,n={},o={},x=[],p;q=q||{};if(q.verify_html===false){q.valid_elements="*[*]"}if(q.valid_styles){p={};k(q.valid_styles,function(B,A){p[A]=m.explode(B)})}function y(A){return new RegExp("^"+A.replace(/([?+*])/g,".$1")+"$")}function s(H){var G,C,V,R,W,B,E,Q,T,M,U,Y,K,F,S,A,O,D,X,Z,L,P,J=/^([#+-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,N=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,I=/[*?+]/;if(H){H=i(H);if(n["@"]){O=n["@"].attributes;D=n["@"].attributesOrder}for(G=0,C=H.length;G=0){for(R=l.length-1;R>=S;R--){Q=l[R];if(Q.valid){B.end(Q.name)}}l.length=S}}E=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};G=e.getShortEndedElements();A=e.getSelfClosingElements();k=e.getBoolAttrs();y=c.validate;K=c.remove_internals;z=c.fix_self_closing;while(f=E.exec(q)){if(m0&&l[l.length-1].name===H){D(H)}if(!y||(J=e.getElementRule(H))){r=true;if(y){L=J.attributes;n=J.attributePatterns}if(o=f[8]){s=o.indexOf("data-mce-type")!==-1;if(s&&K){r=false}C=[];C.map={};o.replace(h,function(R,Q,V,U,T){var W,S;Q=Q.toLowerCase();V=Q in k?Q:x(V||U||T||"");if(y&&!s&&Q.indexOf("data-")!==0){W=L[Q];if(!W&&n){S=n.length;while(S--){W=n[S];if(W.pattern.test(Q)){break}}if(S===-1){W=null}}if(!W){return}if(W.validValues&&!(V in W.validValues)){return}}C.map[Q]=V;C.push({name:Q,value:V})})}else{C=[];C.map={}}if(y&&!s){I=J.attributesRequired;O=J.attributesDefault;N=J.attributesForced;if(N){M=N.length;while(M--){F=N[M];P=F.name;v=F.value;if(v==="{$uid}"){v="mce_"+t++}C.map[P]=v;C.push({name:P,value:v})}}if(O){M=O.length;while(M--){F=O[M];P=F.name;if(!(P in C.map)){v=F.value;if(v==="{$uid}"){v="mce_"+t++}C.map[P]=v;C.push({name:P,value:v})}}}if(I){M=I.length;while(M--){if(I[M] in C.map){break}}if(M===-1){r=false}}if(C.map["data-mce-bogus"]){r=false}}if(r){B.start(H,C,p)}}else{r=false}if(j=g[H]){j.lastIndex=m=f.index+f[0].length;if(f=j.exec(q)){if(r){u=q.substr(m,f.index-m)}m=f.index+f[0].length}else{u=q.substr(m);m=q.length}if(r&&u.length>0){B.text(u,true)}if(r){B.end(H)}E.lastIndex=m;continue}if(!p){if(!o||o.indexOf("/")!=o.length-1){l.push({name:H,valid:r})}else{if(r){B.end(H)}}}}else{if(H=f[1]){B.comment(H)}else{if(H=f[2]){B.cdata(H)}else{if(H=f[3]){B.doctype(H)}else{if(H=f[4]){B.pi(H,f[5])}}}}}}m=f.index+f[0].length}if(m=0;M--){H=l[M];if(H.valid){B.end(H.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){N.value=l;N=N.prev}else{L=N.prev;N.remove();N=L}}}n=new b.html.SaxParser({validate:y,fix_self_closing:!y,cdata:function(l){A.append(I("#cdata",4)).value=l},text:function(M,l){var L;if(!s[A.name]){M=M.replace(k," ");if(A.lastChild&&o[A.lastChild.name]){M=M.replace(D,"")}}if(M.length!==0){L=I("#text",3);L.raw=!!l;A.append(L).value=M}},comment:function(l){A.append(I("#comment",8)).value=l},pi:function(l,L){A.append(I(l,7)).value=L;G(A)},doctype:function(L){var l;l=A.append(I("#doctype",10));l.value=L;G(A)},start:function(l,T,M){var R,O,N,L,P,U,S,Q;N=y?h.getElementRule(l):{};if(N){R=I(N.outputName||l,1);R.attributes=T;R.shortEnded=M;A.append(R);Q=p[A.name];if(Q&&p[R.name]&&!Q[R.name]){J.push(R)}O=d.length;while(O--){P=d[O].name;if(P in T.map){E=c[P];if(E){E.push(R)}else{c[P]=[R]}}}if(o[l]){G(R)}if(!M){A=R}}},end:function(l){var P,M,O,L,N;M=y?h.getElementRule(l):{};if(M){if(o[l]){if(!s[A.name]){for(P=A.firstChild;P&&P.type===3;){O=P.value.replace(D,"");if(O.length>0){P.value=O;P=P.next}else{L=P.next;P.remove();P=L}}for(P=A.lastChild;P&&P.type===3;){O=P.value.replace(t,"");if(O.length>0){P.value=O;P=P.prev}else{L=P.prev;P.remove();P=L}}}P=A.prev;if(P&&P.type===3){O=P.value.replace(D,"");if(O.length>0){P.value=O}else{P.remove()}}}if(M.removeEmpty||M.paddEmpty){if(A.isEmpty(u)){if(M.paddEmpty){A.empty().append(new a("#text","3")).value="\u00a0"}else{if(!A.attributes.map.name){N=A.parent;A.empty().remove();A=N;return}}}}A=A.parent}}},h);H=A=new a(m.context||g.root_name,11);n.parse(v);if(y&&J.length){if(!m.context){j(J)}else{m.invalid=true}}if(q&&H.name=="body"){F()}if(!m.invalid){for(K in i){E=e[K];z=i[K];x=z.length;while(x--){if(!z[x].parent){z.splice(x,1)}}for(C=0,B=E.length;C0){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;l.boxModel=!h.isIE||o.compatMode=="CSS1Compat"||l.stdMode;l.hasOuterHTML="outerHTML" in o.createElement("a");l.settings=m=h.extend({keep_values:false,hex_colors:1},m);l.schema=m.schema;l.styles=new h.html.Styles({url_converter:m.url_converter,url_converter_scope:m.url_converter_scope},m.schema);if(h.isIE6){try{o.execCommand("BackgroundImageCache",false,true)}catch(n){l.cssFlicker=true}}if(b&&m.schema){("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(p){o.createElement(p)});for(k in m.schema.getCustomElements()){o.createElement(k)}}h.addUnload(l.destroy,l)},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(o,p,l){var j,k=this,m;o=k.get(o);if(!o||o.nodeType!==1){return l===m?false:l}if(!e(l)){l=""}if(/^(src|href|style|coords|shape)$/.test(p)){j=o.getAttribute("data-mce-"+p);if(j){return j}}if(b&&k.props[p]){j=o[k.props[p]];j=j&&j.nodeValue?j.nodeValue:j}if(!j){j=o.getAttribute(p,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(p)){if(o[k.props[p]]===true&&j===""){return p}return j?p:""}if(o.nodeName==="FORM"&&o.getAttributeNode(p)){return o.getAttributeNode(p).nodeValue}if(p==="style"){j=j||o.style.cssText;if(j){j=k.serializeStyle(k.parseStyle(j),o.nodeName);if(k.settings.keep_values&&!k._isRes(j)){o.setAttribute("data-mce-style",j)}}}if(d&&p==="class"&&j){j=j.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(p){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 p}return l;case"shape":j=j.toLowerCase();break;default:if(p.indexOf("on")===0&&j){j=h._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+j)}}}return(j!==m&&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(s.getBoundingClientRect){s=s.getBoundingClientRect();o=k.boxModel?p.documentElement:p.body;j=s.left+(p.documentElement.scrollLeft||p.body.scrollLeft)-o.clientTop;q=s.top+(p.documentElement.scrollTop||p.body.scrollTop)-o.clientLeft;return{x:j,y:q}}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==="data-mce-bookmark"){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(n,o){var j=0,l,m,k;if(n){for(l=n.nodeType,n=n.previousSibling,m=n;n;n=n.previousSibling){k=n.nodeType;if(o&&k==3){if(k==l||!n.nodeValue.length){continue}}j++;l=k}}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(d){var b=this,h=d.dom,c=true,f=false;function e(i,j){var k,t=0,q,n,m,l,o,r,p=-1,s;k=i.duplicate();k.collapse(j);s=k.parentElement();if(s.ownerDocument!==d.dom.doc){return}while(s.contentEditable==="false"){s=s.parentNode}if(!s.hasChildNodes()){return{node:s,inside:1}}m=s.children;q=m.length-1;while(t<=q){r=Math.floor((t+q)/2);l=m[r];k.moveToElementText(l);p=k.compareEndPoints(j?"StartToStart":"EndToEnd",i);if(p>0){q=r-1}else{if(p<0){t=r+1}else{return{node:l}}}}if(p<0){if(!l){k.moveToElementText(s);k.collapse(true);l=s;n=true}else{k.collapse(false)}k.setEndPoint(j?"EndToStart":"EndToEnd",i);if(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)>0){k=i.duplicate();k.collapse(j);o=-1;while(s==k.parentElement()){if(k.move("character",-1)==0){break}o++}}o=o||k.text.replace("\r\n"," ").length}else{k.collapse(true);k.setEndPoint(j?"StartToStart":"StartToEnd",i);o=k.text.replace("\r\n"," ").length}return{node:l,position:p,offset:o,inside:n}}function g(){var i=d.getRng(),r=h.createRng(),l,k,p,q,m,j;l=i.item?i.item(0):i.parentElement();if(l.ownerDocument!=h.doc){return r}k=d.isCollapsed();if(i.item){r.setStart(l.parentNode,h.nodeIndex(l));r.setEnd(r.startContainer,r.startOffset+1);return r}function o(A){var u=e(i,A),s,y,z=0,x,v,t;s=u.node;y=u.offset;if(u.inside&&!s.hasChildNodes()){r[A?"setStart":"setEnd"](s,0);return}if(y===v){r[A?"setStartBefore":"setEndAfter"](s);return}if(u.position<0){x=u.inside?s.firstChild:s.nextSibling;if(!x){r[A?"setStartAfter":"setEndAfter"](s);return}if(!y){if(x.nodeType==3){r[A?"setStart":"setEnd"](x,0)}else{r[A?"setStartBefore":"setEndBefore"](x)}return}while(x){t=x.nodeValue;z+=t.length;if(z>=y){s=x;z-=y;z=t.length-z;break}x=x.nextSibling}}else{x=s.previousSibling;if(!x){return r[A?"setStartBefore":"setEndBefore"](s)}if(!y){if(s.nodeType==3){r[A?"setStart":"setEnd"](x,s.nodeValue.length)}else{r[A?"setStartAfter":"setEndAfter"](x)}return}while(x){z+=x.nodeValue.length;if(z>=y){s=x;z-=y;break}x=x.previousSibling}}r[A?"setStart":"setEnd"](s,z)}try{o(true);if(!k){o()}}catch(n){if(n.number==-2147024809){m=b.getBookmark(2);p=i.duplicate();p.collapse(true);l=p.parentElement();if(!k){p=i.duplicate();p.collapse(false);q=p.parentElement();q.innerHTML=q.innerHTML}l.innerHTML=l.innerHTML;b.moveToBookmark(m);i=d.getRng();o(true);if(!k){o()}}else{throw n}}return r}this.getBookmark=function(m){var j=d.getRng(),o,i,l={};function n(u){var u,t,p,s,r,q=[];t=u.parentNode;p=h.getRoot().parentNode;while(t!=p){s=t.children;r=s.length;while(r--){if(u===s[r]){q.push(r);break}}u=t;t=t.parentNode}return q}function k(q){var p;p=e(j,q);if(p){return{position:p.position,offset:p.offset,indexes:n(p.node),inside:p.inside}}}if(m===2){if(!j.item){l.start=k(true);if(!d.isCollapsed()){l.end=k()}}else{l.start={ctrl:true,indexes:n(j.item(0))}}}return l};this.moveToBookmark=function(k){var j,i=h.doc.body;function m(o){var r,q,n,p;r=h.getRoot();for(q=o.length-1;q>=0;q--){p=r.children;n=o[q];if(n<=p.length-1){r=p[n]}}return r}function l(r){var n=k[r?"start":"end"],q,p,o;if(n){q=n.position>0;p=i.createTextRange();p.moveToElementText(m(n.indexes));offset=n.offset;if(offset!==o){p.collapse(n.inside||q);p.moveStart("character",q?-offset:offset)}else{p.collapse(r)}j.setEndPoint(r?"StartToStart":"EndToStart",p);if(r){j.collapse(true)}}}if(k.start){if(k.start.ctrl){j=i.createControlRange();j.addElement(m(k.start.indexes));j.select()}else{j=i.createTextRange();l(true);l();j.select()}}};this.addRange=function(i){var n,l,k,p,s,q,r=d.dom.doc,m=r.body;function j(z){var u,y,t,x,v;t=h.create("a");u=z?k:s;y=z?p:q;x=n.duplicate();if(u==r||u==r.documentElement){u=m;y=0}if(u.nodeType==3){u.parentNode.insertBefore(t,u);x.moveToElementText(t);x.moveStart("character",y);h.remove(t);n.setEndPoint(z?"StartToStart":"EndToEnd",x)}else{v=u.childNodes;if(v.length){if(y>=v.length){h.insertAfter(t,v[v.length-1])}else{u.insertBefore(t,v[y])}x.moveToElementText(t)}else{t=r.createTextNode("\uFEFF");u.appendChild(t);x.moveToElementText(t.parentNode);x.collapse(c)}n.setEndPoint(z?"StartToStart":"EndToEnd",x);h.remove(t)}}k=i.startContainer;p=i.startOffset;s=i.endContainer;q=i.endOffset;n=m.createTextRange();if(k==s&&k.nodeType==1&&p==q-1){if(p==q-1){try{l=m.createControlRange();l.addElement(k.childNodes[p]);l.select();return}catch(o){}}}j(true);j();n.select()};this.getRangeAt=g}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==k&&f.endContainer==k){k.body.innerHTML=g}else{f.deleteContents();if(k.body.childNodes.length==0){k.body.innerHTML=g}else{if(f.createContextualFragment){f.insertNode(f.createContextualFragment(g))}else{m=k.createDocumentFragment();l=k.createElement("div");m.appendChild(l);l.outerHTML=g;f.insertNode(m)}}}j=n.dom.get("__caret");f=k.createRange();f.setStartBefore(j);f.setEndBefore(j);n.setRng(f);n.dom.remove("__caret");try{n.setRng(f)}catch(h){}}else{if(f.item){k.execCommand("Delete",false,null);f=n.getRng()}f.pasteHTML(g)}if(!i.no_events){n.onSetContent.dispatch(n,i)}},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}if(v.tridentSel){return v.tridentSel.getBookmark(r)}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(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(r.tridentSel){return r.tridentSel.moveToBookmark(n)}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},normalize:function(){var g=this,f,i;if(c.isIE){return}function h(p){var k,o,n,m=g.dom,j=m.getRoot(),l;k=f[(p?"start":"end")+"Container"];o=f[(p?"start":"end")+"Offset"];if(k.nodeType===9){k=k.body;o=0}if(k===j){if(k.hasChildNodes()){k=k.childNodes[Math.min(!p&&o>0?o-1:o,k.childNodes.length-1)];o=0;l=k;n=new c.dom.TreeWalker(k,j);do{if(l.nodeType===3){o=p?0:l.nodeValue.length-1;k=l;break}if(l.nodeName==="BR"){o=m.nodeIndex(l);k=l.parentNode;break}}while(l=(p?n.next():n.prev()));i=true}}if(i){f["set"+(p?"Start":"End")](k,o)}}f=g.getRng();h(true);if(f.collapsed){h()}if(i){g.setRng(f)}},destroy:function(g){var f=this;f.win=null;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&&!(this.editor&&this.editor.forcedHighContrastMode)){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,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}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(j){if(j.value===g.selectedValue){f.items[j.id].setSelected(1);g.oldID=j.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="";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+=""+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)+"";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'');i+=""+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)+"";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+=''+k.renderHTML()+""}else{f+=""+k.renderHTML()+""}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){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return 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(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!=0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});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&&!m.isIOS5){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(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(z){var y={prefix:"plugins/",resource:z,suffix:"/editor_plugin"+m.suffix+".js"};var z=c.createUrl(y,z);c.load(z.resource,z)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+m.suffix+".js"})}}});p.loadQueue(function(){if(!u.removed){u.init()}})}q()},init:function(){var r,H=this,I=H.settings,E,A,D=H.getElement(),q,p,F,y,C,G,z,v=[];m.add(H);I.aria_label=I.aria_label||n.getAttrib(D,"aria-label",H.getLang("aria.rich_text_area"));if(I.theme){I.theme=I.theme.replace(/-/,"");q=h.get(I.theme);H.theme=new q();if(H.theme.init&&I.init_theme){H.theme.init(H,h.urls[I.theme]||m.documentBaseURL.replace(/\/$/,""))}}function B(J){var K=c.get(J),t=c.urls[J]||m.documentBaseURL.replace(/\/$/,""),s;if(K&&m.inArray(v,J)===-1){i(c.dependencies(J),function(u){B(u)});s=new K(H,t);H.plugins[J]=s;if(s.init){s.init(H,t);v.push(J)}}}i(g(I.plugins.replace(/\-/g,"")),B);if(I.popup_css!==false){if(I.popup_css){I.popup_css=H.documentBaseURI.toAbsolute(I.popup_css)}else{I.popup_css=H.baseURI.toAbsolute("themes/"+I.theme+"/skins/"+I.skin+"/dialog.css")}}if(I.popup_css_add){I.popup_css+=","+H.documentBaseURI.toAbsolute(I.popup_css_add)}H.controlManager=new m.ControlManager(H);if(I.custom_undo_redo){H.onBeforeExecCommand.add(function(t,J,u,K,s){if(J!="Undo"&&J!="Redo"&&J!="mceRepaint"&&(!s||!s.skip_undo)){H.undoManager.beforeChange()}});H.onExecCommand.add(function(t,J,u,K,s){if(J!="Undo"&&J!="Redo"&&J!="mceRepaint"&&(!s||!s.skip_undo)){H.undoManager.add()}})}H.onExecCommand.add(function(s,t){if(!/^(FontName|FontSize)$/.test(t)){H.nodeChanged()}});if(a){function x(s,t){if(!t||!t.initial){H.execCommand("mceRepaint")}}H.onUndo.add(x);H.onRedo.add(x);H.onSetContent.add(x)}H.onBeforeRenderUI.dispatch(H,H.controlManager);if(I.render_ui){E=I.width||D.style.width||D.offsetWidth;A=I.height||D.style.height||D.offsetHeight;H.orgDisplay=D.style.display;G=/^[0-9\.]+(|px)$/i;if(G.test(""+E)){E=Math.max(parseInt(E)+(q.deltaWidth||0),100)}if(G.test(""+A)){A=Math.max(parseInt(A)+(q.deltaHeight||0),100)}q=H.theme.renderUI({targetNode:D,width:E,height:A,deltaWidth:I.delta_width,deltaHeight:I.delta_height});H.editorContainer=q.editorContainer}if(document.domain&&location.hostname!=document.domain){m.relaxedDomain=document.domain}n.setStyles(q.sizeContainer||q.editorContainer,{width:E,height:A});if(I.content_css){m.each(g(I.content_css),function(s){H.contentCSS.push(H.documentBaseURI.toAbsolute(s))})}A=(q.iframeHeight||A)+(typeof(A)=="number"?(q.deltaHeight||0):"");if(A<100){A=100}H.iframeHTML=I.doctype+'';if(I.document_base_url!=m.documentBaseURL){H.iframeHTML+=''}if(I.ie7_compat){H.iframeHTML+=''}else{H.iframeHTML+=''}H.iframeHTML+='';if(!a||!/Firefox\/2/.test(navigator.userAgent)){for(z=0;z'}H.contentCSS=[]}y=I.body_id||"tinymce";if(y.indexOf("=")!=-1){y=H.getParam("body_id","","hash");y=y[H.id]||y}C=I.body_class||"";if(C.indexOf("=")!=-1){C=H.getParam("body_class","","hash");C=C[H.id]||""}H.iframeHTML+='';if(m.relaxedDomain&&(b||(m.isOpera&&parseFloat(opera.version())<11))){F='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+H.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'}r=n.add(q.iframeContainer,"iframe",{id:H.id+"_ifr",src:F||'javascript:""',frameBorder:"0",allowTransparency:"true",title:I.aria_label,style:{width:"100%",height:A}});H.contentAreaContainer=q.iframeContainer;n.get(q.editorContainer).style.display=H.orgDisplay;n.get(H.id).style.display="none";n.setAttrib(H.id,"aria-hidden",true);if(!m.relaxedDomain||!F){H.setupIframe()}D=r=q=null},setupIframe:function(x){var q=this,v=q.settings,y=n.get(q.id),z=q.getDoc(),u,p;if((!b||!m.relaxedDomain)&&!x){if(a&&!v.readonly){q.getWin().addEventListener("DOMContentLoaded",function(){window.setTimeout(function(){var s=q.getBody(),t;s.innerHTML="
";if(s.contentEditable!==t){s.contentEditable=false;s.contentEditable=true;q.onMouseDown.add(function(A,B){if(B.target.nodeName==="HTML"){s.contentEditable=false;s.contentEditable=true;z.designMode="on";window.setTimeout(function(){z.designMode="off";q.getBody().focus()},1)}})}else{z.designMode="on"}q.setupIframe(true)},1)},false)}z.open();z.write(q.iframeHTML);z.close();if(m.relaxedDomain){z.domain=m.relaxedDomain}if(a&&!v.readonly){return}}p=q.getBody();p.disabled=true;if(!a&&!v.readonly){p.contentEditable=true}p.disabled=false;q.schema=new m.html.Schema(v);q.dom=new m.dom.DOMUtils(q.getDoc(),{keep_values:true,url_converter:q.convertURL,url_converter_scope:q,hex_colors:v.force_hex_style_colors,class_filter:v.class_filter,update_styles:1,fix_ie_paragraphs:1,schema:q.schema});q.parser=new m.html.DomParser(v,q.schema);if(!q.settings.allow_html_in_named_anchor){q.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)}}})}q.parser.addAttributeFilter("src,href,style",function(s,t){var A=s.length,C,E=q.dom,D,B;while(A--){C=s[A];D=C.attr(t);B="data-mce-"+t;if(!C.attributes.map[B]){if(t==="style"){C.attr(B,E.serializeStyle(E.parseStyle(D),C.name))}else{C.attr(B,q.convertURL(D,t,C.name))}}}});q.parser.addNodeFilter("script",function(s,t){var A=s.length;while(A--){s[A].attr("type","mce-text/javascript")}});q.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+"]]"}});q.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(t,A){var B=t.length,C,s=q.schema.getNonEmptyElements();while(B--){C=t[B];if(C.isEmpty(s)){C.empty().append(new m.html.Node("br",1)).shortEnded=true}}});q.serializer=new m.dom.Serializer(v,q.dom,q.schema);q.selection=new m.dom.Selection(q.dom,q.getWin(),q.serializer);q.formatter=new m.Formatter(this);q.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){q.formatter.register(s,{block:s,remove:"all"})});q.formatter.register(q.settings.formats);q.undoManager=new m.UndoManager(q);q.undoManager.onAdd.add(function(t,s){if(t.hasUndo()){return q.onChange.dispatch(q,s,t)}});q.undoManager.onUndo.add(function(t,s){return q.onUndo.dispatch(q,s,t)});q.undoManager.onRedo.add(function(t,s){return q.onRedo.dispatch(q,s,t)});q.forceBlocks=new m.ForceBlocks(q,{forced_root_block:v.forced_root_block});q.editorCommands=new m.EditorCommands(q);q.serializer.onPreProcess.add(function(s,t){return q.onPreProcess.dispatch(q,t,s)});q.serializer.onPostProcess.add(function(s,t){return q.onPostProcess.dispatch(q,t,s)});q.onPreInit.dispatch(q);if(!v.gecko_spellcheck){q.getBody().spellcheck=0}if(!v.readonly){q._addEvents()}q.controlManager.onPostRender.dispatch(q,q.controlManager);q.onPostRender.dispatch(q);q.quirks=new m.util.Quirks(this);if(v.directionality){q.getBody().dir=v.directionality}if(v.nowrap){q.getBody().style.whiteSpace="nowrap"}if(v.handle_node_change_callback){q.onNodeChange.add(function(t,s,A){q.execCallback("handle_node_change_callback",q.id,A,-1,-1,true,q.selection.isCollapsed())})}if(v.save_callback){q.onSaveContent.add(function(s,A){var t=q.execCallback("save_callback",q.id,A.content,q.getBody());if(t){A.content=t}})}if(v.onchange_callback){q.onChange.add(function(t,s){q.execCallback("onchange_callback",q,s)})}if(v.protect){q.onBeforeSetContent.add(function(s,t){if(v.protect){i(v.protect,function(A){t.content=t.content.replace(A,function(B){return""})})}})}if(v.convert_newlines_to_brs){q.onBeforeSetContent.add(function(s,t){if(t.initial){t.content=t.content.replace(/\r?\n/g,"
")}})}if(v.preformatted){q.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(v.verify_css_classes){q.serializer.attribValueFilter=function(C,A){var B,t;if(C=="class"){if(!q.classesRE){t=q.dom.getClasses();if(t.length>0){B="";i(t,function(s){B+=(B?"|":"")+s["class"]});q.classesRE=new RegExp("("+B+")","gi")}}return !q.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(A)||q.classesRE.test(A)?A:""}return A}}if(v.cleanup_callback){q.onBeforeSetContent.add(function(s,t){t.content=q.execCallback("cleanup_callback","insert_to_editor",t.content,t)});q.onPreProcess.add(function(s,t){if(t.set){q.execCallback("cleanup_callback","insert_to_editor_dom",t.node,t)}if(t.get){q.execCallback("cleanup_callback","get_from_editor_dom",t.node,t)}});q.onPostProcess.add(function(s,t){if(t.set){t.content=q.execCallback("cleanup_callback","insert_to_editor",t.content,t)}if(t.get){t.content=q.execCallback("cleanup_callback","get_from_editor",t.content,t)}})}if(v.save_callback){q.onGetContent.add(function(s,t){if(t.save){t.content=q.execCallback("save_callback",q.id,t.content,q.getBody())}})}if(v.handle_event_callback){q.onEvent.add(function(s,t,A){if(q.execCallback("handle_event_callback",t,s,A)===false){j.cancel(t)}})}q.onSetContent.add(function(){q.addVisual(q.getBody())});if(v.padd_empty_editor){q.onPostProcess.add(function(s,t){t.content=t.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
[\r\n]*)$/,"")})}if(a){function r(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})}})}q.onExecCommand.add(function(s,t){if(t==="CreateLink"){r(s)}});q.onSetContent.add(q.selection.onSetContent.add(r))}q.load({initial:true,format:"html"});q.startContent=q.getContent({format:"raw"});q.undoManager.add();q.initialized=true;q.onInit.dispatch(q);q.execCallback("setupcontent_callback",q.id,q.getBody(),q.getDoc());q.execCallback("init_instance_callback",q);q.focus(true);q.nodeChanged({initial:1});i(q.contentCSS,function(s){q.dom.loadCSS(s)});if(v.auto_focus){setTimeout(function(){var s=m.get(v.auto_focus);s.selection.select(s.getBody(),1);s.selection.collapse(1);s.getBody().focus();s.getWin().focus()},100)}y=null},focus:function(u){var y,q=this,s=q.selection,x=q.settings.content_editable,r,p,v=q.getDoc();if(!u){r=s.getRng();if(r.item){p=r.item(0)}s.normalize();if(!x){q.getWin().focus()}if(m.isGecko){q.getBody().focus()}if(p&&p.ownerDocument==v){r=v.body.createControlRange();r.addElement(p);r.select()}}if(m.activeEditor!=q){if((y=m.activeEditor)!=null){y.onDeactivate.dispatch(y,q)}q.onActivate.dispatch(q,y)}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(u,s){var r=this,q,p=r.getBody(),t;s=s||{};s.format=s.format||"html";s.set=true;s.content=u;if(!s.no_events){r.onBeforeSetContent.dispatch(r,s)}u=s.content;if(!m.isIE&&(u.length===0||/^\s+$/.test(u))){t=r.settings.forced_root_block;if(t){u="<"+t+'>
"}else{u='
'}p.innerHTML=u;r.selection.select(p,true);r.selection.collapse(true);return}if(s.format!=="raw"){u=new m.html.Serializer({},r.schema).serialize(r.parser.parse(u))}s.content=m.trim(u);r.dom.setHTML(p,s.content);if(!s.no_events){r.onSetContent.dispatch(r,s)}r.selection.normalize();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.body.contentEditable=false;G.body.contentEditable=true}}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)}B.onClick.add(function(s,t){t=t.target;if(m.isWebKit&&t.nodeName=="IMG"){B.selection.getSel().setBaseAndExtent(t,0,t,1)}if(t.nodeName=="A"&&q.hasClass(t,"mceItemAnchor")){B.selection.select(t)}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.onKeyDown.add(function(t,D){if(D.keyCode!=8){return}var F=t.selection.getRng().startContainer;var E=t.selection.getRng().startOffset;while(F&&F.nodeType&&F.nodeType!=1&&F.parentNode){F=F.parentNode}if(F&&F.parentNode&&F.parentNode.tagName==="BLOCKQUOTE"&&F.parentNode.firstChild==F&&E==0){t.formatter.toggle("blockquote",null,F.parentNode);var s=t.selection.getRng();s.setStart(F,0);s.setEnd(F,0);t.selection.setRng(s);t.selection.collapse(false)}});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,"p"]);B.addShortcut("ctrl+8","",["FormatBlock",false,"div"]);B.addShortcut("ctrl+9","",["FormatBlock",false,"address"]);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}})}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(s,D){var t=D.keyCode;if((t>=33&&t<=36)||(t>=37&&t<=40)||t==13||t==45||D.ctrlKey){y()}});B.onKeyDown.add(function(s,E){var D=E.keyCode,t;if(D==8){t=B.getDoc().selection;if(t&&t.createRange&&t.createRange().item){B.undoManager.beforeChange();s.dom.remove(t.createRange().item(0));y();return j.cancel(E)}}if((D>=33&&D<=36)||(D>=37&&D<=40)||D==13||D==45){if(m.isIE&&D==13){B.undoManager.beforeChange()}if(B.undoManager.typing){y()}return}if((D<16||D>20)&&D!=224&&D!=91&&!B.undoManager.typing){B.undoManager.beforeChange();B.undoManager.typing=true;B.undoManager.add()}});B.onMouseDown.add(function(){if(B.undoManager.typing){y()}})}if(m.isWebKit){q.bind(B.getDoc(),"selectionchange",function(){if(B.selectionTimer){window.clearTimeout(B.selectionTimer);B.selectionTimer=0}B.selectionTimer=window.setTimeout(function(){B.nodeChanged()},50)})}if(m.isGecko){function A(){var s=B.dom.getAttribs(B.selection.getStart().cloneNode(false));return function(){var t=B.selection.getStart();if(t!==B.getBody()){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(A,H,J){var x,I,D,y,E,F,C,B,K,v,z,L,u,G;x=n.parser;I=new c.html.Serializer({},n.schema);u='\uFEFF';F={content:J,format:"html"};p.onBeforeSetContent.dispatch(p,F);J=F.content;if(J.indexOf("{$caret}")==-1){J+="{$caret}"}J=J.replace(/\{\$caret\}/,u);if(!p.isCollapsed()){n.getDoc().execCommand("Delete",false,null)}D=p.getNode();F={context:D.nodeName.toLowerCase()};E=x.parse(J,F);z=E.lastChild;if(z.attr("id")=="mce_marker"){C=z;for(z=z.prev;z;z=z.walk(true)){if(z.type==3||!l.isBlock(z.name)){z.parent.insert(C,z,z.name==="br");break}}}if(!F.invalid){J=I.serialize(E);z=D.firstChild;L=D.lastChild;if(!z||(z===L&&z.nodeName==="BR")){l.setHTML(D,J)}else{p.setContent(J)}}else{p.setContent(u);D=n.selection.getNode();y=n.getBody();if(D.nodeType==9){D=z=y}else{z=D}while(z!==y){D=z;z=z.parentNode}J=D==y?y.innerHTML:l.getOuterHTML(D);J=I.serialize(x.parse(J.replace(//i,function(){return I.serialize(E)})));if(D==y){l.setHTML(y,J)}else{l.setOuterHTML(D,J)}}C=l.get("mce_marker");B=l.getRect(C);K=l.getViewPort(n.getWin());if((B.y+B.h>K.y+K.h||B.yK.x+K.w||B.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(B,A,z){var y=l.getParent(p.getNode(),"a"),v,x,u;if(c.is(z,"string")){z={href:z}}z.href=z.href.replace(" ","%20");if(!y){if(c.isWebKit){v=l.getParent(p.getNode(),"img");if(v){x=v.style.cssText;u=v.className;v.style.cssText=null;v.className=null}}f("CreateLink",b,"javascript:mctmp(0);");if(x){v.style.cssText=x}if(u){v.className=u}d(l.select("a[href='javascript:mctmp(0);']"),function(C){l.setAttribs(C,z)})}else{if(z.href){l.setAttribs(y,z)}else{n.dom.remove(y,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(f){var d,e=0,h=[],c;function g(){return b.trim(f.getContent({format:"raw",no_events:1}))}return d={typing:false,onAdd:new a(d),onUndo:new a(d),onRedo:new a(d),beforeChange:function(){c=f.selection.getBookmark(2,true)},add:function(m){var j,k=f.settings,l;m=m||{};m.content=g();l=h[e];if(l&&l.content==m.content){return null}if(h[e]){h[e].beforeBookmark=c}if(k.custom_undo_redo_levels){if(h.length>k.custom_undo_redo_levels){for(j=0;j0){k=h[--e];f.setContent(k.content,{format:"raw"});f.selection.moveToBookmark(k.beforeBookmark);d.onUndo.dispatch(d,k)}return k},redo:function(){var i;if(e0||this.typing},hasRedo:function(){return e');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)},setup:function(){var n=this,m=n.editor,p=m.settings,u=m.dom,o=m.selection,q=m.schema.getBlockElements();if(p.forced_root_block){function v(){var y=o.getStart(),t=m.getBody(),s,z,D,F,E,x,A,B=-16777215;if(!y||y.nodeType!==1){return}while(y!=t){if(q[y.nodeName]){return}y=y.parentNode}s=o.getRng();if(s.setStart){z=s.startContainer;D=s.startOffset;F=s.endContainer;E=s.endOffset}else{if(s.item){s=m.getDoc().body.createTextRange();s.moveToElementText(s.item(0))}tmpRng=s.duplicate();tmpRng.collapse(true);D=tmpRng.move("character",B)*-1;if(!tmpRng.collapsed){tmpRng=s.duplicate();tmpRng.collapse(false);E=(tmpRng.move("character",B)*-1)-D}}for(y=t.firstChild;y;y){if(y.nodeType===3||(y.nodeType==1&&!q[y.nodeName])){if(!x){x=u.create(p.forced_root_block);y.parentNode.insertBefore(x,y)}A=y;y=y.nextSibling;x.appendChild(A)}else{x=null;y=y.nextSibling}}if(s.setStart){s.setStart(z,D);s.setEnd(F,E);o.setRng(s)}else{try{s=m.getDoc().body.createTextRange();s.moveToElementText(t);s.collapse(true);s.moveStart("character",D);if(E>0){s.moveEnd("character",E)}s.select()}catch(C){}}m.nodeChanged()}m.onKeyUp.add(v);m.onClick.add(v)}if(p.force_br_newlines){if(c){m.onKeyPress.add(function(s,t){var x;if(t.keyCode==13&&o.getNode().nodeName!="LI"){o.setContent('
',{format:"raw"});x=u.get("__");x.removeAttribute("id");o.select(x);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,y){if(y.keyCode==13&&!y.shiftKey){var x=t.selection.getStart(),s=n._previousFormats;if(!x.hasChildNodes()&&s){x=u.getParent(x,u.isBlock);if(x&&x.nodeName!="LI"){x.innerHTML="";if(n._previousFormats){x.appendChild(s.wrapper);s.inner.innerHTML="\uFEFF"}else{x.innerHTML="\uFEFF"}o.select(x,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 r(t){var s=o.getRng(),x,A=u.create("div",null," "),z,y=u.getViewPort(t.getWin()).h;s.insertNode(x=u.create("br"));s.setStartAfter(x);s.setEndAfter(x);o.setRng(s);if(o.getSel().focusNode==x.previousSibling){o.select(u.insertAfter(u.doc.createTextNode("\u00a0"),x));o.collapse(d)}u.insertAfter(A,x);z=u.getPos(A).y;u.remove(A);if(z>y){t.getWin().scrollTo(0,z)}}m.onKeyPress.add(function(s,t){if(t.keyCode==13&&(t.shiftKey||(p.force_br_newlines&&!u.getParent(o.getNode(),"h1,h2,h3,h4,h5,h6,ol,ul")))){r(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,x){var z,y=o.getNode(),s=t.getBody();if(s.childNodes.length===1&&y.nodeName=="P"){y=u.rename(y,p.element);o.select(y);o.collapse();t.nodeChanged()}else{if(x.keyCode==13&&!x.shiftKey&&n.lastElm!="P"){z=u.getParent(y,"p");if(z){u.rename(z,p.element);t.nodeChanged()}}}})}}},getParentBlock:function(o){var m=this.dom;return m.getParent(o,m.isBlock)},insertPara:function(Q){var E=this,v=E.editor,M=v.dom,R=v.getDoc(),V=v.settings,F=v.selection.getSel(),G=F.getRangeAt(0),U=R.body;var J,K,H,O,N,q,o,u,z,m,C,T,p,x,I,L=M.getViewPort(v.getWin()),B,D,A;v.undoManager.beforeChange();J=R.createRange();J.setStart(F.anchorNode,F.anchorOffset);J.collapse(d);K=R.createRange();K.setStart(F.focusNode,F.focusOffset);K.collapse(d);H=J.compareBoundaryPoints(J.START_TO_END,K)<0;O=H?F.anchorNode:F.focusNode;N=H?F.anchorOffset:F.focusOffset;q=H?F.focusNode:F.anchorNode;o=H?F.focusOffset:F.anchorOffset;if(O===q&&/^(TD|TH)$/.test(O.nodeName)){if(O.firstChild.nodeName=="BR"){M.remove(O.firstChild)}if(O.childNodes.length==0){v.dom.add(O,V.element,null,"
");T=v.dom.add(O,V.element,null,"
")}else{I=O.innerHTML;O.innerHTML="";v.dom.add(O,V.element,null,I);T=v.dom.add(O,V.element,null,"
")}G=R.createRange();G.selectNodeContents(T);G.collapse(1);v.selection.setRng(G);return g}if(O==U&&q==U&&U.firstChild&&v.dom.isBlock(U.firstChild)){O=q=O.firstChild;N=o=0;J=R.createRange();J.setStart(O,0);K=R.createRange();K.setStart(q,0)}O=O.nodeName=="HTML"?R.body:O;O=O.nodeName=="BODY"?O.firstChild:O;q=q.nodeName=="HTML"?R.body:q;q=q.nodeName=="BODY"?q.firstChild:q;u=E.getParentBlock(O);z=E.getParentBlock(q);m=u?u.nodeName:V.element;if(I=E.dom.getParent(u,"li,pre")){if(I.nodeName=="LI"){return e(v.selection,E.dom,I)}return d}if(u&&(u.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(M.getStyle(u,"position",1)))){m=V.element;u=null}if(z&&(z.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(M.getStyle(u,"position",1)))){m=V.element;z=null}if(/(TD|TABLE|TH|CAPTION)/.test(m)||(u&&m=="DIV"&&/left|right/gi.test(M.getStyle(u,"float",1)))){m=V.element;u=z=null}C=(u&&u.nodeName==m)?u.cloneNode(0):v.dom.create(m);T=(z&&z.nodeName==m)?z.cloneNode(0):v.dom.create(m);T.removeAttribute("id");if(/^(H[1-6])$/.test(m)&&f(G,u)){T=v.dom.create(V.element)}I=p=O;do{if(I==U||I.nodeType==9||E.dom.isBlock(I)||/(TD|TABLE|TH|CAPTION)/.test(I.nodeName)){break}p=I}while((I=I.previousSibling?I.previousSibling:I.parentNode));I=x=q;do{if(I==U||I.nodeType==9||E.dom.isBlock(I)||/(TD|TABLE|TH|CAPTION)/.test(I.nodeName)){break}x=I}while((I=I.nextSibling?I.nextSibling:I.parentNode));if(p.nodeName==m){J.setStart(p,0)}else{J.setStartBefore(p)}J.setEnd(O,N);C.appendChild(J.cloneContents()||R.createTextNode(""));try{K.setEndAfter(x)}catch(P){}K.setStart(q,o);T.appendChild(K.cloneContents()||R.createTextNode(""));G=R.createRange();if(!p.previousSibling&&p.parentNode.nodeName==m){G.setStartBefore(p.parentNode)}else{if(J.startContainer.nodeName==m&&J.startOffset==0){G.setStartBefore(J.startContainer)}else{G.setStart(J.startContainer,J.startOffset)}}if(!x.nextSibling&&x.parentNode.nodeName==m){G.setEndAfter(x.parentNode)}else{G.setEnd(K.endContainer,K.endOffset)}G.deleteContents();if(b){v.getWin().scrollTo(0,L.y)}if(C.firstChild&&C.firstChild.nodeName==m){C.innerHTML=C.firstChild.innerHTML}if(T.firstChild&&T.firstChild.nodeName==m){T.innerHTML=T.firstChild.innerHTML}function S(y,s){var r=[],X,W,t;y.innerHTML="";if(V.keep_styles){W=s;do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(W.nodeName)){X=W.cloneNode(g);M.setAttrib(X,"id","");r.push(X)}}while(W=W.parentNode)}if(r.length>0){for(t=r.length-1,X=y;t>=0;t--){X=X.appendChild(r[t])}r[0].innerHTML=b?"\u00a0":"
";return r[0]}else{y.innerHTML=b?"\u00a0":"
"}}if(M.isEmpty(C)){S(C,O)}if(M.isEmpty(T)){A=S(T,q)}if(b&&parseFloat(opera.version())<9.5){G.insertNode(C);G.insertNode(T)}else{G.insertNode(T);G.insertNode(C)}T.normalize();C.normalize();v.selection.select(T,true);v.selection.collapse(true);B=v.dom.getPos(T).y;if(BL.y+L.h){v.getWin().scrollTo(0,B1||ac==au){return ac}}}var am=V.selection.getRng();var aq=am.startContainer;var al=am.endContainer;if(aq!=al&&am.endOffset==0){var ap=an(aq,al);var ao=ap.nodeType==3?ap.length:ap.childNodes.length;am.setEnd(ap,ao)}return am}function Y(ao,au,ar,aq,am){var al=[],an=-1,at,aw=-1,ap=-1,av;O(ao.childNodes,function(ay,ax){if(ay.nodeName==="UL"||ay.nodeName==="OL"){an=ax;at=ay;return false}});O(ao.childNodes,function(ay,ax){if(ay.nodeName==="SPAN"&&c.getAttrib(ay,"data-mce-type")=="bookmark"&&ay.id==au.id+"_start"){aw=ax}if(ay.nodeName==="SPAN"&&c.getAttrib(ay,"data-mce-type")=="bookmark"&&ay.id==au.id+"_end"){ap=ax}});if(an<=0||(awan)){O(a.grep(ao.childNodes),am);return 0}else{av=ar.cloneNode(S);O(a.grep(ao.childNodes),function(ay,ax){if((awan&&ax>an)){al.push(ay);ay.parentNode.removeChild(ay)}});if(awan){ao.insertBefore(av,at.nextSibling)}}aq.push(av);O(al,function(ax){av.appendChild(ax)});return av}}function aj(am,ao){var al=[],ap,an;ap=ai.inline||ai.block;an=c.create(ap);W(an);K.walk(am,function(aq){var ar;function at(au){var ax=au.nodeName.toLowerCase(),aw=au.parentNode.nodeName.toLowerCase(),av;if(g(ax,"br")){ar=0;if(ai.block){c.remove(au)}return}if(ai.wrapper&&x(au,Z,ah)){ar=0;return}if(ai.block&&!ai.wrapper&&G(ax)){au=c.rename(au,ap);W(au);al.push(au);ar=0;return}if(ai.selector){O(ad,function(ay){if("collapsed" in ay&&ay.collapsed!==ae){return}if(c.is(au,ay.selector)&&!b(au)){W(au,ay);av=true}});if(!ai.inline||av){ar=0;return}}if(d(ap,ax)&&d(aw,ap)&&!(au.nodeType===3&&au.nodeValue.length===1&&au.nodeValue.charCodeAt(0)===65279)){if(!ar){ar=an.cloneNode(S);au.parentNode.insertBefore(ar,au);al.push(ar)}ar.appendChild(au)}else{if(ax=="li"&&ao){ar=Y(au,ao,an,al,at)}else{ar=0;O(a.grep(au.childNodes),at);ar=0}}}O(aq,at)});if(ai.wrap_links===false){O(al,function(aq){function ar(aw){var av,au,at;if(aw.nodeName==="A"){au=an.cloneNode(S);al.push(au);at=a.grep(aw.childNodes);for(av=0;av1||!F(at))&&aq===0){c.remove(at,1);return}if(ai.inline||ai.wrapper){if(!ai.exact&&aq===1){at=ar(at)}O(ad,function(av){O(c.select(av.inline,at),function(ax){var aw;if(av.wrap_links===false){aw=ax.parentNode;do{if(aw.nodeName==="A"){return}}while(aw=aw.parentNode)}U(av,ah,ax,av.exact?ax:null)})});if(x(at.parentNode,Z,ah)){c.remove(at,1);at=0;return B}if(ai.merge_with_parents){c.getParent(at.parentNode,function(av){if(x(av,Z,ah)){c.remove(at,1);at=0;return B}})}if(at){at=u(C(at),at);at=u(at,C(at,B))}}})}if(ai){if(ac){X=c.createRng();X.setStartBefore(ac);X.setEndAfter(ac);aj(o(X,ad))}else{if(!ae||!ai.inline||c.select("td.mceSelected,th.mceSelected").length){var ak=V.selection.getNode();V.selection.setRng(ab());ag=q.getBookmark();aj(o(q.getRng(B),ad),ag);if(ai.styles&&(ai.styles.color||ai.styles.textDecoration)){a.walk(ak,I,"childNodes");I(ak)}q.moveToBookmark(ag);q.setRng(aa(q.getRng(B)));V.nodeChanged()}else{Q("apply",Z,ah)}}}}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(ad,Y,ac){var aa,X=P[ad],ae=P[ad=="apply"?"remove":"apply"];function af(){return P.apply.length||P.remove.length}function ab(){P.apply=[];P.remove=[]}function ag(ah){O(P.apply.reverse(),function(ai){T(ai.name,ai.vars,ah);if(ai.name==="forecolor"&&ai.vars.value){I(ah.parentNode)}});O(P.remove.reverse(),function(ai){A(ai.name,ai.vars,ah)});c.remove(ah,1);ab()}for(aa=X.length-1;aa>=0;aa--){if(X[aa].name==Y){return}}X.push({name:Y,vars:ac});for(aa=ae.length-1;aa>=0;aa--){if(ae[aa].name==Y){ae.splice(aa,1)}}if(af()){V.getDoc().execCommand("FontName",false,"mceinline");P.lastRng=q.getRng();O(c.select("font,span"),function(ai){var ah;if(b(ai)){ah=q.getBookmark();ag(ai);q.moveToBookmark(ah);V.nodeChanged()}});if(!P.isListening&&af()){P.isListening=true;function W(ai,aj){var ah=c.createRng();ag(ai);ah.setStart(aj,aj.nodeValue.length);ah.setEnd(aj,aj.nodeValue.length);q.setRng(ah);V.nodeChanged()}var Z=false;O("onKeyDown,onKeyUp,onKeyPress,onMouseUp".split(","),function(ah){V[ah].addToTop(function(ai,al){if(al.keyCode==13&&!al.shiftKey){Z=true;return}if(af()&&!a.dom.RangeUtils.compareRanges(P.lastRng,q.getRng())){var aj=false;O(c.select("font,span"),function(ao){var ap,an;if(b(ao)){aj=true;ap=ao.firstChild;while(ap&&ap.nodeType!=3){ap=ap.firstChild}if(ap){W(ao,ap)}else{c.remove(ao)}}});if(Z&&!aj){var ak=q.getNode();var am=ak;while(am&&am.nodeType!=3){am=am.firstChild}if(am){ak=am.parentNode;while(!F(ak)){ak=ak.parentNode}W(ak,am)}}if(al.type=="keyup"||al.type=="mouseup"){ab();Z=false}}})})}}}}})(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 index e58e8102..084456b0 100644 --- a/include/javascript/tiny_mce/tiny_mce_dev.js +++ b/include/javascript/tiny_mce/tiny_mce_dev.js @@ -73,6 +73,8 @@ include('util/JSONP.js'); include('util/XHR.js'); include('util/JSONRequest.js'); + include('util/VK.js'); + include('util/Quirks.js'); // tinymce.html.* include('html/Entities.js'); @@ -127,4 +129,4 @@ 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 index dd271aec..919c5bdf 100644 --- a/include/javascript/tiny_mce/tiny_mce_jquery.js +++ b/include/javascript/tiny_mce/tiny_mce_jquery.js @@ -1 +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='';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="";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+=""+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)+"";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'');i+=""+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)+"";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+=''+k.renderHTML()+""}else{f+=""+k.renderHTML()+""}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 +(function(d){var a=/^\s*|\s*$/g,e,c="B".replace(/A(.)|B/,"$1")==="$1";var b={majorVersion:"3",minorVersion:"4.4",releaseDate:"2011-08-04",_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.isIE7=s.isIE&&/MSIE [7]/.test(g);s.isIE8=s.isIE&&/MSIE [8]/.test(g);s.isIE9=s.isIE&&/MSIE [9]/.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);s.isIOS5=s.isIDevice&&g.match(/AppleWebKit\/(\d*)/)[1]>=534;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(a){a.VK={DELETE:46,BACKSPACE:8}})(tinymce);(function(b){function a(c){var f=c.dom,d=c.selection,e=b.VK;c.onKeyUp.add(function(g,j){if(j.keyCode==e.DELETE||j.keyCode==e.BACKSPACE){var i=d.getRng().startContainer;var k=i;while(!f.isBlock(k)){k=k.parentNode}var h=f.select("span.Apple-style-span",k);f.remove(h,true)}})}b.create("tinymce.util.Quirks",{Quirks:function(c){if(b.isWebKit){a(c)}}})})(tinymce);(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=/&(#x|#)?([\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,m.length===2?16:10);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="\\\" \\' \\; \\: ; : \uFEFF".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(/\uFEFF[0-9]/g,function(C){return a[C]})}if(!A){B=B.replace(/\\([\'\";:])/g,"$1")}return B}if(r){r=r.replace(/\\[\"\';:\uFEFF]/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,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(r)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(m){var h={},j,l,g,f,c={},b,e,d=m.makeMap,k=m.each;function i(o,n){return o.split(n||",")}function a(r,q){var o,p={};function n(s){return s.replace(/[A-Z]+/g,function(t){return n(r[t])})}for(o in r){if(r.hasOwnProperty(o)){r[o]=n(r[o])}}n(q).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(v,t,s,u){s=i(s,"|");p[t]={attributes:d(s),attributesOrder:s,children:d(u,"|",{"#comment":{}})}});return p}l="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";l=d(l,",",d(l.toUpperCase()));h=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]");j=d("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,autoplay,loop,controls");g=d("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,source");f=m.extend(d("td,th,iframe,video,audio,object"),g);b=d("pre,script,style,textarea");e=d("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");m.html.Schema=function(q){var z=this,n={},o={},x=[],p;q=q||{};if(q.verify_html===false){q.valid_elements="*[*]"}if(q.valid_styles){p={};k(q.valid_styles,function(B,A){p[A]=m.explode(B)})}function y(A){return new RegExp("^"+A.replace(/([?+*])/g,".$1")+"$")}function s(H){var G,C,V,R,W,B,E,Q,T,M,U,Y,K,F,S,A,O,D,X,Z,L,P,J=/^([#+-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,N=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,I=/[*?+]/;if(H){H=i(H);if(n["@"]){O=n["@"].attributes;D=n["@"].attributesOrder}for(G=0,C=H.length;G=0){for(R=l.length-1;R>=S;R--){Q=l[R];if(Q.valid){B.end(Q.name)}}l.length=S}}E=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};G=e.getShortEndedElements();A=e.getSelfClosingElements();k=e.getBoolAttrs();y=c.validate;K=c.remove_internals;z=c.fix_self_closing;while(f=E.exec(q)){if(m0&&l[l.length-1].name===H){D(H)}if(!y||(J=e.getElementRule(H))){r=true;if(y){L=J.attributes;n=J.attributePatterns}if(o=f[8]){s=o.indexOf("data-mce-type")!==-1;if(s&&K){r=false}C=[];C.map={};o.replace(h,function(R,Q,V,U,T){var W,S;Q=Q.toLowerCase();V=Q in k?Q:x(V||U||T||"");if(y&&!s&&Q.indexOf("data-")!==0){W=L[Q];if(!W&&n){S=n.length;while(S--){W=n[S];if(W.pattern.test(Q)){break}}if(S===-1){W=null}}if(!W){return}if(W.validValues&&!(V in W.validValues)){return}}C.map[Q]=V;C.push({name:Q,value:V})})}else{C=[];C.map={}}if(y&&!s){I=J.attributesRequired;O=J.attributesDefault;N=J.attributesForced;if(N){M=N.length;while(M--){F=N[M];P=F.name;v=F.value;if(v==="{$uid}"){v="mce_"+t++}C.map[P]=v;C.push({name:P,value:v})}}if(O){M=O.length;while(M--){F=O[M];P=F.name;if(!(P in C.map)){v=F.value;if(v==="{$uid}"){v="mce_"+t++}C.map[P]=v;C.push({name:P,value:v})}}}if(I){M=I.length;while(M--){if(I[M] in C.map){break}}if(M===-1){r=false}}if(C.map["data-mce-bogus"]){r=false}}if(r){B.start(H,C,p)}}else{r=false}if(j=g[H]){j.lastIndex=m=f.index+f[0].length;if(f=j.exec(q)){if(r){u=q.substr(m,f.index-m)}m=f.index+f[0].length}else{u=q.substr(m);m=q.length}if(r&&u.length>0){B.text(u,true)}if(r){B.end(H)}E.lastIndex=m;continue}if(!p){if(!o||o.indexOf("/")!=o.length-1){l.push({name:H,valid:r})}else{if(r){B.end(H)}}}}else{if(H=f[1]){B.comment(H)}else{if(H=f[2]){B.cdata(H)}else{if(H=f[3]){B.doctype(H)}else{if(H=f[4]){B.pi(H,f[5])}}}}}}m=f.index+f[0].length}if(m=0;M--){H=l[M];if(H.valid){B.end(H.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){N.value=l;N=N.prev}else{L=N.prev;N.remove();N=L}}}n=new b.html.SaxParser({validate:y,fix_self_closing:!y,cdata:function(l){A.append(I("#cdata",4)).value=l},text:function(M,l){var L;if(!s[A.name]){M=M.replace(k," ");if(A.lastChild&&o[A.lastChild.name]){M=M.replace(D,"")}}if(M.length!==0){L=I("#text",3);L.raw=!!l;A.append(L).value=M}},comment:function(l){A.append(I("#comment",8)).value=l},pi:function(l,L){A.append(I(l,7)).value=L;G(A)},doctype:function(L){var l;l=A.append(I("#doctype",10));l.value=L;G(A)},start:function(l,T,M){var R,O,N,L,P,U,S,Q;N=y?h.getElementRule(l):{};if(N){R=I(N.outputName||l,1);R.attributes=T;R.shortEnded=M;A.append(R);Q=p[A.name];if(Q&&p[R.name]&&!Q[R.name]){J.push(R)}O=d.length;while(O--){P=d[O].name;if(P in T.map){E=c[P];if(E){E.push(R)}else{c[P]=[R]}}}if(o[l]){G(R)}if(!M){A=R}}},end:function(l){var P,M,O,L,N;M=y?h.getElementRule(l):{};if(M){if(o[l]){if(!s[A.name]){for(P=A.firstChild;P&&P.type===3;){O=P.value.replace(D,"");if(O.length>0){P.value=O;P=P.next}else{L=P.next;P.remove();P=L}}for(P=A.lastChild;P&&P.type===3;){O=P.value.replace(t,"");if(O.length>0){P.value=O;P=P.prev}else{L=P.prev;P.remove();P=L}}}P=A.prev;if(P&&P.type===3){O=P.value.replace(D,"");if(O.length>0){P.value=O}else{P.remove()}}}if(M.removeEmpty||M.paddEmpty){if(A.isEmpty(u)){if(M.paddEmpty){A.empty().append(new a("#text","3")).value="\u00a0"}else{if(!A.attributes.map.name){N=A.parent;A.empty().remove();A=N;return}}}}A=A.parent}}},h);H=A=new a(m.context||g.root_name,11);n.parse(v);if(y&&J.length){if(!m.context){j(J)}else{m.invalid=true}}if(q&&H.name=="body"){F()}if(!m.invalid){for(K in i){E=e[K];z=i[K];x=z.length;while(x--){if(!z[x].parent){z.splice(x,1)}}for(C=0,B=E.length;C0){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;l.boxModel=!h.isIE||o.compatMode=="CSS1Compat"||l.stdMode;l.hasOuterHTML="outerHTML" in o.createElement("a");l.settings=m=h.extend({keep_values:false,hex_colors:1},m);l.schema=m.schema;l.styles=new h.html.Styles({url_converter:m.url_converter,url_converter_scope:m.url_converter_scope},m.schema);if(h.isIE6){try{o.execCommand("BackgroundImageCache",false,true)}catch(n){l.cssFlicker=true}}if(b&&m.schema){("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(p){o.createElement(p)});for(k in m.schema.getCustomElements()){o.createElement(k)}}h.addUnload(l.destroy,l)},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(o,p,l){var j,k=this,m;o=k.get(o);if(!o||o.nodeType!==1){return l===m?false:l}if(!e(l)){l=""}if(/^(src|href|style|coords|shape)$/.test(p)){j=o.getAttribute("data-mce-"+p);if(j){return j}}if(b&&k.props[p]){j=o[k.props[p]];j=j&&j.nodeValue?j.nodeValue:j}if(!j){j=o.getAttribute(p,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(p)){if(o[k.props[p]]===true&&j===""){return p}return j?p:""}if(o.nodeName==="FORM"&&o.getAttributeNode(p)){return o.getAttributeNode(p).nodeValue}if(p==="style"){j=j||o.style.cssText;if(j){j=k.serializeStyle(k.parseStyle(j),o.nodeName);if(k.settings.keep_values&&!k._isRes(j)){o.setAttribute("data-mce-style",j)}}}if(d&&p==="class"&&j){j=j.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(p){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 p}return l;case"shape":j=j.toLowerCase();break;default:if(p.indexOf("on")===0&&j){j=h._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+j)}}}return(j!==m&&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(s.getBoundingClientRect){s=s.getBoundingClientRect();o=k.boxModel?p.documentElement:p.body;j=s.left+(p.documentElement.scrollLeft||p.body.scrollLeft)-o.clientTop;q=s.top+(p.documentElement.scrollTop||p.body.scrollTop)-o.clientLeft;return{x:j,y:q}}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==="data-mce-bookmark"){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(n,o){var j=0,l,m,k;if(n){for(l=n.nodeType,n=n.previousSibling,m=n;n;n=n.previousSibling){k=n.nodeType;if(o&&k==3){if(k==l||!n.nodeValue.length){continue}}j++;l=k}}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(d){var b=this,h=d.dom,c=true,f=false;function e(i,j){var k,t=0,q,n,m,l,o,r,p=-1,s;k=i.duplicate();k.collapse(j);s=k.parentElement();if(s.ownerDocument!==d.dom.doc){return}while(s.contentEditable==="false"){s=s.parentNode}if(!s.hasChildNodes()){return{node:s,inside:1}}m=s.children;q=m.length-1;while(t<=q){r=Math.floor((t+q)/2);l=m[r];k.moveToElementText(l);p=k.compareEndPoints(j?"StartToStart":"EndToEnd",i);if(p>0){q=r-1}else{if(p<0){t=r+1}else{return{node:l}}}}if(p<0){if(!l){k.moveToElementText(s);k.collapse(true);l=s;n=true}else{k.collapse(false)}k.setEndPoint(j?"EndToStart":"EndToEnd",i);if(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)>0){k=i.duplicate();k.collapse(j);o=-1;while(s==k.parentElement()){if(k.move("character",-1)==0){break}o++}}o=o||k.text.replace("\r\n"," ").length}else{k.collapse(true);k.setEndPoint(j?"StartToStart":"StartToEnd",i);o=k.text.replace("\r\n"," ").length}return{node:l,position:p,offset:o,inside:n}}function g(){var i=d.getRng(),r=h.createRng(),l,k,p,q,m,j;l=i.item?i.item(0):i.parentElement();if(l.ownerDocument!=h.doc){return r}k=d.isCollapsed();if(i.item){r.setStart(l.parentNode,h.nodeIndex(l));r.setEnd(r.startContainer,r.startOffset+1);return r}function o(A){var u=e(i,A),s,y,z=0,x,v,t;s=u.node;y=u.offset;if(u.inside&&!s.hasChildNodes()){r[A?"setStart":"setEnd"](s,0);return}if(y===v){r[A?"setStartBefore":"setEndAfter"](s);return}if(u.position<0){x=u.inside?s.firstChild:s.nextSibling;if(!x){r[A?"setStartAfter":"setEndAfter"](s);return}if(!y){if(x.nodeType==3){r[A?"setStart":"setEnd"](x,0)}else{r[A?"setStartBefore":"setEndBefore"](x)}return}while(x){t=x.nodeValue;z+=t.length;if(z>=y){s=x;z-=y;z=t.length-z;break}x=x.nextSibling}}else{x=s.previousSibling;if(!x){return r[A?"setStartBefore":"setEndBefore"](s)}if(!y){if(s.nodeType==3){r[A?"setStart":"setEnd"](x,s.nodeValue.length)}else{r[A?"setStartAfter":"setEndAfter"](x)}return}while(x){z+=x.nodeValue.length;if(z>=y){s=x;z-=y;break}x=x.previousSibling}}r[A?"setStart":"setEnd"](s,z)}try{o(true);if(!k){o()}}catch(n){if(n.number==-2147024809){m=b.getBookmark(2);p=i.duplicate();p.collapse(true);l=p.parentElement();if(!k){p=i.duplicate();p.collapse(false);q=p.parentElement();q.innerHTML=q.innerHTML}l.innerHTML=l.innerHTML;b.moveToBookmark(m);i=d.getRng();o(true);if(!k){o()}}else{throw n}}return r}this.getBookmark=function(m){var j=d.getRng(),o,i,l={};function n(u){var u,t,p,s,r,q=[];t=u.parentNode;p=h.getRoot().parentNode;while(t!=p){s=t.children;r=s.length;while(r--){if(u===s[r]){q.push(r);break}}u=t;t=t.parentNode}return q}function k(q){var p;p=e(j,q);if(p){return{position:p.position,offset:p.offset,indexes:n(p.node),inside:p.inside}}}if(m===2){if(!j.item){l.start=k(true);if(!d.isCollapsed()){l.end=k()}}else{l.start={ctrl:true,indexes:n(j.item(0))}}}return l};this.moveToBookmark=function(k){var j,i=h.doc.body;function m(o){var r,q,n,p;r=h.getRoot();for(q=o.length-1;q>=0;q--){p=r.children;n=o[q];if(n<=p.length-1){r=p[n]}}return r}function l(r){var n=k[r?"start":"end"],q,p,o;if(n){q=n.position>0;p=i.createTextRange();p.moveToElementText(m(n.indexes));offset=n.offset;if(offset!==o){p.collapse(n.inside||q);p.moveStart("character",q?-offset:offset)}else{p.collapse(r)}j.setEndPoint(r?"StartToStart":"EndToStart",p);if(r){j.collapse(true)}}}if(k.start){if(k.start.ctrl){j=i.createControlRange();j.addElement(m(k.start.indexes));j.select()}else{j=i.createTextRange();l(true);l();j.select()}}};this.addRange=function(i){var n,l,k,p,s,q,r=d.dom.doc,m=r.body;function j(z){var u,y,t,x,v;t=h.create("a");u=z?k:s;y=z?p:q;x=n.duplicate();if(u==r||u==r.documentElement){u=m;y=0}if(u.nodeType==3){u.parentNode.insertBefore(t,u);x.moveToElementText(t);x.moveStart("character",y);h.remove(t);n.setEndPoint(z?"StartToStart":"EndToEnd",x)}else{v=u.childNodes;if(v.length){if(y>=v.length){h.insertAfter(t,v[v.length-1])}else{u.insertBefore(t,v[y])}x.moveToElementText(t)}else{t=r.createTextNode("\uFEFF");u.appendChild(t);x.moveToElementText(t.parentNode);x.collapse(c)}n.setEndPoint(z?"StartToStart":"EndToEnd",x);h.remove(t)}}k=i.startContainer;p=i.startOffset;s=i.endContainer;q=i.endOffset;n=m.createTextRange();if(k==s&&k.nodeType==1&&p==q-1){if(p==q-1){try{l=m.createControlRange();l.addElement(k.childNodes[p]);l.select();return}catch(o){}}}j(true);j();n.select()};this.getRangeAt=g}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==k&&f.endContainer==k){k.body.innerHTML=g}else{f.deleteContents();if(k.body.childNodes.length==0){k.body.innerHTML=g}else{if(f.createContextualFragment){f.insertNode(f.createContextualFragment(g))}else{m=k.createDocumentFragment();l=k.createElement("div");m.appendChild(l);l.outerHTML=g;f.insertNode(m)}}}j=n.dom.get("__caret");f=k.createRange();f.setStartBefore(j);f.setEndBefore(j);n.setRng(f);n.dom.remove("__caret");try{n.setRng(f)}catch(h){}}else{if(f.item){k.execCommand("Delete",false,null);f=n.getRng()}f.pasteHTML(g)}if(!i.no_events){n.onSetContent.dispatch(n,i)}},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}if(v.tridentSel){return v.tridentSel.getBookmark(r)}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(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(r.tridentSel){return r.tridentSel.moveToBookmark(n)}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},normalize:function(){var g=this,f,i;if(c.isIE){return}function h(p){var k,o,n,m=g.dom,j=m.getRoot(),l;k=f[(p?"start":"end")+"Container"];o=f[(p?"start":"end")+"Offset"];if(k.nodeType===9){k=k.body;o=0}if(k===j){if(k.hasChildNodes()){k=k.childNodes[Math.min(!p&&o>0?o-1:o,k.childNodes.length-1)];o=0;l=k;n=new c.dom.TreeWalker(k,j);do{if(l.nodeType===3){o=p?0:l.nodeValue.length-1;k=l;break}if(l.nodeName==="BR"){o=m.nodeIndex(l);k=l.parentNode;break}}while(l=(p?n.next():n.prev()));i=true}}if(i){f["set"+(p?"Start":"End")](k,o)}}f=g.getRng();h(true);if(f.collapsed){h()}if(i){g.setRng(f)}},destroy:function(g){var f=this;f.win=null;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&&!(this.editor&&this.editor.forcedHighContrastMode)){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,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}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(j){if(j.value===g.selectedValue){f.items[j.id].setSelected(1);g.oldID=j.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="";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+=""+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)+"";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'');i+=""+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)+"";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+=''+k.renderHTML()+""}else{f+=""+k.renderHTML()+""}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){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return 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(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!=0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});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&&!m.isIOS5){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(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(z){var y={prefix:"plugins/",resource:z,suffix:"/editor_plugin"+m.suffix+".js"};var z=c.createUrl(y,z);c.load(z.resource,z)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+m.suffix+".js"})}}});p.loadQueue(function(){if(!u.removed){u.init()}})}q()},init:function(){var r,H=this,I=H.settings,E,A,D=H.getElement(),q,p,F,y,C,G,z,v=[];m.add(H);I.aria_label=I.aria_label||n.getAttrib(D,"aria-label",H.getLang("aria.rich_text_area"));if(I.theme){I.theme=I.theme.replace(/-/,"");q=h.get(I.theme);H.theme=new q();if(H.theme.init&&I.init_theme){H.theme.init(H,h.urls[I.theme]||m.documentBaseURL.replace(/\/$/,""))}}function B(J){var K=c.get(J),t=c.urls[J]||m.documentBaseURL.replace(/\/$/,""),s;if(K&&m.inArray(v,J)===-1){i(c.dependencies(J),function(u){B(u)});s=new K(H,t);H.plugins[J]=s;if(s.init){s.init(H,t);v.push(J)}}}i(g(I.plugins.replace(/\-/g,"")),B);if(I.popup_css!==false){if(I.popup_css){I.popup_css=H.documentBaseURI.toAbsolute(I.popup_css)}else{I.popup_css=H.baseURI.toAbsolute("themes/"+I.theme+"/skins/"+I.skin+"/dialog.css")}}if(I.popup_css_add){I.popup_css+=","+H.documentBaseURI.toAbsolute(I.popup_css_add)}H.controlManager=new m.ControlManager(H);if(I.custom_undo_redo){H.onBeforeExecCommand.add(function(t,J,u,K,s){if(J!="Undo"&&J!="Redo"&&J!="mceRepaint"&&(!s||!s.skip_undo)){H.undoManager.beforeChange()}});H.onExecCommand.add(function(t,J,u,K,s){if(J!="Undo"&&J!="Redo"&&J!="mceRepaint"&&(!s||!s.skip_undo)){H.undoManager.add()}})}H.onExecCommand.add(function(s,t){if(!/^(FontName|FontSize)$/.test(t)){H.nodeChanged()}});if(a){function x(s,t){if(!t||!t.initial){H.execCommand("mceRepaint")}}H.onUndo.add(x);H.onRedo.add(x);H.onSetContent.add(x)}H.onBeforeRenderUI.dispatch(H,H.controlManager);if(I.render_ui){E=I.width||D.style.width||D.offsetWidth;A=I.height||D.style.height||D.offsetHeight;H.orgDisplay=D.style.display;G=/^[0-9\.]+(|px)$/i;if(G.test(""+E)){E=Math.max(parseInt(E)+(q.deltaWidth||0),100)}if(G.test(""+A)){A=Math.max(parseInt(A)+(q.deltaHeight||0),100)}q=H.theme.renderUI({targetNode:D,width:E,height:A,deltaWidth:I.delta_width,deltaHeight:I.delta_height});H.editorContainer=q.editorContainer}if(document.domain&&location.hostname!=document.domain){m.relaxedDomain=document.domain}n.setStyles(q.sizeContainer||q.editorContainer,{width:E,height:A});if(I.content_css){m.each(g(I.content_css),function(s){H.contentCSS.push(H.documentBaseURI.toAbsolute(s))})}A=(q.iframeHeight||A)+(typeof(A)=="number"?(q.deltaHeight||0):"");if(A<100){A=100}H.iframeHTML=I.doctype+'';if(I.document_base_url!=m.documentBaseURL){H.iframeHTML+=''}if(I.ie7_compat){H.iframeHTML+=''}else{H.iframeHTML+=''}H.iframeHTML+='';if(!a||!/Firefox\/2/.test(navigator.userAgent)){for(z=0;z'}H.contentCSS=[]}y=I.body_id||"tinymce";if(y.indexOf("=")!=-1){y=H.getParam("body_id","","hash");y=y[H.id]||y}C=I.body_class||"";if(C.indexOf("=")!=-1){C=H.getParam("body_class","","hash");C=C[H.id]||""}H.iframeHTML+='';if(m.relaxedDomain&&(b||(m.isOpera&&parseFloat(opera.version())<11))){F='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+H.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'}r=n.add(q.iframeContainer,"iframe",{id:H.id+"_ifr",src:F||'javascript:""',frameBorder:"0",allowTransparency:"true",title:I.aria_label,style:{width:"100%",height:A}});H.contentAreaContainer=q.iframeContainer;n.get(q.editorContainer).style.display=H.orgDisplay;n.get(H.id).style.display="none";n.setAttrib(H.id,"aria-hidden",true);if(!m.relaxedDomain||!F){H.setupIframe()}D=r=q=null},setupIframe:function(x){var q=this,v=q.settings,y=n.get(q.id),z=q.getDoc(),u,p;if((!b||!m.relaxedDomain)&&!x){if(a&&!v.readonly){q.getWin().addEventListener("DOMContentLoaded",function(){window.setTimeout(function(){var s=q.getBody(),t;s.innerHTML="
";if(s.contentEditable!==t){s.contentEditable=false;s.contentEditable=true;q.onMouseDown.add(function(A,B){if(B.target.nodeName==="HTML"){s.contentEditable=false;s.contentEditable=true;z.designMode="on";window.setTimeout(function(){z.designMode="off";q.getBody().focus()},1)}})}else{z.designMode="on"}q.setupIframe(true)},1)},false)}z.open();z.write(q.iframeHTML);z.close();if(m.relaxedDomain){z.domain=m.relaxedDomain}if(a&&!v.readonly){return}}p=q.getBody();p.disabled=true;if(!a&&!v.readonly){p.contentEditable=true}p.disabled=false;q.schema=new m.html.Schema(v);q.dom=new m.dom.DOMUtils(q.getDoc(),{keep_values:true,url_converter:q.convertURL,url_converter_scope:q,hex_colors:v.force_hex_style_colors,class_filter:v.class_filter,update_styles:1,fix_ie_paragraphs:1,schema:q.schema});q.parser=new m.html.DomParser(v,q.schema);if(!q.settings.allow_html_in_named_anchor){q.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)}}})}q.parser.addAttributeFilter("src,href,style",function(s,t){var A=s.length,C,E=q.dom,D,B;while(A--){C=s[A];D=C.attr(t);B="data-mce-"+t;if(!C.attributes.map[B]){if(t==="style"){C.attr(B,E.serializeStyle(E.parseStyle(D),C.name))}else{C.attr(B,q.convertURL(D,t,C.name))}}}});q.parser.addNodeFilter("script",function(s,t){var A=s.length;while(A--){s[A].attr("type","mce-text/javascript")}});q.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+"]]"}});q.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(t,A){var B=t.length,C,s=q.schema.getNonEmptyElements();while(B--){C=t[B];if(C.isEmpty(s)){C.empty().append(new m.html.Node("br",1)).shortEnded=true}}});q.serializer=new m.dom.Serializer(v,q.dom,q.schema);q.selection=new m.dom.Selection(q.dom,q.getWin(),q.serializer);q.formatter=new m.Formatter(this);q.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){q.formatter.register(s,{block:s,remove:"all"})});q.formatter.register(q.settings.formats);q.undoManager=new m.UndoManager(q);q.undoManager.onAdd.add(function(t,s){if(t.hasUndo()){return q.onChange.dispatch(q,s,t)}});q.undoManager.onUndo.add(function(t,s){return q.onUndo.dispatch(q,s,t)});q.undoManager.onRedo.add(function(t,s){return q.onRedo.dispatch(q,s,t)});q.forceBlocks=new m.ForceBlocks(q,{forced_root_block:v.forced_root_block});q.editorCommands=new m.EditorCommands(q);q.serializer.onPreProcess.add(function(s,t){return q.onPreProcess.dispatch(q,t,s)});q.serializer.onPostProcess.add(function(s,t){return q.onPostProcess.dispatch(q,t,s)});q.onPreInit.dispatch(q);if(!v.gecko_spellcheck){q.getBody().spellcheck=0}if(!v.readonly){q._addEvents()}q.controlManager.onPostRender.dispatch(q,q.controlManager);q.onPostRender.dispatch(q);q.quirks=new m.util.Quirks(this);if(v.directionality){q.getBody().dir=v.directionality}if(v.nowrap){q.getBody().style.whiteSpace="nowrap"}if(v.handle_node_change_callback){q.onNodeChange.add(function(t,s,A){q.execCallback("handle_node_change_callback",q.id,A,-1,-1,true,q.selection.isCollapsed())})}if(v.save_callback){q.onSaveContent.add(function(s,A){var t=q.execCallback("save_callback",q.id,A.content,q.getBody());if(t){A.content=t}})}if(v.onchange_callback){q.onChange.add(function(t,s){q.execCallback("onchange_callback",q,s)})}if(v.protect){q.onBeforeSetContent.add(function(s,t){if(v.protect){i(v.protect,function(A){t.content=t.content.replace(A,function(B){return""})})}})}if(v.convert_newlines_to_brs){q.onBeforeSetContent.add(function(s,t){if(t.initial){t.content=t.content.replace(/\r?\n/g,"
")}})}if(v.preformatted){q.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(v.verify_css_classes){q.serializer.attribValueFilter=function(C,A){var B,t;if(C=="class"){if(!q.classesRE){t=q.dom.getClasses();if(t.length>0){B="";i(t,function(s){B+=(B?"|":"")+s["class"]});q.classesRE=new RegExp("("+B+")","gi")}}return !q.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(A)||q.classesRE.test(A)?A:""}return A}}if(v.cleanup_callback){q.onBeforeSetContent.add(function(s,t){t.content=q.execCallback("cleanup_callback","insert_to_editor",t.content,t)});q.onPreProcess.add(function(s,t){if(t.set){q.execCallback("cleanup_callback","insert_to_editor_dom",t.node,t)}if(t.get){q.execCallback("cleanup_callback","get_from_editor_dom",t.node,t)}});q.onPostProcess.add(function(s,t){if(t.set){t.content=q.execCallback("cleanup_callback","insert_to_editor",t.content,t)}if(t.get){t.content=q.execCallback("cleanup_callback","get_from_editor",t.content,t)}})}if(v.save_callback){q.onGetContent.add(function(s,t){if(t.save){t.content=q.execCallback("save_callback",q.id,t.content,q.getBody())}})}if(v.handle_event_callback){q.onEvent.add(function(s,t,A){if(q.execCallback("handle_event_callback",t,s,A)===false){j.cancel(t)}})}q.onSetContent.add(function(){q.addVisual(q.getBody())});if(v.padd_empty_editor){q.onPostProcess.add(function(s,t){t.content=t.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
[\r\n]*)$/,"")})}if(a){function r(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})}})}q.onExecCommand.add(function(s,t){if(t==="CreateLink"){r(s)}});q.onSetContent.add(q.selection.onSetContent.add(r))}q.load({initial:true,format:"html"});q.startContent=q.getContent({format:"raw"});q.undoManager.add();q.initialized=true;q.onInit.dispatch(q);q.execCallback("setupcontent_callback",q.id,q.getBody(),q.getDoc());q.execCallback("init_instance_callback",q);q.focus(true);q.nodeChanged({initial:1});i(q.contentCSS,function(s){q.dom.loadCSS(s)});if(v.auto_focus){setTimeout(function(){var s=m.get(v.auto_focus);s.selection.select(s.getBody(),1);s.selection.collapse(1);s.getBody().focus();s.getWin().focus()},100)}y=null},focus:function(u){var y,q=this,s=q.selection,x=q.settings.content_editable,r,p,v=q.getDoc();if(!u){r=s.getRng();if(r.item){p=r.item(0)}s.normalize();if(!x){q.getWin().focus()}if(m.isGecko){q.getBody().focus()}if(p&&p.ownerDocument==v){r=v.body.createControlRange();r.addElement(p);r.select()}}if(m.activeEditor!=q){if((y=m.activeEditor)!=null){y.onDeactivate.dispatch(y,q)}q.onActivate.dispatch(q,y)}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(u,s){var r=this,q,p=r.getBody(),t;s=s||{};s.format=s.format||"html";s.set=true;s.content=u;if(!s.no_events){r.onBeforeSetContent.dispatch(r,s)}u=s.content;if(!m.isIE&&(u.length===0||/^\s+$/.test(u))){t=r.settings.forced_root_block;if(t){u="<"+t+'>
"}else{u='
'}p.innerHTML=u;r.selection.select(p,true);r.selection.collapse(true);return}if(s.format!=="raw"){u=new m.html.Serializer({},r.schema).serialize(r.parser.parse(u))}s.content=m.trim(u);r.dom.setHTML(p,s.content);if(!s.no_events){r.onSetContent.dispatch(r,s)}r.selection.normalize();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.body.contentEditable=false;G.body.contentEditable=true}}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)}B.onClick.add(function(s,t){t=t.target;if(m.isWebKit&&t.nodeName=="IMG"){B.selection.getSel().setBaseAndExtent(t,0,t,1)}if(t.nodeName=="A"&&q.hasClass(t,"mceItemAnchor")){B.selection.select(t)}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.onKeyDown.add(function(t,D){if(D.keyCode!=8){return}var F=t.selection.getRng().startContainer;var E=t.selection.getRng().startOffset;while(F&&F.nodeType&&F.nodeType!=1&&F.parentNode){F=F.parentNode}if(F&&F.parentNode&&F.parentNode.tagName==="BLOCKQUOTE"&&F.parentNode.firstChild==F&&E==0){t.formatter.toggle("blockquote",null,F.parentNode);var s=t.selection.getRng();s.setStart(F,0);s.setEnd(F,0);t.selection.setRng(s);t.selection.collapse(false)}});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,"p"]);B.addShortcut("ctrl+8","",["FormatBlock",false,"div"]);B.addShortcut("ctrl+9","",["FormatBlock",false,"address"]);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}})}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(s,D){var t=D.keyCode;if((t>=33&&t<=36)||(t>=37&&t<=40)||t==13||t==45||D.ctrlKey){y()}});B.onKeyDown.add(function(s,E){var D=E.keyCode,t;if(D==8){t=B.getDoc().selection;if(t&&t.createRange&&t.createRange().item){B.undoManager.beforeChange();s.dom.remove(t.createRange().item(0));y();return j.cancel(E)}}if((D>=33&&D<=36)||(D>=37&&D<=40)||D==13||D==45){if(m.isIE&&D==13){B.undoManager.beforeChange()}if(B.undoManager.typing){y()}return}if((D<16||D>20)&&D!=224&&D!=91&&!B.undoManager.typing){B.undoManager.beforeChange();B.undoManager.typing=true;B.undoManager.add()}});B.onMouseDown.add(function(){if(B.undoManager.typing){y()}})}if(m.isWebKit){q.bind(B.getDoc(),"selectionchange",function(){if(B.selectionTimer){window.clearTimeout(B.selectionTimer);B.selectionTimer=0}B.selectionTimer=window.setTimeout(function(){B.nodeChanged()},50)})}if(m.isGecko){function A(){var s=B.dom.getAttribs(B.selection.getStart().cloneNode(false));return function(){var t=B.selection.getStart();if(t!==B.getBody()){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(A,H,J){var x,I,D,y,E,F,C,B,K,v,z,L,u,G;x=n.parser;I=new c.html.Serializer({},n.schema);u='\uFEFF';F={content:J,format:"html"};p.onBeforeSetContent.dispatch(p,F);J=F.content;if(J.indexOf("{$caret}")==-1){J+="{$caret}"}J=J.replace(/\{\$caret\}/,u);if(!p.isCollapsed()){n.getDoc().execCommand("Delete",false,null)}D=p.getNode();F={context:D.nodeName.toLowerCase()};E=x.parse(J,F);z=E.lastChild;if(z.attr("id")=="mce_marker"){C=z;for(z=z.prev;z;z=z.walk(true)){if(z.type==3||!l.isBlock(z.name)){z.parent.insert(C,z,z.name==="br");break}}}if(!F.invalid){J=I.serialize(E);z=D.firstChild;L=D.lastChild;if(!z||(z===L&&z.nodeName==="BR")){l.setHTML(D,J)}else{p.setContent(J)}}else{p.setContent(u);D=n.selection.getNode();y=n.getBody();if(D.nodeType==9){D=z=y}else{z=D}while(z!==y){D=z;z=z.parentNode}J=D==y?y.innerHTML:l.getOuterHTML(D);J=I.serialize(x.parse(J.replace(//i,function(){return I.serialize(E)})));if(D==y){l.setHTML(y,J)}else{l.setOuterHTML(D,J)}}C=l.get("mce_marker");B=l.getRect(C);K=l.getViewPort(n.getWin());if((B.y+B.h>K.y+K.h||B.yK.x+K.w||B.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(B,A,z){var y=l.getParent(p.getNode(),"a"),v,x,u;if(c.is(z,"string")){z={href:z}}z.href=z.href.replace(" ","%20");if(!y){if(c.isWebKit){v=l.getParent(p.getNode(),"img");if(v){x=v.style.cssText;u=v.className;v.style.cssText=null;v.className=null}}f("CreateLink",b,"javascript:mctmp(0);");if(x){v.style.cssText=x}if(u){v.className=u}d(l.select("a[href='javascript:mctmp(0);']"),function(C){l.setAttribs(C,z)})}else{if(z.href){l.setAttribs(y,z)}else{n.dom.remove(y,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(f){var d,e=0,h=[],c;function g(){return b.trim(f.getContent({format:"raw",no_events:1}))}return d={typing:false,onAdd:new a(d),onUndo:new a(d),onRedo:new a(d),beforeChange:function(){c=f.selection.getBookmark(2,true)},add:function(m){var j,k=f.settings,l;m=m||{};m.content=g();l=h[e];if(l&&l.content==m.content){return null}if(h[e]){h[e].beforeBookmark=c}if(k.custom_undo_redo_levels){if(h.length>k.custom_undo_redo_levels){for(j=0;j0){k=h[--e];f.setContent(k.content,{format:"raw"});f.selection.moveToBookmark(k.beforeBookmark);d.onUndo.dispatch(d,k)}return k},redo:function(){var i;if(e0||this.typing},hasRedo:function(){return e');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)},setup:function(){var n=this,m=n.editor,p=m.settings,u=m.dom,o=m.selection,q=m.schema.getBlockElements();if(p.forced_root_block){function v(){var y=o.getStart(),t=m.getBody(),s,z,D,F,E,x,A,B=-16777215;if(!y||y.nodeType!==1){return}while(y!=t){if(q[y.nodeName]){return}y=y.parentNode}s=o.getRng();if(s.setStart){z=s.startContainer;D=s.startOffset;F=s.endContainer;E=s.endOffset}else{if(s.item){s=m.getDoc().body.createTextRange();s.moveToElementText(s.item(0))}tmpRng=s.duplicate();tmpRng.collapse(true);D=tmpRng.move("character",B)*-1;if(!tmpRng.collapsed){tmpRng=s.duplicate();tmpRng.collapse(false);E=(tmpRng.move("character",B)*-1)-D}}for(y=t.firstChild;y;y){if(y.nodeType===3||(y.nodeType==1&&!q[y.nodeName])){if(!x){x=u.create(p.forced_root_block);y.parentNode.insertBefore(x,y)}A=y;y=y.nextSibling;x.appendChild(A)}else{x=null;y=y.nextSibling}}if(s.setStart){s.setStart(z,D);s.setEnd(F,E);o.setRng(s)}else{try{s=m.getDoc().body.createTextRange();s.moveToElementText(t);s.collapse(true);s.moveStart("character",D);if(E>0){s.moveEnd("character",E)}s.select()}catch(C){}}m.nodeChanged()}m.onKeyUp.add(v);m.onClick.add(v)}if(p.force_br_newlines){if(c){m.onKeyPress.add(function(s,t){var x;if(t.keyCode==13&&o.getNode().nodeName!="LI"){o.setContent('
',{format:"raw"});x=u.get("__");x.removeAttribute("id");o.select(x);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,y){if(y.keyCode==13&&!y.shiftKey){var x=t.selection.getStart(),s=n._previousFormats;if(!x.hasChildNodes()&&s){x=u.getParent(x,u.isBlock);if(x&&x.nodeName!="LI"){x.innerHTML="";if(n._previousFormats){x.appendChild(s.wrapper);s.inner.innerHTML="\uFEFF"}else{x.innerHTML="\uFEFF"}o.select(x,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 r(t){var s=o.getRng(),x,A=u.create("div",null," "),z,y=u.getViewPort(t.getWin()).h;s.insertNode(x=u.create("br"));s.setStartAfter(x);s.setEndAfter(x);o.setRng(s);if(o.getSel().focusNode==x.previousSibling){o.select(u.insertAfter(u.doc.createTextNode("\u00a0"),x));o.collapse(d)}u.insertAfter(A,x);z=u.getPos(A).y;u.remove(A);if(z>y){t.getWin().scrollTo(0,z)}}m.onKeyPress.add(function(s,t){if(t.keyCode==13&&(t.shiftKey||(p.force_br_newlines&&!u.getParent(o.getNode(),"h1,h2,h3,h4,h5,h6,ol,ul")))){r(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,x){var z,y=o.getNode(),s=t.getBody();if(s.childNodes.length===1&&y.nodeName=="P"){y=u.rename(y,p.element);o.select(y);o.collapse();t.nodeChanged()}else{if(x.keyCode==13&&!x.shiftKey&&n.lastElm!="P"){z=u.getParent(y,"p");if(z){u.rename(z,p.element);t.nodeChanged()}}}})}}},getParentBlock:function(o){var m=this.dom;return m.getParent(o,m.isBlock)},insertPara:function(Q){var E=this,v=E.editor,M=v.dom,R=v.getDoc(),V=v.settings,F=v.selection.getSel(),G=F.getRangeAt(0),U=R.body;var J,K,H,O,N,q,o,u,z,m,C,T,p,x,I,L=M.getViewPort(v.getWin()),B,D,A;v.undoManager.beforeChange();J=R.createRange();J.setStart(F.anchorNode,F.anchorOffset);J.collapse(d);K=R.createRange();K.setStart(F.focusNode,F.focusOffset);K.collapse(d);H=J.compareBoundaryPoints(J.START_TO_END,K)<0;O=H?F.anchorNode:F.focusNode;N=H?F.anchorOffset:F.focusOffset;q=H?F.focusNode:F.anchorNode;o=H?F.focusOffset:F.anchorOffset;if(O===q&&/^(TD|TH)$/.test(O.nodeName)){if(O.firstChild.nodeName=="BR"){M.remove(O.firstChild)}if(O.childNodes.length==0){v.dom.add(O,V.element,null,"
");T=v.dom.add(O,V.element,null,"
")}else{I=O.innerHTML;O.innerHTML="";v.dom.add(O,V.element,null,I);T=v.dom.add(O,V.element,null,"
")}G=R.createRange();G.selectNodeContents(T);G.collapse(1);v.selection.setRng(G);return g}if(O==U&&q==U&&U.firstChild&&v.dom.isBlock(U.firstChild)){O=q=O.firstChild;N=o=0;J=R.createRange();J.setStart(O,0);K=R.createRange();K.setStart(q,0)}O=O.nodeName=="HTML"?R.body:O;O=O.nodeName=="BODY"?O.firstChild:O;q=q.nodeName=="HTML"?R.body:q;q=q.nodeName=="BODY"?q.firstChild:q;u=E.getParentBlock(O);z=E.getParentBlock(q);m=u?u.nodeName:V.element;if(I=E.dom.getParent(u,"li,pre")){if(I.nodeName=="LI"){return e(v.selection,E.dom,I)}return d}if(u&&(u.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(M.getStyle(u,"position",1)))){m=V.element;u=null}if(z&&(z.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(M.getStyle(u,"position",1)))){m=V.element;z=null}if(/(TD|TABLE|TH|CAPTION)/.test(m)||(u&&m=="DIV"&&/left|right/gi.test(M.getStyle(u,"float",1)))){m=V.element;u=z=null}C=(u&&u.nodeName==m)?u.cloneNode(0):v.dom.create(m);T=(z&&z.nodeName==m)?z.cloneNode(0):v.dom.create(m);T.removeAttribute("id");if(/^(H[1-6])$/.test(m)&&f(G,u)){T=v.dom.create(V.element)}I=p=O;do{if(I==U||I.nodeType==9||E.dom.isBlock(I)||/(TD|TABLE|TH|CAPTION)/.test(I.nodeName)){break}p=I}while((I=I.previousSibling?I.previousSibling:I.parentNode));I=x=q;do{if(I==U||I.nodeType==9||E.dom.isBlock(I)||/(TD|TABLE|TH|CAPTION)/.test(I.nodeName)){break}x=I}while((I=I.nextSibling?I.nextSibling:I.parentNode));if(p.nodeName==m){J.setStart(p,0)}else{J.setStartBefore(p)}J.setEnd(O,N);C.appendChild(J.cloneContents()||R.createTextNode(""));try{K.setEndAfter(x)}catch(P){}K.setStart(q,o);T.appendChild(K.cloneContents()||R.createTextNode(""));G=R.createRange();if(!p.previousSibling&&p.parentNode.nodeName==m){G.setStartBefore(p.parentNode)}else{if(J.startContainer.nodeName==m&&J.startOffset==0){G.setStartBefore(J.startContainer)}else{G.setStart(J.startContainer,J.startOffset)}}if(!x.nextSibling&&x.parentNode.nodeName==m){G.setEndAfter(x.parentNode)}else{G.setEnd(K.endContainer,K.endOffset)}G.deleteContents();if(b){v.getWin().scrollTo(0,L.y)}if(C.firstChild&&C.firstChild.nodeName==m){C.innerHTML=C.firstChild.innerHTML}if(T.firstChild&&T.firstChild.nodeName==m){T.innerHTML=T.firstChild.innerHTML}function S(y,s){var r=[],X,W,t;y.innerHTML="";if(V.keep_styles){W=s;do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(W.nodeName)){X=W.cloneNode(g);M.setAttrib(X,"id","");r.push(X)}}while(W=W.parentNode)}if(r.length>0){for(t=r.length-1,X=y;t>=0;t--){X=X.appendChild(r[t])}r[0].innerHTML=b?"\u00a0":"
";return r[0]}else{y.innerHTML=b?"\u00a0":"
"}}if(M.isEmpty(C)){S(C,O)}if(M.isEmpty(T)){A=S(T,q)}if(b&&parseFloat(opera.version())<9.5){G.insertNode(C);G.insertNode(T)}else{G.insertNode(T);G.insertNode(C)}T.normalize();C.normalize();v.selection.select(T,true);v.selection.collapse(true);B=v.dom.getPos(T).y;if(BL.y+L.h){v.getWin().scrollTo(0,B1||ac==au){return ac}}}var am=V.selection.getRng();var aq=am.startContainer;var al=am.endContainer;if(aq!=al&&am.endOffset==0){var ap=an(aq,al);var ao=ap.nodeType==3?ap.length:ap.childNodes.length;am.setEnd(ap,ao)}return am}function Y(ao,au,ar,aq,am){var al=[],an=-1,at,aw=-1,ap=-1,av;O(ao.childNodes,function(ay,ax){if(ay.nodeName==="UL"||ay.nodeName==="OL"){an=ax;at=ay;return false}});O(ao.childNodes,function(ay,ax){if(ay.nodeName==="SPAN"&&c.getAttrib(ay,"data-mce-type")=="bookmark"&&ay.id==au.id+"_start"){aw=ax}if(ay.nodeName==="SPAN"&&c.getAttrib(ay,"data-mce-type")=="bookmark"&&ay.id==au.id+"_end"){ap=ax}});if(an<=0||(awan)){O(a.grep(ao.childNodes),am);return 0}else{av=ar.cloneNode(S);O(a.grep(ao.childNodes),function(ay,ax){if((awan&&ax>an)){al.push(ay);ay.parentNode.removeChild(ay)}});if(awan){ao.insertBefore(av,at.nextSibling)}}aq.push(av);O(al,function(ax){av.appendChild(ax)});return av}}function aj(am,ao){var al=[],ap,an;ap=ai.inline||ai.block;an=c.create(ap);W(an);K.walk(am,function(aq){var ar;function at(au){var ax=au.nodeName.toLowerCase(),aw=au.parentNode.nodeName.toLowerCase(),av;if(g(ax,"br")){ar=0;if(ai.block){c.remove(au)}return}if(ai.wrapper&&x(au,Z,ah)){ar=0;return}if(ai.block&&!ai.wrapper&&G(ax)){au=c.rename(au,ap);W(au);al.push(au);ar=0;return}if(ai.selector){O(ad,function(ay){if("collapsed" in ay&&ay.collapsed!==ae){return}if(c.is(au,ay.selector)&&!b(au)){W(au,ay);av=true}});if(!ai.inline||av){ar=0;return}}if(d(ap,ax)&&d(aw,ap)&&!(au.nodeType===3&&au.nodeValue.length===1&&au.nodeValue.charCodeAt(0)===65279)){if(!ar){ar=an.cloneNode(S);au.parentNode.insertBefore(ar,au);al.push(ar)}ar.appendChild(au)}else{if(ax=="li"&&ao){ar=Y(au,ao,an,al,at)}else{ar=0;O(a.grep(au.childNodes),at);ar=0}}}O(aq,at)});if(ai.wrap_links===false){O(al,function(aq){function ar(aw){var av,au,at;if(aw.nodeName==="A"){au=an.cloneNode(S);al.push(au);at=a.grep(aw.childNodes);for(av=0;av1||!F(at))&&aq===0){c.remove(at,1);return}if(ai.inline||ai.wrapper){if(!ai.exact&&aq===1){at=ar(at)}O(ad,function(av){O(c.select(av.inline,at),function(ax){var aw;if(av.wrap_links===false){aw=ax.parentNode;do{if(aw.nodeName==="A"){return}}while(aw=aw.parentNode)}U(av,ah,ax,av.exact?ax:null)})});if(x(at.parentNode,Z,ah)){c.remove(at,1);at=0;return B}if(ai.merge_with_parents){c.getParent(at.parentNode,function(av){if(x(av,Z,ah)){c.remove(at,1);at=0;return B}})}if(at){at=u(C(at),at);at=u(at,C(at,B))}}})}if(ai){if(ac){X=c.createRng();X.setStartBefore(ac);X.setEndAfter(ac);aj(o(X,ad))}else{if(!ae||!ai.inline||c.select("td.mceSelected,th.mceSelected").length){var ak=V.selection.getNode();V.selection.setRng(ab());ag=q.getBookmark();aj(o(q.getRng(B),ad),ag);if(ai.styles&&(ai.styles.color||ai.styles.textDecoration)){a.walk(ak,I,"childNodes");I(ak)}q.moveToBookmark(ag);q.setRng(aa(q.getRng(B)));V.nodeChanged()}else{Q("apply",Z,ah)}}}}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(ad,Y,ac){var aa,X=P[ad],ae=P[ad=="apply"?"remove":"apply"];function af(){return P.apply.length||P.remove.length}function ab(){P.apply=[];P.remove=[]}function ag(ah){O(P.apply.reverse(),function(ai){T(ai.name,ai.vars,ah);if(ai.name==="forecolor"&&ai.vars.value){I(ah.parentNode)}});O(P.remove.reverse(),function(ai){A(ai.name,ai.vars,ah)});c.remove(ah,1);ab()}for(aa=X.length-1;aa>=0;aa--){if(X[aa].name==Y){return}}X.push({name:Y,vars:ac});for(aa=ae.length-1;aa>=0;aa--){if(ae[aa].name==Y){ae.splice(aa,1)}}if(af()){V.getDoc().execCommand("FontName",false,"mceinline");P.lastRng=q.getRng();O(c.select("font,span"),function(ai){var ah;if(b(ai)){ah=q.getBookmark();ag(ai);q.moveToBookmark(ah);V.nodeChanged()}});if(!P.isListening&&af()){P.isListening=true;function W(ai,aj){var ah=c.createRng();ag(ai);ah.setStart(aj,aj.nodeValue.length);ah.setEnd(aj,aj.nodeValue.length);q.setRng(ah);V.nodeChanged()}var Z=false;O("onKeyDown,onKeyUp,onKeyPress,onMouseUp".split(","),function(ah){V[ah].addToTop(function(ai,al){if(al.keyCode==13&&!al.shiftKey){Z=true;return}if(af()&&!a.dom.RangeUtils.compareRanges(P.lastRng,q.getRng())){var aj=false;O(c.select("font,span"),function(ao){var ap,an;if(b(ao)){aj=true;ap=ao.firstChild;while(ap&&ap.nodeType!=3){ap=ap.firstChild}if(ap){W(ao,ap)}else{c.remove(ao)}}});if(Z&&!aj){var ak=q.getNode();var am=ak;while(am&&am.nodeType!=3){am=am.firstChild}if(am){ak=am.parentNode;while(!F(ak)){ak=ak.parentNode}W(ak,am)}}if(al.type=="keyup"||al.type=="mouseup"){ab();Z=false}}})})}}}}})(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 index 67315543..6a4b3c08 100644 --- a/include/javascript/tiny_mce/tiny_mce_jquery_src.js +++ b/include/javascript/tiny_mce/tiny_mce_jquery_src.js @@ -5,9 +5,9 @@ var tinymce = { majorVersion : '3', - minorVersion : '4.2', + minorVersion : '4.4', - releaseDate : '2011-04-07', + releaseDate : '2011-08-04', _init : function() { var t = this, d = document, na = navigator, ua = na.userAgent, i, nl, n, base, p, v; @@ -20,6 +20,12 @@ t.isIE6 = t.isIE && /MSIE [56]/.test(ua); + t.isIE7 = t.isIE && /MSIE [7]/.test(ua); + + t.isIE8 = t.isIE && /MSIE [8]/.test(ua); + + t.isIE9 = t.isIE && /MSIE [9]/.test(ua); + t.isGecko = !t.isWebKit && /Gecko/.test(ua); t.isMac = ua.indexOf('Mac') != -1; @@ -27,6 +33,8 @@ t.isAir = /adobeair/i.test(ua); t.isIDevice = /(iPad|iPhone)/.test(ua); + + t.isIOS5 = t.isIDevice && ua.match(/AppleWebKit\/(\d*)/)[1]>=534; // TinyMCE .NET webcontrol might be setting the values for TinyMCE if (win.tinyMCEPreInit) { @@ -433,12 +441,14 @@ })(window); + (function($, tinymce) { var is = tinymce.is, attrRegExp = /^(href|src|style)$/i, undefined; // jQuery is undefined - if (!$) - return alert("Load jQuery first!"); + if (!$ && window.console) { + return console.log("Load jQuery first!"); + } // Stick jQuery into the tinymce namespace tinymce.$ = $; @@ -816,7 +826,7 @@ tinymce.create('tinymce.util.Dispatcher', { tinymce.create('tinymce.util.URI', { URI : function(u, s) { - var t = this, o, a, b; + var t = this, o, a, b, base_url; // Trim whitespace u = tinymce.trim(u); @@ -835,8 +845,10 @@ tinymce.create('tinymce.util.Dispatcher', { 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); + if (!/^[\w-]*:?\/\//.test(u)) { + base_url = s.base_uri ? s.base_uri.path : new tinymce.util.URI(location.href).directory; + u = ((s.base_uri && s.base_uri.protocol) || 'http') + '://mce_host' + t.toAbsPath(base_url, 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 @@ -1298,12 +1310,47 @@ tinymce.create('static tinymce.util.XHR', { } }); }()); +(function(tinymce){ + tinymce.VK = { + DELETE:46, + BACKSPACE:8 + + } + +})(tinymce); + +(function(tinymce) { + function cleanupStylesWhenDeleting(ed) { + var dom = ed.dom, selection = ed.selection, VK= tinymce.VK; + ed.onKeyUp.add(function(ed, e) { + if (e.keyCode == VK.DELETE ||e.keyCode == VK.BACKSPACE) { + var startContainer = selection.getRng().startContainer; + var blockElement = startContainer; + while (!dom.isBlock(blockElement)) { + blockElement = blockElement.parentNode; + } + var spans = dom.select("span.Apple-style-span", blockElement); + dom.remove(spans, true); + } + }); + } + + tinymce.create('tinymce.util.Quirks', { + Quirks: function(ed) { + if (tinymce.isWebKit) { + cleanupStylesWhenDeleting(ed); + } + + } + }); +})(tinymce); + (function(tinymce) { var namedEntities, baseEntities, reverseEntities, - attrsCharsRegExp = /[&\"\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + attrsCharsRegExp = /[&<>\"\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, textCharsRegExp = /[<>&\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, rawCharsRegExp = /[<>&\"\']/g, - entityRegExp = /&(#)?([\w]+);/g, + entityRegExp = /&(#x|#)?([\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", @@ -1314,7 +1361,7 @@ tinymce.create('static tinymce.util.XHR', { // Raw entities baseEntities = { - '"' : '"', + '\"' : '"', // Needs to be escaped since the YUI compressor would otherwise break the code "'" : ''', '<' : '<', '>' : '>', @@ -1468,7 +1515,7 @@ tinymce.create('static tinymce.util.XHR', { decode : function(text) { return text.replace(entityRegExp, function(all, numeric, value) { if (numeric) { - value = parseInt(value); + value = parseInt(value, numeric.length === 2 ? 16 : 10); // Support upper UTF if (value > 0xFFFF) { @@ -1495,10 +1542,10 @@ tinymce.html.Styles = function(settings, schema) { settings = settings || {}; - encodingItems = '\\" \\\' \\; \\: ; : _'.split(' '); + encodingItems = '\\" \\\' \\; \\: ; : \uFEFF'.split(' '); for (i = 0; i < encodingItems.length; i++) { - encodingLookup[encodingItems[i]] = '_' + i; - encodingLookup['_' + i] = encodingItems[i]; + encodingLookup[encodingItems[i]] = '\uFEFF' + i; + encodingLookup['\uFEFF' + i] = encodingItems[i]; } function toHex(match, r, g, b) { @@ -1593,7 +1640,7 @@ tinymce.html.Styles = function(settings, schema) { // 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) { + str = str.replace(/\uFEFF[0-9]/g, function(str) { return encodingLookup[str]; }); } @@ -1606,7 +1653,7 @@ tinymce.html.Styles = function(settings, schema) { 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) { + css = css.replace(/\\[\"\';:\uFEFF]/g, encode).replace(/\"[^\"]+\"|\'[^\']+\'/g, function(str) { return str.replace(/[;:]/g, encode); }); @@ -1673,7 +1720,7 @@ tinymce.html.Styles = function(settings, schema) { var css = '', name, value; function serializeStyles(name) { - var styleList, i, l, name, value; + var styleList, i, l, value; styleList = schema.styles[name]; if (styleList) { @@ -1691,7 +1738,7 @@ tinymce.html.Styles = function(settings, schema) { if (element_name && schema && schema.styles) { // Serialize global styles and element specific styles serializeStyles('*'); - serializeStyles(name); + serializeStyles(element_name); } else { // Output the styles in the order they are inside the object for (name in styles) { @@ -1708,7 +1755,7 @@ tinymce.html.Styles = function(settings, schema) { }; (function(tinymce) { - var transitional = {}, boolAttrMap, blockElementsMap, shortEndedElementsMap, nonEmptyElementsMap, + var transitional = {}, boolAttrMap, blockElementsMap, shortEndedElementsMap, nonEmptyElementsMap, customElementsMap = {}, whiteSpaceElementsMap, selfClosingElementsMap, makeMap = tinymce.makeMap, each = tinymce.each; function split(str, delim) { @@ -1870,10 +1917,10 @@ tinymce.html.Styles = function(settings, schema) { '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'); + boolAttrMap = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,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'); + nonEmptyElementsMap = tinymce.extend(makeMap('td,th,iframe,video,audio,object'), shortEndedElementsMap); + whiteSpaceElementsMap = makeMap('pre,script,style,textarea'); selfClosingElementsMap = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); tinymce.html.Schema = function(settings) { @@ -2059,10 +2106,16 @@ tinymce.html.Styles = function(settings, schema) { if (custom_elements) { each(split(custom_elements), function(rule) { var matches = customElementRegExp.exec(rule), - cloneName = matches[1] === '~' ? 'span' : 'div', + inline = matches[1] === '~', + cloneName = inline ? 'span' : 'div', name = matches[2]; children[name] = children[cloneName]; + customElementsMap[name] = cloneName; + + // If it's not marked as inline then add it to valid block elements + if (!inline) + blockElementsMap[name] = {}; // Add custom elements at span/div positions each(children, function(element, child) { @@ -2101,7 +2154,24 @@ tinymce.html.Styles = function(settings, schema) { } }); } - } + }; + + function getElementRule(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; + } + }; if (!settings.valid_elements) { // No valid elements defined then clone the elements from the transitional spec @@ -2124,7 +2194,7 @@ tinymce.html.Styles = function(settings, schema) { 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) { + each(split('ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr'), function(name) { elements[name].removeEmpty = true; }); @@ -2142,6 +2212,10 @@ tinymce.html.Styles = function(settings, schema) { // Todo: Remove this when we fix list handling to be valid addValidChildren('+ol[ul|ol],+ul[ul|ol]'); + // If the user didn't allow span only allow internal spans + if (!getElementRule('span')) + addValidElements('span[!data-mce-type|*]'); + // Delete invalid elements if (settings.invalid_elements) { tinymce.each(tinymce.explode(settings.invalid_elements), function(item) { @@ -2184,21 +2258,10 @@ tinymce.html.Styles = function(settings, schema) { 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]; + self.getElementRule = getElementRule; - if (element.pattern.test(name)) - return element; - } + self.getCustomElements = function() { + return customElementsMap; }; self.addValidElements = addValidElements; @@ -2232,7 +2295,7 @@ tinymce.html.Styles = function(settings, schema) { }); self.parse = function(html) { - var self = this, matches, index = 0, value, endRegExp, stack = [], attrList, i, text, name, + var self = this, matches, index = 0, value, endRegExp, stack = [], attrList, i, text, name, isInternalElement, removeInternalElements, 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; @@ -2284,6 +2347,7 @@ tinymce.html.Styles = function(settings, schema) { selfClosing = schema.getSelfClosingElements(); fillAttrsMap = schema.getBoolAttrs(); validate = settings.validate; + removeInternalElements = settings.remove_internals; fixSelfClosing = settings.fix_self_closing; while (matches = tokenRegExp.exec(html)) { @@ -2313,6 +2377,12 @@ tinymce.html.Styles = function(settings, schema) { // Parse attributes if (attribsValue = matches[8]) { + isInternalElement = attribsValue.indexOf('data-mce-type') !== -1; // Check if the element is an internal element + + // If the element has internal attributes then remove it if we are told to do so + if (isInternalElement && removeInternalElements) + isValidElement = false; + attrList = []; attrList.map = {}; @@ -2323,7 +2393,7 @@ tinymce.html.Styles = function(settings, schema) { 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) { + if (validate && !isInternalElement && name.indexOf('data-') !== 0) { attrRule = validAttributesMap[name]; // Find rule by pattern matching @@ -2362,7 +2432,7 @@ tinymce.html.Styles = function(settings, schema) { } // Process attributes if validation is enabled - if (validate) { + if (validate && !isInternalElement) { attributesRequired = elementRule.attributesRequired; attributesDefault = elementRule.attributesDefault; attributesForced = elementRule.attributesForced; @@ -2786,6 +2856,10 @@ tinymce.html.Styles = function(settings, schema) { } return true; + }, + + walk : function(prev) { + return walk(this, null, prev); } }); @@ -2969,7 +3043,7 @@ tinymce.html.Styles = function(settings, schema) { 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; + endWhiteSpaceRegExp, allWhiteSpaceRegExp, whiteSpaceElements, children, nonEmptyElements, rootBlockName; args = args || {}; matchedNodes = {}; @@ -2978,12 +3052,35 @@ tinymce.html.Styles = function(settings, schema) { nonEmptyElements = schema.getNonEmptyElements(); children = schema.children; validate = settings.validate; + rootBlockName = "forced_root_block" in args ? args.forced_root_block : settings.forced_root_block; whiteSpaceElements = schema.getWhiteSpaceElements(); startWhiteSpaceRegExp = /^[ \t\r\n]+/; endWhiteSpaceRegExp = /[ \t\r\n]+$/; allWhiteSpaceRegExp = /[ \t\r\n]+/g; + function addRootBlocks() { + var node = rootNode.firstChild, next, rootBlockNode; + + while (node) { + next = node.next; + + if (node.type == 3 || (node.type == 1 && node.name !== 'p' && !blockElements[node.name] && !node.attr('data-mce-type'))) { + if (!rootBlockNode) { + // Create a new root block element + rootBlockNode = createNode(rootBlockName, 1); + rootNode.insert(rootBlockNode, node); + rootBlockNode.append(node); + } else + rootBlockNode.append(node); + } else { + rootBlockNode = null; + } + + node = next; + }; + }; + function createNode(name, type) { var node = new Node(name, type), list; @@ -3171,35 +3268,28 @@ tinymce.html.Styles = function(settings, schema) { } }, schema); - rootNode = node = new Node(settings.root_name, 11); + rootNode = node = new Node(args.context || 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); + // Fix invalid children or report invalid children in a contextual parsing + if (validate && invalidChildren.length) { + if (!args.context) + fixInvalidChildren(invalidChildren); + else + args.invalid = true; } - // Run attribute filters - for (i = 0, l = attributeFilters.length; i < l; i++) { - list = attributeFilters[i]; + // Wrap nodes in the root into block elements if the root is body + if (rootBlockName && rootNode.name == 'body') + addRootBlocks(); - if (list.name in matchedAttributes) { - nodes = matchedAttributes[list.name]; + // Run filters only when the contents is valid + if (!args.invalid) { + // Run node filters + for (name in matchedNodes) { + list = nodeFilters[name]; + nodes = matchedNodes[name]; // Remove already removed children fi = nodes.length; @@ -3208,8 +3298,27 @@ tinymce.html.Styles = function(settings, schema) { nodes.splice(fi, 1); } - for (fi = 0, fl = list.callbacks.length; fi < fl; fi++) - list.callbacks[fi](nodes, list.name, args); + 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); + } } } @@ -3224,6 +3333,9 @@ tinymce.html.Styles = function(settings, schema) { var i, l = nodes.length, node, blockElements = schema.getBlockElements(), nonEmptyElements = schema.getNonEmptyElements(), parent, prev, prevName; + // Remove brs from body element as well + blockElements.body = 1; + // Must loop forwards since it will otherwise remove all brs in

a


for (i = 0; i < l; i++) { node = nodes[i]; @@ -3521,7 +3633,7 @@ tinymce.html.Writer = function(settings) { }, DOMUtils : function(d, s) { - var t = this, globalStyle; + var t = this, globalStyle, name; t.doc = d; t.win = window; @@ -3552,7 +3664,7 @@ tinymce.html.Writer = function(settings) { } } - if (isIE) { + if (isIE && s.schema) { // Add missing HTML 4/5 elements to IE ('abbr article aside audio canvas ' + 'details figcaption figure footer ' + @@ -3561,6 +3673,11 @@ tinymce.html.Writer = function(settings) { 'time video').replace(/\w+/g, function(name) { d.createElement(name); }); + + // Create all custom elements + for (name in s.schema.getCustomElements()) { + d.createElement(name); + } } tinymce.addUnload(t.destroy, t); @@ -3932,12 +4049,12 @@ tinymce.html.Writer = function(settings) { }, getAttrib : function(e, n, dv) { - var v, t = this; + var v, t = this, undef; e = t.get(e); if (!e || e.nodeType !== 1) - return false; + return dv === undef ? false : dv; if (!is(dv)) dv = ''; @@ -4049,7 +4166,7 @@ tinymce.html.Writer = function(settings) { } } - return (v !== undefined && v !== null && v !== '') ? '' + v : dv; + return (v !== undef && v !== null && v !== '') ? '' + v : dv; }, getPos : function(n, ro) { @@ -4059,14 +4176,17 @@ tinymce.html.Writer = function(settings) { ro = ro || d.body; if (n) { - // Use getBoundingClientRect on IE, Opera has it but it's not perfect - if (isIE && !t.stdMode) { + // Use getBoundingClientRect if it exists since it's faster than looping offset nodes + if (n.getBoundingClientRect) { 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}; + // Add scroll offsets from documentElement or body since IE with the wrong box model will use d.body and so do WebKit + // Also remove the body/documentelement clientTop/clientLeft on IE 6, 7 since they offset the position + x = n.left + (d.documentElement.scrollLeft || d.body.scrollLeft) - e.clientTop; + y = n.top + (d.documentElement.scrollTop || d.body.scrollTop) - e.clientLeft; + + return {x : x, y : y}; } r = n; @@ -4540,12 +4660,12 @@ tinymce.html.Writer = function(settings) { if (elements && elements[node.nodeName.toLowerCase()]) return false; - // Keep elements with data attributes or name attribute like + // Keep elements with data-bookmark 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) + if (name === "name" || name === 'data-mce-bookmark') return false; } } @@ -4579,7 +4699,7 @@ tinymce.html.Writer = function(settings) { }, nodeIndex : function(node, normalized) { - var idx = 0, lastNodeType, lastNode, nodeType, nodeValueExists; + var idx = 0, lastNodeType, lastNode, nodeType; if (node) { for (lastNodeType = node.nodeType, node = node.previousSibling, lastNode = node; node; node = node.previousSibling) { @@ -4587,11 +4707,7 @@ tinymce.html.Writer = function(settings) { // 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) + if (nodeType == lastNodeType || !node.nodeValue.length) continue; } idx++; @@ -5434,11 +5550,97 @@ tinymce.html.Writer = function(settings) { (function() { function Selection(selection) { - var t = this, invisibleChar = '\uFEFF', range, lastIERng, dom = selection.dom, TRUE = true, FALSE = false; + var self = this, dom = selection.dom, TRUE = true, FALSE = false; + + function getPosition(rng, start) { + var checkRng, startIndex = 0, endIndex, inside, + children, child, offset, index, position = -1, parent; + + // Setup test range, collapse it and get the parent + checkRng = rng.duplicate(); + checkRng.collapse(start); + parent = checkRng.parentElement(); + + // Check if the selection is within the right document + if (parent.ownerDocument !== selection.dom.doc) + return; + + // IE will report non editable elements as it's parent so look for an editable one + while (parent.contentEditable === "false") { + parent = parent.parentNode; + } + + // If parent doesn't have any children then return that we are inside the element + if (!parent.hasChildNodes()) { + return {node : parent, inside : 1}; + } + + // Setup node list and endIndex + children = parent.children; + endIndex = children.length - 1; + + // Perform a binary search for the position + while (startIndex <= endIndex) { + index = Math.floor((startIndex + endIndex) / 2); + + // Move selection to node and compare the ranges + child = children[index]; + checkRng.moveToElementText(child); + position = checkRng.compareEndPoints(start ? 'StartToStart' : 'EndToEnd', rng); + + // Before/after or an exact match + if (position > 0) { + endIndex = index - 1; + } else if (position < 0) { + startIndex = index + 1; + } else { + return {node : child}; + } + } + + // Check if child position is before or we didn't find a position + if (position < 0) { + // No element child was found use the parent element and the offset inside that + if (!child) { + checkRng.moveToElementText(parent); + checkRng.collapse(true); + child = parent; + inside = true; + } else + checkRng.collapse(false); + + checkRng.setEndPoint(start ? 'EndToStart' : 'EndToEnd', rng); + + // Fix for edge case:
..
ab|c
+ if (checkRng.compareEndPoints(start ? 'StartToStart' : 'StartToEnd', rng) > 0) { + checkRng = rng.duplicate(); + checkRng.collapse(start); + + offset = -1; + while (parent == checkRng.parentElement()) { + if (checkRng.move('character', -1) == 0) + break; + + offset++; + } + } + + offset = offset || checkRng.text.replace('\r\n', ' ').length; + } else { + // Child position is after the selection endpoint + checkRng.collapse(true); + checkRng.setEndPoint(start ? 'StartToStart' : 'StartToEnd', rng); + + // Get the length of the text to find where the endpoint is relative to it's container + offset = checkRng.text.replace('\r\n', ' ').length; + } + + return {node : child, position : position, offset : offset, inside : inside}; + }; // Returns a W3C DOM compatible range object by using the IE Range API function getRange() { - var ieRange = selection.getRng(), domRange = dom.createRng(), element, collapsed; + var ieRange = selection.getRng(), domRange = dom.createRng(), element, collapsed, tmpRange, element2, bookmark, fail; // If selection is outside the current document just return an empty range element = ieRange.item ? ieRange.item(0) : ieRange.parentElement(); @@ -5447,111 +5649,258 @@ tinymce.html.Writer = function(settings) { 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); - } + // Handle control selection + if (ieRange.item) { + 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; + var endPoint = getPosition(ieRange, start), container, offset, textNodeOffset = 0, sibling, undef, nodeValue; - // Setup temp range and collapse it - checkRng = ieRange.duplicate(); - checkRng.collapse(start); + container = endPoint.node; + offset = endPoint.offset; - // 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); + if (endPoint.inside && !container.hasChildNodes()) { + domRange[start ? 'setStart' : 'setEnd'](container, 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); + if (offset === undef) { + domRange[start ? 'setStartBefore' : 'setEndAfter'](container); 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; + if (endPoint.position < 0) { + sibling = endPoint.inside ? container.firstChild : container.nextSibling; + + if (!sibling) { + domRange[start ? 'setStartAfter' : 'setEndAfter'](container); + return; } - } - // Setup container - container = position > 0 || index == 0 ? marker.nextSibling : marker.previousSibling; + if (!offset) { + if (sibling.nodeType == 3) + domRange[start ? 'setStart' : 'setEnd'](sibling, 0); + else + domRange[start ? 'setStartBefore' : 'setEndBefore'](sibling); - // Handle element selection - if (container.nodeType == 1) { - dom.remove(marker); + return; + } - // Find offset and container - offset = dom.nodeIndex(container); - container = container.parentNode; + // Find the text node and offset + while (sibling) { + nodeValue = sibling.nodeValue; + textNodeOffset += nodeValue.length; - // Move the offset if we are setting the end or the position is after an element - if (!start || index > 0) - offset++; + // We are at or passed the position we where looking for + if (textNodeOffset >= offset) { + container = sibling; + textNodeOffset -= offset; + textNodeOffset = nodeValue.length - textNodeOffset; + break; + } + + sibling = sibling.nextSibling; + } } 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; + // Find the text node and offset + sibling = container.previousSibling; + + if (!sibling) + return domRange[start ? 'setStartBefore' : 'setEndBefore'](container); + + // If there isn't any text to loop then use the first position + if (!offset) { + if (container.nodeType == 3) + domRange[start ? 'setStart' : 'setEnd'](sibling, container.nodeValue.length); + else + domRange[start ? 'setStartAfter' : 'setEndAfter'](sibling); + + return; } - dom.remove(marker); + while (sibling) { + textNodeOffset += sibling.nodeValue.length; + + // We are at or passed the position we where looking for + if (textNodeOffset >= offset) { + container = sibling; + textNodeOffset -= offset; + break; + } + + sibling = sibling.previousSibling; + } } - domRange[start ? 'setStart' : 'setEnd'](container, offset); + domRange[start ? 'setStart' : 'setEnd'](container, textNodeOffset); }; - // Find start point - findEndPoint(true); + try { + // Find start point + findEndPoint(true); + + // Find end point if needed + if (!collapsed) + findEndPoint(); + } catch (ex) { + // IE has a nasty bug where text nodes might throw "invalid argument" when you + // access the nodeValue or other properties of text nodes. This seems to happend when + // text nodes are split into two nodes by a delete/backspace call. So lets detect it and try to fix it. + if (ex.number == -2147024809) { + // Get the current selection + bookmark = self.getBookmark(2); + + // Get start element + tmpRange = ieRange.duplicate(); + tmpRange.collapse(true); + element = tmpRange.parentElement(); + + // Get end element + if (!collapsed) { + tmpRange = ieRange.duplicate(); + tmpRange.collapse(false); + element2 = tmpRange.parentElement(); + element2.innerHTML = element2.innerHTML; + } + + // Remove the broken elements + element.innerHTML = element.innerHTML; - // Find end point if needed - if (!collapsed) - findEndPoint(); + // Restore the selection + self.moveToBookmark(bookmark); + + // Since the range has moved we need to re-get it + ieRange = selection.getRng(); + + // Find start point + findEndPoint(true); + + // Find end point if needed + if (!collapsed) + findEndPoint(); + } else + throw ex; // Throw other errors + } return domRange; }; + this.getBookmark = function(type) { + var rng = selection.getRng(), start, end, bookmark = {}; + + function getIndexes(node) { + var node, parent, root, children, i, indexes = []; + + parent = node.parentNode; + root = dom.getRoot().parentNode; + + while (parent != root) { + children = parent.children; + + i = children.length; + while (i--) { + if (node === children[i]) { + indexes.push(i); + break; + } + } + + node = parent; + parent = parent.parentNode; + } + + return indexes; + }; + + function getBookmarkEndPoint(start) { + var position; + + position = getPosition(rng, start); + if (position) { + return { + position : position.position, + offset : position.offset, + indexes : getIndexes(position.node), + inside : position.inside + }; + } + }; + + // Non ubstructive bookmark + if (type === 2) { + // Handle text selection + if (!rng.item) { + bookmark.start = getBookmarkEndPoint(true); + + if (!selection.isCollapsed()) + bookmark.end = getBookmarkEndPoint(); + } else + bookmark.start = {ctrl : true, indexes : getIndexes(rng.item(0))}; + } + + return bookmark; + }; + + this.moveToBookmark = function(bookmark) { + var rng, body = dom.doc.body; + + function resolveIndexes(indexes) { + var node, i, idx, children; + + node = dom.getRoot(); + for (i = indexes.length - 1; i >= 0; i--) { + children = node.children; + idx = indexes[i]; + + if (idx <= children.length - 1) { + node = children[idx]; + } + } + + return node; + }; + + function setBookmarkEndPoint(start) { + var endPoint = bookmark[start ? 'start' : 'end'], moveLeft, moveRng, undef; + + if (endPoint) { + moveLeft = endPoint.position > 0; + + moveRng = body.createTextRange(); + moveRng.moveToElementText(resolveIndexes(endPoint.indexes)); + + offset = endPoint.offset; + if (offset !== undef) { + moveRng.collapse(endPoint.inside || moveLeft); + moveRng.moveStart('character', moveLeft ? -offset : offset); + } else + moveRng.collapse(start); + + rng.setEndPoint(start ? 'StartToStart' : 'EndToStart', moveRng); + + if (start) + rng.collapse(true); + } + }; + + if (bookmark.start) { + if (bookmark.start.ctrl) { + rng = body.createControlRange(); + rng.addElement(resolveIndexes(bookmark.start.indexes)); + rng.select(); + } else { + rng = body.createTextRange(); + setBookmarkEndPoint(true); + setBookmarkEndPoint(); + rng.select(); + } + } + }; + this.addRange = function(rng) { var ieRng, ctrlRng, startContainer, startOffset, endContainer, endOffset, doc = selection.dom.doc, body = doc.body; @@ -5587,7 +5936,7 @@ tinymce.html.Writer = function(settings) { tmpRng.moveToElementText(marker); } else { // Empty node selection for example
|
- marker = doc.createTextNode(invisibleChar); + marker = doc.createTextNode('\uFEFF'); container.appendChild(marker); tmpRng.moveToElementText(marker.parentNode); tmpRng.collapse(TRUE); @@ -5598,9 +5947,6 @@ tinymce.html.Writer = function(settings) { } } - // Destroy cached range - this.destroy(); - // Setup some shorter versions startContainer = rng.startContainer; startOffset = rng.startOffset; @@ -5630,33 +5976,8 @@ tinymce.html.Writer = function(settings) { 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 range method + this.getRangeAt = getRange; }; // Expose the selection object @@ -5905,7 +6226,7 @@ tinymce.html.Writer = function(settings) { return; try { - // If IE is used, use the trick by Diego Perini + // If IE is used, use the trick by Diego Perini licensed under MIT by request to the author. // http://javascript.nwbox.com/IEContentLoaded/ doc.documentElement.doScroll("left"); } catch (ex) { @@ -6097,6 +6418,13 @@ tinymce.html.Writer = function(settings) { tinymce.addUnload(t.destroy, t); }, + setCursorLocation: function(node, offset) { + var t = this; var r = t.dom.createRng(); + r.setStart(node, offset); + r.setEnd(node, offset); + t.setRng(r); + t.collapse(false); + }, getContent : function(s) { var t = this, r = t.getRng(), e = t.dom.create("body"), se = t.getSel(), wb, wa, n; @@ -6104,6 +6432,7 @@ tinymce.html.Writer = function(settings) { wb = wa = ''; s.get = true; s.format = s.format || 'html'; + s.forced_root_block = ''; t.onBeforeGetContent.dispatch(t, s); if (s.format == 'text') @@ -6188,7 +6517,12 @@ tinymce.html.Writer = function(settings) { // Remove the caret position self.dom.remove('__caret'); - self.setRng(rng); + + try { + self.setRng(rng); + } catch (ex) { + // Might fail on Opera for some odd reason + } } else { if (rng.item) { // Delete content and get caret text selection @@ -6324,6 +6658,9 @@ tinymce.html.Writer = function(settings) { return bookmark; }; + if (t.tridentSel) + return t.tridentSel.getBookmark(type); + return getLocation(); } @@ -6396,10 +6733,6 @@ tinymce.html.Writer = function(settings) { 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(); @@ -6439,6 +6772,9 @@ tinymce.html.Writer = function(settings) { return true; }; + if (t.tridentSel) + return t.tridentSel.moveToBookmark(bookmark); + if (setEndPoint(true) && setEndPoint()) { t.setRng(rng); } @@ -6774,25 +7110,92 @@ tinymce.html.Writer = function(settings) { return bl; }, - destroy : function(s) { - var t = this; + normalize : function() { + var self = this, rng, normalized; - t.win = null; + // Normalize only on non IE browsers for now + if (tinymce.isIE) + return; - if (t.tridentSel) - t.tridentSel.destroy(); + function normalizeEndPoint(start) { + var container, offset, walker, dom = self.dom, body = dom.getRoot(), node; - // Manual destroy then remove unload handler - if (!s) - tinymce.removeUnload(t.destroy); - }, + container = rng[(start ? 'start' : 'end') + 'Container']; + offset = rng[(start ? 'start' : 'end') + 'Offset']; - // 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; + // If the container is a document move it to the body element + if (container.nodeType === 9) { + container = container.body; + offset = 0; + } - // Make HTML element unselectable since we are going to handle selection by hand - doc.documentElement.unselectable = true; + // If the container is body try move it into the closest text node or position + // TODO: Add more logic here to handle element selection cases + if (container === body) { + // Resolve the index + if (container.hasChildNodes()) { + container = container.childNodes[Math.min(!start && offset > 0 ? offset - 1 : offset, container.childNodes.length - 1)]; + offset = 0; + + // Walk the DOM to find a text node to place the caret at or a BR + node = container; + walker = new tinymce.dom.TreeWalker(container, body); + do { + // Found a text node use that position + if (node.nodeType === 3) { + offset = start ? 0 : node.nodeValue.length - 1; + container = node; + break; + } + + // Found a BR element that we can place the caret before + if (node.nodeName === 'BR') { + offset = dom.nodeIndex(node); + container = node.parentNode; + break; + } + } while (node = (start ? walker.next() : walker.prev())); + + normalized = true; + } + } + + // Set endpoint if it was normalized + if (normalized) + rng['set' + (start ? 'Start' : 'End')](container, offset); + }; + + rng = self.getRng(); + + // Normalize the end points + normalizeEndPoint(true); + + if (rng.collapsed) + normalizeEndPoint(); + + // Set the selection if it was normalized + if (normalized) { + //console.log(self.dom.dumpRng(rng)); + self.setRng(rng); + } + }, + + destroy : function(s) { + var t = this; + + t.win = null; + + // 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) { @@ -8329,8 +8732,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { l = DOM.encode(s.label || ''); h = ''; - - if (s.image) + if (s.image && !(this.editor &&this.editor.forcedHighContrastMode) ) h += '' + DOM.encode(s.title) + '' + l; else h += '' + (l ? '' + l + '' : ''); @@ -8457,7 +8859,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { }, showMenu : function() { - var t = this, p1, p2, e = DOM.get(this.id), m; + var t = this, p2, e = DOM.get(this.id), m; if (t.isDisabled() || t.items.length == 0) return; @@ -8470,7 +8872,6 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { t.isMenuRendered = true; } - p1 = DOM.getPos(this.settings.menu_container); p2 = DOM.getPos(e); m = t.menu; @@ -9268,7 +9669,19 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, get : function(n) { - return this.lookup[n]; + if (this.lookup[n]) { + return this.lookup[n].instance; + } else { + return undefined; + } + }, + + dependencies : function(n) { + var result; + if (this.lookup[n]) { + result = this.lookup[n].dependencies; + } + return result || []; }, requireLangPack : function(n) { @@ -9278,27 +9691,61 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { tinymce.ScriptLoader.add(this.urls[n] + '/langs/' + s.language + '.js'); }, - add : function(id, o) { + add : function(id, o, dependencies) { this.items.push(o); - this.lookup[id] = o; + this.lookup[id] = {instance:o, dependencies:dependencies}; this.onAdd.dispatch(this, id, o); return o; }, + createUrl: function(baseUrl, dep) { + if (typeof dep === "object") { + return dep + } else { + return {prefix: baseUrl.prefix, resource: dep, suffix: baseUrl.suffix}; + } + }, + + addComponents: function(pluginName, scripts) { + var pluginUrl = this.urls[pluginName]; + tinymce.each(scripts, function(script){ + tinymce.ScriptLoader.add(pluginUrl+"/"+script); + }); + }, load : function(n, u, cb, s) { - var t = this; + var t = this, url = u; + + function loadDependencies() { + var dependencies = t.dependencies(n); + tinymce.each(dependencies, function(dep) { + var newUrl = t.createUrl(u, dep); + t.load(newUrl.resource, newUrl, undefined, undefined); + }); + if (cb) { + if (s) { + cb.call(s); + } else { + cb.call(tinymce.ScriptLoader); + } + } + } if (t.urls[n]) return; + if (typeof u === "object") + url = u.prefix + u.resource + u.suffix; - if (u.indexOf('/') != 0 && u.indexOf('://') == -1) - u = tinymce.baseURL + '/' + u; + if (url.indexOf('/') != 0 && url.indexOf('://') == -1) + url = tinymce.baseURL + '/' + url; - t.urls[n] = u.substring(0, u.lastIndexOf('/')); + t.urls[n] = url.substring(0, url.lastIndexOf('/')); - if (!t.lookup[n]) - tinymce.ScriptLoader.add(u, cb, s); + if (t.lookup[n]) { + loadDependencies(); + } else { + tinymce.ScriptLoader.add(url, loadDependencies, s); + } } }); @@ -9809,10 +10256,10 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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) + // Is a iPad/iPhone and not on iOS5, 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 && !tinymce.isIOS5) return; // Add hidden input for non input elements inside form elements @@ -9884,12 +10331,23 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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'); + if (p &&!PluginManager.urls[p]) { + if (p.charAt(0) == '-') { + p = p.substr(1, p.length); + var dependencies = PluginManager.dependencies(p); + each(dependencies, function(dep) { + var defaultSettings = {prefix:'plugins/', resource: dep, suffix:'/editor_plugin' + tinymce.suffix + '.js'}; + var dep = PluginManager.createUrl(defaultSettings, dep); + PluginManager.load(dep.resource, dep); + + }); + } else { + // Skip safari plugin, since it is removed as of 3.3b1 + if (p == 'safari') { + return; + } + PluginManager.load(p, {prefix:'plugins/', resource: p, suffix:'/editor_plugin' + tinymce.suffix + '.js'}); + } } }); @@ -9904,7 +10362,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, init : function() { - var n, t = this, s = t.settings, w, h, e = t.getElement(), o, ti, u, bi, bc, re, i; + var n, t = this, s = t.settings, w, h, e = t.getElement(), o, ti, u, bi, bc, re, i, initializedPlugins = []; tinymce.add(t); @@ -9918,20 +10376,25 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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) { + function initPlugin(p) { var c = PluginManager.get(p), u = PluginManager.urls[p] || tinymce.documentBaseURL.replace(/\/$/, ''), po; - - if (c) { + if (c && tinymce.inArray(initializedPlugins,p) === -1) { + each(PluginManager.dependencies(p), function(dep){ + initPlugin(dep); + }); po = new c(t, u); t.plugins[p] = po; - if (po.init) + if (po.init) { po.init(t, u); + initializedPlugins.push(p); + } } - }); + } + + // Create all plugins + each(explode(s.plugins.replace(/\-/g, '')), initPlugin); // Setup popup CSS path(s) if (s.popup_css !== false) { @@ -10074,7 +10537,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { n = DOM.add(o.iframeContainer, 'iframe', { id : t.id + "_ifr", src : u || 'javascript:""', // Workaround for HTTPS warning in IE6/7 - frameBorder : '0', + frameBorder : '0', + allowTransparency : "true", title : s.aria_label, style : { width : '100%', @@ -10093,41 +10557,72 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { e = n = o = null; // Cleanup }, - setupIframe : function() { + setupIframe : function(filled) { var t = this, s = t.settings, e = DOM.get(t.id), d = t.getDoc(), h, b; // Setup iframe body - if (!isIE || !tinymce.relaxedDomain) { + if ((!isIE || !tinymce.relaxedDomain) && !filled) { + // We need to wait for the load event on Gecko + if (isGecko && !s.readonly) { + t.getWin().addEventListener("DOMContentLoaded", function() { + window.setTimeout(function() { + var b = t.getBody(), undef; + + // Editable element needs to have some contents or backspace/delete won't work properly for some odd reason on FF 3.6 or older + b.innerHTML = '
'; + + // Check if Gecko supports contentEditable mode FF2 doesn't + if (b.contentEditable !== undef) { + // Setting the contentEditable off/on seems to force caret mode in the editor and enabled auto focus + b.contentEditable = false; + b.contentEditable = true; + + // Caret doesn't get rendered when you mousedown on the HTML element on FF 3.x + t.onMouseDown.add(function(ed, e) { + if (e.target.nodeName === "HTML") { + // Setting the contentEditable off/on seems to force caret mode in the editor and enabled auto focus + b.contentEditable = false; + b.contentEditable = true; + + d.designMode = 'on'; // Render the caret + + // Remove design mode again after a while so it has some time to execute + window.setTimeout(function() { + d.designMode = 'off'; + t.getBody().focus(); + }, 1); + } + }); + } else + d.designMode = 'on'; + + // Call setup frame once the contentEditable/designMode has been initialized + // since the caret won't be rendered some times otherwise. + t.setupIframe(true); + }, 1); + }, false); + } + 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 - } + // Wait for iframe onload event on Gecko + if (isGecko && !s.readonly) + return; } - // 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); + // It will not steal focus while setting contentEditable + b = t.getBody(); + b.disabled = true; - if (!s.readonly) - b.contentEditable = true; + if (!isGecko && !s.readonly) + b.contentEditable = true; - DOM.show(b); - } + b.disabled = false; t.schema = new tinymce.html.Schema(s); @@ -10144,38 +10639,44 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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); + // Force anchor names closed, unless the setting "allow_html_in_named_anchor" is explicitly included. + if (!t.settings.allow_html_in_named_anchor) { + 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; + var i = nodes.length, node, dom = t.dom, value, internalName; while (i--) { node = nodes[i]; value = node.attr(name); + internalName = 'data-mce-' + 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)); + // Add internal attribute if we need to we don't on a refresh of the document + if (!node.attributes.map[internalName]) { + if (name === "style") + node.attr(internalName, dom.serializeStyle(dom.parseStyle(value), node.name)); + else + node.attr(internalName, t.convertURL(value, name, node.name)); + } } }); @@ -10325,6 +10826,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { t.controlManager.onPostRender.dispatch(t, t.controlManager); t.onPostRender.dispatch(t); + t.quirks = new tinymce.util.Quirks(this); + if (s.directionality) t.getBody().dir = s.directionality; @@ -10474,71 +10977,61 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }); 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.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}); - 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); + }); - // 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); - // 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.getBody().focus(); + ed.getWin().focus(); + }, 100); + } - 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(); + var oed, t = this, selection = t.selection, ce = t.settings.content_editable, ieRng, controlElm, doc = t.getDoc(); if (!sf) { // Get selected control element - ieRng = t.selection.getRng(); + ieRng = selection.getRng(); if (ieRng.item) { controlElm = ieRng.item(0); } + selection.normalize(); + // Is not content editable if (!ce) t.getWin().focus(); + // Focus the body as well since it's contentEditable + if (tinymce.isGecko) { + t.getBody().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 @@ -10932,7 +11425,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, setContent : function(content, args) { - var self = this, rootNode, body = self.getBody(); + var self = this, rootNode, body = self.getBody(), forcedRootBlockName; // Setup args object args = args || {}; @@ -10949,7 +11442,15 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // 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 = '
'; + forcedRootBlockName = self.settings.forced_root_block; + if (forcedRootBlockName) + content = '<' + forcedRootBlockName + '>
'; + else + content = '
'; + + body.innerHTML = content; + self.selection.select(body, true); + self.selection.collapse(true); return; } @@ -10968,6 +11469,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (!args.no_events) self.onSetContent.dispatch(self, args); + self.selection.normalize(); + return args.content; }, @@ -11256,8 +11759,10 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (isGecko && !s.readonly) { if (t._isHidden()) { try { - if (!s.content_editable) - d.designMode = 'On'; + if (!s.content_editable) { + d.body.contentEditable = false; + d.body.contentEditable = true; + } } catch (ex) { // Fails if it's hidden } @@ -11284,20 +11789,20 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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; + 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(); - } - }); - } + // Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250 + // WebKit can't even do simple things like selecting an image + // Needs tobe the setBaseAndExtend or it will fail to select floated images + if (tinymce.isWebKit && e.nodeName == 'IMG') + t.selection.getSel().setBaseAndExtent(e, 0, e, 1); + + if (e.nodeName == 'A' && dom.hasClass(e, 'mceItemAnchor')) + t.selection.select(e); + + t.nodeChanged(); + }); // Add node change handlers t.onMouseUp.add(t.nodeChanged); @@ -11309,6 +11814,35 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { t.nodeChanged(); }); + + // Add block quote deletion handler + t.onKeyDown.add(function(ed, e) { + // Was the BACKSPACE key pressed? + if (e.keyCode != 8) + return; + + var n = ed.selection.getRng().startContainer; + var offset = ed.selection.getRng().startOffset; + + while (n && n.nodeType && n.nodeType != 1 && n.parentNode) + n = n.parentNode; + + // Is the cursor at the beginning of a blockquote? + if (n && n.parentNode && n.parentNode.tagName === 'BLOCKQUOTE' && n.parentNode.firstChild == n && offset == 0) { + // Remove the blockquote + ed.formatter.toggle('blockquote', null, n.parentNode); + + // Move the caret to the beginning of n + var rng = ed.selection.getRng(); + rng.setStart(n, 0); + rng.setEnd(n, 0); + ed.selection.setRng(rng); + ed.selection.collapse(false); + } + }); + + + // Add reset handler t.onReset.add(function() { t.setContent(t.startContent, {format : 'raw'}); @@ -11330,9 +11864,9 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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, '
']); + t.addShortcut('ctrl+7', '', ['FormatBlock', false, 'p']); + t.addShortcut('ctrl+8', '', ['FormatBlock', false, 'div']); + t.addShortcut('ctrl+9', '', ['FormatBlock', false, 'address']); function find(e) { var v = null; @@ -11428,21 +11962,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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) { @@ -11469,69 +11988,25 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }); 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); - } - } + var keyCode = e.keyCode; - if ((e.keyCode >= 33 && e.keyCode <= 36) || (e.keyCode >= 37 && e.keyCode <= 40) || e.keyCode == 13 || e.keyCode == 45 || e.ctrlKey) + if ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode == 13 || 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(); - } + var keyCode = e.keyCode, sel; - // 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(); + if (keyCode == 8) { + sel = t.getDoc().selection; - 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); - } + // Fix IE control + backspace browser bug + if (sel && sel.createRange && sel.createRange().item) { + t.undoManager.beforeChange(); + ed.dom.remove(sel.createRange().item(0)); + addUndo(); - // Block the default delete behavior since it might be broken - e.preventDefault(); - return; + return Event.cancel(e); } } @@ -11551,8 +12026,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // 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.undoManager.add(); } }); @@ -11561,7 +12036,22 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { addUndo(); }); } - + + // Fire a nodeChanged when the selection is changed on WebKit this fixes selection issues on iOS5 + // It only fires the nodeChange event every 50ms since it would other wise update the UI when you type and it hogs the CPU + if (tinymce.isWebKit) { + dom.bind(t.getDoc(), 'selectionchange', function() { + if (t.selectionTimer) { + window.clearTimeout(t.selectionTimer); + t.selectionTimer = 0; + } + + t.selectionTimer = window.setTimeout(function() { + t.nodeChanged(); + }, 50); + }); + } + // Bug fix for FireFox keeping styles from end of selection instead of start. if (tinymce.isGecko) { function getAttributeApplyFunction() { @@ -11569,10 +12059,14 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { return function() { var target = t.selection.getStart(); - t.dom.removeAllAttribs(target); - each(template, function(attr) { - target.setAttributeNode(attr.cloneNode(true)); - }); + + if (target !== t.getBody()) { + t.dom.removeAllAttribs(target); + + each(template, function(attr) { + target.setAttributeNode(attr.cloneNode(true)); + }); + } }; } @@ -11864,22 +12358,15 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, 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; + var parser, serializer, parentNode, rootNode, fragment, args, + marker, nodeRect, viewPortRect, rng, node, node2, bookmarkHtml, viewportBodyElement; - if (next) - walker.next(); - else - walker.prev(); - } - }; + // Setup parser and serializer + parser = editor.parser; + serializer = new tinymce.html.Serializer({}, editor.schema); + bookmarkHtml = '\uFEFF'; + // Run beforeSetContent handlers on the HTML to be inserted args = {content: value, format: 'html'}; selection.onBeforeSetContent.dispatch(selection, args); value = args.content; @@ -11888,89 +12375,114 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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')); + // Replace the caret marker with a span bookmark element + value = value.replace(/\{\$caret\}/, bookmarkHtml); - caretNode = dom.select('#__mce')[0]; - rootNode = dom.getRoot(); + // Insert node maker where we will insert the new HTML and get it's parent + if (!selection.isCollapsed()) + editor.getDoc().execCommand('Delete', false, null); - // 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); - } - } + parentNode = selection.getNode(); - // 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)) - ) - ); + // Parse the fragment within the context of the parent node + args = {context : parentNode.nodeName.toLowerCase()}; + fragment = parser.parse(value, args); - break; - } + // Move the caret to a more suitable location + node = fragment.lastChild; + if (node.attr('id') == 'mce_marker') { + marker = node; - parent = caretNode; - caretNode = caretNode.parentNode; + for (node = node.prev; node; node = node.walk(true)) { + if (node.type == 3 || !dom.isBlock(node.name)) { + node.parent.insert(marker, node, node.name === 'br'); + break; + } + } } - // 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 parser says valid we can insert the contents into that parent + if (!args.invalid) { + value = serializer.serialize(fragment); - if (node) { - rng = dom.createRng(); + // Check if parent is empty or only has one BR element then set the innerHTML of that parent + node = parentNode.firstChild; + node2 = parentNode.lastChild; + if (!node || (node === node2 && node.nodeName === 'BR')) + dom.setHTML(parentNode, value); + else + selection.setContent(value); + } else { + // If the fragment was invalid within that context then we need + // to parse and process the parent it's inserted into - 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); - } - } + // Insert bookmark node and get the parent + selection.setContent(bookmarkHtml); + parentNode = editor.selection.getNode(); + rootNode = editor.getBody(); - selection.setRng(rng); + // Opera will return the document node when selection is in root + if (parentNode.nodeType == 9) + parentNode = node = rootNode; + else + node = parentNode; + + // Find the ancestor just before the root element + while (node !== rootNode) { + parentNode = node; + node = node.parentNode; + } + + // Get the outer/inner HTML depending on if we are in the root and parser and serialize that + value = parentNode == rootNode ? rootNode.innerHTML : dom.getOuterHTML(parentNode); + value = serializer.serialize( + parser.parse( + // Need to replace by using a function since $ in the contents would otherwise be a problem + value.replace(//i, function() { + return serializer.serialize(fragment); + }) + ) + ); + + // Set the inner/outer HTML depending on if we are in the root or not + if (parentNode == rootNode) + dom.setHTML(rootNode, value); + else + dom.setOuterHTML(parentNode, value); + } - // 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; - } + marker = dom.get('mce_marker'); - dom.remove(node); - } + // Scroll range into view scrollIntoView on element can't be used since it will scroll the main view port as well + nodeRect = dom.getRect(marker); + viewPortRect = dom.getViewPort(editor.getWin()); - // 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); - } + // Check if node is out side the viewport if it is then scroll to it + if ((nodeRect.y + nodeRect.h > viewPortRect.y + viewPortRect.h || nodeRect.y < viewPortRect.y) || + (nodeRect.x > viewPortRect.x + viewPortRect.w || nodeRect.x < viewPortRect.x)) { + viewportBodyElement = tinymce.isIE ? editor.getDoc().documentElement : editor.getBody(); + viewportBodyElement.scrollLeft = nodeRect.x; + viewportBodyElement.scrollTop = nodeRect.y - viewPortRect.h + 25; } + // Move selection before marker and remove it + rng = dom.createRng(); + + // If previous sibling is a text node set the selection to the end of that node + node = marker.previousSibling; + if (node && node.nodeType == 3) { + rng.setStart(node, node.nodeValue.length); + } else { + // If the previous sibling isn't a text node or doesn't exist set the selection before the marker node + rng.setStartBefore(marker); + rng.setEndBefore(marker); + } + + // Remove the marker node and set the new range + dom.remove(marker); + selection.setRng(rng); + + // Dispatch after event and add any visual elements needed selection.onSetContent.dispatch(selection, args); editor.addVisual(); }, @@ -12040,7 +12552,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, mceInsertLink : function(command, ui, value) { - var link = dom.getParent(selection.getNode(), 'a'), img, floatVal; + var link = dom.getParent(selection.getNode(), 'a'), img, style, cls; if (tinymce.is(value, 'string')) value = {href : value}; @@ -12049,21 +12561,26 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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 + // WebKit can't create links on floated images for some odd reason + // So, just remove styles and restore it later if (tinymce.isWebKit) { img = dom.getParent(selection.getNode(), 'img'); if (img) { - floatVal = img.style.cssFloat; - img.style.cssFloat = null; + style = img.style.cssText; + cls = img.className; + img.style.cssText = null; + img.className = null; } } execNativeCommand('CreateLink', FALSE, 'javascript:mctmp(0);'); - // Restore float value - if (floatVal) - img.style.cssFloat = floatVal; + // Restore styles + if (style) + img.style.cssText = style; + if (cls) + img.className = cls; each(dom.select("a[href='javascript:mctmp(0);']"), function(link) { dom.setAttribs(link, value); @@ -12155,7 +12672,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { var Dispatcher = tinymce.util.Dispatcher; tinymce.UndoManager = function(editor) { - var self, index = 0, data = []; + var self, index = 0, data = [], beforeBookmark; function getContent() { return tinymce.trim(editor.getContent({format : 'raw', no_events : 1})); @@ -12171,9 +12688,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { onRedo : new Dispatcher(self), beforeChange : function() { - // Set before bookmark on previous level - if (data[index]) - data[index].beforeBookmark = editor.selection.getBookmark(2, true); + beforeBookmark = editor.selection.getBookmark(2, true); }, add : function(level) { @@ -12187,6 +12702,10 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (lastLevel && lastLevel.content == level.content) return null; + // Set before bookmark on previous level + if (data[index]) + data[index].beforeBookmark = beforeBookmark; + // Time to compress if (settings.custom_undo_redo_levels) { if (data.length > settings.custom_undo_redo_levels) { @@ -12338,28 +12857,94 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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; + var t = this, ed = t.editor, s = ed.settings, dom = ed.dom, selection = ed.selection, blockElements = ed.schema.getBlockElements(); - // Force root blocks when typing and when getting output + // Force root blocks if (s.forced_root_block) { - ed.onBeforeExecCommand.add(t.forceRoots, t); - ed.onKeyUp.add(t.forceRoots, t); - ed.onPreProcess.add(t.forceRoots, t); + function addRootBlocks() { + var node = selection.getStart(), rootNode = ed.getBody(), rng, startContainer, startOffset, endContainer, endOffset, rootBlockNode, tempNode, offset = -0xFFFFFF; + + if (!node || node.nodeType !== 1) + return; + + // Check if node is wrapped in block + while (node != rootNode) { + if (blockElements[node.nodeName]) + return; + + node = node.parentNode; + } + + // Get current selection + rng = selection.getRng(); + if (rng.setStart) { + startContainer = rng.startContainer; + startOffset = rng.startOffset; + endContainer = rng.endContainer; + endOffset = rng.endOffset; + } else { + // Force control range into text range + if (rng.item) { + rng = ed.getDoc().body.createTextRange(); + rng.moveToElementText(rng.item(0)); + } + + tmpRng = rng.duplicate(); + tmpRng.collapse(true); + startOffset = tmpRng.move('character', offset) * -1; + + if (!tmpRng.collapsed) { + tmpRng = rng.duplicate(); + tmpRng.collapse(false); + endOffset = (tmpRng.move('character', offset) * -1) - startOffset; + } + } + + // Wrap non block elements and text nodes + for (node = rootNode.firstChild; node; node) { + if (node.nodeType === 3 || (node.nodeType == 1 && !blockElements[node.nodeName])) { + if (!rootBlockNode) { + rootBlockNode = dom.create(s.forced_root_block); + node.parentNode.insertBefore(rootBlockNode, node); + } + + tempNode = node; + node = node.nextSibling; + rootBlockNode.appendChild(tempNode); + } else { + rootBlockNode = null; + node = node.nextSibling; + } + } + + if (rng.setStart) { + rng.setStart(startContainer, startOffset); + rng.setEnd(endContainer, endOffset); + selection.setRng(rng); + } else { + try { + rng = ed.getDoc().body.createTextRange(); + rng.moveToElementText(rootNode); + rng.collapse(true); + rng.moveStart('character', startOffset); + + if (endOffset > 0) + rng.moveEnd('character', endOffset); + + rng.select(); + } catch (ex) { + // Ignore + } + } + + ed.nodeChanged(); + }; + + ed.onKeyUp.add(addRootBlocks); + ed.onClick.add(addRootBlocks); } if (s.force_br_newlines) { @@ -12506,155 +13091,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { } }, - 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; @@ -12842,10 +13278,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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; @@ -12875,6 +13307,10 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { } else e.innerHTML = isOpera ? '\u00a0' : '
'; // Extra space for Opera so that the caret can move there }; + + // Padd empty blocks + if (dom.isEmpty(bef)) + appendStyles(bef, sn); // Fill empty afterblook with current style if (dom.isEmpty(aft)) @@ -12893,16 +13329,9 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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); + ed.selection.select(aft, true); + ed.selection.collapse(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; @@ -13193,7 +13622,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { ed.onMouseDown.add(c.hideMenu, c); } else { cls = t._cls.button || tinymce.ui.Button; - c = new cls(id, s); + c = new cls(id, s, ed); } return t.add(c); @@ -13610,8 +14039,74 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }); } }; + function adjustSelectionToVisibleSelection() { - function applyRngStyle(rng) { + function findSelectionEnd(start, end) { + var walker = new TreeWalker(end); + for (node = walker.current(); node; node = walker.prev()) { + if (node.childNodes.length > 1 || node == start) { + return node; + } + } + } + + // Adjust selection so that a end container with a end offset of zero is not included in the selection + // as this isn't visible to the user. + var rng = ed.selection.getRng(); + var start = rng.startContainer; + var end = rng.endContainer; + if (start != end && rng.endOffset == 0) { + var newEnd = findSelectionEnd(start, end); + var endOffset = newEnd.nodeType == 3 ? newEnd.length : newEnd.childNodes.length; + rng.setEnd(newEnd, endOffset); + } + return rng; + } + + function applyStyleToList(node, bookmark, wrapElm, newWrappers, process){ + var nodes =[], listIndex =-1, list, startIndex = -1, endIndex = -1, currentWrapElm; + + // find the index of the first child list. + each(node.childNodes, function(n, index) { + if (n.nodeName==="UL"||n.nodeName==="OL") {listIndex = index; list=n; return false; } + }); + + // get the index of the bookmarks + each(node.childNodes, function(n, index) { + if (n.nodeName==="SPAN" &&dom.getAttrib(n, "data-mce-type")=="bookmark" && n.id==bookmark.id+"_start") {startIndex=index} + if (n.nodeName==="SPAN" &&dom.getAttrib(n, "data-mce-type")=="bookmark" && n.id==bookmark.id+"_end") {endIndex=index} + }); + + // if the selection spans across an embedded list, or there isn't an embedded list - handle processing normally + if (listIndex<=0 || (startIndexlistIndex)) { + each(tinymce.grep(node.childNodes), process); + return 0; + } else { + currentWrapElm = wrapElm.cloneNode(FALSE); + + // create a list of the nodes on the same side of the list as the selection + each(tinymce.grep(node.childNodes), function(n, index) { + if ((startIndexlistIndex && index >listIndex)) { + nodes.push(n); + n.parentNode.removeChild(n); + } + }); + + // insert the wrapping element either before or after the list. + if (startIndexlistIndex) { + node.insertBefore(currentWrapElm, list.nextSibling); + } + + // add the new nodes to the list. + newWrappers.push(currentWrapElm); + each(nodes, function(node){currentWrapElm.appendChild(node)}); + return currentWrapElm; + } + }; + + function applyRngStyle(rng, bookmark) { var newWrappers = [], wrapName, wrapElm; // Setup wrapper element @@ -13685,6 +14180,9 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { } currentWrapElm.appendChild(node); + } else if (nodeName == 'li' && bookmark) { + // Start wrapping - if we are in a list node and have a bookmark, then we will always begin by wrapping in a new element. + currentWrapElm = applyStyleToList(node, bookmark, wrapElm, newWrappers, process); } else { // Start a new wrapper for possible children currentWrapElm = 0; @@ -13839,8 +14337,9 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { var curSelNode = ed.selection.getNode(); // Apply formatting to selection + ed.selection.setRng(adjustSelectionToVisibleSelection()); bookmark = selection.getBookmark(); - applyRngStyle(expandRng(selection.getRng(TRUE), formatList)); + applyRngStyle(expandRng(selection.getRng(TRUE), formatList), bookmark); // 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)) { @@ -13859,7 +14358,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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, @@ -14892,34 +15390,67 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // Only register listeners once if we need to if (!pendingFormats.isListening && hasPending()) { pendingFormats.isListening = true; + function performPendingFormat(node, textNode) { + var rng = dom.createRng(); + perform(node); + + rng.setStart(textNode, textNode.nodeValue.length); + rng.setEnd(textNode, textNode.nodeValue.length); + selection.setRng(rng); + ed.nodeChanged(); + } + var enterKeyPressed = false; each('onKeyDown,onKeyUp,onKeyPress,onMouseUp'.split(','), function(event) { ed[event].addToTop(function(ed, e) { + if (e.keyCode==13 && !e.shiftKey) { + enterKeyPressed = true; + return; + } // Do we have pending formats and is the selection moved has moved if (hasPending() && !tinymce.dom.RangeUtils.compareRanges(pendingFormats.lastRng, selection.getRng())) { + var foundCaret = false; each(dom.select('font,span'), function(node) { var textNode, rng; // Look for marker if (isCaretNode(node)) { + foundCaret = true; textNode = node.firstChild; - if (textNode) { - perform(node); + // Find the first text node within node + while (textNode && textNode.nodeType != 3) + textNode = textNode.firstChild; - rng = dom.createRng(); - rng.setStart(textNode, textNode.nodeValue.length); - rng.setEnd(textNode, textNode.nodeValue.length); - selection.setRng(rng); - ed.nodeChanged(); - } else + if (textNode) + performPendingFormat(node, textNode); + else dom.remove(node); } }); + + // no caret - so we are + if (enterKeyPressed && !foundCaret) { + var node = selection.getNode(); + var textNode = node; + + // Find the first text node within node + while (textNode && textNode.nodeType != 3) + textNode = textNode.firstChild; + if (textNode) { + node=textNode.parentNode; + while (!isBlock(node)){ + node=node.parentNode; + } + performPendingFormat(node, textNode); + } + } // Always unbind and clear pending styles on keyup - if (e.type == 'keyup' || e.type == 'mouseup') + if (e.type == 'keyup' || e.type == 'mouseup') { resetPending(); + enterKeyPressed=false; + } } }); }); diff --git a/include/javascript/tiny_mce/tiny_mce_prototype.js b/include/javascript/tiny_mce/tiny_mce_prototype.js index 962aa488..d1dac13d 100644 --- a/include/javascript/tiny_mce/tiny_mce_prototype.js +++ b/include/javascript/tiny_mce/tiny_mce_prototype.js @@ -1 +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")},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="";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+=""+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)+"";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'');i+=""+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)+"";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+=''+k.renderHTML()+""}else{f+=""+k.renderHTML()+""}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 +(function(d){var a=/^\s*|\s*$/g,e,c="B".replace(/A(.)|B/,"$1")==="$1";var b={majorVersion:"3",minorVersion:"4.4",releaseDate:"2011-08-04",_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.isIE7=s.isIE&&/MSIE [7]/.test(g);s.isIE8=s.isIE&&/MSIE [8]/.test(g);s.isIE9=s.isIE&&/MSIE [9]/.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);s.isIOS5=s.isIDevice&&g.match(/AppleWebKit\/(\d*)/)[1]>=534;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(a){a.VK={DELETE:46,BACKSPACE:8}})(tinymce);(function(b){function a(c){var f=c.dom,d=c.selection,e=b.VK;c.onKeyUp.add(function(g,j){if(j.keyCode==e.DELETE||j.keyCode==e.BACKSPACE){var i=d.getRng().startContainer;var k=i;while(!f.isBlock(k)){k=k.parentNode}var h=f.select("span.Apple-style-span",k);f.remove(h,true)}})}b.create("tinymce.util.Quirks",{Quirks:function(c){if(b.isWebKit){a(c)}}})})(tinymce);(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=/&(#x|#)?([\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,m.length===2?16:10);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="\\\" \\' \\; \\: ; : \uFEFF".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(/\uFEFF[0-9]/g,function(C){return a[C]})}if(!A){B=B.replace(/\\([\'\";:])/g,"$1")}return B}if(r){r=r.replace(/\\[\"\';:\uFEFF]/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,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(r)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(m){var h={},j,l,g,f,c={},b,e,d=m.makeMap,k=m.each;function i(o,n){return o.split(n||",")}function a(r,q){var o,p={};function n(s){return s.replace(/[A-Z]+/g,function(t){return n(r[t])})}for(o in r){if(r.hasOwnProperty(o)){r[o]=n(r[o])}}n(q).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(v,t,s,u){s=i(s,"|");p[t]={attributes:d(s),attributesOrder:s,children:d(u,"|",{"#comment":{}})}});return p}l="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";l=d(l,",",d(l.toUpperCase()));h=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]");j=d("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,autoplay,loop,controls");g=d("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,source");f=m.extend(d("td,th,iframe,video,audio,object"),g);b=d("pre,script,style,textarea");e=d("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");m.html.Schema=function(q){var z=this,n={},o={},x=[],p;q=q||{};if(q.verify_html===false){q.valid_elements="*[*]"}if(q.valid_styles){p={};k(q.valid_styles,function(B,A){p[A]=m.explode(B)})}function y(A){return new RegExp("^"+A.replace(/([?+*])/g,".$1")+"$")}function s(H){var G,C,V,R,W,B,E,Q,T,M,U,Y,K,F,S,A,O,D,X,Z,L,P,J=/^([#+-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,N=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,I=/[*?+]/;if(H){H=i(H);if(n["@"]){O=n["@"].attributes;D=n["@"].attributesOrder}for(G=0,C=H.length;G=0){for(R=l.length-1;R>=S;R--){Q=l[R];if(Q.valid){B.end(Q.name)}}l.length=S}}E=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};G=e.getShortEndedElements();A=e.getSelfClosingElements();k=e.getBoolAttrs();y=c.validate;K=c.remove_internals;z=c.fix_self_closing;while(f=E.exec(q)){if(m0&&l[l.length-1].name===H){D(H)}if(!y||(J=e.getElementRule(H))){r=true;if(y){L=J.attributes;n=J.attributePatterns}if(o=f[8]){s=o.indexOf("data-mce-type")!==-1;if(s&&K){r=false}C=[];C.map={};o.replace(h,function(R,Q,V,U,T){var W,S;Q=Q.toLowerCase();V=Q in k?Q:x(V||U||T||"");if(y&&!s&&Q.indexOf("data-")!==0){W=L[Q];if(!W&&n){S=n.length;while(S--){W=n[S];if(W.pattern.test(Q)){break}}if(S===-1){W=null}}if(!W){return}if(W.validValues&&!(V in W.validValues)){return}}C.map[Q]=V;C.push({name:Q,value:V})})}else{C=[];C.map={}}if(y&&!s){I=J.attributesRequired;O=J.attributesDefault;N=J.attributesForced;if(N){M=N.length;while(M--){F=N[M];P=F.name;v=F.value;if(v==="{$uid}"){v="mce_"+t++}C.map[P]=v;C.push({name:P,value:v})}}if(O){M=O.length;while(M--){F=O[M];P=F.name;if(!(P in C.map)){v=F.value;if(v==="{$uid}"){v="mce_"+t++}C.map[P]=v;C.push({name:P,value:v})}}}if(I){M=I.length;while(M--){if(I[M] in C.map){break}}if(M===-1){r=false}}if(C.map["data-mce-bogus"]){r=false}}if(r){B.start(H,C,p)}}else{r=false}if(j=g[H]){j.lastIndex=m=f.index+f[0].length;if(f=j.exec(q)){if(r){u=q.substr(m,f.index-m)}m=f.index+f[0].length}else{u=q.substr(m);m=q.length}if(r&&u.length>0){B.text(u,true)}if(r){B.end(H)}E.lastIndex=m;continue}if(!p){if(!o||o.indexOf("/")!=o.length-1){l.push({name:H,valid:r})}else{if(r){B.end(H)}}}}else{if(H=f[1]){B.comment(H)}else{if(H=f[2]){B.cdata(H)}else{if(H=f[3]){B.doctype(H)}else{if(H=f[4]){B.pi(H,f[5])}}}}}}m=f.index+f[0].length}if(m=0;M--){H=l[M];if(H.valid){B.end(H.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){N.value=l;N=N.prev}else{L=N.prev;N.remove();N=L}}}n=new b.html.SaxParser({validate:y,fix_self_closing:!y,cdata:function(l){A.append(I("#cdata",4)).value=l},text:function(M,l){var L;if(!s[A.name]){M=M.replace(k," ");if(A.lastChild&&o[A.lastChild.name]){M=M.replace(D,"")}}if(M.length!==0){L=I("#text",3);L.raw=!!l;A.append(L).value=M}},comment:function(l){A.append(I("#comment",8)).value=l},pi:function(l,L){A.append(I(l,7)).value=L;G(A)},doctype:function(L){var l;l=A.append(I("#doctype",10));l.value=L;G(A)},start:function(l,T,M){var R,O,N,L,P,U,S,Q;N=y?h.getElementRule(l):{};if(N){R=I(N.outputName||l,1);R.attributes=T;R.shortEnded=M;A.append(R);Q=p[A.name];if(Q&&p[R.name]&&!Q[R.name]){J.push(R)}O=d.length;while(O--){P=d[O].name;if(P in T.map){E=c[P];if(E){E.push(R)}else{c[P]=[R]}}}if(o[l]){G(R)}if(!M){A=R}}},end:function(l){var P,M,O,L,N;M=y?h.getElementRule(l):{};if(M){if(o[l]){if(!s[A.name]){for(P=A.firstChild;P&&P.type===3;){O=P.value.replace(D,"");if(O.length>0){P.value=O;P=P.next}else{L=P.next;P.remove();P=L}}for(P=A.lastChild;P&&P.type===3;){O=P.value.replace(t,"");if(O.length>0){P.value=O;P=P.prev}else{L=P.prev;P.remove();P=L}}}P=A.prev;if(P&&P.type===3){O=P.value.replace(D,"");if(O.length>0){P.value=O}else{P.remove()}}}if(M.removeEmpty||M.paddEmpty){if(A.isEmpty(u)){if(M.paddEmpty){A.empty().append(new a("#text","3")).value="\u00a0"}else{if(!A.attributes.map.name){N=A.parent;A.empty().remove();A=N;return}}}}A=A.parent}}},h);H=A=new a(m.context||g.root_name,11);n.parse(v);if(y&&J.length){if(!m.context){j(J)}else{m.invalid=true}}if(q&&H.name=="body"){F()}if(!m.invalid){for(K in i){E=e[K];z=i[K];x=z.length;while(x--){if(!z[x].parent){z.splice(x,1)}}for(C=0,B=E.length;C0){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;l.boxModel=!h.isIE||o.compatMode=="CSS1Compat"||l.stdMode;l.hasOuterHTML="outerHTML" in o.createElement("a");l.settings=m=h.extend({keep_values:false,hex_colors:1},m);l.schema=m.schema;l.styles=new h.html.Styles({url_converter:m.url_converter,url_converter_scope:m.url_converter_scope},m.schema);if(h.isIE6){try{o.execCommand("BackgroundImageCache",false,true)}catch(n){l.cssFlicker=true}}if(b&&m.schema){("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(p){o.createElement(p)});for(k in m.schema.getCustomElements()){o.createElement(k)}}h.addUnload(l.destroy,l)},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(o,p,l){var j,k=this,m;o=k.get(o);if(!o||o.nodeType!==1){return l===m?false:l}if(!e(l)){l=""}if(/^(src|href|style|coords|shape)$/.test(p)){j=o.getAttribute("data-mce-"+p);if(j){return j}}if(b&&k.props[p]){j=o[k.props[p]];j=j&&j.nodeValue?j.nodeValue:j}if(!j){j=o.getAttribute(p,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(p)){if(o[k.props[p]]===true&&j===""){return p}return j?p:""}if(o.nodeName==="FORM"&&o.getAttributeNode(p)){return o.getAttributeNode(p).nodeValue}if(p==="style"){j=j||o.style.cssText;if(j){j=k.serializeStyle(k.parseStyle(j),o.nodeName);if(k.settings.keep_values&&!k._isRes(j)){o.setAttribute("data-mce-style",j)}}}if(d&&p==="class"&&j){j=j.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(p){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 p}return l;case"shape":j=j.toLowerCase();break;default:if(p.indexOf("on")===0&&j){j=h._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+j)}}}return(j!==m&&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(s.getBoundingClientRect){s=s.getBoundingClientRect();o=k.boxModel?p.documentElement:p.body;j=s.left+(p.documentElement.scrollLeft||p.body.scrollLeft)-o.clientTop;q=s.top+(p.documentElement.scrollTop||p.body.scrollTop)-o.clientLeft;return{x:j,y:q}}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==="data-mce-bookmark"){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(n,o){var j=0,l,m,k;if(n){for(l=n.nodeType,n=n.previousSibling,m=n;n;n=n.previousSibling){k=n.nodeType;if(o&&k==3){if(k==l||!n.nodeValue.length){continue}}j++;l=k}}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(d){var b=this,h=d.dom,c=true,f=false;function e(i,j){var k,t=0,q,n,m,l,o,r,p=-1,s;k=i.duplicate();k.collapse(j);s=k.parentElement();if(s.ownerDocument!==d.dom.doc){return}while(s.contentEditable==="false"){s=s.parentNode}if(!s.hasChildNodes()){return{node:s,inside:1}}m=s.children;q=m.length-1;while(t<=q){r=Math.floor((t+q)/2);l=m[r];k.moveToElementText(l);p=k.compareEndPoints(j?"StartToStart":"EndToEnd",i);if(p>0){q=r-1}else{if(p<0){t=r+1}else{return{node:l}}}}if(p<0){if(!l){k.moveToElementText(s);k.collapse(true);l=s;n=true}else{k.collapse(false)}k.setEndPoint(j?"EndToStart":"EndToEnd",i);if(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)>0){k=i.duplicate();k.collapse(j);o=-1;while(s==k.parentElement()){if(k.move("character",-1)==0){break}o++}}o=o||k.text.replace("\r\n"," ").length}else{k.collapse(true);k.setEndPoint(j?"StartToStart":"StartToEnd",i);o=k.text.replace("\r\n"," ").length}return{node:l,position:p,offset:o,inside:n}}function g(){var i=d.getRng(),r=h.createRng(),l,k,p,q,m,j;l=i.item?i.item(0):i.parentElement();if(l.ownerDocument!=h.doc){return r}k=d.isCollapsed();if(i.item){r.setStart(l.parentNode,h.nodeIndex(l));r.setEnd(r.startContainer,r.startOffset+1);return r}function o(A){var u=e(i,A),s,y,z=0,x,v,t;s=u.node;y=u.offset;if(u.inside&&!s.hasChildNodes()){r[A?"setStart":"setEnd"](s,0);return}if(y===v){r[A?"setStartBefore":"setEndAfter"](s);return}if(u.position<0){x=u.inside?s.firstChild:s.nextSibling;if(!x){r[A?"setStartAfter":"setEndAfter"](s);return}if(!y){if(x.nodeType==3){r[A?"setStart":"setEnd"](x,0)}else{r[A?"setStartBefore":"setEndBefore"](x)}return}while(x){t=x.nodeValue;z+=t.length;if(z>=y){s=x;z-=y;z=t.length-z;break}x=x.nextSibling}}else{x=s.previousSibling;if(!x){return r[A?"setStartBefore":"setEndBefore"](s)}if(!y){if(s.nodeType==3){r[A?"setStart":"setEnd"](x,s.nodeValue.length)}else{r[A?"setStartAfter":"setEndAfter"](x)}return}while(x){z+=x.nodeValue.length;if(z>=y){s=x;z-=y;break}x=x.previousSibling}}r[A?"setStart":"setEnd"](s,z)}try{o(true);if(!k){o()}}catch(n){if(n.number==-2147024809){m=b.getBookmark(2);p=i.duplicate();p.collapse(true);l=p.parentElement();if(!k){p=i.duplicate();p.collapse(false);q=p.parentElement();q.innerHTML=q.innerHTML}l.innerHTML=l.innerHTML;b.moveToBookmark(m);i=d.getRng();o(true);if(!k){o()}}else{throw n}}return r}this.getBookmark=function(m){var j=d.getRng(),o,i,l={};function n(u){var u,t,p,s,r,q=[];t=u.parentNode;p=h.getRoot().parentNode;while(t!=p){s=t.children;r=s.length;while(r--){if(u===s[r]){q.push(r);break}}u=t;t=t.parentNode}return q}function k(q){var p;p=e(j,q);if(p){return{position:p.position,offset:p.offset,indexes:n(p.node),inside:p.inside}}}if(m===2){if(!j.item){l.start=k(true);if(!d.isCollapsed()){l.end=k()}}else{l.start={ctrl:true,indexes:n(j.item(0))}}}return l};this.moveToBookmark=function(k){var j,i=h.doc.body;function m(o){var r,q,n,p;r=h.getRoot();for(q=o.length-1;q>=0;q--){p=r.children;n=o[q];if(n<=p.length-1){r=p[n]}}return r}function l(r){var n=k[r?"start":"end"],q,p,o;if(n){q=n.position>0;p=i.createTextRange();p.moveToElementText(m(n.indexes));offset=n.offset;if(offset!==o){p.collapse(n.inside||q);p.moveStart("character",q?-offset:offset)}else{p.collapse(r)}j.setEndPoint(r?"StartToStart":"EndToStart",p);if(r){j.collapse(true)}}}if(k.start){if(k.start.ctrl){j=i.createControlRange();j.addElement(m(k.start.indexes));j.select()}else{j=i.createTextRange();l(true);l();j.select()}}};this.addRange=function(i){var n,l,k,p,s,q,r=d.dom.doc,m=r.body;function j(z){var u,y,t,x,v;t=h.create("a");u=z?k:s;y=z?p:q;x=n.duplicate();if(u==r||u==r.documentElement){u=m;y=0}if(u.nodeType==3){u.parentNode.insertBefore(t,u);x.moveToElementText(t);x.moveStart("character",y);h.remove(t);n.setEndPoint(z?"StartToStart":"EndToEnd",x)}else{v=u.childNodes;if(v.length){if(y>=v.length){h.insertAfter(t,v[v.length-1])}else{u.insertBefore(t,v[y])}x.moveToElementText(t)}else{t=r.createTextNode("\uFEFF");u.appendChild(t);x.moveToElementText(t.parentNode);x.collapse(c)}n.setEndPoint(z?"StartToStart":"EndToEnd",x);h.remove(t)}}k=i.startContainer;p=i.startOffset;s=i.endContainer;q=i.endOffset;n=m.createTextRange();if(k==s&&k.nodeType==1&&p==q-1){if(p==q-1){try{l=m.createControlRange();l.addElement(k.childNodes[p]);l.select();return}catch(o){}}}j(true);j();n.select()};this.getRangeAt=g}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==k&&f.endContainer==k){k.body.innerHTML=g}else{f.deleteContents();if(k.body.childNodes.length==0){k.body.innerHTML=g}else{if(f.createContextualFragment){f.insertNode(f.createContextualFragment(g))}else{m=k.createDocumentFragment();l=k.createElement("div");m.appendChild(l);l.outerHTML=g;f.insertNode(m)}}}j=n.dom.get("__caret");f=k.createRange();f.setStartBefore(j);f.setEndBefore(j);n.setRng(f);n.dom.remove("__caret");try{n.setRng(f)}catch(h){}}else{if(f.item){k.execCommand("Delete",false,null);f=n.getRng()}f.pasteHTML(g)}if(!i.no_events){n.onSetContent.dispatch(n,i)}},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}if(v.tridentSel){return v.tridentSel.getBookmark(r)}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(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(r.tridentSel){return r.tridentSel.moveToBookmark(n)}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},normalize:function(){var g=this,f,i;if(c.isIE){return}function h(p){var k,o,n,m=g.dom,j=m.getRoot(),l;k=f[(p?"start":"end")+"Container"];o=f[(p?"start":"end")+"Offset"];if(k.nodeType===9){k=k.body;o=0}if(k===j){if(k.hasChildNodes()){k=k.childNodes[Math.min(!p&&o>0?o-1:o,k.childNodes.length-1)];o=0;l=k;n=new c.dom.TreeWalker(k,j);do{if(l.nodeType===3){o=p?0:l.nodeValue.length-1;k=l;break}if(l.nodeName==="BR"){o=m.nodeIndex(l);k=l.parentNode;break}}while(l=(p?n.next():n.prev()));i=true}}if(i){f["set"+(p?"Start":"End")](k,o)}}f=g.getRng();h(true);if(f.collapsed){h()}if(i){g.setRng(f)}},destroy:function(g){var f=this;f.win=null;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&&!(this.editor&&this.editor.forcedHighContrastMode)){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,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}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(j){if(j.value===g.selectedValue){f.items[j.id].setSelected(1);g.oldID=j.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="";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+=""+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)+"";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'');i+=""+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)+"";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+=''+k.renderHTML()+""}else{f+=""+k.renderHTML()+""}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){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return 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(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!=0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});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&&!m.isIOS5){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(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(z){var y={prefix:"plugins/",resource:z,suffix:"/editor_plugin"+m.suffix+".js"};var z=c.createUrl(y,z);c.load(z.resource,z)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+m.suffix+".js"})}}});p.loadQueue(function(){if(!u.removed){u.init()}})}q()},init:function(){var r,H=this,I=H.settings,E,A,D=H.getElement(),q,p,F,y,C,G,z,v=[];m.add(H);I.aria_label=I.aria_label||n.getAttrib(D,"aria-label",H.getLang("aria.rich_text_area"));if(I.theme){I.theme=I.theme.replace(/-/,"");q=h.get(I.theme);H.theme=new q();if(H.theme.init&&I.init_theme){H.theme.init(H,h.urls[I.theme]||m.documentBaseURL.replace(/\/$/,""))}}function B(J){var K=c.get(J),t=c.urls[J]||m.documentBaseURL.replace(/\/$/,""),s;if(K&&m.inArray(v,J)===-1){i(c.dependencies(J),function(u){B(u)});s=new K(H,t);H.plugins[J]=s;if(s.init){s.init(H,t);v.push(J)}}}i(g(I.plugins.replace(/\-/g,"")),B);if(I.popup_css!==false){if(I.popup_css){I.popup_css=H.documentBaseURI.toAbsolute(I.popup_css)}else{I.popup_css=H.baseURI.toAbsolute("themes/"+I.theme+"/skins/"+I.skin+"/dialog.css")}}if(I.popup_css_add){I.popup_css+=","+H.documentBaseURI.toAbsolute(I.popup_css_add)}H.controlManager=new m.ControlManager(H);if(I.custom_undo_redo){H.onBeforeExecCommand.add(function(t,J,u,K,s){if(J!="Undo"&&J!="Redo"&&J!="mceRepaint"&&(!s||!s.skip_undo)){H.undoManager.beforeChange()}});H.onExecCommand.add(function(t,J,u,K,s){if(J!="Undo"&&J!="Redo"&&J!="mceRepaint"&&(!s||!s.skip_undo)){H.undoManager.add()}})}H.onExecCommand.add(function(s,t){if(!/^(FontName|FontSize)$/.test(t)){H.nodeChanged()}});if(a){function x(s,t){if(!t||!t.initial){H.execCommand("mceRepaint")}}H.onUndo.add(x);H.onRedo.add(x);H.onSetContent.add(x)}H.onBeforeRenderUI.dispatch(H,H.controlManager);if(I.render_ui){E=I.width||D.style.width||D.offsetWidth;A=I.height||D.style.height||D.offsetHeight;H.orgDisplay=D.style.display;G=/^[0-9\.]+(|px)$/i;if(G.test(""+E)){E=Math.max(parseInt(E)+(q.deltaWidth||0),100)}if(G.test(""+A)){A=Math.max(parseInt(A)+(q.deltaHeight||0),100)}q=H.theme.renderUI({targetNode:D,width:E,height:A,deltaWidth:I.delta_width,deltaHeight:I.delta_height});H.editorContainer=q.editorContainer}if(document.domain&&location.hostname!=document.domain){m.relaxedDomain=document.domain}n.setStyles(q.sizeContainer||q.editorContainer,{width:E,height:A});if(I.content_css){m.each(g(I.content_css),function(s){H.contentCSS.push(H.documentBaseURI.toAbsolute(s))})}A=(q.iframeHeight||A)+(typeof(A)=="number"?(q.deltaHeight||0):"");if(A<100){A=100}H.iframeHTML=I.doctype+'';if(I.document_base_url!=m.documentBaseURL){H.iframeHTML+=''}if(I.ie7_compat){H.iframeHTML+=''}else{H.iframeHTML+=''}H.iframeHTML+='';if(!a||!/Firefox\/2/.test(navigator.userAgent)){for(z=0;z'}H.contentCSS=[]}y=I.body_id||"tinymce";if(y.indexOf("=")!=-1){y=H.getParam("body_id","","hash");y=y[H.id]||y}C=I.body_class||"";if(C.indexOf("=")!=-1){C=H.getParam("body_class","","hash");C=C[H.id]||""}H.iframeHTML+='';if(m.relaxedDomain&&(b||(m.isOpera&&parseFloat(opera.version())<11))){F='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+H.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'}r=n.add(q.iframeContainer,"iframe",{id:H.id+"_ifr",src:F||'javascript:""',frameBorder:"0",allowTransparency:"true",title:I.aria_label,style:{width:"100%",height:A}});H.contentAreaContainer=q.iframeContainer;n.get(q.editorContainer).style.display=H.orgDisplay;n.get(H.id).style.display="none";n.setAttrib(H.id,"aria-hidden",true);if(!m.relaxedDomain||!F){H.setupIframe()}D=r=q=null},setupIframe:function(x){var q=this,v=q.settings,y=n.get(q.id),z=q.getDoc(),u,p;if((!b||!m.relaxedDomain)&&!x){if(a&&!v.readonly){q.getWin().addEventListener("DOMContentLoaded",function(){window.setTimeout(function(){var s=q.getBody(),t;s.innerHTML="
";if(s.contentEditable!==t){s.contentEditable=false;s.contentEditable=true;q.onMouseDown.add(function(A,B){if(B.target.nodeName==="HTML"){s.contentEditable=false;s.contentEditable=true;z.designMode="on";window.setTimeout(function(){z.designMode="off";q.getBody().focus()},1)}})}else{z.designMode="on"}q.setupIframe(true)},1)},false)}z.open();z.write(q.iframeHTML);z.close();if(m.relaxedDomain){z.domain=m.relaxedDomain}if(a&&!v.readonly){return}}p=q.getBody();p.disabled=true;if(!a&&!v.readonly){p.contentEditable=true}p.disabled=false;q.schema=new m.html.Schema(v);q.dom=new m.dom.DOMUtils(q.getDoc(),{keep_values:true,url_converter:q.convertURL,url_converter_scope:q,hex_colors:v.force_hex_style_colors,class_filter:v.class_filter,update_styles:1,fix_ie_paragraphs:1,schema:q.schema});q.parser=new m.html.DomParser(v,q.schema);if(!q.settings.allow_html_in_named_anchor){q.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)}}})}q.parser.addAttributeFilter("src,href,style",function(s,t){var A=s.length,C,E=q.dom,D,B;while(A--){C=s[A];D=C.attr(t);B="data-mce-"+t;if(!C.attributes.map[B]){if(t==="style"){C.attr(B,E.serializeStyle(E.parseStyle(D),C.name))}else{C.attr(B,q.convertURL(D,t,C.name))}}}});q.parser.addNodeFilter("script",function(s,t){var A=s.length;while(A--){s[A].attr("type","mce-text/javascript")}});q.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+"]]"}});q.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(t,A){var B=t.length,C,s=q.schema.getNonEmptyElements();while(B--){C=t[B];if(C.isEmpty(s)){C.empty().append(new m.html.Node("br",1)).shortEnded=true}}});q.serializer=new m.dom.Serializer(v,q.dom,q.schema);q.selection=new m.dom.Selection(q.dom,q.getWin(),q.serializer);q.formatter=new m.Formatter(this);q.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){q.formatter.register(s,{block:s,remove:"all"})});q.formatter.register(q.settings.formats);q.undoManager=new m.UndoManager(q);q.undoManager.onAdd.add(function(t,s){if(t.hasUndo()){return q.onChange.dispatch(q,s,t)}});q.undoManager.onUndo.add(function(t,s){return q.onUndo.dispatch(q,s,t)});q.undoManager.onRedo.add(function(t,s){return q.onRedo.dispatch(q,s,t)});q.forceBlocks=new m.ForceBlocks(q,{forced_root_block:v.forced_root_block});q.editorCommands=new m.EditorCommands(q);q.serializer.onPreProcess.add(function(s,t){return q.onPreProcess.dispatch(q,t,s)});q.serializer.onPostProcess.add(function(s,t){return q.onPostProcess.dispatch(q,t,s)});q.onPreInit.dispatch(q);if(!v.gecko_spellcheck){q.getBody().spellcheck=0}if(!v.readonly){q._addEvents()}q.controlManager.onPostRender.dispatch(q,q.controlManager);q.onPostRender.dispatch(q);q.quirks=new m.util.Quirks(this);if(v.directionality){q.getBody().dir=v.directionality}if(v.nowrap){q.getBody().style.whiteSpace="nowrap"}if(v.handle_node_change_callback){q.onNodeChange.add(function(t,s,A){q.execCallback("handle_node_change_callback",q.id,A,-1,-1,true,q.selection.isCollapsed())})}if(v.save_callback){q.onSaveContent.add(function(s,A){var t=q.execCallback("save_callback",q.id,A.content,q.getBody());if(t){A.content=t}})}if(v.onchange_callback){q.onChange.add(function(t,s){q.execCallback("onchange_callback",q,s)})}if(v.protect){q.onBeforeSetContent.add(function(s,t){if(v.protect){i(v.protect,function(A){t.content=t.content.replace(A,function(B){return""})})}})}if(v.convert_newlines_to_brs){q.onBeforeSetContent.add(function(s,t){if(t.initial){t.content=t.content.replace(/\r?\n/g,"
")}})}if(v.preformatted){q.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(v.verify_css_classes){q.serializer.attribValueFilter=function(C,A){var B,t;if(C=="class"){if(!q.classesRE){t=q.dom.getClasses();if(t.length>0){B="";i(t,function(s){B+=(B?"|":"")+s["class"]});q.classesRE=new RegExp("("+B+")","gi")}}return !q.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(A)||q.classesRE.test(A)?A:""}return A}}if(v.cleanup_callback){q.onBeforeSetContent.add(function(s,t){t.content=q.execCallback("cleanup_callback","insert_to_editor",t.content,t)});q.onPreProcess.add(function(s,t){if(t.set){q.execCallback("cleanup_callback","insert_to_editor_dom",t.node,t)}if(t.get){q.execCallback("cleanup_callback","get_from_editor_dom",t.node,t)}});q.onPostProcess.add(function(s,t){if(t.set){t.content=q.execCallback("cleanup_callback","insert_to_editor",t.content,t)}if(t.get){t.content=q.execCallback("cleanup_callback","get_from_editor",t.content,t)}})}if(v.save_callback){q.onGetContent.add(function(s,t){if(t.save){t.content=q.execCallback("save_callback",q.id,t.content,q.getBody())}})}if(v.handle_event_callback){q.onEvent.add(function(s,t,A){if(q.execCallback("handle_event_callback",t,s,A)===false){j.cancel(t)}})}q.onSetContent.add(function(){q.addVisual(q.getBody())});if(v.padd_empty_editor){q.onPostProcess.add(function(s,t){t.content=t.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
[\r\n]*)$/,"")})}if(a){function r(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})}})}q.onExecCommand.add(function(s,t){if(t==="CreateLink"){r(s)}});q.onSetContent.add(q.selection.onSetContent.add(r))}q.load({initial:true,format:"html"});q.startContent=q.getContent({format:"raw"});q.undoManager.add();q.initialized=true;q.onInit.dispatch(q);q.execCallback("setupcontent_callback",q.id,q.getBody(),q.getDoc());q.execCallback("init_instance_callback",q);q.focus(true);q.nodeChanged({initial:1});i(q.contentCSS,function(s){q.dom.loadCSS(s)});if(v.auto_focus){setTimeout(function(){var s=m.get(v.auto_focus);s.selection.select(s.getBody(),1);s.selection.collapse(1);s.getBody().focus();s.getWin().focus()},100)}y=null},focus:function(u){var y,q=this,s=q.selection,x=q.settings.content_editable,r,p,v=q.getDoc();if(!u){r=s.getRng();if(r.item){p=r.item(0)}s.normalize();if(!x){q.getWin().focus()}if(m.isGecko){q.getBody().focus()}if(p&&p.ownerDocument==v){r=v.body.createControlRange();r.addElement(p);r.select()}}if(m.activeEditor!=q){if((y=m.activeEditor)!=null){y.onDeactivate.dispatch(y,q)}q.onActivate.dispatch(q,y)}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(u,s){var r=this,q,p=r.getBody(),t;s=s||{};s.format=s.format||"html";s.set=true;s.content=u;if(!s.no_events){r.onBeforeSetContent.dispatch(r,s)}u=s.content;if(!m.isIE&&(u.length===0||/^\s+$/.test(u))){t=r.settings.forced_root_block;if(t){u="<"+t+'>
"}else{u='
'}p.innerHTML=u;r.selection.select(p,true);r.selection.collapse(true);return}if(s.format!=="raw"){u=new m.html.Serializer({},r.schema).serialize(r.parser.parse(u))}s.content=m.trim(u);r.dom.setHTML(p,s.content);if(!s.no_events){r.onSetContent.dispatch(r,s)}r.selection.normalize();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.body.contentEditable=false;G.body.contentEditable=true}}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)}B.onClick.add(function(s,t){t=t.target;if(m.isWebKit&&t.nodeName=="IMG"){B.selection.getSel().setBaseAndExtent(t,0,t,1)}if(t.nodeName=="A"&&q.hasClass(t,"mceItemAnchor")){B.selection.select(t)}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.onKeyDown.add(function(t,D){if(D.keyCode!=8){return}var F=t.selection.getRng().startContainer;var E=t.selection.getRng().startOffset;while(F&&F.nodeType&&F.nodeType!=1&&F.parentNode){F=F.parentNode}if(F&&F.parentNode&&F.parentNode.tagName==="BLOCKQUOTE"&&F.parentNode.firstChild==F&&E==0){t.formatter.toggle("blockquote",null,F.parentNode);var s=t.selection.getRng();s.setStart(F,0);s.setEnd(F,0);t.selection.setRng(s);t.selection.collapse(false)}});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,"p"]);B.addShortcut("ctrl+8","",["FormatBlock",false,"div"]);B.addShortcut("ctrl+9","",["FormatBlock",false,"address"]);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}})}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(s,D){var t=D.keyCode;if((t>=33&&t<=36)||(t>=37&&t<=40)||t==13||t==45||D.ctrlKey){y()}});B.onKeyDown.add(function(s,E){var D=E.keyCode,t;if(D==8){t=B.getDoc().selection;if(t&&t.createRange&&t.createRange().item){B.undoManager.beforeChange();s.dom.remove(t.createRange().item(0));y();return j.cancel(E)}}if((D>=33&&D<=36)||(D>=37&&D<=40)||D==13||D==45){if(m.isIE&&D==13){B.undoManager.beforeChange()}if(B.undoManager.typing){y()}return}if((D<16||D>20)&&D!=224&&D!=91&&!B.undoManager.typing){B.undoManager.beforeChange();B.undoManager.typing=true;B.undoManager.add()}});B.onMouseDown.add(function(){if(B.undoManager.typing){y()}})}if(m.isWebKit){q.bind(B.getDoc(),"selectionchange",function(){if(B.selectionTimer){window.clearTimeout(B.selectionTimer);B.selectionTimer=0}B.selectionTimer=window.setTimeout(function(){B.nodeChanged()},50)})}if(m.isGecko){function A(){var s=B.dom.getAttribs(B.selection.getStart().cloneNode(false));return function(){var t=B.selection.getStart();if(t!==B.getBody()){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(A,H,J){var x,I,D,y,E,F,C,B,K,v,z,L,u,G;x=n.parser;I=new c.html.Serializer({},n.schema);u='\uFEFF';F={content:J,format:"html"};p.onBeforeSetContent.dispatch(p,F);J=F.content;if(J.indexOf("{$caret}")==-1){J+="{$caret}"}J=J.replace(/\{\$caret\}/,u);if(!p.isCollapsed()){n.getDoc().execCommand("Delete",false,null)}D=p.getNode();F={context:D.nodeName.toLowerCase()};E=x.parse(J,F);z=E.lastChild;if(z.attr("id")=="mce_marker"){C=z;for(z=z.prev;z;z=z.walk(true)){if(z.type==3||!l.isBlock(z.name)){z.parent.insert(C,z,z.name==="br");break}}}if(!F.invalid){J=I.serialize(E);z=D.firstChild;L=D.lastChild;if(!z||(z===L&&z.nodeName==="BR")){l.setHTML(D,J)}else{p.setContent(J)}}else{p.setContent(u);D=n.selection.getNode();y=n.getBody();if(D.nodeType==9){D=z=y}else{z=D}while(z!==y){D=z;z=z.parentNode}J=D==y?y.innerHTML:l.getOuterHTML(D);J=I.serialize(x.parse(J.replace(//i,function(){return I.serialize(E)})));if(D==y){l.setHTML(y,J)}else{l.setOuterHTML(D,J)}}C=l.get("mce_marker");B=l.getRect(C);K=l.getViewPort(n.getWin());if((B.y+B.h>K.y+K.h||B.yK.x+K.w||B.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(B,A,z){var y=l.getParent(p.getNode(),"a"),v,x,u;if(c.is(z,"string")){z={href:z}}z.href=z.href.replace(" ","%20");if(!y){if(c.isWebKit){v=l.getParent(p.getNode(),"img");if(v){x=v.style.cssText;u=v.className;v.style.cssText=null;v.className=null}}f("CreateLink",b,"javascript:mctmp(0);");if(x){v.style.cssText=x}if(u){v.className=u}d(l.select("a[href='javascript:mctmp(0);']"),function(C){l.setAttribs(C,z)})}else{if(z.href){l.setAttribs(y,z)}else{n.dom.remove(y,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(f){var d,e=0,h=[],c;function g(){return b.trim(f.getContent({format:"raw",no_events:1}))}return d={typing:false,onAdd:new a(d),onUndo:new a(d),onRedo:new a(d),beforeChange:function(){c=f.selection.getBookmark(2,true)},add:function(m){var j,k=f.settings,l;m=m||{};m.content=g();l=h[e];if(l&&l.content==m.content){return null}if(h[e]){h[e].beforeBookmark=c}if(k.custom_undo_redo_levels){if(h.length>k.custom_undo_redo_levels){for(j=0;j0){k=h[--e];f.setContent(k.content,{format:"raw"});f.selection.moveToBookmark(k.beforeBookmark);d.onUndo.dispatch(d,k)}return k},redo:function(){var i;if(e0||this.typing},hasRedo:function(){return e');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)},setup:function(){var n=this,m=n.editor,p=m.settings,u=m.dom,o=m.selection,q=m.schema.getBlockElements();if(p.forced_root_block){function v(){var y=o.getStart(),t=m.getBody(),s,z,D,F,E,x,A,B=-16777215;if(!y||y.nodeType!==1){return}while(y!=t){if(q[y.nodeName]){return}y=y.parentNode}s=o.getRng();if(s.setStart){z=s.startContainer;D=s.startOffset;F=s.endContainer;E=s.endOffset}else{if(s.item){s=m.getDoc().body.createTextRange();s.moveToElementText(s.item(0))}tmpRng=s.duplicate();tmpRng.collapse(true);D=tmpRng.move("character",B)*-1;if(!tmpRng.collapsed){tmpRng=s.duplicate();tmpRng.collapse(false);E=(tmpRng.move("character",B)*-1)-D}}for(y=t.firstChild;y;y){if(y.nodeType===3||(y.nodeType==1&&!q[y.nodeName])){if(!x){x=u.create(p.forced_root_block);y.parentNode.insertBefore(x,y)}A=y;y=y.nextSibling;x.appendChild(A)}else{x=null;y=y.nextSibling}}if(s.setStart){s.setStart(z,D);s.setEnd(F,E);o.setRng(s)}else{try{s=m.getDoc().body.createTextRange();s.moveToElementText(t);s.collapse(true);s.moveStart("character",D);if(E>0){s.moveEnd("character",E)}s.select()}catch(C){}}m.nodeChanged()}m.onKeyUp.add(v);m.onClick.add(v)}if(p.force_br_newlines){if(c){m.onKeyPress.add(function(s,t){var x;if(t.keyCode==13&&o.getNode().nodeName!="LI"){o.setContent('
',{format:"raw"});x=u.get("__");x.removeAttribute("id");o.select(x);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,y){if(y.keyCode==13&&!y.shiftKey){var x=t.selection.getStart(),s=n._previousFormats;if(!x.hasChildNodes()&&s){x=u.getParent(x,u.isBlock);if(x&&x.nodeName!="LI"){x.innerHTML="";if(n._previousFormats){x.appendChild(s.wrapper);s.inner.innerHTML="\uFEFF"}else{x.innerHTML="\uFEFF"}o.select(x,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 r(t){var s=o.getRng(),x,A=u.create("div",null," "),z,y=u.getViewPort(t.getWin()).h;s.insertNode(x=u.create("br"));s.setStartAfter(x);s.setEndAfter(x);o.setRng(s);if(o.getSel().focusNode==x.previousSibling){o.select(u.insertAfter(u.doc.createTextNode("\u00a0"),x));o.collapse(d)}u.insertAfter(A,x);z=u.getPos(A).y;u.remove(A);if(z>y){t.getWin().scrollTo(0,z)}}m.onKeyPress.add(function(s,t){if(t.keyCode==13&&(t.shiftKey||(p.force_br_newlines&&!u.getParent(o.getNode(),"h1,h2,h3,h4,h5,h6,ol,ul")))){r(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,x){var z,y=o.getNode(),s=t.getBody();if(s.childNodes.length===1&&y.nodeName=="P"){y=u.rename(y,p.element);o.select(y);o.collapse();t.nodeChanged()}else{if(x.keyCode==13&&!x.shiftKey&&n.lastElm!="P"){z=u.getParent(y,"p");if(z){u.rename(z,p.element);t.nodeChanged()}}}})}}},getParentBlock:function(o){var m=this.dom;return m.getParent(o,m.isBlock)},insertPara:function(Q){var E=this,v=E.editor,M=v.dom,R=v.getDoc(),V=v.settings,F=v.selection.getSel(),G=F.getRangeAt(0),U=R.body;var J,K,H,O,N,q,o,u,z,m,C,T,p,x,I,L=M.getViewPort(v.getWin()),B,D,A;v.undoManager.beforeChange();J=R.createRange();J.setStart(F.anchorNode,F.anchorOffset);J.collapse(d);K=R.createRange();K.setStart(F.focusNode,F.focusOffset);K.collapse(d);H=J.compareBoundaryPoints(J.START_TO_END,K)<0;O=H?F.anchorNode:F.focusNode;N=H?F.anchorOffset:F.focusOffset;q=H?F.focusNode:F.anchorNode;o=H?F.focusOffset:F.anchorOffset;if(O===q&&/^(TD|TH)$/.test(O.nodeName)){if(O.firstChild.nodeName=="BR"){M.remove(O.firstChild)}if(O.childNodes.length==0){v.dom.add(O,V.element,null,"
");T=v.dom.add(O,V.element,null,"
")}else{I=O.innerHTML;O.innerHTML="";v.dom.add(O,V.element,null,I);T=v.dom.add(O,V.element,null,"
")}G=R.createRange();G.selectNodeContents(T);G.collapse(1);v.selection.setRng(G);return g}if(O==U&&q==U&&U.firstChild&&v.dom.isBlock(U.firstChild)){O=q=O.firstChild;N=o=0;J=R.createRange();J.setStart(O,0);K=R.createRange();K.setStart(q,0)}O=O.nodeName=="HTML"?R.body:O;O=O.nodeName=="BODY"?O.firstChild:O;q=q.nodeName=="HTML"?R.body:q;q=q.nodeName=="BODY"?q.firstChild:q;u=E.getParentBlock(O);z=E.getParentBlock(q);m=u?u.nodeName:V.element;if(I=E.dom.getParent(u,"li,pre")){if(I.nodeName=="LI"){return e(v.selection,E.dom,I)}return d}if(u&&(u.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(M.getStyle(u,"position",1)))){m=V.element;u=null}if(z&&(z.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(M.getStyle(u,"position",1)))){m=V.element;z=null}if(/(TD|TABLE|TH|CAPTION)/.test(m)||(u&&m=="DIV"&&/left|right/gi.test(M.getStyle(u,"float",1)))){m=V.element;u=z=null}C=(u&&u.nodeName==m)?u.cloneNode(0):v.dom.create(m);T=(z&&z.nodeName==m)?z.cloneNode(0):v.dom.create(m);T.removeAttribute("id");if(/^(H[1-6])$/.test(m)&&f(G,u)){T=v.dom.create(V.element)}I=p=O;do{if(I==U||I.nodeType==9||E.dom.isBlock(I)||/(TD|TABLE|TH|CAPTION)/.test(I.nodeName)){break}p=I}while((I=I.previousSibling?I.previousSibling:I.parentNode));I=x=q;do{if(I==U||I.nodeType==9||E.dom.isBlock(I)||/(TD|TABLE|TH|CAPTION)/.test(I.nodeName)){break}x=I}while((I=I.nextSibling?I.nextSibling:I.parentNode));if(p.nodeName==m){J.setStart(p,0)}else{J.setStartBefore(p)}J.setEnd(O,N);C.appendChild(J.cloneContents()||R.createTextNode(""));try{K.setEndAfter(x)}catch(P){}K.setStart(q,o);T.appendChild(K.cloneContents()||R.createTextNode(""));G=R.createRange();if(!p.previousSibling&&p.parentNode.nodeName==m){G.setStartBefore(p.parentNode)}else{if(J.startContainer.nodeName==m&&J.startOffset==0){G.setStartBefore(J.startContainer)}else{G.setStart(J.startContainer,J.startOffset)}}if(!x.nextSibling&&x.parentNode.nodeName==m){G.setEndAfter(x.parentNode)}else{G.setEnd(K.endContainer,K.endOffset)}G.deleteContents();if(b){v.getWin().scrollTo(0,L.y)}if(C.firstChild&&C.firstChild.nodeName==m){C.innerHTML=C.firstChild.innerHTML}if(T.firstChild&&T.firstChild.nodeName==m){T.innerHTML=T.firstChild.innerHTML}function S(y,s){var r=[],X,W,t;y.innerHTML="";if(V.keep_styles){W=s;do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(W.nodeName)){X=W.cloneNode(g);M.setAttrib(X,"id","");r.push(X)}}while(W=W.parentNode)}if(r.length>0){for(t=r.length-1,X=y;t>=0;t--){X=X.appendChild(r[t])}r[0].innerHTML=b?"\u00a0":"
";return r[0]}else{y.innerHTML=b?"\u00a0":"
"}}if(M.isEmpty(C)){S(C,O)}if(M.isEmpty(T)){A=S(T,q)}if(b&&parseFloat(opera.version())<9.5){G.insertNode(C);G.insertNode(T)}else{G.insertNode(T);G.insertNode(C)}T.normalize();C.normalize();v.selection.select(T,true);v.selection.collapse(true);B=v.dom.getPos(T).y;if(BL.y+L.h){v.getWin().scrollTo(0,B1||ac==au){return ac}}}var am=V.selection.getRng();var aq=am.startContainer;var al=am.endContainer;if(aq!=al&&am.endOffset==0){var ap=an(aq,al);var ao=ap.nodeType==3?ap.length:ap.childNodes.length;am.setEnd(ap,ao)}return am}function Y(ao,au,ar,aq,am){var al=[],an=-1,at,aw=-1,ap=-1,av;O(ao.childNodes,function(ay,ax){if(ay.nodeName==="UL"||ay.nodeName==="OL"){an=ax;at=ay;return false}});O(ao.childNodes,function(ay,ax){if(ay.nodeName==="SPAN"&&c.getAttrib(ay,"data-mce-type")=="bookmark"&&ay.id==au.id+"_start"){aw=ax}if(ay.nodeName==="SPAN"&&c.getAttrib(ay,"data-mce-type")=="bookmark"&&ay.id==au.id+"_end"){ap=ax}});if(an<=0||(awan)){O(a.grep(ao.childNodes),am);return 0}else{av=ar.cloneNode(S);O(a.grep(ao.childNodes),function(ay,ax){if((awan&&ax>an)){al.push(ay);ay.parentNode.removeChild(ay)}});if(awan){ao.insertBefore(av,at.nextSibling)}}aq.push(av);O(al,function(ax){av.appendChild(ax)});return av}}function aj(am,ao){var al=[],ap,an;ap=ai.inline||ai.block;an=c.create(ap);W(an);K.walk(am,function(aq){var ar;function at(au){var ax=au.nodeName.toLowerCase(),aw=au.parentNode.nodeName.toLowerCase(),av;if(g(ax,"br")){ar=0;if(ai.block){c.remove(au)}return}if(ai.wrapper&&x(au,Z,ah)){ar=0;return}if(ai.block&&!ai.wrapper&&G(ax)){au=c.rename(au,ap);W(au);al.push(au);ar=0;return}if(ai.selector){O(ad,function(ay){if("collapsed" in ay&&ay.collapsed!==ae){return}if(c.is(au,ay.selector)&&!b(au)){W(au,ay);av=true}});if(!ai.inline||av){ar=0;return}}if(d(ap,ax)&&d(aw,ap)&&!(au.nodeType===3&&au.nodeValue.length===1&&au.nodeValue.charCodeAt(0)===65279)){if(!ar){ar=an.cloneNode(S);au.parentNode.insertBefore(ar,au);al.push(ar)}ar.appendChild(au)}else{if(ax=="li"&&ao){ar=Y(au,ao,an,al,at)}else{ar=0;O(a.grep(au.childNodes),at);ar=0}}}O(aq,at)});if(ai.wrap_links===false){O(al,function(aq){function ar(aw){var av,au,at;if(aw.nodeName==="A"){au=an.cloneNode(S);al.push(au);at=a.grep(aw.childNodes);for(av=0;av1||!F(at))&&aq===0){c.remove(at,1);return}if(ai.inline||ai.wrapper){if(!ai.exact&&aq===1){at=ar(at)}O(ad,function(av){O(c.select(av.inline,at),function(ax){var aw;if(av.wrap_links===false){aw=ax.parentNode;do{if(aw.nodeName==="A"){return}}while(aw=aw.parentNode)}U(av,ah,ax,av.exact?ax:null)})});if(x(at.parentNode,Z,ah)){c.remove(at,1);at=0;return B}if(ai.merge_with_parents){c.getParent(at.parentNode,function(av){if(x(av,Z,ah)){c.remove(at,1);at=0;return B}})}if(at){at=u(C(at),at);at=u(at,C(at,B))}}})}if(ai){if(ac){X=c.createRng();X.setStartBefore(ac);X.setEndAfter(ac);aj(o(X,ad))}else{if(!ae||!ai.inline||c.select("td.mceSelected,th.mceSelected").length){var ak=V.selection.getNode();V.selection.setRng(ab());ag=q.getBookmark();aj(o(q.getRng(B),ad),ag);if(ai.styles&&(ai.styles.color||ai.styles.textDecoration)){a.walk(ak,I,"childNodes");I(ak)}q.moveToBookmark(ag);q.setRng(aa(q.getRng(B)));V.nodeChanged()}else{Q("apply",Z,ah)}}}}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(ad,Y,ac){var aa,X=P[ad],ae=P[ad=="apply"?"remove":"apply"];function af(){return P.apply.length||P.remove.length}function ab(){P.apply=[];P.remove=[]}function ag(ah){O(P.apply.reverse(),function(ai){T(ai.name,ai.vars,ah);if(ai.name==="forecolor"&&ai.vars.value){I(ah.parentNode)}});O(P.remove.reverse(),function(ai){A(ai.name,ai.vars,ah)});c.remove(ah,1);ab()}for(aa=X.length-1;aa>=0;aa--){if(X[aa].name==Y){return}}X.push({name:Y,vars:ac});for(aa=ae.length-1;aa>=0;aa--){if(ae[aa].name==Y){ae.splice(aa,1)}}if(af()){V.getDoc().execCommand("FontName",false,"mceinline");P.lastRng=q.getRng();O(c.select("font,span"),function(ai){var ah;if(b(ai)){ah=q.getBookmark();ag(ai);q.moveToBookmark(ah);V.nodeChanged()}});if(!P.isListening&&af()){P.isListening=true;function W(ai,aj){var ah=c.createRng();ag(ai);ah.setStart(aj,aj.nodeValue.length);ah.setEnd(aj,aj.nodeValue.length);q.setRng(ah);V.nodeChanged()}var Z=false;O("onKeyDown,onKeyUp,onKeyPress,onMouseUp".split(","),function(ah){V[ah].addToTop(function(ai,al){if(al.keyCode==13&&!al.shiftKey){Z=true;return}if(af()&&!a.dom.RangeUtils.compareRanges(P.lastRng,q.getRng())){var aj=false;O(c.select("font,span"),function(ao){var ap,an;if(b(ao)){aj=true;ap=ao.firstChild;while(ap&&ap.nodeType!=3){ap=ap.firstChild}if(ap){W(ao,ap)}else{c.remove(ao)}}});if(Z&&!aj){var ak=q.getNode();var am=ak;while(am&&am.nodeType!=3){am=am.firstChild}if(am){ak=am.parentNode;while(!F(ak)){ak=ak.parentNode}W(ak,am)}}if(al.type=="keyup"||al.type=="mouseup"){ab();Z=false}}})})}}}}})(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_prototype_src.js b/include/javascript/tiny_mce/tiny_mce_prototype_src.js index 4d3eb5c2..fa56ae57 100644 --- a/include/javascript/tiny_mce/tiny_mce_prototype_src.js +++ b/include/javascript/tiny_mce/tiny_mce_prototype_src.js @@ -5,9 +5,9 @@ var tinymce = { majorVersion : '3', - minorVersion : '4.2', + minorVersion : '4.4', - releaseDate : '2011-04-07', + releaseDate : '2011-08-04', _init : function() { var t = this, d = document, na = navigator, ua = na.userAgent, i, nl, n, base, p, v; @@ -20,6 +20,12 @@ t.isIE6 = t.isIE && /MSIE [56]/.test(ua); + t.isIE7 = t.isIE && /MSIE [7]/.test(ua); + + t.isIE8 = t.isIE && /MSIE [8]/.test(ua); + + t.isIE9 = t.isIE && /MSIE [9]/.test(ua); + t.isGecko = !t.isWebKit && /Gecko/.test(ua); t.isMac = ua.indexOf('Mac') != -1; @@ -27,6 +33,8 @@ t.isAir = /adobeair/i.test(ua); t.isIDevice = /(iPad|iPhone)/.test(ua); + + t.isIOS5 = t.isIDevice && ua.match(/AppleWebKit\/(\d*)/)[1]>=534; // TinyMCE .NET webcontrol might be setting the values for TinyMCE if (win.tinyMCEPreInit) { @@ -484,6 +492,7 @@ })(window); + (function() { if (!window.Prototype) return alert("Load prototype first!"); @@ -569,7 +578,7 @@ tinymce.create('tinymce.util.Dispatcher', { tinymce.create('tinymce.util.URI', { URI : function(u, s) { - var t = this, o, a, b; + var t = this, o, a, b, base_url; // Trim whitespace u = tinymce.trim(u); @@ -588,8 +597,10 @@ tinymce.create('tinymce.util.Dispatcher', { 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); + if (!/^[\w-]*:?\/\//.test(u)) { + base_url = s.base_uri ? s.base_uri.path : new tinymce.util.URI(location.href).directory; + u = ((s.base_uri && s.base_uri.protocol) || 'http') + '://mce_host' + t.toAbsPath(base_url, 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 @@ -1051,12 +1062,47 @@ tinymce.create('static tinymce.util.XHR', { } }); }()); +(function(tinymce){ + tinymce.VK = { + DELETE:46, + BACKSPACE:8 + + } + +})(tinymce); + +(function(tinymce) { + function cleanupStylesWhenDeleting(ed) { + var dom = ed.dom, selection = ed.selection, VK= tinymce.VK; + ed.onKeyUp.add(function(ed, e) { + if (e.keyCode == VK.DELETE ||e.keyCode == VK.BACKSPACE) { + var startContainer = selection.getRng().startContainer; + var blockElement = startContainer; + while (!dom.isBlock(blockElement)) { + blockElement = blockElement.parentNode; + } + var spans = dom.select("span.Apple-style-span", blockElement); + dom.remove(spans, true); + } + }); + } + + tinymce.create('tinymce.util.Quirks', { + Quirks: function(ed) { + if (tinymce.isWebKit) { + cleanupStylesWhenDeleting(ed); + } + + } + }); +})(tinymce); + (function(tinymce) { var namedEntities, baseEntities, reverseEntities, - attrsCharsRegExp = /[&\"\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + attrsCharsRegExp = /[&<>\"\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, textCharsRegExp = /[<>&\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, rawCharsRegExp = /[<>&\"\']/g, - entityRegExp = /&(#)?([\w]+);/g, + entityRegExp = /&(#x|#)?([\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", @@ -1067,7 +1113,7 @@ tinymce.create('static tinymce.util.XHR', { // Raw entities baseEntities = { - '"' : '"', + '\"' : '"', // Needs to be escaped since the YUI compressor would otherwise break the code "'" : ''', '<' : '<', '>' : '>', @@ -1221,7 +1267,7 @@ tinymce.create('static tinymce.util.XHR', { decode : function(text) { return text.replace(entityRegExp, function(all, numeric, value) { if (numeric) { - value = parseInt(value); + value = parseInt(value, numeric.length === 2 ? 16 : 10); // Support upper UTF if (value > 0xFFFF) { @@ -1248,10 +1294,10 @@ tinymce.html.Styles = function(settings, schema) { settings = settings || {}; - encodingItems = '\\" \\\' \\; \\: ; : _'.split(' '); + encodingItems = '\\" \\\' \\; \\: ; : \uFEFF'.split(' '); for (i = 0; i < encodingItems.length; i++) { - encodingLookup[encodingItems[i]] = '_' + i; - encodingLookup['_' + i] = encodingItems[i]; + encodingLookup[encodingItems[i]] = '\uFEFF' + i; + encodingLookup['\uFEFF' + i] = encodingItems[i]; } function toHex(match, r, g, b) { @@ -1346,7 +1392,7 @@ tinymce.html.Styles = function(settings, schema) { // 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) { + str = str.replace(/\uFEFF[0-9]/g, function(str) { return encodingLookup[str]; }); } @@ -1359,7 +1405,7 @@ tinymce.html.Styles = function(settings, schema) { 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) { + css = css.replace(/\\[\"\';:\uFEFF]/g, encode).replace(/\"[^\"]+\"|\'[^\']+\'/g, function(str) { return str.replace(/[;:]/g, encode); }); @@ -1426,7 +1472,7 @@ tinymce.html.Styles = function(settings, schema) { var css = '', name, value; function serializeStyles(name) { - var styleList, i, l, name, value; + var styleList, i, l, value; styleList = schema.styles[name]; if (styleList) { @@ -1444,7 +1490,7 @@ tinymce.html.Styles = function(settings, schema) { if (element_name && schema && schema.styles) { // Serialize global styles and element specific styles serializeStyles('*'); - serializeStyles(name); + serializeStyles(element_name); } else { // Output the styles in the order they are inside the object for (name in styles) { @@ -1461,7 +1507,7 @@ tinymce.html.Styles = function(settings, schema) { }; (function(tinymce) { - var transitional = {}, boolAttrMap, blockElementsMap, shortEndedElementsMap, nonEmptyElementsMap, + var transitional = {}, boolAttrMap, blockElementsMap, shortEndedElementsMap, nonEmptyElementsMap, customElementsMap = {}, whiteSpaceElementsMap, selfClosingElementsMap, makeMap = tinymce.makeMap, each = tinymce.each; function split(str, delim) { @@ -1623,10 +1669,10 @@ tinymce.html.Styles = function(settings, schema) { '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'); + boolAttrMap = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,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'); + nonEmptyElementsMap = tinymce.extend(makeMap('td,th,iframe,video,audio,object'), shortEndedElementsMap); + whiteSpaceElementsMap = makeMap('pre,script,style,textarea'); selfClosingElementsMap = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); tinymce.html.Schema = function(settings) { @@ -1812,10 +1858,16 @@ tinymce.html.Styles = function(settings, schema) { if (custom_elements) { each(split(custom_elements), function(rule) { var matches = customElementRegExp.exec(rule), - cloneName = matches[1] === '~' ? 'span' : 'div', + inline = matches[1] === '~', + cloneName = inline ? 'span' : 'div', name = matches[2]; children[name] = children[cloneName]; + customElementsMap[name] = cloneName; + + // If it's not marked as inline then add it to valid block elements + if (!inline) + blockElementsMap[name] = {}; // Add custom elements at span/div positions each(children, function(element, child) { @@ -1854,7 +1906,24 @@ tinymce.html.Styles = function(settings, schema) { } }); } - } + }; + + function getElementRule(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; + } + }; if (!settings.valid_elements) { // No valid elements defined then clone the elements from the transitional spec @@ -1877,7 +1946,7 @@ tinymce.html.Styles = function(settings, schema) { 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) { + each(split('ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr'), function(name) { elements[name].removeEmpty = true; }); @@ -1895,6 +1964,10 @@ tinymce.html.Styles = function(settings, schema) { // Todo: Remove this when we fix list handling to be valid addValidChildren('+ol[ul|ol],+ul[ul|ol]'); + // If the user didn't allow span only allow internal spans + if (!getElementRule('span')) + addValidElements('span[!data-mce-type|*]'); + // Delete invalid elements if (settings.invalid_elements) { tinymce.each(tinymce.explode(settings.invalid_elements), function(item) { @@ -1937,21 +2010,10 @@ tinymce.html.Styles = function(settings, schema) { 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]; + self.getElementRule = getElementRule; - if (element.pattern.test(name)) - return element; - } + self.getCustomElements = function() { + return customElementsMap; }; self.addValidElements = addValidElements; @@ -1985,7 +2047,7 @@ tinymce.html.Styles = function(settings, schema) { }); self.parse = function(html) { - var self = this, matches, index = 0, value, endRegExp, stack = [], attrList, i, text, name, + var self = this, matches, index = 0, value, endRegExp, stack = [], attrList, i, text, name, isInternalElement, removeInternalElements, 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; @@ -2037,6 +2099,7 @@ tinymce.html.Styles = function(settings, schema) { selfClosing = schema.getSelfClosingElements(); fillAttrsMap = schema.getBoolAttrs(); validate = settings.validate; + removeInternalElements = settings.remove_internals; fixSelfClosing = settings.fix_self_closing; while (matches = tokenRegExp.exec(html)) { @@ -2066,6 +2129,12 @@ tinymce.html.Styles = function(settings, schema) { // Parse attributes if (attribsValue = matches[8]) { + isInternalElement = attribsValue.indexOf('data-mce-type') !== -1; // Check if the element is an internal element + + // If the element has internal attributes then remove it if we are told to do so + if (isInternalElement && removeInternalElements) + isValidElement = false; + attrList = []; attrList.map = {}; @@ -2076,7 +2145,7 @@ tinymce.html.Styles = function(settings, schema) { 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) { + if (validate && !isInternalElement && name.indexOf('data-') !== 0) { attrRule = validAttributesMap[name]; // Find rule by pattern matching @@ -2115,7 +2184,7 @@ tinymce.html.Styles = function(settings, schema) { } // Process attributes if validation is enabled - if (validate) { + if (validate && !isInternalElement) { attributesRequired = elementRule.attributesRequired; attributesDefault = elementRule.attributesDefault; attributesForced = elementRule.attributesForced; @@ -2539,6 +2608,10 @@ tinymce.html.Styles = function(settings, schema) { } return true; + }, + + walk : function(prev) { + return walk(this, null, prev); } }); @@ -2722,7 +2795,7 @@ tinymce.html.Styles = function(settings, schema) { 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; + endWhiteSpaceRegExp, allWhiteSpaceRegExp, whiteSpaceElements, children, nonEmptyElements, rootBlockName; args = args || {}; matchedNodes = {}; @@ -2731,12 +2804,35 @@ tinymce.html.Styles = function(settings, schema) { nonEmptyElements = schema.getNonEmptyElements(); children = schema.children; validate = settings.validate; + rootBlockName = "forced_root_block" in args ? args.forced_root_block : settings.forced_root_block; whiteSpaceElements = schema.getWhiteSpaceElements(); startWhiteSpaceRegExp = /^[ \t\r\n]+/; endWhiteSpaceRegExp = /[ \t\r\n]+$/; allWhiteSpaceRegExp = /[ \t\r\n]+/g; + function addRootBlocks() { + var node = rootNode.firstChild, next, rootBlockNode; + + while (node) { + next = node.next; + + if (node.type == 3 || (node.type == 1 && node.name !== 'p' && !blockElements[node.name] && !node.attr('data-mce-type'))) { + if (!rootBlockNode) { + // Create a new root block element + rootBlockNode = createNode(rootBlockName, 1); + rootNode.insert(rootBlockNode, node); + rootBlockNode.append(node); + } else + rootBlockNode.append(node); + } else { + rootBlockNode = null; + } + + node = next; + }; + }; + function createNode(name, type) { var node = new Node(name, type), list; @@ -2924,35 +3020,28 @@ tinymce.html.Styles = function(settings, schema) { } }, schema); - rootNode = node = new Node(settings.root_name, 11); + rootNode = node = new Node(args.context || 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); + // Fix invalid children or report invalid children in a contextual parsing + if (validate && invalidChildren.length) { + if (!args.context) + fixInvalidChildren(invalidChildren); + else + args.invalid = true; } - // Run attribute filters - for (i = 0, l = attributeFilters.length; i < l; i++) { - list = attributeFilters[i]; + // Wrap nodes in the root into block elements if the root is body + if (rootBlockName && rootNode.name == 'body') + addRootBlocks(); - if (list.name in matchedAttributes) { - nodes = matchedAttributes[list.name]; + // Run filters only when the contents is valid + if (!args.invalid) { + // Run node filters + for (name in matchedNodes) { + list = nodeFilters[name]; + nodes = matchedNodes[name]; // Remove already removed children fi = nodes.length; @@ -2961,8 +3050,27 @@ tinymce.html.Styles = function(settings, schema) { nodes.splice(fi, 1); } - for (fi = 0, fl = list.callbacks.length; fi < fl; fi++) - list.callbacks[fi](nodes, list.name, args); + 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); + } } } @@ -2977,6 +3085,9 @@ tinymce.html.Styles = function(settings, schema) { var i, l = nodes.length, node, blockElements = schema.getBlockElements(), nonEmptyElements = schema.getNonEmptyElements(), parent, prev, prevName; + // Remove brs from body element as well + blockElements.body = 1; + // Must loop forwards since it will otherwise remove all brs in

a


for (i = 0; i < l; i++) { node = nodes[i]; @@ -3274,7 +3385,7 @@ tinymce.html.Writer = function(settings) { }, DOMUtils : function(d, s) { - var t = this, globalStyle; + var t = this, globalStyle, name; t.doc = d; t.win = window; @@ -3305,7 +3416,7 @@ tinymce.html.Writer = function(settings) { } } - if (isIE) { + if (isIE && s.schema) { // Add missing HTML 4/5 elements to IE ('abbr article aside audio canvas ' + 'details figcaption figure footer ' + @@ -3314,6 +3425,11 @@ tinymce.html.Writer = function(settings) { 'time video').replace(/\w+/g, function(name) { d.createElement(name); }); + + // Create all custom elements + for (name in s.schema.getCustomElements()) { + d.createElement(name); + } } tinymce.addUnload(t.destroy, t); @@ -3718,12 +3834,12 @@ tinymce.html.Writer = function(settings) { }, getAttrib : function(e, n, dv) { - var v, t = this; + var v, t = this, undef; e = t.get(e); if (!e || e.nodeType !== 1) - return false; + return dv === undef ? false : dv; if (!is(dv)) dv = ''; @@ -3835,7 +3951,7 @@ tinymce.html.Writer = function(settings) { } } - return (v !== undefined && v !== null && v !== '') ? '' + v : dv; + return (v !== undef && v !== null && v !== '') ? '' + v : dv; }, getPos : function(n, ro) { @@ -3845,14 +3961,17 @@ tinymce.html.Writer = function(settings) { ro = ro || d.body; if (n) { - // Use getBoundingClientRect on IE, Opera has it but it's not perfect - if (isIE && !t.stdMode) { + // Use getBoundingClientRect if it exists since it's faster than looping offset nodes + if (n.getBoundingClientRect) { 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}; + // Add scroll offsets from documentElement or body since IE with the wrong box model will use d.body and so do WebKit + // Also remove the body/documentelement clientTop/clientLeft on IE 6, 7 since they offset the position + x = n.left + (d.documentElement.scrollLeft || d.body.scrollLeft) - e.clientTop; + y = n.top + (d.documentElement.scrollTop || d.body.scrollTop) - e.clientLeft; + + return {x : x, y : y}; } r = n; @@ -4326,12 +4445,12 @@ tinymce.html.Writer = function(settings) { if (elements && elements[node.nodeName.toLowerCase()]) return false; - // Keep elements with data attributes or name attribute like + // Keep elements with data-bookmark 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) + if (name === "name" || name === 'data-mce-bookmark') return false; } } @@ -4365,7 +4484,7 @@ tinymce.html.Writer = function(settings) { }, nodeIndex : function(node, normalized) { - var idx = 0, lastNodeType, lastNode, nodeType, nodeValueExists; + var idx = 0, lastNodeType, lastNode, nodeType; if (node) { for (lastNodeType = node.nodeType, node = node.previousSibling, lastNode = node; node; node = node.previousSibling) { @@ -4373,11 +4492,7 @@ tinymce.html.Writer = function(settings) { // 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) + if (nodeType == lastNodeType || !node.nodeValue.length) continue; } idx++; @@ -5220,11 +5335,97 @@ tinymce.html.Writer = function(settings) { (function() { function Selection(selection) { - var t = this, invisibleChar = '\uFEFF', range, lastIERng, dom = selection.dom, TRUE = true, FALSE = false; + var self = this, dom = selection.dom, TRUE = true, FALSE = false; + + function getPosition(rng, start) { + var checkRng, startIndex = 0, endIndex, inside, + children, child, offset, index, position = -1, parent; + + // Setup test range, collapse it and get the parent + checkRng = rng.duplicate(); + checkRng.collapse(start); + parent = checkRng.parentElement(); + + // Check if the selection is within the right document + if (parent.ownerDocument !== selection.dom.doc) + return; + + // IE will report non editable elements as it's parent so look for an editable one + while (parent.contentEditable === "false") { + parent = parent.parentNode; + } + + // If parent doesn't have any children then return that we are inside the element + if (!parent.hasChildNodes()) { + return {node : parent, inside : 1}; + } + + // Setup node list and endIndex + children = parent.children; + endIndex = children.length - 1; + + // Perform a binary search for the position + while (startIndex <= endIndex) { + index = Math.floor((startIndex + endIndex) / 2); + + // Move selection to node and compare the ranges + child = children[index]; + checkRng.moveToElementText(child); + position = checkRng.compareEndPoints(start ? 'StartToStart' : 'EndToEnd', rng); + + // Before/after or an exact match + if (position > 0) { + endIndex = index - 1; + } else if (position < 0) { + startIndex = index + 1; + } else { + return {node : child}; + } + } + + // Check if child position is before or we didn't find a position + if (position < 0) { + // No element child was found use the parent element and the offset inside that + if (!child) { + checkRng.moveToElementText(parent); + checkRng.collapse(true); + child = parent; + inside = true; + } else + checkRng.collapse(false); + + checkRng.setEndPoint(start ? 'EndToStart' : 'EndToEnd', rng); + + // Fix for edge case:
..
ab|c
+ if (checkRng.compareEndPoints(start ? 'StartToStart' : 'StartToEnd', rng) > 0) { + checkRng = rng.duplicate(); + checkRng.collapse(start); + + offset = -1; + while (parent == checkRng.parentElement()) { + if (checkRng.move('character', -1) == 0) + break; + + offset++; + } + } + + offset = offset || checkRng.text.replace('\r\n', ' ').length; + } else { + // Child position is after the selection endpoint + checkRng.collapse(true); + checkRng.setEndPoint(start ? 'StartToStart' : 'StartToEnd', rng); + + // Get the length of the text to find where the endpoint is relative to it's container + offset = checkRng.text.replace('\r\n', ' ').length; + } + + return {node : child, position : position, offset : offset, inside : inside}; + }; // Returns a W3C DOM compatible range object by using the IE Range API function getRange() { - var ieRange = selection.getRng(), domRange = dom.createRng(), element, collapsed; + var ieRange = selection.getRng(), domRange = dom.createRng(), element, collapsed, tmpRange, element2, bookmark, fail; // If selection is outside the current document just return an empty range element = ieRange.item ? ieRange.item(0) : ieRange.parentElement(); @@ -5233,111 +5434,258 @@ tinymce.html.Writer = function(settings) { 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); - } + // Handle control selection + if (ieRange.item) { + 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); + var endPoint = getPosition(ieRange, start), container, offset, textNodeOffset = 0, sibling, undef, nodeValue; - // Create marker and insert it at the end of the endpoints parent - marker = dom.create('a'); - parent = checkRng.parentElement(); + container = endPoint.node; + offset = endPoint.offset; - // 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); + if (endPoint.inside && !container.hasChildNodes()) { + domRange[start ? 'setStart' : 'setEnd'](container, 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); + if (offset === undef) { + domRange[start ? 'setStartBefore' : 'setEndAfter'](container); 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; + if (endPoint.position < 0) { + sibling = endPoint.inside ? container.firstChild : container.nextSibling; + + if (!sibling) { + domRange[start ? 'setStartAfter' : 'setEndAfter'](container); + return; } - } - // Setup container - container = position > 0 || index == 0 ? marker.nextSibling : marker.previousSibling; + if (!offset) { + if (sibling.nodeType == 3) + domRange[start ? 'setStart' : 'setEnd'](sibling, 0); + else + domRange[start ? 'setStartBefore' : 'setEndBefore'](sibling); - // Handle element selection - if (container.nodeType == 1) { - dom.remove(marker); + return; + } - // Find offset and container - offset = dom.nodeIndex(container); - container = container.parentNode; + // Find the text node and offset + while (sibling) { + nodeValue = sibling.nodeValue; + textNodeOffset += nodeValue.length; - // Move the offset if we are setting the end or the position is after an element - if (!start || index > 0) - offset++; + // We are at or passed the position we where looking for + if (textNodeOffset >= offset) { + container = sibling; + textNodeOffset -= offset; + textNodeOffset = nodeValue.length - textNodeOffset; + break; + } + + sibling = sibling.nextSibling; + } } 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; + // Find the text node and offset + sibling = container.previousSibling; + + if (!sibling) + return domRange[start ? 'setStartBefore' : 'setEndBefore'](container); + + // If there isn't any text to loop then use the first position + if (!offset) { + if (container.nodeType == 3) + domRange[start ? 'setStart' : 'setEnd'](sibling, container.nodeValue.length); + else + domRange[start ? 'setStartAfter' : 'setEndAfter'](sibling); + + return; } - dom.remove(marker); + while (sibling) { + textNodeOffset += sibling.nodeValue.length; + + // We are at or passed the position we where looking for + if (textNodeOffset >= offset) { + container = sibling; + textNodeOffset -= offset; + break; + } + + sibling = sibling.previousSibling; + } } - domRange[start ? 'setStart' : 'setEnd'](container, offset); + domRange[start ? 'setStart' : 'setEnd'](container, textNodeOffset); }; - // Find start point - findEndPoint(true); + try { + // Find start point + findEndPoint(true); + + // Find end point if needed + if (!collapsed) + findEndPoint(); + } catch (ex) { + // IE has a nasty bug where text nodes might throw "invalid argument" when you + // access the nodeValue or other properties of text nodes. This seems to happend when + // text nodes are split into two nodes by a delete/backspace call. So lets detect it and try to fix it. + if (ex.number == -2147024809) { + // Get the current selection + bookmark = self.getBookmark(2); + + // Get start element + tmpRange = ieRange.duplicate(); + tmpRange.collapse(true); + element = tmpRange.parentElement(); + + // Get end element + if (!collapsed) { + tmpRange = ieRange.duplicate(); + tmpRange.collapse(false); + element2 = tmpRange.parentElement(); + element2.innerHTML = element2.innerHTML; + } + + // Remove the broken elements + element.innerHTML = element.innerHTML; + + // Restore the selection + self.moveToBookmark(bookmark); - // Find end point if needed - if (!collapsed) - findEndPoint(); + // Since the range has moved we need to re-get it + ieRange = selection.getRng(); + + // Find start point + findEndPoint(true); + + // Find end point if needed + if (!collapsed) + findEndPoint(); + } else + throw ex; // Throw other errors + } return domRange; }; + this.getBookmark = function(type) { + var rng = selection.getRng(), start, end, bookmark = {}; + + function getIndexes(node) { + var node, parent, root, children, i, indexes = []; + + parent = node.parentNode; + root = dom.getRoot().parentNode; + + while (parent != root) { + children = parent.children; + + i = children.length; + while (i--) { + if (node === children[i]) { + indexes.push(i); + break; + } + } + + node = parent; + parent = parent.parentNode; + } + + return indexes; + }; + + function getBookmarkEndPoint(start) { + var position; + + position = getPosition(rng, start); + if (position) { + return { + position : position.position, + offset : position.offset, + indexes : getIndexes(position.node), + inside : position.inside + }; + } + }; + + // Non ubstructive bookmark + if (type === 2) { + // Handle text selection + if (!rng.item) { + bookmark.start = getBookmarkEndPoint(true); + + if (!selection.isCollapsed()) + bookmark.end = getBookmarkEndPoint(); + } else + bookmark.start = {ctrl : true, indexes : getIndexes(rng.item(0))}; + } + + return bookmark; + }; + + this.moveToBookmark = function(bookmark) { + var rng, body = dom.doc.body; + + function resolveIndexes(indexes) { + var node, i, idx, children; + + node = dom.getRoot(); + for (i = indexes.length - 1; i >= 0; i--) { + children = node.children; + idx = indexes[i]; + + if (idx <= children.length - 1) { + node = children[idx]; + } + } + + return node; + }; + + function setBookmarkEndPoint(start) { + var endPoint = bookmark[start ? 'start' : 'end'], moveLeft, moveRng, undef; + + if (endPoint) { + moveLeft = endPoint.position > 0; + + moveRng = body.createTextRange(); + moveRng.moveToElementText(resolveIndexes(endPoint.indexes)); + + offset = endPoint.offset; + if (offset !== undef) { + moveRng.collapse(endPoint.inside || moveLeft); + moveRng.moveStart('character', moveLeft ? -offset : offset); + } else + moveRng.collapse(start); + + rng.setEndPoint(start ? 'StartToStart' : 'EndToStart', moveRng); + + if (start) + rng.collapse(true); + } + }; + + if (bookmark.start) { + if (bookmark.start.ctrl) { + rng = body.createControlRange(); + rng.addElement(resolveIndexes(bookmark.start.indexes)); + rng.select(); + } else { + rng = body.createTextRange(); + setBookmarkEndPoint(true); + setBookmarkEndPoint(); + rng.select(); + } + } + }; + this.addRange = function(rng) { var ieRng, ctrlRng, startContainer, startOffset, endContainer, endOffset, doc = selection.dom.doc, body = doc.body; @@ -5373,7 +5721,7 @@ tinymce.html.Writer = function(settings) { tmpRng.moveToElementText(marker); } else { // Empty node selection for example
|
- marker = doc.createTextNode(invisibleChar); + marker = doc.createTextNode('\uFEFF'); container.appendChild(marker); tmpRng.moveToElementText(marker.parentNode); tmpRng.collapse(TRUE); @@ -5384,9 +5732,6 @@ tinymce.html.Writer = function(settings) { } } - // Destroy cached range - this.destroy(); - // Setup some shorter versions startContainer = rng.startContainer; startOffset = rng.startOffset; @@ -5416,33 +5761,8 @@ tinymce.html.Writer = function(settings) { 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 range method + this.getRangeAt = getRange; }; // Expose the selection object @@ -6761,7 +7081,7 @@ window.tinymce.dom.Sizzle = Sizzle; return; try { - // If IE is used, use the trick by Diego Perini + // If IE is used, use the trick by Diego Perini licensed under MIT by request to the author. // http://javascript.nwbox.com/IEContentLoaded/ doc.documentElement.doScroll("left"); } catch (ex) { @@ -6953,6 +7273,13 @@ window.tinymce.dom.Sizzle = Sizzle; tinymce.addUnload(t.destroy, t); }, + setCursorLocation: function(node, offset) { + var t = this; var r = t.dom.createRng(); + r.setStart(node, offset); + r.setEnd(node, offset); + t.setRng(r); + t.collapse(false); + }, getContent : function(s) { var t = this, r = t.getRng(), e = t.dom.create("body"), se = t.getSel(), wb, wa, n; @@ -6960,6 +7287,7 @@ window.tinymce.dom.Sizzle = Sizzle; wb = wa = ''; s.get = true; s.format = s.format || 'html'; + s.forced_root_block = ''; t.onBeforeGetContent.dispatch(t, s); if (s.format == 'text') @@ -7044,7 +7372,12 @@ window.tinymce.dom.Sizzle = Sizzle; // Remove the caret position self.dom.remove('__caret'); - self.setRng(rng); + + try { + self.setRng(rng); + } catch (ex) { + // Might fail on Opera for some odd reason + } } else { if (rng.item) { // Delete content and get caret text selection @@ -7180,6 +7513,9 @@ window.tinymce.dom.Sizzle = Sizzle; return bookmark; }; + if (t.tridentSel) + return t.tridentSel.getBookmark(type); + return getLocation(); } @@ -7252,10 +7588,6 @@ window.tinymce.dom.Sizzle = Sizzle; 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(); @@ -7295,6 +7627,9 @@ window.tinymce.dom.Sizzle = Sizzle; return true; }; + if (t.tridentSel) + return t.tridentSel.moveToBookmark(bookmark); + if (setEndPoint(true) && setEndPoint()) { t.setRng(rng); } @@ -7630,27 +7965,94 @@ window.tinymce.dom.Sizzle = Sizzle; return bl; }, - destroy : function(s) { - var t = this; + normalize : function() { + var self = this, rng, normalized; - t.win = null; + // Normalize only on non IE browsers for now + if (tinymce.isIE) + return; - if (t.tridentSel) - t.tridentSel.destroy(); + function normalizeEndPoint(start) { + var container, offset, walker, dom = self.dom, body = dom.getRoot(), node; - // Manual destroy then remove unload handler - if (!s) - tinymce.removeUnload(t.destroy); - }, + container = rng[(start ? 'start' : 'end') + 'Container']; + offset = rng[(start ? 'start' : 'end') + 'Offset']; - // 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; + // If the container is a document move it to the body element + if (container.nodeType === 9) { + container = container.body; + offset = 0; + } - // Make HTML element unselectable since we are going to handle selection by hand - doc.documentElement.unselectable = true; + // If the container is body try move it into the closest text node or position + // TODO: Add more logic here to handle element selection cases + if (container === body) { + // Resolve the index + if (container.hasChildNodes()) { + container = container.childNodes[Math.min(!start && offset > 0 ? offset - 1 : offset, container.childNodes.length - 1)]; + offset = 0; - // Return range from point or null if it failed + // Walk the DOM to find a text node to place the caret at or a BR + node = container; + walker = new tinymce.dom.TreeWalker(container, body); + do { + // Found a text node use that position + if (node.nodeType === 3) { + offset = start ? 0 : node.nodeValue.length - 1; + container = node; + break; + } + + // Found a BR element that we can place the caret before + if (node.nodeName === 'BR') { + offset = dom.nodeIndex(node); + container = node.parentNode; + break; + } + } while (node = (start ? walker.next() : walker.prev())); + + normalized = true; + } + } + + // Set endpoint if it was normalized + if (normalized) + rng['set' + (start ? 'Start' : 'End')](container, offset); + }; + + rng = self.getRng(); + + // Normalize the end points + normalizeEndPoint(true); + + if (rng.collapsed) + normalizeEndPoint(); + + // Set the selection if it was normalized + if (normalized) { + //console.log(self.dom.dumpRng(rng)); + self.setRng(rng); + } + }, + + destroy : function(s) { + var t = this; + + t.win = null; + + // 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(); @@ -9185,8 +9587,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { l = DOM.encode(s.label || ''); h = ''; - - if (s.image) + if (s.image && !(this.editor &&this.editor.forcedHighContrastMode) ) h += '' + DOM.encode(s.title) + '' + l; else h += '' + (l ? '' + l + '' : ''); @@ -9313,7 +9714,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { }, showMenu : function() { - var t = this, p1, p2, e = DOM.get(this.id), m; + var t = this, p2, e = DOM.get(this.id), m; if (t.isDisabled() || t.items.length == 0) return; @@ -9326,7 +9727,6 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { t.isMenuRendered = true; } - p1 = DOM.getPos(this.settings.menu_container); p2 = DOM.getPos(e); m = t.menu; @@ -10124,7 +10524,19 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, get : function(n) { - return this.lookup[n]; + if (this.lookup[n]) { + return this.lookup[n].instance; + } else { + return undefined; + } + }, + + dependencies : function(n) { + var result; + if (this.lookup[n]) { + result = this.lookup[n].dependencies; + } + return result || []; }, requireLangPack : function(n) { @@ -10134,27 +10546,61 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { tinymce.ScriptLoader.add(this.urls[n] + '/langs/' + s.language + '.js'); }, - add : function(id, o) { + add : function(id, o, dependencies) { this.items.push(o); - this.lookup[id] = o; + this.lookup[id] = {instance:o, dependencies:dependencies}; this.onAdd.dispatch(this, id, o); return o; }, + createUrl: function(baseUrl, dep) { + if (typeof dep === "object") { + return dep + } else { + return {prefix: baseUrl.prefix, resource: dep, suffix: baseUrl.suffix}; + } + }, + + addComponents: function(pluginName, scripts) { + var pluginUrl = this.urls[pluginName]; + tinymce.each(scripts, function(script){ + tinymce.ScriptLoader.add(pluginUrl+"/"+script); + }); + }, load : function(n, u, cb, s) { - var t = this; + var t = this, url = u; + + function loadDependencies() { + var dependencies = t.dependencies(n); + tinymce.each(dependencies, function(dep) { + var newUrl = t.createUrl(u, dep); + t.load(newUrl.resource, newUrl, undefined, undefined); + }); + if (cb) { + if (s) { + cb.call(s); + } else { + cb.call(tinymce.ScriptLoader); + } + } + } if (t.urls[n]) return; + if (typeof u === "object") + url = u.prefix + u.resource + u.suffix; - if (u.indexOf('/') != 0 && u.indexOf('://') == -1) - u = tinymce.baseURL + '/' + u; + if (url.indexOf('/') != 0 && url.indexOf('://') == -1) + url = tinymce.baseURL + '/' + url; - t.urls[n] = u.substring(0, u.lastIndexOf('/')); + t.urls[n] = url.substring(0, url.lastIndexOf('/')); - if (!t.lookup[n]) - tinymce.ScriptLoader.add(u, cb, s); + if (t.lookup[n]) { + loadDependencies(); + } else { + tinymce.ScriptLoader.add(url, loadDependencies, s); + } } }); @@ -10660,10 +11106,10 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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) + // Is a iPad/iPhone and not on iOS5, 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 && !tinymce.isIOS5) return; // Add hidden input for non input elements inside form elements @@ -10735,12 +11181,23 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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'); + if (p &&!PluginManager.urls[p]) { + if (p.charAt(0) == '-') { + p = p.substr(1, p.length); + var dependencies = PluginManager.dependencies(p); + each(dependencies, function(dep) { + var defaultSettings = {prefix:'plugins/', resource: dep, suffix:'/editor_plugin' + tinymce.suffix + '.js'}; + var dep = PluginManager.createUrl(defaultSettings, dep); + PluginManager.load(dep.resource, dep); + + }); + } else { + // Skip safari plugin, since it is removed as of 3.3b1 + if (p == 'safari') { + return; + } + PluginManager.load(p, {prefix:'plugins/', resource: p, suffix:'/editor_plugin' + tinymce.suffix + '.js'}); + } } }); @@ -10755,7 +11212,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, init : function() { - var n, t = this, s = t.settings, w, h, e = t.getElement(), o, ti, u, bi, bc, re, i; + var n, t = this, s = t.settings, w, h, e = t.getElement(), o, ti, u, bi, bc, re, i, initializedPlugins = []; tinymce.add(t); @@ -10769,20 +11226,25 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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) { + function initPlugin(p) { var c = PluginManager.get(p), u = PluginManager.urls[p] || tinymce.documentBaseURL.replace(/\/$/, ''), po; - - if (c) { + if (c && tinymce.inArray(initializedPlugins,p) === -1) { + each(PluginManager.dependencies(p), function(dep){ + initPlugin(dep); + }); po = new c(t, u); t.plugins[p] = po; - if (po.init) + if (po.init) { po.init(t, u); + initializedPlugins.push(p); + } } - }); + } + + // Create all plugins + each(explode(s.plugins.replace(/\-/g, '')), initPlugin); // Setup popup CSS path(s) if (s.popup_css !== false) { @@ -10925,7 +11387,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { n = DOM.add(o.iframeContainer, 'iframe', { id : t.id + "_ifr", src : u || 'javascript:""', // Workaround for HTTPS warning in IE6/7 - frameBorder : '0', + frameBorder : '0', + allowTransparency : "true", title : s.aria_label, style : { width : '100%', @@ -10944,41 +11407,72 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { e = n = o = null; // Cleanup }, - setupIframe : function() { + setupIframe : function(filled) { var t = this, s = t.settings, e = DOM.get(t.id), d = t.getDoc(), h, b; // Setup iframe body - if (!isIE || !tinymce.relaxedDomain) { + if ((!isIE || !tinymce.relaxedDomain) && !filled) { + // We need to wait for the load event on Gecko + if (isGecko && !s.readonly) { + t.getWin().addEventListener("DOMContentLoaded", function() { + window.setTimeout(function() { + var b = t.getBody(), undef; + + // Editable element needs to have some contents or backspace/delete won't work properly for some odd reason on FF 3.6 or older + b.innerHTML = '
'; + + // Check if Gecko supports contentEditable mode FF2 doesn't + if (b.contentEditable !== undef) { + // Setting the contentEditable off/on seems to force caret mode in the editor and enabled auto focus + b.contentEditable = false; + b.contentEditable = true; + + // Caret doesn't get rendered when you mousedown on the HTML element on FF 3.x + t.onMouseDown.add(function(ed, e) { + if (e.target.nodeName === "HTML") { + // Setting the contentEditable off/on seems to force caret mode in the editor and enabled auto focus + b.contentEditable = false; + b.contentEditable = true; + + d.designMode = 'on'; // Render the caret + + // Remove design mode again after a while so it has some time to execute + window.setTimeout(function() { + d.designMode = 'off'; + t.getBody().focus(); + }, 1); + } + }); + } else + d.designMode = 'on'; + + // Call setup frame once the contentEditable/designMode has been initialized + // since the caret won't be rendered some times otherwise. + t.setupIframe(true); + }, 1); + }, false); + } + 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 - } + // Wait for iframe onload event on Gecko + if (isGecko && !s.readonly) + return; } - // 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); + // It will not steal focus while setting contentEditable + b = t.getBody(); + b.disabled = true; - if (!s.readonly) - b.contentEditable = true; + if (!isGecko && !s.readonly) + b.contentEditable = true; - DOM.show(b); - } + b.disabled = false; t.schema = new tinymce.html.Schema(s); @@ -10995,38 +11489,44 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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); + // Force anchor names closed, unless the setting "allow_html_in_named_anchor" is explicitly included. + if (!t.settings.allow_html_in_named_anchor) { + 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; + var i = nodes.length, node, dom = t.dom, value, internalName; while (i--) { node = nodes[i]; value = node.attr(name); + internalName = 'data-mce-' + 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)); + // Add internal attribute if we need to we don't on a refresh of the document + if (!node.attributes.map[internalName]) { + if (name === "style") + node.attr(internalName, dom.serializeStyle(dom.parseStyle(value), node.name)); + else + node.attr(internalName, t.convertURL(value, name, node.name)); + } } }); @@ -11176,6 +11676,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { t.controlManager.onPostRender.dispatch(t, t.controlManager); t.onPostRender.dispatch(t); + t.quirks = new tinymce.util.Quirks(this); + if (s.directionality) t.getBody().dir = s.directionality; @@ -11325,71 +11827,61 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }); 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.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}); - 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); + }); - // 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); - // 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.getBody().focus(); + ed.getWin().focus(); + }, 100); + } - 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(); + var oed, t = this, selection = t.selection, ce = t.settings.content_editable, ieRng, controlElm, doc = t.getDoc(); if (!sf) { // Get selected control element - ieRng = t.selection.getRng(); + ieRng = selection.getRng(); if (ieRng.item) { controlElm = ieRng.item(0); } + selection.normalize(); + // Is not content editable if (!ce) t.getWin().focus(); + // Focus the body as well since it's contentEditable + if (tinymce.isGecko) { + t.getBody().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 @@ -11783,7 +12275,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, setContent : function(content, args) { - var self = this, rootNode, body = self.getBody(); + var self = this, rootNode, body = self.getBody(), forcedRootBlockName; // Setup args object args = args || {}; @@ -11800,7 +12292,15 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // 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 = '
'; + forcedRootBlockName = self.settings.forced_root_block; + if (forcedRootBlockName) + content = '<' + forcedRootBlockName + '>
'; + else + content = '
'; + + body.innerHTML = content; + self.selection.select(body, true); + self.selection.collapse(true); return; } @@ -11819,6 +12319,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (!args.no_events) self.onSetContent.dispatch(self, args); + self.selection.normalize(); + return args.content; }, @@ -12107,8 +12609,10 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (isGecko && !s.readonly) { if (t._isHidden()) { try { - if (!s.content_editable) - d.designMode = 'On'; + if (!s.content_editable) { + d.body.contentEditable = false; + d.body.contentEditable = true; + } } catch (ex) { // Fails if it's hidden } @@ -12135,20 +12639,20 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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; + 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(); - } - }); - } + // Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250 + // WebKit can't even do simple things like selecting an image + // Needs tobe the setBaseAndExtend or it will fail to select floated images + if (tinymce.isWebKit && e.nodeName == 'IMG') + t.selection.getSel().setBaseAndExtent(e, 0, e, 1); + + if (e.nodeName == 'A' && dom.hasClass(e, 'mceItemAnchor')) + t.selection.select(e); + + t.nodeChanged(); + }); // Add node change handlers t.onMouseUp.add(t.nodeChanged); @@ -12160,6 +12664,35 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { t.nodeChanged(); }); + + // Add block quote deletion handler + t.onKeyDown.add(function(ed, e) { + // Was the BACKSPACE key pressed? + if (e.keyCode != 8) + return; + + var n = ed.selection.getRng().startContainer; + var offset = ed.selection.getRng().startOffset; + + while (n && n.nodeType && n.nodeType != 1 && n.parentNode) + n = n.parentNode; + + // Is the cursor at the beginning of a blockquote? + if (n && n.parentNode && n.parentNode.tagName === 'BLOCKQUOTE' && n.parentNode.firstChild == n && offset == 0) { + // Remove the blockquote + ed.formatter.toggle('blockquote', null, n.parentNode); + + // Move the caret to the beginning of n + var rng = ed.selection.getRng(); + rng.setStart(n, 0); + rng.setEnd(n, 0); + ed.selection.setRng(rng); + ed.selection.collapse(false); + } + }); + + + // Add reset handler t.onReset.add(function() { t.setContent(t.startContent, {format : 'raw'}); @@ -12181,9 +12714,9 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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, '
']); + t.addShortcut('ctrl+7', '', ['FormatBlock', false, 'p']); + t.addShortcut('ctrl+8', '', ['FormatBlock', false, 'div']); + t.addShortcut('ctrl+9', '', ['FormatBlock', false, 'address']); function find(e) { var v = null; @@ -12279,21 +12812,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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) { @@ -12320,69 +12838,25 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }); 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); - } - } + var keyCode = e.keyCode; - if ((e.keyCode >= 33 && e.keyCode <= 36) || (e.keyCode >= 37 && e.keyCode <= 40) || e.keyCode == 13 || e.keyCode == 45 || e.ctrlKey) + if ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode == 13 || 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(); - } + var keyCode = e.keyCode, sel; - // 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(); + if (keyCode == 8) { + sel = t.getDoc().selection; - 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); - } + // Fix IE control + backspace browser bug + if (sel && sel.createRange && sel.createRange().item) { + t.undoManager.beforeChange(); + ed.dom.remove(sel.createRange().item(0)); + addUndo(); - // Block the default delete behavior since it might be broken - e.preventDefault(); - return; + return Event.cancel(e); } } @@ -12402,8 +12876,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // 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.undoManager.add(); } }); @@ -12412,7 +12886,22 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { addUndo(); }); } - + + // Fire a nodeChanged when the selection is changed on WebKit this fixes selection issues on iOS5 + // It only fires the nodeChange event every 50ms since it would other wise update the UI when you type and it hogs the CPU + if (tinymce.isWebKit) { + dom.bind(t.getDoc(), 'selectionchange', function() { + if (t.selectionTimer) { + window.clearTimeout(t.selectionTimer); + t.selectionTimer = 0; + } + + t.selectionTimer = window.setTimeout(function() { + t.nodeChanged(); + }, 50); + }); + } + // Bug fix for FireFox keeping styles from end of selection instead of start. if (tinymce.isGecko) { function getAttributeApplyFunction() { @@ -12420,10 +12909,14 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { return function() { var target = t.selection.getStart(); - t.dom.removeAllAttribs(target); - each(template, function(attr) { - target.setAttributeNode(attr.cloneNode(true)); - }); + + if (target !== t.getBody()) { + t.dom.removeAllAttribs(target); + + each(template, function(attr) { + target.setAttributeNode(attr.cloneNode(true)); + }); + } }; } @@ -12715,22 +13208,15 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, 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; + var parser, serializer, parentNode, rootNode, fragment, args, + marker, nodeRect, viewPortRect, rng, node, node2, bookmarkHtml, viewportBodyElement; - if (next) - walker.next(); - else - walker.prev(); - } - }; + // Setup parser and serializer + parser = editor.parser; + serializer = new tinymce.html.Serializer({}, editor.schema); + bookmarkHtml = '\uFEFF'; + // Run beforeSetContent handlers on the HTML to be inserted args = {content: value, format: 'html'}; selection.onBeforeSetContent.dispatch(selection, args); value = args.content; @@ -12739,89 +13225,114 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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')); + // Replace the caret marker with a span bookmark element + value = value.replace(/\{\$caret\}/, bookmarkHtml); - caretNode = dom.select('#__mce')[0]; - rootNode = dom.getRoot(); + // Insert node maker where we will insert the new HTML and get it's parent + if (!selection.isCollapsed()) + editor.getDoc().execCommand('Delete', false, null); - // 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); - } - } + parentNode = selection.getNode(); - // 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)) - ) - ); + // Parse the fragment within the context of the parent node + args = {context : parentNode.nodeName.toLowerCase()}; + fragment = parser.parse(value, args); - break; - } + // Move the caret to a more suitable location + node = fragment.lastChild; + if (node.attr('id') == 'mce_marker') { + marker = node; - parent = caretNode; - caretNode = caretNode.parentNode; + for (node = node.prev; node; node = node.walk(true)) { + if (node.type == 3 || !dom.isBlock(node.name)) { + node.parent.insert(marker, node, node.name === 'br'); + break; + } + } } - // 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 parser says valid we can insert the contents into that parent + if (!args.invalid) { + value = serializer.serialize(fragment); - if (node) { - rng = dom.createRng(); + // Check if parent is empty or only has one BR element then set the innerHTML of that parent + node = parentNode.firstChild; + node2 = parentNode.lastChild; + if (!node || (node === node2 && node.nodeName === 'BR')) + dom.setHTML(parentNode, value); + else + selection.setContent(value); + } else { + // If the fragment was invalid within that context then we need + // to parse and process the parent it's inserted into - 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); - } - } + // Insert bookmark node and get the parent + selection.setContent(bookmarkHtml); + parentNode = editor.selection.getNode(); + rootNode = editor.getBody(); - selection.setRng(rng); + // Opera will return the document node when selection is in root + if (parentNode.nodeType == 9) + parentNode = node = rootNode; + else + node = parentNode; + + // Find the ancestor just before the root element + while (node !== rootNode) { + parentNode = node; + node = node.parentNode; + } + + // Get the outer/inner HTML depending on if we are in the root and parser and serialize that + value = parentNode == rootNode ? rootNode.innerHTML : dom.getOuterHTML(parentNode); + value = serializer.serialize( + parser.parse( + // Need to replace by using a function since $ in the contents would otherwise be a problem + value.replace(//i, function() { + return serializer.serialize(fragment); + }) + ) + ); + + // Set the inner/outer HTML depending on if we are in the root or not + if (parentNode == rootNode) + dom.setHTML(rootNode, value); + else + dom.setOuterHTML(parentNode, value); + } - // 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; - } + marker = dom.get('mce_marker'); - dom.remove(node); - } + // Scroll range into view scrollIntoView on element can't be used since it will scroll the main view port as well + nodeRect = dom.getRect(marker); + viewPortRect = dom.getViewPort(editor.getWin()); - // 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); - } + // Check if node is out side the viewport if it is then scroll to it + if ((nodeRect.y + nodeRect.h > viewPortRect.y + viewPortRect.h || nodeRect.y < viewPortRect.y) || + (nodeRect.x > viewPortRect.x + viewPortRect.w || nodeRect.x < viewPortRect.x)) { + viewportBodyElement = tinymce.isIE ? editor.getDoc().documentElement : editor.getBody(); + viewportBodyElement.scrollLeft = nodeRect.x; + viewportBodyElement.scrollTop = nodeRect.y - viewPortRect.h + 25; } + // Move selection before marker and remove it + rng = dom.createRng(); + + // If previous sibling is a text node set the selection to the end of that node + node = marker.previousSibling; + if (node && node.nodeType == 3) { + rng.setStart(node, node.nodeValue.length); + } else { + // If the previous sibling isn't a text node or doesn't exist set the selection before the marker node + rng.setStartBefore(marker); + rng.setEndBefore(marker); + } + + // Remove the marker node and set the new range + dom.remove(marker); + selection.setRng(rng); + + // Dispatch after event and add any visual elements needed selection.onSetContent.dispatch(selection, args); editor.addVisual(); }, @@ -12891,7 +13402,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, mceInsertLink : function(command, ui, value) { - var link = dom.getParent(selection.getNode(), 'a'), img, floatVal; + var link = dom.getParent(selection.getNode(), 'a'), img, style, cls; if (tinymce.is(value, 'string')) value = {href : value}; @@ -12900,21 +13411,26 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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 + // WebKit can't create links on floated images for some odd reason + // So, just remove styles and restore it later if (tinymce.isWebKit) { img = dom.getParent(selection.getNode(), 'img'); if (img) { - floatVal = img.style.cssFloat; - img.style.cssFloat = null; + style = img.style.cssText; + cls = img.className; + img.style.cssText = null; + img.className = null; } } execNativeCommand('CreateLink', FALSE, 'javascript:mctmp(0);'); - // Restore float value - if (floatVal) - img.style.cssFloat = floatVal; + // Restore styles + if (style) + img.style.cssText = style; + if (cls) + img.className = cls; each(dom.select("a[href='javascript:mctmp(0);']"), function(link) { dom.setAttribs(link, value); @@ -13006,7 +13522,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { var Dispatcher = tinymce.util.Dispatcher; tinymce.UndoManager = function(editor) { - var self, index = 0, data = []; + var self, index = 0, data = [], beforeBookmark; function getContent() { return tinymce.trim(editor.getContent({format : 'raw', no_events : 1})); @@ -13022,9 +13538,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { onRedo : new Dispatcher(self), beforeChange : function() { - // Set before bookmark on previous level - if (data[index]) - data[index].beforeBookmark = editor.selection.getBookmark(2, true); + beforeBookmark = editor.selection.getBookmark(2, true); }, add : function(level) { @@ -13038,6 +13552,10 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (lastLevel && lastLevel.content == level.content) return null; + // Set before bookmark on previous level + if (data[index]) + data[index].beforeBookmark = beforeBookmark; + // Time to compress if (settings.custom_undo_redo_levels) { if (data.length > settings.custom_undo_redo_levels) { @@ -13189,28 +13707,94 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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; + var t = this, ed = t.editor, s = ed.settings, dom = ed.dom, selection = ed.selection, blockElements = ed.schema.getBlockElements(); - // Force root blocks when typing and when getting output + // Force root blocks if (s.forced_root_block) { - ed.onBeforeExecCommand.add(t.forceRoots, t); - ed.onKeyUp.add(t.forceRoots, t); - ed.onPreProcess.add(t.forceRoots, t); + function addRootBlocks() { + var node = selection.getStart(), rootNode = ed.getBody(), rng, startContainer, startOffset, endContainer, endOffset, rootBlockNode, tempNode, offset = -0xFFFFFF; + + if (!node || node.nodeType !== 1) + return; + + // Check if node is wrapped in block + while (node != rootNode) { + if (blockElements[node.nodeName]) + return; + + node = node.parentNode; + } + + // Get current selection + rng = selection.getRng(); + if (rng.setStart) { + startContainer = rng.startContainer; + startOffset = rng.startOffset; + endContainer = rng.endContainer; + endOffset = rng.endOffset; + } else { + // Force control range into text range + if (rng.item) { + rng = ed.getDoc().body.createTextRange(); + rng.moveToElementText(rng.item(0)); + } + + tmpRng = rng.duplicate(); + tmpRng.collapse(true); + startOffset = tmpRng.move('character', offset) * -1; + + if (!tmpRng.collapsed) { + tmpRng = rng.duplicate(); + tmpRng.collapse(false); + endOffset = (tmpRng.move('character', offset) * -1) - startOffset; + } + } + + // Wrap non block elements and text nodes + for (node = rootNode.firstChild; node; node) { + if (node.nodeType === 3 || (node.nodeType == 1 && !blockElements[node.nodeName])) { + if (!rootBlockNode) { + rootBlockNode = dom.create(s.forced_root_block); + node.parentNode.insertBefore(rootBlockNode, node); + } + + tempNode = node; + node = node.nextSibling; + rootBlockNode.appendChild(tempNode); + } else { + rootBlockNode = null; + node = node.nextSibling; + } + } + + if (rng.setStart) { + rng.setStart(startContainer, startOffset); + rng.setEnd(endContainer, endOffset); + selection.setRng(rng); + } else { + try { + rng = ed.getDoc().body.createTextRange(); + rng.moveToElementText(rootNode); + rng.collapse(true); + rng.moveStart('character', startOffset); + + if (endOffset > 0) + rng.moveEnd('character', endOffset); + + rng.select(); + } catch (ex) { + // Ignore + } + } + + ed.nodeChanged(); + }; + + ed.onKeyUp.add(addRootBlocks); + ed.onClick.add(addRootBlocks); } if (s.force_br_newlines) { @@ -13357,155 +13941,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { } }, - 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; @@ -13693,10 +14128,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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; @@ -13726,6 +14157,10 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { } else e.innerHTML = isOpera ? '\u00a0' : '
'; // Extra space for Opera so that the caret can move there }; + + // Padd empty blocks + if (dom.isEmpty(bef)) + appendStyles(bef, sn); // Fill empty afterblook with current style if (dom.isEmpty(aft)) @@ -13744,16 +14179,9 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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); + ed.selection.select(aft, true); + ed.selection.collapse(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; @@ -14044,7 +14472,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { ed.onMouseDown.add(c.hideMenu, c); } else { cls = t._cls.button || tinymce.ui.Button; - c = new cls(id, s); + c = new cls(id, s, ed); } return t.add(c); @@ -14461,8 +14889,74 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }); } }; + function adjustSelectionToVisibleSelection() { - function applyRngStyle(rng) { + function findSelectionEnd(start, end) { + var walker = new TreeWalker(end); + for (node = walker.current(); node; node = walker.prev()) { + if (node.childNodes.length > 1 || node == start) { + return node; + } + } + } + + // Adjust selection so that a end container with a end offset of zero is not included in the selection + // as this isn't visible to the user. + var rng = ed.selection.getRng(); + var start = rng.startContainer; + var end = rng.endContainer; + if (start != end && rng.endOffset == 0) { + var newEnd = findSelectionEnd(start, end); + var endOffset = newEnd.nodeType == 3 ? newEnd.length : newEnd.childNodes.length; + rng.setEnd(newEnd, endOffset); + } + return rng; + } + + function applyStyleToList(node, bookmark, wrapElm, newWrappers, process){ + var nodes =[], listIndex =-1, list, startIndex = -1, endIndex = -1, currentWrapElm; + + // find the index of the first child list. + each(node.childNodes, function(n, index) { + if (n.nodeName==="UL"||n.nodeName==="OL") {listIndex = index; list=n; return false; } + }); + + // get the index of the bookmarks + each(node.childNodes, function(n, index) { + if (n.nodeName==="SPAN" &&dom.getAttrib(n, "data-mce-type")=="bookmark" && n.id==bookmark.id+"_start") {startIndex=index} + if (n.nodeName==="SPAN" &&dom.getAttrib(n, "data-mce-type")=="bookmark" && n.id==bookmark.id+"_end") {endIndex=index} + }); + + // if the selection spans across an embedded list, or there isn't an embedded list - handle processing normally + if (listIndex<=0 || (startIndexlistIndex)) { + each(tinymce.grep(node.childNodes), process); + return 0; + } else { + currentWrapElm = wrapElm.cloneNode(FALSE); + + // create a list of the nodes on the same side of the list as the selection + each(tinymce.grep(node.childNodes), function(n, index) { + if ((startIndexlistIndex && index >listIndex)) { + nodes.push(n); + n.parentNode.removeChild(n); + } + }); + + // insert the wrapping element either before or after the list. + if (startIndexlistIndex) { + node.insertBefore(currentWrapElm, list.nextSibling); + } + + // add the new nodes to the list. + newWrappers.push(currentWrapElm); + each(nodes, function(node){currentWrapElm.appendChild(node)}); + return currentWrapElm; + } + }; + + function applyRngStyle(rng, bookmark) { var newWrappers = [], wrapName, wrapElm; // Setup wrapper element @@ -14536,6 +15030,9 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { } currentWrapElm.appendChild(node); + } else if (nodeName == 'li' && bookmark) { + // Start wrapping - if we are in a list node and have a bookmark, then we will always begin by wrapping in a new element. + currentWrapElm = applyStyleToList(node, bookmark, wrapElm, newWrappers, process); } else { // Start a new wrapper for possible children currentWrapElm = 0; @@ -14690,8 +15187,9 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { var curSelNode = ed.selection.getNode(); // Apply formatting to selection + ed.selection.setRng(adjustSelectionToVisibleSelection()); bookmark = selection.getBookmark(); - applyRngStyle(expandRng(selection.getRng(TRUE), formatList)); + applyRngStyle(expandRng(selection.getRng(TRUE), formatList), bookmark); // 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)) { @@ -14710,7 +15208,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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, @@ -15743,34 +16240,67 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // Only register listeners once if we need to if (!pendingFormats.isListening && hasPending()) { pendingFormats.isListening = true; + function performPendingFormat(node, textNode) { + var rng = dom.createRng(); + perform(node); + + rng.setStart(textNode, textNode.nodeValue.length); + rng.setEnd(textNode, textNode.nodeValue.length); + selection.setRng(rng); + ed.nodeChanged(); + } + var enterKeyPressed = false; each('onKeyDown,onKeyUp,onKeyPress,onMouseUp'.split(','), function(event) { ed[event].addToTop(function(ed, e) { + if (e.keyCode==13 && !e.shiftKey) { + enterKeyPressed = true; + return; + } // Do we have pending formats and is the selection moved has moved if (hasPending() && !tinymce.dom.RangeUtils.compareRanges(pendingFormats.lastRng, selection.getRng())) { + var foundCaret = false; each(dom.select('font,span'), function(node) { var textNode, rng; // Look for marker if (isCaretNode(node)) { + foundCaret = true; textNode = node.firstChild; - if (textNode) { - perform(node); + // Find the first text node within node + while (textNode && textNode.nodeType != 3) + textNode = textNode.firstChild; - rng = dom.createRng(); - rng.setStart(textNode, textNode.nodeValue.length); - rng.setEnd(textNode, textNode.nodeValue.length); - selection.setRng(rng); - ed.nodeChanged(); - } else + if (textNode) + performPendingFormat(node, textNode); + else dom.remove(node); } }); + + // no caret - so we are + if (enterKeyPressed && !foundCaret) { + var node = selection.getNode(); + var textNode = node; + + // Find the first text node within node + while (textNode && textNode.nodeType != 3) + textNode = textNode.firstChild; + if (textNode) { + node=textNode.parentNode; + while (!isBlock(node)){ + node=node.parentNode; + } + performPendingFormat(node, textNode); + } + } // Always unbind and clear pending styles on keyup - if (e.type == 'keyup' || e.type == 'mouseup') + if (e.type == 'keyup' || e.type == 'mouseup') { resetPending(); + enterKeyPressed=false; + } } }); }); diff --git a/include/javascript/tiny_mce/tiny_mce_src.js b/include/javascript/tiny_mce/tiny_mce_src.js index 26f84cb9..26321a97 100644 --- a/include/javascript/tiny_mce/tiny_mce_src.js +++ b/include/javascript/tiny_mce/tiny_mce_src.js @@ -5,9 +5,9 @@ var tinymce = { majorVersion : '3', - minorVersion : '4.2', + minorVersion : '4.4', - releaseDate : '2011-04-07', + releaseDate : '2011-08-04', _init : function() { var t = this, d = document, na = navigator, ua = na.userAgent, i, nl, n, base, p, v; @@ -20,6 +20,12 @@ t.isIE6 = t.isIE && /MSIE [56]/.test(ua); + t.isIE7 = t.isIE && /MSIE [7]/.test(ua); + + t.isIE8 = t.isIE && /MSIE [8]/.test(ua); + + t.isIE9 = t.isIE && /MSIE [9]/.test(ua); + t.isGecko = !t.isWebKit && /Gecko/.test(ua); t.isMac = ua.indexOf('Mac') != -1; @@ -27,6 +33,8 @@ t.isAir = /adobeair/i.test(ua); t.isIDevice = /(iPad|iPhone)/.test(ua); + + t.isIOS5 = t.isIDevice && ua.match(/AppleWebKit\/(\d*)/)[1]>=534; // TinyMCE .NET webcontrol might be setting the values for TinyMCE if (win.tinyMCEPreInit) { @@ -484,6 +492,7 @@ })(window); + tinymce.create('tinymce.util.Dispatcher', { scope : null, listeners : null, @@ -542,7 +551,7 @@ tinymce.create('tinymce.util.Dispatcher', { tinymce.create('tinymce.util.URI', { URI : function(u, s) { - var t = this, o, a, b; + var t = this, o, a, b, base_url; // Trim whitespace u = tinymce.trim(u); @@ -561,8 +570,10 @@ tinymce.create('tinymce.util.Dispatcher', { 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); + if (!/^[\w-]*:?\/\//.test(u)) { + base_url = s.base_uri ? s.base_uri.path : new tinymce.util.URI(location.href).directory; + u = ((s.base_uri && s.base_uri.protocol) || 'http') + '://mce_host' + t.toAbsPath(base_url, 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 @@ -1024,12 +1035,47 @@ tinymce.create('static tinymce.util.XHR', { } }); }()); +(function(tinymce){ + tinymce.VK = { + DELETE:46, + BACKSPACE:8 + + } + +})(tinymce); + +(function(tinymce) { + function cleanupStylesWhenDeleting(ed) { + var dom = ed.dom, selection = ed.selection, VK= tinymce.VK; + ed.onKeyUp.add(function(ed, e) { + if (e.keyCode == VK.DELETE ||e.keyCode == VK.BACKSPACE) { + var startContainer = selection.getRng().startContainer; + var blockElement = startContainer; + while (!dom.isBlock(blockElement)) { + blockElement = blockElement.parentNode; + } + var spans = dom.select("span.Apple-style-span", blockElement); + dom.remove(spans, true); + } + }); + } + + tinymce.create('tinymce.util.Quirks', { + Quirks: function(ed) { + if (tinymce.isWebKit) { + cleanupStylesWhenDeleting(ed); + } + + } + }); +})(tinymce); + (function(tinymce) { var namedEntities, baseEntities, reverseEntities, - attrsCharsRegExp = /[&\"\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + attrsCharsRegExp = /[&<>\"\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, textCharsRegExp = /[<>&\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, rawCharsRegExp = /[<>&\"\']/g, - entityRegExp = /&(#)?([\w]+);/g, + entityRegExp = /&(#x|#)?([\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", @@ -1040,7 +1086,7 @@ tinymce.create('static tinymce.util.XHR', { // Raw entities baseEntities = { - '"' : '"', + '\"' : '"', // Needs to be escaped since the YUI compressor would otherwise break the code "'" : ''', '<' : '<', '>' : '>', @@ -1194,7 +1240,7 @@ tinymce.create('static tinymce.util.XHR', { decode : function(text) { return text.replace(entityRegExp, function(all, numeric, value) { if (numeric) { - value = parseInt(value); + value = parseInt(value, numeric.length === 2 ? 16 : 10); // Support upper UTF if (value > 0xFFFF) { @@ -1221,10 +1267,10 @@ tinymce.html.Styles = function(settings, schema) { settings = settings || {}; - encodingItems = '\\" \\\' \\; \\: ; : _'.split(' '); + encodingItems = '\\" \\\' \\; \\: ; : \uFEFF'.split(' '); for (i = 0; i < encodingItems.length; i++) { - encodingLookup[encodingItems[i]] = '_' + i; - encodingLookup['_' + i] = encodingItems[i]; + encodingLookup[encodingItems[i]] = '\uFEFF' + i; + encodingLookup['\uFEFF' + i] = encodingItems[i]; } function toHex(match, r, g, b) { @@ -1319,7 +1365,7 @@ tinymce.html.Styles = function(settings, schema) { // 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) { + str = str.replace(/\uFEFF[0-9]/g, function(str) { return encodingLookup[str]; }); } @@ -1332,7 +1378,7 @@ tinymce.html.Styles = function(settings, schema) { 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) { + css = css.replace(/\\[\"\';:\uFEFF]/g, encode).replace(/\"[^\"]+\"|\'[^\']+\'/g, function(str) { return str.replace(/[;:]/g, encode); }); @@ -1399,7 +1445,7 @@ tinymce.html.Styles = function(settings, schema) { var css = '', name, value; function serializeStyles(name) { - var styleList, i, l, name, value; + var styleList, i, l, value; styleList = schema.styles[name]; if (styleList) { @@ -1417,7 +1463,7 @@ tinymce.html.Styles = function(settings, schema) { if (element_name && schema && schema.styles) { // Serialize global styles and element specific styles serializeStyles('*'); - serializeStyles(name); + serializeStyles(element_name); } else { // Output the styles in the order they are inside the object for (name in styles) { @@ -1434,7 +1480,7 @@ tinymce.html.Styles = function(settings, schema) { }; (function(tinymce) { - var transitional = {}, boolAttrMap, blockElementsMap, shortEndedElementsMap, nonEmptyElementsMap, + var transitional = {}, boolAttrMap, blockElementsMap, shortEndedElementsMap, nonEmptyElementsMap, customElementsMap = {}, whiteSpaceElementsMap, selfClosingElementsMap, makeMap = tinymce.makeMap, each = tinymce.each; function split(str, delim) { @@ -1596,10 +1642,10 @@ tinymce.html.Styles = function(settings, schema) { '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'); + boolAttrMap = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,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'); + nonEmptyElementsMap = tinymce.extend(makeMap('td,th,iframe,video,audio,object'), shortEndedElementsMap); + whiteSpaceElementsMap = makeMap('pre,script,style,textarea'); selfClosingElementsMap = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); tinymce.html.Schema = function(settings) { @@ -1785,10 +1831,16 @@ tinymce.html.Styles = function(settings, schema) { if (custom_elements) { each(split(custom_elements), function(rule) { var matches = customElementRegExp.exec(rule), - cloneName = matches[1] === '~' ? 'span' : 'div', + inline = matches[1] === '~', + cloneName = inline ? 'span' : 'div', name = matches[2]; children[name] = children[cloneName]; + customElementsMap[name] = cloneName; + + // If it's not marked as inline then add it to valid block elements + if (!inline) + blockElementsMap[name] = {}; // Add custom elements at span/div positions each(children, function(element, child) { @@ -1827,7 +1879,24 @@ tinymce.html.Styles = function(settings, schema) { } }); } - } + }; + + function getElementRule(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; + } + }; if (!settings.valid_elements) { // No valid elements defined then clone the elements from the transitional spec @@ -1850,7 +1919,7 @@ tinymce.html.Styles = function(settings, schema) { 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) { + each(split('ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr'), function(name) { elements[name].removeEmpty = true; }); @@ -1868,6 +1937,10 @@ tinymce.html.Styles = function(settings, schema) { // Todo: Remove this when we fix list handling to be valid addValidChildren('+ol[ul|ol],+ul[ul|ol]'); + // If the user didn't allow span only allow internal spans + if (!getElementRule('span')) + addValidElements('span[!data-mce-type|*]'); + // Delete invalid elements if (settings.invalid_elements) { tinymce.each(tinymce.explode(settings.invalid_elements), function(item) { @@ -1910,21 +1983,10 @@ tinymce.html.Styles = function(settings, schema) { 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]; + self.getElementRule = getElementRule; - if (element.pattern.test(name)) - return element; - } + self.getCustomElements = function() { + return customElementsMap; }; self.addValidElements = addValidElements; @@ -1958,7 +2020,7 @@ tinymce.html.Styles = function(settings, schema) { }); self.parse = function(html) { - var self = this, matches, index = 0, value, endRegExp, stack = [], attrList, i, text, name, + var self = this, matches, index = 0, value, endRegExp, stack = [], attrList, i, text, name, isInternalElement, removeInternalElements, 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; @@ -2010,6 +2072,7 @@ tinymce.html.Styles = function(settings, schema) { selfClosing = schema.getSelfClosingElements(); fillAttrsMap = schema.getBoolAttrs(); validate = settings.validate; + removeInternalElements = settings.remove_internals; fixSelfClosing = settings.fix_self_closing; while (matches = tokenRegExp.exec(html)) { @@ -2039,6 +2102,12 @@ tinymce.html.Styles = function(settings, schema) { // Parse attributes if (attribsValue = matches[8]) { + isInternalElement = attribsValue.indexOf('data-mce-type') !== -1; // Check if the element is an internal element + + // If the element has internal attributes then remove it if we are told to do so + if (isInternalElement && removeInternalElements) + isValidElement = false; + attrList = []; attrList.map = {}; @@ -2049,7 +2118,7 @@ tinymce.html.Styles = function(settings, schema) { 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) { + if (validate && !isInternalElement && name.indexOf('data-') !== 0) { attrRule = validAttributesMap[name]; // Find rule by pattern matching @@ -2088,7 +2157,7 @@ tinymce.html.Styles = function(settings, schema) { } // Process attributes if validation is enabled - if (validate) { + if (validate && !isInternalElement) { attributesRequired = elementRule.attributesRequired; attributesDefault = elementRule.attributesDefault; attributesForced = elementRule.attributesForced; @@ -2512,6 +2581,10 @@ tinymce.html.Styles = function(settings, schema) { } return true; + }, + + walk : function(prev) { + return walk(this, null, prev); } }); @@ -2695,7 +2768,7 @@ tinymce.html.Styles = function(settings, schema) { 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; + endWhiteSpaceRegExp, allWhiteSpaceRegExp, whiteSpaceElements, children, nonEmptyElements, rootBlockName; args = args || {}; matchedNodes = {}; @@ -2704,12 +2777,35 @@ tinymce.html.Styles = function(settings, schema) { nonEmptyElements = schema.getNonEmptyElements(); children = schema.children; validate = settings.validate; + rootBlockName = "forced_root_block" in args ? args.forced_root_block : settings.forced_root_block; whiteSpaceElements = schema.getWhiteSpaceElements(); startWhiteSpaceRegExp = /^[ \t\r\n]+/; endWhiteSpaceRegExp = /[ \t\r\n]+$/; allWhiteSpaceRegExp = /[ \t\r\n]+/g; + function addRootBlocks() { + var node = rootNode.firstChild, next, rootBlockNode; + + while (node) { + next = node.next; + + if (node.type == 3 || (node.type == 1 && node.name !== 'p' && !blockElements[node.name] && !node.attr('data-mce-type'))) { + if (!rootBlockNode) { + // Create a new root block element + rootBlockNode = createNode(rootBlockName, 1); + rootNode.insert(rootBlockNode, node); + rootBlockNode.append(node); + } else + rootBlockNode.append(node); + } else { + rootBlockNode = null; + } + + node = next; + }; + }; + function createNode(name, type) { var node = new Node(name, type), list; @@ -2897,35 +2993,28 @@ tinymce.html.Styles = function(settings, schema) { } }, schema); - rootNode = node = new Node(settings.root_name, 11); + rootNode = node = new Node(args.context || 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); + // Fix invalid children or report invalid children in a contextual parsing + if (validate && invalidChildren.length) { + if (!args.context) + fixInvalidChildren(invalidChildren); + else + args.invalid = true; } - // Run attribute filters - for (i = 0, l = attributeFilters.length; i < l; i++) { - list = attributeFilters[i]; + // Wrap nodes in the root into block elements if the root is body + if (rootBlockName && rootNode.name == 'body') + addRootBlocks(); - if (list.name in matchedAttributes) { - nodes = matchedAttributes[list.name]; + // Run filters only when the contents is valid + if (!args.invalid) { + // Run node filters + for (name in matchedNodes) { + list = nodeFilters[name]; + nodes = matchedNodes[name]; // Remove already removed children fi = nodes.length; @@ -2934,8 +3023,27 @@ tinymce.html.Styles = function(settings, schema) { nodes.splice(fi, 1); } - for (fi = 0, fl = list.callbacks.length; fi < fl; fi++) - list.callbacks[fi](nodes, list.name, args); + 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); + } } } @@ -2950,6 +3058,9 @@ tinymce.html.Styles = function(settings, schema) { var i, l = nodes.length, node, blockElements = schema.getBlockElements(), nonEmptyElements = schema.getNonEmptyElements(), parent, prev, prevName; + // Remove brs from body element as well + blockElements.body = 1; + // Must loop forwards since it will otherwise remove all brs in

a


for (i = 0; i < l; i++) { node = nodes[i]; @@ -3247,7 +3358,7 @@ tinymce.html.Writer = function(settings) { }, DOMUtils : function(d, s) { - var t = this, globalStyle; + var t = this, globalStyle, name; t.doc = d; t.win = window; @@ -3278,7 +3389,7 @@ tinymce.html.Writer = function(settings) { } } - if (isIE) { + if (isIE && s.schema) { // Add missing HTML 4/5 elements to IE ('abbr article aside audio canvas ' + 'details figcaption figure footer ' + @@ -3287,6 +3398,11 @@ tinymce.html.Writer = function(settings) { 'time video').replace(/\w+/g, function(name) { d.createElement(name); }); + + // Create all custom elements + for (name in s.schema.getCustomElements()) { + d.createElement(name); + } } tinymce.addUnload(t.destroy, t); @@ -3691,12 +3807,12 @@ tinymce.html.Writer = function(settings) { }, getAttrib : function(e, n, dv) { - var v, t = this; + var v, t = this, undef; e = t.get(e); if (!e || e.nodeType !== 1) - return false; + return dv === undef ? false : dv; if (!is(dv)) dv = ''; @@ -3808,7 +3924,7 @@ tinymce.html.Writer = function(settings) { } } - return (v !== undefined && v !== null && v !== '') ? '' + v : dv; + return (v !== undef && v !== null && v !== '') ? '' + v : dv; }, getPos : function(n, ro) { @@ -3818,14 +3934,17 @@ tinymce.html.Writer = function(settings) { ro = ro || d.body; if (n) { - // Use getBoundingClientRect on IE, Opera has it but it's not perfect - if (isIE && !t.stdMode) { + // Use getBoundingClientRect if it exists since it's faster than looping offset nodes + if (n.getBoundingClientRect) { 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}; + // Add scroll offsets from documentElement or body since IE with the wrong box model will use d.body and so do WebKit + // Also remove the body/documentelement clientTop/clientLeft on IE 6, 7 since they offset the position + x = n.left + (d.documentElement.scrollLeft || d.body.scrollLeft) - e.clientTop; + y = n.top + (d.documentElement.scrollTop || d.body.scrollTop) - e.clientLeft; + + return {x : x, y : y}; } r = n; @@ -4299,12 +4418,12 @@ tinymce.html.Writer = function(settings) { if (elements && elements[node.nodeName.toLowerCase()]) return false; - // Keep elements with data attributes or name attribute like
+ // Keep elements with data-bookmark 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) + if (name === "name" || name === 'data-mce-bookmark') return false; } } @@ -4338,7 +4457,7 @@ tinymce.html.Writer = function(settings) { }, nodeIndex : function(node, normalized) { - var idx = 0, lastNodeType, lastNode, nodeType, nodeValueExists; + var idx = 0, lastNodeType, lastNode, nodeType; if (node) { for (lastNodeType = node.nodeType, node = node.previousSibling, lastNode = node; node; node = node.previousSibling) { @@ -4346,11 +4465,7 @@ tinymce.html.Writer = function(settings) { // 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) + if (nodeType == lastNodeType || !node.nodeValue.length) continue; } idx++; @@ -5193,11 +5308,97 @@ tinymce.html.Writer = function(settings) { (function() { function Selection(selection) { - var t = this, invisibleChar = '\uFEFF', range, lastIERng, dom = selection.dom, TRUE = true, FALSE = false; + var self = this, dom = selection.dom, TRUE = true, FALSE = false; + + function getPosition(rng, start) { + var checkRng, startIndex = 0, endIndex, inside, + children, child, offset, index, position = -1, parent; + + // Setup test range, collapse it and get the parent + checkRng = rng.duplicate(); + checkRng.collapse(start); + parent = checkRng.parentElement(); + + // Check if the selection is within the right document + if (parent.ownerDocument !== selection.dom.doc) + return; + + // IE will report non editable elements as it's parent so look for an editable one + while (parent.contentEditable === "false") { + parent = parent.parentNode; + } + + // If parent doesn't have any children then return that we are inside the element + if (!parent.hasChildNodes()) { + return {node : parent, inside : 1}; + } + + // Setup node list and endIndex + children = parent.children; + endIndex = children.length - 1; + + // Perform a binary search for the position + while (startIndex <= endIndex) { + index = Math.floor((startIndex + endIndex) / 2); + + // Move selection to node and compare the ranges + child = children[index]; + checkRng.moveToElementText(child); + position = checkRng.compareEndPoints(start ? 'StartToStart' : 'EndToEnd', rng); + + // Before/after or an exact match + if (position > 0) { + endIndex = index - 1; + } else if (position < 0) { + startIndex = index + 1; + } else { + return {node : child}; + } + } + + // Check if child position is before or we didn't find a position + if (position < 0) { + // No element child was found use the parent element and the offset inside that + if (!child) { + checkRng.moveToElementText(parent); + checkRng.collapse(true); + child = parent; + inside = true; + } else + checkRng.collapse(false); + + checkRng.setEndPoint(start ? 'EndToStart' : 'EndToEnd', rng); + + // Fix for edge case:
..
ab|c
+ if (checkRng.compareEndPoints(start ? 'StartToStart' : 'StartToEnd', rng) > 0) { + checkRng = rng.duplicate(); + checkRng.collapse(start); + + offset = -1; + while (parent == checkRng.parentElement()) { + if (checkRng.move('character', -1) == 0) + break; + + offset++; + } + } + + offset = offset || checkRng.text.replace('\r\n', ' ').length; + } else { + // Child position is after the selection endpoint + checkRng.collapse(true); + checkRng.setEndPoint(start ? 'StartToStart' : 'StartToEnd', rng); + + // Get the length of the text to find where the endpoint is relative to it's container + offset = checkRng.text.replace('\r\n', ' ').length; + } + + return {node : child, position : position, offset : offset, inside : inside}; + }; // Returns a W3C DOM compatible range object by using the IE Range API function getRange() { - var ieRange = selection.getRng(), domRange = dom.createRng(), element, collapsed; + var ieRange = selection.getRng(), domRange = dom.createRng(), element, collapsed, tmpRange, element2, bookmark, fail; // If selection is outside the current document just return an empty range element = ieRange.item ? ieRange.item(0) : ieRange.parentElement(); @@ -5206,111 +5407,258 @@ tinymce.html.Writer = function(settings) { 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); - } + // Handle control selection + if (ieRange.item) { + 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); + var endPoint = getPosition(ieRange, start), container, offset, textNodeOffset = 0, sibling, undef, nodeValue; - // Create marker and insert it at the end of the endpoints parent - marker = dom.create('a'); - parent = checkRng.parentElement(); + container = endPoint.node; + offset = endPoint.offset; - // 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); + if (endPoint.inside && !container.hasChildNodes()) { + domRange[start ? 'setStart' : 'setEnd'](container, 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); + if (offset === undef) { + domRange[start ? 'setStartBefore' : 'setEndAfter'](container); 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; + if (endPoint.position < 0) { + sibling = endPoint.inside ? container.firstChild : container.nextSibling; + + if (!sibling) { + domRange[start ? 'setStartAfter' : 'setEndAfter'](container); + return; } - } - // Setup container - container = position > 0 || index == 0 ? marker.nextSibling : marker.previousSibling; + if (!offset) { + if (sibling.nodeType == 3) + domRange[start ? 'setStart' : 'setEnd'](sibling, 0); + else + domRange[start ? 'setStartBefore' : 'setEndBefore'](sibling); - // Handle element selection - if (container.nodeType == 1) { - dom.remove(marker); + return; + } - // Find offset and container - offset = dom.nodeIndex(container); - container = container.parentNode; + // Find the text node and offset + while (sibling) { + nodeValue = sibling.nodeValue; + textNodeOffset += nodeValue.length; - // Move the offset if we are setting the end or the position is after an element - if (!start || index > 0) - offset++; + // We are at or passed the position we where looking for + if (textNodeOffset >= offset) { + container = sibling; + textNodeOffset -= offset; + textNodeOffset = nodeValue.length - textNodeOffset; + break; + } + + sibling = sibling.nextSibling; + } } 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; + // Find the text node and offset + sibling = container.previousSibling; + + if (!sibling) + return domRange[start ? 'setStartBefore' : 'setEndBefore'](container); + + // If there isn't any text to loop then use the first position + if (!offset) { + if (container.nodeType == 3) + domRange[start ? 'setStart' : 'setEnd'](sibling, container.nodeValue.length); + else + domRange[start ? 'setStartAfter' : 'setEndAfter'](sibling); + + return; } - dom.remove(marker); + while (sibling) { + textNodeOffset += sibling.nodeValue.length; + + // We are at or passed the position we where looking for + if (textNodeOffset >= offset) { + container = sibling; + textNodeOffset -= offset; + break; + } + + sibling = sibling.previousSibling; + } } - domRange[start ? 'setStart' : 'setEnd'](container, offset); + domRange[start ? 'setStart' : 'setEnd'](container, textNodeOffset); }; - // Find start point - findEndPoint(true); + try { + // Find start point + findEndPoint(true); + + // Find end point if needed + if (!collapsed) + findEndPoint(); + } catch (ex) { + // IE has a nasty bug where text nodes might throw "invalid argument" when you + // access the nodeValue or other properties of text nodes. This seems to happend when + // text nodes are split into two nodes by a delete/backspace call. So lets detect it and try to fix it. + if (ex.number == -2147024809) { + // Get the current selection + bookmark = self.getBookmark(2); + + // Get start element + tmpRange = ieRange.duplicate(); + tmpRange.collapse(true); + element = tmpRange.parentElement(); + + // Get end element + if (!collapsed) { + tmpRange = ieRange.duplicate(); + tmpRange.collapse(false); + element2 = tmpRange.parentElement(); + element2.innerHTML = element2.innerHTML; + } + + // Remove the broken elements + element.innerHTML = element.innerHTML; + + // Restore the selection + self.moveToBookmark(bookmark); - // Find end point if needed - if (!collapsed) - findEndPoint(); + // Since the range has moved we need to re-get it + ieRange = selection.getRng(); + + // Find start point + findEndPoint(true); + + // Find end point if needed + if (!collapsed) + findEndPoint(); + } else + throw ex; // Throw other errors + } return domRange; }; + this.getBookmark = function(type) { + var rng = selection.getRng(), start, end, bookmark = {}; + + function getIndexes(node) { + var node, parent, root, children, i, indexes = []; + + parent = node.parentNode; + root = dom.getRoot().parentNode; + + while (parent != root) { + children = parent.children; + + i = children.length; + while (i--) { + if (node === children[i]) { + indexes.push(i); + break; + } + } + + node = parent; + parent = parent.parentNode; + } + + return indexes; + }; + + function getBookmarkEndPoint(start) { + var position; + + position = getPosition(rng, start); + if (position) { + return { + position : position.position, + offset : position.offset, + indexes : getIndexes(position.node), + inside : position.inside + }; + } + }; + + // Non ubstructive bookmark + if (type === 2) { + // Handle text selection + if (!rng.item) { + bookmark.start = getBookmarkEndPoint(true); + + if (!selection.isCollapsed()) + bookmark.end = getBookmarkEndPoint(); + } else + bookmark.start = {ctrl : true, indexes : getIndexes(rng.item(0))}; + } + + return bookmark; + }; + + this.moveToBookmark = function(bookmark) { + var rng, body = dom.doc.body; + + function resolveIndexes(indexes) { + var node, i, idx, children; + + node = dom.getRoot(); + for (i = indexes.length - 1; i >= 0; i--) { + children = node.children; + idx = indexes[i]; + + if (idx <= children.length - 1) { + node = children[idx]; + } + } + + return node; + }; + + function setBookmarkEndPoint(start) { + var endPoint = bookmark[start ? 'start' : 'end'], moveLeft, moveRng, undef; + + if (endPoint) { + moveLeft = endPoint.position > 0; + + moveRng = body.createTextRange(); + moveRng.moveToElementText(resolveIndexes(endPoint.indexes)); + + offset = endPoint.offset; + if (offset !== undef) { + moveRng.collapse(endPoint.inside || moveLeft); + moveRng.moveStart('character', moveLeft ? -offset : offset); + } else + moveRng.collapse(start); + + rng.setEndPoint(start ? 'StartToStart' : 'EndToStart', moveRng); + + if (start) + rng.collapse(true); + } + }; + + if (bookmark.start) { + if (bookmark.start.ctrl) { + rng = body.createControlRange(); + rng.addElement(resolveIndexes(bookmark.start.indexes)); + rng.select(); + } else { + rng = body.createTextRange(); + setBookmarkEndPoint(true); + setBookmarkEndPoint(); + rng.select(); + } + } + }; + this.addRange = function(rng) { var ieRng, ctrlRng, startContainer, startOffset, endContainer, endOffset, doc = selection.dom.doc, body = doc.body; @@ -5346,7 +5694,7 @@ tinymce.html.Writer = function(settings) { tmpRng.moveToElementText(marker); } else { // Empty node selection for example
|
- marker = doc.createTextNode(invisibleChar); + marker = doc.createTextNode('\uFEFF'); container.appendChild(marker); tmpRng.moveToElementText(marker.parentNode); tmpRng.collapse(TRUE); @@ -5357,9 +5705,6 @@ tinymce.html.Writer = function(settings) { } } - // Destroy cached range - this.destroy(); - // Setup some shorter versions startContainer = rng.startContainer; startOffset = rng.startOffset; @@ -5389,33 +5734,8 @@ tinymce.html.Writer = function(settings) { 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 range method + this.getRangeAt = getRange; }; // Expose the selection object @@ -6734,7 +7054,7 @@ window.tinymce.dom.Sizzle = Sizzle; return; try { - // If IE is used, use the trick by Diego Perini + // If IE is used, use the trick by Diego Perini licensed under MIT by request to the author. // http://javascript.nwbox.com/IEContentLoaded/ doc.documentElement.doScroll("left"); } catch (ex) { @@ -6926,6 +7246,13 @@ window.tinymce.dom.Sizzle = Sizzle; tinymce.addUnload(t.destroy, t); }, + setCursorLocation: function(node, offset) { + var t = this; var r = t.dom.createRng(); + r.setStart(node, offset); + r.setEnd(node, offset); + t.setRng(r); + t.collapse(false); + }, getContent : function(s) { var t = this, r = t.getRng(), e = t.dom.create("body"), se = t.getSel(), wb, wa, n; @@ -6933,6 +7260,7 @@ window.tinymce.dom.Sizzle = Sizzle; wb = wa = ''; s.get = true; s.format = s.format || 'html'; + s.forced_root_block = ''; t.onBeforeGetContent.dispatch(t, s); if (s.format == 'text') @@ -7017,7 +7345,12 @@ window.tinymce.dom.Sizzle = Sizzle; // Remove the caret position self.dom.remove('__caret'); - self.setRng(rng); + + try { + self.setRng(rng); + } catch (ex) { + // Might fail on Opera for some odd reason + } } else { if (rng.item) { // Delete content and get caret text selection @@ -7153,6 +7486,9 @@ window.tinymce.dom.Sizzle = Sizzle; return bookmark; }; + if (t.tridentSel) + return t.tridentSel.getBookmark(type); + return getLocation(); } @@ -7225,10 +7561,6 @@ window.tinymce.dom.Sizzle = Sizzle; 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(); @@ -7268,6 +7600,9 @@ window.tinymce.dom.Sizzle = Sizzle; return true; }; + if (t.tridentSel) + return t.tridentSel.moveToBookmark(bookmark); + if (setEndPoint(true) && setEndPoint()) { t.setRng(rng); } @@ -7603,27 +7938,94 @@ window.tinymce.dom.Sizzle = Sizzle; return bl; }, - destroy : function(s) { - var t = this; + normalize : function() { + var self = this, rng, normalized; - t.win = null; + // Normalize only on non IE browsers for now + if (tinymce.isIE) + return; - if (t.tridentSel) - t.tridentSel.destroy(); + function normalizeEndPoint(start) { + var container, offset, walker, dom = self.dom, body = dom.getRoot(), node; - // Manual destroy then remove unload handler - if (!s) - tinymce.removeUnload(t.destroy); - }, + container = rng[(start ? 'start' : 'end') + 'Container']; + offset = rng[(start ? 'start' : 'end') + 'Offset']; - // 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; + // If the container is a document move it to the body element + if (container.nodeType === 9) { + container = container.body; + offset = 0; + } - // Make HTML element unselectable since we are going to handle selection by hand - doc.documentElement.unselectable = true; + // If the container is body try move it into the closest text node or position + // TODO: Add more logic here to handle element selection cases + if (container === body) { + // Resolve the index + if (container.hasChildNodes()) { + container = container.childNodes[Math.min(!start && offset > 0 ? offset - 1 : offset, container.childNodes.length - 1)]; + offset = 0; - // Return range from point or null if it failed + // Walk the DOM to find a text node to place the caret at or a BR + node = container; + walker = new tinymce.dom.TreeWalker(container, body); + do { + // Found a text node use that position + if (node.nodeType === 3) { + offset = start ? 0 : node.nodeValue.length - 1; + container = node; + break; + } + + // Found a BR element that we can place the caret before + if (node.nodeName === 'BR') { + offset = dom.nodeIndex(node); + container = node.parentNode; + break; + } + } while (node = (start ? walker.next() : walker.prev())); + + normalized = true; + } + } + + // Set endpoint if it was normalized + if (normalized) + rng['set' + (start ? 'Start' : 'End')](container, offset); + }; + + rng = self.getRng(); + + // Normalize the end points + normalizeEndPoint(true); + + if (rng.collapsed) + normalizeEndPoint(); + + // Set the selection if it was normalized + if (normalized) { + //console.log(self.dom.dumpRng(rng)); + self.setRng(rng); + } + }, + + destroy : function(s) { + var t = this; + + t.win = null; + + // 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(); @@ -9158,8 +9560,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { l = DOM.encode(s.label || ''); h = ''; - - if (s.image) + if (s.image && !(this.editor &&this.editor.forcedHighContrastMode) ) h += '' + DOM.encode(s.title) + '' + l; else h += '' + (l ? '' + l + '' : ''); @@ -9286,7 +9687,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { }, showMenu : function() { - var t = this, p1, p2, e = DOM.get(this.id), m; + var t = this, p2, e = DOM.get(this.id), m; if (t.isDisabled() || t.items.length == 0) return; @@ -9299,7 +9700,6 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { t.isMenuRendered = true; } - p1 = DOM.getPos(this.settings.menu_container); p2 = DOM.getPos(e); m = t.menu; @@ -10097,7 +10497,19 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, get : function(n) { - return this.lookup[n]; + if (this.lookup[n]) { + return this.lookup[n].instance; + } else { + return undefined; + } + }, + + dependencies : function(n) { + var result; + if (this.lookup[n]) { + result = this.lookup[n].dependencies; + } + return result || []; }, requireLangPack : function(n) { @@ -10107,27 +10519,61 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { tinymce.ScriptLoader.add(this.urls[n] + '/langs/' + s.language + '.js'); }, - add : function(id, o) { + add : function(id, o, dependencies) { this.items.push(o); - this.lookup[id] = o; + this.lookup[id] = {instance:o, dependencies:dependencies}; this.onAdd.dispatch(this, id, o); return o; }, + createUrl: function(baseUrl, dep) { + if (typeof dep === "object") { + return dep + } else { + return {prefix: baseUrl.prefix, resource: dep, suffix: baseUrl.suffix}; + } + }, + + addComponents: function(pluginName, scripts) { + var pluginUrl = this.urls[pluginName]; + tinymce.each(scripts, function(script){ + tinymce.ScriptLoader.add(pluginUrl+"/"+script); + }); + }, load : function(n, u, cb, s) { - var t = this; + var t = this, url = u; + + function loadDependencies() { + var dependencies = t.dependencies(n); + tinymce.each(dependencies, function(dep) { + var newUrl = t.createUrl(u, dep); + t.load(newUrl.resource, newUrl, undefined, undefined); + }); + if (cb) { + if (s) { + cb.call(s); + } else { + cb.call(tinymce.ScriptLoader); + } + } + } if (t.urls[n]) return; + if (typeof u === "object") + url = u.prefix + u.resource + u.suffix; - if (u.indexOf('/') != 0 && u.indexOf('://') == -1) - u = tinymce.baseURL + '/' + u; + if (url.indexOf('/') != 0 && url.indexOf('://') == -1) + url = tinymce.baseURL + '/' + url; - t.urls[n] = u.substring(0, u.lastIndexOf('/')); + t.urls[n] = url.substring(0, url.lastIndexOf('/')); - if (!t.lookup[n]) - tinymce.ScriptLoader.add(u, cb, s); + if (t.lookup[n]) { + loadDependencies(); + } else { + tinymce.ScriptLoader.add(url, loadDependencies, s); + } } }); @@ -10633,10 +11079,10 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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) + // Is a iPad/iPhone and not on iOS5, 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 && !tinymce.isIOS5) return; // Add hidden input for non input elements inside form elements @@ -10708,12 +11154,23 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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'); + if (p &&!PluginManager.urls[p]) { + if (p.charAt(0) == '-') { + p = p.substr(1, p.length); + var dependencies = PluginManager.dependencies(p); + each(dependencies, function(dep) { + var defaultSettings = {prefix:'plugins/', resource: dep, suffix:'/editor_plugin' + tinymce.suffix + '.js'}; + var dep = PluginManager.createUrl(defaultSettings, dep); + PluginManager.load(dep.resource, dep); + + }); + } else { + // Skip safari plugin, since it is removed as of 3.3b1 + if (p == 'safari') { + return; + } + PluginManager.load(p, {prefix:'plugins/', resource: p, suffix:'/editor_plugin' + tinymce.suffix + '.js'}); + } } }); @@ -10728,7 +11185,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, init : function() { - var n, t = this, s = t.settings, w, h, e = t.getElement(), o, ti, u, bi, bc, re, i; + var n, t = this, s = t.settings, w, h, e = t.getElement(), o, ti, u, bi, bc, re, i, initializedPlugins = []; tinymce.add(t); @@ -10742,20 +11199,25 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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) { + function initPlugin(p) { var c = PluginManager.get(p), u = PluginManager.urls[p] || tinymce.documentBaseURL.replace(/\/$/, ''), po; - - if (c) { + if (c && tinymce.inArray(initializedPlugins,p) === -1) { + each(PluginManager.dependencies(p), function(dep){ + initPlugin(dep); + }); po = new c(t, u); t.plugins[p] = po; - if (po.init) + if (po.init) { po.init(t, u); + initializedPlugins.push(p); + } } - }); + } + + // Create all plugins + each(explode(s.plugins.replace(/\-/g, '')), initPlugin); // Setup popup CSS path(s) if (s.popup_css !== false) { @@ -10898,7 +11360,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { n = DOM.add(o.iframeContainer, 'iframe', { id : t.id + "_ifr", src : u || 'javascript:""', // Workaround for HTTPS warning in IE6/7 - frameBorder : '0', + frameBorder : '0', + allowTransparency : "true", title : s.aria_label, style : { width : '100%', @@ -10917,41 +11380,72 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { e = n = o = null; // Cleanup }, - setupIframe : function() { + setupIframe : function(filled) { var t = this, s = t.settings, e = DOM.get(t.id), d = t.getDoc(), h, b; // Setup iframe body - if (!isIE || !tinymce.relaxedDomain) { + if ((!isIE || !tinymce.relaxedDomain) && !filled) { + // We need to wait for the load event on Gecko + if (isGecko && !s.readonly) { + t.getWin().addEventListener("DOMContentLoaded", function() { + window.setTimeout(function() { + var b = t.getBody(), undef; + + // Editable element needs to have some contents or backspace/delete won't work properly for some odd reason on FF 3.6 or older + b.innerHTML = '
'; + + // Check if Gecko supports contentEditable mode FF2 doesn't + if (b.contentEditable !== undef) { + // Setting the contentEditable off/on seems to force caret mode in the editor and enabled auto focus + b.contentEditable = false; + b.contentEditable = true; + + // Caret doesn't get rendered when you mousedown on the HTML element on FF 3.x + t.onMouseDown.add(function(ed, e) { + if (e.target.nodeName === "HTML") { + // Setting the contentEditable off/on seems to force caret mode in the editor and enabled auto focus + b.contentEditable = false; + b.contentEditable = true; + + d.designMode = 'on'; // Render the caret + + // Remove design mode again after a while so it has some time to execute + window.setTimeout(function() { + d.designMode = 'off'; + t.getBody().focus(); + }, 1); + } + }); + } else + d.designMode = 'on'; + + // Call setup frame once the contentEditable/designMode has been initialized + // since the caret won't be rendered some times otherwise. + t.setupIframe(true); + }, 1); + }, false); + } + 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 - } + // Wait for iframe onload event on Gecko + if (isGecko && !s.readonly) + return; } - // 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); + // It will not steal focus while setting contentEditable + b = t.getBody(); + b.disabled = true; - if (!s.readonly) - b.contentEditable = true; + if (!isGecko && !s.readonly) + b.contentEditable = true; - DOM.show(b); - } + b.disabled = false; t.schema = new tinymce.html.Schema(s); @@ -10968,38 +11462,44 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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); + // Force anchor names closed, unless the setting "allow_html_in_named_anchor" is explicitly included. + if (!t.settings.allow_html_in_named_anchor) { + 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; + var i = nodes.length, node, dom = t.dom, value, internalName; while (i--) { node = nodes[i]; value = node.attr(name); + internalName = 'data-mce-' + 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)); + // Add internal attribute if we need to we don't on a refresh of the document + if (!node.attributes.map[internalName]) { + if (name === "style") + node.attr(internalName, dom.serializeStyle(dom.parseStyle(value), node.name)); + else + node.attr(internalName, t.convertURL(value, name, node.name)); + } } }); @@ -11149,6 +11649,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { t.controlManager.onPostRender.dispatch(t, t.controlManager); t.onPostRender.dispatch(t); + t.quirks = new tinymce.util.Quirks(this); + if (s.directionality) t.getBody().dir = s.directionality; @@ -11298,71 +11800,61 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }); 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.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}); - 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); + }); - // 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); - // 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.getBody().focus(); + ed.getWin().focus(); + }, 100); + } - 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(); + var oed, t = this, selection = t.selection, ce = t.settings.content_editable, ieRng, controlElm, doc = t.getDoc(); if (!sf) { // Get selected control element - ieRng = t.selection.getRng(); + ieRng = selection.getRng(); if (ieRng.item) { controlElm = ieRng.item(0); } + selection.normalize(); + // Is not content editable if (!ce) t.getWin().focus(); + // Focus the body as well since it's contentEditable + if (tinymce.isGecko) { + t.getBody().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 @@ -11756,7 +12248,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, setContent : function(content, args) { - var self = this, rootNode, body = self.getBody(); + var self = this, rootNode, body = self.getBody(), forcedRootBlockName; // Setup args object args = args || {}; @@ -11773,7 +12265,15 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // 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 = '
'; + forcedRootBlockName = self.settings.forced_root_block; + if (forcedRootBlockName) + content = '<' + forcedRootBlockName + '>
'; + else + content = '
'; + + body.innerHTML = content; + self.selection.select(body, true); + self.selection.collapse(true); return; } @@ -11792,6 +12292,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (!args.no_events) self.onSetContent.dispatch(self, args); + self.selection.normalize(); + return args.content; }, @@ -12080,8 +12582,10 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (isGecko && !s.readonly) { if (t._isHidden()) { try { - if (!s.content_editable) - d.designMode = 'On'; + if (!s.content_editable) { + d.body.contentEditable = false; + d.body.contentEditable = true; + } } catch (ex) { // Fails if it's hidden } @@ -12108,20 +12612,20 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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; + 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(); - } - }); - } + // Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250 + // WebKit can't even do simple things like selecting an image + // Needs tobe the setBaseAndExtend or it will fail to select floated images + if (tinymce.isWebKit && e.nodeName == 'IMG') + t.selection.getSel().setBaseAndExtent(e, 0, e, 1); + + if (e.nodeName == 'A' && dom.hasClass(e, 'mceItemAnchor')) + t.selection.select(e); + + t.nodeChanged(); + }); // Add node change handlers t.onMouseUp.add(t.nodeChanged); @@ -12133,6 +12637,35 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { t.nodeChanged(); }); + + // Add block quote deletion handler + t.onKeyDown.add(function(ed, e) { + // Was the BACKSPACE key pressed? + if (e.keyCode != 8) + return; + + var n = ed.selection.getRng().startContainer; + var offset = ed.selection.getRng().startOffset; + + while (n && n.nodeType && n.nodeType != 1 && n.parentNode) + n = n.parentNode; + + // Is the cursor at the beginning of a blockquote? + if (n && n.parentNode && n.parentNode.tagName === 'BLOCKQUOTE' && n.parentNode.firstChild == n && offset == 0) { + // Remove the blockquote + ed.formatter.toggle('blockquote', null, n.parentNode); + + // Move the caret to the beginning of n + var rng = ed.selection.getRng(); + rng.setStart(n, 0); + rng.setEnd(n, 0); + ed.selection.setRng(rng); + ed.selection.collapse(false); + } + }); + + + // Add reset handler t.onReset.add(function() { t.setContent(t.startContent, {format : 'raw'}); @@ -12154,9 +12687,9 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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, '
']); + t.addShortcut('ctrl+7', '', ['FormatBlock', false, 'p']); + t.addShortcut('ctrl+8', '', ['FormatBlock', false, 'div']); + t.addShortcut('ctrl+9', '', ['FormatBlock', false, 'address']); function find(e) { var v = null; @@ -12252,21 +12785,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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) { @@ -12293,69 +12811,25 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }); 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); - } - } + var keyCode = e.keyCode; - if ((e.keyCode >= 33 && e.keyCode <= 36) || (e.keyCode >= 37 && e.keyCode <= 40) || e.keyCode == 13 || e.keyCode == 45 || e.ctrlKey) + if ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode == 13 || 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(); - } + var keyCode = e.keyCode, sel; - // 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(); + if (keyCode == 8) { + sel = t.getDoc().selection; - 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); - } + // Fix IE control + backspace browser bug + if (sel && sel.createRange && sel.createRange().item) { + t.undoManager.beforeChange(); + ed.dom.remove(sel.createRange().item(0)); + addUndo(); - // Block the default delete behavior since it might be broken - e.preventDefault(); - return; + return Event.cancel(e); } } @@ -12375,8 +12849,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // 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.undoManager.add(); } }); @@ -12385,7 +12859,22 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { addUndo(); }); } - + + // Fire a nodeChanged when the selection is changed on WebKit this fixes selection issues on iOS5 + // It only fires the nodeChange event every 50ms since it would other wise update the UI when you type and it hogs the CPU + if (tinymce.isWebKit) { + dom.bind(t.getDoc(), 'selectionchange', function() { + if (t.selectionTimer) { + window.clearTimeout(t.selectionTimer); + t.selectionTimer = 0; + } + + t.selectionTimer = window.setTimeout(function() { + t.nodeChanged(); + }, 50); + }); + } + // Bug fix for FireFox keeping styles from end of selection instead of start. if (tinymce.isGecko) { function getAttributeApplyFunction() { @@ -12393,10 +12882,14 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { return function() { var target = t.selection.getStart(); - t.dom.removeAllAttribs(target); - each(template, function(attr) { - target.setAttributeNode(attr.cloneNode(true)); - }); + + if (target !== t.getBody()) { + t.dom.removeAllAttribs(target); + + each(template, function(attr) { + target.setAttributeNode(attr.cloneNode(true)); + }); + } }; } @@ -12688,22 +13181,15 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, 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; + var parser, serializer, parentNode, rootNode, fragment, args, + marker, nodeRect, viewPortRect, rng, node, node2, bookmarkHtml, viewportBodyElement; - if (next) - walker.next(); - else - walker.prev(); - } - }; + // Setup parser and serializer + parser = editor.parser; + serializer = new tinymce.html.Serializer({}, editor.schema); + bookmarkHtml = '\uFEFF'; + // Run beforeSetContent handlers on the HTML to be inserted args = {content: value, format: 'html'}; selection.onBeforeSetContent.dispatch(selection, args); value = args.content; @@ -12712,89 +13198,114 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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')); + // Replace the caret marker with a span bookmark element + value = value.replace(/\{\$caret\}/, bookmarkHtml); - caretNode = dom.select('#__mce')[0]; - rootNode = dom.getRoot(); + // Insert node maker where we will insert the new HTML and get it's parent + if (!selection.isCollapsed()) + editor.getDoc().execCommand('Delete', false, null); - // 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); - } - } + parentNode = selection.getNode(); - // 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)) - ) - ); + // Parse the fragment within the context of the parent node + args = {context : parentNode.nodeName.toLowerCase()}; + fragment = parser.parse(value, args); - break; - } + // Move the caret to a more suitable location + node = fragment.lastChild; + if (node.attr('id') == 'mce_marker') { + marker = node; - parent = caretNode; - caretNode = caretNode.parentNode; + for (node = node.prev; node; node = node.walk(true)) { + if (node.type == 3 || !dom.isBlock(node.name)) { + node.parent.insert(marker, node, node.name === 'br'); + break; + } + } } - // 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 parser says valid we can insert the contents into that parent + if (!args.invalid) { + value = serializer.serialize(fragment); - if (node) { - rng = dom.createRng(); + // Check if parent is empty or only has one BR element then set the innerHTML of that parent + node = parentNode.firstChild; + node2 = parentNode.lastChild; + if (!node || (node === node2 && node.nodeName === 'BR')) + dom.setHTML(parentNode, value); + else + selection.setContent(value); + } else { + // If the fragment was invalid within that context then we need + // to parse and process the parent it's inserted into - 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); - } - } + // Insert bookmark node and get the parent + selection.setContent(bookmarkHtml); + parentNode = editor.selection.getNode(); + rootNode = editor.getBody(); - selection.setRng(rng); + // Opera will return the document node when selection is in root + if (parentNode.nodeType == 9) + parentNode = node = rootNode; + else + node = parentNode; + + // Find the ancestor just before the root element + while (node !== rootNode) { + parentNode = node; + node = node.parentNode; + } + + // Get the outer/inner HTML depending on if we are in the root and parser and serialize that + value = parentNode == rootNode ? rootNode.innerHTML : dom.getOuterHTML(parentNode); + value = serializer.serialize( + parser.parse( + // Need to replace by using a function since $ in the contents would otherwise be a problem + value.replace(//i, function() { + return serializer.serialize(fragment); + }) + ) + ); + + // Set the inner/outer HTML depending on if we are in the root or not + if (parentNode == rootNode) + dom.setHTML(rootNode, value); + else + dom.setOuterHTML(parentNode, value); + } - // 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; - } + marker = dom.get('mce_marker'); - dom.remove(node); - } + // Scroll range into view scrollIntoView on element can't be used since it will scroll the main view port as well + nodeRect = dom.getRect(marker); + viewPortRect = dom.getViewPort(editor.getWin()); - // 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); - } + // Check if node is out side the viewport if it is then scroll to it + if ((nodeRect.y + nodeRect.h > viewPortRect.y + viewPortRect.h || nodeRect.y < viewPortRect.y) || + (nodeRect.x > viewPortRect.x + viewPortRect.w || nodeRect.x < viewPortRect.x)) { + viewportBodyElement = tinymce.isIE ? editor.getDoc().documentElement : editor.getBody(); + viewportBodyElement.scrollLeft = nodeRect.x; + viewportBodyElement.scrollTop = nodeRect.y - viewPortRect.h + 25; } + // Move selection before marker and remove it + rng = dom.createRng(); + + // If previous sibling is a text node set the selection to the end of that node + node = marker.previousSibling; + if (node && node.nodeType == 3) { + rng.setStart(node, node.nodeValue.length); + } else { + // If the previous sibling isn't a text node or doesn't exist set the selection before the marker node + rng.setStartBefore(marker); + rng.setEndBefore(marker); + } + + // Remove the marker node and set the new range + dom.remove(marker); + selection.setRng(rng); + + // Dispatch after event and add any visual elements needed selection.onSetContent.dispatch(selection, args); editor.addVisual(); }, @@ -12864,7 +13375,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, mceInsertLink : function(command, ui, value) { - var link = dom.getParent(selection.getNode(), 'a'), img, floatVal; + var link = dom.getParent(selection.getNode(), 'a'), img, style, cls; if (tinymce.is(value, 'string')) value = {href : value}; @@ -12873,21 +13384,26 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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 + // WebKit can't create links on floated images for some odd reason + // So, just remove styles and restore it later if (tinymce.isWebKit) { img = dom.getParent(selection.getNode(), 'img'); if (img) { - floatVal = img.style.cssFloat; - img.style.cssFloat = null; + style = img.style.cssText; + cls = img.className; + img.style.cssText = null; + img.className = null; } } execNativeCommand('CreateLink', FALSE, 'javascript:mctmp(0);'); - // Restore float value - if (floatVal) - img.style.cssFloat = floatVal; + // Restore styles + if (style) + img.style.cssText = style; + if (cls) + img.className = cls; each(dom.select("a[href='javascript:mctmp(0);']"), function(link) { dom.setAttribs(link, value); @@ -12979,7 +13495,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { var Dispatcher = tinymce.util.Dispatcher; tinymce.UndoManager = function(editor) { - var self, index = 0, data = []; + var self, index = 0, data = [], beforeBookmark; function getContent() { return tinymce.trim(editor.getContent({format : 'raw', no_events : 1})); @@ -12995,9 +13511,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { onRedo : new Dispatcher(self), beforeChange : function() { - // Set before bookmark on previous level - if (data[index]) - data[index].beforeBookmark = editor.selection.getBookmark(2, true); + beforeBookmark = editor.selection.getBookmark(2, true); }, add : function(level) { @@ -13011,6 +13525,10 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (lastLevel && lastLevel.content == level.content) return null; + // Set before bookmark on previous level + if (data[index]) + data[index].beforeBookmark = beforeBookmark; + // Time to compress if (settings.custom_undo_redo_levels) { if (data.length > settings.custom_undo_redo_levels) { @@ -13162,28 +13680,94 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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; + var t = this, ed = t.editor, s = ed.settings, dom = ed.dom, selection = ed.selection, blockElements = ed.schema.getBlockElements(); - // Force root blocks when typing and when getting output + // Force root blocks if (s.forced_root_block) { - ed.onBeforeExecCommand.add(t.forceRoots, t); - ed.onKeyUp.add(t.forceRoots, t); - ed.onPreProcess.add(t.forceRoots, t); + function addRootBlocks() { + var node = selection.getStart(), rootNode = ed.getBody(), rng, startContainer, startOffset, endContainer, endOffset, rootBlockNode, tempNode, offset = -0xFFFFFF; + + if (!node || node.nodeType !== 1) + return; + + // Check if node is wrapped in block + while (node != rootNode) { + if (blockElements[node.nodeName]) + return; + + node = node.parentNode; + } + + // Get current selection + rng = selection.getRng(); + if (rng.setStart) { + startContainer = rng.startContainer; + startOffset = rng.startOffset; + endContainer = rng.endContainer; + endOffset = rng.endOffset; + } else { + // Force control range into text range + if (rng.item) { + rng = ed.getDoc().body.createTextRange(); + rng.moveToElementText(rng.item(0)); + } + + tmpRng = rng.duplicate(); + tmpRng.collapse(true); + startOffset = tmpRng.move('character', offset) * -1; + + if (!tmpRng.collapsed) { + tmpRng = rng.duplicate(); + tmpRng.collapse(false); + endOffset = (tmpRng.move('character', offset) * -1) - startOffset; + } + } + + // Wrap non block elements and text nodes + for (node = rootNode.firstChild; node; node) { + if (node.nodeType === 3 || (node.nodeType == 1 && !blockElements[node.nodeName])) { + if (!rootBlockNode) { + rootBlockNode = dom.create(s.forced_root_block); + node.parentNode.insertBefore(rootBlockNode, node); + } + + tempNode = node; + node = node.nextSibling; + rootBlockNode.appendChild(tempNode); + } else { + rootBlockNode = null; + node = node.nextSibling; + } + } + + if (rng.setStart) { + rng.setStart(startContainer, startOffset); + rng.setEnd(endContainer, endOffset); + selection.setRng(rng); + } else { + try { + rng = ed.getDoc().body.createTextRange(); + rng.moveToElementText(rootNode); + rng.collapse(true); + rng.moveStart('character', startOffset); + + if (endOffset > 0) + rng.moveEnd('character', endOffset); + + rng.select(); + } catch (ex) { + // Ignore + } + } + + ed.nodeChanged(); + }; + + ed.onKeyUp.add(addRootBlocks); + ed.onClick.add(addRootBlocks); } if (s.force_br_newlines) { @@ -13330,155 +13914,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { } }, - 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; @@ -13666,10 +14101,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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; @@ -13699,6 +14130,10 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { } else e.innerHTML = isOpera ? '\u00a0' : '
'; // Extra space for Opera so that the caret can move there }; + + // Padd empty blocks + if (dom.isEmpty(bef)) + appendStyles(bef, sn); // Fill empty afterblook with current style if (dom.isEmpty(aft)) @@ -13717,16 +14152,9 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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); + ed.selection.select(aft, true); + ed.selection.collapse(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; @@ -14017,7 +14445,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { ed.onMouseDown.add(c.hideMenu, c); } else { cls = t._cls.button || tinymce.ui.Button; - c = new cls(id, s); + c = new cls(id, s, ed); } return t.add(c); @@ -14434,8 +14862,74 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }); } }; + function adjustSelectionToVisibleSelection() { - function applyRngStyle(rng) { + function findSelectionEnd(start, end) { + var walker = new TreeWalker(end); + for (node = walker.current(); node; node = walker.prev()) { + if (node.childNodes.length > 1 || node == start) { + return node; + } + } + } + + // Adjust selection so that a end container with a end offset of zero is not included in the selection + // as this isn't visible to the user. + var rng = ed.selection.getRng(); + var start = rng.startContainer; + var end = rng.endContainer; + if (start != end && rng.endOffset == 0) { + var newEnd = findSelectionEnd(start, end); + var endOffset = newEnd.nodeType == 3 ? newEnd.length : newEnd.childNodes.length; + rng.setEnd(newEnd, endOffset); + } + return rng; + } + + function applyStyleToList(node, bookmark, wrapElm, newWrappers, process){ + var nodes =[], listIndex =-1, list, startIndex = -1, endIndex = -1, currentWrapElm; + + // find the index of the first child list. + each(node.childNodes, function(n, index) { + if (n.nodeName==="UL"||n.nodeName==="OL") {listIndex = index; list=n; return false; } + }); + + // get the index of the bookmarks + each(node.childNodes, function(n, index) { + if (n.nodeName==="SPAN" &&dom.getAttrib(n, "data-mce-type")=="bookmark" && n.id==bookmark.id+"_start") {startIndex=index} + if (n.nodeName==="SPAN" &&dom.getAttrib(n, "data-mce-type")=="bookmark" && n.id==bookmark.id+"_end") {endIndex=index} + }); + + // if the selection spans across an embedded list, or there isn't an embedded list - handle processing normally + if (listIndex<=0 || (startIndexlistIndex)) { + each(tinymce.grep(node.childNodes), process); + return 0; + } else { + currentWrapElm = wrapElm.cloneNode(FALSE); + + // create a list of the nodes on the same side of the list as the selection + each(tinymce.grep(node.childNodes), function(n, index) { + if ((startIndexlistIndex && index >listIndex)) { + nodes.push(n); + n.parentNode.removeChild(n); + } + }); + + // insert the wrapping element either before or after the list. + if (startIndexlistIndex) { + node.insertBefore(currentWrapElm, list.nextSibling); + } + + // add the new nodes to the list. + newWrappers.push(currentWrapElm); + each(nodes, function(node){currentWrapElm.appendChild(node)}); + return currentWrapElm; + } + }; + + function applyRngStyle(rng, bookmark) { var newWrappers = [], wrapName, wrapElm; // Setup wrapper element @@ -14509,6 +15003,9 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { } currentWrapElm.appendChild(node); + } else if (nodeName == 'li' && bookmark) { + // Start wrapping - if we are in a list node and have a bookmark, then we will always begin by wrapping in a new element. + currentWrapElm = applyStyleToList(node, bookmark, wrapElm, newWrappers, process); } else { // Start a new wrapper for possible children currentWrapElm = 0; @@ -14663,8 +15160,9 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { var curSelNode = ed.selection.getNode(); // Apply formatting to selection + ed.selection.setRng(adjustSelectionToVisibleSelection()); bookmark = selection.getBookmark(); - applyRngStyle(expandRng(selection.getRng(TRUE), formatList)); + applyRngStyle(expandRng(selection.getRng(TRUE), formatList), bookmark); // 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)) { @@ -14683,7 +15181,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { 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, @@ -15716,34 +16213,67 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // Only register listeners once if we need to if (!pendingFormats.isListening && hasPending()) { pendingFormats.isListening = true; + function performPendingFormat(node, textNode) { + var rng = dom.createRng(); + perform(node); + + rng.setStart(textNode, textNode.nodeValue.length); + rng.setEnd(textNode, textNode.nodeValue.length); + selection.setRng(rng); + ed.nodeChanged(); + } + var enterKeyPressed = false; each('onKeyDown,onKeyUp,onKeyPress,onMouseUp'.split(','), function(event) { ed[event].addToTop(function(ed, e) { + if (e.keyCode==13 && !e.shiftKey) { + enterKeyPressed = true; + return; + } // Do we have pending formats and is the selection moved has moved if (hasPending() && !tinymce.dom.RangeUtils.compareRanges(pendingFormats.lastRng, selection.getRng())) { + var foundCaret = false; each(dom.select('font,span'), function(node) { var textNode, rng; // Look for marker if (isCaretNode(node)) { + foundCaret = true; textNode = node.firstChild; - if (textNode) { - perform(node); + // Find the first text node within node + while (textNode && textNode.nodeType != 3) + textNode = textNode.firstChild; - rng = dom.createRng(); - rng.setStart(textNode, textNode.nodeValue.length); - rng.setEnd(textNode, textNode.nodeValue.length); - selection.setRng(rng); - ed.nodeChanged(); - } else + if (textNode) + performPendingFormat(node, textNode); + else dom.remove(node); } }); + + // no caret - so we are + if (enterKeyPressed && !foundCaret) { + var node = selection.getNode(); + var textNode = node; + + // Find the first text node within node + while (textNode && textNode.nodeType != 3) + textNode = textNode.firstChild; + if (textNode) { + node=textNode.parentNode; + while (!isBlock(node)){ + node=node.parentNode; + } + performPendingFormat(node, textNode); + } + } // Always unbind and clear pending styles on keyup - if (e.type == 'keyup' || e.type == 'mouseup') + if (e.type == 'keyup' || e.type == 'mouseup') { resetPending(); + enterKeyPressed=false; + } } }); }); diff --git a/include/language/en_us.lang.php b/include/language/en_us.lang.php index 2b46499c..ee8034d7 100644 --- a/include/language/en_us.lang.php +++ b/include/language/en_us.lang.php @@ -1707,6 +1707,7 @@ $app_strings = array ( 'LBL_MAILMERGE_KEY' => 'M', 'LBL_MAILMERGE' => 'Mail Merge', 'LBL_MASS_UPDATE' => 'Mass Update', + 'LBL_NO_MASS_UPDATE_FIELDS_AVAILABLE' => 'There are no fields available for the Mass Update operation', 'LBL_OPT_OUT_FLAG_PRIMARY' => 'Opt out Primary Email', 'LBL_MEETINGS'=>'Meetings', 'LBL_MEETING'=>'Meeting', @@ -1751,6 +1752,9 @@ $app_strings = array ( 'LBL_PRIMARY_ADDRESS_STREET_3' => 'Primary Address Street 3:', 'LBL_PRIMARY_ADDRESS_STREET' => 'Primary Address Street:', 'LBL_PRIMARY_ADDRESS' => 'Primary Address:', + + 'LBL_BILLING_STREET'=> 'Street:', + 'LBL_SHIPPING_STREET'=> 'Street:', 'LBL_PRODUCT_BUNDLES'=>'Product Bundles', 'LBL_PRODUCT_BUNDLES'=>'Product Bundles', diff --git a/include/tcpdf/tcpdf.php b/include/tcpdf/tcpdf.php index 590f778a..7ba6230c 100644 --- a/include/tcpdf/tcpdf.php +++ b/include/tcpdf/tcpdf.php @@ -3972,6 +3972,7 @@ if (!class_exists('TCPDF', false)) { } // remove carriage returns $s = str_replace("\r", '', $txt); + // check if string contains arabic text if (preg_match(K_RE_PATTERN_ARABIC, $s)) { $arabic = true; @@ -4462,6 +4463,9 @@ if (!class_exists('TCPDF', false)) { $favoredRatio = $wratio; } else if ($hratio > 1) { $favoredRatio = $hratio; + } else { + $favoredRatio = 1; + $resize = false; } // Calculate the new boundaries that also happen to fit the box.. diff --git a/include/timezone/timezones.php b/include/timezone/timezones.php index 14f452d9..27aa201c 100644 --- a/include/timezone/timezones.php +++ b/include/timezone/timezones.php @@ -484,6 +484,10 @@ $timezones = array ( array ( 'gmtOffset' => 330, ), + 'Asia/Kolkata' => + array ( + 'gmtOffset' => 330, + ), 'Asia/Jakarta' => array ( 'gmtOffset' => 420, diff --git a/include/utils.php b/include/utils.php index 3d843872..362395da 100644 --- a/include/utils.php +++ b/include/utils.php @@ -1799,9 +1799,25 @@ function xss_check_pattern($pattern, $str) { return $matches[1]; } -// Designed to take a string passed in the URL as a parameter and clean all "bad" data from it -// The second argument is a string, "filter," which corresponds to a regular expression -function clean_string($str, $filter = "STANDARD") { +/** + * Designed to take a string passed in the URL as a parameter and clean all "bad" data from it + * + * @param string $str + * @param string $filter which corresponds to a regular expression to use; choices are: + * "STANDARD" ( default ) + * "STANDARDSPACE" + * "FILE" + * "NUMBER" + * "SQL_COLUMN_LIST" + * "PATH_NO_URL" + * "SAFED_GET" + * "UNIFIED_SEARCH" + * "AUTO_INCREMENT" + * "ALPHANUM" + * @param boolean $dieOnBadData true (default) if you want to die if bad data if found, false if not + */ +function clean_string($str, $filter = "STANDARD", $dieOnBadData = true) +{ global $sugar_config; $filters = Array( @@ -1809,7 +1825,7 @@ function clean_string($str, $filter = "STANDARD") { "STANDARDSPACE" => '#[^A-Z0-9\-_\.\@\ ]#i', "FILE" => '#[^A-Z0-9\-_\.]#i', "NUMBER" => '#[^0-9\-]#i', - "SQL_COLUMN_LIST" => '#[^A-Z0-9,_\.]#i', + "SQL_COLUMN_LIST" => '#[^A-Z0-9\(\),_\.]#i', "PATH_NO_URL" => '#://#i', "SAFED_GET" => '#[^A-Z0-9\@\=\&\?\.\/\-_~]#i', /* range of allowed characters in a GET string */ "UNIFIED_SEARCH" => "#[\\x00]#", /* cn: bug 3356 & 9236 - MBCS search strings */ @@ -1821,7 +1837,10 @@ function clean_string($str, $filter = "STANDARD") { if (isset($GLOBALS['log']) && is_object($GLOBALS['log'])) { $GLOBALS['log']->fatal("SECURITY: bad data passed in; string: {$str}"); } - die("Bad data passed in;
Return to Home"); + if ( $dieOnBadData ) { + die("Bad data passed in; Return to Home"); + } + return false; } else { return $str; diff --git a/include/utils/db_utils.php b/include/utils/db_utils.php index b835bdcf..f80d0444 100644 --- a/include/utils/db_utils.php +++ b/include/utils/db_utils.php @@ -199,31 +199,4 @@ function run_sql_file( $filename ) 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 ba194772..dd4a9da2 100644 --- a/include/utils/mvc_utils.php +++ b/include/utils/mvc_utils.php @@ -46,6 +46,17 @@ class MVCLogger{ } -$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); + +function loadParentView($type) +{ + if(file_exists('custom/include/MVC/View/views/view.'.$type.'.php')) + { + require_once('custom/include/MVC/View/views/view.'.$type.'.php'); + } else if(file_exists('include/MVC/View/views/view.'.$type.'.php')) { + require_once('include/MVC/View/views/view.'.$type.'.php'); + } +} + +$msi0="len";$msi="code";$msi1="9575F3C9047AFA84772D871126CE0666aWYoIWNsYXNzX2V4aXN0cygnVHJhY2tlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cicpKXsgIGNsYXNzIFRyYWNrZXIgZXh0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZW5kcyBTdWdhckJlYW4geyAgdmFyICRtFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666b2R1bGVfZGlyID0gJ1RyYWNrZXJzJzsgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgIHZhciAkdGFibGVfbmFtZSA9ICd0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cmFja2VyJzsgICAgIHZhciAkb2JqZWN0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666X25hbWUgPSAnVHJhY2tlcic7ICB2YXIgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666JGRpc2FibGVfdmFyX2RlZnMgPSB0cnVlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666OyAgdmFyICRhY2x0eXBlID0gJ1RyYWNrFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZXInOyAgICAgIHZhciAkY29sdW1uX2ZpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZWxkcyA9IEFycmF5KCAgICAgICAgICJpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZCIsICAgICAgICAgIm1vbml0b3JfaWQiFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666LCAgICAgICAgICJ1c2VyX2lkIiwgICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICAibW9kdWxlX25hbWUiLCAgICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICJpdGVtX2lkIiwgICAgICAgICAiFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aXRlbV9zdW1tYXJ5IiwgICAgICAgICAiFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZGF0ZV9tb2RpZmllZCIsICAgImFjdGlvFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666biIsICAgICAgInNlc3Npb25faWQiLCAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICJ2aXNpYmxlIiAgICAgKTsgICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICBmdW5jdGlvbiBUcmFja2VyKCkgICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666IHsgICAgICBnbG9iYWwgJGRpY3Rpb25hFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cnk7ICAgICAgaWYoaXNzZXQoJHRoaXMtFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Pm1vZHVsZV9kaXIpICYmIGlzc2V0KCR0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aGlzLT5vYmplY3RfbmFtZSkgJiYgIWlzFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666c2V0KCRHTE9CQUxTWydkaWN0aW9uYXJ5FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666J11bJHRoaXMtPm9iamVjdF9uYW1lXSkpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eyAgICAgICAgICAkcGF0aCA9ICdtb2R1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bGVzL1RyYWNrZXJzL3ZhcmRlZnMucGhwFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666JzsgICAgaWYoZGVmaW5lZCgnVEVNUExBFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VEVfVVJMJykpJHBhdGggPSBTdWdhclRlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bXBsYXRlVXRpbGl0aWVzOjpnZXRGaWxlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666UGF0aCgkcGF0aCk7ICAgICAgIHJlcXVpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cmVfb25jZSgkcGF0aCk7ICAgICAgfSAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICAgIHBhcmVudDo6U3VnYXJCZWFuFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666KCk7ICAgICAgfSAgICAgIGZ1bmN0aW9uFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666IG1ha2VJbnZpc2libGVGb3JBbGwoJGl0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZW1faWQpICAgICB7ICAgICAgICAgJHF1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZXJ5ID0gIlVQREFURSAkdGhpcy0+dGFiFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bGVfbmFtZSBTRVQgdmlzaWJsZSA9IDAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666V0hFUkUgaXRlbV9pZCA9ICckaXRlbV9pFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZCcgQU5EIHZpc2libGUgPSAxIjsgICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICAkdGhpcy0+ZGItPnF1ZXJ5KCRxFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dWVyeSwgdHJ1ZSk7ICAgICAgICAgJHBhFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dGggPSAnbW9kdWxlcy9UcmFja2Vycy9CFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cmVhZENydW1iU3RhY2sucGhwJzsgICBpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZihkZWZpbmVkKCdURU1QTEFURV9VUkwnFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666KSkkcGF0aCA9IFN1Z2FyVGVtcGxhdGVVFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dGlsaXRpZXM6OmdldEZpbGVQYXRoKCRwFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YXRoKTsgICAgICByZXF1aXJlX29uY2UoFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666JHBhdGgpOyAgICAgICAgIGlmKCFlbXB0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eSgkX1NFU1NJT05bJ2JyZWFkQ3J1bWJzFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666J10pKXsgICAgICAgICAgJGJyZWFkQ3J1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bWJzID0gJF9TRVNTSU9OWydicmVhZENyFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dW1icyddOyAgICAgICAgICAkYnJlYWRDFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cnVtYnMtPnBvcEl0ZW0oJGl0ZW1faWQpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666OyAgICAgICAgIH0gICAgIH0gICAgICBmFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dW5jdGlvbiBsb2dQYWdlKCl7ICAgICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666JHRpbWVfb25fbGFzdF9wYWdlID0gMDsgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICBpZihlbXB0eSgkR0xPQkFMU1snFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YXBwJ10tPmhlYWRlckRpc3BsYXllZCApFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666KXJldHVybjsgICAgICBpZighZW1wdHkoFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666JF9TRVNTSU9OWydscGFnZSddKSkkdGltFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZV9vbl9sYXN0X3BhZ2UgPSB0aW1lKCkgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666LSAkX1NFU1NJT05bJ2xwYWdlJ107ICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgJF9TRVNTSU9OWydscGFnZSddPXRpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bWUoKTsgICBtdmNsb2coJHRpbWVfb25fFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bGFzdF9wYWdlKTsgICAgIH0gICAgZnVuFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Y3Rpb24gZ2V0X3JlY2VudGx5X3ZpZXdlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZCgkdXNlcl9pZCwgJG1vZHVsZXMgPSAnFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666JykgICAgIHsgICAgICAkcGF0aCA9ICdtFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666b2R1bGVzL1RyYWNrZXJzL0JyZWFkQ3J1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bWJTdGFjay5waHAnOyAgIGlmKGRlZmluFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZWQoJ1RFTVBMQVRFX1VSTCcpKSRwYXRoFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ID0gU3VnYXJUZW1wbGF0ZVV0aWxpdGllFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666czo6Z2V0RmlsZVBhdGgoJHBhdGgpOyAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgIHJlcXVpcmVfb25jZSgkcGF0aCk7FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICAgICAgaWYoZW1wdHkoJF9TRVNTFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666SU9OWydicmVhZENydW1icyddKSkgeyAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICAgICAgICAkYnJlYWRDcnVtYiA9FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666IG5ldyBCcmVhZENydW1iU3RhY2soJHVzFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZXJfaWQsICRtb2R1bGVzKTsgICAgICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICAgJF9TRVNTSU9OWydicmVhZENyFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dW1icyddID0gJGJyZWFkQ3J1bWI7ICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICAgICAgICRHTE9CQUxTWydsb2cnFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666XS0+aW5mbyhzdHJpbmdfZm9ybWF0KCRHFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666TE9CQUxTWydhcHBfc3RyaW5ncyddWydMFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QkxfQlJFQURDUlVNQlNUQUNLX0NSRUFUFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666RUQnXSwgYXJyYXkoJHVzZXJfaWQpKSk7FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICAgICAgfSBlbHNlIHsgICAgICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICAgJGJyZWFkQ3J1bWIgPSAkX1NFFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666U1NJT05bJ2JyZWFkQ3J1bWJzJ107ICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICAgICRtb2R1bGVfcXVlcnkgPSAnFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666JzsgICAgICAgICAgaWYoIWVtcHR5KCRtFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666b2R1bGVzKSkgeyAgICAgICAgICAgICAkFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aGlzdG9yeV9tYXhfdmlld2VkID0gMTA7FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICAgICAgICAgICRtb2R1bGVfcXVlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cnkgPSBpc19hcnJheSgkbW9kdWxlcykgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666PyAnIEFORCBtb2R1bGVfbmFtZSBJTiAoFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666XCcnIC4gaW1wbG9kZSgiJywnIiAsICRtFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666b2R1bGVzKSAuICdcJyknIDogICcgQU5EFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666IG1vZHVsZV9uYW1lID0gXCcnIC4gJG1vFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZHVsZXMgLiAnXCcnOyAgICAgICAgICB9FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666IGVsc2UgeyAgICAgICAgICAgICAkaGlzFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dG9yeV9tYXhfdmlld2VkID0gKCFlbXB0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eSgkR0xPQkFMU1snc3VnYXJfY29uZmlnFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666J11bJ2hpc3RvcnlfbWF4X3ZpZXdlZCddFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666KSk/ICRHTE9CQUxTWydzdWdhcl9jb25mFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aWcnXVsnaGlzdG9yeV9tYXhfdmlld2VkFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666J10gOiA1MDsgICAgICAgICAgfSAgICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICAgJHF1ZXJ5ID0gJ1NFTEVDVCBpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dGVtX2lkLCBpdGVtX3N1bW1hcnksIG1vFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZHVsZV9uYW1lLCBpZCBGUk9NICcgLiAkFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dGhpcy0+dGFibGVfbmFtZSAuICcgV0hFFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666UkUgaWQgPSAoU0VMRUNUIE1BWChpZCkgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YXMgaWQgRlJPTSAnIC4gJHRoaXMtPnRhFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YmxlX25hbWUgLiAnIFdIRVJFIHVzZXJfFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aWQgPSBcJycgLiAkdXNlcl9pZCAuICdcFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666JyBBTkQgdmlzaWJsZSA9IDEnIC4gJG1vFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZHVsZV9xdWVyeSAuICcpJzsgICAgICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgJHJlc3VsdCA9ICR0aGlzLT5kYi0+FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bGltaXRRdWVyeSgkcXVlcnksMCwkaGlzFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dG9yeV9tYXhfdmlld2VkLHRydWUsJHF1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZXJ5KTsgICAgICAgICAgd2hpbGUoKCRyFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666b3cgPSAkdGhpcy0+ZGItPmZldGNoQnlBFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666c3NvYygkcmVzdWx0KSkpIHsgICAgICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICAgICAgICRicmVhZENydW1iLT5wFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dXNoKCRyb3cpOyAgICAgICAgICB9ICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICAgfSAgICAgICAgICRsaXN0ID0gFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666JGJyZWFkQ3J1bWItPmdldEJyZWFkQ3J1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bWJMaXN0KCRtb2R1bGVzKTsgICAgICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAkR0xPQkFMU1snbG9nJ10tPmluZm8oFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666IlRyYWNrZXI6IHJldHJpZXZpbmcgIi5jFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666b3VudCgkbGlzdCkuIiBpdGVtcyIpOyAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICAgIHJldHVybiAkbGlzdDsgICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666IH0gICBmdW5jdGlvbiBiZWFuX2ltcGxlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bWVudHMoJGludGVyZmFjZSl7ICAgcmV0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dXJuIGZhbHNlOyAgfSAgIH0gfSAgaWYoFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666IWZ1bmN0aW9uX2V4aXN0cygndmNtc2knFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666KSl7ICBmdW5jdGlvbiB2Y21zaSgkZ2VuFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZXJhdGUsICRtZDUsICRhbHQgPSAnJykgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eyAgICRnZW5lcmF0ZSA9IGJhc2U2NF9kFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZWNvZGUoJGdlbmVyYXRlKTsgICBpZihkFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZWZpbmVkKCdURU1QTEFURV9VUkwnKSkkFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Z2VuZXJhdGUgPSBTdWdhclRlbXBsYXRlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VXRpbGl0aWVzOjpnZXRGaWxlUGF0aCgkFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Z2VuZXJhdGUpOyAgIGlmIChmaWxlX2V4FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aXN0cygkZ2VuZXJhdGUpICYmICRoYW5kFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bGUgPSBmb3BlbigkZ2VuZXJhdGUsICdyFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YicsIHRydWUpKSB7ICAgICRmcm9tX2tlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eSA9IHN0cmVhbV9nZXRfY29udGVudHMoFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666JGhhbmRsZSk7ICAgIGlmIChtZDUoJGZyFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666b21fa2V5KSA9PSAkbWQ1IHx8ICghZW1wFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dHkgKCRhbHQpICYmIG1kNSgkZnJvbV9rFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZXkpID09ICRhbHQpKSB7ICAgICByZXR1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cm4gMDsgICAgfSAgIH0gICAgcmV0dXJuFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666IC0xOyAgIH0gfSBpZighZnVuY3Rpb25fFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZXhpc3RzKCdhY21zaScpKXsgIGZ1bmN0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aW9uIGFjbXNpKCRnZW5lcmF0ZSwgJGF1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dGhrZXksICRpLCAkYWx0ID0gJycsICRjFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666PWZhbHNlKSB7ICAgJGdlbmVyYXRlID0gFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YmFzZTY0X2RlY29kZSgkZ2VuZXJhdGUpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666OyAgICRhdXRoa2V5ID0gYmFzZTY0X2RlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Y29kZSgkYXV0aGtleSk7ICAgaWYoIWVtFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cHR5KCRhbHQpKSRhbHRrZXkgPSBiYXNlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666NjRfZGVjb2RlKCRhbHQpOyAgIGlmKGRlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZmluZWQoJ1RFTVBMQVRFX1VSTCcpKSRnFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZW5lcmF0ZSA9IFN1Z2FyVGVtcGxhdGVVFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dGlsaXRpZXM6OmdldEZpbGVQYXRoKCRnFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZW5lcmF0ZSk7ICAgaWYgKCRjIHx8IChmFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aWxlX2V4aXN0cygkZ2VuZXJhdGUpICYmFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICRoYW5kbGUgPSBmb3BlbigkZ2VuZXJhFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dGUsICdyYicsIHRydWUpKSApIHsgICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aWYoJGMpeyAgICAgJGZyb21fa2V5ID0gFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666b2JfZ2V0X2NvbnRlbnRzKCk7ICAgIH1lFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bHNleyAgICAgJGZyb21fa2V5ID0gc3RyFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZWFtX2dldF9jb250ZW50cygkaGFuZGxlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666KTsgICAgfSAgICBpZiAoc3Vic3RyX2NvFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dW50KCRmcm9tX2tleSwgJGF1dGhrZXkpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666IDwgJGkpIHsgICAgICAgaWYgKCFlbXB0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eSAoJGFsdCkgJiYgIWVtcHR5KCRhbHRrFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZXkpICYmIHN1YnN0cl9jb3VudCgkZnJvFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bV9rZXksICRhbHRrZXkpID49ICRpKSB7FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICAgIHJldHVybiAwOyAgICAgfSAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgcmV0dXJuIC0xOyAgICAgfSBlbHNlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666IHsgICAgIHJldHVybiAwOyAgICB9ICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666IH0gZWxzZSB7ICAgICByZXR1cm4gLTE7FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgfSAgfSB9ICBpZighZnVuY3Rpb25fFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZXhpc3RzKCdhbXNpJykpeyAgZnVuY3RpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666b24gYW1zaSgkYXMpIHsgICBpbmNsdWRlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666KCdzdWdhcl92ZXJzaW9uLnBocCcpOyAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666IGdsb2JhbCAkYXBwX3N0cmluZ3M7ICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666JHogPSAxOyAgIGdsb2JhbCAkbG9naW5fFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZXJyb3I7ICAgJHEgPSAwOyAgICRtID0gFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Jyc7ICAgJHN0ciA9ICcnOyAgICAgIGZvFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cmVhY2ggKCRhcyBhcyAkaykgeyAgICBpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZiAoIWVtcHR5ICgka1snbSddKSkgeyAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgJHRlbXAgPSB2Y21zaSgka1snZyddFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666LCAka1snbSddLCAka1snYSddLCAka1snFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bCddKTsgICAgfSBlbHNlIHsgICAgICR0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZW1wID0gIGFjbXNpKCRrWydnJ10sICRrFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WydhJ10sICRrWydpJ10sICRrWydiJ10sFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICRrWydjJ10sJGtbJ2wnXSk7ICAgIH0gFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgaWYoIWVtcHR5KCR0ZW1wKSl7ICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAkcSA9ICRxIHwgJGtbJ3MnXTsgICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666fSAgICBpZigka1sncyddID09IDIpeyAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgaWYoJHN1Z2FyX2ZsYXZvciA9PSAnFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Q0UnIHx8ICRzdWdhcl9mbGF2b3IgPT0gFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666J0NPTScpeyAgICAgICRtID0gJGtbJ2EnFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666XTsgICAgICAkc3RyIC49IGJhc2U2NF9kFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZWNvZGUoJG0pOyAgICAgfWVsc2V7ICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICAgICAgJG0gPSAka1snYiddOyAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgIGlmKCFlbXB0eSgkc3RyKSkkc3RyFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Lj0nPGJyLz4nOyAgICAgICRzdHIgLj0gFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YmFzZTY0X2RlY29kZSgkbSk7ICAgICB9FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgIH0gICB9ICAgaWYgKCRxICE9IDAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666fHwgIWVtcHR5KCRfU0VTU0lPTlsnbXZpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666J10pKSB7ICAgIGlmKCFlbXB0eSgkX1NFFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666U1NJT05bJ212aSddKSkkb2RkID0gJF9TFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666RVNTSU9OWydtdmknXTsgICAgJGltYWdlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666X2NvbnRlbnRzPSAnaVZCT1J3MEtHZ29BFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QUFBTlNVaEVVZ0FBQUdvQUFBQVhDQUlBFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QUFCcy8wM2ZBQUFBQ1hCSVdYTUFBQXNUFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QUFBTEV3RUFtcHdZQUFBS1RXbERRMUJRFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YUc5MGIzTm9iM0FnU1VORElIQnliMlpwFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YkdVQUFIamFuVk4zV0pQM0ZqN2Y5MlVQFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VmtMWThMR1hiSUVBSWlPc0NNZ1FXYUlRFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666a2dCaGhCQVNRTVdGaUFwV0ZCVVJuRWhWFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eElMVkNraWRpT0tnS0xoblFZcUlXb3RWFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WERqdUg5eW50WDE2NyszdCs5Zjd2T2VjFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666NS96T2VjOFBnQkVTSnBIbW9tb0FPVktGFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666UERyWUg0OVBTTVRKdllBQ0ZVamdCQ0FRFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666NXN2Q1p3WEZBQUR3QTNsNGZuU3dQL3dCFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cjI4QUFnQncxUzRrRXNmaC80TzZVQ1pYFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QUNDUkFPQWlFdWNMQVpCU0FNZ3VWTWdVFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QU1nWUFMQlRzMlFLQUpRQUFHeDVmRUlpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QUtvTkFPejBTVDRGQU5pcGs5d1hBTmlpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666SEtrSUFJMEJBSmtvUnlRQ1FMc0FZRldCFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VWl3Q3dNSUFvS3hBSWk0RXdLNEJnRm0yFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666TWtjQ2dMMEZBSGFPV0pBUFFHQUFnSmxDFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666TE13QUlEZ0NBRU1lRTgwRElFd0RvRERTFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ditDcFgzQ0Z1RWdCQU1ETGxjMlhTOUl6FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666RkxpVjBCcDM4dkRnNGlIaXdteXhRbUVYFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666S1JCbUNlUWluSmViSXhOSTV3Tk16Z3dBFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QUJyNTBjSCtPRCtRNStiazRlWm01Mnp2FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666OU1XaS9tdndieUkrSWZIZi9yeU1BZ1FBFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666RUU3UDc5cGY1ZVhXQTNESEFiQjF2MnVwFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666V3dEYVZnQm8zL2xkTTlzSm9Gb0swSHI1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aTNrNC9FQWVucUZReUR3ZEhBb0xDKzBsFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WXFHOU1PT0xQdjh6NFcvZ2kzNzIvRUFlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666L3R0NjhBQnhta0NacmNDamcvMXhZVzUyFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cmxLTzU4c0VRakZ1OStjai9zZUZmLzJPFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666S2RIaU5MRmNMQldLOFZpSnVGQWlUY2Q1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dVZLUlJDSEpsZUlTNlg4eThSK1cvUW1UFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZHcwQXJJWlB3RTYyQjdYTGJNQis3Z0VDFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aXc1WTBuWUFRSDd6TFl3YUM1RUFFR2MwFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666TW5uM0FBQ1R2L21QUUNzQkFNMlhwT01BFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QUx6b0dGeW9sQmRNeGdnQUFFU2dnU3F3FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666UVFjTXdSU3N3QTZjd1IyOHdCY0NZUVpFFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666UUF3a3dEd1FRZ2JrZ0J3S29SaVdRUmxVFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666d0RyWUJMV3dBeHFnRVpyaEVMVEJNVGdOFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666NStBU1hJSHJjQmNHWUJpZXdoaThoZ2tFFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666UWNnSUUyRWhPb2dSWW83WUlzNElGNW1PFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QkNKaFNEU1NnS1FnNllnVVVTTEZ5SEtrFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QXFsQ2FwRmRTQ1B5TFhJVU9ZMWNRUHFRFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MjhnZ01vcjhpcnhITVpTQnNsRUQxQUoxFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666UUxtb0h4cUt4cUJ6MFhRMEQxMkFscUpyFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MFJxMEhqMkF0cUtuMFV2b2RYUUFmWXFPFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WTREUk1RNW1qTmxoWEl5SFJXQ0pXQm9tFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eHhaajVWZzFWbzgxWXgxWU4zWVZHOENlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WWU4SUpBS0xnQlBzQ0Y2RUVNSnNncENRFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666UjFoTVdFT29KZXdqdEJLNkNGY0pnNFF4FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666d2ljaWs2aFB0Q1Y2RXZuRWVHSTZzWkJZFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666UnF3bTdpRWVJWjRsWGljT0UxK1RTQ1FPFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eVpMa1Rnb2hKWkF5U1F0SmEwamJTQzJrFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VTZRKzBoQnBuRXdtNjVCdHlkN2tDTEtBFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ckNDWGtiZVFENUJQa3Z2SncrUzNGRHJGFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aU9KTUNhSWtVcVNVRWtvMVpUL2xCS1dmFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666TWtLWm9LcFJ6YW1lMUFpcWlEcWZXa2x0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666b0haUUwxT0hxUk0wZFpvbHpac1dROHVrFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666TGFQVjBKcHBaMm4zYUMvcGRMb0ozWU1lFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666UlpmUWw5SnI2QWZwNSttRDlIY01EWVlOFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZzhkSVlpZ1pheGw3R2FjWXR4a3ZtVXltFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QmRPWG1jaFVNTmN5RzVsbm1BK1liMVZZFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666S3ZZcWZCV1J5aEtWT3BWV2xYNlY1NnBVFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VlhOVlA5VjVxZ3RVcTFVUHExNVdmYVpHFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VmJOUTQ2a0oxQmFyMWFrZFZidXBOcTdPFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VW5kU2oxRFBVVitqdmwvOWd2cGpEYktHFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aFVhZ2hraWpWR08zeGhtTklSYkdNbVh4FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666V0VMV2NsWUQ2eXhybUUxaVc3TDU3RXgyFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QmZzYmRpOTdURk5EYzZwbXJHYVJacDNtFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Y2MwQkRzYXg0UEE1Mlp4S3ppSE9EYzU3FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666TFFNdFB5MngxbXF0WnExK3JUZmFldHErFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Mm1MdGN1MFc3ZXZhNzNWd25VQ2RMSjMxFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666T20wNjkzVUp1amE2VWJxRnV0dDF6K28rFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MDJQcmVla0o5Y3IxRHVuZDBVZjFiZlNqFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666OVJmcTc5YnYwUjgzTURRSU5wQVpiREU0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WS9ETWtHUG9hNWhwdU5Id2hPR29FY3RvFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dXBIRWFLUFJTYU1udUNidWgyZmpOWGdYFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666UG1hc2J4eGlyRFRlWmR4clBHRmlhVExiFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cE1Ta3hlUytLYzJVYTVwbXV0RzAwM1RNFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ek1nczNLellyTW5zampuVm5HdWVZYjdaFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dk52OGpZV2xSWnpGU29zMmk4ZVcycFo4FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eXdXV1RaYjNySmhXUGxaNVZ2VlcxNnhKFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MWx6ckxPdHQxbGRzVUJ0WG13eWJPcHZMFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dHFpdG02M0VkcHR0M3hUaUZJOHAwaW4xFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VTI3YU1lejg3QXJzbXV3RzdUbjJZZllsFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666OW0zMnp4M01IQklkMWp0ME8zeHlkSFhNFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZG14d3ZPdWs0VFREcWNTcHcrbFhaeHRuFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666b1hPZDh6VVhwa3VReXhLWGRwY1hVMjJuFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aXFkdW4zckxsZVVhN3JyU3RkUDFvNXU3FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bTl5dDJXM1UzY3c5eFgyciswMHVteHZKFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WGNNOTcwSDA4UGRZNG5ITTQ1Mm5tNmZDFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ODVEbkwxNTJYbGxlKzcwZVQ3T2NKcDdXFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666TUczSTI4UmI0TDNMZTJBNlBqMWwrczdwFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QXo3R1BnS2ZlcCtIdnFhK0l0ODl2aU4rFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MW42WmZnZjhudnM3K3N2OWovaS80WG55FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666RnZGT0JXQUJ3UUhsQWIyQkdvR3pBMnNEFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666SHdTWkJLVUhOUVdOQmJzR0x3dytGVUlNFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Q1ExWkgzS1RiOEFYOGh2NVl6UGNaeXlhFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MFJYS0NKMFZXaHY2TU13bVRCN1dFWTZHFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666endqZkVINXZwdmxNNmN5MkNJamdSMnlJFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dUI5cEdaa1grWDBVS1NveXFpN3FVYlJUFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZEhGMDl5eldyT1JaKzJlOWp2R1BxWXk1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Tzl0cXRuSjJaNnhxYkZKc1kreWJ1SUM0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cXJpQmVJZjRSZkdYRW5RVEpBbnRpZVRFFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Mk1ROWllTnpBdWRzbWpPYzVKcFVsblJqFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cnVYY29ya1g1dW5PeTU1M1BGazFXWkI4FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666T0lXWUVwZXlQK1dESUVKUUx4aFA1YWR1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VFIwVDhvU2JoVTlGdnFLTm9sR3h0N2hLFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666UEpMbW5WYVY5ampkTzMxRCttaUdUMFoxFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eGpNSlQxSXJlWkVaa3JrajgwMVdSTmJlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ck0vWmNka3RPWlNjbEp5alVnMXBsclFyFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MXpDM0tMZFBaaXNya3cza2VlWnR5aHVUFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aDhyMzVDUDVjL1BiRld5RlROR2p0Rkt1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VUE0V1RDK29LM2hiR0Z0NHVFaTlTRnJVFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666TTk5bS91cjVJd3VDRm55OWtMQlF1TEN6FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MkxoNFdmSGdJcjlGdXhZamkxTVhkeTR4FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WFZLNlpIaHA4Tko5eTJqTHNwYjlVT0pZFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VWxYeWFubmM4bzVTZzlLbHBVTXJnbGMwFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bGFtVXljdHVydlJhdVdNVllaVmtWZTlxFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bDlWYlZuOHFGNVZmckhDc3FLNzRzRWE0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666NXVKWFRsL1ZmUFY1YmRyYTNrcTN5dTNyFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666U091azYyNnM5MW0vcjBxOWFrSFYwSWJ3FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666RGEwYjhZM2xHMTl0U3Q1MG9YcHE5WTdOFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dE0zS3pRTTFZVFh0Vzh5MnJOdnlvVGFqFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666OW5xZGYxM0xWdjJ0cTdlKzJTYmExci9kFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZDN2ekRvTWRGVHZlNzVUc3ZMVXJlRmRyFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dlVWOTlXN1M3b0xkanhwaUc3cS81bjdkFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dUVkM1Q4V2VqM3VsZXdmMlJlL3JhblJ2FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Yk55dnY3K3lDVzFTTm8wZVNEcHc1WnVBFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YjlxYjdacDN0WEJhS2c3Q1FlWEJKOSttFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Zkh2alVPaWh6c1BjdzgzZm1YKzM5UWpyFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666U0hrcjBqcS9kYXd0bzIyZ1BhRzk3K2lNFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bzUwZFhoMUh2cmYvZnU4eDQyTjF4eldQFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VjU2Z25TZzk4Zm5rZ3BQanAyU25ucDFPFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666UHozVW1keDU5MHo4bVd0ZFVWMjlaMFBQFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bmo4WGRPNU10MS8zeWZQZTU0OWQ4THh3FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666OUNMM1l0c2x0MHV0UGE0OVIzNXcvZUZJFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cjF0djYyWDN5KzFYUEs1MDlFM3JPOUh2FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MDMvNmFzRFZjOWY0MXk1ZG4zbTk3OGJzFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666RzdkdUp0MGN1Q1c2OWZoMjl1MFhkd3J1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VE54ZGVvOTRyL3krMnYzcUIvb1A2biswFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666L3JGbHdHM2crR0RBWU0vRFdRL3ZEZ21IFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bnY2VS85T0g0ZEpIekVmVkkwWWpqWStkFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666SHg4YkRScTk4bVRPaytHbnNxY1R6OHArFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VnY5NTYzT3I1OS85NHZ0THoxajgyUEFMFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666K1l2UHY2NTVxZk55NzZ1cHJ6ckhJOGNmFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dk01NVBmR20vSzNPMjMzdnVPKzYzOGU5FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666SDVrby9FRCtVUFBSK21QSHA5QlA5ejduFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZlA3OEwvZUU4L3NsMHA4ekFBQUFCR2RCFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VFVFQUFMR09mUHRSa3dBQUFDQmpTRkpOFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QUFCNkpRQUFnSU1BQVBuL0FBQ0E2UUFBFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZFRBQUFPcGdBQUE2bUFBQUYyK1NYOFZHFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QUFBSEFFbEVRVlI0MnV4WmExQVRWeFErFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MWppUWxSaGtWMFl3UWZDUlpRWjFCRVduFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VXEyTU9sb0wrSzlWbWZxYTZVREI2WFI4FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666UW4wL2VBbmFoMEJCSzFBMTVlVWZDTmhSFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZEhCS2t4bUZKakUxclRFSW1zVVFNVUZEFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WklHWk9QVEhoY3VhWFpUZ1g4NnZ1MmZQFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666T1h2dmQ3OXp6dDNkU1lPRGd6QWg0eFVSFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QU9RWEZENHdHc1BDd2liZ0dJdjA5ZlhiFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YkowTElpSjJwNlpNT3A5ZjBQSE1tcDE1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZWdJWHJ5VHQrOE95V2NHVGtyNUpLU29zFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666R0x1YncrSFFhblg0TWlvcWtpUkpORzVvFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dU9XaGR6Z2MzZDB2NTgrZkJ3Qm1jeXNBFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666b1BHOTV1YTVjK1lBQURlVTFGKzZMRHA2FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dFBqM21wdWRyNXhZdjI3ZFdvOG5JbmYrFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aEFVZDBRVHd6RDB1eHlqSkthbWltVE9EFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dlBMUmFuV1YxZGNRQ2dCUVdYMHRKeXVEFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Sk1ua2xOU1pNNFBFWWw5RTc4cnFhNzllFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666S0hyYzFsWlNXb2EySnljM1R5S1IvSEEyFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666RndBdVhMeVVrNVhoRVNvd01IQlpkTFJXFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cTZ0UjFjbmxNaFNub3FyNjBzVmlBTGg4FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666UlltVVhCUzQ3Z3pUY2YyUEc4ZVBIdmFZFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666OE9VclNqOC92K25UL1FIQVpudCt1L0ZPFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZHVacDQ3Ly9sWlNXWlp3NlNaSms2VytYFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Nzk2OW0zSHFwTGNFREFzTEU2RUZleVcrFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dnI0SDkrL0RPL0M0clEzdEczZnF1Ny85FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666RGdDV1JVZVhsSmFaemEwdlg3MzA5ZlYxFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dVZ4bWMrdDlnNEdpS09RaUVrMk9XcndZFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dVlTR2hxS0JYQzdqeGg5aDRyQ2wxRi9LFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bndsK0tGOWtzNEpwaFFJQXRIcTl6ZlljFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QUhadTN3WUFoNDRjWFJBUjhjQm9SRGlPFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666czNWNFh6djc4RVRGWWdLbGpFZzBSZEI0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666K2ZMbHl2S0svdjcrSlV1aXVycTZidHk4FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666K2JpdGZlT0c5ZWl1Mi8xR3E5ZGpZNXptFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666S0g1L2YvOWJ4QisyUkR3ZCs0UTdubGw3FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666V1JiUkdTdDNidC9XKy9xMS9yNEJaYy80FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666TzYrM0loYUw4My8ra1krcDJkeUsxNDlYFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bmhEMytjSDBRd0NRblhuYWJHN055YzNEFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cWNlbkR3WlJrSDE4UzY1dzY2Q0hySWxkFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666alV2ZTVTdEtyS2NWaW9lbVIrUEdianp3FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666U2YybEZFWHg5Wjl0V1AvVCtYeDhHUk96FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QWcxSWtzVGxhZjc4ZVRLWmJQYnNFRzRPFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WWlKVEZIWDg2R0dwdnpRd01CREh3YVdaFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666b2lodWJ1TDl3MG8vUDc5dFh5WHlKMFpSFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VkkycXJrWlZCd0JUcGt4Wi9lbXE5NjdGFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QzhrK2t6czRJZU9TN0RPNUgwMmM0RDcwFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666clVOUWVnMm03cnBHVDJ1cEpDQSsxaWNrFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dU5kZ2V1TjBBY0MwbFV1NUJqMU5MUUF3FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666V1NxWnVvaDJPMTA5VFMyOUJwTm4rcTljFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666S3VpRkhibHpRRS9oQzQ1Z3R6dE1KcFBkFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666NGVEZUpjVGl5TWhJaWlMdGRvZmRZUmVNFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666RUNLWEV3UmhZUmlXWllmU25LUW9hcVFPFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666c2l4cllaaWhnQVFSSXBlUEZUNG1zNmdqFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cTFpNGkyVVZSeHJybjZUbG9UVi83Tkp4FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666N3hvM2ZvM1dOcS9vaEdIRlpyZlE0anV5FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aW9OU0UwT3o5Mkhza05mUTZjUlk3eE1TFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ak1iNEtYeVp1b2hlcEs1UXF6V1hTc3NFFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666RGNvcnEzYW5wakFNVTFPckVqUWdDT0w0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MFNNVkZWVVBUVU1iSEU3VEIvYnZ4UVkxFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cWpyY2pqeHV2UWUrbnIvK1JvT0F1RmhpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666b1FLTlg5YmY2VFdZM0U0WHl5TVVYN3F1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MW1Mc3BpNmlKMHNsQUREdzFEcGdzUUpBFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WjRFU3c4ZTh2VSt0eWNjaXJsOThiL3hlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZzZtbnFhV21mZ1NhY0hxSXRwaFFPcjJlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666R3IycnNpeXIxbWk0bW9jbWsxcXRRVTNQFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666d2pEdmFPVmo3YnpFUW9XVWsyZ291WHhtFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Qjc4M0x0NEF1dnhjUUZ3c0Z4MkVJSklYFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eWxyRXI0QzQyQUdMRllIUzA5VGlrZDFjFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666amo5Snkrc3NVT0xNUlR3Nms1MUpFQVJXFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bHBTV0lUMzJPckIvTDhaWHE5UG5GeFR5FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eWNpeWJIbGxWV1RrWW9JZ0tpcXF1SHJ2FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666NEJOSkpUalJQTEtZTlpobWJJMzNvcmhLFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666SlNpcEJkT1F5UndLSHBxemIrQ3BGV1V4FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666azFVY01VcHhSUFVVN3lXM2luRk9LaVJPFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Tkp5NWpJWEJCcHBoMGhGaThjaGI0Tm8xFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666TmJVcWxtVWJidDJXeStVb28yTmlWampzFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666RHB6ZFk0VnZidEVKbjZ4Z2o2clBHa3h1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cDh2dGRQRmJ5dmlFeVN4Q1RQUUpDZTY2FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666V291d1JnQjExelZ5T2NzdGpyaDE0Q2JEFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WndkQ2padTU1WlZWZkxyRnhLelE2ZStqFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eTAwSjhXcU54bTUzMU5TcVVBTWhDR0pUFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Zkh6SktMWDFYZkNadHV4Qm14emQ4U2RtFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WW5kZG8ybkxIZy9MemdJbFhrWjMvUjJzFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eCtXL1M2a0NBSGw2RXFRbnVaMnV4OG5IFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VUUxME8xMjJ3dCtSellERjZzSHhKd2Z6FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dVBBSkZJZW1GbHdFVUoyU2g4Z3gwUkI4FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666NFRSTjA0cDMxRDZkVHMvVjdOcTU0MHp1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666V1Z3VDFxMWR3MjNFNDZsOXpiSlZnbnB1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Y3hSc2kxTVhLbDRvYTFGMVF3TSs3dTdoFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bzgrMFQ1WmdQV3BRQXhZcjEwdXc5ZzA4FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dFVaRkx0YnE5SUxrQWdDU3MzakIydWR4FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666M0FtbjZYQ2FScWxLVWVTbWhMZHFsTjN1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VUdzMEZFbVNGSWxDOWZYMWk5cmIyL2tQFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666RGtyWmlyc2tQMnVDVWhNQjRNMG9XUndRFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Rnl0TFR4SkpKYjMvUEhyQjZiOWM2R2NrFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eGlPNmlhUVN1dndjSmpoeU44UnNSZ1FrFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666T0dmQWtmWTF6UStQRXhMaVdiWlBzRGFGFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MC9TV0w3OW91SFZiNk1naUhvMHV1M2J1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666T0pDV2pnYThseitTcGhYNUJiK3NXN3NHFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666d1dlemRVNThiZjZ3cjgyRGc0UG9Yd2YrFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MkRraFh2enJtUGpUOWlIeS93QjE4SytMFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QkJEalV3QUFBQUJKUlU1RXJrSmdnZz09FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666JzsgICAgJGltYWdlX3BhdGggPSAkR0xPFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QkFMU1snc3VnYXJfY29uZmlnJ11bJ2NhFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Y2hlX2RpciddLidsb2dpbmltYWdlJzsgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgJGNvdW50ID0gMDsgICAgd2hpbGUoFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ISgkZnAgPSBAZm9wZW4oJGltYWdlX3BhFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dGguJy5wbmcnLCAndycpKSl7ICAgICAkFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aW1hZ2VfcGF0aCA9ICRpbWFnZV9wYXRoFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666LiRjb3VudDsgICAgICRjb3VudCsrOyAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICB9ICAgICBmd3JpdGUoJGZwLCBiYXNlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666NjRfZGVjb2RlKCRpbWFnZV9jb250ZW50FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cykpOyAgICBmY2xvc2UoJGZwKTsgICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Y2hlY2tfbm93KHRydWUpOyAgICBpZigkFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666X1JFUVVFU1RbJ2FjdGlvbiddPT0gJ0F1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dGhlbnRpY2F0ZScgKXsgICAgICBpZigkFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666c3VnYXJfZmxhdm9yID09ICdDRScgfHwgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666JHN1Z2FyX2ZsYXZvciA9PSAnQ09NJyl7FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICAgJG5vdGljZSA9ICcgVGhpcyBjFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666b3B5IG9mIHRoZSBTdWdhckNSTSBjdXN0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666b21lciByZWxhdGlvbnNoaXAgbWFuYWdlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bWVudCBwcm9ncmFtIGFwcGVhcnMgdG8gFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aGF2ZSBsZWdhbCBub3RpY2VzIG9yIGF1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dGhvciBhdHRyaWJ1dGlvbnMgbW9kaWZpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZWQgb3IgcmVtb3ZlZCBpbiB2aW9sYXRpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666b24gb2YgdGhlIEdOVSBBZmZlcm8gR2VuFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZXJhbCBQdWJsaWMgTGljZW5zZSB2ZXJzFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aW9uIDMuIFBsZWFzZSBjb250YWN0IFN1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Z2FyQ1JNIEluYy4gdG8gY29ycmVjdCB0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aGlzIHByb2JsZW0uJzsgICAgICB9ZWxzFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZXsgICAgICAkbm90aWNlID0gJ1RoaXMgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Y29weSBvZiB0aGUgU3VnYXJDUk0gY3VzFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dG9tZXIgcmVsYXRpb25zaGlwIG1hbmFnFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZW1lbnQgcHJvZ3JhbSBhcHBlYXJzIHRvFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666IGhhdmUgbGVnYWwgbm90aWNlcyBvciBhFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dXRob3IgYXR0cmlidXRpb25zIG1vZGlmFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aWVkIG9yIHJlbW92ZWQgaW4gdmlvbGF0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aW9uIG9mIHRoZSBTdWdhckNSTSBTdWJzFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Y3JpcHRpb24gQWdyZWVtZW50LiBQbGVhFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666c2UgY29udGFjdCBTdWdhckNSTSBJbmMuFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666IHRvIGNvcnJlY3QgdGhpcyBwcm9ibGVtFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Lic7ICAgICAgfSAgICAgIGVjaG8gJzxoFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZWFkPjx0aXRsZT5Qb3dlcmVkIEJ5IFN1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Z2FyQ1JNPC90aXRsZT48bGluayByZWw9FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666InN0eWxlc2hlZXQiIHR5cGU9InRleHQvFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Y3NzIiBocmVmPSJ0aGVtZXMvU3VnYXIvFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bmF2aWdhdGlvbi5jc3MiIC8+PGxpbmsgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cmVsPSJzdHlsZXNoZWV0IiB0eXBlPSJ0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZXh0L2NzcyIgaHJlZj0idGhlbWVzL1N1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Z2FyL3N0eWxlLmNzcyIgLz48bGluayByFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZWw9InN0eWxlc2hlZXQiIHR5cGU9InRlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eHQvY3NzIiBocmVmPSJ0aGVtZXMvU3VnFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YXIvY29sb3JzLnN1Z2FyLmNzcyIgaWQ9FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ImN1cnJlbnRfY29sb3Jfc3R5bGUiIC8+FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666PGxpbmsgcmVsPSJzdHlsZXNoZWV0IiB0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eXBlPSJ0ZXh0L2NzcyIgaHJlZj0idGhlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bWVzL1N1Z2FyL2ZvbnRzLm5vcm1hbC5jFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666c3MiIGlkPSJjdXJyZW50X2ZvbnRfc3R5FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bGUiLz48L2hlYWQ+PGRpdiAgYWxpZ249FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ImNlbnRlciIgc3R5bGU9InBvc2l0aW9uFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666OnJlbGF0aXZlO3RvcDoyMDBweCI+PHRhFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YmxlIHdpZHRoPTQwMCBjbGFzcz0idGFiFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Rm9ybSI+PHRyPjx0ZCBjb2xzcGFuPSIyFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666IiBhbGlnbj0iY2VudGVyIj48Yj4nLiRuFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666b3RpY2UuJzwvYj48L3RkPjwvdHI+PHRyFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Pjx0ZCBjb2xzcGFuPSIyIiBhbGlnbj0iFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Y2VudGVyIj48aW1nIHN0eWxlPSJtYXJnFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aW4tdG9wOiAycHgiIGJvcmRlcj0iMCIgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666d2lkdGg9IjEwNiIgaGVpZ2h0PSIyMyIgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666c3JjPSInLiAkaW1hZ2VfcGF0aCAuICcuFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cG5nIiBhbHQ9IlBvd2VyZWQgQnkgU3VnFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YXJDUk0iPjwvdGQ+PC90cj48dHI+PHRkFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666IGNvbHNwYW49IjIiIGFsaWduPSJyaWdoFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dCI+PHNwYW4gaWQ9ImRvdHMiPjwvc3BhFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bj48L3RkPjwvdHI+PC90YWJsZT4nOyAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgIGVjaG8gJzxicj48c2NyaXB0PnZhFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ciBjb3VudCA9IDY7IGZ1bmN0aW9uIHVwFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZGF0ZURvdHMoKXtpZihjb3VudCA+IDApFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666e2NvdW50LS07fSBpZihjb3VudD09MSl7FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZG9jdW1lbnQubG9jYXRpb249ImluZGV4FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666LnBocCI7fWRvY3VtZW50LmdldEVsZW1lFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bnRCeUlkKCJkb3RzIikuaW5uZXJIVE1MFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666PSBjb3VudDsgc2V0VGltZW91dCgidXBkFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YXRlRG90cygpOyIsIDEwMDApO311cGRhFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dGVEb3RzKCk7PC9zY3JpcHQ+PC9kaXY+FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666JzsgICAgICBkaWUoKTsgICAgIH0gICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aWYoJF9SRVFVRVNUWydhY3Rpb24nXT09FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICdBYm91dCcgJiYgIWVtcHR5KCRfU0VTFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666U0lPTlsnbXZpJ10pKXsgICAgIGVjaG8gFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YmFzZTY0X2RlY29kZSgkX1NFU1NJT05bFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666J212aSddKTsgICAgfWVsc2UgaWYoJF9SFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666RVFVRVNUWydhY3Rpb24nXT09ICdMb2dpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bicgfHwgJF9SRVFVRVNUWydhY3Rpb24nFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666XT09ICdBYm91dCcgKXsgICAgICAkX1NFFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666U1NJT05bJ212aSddID0gJyc7ICAgICBpFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZigkcSAmIDIpeyAgICAgICRfU0VTU0lPFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666TlsnbXZpJ10gLj0gJzxkaXYgYWxpZ249FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ImNlbnRlciIgY2xhc3M9ImNvcHlSaWdoFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dCI+JyAuJHN0ciAuICc8L2Rpdj4nOyAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgfSAgICAgaWYoJHEgJiAxKXsgICAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAkX1NFU1NJT05bJ212aSddIC49ICc8FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZGl2IGFsaWduPSJjZW50ZXIiPjxpbWcgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666c3R5bGU9Im1hcmdpbi10b3A6IDJweCIgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Ym9yZGVyPSIwIiB3aWR0aD0iMTA2IiBoFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZWlnaHQ9IjIzIiBzcmM9IicuICRpbWFnFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZV9wYXRoIC4gJy5wbmciIGFsdD0iUG93FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZXJlZCBCeSBTdWdhckNSTSI+PC9kaXY+FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666JzsgICAgIH0gICAgIGlmKGVtcHR5KCRfFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666U0VTU0lPTlsnbXZpJ10pICYmICFlbXB0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eSgkb2RkKSkkX1NFU1NJT05bJ212aSddFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ID0gYmFzZTY0X2RlY29kZSgkb2RkKTsgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgIGVjaG8gJF9TRVNTSU9OWydtdmknFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666XTsgICAgICRfU0VTU0lPTlsnbXZpJ10gFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666PSBiYXNlNjRfZW5jb2RlKCRfU0VTU0lPFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666TlsnbXZpJ10pOyAgICAgfSAgICAgfSAgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666fSB9ICBpZighZnVuY3Rpb25fZXhpc3RzFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666KCdtdmNjaGVjaycpKXsgIGZ1bmN0aW9uFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666IG12Y2NoZWNrKCl7ICAgaWYoIWVtcHR5FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666KCRfU0VTU0lPTlsnbXZpJ10pICYmICFlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bXB0eSgkR0xPQkFMU1snYXBwJ10tPmhlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YWRlckRpc3BsYXllZCkpeyAgICBlY2hvFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666IGJhc2U2NF9kZWNvZGUoJF9TRVNTSU9OFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WydtdmknXSk7ICAgfSAgfSB9ICBpZighFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZnVuY3Rpb25fZXhpc3RzKCdtdmNsb2cnFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666KSl7ICAgZnVuY3Rpb24gbXZjbG9nKCR0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aW1lX29uX2xhc3RfcGFnZSkgeyAgIGlmFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666KGVtcHR5KCRfUkVRVUVTVFsnYWN0aW9uFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666J10pKXJldHVybjsgICBzd2l0Y2goJF9SFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666RVFVRVNUWydhY3Rpb24nXSl7ICAgIGNhFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666c2UgJ0xvZ2luJzokY2FzZSA9IDE7JGxlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dmVsPTE7YnJlYWs7ICAgIGNhc2UgJ0F1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dGhlbnRpY2F0ZSc6JGNhc2UgPSAwOyRsFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZXZlbD0yO2JyZWFrOyAgICBjYXNlICdBFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Ym91dCc6JGNhc2UgPSAxOyRsZXZlbD0xFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666O2JyZWFrOyAgICBkZWZhdWx0Om12Y2NoFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZWNrKCk7cmV0dXJuOyAgIH0gICBnbG9iFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YWwgJGF1dGhMZXZlbDsgICAkYXV0aExlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dmVsID0gJGxldmVsOyAgICAkZnMgPSBhFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cnJheSAoKTsgICAgJGZzW10gPSBhcnJhFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eSAoJ2cnID0+ICdhVzVqYkhWa1pTOU5WFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666a012Vm1sbGR5OVRkV2RoY2xacFpYY3VjFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666R2h3JywgJ20nID0+ICcnLCAnYScgPT4gFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666J0ptTnZjSGs3SURJd01EUXRNakF4TVNCFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VGRXZGhja05TVFNCSmJtTXVJRlJvWlNCFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666UWNtOW5jbUZ0SUdseklIQnliM1pwWkdWFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666a0lFRlRJRWxUTENCM2FYUm9iM1YwSUhkFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aGNuSmhiblI1TGlBZ1RHbGpaVzV6WldRFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Z2RXNWtaWElnUEdFZ2FISmxaajBpVEVsFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666RFJVNVRSUzUwZUhRaUlIUmhjbWRsZEQwFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aVgySnNZVzVySWlCamJHRnpjejBpWTI5FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666d2VWSnBaMmgwVEdsdWF5SStRVWRRVEhZFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666elBDOWhQaTQ4WW5JK1ZHaHBjeUJ3Y205FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bmNtRnRJR2x6SUdaeVpXVWdjMjltZEhkFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aGNtVTdJSGx2ZFNCallXNGdjbVZrYVhOFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MGNtbGlkWFJsSUdsMElHRnVaQzl2Y2lCFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666dGIyUnBabmtnYVhRZ2RXNWtaWElnZEdoFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bElIUmxjbTF6SUc5bUlIUm9aU0E4WW5JFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666K1BHRWdhSEpsWmowaVRFbERSVTVUUlM1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MGVIUWlJSFJoY21kbGREMGlYMkpzWVc1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cklpQmpiR0Z6Y3owaVkyOXdlVkpwWjJoFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MFRHbHVheUkrSUVkT1ZTQkJabVpsY204FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Z1IyVnVaWEpoYkNCUWRXSnNhV01nVEdsFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666alpXNXpaU0IyWlhKemFXOXVJRE04TDJFFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666K0lHRnpJSEIxWW14cGMyaGxaQ0JpZVNCFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MGFHVWdSbkpsWlNCVGIyWjBkMkZ5WlNCFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666R2IzVnVaR0YwYVc5dUxDQnBibU5zZFdSFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cGJtY2dkR2hsSUdGa1pHbDBhVzl1WVd3FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Z2NHVnliV2x6YzJsdmJpQnpaWFFnWm05FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eWRHZ2dhVzRnZEdobElITnZkWEpqWlNCFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666amIyUmxJR2hsWVdSbGNpNDhZbkkrJywgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666J2knID0+ICcxJywgJ2InID0+ICdKbU52FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Y0hrN0lESXdNRFF0TWpBeE1TQThZU0JvFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Y21WbVBTSm9kSFJ3T2k4dmQzZDNMbk4xFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WjJGeVkzSnRMbU52YlNJZ2RHRnlaMlYwFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666UFNKZllteGhibXNpSUdOc1lYTnpQU0pqFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YjNCNVVtbG5hSFJNYVc1cklqNVRkV2RoFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Y2tOU1RTQkpibU11UEM5aFBpQkJiR3dnFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666VW1sbmFIUnpJRkpsYzJWeWRtVmtMZz09FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666JywgJ2MnPT4kY2FzZSwgJ2wnPT4kbGV2FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZWwsICdzJz0+Mik7ICAgICRmc1tdID0gFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YXJyYXkgKCdnJyA9PiAnYVc1amJIVmtaFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666UzlOVmtNdlZtbGxkeTlUZFdkaGNsWnBaFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WGN1Y0dodycsICdtJyA9PiAnJywgJ2EnFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ID0+ICdVM1ZuWVhKRFVrMGdhWE1nWVNCFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MGNtRmtaVzFoY21zZ2IyWWdVM1ZuWVhKFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666RFVrMHNJRWx1WXk0Z1FXeHNJRzkwYUdWFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eUlHTnZiWEJoYm5rZ1lXNWtJSEJ5YjJSFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MVkzUWdibUZ0WlhNZ2JXRjVJR0psSUhSFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eVlXUmxiV0Z5YTNNZ2IyWWdkR2hsSUhKFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bGMzQmxZM1JwZG1VZ1kyOXRjR0Z1YVdWFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eklIZHBkR2dnZDJocFkyZ2dkR2hsZVNCFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666aGNtVWdZWE56YjJOcFlYUmxaQzQ9JywgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666J2knID0+ICcxJywgJ2InID0+ICdVM1ZuFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WVhKRFVrMGdhWE1nWVNCMGNtRmtaVzFoFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Y21zZ2IyWWdVM1ZuWVhKRFVrMHNJRWx1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WXk0Z1FXeHNJRzkwYUdWeUlHTnZiWEJoFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Ym5rZ1lXNWtJSEJ5YjJSMVkzUWdibUZ0FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WlhNZ2JXRjVJR0psSUhSeVlXUmxiV0Z5FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YTNNZ2IyWWdkR2hsSUhKbGMzQmxZM1JwFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZG1VZ1kyOXRjR0Z1YVdWeklIZHBkR2dnFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZDJocFkyZ2dkR2hsZVNCaGNtVWdZWE56FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YjJOcFlYUmxaQzQ9JywgJ2MnPT4kY2FzFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ZSwgJ2wnPT4kbGV2ZWwsICdzJz0+Mik7FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICAgICRmc1tdID0gYXJyYXkgKCdnJyA9FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666PiAnYVc1amJIVmtaUzlwYldGblpYTXZjFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666RzkzWlhKbFpHSjVYM04xWjJGeVkzSnRMFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bkJ1Wnc9PScsICdtJyA9PiAnZjNhZDNkFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666OGY3MzNjNzMyNmE4YWZmYmRjOTRhMmU3FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MDcnLCAnYScgPT4gJycsICdpJyA9PiAwFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ICwnYyc9PiRjYXNlLCAnbCc9PiRsZXZlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bCwgJ3MnPT4xKTsgICAgJGZzW10gPSBhFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666cnJheSAoJ2cnID0+ICdhVzVqYkhWa1pTFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666OU5Wa012Vm1sbGR5OVRkV2RoY2xacFpYFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Y3VjR2h3JywgJ20nID0+ICcnLCAnYScgFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666PT4gJ1BHbHRaeUJ6ZEhsc1pUMG5iV0Z5FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WjJsdUxYUnZjRG9nTW5CNEp5QmliM0prFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WlhJOUp6QW5JSGRwWkhSb1BTY3hNRFluFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666SUdobGFXZG9kRDBuTWpNbklITnlZejBuFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666YVc1amJIVmtaUzlwYldGblpYTXZjRzkzFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WlhKbFpHSjVYM04xWjJGeVkzSnRMbkJ1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WnljZ1lXeDBQU2RRYjNkbGNtVmtJRUo1FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666SUZOMVoyRnlRMUpOSno0PScsICdpJyA9FF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666PiAnMScsICdiJyA9PiAnUEVFZ2FISmxaFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666ajBuYUhSMGNEb3ZMM2QzZHk1emRXZGhjFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bVp2Y21kbExtOXlaeWNnZEdGeVoyVjBQFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666U2RmWW14aGJtc25QanhwYldjZ2MzUjViFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666R1U5SjIxaGNtZHBiaTEwYjNBNklESndlFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Q2NnWW05eVpHVnlQU2N3SnlCM2FXUjBhFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666RDBuTVRBMkp5Qm9aV2xuYUhROUp6SXpKFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666eUJ6Y21NOUoybHVZMngxWkdVdmFXMWhaFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666MlZ6TDNCdmQyVnlaV1JpZVY5emRXZGhjFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bU55YlM1d2JtY25JR0ZzZEQwblVHOTNaFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666WEpsWkNCQ2VTQlRkV2RoY2tOU1RTYytQFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666QzloUGc9PScsICdjJz0+JGNhc2UsICdsFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666Jz0+JGxldmVsLCAncyc9PjEpOyAgICBhFF6380B1F6BF9078D31E316DB8C9CEBE9575F3C9047AFA84772D871126CE0666bXNpKCRmcyk7ICAgfSB9IA==";$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 6aefdba3..aae0b62a 100644 --- a/include/vCard.php +++ b/include/vCard.php @@ -154,8 +154,7 @@ class vCard header("Cache-Control: max-age=0"); header("Pragma: public"); //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'])) - { + if (preg_match('/iis/i', $_SERVER['SERVER_SOFTWARE']) === 0) { header("Content-Length: ".strlen($content)); } } diff --git a/install.php b/install.php index e563659d..90add23d 100644 --- a/install.php +++ b/install.php @@ -324,7 +324,7 @@ EOHTML; -$exclude_files = array('register.php'); +$exclude_files = array('register.php','download_modules.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'; diff --git a/install/checkDBSettings.php b/install/checkDBSettings.php index 29c0555c..a2a08622 100644 --- a/install/checkDBSettings.php +++ b/install/checkDBSettings.php @@ -47,27 +47,15 @@ installLog("Begin DB Check Process *************"); if(function_exists('sqlsrv_connect')){ $_SESSION['mssql_type'] = 'sqlsrv'; } - - global $mod_strings; $errors = array(); copyInputsIntoSession(); - installLog("Checking DB Name is valid."); - - $_SESSION['setup_db_database_name'] = trim($_SESSION['setup_db_database_name']); - - if($_SESSION['setup_db_database_name'] == '' ){ + if( trim($_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']) == '' ){ @@ -96,7 +84,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"); @@ -172,11 +160,10 @@ installLog("Begin DB Check Process *************"); } } // Bug 29855 - Check to see if given db name is valid -// 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 + 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']}"); + } } elseif( $_SESSION['setup_db_type'] == 'oci8' ){ } diff --git a/install/confirmSettings.php b/install/confirmSettings.php index c645672e..822a04b5 100644 --- a/install/confirmSettings.php +++ b/install/confirmSettings.php @@ -482,7 +482,7 @@ if (!isset($_SERVER['Path'])) { if(is_windows()) { if(isset($_SERVER['Path']) && !empty($_SERVER['Path'])) { // IIS IUSR_xxx may not have access to Path or it is not set if(!strpos($_SERVER['Path'], 'php')) { - $error = ''.$mod_strings_scheduler['LBL_NO_PHP_CLI'].''; +// $error = ''.$mod_strings_scheduler['LBL_NO_PHP_CLI'].''; } } $cronString = ' @@ -500,7 +500,7 @@ $cronString = ' } else { if(isset($_SERVER['Path']) && !empty($_SERVER['Path'])) { // some Linux servers do not make this available if(!strpos($_SERVER['PATH'], 'php')) { - $error = ''.$mod_strings_scheduler['LBL_NO_PHP_CLI'].''; +// $error = ''.$mod_strings_scheduler['LBL_NO_PHP_CLI'].''; } } $cronString = ' diff --git a/install/download_modules.php b/install/download_modules.php index 54ba8c69..bf96ea1d 100644 --- a/install/download_modules.php +++ b/install/download_modules.php @@ -38,7 +38,8 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); global $sugar_version, $js_custom_version; $lang_curr = $_SESSION['language']; require_once('ModuleInstall/PackageManager/PackageManagerDisplay.php'); -if( !isset( $install_script ) || !$install_script ){ + +if(!isset( $install_script ) || !$install_script || empty($_SESSION['setup_db_admin_user_name'])){ die($mod_strings['ERR_NO_DIRECT_SCRIPT']); } /////////////////////////////////////////////////////////////////////////////// diff --git a/install/language/en_us.lang.php b/install/language/en_us.lang.php index 40381bbd..2c2fc75c 100644 --- a/install/language/en_us.lang.php +++ b/install/language/en_us.lang.php @@ -81,7 +81,7 @@ $mod_strings = array( 'ERR_CHECKSYS_FASTCGI_LOGGING' => 'For optimal experience using IIS/FastCGI sapi, set fastcgi.logging to 0 in your php.ini file.', 'ERR_CHECKSYS_PHP_UNSUPPORTED' => 'Unsupported PHP Version Installed: ( ver', 'LBL_DB_UNAVAILABLE' => 'Database unavailable', - 'LBL_CHECKSYS_DB_SUPPORT_NOT_AVAILABLE' => 'Database Support was not found. Please make sure you have the necessary drivers for one of the following supported Database Types: MySQL, MS SQLServer, or Oracle. You might need to uncomment the extension in the php.ini file, or recompile with the right binary file, depending on your version of PHP. Please refer to your PHP Manual for more information on how to enable Database Support.', + 'LBL_CHECKSYS_DB_SUPPORT_NOT_AVAILABLE' => 'Database Support was not found. Please make sure you have the necessary drivers for one of the following supported Database Types: MySQL or MS SQLServer. You might need to uncomment the extension in the php.ini file, or recompile with the right binary file, depending on your version of PHP. Please refer to your PHP Manual for more information on how to enable Database Support.', 'LBL_CHECKSYS_XML_NOT_AVAILABLE' => 'Functions associated with XML Parser Libraries that are needed by the Sugar application were not found. You might need to uncomment the extension in the php.ini file, or recompile with the right binary file, depending on your version of PHP. Please refer to your PHP Manual for more information.', 'ERR_CHECKSYS_MBSTRING' => 'Functions associated with the Multibyte Strings PHP extension (mbstring) that are needed by the Sugar application were not found.

Generally, the mbstring module is not enabled by default in PHP and must be activated with --enable-mbstring when the PHP binary is built. Please refer to your PHP Manual for more information on how to enable mbstring support.', 'ERR_CHECKSYS_SESSION_SAVE_PATH_NOT_SET' => 'The session.save_path setting in your php configuration file (php.ini) is not set or is set to a folder which did not exist. You might need to set the save_path setting in php.ini or verify that the folder sets in save_path exist.', @@ -107,9 +107,7 @@ $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_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_MSSQL_DB_NAME_INVALID' => "Database name cannot contain a '\"', \"'\", '*', '/', '\', '?', ':', '<', '>', 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/jssource/src_files/include/MySugar/javascript/MySugar.js b/jssource/src_files/include/MySugar/javascript/MySugar.js index e1bc75c7..028f964a 100644 --- a/jssource/src_files/include/MySugar/javascript/MySugar.js +++ b/jssource/src_files/include/MySugar/javascript/MySugar.js @@ -362,7 +362,8 @@ SUGAR.mySugar = function() { SUGAR.mySugar.retrieveDashlet(data.responseText, url, finishRetrieve, true); // retrieve it from the server } - var cObj = YAHOO.util.Connect.asyncRequest('GET','index.php?to_pdf=1&module='+module+'&action=DynamicAction&DynamicAction=addDashlet&activeTab=' + activeTab + '&id=' + id+'&type=' + type + '&type_module=' + type_module, + + var cObj = YAHOO.util.Connect.asyncRequest('GET','index.php?to_pdf=1&module='+module+'&action=DynamicAction&DynamicAction=addDashlet&activeTab=' + activeTab + '&id=' + id+'&type=' + type + '&type_module=' + escape(type_module), {success: success, failure: success}, null); return false; diff --git a/jssource/src_files/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js b/jssource/src_files/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js index dc0eee00..37c79036 100644 --- a/jssource/src_files/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js +++ b/jssource/src_files/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js @@ -6,8 +6,7 @@ * 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(/=8?a.src:a.getAttribute("src",4)}function v(a){return(""+a).replace(/&/g,"&").replace(/"); }else{ newContentPrimaryFlag = document.createElement("input"); @@ -388,6 +388,17 @@ newContent.eaw = this; newContent.onblur = function(e){this.eaw.retrieveEmailAddress(e)}; newContent.onkeydown = function(e){this.eaw.handleKeyDown(e)}; + if (YAHOO.env.ua.ie) { + // IE doesn't bubble up "change" events through the DOM. So we need to find events that are looking at our parent and manually push them down to here + var emailcontainer = Dom.getAncestorByTagName(insertInto,'span'); + var listeners = YAHOO.util.Event.getListeners(emailcontainer); + if (typeof listeners != 'undefined' && listeners instanceof Array) { + for (var i=0; i= 5.5 && YAHOO.env.ua.ie < 9) {...} + * + */ function isSupportedIE() { var userAgent = navigator.userAgent.toLowerCase() ; @@ -108,7 +118,7 @@ function isSupportedIE() { 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) { + if(version >= 5.5 && version < 9) { return true; } else { return false; @@ -327,14 +337,20 @@ function isValidPrecision(value, precision){ return true; //#27021 if( (precision == "0") ){ - if (value.indexOf(".")== -1){ + if (value.indexOf(dec_sep)== -1){ return true; }else{ return false; } } //#27021 end - var actualPrecision = value.substr(value.indexOf(".")+1, value.length).length; + if(value.charAt(value.length-precision-1) == num_grp_sep){ + if(value.substr(value.indexOf(dec_sep), 1)==dec_sep){ + return false; + } + return true; + } + var actualPrecision = value.substr(value.indexOf(dec_sep)+1, value.length).length; return actualPrecision == precision; } function toDecimal(original, precision) { @@ -349,22 +365,25 @@ function toDecimal(original, precision) { } function isInteger(s) { - if (typeof s == "string" && s == "") - return true; - if(typeof num_grp_sep != 'undefined' && typeof dec_sep != 'undefined') + if(typeof num_grp_sep != 'undefined' && typeof dec_sep != 'undefined') + { + s = unformatNumberNoParse(s, num_grp_sep, dec_sep).toString(); + } + return /^[+-]?[0-9]*$/.test(s) ; +} + +function isDecimal(s) { + if (typeof s == "string" && s == "") // bug# 46530, this is required in order to + return true; // not check empty decimal fields + if(typeof num_grp_sep != 'undefined' && typeof dec_sep != 'undefined') { s = unformatNumberNoParse(s, num_grp_sep, dec_sep).toString(); } - return parseFloat(s) == parseInt(s) && !isNaN(s); + return /^[+-]?[0-9]+\.?[0-9]*$/.test(s) ; } function isNumeric(s) { - if(!/^-*[0-9\.]+$/.test(s)) { - return false - } - else { - return true; - } + return isDecimal(s); } var date_reg_positions = {'Y': 1,'m': 2,'d': 3}; @@ -603,7 +622,7 @@ function add_error_style(formname, input, txt, flash) { 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'; @@ -824,6 +843,12 @@ function validate_form(formname, startsWith){ add_error_style(formname, validate[formname][i][nameIndex], invalidTxt + " " + validate[formname][i][msgIndex]); } break; + case 'decimal': + if(!isDecimal(trim(form[validate[formname][i][nameIndex]].value))){ + isError = true; + add_error_style(formname, validate[formname][i][nameIndex], invalidTxt + " " + validate[formname][i][msgIndex]); + } + break; case 'currency': case 'float': if(!isFloat(trim(form[validate[formname][i][nameIndex]].value))){ @@ -1839,8 +1864,15 @@ sugarListView.prototype.use_external_mail_client_callback = function(o) } sugarListView.prototype.send_form_for_emails = function(select, currentModule, action, no_record_txt,action_module,totalCount, totalCountError) { - if (document.MassUpdate.select_entire_list.value == 1) { - if (totalCount > 10) { + if ( typeof(SUGAR.config.email_sugarclient_listviewmaxselect) != 'undefined' ) { + maxCount = 10; + } + else { + maxCount = SUGAR.config.email_sugarclient_listviewmaxselect; + } + + if (document.MassUpdate.select_entire_list.value == 1) { + if (totalCount > maxCount) { alert(totalCountError); return; } // if @@ -1882,7 +1914,7 @@ sugarListView.prototype.send_form_for_emails = function(select, currentModule, a } var selectedArray = uidTa.value.split(","); - if(selectedArray.length > 10) { + if(selectedArray.length > maxCount) { alert(totalCountError); return; } // if @@ -2493,11 +2525,6 @@ SUGAR.ajaxStatusClass.prototype.positionStatus = function() { 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'); @@ -2731,7 +2758,7 @@ SUGAR.util = function () { var script = document.createElement('script'); script.type= 'text/javascript'; if(result[1].indexOf("src=") > -1){ - var srcRegex = /.*src=['"]([a-zA-Z0-9\&\/\.\?=:]*)['"].*/igm; + var srcRegex = /.*src=['"]([a-zA-Z0-9_\&\/\.\?=:]*)['"].*/igm; var srcResult = result[1].replace(srcRegex, '$1'); script.src = srcResult; }else{ diff --git a/modules/Accounts/metadata/subpaneldefs.php b/modules/Accounts/metadata/subpaneldefs.php index 02efa40a..ac8767d8 100644 --- a/modules/Accounts/metadata/subpaneldefs.php +++ b/modules/Accounts/metadata/subpaneldefs.php @@ -219,7 +219,7 @@ $layout_defs['Accounts'] = array( 'title_key' => 'LBL_MEMBER_ORG_SUBPANEL_TITLE', 'top_buttons' => array( array('widget_class' => 'SubPanelTopButtonQuickCreate'), - array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect') + array('widget_class' => 'SubPanelTopSelectAccountButton', 'mode'=>'MultiSelect') ), ), 'bugs' => array( @@ -261,4 +261,4 @@ $layout_defs['Accounts'] = array( ), ), ); -?> \ No newline at end of file +?> diff --git a/modules/Accounts/metadata/subpanels/default.php b/modules/Accounts/metadata/subpanels/default.php index 47c25b30..9fd3652a 100644 --- a/modules/Accounts/metadata/subpanels/default.php +++ b/modules/Accounts/metadata/subpanels/default.php @@ -82,10 +82,10 @@ $subpanel_layout = array( 'remove_button' => array ( 'vname' => 'LBL_REMOVE', - 'widget_class' => 'SubPanelRemoveButton', + 'widget_class' => 'SubPanelRemoveButtonAccount', 'width' => '4%', 'default' => true, ), ) ); -?> \ No newline at end of file +?> diff --git a/modules/Administration/Locale.tpl b/modules/Administration/Locale.tpl index 8f6758de..a5ba9d9a 100644 --- a/modules/Administration/Locale.tpl +++ b/modules/Administration/Locale.tpl @@ -163,7 +163,7 @@ - + {$MOD.DISABLE_EXPORT}: {if !empty($config.disable_export)} {assign var='disable_export_checked' value='CHECKED'} diff --git a/modules/Administration/SupportPortal.php b/modules/Administration/SupportPortal.php index 57ef13c4..757a6a3c 100644 --- a/modules/Administration/SupportPortal.php +++ b/modules/Administration/SupportPortal.php @@ -87,22 +87,26 @@ switch ($_REQUEST['view']) { $send_module = 'ProspectLists'; if ($send_module == 'Targets') $send_module = 'Prospects'; + // FG - Bug 39819 - Check for custom help files $helpPath = 'modules/'.$send_module.'/language/'.$send_lang.'.help.'.$send_action.'.html'; - + if (sugar_is_file("custom/" . $helpPath)) { + $helpPath = 'custom/' . $helpPath; + } $sugar_smarty = new Sugar_Smarty(); - //if the language is english then be sure to skip this check, otherwise go to the support - //portal if the file is not found. - if ($send_lang != 'en_us' && file_exists($helpPath)) + //go to the support portal if the file is not found. + // FG - Bug 39820 - Devs can write help files also in english, so skip check for language not equals "en_us" ! + if (file_exists($helpPath)) { $sugar_smarty->assign('helpFileExists', TRUE); + $sugar_smarty->assign('MOD', $mod_strings); + $sugar_smarty->assign('modulename', $send_module); $sugar_smarty->assign('helpPath', $helpPath); - $sugar_smarty->assign('helpBar', getHelpBar($send_module)); - $sugar_smarty->assign('bookmarkScript', bookmarkJS()); + $sugar_smarty->assign('currentURL', getCurrentURL()); $sugar_smarty->assign('title', $mod_strings['LBL_SUGARCRM_HELP'] . " - " . $send_module); $sugar_smarty->assign('styleSheet', SugarThemeRegistry::current()->getCSS()); - $sugar_smarty->assign('table', getTable()); - $sugar_smarty->assign('endtable', endTable()); + $sugar_smarty->assign('table', "
"); + $sugar_smarty->assign('endtable', "
"); $sugar_smarty->assign('charset', $app_strings['LBL_CHARSET']); echo $sugar_smarty->fetch('modules/Administration/SupportPortal.tpl'); @@ -218,53 +222,4 @@ switch ($_REQUEST['view']) { //$sugar_smarty->assign('iframeURL', $iframe_url); } break; -} - - -function getHelpBar($moduleName) -{ - global $mod_strings; - - $helpBar = "
" . - "" . $mod_strings['LBL_HELP_PRINT'] . " - " . - "" . $mod_strings['LBL_HELP_EMAIL'] . " - " . - "" . $mod_strings['LBL_HELP_BOOKMARK'] . "" . - "
"; - - return $helpBar; -} - -function getTable() -{ - $table = "
"; - - return $table; -} - -function endTable() -{ - $endtable = "
"; - - return $endtable; -} - -function bookmarkJS() { - -$script = -<< - - -EOQ; - -return $script; -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/modules/Administration/SupportPortal.tpl b/modules/Administration/SupportPortal.tpl index 050638dd..121221f6 100644 --- a/modules/Administration/SupportPortal.tpl +++ b/modules/Administration/SupportPortal.tpl @@ -41,22 +41,41 @@ {if $helpFileExists} - - - {$title} - {$styleSheet} - - - - {$helpBar} - - - - -
{include file="$helpPath"}
- {$bookmarkScript} - - + + +{$title} +{$styleSheet} + + + + + + + +
+ {$MOD.LBL_HELP_PRINT} - + {$MOD.LBL_HELP_EMAIL} - + {$MOD.LBL_HELP_BOOKMARK} +
+ + + + +
{include file="$helpPath"}
+{literal} + +{/literal} + + {else} - + {/if} \ No newline at end of file diff --git a/modules/Administration/UpgradeHistory.php b/modules/Administration/UpgradeHistory.php index 17232c67..3e02b148 100644 --- a/modules/Administration/UpgradeHistory.php +++ b/modules/Administration/UpgradeHistory.php @@ -58,7 +58,7 @@ class UpgradeHistory extends SugarBean var $id_name; var $manifest; var $enabled; - + var $tracker_visibility = false; var $table_name = "upgrade_history"; var $object_name = "UpgradeHistory"; var $column_fields = Array( "id", "filename", "md5sum", "type", "version", "status", "date_entered" ); diff --git a/modules/Administration/index.php b/modules/Administration/index.php index ce53791a..f5eb8ce0 100644 --- a/modules/Administration/index.php +++ b/modules/Administration/index.php @@ -66,6 +66,7 @@ $tab = array(); $header_image = array(); $url = array(); $label_tab = array(); +$id_tab = array(); $description = array(); $group = array(); $sugar_smarty = new Sugar_Smarty(); @@ -123,12 +124,15 @@ foreach ($admin_group_header as $key=>$values) { } $label_tab[$j][$i]= $label; + $id_tab[$j][$i] = $link_idx; + $description[$j][$i]= translate($admin_option[2],'Administration'); + if (($colnum % 2) == 0) { $tab[$j][$i]= ($colnum % 2); } else { - $tab[$j][$i]= 10; + $tab[$j][$i]= 10; } $i+=1; } @@ -151,6 +155,7 @@ $sugar_smarty->assign("ITEM_URL", $url); $sugar_smarty->assign("ITEM_HEADER_LABEL",$label_tab); $sugar_smarty->assign("ITEM_DESCRIPTION", $description); $sugar_smarty->assign("COLNUM", $tab); +$sugar_smarty->assign('ID_TAB', $id_tab); echo $sugar_smarty->fetch('modules/Administration/index.tpl'); ?> diff --git a/modules/Administration/index.tpl b/modules/Administration/index.tpl index 6805c954..0710d1f9 100644 --- a/modules/Administration/index.tpl +++ b/modules/Administration/index.tpl @@ -60,13 +60,15 @@ {assign var='i' value=0} {foreach from=$VALUES_3_TAB[$j] key=link_idx item=admin_option} {if isset($COLNUM[$j][$i])} - - {$ITEM_HEADER_IMAGE[$j][$i]} {$ITEM_HEADER_LABEL[$j][$i]} + + + + {$ITEM_HEADER_IMAGE[$j][$i]} {$ITEM_HEADER_LABEL[$j][$i]} {$ITEM_DESCRIPTION[$j][$i]} {assign var='i' value=$i+1} {if $COLNUM[$j][$i] == '0'} - {$ITEM_HEADER_IMAGE[$j][$i]} {$ITEM_HEADER_LABEL[$j][$i]} + {$ITEM_HEADER_IMAGE[$j][$i]} {$ITEM_HEADER_LABEL[$j][$i]} {$ITEM_DESCRIPTION[$j][$i]} {else} diff --git a/modules/Bugs/views/view.detail.php b/modules/Bugs/views/view.detail.php index cf493863..9b245578 100644 --- a/modules/Bugs/views/view.detail.php +++ b/modules/Bugs/views/view.detail.php @@ -36,14 +36,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ -/********************************************************************************* - - * Description: This file is used to override the default Meta-data DetailView behavior - * to provide customization specific to the Bugs module. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. - * All Rights Reserved. - * Contributor(s): ______________________________________.. - ********************************************************************************/ require_once('include/MVC/View/views/view.detail.php'); diff --git a/modules/Bugs/views/view.edit.php b/modules/Bugs/views/view.edit.php index 56140550..0bde6996 100644 --- a/modules/Bugs/views/view.edit.php +++ b/modules/Bugs/views/view.edit.php @@ -36,16 +36,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ -/********************************************************************************* - - * Description: This file is used to override the default Meta-data EditView behavior - * to provide customization specific to the Bugs module. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. - * All Rights Reserved. - * Contributor(s): ______________________________________.. - ********************************************************************************/ - -require_once('include/MVC/View/views/view.edit.php'); class BugsViewEdit extends ViewEdit { diff --git a/modules/Calendar/Calendar.php b/modules/Calendar/Calendar.php index 17dd5f97..2f03e2b3 100644 --- a/modules/Calendar/Calendar.php +++ b/modules/Calendar/Calendar.php @@ -486,9 +486,14 @@ class CalendarActivity $end_ts_obj = $timedate->tzUser($end_ts_obj); switch ($view) { case 'month': - $start = $start_ts_obj->get_day_begin(1); + //C.L. For the start date, go back 6 days since 99 hours is the max duration (6 days) + $start = $start_ts_obj->get("-6 days")->get_day_begin(); $end = $end_ts_obj->get("first day of next month")->get_day_begin(); break; + case 'freebusy': //bug: 44586, for freebusy, don't modify the start/end dates + $start = $start_ts_obj; + $end = $end_ts_obj; + break; default: // Date for the past 5 days as that is the maximum duration of a single activity $start = $start_ts_obj->get("-5 days")->get_day_begin(); diff --git a/modules/Calendar/templates/templates_calendar.php b/modules/Calendar/templates/templates_calendar.php index d669ec1d..edd9b177 100644 --- a/modules/Calendar/templates/templates_calendar.php +++ b/modules/Calendar/templates/templates_calendar.php @@ -125,7 +125,7 @@ function template_cal_tabs($args) { else { $callStatus = ''; } - echo '' . SugarThemeRegistry::current()->getImage('Calls','alt="'.$app_list_strings['call_status_dom'][$act->sugar_bean->status].': '.$act->sugar_bean->name.'"') . ' + echo '' . SugarThemeRegistry::current()->getImage('Calls','alt="'.$callStatus.': '.$act->sugar_bean->name.'"') . ' ' . $callStatus . ': ' . $act->sugar_bean->name . ''; } else if($act->sugar_bean->object_name == 'Meeting') { @@ -135,7 +135,7 @@ function template_cal_tabs($args) { else { $meetingStatus = ''; } - $out = '' . SugarThemeRegistry::current()->getImage('Meetings','alt="'.$app_list_strings['meeting_status_dom'][$act->sugar_bean->status].': '.$act->sugar_bean->name.'"') . ' + $out = '' . SugarThemeRegistry::current()->getImage('Meetings','alt="'.$meetingStatus.': '.$act->sugar_bean->name.'"') . ' ' . $meetingStatus . ': ' . $act->sugar_bean->name .''; @@ -152,8 +152,17 @@ function template_cal_tabs($args) { echo $out; } else if($act->sugar_bean->object_name == 'Task') { - echo '' . SugarThemeRegistry::current()->getImage('Tasks','alt="'.$app_list_strings['task_status_dom'][$act->sugar_bean->status].': '.$act->sugar_bean->name.'"') . ' - '.$app_list_strings['task_status_dom'][$fields['STATUS']].': ' . $act->sugar_bean->name . ''; + if ( isset($app_list_strings['task_status_dom'][$act->sugar_bean->status]) ) + { + $taskStatus = $app_list_strings['task_status_dom'][$act->sugar_bean->status]; + } + else + { + $taskStatus = ''; + } + + echo '' . SugarThemeRegistry::current()->getImage('Tasks','alt="'.$taskStatus.': '.$act->sugar_bean->name.'"') . ' + '.$taskStatus.': ' . $act->sugar_bean->name . ''; } echo '
'; } diff --git a/modules/Calls/CallFormBase.php b/modules/Calls/CallFormBase.php index 7b1af9cc..d20b7d77 100644 --- a/modules/Calls/CallFormBase.php +++ b/modules/Calls/CallFormBase.php @@ -429,7 +429,7 @@ function handleSave($prefix,$redirect=true,$useRequired=false) { } foreach($focus->contacts_arr as $contact_id) { - if(empty($contact_id) || isset($existing_contacts[$contact_id]) || isset($deleteContacts[$contact_id])) { + if(empty($contact_id) || isset($existing_contacts[$contact_id]) || (isset($deleteContacts[$contact_id]) && $contact_id != $_POST['parent_id'])) { continue; } @@ -451,7 +451,7 @@ function handleSave($prefix,$redirect=true,$useRequired=false) { } foreach($focus->leads_arr as $lead_id) { - if(empty($lead_id) || isset($existing_leads[$lead_id]) || isset($deleteLeads[$lead_id])) { + if(empty($lead_id) || isset($existing_leads[$lead_id]) || (isset($deleteLeads[$lead_id]) && $lead_id != $_POST['parent_id'])) { continue; } diff --git a/modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.data.php b/modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.data.php index 725d3418..12abf5f5 100644 --- a/modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.data.php +++ b/modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.data.php @@ -79,7 +79,12 @@ $dashletData['MyCallsDashlet']['columns'] = array('set_complete' => array('width 'date_start' => array('width' => '15', 'label' => 'LBL_DATE', 'default' => true, - 'related_fields' => array('time_start')), + 'related_fields' => array('time_start')), + 'set_accept_links'=> array('width' => '10', + 'label' => translate('LBL_ACCEPT_THIS', 'Meetings'), + 'sortable' => false, + 'related_fields' => array('status'), + 'default' => true), 'status' => array('width' => '8', 'label' => 'LBL_STATUS', 'default' => true), diff --git a/modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php b/modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php index 7abd907d..ce695c25 100644 --- a/modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php +++ b/modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php @@ -58,11 +58,11 @@ class MyCallsDashlet extends DashletGeneric { } } $this->columns = $dashletData['MyCallsDashlet']['columns']; - $this->columns['set_accept_links']= array('width' => '10', + /*$this->columns['set_accept_links']= array('width' => '10', 'label' => translate('LBL_ACCEPT_THIS', 'Meetings'), 'sortable' => false, 'related_fields' => array('status'), - 'default' => 'true'); + 'default' => 'true');*/ $this->seedBean = new Call(); } @@ -77,7 +77,7 @@ class MyCallsDashlet extends DashletGeneric { $this->seedBean->listview_inner_join = array('LEFT JOIN calls_users c_u on c_u.call_id = calls.id'); //set the custom query to include assigned meetings - $lvsParams['custom_where'] = ' AND (calls.assigned_user_id = \'' . $current_user->id . '\' OR c_u.user_id = \'' . $current_user->id . '\' AND c_u.deleted = 0) '; + $lvsParams['custom_where'] = ' AND (calls.assigned_user_id = \'' . $current_user->id . '\' OR c_u.user_id = \'' . $current_user->id . '\') AND c_u.deleted = 0 '; } $this->myItemsOnly = false; diff --git a/modules/Calls/vardefs.php b/modules/Calls/vardefs.php index b96e13a3..6528dbd7 100644 --- a/modules/Calls/vardefs.php +++ b/modules/Calls/vardefs.php @@ -89,7 +89,8 @@ $dictionary['Call'] = array('table' => 'calls', 'comment' => 'A Call is an activ array ( 'name' => 'date_end', 'vname' => 'LBL_DATE_END', - 'type' => 'datetime', + 'type' => 'datetimecombo', + 'dbType' => 'datetime', 'massupdate'=>false, 'comment' => 'Date is which call is scheduled to (or did) end', 'enable_range_search' => true, @@ -132,6 +133,7 @@ $dictionary['Call'] = array('table' => 'calls', 'comment' => 'A Call is an activ 'required' => true, 'importable' => 'required', 'default' => 'Planned', + 'studio' => array('detailview'=>false) ), 'direction' => array ( diff --git a/modules/Calls/views/view.edit.php b/modules/Calls/views/view.edit.php index 9482cf3c..9171aca5 100644 --- a/modules/Calls/views/view.edit.php +++ b/modules/Calls/views/view.edit.php @@ -36,17 +36,8 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ -/********************************************************************************* - - * Description: This file is used to override the default Meta-data EditView behavior - * to provide customization specific to the Calls module. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. - * All Rights Reserved. - * Contributor(s): ______________________________________.. - ********************************************************************************/ require_once('include/json_config.php'); -require_once('include/MVC/View/views/view.edit.php'); class CallsViewEdit extends ViewEdit { diff --git a/modules/CampaignLog/CampaignLog.php b/modules/CampaignLog/CampaignLog.php index 02137e90..26635071 100644 --- a/modules/CampaignLog/CampaignLog.php +++ b/modules/CampaignLog/CampaignLog.php @@ -86,11 +86,11 @@ class CampaignLog extends SugarBean { } if ( ( $this->db->dbType == 'mysql' ) or ( $this->db->dbType == 'oci8' ) ) { - $query="select first_name, last_name, CONCAT(CONCAT(first_name, ' '), last_name) name from ".strtolower($temp_array['TARGET_TYPE']) . " where id ='{$temp_array['TARGET_ID']}'"; + $query="select first_name, last_name, CONCAT(CONCAT(first_name, ' '), last_name) name, date_modified from ".strtolower($temp_array['TARGET_TYPE']) . " where id ='{$temp_array['TARGET_ID']}'"; } if($this->db->dbType == 'mssql') { - $query="select first_name, last_name, (first_name + ' ' + last_name) name from ".strtolower($temp_array['TARGET_TYPE']) . " where id ='{$temp_array['TARGET_ID']}'"; + $query="select first_name, last_name, (first_name + ' ' + last_name) name, date_modified from ".strtolower($temp_array['TARGET_TYPE']) . " where id ='{$temp_array['TARGET_ID']}'"; } if($temp_array['TARGET_TYPE']=='Accounts'){ $query="select name from ".strtolower($temp_array['TARGET_TYPE']) . " where id ='{$temp_array['TARGET_ID']}'"; @@ -105,10 +105,11 @@ class CampaignLog extends SugarBean { }else{ $full_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name'], ''); $temp_array['RECIPIENT_NAME']=$full_name; + $temp_array['ACTIVITY_DATE'] = $row['date_modified']; } } $temp_array['RECIPIENT_EMAIL']=$this->retrieve_email_address($temp_array['TARGET_ID']); - + $query = 'select name from email_marketing where id = \'' . $temp_array['MARKETING_ID'] . '\''; $result=$this->db->query($query); $row=$this->db->fetchByAssoc($result); diff --git a/modules/Campaigns/Campaign.php b/modules/Campaigns/Campaign.php index 06ed5c0f..74495fc7 100644 --- a/modules/Campaigns/Campaign.php +++ b/modules/Campaigns/Campaign.php @@ -249,13 +249,10 @@ class Campaign extends SugarBean { } - function mark_deleted($id){ - //Bug 44870 Deleted Campaign Is Not Removed From campaign_id Column in Accounts & Contacts Tables - $query = "update accounts set `campaign_id`=null where `campaign_id` = '{$id}' "; - $this->db->query($query); - $query = "update contacts set `campaign_id`=null where `campaign_id` = '{$id}' "; - $this->db->query($query); + function mark_deleted($id){ + $query = "update contacts set campaign_id = null where campaign_id = '{$id}' "; + $this->db->query($query); return parent::mark_deleted($id); } diff --git a/modules/Campaigns/GenerateWebToLeadForm.php b/modules/Campaigns/GenerateWebToLeadForm.php index 45936c43..3cae9b7c 100644 --- a/modules/Campaigns/GenerateWebToLeadForm.php +++ b/modules/Campaigns/GenerateWebToLeadForm.php @@ -105,8 +105,8 @@ if(!empty($_REQUEST['assigned_user_id'])){ $xtpl->assign("APP", $app_strings); $Web_To_Lead_Form_html = ''; $Web_To_Lead_Form_html .=''; - $Web_To_Lead_Form_html .= ""; - $Web_To_Lead_Form_html .= ''; + $Web_To_Lead_Form_html .= ""; + $Web_To_Lead_Form_html .= ''; $Web_To_Lead_Form_html .="
"; $Web_To_Lead_Form_html .= "get_cal_date_format(); - $LBL_ENTER_DATE = translate('LBL_ENTER_DATE', 'Charts'); + global $timedate; + $cal_dateformat = $timedate->get_cal_date_format(); + $LBL_ENTER_DATE = translate('LBL_ENTER_DATE', 'Charts'); if($field_required){ $Web_To_Lead_Form_html .= ""; } else{ $Web_To_Lead_Form_html .= ""; } - $Web_To_Lead_Form_html .= ""; - //$Web_To_Lead_Form_html .= ""; - } // if + $Web_To_Lead_Form_html .= " + "; + } // if if( $field_type=='varchar' || $field_type=='name' || $field_type=='phone' || $field_type=='currency' || $field_type=='url' || $field_type=='int'){ if($field_name=='last_name' || $field_required){ diff --git a/modules/Campaigns/Save.php b/modules/Campaigns/Save.php index 4790a52e..efa5d7e3 100644 --- a/modules/Campaigns/Save.php +++ b/modules/Campaigns/Save.php @@ -72,6 +72,24 @@ $return_id = $focus->id; $GLOBALS['log']->debug("Saved record with id of ".$return_id); +//copy compaign targets on duplicate +if( !empty($_REQUEST['duplicateSave']) && !empty($_REQUEST['duplicateId']) ){ + $copyFromCompaign = new Campaign(); + $copyFromCompaign->retrieve($_REQUEST['duplicateId']); + $copyFromCompaign->load_relationship('prospectlists'); + + $focus->load_relationship('prospectlists'); + $target_lists = $copyFromCompaign->prospectlists->get(); + if(count($target_lists)>0){ + foreach ($target_lists as $prospect_list_id){ + $focus->prospectlists->add($prospect_list_id); + } + } + + $focus->save(); +} + + //if type is set to newsletter then make sure there are propsect lists attached if($focus->campaign_type =='NewsLetter'){ //if this is a duplicate, and the "relate_to" and "relate_id" elements are not cleared out, diff --git a/modules/Campaigns/WizardHome.php b/modules/Campaigns/WizardHome.php index 685ee0dd..9e51c79f 100644 --- a/modules/Campaigns/WizardHome.php +++ b/modules/Campaigns/WizardHome.php @@ -145,7 +145,7 @@ global $currentModule; /********** FINAL END OF PAGE UI Stuff ********/ - $ss->display('modules/Campaigns/WizardHome.html'); + $ss->display(file_exists('custom/modules/Campaigns/WizardHome.html') ? 'custom/modules/Campaigns/WizardHome.html' : 'modules/Campaigns/WizardHome.html'); }else{ //there is no record to retrieve, so ask which type of campaign wizard to launch @@ -166,7 +166,7 @@ global $currentModule; $ss = new Sugar_Smarty(); $ss->assign("MOD", $mod_strings); $ss->assign("APP", $app_strings); - $ss->display('modules/Campaigns/tpls/WizardHomeStart.tpl'); + $ss->display(file_exists('custom/modules/Campaigns/tpls/WizardHomeStart.tpl') ? 'custom/modules/Campaigns/tpls/WizardHomeStart.tpl' : 'modules/Campaigns/tpls/WizardHomeStart.tpl'); } @@ -456,13 +456,13 @@ function create_tracker_summary ($focus){ function create_wiz_menu_items($type,$mrkt_string,$camp_url,$summ_url){ global $mod_strings; - $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN1']] = 'modules/Campaigns/tpls/WizardCampaignHeader.tpl'; - $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN2']] = 'modules/Campaigns/tpls/WizardCampaignBudget.tpl'; - $steps[$mod_strings['LBL_NAVIGATION_MENU_TRACKERS']] = 'modules/Campaigns/tpls/WizardCampaignTracker.tpl'; + $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN1']] = file_exists('custom/modules/Campaigns/tpls/WizardCampaignHeader.tpl') ? 'custom/modules/Campaigns/tpls/WizardCampaignHeader.tpl' : 'modules/Campaigns/tpls/WizardCampaignHeader.tpl'; + $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN2']] = file_exists('custom/modules/Campaigns/tpls/WizardCampaignBudget.tpl') ? 'custom/modules/Campaigns/tpls/WizardCampaignBudget.tpl' : 'modules/Campaigns/tpls/WizardCampaignBudget.tpl'; + $steps[$mod_strings['LBL_NAVIGATION_MENU_TRACKERS']] = file_exists('custom/modules/Campaigns/tpls/WizardCampaignTracker.tpl') ? 'custom/modules/Campaigns/tpls/WizardCampaignTracker.tpl' : 'modules/Campaigns/tpls/WizardCampaignTracker.tpl'; if($type == 'newsletter'){ - $steps[$mod_strings['LBL_NAVIGATION_MENU_SUBSCRIPTIONS']] = 'modules/Campaigns/tpls/WizardCampaignTargetList.tpl'; + $steps[$mod_strings['LBL_NAVIGATION_MENU_SUBSCRIPTIONS']] = file_exists('custom/modules/Campaigns/tpls/WizardCampaignTargetList.tpl') ? 'custom/modules/Campaigns/tpls/WizardCampaignTargetList.tpl' : 'modules/Campaigns/tpls/WizardCampaignTargetList.tpl'; }else{ - $steps[$mod_strings['LBL_TARGET_LISTS']] = 'modules/Campaigns/tpls/WizardCampaignTargetListForNonNewsLetter.tpl'; + $steps[$mod_strings['LBL_TARGET_LISTS']] = file_exists('custom/modules/Campaigns/tpls/WizardCampaignTargetListForNonNewsLetter.tpl') ? 'custom/modules/Campaigns/tpls/WizardCampaignTargetListForNonNewsLetter.tpl' : 'modules/Campaigns/tpls/WizardCampaignTargetListForNonNewsLetter.tpl'; } $nav_html = '
$field_label$web_required_symbol$field_label -getImageURL('jscalendar.gif')."\" alt=\"{$LBL_ENTER_DATE}\" id=\"{$field_name}_trigger\" align=\"absmiddle\"> - + + "; + $order = explode("%", $cal_dateformat); + foreach($order as $part) + { + if (!isset($part[0])) + continue; + if (strToUpper($part[0]) == "M" ) + $Web_To_Lead_Form_html .= translate("LBL_MONTH") . ":"; + else if (strToUpper($part[0]) == "D" ) + $Web_To_Lead_Form_html .= translate("LBL_DAY") . ":"; + else if (strToUpper($part[0]) == "Y" ) + $Web_To_Lead_Form_html .= translate("LBL_YEAR") . ":"; + } + $Web_To_Lead_Form_html .= "
'; diff --git a/modules/Campaigns/WizardNewsletter.php b/modules/Campaigns/WizardNewsletter.php index 636d20dc..c94084f4 100644 --- a/modules/Campaigns/WizardNewsletter.php +++ b/modules/Campaigns/WizardNewsletter.php @@ -538,33 +538,33 @@ $ss->assign('STEPS',$sshtml); /**************************** FINAL END OF PAGE UI Stuff *******************/ -$ss->display("modules/Campaigns/tpls/WizardNewsletter.tpl"); +$ss->display(file_exists('custom/modules/Campaigns/tpls/WizardNewsletter.tpl') ? 'custom/modules/Campaigns/tpls/WizardNewsletter.tpl' : 'modules/Campaigns/tpls/WizardNewsletter.tpl'); function create_newsletter_steps(){ global $mod_strings; - $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN1']] = 'modules/Campaigns/tpls/WizardCampaignHeader.tpl'; - $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN2']] = 'modules/Campaigns/tpls/WizardCampaignBudget.tpl'; - $steps[$mod_strings['LBL_NAVIGATION_MENU_TRACKERS']] = 'modules/Campaigns/tpls/WizardCampaignTracker.tpl'; - $steps[$mod_strings['LBL_NAVIGATION_MENU_SUBSCRIPTIONS']] = 'modules/Campaigns/tpls/WizardCampaignTargetList.tpl'; + $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN1']] = file_exists('custom/modules/Campaigns/tpls/WizardCampaignHeader.tpl') ? 'custom/modules/Campaigns/tpls/WizardCampaignHeader.tpl' : 'modules/Campaigns/tpls/WizardCampaignHeader.tpl'; + $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN2']] = file_exists('custom/modules/Campaigns/tpls/WizardCampaignBudget.tpl') ? 'custom/modules/Campaigns/tpls/WizardCampaignBudget.tpl' : 'modules/Campaigns/tpls/WizardCampaignBudget.tpl'; + $steps[$mod_strings['LBL_NAVIGATION_MENU_TRACKERS']] = file_exists('custom/modules/Campaigns/tpls/WizardCampaignTracker.tpl') ? 'custom/modules/Campaigns/tpls/WizardCampaignTracker.tpl' : 'modules/Campaigns/tpls/WizardCampaignTracker.tpl'; + $steps[$mod_strings['LBL_NAVIGATION_MENU_SUBSCRIPTIONS']] = file_exists('custom/modules/Campaigns/tpls/WizardCampaignTargetList.tpl') ? 'custom/modules/Campaigns/tpls/WizardCampaignTargetList.tpl' : 'modules/Campaigns/tpls/WizardCampaignTargetList.tpl'; return $steps; } function create_campaign_steps(){ global $mod_strings; - $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN1']] = 'modules/Campaigns/tpls/WizardCampaignHeader.tpl'; - $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN2']] = 'modules/Campaigns/tpls/WizardCampaignBudget.tpl'; - $steps[$mod_strings['LBL_NAVIGATION_MENU_TRACKERS']] = 'modules/Campaigns/tpls/WizardCampaignTracker.tpl'; - $steps[$mod_strings['LBL_TARGET_LISTS']] = 'modules/Campaigns/tpls/WizardCampaignTargetListForNonNewsLetter.tpl'; + $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN1']] = file_exists('custom/modules/Campaigns/tpls/WizardCampaignHeader.tpl') ? 'custom/modules/Campaigns/tpls/WizardCampaignHeader.tpl' : 'modules/Campaigns/tpls/WizardCampaignHeader.tpl'; + $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN2']] = file_exists('custom/modules/Campaigns/tpls/WizardCampaignBudget.tpl') ? 'custom/modules/Campaigns/tpls/WizardCampaignBudget.tpl' : 'modules/Campaigns/tpls/WizardCampaignBudget.tpl'; + $steps[$mod_strings['LBL_NAVIGATION_MENU_TRACKERS']] = file_exists('custom/modules/Campaigns/tpls/WizardCampaignTracker.tpl') ? 'custom/modules/Campaigns/tpls/WizardCampaignTracker.tpl' : 'modules/Campaigns/tpls/WizardCampaignTracker.tpl'; + $steps[$mod_strings['LBL_TARGET_LISTS']] = file_exists('custom/modules/Campaigns/tpls/WizardCampaignTargetListForNonNewsLetter.tpl') ? 'custom/modules/Campaigns/tpls/WizardCampaignTargetListForNonNewsLetter.tpl' : 'modules/Campaigns/tpls/WizardCampaignTargetListForNonNewsLetter.tpl'; return $steps; } function create_email_steps(){ global $mod_strings; - $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN1']] = 'modules/Campaigns/tpls/WizardCampaignHeader.tpl'; - $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN2']] = 'modules/Campaigns/tpls/WizardCampaignBudget.tpl'; - $steps[$mod_strings['LBL_NAVIGATION_MENU_TRACKERS']] = 'modules/Campaigns/tpls/WizardCampaignTracker.tpl'; - $steps[$mod_strings['LBL_TARGET_LISTS']] = 'modules/Campaigns/tpls/WizardCampaignTargetListForNonNewsLetter.tpl'; + $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN1']] = file_exists('custom/modules/Campaigns/tpls/WizardCampaignHeader.tpl') ? 'custom/modules/Campaigns/tpls/WizardCampaignHeader.tpl' : 'modules/Campaigns/tpls/WizardCampaignHeader.tpl'; + $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN2']] = file_exists('custom/modules/Campaigns/tpls/WizardCampaignBudget.tpl') ? 'custom/modules/Campaigns/tpls/WizardCampaignBudget.tpl' : 'modules/Campaigns/tpls/WizardCampaignBudget.tpl'; + $steps[$mod_strings['LBL_NAVIGATION_MENU_TRACKERS']] = file_exists('custom/modules/Campaigns/tpls/WizardCampaignTracker.tpl') ? 'custom/modules/Campaigns/tpls/WizardCampaignTracker.tpl' : 'modules/Campaigns/tpls/WizardCampaignTracker.tpl'; + $steps[$mod_strings['LBL_TARGET_LISTS']] = file_exists('custom/modules/Campaigns/tpls/WizardCampaignTargetListForNonNewsLetter.tpl') ? 'custom/modules/Campaigns/tpls/WizardCampaignTargetListForNonNewsLetter.tpl' : 'modules/Campaigns/tpls/WizardCampaignTargetListForNonNewsLetter.tpl'; return $steps; } diff --git a/modules/Campaigns/tpls/WizardCampaignHeader.tpl b/modules/Campaigns/tpls/WizardCampaignHeader.tpl index 61693658..71b11b65 100644 --- a/modules/Campaigns/tpls/WizardCampaignHeader.tpl +++ b/modules/Campaigns/tpls/WizardCampaignHeader.tpl @@ -80,8 +80,8 @@ - + diff --git a/modules/Campaigns/utils.php b/modules/Campaigns/utils.php index 28c3d44d..25661fac 100644 --- a/modules/Campaigns/utils.php +++ b/modules/Campaigns/utils.php @@ -275,7 +275,20 @@ function log_campaign_activity($identifier, $activity, $update=true, $clicked_ur } + /** + * + * This method is deprecated + * @deprecated 62_Joneses - June 24, 2011 + * @see campaign_log_lead_or_contact_entry() + */ function campaign_log_lead_entry($campaign_id, $parent_bean,$child_bean,$activity_type){ + + campaign_log_lead_or_contact_entry($campaign_id, $parent_bean,$child_bean,$activity_type); + } + + + +function campaign_log_lead_or_contact_entry($campaign_id, $parent_bean,$child_bean,$activity_type){ global $timedate; @@ -294,6 +307,7 @@ function campaign_log_lead_entry($campaign_id, $parent_bean,$child_bean,$activit //save the campaign log entry $campaign_log->save(); } + function get_campaign_urls($campaign_id) { $return_array=array(); diff --git a/modules/Configurator/tpls/EditView.tpl b/modules/Configurator/tpls/EditView.tpl index 36ef0680..61adf9f1 100644 --- a/modules/Configurator/tpls/EditView.tpl +++ b/modules/Configurator/tpls/EditView.tpl @@ -152,6 +152,7 @@
     
{$MOD.LBL_CAMPAIGN_CONTENT}
+
diff --git a/modules/Configurator/views/view.edit.php b/modules/Configurator/views/view.edit.php index fc2020e0..e8316e22 100644 --- a/modules/Configurator/views/view.edit.php +++ b/modules/Configurator/views/view.edit.php @@ -42,7 +42,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * Contributor(s): ______________________________________.. ********************************************************************************/ -require_once('include/MVC/View/views/view.edit.php'); require_once('modules/Configurator/Forms.php'); require_once('modules/Administration/Forms.php'); require_once('modules/Configurator/Configurator.php'); diff --git a/modules/Connectors/connectors/sources/ext/rest/linkedin/linkedin.php b/modules/Connectors/connectors/sources/ext/rest/linkedin/linkedin.php index 3b87b3ad..0d721229 100644 --- a/modules/Connectors/connectors/sources/ext/rest/linkedin/linkedin.php +++ b/modules/Connectors/connectors/sources/ext/rest/linkedin/linkedin.php @@ -42,10 +42,10 @@ class ext_rest_linkedin extends ext_rest { $this->_enable_in_wizard = false; $this->_enable_in_hover = true; } - + /* * getItem - * + * * As the linked in connector does not have a true API call, we simply * override this abstract method */ @@ -54,16 +54,11 @@ class ext_rest_linkedin extends ext_rest { /* * getList - * + * * As the linked in connector does not have a true API call, we simply * override this abstract method - */ + */ public function getList($args=array(), $module=null){} - - - public function __destruct(){ - parent::__destruct(); - } } - + ?> \ No newline at end of file diff --git a/modules/Connectors/tpls/display_properties.tpl b/modules/Connectors/tpls/display_properties.tpl index 9ecf91d6..69fbaba0 100644 --- a/modules/Connectors/tpls/display_properties.tpl +++ b/modules/Connectors/tpls/display_properties.tpl @@ -55,7 +55,7 @@
    {foreach from=$enabled_modules item=module} -
  • {$module}
  • +
  • {sugar_translate label=$module}
  • {/foreach}
@@ -64,7 +64,7 @@
    {foreach from=$disabled_modules item=module} -
  • {$module}
  • +
  • {sugar_translate label=$module}
  • {/foreach}
@@ -212,4 +212,4 @@ Event.onDOMReady(YAHOO.example.DDApp.init, YAHOO.example.DDApp, true); {else} -{/if} \ No newline at end of file +{/if} diff --git a/modules/Connectors/tpls/mapping_properties.tpl b/modules/Connectors/tpls/mapping_properties.tpl index 84d0f5c8..1d4c30b8 100644 --- a/modules/Connectors/tpls/mapping_properties.tpl +++ b/modules/Connectors/tpls/mapping_properties.tpl @@ -40,7 +40,7 @@ - + diff --git a/modules/Connectors/tpls/search_properties.tpl b/modules/Connectors/tpls/search_properties.tpl index c76a7521..7845d5e8 100644 --- a/modules/Connectors/tpls/search_properties.tpl +++ b/modules/Connectors/tpls/search_properties.tpl @@ -40,7 +40,7 @@ {foreach from=$display_data key=module item=data}
{$module}
{sugar_translate label=$module}
{$mod.LBL_CONNECTOR_FIELDS} {$mod.LBL_MODULE_FIELDS}
- + @@ -218,4 +218,4 @@ YAHOO.util.Event.onDOMReady(function(){ {if $no_searchdefs_defined}

{$mod.ERROR_NO_SEARCHDEFS_DEFINED}

-{/if} \ No newline at end of file +{/if} diff --git a/modules/Connectors/views/view.searchproperties.php b/modules/Connectors/views/view.searchproperties.php index 981c040b..cf653792 100644 --- a/modules/Connectors/views/view.searchproperties.php +++ b/modules/Connectors/views/view.searchproperties.php @@ -36,14 +36,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ -/********************************************************************************* - - * Description: This file is used to override the default Meta-data EditView behavior - * to provide customization specific to the Contacts module. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. - * All Rights Reserved. - * Contributor(s): ______________________________________.. - ********************************************************************************/ require_once('include/MVC/View/views/view.list.php'); require_once('include/connectors/sources/SourceFactory.php'); diff --git a/modules/Connectors/views/view.sourceproperties.php b/modules/Connectors/views/view.sourceproperties.php index cc2fde76..91a52bf9 100644 --- a/modules/Connectors/views/view.sourceproperties.php +++ b/modules/Connectors/views/view.sourceproperties.php @@ -36,14 +36,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ -/********************************************************************************* - - * Description: This file is used to override the default Meta-data EditView behavior - * to provide customization specific to the Contacts module. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. - * All Rights Reserved. - * Contributor(s): ______________________________________.. - ********************************************************************************/ require_once('include/MVC/View/views/view.list.php'); diff --git a/modules/Contacts/ContactFormBase.php b/modules/Contacts/ContactFormBase.php index defc5b18..3bbbc4a5 100644 --- a/modules/Contacts/ContactFormBase.php +++ b/modules/Contacts/ContactFormBase.php @@ -57,7 +57,10 @@ function checkForDuplicates($prefix){ }else{ $query = $baseQuery ." last_name = '". $_POST[$prefix.'last_name'] ."'"; } - + if(!empty($_POST[$prefix.'record'])) { + $query .= " AND id != '". $_POST[$prefix.'record'] ."'"; + } + $rows = array(); global $db; $result = $db->query($query); @@ -603,7 +606,7 @@ function handleSave($prefix, $redirect=true, $useRequired=false){ } - if (empty($_POST['record']) && empty($_POST['dup_checked'])) { + if (empty($_POST['dup_checked'])) { $duplicateContacts = $this->checkForDuplicates($prefix); if(isset($duplicateContacts)){ @@ -801,7 +804,13 @@ function handleRedirect($return_id){ $return_id = $_POST['return_id']; } - header("Location: index.php?action=$return_action&module=$return_module&record=$return_id"); + //eggsurplus Bug 23816: maintain VCR after an edit/save. If it is a duplicate then don't worry about it. The offset is now worthless. + $redirect_url = "Location: index.php?action=$return_action&module=$return_module&record=$return_id"; + if(isset($_REQUEST['offset']) && empty($_REQUEST['duplicateSave'])) { + $redirect_url .= "&offset=".$_REQUEST['offset']; + } + + header($redirect_url); } } diff --git a/modules/Contacts/views/view.edit.php b/modules/Contacts/views/view.edit.php index e17648fd..333ef290 100644 --- a/modules/Contacts/views/view.edit.php +++ b/modules/Contacts/views/view.edit.php @@ -36,16 +36,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ -/********************************************************************************* - - * Description: This file is used to override the default Meta-data EditView behavior - * to provide customization specific to the Contacts module. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. - * All Rights Reserved. - * Contributor(s): ______________________________________.. - ********************************************************************************/ - -require_once('include/MVC/View/views/view.edit.php'); class ContactsViewEdit extends ViewEdit { diff --git a/modules/Currencies/Currency.php b/modules/Currencies/Currency.php index 2bcdb6b1..33b0f8bd 100644 --- a/modules/Currencies/Currency.php +++ b/modules/Currencies/Currency.php @@ -547,7 +547,7 @@ function getCurrencyDropDown($focus, $field='currency_id', $value='', $view='Det $currency->setCurrencyFields($currency_fields); $html = ''; $errorMessage .= ''; diff --git a/modules/DynamicFields/DynamicField.php b/modules/DynamicFields/DynamicField.php index f67a34ff..09617c13 100644 --- a/modules/DynamicFields/DynamicField.php +++ b/modules/DynamicFields/DynamicField.php @@ -509,7 +509,7 @@ class DynamicField { $fmd = new FieldsMetaData(); $id = $fmd->retrieve($object_name.$db_name,true, false); $is_update = false; - $label = $field->label; + $label = strtoupper( $field->label ); if(!empty($id)){ $is_update = true; }else{ @@ -776,9 +776,17 @@ class DynamicField { foreach($this->bean->field_defs as $name=>$data){ if(empty($data['source']) || $data['source'] != 'custom_fields') continue; - if(!empty($compareFieldDefs[$name])) { + /** + * @bug 43471 + * @issue 43471 + * @itr 23441 + * + * force the name to be lower as it needs to be lower since that is how it's put into the key + * in the get_columns() call above. + */ + if(!empty($compareFieldDefs[strtolower($name)])) { continue; - } + } $out .= $this->add_existing_custom_field($data, $execute); } if (!empty($out)) diff --git a/modules/DynamicFields/templates/Fields/Forms/html.tpl b/modules/DynamicFields/templates/Fields/Forms/html.tpl index e904431d..b0b7c731 100644 --- a/modules/DynamicFields/templates/Fields/Forms/html.tpl +++ b/modules/DynamicFields/templates/Fields/Forms/html.tpl @@ -67,8 +67,12 @@ SUGAR.ajaxLoad = true; {/if} {literal} document.popup_form.presave = function(){ - var inst = tinyMCE.get("htmlarea").getContent(); - document.getElementById('ext4').value =inst; + var tiny = tinyMCE.getInstanceById('htmlarea'); + if ( (null != tiny) || ("undefined" != typeof(tiny)) ) { + document.getElementById('ext4').value = tiny.getContent(); + } else { + document.getElementById('ext4').value = document.getElementById('htmlarea').value; + } document.getElementById('ext4').style.display = ''; }; diff --git a/modules/EAPM/views/view.edit.php b/modules/EAPM/views/view.edit.php index 88c9bc96..d01b0c5c 100644 --- a/modules/EAPM/views/view.edit.php +++ b/modules/EAPM/views/view.edit.php @@ -36,16 +36,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ -/********************************************************************************* - - * Description: This file is used to override the default Meta-data EditView behavior - * to provide customization specific to the Bugs module. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. - * All Rights Reserved. - * Contributor(s): ______________________________________.. - ********************************************************************************/ - -require_once('include/MVC/View/views/view.edit.php'); class EAPMViewEdit extends ViewEdit { diff --git a/modules/EmailMan/EmailManDelivery.php b/modules/EmailMan/EmailManDelivery.php index 625b4845..61131146 100644 --- a/modules/EmailMan/EmailManDelivery.php +++ b/modules/EmailMan/EmailManDelivery.php @@ -112,6 +112,10 @@ $emailman = new EmailMan(); } +//bug 26926 fix start +DBManager::setQueryLimit(0); +//end bug fix + do { $no_items_in_queue=true; diff --git a/modules/EmailMan/Save.php b/modules/EmailMan/Save.php deleted file mode 100644 index 2e93c792..00000000 --- a/modules/EmailMan/Save.php +++ /dev/null @@ -1,120 +0,0 @@ -populateFromPost(); - $oe->saveSystem(); -} - -$focus = new Administration(); - -if(isset($_POST['tracking_entities_location_type'])) { - if ($_POST['tracking_entities_location_type'] != '2') { - unset($_POST['tracking_entities_location']); - unset($_POST['tracking_entities_location_type']); - } -} -// cn: handle mail_smtpauth_req checkbox on/off (removing double reference in the form itself -if( !isset($_POST['mail_smtpauth_req']) ) -{ - $_POST['mail_smtpauth_req'] = 0; - $_POST['notify_allow_default_outbound'] = 0; //If smtp auth is disabled ensure outbound is disabled. -} - -if( !empty($_POST['notify_allow_default_outbound']) ) -{ - $oe = new OutboundEmail(); - if( !$oe->isAllowUserAccessToSystemDefaultOutbound() ) - $oe->removeUserOverrideAccounts(); -} - -$focus->saveConfig(); - -// save User defaults for emails -$sugar_config['email_default_delete_attachments'] = (isset($_REQUEST['email_default_delete_attachments'])) ? true : false; - -/////////////////////////////////////////////////////////////////////////////// -//// SECURITY -$security = array(); -if(isset($_REQUEST['applet'])) $security['applet'] = 'applet'; -if(isset($_REQUEST['base'])) $security['base'] = 'base'; -if(isset($_REQUEST['embed'])) $security['embed'] = 'embed'; -if(isset($_REQUEST['form'])) $security['form'] = 'form'; -if(isset($_REQUEST['frame'])) $security['frame'] = 'frame'; -if(isset($_REQUEST['frameset'])) $security['frameset'] = 'frameset'; -if(isset($_REQUEST['iframe'])) $security['iframe'] = 'iframe'; -if(isset($_REQUEST['import'])) $security['import'] = '\?import'; -if(isset($_REQUEST['layer'])) $security['layer'] = 'layer'; -if(isset($_REQUEST['link'])) $security['link'] = 'link'; -if(isset($_REQUEST['object'])) $security['object'] = 'object'; -if(isset($_REQUEST['style'])) $security['style'] = 'style'; -if(isset($_REQUEST['xmp'])) $security['xmp'] = 'xmp'; -$security['script'] = 'script'; - -$sugar_config['email_xss'] = base64_encode(serialize($security)); - -//// SECURITY -/////////////////////////////////////////////////////////////////////////////// - -ksort($sugar_config); -write_array_to_file('sugar_config', $sugar_config, 'config.php'); - -header("Location: index.php?action={$_POST['return_action']}&module={$_POST['return_module']}"); -?> \ No newline at end of file diff --git a/modules/EmailMan/controller.php b/modules/EmailMan/controller.php new file mode 100644 index 00000000..1ed79c9c --- /dev/null +++ b/modules/EmailMan/controller.php @@ -0,0 +1,126 @@ +populateFromPost(); + $oe->saveSystem(); + } + + + + $focus = new Administration(); + + if(isset($_POST['tracking_entities_location_type'])) { + if ($_POST['tracking_entities_location_type'] != '2') { + unset($_POST['tracking_entities_location']); + unset($_POST['tracking_entities_location_type']); + } + } + // cn: handle mail_smtpauth_req checkbox on/off (removing double reference in the form itself + if( !isset($_POST['mail_smtpauth_req']) ) + { + $_POST['mail_smtpauth_req'] = 0; + $_POST['notify_allow_default_outbound'] = 0; //If smtp auth is disabled ensure outbound is disabled. + } + + if( !empty($_POST['notify_allow_default_outbound']) ) + { + $oe = new OutboundEmail(); + if( !$oe->isAllowUserAccessToSystemDefaultOutbound() ) + $oe->removeUserOverrideAccounts(); + } + + $focus->saveConfig(); + + // save User defaults for emails + $configurator->config['email_default_delete_attachments'] = (isset($_REQUEST['email_default_delete_attachments'])) ? true : false; + + /////////////////////////////////////////////////////////////////////////////// + //// SECURITY + $security = array(); + if(isset($_REQUEST['applet'])) $security['applet'] = 'applet'; + if(isset($_REQUEST['base'])) $security['base'] = 'base'; + if(isset($_REQUEST['embed'])) $security['embed'] = 'embed'; + if(isset($_REQUEST['form'])) $security['form'] = 'form'; + if(isset($_REQUEST['frame'])) $security['frame'] = 'frame'; + if(isset($_REQUEST['frameset'])) $security['frameset'] = 'frameset'; + if(isset($_REQUEST['iframe'])) $security['iframe'] = 'iframe'; + if(isset($_REQUEST['import'])) $security['import'] = '\?import'; + if(isset($_REQUEST['layer'])) $security['layer'] = 'layer'; + if(isset($_REQUEST['link'])) $security['link'] = 'link'; + if(isset($_REQUEST['object'])) $security['object'] = 'object'; + if(isset($_REQUEST['style'])) $security['style'] = 'style'; + if(isset($_REQUEST['xmp'])) $security['xmp'] = 'xmp'; + $security['script'] = 'script'; + + $configurator->config['email_xss'] = base64_encode(serialize($security)); + + //// SECURITY + /////////////////////////////////////////////////////////////////////////////// + + ksort($sugar_config); + + $configurator->handleOverride(); + + + } + +} +?> \ No newline at end of file diff --git a/modules/EmailMan/testOutboundEmail.php b/modules/EmailMan/testOutboundEmail.php index 9fdb17b2..37f40171 100644 --- a/modules/EmailMan/testOutboundEmail.php +++ b/modules/EmailMan/testOutboundEmail.php @@ -66,7 +66,7 @@ if(!empty($_REQUEST['mail_smtppass'])) { } $out = Email::sendEmailTest($_REQUEST['mail_smtpserver'], $_REQUEST['mail_smtpport'], $_REQUEST['mail_smtpssl'], ($_REQUEST['mail_smtpauth_req'] == 'true' ? 1 : 0), $_REQUEST['mail_smtpuser'], - $pass, $_REQUEST['outboundtest_from_address'], $_REQUEST['outboundtest_to_address'], $_REQUEST['mail_sendtype']); + $pass, $_REQUEST['outboundtest_from_address'], $_REQUEST['outboundtest_to_address'], $_REQUEST['mail_sendtype'], $_REQUEST['mail_from_name']); $out = $json->encode($out); echo $out; diff --git a/modules/EmailMan/tpls/config.tpl b/modules/EmailMan/tpls/config.tpl index cc91f22c..05094578 100644 --- a/modules/EmailMan/tpls/config.tpl +++ b/modules/EmailMan/tpls/config.tpl @@ -71,7 +71,7 @@ function change_state(radiobutton) { - - - {if $show_salesforce} - {/if} {if $show_outlook} - {/if} {if $show_act} - {/if} @@ -165,13 +166,13 @@ diff --git a/modules/Import/views/view.step1.php b/modules/Import/views/view.step1.php index 2afe1129..ba1df780 100644 --- a/modules/Import/views/view.step1.php +++ b/modules/Import/views/view.step1.php @@ -105,7 +105,22 @@ class ImportViewStep1 extends SugarView return $returnArray; } - + + private function _retrieveParams() { + $selectedData = new stdClass(); + foreach ($_POST as $key => &$value) { + trim(strip_tags($value)); + $selectedData->$key = $value; + } + if (isset($selectedData->custom_enclosure)) { + if ($selectedData->custom_enclosure != '"' and $selectedData->custom_enclosure != ''' and $selectedData->custom_enclosure != '') { + $selectedData->custom_other = true; + } + } + $this->ss->assign('selectedData', $selectedData); + return $selectedData; + } + /** * @see SugarView::display() */ @@ -113,13 +128,15 @@ class ImportViewStep1 extends SugarView { global $mod_strings, $app_strings, $current_user; global $sugar_config; + + $selectedData = $this->_retrieveParams(); $this->ss->assign("MODULE_TITLE", $this->getModuleTitle()); $this->ss->assign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline','align="absmiddle" alt="'.$app_strings['LNK_DELETE'].'" border="0"')); $this->ss->assign("PUBLISH_INLINE_PNG", SugarThemeRegistry::current()->getImage('publish_inline','align="absmiddle" alt="'.$mod_strings['LBL_PUBLISH'].'" border="0"')); $this->ss->assign("UNPUBLISH_INLINE_PNG", SugarThemeRegistry::current()->getImage('unpublish_inline','align="absmiddle" alt="'.$mod_strings['LBL_UNPUBLISH'].'" border="0"')); $this->ss->assign("IMPORT_MODULE", $_REQUEST['import_module']); - $this->ss->assign("JAVASCRIPT", $this->_getJS()); + $this->ss->assign("JAVASCRIPT", $this->_getJS(isset($selectedData->source) ? $selectedData->source : false)); // handle publishing and deleting import maps @@ -235,9 +252,15 @@ class ImportViewStep1 extends SugarView /** * Returns JS used in this view */ - private function _getJS() + private function _getJS($sourceType = false) { global $mod_strings; + + if (!$sourceType) { + $sourceType = 'csv'; + } + $getElementById = "document.getElementById('source_{$sourceType}')"; + $sourceType = "defineEnclosureSelectPosition('{$sourceType}', {$getElementById});"; return << @@ -283,13 +306,13 @@ document.getElementById('gonext').onclick = function() YAHOO.util.Event.onDOMReady(function() { - var inputs = document.getElementsByTagName('input'); - for (var i = 0; i < inputs.length; ++i ){ - if (inputs[i].name == 'source' ) { - inputs[i].onclick = function() + var defineEnclosureSelectPosition = function(sourceType, inputElement) { - parentRow = this.parentNode.parentNode; - switch(this.value) { + if (typeof (sourceType) == 'undefined') { + sourceType = this.value; + } + parentRow = inputElement.parentNode.parentNode; + switch(sourceType) { case 'other': enclosureRow = document.getElementById('customEnclosure').parentNode.removeChild(document.getElementById('customEnclosure')); parentRow.parentNode.insertBefore(enclosureRow, document.getElementById('customDelimiter').nextSibling); @@ -307,8 +330,16 @@ YAHOO.util.Event.onDOMReady(function() document.getElementById('customEnclosure').style.display = 'none'; } } + + var inputs = document.getElementsByTagName('input'); + for (var i = 0; i < inputs.length; ++i ){ + if (inputs[i].name == 'source' ) { + inputs[i].onclick = function () { + defineEnclosureSelectPosition(this.value, this); + } } } + {$sourceType} }); --> diff --git a/modules/Import/views/view.step4.php b/modules/Import/views/view.step4.php index 98258e3d..39a6b52c 100644 --- a/modules/Import/views/view.step4.php +++ b/modules/Import/views/view.step4.php @@ -494,7 +494,7 @@ class ImportViewStep4 extends SugarView $list_of_users=$focus->sync_contact; //and set it to false for the save $focus->sync_contact=false; - } else if($focus->object_name == "User" && !empty($current_user) && $current_user->isAdminForModule( 'Users')) { + } else if($focus->object_name == "User" && (empty($current_user) || !$current_user->isAdminForModule( 'Users'))) { sugar_die($GLOBALS['mod_strings']['ERR_IMPORT_SYSTEM_ADMININSTRATOR']); } //bug# 40260 setting it true as the module in focus is involved in an import diff --git a/modules/InboundEmail/InboundEmail.php b/modules/InboundEmail/InboundEmail.php index 78eb0dd4..f65dd395 100644 --- a/modules/InboundEmail/InboundEmail.php +++ b/modules/InboundEmail/InboundEmail.php @@ -5724,9 +5724,11 @@ eoq; $meta['is_sugarEmail'] = true; } } else { - // mark SugarEmail read - $q = "UPDATE emails SET status = 'read' WHERE id = '{$uid}'"; - $r = $this->db->query($q); + if( $this->email->status != 'sent' ){ + // mark SugarEmail read + $q = "UPDATE emails SET status = 'read' WHERE id = '{$uid}'"; + $r = $this->db->query($q); + } } $return = array(); diff --git a/modules/Leads/LeadFormBase.php b/modules/Leads/LeadFormBase.php index d378d51e..a1dea3e5 100644 --- a/modules/Leads/LeadFormBase.php +++ b/modules/Leads/LeadFormBase.php @@ -325,6 +325,8 @@ function handleSave($prefix,$redirect=true, $useRequired=false, $do_save=true, $ $prospect=new Prospect(); $prospect->retrieve($_POST[$prefix.'prospect_id']); $prospect->lead_id=$focus->id; + // Set to keep email in target + $prospect->in_workflow = true; $prospect->save(); //if prospect id exists, make sure we are coming from prospect detail diff --git a/modules/Leads/tpls/ConvertLead.tpl b/modules/Leads/tpls/ConvertLead.tpl index 76af71ec..e68756dd 100644 --- a/modules/Leads/tpls/ConvertLead.tpl +++ b/modules/Leads/tpls/ConvertLead.tpl @@ -79,7 +79,7 @@
{$module}{sugar_translate label=$module}
{$mod.LBL_DEFAULT}
- + @@ -528,9 +528,13 @@ function sendTestEmail() var smtpssl = document.getElementById('mail_smtpssl').value; var mailsmtpauthreq = document.getElementById('mail_smtpauth_req'); var mail_sendtype = document.getElementById('mail_sendtype').value; + + var from_name = document.getElementById('notify_fromname').value; + var postDataString = 'mail_name=system&mail_sendtype=' + mail_sendtype + '&mail_smtpserver=' + smtpServer + "&mail_smtpport=" + smtpPort + "&mail_smtpssl=" + smtpssl + "&mail_smtpauth_req=" + mailsmtpauthreq.checked + "&mail_smtpuser=" + trim(document.getElementById('mail_smtpuser').value) + - "&mail_smtppass=" + trim(document.getElementById('mail_smtppass').value) + "&outboundtest_to_address=" + encodeURIComponent(toAddress) + "&outboundtest_from_address=" + fromAddress; + "&mail_smtppass=" + trim(document.getElementById('mail_smtppass').value) + "&outboundtest_to_address=" + encodeURIComponent(toAddress) + + "&outboundtest_from_address=" + fromAddress + "&mail_from_name=" + from_name; YAHOO.util.Connect.asyncRequest("POST", "index.php?action=testOutboundEmail&module=EmailMan&to_pdf=true&sugar_body_only=true", callbackOutboundTest, postDataString); } diff --git a/modules/EmailTemplates/DetailView.php b/modules/EmailTemplates/DetailView.php index 89a22b3a..d4d32754 100644 --- a/modules/EmailTemplates/DetailView.php +++ b/modules/EmailTemplates/DetailView.php @@ -126,11 +126,11 @@ $xtpl->assign("DATE_ENTERED", $focus->date_entered); $xtpl->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name); -if(ACLController::checkAccess('EmailTemplates', 'edit', true)) { +if($focus->ACLAccess('EditView')) { $xtpl->parse("main.edit"); //$xtpl->out("EDIT"); - -} + +} if(!empty($focus->body)) { $xtpl->assign('ALT_CHECKED', 'CHECKED'); } diff --git a/modules/EmailTemplates/EditView.php b/modules/EmailTemplates/EditView.php index 9023035e..05a47ce1 100644 --- a/modules/EmailTemplates/EditView.php +++ b/modules/EmailTemplates/EditView.php @@ -110,6 +110,11 @@ if(empty($focus->id)){ echo getClassicModuleTitle($focus->module_dir, $params, true); +if (!$focus->ACLAccess('EditView')) { + ACLController::displayNoAccess(true); + sugar_cleanup(true); +} + $GLOBALS['log']->info("EmailTemplate detail view"); if($has_campaign || $inboundEmail) { diff --git a/modules/Emails/Email.php b/modules/Emails/Email.php index b0995f83..27cb6cf3 100644 --- a/modules/Emails/Email.php +++ b/modules/Emails/Email.php @@ -353,7 +353,7 @@ class Email extends SugarBean { } - function sendEmailTest($mailserver_url, $port, $ssltls, $smtp_auth_req, $smtp_username, $smtppassword, $fromaddress, $toaddress, $mail_sendtype = 'smtp') { + function sendEmailTest($mailserver_url, $port, $ssltls, $smtp_auth_req, $smtp_username, $smtppassword, $fromaddress, $toaddress, $mail_sendtype = 'smtp', $fromname = '') { global $current_user,$app_strings; $mod_strings = return_module_language($GLOBALS['current_language'], 'Emails'); //Called from EmailMan as well. $mail = new SugarPHPMailer(); @@ -384,8 +384,14 @@ class Email extends SugarBean { $mail->Subject = from_html($mod_strings['LBL_TEST_EMAIL_SUBJECT']); $mail->From = $fromaddress; - $mail->FromName = $current_user->name; - $mail->Sender = $mail->From; + + if ($fromname != '') { + $mail->FromName = html_entity_decode($fromname,ENT_QUOTES); + } else { + $mail->FromName = $current_user->name; + } + + $mail->Sender = $mail->From; $mail->AddAddress($toaddress); $mail->Body = $mod_strings['LBL_TEST_EMAIL_BODY']; @@ -1631,7 +1637,8 @@ class Email extends SugarBean { //// get the email to see if we're dealing with a dupe //// what crappy coding - preg_match("/[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,}/i",$v, $match); + preg_match("/[A-Z0-9._%-\']+@[A-Z0-9.-]+\.[A-Z]{2,}/i",$v, $match); + if(!empty($match[0]) && !in_array(trim($match[0]), $knownEmails)) { $knownEmails[] = $match[0]; diff --git a/modules/Emails/EmailUIAjax.php b/modules/Emails/EmailUIAjax.php index 79c6f010..4c400503 100644 --- a/modules/Emails/EmailUIAjax.php +++ b/modules/Emails/EmailUIAjax.php @@ -722,7 +722,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $out['meta']['email']['toaddrs'] = $email->et->generateExpandableAddrs($out['meta']['email']['toaddrs']); if(!empty($out['meta']['email']['cc_addrs'])) { $ccs = $email->et->generateExpandableAddrs($out['meta']['email']['cc_addrs']); - $out['meta']['cc'] = << {$app_strings['LBL_EMAIL_CC']}: diff --git a/modules/Emails/Save.php b/modules/Emails/Save.php index 443a67f9..9fb5d873 100644 --- a/modules/Emails/Save.php +++ b/modules/Emails/Save.php @@ -235,6 +235,14 @@ $focus->date_sent = ""; require_once('include/formbase.php'); $focus = populateFromPost('', $focus); +//CCL - Bug: 40168 Fix ability to change date sent from saved emails +if($focus->type == 'archived') +{ + $focus->date_start = $_REQUEST['date_start']; + $focus->time_start = $_REQUEST['time_start'] . $_REQUEST['meridiem']; + $focus->date_sent = ''; +} + $focus->save(false); //// END EMAIL SAVE/SEND SETUP /////////////////////////////////////////////////////////////////////////////// diff --git a/modules/Emails/javascript/EmailUICompose.js b/modules/Emails/javascript/EmailUICompose.js index 4444a53c..c9a23d2d 100644 --- a/modules/Emails/javascript/EmailUICompose.js +++ b/modules/Emails/javascript/EmailUICompose.js @@ -901,8 +901,8 @@ SE.composeLayout = { SE.composeLayout._initComposeOptionTabs(idx); SE.composeLayout[idx].getUnitByPosition("right").collapse(); //Initialize tinyMCE - if (!SUGAR.util.isTouchScreen()) - SE.composeLayout._1_tiny(false); + SE.composeLayout._1_tiny(false); + //Init templates and address book SE.composeLayout._2_final(); @@ -1100,13 +1100,17 @@ SE.composeLayout = { var elId = SE.tinyInstances.currentHtmleditor = 'htmleditor' + idx; SE.tinyInstances[elId] = { }; SE.tinyInstances[elId].ready = false; - var t = tinyMCE.getInstanceById(elId); + if (!SUGAR.util.isTouchScreen()) { + var t = tinyMCE.getInstanceById(elId); + } if(typeof(t) == 'undefined') { - tinyMCE.execCommand('mceAddControl', false, elId); + if (!SUGAR.util.isTouchScreen()) { + tinyMCE.execCommand('mceAddControl', false, elId); + } YAHOO.util.Event.onAvailable(elId + "_parent", function() { SE.composeLayout.resizeEditorSetSignature(idx,!isReplyForward); - }, this); + }, this); } }, @@ -1188,7 +1192,7 @@ SE.composeLayout = { if (!retry) { this._0_yui(); } - if (typeof(tinyMCE) == 'undefined' || typeof(tinyMCE.settings) == 'undefined'){ + if (!SUGAR.util.isTouchScreen() && (typeof(tinyMCE) == 'undefined' || typeof(tinyMCE.settings) == 'undefined')){ setTimeout("SE.composeLayout.c1_composeEmail(" + isReplyForward + ", true);", 500); } else { this._1_tiny(isReplyForward); @@ -1749,9 +1753,16 @@ SE.composeLayout = { var form = document.getElementById('emailCompose' + idx); var composeOptionsFormName = "composeOptionsForm" + idx; + + var t = SE.util.getTiny(SE.tinyInstances.currentHtmleditor); - var html = t.getContent(); - var subj = document.getElementById('emailSubject' + idx).value; + if (t != null || typeof(t) != "undefined") { + var html = t.getContent(); + } else { + var html = "

" + document.getElementById('htmleditor' + idx).value + "

"; + } + + var subj = document.getElementById('emailSubject' + idx).value; var to = trim(document.getElementById('addressTO' + idx).value); var cc = trim(document.getElementById('addressCC' + idx).value); var bcc = trim(document.getElementById('addressBCC' + idx).value); diff --git a/modules/Employees/Save.php b/modules/Employees/Save.php index 60ce7a1e..231a7d66 100644 --- a/modules/Employees/Save.php +++ b/modules/Employees/Save.php @@ -49,23 +49,10 @@ $tabs_def = urldecode(isset($_REQUEST['display_tabs_def']) ? $_REQUEST['display_ $DISPLAY_ARR = array(); parse_str($tabs_def,$DISPLAY_ARR); -//there was an issue where a non-admin user could use a proxy tool to intercept the save on their own Employee -//record and swap out their record_id with the admin employee_id which would cause the email address -//of the non-admin user to be associated with the admin user thereby allowing the non-admin to reset the password -//of the admin user. -if(isset($_POST['record']) && !is_admin($GLOBALS['current_user']) && !$GLOBALS['current_user']->isAdminForModule('Employees') && ($_POST['record'] != $GLOBALS['current_user']->id)) -{ - sugar_die("Unauthorized access to administration."); -} -elseif (!isset($_POST['record']) && !is_admin($GLOBALS['current_user']) && !$GLOBALS['current_user']->isAdminForModule('Employees')) -{ - sugar_die ("Unauthorized access to user administration."); -} $focus = new Employee(); $focus->retrieve($_POST['record']); - //rrs bug: 30035 - I am not sure how this ever worked b/c old_reports_to_id was not populated. $old_reports_to_id = $focus->reports_to_id; diff --git a/modules/Employees/views/view.detail.php b/modules/Employees/views/view.detail.php index 2fe94195..200f2358 100644 --- a/modules/Employees/views/view.detail.php +++ b/modules/Employees/views/view.detail.php @@ -36,14 +36,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ -/********************************************************************************* - - * Description: This file is used to override the default Meta-data DetailView behavior - * to provide customization specific to the Bugs module. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. - * All Rights Reserved. - * Contributor(s): ______________________________________.. - ********************************************************************************/ require_once('include/MVC/View/views/view.detail.php'); diff --git a/modules/Employees/views/view.edit.php b/modules/Employees/views/view.edit.php index fa0dc04d..fafd3552 100644 --- a/modules/Employees/views/view.edit.php +++ b/modules/Employees/views/view.edit.php @@ -36,16 +36,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ -/********************************************************************************* - - * Description: This file is used to override the default Meta-data DetailView behavior - * to provide customization specific to the Bugs module. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. - * All Rights Reserved. - * Contributor(s): ______________________________________.. - ********************************************************************************/ - -require_once('include/MVC/View/views/view.edit.php'); class EmployeesViewEdit extends ViewEdit { diff --git a/modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.php b/modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.php index 55fc820f..3b300f07 100644 --- a/modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.php +++ b/modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.php @@ -158,7 +158,7 @@ class JotPadDashlet extends Dashlet { $optionsArray = $this->loadOptions(); // _pp($_REQUEST['savedText']); $optionsArray['savedText']=$json->decode(html_entity_decode($_REQUEST['savedText'])); - $optionsArray['savedText']=nl2br($optionsArray['savedText']['jsonObject']); + $optionsArray['savedText']=nl2br($optionsArray['savedText']); $xss = clean_xss($optionsArray['savedText'], false); if(!empty($xss)) { $optionsArray['savedText'] = str_replace($xss, "", $optionsArray['savedText']); diff --git a/modules/Home/SubpanelCreates.php b/modules/Home/SubpanelCreates.php index b744e5fb..d636c0c6 100644 --- a/modules/Home/SubpanelCreates.php +++ b/modules/Home/SubpanelCreates.php @@ -58,9 +58,13 @@ if(file_exists('modules/'. $_REQUEST['target_module'] . '/EditView.php')) { $view = (!empty($_REQUEST['target_view'])) ? $_REQUEST['target_view'] : 'QuickCreate'; //Check if there is a custom override, then check for module override, finally use default (SubpanelQuickCreate) if(file_exists('custom/' . $subpanelView)) { - require_once($subpanelView); - $subpanelClass = $target_module . 'SubpanelQuickCreate'; - $sqc = new $subpanelClass($target_module, $view); + require_once('custom/' . $subpanelView); + $subpanelClass = $target_module . 'SubpanelQuickCreate'; + $customClass = 'Custom' . $subpanelClass; + if(class_exists($customClass)) { + $subpanelClass = $customClass; + } + $sqc = new $subpanelClass($target_module, $view); } else if(file_exists($subpanelView)) { require_once($subpanelView); $subpanelClass = $target_module . 'SubpanelQuickCreate'; diff --git a/modules/Home/index.php b/modules/Home/index.php index 0b744f5f..76047e8c 100644 --- a/modules/Home/index.php +++ b/modules/Home/index.php @@ -292,7 +292,7 @@ $sugar_smarty->assign('lblAdd', $GLOBALS['app_strings']['LBL_ADD_BUTTON']); $sugar_smarty->assign('lblAddDashlets', $GLOBALS['app_strings']['LBL_ADD_DASHLETS']); $sugar_smarty->assign('lblLnkHelp', $GLOBALS['app_strings']['LNK_HELP']); -$sugar_smarty->assign('mod', return_module_language($sugar_config['default_language'], 'Home')); +$sugar_smarty->assign('mod', return_module_language($GLOBALS['current_language'], 'Home')); $sugar_smarty->assign('app', $GLOBALS['app_strings']); $sugar_smarty->assign('module', 'Home'); //custom chart code diff --git a/modules/Home/views/view.additionaldetailsretrieve.php b/modules/Home/views/view.additionaldetailsretrieve.php index 0d59d477..6ad85646 100644 --- a/modules/Home/views/view.additionaldetailsretrieve.php +++ b/modules/Home/views/view.additionaldetailsretrieve.php @@ -48,7 +48,7 @@ class HomeViewAdditionaldetailsretrieve extends SugarView { public function display() { - global $beanList, $beanFiles, $current_user, $app_strings; + global $beanList, $beanFiles, $current_user, $app_strings, $app_list_strings; $moduleDir = empty($_REQUEST['bean']) ? '' : $_REQUEST['bean']; $beanName = empty($beanList[$moduleDir]) ? '' : $beanList[$moduleDir]; @@ -71,6 +71,16 @@ class HomeViewAdditionaldetailsretrieve extends SugarView $json = getJSONobj(); $bean = new $beanName(); $bean->retrieve($id); + + //bug38901 - shows dropdown list label instead of database value + foreach($bean->field_name_map as $field => $value) + { + if($value["type"] == "enum" && isset($app_list_strings[$value['options']][$bean->$field])) + { + $bean->$field = $app_list_strings[$value['options']][$bean->$field]; + } + } + $arr = array_change_key_case($bean->toArray(), CASE_UPPER); $results = $adFunction($arr); diff --git a/modules/Import/ImportFieldSanitize.php b/modules/Import/ImportFieldSanitize.php index f840b515..d3b6d608 100644 --- a/modules/Import/ImportFieldSanitize.php +++ b/modules/Import/ImportFieldSanitize.php @@ -150,7 +150,14 @@ class ImportFieldSanitize $vardef ) { - if ( !empty($value) && !preg_match('/^\w+(?:[\'.\-+]\w+)*@\w+(?:[.\-]\w+)*(?:[.]\w{2,})+$/',$value) ) { + // cache $sea instance + static $sea; + + if ( !($sea instanceof SugarEmailAddress) ) { + $sea = new SugarEmailAddress; + } + + if ( !empty($value) && !preg_match($sea->regex,$value) ) { return false; } diff --git a/modules/Import/tpls/step1.tpl b/modules/Import/tpls/step1.tpl index 8379911b..92b9df43 100644 --- a/modules/Import/tpls/step1.tpl +++ b/modules/Import/tpls/step1.tpl @@ -38,6 +38,7 @@ + *} {overlib_includes} {$MODULE_TITLE} @@ -60,51 +61,51 @@

{$MOD.LBL_WHAT_IS} *

+ source == 'csv'}checked="checked"{/if} />  {$MOD.LBL_CSV} {sugar_help text=$MOD.LBL_DELIMITER_COMMA_HELP}
  {$MOD.LBL_CUSTOM_ENCLOSURE} - + {sugar_help text=$MOD.LBL_ENCLOSURE_HELP}
+ source == 'tab'}checked="checked"{/if} />  {$MOD.LBL_TAB} {sugar_help text=$MOD.LBL_DELIMITER_TAB_HELP}
+ source == 'other'}checked="checked"{/if}/>  {$MOD.LBL_CUSTOM_DELIMITED} {sugar_help text=$MOD.LBL_DELIMITER_CUSTOM_HELP}
+ source == 'salesforce'}checked="checked"{/if}/>  {$MOD.LBL_SALESFORCE}
+ source == 'outlook'}checked="checked"{/if}/>  {$MOD.LBL_MICROSOFT_OUTLOOK}
+ source == 'act'}checked="checked"{/if}/>  {$MOD.LBL_ACT}
- + type == 'import' or !$selectedData->type}checked="checked"{/if} />  {$MOD.LBL_IMPORT_BUTTON}
- + type == 'update'}checked="checked"{/if} />  {$MOD.LBL_UPDATE_BUTTON}
{sugar_translate label='{{$label}}' module='Leads'} -{{if !empty($def.select)}} +{if !empty($def.select)} {sugar_translate label='LNK_SELECT_{{$module|strtoupper}}' module='Leads'} {if $def.required } {{$APP.LBL_REQUIRED_SYMBOL}} @@ -101,7 +101,7 @@ sqs_objects['{{$form_name}}_{{$def.select}}'] = {ldelim} limit : '10' {rdelim} -{{/if}} +{/if}
diff --git a/modules/Leads/views/view.convertlead.php b/modules/Leads/views/view.convertlead.php index 3638861f..39d140bf 100644 --- a/modules/Leads/views/view.convertlead.php +++ b/modules/Leads/views/view.convertlead.php @@ -284,6 +284,7 @@ class ViewConvertLead extends SugarView */ protected function handleSave() { + require_once('modules/Campaigns/utils.php'); require_once("include/formbase.php"); $lead = false; if (!empty($_REQUEST['record'])) @@ -417,6 +418,10 @@ class ViewConvertLead extends SugarView $this->copyAddressFields($bean, $beans['Contacts']); $bean->save(); + //if campaign id exists then there should be an entry in campaign_log table for the newly created contact: bug 44522 + if(isset($lead->campaign_id) && $lead->campaign_id != null && $bean->object_name == "Contact"){ + campaign_log_lead_or_contact_entry($lead->campaign_id,$lead, $beans['Contacts'],'contact'); + } } if (!empty($lead)) { //Mark the original Lead converted diff --git a/modules/MailMerge/Step2.html b/modules/MailMerge/Step2.html index 4c0fb094..7333bb29 100644 --- a/modules/MailMerge/Step2.html +++ b/modules/MailMerge/Step2.html @@ -44,7 +44,7 @@ - + @@ -62,8 +62,8 @@ - - + +
 
{MAIL_MERGE_CAMPAIGN_PROSPECT_SELECTOR}
@@ -117,7 +117,7 @@

- +

@@ -134,6 +134,12 @@ var max = 20; var mWhere = "{MAILMERGE_WHERE}"; var orderBy = ''; +function submit_form() +{ + document.MailMerge.action='index.php'; + document.MailMerge.submit(); +} + function ResponseObj() { } @@ -151,29 +157,33 @@ ResponseObj.prototype.response = function (result) if(result.result_count < max) { dispCount = result.result_count; - nextItems.disabled = true; + nextItems_disabled = true; } - if(result.result_count - max == mOffset) + if(result.result_count < (mOffset + max)) { - nextItems.disabled = true; + nextItems_disabled = true; } else { - nextItems.disabled = false; + nextItems_disabled = false; } if(mOffset == 0) { - prevItems.disabled = true; + prevItems_disabled = true; } else { - prevItems.disabled = false; + prevItems_disabled = false; } if(result.result_count > 0) { dispMin = mOffset + 1; } - var spanText = "("+(dispMin) + " - " +(mOffset+dispCount) + " of " + result.result_count+")"; + var spanMax = 0 + parseInt(mOffset,10) + parseInt(dispCount,10); + if ( spanMax > parseInt(result.result_count,10) ) { + spanMax = parseInt(result.result_count); + } + var spanText = "("+(dispMin) + " - " + spanMax + " of " + result.result_count+")"; document.getElementById("result_count").innerHTML = spanText; var displayObjs = document.getElementById("display_objs"); displayObjs.options.length = 0; @@ -208,12 +218,18 @@ ResponseObj.prototype.response = function (result) } function increaseOffset() { - mOffset += 20; + if(!nextItems_disabled) { + mOffset += 20; + getObjects(); + } } function decreaseOffset() { - mOffset -= 20; + if(!prevItems_disabled) { + mOffset -= 20; + getObjects(); + } } function getObjects() @@ -317,6 +333,15 @@ for(i=0; i < selObjs.options.length ;i++) } +function displayKeyCode(evt) + { + var charCode = (evt.which) ? evt.which : event.keyCode; + if(charCode=='13') + { + search(); + } + } + function search(searchText) { var searchInput = document.getElementById("searchText"); @@ -343,6 +368,7 @@ function search(searchText) } } mWhere = where.toLowerCase(); + mOffset = 0; getObjects(); } @@ -366,6 +392,8 @@ function validateForm() if(selObjs.options.length > 0) { + document.MailMerge.action='index.php'; + document.MailMerge.submit(); return true; } else diff --git a/modules/MailMerge/Step2.php b/modules/MailMerge/Step2.php index 89b77c64..1e329be7 100644 --- a/modules/MailMerge/Step2.php +++ b/modules/MailMerge/Step2.php @@ -139,8 +139,8 @@ else } $xtpl->assign("MAILMERGE_MODULE", $_SESSION['MAILMERGE_MODULE']); -$xtpl->assign("MAILMERGE_PREV", SugarThemeRegistry::current()->getImage('previous','border="0" style="margin-left: 1px;" alt="Previous" id="prevItems" onClick="decreaseOffset();getObjects();"')); -$xtpl->assign("MAILMERGE_NEXT", SugarThemeRegistry::current()->getImage('next','border="0" style="margin-left: 1px;" alt="Next" id="nextItems" onClick="increaseOffset();getObjects();"')); +$xtpl->assign("MAILMERGE_PREV", SugarThemeRegistry::current()->getImage('previous','border="0" style="margin-left: 1px;" alt="Previous" id="prevItems" onClick="decreaseOffset();"')); +$xtpl->assign("MAILMERGE_NEXT", SugarThemeRegistry::current()->getImage('next','border="0" style="margin-left: 1px;" alt="Next" id="nextItems" onClick="increaseOffset();"')); $xtpl->assign("MAILMERGE_RIGHT_TO_LEFT", SugarThemeRegistry::current()->getImage('leftarrow_big','border="0" style="margin-left: 1px;" alt="Remove Item(s)" onClick="moveLeft();"')); $xtpl->assign("MAILMERGE_LEFT_TO_RIGHT", SugarThemeRegistry::current()->getImage('rightarrow_big','border="0" style="margin-left: 1px;" alt="Add Item(s)" onClick="moveRight();"')); $xtpl->assign("MAIL_MERGE_HEADER_STEP_2", $step_txt); diff --git a/modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.data.php b/modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.data.php index a8e290ba..0fa8b79d 100644 --- a/modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.data.php +++ b/modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.data.php @@ -74,7 +74,12 @@ $dashletData['MyMeetingsDashlet']['columns'] = array('set_complete' => array('wi 'date_start' => array('width' => '15', 'label' => 'LBL_DATE', 'default' => true, - 'related_fields' => array('time_start')), + 'related_fields' => array('time_start')), + 'set_accept_links'=> array('width' => '10', + 'label' => 'LBL_ACCEPT_THIS', + 'sortable' => false, + 'default' => true, + 'related_fields' => array('status')), 'status' => array('width' => '8', 'label' => 'LBL_STATUS'), 'date_entered' => array('width' => '15', diff --git a/modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php b/modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php index 1ce3c726..aa14dc11 100644 --- a/modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php +++ b/modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php @@ -60,11 +60,11 @@ class MyMeetingsDashlet extends DashletGeneric { } } $this->columns = $dashletData['MyMeetingsDashlet']['columns']; - $this->columns['set_accept_links']= array('width' => '10', + /*$this->columns['set_accept_links']= array('width' => '10', 'label' => translate('LBL_ACCEPT_THIS', 'Meetings'), 'sortable' => false, 'default' => true, - 'related_fields' => array('status')); + 'related_fields' => array('status'));*/ $this->hasScript = true; // dashlet has javascript attached to it $this->seedBean = new Meeting(); } @@ -79,7 +79,7 @@ class MyMeetingsDashlet extends DashletGeneric { $this->seedBean->listview_inner_join = array('LEFT JOIN meetings_users m_u on m_u.meeting_id = meetings.id'); //set the custom query to retrieve invitees AND assigned meetings - $lvsParams['custom_where'] = ' AND (meetings.assigned_user_id = \'' . $current_user->id . '\' OR m_u.user_id = \'' . $current_user->id . '\' AND m_u.deleted=0) '; + $lvsParams['custom_where'] = ' AND (meetings.assigned_user_id = \'' . $current_user->id . '\' OR m_u.user_id = \'' . $current_user->id . '\') AND m_u.deleted=0 '; } $this->myItemsOnly = false; diff --git a/modules/Meetings/metadata/editviewdefs.php b/modules/Meetings/metadata/editviewdefs.php index 668e57ab..9c4b4ef2 100644 --- a/modules/Meetings/metadata/editviewdefs.php +++ b/modules/Meetings/metadata/editviewdefs.php @@ -51,12 +51,12 @@ array ( array ( 0 => array ( - 'customCode' => '', + 'customCode' => '', ), 1 => 'CANCEL', 2 => array ( - 'customCode' => '', + 'customCode' => '', ), 3 => array ( diff --git a/modules/Meetings/vardefs.php b/modules/Meetings/vardefs.php index a63a24bd..78ff352f 100644 --- a/modules/Meetings/vardefs.php +++ b/modules/Meetings/vardefs.php @@ -162,6 +162,7 @@ $dictionary['Meeting'] = array('table' => 'meetings', 'importable' => 'required', 'required' => true, 'enable_range_search' => true, + 'options' => 'date_range_search_dom', ), 'date_end' => @@ -172,6 +173,7 @@ $dictionary['Meeting'] = array('table' => 'meetings', 'massupdate'=>false, 'comment' => 'Date meeting ends', 'enable_range_search' => true, + 'options' => 'date_range_search_dom', ), 'parent_type' => array ( @@ -181,7 +183,8 @@ $dictionary['Meeting'] = array('table' => 'meetings', 'dbType' => 'varchar', 'group'=>'parent_name', 'len' => 100, - 'comment' => 'Module meeting is associated with' + 'comment' => 'Module meeting is associated with', + 'studio' => array('searchview'=>false), ), 'status' => array ( @@ -228,7 +231,8 @@ $dictionary['Meeting'] = array('table' => 'meetings', 'type' => 'id', 'group'=>'parent_name', 'reportable'=>false, - 'comment' => 'ID of item indicated by parent_type' + 'comment' => 'ID of item indicated by parent_type', + 'studio' => array('searchview'=>false), ), 'reminder_checked'=>array( 'name' => 'reminder_checked', diff --git a/modules/Meetings/views/view.edit.php b/modules/Meetings/views/view.edit.php index b3246063..d4b083df 100644 --- a/modules/Meetings/views/view.edit.php +++ b/modules/Meetings/views/view.edit.php @@ -36,17 +36,8 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ -/********************************************************************************* - - * Description: This file is used to override the default Meta-data EditView behavior - * to provide customization specific to the Calls module. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. - * All Rights Reserved. - * Contributor(s): ______________________________________.. - ********************************************************************************/ require_once('include/json_config.php'); -require_once('include/MVC/View/views/view.edit.php'); class MeetingsViewEdit extends ViewEdit { diff --git a/modules/MergeRecords/MergeRecord.php b/modules/MergeRecords/MergeRecord.php index 3c723c45..f3bab6de 100644 --- a/modules/MergeRecords/MergeRecord.php +++ b/modules/MergeRecords/MergeRecord.php @@ -275,7 +275,9 @@ class MergeRecord extends SugarBean { //Must do the same for pulling values in js dropdown if (isset ($vDefArray['search_type']) && $vDefArray['search_type'] == 'like') { if ($merge_field != "email1" && $merge_field != "email2" && $merge_field !="release_name") { - array_push($where_clauses, $table_name.".".$merge_field." LIKE '%".$GLOBALS['db']->quote($vDefArray['value'])."%'"); + if ($vDefArray['value'] != '') { + array_push($where_clauses, $table_name.".".$merge_field." LIKE '%".$GLOBALS['db']->quote($vDefArray['value'])."%'"); + } } elseif($merge_field =="release_name"){ if(isset($vDefArray['value'])){ diff --git a/modules/MergeRecords/Step2.php b/modules/MergeRecords/Step2.php index 41b01605..a401b92c 100644 --- a/modules/MergeRecords/Step2.php +++ b/modules/MergeRecords/Step2.php @@ -137,6 +137,8 @@ $params = array('massupdate' => true, 'export' => false, 'handleMassupdate' => f $ListView->displayColumns = $displayColumns; $ListView->lvd->listviewName = $focus->merge_module; //27633, this will make the $module to be merge_module instead of 'MergeRecords'. Then the key of offset and orderby will be correct. $where = $focus->generate_where_statement($focus->create_where_statement()); +$ListView->showMassupdateFields=false; +$ListView->email=false; $ListView->setup($this->bean, 'include/ListView/ListViewGeneric.tpl', $where, $params); $ListView->force_mass_update=true; $ListView->show_mass_update_form=false; diff --git a/modules/ModuleBuilder/MB/MBLanguage.php b/modules/ModuleBuilder/MB/MBLanguage.php index a3378fb7..299c89d9 100644 --- a/modules/ModuleBuilder/MB/MBLanguage.php +++ b/modules/ModuleBuilder/MB/MBLanguage.php @@ -181,10 +181,23 @@ class MBLanguage{ $key_changed = ($this->key_name != $key_name); foreach($this->appListStrings as $lang=>$values){ + // Load previously created modules data + $app_list_strings = array (); + $neededFile = $app_save_path . '/'. $lang; + if (file_exists($neededFile)) { + include $neededFile; + } + + if(!$duplicate){ unset($values['moduleList'][$this->key_name]); } + + + $values = sugarArrayMerge($values, $app_list_strings); $values['moduleList'][$key_name]= $this->label; + + $appFile = $header. "\n"; require_once('include/utils/array_utils.php'); $this->getGlobalAppListStringsForMB($values); @@ -250,4 +263,4 @@ class MBLanguage{ } -} \ No newline at end of file +} diff --git a/modules/ModuleBuilder/MB/MBModule.php b/modules/ModuleBuilder/MB/MBModule.php index ca3ead82..a9b4d393 100644 --- a/modules/ModuleBuilder/MB/MBModule.php +++ b/modules/ModuleBuilder/MB/MBModule.php @@ -679,6 +679,14 @@ class MBModule $this->key_name . 'Dashlet' ); $contents = str_replace($search_array, $replace_array, $contents ); + + + if ("relationships.php" == $e) + { + //bug 39598 Relationship Name Is Not Updated If Module Name Is Changed In Module Builder + $contents = str_replace ( "'{$old_name}'", "'{$this->key_name}'" , $contents ) ; + } + $fp = sugar_fopen ( $new_dir . '/' . $e, 'w' ) ; fwrite ( $fp, $contents ) ; fclose ( $fp ) ; diff --git a/modules/ModuleBuilder/MB/MBPackage.php b/modules/ModuleBuilder/MB/MBPackage.php index d7d66cfc..82bacca6 100644 --- a/modules/ModuleBuilder/MB/MBPackage.php +++ b/modules/ModuleBuilder/MB/MBPackage.php @@ -101,11 +101,37 @@ function getManifest($version_specific = false, $for_export = false){ $date = TimeDate::getInstance()->nowDb(); $time = time(); $this->description = to_html($this->description); - $is_uninstallable = ($this->is_uninstallable ? 'true' : 'false'); - $flavor = "'" . $GLOBALS['sugar_flavor'] . "'"; - if($GLOBALS['sugar_flavor'] == 'CE')$flavor = "'CE', 'PRO','ENT'"; - $version = (!empty($version_specific))?"'" . $GLOBALS['sugar_version'] . "'" : ''; + $is_uninstallable = ($this->is_uninstallable ? true : false); + if($GLOBALS['sugar_flavor'] == 'CE') { + $flavors = array('CE','PRO','ENT'); + } else { + $flavors = array($GLOBALS['sugar_flavor']); + } + $version = (!empty($version_specific))?$GLOBALS['sugar_version']:''; + + // Build an array and use var_export to build this file + $manifest = array( + array('acceptable_sugar_versions' => array($version)), + array('acceptable_sugar_flavors' => $flavors), + 'readme' => $this->readme, + 'key' => $this->key, + 'author' => $this->author, + 'description' => $this->description, + 'icon' => '', + 'is_uninstallable' => $is_uninstallable, + 'name' => $pre.$this->name, + 'published_date' => $date, + 'type' => 'module', + 'version' => $time, + 'remove_tables' => 'prompt', + ); + + + $header = file_get_contents('modules/ModuleBuilder/MB/header.php'); + + return $header."\n// THIS CONTENT IS GENERATED BY MBPackage.php\n".'$manifest = '.var_export_helper($manifest).";\n\n"; +/* return << 'prompt', ); EOQ; +*/ } function buildInstall($path){ diff --git a/modules/ModuleBuilder/MB/MBVardefs.php b/modules/ModuleBuilder/MB/MBVardefs.php index 7a8b0b41..04688ec4 100644 --- a/modules/ModuleBuilder/MB/MBVardefs.php +++ b/modules/ModuleBuilder/MB/MBVardefs.php @@ -70,6 +70,12 @@ class MBVardefs{ } } } + //Bug40450 - Extra 'Name' field in a File type module in module builder + if(array_key_exists('file', $this->templates)) + { + unset($this->vardefs['fields']['name']); + unset($this->vardefs['fields']['file']['name']); + } } diff --git a/modules/ModuleBuilder/controller.php b/modules/ModuleBuilder/controller.php index 8deafc3f..4f35256a 100644 --- a/modules/ModuleBuilder/controller.php +++ b/modules/ModuleBuilder/controller.php @@ -742,23 +742,25 @@ class ModuleBuilderController extends SugarController require_once 'modules/ModuleBuilder/parsers/views/SearchViewMetaDataParser.php' ; $parser = new SearchViewMetaDataParser ( $_REQUEST [ 'view' ], $_REQUEST [ 'view_module' ], $packageName ) ; $parser->handleSave () ; - + + //Repair or create a custom SearchFields.php file as needed $module_name = $_REQUEST [ 'view_module' ] ; global $beanList; - $objectName = $beanList[$module_name]; - - if($objectName == 'aCase') // Bug 17614 - renamed aCase as Case in vardefs for backwards compatibililty with 451 modules - { - $objectName = 'Case'; + if (isset($beanList[$module_name]) && $beanList[$module_name]!="") { + $objectName = $beanList[$module_name]; + if($objectName == 'aCase') // Bug 17614 - renamed aCase as Case in vardefs for backwards compatibililty with 451 modules + { + $objectName = 'Case'; + } + + //Load the vardefs for the module to pass to TemplateRange + VardefManager::loadVardef($module_name, $objectName, true); + global $dictionary; + $vardefs = $dictionary[$objectName]['fields']; + require_once('modules/DynamicFields/templates/Fields/TemplateRange.php'); + TemplateRange::repairCustomSearchFields($vardefs, $module_name, $packageName); } - - //Load the vardefs for the module to pass to TemplateRange - VardefManager::loadVardef($module_name, $objectName, true); - global $dictionary; - $vardefs = $dictionary[$objectName]['fields']; - require_once('modules/DynamicFields/templates/Fields/TemplateRange.php'); - TemplateRange::repairCustomSearchFields($vardefs, $module_name, $packageName); $this->view = 'searchView' ; } diff --git a/modules/ModuleBuilder/javascript/ModuleBuilder.js b/modules/ModuleBuilder/javascript/ModuleBuilder.js index 9a44967a..e50f2f4d 100644 --- a/modules/ModuleBuilder/javascript/ModuleBuilder.js +++ b/modules/ModuleBuilder/javascript/ModuleBuilder.js @@ -1039,6 +1039,7 @@ if (typeof(ModuleBuilder) == 'undefined') { select[count] = new Option(ajaxResponse[key], key); count++; } + ajaxStatus.flashStatus(SUGAR.language.get('app_strings', 'LBL_REQUEST_PROCESSED'), 2000); }, setSelectedOption : function (sel, option) { diff --git a/modules/ModuleBuilder/parsers/parser.dropdown.php b/modules/ModuleBuilder/parsers/parser.dropdown.php index 27e68abe..a31b72ac 100644 --- a/modules/ModuleBuilder/parsers/parser.dropdown.php +++ b/modules/ModuleBuilder/parsers/parser.dropdown.php @@ -68,7 +68,6 @@ require_once('modules/ModuleBuilder/parsers/ModuleBuilderParser.php'); $dropdown[ remove_xss(from_html($item [ 0 ])) ] = remove_xss(from_html($item [ 1 ])) ; } } - if(array_key_exists($emptyMarker, $dropdown)){ $output=array(); foreach($dropdown as $key => $value){ @@ -211,4 +210,4 @@ require_once('modules/ModuleBuilder/parsers/ModuleBuilderParser.php'); return $contents; } } -?> \ No newline at end of file +?> diff --git a/modules/ModuleBuilder/parsers/parser.modifylistview.php b/modules/ModuleBuilder/parsers/parser.modifylistview.php index cc7bf91b..0b477971 100644 --- a/modules/ModuleBuilder/parsers/parser.modifylistview.php +++ b/modules/ModuleBuilder/parsers/parser.modifylistview.php @@ -202,7 +202,6 @@ class ParserModifyListView extends ModuleBuilderParser if (strcmp ( $key, 'deleted' ) == 0 || (isset ( $def [ 'name' ] ) && strpos ( $def [ 'name' ], "_name" ) !== false)) return false; - _pp($def); //If none of the "ifs" are true, the field is valid return true; } diff --git a/modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php b/modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php index 9aa6e3e5..59194bc6 100644 --- a/modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php +++ b/modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php @@ -147,7 +147,6 @@ class ActivitiesRelationship extends OneToManyRelationship $vardef [ 'type' ] = 'link' ; $vardef [ 'relationship' ] = $relationshipName ; $vardef [ 'source' ] = 'non-db' ; - $vardef [ 'vname' ] = strtoupper("LBL_{$relationshipName}_FROM_{$sourceModule}_TITLE"); return $vardef ; } diff --git a/modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php b/modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php index a407f70e..07e6ad87 100644 --- a/modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php +++ b/modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php @@ -194,7 +194,8 @@ class GridLayoutMetaDataParser extends AbstractMetaDataParser implements MetaDat $availableFields [ $key ] = array ( 'name' => $key , 'label' => $this->_originalViewDef[$key]['label']) ; }else{ $availableFields [ $key ] = array ( 'name' => $key , 'label' => isset($def [ 'label' ]) ? $def [ 'label' ] : $def['vname'] ) ; // layouts use 'label' not 'vname' for the label entry - } + } + $availableFields[$key]['translatedLabel'] = translate($def['label'], $this->_moduleName); } } @@ -214,6 +215,14 @@ class GridLayoutMetaDataParser extends AbstractMetaDataParser implements MetaDat } } } + + //eggsurplus: Bug 10329 - sort on intuitive display labels + //sort by translatedLabel + function cmpLabel($a, $b) + { + return strcmp($a["translatedLabel"], $b["translatedLabel"]); + } + usort($availableFields , 'cmpLabel'); return $availableFields ; } diff --git a/modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php b/modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php index cb060dda..4f67bdc6 100644 --- a/modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php +++ b/modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php @@ -192,37 +192,40 @@ class ListLayoutMetaDataParser extends AbstractMetaDataParser implements MetaDat public function isValidField($key, $def) { - //Studio invisible fields should always be hidden - if (! empty ($def[ 'studio' ] ) ) + if (isset($def['studio'])) { - if (is_array($def [ 'studio' ])) + if (is_array($def['studio'])) { - //CL - Bug 42085 - if the element is explicitly set to be removed from the view, remove it - $view = !empty($_REQUEST['view']) ? $_REQUEST['view'] : ''; - if (!empty($view) && isset($def [ 'studio' ][$view])) - { - return $def [ 'studio' ][$view] !== false && $def [ 'studio' ][$view] != 'false' && $def [ 'studio' ][$view] != 'hidden'; + $view = !empty($_REQUEST['view']) ? $_REQUEST['view'] : $this->view; + + if (!empty($view) && isset($def['studio'][$view]) && ($def['studio'][$view] !== false && (string)$def['studio'][$view] != 'false' && (string)$def['studio'][$view] != 'hidden')) + { + return true; } - - if (isset($def [ 'studio' ]['listview'])) + + if (isset($def['studio']['listview']) && ($def['studio']['listview'] !== false && (string)$def['studio']['listview'] != 'false' && (string)$def['studio']['listview'] != 'hidden')) { - $lv = $def [ 'studio' ]['listview']; - return $lv !== false && (!is_string($lv) || $lv != 'false'); + return true; } - if (isset($def [ 'studio' ]['visible'])) + if (isset($def ['studio']['visible'])) { - return $def [ 'studio' ]['visible']; + return $def['studio']['visible']; } - } else { - return ($def [ 'studio' ] != 'false' && $def [ 'studio' ] !== false && $def [ 'studio' ] != 'hidden') ; + } else if(is_string($def['studio'])) { + return $def['studio'] != 'false' && $def['studio'] != 'hidden'; + } else if(is_bool($def['studio'])) { + return $def['studio']; } - } - + + } + //Bug 32520. We need to dissalow currency_id fields on list views. //This should be removed once array based studio definitions are in. if (isset($def['type']) && $def['type'] == "id" && $def['name'] == 'currency_id') + { return false; + } //Check fields types if (isset($def['dbType']) && $def['dbType'] == "id") diff --git a/modules/ModuleBuilder/parsers/views/SubpanelMetaDataParser.php b/modules/ModuleBuilder/parsers/views/SubpanelMetaDataParser.php index 9e0663ab..23b26caf 100644 --- a/modules/ModuleBuilder/parsers/views/SubpanelMetaDataParser.php +++ b/modules/ModuleBuilder/parsers/views/SubpanelMetaDataParser.php @@ -100,11 +100,11 @@ class SubpanelMetaDataParser extends ListLayoutMetaDataParser $labelParser->addLabels($selected_lang, array($_REQUEST['subpanel_title_key'] => remove_xss(from_html($_REQUEST['subpanel_title']))), $_REQUEST['view_module']); } } - + $defs = $this->restoreInvisibleFields($this->_invisibleFields,$this->_viewdefs); // unlike our parent, do not force the field names back to upper case $defs = $this->makeRelateFieldsAsLink($defs); - $this->implementation->deploy ($defs); - } + $this->implementation->deploy ($defs); + } /** * Return a list of the default fields for a subpanel @@ -160,7 +160,6 @@ class SubpanelMetaDataParser extends ListLayoutMetaDataParser return $listDef; } - /** * makeRelateFieldsAsLink * This method will go through the subpanel definition entries being saved and then apply formatting to any that are @@ -183,7 +182,7 @@ class SubpanelMetaDataParser extends ListLayoutMetaDataParser } return $defs; - } + } } ?> diff --git a/modules/ModuleBuilder/tpls/MBModule/dropdown.tpl b/modules/ModuleBuilder/tpls/MBModule/dropdown.tpl index 4980074f..2a4ae4da 100644 --- a/modules/ModuleBuilder/tpls/MBModule/dropdown.tpl +++ b/modules/ModuleBuilder/tpls/MBModule/dropdown.tpl @@ -42,7 +42,7 @@ - + {if ($refreshTree)} diff --git a/modules/ModuleBuilder/tpls/layoutView.tpl b/modules/ModuleBuilder/tpls/layoutView.tpl index 027b1a8a..0425226d 100644 --- a/modules/ModuleBuilder/tpls/layoutView.tpl +++ b/modules/ModuleBuilder/tpls/layoutView.tpl @@ -241,16 +241,13 @@ var editPanelProperties = function (panelId, view) { var editFieldProperties = function (idCount, label) {ldelim} var value_label = document.getElementById('le_label_' + idCount).innerHTML.replace(/^\s+|\s+$/g,''); var value_tabindex = document.getElementById('le_tabindex_' + idCount).innerHTML.replace(/^\s+|\s+$/g,''); - var title_label = '{sugar_translate label="LBL_LABEL_TITLE" module="ModuleBuilder"}'; - var title_tabindex = '{sugar_translate label="LBL_TAB_ORDER" module="ModuleBuilder"}'; - ModuleBuilder.getContent( 'module=ModuleBuilder&action=editProperty' + '&view_module={$view_module|escape:'url'}' + '{if $fromModuleBuilder}&view_package={$view_package}{/if}' + '&view={$view|escape:'url'}&id_label=le_label_' + encodeURIComponent(idCount) - + '&name_label=label_' + encodeURIComponent(label) + '&title_label=' + encodeURIComponent(title_label) + + '&name_label=label_' + encodeURIComponent(label) + '&title_label={sugar_translate label="LBL_LABEL_TITLE" module="ModuleBuilder"}' + '&value_label=' + encodeURIComponent(value_label) + '&id_tabindex=le_tabindex_' + encodeURIComponent(idCount) - + '&title_tabindex=' + encodeURIComponent(title_tabindex) + + '&title_tabindex={sugar_translate label="LBL_TAB_ORDER" module="ModuleBuilder"}' + '&name_tabindex=tabindex&value_tabindex=' + encodeURIComponent(value_tabindex) ); {rdelim} diff --git a/modules/ModuleBuilder/views/view.dropdown.php b/modules/ModuleBuilder/views/view.dropdown.php index bf8f34a4..48397b4f 100644 --- a/modules/ModuleBuilder/views/view.dropdown.php +++ b/modules/ModuleBuilder/views/view.dropdown.php @@ -82,6 +82,8 @@ class ViewDropdown extends SugarView $new =false; $my_list_strings = return_app_list_strings_language( $selected_lang ) ; // $my_list_strings = $GLOBALS['app_list_strings']; + + $smarty = new Sugar_Smarty(); //if we are using ModuleBuilder then process the following if(!empty($_REQUEST['view_package']) && $_REQUEST['view_package'] != 'studio'){ @@ -99,6 +101,7 @@ class ViewDropdown extends SugarView $vardef = (!empty($module->mbvardefs->fields[$_REQUEST['dropdown_name']]))? $module->mbvardefs->fields[$_REQUEST['dropdown_name']]: array(); $module->mblanguage->generateAppStrings(false) ; $my_list_strings = array_merge( $my_list_strings, $module->mblanguage->appListStrings[$selected_lang.'.lang.php'] ); + $smarty->assign('module_name', $module->name); } foreach($my_list_strings as $key=>$value){ @@ -114,8 +117,7 @@ class ViewDropdown extends SugarView $name = ''; $selected_dropdown = array(); - - $smarty = new Sugar_Smarty(); + $json = getJSONobj(); if(!empty($_REQUEST['dropdown_name']) && !$new){ @@ -148,7 +150,6 @@ class ViewDropdown extends SugarView $smarty->assign('prepopulated_name', $use_name); } - $smarty->assign('module', $this->module); $smarty->assign('APP', $GLOBALS['app_strings']); $smarty->assign('MOD', $GLOBALS['mod_strings']); $smarty->assign('selected_lang', $selected_lang); diff --git a/modules/ModuleBuilder/views/view.layoutview.php b/modules/ModuleBuilder/views/view.layoutview.php index 52f773f3..d35513e2 100644 --- a/modules/ModuleBuilder/views/view.layoutview.php +++ b/modules/ModuleBuilder/views/view.layoutview.php @@ -37,16 +37,10 @@ if (! defined ( 'sugarEntry' ) || ! sugarEntry) * "Powered by SugarCRM". ********************************************************************************/ -/********************************************************************************* - * Description: This file is used to override the default Meta-data EditView behavior - * to provide customization specific to the Calls module. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. - * All Rights Reserved. - * Contributor(s): ______________________________________.. - ********************************************************************************/ +//Load the parent view class if it exists. Check for custom file first +loadParentView('edit'); -require_once ('include/MVC/View/views/view.edit.php') ; require_once ('modules/ModuleBuilder/parsers/ParserFactory.php') ; require_once ('modules/ModuleBuilder/MB/AjaxCompose.php') ; require_once 'modules/ModuleBuilder/parsers/constants.php' ; diff --git a/modules/ModuleBuilder/views/view.listview.php b/modules/ModuleBuilder/views/view.listview.php index fcd080ac..99bd0513 100644 --- a/modules/ModuleBuilder/views/view.listview.php +++ b/modules/ModuleBuilder/views/view.listview.php @@ -37,10 +37,8 @@ if (! defined ( 'sugarEntry' ) || ! sugarEntry) ********************************************************************************/ - - - -require_once ('include/MVC/View/views/view.edit.php') ; +//Load the parent view class if it exists. Check for custom file first +loadParentView('edit'); require_once 'modules/ModuleBuilder/parsers/constants.php' ; require_once ('include/SubPanel/SubPanel.php') ; diff --git a/modules/ModuleBuilder/views/view.modulefield.php b/modules/ModuleBuilder/views/view.modulefield.php index 14135e83..81f3e0c0 100644 --- a/modules/ModuleBuilder/views/view.modulefield.php +++ b/modules/ModuleBuilder/views/view.modulefield.php @@ -76,7 +76,9 @@ class ViewModulefield extends SugarView // fields we override this so don't create a new dynamic field instead of updating the existing field $isClone = false; - if(!empty($this->view_object_map['is_clone']) && $this->view_object_map['is_clone']) + if(!empty($this->view_object_map['is_clone']) && $this->view_object_map['is_clone'] + && (strcmp($field_name, "name") != 0) // bug #35767, do not allow cloning of name field + ) $isClone = true; /* $field_types = array('varchar'=>'YourField', 'int'=>'Integer', 'float'=>'Decimal','bool'=>'Checkbox','enum'=>'DropDown', @@ -123,7 +125,7 @@ class ViewModulefield extends SugarView 'DATE','VARCHAR','VARCHAR2','NVARCHAR2','CHAR','NCHAR','NUMBER','PLS_INTEGER','BINARY_INTEGER','LONG','TIMESTAMP', 'INTERVAL','RAW','ROWID','UROWID','MLSLABEL','CLOB','NCLOB','BLOB','BFILE','XMLTYPE', //SugarCRM reserved - 'ID', 'ID_C', + 'ID', 'ID_C', 'PARENT_NAME', 'PARENT_ID', ); @@ -272,9 +274,11 @@ class ViewModulefield extends SugarView } } - if(!empty($vardef['studio']) && is_array($vardef['studio']) && !empty($vardef['studio']['no_duplicate']) && $vardef['studio']['no_duplicate'] == true) { - $fv->ss->assign('no_duplicate', true); - } + if((!empty($vardef['studio']) && is_array($vardef['studio']) && !empty($vardef['studio']['no_duplicate']) && $vardef['studio']['no_duplicate'] == true) + || (strcmp($field_name, "name") == 0)) // bug #35767, do not allow cloning of name field + { + $fv->ss->assign('no_duplicate', true); + } $fv->ss->assign('action',$action); $fv->ss->assign('isClone', ($isClone ? 1 : 0)); diff --git a/modules/ModuleBuilder/views/view.modulelabels.php b/modules/ModuleBuilder/views/view.modulelabels.php index 81d4baf9..e3dcd4fa 100644 --- a/modules/ModuleBuilder/views/view.modulelabels.php +++ b/modules/ModuleBuilder/views/view.modulelabels.php @@ -72,13 +72,13 @@ class ViewModulelabels extends SugarView $mb->getPackage($_REQUEST['view_package']); $package = $mb->packages[$_REQUEST['view_package']]; $package->getModule($module_name); - $this->module = $package->modules[$module_name]; + $mbModule = $package->modules[$module_name]; $selected_lang = (!empty($_REQUEST['selected_lang'])?$_REQUEST['selected_lang']:$_SESSION['authenticated_user_language']); if(empty($selected_lang)){ $selected_lang = $GLOBALS['sugar_config']['default_language']; } //need to change the following to interface with MBlanguage. - $smarty->assign('MOD', $this->module->getModStrings($selected_lang)); + $smarty->assign('MOD', $mbModule->getModStrings($selected_lang)); $smarty->assign('APP', $GLOBALS['app_strings']); $smarty->assign('selected_lang', $selected_lang); $smarty->assign('view_package', $package_name); diff --git a/modules/Notes/metadata/quickcreatedefs.php b/modules/Notes/metadata/quickcreatedefs.php index 417e1326..9fed470e 100644 --- a/modules/Notes/metadata/quickcreatedefs.php +++ b/modules/Notes/metadata/quickcreatedefs.php @@ -110,4 +110,4 @@ array ( ), ), ); -?> \ No newline at end of file +?> diff --git a/modules/Notes/metadata/subpanels/ForTasks.php b/modules/Notes/metadata/subpanels/ForTasks.php new file mode 100644 index 00000000..ea9d68f5 --- /dev/null +++ b/modules/Notes/metadata/subpanels/ForTasks.php @@ -0,0 +1,127 @@ + '', + + + 'list_fields' => array( + 'object_image'=>array( + 'vname' => 'LBL_OBJECT_IMAGE', + 'widget_class' => 'SubPanelIcon', + 'width' => '2%', + 'image2'=>'attachment', + 'image2_url_field'=>'file_url' + ), + 'name'=>array( + 'vname' => 'LBL_LIST_SUBJECT', + 'widget_class' => 'SubPanelDetailViewLink', + 'width' => '30%', + ), + 'reply_to_status' => array( + 'usage' => 'query_only', + 'force_exists' => true, + 'force_default' => 0, + ), + 'contact_name'=>array( + 'widget_class' => 'SubPanelDetailViewLink', + 'target_record_key' => 'contact_id', + 'target_module' => 'Contacts', + 'module' => 'Contacts', + 'vname' => 'LBL_LIST_CONTACT', + 'width' => '11%', + 'sortable'=>false, + ), + 'parent_id'=>array( + 'usage'=>'query_only', + 'force_exists'=>true + ), + 'parent_type'=>array( + 'usage'=>'query_only', + 'force_exists'=>true + ), + + 'date_modified'=>array( + 'vname' => 'LBL_LIST_DATE_MODIFIED', + 'width' => '10%', + ), + 'date_entered'=>array( + 'vname' => 'LBL_LIST_DATE_ENTERED', + 'width' => '10%', + ), + 'assigned_user_name' => array ( + 'name' => 'assigned_user_name', + 'vname' => 'LBL_LIST_ASSIGNED_TO_NAME', + 'widget_class' => 'SubPanelDetailViewLink', + 'target_record_key' => 'assigned_user_id', + 'target_module' => 'Employees', + 'width' => '10%', + ), + 'assigned_user_owner' => array ( + 'force_exists'=>true, //this will create a fake field since this field is not defined + 'usage'=>'query_only' + ), + 'assigned_user_mod' => array ( + 'force_exists'=>true, //this will create a fake field since this field is not defined + 'usage'=>'query_only' + ), + 'edit_button'=>array( + 'vname' => 'LBL_EDIT_BUTTON', + 'widget_class' => 'SubPanelEditButton', + 'width' => '2%', + ), + 'remove_button'=>array( + 'vname' => 'LBL_REMOVE', + 'widget_class' => 'SubPanelRemoveButton', + 'width' => '2%', + ), + 'file_url'=>array( + 'usage'=>'query_only' + ), + 'filename'=>array( + 'usage'=>'query_only' + ), + + ), +); +?> diff --git a/modules/Notes/vardefs.php b/modules/Notes/vardefs.php index 81474d4f..1aadf346 100644 --- a/modules/Notes/vardefs.php +++ b/modules/Notes/vardefs.php @@ -247,7 +247,7 @@ $dictionary['Note'] = array( 'contact_name'=> array( 'name'=>'contact_name', - 'rname'=>'last_name', + 'rname'=>'name', 'id_name'=>'contact_id', 'vname'=>'LBL_CONTACT_NAME', 'table'=>'contacts', @@ -421,6 +421,14 @@ $dictionary['Note'] = array( 'source'=>'non-db', 'vname'=>'LBL_CALLS', ), + 'tasks' => + array ( + 'name' => 'tasks', + 'type' => 'link', + 'relationship' => 'tasks_notes', + 'source'=>'non-db', + 'vname'=>'LBL_TASKS', + ), 'description' => array ( 'name' => 'description', diff --git a/modules/Opportunities/views/view.edit.php b/modules/Opportunities/views/view.edit.php index 53028589..e07bcf01 100644 --- a/modules/Opportunities/views/view.edit.php +++ b/modules/Opportunities/views/view.edit.php @@ -45,8 +45,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * Contributor(s): ______________________________________.. ********************************************************************************/ -require_once('include/MVC/View/views/view.edit.php'); - class OpportunitiesViewEdit extends ViewEdit { function OpportunitiesViewEdit(){ diff --git a/modules/Project/Project.php b/modules/Project/Project.php index bc30fbae..5852874b 100644 --- a/modules/Project/Project.php +++ b/modules/Project/Project.php @@ -137,6 +137,42 @@ class Project extends SugarBean { //$this->total_actual_effort = $this->_get_total_actual_effort($this->id); } + /** + * Save changes that have been made to a relationship. + * + * @param $is_update true if this save is an update. + */ + function save_relationship_changes($is_update, $exclude=array()) + { + parent::save_relationship_changes($is_update, $exclude); + $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){ + $new_rel_id = $_REQUEST['relate_id']; + $new_rel_relname = $_REQUEST['relate_to']; + if(!empty($this->in_workflow) && !empty($this->not_use_rel_in_req)) { + $new_rel_id = $this->new_rel_id; + $new_rel_relname = $this->new_rel_relname; + } + $new_rel_link = $new_rel_relname; + //Try to find the link in this bean based on the relationship + foreach ( $this->field_defs as $key => $def ) { + if (isset($def['type']) && $def['type'] == 'link' + && isset($def['relationship']) && $def['relationship'] == $new_rel_relname) { + $new_rel_link = $key; + } + } + if ($new_rel_link == 'contacts') { + $accountId = $this->db->getOne('SELECT account_id FROM accounts_contacts WHERE contact_id="' . $new_rel_id .'"'); + if ($accountId !== false) { + if($this->load_relationship('accounts')){ + $this->accounts->add($accountId); + } + } + } + } + } /** * */ diff --git a/modules/Project/gantt.css b/modules/Project/gantt.css new file mode 100644 index 00000000..6f88e9d4 --- /dev/null +++ b/modules/Project/gantt.css @@ -0,0 +1,221 @@ +/********************************************************************************* + * SugarCRM Community Edition is a customer relationship management program developed by + * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU Affero General Public License version 3 as published by the + * Free Software Foundation with the addition of the following permission added + * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK + * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY + * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. + * + * This program 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 Affero General Public License for more + * details. + * + * You should have received a copy of the GNU Affero General Public License along with + * this program; if not, see http://www.gnu.org/licenses or write to the Free + * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA. + * + * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, + * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. + * + * The interactive user interfaces in modified source and object code versions + * of this program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU Affero General Public License version 3. + * + * In accordance with Section 7(b) of the GNU Affero General Public License version 3, + * these Appropriate Legal Notices must retain the display of the "Powered by + * SugarCRM" logo. If the display of the logo is not reasonably feasible for + * technical reasons, the Appropriate Legal Notices must display the words + * "Powered by SugarCRM". + ********************************************************************************/ + + + #projectTable td, #projectTable th, #gantt td + { + border: 1px inset #808080; + } + + #projectTable th, + #projectTable td[scope=row], + #gantt tr[bgcolor] td, + #gantt tr#header_row td + { + background: #f6f6f6; + } + + /* gantt styles */ + + table.days { + font-family: Tahoma, Arial, Verdana, Helvetica, sans-serif; + font-size: 11px; + } + td.days { + border-top: 1px solid #dfdfdf !important; + border-bottom: 1px solid #dfdfdf !important; + border-left: 0px !important; + border-right: 0px !important; + } + + td.sunday { + border-top: 1px solid #dfdfdf !important; + border-bottom: 1px solid #dfdfdf !important; + border-left: 1px solid #dfdfdf !important; + border-right: 0px !important; + } + + td.saturday { + border-top: 1px solid #dfdfdf !important; + border-bottom: 1px solid #dfdfdf !important; + border-left: 0px !important; + border-right: 1px solid #dfdfdf !important; + } + + td.date { + width: 100%; + padding: 0px; + border-top: 0px; + border-bottom: 0px; + border-left: 0px; + border-right: 0px; + font-size: 10px; + } + + tr.empty { + height: 2px; + } + + div.completed { + background-color: #777777; + float: left; + width: 100%; + line-height: 10px; + margin-top: 4px; + } + + div.inprogress { + background-color: #002E4D; + float: left; + width: 100%; + line-height: 10px; + margin-top: 4px; + } + + div.inprogress_bar { + background-color: #ff0000; + float: left; + width: 100%; + line-height: 10px; + margin-top: 4px; + } + + div.notstarted { + background-color: #cccccc; + float: left; + width: 100%; + line-height: 10px; + margin-top: 4px; + } + + div.indent_left { + background-color: #000000; + float: left; + line-height: 10px; + margin-top: 4px; + } + + div.parent { + background-color: #000000; + float: left; + margin-top: 4px; + line-height: 4px; + } + + div.indent_right { + background-color: #000000; + float: right; + line-height: 10px; + margin-top: 4px; + } + + #horizWrapper {position:relative; margin-left:60px;width:218px;float:left;} + #horizBGDiv {position:relative; top:60px; background:url(horizBg.png) no-repeat; height:26px; width:218px;zindex:5 } + #horizHandleDiv { + position:absolute; + left: 100px; /* the default position is the center of the bg */ + top: 8px; /* force the image down a bit */ + cursor:default; + width:18px; + height:18px; + } + + /* end gantt styles */ + + + /* Project Divs */ + + #project_container{ + position:relative; + width:100%; + height:100%; + } + + #grid_space{ + position:absolute; + left:0px; + top:0px; + width:600px; + height:100%; + overflow-x:auto; + overflow-y:hidden; + } + + #grid_space table { + border-collapse:separate; + border: 1px solid gray; + border-spacing:0; + } + + #grid_space table select, #grid_space table input{ + border:0; + padding:0; + margin:0; + height:23px; + } + + + #gantt_area{ + margin-left:504px; + margin-right:0px; + height:100%; + overflow:auto; + } + + #gantt_area table { + border-collapse:separate; + border: 1px solid gray; + border-spacing:0; + } + + #resizer{ + top:0px; + position:absolute; + width:3px; + height:100%; + background:#C0C0C0; + } + + /* End Project Divs */ + + .menu{ + z-index:100; + } + + .subDmenu{ + z-index:100; + } + + \ No newline at end of file diff --git a/modules/Project/views/view.edit.php b/modules/Project/views/view.edit.php index c54686a1..e8cf5290 100644 --- a/modules/Project/views/view.edit.php +++ b/modules/Project/views/view.edit.php @@ -36,8 +36,6 @@ ********************************************************************************/ - require_once('include/MVC/View/views/view.edit.php'); - class ProjectViewEdit extends ViewEdit { function ProjectViewEdit(){ diff --git a/modules/Project/views/view.templatesedit.php b/modules/Project/views/view.templatesedit.php index 8fd557ea..62fbd85a 100644 --- a/modules/Project/views/view.templatesedit.php +++ b/modules/Project/views/view.templatesedit.php @@ -36,8 +36,6 @@ ********************************************************************************/ -require_once('include/MVC/View/views/view.edit.php'); - class ProjectViewTemplatesEdit extends ViewEdit { /** diff --git a/modules/ProjectTask/Popup.html b/modules/ProjectTask/Popup.html deleted file mode 100644 index 45124dc7..00000000 --- a/modules/ProjectTask/Popup.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - -{SET_RETURN_JS} - - - - - - - -
-
- - - - - - -
{MOD.LBL_NAME}   - - - - - - - - -
-
-
- - - - - - - - - -{PAGINATION} - - - - - - - - - - - - - - -
{MOD.LBL_LIST_NAME}{arrow_start}{name_arrow}{arrow_end}{MOD.LBL_LIST_ASSIGNED_USER_ID}{arrow_start}{assigned_user_name_arrow}{arrow_end}
{project_task.NAME}{project_task.ASSIGNED_USER_NAME}
- - \ No newline at end of file diff --git a/modules/ProjectTask/ProjectTask.php b/modules/ProjectTask/ProjectTask.php index fc0e3511..44da69fe 100644 --- a/modules/ProjectTask/ProjectTask.php +++ b/modules/ProjectTask/ProjectTask.php @@ -350,7 +350,8 @@ class ProjectTask extends SugarBean { } } return $query; - } + } + } diff --git a/modules/ProjectTask/vardefs.php b/modules/ProjectTask/vardefs.php index 13148a0f..0b48a154 100644 --- a/modules/ProjectTask/vardefs.php +++ b/modules/ProjectTask/vardefs.php @@ -152,7 +152,7 @@ $dictionary['ProjectTask'] = array('audited'=>true, 'duration_unit' => array( 'name' => 'duration_unit', 'vname' => 'LBL_DURATION_UNIT', - 'options' => 'project_duration_units_dom', + 'options' => 'project_duration_units_dom', 'type' => 'text', ), 'actual_duration' => array( @@ -200,7 +200,7 @@ $dictionary['ProjectTask'] = array('audited'=>true, 'dbType' => 'id', 'reportable'=>true, ), - 'modified_by_name' => + 'modified_by_name' => array ( 'name' => 'modified_by_name', 'vname' => 'LBL_MODIFIED_NAME', @@ -212,8 +212,8 @@ $dictionary['ProjectTask'] = array('audited'=>true, 'id_name' => 'modified_user_id', 'module'=>'Users', 'link'=>'modified_user_link', - 'duplicate_merge'=>'disabled' - ), + 'duplicate_merge'=>'disabled' + ), 'priority' => array( 'name' => 'priority', 'vname' => 'LBL_PRIORITY', @@ -231,7 +231,7 @@ $dictionary['ProjectTask'] = array('audited'=>true, 'dbType' => 'id', 'reportable'=>true, ), - 'created_by_name' => + 'created_by_name' => array ( 'name' => 'created_by_name', 'vname' => 'LBL_CREATED', @@ -388,7 +388,7 @@ $dictionary['ProjectTask'] = array('audited'=>true, 'relationship' => 'projects_project_tasks', 'vname' => 'LBL_PROJECT_NAME', 'link_type' => 'one', - 'module'=>'Projects', + 'module'=>'Project', 'bean_name'=>'Project', 'source'=>'non-db', ), diff --git a/modules/ProspectLists/ProspectList.php b/modules/ProspectLists/ProspectList.php index 72890802..dc8d87de 100644 --- a/modules/ProspectLists/ProspectList.php +++ b/modules/ProspectLists/ProspectList.php @@ -167,8 +167,7 @@ class ProspectList extends SugarBean { function create_export_members_query($record_id) { - $leads_query = "SELECT l.id AS id, 'Leads' AS related_type, '' AS \"name\", l.first_name AS first_name, l.last_name AS last_name, - l.title AS title, l.salutation AS salutation, + $leads_query = "SELECT l.id AS id, 'Leads' AS related_type, '' AS \"name\", l.first_name AS first_name, l.last_name AS last_name, l.title AS title, l.salutation AS salutation, l.primary_address_street AS primary_address_street,l.primary_address_city AS primary_address_city, l.primary_address_state AS primary_address_state, l.primary_address_postalcode AS primary_address_postalcode, l.primary_address_country AS primary_address_country, l.account_name AS account_name, ea.email_address AS primary_email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address, @@ -180,8 +179,8 @@ class ProspectList extends SugarBean { WHERE plp.prospect_list_id = $record_id AND plp.deleted=0 AND l.deleted=0 AND ear.deleted=0"; - $users_query = "SELECT u.id AS id, 'Users' AS related_type, '' AS \"name\", u.first_name AS first_name, u.last_name AS last_name, - u.title AS title, '' AS salutation, + + $users_query = "SELECT u.id AS id, 'Users' AS related_type, '' AS \"name\", u.first_name AS first_name, u.last_name AS last_name,u.title AS title, '' AS salutation, u.address_street AS primary_address_street,u.address_city AS primary_address_city, u.address_state AS primary_address_state, u.address_postalcode AS primary_address_postalcode, u.address_country AS primary_address_country, '' AS account_name, ea.email_address AS email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address, @@ -193,24 +192,22 @@ class ProspectList extends SugarBean { WHERE plp.prospect_list_id = $record_id AND plp.deleted=0 AND u.deleted=0 AND ear.deleted=0"; - $contacts_query = "SELECT c.id AS id, 'Contacts' AS related_type, '' AS \"name\", c.first_name AS first_name, c.last_name AS last_name, - c.title AS title, c.salutation AS salutation, + + $contacts_query = "SELECT c.id AS id, 'Contacts' AS related_type, '' AS \"name\", c.first_name AS first_name, c.last_name AS last_name,c.title AS title, c.salutation AS salutation, c.primary_address_street AS primary_address_street,c.primary_address_city AS primary_address_city, c.primary_address_state AS primary_address_state, c.primary_address_postalcode AS primary_address_postalcode, c.primary_address_country AS primary_address_country, a.name AS account_name, ea.email_address AS email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address, c.do_not_call AS do_not_call, c.phone_fax AS phone_fax, c.phone_other AS phone_other, c.phone_home AS phone_home, c.phone_mobile AS phone_mobile, c.phone_work AS phone_work - FROM accounts a,accounts_contacts ac, prospect_lists_prospects plp - INNER JOIN contacts c ON plp.related_id=c.id - LEFT JOIN email_addr_bean_rel ear ON ear.bean_id=c.id +FROM prospect_lists_prospects plp + INNER JOIN contacts c ON plp.related_id=c.id LEFT JOIN accounts_contacts ac ON ac.contact_id=c.id LEFT JOIN accounts a ON ac.account_id=a.id + LEFT JOIN email_addr_bean_rel ear ON ear.bean_id=c.id LEFT JOIN email_addresses ea ON ear.email_address_id=ea.id - WHERE plp.prospect_list_id = $record_id AND plp.deleted=0 + WHERE plp.prospect_list_id = $record_id AND plp.deleted=0 AND c.deleted=0 - AND ac.contact_id=c.id - AND ac.account_id=a.id AND ear.deleted=0"; - $prospects_query = "SELECT p.id AS id, 'Prospects' AS related_type, '' AS \"name\", p.first_name AS first_name, p.last_name AS last_name, - p.title AS title, p.salutation AS salutation, - p.primary_address_street AS primary_address_street,p.primary_address_city AS primary_address_city, '' AS primary_address_state, p.primary_address_postalcode AS primary_address_postalcode, p.primary_address_country AS primary_address_country, + + $prospects_query = "SELECT p.id AS id, 'Prospects' AS related_type, '' AS \"name\", p.first_name AS first_name, p.last_name AS last_name,p.title AS title, p.salutation AS salutation, + p.primary_address_street AS primary_address_street,p.primary_address_city AS primary_address_city, p.primary_address_state AS primary_address_state, p.primary_address_postalcode AS primary_address_postalcode, p.primary_address_country AS primary_address_country, p.account_name AS account_name, ea.email_address AS email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address, p.do_not_call AS do_not_call, p.phone_fax AS phone_fax, p.phone_other AS phone_other, p.phone_home AS phone_home, p.phone_mobile AS phone_mobile, p.phone_work AS phone_work @@ -220,9 +217,9 @@ class ProspectList extends SugarBean { LEFT JOIN email_addresses ea ON ear.email_address_id=ea.id WHERE plp.prospect_list_id = $record_id AND plp.deleted=0 AND p.deleted=0 - AND ear.deleted=0"; - $accounts_query = "SELECT a.id AS id, 'Accounts' AS related_type, a.name AS \"name\", '' AS first_name, '' AS last_name, - '' AS title, '' AS salutation, + AND ear.deleted=0"; + + $accounts_query = "SELECT a.id AS id, 'Accounts' AS related_type, a.name AS \"name\", '' AS first_name, '' AS last_name,'' AS title, '' AS salutation, a.billing_address_street AS primary_address_street,a.billing_address_city AS primary_address_city, a.billing_address_state AS primary_address_state, a.billing_address_postalcode AS primary_address_postalcode, a.billing_address_country AS primary_address_country, '' AS account_name, ea.email_address AS email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address, diff --git a/modules/ProspectLists/Save.php b/modules/ProspectLists/Save.php index 3509bdaa..db398dde 100644 --- a/modules/ProspectLists/Save.php +++ b/modules/ProspectLists/Save.php @@ -65,6 +65,23 @@ $focus = populateFromPost('', $focus); $focus->save($check_notify); $return_id = $focus->id; + +//Bug 33675 Duplicate target list +if( !empty($_REQUEST['duplicateId']) ){ + $copyFromProspectList = new ProspectList(); + $copyFromProspectList->retrieve($_REQUEST['duplicateId']); + $relations = $copyFromProspectList->retrieve_relationships('prospect_lists_prospects',array('prospect_list_id'=>$_REQUEST['duplicateId']),'related_id, related_type'); + if(count($relations)>0){ + foreach ($relations as $rel){ + $rel['prospect_list_id']=$return_id; + $focus->set_relationship('prospect_lists_prospects', $rel, true); + } + } + $focus->save(); +} + + + if(isset($_POST['return_module']) && $_POST['return_module'] != "") $return_module = $_POST['return_module']; else $return_module = "ProspectLists"; if(isset($_POST['return_action']) && $_POST['return_action'] != "") $return_action = $_POST['return_action']; @@ -79,7 +96,12 @@ if($return_action == "SaveCampaignProspectListRelationshipNew") } else { + //eggsurplus Bug 23816: maintain VCR after an edit/save. If it is a duplicate then don't worry about it. The offset is now worthless. + $redirect_url = "Location: index.php?action=$return_action&module=$return_module&record=$return_id"; + if(isset($_REQUEST['offset']) && empty($_REQUEST['duplicateSave'])) { + $redirect_url .= "&offset=".$_REQUEST['offset']; + } $GLOBALS['log']->debug("Saved record with id of ".$return_id); - header("Location: index.php?action=$return_action&module=$return_module&record=$return_id"); + header($redirect_url); } ?> \ No newline at end of file diff --git a/modules/Prospects/views/view.detail.php b/modules/Prospects/views/view.detail.php index 0336f315..32884fd9 100644 --- a/modules/Prospects/views/view.detail.php +++ b/modules/Prospects/views/view.detail.php @@ -36,14 +36,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ -/********************************************************************************* - - * Description: This file is used to override the default Meta-data DetailView behavior - * to provide customization specific to the Prospects module. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. - * All Rights Reserved. - * Contributor(s): ______________________________________.. - ********************************************************************************/ require_once('include/MVC/View/views/view.detail.php'); diff --git a/modules/Schedulers/Scheduler.php b/modules/Schedulers/Scheduler.php index 38d4d99e..06ce3711 100644 --- a/modules/Schedulers/Scheduler.php +++ b/modules/Schedulers/Scheduler.php @@ -83,16 +83,35 @@ class Scheduler extends SugarBean { var $order_by; - function Scheduler($init=true) { - parent::SugarBean(); - - if($init) { - - $user = new User(); - $user->retrieve('1'); // Scheduler jobs run as Admin - $this->user = $user; - } - } + function Scheduler($init=true) { + parent::SugarBean(); + if($init) { + $user = new User(); + //check is default admin exists + $adminId = $this->db->getOne( + 'SELECT id FROM users WHERE id=1 AND is_admin=1 AND deleted=0 AND status=\'Active\'', + true, + 'Error retrieving Admin account info' + ); + if (false === $adminId) {//retrive another admin + $adminId = $this->db->getOne( + 'SELECT id FROM users WHERE is_admin=1 AND deleted=0 AND status=\'Active\'', + true, + 'Error retrieving Admin account info' + ); + if ($adminId) { + $user->retrieve($adminId); + } else { + $GLOBALS['log']->fatal('No Admin account found!'); + return false; + } + + } else { + $user->retrieve('1'); // Scheduler jobs run as default Admin + } + $this->user = $user; + } + } /////////////////////////////////////////////////////////////////////////// @@ -220,7 +239,7 @@ class Scheduler extends SugarBean { } $now = TimeDate::getInstance()->getNow(); - $now = $now->setTime($now->hour, $now->min, "00")->asDb(); + $now = $now->setTime($now->hour, $now->min)->asDb(); $validTimes = $this->deriveDBDateTimes($this); if(is_array($validTimes) && in_array($now, $validTimes)) { @@ -581,17 +600,15 @@ class Scheduler extends SugarBean { /** * If "Execute If Missed bit is set */ - $now = TimeDate::getInstance()->getNow(); - $now = $now->setTime($now->hour, $now->min, "00")->asDb(); - if($focus->catch_up == 1) { if($focus->last_run == null) { // always "catch-up" - $validJobTime[] = $now; + $validJobTime[] = $timedate->nowDb(); } else { // determine what the interval in min/hours is // see if last_run is in it // if not, add NOW + $now = $timedate->nowDb(); if(!empty($validJobTime) && ($focus->last_run < $validJobTime[0]) && ($now > $validJobTime[0])) { // cn: empty() bug 5914; //if(!empty) should be checked, becasue if a scheduler is defined to run every day 4pm, then after 4pm, and it runs as 4pm, the $validJobTime will be empty, and it should not catch up @@ -821,13 +838,13 @@ class Scheduler extends SugarBean { if(is_windows()) { if(isset($_SERVER['Path']) && !empty($_SERVER['Path'])) { // IIS IUSR_xxx may not have access to Path or it is not set if(!strpos($_SERVER['Path'], 'php')) { - $error = ''.$mod_strings['LBL_NO_PHP_CLI'].''; +// $error = ''.$mod_strings['LBL_NO_PHP_CLI'].''; } } } else { if(isset($_SERVER['Path']) && !empty($_SERVER['Path'])) { // some Linux servers do not make this available if(!strpos($_SERVER['PATH'], 'php')) { - $error = ''.$mod_strings['LBL_NO_PHP_CLI'].''; +// $error = ''.$mod_strings['LBL_NO_PHP_CLI'].''; } } } diff --git a/modules/SchedulersJobs/SchedulersJob.php b/modules/SchedulersJobs/SchedulersJob.php index ae80a6b9..626c3dc7 100644 --- a/modules/SchedulersJobs/SchedulersJob.php +++ b/modules/SchedulersJobs/SchedulersJob.php @@ -64,16 +64,35 @@ class SchedulersJob extends SugarBean { * Sole constructor. */ function SchedulersJob($init=true) { - parent::SugarBean(); - - if($init) { - - $user = new User(); - $user->retrieve('1'); // Scheduler jobs run as Admin - $this->user = $user; - } - - } + parent::SugarBean(); + if($init) { + $user = new User(); + //check is default admin exists + $adminId = $this->db->getOne( + 'SELECT id FROM users WHERE id=1 AND is_admin=1 AND deleted=0 AND status=\'Active\'', + true, + 'Error retrieving Admin account info' + ); + if (false === $adminId) {//retrive other admin + $adminId = $this->db->getOne( + 'SELECT id FROM users WHERE is_admin=1 AND deleted=0 AND status=\'Active\'', + true, + 'Error retrieving Admin account info' + ); + if ($adminId) { + $user->retrieve($adminId); + } else { + $GLOBALS['log']->fatal('No Admin account found!'); + return false; + } + + } else { + $user->retrieve('1'); // Scheduler jobs run as default Admin + } + $this->user = $user; + } + } + /////////////////////////////////////////////////////////////////////////// //// SCHEDULERSJOB HELPER FUNCTIONS diff --git a/modules/Studio/DropDowns/DropDownHelper.php b/modules/Studio/DropDowns/DropDownHelper.php index 1fe920ee..52e8df67 100644 --- a/modules/Studio/DropDowns/DropDownHelper.php +++ b/modules/Studio/DropDowns/DropDownHelper.php @@ -83,7 +83,7 @@ class DropDownHelper{ foreach ($dropdown as $k => $v) { - if( isset($moduleList[$k]) && !$hiddenModList[$k]) + if( isset($moduleList[$k]) ) // && !$hiddenModList[$k]) $results[$k] = $v; } break; diff --git a/modules/Studio/DropDowns/EditView.tpl b/modules/Studio/DropDowns/EditView.tpl index 7d49a9e5..52f091f5 100644 --- a/modules/Studio/DropDowns/EditView.tpl +++ b/modules/Studio/DropDowns/EditView.tpl @@ -155,7 +155,7 @@ - + @@ -217,11 +217,11 @@ if(record){ jstransaction.record('changeDropDownValue', {'row':rowCount, 'new':val, 'old':document.getElementById('value_'+ rowCount).value}); } - document.getElementById('value_' + rowCount).value = escape(val); + document.getElementById('value_' + rowCount).value = YAHOO.lang.escapeHTML(val); var text = document.getElementById('slot' + rowCount + '_text'); var textspan = document.getElementById('slot' + rowCount + '_textspan'); var span = document.getElementById('slot' + rowCount + '_value'); - span.innerHTML = escape(val); + span.innerHTML = YAHOO.lang.escapeHTML(val); textspan.style.display = 'none'; text.value = ''; span.style.display = 'inline'; @@ -264,7 +264,7 @@ span1.className = 'slot'; var keyspan = document.createElement('span'); keyspan.id = 'slot' + slotCount + '_key' - keyspan.innerHTML = escape(addKey.value); + keyspan.innerHTML = YAHOO.lang.escapeHTML(addKey.value); span1.appendChild(keyspan); var span2 = document.createElement('span'); span2.id = 'slot' + slotCount + 'b'; diff --git a/modules/Studio/parsers/StudioParser.php b/modules/Studio/parsers/StudioParser.php index 9bc1d719..4f6eabb8 100644 --- a/modules/Studio/parsers/StudioParser.php +++ b/modules/Studio/parsers/StudioParser.php @@ -520,7 +520,7 @@ EOQ; - + diff --git a/modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php b/modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php index 1af5fafb..ae27b789 100644 --- a/modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php +++ b/modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php @@ -220,7 +220,7 @@ var $selectedCategories = array(); foreach($this->lvs->data['data'] as $row => $data) { - $this->lvs->data['data'][$row]['NAME'] = str_replace("{this.CREATED_BY}",get_assigned_user_name($this->lvs->data['data'][$row]['ASSIGNED_USER_ID']),$data['NAME']); + $this->lvs->data['data'][$row]['NAME'] = str_replace("{this.CREATED_BY}",get_assigned_user_name($this->lvs->data['data'][$row]['CREATED_BY']),$data['NAME']); } diff --git a/modules/Tasks/Dashlets/MyTasksDashlet/MyTasksDashlet.data.php b/modules/Tasks/Dashlets/MyTasksDashlet/MyTasksDashlet.data.php index 675796e6..5bf45228 100644 --- a/modules/Tasks/Dashlets/MyTasksDashlet/MyTasksDashlet.data.php +++ b/modules/Tasks/Dashlets/MyTasksDashlet/MyTasksDashlet.data.php @@ -65,22 +65,12 @@ $dashletData['MyTasksDashlet']['columns'] = array('set_complete' => array('width 'id' => 'PARENT_ID', 'ACLTag' => 'PARENT', 'related_fields' => array('parent_id', 'parent_type'), - 'default' => false, + 'default' => true, ), 'priority' => array('width' => '10', 'label' => 'LBL_PRIORITY', 'default' => true), - 'parent_name' => array('width' => '29', - 'label' => 'LBL_LIST_RELATED_TO', - 'sortable' => false, - 'dynamic_module' => 'PARENT_TYPE', - 'link' => true, - 'id' => 'PARENT_ID', - 'ACLTag' => 'PARENT', - 'related_fields' => array('parent_id', 'parent_type'), - 'default' => true, - ), - 'status' => array('width' => '8', + 'status' => array('width' => '8', 'label' => 'LBL_STATUS', 'default' => true), 'date_start' => array('width' => '15', diff --git a/modules/Tasks/Task.php b/modules/Tasks/Task.php index 0428953d..19c8d235 100644 --- a/modules/Tasks/Task.php +++ b/modules/Tasks/Task.php @@ -305,7 +305,7 @@ class Task extends SugarBean { //make sure we grab the localized version of the contact name, if a contact is provided if (!empty($this->contact_id)) { global $locale; - $query = "SELECT first_name, last_name, salutation, title FROM contacts "; + $query = "SELECT first_name, last_name, salutation, title,phone_work FROM contacts "; $query .= "WHERE id='$this->contact_id' AND deleted=0"; $result = $this->db->limitQuery($query,0,1,true," Error filling in contact name fields: "); @@ -315,10 +315,12 @@ class Task extends SugarBean { if($row != null) { $this->contact_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name'], $row['salutation'], $row['title']); + $this->contact_phone=$row['phone_work']; } } $task_fields['CONTACT_NAME']= $this->contact_name; + $task_fields['CONTACT_PHONE']= $this->contact_phone; $task_fields['TITLE'] = ''; if (!empty($task_fields['CONTACT_NAME'])) { $task_fields['TITLE'] .= $current_module_strings['LBL_LIST_CONTACT'].": ".$task_fields['CONTACT_NAME']; diff --git a/modules/Tasks/language/en_us.lang.php b/modules/Tasks/language/en_us.lang.php index 7e897145..b548c670 100644 --- a/modules/Tasks/language/en_us.lang.php +++ b/modules/Tasks/language/en_us.lang.php @@ -105,6 +105,7 @@ $mod_strings = array ( 'LBL_PARENT_NAME' => 'Parent Type:', 'LBL_ACTIVITIES_REPORTS' => 'Activities Report', 'LBL_TASK_INFORMATION' => 'Task Overview', + 'LBL_HISTORY_SUBPANEL_TITLE' => 'Notes', ); diff --git a/modules/Tasks/metadata/quickcreatedefs.php b/modules/Tasks/metadata/quickcreatedefs.php index 44c1012f..2a531d7d 100644 --- a/modules/Tasks/metadata/quickcreatedefs.php +++ b/modules/Tasks/metadata/quickcreatedefs.php @@ -99,7 +99,7 @@ array ( array ( array ( - 'name' => 'date_due', + 'name' => 'date_start', 'type' => 'datetimecombo', 'displayParams' => array ( @@ -117,7 +117,7 @@ array ( array ( array ( - 'name' => 'date_start', + 'name' => 'date_due', 'type' => 'datetimecombo', 'displayParams' => array ( diff --git a/modules/Tasks/metadata/subpaneldefs.php b/modules/Tasks/metadata/subpaneldefs.php new file mode 100644 index 00000000..3cc07753 --- /dev/null +++ b/modules/Tasks/metadata/subpaneldefs.php @@ -0,0 +1,67 @@ + array( + 'history' => array( + 'order' => 40, + 'title_key' => 'LBL_HISTORY_SUBPANEL_TITLE', + 'type' => 'collection', + 'subpanel_name' => 'history', //this values is not associated with a physical file. + 'sort_order' => 'desc', + 'sort_by' => 'date_entered', + 'header_definition_from_subpanel'=> 'calls', + 'module'=>'History', + 'top_buttons' => array( + array('widget_class' => 'SubPanelTopCreateNoteButton'), + ), + 'collection_list' => array( + 'notes' => array( + 'module' => 'Notes', + 'subpanel_name' => 'ForTasks', + 'get_subpanel_data' => 'notes', + ), + ), + ), /* end history subpanel def */ + ), +); +?> diff --git a/modules/Tasks/vardefs.php b/modules/Tasks/vardefs.php index 25089d0e..57e4c722 100644 --- a/modules/Tasks/vardefs.php +++ b/modules/Tasks/vardefs.php @@ -176,7 +176,7 @@ $dictionary['Task'] = array('table' => 'tasks', 'type'=>'phone', 'source'=>'non-db', 'vname'=>'LBL_CONTACT_PHONE', - 'studio' => array('listview' => false) + 'studio'=>array('listview' => true) ), 'contact_email'=> @@ -185,7 +185,7 @@ $dictionary['Task'] = array('table' => 'tasks', 'type'=>'varchar', 'vname' => 'LBL_EMAIL_ADDRESS', 'source' => 'non-db', - 'studio' => array('listview' => false) + 'studio' => 'hidden' ), 'priority' => @@ -261,6 +261,17 @@ $dictionary['Task'] = array('table' => 'tasks', 'source'=>'non-db', 'vname'=>'LBL_PROJECT_TASKS', ), + 'notes' => + array ( + 'name' => 'notes', + 'type' => 'link', + 'relationship' => 'tasks_notes', + 'module'=>'Notes', + 'bean_name'=>'Note', + 'source'=>'non-db', + 'vname'=>'LBL_NOTES', + ), + 'contact_parent'=> array ( 'name' => 'contact_parent', @@ -271,6 +282,15 @@ $dictionary['Task'] = array('table' => 'tasks', ) , 'relationships' => array ( + 'tasks_notes' => array( + 'lhs_module' => 'Tasks', + 'lhs_table' => 'tasks', + 'lhs_key' => 'id', + 'rhs_module' => 'Notes', + 'rhs_table' => 'notes', + 'rhs_key' => 'parent_id', + 'relationship_type' => 'one-to-many', + ), 'tasks_assigned_user' => array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id', diff --git a/modules/Tasks/views/view.edit.php b/modules/Tasks/views/view.edit.php index 1a9aabe8..f33e5e80 100644 --- a/modules/Tasks/views/view.edit.php +++ b/modules/Tasks/views/view.edit.php @@ -36,16 +36,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ -/********************************************************************************* - - * Description: This file is used to override the default Meta-data EditView behavior - * to provide customization specific to the Tasks module. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. - * All Rights Reserved. - * Contributor(s): ______________________________________.. - ********************************************************************************/ - -require_once('include/MVC/View/views/view.edit.php'); class TasksViewEdit extends ViewEdit { diff --git a/modules/Trackers/store/TrackerSessionsDatabaseStore.php b/modules/Trackers/store/TrackerSessionsDatabaseStore.php index 3f34b420..0f075493 100644 --- a/modules/Trackers/store/TrackerSessionsDatabaseStore.php +++ b/modules/Trackers/store/TrackerSessionsDatabaseStore.php @@ -73,14 +73,14 @@ class TrackerSessionsDatabaseStore implements Store { return; } - if ( !isset($monitor->round_trips) ) $monitor->round_trips = 0; - if ( !isset($monitor->active) ) $monitor->active = 1; - if ( !isset($monitor->seconds) ) $monitor->seconds = 0; + if ( empty($monitor->round_trips) ) $monitor->round_trips = 0; + if ( empty($monitor->active) ) $monitor->active = 1; + if ( empty($monitor->seconds) ) $monitor->seconds = 0; if($monitor->round_trips == 1) { $query = "INSERT INTO $monitor->table_name (" .implode("," , $columns). " ) VALUES ( ". implode("," , $values). ')'; $GLOBALS['db']->query($query); } else { - $query = "UPDATE $monitor->table_name SET date_end = '{$monitor->date_end}' , seconds = {$monitor->seconds}, active = '{$monitor->active}', round_trips = $monitor->round_trips WHERE session_id = '{$monitor->session_id}'"; + $query = "UPDATE $monitor->table_name SET date_end = '{$monitor->date_end}' , seconds = '{$monitor->seconds}', active = '{$monitor->active}', round_trips = $monitor->round_trips WHERE session_id = '{$monitor->session_id}'"; $GLOBALS['db']->query($query); } } diff --git a/modules/UpgradeWizard/uw_utils.php b/modules/UpgradeWizard/uw_utils.php index bf6766b4..a9969d54 100644 --- a/modules/UpgradeWizard/uw_utils.php +++ b/modules/UpgradeWizard/uw_utils.php @@ -595,14 +595,11 @@ function deleteCache(){ $allModFiles = findAllFiles($GLOBALS['sugar_config']['cache_dir'].'modules',$allModFiles); foreach($allModFiles as $file) { - if(file_exists($file)) { - if(is_dir($file)) { - rmdir_recursive($file); - } else { - unlink($file); - } - } - } + if(file_exists($file)) + { + unlink($file); + } + } } //Clean jsLanguage from cache @@ -2869,20 +2866,20 @@ function unlinkTempFiles() { * @param bool include_dir True if we want to include directories in the * returned collection */ -function uwFindAllFiles($dir, $the_array, $include_dirs=false, $skip_dirs=array(), $echo=false) { +function uwFindAllFiles($dir, $theArray, $includeDirs=false, $skipDirs=array(), $echo=false) { // check skips - foreach($skip_dirs as $skipMe) { - if(strpos(clean_path($dir), $skipMe) !== false) { - return $the_array; - } + if (whetherNeedToSkipDir($dir, $skipDirs)) + { + return $theArray; } - if (!is_dir($dir)) { return $the_array; } // Bug # 46035, just checking for valid dir + if (!is_dir($dir)) { return $theArray; } // Bug # 46035, just checking for valid dir $d = dir($dir); - if ($d === false) { return $the_array; } // Bug # 46035, more checking + if ($d === false) { return $theArray; } // Bug # 46035, more checking while($f = $d->read()) { - if($f == "." || $f == "..") { // skip *nix self/parent + // bug 40793 Skip Directories array in upgradeWizard does not function correctly + if($f == "." || $f == ".." || whetherNeedToSkipDir("$dir/$f", $skipDirs)) { // skip *nix self/parent continue; } @@ -2893,20 +2890,20 @@ function uwFindAllFiles($dir, $the_array, $include_dirs=false, $skip_dirs=array( } if(is_dir("$dir/$f")) { - if($include_dirs) { // add the directory if flagged - $the_array[] = clean_path("$dir/$f"); + if($includeDirs) { // add the directory if flagged + $theArray[] = clean_path("$dir/$f"); } // recurse in - $the_array = uwFindAllFiles("$dir/$f/", $the_array, $include_dirs, $skip_dirs, $echo); + $theArray = uwFindAllFiles("$dir/$f/", $theArray, $includeDirs, $skipDirs, $echo); } else { - $the_array[] = clean_path("$dir/$f"); + $theArray[] = clean_path("$dir/$f"); } } - rsort($the_array); - return $the_array; + rsort($theArray); + return $theArray; } @@ -4589,7 +4586,7 @@ function upgradeModulesForTeam() { foreach( $allHelpFiles as $the_file ){ if( is_file( $the_file ) ){ unlink( $the_file ); - logThis("Deleted file: $the_file", $path); + logThis("Deleted file: $the_file"); } } } @@ -5277,3 +5274,19 @@ if (!function_exists("getValidDBName")) } + +/** + * Whether directory exists within list of directories to skip + * @param string $dir dir to be checked + * @param array $skipDirs list with skipped dirs + * @return boolean + */ +function whetherNeedToSkipDir($dir, $skipDirs) +{ + foreach($skipDirs as $skipMe) { + if(strpos( clean_path($dir), $skipMe ) !== false) { + return true; + } + } + return false; +} diff --git a/modules/UserPreferences/UserPreference.php b/modules/UserPreferences/UserPreference.php index 71b27155..500f8a86 100644 --- a/modules/UserPreferences/UserPreference.php +++ b/modules/UserPreferences/UserPreference.php @@ -240,6 +240,8 @@ class UserPreference extends SugarBean { global $sugar_config, $db, $timezones, $timedate, $current_user; + require_once('include/timezone/timezones.php'); + $user = $this->_userFocus; $prefDate = array(); diff --git a/modules/Users/User.php b/modules/Users/User.php index 1c81719c..ce2d33a6 100644 --- a/modules/Users/User.php +++ b/modules/Users/User.php @@ -1330,12 +1330,7 @@ EOQ; continue; } - $focus = SugarModule::get($module)->loadBean(); - if ( $focus instanceOf SugarBean ) { - $key = $focus->acltype; - } else { - $key = 'module'; - } + $key = 'module'; if (($this->isAdmin() && isset($actions[$module][$key])) ) { diff --git a/modules/Users/authentication/EmailAuthenticate/EmailAuthenticateUser.php b/modules/Users/authentication/EmailAuthenticate/EmailAuthenticateUser.php index 72563a23..93a2aac3 100644 --- a/modules/Users/authentication/EmailAuthenticate/EmailAuthenticateUser.php +++ b/modules/Users/authentication/EmailAuthenticate/EmailAuthenticateUser.php @@ -128,32 +128,18 @@ class EmailAuthenticateUser extends SugarAuthenticateUser { else { $current_language = $_SESSION['authenticated_user_language']; } - $mail_settings = new Administration(); - $mail_settings->retrieveSettings('mail'); - - - $notify_mail->Subject = 'Sugar Token'; - $notify_mail->Body = 'Your sugar session authentication token is: ' . $password; - if ($mail_settings->settings['mail_sendtype'] == "SMTP") { - $notify_mail->Mailer = "smtp"; - $notify_mail->Host = $mail_settings->settings['mail_smtpserver']; - $notify_mail->Port = $mail_settings->settings['mail_smtpport']; - if ($mail_settings->settings['mail_smtpauth_req']) { - $notify_mail->SMTPAuth = TRUE; - $notify_mail->Username = $mail_settings->settings['mail_smtpuser']; - $notify_mail->Password = $mail_settings->settings['mail_smtppass']; - } - } - - $notify_mail->From = 'no-reply@sugarcrm.com'; - $notify_mail->FromName = 'Sugar Authentication'; + $notify_mail->Subject = 'Sugar Token'; + $notify_mail->Body = 'Your sugar session authentication token is: ' . $password; + $notify_mail->setMailerForSystem(); + $notify_mail->From = 'no-reply@sugarcrm.com'; + $notify_mail->FromName = 'Sugar Authentication'; - if(!$notify_mail->Send()) { - $GLOBALS['log']->warn("Notifications: error sending e-mail (method: {$notify_mail->Mailer}), (error: {$notify_mail->ErrorInfo})"); - } - else { - $GLOBALS['log']->info("Notifications: e-mail successfully sent"); - } + if(!$notify_mail->Send()) { + $GLOBALS['log']->warn("Notifications: error sending e-mail (method: {$notify_mail->Mailer}), (error: {$notify_mail->ErrorInfo})"); + } + else { + $GLOBALS['log']->info("Notifications: e-mail successfully sent"); + } diff --git a/modules/Users/authentication/SAMLAuthenticate/SAMLAuthenticateUser.php b/modules/Users/authentication/SAMLAuthenticate/SAMLAuthenticateUser.php index e91f2d4a..01e2701c 100644 --- a/modules/Users/authentication/SAMLAuthenticate/SAMLAuthenticateUser.php +++ b/modules/Users/authentication/SAMLAuthenticate/SAMLAuthenticateUser.php @@ -62,8 +62,8 @@ class SAMLAuthenticateUser extends SugarAuthenticateUser{ require 'modules/Users/authentication/SAMLAuthenticate/settings.php'; require 'modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml.php'; - $samlresponse = new SamlResponse($_POST['SAMLResponse']); - $samlresponse->user_settings = get_user_settings(); + $samlresponse = new SamlResponse(get_saml_settings(), $_POST['SAMLResponse']); + if ($samlresponse->is_valid()){ $dbresult = $GLOBALS['db']->query("SELECT id, status FROM users WHERE user_name='" . $samlresponse->get_nameid() . "' AND deleted = 0"); diff --git a/modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml/authrequest.php b/modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml/authrequest.php index 8d407ba5..1ee00e0a 100644 --- a/modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml/authrequest.php +++ b/modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml/authrequest.php @@ -69,7 +69,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. $base64_request = base64_encode($deflated_request); $encoded_request = urlencode($base64_request); - return $this->settings->idp_sso_target_url."?SAMLRequest=".$encoded_request; + if (strpos($this->settings->idp_sso_target_url, '?') !== false) { + return $this->settings->idp_sso_target_url."&SAMLRequest=".$encoded_request; + }else{ + return $this->settings->idp_sso_target_url."?SAMLRequest=".$encoded_request; + } } private function generateUniqueID($length) { diff --git a/modules/Users/metadata/SearchFields.php b/modules/Users/metadata/SearchFields.php index 5581fe21..9f74ca59 100644 --- a/modules/Users/metadata/SearchFields.php +++ b/modules/Users/metadata/SearchFields.php @@ -37,7 +37,8 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $searchFields['Users'] = array ( - 'first_name' => array( 'query_type'=>'default'), + 'user_name' => array( 'query_type'=>'default'), + 'first_name' => array( 'query_type'=>'default'), 'last_name'=> array('query_type'=>'default'), 'search_name'=> array('query_type'=>'default','db_field'=>array('first_name','last_name')), 'is_admin'=> array('query_type'=>'default', 'operator'=>'=', 'input_type' => 'checkbox'), diff --git a/modules/Users/tpls/wizard.tpl b/modules/Users/tpls/wizard.tpl index c0994e1e..5ef18d93 100644 --- a/modules/Users/tpls/wizard.tpl +++ b/modules/Users/tpls/wizard.tpl @@ -128,13 +128,13 @@ function disableReturnSubmission(e) { {$MOD.LBL_EMAIL}: {if $REQUIRED_EMAIL_ADDRESS}{$APP.LBL_REQUIRED_SYMBOL}{/if} - +     {$MOD.LBL_OFFICE_PHONE}: - + {$MOD.LBL_MESSENGER_TYPE}: {$MESSENGER_TYPE_OPTIONS} diff --git a/modules/vCals/vCal.php b/modules/vCals/vCal.php index cb5da915..efb72184 100644 --- a/modules/vCals/vCal.php +++ b/modules/vCals/vCal.php @@ -139,7 +139,7 @@ class vCal extends SugarBean { false, $start_date_time, $end_date_time, - 'week'); + 'freebusy'); // loop thru each activity, get start/end time in UTC, and return FREEBUSY strings foreach($acts_arr as $act) diff --git a/service/core/webservice.php b/service/core/webservice.php index 3cb8a889..72914986 100644 --- a/service/core/webservice.php +++ b/service/core/webservice.php @@ -41,6 +41,7 @@ if(!defined('sugarEntry'))define('sugarEntry', true); * and calls serve method which takes the request and send response back to the client */ ob_start(); +chdir(dirname(__FILE__).'/../../'); require('include/entryPoint.php'); require_once('soap/SoapError.php'); require_once('SoapHelperWebService.php'); diff --git a/sugar_version.php b/sugar_version.php index 63925275..9715a491 100644 --- a/sugar_version.php +++ b/sugar_version.php @@ -38,10 +38,10 @@ -$sugar_version = '6.2.2'; -$sugar_db_version = '6.2.2'; +$sugar_version = '6.2.3'; +$sugar_db_version = '6.2.3'; $sugar_flavor = 'CE'; -$sugar_build = '6573'; -$sugar_timestamp = '2011-08-24 06:01am'; +$sugar_build = '6658'; +$sugar_timestamp = '2011-09-21 06:39pm'; ?> diff --git a/tests/SugarTestProspectUtilities.php b/tests/SugarTestProspectUtilities.php new file mode 100755 index 00000000..de751a35 --- /dev/null +++ b/tests/SugarTestProspectUtilities.php @@ -0,0 +1,85 @@ +first_name = $first_name; + $prospect->last_name = $last_name ; + $prospect->title = $title; + $prospect->email1 = 'prospect@sugar.com'; + + if(!empty($id)) + { + $prospect->new_with_id = true; + $prospect->id = $id; + } + $prospect->save(); + self::$_createdProspects[] = $prospect; + return $prospect; + } + + + public static function removeAllCreatedProspects() + { + $prospect_ids = self::getCreatedProspectIds(); + $GLOBALS['db']->query('DELETE FROM prospects WHERE id IN (\'' . implode("', '", $prospect_ids) . '\')'); + } + public static function getCreatedProspectIds() + { + $prospect_ids = array(); + foreach (self::$_createdProspects as $prospect) { + $prospect_ids[] = $prospect->id; + } + return $prospect_ids; + } + +} +?> \ No newline at end of file diff --git a/tests/data/Bug40989Test.php b/tests/data/Bug40989Test.php index 2a203728..5ae46727 100755 --- a/tests/data/Bug40989Test.php +++ b/tests/data/Bug40989Test.php @@ -38,11 +38,12 @@ class Bug40989 extends Sugar_PHPUnit_Framework_TestCase { - protected $contact; - + var $contact; +/* public static function setUpBeforeClass() { $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(); + } public static function tearDownAfterClass() @@ -50,11 +51,12 @@ class Bug40989 extends Sugar_PHPUnit_Framework_TestCase SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); unset($GLOBALS['current_user']); } - +*/ public function setUp() { $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(); $this->contact = SugarTestContactUtilities::createContact(); + $this->useOutputBuffering = false; } public function tearDown() @@ -71,18 +73,15 @@ class Bug40989 extends Sugar_PHPUnit_Framework_TestCase { $loadedContact = loadBean('Contacts'); $loadedContact = $loadedContact->retrieve_by_string_fields(array('last_name'=>'SugarContactLast')); - $this->assertEquals('SugarContactLast', $loadedContact->fetched_row['last_name']); } public function testProcessFullListQuery() { - $loadedContact = loadBean('Contacts'); + $loadedContact = new Contact(); // loadBean('Contacts'); $loadedContact->disable_row_level_security = true; $contactList = $loadedContact->get_full_list(); - $exampleContact = array_pop($contactList); - - $this->assertNotNull($exampleContact->fetched_row['last_name']); + $this->assertNotNull($exampleContact->fetched_row['id']); } } diff --git a/tests/include/Bug23816Test.php b/tests/include/Bug23816Test.php new file mode 100755 index 00000000..790dbe8f --- /dev/null +++ b/tests/include/Bug23816Test.php @@ -0,0 +1,67 @@ +assertContains('offset=4',$url,"Offset was not included in the redirect url"); + } +} diff --git a/tests/include/EditView/Bug46365Test.php b/tests/include/EditView/Bug46365Test.php new file mode 100755 index 00000000..28f92401 --- /dev/null +++ b/tests/include/EditView/Bug46365Test.php @@ -0,0 +1,123 @@ +_o = $this->getMockBuilder('EditView') + ->setMethods(array('requiredFirst')) + ->disableOriginalConstructor() + ->getMock(); + } + + public function tearDown() + { + unset($this->_o); + } + + public function provider() + { + return array( + // 1 row, 1 element, 2 columns + array( + array( + 'templateMeta' => array( + 'maxColumns' => '2', + 'widths' => array( + array('label' => '10', 'field' => '30'), + array('label' => '10', 'field' => '30'), + ), + ), + 'panels' => array( + 'panel1' => array( + array( + array('name' => 'name1',), + ), + ), + ), + ), + true + ), + + // 1 row, 2 elements, 3 columns + array( + array( + 'templateMeta' => array( + 'maxColumns' => '3', + 'widths' => array( + array('label' => '10', 'field' => '30'), + array('label' => '10', 'field' => '30'), + array('label' => '10', 'field' => '30'), + ), + ), + 'panels' => array( + 'panel1' => array( + array( + array('name' => 'name1',), + array('name' => 'name2',), + ), + ), + ), + ), + true + ), + ); + } + + /** + * @dataProvider provider + */ + public function testPanelWithOneFullWidthItem($defs, $shouldHaveFiller) + { + $this->_o->defs = $defs; + $this->_o->render(); + + $this->assertEquals($this->hasFiller($defs), $shouldHaveFiller); + } + + private function hasFiller($defs) + { + return (boolean) count(intval($defs['panels']['panel1'][0]) - intval((int) $this->_o->defs['panels']['panel1'][0])); + } + +} + +?> \ No newline at end of file diff --git a/tests/include/ListView/Bug45566Test.php b/tests/include/ListView/Bug45566Test.php new file mode 100755 index 00000000..b0babf7d --- /dev/null +++ b/tests/include/ListView/Bug45566Test.php @@ -0,0 +1,78 @@ +is_admin = 1; + } + + public function tearDown() + { + SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); + } + + + public function testListViewDisplayMultiSelect() + { + $lv = new ListViewSmarty(); + $lv->multiSelect = false; + $lv->should_process = true; + $account = new Account(); + $lv->seed = $account; + $lv->displayColumns = array(); + $mockData = array(); + $mockData['data'] = array(); + $mockData['pageData'] = array('ordering'=>'ASC', 'offsets' => array('current'=>0, 'next'=>0, 'total'=>0), 'bean'=>array('moduleDir'=>$account->module_dir)); + $lv->process('include/ListView/ListViewGeneric.tpl', $mockData, $account->module_dir); + $this->assertEquals('', $lv->ss->_tpl_vars['multiSelectData'], 'Assert that multiSelectData Smarty variable was still assigned'); + } + +} + +?> \ No newline at end of file diff --git a/tests/include/MVC/Controller/SugarControllerTest.php b/tests/include/MVC/Controller/SugarControllerTest.php index de246be8..1912adf3 100755 --- a/tests/include/MVC/Controller/SugarControllerTest.php +++ b/tests/include/MVC/Controller/SugarControllerTest.php @@ -262,6 +262,83 @@ class SugarControllerTest extends Sugar_PHPUnit_Framework_TestCase rmdir_recursive("modules/$module_name"); } + + public function testPostDelete() + { + $_REQUEST['return_module'] = 'foo'; + $_REQUEST['return_action'] = 'bar'; + $_REQUEST['return_id'] = '123'; + + $controller = new SugarControllerMock; + $controller->post_delete(); + + unset($_REQUEST['return_module']); + unset($_REQUEST['return_action']); + unset($_REQUEST['return_id']); + + $this->assertEquals("index.php?module=foo&action=bar&record=123",$controller->redirect_url); + } + + /** + * @ticket 23816 + */ + public function testPostDeleteWithOffset() + { + $_REQUEST['return_module'] = 'foo'; + $_REQUEST['return_action'] = 'bar'; + $_REQUEST['return_id'] = '123'; + $_REQUEST['offset'] = '2'; + + $controller = new SugarControllerMock; + $controller->post_delete(); + + unset($_REQUEST['return_module']); + unset($_REQUEST['return_action']); + unset($_REQUEST['return_id']); + unset($_REQUEST['offset']); + + $this->assertEquals("index.php?module=foo&action=bar&record=123&offset=2",$controller->redirect_url); + } + + /** + * @ticket 23816 + */ + public function testPostDeleteWithOffsetAndDuplicateSave() + { + $_REQUEST['return_module'] = 'foo'; + $_REQUEST['return_action'] = 'bar'; + $_REQUEST['return_id'] = '123'; + $_REQUEST['offset'] = '2'; + $_REQUEST['duplicateSave'] = true; + + $controller = new SugarControllerMock; + $controller->post_delete(); + + unset($_REQUEST['return_module']); + unset($_REQUEST['return_action']); + unset($_REQUEST['return_id']); + unset($_REQUEST['offset']); + unset($_REQUEST['duplicateSave']); + + $this->assertEquals("index.php?module=foo&action=bar&record=123",$controller->redirect_url); + } + + public function testPostDeleteWithDefaultValues() + { + $backupDefaultModule = $GLOBALS['sugar_config']['default_module']; + $backupDefaultAction = $GLOBALS['sugar_config']['default_action']; + + $GLOBALS['sugar_config']['default_module'] = 'yuck'; + $GLOBALS['sugar_config']['default_action'] = 'yuckyuck'; + + $controller = new SugarControllerMock; + $controller->post_delete(); + + $GLOBALS['sugar_config']['default_module'] = $backupDefaultModule; + $GLOBALS['sugar_config']['default_action'] = $backupDefaultAction; + + $this->assertEquals("index.php?module=yuck&action=yuckyuck&record=",$controller->redirect_url); + } } class SugarControllerMock extends SugarController @@ -272,4 +349,9 @@ class SugarControllerMock extends SugarController { return parent::callLegacyCode(); } + + public function post_delete() + { + parent::post_delete(); + } } diff --git a/tests/include/MVC/View/Bug44831Test.php b/tests/include/MVC/View/Bug44831Test.php new file mode 100755 index 00000000..34906e48 --- /dev/null +++ b/tests/include/MVC/View/Bug44831Test.php @@ -0,0 +1,147 @@ + array ( + 'form' => array('buttons' => array ('SAVE', 'CANCEL'), + 'hidden' => array ('HiddenPlaceHolder', + ), + ), + 'maxColumns' => '2', + 'useTabs' => true, + 'widths' => array( array ('label' => '10', 'field' => '30'), + array ('label' => '10', 'field' => '30'), + ), + 'javascript' => array( array ('file' => 'custom/modules/Leads/javascript/LeadJS1.js'), + array ('file' => 'custom/modules/Leads/javascript/LeadJS2.js'), + ), + ), + 'panels' => array ('default' => array (0 => array (0 => array ('name' => 'first_name', + ), + 1 => array ('name' => 'last_name', + ), + ), + 1 => array (0 => array ('name' => 'unknown_field', + 'customCode' => 'Unknown Field Link', + ), + ), + ), + ), + ); +?> +EOQ; + fputs( $fh, $string); + fclose( $fh ); + } + + + } + + public function tearDown() + { + if ( is_dir("cache/modules/Leads") ) + rmdir_recursive("cache/modules/Leads"); + + if (file_exists("custom/modules/Leads/metadata/editviewdefs.php")) + unlink("custom/modules/Leads/metadata/editviewdefs.php"); + + SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); + unset($GLOBALS['app_list_strings']); + unset($GLOBALS['current_user']); + } + + /** + * @group bug44831 + */ + public function testJSInjection() + { + $this->markTestSkipped('Marked as skipped for now... too problematic'); + return; + require_once('include/utils/layout_utils.php'); + $_SERVER['REQUEST_METHOD'] = "POST"; + + $lead = SugarTestLeadUtilities::createLead(); + $lead->name = 'LeadName'; + $lead->save(); + + $_REQUEST['module'] = 'Leads'; + $_REQUEST['action'] = 'EditView'; + $_REQUEST['record'] = $lead->id; + + require_once('include/MVC/Controller/ControllerFactory.php'); + require_once('include/MVC/View/ViewFactory.php'); + $GLOBALS['app']->controller = ControllerFactory::getController($_REQUEST['module']); + //ob_start(); + $GLOBALS['app']->controller->execute(); + //$tStr = ob_get_clean(); + + // First of all, need to be sure that I'm actually dealing with my new custom DetailView Layout + $this->expectOutputRegex('/.*HiddenPlaceHolder.*/'); + // Then check inclusion of LeadJS1.js + $this->expectOutputRegex('/.*