Make section table view work request and event based

This commit is contained in:
2013-03-10 12:48:03 +01:00
parent cc13797f5a
commit 5eac918255
11 changed files with 164 additions and 38 deletions
@@ -4,8 +4,10 @@
.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}
- for table in Table.enrich_active_list_id(@section.tables)
.section-table.hide[
class="section-table-list-#{table.active_list_id}" 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
@@ -24,5 +26,6 @@
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);
//setInterval("Qsupplier.update_section_tables_view('#{@section.id}')", 7500);
Qsupplier.watch_events();
});