diff --git a/app/assets/javascripts/supplier/app/views/section_table_view.js.coffee b/app/assets/javascripts/supplier/app/views/section_table_view.js.coffee
index 9c7d3e32..8adbb642 100644
--- a/app/assets/javascripts/supplier/app/views/section_table_view.js.coffee
+++ b/app/assets/javascripts/supplier/app/views/section_table_view.js.coffee
@@ -15,12 +15,13 @@ App.SectionTableView = Ember.View.extend DragNDrop.Draggable,
).property('content.id')
offsetX: (->
return 0 unless section_width = @get('content.section.width')
- (@content.get('position_x') || 0) * @containerWidth() / section_width
- ).property('content.section.width', 'content.position_x')
+ ((@get('content.position_x') || 0) * @get('containerWidth') / section_width) - 40
+ ).property('content.section.width', 'content.position_x', 'containerWidth')
offsetY: (->
return 0 unless section_height = @get('content.section.height')
- (@content.get('position_y') || 0) * @containerHeight() / section_height
- ).property('content.section.height', 'content.position_y')
+ # debugger if @get('content.number') == 11
+ ((@content.get('position_y') || 0) * @get('containerHeight') / section_height) - 20
+ ).property('content.section.height', 'content.position_y', 'containerHeight')
style: (->
"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()
#@content.get('transaction').commit()
@content.save()
- containerWidth: ->
- $(@get('parentView.element')).width()
- containerHeight: ->
- $(@get('parentView.element')).height()
+ containerWidth: (-> @get('parentView.element_width') ).property('parentView.element_width')
+ containerHeight: (-> @get('parentView.element_height') ).property('parentView.element_height')
+ # $(@get('parentView.element')).width()
+ # containerHeight: ->
+ # $(@get('parentView.element')).height()
#click: ->
#@$('.table-actions').show()
didInsertElement: ->
diff --git a/app/assets/javascripts/supplier/app/views/section_tables_view.js.coffee b/app/assets/javascripts/supplier/app/views/section_tables_view.js.coffee
index 4b605d64..45e0bec3 100644
--- a/app/assets/javascripts/supplier/app/views/section_tables_view.js.coffee
+++ b/app/assets/javascripts/supplier/app/views/section_tables_view.js.coffee
@@ -1,6 +1,8 @@
App.SectionTablesView = Ember.View.extend DragNDrop.Droppable,
classNames: ['well', 'section-tables-container', 'section-tables-active']
templateName: 'section_tables'
+ element_width: 0
+ element_height: 0
didInsertElement: ->
@$el = $(@get('element'))
height = @$el.width() * @get('controller.model.height') / @get('controller.model.width')
@@ -10,7 +12,10 @@ App.SectionTablesView = Ember.View.extend DragNDrop.Droppable,
observeSectionDimensions: (->
return unless @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)
).observes('controller.model.height', 'controller.model.width')
tables: (->@get('content')).property('content')
diff --git a/bin/build_mobile_app.rb b/bin/build_mobile_app.rb
index 6b89a7b5..521908ed 100644
--- a/bin/build_mobile_app.rb
+++ b/bin/build_mobile_app.rb
@@ -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.sub! /<\/title>/, ''
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}
## MODIFY FOR ANDROID
diff --git a/wip.md b/wip.md
index bc602663..7af610bc 100644
--- a/wip.md
+++ b/wip.md
@@ -46,9 +46,6 @@ Bugs
- Supplier tables pagination styling (make ember!)
- 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 dashboard
- - Total list price is not working, link with orders not made. Make/Check if there is a spec
Post release
============