MDL-31901: Change the UI in filepicker CSS rendered and images

This commit is contained in:
Barbara Ramiro 2012-05-02 15:35:50 +08:00 committed by Marina Glancy
parent e709ddd29c
commit e88d564186
13 changed files with 177 additions and 84 deletions

View file

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