~ubuntu-branches/ubuntu/trusty/yelp-xsl/trusty

« back to all changes in this revision

Viewing changes to js/jquery.syntax.js

  • Committer: Package Import Robot
  • Author(s): Michael Biebl
  • Date: 2012-03-27 17:47:06 UTC
  • mfrom: (1.3.1) (11.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20120327174706-d1dkjncgvr5g0cu4
Tags: 3.4.0-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
        this.loading[name] = null;
69
69
 
70
70
        if (!resource) {
71
 
                alert("Could not load resource named " + name);
 
71
                alert("ResourceLoader: Could not load resource named " + name);
72
72
        } else {
73
73
                for (var i = 0; i < loading.length; i += 1) {
74
74
                        loading[i](resource);
108
108
        root: null, 
109
109
        aliases: {},
110
110
        styles: {},
 
111
        themes: {},
111
112
        lib: {},
112
113
        defaultOptions: {
113
114
                cacheScripts: true,
114
 
                cacheStyleSheets: true
 
115
                cacheStyleSheets: true,
 
116
                theme: "base"
115
117
        },
116
118
        
117
119
        brushes: new ResourceLoader(function (name, callback) {
170
172
        
171
173
        getResource: function (prefix, name, callback) {
172
174
                var basename = prefix + "." + name;
 
175
                var styles = this.styles[basename];
173
176
                
174
 
                if (this.styles[basename]) {
175
 
                        this.getStyles(this.root + this.styles[basename]);
 
177
                if (styles) {
 
178
                        for (var i = 0; i < styles.length; i += 1) {
 
179
                                this.getStyles(this.root + styles[i]);
 
180
                        }
176
181
                }
177
182
                
178
183
                Syntax.getScript(this.root + basename + '.js', callback);
256
261
        },
257
262
        
258
263
        log: function() {
259
 
                if (console && console.log) {
 
264
                if (typeof(console) != "undefined" && console.log) {
260
265
                        console.log.apply(console, arguments);
261
 
                } else {
262
 
                        alert(arguments.join(" "));
 
266
                } else if (window.console && window.console.log) {
 
267
                        window.console.log.apply(window.console, arguments);
263
268
                }
264
269
        }
265
270
};