"MDL-20592, improve advimage plugin in editor"

This commit is contained in:
Dongsheng Cai
2009-11-11 05:26:34 +00:00
parent 1caf890258
commit 34f94b75ec
4 changed files with 100 additions and 15 deletions
@@ -0,0 +1,83 @@
Index: lib/editor/tinymce/plugins/advimage/image.htm
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/editor/tinymce/plugins/advimage/image.htm,v
retrieving revision 1.1
diff -u -r1.1 image.htm
--- lib/editor/tinymce/plugins/advimage/image.htm 16 May 2009 20:53:41 -0000 1.1
+++ lib/editor/tinymce/plugins/advimage/image.htm 11 Nov 2009 05:18:39 -0000
@@ -26,14 +26,15 @@
<legend>{#advimage_dlg.general}</legend>
<table class="properties">
+ <tr>
+ <td class="column1">&nbsp;</td>
+ <td align="left" id="srcbrowsercontainer">&nbsp;</td>
+ </tr>
<tr>
<td class="column1"><label id="srclabel" for="src">{#advimage_dlg.src}</label></td>
- <td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input name="src" type="text" id="src" value="" class="mceFocus" onchange="ImageDialog.showPreviewImage(this.value);" /></td>
- <td id="srcbrowsercontainer">&nbsp;</td>
- </tr>
- </table></td>
+ <td>
+ <input name="src" type="text" id="src" value="" class="mceFocus" onchange="ImageDialog.showPreviewImage(this.value);" />
+ </td>
</tr>
<tr>
<td><label for="src_list">{#advimage_dlg.image_list}</label></td>
@@ -41,12 +42,8 @@
</tr>
<tr>
<td class="column1"><label id="altlabel" for="alt">{#advimage_dlg.alt}</label></td>
- <td colspan="2"><input id="alt" name="alt" type="text" value="" /></td>
+ <td><input id="alt" name="alt" type="text" value="" /></td>
</tr>
- <tr>
- <td class="column1"><label id="titlelabel" for="title">{#advimage_dlg.title}</label></td>
- <td colspan="2"><input id="title" name="title" type="text" value="" /></td>
- </tr>
</table>
</fieldset>
@@ -180,10 +177,13 @@
<table border="0" cellpadding="4" cellspacing="0">
<tr>
+ <td class="column1"><label id="titlelabel" for="title">{#advimage_dlg.title}</label></td>
+ <td><input id="title" name="title" type="text" value="" /></td>
+ </tr>
+ <tr>
<td class="column1"><label id="idlabel" for="id">{#advimage_dlg.id}</label></td>
<td><input id="id" name="id" type="text" value="" /></td>
</tr>
-
<tr>
<td class="column1"><label id="dirlabel" for="dir">{#advimage_dlg.langdir}</label></td>
<td>
Index: lib/editor/tinymce/plugins/advimage/css/advimage.css
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/editor/tinymce/plugins/advimage/css/advimage.css,v
retrieving revision 1.1
diff -u -r1.1 advimage.css
--- lib/editor/tinymce/plugins/advimage/css/advimage.css 16 May 2009 20:54:52 -0000 1.1
+++ lib/editor/tinymce/plugins/advimage/css/advimage.css 11 Nov 2009 05:18:39 -0000
@@ -1,13 +1,15 @@
#src_list, #over_list, #out_list {width:280px;}
.mceActionPanel {margin-top:7px;}
+.moodlebutton {font-size: 1.5em;font-weight:bold;padding: 3px;border:1px solid #ccc;text-decoration:none}
+.moodlebutton:hover {background: #ccc}
.alignPreview {border:1px solid #000; width:140px; height:140px; overflow:hidden; padding:5px;}
.checkbox {border:0;}
.panel_wrapper div.current {height:305px;}
-#prev {margin:0; border:1px solid #000; width:428px; height:150px; overflow:auto;}
+#prev {margin:0; border:1px solid #000; width:428px; height:180px; overflow:auto;}
#align, #classlist {width:150px;}
#width, #height {vertical-align:middle; width:50px; text-align:center;}
#vspace, #hspace, #border {vertical-align:middle; width:30px; text-align:center;}
#class_list {width:180px;}
input {width: 280px;}
#constrain, #onmousemovecheck {width:auto;}
-#id, #dir, #lang, #usemap, #longdesc {width:200px;}
+#id, #title, #dir, #lang, #usemap, #longdesc {width:200px;}
@@ -1,13 +1,15 @@
#src_list, #over_list, #out_list {width:280px;}
.mceActionPanel {margin-top:7px;}
.moodlebutton {font-size: 1.5em;font-weight:bold;padding: 3px;border:1px solid #ccc;text-decoration:none}
.moodlebutton:hover {background: #ccc}
.alignPreview {border:1px solid #000; width:140px; height:140px; overflow:hidden; padding:5px;}
.checkbox {border:0;}
.panel_wrapper div.current {height:305px;}
#prev {margin:0; border:1px solid #000; width:428px; height:150px; overflow:auto;}
#prev {margin:0; border:1px solid #000; width:428px; height:180px; overflow:auto;}
#align, #classlist {width:150px;}
#width, #height {vertical-align:middle; width:50px; text-align:center;}
#vspace, #hspace, #border {vertical-align:middle; width:30px; text-align:center;}
#class_list {width:180px;}
input {width: 280px;}
#constrain, #onmousemovecheck {width:auto;}
#id, #dir, #lang, #usemap, #longdesc {width:200px;}
#id, #title, #dir, #lang, #usemap, #longdesc {width:200px;}
+12 -12
View File
@@ -26,14 +26,15 @@
<legend>{#advimage_dlg.general}</legend>
<table class="properties">
<tr>
<td class="column1">&nbsp;</td>
<td align="left" id="srcbrowsercontainer">&nbsp;</td>
</tr>
<tr>
<td class="column1"><label id="srclabel" for="src">{#advimage_dlg.src}</label></td>
<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input name="src" type="text" id="src" value="" class="mceFocus" onchange="ImageDialog.showPreviewImage(this.value);" /></td>
<td id="srcbrowsercontainer">&nbsp;</td>
</tr>
</table></td>
<td>
<input name="src" type="text" id="src" value="" class="mceFocus" onchange="ImageDialog.showPreviewImage(this.value);" />
</td>
</tr>
<tr>
<td><label for="src_list">{#advimage_dlg.image_list}</label></td>
@@ -41,12 +42,8 @@
</tr>
<tr>
<td class="column1"><label id="altlabel" for="alt">{#advimage_dlg.alt}</label></td>
<td colspan="2"><input id="alt" name="alt" type="text" value="" /></td>
<td><input id="alt" name="alt" type="text" value="" /></td>
</tr>
<tr>
<td class="column1"><label id="titlelabel" for="title">{#advimage_dlg.title}</label></td>
<td colspan="2"><input id="title" name="title" type="text" value="" /></td>
</tr>
</table>
</fieldset>
@@ -179,11 +176,14 @@
<legend>{#advimage_dlg.misc}</legend>
<table border="0" cellpadding="4" cellspacing="0">
<tr>
<td class="column1"><label id="titlelabel" for="title">{#advimage_dlg.title}</label></td>
<td><input id="title" name="title" type="text" value="" /></td>
</tr>
<tr>
<td class="column1"><label id="idlabel" for="id">{#advimage_dlg.id}</label></td>
<td><input id="id" name="id" type="text" value="" /></td>
</tr>
<tr>
<td class="column1"><label id="dirlabel" for="dir">{#advimage_dlg.langdir}</label></td>
<td>
+1 -1
View File
@@ -12,7 +12,7 @@ Upgrade procedure:
2/ replace tiny_mce*.* files, themes/*, utils/* and plugins/*
(keep dragmath, moodlenolink, spellchecker)
3/ copy tinymce/jscripts/tiny_mce/classes/Popup.js to Popup.js
4/ apply strings & form_utils.js patch
4/ apply strings & form_utils.js & tinymce_plugin_advimage patches
5/ copy yuicompressor.jar from dev package into extra/tools/, use shell
script extra/tools/compress.sh to compress modified files
6/ download all TinyMCE lang files (extra/tools/download_langs.sh)