g
This commit is contained in:
@@ -15,12 +15,13 @@ App.SectionTableView = Ember.View.extend DragNDrop.Draggable,
|
|||||||
).property('content.id')
|
).property('content.id')
|
||||||
offsetX: (->
|
offsetX: (->
|
||||||
return 0 unless section_width = @get('content.section.width')
|
return 0 unless section_width = @get('content.section.width')
|
||||||
(@content.get('position_x') || 0) * @containerWidth() / section_width
|
((@get('content.position_x') || 0) * @get('containerWidth') / section_width) - 40
|
||||||
).property('content.section.width', 'content.position_x')
|
).property('content.section.width', 'content.position_x', 'containerWidth')
|
||||||
offsetY: (->
|
offsetY: (->
|
||||||
return 0 unless section_height = @get('content.section.height')
|
return 0 unless section_height = @get('content.section.height')
|
||||||
(@content.get('position_y') || 0) * @containerHeight() / section_height
|
# debugger if @get('content.number') == 11
|
||||||
).property('content.section.height', 'content.position_y')
|
((@content.get('position_y') || 0) * @get('containerHeight') / section_height) - 20
|
||||||
|
).property('content.section.height', 'content.position_y', 'containerHeight')
|
||||||
|
|
||||||
style: (->
|
style: (->
|
||||||
"position:absolute;width:83px;height:48px;left:#{@get('offsetX')}px;top:#{@get('offsetY')}px"
|
"position:absolute;width:83px;height:48px;left:#{@get('offsetX')}px;top:#{@get('offsetY')}px"
|
||||||
@@ -38,10 +39,11 @@ App.SectionTableView = Ember.View.extend DragNDrop.Draggable,
|
|||||||
position_y: position.top *@content.get('section').get('height') / @containerHeight()
|
position_y: position.top *@content.get('section').get('height') / @containerHeight()
|
||||||
#@content.get('transaction').commit()
|
#@content.get('transaction').commit()
|
||||||
@content.save()
|
@content.save()
|
||||||
containerWidth: ->
|
containerWidth: (-> @get('parentView.element_width') ).property('parentView.element_width')
|
||||||
$(@get('parentView.element')).width()
|
containerHeight: (-> @get('parentView.element_height') ).property('parentView.element_height')
|
||||||
containerHeight: ->
|
# $(@get('parentView.element')).width()
|
||||||
$(@get('parentView.element')).height()
|
# containerHeight: ->
|
||||||
|
# $(@get('parentView.element')).height()
|
||||||
#click: ->
|
#click: ->
|
||||||
#@$('.table-actions').show()
|
#@$('.table-actions').show()
|
||||||
didInsertElement: ->
|
didInsertElement: ->
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
App.SectionTablesView = Ember.View.extend DragNDrop.Droppable,
|
App.SectionTablesView = Ember.View.extend DragNDrop.Droppable,
|
||||||
classNames: ['well', 'section-tables-container', 'section-tables-active']
|
classNames: ['well', 'section-tables-container', 'section-tables-active']
|
||||||
templateName: 'section_tables'
|
templateName: 'section_tables'
|
||||||
|
element_width: 0
|
||||||
|
element_height: 0
|
||||||
didInsertElement: ->
|
didInsertElement: ->
|
||||||
@$el = $(@get('element'))
|
@$el = $(@get('element'))
|
||||||
height = @$el.width() * @get('controller.model.height') / @get('controller.model.width')
|
height = @$el.width() * @get('controller.model.height') / @get('controller.model.width')
|
||||||
@@ -10,7 +12,10 @@ App.SectionTablesView = Ember.View.extend DragNDrop.Droppable,
|
|||||||
observeSectionDimensions: (->
|
observeSectionDimensions: (->
|
||||||
return unless @get('element')
|
return unless @get('element')
|
||||||
@$el = $(@get('element'))
|
@$el = $(@get('element'))
|
||||||
height = @$el.width() * @get('controller.model.height') / @get('controller.model.width')
|
width = @$el.width()
|
||||||
|
height = width * @get('controller.model.height') / @get('controller.model.width')
|
||||||
|
@set 'element_width', width
|
||||||
|
@set 'element_height', height
|
||||||
@$el.css('height', height)
|
@$el.css('height', height)
|
||||||
).observes('controller.model.height', 'controller.model.width')
|
).observes('controller.model.height', 'controller.model.width')
|
||||||
tables: (->@get('content')).property('content')
|
tables: (->@get('content')).property('content')
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ for action in uc.action_methods
|
|||||||
ios_view = ios_view.gsub /(href|src)="\/assets\/([^"]+)/, %|\\1="./assets/\\2| # make assets calls relative
|
ios_view = ios_view.gsub /(href|src)="\/assets\/([^"]+)/, %|\\1="./assets/\\2| # make assets calls relative
|
||||||
ios_view.sub! /<\/title>/, '</title><script type="text/javascript" src="qmobile.js"></script><script type="text/javascript" src="cordova-2.2.0.js"></script><script type="text/javascript" src="barcodescanner.js"></script>'
|
ios_view.sub! /<\/title>/, '</title><script type="text/javascript" src="qmobile.js"></script><script type="text/javascript" src="cordova-2.2.0.js"></script><script type="text/javascript" src="barcodescanner.js"></script>'
|
||||||
ios_view.gsub! '##assets_path##', './assets/'
|
ios_view.gsub! '##assets_path##', './assets/'
|
||||||
android_view.gsub! '##platform##', 'ios'
|
ios_view.gsub! '##platform##', 'ios'
|
||||||
File.open(File.join(ios_root, "#{action}.html"), 'w'){|f| f.puts ios_view}
|
File.open(File.join(ios_root, "#{action}.html"), 'w'){|f| f.puts ios_view}
|
||||||
|
|
||||||
## MODIFY FOR ANDROID
|
## MODIFY FOR ANDROID
|
||||||
|
|||||||
@@ -46,9 +46,6 @@ Bugs
|
|||||||
- Supplier tables pagination styling (make ember!)
|
- Supplier tables pagination styling (make ember!)
|
||||||
- supplier counters in user view (no supplier in active list?)
|
- supplier counters in user view (no supplier in active list?)
|
||||||
- supplier main board section selector selects first section option and not the supplier name, which is added using prompt thingy. Maybe setting ApplicationController.active_section in stead of IndexController.active_section for scope locking
|
- supplier main board section selector selects first section option and not the supplier name, which is added using prompt thingy. Maybe setting ApplicationController.active_section in stead of IndexController.active_section for scope locking
|
||||||
- Supplier
|
|
||||||
- Main dashboard
|
|
||||||
- Total list price is not working, link with orders not made. Make/Check if there is a spec
|
|
||||||
|
|
||||||
Post release
|
Post release
|
||||||
============
|
============
|
||||||
|
|||||||
Reference in New Issue
Block a user