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,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
|
*
|
@@ -61,4 +61,4 @@ function _FCKImagePreloader_OnImage( ev, imagePreloader )
|
|
61
61
|
{
|
62
62
|
if ( (--imagePreloader._PreloadCount) == 0 && imagePreloader.OnComplete )
|
63
63
|
imagePreloader.OnComplete() ;
|
64
|
-
}
|
64
|
+
}
|
@@ -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
|
*
|
@@ -56,9 +56,9 @@ FCKKeystrokeHandler.prototype.SetKeystrokes = function()
|
|
56
56
|
|
57
57
|
// If the configuration for the keystrokes is missing some element or has any extra comma
|
58
58
|
// this item won't be valid, so skip it and keep on processing.
|
59
|
-
if ( !keyDef )
|
59
|
+
if ( !keyDef )
|
60
60
|
continue ;
|
61
|
-
|
61
|
+
|
62
62
|
if ( typeof( keyDef[0] ) == 'object' ) // It is an array with arrays defining the keystrokes.
|
63
63
|
this.SetKeystrokes.apply( this, keyDef ) ;
|
64
64
|
else
|
@@ -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
|
*
|
@@ -32,9 +32,9 @@ FCKMenuBlock.prototype.Count = function()
|
|
32
32
|
return this._Items.length ;
|
33
33
|
}
|
34
34
|
|
35
|
-
FCKMenuBlock.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled )
|
35
|
+
FCKMenuBlock.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData )
|
36
36
|
{
|
37
|
-
var oItem = new FCKMenuItem( this, name, label, iconPathOrStripInfoArrayOrIndex, isDisabled ) ;
|
37
|
+
var oItem = new FCKMenuItem( this, name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) ;
|
38
38
|
|
39
39
|
oItem.OnClick = FCKTools.CreateEventListener( FCKMenuBlock_Item_OnClick, this ) ;
|
40
40
|
oItem.OnActivate = FCKTools.CreateEventListener( FCKMenuBlock_Item_OnActivate, this ) ;
|
@@ -94,6 +94,9 @@ FCKMenuBlock.prototype.Create = function( parentElement )
|
|
94
94
|
|
95
95
|
function FCKMenuBlock_Item_OnClick( clickedItem, menuBlock )
|
96
96
|
{
|
97
|
+
if ( menuBlock.Hide )
|
98
|
+
menuBlock.Hide() ;
|
99
|
+
|
97
100
|
FCKTools.RunFunction( menuBlock.OnClick, menuBlock, [ clickedItem ] ) ;
|
98
101
|
}
|
99
102
|
|
@@ -107,7 +110,7 @@ function FCKMenuBlock_Item_OnActivate( menuBlock )
|
|
107
110
|
if ( !FCKBrowserInfo.IsIE && oActiveItem.HasSubMenu && !this.HasSubMenu )
|
108
111
|
{
|
109
112
|
menuBlock._Window.focus() ;
|
110
|
-
|
113
|
+
|
111
114
|
// Due to the event model provided by Opera, we need to set
|
112
115
|
// HasFocus here as the above focus() call will not fire the focus
|
113
116
|
// event in the panel immediately (#1200).
|
@@ -147,4 +150,4 @@ FCKMenuSeparator.prototype.Create = function( parentTable )
|
|
147
150
|
eCell = r.insertCell(-1) ;
|
148
151
|
eCell.className = 'MN_Separator' ;
|
149
152
|
eCell.appendChild( oDoc.createElement( 'DIV' ) ).className = 'MN_Separator_Line' ;
|
150
|
-
}
|
153
|
+
}
|
@@ -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
|
*
|
@@ -35,7 +35,7 @@ FCKMenuBlockPanel.prototype = new FCKMenuBlock() ;
|
|
35
35
|
FCKMenuBlockPanel.prototype.Create = function()
|
36
36
|
{
|
37
37
|
var oPanel = this.Panel = ( this.Parent && this.Parent.Panel ? this.Parent.Panel.CreateChildPanel() : new FCKPanel() ) ;
|
38
|
-
oPanel.AppendStyleSheet( FCKConfig.
|
38
|
+
oPanel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ;
|
39
39
|
|
40
40
|
// Call the "base" implementation.
|
41
41
|
FCKMenuBlock.prototype.Create.call( this, oPanel.MainNode ) ;
|
@@ -51,4 +51,4 @@ FCKMenuBlockPanel.prototype.Hide = function()
|
|
51
51
|
{
|
52
52
|
if ( this.Panel.CheckIsOpened() )
|
53
53
|
this.Panel.Hide() ;
|
54
|
-
}
|
54
|
+
}
|
@@ -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
|
*
|
@@ -21,7 +21,7 @@
|
|
21
21
|
* Defines and renders a menu items in a menu block.
|
22
22
|
*/
|
23
23
|
|
24
|
-
var FCKMenuItem = function( parentMenuBlock, name, label, iconPathOrStripInfoArray, isDisabled )
|
24
|
+
var FCKMenuItem = function( parentMenuBlock, name, label, iconPathOrStripInfoArray, isDisabled, customData )
|
25
25
|
{
|
26
26
|
this.Name = name ;
|
27
27
|
this.Label = label || name ;
|
@@ -32,16 +32,17 @@ var FCKMenuItem = function( parentMenuBlock, name, label, iconPathOrStripInfoArr
|
|
32
32
|
this.SubMenu = new FCKMenuBlockPanel() ;
|
33
33
|
this.SubMenu.Parent = parentMenuBlock ;
|
34
34
|
this.SubMenu.OnClick = FCKTools.CreateEventListener( FCKMenuItem_SubMenu_OnClick, this ) ;
|
35
|
+
this.CustomData = customData ;
|
35
36
|
|
36
37
|
if ( FCK.IECleanup )
|
37
38
|
FCK.IECleanup.AddItem( this, FCKMenuItem_Cleanup ) ;
|
38
39
|
}
|
39
40
|
|
40
41
|
|
41
|
-
FCKMenuItem.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled )
|
42
|
+
FCKMenuItem.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData )
|
42
43
|
{
|
43
44
|
this.HasSubMenu = true ;
|
44
|
-
return this.SubMenu.AddItem( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled ) ;
|
45
|
+
return this.SubMenu.AddItem( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) ;
|
45
46
|
}
|
46
47
|
|
47
48
|
FCKMenuItem.prototype.AddSeparator = function()
|
@@ -157,4 +158,4 @@ function FCKMenuItem_OnMouseOut( ev, menuItem )
|
|
157
158
|
function FCKMenuItem_Cleanup()
|
158
159
|
{
|
159
160
|
this.MainElement = null ;
|
160
|
-
}
|
161
|
+
}
|
@@ -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
|
*
|
@@ -35,9 +35,32 @@ var FCKPanel = function( parentWindow )
|
|
35
35
|
if ( FCKBrowserInfo.IsIE )
|
36
36
|
{
|
37
37
|
// Create the Popup that will hold the panel.
|
38
|
+
// The popup has to be created before playing with domain hacks, see #1666.
|
38
39
|
this._Popup = this._Window.createPopup() ;
|
40
|
+
|
41
|
+
// this._Window cannot be accessed while playing with domain hacks, but local variable is ok.
|
42
|
+
// See #1666.
|
43
|
+
var pDoc = this._Window.document ;
|
44
|
+
|
45
|
+
// This is a trick to IE6 (not IE7). The original domain must be set
|
46
|
+
// before creating the popup, so we are able to take a refence to the
|
47
|
+
// document inside of it, and the set the proper domain for it. (#123)
|
48
|
+
if ( FCK_IS_CUSTOM_DOMAIN && !FCKBrowserInfo.IsIE7 )
|
49
|
+
{
|
50
|
+
pDoc.domain = FCK_ORIGINAL_DOMAIN ;
|
51
|
+
document.domain = FCK_ORIGINAL_DOMAIN ;
|
52
|
+
}
|
53
|
+
|
39
54
|
oDocument = this.Document = this._Popup.document ;
|
40
55
|
|
56
|
+
// Set the proper domain inside the popup.
|
57
|
+
if ( FCK_IS_CUSTOM_DOMAIN )
|
58
|
+
{
|
59
|
+
oDocument.domain = FCK_RUNTIME_DOMAIN ;
|
60
|
+
pDoc.domain = FCK_RUNTIME_DOMAIN ;
|
61
|
+
document.domain = FCK_RUNTIME_DOMAIN ;
|
62
|
+
}
|
63
|
+
|
41
64
|
FCK.IECleanup.AddItem( this, FCKPanel_Cleanup ) ;
|
42
65
|
}
|
43
66
|
else
|
@@ -54,24 +77,7 @@ var FCKPanel = function( parentWindow )
|
|
54
77
|
zIndex : FCKConfig.FloatingPanelsZIndex
|
55
78
|
} ) ;
|
56
79
|
|
57
|
-
|
58
|
-
{
|
59
|
-
var scrollPos = null ;
|
60
|
-
if ( FCKBrowserInfo.IsGecko && FCK && FCK.EditorDocument )
|
61
|
-
scrollPos = [ FCK.EditorDocument.body.scrollLeft, FCK.EditorDocument.body.scrollTop ] ;
|
62
|
-
window.frameElement.parentNode.insertBefore( oIFrame, window.frameElement ) ;
|
63
|
-
if ( scrollPos )
|
64
|
-
{
|
65
|
-
var restoreFunc = function()
|
66
|
-
{
|
67
|
-
FCK.EditorDocument.body.scrollLeft = scrollPos[0] ;
|
68
|
-
FCK.EditorDocument.body.scrollTop = scrollPos[1] ;
|
69
|
-
}
|
70
|
-
setTimeout( restoreFunc, 500 ) ;
|
71
|
-
}
|
72
|
-
}
|
73
|
-
else
|
74
|
-
this._Window.document.body.appendChild( oIFrame ) ;
|
80
|
+
this._Window.document.body.appendChild( oIFrame ) ;
|
75
81
|
|
76
82
|
var oIFrameWindow = oIFrame.contentWindow ;
|
77
83
|
|
@@ -87,6 +93,9 @@ var FCKPanel = function( parentWindow )
|
|
87
93
|
oDocument.write( '<html><head>' + sBase + '<\/head><body style="margin:0px;padding:0px;"><\/body><\/html>' ) ;
|
88
94
|
oDocument.close() ;
|
89
95
|
|
96
|
+
if( FCKBrowserInfo.IsAIR )
|
97
|
+
FCKAdobeAIR.Panel_Contructor( oDocument, window.document.location ) ;
|
98
|
+
|
90
99
|
FCKTools.AddEventListenerEx( oIFrameWindow, 'focus', FCKPanel_Window_OnFocus, this ) ;
|
91
100
|
FCKTools.AddEventListenerEx( oIFrameWindow, 'blur', FCKPanel_Window_OnBlur, this ) ;
|
92
101
|
}
|
@@ -166,8 +175,29 @@ FCKPanel.prototype.Show = function( x, y, relElement, width, height )
|
|
166
175
|
FCK.ToolbarSet.CurrentInstance.FocusManager.Lock() ;
|
167
176
|
|
168
177
|
if ( this.ParentPanel )
|
178
|
+
{
|
169
179
|
this.ParentPanel.Lock() ;
|
170
180
|
|
181
|
+
// Due to a bug on FF3, we must ensure that the parent panel will
|
182
|
+
// blur (#1584).
|
183
|
+
FCKPanel_Window_OnBlur( null, this.ParentPanel ) ;
|
184
|
+
}
|
185
|
+
|
186
|
+
// Toggle the iframe scrolling attribute to prevent the panel
|
187
|
+
// scrollbars from disappearing in FF Mac. (#191)
|
188
|
+
if ( FCKBrowserInfo.IsGecko && FCKBrowserInfo.IsMac )
|
189
|
+
{
|
190
|
+
this._IFrame.scrolling = '' ;
|
191
|
+
FCKTools.RunFunction( function(){ this._IFrame.scrolling = 'no'; }, this ) ;
|
192
|
+
}
|
193
|
+
|
194
|
+
// Be sure we'll not have more than one Panel opened at the same time.
|
195
|
+
// Do not unlock focus manager here because we're displaying another floating panel
|
196
|
+
// instead of returning the editor to a "no panel" state (Bug #1514).
|
197
|
+
if ( FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel &&
|
198
|
+
FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel != this )
|
199
|
+
FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel.Hide( false, true ) ;
|
200
|
+
|
171
201
|
FCKDomTools.SetElementStyles( eMainNode,
|
172
202
|
{
|
173
203
|
width : width ? width + 'px' : '',
|
@@ -188,17 +218,26 @@ FCKPanel.prototype.Show = function( x, y, relElement, width, height )
|
|
188
218
|
// for Opera compatibility (see #570).
|
189
219
|
iMainWidth = eMainNode.offsetWidth || eMainNode.firstChild.offsetWidth ;
|
190
220
|
|
191
|
-
|
221
|
+
// Base the popup coordinates upon the coordinates of relElement.
|
222
|
+
var oPos = FCKTools.GetDocumentPosition( this._Window,
|
192
223
|
relElement.nodeType == 9 ?
|
193
224
|
( FCKTools.IsStrictMode( relElement ) ? relElement.documentElement : relElement.body ) :
|
194
|
-
relElement
|
195
|
-
|
225
|
+
relElement ) ;
|
226
|
+
|
227
|
+
// Minus the offsets provided by any positioned parent element of the panel iframe.
|
228
|
+
var positionedAncestor = FCKDomTools.GetPositionedAncestor( this._IFrame.parentNode ) ;
|
229
|
+
if ( positionedAncestor )
|
230
|
+
{
|
231
|
+
var nPos = FCKTools.GetDocumentPosition( FCKTools.GetElementWindow( positionedAncestor ), positionedAncestor ) ;
|
232
|
+
oPos.x -= nPos.x ;
|
233
|
+
oPos.y -= nPos.y ;
|
234
|
+
}
|
196
235
|
|
197
236
|
if ( this.IsRTL && !this.IsContextMenu )
|
198
237
|
x = ( x * -1 ) ;
|
199
238
|
|
200
|
-
x += oPos.
|
201
|
-
y += oPos.
|
239
|
+
x += oPos.x ;
|
240
|
+
y += oPos.y ;
|
202
241
|
|
203
242
|
if ( this.IsRTL )
|
204
243
|
{
|
@@ -222,9 +261,6 @@ FCKPanel.prototype.Show = function( x, y, relElement, width, height )
|
|
222
261
|
y -= y + eMainNode.offsetHeight - iViewPaneHeight ;
|
223
262
|
}
|
224
263
|
|
225
|
-
if ( x < 0 )
|
226
|
-
x = 0 ;
|
227
|
-
|
228
264
|
// Set the context menu DIV in the specified location.
|
229
265
|
FCKDomTools.SetElementStyles( this._IFrame,
|
230
266
|
{
|
@@ -232,32 +268,37 @@ FCKPanel.prototype.Show = function( x, y, relElement, width, height )
|
|
232
268
|
top : y + 'px'
|
233
269
|
} ) ;
|
234
270
|
|
235
|
-
var iWidth = iMainWidth ;
|
236
|
-
var iHeight = eMainNode.offsetHeight ;
|
237
|
-
|
238
|
-
this._IFrame.width = iWidth ;
|
239
|
-
this._IFrame.height = iHeight ;
|
240
|
-
|
241
271
|
// Move the focus to the IFRAME so we catch the "onblur".
|
242
272
|
this._IFrame.contentWindow.focus() ;
|
243
|
-
|
273
|
+
this._IsOpened = true ;
|
274
|
+
|
275
|
+
var me = this ;
|
276
|
+
this._resizeTimer = setTimeout( function()
|
277
|
+
{
|
278
|
+
var iWidth = eMainNode.offsetWidth || eMainNode.firstChild.offsetWidth ;
|
279
|
+
var iHeight = eMainNode.offsetHeight ;
|
280
|
+
me._IFrame.width = iWidth ;
|
281
|
+
me._IFrame.height = iHeight ;
|
282
|
+
|
283
|
+
}, 0 ) ;
|
244
284
|
|
245
|
-
|
285
|
+
FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel = this ;
|
286
|
+
}
|
246
287
|
|
247
288
|
FCKTools.RunFunction( this.OnShow, this ) ;
|
248
289
|
}
|
249
290
|
|
250
|
-
FCKPanel.prototype.Hide = function( ignoreOnHide )
|
291
|
+
FCKPanel.prototype.Hide = function( ignoreOnHide, ignoreFocusManagerUnlock )
|
251
292
|
{
|
252
293
|
if ( this._Popup )
|
253
294
|
this._Popup.hide() ;
|
254
295
|
else
|
255
296
|
{
|
256
|
-
if ( !this._IsOpened )
|
297
|
+
if ( !this._IsOpened || this._LockCounter > 0 )
|
257
298
|
return ;
|
258
299
|
|
259
300
|
// Enable the editor to fire the "OnBlur".
|
260
|
-
if ( typeof( FCKFocusManager ) != 'undefined' )
|
301
|
+
if ( typeof( FCKFocusManager ) != 'undefined' && !ignoreFocusManagerUnlock )
|
261
302
|
FCKFocusManager.Unlock() ;
|
262
303
|
|
263
304
|
// It is better to set the sizes to 0, otherwise Firefox would have
|
@@ -266,6 +307,12 @@ FCKPanel.prototype.Hide = function( ignoreOnHide )
|
|
266
307
|
|
267
308
|
this._IsOpened = false ;
|
268
309
|
|
310
|
+
if ( this._resizeTimer )
|
311
|
+
{
|
312
|
+
clearTimeout( this._resizeTimer ) ;
|
313
|
+
this._resizeTimer = null ;
|
314
|
+
}
|
315
|
+
|
269
316
|
if ( this.ParentPanel )
|
270
317
|
this.ParentPanel.Unlock() ;
|
271
318
|
|
@@ -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
|
*
|
@@ -53,4 +53,4 @@ FCKPlugin.prototype.Load = function()
|
|
53
53
|
|
54
54
|
// Add the main plugin script.
|
55
55
|
LoadScript( this.Path + 'fckplugin.js' ) ;
|
56
|
-
}
|
56
|
+
}
|
@@ -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
|
*
|
@@ -37,7 +37,7 @@ var FCKSpecialCombo = function( caption, fieldWidth, panelWidth, panelMaxHeight,
|
|
37
37
|
this.Items = new Object() ;
|
38
38
|
|
39
39
|
this._Panel = new FCKPanel( parentWindow || window ) ;
|
40
|
-
this._Panel.AppendStyleSheet( FCKConfig.
|
40
|
+
this._Panel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ;
|
41
41
|
this._PanelBox = this._Panel.MainNode.appendChild( this._Panel.Document.createElement( 'DIV' ) ) ;
|
42
42
|
this._PanelBox.className = 'SC_Panel' ;
|
43
43
|
this._PanelBox.style.width = this.PanelWidth + 'px' ;
|
@@ -81,11 +81,8 @@ function FCKSpecialCombo_ItemOnClick( ev, specialCombo, itemId )
|
|
81
81
|
FCKSpecialCombo.prototype.ClearItems = function ()
|
82
82
|
{
|
83
83
|
if ( this.Items )
|
84
|
-
|
85
|
-
|
86
|
-
this.Items[key] = null ;
|
87
|
-
}
|
88
|
-
|
84
|
+
this.Items = {} ;
|
85
|
+
|
89
86
|
var itemsholder = this._ItemsHolderEl ;
|
90
87
|
while ( itemsholder.firstChild )
|
91
88
|
itemsholder.removeChild( itemsholder.firstChild ) ;
|
@@ -192,7 +189,9 @@ FCKSpecialCombo.prototype.SetEnabled = function( isEnabled )
|
|
192
189
|
{
|
193
190
|
this.Enabled = isEnabled ;
|
194
191
|
|
195
|
-
|
192
|
+
// In IE it can happen when the page is reloaded that _OuterTable is null, so check its existence
|
193
|
+
if ( this._OuterTable )
|
194
|
+
this._OuterTable.className = isEnabled ? '' : 'SC_FieldDisabled' ;
|
196
195
|
}
|
197
196
|
|
198
197
|
FCKSpecialCombo.prototype.Create = function( targetElement )
|
@@ -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
|
*
|
@@ -94,7 +94,7 @@ FCKStyle.prototype =
|
|
94
94
|
/**
|
95
95
|
* Apply the style to a FCKDomRange.
|
96
96
|
*/
|
97
|
-
ApplyToRange : function( range, selectIt )
|
97
|
+
ApplyToRange : function( range, selectIt, updateRange )
|
98
98
|
{
|
99
99
|
// ApplyToRange is not valid for FCK_STYLE_OBJECT types.
|
100
100
|
// Use ApplyToObject instead.
|
@@ -111,7 +111,7 @@ FCKStyle.prototype =
|
|
111
111
|
return ;
|
112
112
|
}
|
113
113
|
|
114
|
-
this.ApplyToRange( range, selectIt ) ;
|
114
|
+
this.ApplyToRange( range, selectIt, updateRange ) ;
|
115
115
|
},
|
116
116
|
|
117
117
|
/**
|
@@ -141,7 +141,7 @@ FCKStyle.prototype =
|
|
141
141
|
* Remove the style from a FCKDomRange. Block type styles will have no
|
142
142
|
* effect.
|
143
143
|
*/
|
144
|
-
RemoveFromRange : function( range, selectIt )
|
144
|
+
RemoveFromRange : function( range, selectIt, updateRange )
|
145
145
|
{
|
146
146
|
var bookmark ;
|
147
147
|
|
@@ -231,8 +231,9 @@ FCKStyle.prototype =
|
|
231
231
|
// Remove overrides defined to the same element name.
|
232
232
|
this._RemoveOverrides( pathElement, styleOverrides[ pathElementName ] ) ;
|
233
233
|
|
234
|
-
// Remove the element if no more attributes are available
|
235
|
-
this.
|
234
|
+
// Remove the element if no more attributes are available and it's an inline style element
|
235
|
+
if ( this.GetType() == FCK_STYLE_INLINE)
|
236
|
+
this._RemoveNoAttribElement( pathElement ) ;
|
236
237
|
}
|
237
238
|
}
|
238
239
|
else if ( isBoundary )
|
@@ -275,6 +276,9 @@ FCKStyle.prototype =
|
|
275
276
|
if ( selectIt )
|
276
277
|
range.SelectBookmark( bookmark ) ;
|
277
278
|
|
279
|
+
if ( updateRange )
|
280
|
+
range.MoveToBookmark( bookmark ) ;
|
281
|
+
|
278
282
|
return ;
|
279
283
|
}
|
280
284
|
|
@@ -282,7 +286,7 @@ FCKStyle.prototype =
|
|
282
286
|
range.Expand( 'inline_elements' ) ;
|
283
287
|
|
284
288
|
// Bookmark the range so we can re-select it after processing.
|
285
|
-
|
289
|
+
bookmark = range.CreateBookmark( true ) ;
|
286
290
|
|
287
291
|
// The style will be applied within the bookmark boundaries.
|
288
292
|
var startNode = range.GetBookmarkNode( bookmark, true ) ;
|
@@ -400,6 +404,9 @@ FCKStyle.prototype =
|
|
400
404
|
// Re-select the original range.
|
401
405
|
if ( selectIt )
|
402
406
|
range.SelectBookmark( bookmark ) ;
|
407
|
+
|
408
|
+
if ( updateRange )
|
409
|
+
range.MoveToBookmark( bookmark ) ;
|
403
410
|
},
|
404
411
|
|
405
412
|
/**
|
@@ -486,7 +493,7 @@ FCKStyle.prototype =
|
|
486
493
|
switch ( this.GetType() )
|
487
494
|
{
|
488
495
|
case FCK_STYLE_BLOCK :
|
489
|
-
return this.CheckElementRemovable( elementPath.Block || elementPath.BlockLimit ) ;
|
496
|
+
return this.CheckElementRemovable( elementPath.Block || elementPath.BlockLimit, true ) ;
|
490
497
|
|
491
498
|
case FCK_STYLE_INLINE :
|
492
499
|
|
@@ -688,7 +695,8 @@ FCKStyle.prototype =
|
|
688
695
|
valueB = valueB.replace( /;$/, '' ).toLowerCase() ;
|
689
696
|
}
|
690
697
|
|
691
|
-
|
698
|
+
// Return true if they match or if valueA is null and valueB is an empty string
|
699
|
+
return ( valueA == valueB || ( ( valueA === null || valueA === '' ) && ( valueB === null || valueB === '' ) ) )
|
692
700
|
},
|
693
701
|
|
694
702
|
GetFinalAttributeValue : function( attName )
|
@@ -740,6 +748,94 @@ FCKStyle.prototype =
|
|
740
748
|
this._Variables[ name ] = value ;
|
741
749
|
},
|
742
750
|
|
751
|
+
/**
|
752
|
+
* Converting from a PRE block to a non-PRE block in formatting operations.
|
753
|
+
*/
|
754
|
+
_FromPre : function( doc, block, newBlock )
|
755
|
+
{
|
756
|
+
var innerHTML = block.innerHTML ;
|
757
|
+
|
758
|
+
// Trim the first and last linebreaks immediately after and before <pre>, </pre>,
|
759
|
+
// if they exist.
|
760
|
+
// This is done because the linebreaks are not rendered.
|
761
|
+
innerHTML = innerHTML.replace( /(\r\n|\r)/g, '\n' ) ;
|
762
|
+
innerHTML = innerHTML.replace( /^[ \t]*\n/, '' ) ;
|
763
|
+
innerHTML = innerHTML.replace( /\n$/, '' ) ;
|
764
|
+
|
765
|
+
// 1. Convert spaces or tabs at the beginning or at the end to
|
766
|
+
innerHTML = innerHTML.replace( /^[ \t]+|[ \t]+$/g, function( match, offset, s )
|
767
|
+
{
|
768
|
+
if ( match.length == 1 ) // one space, preserve it
|
769
|
+
return ' ' ;
|
770
|
+
else if ( offset == 0 ) // beginning of block
|
771
|
+
return new Array( match.length ).join( ' ' ) + ' ' ;
|
772
|
+
else // end of block
|
773
|
+
return ' ' + new Array( match.length ).join( ' ' ) ;
|
774
|
+
} ) ;
|
775
|
+
|
776
|
+
// 2. Convert \n to <BR>.
|
777
|
+
// 3. Convert contiguous (i.e. non-singular) spaces or tabs to
|
778
|
+
var htmlIterator = new FCKHtmlIterator( innerHTML ) ;
|
779
|
+
var results = [] ;
|
780
|
+
htmlIterator.Each( function( isTag, value )
|
781
|
+
{
|
782
|
+
if ( !isTag )
|
783
|
+
{
|
784
|
+
value = value.replace( /\n/g, '<BR>' ) ;
|
785
|
+
value = value.replace( /[ \t]{2,}/g,
|
786
|
+
function ( match )
|
787
|
+
{
|
788
|
+
return new Array( match.length ).join( ' ' ) + ' ' ;
|
789
|
+
} ) ;
|
790
|
+
}
|
791
|
+
results.push( value ) ;
|
792
|
+
} ) ;
|
793
|
+
newBlock.innerHTML = results.join( '' ) ;
|
794
|
+
return newBlock ;
|
795
|
+
},
|
796
|
+
|
797
|
+
/**
|
798
|
+
* Converting from a non-PRE block to a PRE block in formatting operations.
|
799
|
+
*/
|
800
|
+
_ToPre : function( doc, block, newBlock )
|
801
|
+
{
|
802
|
+
// Handle converting from a regular block to a <pre> block.
|
803
|
+
var innerHTML = block.innerHTML.Trim() ;
|
804
|
+
|
805
|
+
// 1. Delete ANSI whitespaces immediately before and after <BR> because they are not visible.
|
806
|
+
// 2. Mark down any <BR /> nodes here so they can be turned into \n in the next step and avoid being compressed.
|
807
|
+
innerHTML = innerHTML.replace( /[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi, '<BR />' ) ;
|
808
|
+
|
809
|
+
// 3. Compress other ANSI whitespaces since they're only visible as one single space previously.
|
810
|
+
// 4. Convert to spaces since is no longer needed in <PRE>.
|
811
|
+
// 5. Convert any <BR /> to \n. This must not be done earlier because the \n would then get compressed.
|
812
|
+
var htmlIterator = new FCKHtmlIterator( innerHTML ) ;
|
813
|
+
var results = [] ;
|
814
|
+
htmlIterator.Each( function( isTag, value )
|
815
|
+
{
|
816
|
+
if ( !isTag )
|
817
|
+
value = value.replace( /([ \t\n\r]+| )/g, ' ' ) ;
|
818
|
+
else if ( isTag && value == '<BR />' )
|
819
|
+
value = '\n' ;
|
820
|
+
results.push( value ) ;
|
821
|
+
} ) ;
|
822
|
+
|
823
|
+
// Assigning innerHTML to <PRE> in IE causes all linebreaks to be reduced to spaces.
|
824
|
+
// Assigning outerHTML to <PRE> in IE doesn't work if the <PRE> isn't contained in another node
|
825
|
+
// since the node reference is changed after outerHTML assignment.
|
826
|
+
// So, we need some hacks to workaround IE bugs here.
|
827
|
+
if ( FCKBrowserInfo.IsIE )
|
828
|
+
{
|
829
|
+
var temp = doc.createElement( 'div' ) ;
|
830
|
+
temp.appendChild( newBlock ) ;
|
831
|
+
newBlock.outerHTML = '<PRE>\n' + results.join( '' ) + '</PRE>' ;
|
832
|
+
newBlock = temp.removeChild( temp.firstChild ) ;
|
833
|
+
}
|
834
|
+
else
|
835
|
+
newBlock.innerHTML = results.join( '' ) ;
|
836
|
+
return newBlock ;
|
837
|
+
},
|
838
|
+
|
743
839
|
/**
|
744
840
|
* Apply an inline style to a FCKDomRange.
|
745
841
|
*
|
@@ -747,33 +843,97 @@ FCKStyle.prototype =
|
|
747
843
|
* - Implement the "#" style handling.
|
748
844
|
* - Properly handle block containers like <div> and <blockquote>.
|
749
845
|
*/
|
750
|
-
_ApplyBlockStyle : function( range, selectIt )
|
846
|
+
_ApplyBlockStyle : function( range, selectIt, updateRange )
|
751
847
|
{
|
752
848
|
// Bookmark the range so we can re-select it after processing.
|
753
849
|
var bookmark ;
|
754
850
|
|
755
851
|
if ( selectIt )
|
756
|
-
bookmark = range.CreateBookmark(
|
852
|
+
bookmark = range.CreateBookmark() ;
|
757
853
|
|
758
854
|
var iterator = new FCKDomRangeIterator( range ) ;
|
759
855
|
iterator.EnforceRealBlocks = true ;
|
760
856
|
|
761
857
|
var block ;
|
858
|
+
var doc = range.Window.document ;
|
859
|
+
|
860
|
+
var preBlocks = [] ;
|
861
|
+
var convertedPreBlocks = [] ;
|
862
|
+
|
762
863
|
while( ( block = iterator.GetNextParagraph() ) ) // Only one =
|
763
864
|
{
|
764
865
|
// Create the new node right before the current one.
|
765
|
-
var newBlock =
|
866
|
+
var newBlock = this.BuildElement( doc ) ;
|
766
867
|
|
767
868
|
// Move everything from the current node to the new one.
|
768
|
-
|
869
|
+
var newBlockIsPre = newBlock.nodeName.IEquals( 'pre' ) ;
|
870
|
+
var blockIsPre = block.nodeName.IEquals( 'pre' ) ;
|
871
|
+
if ( newBlockIsPre && !blockIsPre )
|
872
|
+
{
|
873
|
+
newBlock = this._ToPre( doc, block, newBlock ) ;
|
874
|
+
preBlocks.push( newBlock ) ;
|
875
|
+
}
|
876
|
+
else if ( !newBlockIsPre && blockIsPre )
|
877
|
+
{
|
878
|
+
newBlock = this._FromPre( doc, block, newBlock ) ;
|
879
|
+
convertedPreBlocks.push( newBlock ) ;
|
880
|
+
}
|
881
|
+
else // Convering from a regular block to another regular block.
|
882
|
+
FCKDomTools.MoveChildren( block, newBlock ) ;
|
769
883
|
|
770
|
-
//
|
884
|
+
// Replace the current block.
|
885
|
+
block.parentNode.insertBefore( newBlock, block ) ;
|
771
886
|
FCKDomTools.RemoveNode( block ) ;
|
772
887
|
}
|
773
888
|
|
889
|
+
// Merge adjacent <PRE> blocks for #1229.
|
890
|
+
for ( var i = 0 ; i < preBlocks.length - 1 ; i++ )
|
891
|
+
{
|
892
|
+
// Check if the next block in HTML equals the next <PRE> block generated.
|
893
|
+
if ( FCKDomTools.GetNextSourceElement( preBlocks[i], true, [], [], true ) != preBlocks[i+1] )
|
894
|
+
continue ;
|
895
|
+
|
896
|
+
// Merge the upper <PRE> block's content into the lower <PRE> block.
|
897
|
+
// Remove the upper <PRE> block.
|
898
|
+
preBlocks[i+1].innerHTML = preBlocks[i].innerHTML + '\n\n' + preBlocks[i+1].innerHTML ;
|
899
|
+
FCKDomTools.RemoveNode( preBlocks[i] ) ;
|
900
|
+
}
|
901
|
+
|
902
|
+
// Split converted <PRE> blocks for #1229.
|
903
|
+
for ( var i = 0 ; i < convertedPreBlocks.length ; i++ )
|
904
|
+
{
|
905
|
+
var currentBlock = convertedPreBlocks[i] ;
|
906
|
+
var lastNewBlock = null ;
|
907
|
+
for ( var j = 0 ; j < currentBlock.childNodes.length ; j++ )
|
908
|
+
{
|
909
|
+
var cursor = currentBlock.childNodes[j] ;
|
910
|
+
|
911
|
+
// If we have two <BR>s, and they're not at the beginning or the end,
|
912
|
+
// then we'll split up the contents following them into another block.
|
913
|
+
if ( cursor.nodeName.IEquals( 'br' ) && j != 0 && j != currentBlock.childNodes.length - 2
|
914
|
+
&& cursor.nextSibling && cursor.nextSibling.nodeName.IEquals( 'br' ) )
|
915
|
+
{
|
916
|
+
FCKDomTools.RemoveNode( cursor.nextSibling ) ;
|
917
|
+
FCKDomTools.RemoveNode( cursor ) ;
|
918
|
+
j-- ; // restart at current index at next iteration
|
919
|
+
lastNewBlock = FCKDomTools.InsertAfterNode( lastNewBlock || currentBlock, doc.createElement( currentBlock.nodeName ) ) ;
|
920
|
+
continue ;
|
921
|
+
}
|
922
|
+
|
923
|
+
if ( lastNewBlock )
|
924
|
+
{
|
925
|
+
FCKDomTools.MoveNode( cursor, lastNewBlock ) ;
|
926
|
+
j-- ; // restart at current index at next iteration
|
927
|
+
}
|
928
|
+
}
|
929
|
+
}
|
930
|
+
|
774
931
|
// Re-select the original range.
|
775
932
|
if ( selectIt )
|
776
933
|
range.SelectBookmark( bookmark ) ;
|
934
|
+
|
935
|
+
if ( updateRange )
|
936
|
+
range.MoveToBookmark( bookmark ) ;
|
777
937
|
},
|
778
938
|
|
779
939
|
/**
|
@@ -786,7 +946,7 @@ FCKStyle.prototype =
|
|
786
946
|
* instead of:
|
787
947
|
* <span style="color: #ff0000;"><span style="background-color: #ffffff">XYZ</span></span>
|
788
948
|
*/
|
789
|
-
_ApplyInlineStyle : function( range, selectIt )
|
949
|
+
_ApplyInlineStyle : function( range, selectIt, updateRange )
|
790
950
|
{
|
791
951
|
var doc = range.Window.document ;
|
792
952
|
|
@@ -864,8 +1024,8 @@ FCKStyle.prototype =
|
|
864
1024
|
if ( !nodeName || elementDTD[ nodeName ] )
|
865
1025
|
{
|
866
1026
|
// Check if the style element can be a child of the current
|
867
|
-
// node parent.
|
868
|
-
if ( ( FCK.DTD[ currentNode.parentNode.nodeName.toLowerCase() ] || FCK.DTD.span )[ elementName ] )
|
1027
|
+
// node parent or if the element is not defined in the DTD.
|
1028
|
+
if ( ( FCK.DTD[ currentNode.parentNode.nodeName.toLowerCase() ] || FCK.DTD.span )[ elementName ] || !FCK.DTD[ elementName ] )
|
869
1029
|
{
|
870
1030
|
// This node will be part of our range, so if it has not
|
871
1031
|
// been started, place its start right before the node.
|
@@ -967,6 +1127,9 @@ FCKStyle.prototype =
|
|
967
1127
|
// Re-select the original range.
|
968
1128
|
if ( selectIt )
|
969
1129
|
range.SelectBookmark( bookmark ) ;
|
1130
|
+
|
1131
|
+
if ( updateRange )
|
1132
|
+
range.MoveToBookmark( bookmark ) ;
|
970
1133
|
},
|
971
1134
|
|
972
1135
|
_FixBookmarkStart : function( startNode )
|