--- a/src/js/utils.js Mon May 07 15:25:52 2012 +0200
+++ b/src/js/utils.js Thu May 10 18:48:09 2012 +0200
@@ -16,10 +16,21 @@
}
}
+IriSP._cssCache = [];
+
IriSP.loadCss = function(_cssFile) {
- IriSP.jQuery("<link>", {
- rel : "stylesheet",
- type : "text/css",
- href : _cssFile
- }).appendTo('head');
-}
\ No newline at end of file
+ if (IriSP._(IriSP._cssCache).indexOf(_cssFile) === -1) {
+ IriSP.jQuery("<link>", {
+ rel : "stylesheet",
+ type : "text/css",
+ href : _cssFile
+ }).appendTo('head');
+ IriSP._cssCache.push(_cssFile);
+ }
+}
+
+IriSP.log = function() {
+ if (typeof console !== "undefined" && typeof IriSP.logging !== "undefined" && IriSP.logging) {
+ console.log.apply(console, arguments);
+ }
+}