diff options
| author | hukl <contact@smyck.org> | 2009-09-09 12:07:57 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-09-09 12:07:57 +0200 |
| commit | a6292dd0fecd4482fe863ed849d126b5281b1a8a (patch) | |
| tree | 7c4c32e1a3448c5d1995a236ed01c731018da13d /public/javascripts/tiny_mce/plugins/advlink | |
| parent | 83fe1b1abd7d7bb85679be3f1341e5c88db0ae83 (diff) | |
huge tiny_mce update - now using the tiny_mce jquery build which allows tiny_mce to be initialized via jquery - great!
Diffstat (limited to 'public/javascripts/tiny_mce/plugins/advlink')
| -rw-r--r--[-rwxr-xr-x] | public/javascripts/tiny_mce/plugins/advlink/css/advlink.css | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | public/javascripts/tiny_mce/plugins/advlink/editor_plugin.js | 2 | ||||
| -rw-r--r--[-rwxr-xr-x] | public/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | public/javascripts/tiny_mce/plugins/advlink/js/advlink.js | 3 | ||||
| -rw-r--r--[-rwxr-xr-x] | public/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | public/javascripts/tiny_mce/plugins/advlink/link.htm | 41 |
6 files changed, 23 insertions, 23 deletions
diff --git a/public/javascripts/tiny_mce/plugins/advlink/css/advlink.css b/public/javascripts/tiny_mce/plugins/advlink/css/advlink.css index 1436431..1436431 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advlink/css/advlink.css +++ b/public/javascripts/tiny_mce/plugins/advlink/css/advlink.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/advlink/editor_plugin.js b/public/javascripts/tiny_mce/plugins/advlink/editor_plugin.js index 4899f7b..983fe5a 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advlink/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/advlink/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.AdvancedLinkPlugin',{init:function(ed,url){this.editor=ed;ed.addCommand('mceAdvLink',function(){var se=ed.selection;if(se.isCollapsed()&&!ed.dom.getParent(se.getNode(),'A'))return;ed.windowManager.open({file:url+'/link.htm',width:480+parseInt(ed.getLang('advlink.delta_width',0)),height:400+parseInt(ed.getLang('advlink.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('link',{title:'advlink.link_desc',cmd:'mceAdvLink'});ed.addShortcut('ctrl+k','advlink.advlink_desc','mceAdvLink');ed.onNodeChange.add(function(ed,cm,n,co){cm.setDisabled('link',co&&n.nodeName!='A');cm.setActive('link',n.nodeName=='A'&&!n.name);});},getInfo:function(){return{longname:'Advanced link',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('advlink',tinymce.plugins.AdvancedLinkPlugin);})(); \ No newline at end of file | (function(){tinymce.create("tinymce.plugins.AdvancedLinkPlugin",{init:function(a,b){this.editor=a;a.addCommand("mceAdvLink",function(){var c=a.selection;if(c.isCollapsed()&&!a.dom.getParent(c.getNode(),"A")){return}a.windowManager.open({file:b+"/link.htm",width:480+parseInt(a.getLang("advlink.delta_width",0)),height:400+parseInt(a.getLang("advlink.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("link",{title:"advlink.link_desc",cmd:"mceAdvLink"});a.addShortcut("ctrl+k","advlink.advlink_desc","mceAdvLink");a.onNodeChange.add(function(d,c,f,e){c.setDisabled("link",e&&f.nodeName!="A");c.setActive("link",f.nodeName=="A"&&!f.name)})},getInfo:function(){return{longname:"Advanced link",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlink",tinymce.plugins.AdvancedLinkPlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js index fc5325a..fc5325a 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/advlink/js/advlink.js b/public/javascripts/tiny_mce/plugins/advlink/js/advlink.js index a896250..bb7922a 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advlink/js/advlink.js +++ b/public/javascripts/tiny_mce/plugins/advlink/js/advlink.js | |||
| @@ -116,7 +116,7 @@ function checkPrefix(n) { | |||
| 116 | if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email'))) | 116 | if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email'))) |
| 117 | n.value = 'mailto:' + n.value; | 117 | n.value = 'mailto:' + n.value; |
| 118 | 118 | ||
| 119 | if (/^\s*www./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external'))) | 119 | if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external'))) |
| 120 | n.value = 'http://' + n.value; | 120 | n.value = 'http://' + n.value; |
| 121 | } | 121 | } |
| 122 | 122 | ||
| @@ -402,6 +402,7 @@ function insertAction() { | |||
| 402 | 402 | ||
| 403 | // Create new anchor elements | 403 | // Create new anchor elements |
| 404 | if (elm == null) { | 404 | if (elm == null) { |
| 405 | inst.getDoc().execCommand("unlink", false, null); | ||
| 405 | tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); | 406 | tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); |
| 406 | 407 | ||
| 407 | elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';}); | 408 | elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';}); |
diff --git a/public/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js index c71ffbd..c71ffbd 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js +++ b/public/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/advlink/link.htm b/public/javascripts/tiny_mce/plugins/advlink/link.htm index f46e8f8..cc8b0b8 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advlink/link.htm +++ b/public/javascripts/tiny_mce/plugins/advlink/link.htm | |||
| @@ -8,7 +8,6 @@ | |||
| 8 | <script type="text/javascript" src="../../utils/validate.js"></script> | 8 | <script type="text/javascript" src="../../utils/validate.js"></script> |
| 9 | <script type="text/javascript" src="js/advlink.js"></script> | 9 | <script type="text/javascript" src="js/advlink.js"></script> |
| 10 | <link href="css/advlink.css" rel="stylesheet" type="text/css" /> | 10 | <link href="css/advlink.css" rel="stylesheet" type="text/css" /> |
| 11 | <base target="_self" /> | ||
| 12 | </head> | 11 | </head> |
| 13 | <body id="advlink" style="display: none"> | 12 | <body id="advlink" style="display: none"> |
| 14 | <form onsubmit="insertAction();return false;" action="#"> | 13 | <form onsubmit="insertAction();return false;" action="#"> |
| @@ -28,7 +27,7 @@ | |||
| 28 | 27 | ||
| 29 | <table border="0" cellpadding="4" cellspacing="0"> | 28 | <table border="0" cellpadding="4" cellspacing="0"> |
| 30 | <tr> | 29 | <tr> |
| 31 | <td nowrap="nowrap"><label id="hreflabel" for="href">{#advlink_dlg.url}</label></td> | 30 | <td class="nowrap"><label id="hreflabel" for="href">{#advlink_dlg.url}</label></td> |
| 32 | <td><table border="0" cellspacing="0" cellpadding="0"> | 31 | <td><table border="0" cellspacing="0" cellpadding="0"> |
| 33 | <tr> | 32 | <tr> |
| 34 | <td><input id="href" name="href" type="text" class="mceFocus" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" /></td> | 33 | <td><input id="href" name="href" type="text" class="mceFocus" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" /></td> |
| @@ -38,25 +37,25 @@ | |||
| 38 | </tr> | 37 | </tr> |
| 39 | <tr id="linklisthrefrow"> | 38 | <tr id="linklisthrefrow"> |
| 40 | <td class="column1"><label for="linklisthref">{#advlink_dlg.list}</label></td> | 39 | <td class="column1"><label for="linklisthref">{#advlink_dlg.list}</label></td> |
| 41 | <td colspan="2" id="linklisthrefcontainer"> </td> | 40 | <td colspan="2" id="linklisthrefcontainer"><select id="linklisthref"><option value=""></option></select></td> |
| 42 | </tr> | 41 | </tr> |
| 43 | <tr> | 42 | <tr> |
| 44 | <td class="column1"><label for="anchorlist">{#advlink_dlg.anchor_names}</label></td> | 43 | <td class="column1"><label for="anchorlist">{#advlink_dlg.anchor_names}</label></td> |
| 45 | <td colspan="2" id="anchorlistcontainer"> </td> | 44 | <td colspan="2" id="anchorlistcontainer"><select id="anchorlist"><option value=""></option></select></td> |
| 46 | </tr> | 45 | </tr> |
| 47 | <tr> | 46 | <tr> |
| 48 | <td><label id="targetlistlabel" for="targetlist">{#advlink_dlg.target}</label></td> | 47 | <td><label id="targetlistlabel" for="targetlist">{#advlink_dlg.target}</label></td> |
| 49 | <td id="targetlistcontainer"> </td> | 48 | <td id="targetlistcontainer"><select id="targetlist"><option value=""></option></select></td> |
| 50 | </tr> | 49 | </tr> |
| 51 | <tr> | 50 | <tr> |
| 52 | <td nowrap="nowrap"><label id="titlelabel" for="title">{#advlink_dlg.titlefield}</label></td> | 51 | <td class="nowrap"><label id="titlelabel" for="title">{#advlink_dlg.titlefield}</label></td> |
| 53 | <td><input id="title" name="title" type="text" value="" /></td> | 52 | <td><input id="title" name="title" type="text" value="" /></td> |
| 54 | </tr> | 53 | </tr> |
| 55 | <tr> | 54 | <tr> |
| 56 | <td><label id="classlabel" for="classlist">{#class_name}</label></td> | 55 | <td><label id="classlabel" for="classlist">{#class_name}</label></td> |
| 57 | <td> | 56 | <td> |
| 58 | <select id="classlist" name="classlist" onchange="changeClass();"> | 57 | <select id="classlist" name="classlist" onchange="changeClass();"> |
| 59 | <option value="" selected>{#not_set}</option> | 58 | <option value="" selected="selected">{#not_set}</option> |
| 60 | </select> | 59 | </select> |
| 61 | </td> | 60 | </td> |
| 62 | </tr> | 61 | </tr> |
| @@ -73,7 +72,7 @@ | |||
| 73 | 72 | ||
| 74 | <table border="0" cellpadding="0" cellspacing="4"> | 73 | <table border="0" cellpadding="0" cellspacing="4"> |
| 75 | <tr> | 74 | <tr> |
| 76 | <td nowrap="nowrap"><label for="popupurl">{#advlink_dlg.popup_url}</label> </td> | 75 | <td class="nowrap"><label for="popupurl">{#advlink_dlg.popup_url}</label> </td> |
| 77 | <td> | 76 | <td> |
| 78 | <table border="0" cellspacing="0" cellpadding="0"> | 77 | <table border="0" cellspacing="0" cellpadding="0"> |
| 79 | <tr> | 78 | <tr> |
| @@ -84,19 +83,19 @@ | |||
| 84 | </td> | 83 | </td> |
| 85 | </tr> | 84 | </tr> |
| 86 | <tr> | 85 | <tr> |
| 87 | <td nowrap="nowrap"><label for="popupname">{#advlink_dlg.popup_name}</label> </td> | 86 | <td class="nowrap"><label for="popupname">{#advlink_dlg.popup_name}</label> </td> |
| 88 | <td><input type="text" name="popupname" id="popupname" value="" onchange="buildOnClick();" /></td> | 87 | <td><input type="text" name="popupname" id="popupname" value="" onchange="buildOnClick();" /></td> |
| 89 | </tr> | 88 | </tr> |
| 90 | <tr> | 89 | <tr> |
| 91 | <td nowrap="nowrap"><label>{#advlink_dlg.popup_size}</label> </td> | 90 | <td class="nowrap"><label>{#advlink_dlg.popup_size}</label> </td> |
| 92 | <td nowrap="nowrap"> | 91 | <td class="nowrap"> |
| 93 | <input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" /> x | 92 | <input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" /> x |
| 94 | <input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" /> px | 93 | <input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" /> px |
| 95 | </td> | 94 | </td> |
| 96 | </tr> | 95 | </tr> |
| 97 | <tr> | 96 | <tr> |
| 98 | <td nowrap="nowrap" id="labelleft"><label>{#advlink_dlg.popup_position}</label> </td> | 97 | <td class="nowrap" id="labelleft"><label>{#advlink_dlg.popup_position}</label> </td> |
| 99 | <td nowrap="nowrap"> | 98 | <td class="nowrap"> |
| 100 | <input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" /> / | 99 | <input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" /> / |
| 101 | <input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" /> (c /c = center) | 100 | <input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" /> (c /c = center) |
| 102 | </td> | 101 | </td> |
| @@ -109,27 +108,27 @@ | |||
| 109 | <table border="0" cellpadding="0" cellspacing="4"> | 108 | <table border="0" cellpadding="0" cellspacing="4"> |
| 110 | <tr> | 109 | <tr> |
| 111 | <td><input type="checkbox" id="popuplocation" name="popuplocation" class="checkbox" onchange="buildOnClick();" /></td> | 110 | <td><input type="checkbox" id="popuplocation" name="popuplocation" class="checkbox" onchange="buildOnClick();" /></td> |
| 112 | <td nowrap="nowrap"><label id="popuplocationlabel" for="popuplocation">{#advlink_dlg.popup_location}</label></td> | 111 | <td class="nowrap"><label id="popuplocationlabel" for="popuplocation">{#advlink_dlg.popup_location}</label></td> |
| 113 | <td><input type="checkbox" id="popupscrollbars" name="popupscrollbars" class="checkbox" onchange="buildOnClick();" /></td> | 112 | <td><input type="checkbox" id="popupscrollbars" name="popupscrollbars" class="checkbox" onchange="buildOnClick();" /></td> |
| 114 | <td nowrap="nowrap"><label id="popupscrollbarslabel" for="popupscrollbars">{#advlink_dlg.popup_scrollbars}</label></td> | 113 | <td class="nowrap"><label id="popupscrollbarslabel" for="popupscrollbars">{#advlink_dlg.popup_scrollbars}</label></td> |
| 115 | </tr> | 114 | </tr> |
| 116 | <tr> | 115 | <tr> |
| 117 | <td><input type="checkbox" id="popupmenubar" name="popupmenubar" class="checkbox" onchange="buildOnClick();" /></td> | 116 | <td><input type="checkbox" id="popupmenubar" name="popupmenubar" class="checkbox" onchange="buildOnClick();" /></td> |
| 118 | <td nowrap="nowrap"><label id="popupmenubarlabel" for="popupmenubar">{#advlink_dlg.popup_menubar}</label></td> | 117 | <td class="nowrap"><label id="popupmenubarlabel" for="popupmenubar">{#advlink_dlg.popup_menubar}</label></td> |
| 119 | <td><input type="checkbox" id="popupresizable" name="popupresizable" class="checkbox" onchange="buildOnClick();" /></td> | 118 | <td><input type="checkbox" id="popupresizable" name="popupresizable" class="checkbox" onchange="buildOnClick();" /></td> |
| 120 | <td nowrap="nowrap"><label id="popupresizablelabel" for="popupresizable">{#advlink_dlg.popup_resizable}</label></td> | 119 | <td class="nowrap"><label id="popupresizablelabel" for="popupresizable">{#advlink_dlg.popup_resizable}</label></td> |
| 121 | </tr> | 120 | </tr> |
| 122 | <tr> | 121 | <tr> |
| 123 | <td><input type="checkbox" id="popuptoolbar" name="popuptoolbar" class="checkbox" onchange="buildOnClick();" /></td> | 122 | <td><input type="checkbox" id="popuptoolbar" name="popuptoolbar" class="checkbox" onchange="buildOnClick();" /></td> |
| 124 | <td nowrap="nowrap"><label id="popuptoolbarlabel" for="popuptoolbar">{#advlink_dlg.popup_toolbar}</label></td> | 123 | <td class="nowrap"><label id="popuptoolbarlabel" for="popuptoolbar">{#advlink_dlg.popup_toolbar}</label></td> |
| 125 | <td><input type="checkbox" id="popupdependent" name="popupdependent" class="checkbox" onchange="buildOnClick();" /></td> | 124 | <td><input type="checkbox" id="popupdependent" name="popupdependent" class="checkbox" onchange="buildOnClick();" /></td> |
| 126 | <td nowrap="nowrap"><label id="popupdependentlabel" for="popupdependent">{#advlink_dlg.popup_dependent}</label></td> | 125 | <td class="nowrap"><label id="popupdependentlabel" for="popupdependent">{#advlink_dlg.popup_dependent}</label></td> |
| 127 | </tr> | 126 | </tr> |
| 128 | <tr> | 127 | <tr> |
| 129 | <td><input type="checkbox" id="popupstatus" name="popupstatus" class="checkbox" onchange="buildOnClick();" /></td> | 128 | <td><input type="checkbox" id="popupstatus" name="popupstatus" class="checkbox" onchange="buildOnClick();" /></td> |
| 130 | <td nowrap="nowrap"><label id="popupstatuslabel" for="popupstatus">{#advlink_dlg.popup_statusbar}</label></td> | 129 | <td class="nowrap"><label id="popupstatuslabel" for="popupstatus">{#advlink_dlg.popup_statusbar}</label></td> |
| 131 | <td><input type="checkbox" id="popupreturn" name="popupreturn" class="checkbox" onchange="buildOnClick();" checked="checked" /></td> | 130 | <td><input type="checkbox" id="popupreturn" name="popupreturn" class="checkbox" onchange="buildOnClick();" checked="checked" /></td> |
| 132 | <td nowrap="nowrap"><label id="popupreturnlabel" for="popupreturn">{#advlink_dlg.popup_return}</label></td> | 131 | <td class="nowrap"><label id="popupreturnlabel" for="popupreturn">{#advlink_dlg.popup_return}</label></td> |
| 133 | </tr> | 132 | </tr> |
| 134 | </table> | 133 | </table> |
| 135 | </fieldset> | 134 | </fieldset> |
