diff --git a/app/assets/javascripts/supplier/app/templates/active_list.emblem b/app/assets/javascripts/supplier/app/templates/active_list.emblem index a1aac808..b01de474 100644 --- a/app/assets/javascripts/supplier/app/templates/active_list.emblem +++ b/app/assets/javascripts/supplier/app/templates/active_list.emblem @@ -12,7 +12,7 @@ td.section_title: link-to 'section' view.content.table.section.id: span=view.con td.currency.total_list_amount=currency view.content.total td.actions / if view.content.needs_help - button.mark_list_as_helped{ action "markListAsHelped" view.content.id} + button.mark-list-as-helped-button{ action "markListAsHelped" view.content.id} span.fa-stack.fa-2x.fa-stack-sized i.fa.fa-bell.fa-stack-small i.fa.fa-ban.revoke diff --git a/app/assets/javascripts/supplier/app/views/mark-order-active.js.coffee b/app/assets/javascripts/supplier/app/views/mark-order-active.js.coffee index 46b871a2..2f653116 100644 --- a/app/assets/javascripts/supplier/app/views/mark-order-active.js.coffee +++ b/app/assets/javascripts/supplier/app/views/mark-order-active.js.coffee @@ -1,6 +1,6 @@ App.MarkOrderActiveView = Ember.View.extend tagName: 'button' templateName: 'buttons/mark-order-active' - classNames: ['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/views/mark-order-cancelled.js.coffee b/app/assets/javascripts/supplier/app/views/mark-order-cancelled.js.coffee index 804a20cb..117523fa 100644 --- a/app/assets/javascripts/supplier/app/views/mark-order-cancelled.js.coffee +++ b/app/assets/javascripts/supplier/app/views/mark-order-cancelled.js.coffee @@ -1,7 +1,7 @@ App.MarkOrderCancelledView = Ember.View.extend tagName: 'button' templateName: 'buttons/mark-order-cancelled' - classNames: ['remove-order'] + classNames: ['mark-order-cancelled-button'] classNameBindings: ['showButton:active:hide'] showButton: Ember.computed 'order.state', -> state = @get('order.state') diff --git a/app/assets/javascripts/supplier/app/views/mark-order-delivered.js.coffee b/app/assets/javascripts/supplier/app/views/mark-order-delivered.js.coffee index 7ff87d22..12288dd0 100644 --- a/app/assets/javascripts/supplier/app/views/mark-order-delivered.js.coffee +++ b/app/assets/javascripts/supplier/app/views/mark-order-delivered.js.coffee @@ -1,7 +1,7 @@ App.MarkOrderDeliveredView = Ember.View.extend tagName: 'button' templateName: 'buttons/mark-order-delivered' - classNames: ['mark_order_delivered'] + classNames: ['mark-order-delivered-button'] classNameBindings: ['showButton:active:hide'] showButton: Ember.computed 'order.state', -> state = @get('order.state') diff --git a/app/assets/stylesheets/supplier/foundation1/_foundation_and_overrides.css.sass b/app/assets/stylesheets/supplier/foundation1/_foundation_and_overrides.css.sass index a42f48cb..83ebab54 100644 --- a/app/assets/stylesheets/supplier/foundation1/_foundation_and_overrides.css.sass +++ b/app/assets/stylesheets/supplier/foundation1/_foundation_and_overrides.css.sass @@ -1,10 +1,3 @@ -@mixin button-icon-only - padding: 2px 5px - margin: 0 - -@mixin table-fit - width: 1px - white-space: nowrap // Foundation by ZURB // foundation.zurb.com // Licensed under MIT Open Source diff --git a/app/assets/stylesheets/supplier/foundation1/_mixins.css.sass b/app/assets/stylesheets/supplier/foundation1/_mixins.css.sass new file mode 100644 index 00000000..28b98aab --- /dev/null +++ b/app/assets/stylesheets/supplier/foundation1/_mixins.css.sass @@ -0,0 +1,7 @@ +@mixin button-icon-only + padding: 2px 5px + margin: 0 + +@mixin table-fit + width: 1px + white-space: nowrap diff --git a/app/assets/stylesheets/supplier/foundation1/application.css.sass b/app/assets/stylesheets/supplier/foundation1/application.css.sass index 40c31a11..9f37ca61 100644 --- a/app/assets/stylesheets/supplier/foundation1/application.css.sass +++ b/app/assets/stylesheets/supplier/foundation1/application.css.sass @@ -5,6 +5,7 @@ @import bourbon @import ./qconstants @import ./foundation_and_overrides +@import ./mixins @import ./qstructure @import ./qicons @import ./qdisplays diff --git a/app/assets/stylesheets/supplier/foundation1/components/_dashboard.css.sass b/app/assets/stylesheets/supplier/foundation1/components/_dashboard.css.sass index 96661c15..bfdffe92 100644 --- a/app/assets/stylesheets/supplier/foundation1/components/_dashboard.css.sass +++ b/app/assets/stylesheets/supplier/foundation1/components/_dashboard.css.sass @@ -22,14 +22,6 @@ $button-spacing: 8px @extend .fa @extend .fa-2x @extend .fa-list -.mark_list_as_helped - +button-icon-only - vertical-align: top - 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 .remove_list_needs_payment +button-icon-only vertical-align: top @@ -40,19 +32,6 @@ $button-spacing: 8px +button-icon-only .active-orders-table width: 100% - .mark_order_active - +button-icon-only - margin-right: 0.6em - .mark_order_delivered - +button-icon-only - .remove-order - +button-icon-only - background-color: $alert-color - margin-left: $button-spacing - span - @extend .fa - @extend .fa-2x - @extend .fa-times .go-to-orders-list span @extend .fa diff --git a/app/assets/stylesheets/supplier/foundation1/components/_order-buttons.css.sass b/app/assets/stylesheets/supplier/foundation1/components/_order-buttons.css.sass new file mode 100644 index 00000000..78b7e9f6 --- /dev/null +++ b/app/assets/stylesheets/supplier/foundation1/components/_order-buttons.css.sass @@ -0,0 +1,21 @@ +.mark-list-as-helped-button + +button-icon-only + vertical-align: top + 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 +.mark-order-cancelled-button + +button($bg: $alert-color) + +button-icon-only + margin-left: $button-spacing + span + @extend .fa + @extend .fa-2x + @extend .fa-times diff --git a/app/templates/supplier/_active_list.mustache b/app/templates/supplier/_active_list.mustache deleted file mode 100644 index 974d3570..00000000 --- a/app/templates/supplier/_active_list.mustache +++ /dev/null @@ -1,14 +0,0 @@ - - - ? - - - {{table_number}} - {{section_title}} - {{currency total_amount}} - - - -   - - diff --git a/app/templates/supplier/_active_order.mustache b/app/templates/supplier/_active_order.mustache deleted file mode 100644 index 56c07d08..00000000 --- a/app/templates/supplier/_active_order.mustache +++ /dev/null @@ -1,10 +0,0 @@ - - {{display}} - {{table_number}} - {{section_title}} - {{currency total_amount}} - - - - - diff --git a/app/templates/supplier/_alert.mustache b/app/templates/supplier/_alert.mustache deleted file mode 100644 index b078499a..00000000 --- a/app/templates/supplier/_alert.mustache +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/app/templates/supplier/_list_order.mustache b/app/templates/supplier/_list_order.mustache deleted file mode 100644 index d6c76b03..00000000 --- a/app/templates/supplier/_list_order.mustache +++ /dev/null @@ -1,4 +0,0 @@ - - {{display}} - {{#currency}}{{total_amount}}{{/currency}} - diff --git a/app/templates/user/_active_list_order.mustache b/app/templates/user/_active_list_order.mustache deleted file mode 100644 index d6c76b03..00000000 --- a/app/templates/user/_active_list_order.mustache +++ /dev/null @@ -1,4 +0,0 @@ - - {{display}} - {{#currency}}{{total_amount}}{{/currency}} - diff --git a/app/templates/user/_active_order.mustache b/app/templates/user/_active_order.mustache deleted file mode 100644 index b637fcd4..00000000 --- a/app/templates/user/_active_order.mustache +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - {{#products}} - - - - - - {{/products}} - - - - - - - - - - - - -
#
{{name}}{{number}} - {{#currency}}{{product_total}}{{/currency}} - -
- Totaal - {{#currency}}{{total}}{{/currency}}
- - - -
diff --git a/app/templates/user/_alert.mustache b/app/templates/user/_alert.mustache deleted file mode 100644 index b078499a..00000000 --- a/app/templates/user/_alert.mustache +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/app/templates/user/_join_request.mustache b/app/templates/user/_join_request.mustache deleted file mode 100644 index 29bbf187..00000000 --- a/app/templates/user/_join_request.mustache +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/app/templates/user/_list_history.mustache b/app/templates/user/_list_history.mustache deleted file mode 100644 index d1e2654c..00000000 --- a/app/templates/user/_list_history.mustache +++ /dev/null @@ -1,3 +0,0 @@ -
  • - {{display}} -
  • diff --git a/app/templates/user/_products_category.mustache b/app/templates/user/_products_category.mustache deleted file mode 100644 index 87543de1..00000000 --- a/app/templates/user/_products_category.mustache +++ /dev/null @@ -1,7 +0,0 @@ -

    {{category}}

    -{{#products}} - - {{name}} - {{#currency}}{{price}}{{/currency}} - -{{/products}} diff --git a/app/templates/user/_products_category_for_order.mustache b/app/templates/user/_products_category_for_order.mustache deleted file mode 100644 index 4729c5e2..00000000 --- a/app/templates/user/_products_category_for_order.mustache +++ /dev/null @@ -1,15 +0,0 @@ -

    {{category}}

    -{{#products}} - - {{name}} - - - - 1 - + - - - {{#currency}}{{price}}{{/currency}} - - - -{{/products}} diff --git a/app/views/suppliers/sections/table_actions.html.slim b/app/views/suppliers/sections/table_actions.html.slim index 8bd2f440..63ecd82b 100644 --- a/app/views/suppliers/sections/table_actions.html.slim +++ b/app/views/suppliers/sections/table_actions.html.slim @@ -3,7 +3,7 @@ ul#table-actions-list - if @list - if @list.needs_help? li - button.btn.btn-info.btn-small class="of-list-#{@list.id}" id="list-is-helped-button-#{@list.id}" onclick="Qsupplier.mark_list_as_helped('#{@list.id}')" data-t="list.is_helped_button" + button.btn.btn-info.btn-small class="of-list-#{@list.id}" id="list-is-helped-button-#{@list.id}" onclick="Qsupplier.mark-list-as-helped-button('#{@list.id}')" data-t="list.is_helped_button" button.btn.btn-warning.btn-small class="of-list-#{@list.id}" onclick="Qsupplier.close_list('#{@list.id}')" data-t="list.close_list" li a data-t='section.tables_view.table_actions.got_to_table' href=suppliers_table_path(@table) diff --git a/spec/acceptance/suppliers/dashboard.feature b/spec/acceptance/suppliers/dashboard.feature index 1d5fba54..90d61a13 100644 --- a/spec/acceptance/suppliers/dashboard.feature +++ b/spec/acceptance/suppliers/dashboard.feature @@ -11,13 +11,13 @@ Feature: Supplier main board And the supplier dashboard should display the active order #When I click on translation 'supplier.order.being_processed' - When I click on selector '.active-orders-table .mark_order_active' + When I click on selector '.active-orders-table .mark-order-active-button' # waiting here only needed in old style implementation And I wait 1 second Then the supplier order row should be marked as active #When I click on translation 'supplier.order.being_served' - When I click on selector '.active-orders-table .mark_order_delivered' + When I click on selector '.active-orders-table .mark-order-delivered-button' And I wait 1 second Then the order in the supplier dashboard should not be displayed anymore And the order should be marked as delivered diff --git a/spec/acceptance_steps/suppliers/dashboard_steps.rb b/spec/acceptance_steps/suppliers/dashboard_steps.rb index c03fae20..4935370a 100644 --- a/spec/acceptance_steps/suppliers/dashboard_steps.rb +++ b/spec/acceptance_steps/suppliers/dashboard_steps.rb @@ -83,7 +83,7 @@ step "I click on the close list button in the supplier dashboard" do end step "I click on the mark list as helped button in the supplier dashboard" do - find(".list-row-#{@list.id} .mark_list_as_helped").click + find(".list-row-#{@list.id} .mark-list-as-helped-button").click end step "I should see the list and the new list" do @@ -144,7 +144,7 @@ end # Marking order as wrong step "the supplier marks the order as wrong in the main board view" do - find(".order-row-#{@order.id} .remove-order").click + find(".order-row-#{@order.id} .mark-order-cancelled-button").click end step "the supplier main board order should not be visible anymore" do diff --git a/spec/acceptance_steps/suppliers/section_view_steps.rb b/spec/acceptance_steps/suppliers/section_view_steps.rb index 927e62c5..5fe77320 100644 --- a/spec/acceptance_steps/suppliers/section_view_steps.rb +++ b/spec/acceptance_steps/suppliers/section_view_steps.rb @@ -49,12 +49,12 @@ end step "I click on the mark list as helped in the section table popup as supplier" do # btn = page.find(".list-is-helped-button-#{@list.id}") - page.find(".section-table-#{@table.id} .mark_list_as_helped").click + page.find(".section-table-#{@table.id} .mark-list-as-helped-button").click # btn.click end step "the section table popup should no longer have the mark list as helped button" do - page.should_not have_selector(".section-table-#{@table.id} .mark_list_as_helped") + page.should_not have_selector(".section-table-#{@table.id} .mark-list-as-helped-button") end step "I click on the close list button in the section table table popup" do