]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14741: following the commits in MDL-13766, we can remove the old filemanager...
authorscyrma <scyrma>
Thu, 31 Jul 2008 03:08:12 +0000 (03:08 +0000)
committerscyrma <scyrma>
Thu, 31 Jul 2008 03:08:12 +0000 (03:08 +0000)
lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/editor_plugin.js [deleted file]
lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/editor_plugin_src.js [deleted file]
lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/img/browse.gif [deleted file]
lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/img/link.gif [deleted file]
lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/js/moodlelink.js [deleted file]
lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/langs/en_dlg.js [deleted file]
lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/link.php [deleted file]

diff --git a/lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/editor_plugin.js b/lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/editor_plugin.js
deleted file mode 100644 (file)
index bb41b19..0000000
+++ /dev/null
@@ -1 +0,0 @@
-(function(){tinymce.create('tinymce.plugins.MoodleLinkPlugin',{init:function(ed,url){course_id=tinyMCE.activeEditor.getParam('moodleimage_course_id');ed.addCommand('mceMoodleLink',function(){ed.windowManager.open({file:url+'/link.php?id='+course_id,width:600+ed.getLang('example.delta_width',0),height:500+ed.getLang('example.delta_height',0),inline:1},{plugin_url:url,some_custom_arg:'custom arg'});});ed.addButton('moodlelink',{title:'Insert Link',cmd:'mceMoodleLink',image:url+'/img/link.gif'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('moodlelink',n.nodeName=='IMG');});},createControl:function(n,cm){return null;},getInfo:function(){return{longname:'Moodle Link plugin',author:'Glen Davies',authorurl:'http://www.canterbury.ac.nz',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example',version:"1.0"};}});tinymce.PluginManager.add('moodlelink',tinymce.plugins.MoodleLinkPlugin);})();
\ No newline at end of file
diff --git a/lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/editor_plugin_src.js b/lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/editor_plugin_src.js
deleted file mode 100644 (file)
index 194d93a..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-(function() {\r
-       // Load plugin specific language pack\r
-       //tinymce.PluginManager.requireLangPack('example');\r
-\r
-       tinymce.create('tinymce.plugins.MoodleLinkPlugin', {\r
-               /**\r
-                * Initializes the plugin, this will be executed after the plugin has been created.\r
-                * This call is done before the editor instance has finished it's initialization so use the onInit event\r
-                * of the editor instance to intercept that event.\r
-                *\r
-                * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.\r
-                * @param {string} url Absolute URL to where the plugin is located.\r
-                */\r
-               init : function(ed, url) {\r
-                       // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');\r
-                       course_id = tinyMCE.activeEditor.getParam('moodleimage_course_id');\r
-                       ed.addCommand('mceMoodleLink', function() {\r
-                               ed.windowManager.open({\r
-                                       \r
-                                       file : url + '/link.php?id=' + course_id,\r
-                                       //file : '/moodle/lib/editor/htmlarea/popups/insert_image.php?id=' + course_id,\r
-                                       width : 600 + ed.getLang('example.delta_width', 0),\r
-                                       height : 500 + ed.getLang('example.delta_height', 0),\r
-                                       inline : 1\r
-                               }, {\r
-                                       plugin_url : url, // Plugin absolute URL\r
-                                       some_custom_arg : 'custom arg' // Custom argument\r
-                               });\r
-                       });\r
-\r
-                       // Register example button\r
-                       ed.addButton('moodlelink', {\r
-                               title : 'Insert Link',\r
-                               cmd : 'mceMoodleLink',\r
-                               image : url + '/img/link.gif'\r
-                       });\r
-                       \r
-\r
-                       // Add a node change handler, selects the button in the UI when a image is selected\r
-                       ed.onNodeChange.add(function(ed, cm, n) {\r
-                               cm.setActive('moodlelink', n.nodeName == 'IMG');\r
-                       });\r
-               },\r
-\r
-               /**\r
-                * Creates control instances based in the incomming name. This method is normally not\r
-                * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons\r
-                * but you sometimes need to create more complex controls like listboxes, split buttons etc then this\r
-                * method can be used to create those.\r
-                *\r
-                * @param {String} n Name of the control to create.\r
-                * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control.\r
-                * @return {tinymce.ui.Control} New control instance or null if no control was created.\r
-                */\r
-               createControl : function(n, cm) {\r
-                       return null;\r
-               },\r
-\r
-               /**\r
-                * Returns information about the plugin as a name/value array.\r
-                * The current keys are longname, author, authorurl, infourl and version.\r
-                *\r
-                * @return {Object} Name/value array containing information about the plugin.\r
-                */\r
-               getInfo : function() {\r
-                       return {\r
-                               longname : 'Moodle Link plugin',\r
-                               author : 'Glen Davies',\r
-                               authorurl : 'http://www.canterbury.ac.nz',\r
-                               infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example',\r
-                               version : "1.0"\r
-                       };\r
-               }\r
-       });\r
-\r
-       // Register plugin\r
-       tinymce.PluginManager.add('moodlelink', tinymce.plugins.MoodleLinkPlugin);\r
-})();
\ No newline at end of file
diff --git a/lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/img/browse.gif b/lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/img/browse.gif
deleted file mode 100644 (file)
index 30fda6f..0000000
Binary files a/lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/img/browse.gif and /dev/null differ
diff --git a/lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/img/link.gif b/lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/img/link.gif
deleted file mode 100644 (file)
index 76fd537..0000000
Binary files a/lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/img/link.gif and /dev/null differ
diff --git a/lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/js/moodlelink.js b/lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/js/moodlelink.js
deleted file mode 100644 (file)
index aa8befb..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-tinyMCEPopup.requireLangPack();\r
-\r
-var MoodleLinkDialog = {\r
-               init : function(ed) {\r
-               var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode();\r
-               tinyMCEPopup.resizeToInnerSize();\r
-                               \r
-       },\r
-\r
-       insert : function(file, title) {\r
-               var ed = tinyMCEPopup.editor, t = this, f = document.forms[0];\r
-\r
-               if (f.f_url.value === '') {\r
-                       ed.dom.remove(ed.selection.getNode());\r
-                       ed.execCommand('mceRepaint');\r
-                       tinyMCEPopup.close();\r
-                       return;\r
-               }\r
-\r
-               if (tinyMCEPopup.getParam("accessibility_warnings", 1)) {\r
-                       if (!f.f_alt.value) {\r
-                               tinyMCEPopup.editor.windowManager.confirm(tinyMCEPopup.getLang('moodleimage_dlg.missing_alt'), function(s) {\r
-                                       if (s)\r
-                                               t.insertAndClose();\r
-                               });\r
-\r
-                               return;\r
-                       }\r
-               }\r
-\r
-               t.insertAndClose();\r
-       },\r
-\r
-       insertAndClose : function() {\r
-               var ed = tinyMCEPopup.editor, f = document.forms[0], nl = f.elements, v, args = {}, el;\r
-\r
-               // Fixes crash in Safari\r
-               if (tinymce.isWebKit)\r
-                       ed.getWin().focus();\r
-\r
-               tinymce.extend(args, {\r
-                       src : nl.f_url.value,\r
-                       width : nl.f_width.value,\r
-                       height : nl.f_height.value,\r
-                       alt : nl.f_alt.value,\r
-                       vspace : nl.f_vert.value,\r
-                   hspace : nl.f_horiz.value,\r
-                       border : nl.f_border.value,\r
-                       align : getSelectValue(f, 'f_align')\r
-               });\r
-\r
-               el = ed.selection.getNode();\r
-\r
-               if (el && el.nodeName == 'IMG') {\r
-                       ed.dom.setAttribs(el, args);\r
-               } else {\r
-                       ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" src="javascript:;" />');\r
-                       ed.dom.setAttribs('__mce_tmp', args);\r
-                       ed.dom.setAttrib('__mce_tmp', 'id', '');\r
-               }\r
-\r
-               tinyMCEPopup.close();\r
-       } \r
-\r
-       \r
-\r
-       \r
-};\r
-\r
-\r
-tinyMCEPopup.onInit.add(MoodleLinkDialog.init, MoodleLinkDialog);\r
diff --git a/lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/langs/en_dlg.js b/lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/langs/en_dlg.js
deleted file mode 100644 (file)
index 87937b4..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-tinyMCE.addI18n('en.moodlelink_dlg',{\r
-title:"Choose file to link"\r
-});
\ No newline at end of file
diff --git a/lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/link.php b/lib/editor/tinymce/jscripts/tiny_mce/plugins/moodlelink/link.php
deleted file mode 100644 (file)
index e36cac5..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-<?php // $Id$\r
-    require("../../../../../../../config.php");\r
-\r
-    $id = optional_param('id', SITEID, PARAM_INT);\r
-\r
-    require_course_login($id);\r
-    @header('Content-Type: text/html; charset=utf-8');\r
-?>\r
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\r
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
-<html>\r
-<head>\r
-<title><?php print_string("insertlink","editor");?></title>\r
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
-\r
-<script type="text/javascript" src="../../tiny_mce_popup.js"></script>\r
-<script type="text/javascript" src="js/moodlelink.js"></script>\r
-<script type="text/javascript">\r
-var FileBrowserDialogue = {\r
-    init : function () {\r
-        // Here goes your code for setting your custom things onLoad.\r
-    },\r
-    mySubmit : function (link_url) {\r
-        //call this function only after page has loaded\r
-        //otherwise tinyMCEPopup.close will close the\r
-        //"Insert/Edit Image" or "Insert/Edit Link" window instead\r
-\r
-       //var URL = document.my_form.my_field.value;\r
-       var win = tinyMCEPopup.getWindowArg("window");\r
-\r
-       // insert information now\r
-       win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = link_url;\r
-\r
-       // for image browsers: update image dimensions\r
-       if (win.getImageData) win.getImageData();\r
-\r
-       // close popup window\r
-       tinyMCEPopup.close();\r
-    }\r
-}\r
-\r
-tinyMCEPopup.onInit.add(FileBrowserDialogue.init, FileBrowserDialogue);\r
-\r
-\r
-//<![CDATA[\r
-\r
-function checkvalue(elm,formname) {\r
-    var el = document.getElementById(elm);\r
-    if(!el.value) {\r
-        alert("Nothing to do!");\r
-        el.focus();\r
-        return false;\r
-    }\r
-}\r
-\r
-function submit_form(dothis) {\r
-    if(dothis == "delete") {\r
-        window.fbrowser.document.dirform.action.value = "delete";\r
-    }\r
-    if(dothis == "move") {\r
-        window.fbrowser.document.dirform.action.value = "move";\r
-    }\r
-    if(dothis == "zip") {\r
-        window.fbrowser.document.dirform.action.value = "zip";\r
-    }\r
-\r
-    window.fbrowser.document.dirform.submit();\r
-    return false;\r
-}\r
-//]]>\r
-</script>\r
-<style type="text/css">\r
-html, body {\r
-margin: 2px;\r
-background-color: #F0F0EE;\r
-font-size: 11px;\r
-}\r
-.title {\r
-background-color: #ddddff;\r
-padding: 5px;\r
-border-bottom: 1px solid black;\r
-font-family: Tahoma, sans-serif;\r
-font-weight: bold;\r
-font-size: 14px;\r
-color: black;\r
-}\r
-td, input, select, button {\r
-font-family: Tahoma, Verdana, sans-serif;\r
-font-size: 11px;\r
-}\r
-button { width: 70px; }\r
-.space { padding: 2px; }\r
-form { margin-bottom: 0px; margin-top: 0px; }\r
-</style>\r
-\r
-</head>\r
-<body>\r
-  <table width="450" border="0" cellspacing="0" cellpadding="2">\r
-    <tr>\r
-      <td width="450" valign="top"><fieldset>\r
-        <legend><?php\r
-        if(has_capability('moodle/course:managefiles', get_context_instance(CONTEXT_COURSE, $id))) {\r
-            print_string("filebrowser","editor");\r
-        } else {\r
-            print "";\r
-        }?></legend>\r
-\r
-        <div class="space"></div>\r
-        <?php print(has_capability('moodle/course:managefiles', get_context_instance(CONTEXT_COURSE, $id)))?\r
-        "<iframe id=\"fbrowser\" name=\"fbrowser\" src=\"../../../../coursefiles.php?id=".$id."\" width=\"420\" height=\"180\"></iframe>":\r
-        ""; ?>\r
-        <p>\r
-        </p>\r
-        <div class="space"></div>\r
-        </fieldset>&nbsp;</td>\r
-    </tr>\r
-  </table>\r
-  <table width="100%" border="0" cellpadding="0" cellspacing="0">\r
-  <tr>\r
-  <td>\r
-    <table border="0" cellpadding="2" cellspacing="0">\r
-          <tr><td><?php print_string("selection","editor");?>: </td>\r
-          <td><form id="idelete">\r
-          <input name="btnDelete" type="submit" id="btnDelete" value="<?php print_string("delete","editor");?>" onclick="return submit_form('delete');" /></form></td>\r
-          <td><form  id="imove">\r
-          <input name="btnMove" type="submit" id="btnMove" value="<?php print_string("move","editor");?>" onclick="return submit_form('move');" /></form></td>\r
-          <td><form id="izip">\r
-          <input name="btnZip" type="submit" id="btnZip" value="<?php print_string("zip","editor");?>" onclick="return submit_form('zip');" /></form></td>\r
-          <td><form id="irename" method="post" action="../../../../coursefiles.php" target="fbrowser">\r
-          <input type="hidden" name="id" value="<?php print($id);?>" />\r
-          <input type="hidden" name="wdir" value="" />\r
-          <input type="hidden" name="file" value="" />\r
-          <input type="hidden" name="action" value="rename" />\r
-          <input type="hidden" name="sesskey" value="<?php p($USER->sesskey) ?>" />\r
-          <input name="btnRename" type="submit" id="btnRename" value="<?php print_string("rename","editor");?>" /></form></td>\r
-          </tr>\r
-    </table>\r
-  </td>\r
-  <td>\r
-    <button type="button" name="close" onclick="tinyMCEPopup.close();"><?php print_string("close","editor");?></button>
-  </td>\r
-  </tr>\r
-  </table>\r
-    <table border="0" cellpadding="1" cellspacing="1">\r
-    <tr>\r
-      <td height="22"><?php\r
-      if(has_capability('moodle/course:managefiles', get_context_instance(CONTEXT_COURSE, $id))) { ?>\r
-          <form id="cfolder" action="../../../../coursefiles.php" method="post" target="fbrowser">\r
-          <input type="hidden" name="id" value="<?php print($id);?>" />\r
-          <input type="hidden" name="wdir" value="" />\r
-          <input type="hidden" name="action" value="mkdir" />\r
-          <input type="hidden" name="sesskey" value="<?php p($USER->sesskey) ?>" />\r
-          <input name="name" type="text" id="foldername" size="35" />\r
-          <input name="btnCfolder" type="submit" id="btnCfolder" value="<?php print_string("createfolder","editor");?>" onclick="return checkvalue('foldername','cfolder');" />\r
-          </form>\r
-          <form action="../../../../coursefiles.php?id=<?php print($id);?>" method="post" enctype="multipart/form-data" target="fbrowser" id="uploader">\r
-          <input type="hidden" name="MAX_FILE_SIZE" value="<?php print($upload_max_filesize);?>" />\r
-          <input type="hidden" name="id" VALUE="<?php print($id);?>" />\r
-          <input type="hidden" name="wdir" value="" />\r
-          <input type="hidden" name="action" value="upload" />\r
-          <input type="hidden" name="sesskey" value="<?php p($USER->sesskey) ?>" />\r
-          <input type="file" name="userfile" id="userfile" size="35" />\r
-          <input name="save" type="submit" id="save" onclick="return checkvalue('userfile','uploader');" value="<?php print_string("upload","editor");?>" />\r
-          </form>\r
-          <?php\r
-          } else {\r
-              print "";\r
-          } ?>\r
-          </td>\r
-    </tr>\r
-  </table>\r
-<p>&nbsp;</p>\r
-</body>\r
-</html>\r