Merge lp://staging/~gary/juju-gui/fixSuccessiveConflicts into lp://staging/juju-gui/experimental
Proposed by
Gary Poster
Status: | Merged |
---|---|
Merged at revision: | 1031 |
Proposed branch: | lp://staging/~gary/juju-gui/fixSuccessiveConflicts |
Merge into: | lp://staging/juju-gui/experimental |
Diff against target: |
164 lines (+63/-26) 3 files modified
app/views/databinding.js (+5/-0) app/views/inspector.js (+34/-26) test/test_inspector_constraints.js (+24/-0) |
To merge this branch: | bzr merge lp://staging/~gary/juju-gui/fixSuccessiveConflicts |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju GUI Hackers | Pending | ||
Review via email:
|
Description of the change
fix successive conflict UX calls
if you set a model value and then set a new one, the newest one will be lost. This branch fixes that problem, and adds a test for simpler conflict UX.
To post a comment you must log in.
Reviewers: mp+185100_ code.launchpad. net,
Message:
Please take a look.
Description:
fix successive conflict UX calls
if you set a model value and then set a new one, the newest one will be
lost. This branch fixes that problem, and adds a test for simpler
conflict UX.
https:/ /code.launchpad .net/~gary/ juju-gui/ fixSuccessiveCo nflicts/ +merge/ 185100
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/13663043/
Affected files (+65, -26 lines): databinding. js inspector. js inspector_ constraints. js
A [revision details]
M app/views/
M app/views/
M test/test_
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>
Index: test/test_ inspector_ constraints. js inspector_ constraints. js' inspector_ constraints. js 2013-09-11 00:22:45 +0000 inspector_ constraints. js 2013-09-11 15:40:06 +0000 isTrue( controls. hasClass( 'closed' ));
=== modified file 'test/test_
--- test/test_
+++ test/test_
@@ -247,4 +247,28 @@
assert.
});
+ it('handles conflicts correctly', function() { inspector) ; model.set( 'constraints' , {arch: 'lcars'}); container. one('input[ data-bind= "constraints. arch"]' ); 'click' ); '.settings- wrapper' ); one('.resolver .config-field'); equal(option. getHTML( ), 'lcars'); inspector) ; model.set( 'constraints' , {arch: 'lcars'}); model.set( 'constraints' , {arch: 'arm64'}); container. one('input[ data-bind= "constraints. arch"]' ); 'click' ); '.settings- wrapper' ); one('.resolver .config-field'); equal(option. getHTML( ), 'arm64');
+ var viewlet = getViewlet(
+ changeForm(viewlet, 'arch', 'i386');
+ inspector.
+ var node =
viewlet.
+ node.simulate(
+ var wrapper = node.ancestor(
+ var option = wrapper.
+ assert.
+ });
+
+ it('handles successive conflicts correctly', function() {
+ var viewlet = getViewlet(
+ changeForm(viewlet, 'arch', 'i386');
+ inspector.
+ // This is the successive change.
+ inspector.
+ var node =
viewlet.
+ node.simulate(
+ var wrapper = node.ancestor(
+ var option = wrapper.
+ assert.
+ });
+
});
Index: app/views/ databinding. js databinding. js' databinding. js 2013-09-11 14:22:16 +0000 databinding. js 2013-09-11 15:34:27 +0000
=== modified file 'app/views/
--- app/views/
+++ app/views/
@@ -300,6 +300,8 @@
* name: A string that is the binding name. It references a
nested) attribute of the associated viewlet's model.
unique: no other binding in this engine shares it.
(possibly
+ * annotations: A hash on which viewlets can scribble whatever they
want
+ to.
* viewlet: (optional) The viewlet that is matched with this binding.
* target: (optional) Associated DOM node. If this exists, then it
is
@@ -350,6 +352,9 @@
}
+ if (binding.
+ binding.annotations = {};
+ }
...