Merge branch 'master' of uflows.com:/var/git/qwaiter

This commit is contained in:
2015-01-13 20:44:09 +01:00
58 changed files with 632 additions and 520 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ group :assets do
#gem 'twitter-bootstrap-rails'
# Only for mobile assets precompile, not used in this project
gem 'bootstrap-sass', '~>2.3'
gem 'bourbon'
gem 'bourbon', '4.0.2'
#gem 'compass-rails'
gem 'js-routes'
gem "font-awesome-rails"
+13 -13
View File
@@ -1,6 +1,6 @@
GIT
remote: git://github.com/bterkuile/cmtool.git
revision: a4bef656ccf3ad434f13e458e2c96abe8636cfa0
revision: 323e68bcad3b21cd580d3aff5771d99a805fc985
specs:
cmtool (1.0.0)
bourbon
@@ -249,7 +249,7 @@ GEM
js-routes (0.9.9)
railties (>= 3.2)
sprockets-rails
json (1.8.1)
json (1.8.2)
jwt (1.2.0)
kaminari (0.16.1)
actionpack (>= 3.0.0)
@@ -265,8 +265,8 @@ GEM
method_source (0.8.2)
mime-types (1.25.1)
mini_magick (4.0.1)
mini_portile (0.6.1)
minitest (5.5.0)
mini_portile (0.6.2)
minitest (5.5.1)
multi_json (1.10.1)
multi_xml (0.5.5)
multipart-post (2.0.0)
@@ -310,7 +310,7 @@ GEM
railties (>= 3.1, < 5.0)
rack (1.6.0)
rack-cors (0.3.0)
rack-test (0.6.2)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.0.rc2)
actionmailer (= 4.2.0.rc2)
@@ -381,14 +381,14 @@ GEM
multi_json (~> 1.0)
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
slim (3.0.0)
slim (3.0.1)
temple (~> 0.7.3)
tilt (>= 1.3.3, < 2.1)
slim-rails (3.0.0)
actionmailer (>= 3.0, < 4.2)
actionpack (>= 3.0, < 4.2)
activesupport (>= 3.0, < 4.2)
railties (>= 3.0, < 4.2)
slim-rails (3.0.1)
actionmailer (>= 3.1, < 5.0)
actionpack (>= 3.1, < 5.0)
activesupport (>= 3.1, < 5.0)
railties (>= 3.1, < 5.0)
slim (~> 3.0)
slop (3.6.0)
spring (1.2.0)
@@ -407,7 +407,7 @@ GEM
colorize (>= 0.7.0)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
temple (0.7.3)
temple (0.7.5)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
@@ -444,7 +444,7 @@ DEPENDENCIES
active_decorator
active_model_serializers (= 0.9.0)
bootstrap-sass (~> 2.3)
bourbon
bourbon (= 4.0.2)
capistrano (~> 3.0)
capistrano-local-precompile
capistrano-rails (~> 1.1)
@@ -1,4 +1,4 @@
Ember.Handlebars.helper 't', (path, params..., options)->
text = t(path)
tag = if options.hash.bare then text else "<span data-t='#{path}' data-t-attributes='{}'>#{text}</span>"
text = t(path, options.hash)
tag = if options.hash.bare then text else "<span data-t='#{path}' data-t-attributes='#{JSON.stringify(options.hash)}'>#{text}</span>"
tag.htmlSafe()
@@ -3,3 +3,5 @@
#= require_directory .
#= require_self
$(document).on 'click', '.flash-box', -> $(@).slideUp()
$ ->
$('.menu-secondary-toggle').click -> $('.nav.secondary').toggleClass('active')
@@ -1,7 +1,12 @@
@App = Ember.Application.create
LOG_TRANSITIONS: true
rootElement: '#ember-app-container'
App.deferReadiness()
@App.modals = Ember.Namespace.create()
@Modals = @App.modals
Ember.$.ajaxPrefilter (options) ->
if options.type.toUpperCase() == 'GET'
if auth_token = Qstorage.getItem('auth_token')
@@ -9,6 +9,11 @@ App.ApplicationController = Ember.Controller.extend
$('#confirm-modal').hide()
clearNotice: ->
@set 'notice', null
showSupplierStatusInfo: ->
@modal 'supplier_status_info',
model: @get('list.supplier')
title_path: 'supplier_status_info.title'
openDebugger: ->
debugger
@@ -1,8 +0,0 @@
App.ModalConfirmController = Ember.ObjectController.extend
actions:
close: ->
@get('model.cancel').call(@) if @get('model.cancel')
@send 'closeModal'
confirm: ->
@get('model.ok').call(@)
@send 'closeModal'
@@ -1,4 +0,0 @@
App.ModalController = Ember.ObjectController.extend
actions:
close: ->
@send 'closeModal'
@@ -1,5 +0,0 @@
App.ModalInfoController = Ember.ObjectController.extend
actions:
close: ->
@get('model.cancel').call(@) if @get('model.cancel')
@send 'closeModal'
@@ -1,5 +0,0 @@
App.ModalProductInfoController = Ember.ObjectController.extend
actions:
close: ->
@get('model.cancel').call(@) if @get('model.cancel')
@send 'closeModal'
@@ -0,0 +1,46 @@
@App.modals.BaseController = Ember.ObjectController.extend
alert_message: ""
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.serialize() if model.serialize
return new Ember.Handlebars.SafeString(tspan(@title_path, translation_params)) if @title_path
# return translated title_path if directly set by options
return new Ember.Handlebars.SafeString(tspan(@get('modal_options.title_path'), translation_params)) if @get('modal_options.title_path')
# infer title path based on controller name App.modals.AddSectionController => add_section
underscored = `this.constructor.toString().substr(11).replace(/Controller$/, '').underscore()`
# find translated title or humanize the controller name
if convention_translation = ttry("modal.#{underscored}.title", translation_params)
new Ember.Handlebars.SafeString(tspan(@get("modal.#{underscored}.title"), translation_params))
else
underscored.capitalize().replace(/_/, ' ')
).property('model.id')
actions:
close: ->
if close = @get('modal_options.close')
close.apply(@)
@send 'closeModal' unless @preventClose
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(@)
@send 'closeModal' unless @preventClose
confirm: -> @send('ok')
save: ->
@get('model').save()
@send 'closeModal' unless @preventClose
destroy: ->
@modal 'confirm',
title_path: @get('modal_options.destroy_text_path') || 'general.destroy.text'
model: @get('model')
ok: ->
@get('model').destroyRecord()
@send 'closeModal' unless @preventClose
@@ -28,4 +28,4 @@ App.TableController = Ember.ObjectController.extend
toggleProductCategory: (product_category)->
product_category.set 'collapsed', not product_category.get('collapsed')
showProductDescription: (product)->
@send 'openModal', 'modal_product_info', product
@modal 'product_info', model: product, title: product.get('name')
@@ -12,6 +12,9 @@ ControllerExtensions = Ember.Mixin.create
unless Qstorage.getItem('auth_token')
return @transitionToRoute 'sign_in'
callback.call(@) if callback
modal: (name, options={})->
options.model ||= Ember.Object.create()
@send "openModal", name, options
Ember.ArrayController.reopen ControllerExtensions
Ember.Controller.reopen ControllerExtensions
Ember.ObjectController.reopen ControllerExtensions
@@ -35,19 +35,42 @@ App.ApplicationRoute = Ember.Route.extend
@handleAuthInfo(user_id, auth_token)
auth_win.close()
true
openModal: (modalName, model)->
@controllerFor(modalName).set('model', model)
@render modalName,
#openModal: (modalName, model)->
# @controllerFor(modalName).set('model', model)
# @render modalName,
# into: 'application'
# outlet: 'modal'
#closeModal: ->
# @disconnectOutlet
# outlet: 'modal'
# parentView: 'application'
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
controller.set 'modal_options', $.extend(defaultModalOptions, options)
@render "modals/#{modalName}",
into: 'application'
outlet: 'modal'
view: 'modal'
controller: controller
closeModal: ->
@disconnectOutlet
outlet: 'modal'
parentView: 'application'
confirm: (options = {})->
@send 'openModal', 'modal_confirm', Ember.Object.create
@send 'openModal', 'confirm',
model: Ember.Object.create(body: options.body)
title: options.title
body: options.body
cancel: options.cancel
ok: options.ok
sendFeedback: (feedback, callback)->
@@ -15,7 +15,7 @@
= view "menu-item-scan-qr"
= view "menu-item-product-orders"
if list
.extra-info
.extra-info{action "showSupplierStatusInfo"}
.supplier-info-row
/ .supplier-name= list.supplier.name
.table-number
@@ -1,4 +0,0 @@
modal-dialog action="close"
h3.flush--top Alert
p= body
button{action "close"} Done
@@ -1,6 +0,0 @@
modal-dialog action="close"
h3.flush--top= title
p=body
hr
button.confirm-cancel{action "close"}= t 'confirm.cancel'
button.confirm-ok.right{action "confirm"}= t 'confirm.confirm'
@@ -1,5 +0,0 @@
modal-dialog action="close"
h3.flush--top= title
p==body
hr
button{action "close"}= t 'modal.info.close'
@@ -1,7 +0,0 @@
modal-dialog action="close"
h3.flush--top= name
if image
.right: img src=image.small alt=""
p==description
hr
button{action "close"}= t 'modal.info.close'
@@ -0,0 +1,4 @@
p=body
hr
button.modal-close{action "close"}= t 'confirm.cancel'
button.modal-confirm.right{action "confirm"}= t 'confirm.confirm'
@@ -0,0 +1,8 @@
.overlay{action "closeOnOverlay"}
.modal{action "modalClick" bubbles=false preventDefault=false}
.modal-header
h3.flush--top= title
hr
.modal-body.clearfix
.modal-alert== alert_message
= yield
@@ -0,0 +1,5 @@
if image
.right: img src=image.small alt=""
p==description
hr
button{action "close"}= t 'modal.info.close'
@@ -0,0 +1,13 @@
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'
@@ -4,16 +4,18 @@ App.ApplicationView = Ember.View.extend
side_menu = @$('.side-menu')
side_menu.addClass('closed').click -> side_menu.toggleClass('active').addClass('clicked').toggleClass('closed')
controller = @get('controller')
#@$('.main-section').swipe
main_section = @$('.main-section')
#main_section.swipe
#swipe: (event, direction, distance, duration, fingerCount) ->
#if fingerCount is 2
#if direction is "right"
#side_menu.addClass('active clicked').removeClass('closed')
#if direction is "left"
#else if direction is "left"
#side_menu.removeClass('active').addClass('closed')
#if fingerCount is 3 and direction is "up"
#controller.transitionToRoute "settings"
##else if fingerCount is 2 and direction is "down"
##controller.transitionToRoute "settings"
#fingers: 'all'
document.addEventListener "backbutton", =>
# close side menu if open
if side_menu.hasClass('active')
@@ -1,10 +1,13 @@
#App.ModalView = Ember.View.extend
#templateName: "modal"
#title: ""
#classNames: ["reveal-modal"],
#didInsertElement: ->
##this.$().foundation('reveal', 'open')
#actions:
#close: ->
#console.log('close action fired')
#this.destroy()
App.ModalView = Ember.View.extend
layoutName: 'modals/layout'
didInsertElement: ->
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)
@@ -6,6 +6,7 @@
#= require_self
@Qstorage = localStorage
$.extend($translations.en, <%= I18n.t('user', locale: :en).to_json %>);
$.extend($translations.nl, <%= I18n.t('user', locale: :nl).to_json %>);
-14
View File
@@ -1,14 +0,0 @@
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require_directory .
*= require 'theme1/application'
*/
@@ -0,0 +1,20 @@
=content-top-background
.left
position: absolute
bottom: 0
left: 0
background-image: image-url('theme1/floor-left.jpg')
background-position: right
height: $cth-height
width: 50%
.right
position: absolute
bottom: 0
right: 0
background-image: image-url('theme1/floor-right.jpg')
background-position: left
height: $cth-height
width: 50%
.content-container
position: relative
max-width: $content-max-width
@@ -1,3 +0,0 @@
.container
margin-left: auto
margin-right: auto
@@ -0,0 +1,107 @@
=linear-gradient($pos, $G1, $G2: null, $G3: null, $G4: null, $G5: null, $G6: null, $G7: null, $G8: null, $G9: null, $G10: null, $fallback: null)
// Detect what type of value exists in $pos
$pos-type: type-of(nth($pos, 1))
$pos-spec: null
$pos-degree: null
// If $pos is missing from mixin, reassign vars and add default position
@if $pos-type == color or nth($pos, 1) == "transparent"
$G10: $G9
$G9: $G8
$G8: $G7
$G7: $G6
$G6: $G5
$G5: $G4
$G4: $G3
$G3: $G2
$G2: $G1
$G1: $pos
$pos: null
@if $pos
$positions: _linear-positions-parser($pos)
$pos-degree: nth($positions, 1)
$pos-spec: nth($positions, 2)
$full: $G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10
// Set $G1 as the default fallback color
$fallback-color: nth($G1, 1)
// If $fallback is a color use that color as the fallback color
@if type-of($fallback) == color or $fallback == "transparent"
$fallback-color: $fallback
background-color: $fallback-color
background-image: -webkit-linear-gradient($pos-degree $full)
// Safari 5.1+, Chrome
background-image: unquote("linear-gradient(#{$pos-spec}#{$full})")
body
background-color: #333
margin: 0
padding: 0
background-image: image-url('theme1/footer-bg.jpg')
background-position: center top
.header-nav-banner
background-image: image-url('theme1/header.jpg')
background-position: center 25px
#content-header
position: relative
height: $cth-height
+content-top-background
.container
height: $cth-height
margin: 0 auto
background-image: image-url("theme1/no-banner-bg-left.png"), image-url('theme1/no-banner-bg-right.png')
background-repeat: no-repeat, no-repeat
background-position: left bottom, right bottom
.top-ribbon
background-image: image-url("theme1/no-banner-bg-middle.png")
height: $cth-height
background-repeat: repeat-x
background-position: bottom
margin: 0 68px 0 42px
#main-wrap
font-size: 14px
font-family: $font-family-content
line-height: 1.5
color: #848585
position: relative
h1
font-size: 28px
padding: 0.5em 0 0.2em 0
line-height: 1.4
font-family: $font-family-headers
color: #AE571F
h2
font-size: 24px
padding: 0.5em 0 0.2em 0
line-height: 1.2
font-family: $font-family-headers
color: #AE571F
background-image: image-url('theme1/wall-bg.jpg')
background-position: center top
overflow: visible
position: relative
.container
margin: 0 auto
max-width: $content-max-width
.main-inner
+linear-gradient(#d6d6d6 0, white 70px)
position: relative
padding: 10px 40px 30px 40px
margin-left: 2px
margin-right: 2px
min-height: 400px
@media (max-width: 680px)
padding: 8px 15px
h1.page-title
margin: 0
padding: 0
margin-bottom: 12px
a
color: $green
text-decoration: none
&:hover
color: darken($green, 20%)
.right
float: right
.left
float: left
.clearing
clear: both
@@ -1,5 +1,14 @@
//= require_self
//= require_directory .
@import constants
$font-family-navigation: Verdana,serif
$font-family-headers: Verdana,serif //'Pacifico', serif
$content-max-width: 962px
$cth-height: 48px
$green-original: #99CB23
$green: #7BB459 //Heineken
$font-family-content: Georgia, serif
@import font-awesome
@import ./mixins
@import ./foundation_and_overrides
@import ./elements/*
@import ./structure
@import ./pages/*
@import ./theme_structure
@@ -0,0 +1,30 @@
#footer-wrap
color: white
background-image: image-url('theme1/footer-bg.jpg')
background-position: center
overflow: visible
position: relative
.footer-shadow
height: 1px
//+box-shadow(0px 4px 10px #000)
.footer-content-container
max-width: 838px
margin: 0 auto
.footer-content
background-color: #420F03
text-align: right
padding: 72px 30px 20px 10px
overflow: visible
margin: 0 auto
a
margin-left: 20px
.footer-bottom
background-image: image-url('theme1/footer-bottom.png')
position: relative
height: 35px
padding-left: 30px
padding-right: 30px
max-width: 838px
position: relative
overflow: visible
margin: 0 auto
@@ -0,0 +1,76 @@
#header-wrap
#ceiling
position: relative
width: 100%
background-image: image-url('theme1/ceiling-center.jpg')
background-position: top center
background-repeat: no-repeat
overflow: hidden
.left
background-image: image-url('theme1/ceiling-left.jpg')
background-position: right top
background-repeat: repeat-x
height: 25px
position: absolute
left: 0
width: 50%
.right
background-image: image-url('theme1/ceiling-right.jpg')
background-position: left top
background-repeat: repeat-x
height: 25px
position: absolute
right: 0
width: 50%
.lights
position: absolute
height: 140px
width: 990px
left: 50%
margin-left: -495px
div
position: relative
background-repeat: no-repeat
width: 315px
height: 140px
float: left
&.light1
background-image: image-url('theme1/light-1.jpg')
margin-left: 15px
margin-right: 2px
&.light2
background-image: image-url('theme1/light-2.jpg')
margin-right: 3px
&.light3
background-image: image-url('theme1/light-3.jpg')
.container
max-width: 960px
padding-top: 40px
position: relative
margin: 0 auto
#header
margin-bottom: 10px
#logo
max-width: 80%
a
margin: 20px
#header-right
padding-right: 30px
.social
float: right
width: 222px
text-align: right
a
background-image: image-url('theme1/social.png')
margin: 0 0 0 3px
width: 32px
height: 56px
display: inline-block
&.wsite-social-facebook
background-position: 0 0
&.wsite-social-twitter
background-position: -35px 0
&.wsite-social-linkedin
background-position: -70px 0
&.wsite-social-rss
background-position: -141px 0
@@ -0,0 +1,68 @@
#nav-wrap
max-width: 960px
position: relative
margin: 0 auto
.navbar-inner
height: 48px
background-color: transparent
background-image: image-url('theme1/nav-bar-left.png'), image-url('theme1/nav-bar-right.png'), image-url('theme1/nav-bar-middle.png')
background-repeat: no-repeat, no-repeat, repeat-x
background-position: left center, right center, center center
border: 0
-ms-filter: ''
.nav-collapse
&.in.collapse
background-color: rgba(0,0,0,0.4)
z-index: 400
ul.nav
margin: 0
padding: 0
list-style: none
li
position: relative
list-style: none
float: left
a
border: 0
color: white
display: block
font-family: $font-family-navigation
text-decoration: none
font-size: 18px
height: 46px
line-height: 46px
margin: 0 10px
padding: 0 20px
text-shadow: 0 2px 2px rgba(0, 0, 0, 0.5)
&:hover
color: $green
@media (max-width: 480px)
font-size: 12px
margin: 0 5px
padding: 0 10px
&.active
a
color: $green
background-color: inherit
&.secondary
@media (max-width: 924px)
position: absolute
background-color: #555
z-index: 5487
top: 48px
width: 100%
opacity: 0.8
display: none
li
float: none
&.active
display: block
.menu-secondary-toggle
float: right
display: none
margin-top: 8px
margin-right: 1em
span
@extend .fa, .fa-lg, .fa-bars
@media (max-width: 924px)
display: inline-block
@@ -1,10 +0,0 @@
.home-tablet-phone
right: 0
top: -200px
position: absolute
z-index: 120
.introduction
padding-top: 20px
.home-qr
float: left
margin: 0 20px 20px 0
@@ -0,0 +1,58 @@
.home-tablet-phone
right: 0
top: -200px
position: absolute
z-index: 120
.introduction
padding-top: 20px
.home-qr
float: left
margin: 0 20px 20px 0
#home-splash
height: 318px - 10px
position: relative
#home-splash-content
z-index: 12
height: 318px - 61px - 10px
max-width: $content-max-width
margin: 0 auto
#home-splash-content-inner
background-color: white
height: 260px
margin-left: 49px
margin-right: 53px
position: relative
overflow: hidden
#home-splash-content-inner-bar
position: absolute
height: 260px
left: 10px
right: 10px
top: 10px
z-index: 20
background-image: image-url("theme1/home_qwaiter_den_haag.png")
background-repeat: no-repeat
background-position: center top
#home-splash-footer
+content-top-background
#home-splash-footer-inner
background-color: transparent
background-repeat: no-repeat, no-repeat
margin: 0 auto
height: 61px
max-width: $content-max-width
background-position: left bottom, right bottom
background-image: image-url('theme1/button-bar-left.png'), image-url('theme1/button-bar-right.png')
color: $green
border-width: 0
border-radius: 0
height: 61px
#home-splash-footer-inner-bar
margin-left: 49px
margin-right: 53px
background-color: white
background-repeat: repeat-x
background-position: center bottom
background-image: image-url('theme1/button-bar-middle.png')
//min-height: 61px
height: 61px
@@ -1,330 +0,0 @@
$cth-height: 48px
$green-original: #99CB23
$green: #7BB459 //Heineken
$font-family-content: Georgia, serif
$font-family-navigation: Verdana,serif
$font-family-headers: Verdana,serif //'Pacifico', serif
$content-max-width: 962px
=linear-gradient($pos, $G1, $G2: null, $G3: null, $G4: null, $G5: null, $G6: null, $G7: null, $G8: null, $G9: null, $G10: null, $fallback: null)
// Detect what type of value exists in $pos
$pos-type: type-of(nth($pos, 1))
$pos-spec: null
$pos-degree: null
// If $pos is missing from mixin, reassign vars and add default position
@if $pos-type == color or nth($pos, 1) == "transparent"
$G10: $G9
$G9: $G8
$G8: $G7
$G7: $G6
$G6: $G5
$G5: $G4
$G4: $G3
$G3: $G2
$G2: $G1
$G1: $pos
$pos: null
@if $pos
$positions: _linear-positions-parser($pos)
$pos-degree: nth($positions, 1)
$pos-spec: nth($positions, 2)
$full: $G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10
// Set $G1 as the default fallback color
$fallback-color: nth($G1, 1)
// If $fallback is a color use that color as the fallback color
@if type-of($fallback) == color or $fallback == "transparent"
$fallback-color: $fallback
background-color: $fallback-color
background-image: -webkit-linear-gradient($pos-degree $full)
// Safari 5.1+, Chrome
background-image: unquote("linear-gradient(#{$pos-spec}#{$full})")
=content-top-background
.left
position: absolute
bottom: 0
left: 0
background-image: image-url('theme1/floor-left.jpg')
background-position: right
height: $cth-height
width: 50%
.right
position: absolute
bottom: 0
right: 0
background-image: image-url('theme1/floor-right.jpg')
background-position: left
height: $cth-height
width: 50%
.container
position: relative
max-width: $content-max-width
body
background-color: #333
margin: 0
padding: 0
background-image: image-url('theme1/footer-bg.jpg')
background-position: center top
.header-nav-banner
background-image: image-url('theme1/header.jpg')
background-position: center 25px
#header-wrap
#ceiling
position: relative
width: 100%
background-image: image-url('theme1/ceiling-center.jpg')
background-position: top center
background-repeat: no-repeat
overflow: hidden
.left
background-image: image-url('theme1/ceiling-left.jpg')
background-position: right top
background-repeat: repeat-x
height: 25px
position: absolute
left: 0
width: 50%
.right
background-image: image-url('theme1/ceiling-right.jpg')
background-position: left top
background-repeat: repeat-x
height: 25px
position: absolute
right: 0
width: 50%
.lights
position: absolute
height: 140px
width: 990px
left: 50%
margin-left: -495px
div
position: relative
background-repeat: no-repeat
width: 315px
height: 140px
float: left
&.light1
background-image: image-url('theme1/light-1.jpg')
margin-left: 15px
margin-right: 2px
&.light2
background-image: image-url('theme1/light-2.jpg')
margin-right: 3px
&.light3
background-image: image-url('theme1/light-3.jpg')
.container
max-width: 960px
padding-top: 40px
position: relative
margin: 0 auto
#header
margin-bottom: 10px
#logo
max-width: 80%
a
margin: 20px
#header-right
padding-right: 30px
.social
float: right
width: 222px
text-align: right
a
background-image: image-url('theme1/social.png')
margin: 0 0 0 3px
width: 32px
height: 56px
display: inline-block
&.wsite-social-facebook
background-position: 0 0
&.wsite-social-twitter
background-position: -35px 0
&.wsite-social-linkedin
background-position: -70px 0
&.wsite-social-rss
background-position: -141px 0
#nav-wrap
max-width: 960px
position: relative
.navbar-inner
height: 48px
background-color: transparent
background-image: image-url('theme1/nav-bar-left.png'), image-url('theme1/nav-bar-right.png'), image-url('theme1/nav-bar-middle.png')
background-repeat: no-repeat, no-repeat, repeat-x
background-position: left center, right center, center center
border: 0
-ms-filter: ''
.nav-collapse
&.in.collapse
background-color: rgba(0,0,0,0.4)
z-index: 400
ul.nav
margin: 0
padding: 0
list-style: none
li
position: relative
list-style: none
float: left
a
border: 0
color: white
display: block
font-family: $font-family-navigation
text-decoration: none
font-size: 18px
height: 46px
line-height: 46px
margin: 0 10px
padding: 0 20px
text-shadow: 0 2px 2px rgba(0, 0, 0, 0.5)
&:hover
color: $green
@media (max-width: 480px)
font-size: 12px
margin: 0 5px
padding: 0 10px
&.active
a
color: $green
background-color: inherit
#home-splash
height: 318px - 10px
position: relative
#home-splash-content
z-index: 12
height: 318px - 61px - 10px
max-width: $content-max-width
#home-splash-content-inner
background-color: white
height: 260px
margin-left: 49px
margin-right: 53px
position: relative
overflow: hidden
#home-splash-content-inner-bar
position: absolute
height: 260px
left: 10px
right: 10px
top: 10px
z-index: 20
background-image: image-url("theme1/home_qwaiter_den_haag.png")
background-repeat: no-repeat
background-position: center top
#home-splash-footer
+content-top-background
#home-splash-footer-inner
background-color: transparent
background-repeat: no-repeat, no-repeat
height: 61px
max-width: $content-max-width
background-position: left bottom, right bottom
background-image: image-url('theme1/button-bar-left.png'), image-url('theme1/button-bar-right.png')
color: $green
border-width: 0
border-radius: 0
height: 61px
#home-splash-footer-inner-bar
margin-left: 49px
margin-right: 53px
background-color: white
background-repeat: repeat-x
background-position: center bottom
background-image: image-url('theme1/button-bar-middle.png')
//min-height: 61px
height: 61px
#content-header
position: relative
height: $cth-height
+content-top-background
.container
height: $cth-height
margin: 0 auto
background-image: image-url("theme1/no-banner-bg-left.png"), image-url('theme1/no-banner-bg-right.png')
background-repeat: no-repeat, no-repeat
background-position: left bottom, right bottom
.top-ribbon
background-image: image-url("theme1/no-banner-bg-middle.png")
height: $cth-height
background-repeat: repeat-x
background-position: bottom
margin: 0 68px 0 42px
#main-wrap
font-size: 14px
font-family: $font-family-content
line-height: 1.5
color: #848585
position: relative
h1
font-size: 28px
padding: 0.5em 0 0.2em 0
line-height: 1.4
font-family: $font-family-headers
color: #AE571F
h2
font-size: 24px
padding: 0.5em 0 0.2em 0
line-height: 1.2
font-family: $font-family-headers
color: #AE571F
background-image: image-url('theme1/wall-bg.jpg')
background-position: center top
overflow: visible
position: relative
.container
margin: 0 auto
max-width: $content-max-width
.main-inner
+linear-gradient(#d6d6d6 0, white 70px)
position: relative
padding: 10px 40px 30px 40px
margin-left: 2px
margin-right: 2px
min-height: 400px
@media (max-width: 680px)
padding: 8px 15px
h1.page-title
margin: 0
padding: 0
margin-bottom: 12px
#footer-wrap
color: white
background-image: image-url('theme1/footer-bg.jpg')
background-position: center
overflow: visible
position: relative
.footer-shadow
height: 1px
//+box-shadow(0px 4px 10px #000)
.container
max-width: 838px
.footer-content
background-color: #420F03
text-align: right
padding: 72px 30px 20px 10px
overflow: visible
margin: 0 auto
a
margin-left: 20px
.footer-bottom
background-image: image-url('theme1/footer-bottom.png')
position: relative
height: 35px
padding-left: 30px
padding-right: 30px
max-width: 838px
position: relative
overflow: visible
margin: 0 auto
a
color: $green
text-decoration: none
&:hover
color: darken($green, 20%)
.right
float: right
.left
float: left
.clearing
clear: both
@@ -55,11 +55,6 @@
//text-transform: lowercase
.supplier-name
display: inline-block
.supplier-orders-placed-count
display: inline-block
// margin-right: 15px
.supplier-orders-in-process-count
display: inline-block
.menu-list-item
margin-left: 20px
cursor: pointer
@@ -80,11 +75,17 @@
margin-left: 8px
@media #{$small-only}
margin-left: 5px
.supplier-orders-placed-count
display: inline-block
// margin-right: 15px
.orders-placed-count-icon
@extend .fa
@extend .fa-clock-o
@extend .fa-lg
margin-left: 3px
.supplier-orders-in-process-count
display: inline-block
.orders-in-process-count-icon
@extend .fa
@extend .fa-check
@@ -1,7 +1,7 @@
module Users
class ApplicationController < ::ApplicationController
before_action :allow_all_origins
before_action :user_authentication, :unless => ->(c){ %w(obtain_token).include?(c.action_name) } # , except: [:obtain_token, :index]
before_action :user_authentication, unless: ->(c){ %w(obtain_token).include?(c.action_name) } # , except: [:obtain_token, :index]
private
@@ -11,6 +11,7 @@ module Users
sign_in user if user
sign_out current_user if current_user && !user # Other token attempt of logged in user
else
return if Rails.env.test? and action_name == 'index'
authenticate_user!
end
+5 -23
View File
@@ -10,35 +10,20 @@ html lang="en"
/[if lt IE 9]
= javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
= stylesheet_link_tag "theme1/application", :media => "all"
= javascript_include_tag 'theme1/application'
link href="/favicon.ico" rel="shortcut icon"
link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'
body
.header-nav-banner
#header-wrap
#ceiling
.left
.right
.lights
.light1
.light2
.light3
.container
#header
#header-right= render 'theme1/social'
#logo= link_to image_tag('icons/logo-text.png', alt: application_title), root_path
#nav-wrap.container
.navbar
.navbar-inner= render 'theme1/navigation'
= render 'theme1/header'
#home-splash
#home-splash-content.container
#home-splash-content
#home-splash-content-inner
#home-splash-content-inner-bar
#home-splash-footer
.left
.right
#home-splash-footer-inner.container
#home-splash-footer-inner.content-container
#home-splash-footer-inner-bar
#main-wrap
.container
@@ -55,8 +40,5 @@ html lang="en"
a.close data-dismiss="alert" &#215;
= yield :page_title
= yield
#footer-wrap
.footer-shadow
.container
.footer-content= render 'footer'
.footer-bottom &copy; mozo.bar 2014
= render 'theme1/footer'
= javascript_include_tag 'theme1/application'
+2 -21
View File
@@ -6,7 +6,6 @@ html lang="en"
meta name="viewport" content="width=device-width, initial-scale=1.0"
title= site_page_title
= csrf_meta_tags
/! Le HTML5 shim, for IE6-8 support of HTML elements
/[if lt IE 9]
= javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
@@ -16,21 +15,7 @@ html lang="en"
body
.header-nav-banner
#header-wrap
#ceiling
.left
.right
.lights
.light1
.light2
.light3
.container
#header
#header-right= render 'theme1/social'
#logo= link_to image_tag('icons/logo-text.png', alt: application_title), root_path
#nav-wrap.container
.navbar
.navbar-inner= render 'theme1/navigation'
= render 'theme1/header'
#content-header
.left
.right
@@ -50,9 +35,5 @@ html lang="en"
- if @page && @page.title.present?
h1.page-title= @page.title
= yield
#footer-wrap
.footer-shadow
.container
.footer-content= render 'footer'
.footer-bottom &copy; mozo.bar 2014
= render 'theme1/footer'
= javascript_include_tag "theme1/application"
+5
View File
@@ -0,0 +1,5 @@
#footer-wrap
.footer-shadow
.footer-content-container
.footer-content= render 'footer'
.footer-bottom &copy; mozo.bar 2014
+15
View File
@@ -0,0 +1,15 @@
#header-wrap
#ceiling
.left
.right
.lights
.light1
.light2
.light3
.container
#header
#header-right= render 'theme1/social'
#logo= link_to image_tag('icons/logo-text.png', alt: application_title), root_path
#nav-wrap
.navbar
.navbar-inner= render 'theme1/navigation'
+8 -6
View File
@@ -1,6 +1,8 @@
.container
ul.nav
li[class=(current_page?(controller: '/pages', action: 'home') ? :active : nil)]= link_to find_page('home').try(:menu_text), locale_root_path
li[class=(current_page?(controller: '/pages', action: 'show', name: 'about') ? :active : nil)]= link_to find_page('about').try(:menu_text), page_path('about')
- Page.menu_roots.each do |page|
li[class=(current_page?(controller: '/pages', action: 'show', name: page.name) ? :active : nil)]= link_to page.menu_text, page_path(page.name)
a.menu-secondary-toggle href="#"
span
ul.nav
li[class=(current_page?(controller: '/pages', action: 'home') ? :active : nil)]= link_to find_page('home').try(:menu_text), locale_root_path
li[class=(current_page?(controller: '/pages', action: 'show', name: 'about') ? :active : nil)]= link_to find_page('about').try(:menu_text), page_path('about')
ul.nav.secondary
- Page.menu_roots.each do |page|
li[class=(current_page?(controller: '/pages', action: 'show', name: page.name) ? :active : nil)]= link_to page.menu_text, page_path(page.name)
+3 -3
View File
@@ -1,9 +1,9 @@
.social
a.wsite-social-facebook href="https://www.facebook.com/mozo.bar" target=:_blank
span.wsite-social-inner
a.wsite-social-twitter href="https://twitter.com/mozo.bar" target=:_blank
/a.wsite-social-twitter href="https://twitter.com/mozo.bar" target=:_blank
span.wsite-social-inner
a.wsite-social-linkedin href="http://www.linkedin.com/company/2801351" target=:_blank
/a.wsite-social-linkedin href="http://www.linkedin.com/company/2801351" target=:_blank
span.wsite-social-inner
a.wsite-social-rss
/a.wsite-social-rss
span.wsite-social-inner
+1 -1
View File
@@ -43,7 +43,7 @@ remove 'user/app/application.js' # embedded in flat/application
gsub_file 'user/foundation/application.css', /url\(("?)\/assets/, 'url(\1../..'
gsub_all_scripts 'src="/assets', 'src="./assets'
#compress_js 'user/flat/application.js'
compress_js 'user/flat/application.js'
end_time = Time.now
puts "Converted assets for mobile in #{(end_time - start_time).round} seconds"
+1
View File
@@ -75,6 +75,7 @@ module Qwaiter
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
config.i18n.default_locale = :nl
config.i18n.available_locales = [:nl, :en]
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
+2 -2
View File
@@ -29,7 +29,7 @@ Qwaiter::Application.configure do
# Generate digests for assets URLs
config.assets.digest = true
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = false
config.assets.compile = true
# Defaults to nil and saved in location specified by config.assets.prefix
# config.assets.manifest = YOUR_PATH
@@ -46,7 +46,7 @@ Qwaiter::Application.configure do
# Prepend all log lines with the following tags
# config.log_tags = [ :subdomain, :uuid ]
config.log_level = :info
# Use a different logger for distributed setups
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
+8
View File
@@ -132,3 +132,11 @@ en:
with external parties.
<br>
footer: <br>
supplier_status_info:
title: "%{name} info"
header: |
The icons at the top right corner contain information about the place where you
are currently ordering. The number prefixed with &#35; is your table number.
orders_placed_count_explanation: "&nbsp; means that there are %{count} orders placed and not yet processing or finished"
orders_in_process_count_explanation: "&nbsp; means that there are %{count} orders currently processing"
close: Got it
+8
View File
@@ -132,3 +132,11 @@ nl:
horeca onderneming waar je wat bestelt.
<br>
footer: <br>
supplier_status_info:
title: "%{name} info"
header: |
De icoontjes rechtsboven geven informatie over de plek waar je aan het bestellen bent.
Het getal met &#35; is je tafelnummer.
orders_placed_count_explanation: "&nbsp; betekent dat er %{count} nog niet in behandeling of afgesloten bestellingen zijn"
orders_in_process_count_explanation: "&nbsp; betekent dat er %{count} bestellingen in behandeling zijn"
close: Got it
+1 -1
View File
@@ -1 +1 @@
0.9.40
0.9.51
@@ -0,0 +1,10 @@
Feature: A signed in uses sees supplier info in the top right corner
@javascript
Scenario: Clicking on the table number opens the supplier info popup
Given there is a confirmed and open supplier
And I am signed in as a user
And the user has an active order
When I am on the user homepage
And the user clicks on the table number info in the top right corner
Then the user sees the supplier information popup
@@ -7,20 +7,6 @@ step "the list is marked as in need of payment" do
@list.needs_payment!
end
step "the user has an active list with a/an :order_status order" do |order_status|
@list = create :list, supplier: @supplier, table: @table, user_ids: [@user.id]
@product ||= create :product, supplier: @supplier, name: 'Beer', price: 2.34
@order = create :order, order_status.to_sym, supplier: @supplier, list: @list, user: @user
@product_order = create :product_order, order: @order, product: @product, quantity: 2, price: 2.34
@user.reload
@user.active_list_id = @list.id
@user.save
case order_status.to_sym
when :placed then @supplier.increment_orders_placed_count!
when :active then @supplier.increment_orders_in_process_count!
end
end
step "the list changes to another table" do
@list.move_to_table! @other_table
end
@@ -10,7 +10,7 @@ step "the user should see a popup asking the user if he would like to change tab
end
step "the user indicates in the popup that he wants to change the table" do
find('.confirm-ok').click
find('.modal-confirm').click
end
step "the user should see the supplier menu having the other table as base" do
@@ -113,3 +113,19 @@ step "the user has an older list for the same supplier" do
@older_list = create :list, supplier: @supplier, table: @table, user_ids: [@user.id]
end
step "the user has an active list with a/an :order_status order" do |order_status|
@list = create :list, supplier: @supplier, table: @table, user_ids: [@user.id]
@product_category ||= create :product_category, supplier: @supplier
@product ||= create :product, supplier: @supplier, name: 'Beer', price: 2.34, product_category: @product_category
@order = create :order, order_status.to_sym, supplier: @supplier, list: @list, user: @user
@product_order = create :product_order, order: @order, product: @product, quantity: 2, price: 2.34
@user.reload
@user.active_list_id = @list.id
@user.save
case order_status.to_sym
when :placed then @supplier.increment_orders_placed_count!
when :active then @supplier.increment_orders_in_process_count!
end
end
@@ -0,0 +1,9 @@
step "the user clicks on the table number info in the top right corner" do
find('.top-menu .table-number').click
end
step "the user sees the supplier information popup" do
within '.modal' do
page.should have_content @supplier.name
end
end
+1 -1
View File
@@ -29,7 +29,7 @@ module SpecRouteHelpers
# currentRouteName does not include model information: /list/123 => currentRouteName == 'list'
# page.evaluate_script %|App.__container__.lookup('controller:application').get('currentRouteName')|
# page.evaluate_script %|App.__container__.lookup('router:main').location.lastSetURL| # not working for direct path supplier#/settings
route = page.evaluate_script %{App.__container__ && (window.location.hash || "#/").substr(1)}
route = page.evaluate_script(%{App.__container__ && (window.location.hash || "#/").substr(1)})
unless omit_should_raise
def route.should(*)
raise "Cannot call should on ember route. Use ember_route_should_be instead"