working ember... again

This commit is contained in:
2013-10-07 23:00:01 +02:00
parent a8c01d264e
commit 2f41560591
46 changed files with 274 additions and 114 deletions
+1 -1
View File
@@ -17,6 +17,7 @@ html lang="en"
link href="/images/apple-touch-icon.png" rel="apple-touch-icon-precomposed"
link href="/favicon.ico" rel="shortcut icon"
= render 'suppliers/application/head'
= javascript_include_tag "supplier/application"
= yield :head
body
@@ -75,7 +76,6 @@ html lang="en"
.row
.span12
#app
= javascript_include_tag "supplier/application"
script#alert-template[type="text/html"]= mustache_template 'supplier/alert'
= yield :footer
javascript:
+2 -17
View File
@@ -1,25 +1,10 @@
- content_for :head do
= javascript_include_tag 'supplier/app/application'
.pull-right
= select_tag('current_section_selector', options_for_select([[current_supplier.name, '']] + current_supplier.sections.map{|s| ["- #{s.title}", s.id]}, params[:section_id]), id: :section_selector)
a.icon-arrow-right.go-to-tables-view.hide href=tables_view_suppliers_section_path('0000')
/= render template: 'supplier/active_lists'
/= render template: 'supplier/active_orders'
- content_for :footer do
javascript:
$(function(){
$('#section_selector').change(function(){
Qsupplier.load_active_orders();
Qsupplier.load_active_lists();
var el = $(this);
var linker = $(this).siblings('a');
if(el.val()){
linker.show();
linker.attr('href', linker.attr('href').replace(/\/[^\/]+\/tables_view/, '/'+el.val()+'/tables_view'));
//linker.attr('href', linker.attr('href').replace(/\/[^\/]+(\.html?)$/, '/'+el.val()+'$1'));
}else{
linker.hide();
}
}).change();
Qsupplier.load_active_orders()
Qsupplier.load_active_lists()
Qsupplier.watch_events();
});
+1 -1
View File
@@ -14,7 +14,7 @@
tbody
- @sections.each do |section|
tr
td.link= link_to section.title, [:tables_view, :suppliers, section]
td.link= link_to section.title, [:suppliers, section]
td.table-info
span.table-count= section.tables.size
span.active-table-count= (@active_table_ids & section.tables.map(&:id)).size
@@ -1,4 +1,6 @@
- model_class = Section
- content_for :head do
= javascript_include_tag 'supplier/app/application'
.page-header
h1 data-t='section.show.title'
dl.dl-horizontal.show-list
@@ -1,5 +1,7 @@
- model_class = Section
- content_for :row do
- content_for :head do
= javascript_include_tag 'supplier/app/application'
/- content_for :row do
.span12.section-title= @section.title
.span12
.well.section-tables-container.section-tables-active
@@ -13,7 +15,7 @@
span.needs_payment.icon-flag
span.needs_help.icon-bell
span.active_order.icon-glass
#section-table-menu-container.hide
/#section-table-menu-container.hide
- @tables.each do |table|
.section-table-menu-content class="section-table-menu-#{table.id} section-table-list-#{table.active_list_id}"
button.btn.btn-info.list-is-helped.hide Question answered!
+1 -1
View File
@@ -22,7 +22,7 @@ div.page-header= title :index, model_class
tr
td.link= link_to table.number, [:suppliers, table]
td.link= link_to_if table.section.present?, table.section.try(:title), tables_view_suppliers_section_path(table.section)
td.timestamp data-time=table.created_at.utc.iso8601
td.timestamp data-time=table.created_at.try(:utc).try(:iso8601)
td.actions
= link_to t('helpers.links.edit'), [:edit, :suppliers, table], class: 'btn btn-mini', data: {t: 'helpers.links.edit'}
'