Skip to content

Commit

Permalink
MDL-16597, tweak filemanager UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Dongsheng Cai committed May 19, 2010
1 parent 308d948 commit 1345cc5
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lang/en/moodle.php
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@
$string['mailadmins'] = 'Inform admins';
$string['mailstudents'] = 'Inform students';
$string['mailteachers'] = 'Inform teachers';
$string['makeafolder'] = 'Make a folder';
$string['makeafolder'] = 'Create folder';
$string['makeeditable'] = 'If you make \'{$a}\' editable by the web server process (eg apache) then you could edit this file directly from this page';
$string['makethismyhome'] = 'Make this my default home page';
$string['manageblocks'] = 'Blocks';
Expand Down
2 changes: 1 addition & 1 deletion lang/en/repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
$string['deleterepository'] = 'Delete this repository';
$string['disabled'] = 'Disabled';
$string['download'] = 'Download';
$string['downloadfolder'] = 'Download this folder';
$string['downloadfolder'] = 'Download all';
$string['downloadsucc'] = 'The file has been downloaded successfully';
$string['draftareanofiles'] = 'Cannot be downloaed because there is no files attached';
$string['editrepositoryinstance'] = 'Edit repository instance';
Expand Down
6 changes: 3 additions & 3 deletions lib/form/filemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ M.form_filemanager.init = function(Y, options) {
//}

html = html.replace('___fullname___', '<a href="'+url+'" id="'+fileid+'"><img src="'+list[i].icon+'" /> ' + fullname + '</a>');
html = html.replace('___action___', '<a style="display:none" href="###" id="'+action+'"><img alt="▶" src="'+M.cfg.wwwroot+'/pix/i/settings.gif'+'" /></a>');
html = html.replace('___action___', '<a href="###" id="'+action+'"><img alt="▶" src="'+M.cfg.wwwroot+'/pix/t/expanded.png'+'" /></a>');
html = '<li id="'+htmlid+'">'+html+'</li>';
listhtml += html;
}
Expand Down Expand Up @@ -407,8 +407,8 @@ M.form_filemanager.init = function(Y, options) {
var menu = Y.one('#'+obj[node.get('id')]);
menu.setStyle('display', 'none');
}
Y.on('mouseover', mouseover_menu, html_ids, this, html_data);
Y.on('mouseout', mouseout_menu, html_ids, this, html_data);
//Y.on('mouseover', mouseover_menu, html_ids, this, html_data);
//Y.on('mouseout', mouseout_menu, html_ids, this, html_data);
// click folder name
Y.on('click', this.enter_folder, foldername_ids, this, folder_data);
},
Expand Down
14 changes: 9 additions & 5 deletions lib/weblib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1630,7 +1630,7 @@ function replace_smilies(&$text) {
$alttext = get_string($image, 'pix');
if ($alttext === '') {
$alttext = $image;
}
}
$e[$lang][] = $emoticon;
$img[$lang][] = '<img alt="'. $alttext .'" width="15" height="15" src="'. $OUTPUT->pix_url('s/' . $image) . '" />';
}
Expand Down Expand Up @@ -2730,7 +2730,7 @@ function print_maintenance_message() {
* @return string
*/
function print_filemanager($options, $return = false) {
global $PAGE, $CFG;
global $PAGE, $CFG, $OUTPUT;
// start to setup filemanager
// loading filemanager language string
$PAGE->requires->string_for_js('loading', 'repository');
Expand Down Expand Up @@ -2772,21 +2772,25 @@ function print_filemanager($options, $return = false) {
} else {
$extra = '';
}
$icon_add_file = $OUTPUT->pix_icon('t/addfile', $straddfile).'';
$icon_add_folder = $OUTPUT->pix_icon('t/adddir', $strmakedir).'';
$icon_download = $OUTPUT->pix_icon('t/download', $strdownload).'';

$html .= <<<FMHTML
<div id="filemanager-wrapper-{$client_id}" style="display:none">
<div class="fm-breadcrumb" id="fm-path-{$client_id}"></div>
<div class="filemanager-toolbar">
<button id="btnadd-{$client_id}" onclick="return false">{$straddfile}</button>
<button id="btncrt-{$client_id}" onclick="return false">{$strmakedir}</button>
<button id="btndwn-{$client_id}" onclick="return false" {$extra}>{$strdownload}</button>
<button id="btnadd-{$client_id}" onclick="return false">{$icon_add_file} $straddfile</button>
<button id="btncrt-{$client_id}" onclick="return false">{$icon_add_folder} $strmakedir</button>
<button id="btndwn-{$client_id}" onclick="return false" {$extra}>{$icon_download} $strdownload</button>
</div>
<div class="filemanager-container" id="filemanager-{$client_id}">
<ul id="draftfiles-{$client_id}">
<li>Loading...</li>
</ul>
</div>
</div>
<div class='clearer'></div>
FMHTML;
// print out file entry template only one time
if (empty($CFG->filemanagertemplateloaded)) {
Expand Down
Binary file added pix/t/adddir.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pix/t/addfile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pix/t/download.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions theme/base/style/core.css
Original file line number Diff line number Diff line change
Expand Up @@ -500,12 +500,13 @@ body.tag .managelink {padding: 5px;}
.filemanager-toolbar a:hover {background: white;text-decoration: none;}
.fm-breadcrumb {margin:0;}
.filemanager-container {padding: 5px;margin: 6px 0;}
.filemanager-container ul{margin:0;padding:0;list-style-type:none;}
.filemanager-container li{clear:both;list-style-type:none;white-space:nowrap}
.filemanager-container ul{margin:0;padding:0;}
.filemanager-container ul li{white-space:nowrap;list-style-type:none;clear:both}
.filemanager-container ul li a{margin:1px;}
.filemanager-container ul li div.fm-file-name a:hover {margin:0;border: 1px solid #CCC; background: grey; color: white;}
#fm-move-div {margin: 6px;}
#fm-move-div strong{color:red;}
.fm-file-menu {width:18px;height:18px;float:left;}
.fm-file-menu img {width: 16px;}
.fm-file-name {float:left;}
.fm-file-entry{border: 1px solid red;}
.fm-operation {font-weight: bold;}
Expand Down Expand Up @@ -586,4 +587,4 @@ body.tag .managelink {padding: 5px;}
.smartselect.compactmenu .smartselect_submenu .smartselect_submenu {z-index: 1020;}
.smartselect.compactmenu .smartselect_submenuitem:hover > .smartselect_menuitem_label {font-weight:bold;}
.smartselect.compactmenu .smartselect_submenuitem {background-position:0.5em 3px;}
.smartselect.compactmenu .smartselect_submenuitem > a {padding-left:16px;}
.smartselect.compactmenu .smartselect_submenuitem > a {padding-left:16px;}

0 comments on commit 1345cc5

Please sign in to comment.