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
|
*
|
@@ -35,7 +35,8 @@ FCKDomRange.prototype.MoveToSelection = function()
|
|
35
35
|
this._UpdateElementInfo() ;
|
36
36
|
}
|
37
37
|
else
|
38
|
-
|
38
|
+
if ( this.Window.document )
|
39
|
+
this.MoveToElementStart( this.Window.document.body ) ;
|
39
40
|
}
|
40
41
|
|
41
42
|
FCKDomRange.prototype.Select = function()
|
@@ -100,4 +101,4 @@ FCKDomRange.prototype.SelectBookmark = function( bookmark )
|
|
100
101
|
var selection = this.Window.getSelection() ;
|
101
102
|
selection.removeAllRanges() ;
|
102
103
|
selection.addRange( domRange ) ;
|
103
|
-
}
|
104
|
+
}
|
@@ -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
|
*
|
@@ -66,15 +66,15 @@ FCKDomRange.prototype.MoveToSelection = function()
|
|
66
66
|
}
|
67
67
|
}
|
68
68
|
|
69
|
-
FCKDomRange.prototype.Select = function()
|
69
|
+
FCKDomRange.prototype.Select = function( forceExpand )
|
70
70
|
{
|
71
71
|
if ( this._Range )
|
72
|
-
this.SelectBookmark( this.CreateBookmark( true ) ) ;
|
72
|
+
this.SelectBookmark( this.CreateBookmark( true ), forceExpand ) ;
|
73
73
|
}
|
74
74
|
|
75
75
|
// Not compatible with bookmark created with CreateBookmark2.
|
76
76
|
// The bookmark nodes will be deleted from the document.
|
77
|
-
FCKDomRange.prototype.SelectBookmark = function( bookmark )
|
77
|
+
FCKDomRange.prototype.SelectBookmark = function( bookmark, forceExpand )
|
78
78
|
{
|
79
79
|
var bIsCollapsed = this.CheckIsCollapsed() ;
|
80
80
|
var bIsStartMakerAlone ;
|
@@ -82,7 +82,7 @@ FCKDomRange.prototype.SelectBookmark = function( bookmark )
|
|
82
82
|
|
83
83
|
// Create marker tags for the start and end boundaries.
|
84
84
|
var eStartMarker = this.GetBookmarkNode( bookmark, true ) ;
|
85
|
-
|
85
|
+
|
86
86
|
if ( !eStartMarker )
|
87
87
|
return ;
|
88
88
|
|
@@ -111,26 +111,27 @@ FCKDomRange.prototype.SelectBookmark = function( bookmark )
|
|
111
111
|
}
|
112
112
|
else
|
113
113
|
{
|
114
|
-
bIsStartMakerAlone = ( !eStartMarker.previousSibling || eStartMarker.previousSibling.nodeName.toLowerCase() == 'br' ) && !eStartMarker.nextSibing ;
|
115
|
-
|
116
|
-
// Append a temporary <span
|
114
|
+
bIsStartMakerAlone = ( forceExpand || !eStartMarker.previousSibling || eStartMarker.previousSibling.nodeName.toLowerCase() == 'br' ) && !eStartMarker.nextSibing ;
|
115
|
+
|
116
|
+
// Append a temporary <span></span> before the selection.
|
117
117
|
// This is needed to avoid IE destroying selections inside empty
|
118
118
|
// inline elements, like <b></b> (#253).
|
119
119
|
// It is also needed when placing the selection right after an inline
|
120
120
|
// element to avoid the selection moving inside of it.
|
121
121
|
dummySpan = this.Window.document.createElement( 'span' ) ;
|
122
|
-
dummySpan.innerHTML = '
|
122
|
+
dummySpan.innerHTML = '' ; // Zero Width No-Break Space (U+FEFF). See #1359.
|
123
123
|
eStartMarker.parentNode.insertBefore( dummySpan, eStartMarker ) ;
|
124
|
-
|
124
|
+
|
125
125
|
if ( bIsStartMakerAlone )
|
126
126
|
{
|
127
127
|
// To expand empty blocks or line spaces after <br>, we need
|
128
|
-
// instead to have
|
128
|
+
// instead to have any char, which will be later deleted using the
|
129
129
|
// selection.
|
130
|
-
|
130
|
+
// \ufeff = Zero Width No-Break Space (U+FEFF). See #1359.
|
131
|
+
eStartMarker.parentNode.insertBefore( this.Window.document.createTextNode( '\ufeff' ), eStartMarker ) ;
|
131
132
|
}
|
132
133
|
}
|
133
|
-
|
134
|
+
|
134
135
|
if ( !this._Range )
|
135
136
|
this._Range = this.CreateRange() ;
|
136
137
|
|
@@ -142,9 +143,9 @@ FCKDomRange.prototype.SelectBookmark = function( bookmark )
|
|
142
143
|
{
|
143
144
|
if ( bIsStartMakerAlone )
|
144
145
|
{
|
145
|
-
// Move the selection start to include the temporary
|
146
|
+
// Move the selection start to include the temporary .
|
146
147
|
oIERange.moveStart( 'character', -1 ) ;
|
147
|
-
|
148
|
+
|
148
149
|
oIERange.select() ;
|
149
150
|
|
150
151
|
// Remove our temporary stuff.
|
@@ -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
|
*
|
@@ -92,6 +92,8 @@ FCKDomRangeIterator.prototype =
|
|
92
92
|
var currentNode = this._NextNode ;
|
93
93
|
var lastNode = this._LastNode ;
|
94
94
|
|
95
|
+
this._NextNode = null ;
|
96
|
+
|
95
97
|
while ( currentNode )
|
96
98
|
{
|
97
99
|
// closeRange indicates that a paragraph boundary has been found,
|
@@ -110,7 +112,7 @@ FCKDomRangeIterator.prototype =
|
|
110
112
|
{
|
111
113
|
var nodeName = currentNode.nodeName.toLowerCase() ;
|
112
114
|
|
113
|
-
if ( boundarySet[ nodeName ] )
|
115
|
+
if ( boundarySet[ nodeName ] && ( !FCKBrowserInfo.IsIE || currentNode.scopeName == 'HTML' ) )
|
114
116
|
{
|
115
117
|
// <br> boundaries must be part of the range. It will
|
116
118
|
// happen only if ForceBrBreak.
|
@@ -125,6 +127,18 @@ FCKDomRangeIterator.prototype =
|
|
125
127
|
break ;
|
126
128
|
}
|
127
129
|
|
130
|
+
// The range must finish right before the boundary,
|
131
|
+
// including possibly skipped empty spaces. (#1603)
|
132
|
+
if ( range )
|
133
|
+
{
|
134
|
+
range.SetEnd( currentNode, 3, true ) ;
|
135
|
+
|
136
|
+
// The found boundary must be set as the next one at this
|
137
|
+
// point. (#1717)
|
138
|
+
if ( nodeName != 'br' )
|
139
|
+
this._NextNode = currentNode ;
|
140
|
+
}
|
141
|
+
|
128
142
|
closeRange = true ;
|
129
143
|
}
|
130
144
|
else
|
@@ -181,6 +195,7 @@ FCKDomRangeIterator.prototype =
|
|
181
195
|
}
|
182
196
|
|
183
197
|
currentNode = parentNode ;
|
198
|
+
includeNode = true ;
|
184
199
|
isLast = ( currentNode == lastNode ) ;
|
185
200
|
continueFromSibling = true ;
|
186
201
|
}
|
@@ -195,15 +210,15 @@ FCKDomRangeIterator.prototype =
|
|
195
210
|
if ( ( closeRange || isLast ) && range )
|
196
211
|
{
|
197
212
|
range._UpdateElementInfo() ;
|
198
|
-
|
199
|
-
if ( range.StartNode == range.EndNode
|
200
|
-
&& range.StartNode.parentNode == range.StartBlockLimit
|
213
|
+
|
214
|
+
if ( range.StartNode == range.EndNode
|
215
|
+
&& range.StartNode.parentNode == range.StartBlockLimit
|
201
216
|
&& range.StartNode.getAttribute && range.StartNode.getAttribute( '_fck_bookmark' ) )
|
202
217
|
range = null ;
|
203
218
|
else
|
204
219
|
break ;
|
205
220
|
}
|
206
|
-
|
221
|
+
|
207
222
|
if ( isLast )
|
208
223
|
break ;
|
209
224
|
|
@@ -285,8 +300,13 @@ FCKDomRangeIterator.prototype =
|
|
285
300
|
if ( removePreviousBr )
|
286
301
|
{
|
287
302
|
var previousSibling = block.previousSibling ;
|
288
|
-
if ( previousSibling && previousSibling.nodeType == 1
|
289
|
-
|
303
|
+
if ( previousSibling && previousSibling.nodeType == 1 )
|
304
|
+
{
|
305
|
+
if ( previousSibling.nodeName.toLowerCase() == 'br' )
|
306
|
+
previousSibling.parentNode.removeChild( previousSibling ) ;
|
307
|
+
else if ( previousSibling.lastChild && previousSibling.lastChild.nodeName.IEquals( 'br' ) )
|
308
|
+
previousSibling.removeChild( previousSibling.lastChild ) ;
|
309
|
+
}
|
290
310
|
}
|
291
311
|
|
292
312
|
if ( removeLastBr )
|
@@ -299,7 +319,8 @@ FCKDomRangeIterator.prototype =
|
|
299
319
|
// Get a reference for the next element. This is important because the
|
300
320
|
// above block can be removed or changed, so we can rely on it for the
|
301
321
|
// next interation.
|
302
|
-
|
322
|
+
if ( !this._NextNode )
|
323
|
+
this._NextNode = ( isLast || block == lastNode ) ? null : FCKDomTools.GetNextSourceNode( block, true, null, lastNode ) ;
|
303
324
|
|
304
325
|
return block ;
|
305
326
|
}
|
@@ -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
|
*
|
@@ -44,31 +44,15 @@ FCKEditingArea.prototype.Start = function( html, secondCall )
|
|
44
44
|
var oTargetDocument = FCKTools.GetElementDocument( eTargetElement ) ;
|
45
45
|
|
46
46
|
// Remove all child nodes from the target.
|
47
|
-
|
48
|
-
|
49
|
-
{
|
50
|
-
// Set innerHTML = '' to avoid memory leak.
|
51
|
-
if ( oChild.contentWindow )
|
52
|
-
oChild.contentWindow.document.body.innerHTML = '' ;
|
53
|
-
|
54
|
-
eTargetElement.removeChild( oChild ) ;
|
55
|
-
}
|
47
|
+
while( eTargetElement.firstChild )
|
48
|
+
eTargetElement.removeChild( eTargetElement.firstChild ) ;
|
56
49
|
|
57
50
|
if ( this.Mode == FCK_EDITMODE_WYSIWYG )
|
58
51
|
{
|
59
|
-
//
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
// source of the iframe is set to javascript. see #515
|
64
|
-
if ( !FCKBrowserInfo.IsGecko )
|
65
|
-
oIFrame.src = 'javascript:void(0)' ;
|
66
|
-
|
67
|
-
oIFrame.frameBorder = 0 ;
|
68
|
-
oIFrame.width = oIFrame.height = '100%' ;
|
69
|
-
|
70
|
-
// Append the new IFRAME to the target.
|
71
|
-
eTargetElement.appendChild( oIFrame ) ;
|
52
|
+
// For FF, document.domain must be set only when different, otherwhise
|
53
|
+
// we'll strangely have "Permission denied" issues.
|
54
|
+
if ( FCK_IS_CUSTOM_DOMAIN )
|
55
|
+
html = '<script>document.domain="' + FCK_RUNTIME_DOMAIN + '";</script>' + html ;
|
72
56
|
|
73
57
|
// IE has a bug with the <base> tag... it must have a </base> closer,
|
74
58
|
// otherwise the all successive tags will be set as children nodes of the <base>.
|
@@ -104,6 +88,38 @@ FCKEditingArea.prototype.Start = function( html, secondCall )
|
|
104
88
|
this._BodyHTML = html ; // Invalid HTML input.
|
105
89
|
}
|
106
90
|
|
91
|
+
// Create the editing area IFRAME.
|
92
|
+
var oIFrame = this.IFrame = oTargetDocument.createElement( 'iframe' ) ;
|
93
|
+
|
94
|
+
// IE: Avoid JavaScript errors thrown by the editing are source (like tags events).
|
95
|
+
// See #1055.
|
96
|
+
var sOverrideError = '<script type="text/javascript" _fcktemp="true">window.onerror=function(){return true;};</script>' ;
|
97
|
+
|
98
|
+
oIFrame.frameBorder = 0 ;
|
99
|
+
oIFrame.width = oIFrame.height = '100%' ;
|
100
|
+
|
101
|
+
if ( FCK_IS_CUSTOM_DOMAIN && FCKBrowserInfo.IsIE )
|
102
|
+
{
|
103
|
+
window._FCKHtmlToLoad = sOverrideError + html ;
|
104
|
+
oIFrame.src = 'javascript:void( (function(){' +
|
105
|
+
'document.open() ;' +
|
106
|
+
'document.domain="' + document.domain + '" ;' +
|
107
|
+
'document.write( window.parent._FCKHtmlToLoad );' +
|
108
|
+
'document.close() ;' +
|
109
|
+
'window.parent._FCKHtmlToLoad = null ;' +
|
110
|
+
'})() )' ;
|
111
|
+
}
|
112
|
+
else if ( !FCKBrowserInfo.IsGecko )
|
113
|
+
{
|
114
|
+
// Firefox will render the tables inside the body in Quirks mode if the
|
115
|
+
// source of the iframe is set to javascript. see #515
|
116
|
+
oIFrame.src = 'javascript:void(0)' ;
|
117
|
+
}
|
118
|
+
|
119
|
+
// Append the new IFRAME to the target. For IE, it must be done after
|
120
|
+
// setting the "src", to avoid the "secure/unsecure" message under HTTPS.
|
121
|
+
eTargetElement.appendChild( oIFrame ) ;
|
122
|
+
|
107
123
|
// Get the window and document objects used to interact with the newly created IFRAME.
|
108
124
|
this.Window = oIFrame.contentWindow ;
|
109
125
|
|
@@ -111,11 +127,17 @@ FCKEditingArea.prototype.Start = function( html, secondCall )
|
|
111
127
|
// TODO: This error handler is not being fired.
|
112
128
|
// this.Window.onerror = function() { alert( 'Error!' ) ; return true ; }
|
113
129
|
|
114
|
-
|
130
|
+
if ( !FCK_IS_CUSTOM_DOMAIN || !FCKBrowserInfo.IsIE )
|
131
|
+
{
|
132
|
+
var oDoc = this.Window.document ;
|
115
133
|
|
116
|
-
|
117
|
-
|
118
|
-
|
134
|
+
oDoc.open() ;
|
135
|
+
oDoc.write( sOverrideError + html ) ;
|
136
|
+
oDoc.close() ;
|
137
|
+
}
|
138
|
+
|
139
|
+
if ( FCKBrowserInfo.IsAIR )
|
140
|
+
FCKAdobeAIR.EditingArea_Start( oDoc, html ) ;
|
119
141
|
|
120
142
|
// Firefox 1.0.x is buggy... ohh yes... so let's do it two times and it
|
121
143
|
// will magically work.
|
@@ -125,27 +147,46 @@ FCKEditingArea.prototype.Start = function( html, secondCall )
|
|
125
147
|
return ;
|
126
148
|
}
|
127
149
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
150
|
+
if ( oIFrame.readyState && oIFrame.readyState != 'completed' )
|
151
|
+
{
|
152
|
+
var editArea = this ;
|
153
|
+
( oIFrame.onreadystatechange = function()
|
154
|
+
{
|
155
|
+
if ( oIFrame.readyState == 'complete' )
|
156
|
+
{
|
157
|
+
oIFrame.onreadystatechange = null ;
|
158
|
+
editArea.Window._FCKEditingArea = editArea ;
|
159
|
+
FCKEditingArea_CompleteStart.call( editArea.Window ) ;
|
160
|
+
}
|
161
|
+
// It happened that IE changed the state to "complete" after the
|
162
|
+
// "if" and before the "onreadystatechange" assignement, making we
|
163
|
+
// lost the event call, so we do a manual call just to be sure.
|
164
|
+
} )() ;
|
165
|
+
}
|
136
166
|
else
|
137
|
-
|
167
|
+
{
|
168
|
+
this.Window._FCKEditingArea = this ;
|
169
|
+
|
170
|
+
// FF 1.0.x is buggy... we must wait a lot to enable editing because
|
171
|
+
// sometimes the content simply disappears, for example when pasting
|
172
|
+
// "bla1!<img src='some_url'>!bla2" in the source and then switching
|
173
|
+
// back to design.
|
174
|
+
if ( FCKBrowserInfo.IsGecko10 )
|
175
|
+
this.Window.setTimeout( FCKEditingArea_CompleteStart, 500 ) ;
|
176
|
+
else
|
177
|
+
FCKEditingArea_CompleteStart.call( this.Window ) ;
|
178
|
+
}
|
138
179
|
}
|
139
180
|
else
|
140
181
|
{
|
141
182
|
var eTextarea = this.Textarea = oTargetDocument.createElement( 'textarea' ) ;
|
142
183
|
eTextarea.className = 'SourceField' ;
|
143
184
|
eTextarea.dir = 'ltr' ;
|
144
|
-
FCKDomTools.SetElementStyles( eTextarea,
|
145
|
-
{
|
146
|
-
width : '100%',
|
147
|
-
height : '100%',
|
148
|
-
border : 'none',
|
185
|
+
FCKDomTools.SetElementStyles( eTextarea,
|
186
|
+
{
|
187
|
+
width : '100%',
|
188
|
+
height : '100%',
|
189
|
+
border : 'none',
|
149
190
|
resize : 'none',
|
150
191
|
outline : 'none'
|
151
192
|
} ) ;
|
@@ -169,7 +210,10 @@ function FCKEditingArea_CompleteStart()
|
|
169
210
|
}
|
170
211
|
|
171
212
|
var oEditorArea = this._FCKEditingArea ;
|
172
|
-
|
213
|
+
|
214
|
+
// Save this reference to be re-used later.
|
215
|
+
oEditorArea.Document = oEditorArea.Window.document ;
|
216
|
+
|
173
217
|
oEditorArea.MakeEditable() ;
|
174
218
|
|
175
219
|
// Fire the "OnLoad" event.
|
@@ -207,31 +251,13 @@ FCKEditingArea.prototype.MakeEditable = function()
|
|
207
251
|
|
208
252
|
oDoc.designMode = 'on' ;
|
209
253
|
|
210
|
-
// Tell Gecko to use or not the <SPAN> tag for the bold, italic and underline.
|
211
|
-
try
|
212
|
-
{
|
213
|
-
oDoc.execCommand( 'styleWithCSS', false, FCKConfig.GeckoUseSPAN ) ;
|
214
|
-
}
|
215
|
-
catch (e)
|
216
|
-
{
|
217
|
-
// As evidenced here, useCSS is deprecated in favor of styleWithCSS:
|
218
|
-
// http://www.mozilla.org/editor/midas-spec.html
|
219
|
-
oDoc.execCommand( 'useCSS', false, !FCKConfig.GeckoUseSPAN ) ;
|
220
|
-
}
|
221
|
-
|
222
|
-
// Analyzing Firefox 1.5 source code, it seams that there is support for a
|
223
|
-
// "insertBrOnReturn" command. Applying it gives no error, but it doesn't
|
224
|
-
// gives the same behavior that you have with IE. It works only if you are
|
225
|
-
// already inside a paragraph and it doesn't render correctly in the first enter.
|
226
|
-
// oDoc.execCommand( 'insertBrOnReturn', false, false ) ;
|
227
|
-
|
228
254
|
// Tell Gecko (Firefox 1.5+) to enable or not live resizing of objects (by Alfonso Martinez)
|
229
255
|
oDoc.execCommand( 'enableObjectResizing', false, !FCKConfig.DisableObjectResizing ) ;
|
230
256
|
|
231
257
|
// Disable the standard table editing features of Firefox.
|
232
258
|
oDoc.execCommand( 'enableInlineTableEditing', false, !FCKConfig.DisableFFTableHandles ) ;
|
233
259
|
}
|
234
|
-
catch (e)
|
260
|
+
catch (e)
|
235
261
|
{
|
236
262
|
// In Firefox if the iframe is initially hidden it can't be set to designMode and it raises an exception
|
237
263
|
// So we set up a DOM Mutation event Listener on the HTML, as it will raise several events when the document is visible again
|
@@ -246,12 +272,12 @@ FCKEditingArea.prototype.MakeEditable = function()
|
|
246
272
|
function FCKEditingArea_Document_AttributeNodeModified( evt )
|
247
273
|
{
|
248
274
|
var editingArea = evt.currentTarget.contentWindow._FCKEditingArea ;
|
249
|
-
|
275
|
+
|
250
276
|
// We want to run our function after the events no longer fire, so we can know that it's a stable situation
|
251
277
|
if ( editingArea._timer )
|
252
278
|
window.clearTimeout( editingArea._timer ) ;
|
253
279
|
|
254
|
-
editingArea._timer = FCKTools.SetTimeout( FCKEditingArea_MakeEditableByMutation, 1000, editingArea ) ;
|
280
|
+
editingArea._timer = FCKTools.SetTimeout( FCKEditingArea_MakeEditableByMutation, 1000, editingArea ) ;
|
255
281
|
}
|
256
282
|
|
257
283
|
// This function ideally should be called after the document is visible, it does clean up of the
|
@@ -273,21 +299,10 @@ FCKEditingArea.prototype.Focus = function()
|
|
273
299
|
{
|
274
300
|
if ( this.Mode == FCK_EDITMODE_WYSIWYG )
|
275
301
|
{
|
276
|
-
|
277
|
-
|
278
|
-
if ( FCKBrowserInfo.IsIE && this.Document.hasFocus() )
|
279
|
-
this._EnsureFocusIE() ;
|
280
|
-
|
281
|
-
if ( FCKBrowserInfo.IsSafari )
|
282
|
-
this.IFrame.focus() ;
|
302
|
+
if ( FCKBrowserInfo.IsIE )
|
303
|
+
this._FocusIE() ;
|
283
304
|
else
|
284
|
-
{
|
285
305
|
this.Window.focus() ;
|
286
|
-
|
287
|
-
// In IE it can happen that the document is in theory focused but the active element is outside it
|
288
|
-
if ( FCKBrowserInfo.IsIE )
|
289
|
-
this._EnsureFocusIE() ;
|
290
|
-
}
|
291
306
|
}
|
292
307
|
else
|
293
308
|
{
|
@@ -301,30 +316,33 @@ FCKEditingArea.prototype.Focus = function()
|
|
301
316
|
catch(e) {}
|
302
317
|
}
|
303
318
|
|
304
|
-
FCKEditingArea.prototype.
|
319
|
+
FCKEditingArea.prototype._FocusIE = function()
|
305
320
|
{
|
306
|
-
// In IE it can happen that the document is in theory focused but the
|
321
|
+
// In IE it can happen that the document is in theory focused but the
|
322
|
+
// active element is outside of it.
|
307
323
|
this.Document.body.setActive() ;
|
308
324
|
|
325
|
+
this.Window.focus() ;
|
326
|
+
|
309
327
|
// Kludge for #141... yet more code to workaround IE bugs
|
310
328
|
var range = this.Document.selection.createRange() ;
|
311
329
|
|
312
|
-
// Only apply the fix when in a block and the block is empty.
|
313
330
|
var parentNode = range.parentElement() ;
|
331
|
+
var parentTag = parentNode.nodeName.toLowerCase() ;
|
314
332
|
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
var oldLength = range.text.length ;
|
321
|
-
range.moveEnd( "character", 1 ) ;
|
322
|
-
range.select() ;
|
323
|
-
if ( range.text.length > oldLength )
|
333
|
+
// Only apply the fix when in a block, and the block is empty.
|
334
|
+
if ( parentNode.childNodes.length > 0 ||
|
335
|
+
!( FCKListsLib.BlockElements[parentTag] ||
|
336
|
+
FCKListsLib.NonEmptyBlockElements[parentTag] ) )
|
324
337
|
{
|
325
|
-
|
326
|
-
range.select() ;
|
338
|
+
return ;
|
327
339
|
}
|
340
|
+
|
341
|
+
// Force the selection to happen, in this way we guarantee the focus will
|
342
|
+
// be there.
|
343
|
+
range = new FCKDomRange( this.Window ) ;
|
344
|
+
range.MoveToElementEditStart( parentNode ) ;
|
345
|
+
range.Select() ;
|
328
346
|
}
|
329
347
|
|
330
348
|
function FCKEditingArea_Cleanup()
|