Files
mozo-backend/app/views/suppliers/sections/tables_view.html.slim
T
2013-03-09 14:18:21 +01:00

29 lines
1.5 KiB
Plaintext

- model_class = Section
- content_for :row do
.span12.section-title= @section.title
.span12
.well.section-tables-container.section-tables-active
.section-manage-tables.pull-right= link_to content_tag(:span, '', class: 'icon-pencil'), manage_tables_suppliers_section_path(@section), class: 'btn btn-mini'
- for table in @section.tables
.section-table.hide{ id="section-table-#{table.id}" data-position-x=table.position_x data-position-y=table.position_y data-table-id=table.id}
.table-number = link_to table.number, suppliers_table_path(table)
.status-icons
span.needs_payment.icon-flag
span.needs_help.icon-bell
span.active_order.icon-glass
- content_for :footer do
javascript:
var current_section_id = '#{@section.id}';
var current_section_width = #{@section.width};
var current_section_height = #{@section.height};
$(function(){
var active_section_container = $('.section-tables-active')
active_section_container.css('width', active_section_container.width()); // break fluid layout
active_section_container.css('height', #{@section.height/@section.width}*active_section_container.width());
active_section_container.find('.section-table').each(function(){
Qsupplier.position_table_in_active_section(active_section_container, $(this), false);
});
Qsupplier.update_section_tables_view('#{@section.id}');
setInterval("Qsupplier.update_section_tables_view('#{@section.id}')", 7500);
});