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
|
*
|
@@ -38,6 +38,8 @@ var FCKElementPath = function( lastNode )
|
|
38
38
|
this.LastElement = e ;
|
39
39
|
|
40
40
|
var sElementName = e.nodeName.toLowerCase() ;
|
41
|
+
if ( FCKBrowserInfo.IsIE && e.scopeName != 'HTML' )
|
42
|
+
sElementName = e.scopeName.toLowerCase() + ':' + sElementName ;
|
41
43
|
|
42
44
|
if ( !eBlockLimit )
|
43
45
|
{
|
@@ -46,8 +48,9 @@ var FCKElementPath = function( lastNode )
|
|
46
48
|
|
47
49
|
if ( FCKListsLib.PathBlockLimitElements[ sElementName ] != null )
|
48
50
|
{
|
49
|
-
// DIV is considered the Block, if no block is available (#525)
|
50
|
-
|
51
|
+
// DIV is considered the Block, if no block is available (#525)
|
52
|
+
// and if it doesn't contain other blocks.
|
53
|
+
if ( !eBlock && sElementName == 'div' && !FCKElementPath._CheckHasBlock( e ) )
|
51
54
|
eBlock = e ;
|
52
55
|
else
|
53
56
|
eBlockLimit = e ;
|
@@ -67,4 +70,20 @@ var FCKElementPath = function( lastNode )
|
|
67
70
|
this.Elements = aElements ;
|
68
71
|
}
|
69
72
|
|
73
|
+
/**
|
74
|
+
* Check if an element contains any block element.
|
75
|
+
*/
|
76
|
+
FCKElementPath._CheckHasBlock = function( element )
|
77
|
+
{
|
78
|
+
var childNodes = element.childNodes ;
|
79
|
+
|
80
|
+
for ( var i = 0, count = childNodes.length ; i < count ; i++ )
|
81
|
+
{
|
82
|
+
var child = childNodes[i] ;
|
70
83
|
|
84
|
+
if ( child.nodeType == 1 && FCKListsLib.BlockElements[ child.nodeName.toLowerCase() ] )
|
85
|
+
return true ;
|
86
|
+
}
|
87
|
+
|
88
|
+
return false ;
|
89
|
+
}
|
@@ -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
|
*
|
@@ -110,7 +110,7 @@ FCKEnterKey.prototype.DoEnter = function( mode, hasShift )
|
|
110
110
|
var parentElement = FCKSelection.GetParentElement() ;
|
111
111
|
var parentPath = new FCKElementPath( parentElement ) ;
|
112
112
|
var sMode = mode || this.EnterMode ;
|
113
|
-
|
113
|
+
|
114
114
|
if ( sMode == 'br' || parentPath.Block && parentPath.Block.tagName.toLowerCase() == 'pre' )
|
115
115
|
return this._ExecuteEnterBr() ;
|
116
116
|
else
|
@@ -286,7 +286,7 @@ FCKEnterKey.prototype._ExecuteBackspace = function( range, previous, currentBloc
|
|
286
286
|
// Set the range to the end of the previous element and bookmark it.
|
287
287
|
range.SetStart( previous, 2, true ) ;
|
288
288
|
range.Collapse( true ) ;
|
289
|
-
var oBookmark = range.CreateBookmark() ;
|
289
|
+
var oBookmark = range.CreateBookmark( true ) ;
|
290
290
|
|
291
291
|
// Move the contents of the block to the previous element and delete it.
|
292
292
|
// But for some block types (e.g. table), moving the children to the previous block makes no sense.
|
@@ -295,8 +295,7 @@ FCKEnterKey.prototype._ExecuteBackspace = function( range, previous, currentBloc
|
|
295
295
|
FCKDomTools.MoveChildren( currentBlock, previous ) ;
|
296
296
|
|
297
297
|
// Place the selection at the bookmark.
|
298
|
-
range.
|
299
|
-
range.Select() ;
|
298
|
+
range.SelectBookmark( oBookmark ) ;
|
300
299
|
|
301
300
|
bCustom = true ;
|
302
301
|
}
|
@@ -336,8 +335,8 @@ FCKEnterKey.prototype.DoDelete = function()
|
|
336
335
|
var oCurrentBlock = oRange.StartBlock ;
|
337
336
|
var eCurrentCell = FCKTools.GetElementAscensor( oCurrentBlock, 'td' );
|
338
337
|
|
339
|
-
var eNext = FCKDomTools.GetNextSourceElement( oCurrentBlock, true, [ oRange.StartBlockLimit.nodeName ],
|
340
|
-
['UL','OL','TR'] ) ;
|
338
|
+
var eNext = FCKDomTools.GetNextSourceElement( oCurrentBlock, true, [ oRange.StartBlockLimit.nodeName ],
|
339
|
+
['UL','OL','TR'], true ) ;
|
341
340
|
|
342
341
|
// Bug #1323 : if we're in a table cell, and the next node belongs to a different cell, then don't
|
343
342
|
// delete anything.
|
@@ -394,8 +393,8 @@ FCKEnterKey.prototype._ExecuteEnterBlock = function( blockTag, range )
|
|
394
393
|
// Get the current selection.
|
395
394
|
var oRange = range || new FCKDomRange( this.Window ) ;
|
396
395
|
|
397
|
-
var oSplitInfo = oRange.SplitBlock() ;
|
398
|
-
|
396
|
+
var oSplitInfo = oRange.SplitBlock( blockTag ) ;
|
397
|
+
|
399
398
|
if ( oSplitInfo )
|
400
399
|
{
|
401
400
|
// Get the current blocks.
|
@@ -405,11 +404,32 @@ FCKEnterKey.prototype._ExecuteEnterBlock = function( blockTag, range )
|
|
405
404
|
var bIsStartOfBlock = oSplitInfo.WasStartOfBlock ;
|
406
405
|
var bIsEndOfBlock = oSplitInfo.WasEndOfBlock ;
|
407
406
|
|
407
|
+
// If there is one block under a list item, modify the split so that the list item gets split as well. (Bug #1647)
|
408
|
+
if ( eNextBlock )
|
409
|
+
{
|
410
|
+
if ( eNextBlock.parentNode.nodeName.IEquals( 'li' ) )
|
411
|
+
{
|
412
|
+
FCKDomTools.BreakParent( eNextBlock, eNextBlock.parentNode ) ;
|
413
|
+
FCKDomTools.MoveNode( eNextBlock, eNextBlock.nextSibling, true ) ;
|
414
|
+
}
|
415
|
+
}
|
416
|
+
else if ( ePreviousBlock && ePreviousBlock.parentNode.nodeName.IEquals( 'li' ) )
|
417
|
+
{
|
418
|
+
FCKDomTools.BreakParent( ePreviousBlock, ePreviousBlock.parentNode ) ;
|
419
|
+
oRange.MoveToElementEditStart( ePreviousBlock.nextSibling );
|
420
|
+
FCKDomTools.MoveNode( ePreviousBlock, ePreviousBlock.previousSibling ) ;
|
421
|
+
}
|
422
|
+
|
408
423
|
// If we have both the previous and next blocks, it means that the
|
409
424
|
// boundaries were on separated blocks, or none of them where on the
|
410
425
|
// block limits (start/end).
|
411
|
-
if ( !
|
426
|
+
if ( !bIsStartOfBlock && !bIsEndOfBlock )
|
412
427
|
{
|
428
|
+
// If the next block is an <li> with another list tree as the first child
|
429
|
+
// We'll need to append a placeholder or the list item wouldn't be editable. (Bug #1420)
|
430
|
+
if ( eNextBlock.nodeName.IEquals( 'li' ) && eNextBlock.firstChild
|
431
|
+
&& eNextBlock.firstChild.nodeName.IEquals( ['ul', 'ol'] ) )
|
432
|
+
eNextBlock.insertBefore( FCKTools.GetElementDocument( eNextBlock ).createTextNode( '\xa0' ), eNextBlock.firstChild ) ;
|
413
433
|
// Move the selection to the end block.
|
414
434
|
if ( eNextBlock )
|
415
435
|
oRange.MoveToElementEditStart( eNextBlock ) ;
|
@@ -431,24 +451,41 @@ FCKEnterKey.prototype._ExecuteEnterBlock = function( blockTag, range )
|
|
431
451
|
var sPreviousBlockTag = ePreviousBlock.tagName.toUpperCase() ;
|
432
452
|
|
433
453
|
// If is a header tag, or we are in a Shift+Enter (#77),
|
434
|
-
// create a new block element.
|
435
|
-
if ( this._HasShift
|
436
|
-
eNewBlock = this.Window.document.createElement( blockTag ) ;
|
437
|
-
else
|
454
|
+
// create a new block element (later in the code).
|
455
|
+
if ( !this._HasShift && !(/^H[1-6]$/).test( sPreviousBlockTag ) )
|
438
456
|
{
|
439
457
|
// Otherwise, duplicate the previous block.
|
440
458
|
eNewBlock = FCKDomTools.CloneElement( ePreviousBlock ) ;
|
441
|
-
|
442
|
-
this._RecreateEndingTree( ePreviousBlock, eNewBlock ) ;
|
443
459
|
}
|
444
460
|
}
|
445
461
|
else if ( eNextBlock )
|
446
|
-
{
|
447
462
|
eNewBlock = FCKDomTools.CloneElement( eNextBlock ) ;
|
448
|
-
|
449
|
-
|
463
|
+
|
464
|
+
if ( !eNewBlock )
|
450
465
|
eNewBlock = this.Window.document.createElement( blockTag ) ;
|
451
466
|
|
467
|
+
// Recreate the inline elements tree, which was available
|
468
|
+
// before the hitting enter, so the same styles will be
|
469
|
+
// available in the new block.
|
470
|
+
var elementPath = oSplitInfo.ElementPath ;
|
471
|
+
if ( elementPath )
|
472
|
+
{
|
473
|
+
for ( var i = 0, len = elementPath.Elements.length ; i < len ; i++ )
|
474
|
+
{
|
475
|
+
var element = elementPath.Elements[i] ;
|
476
|
+
|
477
|
+
if ( element == elementPath.Block || element == elementPath.BlockLimit )
|
478
|
+
break ;
|
479
|
+
|
480
|
+
if ( FCKListsLib.InlineChildReqElements[ element.nodeName.toLowerCase() ] )
|
481
|
+
{
|
482
|
+
element = FCKDomTools.CloneElement( element ) ;
|
483
|
+
FCKDomTools.MoveChildren( eNewBlock, element ) ;
|
484
|
+
eNewBlock.appendChild( element ) ;
|
485
|
+
}
|
486
|
+
}
|
487
|
+
}
|
488
|
+
|
452
489
|
if ( FCKBrowserInfo.IsGeckoLike )
|
453
490
|
FCKTools.AppendBogusBr( eNewBlock ) ;
|
454
491
|
|
@@ -459,16 +496,19 @@ FCKEnterKey.prototype._ExecuteEnterBlock = function( blockTag, range )
|
|
459
496
|
if ( FCKBrowserInfo.IsIE )
|
460
497
|
{
|
461
498
|
// Move the selection to the new block.
|
462
|
-
oRange.
|
499
|
+
oRange.MoveToElementEditStart( eNewBlock ) ;
|
463
500
|
oRange.Select() ;
|
464
501
|
}
|
465
502
|
|
503
|
+
// Move the selection to the new block.
|
466
504
|
oRange.MoveToElementEditStart( bIsStartOfBlock && !bIsEndOfBlock ? eNextBlock : eNewBlock ) ;
|
467
|
-
|
468
|
-
if ( FCKBrowserInfo.IsGeckoLike )
|
469
|
-
eNewBlock.scrollIntoView( false ) ;
|
470
505
|
}
|
471
506
|
|
507
|
+
if ( FCKBrowserInfo.IsSafari )
|
508
|
+
FCKDomTools.ScrollIntoView( eNextBlock || eNewBlock, false ) ;
|
509
|
+
else if ( FCKBrowserInfo.IsGeckoLike )
|
510
|
+
( eNextBlock || eNewBlock ).scrollIntoView( false ) ;
|
511
|
+
|
472
512
|
oRange.Select() ;
|
473
513
|
}
|
474
514
|
|
@@ -498,6 +538,7 @@ FCKEnterKey.prototype._ExecuteEnterBr = function( blockTag )
|
|
498
538
|
var sStartBlockTag = oRange.StartBlock ? oRange.StartBlock.tagName.toUpperCase() : '' ;
|
499
539
|
|
500
540
|
var bHasShift = this._HasShift ;
|
541
|
+
var bIsPre = false ;
|
501
542
|
|
502
543
|
if ( !bHasShift && sStartBlockTag == 'LI' )
|
503
544
|
return this._ExecuteEnterBlock( null, oRange ) ;
|
@@ -517,8 +558,9 @@ FCKEnterKey.prototype._ExecuteEnterBr = function( blockTag )
|
|
517
558
|
}
|
518
559
|
else
|
519
560
|
{
|
520
|
-
var eLineBreak
|
521
|
-
|
561
|
+
var eLineBreak ;
|
562
|
+
bIsPre = sStartBlockTag.IEquals( 'pre' ) ;
|
563
|
+
if ( bIsPre )
|
522
564
|
eLineBreak = this.Window.document.createTextNode( FCKBrowserInfo.IsIE ? '\r' : '\n' ) ;
|
523
565
|
else
|
524
566
|
eLineBreak = this.Window.document.createElement( 'br' ) ;
|
@@ -545,8 +587,14 @@ FCKEnterKey.prototype._ExecuteEnterBr = function( blockTag )
|
|
545
587
|
dummy = this.Window.document.createElement( 'span' ) ;
|
546
588
|
else
|
547
589
|
dummy = this.Window.document.createElement( 'br' ) ;
|
590
|
+
|
548
591
|
eLineBreak.parentNode.insertBefore( dummy, eLineBreak.nextSibling ) ;
|
549
|
-
|
592
|
+
|
593
|
+
if ( FCKBrowserInfo.IsSafari )
|
594
|
+
FCKDomTools.ScrollIntoView( dummy, false ) ;
|
595
|
+
else
|
596
|
+
dummy.scrollIntoView( false ) ;
|
597
|
+
|
550
598
|
dummy.parentNode.removeChild( dummy ) ;
|
551
599
|
}
|
552
600
|
}
|
@@ -554,7 +602,7 @@ FCKEnterKey.prototype._ExecuteEnterBr = function( blockTag )
|
|
554
602
|
// This collapse guarantees the cursor will be blinking.
|
555
603
|
oRange.Collapse( true ) ;
|
556
604
|
|
557
|
-
oRange.Select() ;
|
605
|
+
oRange.Select( bIsPre ) ;
|
558
606
|
}
|
559
607
|
|
560
608
|
// Release the resources used by the range.
|
@@ -563,16 +611,6 @@ FCKEnterKey.prototype._ExecuteEnterBr = function( blockTag )
|
|
563
611
|
return true ;
|
564
612
|
}
|
565
613
|
|
566
|
-
// Recreate the elements tree at the end of the source block, at the beginning
|
567
|
-
// of the target block. Eg.:
|
568
|
-
// If source = <p><u>Some</u> sample <b><i>text</i></b></p> then target = <p><b><i></i></b></p>
|
569
|
-
// If source = <p><u>Some</u> sample text</p> then target = <p></p>
|
570
|
-
FCKEnterKey.prototype._RecreateEndingTree = function( source, target )
|
571
|
-
{
|
572
|
-
while ( ( source = source.lastChild ) && source.nodeType == 1 && FCKListsLib.InlineChildReqElements[ source.nodeName.toLowerCase() ] != null )
|
573
|
-
target = target.insertBefore( FCKDomTools.CloneElement( source ), target.firstChild ) ;
|
574
|
-
}
|
575
|
-
|
576
614
|
// Outdents a LI, maintaining the selection defined on a range.
|
577
615
|
FCKEnterKey.prototype._OutdentWithSelection = function( li, range )
|
578
616
|
{
|
@@ -589,7 +627,7 @@ FCKEnterKey.prototype._CheckIsAllContentsIncluded = function( range, node )
|
|
589
627
|
{
|
590
628
|
var startOk = false ;
|
591
629
|
var endOk = false ;
|
592
|
-
|
630
|
+
|
593
631
|
/*
|
594
632
|
FCKDebug.Output( 'sc='+range.StartContainer.nodeName+
|
595
633
|
',so='+range._Range.startOffset+
|
@@ -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
|
*
|
@@ -34,7 +34,12 @@ FCKEvents.prototype.AttachEvent = function( eventName, functionPointer )
|
|
34
34
|
if ( !( aTargets = this._RegisteredEvents[ eventName ] ) )
|
35
35
|
this._RegisteredEvents[ eventName ] = [ functionPointer ] ;
|
36
36
|
else
|
37
|
-
|
37
|
+
{
|
38
|
+
// Check that the event handler isn't already registered with the same listener
|
39
|
+
// It doesn't detect function pointers belonging to an object (at least in Gecko)
|
40
|
+
if ( aTargets.IndexOf( functionPointer ) == -1 )
|
41
|
+
aTargets.push( functionPointer ) ;
|
42
|
+
}
|
38
43
|
}
|
39
44
|
|
40
45
|
FCKEvents.prototype.FireEvent = function( eventName, params )
|
@@ -0,0 +1,142 @@
|
|
1
|
+
/*
|
2
|
+
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
3
|
+
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
4
|
+
*
|
5
|
+
* == BEGIN LICENSE ==
|
6
|
+
*
|
7
|
+
* Licensed under the terms of any of the following licenses at your
|
8
|
+
* choice:
|
9
|
+
*
|
10
|
+
* - GNU General Public License Version 2 or later (the "GPL")
|
11
|
+
* http://www.gnu.org/licenses/gpl.html
|
12
|
+
*
|
13
|
+
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
14
|
+
* http://www.gnu.org/licenses/lgpl.html
|
15
|
+
*
|
16
|
+
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
17
|
+
* http://www.mozilla.org/MPL/MPL-1.1.html
|
18
|
+
*
|
19
|
+
* == END LICENSE ==
|
20
|
+
*
|
21
|
+
* This class can be used to interate through nodes inside a range.
|
22
|
+
*
|
23
|
+
* During interation, the provided range can become invalid, due to document
|
24
|
+
* mutations, so CreateBookmark() used to restore it after processing, if
|
25
|
+
* needed.
|
26
|
+
*/
|
27
|
+
|
28
|
+
var FCKHtmlIterator = function( source )
|
29
|
+
{
|
30
|
+
this._sourceHtml = source ;
|
31
|
+
}
|
32
|
+
FCKHtmlIterator.prototype =
|
33
|
+
{
|
34
|
+
Next : function()
|
35
|
+
{
|
36
|
+
var sourceHtml = this._sourceHtml ;
|
37
|
+
if ( sourceHtml == null )
|
38
|
+
return null ;
|
39
|
+
|
40
|
+
var match = FCKRegexLib.HtmlTag.exec( sourceHtml ) ;
|
41
|
+
var isTag = false ;
|
42
|
+
var value = "" ;
|
43
|
+
if ( match )
|
44
|
+
{
|
45
|
+
if ( match.index > 0 )
|
46
|
+
{
|
47
|
+
value = sourceHtml.substr( 0, match.index ) ;
|
48
|
+
this._sourceHtml = sourceHtml.substr( match.index ) ;
|
49
|
+
}
|
50
|
+
else
|
51
|
+
{
|
52
|
+
isTag = true ;
|
53
|
+
value = match[0] ;
|
54
|
+
this._sourceHtml = sourceHtml.substr( match[0].length ) ;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
else
|
58
|
+
{
|
59
|
+
value = sourceHtml ;
|
60
|
+
this._sourceHtml = null ;
|
61
|
+
}
|
62
|
+
return { 'isTag' : isTag, 'value' : value } ;
|
63
|
+
},
|
64
|
+
|
65
|
+
Each : function( func )
|
66
|
+
{
|
67
|
+
var chunk ;
|
68
|
+
while ( ( chunk = this.Next() ) )
|
69
|
+
func( chunk.isTag, chunk.value ) ;
|
70
|
+
}
|
71
|
+
} ;
|
72
|
+
/*
|
73
|
+
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
74
|
+
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
75
|
+
*
|
76
|
+
* == BEGIN LICENSE ==
|
77
|
+
*
|
78
|
+
* Licensed under the terms of any of the following licenses at your
|
79
|
+
* choice:
|
80
|
+
*
|
81
|
+
* - GNU General Public License Version 2 or later (the "GPL")
|
82
|
+
* http://www.gnu.org/licenses/gpl.html
|
83
|
+
*
|
84
|
+
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
85
|
+
* http://www.gnu.org/licenses/lgpl.html
|
86
|
+
*
|
87
|
+
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
88
|
+
* http://www.mozilla.org/MPL/MPL-1.1.html
|
89
|
+
*
|
90
|
+
* == END LICENSE ==
|
91
|
+
*
|
92
|
+
* This class can be used to interate through nodes inside a range.
|
93
|
+
*
|
94
|
+
* During interation, the provided range can become invalid, due to document
|
95
|
+
* mutations, so CreateBookmark() used to restore it after processing, if
|
96
|
+
* needed.
|
97
|
+
*/
|
98
|
+
|
99
|
+
var FCKHtmlIterator = function( source )
|
100
|
+
{
|
101
|
+
this._sourceHtml = source ;
|
102
|
+
}
|
103
|
+
FCKHtmlIterator.prototype =
|
104
|
+
{
|
105
|
+
Next : function()
|
106
|
+
{
|
107
|
+
var sourceHtml = this._sourceHtml ;
|
108
|
+
if ( sourceHtml == null )
|
109
|
+
return null ;
|
110
|
+
|
111
|
+
var match = FCKRegexLib.HtmlTag.exec( sourceHtml ) ;
|
112
|
+
var isTag = false ;
|
113
|
+
var value = "" ;
|
114
|
+
if ( match )
|
115
|
+
{
|
116
|
+
if ( match.index > 0 )
|
117
|
+
{
|
118
|
+
value = sourceHtml.substr( 0, match.index ) ;
|
119
|
+
this._sourceHtml = sourceHtml.substr( match.index ) ;
|
120
|
+
}
|
121
|
+
else
|
122
|
+
{
|
123
|
+
isTag = true ;
|
124
|
+
value = match[0] ;
|
125
|
+
this._sourceHtml = sourceHtml.substr( match[0].length ) ;
|
126
|
+
}
|
127
|
+
}
|
128
|
+
else
|
129
|
+
{
|
130
|
+
value = sourceHtml ;
|
131
|
+
this._sourceHtml = null ;
|
132
|
+
}
|
133
|
+
return { 'isTag' : isTag, 'value' : value } ;
|
134
|
+
},
|
135
|
+
|
136
|
+
Each : function( func )
|
137
|
+
{
|
138
|
+
var chunk ;
|
139
|
+
while ( ( chunk = this.Next() ) )
|
140
|
+
func( chunk.isTag, chunk.value ) ;
|
141
|
+
}
|
142
|
+
} ;
|
@@ -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
|
*
|
@@ -100,4 +100,4 @@ FCKIcon.prototype.CreateIconElement = function( document )
|
|
100
100
|
eIcon.className = 'TB_Button_Image' ;
|
101
101
|
|
102
102
|
return eIcon ;
|
103
|
-
}
|
103
|
+
}
|