Fixes update() for cases like Scaffold. dataset-ui
authordsc <dsc@wikimedia.org>
Mon, 14 May 2012 02:20:06 +0000 (19:20 -0700)
committerdsc <dsc@wikimedia.org>
Mon, 14 May 2012 02:20:06 +0000 (19:20 -0700)
lib/base/data-binding.co
lib/graph/graph-edit-view.co

index 3ec4899..31f49da 100644 (file)
@@ -21,7 +21,7 @@ class exports.DataBinding
         @el = @$el.get 0
         
         # Find all bind-points under this element, but not under a subview
-        @bindPoints = @$ '[data-bind], [name]' .not @$ '[data-subview] [data-bind], [data-subview] [name]'
+        @bindPoints = @$ '[data-bind], [name]' .not @$('[data-subview]').find('[data-bind], [name]')
     
     $: (sel) ->
         @$el.find sel
index eec0146..d641591 100644 (file)
@@ -38,14 +38,14 @@ GraphEditView = exports.GraphEditView = BaseView.extend do # {{{
     template  : require 'kraken/template/graph-edit'
     
     events:
-        'click    .redraw-button'                  : 'stopAndRender'
-        'click    .load-button'                    : 'load'
-        'click    .save-button'                    : 'save'
-        'click    .done-button'                    : 'done'
+        'click    .redraw-button'                        : 'stopAndRender'
+        'click    .load-button'                          : 'load'
+        'click    .save-button'                          : 'save'
+        'click    .done-button'                          : 'done'
         'keypress .graph-details input[type="text"]'     : 'onKeypress'
+        'keypress .chart-options .value'                 : 'onKeypress'
         'submit   form.graph-details'                    : 'onDetailsSubmit'
         'change   :not(.chart-options) select'           : 'onDetailsSubmit'
-        'keypress .chart-options .value'                 : 'onKeypress'
         'submit   form.chart-options'                    : 'onOptionsSubmit'
         'change   .chart-options input[type="checkbox"]' : 'onOptionsSubmit'