mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
MDL-13766, mulit-filepicker in htmleditor worked.
This commit is contained in:
parent
77a2e1461b
commit
765943edc6
4 changed files with 9 additions and 5 deletions
|
@ -205,6 +205,12 @@ $output .= <<<EOF
|
||||||
prevOnSubmit = null;
|
prevOnSubmit = null;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
function moodlefilemanager(field_name, url, type, win) {
|
||||||
|
//alert(id2suffix[tinyMCE.selectedInstance.editorId]);
|
||||||
|
var suffix = id2suffix[tinyMCE.selectedInstance.editorId];
|
||||||
|
var el = win.document.getElementById(field_name);
|
||||||
|
eval('openpicker_'+suffix+'({"env":"editor","target":el})');
|
||||||
|
}
|
||||||
EOF;
|
EOF;
|
||||||
|
|
||||||
$lifetime = '86400';
|
$lifetime = '86400';
|
||||||
|
|
|
@ -123,5 +123,6 @@ function getElementsByClassName(oElm, strTagName, oClassNames){
|
||||||
}
|
}
|
||||||
return (arrReturnElements)
|
return (arrReturnElements)
|
||||||
}
|
}
|
||||||
|
var id2suffix = {};
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -4878,10 +4878,7 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v
|
||||||
$str .= '<div class="textareaicons">';
|
$str .= '<div class="textareaicons">';
|
||||||
$str .= '<script type="text/javascript">
|
$str .= '<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
function moodlefilemanager(field_name, url, type, win) {
|
id2suffix[\''.$id.'\']=\''.$suffix.'\';
|
||||||
var el = win.document.getElementById(field_name);
|
|
||||||
openpicker_'.$suffix.'({"env":"editor","target":el});
|
|
||||||
}
|
|
||||||
mce_saveOnSubmit(\''.addslashes_js($id).'\');
|
mce_saveOnSubmit(\''.addslashes_js($id).'\');
|
||||||
document.write(\''.addslashes_js($str_toggle).'\');
|
document.write(\''.addslashes_js($str_toggle).'\');
|
||||||
document.write(\''.addslashes_js(editorshortcutshelpbutton()).'\');
|
document.write(\''.addslashes_js(editorshortcutshelpbutton()).'\');
|
||||||
|
|
|
@ -663,7 +663,7 @@ function get_repository_client(){
|
||||||
_client.download = function(){
|
_client.download = function(){
|
||||||
var title = document.getElementById('newname-$suffix').value;
|
var title = document.getElementById('newname-$suffix').value;
|
||||||
var file = document.getElementById('fileurl-$suffix').value;
|
var file = document.getElementById('fileurl-$suffix').value;
|
||||||
var itemid = 0;
|
var itemid = 1;
|
||||||
if(_client.itemid){
|
if(_client.itemid){
|
||||||
itemid = _client.itemid;
|
itemid = _client.itemid;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue