mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
"MDL-13766, adjust file picker UI"
This commit is contained in:
parent
fc926a6e5b
commit
70fbd90e15
1 changed files with 10 additions and 8 deletions
|
@ -906,6 +906,7 @@ function repository_check_context($ctx_id){
|
||||||
}
|
}
|
||||||
} elseif ($level == CONTEXT_SYSTEM) {
|
} elseif ($level == CONTEXT_SYSTEM) {
|
||||||
// it is always ok in system level
|
// it is always ok in system level
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1166,6 +1167,7 @@ function repository_get_client($context){
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.repo-list{list-style-type:none;padding:0}
|
.repo-list{list-style-type:none;padding:0}
|
||||||
.repo-list li{border-bottom:1px dotted gray;margin-bottom: 1em;}
|
.repo-list li{border-bottom:1px dotted gray;margin-bottom: 1em;}
|
||||||
|
.repo-name{display:block;padding: 3px;margin-bottom: 5px}
|
||||||
.paging{margin:10px 5px; clear:both;}
|
.paging{margin:10px 5px; clear:both;}
|
||||||
.paging a{padding: 4px;border: 1px solid #CCC}
|
.paging a{padding: 4px;border: 1px solid #CCC}
|
||||||
.repo-path{margin: 4px;border-bottom: 1px dotted gray;}
|
.repo-path{margin: 4px;border-bottom: 1px dotted gray;}
|
||||||
|
@ -1183,7 +1185,7 @@ p.upload a:hover {background: grey;color:white}
|
||||||
.grid p{margin:0;padding:0;background: #FFFFCC}
|
.grid p{margin:0;padding:0;background: #FFFFCC}
|
||||||
.grid .label{height:48px}
|
.grid .label{height:48px}
|
||||||
.grid span{background: #EEF9EB;color:gray}
|
.grid span{background: #EEF9EB;color:gray}
|
||||||
.repo-opt{font-size: 10px;}
|
.repo-opt a{font-size: 12px;background: #FFFFCC;padding: 0 3px}
|
||||||
#panel-$suffix{padding:0;margin:0; text-align:left;}
|
#panel-$suffix{padding:0;margin:0; text-align:left;}
|
||||||
#file-picker-$suffix{font-size:12px;}
|
#file-picker-$suffix{font-size:12px;}
|
||||||
#file-picker-$suffix strong{background:#FFFFCC}
|
#file-picker-$suffix strong{background:#FFFFCC}
|
||||||
|
@ -1237,7 +1239,6 @@ function _client(){
|
||||||
close: true,
|
close: true,
|
||||||
modal: true,
|
modal: true,
|
||||||
underlay: 'none',
|
underlay: 'none',
|
||||||
width: '510px',
|
|
||||||
zindex: 666666,
|
zindex: 666666,
|
||||||
xy: [50, Dom.getDocumentScrollTop()+20]
|
xy: [50, Dom.getDocumentScrollTop()+20]
|
||||||
});
|
});
|
||||||
|
@ -1248,11 +1249,11 @@ function _client(){
|
||||||
panel.beforeRenderEvent.subscribe(function() {
|
panel.beforeRenderEvent.subscribe(function() {
|
||||||
Event.onAvailable('layout-$suffix', function() {
|
Event.onAvailable('layout-$suffix', function() {
|
||||||
layout = new YAHOO.widget.Layout('layout-$suffix', {
|
layout = new YAHOO.widget.Layout('layout-$suffix', {
|
||||||
height: 400, width: 490,
|
height: 480, width: 630,
|
||||||
units: [
|
units: [
|
||||||
{position: 'top', height: 32, resize: false,
|
{position: 'top', height: 32, resize: false,
|
||||||
body:'<div class="yui-buttongroup" id="repo-viewbar-$suffix"></div>', gutter: '2'},
|
body:'<div class="yui-buttongroup" id="repo-viewbar-$suffix"></div>', gutter: '2'},
|
||||||
{position: 'left', width: 150, resize: true,
|
{position: 'left', width: 200, resize: true,
|
||||||
body:'<ul class="repo-list" id="repo-list-$suffix"></ul>', gutter: '0 5 0 2', minWidth: 150, maxWidth: 300 },
|
body:'<ul class="repo-list" id="repo-list-$suffix"></ul>', gutter: '0 5 0 2', minWidth: 150, maxWidth: 300 },
|
||||||
{position: 'center', body: '<div id="panel-$suffix"></div>',
|
{position: 'center', body: '<div id="panel-$suffix"></div>',
|
||||||
scroll: true, gutter: '0 2 0 0' }
|
scroll: true, gutter: '0 2 0 0' }
|
||||||
|
@ -1312,17 +1313,17 @@ function _client(){
|
||||||
icon.src = repo.icon;
|
icon.src = repo.icon;
|
||||||
icon.width = '16';
|
icon.width = '16';
|
||||||
icon.height = '16';
|
icon.height = '16';
|
||||||
li.appendChild(icon);
|
|
||||||
var link = document.createElement('a');
|
var link = document.createElement('a');
|
||||||
link.href = '###';
|
link.href = '###';
|
||||||
link.id = 'repo-call-$suffix-'+repo.id;
|
link.id = 'repo-call-$suffix-'+repo.id;
|
||||||
link.innerHTML = ' '+repo.name;
|
link.appendChild(icon);
|
||||||
link.className = 'repo-name';
|
link.className = 'repo-name';
|
||||||
link.onclick = function(){
|
link.onclick = function(){
|
||||||
var re = /repo-call-$suffix-(\d+)/i;
|
var re = /repo-call-$suffix-(\d+)/i;
|
||||||
var id = this.id.match(re);
|
var id = this.id.match(re);
|
||||||
repository_client_$suffix.req(id[1], '', 0);
|
repository_client_$suffix.req(id[1], '', 0);
|
||||||
}
|
}
|
||||||
|
link.innerHTML += ' '+repo.name;
|
||||||
li.appendChild(link);
|
li.appendChild(link);
|
||||||
var opt = document.createElement('div');
|
var opt = document.createElement('div');
|
||||||
opt.id = 'repo-opt-$suffix-'+repo.id;
|
opt.id = 'repo-opt-$suffix-'+repo.id;
|
||||||
|
@ -1734,6 +1735,7 @@ _client.callback = {
|
||||||
var oDiv = document.getElementById('repo-opt-$suffix-'
|
var oDiv = document.getElementById('repo-opt-$suffix-'
|
||||||
+_client.repositoryid);
|
+_client.repositoryid);
|
||||||
oDiv.innerHTML = '';
|
oDiv.innerHTML = '';
|
||||||
|
oDiv.className = "repo-opt";
|
||||||
var search = null;
|
var search = null;
|
||||||
var logout = null;
|
var logout = null;
|
||||||
var mgr = null;
|
var mgr = null;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue