mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-14741:
* use a better name for a variable * remove extra browse button and simplify code. Fix by Mauno K.
This commit is contained in:
parent
d074c20e49
commit
f8c9bb6bee
2 changed files with 4 additions and 11 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
require_once('../../config.php');
|
require_once('../../config.php');
|
||||||
|
|
||||||
$course = optional_param('course', 0, PARAM_INT);
|
$courseid = optional_param('course', 0, PARAM_INT);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
|
@ -177,7 +177,7 @@ echo <<<EOF
|
||||||
theme_advanced_buttons3: "media,advhr,emoticons,dragmath,spellchecker,search,code,fullscreen,bullist,numlist,outdent,indent,forecolor,backcolor,link,unlink,anchor,image,charmap,insertlayer,table",
|
theme_advanced_buttons3: "media,advhr,emoticons,dragmath,spellchecker,search,code,fullscreen,bullist,numlist,outdent,indent,forecolor,backcolor,link,unlink,anchor,image,charmap,insertlayer,table",
|
||||||
theme_advanced_buttons3_add: "media,emoticons,charmap,dragmath,search,code,fullscreen",
|
theme_advanced_buttons3_add: "media,emoticons,charmap,dragmath,search,code,fullscreen",
|
||||||
theme_advanced_fonts: "Trebuchet=Trebuchet MS,Verdana,Arial,Helvetica,sans-serif;Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;Wingdings=wingdings",
|
theme_advanced_fonts: "Trebuchet=Trebuchet MS,Verdana,Arial,Helvetica,sans-serif;Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;Wingdings=wingdings",
|
||||||
moodleimage_course_id: $course,
|
moodleimage_course_id: $courseid,
|
||||||
theme_advanced_resize_horizontal: true,
|
theme_advanced_resize_horizontal: true,
|
||||||
theme_advanced_resizing: true,
|
theme_advanced_resizing: true,
|
||||||
theme_advanced_toolbar_location : "top",
|
theme_advanced_toolbar_location : "top",
|
||||||
|
@ -198,7 +198,7 @@ echo <<<EOF
|
||||||
}
|
}
|
||||||
function moodlefilemanager(field_name, url, type, win) {
|
function moodlefilemanager(field_name, url, type, win) {
|
||||||
tinyMCE.activeEditor.windowManager.open({
|
tinyMCE.activeEditor.windowManager.open({
|
||||||
file: "{$CFG->httpswwwroot}/lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/link.php?id={$course}",
|
file: "{$CFG->httpswwwroot}/lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/link.php?id={$courseid}",
|
||||||
width: 480,
|
width: 480,
|
||||||
height: 380,
|
height: 380,
|
||||||
resizable: "yes",
|
resizable: "yes",
|
||||||
|
|
|
@ -44,11 +44,6 @@ tinyMCEPopup.onInit.add(FileBrowserDialogue.init, FileBrowserDialogue);
|
||||||
|
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
|
|
||||||
function onCancel() {
|
|
||||||
window.close();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function checkvalue(elm,formname) {
|
function checkvalue(elm,formname) {
|
||||||
var el = document.getElementById(elm);
|
var el = document.getElementById(elm);
|
||||||
if(!el.value) {
|
if(!el.value) {
|
||||||
|
@ -142,7 +137,7 @@ form { margin-bottom: 0px; margin-top: 0px; }
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<button type="button" name="close" onclick="return onCancel();"><?php print_string("close","editor");?></button>
|
<button type="button" name="close" onclick="tinyMCEPopup.close();"><?php print_string("close","editor");?></button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -166,8 +161,6 @@ form { margin-bottom: 0px; margin-top: 0px; }
|
||||||
<input type="hidden" name="sesskey" value="<?php p($USER->sesskey) ?>" />
|
<input type="hidden" name="sesskey" value="<?php p($USER->sesskey) ?>" />
|
||||||
<input type="file" name="userfile" id="userfile" size="35" />
|
<input type="file" name="userfile" id="userfile" size="35" />
|
||||||
<input name="save" type="submit" id="save" onclick="return checkvalue('userfile','uploader');" value="<?php print_string("upload","editor");?>" />
|
<input name="save" type="submit" id="save" onclick="return checkvalue('userfile','uploader');" value="<?php print_string("upload","editor");?>" />
|
||||||
|
|
||||||
<input name="save" type="submit" id="save" onclick="return checkvalue('userfile','uploader');" value="Browse" />
|
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue