Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added some pages changed js to help modals

  • Loading branch information...
commit ff1c7ab2c348aa5e51bef3639a2b9936c652b91a 1 parent 97a248e
Robert Petro authored March 12, 2011
32  media/js/band.js
@@ -18,13 +18,31 @@ Bandcamp.admin = {
18 18
             $(this).children('.hoverEdit').fadeOut(250);
19 19
         });
20 20
         
21  
-        // launch add modal //
22  
-        $('.add').click(function(){
23  
-            $.colorbox({
24  
-                overlayClose: "false",
25  
-                href:"/merch/add"
26  
-            });
27  
-        });
  21
+        // add button functionality based on body id //
  22
+        switch ($('body').attr('id')) 
  23
+        {
  24
+            // If shirts is the category being built insert this html //
  25
+            case "merchandise":
  26
+                // launch add modal //
  27
+                 $('.add').click(function(){
  28
+                     $.colorbox({
  29
+                         overlayClose: "false",
  30
+                         href:"/merch/add"
  31
+                     });
  32
+                 });
  33
+                break;
  34
+            case "tour":
  35
+                $('.add').click(function(){
  36
+                     $.colorbox({
  37
+                         overlayClose: "false",
  38
+                         href:"/tour/add"
  39
+                     });
  40
+                 });
  41
+                break;        
  42
+            default:
  43
+                break;
  44
+        }
  45
+        
28 46
 	}
29 47
 	
30 48
 };
4  templates/base.htm
@@ -17,8 +17,8 @@
17 17
                 <ul id="nav">
18 18
                 {% if user.is_authenticated %}
19 19
                     <li><a id="home" href="/">Dashboard</a></li>
20  
-                    <li><a id="merch" href="merchandise.html">Merchandise</a></li>
21  
-                    <li><a id="tour" href="tour.html">Tour History</a></li>
  20
+                    <li><a id="merch" href="/merch">Merchandise</a></li>
  21
+                    <li><a id="tour" href="/tour">Tour History</a></li>
22 22
                     <li>
23 23
                         <a href="#">Account</a>
24 24
                         <ul>
4  urls.py
@@ -23,6 +23,10 @@
23 23
         (r'^$', direct_to_template, {'template': 'bands/index.htm'}, 'band_index'),
24 24
         (r'^merch/$', direct_to_template, {'template': 'bands/merch/index.htm'}, 'band_merch'),
25 25
         (r'^merch/add/$', direct_to_template, {'template': 'bands/merch/add.htm'}, 'band_merch'),
  26
+        (r'^merch/edit/$', direct_to_template, {'template': 'bands/merch/edit.htm'}, 'band_merch'),
  27
+        (r'^tour/$', direct_to_template, {'template': 'bands/tour/index.htm'}, 'band_tour'),
  28
+        (r'^tour/add/$', direct_to_template, {'template': 'bands/tour/add.htm'}, 'band_tour'),
  29
+        (r'^tour/edit/$', direct_to_template, {'template': 'bands/tour/edit.htm'}, 'band_tour'),
26 30
 )
27 31
 #Accounts
28 32
 urlpatterns += patterns('accounts.views',

0 notes on commit ff1c7ab

Please sign in to comment.
Something went wrong with that request. Please try again.