Mixed commit, user facebook issues
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
Ember.Handlebars.registerBoundHelper 'image_tag', (path, params..., options={})->
|
||||
alt = options.hash.alt ||= ''
|
||||
Ember.Handlebars.helper 'image_tag', (path, options={})->
|
||||
alt = options.hash.alt || ''
|
||||
image_path = if path.substring(0,4) == 'http' then path else "/assets/#{path}"
|
||||
new Handlebars.SafeString "<img src=\"#{image_path}\" alt=\"#{alt}\" title=\"#{alt}\" >"
|
||||
extra_attributes = ''
|
||||
extra_attributes += " width=\"#{options.hash.width}\"" if options.hash.width
|
||||
extra_attributes += " height=\"#{options.hash.height}\"" if options.hash.height
|
||||
new Handlebars.SafeString "<img src=\"#{image_path}\" alt=\"#{alt}\" title=\"#{alt}\" #{extra_attributes}>"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
App.SettingsController = Ember.ObjectController.extend
|
||||
needs: ['application']
|
||||
model: (-> @get('controllers.application.supplier')).property('controllers.application.supplier')
|
||||
# model: (-> @get('controllers.application.supplier')).property('controllers.application.supplier')
|
||||
time_zones: (-> window.time_zones ).property()
|
||||
countries: (-> window.countries ).property()
|
||||
editIensProfile: (-> @get('model.country') is 'Netherlands' ).property('model.country')
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
App.SettingsRoute = Ember.Route.extend
|
||||
model: ->
|
||||
Em.RSVP.hash
|
||||
supplier: @controllerFor('application').get('supplier')
|
||||
setupController: (controller, model)->
|
||||
#controller.set 'model', controller.get('controllers.application.supplier')
|
||||
controller.set 'model', model.supplier
|
||||
model: -> @container.lookup('route:application').supplier
|
||||
# setupController: (controller, model)->
|
||||
# #controller.set 'model', controller.get('controllers.application.supplier')
|
||||
# controller.set 'model', model.supplier
|
||||
|
||||
@@ -12,7 +12,10 @@
|
||||
rootElement: '#ember-app-container'
|
||||
obtain_token: (message)->
|
||||
message ||= ''
|
||||
window.location = "#{$root_url}/obtain_token?message=#{message}"
|
||||
# frame = $('<iframe></iframe>').addClass('obtain-token-frame').attr 'src', $obtain_token_url
|
||||
# frame.css width: $('body').outerWidth(), height: $('body').outerHeight()
|
||||
# $('body').append frame
|
||||
window.location = "#{$obtain_token_url}"
|
||||
|
||||
Ember.$.ajaxPrefilter (options) ->
|
||||
if options.type.toUpperCase() == 'GET'
|
||||
|
||||
@@ -10,18 +10,21 @@ if list.closed_at
|
||||
.display-row
|
||||
.display-label=t 'attributes.list.state'
|
||||
.display-field=state 'list' list.state
|
||||
if list.sorted_orders
|
||||
.list-orders-container
|
||||
each order in list.sorted_orders
|
||||
App.ListOrderView contentBinding="order"
|
||||
if showTotal
|
||||
.list-orders-total.total
|
||||
= t 'total'
|
||||
span.currency= currency list.total
|
||||
if list.orders.isLoaded
|
||||
if list.sorted_orders
|
||||
.list-orders-container
|
||||
each order in list.sorted_orders
|
||||
App.ListOrderView contentBinding="order"
|
||||
if showTotal
|
||||
.list-orders-total.total
|
||||
= t 'total'
|
||||
span.currency= currency list.total
|
||||
else
|
||||
p
|
||||
span=t 'active_list.no_orders_explanation'
|
||||
br
|
||||
if list.table
|
||||
link-to 'table' list.table class="button"
|
||||
span=t 'list_products.title'
|
||||
else
|
||||
p
|
||||
span=t 'active_list.no_orders_explanation'
|
||||
br
|
||||
if list.table
|
||||
link-to 'table' list.table class="button"
|
||||
span=t 'list_products.title'
|
||||
span.loading.large
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
.row
|
||||
h2=t 'active_list.title'
|
||||
if list
|
||||
partial "list_content"
|
||||
if list.orders.isLoaded
|
||||
if list
|
||||
partial "list_content"
|
||||
else
|
||||
p
|
||||
span=t 'active_list.not_active.message'
|
||||
br
|
||||
link-to 'index' class="button"
|
||||
span= t 'active_list.not_active.home_button_text'
|
||||
else
|
||||
p
|
||||
span=t 'active_list.not_active.message'
|
||||
br
|
||||
link-to 'index' class="button"
|
||||
span= t 'active_list.not_active.home_button_text'
|
||||
span.loading.large
|
||||
|
||||
@@ -17,7 +17,7 @@ header.top-menu
|
||||
.table-number
|
||||
|
|
||||
= t 'models.table'
|
||||
|
|
||||
|
|
||||
= list.table.number
|
||||
.supplier-info-row
|
||||
.counter.supplier-orders-placed-count
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.home-panel
|
||||
.home-header = image_tag 'logo.png'
|
||||
.home-header= image_tag 'logo.png' width=100 height=115 alt="Logo"
|
||||
.home-center
|
||||
a{action scanQr} href="#"= image_tag 'scan-logo.png'
|
||||
a{ action "scanQr" } href="#"= image_tag 'scan-logo.png' width=148 height=177 alt="Scan"
|
||||
.home-footer
|
||||
.home-footer-content
|
||||
|
||||
Reference in New Issue
Block a user