src/myams/resources/js/myams.js
changeset 39 fed67f169e1c
parent 36 f090c62de817
child 43 84a34175f37c
equal deleted inserted replaced
38:ea9f341ed53b 39:fed67f169e1c
     1 /*
     1 /*
     2  * MyAMS
     2  * MyAMS
     3  * « My Application Management Skin »
     3  * « My Application Management Skin »
     4  *
     4  *
     5  * Version: 0.1.47 (rev. 1)
     5  * Version: 0.1.48 (rev. 1)
     6  * A bootstrap based application/administration skin
     6  * A bootstrap based application/administration skin
     7  *
     7  *
     8  * Custom administration and application skin tools
     8  * Custom administration and application skin tools
     9  * Released under Zope Public License ZPL 1.1
     9  * Released under Zope Public License ZPL 1.1
    10  * ©2014-2020 Thierry Florac <tflorac@ulthar.net>
    10  * ©2014-2020 Thierry Florac <tflorac@ulthar.net>
   447 				.text('@import "' + ams.getSource(url) + '";');
   447 				.text('@import "' + ams.getSource(url) + '";');
   448 			if (callback) {
   448 			if (callback) {
   449 				var styleInterval = setInterval(function () {
   449 				var styleInterval = setInterval(function () {
   450 					try {
   450 					try {
   451 						var _check = style[0].sheet.cssRules;  // Is only populated when file is loaded
   451 						var _check = style[0].sheet.cssRules;  // Is only populated when file is loaded
       
   452 						clearInterval(styleInterval);
   452 						callback.call(window, true, options);
   453 						callback.call(window, true, options);
   453 						clearInterval(styleInterval);
       
   454 					} catch (e) {
   454 					} catch (e) {
   455 						// CSS is not loaded yet...
   455 						// CSS is not loaded yet...
   456 					}
   456 					}
   457 				}, 10);
   457 				}, 10);
   458 			}
   458 			}