48 lines
1.3 KiB
JavaScript
48 lines
1.3 KiB
JavaScript
//= require jquery
|
|
//= require jquery_ujs
|
|
//= require jquery-ui
|
|
//= require jquery.ui.datepicker-en
|
|
//= require jquery.ui.datepicker-nl
|
|
// require bootstrap-transition
|
|
// require bootstrap-affix
|
|
// require bootstrap-alert
|
|
// require bootstrap-button
|
|
// require bootstrap-carousel
|
|
// require bootstrap-collapse
|
|
// require bootstrap-dropdown
|
|
// require bootstrap-modal
|
|
// require bootstrap-scrollspy
|
|
// require bootstrap-tab
|
|
// require bootstrap-tooltip
|
|
// require bootstrap-popover
|
|
// require bootstrap-typeahead
|
|
//= require bootstrap
|
|
//= require mustache
|
|
//= require faye
|
|
//= require supplier/base
|
|
//= require qwaiter
|
|
//= require_directory .
|
|
//= require_self
|
|
//= require moment
|
|
var Qstorage = localStorage;
|
|
String.prototype.capitalize = function() {
|
|
return this.charAt(0).toUpperCase() + this.slice(1);
|
|
}
|
|
var path_mapping = {
|
|
user_root: '/user',
|
|
join_occupied_table: '/user/join_occupied_table',
|
|
list_products_for_table: '/user/list_products_for_table',
|
|
list_products: '/user/list_products'
|
|
}
|
|
function redirect_to(mapping, variables){
|
|
variables || (variables = {});
|
|
var vars = []
|
|
for(var name in variables){
|
|
vars.push(name + '=' +variables[name])
|
|
}
|
|
window.location = path_mapping[mapping] + '?' + vars.join('&')
|
|
}
|
|
function currency(num) {
|
|
return Qwaiter.currency(num);
|
|
}
|