diff --git a/Gemfile.lock b/Gemfile.lock index 4fc9ad23..af3287fb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: git://github.com/bterkuile/cmtool.git - revision: 02e60c174da507348c5c268ea7d2a18e5e61c080 + revision: 3aa204aa303c7c0579a00cf0b638e5e733ff8319 branch: master specs: cmtool (2.0.0) diff --git a/app/assets/javascripts/supplier/app/.ctrlp b/app/assets/javascripts/supplier/app/.ctrlp deleted file mode 100644 index e69de29b..00000000 diff --git a/app/assets/javascripts/supplier/app/adapters/application.js.coffee b/app/assets/javascripts/supplier/app/adapters/application.js.coffee deleted file mode 100644 index 6c229db7..00000000 --- a/app/assets/javascripts/supplier/app/adapters/application.js.coffee +++ /dev/null @@ -1,27 +0,0 @@ -#App.ApplicationAdapter = DS.ActiveModelAdapter.extend -# namespace: 'supplier' -# headers: -# "Accept": "application/json, text/javascript; q=0.01" -App.ApplicationAdapter = DS.JSONAPIAdapter.extend - namespace: 'supplier' - pathForType: (type)-> - type.underscore().pluralize() - # Code for createRecord and updateRecord taken from ember data v2.0.0 restadapter - createRecord: (store, type, snapshot)-> - data = {} - #var serializer = store.serializerFor(type.modelName); - serializer = Ember.get(snapshot.record, 'store').serializerFor('creation') - url = @buildURL(type.modelName, null, snapshot, 'createRecord') - - serializer.serializeIntoHash data, type, snapshot, includeId: true - - @ajax url, "POST", data: data - - updateRecord: (store, type, snapshot)-> - data = {} - #var serializer = store.serializerFor(type.modelName); - serializer = Ember.get(snapshot.record, 'store').serializerFor('creation') - id = snapshot.id - url = @buildURL(type.modelName, id, snapshot, 'updateRecord') - serializer.serializeIntoHash data, type, snapshot, includeId: true - @ajax url, "PUT", data: data diff --git a/app/assets/javascripts/supplier/app/app.js.coffee b/app/assets/javascripts/supplier/app/app.js.coffee deleted file mode 100644 index 8cbcaac8..00000000 --- a/app/assets/javascripts/supplier/app/app.js.coffee +++ /dev/null @@ -1,36 +0,0 @@ -window.ember_ready = false -@App = Ember.Application.create - LOG_TRANSITIONS: true - LOG_VIEW_LOOKUPS: true - rootElement: '#ember-app-container' - store: -> @__container__.lookup('service:store') - ready: -> - window.ember_ready = true -@App.modals = Ember.Namespace.create() -@Modals = @App.modals - -Ember.$.ajaxPrefilter (options) -> - locale = $locale - app_version = 0 - params = - locale: $locale - app_version: 0 - if options.type.toUpperCase() == 'GET' - if options.data - options.data += "&#{$.param(params)}" - else - options.data = $.param(params) - if options.type.toUpperCase() == 'POST' - if options.data - if typeof(options.data) == 'string' - if options.data[0] == '{' || options.data[0] == '[' # json - object = JSON.parse(options.data) - $.extend object, params - options.data = JSON.stringify(object) - else - options.data += "&#{$.param(params)}" - else - options.data = params - else - options.data = $.param(params) - true diff --git a/app/assets/javascripts/supplier/app/application.js.coffee b/app/assets/javascripts/supplier/app/application.js.coffee deleted file mode 100644 index ccc90992..00000000 --- a/app/assets/javascripts/supplier/app/application.js.coffee +++ /dev/null @@ -1,20 +0,0 @@ -#= require_self -#= require md5 -#= require handlebars -# require ember -# require ember-data -# require active-model-adapter -# require ember-validations -# require ember-template-compiler -#= require_directory ./modifications -#= require ./app -# require shared-ember-helpers/all -#= require_directory ./mixins -#= require_directory ./services -#= require ./controllers/modals/base_controller -# require ion.sound -#= require_tree . - -@$assets_path = '/assets/' -#@EmberENV = {FEATURES: {'query-params-new': true}} -@$days = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'] diff --git a/app/assets/javascripts/supplier/app/components/application.js.coffee b/app/assets/javascripts/supplier/app/components/application.js.coffee deleted file mode 100644 index 6faa2c06..00000000 --- a/app/assets/javascripts/supplier/app/components/application.js.coffee +++ /dev/null @@ -1,22 +0,0 @@ -App.ApplicationView = Ember.Component.extend - layoutName: 'application' - classNames: ['application-view'] - didRender: -> - $('.toggle-side-menu,.side-menu').click -> - menu = $('.side-menu') - toggle = $('.toggle-side-menu') - if menu.is(':visible') - menu.animate left: -255, -> $(@).hide() - toggle.animate left: 0, -> $(@).removeClass('open') - else - menu.show().animate left: 0 - toggle.animate left: 222 - 30, -> $(@).addClass('open') - - ion.sound - sounds: [ - {name: "bell_ring", volume: 0.8} - {name: "water_droplet"} - {name: "water_droplet_3"} - ] - path: "/sounds/" - preload: true diff --git a/app/assets/javascripts/supplier/app/components/button/change-list-table.js.coffee b/app/assets/javascripts/supplier/app/components/button/change-list-table.js.coffee deleted file mode 100644 index dd8a8ba1..00000000 --- a/app/assets/javascripts/supplier/app/components/button/change-list-table.js.coffee +++ /dev/null @@ -1,8 +0,0 @@ -App.ButtonChangeListTableComponent = Ember.Component.extend - layoutName: 'components/button/change-list-table' - tagName: 'button' - classNames: ['change-list-table-button'] - click: -> - @modal 'change-list-table', - model: @list - diff --git a/app/assets/javascripts/supplier/app/components/button/close_list.js.coffee b/app/assets/javascripts/supplier/app/components/button/close_list.js.coffee deleted file mode 100644 index 5f4aa8f1..00000000 --- a/app/assets/javascripts/supplier/app/components/button/close_list.js.coffee +++ /dev/null @@ -1,7 +0,0 @@ -App.ButtonCloseListComponent = Ember.Component.extend - layoutName: 'close_list_button' - classNames: ['close-list-button'] - classNameBindings: ['content.active:show:hide'] - tagName: 'button' - click: (e)-> - @modal 'close_list', model: @get('content') diff --git a/app/assets/javascripts/supplier/app/components/button/language-switcher.js.coffee b/app/assets/javascripts/supplier/app/components/button/language-switcher.js.coffee deleted file mode 100644 index 502f441c..00000000 --- a/app/assets/javascripts/supplier/app/components/button/language-switcher.js.coffee +++ /dev/null @@ -1,16 +0,0 @@ -App.ButtonLanguageSwitcherComponent = Ember.Component.extend - tagName: 'a' - layoutName: 'components/language-switcher-button' - classNameBindings: ['isCurrent:current'] - classNames: ['language-switch-button'] - isCurrent: Ember.computed 'locale', 'globals.locale', -> - @get('locale') is @get('globals.locale') - #isCurrent: Ember.computed.equal 'locale', 'globals.locale' - click: -> @get('controller').send 'switchTo', @get('locale') - action: 'switchTo' - #TODO: EASY BUBBLE ACTION - actions: - switchTo: (locale)-> - setLocale locale - @set 'globals.locale', locale - @store.peekAll("page").invoke 'reload' diff --git a/app/assets/javascripts/supplier/app/components/button/mark-list-helped.js.coffee b/app/assets/javascripts/supplier/app/components/button/mark-list-helped.js.coffee deleted file mode 100644 index dc9ab395..00000000 --- a/app/assets/javascripts/supplier/app/components/button/mark-list-helped.js.coffee +++ /dev/null @@ -1,8 +0,0 @@ -App.ButtonMarkListHelpedComponent = Ember.Component.extend - layoutName: 'components/button/mark-list-helped' - classNames: ['mark-list-as-helped-button'] - classNameBindings: ['content.needs_help:show:hide'] - tagName: 'button' - click: (e)-> - # record could be promise or object - @get('content').invoke 'markHelped' diff --git a/app/assets/javascripts/supplier/app/components/button/mark-order-active.js.coffee b/app/assets/javascripts/supplier/app/components/button/mark-order-active.js.coffee deleted file mode 100644 index e2296ba2..00000000 --- a/app/assets/javascripts/supplier/app/components/button/mark-order-active.js.coffee +++ /dev/null @@ -1,6 +0,0 @@ -App.ButtonMarkOrderActiveComponent = Ember.Component.extend - tagName: 'button' - layoutName: 'components/button/mark-order-active' - classNames: ['mark-order-active-button'] - classNameBindings: ['order.placed:active:hide'] - click: -> @get('order').mark_active() diff --git a/app/assets/javascripts/supplier/app/components/button/mark-order-cancelled.js.coffee b/app/assets/javascripts/supplier/app/components/button/mark-order-cancelled.js.coffee deleted file mode 100644 index 94f7a375..00000000 --- a/app/assets/javascripts/supplier/app/components/button/mark-order-cancelled.js.coffee +++ /dev/null @@ -1,12 +0,0 @@ -App.ButtonMarkOrderCancelledComponent = Ember.Component.extend - tagName: 'button' - layoutName: 'components/button/mark-order-cancelled' - classNames: ['mark-order-cancelled-button'] - classNameBindings: ['showButton:active:hide'] - showButton: Ember.computed 'order.list.state', -> - @get('order.list.state') is 'active' - click: -> - @modal 'confirm', - model: @get('order') - ok: => @get('order').mark_cancelled() - diff --git a/app/assets/javascripts/supplier/app/components/button/mark-order-delivered.js.coffee b/app/assets/javascripts/supplier/app/components/button/mark-order-delivered.js.coffee deleted file mode 100644 index e380b02e..00000000 --- a/app/assets/javascripts/supplier/app/components/button/mark-order-delivered.js.coffee +++ /dev/null @@ -1,10 +0,0 @@ -App.ButtonMarkOrderDeliveredComponent = Ember.Component.extend - tagName: 'button' - layoutName: 'components/button/mark-order-delivered' - classNames: ['mark-order-delivered-button'] - classNameBindings: ['showButton:active:hide'] - showButton: Ember.computed 'order.state', -> - state = @get('order.state') - state is 'placed' or state is 'active' - click: -> @get('order').mark_delivered() - diff --git a/app/assets/javascripts/supplier/app/components/button/remove-list-needs-payment.js.coffee b/app/assets/javascripts/supplier/app/components/button/remove-list-needs-payment.js.coffee deleted file mode 100644 index b0b725d1..00000000 --- a/app/assets/javascripts/supplier/app/components/button/remove-list-needs-payment.js.coffee +++ /dev/null @@ -1,7 +0,0 @@ -App.ButtonRemoveListNeedsPaymentComponent = Ember.Component.extend - tagName: 'button' - layoutName: 'components/button/remove-list-needs-payment' - classNames: ['remove-list-needs-payment-button'] - classNameBindings: ['content.needs_payment:show:hide'] - click: -> - @get('content').invoke 'remove_needs_payment' diff --git a/app/assets/javascripts/supplier/app/components/button/show-list.js.coffee b/app/assets/javascripts/supplier/app/components/button/show-list.js.coffee deleted file mode 100644 index 31361b9d..00000000 --- a/app/assets/javascripts/supplier/app/components/button/show-list.js.coffee +++ /dev/null @@ -1,6 +0,0 @@ -App.ButtonShowListComponent = Ember.Component.extend - tagName: 'button' - layoutName: 'components/button/show-list' - classNames: ['show-list-button'] - click: -> - @get('targetObject.targetObject').transitionToRoute('list', @get('content')) diff --git a/app/assets/javascripts/supplier/app/components/dashboard/active-list.js.coffee b/app/assets/javascripts/supplier/app/components/dashboard/active-list.js.coffee deleted file mode 100644 index cd253cae..00000000 --- a/app/assets/javascripts/supplier/app/components/dashboard/active-list.js.coffee +++ /dev/null @@ -1,5 +0,0 @@ -App.DashboardActiveListComponent = Ember.Component.extend - classNames: ['row'] - layoutName: 'dashboard/active-list' - classNameBindings: ['classIdentifier'] - classIdentifier: Ember.computed 'list.id', -> "list-row-#{@get('list.id')}" diff --git a/app/assets/javascripts/supplier/app/components/dashboard/active-order.js.coffee b/app/assets/javascripts/supplier/app/components/dashboard/active-order.js.coffee deleted file mode 100644 index f5b71003..00000000 --- a/app/assets/javascripts/supplier/app/components/dashboard/active-order.js.coffee +++ /dev/null @@ -1,5 +0,0 @@ -App.DashboardActiveOrderComponent = Ember.Component.extend - classNames: ['row'] - layoutName: 'dashboard/active-order' - classNameBindings: ['order.active:active', 'order.delivered:delivered', 'classIdentifier'] - classIdentifier: Ember.computed 'order.id', -> "order-row-#{@get('order.id')}" diff --git a/app/assets/javascripts/supplier/app/components/dropdown_link.js.coffee b/app/assets/javascripts/supplier/app/components/dropdown_link.js.coffee deleted file mode 100644 index 891c7ab8..00000000 --- a/app/assets/javascripts/supplier/app/components/dropdown_link.js.coffee +++ /dev/null @@ -1,5 +0,0 @@ -App.DropdownLinkComponent = Ember.Component.extend - active: false - classNames: ['dropdown-container'] - classNameBindings: ['active'] - click: -> @set 'active', !@get('active') diff --git a/app/assets/javascripts/supplier/app/components/edit_currency_component.js.coffee b/app/assets/javascripts/supplier/app/components/edit_currency_component.js.coffee deleted file mode 100644 index c3eb5ce5..00000000 --- a/app/assets/javascripts/supplier/app/components/edit_currency_component.js.coffee +++ /dev/null @@ -1,52 +0,0 @@ -App.EditCurrencyComponent = Ember.Component.extend - classNames: ['edit-currency-container', 'row', 'collapse'] - classNameBindings: ['has_error:error'] - currencySymbol: '€' - has_error: false - placeholder: '0.00' - validatePresence: false - - inputValue: Ember.computed "value", - get: -> - return_value = @get "value" - @set 'has_error', true if @validatePresence and !return_value - return_value = return_value.toFixed(2) if typeof return_value is 'number' - return_value - set: (key, value, previousValue)-> - if value - # if typeof value is 'number' - # return_value = value.toPrecision() - # @set key, value - if typeof value is 'string' and value.match(/^[+-]?\d+(\.?\d?\d)?$/) - @set 'has_error', false - @set "value", parseFloat(value) - else - @set 'has_error', true - - else - @set "value", 0.0 # empty - @set 'has_error', false - value - - actions: - action: -> - @sendAction('action') if @action - #didInsertElement: -> - #@addObserver "model.#{@attribute}", (attribute)=> - #if value = @get("model.#{@attribute}") - #@set 'value', value.toFixed(2) if parseFloat(@get('value')) isnt value - #else - #@set 'value', 0 - ## @set('value', @get("model.#{@attribute}").toFixed) - ## # dynamically observe the model's attribute - ## # if this changes outside the component's context, it is not - ## # observed by the computed property. model.@attribute is not (yet) working :) - ## current_value = @get 'value' - ## if value = @get("model.#{@attribute}") - ## string_value = value.toPrecision() - ## @set('value', string_value) if parseFloat(current_value) isnt @get("model.#{@attribute}") - #@addObserver "model.errors.#{@attribute}.length", (attribute)=> - #@set 'has_error', !!@get("model.errors.#{@attribute}.length") - #@model.validate().then => - #@set 'has_error', !!@get("model.errors.#{@attribute}.length") - diff --git a/app/assets/javascripts/supplier/app/components/flash-message.js.coffee b/app/assets/javascripts/supplier/app/components/flash-message.js.coffee deleted file mode 100644 index 7cf25474..00000000 --- a/app/assets/javascripts/supplier/app/components/flash-message.js.coffee +++ /dev/null @@ -1,10 +0,0 @@ -App.FlashMessageComponent = Ember.Component.extend - layoutName: 'flash_message' - classNames: ['flash-message'] - classNameBindings: ['message:active'] - message: Ember.computed.alias 'globals.flash_message' - click: -> @set 'globals.flash_message', '' - inactivator: (-> - if @get('message') - Ember.run.later((=> @set 'globals.flash_message', ''), 4000) - ).observes('message') diff --git a/app/assets/javascripts/supplier/app/components/form/boolean-button.js.coffee b/app/assets/javascripts/supplier/app/components/form/boolean-button.js.coffee deleted file mode 100644 index 0d350b97..00000000 --- a/app/assets/javascripts/supplier/app/components/form/boolean-button.js.coffee +++ /dev/null @@ -1,17 +0,0 @@ -App.BooleanButtonComponent = Ember.Component.extend - tagName: 'a' - href: '#' - classNames: "button" - layoutName: "form/boolean-button" - #template: Ember.Handlebars.compile "{{view.text}}" - classNameBindings: ['rounded:round', 'active:active:disabled'] - - text: Ember.computed 'text_path', -> - return unless text_path = @get('text_path') - tspan(text_path).htmlSafe() - - active: Ember.computed 'value', -> - if @reverse then !@get('value') else !!@get('value') - - click: -> - @set 'value', !@get('value') diff --git a/app/assets/javascripts/supplier/app/components/form/boolean-switch.js.coffee b/app/assets/javascripts/supplier/app/components/form/boolean-switch.js.coffee deleted file mode 100644 index 41d0c27c..00000000 --- a/app/assets/javascripts/supplier/app/components/form/boolean-switch.js.coffee +++ /dev/null @@ -1,7 +0,0 @@ -App.BooleanSwitchComponent = Ember.Component.extend - layoutName: "form/boolean-switch" - classNames: "switch" - classNameBindings: ['rounded:round'] - - # UniqueId is used to connect the label and the checkbox to eachother in the template - setUniqueId: (->@set 'switchId', "switch-#{Math.round(Math.random()*1000)}").on('init') diff --git a/app/assets/javascripts/supplier/app/components/form/file-upload.js.coffee b/app/assets/javascripts/supplier/app/components/form/file-upload.js.coffee deleted file mode 100644 index 2b3f0716..00000000 --- a/app/assets/javascripts/supplier/app/components/form/file-upload.js.coffee +++ /dev/null @@ -1,12 +0,0 @@ -App.FormFileUploadComponent = Ember.TextField.extend - tagName: 'input' - attributeBindings: ['name'] - type: 'file' - file: null, - change: (e)-> - reader = new FileReader() - that = this - reader.onload = (el)-> - fileToUpload = el.target.result - Ember.run -> that.set('file', fileToUpload) - reader.readAsDataURL(e.target.files[0]) diff --git a/app/assets/javascripts/supplier/app/components/form/my-select.js.coffee b/app/assets/javascripts/supplier/app/components/form/my-select.js.coffee deleted file mode 100644 index 21e04d1f..00000000 --- a/app/assets/javascripts/supplier/app/components/form/my-select.js.coffee +++ /dev/null @@ -1,45 +0,0 @@ -App.MySelectComponent = Ember.Component.extend - # possible passed-in values with their defaults: - layoutName: 'form/my-select' - content: null - prompt: null - optionValuePath: 'id' - optionLabelPath: 'title' - action: Ember.K # action to fire on change - selection: null - identity: true - - # shadow the passed-in `selection` to avoid - # leaking changes to it via a 2-way binding - #_selection: Ember.computed.reads('selection') - - setContent: (-> - @set('content', []) unless @get('content') - ).on('init') - - didRender: -> - # Set select to current value if can be found - if @get('identity') - key = @get('optionValuePath') - index = @get('content').mapBy(key).indexOf(@get("selection.#{key}")) # Ember 2.0.1 cannot find real objects yet - else - index = @get('content').indexOf(@get('selection')) - if index > -1 - @$('select:first').prop('selectedIndex', index) - - actions: - showDebugger: -> debugger - change: -> - selectedIndex = @$('select:first').get(0).selectedIndex - - # decrement index by 1 if we have a prompt - hasPrompt = !!@get('prompt') - contentIndex = if hasPrompt then selectedIndex - 1 else selectedIndex - - selection = @get('content').toArray()[contentIndex] - - # set the local, shadowed selection to avoid leaking - # changes to `selection` out via 2-way binding - @set('selection', selection) - - #changeCallback(selection) if changeCallback = @get('action') diff --git a/app/assets/javascripts/supplier/app/components/form/select-minute-of-day.js.coffee b/app/assets/javascripts/supplier/app/components/form/select-minute-of-day.js.coffee deleted file mode 100644 index 95c4e18f..00000000 --- a/app/assets/javascripts/supplier/app/components/form/select-minute-of-day.js.coffee +++ /dev/null @@ -1,22 +0,0 @@ -App.SelectMinuteOfDayComponent = Ember.Component.extend - layoutName: "form/select_minute_of_day" - classNameBindings: ['rounded:round'] - hours_list: [0..24].map (n) -> "0#{n}".substr(-2,2) - minutes_list: [0..60].map (n) -> "0#{n}".substr(-2,2) - hour: Ember.computed 'value', - set: (key, value)-> - minute = if @get('minute') then parseInt(@get('minute')) else 0 - @set 'value', 60*parseInt(value) + minute - value - get: -> - number = Math.floor (@get('value') || 0)/60 - "0#{number}".substr(-2,2) - minute: Ember.computed 'value', - set: (key, value)-> - hour = if @get('hour') then parseInt(@get('hour')) else 0 - @set 'value', 60*hour + parseInt(value) - value - get: -> - return "00" unless value = @get('value') - number = Math.floor value%60 - "0#{number}".substr(-2,2) diff --git a/app/assets/javascripts/supplier/app/components/language-switcher.js.coffee b/app/assets/javascripts/supplier/app/components/language-switcher.js.coffee deleted file mode 100644 index 596f683e..00000000 --- a/app/assets/javascripts/supplier/app/components/language-switcher.js.coffee +++ /dev/null @@ -1,8 +0,0 @@ -App.LanguageSwitcherComponent = Ember.Component.extend - classNames: ['language-switcher-container'] - locales: (-> ['en', 'nl']).property() - actions: - switchTo: (locale)-> - setLocale locale - @set 'globals.locale', locale - @store.peekAll("page").invoke 'reload' diff --git a/app/assets/javascripts/supplier/app/components/list-display-date-selector.js.coffee b/app/assets/javascripts/supplier/app/components/list-display-date-selector.js.coffee deleted file mode 100644 index 45660b5d..00000000 --- a/app/assets/javascripts/supplier/app/components/list-display-date-selector.js.coffee +++ /dev/null @@ -1,4 +0,0 @@ -App.ListDisplayDateSelectorComponent = Ember.TextField.extend - classNames: 'datepicker' - didInsertElement: -> - setTranslations @$().hide() diff --git a/app/assets/javascripts/supplier/app/components/list/order.js.coffee b/app/assets/javascripts/supplier/app/components/list/order.js.coffee deleted file mode 100644 index 92378ff9..00000000 --- a/app/assets/javascripts/supplier/app/components/list/order.js.coffee +++ /dev/null @@ -1,4 +0,0 @@ -App.ListOrderComponent = Ember.Component.extend - layoutName: 'list/order' - classNames: ['list-order-container'] - classNameBindings: ['order.state'] diff --git a/app/assets/javascripts/supplier/app/components/menu-product.js.coffee b/app/assets/javascripts/supplier/app/components/menu-product.js.coffee deleted file mode 100644 index 8c558f89..00000000 --- a/app/assets/javascripts/supplier/app/components/menu-product.js.coffee +++ /dev/null @@ -1,61 +0,0 @@ -App.MenuProductComponent = Ember.Component.extend - editMode: false - code_filter: '' - classNames: 'menu-product-container' - classNameBindings: ['menu_product_class', 'editMode:editing', 'product.active:active:inactive'] - showProduct: (-> - return true unless filter = @get('code_filter') - (@get('product.code') || "").toLowerCase().indexOf(filter.toLowerCase()) >= 0 - ).property('code_filter') - menu_product_class: (-> "menu-product-#{@get('product.id') || 'new'}").property('product.id') - code_filter_display: Ember.computed 'code_filter', 'product.code', -> - return " ".htmlSafe() unless code = @get('product.code') - return code unless filter = @get('code_filter') - index = code.toLowerCase().indexOf(filter.toLowerCase()) - if index >= 0 - pre_code = code.substring(0,index) - highlight = code.substring(index,index + filter.length) - post_code = code.substring(index + filter.length) - "#{pre_code}#{highlight}#{post_code}".htmlSafe() - else - code - actions: - makeEditable: -> @set('editMode', true) - save: -> - return unless @get('product.isValid') - @get('product.product_variants').forEach (product_variant)-> - product_variant.save() if product_variant.get('hasDirtyAttributes') - if @get('product.hasDirtyAttributes') - @get('product').save() - @set 'editMode', false - destroyProduct: (product)-> - if product.get('isNew') - product.deleteRecord() - else - @modal 'confirm', - model: product - title_path: 'product.destroy_confirmation' - ok: -> product.destroyRecord() - rollbackProduct: -> - if @get('product.isNew') - @get('product').deleteRecord() - else - @get('product.product_variants').forEach (product_variant)-> - product_variant.rollbackAttributes() - @get('product').rollbackAttributes() - @set 'editMode', false - addProductVariant: -> - product_variant = @get('targetObject.store').createRecord('product_variant') - @get('product.product_variants').addObject product_variant - removeProductVariant: (product_variant)-> - product_variant.destroyRecord() - didInsertElement: -> - if @get('product.isNew') - @set 'editMode', true - Ember.run.later => - @$('input:first').focus() - , 300 - namePlaceholder: (-> t "attributes.product.name").property() - pricePlaceholder: (-> t "attributes.product.price").property() - codePlaceholder: (-> t "attributes.product.code").property() - descriptionPlaceholder: (-> t "attributes.product.description").property() diff --git a/app/assets/javascripts/supplier/app/components/menu-time-preview.js.coffee b/app/assets/javascripts/supplier/app/components/menu-time-preview.js.coffee deleted file mode 100644 index 3454971e..00000000 --- a/app/assets/javascripts/supplier/app/components/menu-time-preview.js.coffee +++ /dev/null @@ -1,54 +0,0 @@ -App.MenuTimePreviewComponent = Ember.Component.extend - active: false - collapsed: true - preview_day: null - filter: null - preview_full_day: true - preview_minute_of_day: 1340 - classNames: 'menu-time-preview-container' - classNameBindings: ['active:active'] - actions: - openTimePreview: -> - @set 'collapsed', false - closeTimePreview: -> - #@set 'active', false - @set 'collapsed', true - activateTimePreview: -> - @set 'collapsed', true - @set 'active', true - deactivateTimePreview: -> - @set 'preview_day', null - @set 'preview_full_day', true - @set 'active', false - @set 'collapsed', true - daysContent: (-> - $days.map( (d) -> Ember.Object.create( name: d, text: t("date.day_name.#{d}")) ) - ).property() - preview_day_text: (-> - return "" unless day = @get('preview_day.text') - #day_text = tspan("date.day_name.#{day.get('name')}") - "

#{day}

