bcms_content_syncing 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/{README → README.markdown} +5 -0
- metadata +6 -661
- data/.gitignore +0 -13
- data/COPYRIGHT.txt +0 -23
- data/GPL.txt +0 -674
- data/Rakefile +0 -34
- data/VERSION +0 -1
- data/bcms_content_syncing.gemspec +0 -710
- data/config/boot.rb +0 -110
- data/config/database.yml +0 -22
- data/config/environment.rb +0 -42
- data/config/environments/development.rb +0 -18
- data/config/environments/production.rb +0 -31
- data/config/environments/test.rb +0 -29
- data/config/initializers/backtrace_silencers.rb +0 -7
- data/config/initializers/inflections.rb +0 -10
- data/config/initializers/init_module.rb +0 -1
- data/config/initializers/mime_types.rb +0 -5
- data/config/initializers/new_rails_defaults.rb +0 -21
- data/config/initializers/session_store.rb +0 -15
- data/config/locales/en.yml +0 -5
- data/config/routes.rb +0 -45
- data/db/seeds.rb +0 -7
- data/doc/README_FOR_APP +0 -2
- data/public/404.html +0 -30
- data/public/422.html +0 -30
- data/public/500.html +0 -30
- data/public/bcms/ckeditor/ckeditor.js +0 -108
- data/public/bcms/ckeditor/config.js +0 -18
- data/public/bcms/ckeditor/core/_bootstrap.js +0 -64
- data/public/bcms/ckeditor/core/ajax.js +0 -143
- data/public/bcms/ckeditor/core/ckeditor.js +0 -96
- data/public/bcms/ckeditor/core/ckeditor_base.js +0 -190
- data/public/bcms/ckeditor/core/ckeditor_basic.js +0 -241
- data/public/bcms/ckeditor/core/command.js +0 -70
- data/public/bcms/ckeditor/core/commanddefinition.js +0 -72
- data/public/bcms/ckeditor/core/config.js +0 -287
- data/public/bcms/ckeditor/core/dom.js +0 -21
- data/public/bcms/ckeditor/core/dom/document.js +0 -210
- data/public/bcms/ckeditor/core/dom/documentfragment.js +0 -49
- data/public/bcms/ckeditor/core/dom/domobject.js +0 -204
- data/public/bcms/ckeditor/core/dom/element.js +0 -1384
- data/public/bcms/ckeditor/core/dom/elementpath.js +0 -104
- data/public/bcms/ckeditor/core/dom/event.js +0 -137
- data/public/bcms/ckeditor/core/dom/node.js +0 -649
- data/public/bcms/ckeditor/core/dom/nodelist.js +0 -23
- data/public/bcms/ckeditor/core/dom/range.js +0 -1668
- data/public/bcms/ckeditor/core/dom/text.js +0 -123
- data/public/bcms/ckeditor/core/dom/walker.js +0 -411
- data/public/bcms/ckeditor/core/dom/window.js +0 -96
- data/public/bcms/ckeditor/core/dtd.js +0 -200
- data/public/bcms/ckeditor/core/editor.js +0 -650
- data/public/bcms/ckeditor/core/editor_basic.js +0 -178
- data/public/bcms/ckeditor/core/env.js +0 -219
- data/public/bcms/ckeditor/core/event.js +0 -335
- data/public/bcms/ckeditor/core/eventInfo.js +0 -120
- data/public/bcms/ckeditor/core/focusmanager.js +0 -123
- data/public/bcms/ckeditor/core/htmlparser.js +0 -212
- data/public/bcms/ckeditor/core/htmlparser/basicwriter.js +0 -140
- data/public/bcms/ckeditor/core/htmlparser/cdata.js +0 -44
- data/public/bcms/ckeditor/core/htmlparser/comment.js +0 -59
- data/public/bcms/ckeditor/core/htmlparser/element.js +0 -196
- data/public/bcms/ckeditor/core/htmlparser/filter.js +0 -233
- data/public/bcms/ckeditor/core/htmlparser/fragment.js +0 -434
- data/public/bcms/ckeditor/core/htmlparser/text.js +0 -55
- data/public/bcms/ckeditor/core/imagecacher.js +0 -58
- data/public/bcms/ckeditor/core/lang.js +0 -147
- data/public/bcms/ckeditor/core/loader.js +0 -238
- data/public/bcms/ckeditor/core/plugindefinition.js +0 -66
- data/public/bcms/ckeditor/core/plugins.js +0 -82
- data/public/bcms/ckeditor/core/resourcemanager.js +0 -233
- data/public/bcms/ckeditor/core/scriptloader.js +0 -194
- data/public/bcms/ckeditor/core/skins.js +0 -185
- data/public/bcms/ckeditor/core/test.js +0 -184
- data/public/bcms/ckeditor/core/themes.js +0 -18
- data/public/bcms/ckeditor/core/tools.js +0 -531
- data/public/bcms/ckeditor/core/ui.js +0 -106
- data/public/bcms/ckeditor/core/xml.js +0 -165
- data/public/bcms/ckeditor/editor.js +0 -51
- data/public/bcms/ckeditor/lang/_languages.js +0 -82
- data/public/bcms/ckeditor/lang/_translationstatus.txt +0 -59
- data/public/bcms/ckeditor/lang/af.js +0 -674
- data/public/bcms/ckeditor/lang/ar.js +0 -674
- data/public/bcms/ckeditor/lang/bg.js +0 -674
- data/public/bcms/ckeditor/lang/bn.js +0 -674
- data/public/bcms/ckeditor/lang/bs.js +0 -674
- data/public/bcms/ckeditor/lang/ca.js +0 -674
- data/public/bcms/ckeditor/lang/cs.js +0 -674
- data/public/bcms/ckeditor/lang/da.js +0 -674
- data/public/bcms/ckeditor/lang/de.js +0 -674
- data/public/bcms/ckeditor/lang/el.js +0 -674
- data/public/bcms/ckeditor/lang/en-au.js +0 -674
- data/public/bcms/ckeditor/lang/en-ca.js +0 -674
- data/public/bcms/ckeditor/lang/en-uk.js +0 -674
- data/public/bcms/ckeditor/lang/en.js +0 -674
- data/public/bcms/ckeditor/lang/eo.js +0 -674
- data/public/bcms/ckeditor/lang/es.js +0 -674
- data/public/bcms/ckeditor/lang/et.js +0 -674
- data/public/bcms/ckeditor/lang/eu.js +0 -674
- data/public/bcms/ckeditor/lang/fa.js +0 -674
- data/public/bcms/ckeditor/lang/fi.js +0 -674
- data/public/bcms/ckeditor/lang/fo.js +0 -674
- data/public/bcms/ckeditor/lang/fr-ca.js +0 -674
- data/public/bcms/ckeditor/lang/fr.js +0 -674
- data/public/bcms/ckeditor/lang/gl.js +0 -674
- data/public/bcms/ckeditor/lang/gu.js +0 -674
- data/public/bcms/ckeditor/lang/he.js +0 -674
- data/public/bcms/ckeditor/lang/hi.js +0 -674
- data/public/bcms/ckeditor/lang/hr.js +0 -674
- data/public/bcms/ckeditor/lang/hu.js +0 -674
- data/public/bcms/ckeditor/lang/is.js +0 -674
- data/public/bcms/ckeditor/lang/it.js +0 -674
- data/public/bcms/ckeditor/lang/ja.js +0 -674
- data/public/bcms/ckeditor/lang/km.js +0 -674
- data/public/bcms/ckeditor/lang/ko.js +0 -674
- data/public/bcms/ckeditor/lang/lt.js +0 -674
- data/public/bcms/ckeditor/lang/lv.js +0 -674
- data/public/bcms/ckeditor/lang/mn.js +0 -674
- data/public/bcms/ckeditor/lang/ms.js +0 -674
- data/public/bcms/ckeditor/lang/nb.js +0 -674
- data/public/bcms/ckeditor/lang/nl.js +0 -674
- data/public/bcms/ckeditor/lang/no.js +0 -674
- data/public/bcms/ckeditor/lang/pl.js +0 -674
- data/public/bcms/ckeditor/lang/pt-br.js +0 -674
- data/public/bcms/ckeditor/lang/pt.js +0 -674
- data/public/bcms/ckeditor/lang/ro.js +0 -674
- data/public/bcms/ckeditor/lang/ru.js +0 -674
- data/public/bcms/ckeditor/lang/sk.js +0 -674
- data/public/bcms/ckeditor/lang/sl.js +0 -674
- data/public/bcms/ckeditor/lang/sr-latn.js +0 -674
- data/public/bcms/ckeditor/lang/sr.js +0 -674
- data/public/bcms/ckeditor/lang/sv.js +0 -674
- data/public/bcms/ckeditor/lang/th.js +0 -674
- data/public/bcms/ckeditor/lang/tr.js +0 -674
- data/public/bcms/ckeditor/lang/uk.js +0 -674
- data/public/bcms/ckeditor/lang/vi.js +0 -674
- data/public/bcms/ckeditor/lang/zh-cn.js +0 -674
- data/public/bcms/ckeditor/lang/zh.js +0 -674
- data/public/bcms/ckeditor/plugins/about/dialogs/about.js +0 -73
- data/public/bcms/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/public/bcms/ckeditor/plugins/about/plugin.js +0 -22
- data/public/bcms/ckeditor/plugins/basicstyles/plugin.js +0 -50
- data/public/bcms/ckeditor/plugins/blockquote/plugin.js +0 -301
- data/public/bcms/ckeditor/plugins/button/plugin.js +0 -264
- data/public/bcms/ckeditor/plugins/clipboard/dialogs/paste.js +0 -167
- data/public/bcms/ckeditor/plugins/clipboard/plugin.js +0 -208
- data/public/bcms/ckeditor/plugins/colorbutton/plugin.js +0 -202
- data/public/bcms/ckeditor/plugins/contextmenu/plugin.js +0 -178
- data/public/bcms/ckeditor/plugins/dialog/dialogDefinition.js +0 -315
- data/public/bcms/ckeditor/plugins/dialog/plugin.js +0 -2742
- data/public/bcms/ckeditor/plugins/dialogui/plugin.js +0 -1319
- data/public/bcms/ckeditor/plugins/domiterator/plugin.js +0 -354
- data/public/bcms/ckeditor/plugins/editingblock/plugin.js +0 -236
- data/public/bcms/ckeditor/plugins/elementspath/plugin.js +0 -182
- data/public/bcms/ckeditor/plugins/enterkey/plugin.js +0 -324
- data/public/bcms/ckeditor/plugins/entities/plugin.js +0 -200
- data/public/bcms/ckeditor/plugins/fakeobjects/plugin.js +0 -111
- data/public/bcms/ckeditor/plugins/filebrowser/plugin.js +0 -383
- data/public/bcms/ckeditor/plugins/find/dialogs/find.js +0 -843
- data/public/bcms/ckeditor/plugins/find/plugin.js +0 -46
- data/public/bcms/ckeditor/plugins/flash/dialogs/flash.js +0 -682
- data/public/bcms/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/public/bcms/ckeditor/plugins/flash/plugin.js +0 -165
- data/public/bcms/ckeditor/plugins/floatpanel/plugin.js +0 -325
- data/public/bcms/ckeditor/plugins/font/plugin.js +0 -227
- data/public/bcms/ckeditor/plugins/format/plugin.js +0 -191
- data/public/bcms/ckeditor/plugins/forms/dialogs/button.js +0 -135
- data/public/bcms/ckeditor/plugins/forms/dialogs/checkbox.js +0 -138
- data/public/bcms/ckeditor/plugins/forms/dialogs/form.js +0 -177
- data/public/bcms/ckeditor/plugins/forms/dialogs/hiddenfield.js +0 -91
- data/public/bcms/ckeditor/plugins/forms/dialogs/radio.js +0 -135
- data/public/bcms/ckeditor/plugins/forms/dialogs/select.js +0 -541
- data/public/bcms/ckeditor/plugins/forms/dialogs/textarea.js +0 -114
- data/public/bcms/ckeditor/plugins/forms/dialogs/textfield.js +0 -193
- data/public/bcms/ckeditor/plugins/forms/plugin.js +0 -193
- data/public/bcms/ckeditor/plugins/horizontalrule/plugin.js +0 -35
- data/public/bcms/ckeditor/plugins/htmldataprocessor/plugin.js +0 -373
- data/public/bcms/ckeditor/plugins/htmlwriter/plugin.js +0 -289
- data/public/bcms/ckeditor/plugins/iframedialog/plugin.js +0 -136
- data/public/bcms/ckeditor/plugins/image/dialogs/image.js +0 -1225
- data/public/bcms/ckeditor/plugins/image/plugin.js +0 -64
- data/public/bcms/ckeditor/plugins/indent/plugin.js +0 -323
- data/public/bcms/ckeditor/plugins/justify/plugin.js +0 -164
- data/public/bcms/ckeditor/plugins/keystrokes/plugin.js +0 -217
- data/public/bcms/ckeditor/plugins/link/dialogs/anchor.js +0 -98
- data/public/bcms/ckeditor/plugins/link/dialogs/link.js +0 -1217
- data/public/bcms/ckeditor/plugins/link/images/anchor.gif +0 -0
- data/public/bcms/ckeditor/plugins/link/plugin.js +0 -188
- data/public/bcms/ckeditor/plugins/list/plugin.js +0 -570
- data/public/bcms/ckeditor/plugins/listblock/plugin.js +0 -231
- data/public/bcms/ckeditor/plugins/maximize/plugin.js +0 -267
- data/public/bcms/ckeditor/plugins/menu/plugin.js +0 -377
- data/public/bcms/ckeditor/plugins/menubutton/plugin.js +0 -93
- data/public/bcms/ckeditor/plugins/newpage/plugin.js +0 -65
- data/public/bcms/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/public/bcms/ckeditor/plugins/pagebreak/plugin.js +0 -96
- data/public/bcms/ckeditor/plugins/panel/plugin.js +0 -330
- data/public/bcms/ckeditor/plugins/panelbutton/plugin.js +0 -140
- data/public/bcms/ckeditor/plugins/pastefromword/dialogs/pastefromword.js +0 -307
- data/public/bcms/ckeditor/plugins/pastefromword/plugin.js +0 -54
- data/public/bcms/ckeditor/plugins/pastetext/dialogs/pastetext.js +0 -65
- data/public/bcms/ckeditor/plugins/pastetext/plugin.js +0 -142
- data/public/bcms/ckeditor/plugins/popup/plugin.js +0 -62
- data/public/bcms/ckeditor/plugins/preview/plugin.js +0 -97
- data/public/bcms/ckeditor/plugins/print/plugin.js +0 -41
- data/public/bcms/ckeditor/plugins/removeformat/plugin.js +0 -132
- data/public/bcms/ckeditor/plugins/resize/plugin.js +0 -115
- data/public/bcms/ckeditor/plugins/richcombo/plugin.js +0 -357
- data/public/bcms/ckeditor/plugins/save/plugin.js +0 -55
- data/public/bcms/ckeditor/plugins/scayt/dialogs/options.js +0 -494
- data/public/bcms/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -71
- data/public/bcms/ckeditor/plugins/scayt/plugin.js +0 -511
- data/public/bcms/ckeditor/plugins/selection/plugin.js +0 -1072
- data/public/bcms/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/plugin.js +0 -153
- data/public/bcms/ckeditor/plugins/smiley/dialogs/smiley.js +0 -219
- data/public/bcms/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/plugin.js +0 -74
- data/public/bcms/ckeditor/plugins/sourcearea/plugin.js +0 -185
- data/public/bcms/ckeditor/plugins/specialchar/dialogs/specialchar.js +0 -362
- data/public/bcms/ckeditor/plugins/specialchar/plugin.js +0 -29
- data/public/bcms/ckeditor/plugins/styles/plugin.js +0 -1242
- data/public/bcms/ckeditor/plugins/stylescombo/plugin.js +0 -295
- data/public/bcms/ckeditor/plugins/stylescombo/styles/default.js +0 -85
- data/public/bcms/ckeditor/plugins/tab/plugin.js +0 -266
- data/public/bcms/ckeditor/plugins/table/dialogs/table.js +0 -550
- data/public/bcms/ckeditor/plugins/table/plugin.js +0 -70
- data/public/bcms/ckeditor/plugins/tabletools/dialogs/tableCell.js +0 -328
- data/public/bcms/ckeditor/plugins/tabletools/plugin.js +0 -701
- data/public/bcms/ckeditor/plugins/templates/dialogs/templates.js +0 -170
- data/public/bcms/ckeditor/plugins/templates/plugin.js +0 -99
- data/public/bcms/ckeditor/plugins/templates/templates/default.js +0 -94
- data/public/bcms/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/public/bcms/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/public/bcms/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/public/bcms/ckeditor/plugins/toolbar/plugin.js +0 -412
- data/public/bcms/ckeditor/plugins/uicolor/dialogs/uicolor.js +0 -203
- data/public/bcms/ckeditor/plugins/uicolor/lang/en.js +0 -15
- data/public/bcms/ckeditor/plugins/uicolor/plugin.js +0 -35
- data/public/bcms/ckeditor/plugins/uicolor/uicolor.gif +0 -0
- data/public/bcms/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
- data/public/bcms/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
- data/public/bcms/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
- data/public/bcms/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
- data/public/bcms/ckeditor/plugins/uicolor/yui/assets/yui.css +0 -15
- data/public/bcms/ckeditor/plugins/uicolor/yui/yui.js +0 -71
- data/public/bcms/ckeditor/plugins/undo/plugin.js +0 -490
- data/public/bcms/ckeditor/plugins/wsc/dialogs/ciframe.html +0 -49
- data/public/bcms/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +0 -52
- data/public/bcms/ckeditor/plugins/wsc/dialogs/wsc.css +0 -83
- data/public/bcms/ckeditor/plugins/wsc/dialogs/wsc.js +0 -169
- data/public/bcms/ckeditor/plugins/wsc/plugin.js +0 -32
- data/public/bcms/ckeditor/plugins/wysiwygarea/plugin.js +0 -636
- data/public/bcms/ckeditor/skins/kama/dialog.css +0 -742
- data/public/bcms/ckeditor/skins/kama/editor.css +0 -21
- data/public/bcms/ckeditor/skins/kama/elementspath.css +0 -68
- data/public/bcms/ckeditor/skins/kama/icons.css +0 -309
- data/public/bcms/ckeditor/skins/kama/icons.png +0 -0
- data/public/bcms/ckeditor/skins/kama/images/dialog_sides.gif +0 -0
- data/public/bcms/ckeditor/skins/kama/images/dialog_sides.png +0 -0
- data/public/bcms/ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
- data/public/bcms/ckeditor/skins/kama/images/mini.gif +0 -0
- data/public/bcms/ckeditor/skins/kama/images/noimage.png +0 -0
- data/public/bcms/ckeditor/skins/kama/images/sprites.png +0 -0
- data/public/bcms/ckeditor/skins/kama/images/sprites_ie6.png +0 -0
- data/public/bcms/ckeditor/skins/kama/images/toolbar_start.gif +0 -0
- data/public/bcms/ckeditor/skins/kama/mainui.css +0 -139
- data/public/bcms/ckeditor/skins/kama/menu.css +0 -179
- data/public/bcms/ckeditor/skins/kama/panel.css +0 -203
- data/public/bcms/ckeditor/skins/kama/presets.css +0 -49
- data/public/bcms/ckeditor/skins/kama/reset.css +0 -78
- data/public/bcms/ckeditor/skins/kama/richcombo.css +0 -260
- data/public/bcms/ckeditor/skins/kama/skin.js +0 -291
- data/public/bcms/ckeditor/skins/kama/templates.css +0 -71
- data/public/bcms/ckeditor/skins/kama/toolbar.css +0 -384
- data/public/bcms/ckeditor/skins/office2003/dialog.css +0 -643
- data/public/bcms/ckeditor/skins/office2003/editor.css +0 -21
- data/public/bcms/ckeditor/skins/office2003/elementspath.css +0 -68
- data/public/bcms/ckeditor/skins/office2003/icons.css +0 -309
- data/public/bcms/ckeditor/skins/office2003/icons.png +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/dialog_sides.gif +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/dialog_sides.png +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/dialog_sides_rtl.png +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/mini.gif +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/noimage.png +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/sprites.png +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/sprites_ie6.png +0 -0
- data/public/bcms/ckeditor/skins/office2003/mainui.css +0 -97
- data/public/bcms/ckeditor/skins/office2003/menu.css +0 -175
- data/public/bcms/ckeditor/skins/office2003/panel.css +0 -198
- data/public/bcms/ckeditor/skins/office2003/presets.css +0 -49
- data/public/bcms/ckeditor/skins/office2003/reset.css +0 -78
- data/public/bcms/ckeditor/skins/office2003/richcombo.css +0 -279
- data/public/bcms/ckeditor/skins/office2003/skin.js +0 -77
- data/public/bcms/ckeditor/skins/office2003/templates.css +0 -71
- data/public/bcms/ckeditor/skins/office2003/toolbar.css +0 -442
- data/public/bcms/ckeditor/skins/v2/dialog.css +0 -653
- data/public/bcms/ckeditor/skins/v2/editor.css +0 -21
- data/public/bcms/ckeditor/skins/v2/elementspath.css +0 -68
- data/public/bcms/ckeditor/skins/v2/icons.css +0 -309
- data/public/bcms/ckeditor/skins/v2/icons.png +0 -0
- data/public/bcms/ckeditor/skins/v2/images/dialog_sides.gif +0 -0
- data/public/bcms/ckeditor/skins/v2/images/dialog_sides.png +0 -0
- data/public/bcms/ckeditor/skins/v2/images/dialog_sides_rtl.png +0 -0
- data/public/bcms/ckeditor/skins/v2/images/mini.gif +0 -0
- data/public/bcms/ckeditor/skins/v2/images/noimage.png +0 -0
- data/public/bcms/ckeditor/skins/v2/images/sprites.png +0 -0
- data/public/bcms/ckeditor/skins/v2/images/sprites_ie6.png +0 -0
- data/public/bcms/ckeditor/skins/v2/images/toolbar_start.gif +0 -0
- data/public/bcms/ckeditor/skins/v2/mainui.css +0 -112
- data/public/bcms/ckeditor/skins/v2/menu.css +0 -178
- data/public/bcms/ckeditor/skins/v2/panel.css +0 -198
- data/public/bcms/ckeditor/skins/v2/presets.css +0 -50
- data/public/bcms/ckeditor/skins/v2/reset.css +0 -78
- data/public/bcms/ckeditor/skins/v2/richcombo.css +0 -275
- data/public/bcms/ckeditor/skins/v2/skin.js +0 -73
- data/public/bcms/ckeditor/skins/v2/templates.css +0 -71
- data/public/bcms/ckeditor/skins/v2/toolbar.css +0 -399
- data/public/bcms/ckeditor/tests/_assets/sample.css +0 -4
- data/public/bcms/ckeditor/tests/_assets/sample.js +0 -1
- data/public/bcms/ckeditor/tests/_assets/sample.txt +0 -1
- data/public/bcms/ckeditor/tests/_assets/sample.xml +0 -5
- data/public/bcms/ckeditor/tests/_assets/sample_xml.txt +0 -5
- data/public/bcms/ckeditor/tests/core/_editor/custom_config_1.js +0 -10
- data/public/bcms/ckeditor/tests/core/_editor/custom_config_2.js +0 -9
- data/public/bcms/ckeditor/tests/core/ajax.html +0 -163
- data/public/bcms/ckeditor/tests/core/bootstrap.html +0 -66
- data/public/bcms/ckeditor/tests/core/ckeditor.html +0 -160
- data/public/bcms/ckeditor/tests/core/dom/document.html +0 -126
- data/public/bcms/ckeditor/tests/core/dom/documentfragment.html +0 -292
- data/public/bcms/ckeditor/tests/core/dom/element.html +0 -637
- data/public/bcms/ckeditor/tests/core/dom/node.html +0 -164
- data/public/bcms/ckeditor/tests/core/dom/range.html +0 -2411
- data/public/bcms/ckeditor/tests/core/dom/text.html +0 -128
- data/public/bcms/ckeditor/tests/core/dom/walker.html +0 -340
- data/public/bcms/ckeditor/tests/core/dom/window.html +0 -53
- data/public/bcms/ckeditor/tests/core/editor.html +0 -123
- data/public/bcms/ckeditor/tests/core/env.html +0 -52
- data/public/bcms/ckeditor/tests/core/event.html +0 -487
- data/public/bcms/ckeditor/tests/core/htmlparser/fragment.html +0 -188
- data/public/bcms/ckeditor/tests/core/htmlparser/htmlparser.html +0 -91
- data/public/bcms/ckeditor/tests/core/plugins.html +0 -45
- data/public/bcms/ckeditor/tests/core/plugins/myplugins/sample/my_plugin.js +0 -3
- data/public/bcms/ckeditor/tests/core/scriptloader.html +0 -52
- data/public/bcms/ckeditor/tests/core/tools.html +0 -170
- data/public/bcms/ckeditor/tests/core/xml.html +0 -150
- data/public/bcms/ckeditor/tests/plugins/domiterator/domiterator.html +0 -236
- data/public/bcms/ckeditor/tests/plugins/htmldataprocessor/htmldataprocessor.html +0 -386
- data/public/bcms/ckeditor/tests/plugins/link/link.html +0 -123
- data/public/bcms/ckeditor/tests/plugins/list/list.html +0 -217
- data/public/bcms/ckeditor/tests/plugins/selection/selection.html +0 -49
- data/public/bcms/ckeditor/tests/plugins/styles/styles.html +0 -596
- data/public/bcms/ckeditor/tests/test.css +0 -81
- data/public/bcms/ckeditor/tests/test.js +0 -93
- data/public/bcms/ckeditor/tests/testall.html +0 -114
- data/public/bcms/ckeditor/tests/yuitest.js +0 -75
- data/public/bcms/ckeditor/themes/default/theme.js +0 -232
- data/public/bcms/content_syncing/README +0 -1
- data/public/favicon.ico +0 -0
- data/public/images/cms/administration/user_browser_bg.gif +0 -0
- data/public/images/cms/bg.png +0 -0
- data/public/images/cms/bl_curve.png +0 -0
- data/public/images/cms/bottom_cap.png +0 -0
- data/public/images/cms/bottom_cap_content.png +0 -0
- data/public/images/cms/browse.gif +0 -0
- data/public/images/cms/browser_media_logo.png +0 -0
- data/public/images/cms/browsercms_logo.png +0 -0
- data/public/images/cms/buttons/button.png +0 -0
- data/public/images/cms/buttons/button_bg.png +0 -0
- data/public/images/cms/buttons/button_cap.png +0 -0
- data/public/images/cms/buttons/button_cap_h.png +0 -0
- data/public/images/cms/buttons/button_cap_off.gif +0 -0
- data/public/images/cms/buttons/button_cap_off_middle.gif +0 -0
- data/public/images/cms/buttons/button_h.png +0 -0
- data/public/images/cms/buttons/button_left_bg.png +0 -0
- data/public/images/cms/buttons/button_off.png +0 -0
- data/public/images/cms/buttons/button_off_middle.png +0 -0
- data/public/images/cms/buttons/delete_x.png +0 -0
- data/public/images/cms/buttons/delete_x_disabled.png +0 -0
- data/public/images/cms/buttons/delete_x_h.png +0 -0
- data/public/images/cms/buttons/sm_button.gif +0 -0
- data/public/images/cms/buttons/sm_button_2.gif +0 -0
- data/public/images/cms/buttons/sm_button_2_h.gif +0 -0
- data/public/images/cms/buttons/sm_button_h.gif +0 -0
- data/public/images/cms/containers/add.gif +0 -0
- data/public/images/cms/containers/alpha.png +0 -0
- data/public/images/cms/containers/beta.png +0 -0
- data/public/images/cms/containers/delete.gif +0 -0
- data/public/images/cms/containers/down.gif +0 -0
- data/public/images/cms/containers/edit.gif +0 -0
- data/public/images/cms/containers/up.gif +0 -0
- data/public/images/cms/containers/view.gif +0 -0
- data/public/images/cms/content_bg.gif +0 -0
- data/public/images/cms/dashboard/bottom_cap.png +0 -0
- data/public/images/cms/dashboard/bottom_cap_content.png +0 -0
- data/public/images/cms/dashboard/header_bg.gif +0 -0
- data/public/images/cms/dashboard/header_left_bg.gif +0 -0
- data/public/images/cms/dashboard/table_header_bg.gif +0 -0
- data/public/images/cms/dashboard/top_cap.png +0 -0
- data/public/images/cms/dashed.gif +0 -0
- data/public/images/cms/datepicker/clear.gif +0 -0
- data/public/images/cms/datepicker/close.gif +0 -0
- data/public/images/cms/dk_button_l.gif +0 -0
- data/public/images/cms/dk_button_r.gif +0 -0
- data/public/images/cms/dot.png +0 -0
- data/public/images/cms/draft_status.gif +0 -0
- data/public/images/cms/gray_long_bg.gif +0 -0
- data/public/images/cms/icons/actions/add.png +0 -0
- data/public/images/cms/icons/actions/config.png +0 -0
- data/public/images/cms/icons/actions/connect.png +0 -0
- data/public/images/cms/icons/actions/delete.png +0 -0
- data/public/images/cms/icons/actions/down.png +0 -0
- data/public/images/cms/icons/actions/edit.png +0 -0
- data/public/images/cms/icons/actions/folder.png +0 -0
- data/public/images/cms/icons/actions/folder_add.png +0 -0
- data/public/images/cms/icons/actions/folder_delete.png +0 -0
- data/public/images/cms/icons/actions/folder_edit.png +0 -0
- data/public/images/cms/icons/actions/folder_move.png +0 -0
- data/public/images/cms/icons/actions/folder_open.png +0 -0
- data/public/images/cms/icons/actions/history.png +0 -0
- data/public/images/cms/icons/actions/home.png +0 -0
- data/public/images/cms/icons/actions/left.png +0 -0
- data/public/images/cms/icons/actions/link.png +0 -0
- data/public/images/cms/icons/actions/page.png +0 -0
- data/public/images/cms/icons/actions/page_add.png +0 -0
- data/public/images/cms/icons/actions/page_edit.png +0 -0
- data/public/images/cms/icons/actions/page_move.png +0 -0
- data/public/images/cms/icons/actions/redo.png +0 -0
- data/public/images/cms/icons/actions/refresh.png +0 -0
- data/public/images/cms/icons/actions/right.png +0 -0
- data/public/images/cms/icons/actions/root_folder.png +0 -0
- data/public/images/cms/icons/actions/root_link.png +0 -0
- data/public/images/cms/icons/actions/root_page.png +0 -0
- data/public/images/cms/icons/actions/undo.png +0 -0
- data/public/images/cms/icons/actions/up.png +0 -0
- data/public/images/cms/icons/actions/view.png +0 -0
- data/public/images/cms/icons/file_types/doc.png +0 -0
- data/public/images/cms/icons/file_types/file.png +0 -0
- data/public/images/cms/icons/file_types/gif.png +0 -0
- data/public/images/cms/icons/file_types/htm.png +0 -0
- data/public/images/cms/icons/file_types/pdf.png +0 -0
- data/public/images/cms/icons/file_types/ppt.png +0 -0
- data/public/images/cms/icons/file_types/swf.png +0 -0
- data/public/images/cms/icons/file_types/txt.png +0 -0
- data/public/images/cms/icons/file_types/xls.png +0 -0
- data/public/images/cms/icons/file_types/xml.png +0 -0
- data/public/images/cms/icons/file_types/zip.png +0 -0
- data/public/images/cms/icons/status/archived.gif +0 -0
- data/public/images/cms/icons/status/draft.gif +0 -0
- data/public/images/cms/icons/status/hidden.gif +0 -0
- data/public/images/cms/icons/status/locked.gif +0 -0
- data/public/images/cms/icons/status/published.gif +0 -0
- data/public/images/cms/icons/status/unlocked.gif +0 -0
- data/public/images/cms/icons/user.png +0 -0
- data/public/images/cms/login_bg.jpg +0 -0
- data/public/images/cms/login_bottom.jpg +0 -0
- data/public/images/cms/login_top.gif +0 -0
- data/public/images/cms/lt_button_bg.gif +0 -0
- data/public/images/cms/lt_button_l.gif +0 -0
- data/public/images/cms/lt_button_r.gif +0 -0
- data/public/images/cms/menu.png +0 -0
- data/public/images/cms/menu/block_cap_h.gif +0 -0
- data/public/images/cms/menu/bottom_cap.png +0 -0
- data/public/images/cms/menu/bottom_cap_menu.png +0 -0
- data/public/images/cms/menu/bottom_cap_menu_first.png +0 -0
- data/public/images/cms/menu/menu_header_first_bg.gif +0 -0
- data/public/images/cms/menu/selected_block_cap.gif +0 -0
- data/public/images/cms/menu/top_cap.png +0 -0
- data/public/images/cms/menu/top_cap_menu_header.png +0 -0
- data/public/images/cms/menu_h.gif +0 -0
- data/public/images/cms/menu_header.png +0 -0
- data/public/images/cms/menu_open.png +0 -0
- data/public/images/cms/menu_open_bg.gif +0 -0
- data/public/images/cms/nav.png +0 -0
- data/public/images/cms/nav/on_bg.gif +0 -0
- data/public/images/cms/nav_admin.gif +0 -0
- data/public/images/cms/nav_admin_h.gif +0 -0
- data/public/images/cms/nav_admin_on.gif +0 -0
- data/public/images/cms/nav_cap.png +0 -0
- data/public/images/cms/nav_cap_h.gif +0 -0
- data/public/images/cms/nav_content_library.gif +0 -0
- data/public/images/cms/nav_content_library_h.gif +0 -0
- data/public/images/cms/nav_content_library_on.gif +0 -0
- data/public/images/cms/nav_dash.gif +0 -0
- data/public/images/cms/nav_dash_h.gif +0 -0
- data/public/images/cms/nav_dash_on.gif +0 -0
- data/public/images/cms/nav_h.gif +0 -0
- data/public/images/cms/nav_sitemap.gif +0 -0
- data/public/images/cms/nav_sitemap_h.gif +0 -0
- data/public/images/cms/nav_sitemap_on.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_bg.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_inset_bg.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_inset_draft_bg.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_inset_draft_l.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_inset_draft_r.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_inset_l.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_inset_published_bg.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_inset_published_l.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_inset_published_r.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_inset_r.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_l.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_r.gif +0 -0
- data/public/images/cms/page_toolbar/status_draft_bg.gif +0 -0
- data/public/images/cms/page_toolbar/status_draft_l.gif +0 -0
- data/public/images/cms/page_toolbar/status_l.gif +0 -0
- data/public/images/cms/page_toolbar/status_published_bg.gif +0 -0
- data/public/images/cms/page_toolbar/status_published_l.gif +0 -0
- data/public/images/cms/page_toolbar/visual_editor_bg.gif +0 -0
- data/public/images/cms/page_toolbar/visual_editor_end.gif +0 -0
- data/public/images/cms/page_toolbar/visual_editor_r.gif +0 -0
- data/public/images/cms/page_toolbar/visual_editor_state_bg.gif +0 -0
- data/public/images/cms/pages/add_connectable.gif +0 -0
- data/public/images/cms/pages/connect_connectable.gif +0 -0
- data/public/images/cms/pages/container_border.gif +0 -0
- data/public/images/cms/pages/container_border_l.gif +0 -0
- data/public/images/cms/pages/container_border_r.gif +0 -0
- data/public/images/cms/pages/delete_connectable.gif +0 -0
- data/public/images/cms/pages/down_connectable.gif +0 -0
- data/public/images/cms/pages/down_connectable_disabled.gif +0 -0
- data/public/images/cms/pages/edit_connectable.gif +0 -0
- data/public/images/cms/pages/edit_connectable_2.gif +0 -0
- data/public/images/cms/pages/show_connectable.gif +0 -0
- data/public/images/cms/pages/up_connectable.gif +0 -0
- data/public/images/cms/pages/up_connectable_disabled.gif +0 -0
- data/public/images/cms/pagination/first.gif +0 -0
- data/public/images/cms/pagination/first_h.gif +0 -0
- data/public/images/cms/pagination/input.gif +0 -0
- data/public/images/cms/pagination/last.gif +0 -0
- data/public/images/cms/pagination/last_h.gif +0 -0
- data/public/images/cms/pagination/next.gif +0 -0
- data/public/images/cms/pagination/next_h.gif +0 -0
- data/public/images/cms/pagination/previous.gif +0 -0
- data/public/images/cms/pagination/previous_h.gif +0 -0
- data/public/images/cms/published_status.gif +0 -0
- data/public/images/cms/search.png +0 -0
- data/public/images/cms/search_submit.gif +0 -0
- data/public/images/cms/search_submit_h.gif +0 -0
- data/public/images/cms/searchbox_gradient.gif +0 -0
- data/public/images/cms/select_bg.gif +0 -0
- data/public/images/cms/select_bg_2.gif +0 -0
- data/public/images/cms/sitemap/bottom_cap.png +0 -0
- data/public/images/cms/sitemap/buffer_caps.png +0 -0
- data/public/images/cms/sitemap/contract.png +0 -0
- data/public/images/cms/sitemap/corners.gif +0 -0
- data/public/images/cms/sitemap/corners_hover.gif +0 -0
- data/public/images/cms/sitemap/divider.gif +0 -0
- data/public/images/cms/sitemap/expand.png +0 -0
- data/public/images/cms/sitemap/gradient.gif +0 -0
- data/public/images/cms/sitemap/gray_contract.png +0 -0
- data/public/images/cms/sitemap/gray_expand.png +0 -0
- data/public/images/cms/sitemap/no_contents.png +0 -0
- data/public/images/cms/sitemap/site_root_cap.png +0 -0
- data/public/images/cms/sitemap/tooltip.gif +0 -0
- data/public/images/cms/sitemap/top_cap_content.png +0 -0
- data/public/images/cms/solid.gif +0 -0
- data/public/images/cms/table/bl.gif +0 -0
- data/public/images/cms/table/br.gif +0 -0
- data/public/images/cms/table/divider.gif +0 -0
- data/public/images/cms/table/td_cap_first_h.gif +0 -0
- data/public/images/cms/table/td_cap_first_s.gif +0 -0
- data/public/images/cms/table/td_cap_last_h.gif +0 -0
- data/public/images/cms/table/td_cap_last_s.gif +0 -0
- data/public/images/cms/table/td_last_bg.gif +0 -0
- data/public/images/cms/table/th_bg.gif +0 -0
- data/public/images/cms/table/th_divider.gif +0 -0
- data/public/images/cms/table/th_last_bg.gif +0 -0
- data/public/images/cms/table/tl.gif +0 -0
- data/public/images/cms/table/tr.gif +0 -0
- data/public/images/cms/table/tr_bg.gif +0 -0
- data/public/images/cms/thickbox/loadingAnimation.gif +0 -0
- data/public/images/cms/thickbox/macFFBgHack.png +0 -0
- data/public/images/cms/toolbar_bg.png +0 -0
- data/public/images/cms/top_cap.png +0 -0
- data/public/images/cms/top_cap_content.png +0 -0
- data/public/images/cms/top_cap_menu_header.png +0 -0
- data/public/images/cms/user_search_submit.gif +0 -0
- data/public/images/cms/usercontrols_bg.png +0 -0
- data/public/images/cms/usercontrols_bg_cap.png +0 -0
- data/public/images/rails.png +0 -0
- data/public/javascripts/application.js +0 -2
- data/public/javascripts/cms/application.js +0 -148
- data/public/javascripts/cms/content_library.js +0 -36
- data/public/javascripts/cms/sitemap.js +0 -438
- data/public/javascripts/controls.js +0 -963
- data/public/javascripts/dragdrop.js +0 -973
- data/public/javascripts/effects.js +0 -1128
- data/public/javascripts/jquery-ui.js +0 -591
- data/public/javascripts/jquery.contextMenu.js +0 -211
- data/public/javascripts/jquery.cookie.js +0 -96
- data/public/javascripts/jquery.dimensions.js +0 -119
- data/public/javascripts/jquery.js +0 -11
- data/public/javascripts/jquery.selectbox-0.5.js +0 -209
- data/public/javascripts/jquery.taglist.js +0 -136
- data/public/javascripts/jquery.thickbox.js +0 -10
- data/public/javascripts/prototype.js +0 -4320
- data/public/robots.txt +0 -5
- data/public/site/customconfig.js +0 -1
- data/public/stylesheets/cms/administration.css +0 -91
- data/public/stylesheets/cms/application.css +0 -166
- data/public/stylesheets/cms/block.css +0 -26
- data/public/stylesheets/cms/buttons.css +0 -120
- data/public/stylesheets/cms/content_library.css +0 -139
- data/public/stylesheets/cms/content_types.css +0 -4
- data/public/stylesheets/cms/dashboard.css +0 -118
- data/public/stylesheets/cms/data_table.css +0 -156
- data/public/stylesheets/cms/date_picker.css +0 -73
- data/public/stylesheets/cms/form_layout.css +0 -279
- data/public/stylesheets/cms/jquery.contextMenu.css +0 -61
- data/public/stylesheets/cms/login.css +0 -78
- data/public/stylesheets/cms/menu.css +0 -116
- data/public/stylesheets/cms/nav.css +0 -99
- data/public/stylesheets/cms/page_toolbar.css +0 -135
- data/public/stylesheets/cms/reset.css +0 -46
- data/public/stylesheets/cms/selectbox.css +0 -56
- data/public/stylesheets/cms/sitemap.css +0 -390
- data/public/stylesheets/cms/taglist.css +0 -18
- data/public/stylesheets/cms/thickbox.css +0 -163
- data/script/about +0 -4
- data/script/console +0 -3
- data/script/dbconsole +0 -3
- data/script/destroy +0 -3
- data/script/generate +0 -3
- data/script/performance/benchmarker +0 -3
- data/script/performance/profiler +0 -3
- data/script/plugin +0 -3
- data/script/runner +0 -3
- data/script/server +0 -3
|
Binary file
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
|
|
3
|
-
For licensing, see LICENSE.html or http://ckeditor.com/license
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
CKEDITOR.plugins.add( 'link',
|
|
7
|
-
{
|
|
8
|
-
init : function( editor )
|
|
9
|
-
{
|
|
10
|
-
// Add the link and unlink buttons.
|
|
11
|
-
editor.addCommand( 'link', new CKEDITOR.dialogCommand( 'link' ) );
|
|
12
|
-
editor.addCommand( 'anchor', new CKEDITOR.dialogCommand( 'anchor' ) );
|
|
13
|
-
editor.addCommand( 'unlink', new CKEDITOR.unlinkCommand() );
|
|
14
|
-
editor.ui.addButton( 'Link',
|
|
15
|
-
{
|
|
16
|
-
label : editor.lang.link.toolbar,
|
|
17
|
-
command : 'link'
|
|
18
|
-
} );
|
|
19
|
-
editor.ui.addButton( 'Unlink',
|
|
20
|
-
{
|
|
21
|
-
label : editor.lang.unlink,
|
|
22
|
-
command : 'unlink'
|
|
23
|
-
} );
|
|
24
|
-
editor.ui.addButton( 'Anchor',
|
|
25
|
-
{
|
|
26
|
-
label : editor.lang.anchor.toolbar,
|
|
27
|
-
command : 'anchor'
|
|
28
|
-
} );
|
|
29
|
-
CKEDITOR.dialog.add( 'link', this.path + 'dialogs/link.js' );
|
|
30
|
-
CKEDITOR.dialog.add( 'anchor', this.path + 'dialogs/anchor.js' );
|
|
31
|
-
|
|
32
|
-
// Add the CSS styles for anchor placeholders.
|
|
33
|
-
editor.addCss(
|
|
34
|
-
'img.cke_anchor' +
|
|
35
|
-
'{' +
|
|
36
|
-
'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/anchor.gif' ) + ');' +
|
|
37
|
-
'background-position: center center;' +
|
|
38
|
-
'background-repeat: no-repeat;' +
|
|
39
|
-
'border: 1px solid #a9a9a9;' +
|
|
40
|
-
'width: 18px;' +
|
|
41
|
-
'height: 18px;' +
|
|
42
|
-
'}\n' +
|
|
43
|
-
'a.cke_anchor' +
|
|
44
|
-
'{' +
|
|
45
|
-
'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/anchor.gif' ) + ');' +
|
|
46
|
-
'background-position: 0 center;' +
|
|
47
|
-
'background-repeat: no-repeat;' +
|
|
48
|
-
'border: 1px solid #a9a9a9;' +
|
|
49
|
-
'padding-left: 18px;' +
|
|
50
|
-
'}'
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
// Register selection change handler for the unlink button.
|
|
54
|
-
editor.on( 'selectionChange', function( evt )
|
|
55
|
-
{
|
|
56
|
-
/*
|
|
57
|
-
* Despite our initial hope, document.queryCommandEnabled() does not work
|
|
58
|
-
* for this in Firefox. So we must detect the state by element paths.
|
|
59
|
-
*/
|
|
60
|
-
var command = editor.getCommand( 'unlink' ),
|
|
61
|
-
element = evt.data.path.lastElement.getAscendant( 'a', true );
|
|
62
|
-
if ( element && element.getName() == 'a' && element.getAttribute( 'href' ) )
|
|
63
|
-
command.setState( CKEDITOR.TRISTATE_OFF );
|
|
64
|
-
else
|
|
65
|
-
command.setState( CKEDITOR.TRISTATE_DISABLED );
|
|
66
|
-
} );
|
|
67
|
-
|
|
68
|
-
// If the "menu" plugin is loaded, register the menu items.
|
|
69
|
-
if ( editor.addMenuItems )
|
|
70
|
-
{
|
|
71
|
-
editor.addMenuItems(
|
|
72
|
-
{
|
|
73
|
-
anchor :
|
|
74
|
-
{
|
|
75
|
-
label : editor.lang.anchor.menu,
|
|
76
|
-
command : 'anchor',
|
|
77
|
-
group : 'anchor'
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
link :
|
|
81
|
-
{
|
|
82
|
-
label : editor.lang.link.menu,
|
|
83
|
-
command : 'link',
|
|
84
|
-
group : 'link',
|
|
85
|
-
order : 1
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
unlink :
|
|
89
|
-
{
|
|
90
|
-
label : editor.lang.unlink,
|
|
91
|
-
command : 'unlink',
|
|
92
|
-
group : 'link',
|
|
93
|
-
order : 5
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// If the "contextmenu" plugin is loaded, register the listeners.
|
|
99
|
-
if ( editor.contextMenu )
|
|
100
|
-
{
|
|
101
|
-
editor.contextMenu.addListener( function( element, selection )
|
|
102
|
-
{
|
|
103
|
-
if ( !element )
|
|
104
|
-
return null;
|
|
105
|
-
|
|
106
|
-
var isAnchor = ( element.is( 'img' ) && element.getAttribute( '_cke_real_element_type' ) == 'anchor' );
|
|
107
|
-
|
|
108
|
-
if ( !isAnchor )
|
|
109
|
-
{
|
|
110
|
-
if ( !( element = element.getAscendant( 'a', true ) ) )
|
|
111
|
-
return null;
|
|
112
|
-
|
|
113
|
-
isAnchor = ( element.getAttribute( 'name' ) && !element.getAttribute( 'href' ) );
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
return isAnchor ?
|
|
117
|
-
{ anchor : CKEDITOR.TRISTATE_OFF } :
|
|
118
|
-
{ link : CKEDITOR.TRISTATE_OFF, unlink : CKEDITOR.TRISTATE_OFF };
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
afterInit : function( editor )
|
|
124
|
-
{
|
|
125
|
-
// Register a filter to displaying placeholders after mode change.
|
|
126
|
-
|
|
127
|
-
var dataProcessor = editor.dataProcessor,
|
|
128
|
-
dataFilter = dataProcessor && dataProcessor.dataFilter;
|
|
129
|
-
|
|
130
|
-
if ( dataFilter )
|
|
131
|
-
{
|
|
132
|
-
dataFilter.addRules(
|
|
133
|
-
{
|
|
134
|
-
elements :
|
|
135
|
-
{
|
|
136
|
-
a : function( element )
|
|
137
|
-
{
|
|
138
|
-
var attributes = element.attributes;
|
|
139
|
-
if ( attributes.name && !attributes.href )
|
|
140
|
-
return editor.createFakeParserElement( element, 'cke_anchor', 'anchor' );
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
requires : [ 'fakeobjects' ]
|
|
148
|
-
} );
|
|
149
|
-
|
|
150
|
-
CKEDITOR.unlinkCommand = function(){};
|
|
151
|
-
CKEDITOR.unlinkCommand.prototype =
|
|
152
|
-
{
|
|
153
|
-
/** @ignore */
|
|
154
|
-
exec : function( editor )
|
|
155
|
-
{
|
|
156
|
-
/*
|
|
157
|
-
* execCommand( 'unlink', ... ) in Firefox leaves behind <span> tags at where
|
|
158
|
-
* the <a> was, so again we have to remove the link ourselves. (See #430)
|
|
159
|
-
*
|
|
160
|
-
* TODO: Use the style system when it's complete. Let's use execCommand()
|
|
161
|
-
* as a stopgap solution for now.
|
|
162
|
-
*/
|
|
163
|
-
var selection = editor.getSelection(),
|
|
164
|
-
bookmarks = selection.createBookmarks(),
|
|
165
|
-
ranges = selection.getRanges(),
|
|
166
|
-
rangeRoot,
|
|
167
|
-
element;
|
|
168
|
-
|
|
169
|
-
for ( var i = 0 ; i < ranges.length ; i++ )
|
|
170
|
-
{
|
|
171
|
-
rangeRoot = ranges[i].getCommonAncestor( true );
|
|
172
|
-
element = rangeRoot.getAscendant( 'a', true );
|
|
173
|
-
if ( !element )
|
|
174
|
-
continue;
|
|
175
|
-
ranges[i].selectNodeContents( element );
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
selection.selectRanges( ranges );
|
|
179
|
-
editor.document.$.execCommand( 'unlink', false, null );
|
|
180
|
-
selection.selectBookmarks( bookmarks );
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
CKEDITOR.tools.extend( CKEDITOR.config,
|
|
185
|
-
{
|
|
186
|
-
linkShowAdvancedTab : true,
|
|
187
|
-
linkShowTargetTab : true
|
|
188
|
-
} );
|
|
@@ -1,570 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
|
|
3
|
-
For licensing, see LICENSE.html or http://ckeditor.com/license
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @file Insert and remove numbered and bulleted lists.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
(function()
|
|
11
|
-
{
|
|
12
|
-
var listNodeNames = { ol : 1, ul : 1 },
|
|
13
|
-
emptyTextRegex = /^[\n\r\t ]*$/;
|
|
14
|
-
|
|
15
|
-
CKEDITOR.plugins.list = {
|
|
16
|
-
/*
|
|
17
|
-
* Convert a DOM list tree into a data structure that is easier to
|
|
18
|
-
* manipulate. This operation should be non-intrusive in the sense that it
|
|
19
|
-
* does not change the DOM tree, with the exception that it may add some
|
|
20
|
-
* markers to the list item nodes when database is specified.
|
|
21
|
-
*/
|
|
22
|
-
listToArray : function( listNode, database, baseArray, baseIndentLevel, grandparentNode )
|
|
23
|
-
{
|
|
24
|
-
if ( !listNodeNames[ listNode.getName() ] )
|
|
25
|
-
return [];
|
|
26
|
-
|
|
27
|
-
if ( !baseIndentLevel )
|
|
28
|
-
baseIndentLevel = 0;
|
|
29
|
-
if ( !baseArray )
|
|
30
|
-
baseArray = [];
|
|
31
|
-
|
|
32
|
-
// Iterate over all list items to get their contents and look for inner lists.
|
|
33
|
-
for ( var i = 0, count = listNode.getChildCount() ; i < count ; i++ )
|
|
34
|
-
{
|
|
35
|
-
var listItem = listNode.getChild( i );
|
|
36
|
-
|
|
37
|
-
// It may be a text node or some funny stuff.
|
|
38
|
-
if ( listItem.$.nodeName.toLowerCase() != 'li' )
|
|
39
|
-
continue;
|
|
40
|
-
var itemObj = { 'parent' : listNode, indent : baseIndentLevel, contents : [] };
|
|
41
|
-
if ( !grandparentNode )
|
|
42
|
-
{
|
|
43
|
-
itemObj.grandparent = listNode.getParent();
|
|
44
|
-
if ( itemObj.grandparent && itemObj.grandparent.$.nodeName.toLowerCase() == 'li' )
|
|
45
|
-
itemObj.grandparent = itemObj.grandparent.getParent();
|
|
46
|
-
}
|
|
47
|
-
else
|
|
48
|
-
itemObj.grandparent = grandparentNode;
|
|
49
|
-
|
|
50
|
-
if ( database )
|
|
51
|
-
CKEDITOR.dom.element.setMarker( database, listItem, 'listarray_index', baseArray.length );
|
|
52
|
-
baseArray.push( itemObj );
|
|
53
|
-
|
|
54
|
-
for ( var j = 0, itemChildCount = listItem.getChildCount() ; j < itemChildCount ; j++ )
|
|
55
|
-
{
|
|
56
|
-
var child = listItem.getChild( j );
|
|
57
|
-
if ( child.type == CKEDITOR.NODE_ELEMENT && listNodeNames[ child.getName() ] )
|
|
58
|
-
// Note the recursion here, it pushes inner list items with
|
|
59
|
-
// +1 indentation in the correct order.
|
|
60
|
-
CKEDITOR.plugins.list.listToArray( child, database, baseArray, baseIndentLevel + 1, itemObj.grandparent );
|
|
61
|
-
else
|
|
62
|
-
itemObj.contents.push( child );
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return baseArray;
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
// Convert our internal representation of a list back to a DOM forest.
|
|
69
|
-
arrayToList : function( listArray, database, baseIndex, paragraphMode )
|
|
70
|
-
{
|
|
71
|
-
if ( !baseIndex )
|
|
72
|
-
baseIndex = 0;
|
|
73
|
-
if ( !listArray || listArray.length < baseIndex + 1 )
|
|
74
|
-
return null;
|
|
75
|
-
var doc = listArray[ baseIndex ].parent.getDocument(),
|
|
76
|
-
retval = new CKEDITOR.dom.documentFragment( doc ),
|
|
77
|
-
rootNode = null,
|
|
78
|
-
currentIndex = baseIndex,
|
|
79
|
-
indentLevel = Math.max( listArray[ baseIndex ].indent, 0 ),
|
|
80
|
-
currentListItem = null,
|
|
81
|
-
paragraphName = ( paragraphMode == CKEDITOR.ENTER_P ? 'p' : 'div' );
|
|
82
|
-
while ( true )
|
|
83
|
-
{
|
|
84
|
-
var item = listArray[ currentIndex ];
|
|
85
|
-
if ( item.indent == indentLevel )
|
|
86
|
-
{
|
|
87
|
-
if ( !rootNode || listArray[ currentIndex ].parent.getName() != rootNode.getName() )
|
|
88
|
-
{
|
|
89
|
-
rootNode = listArray[ currentIndex ].parent.clone( false, true );
|
|
90
|
-
retval.append( rootNode );
|
|
91
|
-
}
|
|
92
|
-
currentListItem = rootNode.append( doc.createElement( 'li' ) );
|
|
93
|
-
for ( var i = 0 ; i < item.contents.length ; i++ )
|
|
94
|
-
currentListItem.append( item.contents[i].clone( true, true ) );
|
|
95
|
-
currentIndex++;
|
|
96
|
-
}
|
|
97
|
-
else if ( item.indent == Math.max( indentLevel, 0 ) + 1 )
|
|
98
|
-
{
|
|
99
|
-
var listData = CKEDITOR.plugins.list.arrayToList( listArray, null, currentIndex, paragraphMode );
|
|
100
|
-
currentListItem.append( listData.listNode );
|
|
101
|
-
currentIndex = listData.nextIndex;
|
|
102
|
-
}
|
|
103
|
-
else if ( item.indent == -1 && !baseIndex && item.grandparent )
|
|
104
|
-
{
|
|
105
|
-
currentListItem;
|
|
106
|
-
if ( listNodeNames[ item.grandparent.getName() ] )
|
|
107
|
-
currentListItem = doc.createElement( 'li' );
|
|
108
|
-
else
|
|
109
|
-
{
|
|
110
|
-
if ( paragraphMode != CKEDITOR.ENTER_BR && item.grandparent.getName() != 'td' )
|
|
111
|
-
currentListItem = doc.createElement( paragraphName );
|
|
112
|
-
else
|
|
113
|
-
currentListItem = new CKEDITOR.dom.documentFragment( doc );
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
for ( i = 0 ; i < item.contents.length ; i++ )
|
|
117
|
-
currentListItem.append( item.contents[i].clone( true, true ) );
|
|
118
|
-
|
|
119
|
-
if ( currentListItem.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT
|
|
120
|
-
&& currentIndex != listArray.length - 1 )
|
|
121
|
-
{
|
|
122
|
-
if ( currentListItem.getLast()
|
|
123
|
-
&& currentListItem.getLast().type == CKEDITOR.NODE_ELEMENT
|
|
124
|
-
&& currentListItem.getLast().getAttribute( 'type' ) == '_moz' )
|
|
125
|
-
currentListItem.getLast().remove();
|
|
126
|
-
currentListItem.appendBogus();
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
if ( currentListItem.type == CKEDITOR.NODE_ELEMENT &&
|
|
130
|
-
currentListItem.getName() == paragraphName &&
|
|
131
|
-
currentListItem.$.firstChild )
|
|
132
|
-
{
|
|
133
|
-
currentListItem.trim();
|
|
134
|
-
var firstChild = currentListItem.getFirst();
|
|
135
|
-
if ( firstChild.type == CKEDITOR.NODE_ELEMENT && firstChild.isBlockBoundary() )
|
|
136
|
-
{
|
|
137
|
-
var tmp = new CKEDITOR.dom.documentFragment( doc );
|
|
138
|
-
currentListItem.moveChildren( tmp );
|
|
139
|
-
currentListItem = tmp;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
var currentListItemName = currentListItem.$.nodeName.toLowerCase();
|
|
144
|
-
if ( !CKEDITOR.env.ie && ( currentListItemName == 'div' || currentListItemName == 'p' ) )
|
|
145
|
-
currentListItem.appendBogus();
|
|
146
|
-
retval.append( currentListItem );
|
|
147
|
-
rootNode = null;
|
|
148
|
-
currentIndex++;
|
|
149
|
-
}
|
|
150
|
-
else
|
|
151
|
-
return null;
|
|
152
|
-
|
|
153
|
-
if ( listArray.length <= currentIndex || Math.max( listArray[ currentIndex ].indent, 0 ) < indentLevel )
|
|
154
|
-
break;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
// Clear marker attributes for the new list tree made of cloned nodes, if any.
|
|
158
|
-
if ( database )
|
|
159
|
-
{
|
|
160
|
-
var currentNode = retval.getFirst();
|
|
161
|
-
while ( currentNode )
|
|
162
|
-
{
|
|
163
|
-
if ( currentNode.type == CKEDITOR.NODE_ELEMENT )
|
|
164
|
-
CKEDITOR.dom.element.clearMarkers( database, currentNode );
|
|
165
|
-
currentNode = currentNode.getNextSourceNode();
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return { listNode : retval, nextIndex : currentIndex };
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
function setState( editor, state )
|
|
174
|
-
{
|
|
175
|
-
editor.getCommand( this.name ).setState( state );
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
function onSelectionChange( evt )
|
|
179
|
-
{
|
|
180
|
-
var path = evt.data.path,
|
|
181
|
-
blockLimit = path.blockLimit,
|
|
182
|
-
elements = path.elements,
|
|
183
|
-
element;
|
|
184
|
-
|
|
185
|
-
// Grouping should only happen under blockLimit.(#3940).
|
|
186
|
-
for ( var i = 0 ; i < elements.length && ( element = elements[ i ] )
|
|
187
|
-
&& !element.equals( blockLimit ); i++ )
|
|
188
|
-
{
|
|
189
|
-
if ( listNodeNames[ elements[i].getName() ] )
|
|
190
|
-
{
|
|
191
|
-
return setState.call( this, evt.editor,
|
|
192
|
-
this.type == elements[i].getName() ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF );
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
return setState.call( this, evt.editor, CKEDITOR.TRISTATE_OFF );
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
function changeListType( editor, groupObj, database, listsCreated )
|
|
200
|
-
{
|
|
201
|
-
// This case is easy...
|
|
202
|
-
// 1. Convert the whole list into a one-dimensional array.
|
|
203
|
-
// 2. Change the list type by modifying the array.
|
|
204
|
-
// 3. Recreate the whole list by converting the array to a list.
|
|
205
|
-
// 4. Replace the original list with the recreated list.
|
|
206
|
-
var listArray = CKEDITOR.plugins.list.listToArray( groupObj.root, database ),
|
|
207
|
-
selectedListItems = [];
|
|
208
|
-
|
|
209
|
-
for ( var i = 0 ; i < groupObj.contents.length ; i++ )
|
|
210
|
-
{
|
|
211
|
-
var itemNode = groupObj.contents[i];
|
|
212
|
-
itemNode = itemNode.getAscendant( 'li', true );
|
|
213
|
-
if ( !itemNode || itemNode.getCustomData( 'list_item_processed' ) )
|
|
214
|
-
continue;
|
|
215
|
-
selectedListItems.push( itemNode );
|
|
216
|
-
CKEDITOR.dom.element.setMarker( database, itemNode, 'list_item_processed', true );
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
var fakeParent = groupObj.root.getDocument().createElement( this.type );
|
|
220
|
-
for ( i = 0 ; i < selectedListItems.length ; i++ )
|
|
221
|
-
{
|
|
222
|
-
var listIndex = selectedListItems[i].getCustomData( 'listarray_index' );
|
|
223
|
-
listArray[listIndex].parent = fakeParent;
|
|
224
|
-
}
|
|
225
|
-
var newList = CKEDITOR.plugins.list.arrayToList( listArray, database, null, editor.config.enterMode );
|
|
226
|
-
var child, length = newList.listNode.getChildCount();
|
|
227
|
-
for ( i = 0 ; i < length && ( child = newList.listNode.getChild( i ) ) ; i++ )
|
|
228
|
-
{
|
|
229
|
-
if ( child.getName() == this.type )
|
|
230
|
-
listsCreated.push( child );
|
|
231
|
-
}
|
|
232
|
-
newList.listNode.replace( groupObj.root );
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
function createList( editor, groupObj, listsCreated )
|
|
236
|
-
{
|
|
237
|
-
var contents = groupObj.contents,
|
|
238
|
-
doc = groupObj.root.getDocument(),
|
|
239
|
-
listContents = [];
|
|
240
|
-
|
|
241
|
-
// It is possible to have the contents returned by DomRangeIterator to be the same as the root.
|
|
242
|
-
// e.g. when we're running into table cells.
|
|
243
|
-
// In such a case, enclose the childNodes of contents[0] into a <div>.
|
|
244
|
-
if ( contents.length == 1 && contents[0].equals( groupObj.root ) )
|
|
245
|
-
{
|
|
246
|
-
var divBlock = doc.createElement( 'div' );
|
|
247
|
-
contents[0].moveChildren && contents[0].moveChildren( divBlock );
|
|
248
|
-
contents[0].append( divBlock );
|
|
249
|
-
contents[0] = divBlock;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
// Calculate the common parent node of all content blocks.
|
|
253
|
-
var commonParent = groupObj.contents[0].getParent();
|
|
254
|
-
for ( var i = 0 ; i < contents.length ; i++ )
|
|
255
|
-
commonParent = commonParent.getCommonAncestor( contents[i].getParent() );
|
|
256
|
-
|
|
257
|
-
// We want to insert things that are in the same tree level only, so calculate the contents again
|
|
258
|
-
// by expanding the selected blocks to the same tree level.
|
|
259
|
-
for ( i = 0 ; i < contents.length ; i++ )
|
|
260
|
-
{
|
|
261
|
-
var contentNode = contents[i],
|
|
262
|
-
parentNode;
|
|
263
|
-
while ( ( parentNode = contentNode.getParent() ) )
|
|
264
|
-
{
|
|
265
|
-
if ( parentNode.equals( commonParent ) )
|
|
266
|
-
{
|
|
267
|
-
listContents.push( contentNode );
|
|
268
|
-
break;
|
|
269
|
-
}
|
|
270
|
-
contentNode = parentNode;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
if ( listContents.length < 1 )
|
|
275
|
-
return;
|
|
276
|
-
|
|
277
|
-
// Insert the list to the DOM tree.
|
|
278
|
-
var insertAnchor = listContents[ listContents.length - 1 ].getNext(),
|
|
279
|
-
listNode = doc.createElement( this.type );
|
|
280
|
-
|
|
281
|
-
listsCreated.push( listNode );
|
|
282
|
-
while ( listContents.length )
|
|
283
|
-
{
|
|
284
|
-
var contentBlock = listContents.shift(),
|
|
285
|
-
listItem = doc.createElement( 'li' );
|
|
286
|
-
contentBlock.moveChildren( listItem );
|
|
287
|
-
contentBlock.remove();
|
|
288
|
-
listItem.appendTo( listNode );
|
|
289
|
-
|
|
290
|
-
// Append a bogus BR to force the LI to render at full height
|
|
291
|
-
if ( !CKEDITOR.env.ie )
|
|
292
|
-
listItem.appendBogus();
|
|
293
|
-
}
|
|
294
|
-
if ( insertAnchor )
|
|
295
|
-
listNode.insertBefore( insertAnchor );
|
|
296
|
-
else
|
|
297
|
-
listNode.appendTo( commonParent );
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
function removeList( editor, groupObj, database )
|
|
301
|
-
{
|
|
302
|
-
// This is very much like the change list type operation.
|
|
303
|
-
// Except that we're changing the selected items' indent to -1 in the list array.
|
|
304
|
-
var listArray = CKEDITOR.plugins.list.listToArray( groupObj.root, database ),
|
|
305
|
-
selectedListItems = [];
|
|
306
|
-
|
|
307
|
-
for ( var i = 0 ; i < groupObj.contents.length ; i++ )
|
|
308
|
-
{
|
|
309
|
-
var itemNode = groupObj.contents[i];
|
|
310
|
-
itemNode = itemNode.getAscendant( 'li', true );
|
|
311
|
-
if ( !itemNode || itemNode.getCustomData( 'list_item_processed' ) )
|
|
312
|
-
continue;
|
|
313
|
-
selectedListItems.push( itemNode );
|
|
314
|
-
CKEDITOR.dom.element.setMarker( database, itemNode, 'list_item_processed', true );
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
var lastListIndex = null;
|
|
318
|
-
for ( i = 0 ; i < selectedListItems.length ; i++ )
|
|
319
|
-
{
|
|
320
|
-
var listIndex = selectedListItems[i].getCustomData( 'listarray_index' );
|
|
321
|
-
listArray[listIndex].indent = -1;
|
|
322
|
-
lastListIndex = listIndex;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
// After cutting parts of the list out with indent=-1, we still have to maintain the array list
|
|
326
|
-
// model's nextItem.indent <= currentItem.indent + 1 invariant. Otherwise the array model of the
|
|
327
|
-
// list cannot be converted back to a real DOM list.
|
|
328
|
-
for ( i = lastListIndex + 1 ; i < listArray.length ; i++ )
|
|
329
|
-
{
|
|
330
|
-
if ( listArray[i].indent > listArray[i-1].indent + 1 )
|
|
331
|
-
{
|
|
332
|
-
var indentOffset = listArray[i-1].indent + 1 - listArray[i].indent;
|
|
333
|
-
var oldIndent = listArray[i].indent;
|
|
334
|
-
while ( listArray[i] && listArray[i].indent >= oldIndent )
|
|
335
|
-
{
|
|
336
|
-
listArray[i].indent += indentOffset;
|
|
337
|
-
i++;
|
|
338
|
-
}
|
|
339
|
-
i--;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
var newList = CKEDITOR.plugins.list.arrayToList( listArray, database, null, editor.config.enterMode );
|
|
344
|
-
|
|
345
|
-
// Compensate <br> before/after the list node if the surrounds are non-blocks.(#3836)
|
|
346
|
-
var docFragment = newList.listNode, boundaryNode, siblingNode;
|
|
347
|
-
function compensateBrs( isStart )
|
|
348
|
-
{
|
|
349
|
-
if ( ( boundaryNode = docFragment[ isStart ? 'getFirst' : 'getLast' ]() )
|
|
350
|
-
&& !( boundaryNode.is && boundaryNode.isBlockBoundary() )
|
|
351
|
-
&& ( siblingNode = groupObj.root[ isStart ? 'getPrevious' : 'getNext' ]
|
|
352
|
-
( CKEDITOR.dom.walker.whitespaces( true ) ) )
|
|
353
|
-
&& !( siblingNode.is && siblingNode.isBlockBoundary( { br : 1 } ) ) )
|
|
354
|
-
editor.document.createElement( 'br' )[ isStart ? 'insertBefore' : 'insertAfter' ]( boundaryNode );
|
|
355
|
-
}
|
|
356
|
-
compensateBrs( true );
|
|
357
|
-
compensateBrs();
|
|
358
|
-
|
|
359
|
-
var rootParent = groupObj.root.getParent();
|
|
360
|
-
docFragment.replace( groupObj.root );
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
function listCommand( name, type )
|
|
364
|
-
{
|
|
365
|
-
this.name = name;
|
|
366
|
-
this.type = type;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
listCommand.prototype = {
|
|
370
|
-
exec : function( editor )
|
|
371
|
-
{
|
|
372
|
-
editor.focus();
|
|
373
|
-
|
|
374
|
-
var doc = editor.document,
|
|
375
|
-
selection = editor.getSelection(),
|
|
376
|
-
ranges = selection && selection.getRanges();
|
|
377
|
-
|
|
378
|
-
// There should be at least one selected range.
|
|
379
|
-
if ( !ranges || ranges.length < 1 )
|
|
380
|
-
return;
|
|
381
|
-
|
|
382
|
-
// Midas lists rule #1 says we can create a list even in an empty document.
|
|
383
|
-
// But DOM iterator wouldn't run if the document is really empty.
|
|
384
|
-
// So create a paragraph if the document is empty and we're going to create a list.
|
|
385
|
-
if ( this.state == CKEDITOR.TRISTATE_OFF )
|
|
386
|
-
{
|
|
387
|
-
var body = doc.getBody();
|
|
388
|
-
body.trim();
|
|
389
|
-
if ( !body.getFirst() )
|
|
390
|
-
{
|
|
391
|
-
var paragraph = doc.createElement( editor.config.enterMode == CKEDITOR.ENTER_P ? 'p' :
|
|
392
|
-
( editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'br' ) );
|
|
393
|
-
paragraph.appendTo( body );
|
|
394
|
-
ranges = [ new CKEDITOR.dom.range( doc ) ];
|
|
395
|
-
// IE exception on inserting anything when anchor inside <br>.
|
|
396
|
-
if ( paragraph.is( 'br' ) )
|
|
397
|
-
{
|
|
398
|
-
ranges[ 0 ].setStartBefore( paragraph );
|
|
399
|
-
ranges[ 0 ].setEndAfter( paragraph );
|
|
400
|
-
}
|
|
401
|
-
else
|
|
402
|
-
ranges[ 0 ].selectNodeContents( paragraph );
|
|
403
|
-
selection.selectRanges( ranges );
|
|
404
|
-
}
|
|
405
|
-
// Maybe a single range there enclosing the whole list,
|
|
406
|
-
// turn on the list state manually(#4129).
|
|
407
|
-
else
|
|
408
|
-
{
|
|
409
|
-
var range = ranges.length == 1 && ranges[ 0 ],
|
|
410
|
-
enclosedNode = range && range.getEnclosedNode();
|
|
411
|
-
if ( enclosedNode && enclosedNode.is
|
|
412
|
-
&& this.type == enclosedNode.getName() )
|
|
413
|
-
{
|
|
414
|
-
setState.call( this, editor, CKEDITOR.TRISTATE_ON );
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
var bookmarks = selection.createBookmarks( true );
|
|
420
|
-
|
|
421
|
-
// Group the blocks up because there are many cases where multiple lists have to be created,
|
|
422
|
-
// or multiple lists have to be cancelled.
|
|
423
|
-
var listGroups = [],
|
|
424
|
-
database = {};
|
|
425
|
-
|
|
426
|
-
while ( ranges.length > 0 )
|
|
427
|
-
{
|
|
428
|
-
range = ranges.shift();
|
|
429
|
-
|
|
430
|
-
var boundaryNodes = range.getBoundaryNodes(),
|
|
431
|
-
startNode = boundaryNodes.startNode,
|
|
432
|
-
endNode = boundaryNodes.endNode;
|
|
433
|
-
|
|
434
|
-
if ( startNode.type == CKEDITOR.NODE_ELEMENT && startNode.getName() == 'td' )
|
|
435
|
-
range.setStartAt( boundaryNodes.startNode, CKEDITOR.POSITION_AFTER_START );
|
|
436
|
-
|
|
437
|
-
if ( endNode.type == CKEDITOR.NODE_ELEMENT && endNode.getName() == 'td' )
|
|
438
|
-
range.setEndAt( boundaryNodes.endNode, CKEDITOR.POSITION_BEFORE_END );
|
|
439
|
-
|
|
440
|
-
var iterator = range.createIterator(),
|
|
441
|
-
block;
|
|
442
|
-
|
|
443
|
-
iterator.forceBrBreak = ( this.state == CKEDITOR.TRISTATE_OFF );
|
|
444
|
-
|
|
445
|
-
while ( ( block = iterator.getNextParagraph() ) )
|
|
446
|
-
{
|
|
447
|
-
var path = new CKEDITOR.dom.elementPath( block ),
|
|
448
|
-
listNode = null,
|
|
449
|
-
processedFlag = false,
|
|
450
|
-
blockLimit = path.blockLimit,
|
|
451
|
-
element;
|
|
452
|
-
|
|
453
|
-
// First, try to group by a list ancestor.
|
|
454
|
-
for ( var i = 0 ; i < path.elements.length &&
|
|
455
|
-
( element = path.elements[ i ] ) && !element.equals( blockLimit ); i++ )
|
|
456
|
-
{
|
|
457
|
-
if ( listNodeNames[ element.getName() ] )
|
|
458
|
-
{
|
|
459
|
-
// If we've encountered a list inside a block limit
|
|
460
|
-
// The last group object of the block limit element should
|
|
461
|
-
// no longer be valid. Since paragraphs after the list
|
|
462
|
-
// should belong to a different group of paragraphs before
|
|
463
|
-
// the list. (Bug #1309)
|
|
464
|
-
blockLimit.removeCustomData( 'list_group_object' );
|
|
465
|
-
|
|
466
|
-
var groupObj = element.getCustomData( 'list_group_object' );
|
|
467
|
-
if ( groupObj )
|
|
468
|
-
groupObj.contents.push( block );
|
|
469
|
-
else
|
|
470
|
-
{
|
|
471
|
-
groupObj = { root : element, contents : [ block ] };
|
|
472
|
-
listGroups.push( groupObj );
|
|
473
|
-
CKEDITOR.dom.element.setMarker( database, element, 'list_group_object', groupObj );
|
|
474
|
-
}
|
|
475
|
-
processedFlag = true;
|
|
476
|
-
break;
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
if ( processedFlag )
|
|
481
|
-
continue;
|
|
482
|
-
|
|
483
|
-
// No list ancestor? Group by block limit.
|
|
484
|
-
var root = blockLimit;
|
|
485
|
-
if ( root.getCustomData( 'list_group_object' ) )
|
|
486
|
-
root.getCustomData( 'list_group_object' ).contents.push( block );
|
|
487
|
-
else
|
|
488
|
-
{
|
|
489
|
-
groupObj = { root : root, contents : [ block ] };
|
|
490
|
-
CKEDITOR.dom.element.setMarker( database, root, 'list_group_object', groupObj );
|
|
491
|
-
listGroups.push( groupObj );
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
// Now we have two kinds of list groups, groups rooted at a list, and groups rooted at a block limit element.
|
|
497
|
-
// We either have to build lists or remove lists, for removing a list does not makes sense when we are looking
|
|
498
|
-
// at the group that's not rooted at lists. So we have three cases to handle.
|
|
499
|
-
var listsCreated = [];
|
|
500
|
-
while ( listGroups.length > 0 )
|
|
501
|
-
{
|
|
502
|
-
groupObj = listGroups.shift();
|
|
503
|
-
if ( this.state == CKEDITOR.TRISTATE_OFF )
|
|
504
|
-
{
|
|
505
|
-
if ( listNodeNames[ groupObj.root.getName() ] )
|
|
506
|
-
changeListType.call( this, editor, groupObj, database, listsCreated );
|
|
507
|
-
else
|
|
508
|
-
createList.call( this, editor, groupObj, listsCreated );
|
|
509
|
-
}
|
|
510
|
-
else if ( this.state == CKEDITOR.TRISTATE_ON && listNodeNames[ groupObj.root.getName() ] )
|
|
511
|
-
removeList.call( this, editor, groupObj, database );
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
// For all new lists created, merge adjacent, same type lists.
|
|
515
|
-
for ( i = 0 ; i < listsCreated.length ; i++ )
|
|
516
|
-
{
|
|
517
|
-
listNode = listsCreated[i];
|
|
518
|
-
var mergeSibling, listCommand = this;
|
|
519
|
-
( mergeSibling = function( rtl ){
|
|
520
|
-
|
|
521
|
-
var sibling = listNode[ rtl ?
|
|
522
|
-
'getPrevious' : 'getNext' ]( CKEDITOR.dom.walker.whitespaces( true ) );
|
|
523
|
-
if ( sibling && sibling.getName &&
|
|
524
|
-
sibling.getName() == listCommand.type )
|
|
525
|
-
{
|
|
526
|
-
sibling.remove();
|
|
527
|
-
// Move children order by merge direction.(#3820)
|
|
528
|
-
sibling.moveChildren( listNode, rtl ? true : false );
|
|
529
|
-
}
|
|
530
|
-
} )();
|
|
531
|
-
mergeSibling( true );
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
// Clean up, restore selection and update toolbar button states.
|
|
535
|
-
CKEDITOR.dom.element.clearAllMarkers( database );
|
|
536
|
-
selection.selectBookmarks( bookmarks );
|
|
537
|
-
editor.focus();
|
|
538
|
-
}
|
|
539
|
-
};
|
|
540
|
-
|
|
541
|
-
CKEDITOR.plugins.add( 'list',
|
|
542
|
-
{
|
|
543
|
-
init : function( editor )
|
|
544
|
-
{
|
|
545
|
-
// Register commands.
|
|
546
|
-
var numberedListCommand = new listCommand( 'numberedlist', 'ol' ),
|
|
547
|
-
bulletedListCommand = new listCommand( 'bulletedlist', 'ul' );
|
|
548
|
-
editor.addCommand( 'numberedlist', numberedListCommand );
|
|
549
|
-
editor.addCommand( 'bulletedlist', bulletedListCommand );
|
|
550
|
-
|
|
551
|
-
// Register the toolbar button.
|
|
552
|
-
editor.ui.addButton( 'NumberedList',
|
|
553
|
-
{
|
|
554
|
-
label : editor.lang.numberedlist,
|
|
555
|
-
command : 'numberedlist'
|
|
556
|
-
} );
|
|
557
|
-
editor.ui.addButton( 'BulletedList',
|
|
558
|
-
{
|
|
559
|
-
label : editor.lang.bulletedlist,
|
|
560
|
-
command : 'bulletedlist'
|
|
561
|
-
} );
|
|
562
|
-
|
|
563
|
-
// Register the state changing handlers.
|
|
564
|
-
editor.on( 'selectionChange', CKEDITOR.tools.bind( onSelectionChange, numberedListCommand ) );
|
|
565
|
-
editor.on( 'selectionChange', CKEDITOR.tools.bind( onSelectionChange, bulletedListCommand ) );
|
|
566
|
-
},
|
|
567
|
-
|
|
568
|
-
requires : [ 'domiterator' ]
|
|
569
|
-
} );
|
|
570
|
-
})();
|