Commits

powersurge360 committed bb5f1a5

Commiting the router.js file updates.

Comments (0)

Files changed (2)

groupGo/apps/organizations/templates/organizations/map.html

 {% extends "layouts/base.html" %}
 
+{% block extra_js %}
+<script data-main="{{ STATIC_URL }}js/app/router.js" src="{{ STATIC_URL }}js/bower_components/requirejs/require.js"></script>
+{% endblock %}
+
 {% block title %}
 Organization Map
 {% endblock %}

groupGo/staticfiles/js/app/router.js

+requirejs.config({
+    "baseUrl": "/static/js/bower_components",
+    "paths": {
+        "app": "../app",
+        "backbone": "backbone/backbone-min",
+        "jquery": "jquery/jquery.min",
+        "underscore": "underscore/underscore-min"
+    },
+    "shim": {
+        "underscore": {
+            "exports": "_"
+        },
+        "backbone": {
+            "dep": ["underscore", "jquery"],
+            "exports": "Backbone"
+        }
+    }
+});
+
+require(["backbone", "jquery", "underscore"], function(Backbone, $, _) {
+    alert("Hello world!");
+});