Searched refs:model (Results 1 - 18 of 18) sorted by relevance

/yui3/src/app/tests/
H A Dmodel-test.js1 YUI.add('model-test', function (Y) {
20 'destroy() should destroy the model instance': function () {
21 var model = new Y.Model();
23 model.sync = function () {
24 Assert.fail('sync should not be called unless the model is being deleted');
27 Assert.isFalse(model.get('destroyed'));
28 Assert.areSame(model, model.destroy(), 'destroy() should be chainable');
29 Assert.isTrue(model.get('destroyed'));
34 model
[all...]
H A Dmodel-list-test.js1 YUI.add('model-list-test', function (Y) {
21 this.list = new Y.ModelList({model: Y.Model});
29 var model = new Y.Model();
31 this.list.add(model);
32 Assert.areSame(this.list, model.lists[0]);
35 ArrayAssert.isEmpty(model.lists);
57 'ModelList instances should have a `model` property that defaults to Y.Model': function () {
58 Assert.areSame(Y.Model, this.list.model);
61 '`model` property should be customizable on init': function () {
63 list = new Y.ModelList({model
[all...]
H A Dview-test.js140 var model = new Y.Model(),
141 view = new Y.View({model: model, foo: 'bar'});
143 Assert.areSame(model, view.get('model'));
275 requires: ['model', 'model-list', 'view', 'test']
/yui3/src/app/js/
H A Dmodel-list.js5 @submodule model-list
14 for events on the model instances they contain. This means, for example, that
16 on the list to be notified whenever any model in the list changes.
34 Fired when a model is added to the list.
36 Listen to the `on` phase of this event to be notified before a model is
38 prevent the model from being added.
40 Listen to the `after` phase of this event to be notified after a model has
44 @param {Model} model The model being added.
45 @param {Number} index The index at which the model wil
[all...]
/yui3/build/model-list/
H A Dmodel-list-debug.js1 YUI.add('model-list', function(Y) {
7 @submodule model-list
16 for events on the model instances they contain. This means, for example, that
18 on the list to be notified whenever any model in the list changes.
36 Fired when a model is added to the list.
38 Listen to the `on` phase of this event to be notified before a model is
40 prevent the model from being added.
42 Listen to the `after` phase of this event to be notified after a model has
46 @param {Model} model The model bein
[all...]
/yui3/src/app/tests/benchmark/
H A Dapp-benchmark.js6 suite.add('Y.Model: Instantiate a bare model', function () {
7 var model = new Y.Model();
10 suite.add('Y.Model: Subclass and instantiate a bare model', function () {
12 model = new MyModel();
/yui3/src/datatable/js/
H A Dmutable.js233 models, model, i, len, args;
243 model = models[i];
245 if (model.isNew()) {
293 models, model, i, len, args;
297 model = id;
299 model = modelList.getById(id) ||
304 if (model) {
308 [model].concat(args));
320 model = models[i];
321 model
[all...]
H A Dbody.js597 data.each(function (model, index) {
598 html += this._createRowHTML(model, index);
633 @param {Model} model The Model instance to apply to the row template
639 _createRowHTML: function (model, index) {
640 var data = model.toJSON(),
641 clientId = model.get('clientId'),
663 record : model,
H A Dcore.js113 Model subclass to use as the `model` for the ModelList stored in the `data`
119 1. If the `data` attribute is set with a ModelList instance and its `model`
122 `model` property is unset, but it is populated, the `ATTRS` of the
150 will be created using the configured `recordType` as its `model` property
991 to `this.data`. If it is an array, a ModelList is created, its `model`
1013 data.model = recordType;
1086 1. If the `data` attribute is set with a ModelList with a `model` property,
1115 if (data.model) {
1116 recordType = data.model;
1120 recordType = data.model
[all...]
/yui3/build/datatable-mutable/
H A Ddatatable-mutable-debug.js235 models, model, i, len, args;
245 model = models[i];
247 if (model.isNew()) {
295 models, model, i, len, args;
299 model = id;
301 model = modelList.getById(id) ||
306 if (model) {
310 [model].concat(args));
322 model = models[i];
323 model
[all...]
/yui3/src/datatable/tests/
H A Ddatatable-mutable-tests.js794 table.data.model.prototype.sync = function (action) {
810 table.data.model.prototype.sync = function (action) {
888 table.data.model.prototype.sync = function (action) {
907 table.data.model.prototype.sync = function (action) {
958 model = table.data.item(0);
962 Y.Assert.areSame(2, model.get('a'));
963 Y.Assert.areSame(2, model.get('b'));
964 Y.Assert.areSame(2, model.get('c'));
969 model = table.data.item(0);
971 table.modifyRow(model
[all...]
H A Ddatatable-base-tests.js93 var model = Y.Base.create('test-model', Y.Model, [], {}, {
109 modelList.model = model;
H A Ddatatable-core-tests.js628 modelList.model = Y.Base.create('testModel', Y.Model, [], {}, {
762 var model = Y.Base.create('test-model', Y.Model, [], {}, {
776 modelList.model = model;
881 Y.Assert.areSame(Model, table.data.model);
894 "recordType should default from data modelList.model": function () {
898 modelList.model = Y.Base.create('testModel', Y.Model, [], {}, {
916 Y.Assert.areSame(table.get('recordType'), table.data.model);
946 modelList.model
[all...]
/yui3/src/datatable/tests/src/
H A Ddatatable-mutable.js792 table.data.model.prototype.sync = function (action) {
808 table.data.model.prototype.sync = function (action) {
886 table.data.model.prototype.sync = function (action) {
905 table.data.model.prototype.sync = function (action) {
956 model = table.data.item(0);
960 Y.Assert.areSame(2, model.get('a'));
961 Y.Assert.areSame(2, model.get('b'));
962 Y.Assert.areSame(2, model.get('c'));
967 model = table.data.item(0);
969 table.modifyRow(model
[all...]
H A Ddatatable-base.js91 var model = Y.Base.create('test-model', Y.Model, [], {}, {
107 modelList.model = model;
H A Ddatatable-core.js626 modelList.model = Y.Base.create('testModel', Y.Model, [], {}, {
760 var model = Y.Base.create('test-model', Y.Model, [], {}, {
774 modelList.model = model;
879 Y.Assert.areSame(Model, table.data.model);
892 "recordType should default from data modelList.model": function () {
896 modelList.model = Y.Base.create('testModel', Y.Model, [], {}, {
914 Y.Assert.areSame(table.get('recordType'), table.data.model);
944 modelList.model
[all...]
/yui3/build/datatable-body/
H A Ddatatable-body-debug.js599 data.each(function (model, index) {
600 html += this._createRowHTML(model, index);
635 @param {Model} model The Model instance to apply to the row template
641 _createRowHTML: function (model, index) {
642 var data = model.toJSON(),
643 clientId = model.get('clientId'),
665 record : model,
/yui3/build/datatable-core/
H A Ddatatable-core-debug.js115 Model subclass to use as the `model` for the ModelList stored in the `data`
121 1. If the `data` attribute is set with a ModelList instance and its `model`
124 `model` property is unset, but it is populated, the `ATTRS` of the
152 will be created using the configured `recordType` as its `model` property
993 to `this.data`. If it is an array, a ModelList is created, its `model`
1015 data.model = recordType;
1088 1. If the `data` attribute is set with a ModelList with a `model` property,
1117 if (data.model) {
1118 recordType = data.model;
1122 recordType = data.model
[all...]

Completed in 462 milliseconds