use mustache to abstract out html logic in javascript
This commit is contained in:
@@ -17,7 +17,7 @@ html lang="en"
|
||||
link href="/images/apple-touch-icon.png" rel="apple-touch-icon-precomposed"
|
||||
link href="/favicon.ico" rel="shortcut icon"
|
||||
javascript:
|
||||
var data_host = '#{Rails.env == 'development' ? 'http://localhost:3000' : 'http://data.qwaiter.com' }';
|
||||
var data_host = '#{Rails.env == 'development' ? 'http://qwaiter.dev' : 'http://data.qwaiter.com' }';
|
||||
//var data_host = 'http://localhost:3000';
|
||||
//data_host = 'http://192.168.1.148:3000';
|
||||
var $locale = 'en';
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
tr
|
||||
td colspan=2 = slider_image
|
||||
tfoot
|
||||
script#active-list-orders-template[type="text/html"]= render 'active_list_orders.mustache'
|
||||
script#active-list-orders-footer-template[type="text/html"]= render 'active_list_orders_footer.mustache'
|
||||
- content_for :footer do
|
||||
javascript:
|
||||
jQuery(function(){
|
||||
|
||||
@@ -11,23 +11,10 @@
|
||||
tbody
|
||||
tr
|
||||
td= slider_image
|
||||
table#active-order-table.table.hide
|
||||
thead
|
||||
tr
|
||||
th data-t="models.product"= Product.model_name.human
|
||||
th #
|
||||
th.currency data-t="basket.total"= t('user.basket.total')
|
||||
th
|
||||
tbody
|
||||
tfoot
|
||||
tr
|
||||
td colspan=2
|
||||
button class="btn btn-primary" onClick="Quser.handle_active_list(function(){Quser.order_selected_products()})" data-t="selected_products.order"= t('selected_products.order')
|
||||
|
|
||||
button class="btn btn btn-warning" onClick="Quser.clear_selected_products()" data-t="selected_products.clear"= t('selected_products.clear')
|
||||
td.currency
|
||||
strong#active-order-total
|
||||
td
|
||||
#active-order-container
|
||||
script#products-category-template[type="text/html"]= render 'products_category.mustache'
|
||||
script#products-category-for-order-template[type="text/html"]= render 'products_category_for_order.mustache'
|
||||
script#active-order-template[type="text/html"]= render 'active_order.mustache'
|
||||
- content_for :footer do
|
||||
javascript:
|
||||
jQuery(function(){
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
td.currency
|
||||
strong#active-order-total
|
||||
td
|
||||
script#products-category-template[type="text/html"]= render 'products_category.mustache'
|
||||
script#products-category-for-order-template[type="text/html"]= render 'products_category_for_order.mustache'
|
||||
- content_for :footer do
|
||||
javascript:
|
||||
jQuery(function(){
|
||||
|
||||
Reference in New Issue
Block a user