aboutsummaryrefslogtreecommitdiffstats
path: root/library/tinymce/jscripts/tiny_mce/plugins/advlink
diff options
context:
space:
mode:
Diffstat (limited to 'library/tinymce/jscripts/tiny_mce/plugins/advlink')
-rw-r--r--[-rwxr-xr-x]library/tinymce/jscripts/tiny_mce/plugins/advlink/css/advlink.css0
-rw-r--r--[-rwxr-xr-x]library/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js0
-rw-r--r--[-rwxr-xr-x]library/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js0
-rw-r--r--[-rwxr-xr-x]library/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js49
-rw-r--r--[-rwxr-xr-x]library/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en_dlg.js53
-rw-r--r--[-rwxr-xr-x]library/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm65
6 files changed, 66 insertions, 101 deletions
diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advlink/css/advlink.css b/library/tinymce/jscripts/tiny_mce/plugins/advlink/css/advlink.css
index 14364316a..14364316a 100755..100644
--- a/library/tinymce/jscripts/tiny_mce/plugins/advlink/css/advlink.css
+++ b/library/tinymce/jscripts/tiny_mce/plugins/advlink/css/advlink.css
diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js
index 983fe5a9c..983fe5a9c 100755..100644
--- a/library/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js
+++ b/library/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js
diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js
index 14e46a762..14e46a762 100755..100644
--- a/library/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js
+++ b/library/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js
diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js b/library/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js
index b78e82f76..9ca955c92 100755..100644
--- a/library/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js
+++ b/library/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js
@@ -30,8 +30,6 @@ function init() {
document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink');
document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink');
- document.getElementById('linklisthrefcontainer').innerHTML = getLinkListHTML('linklisthref','href');
- document.getElementById('anchorlistcontainer').innerHTML = getAnchorListHTML('anchorlist','href');
document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target');
// Link list
@@ -41,6 +39,13 @@ function init() {
else
document.getElementById("linklisthrefcontainer").innerHTML = html;
+ // Anchor list
+ html = getAnchorListHTML('anchorlist','href');
+ if (html == "")
+ document.getElementById("anchorlistrow").style.display = 'none';
+ else
+ document.getElementById("anchorlistcontainer").innerHTML = html;
+
// Resize some elements
if (isVisible('hrefbrowser'))
document.getElementById('href').style.width = '260px';
@@ -49,6 +54,13 @@ function init() {
document.getElementById('popupurl').style.width = '180px';
elm = inst.dom.getParent(elm, "A");
+ if (elm == null) {
+ var prospect = inst.dom.create("p", null, inst.selection.getContent());
+ if (prospect.childNodes.length === 1) {
+ elm = prospect.firstChild;
+ }
+ }
+
if (elm != null && elm.nodeName == "A")
action = "update";
@@ -360,20 +372,22 @@ function setAttrib(elm, attrib, value) {
}
function getAnchorListHTML(id, target) {
- var inst = tinyMCEPopup.editor;
- var nodes = inst.dom.select('a.mceItemAnchor,img.mceItemAnchor'), name, i;
- var html = "";
-
- html += '<select id="' + id + '" name="' + id + '" class="mceAnchorList" o2nfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target + '.value=';
- html += 'this.options[this.selectedIndex].value;">';
- html += '<option value="">---</option>';
+ var ed = tinyMCEPopup.editor, nodes = ed.dom.select('a'), name, i, len, html = "";
- for (i=0; i<nodes.length; i++) {
- if ((name = inst.dom.getAttrib(nodes[i], "name")) != "")
+ for (i=0, len=nodes.length; i<len; i++) {
+ if ((name = ed.dom.getAttrib(nodes[i], "name")) != "")
html += '<option value="#' + name + '">' + name + '</option>';
}
- html += '</select>';
+ if (html == "")
+ return "";
+
+ html = '<select id="' + id + '" name="' + id + '" class="mceAnchorList"'
+ + ' onchange="this.form.' + target + '.value=this.options[this.selectedIndex].value"'
+ + '>'
+ + '<option value="">---</option>'
+ + html
+ + '</select>';
return html;
}
@@ -389,7 +403,6 @@ function insertAction() {
// Remove element if there is no href
if (!document.forms[0].href.value) {
- tinyMCEPopup.execCommand("mceBeginUndoLevel");
i = inst.selection.getBookmark();
inst.dom.remove(elm, 1);
inst.selection.moveToBookmark(i);
@@ -398,12 +411,10 @@ function insertAction() {
return;
}
- tinyMCEPopup.execCommand("mceBeginUndoLevel");
-
// Create new anchor elements
if (elm == null) {
inst.getDoc().execCommand("unlink", false, null);
- tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1});
+ tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';});
for (i=0; i<elementArray.length; i++)
@@ -425,7 +436,7 @@ function insertAction() {
function setAllAttribs(elm) {
var formObj = document.forms[0];
- var href = formObj.href.value;
+ var href = formObj.href.value.replace(/ /g, '%20');
var target = getSelectValue(formObj, 'targetlist');
setAttrib(elm, 'href', href);
@@ -477,7 +488,7 @@ function getLinkListHTML(elm_id, target_form_element, onchange_func) {
var html = "";
html += '<select id="' + elm_id + '" name="' + elm_id + '"';
- html += ' class="mceLinkList" onfoc2us="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
+ html += ' class="mceLinkList" onchange="this.form.' + target_form_element + '.value=';
html += 'this.options[this.selectedIndex].value;';
if (typeof(onchange_func) != "undefined")
@@ -499,7 +510,7 @@ function getTargetListHTML(elm_id, target_form_element) {
var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';');
var html = '';
- html += '<select id="' + elm_id + '" name="' + elm_id + '" onf2ocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
+ html += '<select id="' + elm_id + '" name="' + elm_id + '" onchange="this.form.' + target_form_element + '.value=';
html += 'this.options[this.selectedIndex].value;">';
html += '<option value="_self">' + tinyMCEPopup.getLang('advlink_dlg.target_same') + '</option>';
html += '<option value="_blank">' + tinyMCEPopup.getLang('advlink_dlg.target_blank') + ' (_blank)</option>';
diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en_dlg.js b/library/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en_dlg.js
index c71ffbd0f..3169a5658 100755..100644
--- a/library/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en_dlg.js
+++ b/library/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en_dlg.js
@@ -1,52 +1 @@
-tinyMCE.addI18n('en.advlink_dlg',{
-title:"Insert/edit link",
-url:"Link URL",
-target:"Target",
-titlefield:"Title",
-is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?",
-is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?",
-list:"Link list",
-general_tab:"General",
-popup_tab:"Popup",
-events_tab:"Events",
-advanced_tab:"Advanced",
-general_props:"General properties",
-popup_props:"Popup properties",
-event_props:"Events",
-advanced_props:"Advanced properties",
-popup_opts:"Options",
-anchor_names:"Anchors",
-target_same:"Open in this window / frame",
-target_parent:"Open in parent window / frame",
-target_top:"Open in top frame (replaces all frames)",
-target_blank:"Open in new window",
-popup:"Javascript popup",
-popup_url:"Popup URL",
-popup_name:"Window name",
-popup_return:"Insert 'return false'",
-popup_scrollbars:"Show scrollbars",
-popup_statusbar:"Show status bar",
-popup_toolbar:"Show toolbars",
-popup_menubar:"Show menu bar",
-popup_location:"Show location bar",
-popup_resizable:"Make window resizable",
-popup_dependent:"Dependent (Mozilla/Firefox only)",
-popup_size:"Size",
-popup_position:"Position (X/Y)",
-id:"Id",
-style:"Style",
-classes:"Classes",
-target_name:"Target name",
-langdir:"Language direction",
-target_langcode:"Target language",
-langcode:"Language code",
-encoding:"Target character encoding",
-mime:"Target MIME type",
-rel:"Relationship page to target",
-rev:"Relationship target to page",
-tabindex:"Tabindex",
-accesskey:"Accesskey",
-ltr:"Left to right",
-rtl:"Right to left",
-link_list:"Link list"
-}); \ No newline at end of file
+tinyMCE.addI18n('en.advlink_dlg',{"target_name":"Target Name",classes:"Classes",style:"Style",id:"ID","popup_position":"Position (X/Y)",langdir:"Language Direction","popup_size":"Size","popup_dependent":"Dependent (Mozilla/Firefox Only)","popup_resizable":"Make Window Resizable","popup_location":"Show Location Bar","popup_menubar":"Show Menu Bar","popup_toolbar":"Show Toolbars","popup_statusbar":"Show Status Bar","popup_scrollbars":"Show Scrollbars","popup_return":"Insert \'return false\'","popup_name":"Window Name","popup_url":"Popup URL",popup:"JavaScript Popup","target_blank":"Open in New Window","target_top":"Open in Top Frame (Replaces All Frames)","target_parent":"Open in Parent Window/Frame","target_same":"Open in This Window/Frame","anchor_names":"Anchors","popup_opts":"Options","advanced_props":"Advanced Properties","event_props":"Events","popup_props":"Popup Properties","general_props":"General Properties","advanced_tab":"Advanced","events_tab":"Events","popup_tab":"Popup","general_tab":"General",list:"Link List","is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",titlefield:"Title",target:"Target",url:"Link URL",title:"Insert/Edit Link","link_list":"Link List",rtl:"Right to Left",ltr:"Left to Right",accesskey:"AccessKey",tabindex:"TabIndex",rev:"Relationship Target to Page",rel:"Relationship Page to Target",mime:"Target MIME Type",encoding:"Target Character Encoding",langcode:"Language Code","target_langcode":"Target Language",width:"Width",height:"Height"}); \ No newline at end of file
diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm b/library/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm
index 876669c6b..8ab7c2a95 100755..100644
--- a/library/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm
+++ b/library/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm
@@ -9,37 +9,38 @@
<script type="text/javascript" src="js/advlink.js"></script>
<link href="css/advlink.css" rel="stylesheet" type="text/css" />
</head>
-<body id="advlink" style="display: none">
- <form onsubmit="insertAction();return false;" action="#">
- <div class="tabs">
+<body id="advlink" style="display: none" role="application" onload="javascript:mcTabs.displayTab('general_tab','general_panel', true);" aria-labelledby="app_label">
+ <span class="mceVoiceLabel" id="app_label" style="display:none;">{#advlink_dlg.title}</span>
+ <form onsubmit="insertAction();return false;" action="#">
+ <div class="tabs" role="presentation">
<ul>
- <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advlink_dlg.general_tab}</a></span></li>
- <li id="popup_tab"><span><a href="javascript:mcTabs.displayTab('popup_tab','popup_panel');" onmousedown="return false;">{#advlink_dlg.popup_tab}</a></span></li>
- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#advlink_dlg.events_tab}</a></span></li>
- <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advlink_dlg.advanced_tab}</a></span></li>
+ <li id="general_tab" class="current" aria-controls="general_panel" ><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advlink_dlg.general_tab}</a></span></li>
+ <li id="popup_tab" aria-controls="popup_panel" ><span><a href="javascript:mcTabs.displayTab('popup_tab','popup_panel');" onmousedown="return false;">{#advlink_dlg.popup_tab}</a></span></li>
+ <li id="events_tab" aria-controls="events_panel"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#advlink_dlg.events_tab}</a></span></li>
+ <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advlink_dlg.advanced_tab}</a></span></li>
</ul>
</div>
- <div class="panel_wrapper">
+ <div class="panel_wrapper" role="presentation">
<div id="general_panel" class="panel current">
<fieldset>
<legend>{#advlink_dlg.general_props}</legend>
- <table border="0" cellpadding="4" cellspacing="0">
+ <table border="0" cellpadding="4" cellspacing="0" role="presentation">
<tr>
- <td class="nowrap"><label id="hreflabel" for="href">{#advlink_dlg.url}</label></td>
- <td><table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input id="href" name="href" type="text" class="mceFocus" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" /></td>
- <td id="hrefbrowsercontainer">&nbsp;</td>
- </tr>
- </table></td>
+ <td class="nowrap"><label id="hreflabel" for="href">{#advlink_dlg.url}</label></td>
+ <td><table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input id="href" name="href" type="text" class="mceFocus" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" aria-required="true" /></td>
+ <td id="hrefbrowsercontainer">&nbsp;</td>
+ </tr>
+ </table></td>
</tr>
<tr id="linklisthrefrow">
<td class="column1"><label for="linklisthref">{#advlink_dlg.list}</label></td>
<td colspan="2" id="linklisthrefcontainer"><select id="linklisthref"><option value=""></option></select></td>
</tr>
- <tr>
+ <tr id="anchorlistrow">
<td class="column1"><label for="anchorlist">{#advlink_dlg.anchor_names}</label></td>
<td colspan="2" id="anchorlistcontainer"><select id="anchorlist"><option value=""></option></select></td>
</tr>
@@ -70,7 +71,7 @@
<input type="checkbox" id="ispopup" name="ispopup" class="radio" onclick="setPopupControlsDisabled(!this.checked);buildOnClick();" />
<label id="ispopuplabel" for="ispopup">{#advlink_dlg.popup}</label>
- <table border="0" cellpadding="0" cellspacing="4">
+ <table border="0" cellpadding="0" cellspacing="4" role="presentation" >
<tr>
<td class="nowrap"><label for="popupurl">{#advlink_dlg.popup_url}</label>&nbsp;</td>
<td>
@@ -86,18 +87,22 @@
<td class="nowrap"><label for="popupname">{#advlink_dlg.popup_name}</label>&nbsp;</td>
<td><input type="text" name="popupname" id="popupname" value="" onchange="buildOnClick();" /></td>
</tr>
- <tr>
- <td class="nowrap"><label>{#advlink_dlg.popup_size}</label>&nbsp;</td>
+ <tr role="group" aria-labelledby="popup_size_label">
+ <td class="nowrap"><label id="popup_size_label">{#advlink_dlg.popup_size}</label>&nbsp;</td>
<td class="nowrap">
- <input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" /> x
- <input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" /> px
+ <span style="display:none" id="width_voiceLabel">{#advlink_dlg.width}</span>
+ <input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" aria-labelledby="width_voiceLabel" /> x
+ <span style="display:none" id="height_voiceLabel">{#advlink_dlg.height}</span>
+ <input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" aria-labelledby="height_voiceLabel" /> px
</td>
</tr>
- <tr>
- <td class="nowrap" id="labelleft"><label>{#advlink_dlg.popup_position}</label>&nbsp;</td>
+ <tr role="group" aria-labelledby="popup_position_label center_hint">
+ <td class="nowrap" id="labelleft"><label id="popup_position_label">{#advlink_dlg.popup_position}</label>&nbsp;</td>
<td class="nowrap">
- <input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" /> /
- <input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" /> (c /c = center)
+ <span style="display:none" id="x_voiceLabel">X</span>
+ <input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" aria-labelledby="x_voiceLabel" /> /
+ <span style="display:none" id="y_voiceLabel">Y</span>
+ <input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" aria-labelledby="y_voiceLabel" /> <span id="center_hint">(c /c = center)</span>
</td>
</tr>
</table>
@@ -105,7 +110,7 @@
<fieldset>
<legend>{#advlink_dlg.popup_opts}</legend>
- <table border="0" cellpadding="0" cellspacing="4">
+ <table border="0" cellpadding="0" cellspacing="4" role="presentation" >
<tr>
<td><input type="checkbox" id="popuplocation" name="popuplocation" class="checkbox" onchange="buildOnClick();" /></td>
<td class="nowrap"><label id="popuplocationlabel" for="popuplocation">{#advlink_dlg.popup_location}</label></td>
@@ -139,7 +144,7 @@
<fieldset>
<legend>{#advlink_dlg.advanced_props}</legend>
- <table border="0" cellpadding="0" cellspacing="4">
+ <table border="0" cellpadding="0" cellspacing="4" role="presentation" >
<tr>
<td class="column1"><label id="idlabel" for="id">{#advlink_dlg.id}</label></td>
<td><input id="id" name="id" type="text" value="" /></td>
@@ -259,7 +264,7 @@
<fieldset>
<legend>{#advlink_dlg.event_props}</legend>
- <table border="0" cellpadding="0" cellspacing="4">
+ <table border="0" cellpadding="0" cellspacing="4" role="presentation" >
<tr>
<td class="column1"><label for="onfocus">onfocus</label></td>
<td><input id="onfocus" name="onfocus" type="text" value="" /></td>
@@ -328,6 +333,6 @@
<input type="submit" id="insert" name="insert" value="{#insert}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
- </form>
+ </form>
</body>
</html>