src/js/utils.js
branchnew-model
changeset 887 6a04bd37da0a
parent 882 61c384dda19e
child 906 4b6e154ae8de
equal deleted inserted replaced
884:10233337f6da 887:6a04bd37da0a
    14     if (typeof IriSP.libFiles.inDefaultDir[lib] == "string") {
    14     if (typeof IriSP.libFiles.inDefaultDir[lib] == "string") {
    15         return IriSP.libFiles.defaultDir + '/' + IriSP.libFiles.inDefaultDir[lib];
    15         return IriSP.libFiles.defaultDir + '/' + IriSP.libFiles.inDefaultDir[lib];
    16     }
    16     }
    17 }
    17 }
    18 
    18 
       
    19 IriSP._cssCache = [];
       
    20 
    19 IriSP.loadCss = function(_cssFile) {
    21 IriSP.loadCss = function(_cssFile) {
    20     IriSP.jQuery("<link>", {
    22     if (IriSP._(IriSP._cssCache).indexOf(_cssFile) === -1) {
    21         rel : "stylesheet",
    23         IriSP.jQuery("<link>", {
    22         type : "text/css",
    24             rel : "stylesheet",
    23         href : _cssFile
    25             type : "text/css",
    24     }).appendTo('head');
    26             href : _cssFile
       
    27         }).appendTo('head');
       
    28         IriSP._cssCache.push(_cssFile);
       
    29     }
    25 }
    30 }
       
    31 
       
    32 IriSP.log = function() {
       
    33     if (typeof console !== "undefined" && typeof IriSP.logging !== "undefined" && IriSP.logging) {
       
    34         console.log.apply(console, arguments);
       
    35     }
       
    36 }