mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-31901: Change the UI in filepicker CSS rendered and images
This commit is contained in:
parent
e709ddd29c
commit
e88d564186
13 changed files with 177 additions and 84 deletions
|
@ -1117,23 +1117,14 @@ M.core_filepicker.init = function(Y, options) {
|
|||
centered : true,
|
||||
modal : true,
|
||||
visible : false,
|
||||
minWidth : this.fpnode.getStylePx('minWidth'),
|
||||
minHeight : this.fpnode.getStylePx('minHeight'),
|
||||
maxWidth : this.fpnode.getStylePx('maxWidth'),
|
||||
maxHeight : this.fpnode.getStylePx('maxHeight'),
|
||||
render : true
|
||||
});
|
||||
// allow to move the panel dragging it by it's header:
|
||||
this.mainui.plug(Y.Plugin.Drag,{handles:['.yui3-widget-hd']});
|
||||
// Check if CSS for the node sets min-max width/height and therefore if panel shall be resizable:
|
||||
var resizeconstraints = {
|
||||
minWidth: this.fpnode.getStylePx('minWidth')?this.fpnode.getStylePx('minWidth'):this.fpnode.getStylePx('width'),
|
||||
minHeight: this.fpnode.getStylePx('minHeight')?this.fpnode.getStylePx('minHeight'):this.fpnode.getStylePx('height'),
|
||||
maxWidth: this.fpnode.getStylePx('maxWidth')?this.fpnode.getStylePx('maxWidth'):this.fpnode.getStylePx('width'),
|
||||
maxHeight: this.fpnode.getStylePx('maxHeight')?this.fpnode.getStylePx('maxHeight'):this.fpnode.getStylePx('height'),
|
||||
preserveRatio: false
|
||||
};
|
||||
if (resizeconstraints.minWidth < resizeconstraints.maxWidth ||
|
||||
resizeconstraints.minHeight < resizeconstraints.maxHeight) {
|
||||
this.mainui.plug(Y.Plugin.Resize)
|
||||
this.mainui.resize.plug(Y.Plugin.ResizeConstrained, resizeconstraints);
|
||||
}
|
||||
this.mainui.show();
|
||||
// create panel for selecting a file (initially hidden)
|
||||
this.selectui = new Y.Panel({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue