]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-16597, trim filemanager UI"
authordongsheng <dongsheng>
Thu, 24 Sep 2009 09:05:41 +0000 (09:05 +0000)
committerdongsheng <dongsheng>
Thu, 24 Sep 2009 09:05:41 +0000 (09:05 +0000)
lang/en_utf8/moodle.php
lib/form/filemanager.js
lib/form/filemanager.php
mod/resource/mod_form.php
theme/standard/styles_layout.css

index d114b3451579d160be7d365d43176974827b0fb7..97d4ad16600098430e601c57a75789a06a3509fa 100644 (file)
@@ -1235,6 +1235,7 @@ $string['passwordsenttext'] = '<p>An email has been sent to your address at $a->
    <p><b>Please check your email for your new password</b></p>
    <p>The new password was automatically generated, so you might like to
    <a href=\"$a->link\">change it to something easier to remember</a>.</p>';
+$string['path'] = 'Path';
 $string['pathnotexists'] = 'Path doesn\'t exist in your server!';
 $string['pathslasherror'] = 'Path can\'t end with a slash!!';
 $string['paymentinstant'] = 'Use the button below to pay and be enrolled within minutes!';
@@ -1424,6 +1425,8 @@ $string['selectall'] = 'Select all';
 $string['selectdefault'] = 'Select default';
 $string['selectamodule'] = 'Please select an activity module';
 $string['selectednowmove'] = '$a files selected for moving. Now go into the destination folder and press \'Move files to here\'';
+$string['selectedfile'] = 'Selected file';
+$string['selectfiles'] = 'Select files';
 $string['selectnos'] = 'Select all \'no\'';
 $string['selectperiod'] = 'Select period';
 $string['senddetails'] = 'Send my details via email';
index a14995cdee40763d7f588755ba1c0688ef2911c1..c0403a4ed6ed5ea5196acdfde335509fbf687e7c 100644 (file)
@@ -118,7 +118,7 @@ function html_compiler(client_id, options) {
             var sep = document.createElement('SPAN');
             sep.innerHTML = ' ▶ ';
             if (count==0) {
-                sep.innerHTML = 'Path: ';
+                sep.innerHTML = mstr.moodle.path + ': ';
             } else {
                 sep.innerHTML = ' ▶ ';
             }
index 7a824080d9c277687ea8761e30f90fef8b34d193..35e1b90f4360963f5879b9ed75a761337fbef1fc 100644 (file)
@@ -50,8 +50,6 @@ class MoodleQuickForm_filemanager extends HTML_QuickForm_element {
         if (!empty($options['maxbytes'])) {
             $this->_options['maxbytes'] = get_max_upload_file_size($CFG->maxbytes, $options['maxbytes']);
         }
-        // XXX: hide element lable
-        $elementLabel = '';
         parent::HTML_QuickForm_element($elementName, $elementLabel, $attributes);
 
         repository_head_setup();
@@ -170,6 +168,7 @@ class MoodleQuickForm_filemanager extends HTML_QuickForm_element {
         $PAGE->requires->string_for_js('confirmdeletefile', 'repository');
         $PAGE->requires->string_for_js('nopathselected', 'repository');
         $PAGE->requires->string_for_js('popupblockeddownload', 'repository');
+        $PAGE->requires->string_for_js('path', 'moodle');
 
         if (empty($draftitemid)) {
             // no existing area info provided - let's use fresh new draft area
index 33a86461ceca4ed5927c9de9ddf9ae01cb008f67..4976370d34ee495ad6a16c992f22c458e0f629d1 100644 (file)
@@ -58,11 +58,11 @@ class mod_resource_mod_form extends moodleform_mod {
         $mform->addElement('header', 'contentsection', get_string('contentheader', 'resource'));
         $mainfile = 'mainfile';
 
-        $options = array('mainfile'=>$mainfile, 'subdirs'=>0, 'maxbytes'=>0, 'maxfiles'=>-1, 'filetypes'=>'*', 'returnvalue'=>'*');
+        $options = array('mainfile'=>$mainfile, 'subdirs'=>0, 'maxbytes'=>0, 'maxfiles'=>-1, 'filetypes'=>'*', 'returnvalue'=>'ref_id');
 
         $mform->addElement('hidden', $mainfile, '', array('id'=>$mainfile.'-id'));
-        $mform->addElement('static', '', 'Main file', '<div id="'.$mainfile.'-label"></div>');
-        $mform->addElement('filemanager', 'files', get_string('file'), null, $options);
+        $mform->addElement('filemanager', 'files', get_string('selectfiles'), null, $options);
+        $mform->addElement('static', '', get_string('selectedfile'), '<div id="'.$mainfile.'-label"></div>');
 
         //-------------------------------------------------------
         $mform->addElement('header', 'optionssection', get_string('optionsheader', 'resource'));
index 886efde2d1ed94ea650c10e38d814d40fe424f68..a0cddcf5bb41c96b6ee4f9d76397de6efca1b584 100644 (file)
@@ -5855,7 +5855,7 @@ wikiadminactions {
     background: #CCC;
 }
 .fm-breadcrumb {
-    margin: 6px 0;
+    margin: 0;
 }
 .filemanager-container {
     padding: 5px;