".htmlSafe() - ).property('preview_day') - - preview_time_text: (-> - return "" if @get('preview_full_day') - day_minute = @get('preview_minute_of_day') - hour = Math.floor(day_minute/60) - minute = Math.floor(day_minute%60) - hour = "0#{hour}".substr(-2,2) - minute = "0#{minute}".substr(-2,2) - "#{hour}:#{minute}".htmlSafe() - ).property('preview_full_day', 'preview_minute_of_day') - hasSelection: (-> - return true if @get('preview_day') - return true unless @get('preview_full_day') - false - ).property('preview_day', 'preview_full_day') - - remoteFilter: (-> - return @set('targetObject.filter', null) unless @get('active') - filter = Ember.Object.create() - filter.set 'day', @get('preview_day.name') - filter.set 'minute_of_day', @get('preview_minute_of_day') unless @get('preview_full_day') - @set('targetObject.filter', filter) - ).observes('active', 'preview_day', 'preview_full_day', 'preview_minute_of_day') diff --git a/app/assets/javascripts/supplier/app/components/modal_view.js.coffee b/app/assets/javascripts/supplier/app/components/modal_view.js.coffee deleted file mode 100644 index fadc929d..00000000 --- a/app/assets/javascripts/supplier/app/components/modal_view.js.coffee +++ /dev/null @@ -1,14 +0,0 @@ -App.ModalView = Ember.Component.extend - layoutName: 'modals/layout' - didInsertElement: -> - @$('input:first').focus() - sortable = $('.sortable') - controller = @get('controller') - if sortable.length - sortable.sortable - update: (e, ui)-> - ids = sortable.find('.sortable-item-container').map((i, el) -> $(el).data('sortableId')).toArray() - if callback = controller.sortableUpdate - callback.call(controller, ids) - - diff --git a/app/assets/javascripts/supplier/app/components/my-schedule.js.coffee b/app/assets/javascripts/supplier/app/components/my-schedule.js.coffee deleted file mode 100644 index 29734a1d..00000000 --- a/app/assets/javascripts/supplier/app/components/my-schedule.js.coffee +++ /dev/null @@ -1,21 +0,0 @@ -App.MyScheduleView = Ember.Component.extend - layoutName: 'my-schedule' - classNames: ['schedule-view'] - didInsertElement: -> - placeholder = @$('#schedule-placeholder') - events = @get('globals.current_employee.employee_shifts').map( (employee_shift)->employee_shift.get('calendar_event_for_employee') ) - placeholder.fullCalendar - header: - left: 'prev,next,today' - center: 'title' - right: 'agendaDay,agendaWeek,month' - selectable: false - defaultView: 'agendaWeek' - events: events - timezone: 'UTC' - timeFormat: 'H(:mm)' - axisFormat: 'H:mm' - lang: moment.locale() - - - diff --git a/app/assets/javascripts/supplier/app/components/number-field.js.coffee b/app/assets/javascripts/supplier/app/components/number-field.js.coffee deleted file mode 100644 index ddda69df..00000000 --- a/app/assets/javascripts/supplier/app/components/number-field.js.coffee +++ /dev/null @@ -1,15 +0,0 @@ -App.NumberFieldComponent = Ember.TextField.extend - type: 'number' - attributeBindings: ['min', 'max', 'step'] - focusIn: -> @$().select() - numericValue: Ember.computed 'value', - get: -> - value = @get 'value' - if value? then String(value) else '' - set: (key, value)-> - if value? - setValue = parseFloat(value) - @set "value", if Number.isFinite(setValue) then setValue else null - else - @set 'value', null - value diff --git a/app/assets/javascripts/supplier/app/components/page-body.js.coffee b/app/assets/javascripts/supplier/app/components/page-body.js.coffee deleted file mode 100644 index b545e743..00000000 --- a/app/assets/javascripts/supplier/app/components/page-body.js.coffee +++ /dev/null @@ -1,11 +0,0 @@ -App.PageBodyComponent = Ember.Component.extend - setTemplate: (-> - body = @get('page.body') - body ||= "" - try - template = Ember.HTMLBars.compile(body) - catch - template = Ember.HTMLBars.compile(tspan('page.cannot_compile')) - @set 'layout', Ember.HTMLBars.template(template) - @rerender() - ).on('init').observes('page.body') diff --git a/app/assets/javascripts/supplier/app/components/qr-codes-link.js.coffee b/app/assets/javascripts/supplier/app/components/qr-codes-link.js.coffee deleted file mode 100644 index c134edf5..00000000 --- a/app/assets/javascripts/supplier/app/components/qr-codes-link.js.coffee +++ /dev/null @@ -1,11 +0,0 @@ -App.QrCodesLinkComponent = Ember.Component.extend - tagName: 'a' - target: '_blank' - classNames: ["table-qr-codes"] - attributeBindings: ['href', 'target'] - href: Ember.computed 'section.id', 'table.id', -> - Routes.qr_codes_suppliers_tables_path(section_id: @get('section.id'), table_id: @get('table.id')) - click: -> - # Somehow this is needed for within the actions menu - @$().click() - diff --git a/app/assets/javascripts/supplier/app/components/schedule.js.coffee b/app/assets/javascripts/supplier/app/components/schedule.js.coffee deleted file mode 100644 index 777b303e..00000000 --- a/app/assets/javascripts/supplier/app/components/schedule.js.coffee +++ /dev/null @@ -1,67 +0,0 @@ -App.ScheduleView = Ember.Component.extend - event_changed: (event)-> - if employee_shift = @get('globals.current_employee').store.peekRecord('employee-shift', event.id) - return unless event.start and event.end - employee_shift.set 'start_from', event.start - employee_shift.set 'end_on', event.end - employee_shift.save() - editEvent: (id, callbacks)-> - if employee_shift = @get('globals.current_employee').store.peekRecord('employee-shift', id) - @modal 'employee_shift', - title_path: 'employee_shift.modal.title' - destroy_text_path: 'employee_shift.modal.destroy_confirmation' - model: employee_shift - save: -> callbacks.save.call(@, employee_shift) if callbacks.save - destroy_callback: -> callbacks.destroy.call(@, employee_shift) if callbacks.destroy - classNames: ['schedule-view'] - - didRender: -> @drawCalendar() - drawCalendar: -> - placeholder = @$('#schedule-placeholder') - events = @get('globals.current_supplier.employee_shifts').filter((employee_shift) -> employee_shift.get('employee.active') ).map( (employee_shift)->employee_shift.get('calendar_event') ) - editable = !!@get('globals.current_employee.manager') - fullCalendarOptions = - header: - left: 'prev,next,today' - center: 'title' - right: 'agendaDay,agendaWeek,month' - selectable: editable - selectHelper: editable - editable: editable - defaultView: 'agendaWeek' - events: events - timezone: 'UTC' - eventDrop: @event_changed.bind(@) - eventResize: @event_changed.bind(@) - dayClick: (date, jsEvent, view)-> - jsEvent.preventDefault() - if view.type is 'month' - placeholder.fullCalendar('changeView', 'agendaDay') - placeholder.fullCalendar('gotoDate', date) - false - eventClick: (event)=> - return unless editable - @editEvent event.id, - save: (shift)-> - placeholder.fullCalendar('removeEvents', [event.id]) - placeholder.fullCalendar('renderEvent', shift.get('calendar_event'), true) - destroy: (shift)-> - placeholder.fullCalendar('removeEvents', [event.id]) - timeFormat: 'H(:mm)' - slotLabelFormat: 'H:mm' - lang: moment.locale() - if editable - fullCalendarOptions.select = (start, end, jsEvent, view) => - return if view.type is 'month' - format = 'dddd h:mm' - @modal 'select_employee', - ok: -> - # this context is SelectEmployeeController - if employee = @get('employee') - shift = employee.store.createRecord 'employee-shift', start_from: start, end_on: end - shift.set 'employee', employee - shift.save().then -> - placeholder.fullCalendar('renderEvent', shift.get('calendar_event'), true) - header: t('employee_shift.time_window', start: start.format(format), end: end.format(format)) - - placeholder.fullCalendar fullCalendarOptions diff --git a/app/assets/javascripts/supplier/app/components/section/area.js.coffee b/app/assets/javascripts/supplier/app/components/section/area.js.coffee deleted file mode 100644 index 76505c60..00000000 --- a/app/assets/javascripts/supplier/app/components/section/area.js.coffee +++ /dev/null @@ -1,37 +0,0 @@ -App.SectionAreaComponent = Ember.Component.extend DragNDrop.Draggable, - layoutName: 'section/area' - classNames: ['section-area-container'] - attributeBindings: ['style'] - classNameBindings: ['vertical', 'right_half:right-half', 'section_area.rounded:rounded'] - pixelWidth: Ember.computed 'section_area.width', 'dpm', -> @get('dpm') * @get('section_area.width') - pixelHeight: Ember.computed 'section_area.height', 'dpm', -> @get('dpm') * @get('section_area.height') - offsetX: Ember.computed.product 'dpm', 'section_area.position_x' - offsetY: Ember.computed.product 'dpm', 'section_area.position_y' - vertical: Ember.computed 'section_area.width', 'section_area.height', 'section.editmode', -> - not @get('section.editmode') and @get('section_area.height') > @get('section_area.width') - right_half: Ember.computed 'section_area.position_x', 'section_area.width', 'section_area.section.width', -> - @get('section_area.position_x') + (@get('section_area.width') / 2) > (@get('section_area.section.width') / 2) - style: Ember.computed 'offsetX', 'offsetY', 'pixelWidth', 'pixelHeight', 'section_area.color', -> - background_color = @get('section_area.color') - color = if App.CssObject.isColorDark(background_color) then 'white' else 'black' - App.CssObject.create( - width: @get('pixelWidth') - height: @get('pixelHeight') - left: @get('offsetX') - top: @get('offsetY') - "background-color": background_color - color: color - "line-height": @get('pixelHeight') - ).toString() - draggable: (-> if @get('section.editmode') then true else false ).property('section.editmode') - positionChange: (position)-> - dpm = @get('dpm') - return if !dpm or parseFloat(dpm) is 0 - @get('section_area').setProperties - position_x: position.left / dpm - position_y: position.top / dpm - click: -> - return unless @get('section.editmode') - @modal 'section_area', - title_path: 'section_area.modal.title' - model: @get('section_area') diff --git a/app/assets/javascripts/supplier/app/components/section/element.js.coffee b/app/assets/javascripts/supplier/app/components/section/element.js.coffee deleted file mode 100644 index 1c755575..00000000 --- a/app/assets/javascripts/supplier/app/components/section/element.js.coffee +++ /dev/null @@ -1,42 +0,0 @@ -App.SectionElementComponent = Ember.Component.extend DragNDrop.Draggable, - layoutName: 'section/element' - classNames: ['section-element-container'] - attributeBindings: ['style'] - show_handles: false - spinning: false - classNameBindings: ['uniqueClass', 'spinning:spin-rotate'] - uniqueClass: Ember.computed 'section_element.id', -> "section-element-#{@get('section_element.id')}" - draggable: Ember.computed.alias 'section.editmode' - offsetX: (-> - (@get('dpm') || 0) * (@get('section_element.position_x') || 0) - ).property('dpm', 'section_element.position_x') - offsetY: (-> - return 0 unless dpm = @get('dpm') - dpm * (@get('section_element.position_y') || 0) - ).property('dpm', 'section_element.position_y', 'section_element.rotation') - #myHeight: (-> (@get('dpm') || 0 ) * @get('section_element.height')).property('dpm', 'section_element.height') - #myWidth: (-> (@get('dpm') || 0 ) * @get('section_element.width')).property('dpm', 'section_element.width') - - # box size in dots [d] - box_size: (-> (@get('dpm') || 0 ) * @get('section_element.box_size')).property('dpm', 'section_element.box_size') - style: Ember.computed 'offsetX', 'offsetY', 'box_size', 'section_element.rotation', -> - "position:absolute;width:#{@get('box_size')}px;height:#{@get('box_size')}px;left:#{@get('offsetX')}px;top:#{@get('offsetY')}px".htmlSafe() - positionChange: (position)-> - dpm = @get('dpm') - return if !dpm or parseFloat(dpm) is 0 - @get('section_element').setProperties - position_x: position.left / dpm - position_y: position.top / dpm - click: -> - if @get('section.editmode') - @toggleProperty('show_handles') - else - @set 'spinning', true - Ember.run.later (=> @set('spinning', false)), 2000 - showHandles: Ember.computed.and 'show_handles', 'section.editmode' - actions: - rotateLeft: -> - @get('section_element').invoke "rotateLeft" - rotateRight: -> - @get('section_element').invoke "rotateRight" - removeSectionElement: -> @get('section_element').destroyRecord() diff --git a/app/assets/javascripts/supplier/app/components/section/tab-header.js.coffee b/app/assets/javascripts/supplier/app/components/section/tab-header.js.coffee deleted file mode 100644 index 14cb5196..00000000 --- a/app/assets/javascripts/supplier/app/components/section/tab-header.js.coffee +++ /dev/null @@ -1,32 +0,0 @@ -App.SectionTabHeaderComponent= Ember.Component.extend - layoutName: 'section/tab-header' - classNameBindings: ['section_header_class', 'section_active:active'] - classNames: ['section-tab-header'] - click: (e)-> - @set 'globals.active_section', @get('section') - @get('targetObject').transitionToRoute 'section', @get('section.id') - - section_header_class: (-> "section-tab-header-#{@get('section.id')}").property() - #dragEntered: (view)-> - #@$().addClass('table-hover') - #return false - # Changing the route for now is too difficult. Just do a move - #if view.constructor.toString().match(/SectionTableView$/) - #@get('controller').transitionToRoute 'section', @get('section') - #dragLeft: -> @$().removeClass('table-hover') - #dropped: (view)-> - #if view.constructor.toString().match(/SectionTableView$/) - #table = view.get('section') - #section = @get('section') - #if section isnt table.get('section') - #section.get('tables').addObject table - #table.save() - #@get('controller').transitionToRoute 'section', section.get('id') - #didInsertElement: -> - #@$el = $ @get('element') - - section_active: (-> - current_section = @get('targetObject.model.id') - view_section = @get('section.id') - current_section == view_section - ).property('targetObject.model.id') diff --git a/app/assets/javascripts/supplier/app/components/section/table.js.coffee b/app/assets/javascripts/supplier/app/components/section/table.js.coffee deleted file mode 100644 index eec734c6..00000000 --- a/app/assets/javascripts/supplier/app/components/section/table.js.coffee +++ /dev/null @@ -1,61 +0,0 @@ -App.SectionTableComponent = Ember.Component.extend DragNDrop.Draggable, - layoutName: 'section/table' - classNames: ['section-table'] - attributeBindings: ['style'] - - # required bindings - dpm: 1 - section: null - table: null - - classNameBindings: [ - 'table.active_list.active:occupied', - 'section.editmode:draggable', - 'table.active_list.needs_help:needs_help', - 'table.active_list.needs_payment:needs_payment', - 'table.active_list.has_active_orders:active_order', - 'right_half:right-half', - 'uniqueClass' - ] - uniqueClass: (-> - "section-table-#{@get('table.id')}" - ).property('table.id') - right_half: Ember.computed 'table.position_x', 'table.width', 'table.section.width', -> - @get('table.position_x') + (@get('table.width') / 2) > (@get('table.section.width') / 2) - offsetX: (-> - (@get('dpm') || 0) * (@get('table.position_x') || 0) - ).property('dpm', 'table.position_x') - offsetY: (-> - (@get('dpm') || 0) * (@get('table.position_y') || 0) - ).property('dpm', 'table.position_y') - - myHeight: (-> Math.max((@get('dpm') || 0 ) * @get('table.height'), 60)).property('dpm', 'table.height') - myWidth: (-> Math.max((@get('dpm') || 0 ) * @get('table.width'), 60)).property('dpm', 'table.width') - #style: (-> - #"position:absolute;width:83px;height:48px;left:#{@get('offsetX')}px;top:#{@get('offsetY')}px" - #).property('offsetX', 'offsetY') - style: Ember.computed 'offsetX', 'offsetY', 'myWidth', 'myHeight', -> - "position:absolute;width:#{@get('myWidth')}px;height:#{@get('myHeight')}px;left:#{@get('offsetX')}px;top:#{@get('offsetY')}px".htmlSafe() - - draggable: Ember.computed.alias 'section.editmode' - positionChange: (position)-> - dpm = @get('dpm') - return if !dpm or parseFloat(dpm) is 0 - - @get('table').setProperties - position_x: position.left / dpm - position_y: position.top / dpm - #@get('table').save() - click: (evt)-> - evt.preventDefault() - if @get('section.editmode') - table = @get('table') - @modal 'table_edit', - model: table - close: -> table.rollbackAttributes() - else - @$('.table-actions').toggle() if @$el.hasClass('occupied') - false - didInsertElement: -> - @$el = @$() - @$('.table-actions').hide() diff --git a/app/assets/javascripts/supplier/app/components/section/tables.js.coffee b/app/assets/javascripts/supplier/app/components/section/tables.js.coffee deleted file mode 100644 index 65e435ec..00000000 --- a/app/assets/javascripts/supplier/app/components/section/tables.js.coffee +++ /dev/null @@ -1,30 +0,0 @@ -App.SectionTablesComponent = Ember.Component.extend DragNDrop.Droppable, - classNames: ['well', 'section-tables-container', 'section-tables-active'] - classNameBindings: ['section.editmode:editing'] - layoutName: 'section/tables' - dpm: 1 - dropped: (component, position)-> - component.positionChange(position, @get('section.tables')) - handleDimensionChange: -> - return unless @get('element') - @$el = $(@get('element')) - viewport_width = $(window).width() - viewport_height = $(window).height() - 52 - section_width = @get('section.width') - section_height = @get('section.height') - dpm = viewport_width / section_width # try to fill the width - if dpm * section_height > viewport_height - # Height goes of the window, not what we want, adjust to fit height - dpm = viewport_height / section_height - @$el.css 'width', dpm * section_width - @$el.css 'height', dpm * section_height - console.log "dpm: #{dpm}" - @set 'dpm', dpm - observeSectionDimensions: (-> - @handleDimensionChange() - ).observes('section.height', 'section.width') - didInsertElement: -> - # the first observable event is triggered without the container having its dimensions - @get('section').notifyPropertyChange('width') #.notifyPropertyChange('height') - that = this - $(window).on 'orientationchange resize', -> Ember.run( -> that.handleDimensionChange()) diff --git a/app/assets/javascripts/supplier/app/components/section_view.js.coffee b/app/assets/javascripts/supplier/app/components/section_view.js.coffee deleted file mode 100644 index d3054d00..00000000 --- a/app/assets/javascripts/supplier/app/components/section_view.js.coffee +++ /dev/null @@ -1,15 +0,0 @@ -#App.SectionView = Ember.View.extend {} - #initFoundation: (-> - #@$().foundation() - #).on('didInsertElement') - #didInsertElement: -> - #@$().foundation() - #true -#$(document).on 'load', '[data-dropdown]', (a,b,c)-> - #true -#$(document).on 'change', '[data-dropdown]', (a,b,c)-> - #true -#$(document).on 'ready', '[data-dropdown]', (a,b,c)-> - #true -#$(document).on 'click', '[data-dropdown]', (a,b,c)-> - #true diff --git a/app/assets/javascripts/supplier/app/components/sections-header-section.js.coffee b/app/assets/javascripts/supplier/app/components/sections-header-section.js.coffee deleted file mode 100644 index 09f40dd1..00000000 --- a/app/assets/javascripts/supplier/app/components/sections-header-section.js.coffee +++ /dev/null @@ -1,4 +0,0 @@ -App.SectionsHeaderSectionComponent = Ember.Component.extend - tagName: 'dd' - attributeBindings: ['dataSectionId:data-section'] - dataSectionId: Ember.computed 'section.id', -> @get('section.id') diff --git a/app/assets/javascripts/supplier/app/components/sections-header.js.coffee b/app/assets/javascripts/supplier/app/components/sections-header.js.coffee deleted file mode 100644 index 4b27f94f..00000000 --- a/app/assets/javascripts/supplier/app/components/sections-header.js.coffee +++ /dev/null @@ -1,17 +0,0 @@ -App.SectionsHeaderComponent = Ember.Component.extend - classNames: ['sections-switcher-container', 'main-section-header'] - sections: Ember.computed -> @store.peekAll('section') - actions: - setSection: (section)-> - if section and section is @get('active_section') - # click on already active section - #return @transitionTo('section', section.id) - #return App.Router.router.transitionTo('section', section) - return @get('targetObject').transitionToRoute('section', section) - @$('dd').removeClass('active') - @$("[data-section=#{if section then section.id else 'all'}]").addClass('active') - @set('active_section', section) - didInsertElement: -> - @$('dd').removeClass('active') - section = @get('active_section') - @$("[data-section=#{if section then section.id else 'all'}]").addClass('active') diff --git a/app/assets/javascripts/supplier/app/components/suppliers-switcher.js.coffee b/app/assets/javascripts/supplier/app/components/suppliers-switcher.js.coffee deleted file mode 100644 index c8b1b896..00000000 --- a/app/assets/javascripts/supplier/app/components/suppliers-switcher.js.coffee +++ /dev/null @@ -1,8 +0,0 @@ -App.SuppliersSwitcherComponent = Ember.Component.extend - classNames: ['suppliers-switcher-container'] - suppliers: (-> @get('targetObject.store').peekAll 'supplier').property() - other_suppliers: Ember.computed 'suppliers.[]', - -> @get('suppliers').rejectBy 'id', @get('globals.current_supplier.id') - actions: - switchTo: (supplier)-> - window.location = Routes.switch_to_suppliers_supplier_path(supplier.get('id')) diff --git a/app/assets/javascripts/supplier/app/components/table-number-with-info.js.coffee b/app/assets/javascripts/supplier/app/components/table-number-with-info.js.coffee deleted file mode 100644 index 9867318e..00000000 --- a/app/assets/javascripts/supplier/app/components/table-number-with-info.js.coffee +++ /dev/null @@ -1,10 +0,0 @@ -App.TableNumberWithInfoComponent = Ember.Component.extend - tagName: 'span' - layoutName: 'table_number_with_info' - classNames: 'table-number-with-info' - click: -> - $el = $(@get('element')).find('.extra-list-info') - return $el.hide() if $el.is(':visible') - $el.show() - $.get Routes.extra_info_suppliers_list_path(@get('context.id')), (res)-> - $el.html(res) diff --git a/app/assets/javascripts/supplier/app/components/users-buttons.js.coffee b/app/assets/javascripts/supplier/app/components/users-buttons.js.coffee deleted file mode 100644 index 08003c89..00000000 --- a/app/assets/javascripts/supplier/app/components/users-buttons.js.coffee +++ /dev/null @@ -1,7 +0,0 @@ -App.UsersButtonsComponent = Ember.Component.extend - classNames: ['users-buttons'] - actions: - userClick: (user)-> - @modal 'user_info', - title_path: 'modal.user_info.title' - model: user diff --git a/app/assets/javascripts/supplier/app/controllers/application_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/application_controller.js.coffee deleted file mode 100644 index dba6ca60..00000000 --- a/app/assets/javascripts/supplier/app/controllers/application_controller.js.coffee +++ /dev/null @@ -1,23 +0,0 @@ -App.ApplicationController = Ember.Controller.extend - #init: -> - #success = (supplier)=> - ## A supplier record with id current and with the content of the returned supplier is created - ## at the moment remove the dummy supplier, this should be resolved by Ember eventually - #if error_supplier = @store.peekAll('supplier').findBy('id', 'current') - #error_supplier.eraseRecord() - #@set 'supplier', supplier - - #error = (emberError)=> - #if error_supplier = @store.peekAll('supplier').findBy('id', 'current') - #error_supplier.eraseRecord() - #@set 'supplier', null - #@store.findRecord('supplier', 'current').then success, error - # @set 'supplier', @store.findRecord('supplier', supplier_id) - #current_employee: (-> @get('employee') ).property('employee') - actions: - signOut: -> - window.location = Routes.destroy_employee_session_path() - showSupplierStatusInfo: -> - @modal 'supplier_status_info', - model: @get('globals.current_supplier') - title_path: 'supplier_status_info.title' diff --git a/app/assets/javascripts/supplier/app/controllers/employees.js.coffee b/app/assets/javascripts/supplier/app/controllers/employees.js.coffee deleted file mode 100644 index 0d63f19a..00000000 --- a/app/assets/javascripts/supplier/app/controllers/employees.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -App.EmployeesController = Ember.Controller.extend - employeeSorting: ['name'] - employees: Ember.computed.sort 'model', 'employeeSorting' diff --git a/app/assets/javascripts/supplier/app/controllers/index.js.coffee b/app/assets/javascripts/supplier/app/controllers/index.js.coffee deleted file mode 100644 index 4ae1e0ca..00000000 --- a/app/assets/javascripts/supplier/app/controllers/index.js.coffee +++ /dev/null @@ -1,35 +0,0 @@ -App.IndexController = Ember.Controller.extend - show_lists: true - show_orders: true - loading_data: true - lists: Ember.computed -> @store.peekAll('list') - orders: Ember.computed -> @store.peekAll('order') - sections: Ember.computed -> @store.peekAll('section') - #active_section: Ember.computed.alias 'globals.active_section' - active_lists: Ember.computed 'lists.@each.state', 'globals.active_section.id', 'lists.@each.table', -> # table needed for when list changes table - @get('orders') # trigger orders, otherwise observers are not initialized/triggered (active_orders) - if section_id = @get('globals.active_section.id') - lists = @get('lists').filter (list) => - return false unless list.get('state') is 'active' - list.get('table.section.id') is section_id - else - lists = @get('lists').filterBy('state', 'active') - lists.sortBy('created_at') # Not reversed, oldest on top, start with oldest order first, work your way down :-) Customer happyness - - active_orders: Ember.computed 'active_lists.[]', 'orders.@each.state', -> - orders = Ember.A() - @get('active_lists').forEach (list)-> - list.get('orders').filterBy('needs_supplier_attention').forEach (order)-> - orders.push order - orders.sortBy('created_at') # Not reversed, oldest on top, start with oldest order first, work your way down :-) Customer happyness - - show_lists_table: Ember.computed 'show_lists', 'active_lists.[]', -> - @get('show_lists') and @get('active_lists.length') - show_orders_table: Ember.computed 'show_orders', 'active_orders.[]', -> - @get('show_orders') and @get('active_orders.length') - list_number_info: (-> " (#{@get('active_lists.length')})").property('active_lists.[]') - order_number_info: (-> " (#{@get('active_orders.length')})").property('active_orders.[]') - - actions: - toggleDashboardLists: -> @set 'show_lists', !@get('show_lists') - toggleDashboardOrders: ->@set 'show_orders', !@get('show_orders') diff --git a/app/assets/javascripts/supplier/app/controllers/list_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/list_controller.js.coffee deleted file mode 100644 index 91656c7e..00000000 --- a/app/assets/javascripts/supplier/app/controllers/list_controller.js.coffee +++ /dev/null @@ -1,5 +0,0 @@ -App.ListController = Ember.Controller.extend - list: (-> @get('model')).property('model') - showTotal: (-> - if @get('list.orders.length') && @get('list.orders.length') > 1 then true else false - ).property('list.orders.length') diff --git a/app/assets/javascripts/supplier/app/controllers/lists_index_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/lists_index_controller.js.coffee deleted file mode 100644 index 57cf7022..00000000 --- a/app/assets/javascripts/supplier/app/controllers/lists_index_controller.js.coffee +++ /dev/null @@ -1,21 +0,0 @@ -App.ListsIndexController = Ember.Controller.extend - loading: true - date: (new Date()).toISOString().substr(0,10) # 2015-11-02 - dateChanged: (-> - return @set('loading', false) unless date = @get('date') - @set 'loading', true - @store.query 'list', date: date - .then => @set('loading', false) - ).observes('date').on('init') - lists: Ember.computed -> @store.peekAll('list') - - sorted_lists: Ember.computed 'date', 'lists.[]', -> - lists = @get('lists') - if selected_date = @get('date') - lists = lists.filter (list)-> - return false unless list_creation_date = list.get('created_at') - list_creation_date = list_creation_date.toISOString().substring(0,10) if typeof(list_creation_date) is 'object' - selected_date is list_creation_date - lists.sortBy('created_at').reverseObjects() - pricesList: Ember.computed.mapBy 'sorted_lists', 'price' - date_lists_total: Ember.computed.sum 'pricesList' diff --git a/app/assets/javascripts/supplier/app/controllers/menu_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/menu_controller.js.coffee deleted file mode 100644 index 7dd4f834..00000000 --- a/app/assets/javascripts/supplier/app/controllers/menu_controller.js.coffee +++ /dev/null @@ -1,31 +0,0 @@ -App.MenuController = Ember.Controller.extend - product_code_filter: '' - product_categories: (-> @store.peekAll('product_category')).property() - filter: null - sorted_product_categories: (-> - list = @get('product_categories') - if filter_day = @get('filter.day') - list = list.filterBy "active_on_#{filter_day}" - if filter_minute = @get('filter.minute_of_day') - list = list.filter (r) -> r.get('full_day') or (filter_minute >= r.get('start_from') and filter_minute <= r.get('end_on')) - - list.sortBy('position') - ).property('product_categories.[]', 'product_categories.@each.position', 'filter.day', 'filter.minute_of_day') - product_code_filter_placeholder: t('product.code_filter.placeholder') - actions: - editProductCategory: (product_category)-> - @modal 'product_category_edit', - model: product_category - close: -> product_category.rollbackAttributes() - destroy_text_path: 'product_category.modal.destroy_confirm_text' - - moveProductCategory: (product_category)-> - @modal 'product_category_move', - model: product_category - newProductCategory: -> - @modal 'product_category_new', - model: @store.createRecord('product_category', position: @get('product_categories.length')) - close: -> @get('model').deleteRecord() - addProduct: (product_category)-> - product = @store.createRecord 'product', position: product_category.get('products.length') - product_category.get('products').addObject product diff --git a/app/assets/javascripts/supplier/app/controllers/modals/add_section_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/modals/add_section_controller.js.coffee deleted file mode 100644 index 7240f6fd..00000000 --- a/app/assets/javascripts/supplier/app/controllers/modals/add_section_controller.js.coffee +++ /dev/null @@ -1,38 +0,0 @@ -App.modals.AddSectionController = @App.modals.BaseController.extend - section_title: '' - section_width: 15 - section_height: 8 - title_path: 'section.add_section.modal.title' - actions: - addSection: -> - @set 'alert_message', null - title = @get('section_title') - width = @get('section_width') - height = @get('section_height') - unless title - @set 'alert_message', error_message - attribute: t('attributes.section.title') - message: 'blank' - return - unless parseInt(width) > 0 - @set 'alert_message', error_message - attribute: t('attributes.section.width') - message: 'greater_than' - count: 0 - return - unless parseInt(height) > 0 - @set 'alert_message', error_message - attribute: t('attributes.section.height') - message: 'greater_than' - count: 0 - return - section = @store.createRecord 'section', - title: title - width: width - height: height - section.save().then (s)=> - @set 'section_title', '' - @send 'closeModal' - @transitionToRoute 'section', s.id - , @save_error.bind(@) - diff --git a/app/assets/javascripts/supplier/app/controllers/modals/add_section_element_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/modals/add_section_element_controller.js.coffee deleted file mode 100644 index e1a5974e..00000000 --- a/app/assets/javascripts/supplier/app/controllers/modals/add_section_element_controller.js.coffee +++ /dev/null @@ -1,10 +0,0 @@ -App.modals.AddSectionElementController = @App.modals.BaseController.extend - title_path: 'section_element.modal.title' - svg_elements: (-> @store.findAll 'svg_element').property() - actions: - addSectionElement: (svg_element)-> - section_element = @store.createRecord 'section-element' - section_element.copy_values svg_element - section_element.set 'section', @get('model') - @send 'ok' - diff --git a/app/assets/javascripts/supplier/app/controllers/modals/base_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/modals/base_controller.js.coffee deleted file mode 100644 index 552a729d..00000000 --- a/app/assets/javascripts/supplier/app/controllers/modals/base_controller.js.coffee +++ /dev/null @@ -1,79 +0,0 @@ -@App.modals.BaseController = Ember.Controller.extend - alert_message: "" - modal_options: {} - title: (-> - # return title if directly set by options - return @get('modal_options.title') if @get('modal_options.title') - # return translated title_path if directly set by controller - translation_params = {} - if model = @get('model') - translation_params = model.toJSON() if model.toJSON - - # return translated title_path if directly set by options - # return translated title_path if directly set by controller - if title_path = @get('modal_options.title_path') || @get('title_path') - return tspan(title_path, translation_params).htmlSafe() - # return translated title_path if directly set by options - #return tspan(@get('modal_options.title_path'), translation_params).htmlSafe() if @get('modal_options.title_path') - # return translated title_path if directly set by controller - #return tspan(@title_path, translation_params).htmlSafe() if @title_path - # infer title path based on controller name App.modals.AddSectionController => add_section - underscored = `this.constructor.toString().substr(11).replace(/Controller$/, '').underscore()` - #underscored = @constructor.toString().replace(/[a-zA-Z_-]+\@controller:modals\//, '').replace(/:$/, '').underscore() # ember cli - # find translated title or humanize the controller name - if convention_translation = ttry("modal.#{underscored}.title", translation_params) - tspan("modal.#{underscored}.title", translation_params).htmlSafe() - else - underscored.capitalize().replace(/_/, ' ') - ).property('model.id', 'modal_options.title_path') - body: (-> - @get('modal_options.body') - ).property('modal_options.body') - save_error: (error)-> - switch error.status - when 403 - @set 'alert_message', 'Unauthorized action' - else - @set 'alert_message', 'Something went wrong' - save_success: -> - if save_callback = @get('modal_options.save') - save_callback.apply(@) - @set 'alert_message', '' - @send 'closeModal' - - actions: - close: -> - if close = @get('modal_options.close') - close.apply(@) - unless @preventClose - @set 'alert_message', '' - @send 'closeModal' - closeOnOverlay: -> - @send('close') if @get('modal_options.closeOnOverlay') - false - modalClick: -> - @send('close') if @get('modal_options.closeOnModalClick') - false - ok: -> - if ok = @get('modal_options.ok') - ok.apply(@) - @set 'alert_message', '' - @send 'closeModal' unless @preventClose - confirm: -> @send('ok') - save: -> - if @get('model.isValid') - @get('model').save().then @save_success.bind(@), @save_error.bind(@) - #@send 'closeModal' unless @preventClose - rollback_and_close: -> - @get('model').rollbackAttributes() - @send 'close' - destroyRecord: -> - my_scope = @ - destroy_callback = @get('modal_options.destroy_callback') - @modal 'confirm', - title_path: @get('modal_options.destroy_text_path') || 'general.destroy.text' - model: @get('model') - ok: -> - @get('model').destroyRecord() - destroy_callback.call(my_scope) if destroy_callback - @send 'closeModal' unless @preventClose diff --git a/app/assets/javascripts/supplier/app/controllers/modals/change-list-table.js.coffee b/app/assets/javascripts/supplier/app/controllers/modals/change-list-table.js.coffee deleted file mode 100644 index d6e046b3..00000000 --- a/app/assets/javascripts/supplier/app/controllers/modals/change-list-table.js.coffee +++ /dev/null @@ -1,9 +0,0 @@ -App.modals.ChangeListTableController = @App.modals.BaseController.extend - list_moving: false - sections: Ember.computed -> @store.peekAll('section') - actions: - moveToTable: (table)-> - @set 'list_moving', true - Ember.$.post Routes.change_table_suppliers_list_path(@get('model.id')), {table_id: table.id}, (response)=> - #@set "model.table", table - @send 'close' diff --git a/app/assets/javascripts/supplier/app/controllers/modals/close_list_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/modals/close_list_controller.js.coffee deleted file mode 100644 index 04ae97c4..00000000 --- a/app/assets/javascripts/supplier/app/controllers/modals/close_list_controller.js.coffee +++ /dev/null @@ -1,8 +0,0 @@ -App.modals.CloseListController = App.modals.BaseController.extend - title_path: 'list.close.modal.title' - actions: - confirm: -> - @get('model').invoke 'close' - #model = @get('model') - #if model.then then model.then((l) -> l.close()) else model.close() - @send 'closeModal' diff --git a/app/assets/javascripts/supplier/app/controllers/modals/confirm.js.coffee b/app/assets/javascripts/supplier/app/controllers/modals/confirm.js.coffee deleted file mode 100644 index 5afd0c16..00000000 --- a/app/assets/javascripts/supplier/app/controllers/modals/confirm.js.coffee +++ /dev/null @@ -1,2 +0,0 @@ -App.modals.ConfirmController = App.modals.BaseController.extend - title_path: 'confirm.title' diff --git a/app/assets/javascripts/supplier/app/controllers/modals/employee_edit.js.coffee b/app/assets/javascripts/supplier/app/controllers/modals/employee_edit.js.coffee deleted file mode 100644 index 8b4addda..00000000 --- a/app/assets/javascripts/supplier/app/controllers/modals/employee_edit.js.coffee +++ /dev/null @@ -1,23 +0,0 @@ -App.modals.EmployeeEditController = App.modals.BaseController.extend - isNotSelf: (-> - @get('model.id') isnt @get('globals.current_employee.id') - ).property('model.id') - - colors: (-> - # taken from http://www.somacon.com/p142.php - [ - '#458B74' - '#838B8B' - '#8B7D6B' - '#00008B' - '#8B2323' - '#8A2BE2' - '#458B00' - '#EEAD0E' - '#FF1493' - '#8B0A50' - ] - ).property() - actions: - setColor: (color)-> - @set 'model.color', color diff --git a/app/assets/javascripts/supplier/app/controllers/modals/product_category_edit_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/modals/product_category_edit_controller.js.coffee deleted file mode 100644 index 33a63b5d..00000000 --- a/app/assets/javascripts/supplier/app/controllers/modals/product_category_edit_controller.js.coffee +++ /dev/null @@ -1,2 +0,0 @@ -App.modals.ProductCategoryEditController = App.modals.BaseController.extend - title_path: 'product_category.modal.edit.title' diff --git a/app/assets/javascripts/supplier/app/controllers/modals/product_category_move_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/modals/product_category_move_controller.js.coffee deleted file mode 100644 index 9e34c769..00000000 --- a/app/assets/javascripts/supplier/app/controllers/modals/product_category_move_controller.js.coffee +++ /dev/null @@ -1,31 +0,0 @@ -App.modals.ProductCategoryMoveController = App.modals.BaseController.extend - title_path: 'product_category.modal.move.title' - actions: - moveBelow: (below_product_category)-> - position = 0 - unless below_product_category - @set 'model.position', position - @get('model').save() - position += 1 - for product_category in @get('product_categories') - product_category.set('position', position) - product_category.save() - if below_product_category and product_category.id is below_product_category.id - @set 'model.position', position += 1 - @get('model').save() - position += 1 - - @send 'close' - - product_categories: (-> - # do not return self, since place below should not include self option - @store.peekAll('product_category').rejectBy('id', @get('model.id')).sortBy('position') - ).property('model.id') - - sortableUpdate: (ids)-> - products = @get('model.products') - ids.forEach (id, i)-> - if product = products.findProperty('id', id) - #TODO: raise in frontend if product.get('isDirty'). Cannot modify position of product containing non persisted change - product.set('position', i) - product.save() if product.get('hasDirtyAttributes') diff --git a/app/assets/javascripts/supplier/app/controllers/modals/product_category_new_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/modals/product_category_new_controller.js.coffee deleted file mode 100644 index d5f9cb1b..00000000 --- a/app/assets/javascripts/supplier/app/controllers/modals/product_category_new_controller.js.coffee +++ /dev/null @@ -1,2 +0,0 @@ -App.modals.ProductCategoryNewController = App.modals.BaseController.extend - title_path: 'product_category.modal.new.title' diff --git a/app/assets/javascripts/supplier/app/controllers/modals/section_add_tables_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/modals/section_add_tables_controller.js.coffee deleted file mode 100644 index 2c6c4912..00000000 --- a/app/assets/javascripts/supplier/app/controllers/modals/section_add_tables_controller.js.coffee +++ /dev/null @@ -1,27 +0,0 @@ -App.modals.SectionAddTablesController = App.modals.BaseController.extend - number_start: 100 - number_end: 100 - title_path: 'section.add_tables.modal.title' - #number_start: Ember.computed - #get: -> - #@_super() || 100 - #set: (key, value)-> - #@set 'number_end', value if value - #@_super() - actions: - addTables: -> - s = parseInt(@get('number_start')) - return @set('alert_message', t('section.add_tables.modal.invalid_start_number')) unless isFinite(s) - e = parseInt(@get('number_end')) - return @set('alert_message', t('section.add_tables.modal.invalid_end_number')) unless isFinite(e) - if e < s - @set 'number_start', e - @set 'number_end', s - s = @get('number_start') - e = @get('number_end') - number_of_tables = 1 + e - s - return @set('alert_message', t('section.add_tables.modal.too_many', count: number_of_tables)) if number_of_tables > 10 - for number in [s..e] - @store.createRecord 'table', number: number, section: @get('model') - - @send 'close' diff --git a/app/assets/javascripts/supplier/app/controllers/modals/section_area.js.coffee b/app/assets/javascripts/supplier/app/controllers/modals/section_area.js.coffee deleted file mode 100644 index e4f1929e..00000000 --- a/app/assets/javascripts/supplier/app/controllers/modals/section_area.js.coffee +++ /dev/null @@ -1,20 +0,0 @@ -App.modals.SectionAreaController = App.modals.BaseController.extend - colors: (-> - # taken from http://www.somacon.com/p142.php - [ - '#AAAAAA' - '#458B74' - '#838B8B' - '#8B7D6B' - '#00008B' - '#8B2323' - '#8A2BE2' - '#458B00' - '#EEAD0E' - '#FF1493' - '#8B0A50' - ] - ).property() - actions: - setColor: (color)-> - @set 'model.color', color diff --git a/app/assets/javascripts/supplier/app/controllers/modals/section_arrange_tables_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/modals/section_arrange_tables_controller.js.coffee deleted file mode 100644 index 0a5700c6..00000000 --- a/app/assets/javascripts/supplier/app/controllers/modals/section_arrange_tables_controller.js.coffee +++ /dev/null @@ -1,51 +0,0 @@ -App.modals.SectionArrangeTablesController = App.modals.BaseController.extend - title_path: 'section.arrange_tables.modal.title' - arrange_type: 'distributed' # can be distributed, by_row or by_column - row_count: 2 - column_count: 2 - alert_message: '' - #isDistributed: ~> @arrange_type is 'distributed' - #isByRow: ~> @arrange_type is 'by_row' - #isByColumn: ~> @arrange_type is 'by_column' - isDistributed: (->@get('arrange_type') is 'distributed').property('arrange_type') - isByRow: (->@get('arrange_type') is 'by_row').property('arrange_type') - isByColumn: (->@get('arrange_type') is 'by_column').property('arrange_type') - canArrangeTables: (-> - unless parseFloat(@get('model.width')) > 0 and parseFloat(@get('model.height')) > 0 - @set 'alert_message', t('section.arrange_tables.modal.cannot_arrange') - return false - @set 'alert_message', '' - true - ).property('model.width', 'model.height') - actions: - arrangeTables: -> - return unless @isValid() - switch @get('arrange_type') - when 'by_row' - @get('model').invoke 'arrange_tables_in_rows_of', parseInt(@get('row_count')) - when 'by_column' - @get('model').invoke 'arrange_tables_in_columns_of', parseInt(@get('column_count')) - else - @get('model').invoke 'arrange_tables_in_grid' - @send 'close' - - makeDistributed: -> - @set 'arrange_type', 'distributed' - @set 'alert_message', '' - makeByRow: -> - @set 'arrange_type', 'by_row' - @set 'alert_message', '' - makeByColumn: -> - @set 'arrange_type', 'by_column' - @set 'alert_message', '' - isValid: -> - switch @get('arrange_type') - when 'by_row' - if parseInt(@get('row_count')) < 1 - @set 'alert_message', "Must at least be 1" - return false - when 'by_column' - if parseInt(@get('column_count')) < 1 - @set 'alert_message', "Must at least be 1" - return false - true diff --git a/app/assets/javascripts/supplier/app/controllers/modals/select_employee_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/modals/select_employee_controller.js.coffee deleted file mode 100644 index 88809706..00000000 --- a/app/assets/javascripts/supplier/app/controllers/modals/select_employee_controller.js.coffee +++ /dev/null @@ -1,9 +0,0 @@ -App.modals.SelectEmployeeController = App.modals.BaseController.extend - employee: null - title_path: 'employee.select_modal.title' - employees: (-> @get('all_employees').filterBy('active') ).property('all_employees.@each.active') - all_employees: (-> @store.peekAll('employee')).property() - actions: - selectEmployee: (employee)-> - @set 'employee', employee - @send 'ok' diff --git a/app/assets/javascripts/supplier/app/controllers/modals/table_edit_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/modals/table_edit_controller.js.coffee deleted file mode 100644 index f8febba2..00000000 --- a/app/assets/javascripts/supplier/app/controllers/modals/table_edit_controller.js.coffee +++ /dev/null @@ -1,7 +0,0 @@ -App.modals.TableEditController = App.modals.BaseController.extend - title_path: 'table.modal.title' - sections: (-> @store.peekAll('section')).property() - #setSelectedSection: (-> @set 'selectedSection', @get('model.section')).on('init') - actions: - saveTable: -> - @send 'save' diff --git a/app/assets/javascripts/supplier/app/controllers/my-schedule.js.coffee b/app/assets/javascripts/supplier/app/controllers/my-schedule.js.coffee deleted file mode 100644 index bb3423e9..00000000 --- a/app/assets/javascripts/supplier/app/controllers/my-schedule.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -#App.MyScheduleController = Ember.Controller.extend -# actions: -# debugger: -> debugger diff --git a/app/assets/javascripts/supplier/app/controllers/orders-display.js.coffee b/app/assets/javascripts/supplier/app/controllers/orders-display.js.coffee deleted file mode 100644 index a006281d..00000000 --- a/app/assets/javascripts/supplier/app/controllers/orders-display.js.coffee +++ /dev/null @@ -1,6 +0,0 @@ -App.OrdersDisplayController = Ember.Controller.extend - sections: Ember.computed -> @store.peekAll('section') - orders: Ember.computed 'model.[]', 'globals.active_section.id', -> - orders = @get('model').filterBy('needs_supplier_attention') - orders = orders.filterBy('list.table.section.id', id) if id = @get('globals.active_section.id') - orders.sortBy('created_at') # Not reversed, oldest on top, start with oldest order first :-) Customer happyness diff --git a/app/assets/javascripts/supplier/app/controllers/schedule_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/schedule_controller.js.coffee deleted file mode 100644 index 4248f3f8..00000000 --- a/app/assets/javascripts/supplier/app/controllers/schedule_controller.js.coffee +++ /dev/null @@ -1,14 +0,0 @@ -#App.ScheduleController = Ember.Controller.extend -# event_changed: (event)-> -# @store.findRecord('employee-shift', event.id).then (employee_shift)-> -# employee_shift.set 'start_from', event.start -# employee_shift.set 'end_on', event.end -# employee_shift.save() -# editEvent: (id, callbacks)-> -# if employee_shift = @store.peekRecord('employee-shift', id) -# @modal 'employee_shift', -# title_path: 'employee_shift.modal.title' -# destroy_text_path: 'employee_shift.modal.destroy_confirmation' -# model: employee_shift -# save: -> callbacks.save.call(@, employee_shift) if callbacks.save -# destroy_callback: -> callbacks.destroy.call(@, employee_shift) if callbacks.destroy diff --git a/app/assets/javascripts/supplier/app/controllers/section.js.coffee b/app/assets/javascripts/supplier/app/controllers/section.js.coffee deleted file mode 100644 index 6b20d8e9..00000000 --- a/app/assets/javascripts/supplier/app/controllers/section.js.coffee +++ /dev/null @@ -1,49 +0,0 @@ -App.SectionController = Ember.Controller.extend - #needs: ['application', 'sections', 'section'] #wtf? section, otherwise an Ember error - actions: - makeEditable: -> - @set('model.editmode', true) - false - finishEditable: -> - @set('model.editmode', false) - @get('model').save() - @get('model.tables').filterBy('hasDirtyAttributes').invoke 'save' - @get('model.section_elements').filterBy('hasDirtyAttributes').invoke 'save' - @get('model.section_areas').filterBy('hasDirtyAttributes').invoke 'save' - rollbackEditable: -> - @get('model').rollbackAttributes() - tables = @get('model.tables') - tables.filterBy('isNew').invoke 'unloadRecord' - tables.rejectBy('isNew').invoke 'rollbackAttributes' - - section_elements = @get('model.section_elements') - section_elements.filterBy('isNew').invoke 'unloadRecord' - section_elements.rejectBy('isNew').invoke 'rollbackAttributes' - - section_areas = @get('model.section_areas') - section_areas.filterBy('isNew').invoke 'unloadRecord' - section_areas.rejectBy('isNew').invoke 'rollbackAttributes' - @set('model.editmode', false) - addSection: -> @modal 'add_section', model: @get('model') - addTables: -> @modal 'section_add_tables', model: @get('model') - arrangeTables: -> @modal 'section_arrange_tables', model: @get('model') - destroySection: -> - @modal 'confirm', - title_path: 'helpers.links.are_you_sure' - ok: => - @get('model').destroyRecord() - @transitionToRoute 'sections' - addSectionElement: -> - @modal 'add_section_element', model: @get('model') - addSectionArea: -> - section_area = @store.createRecord('section-area') - section_area.set 'section', @get('model') - #@set 'model.editmode', true - @modal 'section_area', - title_path: 'section_area.add_button' - model: section_area - textures: ['wood1', 'wood2'] - - #sections: (-> @get('controllers.sections.model')).property('controllers.sections.model') - sections_controller: Ember.inject.controller('sections') - sections: Ember.computed.alias 'sections_controller.model' diff --git a/app/assets/javascripts/supplier/app/controllers/sections_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/sections_controller.js.coffee deleted file mode 100644 index cfdfcee4..00000000 --- a/app/assets/javascripts/supplier/app/controllers/sections_controller.js.coffee +++ /dev/null @@ -1 +0,0 @@ -App.SectionsController = Ember.Controller.extend {} diff --git a/app/assets/javascripts/supplier/app/controllers/sections_index_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/sections_index_controller.js.coffee deleted file mode 100644 index d6a09a01..00000000 --- a/app/assets/javascripts/supplier/app/controllers/sections_index_controller.js.coffee +++ /dev/null @@ -1,11 +0,0 @@ -App.SectionsIndexController = Ember.Controller.extend - #needs: ['application', 'sections', 'index'] - #sections: Ember.computed.alias 'controllers.sections.model' - sections_controller: Ember.inject.controller('sections') - sections: Ember.computed.alias 'sections_controller.model' - newPath: Routes.new_suppliers_section_path() - actions: - addSection: -> @modal 'add_section', model: @get('model') - goToSection: (section)-> - @set 'globals.active_section', section - @transitionToRoute 'section', section.id diff --git a/app/assets/javascripts/supplier/app/controllers/settings_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/settings_controller.js.coffee deleted file mode 100644 index dfacf37f..00000000 --- a/app/assets/javascripts/supplier/app/controllers/settings_controller.js.coffee +++ /dev/null @@ -1,14 +0,0 @@ -App.SettingsController = Ember.Controller.extend - #supplier: Ember.computed.alias 'globals.current_supplier' - time_zones: (-> window.time_zones ).property() - countries: (-> window.countries.map (el)-> el.name ).property() - saving: false - editIensProfile: Ember.computed 'globals.current_supplier.country', -> - @get('globals.current_supplier.country') is 'Netherlands' - actions: - saveSettings: -> - @set 'saving', true - @get('globals.current_supplier').save().then (supplier) => - @set 'saving', false - #$('.top-menu .supplier-name').text @get('globals.current_supplier.name') - @transitionToRoute 'index' diff --git a/app/assets/javascripts/supplier/app/controllers/table_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/table_controller.js.coffee deleted file mode 100644 index 11407997..00000000 --- a/app/assets/javascripts/supplier/app/controllers/table_controller.js.coffee +++ /dev/null @@ -1,2 +0,0 @@ -App.TableController = Ember.Controller.extend - table: (-> @get('model')).property('model') diff --git a/app/assets/javascripts/supplier/app/controllers/tables_index_controller.js.coffee b/app/assets/javascripts/supplier/app/controllers/tables_index_controller.js.coffee deleted file mode 100644 index a3fa7147..00000000 --- a/app/assets/javascripts/supplier/app/controllers/tables_index_controller.js.coffee +++ /dev/null @@ -1,13 +0,0 @@ -App.TablesIndexController = Ember.Controller.extend - tables: (-> @get('model').sortBy('casted_number')).property('model.@each.number') - actions: - newTable: -> - section = @get('globals.active_section') || @store.peekAll('section').toArray()[0] - table = @store.createRecord('table', section: section) - @modal 'table_edit', - model: table - close: -> table.deleteRecord() - destroyTable: (table)-> - @modal 'confirm', - title: t('table.destroy.modal.title', number: table.get('number')) - ok: -> table.destroyRecord() diff --git a/app/assets/javascripts/supplier/app/helpers/can.js.coffee b/app/assets/javascripts/supplier/app/helpers/can.js.coffee deleted file mode 100644 index 2e596d2e..00000000 --- a/app/assets/javascripts/supplier/app/helpers/can.js.coffee +++ /dev/null @@ -1,7 +0,0 @@ -App.CanHelper = Ember.Helper.extend - compute: (params, options)-> - [permission, resource] = params - if employee = App.__container__.lookup('global:variables').get('current_employee') - permission is "read" or (permission is "manage" and employee.isManager()) - else - false diff --git a/app/assets/javascripts/supplier/app/helpers/colorbox.js.coffee b/app/assets/javascripts/supplier/app/helpers/colorbox.js.coffee deleted file mode 100644 index 2b4e8086..00000000 --- a/app/assets/javascripts/supplier/app/helpers/colorbox.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -App.ColorboxHelper = Ember.Helper.helper (params, options)-> - color = params[0] - "".htmlSafe() diff --git a/app/assets/javascripts/supplier/app/helpers/dimension.js.coffee b/app/assets/javascripts/supplier/app/helpers/dimension.js.coffee deleted file mode 100644 index 0b8b48e0..00000000 --- a/app/assets/javascripts/supplier/app/helpers/dimension.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -App.DimensionHelper = Ember.Helper.helper (params, options)-> - value = params[0] - "#{value}m".htmlSafe() diff --git a/app/assets/javascripts/supplier/app/helpers/dimensions.js.coffee b/app/assets/javascripts/supplier/app/helpers/dimensions.js.coffee deleted file mode 100644 index 1a34d69d..00000000 --- a/app/assets/javascripts/supplier/app/helpers/dimensions.js.coffee +++ /dev/null @@ -1,7 +0,0 @@ -App.DimensionsHelper = Ember.Helper.helper ([width, height], options)-> - unit = options.unit || 'm' - width ||= 0 - height ||= 0 - width = " #{width}" if width < 10 - height = " #{height}" if height < 10 - "#{width} x #{height} #{unit}".htmlSafe() diff --git a/app/assets/javascripts/supplier/app/helpers/distribute_lattice.js.coffee b/app/assets/javascripts/supplier/app/helpers/distribute_lattice.js.coffee deleted file mode 100644 index 49b1f5b0..00000000 --- a/app/assets/javascripts/supplier/app/helpers/distribute_lattice.js.coffee +++ /dev/null @@ -1,36 +0,0 @@ -class Distribution - ## - # Distribute a section of width w and height h in a length and a width scale - # that makes n tables fit. - # distribute_lattice 10, 10, 3 #=> [5.0, 5.0] - # distribute_lattice 10, 10, 4 #=> [5.0, 5.0] - ## - distribute_lattice: (w, h, n)-> - epsilon = 1e-10 - w = parseFloat(w) - h = parseFloat(h) - n = parseInt(n) - area = w*h - l = Math.sqrt(area/n) - nx = w/l - ny = h/l - while Math.floor(w/l + epsilon) * Math.floor(h/l + epsilon) < n - tx = w/l - ty = h/l - # The biggest remainder is closest to a fitting option - # Just add one if no remainder wins and it still is not enough - if (tx % 1) < epsilon and (ty % 1) < epsilon - # Both divide, but there is no solution yet. Just add one - l = Math.max(Math.round(w/(tx + 1)), Math.round(h/(ty + 1))) - nx = Math.ceil(tx) - ny = Math.ceil(ny) - else if (tx % 1) > (ty % 1) - nx = Math.ceil(tx) - ny = Math.ceil(n/nx) - l = w/nx - else - ny = Math.ceil(ty) - nx = Math.ceil(n/ny) - l = h/ny - [w/nx, h/ny] -App.Distribution = new Distribution() diff --git a/app/assets/javascripts/supplier/app/helpers/errors.js.coffee b/app/assets/javascripts/supplier/app/helpers/errors.js.coffee deleted file mode 100644 index 9808a5c3..00000000 --- a/app/assets/javascripts/supplier/app/helpers/errors.js.coffee +++ /dev/null @@ -1,16 +0,0 @@ -App.ErrorsHelper = Ember.Helper.helper (params, options)-> - errors = params[0] - return "" unless errors and errors.length - result = "" - model_name = options.includeAttribute - for error in errors - if typeof error is "string" - message = error - else - if model_name - attribute = ttry("attributes.#{model_name}.#{error.attribute}") - message = "#{attribute} #{error.message}" - else - message = error.message - result += "
#{message}
" - result.htmlSafe() diff --git a/app/assets/javascripts/supplier/app/helpers/flag.js.coffee b/app/assets/javascripts/supplier/app/helpers/flag.js.coffee deleted file mode 100644 index 71937bb1..00000000 --- a/app/assets/javascripts/supplier/app/helpers/flag.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -App.FlagHelper = Ember.Helper.helper (params, options)-> - locale = params[0] - "".htmlSafe() diff --git a/app/assets/javascripts/supplier/app/helpers/gravatar-image.js.coffee b/app/assets/javascripts/supplier/app/helpers/gravatar-image.js.coffee deleted file mode 100644 index 8d31ae9c..00000000 --- a/app/assets/javascripts/supplier/app/helpers/gravatar-image.js.coffee +++ /dev/null @@ -1,6 +0,0 @@ -App.GravatarImageHelper = Ember.Helper.helper (params, options)-> - email = params[0] - size = options.size || 48 - gravatar_hash = md5(String(email).trim().toLowerCase()) - "".htmlSafe() - diff --git a/app/assets/javascripts/supplier/app/helpers/is-equal.js.coffee b/app/assets/javascripts/supplier/app/helpers/is-equal.js.coffee deleted file mode 100644 index 9e364dd6..00000000 --- a/app/assets/javascripts/supplier/app/helpers/is-equal.js.coffee +++ /dev/null @@ -1,2 +0,0 @@ -App.IsEqualHelper = Ember.Helper.helper ([lhs, rhs])-> - lhs is rhs diff --git a/app/assets/javascripts/supplier/app/helpers/is-not.js.coffee b/app/assets/javascripts/supplier/app/helpers/is-not.js.coffee deleted file mode 100644 index ff12ae1d..00000000 --- a/app/assets/javascripts/supplier/app/helpers/is-not.js.coffee +++ /dev/null @@ -1,2 +0,0 @@ -App.IsNotHelper = Ember.Helper.helper ([value])-> - return !value diff --git a/app/assets/javascripts/supplier/app/helpers/momentTransform.js.coffee b/app/assets/javascripts/supplier/app/helpers/momentTransform.js.coffee deleted file mode 100644 index 526a5ffb..00000000 --- a/app/assets/javascripts/supplier/app/helpers/momentTransform.js.coffee +++ /dev/null @@ -1,13 +0,0 @@ -## Used to be able to use DS.attr('moment') -App.MomentTransform = DS.Transform.extend - deserialize: (serialized)-> - return serialized unless serialized - m = moment(serialized) - m._ambigTime = true if serialized.length < 11 - m - - serialize: (deserialized)-> - return deserialized unless deserialized - deserialized = moment(deserialized) unless moment.isMoment(deserialized) - return deserialized.format('YYYY-MM-DD') if deserialized._ambigTime # dates do not flip time zone!!!!!!! - deserialized.toISOString() diff --git a/app/assets/javascripts/supplier/app/helpers/page-body.js.coffee b/app/assets/javascripts/supplier/app/helpers/page-body.js.coffee deleted file mode 100644 index b43fd090..00000000 --- a/app/assets/javascripts/supplier/app/helpers/page-body.js.coffee +++ /dev/null @@ -1,4 +0,0 @@ -#Ember.Handlebars.registerHelper 'page-body-helper', (resource, params..., options)-> -# body = @get resource -# template = Ember.Handlebars.compile('body') -# body.htmlSafe() diff --git a/app/assets/javascripts/supplier/app/helpers/read-path.js.coffee b/app/assets/javascripts/supplier/app/helpers/read-path.js.coffee deleted file mode 100644 index 6191c1b4..00000000 --- a/app/assets/javascripts/supplier/app/helpers/read-path.js.coffee +++ /dev/null @@ -1,2 +0,0 @@ -App.ReadPathHelper = Ember.Helper.helper ([object, path])-> - Ember.get(object, path) diff --git a/app/assets/javascripts/supplier/app/helpers/route_helper.js.coffee b/app/assets/javascripts/supplier/app/helpers/route_helper.js.coffee deleted file mode 100644 index 7099a08f..00000000 --- a/app/assets/javascripts/supplier/app/helpers/route_helper.js.coffee +++ /dev/null @@ -1,8 +0,0 @@ -#Ember.Handlebars.registerHelper 'route', (route_name, params..., options)-> -# opts = options.hash -# if scope = @get('content') -# params = params.map (a) -> scope.get(a) -# for k,v of opts -# opts[k] = scope.get(v) if typeof(v) == 'string' && scope.get(v) -# route = if params.length then Routes[route_name].call(this, params, opts) else Routes[route_name].call(this, opts) -# new Handlebars.SafeString route diff --git a/app/assets/javascripts/supplier/app/helpers/route_link_helper.js.coffee b/app/assets/javascripts/supplier/app/helpers/route_link_helper.js.coffee deleted file mode 100644 index f8bc5eec..00000000 --- a/app/assets/javascripts/supplier/app/helpers/route_link_helper.js.coffee +++ /dev/null @@ -1,12 +0,0 @@ -#Ember.Handlebars.registerHelper 'path', (route, params..., options)-> -# route_method = Routes["#{route}_path"] -# throw "Route #{route} cannout be found" unless route_method -# -# mapped_options = {} -# -# for k, v of options.hash -# mapped_options[k] = Ember.Handlebars.get(this, v, options) || v -# params.push mapped_options -# -# path = route_method.apply(this, params) -# new Handlebars.SafeString("href='#{path}'") diff --git a/app/assets/javascripts/supplier/app/helpers/select-hour.js.coffee b/app/assets/javascripts/supplier/app/helpers/select-hour.js.coffee deleted file mode 100644 index 805db014..00000000 --- a/app/assets/javascripts/supplier/app/helpers/select-hour.js.coffee +++ /dev/null @@ -1,5 +0,0 @@ -#Ember.Handlebars.helper 'select-hour', (params..., options)-> -# result = "" -# new Handlebars.SafeString result diff --git a/app/assets/javascripts/supplier/app/helpers/select-minute.js.coffee b/app/assets/javascripts/supplier/app/helpers/select-minute.js.coffee deleted file mode 100644 index 15e04910..00000000 --- a/app/assets/javascripts/supplier/app/helpers/select-minute.js.coffee +++ /dev/null @@ -1,5 +0,0 @@ -#Ember.Handlebars.helper 'select-minute', (params..., options)-> -# result = "" -# new Handlebars.SafeString result diff --git a/app/assets/javascripts/supplier/app/helpers/svg.js.coffee b/app/assets/javascripts/supplier/app/helpers/svg.js.coffee deleted file mode 100644 index 0896e991..00000000 --- a/app/assets/javascripts/supplier/app/helpers/svg.js.coffee +++ /dev/null @@ -1,9 +0,0 @@ -App.SvgHelper = Ember.Helper.helper (params, options)-> - content = params[0] - width = options.width - height = options.height - angle = options.rotation || 0 - box_size = Math.sqrt((width * width) + (height * height)) - svg_head = "" - group_head = "" - "#{svg_head}#{group_head}#{content}".htmlSafe() diff --git a/app/assets/javascripts/supplier/app/helpers/table-number.js.coffee b/app/assets/javascripts/supplier/app/helpers/table-number.js.coffee deleted file mode 100644 index e078fd7b..00000000 --- a/app/assets/javascripts/supplier/app/helpers/table-number.js.coffee +++ /dev/null @@ -1,4 +0,0 @@ -App.TableNumberHelper = Ember.Helper.helper (params, options)-> - table_number = params[0] - return '' unless table_number - "# #{table_number}".htmlSafe() diff --git a/app/assets/javascripts/supplier/app/initializers/globals.js.coffee b/app/assets/javascripts/supplier/app/initializers/globals.js.coffee deleted file mode 100644 index b26e3333..00000000 --- a/app/assets/javascripts/supplier/app/initializers/globals.js.coffee +++ /dev/null @@ -1,20 +0,0 @@ -Globals = Ember.Object.extend - current_employee: null - current_supplier: null - isDragging: false - active_section: null - flash_message: '' - modal_active: false - locale: Qstorage.getItem('locale') -App.initializer - name: 'injectCurrent' - initialize: (container, app)-> - #container.optionsForType 'globals', instantiate: false, singleton: true - app.register 'global:variables', Globals, singleton: true - - app.inject 'controller', 'globals', 'global:variables' - app.inject 'component', 'globals', 'global:variables' - app.inject 'view', 'globals', 'global:variables' - app.inject 'route', 'globals', 'global:variables' - - app.inject 'component', 'store', 'service:store' diff --git a/app/assets/javascripts/supplier/app/mixins/drag_n_drop.js.coffee b/app/assets/javascripts/supplier/app/mixins/drag_n_drop.js.coffee deleted file mode 100644 index 0153a60c..00000000 --- a/app/assets/javascripts/supplier/app/mixins/drag_n_drop.js.coffee +++ /dev/null @@ -1,116 +0,0 @@ -# on why local storage is used in the enter events -# http://stackoverflow.com/questions/8762635/getting-the-filename-during-the-dragenter-event -DragNDrop = Ember.Namespace.create - cancel: (e)-> - e.preventDefault() - false - nothing: -> - -DragNDrop.Draggable = Ember.Mixin.create - attributeBindings: 'draggable' - draggable: 'true' - dragStart: (ev)-> - @set 'isDragging', true - @set 'globals.isDragging', true - localStorage.setItem('draggingView', @get('elementId')) - dataTransfer = ev.originalEvent.dataTransfer - #dataTransfer.setData 'Text', @get('elementId') - offset = $(ev.target).offset() - dataTransfer.setData 'application/json', JSON.stringify - id: @get('elementId') - elementX: (ev.originalEvent.offsetX || ev.originalEvent.clientX) - offset.left - elementY: (ev.originalEvent.offsetY || ev.originalEvent.clientY) - offset.top - pageX: ev.originalEvent.pageX - pageY: ev.originalEvent.pageY - dragEnd: (e)-> - @set 'isDragging', false - @set 'globals.isDragging', false - localStorage.removeItem 'draggingView' if localStorage.getItem 'draggingView' - touchStart: (ev)-> - ev.preventDefault() - target = @$() - touch = ev.originalEvent.changedTouches[0] - @touchStartEvent = - left: parseFloat(target.css('left')) - top: parseFloat(target.css('top')) - pageX: touch.pageX - pageY: touch.pageY - return unless target.prop 'draggable' - - touchMove: (ev)-> - ev.preventDefault() - target = @$() - return unless target.prop 'draggable' - if ev.originalEvent.changedTouches.length is 1 - touch = ev.originalEvent.changedTouches[0] - target.css - left: "#{@touchStartEvent.left + touch.pageX - @touchStartEvent.pageX}px" - top: "#{@touchStartEvent.top + touch.pageY - @touchStartEvent.pageY}px" - touchEnd: (ev)-> - ev.preventDefault() - touch = ev.originalEvent.changedTouches[0] - if Math.abs(@touchStartEvent.pageX - touch.pageX) < 2 and Math.abs(@touchStartEvent.pageY - touch.pageY) < 2 - # The preventDefaults are preventing the click action to fire, therefore we trigger it ourselves - # But do not trigger when a handle insed the element is clicked - #NOTE: I think that $(ev.target).click() will work for all cases, makes the code simpler, - # but no time to test that now. Tested mostly on section elements, since they are draggable, clickable - # and have subclickable buttons - unless $(ev.target).parents('.handles-inside-draggable') or $(ev.target).hasClass('handles-inside-draggable') - @click() if @click - else - $(ev.target).click() - - @touchStartEvent = null - this -DragNDrop.Droppable = Ember.Mixin.create - dragEnter: (e)-> - if @dragEntered - # e.preventDefault() - viewId = localStorage.getItem 'draggingView' - view = Ember.View.views[viewId] - @dragEntered view - # else - # DragNDrop.cancel(e) - dragOver: DragNDrop.cancel # don't know why, but crucial for the current way of working with section tables - # dragOver: (e)->(e.preventDefault(); false) - touchEnd: (ev)-> - ev.preventDefault() - view = ev.result - return unless view._parentView - target = view.$() - return unless target.prop 'draggable' - newX = parseFloat(target.css('left')) - newY = parseFloat(target.css('top')) - return unless newX? and newY? - position = - left: newX - top: newY - @dropped view, position if @dropped - this - dragLeave: -> - if @dragLeft - @dragLeft() - drop: (ev)-> - # e.preventDefault() - data = JSON.parse(ev.originalEvent.dataTransfer.getData('application/json')) - #debugger - viewRegistry = App.__container__.lookup("-view-registry:main") || Ember.View.views - #view = Ember.View.views[data.id] - return unless viewRegistry and view = viewRegistry[data.id] - view.dragEnd(ev) if view.dragEnd # not triggered on its own on drop - - # Calculate the element's center drop position relative to container - el = $(view.get('element')) - offset = el.offset() - parentOffset = el.offsetParent().offset() - newX = offset.left - parentOffset.left + ev.originalEvent.pageX - data.pageX - newY = offset.top - parentOffset.top + ev.originalEvent.pageY - data.pageY - position = - left: newX - top: newY - - @dropped view, position if @dropped - @dragLeft() if @dragLeft # not triggered by system itself in case of drop - false - -@DragNDrop = DragNDrop diff --git a/app/assets/javascripts/supplier/app/mixins/employee-actions-mixin.js.coffee b/app/assets/javascripts/supplier/app/mixins/employee-actions-mixin.js.coffee deleted file mode 100644 index de69114d..00000000 --- a/app/assets/javascripts/supplier/app/mixins/employee-actions-mixin.js.coffee +++ /dev/null @@ -1,22 +0,0 @@ -App.EmployeeActionsMixin = Ember.Mixin.create - actions: - newEmployee: -> - employee = @store.createRecord('employee') - @get('controller').modal 'employee_edit', - model: employee - title_path: 'employee.modal.new_title' - close: -> employee.deleteRecord() - editEmployee: (employee)-> - @get('controller').modal 'employee_edit', - model: employee - title_path: 'employee.modal.edit_title' - close: -> employee.rollbackAttributes() - destroyEmployee: (employee)-> - ac = @controllerFor('application') - if @get('globals.current_employee.id') isnt employee.id - ac.modal 'confirm', - title: t('employee.destroy.modal.title', employee.toJSON()) - ok: -> employee.destroyRecord() - else - ac.modal 'alert', - title: 'You cannot remove yourself' diff --git a/app/assets/javascripts/supplier/app/mixins/rotation.js.coffee b/app/assets/javascripts/supplier/app/mixins/rotation.js.coffee deleted file mode 100644 index ca60bab5..00000000 --- a/app/assets/javascripts/supplier/app/mixins/rotation.js.coffee +++ /dev/null @@ -1,9 +0,0 @@ -App.Rotation = Ember.Mixin.create - rotateLeft: -> - new_rotation = -90 + @get('rotation') - new_rotation += 360 if new_rotation < 0 - @set 'rotation', new_rotation - rotateRight: -> - new_rotation = 90 + @get('rotation') - new_rotation -= 360 if new_rotation >= 360 - @set 'rotation', new_rotation diff --git a/app/assets/javascripts/supplier/app/mixins/svg-element.js.coffee b/app/assets/javascripts/supplier/app/mixins/svg-element.js.coffee deleted file mode 100644 index 3c925c3c..00000000 --- a/app/assets/javascripts/supplier/app/mixins/svg-element.js.coffee +++ /dev/null @@ -1,26 +0,0 @@ -attr = DS.attr -App.SvgElementMixin = Ember.Mixin.create - name: attr 'string' - dpm: attr 'number' - box_width: attr 'number' - box_height: attr 'number' - svg: attr('string') - - width: Ember.computed 'dpm', 'box_width', -> - (@get('box_width') || 0 ) / (@get('dpm') || 1) - height: Ember.computed 'dpm', 'box_height', -> - (@get('box_height') || 0 ) / (@get('dpm') || 1) - - # Rotation box size in [m] - box_size: Ember.computed 'dpm', 'box_height', 'box_width', -> - bw = @get('box_width') - bh = @get('box_height') - dpm = @get('dpm') ? 1 - Math.sqrt( (bw * bw) + (bh * bh)) / dpm - - copy_values: (similar_object)-> - @set 'name', similar_object.get('name') - @set 'dpm', similar_object.get('dpm') - @set 'box_width', similar_object.get('box_width') - @set 'box_height', similar_object.get('box_height') - @set 'svg', similar_object.get('svg') diff --git a/app/assets/javascripts/supplier/app/models/employee-shift.coffee b/app/assets/javascripts/supplier/app/models/employee-shift.coffee deleted file mode 100644 index 70fa408b..00000000 --- a/app/assets/javascripts/supplier/app/models/employee-shift.coffee +++ /dev/null @@ -1,31 +0,0 @@ -attr = DS.attr -App.EmployeeShift = DS.Model.extend - start_from: attr('moment') - end_on: attr('moment') - description: attr('string') - employee: DS.belongsTo 'employee', async: false - supplier: DS.belongsTo 'supplier', async: false - calendar_event: Ember.computed 'start_from', 'end_on', 'title', 'employee.color', -> - id: @id - title: @get('title') - start: @get('start_from') - end: @get('end_on') - color: @get('employee.color') - - title: Ember.computed 'employee.name', 'description', -> - if @get('description') - [@get('employee.name'), @get('description')].join(' - ') - else - @get 'employee.name' - calendar_event_for_employee: (-> - id: @id - title: @get('title_for_employee') - start: @get('start_from') - end: @get('end_on') - color: @get('employee.color') - ).property('start_from', 'end_on', 'title_for_employee') - title_for_employee: Ember.computed 'supplier.name', 'description', -> - if @get('description') - [@get('supplier.name'), @get('description')].join(' - ') - else - @get 'supplier.name' diff --git a/app/assets/javascripts/supplier/app/models/employee.js.coffee b/app/assets/javascripts/supplier/app/models/employee.js.coffee deleted file mode 100644 index 877e1608..00000000 --- a/app/assets/javascripts/supplier/app/models/employee.js.coffee +++ /dev/null @@ -1,14 +0,0 @@ -attr = DS.attr -App.Employee= DS.Model.extend Ember.Validations.Mixin, - name: attr 'string' - email: attr 'string' - manager: attr 'boolean', defaultValue: false - active: attr 'boolean', defaultValue: true - color: attr 'string', defaultValue: '#3a87ad' - employee_shifts: DS.hasMany('employee-shift') - - isManager: -> @get('manager') - - validations: - name: {presence: true} - email: {format: /.+@.+\..{2,4}/} diff --git a/app/assets/javascripts/supplier/app/models/join_request.js.coffee b/app/assets/javascripts/supplier/app/models/join_request.js.coffee deleted file mode 100644 index 1f31d669..00000000 --- a/app/assets/javascripts/supplier/app/models/join_request.js.coffee +++ /dev/null @@ -1,4 +0,0 @@ -attr = DS.attr -App.JoinRequest= DS.Model.extend - list: DS.belongsTo('list') - user: DS.belongsTo('user') diff --git a/app/assets/javascripts/supplier/app/models/list.js.coffee b/app/assets/javascripts/supplier/app/models/list.js.coffee deleted file mode 100644 index b83794c8..00000000 --- a/app/assets/javascripts/supplier/app/models/list.js.coffee +++ /dev/null @@ -1,59 +0,0 @@ -attr = DS.attr -App.List = DS.Model.extend - state: attr 'string' - needs_help: attr 'boolean' - needs_payment: attr 'boolean' - user_requests_closing: attr('boolean') - # users: DS.hasMany('user', async: true) - is_paid: attr 'boolean' - price: attr 'number' - #has_active_orders: attr 'boolean' - - closed_at: DS.attr('date') - users: DS.hasMany('user', async: false) - #table_number: attr 'number' - table: DS.belongsTo('table', inverse: 'active_list', async: true) # should be async, but synchroneously loading now fails with JSONAPI, this seems to work - #users: DS.hasMany('user', inverse: 'active_list') - orders: DS.hasMany('order', async: false) - - # COMPUTED PROPERTIES - active: Ember.computed.equal 'state', 'active' - total: (-> - @get('relevant_orders').getEach('total').reduce(((sum, total) -> sum + total), 0) - ).property('relevant_orders.@each.total') - relevant_orders: (-> @get('orders').filter((o)->o.get('state') isnt 'cancelled')).property('orders.@each.state') - active_orders: (-> @get('orders').filter((o)->o.get('state') is 'placed' or o.get('state') is 'active')).property('orders.@each.state') - sorted_orders: (-> @get('relevant_orders').sortBy('created_at').reverseObjects()).property('relevant_orders.[]') - - has_active_orders: (-> - return false unless @get('state') == 'active' - !!@get('orders').filter( (order) -> order.get('state') is 'active' or order.get('state') is 'placed').length - ).property('state', 'orders.@each.state') - - isClosed: -> - @set('state', 'closed') - #@set 'has_active_orders', false - @set 'table', null - @isHelped() - @isPaid() - - # EVENTS - isHelped: -> - @set 'needs_help', false - isNeedingHelp: -> - @set 'needs_help', true - isNeedingPayment: -> - @set 'needs_payment', true - isPaid: -> - @set 'needs_payment', false - - # TRIGGERS - close: -> - @isClosed() - $.post Routes.close_suppliers_list_path(@id) - markHelped: -> - @isHelped() - $.post Routes.mark_helped_suppliers_list_path(@id) - remove_needs_payment: -> - @set 'needs_payment', false - $.post Routes.remove_needs_payment_suppliers_list_path(@id) diff --git a/app/assets/javascripts/supplier/app/models/order.js.coffee b/app/assets/javascripts/supplier/app/models/order.js.coffee deleted file mode 100644 index 4a5c4e27..00000000 --- a/app/assets/javascripts/supplier/app/models/order.js.coffee +++ /dev/null @@ -1,48 +0,0 @@ -attr = DS.attr -App.Order = DS.Model.extend - state: attr('string') - price: attr('number') - - list: DS.belongsTo('list', async: false) - section: DS.belongsTo('section', async: false) - product_orders: DS.hasMany('product_order', async: false) - user: DS.belongsTo 'user', async: false - - active: (-> @get('state') == 'active').property('state') - delivered: (-> @get('state') == 'delivered').property('state') - placed: (-> @get('state') == 'placed').property('state') - needs_supplier_attention: (-> (@get('state') is 'placed') or (@get('state') is 'active')).property('state') - - isClosed: -> - @set 'state', 'closed' - isCancelled: -> - @set 'state', 'cancelled' - isDelivered: -> - @set 'state', 'delivered' - isActive: -> - @set 'state', 'active' - mark_active: -> - #$.post('/supplier/mark_order_in_process', order_id: id) - Ember.$.post Routes.mark_in_process_suppliers_order_path @get('id') - @isActive() - mark_delivered: -> - Ember.$.post Routes.mark_delivered_suppliers_order_path @get('id') - @isDelivered() - mark_cancelled: -> - Ember.$.post Routes.cancel_suppliers_order_path @get('id') - @isCancelled() - total: (-> - @get('product_orders').getEach('total').reduce(((sum, total) -> sum + total), 0) - ).property('product_orders.@each.total') - - display: Ember.computed 'product_orders.@each.display', -> - @get('product_orders').map((po) -> po.get('display')).join(', ') - - display_with_table: (-> - table = t('models.table').toLowerCase() - "#{@get('display')} #{table} #{@get('list.table.table_number')}".htmlSafe() - ).property('display', 'list.table.table_number') - - display_tag: (-> - "#{@get('display')}".htmlSafe() - ).property('display', 'state') diff --git a/app/assets/javascripts/supplier/app/models/page.js.coffee b/app/assets/javascripts/supplier/app/models/page.js.coffee deleted file mode 100644 index 0c95e75b..00000000 --- a/app/assets/javascripts/supplier/app/models/page.js.coffee +++ /dev/null @@ -1,4 +0,0 @@ -attr = DS.attr -App.Page = DS.Model.extend - title: attr 'string' - body: attr 'string' diff --git a/app/assets/javascripts/supplier/app/models/product.js.coffee b/app/assets/javascripts/supplier/app/models/product.js.coffee deleted file mode 100644 index d7c4a9d1..00000000 --- a/app/assets/javascripts/supplier/app/models/product.js.coffee +++ /dev/null @@ -1,38 +0,0 @@ -attr = DS.attr -App.Product = DS.Model.extend Ember.Validations.Mixin, - name: attr 'string' - price: attr 'number', defaultValue: 0 - code: attr 'string' - description: attr 'string' - visible: attr('boolean', defaultValue: true) - active: attr('boolean', defaultValue: true) - position: attr('number', defaultValue: 0) - image: attr() - product_category: DS.belongsTo('product_category', async: false) - product_orders: DS.hasMany('product_order', async: false) - product_variants: DS.hasMany('product_variant', async: false) - - image_src: (-> - image = @get('image') - return "" unless image - return image.small if image.small and typeof(image.small) is "string" - image - ).property('image') - - sorted_product_variants: Ember.computed 'product_variants.@each.name', 'product_variants.@each.position', -> - @get('product_variants').sortBy('position') - - variantsDisplay: Ember.computed 'sorted_product_variants', -> - @get('sorted_product_variants').mapBy('name').join(', ') - - #isValid: (-> - #return false unless price = @get('price') - #return false unless "#{price}".match(/^[+-]?\d+(\.?\d?\d)?$/) - #true - #).property('price') - validations: - name: - presence: true - price: - format: - width: /^[+-]?\d*(\.?\d?\d)?$/ diff --git a/app/assets/javascripts/supplier/app/models/product_category.js.coffee b/app/assets/javascripts/supplier/app/models/product_category.js.coffee deleted file mode 100644 index 22878f26..00000000 --- a/app/assets/javascripts/supplier/app/models/product_category.js.coffee +++ /dev/null @@ -1,31 +0,0 @@ -attr = DS.attr -App.ProductCategory = DS.Model.extend Ember.Validations.Mixin, - name: attr('string') - active_on_sunday: attr('boolean', defaultValue: true) - active_on_monday: attr('boolean', defaultValue: true) - active_on_tuesday: attr('boolean', defaultValue: true) - active_on_wednesday: attr('boolean', defaultValue: true) - active_on_thursday: attr('boolean', defaultValue: true) - active_on_friday: attr('boolean', defaultValue: true) - active_on_saturday: attr('boolean', defaultValue: true) - full_day: attr 'boolean', defaultValue: true - start_from: attr('number') - end_on: attr('number') - position: attr('number') - - products: DS.hasMany('product', async: false) - supplier: DS.belongsTo 'supplier', async: false - - sorted_products: (-> @get('products').sortBy('position') ).property('products.@each.position') - - availability_text: Ember.computed 'active_on_sunday', 'active_on_monday', 'active_on_tuesday', 'active_on_wednesday', 'active_on_thursday', 'active_on_friday', 'active_on_saturday', 'full_day', 'start_from', 'end_on', -> - active_days = $days.filter (day)=>@get("active_on_#{day}") - result = "" - if active_days.length < 7 - result += "#{active_days.map((day) -> tspan("date.day_name.#{day}")).join(", ")} " - unless @get('full_day') - result += "#{day_minutes_to_time @get('start_from')} - #{day_minutes_to_time @get('end_on')}" - result.htmlSafe() - - validations: - name: {presence: true} diff --git a/app/assets/javascripts/supplier/app/models/product_order.js.coffee b/app/assets/javascripts/supplier/app/models/product_order.js.coffee deleted file mode 100644 index 0459d9b6..00000000 --- a/app/assets/javascripts/supplier/app/models/product_order.js.coffee +++ /dev/null @@ -1,16 +0,0 @@ -attr = DS.attr -App.ProductOrder = DS.Model.extend - quantity: attr 'number', defaultValue: 1 - price: attr 'number' - product_variant: attr('string') - product_name: attr('string') - product: DS.belongsTo('product', async: true) - order: DS.belongsTo('order', async: false) - increment: -> - @set('quantity', @get('quantity') + 1) - total: (-> @get('quantity') * @get('price')).property('quantity', 'price') - display: Ember.computed 'quantity', 'product_variant', 'product_name', -> - disp = "#{@get('quantity')} x #{@get('product_name')}" - if variant = @get('product_variant') - disp = "#{disp} (#{variant})" - disp.htmlSafe() diff --git a/app/assets/javascripts/supplier/app/models/product_variant.js.coffee b/app/assets/javascripts/supplier/app/models/product_variant.js.coffee deleted file mode 100644 index c3fbcc2e..00000000 --- a/app/assets/javascripts/supplier/app/models/product_variant.js.coffee +++ /dev/null @@ -1,8 +0,0 @@ -attr = DS.attr -App.ProductVariant = DS.Model.extend Ember.Validations.Mixin, - name: attr 'string' - product: DS.belongsTo 'product' - position: attr 'number', defaultValue: 0 - validations: - name: - presence: true diff --git a/app/assets/javascripts/supplier/app/models/section-area.js.coffee b/app/assets/javascripts/supplier/app/models/section-area.js.coffee deleted file mode 100644 index 6438e29c..00000000 --- a/app/assets/javascripts/supplier/app/models/section-area.js.coffee +++ /dev/null @@ -1,12 +0,0 @@ -attr = DS.attr -App.SectionArea = DS.Model.extend Ember.Validations.Mixin, - title: attr 'string' - width: attr 'number', defaultValue: 2 - height: attr 'number', defaultValue: 2 - position_x: attr 'number', defaultValue: 0 - position_y: attr 'number', defaultValue: 0 - rounded: attr 'boolean', defaultValue: false - color: attr 'string', defaultValue: '#AAAAAA' - section: DS.belongsTo('section', async: false) - validations: - title: {presence: true} diff --git a/app/assets/javascripts/supplier/app/models/section-element.js.coffee b/app/assets/javascripts/supplier/app/models/section-element.js.coffee deleted file mode 100644 index ccf4a76f..00000000 --- a/app/assets/javascripts/supplier/app/models/section-element.js.coffee +++ /dev/null @@ -1,6 +0,0 @@ -attr = DS.attr -App.SectionElement = DS.Model.extend App.SvgElementMixin, App.Rotation, - position_x: attr 'number', defaultValue: 0 - position_y: attr 'number', defaultValue: 0 - rotation: attr 'number', defaultValue: 0 - section: DS.belongsTo('section', async: false) diff --git a/app/assets/javascripts/supplier/app/models/section.js.coffee b/app/assets/javascripts/supplier/app/models/section.js.coffee deleted file mode 100644 index 9e762e1e..00000000 --- a/app/assets/javascripts/supplier/app/models/section.js.coffee +++ /dev/null @@ -1,70 +0,0 @@ -attr = DS.attr -App.Section = DS.Model.extend - title: attr 'string' - width: attr 'number' - height: attr 'number' - tables: DS.hasMany('table', async: false) - section_elements: DS.hasMany('section-element', async: false) - section_areas: DS.hasMany('section-area', async: false) - sorted_tables: Ember.computed 'tables.[]', -> @get('tables').sortBy('number') - - editmode: false - - arrange_tables_in_grid: (tables)-> - epsilon = 1e-10 - tables ||= @get('tables').sortBy('number') - w = parseFloat(@get('width')) - h = parseFloat(@get('height')) - n = parseInt(tables.get('length')) - unless w > 0 and h > 0 and n > 0 - console.log "Cannot arrange tables in grid since not all conditions are met" - return false - [lx, ly] = App.Distribution.distribute_lattice(w, h, n) - return unless lx > 0 and ly > 0 - console.log "Distributing tables in grid using lx: #{lx}, ly: #{ly}" - x0 = lx/2 - x = x0 - y = ly/2 - tables.forEach (table)-> - if x > w + (1e4*epsilon) # New row, error = epsilon times possible tables in a row - x = x0 - y += ly - table.set 'position_x', x - table.get('width')/2 # Starting point of square + half the square (center) minus half the table size - table.set 'position_y', y - table.get('height')/2 - x += lx - arrange_tables_in_rows_of: (n, tables)-> - return false unless n - n = parseInt(n) - return false unless n > 0 - tables ||= @get('tables').sortBy('number') - width = parseFloat(@get('width')) - height = parseFloat(@get('height')) - dx = width / n - dy = height / Math.ceil(tables.get('length')/n) - x = 0.0 - y = 0.0 - tables.forEach (table, i)-> - table.set 'position_x', x + (dx/2) - (table.get('width')/2) - table.set 'position_y', y + (dy/2) - (table.get('height')/2) - x += dx - if (i + 1) % n is 0 - x = 0.0 - y += dy - arrange_tables_in_columns_of: (n, tables)-> - return false unless n - n = parseInt(n) - return false unless n > 0 - tables ||= @get('tables').sortBy('number') - width = parseFloat(@get('width')) - height = parseFloat(@get('height')) - dx = width / Math.ceil(tables.get('length') / n) - dy = height / n - x = 0.0 - y = 0.0 - tables.forEach (table, i)-> - table.set 'position_x', x + (dx/2) - (table.get('width')/2) - table.set 'position_y', y + (dy/2) - (table.get('height')/2) - y += dy - if (i + 1) % n is 0 - y = 0.0 - x += dx diff --git a/app/assets/javascripts/supplier/app/models/supplier.js.coffee b/app/assets/javascripts/supplier/app/models/supplier.js.coffee deleted file mode 100644 index f8c53a1b..00000000 --- a/app/assets/javascripts/supplier/app/models/supplier.js.coffee +++ /dev/null @@ -1,31 +0,0 @@ -attr = DS.attr -App.Supplier = DS.Model.extend - name: attr 'string' - user_message: attr 'string' - email: attr 'string' - time_zone: attr 'string' - address: attr 'string' - house_number: attr 'number' - house_number_addition: attr 'string' - postal_code: attr 'string' - city: attr 'string' - open: attr 'boolean' - country: attr 'string' - facebook_promotion_url: attr 'string' - iens_profile: attr 'string' - lat: attr 'number' - lng: attr 'number' - week_starts_on_monday: attr 'boolean' - orders_in_process_count: attr('number') - orders_placed_count: attr('number') - - product_categories: DS.hasMany 'product_category', async: false - employee_shifts: DS.hasMany('employee-shift') - - close: -> - $.post Routes.mark_as_closed_suppliers_supplier_path(@id), => - @set 'open', false - open_the_place: -> - $.post Routes.mark_as_open_suppliers_supplier_path(@id), => - @set 'open', true - diff --git a/app/assets/javascripts/supplier/app/models/svg-element.js.coffee b/app/assets/javascripts/supplier/app/models/svg-element.js.coffee deleted file mode 100644 index de3ad4f3..00000000 --- a/app/assets/javascripts/supplier/app/models/svg-element.js.coffee +++ /dev/null @@ -1,2 +0,0 @@ -attr = DS.attr -App.SvgElement = DS.Model.extend App.SvgElementMixin diff --git a/app/assets/javascripts/supplier/app/models/table.js.coffee b/app/assets/javascripts/supplier/app/models/table.js.coffee deleted file mode 100644 index e13dcd60..00000000 --- a/app/assets/javascripts/supplier/app/models/table.js.coffee +++ /dev/null @@ -1,21 +0,0 @@ -attr = DS.attr -App.Table = DS.Model.extend - number: attr 'number', defaultValue: 0 - width: attr 'number', defaultValue: 0.8 - height: attr 'number', defaultValue: 0.8 - position_x: attr 'number' - position_y: attr 'number' - # occupied: attr 'boolean' - section: DS.belongsTo('section', async: false) - #active_list: DS.belongsTo('list', key: 'active_list') - active_list: DS.belongsTo('list', async: true) - #list: DS.belongsTo('list') - #active_list: (-> - #@get('list') - #).property('list') - occupied: (-> !!@get('active_list')).property('active_list.id') - - # Casted number to use in sortBy because a numberField will - # set property number to string value (TablesIndexController) - casted_number: (-> parseInt(@get('number'))).property('number') - table_number: Ember.computed.alias('number') diff --git a/app/assets/javascripts/supplier/app/models/user.js.coffee b/app/assets/javascripts/supplier/app/models/user.js.coffee deleted file mode 100644 index e2bb2a0b..00000000 --- a/app/assets/javascripts/supplier/app/models/user.js.coffee +++ /dev/null @@ -1,12 +0,0 @@ -attr = DS.attr -App.User= DS.Model.extend - name: attr('string') - uid: attr('string') - provider: attr('string') - avatar: attr('string') - lists: DS.hasMany('list') # in ember scope not many to many (yet) - join_requests: DS.hasMany('join_request') - avatar_tag: Ember.computed 'avatar', 'name', -> - avatar = @get('avatar') || "#{$asset_path}/supplier/unknown-avatar.png" - name = @get('name') - "#{name}".htmlSafe() diff --git a/app/assets/javascripts/supplier/app/modifications/attribute_types.js.coffee b/app/assets/javascripts/supplier/app/modifications/attribute_types.js.coffee deleted file mode 100644 index 2e2fc3b1..00000000 --- a/app/assets/javascripts/supplier/app/modifications/attribute_types.js.coffee +++ /dev/null @@ -1,5 +0,0 @@ -#DS.JSONTransforms['object'] = - #deserialize: (serialized)-> - #serialized - #serialize: (deserialized)-> - #deserialized diff --git a/app/assets/javascripts/supplier/app/modifications/component_modifications.js.coffee b/app/assets/javascripts/supplier/app/modifications/component_modifications.js.coffee deleted file mode 100644 index 8d8da152..00000000 --- a/app/assets/javascripts/supplier/app/modifications/component_modifications.js.coffee +++ /dev/null @@ -1,7 +0,0 @@ -#import Ember from 'ember' -ComponentExtensions = Ember.Mixin.create - modal: (name, options={})-> - target = App.__container__.lookup('route:application') - target.send "openModal", name, options - -Ember.Component.reopen ComponentExtensions diff --git a/app/assets/javascripts/supplier/app/modifications/controller_modifications.js.coffee b/app/assets/javascripts/supplier/app/modifications/controller_modifications.js.coffee deleted file mode 100644 index 8691c834..00000000 --- a/app/assets/javascripts/supplier/app/modifications/controller_modifications.js.coffee +++ /dev/null @@ -1,15 +0,0 @@ -ControllerExtensions = Ember.Mixin.create - # conveniance wrapper for open modal. Use like: - # @modal "edit_table", model: table - # modal: (name, options={})-> - # @send "openModal", "modals/#{name}", options.model || Ember.Object.create(), - # controller: 'modal' - # ok: options.ok - # close: options.close - modal: (name, options={})-> - options.model ||= Ember.Object.create() - @send "openModal", name, options - - all_sections: (-> @store.peekAll('section')).property() - -Ember.Controller.reopen ControllerExtensions diff --git a/app/assets/javascripts/supplier/app/modifications/model_extensions.js.coffee b/app/assets/javascripts/supplier/app/modifications/model_extensions.js.coffee deleted file mode 100644 index 6b12eec5..00000000 --- a/app/assets/javascripts/supplier/app/modifications/model_extensions.js.coffee +++ /dev/null @@ -1,69 +0,0 @@ -DS.PromiseObject.reopen - invoke: (method, args...) -> - @then (object) -> object[method].apply(object, args) -DS.Model.reopen - created_at: DS.attr('date') - updated_at: DS.attr('date') - #TODO: at the moment deleteRecord might work as expected, check this - eraseRecord: -> - @clearRelationships() - @transitionTo('deleted.saved') - #then: (callback) -> callback.call(@, @) DO NOT USE SINCE THERE IS TYPECHECKING ON .then in ember data https://github.com/emberjs/data/issues/2523 - invoke: (method, args...) -> - @[method].apply(@, args) -DS.Model.reopenClass - findCached: (id)-> - return null unless id - @store.peekRecord(@typeKey, id) - updateOrAdd: (attributes)-> - if cached = @findCached(attributes.id) - - # update relations if needed - Ember.get(@, 'relationships').forEach (model, relation)=> - relation = relation[0] - if relation.kind == 'belongsTo' - if id = attributes["#{relation.name}_id"] - @store.findAll(relation.name, id).then (relation_object)-> - cached.set relation.name, relation_object - cached.setProperties attributes - cached - else - #@store.findRecord(@, attributes.id) - @pushByAttriburtes(attributes) - pushByAttriburtes: (attributes, options = {})-> - #store = @all().get('store') - - #Ugly hack at the cost of an extra request since I do not yet know the proper - #code for adding a record by its attributes and having its associations set - #@find(attributes.id) - decamelized = Ember.String.decamelize(@typeKey) - self_name = Ember.String.pluralize(decamelized) - self_name = self_name.substr(1) if self_name[0] == '.' - - #belongs_tos = {} - #Ember.get(@, 'relationships').forEach (model, relation)=> - #relation = relation[0] - #if relation.kind == 'belongsTo' and id = attributes["#{relation.name}_id"] - #attributes[relation.name] = id unless attributes[relation.name] - #belongs_tos[relation.name] = id - - nested_attributes = {} - nested_attributes[self_name] = attributes - # pushPayload makes association back references, just push not yet 2014-06-27 - new_record = @store.pushPayload(nested_attributes) - - #promises = [] - #association_names = [] - #Ember.get(@, 'relationships').forEach (model, relation)=> - #relation = relation[0] - #if relation.kind == 'belongsTo' and id = attributes["#{relation.name}_id"] - #attributes[relation.name] = id - #promises.push @store.findRecord(relation.name, id) - #association_names.push relation.name - #Ember.RSVP.all(promises).then (records)-> - #for record, i in records - ##console.log "Setting relation #{relation.name} to #{record.get('id')}" - #new_record.set association_names[i], record - #attributes[relation.name] = - #delete attributes["#{relation.name}_id"] - #@createRecord attributes diff --git a/app/assets/javascripts/supplier/app/router.js.coffee b/app/assets/javascripts/supplier/app/router.js.coffee deleted file mode 100644 index b6d08366..00000000 --- a/app/assets/javascripts/supplier/app/router.js.coffee +++ /dev/null @@ -1,25 +0,0 @@ -# For more information see: http://emberjs.com/guides/routing/ -# and for queryParams: https://github.com/alexspeller/website/blob/a96d9afe4506454b155cc64299e86e558ce3c9f1/source/guides/routing/query-params.md -App.Router.reopen - # location: 'history' - rootURL: '/supplier' - -App.Router.map -> - @route '/', queryParams: ['section_id'] - @resource 'sections', -> - @resource 'section', path: ':section_id' - @resource 'tables', -> - @resource 'table', path: ':table_id' - @resource 'lists', -> - @resource 'list', path: ':list_id' - @route 'employees' - @route 'employee', path: '/employees/:employee_id' - @resource 'page', path: 'pages/:page_id' - @route 'orders-display' # chromecast etc - @route 'menu' - @route 'settings' - @route 'schedule' - @route 'my-account' - @route 'my-schedule' - @route 'empty' - #@resource 'lists', queryParams: ['state'] diff --git a/app/assets/javascripts/supplier/app/routes/application.js.coffee.erb b/app/assets/javascripts/supplier/app/routes/application.js.coffee.erb deleted file mode 100644 index f9acf842..00000000 --- a/app/assets/javascripts/supplier/app/routes/application.js.coffee.erb +++ /dev/null @@ -1,157 +0,0 @@ -App.ApplicationRoute = Ember.Route.extend - beforeModel: -> - # Preload only active lists and orders - @supplier = @store.push - data: - id: supplier_object.id - type: 'supplier' - attributes: supplier_object - @employee = @store.push - data: - id: employee_object.id - type: 'employee' - attributes: employee_object - #@supplier = @store.push 'supplier' supplier_object - #@employee = @store.push 'employee' employee_object - #@product_categories = @store.findAll 'product_category' - #@sections = @store.findAll 'section' - #Ember.RSVP.all([@product_categories, @sections]).then (results)=> - @supplier.reload().then => - @store.query('list', state: 'active').then => #.then (lists) -> lists.invoke('get', 'table') - @controllerFor('index').set 'loading_data', false - #@lists = @store.peekAll 'list' - # product_categories = controller.set 'product_categories', @store.peekAll('product_category') - #@store.findAll 'order', state: 'active' included in list - setupController: (controller)-> - controller.set 'globals.current_supplier', @supplier - controller.set 'globals.current_employee', @employee - # @set 'supplier', @store.findRecord('supplier', supplier_id) - #controller.set 'sections', @sections - #controller.set 'product_categories', @product_categories - - faye = new Faye.Client(event_host) - faye.subscribe "/supplier/#{supplier_object.id}", (e)=> - @set('globals.current_supplier.orders_placed_count', e.data.supplier_orders_placed_count) if e.data.supplier_orders_placed_count? - @set('globals.current_supplier.orders_in_process_count', e.data.supplier_orders_in_process_count) if e.data.supplier_orders_in_process_count? - @events[e.event].call(@, e.data) if @events[e.event] -<% if Rails.env.test? %> - window.faye_log ||= [] - faye_message = {} - faye_message[e.event] = JSON.parse(JSON.stringify(e.data)) - faye_log.push faye_message -<% elsif Rails.env.development? %> - console.log "Event: #{e.event}" - console.log e.data -<% end %> - - # Fetch suppliers for current_employee - $.getJSON(Routes.employees_suppliers_path()).then (result) => - @store.pushPayload result - - - actions: - # openModal: (modalName, model, options={})-> - # controller_name = options.controller || modalName - # controller = @controllerFor(controller_name) - # controller.set 'model', model - # controller.set 'modal_options', options - # @render modalName, - # into: 'application' - # outlet: 'modal' - # controller: controller_name - openModal: (modalName, options={})-> - controller_name = options.controller || modalName - try - controller = @controllerFor("modals/#{modalName}") - catch error - controller = @controllerFor("modals/base") - controller ||= @controllerFor("modals/base") - controller.set 'model', options.model - defaultModalOptions = - closeOnOverlay: true - closeOnModalClick: false - modal_options = Ember.Object.create($.extend(defaultModalOptions, options)) - controller.set 'modal_options', modal_options - @render "modals/#{modalName}", - into: 'application' - outlet: 'modal' - view: 'modal' - controller: controller - @set 'globals.modal_active', true - - closeModal: -> - @disconnectOutlet - outlet: 'modal' - parentView: 'application' - @set 'globals.modal_active', false - confirm: (options = {})-> - @send 'openModal', 'confirm', - model: Ember.Object.create - title: options.title - body: options.body - cancel: options.cancel - ok: options.ok - #newOrder: (order_id)-> - # if order = @store.peekRecord('order', order_id) - # return if @get('globals.active_section.id') and order.get('section.id') isnt @get('globals.active_section.id') - # $('body').addClass('new-order') - # @set 'globals.flash_message', order.get('display_with_table') - # setTimeout (-> $('body').removeClass('new-order')), 4000 - # try ion.sound.play('water_droplet') - showDashboardOrders: (section)-> - @set('globals.active_section', section) - @transitionTo 'index' - markSupplierClosed: -> - return unless @get('globals.current_employee.manager') - return unless supplier = @get('globals.current_supplier') - @send 'openModal', 'confirm', - title_path: 'supplier.close_for_orders_confirmation' - model: supplier - ok: -> supplier.close() - markSupplierOpen: -> - return unless @get('globals.current_employee.manager') - return unless supplier = @get('globals.current_supplier') - supplier.open_the_place() - editTable: (table)-> - @send 'openModal', 'table_edit', - model: table - close: -> table.rollbackAttributes() - events: - list_needs_help: (data) -> - if list = @store.peekRecord('list', data.id) - list.isNeedingHelp() - return if @get('globals.active_section.id') and list.get('section.id') isnt @get('globals.active_section.id') - @set 'globals.flash_message', t('table.needs_help.flash_message', number: list.get('table.table_number') || -1) - try ion.sound.play 'bell_ring' - list_needs_payment: (data) -> - if list = @store.peekRecord('list', data.id) - list.isNeedingPayment() - return if @get('globals.active_section.id') and list.get('section.id') isnt @get('globals.active_section.id') - try ion.sound.play 'water_droplet_3' - list_is_paid: (data) -> list.isPaid() if list = @store.peekRecord('list', data.id) - new_order: (data) -> - if data.payload - @store.pushPayload(data.payload) - if order_id = data.payload.data.id - order = @store.peekRecord('order', order_id) - return if @get('globals.active_section.id') and order.get('list.table.section.id') isnt @get('globals.active_section.id') - @set 'globals.flash_message', order.get('display_with_table') - try ion.sound.play('water_droplet') - new_list: (data)-> - if data.payload - @store.pushPayload(data.payload) - try ion.sound.play('water_droplet') - list_changed_table: (data)-> - @store.pushPayload(data.payload) - list_closed: (data) -> list.isClosed() if list = @store.peekRecord('list', data.id) - list_helped: (data) -> list.isHelped() if list = @store.peekRecord('list', data.id) - remove_list_needs_payment: (data) -> list.set('needs_payment', false) if list = @store.peekRecord('list', data.id) - order_closed: (data) -> order.isClosed() if order = @store.peekRecord('order', data.id) - order_being_processed: (data) -> order.isActive() if order = @store.peekRecord('order', data.id) - order_being_delivered: (data) -> order.isDelivered() if order = @store.peekRecord('order', data.id) - order_cancelled: (data) -> order.isCancelled() if order = @store.peekRecord('order', data.id) - orders_in_process_count: (data) -> @set('globals.current_supplier.orders_in_process_count', data.count) - orders_placed_count: (data) -> @set('globals.current_supplier.orders_placed_count', data.count) - - #return new Ember.Handlebars.SafeString('' + escaped + ''); - #"#{escaped}".htmlSafe() diff --git a/app/assets/javascripts/supplier/app/routes/employee.js.coffee b/app/assets/javascripts/supplier/app/routes/employee.js.coffee deleted file mode 100644 index c39ad157..00000000 --- a/app/assets/javascripts/supplier/app/routes/employee.js.coffee +++ /dev/null @@ -1 +0,0 @@ -App.EmployeeRoute = Ember.Route.extend App.EmployeeActionsMixin diff --git a/app/assets/javascripts/supplier/app/routes/employees.js.coffee b/app/assets/javascripts/supplier/app/routes/employees.js.coffee deleted file mode 100644 index 6e8d9ee9..00000000 --- a/app/assets/javascripts/supplier/app/routes/employees.js.coffee +++ /dev/null @@ -1,2 +0,0 @@ -App.EmployeesRoute = Ember.Route.extend App.EmployeeActionsMixin, - model: -> @store.findAll 'employee', reload: false diff --git a/app/assets/javascripts/supplier/app/routes/index.js.coffee b/app/assets/javascripts/supplier/app/routes/index.js.coffee deleted file mode 100644 index 5706f08e..00000000 --- a/app/assets/javascripts/supplier/app/routes/index.js.coffee +++ /dev/null @@ -1,22 +0,0 @@ -# App.IndexRoute = Ember.Route.extend - # model: (params, queryParams)-> - # Ember.Object.create - # # Find with condition does not work since the resulting array promise is not updated for newly created records - # #lists: App.List.find({state: 'active'}) - # #orders: App.Order.find({state: 'active'}) - # #lists: @store.filter 'list', (l)-> l.get('state') == 'active' # DOES NOT WORK!!!! (yet) - # # use filter to create a scope on all the records - # #lists: @store.filter 'list', -> true - # lists: @store.peekAll 'list' - # # mayby @store.peekAll 'list' will work better!!!! (2014-04-24 a more experienced benjamin :) - # #orders: @store.filter 'order', -> true - # orders: @store.peekAll 'order' - # sections: @store.peekAll 'section' - # setupController: (controller, model)-> - # controller.set('model', model) - # #$('#section_selector').on 'change', (-> controller.set('sectionId', $(this).val())) - # #controller.set 'lists', @store.peekAll('list') - # #controller.set 'lists', App.List.all() #.filterBy('state', 'active') - # #controller.set 'orders', App.Order.all() - # #controller.set 'lists', model.get('lists') - # #controller.set 'orders', model.get('orders') diff --git a/app/assets/javascripts/supplier/app/routes/lists-index.js.coffee b/app/assets/javascripts/supplier/app/routes/lists-index.js.coffee deleted file mode 100644 index 28de1abb..00000000 --- a/app/assets/javascripts/supplier/app/routes/lists-index.js.coffee +++ /dev/null @@ -1,4 +0,0 @@ -#App.ListsIndexRoute = Ember.Route.extend -# #model: -> @store.findAll 'list' -# setupController: (controller, model)-> -# controller.set 'date', (new Date()).toISOString().substr(0,10) unless controller.get('date') diff --git a/app/assets/javascripts/supplier/app/routes/my-account.js.coffee b/app/assets/javascripts/supplier/app/routes/my-account.js.coffee deleted file mode 100644 index 1c1bdde8..00000000 --- a/app/assets/javascripts/supplier/app/routes/my-account.js.coffee +++ /dev/null @@ -1,2 +0,0 @@ -App.MyAccountRoute = Ember.Route.extend - model: -> @get('globals.current_employee') diff --git a/app/assets/javascripts/supplier/app/routes/my-schedule.js.coffee b/app/assets/javascripts/supplier/app/routes/my-schedule.js.coffee deleted file mode 100644 index e149c4ba..00000000 --- a/app/assets/javascripts/supplier/app/routes/my-schedule.js.coffee +++ /dev/null @@ -1,5 +0,0 @@ -App.MyScheduleRoute = Ember.Route.extend - model: -> - $.getJSON(Routes.employees_employee_shifts_path()).then (payload)=> - @store.pushPayload payload - @store.peekAll('employee-shift') diff --git a/app/assets/javascripts/supplier/app/routes/orders-display.js.coffee b/app/assets/javascripts/supplier/app/routes/orders-display.js.coffee deleted file mode 100644 index 990749ce..00000000 --- a/app/assets/javascripts/supplier/app/routes/orders-display.js.coffee +++ /dev/null @@ -1,2 +0,0 @@ -App.OrdersDisplayRoute = Ember.Route.extend - model: -> @store.peekAll('order') diff --git a/app/assets/javascripts/supplier/app/routes/schedule.js.coffee b/app/assets/javascripts/supplier/app/routes/schedule.js.coffee deleted file mode 100644 index 1004a0d5..00000000 --- a/app/assets/javascripts/supplier/app/routes/schedule.js.coffee +++ /dev/null @@ -1,4 +0,0 @@ -App.ScheduleRoute = Ember.Route.extend - beforeModel: -> - @store.findAll 'employee', reload: false - model: -> @store.findAll 'employee-shift' diff --git a/app/assets/javascripts/supplier/app/routes/section_route.js.coffee b/app/assets/javascripts/supplier/app/routes/section_route.js.coffee deleted file mode 100644 index b7d19892..00000000 --- a/app/assets/javascripts/supplier/app/routes/section_route.js.coffee +++ /dev/null @@ -1,4 +0,0 @@ -App.SectionRoute = Ember.Route.extend - model: (params) -> @store.peekRecord 'section', params.section_id - renderTemplate: -> - @render 'section' diff --git a/app/assets/javascripts/supplier/app/routes/sections_route.js.coffee b/app/assets/javascripts/supplier/app/routes/sections_route.js.coffee deleted file mode 100644 index 3af35b49..00000000 --- a/app/assets/javascripts/supplier/app/routes/sections_route.js.coffee +++ /dev/null @@ -1,5 +0,0 @@ -App.SectionsRoute = Ember.Route.extend - model: -> @store.peekAll 'section' - - # setupController: (controller, collection) -> - # controller.set 'content', collection diff --git a/app/assets/javascripts/supplier/app/routes/settings_route.js.coffee b/app/assets/javascripts/supplier/app/routes/settings_route.js.coffee deleted file mode 100644 index c6dfad7f..00000000 --- a/app/assets/javascripts/supplier/app/routes/settings_route.js.coffee +++ /dev/null @@ -1,7 +0,0 @@ -App.SettingsRoute = Ember.Route.extend - a: 3 - #model: -> @get('globals.current_supplier') - #model: Ember.computed.alias 'globals.current_supplier' - # setupController: (controller, model)-> - # #controller.set 'model', controller.get('controllers.application.supplier') - # controller.set 'model', model.supplier diff --git a/app/assets/javascripts/supplier/app/routes/tables_index_route.js.coffee b/app/assets/javascripts/supplier/app/routes/tables_index_route.js.coffee deleted file mode 100644 index b4065acb..00000000 --- a/app/assets/javascripts/supplier/app/routes/tables_index_route.js.coffee +++ /dev/null @@ -1,2 +0,0 @@ -App.TablesIndexRoute = Ember.Route.extend - model: -> @store.peekAll('table') diff --git a/app/assets/javascripts/supplier/app/services/computed-product.js.coffee b/app/assets/javascripts/supplier/app/services/computed-product.js.coffee deleted file mode 100644 index ff4645b5..00000000 --- a/app/assets/javascripts/supplier/app/services/computed-product.js.coffee +++ /dev/null @@ -1,12 +0,0 @@ -Ember.computed.product = -> - args = [] - for arg in arguments - args.push arg - callback = -> - product = 1 - for key in args - continue unless typeof(key) is 'string' - product *= @get(key) || 0 - product - args.push callback - Ember.computed.apply(@, args) diff --git a/app/assets/javascripts/supplier/app/services/css-object.js.coffee b/app/assets/javascripts/supplier/app/services/css-object.js.coffee deleted file mode 100644 index f96db1fe..00000000 --- a/app/assets/javascripts/supplier/app/services/css-object.js.coffee +++ /dev/null @@ -1,25 +0,0 @@ -App.CssObject = Ember.Object.extend - pixel_fields: ['width', 'height', 'left', 'top', 'line-height'] - isNumeric: /^[-+]?(\d+|\d+\.\d+)$/ - toString: -> - ret = "" - for k, v of JSON.parse(JSON.stringify(@)) - if @pixel_fields.indexOf(k) > -1 - v = "#{v}px" if @isNumeric.test(v) - ret += "#{k}:#{v};" - ret.htmlSafe() -App.CssObject.reopenClass - rgb_to_numeric: (rgb_hex)-> - #http://stackoverflow.com/questions/12043187/how-to-check-if-hex-color-is-too-black - rgb_hex = rgb_hex.substring(1) - rgb = parseInt(rgb_hex, 16) - r = (rgb >> 16) & 0xff - g = (rgb >> 8) & 0xff - b = (rgb >> 0) & 0xff - [r, g, b] - - isColorDark: (rgb_hex)-> - return false unless rgb_hex?.match /#[0-9a-zA-Z]{6}/ - [r, g, b] = @rgb_to_numeric rgb_hex - luma = 0.2126 * r + 0.7152 * g + 0.0722 * b # per ITU-R BT.709 - luma < 40 diff --git a/app/assets/javascripts/supplier/app/store.js.coffee b/app/assets/javascripts/supplier/app/store.js.coffee deleted file mode 100644 index 1326e988..00000000 --- a/app/assets/javascripts/supplier/app/store.js.coffee +++ /dev/null @@ -1,15 +0,0 @@ -#App.ApplicationSerializer = DS.ActiveModelSerializer - -App.ApplicationSerializer = DS.JSONAPISerializer.extend {} -App.CreationSerializer = DS.ActiveModelSerializer.extend {} -# keyForAttribute: (attr, method)-> attr -#App.ApplicationStore = DS.Store -#adapter: DS.ActiveModelAdapter.extend - #namespace: 'supplier' - ## user underscored paths - #pathForType: (type)-> - #Ember.String.pluralize(Ember.String.decamelize(type)) -#App.ApplicationAdapter = DS.ActiveModelAdapter.extend -# namespace: 'supplier' -# headers: -# "Accept": "application/json, text/javascript; q=0.01" diff --git a/app/assets/javascripts/supplier/app/templates/application.emblem b/app/assets/javascripts/supplier/app/templates/application.emblem deleted file mode 100644 index 1504fa5d..00000000 --- a/app/assets/javascripts/supplier/app/templates/application.emblem +++ /dev/null @@ -1,8 +0,0 @@ -if loading - span.fa.fa-3x.fa-spinner.fa-spin -else - = partial "global/top_menu" - = partial "global/side_menu" - .main-section= outlet - = flash-message - = outlet "modal" diff --git a/app/assets/javascripts/supplier/app/templates/close_list_button.emblem b/app/assets/javascripts/supplier/app/templates/close_list_button.emblem deleted file mode 100644 index 57c64165..00000000 --- a/app/assets/javascripts/supplier/app/templates/close_list_button.emblem +++ /dev/null @@ -1,3 +0,0 @@ -span.fa-stack.fa-2x.fa-stack-sized - i.fa.fa-credit-card - i.fa-stack-check diff --git a/app/assets/javascripts/supplier/app/templates/components/button/change-list-table.emblem b/app/assets/javascripts/supplier/app/templates/components/button/change-list-table.emblem deleted file mode 100644 index f8133bdb..00000000 --- a/app/assets/javascripts/supplier/app/templates/components/button/change-list-table.emblem +++ /dev/null @@ -1 +0,0 @@ -= table-number list.table.table_number diff --git a/app/assets/javascripts/supplier/app/templates/components/button/mark-list-helped.emblem b/app/assets/javascripts/supplier/app/templates/components/button/mark-list-helped.emblem deleted file mode 100644 index a10560fb..00000000 --- a/app/assets/javascripts/supplier/app/templates/components/button/mark-list-helped.emblem +++ /dev/null @@ -1 +0,0 @@ -span diff --git a/app/assets/javascripts/supplier/app/templates/components/button/mark-order-active.emblem b/app/assets/javascripts/supplier/app/templates/components/button/mark-order-active.emblem deleted file mode 100644 index 29b93dd5..00000000 --- a/app/assets/javascripts/supplier/app/templates/components/button/mark-order-active.emblem +++ /dev/null @@ -1 +0,0 @@ -span.fa.fa-check.fa-2x diff --git a/app/assets/javascripts/supplier/app/templates/components/button/mark-order-cancelled.emblem b/app/assets/javascripts/supplier/app/templates/components/button/mark-order-cancelled.emblem deleted file mode 100644 index a10560fb..00000000 --- a/app/assets/javascripts/supplier/app/templates/components/button/mark-order-cancelled.emblem +++ /dev/null @@ -1 +0,0 @@ -span diff --git a/app/assets/javascripts/supplier/app/templates/components/button/mark-order-delivered.emblem b/app/assets/javascripts/supplier/app/templates/components/button/mark-order-delivered.emblem deleted file mode 100644 index b9e6cdc3..00000000 --- a/app/assets/javascripts/supplier/app/templates/components/button/mark-order-delivered.emblem +++ /dev/null @@ -1,3 +0,0 @@ -span.fa.fa-2x.fa-shifted-stack - span.fa-shifted.fa-check - span.fa-shifted.fa-check diff --git a/app/assets/javascripts/supplier/app/templates/components/button/remove-list-needs-payment.emblem b/app/assets/javascripts/supplier/app/templates/components/button/remove-list-needs-payment.emblem deleted file mode 100644 index 04dd6564..00000000 --- a/app/assets/javascripts/supplier/app/templates/components/button/remove-list-needs-payment.emblem +++ /dev/null @@ -1,3 +0,0 @@ -span.fa-stack.fa-2x.fa-stack-sized - i.fa.fa-money.fa-stack-small - i.fa.fa-ban.revoke diff --git a/app/assets/javascripts/supplier/app/templates/components/button/show-list.emblem b/app/assets/javascripts/supplier/app/templates/components/button/show-list.emblem deleted file mode 100644 index a6174bb1..00000000 --- a/app/assets/javascripts/supplier/app/templates/components/button/show-list.emblem +++ /dev/null @@ -1 +0,0 @@ -span.fa.fa-list.fa-2x diff --git a/app/assets/javascripts/supplier/app/templates/components/dropdown-link.emblem b/app/assets/javascripts/supplier/app/templates/components/dropdown-link.emblem deleted file mode 100644 index 6ea01a34..00000000 --- a/app/assets/javascripts/supplier/app/templates/components/dropdown-link.emblem +++ /dev/null @@ -1,7 +0,0 @@ -if gravatar - span.dropdown-trigger.gravatar= gravatar-image gravatar -else - span.dropdown-trigger.button.tiny.dropdown - span.dropdown-trigger-text= title -.dropdown-list-container - = yield diff --git a/app/assets/javascripts/supplier/app/templates/components/edit-currency.emblem b/app/assets/javascripts/supplier/app/templates/components/edit-currency.emblem deleted file mode 100644 index 82caf59e..00000000 --- a/app/assets/javascripts/supplier/app/templates/components/edit-currency.emblem +++ /dev/null @@ -1,3 +0,0 @@ -.large-2.columns: label.prefix= currencySymbol -.large-4.columns.end= input valueBinding="inputValue" placeholder=placeholder action="action" - diff --git a/app/assets/javascripts/supplier/app/templates/components/language-switcher-button.emblem b/app/assets/javascripts/supplier/app/templates/components/language-switcher-button.emblem deleted file mode 100644 index c251772a..00000000 --- a/app/assets/javascripts/supplier/app/templates/components/language-switcher-button.emblem +++ /dev/null @@ -1 +0,0 @@ -= flag locale diff --git a/app/assets/javascripts/supplier/app/templates/components/language-switcher.emblem b/app/assets/javascripts/supplier/app/templates/components/language-switcher.emblem deleted file mode 100644 index 3e6dbe0e..00000000 --- a/app/assets/javascripts/supplier/app/templates/components/language-switcher.emblem +++ /dev/null @@ -1,2 +0,0 @@ -each locales as |locale| - = button-language-switcher locale=locale diff --git a/app/assets/javascripts/supplier/app/templates/components/menu-product.emblem b/app/assets/javascripts/supplier/app/templates/components/menu-product.emblem deleted file mode 100644 index b079aeea..00000000 --- a/app/assets/javascripts/supplier/app/templates/components/menu-product.emblem +++ /dev/null @@ -1,50 +0,0 @@ -if editMode - .row - .small-6.medium-3.columns.name - = input value=product.name placeholder=namePlaceholder action="save" - = errors product.errors.name - .small-6.medium-3.columns.price - = edit-currency value=product.price action="save" - = errors product.errors.price - .small-6.medium-3.columns.code= input value=product.code placeholder=codePlaceholder - .small-6.medium-3.columns.actions - a.rollback-product-action{action "rollbackProduct"}: span - a.destroy-product-action{action "destroyProduct" product}: span - a.save-product-action{action "save"}: span - .row - .small-3.columns= t 'attributes.product.active' - .small-9.columns: boolean-switch value=product.active - .row.menu-product-container - .small-12.medium-6.columns - = descriptionPlaceholder - = textarea value=product.description placeholder=descriptionPlaceholder - .small-12.medium-6.columns - = form-file-upload name="image" accept="image/*" file=product.image - img src=product.image_src - each product.product_variants as |product_variant| - .row - .small-1.columns   - .small-8.medium-5.large-4.columns= input value=product_variant.name - .small-2.medium-6.large-7.columns - button.remove-product-variant{action "removeProductVariant" product_variant}: span - .row - .small-12.columns - button.add-product-variant{ action "addProductVariant"} - span.icon - = t 'product_variant.add_product_variant' -else - if showProduct - .row.show-menu-product-row - .small-3.columns - span= product.name - = errors product.errors.name includeAttribute="product" - .small-3.columns - = currency product.price - = errors product.errors.price includeAttribute="product" - .small-3.columns: span= code_filter_display - .small-3.columns - a.edit-product-action{action "makeEditable"}: span - /img src=product.image_src - if product.product_variants - .row - .small-12.columns= product.variantsDisplay diff --git a/app/assets/javascripts/supplier/app/templates/components/menu-time-preview.emblem b/app/assets/javascripts/supplier/app/templates/components/menu-time-preview.emblem deleted file mode 100644 index c1f07cb7..00000000 --- a/app/assets/javascripts/supplier/app/templates/components/menu-time-preview.emblem +++ /dev/null @@ -1,22 +0,0 @@ -if collapsed - if active - .menu-time-preview-active-panel{action "openTimePreview"} - = preview_day_text - = preview_time_text - else - a.open-time-preview-handle{action "openTimePreview"}: span -else - .menu-time-preview-selection-container - a.close-time-preview-handle{action "closeTimePreview"}: span - h4= t 'product_category.time_preview.title' - = my-select content=daysContent optionValuePath="value" optionLabelPath="text" selection=preview_day prompt=" -- " - br - = boolean-button value=preview_full_day reverse=true text_path="product_category.time_preview.active_at" - unless preview_full_day - = select-minute-of-day value=preview_minute_of_day - hr - if active - a.deactivate-time-preview-button{action "deactivateTimePreview"}= t 'product_category.time_preview.deactivate_button' - else - if hasSelection - a.activate-time-preview-button{action "activateTimePreview"}= t 'product_category.time_preview.activate_button' diff --git a/app/assets/javascripts/supplier/app/templates/components/modal-dialog.emblem b/app/assets/javascripts/supplier/app/templates/components/modal-dialog.emblem deleted file mode 100644 index 8e3466bf..00000000 --- a/app/assets/javascripts/supplier/app/templates/components/modal-dialog.emblem +++ /dev/null @@ -1,2 +0,0 @@ -.overlay{action "close"} - .modal{action bubbles=false preventDefault=false}= yield diff --git a/app/assets/javascripts/supplier/app/templates/components/qr-codes-link.emblem b/app/assets/javascripts/supplier/app/templates/components/qr-codes-link.emblem deleted file mode 100644 index eef0aa3e..00000000 --- a/app/assets/javascripts/supplier/app/templates/components/qr-codes-link.emblem +++ /dev/null @@ -1,2 +0,0 @@ -span.qr-icon -= t 'table.print_qr_codes' diff --git a/app/assets/javascripts/supplier/app/templates/components/sections-header.emblem b/app/assets/javascripts/supplier/app/templates/components/sections-header.emblem deleted file mode 100644 index 1db22348..00000000 --- a/app/assets/javascripts/supplier/app/templates/components/sections-header.emblem +++ /dev/null @@ -1,8 +0,0 @@ -dl.sections-header-container.sub-nav - dd data-section="all": a.section-header-title{action "setSection"} href="" = t 'sections_header.all_sections' - each sections as |section| - = sections-header-section section=section - a.section-header-title{action "setSection" section} href="#" - = section.title - /= link-to "section" section.id class="section-jumper" - span.fa.fa-chevron-circle-right diff --git a/app/assets/javascripts/supplier/app/templates/components/suppliers-switcher.emblem b/app/assets/javascripts/supplier/app/templates/components/suppliers-switcher.emblem deleted file mode 100644 index 1ed85fdd..00000000 --- a/app/assets/javascripts/supplier/app/templates/components/suppliers-switcher.emblem +++ /dev/null @@ -1,4 +0,0 @@ -if other_suppliers - ul.button-group.stack-for-small.round - each other_suppliers as |supplier| - li: a.warning.button{action "switchTo" supplier}= t 'suppliers_switcher.switch_to_button' supplier diff --git a/app/assets/javascripts/supplier/app/templates/components/users-buttons.emblem b/app/assets/javascripts/supplier/app/templates/components/users-buttons.emblem deleted file mode 100644 index cfb9ef11..00000000 --- a/app/assets/javascripts/supplier/app/templates/components/users-buttons.emblem +++ /dev/null @@ -1,5 +0,0 @@ -if user - a.user-avatar-button{action "userClick" user}= user.avatar_tag -else - each users as |user| - a.user-avatar-button{action "userClick" user}= user.avatar_tag diff --git a/app/assets/javascripts/supplier/app/templates/dashboard/active-list.emblem b/app/assets/javascripts/supplier/app/templates/dashboard/active-list.emblem deleted file mode 100644 index 9e4ffce2..00000000 --- a/app/assets/javascripts/supplier/app/templates/dashboard/active-list.emblem +++ /dev/null @@ -1,16 +0,0 @@ -.small-12.columns - = users-buttons users=list.users - .status-icons - if list.needs_help - span.icon.needs-help - if list.needs_payment - span.icon.needs-payment - span.table-number= table-number list.table.table_number - = link-to 'section' list.table.section class="link-to-section" - span=list.table.section.title - span.currency=currency list.total - .actions - = button-mark-list-helped content=list - /= button-remove-list-needs-payment content=list - = button-close-list content=list - = button-show-list content=list diff --git a/app/assets/javascripts/supplier/app/templates/dashboard/active-order.emblem b/app/assets/javascripts/supplier/app/templates/dashboard/active-order.emblem deleted file mode 100644 index bc528ac7..00000000 --- a/app/assets/javascripts/supplier/app/templates/dashboard/active-order.emblem +++ /dev/null @@ -1,16 +0,0 @@ -.small-12.columns - = users-buttons users=order.list.users - .status-icons - if order.active - span.active-order - span.order-display= order.display - span.table-number= table-number order.list.table.table_number - = link-to 'section' order.list.table.section class="link-to-section" - span=order.list.table.section.title - span.currency=currency order.total - .show-list-button-container= button-show-list content=order.list - span.time= time order.created_at format="HH:mm" - .actions - = button-mark-order-active order=order - = button-mark-order-delivered order=order - = button-mark-order-cancelled order=order diff --git a/app/assets/javascripts/supplier/app/templates/employee.emblem b/app/assets/javascripts/supplier/app/templates/employee.emblem deleted file mode 100644 index 7ce7d120..00000000 --- a/app/assets/javascripts/supplier/app/templates/employee.emblem +++ /dev/null @@ -1,19 +0,0 @@ -.row: .small-12.columns - h2.main-section-header=t 'models.employee' - .display-row - .display-label=t 'attributes.employee.name' - .display-field= model.name - .display-row - .display-label=t 'attributes.employee.manager' - .display-field= boolean model.manager - .display-row - .display-label=t 'attributes.employee.active' - .display-field= boolean model.active - .display-row - .display-label=t 'attributes.employee.color' - .display-field: span.current-color= colorbox model.color -.page-actions - .small-12.columns - = link-to 'employees' class="button" - span=t 'models.plural.employee' - a.edit-button{ action 'editEmployee' model}= t 'helpers.links.edit' diff --git a/app/assets/javascripts/supplier/app/templates/employees.emblem b/app/assets/javascripts/supplier/app/templates/employees.emblem deleted file mode 100644 index b06449e8..00000000 --- a/app/assets/javascripts/supplier/app/templates/employees.emblem +++ /dev/null @@ -1,37 +0,0 @@ -.row: .small-12.columns - h2.main-section-header=t 'models.plural.employee' -if employees - each employees as |employee| - .row.employee-row class=employee.active:active:inactive - .small-12.columns - span.colorbox= colorbox employee.color - span.employee-is-manager class=employee.manager:is-manager:is-not-manager - span.icon - a.employee-name{ action 'editEmployee' employee }= employee.name - a.employee-email{ action 'editEmployee' employee }= employee.email - /table.table - thead - tr - th.name=t 'attributes.employee.name' - th.email=t 'attributes.employee.email' - th.boolean= t 'attributes.employee.manager' - th.boolean= t 'attributes.employee.active' - th.colorbox= t 'attributes.employee.color' - th.actions=t 'helpers.actions.title' - tbody - each employees as |employee| - tr - td: link-to 'employee' employee: span= employee.name - td.email - = employee.email - = errors employee.errors.email - td.boolean= boolean employee.manager - td.boolean= boolean employee.active - td.colorbox= colorbox employee.color - td.actions - if (can "manage" "employees") - a.table-edit{ action 'editEmployee' employee }: span - a.table-destroy{ action 'destroyEmployee' employee }: span -if (can "manage" "employees") - .form-row.form-actions: .small-12.columns - a.form-action-new.new-employee-button{action "newEmployee"}= t 'employee.new_button' diff --git a/app/assets/javascripts/supplier/app/templates/flash_message.emblem b/app/assets/javascripts/supplier/app/templates/flash_message.emblem deleted file mode 100644 index 754ec508..00000000 --- a/app/assets/javascripts/supplier/app/templates/flash_message.emblem +++ /dev/null @@ -1 +0,0 @@ -= message diff --git a/app/assets/javascripts/supplier/app/templates/form/boolean-button.emblem b/app/assets/javascripts/supplier/app/templates/form/boolean-button.emblem deleted file mode 100644 index a6df08be..00000000 --- a/app/assets/javascripts/supplier/app/templates/form/boolean-button.emblem +++ /dev/null @@ -1 +0,0 @@ -span= text diff --git a/app/assets/javascripts/supplier/app/templates/form/boolean-switch.emblem b/app/assets/javascripts/supplier/app/templates/form/boolean-switch.emblem deleted file mode 100644 index ace20ef3..00000000 --- a/app/assets/javascripts/supplier/app/templates/form/boolean-switch.emblem +++ /dev/null @@ -1,2 +0,0 @@ -= input type="checkbox" id=switchId checked=value -label for=switchId diff --git a/app/assets/javascripts/supplier/app/templates/form/my-select.hbs b/app/assets/javascripts/supplier/app/templates/form/my-select.hbs deleted file mode 100644 index 62678157..00000000 --- a/app/assets/javascripts/supplier/app/templates/form/my-select.hbs +++ /dev/null @@ -1,20 +0,0 @@ - diff --git a/app/assets/javascripts/supplier/app/templates/form/select_minute_of_day.emblem b/app/assets/javascripts/supplier/app/templates/form/select_minute_of_day.emblem deleted file mode 100644 index 683b1b38..00000000 --- a/app/assets/javascripts/supplier/app/templates/form/select_minute_of_day.emblem +++ /dev/null @@ -1,4 +0,0 @@ -.row.select-minute-of-day - .small-5.columns.hour-of-day= my-select content=hours_list selection=hour identity=false - .small-1.columns: span - .small-5.columns.end.minute-of-hour= my-select content=minutes_list selection=minute identity=false diff --git a/app/assets/javascripts/supplier/app/templates/global/_side_menu.emblem b/app/assets/javascripts/supplier/app/templates/global/_side_menu.emblem deleted file mode 100644 index 1260050e..00000000 --- a/app/assets/javascripts/supplier/app/templates/global/_side_menu.emblem +++ /dev/null @@ -1,41 +0,0 @@ -.side-menu - ul - li.title: h3= globals.current_supplier.name - li - = link-to 'index' - span.icon.dashboard - = t 'dashboard.title' - li - = link-to 'menu' - span.icon.menu - = t 'top_menu.menu' - li - = link-to 'sections' - span.icon.sections - = t 'models.plural.section' - /li - = link-to 'tables' - span.icon.tables - = t 'models.plural.table' - li - = link-to 'lists' - span.icon.lists - = t 'models.plural.list' - if (can "manage" "employees") - li - = link-to 'employees' - span.icon.employees - = t 'models.plural.employee' - li - = link-to 'schedule' - span.icon.schedule - = t 'top_menu.schedule' - if (can "manage" globals.current_supplier) - li - =link-to 'settings' class="supplier-settings-link" - span.icon.settings - span= t 'supplier.settings' - if globals.current_supplier.open - li: a.supplier-close-shop{action "markSupplierClosed"}= t 'supplier.close_for_orders' - else - li: a.supplier-open-shop{action "markSupplierOpen"}= t 'supplier.open_for_orders' diff --git a/app/assets/javascripts/supplier/app/templates/global/_top_menu.emblem b/app/assets/javascripts/supplier/app/templates/global/_top_menu.emblem deleted file mode 100644 index 5331a0c2..00000000 --- a/app/assets/javascripts/supplier/app/templates/global/_top_menu.emblem +++ /dev/null @@ -1,46 +0,0 @@ -header.top-menu - .toggle-side-menu - span - .menu-content - section.main-buttons - = link-to 'index' class="top-menu-root" - = image-tag "icons/logo-small.png" - = link-to "menu" class="top-menu-menu" - span.icon.menu - = t 'top_menu.menu' - = link-to "sections" class="top-menu-sections" - span.icon.sections - = t 'models.plural.section' - /= link-to "tables" class="top-menu-tables" - span.icon.tables - = t 'models.plural.table' - = link-to "lists" class="top-menu-lists" - span.icon.lists - = t 'models.plural.list' - if (can "manage" "employees") - = link-to "employees" class="top-menu-employees" - span.icon.employees - = t 'models.plural.employee' - = link-to "schedule" class="top-menu-schedule" - span.icon.schedule - = t 'top_menu.schedule' - = dropdown-link gravatar=globals.current_employee.email class="current-employee-nav" - ul - li - li= link-to 'my-account': span.current-employee-my-account-icon= t 'current_employee.my_account.link' - li= link-to 'my-schedule': span.current-employee-my-schedule-icon= t 'current_employee.my_schedule.link' - li: a{action "signOut"}: span.sign-out-icon= t 'supplier.sign_out' - if globals.current_supplier.open - a.supplier-availability.currently-open{ action "markSupplierClosed" }: span Open - else - a.supplier-availability.currently-closed{ action "markSupplierOpen" }: span Closed - .supplier-name= globals.current_supplier.name - .extra-info{action "showSupplierStatusInfo"} - .supplier-info-row - .counter.supplier-orders-placed-count - span.supplier-orders-placed-count-number= globals.current_supplier.orders_placed_count - span.orders-placed-count-icon - .supplier-info-row - .counter.supplier-orders-in-process-count - span.supplier-orders-in-process-count-number= globals.current_supplier.orders_in_process_count - span.orders-in-process-count-icon diff --git a/app/assets/javascripts/supplier/app/templates/index.emblem b/app/assets/javascripts/supplier/app/templates/index.emblem deleted file mode 100644 index 2141a91b..00000000 --- a/app/assets/javascripts/supplier/app/templates/index.emblem +++ /dev/null @@ -1,40 +0,0 @@ -if loading_data - .row: .small-12.columns: .panel: span.loading -else - .row: .small-12.columns - = sections-header active_section=globals.active_section - if (can "manage" globals.current_supplier) - unless globals.current_supplier.open - .alert-box.alert.radius data-alert=true - = t 'supplier.you_are_currently_closed_alert' - a{ action "markSupplierOpen" }= t 'supplier.open_for_orders' - .page-header - if active_lists.length - h3.dashboard-lists-header{action "toggleDashboardLists"} - if show_lists - span.icon - else - span.icon.collapsed - =t 'active_lists.title' - span= list_number_info - else - h3=t 'dashboard.active_lists.no_lists' - if show_lists_table - .active-lists-table - each active_lists as |list| - = dashboard-active-list list=list - .page-header - if active_orders.length - h3.dashboard-orders-header{action "toggleDashboardOrders"} - if show_orders - span.icon - else - span.icon.collapsed - =t 'active_orders.title' - span= order_number_info - else - h3= t 'dashboard.active_orders.no_orders' - if show_orders_table - .active-orders-table - each active_orders as |order| - = dashboard-active-order order=order diff --git a/app/assets/javascripts/supplier/app/templates/list.emblem b/app/assets/javascripts/supplier/app/templates/list.emblem deleted file mode 100644 index 02b583b3..00000000 --- a/app/assets/javascripts/supplier/app/templates/list.emblem +++ /dev/null @@ -1,5 +0,0 @@ -.row: .small-12.columns - h2.main-section-header=t 'models.list' - partial "list/content" - link-to 'lists' class="button" - span=t 'list.go_to_lists' diff --git a/app/assets/javascripts/supplier/app/templates/list/_content.emblem b/app/assets/javascripts/supplier/app/templates/list/_content.emblem deleted file mode 100644 index c9e59815..00000000 --- a/app/assets/javascripts/supplier/app/templates/list/_content.emblem +++ /dev/null @@ -1,36 +0,0 @@ -.display-row - .display-label=t 'attributes.list.created_at' - .display-field=time list.created_at -if list.closed_at - .display-row - .display-label=t 'attributes.list.closed_at' - .display-field=time list.closed_at -.display-row - .display-label=t 'attributes.list.state' - .display-field=state 'list' list.state -if list.active - .display-row - .display-label=t 'models.section' - .display-field= link-to "section" list.table.section: list.table.section.title - .display-row - .display-label=t 'models.table' - .display-field - = button-change-list-table list=list -.display-row - .display-label.show-for-medium-up   - .display-field - = button-mark-list-helped content=list - = button-remove-list-needs-payment content=list - = button-close-list content=list -= users-buttons users=list.users -if list.sorted_orders - .list-orders-container - each list.sorted_orders as |order| - = list-order order=order - if showTotal - .list-orders-total.total - = t 'general.total' - span.currency= currency list.total -else - p - span=t 'active_list.no_orders_explanation' diff --git a/app/assets/javascripts/supplier/app/templates/list/order.emblem b/app/assets/javascripts/supplier/app/templates/list/order.emblem deleted file mode 100644 index 4b587d28..00000000 --- a/app/assets/javascripts/supplier/app/templates/list/order.emblem +++ /dev/null @@ -1,7 +0,0 @@ -= order.display -span.currency= currency order.total -span.created_at= time order.created_at -.list-order-actions - = button-mark-order-active order=order - = button-mark-order-delivered order=order - = button-mark-order-cancelled order=order diff --git a/app/assets/javascripts/supplier/app/templates/lists.emblem b/app/assets/javascripts/supplier/app/templates/lists.emblem deleted file mode 100644 index 26191258..00000000 --- a/app/assets/javascripts/supplier/app/templates/lists.emblem +++ /dev/null @@ -1 +0,0 @@ -= outlet diff --git a/app/assets/javascripts/supplier/app/templates/lists/index.emblem b/app/assets/javascripts/supplier/app/templates/lists/index.emblem deleted file mode 100644 index 69b8ba59..00000000 --- a/app/assets/javascripts/supplier/app/templates/lists/index.emblem +++ /dev/null @@ -1,64 +0,0 @@ -.row: .small-12.columns.lists-route - h2.main-section-header=t 'models.plural.list' - = list-display-date-selector value=date -if loading - .row: .small-12.columns: .panel: span.loading -else - if sorted_lists - each sorted_lists as |list| - .row.list-row class=list.active:active:inactive - .small-12.columns - = link-to 'list' list - span.boolean.needs-help=boolean list.needs_help - span.boolean.needs-payment=boolean list.needs_payment - span.timestamp.created_at= time list.created_at - span.state= state 'list' list.state - span.table-number= table-number list.table.table_number - span.currency= currency list.price - .row.list-row-total: .small-12.columns - span.total-sentence= t 'lists.index.total_sentence' - span.currency= currency date_lists_total - else - .row: .small-12.columns - .panel=t 'list.none_found' -/.row.sections-route: .small-12.columns - h2.main-section-header=t 'models.plural.list' - = list-display-date-selector value=date - if loading - .row: .small-12.columns: .panel: span.loading - else - if sorted_lists - table.table - thead - tr - th.state=t 'attributes.list.state' - th.boolean=t 'attributes.list.needs_help' - th.boolean=t 'attributes.list.needs_payment' - th.timestamp=t 'attributes.list.closed_at' - th.table_number=t 'models.table' - th.currentcy=t 'attributes.list.price' - th.timestamp=t 'attributes.list.created_at' - tbody - each sorted_lists as |list| - tr - td.state - link-to 'list' list.id - = state 'list' list.state - td.boolean.needs_help=boolean list.needs_help - td.boolean.needs_payment=boolean list.needs_payment - td.timestamp=time list.closed_at - td.table_number= list.table.table_number - td.currency=currency list.price - td.timestamp=time list.created_at - tfoot - tr - td - td - td - td - td - td.total.currency= currency date_lists_total - td - else - .row: .small-12.columns - .panel=t 'list.none_found' diff --git a/app/assets/javascripts/supplier/app/templates/menu.emblem b/app/assets/javascripts/supplier/app/templates/menu.emblem deleted file mode 100644 index b102968b..00000000 --- a/app/assets/javascripts/supplier/app/templates/menu.emblem +++ /dev/null @@ -1,21 +0,0 @@ -= menu-time-preview -.row: .small-12.columns - .products-menu-filters-container - = input value=product_code_filter type="search" placeholder=product_code_filter_placeholder - h2.main-section-header Menu -each sorted_product_categories as |product_category| - .row.product_category-container: .small-12.columns - .product_category-header - if (can "manage" "menu") - a.move{action "moveProductCategory" product_category} href="#" - span.title= product_category.name - span.availability= product_category.availability_text - if (can "manage" "menu") - a.edit-product-category-button{action "editProductCategory" product_category} href="#": span - a.add-product-product_category-button{action "addProduct" product_category} href="#": span - each product_category.sorted_products as |product| - = menu-product product=product code_filter=product_code_filter -if (can "manage" "menu") - .row - .small-12.columns - a.new-product_category-button{action "newProductCategory"} href="#" = t 'product_category.new_button' diff --git a/app/assets/javascripts/supplier/app/templates/modals/add_section.emblem b/app/assets/javascripts/supplier/app/templates/modals/add_section.emblem deleted file mode 100644 index 4d7982ac..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/add_section.emblem +++ /dev/null @@ -1,16 +0,0 @@ -.form-row - .form-label - label=t 'attributes.section.title' - .form-field= input value=section_title -.form-row - .form-label - label=t 'attributes.section.width' - .form-field= number-field numericValue=section_width -.form-row - .form-label - label=t 'attributes.section.height' - .form-field - .form-field= number-field numericValue=section_height -hr -button.modal-close{action "close"}=t 'section.add_section.modal.close_button' -button.modal-confirm.right{action "addSection"}=t 'section.add_section.modal.add_button' diff --git a/app/assets/javascripts/supplier/app/templates/modals/add_section_element.emblem b/app/assets/javascripts/supplier/app/templates/modals/add_section_element.emblem deleted file mode 100644 index 00cc6356..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/add_section_element.emblem +++ /dev/null @@ -1,8 +0,0 @@ -if svg_element.isLoading - span.fa.fa-2x.fa-spinner.fa-spin -else - ul.add-section-element-list - each svg_elements as |svg_element| - li: a{action "addSectionElement" svg_element}= svg svg_element.svg width=svg_element.box_width height=svg_element.box_height -hr -button.modal-close{action "close"}=t 'section.add_section.modal.close_button' diff --git a/app/assets/javascripts/supplier/app/templates/modals/alert.emblem b/app/assets/javascripts/supplier/app/templates/modals/alert.emblem deleted file mode 100644 index 76037ce7..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/alert.emblem +++ /dev/null @@ -1,3 +0,0 @@ -p=body -hr -button.modal-close{action "close"}= t 'confirm.cancel' diff --git a/app/assets/javascripts/supplier/app/templates/modals/change-list-table.emblem b/app/assets/javascripts/supplier/app/templates/modals/change-list-table.emblem deleted file mode 100644 index 945267fc..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/change-list-table.emblem +++ /dev/null @@ -1,10 +0,0 @@ -h4=t 'modal.change_list_table.subtitle' current_table_number=model.table.table_number -= users-buttons users=model.users -each sections as |section| - h3= section.title - ul.change-list-table-section-tables - each section.sorted_tables as |table| - unless table.active_list - li: a{action "moveToTable" table}= table-number table.table_number -hr -button.modal-close{action "close"}=t 'modal.change_list_table.close_button' diff --git a/app/assets/javascripts/supplier/app/templates/modals/close_list.emblem b/app/assets/javascripts/supplier/app/templates/modals/close_list.emblem deleted file mode 100644 index 7696ed0a..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/close_list.emblem +++ /dev/null @@ -1,4 +0,0 @@ -p= t 'list.close.modal.message' -hr -button.modal-close{action "close"}= t 'list.close.modal.cancel' -button.modal-confirm.right{action "confirm"}= t 'list.close.modal.close_list' diff --git a/app/assets/javascripts/supplier/app/templates/modals/confirm.emblem b/app/assets/javascripts/supplier/app/templates/modals/confirm.emblem deleted file mode 100644 index 15948948..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/confirm.emblem +++ /dev/null @@ -1,4 +0,0 @@ -p=body -hr -button.modal-close{action "close"}= t 'confirm.cancel' -button.modal-confirm.right{action "confirm"}= t 'confirm.confirm' diff --git a/app/assets/javascripts/supplier/app/templates/modals/employee_edit.emblem b/app/assets/javascripts/supplier/app/templates/modals/employee_edit.emblem deleted file mode 100644 index fe1f4bb0..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/employee_edit.emblem +++ /dev/null @@ -1,30 +0,0 @@ -p=t 'employee.modal.body_header' -.form-row.name - .form-label=t 'attributes.employee.name' - .form-field - = input valueBinding="model.name" - = errors model.errors.name -.form-row.email - .form-label=t 'attributes.employee.email' - .form-field.half - = input type="email" valueBinding="model.email" action="save" - = errors model.errors.email -if isNotSelf - .form-row.manager - .form-label= t 'attributes.employee.manager' - .form-field= boolean-switch value=model.manager - .form-row.active - .form-label= t 'attributes.employee.active' - .form-field= boolean-switch value=model.active - -.form-row.color - .form-label= t 'attributes.employee.color' - .form-field.full - span.current-color= colorbox model.color - each colors as |color| - a{action "setColor" color}= colorbox color -hr -button.modal-close{action "close"}=t 'employee.modal.close_button' -button.modal-confirm.right{action "save"} disabled=model.isInvalid - t 'employee.modal.save_button' -button.modal-destroy.right{action "destroyRecord"}= t 'general.destroy_button' diff --git a/app/assets/javascripts/supplier/app/templates/modals/employee_shift.emblem b/app/assets/javascripts/supplier/app/templates/modals/employee_shift.emblem deleted file mode 100644 index 6b867520..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/employee_shift.emblem +++ /dev/null @@ -1,15 +0,0 @@ -p=t 'employee_shift.modal.body_header' -.form-row.name - .form-label= t 'models.employee' - .form-field= model.employee.name -.form-row.description - .form-label=t 'attributes.employee_shift.description' - .form-field.full - = input valueBinding="model.description" - = errors model.errors.description -hr -button.modal-close{action "close"}=t 'employee_shift.modal.close_button' -button.modal-confirm.right{action "save"} disabled=model.isInvalid - =t 'employee_shift.modal.save_button' -button.modal-destroy.right{action "destroyRecord"} - =t 'employee_shift.modal.destroy_button' diff --git a/app/assets/javascripts/supplier/app/templates/modals/layout.emblem b/app/assets/javascripts/supplier/app/templates/modals/layout.emblem deleted file mode 100644 index a2d072bc..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/layout.emblem +++ /dev/null @@ -1,8 +0,0 @@ -.overlay{action "closeOnOverlay"} - .modal{action "modalClick" bubbles=false preventDefault=false} - .modal-header - h3.flush--top= title - hr - .modal-body - .modal-alert== alert_message - = yield diff --git a/app/assets/javascripts/supplier/app/templates/modals/product_category_edit.emblem b/app/assets/javascripts/supplier/app/templates/modals/product_category_edit.emblem deleted file mode 100644 index de69560f..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/product_category_edit.emblem +++ /dev/null @@ -1,6 +0,0 @@ -p=t 'product_category.modal.edit.body_header' -= partial "modals/product_category_form" -hr -button.modal-close{action "close"}=t 'product_category.modal.edit.close_button' -button.modal-save.right{action "save"}=t 'product_category.modal.edit.save_button' -button.modal-destroy.right{action "destroyRecord"}=t 'product_category.modal.edit.destroy_button' diff --git a/app/assets/javascripts/supplier/app/templates/modals/product_category_form.emblem b/app/assets/javascripts/supplier/app/templates/modals/product_category_form.emblem deleted file mode 100644 index 40585909..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/product_category_form.emblem +++ /dev/null @@ -1,41 +0,0 @@ -.form-row.name - .form-label.half=t 'attributes.product_category.name' - .form-field.half= input value=model.name action="save" -.row - .small-12.medium-6.columns - unless model.supplier.week_starts_on_monday - .form-row.sunday - .form-label.half= t 'date.day_name.sunday' - .form-field.half= boolean-switch value=model.active_on_sunday - .form-row.monday - .form-label.half= t 'date.day_name.monday' - .form-field.half= boolean-switch value=model.active_on_monday - .form-row.tuesday - .form-label.half= t 'date.day_name.tuesday' - .form-field.half= boolean-switch value=model.active_on_tuesday - .form-row.wednesday - .form-label.half= t 'date.day_name.wednesday' - .form-field.half= boolean-switch value=model.active_on_wednesday - .form-row.thursday - .form-label.half= t 'date.day_name.thursday' - .form-field.half= boolean-switch value=model.active_on_thursday - .form-row.friday - .form-label.half= t 'date.day_name.friday' - .form-field.half= boolean-switch value=model.active_on_friday - .form-row.saturday - .form-label.half= t 'date.day_name.saturday' - .form-field.half= boolean-switch value=model.active_on_saturday - if model.supplier.week_starts_on_monday - .form-row.sunday - .form-label.half= t 'date.day_name.sunday' - .form-field.half= boolean-switch value=model.active_on_sunday - .small-12.medium-6.columns - .row - .small-12.columns.text-center= boolean-button value=model.full_day reverse=true text_path="product_category.modal.active_between.top" class="toggle-full-day-button" - unless model.full_day - .row - .small-12.columns.select-start_from= select-minute-of-day value=model.start_from - .row - .small-12.columns.text-center= t 'product_category.modal.active_between.middle' - .row - .small-12.columns.select-end_on= select-minute-of-day value=model.end_on diff --git a/app/assets/javascripts/supplier/app/templates/modals/product_category_move.emblem b/app/assets/javascripts/supplier/app/templates/modals/product_category_move.emblem deleted file mode 100644 index b918e3e2..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/product_category_move.emblem +++ /dev/null @@ -1,22 +0,0 @@ -p=t 'product_category.modal.move.body_header' -.row - .small-11.small-offset-1.columns - a{action "moveBelow"} href="#" = t 'product_category.modal.move.move_to_top' -h4=t 'product_category.modal.move.move_below_label' -each product_categories as |product_category| - .row.product_category-move-row - .small-11.small-offset-1.columns - a{action "moveBelow" product_category} href="#" - span.title= product_category.name - span.availability= product_category.availability_text -if model.products - hr - h4=t 'product_category.modal.move.products.title' - hr - ul.sortable - each model.sorted_products as |product| - li.sortable-item-container data-sortable-id=product.id - span.handle - span= product.name -hr -button.modal-close{action "close"}=t 'section.add_tables.modal.close_button' diff --git a/app/assets/javascripts/supplier/app/templates/modals/product_category_new.emblem b/app/assets/javascripts/supplier/app/templates/modals/product_category_new.emblem deleted file mode 100644 index f8e642fe..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/product_category_new.emblem +++ /dev/null @@ -1,6 +0,0 @@ -p=t 'product_category.modal.new.body_header' -= partial "modals/product_category_form" -hr -button.modal-close{action "close"}=t 'product_category.modal.new.close_button' -button.modal-save.right{action "save"} disabled=model.isInvalid - =t 'product_category.modal.new.save_button' diff --git a/app/assets/javascripts/supplier/app/templates/modals/section_add_tables.emblem b/app/assets/javascripts/supplier/app/templates/modals/section_add_tables.emblem deleted file mode 100644 index ea3d3885..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/section_add_tables.emblem +++ /dev/null @@ -1,16 +0,0 @@ -p=t 'section.add_tables.modal.body_header' -form.form-horizontal - .control-group - .form-row - .form-label - label for='add-tables-number-start' - =t 'section.add_tables.modal.number_start' - .form-field= number-field numericValue=number_start - .form-row - .form-label - label for='add-tables-number-end' - =t 'section.add_tables.modal.number_end' - .form-field= number-field numericValue=number_end -hr -button.modal-close{action "close"}=t 'section.add_tables.modal.close_button' -button.modal-confirm.right{action "addTables"}=t 'section.add_tables.modal.add_button' diff --git a/app/assets/javascripts/supplier/app/templates/modals/section_area.emblem b/app/assets/javascripts/supplier/app/templates/modals/section_area.emblem deleted file mode 100644 index 9eb4c687..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/section_area.emblem +++ /dev/null @@ -1,32 +0,0 @@ -p= t 'section_area.modal.explanation' -.form-row.title - .form-label=t 'attributes.section_area.title' - .form-field= input value=model.title - .form-info - = errors model.errors.title -.form-row.width - .form-label=t 'attributes.section_area.width' - .form-field= input type="number" value=model.width - .form-info - span.dimension m - = errors model.errors.width -.form-row.height - .form-label=t 'attributes.section_area.height' - .form-field= input type="number" value=model.height - .form-info - span.dimension m - = errors model.errors.height -.form-row.rounded - .form-label= t 'attributes.section_area.rounded' - .form-field= boolean-switch value=model.rounded -.form-row.color - .form-label= t 'attributes.employee.color' - .form-field.full - span.current-color= colorbox model.color - each colors as |color| - a{action "setColor" color}= colorbox color -hr -button.modal-close{action "rollback_and_close"}=t 'section_area.modal.close_button' -button.modal-confirm.right{action "close"} disabled=model.isInvalid - =t 'section_area.modal.save_button' -button.modal-destroy.right{action "destroyRecord"}= t 'section_area.modal.destroy_button' diff --git a/app/assets/javascripts/supplier/app/templates/modals/section_arrange_tables.emblem b/app/assets/javascripts/supplier/app/templates/modals/section_arrange_tables.emblem deleted file mode 100644 index cafc3fb2..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/section_arrange_tables.emblem +++ /dev/null @@ -1,30 +0,0 @@ -p=t 'section.arrange_tables.modal.body_header' -if canArrangeTables - .arrange-type-buttons - if isDistributed - span.arrange-tables-current-type.distributed=t 'section.arrange_tables.modal.distributed.title' - else - button.arrange-tables-type-button.distributed{action "makeDistributed"}=t 'section.arrange_tables.modal.distributed.title' - if isByRow - span.arrange-tables-current-type.by_row=t 'section.arrange_tables.modal.by_row.title' - else - button.arrange-tables-type-button.by_row{action "makeByRow"}=t 'section.arrange_tables.modal.by_row.title' - if isByColumn - span.arrange-tables-current-type.by_column=t 'section.arrange_tables.modal.by_column.title' - else - button.arrange-tables-type-button.by_column{action "makeByColumn"}=t 'section.arrange_tables.modal.by_column.title' - .arrange-content - if isDistributed - =t 'section.arrange_tables.modal.distributed.explanation' - if isByRow - =t 'section.arrange_tables.modal.by_row.before_field' - = number-field numericValue=row_count - =t 'section.arrange_tables.modal.by_row.after_field' - if isByColumn - =t 'section.arrange_tables.modal.by_column.before_field' - = number-field numericValue=column_count - =t 'section.arrange_tables.modal.by_column.after_field' -hr -button.modal-close{action "close"}=t 'section.arrange_tables.modal.close_button' -if canArrangeTables - button.modal-confirm.right{action "arrangeTables"}=t 'section.arrange_tables.modal.arrange_button' diff --git a/app/assets/javascripts/supplier/app/templates/modals/select_employee.emblem b/app/assets/javascripts/supplier/app/templates/modals/select_employee.emblem deleted file mode 100644 index 63e3d274..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/select_employee.emblem +++ /dev/null @@ -1,7 +0,0 @@ -p= modal_options.header -ul.select-employees - each employees as |employee| - li.select-employee - = employee.name - a.employee-selector{action "selectEmployee" employee}: span -button.modal-close{action "close"}=t 'employee.select_modal.close_button' diff --git a/app/assets/javascripts/supplier/app/templates/modals/supplier_status_info.emblem b/app/assets/javascripts/supplier/app/templates/modals/supplier_status_info.emblem deleted file mode 100644 index c038af13..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/supplier_status_info.emblem +++ /dev/null @@ -1,13 +0,0 @@ -p== t 'supplier_status_info.header' -.row: .small-12.columns - .counter.supplier-orders-placed-count - = model.orders_placed_count - span.orders-placed-count-icon - = t 'supplier_status_info.orders_placed_count_explanation' count=model.orders_placed_count -.row: .small-12.columns - .counter.supplier-orders-in-process-count - = model.orders_in_process_count - span.orders-in-process-count-icon - = t 'supplier_status_info.orders_in_process_count_explanation' count=model.orders_in_process_count -hr -button.modal-confirm.right{action "close"}= t 'supplier_status_info.close' diff --git a/app/assets/javascripts/supplier/app/templates/modals/table_edit.emblem b/app/assets/javascripts/supplier/app/templates/modals/table_edit.emblem deleted file mode 100644 index f0a9cec0..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/table_edit.emblem +++ /dev/null @@ -1,18 +0,0 @@ -p=t 'table.modal.body_header' -.form-row.number - .form-label=t 'attributes.table.table_number' - .form-field= number-field numericValue=model.number -.form-row.section - .form-label=t 'models.section' - .form-field= my-select content=sections selection=model.section optionLabelPath="title" optionValuePath="id" -.form-row.width - .form-label=t 'attributes.table.width' - .form-field= number-field numericValue=model.width -.form-row.height - .form-label=t 'attributes.table.height' - .form-field= number-field numericValue=model.height -hr -button.modal-close{action "rollback_and_close"}=t 'table.modal.close_button' -button.modal-confirm.right{action "saveTable"}=t 'table.modal.save_button' -button.modal-destroy.right{action "destroyRecord"}=t 'table.modal.destroy_button' -= qr-codes-link table=model diff --git a/app/assets/javascripts/supplier/app/templates/modals/user_info.emblem b/app/assets/javascripts/supplier/app/templates/modals/user_info.emblem deleted file mode 100644 index 01a9a966..00000000 --- a/app/assets/javascripts/supplier/app/templates/modals/user_info.emblem +++ /dev/null @@ -1,11 +0,0 @@ -.form-row - .form-label   - .form-value= model.avatar_tag -.form-row - .form-label= t 'attributes.user.name' - .form-value= model.name -.form-row - .form-label= t 'user.number_of_lists_at_supplier' - .form-value 1 -hr -button.modal-close.right{action "close"}=t 'general.close' diff --git a/app/assets/javascripts/supplier/app/templates/my-account.emblem b/app/assets/javascripts/supplier/app/templates/my-account.emblem deleted file mode 100644 index 81fd0e12..00000000 --- a/app/assets/javascripts/supplier/app/templates/my-account.emblem +++ /dev/null @@ -1,7 +0,0 @@ -.row: .small-12.columns - h2.main-section-header=t 'current_employee.my_account.title' - .form-row - .form-label: label=t 'attributes.employee.email' - .form-field= input value=globals.current_employee.email type="email" class="supplier-email" disabled=true - = language-switcher - = suppliers-switcher diff --git a/app/assets/javascripts/supplier/app/templates/my-schedule.emblem b/app/assets/javascripts/supplier/app/templates/my-schedule.emblem deleted file mode 100644 index d32c90f3..00000000 --- a/app/assets/javascripts/supplier/app/templates/my-schedule.emblem +++ /dev/null @@ -1,3 +0,0 @@ -.row: .small-12.columns - h2.main-section-header=t 'current_employee.my_schedule.title' - #schedule-placeholder diff --git a/app/assets/javascripts/supplier/app/templates/orders-display.emblem b/app/assets/javascripts/supplier/app/templates/orders-display.emblem deleted file mode 100644 index b8bd7ec0..00000000 --- a/app/assets/javascripts/supplier/app/templates/orders-display.emblem +++ /dev/null @@ -1,25 +0,0 @@ -= sections-header active_section=globals.active_section -table.table - thead - tr - th.user-info - th.status-icons - th=t 'models.order' - th.numeric=t 'table_number' - th=t 'models.section' - th.currency=t 'active_orders.price' - th.time - tbody - each orders as |order| - tr - td= users-buttons users=order.list.users - td.status-icons - if order.active - span.active-order.fa.fa-check.fa-lg - td= order.display - td.numeric.table_number=table-number-with-info list=order.list - td.section_title - = link-to 'section' order.list.table.section.id - span=order.list.table.section.title - td.currency=currency order.total - td.time= time order.created_at format="HH:mm" diff --git a/app/assets/javascripts/supplier/app/templates/page.emblem b/app/assets/javascripts/supplier/app/templates/page.emblem deleted file mode 100644 index c67b656b..00000000 --- a/app/assets/javascripts/supplier/app/templates/page.emblem +++ /dev/null @@ -1,4 +0,0 @@ -.row: .small-12.columns - h2.main-section-header=model.title - /= page-body model.body - = page-body page=model diff --git a/app/assets/javascripts/supplier/app/templates/schedule.emblem b/app/assets/javascripts/supplier/app/templates/schedule.emblem deleted file mode 100644 index 692a2431..00000000 --- a/app/assets/javascripts/supplier/app/templates/schedule.emblem +++ /dev/null @@ -1,3 +0,0 @@ -.row: .small-12.columns - h2.main-section-header= t 'schedule.title' globals.current_supplier - #schedule-placeholder diff --git a/app/assets/javascripts/supplier/app/templates/section.emblem b/app/assets/javascripts/supplier/app/templates/section.emblem deleted file mode 100644 index 1eb7f29e..00000000 --- a/app/assets/javascripts/supplier/app/templates/section.emblem +++ /dev/null @@ -1,31 +0,0 @@ -.section-tabs-container.main-section-header - = link-to 'sections' class="goto-sections-index-tab-header": span - each sections as |section| - = section-tab-header section=section - if (can "manage" "sections") - a.add-section{action "addSection"}: span -.section-manage-tables.pull-right - unless model.editmode - a.go-to-orders-list{ action "showDashboardOrders" model }: span - if (can "manage" "sections") - if model.editmode - a.section-rollback-button{ action "rollbackEditable" }: span - = input type="text" value=model.title class="section-edit-title-field" - = number-field numericValue=model.width class="dimension section-edit-width-field" - span.fa.fa-lg.fa-times - = number-field numericValue=model.height class="dimension section-edit-height-field" - = dropdown-link title="Action" - ul - li: a{action "addTables"}: span.section-add-tables-icon=t 'section.add_tables.button_label' - li: a{action "arrangeTables"}: span.section-arrange-tables-icon=t 'section.arrange_tables.modal.title' - li: a{action "addSectionElement"}: span.icon.section-elements= t 'section_element.add_button' - li: a{action "addSectionArea"}: span.icon.section-areas= t 'section_area.add_button' - li= qr-codes-link section=content: span.qr-icon= t 'table.print_qr_codes' - li: a.section-destroy{action "destroySection"}: span.section-remove-icon=t 'helpers.links.destroy' - a.section-normal-mode-button{ action "finishEditable" }: span - else - = dropdown-link title="Action" - ul - li= qr-codes-link section=content: span.qr-icon= t 'table.print_qr_codes' - a.section-edit-mode-button{ action "makeEditable" }: span -= section-tables section=model diff --git a/app/assets/javascripts/supplier/app/templates/section/area.emblem b/app/assets/javascripts/supplier/app/templates/section/area.emblem deleted file mode 100644 index fa189fca..00000000 --- a/app/assets/javascripts/supplier/app/templates/section/area.emblem +++ /dev/null @@ -1 +0,0 @@ -.title= section_area.title diff --git a/app/assets/javascripts/supplier/app/templates/section/element.emblem b/app/assets/javascripts/supplier/app/templates/section/element.emblem deleted file mode 100644 index 09c0c32a..00000000 --- a/app/assets/javascripts/supplier/app/templates/section/element.emblem +++ /dev/null @@ -1,6 +0,0 @@ -= svg section_element.svg width=section_element.box_width height=section_element.box_height rotation=section_element.rotation -if showHandles - .section-element-handles.handles-inside-draggable - a.rotate-left{action "rotateLeft" bubbles=false}: span.icon - a.rotate-right{action "rotateRight" bubbles=false}: span.icon - a.remove-section-element{action "removeSectionElement" bubbles=false}: span.icon diff --git a/app/assets/javascripts/supplier/app/templates/section/tab-header.emblem b/app/assets/javascripts/supplier/app/templates/section/tab-header.emblem deleted file mode 100644 index 6db55c1a..00000000 --- a/app/assets/javascripts/supplier/app/templates/section/tab-header.emblem +++ /dev/null @@ -1 +0,0 @@ -= section.title diff --git a/app/assets/javascripts/supplier/app/templates/section/table.emblem b/app/assets/javascripts/supplier/app/templates/section/table.emblem deleted file mode 100644 index 0d85e650..00000000 --- a/app/assets/javascripts/supplier/app/templates/section/table.emblem +++ /dev/null @@ -1,23 +0,0 @@ -.table-number= table.table_number -unless section.editmode - .status-icons - span.needs_payment - span.needs_help - span.active_order -if table.active_list - div.table-actions - .title= table.table_number - if table.active_list - .table-action-row - /= view "mark-list-helped-button" tableBinding="table.active_list" - = button-mark-list-helped content=table.active_list - /= view "close-list-button" tableBinding="table.active_list" - = button-close-list content=table.active_list - each table.active_list.active_orders as |order| - .table-action-row= order.display_tag - .table-action-row.total - = link-to "list" table.active_list.id - =currency table.active_list.total - /.table-action-row - a{action "editTable" table}: span.fa.fa-lg.fa-wrench - = users-buttons users=table.active_list.users diff --git a/app/assets/javascripts/supplier/app/templates/section/tables.emblem b/app/assets/javascripts/supplier/app/templates/section/tables.emblem deleted file mode 100644 index 3e39934d..00000000 --- a/app/assets/javascripts/supplier/app/templates/section/tables.emblem +++ /dev/null @@ -1,6 +0,0 @@ -each section.section_elements as |section_element| - = section-element section_element=section_element section=section dpm=dpm -each section.section_areas as |section_area| - = section-area section_area=section_area section=section dpm=dpm -each section.tables as |table| - = section-table table=table section=section dpm=dpm diff --git a/app/assets/javascripts/supplier/app/templates/sections.emblem b/app/assets/javascripts/supplier/app/templates/sections.emblem deleted file mode 100644 index 26191258..00000000 --- a/app/assets/javascripts/supplier/app/templates/sections.emblem +++ /dev/null @@ -1 +0,0 @@ -= outlet diff --git a/app/assets/javascripts/supplier/app/templates/sections/index.emblem b/app/assets/javascripts/supplier/app/templates/sections/index.emblem deleted file mode 100644 index 00fdaadf..00000000 --- a/app/assets/javascripts/supplier/app/templates/sections/index.emblem +++ /dev/null @@ -1,54 +0,0 @@ -.row.sections-route: .small-12.columns - h2.main-section-header=t 'models.plural.section' -if sections - each sections as |section| - .row.section-row: .small-12.columns - a.section-title{ action "goToSection" section}= section.title - span.section-dimensions= dimensions section.width section.height - span.section-actions - a.section-dashboard-orders.go-to-orders-list{action "showDashboardOrders" section}: span.icon - = qr-codes-link section=section -if (can "manage" "sections") - .form-row.form-actions: .small-12.columns - a.form-action-new{action "addSection"}=t 'helpers.links.new' -/.row: .small-12.columns - h2.main-section-header=t 'models.plural.section' - if sections - table.table - thead - tr - th=t 'attributes.section.title' - th=t 'models.plural.table' - th.numeric=t 'attributes.section.width' - th.numeric=t 'attributes.section.height' - /th.boolean=t 'attributes.list.needs_help' - /th.boolean=t 'attributes.list.needs_payment' - /th.timestamp=t 'attributes.list.closed_at' - /th.table_number=t 'models.table' - /th.currentcy=t 'attributes.list.price' - /th.timestamp=t 'attributes.list.created_at' - th.actions=t 'helpers.actions.title' - tbody - each sections as |section| - tr - td - a{ action "goToSection" section}= section.title - td - span.table-count= section.tables.length - td.numeric=dimension section.width - td.numeric=dimension section.height - /td.boolean.needs_help=boolean list.needs_help - /td.boolean.needs_payment=boolean list.needs_payment - /td.timestamp=time list.closed_at - /td.table_number 7 - /td.currency=currency list.price - /td.timestamp=time list.created_at - td.actions - a.section-dashboard-orders.go-to-orders-list{action "showDashboardOrders" section}: span - = qr-codes-link section=section - else - .row: .small-12.columns - .panel=t 'section.none_found' - if (can "manage" "sections") - .form-actions - a.form-action-new{action "addSection"}=t 'helpers.links.new' diff --git a/app/assets/javascripts/supplier/app/templates/settings.emblem b/app/assets/javascripts/supplier/app/templates/settings.emblem deleted file mode 100644 index 7faea10b..00000000 --- a/app/assets/javascripts/supplier/app/templates/settings.emblem +++ /dev/null @@ -1,51 +0,0 @@ -.row: .small-12.columns: h2=t 'settings.title' -.form-row - .form-label: label=t 'attributes.supplier.name' - .form-field= input type="text" value=globals.current_supplier.name class="supplier-name" -.form-row - .form-label: label=t 'attributes.supplier.user_message' - .form-field= textarea value=globals.current_supplier.user_message class="supplier-user-message" -.form-row - .form-label: label=t 'attributes.supplier.email' - .form-field= input value=globals.current_supplier.email type="email" class="supplier-email" -/input.location_picker name="location" type="text" valueBinding="location" -/.form-row - .location_picker_map - = image-tag 'supplier/settings/location-balloon.png' -/.form-row - .form-label: label=t 'attributes.supplier.time_zone' - .form-field: Ember.Select content=time_zones optionValuePath="content.name" optionLabelPath="content.formatted" valueBinding="supplier.time_zone" -.form-row - .form-label: label=t 'attributes.supplier.address' - .form-field.full - .row - .large-8.medium-8.columns= input value=globals.current_supplier.address - .large-1.show-for-large-up.columns   - .large-2.medium-2.small-3.columns= number-field numericValue=globals.current_supplier.house_number - .large-1.medium-2.small-2.columns= input value=globals.current_supplier.house_number_addition -.form-row - .form-label: label=t 'attributes.supplier.postal_code' - .form-field= input value=globals.current_supplier.postal_code -.form-row - .form-label: label=t 'attributes.supplier.city' - .form-field= input value=globals.current_supplier.city -.form-row - .form-label: label=t 'attributes.supplier.country' - .form-field: my-select content=countries selection=globals.current_supplier.country identity=false -if editIensProfile - .form-row - .form-label: label=t 'attributes.supplier.iens_profile' - .form-field - = number-field numericValue=globals.current_supplier.iens_profile - = image-tag 'supplier/settings/iens-example.png' - span=t "settings.reviews.explanation" -.row: .small-12.columns= language-switcher -.form-row.form-actions - if saving - button.button.submit-supplier-settings.disabled - = t 'settings.save' - span.fa.fa-lg.fa-spinner.fa-spin - else - button.button.submit-supplier-settings{action 'saveSettings'}=t 'settings.save' - -.row: .small-12.columns= suppliers-switcher diff --git a/app/assets/javascripts/supplier/app/templates/table.emblem b/app/assets/javascripts/supplier/app/templates/table.emblem deleted file mode 100644 index e6aa027f..00000000 --- a/app/assets/javascripts/supplier/app/templates/table.emblem +++ /dev/null @@ -1,12 +0,0 @@ -.row: .small-12.columns - h2.main-section-header=t 'models.table' - .display-row - .display-label= t 'attributes.table.table_number' - .display-field - span= table.table_number - if table.section - .display-row - .display-label=t 'models.section' - .display-field - link-to 'section' table.section - span= table.section.title diff --git a/app/assets/javascripts/supplier/app/templates/table_number_with_info.emblem b/app/assets/javascripts/supplier/app/templates/table_number_with_info.emblem deleted file mode 100644 index f4e6ebe8..00000000 --- a/app/assets/javascripts/supplier/app/templates/table_number_with_info.emblem +++ /dev/null @@ -1,3 +0,0 @@ -.number= list.table.table_number -.extra-list-info - span.loading.medium diff --git a/app/assets/javascripts/supplier/app/templates/tables.emblem b/app/assets/javascripts/supplier/app/templates/tables.emblem deleted file mode 100644 index 26191258..00000000 --- a/app/assets/javascripts/supplier/app/templates/tables.emblem +++ /dev/null @@ -1 +0,0 @@ -= outlet diff --git a/app/assets/javascripts/supplier/app/templates/tables/index.emblem b/app/assets/javascripts/supplier/app/templates/tables/index.emblem deleted file mode 100644 index 6ffe0ffc..00000000 --- a/app/assets/javascripts/supplier/app/templates/tables/index.emblem +++ /dev/null @@ -1,28 +0,0 @@ -.row: .small-12.columns - h2.main-section-header=t 'models.plural.table' - if tables - table.table - thead - tr - th=t 'attributes.table.table_number' - th.link=t 'models.section' - /th.timestamp= t 'attributes.table.created_at' - th.actions=t 'helpers.actions.title' - tbody - each tables as |table| - tr - td= link-to 'table' table: span= table.table_number - td.link - if table.section - = link-to 'section' table.section - = table.section.title - /td.timestamp=time table.created_at - td.actions - if (can "manage" "tables") - a.table-edit{ action 'editTable' table }: span - unless table.list - a.table-destroy{ action 'destroyTable' table }: span - .form-actions - if (can "manage" "tables") - a.form-action-new.new-table-button{action "newTable"}= t 'table.new_button' - = qr-codes-link diff --git a/app/assets/javascripts/supplier/app/views/mark-order-cancelled.js.coffee b/app/assets/javascripts/supplier/app/views/mark-order-cancelled.js.coffee deleted file mode 100644 index 0f83b355..00000000 --- a/app/assets/javascripts/supplier/app/views/mark-order-cancelled.js.coffee +++ /dev/null @@ -1,10 +0,0 @@ -#App.MarkOrderCancelledView = Ember.View.extend -# tagName: 'button' -# templateName: 'buttons/mark-order-cancelled' -# classNames: ['mark-order-cancelled-button'] -# classNameBindings: ['showButton:active:hide'] -# showButton: Ember.computed 'order.state', -> -# state = @get('order.state') -# state is 'placed' or state is 'active' -# click: -> @get('order').mark_cancelled() -# diff --git a/app/assets/javascripts/supplier/app/views/settings_view.js.coffee b/app/assets/javascripts/supplier/app/views/settings_view.js.coffee deleted file mode 100644 index f8a98e14..00000000 --- a/app/assets/javascripts/supplier/app/views/settings_view.js.coffee +++ /dev/null @@ -1,90 +0,0 @@ -#App.SettingsView = Ember.View.extend -# templateName: 'settings' -# didInsertElement: -> -# return -# -# iconBase = 'https://maps.google.com/mapfiles/kml/' -# #location_input = @$('.location_picker') -# #map_div = $('
').addClass("location_picker_map") -# map_div = @$('.location_picker_map') -# -# #location_input.before(map_div) -# #this.parentNode.insertBefore(map_div, this) -# #location_input.hide() -# -# #lat = 52.07436798080633 -# #lng = 4.316811561584473 -# #if @get('controller.location') and @get('controller.location').split(',').length == 2 -# #values = @get('controller.location').split(',') -# #lat = values[0] -# #lng = values[1] -# lat = @get('controller.model.lat') -# lng = @get('controller.model.lng') -# center = new google.maps.LatLng(lat,lng) -# mapOptions = -# zoom: 15 -# center: center -# mapTypeId: google.maps.MapTypeId.ROADMAP, -# zoomControl: true -# zoomControlOptions: -# style: google.maps.ZoomControlStyle.SMALL -# mapTypeControl: false -# panControl: false -# scaleControl: false -# streetViewControl: false -# -# map = new google.maps.Map(map_div.get(0), mapOptions) -# marker = new google.maps.Marker( -# position: center -# map: map -# title: 'Location' -# icon: '/assets/icons/maps_location.png' -# ) -# google.maps.event.addListener(map, 'click', (point)=> -# marker.setPosition(point.latLng) -# #location_input.val point.latLng.lat() + ','+ point.latLng.lng() -# @set 'controller.model.lat', point.latLng.lat() -# @set 'controller.model.lng', point.latLng.lng() -# ) -# -# search_field = $('') -# search_field.addClass('location_picker_search') -# autocomplete = new google.maps.places.Autocomplete(search_field.get(0)) -# autocomplete.bindTo('bounds', map) -# search_field.keypress( (e) -> -# if e.which == 13 -# e.preventDefault() -# ) -# window.autocomplete = autocomplete -# map_div.before(search_field) -# infowindow = new google.maps.InfoWindow() -# search_marker = new google.maps.Marker({map: map, icon: iconBase + 'shapes/placemark_circle.png'}) -# google.maps.event.addListener autocomplete, 'place_changed', -> -# infowindow.close() -# search_marker.setVisible(false) -# place = autocomplete.getPlace() -# return unless place.geometry -# #if place.geometry.viewport -# # map.fitBounds(place.geometry.viewport) -# #else -# map.setCenter(place.geometry.location) -# map.setZoom(17) -# image = -# url: place.icon -# size: new google.maps.Size(71, 71) -# origin: new google.maps.Point(0, 0) -# anchor: new google.maps.Point(17, 34) -# scaledSize: new google.maps.Size(35, 35) -# #search_marker.setIcon(image) -# search_marker.setPosition(place.geometry.location) -# search_marker.setVisible(true) -# -# address = '' -# if place.address_components -# address = [ -# (place.address_components[0] && place.address_components[0].short_name || ''), -# (place.address_components[1] && place.address_components[1].short_name || ''), -# (place.address_components[2] && place.address_components[2].short_name || '') -# ].join(' ') -# infowindow.setContent('
' + place.name + '
' + address + '
') -# infowindow.open(map, search_marker) diff --git a/app/assets/javascripts/supplier/app/views/side_menu_item.js.coffee b/app/assets/javascripts/supplier/app/views/side_menu_item.js.coffee deleted file mode 100644 index 4b9ad3f6..00000000 --- a/app/assets/javascripts/supplier/app/views/side_menu_item.js.coffee +++ /dev/null @@ -1,14 +0,0 @@ -#App.SideMenuItemView = Ember.View.extend - #classNames: 'menu-list-item' - #classNameBindings: ['active'] - #click: -> - #if @route_param - #@get('controller').transitionToRoute(@route, @route_param) - #else - #@get('controller').transitionToRoute(@route) - #active: (-> - #if @get('controller.currentPath') == @route then 'active' else '' - #).property('controller.currentPath') - #init: -> - #@templateName = "side_menu/#{@route}" - #@_super() diff --git a/app/assets/javascripts/supplier/foundation1/application.js.erb b/app/assets/javascripts/supplier/foundation1/application.js.erb deleted file mode 100644 index 2c0de7de..00000000 --- a/app/assets/javascripts/supplier/foundation1/application.js.erb +++ /dev/null @@ -1,66 +0,0 @@ -//= require modernizr -//= require jquery -//= require jquery_ujs -//= require jquery-ui/widgets/sortable -// require ./im -// require foundation FOUNDATION 5 JAVASCRIPT IMPLEMENTATIONS AND EMBER ARE NOT COMPATIBLE, FOUNDATION IS TOO SIMPLISTIC AT THE MOMENT AND DESTROYS DOM EVENTS -//= require js-routes -//= require moment -//= require fullcalendar -//= require translations -//= require faye -//= require ./base -//= require pickdate -//= require_directory . -//= require_self - -if(!Modernizr.cssanimations){ - window.location = "/unsupported-browser"; -} -var Qstorage = localStorage; - -$.extend($translations.en, <%= I18n.t('supplier', locale: :en).to_json %>); -$.extend($translations.nl, <%= I18n.t('supplier', locale: :nl).to_json %>); - -String.prototype.capitalize = function() { return this.charAt(0).toUpperCase() + this.slice(1); } - - -window.time_zones = <%= ActiveSupport::TimeZone.all.map{|tz| {name: tz.name, formatted: "GMT#{tz.formatted_offset} #{tz.name}"}}.to_json.html_safe %>; -window.countries = <%= IsoCountryCodes.all.map{|cc| {name: cc.name}}.to_json.html_safe %>; - -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) { - // num = 0.0 if isNaN(num) || num == '' || num == null - // '€ ' + parseFloat(num).toFixed(2) - if (isNaN(num) || num === '' || num === null) { - num = 0.0; - } - return '€ ' + parseFloat(num).toFixed(2); -} -/* -Handlebars.registerHelper('t', function(tlocation) { - return t(tlocation) -}) -Handlebars.registerHelper('currency', function(price) { - if(price.fn){ - price = price.fn(this); - } - if(typeof(price) == 'function'){ - price = price.call(this) - } - return new Handlebars.SafeString(currency(price)) - }) -*/ diff --git a/app/assets/javascripts/supplier/foundation1/base.js.coffee b/app/assets/javascripts/supplier/foundation1/base.js.coffee deleted file mode 100644 index 0a2bb519..00000000 --- a/app/assets/javascripts/supplier/foundation1/base.js.coffee +++ /dev/null @@ -1,6 +0,0 @@ -#jQuery -> - #$('#product-category-list').sortable - #axis: 'y' - #handle: '.handle' - #update: -> - #$.post($(this).data('update-url'), $(this).sortable('serialize')) diff --git a/app/assets/javascripts/supplier/foundation1/initializer.js.coffee b/app/assets/javascripts/supplier/foundation1/initializer.js.coffee deleted file mode 100644 index 963aea65..00000000 --- a/app/assets/javascripts/supplier/foundation1/initializer.js.coffee +++ /dev/null @@ -1,135 +0,0 @@ -$ -> - $('.week-day-toggle').each -> - select = $('#week-day-select-'+$(@).data('day')) - $(@).addClass(if select.val() == '1' then 'active' else 'inactive') - $(@).click -> - new_val = Math.abs(select.val() - 1) - select.val new_val - if new_val == 1 - $(@).addClass('active') - $(@).removeClass('inactive') - else - $(@).addClass('inactive') - $(@).removeClass('active') - - $('#full_day-controller').each -> - control = $('#product_category_full_day') - if control.is(':checked') - $('#sub-day-container').addClass('hide') - $(@).addClass('active') - else - $(@).removeClass 'active' - $('#sub-day-container').removeClass('hide') - $(@).click -> - if control.is(':checked') - control.prop 'checked', false - $(@).removeClass 'active' - $('#sub-day-container').removeClass('hide') - else - $(@).addClass 'active' - control.prop 'checked', true - $('#sub-day-container').addClass('hide') - - if Qstorage.getItem('message') - container = $('.alert-success'); - msg_finder = Qstorage.getItem('message'); - msg_finder = 'messages.'+msg_finder if msg_finder.indexOf('.') == -1 - container.find('div').text(t(msg_finder)) - container.show() - Qstorage.removeItem('message') - - setupTranslations() - - $('[data-boolean]').each -> - $(@).addClass(if $(@).data('boolean') then 'boolean-true' else 'boolean-false') - - # Hide alert boxes on click - $(document).on 'click', '.general-alerts .alert-box', -> $(@).slideUp() - - $(document).on 'click', '.supplier-is-closed', -> $(@).slideUp() -# GOOGLE LOCATION PICKER -### - $("input.location_picker").each (i)-> - #return if typeof(google) == 'undefined' - iconBase = 'https://maps.google.com/mapfiles/kml/' - location_input = $(this) - map_div = $('
').addClass("location_picker_map") - - location_input.before(map_div) - #this.parentNode.insertBefore(map_div, this) - location_input.hide() - - lat = 52.07436798080633 - lng = 4.316811561584473 - if (this.value.split(',').length == 2) - values = this.value.split(',') - lat = values[0] - lng = values[1] - center = new google.maps.LatLng(lat,lng) - mapOptions = - zoom: 15 - center: center - mapTypeId: google.maps.MapTypeId.ROADMAP, - zoomControl: true - zoomControlOptions: - style: google.maps.ZoomControlStyle.SMALL - mapTypeControl: false - panControl: false - scaleControl: false - streetViewControl: false - - map = new google.maps.Map(map_div.get(0), mapOptions) - marker = new google.maps.Marker( - position: center - map: map - title: 'Location' - icon: '/assets/icons/maps_location.png' - ) - google.maps.event.addListener(map, 'click', (point)-> - marker.setPosition(point.latLng) - location_input.val point.latLng.lat() + ','+ point.latLng.lng() - ) - - search_field = $('') - search_field.addClass('location_picker_search') - autocomplete = new google.maps.places.Autocomplete(search_field.get(0)) - autocomplete.bindTo('bounds', map) - search_field.keypress( (e) -> - if e.which == 13 - e.preventDefault() - ) - window.autocomplete = autocomplete - map_div.before(search_field) - infowindow = new google.maps.InfoWindow() - search_marker = new google.maps.Marker({map: map, icon: iconBase + 'shapes/placemark_circle.png'}) - google.maps.event.addListener autocomplete, 'place_changed', -> - infowindow.close() - search_marker.setVisible(false) - place = autocomplete.getPlace() - return unless place.geometry - #if place.geometry.viewport - # map.fitBounds(place.geometry.viewport) - #else - map.setCenter(place.geometry.location) - map.setZoom(17) - image = - url: place.icon - size: new google.maps.Size(71, 71) - origin: new google.maps.Point(0, 0) - anchor: new google.maps.Point(17, 34) - scaledSize: new google.maps.Size(35, 35) - #search_marker.setIcon(image) - search_marker.setPosition(place.geometry.location) - search_marker.setVisible(true) - - address = '' - if place.address_components - address = [ - (place.address_components[0] && place.address_components[0].short_name || ''), - (place.address_components[1] && place.address_components[1].short_name || ''), - (place.address_components[2] && place.address_components[2].short_name || '') - ].join(' ') - infowindow.setContent('
' + place.name + '
' + address + '
') - infowindow.open(map, search_marker) - # end google location map -### diff --git a/app/assets/stylesheets/supplier/basic1/application.css b/app/assets/stylesheets/supplier/basic1/application.css deleted file mode 100644 index 82ab88f1..00000000 --- a/app/assets/stylesheets/supplier/basic1/application.css +++ /dev/null @@ -1,7 +0,0 @@ -/* - *= require 'jquery-ui-1.8.23.custom.css' - *= require qtip - * require user/active_list - *= require_directory . - *= require_self - */ diff --git a/app/assets/stylesheets/supplier/basic1/product_categories.sass b/app/assets/stylesheets/supplier/basic1/product_categories.sass deleted file mode 100644 index 2f0efc1f..00000000 --- a/app/assets/stylesheets/supplier/basic1/product_categories.sass +++ /dev/null @@ -1,21 +0,0 @@ -#product-category-list - list-style: none - li - clear: both - margin-bottom: 8px - .name - padding: 5px 5px -#week_days-group - .btn - opacity: 0.4 - &.active - opacity: 1 -#full_day-controller - margin: 0 10px -#sub-day-container - display: inline-block - &.hide - display: none - select - width: 70px - margin-right: 14px diff --git a/app/assets/stylesheets/supplier/basic1/products_preview.sass b/app/assets/stylesheets/supplier/basic1/products_preview.sass deleted file mode 100644 index eb1854cf..00000000 --- a/app/assets/stylesheets/supplier/basic1/products_preview.sass +++ /dev/null @@ -1,17 +0,0 @@ -.products_preview-date - .products_preview-time-container - float: left - input - width: 120px -.products_preview-hour - float: left - margin-left: 10px - select - width: 50px - &:after - content: " :" -.products_preview-minute - float: left - margin-left: 10px - select - width: 50px diff --git a/app/assets/stylesheets/supplier/basic1/structure.sass b/app/assets/stylesheets/supplier/basic1/structure.sass deleted file mode 100644 index 04dc22ff..00000000 --- a/app/assets/stylesheets/supplier/basic1/structure.sass +++ /dev/null @@ -1,58 +0,0 @@ -$side-spacing: 0px -html -body - padding-top: 42px - padding-left: $side-spacing - padding-right: $side-spacing - background-color: transparent - //padding-top: 50px - .navbar-fixed-top - margin-left: -$side-spacing - margin-right: -$side-spacing - margin-bottom: 3px - .page-header - margin-top: 4px - margin-bottom: 6px - padding-bottom: 0 - .main-content - padding-top: 16px - label - &.number - display: inline - padding: 4px 10px - input - &.number - width: 40px -.supplier-is-closed - .alert - form - margin: 0 -.location_picker_search - float: left -.draggable - cursor: move !important -input.dimension - width: 40px -.location_picker_map - width: 600px - height: 500px - border: 1px solid black - padding: 2px - display: inline-block - float: left - clear: left - img - max-width: none - label - width: auto - display:inline -.handle - cursor: move - font-size: 0.8em - color: #777 -form - &.form-inline - display: inline-block - padding: 4px -.clear - clear: both diff --git a/app/assets/stylesheets/supplier/foundation1/_ember_dropdown.sass b/app/assets/stylesheets/supplier/foundation1/_ember_dropdown.sass deleted file mode 100644 index 064e471a..00000000 --- a/app/assets/stylesheets/supplier/foundation1/_ember_dropdown.sass +++ /dev/null @@ -1,104 +0,0 @@ -.dropdown-container - position: relative - display: inline-block - .button.dropdown-trigger - padding-top: 4px - padding-bottom: 4px - margin-bottom: 0 - cursor: pointer - .dropdown-trigger-icon - @extend .fa - @extend .fa-lg - @extend .fa-caret-left - margin-right: 6px - - .dropdown-list-container - $border-size: 1px - $arrow-size: 7px - $border-color: #333 - $background-color: white - $right-offset: 16px - display: none - text-align: left - background-color: $background-color - position: absolute - right: 0 - margin: 0 - min-width: 160px - z-index: 542 - margin-top: 7px - border-radius: 4px - border: $border-size solid $border-color - box-shadow: 5px 5px 5px #888888 - - // Arrow - &:before, &:after - border: solid transparent - content: " " - height: 0 - width: 0 - position: absolute - pointer-events: none - bottom: 100% - &:after - border-width: $arrow-size - margin-left: -$arrow-size - border-bottom-color: $background-color - right: $right-offset + $border-size - &:before - border-bottom-color: $border-color - border-width: $arrow-size + $border-size - margin-left: -($arrow-size + $border-size) - right: $right-offset - - ul - list-style: none - margin: 0 - padding: 0 - li - border-bottom: 1px solid #bbb - a - font-size: 0.8em - display: block - padding: 4px 7px - &:hover - background-color: #ddd - &.active - color: $current-color - background-color: #444 - span.section-add-tables-icon - @extend .fa - @extend .fa-plus-square - span - padding-left: 7px - span.section-arrange-tables-icon - @extend .fa - @extend .fa-th - span - padding-left: 7px - span.section-remove-icon - @extend .fa, .fa-trash-o - span - padding-left: 7px - span.icon - span - // translation span - padding-left: 7px - span.sign-out-icon - @extend .fa, .fa-sign-out - span - padding-left: 7px - span.current-employee-my-account-icon - @extend .fa, .fa-user - span - padding-left: 7px - span.current-employee-my-schedule-icon - @extend .fa, .fa-calendar - span - padding-left: 7px - &.active - .dropdown-list-container - display: block - .button.dropdown-trigger - .dropdown-trigger-icon - @extend .fa-caret-down diff --git a/app/assets/stylesheets/supplier/foundation1/_form_actions.sass b/app/assets/stylesheets/supplier/foundation1/_form_actions.sass deleted file mode 100644 index 896d0579..00000000 --- a/app/assets/stylesheets/supplier/foundation1/_form_actions.sass +++ /dev/null @@ -1,20 +0,0 @@ -.form-actions - .form-action-submit - +button($bg: $button-submit-color, $padding: $button-sml) - margin-right: $button-margin - a - &.form-action-index - +button($bg: $button-index-color, $padding: $button-sml) - margin-right: $button-margin - &.form-action-new - +button($padding: $button-sml) - margin-right: $button-margin - &.form-action-edit - +button($bg: $button-edit-color, $padding: $button-sml) - margin-right: $button-margin - &.form-action-destroy - +button($bg: $button-destroy-color, $padding: $button-sml) - &.form-action-cancel - +button($bg: $button-cancel-color, $padding: $button-sml) - &.table-qr-codes - +button($bg: $button-qr-code-color, $padding: $button-sml) diff --git a/app/assets/stylesheets/supplier/foundation1/_foundation_and_overrides.sass b/app/assets/stylesheets/supplier/foundation1/_foundation_and_overrides.sass deleted file mode 100644 index e8d365dd..00000000 --- a/app/assets/stylesheets/supplier/foundation1/_foundation_and_overrides.sass +++ /dev/null @@ -1,1266 +0,0 @@ -// Foundation by ZURB -// foundation.zurb.com -// Licensed under MIT Open Source - -// -// FOUNDATION SETTINGS -// - -// This is the default html and body font-size for the base rem value. -// $rem-base: 16px; - -// Allows the use of rem-calc() or lower-bound() in your settings -@import "foundation/functions" - -// $experimental: true; - -// The default font-size is set to 100% of the browser style sheet (usually 16px) -// for compatibility with browser-based text zoom or user-set defaults. - -// Since the typical default browser font-size is 16px, that makes the calculation for grid size. -// If you want your base font-size to be different and not have it affect the grid breakpoints, -// set $rem-base to $base-font-size and make sure $base-font-size is a px value. -// $base-font-size: 100%; - -// The $base-line-height is 100% while $base-font-size is 150% -// $base-line-height: 150%; - -// We use this to control whether or not CSS classes come through in the gem files. -// $include-html-classes: true; -// $include-print-styles: true; -// $include-html-global-classes: $include-html-classes; - -// Grid - -// $include-html-grid-classes: $include-html-classes; -// $include-xl-html-grid-classes: false; - -// $row-width: rem-calc(1000); -// $column-gutter: rem-calc(30); -// $total-columns: 12; - -// We use these to control various global styles -// $body-bg: #fff; -// $body-font-color: #222; -// $body-font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; -// $body-font-weight: normal; -// $body-font-style: normal; - -// We use this to control font-smoothing -// $font-smoothing: antialiased; - -// We use these to control text direction settings -// $text-direction: ltr; -// $opposite-direction: right; -// $default-float: left; - -// We use these as default colors throughout -// $primary-color: #008CBA; -$primary-color: #008349 -// $secondary-color: #e7e7e7; -$secondary-color: #d7d7d7 -//$alert-color: #f04124; -$alert-color: #ee3e41 -// $success-color: #43AC6A; -// $warning-color: #f08a24; -// $info-color: #a0d3e8; - -// We use these to make sure border radius matches unless we want it different. -// $global-radius: 3px; -// $global-rounded: 1000px; - -// We use these to control inset shadow shiny edges and depressions. -// $shiny-edge-size: 0 1px 0; -// $shiny-edge-color: rgba(#fff, .5); -// $shiny-edge-active-color: rgba(#000, .2); - -// Media Query Ranges -// $small-range: (0em, 40em); -// $medium-range: (40.063em, 64em); -// $large-range: (64.063em, 90em); -// $xlarge-range: (90.063em, 120em); -// $xxlarge-range: (120.063em); - -// $screen: "only screen"; - -// $landscape: "#{$screen} and (orientation: landscape)"; -// $portrait: "#{$screen} and (orientation: portrait)"; - -// $small-up: $screen; -// $small-only: "#{$screen} and (max-width: #{upper-bound($small-range)})"; - -// $medium-up: "#{$screen} and (min-width:#{lower-bound($medium-range)})"; -// $medium-only: "#{$screen} and (min-width:#{lower-bound($medium-range)}) and (max-width:#{upper-bound($medium-range)})"; - -// $large-up: "#{$screen} and (min-width:#{lower-bound($large-range)})"; -// $large-only: "#{$screen} and (min-width:#{lower-bound($large-range)}) and (max-width:#{upper-bound($large-range)})"; - -// $xlarge-up: "#{$screen} and (min-width:#{lower-bound($xlarge-range)})"; -// $xlarge-only: "#{$screen} and (min-width:#{lower-bound($xlarge-range)}) and (max-width:#{upper-bound($xlarge-range)})"; - -// $xxlarge-up: "#{$screen} and (min-width:#{lower-bound($xxlarge-range)})"; -// $xxlarge-only: "#{$screen} and (min-width:#{lower-bound($xxlarge-range)}) and (max-width:#{upper-bound($xxlarge-range)})"; - -// Legacy -// $small: $medium-up; -// $medium: $medium-up; -// $large: $large-up; - -//We use this as cursors values for enabling the option of having custom cursors in the whole site's stylesheet -// $cursor-crosshair-value: crosshair; -// $cursor-default-value: default; -// $cursor-pointer-value: pointer; -// $cursor-help-value: help; -// $cursor-text-value: text; - -// -// TYPOGRAPHY -// - -// $include-html-type-classes: $include-html-classes; - -// We use these to control header font styles -// $header-font-family: $body-font-family; -// $header-font-weight: normal; -// $header-font-style: normal; -// $header-font-color: #222; -// $header-line-height: 1.4; -// $header-top-margin: .2rem; -// $header-bottom-margin: .5rem; -// $header-text-rendering: optimizeLegibility; - -// We use these to control header font sizes -// $h1-font-size: rem-calc(44); -// $h2-font-size: rem-calc(37); -// $h3-font-size: rem-calc(27); -// $h4-font-size: rem-calc(23); -// $h5-font-size: rem-calc(18); -// $h6-font-size: 1rem; - -// These control how subheaders are styled. -// $subheader-line-height: 1.4; -// $subheader-font-color: scale-color($header-font-color, $lightness: 35%); -// $subheader-font-weight: 300; -// $subheader-top-margin: .2rem; -// $subheader-bottom-margin: .5rem; - -// A general styling -// $small-font-size: 60%; -// $small-font-color: scale-color($header-font-color, $lightness: 35%); - -// We use these to style paragraphs -// $paragraph-font-family: inherit; -// $paragraph-font-weight: normal; -// $paragraph-font-size: 1rem; -// $paragraph-line-height: 1.6; -// $paragraph-margin-bottom: rem-calc(20); -// $paragraph-aside-font-size: rem-calc(14); -// $paragraph-aside-line-height: 1.35; -// $paragraph-aside-font-style: italic; -// $paragraph-text-rendering: optimizeLegibility; - -// We use these to style tags -// $code-color: scale-color($alert-color, $lightness: -27%); -// $code-font-family: Consolas, 'Liberation Mono', Courier, monospace; -// $code-font-weight: bold; - -// We use these to style anchors -// $anchor-text-decoration: none; -// $anchor-font-color: $primary-color; -// $anchor-font-color-hover: scale-color($primary-color, $lightness: -14%); - -// We use these to style the
element -// $hr-border-width: 1px; -// $hr-border-style: solid; -// $hr-border-color: #ddd; -// $hr-margin: rem-calc(20); - -// We use these to style lists -// $list-style-position: outside; -// $list-side-margin: 1.1rem; -// $list-ordered-side-margin: 1.4rem; -// $list-side-margin-no-bullet: 0; -// $list-nested-margin: rem-calc(20); -// $definition-list-header-weight: bold; -// $definition-list-header-margin-bottom: .3rem; -// $definition-list-margin-bottom: rem-calc(12); - -// We use these to style blockquotes -// $blockquote-font-color: scale-color($header-font-color, $lightness: 35%); -// $blockquote-padding: rem-calc(9 20 0 19); -// $blockquote-border: 1px solid #ddd; -// $blockquote-cite-font-size: rem-calc(13); -// $blockquote-cite-font-color: scale-color($header-font-color, $lightness: 23%); -// $blockquote-cite-link-color: $blockquote-cite-font-color; - -// Acronym styles -// $acronym-underline: 1px dotted #ddd; - -// We use these to control padding and margin -// $microformat-padding: rem-calc(10 12); -// $microformat-margin: rem-calc(0 0 20 0); - -// We use these to control the border styles -// $microformat-border-width: 1px; -// $microformat-border-style: solid; -// $microformat-border-color: #ddd; - -// We use these to control full name font styles -// $microformat-fullname-font-weight: bold; -// $microformat-fullname-font-size: rem-calc(15); - -// We use this to control the summary font styles -// $microformat-summary-font-weight: bold; - -// We use this to control abbr padding -// $microformat-abbr-padding: rem-calc(0 1); - -// We use this to control abbr font styles -// $microformat-abbr-font-weight: bold; -// $microformat-abbr-font-decoration: none; - -// Accordion - -// $include-html-accordion-classes: $include-html-classes; - -// $accordion-navigation-padding: rem-calc(16); -// $accordion-navigation-bg-color: #efefef ; -// $accordion-navigation-hover-bg-color: scale-color($accordion-navigation-bg-color, $lightness: -5%); -// $accordion-navigation-active-bg-color: scale-color($accordion-navigation-bg-color, $lightness: -3%); -// $accordion-navigation-font-color: #222; -// $accordion-navigation-font-size: rem-calc(16); -// $accordion-navigation-font-family: $body-font-family; - -// $accordion-content-padding: $column-gutter/2; -// $accordion-content-active-bg-color: #fff; - -// Alert Boxes - -// $include-html-alert-classes: $include-html-classes; - -// We use this to control alert padding. -// $alert-padding-top: rem-calc(14); -// $alert-padding-default-float: $alert-padding-top; -// $alert-padding-opposite-direction: $alert-padding-top + rem-calc(10); -// $alert-padding-bottom: $alert-padding-top; - -// We use these to control text style. -// $alert-font-weight: normal; -// $alert-font-size: rem-calc(13); -// $alert-font-color: #fff; -// $alert-font-color-alt: scale-color($secondary-color, $lightness: -66%); - -// We use this for close hover effect. -// $alert-function-factor: -14%; - -// We use these to control border styles. -// $alert-border-style: solid; -// $alert-border-width: 1px; -// $alert-border-color: scale-color($primary-color, $lightness: $alert-function-factor); -// $alert-bottom-margin: rem-calc(20); - -// We use these to style the close buttons -// $alert-close-color: #333; -// $alert-close-top: 50%; -// $alert-close-position: rem-calc(5); -// $alert-close-font-size: rem-calc(22); -// $alert-close-opacity: 0.3; -// $alert-close-opacity-hover: 0.5; -// $alert-close-padding: 9px 6px 4px; - -// We use this to control border radius -// $alert-radius: $global-radius; - -// Block Grid - -// $include-html-grid-classes: $include-html-classes; - -// We use this to control the maximum number of block grid elements per row -// $block-grid-elements: 12; -// $block-grid-default-spacing: rem-calc(20); -// $align-block-grid-to-grid: true; - -// Enables media queries for block-grid classes. Set to false if writing semantic HTML. -// $block-grid-media-queries: true; - -// Breadcrumbs - -// $include-html-nav-classes: $include-html-classes; - -// We use this to set the background color for the breadcrumb container. -// $crumb-bg: scale-color($secondary-color, $lightness: 55%); - -// We use these to set the padding around the breadcrumbs. -// $crumb-padding: rem-calc(9 14 9); -// $crumb-side-padding: rem-calc(12); - -// We use these to control border styles. -// $crumb-function-factor: -10%; -// $crumb-border-size: 1px; -// $crumb-border-style: solid; -// $crumb-border-color: scale-color($crumb-bg, $lightness: $crumb-function-factor); -// $crumb-radius: $global-radius; - -// We use these to set various text styles for breadcrumbs. -// $crumb-font-size: rem-calc(11); -// $crumb-font-color: $primary-color; -// $crumb-font-color-current: #333; -// $crumb-font-color-unavailable: #999; -// $crumb-font-transform: uppercase; -// $crumb-link-decor: underline; - -// We use these to control the slash between breadcrumbs -// $crumb-slash-color: #aaa; -// $crumb-slash: "/"; - -// -// BUTTONS -// - -// $include-html-button-classes: $include-html-classes; -// We use these to build padding for buttons. -// $button-tny: rem-calc(10); -// $button-sml: rem-calc(14); -// $button-med: rem-calc(16); -// $button-lrg: rem-calc(18); - -// We use this to control the display property. -// $button-display: inline-block; -// $button-margin-bottom: rem-calc(20); - -// We use these to control button text styles. -// $button-font-family: $body-font-family; -// $button-font-color: #fff; -// $button-font-color-alt: #333; -// $button-font-tny: rem-calc(11); -// $button-font-sml: rem-calc(13); -// $button-font-med: rem-calc(16); -// $button-font-lrg: rem-calc(20); -// $button-font-weight: normal; -// $button-font-align: center; - -// We use these to control various hover effects. -// $button-function-factor: 5%; - -// We use these to control button border styles. -// $button-border-width: 1px; -// $button-border-style: solid; - -// We use this to set the default radius used throughout the core. -// $button-radius: $global-radius; -// $button-round: $global-rounded; - -// We use this to set default opacity for disabled buttons. -// $button-disabled-opacity: 0.7; - -// Button Groups - -// $include-html-button-classes: $include-html-classes; - -// Sets the margin for the right side by default, and the left margin if right-to-left direction is used -// $button-bar-margin-opposite: rem-calc(10); -// $button-group-border-width: 1px; - -// Clearing - -// $include-html-clearing-classes: $include-html-classes; - -// We use these to set the background colors for parts of Clearing. -// $clearing-bg: #333; -// $clearing-caption-bg: $clearing-bg; -// $clearing-carousel-bg: rgba (51,51,51,0.8); -// $clearing-img-bg: $clearing-bg; - -// We use these to style the close button -// $clearing-close-color: #ccc; -// $clearing-close-size: 30px; - -// We use these to style the arrows -// $clearing-arrow-size: 12px; -// $clearing-arrow-color: $clearing-close-color; - -// We use these to style captions -// $clearing-caption-font-color: #ccc; -// $clearing-caption-font-size: 0.875em; -// $clearing-caption-padding: 10px 30px 20px; - -// We use these to make the image and carousel height and style -// $clearing-active-img-height: 85%; -// $clearing-carousel-height: 120px; -// $clearing-carousel-thumb-width: 120px; -// $clearing-carousel-thumb-active-border: 1px solid rgb(255,255,255); - -// Dropdown - -// $include-html-dropdown-classes: $include-html-classes; - -// We use these to controls height and width styles. -// $f-dropdown-max-width: 200px; -// $f-dropdown-height: auto; -// $f-dropdown-max-height: none; -// $f-dropdown-margin-top: 2px; - -// We use this to control the background color -// $f-dropdown-bg: #fff; - -// We use this to set the border styles for dropdowns. -// $f-dropdown-border-style: solid; -// $f-dropdown-border-width: 1px; -// $f-dropdown-border-color: scale-color(#fff, $lightness: -20%); - -// We use these to style the triangle pip. -// $f-dropdown-triangle-size: 6px; -// $f-dropdown-triangle-color: #fff; -// $f-dropdown-triangle-side-offset: 10px; - -// We use these to control styles for the list elements. -// $f-dropdown-list-style: none; -// $f-dropdown-font-color: #555; -// $f-dropdown-font-size: rem-calc(14); -// $f-dropdown-list-padding: rem-calc(5, 10); -// $f-dropdown-line-height: rem-calc(18); -// $f-dropdown-list-hover-bg: #eeeeee ; -// $dropdown-mobile-default-float: 0; - -// We use this to control the styles for when the dropdown has custom content. -// $f-dropdown-content-padding: rem-calc(20); - -// Dropdown Buttons - -// $include-html-button-classes: $include-html-classes; - -// We use these to set the color of the pip in dropdown buttons -// $dropdown-button-pip-color: #fff; -// $dropdown-button-pip-color-alt: #333; - -// $button-pip-tny: rem-calc(6); -// $button-pip-sml: rem-calc(7); -// $button-pip-med: rem-calc(9); -// $button-pip-lrg: rem-calc(11); - -// We use these to style tiny dropdown buttons -// $dropdown-button-padding-tny: $button-pip-tny * 7; -// $dropdown-button-pip-size-tny: $button-pip-tny; -// $dropdown-button-pip-opposite-tny: $button-pip-tny * 3; -// $dropdown-button-pip-top-tny: -$button-pip-tny / 2 + rem-calc(1); - -// We use these to style small dropdown buttons -// $dropdown-button-padding-sml: $button-pip-sml * 7; -// $dropdown-button-pip-size-sml: $button-pip-sml; -// $dropdown-button-pip-opposite-sml: $button-pip-sml * 3; -// $dropdown-button-pip-top-sml: -$button-pip-sml / 2 + rem-calc(1); - -// We use these to style medium dropdown buttons -// $dropdown-button-padding-med: $button-pip-med * 6 + rem-calc(3); -// $dropdown-button-pip-size-med: $button-pip-med - rem-calc(3); -// $dropdown-button-pip-opposite-med: $button-pip-med * 2.5; -// $dropdown-button-pip-top-med: -$button-pip-med / 2 + rem-calc(2); - -// We use these to style large dropdown buttons -// $dropdown-button-padding-lrg: $button-pip-lrg * 5 + rem-calc(3); -// $dropdown-button-pip-size-lrg: $button-pip-lrg - rem-calc(6); -// $dropdown-button-pip-opposite-lrg: $button-pip-lrg * 2.5; -// $dropdown-button-pip-top-lrg: -$button-pip-lrg / 2 + rem-calc(3); - -// Flex Video - -// $include-html-media-classes: $include-html-classes; - -// We use these to control video container padding and margins -// $flex-video-padding-top: rem-calc(25); -// $flex-video-padding-bottom: 67.5%; -// $flex-video-margin-bottom: rem-calc(16); - -// We use this to control widescreen bottom padding -// $flex-video-widescreen-padding-bottom: 57.25%; - -// Forms - -// $include-html-form-classes: $include-html-classes; - -// We use this to set the base for lots of form spacing and positioning styles -// $form-spacing: rem-calc(16); - -// We use these to style the labels in different ways -// $form-label-pointer: pointer; -// $form-label-font-size: rem-calc(14); -// $form-label-font-weight: normal; -// $form-label-line-height: 1.5; -// $form-label-font-color: scale-color(#000, $lightness: 30%); -// $form-label-bottom-margin: 0; -// $input-font-family: inherit; -// $input-font-color: rgba(0,0,0,0.75); -// $input-font-size: rem-calc(14); -// $input-bg-color: #fff; -// $input-focus-bg-color: scale-color(#fff, $lightness: -2%); -// $input-border-color: scale-color(#fff, $lightness: -20%); -// $input-focus-border-color: scale-color(#fff, $lightness: -40%); -// $input-border-style: solid; -// $input-border-width: 1px; -// $input-border-radius: $global-radius; -// $input-disabled-bg: #ddd; -// $input-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); -// $input-include-glowing-effect: true; - -// We use these to style the fieldset border and spacing. -// $fieldset-border-style: solid; -// $fieldset-border-width: 1px; -// $fieldset-border-color: #ddd; -// $fieldset-padding: rem-calc(20); -// $fieldset-margin: rem-calc(18 0); - -// We use these to style the legends when you use them -// $legend-bg: #fff; -// $legend-font-weight: bold; -// $legend-padding: rem-calc(0 3); - -// We use these to style the prefix and postfix input elements -// $input-prefix-bg: scale-color(#fff, $lightness: -5%); -// $input-prefix-border-color: scale-color(#fff, $lightness: -20%); -// $input-prefix-border-size: 1px; -// $input-prefix-border-type: solid; -// $input-prefix-overflow: hidden; -// $input-prefix-font-color: #333; -// $input-prefix-font-color-alt: #fff; - -// We use these to style the error states for inputs and labels -// $input-error-message-padding: rem-calc(6 9 9); -// $input-error-message-top: -1px; -// $input-error-message-font-size: rem-calc(12); -// $input-error-message-font-weight: normal; -// $input-error-message-font-style: italic; -// $input-error-message-font-color: #fff; -// $input-error-message-font-color-alt: #333; - -// We use this to style the glowing effect of inputs when focused -// $glowing-effect-fade-time: 0.45s; -// $glowing-effect-color: $input-focus-border-color; - -// Select variables -// $select-bg-color: #fafafa; - -// Inline Lists - -// $include-html-inline-list-classes: $include-html-classes; - -// We use this to control the margins and padding of the inline list. -// $inline-list-top-margin: 0; -// $inline-list-opposite-margin: 0; -// $inline-list-bottom-margin: rem-calc(17); -// $inline-list-default-float-margin: rem-calc(-22); - -// $inline-list-padding: 0; - -// We use this to control the overflow of the inline list. -// $inline-list-overflow: hidden; - -// We use this to control the list items -// $inline-list-display: block; - -// We use this to control any elments within list items -// $inline-list-children-display: block; - -// Joyride - -// $include-html-joyride-classes: $include-html-classes; - -// Controlling default Joyride styles -// $joyride-tip-bg: #333; -// $joyride-tip-default-width: 300px; -// $joyride-tip-padding: rem-calc(18 20 24); -// $joyride-tip-border: solid 1px #555; -// $joyride-tip-radius: 4px; -// $joyride-tip-position-offset: 22px; - -// Here, we're setting the tip dont styles -// $joyride-tip-font-color: #fff; -// $joyride-tip-font-size: rem-calc(14); -// $joyride-tip-header-weight: bold; - -// This changes the nub size -// $joyride-tip-nub-size: 10px; - -// This adjusts the styles for the timer when its enabled -// $joyride-tip-timer-width: 50px; -// $joyride-tip-timer-height: 3px; -// $joyride-tip-timer-color: #666; - -// This changes up the styles for the close button -// $joyride-tip-close-color: #777; -// $joyride-tip-close-size: 24px; -// $joyride-tip-close-weight: normal; - -// When Joyride is filling the screen, we use this style for the bg -// $joyride-screenfill: rgba(0,0,0,0.5); - -// Keystrokes - -// $include-html-keystroke-classes: $include-html-classes; - -// We use these to control text styles. -// $keystroke-font: "Consolas", "Menlo", "Courier", monospace; -// $keystroke-font-size: rem-calc(14); -// $keystroke-font-color: #222; -// $keystroke-font-color-alt: #fff; -// $keystroke-function-factor: -7%; - -// We use this to control keystroke padding. -// $keystroke-padding: rem-calc(2 4 0); - -// We use these to control background and border styles. -// $keystroke-bg: scale-color(#fff, $lightness: $keystroke-function-factor); -// $keystroke-border-style: solid; -// $keystroke-border-width: 1px; -// $keystroke-border-color: scale-color($keystroke-bg, $lightness: $keystroke-function-factor); -// $keystroke-radius: $global-radius; - -// Labels - -// $include-html-label-classes: $include-html-classes; - -// We use these to style the labels -// $label-padding: rem-calc(4 8 6); -// $label-radius: $global-radius; - -// We use these to style the label text -// $label-font-sizing: rem-calc(11); -// $label-font-weight: normal; -// $label-font-color: #333; -// $label-font-color-alt: #fff; -// $label-font-family: $body-font-family; - -// Magellan - -// $include-html-magellan-classes: $include-html-classes; - -// $magellan-bg: #fff; -// $magellan-padding: 10px; - -// Off-canvas - -// $tabbar-bg: #333; -// $tabbar-height: rem-calc(45); -// $tabbar-line-height: $tabbar-height; -// $tabbar-color: #FFF; -// $tabbar-middle-padding: 0 rem-calc(10); - -// Off Canvas Divider Styles -// $tabbar-right-section-border: solid 1px scale-color($tabbar-bg, $lightness: 13%); -// $tabbar-left-section-border: solid 1px scale-color($tabbar-bg, $lightness: -50%); - -// Off Canvas Tab Bar Headers -// $tabbar-header-color: #FFF; -// $tabbar-header-weight: bold; -// $tabbar-header-line-height: $tabbar-height; -// $tabbar-header-margin: 0; - -// Off Canvas Menu Variables -// $off-canvas-width: 250px; -// $off-canvas-bg: #333; - -// Off Canvas Menu List Variables -// $off-canvas-label-padding: 0.3rem rem-calc(15); -// $off-canvas-label-color: #999; -// $off-canvas-label-text-transform: uppercase; -// $off-canvas-label-font-weight: bold; -// $off-canvas-label-bg: #444; -// $off-canvas-label-border-top: 1px solid scale-color(#444, $lightness: 14%); -// $off-canvas-label-border-bottom: none; -// $off-canvas-label-margin:0; -// $off-canvas-link-padding: rem-calc(10, 15); -// $off-canvas-link-color: rgba(#FFF, 0.7); -// $off-canvas-link-border-bottom: 1px solid scale-color($off-canvas-bg, $lightness: -25%); - -// Off Canvas Menu Icon Variables -// $tabbar-menu-icon-color: #FFF; -// $tabbar-menu-icon-hover: scale-color($tabbar-menu-icon-color, $lightness: -30%); - -// $tabbar-menu-icon-text-indent: rem-calc(35); -// $tabbar-menu-icon-width: $tabbar-height; -// $tabbar-menu-icon-height: $tabbar-height; -// $tabbar-menu-icon-line-height: rem-calc(33); -// $tabbar-menu-icon-padding: 0; - -// $tabbar-hamburger-icon-width: rem-calc(16); -// $tabbar-hamburger-icon-left: false; -// $tabbar-hamburger-icon-top: false; -// $tapbar-hamburger-icon-thickness: 1px; -// $tapbar-hamburger-icon-gap: 6px; - -// Off Canvas Back-Link Overlay -// $off-canvas-overlay-transition: background 300ms ease; -// $off-canvas-overlay-cursor: pointer; -// $off-canvas-overlay-box-shadow: -4px 0 4px rgba(#000, 0.5), 4px 0 4px rgba(#000, 0.5); -// $off-canvas-overlay-background: rgba(#FFF, 0.2); -// $off-canvas-overlay-background-hover: rgba(#FFF, 0.05); - -// Transition Variables -// $menu-slide: "transform 500ms ease"; - -// Orbit - -// $include-html-orbit-classes: $include-html-classes; - -// We use these to control the caption styles -// $orbit-container-bg: none; -// $orbit-caption-bg: rgba(51,51,51, 0.8); -// $orbit-caption-font-color: #fff; -// $orbit-caption-font-size: rem-calc(14); -// $orbit-caption-position: "bottom"; // Supported values: "bottom", "under" -// $orbit-caption-padding: rem-calc(10 14); -// $orbit-caption-height: auto; - -// We use these to control the left/right nav styles -// $orbit-nav-bg: none; -// $orbit-nav-bg-hover: rgba(0,0,0,0.3); -// $orbit-nav-arrow-color: #fff; -// $orbit-nav-arrow-color-hover: #fff; - -// We use these to control the timer styles -// $orbit-timer-bg: rgba(255,255,255,0.3); -// $orbit-timer-show-progress-bar: true; - -// We use these to control the bullet nav styles -// $orbit-bullet-nav-color: #ccc; -// $orbit-bullet-nav-color-active: #999; -// $orbit-bullet-radius: rem-calc(9); - -// We use these to controls the style of slide numbers -// $orbit-slide-number-bg: rgba(0,0,0,0); -// $orbit-slide-number-font-color: #fff; -// $orbit-slide-number-padding: rem-calc(5); - -// Graceful Loading Wrapper and preloader -// $wrapper-class: "slideshow-wrapper"; -// $preloader-class: "preloader"; - -// Pagination - -// $include-html-nav-classes: $include-html-classes; - -// We use these to control the pagination container -// $pagination-height: rem-calc(24); -// $pagination-margin: rem-calc(-5); - -// We use these to set the list-item properties -// $pagination-li-float: $default-float; -// $pagination-li-height: rem-calc(24); -// $pagination-li-font-color: #222; -// $pagination-li-font-size: rem-calc(14); -// $pagination-li-margin: rem-calc(5); - -// We use these for the pagination anchor links -// $pagination-link-pad: rem-calc(1 10 1); -// $pagination-link-font-color: #999; -// $pagination-link-active-bg: scale-color(#fff, $lightness: -10%); - -// We use these for disabled anchor links -// $pagination-link-unavailable-cursor: default; -// $pagination-link-unavailable-font-color: #999; -// $pagination-link-unavailable-bg-active: transparent; - -// We use these for currently selected anchor links -// $pagination-link-current-background: $primary-color; -// $pagination-link-current-font-color: #fff; -// $pagination-link-current-font-weight: bold; -// $pagination-link-current-cursor: default; -// $pagination-link-current-active-bg: $primary-color; - -// Panels - -// $include-html-panel-classes: $include-html-classes; - -// We use these to control the background and border styles -// $panel-bg: scale-color(#fff, $lightness: -5%); -// $panel-border-style: solid; -// $panel-border-size: 1px; - -// We use this % to control how much we darken things on hover -// $panel-function-factor: -11%; -// $panel-border-color: scale-color($panel-bg, $lightness: $panel-function-factor); - -// We use these to set default inner padding and bottom margin -// $panel-margin-bottom: rem-calc(20); -// $panel-padding: rem-calc(20); - -// We use these to set default font colors -// $panel-font-color: #333; -// $panel-font-color-alt: #fff; - -// $panel-header-adjust: true; -// $callout-panel-link-color: $primary-color; - -// Pricing Tables - -// $include-html-pricing-classes: $include-html-classes; - -// We use this to control the border color -// $price-table-border: solid 1px #ddd; - -// We use this to control the bottom margin of the pricing table -// $price-table-margin-bottom: rem-calc(20); - -// We use these to control the title styles -// $price-title-bg: #333; -// $price-title-padding: rem-calc(15 20); -// $price-title-align: center; -// $price-title-color: #eee; -// $price-title-weight: normal; -// $price-title-size: rem-calc(16); -// $price-title-font-family: $body-font-family; - -// We use these to control the price styles -// $price-money-bg: #f6f6f6 ; -// $price-money-padding: rem-calc(15 20); -// $price-money-align: center; -// $price-money-color: #333; -// $price-money-weight: normal; -// $price-money-size: rem-calc(32); -// $price-money-font-family: $body-font-family; - - -// We use these to control the description styles -// $price-bg: #fff; -// $price-desc-color: #777; -// $price-desc-padding: rem-calc(15); -// $price-desc-align: center; -// $price-desc-font-size: rem-calc(12); -// $price-desc-weight: normal; -// $price-desc-line-height: 1.4; -// $price-desc-bottom-border: dotted 1px #ddd; - -// We use these to control the list item styles -// $price-item-color: #333; -// $price-item-padding: rem-calc(15); -// $price-item-align: center; -// $price-item-font-size: rem-calc(14); -// $price-item-weight: normal; -// $price-item-bottom-border: dotted 1px #ddd; - -// We use these to control the CTA area styles -// $price-cta-bg: #fff; -// $price-cta-align: center; -// $price-cta-padding: rem-calc(20 20 0); - -// Progress Meters - -// $include-html-media-classes: $include-html-classes; - -// We use this to se the prog bar height -// $progress-bar-height: rem-calc(25); -// $progress-bar-color: #f6f6f6 ; - -// We use these to control the border styles -// $progress-bar-border-color: scale-color(#fff, $lightness: -20%); -// $progress-bar-border-size: 1px; -// $progress-bar-border-style: solid; -// $progress-bar-border-radius: $global-radius; - -// We use these to control the margin & padding -// $progress-bar-pad: rem-calc(2); -// $progress-bar-margin-bottom: rem-calc(10); - -// We use these to set the meter colors -// $progress-meter-color: $primary-color; -// $progress-meter-secondary-color: $secondary-color; -// $progress-meter-success-color: $success-color; -// $progress-meter-alert-color: $alert-color; - -// Reveal - -// $include-html-reveal-classes: $include-html-classes; - -// We use these to control the style of the reveal overlay. -// $reveal-overlay-bg: rgba(#000, .45); -// $reveal-overlay-bg-old: #000; - -// We use these to control the style of the modal itself. -// $reveal-modal-bg: #fff; -// $reveal-position-top: 50px; -// $reveal-default-width: 80%; -// $reveal-modal-padding: rem-calc(20); -// $reveal-box-shadow: 0 0 10px rgba(#000,.4); - -// We use these to style the reveal close button -// $reveal-close-font-size: rem-calc(22); -// $reveal-close-top: rem-calc(8); -// $reveal-close-side: rem-calc(11); -// $reveal-close-color: #aaa; -// $reveal-close-weight: bold; - -// We use these to control the modal border -// $reveal-border-style: solid; -// $reveal-border-width: 1px; -// $reveal-border-color: #666; - -// $reveal-modal-class: "reveal-modal"; -// $close-reveal-modal-class: "close-reveal-modal"; - -// Side Nav - -// $include-html-nav-classes: $include-html-classes; - -// We use this to control padding. -// $side-nav-padding: rem-calc(14 0); - -// We use these to control list styles. -// $side-nav-list-type: none; -// $side-nav-list-position: inside; -// $side-nav-list-margin: rem-calc(0 0 7 0); - -// We use these to control link styles. -// $side-nav-link-color: $primary-color; -// $side-nav-link-color-active: scale-color($side-nav-link-color, $lightness: 30%); -// $side-nav-link-color-hover: scale-color($side-nav-link-color, $lightness: 30%); -// $side-nav-font-size: rem-calc(14); -// $side-nav-font-weight: normal; -// $side-nav-font-family: $body-font-family; -// $side-nav-active-font-family: $side-nav-font-family; - - - -// We use these to control border styles -// $side-nav-divider-size: 1px; -// $side-nav-divider-style: solid; -// $side-nav-divider-color: scale-color(#fff, $lightness: -10%); - -// Split Buttons - -// $include-html-button-classes: $include-html-classes; - -// We use these to control different shared styles for Split Buttons -// $split-button-function-factor: 10%; -// $split-button-pip-color: #fff; -// $split-button-pip-color-alt: #333; -// $split-button-active-bg-tint: rgba(0,0,0,0.1); - -// We use these to control tiny split buttons -// $split-button-padding-tny: $button-pip-tny * 10; -// $split-button-span-width-tny: $button-pip-tny * 6; -// $split-button-pip-size-tny: $button-pip-tny; -// $split-button-pip-top-tny: $button-pip-tny * 2; -// $split-button-pip-default-float-tny: rem-calc(-6); - -// We use these to control small split buttons -// $split-button-padding-sml: $button-pip-sml * 10; -// $split-button-span-width-sml: $button-pip-sml * 6; -// $split-button-pip-size-sml: $button-pip-sml; -// $split-button-pip-top-sml: $button-pip-sml * 1.5; -// $split-button-pip-default-float-sml: rem-calc(-6); - -// We use these to control medium split buttons -// $split-button-padding-med: $button-pip-med * 9; -// $split-button-span-width-med: $button-pip-med * 5.5; -// $split-button-pip-size-med: $button-pip-med - rem-calc(3); -// $split-button-pip-top-med: $button-pip-med * 1.5; -// $split-button-pip-default-float-med: rem-calc(-6); - -// We use these to control large split buttons -// $split-button-padding-lrg: $button-pip-lrg * 8; -// $split-button-span-width-lrg: $button-pip-lrg * 5; -// $split-button-pip-size-lrg: $button-pip-lrg - rem-calc(6); -// $split-button-pip-top-lrg: $button-pip-lrg + rem-calc(5); -// $split-button-pip-default-float-lrg: rem-calc(-6); - -// Sub Nav - -// $include-html-nav-classes: $include-html-classes; - -// We use these to control margin and padding -// $sub-nav-list-margin: rem-calc(-4 0 18); -// $sub-nav-list-padding-top: rem-calc(4); - -// We use this to control the definition -// $sub-nav-font-family: $body-font-family; -// $sub-nav-font-size: rem-calc(14); -// $sub-nav-font-color: #999; -// $sub-nav-font-weight: normal; -// $sub-nav-text-decoration: none; -// $sub-nav-border-radius: 3px; -// $sub-nav-font-color-hover: scale-color($sub-nav-font-color, $lightness: -25%); - - -// We use these to control the active item styles - -// $sub-nav-active-font-weight: normal; -// $sub-nav-active-bg: $primary-color; -// $sub-nav-active-bg-hover: scale-color($sub-nav-active-bg, $lightness: -14%); -// $sub-nav-active-color: #fff; -// $sub-nav-active-padding: rem-calc(3 16); -// $sub-nav-active-cursor: default; - -// $sub-nav-item-divider: ""; -// $sub-nav-item-divider-margin: rem-calc(12); - -// -// SWITCH -// - -// $include-html-form-classes: $include-html-classes; - -// Controlling border styles and background colors for the switch container -// $switch-border-color: scale-color(#fff, $lightness: -20%); -// $switch-border-style: solid; -// $switch-border-width: 1px; -// $switch-bg: #fff; - -// We use these to control the switch heights for our default classes -// $switch-height-tny: 22px; -// $switch-height-sml: 28px; -// $switch-height-med: 36px; -// $switch-height-lrg: 44px; -// $switch-bottom-margin: rem-calc(20); - -// We use these to control default font sizes for our classes. -// $switch-font-size-tny: 11px; -// $switch-font-size-sml: 12px; -// $switch-font-size-med: 14px; -// $switch-font-size-lrg: 17px; -// $switch-label-side-padding: 6px; - -// We use these to style the switch-paddle -// $switch-paddle-bg: #fff; -// $switch-paddle-fade-to-color: scale-color($switch-paddle-bg, $lightness: -10%); -// $switch-paddle-border-color: scale-color($switch-paddle-bg, $lightness: -35%); -// $switch-paddle-border-width: 1px; -// $switch-paddle-border-style: solid; -// $switch-paddle-transition-speed: .1s; -// $switch-paddle-transition-ease: ease-out; -// $switch-positive-color: scale-color($success-color, $lightness: 94%); -// $switch-negative-color: #f5f5f5; - -// Outline Style for tabbing through switches -// $switch-label-outline: 1px dotted #888; - -// Tables - -// $include-html-table-classes: $include-html-classes; - -// These control the background color for the table and even rows -// $table-bg: #fff; -// $table-even-row-bg: #f9f9f9 ; - -// These control the table cell border style -// $table-border-style: solid; -// $table-border-size: 1px; -// $table-border-color: #ddd; - -// These control the table head styles -// $table-head-bg: #f5f5f5 ; -// $table-head-font-size: rem-calc(14); -// $table-head-font-color: #222; -// $table-head-font-weight: bold; -// $table-head-padding: rem-calc(8 10 10); - -// These control the row padding and font styles -// $table-row-padding: rem-calc(9 10); -// $table-row-font-size: rem-calc(14); -// $table-row-font-color: #222; -// $table-line-height: rem-calc(18); - -// These are for controlling the display and margin of tables -// $table-display: table-cell; -// $table-margin-bottom: rem-calc(20); - -// -// TABS -// - -// $include-html-tabs-classes: $include-html-classes; - -// $tabs-navigation-padding: rem-calc(16); -// $tabs-navigation-bg-color: #efefef ; -// $tabs-navigation-active-bg-color: #fff; -// $tabs-navigation-hover-bg-color: scale-color($tabs-navigation-bg-color, $lightness: -6%); -// $tabs-navigation-font-color: #222; -// $tabs-navigation-font-size: rem-calc(16); -// $tabs-navigation-font-family: $body-font-family; - -// $tabs-content-margin-bottom: rem-calc(24); -// $tabs-content-padding: $column-gutter/2; - -// $tabs-vertical-navigation-margin-bottom: 1.25rem; - -// -// THUMBNAILS -// - -// $include-html-media-classes: $include-html-classes; - -// We use these to control border styles -// $thumb-border-style: solid; -// $thumb-border-width: 4px; -// $thumb-border-color: #fff; -// $thumb-box-shadow: 0 0 0 1px rgba(#000,.2); -// $thumb-box-shadow-hover: 0 0 6px 1px rgba($primary-color,0.5); - -// Radius and transition speed for thumbs -// $thumb-radius: $global-radius; -// $thumb-transition-speed: 200ms; - -// -// TOOLTIPS -// - -// $include-html-tooltip-classes: $include-html-classes; - -// $has-tip-border-bottom: dotted 1px #ccc; -// $has-tip-font-weight: bold; -// $has-tip-font-color: #333; -// $has-tip-border-bottom-hover: dotted 1px scale-color($primary-color, $lightness: -55%); -// $has-tip-font-color-hover: $primary-color; -// $has-tip-cursor-type: help; - -// $tooltip-padding: rem-calc(12); -// $tooltip-bg: #333; -// $tooltip-font-size: rem-calc(14); -// $tooltip-font-weight: normal; -// $tooltip-font-color: #fff; -// $tooltip-line-height: 1.3; -// $tooltip-close-font-size: rem-calc(10); -// $tooltip-close-font-weight: normal; -// $tooltip-close-font-color: #777; -// $tooltip-font-size-sml: rem-calc(14); -// $tooltip-radius: $global-radius; -// $tooltip-rounded: $global-rounded; -// $tooltip-pip-size: 5px; - -// -// TOP BAR -// - -// $include-html-top-bar-classes: $include-html-classes; - -// Background color for the top bar -// $topbar-bg-color: #333; -// $topbar-bg: $topbar-bg-color; - -// Height and margin -// $topbar-height: 45px; -// $topbar-margin-bottom: 0; - -// Controlling the styles for the title in the top bar -// $topbar-title-weight: normal; -// $topbar-title-font-size: rem-calc(17); - -// Style the top bar dropdown elements -// $topbar-dropdown-bg: #333; -// $topbar-dropdown-link-color: #fff; -// $topbar-dropdown-link-bg: #333; -// $topbar-dropdown-link-weight: normal; -// $topbar-dropdown-toggle-size: 5px; -// $topbar-dropdown-toggle-color: #fff; -// $topbar-dropdown-toggle-alpha: 0.4; - -// Set the link colors and styles for top-level nav -// $topbar-link-color: #fff; -// $topbar-link-color-hover: #fff; -// $topbar-link-color-active: #fff; -// $topbar-link-color-active-hover: #fff; -// $topbar-link-weight: normal; -// $topbar-link-font-size: rem-calc(13); -// $topbar-link-hover-lightness: -10%; // Darken by 10% -// $topbar-link-bg-hover: #272727; -// $topbar-link-bg-active: $primary-color; -// $topbar-link-bg-active-hover: scale-color($primary-color, $lightness: -14%); -// $topbar-link-font-family: $body-font-family; -// $topbar-link-text-transform: none; -// $topbar-link-padding: $topbar-height / 3; - -// $topbar-button-font-size: 0.75rem; -// $topbar-button-top: 7px; - -// $topbar-dropdown-label-color: #777; -// $topbar-dropdown-label-text-transform: uppercase; -// $topbar-dropdown-label-font-weight: bold; -// $topbar-dropdown-label-font-size: rem-calc(10); -// $topbar-dropdown-label-bg: #333; - -// Top menu icon styles -// $topbar-menu-link-transform: uppercase; -// $topbar-menu-link-font-size: rem-calc(13); -// $topbar-menu-link-weight: bold; -// $topbar-menu-link-color: #fff; -// $topbar-menu-icon-color: #fff; -// $topbar-menu-link-color-toggled: #888; -// $topbar-menu-icon-color-toggled: #888; - -// Transitions and breakpoint styles -// $topbar-transition-speed: 300ms; -// Using rem-calc for the below breakpoint causes issues with top bar -// $topbar-breakpoint: #{upper-bound($medium-range)}; // Change to 9999px for always mobile layout -// $topbar-media-query: "only screen and (min-width: #{upper-bound($medium-range)})"; - -// Divider Styles -// $topbar-divider-border-bottom: solid 1px scale-color($topbar-bg-color, $lightness: 13%); -// $topbar-divider-border-top: solid 1px scale-color($topbar-bg-color, $lightness: -50%); - -// Sticky Class -// $topbar-sticky-class: ".sticky"; -// $topbar-arrows: true; //Set false to remove the triangle icon from the menu item - -// -// VISIBILITY CLASSES -// - -// $include-html-visibility-classes: $include-html-classes; -// $include-table-visibility-classes: true; -// $include-legacy-visibility-classes: true; - -// -// RANGE SLIDER -// - -// $include-html-range-slider-classes: $include-html-classes; - -// These variabels define the slider bar styles -// $range-slider-bar-width: 100%; -// $range-slider-bar-height: rem-calc(16); - -// $range-slider-bar-border-width: 1px; -// $range-slider-bar-border-style: solid; -// $range-slider-bar-border-color: #ddd; -// $range-slider-radius: $global-radius; -// $range-slider-round: $global-rounded; -// $range-slider-bar-bg-color: #fafafa; - -// Vertical bar styles -// $range-slider-vertical-bar-width: rem-calc(16); -// $range-slider-vertical-bar-height: rem-calc(200); - -// These variabels define the slider handle styles -// $range-slider-handle-width: rem-calc(32); -// $range-slider-handle-height: rem-calc(22); -// $range-slider-handle-position-top: rem-calc(-5); -// $range-slider-handle-bg-color: $primary-color; -// $range-slider-handle-border-width: 1px; -// $range-slider-handle-border-style: solid; -// $range-slider-handle-border-color: none; -// $range-slider-handle-radius: $global-radius; -// $range-slider-handle-round: $global-rounded; -// $range-slider-handle-bg-hover-color: scale-color($primary-color, $lightness: -12%); -// $range-slider-handle-cursor: pointer; - -// CUSTOM VARIABLES -@import 'foundation' - -// Prevent empty columns from collapsing -.column, .columns - min-height: 1px -.alert-box - &.alert - a - font-weight: bold - padding-left: 10px - color: white -.switch - margin-bottom: 0 - -$button-margin: rem-calc(10) -$button-qr-code-color: #555 -$button-index-color: $secondary-color -$button-new-color: $primary-color -$button-edit-color: $warning-color -$button-destroy-color: $alert-color -$button-submit-color: $primary-color -$button-cancel-color: $secondary-color diff --git a/app/assets/stylesheets/supplier/foundation1/_mixins.sass b/app/assets/stylesheets/supplier/foundation1/_mixins.sass deleted file mode 100644 index f1fe93ee..00000000 --- a/app/assets/stylesheets/supplier/foundation1/_mixins.sass +++ /dev/null @@ -1,19 +0,0 @@ -@mixin button-icon-only - padding: 2px 5px - margin: 0 - &.hide - display: none - -@mixin table-fit - width: 1px - white-space: nowrap -= button-shadow - transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) - transition-delay: 0.2s - box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26) -= push-button($bg: $secondary-color, $padding: 10px) - +button($bg: $bg) - +button-shadow - padding: $padding - margin: 0 - border-radius: $global-rounded diff --git a/app/assets/stylesheets/supplier/foundation1/_qconstants.sass b/app/assets/stylesheets/supplier/foundation1/_qconstants.sass deleted file mode 100644 index efdfe140..00000000 --- a/app/assets/stylesheets/supplier/foundation1/_qconstants.sass +++ /dev/null @@ -1,8 +0,0 @@ -//$qbrown: #634227 -$qbrown: #853d15 -$qbrown-active: lighten($qbrown, 20%) -$wood: image-url('textures/theme1.jpg') -$background-brown: #57351f -$current-color: #fc3 -$active-color: #fc3 -$button-spacing: 8px diff --git a/app/assets/stylesheets/supplier/foundation1/_qdisplays.sass b/app/assets/stylesheets/supplier/foundation1/_qdisplays.sass deleted file mode 100644 index 91fc251d..00000000 --- a/app/assets/stylesheets/supplier/foundation1/_qdisplays.sass +++ /dev/null @@ -1,17 +0,0 @@ -.display-row - +grid-row(nest) - .display-label - font-weight: bold - @media #{$small-only} - +grid-column($columns:10, $center:true) - @media #{$medium-only} - +grid-column($columns:4, $offset:1) - @media #{$large-up} - +grid-column(3) - .display-field - @media #{$small-only} - +grid-column($columns:10, $center:true, $last-column:true) - @media #{$medium-only} - +grid-column($columns:4, $last-column:true) - @media #{$large-up} - +grid-column($columns: 3, $last-column:true) diff --git a/app/assets/stylesheets/supplier/foundation1/_qicons.sass b/app/assets/stylesheets/supplier/foundation1/_qicons.sass deleted file mode 100644 index 8b2280b4..00000000 --- a/app/assets/stylesheets/supplier/foundation1/_qicons.sass +++ /dev/null @@ -1,71 +0,0 @@ -span.icon - @extend .fa - //@extend .fa-lg - &.dashboard - @extend .fa-list-alt - &.menu - @extend .fa-coffee - &.needs-help - @extend .fa-bell - &.needs-payment - @extend .fa-money - &.sections - @extend .fa-th-large - &.tables - //@extend .fa-pause - width: 16px - height: 16px - background-image: image-url("icons/table-white.svg") - &.lists - @extend .fa-sticky-note-o - &.employees - @extend .fa-users - &.schedule - @extend .fa-calendar - &.settings - @extend .fa-gears - - &.section-areas - @extend .fa-object-group - &.section-elements - @extend .fa-image -// CUSTOM ICONS -.top-menu - .icon.tables - background-image: image-url("icons/table-green.svg") -.active - span.icon - &.tables - background-image: image-url("icons/table-current.svg") -.side-menu - .icon -// STACK FIXES -.fa-stack - .revoke - color: #b94a48 -.fa-shifted-stack .fa-shifted:last-child - margin-left: -1.15rem -button, .button - .fa-shifted-stack - .fa-shifted:last-child - margin-left: -0.85rem - .fa-stack.fa-stack-sized - width: auto - height: auto - line-height: 0 // For some reason this works on supplier dashboard for list - vertical-align: -15% - .fa-stack-small - font-size: 0.5em - .fa:last-child - margin-left: -1.35rem - vertical-align: -20% - &.fa-stack-small - margin-left: -1.35rem - vertical-align: 30% - .fa-stack-check:last-child - @extend .fa - @extend .fa-check - color: #ffd600 - margin-left: -2rem - vertical-align: 0 - text-shadow: 1px 4px 1px rgba(0, 0, 0, 0.45) diff --git a/app/assets/stylesheets/supplier/foundation1/_qlists.sass b/app/assets/stylesheets/supplier/foundation1/_qlists.sass deleted file mode 100644 index 8e1905a7..00000000 --- a/app/assets/stylesheets/supplier/foundation1/_qlists.sass +++ /dev/null @@ -1,55 +0,0 @@ -td.boolean - +table-fit - .boolean-true - @extend .fa, .fa-check - &.needs_help - .boolean-true - @extend .fa - @extend .fa-bell - &.needs_payment - .boolean-true - @extend .fa - @extend .fa-money -.display-field - .boolean-true - @extend .fa, .fa-lg, .fa-check - .boolean-false - @extend .fa, .fa-lg, .fa-minus - -.change-list-table-section-tables - list-style: none - +clearfix - li - float: left - margin-right: 10px - margin-bottom: 10px - a - +button($padding: $button-sml) - margin: 0 -td.colorbox - +table-fit -.list-orders-container - .currency - float: right - list-style: none - $padding: 6px 0 6px 35px - .list-order-container - background-position: left center - background-repeat: no-repeat - +grid-column(12) - padding: $padding - border-bottom: 1px solid #eee - &.active - background-image: image-url('supplier/order-check.png') - &.delivered, &.closed - background-image: image-url('supplier/order-doublecheck.png') - &.closed - .created_at - float: right - padding-right: 20px - padding-left: 10px - .list-orders-total - +grid-column(12) - padding: $padding - border-top: 2px solid #444 - font-weight: bold diff --git a/app/assets/stylesheets/supplier/foundation1/_qsections.sass b/app/assets/stylesheets/supplier/foundation1/_qsections.sass deleted file mode 100644 index 52007c03..00000000 --- a/app/assets/stylesheets/supplier/foundation1/_qsections.sass +++ /dev/null @@ -1,50 +0,0 @@ -.section-edit-mode-button - +push-button($bg: $secondary-color) - color: $warning-color - margin-left: 5px - span - @extend .fa - @extend .fa-lg - @extend .fa-edit -.section-normal-mode-button - margin-left: 5px - +push-button($bg: $secondary-color) - color: $success-color - span - @extend .fa - @extend .fa-lg - @extend .fa-save -.section-rollback-button - margin-left: 5px - margin-right: 12px - +push-button($bg: $secondary-color) - color: $warning-color - span - @extend .fa - @extend .fa-lg - @extend .fa-undo -.arrange-tables-type-button - +button($bg: $secondary-color, $padding: $button-tny) -.arrange-tables-current-type - display: inline-block - margin-left: 10px - margin-right: 10px -.section-actions-menu-header - padding-top: 4px - padding-bottom: 4px -.arrange-content - input - width: 62px - display: inline-block -.section-manage-tables - .dropdown-container - margin-right: 10px - margin-left: 10px - .section-destroy - color: $alert-color - input - height: auto - padding-top: 4px - padding-bottom: 4px - &.section-edit-title-field - margin-right: 10px diff --git a/app/assets/stylesheets/supplier/foundation1/_qstructure.sass b/app/assets/stylesheets/supplier/foundation1/_qstructure.sass deleted file mode 100644 index da542f72..00000000 --- a/app/assets/stylesheets/supplier/foundation1/_qstructure.sass +++ /dev/null @@ -1,92 +0,0 @@ -$side-spacing: 0px -header.top-menu - height: 90px -.main-section - +panel($bg:rgba(200,200,200,0.9)) - padding: 0 - padding-bottom: 72px - margin: 0 - min-height: 100% -@media #{$xlarge-up} - header.top-menu - position: fixed - box-shadow: 0px 5px 10px 0px rgba(0,0,0,0.75) - z-index: 4022 - width: 100% - .main-section - @media #{$xlarge-up} - padding-top: 130px - .main-section-header - position: fixed - top: 90px - box-shadow: 0px 5px 10px 0px rgba(0,0,0,0.75) - z-index: 4030 - background-color: rgba(200,200,200, 0.5) -h2.main-section-header - font-size: 1.4em - padding: 4px -.supplier-is-closed - +alert($bg: $secondary-color) - .close - +alert-close - .supplier-open-shop - +button($padding: $button-tny) - margin: 0 - margin-left: 20px - form - margin: 0 - display: inline-block -.location_picker_search - float: left -.text-alert - color: $alert-color -.text-warning - color: $warning-color -input.dimension - width: 52px -span.dimension - font-style: italic - padding-left: 2px -.location_picker_map - width: 600px - height: 500px - border: 1px solid black - padding: 2px - display: inline-block - float: left - clear: left - img - max-width: none - label - width: auto - display:inline -.handle - cursor: move - font-size: 0.8em - color: #777 -form - &.form-inline - display: inline-block - padding: 4px -.clear - clear: both -body - background-image: $wood !important - background-repeat: repeat - height: 100% -.ember-application, .application-view - height: 100% - padding: 0 - margin: 0 - -.hide, .hidden - display: none - -span.loading - @extend .fa - @extend .fa-spinner - @extend .fa-spin - &.medium - @extend .fa-lg - &.large - @extend .fa-2x diff --git a/app/assets/stylesheets/supplier/foundation1/_section_tab_headers.sass b/app/assets/stylesheets/supplier/foundation1/_section_tab_headers.sass deleted file mode 100644 index fc8f2e18..00000000 --- a/app/assets/stylesheets/supplier/foundation1/_section_tab_headers.sass +++ /dev/null @@ -1,43 +0,0 @@ -.section-tabs-container - .section-tab-header - float: left - margin-right: 10px - $border: 1px solid black - border: $border - padding: 5px - cursor: pointer - font-weight: bold - background-color: rgba(200,200,200,0.4) - color: #333 - margin-bottom: 2px - &.active - border-bottom-width: 0 - margin-top: 4px - margin-bottom: 0 - &.table-hover, &.table-dragging - background-size: 100px - background-position: center center - background-repeat: no-repeat - &.table-dragging - background-image: image-url('supplier/drop-target.svg') - &.table-hover - background-image: image-url('supplier/drop-target-active.svg') - &:after - content: '' - display: block - clear: left - .add-section - display: inline-block - margin-top: 8px - span - @extend .fa - @extend .fa-lg - @extend .fa-plus - - .goto-sections-index-tab-header - float: left - span - @extend .fa - @extend .fa-share - @extend .fa-lg - @extend .fa-rotate-270 diff --git a/app/assets/stylesheets/supplier/foundation1/application.sass b/app/assets/stylesheets/supplier/foundation1/application.sass deleted file mode 100644 index e68f64de..00000000 --- a/app/assets/stylesheets/supplier/foundation1/application.sass +++ /dev/null @@ -1,19 +0,0 @@ -//= require qtip -//= require pickdate -//= require fullcalendar -// bourbon for animation -@import bourbon -@import font-awesome -@import ./qconstants -@import ./foundation_and_overrides -@import ./mixins -@import ./qstructure -@import ./qicons -@import ./qdisplays -@import ./form_actions -@import ./components/* -@import ./resources/* -@import ./qsections -@import ./section_tab_headers -@import ./qlists -@import ./ember_dropdown diff --git a/app/assets/stylesheets/supplier/foundation1/components/_animations.sass b/app/assets/stylesheets/supplier/foundation1/components/_animations.sass deleted file mode 100644 index e2aaf935..00000000 --- a/app/assets/stylesheets/supplier/foundation1/components/_animations.sass +++ /dev/null @@ -1,10 +0,0 @@ -// spin-rotate is currently used when clicked on a section-element in a section view -.spin-rotate - //animation(spinRotate 2s) - animation-name: spinRotate - animation-duration: 2s -@keyframes spinRotate - from - transform: rotate(0deg) - to - transform: rotate(360deg) diff --git a/app/assets/stylesheets/supplier/foundation1/components/_buttons.sass b/app/assets/stylesheets/supplier/foundation1/components/_buttons.sass deleted file mode 100644 index 05e9d4a4..00000000 --- a/app/assets/stylesheets/supplier/foundation1/components/_buttons.sass +++ /dev/null @@ -1,42 +0,0 @@ -.button-text - // Only icons for now - display: none -.mark-list-as-helped-button - +button-icon-only - vertical-align: middle - padding-left: 8px //do not ask me why, just looks - padding-right: 2px //do not ask me why, just looks - margin-right: $button-spacing - span - @extend .fa, .fa-2x, .fa-bell-slash-o -.mark-order-active-button - +button-icon-only - margin-right: 0.6em -.mark-order-delivered-button - +button-icon-only -.show-list-button - +button-icon-only - vertical-align: middle - margin-left: $button-spacing -.mark-order-cancelled-button - +button($bg: $alert-color) - +button-icon-only - margin-left: $button-spacing - span - @extend .fa - @extend .fa-2x - @extend .fa-times - -.change-list-table-button - +button($bg: $warning-color, $padding: $button-tny) - margin: 0 - margin-bottom: 8px -.close-list-button - +button-icon-only - vertical-align: middle -.remove-list-needs-payment-button - +button-icon-only - vertical-align: middle - padding-left: 8px //do not ask me why, just looks - padding-right: 2px //do not ask me why, just looks - margin-right: $button-spacing diff --git a/app/assets/stylesheets/supplier/foundation1/components/_colorbox.sass b/app/assets/stylesheets/supplier/foundation1/components/_colorbox.sass deleted file mode 100644 index 249fffa8..00000000 --- a/app/assets/stylesheets/supplier/foundation1/components/_colorbox.sass +++ /dev/null @@ -1,23 +0,0 @@ -.colorbox-container - line-height: 1px - display: inline-block - span - display: inline-block -.form-field, .display-field - .current-color - .colorbox-container - padding: 4px - border: 2px solid #777 - margin-right: 16px - span - width: 32px - height: 32px - .colorbox-container - margin-right: 8px - span - width: 32px - height: 32px - -td .colorbox-container span, .colorbox .colorbox-container span - width: 16px - height: 16px diff --git a/app/assets/stylesheets/supplier/foundation1/components/_edit_currency.sass b/app/assets/stylesheets/supplier/foundation1/components/_edit_currency.sass deleted file mode 100644 index 2b2180e2..00000000 --- a/app/assets/stylesheets/supplier/foundation1/components/_edit_currency.sass +++ /dev/null @@ -1,12 +0,0 @@ -.edit-currency-container - input - text-align: right - &.error - input - border-color: $alert-color - color: darken($alert-color, 40%) - label.prefix - background-color: $alert-color - color: white - font-weight: bold - diff --git a/app/assets/stylesheets/supplier/foundation1/components/_flash_message.sass b/app/assets/stylesheets/supplier/foundation1/components/_flash_message.sass deleted file mode 100644 index fc2a1dc2..00000000 --- a/app/assets/stylesheets/supplier/foundation1/components/_flash_message.sass +++ /dev/null @@ -1,28 +0,0 @@ -.flash-message - position: fixed - top: 60px - right: -440px - background-color: rgba(200,200,200,0.8) - padding: 20px - width: 400px - border-radius: 9999px - font-weight: bold - font-size: 1.4 - z-index: 8976 - animation-name: flashMessageInactive - animation-duration: 0.5s - &.active - animation-name: flashMessageActive - animation-duration: 0.5s - right: 20px - -@keyframes flashMessageActive - from - right: -440px - to - right: 20px -@keyframes flashMessageInactive - from - right: 20px - to - right: -440px diff --git a/app/assets/stylesheets/supplier/foundation1/components/_forms.sass b/app/assets/stylesheets/supplier/foundation1/components/_forms.sass deleted file mode 100644 index 09a006e0..00000000 --- a/app/assets/stylesheets/supplier/foundation1/components/_forms.sass +++ /dev/null @@ -1,56 +0,0 @@ -.form-row - +grid-row - .form-label - @media #{$small-only} - +grid-column($columns:10, $center:true) - @media #{$medium-only} - +grid-column($columns:4, $offset:1) - @media #{$large-up} - +grid-column(3) - &.half - +grid-column(6) - .form-field - @media #{$small-only} - +grid-column($columns:10, $center:true, $last-column:true) - @media #{$medium-only} - +grid-column($columns:4, $last-column:true) - @media #{$large-up} - +grid-column($columns: 4, $last-column:true) - &.full - @media #{$small-only} - +grid-column($columns:10, $center:true, $last-column:true) - @media #{$medium-only} - +grid-column($columns:6, $last-column:true) - @media #{$large-up} - +grid-column($columns: 9, $last-column:true) - &.half - +grid-column(6) - .error - color: $alert-color - .form-info - @media #{$small-only} - +grid-column($columns:10, $center:true) - @media #{$medium-only} - +grid-column($columns:4, $offset:1) - @media #{$large-up} - +grid-column(3) - .error-message - color: $alert-color - &.form-actions - padding-top: 12px -body - label - &.number - display: inline-block - padding: 4px 10px - input - &.number - width: 60px - display: inline-block - .apply-filter - +button($bg: $primary-color, $padding: $button-tny) - .error - input, textarea - border-color: $alert-color - input[type="number"] - text-align: right diff --git a/app/assets/stylesheets/supplier/foundation1/components/_language_switcher.sass b/app/assets/stylesheets/supplier/foundation1/components/_language_switcher.sass deleted file mode 100644 index a4228646..00000000 --- a/app/assets/stylesheets/supplier/foundation1/components/_language_switcher.sass +++ /dev/null @@ -1,10 +0,0 @@ -.language-switcher-container - .language-switch-button - +button($bg: $secondary-color, $padding: $button-tny) - margin: 0 - margin-right: 8px - &.current - +button($bg: $current-color, $padding: $button-tny) - margin: 0 - margin-right: 8px - border: 1px solid #333 diff --git a/app/assets/stylesheets/supplier/foundation1/components/_menu-products.sass b/app/assets/stylesheets/supplier/foundation1/components/_menu-products.sass deleted file mode 100644 index dc71f3ce..00000000 --- a/app/assets/stylesheets/supplier/foundation1/components/_menu-products.sass +++ /dev/null @@ -1,115 +0,0 @@ -//DEPRICATED -.row.product_category-container - margin-bottom: 15px - -.products-menu-filters-container - float: right - width: 200px - -.product_category-header - border-top: 1px solid #ccc - border-bottom: 1px solid #ccc - .move - @extend .fa - // @extend .fa-lg - @extend .fa-arrows - margin-right: 8px - .title - font-weight: bold - font-size: 1.3em - .availability - font-size: 0.8em - padding-left: 1em - padding-right: 1em - .day-names - color: #444 - .time-range - color: rgb(39, 6, 121) - .edit-product-category-button - +push-button($bg: $secondary-color) - color: $warning-color - font-size: 0.7em - vertical-align: top - span - @extend .fa - @extend .fa-lg - @extend .fa-edit - .add-product-product_category-button - +push-button($bg: $primary-color) - font-size: 0.7em - position: absolute - right: 10px - top: 0.6em - span - @extend .fa - @extend .fa-lg - @extend .fa-plus -.product_category-move-row - .availability - font-size: 0.8em - .day-names - color: #444 - .time-range - color: rgb(39, 6, 121) -.show-menu-product-row - padding: 4px 0 -.menu-product-container - &.inactive - color: #777 - &.editing - box-shadow: 5px 5px 5px #555 - //border-left: 1px solid rgba(100,100,100,0.3) - //border-top: 1px solid rgba(100,100,100,0.3) - margin-left: -5px - margin-top: -5px - margin-bottom: 16px - background-color: #ccc - padding: 5px - z-index: 722 - .highlight - text-decoration: underline - font-weight: bold - .edit-product-action - +push-button($bg: $secondary-color) - font-size: 0.9em - span - @extend .fa - @extend .fa-edit - .rollback-product-action - +push-button($bg: $secondary-color) - color: $warning-color - margin-right: 12px - span - @extend .fa - @extend .fa-lg - @extend .fa-undo - .destroy-product-action - +push-button($bg: $secondary-color) - color: $alert-color - margin-right: 12px - span - @extend .fa - @extend .fa-lg - @extend .fa-trash - .remove-product-variant - +push-button($bg: $alert-color, $padding: 5px) - span - @extend .fa, .fa-trash - .add-product-variant - +button($bg: $success-color, $padding: $button-tny) - .icon - @extend .fa, .fa-plus - margin-right: 6px - .error - color: $alert-color - input - margin-bottom: 0 - .save-product-action - +push-button($bg: $secondary-color) - color: $success-color - span - @extend .fa - @extend .fa-lg - @extend .fa-save -.new-product_category-button - +button diff --git a/app/assets/stylesheets/supplier/foundation1/components/_menu-time-preview.sass b/app/assets/stylesheets/supplier/foundation1/components/_menu-time-preview.sass deleted file mode 100644 index a38c3c5b..00000000 --- a/app/assets/stylesheets/supplier/foundation1/components/_menu-time-preview.sass +++ /dev/null @@ -1,36 +0,0 @@ -= time-preview-panel($bg: rgba(200,200,200,0.8)) - background-color: $bg - padding: 7px - border: 1px solid #777 - border-left-size: 0 - border-bottom-right-radius: 8px - border-top-right-radius: 8px -.menu-time-preview-container - position: fixed - top: 30% - left: 0 - z-index: 103 - .button - margin: 0 - .open-time-preview-handle - +time-preview-panel() - span - @extend .fa, .fa-2x, .fa-calendar - .close-time-preview-handle - float: right - color: $warning-color - span - @extend .fa, .fa-lg, .fa-times - .menu-time-preview-selection-container - min-width: 200px - +time-preview-panel() - .activate-time-preview-button - +button() - margin: 0 - .deactivate-time-preview-button - +button() - margin: 0 - - .menu-time-preview-active-panel - +time-preview-panel($bg: rgba(199, 255, 176, 0.8)) - diff --git a/app/assets/stylesheets/supplier/foundation1/components/_modal.sass b/app/assets/stylesheets/supplier/foundation1/components/_modal.sass deleted file mode 100644 index 7308d311..00000000 --- a/app/assets/stylesheets/supplier/foundation1/components/_modal.sass +++ /dev/null @@ -1,41 +0,0 @@ -.modal - margin: 10px auto - width: 800px - max-width: 100% - background-color: #fff - padding: 1em - max-height: calc(100% - 20px) - overflow-y: scroll - z-index: 6524 - .modal-close - +button($bg: #ddd) - .modal-confirm - .modal-save - .modal-destroy - +button($bg: $alert-color) - margin-right: 8px - .sortable - list-style: none - .sortable-item-container - cursor: pointer - .handle - @extend .fa, .fa-arrows-v - margin-right: 10px - .table-qr-codes - //+button($bg: $button-qr-code-color, $padding: $button-sml) - +button($bg: $button-qr-code-color) - margin-left: 10px -.modal-alert - color: $alert-color - -.overlay - height: 100% - width: 100% - position: fixed - top: 0 - left: 0 - background-color: rgba(0, 0, 0, 0.5) - z-index: 6522 - -.flush--top - margin-top: 0 diff --git a/app/assets/stylesheets/supplier/foundation1/components/_nav_main.sass b/app/assets/stylesheets/supplier/foundation1/components/_nav_main.sass deleted file mode 100644 index 041cbbc6..00000000 --- a/app/assets/stylesheets/supplier/foundation1/components/_nav_main.sass +++ /dev/null @@ -1,132 +0,0 @@ -header.top-menu - background-color: transparent - background-repeat: no-repeat, no-repeat - background-position: left bottom, right bottom - background-image: image-url('theme1/button-bar-left.png'), image-url('theme1/button-bar-right.png') - color: $primary-color - padding-left: 48px - padding-right: 52px - .menu-content - background-color: white - background-repeat: repeat-x - background-position: center bottom - background-image: image-url('theme1/button-bar-middle.png') - //min-height: 61px - height: 100% - section - height: 52px - line-height: 48px - &.main-buttons - float: left - a - padding-left: 16px - &.active - text-decoration: underline - font-weight: bold - color: $current-color - span.icon - color: $current-color - @media (min-width: 972px) - span.icon - margin-right: 8px - display: inline-block - @media (max-width: 972px) - span - display: inline-block - &.icon - display: none - @media (max-width: 836px) - span - display: none - &.icon - display: inline-block - @media (max-width: 560px) - display: none - .top-menu-root - display: inline-block - line-height: normal - padding: 4px - //margin-left: 14px - border-radius: 4px - &.active - background-color: $current-color - img - display: inline-block - margin: 0 - padding: 0 - .supplier-name - display: inline-block - float: right - margin-right: 10px - line-height: 50px - font-weight: bold - color: #555 - .extra-info - position: absolute - top: 0 - right: 0 - color: white - .supplier-info-row - // float: right - // clear: right - // line-height: 27px - // padding-right: 7px - .table-number - display: inline-block - //text-transform: lowercase - .supplier-orders-placed-count - display: inline-block - // margin-right: 15px - .supplier-orders-in-process-count - display: inline-block -.orders-placed-count-icon - @extend .fa - @extend .fa-clock-o - @extend .fa-lg - margin-left: 3px -.orders-in-process-count-icon - @extend .fa - @extend .fa-check - @extend .fa-lg - margin-left: 3px -.toggle-side-menu - position: absolute - width: 28px - height: 28px - color: white - left: 0 - cursor: pointer - z-index: 100 - font-size: 1.4em - &.open - color: white - span - @extend .fa - @extend .fa-bars - @extend .fa-lg - -// CURRENT EMPOYEE NAV -.current-employee-nav - float: right - margin-right: 10px - cursor: pointer -.dropdown-trigger.gravatar - display: inline-block - overflow: hidden - border-radius: $global-rounded - -// SUPPLIER AVAILABILITY -.supplier-availability - border: 2px solid #555 - border-radius: 4px - padding: 2px 5px - font-weight: bold - font-size: 0.9em - float: right - margin-right: 8px - text-transform: uppercase - margin-top: 10px - &.currently-open - color: #3c3 - &.currently-closed - color: #f55 diff --git a/app/assets/stylesheets/supplier/foundation1/components/_nav_side.sass b/app/assets/stylesheets/supplier/foundation1/components/_nav_side.sass deleted file mode 100644 index bc809bab..00000000 --- a/app/assets/stylesheets/supplier/foundation1/components/_nav_side.sass +++ /dev/null @@ -1,45 +0,0 @@ -.side-menu - background-color: #444 - position: fixed - display: none - left: -222px - top: 0 - width: 222px - height: 100% - opacity: 0.9 - border-right: 2px solid black - z-index: 8050 - color: white - h3 - color: white - margin-bottom: 3px - ul - list-style: none - li - font-size: 1.2em - margin-bottom: 11px - a - color: white - .title - border-bottom: 1px solid #aaa - margin-bottom: 4px - .icon.settings - margin-right: 18px - .about-mozo-icon - margin-right: 18px - @extend .fa, .fa-info-circle - .sign-out-icon - @extend .fa, .fa-caret-square-o-left - margin-right: 18px - .fa - margin-right: 18px - a.active - color: $current-color -.supplier-close-shop - +alert($bg: $alert-color, $radius: true) - padding: 3px - margin-right: 20px -.supplier-open-shop - +alert($bg: $primary-color, $radius: true) - padding: 3px - margin-right: 20px diff --git a/app/assets/stylesheets/supplier/foundation1/components/_page-actions.sass b/app/assets/stylesheets/supplier/foundation1/components/_page-actions.sass deleted file mode 100644 index d5bbdb30..00000000 --- a/app/assets/stylesheets/supplier/foundation1/components/_page-actions.sass +++ /dev/null @@ -1,7 +0,0 @@ -.page-actions - +grid-row - $button-margin: 8px - margin-top: 15px - .edit-button - +button($bg: $warning-color) - margin-left: $button-margin diff --git a/app/assets/stylesheets/supplier/foundation1/components/_select_employee.sass b/app/assets/stylesheets/supplier/foundation1/components/_select_employee.sass deleted file mode 100644 index d761e8fe..00000000 --- a/app/assets/stylesheets/supplier/foundation1/components/_select_employee.sass +++ /dev/null @@ -1,11 +0,0 @@ -ul.select-employees - list-style: none - li - padding-bottom: 7px - border-bottom: 1px solid #ccc - margin-bottom: 7px - +clearfix - .employee-selector - float: right - span - @extend .fa, .fa-2x, .fa-user-plus diff --git a/app/assets/stylesheets/supplier/foundation1/components/_suppliers-switcher.sass b/app/assets/stylesheets/supplier/foundation1/components/_suppliers-switcher.sass deleted file mode 100644 index 09c08ced..00000000 --- a/app/assets/stylesheets/supplier/foundation1/components/_suppliers-switcher.sass +++ /dev/null @@ -1,2 +0,0 @@ -.suppliers-switcher-container - margin-top: 12px diff --git a/app/assets/stylesheets/supplier/foundation1/components/_tables.sass b/app/assets/stylesheets/supplier/foundation1/components/_tables.sass deleted file mode 100644 index 93c4a4b8..00000000 --- a/app/assets/stylesheets/supplier/foundation1/components/_tables.sass +++ /dev/null @@ -1,46 +0,0 @@ -table - &.table - // Bootstrap behaviour - width: 100% - td.actions, th.actions - text-align: right - +table-fit - th.status-icons, td.status-icons - +table-fit - td - &.boolean - text-align: center - &.currency - text-align: right - &.time - text-align: right - &.date - text-align: right - .error - display: inline-block - padding-left: 5px - color: $alert-color - a.table-qr-codes - +button($bg: $secondary-color, $padding: $button-sml) - +button-icon-only - .translation - display: none -.table-edit - +button($bg: $secondary-color) - +button-icon-only - span - @extend .fa - @extend .fa-pencil -span.qr-icon - @extend .fa - @extend .fa-qrcode - + span - padding-left: 7px -.table-destroy - +button($bg: $secondary-color) - +button-icon-only - color: $warning-color - margin-left: 8px - span - @extend .fa - @extend .fa-times diff --git a/app/assets/stylesheets/supplier/foundation1/resources/_dashboard.sass b/app/assets/stylesheets/supplier/foundation1/resources/_dashboard.sass deleted file mode 100644 index 4734e670..00000000 --- a/app/assets/stylesheets/supplier/foundation1/resources/_dashboard.sass +++ /dev/null @@ -1,80 +0,0 @@ -.active-orders-table - .status-icons - .active-order - @extend .fa - @extend .fa-check - @extend .fa-lg -.dashboard-lists-header, .dashboard-orders-header - cursor: pointer - .icon - @extend .fa - @extend .fa-arrow-down - color: #ccc - padding-right: 10px - &.collapsed - @extend .fa-arrow-right -.dashboard-section-selection - float: right - min-width: 124px - select - width: calc(100% - 30px) -= active-list-div($float: left, $padding: 4px) - line-height: 50px - float: $float - display: inline-block - vertical-align: middle - padding-left: $padding - padding-right: $padding -.active-lists-table, .active-orders-table - .row - border-bottom: 1px solid #777 - background-color: white - padding: 5px - .users-buttons - float: left - .status-icons - font-size: 1.5rem - +active-list-div - .needs-payment - margin-left: 7px - .order-display - +active-list-div - .table-number - +active-list-div - .link-to-section - +active-list-div - .show-list-button-container - +active-list-div(right) - .currency - +active-list-div - font-weight: bold - .actions - +active-list-div(right) - button - vertical-align: middle - .time - +active-list-div(right) - -.active-orders-table - width: 100% -.go-to-orders-list - span - @extend .fa - @extend .fa-list-alt - -.table-number-with-info - position: relative - .extra-list-info - // Facebook profiles - display: none - $extra-info-width: 220px - position: absolute - width: $extra-info-width - // 7px is padding + border, 5px is extra spacing - right: -$extra-info-width - 7px*2 - 5px - top: -7px*2 - padding: 4px - border: 3px solid #aaa - border-radius: 3px - background-color: white - text-align: left diff --git a/app/assets/stylesheets/supplier/foundation1/resources/_employees.sass b/app/assets/stylesheets/supplier/foundation1/resources/_employees.sass deleted file mode 100644 index 057fd81c..00000000 --- a/app/assets/stylesheets/supplier/foundation1/resources/_employees.sass +++ /dev/null @@ -1,33 +0,0 @@ -.employee-row - $row-background-color: white - background-color: $row-background-color - border-bottom: 1px solid #aaa - padding: 8px 0 - .colorbox - display: inline-block - margin-right: 8px - .employee-is-manager - margin-right: 8px - .icon - @extend .fa - @extend .fa-asterisk - &.is-not-manager - .icon - color: $row-background-color !important - .employee-name - display: inline-block - padding-right: 12px - min-width: 144px - - &.inactive - a - color: #999 - .colorbox - .colorbox-container - span - opacity: 0.2 - .employee-is-manager - .icon - opacity: 0.3 - &:last-of-type - margin-bottom: 20px diff --git a/app/assets/stylesheets/supplier/foundation1/resources/_lists.sass b/app/assets/stylesheets/supplier/foundation1/resources/_lists.sass deleted file mode 100644 index ee937658..00000000 --- a/app/assets/stylesheets/supplier/foundation1/resources/_lists.sass +++ /dev/null @@ -1,43 +0,0 @@ -$list-row-background-color: white -.lists-route - .picker__button--clear - display: none -.list-row - background-color: $list-row-background-color - border-bottom: 1px solid #aaa - padding: 8px 0 - &.active - background-color: #ffa - &:last-of-type - margin-bottom: 20px - .boolean - display: inline-block - min-width: 26px - .timestamp - display: inline-block - min-width: 140px - .state - display: inline-block - min-width: 110px - .table-number - display: inline-block - min-width: 110px -.list-row-total - background-color: $list-row-background-color - margin-top: 8px - font-weight: bold - padding: 8px 0 - .total-sentence - padding-right: 8px - -span.boolean - .boolean-true - @extend .fa, .fa-check - &.needs-help - .boolean-true - @extend .fa - @extend .fa-bell - &.needs-payment - .boolean-true - @extend .fa - @extend .fa-money diff --git a/app/assets/stylesheets/supplier/foundation1/resources/_section_areas.sass b/app/assets/stylesheets/supplier/foundation1/resources/_section_areas.sass deleted file mode 100644 index 17dd8732..00000000 --- a/app/assets/stylesheets/supplier/foundation1/resources/_section_areas.sass +++ /dev/null @@ -1,14 +0,0 @@ -.section-area-container - position: absolute - text-align: center - &.rounded - border-radius: 999px - .title - display: inline-block - &.vertical - .title - transform: rotate(270deg) - &.right-half - .title - transform: rotate(90deg) - diff --git a/app/assets/stylesheets/supplier/foundation1/resources/_section_elements.sass b/app/assets/stylesheets/supplier/foundation1/resources/_section_elements.sass deleted file mode 100644 index 1e408983..00000000 --- a/app/assets/stylesheets/supplier/foundation1/resources/_section_elements.sass +++ /dev/null @@ -1,35 +0,0 @@ -.add-section-element-list - list-style: none - li - list-style: none - float: left - margin-right: 10px - margin-bottom: 10px - width: 80px - max-height: 120px - border: 2px outset #aaa - &:hover - border-color: $active-color -.section-element-handles - width: 80px - height: 22px - position: absolute - top: -22px - .rotate-left - +button($bg: $secondary-color, $padding: $button-tny) - +button-icon-only - margin-right: 4px - span - @extend .fa, .fa-lg, .fa-rotate-left - .rotate-right - +button($bg: $secondary-color, $padding: $button-tny) - +button-icon-only - margin-right: 4px - span - @extend .fa, .fa-lg, .fa-rotate-right - .remove-section-element - +button($bg: $alert-color, $padding: $button-tny) - +button-icon-only - span - @extend .fa, .fa-lg, .fa-times - diff --git a/app/assets/stylesheets/supplier/foundation1/resources/_section_tables.sass b/app/assets/stylesheets/supplier/foundation1/resources/_section_tables.sass deleted file mode 100644 index fd3e5b9a..00000000 --- a/app/assets/stylesheets/supplier/foundation1/resources/_section_tables.sass +++ /dev/null @@ -1,163 +0,0 @@ -.go-to-orders-list - display: inline-block - margin-right: 7px - span - @extend .fa-lg -.section-manage-tables - margin: -40px 6px 4px 6px - min-width: 470px - text-align: right - .section-edit-title-field - display: inline-block - width: 120px - .section-edit-width-field - display: inline-block - width: 52px - .section-edit-height-field - display: inline-block - width: 52px - #section-action-list - text-align: left -.section-tables-container - $section-border: 1px solid black - border-left: $section-border - border-right: $section-border - border-bottom: $section-border - border: $section-border - position: relative - padding: 0 - height: 400px - &.editing - background-color: rgba(240, 138, 36, 0.5) - .section-element-container, .section-area-container - cursor: pointer - //background-image: image-url('textures/wood4.jpg') - //background-color: rgba(0,0,0,0.4) - .section-table - position: absolute - cursor: pointer - background-color: #ccc - //TODO remove width and height for ember control - height: 60px - width: 60px - background-repeat: no-repeat - box-shadow: 2px 2px 4px #888888 - color: black - border-radius: 3px - display: table - .status-icons - // float: right - // width: 16px - position: absolute - margin-top: -18px - right: 0 - min-width: 60px - .needs_help, .needs_payment, .occupied, .active_order - display: none - float: right - @extend .fa - .needs_help - @extend .fa-bell - .needs_payment - @extend .fa-money - .active_order - @extend .fa-coffee - &.occupied - background-color: #ffa - &.needs_help - background-color: #7f7 - .status-icons .needs_help - display: inline-block - &.needs_payment - // background-image: image-url('icons/needs-payment.png') - // background-position: 40px 2px - .status-icons .needs_payment - display: inline-block - &.active_order - .active_order - display: block - .status-icons .active_order - display: inline-block - //background-color: #f77 - &.right-half - .table-actions - right: 100% - left: initial - a - color: black - &:hover - text-decoration: none - //background-image: image-url('icons/section-table.png') - .table-link - margin-top: -45px - .table-number - color: black - //position: absolute - display: table-cell - //top: 0 - //line-height: 44px - width: 100% - height: 100% - font-size: 30px - text-align: center - vertical-align: middle - - .action-button-container - margin-right: -20px - .table-actions - display: none - position: absolute - z-index: 247 - left: 100% - top: 0 - width: 140px - text-align: center - background-color: white - border: 1px solid #aaa - padding-bottom: 10px - .title - background-color: #aaa - .table-action-row - margin-top: 10px - &.total - font-size: 1.2em - font-weight: bold - .order-display - &.active - .post-display - margin-left: 10px - @extend .fa - @extend .fa-check - .table-settings - width: 200px - height: 30px - position: absolute - top: -30px - select - width: 92px - //&.section-tables-active - - //&.section-tables-manage - .section-table - cursor: move - //&.section-tables-inactive - .section-table - position: relative - margin-top: 10px - margin-bottom: 30px - float: left - margin-right: 30px -// INDEX - -table - td - &.table-info - .table-count - &:after - content: " - " -.go-to-tables-view.hide - display: inline-block - -ul#table-actions-list - list-style: none - margin: 0 diff --git a/app/assets/stylesheets/supplier/foundation1/resources/_sections.sass b/app/assets/stylesheets/supplier/foundation1/resources/_sections.sass deleted file mode 100644 index c588cef1..00000000 --- a/app/assets/stylesheets/supplier/foundation1/resources/_sections.sass +++ /dev/null @@ -1,22 +0,0 @@ -$section-row-background-color: white -.section-row - background-color: $section-row-background-color - border-bottom: 1px solid #aaa - padding: 8px 0 - .section-title - display: inline-block - min-width: 140px - .section-dimensions - display: inline-block - min-width: 80px - .table-qr-codes - +button($bg: $secondary-color, $padding: $button-tny) - margin: 0 - .translation - display: none - .qr-icon - @extend .fa-lg - .section-dashboard-orders - +button($padding: $button-tny) - margin: 0 - margin-right: 0.7rem diff --git a/app/assets/stylesheets/supplier/foundation1/resources/_sections_header.sass b/app/assets/stylesheets/supplier/foundation1/resources/_sections_header.sass deleted file mode 100644 index 78c360db..00000000 --- a/app/assets/stylesheets/supplier/foundation1/resources/_sections_header.sass +++ /dev/null @@ -1,16 +0,0 @@ -.sections-header-container - margin: 0 - dd:first-child - margin-left: 0 - .section-header-title - padding-right: 0.5em - color: #555 - .section-jumper - display: none - .active - .section-jumper - display: inline-block - +button($bg: #ddd) - margin: 0 - margin-left: 4px - padding: 0 5px diff --git a/faye/rebuild-docker.sh b/faye/rebuild-docker.sh index 995a344d..e710d808 100755 --- a/faye/rebuild-docker.sh +++ b/faye/rebuild-docker.sh @@ -28,10 +28,10 @@ docker rmi mozo_faye docker build -f faye/Dockerfile -t mozo_faye . # debug docker and enter the bash: -# docker run --network=host --env DRB_ENV=production -t -i --rm mozo_faye bash +# docker run -t -i --rm mozo_faye bash # 5. Spin up the counter container from the generated image -docker run --network=host --env DRB_ENV=production --restart unless-stopped --detach --name=mozo_faye mozo_faye +docker run --network=host --restart unless-stopped --detach --name=mozo_faye mozo_faye # To just start the container created through al these steps without rebuilding them: # docker container start $(docker ps -a -q --filter ancestor=mozo_faye)