summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-11-19 18:44:57 -0500
committerJules Laplace <jules@okfoc.us>2015-11-19 18:44:57 -0500
commit39b395f28ed7eb0d24eef6b2e50a3a235af0b31e (patch)
tree0ab7e4f99e08a4efb5bda62888bfb92312f4b5a7 /StoneIsland/www/js
parentee15de014ecfc780c8bd86e00eb8b24bf6149db9 (diff)
some js for orders view
Diffstat (limited to 'StoneIsland/www/js')
-rw-r--r--StoneIsland/www/js/lib/account/OrdersView.js25
-rw-r--r--StoneIsland/www/js/lib/account/orders/OrderList.js17
-rw-r--r--StoneIsland/www/js/lib/account/orders/SingleOrder.js18
-rw-r--r--StoneIsland/www/js/lib/auth/LoginView.js (renamed from StoneIsland/www/js/lib/account/LoginView.js)0
-rw-r--r--StoneIsland/www/js/lib/auth/LogoutView.js (renamed from StoneIsland/www/js/lib/account/LogoutView.js)0
-rw-r--r--StoneIsland/www/js/lib/auth/SignupView.js (renamed from StoneIsland/www/js/lib/account/SignupView.js)0
6 files changed, 59 insertions, 1 deletions
diff --git a/StoneIsland/www/js/lib/account/OrdersView.js b/StoneIsland/www/js/lib/account/OrdersView.js
index f269b7cf..66648b36 100644
--- a/StoneIsland/www/js/lib/account/OrdersView.js
+++ b/StoneIsland/www/js/lib/account/OrdersView.js
@@ -1,4 +1,27 @@
-var OrdersView = ScrollableView.extend({
+var OrdersView = View.extend({
+ el: "#orders",
+
+ events: {
+ "click .back": "back"
+ "click .details": "load_single"
+ },
+
+ initialize: function(){
+ this.single = new SingleOrder ()
+ this.list = new OrderList ()
+ },
+
+ show: function(){
+ document.body.className = "orders"
+ this.el.className = "list"
+ },
+
+ load_single: function(){
+ },
+
+ back: function(){
+ this.list.show()
+ },
})
diff --git a/StoneIsland/www/js/lib/account/orders/OrderList.js b/StoneIsland/www/js/lib/account/orders/OrderList.js
new file mode 100644
index 00000000..876f609e
--- /dev/null
+++ b/StoneIsland/www/js/lib/account/orders/OrderList.js
@@ -0,0 +1,17 @@
+var OrderList = ScrollableView.extend({
+
+ el: "#order_list",
+
+ template: $("#order_list .template"),
+
+ initialize: function(opt){
+ this.parent = opt.parent
+ this.scroller = new IScroll('#order_list', app.iscroll_options)
+ },
+
+ show: function(){
+ document.body.className = "orders"
+ app.orders.el.className = "list"
+ },
+
+})
diff --git a/StoneIsland/www/js/lib/account/orders/SingleOrder.js b/StoneIsland/www/js/lib/account/orders/SingleOrder.js
new file mode 100644
index 00000000..21416401
--- /dev/null
+++ b/StoneIsland/www/js/lib/account/orders/SingleOrder.js
@@ -0,0 +1,18 @@
+var SingleOrder = ScrollableView.extend({
+
+ el: "#single_order",
+
+ template: $("#single_order .template"),
+
+ initialize: function(opt){
+ this.parent = opt.parent
+ this.scroller = new IScroll('#single_order', app.iscroll_options)
+ },
+
+ show: function(id){
+ document.body.className = "orders"
+ app.orders.el.className = "single"
+ this.deferScrollToTop()
+ },
+
+})
diff --git a/StoneIsland/www/js/lib/account/LoginView.js b/StoneIsland/www/js/lib/auth/LoginView.js
index 8c875ae8..8c875ae8 100644
--- a/StoneIsland/www/js/lib/account/LoginView.js
+++ b/StoneIsland/www/js/lib/auth/LoginView.js
diff --git a/StoneIsland/www/js/lib/account/LogoutView.js b/StoneIsland/www/js/lib/auth/LogoutView.js
index 62c925eb..62c925eb 100644
--- a/StoneIsland/www/js/lib/account/LogoutView.js
+++ b/StoneIsland/www/js/lib/auth/LogoutView.js
diff --git a/StoneIsland/www/js/lib/account/SignupView.js b/StoneIsland/www/js/lib/auth/SignupView.js
index 123b47a6..123b47a6 100644
--- a/StoneIsland/www/js/lib/account/SignupView.js
+++ b/StoneIsland/www/js/lib/auth/SignupView.js