Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

created correct functionality for canceling and added the music direc…

…tory
  • Loading branch information...
commit b6dd9c37b5488e299c76a1cfcfae6ea2d9ce6e66 1 parent 01df90b
@robertjpetro authored
View
44 media/css/style.css
@@ -48,6 +48,7 @@ body {
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2B2D30', endColorstr='#000000',GradientType=0 );
}
#header{
+ border-bottom: 1px solid #000;
height: 49px;
width: 100%;
}
@@ -69,7 +70,7 @@ body {
padding: 20px 55px 15px 15px;
text-decoration: none;
}
- #nav li a:active, #merchandise #merch, #tour #tour{
+ #nav li a:active,#music #music, #merchandise #merch, #tour #tour{
background: #110F0F;
background: -moz-linear-gradient(top, #110F0F 0%, #1E2937 35%, #1D4769 99%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#110F0F), color-stop(35%,#1E2937), color-stop(99%,#1D4769));
@@ -164,6 +165,7 @@ body {
top:10px;
right:-10px;
width: 51px;
+ display: none;
}
#form-width{
margin: 0 auto;
@@ -171,9 +173,9 @@ body {
}
.modal-form{
background: #000;
- -moz-box-shadow: 0 1px 0 #919191;
- -webkit-box-shadow: 0 1px 0 #919191;
- box-shadow: 0 1px 0 #919191;
+ -moz-box-shadow: 0 1px 0 #2d2d2d;
+ -webkit-box-shadow: 0 1px 0 #2d2d2d;
+ box-shadow: 0 1px 0 #2d2d2d;
height: 500px;
margin: 10px 0;
position: relative;
@@ -248,36 +250,4 @@ body {
background: -moz-linear-gradient(top, #5388AD 0%, #6D92AA 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#5388AD), color-stop(100%,#6D92AA));
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5388AD', endColorstr='#6D92AA',GradientType=0 );
- }
-
-/* Colorbox styles */
-
-#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
-#cboxOverlay{position:fixed; width:100%; height:100%;}
-#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
-#cboxContent{position:relative; overflow:hidden;}
-#cboxLoadedContent{overflow:auto;}
-#cboxLoadedContent iframe{display:block; width:100%; height:100%; border:0;}
-#cboxTitle{margin:0;}
-#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
-#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
-
-#cboxOverlay{background:#000;}
-#colorbox{}
- #cboxContent{
- background:url(/media/images/modal-bg.png);
- -moz-box-shadow: inset 0 1px 0 #919191;
- -webkit-box-shadow: inset 0 1px 0 #919191;
- box-shadow: inset 0 1px 0 #919191;
- padding: 10px 10px 50px;
- }
- #cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;}
- #cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;}
- #cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;}
- #cboxPrevious{position:absolute; bottom:0; left:0px; background:url(/media/images/_plugins/colorbox/controls.png) no-repeat -75px 0px; width:25px; height:25px; text-indent:-9999px;}
- #cboxPrevious.hover{background-position:-75px -25px;}
- #cboxNext{position:absolute; bottom:0; left:27px; background:url(/media/images/_plugins/colorbox/controls.png) no-repeat -50px 0px; width:25px; height:25px; text-indent:-9999px;}
- #cboxNext.hover{background-position:-50px -25px;}
- #cboxLoadingOverlay{background:url(/media/images/_plugins/colorbox/loading_background.png) no-repeat center center;}
- #cboxLoadingGraphic{background:url(/media/images/_plugins/colorbox/loading.gif) no-repeat center center;}
- #cboxClose{display:none;}
+ }
View
BIN  media/images/bg4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  media/images/bg5.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
54 media/js/band.js
@@ -1,26 +1,21 @@
-// declare namespace variable //
+// declare namespace variable
var Bandcamp = {};
Bandcamp.admin = {
- // initialized admin functions //
+ // initialized admin functions
init: function ()
{
- // full screen background image. ensures cross browser and ipad orientation //
+ // full screen background image. ensures cross browser and ipad orientation
$.backstretch("/media/images/bg.jpg");
- // hide edit buttons to start
- $('.edit').hide();
-
// toggling the fade on edit button
- $('.item li').hover(function(){
- $(this).children('.edit').fadeIn(250);
- },function(){
- $(this).children('.edit').fadeOut(250);
+ $('.item li').live('hover',function(){
+ $(this).children('.edit').fadeToggle(250);
});
- // assigns click to both add and edit buttons. js uses class to decide final location ajax request
- $('.add, .edit').live('click', Bandcamp.admin.pages.filter);
+ // assigns click to add, edit and cancel buttons. js uses class to decide final location ajax request
+ $('.add, .edit, .cancel').live('click', Bandcamp.admin.pages.filter);
},
pages:
@@ -28,32 +23,51 @@ Bandcamp.admin = {
filter: function(event){
// gets class from click location to use as final desitnation
- var endLoc = $(event.target).attr('class')
+ var clickClass = $(event.target).attr('class'),
+ endLoc = clickClass;
+
+ // if the class is cancel it clears #main and pulls up the info from included main.htm for that directory
+ if(clickClass === 'cancel')
+ {
+ endLoc = 'main';
+ }
- // add button functionality based on body id //
+ // add button functionality based on body id
switch ($('body').attr('id'))
{
+ case "music":
+ var location = '/music/' + endLoc;
+ break;
+
case "merchandise":
var location = '/merch/' + endLoc;
break;
case "tour":
var location = '/tour/' + endLoc;
- break;
+ break;
default:
break;
}
- Bandcamp.admin.pages.renderPages(location);
+ Bandcamp.admin.pages.cleanUp(location);
},
- renderPages: function(loc){
-
+ cleanUp: function(loc){
+ // carrying the click location through this function
+ var location = loc;
+
+ // removes content from the main section
$('#main').fadeOut(function(){
$(this).empty();
});
-
+
+ Bandcamp.admin.pages.renderPages(location);
+ },
+
+ renderPages: function(loc){
+ // gets location from click and loads appropriate page
$.ajax({
url: loc,
success: function (data) {
@@ -67,7 +81,7 @@ Bandcamp.admin = {
}
};
-// initialize on document ready //
+// initialize on document ready
$(document).ready(function() {
Bandcamp.admin.init();
});
View
71 templates/bands/merch/index.htm
@@ -1,74 +1,7 @@
{% extends 'base.htm' %}
{% block body_id %}merchandise{% endblock %}
{% block content %}
- <div class="section">
- <h2>Apparel</h2>
- <a class="add">+</a>
- </div><!-- section -->
- <ul class="item">
- <li>
- <p class="title">Shirt Title</p>
- <p class="cost">$12</p>
- <p class="quantity">531 left</p>
- <img src="" />
- <a href="#" class="edit"></a>
- </li>
- <li>
- <p class="title">Shirt Title</p>
- <p class="cost">$12</p>
- <p class="quantity">531 left</p>
- <img src="" />
- <a href="#" class="edit"></a>
- </li>
- <li>
- <p class="title">Shirt Title</p>
- <p class="cost">$12</p>
- <p class="quantity">531 left</p>
- <img src="" />
- <a href="#" class="edit"></a>
- </li>
- <li>
- <p class="title">Shirt Title</p>
- <p class="cost">$12</p>
- <p class="quantity">531 left</p>
- <img src="" />
- <a href="#" class="edit"></a>
- </li>
- <li>
- <p class="title">Shirt Title</p>
- <p class="cost">$12</p>
- <p class="quantity">531 left</p>
- <img src="" />
- <a href="#" class="edit"></a>
- </li>
- <li>
- <p class="title">Shirt Title</p>
- <p class="cost">$12</p>
- <p class="quantity">531 left</p>
- <img src="" />
- <a href="#" class="edit"></a>
- </li>
- <li>
- <p class="title">Shirt Title</p>
- <p class="cost">$12</p>
- <p class="quantity">531 left</p>
- <img src="" />
- <a href="#" class="edit"></a>
- </li>
- </ul>
- <div class="section">
- <h2>Albums</h2>
- <a class="add">+</a>
- </div><!-- section -->
- <div class="zero-box">
- <p>You currently have no albums added to your inventory. Please use the + button in the upper right of this section to add your inventory.</p>
- </div><!-- zero-box -->
+
+ {% include 'bands/merch/main.htm' %}
- <div class="section">
- <h2>Stickers</h2>
- <a class="add">+</a>
- </div><!-- section -->
- <div class="zero-box">
- <p>You currently have no stickers added to your inventory. Please use the + button in the upper right of this section to add your inventory.</p>
- </div><!-- zero-box -->
{% endblock %}
View
70 templates/bands/merch/main.htm
@@ -0,0 +1,70 @@
+<div class="section">
+ <h2>Apparel</h2>
+ <a class="add">+</a>
+</div><!-- section -->
+<ul class="item">
+ <li>
+ <p class="title">Shirt Title</p>
+ <p class="cost">$12</p>
+ <p class="quantity">531 left</p>
+ <img src="" />
+ <a href="#" class="edit"></a>
+ </li>
+ <li>
+ <p class="title">Shirt Title</p>
+ <p class="cost">$12</p>
+ <p class="quantity">531 left</p>
+ <img src="" />
+ <a href="#" class="edit"></a>
+ </li>
+ <li>
+ <p class="title">Shirt Title</p>
+ <p class="cost">$12</p>
+ <p class="quantity">531 left</p>
+ <img src="" />
+ <a href="#" class="edit"></a>
+ </li>
+ <li>
+ <p class="title">Shirt Title</p>
+ <p class="cost">$12</p>
+ <p class="quantity">531 left</p>
+ <img src="" />
+ <a href="#" class="edit"></a>
+ </li>
+ <li>
+ <p class="title">Shirt Title</p>
+ <p class="cost">$12</p>
+ <p class="quantity">531 left</p>
+ <img src="" />
+ <a href="#" class="edit"></a>
+ </li>
+ <li>
+ <p class="title">Shirt Title</p>
+ <p class="cost">$12</p>
+ <p class="quantity">531 left</p>
+ <img src="" />
+ <a href="#" class="edit"></a>
+ </li>
+ <li>
+ <p class="title">Shirt Title</p>
+ <p class="cost">$12</p>
+ <p class="quantity">531 left</p>
+ <img src="" />
+ <a href="#" class="edit"></a>
+ </li>
+</ul>
+<div class="section">
+ <h2>Albums</h2>
+ <a class="add">+</a>
+</div><!-- section -->
+<div class="zero-box">
+ <p>You currently have no albums added to your inventory. Please use the + button in the upper right of this section to add your inventory.</p>
+</div><!-- zero-box -->
+
+<div class="section">
+ <h2>Stickers</h2>
+ <a class="add">+</a>
+</div><!-- section -->
+<div class="zero-box">
+ <p>You currently have no stickers added to your inventory. Please use the + button in the upper right of this section to add your inventory.</p>
+</div><!-- zero-box -->
View
28 templates/bands/music/add.htm
@@ -0,0 +1,28 @@
+<div id="form-width">
+ <div class="section">
+ <h2>Add Something</h2>
+ <a class="cancel" title="cancel">x</a>
+ </div>
+ <form id="add-form" class="modal-form">
+ <fieldset>
+ <label for="title">Title</label>
+ <sub>Give your item a name</sub>
+ <input type="text" name="title" />
+ <label for="quant">Quantity</label>
+ <sub>How many do you have</sub>
+ <input type="text" name="quant" />
+ <a href="#" class="special-link">Specify Sizes</a>
+ <label for="price">Price</label>
+ <sub>How much is each item</sub>
+ <input type="text" name="price" />
+ </fieldset>
+ <fieldset>
+ <label for="imageUp">Select Image</label>
+ <sub>Choose your image then crop it</sub>
+ <input type="text" name="imageUp" />
+ </fieldset>
+ <div class="action-buttons">
+ <a href="#">Add Item</a>
+ </div>
+ </form>
+</div><!-- form-width -->
View
28 templates/bands/music/edit.htm
@@ -0,0 +1,28 @@
+<div id="form-width">
+ <div class="section">
+ <h2>Edit Something</h2>
+ <a class="cancel" title="cancel">x</a>
+ </div>
+ <form id="add-form" class="modal-form">
+ <fieldset>
+ <label for="title">Title</label>
+ <sub>Give your item a name</sub>
+ <input type="text" name="title" />
+ <label for="quant">Quantity</label>
+ <sub>How many do you have</sub>
+ <input type="text" name="quant" />
+ <a href="#" class="special-link">Specify Sizes</a>
+ <label for="price">Price</label>
+ <sub>How much is each item</sub>
+ <input type="text" name="price" />
+ </fieldset>
+ <fieldset>
+ <label for="imageUp">Select Image</label>
+ <sub>Choose your image then crop it</sub>
+ <input type="text" name="imageUp" />
+ </fieldset>
+ <div class="action-buttons">
+ <a href="#">Add Item</a>
+ </div>
+ </form>
+</div><!-- form-width -->
View
7 templates/bands/music/index.htm
@@ -0,0 +1,7 @@
+{% extends 'base.htm' %}
+{% block body_id %}music{% endblock %}
+{% block content %}
+
+ {% include 'bands/music/main.htm' %}
+
+{% endblock %}
View
4 templates/bands/music/main.htm
@@ -0,0 +1,4 @@
+<div class="section">
+ <h2>Music</h2>
+ <a class="add">+</a>
+</div><!-- section -->
View
17 templates/bands/tour/index.htm
@@ -1,18 +1,7 @@
{% extends 'base.htm' %}
{% block body_id %}tour{% endblock %}
{% block content %}
- <div class="section">
- <h2>Tour History</h2>
- <a class="add">+</a>
- </div><!-- section -->
- <ul class="tour-item">
- <li>
- <p class="show-title">Show Title</p>
- <p class="location">some address</p>
- <p class="date-played">some date</p>
- <p class="contact-name">some contact name</p>
- <img src="" />
- <a href="#" class="hoverEdit"></a>
- </li>
- </ul>
+
+ {% include 'bands/tour/main.htm' %}
+
{% endblock %}
View
14 templates/bands/tour/main.htm
@@ -0,0 +1,14 @@
+<div class="section">
+ <h2>Tour History</h2>
+ <a class="add">+</a>
+</div><!-- section -->
+<ul class="tour-item">
+ <li>
+ <p class="show-title">Show Title</p>
+ <p class="location">some address</p>
+ <p class="date-played">some date</p>
+ <p class="contact-name">some contact name</p>
+ <img src="" />
+ <a href="#" class="hoverEdit"></a>
+ </li>
+</ul>
View
12 templates/base.htm
@@ -17,6 +17,7 @@
<ul id="nav">
{% if user.is_authenticated %}
<li><a id="home" href="/">Dashboard</a></li>
+ <li><a id="music" href="/music">Music</a></li>
<li><a id="merch" href="/merch">Merchandise</a></li>
<li><a id="tour" href="/tour">Tour History</a></li>
<li>
@@ -27,8 +28,13 @@
</ul>
</li>
{% else %}
- <li><a href="{% url login %}">Login</a></li>
- <li><a href="{% url register %}">Sign Up</a></li>
+ <li>
+ <a href="">Get Started</a>
+ <ul>
+ <li></li><a href="{% url login %}">Login</a></li>
+ <li><a href="{% url register %}">Sign Up</a></li>
+ </ul>
+ </li>
{% endif %}
</ul>
</div><!-- wrap -->
@@ -39,6 +45,8 @@
<div id="main">
{% block content %}
+ <!-- bring yo' shit in here -->
+
{% endblock %}
</div><!--main-->
</body>
View
6 urls.py
@@ -24,10 +24,16 @@
#Band
urlpatterns += patterns('bands.views',
(r'^$', direct_to_template, {'template': 'bands/index.htm'}, 'band_index'),
+ (r'^music/$', direct_to_template, {'template': 'bands/music/index.htm'}, 'band_merch'),
+ (r'^music/main/$', direct_to_template, {'template': 'bands/music/main.htm'}, 'band_merch'),
+ (r'^music/add/$', direct_to_template, {'template': 'bands/music/add.htm'}, 'band_merch'),
+ (r'^music/edit/$', direct_to_template, {'template': 'bands/music/edit.htm'}, 'band_merch'),
(r'^merch/$', direct_to_template, {'template': 'bands/merch/index.htm'}, 'band_merch'),
+ (r'^merch/main/$', direct_to_template, {'template': 'bands/merch/main.htm'}, 'band_merch'),
(r'^merch/add/$', direct_to_template, {'template': 'bands/merch/add.htm'}, 'band_merch'),
(r'^merch/edit/$', direct_to_template, {'template': 'bands/merch/edit.htm'}, 'band_merch'),
(r'^tour/$', direct_to_template, {'template': 'bands/tour/index.htm'}, 'band_tour'),
+ (r'^tour/main/$', direct_to_template, {'template': 'bands/tour/main.htm'}, 'band_tour'),
(r'^tour/add/$', direct_to_template, {'template': 'bands/tour/add.htm'}, 'band_tour'),
(r'^tour/edit/$', direct_to_template, {'template': 'bands/tour/edit.htm'}, 'band_tour'),
)
Please sign in to comment.
Something went wrong with that request. Please try again.