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
|
*
|
@@ -48,6 +48,7 @@ var FCKLanguageManager = FCK.Language =
|
|
48
48
|
fi : 'Finnish',
|
49
49
|
fo : 'Faroese',
|
50
50
|
fr : 'French',
|
51
|
+
'fr-ca' : 'French (Canada)',
|
51
52
|
gl : 'Galician',
|
52
53
|
he : 'Hebrew',
|
53
54
|
hi : 'Hindi',
|
@@ -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
|
*
|
@@ -149,4 +149,4 @@ var FCKListHandler =
|
|
149
149
|
|
150
150
|
return false ;
|
151
151
|
}
|
152
|
-
} ;
|
152
|
+
} ;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
3
|
-
* Copyright (C) 2003-
|
3
|
+
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
4
4
|
*
|
5
5
|
* == BEGIN LICENSE ==
|
6
6
|
*
|
@@ -53,7 +53,10 @@ var FCKListsLib =
|
|
53
53
|
|
54
54
|
// Object elements for the Styles System.
|
55
55
|
StyleObjectElements : { img:1,hr:1,li:1,table:1,tr:1,td:1,embed:1,object:1,ol:1,ul:1 },
|
56
|
-
|
56
|
+
|
57
|
+
// Elements that accept text nodes, but are not possible to edit in the browser.
|
58
|
+
NonEditableElements : { button:1,option:1,script:1,iframe:1,textarea:1,object:1,embed:1,map:1,applet:1 },
|
59
|
+
|
57
60
|
// Elements used to separate block contents.
|
58
61
|
BlockBoundaries : { p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1 },
|
59
62
|
ListBoundaries : { p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1,br:1 }
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
3
|
-
* Copyright (C) 2003-
|
3
|
+
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
4
4
|
*
|
5
5
|
* == BEGIN LICENSE ==
|
6
6
|
*
|
@@ -43,4 +43,4 @@ FCKPlugins.Load = function()
|
|
43
43
|
|
44
44
|
// This is a self destroyable function (must be called once).
|
45
45
|
FCKPlugins.Load = null ;
|
46
|
-
}
|
46
|
+
}
|
@@ -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
|
*
|
@@ -74,6 +74,7 @@ GeckoEntitiesMarker : /#\?-\:/g ,
|
|
74
74
|
// like "thumbnail.php?src=someimage.jpg" (SF-BUG 1554141).
|
75
75
|
ProtectUrlsImg : /<img(?=\s).*?\ssrc=((?:(?:\s*)("|').*?\2)|(?:[^"'][^ >]+))/gi ,
|
76
76
|
ProtectUrlsA : /<a(?=\s).*?\shref=((?:(?:\s*)("|').*?\2)|(?:[^"'][^ >]+))/gi ,
|
77
|
+
ProtectUrlsArea : /<area(?=\s).*?\shref=((?:(?:\s*)("|').*?\2)|(?:[^"'][^ >]+))/gi ,
|
77
78
|
|
78
79
|
Html4DocType : /HTML 4\.0 Transitional/i ,
|
79
80
|
DocTypeTag : /<!DOCTYPE[^>]*>/i ,
|
@@ -92,5 +93,7 @@ InvalidSelfCloseTags : /(<(?!base|meta|link|hr|br|param|img|area|input)([a-zA-Z0
|
|
92
93
|
// name is returned with $2.
|
93
94
|
StyleVariableAttName : /#\(\s*("|')(.+?)\1[^\)]*\s*\)/g,
|
94
95
|
|
95
|
-
RegExp : /^\/(.*)\/([gim]*)
|
96
|
+
RegExp : /^\/(.*)\/([gim]*)$/,
|
97
|
+
|
98
|
+
HtmlTag : /<[^\s<>](?:"[^"]*"|'[^']*'|[^<])*>/
|
96
99
|
} ;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
3
|
-
* Copyright (C) 2003-
|
3
|
+
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
4
4
|
*
|
5
5
|
* == BEGIN LICENSE ==
|
6
6
|
*
|
@@ -21,7 +21,7 @@
|
|
21
21
|
* Active selection functions.
|
22
22
|
*/
|
23
23
|
|
24
|
-
var FCKSelection = FCK.Selection =
|
24
|
+
var FCKSelection = FCK.Selection =
|
25
25
|
{
|
26
26
|
GetParentBlock : function()
|
27
27
|
{
|
@@ -34,7 +34,7 @@ var FCKSelection = FCK.Selection =
|
|
34
34
|
}
|
35
35
|
return retval ;
|
36
36
|
},
|
37
|
-
|
37
|
+
|
38
38
|
ApplyStyle : function( styleDefinition )
|
39
39
|
{
|
40
40
|
FCKStyles.ApplyStyle( new FCKStyle( styleDefinition ) ) ;
|
@@ -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
|
*
|
@@ -30,7 +30,7 @@ FCKSelection.GetType = function()
|
|
30
30
|
// Check if the actual selection is a Control (IMG, TABLE, HR, etc...).
|
31
31
|
|
32
32
|
var sel ;
|
33
|
-
try { sel =
|
33
|
+
try { sel = this.GetSelection() ; } catch (e) {}
|
34
34
|
|
35
35
|
if ( sel && sel.rangeCount == 1 )
|
36
36
|
{
|
@@ -51,27 +51,19 @@ FCKSelection.GetType = function()
|
|
51
51
|
// element (object like and image or a table) is selected.
|
52
52
|
FCKSelection.GetSelectedElement = function()
|
53
53
|
{
|
54
|
-
var
|
54
|
+
var selection = !!FCK.EditorWindow && this.GetSelection() ;
|
55
|
+
if ( !selection || selection.rangeCount < 1 )
|
56
|
+
return null ;
|
55
57
|
|
56
|
-
var
|
58
|
+
var range = selection.getRangeAt( 0 ) ;
|
59
|
+
if ( range.startContainer != range.endContainer || range.startContainer.nodeType != 1 || range.startOffset != range.endOffset - 1 )
|
60
|
+
return null ;
|
57
61
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
selectedElement = selection.anchorNode.childNodes[ selection.anchorOffset ] ;
|
62
|
-
|
63
|
-
// For Safari (Mac only), the anchor node for a control selection is
|
64
|
-
// the control itself, which seams logic. FF and Opera use the parent
|
65
|
-
// as the anchor node, pointing to the control with the offset.
|
66
|
-
// As FF created the selection "standard", Safari would do better by
|
67
|
-
// following their steps.
|
68
|
-
if ( !selectedElement )
|
69
|
-
selectedElement = selection.anchorNode ;
|
70
|
-
else if ( selectedElement.nodeType != 1 )
|
71
|
-
return null ;
|
72
|
-
}
|
62
|
+
var node = range.startContainer.childNodes[ range.startOffset ] ;
|
63
|
+
if ( node.nodeType != 1 )
|
64
|
+
return null ;
|
73
65
|
|
74
|
-
return
|
66
|
+
return node ;
|
75
67
|
}
|
76
68
|
|
77
69
|
FCKSelection.GetParentElement = function()
|
@@ -80,7 +72,7 @@ FCKSelection.GetParentElement = function()
|
|
80
72
|
return FCKSelection.GetSelectedElement().parentNode ;
|
81
73
|
else
|
82
74
|
{
|
83
|
-
var oSel =
|
75
|
+
var oSel = this.GetSelection() ;
|
84
76
|
if ( oSel )
|
85
77
|
{
|
86
78
|
// make the common case fast - for collapsed/nearly collapsed selections just return anchor.parent.
|
@@ -125,7 +117,7 @@ FCKSelection.GetBoundaryParentElement = function( startBoundary )
|
|
125
117
|
return FCKSelection.GetSelectedElement().parentNode ;
|
126
118
|
else
|
127
119
|
{
|
128
|
-
var oSel =
|
120
|
+
var oSel = this.GetSelection() ;
|
129
121
|
if ( oSel && oSel.rangeCount > 0 )
|
130
122
|
{
|
131
123
|
var range = oSel.getRangeAt( startBoundary ? 0 : ( oSel.rangeCount - 1 ) ) ;
|
@@ -143,14 +135,14 @@ FCKSelection.SelectNode = function( element )
|
|
143
135
|
var oRange = FCK.EditorDocument.createRange() ;
|
144
136
|
oRange.selectNode( element ) ;
|
145
137
|
|
146
|
-
var oSel =
|
138
|
+
var oSel = this.GetSelection() ;
|
147
139
|
oSel.removeAllRanges() ;
|
148
140
|
oSel.addRange( oRange ) ;
|
149
141
|
}
|
150
142
|
|
151
143
|
FCKSelection.Collapse = function( toStart )
|
152
144
|
{
|
153
|
-
var oSel =
|
145
|
+
var oSel = this.GetSelection() ;
|
154
146
|
|
155
147
|
if ( toStart == null || toStart === true )
|
156
148
|
oSel.collapseToStart() ;
|
@@ -164,7 +156,7 @@ FCKSelection.HasAncestorNode = function( nodeTagName )
|
|
164
156
|
var oContainer = this.GetSelectedElement() ;
|
165
157
|
if ( ! oContainer && FCK.EditorWindow )
|
166
158
|
{
|
167
|
-
try { oContainer =
|
159
|
+
try { oContainer = this.GetSelection().getRangeAt(0).startContainer ; }
|
168
160
|
catch(e){}
|
169
161
|
}
|
170
162
|
|
@@ -184,7 +176,7 @@ FCKSelection.MoveToAncestorNode = function( nodeTagName )
|
|
184
176
|
|
185
177
|
var oContainer = this.GetSelectedElement() ;
|
186
178
|
if ( ! oContainer )
|
187
|
-
oContainer =
|
179
|
+
oContainer = this.GetSelection().getRangeAt(0).startContainer ;
|
188
180
|
|
189
181
|
while ( oContainer )
|
190
182
|
{
|
@@ -199,7 +191,7 @@ FCKSelection.MoveToAncestorNode = function( nodeTagName )
|
|
199
191
|
FCKSelection.Delete = function()
|
200
192
|
{
|
201
193
|
// Gets the actual selection.
|
202
|
-
var oSel =
|
194
|
+
var oSel = this.GetSelection() ;
|
203
195
|
|
204
196
|
// Deletes the actual selection contents.
|
205
197
|
for ( var i = 0 ; i < oSel.rangeCount ; i++ )
|
@@ -209,3 +201,20 @@ FCKSelection.Delete = function()
|
|
209
201
|
|
210
202
|
return oSel ;
|
211
203
|
}
|
204
|
+
|
205
|
+
/**
|
206
|
+
* Returns the native selection object.
|
207
|
+
*/
|
208
|
+
FCKSelection.GetSelection = function()
|
209
|
+
{
|
210
|
+
return FCK.EditorWindow.getSelection() ;
|
211
|
+
}
|
212
|
+
|
213
|
+
// The following are IE only features (we don't need then in other browsers
|
214
|
+
// currently).
|
215
|
+
FCKSelection.Save = function()
|
216
|
+
{}
|
217
|
+
FCKSelection.Restore = function()
|
218
|
+
{}
|
219
|
+
FCKSelection.Release = function()
|
220
|
+
{}
|
@@ -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
|
*
|
@@ -28,11 +28,11 @@ FCKSelection.GetType = function()
|
|
28
28
|
// So we'd better check the object returned by createRange() rather than by looking at the type.
|
29
29
|
try
|
30
30
|
{
|
31
|
-
var ieType =
|
31
|
+
var ieType = FCKSelection.GetSelection().type ;
|
32
32
|
if ( ieType == 'Control' || ieType == 'Text' )
|
33
33
|
return ieType ;
|
34
34
|
|
35
|
-
if (
|
35
|
+
if ( this.GetSelection().createRange().parentElement )
|
36
36
|
return 'Text' ;
|
37
37
|
}
|
38
38
|
catch(e)
|
@@ -49,10 +49,10 @@ FCKSelection.GetSelectedElement = function()
|
|
49
49
|
{
|
50
50
|
if ( this.GetType() == 'Control' )
|
51
51
|
{
|
52
|
-
var oRange =
|
52
|
+
var oRange = this.GetSelection().createRange() ;
|
53
53
|
|
54
54
|
if ( oRange && oRange.item )
|
55
|
-
return
|
55
|
+
return this.GetSelection().createRange().item(0) ;
|
56
56
|
}
|
57
57
|
return null ;
|
58
58
|
} ;
|
@@ -69,7 +69,7 @@ FCKSelection.GetParentElement = function()
|
|
69
69
|
return null ;
|
70
70
|
|
71
71
|
default :
|
72
|
-
return
|
72
|
+
return this.GetSelection().createRange().parentElement() ;
|
73
73
|
}
|
74
74
|
} ;
|
75
75
|
|
@@ -86,12 +86,12 @@ FCKSelection.GetBoundaryParentElement = function( startBoundary )
|
|
86
86
|
|
87
87
|
default :
|
88
88
|
var doc = FCK.EditorDocument ;
|
89
|
-
|
89
|
+
|
90
90
|
var range = doc.selection.createRange() ;
|
91
91
|
range.collapse( startBoundary !== false ) ;
|
92
|
-
|
92
|
+
|
93
93
|
var el = range.parentElement() ;
|
94
|
-
|
94
|
+
|
95
95
|
// It may happen that range is comming from outside "doc", so we
|
96
96
|
// must check it (#1204).
|
97
97
|
return FCKTools.GetElementDocument( el ) == doc ? el : null ;
|
@@ -101,7 +101,7 @@ FCKSelection.GetBoundaryParentElement = function( startBoundary )
|
|
101
101
|
FCKSelection.SelectNode = function( node )
|
102
102
|
{
|
103
103
|
FCK.Focus() ;
|
104
|
-
|
104
|
+
this.GetSelection().empty() ;
|
105
105
|
var oRange ;
|
106
106
|
try
|
107
107
|
{
|
@@ -124,7 +124,7 @@ FCKSelection.Collapse = function( toStart )
|
|
124
124
|
FCK.Focus() ;
|
125
125
|
if ( this.GetType() == 'Text' )
|
126
126
|
{
|
127
|
-
var oRange =
|
127
|
+
var oRange = this.GetSelection().createRange() ;
|
128
128
|
oRange.collapse( toStart == null || toStart === true ) ;
|
129
129
|
oRange.select() ;
|
130
130
|
}
|
@@ -135,13 +135,13 @@ FCKSelection.HasAncestorNode = function( nodeTagName )
|
|
135
135
|
{
|
136
136
|
var oContainer ;
|
137
137
|
|
138
|
-
if (
|
138
|
+
if ( this.GetSelection().type == "Control" )
|
139
139
|
{
|
140
140
|
oContainer = this.GetSelectedElement() ;
|
141
141
|
}
|
142
142
|
else
|
143
143
|
{
|
144
|
-
var oRange =
|
144
|
+
var oRange = this.GetSelection().createRange() ;
|
145
145
|
oContainer = oRange.parentElement() ;
|
146
146
|
}
|
147
147
|
|
@@ -162,9 +162,9 @@ FCKSelection.MoveToAncestorNode = function( nodeTagName )
|
|
162
162
|
if ( ! FCK.EditorDocument )
|
163
163
|
return null ;
|
164
164
|
|
165
|
-
if (
|
165
|
+
if ( this.GetSelection().type == "Control" )
|
166
166
|
{
|
167
|
-
oRange =
|
167
|
+
oRange = this.GetSelection().createRange() ;
|
168
168
|
for ( i = 0 ; i < oRange.length ; i++ )
|
169
169
|
{
|
170
170
|
if (oRange(i).parentNode)
|
@@ -176,7 +176,7 @@ FCKSelection.MoveToAncestorNode = function( nodeTagName )
|
|
176
176
|
}
|
177
177
|
else
|
178
178
|
{
|
179
|
-
oRange =
|
179
|
+
oRange = this.GetSelection().createRange() ;
|
180
180
|
oNode = oRange.parentElement() ;
|
181
181
|
}
|
182
182
|
|
@@ -189,7 +189,7 @@ FCKSelection.MoveToAncestorNode = function( nodeTagName )
|
|
189
189
|
FCKSelection.Delete = function()
|
190
190
|
{
|
191
191
|
// Gets the actual selection.
|
192
|
-
var oSel =
|
192
|
+
var oSel = this.GetSelection() ;
|
193
193
|
|
194
194
|
// Deletes the actual selection contents.
|
195
195
|
if ( oSel.type.toLowerCase() != "none" )
|
@@ -199,3 +199,77 @@ FCKSelection.Delete = function()
|
|
199
199
|
|
200
200
|
return oSel ;
|
201
201
|
} ;
|
202
|
+
|
203
|
+
/**
|
204
|
+
* Returns the native selection object.
|
205
|
+
*/
|
206
|
+
FCKSelection.GetSelection = function()
|
207
|
+
{
|
208
|
+
this.Restore() ;
|
209
|
+
return FCK.EditorDocument.selection ;
|
210
|
+
}
|
211
|
+
|
212
|
+
FCKSelection.Save = function()
|
213
|
+
{
|
214
|
+
// Ensures the editor has the selection focus. (#1801)
|
215
|
+
FCK.Focus() ;
|
216
|
+
|
217
|
+
var editorDocument = FCK.EditorDocument ;
|
218
|
+
|
219
|
+
if ( !editorDocument )
|
220
|
+
return ;
|
221
|
+
|
222
|
+
var selection = editorDocument.selection ;
|
223
|
+
var range ;
|
224
|
+
|
225
|
+
if ( selection )
|
226
|
+
{
|
227
|
+
range = selection.createRange() ;
|
228
|
+
|
229
|
+
// Ensure that the range comes from the editor document.
|
230
|
+
if ( range )
|
231
|
+
{
|
232
|
+
if ( range.parentElement && FCKTools.GetElementDocument( range.parentElement() ) != editorDocument )
|
233
|
+
range = null ;
|
234
|
+
else if ( range.item && FCKTools.GetElementDocument( range.item(0) )!= editorDocument )
|
235
|
+
range = null ;
|
236
|
+
}
|
237
|
+
}
|
238
|
+
|
239
|
+
this.SelectionData = range ;
|
240
|
+
}
|
241
|
+
|
242
|
+
FCKSelection._GetSelectionDocument = function( selection )
|
243
|
+
{
|
244
|
+
var range = selection.createRange() ;
|
245
|
+
if ( !range )
|
246
|
+
return null;
|
247
|
+
else if ( range.item )
|
248
|
+
return FCKTools.GetElementDocument( range.item( 0 ) ) ;
|
249
|
+
else
|
250
|
+
return FCKTools.GetElementDocument( range.parentElement() ) ;
|
251
|
+
}
|
252
|
+
|
253
|
+
FCKSelection.Restore = function()
|
254
|
+
{
|
255
|
+
if ( this.SelectionData )
|
256
|
+
{
|
257
|
+
FCK.IsSelectionChangeLocked = true ;
|
258
|
+
|
259
|
+
try
|
260
|
+
{
|
261
|
+
// Don't repeat the restore process if the editor document is already selected.
|
262
|
+
if ( this._GetSelectionDocument( FCK.EditorDocument.selection ) == FCK.EditorDocument )
|
263
|
+
return ;
|
264
|
+
this.SelectionData.select() ;
|
265
|
+
}
|
266
|
+
catch ( e ) {}
|
267
|
+
|
268
|
+
FCK.IsSelectionChangeLocked = false ;
|
269
|
+
}
|
270
|
+
}
|
271
|
+
|
272
|
+
FCKSelection.Release = function()
|
273
|
+
{
|
274
|
+
delete this.SelectionData ;
|
275
|
+
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
3
|
-
* Copyright (C) 2003-
|
3
|
+
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
4
4
|
*
|
5
5
|
* == BEGIN LICENSE ==
|
6
6
|
*
|
@@ -37,7 +37,7 @@ var FCKStyles = FCK.Styles =
|
|
37
37
|
style.ApplyToObject( FCKSelection.GetSelectedElement() ) ;
|
38
38
|
else
|
39
39
|
style.ApplyToSelection( FCK.EditorWindow ) ;
|
40
|
-
|
40
|
+
|
41
41
|
FCK.Events.FireEvent( 'OnSelectionChange' ) ;
|
42
42
|
}
|
43
43
|
},
|
@@ -88,7 +88,7 @@ var FCKStyles = FCK.Styles =
|
|
88
88
|
var style = styles[ styleName ] ;
|
89
89
|
var state = style.CheckActive( path ) ;
|
90
90
|
|
91
|
-
if ( style._LastState
|
91
|
+
if ( state != ( style._LastState || null ) )
|
92
92
|
{
|
93
93
|
style._LastState = state ;
|
94
94
|
|
@@ -210,6 +210,8 @@ var FCKStyles = FCK.Styles =
|
|
210
210
|
// Remove elements nodes that match with this style rules.
|
211
211
|
if ( tagsRegex.test( currentNode.nodeName ) )
|
212
212
|
FCKDomTools.RemoveNode( currentNode, true ) ;
|
213
|
+
else
|
214
|
+
FCKDomTools.RemoveAttributes( currentNode, FCKConfig.RemoveAttributesArray );
|
213
215
|
|
214
216
|
currentNode = nextNode ;
|
215
217
|
}
|
@@ -218,7 +220,7 @@ var FCKStyles = FCK.Styles =
|
|
218
220
|
|
219
221
|
FCK.Events.FireEvent( 'OnSelectionChange' ) ;
|
220
222
|
},
|
221
|
-
|
223
|
+
|
222
224
|
GetStyle : function( styleName )
|
223
225
|
{
|
224
226
|
return this.GetStyles()[ styleName ] ;
|
@@ -229,14 +231,14 @@ var FCKStyles = FCK.Styles =
|
|
229
231
|
var styles = this._GetStyles ;
|
230
232
|
if ( !styles )
|
231
233
|
{
|
232
|
-
styles = this._GetStyles = FCKTools.Merge(
|
234
|
+
styles = this._GetStyles = FCKTools.Merge(
|
233
235
|
this._LoadStylesCore(),
|
234
236
|
this._LoadStylesCustom(),
|
235
237
|
this._LoadStylesXml() ) ;
|
236
238
|
}
|
237
239
|
return styles ;
|
238
240
|
},
|
239
|
-
|
241
|
+
|
240
242
|
CheckHasObjectStyle : function( elementName )
|
241
243
|
{
|
242
244
|
return !!this._ObjectStyles[ elementName ] ;
|
@@ -264,7 +266,10 @@ var FCKStyles = FCK.Styles =
|
|
264
266
|
if ( styleDefs )
|
265
267
|
{
|
266
268
|
for ( var styleName in styleDefs )
|
267
|
-
|
269
|
+
{
|
270
|
+
var style = styles[ styleName ] = new FCKStyle( styleDefs[ styleName ] ) ;
|
271
|
+
style.Name = styleName ;
|
272
|
+
}
|
268
273
|
}
|
269
274
|
|
270
275
|
return styles ;
|
@@ -282,12 +287,16 @@ var FCKStyles = FCK.Styles =
|
|
282
287
|
// Load the XML file into a FCKXml object.
|
283
288
|
var xml = new FCKXml() ;
|
284
289
|
xml.LoadUrl( stylesXmlPath ) ;
|
285
|
-
|
290
|
+
|
286
291
|
var stylesXmlObj = FCKXml.TransformToObject( xml.SelectSingleNode( 'Styles' ) ) ;
|
287
292
|
|
288
293
|
// Get the "Style" nodes defined in the XML file.
|
289
294
|
var styleNodes = stylesXmlObj.$Style ;
|
290
295
|
|
296
|
+
// Check that it did contain some valid nodes
|
297
|
+
if ( !styleNodes )
|
298
|
+
return styles ;
|
299
|
+
|
291
300
|
// Add each style to our "Styles" collection.
|
292
301
|
for ( var i = 0 ; i < styleNodes.length ; i++ )
|
293
302
|
{
|
@@ -325,16 +334,16 @@ var FCKStyles = FCK.Styles =
|
|
325
334
|
|
326
335
|
// Load override definitions.
|
327
336
|
var cssStyleOverrideNodes = styleNode.$Override ;
|
328
|
-
if ( cssStyleOverrideNodes )
|
337
|
+
if ( cssStyleOverrideNodes )
|
329
338
|
{
|
330
339
|
for ( j = 0 ; j < cssStyleOverrideNodes.length ; j++ )
|
331
340
|
{
|
332
341
|
var overrideNode = cssStyleOverrideNodes[j] ;
|
333
|
-
var overrideDef =
|
342
|
+
var overrideDef =
|
334
343
|
{
|
335
344
|
Element : overrideNode.element
|
336
345
|
} ;
|
337
|
-
|
346
|
+
|
338
347
|
var overrideAttNode = overrideNode.$Attribute ;
|
339
348
|
if ( overrideAttNode )
|
340
349
|
{
|
@@ -352,14 +361,14 @@ var FCKStyles = FCK.Styles =
|
|
352
361
|
overrideDef.Attributes[ overrideAttNode[k].name ] = overrideAttValue ;
|
353
362
|
}
|
354
363
|
}
|
355
|
-
|
364
|
+
|
356
365
|
styleDef.Overrides.push( overrideDef ) ;
|
357
366
|
}
|
358
367
|
}
|
359
368
|
|
360
369
|
var style = new FCKStyle( styleDef ) ;
|
361
370
|
style.Name = styleNode.name || element ;
|
362
|
-
|
371
|
+
|
363
372
|
if ( style.GetType() == FCK_STYLE_OBJECT )
|
364
373
|
this._ObjectStyles[ element ] = true ;
|
365
374
|
|