summaryrefslogtreecommitdiff
path: root/lib/scripts
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2008-02-15 10:44:53 +0100
committerAndreas Gohr <andi@splitbrain.org>2008-02-15 10:44:53 +0100
commitfd78eea832963ae45c26beeb4ec0b44fd8525e26 (patch)
tree88e31eff9be26cc2e2aec2635c3b04a526d4a45e /lib/scripts
parentca6a0701aaa1cb57db984e2890fc389b73fdb3a3 (diff)
downloadrpg-fd78eea832963ae45c26beeb4ec0b44fd8525e26.tar.gz
rpg-fd78eea832963ae45c26beeb4ec0b44fd8525e26.tar.bz2
correctly encode namespace in mediapopup URL FS#1319
darcs-hash:20080215094453-7ad00-a9ed8007f639ab9a163ea39cb6ce5dd43f639983.gz
Diffstat (limited to 'lib/scripts')
-rw-r--r--lib/scripts/edit.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js
index 5bc7fe96a..9ee12d6c3 100644
--- a/lib/scripts/edit.js
+++ b/lib/scripts/edit.js
@@ -146,7 +146,7 @@ function initToolbar(tbid,edid,tb){
var btn = createToolButton(tb[i]['icon'],
tb[i]['title'],
tb[i]['key']);
-
+
var actionFunc = 'addBtnAction'+tb[i]['type'].charAt(0).toUpperCase()+tb[i]['type'].substring(1);
var exists = eval("typeof("+actionFunc+") == 'function'");
if(exists)
@@ -160,7 +160,7 @@ function initToolbar(tbid,edid,tb){
/**
* 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 string edid ID of the editor textarea
* @return boolean If button should be appended
@@ -176,14 +176,14 @@ function addBtnActionFormat(btn, props, edid)
jsEscape(props['close'])+"','"+
jsEscape(sample)+
"');return false;}");
-
+
return true;
}
/**
* 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 string edid ID of the editor textarea
* @return boolean If button should be appended
@@ -201,7 +201,7 @@ function addBtnActionInsert(btn, props, edid)
/**
* 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 string edid ID of the editor textarea
* @return boolean If button should be appended
@@ -222,7 +222,7 @@ function addBtnActionSignature(btn, props, edid)
/**
* 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 string edid ID of the editor textarea
* @param int id Unique number of the picker
@@ -243,7 +243,7 @@ function addBtnActionPicker(btn, props, edid, id)
/**
* 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
* @return boolean If button should be appended
* @author Gabriel Birke <birke@d-scribe.de>
@@ -251,7 +251,7 @@ function addBtnActionPicker(btn, props, edid, id)
function addBtnActionMediapopup(btn, props)
{
eval("btn.onclick = function(){window.open('"+
- jsEscape(props['url']+NS)+"','"+
+ jsEscape(props['url']+encodeURIComponent(NS))+"','"+
jsEscape(props['name'])+"','"+
jsEscape(props['options'])+
"');return false;}");
@@ -367,7 +367,7 @@ function insertAtCarret(edid,value){
field.focus();
sel = document.selection.createRange();
sel.text = value;
-
+
//MOZILLA/NETSCAPE support
}else if (field.selectionStart || field.selectionStart == '0') {
var startPos = field.selectionStart;