typo 5.0.3.98.1 → 5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES-5.1 +54 -0
- data/app/apis/meta_weblog_service.rb +7 -6
- data/app/controllers/accounts_controller.rb +2 -1
- data/app/controllers/admin/content_controller.rb +45 -3
- data/app/controllers/admin/pages_controller.rb +1 -1
- data/app/controllers/admin/textfilters_controller.rb +4 -4
- data/app/controllers/admin/users_controller.rb +14 -2
- data/app/controllers/application.rb +4 -1
- data/app/controllers/articles_controller.rb +1 -3
- data/app/controllers/backend_controller.rb +2 -0
- data/app/controllers/comments_controller.rb +6 -0
- data/app/helpers/admin/base_helper.rb +24 -26
- data/app/helpers/admin/feedback_helper.rb +0 -20
- data/app/helpers/application_helper.rb +1 -0
- data/app/models/article.rb +2 -0
- data/app/models/blog.rb +1 -0
- data/app/models/blog_sweeper.rb +8 -9
- data/app/models/page_cache.rb +1 -0
- data/app/models/tag.rb +2 -2
- data/app/models/user.rb +5 -1
- data/app/views/admin/blacklist/destroy.html.erb +1 -1
- data/app/views/admin/categories/destroy.html.erb +1 -1
- data/app/views/admin/comments/destroy.html.erb +1 -1
- data/app/views/admin/content/_articles.html.erb +4 -4
- data/app/views/admin/content/_attachment.html.erb +6 -7
- data/app/views/admin/content/_drafts.html.erb +6 -0
- data/app/views/admin/content/_form.html.erb +47 -34
- data/app/views/admin/content/destroy.html.erb +1 -1
- data/app/views/admin/content/edit.html.erb +1 -1
- data/app/views/admin/content/index.html.erb +1 -6
- data/app/views/admin/content/new.html.erb +1 -1
- data/app/views/admin/pages/_form.html.erb +4 -3
- data/app/views/admin/pages/_pages.html.erb +3 -3
- data/app/views/admin/pages/destroy.html.erb +1 -1
- data/app/views/admin/resources/destroy.html.erb +1 -1
- data/app/views/admin/settings/index.html.erb +10 -0
- data/app/views/admin/shared/_edit.html.erb +1 -6
- data/app/views/admin/textfilters/destroy.html.erb +3 -0
- data/app/views/admin/textfilters/edit.html.erb +3 -1
- data/app/views/admin/textfilters/index.html.erb +1 -1
- data/app/views/admin/textfilters/new.html.erb +3 -1
- data/app/views/admin/trackbacks/show.html.erb +1 -1
- data/app/views/admin/users/destroy.html.erb +1 -1
- data/app/views/admin/users/edit.html.erb +1 -5
- data/app/views/admin/users/index.html.erb +1 -1
- data/app/views/articles/_comment_failed.html.erb +3 -0
- data/config/initializers/access_rules.rb +3 -3
- data/db/migrate/070_add_users_to_non_admins.rb +17 -0
- data/installer/rails_installer_defaults.yml +1 -1
- data/lib/tasks/release.rake +3 -3
- data/lib/typo_version.rb +1 -1
- data/public/images/admin/cancel.png +0 -0
- data/public/images/admin/checked.png +0 -0
- data/public/images/admin/delete.png +0 -0
- data/public/images/admin/edit.png +0 -0
- data/public/images/admin/show.png +0 -0
- data/public/javascripts/controls.js +2 -0
- data/public/javascripts/dragdrop.js +2 -0
- data/public/javascripts/effects.js +6 -4
- data/public/javascripts/fckeditor/editor/_source/classes/fckcontextmenu.js +13 -8
- data/public/javascripts/fckeditor/editor/_source/classes/fckdataprocessor.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckdocumentfragment_gecko.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckdocumentfragment_ie.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange.js +189 -79
- data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange_gecko.js +4 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange_ie.js +16 -15
- data/public/javascripts/fckeditor/editor/_source/classes/fckdomrangeiterator.js +30 -9
- data/public/javascripts/fckeditor/editor/_source/classes/fckeditingarea.js +108 -90
- data/public/javascripts/fckeditor/editor/_source/classes/fckelementpath.js +22 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fckenterkey.js +76 -38
- data/public/javascripts/fckeditor/editor/_source/classes/fckevents.js +7 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckhtmliterator.js +142 -0
- data/public/javascripts/fckeditor/editor/_source/classes/fckicon.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckiecleanup.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fckimagepreloader.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckkeystrokehandler.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fckmenublock.js +8 -5
- data/public/javascripts/fckeditor/editor/_source/classes/fckmenublockpanel.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fckmenuitem.js +6 -5
- data/public/javascripts/fckeditor/editor/_source/classes/fckpanel.js +85 -38
- data/public/javascripts/fckeditor/editor/_source/classes/fckplugin.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckspecialcombo.js +7 -8
- data/public/javascripts/fckeditor/editor/_source/classes/fckstyle.js +180 -17
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbar.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbreak_gecko.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbreak_ie.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbutton.js +9 -4
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbuttonui.js +5 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontformatcombo.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontscombo.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontsizecombo.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarpanelbutton.js +15 -4
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarspecialcombo.js +5 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarstylecombo.js +13 -13
- data/public/javascripts/fckeditor/editor/_source/classes/fckw3crange.js +17 -13
- data/public/javascripts/fckeditor/editor/_source/classes/fckxml.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckxml_gecko.js +28 -13
- data/public/javascripts/fckeditor/editor/_source/classes/fckxml_ie.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fck_othercommands.js +75 -19
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckblockquotecommand.js +64 -8
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckcorestylecommand.js +3 -1
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckfitwindow.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckindentcommands.js +5 -3
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckjustifycommands.js +6 -6
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fcklistcommands.js +4 -4
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fcknamedcommand.js +3 -1
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js +3 -1
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckremoveformatcommand.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckshowblocks.js +7 -9
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_gecko.js +4 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_ie.js +4 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckstylecommand.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fcktablecommand.js +4 -4
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js +28 -10
- data/public/javascripts/fckeditor/editor/_source/fckconstants.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/fckeditorapi.js +21 -13
- data/public/javascripts/fckeditor/editor/_source/fckjscoreextensions.js +5 -5
- data/public/javascripts/fckeditor/editor/_source/fckscriptloader.js +4 -4
- data/public/javascripts/fckeditor/editor/_source/internals/fck.js +148 -38
- data/public/javascripts/fckeditor/editor/_source/internals/fck_contextmenu.js +4 -4
- data/public/javascripts/fckeditor/editor/_source/internals/fck_gecko.js +45 -47
- data/public/javascripts/fckeditor/editor/_source/internals/fck_ie.js +50 -17
- data/public/javascripts/fckeditor/editor/_source/internals/fckbrowserinfo.js +4 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckcodeformatter.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckcommands.js +28 -28
- data/public/javascripts/fckeditor/editor/_source/internals/fckconfig.js +12 -13
- data/public/javascripts/fckeditor/editor/_source/internals/fckdebug.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckdialog.js +211 -15
- data/public/javascripts/fckeditor/editor/_source/internals/fckdocumentprocessor.js +63 -39
- data/public/javascripts/fckeditor/editor/_source/internals/fckdomtools.js +177 -37
- data/public/javascripts/fckeditor/editor/_source/internals/fcklanguagemanager.js +2 -1
- data/public/javascripts/fckeditor/editor/_source/internals/fcklisthandler.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fcklistslib.js +5 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckplugins.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckregexlib.js +5 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckselection.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/internals/fckselection_gecko.js +36 -27
- data/public/javascripts/fckeditor/editor/_source/internals/fckselection_ie.js +91 -17
- data/public/javascripts/fckeditor/editor/_source/internals/fckstyles.js +22 -13
- data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler.js +15 -15
- data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler_gecko.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler_ie.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fcktoolbaritems.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/internals/fcktoolbarset.js +32 -6
- data/public/javascripts/fckeditor/editor/_source/internals/fcktools.js +181 -22
- data/public/javascripts/fckeditor/editor/_source/internals/fcktools_gecko.js +19 -7
- data/public/javascripts/fckeditor/editor/_source/internals/fcktools_ie.js +8 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckundo.js +8 -5
- data/public/javascripts/fckeditor/editor/_source/internals/fckurlparams.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml.js +116 -61
- data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml_gecko.js +6 -10
- data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml_ie.js +51 -56
- data/public/javascripts/fckeditor/editor/_source/internals/fckxhtmlentities.js +1 -1
- data/public/javascripts/fckeditor/editor/css/fck_editorarea.css +3 -2
- data/public/javascripts/fckeditor/editor/css/fck_internal.css +19 -2
- data/public/javascripts/fckeditor/editor/css/fck_showtableborders_gecko.css +8 -1
- data/public/javascripts/fckeditor/editor/css/images/fck_plugin.gif +0 -0
- data/public/javascripts/fckeditor/editor/dialog/common/fck_dialog_common.css +8 -1
- data/public/javascripts/fckeditor/editor/dialog/common/fck_dialog_common.js +199 -26
- data/public/javascripts/fckeditor/editor/dialog/fck_about.html +20 -14
- data/public/javascripts/fckeditor/editor/dialog/fck_about/sponsors/spellchecker_net.gif +0 -0
- data/public/javascripts/fckeditor/editor/dialog/fck_anchor.html +15 -10
- data/public/javascripts/fckeditor/editor/dialog/fck_button.html +9 -14
- data/public/javascripts/fckeditor/editor/dialog/fck_checkbox.html +8 -13
- data/public/javascripts/fckeditor/editor/dialog/fck_colorselector.html +4 -3
- data/public/javascripts/fckeditor/editor/dialog/fck_docprops.html +6 -6
- data/public/javascripts/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html +1 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_flash.html +9 -3
- data/public/javascripts/fckeditor/editor/dialog/fck_flash/fck_flash.js +18 -11
- data/public/javascripts/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html +7 -3
- data/public/javascripts/fckeditor/editor/dialog/fck_form.html +7 -4
- data/public/javascripts/fckeditor/editor/dialog/fck_hiddenfield.html +12 -15
- data/public/javascripts/fckeditor/editor/dialog/fck_image.html +9 -3
- data/public/javascripts/fckeditor/editor/dialog/fck_image/fck_image.js +24 -12
- data/public/javascripts/fckeditor/editor/dialog/fck_image/fck_image_preview.html +24 -18
- data/public/javascripts/fckeditor/editor/dialog/fck_link.html +1 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_link/fck_link.js +41 -20
- data/public/javascripts/fckeditor/editor/dialog/fck_listprop.html +8 -4
- data/public/javascripts/fckeditor/editor/dialog/fck_paste.html +53 -54
- data/public/javascripts/fckeditor/editor/dialog/fck_radiobutton.html +8 -13
- data/public/javascripts/fckeditor/editor/dialog/fck_replace.html +157 -79
- data/public/javascripts/fckeditor/editor/dialog/fck_select.html +14 -11
- data/public/javascripts/fckeditor/editor/dialog/fck_select/fck_select.js +2 -2
- data/public/javascripts/fckeditor/editor/dialog/fck_smiley.html +9 -4
- data/public/javascripts/fckeditor/editor/dialog/fck_source.html +5 -2
- data/public/javascripts/fckeditor/editor/dialog/fck_specialchar.html +9 -6
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages.html +2 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm +3 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php +5 -2
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl +2 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js +0 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css +1 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_table.html +10 -5
- data/public/javascripts/fckeditor/editor/dialog/fck_tablecell.html +8 -6
- data/public/javascripts/fckeditor/editor/dialog/fck_template.html +1 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_textarea.html +10 -11
- data/public/javascripts/fckeditor/editor/dialog/fck_textfield.html +10 -14
- data/public/javascripts/fckeditor/editor/dtd/fck_dtd_test.html +0 -2
- data/public/javascripts/fckeditor/editor/dtd/fck_xhtml10strict.js +2 -2
- data/public/javascripts/fckeditor/editor/dtd/fck_xhtml10transitional.js +3 -3
- data/public/javascripts/fckeditor/editor/fckdebug.html +1 -1
- data/public/javascripts/fckeditor/editor/fckdialog.html +660 -213
- data/public/javascripts/fckeditor/editor/fckeditor.html +66 -16
- data/public/javascripts/fckeditor/editor/fckeditor.original.html +70 -16
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/browser.css +2 -2
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/browser.html +37 -2
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmactualfolder.html +33 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html +1 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmfolders.html +2 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmresourceslist.html +3 -2
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmresourcetype.html +1 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmupload.html +2 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/js/common.js +34 -2
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/js/fckxml.js +3 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/aspx/connector.aspx +5 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/aspx/upload.aspx +5 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/basexml.pl +1 -1
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/commands.pl +50 -4
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/connector.cgi +2 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/io.pl +14 -4
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/upload.cgi +2 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/upload_fck.pl +23 -4
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/util.pl +1 -1
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/config.py +43 -32
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/connector.py +16 -16
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckcommands.py +26 -9
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckconnector.py +2 -2
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckoutput.py +40 -9
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckutil.py +20 -21
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/htaccess.txt +2 -2
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/upload.py +13 -13
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/wsgi.py +3 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/zope.py +4 -5
- data/public/javascripts/fckeditor/editor/filemanager/connectors/test.html +34 -1
- data/public/javascripts/fckeditor/editor/filemanager/connectors/uploadtest.html +47 -4
- data/public/javascripts/fckeditor/editor/js/fckadobeair.js +176 -0
- data/public/javascripts/fckeditor/editor/js/fckeditorcode_gecko.js +77 -77
- data/public/javascripts/fckeditor/editor/js/fckeditorcode_ie.js +74 -74
- data/public/javascripts/fckeditor/editor/lang/_translationstatus.txt +55 -54
- data/public/javascripts/fckeditor/editor/lang/af.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ar.js +16 -17
- data/public/javascripts/fckeditor/editor/lang/bg.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/bn.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/bs.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ca.js +27 -28
- data/public/javascripts/fckeditor/editor/lang/cs.js +18 -19
- data/public/javascripts/fckeditor/editor/lang/da.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/de.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/el.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/en-au.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/en-ca.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/en-uk.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/en.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/eo.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/es.js +34 -35
- data/public/javascripts/fckeditor/editor/lang/et.js +32 -33
- data/public/javascripts/fckeditor/editor/lang/eu.js +32 -33
- data/public/javascripts/fckeditor/editor/lang/fa.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/fi.js +15 -16
- data/public/javascripts/fckeditor/editor/lang/fo.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/fr-ca.js +515 -0
- data/public/javascripts/fckeditor/editor/lang/fr.js +5 -6
- data/public/javascripts/fckeditor/editor/lang/gl.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/he.js +15 -16
- data/public/javascripts/fckeditor/editor/lang/hi.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/hr.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/hu.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/it.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ja.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/km.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ko.js +25 -26
- data/public/javascripts/fckeditor/editor/lang/lt.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/lv.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/mn.js +199 -200
- data/public/javascripts/fckeditor/editor/lang/ms.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/nb.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/nl.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/no.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/pl.js +51 -52
- data/public/javascripts/fckeditor/editor/lang/pt-br.js +16 -17
- data/public/javascripts/fckeditor/editor/lang/pt.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ro.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ru.js +31 -32
- data/public/javascripts/fckeditor/editor/lang/sk.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/sl.js +39 -40
- data/public/javascripts/fckeditor/editor/lang/sr-latn.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/sr.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/sv.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/th.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/tr.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/uk.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/vi.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/zh-cn.js +2 -3
- data/public/javascripts/fckeditor/editor/lang/zh.js +1 -2
- data/public/javascripts/fckeditor/editor/plugins/autogrow/fckplugin.js +9 -2
- data/public/javascripts/fckeditor/editor/plugins/bbcode/_sample/sample.config.js +1 -1
- data/public/javascripts/fckeditor/editor/plugins/bbcode/_sample/sample.html +1 -1
- data/public/javascripts/fckeditor/editor/plugins/bbcode/fckplugin.js +2 -2
- data/public/javascripts/fckeditor/editor/plugins/dragresizetable/fckplugin.js +35 -11
- data/public/javascripts/fckeditor/editor/plugins/placeholder/fck_placeholder.html +10 -5
- data/public/javascripts/fckeditor/editor/plugins/placeholder/fckplugin.js +3 -3
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/de.js +2 -2
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/en.js +2 -2
- data/public/javascripts/fckeditor/editor/{filemanager/connectors/cfm/upload.cfm → plugins/placeholder/lang/es.js} +9 -13
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/fr.js +1 -1
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/it.js +1 -1
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/pl.js +2 -2
- data/public/javascripts/fckeditor/editor/plugins/simplecommands/fckplugin.js +1 -1
- data/public/javascripts/fckeditor/editor/plugins/tablecommands/fckplugin.js +1 -1
- data/public/javascripts/fckeditor/editor/skins/_fckviewstrips.html +1 -1
- data/public/javascripts/fckeditor/editor/skins/default/fck_dialog.css +271 -8
- data/public/javascripts/fckeditor/editor/skins/default/fck_editor.css +2 -2
- data/public/javascripts/fckeditor/editor/skins/office2003/fck_dialog.css +270 -8
- data/public/javascripts/fckeditor/editor/skins/office2003/fck_editor.css +2 -2
- data/public/javascripts/fckeditor/editor/skins/silver/fck_dialog.css +270 -11
- data/public/javascripts/fckeditor/editor/skins/silver/fck_editor.css +2 -2
- data/public/javascripts/fckeditor/fckconfig.js +58 -55
- data/public/javascripts/fckeditor/fckeditor.js +99 -8
- data/public/javascripts/fckeditor/fckeditor.py +2 -4
- data/public/javascripts/fckeditor/fckpackager.xml +12 -12
- data/public/javascripts/fckeditor/fckstyles.xml +2 -5
- data/public/javascripts/fckeditor/fcktemplates.xml +1 -1
- data/public/javascripts/fckeditor/license.txt +1 -2
- data/public/javascripts/prototype.js +46 -101
- data/public/javascripts/scriptaculous.js +28 -17
- data/public/stylesheets/administration.css +5 -1
- data/themes/dirtylicious/about.markdown +3 -0
- data/themes/dirtylicious/images/body.jpg +0 -0
- data/themes/dirtylicious/images/container.jpg +0 -0
- data/themes/dirtylicious/images/gravatar.gif +0 -0
- data/themes/dirtylicious/images/header.jpg +0 -0
- data/themes/dirtylicious/images/li.gif +0 -0
- data/themes/dirtylicious/images/main.gif +0 -0
- data/themes/dirtylicious/images/nav.gif +0 -0
- data/themes/dirtylicious/images/quote.gif +0 -0
- data/themes/dirtylicious/images/spinner.gif +0 -0
- data/themes/dirtylicious/layouts/default.html.erb +60 -0
- data/themes/dirtylicious/preview.png +0 -0
- data/themes/dirtylicious/stylesheets/application.css +327 -0
- data/themes/dirtylicious/views/articles/_article.html.erb +33 -0
- data/themes/dirtylicious/views/articles/_comment.html.erb +14 -0
- data/themes/dirtylicious/views/articles/_comment_form.html.erb +37 -0
- data/themes/dirtylicious/views/articles/_comment_list.html.erb +7 -0
- data/themes/dirtylicious/views/articles/_trackback.html.erb +9 -0
- data/themes/dirtylicious/views/articles/comment_preview.html.erb +10 -0
- data/themes/dirtylicious/views/articles/index.html.erb +5 -0
- data/themes/dirtylicious/views/articles/read.html.erb +42 -0
- data/themes/dirtylicious/views/shared/_search.html.erb +16 -0
- data/themes/standard_issue/about.markdown +5 -0
- data/themes/standard_issue/images/img01.gif +0 -0
- data/themes/standard_issue/images/img02.gif +0 -0
- data/themes/standard_issue/images/img03.gif +0 -0
- data/themes/standard_issue/images/img04.jpg +0 -0
- data/themes/standard_issue/images/img05.gif +0 -0
- data/themes/standard_issue/images/img06.gif +0 -0
- data/themes/standard_issue/images/img07.gif +0 -0
- data/themes/standard_issue/images/img08.gif +0 -0
- data/themes/standard_issue/images/img09.gif +0 -0
- data/themes/standard_issue/images/img10.gif +0 -0
- data/themes/standard_issue/images/spacer.gif +0 -0
- data/themes/standard_issue/images/spinner.gif +0 -0
- data/themes/standard_issue/layouts/default.html.erb +59 -0
- data/themes/standard_issue/preview.png +0 -0
- data/themes/standard_issue/stylesheets/application.css +461 -0
- data/themes/standard_issue/views/articles/_article.html.erb +37 -0
- data/themes/standard_issue/views/articles/_comment.html.erb +12 -0
- data/themes/standard_issue/views/articles/_comment_form.html.erb +48 -0
- data/themes/standard_issue/views/articles/_comment_list.html.erb +7 -0
- data/themes/standard_issue/views/articles/_trackback.html.erb +9 -0
- data/themes/standard_issue/views/articles/comment_preview.html.erb +10 -0
- data/themes/standard_issue/views/articles/index.html.erb +5 -0
- data/themes/standard_issue/views/articles/read.html.erb +42 -0
- data/themes/standard_issue/views/shared/_search.html.erb +17 -0
- data/themes/standard_issue/views/theme/static_view_test.html.erb +1 -0
- data/themes/typographic/images/accept.gif +0 -0
- data/themes/typographic/images/accept50.gif +0 -0
- data/themes/typographic/images/bg_white.gif +0 -0
- data/themes/typographic/images/bg_wrapper.gif +0 -0
- data/themes/typographic/images/bullet_bottom.gif +0 -0
- data/themes/typographic/images/bullet_right.gif +0 -0
- data/themes/typographic/images/email_open.gif +0 -0
- data/themes/typographic/images/email_open50.gif +0 -0
- data/themes/typographic/images/meta.gif +0 -0
- data/themes/typographic/images/page_edit.gif +0 -0
- data/themes/typographic/images/page_edit50.gif +0 -0
- data/themes/typographic/images/spinner.gif +0 -0
- data/themes/typographic/images/tag.gif +0 -0
- data/themes/typographic/images/user.gif +0 -0
- data/themes/typographic/images/user50.gif +0 -0
- data/themes/typographic/images/world_link.gif +0 -0
- data/themes/typographic/images/world_link50.gif +0 -0
- data/themes/typographic/layouts/default.html.erb +5 -2
- data/themes/typographic/stylesheets/ie6.css +86 -0
- data/themes/typographic/views/articles/_article.html.erb +2 -2
- data/vendor/plugins/fckeditor/README +0 -7
- data/vendor/plugins/fckeditor/app/helpers/fckeditor_helper.rb +1 -3
- data/vendor/plugins/fckeditor/lib/fckeditor_version.rb +2 -2
- data/vendor/plugins/fckeditor/tasks/fckeditor_tasks.rake +1 -1
- data/vendor/plugins/fckeditor/test/fckeditor_test.rb +8 -0
- metadata +98 -66
- data/CHANGES-5.0.4 +0 -33
- data/SIDEBARS +0 -39
- data/app/views/admin/content/_quick_post.html.erb +0 -20
- data/db/schema.rb +0 -224
- data/public/.DS_Store +0 -0
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/basexml.asp +0 -62
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/class_upload.asp +0 -353
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/commands.asp +0 -198
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/config.asp +0 -128
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/connector.asp +0 -88
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/io.asp +0 -222
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/upload.asp +0 -61
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/util.asp +0 -55
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/ImageObject.cfc +0 -273
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf5_connector.cfm +0 -315
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf5_upload.cfm +0 -296
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_basexml.cfm +0 -68
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_commands.cfm +0 -225
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_connector.cfm +0 -89
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_io.cfm +0 -288
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_upload.cfm +0 -68
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_util.cfm +0 -132
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/config.cfm +0 -183
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/connector.cfm +0 -31
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/image.cfc +0 -1325
- data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/config.lasso +0 -65
- data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/connector.lasso +0 -257
- data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/upload.lasso +0 -157
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/basexml.php +0 -93
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/commands.php +0 -245
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/config.php +0 -140
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/connector.php +0 -87
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/io.php +0 -272
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/phpcompat.php +0 -17
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/upload.php +0 -59
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/util.php +0 -185
- data/public/javascripts/fckeditor/fckeditor.afp +0 -161
- data/public/javascripts/fckeditor/fckeditor.asp +0 -235
- data/public/javascripts/fckeditor/fckeditor.cfc +0 -273
- data/public/javascripts/fckeditor/fckeditor.cfm +0 -210
- data/public/javascripts/fckeditor/fckeditor.lasso +0 -112
- data/test/mocks/themes/typographic/.DS_Store +0 -0
- data/themes/typographic/.DS_Store +0 -0
- data/vendor/plugins/audioscrobbler_sidebar/MAINTAINERS +0 -26
- data/vendor/plugins/audioscrobbler_sidebar/MIT-LICENSE +0 -21
- data/vendor/plugins/audioscrobbler_sidebar/README +0 -27
- data/vendor/plugins/audioscrobbler_sidebar/Rakefile +0 -22
- data/vendor/plugins/audioscrobbler_sidebar/init.rb +0 -5
- data/vendor/plugins/audioscrobbler_sidebar/lib/audioscrobbler.rb +0 -54
- data/vendor/plugins/audioscrobbler_sidebar/lib/audioscrobbler_sidebar.rb +0 -13
- data/vendor/plugins/audioscrobbler_sidebar/test/audioscrobbler_sidebar_test.rb +0 -8
- data/vendor/plugins/audioscrobbler_sidebar/views/content.rhtml +0 -10
@@ -1,7 +1,7 @@
|
|
1
1
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
2
2
|
<!--
|
3
3
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
4
|
-
* Copyright (C) 2003-
|
4
|
+
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
5
5
|
*
|
6
6
|
* == BEGIN LICENSE ==
|
7
7
|
*
|
@@ -29,12 +29,13 @@
|
|
29
29
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
30
30
|
<script type="text/javascript">
|
31
31
|
|
32
|
-
var
|
32
|
+
var dialog = window.parent ;
|
33
|
+
var oEditor = dialog.InnerDialogLoaded() ;
|
33
34
|
|
34
35
|
// Gets the document DOM
|
35
36
|
var oDOM = oEditor.FCK.EditorDocument ;
|
36
37
|
|
37
|
-
var oActiveEl =
|
38
|
+
var oActiveEl = dialog.Selection.GetSelectedElement() ;
|
38
39
|
|
39
40
|
window.onload = function()
|
40
41
|
{
|
@@ -48,13 +49,13 @@ window.onload = function()
|
|
48
49
|
GetE('txtSize').value = GetAttribute( oActiveEl, 'size' ) ;
|
49
50
|
GetE('txtMax').value = GetAttribute( oActiveEl, 'maxLength' ) ;
|
50
51
|
GetE('txtType').value = oActiveEl.type ;
|
51
|
-
|
52
|
-
GetE('txtType').disabled = true ;
|
53
52
|
}
|
54
53
|
else
|
55
54
|
oActiveEl = null ;
|
56
55
|
|
57
|
-
|
56
|
+
dialog.SetOkButton( true ) ;
|
57
|
+
dialog.SetAutoSize( true ) ;
|
58
|
+
SelectField( 'txtName' ) ;
|
58
59
|
}
|
59
60
|
|
60
61
|
function Ok()
|
@@ -72,15 +73,10 @@ function Ok()
|
|
72
73
|
return false ;
|
73
74
|
}
|
74
75
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
oActiveEl.type = GetE('txtType').value ;
|
79
|
-
oEditor.FCKUndo.SaveUndoStep() ;
|
80
|
-
oActiveEl = oEditor.FCK.InsertElement( oActiveEl ) ;
|
81
|
-
}
|
76
|
+
oEditor.FCKUndo.SaveUndoStep() ;
|
77
|
+
|
78
|
+
oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: GetE('txtType').value } ) ;
|
82
79
|
|
83
|
-
oActiveEl.name = GetE('txtName').value ;
|
84
80
|
SetAttribute( oActiveEl, 'value' , GetE('txtValue').value ) ;
|
85
81
|
SetAttribute( oActiveEl, 'size' , GetE('txtSize').value ) ;
|
86
82
|
SetAttribute( oActiveEl, 'maxlength', GetE('txtMax').value ) ;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
3
|
-
* Copyright (C) 2003-
|
3
|
+
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
4
4
|
*
|
5
5
|
* == BEGIN LICENSE ==
|
6
6
|
*
|
@@ -23,7 +23,7 @@
|
|
23
23
|
*/
|
24
24
|
FCK.DTD = (function()
|
25
25
|
{
|
26
|
-
X = FCKTools.Merge ;
|
26
|
+
var X = FCKTools.Merge ;
|
27
27
|
|
28
28
|
var H,I,J,K,C,L,M,A,B,D,E,G,N,F ;
|
29
29
|
A = {ins:1, del:1, script:1} ;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
3
|
-
* Copyright (C) 2003-
|
3
|
+
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
4
4
|
*
|
5
5
|
* == BEGIN LICENSE ==
|
6
6
|
*
|
@@ -23,7 +23,7 @@
|
|
23
23
|
*/
|
24
24
|
FCK.DTD = (function()
|
25
25
|
{
|
26
|
-
X = FCKTools.Merge ;
|
26
|
+
var X = FCKTools.Merge ;
|
27
27
|
|
28
28
|
var A,L,J,M,N,O,D,H,P,K,Q,F,G,C,B,E,I ;
|
29
29
|
A = {isindex:1, fieldset:1} ;
|
@@ -137,4 +137,4 @@ FCK.DTD = (function()
|
|
137
137
|
changed the map to avoid breaking the links on pieces, having
|
138
138
|
"<b>this is a </b><a><b>link</b> test</a>", instead of
|
139
139
|
"<b>this is a <a>link</a></b><a> test</a>".
|
140
|
-
*/
|
140
|
+
*/
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
2
2
|
<!--
|
3
3
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
4
|
-
* Copyright (C) 2003-
|
4
|
+
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
5
5
|
*
|
6
6
|
* == BEGIN LICENSE ==
|
7
7
|
*
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<!DOCTYPE
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
2
|
<!--
|
3
3
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
4
|
-
* Copyright (C) 2003-
|
4
|
+
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
5
5
|
*
|
6
6
|
* == BEGIN LICENSE ==
|
7
7
|
*
|
@@ -23,314 +23,761 @@
|
|
23
23
|
-->
|
24
24
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
25
25
|
<head>
|
26
|
+
<title></title>
|
26
27
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
27
28
|
<meta name="robots" content="noindex, nofollow" />
|
28
29
|
<script type="text/javascript">
|
30
|
+
// Domain relaxation logic.
|
31
|
+
(function()
|
32
|
+
{
|
33
|
+
var d = document.domain ;
|
29
34
|
|
30
|
-
|
31
|
-
|
32
|
-
if
|
33
|
-
|
35
|
+
while ( true )
|
36
|
+
{
|
37
|
+
// Test if we can access a parent property.
|
38
|
+
try
|
39
|
+
{
|
40
|
+
var parentDomain = ( Args().TopWindow || E ).document.domain ;
|
34
41
|
|
35
|
-
|
36
|
-
document.
|
42
|
+
if ( document.domain != parentDomain )
|
43
|
+
document.domain = parentDomain ;
|
37
44
|
|
38
|
-
|
39
|
-
|
45
|
+
break ;
|
46
|
+
}
|
47
|
+
catch( e ) {}
|
40
48
|
|
41
|
-
|
42
|
-
|
49
|
+
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
|
50
|
+
d = d.replace( /.*?(?:\.|$)/, '' ) ;
|
43
51
|
|
44
|
-
|
45
|
-
|
46
|
-
if ( window.onresize )
|
47
|
-
window.onresize() ;
|
52
|
+
if ( d.length == 0 )
|
53
|
+
break ; // It was not able to detect the domain.
|
48
54
|
|
49
|
-
|
50
|
-
|
55
|
+
document.domain = d ;
|
56
|
+
}
|
57
|
+
})() ;
|
58
|
+
|
59
|
+
var E = frameElement._DialogArguments.Editor ;
|
51
60
|
|
52
|
-
|
61
|
+
// It seems referencing to frameElement._DialogArguments directly would lead to memory leaks in IE.
|
62
|
+
// So let's use functions to access its members instead.
|
63
|
+
function Args()
|
64
|
+
{
|
65
|
+
return frameElement._DialogArguments ;
|
53
66
|
}
|
54
67
|
|
55
|
-
function
|
68
|
+
function ParentDialog( dialog )
|
56
69
|
{
|
57
|
-
|
70
|
+
return dialog ? dialog._ParentDialog : frameElement._ParentDialog ;
|
71
|
+
}
|
58
72
|
|
59
|
-
|
60
|
-
|
73
|
+
var FCK = E.FCK ;
|
74
|
+
var FCKTools = E.FCKTools ;
|
75
|
+
var FCKDomTools = E.FCKDomTools ;
|
76
|
+
var FCKDialog = E.FCKDialog ;
|
77
|
+
var FCKBrowserInfo = E.FCKBrowserInfo ;
|
78
|
+
var FCKConfig = E.FCKConfig ;
|
61
79
|
|
62
|
-
|
63
|
-
|
80
|
+
// Steal the focus so that the caret would no longer stay in the editor iframe.
|
81
|
+
window.focus() ;
|
64
82
|
|
65
|
-
|
66
|
-
|
83
|
+
// Sets the Skin CSS
|
84
|
+
document.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ;
|
67
85
|
|
68
|
-
|
69
|
-
|
86
|
+
// Sets the language direction.
|
87
|
+
var langDir = document.documentElement.dir = E.FCKLang.Dir ;
|
70
88
|
|
71
|
-
|
72
|
-
|
73
|
-
document.
|
74
|
-
}
|
89
|
+
// For IE6-, the fck_dialog_ie6.js is loaded, used to fix limitations in the browser.
|
90
|
+
if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 )
|
91
|
+
document.write( '<' + 'script type="text/javascript" src="' + FCKConfig.SkinPath + 'fck_dialog_ie6.js"><' + '\/script>' ) ;
|
75
92
|
|
76
|
-
|
93
|
+
FCKTools.RegisterDollarFunction( window ) ;
|
77
94
|
|
78
|
-
|
95
|
+
// Resize related functions.
|
96
|
+
var Sizer = function()
|
79
97
|
{
|
80
|
-
bAutoSize =
|
81
|
-
RefreshSize() ;
|
82
|
-
}
|
98
|
+
var bAutoSize = false ;
|
83
99
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
100
|
+
var retval = {
|
101
|
+
// Sets whether the dialog should auto-resize according to its content's height.
|
102
|
+
SetAutoSize : function( autoSize )
|
103
|
+
{
|
104
|
+
bAutoSize = autoSize ;
|
105
|
+
this.RefreshSize() ;
|
106
|
+
},
|
89
107
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
108
|
+
// Fit the dialog container's layout to the inner iframe's external size.
|
109
|
+
RefreshContainerSize : function()
|
110
|
+
{
|
111
|
+
var frmMain = $( 'frmMain' ) ;
|
112
|
+
|
113
|
+
if ( frmMain )
|
114
|
+
{
|
115
|
+
// Get the container size.
|
116
|
+
var height = $( 'contents' ).offsetHeight ;
|
95
117
|
|
96
|
-
|
118
|
+
// Subtract the size of other elements.
|
119
|
+
height -= $( 'TitleArea' ).offsetHeight ;
|
120
|
+
height -= $( 'TabsRow' ).offsetHeight ;
|
121
|
+
height -= $( 'PopupButtons' ).offsetHeight ;
|
97
122
|
|
98
|
-
|
123
|
+
frmMain.style.height = Math.max( height, 0 ) + 'px' ;
|
124
|
+
}
|
125
|
+
},
|
99
126
|
|
100
|
-
|
127
|
+
// Resize and re-layout the dialog.
|
128
|
+
// Triggers the onresize event for the layout logic.
|
129
|
+
ResizeDialog : function( width, height )
|
101
130
|
{
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
131
|
+
FCKDomTools.SetElementStyles( window.frameElement,
|
132
|
+
{
|
133
|
+
'width' : width + 'px',
|
134
|
+
'height' : height + 'px'
|
135
|
+
} ) ;
|
136
|
+
|
137
|
+
// If the skin have defined a function for resize fixes, call it now.
|
138
|
+
if ( typeof window.DoResizeFixes == 'function' )
|
139
|
+
window.DoResizeFixes() ;
|
140
|
+
},
|
141
|
+
|
142
|
+
// if bAutoSize is true, automatically fit the dialog size and layout to
|
143
|
+
// accomodate the inner iframe's internal height.
|
144
|
+
// if bAutoSize is false, then only the layout logic for the dialog decorations
|
145
|
+
// is run to accomodate the inner iframe's external height.
|
146
|
+
RefreshSize : function()
|
147
|
+
{
|
148
|
+
if ( bAutoSize )
|
149
|
+
{
|
150
|
+
var frmMain = $( 'frmMain' ) ;
|
151
|
+
var innerDoc = frmMain.contentWindow.document ;
|
152
|
+
var isStrict = FCKTools.IsStrictMode( innerDoc ) ;
|
153
|
+
|
154
|
+
// Get the size of the frame contents.
|
155
|
+
var innerWidth = isStrict ? innerDoc.documentElement.scrollWidth : innerDoc.body.scrollWidth ;
|
156
|
+
var innerHeight = isStrict ? innerDoc.documentElement.scrollHeight : innerDoc.body.scrollHeight ;
|
157
|
+
|
158
|
+
// Get the current frame size.
|
159
|
+
var frameSize = FCKTools.GetViewPaneSize( frmMain.contentWindow ) ;
|
160
|
+
|
161
|
+
var deltaWidth = innerWidth - frameSize.Width ;
|
162
|
+
var deltaHeight = innerHeight - frameSize.Height ;
|
163
|
+
|
164
|
+
// If the contents fits the current size.
|
165
|
+
if ( deltaWidth <= 0 && deltaHeight <= 0 )
|
166
|
+
return ;
|
167
|
+
|
168
|
+
var dialogWidth = frameElement.offsetWidth + Math.max( deltaWidth, 0 ) ;
|
169
|
+
var dialogHeight = frameElement.offsetHeight + Math.max( deltaHeight, 0 ) ;
|
170
|
+
|
171
|
+
this.ResizeDialog( dialogWidth, dialogHeight ) ;
|
172
|
+
}
|
173
|
+
this.RefreshContainerSize() ;
|
106
174
|
}
|
107
175
|
}
|
108
|
-
}
|
109
176
|
|
110
|
-
|
111
|
-
|
112
|
-
if
|
113
|
-
|
114
|
-
|
177
|
+
/**
|
178
|
+
* Safari seems to have a bug with the time when RefreshSize() is executed - it
|
179
|
+
* thinks frmMain's innerHeight is 0 if we query the value too soon after the
|
180
|
+
* page is loaded in some circumstances. (#1316)
|
181
|
+
* TODO : Maybe this is not needed anymore after #35.
|
182
|
+
*/
|
183
|
+
if ( FCKBrowserInfo.IsSafari )
|
184
|
+
{
|
185
|
+
var originalRefreshSize = retval.RefreshSize ;
|
186
|
+
|
187
|
+
retval.RefreshSize = function()
|
188
|
+
{
|
189
|
+
FCKTools.SetTimeout( originalRefreshSize, 1, retval ) ;
|
190
|
+
}
|
191
|
+
}
|
115
192
|
|
116
|
-
|
193
|
+
window.onresize = function()
|
117
194
|
{
|
118
|
-
|
195
|
+
retval.RefreshContainerSize() ;
|
119
196
|
}
|
120
|
-
}
|
121
197
|
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
}
|
198
|
+
window.SetAutoSize = FCKTools.Bind( retval, retval.SetAutoSize ) ;
|
199
|
+
|
200
|
+
return retval ;
|
201
|
+
}() ;
|
127
202
|
|
128
|
-
|
203
|
+
// Manages the throbber image that appears if the inner part of dialog is taking too long to load.
|
204
|
+
var Throbber = function()
|
129
205
|
{
|
130
|
-
|
206
|
+
var timer ;
|
207
|
+
|
208
|
+
var updateThrobber = function()
|
131
209
|
{
|
132
|
-
|
133
|
-
|
134
|
-
|
210
|
+
var throbberParent = $( 'throbberBlock' ) ;
|
211
|
+
var throbberBlocks = throbberParent.childNodes ;
|
212
|
+
var lastClass = throbberParent.lastChild.className ;
|
213
|
+
|
214
|
+
// From the last to the second one, copy the class from the previous one.
|
215
|
+
for ( var i = throbberBlocks.length - 1 ; i > 0 ; i-- )
|
216
|
+
throbberBlocks[i].className = throbberBlocks[i-1].className ;
|
217
|
+
|
218
|
+
// For the first one, copy the last class (rotation).
|
219
|
+
throbberBlocks[0].className = lastClass ;
|
135
220
|
}
|
136
|
-
window.close() ;
|
137
|
-
}
|
138
221
|
|
139
|
-
|
140
|
-
|
222
|
+
return {
|
223
|
+
Show : function( waitMilliseconds )
|
224
|
+
{
|
225
|
+
// Auto-setup the Show function to be called again after the
|
226
|
+
// requested amount of time.
|
227
|
+
if ( waitMilliseconds && waitMilliseconds > 0 )
|
228
|
+
{
|
229
|
+
timer = FCKTools.SetTimeout( this.Show, waitMilliseconds, this, null, window ) ;
|
230
|
+
return ;
|
231
|
+
}
|
232
|
+
|
233
|
+
var throbberParent = $( 'throbberBlock' ) ;
|
141
234
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
235
|
+
// Create the throbber blocks.
|
236
|
+
var classIds = [ 1,2,3,4,5,4,3,2 ] ;
|
237
|
+
while ( classIds.length > 0 )
|
238
|
+
throbberParent.appendChild( document.createElement( 'div' ) ).className = ' throbber_' + classIds.shift() ;
|
146
239
|
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
240
|
+
// Center the throbber.
|
241
|
+
var frm = $( 'contents' ) ;
|
242
|
+
var frmCoords = FCKTools.GetDocumentPosition( window, frm ) ;
|
243
|
+
var x = frmCoords.x + ( frm.offsetWidth - throbberParent.offsetWidth ) / 2 ;
|
244
|
+
var y = frmCoords.y + ( frm.offsetHeight - throbberParent.offsetHeight ) / 2 ;
|
245
|
+
throbberParent.style.left = parseInt( x, 10 ) + 'px' ;
|
246
|
+
throbberParent.style.top = parseInt( y, 10 ) + 'px' ;
|
151
247
|
|
152
|
-
|
248
|
+
// Show it.
|
249
|
+
throbberParent.style.visibility = '' ;
|
153
250
|
|
154
|
-
|
155
|
-
|
251
|
+
// Setup the animation interval.
|
252
|
+
timer = setInterval( updateThrobber, 100 ) ;
|
253
|
+
},
|
156
254
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
255
|
+
Hide : function()
|
256
|
+
{
|
257
|
+
if ( timer )
|
258
|
+
{
|
259
|
+
clearInterval( timer ) ;
|
260
|
+
timer = null ;
|
261
|
+
}
|
162
262
|
|
163
|
-
|
164
|
-
|
263
|
+
var throbberParent = document.getElementById( 'throbberBlock' ) ;
|
264
|
+
if ( throbberParent )
|
265
|
+
FCKDomTools.RemoveNode( throbberParent ) ;
|
266
|
+
}
|
267
|
+
} ;
|
268
|
+
}() ;
|
165
269
|
|
166
|
-
|
270
|
+
// Drag and drop handlers.
|
271
|
+
var DragAndDrop = function()
|
272
|
+
{
|
273
|
+
var registeredWindows = [] ;
|
274
|
+
var lastCoords ;
|
275
|
+
var currentPos ;
|
167
276
|
|
168
|
-
|
277
|
+
var cleanUpHandlers = function()
|
278
|
+
{
|
279
|
+
for ( var i = 0 ; i < registeredWindows.length ; i++ )
|
280
|
+
{
|
281
|
+
FCKTools.RemoveEventListener( registeredWindows[i].document, 'mousemove', dragMouseMoveHandler ) ;
|
282
|
+
FCKTools.RemoveEventListener( registeredWindows[i].document, 'mouseup', dragMouseUpHandler ) ;
|
283
|
+
}
|
284
|
+
}
|
169
285
|
|
170
|
-
|
286
|
+
var dragMouseMoveHandler = function( evt )
|
171
287
|
{
|
172
|
-
|
173
|
-
|
288
|
+
if ( !lastCoords )
|
289
|
+
return ;
|
174
290
|
|
175
|
-
|
176
|
-
|
291
|
+
if ( !evt )
|
292
|
+
evt = FCKTools.GetElementDocument( this ).parentWindow.event ;
|
177
293
|
|
178
|
-
|
179
|
-
|
180
|
-
|
294
|
+
// Updated the last coordinates.
|
295
|
+
var currentCoords =
|
296
|
+
{
|
297
|
+
x : evt.screenX,
|
298
|
+
y : evt.screenY
|
299
|
+
} ;
|
181
300
|
|
182
|
-
|
183
|
-
|
301
|
+
currentPos =
|
302
|
+
{
|
303
|
+
x : currentPos.x + ( currentCoords.x - lastCoords.x ),
|
304
|
+
y : currentPos.y + ( currentCoords.y - lastCoords.y )
|
305
|
+
} ;
|
184
306
|
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
307
|
+
lastCoords = currentCoords ;
|
308
|
+
|
309
|
+
frameElement.style.left = currentPos.x + 'px' ;
|
310
|
+
frameElement.style.top = currentPos.y + 'px' ;
|
311
|
+
|
312
|
+
if ( evt.preventDefault )
|
313
|
+
evt.preventDefault() ;
|
191
314
|
else
|
192
|
-
|
315
|
+
evt.returnValue = false ;
|
193
316
|
}
|
194
317
|
|
195
|
-
|
196
|
-
|
197
|
-
|
318
|
+
var dragMouseUpHandler = function( evt )
|
319
|
+
{
|
320
|
+
if ( !lastCoords )
|
321
|
+
return ;
|
322
|
+
if ( !evt )
|
323
|
+
evt = FCKTools.GetElementDocument( this ).parentWindow.event ;
|
324
|
+
cleanUpHandlers() ;
|
325
|
+
lastCoords = null ;
|
326
|
+
}
|
198
327
|
|
199
|
-
|
200
|
-
{
|
201
|
-
var oTab = oTabs[ tabCode ] ;
|
202
|
-
oTab.style.display = isVisible ? '' : 'none' ;
|
328
|
+
return {
|
203
329
|
|
204
|
-
|
205
|
-
{
|
206
|
-
for ( var sCode in oTabs )
|
330
|
+
MouseDownHandler : function( evt )
|
207
331
|
{
|
208
|
-
|
332
|
+
var view = null ;
|
333
|
+
if ( !evt )
|
209
334
|
{
|
210
|
-
|
211
|
-
|
335
|
+
view = FCKTools.GetElementDocument( this ).parentWindow ;
|
336
|
+
evt = view.event ;
|
212
337
|
}
|
338
|
+
else
|
339
|
+
view = evt.view ;
|
340
|
+
|
341
|
+
var target = evt.srcElement || evt.target ;
|
342
|
+
if ( target.id == 'closeButton' || target.className == 'PopupTab' || target.className == 'PopupTabSelected' )
|
343
|
+
return ;
|
344
|
+
|
345
|
+
lastCoords =
|
346
|
+
{
|
347
|
+
x : evt.screenX,
|
348
|
+
y : evt.screenY
|
349
|
+
} ;
|
350
|
+
|
351
|
+
// Save the current IFRAME position.
|
352
|
+
currentPos =
|
353
|
+
{
|
354
|
+
x : parseInt( FCKDomTools.GetCurrentElementStyle( frameElement, 'left' ), 10 ),
|
355
|
+
y : parseInt( FCKDomTools.GetCurrentElementStyle( frameElement, 'top' ), 10 )
|
356
|
+
} ;
|
357
|
+
|
358
|
+
for ( var i = 0 ; i < registeredWindows.length ; i++ )
|
359
|
+
{
|
360
|
+
FCKTools.AddEventListener( registeredWindows[i].document, 'mousemove', dragMouseMoveHandler ) ;
|
361
|
+
FCKTools.AddEventListener( registeredWindows[i].document, 'mouseup', dragMouseUpHandler ) ;
|
362
|
+
}
|
363
|
+
|
364
|
+
if ( evt.preventDefault )
|
365
|
+
evt.preventDefault() ;
|
366
|
+
else
|
367
|
+
evt.returnValue = false ;
|
368
|
+
},
|
369
|
+
|
370
|
+
RegisterHandlers : function( w )
|
371
|
+
{
|
372
|
+
registeredWindows.push( w ) ;
|
213
373
|
}
|
214
374
|
}
|
375
|
+
}() ;
|
376
|
+
|
377
|
+
// Selection related functions.
|
378
|
+
//(Became simple shortcuts after the fix for #1990)
|
379
|
+
var Selection =
|
380
|
+
{
|
381
|
+
/**
|
382
|
+
* Ensures that the editing area contains an active selection. This is a
|
383
|
+
* requirement for IE, as it looses the selection when the focus moves to other
|
384
|
+
* frames.
|
385
|
+
*/
|
386
|
+
EnsureSelection : function()
|
387
|
+
{
|
388
|
+
FCK.Selection.Restore() ;
|
389
|
+
},
|
390
|
+
|
391
|
+
/**
|
392
|
+
* Get the FCKSelection object for the editor instance.
|
393
|
+
*/
|
394
|
+
GetSelection : function()
|
395
|
+
{
|
396
|
+
return FCK.Selection ;
|
397
|
+
},
|
398
|
+
|
399
|
+
/**
|
400
|
+
* Get the selected element in the editing area (for object selections).
|
401
|
+
*/
|
402
|
+
GetSelectedElement : function()
|
403
|
+
{
|
404
|
+
return FCK.Selection.GetSelectedElement() ;
|
405
|
+
}
|
215
406
|
}
|
216
407
|
|
217
|
-
|
408
|
+
// Tab related functions.
|
409
|
+
var Tabs = function()
|
218
410
|
{
|
219
|
-
|
411
|
+
// Only element ids should be stored here instead of element references since setSelectedTab and TabDiv_OnClick
|
412
|
+
// would build circular references with the element references inside and cause memory leaks in IE6.
|
413
|
+
var oTabs = new Object() ;
|
414
|
+
|
415
|
+
var setSelectedTab = function( tabCode )
|
220
416
|
{
|
221
|
-
|
222
|
-
switch ( e.keyCode )
|
417
|
+
for ( var sCode in oTabs )
|
223
418
|
{
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
Ok() ;
|
229
|
-
return false ;
|
230
|
-
case 27 : // ESC
|
231
|
-
Cancel() ;
|
232
|
-
return false ;
|
233
|
-
break ;
|
419
|
+
if ( sCode == tabCode )
|
420
|
+
$( oTabs[sCode] ).className = 'PopupTabSelected' ;
|
421
|
+
else
|
422
|
+
$( oTabs[sCode] ).className = 'PopupTab' ;
|
234
423
|
}
|
235
|
-
|
424
|
+
|
425
|
+
if ( typeof( window.frames["frmMain"].OnDialogTabChange ) == 'function' )
|
426
|
+
window.frames["frmMain"].OnDialogTabChange( tabCode ) ;
|
236
427
|
}
|
237
|
-
}
|
238
|
-
SetOnKeyDown( document ) ;
|
239
428
|
|
240
|
-
function
|
429
|
+
function TabDiv_OnClick()
|
430
|
+
{
|
431
|
+
setSelectedTab( this.TabCode ) ;
|
432
|
+
}
|
433
|
+
|
434
|
+
window.AddTab = function( tabCode, tabText, startHidden )
|
435
|
+
{
|
436
|
+
if ( typeof( oTabs[ tabCode ] ) != 'undefined' )
|
437
|
+
return ;
|
438
|
+
|
439
|
+
var eTabsRow = $( 'Tabs' ) ;
|
440
|
+
|
441
|
+
var oCell = eTabsRow.insertCell( eTabsRow.cells.length - 1 ) ;
|
442
|
+
oCell.noWrap = true ;
|
443
|
+
|
444
|
+
var oDiv = document.createElement( 'DIV' ) ;
|
445
|
+
oDiv.className = 'PopupTab' ;
|
446
|
+
oDiv.innerHTML = tabText ;
|
447
|
+
oDiv.TabCode = tabCode ;
|
448
|
+
oDiv.onclick = TabDiv_OnClick ;
|
449
|
+
oDiv.id = Math.random() ;
|
450
|
+
|
451
|
+
if ( startHidden )
|
452
|
+
oDiv.style.display = 'none' ;
|
453
|
+
|
454
|
+
eTabsRow = $( 'TabsRow' ) ;
|
455
|
+
|
456
|
+
oCell.appendChild( oDiv ) ;
|
457
|
+
|
458
|
+
if ( eTabsRow.style.display == 'none' )
|
459
|
+
{
|
460
|
+
var eTitleArea = $( 'TitleArea' ) ;
|
461
|
+
eTitleArea.className = 'PopupTitle' ;
|
462
|
+
|
463
|
+
oDiv.className = 'PopupTabSelected' ;
|
464
|
+
eTabsRow.style.display = '' ;
|
465
|
+
|
466
|
+
if ( window.onresize )
|
467
|
+
window.onresize() ;
|
468
|
+
}
|
469
|
+
|
470
|
+
oTabs[ tabCode ] = oDiv.id ;
|
471
|
+
|
472
|
+
FCKTools.DisableSelection( oDiv ) ;
|
473
|
+
} ;
|
474
|
+
|
475
|
+
window.SetSelectedTab = setSelectedTab ;
|
476
|
+
|
477
|
+
window.SetTabVisibility = function( tabCode, isVisible )
|
478
|
+
{
|
479
|
+
var oTab = $( oTabs[ tabCode ] ) ;
|
480
|
+
oTab.style.display = isVisible ? '' : 'none' ;
|
481
|
+
|
482
|
+
if ( ! isVisible && oTab.className == 'PopupTabSelected' )
|
483
|
+
{
|
484
|
+
for ( var sCode in oTabs )
|
485
|
+
{
|
486
|
+
if ( $( oTabs[sCode] ).style.display != 'none' )
|
487
|
+
{
|
488
|
+
setSelectedTab( sCode ) ;
|
489
|
+
break ;
|
490
|
+
}
|
491
|
+
}
|
492
|
+
}
|
493
|
+
} ;
|
494
|
+
}() ;
|
495
|
+
|
496
|
+
// readystatechange handler for registering drag and drop handlers in cover
|
497
|
+
// iframes, defined out here to avoid memory leak.
|
498
|
+
// Do NOT put this function as a private function as it will induce memory leak
|
499
|
+
// in IE and it's not detectable with Drip or sIEve and undetectable leaks are
|
500
|
+
// really nasty (sigh).
|
501
|
+
var onReadyRegister = function()
|
241
502
|
{
|
242
|
-
if (
|
503
|
+
if ( this.readyState != 'complete' )
|
504
|
+
return ;
|
505
|
+
DragAndDrop.RegisterHandlers( this.contentWindow ) ;
|
506
|
+
} ;
|
243
507
|
|
244
|
-
|
245
|
-
|
508
|
+
// The business logic of the dialog, dealing with operational things like
|
509
|
+
// dialog open/dialog close/enable/disable/etc.
|
510
|
+
(function()
|
511
|
+
{
|
512
|
+
var setOnKeyDown = function( targetDocument )
|
513
|
+
{
|
514
|
+
targetDocument.onkeydown = function ( e )
|
515
|
+
{
|
516
|
+
e = e || event || this.parentWindow.event ;
|
517
|
+
switch ( e.keyCode )
|
518
|
+
{
|
519
|
+
case 13 : // ENTER
|
520
|
+
var oTarget = e.srcElement || e.target ;
|
521
|
+
if ( oTarget.tagName == 'TEXTAREA' )
|
522
|
+
return true ;
|
523
|
+
Ok() ;
|
524
|
+
return false ;
|
525
|
+
|
526
|
+
case 27 : // ESC
|
527
|
+
Cancel() ;
|
528
|
+
return false ;
|
529
|
+
}
|
530
|
+
return true ;
|
531
|
+
}
|
532
|
+
} ;
|
533
|
+
|
534
|
+
var contextMenuBlocker = function( e )
|
246
535
|
{
|
247
536
|
var sTagName = e.target.tagName ;
|
248
537
|
if ( ! ( ( sTagName == "INPUT" && e.target.type == "text" ) || sTagName == "TEXTAREA" ) )
|
249
538
|
e.preventDefault() ;
|
250
|
-
}
|
251
|
-
targetDocument.addEventListener( 'contextmenu', oOnContextMenu, true ) ;
|
252
|
-
}
|
253
|
-
DisableContextMenu( document ) ;
|
539
|
+
} ;
|
254
540
|
|
255
|
-
|
256
|
-
{
|
257
|
-
window.onresize = function()
|
541
|
+
var disableContextMenu = function( targetDocument )
|
258
542
|
{
|
259
|
-
|
543
|
+
if ( FCKBrowserInfo.IsIE )
|
544
|
+
return ;
|
260
545
|
|
261
|
-
|
262
|
-
|
546
|
+
targetDocument.addEventListener( 'contextmenu', contextMenuBlocker, true ) ;
|
547
|
+
} ;
|
263
548
|
|
264
|
-
|
549
|
+
// Program entry point.
|
550
|
+
window.Init = function()
|
551
|
+
{
|
552
|
+
// Start the throbber timer.
|
553
|
+
Throbber.Show( 1000 ) ;
|
265
554
|
|
266
|
-
|
267
|
-
|
555
|
+
Sizer.RefreshContainerSize() ;
|
556
|
+
LoadInnerDialog() ;
|
268
557
|
|
269
|
-
|
270
|
-
}
|
271
|
-
}
|
558
|
+
FCKTools.DisableSelection( document.body ) ;
|
272
559
|
|
273
|
-
|
274
|
-
|
275
|
-
|
560
|
+
// Make the title area draggable.
|
561
|
+
var titleElement = $( 'header' ) ;
|
562
|
+
titleElement.onmousedown = DragAndDrop.MouseDownHandler ;
|
563
|
+
|
564
|
+
// Connect mousemove and mouseup events from dialog frame and outer window to dialog dragging logic.
|
565
|
+
DragAndDrop.RegisterHandlers( window ) ;
|
566
|
+
DragAndDrop.RegisterHandlers( Args().TopWindow ) ;
|
567
|
+
|
568
|
+
// Disable the previous dialog if it exists.
|
569
|
+
if ( ParentDialog() )
|
570
|
+
{
|
571
|
+
ParentDialog().contentWindow.SetEnabled( false ) ;
|
572
|
+
if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 )
|
573
|
+
{
|
574
|
+
var currentParent = ParentDialog() ;
|
575
|
+
while ( currentParent )
|
576
|
+
{
|
577
|
+
var blockerFrame = currentParent.contentWindow.$( 'blocker' ) ;
|
578
|
+
if ( blockerFrame.readyState == 'complete' )
|
579
|
+
DragAndDrop.RegisterHandlers( blockerFrame.contentWindow ) ;
|
580
|
+
else
|
581
|
+
blockerFrame.onreadystatechange = onReadyRegister ;
|
582
|
+
currentParent = ParentDialog( currentParent ) ;
|
583
|
+
}
|
584
|
+
}
|
585
|
+
else
|
586
|
+
{
|
587
|
+
var currentParent = ParentDialog() ;
|
588
|
+
while ( currentParent )
|
589
|
+
{
|
590
|
+
DragAndDrop.RegisterHandlers( currentParent.contentWindow ) ;
|
591
|
+
currentParent = ParentDialog( currentParent ) ;
|
592
|
+
}
|
593
|
+
}
|
594
|
+
}
|
595
|
+
|
596
|
+
// If this is the only dialog on screen, enable the background cover.
|
597
|
+
if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 )
|
598
|
+
{
|
599
|
+
var blockerFrame = FCKDialog.GetCover().firstChild ;
|
600
|
+
if ( blockerFrame.readyState == 'complete' )
|
601
|
+
DragAndDrop.RegisterHandlers( blockerFrame.contentWindow ) ;
|
602
|
+
else
|
603
|
+
blockerFrame.onreadystatechange = onReadyRegister;
|
604
|
+
}
|
605
|
+
|
606
|
+
// Add Enter/Esc hotkeys and disable context menu for the dialog.
|
607
|
+
setOnKeyDown( document ) ;
|
608
|
+
disableContextMenu( document ) ;
|
609
|
+
} ;
|
610
|
+
|
611
|
+
window.LoadInnerDialog = function()
|
276
612
|
{
|
277
|
-
|
278
|
-
|
613
|
+
if ( window.onresize )
|
614
|
+
window.onresize() ;
|
279
615
|
|
280
|
-
|
281
|
-
|
282
|
-
window.attachEvent( "onbeforeunload", Window_OnBeforeUnload ) ;
|
283
|
-
}
|
616
|
+
// First of all, translate the dialog box contents.
|
617
|
+
E.FCKLanguageManager.TranslatePage( document ) ;
|
284
618
|
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
619
|
+
// Create the IFRAME that holds the dialog contents.
|
620
|
+
$( 'innerContents' ).innerHTML = '<iframe id="frmMain" src="' + Args().Page + '" name="frmMain" frameborder="0" width="100%" height="100%" scrolling="auto" style="visibility: hidden;" allowtransparency="true"></iframe>' ;
|
621
|
+
} ;
|
622
|
+
|
623
|
+
window.InnerDialogLoaded = function()
|
624
|
+
{
|
625
|
+
// If the dialog has been closed before the iframe is loaded, do nothing.
|
626
|
+
if ( !frameElement.parentNode )
|
627
|
+
return null ;
|
289
628
|
|
290
|
-
|
291
|
-
|
629
|
+
Throbber.Hide() ;
|
630
|
+
|
631
|
+
var frmMain = $('frmMain') ;
|
632
|
+
var innerWindow = frmMain.contentWindow ;
|
633
|
+
var innerDoc = innerWindow.document ;
|
634
|
+
|
635
|
+
// Show the loaded iframe.
|
636
|
+
frmMain.style.visibility = '' ;
|
637
|
+
|
638
|
+
// Set the language direction.
|
639
|
+
innerDoc.documentElement.dir = langDir ;
|
640
|
+
|
641
|
+
// Sets the Skin CSS.
|
642
|
+
innerDoc.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ;
|
643
|
+
|
644
|
+
setOnKeyDown( innerDoc ) ;
|
645
|
+
disableContextMenu( innerDoc ) ;
|
646
|
+
|
647
|
+
Sizer.RefreshContainerSize();
|
648
|
+
|
649
|
+
DragAndDrop.RegisterHandlers( innerWindow ) ;
|
650
|
+
|
651
|
+
innerWindow.focus() ;
|
652
|
+
|
653
|
+
return E ;
|
654
|
+
} ;
|
655
|
+
|
656
|
+
window.SetOkButton = function( showIt )
|
657
|
+
{
|
658
|
+
$('btnOk').style.visibility = ( showIt ? '' : 'hidden' ) ;
|
659
|
+
} ;
|
660
|
+
|
661
|
+
window.Ok = function()
|
662
|
+
{
|
663
|
+
Selection.EnsureSelection() ;
|
292
664
|
|
665
|
+
var frmMain = window.frames["frmMain"] ;
|
666
|
+
|
667
|
+
if ( frmMain.Ok && frmMain.Ok() )
|
668
|
+
CloseDialog() ;
|
669
|
+
else
|
670
|
+
frmMain.focus() ;
|
671
|
+
} ;
|
672
|
+
|
673
|
+
window.Cancel = function( dontFireChange )
|
674
|
+
{
|
675
|
+
Selection.EnsureSelection() ;
|
676
|
+
return CloseDialog( dontFireChange ) ;
|
677
|
+
} ;
|
678
|
+
|
679
|
+
window.CloseDialog = function( dontFireChange )
|
680
|
+
{
|
681
|
+
Throbber.Hide() ;
|
682
|
+
|
683
|
+
// Points the src to a non-existent location to avoid loading errors later, in case the dialog
|
684
|
+
// haven't been completed loaded at this point.
|
685
|
+
if ( $( 'frmMain' ) )
|
686
|
+
$( 'frmMain' ).src = FCKTools.GetVoidUrl() ;
|
687
|
+
|
688
|
+
if ( !dontFireChange && !FCK.EditMode )
|
689
|
+
{
|
690
|
+
// All dialog windows, by default, will fire the "OnSelectionChange"
|
691
|
+
// event, no matter the Ok or Cancel button has been pressed.
|
692
|
+
// It seems that OnSelectionChange may enter on a concurrency state
|
693
|
+
// on some situations (#1965), so we should put the event firing in
|
694
|
+
// the execution queue instead of executing it immediately.
|
695
|
+
setTimeout( function()
|
696
|
+
{
|
697
|
+
FCK.Events.FireEvent( 'OnSelectionChange' ) ;
|
698
|
+
}, 0 ) ;
|
699
|
+
}
|
700
|
+
|
701
|
+
FCKDialog.OnDialogClose( window ) ;
|
702
|
+
} ;
|
703
|
+
|
704
|
+
window.SetEnabled = function( isEnabled )
|
705
|
+
{
|
706
|
+
var cover = $( 'cover' ) ;
|
707
|
+
cover.style.display = isEnabled ? 'none' : '' ;
|
708
|
+
|
709
|
+
if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 )
|
710
|
+
{
|
711
|
+
if ( !isEnabled )
|
712
|
+
{
|
713
|
+
// Inser the blocker IFRAME before the cover.
|
714
|
+
var blocker = document.createElement( 'iframe' ) ;
|
715
|
+
blocker.src = FCKTools.GetVoidUrl() ;
|
716
|
+
blocker.hideFocus = true ;
|
717
|
+
blocker.frameBorder = 0 ;
|
718
|
+
blocker.id = blocker.className = 'blocker' ;
|
719
|
+
cover.appendChild( blocker ) ;
|
720
|
+
}
|
721
|
+
else
|
722
|
+
{
|
723
|
+
var blocker = $( 'blocker' ) ;
|
724
|
+
if ( blocker && blocker.parentNode )
|
725
|
+
blocker.parentNode.removeChild( blocker ) ;
|
726
|
+
}
|
727
|
+
}
|
728
|
+
} ;
|
729
|
+
})() ;
|
293
730
|
</script>
|
294
731
|
</head>
|
295
|
-
<body onload="
|
296
|
-
<
|
297
|
-
<
|
298
|
-
<
|
732
|
+
<body onload="Init();" class="PopupBody">
|
733
|
+
<div class="contents" id="contents">
|
734
|
+
<div id="header">
|
735
|
+
<div id="TitleArea" class="PopupTitle PopupTitleBorder">
|
299
736
|
<script type="text/javascript">
|
300
|
-
document.write(
|
737
|
+
document.write( Args().Title ) ;
|
301
738
|
</script>
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
<td class="PopupTabArea">
|
739
|
+
<div id="closeButton" onclick="Cancel();"></div>
|
740
|
+
</div>
|
741
|
+
<div id="TabsRow" class="PopupTabArea" style="display: none">
|
306
742
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
307
|
-
<tr id="Tabs"
|
743
|
+
<tr id="Tabs">
|
308
744
|
<td class="PopupTabEmptyArea"> </td>
|
309
745
|
<td class="PopupTabEmptyArea" width="100%"> </td>
|
310
746
|
</tr>
|
311
747
|
</table>
|
312
|
-
</
|
313
|
-
</
|
314
|
-
<
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
748
|
+
</div>
|
749
|
+
</div>
|
750
|
+
<div id="innerContents"></div>
|
751
|
+
<div id="PopupButtons" class="PopupButtons">
|
752
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
753
|
+
<tr>
|
754
|
+
<td width="100%"> </td>
|
755
|
+
<td nowrap="nowrap">
|
756
|
+
<input id="btnOk" style="visibility: hidden;" type="button" value="Ok" class="Button" onclick="Ok();" fckLang="DlgBtnOK" />
|
757
|
+
|
758
|
+
<input id="btnCancel" type="button" value="Cancel" class="Button" onclick="Cancel();" fckLang="DlgBtnCancel" />
|
759
|
+
</td>
|
760
|
+
</tr>
|
761
|
+
</table>
|
762
|
+
</div>
|
763
|
+
</div>
|
764
|
+
<div class="tl"></div>
|
765
|
+
<div class="tc"></div>
|
766
|
+
<div class="tr"></div>
|
767
|
+
<div class="ml"></div>
|
768
|
+
<div class="mr"></div>
|
769
|
+
<div class="bl"></div>
|
770
|
+
<div class="bc"></div>
|
771
|
+
<div class="br"></div>
|
772
|
+
<div class="cover" id="cover" style="display:none"></div>
|
773
|
+
<div id="throbberBlock" style="position: absolute; visibility: hidden"></div>
|
774
|
+
<script type="text/javascript">
|
775
|
+
// Set the class name for language direction.
|
776
|
+
document.body.className += ' ' + langDir ;
|
777
|
+
|
778
|
+
var cover = $( 'cover' ) ;
|
779
|
+
cover.style.backgroundColor = FCKConfig.BackgroundBlockerColor ;
|
780
|
+
FCKDomTools.SetOpacity( cover, FCKConfig.BackgroundBlockerOpacity ) ;
|
781
|
+
</script>
|
335
782
|
</body>
|
336
783
|
</html>
|