1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-24 09:55:33 +02:00

"MDL-16597, trim filemanager UI"

This commit is contained in:
dongsheng 2009-09-24 09:05:41 +00:00
parent b3f00cba49
commit 22f6b8df6e
5 changed files with 9 additions and 7 deletions
lang/en_utf8
lib/form
mod/resource
theme/standard

@ -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';

@ -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 = ' ▶ ';
}

@ -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

@ -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'));

@ -5855,7 +5855,7 @@ wikiadminactions {
background: #CCC;
}
.fm-breadcrumb {
margin: 6px 0;
margin: 0;
}
.filemanager-container {
padding: 5px;