mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-46860-master' of git://github.com/ryanwyllie/moodle
This commit is contained in:
commit
01fdb048cf
@ -1299,18 +1299,26 @@ M.core_filepicker.init = function(Y, options) {
|
||||
var client_id = this.options.client_id;
|
||||
var fpid = "filepicker-"+ client_id;
|
||||
var labelid = 'fp-dialog-label_'+ client_id;
|
||||
var width = 873;
|
||||
var draggable = true;
|
||||
this.fpnode = Y.Node.createWithFilesSkin(M.core_filepicker.templates.generallayout).
|
||||
set('id', 'filepicker-'+client_id).set('aria-labelledby', labelid);
|
||||
|
||||
if (this.in_iframe()) {
|
||||
width = Math.floor(window.innerWidth * 0.95);
|
||||
draggable = false;
|
||||
}
|
||||
|
||||
this.mainui = new M.core.dialogue({
|
||||
extraClasses : ['filepicker'],
|
||||
draggable : true,
|
||||
draggable : draggable,
|
||||
bodyContent : this.fpnode,
|
||||
headerContent: '<h3 id="'+ labelid +'">'+ M.util.get_string('filepicker', 'repository') +'</h3>',
|
||||
centered : true,
|
||||
modal : true,
|
||||
visible : false,
|
||||
width : '873px',
|
||||
responsiveWidth : 873,
|
||||
width : width+'px',
|
||||
responsiveWidth : 768,
|
||||
height : '558px',
|
||||
zIndex : this.options.zIndex
|
||||
});
|
||||
@ -1947,6 +1955,10 @@ M.core_filepicker.init = function(Y, options) {
|
||||
M.util.set_user_preference('filepicker_' + name, value);
|
||||
this.options.userprefs[name] = value;
|
||||
}
|
||||
},
|
||||
in_iframe: function () {
|
||||
// If we're not the top window then we're in an iFrame
|
||||
return window.self !== window.top;
|
||||
}
|
||||
});
|
||||
var loading = Y.one('#filepicker-loading-'+options.client_id);
|
||||
|
@ -461,9 +461,9 @@ a.ygtvspacer:hover {color:transparent;text-decoration:none;}
|
||||
/**
|
||||
* Responsive styles for the filepicker
|
||||
*/
|
||||
@media (max-width:873px) {
|
||||
@media (max-width:767px) {
|
||||
.file-picker .fp-repo-area {width:100%;height:auto;max-height:220px;y-scroll:auto;float:none;border:0px;}
|
||||
.file-picker .fp-repo-items {width:100%;float:none;}
|
||||
.file-picker .fp-repo-items {width:100%;float:none;margin-left:0;}
|
||||
.file-picker .fp-login-form .fp-login-input .label {text-align:left;}
|
||||
.dir-rtl .file-picker .fp-login-form .fp-login-input .label {text-align:right;}
|
||||
.file-picker .fp-content form td {display:block;width:100%;text-align:left;}
|
||||
|
@ -52,7 +52,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 873px) {
|
||||
@media (max-width: 767px) {
|
||||
.file-picker .fp-repo-area {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
@ -64,6 +64,7 @@
|
||||
.file-picker .fp-repo-items {
|
||||
width: 100%;
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
.file-picker .fp-login-form .fp-login-input label {
|
||||
text-align: left;
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user