MDL-33423 filepicker: Fixed visibility problem with loading icon

This commit is contained in:
Sam Hemelryk 2012-06-19 16:49:28 +12:00
parent 2e7ce603ff
commit 9d7d2b03c8
2 changed files with 3 additions and 2 deletions

View File

@ -1194,7 +1194,7 @@ M.core_filepicker.init = function(Y, options) {
}
// Prepare the root node we will set content for and the loading template we want to display as a YUI node.
var root = this.fpnode.one('.fp-content');
var content = Y.Node.create(M.core_filepicker.templates.loading).setStyle('visibility', 'hidden').setStyle('opacity', 0);
var content = Y.Node.create(M.core_filepicker.templates.loading).addClass('fp-content-hidden').setStyle('opacity', 0);
var count = 0;
// Initiate an interval, we will have a count which will increment every 100 milliseconds.
// Count 0 - the loading icon will have visibility set to hidden (invisible) and have an opacity of 0 (invisible also)
@ -1207,7 +1207,7 @@ M.core_filepicker.init = function(Y, options) {
return true;
}
if (count == 5) {
content.setStyle('visibility', 'visible');
content.removeClass('fp-content-hidden');
} else if (count > 5) {
var opacity = parseFloat(content.getStyle('opacity'));
content.setStyle('opacity', opacity + 0.1);

View File

@ -10,6 +10,7 @@
.filemanager input[type="text"], .file-picker input[type="text"] {border: 1px solid #BBBBBB;width: 265px;height: 18px;padding: 1px 6px;}
.filemanager select, .file-picker select {height: 22px;padding: 2px 1px;}
.fp-content-center {height: 100%;width: 100%;display:table-cell;vertical-align: middle;}
.fp-content-hidden {visibility: hidden;}
/*
* Dialogue (File Picker and File Manager)