Skip to content

Commit

Permalink
More elimination of global dojox.mvc.at etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
asudoh committed Apr 5, 2012
1 parent 065cfde commit ea31ef7
Show file tree
Hide file tree
Showing 21 changed files with 72 additions and 63 deletions.
20 changes: 11 additions & 9 deletions EditModelRefController.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ define([
// | <script src="/path/to/dojo-toolkit/dojo/dojo.js" type="text/javascript" data-dojo-config="parseOnLoad: 0"></script> // | <script src="/path/to/dojo-toolkit/dojo/dojo.js" type="text/javascript" data-dojo-config="parseOnLoad: 0"></script>
// | <script type="text/javascript"> // | <script type="text/javascript">
// | require([ // | require([
// | "dojo/dom", "dojo/parser", "dojo/Stateful", "dijit/registry", "dijit/form/CheckBox", "dojox/mvc/at", "dojox/mvc/EditModelRefController", "dojo/domReady!" // | "dojo/dom", "dojo/parser", "dojo/Stateful", "dijit/registry", "dojox/mvc/at", "dijit/form/CheckBox", "dojox/mvc/EditModelRefController", "dojo/domReady!"
// | ], function(ddom, parser, Stateful, registry){ // | ], function(ddom, parser, Stateful, registry, at){
// | window.at = at;
// | model = new Stateful({value: false}); // | model = new Stateful({value: false});
// | setTimeout(function(){ // | setTimeout(function(){
// | ddom.byId("check").click(); // | ddom.byId("check").click();
Expand All @@ -65,7 +66,7 @@ define([
// | </head> // | </head>
// | <body> // | <body>
// | <span id="ctrl" data-dojo-type="dojox.mvc.EditModelRefController" data-dojo-props="sourceModel: model"></span> // | <span id="ctrl" data-dojo-type="dojox.mvc.EditModelRefController" data-dojo-props="sourceModel: model"></span>
// | <input id="check" type="checkbox" data-dojo-type="dijit.form.CheckBox" data-dojo-props="checked: dojox.mvc.at('widget:ctrl', 'value')"> // | <input id="check" type="checkbox" data-dojo-type="dijit.form.CheckBox" data-dojo-props="checked: at('widget:ctrl', 'value')">
// | </body> // | </body>
// | </html> // | </html>
// example: // example:
Expand All @@ -76,9 +77,10 @@ define([
// | <script src="/path/to/dojo-toolkit/dojo/dojo.js" type="text/javascript" data-dojo-config="parseOnLoad: 0"></script> // | <script src="/path/to/dojo-toolkit/dojo/dojo.js" type="text/javascript" data-dojo-config="parseOnLoad: 0"></script>
// | <script type="text/javascript"> // | <script type="text/javascript">
// | require([ // | require([
// | "dojo/dom", "dojo/parser", "dojo/Stateful", "dijit/registry", // | "dojo/dom", "dojo/parser", "dojo/Stateful", "dijit/registry", "dojox/mvc/at",
// | "dijit/form/CheckBox", "dojox/mvc/at", "dojox/mvc/ModelRefController", "dojox/mvc/EditModelRefController", "dojo/domReady!" // | "dijit/form/CheckBox", "dojox/mvc/ModelRefController", "dojox/mvc/EditModelRefController", "dojo/domReady!"
// | ], function(ddom, parser, Stateful, registry){ // | ], function(ddom, parser, Stateful, registry, at){
// | window.at = at;
// | model = new Stateful({value: false}); // | model = new Stateful({value: false});
// | setTimeout(function(){ // | setTimeout(function(){
// | ddom.byId("checkEdit").click(); // | ddom.byId("checkEdit").click();
Expand All @@ -93,13 +95,13 @@ define([
// | <body> // | <body>
// | <span id="ctrlSource" data-dojo-type="dojox.mvc.ModelRefController" data-dojo-props="model: model"></span> // | <span id="ctrlSource" data-dojo-type="dojox.mvc.ModelRefController" data-dojo-props="model: model"></span>
// | <span id="ctrlEdit" data-dojo-type="dojox.mvc.EditModelRefController" // | <span id="ctrlEdit" data-dojo-type="dojox.mvc.EditModelRefController"
// | data-dojo-props="sourceModel: dojox.mvc.at('widget:ctrlSource', 'model'), holdModelUntilCommit: true"></span> // | data-dojo-props="sourceModel: at('widget:ctrlSource', 'model'), holdModelUntilCommit: true"></span>
// | Source: // | Source:
// | <input id="checkSource" type="checkbox" data-dojo-type="dijit.form.CheckBox" // | <input id="checkSource" type="checkbox" data-dojo-type="dijit.form.CheckBox"
// | data-dojo-props="checked: dojox.mvc.at('widget:ctrlSource', 'value')"> // | data-dojo-props="checked: at('widget:ctrlSource', 'value')">
// | Edit: // | Edit:
// | <input id="checkEdit" type="checkbox" data-dojo-type="dijit.form.CheckBox" // | <input id="checkEdit" type="checkbox" data-dojo-type="dijit.form.CheckBox"
// | data-dojo-props="checked: dojox.mvc.at('widget:ctrlEdit', 'value')"> // | data-dojo-props="checked: at('widget:ctrlEdit', 'value')">
// | </body> // | </body>
// | </html> // | </html>


Expand Down
9 changes: 5 additions & 4 deletions EditStoreRefController.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ define([
// | <script src="/path/to/dojo-toolkit/dojo/dojo.js" type="text/javascript" data-dojo-config="parseOnLoad: 0"></script> // | <script src="/path/to/dojo-toolkit/dojo/dojo.js" type="text/javascript" data-dojo-config="parseOnLoad: 0"></script>
// | <script type="text/javascript"> // | <script type="text/javascript">
// | require([ // | require([
// | "dojo/dom", "dojo/parser", "dojo/store/Observable", "dojo/store/Memory", "dijit/registry", // | "dojo/dom", "dojo/parser", "dojo/store/Observable", "dojo/store/Memory", "dijit/registry", "dojox/mvc/at",
// | "dijit/form/CheckBox", "dojox/mvc/at", "dojox/mvc/EditStoreRefController", "dojox/mvc/ListController", "dojo/domReady!" // | "dijit/form/CheckBox", "dojox/mvc/EditStoreRefController", "dojox/mvc/ListController", "dojo/domReady!"
// | ], function(ddom, parser, Observable, Memory, registry){ // | ], function(ddom, parser, Observable, Memory, registry, at){
// | window.at = at;
// | store = Observable(new Memory({data: [{id: "Foo", value: false}]})); // | store = Observable(new Memory({data: [{id: "Foo", value: false}]}));
// | parser.parse(); // | parser.parse();
// | registry.byId("ctrl").queryStore().observe(function(object, previousIndex, newIndex){ // | registry.byId("ctrl").queryStore().observe(function(object, previousIndex, newIndex){
Expand All @@ -42,7 +43,7 @@ define([
// | <body> // | <body>
// | <span id="ctrl" data-dojo-type="dojox.mvc.EditStoreRefController" data-dojo-mixins="dojox.mvc.ListController" // | <span id="ctrl" data-dojo-type="dojox.mvc.EditStoreRefController" data-dojo-mixins="dojox.mvc.ListController"
// | data-dojo-props="store: store, cursorIndex: 0"></span> // | data-dojo-props="store: store, cursorIndex: 0"></span>
// | <input id="check" type="checkbox" data-dojo-type="dijit.form.CheckBox" data-dojo-props="checked: dojox.mvc.at('widget:ctrl', 'value')"> // | <input id="check" type="checkbox" data-dojo-type="dijit.form.CheckBox" data-dojo-props="checked: at('widget:ctrl', 'value')">
// | </body> // | </body>
// | </html> // | </html>


Expand Down
9 changes: 5 additions & 4 deletions EditStoreRefListController.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ define([
// | <script src="/path/to/dojo-toolkit/dojo/dojo.js" type="text/javascript" data-dojo-config="parseOnLoad: 0"></script> // | <script src="/path/to/dojo-toolkit/dojo/dojo.js" type="text/javascript" data-dojo-config="parseOnLoad: 0"></script>
// | <script type="text/javascript"> // | <script type="text/javascript">
// | require([ // | require([
// | "dojo/dom", "dojo/parser", "dojo/store/Observable", "dojo/store/Memory", "dijit/registry", // | "dojo/dom", "dojo/parser", "dojo/store/Observable", "dojo/store/Memory", "dijit/registry", "dojox/mvc/at",
// | "dijit/form/CheckBox", "dojox/mvc/at", "dojox/mvc/EditStoreRefListController", "dojox/mvc/ListController", "dojo/domReady!" // | "dijit/form/CheckBox", "dojox/mvc/EditStoreRefListController", "dojox/mvc/ListController", "dojo/domReady!"
// | ], function(ddom, parser, Observable, Memory, registry){ // | ], function(ddom, parser, Observable, Memory, registry, at){
// | window.at = at;
// | store = Observable(new Memory({data: [{id: "Foo", value: false}]})); // | store = Observable(new Memory({data: [{id: "Foo", value: false}]}));
// | parser.parse(); // | parser.parse();
// | registry.byId("ctrl").queryStore().observe(function(object, previousIndex, newIndex){ // | registry.byId("ctrl").queryStore().observe(function(object, previousIndex, newIndex){
Expand All @@ -42,7 +43,7 @@ define([
// | <body> // | <body>
// | <span id="ctrl" data-dojo-type="dojox.mvc.EditStoreRefListController" // | <span id="ctrl" data-dojo-type="dojox.mvc.EditStoreRefListController"
// | data-dojo-props="store: store, cursorIndex: 0"></span> // | data-dojo-props="store: store, cursorIndex: 0"></span>
// | <input id="check" type="checkbox" data-dojo-type="dijit.form.CheckBox" data-dojo-props="checked: dojox.mvc.at('widget:ctrl', 'value')"> // | <input id="check" type="checkbox" data-dojo-type="dijit.form.CheckBox" data-dojo-props="checked: at('widget:ctrl', 'value')">
// | </body> // | </body>
// | </html> // | </html>


Expand Down
9 changes: 5 additions & 4 deletions ListController.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ define([
// | <script src="/path/to/dojo-toolkit/dojo/dojo.js" type="text/javascript" data-dojo-config="parseOnLoad: 0"></script> // | <script src="/path/to/dojo-toolkit/dojo/dojo.js" type="text/javascript" data-dojo-config="parseOnLoad: 0"></script>
// | <script type="text/javascript"> // | <script type="text/javascript">
// | require([ // | require([
// | "dojo/parser", "dijit/registry", "dojox/mvc/StatefulArray", // | "dojo/parser", "dijit/registry", "dojox/mvc/StatefulArray", "dojox/mvc/at",
// | "dijit/form/TextBox", "dojox/mvc/at", "dojox/mvc/ListController", "dojo/domReady!" // | "dijit/form/TextBox", "dojox/mvc/ListController", "dojo/domReady!"
// | ], function(parser, registry, StatefulArray){ // | ], function(parser, registry, StatefulArray, at){
// | window.at = at;
// | var count = 0; // | var count = 0;
// | model = new StatefulArray([{value: "First"}, {value: "Second"}, {value: "Third"}, {value: "Fourth"}, {value: "Fifth"}]); // | model = new StatefulArray([{value: "First"}, {value: "Second"}, {value: "Third"}, {value: "Fourth"}, {value: "Fifth"}]);
// | setInterval(function(){ registry.byId("ctrl").set("cursorIndex", ++count % 5); }, 2000); // | setInterval(function(){ registry.byId("ctrl").set("cursorIndex", ++count % 5); }, 2000);
Expand All @@ -109,7 +110,7 @@ define([
// | </head> // | </head>
// | <body> // | <body>
// | <span id="ctrl" data-dojo-type="dojox.mvc.ListController" data-dojo-props="model: model"></span> // | <span id="ctrl" data-dojo-type="dojox.mvc.ListController" data-dojo-props="model: model"></span>
// | <input type="text" data-dojo-type="dijit.form.TextBox" data-dojo-props="value: dojox.mvc.at('widget:ctrl', 'value')"> // | <input type="text" data-dojo-type="dijit.form.TextBox" data-dojo-props="value: at('widget:ctrl', 'value')">
// | </body> // | </body>
// | </html> // | </html>


Expand Down
9 changes: 5 additions & 4 deletions ModelRefController.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ define([
// | <script src="/path/to/dojo-toolkit/dojo/dojo.js" type="text/javascript" data-dojo-config="parseOnLoad: 0"></script> // | <script src="/path/to/dojo-toolkit/dojo/dojo.js" type="text/javascript" data-dojo-config="parseOnLoad: 0"></script>
// | <script type="text/javascript"> // | <script type="text/javascript">
// | require([ // | require([
// | "dojo/parser", "dojo/Stateful", "dijit/registry", // | "dojo/parser", "dojo/Stateful", "dijit/registry", "dojox/mvc/at",
// | "dijit/form/TextBox", "dojox/mvc/at", "dojox/mvc/ModelRefController", "dojo/domReady!" // | "dijit/form/TextBox", "dojox/mvc/ModelRefController", "dojo/domReady!"
// | ], function(parser, Stateful, registry){ // | ], function(parser, Stateful, registry, at){
// | window.at = at;
// | modelFoo = new Stateful({value: "Foo"}); // | modelFoo = new Stateful({value: "Foo"});
// | modelBar = new Stateful({value: "Bar"}); // | modelBar = new Stateful({value: "Bar"});
// | setTimeout(function(){ registry.byId("ctrl").set("model", modelBar); }, 2000); // | setTimeout(function(){ registry.byId("ctrl").set("model", modelBar); }, 2000);
Expand All @@ -41,7 +42,7 @@ define([
// | </head> // | </head>
// | <body> // | <body>
// | <span id="ctrl" data-dojo-type="dojox.mvc.ModelRefController" data-dojo-props="model: modelFoo"></span> // | <span id="ctrl" data-dojo-type="dojox.mvc.ModelRefController" data-dojo-props="model: modelFoo"></span>
// | <input type="text" data-dojo-type="dijit.form.TextBox" data-dojo-props="value: dojox.mvc.at('widget:ctrl', 'value')"> // | <input type="text" data-dojo-type="dijit.form.TextBox" data-dojo-props="value: at('widget:ctrl', 'value')">
// | </body> // | </body>
// | </html> // | </html>


Expand Down
9 changes: 5 additions & 4 deletions StatefulSeries.js
Original file line number Original file line Diff line number Diff line change
@@ -1,8 +1,9 @@
define([ define([
"dojo/_base/array", "dojo/_base/array",
"dojo/_base/declare", "dojo/_base/declare",
"dojo/_base/lang" "dojo/_base/lang",
], function(darray, declare, lang){ "dojox/mvc/at"
], function(darray, declare, lang, at){
return declare("dojox.mvc.StatefulSeries", null, { return declare("dojox.mvc.StatefulSeries", null, {
// summary: // summary:
// Chart data plugin ("series") that watches for properties specified in dojox.mvc.at handles in the given data. // Chart data plugin ("series") that watches for properties specified in dojox.mvc.at handles in the given data.
Expand All @@ -21,9 +22,9 @@ define([
if((item || {}).atsignature == "dojox.mvc.at"){ if((item || {}).atsignature == "dojox.mvc.at"){
var target = item.target, targetProp = item.targetProp; var target = item.target, targetProp = item.targetProp;
if(lang.isString(target)){ if(lang.isString(target)){
throw new Error("Literal-based dojox.mvc.at is not supported in dojox.mvc.StatefulSeries."); throw new Error("Literal-based dojox/mvc/at is not supported in dojox.mvc.StatefulSeries.");
} }
if(item.direction && !(item.direction & dojox.mvc.from)){ if(item.direction && !(item.direction & at.from)){
console.warn("Data binding direction option is ignored in dojox.mvc.StatefulSeries."); console.warn("Data binding direction option is ignored in dojox.mvc.StatefulSeries.");
} }
if(targetProp && lang.isFunction(target.set) && lang.isFunction(target.watch)){ if(targetProp && lang.isFunction(target.set) && lang.isFunction(target.watch)){
Expand Down
9 changes: 5 additions & 4 deletions StoreRefController.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ define([
// | <script src="/path/to/dojo-toolkit/dojo/dojo.js" type="text/javascript" data-dojo-config="parseOnLoad: 0"></script> // | <script src="/path/to/dojo-toolkit/dojo/dojo.js" type="text/javascript" data-dojo-config="parseOnLoad: 0"></script>
// | <script type="text/javascript"> // | <script type="text/javascript">
// | require([ // | require([
// | "dojo/parser", "dojo/store/Memory", "dijit/registry", // | "dojo/parser", "dojo/store/Memory", "dijit/registry", "dojox/mvc/at",
// | "dijit/form/TextBox", "dojox/mvc/at", "dojox/mvc/StoreRefController", "dojo/domReady!" // | "dijit/form/TextBox", "dojox/mvc/StoreRefController", "dojo/domReady!"
// | ], function(parser, Memory, registry){ // | ], function(parser, Memory, registry, at){
// | window.at = at;
// | store = new Memory({data: [{id: "Foo", value: "Foo"}, {id: "Bar", value: "Bar"}]}); // | store = new Memory({data: [{id: "Foo", value: "Foo"}, {id: "Bar", value: "Bar"}]});
// | parser.parse(); // | parser.parse();
// | registry.byId("ctrl").getStore("Foo"); // | registry.byId("ctrl").getStore("Foo");
Expand All @@ -41,7 +42,7 @@ define([
// | </head> // | </head>
// | <body> // | <body>
// | <span id="ctrl" data-dojo-type="dojox.mvc.StoreRefController" data-dojo-props="store: store"></span> // | <span id="ctrl" data-dojo-type="dojox.mvc.StoreRefController" data-dojo-props="store: store"></span>
// | <input type="text" data-dojo-type="dijit.form.TextBox" data-dojo-props="value: dojox.mvc.at('widget:ctrl', 'value')"> // | <input type="text" data-dojo-type="dijit.form.TextBox" data-dojo-props="value: at('widget:ctrl', 'value')">
// | </body> // | </body>
// | </html> // | </html>


Expand Down
2 changes: 1 addition & 1 deletion _Controller.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ define([


set: function(/*String*/ name, /*Anything*/ value){ set: function(/*String*/ name, /*Anything*/ value){
// summary: // summary:
// If the value given is dojox.mvc.at handle, use it for data binding. // If the value given is dojox/mvc/at handle, use it for data binding.
// Otherwise, if setter function is there, use it. // Otherwise, if setter function is there, use it.
// Otherwise, set the value to the data model or to this object. // Otherwise, set the value to the data model or to this object.
// name: String // name: String
Expand Down
2 changes: 1 addition & 1 deletion _DataBindingMixin.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ define([
registry = dijit.registry; registry = dijit.registry;
=====*/ =====*/


dojo.deprecated("dojox.mvc._DataBindingMixin", "Use dojox.mvc.at() for data binding."); dojo.deprecated("dojox.mvc._DataBindingMixin", "Use dojox/mvc/at for data binding.");


return declare("dojox.mvc._DataBindingMixin", null, { return declare("dojox.mvc._DataBindingMixin", null, {
// summary: // summary:
Expand Down
4 changes: 2 additions & 2 deletions _atBindingExtension.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ define([
// Apply the at binding mixin to all dijits, see mixin class description for details // Apply the at binding mixin to all dijits, see mixin class description for details
lang.extend(_WidgetBase, _atBindingMixin.prototype); lang.extend(_WidgetBase, _atBindingMixin.prototype);


// Monkey patch dijit._WidgetBase.postscript to get the list of dojox.mvc.at() handles before startup // Monkey patch dijit._WidgetBase.postscript to get the list of dojox/mvc/at handles before startup
var oldWidgetBasePostScript = _WidgetBase.prototype.postscript; var oldWidgetBasePostScript = _WidgetBase.prototype.postscript;
_WidgetBase.prototype.postscript = function(/*Object?*/ params, /*DomNode|String*/ srcNodeRef){ _WidgetBase.prototype.postscript = function(/*Object?*/ params, /*DomNode|String*/ srcNodeRef){
this._dbpostscript(params, srcNodeRef); this._dbpostscript(params, srcNodeRef);
Expand All @@ -28,7 +28,7 @@ define([
oldWidgetBaseDestroy.apply(this, [preserveDom]); oldWidgetBaseDestroy.apply(this, [preserveDom]);
}; };


// Monkey patch dijit._WidgetBase.set to establish data binding if a dojox.mvc.at() handle comes // Monkey patch dijit._WidgetBase.set to establish data binding if a dojox/mvc/at handle comes
var oldWidgetBaseSet = _WidgetBase.prototype.set; var oldWidgetBaseSet = _WidgetBase.prototype.set;
_WidgetBase.prototype.set = function(/*String*/ name, /*Anything*/ value){ _WidgetBase.prototype.set = function(/*String*/ name, /*Anything*/ value){
if(name == _atBindingMixin.prototype.dataBindAttr){ if(name == _atBindingMixin.prototype.dataBindAttr){
Expand Down
10 changes: 5 additions & 5 deletions _atBindingMixin.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ define([


_dbpostscript: function(/*Object?*/ params, /*DomNode|String*/ srcNodeRef){ _dbpostscript: function(/*Object?*/ params, /*DomNode|String*/ srcNodeRef){
// summary: // summary:
// See if any parameters for this widget are dojox.mvc.at handles. // See if any parameters for this widget are dojox/mvc/at handles.
// If so, move them under this._refs to prevent widget implementations from referring them. // If so, move them under this._refs to prevent widget implementations from referring them.


var refs = this._refs = (params || {}).refs || {}; var refs = this._refs = (params || {}).refs || {};
Expand All @@ -129,7 +129,7 @@ define([


_startAtWatchHandles: function(){ _startAtWatchHandles: function(){
// summary: // summary:
// Establish data bindings based on dojox.mvc.at() watch handles. // Establish data bindings based on dojox/mvc/at handles.


var refs = this._refs; var refs = this._refs;
if(refs){ if(refs){
Expand Down Expand Up @@ -163,12 +163,12 @@ define([


_setAtWatchHandle: function(/*String*/ name, /*Anything*/ value){ _setAtWatchHandle: function(/*String*/ name, /*Anything*/ value){
// summary: // summary:
// Called if the value is a dojox.mvc.at handle. // Called if the value is a dojox/mvc/at handle.
// If this widget has started, start data binding with the new dojox.mvc.at handle. // If this widget has started, start data binding with the new dojox/mvc/at handle.
// Otherwise, queue it up to this._refs so that _dbstartup() can pick it up. // Otherwise, queue it up to this._refs so that _dbstartup() can pick it up.


if(name == "ref"){ if(name == "ref"){
throw new Error(this + ": 1.7 ref syntax used in conjuction with 1.8 dojox.mvc.at() syntax, which is not supported."); throw new Error(this + ": 1.7 ref syntax used in conjuction with 1.8 dojox/mvc/at syntax, which is not supported.");
} }


// Claen up older data binding // Claen up older data binding
Expand Down
7 changes: 4 additions & 3 deletions at.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -60,16 +60,17 @@ define([
// | <script src="/path/to/dojo-toolkit/dojo/dojo.js" type="text/javascript" data-dojo-config="parseOnLoad: 0"></script> // | <script src="/path/to/dojo-toolkit/dojo/dojo.js" type="text/javascript" data-dojo-config="parseOnLoad: 0"></script>
// | <script type="text/javascript"> // | <script type="text/javascript">
// | require([ // | require([
// | "dojo/parser", "dojo/Stateful", "dijit/form/TextBox", "dojox/mvc/at", "dojo/domReady!" // | "dojo/parser", "dojo/Stateful", "dojox/mvc/at", "dijit/form/TextBox", "dojo/domReady!"
// | ], function(parser, Stateful){ // | ], function(parser, Stateful, at){
// | window.at = at;
// | model = new Stateful({value: "Foo"}); // | model = new Stateful({value: "Foo"});
// | setTimeout(function(){ model.set("value", "Bar"); }, 2000); // | setTimeout(function(){ model.set("value", "Bar"); }, 2000);
// | parser.parse(); // | parser.parse();
// | }); // | });
// | </script> // | </script>
// | </head> // | </head>
// | <body> // | <body>
// | <input type="text" data-dojo-type="dijit.form.TextBox" data-dojo-props="value: dojox.mvc.at(model, 'value')"> // | <input type="text" data-dojo-type="dijit.form.TextBox" data-dojo-props="value: at(model, 'value')">
// | </body> // | </body>
// | </html> // | </html>


Expand Down
2 changes: 1 addition & 1 deletion tests/mobile/demo/demo.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ <h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"
<div id="view" data-dojo-type="dojox.mvc.Generate" <div id="view" data-dojo-type="dojox.mvc.Generate"
data-dojo-props="widgetMapping:{'String' : 'dojox.mobile.TextBox'}, data-dojo-props="widgetMapping:{'String' : 'dojox.mobile.TextBox'},
idNameMapping: {String: 'TB'}, idNameMapping: {String: 'TB'},
children: at('widget:modelArea', 'value').direct(dojox.mvc.from).attach({format: dojo.fromJson})"> children: at('widget:modelArea', 'value').direct(at.from).attach({format: dojo.fromJson})">
</div> </div>
</div> </div>
<div class="fieldset"> <div class="fieldset">
Expand Down
2 changes: 1 addition & 1 deletion tests/multiattrib/doh_mvc_test_Toolbar.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ <h2>Toolbar from markup</h2>


<div style="margin-top:8px;"> <div style="margin-top:8px;">
Change the state for "Bold" (but this check box is free from change in the tool bar): Change the state for "Bold" (but this check box is free from change in the tool bar):
<input id="checkBold" data-dojo-type="dijit.form.CheckBox" checked data-dojo-props="checked: at(boldItemModel, 'checked').direct(dojox.mvc.to)"> <input id="checkBold" data-dojo-type="dijit.form.CheckBox" checked data-dojo-props="checked: at(boldItemModel, 'checked').direct(at.to)">
</div> </div>


<div style="margin-top:8px;"> <div style="margin-top:8px;">
Expand Down
2 changes: 1 addition & 1 deletion tests/multiattrib/doh_mvc_test_Toolbar_withCtrl.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ <h2>Toolbar from markup</h2>


<div style="margin-top:8px;"> <div style="margin-top:8px;">
Change the state for "Bold" (but this check box is free from change in the tool bar): Change the state for "Bold" (but this check box is free from change in the tool bar):
<input id="checkBold" data-dojo-type="dijit.form.CheckBox" checked data-dojo-props="checked: at(boldItemCtrl, 'checked').direct(dojox.mvc.to)"> <input id="checkBold" data-dojo-type="dijit.form.CheckBox" checked data-dojo-props="checked: at(boldItemCtrl, 'checked').direct(at.to)">
</div> </div>


<div style="margin-top:8px;"> <div style="margin-top:8px;">
Expand Down
2 changes: 1 addition & 1 deletion tests/multiattrib/test_Toolbar.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ <h2>Toolbar from markup</h2>
<div style="margin-top:8px;"> <div style="margin-top:8px;">
Change the state for "Bold" (but this check box is free from change in the tool bar): Change the state for "Bold" (but this check box is free from change in the tool bar):
<input data-dojo-type="dijit.form.CheckBox" checked <input data-dojo-type="dijit.form.CheckBox" checked
data-dojo-props="checked: at(boldItemModel, 'checked').direct(dojox.mvc.to)"> data-dojo-props="checked: at(boldItemModel, 'checked').direct(at.to)">
</div> </div>


<div style="margin-top:8px;"> <div style="margin-top:8px;">
Expand Down
8 changes: 4 additions & 4 deletions tests/regression/test_mvc_prog_repeat.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
'dojo/domReady!' 'dojo/domReady!'
], function (parser, mvc, Memory, DateTextBox, Calendar, StatefulModel, Repeat, Group, ], function (parser, mvc, Memory, DateTextBox, Calendar, StatefulModel, Repeat, Group,
at, registry, Button, Output, TextBox, dateStamp, dom, domconstruct) { at, registry, Button, Output, TextBox, dateStamp, dom, domconstruct) {

window.at = at;
dojox.debugDataBinding = true; dojox.debugDataBinding = true;


// *** Test1 setup begin: *** // *** Test1 setup begin: ***
Expand Down Expand Up @@ -179,10 +179,10 @@ <h2>Test 2: A programmatic repeat with the html inline with an mvc output field
<h2>Test 3: A programmatic repeat with the html inline using mvc.at.</h2> <h2>Test 3: A programmatic repeat with the html inline using mvc.at.</h2>
<div style="border-style: solid; border-width: 2px; width: 827px;"> <div style="border-style: solid; border-width: 2px; width: 827px;">
<div id="test3_repeat"> <div id="test3_repeat">
<div class="row" data-dojo-type="dojox.mvc.Group" data-dojo-props="target: dojox.mvc.at('rel:${this.index}')"> <div class="row" data-dojo-type="dojox.mvc.Group" data-dojo-props="target: at('rel:${this.index}')">
<label class="cell">Name:</label> <label class="cell">Name:</label>
<input class="cell" data-dojo-type="dijit.form.TextBox" data-dojo-props="value: dojox.mvc.at('rel:First', 'value')"></input> <input class="cell" data-dojo-type="dijit.form.TextBox" data-dojo-props="value: at('rel:First', 'value')"></input>
<input class="cell" data-dojo-type="dijit.form.TextBox" data-dojo-props="value: dojox.mvc.at('rel:Last', 'value')"></input> <input class="cell" data-dojo-type="dijit.form.TextBox" data-dojo-props="value: at('rel:Last', 'value')"></input>
</div> </div>
</div> </div>
</div> </div>
Expand Down
2 changes: 1 addition & 1 deletion tests/test_mvc_generate-view.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h3>Model</h3>
</div> </div>
<h3>Generated View</h3> <h3>Generated View</h3>
<div data-dojo-type="dojox.mvc.Generate" <div data-dojo-type="dojox.mvc.Generate"
data-dojo-props="children: at('widget:textarea', 'value').direct(dojox.mvc.from).attach({format: dojo.fromJson}), idNameMapping: {String: 'view_t'}"></div> data-dojo-props="children: at('widget:textarea', 'value').direct(at.from).attach({format: dojo.fromJson}), idNameMapping: {String: 'view_t'}"></div>
</div> </div>
</div> </div>
</body> </body>
Expand Down
Loading

0 comments on commit ea31ef7

Please sign in to comment.