it-logica-application-backbone 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/assets/javascripts/backbone_js/tinymce/changelog.txt +100 -1198
- data/app/assets/javascripts/backbone_js/tinymce/examples/css/content.css +105 -105
- data/app/assets/javascripts/backbone_js/tinymce/examples/index.html +98 -98
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/jquery.tinymce.js +1 -1
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/license.txt +504 -504
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/advhr/css/advhr.css +5 -5
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin_src.js +56 -56
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/advhr/js/rule.js +43 -43
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/advhr/rule.htm +58 -58
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/advimage/css/advimage.css +13 -13
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin_src.js +49 -49
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm +235 -235
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.js +464 -462
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/advlink/css/advlink.css +8 -8
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js +60 -60
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js +543 -539
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm +338 -338
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/advlist/editor_plugin_src.js +175 -175
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/autolink/editor_plugin.js +1 -1
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/autolink/editor_plugin_src.js +8 -4
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/autosave/editor_plugin.js +1 -1
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/autosave/editor_plugin_src.js +433 -431
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/autosave/langs/en.js +3 -3
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +119 -119
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -1
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +163 -161
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/directionality/editor_plugin.js +1 -1
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/directionality/editor_plugin_src.js +84 -81
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/emotions/editor_plugin_src.js +42 -42
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/emotions/emotions.htm +42 -42
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/emotions/js/emotions.js +43 -43
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/example/dialog.htm +22 -22
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/example/editor_plugin_src.js +83 -83
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/example/js/dialog.js +19 -19
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/example/langs/en.js +3 -3
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/example/langs/en_dlg.js +3 -3
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/fullpage/css/fullpage.css +142 -142
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin_src.js +405 -405
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/fullpage/fullpage.htm +259 -259
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/fullpage/js/fullpage.js +232 -232
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -1
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js +159 -159
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm +110 -110
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin_src.js +53 -53
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +699 -699
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/inlinepopups/template.htm +387 -387
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +82 -82
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/layer/editor_plugin_src.js +261 -261
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/legacyoutput/editor_plugin.js +1 -1
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +137 -137
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/lists/editor_plugin.js +1 -1
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/lists/editor_plugin_src.js +18 -14
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/media/css/media.css +17 -17
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin.js +1 -1
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin_src.js +898 -890
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/media/js/embed.js +73 -73
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/media/js/media.js +503 -470
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/media/media.htm +922 -922
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +53 -53
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin.js +1 -1
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin_src.js +536 -539
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js +73 -73
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js +1 -1
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin_src.js +885 -871
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/paste/js/pastetext.js +36 -36
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/paste/js/pasteword.js +51 -51
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/paste/pastetext.htm +26 -26
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/paste/pasteword.htm +21 -21
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/preview/example.html +28 -28
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/preview/jscripts/embed.js +73 -73
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/preview/preview.html +17 -17
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin_src.js +34 -34
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/save/editor_plugin_src.js +100 -100
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/searchreplace/css/searchreplace.css +6 -6
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js +60 -60
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/searchreplace/js/searchreplace.js +142 -142
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/searchreplace/searchreplace.htm +100 -100
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/spellchecker/css/content.css +1 -0
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -0
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js +436 -0
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/style/css/props.css +14 -14
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin_src.js +71 -71
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/style/js/props.js +709 -709
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/table/cell.htm +180 -180
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/table/css/cell.css +16 -16
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/table/css/row.css +25 -25
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/table/css/table.css +13 -13
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin.js +1 -1
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin_src.js +79 -55
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/table/js/cell.js +319 -319
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/table/js/merge_cells.js +27 -27
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/table/js/row.js +237 -237
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/table/js/table.js +499 -487
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/table/merge_cells.htm +32 -32
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/table/row.htm +158 -158
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/table/table.htm +188 -188
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/template/blank.htm +12 -12
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/template/css/template.css +23 -23
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/template/editor_plugin_src.js +158 -158
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/template/js/template.js +106 -106
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/template/template.htm +31 -31
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/visualblocks/css/visualblocks.css +21 -21
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/visualblocks/editor_plugin_src.js +62 -62
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin_src.js +82 -82
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/wordcount/editor_plugin_src.js +122 -122
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/abbr.htm +142 -142
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/acronym.htm +142 -142
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/attributes.htm +149 -149
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/cite.htm +142 -142
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css +11 -11
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/css/popup.css +9 -9
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/del.htm +162 -162
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +131 -131
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/ins.htm +162 -162
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js +28 -28
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js +28 -28
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js +111 -111
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/cite.js +28 -28
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/del.js +53 -53
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js +229 -229
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/ins.js +53 -53
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/about.htm +52 -52
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/anchor.htm +26 -26
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/charmap.htm +55 -55
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/color_picker.htm +70 -70
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/editor_template.js +1 -1
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js +1490 -1481
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/image.htm +80 -80
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/js/about.js +73 -73
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/js/anchor.js +56 -44
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/js/charmap.js +363 -363
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/js/image.js +253 -253
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/js/link.js +159 -153
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/js/source_editor.js +78 -78
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/link.htm +57 -57
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/shortcuts.htm +47 -47
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/content.css +50 -51
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/dialog.css +118 -118
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/ui.css +219 -219
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/skins/highcontrast/content.css +24 -25
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/skins/highcontrast/dialog.css +106 -106
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/skins/highcontrast/ui.css +106 -106
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/content.css +48 -49
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css +118 -118
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui.css +222 -222
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +7 -7
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +5 -5
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/advanced/source_editor.htm +25 -25
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/simple/editor_template_src.js +83 -83
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/simple/skins/default/content.css +25 -25
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/simple/skins/default/ui.css +32 -32
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/simple/skins/o2k7/content.css +17 -17
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/themes/simple/skins/o2k7/ui.css +35 -35
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/tiny_mce.js +1 -1
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/tiny_mce_popup.js +1 -1
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/tiny_mce_src.js +17769 -16902
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/utils/editable_selects.js +70 -70
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/utils/form_utils.js +210 -210
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/utils/mctabs.js +161 -161
- data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/utils/validate.js +252 -252
- data/it-logica-application-backbone.gemspec +6 -2
- metadata +19 -15
data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/advlink/css/advlink.css
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
.mceLinkList, .mceAnchorList, #targetlist {width:280px;}
|
2
|
-
.mceActionPanel {margin-top:7px;}
|
3
|
-
.panel_wrapper div.current {height:320px;}
|
4
|
-
#classlist, #title, #href {width:280px;}
|
5
|
-
#popupurl, #popupname {width:200px;}
|
6
|
-
#popupwidth, #popupheight, #popupleft, #popuptop {width:30px;vertical-align:middle;text-align:center;}
|
7
|
-
#id, #style, #classes, #target, #dir, #hreflang, #lang, #charset, #type, #rel, #rev, #tabindex, #accesskey {width:200px;}
|
8
|
-
#events_panel input {width:200px;}
|
1
|
+
.mceLinkList, .mceAnchorList, #targetlist {width:280px;}
|
2
|
+
.mceActionPanel {margin-top:7px;}
|
3
|
+
.panel_wrapper div.current {height:320px;}
|
4
|
+
#classlist, #title, #href {width:280px;}
|
5
|
+
#popupurl, #popupname {width:200px;}
|
6
|
+
#popupwidth, #popupheight, #popupleft, #popuptop {width:30px;vertical-align:middle;text-align:center;}
|
7
|
+
#id, #style, #classes, #target, #dir, #hreflang, #lang, #charset, #type, #rel, #rev, #tabindex, #accesskey {width:200px;}
|
8
|
+
#events_panel input {width:200px;}
|
@@ -1,61 +1,61 @@
|
|
1
|
-
/**
|
2
|
-
* editor_plugin_src.js
|
3
|
-
*
|
4
|
-
* Copyright 2009, Moxiecode Systems AB
|
5
|
-
* Released under LGPL License.
|
6
|
-
*
|
7
|
-
* License: http://tinymce.moxiecode.com/license
|
8
|
-
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
-
*/
|
10
|
-
|
11
|
-
(function() {
|
12
|
-
tinymce.create('tinymce.plugins.AdvancedLinkPlugin', {
|
13
|
-
init : function(ed, url) {
|
14
|
-
this.editor = ed;
|
15
|
-
|
16
|
-
// Register commands
|
17
|
-
ed.addCommand('mceAdvLink', function() {
|
18
|
-
var se = ed.selection;
|
19
|
-
|
20
|
-
// No selection and not in link
|
21
|
-
if (se.isCollapsed() && !ed.dom.getParent(se.getNode(), 'A'))
|
22
|
-
return;
|
23
|
-
|
24
|
-
ed.windowManager.open({
|
25
|
-
file : url + '/link.htm',
|
26
|
-
width : 480 + parseInt(ed.getLang('advlink.delta_width', 0)),
|
27
|
-
height : 400 + parseInt(ed.getLang('advlink.delta_height', 0)),
|
28
|
-
inline : 1
|
29
|
-
}, {
|
30
|
-
plugin_url : url
|
31
|
-
});
|
32
|
-
});
|
33
|
-
|
34
|
-
// Register buttons
|
35
|
-
ed.addButton('link', {
|
36
|
-
title : 'advlink.link_desc',
|
37
|
-
cmd : 'mceAdvLink'
|
38
|
-
});
|
39
|
-
|
40
|
-
ed.addShortcut('ctrl+k', 'advlink.advlink_desc', 'mceAdvLink');
|
41
|
-
|
42
|
-
ed.onNodeChange.add(function(ed, cm, n, co) {
|
43
|
-
cm.setDisabled('link', co && n.nodeName != 'A');
|
44
|
-
cm.setActive('link', n.nodeName == 'A' && !n.name);
|
45
|
-
});
|
46
|
-
},
|
47
|
-
|
48
|
-
getInfo : function() {
|
49
|
-
return {
|
50
|
-
longname : 'Advanced link',
|
51
|
-
author : 'Moxiecode Systems AB',
|
52
|
-
authorurl : 'http://tinymce.moxiecode.com',
|
53
|
-
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink',
|
54
|
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
55
|
-
};
|
56
|
-
}
|
57
|
-
});
|
58
|
-
|
59
|
-
// Register plugin
|
60
|
-
tinymce.PluginManager.add('advlink', tinymce.plugins.AdvancedLinkPlugin);
|
1
|
+
/**
|
2
|
+
* editor_plugin_src.js
|
3
|
+
*
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
6
|
+
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
(function() {
|
12
|
+
tinymce.create('tinymce.plugins.AdvancedLinkPlugin', {
|
13
|
+
init : function(ed, url) {
|
14
|
+
this.editor = ed;
|
15
|
+
|
16
|
+
// Register commands
|
17
|
+
ed.addCommand('mceAdvLink', function() {
|
18
|
+
var se = ed.selection;
|
19
|
+
|
20
|
+
// No selection and not in link
|
21
|
+
if (se.isCollapsed() && !ed.dom.getParent(se.getNode(), 'A'))
|
22
|
+
return;
|
23
|
+
|
24
|
+
ed.windowManager.open({
|
25
|
+
file : url + '/link.htm',
|
26
|
+
width : 480 + parseInt(ed.getLang('advlink.delta_width', 0)),
|
27
|
+
height : 400 + parseInt(ed.getLang('advlink.delta_height', 0)),
|
28
|
+
inline : 1
|
29
|
+
}, {
|
30
|
+
plugin_url : url
|
31
|
+
});
|
32
|
+
});
|
33
|
+
|
34
|
+
// Register buttons
|
35
|
+
ed.addButton('link', {
|
36
|
+
title : 'advlink.link_desc',
|
37
|
+
cmd : 'mceAdvLink'
|
38
|
+
});
|
39
|
+
|
40
|
+
ed.addShortcut('ctrl+k', 'advlink.advlink_desc', 'mceAdvLink');
|
41
|
+
|
42
|
+
ed.onNodeChange.add(function(ed, cm, n, co) {
|
43
|
+
cm.setDisabled('link', co && n.nodeName != 'A');
|
44
|
+
cm.setActive('link', n.nodeName == 'A' && !n.name);
|
45
|
+
});
|
46
|
+
},
|
47
|
+
|
48
|
+
getInfo : function() {
|
49
|
+
return {
|
50
|
+
longname : 'Advanced link',
|
51
|
+
author : 'Moxiecode Systems AB',
|
52
|
+
authorurl : 'http://tinymce.moxiecode.com',
|
53
|
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink',
|
54
|
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
55
|
+
};
|
56
|
+
}
|
57
|
+
});
|
58
|
+
|
59
|
+
// Register plugin
|
60
|
+
tinymce.PluginManager.add('advlink', tinymce.plugins.AdvancedLinkPlugin);
|
61
61
|
})();
|
data/app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js
CHANGED
@@ -1,539 +1,543 @@
|
|
1
|
-
/* Functions for the advlink plugin popup */
|
2
|
-
|
3
|
-
tinyMCEPopup.requireLangPack();
|
4
|
-
|
5
|
-
var templates = {
|
6
|
-
"window.open" : "window.open('${url}','${target}','${options}')"
|
7
|
-
};
|
8
|
-
|
9
|
-
function preinit() {
|
10
|
-
var url;
|
11
|
-
|
12
|
-
if (url = tinyMCEPopup.getParam("external_link_list_url"))
|
13
|
-
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
14
|
-
}
|
15
|
-
|
16
|
-
function changeClass() {
|
17
|
-
var f = document.forms[0];
|
18
|
-
|
19
|
-
f.classes.value = getSelectValue(f, 'classlist');
|
20
|
-
}
|
21
|
-
|
22
|
-
function init() {
|
23
|
-
tinyMCEPopup.resizeToInnerSize();
|
24
|
-
|
25
|
-
var formObj = document.forms[0];
|
26
|
-
var inst = tinyMCEPopup.editor;
|
27
|
-
var elm = inst.selection.getNode();
|
28
|
-
var action = "insert";
|
29
|
-
var html;
|
30
|
-
|
31
|
-
document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink');
|
32
|
-
document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink');
|
33
|
-
document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target');
|
34
|
-
|
35
|
-
// Link list
|
36
|
-
html = getLinkListHTML('linklisthref','href');
|
37
|
-
if (html == "")
|
38
|
-
document.getElementById("linklisthrefrow").style.display = 'none';
|
39
|
-
else
|
40
|
-
document.getElementById("linklisthrefcontainer").innerHTML = html;
|
41
|
-
|
42
|
-
// Anchor list
|
43
|
-
html = getAnchorListHTML('anchorlist','href');
|
44
|
-
if (html == "")
|
45
|
-
document.getElementById("anchorlistrow").style.display = 'none';
|
46
|
-
else
|
47
|
-
document.getElementById("anchorlistcontainer").innerHTML = html;
|
48
|
-
|
49
|
-
// Resize some elements
|
50
|
-
if (isVisible('hrefbrowser'))
|
51
|
-
document.getElementById('href').style.width = '260px';
|
52
|
-
|
53
|
-
if (isVisible('popupurlbrowser'))
|
54
|
-
document.getElementById('popupurl').style.width = '180px';
|
55
|
-
|
56
|
-
elm = inst.dom.getParent(elm, "A");
|
57
|
-
if (elm == null) {
|
58
|
-
var prospect = inst.dom.create("p", null, inst.selection.getContent());
|
59
|
-
if (prospect.childNodes.length === 1) {
|
60
|
-
elm = prospect.firstChild;
|
61
|
-
}
|
62
|
-
}
|
63
|
-
|
64
|
-
if (elm != null && elm.nodeName == "A")
|
65
|
-
action = "update";
|
66
|
-
|
67
|
-
formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);
|
68
|
-
|
69
|
-
setPopupControlsDisabled(true);
|
70
|
-
|
71
|
-
if (action == "update") {
|
72
|
-
var href = inst.dom.getAttrib(elm, 'href');
|
73
|
-
var onclick = inst.dom.getAttrib(elm, 'onclick');
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
setFormValue('
|
78
|
-
setFormValue('
|
79
|
-
setFormValue('
|
80
|
-
setFormValue('
|
81
|
-
setFormValue('
|
82
|
-
setFormValue('
|
83
|
-
setFormValue('
|
84
|
-
setFormValue('
|
85
|
-
setFormValue('
|
86
|
-
setFormValue('
|
87
|
-
setFormValue('
|
88
|
-
setFormValue('
|
89
|
-
setFormValue('
|
90
|
-
setFormValue('
|
91
|
-
setFormValue('
|
92
|
-
setFormValue('
|
93
|
-
setFormValue('
|
94
|
-
setFormValue('
|
95
|
-
setFormValue('
|
96
|
-
setFormValue('
|
97
|
-
setFormValue('
|
98
|
-
setFormValue('
|
99
|
-
setFormValue('
|
100
|
-
setFormValue('
|
101
|
-
setFormValue('
|
102
|
-
setFormValue('
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
selectByValue(formObj, '
|
113
|
-
selectByValue(formObj, '
|
114
|
-
selectByValue(formObj, '
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
selectByValue(formObj, '
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
var
|
157
|
-
|
158
|
-
|
159
|
-
formObj.
|
160
|
-
formObj.
|
161
|
-
formObj.
|
162
|
-
|
163
|
-
|
164
|
-
formObj.
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
formObj.
|
174
|
-
formObj.
|
175
|
-
formObj.
|
176
|
-
formObj.
|
177
|
-
formObj.
|
178
|
-
formObj.
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
}
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
var
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
formObj.
|
200
|
-
formObj.
|
201
|
-
formObj.
|
202
|
-
formObj.
|
203
|
-
formObj.
|
204
|
-
formObj.
|
205
|
-
formObj.
|
206
|
-
formObj.
|
207
|
-
formObj.
|
208
|
-
formObj.
|
209
|
-
formObj.
|
210
|
-
formObj.
|
211
|
-
formObj.
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
var
|
227
|
-
var
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
variables
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
opts = opts.
|
269
|
-
opts = opts.replace(
|
270
|
-
|
271
|
-
|
272
|
-
var
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
var
|
294
|
-
|
295
|
-
|
296
|
-
onclick +=
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
var
|
358
|
-
var
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
+ '
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
}
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
setAttrib(elm, '
|
447
|
-
setAttrib(elm, '
|
448
|
-
setAttrib(elm, '
|
449
|
-
setAttrib(elm, '
|
450
|
-
setAttrib(elm, '
|
451
|
-
setAttrib(elm, '
|
452
|
-
setAttrib(elm, '
|
453
|
-
setAttrib(elm, '
|
454
|
-
setAttrib(elm, '
|
455
|
-
setAttrib(elm, '
|
456
|
-
setAttrib(elm, '
|
457
|
-
setAttrib(elm, '
|
458
|
-
setAttrib(elm, '
|
459
|
-
setAttrib(elm, '
|
460
|
-
setAttrib(elm, '
|
461
|
-
setAttrib(elm, '
|
462
|
-
setAttrib(elm, '
|
463
|
-
setAttrib(elm, '
|
464
|
-
setAttrib(elm, '
|
465
|
-
setAttrib(elm, '
|
466
|
-
setAttrib(elm, '
|
467
|
-
setAttrib(elm, '
|
468
|
-
setAttrib(elm, '
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
html
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
html
|
516
|
-
|
517
|
-
html += '<
|
518
|
-
html += '
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
1
|
+
/* Functions for the advlink plugin popup */
|
2
|
+
|
3
|
+
tinyMCEPopup.requireLangPack();
|
4
|
+
|
5
|
+
var templates = {
|
6
|
+
"window.open" : "window.open('${url}','${target}','${options}')"
|
7
|
+
};
|
8
|
+
|
9
|
+
function preinit() {
|
10
|
+
var url;
|
11
|
+
|
12
|
+
if (url = tinyMCEPopup.getParam("external_link_list_url"))
|
13
|
+
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
14
|
+
}
|
15
|
+
|
16
|
+
function changeClass() {
|
17
|
+
var f = document.forms[0];
|
18
|
+
|
19
|
+
f.classes.value = getSelectValue(f, 'classlist');
|
20
|
+
}
|
21
|
+
|
22
|
+
function init() {
|
23
|
+
tinyMCEPopup.resizeToInnerSize();
|
24
|
+
|
25
|
+
var formObj = document.forms[0];
|
26
|
+
var inst = tinyMCEPopup.editor;
|
27
|
+
var elm = inst.selection.getNode();
|
28
|
+
var action = "insert";
|
29
|
+
var html;
|
30
|
+
|
31
|
+
document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink');
|
32
|
+
document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink');
|
33
|
+
document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target');
|
34
|
+
|
35
|
+
// Link list
|
36
|
+
html = getLinkListHTML('linklisthref','href');
|
37
|
+
if (html == "")
|
38
|
+
document.getElementById("linklisthrefrow").style.display = 'none';
|
39
|
+
else
|
40
|
+
document.getElementById("linklisthrefcontainer").innerHTML = html;
|
41
|
+
|
42
|
+
// Anchor list
|
43
|
+
html = getAnchorListHTML('anchorlist','href');
|
44
|
+
if (html == "")
|
45
|
+
document.getElementById("anchorlistrow").style.display = 'none';
|
46
|
+
else
|
47
|
+
document.getElementById("anchorlistcontainer").innerHTML = html;
|
48
|
+
|
49
|
+
// Resize some elements
|
50
|
+
if (isVisible('hrefbrowser'))
|
51
|
+
document.getElementById('href').style.width = '260px';
|
52
|
+
|
53
|
+
if (isVisible('popupurlbrowser'))
|
54
|
+
document.getElementById('popupurl').style.width = '180px';
|
55
|
+
|
56
|
+
elm = inst.dom.getParent(elm, "A");
|
57
|
+
if (elm == null) {
|
58
|
+
var prospect = inst.dom.create("p", null, inst.selection.getContent());
|
59
|
+
if (prospect.childNodes.length === 1) {
|
60
|
+
elm = prospect.firstChild;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
if (elm != null && elm.nodeName == "A")
|
65
|
+
action = "update";
|
66
|
+
|
67
|
+
formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);
|
68
|
+
|
69
|
+
setPopupControlsDisabled(true);
|
70
|
+
|
71
|
+
if (action == "update") {
|
72
|
+
var href = inst.dom.getAttrib(elm, 'href');
|
73
|
+
var onclick = inst.dom.getAttrib(elm, 'onclick');
|
74
|
+
var linkTarget = inst.dom.getAttrib(elm, 'target') ? inst.dom.getAttrib(elm, 'target') : "_self";
|
75
|
+
|
76
|
+
// Setup form data
|
77
|
+
setFormValue('href', href);
|
78
|
+
setFormValue('title', inst.dom.getAttrib(elm, 'title'));
|
79
|
+
setFormValue('id', inst.dom.getAttrib(elm, 'id'));
|
80
|
+
setFormValue('style', inst.dom.getAttrib(elm, "style"));
|
81
|
+
setFormValue('rel', inst.dom.getAttrib(elm, 'rel'));
|
82
|
+
setFormValue('rev', inst.dom.getAttrib(elm, 'rev'));
|
83
|
+
setFormValue('charset', inst.dom.getAttrib(elm, 'charset'));
|
84
|
+
setFormValue('hreflang', inst.dom.getAttrib(elm, 'hreflang'));
|
85
|
+
setFormValue('dir', inst.dom.getAttrib(elm, 'dir'));
|
86
|
+
setFormValue('lang', inst.dom.getAttrib(elm, 'lang'));
|
87
|
+
setFormValue('tabindex', inst.dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : ""));
|
88
|
+
setFormValue('accesskey', inst.dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : ""));
|
89
|
+
setFormValue('type', inst.dom.getAttrib(elm, 'type'));
|
90
|
+
setFormValue('onfocus', inst.dom.getAttrib(elm, 'onfocus'));
|
91
|
+
setFormValue('onblur', inst.dom.getAttrib(elm, 'onblur'));
|
92
|
+
setFormValue('onclick', onclick);
|
93
|
+
setFormValue('ondblclick', inst.dom.getAttrib(elm, 'ondblclick'));
|
94
|
+
setFormValue('onmousedown', inst.dom.getAttrib(elm, 'onmousedown'));
|
95
|
+
setFormValue('onmouseup', inst.dom.getAttrib(elm, 'onmouseup'));
|
96
|
+
setFormValue('onmouseover', inst.dom.getAttrib(elm, 'onmouseover'));
|
97
|
+
setFormValue('onmousemove', inst.dom.getAttrib(elm, 'onmousemove'));
|
98
|
+
setFormValue('onmouseout', inst.dom.getAttrib(elm, 'onmouseout'));
|
99
|
+
setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress'));
|
100
|
+
setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown'));
|
101
|
+
setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup'));
|
102
|
+
setFormValue('target', linkTarget);
|
103
|
+
setFormValue('classes', inst.dom.getAttrib(elm, 'class'));
|
104
|
+
|
105
|
+
// Parse onclick data
|
106
|
+
if (onclick != null && onclick.indexOf('window.open') != -1)
|
107
|
+
parseWindowOpen(onclick);
|
108
|
+
else
|
109
|
+
parseFunction(onclick);
|
110
|
+
|
111
|
+
// Select by the values
|
112
|
+
selectByValue(formObj, 'dir', inst.dom.getAttrib(elm, 'dir'));
|
113
|
+
selectByValue(formObj, 'rel', inst.dom.getAttrib(elm, 'rel'));
|
114
|
+
selectByValue(formObj, 'rev', inst.dom.getAttrib(elm, 'rev'));
|
115
|
+
selectByValue(formObj, 'linklisthref', href);
|
116
|
+
|
117
|
+
if (href.charAt(0) == '#')
|
118
|
+
selectByValue(formObj, 'anchorlist', href);
|
119
|
+
|
120
|
+
addClassesToList('classlist', 'advlink_styles');
|
121
|
+
|
122
|
+
selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true);
|
123
|
+
selectByValue(formObj, 'targetlist', linkTarget, true);
|
124
|
+
} else
|
125
|
+
addClassesToList('classlist', 'advlink_styles');
|
126
|
+
}
|
127
|
+
|
128
|
+
function checkPrefix(n) {
|
129
|
+
if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email')))
|
130
|
+
n.value = 'mailto:' + n.value;
|
131
|
+
|
132
|
+
if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external')))
|
133
|
+
n.value = 'http://' + n.value;
|
134
|
+
}
|
135
|
+
|
136
|
+
function setFormValue(name, value) {
|
137
|
+
document.forms[0].elements[name].value = value;
|
138
|
+
}
|
139
|
+
|
140
|
+
function parseWindowOpen(onclick) {
|
141
|
+
var formObj = document.forms[0];
|
142
|
+
|
143
|
+
// Preprocess center code
|
144
|
+
if (onclick.indexOf('return false;') != -1) {
|
145
|
+
formObj.popupreturn.checked = true;
|
146
|
+
onclick = onclick.replace('return false;', '');
|
147
|
+
} else
|
148
|
+
formObj.popupreturn.checked = false;
|
149
|
+
|
150
|
+
var onClickData = parseLink(onclick);
|
151
|
+
|
152
|
+
if (onClickData != null) {
|
153
|
+
formObj.ispopup.checked = true;
|
154
|
+
setPopupControlsDisabled(false);
|
155
|
+
|
156
|
+
var onClickWindowOptions = parseOptions(onClickData['options']);
|
157
|
+
var url = onClickData['url'];
|
158
|
+
|
159
|
+
formObj.popupname.value = onClickData['target'];
|
160
|
+
formObj.popupurl.value = url;
|
161
|
+
formObj.popupwidth.value = getOption(onClickWindowOptions, 'width');
|
162
|
+
formObj.popupheight.value = getOption(onClickWindowOptions, 'height');
|
163
|
+
|
164
|
+
formObj.popupleft.value = getOption(onClickWindowOptions, 'left');
|
165
|
+
formObj.popuptop.value = getOption(onClickWindowOptions, 'top');
|
166
|
+
|
167
|
+
if (formObj.popupleft.value.indexOf('screen') != -1)
|
168
|
+
formObj.popupleft.value = "c";
|
169
|
+
|
170
|
+
if (formObj.popuptop.value.indexOf('screen') != -1)
|
171
|
+
formObj.popuptop.value = "c";
|
172
|
+
|
173
|
+
formObj.popuplocation.checked = getOption(onClickWindowOptions, 'location') == "yes";
|
174
|
+
formObj.popupscrollbars.checked = getOption(onClickWindowOptions, 'scrollbars') == "yes";
|
175
|
+
formObj.popupmenubar.checked = getOption(onClickWindowOptions, 'menubar') == "yes";
|
176
|
+
formObj.popupresizable.checked = getOption(onClickWindowOptions, 'resizable') == "yes";
|
177
|
+
formObj.popuptoolbar.checked = getOption(onClickWindowOptions, 'toolbar') == "yes";
|
178
|
+
formObj.popupstatus.checked = getOption(onClickWindowOptions, 'status') == "yes";
|
179
|
+
formObj.popupdependent.checked = getOption(onClickWindowOptions, 'dependent') == "yes";
|
180
|
+
|
181
|
+
buildOnClick();
|
182
|
+
}
|
183
|
+
}
|
184
|
+
|
185
|
+
function parseFunction(onclick) {
|
186
|
+
var formObj = document.forms[0];
|
187
|
+
var onClickData = parseLink(onclick);
|
188
|
+
|
189
|
+
// TODO: Add stuff here
|
190
|
+
}
|
191
|
+
|
192
|
+
function getOption(opts, name) {
|
193
|
+
return typeof(opts[name]) == "undefined" ? "" : opts[name];
|
194
|
+
}
|
195
|
+
|
196
|
+
function setPopupControlsDisabled(state) {
|
197
|
+
var formObj = document.forms[0];
|
198
|
+
|
199
|
+
formObj.popupname.disabled = state;
|
200
|
+
formObj.popupurl.disabled = state;
|
201
|
+
formObj.popupwidth.disabled = state;
|
202
|
+
formObj.popupheight.disabled = state;
|
203
|
+
formObj.popupleft.disabled = state;
|
204
|
+
formObj.popuptop.disabled = state;
|
205
|
+
formObj.popuplocation.disabled = state;
|
206
|
+
formObj.popupscrollbars.disabled = state;
|
207
|
+
formObj.popupmenubar.disabled = state;
|
208
|
+
formObj.popupresizable.disabled = state;
|
209
|
+
formObj.popuptoolbar.disabled = state;
|
210
|
+
formObj.popupstatus.disabled = state;
|
211
|
+
formObj.popupreturn.disabled = state;
|
212
|
+
formObj.popupdependent.disabled = state;
|
213
|
+
|
214
|
+
setBrowserDisabled('popupurlbrowser', state);
|
215
|
+
}
|
216
|
+
|
217
|
+
function parseLink(link) {
|
218
|
+
link = link.replace(new RegExp(''', 'g'), "'");
|
219
|
+
|
220
|
+
var fnName = link.replace(new RegExp("\\s*([A-Za-z0-9\.]*)\\s*\\(.*", "gi"), "$1");
|
221
|
+
|
222
|
+
// Is function name a template function
|
223
|
+
var template = templates[fnName];
|
224
|
+
if (template) {
|
225
|
+
// Build regexp
|
226
|
+
var variableNames = template.match(new RegExp("'?\\$\\{[A-Za-z0-9\.]*\\}'?", "gi"));
|
227
|
+
var regExp = "\\s*[A-Za-z0-9\.]*\\s*\\(";
|
228
|
+
var replaceStr = "";
|
229
|
+
for (var i=0; i<variableNames.length; i++) {
|
230
|
+
// Is string value
|
231
|
+
if (variableNames[i].indexOf("'${") != -1)
|
232
|
+
regExp += "'(.*)'";
|
233
|
+
else // Number value
|
234
|
+
regExp += "([0-9]*)";
|
235
|
+
|
236
|
+
replaceStr += "$" + (i+1);
|
237
|
+
|
238
|
+
// Cleanup variable name
|
239
|
+
variableNames[i] = variableNames[i].replace(new RegExp("[^A-Za-z0-9]", "gi"), "");
|
240
|
+
|
241
|
+
if (i != variableNames.length-1) {
|
242
|
+
regExp += "\\s*,\\s*";
|
243
|
+
replaceStr += "<delim>";
|
244
|
+
} else
|
245
|
+
regExp += ".*";
|
246
|
+
}
|
247
|
+
|
248
|
+
regExp += "\\);?";
|
249
|
+
|
250
|
+
// Build variable array
|
251
|
+
var variables = [];
|
252
|
+
variables["_function"] = fnName;
|
253
|
+
var variableValues = link.replace(new RegExp(regExp, "gi"), replaceStr).split('<delim>');
|
254
|
+
for (var i=0; i<variableNames.length; i++)
|
255
|
+
variables[variableNames[i]] = variableValues[i];
|
256
|
+
|
257
|
+
return variables;
|
258
|
+
}
|
259
|
+
|
260
|
+
return null;
|
261
|
+
}
|
262
|
+
|
263
|
+
function parseOptions(opts) {
|
264
|
+
if (opts == null || opts == "")
|
265
|
+
return [];
|
266
|
+
|
267
|
+
// Cleanup the options
|
268
|
+
opts = opts.toLowerCase();
|
269
|
+
opts = opts.replace(/;/g, ",");
|
270
|
+
opts = opts.replace(/[^0-9a-z=,]/g, "");
|
271
|
+
|
272
|
+
var optionChunks = opts.split(',');
|
273
|
+
var options = [];
|
274
|
+
|
275
|
+
for (var i=0; i<optionChunks.length; i++) {
|
276
|
+
var parts = optionChunks[i].split('=');
|
277
|
+
|
278
|
+
if (parts.length == 2)
|
279
|
+
options[parts[0]] = parts[1];
|
280
|
+
}
|
281
|
+
|
282
|
+
return options;
|
283
|
+
}
|
284
|
+
|
285
|
+
function buildOnClick() {
|
286
|
+
var formObj = document.forms[0];
|
287
|
+
|
288
|
+
if (!formObj.ispopup.checked) {
|
289
|
+
formObj.onclick.value = "";
|
290
|
+
return;
|
291
|
+
}
|
292
|
+
|
293
|
+
var onclick = "window.open('";
|
294
|
+
var url = formObj.popupurl.value;
|
295
|
+
|
296
|
+
onclick += url + "','";
|
297
|
+
onclick += formObj.popupname.value + "','";
|
298
|
+
|
299
|
+
if (formObj.popuplocation.checked)
|
300
|
+
onclick += "location=yes,";
|
301
|
+
|
302
|
+
if (formObj.popupscrollbars.checked)
|
303
|
+
onclick += "scrollbars=yes,";
|
304
|
+
|
305
|
+
if (formObj.popupmenubar.checked)
|
306
|
+
onclick += "menubar=yes,";
|
307
|
+
|
308
|
+
if (formObj.popupresizable.checked)
|
309
|
+
onclick += "resizable=yes,";
|
310
|
+
|
311
|
+
if (formObj.popuptoolbar.checked)
|
312
|
+
onclick += "toolbar=yes,";
|
313
|
+
|
314
|
+
if (formObj.popupstatus.checked)
|
315
|
+
onclick += "status=yes,";
|
316
|
+
|
317
|
+
if (formObj.popupdependent.checked)
|
318
|
+
onclick += "dependent=yes,";
|
319
|
+
|
320
|
+
if (formObj.popupwidth.value != "")
|
321
|
+
onclick += "width=" + formObj.popupwidth.value + ",";
|
322
|
+
|
323
|
+
if (formObj.popupheight.value != "")
|
324
|
+
onclick += "height=" + formObj.popupheight.value + ",";
|
325
|
+
|
326
|
+
if (formObj.popupleft.value != "") {
|
327
|
+
if (formObj.popupleft.value != "c")
|
328
|
+
onclick += "left=" + formObj.popupleft.value + ",";
|
329
|
+
else
|
330
|
+
onclick += "left='+(screen.availWidth/2-" + (formObj.popupwidth.value/2) + ")+',";
|
331
|
+
}
|
332
|
+
|
333
|
+
if (formObj.popuptop.value != "") {
|
334
|
+
if (formObj.popuptop.value != "c")
|
335
|
+
onclick += "top=" + formObj.popuptop.value + ",";
|
336
|
+
else
|
337
|
+
onclick += "top='+(screen.availHeight/2-" + (formObj.popupheight.value/2) + ")+',";
|
338
|
+
}
|
339
|
+
|
340
|
+
if (onclick.charAt(onclick.length-1) == ',')
|
341
|
+
onclick = onclick.substring(0, onclick.length-1);
|
342
|
+
|
343
|
+
onclick += "');";
|
344
|
+
|
345
|
+
if (formObj.popupreturn.checked)
|
346
|
+
onclick += "return false;";
|
347
|
+
|
348
|
+
// tinyMCE.debug(onclick);
|
349
|
+
|
350
|
+
formObj.onclick.value = onclick;
|
351
|
+
|
352
|
+
if (formObj.href.value == "")
|
353
|
+
formObj.href.value = url;
|
354
|
+
}
|
355
|
+
|
356
|
+
function setAttrib(elm, attrib, value) {
|
357
|
+
var formObj = document.forms[0];
|
358
|
+
var valueElm = formObj.elements[attrib.toLowerCase()];
|
359
|
+
var dom = tinyMCEPopup.editor.dom;
|
360
|
+
|
361
|
+
if (typeof(value) == "undefined" || value == null) {
|
362
|
+
value = "";
|
363
|
+
|
364
|
+
if (valueElm)
|
365
|
+
value = valueElm.value;
|
366
|
+
}
|
367
|
+
|
368
|
+
// Clean up the style
|
369
|
+
if (attrib == 'style')
|
370
|
+
value = dom.serializeStyle(dom.parseStyle(value), 'a');
|
371
|
+
|
372
|
+
dom.setAttrib(elm, attrib, value);
|
373
|
+
}
|
374
|
+
|
375
|
+
function getAnchorListHTML(id, target) {
|
376
|
+
var ed = tinyMCEPopup.editor, nodes = ed.dom.select('a'), name, i, len, html = "";
|
377
|
+
|
378
|
+
for (i=0, len=nodes.length; i<len; i++) {
|
379
|
+
if ((name = ed.dom.getAttrib(nodes[i], "name")) != "")
|
380
|
+
html += '<option value="#' + name + '">' + name + '</option>';
|
381
|
+
|
382
|
+
if ((name = nodes[i].id) != "" && !nodes[i].href)
|
383
|
+
html += '<option value="#' + name + '">' + name + '</option>';
|
384
|
+
}
|
385
|
+
|
386
|
+
if (html == "")
|
387
|
+
return "";
|
388
|
+
|
389
|
+
html = '<select id="' + id + '" name="' + id + '" class="mceAnchorList"'
|
390
|
+
+ ' onchange="this.form.' + target + '.value=this.options[this.selectedIndex].value"'
|
391
|
+
+ '>'
|
392
|
+
+ '<option value="">---</option>'
|
393
|
+
+ html
|
394
|
+
+ '</select>';
|
395
|
+
|
396
|
+
return html;
|
397
|
+
}
|
398
|
+
|
399
|
+
function insertAction() {
|
400
|
+
var inst = tinyMCEPopup.editor;
|
401
|
+
var elm, elementArray, i;
|
402
|
+
|
403
|
+
elm = inst.selection.getNode();
|
404
|
+
checkPrefix(document.forms[0].href);
|
405
|
+
|
406
|
+
elm = inst.dom.getParent(elm, "A");
|
407
|
+
|
408
|
+
// Remove element if there is no href
|
409
|
+
if (!document.forms[0].href.value) {
|
410
|
+
i = inst.selection.getBookmark();
|
411
|
+
inst.dom.remove(elm, 1);
|
412
|
+
inst.selection.moveToBookmark(i);
|
413
|
+
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
414
|
+
tinyMCEPopup.close();
|
415
|
+
return;
|
416
|
+
}
|
417
|
+
|
418
|
+
// Create new anchor elements
|
419
|
+
if (elm == null) {
|
420
|
+
inst.getDoc().execCommand("unlink", false, null);
|
421
|
+
tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
|
422
|
+
|
423
|
+
elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';});
|
424
|
+
for (i=0; i<elementArray.length; i++)
|
425
|
+
setAllAttribs(elm = elementArray[i]);
|
426
|
+
} else
|
427
|
+
setAllAttribs(elm);
|
428
|
+
|
429
|
+
// Don't move caret if selection was image
|
430
|
+
if (elm.childNodes.length != 1 || elm.firstChild.nodeName != 'IMG') {
|
431
|
+
inst.focus();
|
432
|
+
inst.selection.select(elm);
|
433
|
+
inst.selection.collapse(0);
|
434
|
+
tinyMCEPopup.storeSelection();
|
435
|
+
}
|
436
|
+
|
437
|
+
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
438
|
+
tinyMCEPopup.close();
|
439
|
+
}
|
440
|
+
|
441
|
+
function setAllAttribs(elm) {
|
442
|
+
var formObj = document.forms[0];
|
443
|
+
var href = formObj.href.value.replace(/ /g, '%20');
|
444
|
+
var target = getSelectValue(formObj, 'targetlist');
|
445
|
+
|
446
|
+
setAttrib(elm, 'href', href);
|
447
|
+
setAttrib(elm, 'title');
|
448
|
+
setAttrib(elm, 'target', target == '_self' ? '' : target);
|
449
|
+
setAttrib(elm, 'id');
|
450
|
+
setAttrib(elm, 'style');
|
451
|
+
setAttrib(elm, 'class', getSelectValue(formObj, 'classlist'));
|
452
|
+
setAttrib(elm, 'rel');
|
453
|
+
setAttrib(elm, 'rev');
|
454
|
+
setAttrib(elm, 'charset');
|
455
|
+
setAttrib(elm, 'hreflang');
|
456
|
+
setAttrib(elm, 'dir');
|
457
|
+
setAttrib(elm, 'lang');
|
458
|
+
setAttrib(elm, 'tabindex');
|
459
|
+
setAttrib(elm, 'accesskey');
|
460
|
+
setAttrib(elm, 'type');
|
461
|
+
setAttrib(elm, 'onfocus');
|
462
|
+
setAttrib(elm, 'onblur');
|
463
|
+
setAttrib(elm, 'onclick');
|
464
|
+
setAttrib(elm, 'ondblclick');
|
465
|
+
setAttrib(elm, 'onmousedown');
|
466
|
+
setAttrib(elm, 'onmouseup');
|
467
|
+
setAttrib(elm, 'onmouseover');
|
468
|
+
setAttrib(elm, 'onmousemove');
|
469
|
+
setAttrib(elm, 'onmouseout');
|
470
|
+
setAttrib(elm, 'onkeypress');
|
471
|
+
setAttrib(elm, 'onkeydown');
|
472
|
+
setAttrib(elm, 'onkeyup');
|
473
|
+
|
474
|
+
// Refresh in old MSIE
|
475
|
+
if (tinyMCE.isMSIE5)
|
476
|
+
elm.outerHTML = elm.outerHTML;
|
477
|
+
}
|
478
|
+
|
479
|
+
function getSelectValue(form_obj, field_name) {
|
480
|
+
var elm = form_obj.elements[field_name];
|
481
|
+
|
482
|
+
if (!elm || elm.options == null || elm.selectedIndex == -1)
|
483
|
+
return "";
|
484
|
+
|
485
|
+
return elm.options[elm.selectedIndex].value;
|
486
|
+
}
|
487
|
+
|
488
|
+
function getLinkListHTML(elm_id, target_form_element, onchange_func) {
|
489
|
+
if (typeof(tinyMCELinkList) == "undefined" || tinyMCELinkList.length == 0)
|
490
|
+
return "";
|
491
|
+
|
492
|
+
var html = "";
|
493
|
+
|
494
|
+
html += '<select id="' + elm_id + '" name="' + elm_id + '"';
|
495
|
+
html += ' class="mceLinkList" onchange="this.form.' + target_form_element + '.value=';
|
496
|
+
html += 'this.options[this.selectedIndex].value;';
|
497
|
+
|
498
|
+
if (typeof(onchange_func) != "undefined")
|
499
|
+
html += onchange_func + '(\'' + target_form_element + '\',this.options[this.selectedIndex].text,this.options[this.selectedIndex].value);';
|
500
|
+
|
501
|
+
html += '"><option value="">---</option>';
|
502
|
+
|
503
|
+
for (var i=0; i<tinyMCELinkList.length; i++)
|
504
|
+
html += '<option value="' + tinyMCELinkList[i][1] + '">' + tinyMCELinkList[i][0] + '</option>';
|
505
|
+
|
506
|
+
html += '</select>';
|
507
|
+
|
508
|
+
return html;
|
509
|
+
|
510
|
+
// tinyMCE.debug('-- image list start --', html, '-- image list end --');
|
511
|
+
}
|
512
|
+
|
513
|
+
function getTargetListHTML(elm_id, target_form_element) {
|
514
|
+
var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';');
|
515
|
+
var html = '';
|
516
|
+
|
517
|
+
html += '<select id="' + elm_id + '" name="' + elm_id + '" onchange="this.form.' + target_form_element + '.value=';
|
518
|
+
html += 'this.options[this.selectedIndex].value;">';
|
519
|
+
html += '<option value="_self">' + tinyMCEPopup.getLang('advlink_dlg.target_same') + '</option>';
|
520
|
+
html += '<option value="_blank">' + tinyMCEPopup.getLang('advlink_dlg.target_blank') + ' (_blank)</option>';
|
521
|
+
html += '<option value="_parent">' + tinyMCEPopup.getLang('advlink_dlg.target_parent') + ' (_parent)</option>';
|
522
|
+
html += '<option value="_top">' + tinyMCEPopup.getLang('advlink_dlg.target_top') + ' (_top)</option>';
|
523
|
+
|
524
|
+
for (var i=0; i<targets.length; i++) {
|
525
|
+
var key, value;
|
526
|
+
|
527
|
+
if (targets[i] == "")
|
528
|
+
continue;
|
529
|
+
|
530
|
+
key = targets[i].split('=')[0];
|
531
|
+
value = targets[i].split('=')[1];
|
532
|
+
|
533
|
+
html += '<option value="' + key + '">' + value + ' (' + key + ')</option>';
|
534
|
+
}
|
535
|
+
|
536
|
+
html += '</select>';
|
537
|
+
|
538
|
+
return html;
|
539
|
+
}
|
540
|
+
|
541
|
+
// While loading
|
542
|
+
preinit();
|
543
|
+
tinyMCEPopup.onInit.add(init);
|