working ember... again
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user