Skip to content
Snippets Groups Projects
Commit fd78eea8 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

correctly encode namespace in mediapopup URL FS#1319

darcs-hash:20080215094453-7ad00-a9ed8007f639ab9a163ea39cb6ce5dd43f639983.gz
parent ca6a0701
No related branches found
No related tags found
No related merge requests found
...@@ -146,7 +146,7 @@ function initToolbar(tbid,edid,tb){ ...@@ -146,7 +146,7 @@ function initToolbar(tbid,edid,tb){
var btn = createToolButton(tb[i]['icon'], var btn = createToolButton(tb[i]['icon'],
tb[i]['title'], tb[i]['title'],
tb[i]['key']); tb[i]['key']);
var actionFunc = 'addBtnAction'+tb[i]['type'].charAt(0).toUpperCase()+tb[i]['type'].substring(1); var actionFunc = 'addBtnAction'+tb[i]['type'].charAt(0).toUpperCase()+tb[i]['type'].substring(1);
var exists = eval("typeof("+actionFunc+") == 'function'"); var exists = eval("typeof("+actionFunc+") == 'function'");
if(exists) if(exists)
...@@ -160,7 +160,7 @@ function initToolbar(tbid,edid,tb){ ...@@ -160,7 +160,7 @@ function initToolbar(tbid,edid,tb){
/** /**
* Add button action for format buttons * Add button action for format buttons
* *
* @param DOMElement btn Button element to add the action to * @param DOMElement btn Button element to add the action to
* @param array props Associative array of button properties * @param array props Associative array of button properties
* @param string edid ID of the editor textarea * @param string edid ID of the editor textarea
* @return boolean If button should be appended * @return boolean If button should be appended
...@@ -176,14 +176,14 @@ function addBtnActionFormat(btn, props, edid) ...@@ -176,14 +176,14 @@ function addBtnActionFormat(btn, props, edid)
jsEscape(props['close'])+"','"+ jsEscape(props['close'])+"','"+
jsEscape(sample)+ jsEscape(sample)+
"');return false;}"); "');return false;}");
return true; return true;
} }
/** /**
* Add button action for insert buttons * Add button action for insert buttons
* *
* @param DOMElement btn Button element to add the action to * @param DOMElement btn Button element to add the action to
* @param array props Associative array of button properties * @param array props Associative array of button properties
* @param string edid ID of the editor textarea * @param string edid ID of the editor textarea
* @return boolean If button should be appended * @return boolean If button should be appended
...@@ -201,7 +201,7 @@ function addBtnActionInsert(btn, props, edid) ...@@ -201,7 +201,7 @@ function addBtnActionInsert(btn, props, edid)
/** /**
* Add button action for signature button * Add button action for signature button
* *
* @param DOMElement btn Button element to add the action to * @param DOMElement btn Button element to add the action to
* @param array props Associative array of button properties * @param array props Associative array of button properties
* @param string edid ID of the editor textarea * @param string edid ID of the editor textarea
* @return boolean If button should be appended * @return boolean If button should be appended
...@@ -222,7 +222,7 @@ function addBtnActionSignature(btn, props, edid) ...@@ -222,7 +222,7 @@ function addBtnActionSignature(btn, props, edid)
/** /**
* Add button action for picker buttons and create picker element * Add button action for picker buttons and create picker element
* *
* @param DOMElement btn Button element to add the action to * @param DOMElement btn Button element to add the action to
* @param array props Associative array of button properties * @param array props Associative array of button properties
* @param string edid ID of the editor textarea * @param string edid ID of the editor textarea
* @param int id Unique number of the picker * @param int id Unique number of the picker
...@@ -243,7 +243,7 @@ function addBtnActionPicker(btn, props, edid, id) ...@@ -243,7 +243,7 @@ function addBtnActionPicker(btn, props, edid, id)
/** /**
* Add button action for the mediapopup button * Add button action for the mediapopup button
* *
* @param DOMElement btn Button element to add the action to * @param DOMElement btn Button element to add the action to
* @param array props Associative array of button properties * @param array props Associative array of button properties
* @return boolean If button should be appended * @return boolean If button should be appended
* @author Gabriel Birke <birke@d-scribe.de> * @author Gabriel Birke <birke@d-scribe.de>
...@@ -251,7 +251,7 @@ function addBtnActionPicker(btn, props, edid, id) ...@@ -251,7 +251,7 @@ function addBtnActionPicker(btn, props, edid, id)
function addBtnActionMediapopup(btn, props) function addBtnActionMediapopup(btn, props)
{ {
eval("btn.onclick = function(){window.open('"+ eval("btn.onclick = function(){window.open('"+
jsEscape(props['url']+NS)+"','"+ jsEscape(props['url']+encodeURIComponent(NS))+"','"+
jsEscape(props['name'])+"','"+ jsEscape(props['name'])+"','"+
jsEscape(props['options'])+ jsEscape(props['options'])+
"');return false;}"); "');return false;}");
...@@ -367,7 +367,7 @@ function insertAtCarret(edid,value){ ...@@ -367,7 +367,7 @@ function insertAtCarret(edid,value){
field.focus(); field.focus();
sel = document.selection.createRange(); sel = document.selection.createRange();
sel.text = value; sel.text = value;
//MOZILLA/NETSCAPE support //MOZILLA/NETSCAPE support
}else if (field.selectionStart || field.selectionStart == '0') { }else if (field.selectionStart || field.selectionStart == '0') {
var startPos = field.selectionStart; var startPos = field.selectionStart;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment