Permalink
Browse files

Merge pull request #906 from holmberd/master

Added $.afui.showMask() timeout_max parameter
  • Loading branch information...
2 parents 1e68f43 + c13caee commit 62ba6c0b1afab5078279b85381b5ee49a370d2d0 @imaffett imaffett committed Mar 28, 2016
Showing with 96 additions and 87 deletions.
  1. +7 −5 build/appframework.ui.js
  2. +72 −72 build/appframework.ui.min.js
  3. +7 −4 docs/af.ui.json
  4. +4 −2 docs/af.ui/$.afui.showMask.md
  5. +6 −4 src/af.ui.js
@@ -1,4 +1,4 @@
-/*! intel-appframework - v3.0.0 - 2016-03-24 */
+/*! intel-appframework - v3.0.0 - 2016-03-26 */
/**
* af.shim.js
@@ -929,19 +929,20 @@ window.af=window.jq=jQuery;
* @param {string=} text
* @title $.afui.showMask(text);
*/
- showMask: function(text) {
+ showMask: function(text, value) {
if (!text) text = this.loadingText || "";
+ if (!value || typeof value !== "number") timeout = 15000;
$.query("#afui_mask>h1").html(text);
$.query("#afui_mask").show();
this.showingMask = true;
var self = this;
- //set another timeout to auto-hide the mask if something goes wrong after 15 secs
+ //set another timeout to auto-hide the mask if something goes wrong, default is 15 sec
setTimeout(function() {
if(self.showingMask) {
self.hideMask();
}
- }, 15000);
+ }, value);
},
/**
* Hide the loading mask
@@ -1315,7 +1316,8 @@ window.af=window.jq=jQuery;
tmpActive.classList.remove("active");
}
- $(hide).trigger("panelunload", [back]);
+ //fix #903
+ //$(hide).trigger("panelunload", [back]);
}
else{
if(noTrans){
Oops, something went wrong.

0 comments on commit 62ba6c0

Please sign in to comment.