w
clone your own copy | download snapshot

Snapshots | iceberg

No images in this repository’s iceberg at this time

Inside this repository

main.js
application/javascript

Download raw (858 bytes)

;
window.W = window.W || {};


;
(function(undefined) {
    'use strict';

    Marionette.TemplateCache.prototype.compileTemplate = function compileTemplate(rawTemplate, options) {
        return W.extendedTemplate(rawTemplate, options);
    }

    Marionette.setRenderer(Marionette.TemplateCache.render);


    $.ajaxSetup({
        beforeSend: function(xhr, settings) {
            if (!W.utils.csrfSafeMethod(settings.type) && !this.crossDomain) {
                var csrftoken = W.utils.getCookie('csrftoken');
                xhr.setRequestHeader("X-CSRFToken", csrftoken);
            }
        }
    });


    // Declares the namespace to Django Relational
    Backbone.Relational.store.addModelScope(W);


    W.config = W.config || {};
    W.config.lang = W.utils.getUserLanguage();

    var scoreApp = new W.ScoreApp();
    scoreApp.start();
})();