typo 5.0.3.98.1 → 5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES-5.1 +54 -0
- data/app/apis/meta_weblog_service.rb +7 -6
- data/app/controllers/accounts_controller.rb +2 -1
- data/app/controllers/admin/content_controller.rb +45 -3
- data/app/controllers/admin/pages_controller.rb +1 -1
- data/app/controllers/admin/textfilters_controller.rb +4 -4
- data/app/controllers/admin/users_controller.rb +14 -2
- data/app/controllers/application.rb +4 -1
- data/app/controllers/articles_controller.rb +1 -3
- data/app/controllers/backend_controller.rb +2 -0
- data/app/controllers/comments_controller.rb +6 -0
- data/app/helpers/admin/base_helper.rb +24 -26
- data/app/helpers/admin/feedback_helper.rb +0 -20
- data/app/helpers/application_helper.rb +1 -0
- data/app/models/article.rb +2 -0
- data/app/models/blog.rb +1 -0
- data/app/models/blog_sweeper.rb +8 -9
- data/app/models/page_cache.rb +1 -0
- data/app/models/tag.rb +2 -2
- data/app/models/user.rb +5 -1
- data/app/views/admin/blacklist/destroy.html.erb +1 -1
- data/app/views/admin/categories/destroy.html.erb +1 -1
- data/app/views/admin/comments/destroy.html.erb +1 -1
- data/app/views/admin/content/_articles.html.erb +4 -4
- data/app/views/admin/content/_attachment.html.erb +6 -7
- data/app/views/admin/content/_drafts.html.erb +6 -0
- data/app/views/admin/content/_form.html.erb +47 -34
- data/app/views/admin/content/destroy.html.erb +1 -1
- data/app/views/admin/content/edit.html.erb +1 -1
- data/app/views/admin/content/index.html.erb +1 -6
- data/app/views/admin/content/new.html.erb +1 -1
- data/app/views/admin/pages/_form.html.erb +4 -3
- data/app/views/admin/pages/_pages.html.erb +3 -3
- data/app/views/admin/pages/destroy.html.erb +1 -1
- data/app/views/admin/resources/destroy.html.erb +1 -1
- data/app/views/admin/settings/index.html.erb +10 -0
- data/app/views/admin/shared/_edit.html.erb +1 -6
- data/app/views/admin/textfilters/destroy.html.erb +3 -0
- data/app/views/admin/textfilters/edit.html.erb +3 -1
- data/app/views/admin/textfilters/index.html.erb +1 -1
- data/app/views/admin/textfilters/new.html.erb +3 -1
- data/app/views/admin/trackbacks/show.html.erb +1 -1
- data/app/views/admin/users/destroy.html.erb +1 -1
- data/app/views/admin/users/edit.html.erb +1 -5
- data/app/views/admin/users/index.html.erb +1 -1
- data/app/views/articles/_comment_failed.html.erb +3 -0
- data/config/initializers/access_rules.rb +3 -3
- data/db/migrate/070_add_users_to_non_admins.rb +17 -0
- data/installer/rails_installer_defaults.yml +1 -1
- data/lib/tasks/release.rake +3 -3
- data/lib/typo_version.rb +1 -1
- data/public/images/admin/cancel.png +0 -0
- data/public/images/admin/checked.png +0 -0
- data/public/images/admin/delete.png +0 -0
- data/public/images/admin/edit.png +0 -0
- data/public/images/admin/show.png +0 -0
- data/public/javascripts/controls.js +2 -0
- data/public/javascripts/dragdrop.js +2 -0
- data/public/javascripts/effects.js +6 -4
- data/public/javascripts/fckeditor/editor/_source/classes/fckcontextmenu.js +13 -8
- data/public/javascripts/fckeditor/editor/_source/classes/fckdataprocessor.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckdocumentfragment_gecko.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckdocumentfragment_ie.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange.js +189 -79
- data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange_gecko.js +4 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange_ie.js +16 -15
- data/public/javascripts/fckeditor/editor/_source/classes/fckdomrangeiterator.js +30 -9
- data/public/javascripts/fckeditor/editor/_source/classes/fckeditingarea.js +108 -90
- data/public/javascripts/fckeditor/editor/_source/classes/fckelementpath.js +22 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fckenterkey.js +76 -38
- data/public/javascripts/fckeditor/editor/_source/classes/fckevents.js +7 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckhtmliterator.js +142 -0
- data/public/javascripts/fckeditor/editor/_source/classes/fckicon.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckiecleanup.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fckimagepreloader.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckkeystrokehandler.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fckmenublock.js +8 -5
- data/public/javascripts/fckeditor/editor/_source/classes/fckmenublockpanel.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fckmenuitem.js +6 -5
- data/public/javascripts/fckeditor/editor/_source/classes/fckpanel.js +85 -38
- data/public/javascripts/fckeditor/editor/_source/classes/fckplugin.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckspecialcombo.js +7 -8
- data/public/javascripts/fckeditor/editor/_source/classes/fckstyle.js +180 -17
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbar.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbreak_gecko.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbreak_ie.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbutton.js +9 -4
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbuttonui.js +5 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontformatcombo.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontscombo.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontsizecombo.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarpanelbutton.js +15 -4
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarspecialcombo.js +5 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarstylecombo.js +13 -13
- data/public/javascripts/fckeditor/editor/_source/classes/fckw3crange.js +17 -13
- data/public/javascripts/fckeditor/editor/_source/classes/fckxml.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckxml_gecko.js +28 -13
- data/public/javascripts/fckeditor/editor/_source/classes/fckxml_ie.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fck_othercommands.js +75 -19
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckblockquotecommand.js +64 -8
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckcorestylecommand.js +3 -1
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckfitwindow.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckindentcommands.js +5 -3
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckjustifycommands.js +6 -6
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fcklistcommands.js +4 -4
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fcknamedcommand.js +3 -1
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js +3 -1
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckremoveformatcommand.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckshowblocks.js +7 -9
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_gecko.js +4 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_ie.js +4 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckstylecommand.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fcktablecommand.js +4 -4
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js +28 -10
- data/public/javascripts/fckeditor/editor/_source/fckconstants.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/fckeditorapi.js +21 -13
- data/public/javascripts/fckeditor/editor/_source/fckjscoreextensions.js +5 -5
- data/public/javascripts/fckeditor/editor/_source/fckscriptloader.js +4 -4
- data/public/javascripts/fckeditor/editor/_source/internals/fck.js +148 -38
- data/public/javascripts/fckeditor/editor/_source/internals/fck_contextmenu.js +4 -4
- data/public/javascripts/fckeditor/editor/_source/internals/fck_gecko.js +45 -47
- data/public/javascripts/fckeditor/editor/_source/internals/fck_ie.js +50 -17
- data/public/javascripts/fckeditor/editor/_source/internals/fckbrowserinfo.js +4 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckcodeformatter.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckcommands.js +28 -28
- data/public/javascripts/fckeditor/editor/_source/internals/fckconfig.js +12 -13
- data/public/javascripts/fckeditor/editor/_source/internals/fckdebug.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckdialog.js +211 -15
- data/public/javascripts/fckeditor/editor/_source/internals/fckdocumentprocessor.js +63 -39
- data/public/javascripts/fckeditor/editor/_source/internals/fckdomtools.js +177 -37
- data/public/javascripts/fckeditor/editor/_source/internals/fcklanguagemanager.js +2 -1
- data/public/javascripts/fckeditor/editor/_source/internals/fcklisthandler.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fcklistslib.js +5 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckplugins.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckregexlib.js +5 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckselection.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/internals/fckselection_gecko.js +36 -27
- data/public/javascripts/fckeditor/editor/_source/internals/fckselection_ie.js +91 -17
- data/public/javascripts/fckeditor/editor/_source/internals/fckstyles.js +22 -13
- data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler.js +15 -15
- data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler_gecko.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler_ie.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fcktoolbaritems.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/internals/fcktoolbarset.js +32 -6
- data/public/javascripts/fckeditor/editor/_source/internals/fcktools.js +181 -22
- data/public/javascripts/fckeditor/editor/_source/internals/fcktools_gecko.js +19 -7
- data/public/javascripts/fckeditor/editor/_source/internals/fcktools_ie.js +8 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckundo.js +8 -5
- data/public/javascripts/fckeditor/editor/_source/internals/fckurlparams.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml.js +116 -61
- data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml_gecko.js +6 -10
- data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml_ie.js +51 -56
- data/public/javascripts/fckeditor/editor/_source/internals/fckxhtmlentities.js +1 -1
- data/public/javascripts/fckeditor/editor/css/fck_editorarea.css +3 -2
- data/public/javascripts/fckeditor/editor/css/fck_internal.css +19 -2
- data/public/javascripts/fckeditor/editor/css/fck_showtableborders_gecko.css +8 -1
- data/public/javascripts/fckeditor/editor/css/images/fck_plugin.gif +0 -0
- data/public/javascripts/fckeditor/editor/dialog/common/fck_dialog_common.css +8 -1
- data/public/javascripts/fckeditor/editor/dialog/common/fck_dialog_common.js +199 -26
- data/public/javascripts/fckeditor/editor/dialog/fck_about.html +20 -14
- data/public/javascripts/fckeditor/editor/dialog/fck_about/sponsors/spellchecker_net.gif +0 -0
- data/public/javascripts/fckeditor/editor/dialog/fck_anchor.html +15 -10
- data/public/javascripts/fckeditor/editor/dialog/fck_button.html +9 -14
- data/public/javascripts/fckeditor/editor/dialog/fck_checkbox.html +8 -13
- data/public/javascripts/fckeditor/editor/dialog/fck_colorselector.html +4 -3
- data/public/javascripts/fckeditor/editor/dialog/fck_docprops.html +6 -6
- data/public/javascripts/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html +1 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_flash.html +9 -3
- data/public/javascripts/fckeditor/editor/dialog/fck_flash/fck_flash.js +18 -11
- data/public/javascripts/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html +7 -3
- data/public/javascripts/fckeditor/editor/dialog/fck_form.html +7 -4
- data/public/javascripts/fckeditor/editor/dialog/fck_hiddenfield.html +12 -15
- data/public/javascripts/fckeditor/editor/dialog/fck_image.html +9 -3
- data/public/javascripts/fckeditor/editor/dialog/fck_image/fck_image.js +24 -12
- data/public/javascripts/fckeditor/editor/dialog/fck_image/fck_image_preview.html +24 -18
- data/public/javascripts/fckeditor/editor/dialog/fck_link.html +1 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_link/fck_link.js +41 -20
- data/public/javascripts/fckeditor/editor/dialog/fck_listprop.html +8 -4
- data/public/javascripts/fckeditor/editor/dialog/fck_paste.html +53 -54
- data/public/javascripts/fckeditor/editor/dialog/fck_radiobutton.html +8 -13
- data/public/javascripts/fckeditor/editor/dialog/fck_replace.html +157 -79
- data/public/javascripts/fckeditor/editor/dialog/fck_select.html +14 -11
- data/public/javascripts/fckeditor/editor/dialog/fck_select/fck_select.js +2 -2
- data/public/javascripts/fckeditor/editor/dialog/fck_smiley.html +9 -4
- data/public/javascripts/fckeditor/editor/dialog/fck_source.html +5 -2
- data/public/javascripts/fckeditor/editor/dialog/fck_specialchar.html +9 -6
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages.html +2 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm +3 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php +5 -2
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl +2 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js +0 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css +1 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_table.html +10 -5
- data/public/javascripts/fckeditor/editor/dialog/fck_tablecell.html +8 -6
- data/public/javascripts/fckeditor/editor/dialog/fck_template.html +1 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_textarea.html +10 -11
- data/public/javascripts/fckeditor/editor/dialog/fck_textfield.html +10 -14
- data/public/javascripts/fckeditor/editor/dtd/fck_dtd_test.html +0 -2
- data/public/javascripts/fckeditor/editor/dtd/fck_xhtml10strict.js +2 -2
- data/public/javascripts/fckeditor/editor/dtd/fck_xhtml10transitional.js +3 -3
- data/public/javascripts/fckeditor/editor/fckdebug.html +1 -1
- data/public/javascripts/fckeditor/editor/fckdialog.html +660 -213
- data/public/javascripts/fckeditor/editor/fckeditor.html +66 -16
- data/public/javascripts/fckeditor/editor/fckeditor.original.html +70 -16
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/browser.css +2 -2
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/browser.html +37 -2
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmactualfolder.html +33 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html +1 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmfolders.html +2 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmresourceslist.html +3 -2
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmresourcetype.html +1 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmupload.html +2 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/js/common.js +34 -2
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/js/fckxml.js +3 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/aspx/connector.aspx +5 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/aspx/upload.aspx +5 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/basexml.pl +1 -1
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/commands.pl +50 -4
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/connector.cgi +2 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/io.pl +14 -4
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/upload.cgi +2 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/upload_fck.pl +23 -4
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/util.pl +1 -1
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/config.py +43 -32
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/connector.py +16 -16
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckcommands.py +26 -9
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckconnector.py +2 -2
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckoutput.py +40 -9
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckutil.py +20 -21
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/htaccess.txt +2 -2
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/upload.py +13 -13
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/wsgi.py +3 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/zope.py +4 -5
- data/public/javascripts/fckeditor/editor/filemanager/connectors/test.html +34 -1
- data/public/javascripts/fckeditor/editor/filemanager/connectors/uploadtest.html +47 -4
- data/public/javascripts/fckeditor/editor/js/fckadobeair.js +176 -0
- data/public/javascripts/fckeditor/editor/js/fckeditorcode_gecko.js +77 -77
- data/public/javascripts/fckeditor/editor/js/fckeditorcode_ie.js +74 -74
- data/public/javascripts/fckeditor/editor/lang/_translationstatus.txt +55 -54
- data/public/javascripts/fckeditor/editor/lang/af.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ar.js +16 -17
- data/public/javascripts/fckeditor/editor/lang/bg.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/bn.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/bs.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ca.js +27 -28
- data/public/javascripts/fckeditor/editor/lang/cs.js +18 -19
- data/public/javascripts/fckeditor/editor/lang/da.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/de.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/el.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/en-au.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/en-ca.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/en-uk.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/en.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/eo.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/es.js +34 -35
- data/public/javascripts/fckeditor/editor/lang/et.js +32 -33
- data/public/javascripts/fckeditor/editor/lang/eu.js +32 -33
- data/public/javascripts/fckeditor/editor/lang/fa.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/fi.js +15 -16
- data/public/javascripts/fckeditor/editor/lang/fo.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/fr-ca.js +515 -0
- data/public/javascripts/fckeditor/editor/lang/fr.js +5 -6
- data/public/javascripts/fckeditor/editor/lang/gl.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/he.js +15 -16
- data/public/javascripts/fckeditor/editor/lang/hi.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/hr.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/hu.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/it.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ja.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/km.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ko.js +25 -26
- data/public/javascripts/fckeditor/editor/lang/lt.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/lv.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/mn.js +199 -200
- data/public/javascripts/fckeditor/editor/lang/ms.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/nb.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/nl.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/no.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/pl.js +51 -52
- data/public/javascripts/fckeditor/editor/lang/pt-br.js +16 -17
- data/public/javascripts/fckeditor/editor/lang/pt.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ro.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ru.js +31 -32
- data/public/javascripts/fckeditor/editor/lang/sk.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/sl.js +39 -40
- data/public/javascripts/fckeditor/editor/lang/sr-latn.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/sr.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/sv.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/th.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/tr.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/uk.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/vi.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/zh-cn.js +2 -3
- data/public/javascripts/fckeditor/editor/lang/zh.js +1 -2
- data/public/javascripts/fckeditor/editor/plugins/autogrow/fckplugin.js +9 -2
- data/public/javascripts/fckeditor/editor/plugins/bbcode/_sample/sample.config.js +1 -1
- data/public/javascripts/fckeditor/editor/plugins/bbcode/_sample/sample.html +1 -1
- data/public/javascripts/fckeditor/editor/plugins/bbcode/fckplugin.js +2 -2
- data/public/javascripts/fckeditor/editor/plugins/dragresizetable/fckplugin.js +35 -11
- data/public/javascripts/fckeditor/editor/plugins/placeholder/fck_placeholder.html +10 -5
- data/public/javascripts/fckeditor/editor/plugins/placeholder/fckplugin.js +3 -3
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/de.js +2 -2
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/en.js +2 -2
- data/public/javascripts/fckeditor/editor/{filemanager/connectors/cfm/upload.cfm → plugins/placeholder/lang/es.js} +9 -13
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/fr.js +1 -1
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/it.js +1 -1
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/pl.js +2 -2
- data/public/javascripts/fckeditor/editor/plugins/simplecommands/fckplugin.js +1 -1
- data/public/javascripts/fckeditor/editor/plugins/tablecommands/fckplugin.js +1 -1
- data/public/javascripts/fckeditor/editor/skins/_fckviewstrips.html +1 -1
- data/public/javascripts/fckeditor/editor/skins/default/fck_dialog.css +271 -8
- data/public/javascripts/fckeditor/editor/skins/default/fck_editor.css +2 -2
- data/public/javascripts/fckeditor/editor/skins/office2003/fck_dialog.css +270 -8
- data/public/javascripts/fckeditor/editor/skins/office2003/fck_editor.css +2 -2
- data/public/javascripts/fckeditor/editor/skins/silver/fck_dialog.css +270 -11
- data/public/javascripts/fckeditor/editor/skins/silver/fck_editor.css +2 -2
- data/public/javascripts/fckeditor/fckconfig.js +58 -55
- data/public/javascripts/fckeditor/fckeditor.js +99 -8
- data/public/javascripts/fckeditor/fckeditor.py +2 -4
- data/public/javascripts/fckeditor/fckpackager.xml +12 -12
- data/public/javascripts/fckeditor/fckstyles.xml +2 -5
- data/public/javascripts/fckeditor/fcktemplates.xml +1 -1
- data/public/javascripts/fckeditor/license.txt +1 -2
- data/public/javascripts/prototype.js +46 -101
- data/public/javascripts/scriptaculous.js +28 -17
- data/public/stylesheets/administration.css +5 -1
- data/themes/dirtylicious/about.markdown +3 -0
- data/themes/dirtylicious/images/body.jpg +0 -0
- data/themes/dirtylicious/images/container.jpg +0 -0
- data/themes/dirtylicious/images/gravatar.gif +0 -0
- data/themes/dirtylicious/images/header.jpg +0 -0
- data/themes/dirtylicious/images/li.gif +0 -0
- data/themes/dirtylicious/images/main.gif +0 -0
- data/themes/dirtylicious/images/nav.gif +0 -0
- data/themes/dirtylicious/images/quote.gif +0 -0
- data/themes/dirtylicious/images/spinner.gif +0 -0
- data/themes/dirtylicious/layouts/default.html.erb +60 -0
- data/themes/dirtylicious/preview.png +0 -0
- data/themes/dirtylicious/stylesheets/application.css +327 -0
- data/themes/dirtylicious/views/articles/_article.html.erb +33 -0
- data/themes/dirtylicious/views/articles/_comment.html.erb +14 -0
- data/themes/dirtylicious/views/articles/_comment_form.html.erb +37 -0
- data/themes/dirtylicious/views/articles/_comment_list.html.erb +7 -0
- data/themes/dirtylicious/views/articles/_trackback.html.erb +9 -0
- data/themes/dirtylicious/views/articles/comment_preview.html.erb +10 -0
- data/themes/dirtylicious/views/articles/index.html.erb +5 -0
- data/themes/dirtylicious/views/articles/read.html.erb +42 -0
- data/themes/dirtylicious/views/shared/_search.html.erb +16 -0
- data/themes/standard_issue/about.markdown +5 -0
- data/themes/standard_issue/images/img01.gif +0 -0
- data/themes/standard_issue/images/img02.gif +0 -0
- data/themes/standard_issue/images/img03.gif +0 -0
- data/themes/standard_issue/images/img04.jpg +0 -0
- data/themes/standard_issue/images/img05.gif +0 -0
- data/themes/standard_issue/images/img06.gif +0 -0
- data/themes/standard_issue/images/img07.gif +0 -0
- data/themes/standard_issue/images/img08.gif +0 -0
- data/themes/standard_issue/images/img09.gif +0 -0
- data/themes/standard_issue/images/img10.gif +0 -0
- data/themes/standard_issue/images/spacer.gif +0 -0
- data/themes/standard_issue/images/spinner.gif +0 -0
- data/themes/standard_issue/layouts/default.html.erb +59 -0
- data/themes/standard_issue/preview.png +0 -0
- data/themes/standard_issue/stylesheets/application.css +461 -0
- data/themes/standard_issue/views/articles/_article.html.erb +37 -0
- data/themes/standard_issue/views/articles/_comment.html.erb +12 -0
- data/themes/standard_issue/views/articles/_comment_form.html.erb +48 -0
- data/themes/standard_issue/views/articles/_comment_list.html.erb +7 -0
- data/themes/standard_issue/views/articles/_trackback.html.erb +9 -0
- data/themes/standard_issue/views/articles/comment_preview.html.erb +10 -0
- data/themes/standard_issue/views/articles/index.html.erb +5 -0
- data/themes/standard_issue/views/articles/read.html.erb +42 -0
- data/themes/standard_issue/views/shared/_search.html.erb +17 -0
- data/themes/standard_issue/views/theme/static_view_test.html.erb +1 -0
- data/themes/typographic/images/accept.gif +0 -0
- data/themes/typographic/images/accept50.gif +0 -0
- data/themes/typographic/images/bg_white.gif +0 -0
- data/themes/typographic/images/bg_wrapper.gif +0 -0
- data/themes/typographic/images/bullet_bottom.gif +0 -0
- data/themes/typographic/images/bullet_right.gif +0 -0
- data/themes/typographic/images/email_open.gif +0 -0
- data/themes/typographic/images/email_open50.gif +0 -0
- data/themes/typographic/images/meta.gif +0 -0
- data/themes/typographic/images/page_edit.gif +0 -0
- data/themes/typographic/images/page_edit50.gif +0 -0
- data/themes/typographic/images/spinner.gif +0 -0
- data/themes/typographic/images/tag.gif +0 -0
- data/themes/typographic/images/user.gif +0 -0
- data/themes/typographic/images/user50.gif +0 -0
- data/themes/typographic/images/world_link.gif +0 -0
- data/themes/typographic/images/world_link50.gif +0 -0
- data/themes/typographic/layouts/default.html.erb +5 -2
- data/themes/typographic/stylesheets/ie6.css +86 -0
- data/themes/typographic/views/articles/_article.html.erb +2 -2
- data/vendor/plugins/fckeditor/README +0 -7
- data/vendor/plugins/fckeditor/app/helpers/fckeditor_helper.rb +1 -3
- data/vendor/plugins/fckeditor/lib/fckeditor_version.rb +2 -2
- data/vendor/plugins/fckeditor/tasks/fckeditor_tasks.rake +1 -1
- data/vendor/plugins/fckeditor/test/fckeditor_test.rb +8 -0
- metadata +98 -66
- data/CHANGES-5.0.4 +0 -33
- data/SIDEBARS +0 -39
- data/app/views/admin/content/_quick_post.html.erb +0 -20
- data/db/schema.rb +0 -224
- data/public/.DS_Store +0 -0
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/basexml.asp +0 -62
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/class_upload.asp +0 -353
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/commands.asp +0 -198
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/config.asp +0 -128
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/connector.asp +0 -88
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/io.asp +0 -222
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/upload.asp +0 -61
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/util.asp +0 -55
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/ImageObject.cfc +0 -273
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf5_connector.cfm +0 -315
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf5_upload.cfm +0 -296
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_basexml.cfm +0 -68
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_commands.cfm +0 -225
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_connector.cfm +0 -89
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_io.cfm +0 -288
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_upload.cfm +0 -68
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_util.cfm +0 -132
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/config.cfm +0 -183
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/connector.cfm +0 -31
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/image.cfc +0 -1325
- data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/config.lasso +0 -65
- data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/connector.lasso +0 -257
- data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/upload.lasso +0 -157
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/basexml.php +0 -93
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/commands.php +0 -245
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/config.php +0 -140
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/connector.php +0 -87
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/io.php +0 -272
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/phpcompat.php +0 -17
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/upload.php +0 -59
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/util.php +0 -185
- data/public/javascripts/fckeditor/fckeditor.afp +0 -161
- data/public/javascripts/fckeditor/fckeditor.asp +0 -235
- data/public/javascripts/fckeditor/fckeditor.cfc +0 -273
- data/public/javascripts/fckeditor/fckeditor.cfm +0 -210
- data/public/javascripts/fckeditor/fckeditor.lasso +0 -112
- data/test/mocks/themes/typographic/.DS_Store +0 -0
- data/themes/typographic/.DS_Store +0 -0
- data/vendor/plugins/audioscrobbler_sidebar/MAINTAINERS +0 -26
- data/vendor/plugins/audioscrobbler_sidebar/MIT-LICENSE +0 -21
- data/vendor/plugins/audioscrobbler_sidebar/README +0 -27
- data/vendor/plugins/audioscrobbler_sidebar/Rakefile +0 -22
- data/vendor/plugins/audioscrobbler_sidebar/init.rb +0 -5
- data/vendor/plugins/audioscrobbler_sidebar/lib/audioscrobbler.rb +0 -54
- data/vendor/plugins/audioscrobbler_sidebar/lib/audioscrobbler_sidebar.rb +0 -13
- data/vendor/plugins/audioscrobbler_sidebar/test/audioscrobbler_sidebar_test.rb +0 -8
- data/vendor/plugins/audioscrobbler_sidebar/views/content.rhtml +0 -10
@@ -1,7 +1,7 @@
|
|
1
1
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
2
2
|
<!--
|
3
3
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
4
|
-
* Copyright (C) 2003-
|
4
|
+
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
5
5
|
*
|
6
6
|
* == BEGIN LICENSE ==
|
7
7
|
*
|
@@ -29,13 +29,14 @@
|
|
29
29
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
30
30
|
<script type="text/javascript">
|
31
31
|
|
32
|
-
var
|
32
|
+
var dialog = window.parent ;
|
33
|
+
var oEditor = dialog.InnerDialogLoaded() ;
|
33
34
|
|
34
35
|
// Gets the document DOM
|
35
36
|
var oDOM = oEditor.FCK.EditorDocument ;
|
36
37
|
var sListType = ( location.search == '?OL' ? 'OL' : 'UL' ) ;
|
37
38
|
|
38
|
-
var oActiveEl =
|
39
|
+
var oActiveEl = dialog.Selection.GetSelection().MoveToAncestorNode( sListType ) ;
|
39
40
|
var oActiveSel ;
|
40
41
|
|
41
42
|
window.onload = function()
|
@@ -63,7 +64,10 @@ window.onload = function()
|
|
63
64
|
oActiveSel.value = oActiveEl.getAttribute('type') ;
|
64
65
|
}
|
65
66
|
|
66
|
-
|
67
|
+
dialog.SetOkButton( true ) ;
|
68
|
+
dialog.SetAutoSize( true ) ;
|
69
|
+
|
70
|
+
SelectField( 'txtStartPosition' ) ;
|
67
71
|
}
|
68
72
|
|
69
73
|
function Ok()
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
2
2
|
<!--
|
3
3
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
4
|
-
* Copyright (C) 2003-
|
4
|
+
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
5
5
|
*
|
6
6
|
* == BEGIN LICENSE ==
|
7
7
|
*
|
@@ -28,41 +28,61 @@
|
|
28
28
|
<title></title>
|
29
29
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
30
30
|
<meta name="robots" content="noindex, nofollow" />
|
31
|
-
|
31
|
+
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
32
32
|
<script type="text/javascript">
|
33
|
-
var
|
33
|
+
var dialog = window.parent ;
|
34
|
+
var oEditor = dialog.InnerDialogLoaded() ;
|
34
35
|
var FCK = oEditor.FCK;
|
35
36
|
var FCKTools = oEditor.FCKTools ;
|
36
37
|
var FCKConfig = oEditor.FCKConfig ;
|
38
|
+
var FCKBrowserInfo = oEditor.FCKBrowserInfo ;
|
37
39
|
|
38
40
|
window.onload = function ()
|
39
41
|
{
|
40
42
|
// First of all, translate the dialog box texts
|
41
43
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
42
44
|
|
43
|
-
var sPastingType =
|
45
|
+
var sPastingType = dialog.Args().CustomValue ;
|
44
46
|
|
45
47
|
if ( sPastingType == 'Word' || sPastingType == 'Security' )
|
46
48
|
{
|
47
49
|
if ( sPastingType == 'Security' )
|
48
50
|
document.getElementById( 'xSecurityMsg' ).style.display = '' ;
|
49
51
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
52
|
+
// For document.domain compatibility (#123) we must do all the magic in
|
53
|
+
// the URL for IE.
|
54
|
+
var sFrameUrl = !oEditor.FCK_IS_CUSTOM_DOMAIN || !FCKBrowserInfo.IsIE ?
|
55
|
+
'javascript:void(0)' :
|
56
|
+
'javascript:void( (function(){' +
|
57
|
+
'document.open() ;' +
|
58
|
+
'document.domain=\'' + document.domain + '\' ;' +
|
59
|
+
'document.write(\'<html><head><script>window.onerror = function() { return true ; };<\/script><\/head><body><\/body><\/html>\') ;' +
|
60
|
+
'document.close() ;' +
|
61
|
+
'document.body.contentEditable = true ;' +
|
62
|
+
'window.focus() ;' +
|
63
|
+
'})() )' ;
|
64
|
+
|
65
|
+
var eFrameSpace = document.getElementById( 'xFrameSpace' ) ;
|
66
|
+
eFrameSpace.innerHTML = '<iframe id="frmData" src="' + sFrameUrl + '" ' +
|
67
|
+
'height="98%" width="99%" frameborder="0" style="border: #000000 1px; background-color: #ffffff"></iframe>' ;
|
68
|
+
|
69
|
+
var oFrame = eFrameSpace.firstChild ;
|
70
|
+
|
71
|
+
if ( !oEditor.FCK_IS_CUSTOM_DOMAIN || !FCKBrowserInfo.IsIE )
|
72
|
+
{
|
73
|
+
// Avoid errors if the pasted content has any script that fails: #389
|
74
|
+
var oDoc = oFrame.contentWindow.document ;
|
75
|
+
oDoc.open() ;
|
76
|
+
oDoc.write('<html><head><script>window.onerror = function() { return true ; };<\/script><\/head><body><\/body><\/html>') ;
|
77
|
+
oDoc.close() ;
|
78
|
+
|
79
|
+
if ( FCKBrowserInfo.IsIE )
|
80
|
+
oDoc.body.contentEditable = true ;
|
81
|
+
else
|
82
|
+
oDoc.designMode = 'on' ;
|
63
83
|
|
64
|
-
|
65
|
-
|
84
|
+
oFrame.contentWindow.focus();
|
85
|
+
}
|
66
86
|
}
|
67
87
|
else
|
68
88
|
{
|
@@ -72,8 +92,8 @@ window.onload = function ()
|
|
72
92
|
if ( sPastingType != 'Word' )
|
73
93
|
document.getElementById('oWordCommands').style.display = 'none' ;
|
74
94
|
|
75
|
-
|
76
|
-
|
95
|
+
dialog.SetOkButton( true ) ;
|
96
|
+
dialog.SetAutoSize( true ) ;
|
77
97
|
}
|
78
98
|
|
79
99
|
function Ok()
|
@@ -83,7 +103,7 @@ function Ok()
|
|
83
103
|
|
84
104
|
var sHtml ;
|
85
105
|
|
86
|
-
var sPastingType =
|
106
|
+
var sPastingType = dialog.Args().CustomValue ;
|
87
107
|
|
88
108
|
if ( sPastingType == 'Word' || sPastingType == 'Security' )
|
89
109
|
{
|
@@ -119,6 +139,7 @@ function Ok()
|
|
119
139
|
// Use the marker method instead. It's primitive, but it works.
|
120
140
|
var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;
|
121
141
|
var oDoc = oEditor.FCK.EditorDocument ;
|
142
|
+
dialog.Selection.EnsureSelection() ;
|
122
143
|
range.MoveToSelection() ;
|
123
144
|
range.DeleteContents() ;
|
124
145
|
var marker = [] ;
|
@@ -157,17 +178,6 @@ function Ok()
|
|
157
178
|
return true ;
|
158
179
|
}
|
159
180
|
|
160
|
-
function CleanUpBox()
|
161
|
-
{
|
162
|
-
var oFrame = document.getElementById('frmData') ;
|
163
|
-
|
164
|
-
if ( oFrame.contentDocument )
|
165
|
-
oFrame.contentDocument.body.innerHTML = '' ;
|
166
|
-
else
|
167
|
-
oFrame.contentWindow.document.body.innerHTML = '' ;
|
168
|
-
}
|
169
|
-
|
170
|
-
|
171
181
|
// This function will be called from the PasteFromWord dialog (fck_paste.html)
|
172
182
|
// Input: oNode a DOM node that contains the raw paste from the clipboard
|
173
183
|
// bIgnoreFont, bRemoveStyles booleans according to the values set in the dialog
|
@@ -306,33 +316,22 @@ function CleanWord( oNode, bIgnoreFont, bRemoveStyles )
|
|
306
316
|
</td>
|
307
317
|
</tr>
|
308
318
|
<tr>
|
309
|
-
<td valign="top" height="100%" style="border
|
310
|
-
border-left: #000000 1px solid; border-bottom: #000000 1px solid">
|
319
|
+
<td id="xFrameSpace" valign="top" height="100%" style="border: #000000 1px solid">
|
311
320
|
<textarea id="txtData" cols="80" rows="5" style="border: #000000 1px; display: none;
|
312
321
|
width: 99%; height: 98%"></textarea>
|
313
|
-
<iframe id="frmData" src="javascript:void(0)" height="98%" width="99%" frameborder="0"
|
314
|
-
style="border-right: #000000 1px; border-top: #000000 1px; display: none; border-left: #000000 1px;
|
315
|
-
border-bottom: #000000 1px; background-color: #ffffff"></iframe>
|
316
322
|
</td>
|
317
323
|
</tr>
|
318
324
|
<tr id="oWordCommands">
|
319
325
|
<td>
|
320
|
-
|
321
|
-
<
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
Remove Styles definitions</label>
|
330
|
-
</td>
|
331
|
-
<td align="right" valign="top">
|
332
|
-
<input type="button" fcklang="DlgPasteCleanBox" value="Clean Up Box" onclick="CleanUpBox()" />
|
333
|
-
</td>
|
334
|
-
</tr>
|
335
|
-
</table>
|
326
|
+
|
327
|
+
<input id="chkRemoveFont" type="checkbox" checked="checked" />
|
328
|
+
<label for="chkRemoveFont" fcklang="DlgPasteIgnoreFont">
|
329
|
+
Ignore Font Face definitions</label>
|
330
|
+
<br />
|
331
|
+
<input id="chkRemoveStyles" type="checkbox" />
|
332
|
+
<label for="chkRemoveStyles" fcklang="DlgPasteRemoveStyles">
|
333
|
+
Remove Styles definitions</label>
|
334
|
+
|
336
335
|
</td>
|
337
336
|
</tr>
|
338
337
|
</table>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
2
2
|
<!--
|
3
3
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
4
|
-
* Copyright (C) 2003-
|
4
|
+
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
5
5
|
*
|
6
6
|
* == BEGIN LICENSE ==
|
7
7
|
*
|
@@ -29,12 +29,13 @@
|
|
29
29
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
30
30
|
<script type="text/javascript">
|
31
31
|
|
32
|
-
var
|
32
|
+
var dialog = window.parent ;
|
33
|
+
var oEditor = dialog.InnerDialogLoaded() ;
|
33
34
|
|
34
35
|
// Gets the document DOM
|
35
36
|
var oDOM = oEditor.FCK.EditorDocument ;
|
36
37
|
|
37
|
-
var oActiveEl =
|
38
|
+
var oActiveEl = dialog.Selection.GetSelectedElement() ;
|
38
39
|
|
39
40
|
window.onload = function()
|
40
41
|
{
|
@@ -50,22 +51,16 @@ window.onload = function()
|
|
50
51
|
else
|
51
52
|
oActiveEl = null ;
|
52
53
|
|
53
|
-
|
54
|
+
dialog.SetOkButton( true ) ;
|
55
|
+
dialog.SetAutoSize( true ) ;
|
56
|
+
SelectField( 'txtName' ) ;
|
54
57
|
}
|
55
58
|
|
56
59
|
function Ok()
|
57
60
|
{
|
58
61
|
oEditor.FCKUndo.SaveUndoStep() ;
|
59
|
-
|
60
|
-
if ( !oActiveEl )
|
61
|
-
{
|
62
|
-
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
|
63
|
-
oActiveEl.type = 'radio' ;
|
64
|
-
oActiveEl = oEditor.FCK.InsertElement( oActiveEl ) ;
|
65
|
-
}
|
66
62
|
|
67
|
-
|
68
|
-
oActiveEl.name = GetE('txtName').value ;
|
63
|
+
oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: 'radio' } ) ;
|
69
64
|
|
70
65
|
if ( oEditor.FCKBrowserInfo.IsIE )
|
71
66
|
oActiveEl.value = GetE('txtValue').value ;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
2
2
|
<!--
|
3
3
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
4
|
-
* Copyright (C) 2003-
|
4
|
+
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
5
5
|
*
|
6
6
|
* == BEGIN LICENSE ==
|
7
7
|
*
|
@@ -29,11 +29,14 @@
|
|
29
29
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
30
30
|
<script type="text/javascript">
|
31
31
|
|
32
|
-
var
|
32
|
+
var dialog = window.parent ;
|
33
|
+
var oEditor = dialog.InnerDialogLoaded() ;
|
34
|
+
var dialogArguments = dialog.Args() ;
|
35
|
+
|
33
36
|
var FCKLang = oEditor.FCKLang ;
|
34
37
|
|
35
|
-
|
36
|
-
|
38
|
+
dialog.AddTab( 'Find', FCKLang.DlgFindTitle ) ;
|
39
|
+
dialog.AddTab( 'Replace', FCKLang.DlgReplaceTitle ) ;
|
37
40
|
var idMap = {} ;
|
38
41
|
|
39
42
|
function OnDialogTabChange( tabCode )
|
@@ -43,6 +46,41 @@ function OnDialogTabChange( tabCode )
|
|
43
46
|
idMap['FindText'] = 'txtFind' + tabCode ;
|
44
47
|
idMap['CheckCase'] = 'chkCase' + tabCode ;
|
45
48
|
idMap['CheckWord'] = 'chkWord' + tabCode ;
|
49
|
+
|
50
|
+
if ( tabCode == 'Replace' )
|
51
|
+
dialog.SetAutoSize( true ) ;
|
52
|
+
}
|
53
|
+
|
54
|
+
// Place a range at the start of document.
|
55
|
+
// This will be the starting point of our search.
|
56
|
+
var GlobalRange = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;
|
57
|
+
|
58
|
+
function ResetGlobalRange()
|
59
|
+
{
|
60
|
+
GlobalRange.SetStart( oEditor.FCK.EditorDocument.body, 1 ) ;
|
61
|
+
GlobalRange.SetEnd( oEditor.FCK.EditorDocument.body, 1 ) ;
|
62
|
+
GlobalRange.Collapse( true ) ;
|
63
|
+
}
|
64
|
+
ResetGlobalRange() ;
|
65
|
+
|
66
|
+
var HighlightRange = null ;
|
67
|
+
function Highlight()
|
68
|
+
{
|
69
|
+
if ( HighlightRange )
|
70
|
+
ClearHighlight() ;
|
71
|
+
var cloneRange = GlobalRange.Clone() ;
|
72
|
+
oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ).ApplyToRange( cloneRange, false, true ) ;
|
73
|
+
HighlightRange = cloneRange ;
|
74
|
+
GlobalRange = HighlightRange.Clone() ;
|
75
|
+
}
|
76
|
+
|
77
|
+
function ClearHighlight()
|
78
|
+
{
|
79
|
+
if ( HighlightRange )
|
80
|
+
{
|
81
|
+
oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ).RemoveFromRange( HighlightRange, false, true ) ;
|
82
|
+
HighlightRange = null ;
|
83
|
+
}
|
46
84
|
}
|
47
85
|
|
48
86
|
function OnLoad()
|
@@ -50,76 +88,93 @@ function OnLoad()
|
|
50
88
|
// First of all, translate the dialog box texts.
|
51
89
|
oEditor.FCKLanguageManager.TranslatePage( document ) ;
|
52
90
|
|
53
|
-
// Place the cursor at the start of document.
|
54
|
-
// This will be the starting point of our search.
|
55
|
-
var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;
|
56
|
-
range.SetStart( oEditor.FCK.EditorDocument.body, 1 ) ;
|
57
|
-
range.SetEnd( oEditor.FCK.EditorDocument.body, 1 ) ;
|
58
|
-
range.Collapse( true ) ;
|
59
|
-
range.Select() ;
|
60
|
-
|
61
91
|
// Show the appropriate tab at startup.
|
62
|
-
if (
|
63
|
-
|
92
|
+
if ( dialogArguments.CustomValue == 'Find' )
|
93
|
+
{
|
94
|
+
dialog.SetSelectedTab( 'Find' ) ;
|
95
|
+
dialog.SetAutoSize( true ) ;
|
96
|
+
}
|
64
97
|
else
|
65
|
-
|
98
|
+
dialog.SetSelectedTab( 'Replace' ) ;
|
99
|
+
|
100
|
+
SelectField( 'txtFind' + dialogArguments.CustomValue ) ;
|
66
101
|
}
|
67
102
|
|
68
|
-
function btnStat(
|
103
|
+
function btnStat()
|
69
104
|
{
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
(
|
105
|
+
GetE('btnReplace').disabled =
|
106
|
+
GetE('btnReplaceAll').disabled =
|
107
|
+
GetE('btnFind').disabled =
|
108
|
+
( GetE(idMap["FindText"]).value.length == 0 ) ;
|
74
109
|
}
|
75
110
|
|
76
|
-
function
|
111
|
+
function btnStatDelayed()
|
77
112
|
{
|
78
|
-
|
79
|
-
range.MoveToSelection() ;
|
80
|
-
return range.CreateBookmark2() ;
|
113
|
+
setTimeout( btnStat, 1 ) ;
|
81
114
|
}
|
82
115
|
|
83
116
|
function GetSearchString()
|
84
117
|
{
|
85
|
-
return
|
118
|
+
return GetE(idMap['FindText']).value ;
|
86
119
|
}
|
87
120
|
|
88
121
|
function GetReplaceString()
|
89
122
|
{
|
90
|
-
return
|
123
|
+
return GetE("txtReplace").value ;
|
91
124
|
}
|
92
125
|
|
93
126
|
function GetCheckCase()
|
94
127
|
{
|
95
|
-
return !! (
|
128
|
+
return !! ( GetE(idMap['CheckCase']).checked ) ;
|
96
129
|
}
|
97
130
|
|
98
131
|
function GetMatchWord()
|
99
132
|
{
|
100
|
-
return !! (
|
133
|
+
return !! ( GetE(idMap['CheckWord']).checked ) ;
|
101
134
|
}
|
102
135
|
|
103
136
|
// Get the data pointed to by a bookmark.
|
104
137
|
function GetData( bookmark )
|
105
138
|
{
|
106
|
-
var
|
107
|
-
for( var i = 0 ; i < bookmark.length ; i++ )
|
139
|
+
var cursor = oEditor.FCK.EditorDocument.documentElement ;
|
140
|
+
for ( var i = 0 ; i < bookmark.length ; i++ )
|
108
141
|
{
|
109
|
-
|
110
|
-
|
111
|
-
|
142
|
+
var target = bookmark[i] ;
|
143
|
+
var currentIndex = -1 ;
|
144
|
+
if ( cursor.nodeType != 3 )
|
112
145
|
{
|
113
|
-
var
|
114
|
-
|
115
|
-
|
116
|
-
|
146
|
+
for (var j = 0 ; j < cursor.childNodes.length ; j++ )
|
147
|
+
{
|
148
|
+
var candidate = cursor.childNodes[j] ;
|
149
|
+
if ( candidate.nodeType == 3 &&
|
150
|
+
candidate.previousSibling &&
|
151
|
+
candidate.previousSibling.nodeType == 3 )
|
152
|
+
continue ;
|
153
|
+
currentIndex++ ;
|
154
|
+
if ( currentIndex == target )
|
155
|
+
{
|
156
|
+
cursor = candidate ;
|
157
|
+
break ;
|
158
|
+
}
|
159
|
+
}
|
160
|
+
if ( currentIndex < target )
|
117
161
|
return null ;
|
118
162
|
}
|
119
163
|
else
|
120
|
-
|
164
|
+
{
|
165
|
+
if ( i != bookmark.length - 1 )
|
166
|
+
return null ;
|
167
|
+
while ( target >= cursor.length && cursor.nextSibling && cursor.nextSibling.nodeType == 3 )
|
168
|
+
{
|
169
|
+
target -= cursor.length ;
|
170
|
+
cursor = cursor.nextSibling ;
|
171
|
+
}
|
172
|
+
cursor = cursor.nodeValue.charAt( target ) ;
|
173
|
+
if ( cursor == "" )
|
174
|
+
cursor = null ;
|
175
|
+
}
|
121
176
|
}
|
122
|
-
return
|
177
|
+
return cursor ;
|
123
178
|
}
|
124
179
|
|
125
180
|
// With this function, we can treat the bookmark as an iterator for DFS.
|
@@ -127,7 +182,6 @@ function NextPosition( bookmark )
|
|
127
182
|
{
|
128
183
|
// See if there's anything further down the tree.
|
129
184
|
var next = bookmark.concat( [0] ) ;
|
130
|
-
|
131
185
|
if ( GetData( next ) != null )
|
132
186
|
return next ;
|
133
187
|
|
@@ -213,7 +267,7 @@ KmpMatch.prototype = {
|
|
213
267
|
this._State = 0;
|
214
268
|
return KMP_MATCHED;
|
215
269
|
}
|
216
|
-
return KMP_ADVANCED;
|
270
|
+
return KMP_ADVANCED ;
|
217
271
|
}
|
218
272
|
else if ( this._State == 0 )
|
219
273
|
return KMP_NOMATCH;
|
@@ -233,9 +287,10 @@ function _Find()
|
|
233
287
|
{
|
234
288
|
// Start from the end of the current selection.
|
235
289
|
var matcher = new KmpMatch( GetSearchString(), ! GetCheckCase() ) ;
|
236
|
-
var cursor =
|
290
|
+
var cursor = GlobalRange.CreateBookmark2().End ;
|
237
291
|
var matchState = KMP_NOMATCH ;
|
238
292
|
var matchBookmark = null ;
|
293
|
+
var matchBookmarkStart = [] ;
|
239
294
|
|
240
295
|
// Match finding.
|
241
296
|
while ( true )
|
@@ -248,24 +303,39 @@ function _Find()
|
|
248
303
|
if ( data.tagName )
|
249
304
|
{
|
250
305
|
if ( oEditor.FCKListsLib.BlockElements[ data.tagName.toLowerCase() ] )
|
306
|
+
{
|
251
307
|
matcher.Reset();
|
308
|
+
matchBookmarkStart = [] ;
|
309
|
+
}
|
252
310
|
}
|
253
311
|
else if ( data.charAt != undefined )
|
254
312
|
{
|
255
313
|
matchState = matcher.FeedCharacter(data) ;
|
256
314
|
|
315
|
+
// No possible match of any useful substring in the pattern for the currently scanned character.
|
316
|
+
// So delete any positional information.
|
257
317
|
if ( matchState == KMP_NOMATCH )
|
258
|
-
|
259
|
-
|
260
|
-
|
318
|
+
matchBookmarkStart = [] ;
|
319
|
+
// We've matched something, but it's not a complete match, so let's just mark down the position for backtracking later.
|
320
|
+
else if ( matchState == KMP_ADVANCED )
|
321
|
+
{
|
322
|
+
matchBookmarkStart.push( cursor.concat( [] ) ) ;
|
323
|
+
if ( matchBookmarkStart.length > matcher._State )
|
324
|
+
matchBookmarkStart.shift() ;
|
325
|
+
}
|
326
|
+
// Found a complete match! Mark down the ending position as well.
|
261
327
|
else if ( matchState == KMP_MATCHED )
|
262
328
|
{
|
263
|
-
|
264
|
-
|
265
|
-
|
329
|
+
// It is possible to get a KMP_MATCHED without KMP_ADVANCED when the match pattern is only 1 character.
|
330
|
+
// So need to check and mark down the starting position as well.
|
331
|
+
if ( matchBookmarkStart.length == 0 )
|
332
|
+
matchBookmarkStart = [cursor.concat( [] )] ;
|
333
|
+
|
334
|
+
matchBookmark = { 'Start' : matchBookmarkStart.shift(), 'End' : cursor.concat( [] ) } ;
|
266
335
|
matchBookmark.End[ matchBookmark.End.length - 1 ]++;
|
267
336
|
|
268
337
|
// Wait, do we have to match a whole word?
|
338
|
+
// If yes, carry out additional checks on what we've got.
|
269
339
|
if ( GetMatchWord() )
|
270
340
|
{
|
271
341
|
var startOk = false ;
|
@@ -310,74 +380,82 @@ function _Find()
|
|
310
380
|
break;
|
311
381
|
}
|
312
382
|
|
313
|
-
// If we've found a match,
|
383
|
+
// If we've found a match, highlight the match.
|
314
384
|
if ( matchState == KMP_MATCHED )
|
315
385
|
{
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
var focus = range._Range.endContainer ;
|
386
|
+
GlobalRange.MoveToBookmark2( matchBookmark ) ;
|
387
|
+
Highlight() ;
|
388
|
+
var focus = GlobalRange._Range.endContainer ;
|
320
389
|
while ( focus && focus.nodeType != 1 )
|
321
390
|
focus = focus.parentNode ;
|
391
|
+
|
322
392
|
if ( focus )
|
323
|
-
|
324
|
-
|
393
|
+
{
|
394
|
+
if ( oEditor.FCKBrowserInfo.IsSafari )
|
395
|
+
oEditor.FCKDomTools.ScrollIntoView( focus, false ) ;
|
396
|
+
else
|
397
|
+
focus.scrollIntoView( false ) ;
|
398
|
+
}
|
399
|
+
|
400
|
+
return true ;
|
325
401
|
}
|
326
402
|
else
|
327
|
-
|
403
|
+
{
|
404
|
+
ResetGlobalRange() ;
|
405
|
+
return false ;
|
406
|
+
}
|
328
407
|
}
|
329
408
|
|
330
409
|
function Find()
|
331
410
|
{
|
332
|
-
var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;
|
333
|
-
range.MoveToSelection() ;
|
334
|
-
range.Collapse( false ) ;
|
335
|
-
range.Select() ;
|
336
|
-
|
337
411
|
if ( ! _Find() )
|
412
|
+
{
|
413
|
+
ClearHighlight() ;
|
338
414
|
alert( FCKLang.DlgFindNotFoundMsg ) ;
|
415
|
+
}
|
339
416
|
}
|
340
417
|
|
341
418
|
function Replace()
|
342
419
|
{
|
343
|
-
|
344
|
-
selection.MoveToSelection() ;
|
345
|
-
|
346
|
-
if ( selection.CheckIsCollapsed() )
|
420
|
+
if ( GlobalRange.CheckIsCollapsed() )
|
347
421
|
{
|
348
422
|
if (! _Find() )
|
423
|
+
{
|
424
|
+
ClearHighlight() ;
|
349
425
|
alert( FCKLang.DlgFindNotFoundMsg ) ;
|
426
|
+
}
|
350
427
|
}
|
351
428
|
else
|
352
429
|
{
|
353
430
|
oEditor.FCKUndo.SaveUndoStep() ;
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
selection.Select() ;
|
431
|
+
GlobalRange.DeleteContents() ;
|
432
|
+
GlobalRange.InsertNode( oEditor.FCK.EditorDocument.createTextNode( GetReplaceString() ) ) ;
|
433
|
+
GlobalRange.Collapse( false ) ;
|
358
434
|
}
|
359
435
|
}
|
360
436
|
|
361
437
|
function ReplaceAll()
|
362
438
|
{
|
363
439
|
oEditor.FCKUndo.SaveUndoStep() ;
|
364
|
-
var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;
|
365
|
-
|
366
440
|
var replaceCount = 0 ;
|
367
441
|
|
368
442
|
while ( _Find() )
|
369
443
|
{
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
range.Select() ;
|
444
|
+
dialog.Selection.EnsureSelection() ;
|
445
|
+
GlobalRange.DeleteContents() ;
|
446
|
+
GlobalRange.InsertNode( oEditor.FCK.EditorDocument.createTextNode( GetReplaceString() ) ) ;
|
447
|
+
GlobalRange.Collapse( false ) ;
|
375
448
|
replaceCount++ ;
|
376
449
|
}
|
377
450
|
if ( replaceCount == 0 )
|
451
|
+
{
|
452
|
+
ClearHighlight() ;
|
378
453
|
alert( FCKLang.DlgFindNotFoundMsg ) ;
|
379
|
-
|
454
|
+
}
|
455
|
+
dialog.Cancel() ;
|
380
456
|
}
|
457
|
+
|
458
|
+
window.onunload = function(){ ClearHighlight() ; }
|
381
459
|
</script>
|
382
460
|
</head>
|
383
461
|
<body onload="OnLoad()" style="overflow: hidden">
|
@@ -389,7 +467,7 @@ function ReplaceAll()
|
|
389
467
|
Find what:</label>
|
390
468
|
</td>
|
391
469
|
<td width="100%">
|
392
|
-
<input id="txtFindFind" onkeyup="btnStat(
|
470
|
+
<input id="txtFindFind" onkeyup="btnStat()" oninput="btnStat()" onpaste="btnStatDelayed()" style="width: 100%" tabindex="1"
|
393
471
|
type="text" />
|
394
472
|
</td>
|
395
473
|
<td>
|
@@ -416,7 +494,7 @@ function ReplaceAll()
|
|
416
494
|
Find what:</label>
|
417
495
|
</td>
|
418
496
|
<td width="100%">
|
419
|
-
<input id="txtFindReplace" onkeyup="btnStat(
|
497
|
+
<input id="txtFindReplace" onkeyup="btnStat()" oninput="btnStat()" onpaste="btnStatDelayed()" style="width: 100%" tabindex="1"
|
420
498
|
type="text" />
|
421
499
|
</td>
|
422
500
|
<td>
|