diff options
| -rw-r--r-- | StoneIsland/www/index.html | 15 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/cart/CartView.js | 3 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/products/GalleryView.js | 33 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/products/ProductView.js | 26 |
4 files changed, 54 insertions, 23 deletions
diff --git a/StoneIsland/www/index.html b/StoneIsland/www/index.html index e25396b0..25220af4 100644 --- a/StoneIsland/www/index.html +++ b/StoneIsland/www/index.html @@ -143,10 +143,16 @@ <div id="product"> <div class="scroll"> - <span class="left"></span> - <span class="right"></span> - <div class="gallery"> - <img src=""> + <div id="gallery"> + <span class="left"></span> + <span class="right"></span> + <div class="slider"> + <script type="text/html" class="template"> + <div class="item"> + <img src="{{image}}"> + </div> + </script> + </div> </div> <div class="content"> <h2><b class="num"></b><span class="title"></h2> @@ -360,6 +366,7 @@ <script src="js/lib/products/CollectionView.js"></script> <script src="js/lib/products/ProductView.js"></script> +<script src="js/lib/products/GalleryView.js"></script> <script src="js/lib/products/Selector.js"></script> <script src="js/lib/blogs/BlogView.js"></script> diff --git a/StoneIsland/www/js/lib/cart/CartView.js b/StoneIsland/www/js/lib/cart/CartView.js index f958f716..5d741492 100644 --- a/StoneIsland/www/js/lib/cart/CartView.js +++ b/StoneIsland/www/js/lib/cart/CartView.js @@ -6,6 +6,9 @@ var CartView = View.extend({ }, initialize: function(){ + this.summary = new CartSummary () + this.billing = new CartBilling () + this.shipping = new CartShipping () }, show: function(){ diff --git a/StoneIsland/www/js/lib/products/GalleryView.js b/StoneIsland/www/js/lib/products/GalleryView.js new file mode 100644 index 00000000..2eabe2a6 --- /dev/null +++ b/StoneIsland/www/js/lib/products/GalleryView.js @@ -0,0 +1,33 @@ +var GalleryView = View.extend({ + + el: "#gallery", + + events: { + "click .left": "prev", + "click .right": "next", + "touchstart .gallery": "touchstart", + "touchmove .gallery": "touchmove", + "touchend .gallery": "touchend", + }, + + initialize: function(){ + this.$prev = this.$(".prev") + this.$next = this.$(".next") + this.$slider = this.$(".slider") + }, + + populate: function(){ + }, + + prev: function(){ + }, + next: function(){ + }, + touchstart: function(e){ + }, + touchmove: function(e){ + }, + touchend: function(e){ + }, + +})
\ No newline at end of file diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js index 94d43508..e87fa398 100644 --- a/StoneIsland/www/js/lib/products/ProductView.js +++ b/StoneIsland/www/js/lib/products/ProductView.js @@ -13,17 +13,14 @@ var ProductView = View.extend({ el: "#product", events: { - "click .left": "prev", - "click .right": "next", - "touchstart .gallery": "touchstart", - "touchmove .gallery": "touchmove", - "touchend .gallery": "touchend", - "click .size": "select_size", - "click .color": "select_color", - "click .share": "share", + "click .size": "select_size", + "click .color": "select_color", + "click .share": "share", }, initialize: function(){ + this.gallery = new GalleryView () + this.$num = this.$(".num") this.$title = this.$(".title") this.$type = this.$(".type") @@ -36,6 +33,8 @@ var ProductView = View.extend({ show: function(){ document.body.className = "product" }, + hide: function(){ + }, item: null, size: null, @@ -103,17 +102,6 @@ var ProductView = View.extend({ share: function(){ }, - prev: function(){ - }, - next: function(){ - }, - touchstart: function(e){ - }, - touchmove: function(e){ - }, - end: function(e){ - }, - }) |
